| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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/bit_vector.h" | 7 #include "vm/bit_vector.h" |
| 8 #include "vm/dart_entry.h" | 8 #include "vm/dart_entry.h" |
| 9 #include "vm/flow_graph_allocator.h" | 9 #include "vm/flow_graph_allocator.h" |
| 10 #include "vm/flow_graph_builder.h" | 10 #include "vm/flow_graph_builder.h" |
| (...skipping 1321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1332 Label load_true, done; | 1332 Label load_true, done; |
| 1333 __ j(true_condition, &load_true, Assembler::kNearJump); | 1333 __ j(true_condition, &load_true, Assembler::kNearJump); |
| 1334 __ LoadObject(result, compiler->bool_false()); | 1334 __ LoadObject(result, compiler->bool_false()); |
| 1335 __ jmp(&done, Assembler::kNearJump); | 1335 __ jmp(&done, Assembler::kNearJump); |
| 1336 __ Bind(&load_true); | 1336 __ Bind(&load_true); |
| 1337 __ LoadObject(result, compiler->bool_true()); | 1337 __ LoadObject(result, compiler->bool_true()); |
| 1338 __ Bind(&done); | 1338 __ Bind(&done); |
| 1339 } | 1339 } |
| 1340 | 1340 |
| 1341 | 1341 |
| 1342 void StrictCompareComp::EmitBranchCode(FlowGraphCompiler* compiler, |
| 1343 BranchInstr* branch) { |
| 1344 Register left = locs()->in(0).reg(); |
| 1345 Register right = locs()->in(1).reg(); |
| 1346 ASSERT(kind() == Token::kEQ_STRICT || kind() == Token::kNE_STRICT); |
| 1347 Condition true_condition = (kind() == Token::kEQ_STRICT) ? EQUAL : NOT_EQUAL; |
| 1348 __ CompareRegisters(left, right); |
| 1349 branch->EmitBranchOnCondition(compiler, true_condition); |
| 1350 } |
| 1351 |
| 1352 |
| 1342 void ClosureCallComp::EmitNativeCode(FlowGraphCompiler* compiler) { | 1353 void ClosureCallComp::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 1343 // The arguments to the stub include the closure. The arguments | 1354 // The arguments to the stub include the closure. The arguments |
| 1344 // descriptor describes the closure's arguments (and so does not include | 1355 // descriptor describes the closure's arguments (and so does not include |
| 1345 // the closure). | 1356 // the closure). |
| 1346 Register temp_reg = locs()->temp(0).reg(); | 1357 Register temp_reg = locs()->temp(0).reg(); |
| 1347 int argument_count = ArgumentCount(); | 1358 int argument_count = ArgumentCount(); |
| 1348 const Array& arguments_descriptor = | 1359 const Array& arguments_descriptor = |
| 1349 DartEntry::ArgumentsDescriptor(argument_count - 1, | 1360 DartEntry::ArgumentsDescriptor(argument_count - 1, |
| 1350 argument_names()); | 1361 argument_names()); |
| 1351 __ LoadObject(temp_reg, arguments_descriptor); | 1362 __ LoadObject(temp_reg, arguments_descriptor); |
| (...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1569 use->AddToEnvUseList(); | 1580 use->AddToEnvUseList(); |
| 1570 } | 1581 } |
| 1571 } | 1582 } |
| 1572 instr->set_env(copy); | 1583 instr->set_env(copy); |
| 1573 } | 1584 } |
| 1574 | 1585 |
| 1575 | 1586 |
| 1576 #undef __ | 1587 #undef __ |
| 1577 | 1588 |
| 1578 } // namespace dart | 1589 } // namespace dart |
| OLD | NEW |