| 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/globals.h" // Needed here to get TARGET_ARCH_MIPS. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_MIPS. |
| 6 #if defined(TARGET_ARCH_MIPS) | 6 #if defined(TARGET_ARCH_MIPS) |
| 7 | 7 |
| 8 #include "vm/intermediate_language.h" | 8 #include "vm/intermediate_language.h" |
| 9 | 9 |
| 10 #include "vm/dart_entry.h" | 10 #include "vm/dart_entry.h" |
| (...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 244 // Check that the type of the value is allowed in conditional context. | 244 // Check that the type of the value is allowed in conditional context. |
| 245 // Call the runtime if the object is not bool::true or bool::false. | 245 // Call the runtime if the object is not bool::true or bool::false. |
| 246 ASSERT(locs->always_calls()); | 246 ASSERT(locs->always_calls()); |
| 247 Label done; | 247 Label done; |
| 248 __ BranchEqual(reg, Bool::True(), &done); | 248 __ BranchEqual(reg, Bool::True(), &done); |
| 249 __ BranchEqual(reg, Bool::False(), &done); | 249 __ BranchEqual(reg, Bool::False(), &done); |
| 250 | 250 |
| 251 __ Push(reg); // Push the source object. | 251 __ Push(reg); // Push the source object. |
| 252 compiler->GenerateRuntimeCall(token_pos, | 252 compiler->GenerateRuntimeCall(token_pos, |
| 253 deopt_id, | 253 deopt_id, |
| 254 kConditionTypeErrorRuntimeEntry, | 254 kNonBoolTypeErrorRuntimeEntry, |
| 255 1, | 255 1, |
| 256 locs); | 256 locs); |
| 257 // We should never return here. | 257 // We should never return here. |
| 258 __ break_(0); | 258 __ break_(0); |
| 259 __ Bind(&done); | 259 __ Bind(&done); |
| 260 } | 260 } |
| 261 | 261 |
| 262 | 262 |
| 263 void AssertBooleanInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 263 void AssertBooleanInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 264 Register obj = locs()->in(0).reg(); | 264 Register obj = locs()->in(0).reg(); |
| (...skipping 3812 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4077 compiler->GenerateCall(token_pos(), | 4077 compiler->GenerateCall(token_pos(), |
| 4078 &label, | 4078 &label, |
| 4079 PcDescriptors::kOther, | 4079 PcDescriptors::kOther, |
| 4080 locs()); | 4080 locs()); |
| 4081 __ Drop(2); // Discard type arguments and receiver. | 4081 __ Drop(2); // Discard type arguments and receiver. |
| 4082 } | 4082 } |
| 4083 | 4083 |
| 4084 } // namespace dart | 4084 } // namespace dart |
| 4085 | 4085 |
| 4086 #endif // defined TARGET_ARCH_MIPS | 4086 #endif // defined TARGET_ARCH_MIPS |
| OLD | NEW |