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 422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
433 M(IndirectEntry) \ | 433 M(IndirectEntry) \ |
434 M(CatchBlockEntry) \ | 434 M(CatchBlockEntry) \ |
435 M(Phi) \ | 435 M(Phi) \ |
436 M(Redefinition) \ | 436 M(Redefinition) \ |
437 M(Parameter) \ | 437 M(Parameter) \ |
438 M(ParallelMove) \ | 438 M(ParallelMove) \ |
439 M(PushArgument) \ | 439 M(PushArgument) \ |
440 M(Return) \ | 440 M(Return) \ |
441 M(Throw) \ | 441 M(Throw) \ |
442 M(ReThrow) \ | 442 M(ReThrow) \ |
| 443 M(Stop) \ |
443 M(Goto) \ | 444 M(Goto) \ |
444 M(IndirectGoto) \ | 445 M(IndirectGoto) \ |
445 M(Branch) \ | 446 M(Branch) \ |
446 M(AssertAssignable) \ | 447 M(AssertAssignable) \ |
447 M(AssertBoolean) \ | 448 M(AssertBoolean) \ |
448 M(CurrentContext) \ | 449 M(CurrentContext) \ |
449 M(ClosureCall) \ | 450 M(ClosureCall) \ |
450 M(InstanceCall) \ | 451 M(InstanceCall) \ |
451 M(PolymorphicInstanceCall) \ | 452 M(PolymorphicInstanceCall) \ |
452 M(StaticCall) \ | 453 M(StaticCall) \ |
(...skipping 1665 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2118 virtual EffectSet Effects() const { return EffectSet::None(); } | 2119 virtual EffectSet Effects() const { return EffectSet::None(); } |
2119 | 2120 |
2120 private: | 2121 private: |
2121 const intptr_t token_pos_; | 2122 const intptr_t token_pos_; |
2122 const intptr_t catch_try_index_; | 2123 const intptr_t catch_try_index_; |
2123 | 2124 |
2124 DISALLOW_COPY_AND_ASSIGN(ReThrowInstr); | 2125 DISALLOW_COPY_AND_ASSIGN(ReThrowInstr); |
2125 }; | 2126 }; |
2126 | 2127 |
2127 | 2128 |
| 2129 class StopInstr : public TemplateInstruction<0, NoThrow> { |
| 2130 public: |
| 2131 explicit StopInstr(const char* message) |
| 2132 : message_(message) { |
| 2133 ASSERT(message != NULL); |
| 2134 } |
| 2135 |
| 2136 const char* message() const { return message_; } |
| 2137 |
| 2138 DECLARE_INSTRUCTION(Stop); |
| 2139 |
| 2140 virtual intptr_t ArgumentCount() const { return 0; } |
| 2141 |
| 2142 virtual bool CanDeoptimize() const { return false; } |
| 2143 |
| 2144 virtual EffectSet Effects() const { return EffectSet::None(); } |
| 2145 |
| 2146 virtual EffectSet Dependencies() const { return EffectSet::None(); } |
| 2147 |
| 2148 private: |
| 2149 const char* message_; |
| 2150 |
| 2151 DISALLOW_COPY_AND_ASSIGN(StopInstr); |
| 2152 }; |
| 2153 |
| 2154 |
2128 class GotoInstr : public TemplateInstruction<0, NoThrow> { | 2155 class GotoInstr : public TemplateInstruction<0, NoThrow> { |
2129 public: | 2156 public: |
2130 explicit GotoInstr(JoinEntryInstr* entry) | 2157 explicit GotoInstr(JoinEntryInstr* entry) |
2131 : TemplateInstruction(Isolate::Current()->GetNextDeoptId()), | 2158 : TemplateInstruction(Isolate::Current()->GetNextDeoptId()), |
2132 successor_(entry), | 2159 successor_(entry), |
2133 edge_weight_(0.0), | 2160 edge_weight_(0.0), |
2134 parallel_move_(NULL) { | 2161 parallel_move_(NULL) { |
2135 } | 2162 } |
2136 | 2163 |
2137 DECLARE_INSTRUCTION(Goto) | 2164 DECLARE_INSTRUCTION(Goto) |
(...skipping 5937 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8075 LocationSummary* Name::MakeLocationSummary(Zone* zone, bool opt) const { \ | 8102 LocationSummary* Name::MakeLocationSummary(Zone* zone, bool opt) const { \ |
8076 UNIMPLEMENTED(); \ | 8103 UNIMPLEMENTED(); \ |
8077 return NULL; \ | 8104 return NULL; \ |
8078 } \ | 8105 } \ |
8079 void Name::EmitNativeCode(FlowGraphCompiler* compiler) { UNIMPLEMENTED(); } | 8106 void Name::EmitNativeCode(FlowGraphCompiler* compiler) { UNIMPLEMENTED(); } |
8080 | 8107 |
8081 | 8108 |
8082 } // namespace dart | 8109 } // namespace dart |
8083 | 8110 |
8084 #endif // VM_INTERMEDIATE_LANGUAGE_H_ | 8111 #endif // VM_INTERMEDIATE_LANGUAGE_H_ |
OLD | NEW |