| 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 1606 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1617 const intptr_t kNumInputs = 0; | 1617 const intptr_t kNumInputs = 0; |
| 1618 const intptr_t kNumTemps = 0; | 1618 const intptr_t kNumTemps = 0; |
| 1619 LocationSummary* locs = new(isolate) LocationSummary( | 1619 LocationSummary* locs = new(isolate) LocationSummary( |
| 1620 isolate, kNumInputs, kNumTemps, LocationSummary::kCall); | 1620 isolate, kNumInputs, kNumTemps, LocationSummary::kCall); |
| 1621 return locs; | 1621 return locs; |
| 1622 } | 1622 } |
| 1623 | 1623 |
| 1624 | 1624 |
| 1625 void DebugStepCheckInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 1625 void DebugStepCheckInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 1626 ASSERT(!compiler->is_optimizing()); | 1626 ASSERT(!compiler->is_optimizing()); |
| 1627 const ExternalLabel label("debug_step_check", | 1627 const ExternalLabel label(StubCode::DebugStepCheckEntryPoint()); |
| 1628 StubCode::DebugStepCheckEntryPoint()); | |
| 1629 compiler->GenerateCall(token_pos(), &label, stub_kind_, locs()); | 1628 compiler->GenerateCall(token_pos(), &label, stub_kind_, locs()); |
| 1630 } | 1629 } |
| 1631 | 1630 |
| 1632 | 1631 |
| 1633 Instruction* DebugStepCheckInstr::Canonicalize(FlowGraph* flow_graph) { | 1632 Instruction* DebugStepCheckInstr::Canonicalize(FlowGraph* flow_graph) { |
| 1634 return NULL; | 1633 return NULL; |
| 1635 } | 1634 } |
| 1636 | 1635 |
| 1637 | 1636 |
| 1638 static bool HasTryBlockUse(Value* use_list) { | 1637 static bool HasTryBlockUse(Value* use_list) { |
| (...skipping 544 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2183 const intptr_t kNumTemps = 0; | 2182 const intptr_t kNumTemps = 0; |
| 2184 LocationSummary* summary = new(isolate) LocationSummary( | 2183 LocationSummary* summary = new(isolate) LocationSummary( |
| 2185 isolate, kNumInputs, kNumTemps, LocationSummary::kNoCall); | 2184 isolate, kNumInputs, kNumTemps, LocationSummary::kNoCall); |
| 2186 summary->set_in(0, Location::RegisterLocation(CTX)); | 2185 summary->set_in(0, Location::RegisterLocation(CTX)); |
| 2187 return summary; | 2186 return summary; |
| 2188 } | 2187 } |
| 2189 | 2188 |
| 2190 | 2189 |
| 2191 LocationSummary* PushTempInstr::MakeLocationSummary(Isolate* isolate, | 2190 LocationSummary* PushTempInstr::MakeLocationSummary(Isolate* isolate, |
| 2192 bool optimizing) const { | 2191 bool optimizing) const { |
| 2193 return LocationSummary::Make(1, | 2192 return LocationSummary::Make(isolate, |
| 2193 1, |
| 2194 Location::NoLocation(), | 2194 Location::NoLocation(), |
| 2195 LocationSummary::kNoCall); | 2195 LocationSummary::kNoCall); |
| 2196 } | 2196 } |
| 2197 | 2197 |
| 2198 | 2198 |
| 2199 void PushTempInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 2199 void PushTempInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 2200 ASSERT(!compiler->is_optimizing()); | 2200 ASSERT(!compiler->is_optimizing()); |
| 2201 // Nothing to do. | 2201 // Nothing to do. |
| 2202 } | 2202 } |
| 2203 | 2203 |
| 2204 | 2204 |
| 2205 LocationSummary* DropTempsInstr::MakeLocationSummary(Isolate* isolate, | 2205 LocationSummary* DropTempsInstr::MakeLocationSummary(Isolate* isolate, |
| 2206 bool optimizing) const { | 2206 bool optimizing) const { |
| 2207 return (InputCount() == 1) | 2207 return (InputCount() == 1) |
| 2208 ? LocationSummary::Make(1, | 2208 ? LocationSummary::Make(isolate, |
| 2209 1, |
| 2209 Location::SameAsFirstInput(), | 2210 Location::SameAsFirstInput(), |
| 2210 LocationSummary::kNoCall) | 2211 LocationSummary::kNoCall) |
| 2211 : LocationSummary::Make(0, | 2212 : LocationSummary::Make(isolate, |
| 2213 0, |
| 2212 Location::NoLocation(), | 2214 Location::NoLocation(), |
| 2213 LocationSummary::kNoCall); | 2215 LocationSummary::kNoCall); |
| 2214 } | 2216 } |
| 2215 | 2217 |
| 2216 | 2218 |
| 2217 void DropTempsInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 2219 void DropTempsInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 2218 ASSERT(!compiler->is_optimizing()); | 2220 ASSERT(!compiler->is_optimizing()); |
| 2219 // Assert that register assignment is correct. | 2221 // Assert that register assignment is correct. |
| 2220 ASSERT((InputCount() == 0) || (locs()->out(0).reg() == locs()->in(0).reg())); | 2222 ASSERT((InputCount() == 0) || (locs()->out(0).reg() == locs()->in(0).reg())); |
| 2221 __ Drop(num_temps()); | 2223 __ Drop(num_temps()); |
| (...skipping 1231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3453 case Token::kTRUNCDIV: return 0; | 3455 case Token::kTRUNCDIV: return 0; |
| 3454 case Token::kMOD: return 1; | 3456 case Token::kMOD: return 1; |
| 3455 default: UNIMPLEMENTED(); return -1; | 3457 default: UNIMPLEMENTED(); return -1; |
| 3456 } | 3458 } |
| 3457 } | 3459 } |
| 3458 | 3460 |
| 3459 | 3461 |
| 3460 #undef __ | 3462 #undef __ |
| 3461 | 3463 |
| 3462 } // namespace dart | 3464 } // namespace dart |
| OLD | NEW |