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

Side by Side Diff: src/code-stubs-hydrogen.cc

Issue 1064083003: Recover performance of array buffer view field accesses in ICs (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 8 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/code-stubs.h ('k') | src/hydrogen.h » ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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/bailout-reason.h" 7 #include "src/bailout-reason.h"
8 #include "src/code-stubs.h" 8 #include "src/code-stubs.h"
9 #include "src/field-index.h" 9 #include "src/field-index.h"
10 #include "src/hydrogen.h" 10 #include "src/hydrogen.h"
(...skipping 607 matching lines...) Expand 10 before | Expand all | Expand 10 after
618 return BuildLoadNamedField(GetParameter(0), casted_stub()->index()); 618 return BuildLoadNamedField(GetParameter(0), casted_stub()->index());
619 } 619 }
620 620
621 621
622 Handle<Code> LoadFieldStub::GenerateCode() { 622 Handle<Code> LoadFieldStub::GenerateCode() {
623 return DoGenerateCode(this); 623 return DoGenerateCode(this);
624 } 624 }
625 625
626 626
627 template <> 627 template <>
628 HValue* CodeStubGraphBuilder<ArrayBufferViewLoadFieldStub>::BuildCodeStub() {
629 return BuildLoadNamedField(GetParameter(0), casted_stub()->index());
630 }
631
632
633 Handle<Code> ArrayBufferViewLoadFieldStub::GenerateCode() {
634 return DoGenerateCode(this);
635 }
636
637
638 template <>
628 HValue* CodeStubGraphBuilder<LoadConstantStub>::BuildCodeStub() { 639 HValue* CodeStubGraphBuilder<LoadConstantStub>::BuildCodeStub() {
629 HValue* map = AddLoadMap(GetParameter(0), NULL); 640 HValue* map = AddLoadMap(GetParameter(0), NULL);
630 HObjectAccess descriptors_access = HObjectAccess::ForObservableJSObjectOffset( 641 HObjectAccess descriptors_access = HObjectAccess::ForObservableJSObjectOffset(
631 Map::kDescriptorsOffset, Representation::Tagged()); 642 Map::kDescriptorsOffset, Representation::Tagged());
632 HValue* descriptors = Add<HLoadNamedField>(map, nullptr, descriptors_access); 643 HValue* descriptors = Add<HLoadNamedField>(map, nullptr, descriptors_access);
633 HObjectAccess value_access = HObjectAccess::ForObservableJSObjectOffset( 644 HObjectAccess value_access = HObjectAccess::ForObservableJSObjectOffset(
634 DescriptorArray::GetValueOffset(casted_stub()->constant_index())); 645 DescriptorArray::GetValueOffset(casted_stub()->constant_index()));
635 return Add<HLoadNamedField>(descriptors, nullptr, value_access); 646 return Add<HLoadNamedField>(descriptors, nullptr, value_access);
636 } 647 }
637 648
(...skipping 1395 matching lines...) Expand 10 before | Expand all | Expand 10 after
2033 // need. 2044 // need.
2034 info()->MarkMustNotHaveEagerFrame(); 2045 info()->MarkMustNotHaveEagerFrame();
2035 2046
2036 // Probe the stub cache. 2047 // Probe the stub cache.
2037 Add<HTailCallThroughMegamorphicCache>(receiver, name); 2048 Add<HTailCallThroughMegamorphicCache>(receiver, name);
2038 2049
2039 // We never continue. 2050 // We never continue.
2040 return graph()->GetConstant0(); 2051 return graph()->GetConstant0();
2041 } 2052 }
2042 } } // namespace v8::internal 2053 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/code-stubs.h ('k') | src/hydrogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698