Home | History | Annotate | Download | only in src

Lines Matching full:code

6 //     * Redistributions of source code must retain the above copyright
51 // computed from the original code - not the patched code. Let
52 // these cases fall through to the unreachable code below.
63 Code* new_target,
79 // To improve the performance of the (much used) IC code, we unfold
80 // a few levels of the stack frame iteration code. This yields a
114 // Find the function on the stack and both the active code for the
115 // function and the original code.
118 Code* code = shared->code();
120 Code* original_code = Debug::GetDebugInfo(shared)->original_code();
122 // Get the address of the call site in the active code. This is the
126 // Return the address in the original code. This is the place where
130 original_code->instruction_start() - code->instruction_start();
135 IC::State IC::StateFrom(Code* target, Object* receiver) {
148 // the receiver map's code cache. Therefore, if the current target
149 // is in the receiver map's code cache, the inline cache failed due
156 Code::Kind kind = target->kind();
157 if (kind == Code::KEYED_LOAD_IC || kind == Code::KEYED_STORE_IC) {
161 // Remove the target from the code cache to avoid hitting the same
184 Code* code = Code::cast(Heap::FindCodeObject(addr));
185 for (RelocIterator it(code, RelocInfo::kCodeTargetMask);
214 Code* target = GetTargetAtAddress(address);
220 case Code::LOAD_IC: return LoadIC::Clear(address, target);
221 case Code::KEYED_LOAD_IC: return KeyedLoadIC::Clear(address, target);
222 case Code::STORE_IC: return StoreIC::Clear(address, target);
223 case Code::KEYED_STORE_IC: return KeyedStoreIC::Clear(address, target);
224 case Code::CALL_IC: return CallIC::Clear(address, target);
230 void CallIC::Clear(Address address, Code* target) {
234 Code* code =
236 SetTargetAtAddress(address, code);
240 void KeyedLoadIC::Clear(Address address, Code* target) {
243 // do not clear these maps, cached code can keep objects alive
250 void LoadIC::Clear(Address address, Code* target) {
257 void StoreIC::Clear(Address address, Code* target) {
263 void KeyedStoreIC::Clear(Address address, Code* target) {
269 Code* KeyedLoadIC::external_array_stub(JSObject::ElementsKind elements_kind) {
293 Code* KeyedStoreIC::external_array_stub(JSObject::ElementsKind elements_kind) {
501 Object* code = NULL;
507 code = StubCache::ComputeCallPreMonomorphic(argc, in_loop);
509 code = StubCache::ComputeCallMegamorphic(argc, in_loop);
515 code = StubCache::ComputeCallField(argc, in_loop, *name, *object,
520 // Get the constant function and compute the code stub for this
522 // that the code stub is in the stub cache.
524 code = StubCache::ComputeCallConstant(argc, in_loop, *name, *object,
538 code = StubCache::ComputeCallGlobal(argc,
551 code = StubCache::ComputeCallNormal(argc, in_loop, *name, *receiver);
557 code = StubCache::ComputeCallInterceptor(argc, *name, *object,
568 if (code == NULL || code->IsFailure()) return;
575 set_target(Code::cast(code));
592 // Use specialized code for getting the length of strings and
606 Code* target = NULL;
613 // Use specialized code for getting the length of arrays.
618 Code* target = Builtins::builtin(Builtins::LoadIC_ArrayLength);
624 // Use specialized code for getting prototype of functions.
629 Code* target = Builtins::builtin(Builtins::LoadIC_FunctionPrototype);
712 // Compute the code stub for this load.
713 Object* code = NULL;
718 code = pre_monomorphic_stub();
723 code = StubCache::ComputeLoadField(*name, *receiver,
730 code = StubCache::ComputeLoadConstant(*name, *receiver,
739 code = StubCache::ComputeLoadGlobal(*name,
750 code = StubCache::ComputeLoadNormal(*name, *receiver);
759 code = StubCache::ComputeLoadCallback(*name, *receiver,
765 code = StubCache::ComputeLoadInterceptor(*name, *receiver,
776 if (code == NULL || code->IsFailure()) return;
781 set_target(Code::cast(code));
805 // Use specialized code for getting the length of strings.
808 Object* code = NULL;
809 code = StubCache::ComputeKeyedLoadStringLength(*name, *string);
810 if (code->IsFailure()) return code;
811 set_target(Code::cast(code));
818 // Use specialized code for getting the length of arrays.
821 Object* code = StubCache::ComputeKeyedLoadArrayLength(*name, *array);
822 if (code->IsFailure()) return code;
823 set_target(Code::cast(code));
830 // Use specialized code for getting prototype of functions.
833 Object* code =
835 if (code->IsFailure()) return code;
836 set_target(Code::cast(code));
890 Code* stub = generic_stub();
926 // Compute the code stub for this load.
927 Object* code = NULL;
933 code = pre_monomorphic_stub();
938 code = StubCache::ComputeKeyedLoadField(*name, *receiver,
945 code = StubCache::ComputeKeyedLoadConstant(*name, *receiver,
954 code = StubCache::ComputeKeyedLoadCallback(*name, *receiver,
960 code = StubCache::ComputeKeyedLoadInterceptor(*name, *receiver,
967 code = generic_stub();
975 if (code == NULL || code->IsFailure()) return;
981 set_target(Code::cast(code));
1074 // Compute the code stub for this store; used for rewriting to
1075 // monomorphic state and making sure that the code stub is in the
1077 Object* code = NULL;
1080 code = StubCache::ComputeStoreField(*name, *receiver,
1090 code = StubCache::ComputeStoreField(*name, *receiver, index, *transition);
1103 code = StubCache::ComputeStoreGlobal(*name, *global, cell);
1110 code = StubCache::ComputeStoreCallback(*name, *receiver, callback);
1115 code = StubCache::ComputeStoreInterceptor(*name, *receiver);
1124 if (code == NULL || code->IsFailure()) return;
1128 set_target(Code::cast(code));
1131 if (target() != Code::cast(code)) set_target(megamorphic_stub());
1185 Code* stub = generic_stub();
1220 // Compute the code stub for this store; used for rewriting to
1221 // monomorphic state and making sure that the code stub is in the
1223 Object* code = NULL;
1227 code = StubCache::ComputeKeyedStoreField(*name, *receiver,
1237 code = StubCache::ComputeKeyedStoreField(*name, *receiver,
1246 code = generic_stub();
1253 if (code == NULL || code->IsFailure()) return;
1259 set_target(Code::cast(code));