OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 4990 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5001 if (stmt->switch_type() == SwitchStatement::SMI_SWITCH) { | 5001 if (stmt->switch_type() == SwitchStatement::SMI_SWITCH) { |
5002 if (!clause->compare_type()->Is(Type::Integer31())) { | 5002 if (!clause->compare_type()->Is(Type::Integer31())) { |
5003 AddSoftDeoptimize(); | 5003 AddSoftDeoptimize(); |
5004 } | 5004 } |
5005 | 5005 |
5006 HCompareIDAndBranch* compare_ = | 5006 HCompareIDAndBranch* compare_ = |
5007 new(zone()) HCompareIDAndBranch(tag_value, | 5007 new(zone()) HCompareIDAndBranch(tag_value, |
5008 label_value, | 5008 label_value, |
5009 Token::EQ_STRICT); | 5009 Token::EQ_STRICT); |
5010 compare_->set_observed_input_representation( | 5010 compare_->set_observed_input_representation( |
5011 Representation::Integer32(), Representation::Integer32()); | 5011 Representation::Smi(), Representation::Smi()); |
5012 compare = compare_; | 5012 compare = compare_; |
5013 } else { | 5013 } else { |
5014 compare = new(zone()) HStringCompareAndBranch(context, tag_value, | 5014 compare = new(zone()) HStringCompareAndBranch(context, tag_value, |
5015 label_value, | 5015 label_value, |
5016 Token::EQ_STRICT); | 5016 Token::EQ_STRICT); |
5017 } | 5017 } |
5018 | 5018 |
5019 compare->SetSuccessorAt(0, body_block); | 5019 compare->SetSuccessorAt(0, body_block); |
5020 compare->SetSuccessorAt(1, next_test_block); | 5020 compare->SetSuccessorAt(1, next_test_block); |
5021 current_block()->Finish(compare); | 5021 current_block()->Finish(compare); |
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5366 set_current_block(loop_entry); | 5366 set_current_block(loop_entry); |
5367 if (osr_entry) graph()->set_osr_loop_entry(loop_entry); | 5367 if (osr_entry) graph()->set_osr_loop_entry(loop_entry); |
5368 | 5368 |
5369 HValue* index = environment()->ExpressionStackAt(0); | 5369 HValue* index = environment()->ExpressionStackAt(0); |
5370 HValue* limit = environment()->ExpressionStackAt(1); | 5370 HValue* limit = environment()->ExpressionStackAt(1); |
5371 | 5371 |
5372 // Check that we still have more keys. | 5372 // Check that we still have more keys. |
5373 HCompareIDAndBranch* compare_index = | 5373 HCompareIDAndBranch* compare_index = |
5374 new(zone()) HCompareIDAndBranch(index, limit, Token::LT); | 5374 new(zone()) HCompareIDAndBranch(index, limit, Token::LT); |
5375 compare_index->set_observed_input_representation( | 5375 compare_index->set_observed_input_representation( |
5376 Representation::Integer32(), Representation::Integer32()); | 5376 Representation::Smi(), Representation::Smi()); |
5377 | 5377 |
5378 HBasicBlock* loop_body = graph()->CreateBasicBlock(); | 5378 HBasicBlock* loop_body = graph()->CreateBasicBlock(); |
5379 HBasicBlock* loop_successor = graph()->CreateBasicBlock(); | 5379 HBasicBlock* loop_successor = graph()->CreateBasicBlock(); |
5380 | 5380 |
5381 compare_index->SetSuccessorAt(0, loop_body); | 5381 compare_index->SetSuccessorAt(0, loop_body); |
5382 compare_index->SetSuccessorAt(1, loop_successor); | 5382 compare_index->SetSuccessorAt(1, loop_successor); |
5383 current_block()->Finish(compare_index); | 5383 current_block()->Finish(compare_index); |
5384 | 5384 |
5385 set_current_block(loop_successor); | 5385 set_current_block(loop_successor); |
5386 Drop(5); | 5386 Drop(5); |
(...skipping 6184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11571 } | 11571 } |
11572 } | 11572 } |
11573 | 11573 |
11574 #ifdef DEBUG | 11574 #ifdef DEBUG |
11575 if (graph_ != NULL) graph_->Verify(false); // No full verify. | 11575 if (graph_ != NULL) graph_->Verify(false); // No full verify. |
11576 if (allocator_ != NULL) allocator_->Verify(); | 11576 if (allocator_ != NULL) allocator_->Verify(); |
11577 #endif | 11577 #endif |
11578 } | 11578 } |
11579 | 11579 |
11580 } } // namespace v8::internal | 11580 } } // namespace v8::internal |
OLD | NEW |