Reviewers: Karl Klose,
Description:
Use HIR accessor for CheckPrototypeMaps to remove the duplicate members in
lithium.
Please review this at http://codereview.chromium.org/6221003/
SVN Base: http://v8.googlecode.com/svn/branches/bleeding_edge/
Affected files:
M src/arm/lithium-arm.h
M src/arm/lithium-arm.cc
M src/ia32/lithium-ia32.h
M src/ia32/lithium-ia32.cc
Index: src/arm/lithium-arm.cc
===================================================================
--- src/arm/lithium-arm.cc (revision 6258)
+++ src/arm/lithium-arm.cc (working copy)
@@ -1599,11 +1599,7 @@
LInstruction* LChunkBuilder::DoCheckPrototypeMaps(HCheckPrototypeMaps*
instr) {
LOperand* temp1 = TempRegister();
LOperand* temp2 = TempRegister();
- LInstruction* result =
- new LCheckPrototypeMaps(temp1,
- temp2,
- instr->holder(),
- instr->receiver_map());
+ LInstruction* result = new LCheckPrototypeMaps(temp1, temp2);
return AssignEnvironment(result);
}
Index: src/arm/lithium-arm.h
===================================================================
--- src/arm/lithium-arm.h (revision 6258)
+++ src/arm/lithium-arm.h (working copy)
@@ -1602,27 +1602,20 @@
class LCheckPrototypeMaps: public LInstruction {
public:
- LCheckPrototypeMaps(LOperand* temp1,
- LOperand* temp2,
- Handle<JSObject> holder,
- Handle<Map> receiver_map)
- : temp1_(temp1),
- temp2_(temp2),
- holder_(holder),
- receiver_map_(receiver_map) { }
+ LCheckPrototypeMaps(LOperand* temp1, LOperand* temp2)
+ : temp1_(temp1), temp2_(temp2) { }
DECLARE_CONCRETE_INSTRUCTION(CheckPrototypeMaps, "check-prototype-maps")
+ DECLARE_HYDROGEN_ACCESSOR(CheckPrototypeMaps)
+ Handle<JSObject> holder() const { return hydrogen()->holder(); }
+ Handle<Map> receiver_map() const { return hydrogen()->receiver_map(); }
LOperand* temp1() const { return temp1_; }
LOperand* temp2() const { return temp2_; }
- Handle<JSObject> holder() const { return holder_; }
- Handle<Map> receiver_map() const { return receiver_map_; }
private:
LOperand* temp1_;
LOperand* temp2_;
- Handle<JSObject> holder_;
- Handle<Map> receiver_map_;
};
Index: src/ia32/lithium-ia32.cc
===================================================================
--- src/ia32/lithium-ia32.cc (revision 6258)
+++ src/ia32/lithium-ia32.cc (working copy)
@@ -1611,10 +1611,7 @@
LInstruction* LChunkBuilder::DoCheckPrototypeMaps(HCheckPrototypeMaps*
instr) {
LOperand* temp = TempRegister();
- LCheckPrototypeMaps* result =
- new LCheckPrototypeMaps(temp,
- instr->holder(),
- instr->receiver_map());
+ LCheckPrototypeMaps* result = new LCheckPrototypeMaps(temp);
return AssignEnvironment(result);
}
Index: src/ia32/lithium-ia32.h
===================================================================
--- src/ia32/lithium-ia32.h (revision 6258)
+++ src/ia32/lithium-ia32.h (working copy)
@@ -1660,23 +1660,17 @@
class LCheckPrototypeMaps: public LTemplateInstruction<0> {
public:
- LCheckPrototypeMaps(LOperand* temp,
- Handle<JSObject> holder,
- Handle<Map> receiver_map)
- : temp_(temp),
- holder_(holder),
- receiver_map_(receiver_map) { }
+ explicit LCheckPrototypeMaps(LOperand* temp) : temp_(temp) { }
DECLARE_CONCRETE_INSTRUCTION(CheckPrototypeMaps, "check-prototype-maps")
+ DECLARE_HYDROGEN_ACCESSOR(CheckPrototypeMaps)
+ Handle<JSObject> holder() const { return hydrogen()->holder(); }
+ Handle<Map> receiver_map() const { return hydrogen()->receiver_map(); }
LOperand* temp() const { return temp_; }
- Handle<JSObject> holder() const { return holder_; }
- Handle<Map> receiver_map() const { return receiver_map_; }
private:
LOperand* temp_;
- Handle<JSObject> holder_;
- Handle<Map> receiver_map_;
};
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev