| 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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 } | 91 } |
| 92 | 92 |
| 93 | 93 |
| 94 bool Value::Equals(Value* other) const { | 94 bool Value::Equals(Value* other) const { |
| 95 return definition() == other->definition(); | 95 return definition() == other->definition(); |
| 96 } | 96 } |
| 97 | 97 |
| 98 | 98 |
| 99 CheckClassInstr::CheckClassInstr(Value* value, | 99 CheckClassInstr::CheckClassInstr(Value* value, |
| 100 intptr_t deopt_id, | 100 intptr_t deopt_id, |
| 101 const ICData& unary_checks) | 101 const ICData& unary_checks, |
| 102 : unary_checks_(unary_checks), licm_hoisted_(false) { | 102 intptr_t token_pos) |
| 103 : unary_checks_(unary_checks), licm_hoisted_(false), token_pos_(token_pos) { |
| 103 ASSERT(unary_checks.IsZoneHandle()); | 104 ASSERT(unary_checks.IsZoneHandle()); |
| 104 // Expected useful check data. | 105 // Expected useful check data. |
| 105 ASSERT(!unary_checks_.IsNull()); | 106 ASSERT(!unary_checks_.IsNull()); |
| 106 ASSERT(unary_checks_.NumberOfChecks() > 0); | 107 ASSERT(unary_checks_.NumberOfChecks() > 0); |
| 107 ASSERT(unary_checks_.NumArgsTested() == 1); | 108 ASSERT(unary_checks_.NumArgsTested() == 1); |
| 108 SetInputAt(0, value); | 109 SetInputAt(0, value); |
| 109 deopt_id_ = deopt_id; | 110 deopt_id_ = deopt_id; |
| 110 // Otherwise use CheckSmiInstr. | 111 // Otherwise use CheckSmiInstr. |
| 111 ASSERT((unary_checks_.NumberOfChecks() != 1) || | 112 ASSERT((unary_checks_.NumberOfChecks() != 1) || |
| 112 (unary_checks_.GetReceiverClassIdAt(0) != kSmiCid)); | 113 (unary_checks_.GetReceiverClassIdAt(0) != kSmiCid)); |
| (...skipping 3081 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3194 ASSERT(result.IsString()); | 3195 ASSERT(result.IsString()); |
| 3195 const String& concatenated = | 3196 const String& concatenated = |
| 3196 String::ZoneHandle(Symbols::New(String::Cast(result))); | 3197 String::ZoneHandle(Symbols::New(String::Cast(result))); |
| 3197 return flow_graph->GetConstant(concatenated); | 3198 return flow_graph->GetConstant(concatenated); |
| 3198 } | 3199 } |
| 3199 | 3200 |
| 3200 | 3201 |
| 3201 InvokeMathCFunctionInstr::InvokeMathCFunctionInstr( | 3202 InvokeMathCFunctionInstr::InvokeMathCFunctionInstr( |
| 3202 ZoneGrowableArray<Value*>* inputs, | 3203 ZoneGrowableArray<Value*>* inputs, |
| 3203 intptr_t original_deopt_id, | 3204 intptr_t original_deopt_id, |
| 3204 MethodRecognizer::Kind recognized_kind) | 3205 MethodRecognizer::Kind recognized_kind, |
| 3206 intptr_t token_pos) |
| 3205 : inputs_(inputs), | 3207 : inputs_(inputs), |
| 3206 recognized_kind_(recognized_kind) { | 3208 recognized_kind_(recognized_kind), |
| 3209 token_pos_(token_pos) { |
| 3207 ASSERT(inputs_->length() == ArgumentCountFor(recognized_kind_)); | 3210 ASSERT(inputs_->length() == ArgumentCountFor(recognized_kind_)); |
| 3208 for (intptr_t i = 0; i < inputs_->length(); ++i) { | 3211 for (intptr_t i = 0; i < inputs_->length(); ++i) { |
| 3209 ASSERT((*inputs)[i] != NULL); | 3212 ASSERT((*inputs)[i] != NULL); |
| 3210 (*inputs)[i]->set_instruction(this); | 3213 (*inputs)[i]->set_instruction(this); |
| 3211 (*inputs)[i]->set_use_index(i); | 3214 (*inputs)[i]->set_use_index(i); |
| 3212 } | 3215 } |
| 3213 deopt_id_ = original_deopt_id; | 3216 deopt_id_ = original_deopt_id; |
| 3214 } | 3217 } |
| 3215 | 3218 |
| 3216 | 3219 |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3335 case Token::kTRUNCDIV: return 0; | 3338 case Token::kTRUNCDIV: return 0; |
| 3336 case Token::kMOD: return 1; | 3339 case Token::kMOD: return 1; |
| 3337 default: UNIMPLEMENTED(); return -1; | 3340 default: UNIMPLEMENTED(); return -1; |
| 3338 } | 3341 } |
| 3339 } | 3342 } |
| 3340 | 3343 |
| 3341 | 3344 |
| 3342 #undef __ | 3345 #undef __ |
| 3343 | 3346 |
| 3344 } // namespace dart | 3347 } // namespace dart |
| OLD | NEW |