| 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/globals.h" // Needed here to get TARGET_ARCH_X64. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64. |
| 6 #if defined(TARGET_ARCH_X64) | 6 #if defined(TARGET_ARCH_X64) |
| 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 14 matching lines...) Expand all Loading... |
| 25 // on the stack and return the result in a fixed register RAX. | 25 // on the stack and return the result in a fixed register RAX. |
| 26 LocationSummary* Computation::MakeCallSummary() { | 26 LocationSummary* Computation::MakeCallSummary() { |
| 27 LocationSummary* result = new LocationSummary(0, 0, LocationSummary::kCall); | 27 LocationSummary* result = new LocationSummary(0, 0, LocationSummary::kCall); |
| 28 result->set_out(Location::RegisterLocation(RAX)); | 28 result->set_out(Location::RegisterLocation(RAX)); |
| 29 return result; | 29 return result; |
| 30 } | 30 } |
| 31 | 31 |
| 32 | 32 |
| 33 void BindInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 33 void BindInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 34 computation()->EmitNativeCode(compiler); | 34 computation()->EmitNativeCode(compiler); |
| 35 if (locs()->out().kind() == Location::kRegister) { | 35 if (is_used() && locs()->out().kind() == Location::kRegister) { |
| 36 // TODO(vegorov): this should really happen only for comparisons fused | 36 // TODO(vegorov): this should really happen only for comparisons fused |
| 37 // with branches. Currrently IR does not provide an easy way to remove | 37 // with branches. Currrently IR does not provide an easy way to remove |
| 38 // instructions from the graph so we just leave fused comparison in it | 38 // instructions from the graph so we just leave fused comparison in it |
| 39 // but change its result location to be NoLocation. | 39 // but change its result location to be NoLocation. |
| 40 compiler->frame_register_allocator()->Push(locs()->out().reg(), this); | 40 compiler->frame_register_allocator()->Push(locs()->out().reg(), this); |
| 41 } | 41 } |
| 42 } | 42 } |
| 43 | 43 |
| 44 | 44 |
| 45 LocationSummary* ReturnInstr::MakeLocationSummary() const { | 45 LocationSummary* ReturnInstr::MakeLocationSummary() const { |
| (...skipping 1933 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1979 instance_call()->argument_names()); | 1979 instance_call()->argument_names()); |
| 1980 } | 1980 } |
| 1981 __ Bind(&done); | 1981 __ Bind(&done); |
| 1982 } | 1982 } |
| 1983 | 1983 |
| 1984 } // namespace dart | 1984 } // namespace dart |
| 1985 | 1985 |
| 1986 #undef __ | 1986 #undef __ |
| 1987 | 1987 |
| 1988 #endif // defined TARGET_ARCH_X64 | 1988 #endif // defined TARGET_ARCH_X64 |
| OLD | NEW |