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

Unified Diff: src/x64/lithium-codegen-x64.cc

Issue 9388007: Allow inlining of functions containing object literals. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Added test case. Created 8 years, 10 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/mips/lithium-codegen-mips.cc ('k') | test/mjsunit/compiler/inline-literals.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x64/lithium-codegen-x64.cc
diff --git a/src/x64/lithium-codegen-x64.cc b/src/x64/lithium-codegen-x64.cc
index 7c445cb9940f4e46fb1c0226e00f469766ef8143..ab0870bf03cb44a3e4c9efa1ac0cbd27a35207d9 100644
--- a/src/x64/lithium-codegen-x64.cc
+++ b/src/x64/lithium-codegen-x64.cc
@@ -4028,12 +4028,12 @@ void LCodeGen::DoObjectLiteralFast(LObjectLiteralFast* instr) {
void LCodeGen::DoObjectLiteralGeneric(LObjectLiteralGeneric* instr) {
+ Handle<FixedArray> literals(instr->environment()->closure()->literals());
Handle<FixedArray> constant_properties =
instr->hydrogen()->constant_properties();
// Set up the parameters to the stub/runtime call.
- __ movq(rax, Operand(rbp, JavaScriptFrameConstants::kFunctionOffset));
- __ push(FieldOperand(rax, JSFunction::kLiteralsOffset));
+ __ PushHeapObject(literals);
__ Push(Smi::FromInt(instr->hydrogen()->literal_index()));
__ Push(constant_properties);
int flags = instr->hydrogen()->fast_elements()
@@ -4044,7 +4044,7 @@ void LCodeGen::DoObjectLiteralGeneric(LObjectLiteralGeneric* instr) {
: ObjectLiteral::kNoFlags;
__ Push(Smi::FromInt(flags));
- // Pick the right runtime function to call.
+ // Pick the right runtime function or stub to call.
int properties_count = constant_properties->length() / 2;
if (instr->hydrogen()->depth() > 1) {
CallRuntime(Runtime::kCreateObjectLiteral, 4, instr);
« no previous file with comments | « src/mips/lithium-codegen-mips.cc ('k') | test/mjsunit/compiler/inline-literals.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698