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

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

Issue 2682153003: [stubs] Port LoadIndexedStringStub to CSA (Closed)
Patch Set: move to builtins-handler.cc Created 3 years, 10 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 | « src/ia32/code-stubs-ia32.cc ('k') | src/mips/code-stubs-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/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/handler-configuration-inl.h" 9 #include "src/ic/handler-configuration-inl.h"
10 #include "src/ic/ic-inl.h" 10 #include "src/ic/ic-inl.h"
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 Handle<Object> ElementHandlerCompiler::GetKeyedLoadHandler( 345 Handle<Object> ElementHandlerCompiler::GetKeyedLoadHandler(
346 Handle<Map> receiver_map, Isolate* isolate) { 346 Handle<Map> receiver_map, Isolate* isolate) {
347 if (receiver_map->has_indexed_interceptor() && 347 if (receiver_map->has_indexed_interceptor() &&
348 !receiver_map->GetIndexedInterceptor()->getter()->IsUndefined(isolate) && 348 !receiver_map->GetIndexedInterceptor()->getter()->IsUndefined(isolate) &&
349 !receiver_map->GetIndexedInterceptor()->non_masking()) { 349 !receiver_map->GetIndexedInterceptor()->non_masking()) {
350 TRACE_HANDLER_STATS(isolate, KeyedLoadIC_LoadIndexedInterceptorStub); 350 TRACE_HANDLER_STATS(isolate, KeyedLoadIC_LoadIndexedInterceptorStub);
351 return LoadIndexedInterceptorStub(isolate).GetCode(); 351 return LoadIndexedInterceptorStub(isolate).GetCode();
352 } 352 }
353 if (receiver_map->IsStringMap()) { 353 if (receiver_map->IsStringMap()) {
354 TRACE_HANDLER_STATS(isolate, KeyedLoadIC_LoadIndexedStringStub); 354 TRACE_HANDLER_STATS(isolate, KeyedLoadIC_LoadIndexedStringStub);
355 return LoadIndexedStringStub(isolate).GetCode(); 355 return isolate->builtins()->KeyedLoadIC_IndexedString();
356 } 356 }
357 InstanceType instance_type = receiver_map->instance_type(); 357 InstanceType instance_type = receiver_map->instance_type();
358 if (instance_type < FIRST_JS_RECEIVER_TYPE) { 358 if (instance_type < FIRST_JS_RECEIVER_TYPE) {
359 TRACE_HANDLER_STATS(isolate, KeyedLoadIC_SlowStub); 359 TRACE_HANDLER_STATS(isolate, KeyedLoadIC_SlowStub);
360 return isolate->builtins()->KeyedLoadIC_Slow(); 360 return isolate->builtins()->KeyedLoadIC_Slow();
361 } 361 }
362 362
363 ElementsKind elements_kind = receiver_map->elements_kind(); 363 ElementsKind elements_kind = receiver_map->elements_kind();
364 if (IsSloppyArgumentsElements(elements_kind)) { 364 if (IsSloppyArgumentsElements(elements_kind)) {
365 TRACE_HANDLER_STATS(isolate, KeyedLoadIC_KeyedLoadSloppyArgumentsStub); 365 TRACE_HANDLER_STATS(isolate, KeyedLoadIC_KeyedLoadSloppyArgumentsStub);
(...skipping 16 matching lines...) Expand all
382 } 382 }
383 383
384 void ElementHandlerCompiler::CompileElementHandlers( 384 void ElementHandlerCompiler::CompileElementHandlers(
385 MapHandleList* receiver_maps, List<Handle<Object>>* handlers) { 385 MapHandleList* receiver_maps, List<Handle<Object>>* handlers) {
386 for (int i = 0; i < receiver_maps->length(); ++i) { 386 for (int i = 0; i < receiver_maps->length(); ++i) {
387 handlers->Add(GetKeyedLoadHandler(receiver_maps->at(i), isolate())); 387 handlers->Add(GetKeyedLoadHandler(receiver_maps->at(i), isolate()));
388 } 388 }
389 } 389 }
390 } // namespace internal 390 } // namespace internal
391 } // namespace v8 391 } // namespace v8
OLDNEW
« no previous file with comments | « src/ia32/code-stubs-ia32.cc ('k') | src/mips/code-stubs-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698