Revision: 6166
Author: [email protected]
Date: Wed Jan  5 01:04:06 2011
Log: Implement ARM lithium support for ObjectLiteral.
Review URL: http://codereview.chromium.org/6099006
http://code.google.com/p/v8/source/detail?r=6166

Modified:
 /branches/bleeding_edge/src/arm/lithium-codegen-arm.cc
 /branches/bleeding_edge/src/ia32/lithium-codegen-ia32.cc

=======================================
--- /branches/bleeding_edge/src/arm/lithium-codegen-arm.cc Tue Jan 4 06:48:25 2011 +++ /branches/bleeding_edge/src/arm/lithium-codegen-arm.cc Wed Jan 5 01:04:06 2011
@@ -2201,7 +2201,19 @@


 void LCodeGen::DoObjectLiteral(LObjectLiteral* instr) {
-  Abort("DoObjectLiteral unimplemented.");
+  __ ldr(r4, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset));
+  __ ldr(r4, FieldMemOperand(r4, JSFunction::kLiteralsOffset));
+  __ mov(r3, Operand(Smi::FromInt(instr->hydrogen()->literal_index())));
+  __ mov(r2, Operand(instr->hydrogen()->constant_properties()));
+ __ mov(r1, Operand(Smi::FromInt(instr->hydrogen()->fast_elements() ? 1 : 0)));
+  __ Push(r4, r3, r2, r1);
+
+  // Pick the right runtime function to call.
+  if (instr->hydrogen()->depth() > 1) {
+    CallRuntime(Runtime::kCreateObjectLiteral, 4, instr);
+  } else {
+    CallRuntime(Runtime::kCreateObjectLiteralShallow, 4, instr);
+  }
 }


=======================================
--- /branches/bleeding_edge/src/ia32/lithium-codegen-ia32.cc Thu Dec 30 11:30:42 2010 +++ /branches/bleeding_edge/src/ia32/lithium-codegen-ia32.cc Wed Jan 5 01:04:06 2011
@@ -3039,7 +3039,7 @@
   __ push(Immediate(instr->hydrogen()->constant_properties()));
__ push(Immediate(Smi::FromInt(instr->hydrogen()->fast_elements() ? 1 : 0)));

-  // Pick the right runtime function or stub to call.
+  // Pick the right runtime function to call.
   if (instr->hydrogen()->depth() > 1) {
     CallRuntime(Runtime::kCreateObjectLiteral, 4, instr);
   } else {

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to