| 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 652 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 663 | 663 |
| 664 if (FLAG_harmony_scoping && object->IsGlobalObject() && name->IsString()) { | 664 if (FLAG_harmony_scoping && object->IsGlobalObject() && name->IsString()) { |
| 665 // Look up in global context table. | 665 // Look up in global context table. |
| 666 Handle<String> str_name = Handle<String>::cast(name); | 666 Handle<String> str_name = Handle<String>::cast(name); |
| 667 Handle<GlobalObject> global = Handle<GlobalObject>::cast(object); | 667 Handle<GlobalObject> global = Handle<GlobalObject>::cast(object); |
| 668 Handle<GlobalContextTable> global_contexts( | 668 Handle<GlobalContextTable> global_contexts( |
| 669 global->native_context()->global_context_table()); | 669 global->native_context()->global_context_table()); |
| 670 | 670 |
| 671 GlobalContextTable::LookupResult lookup_result; | 671 GlobalContextTable::LookupResult lookup_result; |
| 672 if (GlobalContextTable::Lookup(global_contexts, str_name, &lookup_result)) { | 672 if (GlobalContextTable::Lookup(global_contexts, str_name, &lookup_result)) { |
| 673 if (use_ic && LoadGlobalContextFieldStub::Accepted(&lookup_result)) { |
| 674 LoadGlobalContextFieldStub stub(isolate(), &lookup_result); |
| 675 PatchCache(name, stub.GetCode()); |
| 676 } |
| 673 return FixedArray::get(GlobalContextTable::GetContext( | 677 return FixedArray::get(GlobalContextTable::GetContext( |
| 674 global_contexts, lookup_result.context_index), | 678 global_contexts, lookup_result.context_index), |
| 675 lookup_result.slot_index); | 679 lookup_result.slot_index); |
| 676 } | 680 } |
| 677 } | 681 } |
| 678 | 682 |
| 679 // Named lookup in the object. | 683 // Named lookup in the object. |
| 680 LookupIterator it(object, name); | 684 LookupIterator it(object, name); |
| 681 LookupForRead(&it); | 685 LookupForRead(&it); |
| 682 | 686 |
| (...skipping 2087 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2770 static const Address IC_utilities[] = { | 2774 static const Address IC_utilities[] = { |
| 2771 #define ADDR(name) FUNCTION_ADDR(name), | 2775 #define ADDR(name) FUNCTION_ADDR(name), |
| 2772 IC_UTIL_LIST(ADDR) NULL | 2776 IC_UTIL_LIST(ADDR) NULL |
| 2773 #undef ADDR | 2777 #undef ADDR |
| 2774 }; | 2778 }; |
| 2775 | 2779 |
| 2776 | 2780 |
| 2777 Address IC::AddressFromUtilityId(IC::UtilityId id) { return IC_utilities[id]; } | 2781 Address IC::AddressFromUtilityId(IC::UtilityId id) { return IC_utilities[id]; } |
| 2778 } | 2782 } |
| 2779 } // namespace v8::internal | 2783 } // namespace v8::internal |
| OLD | NEW |