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

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

Issue 546683003: Make KeyedLoads from a sloppy arguments array use a handler. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Webkit test found bug, updating. Created 6 years, 2 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 372 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 if (receiver_map->has_indexed_interceptor()) { 391 if (receiver_map->has_indexed_interceptor()) {
392 cached_stub = LoadIndexedInterceptorStub(isolate()).GetCode(); 392 cached_stub = LoadIndexedInterceptorStub(isolate()).GetCode();
393 } else if (IsSloppyArgumentsElements(elements_kind)) {
394 cached_stub = KeyedLoadSloppyArgumentsStub(isolate()).GetCode();
393 } else if (IsFastElementsKind(elements_kind) || 395 } else if (IsFastElementsKind(elements_kind) ||
394 IsExternalArrayElementsKind(elements_kind) || 396 IsExternalArrayElementsKind(elements_kind) ||
395 IsFixedTypedArrayElementsKind(elements_kind)) { 397 IsFixedTypedArrayElementsKind(elements_kind)) {
396 cached_stub = LoadFastElementStub(isolate(), is_js_array, elements_kind) 398 cached_stub = LoadFastElementStub(isolate(), is_js_array, elements_kind)
397 .GetCode(); 399 .GetCode();
398 } else if (elements_kind == SLOPPY_ARGUMENTS_ELEMENTS) {
399 cached_stub = isolate()->builtins()->KeyedLoadIC_SloppyArguments();
400 } else { 400 } else {
401 DCHECK(elements_kind == DICTIONARY_ELEMENTS); 401 DCHECK(elements_kind == DICTIONARY_ELEMENTS);
402 cached_stub = LoadDictionaryElementStub(isolate()).GetCode(); 402 cached_stub = LoadDictionaryElementStub(isolate()).GetCode();
403 } 403 }
404 } 404 }
405 405
406 handlers->Add(cached_stub); 406 handlers->Add(cached_stub);
407 } 407 }
408 } 408 }
409 } 409 }
410 } // 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