Remove const qualifier in a few places in the hydrogen IR files.

This is a preparation step for a larger refactoring of the 
hydrogen instructions.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6866 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 01cd1056
...@@ -224,7 +224,7 @@ HType HType::TypeFromValue(Handle<Object> value) { ...@@ -224,7 +224,7 @@ HType HType::TypeFromValue(Handle<Object> value) {
} }
int HValue::LookupOperandIndex(int occurrence_index, HValue* op) const { int HValue::LookupOperandIndex(int occurrence_index, HValue* op) {
for (int i = 0; i < OperandCount(); ++i) { for (int i = 0; i < OperandCount(); ++i) {
if (OperandAt(i) == op) { if (OperandAt(i) == op) {
if (occurrence_index == 0) return i; if (occurrence_index == 0) return i;
...@@ -240,7 +240,7 @@ bool HValue::IsDefinedAfter(HBasicBlock* other) const { ...@@ -240,7 +240,7 @@ bool HValue::IsDefinedAfter(HBasicBlock* other) const {
} }
bool HValue::UsesMultipleTimes(HValue* op) const { bool HValue::UsesMultipleTimes(HValue* op) {
bool seen = false; bool seen = false;
for (int i = 0; i < OperandCount(); ++i) { for (int i = 0; i < OperandCount(); ++i) {
if (OperandAt(i) == op) { if (OperandAt(i) == op) {
...@@ -252,7 +252,7 @@ bool HValue::UsesMultipleTimes(HValue* op) const { ...@@ -252,7 +252,7 @@ bool HValue::UsesMultipleTimes(HValue* op) const {
} }
bool HValue::Equals(HValue* other) const { bool HValue::Equals(HValue* other) {
if (other->opcode() != opcode()) return false; if (other->opcode() != opcode()) return false;
if (!other->representation().Equals(representation())) return false; if (!other->representation().Equals(representation())) return false;
if (!other->type_.Equals(type_)) return false; if (!other->type_.Equals(type_)) return false;
...@@ -267,7 +267,7 @@ bool HValue::Equals(HValue* other) const { ...@@ -267,7 +267,7 @@ bool HValue::Equals(HValue* other) const {
} }
intptr_t HValue::Hashcode() const { intptr_t HValue::Hashcode() {
intptr_t result = opcode(); intptr_t result = opcode();
int count = OperandCount(); int count = OperandCount();
for (int i = 0; i < count; ++i) { for (int i = 0; i < count; ++i) {
...@@ -441,7 +441,7 @@ void HValue::ComputeInitialRange() { ...@@ -441,7 +441,7 @@ void HValue::ComputeInitialRange() {
} }
void HInstruction::PrintTo(StringStream* stream) const { void HInstruction::PrintTo(StringStream* stream) {
stream->Add("%s", Mnemonic()); stream->Add("%s", Mnemonic());
if (HasSideEffects()) stream->Add("*"); if (HasSideEffects()) stream->Add("*");
stream->Add(" "); stream->Add(" ");
...@@ -564,19 +564,19 @@ void HInstruction::Verify() { ...@@ -564,19 +564,19 @@ void HInstruction::Verify() {
#endif #endif
void HCall::PrintDataTo(StringStream* stream) const { void HCall::PrintDataTo(StringStream* stream) {
stream->Add("#%d", argument_count()); stream->Add("#%d", argument_count());
} }
void HUnaryCall::PrintDataTo(StringStream* stream) const { void HUnaryCall::PrintDataTo(StringStream* stream) {
value()->PrintNameTo(stream); value()->PrintNameTo(stream);
stream->Add(" "); stream->Add(" ");
HCall::PrintDataTo(stream); HCall::PrintDataTo(stream);
} }
void HBinaryCall::PrintDataTo(StringStream* stream) const { void HBinaryCall::PrintDataTo(StringStream* stream) {
first()->PrintNameTo(stream); first()->PrintNameTo(stream);
stream->Add(" "); stream->Add(" ");
second()->PrintNameTo(stream); second()->PrintNameTo(stream);
...@@ -585,7 +585,7 @@ void HBinaryCall::PrintDataTo(StringStream* stream) const { ...@@ -585,7 +585,7 @@ void HBinaryCall::PrintDataTo(StringStream* stream) const {
} }
void HCallConstantFunction::PrintDataTo(StringStream* stream) const { void HCallConstantFunction::PrintDataTo(StringStream* stream) {
if (IsApplyFunction()) { if (IsApplyFunction()) {
stream->Add("optimized apply "); stream->Add("optimized apply ");
} else { } else {
...@@ -595,38 +595,38 @@ void HCallConstantFunction::PrintDataTo(StringStream* stream) const { ...@@ -595,38 +595,38 @@ void HCallConstantFunction::PrintDataTo(StringStream* stream) const {
} }
void HCallNamed::PrintDataTo(StringStream* stream) const { void HCallNamed::PrintDataTo(StringStream* stream) {
stream->Add("%o ", *name()); stream->Add("%o ", *name());
HUnaryCall::PrintDataTo(stream); HUnaryCall::PrintDataTo(stream);
} }
void HCallGlobal::PrintDataTo(StringStream* stream) const { void HCallGlobal::PrintDataTo(StringStream* stream) {
stream->Add("%o ", *name()); stream->Add("%o ", *name());
HUnaryCall::PrintDataTo(stream); HUnaryCall::PrintDataTo(stream);
} }
void HCallKnownGlobal::PrintDataTo(StringStream* stream) const { void HCallKnownGlobal::PrintDataTo(StringStream* stream) {
stream->Add("o ", target()->shared()->DebugName()); stream->Add("o ", target()->shared()->DebugName());
HCall::PrintDataTo(stream); HCall::PrintDataTo(stream);
} }
void HCallRuntime::PrintDataTo(StringStream* stream) const { void HCallRuntime::PrintDataTo(StringStream* stream) {
stream->Add("%o ", *name()); stream->Add("%o ", *name());
HCall::PrintDataTo(stream); HCall::PrintDataTo(stream);
} }
void HClassOfTest::PrintDataTo(StringStream* stream) const { void HClassOfTest::PrintDataTo(StringStream* stream) {
stream->Add("class_of_test("); stream->Add("class_of_test(");
value()->PrintNameTo(stream); value()->PrintNameTo(stream);
stream->Add(", \"%o\")", *class_name()); stream->Add(", \"%o\")", *class_name());
} }
void HAccessArgumentsAt::PrintDataTo(StringStream* stream) const { void HAccessArgumentsAt::PrintDataTo(StringStream* stream) {
arguments()->PrintNameTo(stream); arguments()->PrintNameTo(stream);
stream->Add("["); stream->Add("[");
index()->PrintNameTo(stream); index()->PrintNameTo(stream);
...@@ -635,7 +635,7 @@ void HAccessArgumentsAt::PrintDataTo(StringStream* stream) const { ...@@ -635,7 +635,7 @@ void HAccessArgumentsAt::PrintDataTo(StringStream* stream) const {
} }
void HControlInstruction::PrintDataTo(StringStream* stream) const { void HControlInstruction::PrintDataTo(StringStream* stream) {
if (FirstSuccessor() != NULL) { if (FirstSuccessor() != NULL) {
int first_id = FirstSuccessor()->block_id(); int first_id = FirstSuccessor()->block_id();
if (SecondSuccessor() == NULL) { if (SecondSuccessor() == NULL) {
...@@ -648,13 +648,13 @@ void HControlInstruction::PrintDataTo(StringStream* stream) const { ...@@ -648,13 +648,13 @@ void HControlInstruction::PrintDataTo(StringStream* stream) const {
} }
void HUnaryControlInstruction::PrintDataTo(StringStream* stream) const { void HUnaryControlInstruction::PrintDataTo(StringStream* stream) {
value()->PrintNameTo(stream); value()->PrintNameTo(stream);
HControlInstruction::PrintDataTo(stream); HControlInstruction::PrintDataTo(stream);
} }
void HCompareMap::PrintDataTo(StringStream* stream) const { void HCompareMap::PrintDataTo(StringStream* stream) {
value()->PrintNameTo(stream); value()->PrintNameTo(stream);
stream->Add(" (%p)", *map()); stream->Add(" (%p)", *map());
HControlInstruction::PrintDataTo(stream); HControlInstruction::PrintDataTo(stream);
...@@ -682,19 +682,19 @@ const char* HUnaryMathOperation::OpName() const { ...@@ -682,19 +682,19 @@ const char* HUnaryMathOperation::OpName() const {
} }
void HUnaryMathOperation::PrintDataTo(StringStream* stream) const { void HUnaryMathOperation::PrintDataTo(StringStream* stream) {
const char* name = OpName(); const char* name = OpName();
stream->Add("%s ", name); stream->Add("%s ", name);
value()->PrintNameTo(stream); value()->PrintNameTo(stream);
} }
void HUnaryOperation::PrintDataTo(StringStream* stream) const { void HUnaryOperation::PrintDataTo(StringStream* stream) {
value()->PrintNameTo(stream); value()->PrintNameTo(stream);
} }
void HHasInstanceType::PrintDataTo(StringStream* stream) const { void HHasInstanceType::PrintDataTo(StringStream* stream) {
value()->PrintNameTo(stream); value()->PrintNameTo(stream);
switch (from_) { switch (from_) {
case FIRST_JS_OBJECT_TYPE: case FIRST_JS_OBJECT_TYPE:
...@@ -715,14 +715,14 @@ void HHasInstanceType::PrintDataTo(StringStream* stream) const { ...@@ -715,14 +715,14 @@ void HHasInstanceType::PrintDataTo(StringStream* stream) const {
} }
void HTypeofIs::PrintDataTo(StringStream* stream) const { void HTypeofIs::PrintDataTo(StringStream* stream) {
value()->PrintNameTo(stream); value()->PrintNameTo(stream);
stream->Add(" == "); stream->Add(" == ");
stream->Add(type_literal_->ToAsciiVector()); stream->Add(type_literal_->ToAsciiVector());
} }
void HChange::PrintDataTo(StringStream* stream) const { 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());
...@@ -738,26 +738,26 @@ HCheckInstanceType* HCheckInstanceType::NewIsJSObjectOrJSFunction( ...@@ -738,26 +738,26 @@ HCheckInstanceType* HCheckInstanceType::NewIsJSObjectOrJSFunction(
} }
void HCheckMap::PrintDataTo(StringStream* stream) const { void HCheckMap::PrintDataTo(StringStream* stream) {
value()->PrintNameTo(stream); value()->PrintNameTo(stream);
stream->Add(" %p", *map()); stream->Add(" %p", *map());
} }
void HCheckFunction::PrintDataTo(StringStream* stream) const { void HCheckFunction::PrintDataTo(StringStream* stream) {
value()->PrintNameTo(stream); value()->PrintNameTo(stream);
stream->Add(" %p", *target()); stream->Add(" %p", *target());
} }
void HCallStub::PrintDataTo(StringStream* stream) const { void HCallStub::PrintDataTo(StringStream* stream) {
stream->Add("%s ", stream->Add("%s ",
CodeStub::MajorName(major_key_, false)); CodeStub::MajorName(major_key_, false));
HUnaryCall::PrintDataTo(stream); HUnaryCall::PrintDataTo(stream);
} }
void HInstanceOf::PrintDataTo(StringStream* stream) const { void HInstanceOf::PrintDataTo(StringStream* stream) {
left()->PrintNameTo(stream); left()->PrintNameTo(stream);
stream->Add(" "); stream->Add(" ");
right()->PrintNameTo(stream); right()->PrintNameTo(stream);
...@@ -902,7 +902,7 @@ Range* HMod::InferRange() { ...@@ -902,7 +902,7 @@ Range* HMod::InferRange() {
} }
void HPhi::PrintTo(StringStream* stream) const { void HPhi::PrintTo(StringStream* stream) {
stream->Add("["); stream->Add("[");
for (int i = 0; i < OperandCount(); ++i) { for (int i = 0; i < OperandCount(); ++i) {
HValue* value = OperandAt(i); HValue* value = OperandAt(i);
...@@ -980,7 +980,7 @@ void HPhi::AddIndirectUsesTo(int* dest) { ...@@ -980,7 +980,7 @@ void HPhi::AddIndirectUsesTo(int* dest) {
} }
void HSimulate::PrintDataTo(StringStream* stream) const { void HSimulate::PrintDataTo(StringStream* stream) {
stream->Add("id=%d ", ast_id()); stream->Add("id=%d ", ast_id());
if (pop_count_ > 0) stream->Add("pop %d", pop_count_); if (pop_count_ > 0) stream->Add("pop %d", pop_count_);
if (values_.length() > 0) { if (values_.length() > 0) {
...@@ -997,7 +997,7 @@ void HSimulate::PrintDataTo(StringStream* stream) const { ...@@ -997,7 +997,7 @@ void HSimulate::PrintDataTo(StringStream* stream) const {
} }
void HEnterInlined::PrintDataTo(StringStream* stream) const { void HEnterInlined::PrintDataTo(StringStream* stream) {
SmartPointer<char> name = function()->debug_name()->ToCString(); SmartPointer<char> name = function()->debug_name()->ToCString();
stream->Add("%s, id=%d", *name, function()->id()); stream->Add("%s, id=%d", *name, function()->id());
} }
...@@ -1038,7 +1038,7 @@ HConstant* HConstant::CopyToTruncatedInt32() const { ...@@ -1038,7 +1038,7 @@ HConstant* HConstant::CopyToTruncatedInt32() const {
} }
void HConstant::PrintDataTo(StringStream* stream) const { void HConstant::PrintDataTo(StringStream* stream) {
handle()->ShortPrint(stream); handle()->ShortPrint(stream);
} }
...@@ -1048,7 +1048,7 @@ bool HArrayLiteral::IsCopyOnWrite() const { ...@@ -1048,7 +1048,7 @@ bool HArrayLiteral::IsCopyOnWrite() const {
} }
void HBinaryOperation::PrintDataTo(StringStream* stream) const { void HBinaryOperation::PrintDataTo(StringStream* stream) {
left()->PrintNameTo(stream); left()->PrintNameTo(stream);
stream->Add(" "); stream->Add(" ");
right()->PrintNameTo(stream); right()->PrintNameTo(stream);
...@@ -1132,7 +1132,7 @@ Range* HShl::InferRange() { ...@@ -1132,7 +1132,7 @@ Range* HShl::InferRange() {
void HCompare::PrintDataTo(StringStream* stream) const { void HCompare::PrintDataTo(StringStream* stream) {
stream->Add(Token::Name(token())); stream->Add(Token::Name(token()));
stream->Add(" "); stream->Add(" ");
HBinaryOperation::PrintDataTo(stream); HBinaryOperation::PrintDataTo(stream);
...@@ -1151,18 +1151,18 @@ void HCompare::SetInputRepresentation(Representation r) { ...@@ -1151,18 +1151,18 @@ void HCompare::SetInputRepresentation(Representation r) {
} }
void HParameter::PrintDataTo(StringStream* stream) const { void HParameter::PrintDataTo(StringStream* stream) {
stream->Add("%u", index()); stream->Add("%u", index());
} }
void HLoadNamedField::PrintDataTo(StringStream* stream) const { void HLoadNamedField::PrintDataTo(StringStream* stream) {
object()->PrintNameTo(stream); object()->PrintNameTo(stream);
stream->Add(" @%d%s", offset(), is_in_object() ? "[in-object]" : ""); stream->Add(" @%d%s", offset(), is_in_object() ? "[in-object]" : "");
} }
void HLoadKeyed::PrintDataTo(StringStream* stream) const { void HLoadKeyed::PrintDataTo(StringStream* stream) {
object()->PrintNameTo(stream); object()->PrintNameTo(stream);
stream->Add("["); stream->Add("[");
key()->PrintNameTo(stream); key()->PrintNameTo(stream);
...@@ -1170,7 +1170,7 @@ void HLoadKeyed::PrintDataTo(StringStream* stream) const { ...@@ -1170,7 +1170,7 @@ void HLoadKeyed::PrintDataTo(StringStream* stream) const {
} }
void HLoadPixelArrayElement::PrintDataTo(StringStream* stream) const { void HLoadPixelArrayElement::PrintDataTo(StringStream* stream) {
external_pointer()->PrintNameTo(stream); external_pointer()->PrintNameTo(stream);
stream->Add("["); stream->Add("[");
key()->PrintNameTo(stream); key()->PrintNameTo(stream);
...@@ -1178,7 +1178,7 @@ void HLoadPixelArrayElement::PrintDataTo(StringStream* stream) const { ...@@ -1178,7 +1178,7 @@ void HLoadPixelArrayElement::PrintDataTo(StringStream* stream) const {
} }
void HStoreNamed::PrintDataTo(StringStream* stream) const { void HStoreNamed::PrintDataTo(StringStream* stream) {
object()->PrintNameTo(stream); object()->PrintNameTo(stream);
stream->Add("."); stream->Add(".");
ASSERT(name()->IsString()); ASSERT(name()->IsString());
...@@ -1188,7 +1188,7 @@ void HStoreNamed::PrintDataTo(StringStream* stream) const { ...@@ -1188,7 +1188,7 @@ void HStoreNamed::PrintDataTo(StringStream* stream) const {
} }
void HStoreNamedField::PrintDataTo(StringStream* stream) const { void HStoreNamedField::PrintDataTo(StringStream* stream) {
HStoreNamed::PrintDataTo(stream); HStoreNamed::PrintDataTo(stream);
if (!transition().is_null()) { if (!transition().is_null()) {
stream->Add(" (transition map %p)", *transition()); stream->Add(" (transition map %p)", *transition());
...@@ -1196,7 +1196,7 @@ void HStoreNamedField::PrintDataTo(StringStream* stream) const { ...@@ -1196,7 +1196,7 @@ void HStoreNamedField::PrintDataTo(StringStream* stream) const {
} }
void HStoreKeyed::PrintDataTo(StringStream* stream) const { void HStoreKeyed::PrintDataTo(StringStream* stream) {
object()->PrintNameTo(stream); object()->PrintNameTo(stream);
stream->Add("["); stream->Add("[");
key()->PrintNameTo(stream); key()->PrintNameTo(stream);
...@@ -1205,7 +1205,7 @@ void HStoreKeyed::PrintDataTo(StringStream* stream) const { ...@@ -1205,7 +1205,7 @@ void HStoreKeyed::PrintDataTo(StringStream* stream) const {
} }
void HStorePixelArrayElement::PrintDataTo(StringStream* stream) const { void HStorePixelArrayElement::PrintDataTo(StringStream* stream) {
external_pointer()->PrintNameTo(stream); external_pointer()->PrintNameTo(stream);
stream->Add("["); stream->Add("[");
key()->PrintNameTo(stream); key()->PrintNameTo(stream);
...@@ -1214,25 +1214,25 @@ void HStorePixelArrayElement::PrintDataTo(StringStream* stream) const { ...@@ -1214,25 +1214,25 @@ void HStorePixelArrayElement::PrintDataTo(StringStream* stream) const {
} }
void HLoadGlobal::PrintDataTo(StringStream* stream) const { void HLoadGlobal::PrintDataTo(StringStream* stream) {
stream->Add("[%p]", *cell()); stream->Add("[%p]", *cell());
if (check_hole_value()) stream->Add(" (deleteable/read-only)"); if (check_hole_value()) stream->Add(" (deleteable/read-only)");
} }
void HStoreGlobal::PrintDataTo(StringStream* stream) const { void HStoreGlobal::PrintDataTo(StringStream* stream) {
stream->Add("[%p] = ", *cell()); stream->Add("[%p] = ", *cell());
value()->PrintNameTo(stream); value()->PrintNameTo(stream);
} }
void HLoadContextSlot::PrintDataTo(StringStream* stream) const { void HLoadContextSlot::PrintDataTo(StringStream* stream) {
value()->PrintNameTo(stream); value()->PrintNameTo(stream);
stream->Add("[%d]", slot_index()); stream->Add("[%d]", slot_index());
} }
void HStoreContextSlot::PrintDataTo(StringStream* stream) const { void HStoreContextSlot::PrintDataTo(StringStream* stream) {
context()->PrintNameTo(stream); context()->PrintNameTo(stream);
stream->Add("[%d] = ", slot_index()); stream->Add("[%d] = ", slot_index());
value()->PrintNameTo(stream); value()->PrintNameTo(stream);
...@@ -1242,33 +1242,33 @@ void HStoreContextSlot::PrintDataTo(StringStream* stream) const { ...@@ -1242,33 +1242,33 @@ void HStoreContextSlot::PrintDataTo(StringStream* stream) const {
// Implementation of type inference and type conversions. Calculates // Implementation of type inference and type conversions. Calculates
// the inferred type of this instruction based on the input operands. // the inferred type of this instruction based on the input operands.
HType HValue::CalculateInferredType() const { HType HValue::CalculateInferredType() {
return type_; return type_;
} }
HType HCheckMap::CalculateInferredType() const { HType HCheckMap::CalculateInferredType() {
return value()->type(); return value()->type();
} }
HType HCheckFunction::CalculateInferredType() const { HType HCheckFunction::CalculateInferredType() {
return value()->type(); return value()->type();
} }
HType HCheckNonSmi::CalculateInferredType() const { HType HCheckNonSmi::CalculateInferredType() {
// TODO(kasperl): Is there any way to signal that this isn't a smi? // TODO(kasperl): Is there any way to signal that this isn't a smi?
return HType::Tagged(); return HType::Tagged();
} }
HType HCheckSmi::CalculateInferredType() const { HType HCheckSmi::CalculateInferredType() {
return HType::Smi(); return HType::Smi();
} }
HType HPhi::CalculateInferredType() const { HType HPhi::CalculateInferredType() {
HType result = HType::Uninitialized(); HType result = HType::Uninitialized();
for (int i = 0; i < OperandCount(); ++i) { for (int i = 0; i < OperandCount(); ++i) {
HType current = OperandAt(i)->type(); HType current = OperandAt(i)->type();
...@@ -1278,77 +1278,77 @@ HType HPhi::CalculateInferredType() const { ...@@ -1278,77 +1278,77 @@ HType HPhi::CalculateInferredType() const {
} }
HType HConstant::CalculateInferredType() const { HType HConstant::CalculateInferredType() {
return constant_type_; return constant_type_;
} }
HType HCompare::CalculateInferredType() const { HType HCompare::CalculateInferredType() {
return HType::Boolean(); return HType::Boolean();
} }
HType HCompareJSObjectEq::CalculateInferredType() const { HType HCompareJSObjectEq::CalculateInferredType() {
return HType::Boolean(); return HType::Boolean();
} }
HType HUnaryPredicate::CalculateInferredType() const { HType HUnaryPredicate::CalculateInferredType() {
return HType::Boolean(); return HType::Boolean();
} }
HType HBitwiseBinaryOperation::CalculateInferredType() const { HType HBitwiseBinaryOperation::CalculateInferredType() {
return HType::TaggedNumber(); return HType::TaggedNumber();
} }
HType HArithmeticBinaryOperation::CalculateInferredType() const { HType HArithmeticBinaryOperation::CalculateInferredType() {
return HType::TaggedNumber(); return HType::TaggedNumber();
} }
HType HAdd::CalculateInferredType() const { HType HAdd::CalculateInferredType() {
return HType::Tagged(); return HType::Tagged();
} }
HType HBitAnd::CalculateInferredType() const { HType HBitAnd::CalculateInferredType() {
return HType::TaggedNumber(); return HType::TaggedNumber();
} }
HType HBitXor::CalculateInferredType() const { HType HBitXor::CalculateInferredType() {
return HType::TaggedNumber(); return HType::TaggedNumber();
} }
HType HBitOr::CalculateInferredType() const { HType HBitOr::CalculateInferredType() {
return HType::TaggedNumber(); return HType::TaggedNumber();
} }
HType HBitNot::CalculateInferredType() const { HType HBitNot::CalculateInferredType() {
return HType::TaggedNumber(); return HType::TaggedNumber();
} }
HType HUnaryMathOperation::CalculateInferredType() const { HType HUnaryMathOperation::CalculateInferredType() {
return HType::TaggedNumber(); return HType::TaggedNumber();
} }
HType HShl::CalculateInferredType() const { HType HShl::CalculateInferredType() {
return HType::TaggedNumber(); return HType::TaggedNumber();
} }
HType HShr::CalculateInferredType() const { HType HShr::CalculateInferredType() {
return HType::TaggedNumber(); return HType::TaggedNumber();
} }
HType HSar::CalculateInferredType() const { HType HSar::CalculateInferredType() {
return HType::TaggedNumber(); return HType::TaggedNumber();
} }
......
...@@ -309,7 +309,7 @@ class Representation { ...@@ -309,7 +309,7 @@ class Representation {
static Representation Double() { return Representation(kDouble); } static Representation Double() { return Representation(kDouble); }
static Representation External() { return Representation(kExternal); } static Representation External() { return Representation(kExternal); }
bool Equals(const Representation& other) const { bool Equals(const Representation& other) {
return kind_ == other.kind_; return kind_ == other.kind_;
} }
...@@ -544,15 +544,15 @@ class HValue: public ZoneObject { ...@@ -544,15 +544,15 @@ class HValue: public ZoneObject {
bool IsDefinedAfter(HBasicBlock* other) const; bool IsDefinedAfter(HBasicBlock* other) const;
// Operands. // Operands.
virtual int OperandCount() const { return 0; } virtual int OperandCount() { return 0; }
virtual HValue* OperandAt(int index) const { virtual HValue* OperandAt(int index) {
UNREACHABLE(); UNREACHABLE();
return NULL; return NULL;
} }
void SetOperandAt(int index, HValue* value); void SetOperandAt(int index, HValue* value);
int LookupOperandIndex(int occurrence_index, HValue* op) const; int LookupOperandIndex(int occurrence_index, HValue* op);
bool UsesMultipleTimes(HValue* op) const; bool UsesMultipleTimes(HValue* op);
void ReplaceAndDelete(HValue* other); void ReplaceAndDelete(HValue* other);
void ReplaceValue(HValue* other); void ReplaceValue(HValue* other);
...@@ -581,7 +581,7 @@ class HValue: public ZoneObject { ...@@ -581,7 +581,7 @@ class HValue: public ZoneObject {
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) const {
return Representation::None(); return Representation::None();
} }
virtual Representation InferredRepresentation() const { virtual Representation InferredRepresentation() {
return representation(); return representation();
} }
...@@ -596,11 +596,11 @@ class HValue: public ZoneObject { ...@@ -596,11 +596,11 @@ class HValue: public ZoneObject {
HYDROGEN_ALL_INSTRUCTION_LIST(DECLARE_DO) HYDROGEN_ALL_INSTRUCTION_LIST(DECLARE_DO)
#undef DECLARE_DO #undef DECLARE_DO
bool Equals(HValue* other) const; bool Equals(HValue* other);
virtual intptr_t Hashcode() const; virtual intptr_t Hashcode();
// Printing support. // Printing support.
virtual void PrintTo(StringStream* stream) const = 0; virtual void PrintTo(StringStream* stream) = 0;
void PrintNameTo(StringStream* stream); void PrintNameTo(StringStream* stream);
static void PrintTypeTo(HType type, StringStream* stream); static void PrintTypeTo(HType type, StringStream* stream);
...@@ -611,7 +611,7 @@ class HValue: public ZoneObject { ...@@ -611,7 +611,7 @@ class HValue: public ZoneObject {
// it has changed. // it has changed.
bool UpdateInferredType(); bool UpdateInferredType();
virtual HType CalculateInferredType() const; virtual HType CalculateInferredType();
#ifdef DEBUG #ifdef DEBUG
virtual void Verify() = 0; virtual void Verify() = 0;
...@@ -620,7 +620,7 @@ class HValue: public ZoneObject { ...@@ -620,7 +620,7 @@ class HValue: public ZoneObject {
protected: protected:
// This function must be overridden for instructions with flag kUseGVN, to // This function must be overridden for instructions with flag kUseGVN, to
// compare the non-Operand parts of the instruction. // compare the non-Operand parts of the instruction.
virtual bool DataEquals(HValue* other) const { virtual bool DataEquals(HValue* other) {
UNREACHABLE(); UNREACHABLE();
return false; return false;
} }
...@@ -669,8 +669,8 @@ class HInstruction: public HValue { ...@@ -669,8 +669,8 @@ class HInstruction: public HValue {
HInstruction* next() const { return next_; } HInstruction* next() const { return next_; }
HInstruction* previous() const { return previous_; } HInstruction* previous() const { return previous_; }
void PrintTo(StringStream* stream) const; virtual void PrintTo(StringStream* stream);
virtual void PrintDataTo(StringStream* stream) const {} virtual void PrintDataTo(StringStream* stream) { }
bool IsLinked() const { return block() != NULL; } bool IsLinked() const { return block() != NULL; }
void Unlink(); void Unlink();
...@@ -732,7 +732,7 @@ class HControlInstruction: public HInstruction { ...@@ -732,7 +732,7 @@ class HControlInstruction: public HInstruction {
HBasicBlock* FirstSuccessor() const { return first_successor_; } HBasicBlock* FirstSuccessor() const { return first_successor_; }
HBasicBlock* SecondSuccessor() const { return second_successor_; } HBasicBlock* SecondSuccessor() const { return second_successor_; }
virtual void PrintDataTo(StringStream* stream) const; virtual void PrintDataTo(StringStream* stream);
DECLARE_INSTRUCTION(ControlInstruction) DECLARE_INSTRUCTION(ControlInstruction)
...@@ -781,7 +781,7 @@ class HUnaryControlInstruction: public HControlInstruction { ...@@ -781,7 +781,7 @@ class HUnaryControlInstruction: public HControlInstruction {
return Representation::Tagged(); return Representation::Tagged();
} }
virtual void PrintDataTo(StringStream* stream) const; virtual void PrintDataTo(StringStream* stream);
HValue* value() const { return OperandAt(0); } HValue* value() const { return OperandAt(0); }
virtual int OperandCount() const { return 1; } virtual int OperandCount() const { return 1; }
...@@ -827,7 +827,7 @@ class HCompareMap: public HUnaryControlInstruction { ...@@ -827,7 +827,7 @@ class HCompareMap: public HUnaryControlInstruction {
ASSERT(!map.is_null()); ASSERT(!map.is_null());
} }
virtual void PrintDataTo(StringStream* stream) const; virtual void PrintDataTo(StringStream* stream);
Handle<Map> map() const { return map_; } Handle<Map> map() const { return map_; }
...@@ -863,7 +863,7 @@ class HUnaryOperation: public HInstruction { ...@@ -863,7 +863,7 @@ class HUnaryOperation: public HInstruction {
} }
HValue* value() const { return OperandAt(0); } HValue* value() const { return OperandAt(0); }
virtual void PrintDataTo(StringStream* stream) const; virtual void PrintDataTo(StringStream* stream);
virtual int OperandCount() const { return 1; } virtual int OperandCount() const { return 1; }
virtual HValue* OperandAt(int index) const { return operands_[index]; } virtual HValue* OperandAt(int index) const { return operands_[index]; }
...@@ -925,13 +925,13 @@ class HChange: public HUnaryOperation { ...@@ -925,13 +925,13 @@ class HChange: public HUnaryOperation {
return true; return true;
} }
virtual void PrintDataTo(StringStream* stream) const; virtual void PrintDataTo(StringStream* stream);
DECLARE_CONCRETE_INSTRUCTION(Change, DECLARE_CONCRETE_INSTRUCTION(Change,
CanTruncateToInt32() ? "truncate" : "change") CanTruncateToInt32() ? "truncate" : "change")
protected: protected:
virtual bool DataEquals(HValue* other) const { virtual bool DataEquals(HValue* other) {
if (!other->IsChange()) return false; if (!other->IsChange()) return false;
HChange* change = HChange::cast(other); HChange* change = HChange::cast(other);
return value() == change->value() return value() == change->value()
...@@ -955,7 +955,7 @@ class HSimulate: public HInstruction { ...@@ -955,7 +955,7 @@ class HSimulate: public HInstruction {
assigned_indexes_(2) {} assigned_indexes_(2) {}
virtual ~HSimulate() {} virtual ~HSimulate() {}
virtual void PrintDataTo(StringStream* stream) const; virtual void PrintDataTo(StringStream* stream);
bool HasAstId() const { return ast_id_ != AstNode::kNoNumber; } bool HasAstId() const { return ast_id_ != AstNode::kNoNumber; }
int ast_id() const { return ast_id_; } int ast_id() const { return ast_id_; }
...@@ -1026,7 +1026,7 @@ class HEnterInlined: public HInstruction { ...@@ -1026,7 +1026,7 @@ class HEnterInlined: public HInstruction {
: closure_(closure), function_(function) { : closure_(closure), function_(function) {
} }
virtual void PrintDataTo(StringStream* stream) const; virtual void PrintDataTo(StringStream* stream);
Handle<JSFunction> closure() const { return closure_; } Handle<JSFunction> closure() const { return closure_; }
FunctionLiteral* function() const { return function_; } FunctionLiteral* function() const { return function_; }
...@@ -1071,7 +1071,7 @@ class HContext: public HInstruction { ...@@ -1071,7 +1071,7 @@ class HContext: public HInstruction {
DECLARE_CONCRETE_INSTRUCTION(Context, "context"); DECLARE_CONCRETE_INSTRUCTION(Context, "context");
protected: protected:
virtual bool DataEquals(HValue* other) const { return true; } virtual bool DataEquals(HValue* other) { return true; }
}; };
...@@ -1085,7 +1085,7 @@ class HOuterContext: public HUnaryOperation { ...@@ -1085,7 +1085,7 @@ class HOuterContext: public HUnaryOperation {
DECLARE_CONCRETE_INSTRUCTION(OuterContext, "outer_context"); DECLARE_CONCRETE_INSTRUCTION(OuterContext, "outer_context");
protected: protected:
virtual bool DataEquals(HValue* other) const { return true; } virtual bool DataEquals(HValue* other) { return true; }
}; };
...@@ -1099,7 +1099,7 @@ class HGlobalObject: public HUnaryOperation { ...@@ -1099,7 +1099,7 @@ class HGlobalObject: public HUnaryOperation {
DECLARE_CONCRETE_INSTRUCTION(GlobalObject, "global_object") DECLARE_CONCRETE_INSTRUCTION(GlobalObject, "global_object")
protected: protected:
virtual bool DataEquals(HValue* other) const { return true; } virtual bool DataEquals(HValue* other) { return true; }
}; };
...@@ -1114,7 +1114,7 @@ class HGlobalReceiver: public HUnaryOperation { ...@@ -1114,7 +1114,7 @@ class HGlobalReceiver: public HUnaryOperation {
DECLARE_CONCRETE_INSTRUCTION(GlobalReceiver, "global_receiver") DECLARE_CONCRETE_INSTRUCTION(GlobalReceiver, "global_receiver")
protected: protected:
virtual bool DataEquals(HValue* other) const { return true; } virtual bool DataEquals(HValue* other) { return true; }
}; };
...@@ -1126,11 +1126,11 @@ class HCall: public HInstruction { ...@@ -1126,11 +1126,11 @@ class HCall: public HInstruction {
SetAllSideEffects(); SetAllSideEffects();
} }
virtual HType CalculateInferredType() const { return HType::Tagged(); } virtual HType CalculateInferredType() { return HType::Tagged(); }
virtual int argument_count() const { return argument_count_; } virtual int argument_count() const { return argument_count_; }
virtual void PrintDataTo(StringStream* stream) const; virtual void PrintDataTo(StringStream* stream);
DECLARE_INSTRUCTION(Call) DECLARE_INSTRUCTION(Call)
...@@ -1146,7 +1146,7 @@ class HUnaryCall: public HCall { ...@@ -1146,7 +1146,7 @@ class HUnaryCall: public HCall {
SetOperandAt(0, value); SetOperandAt(0, value);
} }
virtual void PrintDataTo(StringStream* stream) const; virtual void PrintDataTo(StringStream* stream);
HValue* value() const { return value_; } HValue* value() const { return value_; }
...@@ -1177,7 +1177,7 @@ class HBinaryCall: public HCall { ...@@ -1177,7 +1177,7 @@ class HBinaryCall: public HCall {
SetOperandAt(1, second); SetOperandAt(1, second);
} }
virtual void PrintDataTo(StringStream* stream) const; virtual void PrintDataTo(StringStream* stream);
HValue* first() const { return operands_[0]; } HValue* first() const { return operands_[0]; }
HValue* second() const { return operands_[1]; } HValue* second() const { return operands_[1]; }
...@@ -1208,7 +1208,7 @@ class HCallConstantFunction: public HCall { ...@@ -1208,7 +1208,7 @@ class HCallConstantFunction: public HCall {
return function_->code() == Builtins::builtin(Builtins::FunctionApply); return function_->code() == Builtins::builtin(Builtins::FunctionApply);
} }
virtual void PrintDataTo(StringStream* stream) const; virtual void PrintDataTo(StringStream* stream);
DECLARE_CONCRETE_INSTRUCTION(CallConstantFunction, "call_constant_function") DECLARE_CONCRETE_INSTRUCTION(CallConstantFunction, "call_constant_function")
...@@ -1240,7 +1240,7 @@ class HCallNamed: public HUnaryCall { ...@@ -1240,7 +1240,7 @@ class HCallNamed: public HUnaryCall {
: HUnaryCall(context, argument_count), name_(name) { : HUnaryCall(context, argument_count), name_(name) {
} }
virtual void PrintDataTo(StringStream* stream) const; virtual void PrintDataTo(StringStream* stream);
HValue* context() const { return value(); } HValue* context() const { return value(); }
Handle<String> name() const { return name_; } Handle<String> name() const { return name_; }
...@@ -1270,7 +1270,7 @@ class HCallGlobal: public HUnaryCall { ...@@ -1270,7 +1270,7 @@ class HCallGlobal: public HUnaryCall {
: HUnaryCall(context, argument_count), name_(name) { : HUnaryCall(context, argument_count), name_(name) {
} }
virtual void PrintDataTo(StringStream* stream) const; virtual void PrintDataTo(StringStream* stream);
HValue* context() const { return value(); } HValue* context() const { return value(); }
Handle<String> name() const { return name_; } Handle<String> name() const { return name_; }
...@@ -1287,7 +1287,7 @@ class HCallKnownGlobal: public HCall { ...@@ -1287,7 +1287,7 @@ class HCallKnownGlobal: public HCall {
HCallKnownGlobal(Handle<JSFunction> target, int argument_count) HCallKnownGlobal(Handle<JSFunction> target, int argument_count)
: HCall(argument_count), target_(target) { } : HCall(argument_count), target_(target) { }
virtual void PrintDataTo(StringStream* stream) const; virtual void PrintDataTo(StringStream* stream);
Handle<JSFunction> target() const { return target_; } Handle<JSFunction> target() const { return target_; }
...@@ -1321,7 +1321,7 @@ class HCallRuntime: public HCall { ...@@ -1321,7 +1321,7 @@ class HCallRuntime: public HCall {
Runtime::Function* c_function, Runtime::Function* c_function,
int argument_count) int argument_count)
: HCall(argument_count), c_function_(c_function), name_(name) { } : HCall(argument_count), c_function_(c_function), name_(name) { }
virtual void PrintDataTo(StringStream* stream) const; virtual void PrintDataTo(StringStream* stream);
Runtime::Function* function() const { return c_function_; } Runtime::Function* function() const { return c_function_; }
Handle<String> name() const { return name_; } Handle<String> name() const { return name_; }
...@@ -1352,7 +1352,7 @@ class HJSArrayLength: public HUnaryOperation { ...@@ -1352,7 +1352,7 @@ class HJSArrayLength: public HUnaryOperation {
DECLARE_CONCRETE_INSTRUCTION(JSArrayLength, "js_array_length") DECLARE_CONCRETE_INSTRUCTION(JSArrayLength, "js_array_length")
protected: protected:
virtual bool DataEquals(HValue* other) const { return true; } virtual bool DataEquals(HValue* other) { return true; }
}; };
...@@ -1371,7 +1371,7 @@ class HFixedArrayLength: public HUnaryOperation { ...@@ -1371,7 +1371,7 @@ class HFixedArrayLength: public HUnaryOperation {
DECLARE_CONCRETE_INSTRUCTION(FixedArrayLength, "fixed_array_length") DECLARE_CONCRETE_INSTRUCTION(FixedArrayLength, "fixed_array_length")
protected: protected:
virtual bool DataEquals(HValue* other) const { return true; } virtual bool DataEquals(HValue* other) { return true; }
}; };
...@@ -1392,7 +1392,7 @@ class HPixelArrayLength: public HUnaryOperation { ...@@ -1392,7 +1392,7 @@ class HPixelArrayLength: public HUnaryOperation {
DECLARE_CONCRETE_INSTRUCTION(PixelArrayLength, "pixel_array_length") DECLARE_CONCRETE_INSTRUCTION(PixelArrayLength, "pixel_array_length")
protected: protected:
virtual bool DataEquals(HValue* other) const { return true; } virtual bool DataEquals(HValue* other) { return true; }
}; };
...@@ -1407,12 +1407,12 @@ class HBitNot: public HUnaryOperation { ...@@ -1407,12 +1407,12 @@ class HBitNot: public HUnaryOperation {
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) const {
return Representation::Integer32(); return Representation::Integer32();
} }
virtual HType CalculateInferredType() const; virtual HType CalculateInferredType();
DECLARE_CONCRETE_INSTRUCTION(BitNot, "bit_not") DECLARE_CONCRETE_INSTRUCTION(BitNot, "bit_not")
protected: protected:
virtual bool DataEquals(HValue* other) const { return true; } virtual bool DataEquals(HValue* other) { return true; }
}; };
...@@ -1443,9 +1443,9 @@ class HUnaryMathOperation: public HUnaryOperation { ...@@ -1443,9 +1443,9 @@ class HUnaryMathOperation: public HUnaryOperation {
SetFlag(kUseGVN); SetFlag(kUseGVN);
} }
virtual void PrintDataTo(StringStream* stream) const; virtual void PrintDataTo(StringStream* stream);
virtual HType CalculateInferredType() const; virtual HType CalculateInferredType();
virtual HValue* EnsureAndPropagateNotMinusZero(BitVector* visited); virtual HValue* EnsureAndPropagateNotMinusZero(BitVector* visited);
...@@ -1485,7 +1485,7 @@ class HUnaryMathOperation: public HUnaryOperation { ...@@ -1485,7 +1485,7 @@ class HUnaryMathOperation: public HUnaryOperation {
DECLARE_CONCRETE_INSTRUCTION(UnaryMathOperation, "unary_math_operation") DECLARE_CONCRETE_INSTRUCTION(UnaryMathOperation, "unary_math_operation")
protected: protected:
virtual bool DataEquals(HValue* other) const { virtual bool DataEquals(HValue* other) {
HUnaryMathOperation* b = HUnaryMathOperation::cast(other); HUnaryMathOperation* b = HUnaryMathOperation::cast(other);
return op_ == b->op(); return op_ == b->op();
} }
...@@ -1510,7 +1510,7 @@ class HLoadElements: public HUnaryOperation { ...@@ -1510,7 +1510,7 @@ class HLoadElements: public HUnaryOperation {
DECLARE_CONCRETE_INSTRUCTION(LoadElements, "load-elements") DECLARE_CONCRETE_INSTRUCTION(LoadElements, "load-elements")
protected: protected:
virtual bool DataEquals(HValue* other) const { return true; } virtual bool DataEquals(HValue* other) { return true; }
}; };
...@@ -1534,7 +1534,7 @@ class HLoadPixelArrayExternalPointer: public HUnaryOperation { ...@@ -1534,7 +1534,7 @@ class HLoadPixelArrayExternalPointer: public HUnaryOperation {
"load-pixel-array-external-pointer") "load-pixel-array-external-pointer")
protected: protected:
virtual bool DataEquals(HValue* other) const { return true; } virtual bool DataEquals(HValue* other) { return true; }
}; };
...@@ -1552,8 +1552,8 @@ class HCheckMap: public HUnaryOperation { ...@@ -1552,8 +1552,8 @@ class HCheckMap: public HUnaryOperation {
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) const {
return Representation::Tagged(); return Representation::Tagged();
} }
virtual void PrintDataTo(StringStream* stream) const; virtual void PrintDataTo(StringStream* stream);
virtual HType CalculateInferredType() const; virtual HType CalculateInferredType();
#ifdef DEBUG #ifdef DEBUG
virtual void Verify(); virtual void Verify();
...@@ -1564,7 +1564,7 @@ class HCheckMap: public HUnaryOperation { ...@@ -1564,7 +1564,7 @@ class HCheckMap: public HUnaryOperation {
DECLARE_CONCRETE_INSTRUCTION(CheckMap, "check_map") DECLARE_CONCRETE_INSTRUCTION(CheckMap, "check_map")
protected: protected:
virtual bool DataEquals(HValue* other) const { virtual bool DataEquals(HValue* other) {
HCheckMap* b = HCheckMap::cast(other); HCheckMap* b = HCheckMap::cast(other);
return map_.is_identical_to(b->map()); return map_.is_identical_to(b->map());
} }
...@@ -1587,8 +1587,8 @@ class HCheckFunction: public HUnaryOperation { ...@@ -1587,8 +1587,8 @@ class HCheckFunction: public HUnaryOperation {
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) const {
return Representation::Tagged(); return Representation::Tagged();
} }
virtual void PrintDataTo(StringStream* stream) const; virtual void PrintDataTo(StringStream* stream);
virtual HType CalculateInferredType() const; virtual HType CalculateInferredType();
#ifdef DEBUG #ifdef DEBUG
virtual void Verify(); virtual void Verify();
...@@ -1599,7 +1599,7 @@ class HCheckFunction: public HUnaryOperation { ...@@ -1599,7 +1599,7 @@ class HCheckFunction: public HUnaryOperation {
DECLARE_CONCRETE_INSTRUCTION(CheckFunction, "check_function") DECLARE_CONCRETE_INSTRUCTION(CheckFunction, "check_function")
protected: protected:
virtual bool DataEquals(HValue* other) const { virtual bool DataEquals(HValue* other) {
HCheckFunction* b = HCheckFunction::cast(other); HCheckFunction* b = HCheckFunction::cast(other);
return target_.is_identical_to(b->target()); return target_.is_identical_to(b->target());
} }
...@@ -1647,7 +1647,7 @@ class HCheckInstanceType: public HUnaryOperation { ...@@ -1647,7 +1647,7 @@ class HCheckInstanceType: public HUnaryOperation {
// TODO(ager): It could be nice to allow the ommision of instance // TODO(ager): It could be nice to allow the ommision of instance
// type checks if we have already performed an instance type check // type checks if we have already performed an instance type check
// with a larger range. // with a larger range.
virtual bool DataEquals(HValue* other) const { virtual bool DataEquals(HValue* other) {
HCheckInstanceType* b = HCheckInstanceType::cast(other); HCheckInstanceType* b = HCheckInstanceType::cast(other);
return (first_ == b->first()) && (last_ == b->last()); return (first_ == b->first()) && (last_ == b->last());
} }
...@@ -1671,7 +1671,7 @@ class HCheckNonSmi: public HUnaryOperation { ...@@ -1671,7 +1671,7 @@ class HCheckNonSmi: public HUnaryOperation {
return Representation::Tagged(); return Representation::Tagged();
} }
virtual HType CalculateInferredType() const; virtual HType CalculateInferredType();
#ifdef DEBUG #ifdef DEBUG
virtual void Verify(); virtual void Verify();
...@@ -1680,7 +1680,7 @@ class HCheckNonSmi: public HUnaryOperation { ...@@ -1680,7 +1680,7 @@ class HCheckNonSmi: public HUnaryOperation {
DECLARE_CONCRETE_INSTRUCTION(CheckNonSmi, "check_non_smi") DECLARE_CONCRETE_INSTRUCTION(CheckNonSmi, "check_non_smi")
protected: protected:
virtual bool DataEquals(HValue* other) const { return true; } virtual bool DataEquals(HValue* other) { return true; }
}; };
...@@ -1703,7 +1703,7 @@ class HCheckPrototypeMaps: public HInstruction { ...@@ -1703,7 +1703,7 @@ class HCheckPrototypeMaps: public HInstruction {
DECLARE_CONCRETE_INSTRUCTION(CheckPrototypeMaps, "check_prototype_maps") DECLARE_CONCRETE_INSTRUCTION(CheckPrototypeMaps, "check_prototype_maps")
virtual intptr_t Hashcode() const { virtual intptr_t Hashcode() {
ASSERT(!Heap::IsAllocationAllowed()); ASSERT(!Heap::IsAllocationAllowed());
intptr_t hash = reinterpret_cast<intptr_t>(*prototype()); intptr_t hash = reinterpret_cast<intptr_t>(*prototype());
hash = 17 * hash + reinterpret_cast<intptr_t>(*holder()); hash = 17 * hash + reinterpret_cast<intptr_t>(*holder());
...@@ -1711,7 +1711,7 @@ class HCheckPrototypeMaps: public HInstruction { ...@@ -1711,7 +1711,7 @@ class HCheckPrototypeMaps: public HInstruction {
} }
protected: protected:
virtual bool DataEquals(HValue* other) const { virtual bool DataEquals(HValue* other) {
HCheckPrototypeMaps* b = HCheckPrototypeMaps::cast(other); HCheckPrototypeMaps* b = HCheckPrototypeMaps::cast(other);
return prototype_.is_identical_to(b->prototype()) && return prototype_.is_identical_to(b->prototype()) &&
holder_.is_identical_to(b->holder()); holder_.is_identical_to(b->holder());
...@@ -1735,7 +1735,7 @@ class HCheckSmi: public HUnaryOperation { ...@@ -1735,7 +1735,7 @@ class HCheckSmi: public HUnaryOperation {
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) const {
return Representation::Tagged(); return Representation::Tagged();
} }
virtual HType CalculateInferredType() const; virtual HType CalculateInferredType();
#ifdef DEBUG #ifdef DEBUG
virtual void Verify(); virtual void Verify();
...@@ -1744,7 +1744,7 @@ class HCheckSmi: public HUnaryOperation { ...@@ -1744,7 +1744,7 @@ class HCheckSmi: public HUnaryOperation {
DECLARE_CONCRETE_INSTRUCTION(CheckSmi, "check_smi") DECLARE_CONCRETE_INSTRUCTION(CheckSmi, "check_smi")
protected: protected:
virtual bool DataEquals(HValue* other) const { return true; } virtual bool DataEquals(HValue* other) { return true; }
}; };
...@@ -1763,7 +1763,7 @@ class HPhi: public HValue { ...@@ -1763,7 +1763,7 @@ class HPhi: public HValue {
SetFlag(kFlexibleRepresentation); SetFlag(kFlexibleRepresentation);
} }
virtual Representation InferredRepresentation() const { virtual Representation InferredRepresentation() {
bool double_occurred = false; bool double_occurred = false;
bool int32_occurred = false; bool int32_occurred = false;
for (int i = 0; i < OperandCount(); ++i) { for (int i = 0; i < OperandCount(); ++i) {
...@@ -1782,7 +1782,7 @@ class HPhi: public HValue { ...@@ -1782,7 +1782,7 @@ class HPhi: public HValue {
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) const {
return representation(); return representation();
} }
virtual HType CalculateInferredType() const; virtual HType CalculateInferredType();
virtual int OperandCount() const { return inputs_.length(); } virtual int OperandCount() const { return inputs_.length(); }
virtual HValue* OperandAt(int index) const { return inputs_[index]; } virtual HValue* OperandAt(int index) const { return inputs_[index]; }
HValue* GetRedundantReplacement() const; HValue* GetRedundantReplacement() const;
...@@ -1794,7 +1794,7 @@ class HPhi: public HValue { ...@@ -1794,7 +1794,7 @@ class HPhi: public HValue {
virtual const char* Mnemonic() const { return "phi"; } virtual const char* Mnemonic() const { return "phi"; }
virtual void PrintTo(StringStream* stream) const; virtual void PrintTo(StringStream* stream);
#ifdef DEBUG #ifdef DEBUG
virtual void Verify(); virtual void Verify();
...@@ -1862,8 +1862,8 @@ class HConstant: public HInstruction { ...@@ -1862,8 +1862,8 @@ class HConstant: public HInstruction {
bool InOldSpace() const { return !Heap::InNewSpace(*handle_); } bool InOldSpace() const { return !Heap::InNewSpace(*handle_); }
virtual bool EmitAtUses() const { return !representation().IsDouble(); } virtual bool EmitAtUses() const { return !representation().IsDouble(); }
virtual void PrintDataTo(StringStream* stream) const; virtual void PrintDataTo(StringStream* stream);
virtual HType CalculateInferredType() const; virtual HType CalculateInferredType();
bool IsInteger() const { return handle_->IsSmi(); } bool IsInteger() const { return handle_->IsSmi(); }
HConstant* CopyToRepresentation(Representation r) const; HConstant* CopyToRepresentation(Representation r) const;
HConstant* CopyToTruncatedInt32() const; HConstant* CopyToTruncatedInt32() const;
...@@ -1879,7 +1879,7 @@ class HConstant: public HInstruction { ...@@ -1879,7 +1879,7 @@ class HConstant: public HInstruction {
} }
bool HasStringValue() const { return handle_->IsString(); } bool HasStringValue() const { return handle_->IsString(); }
virtual intptr_t Hashcode() const { virtual intptr_t Hashcode() {
ASSERT(!Heap::allow_allocation(false)); ASSERT(!Heap::allow_allocation(false));
return reinterpret_cast<intptr_t>(*handle()); return reinterpret_cast<intptr_t>(*handle());
} }
...@@ -1893,7 +1893,7 @@ class HConstant: public HInstruction { ...@@ -1893,7 +1893,7 @@ class HConstant: public HInstruction {
protected: protected:
virtual Range* InferRange(); virtual Range* InferRange();
virtual bool DataEquals(HValue* other) const { virtual bool DataEquals(HValue* other) {
HConstant* other_constant = HConstant::cast(other); HConstant* other_constant = HConstant::cast(other);
return handle().is_identical_to(other_constant->handle()); return handle().is_identical_to(other_constant->handle());
} }
...@@ -1936,7 +1936,7 @@ class HBinaryOperation: public HInstruction { ...@@ -1936,7 +1936,7 @@ class HBinaryOperation: public HInstruction {
virtual bool IsCommutative() const { return false; } virtual bool IsCommutative() const { return false; }
virtual void PrintDataTo(StringStream* stream) const; virtual void PrintDataTo(StringStream* stream);
virtual int OperandCount() const { return operands_.length(); } virtual int OperandCount() const { return operands_.length(); }
virtual HValue* OperandAt(int index) const { return operands_[index]; } virtual HValue* OperandAt(int index) const { return operands_[index]; }
...@@ -2004,7 +2004,7 @@ class HArgumentsElements: public HInstruction { ...@@ -2004,7 +2004,7 @@ class HArgumentsElements: public HInstruction {
DECLARE_CONCRETE_INSTRUCTION(ArgumentsElements, "arguments_elements") DECLARE_CONCRETE_INSTRUCTION(ArgumentsElements, "arguments_elements")
protected: protected:
virtual bool DataEquals(HValue* other) const { return true; } virtual bool DataEquals(HValue* other) { return true; }
}; };
...@@ -2018,7 +2018,7 @@ class HArgumentsLength: public HUnaryOperation { ...@@ -2018,7 +2018,7 @@ class HArgumentsLength: public HUnaryOperation {
DECLARE_CONCRETE_INSTRUCTION(ArgumentsLength, "arguments_length") DECLARE_CONCRETE_INSTRUCTION(ArgumentsLength, "arguments_length")
protected: protected:
virtual bool DataEquals(HValue* other) const { return true; } virtual bool DataEquals(HValue* other) { return true; }
}; };
...@@ -2032,7 +2032,7 @@ class HAccessArgumentsAt: public HInstruction { ...@@ -2032,7 +2032,7 @@ class HAccessArgumentsAt: public HInstruction {
SetOperandAt(2, index); SetOperandAt(2, index);
} }
virtual void PrintDataTo(StringStream* stream) const; virtual void PrintDataTo(StringStream* stream);
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) const {
// The arguments elements is considered tagged. // The arguments elements is considered tagged.
...@@ -2055,7 +2055,7 @@ class HAccessArgumentsAt: public HInstruction { ...@@ -2055,7 +2055,7 @@ class HAccessArgumentsAt: public HInstruction {
operands_[index] = value; operands_[index] = value;
} }
virtual bool DataEquals(HValue* other) const { return true; } virtual bool DataEquals(HValue* other) { return true; }
private: private:
HOperandVector<3> operands_; HOperandVector<3> operands_;
...@@ -2085,7 +2085,7 @@ class HBoundsCheck: public HBinaryOperation { ...@@ -2085,7 +2085,7 @@ class HBoundsCheck: public HBinaryOperation {
DECLARE_CONCRETE_INSTRUCTION(BoundsCheck, "bounds_check") DECLARE_CONCRETE_INSTRUCTION(BoundsCheck, "bounds_check")
protected: protected:
virtual bool DataEquals(HValue* other) const { return true; } virtual bool DataEquals(HValue* other) { return true; }
}; };
...@@ -2111,7 +2111,7 @@ class HBitwiseBinaryOperation: public HBinaryOperation { ...@@ -2111,7 +2111,7 @@ class HBitwiseBinaryOperation: public HBinaryOperation {
} }
} }
HType CalculateInferredType() const; virtual HType CalculateInferredType();
DECLARE_INSTRUCTION(BitwiseBinaryOperation) DECLARE_INSTRUCTION(BitwiseBinaryOperation)
}; };
...@@ -2133,11 +2133,11 @@ class HArithmeticBinaryOperation: public HBinaryOperation { ...@@ -2133,11 +2133,11 @@ class HArithmeticBinaryOperation: public HBinaryOperation {
} }
} }
virtual HType CalculateInferredType() const; virtual HType CalculateInferredType();
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) const {
return representation(); return representation();
} }
virtual Representation InferredRepresentation() const { virtual Representation InferredRepresentation() {
if (left()->representation().Equals(right()->representation())) { if (left()->representation().Equals(right()->representation())) {
return left()->representation(); return left()->representation();
} }
...@@ -2170,18 +2170,18 @@ class HCompare: public HBinaryOperation { ...@@ -2170,18 +2170,18 @@ class HCompare: public HBinaryOperation {
return input_representation_; return input_representation_;
} }
Token::Value token() const { return token_; } Token::Value token() const { return token_; }
virtual void PrintDataTo(StringStream* stream) const; virtual void PrintDataTo(StringStream* stream);
virtual HType CalculateInferredType() const; virtual HType CalculateInferredType();
virtual intptr_t Hashcode() const { virtual intptr_t Hashcode() {
return HValue::Hashcode() * 7 + token_; return HValue::Hashcode() * 7 + token_;
} }
DECLARE_CONCRETE_INSTRUCTION(Compare, "compare") DECLARE_CONCRETE_INSTRUCTION(Compare, "compare")
protected: protected:
virtual bool DataEquals(HValue* other) const { virtual bool DataEquals(HValue* other) {
HCompare* comp = HCompare::cast(other); HCompare* comp = HCompare::cast(other);
return token_ == comp->token(); return token_ == comp->token();
} }
...@@ -2207,12 +2207,12 @@ class HCompareJSObjectEq: public HBinaryOperation { ...@@ -2207,12 +2207,12 @@ class HCompareJSObjectEq: public HBinaryOperation {
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) const {
return Representation::Tagged(); return Representation::Tagged();
} }
virtual HType CalculateInferredType() const; virtual HType CalculateInferredType();
DECLARE_CONCRETE_INSTRUCTION(CompareJSObjectEq, "compare-js-object-eq") DECLARE_CONCRETE_INSTRUCTION(CompareJSObjectEq, "compare-js-object-eq")
protected: protected:
virtual bool DataEquals(HValue* other) const { return true; } virtual bool DataEquals(HValue* other) { return true; }
}; };
...@@ -2230,7 +2230,7 @@ class HUnaryPredicate: public HUnaryOperation { ...@@ -2230,7 +2230,7 @@ class HUnaryPredicate: public HUnaryOperation {
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) const {
return Representation::Tagged(); return Representation::Tagged();
} }
virtual HType CalculateInferredType() const; virtual HType CalculateInferredType();
}; };
...@@ -2244,7 +2244,7 @@ class HIsNull: public HUnaryPredicate { ...@@ -2244,7 +2244,7 @@ class HIsNull: public HUnaryPredicate {
DECLARE_CONCRETE_INSTRUCTION(IsNull, "is_null") DECLARE_CONCRETE_INSTRUCTION(IsNull, "is_null")
protected: protected:
virtual bool DataEquals(HValue* other) const { virtual bool DataEquals(HValue* other) {
HIsNull* b = HIsNull::cast(other); HIsNull* b = HIsNull::cast(other);
return is_strict_ == b->is_strict(); return is_strict_ == b->is_strict();
} }
...@@ -2261,7 +2261,7 @@ class HIsObject: public HUnaryPredicate { ...@@ -2261,7 +2261,7 @@ class HIsObject: public HUnaryPredicate {
DECLARE_CONCRETE_INSTRUCTION(IsObject, "is_object") DECLARE_CONCRETE_INSTRUCTION(IsObject, "is_object")
protected: protected:
virtual bool DataEquals(HValue* other) const { return true; } virtual bool DataEquals(HValue* other) { return true; }
}; };
...@@ -2272,7 +2272,7 @@ class HIsSmi: public HUnaryPredicate { ...@@ -2272,7 +2272,7 @@ class HIsSmi: public HUnaryPredicate {
DECLARE_CONCRETE_INSTRUCTION(IsSmi, "is_smi") DECLARE_CONCRETE_INSTRUCTION(IsSmi, "is_smi")
protected: protected:
virtual bool DataEquals(HValue* other) const { return true; } virtual bool DataEquals(HValue* other) { return true; }
}; };
...@@ -2290,7 +2290,7 @@ class HIsConstructCall: public HInstruction { ...@@ -2290,7 +2290,7 @@ class HIsConstructCall: public HInstruction {
DECLARE_CONCRETE_INSTRUCTION(IsConstructCall, "is_construct_call") DECLARE_CONCRETE_INSTRUCTION(IsConstructCall, "is_construct_call")
protected: protected:
virtual bool DataEquals(HValue* other) const { return true; } virtual bool DataEquals(HValue* other) { return true; }
}; };
...@@ -2306,12 +2306,12 @@ class HHasInstanceType: public HUnaryPredicate { ...@@ -2306,12 +2306,12 @@ class HHasInstanceType: public HUnaryPredicate {
InstanceType from() { return from_; } InstanceType from() { return from_; }
InstanceType to() { return to_; } InstanceType to() { return to_; }
virtual void PrintDataTo(StringStream* stream) const; virtual void PrintDataTo(StringStream* stream);
DECLARE_CONCRETE_INSTRUCTION(HasInstanceType, "has_instance_type") DECLARE_CONCRETE_INSTRUCTION(HasInstanceType, "has_instance_type")
protected: protected:
virtual bool DataEquals(HValue* other) const { virtual bool DataEquals(HValue* other) {
HHasInstanceType* b = HHasInstanceType::cast(other); HHasInstanceType* b = HHasInstanceType::cast(other);
return (from_ == b->from()) && (to_ == b->to()); return (from_ == b->from()) && (to_ == b->to());
} }
...@@ -2329,7 +2329,7 @@ class HHasCachedArrayIndex: public HUnaryPredicate { ...@@ -2329,7 +2329,7 @@ class HHasCachedArrayIndex: public HUnaryPredicate {
DECLARE_CONCRETE_INSTRUCTION(HasCachedArrayIndex, "has_cached_array_index") DECLARE_CONCRETE_INSTRUCTION(HasCachedArrayIndex, "has_cached_array_index")
protected: protected:
virtual bool DataEquals(HValue* other) const { return true; } virtual bool DataEquals(HValue* other) { return true; }
}; };
...@@ -2340,7 +2340,7 @@ class HGetCachedArrayIndex: public HUnaryPredicate { ...@@ -2340,7 +2340,7 @@ class HGetCachedArrayIndex: public HUnaryPredicate {
DECLARE_CONCRETE_INSTRUCTION(GetCachedArrayIndex, "get_cached_array_index") DECLARE_CONCRETE_INSTRUCTION(GetCachedArrayIndex, "get_cached_array_index")
protected: protected:
virtual bool DataEquals(HValue* other) const { return true; } virtual bool DataEquals(HValue* other) { return true; }
}; };
...@@ -2351,12 +2351,12 @@ class HClassOfTest: public HUnaryPredicate { ...@@ -2351,12 +2351,12 @@ class HClassOfTest: public HUnaryPredicate {
DECLARE_CONCRETE_INSTRUCTION(ClassOfTest, "class_of_test") DECLARE_CONCRETE_INSTRUCTION(ClassOfTest, "class_of_test")
virtual void PrintDataTo(StringStream* stream) const; virtual void PrintDataTo(StringStream* stream);
Handle<String> class_name() const { return class_name_; } Handle<String> class_name() const { return class_name_; }
protected: protected:
virtual bool DataEquals(HValue* other) const { virtual bool DataEquals(HValue* other) {
HClassOfTest* b = HClassOfTest::cast(other); HClassOfTest* b = HClassOfTest::cast(other);
return class_name_.is_identical_to(b->class_name_); return class_name_.is_identical_to(b->class_name_);
} }
...@@ -2372,12 +2372,12 @@ class HTypeofIs: public HUnaryPredicate { ...@@ -2372,12 +2372,12 @@ class HTypeofIs: public HUnaryPredicate {
: HUnaryPredicate(value), type_literal_(type_literal) { } : HUnaryPredicate(value), type_literal_(type_literal) { }
Handle<String> type_literal() { return type_literal_; } Handle<String> type_literal() { return type_literal_; }
virtual void PrintDataTo(StringStream* stream) const; virtual void PrintDataTo(StringStream* stream);
DECLARE_CONCRETE_INSTRUCTION(TypeofIs, "typeof_is") DECLARE_CONCRETE_INSTRUCTION(TypeofIs, "typeof_is")
protected: protected:
virtual bool DataEquals(HValue* other) const { virtual bool DataEquals(HValue* other) {
HTypeofIs* b = HTypeofIs::cast(other); HTypeofIs* b = HTypeofIs::cast(other);
return type_literal_.is_identical_to(b->type_literal_); return type_literal_.is_identical_to(b->type_literal_);
} }
...@@ -2409,7 +2409,7 @@ class HInstanceOf: public HInstruction { ...@@ -2409,7 +2409,7 @@ class HInstanceOf: public HInstruction {
return Representation::Tagged(); return Representation::Tagged();
} }
virtual void PrintDataTo(StringStream* stream) const; virtual void PrintDataTo(StringStream* stream);
virtual int OperandCount() const { return 3; } virtual int OperandCount() const { return 3; }
virtual HValue* OperandAt(int index) const { return operands_[index]; } virtual HValue* OperandAt(int index) const { return operands_[index]; }
...@@ -2463,7 +2463,7 @@ class HPower: public HBinaryOperation { ...@@ -2463,7 +2463,7 @@ class HPower: public HBinaryOperation {
DECLARE_CONCRETE_INSTRUCTION(Power, "power") DECLARE_CONCRETE_INSTRUCTION(Power, "power")
protected: protected:
virtual bool DataEquals(HValue* other) const { return true; } virtual bool DataEquals(HValue* other) { return true; }
}; };
...@@ -2481,12 +2481,12 @@ class HAdd: public HArithmeticBinaryOperation { ...@@ -2481,12 +2481,12 @@ class HAdd: public HArithmeticBinaryOperation {
virtual HValue* EnsureAndPropagateNotMinusZero(BitVector* visited); virtual HValue* EnsureAndPropagateNotMinusZero(BitVector* visited);
virtual HType CalculateInferredType() const; virtual HType CalculateInferredType();
DECLARE_CONCRETE_INSTRUCTION(Add, "add") DECLARE_CONCRETE_INSTRUCTION(Add, "add")
protected: protected:
virtual bool DataEquals(HValue* other) const { return true; } virtual bool DataEquals(HValue* other) { return true; }
virtual Range* InferRange(); virtual Range* InferRange();
}; };
...@@ -2503,7 +2503,7 @@ class HSub: public HArithmeticBinaryOperation { ...@@ -2503,7 +2503,7 @@ class HSub: public HArithmeticBinaryOperation {
DECLARE_CONCRETE_INSTRUCTION(Sub, "sub") DECLARE_CONCRETE_INSTRUCTION(Sub, "sub")
protected: protected:
virtual bool DataEquals(HValue* other) const { return true; } virtual bool DataEquals(HValue* other) { return true; }
virtual Range* InferRange(); virtual Range* InferRange();
}; };
...@@ -2525,7 +2525,7 @@ class HMul: public HArithmeticBinaryOperation { ...@@ -2525,7 +2525,7 @@ class HMul: public HArithmeticBinaryOperation {
DECLARE_CONCRETE_INSTRUCTION(Mul, "mul") DECLARE_CONCRETE_INSTRUCTION(Mul, "mul")
protected: protected:
virtual bool DataEquals(HValue* other) const { return true; } virtual bool DataEquals(HValue* other) { return true; }
virtual Range* InferRange(); virtual Range* InferRange();
}; };
...@@ -2542,7 +2542,7 @@ class HMod: public HArithmeticBinaryOperation { ...@@ -2542,7 +2542,7 @@ class HMod: public HArithmeticBinaryOperation {
DECLARE_CONCRETE_INSTRUCTION(Mod, "mod") DECLARE_CONCRETE_INSTRUCTION(Mod, "mod")
protected: protected:
virtual bool DataEquals(HValue* other) const { return true; } virtual bool DataEquals(HValue* other) { return true; }
virtual Range* InferRange(); virtual Range* InferRange();
}; };
...@@ -2560,7 +2560,7 @@ class HDiv: public HArithmeticBinaryOperation { ...@@ -2560,7 +2560,7 @@ class HDiv: public HArithmeticBinaryOperation {
DECLARE_CONCRETE_INSTRUCTION(Div, "div") DECLARE_CONCRETE_INSTRUCTION(Div, "div")
protected: protected:
virtual bool DataEquals(HValue* other) const { return true; } virtual bool DataEquals(HValue* other) { return true; }
virtual Range* InferRange(); virtual Range* InferRange();
}; };
...@@ -2572,12 +2572,12 @@ class HBitAnd: public HBitwiseBinaryOperation { ...@@ -2572,12 +2572,12 @@ class HBitAnd: public HBitwiseBinaryOperation {
: HBitwiseBinaryOperation(left, right) { } : HBitwiseBinaryOperation(left, right) { }
virtual bool IsCommutative() const { return true; } virtual bool IsCommutative() const { return true; }
virtual HType CalculateInferredType() const; virtual HType CalculateInferredType();
DECLARE_CONCRETE_INSTRUCTION(BitAnd, "bit_and") DECLARE_CONCRETE_INSTRUCTION(BitAnd, "bit_and")
protected: protected:
virtual bool DataEquals(HValue* other) const { return true; } virtual bool DataEquals(HValue* other) { return true; }
virtual Range* InferRange(); virtual Range* InferRange();
}; };
...@@ -2589,12 +2589,12 @@ class HBitXor: public HBitwiseBinaryOperation { ...@@ -2589,12 +2589,12 @@ class HBitXor: public HBitwiseBinaryOperation {
: HBitwiseBinaryOperation(left, right) { } : HBitwiseBinaryOperation(left, right) { }
virtual bool IsCommutative() const { return true; } virtual bool IsCommutative() const { return true; }
virtual HType CalculateInferredType() const; virtual HType CalculateInferredType();
DECLARE_CONCRETE_INSTRUCTION(BitXor, "bit_xor") DECLARE_CONCRETE_INSTRUCTION(BitXor, "bit_xor")
protected: protected:
virtual bool DataEquals(HValue* other) const { return true; } virtual bool DataEquals(HValue* other) { return true; }
}; };
...@@ -2604,12 +2604,12 @@ class HBitOr: public HBitwiseBinaryOperation { ...@@ -2604,12 +2604,12 @@ class HBitOr: public HBitwiseBinaryOperation {
: HBitwiseBinaryOperation(left, right) { } : HBitwiseBinaryOperation(left, right) { }
virtual bool IsCommutative() const { return true; } virtual bool IsCommutative() const { return true; }
virtual HType CalculateInferredType() const; virtual HType CalculateInferredType();
DECLARE_CONCRETE_INSTRUCTION(BitOr, "bit_or") DECLARE_CONCRETE_INSTRUCTION(BitOr, "bit_or")
protected: protected:
virtual bool DataEquals(HValue* other) const { return true; } virtual bool DataEquals(HValue* other) { return true; }
virtual Range* InferRange(); virtual Range* InferRange();
}; };
...@@ -2621,12 +2621,12 @@ class HShl: public HBitwiseBinaryOperation { ...@@ -2621,12 +2621,12 @@ class HShl: public HBitwiseBinaryOperation {
: HBitwiseBinaryOperation(left, right) { } : HBitwiseBinaryOperation(left, right) { }
virtual Range* InferRange(); virtual Range* InferRange();
virtual HType CalculateInferredType() const; virtual HType CalculateInferredType();
DECLARE_CONCRETE_INSTRUCTION(Shl, "shl") DECLARE_CONCRETE_INSTRUCTION(Shl, "shl")
protected: protected:
virtual bool DataEquals(HValue* other) const { return true; } virtual bool DataEquals(HValue* other) { return true; }
}; };
...@@ -2635,12 +2635,12 @@ class HShr: public HBitwiseBinaryOperation { ...@@ -2635,12 +2635,12 @@ class HShr: public HBitwiseBinaryOperation {
HShr(HValue* left, HValue* right) HShr(HValue* left, HValue* right)
: HBitwiseBinaryOperation(left, right) { } : HBitwiseBinaryOperation(left, right) { }
virtual HType CalculateInferredType() const; virtual HType CalculateInferredType();
DECLARE_CONCRETE_INSTRUCTION(Shr, "shr") DECLARE_CONCRETE_INSTRUCTION(Shr, "shr")
protected: protected:
virtual bool DataEquals(HValue* other) const { return true; } virtual bool DataEquals(HValue* other) { return true; }
}; };
...@@ -2650,12 +2650,12 @@ class HSar: public HBitwiseBinaryOperation { ...@@ -2650,12 +2650,12 @@ class HSar: public HBitwiseBinaryOperation {
: HBitwiseBinaryOperation(left, right) { } : HBitwiseBinaryOperation(left, right) { }
virtual Range* InferRange(); virtual Range* InferRange();
virtual HType CalculateInferredType() const; virtual HType CalculateInferredType();
DECLARE_CONCRETE_INSTRUCTION(Sar, "sar") DECLARE_CONCRETE_INSTRUCTION(Sar, "sar")
protected: protected:
virtual bool DataEquals(HValue* other) const { return true; } virtual bool DataEquals(HValue* other) { return true; }
}; };
...@@ -2682,7 +2682,7 @@ class HParameter: public HInstruction { ...@@ -2682,7 +2682,7 @@ class HParameter: public HInstruction {
unsigned index() const { return index_; } unsigned index() const { return index_; }
virtual void PrintDataTo(StringStream* stream) const; virtual void PrintDataTo(StringStream* stream);
DECLARE_CONCRETE_INSTRUCTION(Parameter, "parameter") DECLARE_CONCRETE_INSTRUCTION(Parameter, "parameter")
...@@ -2710,7 +2710,7 @@ class HCallStub: public HUnaryCall { ...@@ -2710,7 +2710,7 @@ class HCallStub: public HUnaryCall {
return transcendental_type_; return transcendental_type_;
} }
virtual void PrintDataTo(StringStream* stream) const; virtual void PrintDataTo(StringStream* stream);
DECLARE_CONCRETE_INSTRUCTION(CallStub, "call_stub") DECLARE_CONCRETE_INSTRUCTION(CallStub, "call_stub")
...@@ -2743,9 +2743,9 @@ class HLoadGlobal: public HInstruction { ...@@ -2743,9 +2743,9 @@ class HLoadGlobal: public HInstruction {
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) const {
return Representation::Tagged(); return Representation::Tagged();
} }
virtual void PrintDataTo(StringStream* stream) const; virtual void PrintDataTo(StringStream* stream);
virtual intptr_t Hashcode() const { virtual intptr_t Hashcode() {
ASSERT(!Heap::allow_allocation(false)); ASSERT(!Heap::allow_allocation(false));
return reinterpret_cast<intptr_t>(*cell_); return reinterpret_cast<intptr_t>(*cell_);
} }
...@@ -2753,7 +2753,7 @@ class HLoadGlobal: public HInstruction { ...@@ -2753,7 +2753,7 @@ class HLoadGlobal: public HInstruction {
DECLARE_CONCRETE_INSTRUCTION(LoadGlobal, "load_global") DECLARE_CONCRETE_INSTRUCTION(LoadGlobal, "load_global")
protected: protected:
virtual bool DataEquals(HValue* other) const { virtual bool DataEquals(HValue* other) {
HLoadGlobal* b = HLoadGlobal::cast(other); HLoadGlobal* b = HLoadGlobal::cast(other);
return cell_.is_identical_to(b->cell()); return cell_.is_identical_to(b->cell());
} }
...@@ -2781,7 +2781,7 @@ class HStoreGlobal: public HUnaryOperation { ...@@ -2781,7 +2781,7 @@ class HStoreGlobal: public HUnaryOperation {
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) const {
return Representation::Tagged(); return Representation::Tagged();
} }
virtual void PrintDataTo(StringStream* stream) const; virtual void PrintDataTo(StringStream* stream);
DECLARE_CONCRETE_INSTRUCTION(StoreGlobal, "store_global") DECLARE_CONCRETE_INSTRUCTION(StoreGlobal, "store_global")
...@@ -2806,12 +2806,12 @@ class HLoadContextSlot: public HUnaryOperation { ...@@ -2806,12 +2806,12 @@ class HLoadContextSlot: public HUnaryOperation {
return Representation::Tagged(); return Representation::Tagged();
} }
virtual void PrintDataTo(StringStream* stream) const; virtual void PrintDataTo(StringStream* stream);
DECLARE_CONCRETE_INSTRUCTION(LoadContextSlot, "load_context_slot") DECLARE_CONCRETE_INSTRUCTION(LoadContextSlot, "load_context_slot")
protected: protected:
virtual bool DataEquals(HValue* other) const { virtual bool DataEquals(HValue* other) {
HLoadContextSlot* b = HLoadContextSlot::cast(other); HLoadContextSlot* b = HLoadContextSlot::cast(other);
return (slot_index() == b->slot_index()); return (slot_index() == b->slot_index());
} }
...@@ -2846,7 +2846,7 @@ class HStoreContextSlot: public HBinaryOperation { ...@@ -2846,7 +2846,7 @@ class HStoreContextSlot: public HBinaryOperation {
return Representation::Tagged(); return Representation::Tagged();
} }
virtual void PrintDataTo(StringStream* stream) const; virtual void PrintDataTo(StringStream* stream);
DECLARE_CONCRETE_INSTRUCTION(StoreContextSlot, "store_context_slot") DECLARE_CONCRETE_INSTRUCTION(StoreContextSlot, "store_context_slot")
...@@ -2877,12 +2877,12 @@ class HLoadNamedField: public HUnaryOperation { ...@@ -2877,12 +2877,12 @@ class HLoadNamedField: public HUnaryOperation {
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) const {
return Representation::Tagged(); return Representation::Tagged();
} }
virtual void PrintDataTo(StringStream* stream) const; virtual void PrintDataTo(StringStream* stream);
DECLARE_CONCRETE_INSTRUCTION(LoadNamedField, "load_named_field") DECLARE_CONCRETE_INSTRUCTION(LoadNamedField, "load_named_field")
protected: protected:
virtual bool DataEquals(HValue* other) const { virtual bool DataEquals(HValue* other) {
HLoadNamedField* b = HLoadNamedField::cast(other); HLoadNamedField* b = HLoadNamedField::cast(other);
return is_in_object_ == b->is_in_object_ && offset_ == b->offset_; return is_in_object_ == b->is_in_object_ && offset_ == b->offset_;
} }
...@@ -2934,7 +2934,7 @@ class HLoadFunctionPrototype: public HUnaryOperation { ...@@ -2934,7 +2934,7 @@ class HLoadFunctionPrototype: public HUnaryOperation {
DECLARE_CONCRETE_INSTRUCTION(LoadFunctionPrototype, "load_function_prototype") DECLARE_CONCRETE_INSTRUCTION(LoadFunctionPrototype, "load_function_prototype")
protected: protected:
virtual bool DataEquals(HValue* other) const { return true; } virtual bool DataEquals(HValue* other) { return true; }
}; };
...@@ -2944,7 +2944,7 @@ class HLoadKeyed: public HBinaryOperation { ...@@ -2944,7 +2944,7 @@ class HLoadKeyed: public HBinaryOperation {
set_representation(Representation::Tagged()); set_representation(Representation::Tagged());
} }
virtual void PrintDataTo(StringStream* stream) const; virtual void PrintDataTo(StringStream* stream);
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) const {
return Representation::Tagged(); return Representation::Tagged();
...@@ -2973,7 +2973,7 @@ class HLoadKeyedFastElement: public HLoadKeyed { ...@@ -2973,7 +2973,7 @@ class HLoadKeyedFastElement: public HLoadKeyed {
"load_keyed_fast_element") "load_keyed_fast_element")
protected: protected:
virtual bool DataEquals(HValue* other) const { return true; } virtual bool DataEquals(HValue* other) { return true; }
}; };
...@@ -2988,7 +2988,7 @@ class HLoadPixelArrayElement: public HBinaryOperation { ...@@ -2988,7 +2988,7 @@ class HLoadPixelArrayElement: public HBinaryOperation {
SetFlag(kUseGVN); SetFlag(kUseGVN);
} }
virtual void PrintDataTo(StringStream* stream) const; virtual void PrintDataTo(StringStream* stream);
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) const {
// The key is supposed to be Integer32, but the base pointer // The key is supposed to be Integer32, but the base pointer
...@@ -3004,7 +3004,7 @@ class HLoadPixelArrayElement: public HBinaryOperation { ...@@ -3004,7 +3004,7 @@ class HLoadPixelArrayElement: public HBinaryOperation {
"load_pixel_array_element") "load_pixel_array_element")
protected: protected:
virtual bool DataEquals(HValue* other) const { return true; } virtual bool DataEquals(HValue* other) { return true; }
}; };
...@@ -3045,7 +3045,7 @@ class HStoreNamed: public HBinaryOperation { ...@@ -3045,7 +3045,7 @@ class HStoreNamed: public HBinaryOperation {
return Representation::Tagged(); return Representation::Tagged();
} }
virtual void PrintDataTo(StringStream* stream) const; virtual void PrintDataTo(StringStream* stream);
HValue* object() const { return OperandAt(0); } HValue* object() const { return OperandAt(0); }
Handle<String> name() const { return name_; } Handle<String> name() const { return name_; }
...@@ -3081,7 +3081,7 @@ class HStoreNamedField: public HStoreNamed { ...@@ -3081,7 +3081,7 @@ class HStoreNamedField: public HStoreNamed {
virtual Representation RequiredInputRepresentation(int index) const { virtual Representation RequiredInputRepresentation(int index) const {
return Representation::Tagged(); return Representation::Tagged();
} }
virtual void PrintDataTo(StringStream* stream) const; virtual void PrintDataTo(StringStream* stream);
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_; }
...@@ -3138,7 +3138,7 @@ class HStoreKeyed: public HInstruction { ...@@ -3138,7 +3138,7 @@ class HStoreKeyed: public HInstruction {
SetOperandAt(2, val); SetOperandAt(2, val);
} }
virtual void PrintDataTo(StringStream* stream) const; virtual void PrintDataTo(StringStream* stream);
virtual int OperandCount() const { return operands_.length(); } virtual int OperandCount() const { return operands_.length(); }
virtual HValue* OperandAt(int index) const { return operands_[index]; } virtual HValue* OperandAt(int index) const { return operands_[index]; }
...@@ -3192,7 +3192,7 @@ class HStorePixelArrayElement: public HInstruction { ...@@ -3192,7 +3192,7 @@ class HStorePixelArrayElement: public HInstruction {
SetOperandAt(2, val); SetOperandAt(2, val);
} }
virtual void PrintDataTo(StringStream* stream) const; virtual void PrintDataTo(StringStream* stream);
virtual int OperandCount() const { return operands_.length(); } virtual int OperandCount() const { return operands_.length(); }
virtual HValue* OperandAt(int index) const { return operands_[index]; } virtual HValue* OperandAt(int index) const { return operands_[index]; }
...@@ -3272,7 +3272,7 @@ class HStringCharCodeAt: public HBinaryOperation { ...@@ -3272,7 +3272,7 @@ class HStringCharCodeAt: public HBinaryOperation {
DECLARE_CONCRETE_INSTRUCTION(StringCharCodeAt, "string_char_code_at") DECLARE_CONCRETE_INSTRUCTION(StringCharCodeAt, "string_char_code_at")
protected: protected:
virtual bool DataEquals(HValue* other) const { return true; } virtual bool DataEquals(HValue* other) { return true; }
virtual Range* InferRange() { virtual Range* InferRange() {
return new Range(0, String::kMaxUC16CharCode); return new Range(0, String::kMaxUC16CharCode);
...@@ -3291,7 +3291,7 @@ class HStringLength: public HUnaryOperation { ...@@ -3291,7 +3291,7 @@ class HStringLength: public HUnaryOperation {
return Representation::Tagged(); return Representation::Tagged();
} }
virtual HType CalculateInferredType() const { virtual HType CalculateInferredType() {
STATIC_ASSERT(String::kMaxLength <= Smi::kMaxValue); STATIC_ASSERT(String::kMaxLength <= Smi::kMaxValue);
return HType::Smi(); return HType::Smi();
} }
...@@ -3299,7 +3299,7 @@ class HStringLength: public HUnaryOperation { ...@@ -3299,7 +3299,7 @@ class HStringLength: public HUnaryOperation {
DECLARE_CONCRETE_INSTRUCTION(StringLength, "string_length") DECLARE_CONCRETE_INSTRUCTION(StringLength, "string_length")
protected: protected:
virtual bool DataEquals(HValue* other) const { return true; } virtual bool DataEquals(HValue* other) { return true; }
virtual Range* InferRange() { virtual Range* InferRange() {
return new Range(0, String::kMaxLength); return new Range(0, String::kMaxLength);
......
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