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

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

Issue 2042013003: [builtins] Properly optimize TypedArray/DataView accessors. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address Yang's comments. Created 4 years, 6 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/heap-symbols.h ('k') | src/js/typedarray.js » ('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/ic-inl.h" 9 #include "src/ic/ic-inl.h"
10 #include "src/ic/ic.h" 10 #include "src/ic/ic.h"
(...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 Handle<Object> function = handle( 413 Handle<Object> function = handle(
414 AccessorPair::cast(*it->GetAccessors())->getter(), isolate()); 414 AccessorPair::cast(*it->GetAccessors())->getter(), isolate());
415 CallOptimization call_optimization(function); 415 CallOptimization call_optimization(function);
416 GenerateApiAccessorCall(masm(), call_optimization, holder_map, 416 GenerateApiAccessorCall(masm(), call_optimization, holder_map,
417 receiver(), scratch2(), false, no_reg, reg, 417 receiver(), scratch2(), false, no_reg, reg,
418 it->GetAccessorIndex()); 418 it->GetAccessorIndex());
419 } 419 }
420 } 420 }
421 } 421 }
422 422
423
424 Handle<Code> NamedLoadHandlerCompiler::CompileLoadViaGetter( 423 Handle<Code> NamedLoadHandlerCompiler::CompileLoadViaGetter(
425 Handle<Name> name, int accessor_index, int expected_arguments) { 424 Handle<Name> name, int accessor_index, int expected_arguments) {
426 Register holder = Frontend(name); 425 Register holder = Frontend(name);
427 GenerateLoadViaGetter(masm(), map(), receiver(), holder, accessor_index, 426 GenerateLoadViaGetter(masm(), map(), receiver(), holder, accessor_index,
428 expected_arguments, scratch2()); 427 expected_arguments, scratch2());
429 return GetCode(kind(), name); 428 return GetCode(kind(), name);
430 } 429 }
431 430
432 431
433 // TODO(verwaest): Cleanup. holder() is actually the receiver. 432 // TODO(verwaest): Cleanup. holder() is actually the receiver.
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
608 LoadICState state = LoadICState(kNoExtraICState); 607 LoadICState state = LoadICState(kNoExtraICState);
609 cached_stub = LoadDictionaryElementStub(isolate(), state).GetCode(); 608 cached_stub = LoadDictionaryElementStub(isolate(), state).GetCode();
610 } 609 }
611 } 610 }
612 611
613 handlers->Add(cached_stub); 612 handlers->Add(cached_stub);
614 } 613 }
615 } 614 }
616 } // namespace internal 615 } // namespace internal
617 } // namespace v8 616 } // namespace v8
OLDNEW
« no previous file with comments | « src/heap-symbols.h ('k') | src/js/typedarray.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698