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

Side by Side Diff: src/ic/ic-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, 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/ic.cc ('k') | src/ic/mips/ic-mips.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/handler-compiler.h" 7 #include "src/ic/handler-compiler.h"
8 #include "src/ic/ic-inl.h" 8 #include "src/ic/ic-inl.h"
9 #include "src/ic/ic-compiler.h" 9 #include "src/ic/ic-compiler.h"
10 10
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 Code::Flags flags = Code::ComputeMonomorphicFlags(Code::KEYED_LOAD_IC); 89 Code::Flags flags = Code::ComputeMonomorphicFlags(Code::KEYED_LOAD_IC);
90 Handle<Name> name = isolate->factory()->KeyedLoadMonomorphic_string(); 90 Handle<Name> name = isolate->factory()->KeyedLoadMonomorphic_string();
91 91
92 Handle<Object> probe(receiver_map->FindInCodeCache(*name, flags), isolate); 92 Handle<Object> probe(receiver_map->FindInCodeCache(*name, flags), isolate);
93 if (probe->IsCode()) return Handle<Code>::cast(probe); 93 if (probe->IsCode()) return Handle<Code>::cast(probe);
94 94
95 ElementsKind elements_kind = receiver_map->elements_kind(); 95 ElementsKind elements_kind = receiver_map->elements_kind();
96 Handle<Code> stub; 96 Handle<Code> stub;
97 if (receiver_map->has_indexed_interceptor()) { 97 if (receiver_map->has_indexed_interceptor()) {
98 stub = LoadIndexedInterceptorStub(isolate).GetCode(); 98 stub = LoadIndexedInterceptorStub(isolate).GetCode();
99 } else if (receiver_map->has_sloppy_arguments_elements()) {
100 stub = KeyedLoadSloppyArgumentsStub(isolate).GetCode();
99 } else if (receiver_map->has_fast_elements() || 101 } else if (receiver_map->has_fast_elements() ||
100 receiver_map->has_external_array_elements() || 102 receiver_map->has_external_array_elements() ||
101 receiver_map->has_fixed_typed_array_elements()) { 103 receiver_map->has_fixed_typed_array_elements()) {
102 stub = LoadFastElementStub(isolate, 104 stub = LoadFastElementStub(isolate,
103 receiver_map->instance_type() == JS_ARRAY_TYPE, 105 receiver_map->instance_type() == JS_ARRAY_TYPE,
104 elements_kind).GetCode(); 106 elements_kind).GetCode();
105 } else { 107 } else {
106 stub = LoadDictionaryElementStub(isolate).GetCode(); 108 stub = LoadDictionaryElementStub(isolate).GetCode();
107 } 109 }
108 PropertyICCompiler compiler(isolate, Code::KEYED_LOAD_IC); 110 PropertyICCompiler compiler(isolate, Code::KEYED_LOAD_IC);
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
436 438
437 TailCallBuiltin(masm(), Builtins::kKeyedStoreIC_Miss); 439 TailCallBuiltin(masm(), Builtins::kKeyedStoreIC_Miss);
438 440
439 return GetCode(kind(), Code::NORMAL, factory()->empty_string()); 441 return GetCode(kind(), Code::NORMAL, factory()->empty_string());
440 } 442 }
441 443
442 444
443 #undef __ 445 #undef __
444 } 446 }
445 } // namespace v8::internal 447 } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ic/ic.cc ('k') | src/ic/mips/ic-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698