OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/ic/ic.h" | 5 #include "src/ic/ic.h" |
6 | 6 |
7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
8 #include "src/api-arguments-inl.h" | 8 #include "src/api-arguments-inl.h" |
9 #include "src/api.h" | 9 #include "src/api.h" |
10 #include "src/arguments.h" | 10 #include "src/arguments.h" |
(...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
515 Address constant_pool) { | 515 Address constant_pool) { |
516 DCHECK(CodeStub::GetMajorKey(target) == CodeStub::CompareIC); | 516 DCHECK(CodeStub::GetMajorKey(target) == CodeStub::CompareIC); |
517 CompareICStub stub(target->stub_key(), isolate); | 517 CompareICStub stub(target->stub_key(), isolate); |
518 // Only clear CompareICs that can retain objects. | 518 // Only clear CompareICs that can retain objects. |
519 if (stub.state() != CompareICState::KNOWN_RECEIVER) return; | 519 if (stub.state() != CompareICState::KNOWN_RECEIVER) return; |
520 SetTargetAtAddress(address, GetRawUninitialized(isolate, stub.op()), | 520 SetTargetAtAddress(address, GetRawUninitialized(isolate, stub.op()), |
521 constant_pool); | 521 constant_pool); |
522 PatchInlinedSmiCode(isolate, address, DISABLE_INLINED_SMI_CHECK); | 522 PatchInlinedSmiCode(isolate, address, DISABLE_INLINED_SMI_CHECK); |
523 } | 523 } |
524 | 524 |
525 | |
526 // static | |
527 Handle<Code> KeyedLoadIC::ChooseMegamorphicStub(Isolate* isolate, | |
528 ExtraICState extra_state) { | |
529 // TODO(ishell): remove extra_ic_state | |
530 if (FLAG_compiled_keyed_generic_loads) { | |
531 return KeyedLoadGenericStub(isolate).GetCode(); | |
532 } else { | |
533 return isolate->builtins()->KeyedLoadIC_Megamorphic(); | |
534 } | |
535 } | |
536 | |
537 | |
538 static bool MigrateDeprecated(Handle<Object> object) { | 525 static bool MigrateDeprecated(Handle<Object> object) { |
539 if (!object->IsJSObject()) return false; | 526 if (!object->IsJSObject()) return false; |
540 Handle<JSObject> receiver = Handle<JSObject>::cast(object); | 527 Handle<JSObject> receiver = Handle<JSObject>::cast(object); |
541 if (!receiver->map()->is_deprecated()) return false; | 528 if (!receiver->map()->is_deprecated()) return false; |
542 JSObject::MigrateInstance(Handle<JSObject>::cast(object)); | 529 JSObject::MigrateInstance(Handle<JSObject>::cast(object)); |
543 return true; | 530 return true; |
544 } | 531 } |
545 | 532 |
546 void IC::ConfigureVectorState(IC::State new_state, Handle<Object> key) { | 533 void IC::ConfigureVectorState(IC::State new_state, Handle<Object> key) { |
547 DCHECK(UseVector()); | 534 DCHECK(UseVector()); |
(...skipping 2413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2961 DCHECK_EQ(LookupIterator::INTERCEPTOR, it.state()); | 2948 DCHECK_EQ(LookupIterator::INTERCEPTOR, it.state()); |
2962 it.Next(); | 2949 it.Next(); |
2963 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result, | 2950 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result, |
2964 Object::GetProperty(&it)); | 2951 Object::GetProperty(&it)); |
2965 } | 2952 } |
2966 | 2953 |
2967 return *result; | 2954 return *result; |
2968 } | 2955 } |
2969 } // namespace internal | 2956 } // namespace internal |
2970 } // namespace v8 | 2957 } // namespace v8 |
OLD | NEW |