| 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 1450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1461 | 1461 |
| 1462 | 1462 |
| 1463 LocationSummary* GotoInstr::MakeLocationSummary() const { | 1463 LocationSummary* GotoInstr::MakeLocationSummary() const { |
| 1464 return new LocationSummary(0, 0, LocationSummary::kNoCall); | 1464 return new LocationSummary(0, 0, LocationSummary::kNoCall); |
| 1465 } | 1465 } |
| 1466 | 1466 |
| 1467 | 1467 |
| 1468 void GotoInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 1468 void GotoInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 1469 // Add deoptimization descriptor for deoptimizing instructions | 1469 // Add deoptimization descriptor for deoptimizing instructions |
| 1470 // that may be inserted before this instruction. | 1470 // that may be inserted before this instruction. |
| 1471 compiler->AddCurrentDescriptor(PcDescriptors::kDeoptBefore, | 1471 if (!compiler->is_optimizing()) { |
| 1472 GetDeoptId(), | 1472 compiler->AddCurrentDescriptor(PcDescriptors::kDeoptBefore, |
| 1473 0); // No token position. | 1473 GetDeoptId(), |
| 1474 0); // No token position. |
| 1475 } |
| 1474 | 1476 |
| 1475 if (HasParallelMove()) { | 1477 if (HasParallelMove()) { |
| 1476 compiler->parallel_move_resolver()->EmitNativeCode(parallel_move()); | 1478 compiler->parallel_move_resolver()->EmitNativeCode(parallel_move()); |
| 1477 } | 1479 } |
| 1478 | 1480 |
| 1479 // We can fall through if the successor is the next block in the list. | 1481 // We can fall through if the successor is the next block in the list. |
| 1480 // Otherwise, we need a jump. | 1482 // Otherwise, we need a jump. |
| 1481 if (!compiler->IsNextBlock(successor())) { | 1483 if (!compiler->IsNextBlock(successor())) { |
| 1482 __ jmp(compiler->GetBlockLabel(successor())); | 1484 __ jmp(compiler->GetBlockLabel(successor())); |
| 1483 } | 1485 } |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1612 __ Drop(argument_count); | 1614 __ Drop(argument_count); |
| 1613 } | 1615 } |
| 1614 | 1616 |
| 1615 | 1617 |
| 1616 LocationSummary* InstanceCallInstr::MakeLocationSummary() const { | 1618 LocationSummary* InstanceCallInstr::MakeLocationSummary() const { |
| 1617 return MakeCallSummary(); | 1619 return MakeCallSummary(); |
| 1618 } | 1620 } |
| 1619 | 1621 |
| 1620 | 1622 |
| 1621 void InstanceCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 1623 void InstanceCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 1622 compiler->AddCurrentDescriptor(PcDescriptors::kDeoptBefore, | 1624 if (!compiler->is_optimizing()) { |
| 1623 deopt_id(), | 1625 compiler->AddCurrentDescriptor(PcDescriptors::kDeoptBefore, |
| 1624 token_pos()); | 1626 deopt_id(), |
| 1627 token_pos()); |
| 1628 } |
| 1625 compiler->GenerateInstanceCall(deopt_id(), | 1629 compiler->GenerateInstanceCall(deopt_id(), |
| 1626 token_pos(), | 1630 token_pos(), |
| 1627 function_name(), | 1631 function_name(), |
| 1628 ArgumentCount(), | 1632 ArgumentCount(), |
| 1629 argument_names(), | 1633 argument_names(), |
| 1630 checked_argument_count(), | 1634 checked_argument_count(), |
| 1631 locs()); | 1635 locs()); |
| 1632 } | 1636 } |
| 1633 | 1637 |
| 1634 | 1638 |
| (...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1996 new_max = new_max.Clamp(); | 2000 new_max = new_max.Clamp(); |
| 1997 } | 2001 } |
| 1998 | 2002 |
| 1999 return Range::Update(&range_, new_min, new_max); | 2003 return Range::Update(&range_, new_min, new_max); |
| 2000 } | 2004 } |
| 2001 | 2005 |
| 2002 | 2006 |
| 2003 #undef __ | 2007 #undef __ |
| 2004 | 2008 |
| 2005 } // namespace dart | 2009 } // namespace dart |
| OLD | NEW |