| 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 RUNTIME_VM_INTERMEDIATE_LANGUAGE_H_ | 5 #ifndef RUNTIME_VM_INTERMEDIATE_LANGUAGE_H_ |
| 6 #define RUNTIME_VM_INTERMEDIATE_LANGUAGE_H_ | 6 #define RUNTIME_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 1451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1462 | 1462 |
| 1463 PRINT_TO_SUPPORT | 1463 PRINT_TO_SUPPORT |
| 1464 | 1464 |
| 1465 private: | 1465 private: |
| 1466 const intptr_t indirect_id_; | 1466 const intptr_t indirect_id_; |
| 1467 }; | 1467 }; |
| 1468 | 1468 |
| 1469 | 1469 |
| 1470 class CatchBlockEntryInstr : public BlockEntryInstr { | 1470 class CatchBlockEntryInstr : public BlockEntryInstr { |
| 1471 public: | 1471 public: |
| 1472 CatchBlockEntryInstr(TokenPosition handler_token_pos, | 1472 CatchBlockEntryInstr(intptr_t block_id, |
| 1473 bool is_generated, | |
| 1474 intptr_t block_id, | |
| 1475 intptr_t try_index, | 1473 intptr_t try_index, |
| 1476 GraphEntryInstr* graph_entry, | 1474 GraphEntryInstr* graph_entry, |
| 1477 const Array& handler_types, | 1475 const Array& handler_types, |
| 1478 intptr_t catch_try_index, | 1476 intptr_t catch_try_index, |
| 1479 const LocalVariable& exception_var, | 1477 const LocalVariable& exception_var, |
| 1480 const LocalVariable& stacktrace_var, | 1478 const LocalVariable& stacktrace_var, |
| 1481 bool needs_stacktrace, | 1479 bool needs_stacktrace, |
| 1482 intptr_t deopt_id, | 1480 intptr_t deopt_id, |
| 1483 bool should_restore_closure_context = false) | 1481 bool should_restore_closure_context = false) |
| 1484 : BlockEntryInstr(block_id, try_index), | 1482 : BlockEntryInstr(block_id, try_index), |
| 1485 graph_entry_(graph_entry), | 1483 graph_entry_(graph_entry), |
| 1486 predecessor_(NULL), | 1484 predecessor_(NULL), |
| 1487 catch_handler_types_(Array::ZoneHandle(handler_types.raw())), | 1485 catch_handler_types_(Array::ZoneHandle(handler_types.raw())), |
| 1488 catch_try_index_(catch_try_index), | 1486 catch_try_index_(catch_try_index), |
| 1489 exception_var_(exception_var), | 1487 exception_var_(exception_var), |
| 1490 stacktrace_var_(stacktrace_var), | 1488 stacktrace_var_(stacktrace_var), |
| 1491 needs_stacktrace_(needs_stacktrace), | 1489 needs_stacktrace_(needs_stacktrace), |
| 1492 should_restore_closure_context_(should_restore_closure_context), | 1490 should_restore_closure_context_(should_restore_closure_context) { |
| 1493 handler_token_pos_(handler_token_pos), | |
| 1494 is_generated_(is_generated) { | |
| 1495 deopt_id_ = deopt_id; | 1491 deopt_id_ = deopt_id; |
| 1496 } | 1492 } |
| 1497 | 1493 |
| 1498 DECLARE_INSTRUCTION(CatchBlockEntry) | 1494 DECLARE_INSTRUCTION(CatchBlockEntry) |
| 1499 | 1495 |
| 1500 virtual intptr_t PredecessorCount() const { | 1496 virtual intptr_t PredecessorCount() const { |
| 1501 return (predecessor_ == NULL) ? 0 : 1; | 1497 return (predecessor_ == NULL) ? 0 : 1; |
| 1502 } | 1498 } |
| 1503 virtual BlockEntryInstr* PredecessorAt(intptr_t index) const { | 1499 virtual BlockEntryInstr* PredecessorAt(intptr_t index) const { |
| 1504 ASSERT((index == 0) && (predecessor_ != NULL)); | 1500 ASSERT((index == 0) && (predecessor_ != NULL)); |
| 1505 return predecessor_; | 1501 return predecessor_; |
| 1506 } | 1502 } |
| 1507 | 1503 |
| 1508 GraphEntryInstr* graph_entry() const { return graph_entry_; } | 1504 GraphEntryInstr* graph_entry() const { return graph_entry_; } |
| 1509 | 1505 |
| 1510 const LocalVariable& exception_var() const { return exception_var_; } | 1506 const LocalVariable& exception_var() const { return exception_var_; } |
| 1511 const LocalVariable& stacktrace_var() const { return stacktrace_var_; } | 1507 const LocalVariable& stacktrace_var() const { return stacktrace_var_; } |
| 1512 | 1508 |
| 1513 bool needs_stacktrace() const { return needs_stacktrace_; } | 1509 bool needs_stacktrace() const { return needs_stacktrace_; } |
| 1514 | 1510 |
| 1515 bool is_generated() const { return is_generated_; } | |
| 1516 TokenPosition handler_token_pos() const { return handler_token_pos_; } | |
| 1517 | |
| 1518 // Returns try index for the try block to which this catch handler | 1511 // Returns try index for the try block to which this catch handler |
| 1519 // corresponds. | 1512 // corresponds. |
| 1520 intptr_t catch_try_index() const { return catch_try_index_; } | 1513 intptr_t catch_try_index() const { return catch_try_index_; } |
| 1521 GrowableArray<Definition*>* initial_definitions() { | 1514 GrowableArray<Definition*>* initial_definitions() { |
| 1522 return &initial_definitions_; | 1515 return &initial_definitions_; |
| 1523 } | 1516 } |
| 1524 | 1517 |
| 1525 PRINT_TO_SUPPORT | 1518 PRINT_TO_SUPPORT |
| 1526 | 1519 |
| 1527 private: | 1520 private: |
| (...skipping 13 matching lines...) Expand all Loading... |
| 1541 | 1534 |
| 1542 GraphEntryInstr* graph_entry_; | 1535 GraphEntryInstr* graph_entry_; |
| 1543 BlockEntryInstr* predecessor_; | 1536 BlockEntryInstr* predecessor_; |
| 1544 const Array& catch_handler_types_; | 1537 const Array& catch_handler_types_; |
| 1545 const intptr_t catch_try_index_; | 1538 const intptr_t catch_try_index_; |
| 1546 GrowableArray<Definition*> initial_definitions_; | 1539 GrowableArray<Definition*> initial_definitions_; |
| 1547 const LocalVariable& exception_var_; | 1540 const LocalVariable& exception_var_; |
| 1548 const LocalVariable& stacktrace_var_; | 1541 const LocalVariable& stacktrace_var_; |
| 1549 const bool needs_stacktrace_; | 1542 const bool needs_stacktrace_; |
| 1550 const bool should_restore_closure_context_; | 1543 const bool should_restore_closure_context_; |
| 1551 TokenPosition handler_token_pos_; | |
| 1552 bool is_generated_; | |
| 1553 | 1544 |
| 1554 DISALLOW_COPY_AND_ASSIGN(CatchBlockEntryInstr); | 1545 DISALLOW_COPY_AND_ASSIGN(CatchBlockEntryInstr); |
| 1555 }; | 1546 }; |
| 1556 | 1547 |
| 1557 | 1548 |
| 1558 // If the result of the allocation is not stored into any field, passed | 1549 // If the result of the allocation is not stored into any field, passed |
| 1559 // as an argument or used in a phi then it can't alias with any other | 1550 // as an argument or used in a phi then it can't alias with any other |
| 1560 // SSA value. | 1551 // SSA value. |
| 1561 class AliasIdentity : public ValueObject { | 1552 class AliasIdentity : public ValueObject { |
| 1562 public: | 1553 public: |
| (...skipping 6480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8043 LocationSummary* Name::MakeLocationSummary(Zone* zone, bool opt) const { \ | 8034 LocationSummary* Name::MakeLocationSummary(Zone* zone, bool opt) const { \ |
| 8044 UNIMPLEMENTED(); \ | 8035 UNIMPLEMENTED(); \ |
| 8045 return NULL; \ | 8036 return NULL; \ |
| 8046 } \ | 8037 } \ |
| 8047 void Name::EmitNativeCode(FlowGraphCompiler* compiler) { UNIMPLEMENTED(); } | 8038 void Name::EmitNativeCode(FlowGraphCompiler* compiler) { UNIMPLEMENTED(); } |
| 8048 | 8039 |
| 8049 | 8040 |
| 8050 } // namespace dart | 8041 } // namespace dart |
| 8051 | 8042 |
| 8052 #endif // RUNTIME_VM_INTERMEDIATE_LANGUAGE_H_ | 8043 #endif // RUNTIME_VM_INTERMEDIATE_LANGUAGE_H_ |
| OLD | NEW |