OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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/ic/call-optimization.h" | 7 #include "src/ic/call-optimization.h" |
8 #include "src/ic/handler-compiler.h" | 8 #include "src/ic/handler-compiler.h" |
9 #include "src/ic/ic-inl.h" | 9 #include "src/ic/ic-inl.h" |
10 | 10 |
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 | 221 |
222 | 222 |
223 Handle<Code> NamedLoadHandlerCompiler::CompileLoadInterceptor( | 223 Handle<Code> NamedLoadHandlerCompiler::CompileLoadInterceptor( |
224 LookupIterator* it) { | 224 LookupIterator* it) { |
225 // So far the most popular follow ups for interceptor loads are FIELD and | 225 // So far the most popular follow ups for interceptor loads are FIELD and |
226 // ExecutableAccessorInfo, so inline only them. Other cases may be added | 226 // ExecutableAccessorInfo, so inline only them. Other cases may be added |
227 // later. | 227 // later. |
228 bool inline_followup = false; | 228 bool inline_followup = false; |
229 switch (it->state()) { | 229 switch (it->state()) { |
230 case LookupIterator::TRANSITION: | 230 case LookupIterator::TRANSITION: |
231 case LookupIterator::UNKNOWN: | |
232 UNREACHABLE(); | 231 UNREACHABLE(); |
233 case LookupIterator::ACCESS_CHECK: | 232 case LookupIterator::ACCESS_CHECK: |
234 case LookupIterator::INTERCEPTOR: | 233 case LookupIterator::INTERCEPTOR: |
235 case LookupIterator::JSPROXY: | 234 case LookupIterator::JSPROXY: |
236 case LookupIterator::NOT_FOUND: | 235 case LookupIterator::NOT_FOUND: |
237 break; | 236 break; |
238 case LookupIterator::DATA: | 237 case LookupIterator::DATA: |
239 inline_followup = it->property_details().type() == FIELD; | 238 inline_followup = it->property_details().type() == FIELD; |
240 break; | 239 break; |
241 case LookupIterator::ACCESSOR: { | 240 case LookupIterator::ACCESSOR: { |
(...skipping 27 matching lines...) Expand all Loading... |
269 set_type_for_object(holder()); | 268 set_type_for_object(holder()); |
270 set_holder(real_named_property_holder); | 269 set_holder(real_named_property_holder); |
271 Register reg = Frontend(interceptor_reg, it->name()); | 270 Register reg = Frontend(interceptor_reg, it->name()); |
272 | 271 |
273 switch (it->state()) { | 272 switch (it->state()) { |
274 case LookupIterator::ACCESS_CHECK: | 273 case LookupIterator::ACCESS_CHECK: |
275 case LookupIterator::INTERCEPTOR: | 274 case LookupIterator::INTERCEPTOR: |
276 case LookupIterator::JSPROXY: | 275 case LookupIterator::JSPROXY: |
277 case LookupIterator::NOT_FOUND: | 276 case LookupIterator::NOT_FOUND: |
278 case LookupIterator::TRANSITION: | 277 case LookupIterator::TRANSITION: |
279 case LookupIterator::UNKNOWN: | |
280 UNREACHABLE(); | 278 UNREACHABLE(); |
281 case LookupIterator::DATA: { | 279 case LookupIterator::DATA: { |
282 DCHECK_EQ(FIELD, it->property_details().type()); | 280 DCHECK_EQ(FIELD, it->property_details().type()); |
283 __ Move(receiver(), reg); | 281 __ Move(receiver(), reg); |
284 LoadFieldStub stub(isolate(), it->GetFieldIndex()); | 282 LoadFieldStub stub(isolate(), it->GetFieldIndex()); |
285 GenerateTailCall(masm(), stub.GetCode()); | 283 GenerateTailCall(masm(), stub.GetCode()); |
286 break; | 284 break; |
287 } | 285 } |
288 case LookupIterator::ACCESSOR: | 286 case LookupIterator::ACCESSOR: |
289 Handle<ExecutableAccessorInfo> info = | 287 Handle<ExecutableAccessorInfo> info = |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
396 DCHECK(elements_kind == DICTIONARY_ELEMENTS); | 394 DCHECK(elements_kind == DICTIONARY_ELEMENTS); |
397 cached_stub = LoadDictionaryElementStub(isolate()).GetCode(); | 395 cached_stub = LoadDictionaryElementStub(isolate()).GetCode(); |
398 } | 396 } |
399 } | 397 } |
400 | 398 |
401 handlers->Add(cached_stub); | 399 handlers->Add(cached_stub); |
402 } | 400 } |
403 } | 401 } |
404 } | 402 } |
405 } // namespace v8::internal | 403 } // namespace v8::internal |
OLD | NEW |