| 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/api.h" | 7 #include "src/api.h" |
| 8 #include "src/arguments.h" | 8 #include "src/arguments.h" |
| 9 #include "src/ast.h" | 9 #include "src/ast.h" |
| 10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 Handle<Object> probe(stub_holder->FindInCodeCache(*name, flags), | 125 Handle<Object> probe(stub_holder->FindInCodeCache(*name, flags), |
| 126 name->GetIsolate()); | 126 name->GetIsolate()); |
| 127 if (probe->IsCode()) return Handle<Code>::cast(probe); | 127 if (probe->IsCode()) return Handle<Code>::cast(probe); |
| 128 return Handle<Code>::null(); | 128 return Handle<Code>::null(); |
| 129 } | 129 } |
| 130 | 130 |
| 131 | 131 |
| 132 Handle<Code> PropertyICCompiler::ComputeMonomorphic( | 132 Handle<Code> PropertyICCompiler::ComputeMonomorphic( |
| 133 Code::Kind kind, Handle<Name> name, Handle<HeapType> type, | 133 Code::Kind kind, Handle<Name> name, Handle<HeapType> type, |
| 134 Handle<Code> handler, ExtraICState extra_ic_state) { | 134 Handle<Code> handler, ExtraICState extra_ic_state) { |
| 135 Isolate* isolate = name->GetIsolate(); |
| 136 if (handler.is_identical_to(isolate->builtins()->LoadIC_Normal()) || |
| 137 handler.is_identical_to(isolate->builtins()->StoreIC_Normal())) { |
| 138 name = isolate->factory()->normal_ic_symbol(); |
| 139 } |
| 140 |
| 135 CacheHolderFlag flag; | 141 CacheHolderFlag flag; |
| 136 Isolate* isolate = name->GetIsolate(); | |
| 137 Handle<Map> stub_holder = IC::GetICCacheHolder(*type, isolate, &flag); | 142 Handle<Map> stub_holder = IC::GetICCacheHolder(*type, isolate, &flag); |
| 138 | 143 |
| 139 Handle<Code> ic; | 144 Handle<Code> ic; |
| 140 // There are multiple string maps that all use the same prototype. That | 145 // There are multiple string maps that all use the same prototype. That |
| 141 // prototype cannot hold multiple handlers, one for each of the string maps, | 146 // prototype cannot hold multiple handlers, one for each of the string maps, |
| 142 // for a single name. Hence, turn off caching of the IC. | 147 // for a single name. Hence, turn off caching of the IC. |
| 143 bool can_be_cached = !type->Is(HeapType::String()); | 148 bool can_be_cached = !type->Is(HeapType::String()); |
| 144 if (can_be_cached) { | 149 if (can_be_cached) { |
| 145 ic = Find(name, stub_holder, kind, extra_ic_state, flag); | 150 ic = Find(name, stub_holder, kind, extra_ic_state, flag); |
| 146 if (!ic.is_null()) return ic; | 151 if (!ic.is_null()) return ic; |
| (...skipping 1203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1350 Handle<FunctionTemplateInfo>( | 1355 Handle<FunctionTemplateInfo>( |
| 1351 FunctionTemplateInfo::cast(signature->receiver())); | 1356 FunctionTemplateInfo::cast(signature->receiver())); |
| 1352 } | 1357 } |
| 1353 } | 1358 } |
| 1354 | 1359 |
| 1355 is_simple_api_call_ = true; | 1360 is_simple_api_call_ = true; |
| 1356 } | 1361 } |
| 1357 | 1362 |
| 1358 | 1363 |
| 1359 } } // namespace v8::internal | 1364 } } // namespace v8::internal |
| OLD | NEW |