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) {
void HChange::PrintDataTo(StringStream* 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 (CheckFlag(kBailoutOnMinusZero)) stream->Add(" -0?");
if (CheckFlag(kDeoptimizeOnUndefined)) stream->Add(" deopt-on-undefined");
}
......
This diff is collapsed.
......@@ -1860,7 +1860,7 @@ void HGraph::InsertRepresentationChangeForUse(HValue* value,
}
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);
}
......
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