Home | History | Annotate | Download | only in src

Lines Matching defs:code

6 //     * Redistributions of source code must retain the above copyright
52 // computed from the original code - not the patched code. Let
53 // these cases fall through to the unreachable code below.
64 Code* new_target,
83 // To improve the performance of the (much used) IC code, we unfold
84 // a few levels of the stack frame iteration code. This yields a
119 // Find the function on the stack and both the active code for the
120 // function and the original code.
123 Code* code = shared->code();
125 Code* original_code = Debug::GetDebugInfo(shared)->original_code();
127 // Get the address of the call site in the active code. This is the
131 // Return the address in the original code. This is the place where
135 original_code->instruction_start() - code->instruction_start();
161 static bool TryRemoveInvalidPrototypeDependentStub(Code* target,
165 Code::ExtractCacheHolderFromFlags(target->flags());
183 // the receiver map's code cache. Therefore, if the current target
184 // is in the receiver map's code cache, the inline cache failed due
196 IC::State IC::StateFrom(Code* target, Object* receiver, Object* name) {
205 Code::Kind kind = target->kind();
206 if (kind == Code::KEYED_LOAD_IC ||
207 kind == Code::KEYED_STORE_IC ||
208 kind == Code::KEYED_CALL_IC) {
212 // Remove the target from the code cache if it became invalid
217 if (kind != Code::CALL_IC &&
238 Code* code = Code::cast(isolate()->heap()->FindCodeObject(addr));
239 for (RelocIterator it(code, RelocInfo::kCodeTargetMask);
269 Code* target = GetTargetAtAddress(address);
275 case Code::LOAD_IC: return LoadIC::Clear(address, target);
276 case Code::KEYED_LOAD_IC:
277 case Code::KEYED_EXTERNAL_ARRAY_LOAD_IC:
279 case Code::STORE_IC: return StoreIC::Clear(address, target);
280 case Code::KEYED_STORE_IC:
281 case Code::KEYED_EXTERNAL_ARRAY_STORE_IC:
283 case Code::CALL_IC: return CallIC::Clear(address, target);
284 case Code::KEYED_CALL_IC: return KeyedCallIC::Clear(address, target);
285 case Code::TYPE_RECORDING_BINARY_OP_IC:
286 case Code::COMPARE_IC:
295 void CallICBase::Clear(Address address, Code* target) {
298 Code* code =
303 SetTargetAtAddress(address, code);
314 void KeyedLoadIC::Clear(Address address, Code* target) {
317 // do not clear these maps, cached code can keep objects alive
337 void LoadIC::Clear(Address address, Code* target) {
352 void StoreIC::Clear(Address address, Code* target) {
377 void KeyedStoreIC::Clear(Address address, Code* target) {
474 Code::ExtraICState extra_ic_state,
575 Code::ExtraICState* extra_ic_state) {
576 ASSERT(kind_ == Code::CALL_IC);
624 Code::ExtraICState extra_ic_state,
643 // Get the constant function and compute the code stub for this
645 // that the code stub is in the stub cache.
710 Code::ExtraICState extra_ic_state,
737 if (kind_ == Code::CALL_IC &&
744 } else if (kind_ == Code::CALL_IC &&
769 Object* code;
770 if (maybe_code == NULL || !maybe_code->ToObject(&code)) return;
777 set_target(Code::cast(code));
779 // Cache code holding map should be consistent with
785 isolate()->stub_cache()->Set(*name, map, Code::cast(code));
791 TraceIC(kind_ == Code::CALL_IC ? "CallIC" : "KeyedCallIC",
802 Code::kNoExtraICState,
815 argc, in_loop, Code::KEYED_CALL_IC);
816 Object* code;
817 if (maybe_code->ToObject(&code)) {
818 set_target(Code::cast(code));
861 Code* non_monomorphic_stub =
864 // Use specialized code for getting the length of strings and
899 // Use specialized code for getting the length of arrays.
917 // Use specialized code for getting prototype of functions.
1048 // Compute the code stub for this load.
1050 Object* code;
1119 if (maybe_code == NULL || !maybe_code->ToObject(&code)) return;
1124 set_target(Code::cast(code));
1128 // Cache code holding map should be consistent with
1133 isolate()->stub_cache()->Set(*name, map, Code::cast(code));
1146 // TODO(1295): Remove this code.
1167 // Use specialized code for getting the length of strings.
1171 Object* code = NULL;
1175 if (!maybe_code->ToObject(&code)) return maybe_code;
1177 set_target(Code::cast(code));
1184 // Use specialized code for getting the length of arrays.
1188 Object* code;
1192 if (!maybe_code->ToObject(&code)) return maybe_code;
1194 set_target(Code::cast(code));
1201 // Use specialized code for getting prototype of functions.
1206 Object* code;
1210 if (!maybe_code->ToObject(&code)) return maybe_code;
1212 set_target(Code::cast(code));
1269 Code* stub = generic_stub();
1280 NULL : Code::cast(probe->ToObjectUnchecked());
1288 NULL : Code::cast(probe->ToObjectUnchecked());
1326 // Compute the code stub for this load.
1328 Object* code;
1375 if (maybe_code == NULL || !maybe_code->ToObject(&code)) return;
1381 set_target(Code::cast(code));
1455 // Use specialized code for setting the length of arrays.
1542 Code* stub = (strict_mode == kStrictMode)
1574 // Compute the code stub for this store; used for rewriting to
1575 // monomorphic state and making sure that the code stub is in the
1578 Object* code = NULL;
1631 if (maybe_code == NULL || !maybe_code->ToObject(&code)) return;
1635 set_target(Code::cast(code));
1638 if (target() != Code::cast(code)) {
1647 Code::cast(code));
1702 Code* stub =
1712 NULL : Code::cast(probe->ToObjectUnchecked());
1718 NULL : Code::cast(probe->ToObjectUnchecked());
1752 // Compute the code stub for this store; used for rewriting to
1753 // monomorphic state and making sure that the code stub is in the
1756 Object* code = NULL;
1788 if (maybe_code == NULL || !maybe_code->ToObject(&code)) return;
1794 set_target(Code::cast(code));
1832 Code::ExtraICState extra_ic_state = ic.target()->extra_ic_state();
1903 Code::ExtraICState extra_ic_state = ic.target()->extra_ic_state();
1919 // The generated code should filter out non-Smis before we get here.
1972 Code::ExtraICState extra_ic_state = ic.target()->extra_ic_state();
1981 void TRBinaryOpIC::patch(Code* code) {
1982 set_target(code);
2063 // defined in code-stubs-<arch>.cc
2064 // Only needed to remove dependency of ic.cc on code-stubs-<arch>.h.
2065 Handle<Code> GetTypeRecordingBinaryOpStub(int key,
2106 Handle<Code> code = GetTypeRecordingBinaryOpStub(key, type, result_type);
2107 if (!code.is_null()) {
2116 ic.patch(*code);
2118 // Activate inlined smi code.
2181 Handle<Code> CompareIC::GetUninitialized(Token::Value op) {
2187 CompareIC::State CompareIC::ComputeState(Code* target) {
2225 RUNTIME_FUNCTION(Code*, CompareIC_Miss) {