| 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 933 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 944 if (FLAG_vector_ics) { | 944 if (FLAG_vector_ics) { |
| 945 return LoadICTrampolineStub(isolate, LoadICState(extra_state)).GetCode(); | 945 return LoadICTrampolineStub(isolate, LoadICState(extra_state)).GetCode(); |
| 946 } | 946 } |
| 947 | 947 |
| 948 return PropertyICCompiler::ComputeLoad(isolate, UNINITIALIZED, extra_state); | 948 return PropertyICCompiler::ComputeLoad(isolate, UNINITIALIZED, extra_state); |
| 949 } | 949 } |
| 950 | 950 |
| 951 | 951 |
| 952 Handle<Code> LoadIC::load_global(Isolate* isolate, Handle<GlobalObject> global, | 952 Handle<Code> LoadIC::load_global(Isolate* isolate, Handle<GlobalObject> global, |
| 953 Handle<String> name) { | 953 Handle<String> name) { |
| 954 // This special IC doesn't work with vector ics. |
| 955 DCHECK(!FLAG_vector_ics); |
| 956 |
| 954 Handle<ScriptContextTable> script_contexts( | 957 Handle<ScriptContextTable> script_contexts( |
| 955 global->native_context()->script_context_table()); | 958 global->native_context()->script_context_table()); |
| 956 | 959 |
| 957 ScriptContextTable::LookupResult lookup_result; | 960 ScriptContextTable::LookupResult lookup_result; |
| 958 if (ScriptContextTable::Lookup(script_contexts, name, &lookup_result)) { | 961 if (ScriptContextTable::Lookup(script_contexts, name, &lookup_result)) { |
| 959 return initialize_stub(isolate, LoadICState(CONTEXTUAL).GetExtraICState()); | 962 return initialize_stub(isolate, LoadICState(CONTEXTUAL).GetExtraICState()); |
| 960 } | 963 } |
| 961 | 964 |
| 962 Handle<Map> global_map(global->map()); | 965 Handle<Map> global_map(global->map()); |
| 963 Handle<Code> handler = PropertyHandlerCompiler::Find( | 966 Handle<Code> handler = PropertyHandlerCompiler::Find( |
| (...skipping 2081 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3045 static const Address IC_utilities[] = { | 3048 static const Address IC_utilities[] = { |
| 3046 #define ADDR(name) FUNCTION_ADDR(name), | 3049 #define ADDR(name) FUNCTION_ADDR(name), |
| 3047 IC_UTIL_LIST(ADDR) NULL | 3050 IC_UTIL_LIST(ADDR) NULL |
| 3048 #undef ADDR | 3051 #undef ADDR |
| 3049 }; | 3052 }; |
| 3050 | 3053 |
| 3051 | 3054 |
| 3052 Address IC::AddressFromUtilityId(IC::UtilityId id) { return IC_utilities[id]; } | 3055 Address IC::AddressFromUtilityId(IC::UtilityId id) { return IC_utilities[id]; } |
| 3053 } | 3056 } |
| 3054 } // namespace v8::internal | 3057 } // namespace v8::internal |
| OLD | NEW |