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

Unified Diff: src/code-stubs-hydrogen.cc

Issue 14847004: Turn the load field code stub into a hydrogen code stub. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/code-stubs.h ('k') | src/compiler.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 04b9a46fc71a967d5608f980d050c92628fc6326..471e2ad312214b617649c1a2b26efe8b9ca2287c 100644
--- a/src/code-stubs-hydrogen.cc
+++ b/src/code-stubs-hydrogen.cc
@@ -240,7 +240,8 @@ Handle<Code> HydrogenCodeStub::GenerateLightweightMissCode(Isolate* isolate) {
GetCodeKind(),
GetICState(),
GetExtraICState(),
- GetStubType(), -1);
+ GetStubType(),
+ GetStubFlags());
Handle<Code> new_object = factory->NewCode(
desc, flags, masm.CodeObject(), NeedsImmovableCode());
return new_object;
@@ -410,6 +411,36 @@ Handle<Code> KeyedLoadFastElementStub::GenerateCode() {
}
+template<>
+HValue* CodeStubGraphBuilder<LoadFieldStub>::BuildCodeStub() {
+ Representation representation = casted_stub()->representation();
+ HInstruction* load = AddInstruction(new(zone()) HLoadNamedField(
+ GetParameter(0), casted_stub()->is_inobject(),
+ representation, casted_stub()->offset()));
+ return load;
+}
+
+
+Handle<Code> LoadFieldStub::GenerateCode() {
+ return DoGenerateCode(this);
+}
+
+
+template<>
+HValue* CodeStubGraphBuilder<KeyedLoadFieldStub>::BuildCodeStub() {
+ Representation representation = casted_stub()->representation();
+ HInstruction* load = AddInstruction(new(zone()) HLoadNamedField(
+ GetParameter(0), casted_stub()->is_inobject(),
+ representation, casted_stub()->offset()));
+ return load;
+}
+
+
+Handle<Code> KeyedLoadFieldStub::GenerateCode() {
+ return DoGenerateCode(this);
+}
+
+
template <>
HValue* CodeStubGraphBuilder<KeyedStoreFastElementStub>::BuildCodeStub() {
BuildUncheckedMonomorphicElementAccess(
« no previous file with comments | « src/code-stubs.h ('k') | src/compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698