Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(239)

Side by Side Diff: runtime/vm/intermediate_language.cc

Issue 258563004: Copy of Issue 231383002 after hard disk crash: First step in improving instance of test for a fixed… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/intermediate_language.h" 5 #include "vm/intermediate_language.h"
6 6
7 #include "vm/bigint_operations.h" 7 #include "vm/bigint_operations.h"
8 #include "vm/bit_vector.h" 8 #include "vm/bit_vector.h"
9 #include "vm/cpu.h" 9 #include "vm/cpu.h"
10 #include "vm/dart_entry.h" 10 #include "vm/dart_entry.h"
(...skipping 2673 matching lines...) Expand 10 before | Expand all | Expand 10 after
2684 } 2684 }
2685 2685
2686 2686
2687 2687
2688 ComparisonInstr* TestSmiInstr::CopyWithNewOperands(Value* new_left, 2688 ComparisonInstr* TestSmiInstr::CopyWithNewOperands(Value* new_left,
2689 Value* new_right) { 2689 Value* new_right) {
2690 return new TestSmiInstr(token_pos(), kind(), new_left, new_right); 2690 return new TestSmiInstr(token_pos(), kind(), new_left, new_right);
2691 } 2691 }
2692 2692
2693 2693
2694
2695 ComparisonInstr* TestCidsInstr::CopyWithNewOperands(Value* new_left,
2696 Value* new_right) {
2697 return new TestCidsInstr(token_pos(),
2698 kind(),
2699 new_left,
2700 cid_results(),
2701 deopt_id());
2702 }
2703
2704
2705 bool TestCidsInstr::AttributesEqual(Instruction* other) const {
2706 TestCidsInstr* other_instr = other->AsTestCids();
2707 ASSERT(other != NULL);
2708 if (kind() != other_instr->kind()) {
2709 return false;
2710 }
2711 if (cid_results().length() != other_instr->cid_results().length()) {
2712 return false;
2713 }
2714 for (intptr_t i = 0; i < cid_results().length(); i++) {
2715 if (cid_results()[i] != other_instr->cid_results()[i]) {
2716 return false;
2717 }
2718 }
2719 return true;
2720 }
2721
2722
2694 bool IfThenElseInstr::Supports(ComparisonInstr* comparison, 2723 bool IfThenElseInstr::Supports(ComparisonInstr* comparison,
2695 Value* v1, 2724 Value* v1,
2696 Value* v2) { 2725 Value* v2) {
2697 bool is_smi_result = BindsToSmiConstant(v1) && BindsToSmiConstant(v2); 2726 bool is_smi_result = BindsToSmiConstant(v1) && BindsToSmiConstant(v2);
2698 if (comparison->IsStrictCompare()) { 2727 if (comparison->IsStrictCompare()) {
2699 // Strict comparison with number checks calls a stub and is not supported 2728 // Strict comparison with number checks calls a stub and is not supported
2700 // by if-conversion. 2729 // by if-conversion.
2701 return is_smi_result 2730 return is_smi_result
2702 && !comparison->AsStrictCompare()->needs_number_check(); 2731 && !comparison->AsStrictCompare()->needs_number_check();
2703 } 2732 }
(...skipping 547 matching lines...) Expand 10 before | Expand all | Expand 10 after
3251 case Token::kTRUNCDIV: return 0; 3280 case Token::kTRUNCDIV: return 0;
3252 case Token::kMOD: return 1; 3281 case Token::kMOD: return 1;
3253 default: UNIMPLEMENTED(); return -1; 3282 default: UNIMPLEMENTED(); return -1;
3254 } 3283 }
3255 } 3284 }
3256 3285
3257 3286
3258 #undef __ 3287 #undef __
3259 3288
3260 } // namespace dart 3289 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698