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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/code-stubs.cc ('k') | src/ia32/stub-cache-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/code-stubs-hydrogen.cc
diff --git a/src/code-stubs-hydrogen.cc b/src/code-stubs-hydrogen.cc
index 92135e169b08fa57119c05091b86a91cd1317580..2306da6db7e84af9e6342db942a04b777eb9768f 100644
--- a/src/code-stubs-hydrogen.cc
+++ b/src/code-stubs-hydrogen.cc
@@ -590,7 +590,24 @@ Handle<Code> LoadFieldStub::GenerateCode() {
}
-template<>
+template <>
+HValue* CodeStubGraphBuilder<LoadConstantStub>::BuildCodeStub() {
+ HValue* map = AddLoadMap(GetParameter(0), NULL);
+ HObjectAccess descriptors_access = HObjectAccess::ForObservableJSObjectOffset(
+ Map::kDescriptorsOffset, Representation::Tagged());
+ HValue* descriptors =
+ Add<HLoadNamedField>(map, static_cast<HValue*>(NULL), descriptors_access);
+ HObjectAccess value_access = HObjectAccess::ForObservableJSObjectOffset(
+ DescriptorArray::GetValueOffset(casted_stub()->descriptor()));
+ return Add<HLoadNamedField>(descriptors, static_cast<HValue*>(NULL),
+ value_access);
+}
+
+
+Handle<Code> LoadConstantStub::GenerateCode() { return DoGenerateCode(this); }
+
+
+template <>
HValue* CodeStubGraphBuilder<StringLengthStub>::BuildCodeStub() {
HValue* string = BuildLoadNamedField(GetParameter(0),
FieldIndex::ForInObjectOffset(JSValue::kValueOffset));
« 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