| 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 #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 1716 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  1727  |  1727  | 
|  1728  private: |  1728  private: | 
|  1729   intptr_t temp_index_; |  1729   intptr_t temp_index_; | 
|  1730   Computation* computation_; |  1730   Computation* computation_; | 
|  1731   Instruction* successor_; |  1731   Instruction* successor_; | 
|  1732  |  1732  | 
|  1733   DISALLOW_COPY_AND_ASSIGN(BindInstr); |  1733   DISALLOW_COPY_AND_ASSIGN(BindInstr); | 
|  1734 }; |  1734 }; | 
|  1735  |  1735  | 
|  1736  |  1736  | 
|  1737 class ReturnInstr : public Instruction { |  1737 class ReturnInstr : public InstructionWithInputs { | 
|  1738  public: |  1738  public: | 
|  1739   ReturnInstr(intptr_t token_index, Value* value) |  1739   ReturnInstr(intptr_t token_index, Value* value) | 
|  1740       : token_index_(token_index), value_(value) { |  1740       : InstructionWithInputs(), token_index_(token_index), value_(value) { | 
|  1741     ASSERT(value_ != NULL); |  1741     ASSERT(value_ != NULL); | 
|  1742   } |  1742   } | 
|  1743  |  1743  | 
|  1744   DECLARE_INSTRUCTION(Return) |  1744   DECLARE_INSTRUCTION(Return) | 
|  1745  |  1745  | 
|  1746   Value* value() const { return value_; } |  1746   Value* value() const { return value_; } | 
|  1747   intptr_t token_index() const { return token_index_; } |  1747   intptr_t token_index() const { return token_index_; } | 
|  1748  |  1748  | 
|  1749   virtual Instruction* StraightLineSuccessor() const { return NULL; } |  1749   virtual Instruction* StraightLineSuccessor() const { return NULL; } | 
|  1750   virtual void SetSuccessor(Instruction* instr) { UNREACHABLE(); } |  1750   virtual void SetSuccessor(Instruction* instr) { UNREACHABLE(); } | 
|  1751  |  1751  | 
 |  1752   virtual LocationSummary* MakeLocationSummary() const; | 
 |  1753  | 
 |  1754   virtual void EmitNativeCode(FlowGraphCompiler* compiler); | 
 |  1755  | 
|  1752  private: |  1756  private: | 
|  1753   const intptr_t token_index_; |  1757   const intptr_t token_index_; | 
|  1754   Value* value_; |  1758   Value* value_; | 
|  1755  |  1759  | 
|  1756   DISALLOW_COPY_AND_ASSIGN(ReturnInstr); |  1760   DISALLOW_COPY_AND_ASSIGN(ReturnInstr); | 
|  1757 }; |  1761 }; | 
|  1758  |  1762  | 
|  1759  |  1763  | 
|  1760 class ThrowInstr : public InstructionWithInputs { |  1764 class ThrowInstr : public InstructionWithInputs { | 
|  1761  public: |  1765  public: | 
|  1762   ThrowInstr(intptr_t token_index, |  1766   ThrowInstr(intptr_t token_index, | 
|  1763              intptr_t try_index, |  1767              intptr_t try_index, | 
|  1764              Value* exception) |  1768              Value* exception) | 
|  1765       : token_index_(token_index), |  1769       : InstructionWithInputs(), | 
 |  1770         token_index_(token_index), | 
|  1766         try_index_(try_index), |  1771         try_index_(try_index), | 
|  1767         exception_(exception), |  1772         exception_(exception), | 
|  1768         successor_(NULL) { |  1773         successor_(NULL) { | 
|  1769     ASSERT(exception_ != NULL); |  1774     ASSERT(exception_ != NULL); | 
|  1770   } |  1775   } | 
|  1771  |  1776  | 
|  1772   DECLARE_INSTRUCTION(Throw) |  1777   DECLARE_INSTRUCTION(Throw) | 
|  1773  |  1778  | 
|  1774   intptr_t token_index() const { return token_index_; } |  1779   intptr_t token_index() const { return token_index_; } | 
|  1775   intptr_t try_index() const { return try_index_; } |  1780   intptr_t try_index() const { return try_index_; } | 
| (...skipping 19 matching lines...) Expand all  Loading... | 
|  1795   DISALLOW_COPY_AND_ASSIGN(ThrowInstr); |  1800   DISALLOW_COPY_AND_ASSIGN(ThrowInstr); | 
|  1796 }; |  1801 }; | 
|  1797  |  1802  | 
|  1798  |  1803  | 
|  1799 class ReThrowInstr : public InstructionWithInputs { |  1804 class ReThrowInstr : public InstructionWithInputs { | 
|  1800  public: |  1805  public: | 
|  1801   ReThrowInstr(intptr_t token_index, |  1806   ReThrowInstr(intptr_t token_index, | 
|  1802                intptr_t try_index, |  1807                intptr_t try_index, | 
|  1803                Value* exception, |  1808                Value* exception, | 
|  1804                Value* stack_trace) |  1809                Value* stack_trace) | 
|  1805       : token_index_(token_index), |  1810       : InstructionWithInputs(), | 
 |  1811         token_index_(token_index), | 
|  1806         try_index_(try_index), |  1812         try_index_(try_index), | 
|  1807         exception_(exception), |  1813         exception_(exception), | 
|  1808         stack_trace_(stack_trace), |  1814         stack_trace_(stack_trace), | 
|  1809         successor_(NULL) { |  1815         successor_(NULL) { | 
|  1810     ASSERT(exception_ != NULL); |  1816     ASSERT(exception_ != NULL); | 
|  1811     ASSERT(stack_trace_ != NULL); |  1817     ASSERT(stack_trace_ != NULL); | 
|  1812   } |  1818   } | 
|  1813  |  1819  | 
|  1814   DECLARE_INSTRUCTION(ReThrow) |  1820   DECLARE_INSTRUCTION(ReThrow) | 
|  1815  |  1821  | 
| (...skipping 22 matching lines...) Expand all  Loading... | 
|  1838   Value* stack_trace_; |  1844   Value* stack_trace_; | 
|  1839   Instruction* successor_; |  1845   Instruction* successor_; | 
|  1840  |  1846  | 
|  1841   DISALLOW_COPY_AND_ASSIGN(ReThrowInstr); |  1847   DISALLOW_COPY_AND_ASSIGN(ReThrowInstr); | 
|  1842 }; |  1848 }; | 
|  1843  |  1849  | 
|  1844  |  1850  | 
|  1845 class BranchInstr : public InstructionWithInputs { |  1851 class BranchInstr : public InstructionWithInputs { | 
|  1846  public: |  1852  public: | 
|  1847   explicit BranchInstr(Value* value) |  1853   explicit BranchInstr(Value* value) | 
|  1848       : value_(value), |  1854       : InstructionWithInputs(), | 
 |  1855         value_(value), | 
|  1849         true_successor_(NULL), |  1856         true_successor_(NULL), | 
|  1850         false_successor_(NULL) { } |  1857         false_successor_(NULL) { } | 
|  1851  |  1858  | 
|  1852   DECLARE_INSTRUCTION(Branch) |  1859   DECLARE_INSTRUCTION(Branch) | 
|  1853  |  1860  | 
|  1854   Value* value() const { return value_; } |  1861   Value* value() const { return value_; } | 
|  1855   TargetEntryInstr* true_successor() const { return true_successor_; } |  1862   TargetEntryInstr* true_successor() const { return true_successor_; } | 
|  1856   TargetEntryInstr* false_successor() const { return false_successor_; } |  1863   TargetEntryInstr* false_successor() const { return false_successor_; } | 
|  1857  |  1864  | 
|  1858   TargetEntryInstr** true_successor_address() { return &true_successor_; } |  1865   TargetEntryInstr** true_successor_address() { return &true_successor_; } | 
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  1921   const GrowableArray<BlockEntryInstr*>& block_order_; |  1928   const GrowableArray<BlockEntryInstr*>& block_order_; | 
|  1922  |  1929  | 
|  1923  private: |  1930  private: | 
|  1924   DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); |  1931   DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); | 
|  1925 }; |  1932 }; | 
|  1926  |  1933  | 
|  1927  |  1934  | 
|  1928 }  // namespace dart |  1935 }  // namespace dart | 
|  1929  |  1936  | 
|  1930 #endif  // VM_INTERMEDIATE_LANGUAGE_H_ |  1937 #endif  // VM_INTERMEDIATE_LANGUAGE_H_ | 
| OLD | NEW |