Observe smi as input for HCompareIDAndBranch

R=mvstanton@chromium.org

Review URL: https://chromiumcodereview.appspot.com/16994002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15140 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
verwaest@chromium.org 2013-06-14 07:45:16 +00:00
parent bcf5912b3f
commit cff21dc168

View File

@ -5008,7 +5008,7 @@ void HOptimizedGraphBuilder::VisitSwitchStatement(SwitchStatement* stmt) {
label_value,
Token::EQ_STRICT);
compare_->set_observed_input_representation(
Representation::Integer32(), Representation::Integer32());
Representation::Smi(), Representation::Smi());
compare = compare_;
} else {
compare = new(zone()) HStringCompareAndBranch(context, tag_value,
@ -5373,7 +5373,7 @@ void HOptimizedGraphBuilder::VisitForInStatement(ForInStatement* stmt) {
HCompareIDAndBranch* compare_index =
new(zone()) HCompareIDAndBranch(index, limit, Token::LT);
compare_index->set_observed_input_representation(
Representation::Integer32(), Representation::Integer32());
Representation::Smi(), Representation::Smi());
HBasicBlock* loop_body = graph()->CreateBasicBlock();
HBasicBlock* loop_successor = graph()->CreateBasicBlock();