| 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 #ifndef VM_INTERMEDIATE_LANGUAGE_H_ | 5 #ifndef VM_INTERMEDIATE_LANGUAGE_H_ |
| 6 #define VM_INTERMEDIATE_LANGUAGE_H_ | 6 #define VM_INTERMEDIATE_LANGUAGE_H_ |
| 7 | 7 |
| 8 #include "vm/allocation.h" | 8 #include "vm/allocation.h" |
| 9 #include "vm/ast.h" | 9 #include "vm/ast.h" |
| 10 #include "vm/growable_array.h" | 10 #include "vm/growable_array.h" |
| (...skipping 1540 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1551 | 1551 |
| 1552 private: | 1552 private: |
| 1553 const intptr_t indirect_id_; | 1553 const intptr_t indirect_id_; |
| 1554 }; | 1554 }; |
| 1555 | 1555 |
| 1556 | 1556 |
| 1557 class CatchBlockEntryInstr : public BlockEntryInstr { | 1557 class CatchBlockEntryInstr : public BlockEntryInstr { |
| 1558 public: | 1558 public: |
| 1559 CatchBlockEntryInstr(intptr_t block_id, | 1559 CatchBlockEntryInstr(intptr_t block_id, |
| 1560 intptr_t try_index, | 1560 intptr_t try_index, |
| 1561 GraphEntryInstr* graph_entry, |
| 1561 const Array& handler_types, | 1562 const Array& handler_types, |
| 1562 intptr_t catch_try_index, | 1563 intptr_t catch_try_index, |
| 1563 const LocalVariable& exception_var, | 1564 const LocalVariable& exception_var, |
| 1564 const LocalVariable& stacktrace_var, | 1565 const LocalVariable& stacktrace_var, |
| 1565 bool needs_stacktrace) | 1566 bool needs_stacktrace) |
| 1566 : BlockEntryInstr(block_id, try_index), | 1567 : BlockEntryInstr(block_id, try_index), |
| 1568 graph_entry_(graph_entry), |
| 1567 predecessor_(NULL), | 1569 predecessor_(NULL), |
| 1568 catch_handler_types_(Array::ZoneHandle(handler_types.raw())), | 1570 catch_handler_types_(Array::ZoneHandle(handler_types.raw())), |
| 1569 catch_try_index_(catch_try_index), | 1571 catch_try_index_(catch_try_index), |
| 1570 exception_var_(exception_var), | 1572 exception_var_(exception_var), |
| 1571 stacktrace_var_(stacktrace_var), | 1573 stacktrace_var_(stacktrace_var), |
| 1572 needs_stacktrace_(needs_stacktrace) { } | 1574 needs_stacktrace_(needs_stacktrace) { } |
| 1573 | 1575 |
| 1574 DECLARE_INSTRUCTION(CatchBlockEntry) | 1576 DECLARE_INSTRUCTION(CatchBlockEntry) |
| 1575 | 1577 |
| 1576 virtual intptr_t PredecessorCount() const { | 1578 virtual intptr_t PredecessorCount() const { |
| 1577 return (predecessor_ == NULL) ? 0 : 1; | 1579 return (predecessor_ == NULL) ? 0 : 1; |
| 1578 } | 1580 } |
| 1579 virtual BlockEntryInstr* PredecessorAt(intptr_t index) const { | 1581 virtual BlockEntryInstr* PredecessorAt(intptr_t index) const { |
| 1580 ASSERT((index == 0) && (predecessor_ != NULL)); | 1582 ASSERT((index == 0) && (predecessor_ != NULL)); |
| 1581 return predecessor_; | 1583 return predecessor_; |
| 1582 } | 1584 } |
| 1583 | 1585 |
| 1586 GraphEntryInstr* graph_entry() const { return graph_entry_; } |
| 1587 |
| 1584 const LocalVariable& exception_var() const { return exception_var_; } | 1588 const LocalVariable& exception_var() const { return exception_var_; } |
| 1585 const LocalVariable& stacktrace_var() const { return stacktrace_var_; } | 1589 const LocalVariable& stacktrace_var() const { return stacktrace_var_; } |
| 1586 | 1590 |
| 1587 bool needs_stacktrace() const { return needs_stacktrace_; } | 1591 bool needs_stacktrace() const { return needs_stacktrace_; } |
| 1588 | 1592 |
| 1589 // Returns try index for the try block to which this catch handler | 1593 // Returns try index for the try block to which this catch handler |
| 1590 // corresponds. | 1594 // corresponds. |
| 1591 intptr_t catch_try_index() const { | 1595 intptr_t catch_try_index() const { |
| 1592 return catch_try_index_; | 1596 return catch_try_index_; |
| 1593 } | 1597 } |
| 1594 GrowableArray<Definition*>* initial_definitions() { | 1598 GrowableArray<Definition*>* initial_definitions() { |
| 1595 return &initial_definitions_; | 1599 return &initial_definitions_; |
| 1596 } | 1600 } |
| 1597 | 1601 |
| 1598 PRINT_TO_SUPPORT | 1602 PRINT_TO_SUPPORT |
| 1599 | 1603 |
| 1600 private: | 1604 private: |
| 1601 friend class BlockEntryInstr; // Access to predecessor_ when inlining. | 1605 friend class BlockEntryInstr; // Access to predecessor_ when inlining. |
| 1602 | 1606 |
| 1603 virtual void ClearPredecessors() { predecessor_ = NULL; } | 1607 virtual void ClearPredecessors() { predecessor_ = NULL; } |
| 1604 virtual void AddPredecessor(BlockEntryInstr* predecessor) { | 1608 virtual void AddPredecessor(BlockEntryInstr* predecessor) { |
| 1605 ASSERT(predecessor_ == NULL); | 1609 ASSERT(predecessor_ == NULL); |
| 1606 predecessor_ = predecessor; | 1610 predecessor_ = predecessor; |
| 1607 } | 1611 } |
| 1608 | 1612 |
| 1613 GraphEntryInstr* graph_entry_; |
| 1609 BlockEntryInstr* predecessor_; | 1614 BlockEntryInstr* predecessor_; |
| 1610 const Array& catch_handler_types_; | 1615 const Array& catch_handler_types_; |
| 1611 const intptr_t catch_try_index_; | 1616 const intptr_t catch_try_index_; |
| 1612 GrowableArray<Definition*> initial_definitions_; | 1617 GrowableArray<Definition*> initial_definitions_; |
| 1613 const LocalVariable& exception_var_; | 1618 const LocalVariable& exception_var_; |
| 1614 const LocalVariable& stacktrace_var_; | 1619 const LocalVariable& stacktrace_var_; |
| 1615 const bool needs_stacktrace_; | 1620 const bool needs_stacktrace_; |
| 1616 | 1621 |
| 1617 DISALLOW_COPY_AND_ASSIGN(CatchBlockEntryInstr); | 1622 DISALLOW_COPY_AND_ASSIGN(CatchBlockEntryInstr); |
| 1618 }; | 1623 }; |
| (...skipping 6641 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8260 LocationSummary* Name::MakeLocationSummary(Zone* zone, bool opt) const { \ | 8265 LocationSummary* Name::MakeLocationSummary(Zone* zone, bool opt) const { \ |
| 8261 UNIMPLEMENTED(); \ | 8266 UNIMPLEMENTED(); \ |
| 8262 return NULL; \ | 8267 return NULL; \ |
| 8263 } \ | 8268 } \ |
| 8264 void Name::EmitNativeCode(FlowGraphCompiler* compiler) { UNIMPLEMENTED(); } | 8269 void Name::EmitNativeCode(FlowGraphCompiler* compiler) { UNIMPLEMENTED(); } |
| 8265 | 8270 |
| 8266 | 8271 |
| 8267 } // namespace dart | 8272 } // namespace dart |
| 8268 | 8273 |
| 8269 #endif // VM_INTERMEDIATE_LANGUAGE_H_ | 8274 #endif // VM_INTERMEDIATE_LANGUAGE_H_ |
| OLD | NEW |