| 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/base/bits.h" | 10 #include "src/base/bits.h" |
| (...skipping 972 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 983 ExtraICState extra_state) { | 983 ExtraICState extra_state) { |
| 984 if (FLAG_vector_ics) { | 984 if (FLAG_vector_ics) { |
| 985 return LoadICTrampolineStub(isolate, LoadICState(extra_state)).GetCode(); | 985 return LoadICTrampolineStub(isolate, LoadICState(extra_state)).GetCode(); |
| 986 } | 986 } |
| 987 | 987 |
| 988 return PropertyICCompiler::ComputeLoad(isolate, UNINITIALIZED, extra_state); | 988 return PropertyICCompiler::ComputeLoad(isolate, UNINITIALIZED, extra_state); |
| 989 } | 989 } |
| 990 | 990 |
| 991 | 991 |
| 992 Handle<Code> LoadIC::initialize_stub_in_optimized_code( | 992 Handle<Code> LoadIC::initialize_stub_in_optimized_code( |
| 993 Isolate* isolate, ExtraICState extra_state) { | 993 Isolate* isolate, ExtraICState extra_state, State initialization_state) { |
| 994 DCHECK(initialization_state == UNINITIALIZED || |
| 995 initialization_state == MEGAMORPHIC); |
| 994 if (FLAG_vector_ics) { | 996 if (FLAG_vector_ics) { |
| 995 return VectorLoadStub(isolate, LoadICState(extra_state)).GetCode(); | 997 return VectorLoadStub(isolate, LoadICState(extra_state)).GetCode(); |
| 996 } | 998 } |
| 997 return initialize_stub(isolate, extra_state); | 999 return PropertyICCompiler::ComputeLoad(isolate, initialization_state, |
| 1000 extra_state); |
| 998 } | 1001 } |
| 999 | 1002 |
| 1000 | 1003 |
| 1001 Handle<Code> KeyedLoadIC::initialize_stub(Isolate* isolate) { | 1004 Handle<Code> KeyedLoadIC::initialize_stub(Isolate* isolate) { |
| 1002 if (FLAG_vector_ics) { | 1005 if (FLAG_vector_ics) { |
| 1003 return KeyedLoadICTrampolineStub(isolate).GetCode(); | 1006 return KeyedLoadICTrampolineStub(isolate).GetCode(); |
| 1004 } | 1007 } |
| 1005 | 1008 |
| 1006 return isolate->builtins()->KeyedLoadIC_Initialize(); | 1009 return isolate->builtins()->KeyedLoadIC_Initialize(); |
| 1007 } | 1010 } |
| (...skipping 600 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1608 | 1611 |
| 1609 Handle<Code> CallIC::initialize_stub_in_optimized_code( | 1612 Handle<Code> CallIC::initialize_stub_in_optimized_code( |
| 1610 Isolate* isolate, int argc, CallICState::CallType call_type) { | 1613 Isolate* isolate, int argc, CallICState::CallType call_type) { |
| 1611 CallICStub stub(isolate, CallICState(argc, call_type)); | 1614 CallICStub stub(isolate, CallICState(argc, call_type)); |
| 1612 Handle<Code> code = stub.GetCode(); | 1615 Handle<Code> code = stub.GetCode(); |
| 1613 return code; | 1616 return code; |
| 1614 } | 1617 } |
| 1615 | 1618 |
| 1616 | 1619 |
| 1617 Handle<Code> StoreIC::initialize_stub(Isolate* isolate, | 1620 Handle<Code> StoreIC::initialize_stub(Isolate* isolate, |
| 1618 LanguageMode language_mode) { | 1621 LanguageMode language_mode, |
| 1622 State initialization_state) { |
| 1623 DCHECK(initialization_state == UNINITIALIZED || |
| 1624 initialization_state == MEGAMORPHIC); |
| 1619 ExtraICState extra_state = ComputeExtraICState(language_mode); | 1625 ExtraICState extra_state = ComputeExtraICState(language_mode); |
| 1620 Handle<Code> ic = | 1626 Handle<Code> ic = PropertyICCompiler::ComputeStore( |
| 1621 PropertyICCompiler::ComputeStore(isolate, UNINITIALIZED, extra_state); | 1627 isolate, initialization_state, extra_state); |
| 1622 return ic; | 1628 return ic; |
| 1623 } | 1629 } |
| 1624 | 1630 |
| 1625 | 1631 |
| 1626 Handle<Code> StoreIC::megamorphic_stub() { | 1632 Handle<Code> StoreIC::megamorphic_stub() { |
| 1627 if (kind() == Code::STORE_IC) { | 1633 if (kind() == Code::STORE_IC) { |
| 1628 return PropertyICCompiler::ComputeStore(isolate(), MEGAMORPHIC, | 1634 return PropertyICCompiler::ComputeStore(isolate(), MEGAMORPHIC, |
| 1629 extra_ic_state()); | 1635 extra_ic_state()); |
| 1630 } else { | 1636 } else { |
| 1631 DCHECK(kind() == Code::KEYED_STORE_IC); | 1637 DCHECK(kind() == Code::KEYED_STORE_IC); |
| (...skipping 1365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2997 static const Address IC_utilities[] = { | 3003 static const Address IC_utilities[] = { |
| 2998 #define ADDR(name) FUNCTION_ADDR(name), | 3004 #define ADDR(name) FUNCTION_ADDR(name), |
| 2999 IC_UTIL_LIST(ADDR) NULL | 3005 IC_UTIL_LIST(ADDR) NULL |
| 3000 #undef ADDR | 3006 #undef ADDR |
| 3001 }; | 3007 }; |
| 3002 | 3008 |
| 3003 | 3009 |
| 3004 Address IC::AddressFromUtilityId(IC::UtilityId id) { return IC_utilities[id]; } | 3010 Address IC::AddressFromUtilityId(IC::UtilityId id) { return IC_utilities[id]; } |
| 3005 } | 3011 } |
| 3006 } // namespace v8::internal | 3012 } // namespace v8::internal |
| OLD | NEW |