Use HIR accessor for CheckPrototypeMaps to remove the duplicate members in lithium.

Review URL: http://codereview.chromium.org/6221003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6262 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
fschneider@chromium.org 2011-01-11 12:10:11 +00:00
parent b3d4ea357c
commit 9cace6b5f0
4 changed files with 11 additions and 31 deletions

View File

@ -1599,11 +1599,7 @@ LInstruction* LChunkBuilder::DoCheckInstanceType(HCheckInstanceType* instr) {
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);
}

View File

@ -1606,27 +1606,20 @@ class LCheckMap: public LUnaryOperation {
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_;
};

View File

@ -1611,10 +1611,7 @@ LInstruction* LChunkBuilder::DoCheckInstanceType(HCheckInstanceType* instr) {
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);
}

View File

@ -1660,23 +1660,17 @@ class LCheckMap: public LUnaryOperation<0> {
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_;
};