Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(119)

Side by Side Diff: src/ic/handler-compiler.cc

Issue 1778493005: Inline calling into the interceptor into the IC callbacks rather than going through the LookupItera… (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/ic/ic.cc » ('j') | src/objects.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/ic/handler-compiler.h" 5 #include "src/ic/handler-compiler.h"
6 6
7 #include "src/field-type.h" 7 #include "src/field-type.h"
8 #include "src/ic/call-optimization.h" 8 #include "src/ic/call-optimization.h"
9 #include "src/ic/ic-inl.h" 9 #include "src/ic/ic-inl.h"
10 #include "src/ic/ic.h" 10 #include "src/ic/ic.h"
(...skipping 564 matching lines...) Expand 10 before | Expand all | Expand 10 after
575 } else { 575 } else {
576 bool is_js_array = receiver_map->instance_type() == JS_ARRAY_TYPE; 576 bool is_js_array = receiver_map->instance_type() == JS_ARRAY_TYPE;
577 ElementsKind elements_kind = receiver_map->elements_kind(); 577 ElementsKind elements_kind = receiver_map->elements_kind();
578 578
579 // No need to check for an elements-free prototype chain here, the 579 // No need to check for an elements-free prototype chain here, the
580 // generated stub code needs to check that dynamically anyway. 580 // generated stub code needs to check that dynamically anyway.
581 bool convert_hole_to_undefined = 581 bool convert_hole_to_undefined =
582 (is_js_array && elements_kind == FAST_HOLEY_ELEMENTS && 582 (is_js_array && elements_kind == FAST_HOLEY_ELEMENTS &&
583 *receiver_map == isolate()->get_initial_js_array_map(elements_kind)); 583 *receiver_map == isolate()->get_initial_js_array_map(elements_kind));
584 584
585 if (receiver_map->has_indexed_interceptor()) { 585 if (receiver_map->has_indexed_interceptor() &&
586 !receiver_map->GetIndexedInterceptor()->getter()->IsUndefined() &&
587 !receiver_map->GetIndexedInterceptor()->non_masking()) {
586 cached_stub = LoadIndexedInterceptorStub(isolate()).GetCode(); 588 cached_stub = LoadIndexedInterceptorStub(isolate()).GetCode();
587 } else if (IsSloppyArgumentsElements(elements_kind)) { 589 } else if (IsSloppyArgumentsElements(elements_kind)) {
588 cached_stub = KeyedLoadSloppyArgumentsStub(isolate()).GetCode(); 590 cached_stub = KeyedLoadSloppyArgumentsStub(isolate()).GetCode();
589 } else if (IsFastElementsKind(elements_kind) || 591 } else if (IsFastElementsKind(elements_kind) ||
590 IsFixedTypedArrayElementsKind(elements_kind)) { 592 IsFixedTypedArrayElementsKind(elements_kind)) {
591 cached_stub = LoadFastElementStub(isolate(), is_js_array, elements_kind, 593 cached_stub = LoadFastElementStub(isolate(), is_js_array, elements_kind,
592 convert_hole_to_undefined).GetCode(); 594 convert_hole_to_undefined).GetCode();
593 } else { 595 } else {
594 DCHECK(elements_kind == DICTIONARY_ELEMENTS); 596 DCHECK(elements_kind == DICTIONARY_ELEMENTS);
595 LoadICState state = LoadICState(kNoExtraICState); 597 LoadICState state = LoadICState(kNoExtraICState);
596 cached_stub = LoadDictionaryElementStub(isolate(), state).GetCode(); 598 cached_stub = LoadDictionaryElementStub(isolate(), state).GetCode();
597 } 599 }
598 } 600 }
599 601
600 handlers->Add(cached_stub); 602 handlers->Add(cached_stub);
601 } 603 }
602 } 604 }
603 } // namespace internal 605 } // namespace internal
604 } // namespace v8 606 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/ic/ic.cc » ('j') | src/objects.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698