MIPS: Replace HCheckPrototypeMaps by explicit map checks of constant values.
Port r16055 (7567e57f) BUG= Review URL: https://codereview.chromium.org/21639003 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16060 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
2622158aa0
commit
3b347f45a6
@ -5272,25 +5272,6 @@ void LCodeGen::DoClampTToUint8(LClampTToUint8* instr) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void LCodeGen::DoCheckPrototypeMaps(LCheckPrototypeMaps* instr) {
|
|
||||||
if (instr->hydrogen()->CanOmitPrototypeChecks()) return;
|
|
||||||
|
|
||||||
Register prototype_reg = ToRegister(instr->temp());
|
|
||||||
Register map_reg = ToRegister(instr->temp2());
|
|
||||||
|
|
||||||
ZoneList<Handle<JSObject> >* prototypes = instr->prototypes();
|
|
||||||
ZoneList<Handle<Map> >* maps = instr->maps();
|
|
||||||
|
|
||||||
ASSERT(prototypes->length() == maps->length());
|
|
||||||
|
|
||||||
for (int i = 0; i < prototypes->length(); i++) {
|
|
||||||
__ LoadHeapObject(prototype_reg, prototypes->at(i));
|
|
||||||
__ lw(map_reg, FieldMemOperand(prototype_reg, HeapObject::kMapOffset));
|
|
||||||
DoCheckMapCommon(map_reg, maps->at(i), instr->environment());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void LCodeGen::DoAllocate(LAllocate* instr) {
|
void LCodeGen::DoAllocate(LAllocate* instr) {
|
||||||
class DeferredAllocate: public LDeferredCode {
|
class DeferredAllocate: public LDeferredCode {
|
||||||
public:
|
public:
|
||||||
|
@ -1926,19 +1926,6 @@ LInstruction* LChunkBuilder::DoCheckInstanceType(HCheckInstanceType* instr) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
LInstruction* LChunkBuilder::DoCheckPrototypeMaps(HCheckPrototypeMaps* instr) {
|
|
||||||
LUnallocated* temp1 = NULL;
|
|
||||||
LOperand* temp2 = NULL;
|
|
||||||
if (!instr->CanOmitPrototypeChecks()) {
|
|
||||||
temp1 = TempRegister();
|
|
||||||
temp2 = TempRegister();
|
|
||||||
}
|
|
||||||
LCheckPrototypeMaps* result = new(zone()) LCheckPrototypeMaps(temp1, temp2);
|
|
||||||
if (instr->CanOmitPrototypeChecks()) return result;
|
|
||||||
return AssignEnvironment(result);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
LInstruction* LChunkBuilder::DoCheckFunction(HCheckFunction* instr) {
|
LInstruction* LChunkBuilder::DoCheckFunction(HCheckFunction* instr) {
|
||||||
LOperand* value = UseRegisterAtStart(instr->value());
|
LOperand* value = UseRegisterAtStart(instr->value());
|
||||||
return AssignEnvironment(new(zone()) LCheckFunction(value));
|
return AssignEnvironment(new(zone()) LCheckFunction(value));
|
||||||
|
@ -68,7 +68,6 @@ class LCodeGen;
|
|||||||
V(CheckMaps) \
|
V(CheckMaps) \
|
||||||
V(CheckMapValue) \
|
V(CheckMapValue) \
|
||||||
V(CheckNonSmi) \
|
V(CheckNonSmi) \
|
||||||
V(CheckPrototypeMaps) \
|
|
||||||
V(CheckSmi) \
|
V(CheckSmi) \
|
||||||
V(ClampDToUint8) \
|
V(ClampDToUint8) \
|
||||||
V(ClampIToUint8) \
|
V(ClampIToUint8) \
|
||||||
@ -2324,26 +2323,6 @@ class LCheckMaps: public LTemplateInstruction<0, 1, 0> {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
class LCheckPrototypeMaps: public LTemplateInstruction<0, 0, 2> {
|
|
||||||
public:
|
|
||||||
LCheckPrototypeMaps(LOperand* temp, LOperand* temp2) {
|
|
||||||
temps_[0] = temp;
|
|
||||||
temps_[1] = temp2;
|
|
||||||
}
|
|
||||||
|
|
||||||
LOperand* temp() { return temps_[0]; }
|
|
||||||
LOperand* temp2() { return temps_[1]; }
|
|
||||||
|
|
||||||
DECLARE_CONCRETE_INSTRUCTION(CheckPrototypeMaps, "check-prototype-maps")
|
|
||||||
DECLARE_HYDROGEN_ACCESSOR(CheckPrototypeMaps)
|
|
||||||
|
|
||||||
ZoneList<Handle<JSObject> >* prototypes() const {
|
|
||||||
return hydrogen()->prototypes();
|
|
||||||
}
|
|
||||||
ZoneList<Handle<Map> >* maps() const { return hydrogen()->maps(); }
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
class LCheckSmi: public LTemplateInstruction<1, 1, 0> {
|
class LCheckSmi: public LTemplateInstruction<1, 1, 0> {
|
||||||
public:
|
public:
|
||||||
explicit LCheckSmi(LOperand* value) {
|
explicit LCheckSmi(LOperand* value) {
|
||||||
|
Loading…
Reference in New Issue
Block a user