Reviewers: Rodolph Perfetta (ARM),
Description:
A64: Fix constraints for LWrapReceiver
BUG=
Please review this at https://codereview.chromium.org/140633006/
SVN Base: https://v8.googlecode.com/svn/branches/experimental/a64
Affected files (+10, -14 lines):
M src/a64/lithium-a64.h
M src/a64/lithium-a64.cc
M src/a64/lithium-codegen-a64.cc
Index: src/a64/lithium-a64.cc
diff --git a/src/a64/lithium-a64.cc b/src/a64/lithium-a64.cc
index
03c5ac8e6ce41b6bff381231937cad68db3dc383..fa0b2312231e67f713989cd0c52f1e22fab46f10
100644
--- a/src/a64/lithium-a64.cc
+++ b/src/a64/lithium-a64.cc
@@ -2482,9 +2482,8 @@ LInstruction*
LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) {
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));
}
Index: src/a64/lithium-a64.h
diff --git a/src/a64/lithium-a64.h b/src/a64/lithium-a64.h
index
d58c4a92726e10557c42a5ae72c8ccc5fa57cec4..7ca8e25b52b2bbe1820b426531e7b5b4b3545484
100644
--- a/src/a64/lithium-a64.h
+++ b/src/a64/lithium-a64.h
@@ -2794,19 +2794,17 @@ class LLoadFieldByIndex V8_FINAL : public
LTemplateInstruction<1, 2, 0> {
};
-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]; }
};
Index: src/a64/lithium-codegen-a64.cc
diff --git a/src/a64/lithium-codegen-a64.cc b/src/a64/lithium-codegen-a64.cc
index
9d9b2eaaca6badcf4524a5a455d16ba3b2eabae0..a58c7cf97e0e64f7ad1951e99d76457bf558f6de
100644
--- a/src/a64/lithium-codegen-a64.cc
+++ b/src/a64/lithium-codegen-a64.cc
@@ -5589,25 +5589,24 @@ void LCodeGen::DoWrapReceiver(LWrapReceiver* instr)
{
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 @@ void LCodeGen::DoWrapReceiver(LWrapReceiver* instr) {
// 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.