OLD | NEW |
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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 | 84 |
85 | 85 |
86 CheckClassInstr::CheckClassInstr(Value* value, | 86 CheckClassInstr::CheckClassInstr(Value* value, |
87 intptr_t deopt_id, | 87 intptr_t deopt_id, |
88 const ICData& unary_checks) | 88 const ICData& unary_checks) |
89 : unary_checks_(unary_checks), licm_hoisted_(false) { | 89 : unary_checks_(unary_checks), licm_hoisted_(false) { |
90 ASSERT(unary_checks.IsZoneHandle()); | 90 ASSERT(unary_checks.IsZoneHandle()); |
91 // Expected useful check data. | 91 // Expected useful check data. |
92 ASSERT(!unary_checks_.IsNull()); | 92 ASSERT(!unary_checks_.IsNull()); |
93 ASSERT(unary_checks_.NumberOfChecks() > 0); | 93 ASSERT(unary_checks_.NumberOfChecks() > 0); |
94 ASSERT(unary_checks_.num_args_tested() == 1); | 94 ASSERT(unary_checks_.NumArgsTested() == 1); |
95 SetInputAt(0, value); | 95 SetInputAt(0, value); |
96 deopt_id_ = deopt_id; | 96 deopt_id_ = deopt_id; |
97 // Otherwise use CheckSmiInstr. | 97 // Otherwise use CheckSmiInstr. |
98 ASSERT((unary_checks_.NumberOfChecks() != 1) || | 98 ASSERT((unary_checks_.NumberOfChecks() != 1) || |
99 (unary_checks_.GetReceiverClassIdAt(0) != kSmiCid)); | 99 (unary_checks_.GetReceiverClassIdAt(0) != kSmiCid)); |
100 } | 100 } |
101 | 101 |
102 | 102 |
103 bool CheckClassInstr::AttributesEqual(Instruction* other) const { | 103 bool CheckClassInstr::AttributesEqual(Instruction* other) const { |
104 CheckClassInstr* other_check = other->AsCheckClass(); | 104 CheckClassInstr* other_check = other->AsCheckClass(); |
(...skipping 3212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3317 case Token::kTRUNCDIV: return 0; | 3317 case Token::kTRUNCDIV: return 0; |
3318 case Token::kMOD: return 1; | 3318 case Token::kMOD: return 1; |
3319 default: UNIMPLEMENTED(); return -1; | 3319 default: UNIMPLEMENTED(); return -1; |
3320 } | 3320 } |
3321 } | 3321 } |
3322 | 3322 |
3323 | 3323 |
3324 #undef __ | 3324 #undef __ |
3325 | 3325 |
3326 } // namespace dart | 3326 } // namespace dart |
OLD | NEW |