| 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/intermediate_language.h" | 5 #include "vm/intermediate_language.h" |
| 6 | 6 |
| 7 #include "vm/bigint_operations.h" | 7 #include "vm/bigint_operations.h" |
| 8 #include "vm/bit_vector.h" | 8 #include "vm/bit_vector.h" |
| 9 #include "vm/cpu.h" | 9 #include "vm/cpu.h" |
| 10 #include "vm/dart_entry.h" | 10 #include "vm/dart_entry.h" |
| (...skipping 2044 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2055 } | 2055 } |
| 2056 | 2056 |
| 2057 | 2057 |
| 2058 void PushTempInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 2058 void PushTempInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 2059 ASSERT(!compiler->is_optimizing()); | 2059 ASSERT(!compiler->is_optimizing()); |
| 2060 // Nothing to do. | 2060 // Nothing to do. |
| 2061 } | 2061 } |
| 2062 | 2062 |
| 2063 | 2063 |
| 2064 LocationSummary* DropTempsInstr::MakeLocationSummary(bool optimizing) const { | 2064 LocationSummary* DropTempsInstr::MakeLocationSummary(bool optimizing) const { |
| 2065 return LocationSummary::Make(1, | 2065 return (InputCount() != 0) |
| 2066 Location::SameAsFirstInput(), | 2066 ? LocationSummary::Make(1, |
| 2067 LocationSummary::kNoCall); | 2067 Location::SameAsFirstInput(), |
| 2068 LocationSummary::kNoCall) |
| 2069 : LocationSummary::Make(0, |
| 2070 Location::NoLocation(), |
| 2071 LocationSummary::kNoCall); |
| 2068 } | 2072 } |
| 2069 | 2073 |
| 2070 | 2074 |
| 2071 void DropTempsInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 2075 void DropTempsInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 2072 ASSERT(!compiler->is_optimizing()); | 2076 ASSERT(!compiler->is_optimizing()); |
| 2073 Register value = locs()->in(0).reg(); | 2077 // Assert that register assignment is correct. |
| 2074 Register result = locs()->out().reg(); | 2078 ASSERT((InputCount() == 0) || locs()->out().reg() == locs()->in(0).reg()); |
| 2075 ASSERT(result == value); // Assert that register assignment is correct. | |
| 2076 __ Drop(num_temps()); | 2079 __ Drop(num_temps()); |
| 2077 } | 2080 } |
| 2078 | 2081 |
| 2079 | 2082 |
| 2080 void StoreContextInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 2083 void StoreContextInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 2081 // Nothing to do. Context register was loaded by the register allocator. | 2084 // Nothing to do. Context register was loaded by the register allocator. |
| 2082 ASSERT(locs()->in(0).reg() == CTX); | 2085 ASSERT(locs()->in(0).reg() == CTX); |
| 2083 } | 2086 } |
| 2084 | 2087 |
| 2085 | 2088 |
| (...skipping 1146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3232 case Token::kTRUNCDIV: return 0; | 3235 case Token::kTRUNCDIV: return 0; |
| 3233 case Token::kMOD: return 1; | 3236 case Token::kMOD: return 1; |
| 3234 default: UNIMPLEMENTED(); return -1; | 3237 default: UNIMPLEMENTED(); return -1; |
| 3235 } | 3238 } |
| 3236 } | 3239 } |
| 3237 | 3240 |
| 3238 | 3241 |
| 3239 #undef __ | 3242 #undef __ |
| 3240 | 3243 |
| 3241 } // namespace dart | 3244 } // namespace dart |
| OLD | NEW |