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

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

Issue 575373004: Convert KeyedLoad indexed interceptor case to a Handler. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: REBASE and ports. Created 6 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « src/ic/arm64/ic-arm64.cc ('k') | src/ic/ia32/ic-ia32.cc » ('j') | no next file with comments »
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/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.h" 9 #include "src/ic/ic.h"
10 #include "src/ic/ic-inl.h" 10 #include "src/ic/ic-inl.h"
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 Handle<Map> receiver_map = receiver_maps->at(i); 381 Handle<Map> receiver_map = receiver_maps->at(i);
382 Handle<Code> cached_stub; 382 Handle<Code> cached_stub;
383 383
384 if ((receiver_map->instance_type() & kNotStringTag) == 0) { 384 if ((receiver_map->instance_type() & kNotStringTag) == 0) {
385 cached_stub = isolate()->builtins()->KeyedLoadIC_String(); 385 cached_stub = isolate()->builtins()->KeyedLoadIC_String();
386 } else if (receiver_map->instance_type() < FIRST_JS_RECEIVER_TYPE) { 386 } else if (receiver_map->instance_type() < FIRST_JS_RECEIVER_TYPE) {
387 cached_stub = isolate()->builtins()->KeyedLoadIC_Slow(); 387 cached_stub = isolate()->builtins()->KeyedLoadIC_Slow();
388 } else { 388 } else {
389 bool is_js_array = receiver_map->instance_type() == JS_ARRAY_TYPE; 389 bool is_js_array = receiver_map->instance_type() == JS_ARRAY_TYPE;
390 ElementsKind elements_kind = receiver_map->elements_kind(); 390 ElementsKind elements_kind = receiver_map->elements_kind();
391 391 if (receiver_map->has_indexed_interceptor()) {
392 if (IsFastElementsKind(elements_kind) || 392 cached_stub = LoadIndexedInterceptorStub(isolate()).GetCode();
393 IsExternalArrayElementsKind(elements_kind) || 393 } else if (IsFastElementsKind(elements_kind) ||
394 IsFixedTypedArrayElementsKind(elements_kind)) { 394 IsExternalArrayElementsKind(elements_kind) ||
395 IsFixedTypedArrayElementsKind(elements_kind)) {
395 cached_stub = LoadFastElementStub(isolate(), is_js_array, elements_kind) 396 cached_stub = LoadFastElementStub(isolate(), is_js_array, elements_kind)
396 .GetCode(); 397 .GetCode();
397 } else if (elements_kind == SLOPPY_ARGUMENTS_ELEMENTS) { 398 } else if (elements_kind == SLOPPY_ARGUMENTS_ELEMENTS) {
398 cached_stub = isolate()->builtins()->KeyedLoadIC_SloppyArguments(); 399 cached_stub = isolate()->builtins()->KeyedLoadIC_SloppyArguments();
399 } else { 400 } else {
400 DCHECK(elements_kind == DICTIONARY_ELEMENTS); 401 DCHECK(elements_kind == DICTIONARY_ELEMENTS);
401 cached_stub = LoadDictionaryElementStub(isolate()).GetCode(); 402 cached_stub = LoadDictionaryElementStub(isolate()).GetCode();
402 } 403 }
403 } 404 }
404 405
405 handlers->Add(cached_stub); 406 handlers->Add(cached_stub);
406 } 407 }
407 } 408 }
408 } 409 }
409 } // namespace v8::internal 410 } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ic/arm64/ic-arm64.cc ('k') | src/ic/ia32/ic-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698