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

Side by Side Diff: src/ic/ic-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/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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 Handle<Map> receiver_map) { 87 Handle<Map> receiver_map) {
88 Isolate* isolate = receiver_map->GetIsolate(); 88 Isolate* isolate = receiver_map->GetIsolate();
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_fast_elements() || 97 if (receiver_map->has_indexed_interceptor()) {
98 receiver_map->has_external_array_elements() || 98 stub = LoadIndexedInterceptorStub(isolate).GetCode();
99 receiver_map->has_fixed_typed_array_elements()) { 99 } else if (receiver_map->has_fast_elements() ||
100 receiver_map->has_external_array_elements() ||
101 receiver_map->has_fixed_typed_array_elements()) {
100 stub = LoadFastElementStub(isolate, 102 stub = LoadFastElementStub(isolate,
101 receiver_map->instance_type() == JS_ARRAY_TYPE, 103 receiver_map->instance_type() == JS_ARRAY_TYPE,
102 elements_kind).GetCode(); 104 elements_kind).GetCode();
103 } else { 105 } else {
104 stub = LoadDictionaryElementStub(isolate).GetCode(); 106 stub = LoadDictionaryElementStub(isolate).GetCode();
105 } 107 }
106 PropertyICCompiler compiler(isolate, Code::KEYED_LOAD_IC); 108 PropertyICCompiler compiler(isolate, Code::KEYED_LOAD_IC);
107 Handle<Code> code = 109 Handle<Code> code =
108 compiler.CompileMonomorphic(HeapType::Class(receiver_map, isolate), stub, 110 compiler.CompileMonomorphic(HeapType::Class(receiver_map, isolate), stub,
109 isolate->factory()->empty_string(), ELEMENT); 111 isolate->factory()->empty_string(), ELEMENT);
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
434 436
435 TailCallBuiltin(masm(), Builtins::kKeyedStoreIC_Miss); 437 TailCallBuiltin(masm(), Builtins::kKeyedStoreIC_Miss);
436 438
437 return GetCode(kind(), Code::NORMAL, factory()->empty_string()); 439 return GetCode(kind(), Code::NORMAL, factory()->empty_string());
438 } 440 }
439 441
440 442
441 #undef __ 443 #undef __
442 } 444 }
443 } // namespace v8::internal 445 } // 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