Small simplification of HChange instruction.

Use existing flag to mark HChange instructions that deoptimize on undefined.

Also there is no need to store the source representation explicitly.
Review URL: http://codereview.chromium.org/8066007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9472 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent c6a53e06
...@@ -796,10 +796,11 @@ void HTypeof::PrintDataTo(StringStream* stream) { ...@@ -796,10 +796,11 @@ void HTypeof::PrintDataTo(StringStream* stream) {
void HChange::PrintDataTo(StringStream* stream) { void HChange::PrintDataTo(StringStream* stream) {
HUnaryOperation::PrintDataTo(stream); HUnaryOperation::PrintDataTo(stream);
stream->Add(" %s to %s", from_.Mnemonic(), to().Mnemonic()); stream->Add(" %s to %s", from().Mnemonic(), to().Mnemonic());
if (CanTruncateToInt32()) stream->Add(" truncating-int32"); if (CanTruncateToInt32()) stream->Add(" truncating-int32");
if (CheckFlag(kBailoutOnMinusZero)) stream->Add(" -0?"); if (CheckFlag(kBailoutOnMinusZero)) stream->Add(" -0?");
if (CheckFlag(kDeoptimizeOnUndefined)) stream->Add(" deopt-on-undefined");
} }
......
...@@ -625,7 +625,7 @@ class HValue: public ZoneObject { ...@@ -625,7 +625,7 @@ class HValue: public ZoneObject {
void ComputeInitialRange(); void ComputeInitialRange();
// Representation helpers. // Representation helpers.
virtual Representation RequiredInputRepresentation(int index) const = 0; virtual Representation RequiredInputRepresentation(int index) = 0;
virtual Representation InferredRepresentation() { virtual Representation InferredRepresentation() {
return representation(); return representation();
...@@ -841,7 +841,7 @@ class HTemplateControlInstruction: public HControlInstruction { ...@@ -841,7 +841,7 @@ class HTemplateControlInstruction: public HControlInstruction {
class HBlockEntry: public HTemplateInstruction<0> { class HBlockEntry: public HTemplateInstruction<0> {
public: public:
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) {
return Representation::None(); return Representation::None();
} }
...@@ -854,7 +854,7 @@ class HBlockEntry: public HTemplateInstruction<0> { ...@@ -854,7 +854,7 @@ class HBlockEntry: public HTemplateInstruction<0> {
// HSoftDeoptimize does not end a basic block as opposed to HDeoptimize. // HSoftDeoptimize does not end a basic block as opposed to HDeoptimize.
class HSoftDeoptimize: public HTemplateInstruction<0> { class HSoftDeoptimize: public HTemplateInstruction<0> {
public: public:
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) {
return Representation::None(); return Representation::None();
} }
...@@ -866,7 +866,7 @@ class HDeoptimize: public HControlInstruction { ...@@ -866,7 +866,7 @@ class HDeoptimize: public HControlInstruction {
public: public:
explicit HDeoptimize(int environment_length) : values_(environment_length) { } explicit HDeoptimize(int environment_length) : values_(environment_length) { }
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) {
return Representation::None(); return Representation::None();
} }
...@@ -911,7 +911,7 @@ class HGoto: public HTemplateControlInstruction<1, 0> { ...@@ -911,7 +911,7 @@ class HGoto: public HTemplateControlInstruction<1, 0> {
SetSuccessorAt(0, target); SetSuccessorAt(0, target);
} }
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) {
return Representation::None(); return Representation::None();
} }
...@@ -951,7 +951,7 @@ class HBranch: public HUnaryControlInstruction { ...@@ -951,7 +951,7 @@ class HBranch: public HUnaryControlInstruction {
: HUnaryControlInstruction(value, NULL, NULL) { } : HUnaryControlInstruction(value, NULL, NULL) { }
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) {
return Representation::None(); return Representation::None();
} }
...@@ -983,7 +983,7 @@ class HCompareMap: public HUnaryControlInstruction { ...@@ -983,7 +983,7 @@ class HCompareMap: public HUnaryControlInstruction {
Handle<Map> map() const { return map_; } Handle<Map> map() const { return map_; }
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) {
return Representation::Tagged(); return Representation::Tagged();
} }
...@@ -1000,7 +1000,7 @@ class HReturn: public HTemplateControlInstruction<0, 1> { ...@@ -1000,7 +1000,7 @@ class HReturn: public HTemplateControlInstruction<0, 1> {
SetOperandAt(0, value); SetOperandAt(0, value);
} }
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) {
return Representation::Tagged(); return Representation::Tagged();
} }
...@@ -1014,7 +1014,7 @@ class HReturn: public HTemplateControlInstruction<0, 1> { ...@@ -1014,7 +1014,7 @@ class HReturn: public HTemplateControlInstruction<0, 1> {
class HAbnormalExit: public HTemplateControlInstruction<0, 0> { class HAbnormalExit: public HTemplateControlInstruction<0, 0> {
public: public:
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) {
return Representation::None(); return Representation::None();
} }
...@@ -1049,7 +1049,7 @@ class HThrow: public HTemplateInstruction<2> { ...@@ -1049,7 +1049,7 @@ class HThrow: public HTemplateInstruction<2> {
SetAllSideEffects(); SetAllSideEffects();
} }
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) {
return Representation::Tagged(); return Representation::Tagged();
} }
...@@ -1064,7 +1064,7 @@ class HUseConst: public HUnaryOperation { ...@@ -1064,7 +1064,7 @@ class HUseConst: public HUnaryOperation {
public: public:
explicit HUseConst(HValue* old_value) : HUnaryOperation(old_value) { } explicit HUseConst(HValue* old_value) : HUnaryOperation(old_value) { }
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) {
return Representation::None(); return Representation::None();
} }
...@@ -1083,7 +1083,7 @@ class HForceRepresentation: public HTemplateInstruction<1> { ...@@ -1083,7 +1083,7 @@ class HForceRepresentation: public HTemplateInstruction<1> {
virtual HValue* EnsureAndPropagateNotMinusZero(BitVector* visited); virtual HValue* EnsureAndPropagateNotMinusZero(BitVector* visited);
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) {
return representation(); // Same as the output representation. return representation(); // Same as the output representation.
} }
...@@ -1094,27 +1094,27 @@ class HForceRepresentation: public HTemplateInstruction<1> { ...@@ -1094,27 +1094,27 @@ class HForceRepresentation: public HTemplateInstruction<1> {
class HChange: public HUnaryOperation { class HChange: public HUnaryOperation {
public: public:
HChange(HValue* value, HChange(HValue* value,
Representation from,
Representation to, Representation to,
bool is_truncating, bool is_truncating,
bool deoptimize_on_undefined) bool deoptimize_on_undefined)
: HUnaryOperation(value), : HUnaryOperation(value) {
from_(from), ASSERT(!value->representation().IsNone() && !to.IsNone());
deoptimize_on_undefined_(deoptimize_on_undefined) { ASSERT(!value->representation().Equals(to));
ASSERT(!from.IsNone() && !to.IsNone());
ASSERT(!from.Equals(to));
set_representation(to); set_representation(to);
SetFlag(kUseGVN); SetFlag(kUseGVN);
if (deoptimize_on_undefined) SetFlag(kDeoptimizeOnUndefined);
if (is_truncating) SetFlag(kTruncatingToInt32); if (is_truncating) SetFlag(kTruncatingToInt32);
} }
virtual HValue* EnsureAndPropagateNotMinusZero(BitVector* visited); virtual HValue* EnsureAndPropagateNotMinusZero(BitVector* visited);
Representation from() const { return from_; } Representation from() { return value()->representation(); }
Representation to() const { return representation(); } Representation to() { return representation(); }
bool deoptimize_on_undefined() const { return deoptimize_on_undefined_; } bool deoptimize_on_undefined() const {
virtual Representation RequiredInputRepresentation(int index) const { return CheckFlag(kDeoptimizeOnUndefined);
return from_; }
virtual Representation RequiredInputRepresentation(int index) {
return from();
} }
virtual Range* InferRange(); virtual Range* InferRange();
...@@ -1124,16 +1124,7 @@ class HChange: public HUnaryOperation { ...@@ -1124,16 +1124,7 @@ class HChange: public HUnaryOperation {
DECLARE_CONCRETE_INSTRUCTION(Change) DECLARE_CONCRETE_INSTRUCTION(Change)
protected: protected:
virtual bool DataEquals(HValue* other) { virtual bool DataEquals(HValue* other) { return true; }
if (!other->IsChange()) return false;
HChange* change = HChange::cast(other);
return to().Equals(change->to())
&& deoptimize_on_undefined() == change->deoptimize_on_undefined();
}
private:
Representation from_;
bool deoptimize_on_undefined_;
}; };
...@@ -1145,7 +1136,7 @@ class HClampToUint8: public HUnaryOperation { ...@@ -1145,7 +1136,7 @@ class HClampToUint8: public HUnaryOperation {
SetFlag(kUseGVN); SetFlag(kUseGVN);
} }
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) {
return Representation::None(); return Representation::None();
} }
...@@ -1164,7 +1155,7 @@ class HToInt32: public HUnaryOperation { ...@@ -1164,7 +1155,7 @@ class HToInt32: public HUnaryOperation {
SetFlag(kUseGVN); SetFlag(kUseGVN);
} }
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) {
return Representation::None(); return Representation::None();
} }
...@@ -1223,7 +1214,7 @@ class HSimulate: public HInstruction { ...@@ -1223,7 +1214,7 @@ class HSimulate: public HInstruction {
virtual int OperandCount() { return values_.length(); } virtual int OperandCount() { return values_.length(); }
virtual HValue* OperandAt(int index) { return values_[index]; } virtual HValue* OperandAt(int index) { return values_[index]; }
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) {
return Representation::None(); return Representation::None();
} }
...@@ -1268,7 +1259,7 @@ class HStackCheck: public HTemplateInstruction<1> { ...@@ -1268,7 +1259,7 @@ class HStackCheck: public HTemplateInstruction<1> {
HValue* context() { return OperandAt(0); } HValue* context() { return OperandAt(0); }
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) {
return Representation::Tagged(); return Representation::Tagged();
} }
...@@ -1306,7 +1297,7 @@ class HEnterInlined: public HTemplateInstruction<0> { ...@@ -1306,7 +1297,7 @@ class HEnterInlined: public HTemplateInstruction<0> {
FunctionLiteral* function() const { return function_; } FunctionLiteral* function() const { return function_; }
CallKind call_kind() const { return call_kind_; } CallKind call_kind() const { return call_kind_; }
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) {
return Representation::None(); return Representation::None();
} }
...@@ -1323,7 +1314,7 @@ class HLeaveInlined: public HTemplateInstruction<0> { ...@@ -1323,7 +1314,7 @@ class HLeaveInlined: public HTemplateInstruction<0> {
public: public:
HLeaveInlined() {} HLeaveInlined() {}
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) {
return Representation::None(); return Representation::None();
} }
...@@ -1337,7 +1328,7 @@ class HPushArgument: public HUnaryOperation { ...@@ -1337,7 +1328,7 @@ class HPushArgument: public HUnaryOperation {
set_representation(Representation::Tagged()); set_representation(Representation::Tagged());
} }
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) {
return Representation::Tagged(); return Representation::Tagged();
} }
...@@ -1354,7 +1345,7 @@ class HThisFunction: public HTemplateInstruction<0> { ...@@ -1354,7 +1345,7 @@ class HThisFunction: public HTemplateInstruction<0> {
SetFlag(kUseGVN); SetFlag(kUseGVN);
} }
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) {
return Representation::None(); return Representation::None();
} }
...@@ -1372,7 +1363,7 @@ class HContext: public HTemplateInstruction<0> { ...@@ -1372,7 +1363,7 @@ class HContext: public HTemplateInstruction<0> {
SetFlag(kUseGVN); SetFlag(kUseGVN);
} }
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) {
return Representation::None(); return Representation::None();
} }
...@@ -1392,7 +1383,7 @@ class HOuterContext: public HUnaryOperation { ...@@ -1392,7 +1383,7 @@ class HOuterContext: public HUnaryOperation {
DECLARE_CONCRETE_INSTRUCTION(OuterContext); DECLARE_CONCRETE_INSTRUCTION(OuterContext);
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) {
return Representation::Tagged(); return Representation::Tagged();
} }
...@@ -1410,7 +1401,7 @@ class HGlobalObject: public HUnaryOperation { ...@@ -1410,7 +1401,7 @@ class HGlobalObject: public HUnaryOperation {
DECLARE_CONCRETE_INSTRUCTION(GlobalObject) DECLARE_CONCRETE_INSTRUCTION(GlobalObject)
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) {
return Representation::Tagged(); return Representation::Tagged();
} }
...@@ -1429,7 +1420,7 @@ class HGlobalReceiver: public HUnaryOperation { ...@@ -1429,7 +1420,7 @@ class HGlobalReceiver: public HUnaryOperation {
DECLARE_CONCRETE_INSTRUCTION(GlobalReceiver) DECLARE_CONCRETE_INSTRUCTION(GlobalReceiver)
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) {
return Representation::Tagged(); return Representation::Tagged();
} }
...@@ -1465,7 +1456,7 @@ class HUnaryCall: public HCall<1> { ...@@ -1465,7 +1456,7 @@ class HUnaryCall: public HCall<1> {
SetOperandAt(0, value); SetOperandAt(0, value);
} }
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) {
return Representation::Tagged(); return Representation::Tagged();
} }
...@@ -1485,7 +1476,7 @@ class HBinaryCall: public HCall<2> { ...@@ -1485,7 +1476,7 @@ class HBinaryCall: public HCall<2> {
virtual void PrintDataTo(StringStream* stream); virtual void PrintDataTo(StringStream* stream);
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) {
return Representation::Tagged(); return Representation::Tagged();
} }
...@@ -1500,7 +1491,7 @@ class HInvokeFunction: public HBinaryCall { ...@@ -1500,7 +1491,7 @@ class HInvokeFunction: public HBinaryCall {
: HBinaryCall(context, function, argument_count) { : HBinaryCall(context, function, argument_count) {
} }
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) {
return Representation::Tagged(); return Representation::Tagged();
} }
...@@ -1525,7 +1516,7 @@ class HCallConstantFunction: public HCall<0> { ...@@ -1525,7 +1516,7 @@ class HCallConstantFunction: public HCall<0> {
virtual void PrintDataTo(StringStream* stream); virtual void PrintDataTo(StringStream* stream);
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) {
return Representation::None(); return Representation::None();
} }
...@@ -1542,7 +1533,7 @@ class HCallKeyed: public HBinaryCall { ...@@ -1542,7 +1533,7 @@ class HCallKeyed: public HBinaryCall {
: HBinaryCall(context, key, argument_count) { : HBinaryCall(context, key, argument_count) {
} }
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) {
return Representation::Tagged(); return Representation::Tagged();
} }
...@@ -1566,7 +1557,7 @@ class HCallNamed: public HUnaryCall { ...@@ -1566,7 +1557,7 @@ class HCallNamed: public HUnaryCall {
DECLARE_CONCRETE_INSTRUCTION(CallNamed) DECLARE_CONCRETE_INSTRUCTION(CallNamed)
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) {
return Representation::Tagged(); return Representation::Tagged();
} }
...@@ -1583,7 +1574,7 @@ class HCallFunction: public HUnaryCall { ...@@ -1583,7 +1574,7 @@ class HCallFunction: public HUnaryCall {
HValue* context() { return value(); } HValue* context() { return value(); }
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) {
return Representation::Tagged(); return Representation::Tagged();
} }
...@@ -1602,7 +1593,7 @@ class HCallGlobal: public HUnaryCall { ...@@ -1602,7 +1593,7 @@ class HCallGlobal: public HUnaryCall {
HValue* context() { return value(); } HValue* context() { return value(); }
Handle<String> name() const { return name_; } Handle<String> name() const { return name_; }
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) {
return Representation::Tagged(); return Representation::Tagged();
} }
...@@ -1622,7 +1613,7 @@ class HCallKnownGlobal: public HCall<0> { ...@@ -1622,7 +1613,7 @@ class HCallKnownGlobal: public HCall<0> {
Handle<JSFunction> target() const { return target_; } Handle<JSFunction> target() const { return target_; }
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) {
return Representation::None(); return Representation::None();
} }
...@@ -1639,7 +1630,7 @@ class HCallNew: public HBinaryCall { ...@@ -1639,7 +1630,7 @@ class HCallNew: public HBinaryCall {
: HBinaryCall(context, constructor, argument_count) { : HBinaryCall(context, constructor, argument_count) {
} }
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) {
return Representation::Tagged(); return Representation::Tagged();
} }
...@@ -1666,7 +1657,7 @@ class HCallRuntime: public HCall<1> { ...@@ -1666,7 +1657,7 @@ class HCallRuntime: public HCall<1> {
const Runtime::Function* function() const { return c_function_; } const Runtime::Function* function() const { return c_function_; }
Handle<String> name() const { return name_; } Handle<String> name() const { return name_; }
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) {
return Representation::Tagged(); return Representation::Tagged();
} }
...@@ -1692,7 +1683,7 @@ class HJSArrayLength: public HTemplateInstruction<2> { ...@@ -1692,7 +1683,7 @@ class HJSArrayLength: public HTemplateInstruction<2> {
SetFlag(kDependsOnMaps); SetFlag(kDependsOnMaps);
} }
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) {
return Representation::Tagged(); return Representation::Tagged();
} }
...@@ -1716,7 +1707,7 @@ class HFixedArrayBaseLength: public HUnaryOperation { ...@@ -1716,7 +1707,7 @@ class HFixedArrayBaseLength: public HUnaryOperation {
SetFlag(kDependsOnArrayLengths); SetFlag(kDependsOnArrayLengths);
} }
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) {
return Representation::Tagged(); return Representation::Tagged();
} }
...@@ -1735,7 +1726,7 @@ class HElementsKind: public HUnaryOperation { ...@@ -1735,7 +1726,7 @@ class HElementsKind: public HUnaryOperation {
SetFlag(kDependsOnMaps); SetFlag(kDependsOnMaps);
} }
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) {
return Representation::Tagged(); return Representation::Tagged();
} }
...@@ -1754,7 +1745,7 @@ class HBitNot: public HUnaryOperation { ...@@ -1754,7 +1745,7 @@ class HBitNot: public HUnaryOperation {
SetFlag(kTruncatingToInt32); SetFlag(kTruncatingToInt32);
} }
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) {
return Representation::Integer32(); return Representation::Integer32();
} }
virtual HType CalculateInferredType(); virtual HType CalculateInferredType();
...@@ -1804,7 +1795,7 @@ class HUnaryMathOperation: public HTemplateInstruction<2> { ...@@ -1804,7 +1795,7 @@ class HUnaryMathOperation: public HTemplateInstruction<2> {
virtual HValue* EnsureAndPropagateNotMinusZero(BitVector* visited); virtual HValue* EnsureAndPropagateNotMinusZero(BitVector* visited);
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) {
if (index == 0) { if (index == 0) {
return Representation::Tagged(); return Representation::Tagged();
} else { } else {
...@@ -1861,7 +1852,7 @@ class HLoadElements: public HUnaryOperation { ...@@ -1861,7 +1852,7 @@ class HLoadElements: public HUnaryOperation {
SetFlag(kDependsOnMaps); SetFlag(kDependsOnMaps);
} }
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) {
return Representation::Tagged(); return Representation::Tagged();
} }
...@@ -1884,7 +1875,7 @@ class HLoadExternalArrayPointer: public HUnaryOperation { ...@@ -1884,7 +1875,7 @@ class HLoadExternalArrayPointer: public HUnaryOperation {
SetFlag(kUseGVN); SetFlag(kUseGVN);
} }
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) {
return Representation::Tagged(); return Representation::Tagged();
} }
...@@ -1908,7 +1899,7 @@ class HCheckMap: public HTemplateInstruction<2> { ...@@ -1908,7 +1899,7 @@ class HCheckMap: public HTemplateInstruction<2> {
SetFlag(kDependsOnMaps); SetFlag(kDependsOnMaps);
} }
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) {
return Representation::Tagged(); return Representation::Tagged();
} }
virtual void PrintDataTo(StringStream* stream); virtual void PrintDataTo(StringStream* stream);
...@@ -1938,7 +1929,7 @@ class HCheckFunction: public HUnaryOperation { ...@@ -1938,7 +1929,7 @@ class HCheckFunction: public HUnaryOperation {
SetFlag(kUseGVN); SetFlag(kUseGVN);
} }
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) {
return Representation::Tagged(); return Representation::Tagged();
} }
virtual void PrintDataTo(StringStream* stream); virtual void PrintDataTo(StringStream* stream);
...@@ -1980,7 +1971,7 @@ class HCheckInstanceType: public HUnaryOperation { ...@@ -1980,7 +1971,7 @@ class HCheckInstanceType: public HUnaryOperation {
virtual void PrintDataTo(StringStream* stream); virtual void PrintDataTo(StringStream* stream);
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) {
return Representation::Tagged(); return Representation::Tagged();
} }
...@@ -2029,7 +2020,7 @@ class HCheckNonSmi: public HUnaryOperation { ...@@ -2029,7 +2020,7 @@ class HCheckNonSmi: public HUnaryOperation {
SetFlag(kUseGVN); SetFlag(kUseGVN);
} }
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) {
return Representation::Tagged(); return Representation::Tagged();
} }
...@@ -2075,7 +2066,7 @@ class HCheckPrototypeMaps: public HTemplateInstruction<0> { ...@@ -2075,7 +2066,7 @@ class HCheckPrototypeMaps: public HTemplateInstruction<0> {
DECLARE_CONCRETE_INSTRUCTION(CheckPrototypeMaps) DECLARE_CONCRETE_INSTRUCTION(CheckPrototypeMaps)
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) {
return Representation::None(); return Representation::None();
} }
...@@ -2106,7 +2097,7 @@ class HCheckSmi: public HUnaryOperation { ...@@ -2106,7 +2097,7 @@ class HCheckSmi: public HUnaryOperation {
SetFlag(kUseGVN); SetFlag(kUseGVN);
} }
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) {
return Representation::Tagged(); return Representation::Tagged();
} }
virtual HType CalculateInferredType(); virtual HType CalculateInferredType();
...@@ -2155,7 +2146,7 @@ class HPhi: public HValue { ...@@ -2155,7 +2146,7 @@ class HPhi: public HValue {
} }
virtual Range* InferRange(); virtual Range* InferRange();
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) {
return representation(); return representation();
} }
virtual HType CalculateInferredType(); virtual HType CalculateInferredType();
...@@ -2247,7 +2238,7 @@ class HArgumentsObject: public HTemplateInstruction<0> { ...@@ -2247,7 +2238,7 @@ class HArgumentsObject: public HTemplateInstruction<0> {
SetFlag(kIsArguments); SetFlag(kIsArguments);
} }
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) {
return Representation::None(); return Representation::None();
} }
...@@ -2276,7 +2267,7 @@ class HConstant: public HTemplateInstruction<0> { ...@@ -2276,7 +2267,7 @@ class HConstant: public HTemplateInstruction<0> {
return false; return false;
} }
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) {
return Representation::None(); return Representation::None();
} }
...@@ -2384,7 +2375,7 @@ class HApplyArguments: public HTemplateInstruction<4> { ...@@ -2384,7 +2375,7 @@ class HApplyArguments: public HTemplateInstruction<4> {
SetAllSideEffects(); SetAllSideEffects();
} }
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) {
// The length is untagged, all other inputs are tagged. // The length is untagged, all other inputs are tagged.
return (index == 2) return (index == 2)
? Representation::Integer32() ? Representation::Integer32()
...@@ -2411,7 +2402,7 @@ class HArgumentsElements: public HTemplateInstruction<0> { ...@@ -2411,7 +2402,7 @@ class HArgumentsElements: public HTemplateInstruction<0> {
DECLARE_CONCRETE_INSTRUCTION(ArgumentsElements) DECLARE_CONCRETE_INSTRUCTION(ArgumentsElements)
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) {
return Representation::None(); return Representation::None();
} }
...@@ -2427,7 +2418,7 @@ class HArgumentsLength: public HUnaryOperation { ...@@ -2427,7 +2418,7 @@ class HArgumentsLength: public HUnaryOperation {
SetFlag(kUseGVN); SetFlag(kUseGVN);
} }
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) {
return Representation::Tagged(); return Representation::Tagged();
} }
...@@ -2450,7 +2441,7 @@ class HAccessArgumentsAt: public HTemplateInstruction<3> { ...@@ -2450,7 +2441,7 @@ class HAccessArgumentsAt: public HTemplateInstruction<3> {
virtual void PrintDataTo(StringStream* stream); virtual void PrintDataTo(StringStream* stream);
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) {
// The arguments elements is considered tagged. // The arguments elements is considered tagged.
return index == 0 return index == 0
? Representation::Tagged() ? Representation::Tagged()
...@@ -2476,7 +2467,7 @@ class HBoundsCheck: public HTemplateInstruction<2> { ...@@ -2476,7 +2467,7 @@ class HBoundsCheck: public HTemplateInstruction<2> {
SetFlag(kUseGVN); SetFlag(kUseGVN);
} }
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) {
return Representation::Integer32(); return Representation::Integer32();
} }
...@@ -2501,7 +2492,7 @@ class HBitwiseBinaryOperation: public HBinaryOperation { ...@@ -2501,7 +2492,7 @@ class HBitwiseBinaryOperation: public HBinaryOperation {
SetAllSideEffects(); SetAllSideEffects();
} }
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) {
return index == 0 return index == 0
? Representation::Tagged() ? Representation::Tagged()
: representation(); : representation();
...@@ -2539,7 +2530,7 @@ class HArithmeticBinaryOperation: public HBinaryOperation { ...@@ -2539,7 +2530,7 @@ class HArithmeticBinaryOperation: public HBinaryOperation {
} }
virtual HType CalculateInferredType(); virtual HType CalculateInferredType();
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) {
return index == 0 return index == 0
? Representation::Tagged() ? Representation::Tagged()
: representation(); : representation();
...@@ -2566,7 +2557,7 @@ class HCompareGeneric: public HBinaryOperation { ...@@ -2566,7 +2557,7 @@ class HCompareGeneric: public HBinaryOperation {
SetAllSideEffects(); SetAllSideEffects();
} }
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) {
return Representation::Tagged(); return Representation::Tagged();
} }
...@@ -2604,7 +2595,7 @@ class HCompareIDAndBranch: public HTemplateControlInstruction<2, 2> { ...@@ -2604,7 +2595,7 @@ class HCompareIDAndBranch: public HTemplateControlInstruction<2, 2> {
return input_representation_; return input_representation_;
} }
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) {
return input_representation_; return input_representation_;
} }
virtual void PrintDataTo(StringStream* stream); virtual void PrintDataTo(StringStream* stream);
...@@ -2629,7 +2620,7 @@ class HCompareObjectEqAndBranch: public HTemplateControlInstruction<2, 2> { ...@@ -2629,7 +2620,7 @@ class HCompareObjectEqAndBranch: public HTemplateControlInstruction<2, 2> {
virtual void PrintDataTo(StringStream* stream); virtual void PrintDataTo(StringStream* stream);
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) {
return Representation::Tagged(); return Representation::Tagged();
} }
...@@ -2648,7 +2639,7 @@ class HCompareConstantEqAndBranch: public HUnaryControlInstruction { ...@@ -2648,7 +2639,7 @@ class HCompareConstantEqAndBranch: public HUnaryControlInstruction {
HValue* left() { return value(); } HValue* left() { return value(); }
int right() const { return right_; } int right() const { return right_; }
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) {
return Representation::Integer32(); return Representation::Integer32();
} }
...@@ -2670,7 +2661,7 @@ class HIsNilAndBranch: public HUnaryControlInstruction { ...@@ -2670,7 +2661,7 @@ class HIsNilAndBranch: public HUnaryControlInstruction {
virtual void PrintDataTo(StringStream* stream); virtual void PrintDataTo(StringStream* stream);
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) {
return Representation::Tagged(); return Representation::Tagged();
} }
...@@ -2687,7 +2678,7 @@ class HIsObjectAndBranch: public HUnaryControlInstruction { ...@@ -2687,7 +2678,7 @@ class HIsObjectAndBranch: public HUnaryControlInstruction {
explicit HIsObjectAndBranch(HValue* value) explicit HIsObjectAndBranch(HValue* value)
: HUnaryControlInstruction(value, NULL, NULL) { } : HUnaryControlInstruction(value, NULL, NULL) { }
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) {
return Representation::Tagged(); return Representation::Tagged();
} }
...@@ -2702,7 +2693,7 @@ class HIsSmiAndBranch: public HUnaryControlInstruction { ...@@ -2702,7 +2693,7 @@ class HIsSmiAndBranch: public HUnaryControlInstruction {
DECLARE_CONCRETE_INSTRUCTION(IsSmiAndBranch) DECLARE_CONCRETE_INSTRUCTION(IsSmiAndBranch)
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) {
return Representation::Tagged(); return Representation::Tagged();
} }
...@@ -2716,7 +2707,7 @@ class HIsUndetectableAndBranch: public HUnaryControlInstruction { ...@@ -2716,7 +2707,7 @@ class HIsUndetectableAndBranch: public HUnaryControlInstruction {
explicit HIsUndetectableAndBranch(HValue* value) explicit HIsUndetectableAndBranch(HValue* value)
: HUnaryControlInstruction(value, NULL, NULL) { } : HUnaryControlInstruction(value, NULL, NULL) { }
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) {
return Representation::Tagged(); return Representation::Tagged();
} }
...@@ -2726,7 +2717,7 @@ class HIsUndetectableAndBranch: public HUnaryControlInstruction { ...@@ -2726,7 +2717,7 @@ class HIsUndetectableAndBranch: public HUnaryControlInstruction {
class HIsConstructCallAndBranch: public HTemplateControlInstruction<2, 0> { class HIsConstructCallAndBranch: public HTemplateControlInstruction<2, 0> {
public: public:
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) {
return Representation::None(); return Representation::None();
} }
...@@ -2748,7 +2739,7 @@ class HHasInstanceTypeAndBranch: public HUnaryControlInstruction { ...@@ -2748,7 +2739,7 @@ class HHasInstanceTypeAndBranch: public HUnaryControlInstruction {
virtual void PrintDataTo(StringStream* stream); virtual void PrintDataTo(StringStream* stream);
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) {
return Representation::Tagged(); return Representation::Tagged();
} }
...@@ -2765,7 +2756,7 @@ class HHasCachedArrayIndexAndBranch: public HUnaryControlInstruction { ...@@ -2765,7 +2756,7 @@ class HHasCachedArrayIndexAndBranch: public HUnaryControlInstruction {
explicit HHasCachedArrayIndexAndBranch(HValue* value) explicit HHasCachedArrayIndexAndBranch(HValue* value)
: HUnaryControlInstruction(value, NULL, NULL) { } : HUnaryControlInstruction(value, NULL, NULL) { }
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) {
return Representation::Tagged(); return Representation::Tagged();
} }
...@@ -2780,7 +2771,7 @@ class HGetCachedArrayIndex: public HUnaryOperation { ...@@ -2780,7 +2771,7 @@ class HGetCachedArrayIndex: public HUnaryOperation {
SetFlag(kUseGVN); SetFlag(kUseGVN);
} }
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) {
return Representation::Tagged(); return Representation::Tagged();
} }
...@@ -2799,7 +2790,7 @@ class HClassOfTestAndBranch: public HUnaryControlInstruction { ...@@ -2799,7 +2790,7 @@ class HClassOfTestAndBranch: public HUnaryControlInstruction {
DECLARE_CONCRETE_INSTRUCTION(ClassOfTestAndBranch) DECLARE_CONCRETE_INSTRUCTION(ClassOfTestAndBranch)
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) {
return Representation::Tagged(); return Representation::Tagged();
} }
...@@ -2823,7 +2814,7 @@ class HTypeofIsAndBranch: public HUnaryControlInstruction { ...@@ -2823,7 +2814,7 @@ class HTypeofIsAndBranch: public HUnaryControlInstruction {
DECLARE_CONCRETE_INSTRUCTION(TypeofIsAndBranch) DECLARE_CONCRETE_INSTRUCTION(TypeofIsAndBranch)
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) {
return Representation::Tagged(); return Representation::Tagged();
} }
...@@ -2840,7 +2831,7 @@ class HInstanceOf: public HBinaryOperation { ...@@ -2840,7 +2831,7 @@ class HInstanceOf: public HBinaryOperation {
SetAllSideEffects(); SetAllSideEffects();
} }
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) {
return Representation::Tagged(); return Representation::Tagged();
} }
...@@ -2868,7 +2859,7 @@ class HInstanceOfKnownGlobal: public HTemplateInstruction<2> { ...@@ -2868,7 +2859,7 @@ class HInstanceOfKnownGlobal: public HTemplateInstruction<2> {
HValue* left() { return OperandAt(1); } HValue* left() { return OperandAt(1); }
Handle<JSFunction> function() { return function_; } Handle<JSFunction> function() { return function_; }
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) {
return Representation::Tagged(); return Representation::Tagged();
} }
...@@ -2893,7 +2884,7 @@ class HPower: public HTemplateInstruction<2> { ...@@ -2893,7 +2884,7 @@ class HPower: public HTemplateInstruction<2> {
HValue* left() { return OperandAt(0); } HValue* left() { return OperandAt(0); }
HValue* right() { return OperandAt(1); } HValue* right() { return OperandAt(1); }
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) {
return index == 0 return index == 0
? Representation::Double() ? Representation::Double()
: Representation::None(); : Representation::None();
...@@ -3122,7 +3113,7 @@ class HOsrEntry: public HTemplateInstruction<0> { ...@@ -3122,7 +3113,7 @@ class HOsrEntry: public HTemplateInstruction<0> {
int ast_id() const { return ast_id_; } int ast_id() const { return ast_id_; }
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) {
return Representation::None(); return Representation::None();
} }
...@@ -3143,7 +3134,7 @@ class HParameter: public HTemplateInstruction<0> { ...@@ -3143,7 +3134,7 @@ class HParameter: public HTemplateInstruction<0> {
virtual void PrintDataTo(StringStream* stream); virtual void PrintDataTo(StringStream* stream);
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) {
return Representation::None(); return Representation::None();
} }
...@@ -3175,7 +3166,7 @@ class HCallStub: public HUnaryCall { ...@@ -3175,7 +3166,7 @@ class HCallStub: public HUnaryCall {
virtual void PrintDataTo(StringStream* stream); virtual void PrintDataTo(StringStream* stream);
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) {
return Representation::Tagged(); return Representation::Tagged();
} }
...@@ -3191,7 +3182,7 @@ class HUnknownOSRValue: public HTemplateInstruction<0> { ...@@ -3191,7 +3182,7 @@ class HUnknownOSRValue: public HTemplateInstruction<0> {
public: public:
HUnknownOSRValue() { set_representation(Representation::Tagged()); } HUnknownOSRValue() { set_representation(Representation::Tagged()); }
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) {
return Representation::None(); return Representation::None();
} }
...@@ -3218,7 +3209,7 @@ class HLoadGlobalCell: public HTemplateInstruction<0> { ...@@ -3218,7 +3209,7 @@ class HLoadGlobalCell: public HTemplateInstruction<0> {
return reinterpret_cast<intptr_t>(*cell_); return reinterpret_cast<intptr_t>(*cell_);
} }
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) {
return Representation::None(); return Representation::None();
} }
...@@ -3257,7 +3248,7 @@ class HLoadGlobalGeneric: public HTemplateInstruction<2> { ...@@ -3257,7 +3248,7 @@ class HLoadGlobalGeneric: public HTemplateInstruction<2> {
virtual void PrintDataTo(StringStream* stream); virtual void PrintDataTo(StringStream* stream);
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) {
return Representation::Tagged(); return Representation::Tagged();
} }
...@@ -3285,7 +3276,7 @@ class HStoreGlobalCell: public HUnaryOperation { ...@@ -3285,7 +3276,7 @@ class HStoreGlobalCell: public HUnaryOperation {
return !details_.IsDontDelete() || details_.IsReadOnly(); return !details_.IsDontDelete() || details_.IsReadOnly();
} }
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) {
return Representation::Tagged(); return Representation::Tagged();
} }
virtual void PrintDataTo(StringStream* stream); virtual void PrintDataTo(StringStream* stream);
...@@ -3322,7 +3313,7 @@ class HStoreGlobalGeneric: public HTemplateInstruction<3> { ...@@ -3322,7 +3313,7 @@ class HStoreGlobalGeneric: public HTemplateInstruction<3> {
virtual void PrintDataTo(StringStream* stream); virtual void PrintDataTo(StringStream* stream);
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) {
return Representation::Tagged(); return Representation::Tagged();
} }
...@@ -3345,7 +3336,7 @@ class HLoadContextSlot: public HUnaryOperation { ...@@ -3345,7 +3336,7 @@ class HLoadContextSlot: public HUnaryOperation {
int slot_index() const { return slot_index_; } int slot_index() const { return slot_index_; }
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) {
return Representation::Tagged(); return Representation::Tagged();
} }
...@@ -3388,7 +3379,7 @@ class HStoreContextSlot: public HTemplateInstruction<2> { ...@@ -3388,7 +3379,7 @@ class HStoreContextSlot: public HTemplateInstruction<2> {
return StoringValueNeedsWriteBarrier(value()); return StoringValueNeedsWriteBarrier(value());
} }
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) {
return Representation::Tagged(); return Representation::Tagged();
} }
...@@ -3421,7 +3412,7 @@ class HLoadNamedField: public HUnaryOperation { ...@@ -3421,7 +3412,7 @@ class HLoadNamedField: public HUnaryOperation {
bool is_in_object() const { return is_in_object_; } bool is_in_object() const { return is_in_object_; }
int offset() const { return offset_; } int offset() const { return offset_; }
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) {
return Representation::Tagged(); return Representation::Tagged();
} }
virtual void PrintDataTo(StringStream* stream); virtual void PrintDataTo(StringStream* stream);
...@@ -3453,7 +3444,7 @@ class HLoadNamedFieldPolymorphic: public HTemplateInstruction<2> { ...@@ -3453,7 +3444,7 @@ class HLoadNamedFieldPolymorphic: public HTemplateInstruction<2> {
Handle<String> name() { return name_; } Handle<String> name() { return name_; }
bool need_generic() { return need_generic_; } bool need_generic() { return need_generic_; }
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) {
return Representation::Tagged(); return Representation::Tagged();
} }
...@@ -3488,7 +3479,7 @@ class HLoadNamedGeneric: public HTemplateInstruction<2> { ...@@ -3488,7 +3479,7 @@ class HLoadNamedGeneric: public HTemplateInstruction<2> {
HValue* object() { return OperandAt(1); } HValue* object() { return OperandAt(1); }
Handle<Object> name() const { return name_; } Handle<Object> name() const { return name_; }
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) {
return Representation::Tagged(); return Representation::Tagged();
} }
...@@ -3512,7 +3503,7 @@ class HLoadFunctionPrototype: public HUnaryOperation { ...@@ -3512,7 +3503,7 @@ class HLoadFunctionPrototype: public HUnaryOperation {
HValue* function() { return OperandAt(0); } HValue* function() { return OperandAt(0); }
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) {
return Representation::Tagged(); return Representation::Tagged();
} }
...@@ -3536,7 +3527,7 @@ class HLoadKeyedFastElement: public HTemplateInstruction<2> { ...@@ -3536,7 +3527,7 @@ class HLoadKeyedFastElement: public HTemplateInstruction<2> {
HValue* object() { return OperandAt(0); } HValue* object() { return OperandAt(0); }
HValue* key() { return OperandAt(1); } HValue* key() { return OperandAt(1); }
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) {
// The key is supposed to be Integer32. // The key is supposed to be Integer32.
return index == 0 return index == 0
? Representation::Tagged() ? Representation::Tagged()
...@@ -3567,7 +3558,7 @@ class HLoadKeyedFastDoubleElement: public HTemplateInstruction<2> { ...@@ -3567,7 +3558,7 @@ class HLoadKeyedFastDoubleElement: public HTemplateInstruction<2> {
HValue* elements() { return OperandAt(0); } HValue* elements() { return OperandAt(0); }
HValue* key() { return OperandAt(1); } HValue* key() { return OperandAt(1); }
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) {
// The key is supposed to be Integer32. // The key is supposed to be Integer32.
return index == 0 return index == 0
? Representation::Tagged() ? Representation::Tagged()
...@@ -3605,7 +3596,7 @@ class HLoadKeyedSpecializedArrayElement: public HTemplateInstruction<2> { ...@@ -3605,7 +3596,7 @@ class HLoadKeyedSpecializedArrayElement: public HTemplateInstruction<2> {
virtual void PrintDataTo(StringStream* stream); virtual void PrintDataTo(StringStream* stream);
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) {
// The key is supposed to be Integer32, but the base pointer // The key is supposed to be Integer32, but the base pointer
// for the element load is a naked pointer. // for the element load is a naked pointer.
return index == 0 return index == 0
...@@ -3648,7 +3639,7 @@ class HLoadKeyedGeneric: public HTemplateInstruction<3> { ...@@ -3648,7 +3639,7 @@ class HLoadKeyedGeneric: public HTemplateInstruction<3> {
virtual void PrintDataTo(StringStream* stream); virtual void PrintDataTo(StringStream* stream);
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) {
return Representation::Tagged(); return Representation::Tagged();
} }
...@@ -3677,7 +3668,7 @@ class HStoreNamedField: public HTemplateInstruction<2> { ...@@ -3677,7 +3668,7 @@ class HStoreNamedField: public HTemplateInstruction<2> {
DECLARE_CONCRETE_INSTRUCTION(StoreNamedField) DECLARE_CONCRETE_INSTRUCTION(StoreNamedField)
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) {
return Representation::Tagged(); return Representation::Tagged();
} }
virtual void PrintDataTo(StringStream* stream); virtual void PrintDataTo(StringStream* stream);
...@@ -3726,7 +3717,7 @@ class HStoreNamedGeneric: public HTemplateInstruction<3> { ...@@ -3726,7 +3717,7 @@ class HStoreNamedGeneric: public HTemplateInstruction<3> {
virtual void PrintDataTo(StringStream* stream); virtual void PrintDataTo(StringStream* stream);
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) {
return Representation::Tagged(); return Representation::Tagged();
} }
...@@ -3749,7 +3740,7 @@ class HStoreKeyedFastElement: public HTemplateInstruction<3> { ...@@ -3749,7 +3740,7 @@ class HStoreKeyedFastElement: public HTemplateInstruction<3> {
SetFlag(kChangesArrayElements); SetFlag(kChangesArrayElements);
} }
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) {
// The key is supposed to be Integer32. // The key is supposed to be Integer32.
return index == 1 return index == 1
? Representation::Integer32() ? Representation::Integer32()
...@@ -3795,7 +3786,7 @@ class HStoreKeyedFastDoubleElement: public HTemplateInstruction<3> { ...@@ -3795,7 +3786,7 @@ class HStoreKeyedFastDoubleElement: public HTemplateInstruction<3> {
SetFlag(kChangesDoubleArrayElements); SetFlag(kChangesDoubleArrayElements);
} }
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) {
if (index == 1) { if (index == 1) {
return Representation::Integer32(); return Representation::Integer32();
} else if (index == 2) { } else if (index == 2) {
...@@ -3834,7 +3825,7 @@ class HStoreKeyedSpecializedArrayElement: public HTemplateInstruction<3> { ...@@ -3834,7 +3825,7 @@ class HStoreKeyedSpecializedArrayElement: public HTemplateInstruction<3> {
virtual void PrintDataTo(StringStream* stream); virtual void PrintDataTo(StringStream* stream);
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) {
if (index == 0) { if (index == 0) {
return Representation::External(); return Representation::External();
} else { } else {
...@@ -3882,7 +3873,7 @@ class HStoreKeyedGeneric: public HTemplateInstruction<4> { ...@@ -3882,7 +3873,7 @@ class HStoreKeyedGeneric: public HTemplateInstruction<4> {
HValue* context() { return OperandAt(3); } HValue* context() { return OperandAt(3); }
bool strict_mode() { return strict_mode_; } bool strict_mode() { return strict_mode_; }
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) {
return Representation::Tagged(); return Representation::Tagged();
} }
...@@ -3904,7 +3895,7 @@ class HStringAdd: public HBinaryOperation { ...@@ -3904,7 +3895,7 @@ class HStringAdd: public HBinaryOperation {
SetFlag(kDependsOnMaps); SetFlag(kDependsOnMaps);
} }
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) {
return Representation::Tagged(); return Representation::Tagged();
} }
...@@ -3930,7 +3921,7 @@ class HStringCharCodeAt: public HTemplateInstruction<3> { ...@@ -3930,7 +3921,7 @@ class HStringCharCodeAt: public HTemplateInstruction<3> {
SetFlag(kDependsOnMaps); SetFlag(kDependsOnMaps);
} }
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) {
// The index is supposed to be Integer32. // The index is supposed to be Integer32.
return index == 2 return index == 2
? Representation::Integer32() ? Representation::Integer32()
...@@ -3961,7 +3952,7 @@ class HStringCharFromCode: public HTemplateInstruction<2> { ...@@ -3961,7 +3952,7 @@ class HStringCharFromCode: public HTemplateInstruction<2> {
SetFlag(kUseGVN); SetFlag(kUseGVN);
} }
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) {
return index == 0 return index == 0
? Representation::Tagged() ? Representation::Tagged()
: Representation::Integer32(); : Representation::Integer32();
...@@ -3984,7 +3975,7 @@ class HStringLength: public HUnaryOperation { ...@@ -3984,7 +3975,7 @@ class HStringLength: public HUnaryOperation {
SetFlag(kDependsOnMaps); SetFlag(kDependsOnMaps);
} }
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) {
return Representation::Tagged(); return Representation::Tagged();
} }
...@@ -4040,7 +4031,7 @@ class HArrayLiteral: public HMaterializedLiteral<1> { ...@@ -4040,7 +4031,7 @@ class HArrayLiteral: public HMaterializedLiteral<1> {
bool IsCopyOnWrite() const; bool IsCopyOnWrite() const;
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) {
return Representation::Tagged(); return Representation::Tagged();
} }
...@@ -4074,7 +4065,7 @@ class HObjectLiteral: public HMaterializedLiteral<1> { ...@@ -4074,7 +4065,7 @@ class HObjectLiteral: public HMaterializedLiteral<1> {
bool fast_elements() const { return fast_elements_; } bool fast_elements() const { return fast_elements_; }
bool has_function() const { return has_function_; } bool has_function() const { return has_function_; }
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) {
return Representation::Tagged(); return Representation::Tagged();
} }
...@@ -4103,7 +4094,7 @@ class HRegExpLiteral: public HMaterializedLiteral<1> { ...@@ -4103,7 +4094,7 @@ class HRegExpLiteral: public HMaterializedLiteral<1> {
Handle<String> pattern() { return pattern_; } Handle<String> pattern() { return pattern_; }
Handle<String> flags() { return flags_; } Handle<String> flags() { return flags_; }
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) {
return Representation::Tagged(); return Representation::Tagged();
} }
...@@ -4127,7 +4118,7 @@ class HFunctionLiteral: public HTemplateInstruction<1> { ...@@ -4127,7 +4118,7 @@ class HFunctionLiteral: public HTemplateInstruction<1> {
HValue* context() { return OperandAt(0); } HValue* context() { return OperandAt(0); }
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) {
return Representation::Tagged(); return Representation::Tagged();
} }
...@@ -4155,7 +4146,7 @@ class HTypeof: public HTemplateInstruction<2> { ...@@ -4155,7 +4146,7 @@ class HTypeof: public HTemplateInstruction<2> {
virtual void PrintDataTo(StringStream* stream); virtual void PrintDataTo(StringStream* stream);
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) {
return Representation::Tagged(); return Representation::Tagged();
} }
...@@ -4173,7 +4164,7 @@ class HToFastProperties: public HUnaryOperation { ...@@ -4173,7 +4164,7 @@ class HToFastProperties: public HUnaryOperation {
set_representation(Representation::Tagged()); set_representation(Representation::Tagged());
} }
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) {
return Representation::Tagged(); return Representation::Tagged();
} }
...@@ -4187,7 +4178,7 @@ class HValueOf: public HUnaryOperation { ...@@ -4187,7 +4178,7 @@ class HValueOf: public HUnaryOperation {
set_representation(Representation::Tagged()); set_representation(Representation::Tagged());
} }
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) {
return Representation::Tagged(); return Representation::Tagged();
} }
...@@ -4203,7 +4194,7 @@ class HDeleteProperty: public HBinaryOperation { ...@@ -4203,7 +4194,7 @@ class HDeleteProperty: public HBinaryOperation {
SetAllSideEffects(); SetAllSideEffects();
} }
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) {
return Representation::Tagged(); return Representation::Tagged();
} }
...@@ -4230,7 +4221,7 @@ class HIn: public HTemplateInstruction<3> { ...@@ -4230,7 +4221,7 @@ class HIn: public HTemplateInstruction<3> {
HValue* key() { return OperandAt(1); } HValue* key() { return OperandAt(1); }
HValue* object() { return OperandAt(2); } HValue* object() { return OperandAt(2); }
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) {
return Representation::Tagged(); return Representation::Tagged();
} }
......
...@@ -1860,7 +1860,7 @@ void HGraph::InsertRepresentationChangeForUse(HValue* value, ...@@ -1860,7 +1860,7 @@ void HGraph::InsertRepresentationChangeForUse(HValue* value,
} }
if (new_value == NULL) { if (new_value == NULL) {
new_value = new(zone()) HChange(value, value->representation(), to, new_value = new(zone()) HChange(value, to,
is_truncating, deoptimize_on_undefined); is_truncating, deoptimize_on_undefined);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment