| 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 1823 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1834 } else { | 1834 } else { |
| 1835 __ CompareRegisters(left.reg(), right.reg()); | 1835 __ CompareRegisters(left.reg(), right.reg()); |
| 1836 } | 1836 } |
| 1837 | 1837 |
| 1838 Condition true_condition = (kind() == Token::kEQ_STRICT) ? EQUAL : NOT_EQUAL; | 1838 Condition true_condition = (kind() == Token::kEQ_STRICT) ? EQUAL : NOT_EQUAL; |
| 1839 branch->EmitBranchOnCondition(compiler, true_condition); | 1839 branch->EmitBranchOnCondition(compiler, true_condition); |
| 1840 } | 1840 } |
| 1841 | 1841 |
| 1842 | 1842 |
| 1843 void ClosureCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 1843 void ClosureCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 1844 // The arguments to the stub include the closure. The arguments | 1844 // The arguments to the stub include the closure, as does the arguments |
| 1845 // descriptor describes the closure's arguments (and so does not include | 1845 // descriptor. |
| 1846 // the closure). | |
| 1847 Register temp_reg = locs()->temp(0).reg(); | 1846 Register temp_reg = locs()->temp(0).reg(); |
| 1848 int argument_count = ArgumentCount(); | 1847 int argument_count = ArgumentCount(); |
| 1849 const Array& arguments_descriptor = | 1848 const Array& arguments_descriptor = |
| 1850 DartEntry::ArgumentsDescriptor(argument_count - 1, | 1849 DartEntry::ArgumentsDescriptor(argument_count, argument_names()); |
| 1851 argument_names()); | |
| 1852 __ LoadObject(temp_reg, arguments_descriptor); | 1850 __ LoadObject(temp_reg, arguments_descriptor); |
| 1853 compiler->GenerateDartCall(deopt_id(), | 1851 compiler->GenerateDartCall(deopt_id(), |
| 1854 token_pos(), | 1852 token_pos(), |
| 1855 &StubCode::CallClosureFunctionLabel(), | 1853 &StubCode::CallClosureFunctionLabel(), |
| 1856 PcDescriptors::kOther, | 1854 PcDescriptors::kOther, |
| 1857 locs()); | 1855 locs()); |
| 1858 __ Drop(argument_count); | 1856 __ Drop(argument_count); |
| 1859 } | 1857 } |
| 1860 | 1858 |
| 1861 | 1859 |
| (...skipping 784 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2646 return Array::length_offset(); | 2644 return Array::length_offset(); |
| 2647 default: | 2645 default: |
| 2648 UNREACHABLE(); | 2646 UNREACHABLE(); |
| 2649 return -1; | 2647 return -1; |
| 2650 } | 2648 } |
| 2651 } | 2649 } |
| 2652 | 2650 |
| 2653 #undef __ | 2651 #undef __ |
| 2654 | 2652 |
| 2655 } // namespace dart | 2653 } // namespace dart |
| OLD | NEW |