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/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
8 #include "src/api.h" | 8 #include "src/api.h" |
9 #include "src/arguments.h" | 9 #include "src/arguments.h" |
10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
(...skipping 536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
547 Token::Value op; | 547 Token::Value op; |
548 ICCompareStub::DecodeMinorKey(target->stub_info(), NULL, NULL, | 548 ICCompareStub::DecodeMinorKey(target->stub_info(), NULL, NULL, |
549 &handler_state, &op); | 549 &handler_state, &op); |
550 // Only clear CompareICs that can retain objects. | 550 // Only clear CompareICs that can retain objects. |
551 if (handler_state != KNOWN_OBJECT) return; | 551 if (handler_state != KNOWN_OBJECT) return; |
552 SetTargetAtAddress(address, GetRawUninitialized(isolate, op), constant_pool); | 552 SetTargetAtAddress(address, GetRawUninitialized(isolate, op), constant_pool); |
553 PatchInlinedSmiCode(address, DISABLE_INLINED_SMI_CHECK); | 553 PatchInlinedSmiCode(address, DISABLE_INLINED_SMI_CHECK); |
554 } | 554 } |
555 | 555 |
556 | 556 |
| 557 Handle<Code> KeyedLoadIC::megamorphic_stub() { |
| 558 if (FLAG_compiled_keyed_generic_loads) { |
| 559 return KeyedLoadGenericElementStub(isolate()).GetCode(); |
| 560 } else { |
| 561 return isolate()->builtins()->KeyedLoadIC_Generic(); |
| 562 } |
| 563 } |
| 564 |
| 565 Handle<Code> KeyedLoadIC::generic_stub() const { |
| 566 if (FLAG_compiled_keyed_generic_loads) { |
| 567 return KeyedLoadGenericElementStub(isolate()).GetCode(); |
| 568 } else { |
| 569 return isolate()->builtins()->KeyedLoadIC_Generic(); |
| 570 } |
| 571 } |
| 572 |
| 573 |
557 static bool MigrateDeprecated(Handle<Object> object) { | 574 static bool MigrateDeprecated(Handle<Object> object) { |
558 if (!object->IsJSObject()) return false; | 575 if (!object->IsJSObject()) return false; |
559 Handle<JSObject> receiver = Handle<JSObject>::cast(object); | 576 Handle<JSObject> receiver = Handle<JSObject>::cast(object); |
560 if (!receiver->map()->is_deprecated()) return false; | 577 if (!receiver->map()->is_deprecated()) return false; |
561 JSObject::MigrateInstance(Handle<JSObject>::cast(object)); | 578 JSObject::MigrateInstance(Handle<JSObject>::cast(object)); |
562 return true; | 579 return true; |
563 } | 580 } |
564 | 581 |
565 | 582 |
566 MaybeHandle<Object> LoadIC::Load(Handle<Object> object, Handle<String> name) { | 583 MaybeHandle<Object> LoadIC::Load(Handle<Object> object, Handle<String> name) { |
(...skipping 2482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3049 #undef ADDR | 3066 #undef ADDR |
3050 }; | 3067 }; |
3051 | 3068 |
3052 | 3069 |
3053 Address IC::AddressFromUtilityId(IC::UtilityId id) { | 3070 Address IC::AddressFromUtilityId(IC::UtilityId id) { |
3054 return IC_utilities[id]; | 3071 return IC_utilities[id]; |
3055 } | 3072 } |
3056 | 3073 |
3057 | 3074 |
3058 } } // namespace v8::internal | 3075 } } // namespace v8::internal |
OLD | NEW |