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)); |