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_ARM. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM. |
6 #if defined(TARGET_ARCH_ARM) | 6 #if defined(TARGET_ARCH_ARM) |
7 | 7 |
8 #include "vm/intermediate_language.h" | 8 #include "vm/intermediate_language.h" |
9 | 9 |
10 #include "lib/error.h" | 10 #include "lib/error.h" |
(...skipping 2225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2236 right.reg(), | 2236 right.reg(), |
2237 needs_number_check()); | 2237 needs_number_check()); |
2238 } | 2238 } |
2239 | 2239 |
2240 Condition true_condition = (kind() == Token::kEQ_STRICT) ? EQ : NE; | 2240 Condition true_condition = (kind() == Token::kEQ_STRICT) ? EQ : NE; |
2241 branch->EmitBranchOnCondition(compiler, true_condition); | 2241 branch->EmitBranchOnCondition(compiler, true_condition); |
2242 } | 2242 } |
2243 | 2243 |
2244 | 2244 |
2245 LocationSummary* BooleanNegateInstr::MakeLocationSummary() const { | 2245 LocationSummary* BooleanNegateInstr::MakeLocationSummary() const { |
2246 UNIMPLEMENTED(); | 2246 return LocationSummary::Make(1, |
2247 return NULL; | 2247 Location::RequiresRegister(), |
| 2248 LocationSummary::kNoCall); |
2248 } | 2249 } |
2249 | 2250 |
2250 | 2251 |
2251 void BooleanNegateInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 2252 void BooleanNegateInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
2252 UNIMPLEMENTED(); | 2253 Register value = locs()->in(0).reg(); |
| 2254 Register result = locs()->out().reg(); |
| 2255 |
| 2256 Label done; |
| 2257 __ LoadObject(result, Bool::True()); |
| 2258 __ cmp(result, ShifterOperand(value)); |
| 2259 __ b(&done, NE); |
| 2260 __ LoadObject(result, Bool::False()); |
| 2261 __ Bind(&done); |
2253 } | 2262 } |
2254 | 2263 |
2255 | 2264 |
2256 LocationSummary* ChainContextInstr::MakeLocationSummary() const { | 2265 LocationSummary* ChainContextInstr::MakeLocationSummary() const { |
2257 UNIMPLEMENTED(); | 2266 UNIMPLEMENTED(); |
2258 return NULL; | 2267 return NULL; |
2259 } | 2268 } |
2260 | 2269 |
2261 | 2270 |
2262 void ChainContextInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 2271 void ChainContextInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2307 &label, | 2316 &label, |
2308 PcDescriptors::kOther, | 2317 PcDescriptors::kOther, |
2309 locs()); | 2318 locs()); |
2310 __ Drop(2); // Discard type arguments and receiver. | 2319 __ Drop(2); // Discard type arguments and receiver. |
2311 } | 2320 } |
2312 | 2321 |
2313 } // namespace dart | 2322 } // namespace dart |
2314 | 2323 |
2315 #endif // defined TARGET_ARCH_ARM | 2324 #endif // defined TARGET_ARCH_ARM |
2316 | 2325 |
OLD | NEW |