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

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

Issue 442763002: Load constants from the DescriptorArray (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Also removed from arm64 Created 6 years, 4 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/code-stubs.cc ('k') | src/ia32/stub-cache-ia32.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 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/code-stubs.h" 7 #include "src/code-stubs.h"
8 #include "src/field-index.h" 8 #include "src/field-index.h"
9 #include "src/hydrogen.h" 9 #include "src/hydrogen.h"
10 #include "src/lithium.h" 10 #include "src/lithium.h"
(...skipping 572 matching lines...) Expand 10 before | Expand all | Expand 10 after
583 HValue* CodeStubGraphBuilder<LoadFieldStub>::BuildCodeStub() { 583 HValue* CodeStubGraphBuilder<LoadFieldStub>::BuildCodeStub() {
584 return BuildLoadNamedField(GetParameter(0), casted_stub()->index()); 584 return BuildLoadNamedField(GetParameter(0), casted_stub()->index());
585 } 585 }
586 586
587 587
588 Handle<Code> LoadFieldStub::GenerateCode() { 588 Handle<Code> LoadFieldStub::GenerateCode() {
589 return DoGenerateCode(this); 589 return DoGenerateCode(this);
590 } 590 }
591 591
592 592
593 template<> 593 template <>
594 HValue* CodeStubGraphBuilder<LoadConstantStub>::BuildCodeStub() {
595 HValue* map = AddLoadMap(GetParameter(0), NULL);
596 HObjectAccess descriptors_access = HObjectAccess::ForObservableJSObjectOffset(
597 Map::kDescriptorsOffset, Representation::Tagged());
598 HValue* descriptors =
599 Add<HLoadNamedField>(map, static_cast<HValue*>(NULL), descriptors_access);
600 HObjectAccess value_access = HObjectAccess::ForObservableJSObjectOffset(
601 DescriptorArray::GetValueOffset(casted_stub()->descriptor()));
602 return Add<HLoadNamedField>(descriptors, static_cast<HValue*>(NULL),
603 value_access);
604 }
605
606
607 Handle<Code> LoadConstantStub::GenerateCode() { return DoGenerateCode(this); }
608
609
610 template <>
594 HValue* CodeStubGraphBuilder<StringLengthStub>::BuildCodeStub() { 611 HValue* CodeStubGraphBuilder<StringLengthStub>::BuildCodeStub() {
595 HValue* string = BuildLoadNamedField(GetParameter(0), 612 HValue* string = BuildLoadNamedField(GetParameter(0),
596 FieldIndex::ForInObjectOffset(JSValue::kValueOffset)); 613 FieldIndex::ForInObjectOffset(JSValue::kValueOffset));
597 return BuildLoadNamedField(string, 614 return BuildLoadNamedField(string,
598 FieldIndex::ForInObjectOffset(String::kLengthOffset)); 615 FieldIndex::ForInObjectOffset(String::kLengthOffset));
599 } 616 }
600 617
601 618
602 Handle<Code> StringLengthStub::GenerateCode() { 619 Handle<Code> StringLengthStub::GenerateCode() {
603 return DoGenerateCode(this); 620 return DoGenerateCode(this);
(...skipping 1113 matching lines...) Expand 10 before | Expand all | Expand 10 after
1717 return Pop(); 1734 return Pop();
1718 } 1735 }
1719 1736
1720 1737
1721 Handle<Code> KeyedLoadGenericStub::GenerateCode() { 1738 Handle<Code> KeyedLoadGenericStub::GenerateCode() {
1722 return DoGenerateCode(this); 1739 return DoGenerateCode(this);
1723 } 1740 }
1724 1741
1725 1742
1726 } } // namespace v8::internal 1743 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/code-stubs.cc ('k') | src/ia32/stub-cache-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698