Generate better branch code for instanceof-predicates.
Review URL: http://codereview.chromium.org/7168013 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8290 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
7c13e67f52
commit
e5cc31e444
@ -1579,6 +1579,21 @@ HType HUnaryPredicate::CalculateInferredType() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
HType HInstanceOf::CalculateInferredType() {
|
||||||
|
return HType::Boolean();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
HType HDeleteProperty::CalculateInferredType() {
|
||||||
|
return HType::Boolean();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
HType HInstanceOfKnownGlobal::CalculateInferredType() {
|
||||||
|
return HType::Boolean();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
HType HBitwiseBinaryOperation::CalculateInferredType() {
|
HType HBitwiseBinaryOperation::CalculateInferredType() {
|
||||||
return HType::TaggedNumber();
|
return HType::TaggedNumber();
|
||||||
}
|
}
|
||||||
|
@ -2789,14 +2789,12 @@ class HInstanceOf: public HTemplateInstruction<3> {
|
|||||||
HValue* left() { return OperandAt(1); }
|
HValue* left() { return OperandAt(1); }
|
||||||
HValue* right() { return OperandAt(2); }
|
HValue* right() { return OperandAt(2); }
|
||||||
|
|
||||||
virtual bool EmitAtUses() {
|
|
||||||
return !HasSideEffects() && !HasMultipleUses();
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual Representation RequiredInputRepresentation(int index) const {
|
virtual Representation RequiredInputRepresentation(int index) const {
|
||||||
return Representation::Tagged();
|
return Representation::Tagged();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
virtual HType CalculateInferredType();
|
||||||
|
|
||||||
virtual void PrintDataTo(StringStream* stream);
|
virtual void PrintDataTo(StringStream* stream);
|
||||||
|
|
||||||
DECLARE_CONCRETE_INSTRUCTION(InstanceOf)
|
DECLARE_CONCRETE_INSTRUCTION(InstanceOf)
|
||||||
@ -2817,6 +2815,8 @@ class HInstanceOfKnownGlobal: public HUnaryOperation {
|
|||||||
return Representation::Tagged();
|
return Representation::Tagged();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
virtual HType CalculateInferredType();
|
||||||
|
|
||||||
DECLARE_CONCRETE_INSTRUCTION(InstanceOfKnownGlobal)
|
DECLARE_CONCRETE_INSTRUCTION(InstanceOfKnownGlobal)
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@ -4005,6 +4005,8 @@ class HDeleteProperty: public HBinaryOperation {
|
|||||||
return Representation::Tagged();
|
return Representation::Tagged();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
virtual HType CalculateInferredType();
|
||||||
|
|
||||||
DECLARE_CONCRETE_INSTRUCTION(DeleteProperty)
|
DECLARE_CONCRETE_INSTRUCTION(DeleteProperty)
|
||||||
|
|
||||||
HValue* object() { return left(); }
|
HValue* object() { return left(); }
|
||||||
|
Loading…
Reference in New Issue
Block a user