In the absence of type feedback, pessimistically force Tagged representation for UnaryAdd
BUG=v8:2527 Review URL: https://codereview.chromium.org/12390026 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13890 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
a2e996a5fa
commit
00df65117d
@ -8648,6 +8648,11 @@ void HOptimizedGraphBuilder::VisitAdd(UnaryOperation* expr) {
|
||||
HValue* context = environment()->LookupContext();
|
||||
HInstruction* instr =
|
||||
HMul::New(zone(), context, value, graph()->GetConstant1());
|
||||
if (instr->IsBinaryOperation()) {
|
||||
// Since we don't have type feedback, we must be cautious/pessimistic.
|
||||
HBinaryOperation::cast(instr)->set_observed_input_representation(
|
||||
Representation::Tagged(), Representation::Tagged());
|
||||
}
|
||||
return ast_context()->ReturnInstruction(instr, expr->id());
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user