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