Revision: 19206
Author:   [email protected]
Date:     Fri Feb  7 17:23:06 2014 UTC
Log:      A64: Fix constraints for LWrapReceiver

BUG=
[email protected]

Review URL: https://codereview.chromium.org/140633006
http://code.google.com/p/v8/source/detail?r=19206

Modified:
 /branches/experimental/a64/src/a64/lithium-a64.cc
 /branches/experimental/a64/src/a64/lithium-a64.h
 /branches/experimental/a64/src/a64/lithium-codegen-a64.cc

=======================================
--- /branches/experimental/a64/src/a64/lithium-a64.cc Fri Feb 7 16:25:45 2014 UTC +++ /branches/experimental/a64/src/a64/lithium-a64.cc Fri Feb 7 17:23:06 2014 UTC
@@ -2482,9 +2482,8 @@

 LInstruction* LChunkBuilder::DoWrapReceiver(HWrapReceiver* instr) {
   LOperand* receiver = UseRegister(instr->receiver());
-  LOperand* function = UseRegisterAtStart(instr->function());
-  LOperand* temp = TempRegister();
- LWrapReceiver* result = new(zone()) LWrapReceiver(receiver, function, temp);
+  LOperand* function = UseRegister(instr->function());
+  LWrapReceiver* result = new(zone()) LWrapReceiver(receiver, function);
   return AssignEnvironment(DefineAsRegister(result));
 }

=======================================
--- /branches/experimental/a64/src/a64/lithium-a64.h Fri Feb 7 15:10:05 2014 UTC +++ /branches/experimental/a64/src/a64/lithium-a64.h Fri Feb 7 17:23:06 2014 UTC
@@ -2794,19 +2794,17 @@
 };


-class LWrapReceiver V8_FINAL : public LTemplateInstruction<1, 2, 1> {
+class LWrapReceiver V8_FINAL : public LTemplateInstruction<1, 2, 0> {
  public:
-  LWrapReceiver(LOperand* receiver, LOperand* function, LOperand* temp) {
+  LWrapReceiver(LOperand* receiver, LOperand* function) {
     inputs_[0] = receiver;
     inputs_[1] = function;
-    temps_[0] = temp;
   }

   DECLARE_CONCRETE_INSTRUCTION(WrapReceiver, "wrap-receiver")

   LOperand* receiver() { return inputs_[0]; }
   LOperand* function() { return inputs_[1]; }
-  LOperand* temp() { return temps_[0]; }
 };


=======================================
--- /branches/experimental/a64/src/a64/lithium-codegen-a64.cc Fri Feb 7 16:25:45 2014 UTC +++ /branches/experimental/a64/src/a64/lithium-codegen-a64.cc Fri Feb 7 17:23:06 2014 UTC
@@ -5589,25 +5589,24 @@
   Register receiver = ToRegister(instr->receiver());
   Register function = ToRegister(instr->function());
   Register result = ToRegister(instr->result());
-  Register temp = ToRegister(instr->temp());

// If the receiver is null or undefined, we have to pass the global object as
   // a receiver to normal functions. Values have to be passed unchanged to
   // builtins and strict-mode functions.
   Label global_object, done, deopt;

-  __ Ldr(temp, FieldMemOperand(function,
+  __ Ldr(result, FieldMemOperand(function,
                                JSFunction::kSharedFunctionInfoOffset));

   // CompilerHints is an int32 field. See objects.h.
-  __ Ldr(temp.W(),
-         FieldMemOperand(temp, SharedFunctionInfo::kCompilerHintsOffset));
+  __ Ldr(result.W(),
+ FieldMemOperand(result, SharedFunctionInfo::kCompilerHintsOffset));

   // Do not transform the receiver to object for strict mode functions.
-  __ Tbnz(temp, SharedFunctionInfo::kStrictModeFunction, &done);
+  __ Tbnz(result, SharedFunctionInfo::kStrictModeFunction, &done);

   // Do not transform the receiver to object for builtins.
-  __ Tbnz(temp, SharedFunctionInfo::kNative, &done);
+  __ Tbnz(result, SharedFunctionInfo::kNative, &done);

   // Normal function. Replace undefined or null with global receiver.
   __ JumpIfRoot(receiver, Heap::kNullValueRootIndex, &global_object);
@@ -5615,7 +5614,7 @@

   // Deoptimize if the receiver is not a JS object.
   __ JumpIfSmi(receiver, &deopt);
-  __ CompareObjectType(receiver, temp, temp, FIRST_SPEC_OBJECT_TYPE);
+  __ CompareObjectType(receiver, result, result, FIRST_SPEC_OBJECT_TYPE);
   __ B(ge, &done);
   // Otherwise, fall through to deopt.

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to