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

Unified Diff: src/hydrogen.cc

Issue 6240012: Optimize calls to object literal properties that are initialized with a funct... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: added x64 and arm code. Created 9 years, 11 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
Index: src/hydrogen.cc
===================================================================
--- src/hydrogen.cc (revision 6540)
+++ src/hydrogen.cc (working copy)
@@ -3018,7 +3018,8 @@
HObjectLiteral* literal = (new HObjectLiteral(expr->constant_properties(),
expr->fast_elements(),
expr->literal_index(),
- expr->depth()));
+ expr->depth(),
+ expr->has_function()));
// The object is expected in the bailout environment during computation
// of the property values and is the value of the entire expression.
PushAndAdd(literal);
@@ -3057,6 +3058,11 @@
default: UNREACHABLE();
}
}
+
+ if (expr->has_function()) {
+ AddInstruction(new HToFastProperties(Top()));
+ }
+
ast_context()->ReturnValue(Pop());
}
« no previous file with comments | « src/handles.cc ('k') | src/hydrogen-instructions.h » ('j') | src/hydrogen-instructions.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698