| 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 547 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 558 M(AllocateObjectWithBoundsCheck) \ | 558 M(AllocateObjectWithBoundsCheck) \ |
| 559 M(LoadField) \ | 559 M(LoadField) \ |
| 560 M(StoreVMField) \ | 560 M(StoreVMField) \ |
| 561 M(LoadUntagged) \ | 561 M(LoadUntagged) \ |
| 562 M(LoadClassId) \ | 562 M(LoadClassId) \ |
| 563 M(InstantiateType) \ | 563 M(InstantiateType) \ |
| 564 M(InstantiateTypeArguments) \ | 564 M(InstantiateTypeArguments) \ |
| 565 M(ExtractConstructorTypeArguments) \ | 565 M(ExtractConstructorTypeArguments) \ |
| 566 M(ExtractConstructorInstantiator) \ | 566 M(ExtractConstructorInstantiator) \ |
| 567 M(AllocateContext) \ | 567 M(AllocateContext) \ |
| 568 M(ChainContext) \ | |
| 569 M(CloneContext) \ | 568 M(CloneContext) \ |
| 570 M(CatchEntry) \ | 569 M(CatchEntry) \ |
| 571 M(BinarySmiOp) \ | 570 M(BinarySmiOp) \ |
| 572 M(UnarySmiOp) \ | 571 M(UnarySmiOp) \ |
| 573 M(CheckStackOverflow) \ | 572 M(CheckStackOverflow) \ |
| 574 M(SmiToDouble) \ | 573 M(SmiToDouble) \ |
| 575 M(DoubleToInteger) \ | 574 M(DoubleToInteger) \ |
| 576 M(DoubleToSmi) \ | 575 M(DoubleToSmi) \ |
| 577 M(DoubleToDouble) \ | 576 M(DoubleToDouble) \ |
| 578 M(CheckClass) \ | 577 M(CheckClass) \ |
| (...skipping 3662 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4241 virtual bool MayThrow() const { return false; } | 4240 virtual bool MayThrow() const { return false; } |
| 4242 | 4241 |
| 4243 private: | 4242 private: |
| 4244 const intptr_t token_pos_; | 4243 const intptr_t token_pos_; |
| 4245 const intptr_t num_context_variables_; | 4244 const intptr_t num_context_variables_; |
| 4246 | 4245 |
| 4247 DISALLOW_COPY_AND_ASSIGN(AllocateContextInstr); | 4246 DISALLOW_COPY_AND_ASSIGN(AllocateContextInstr); |
| 4248 }; | 4247 }; |
| 4249 | 4248 |
| 4250 | 4249 |
| 4251 class ChainContextInstr : public TemplateInstruction<1> { | |
| 4252 public: | |
| 4253 explicit ChainContextInstr(Value* context_value) { | |
| 4254 SetInputAt(0, context_value); | |
| 4255 } | |
| 4256 | |
| 4257 DECLARE_INSTRUCTION(ChainContext) | |
| 4258 | |
| 4259 virtual intptr_t ArgumentCount() const { return 0; } | |
| 4260 | |
| 4261 Value* context_value() const { return inputs_[0]; } | |
| 4262 | |
| 4263 virtual bool CanDeoptimize() const { return false; } | |
| 4264 | |
| 4265 virtual EffectSet Effects() const { return EffectSet::None(); } | |
| 4266 | |
| 4267 virtual bool MayThrow() const { return false; } | |
| 4268 | |
| 4269 private: | |
| 4270 DISALLOW_COPY_AND_ASSIGN(ChainContextInstr); | |
| 4271 }; | |
| 4272 | |
| 4273 | |
| 4274 class CloneContextInstr : public TemplateDefinition<1> { | 4250 class CloneContextInstr : public TemplateDefinition<1> { |
| 4275 public: | 4251 public: |
| 4276 CloneContextInstr(intptr_t token_pos, Value* context_value) | 4252 CloneContextInstr(intptr_t token_pos, Value* context_value) |
| 4277 : token_pos_(token_pos) { | 4253 : token_pos_(token_pos) { |
| 4278 SetInputAt(0, context_value); | 4254 SetInputAt(0, context_value); |
| 4279 } | 4255 } |
| 4280 | 4256 |
| 4281 intptr_t token_pos() const { return token_pos_; } | 4257 intptr_t token_pos() const { return token_pos_; } |
| 4282 Value* context_value() const { return inputs_[0]; } | 4258 Value* context_value() const { return inputs_[0]; } |
| 4283 | 4259 |
| (...skipping 2235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6519 ForwardInstructionIterator* current_iterator_; | 6495 ForwardInstructionIterator* current_iterator_; |
| 6520 | 6496 |
| 6521 private: | 6497 private: |
| 6522 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); | 6498 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); |
| 6523 }; | 6499 }; |
| 6524 | 6500 |
| 6525 | 6501 |
| 6526 } // namespace dart | 6502 } // namespace dart |
| 6527 | 6503 |
| 6528 #endif // VM_INTERMEDIATE_LANGUAGE_H_ | 6504 #endif // VM_INTERMEDIATE_LANGUAGE_H_ |
| OLD | NEW |