| 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 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 374 M(PushArgument) \ | 374 M(PushArgument) \ |
| 375 M(Return) \ | 375 M(Return) \ |
| 376 M(Throw) \ | 376 M(Throw) \ |
| 377 M(ReThrow) \ | 377 M(ReThrow) \ |
| 378 M(Stop) \ | 378 M(Stop) \ |
| 379 M(Goto) \ | 379 M(Goto) \ |
| 380 M(IndirectGoto) \ | 380 M(IndirectGoto) \ |
| 381 M(Branch) \ | 381 M(Branch) \ |
| 382 M(AssertAssignable) \ | 382 M(AssertAssignable) \ |
| 383 M(AssertBoolean) \ | 383 M(AssertBoolean) \ |
| 384 M(CurrentContext) \ | 384 M(SpecialParameter) \ |
| 385 M(ClosureCall) \ | 385 M(ClosureCall) \ |
| 386 M(InstanceCall) \ | 386 M(InstanceCall) \ |
| 387 M(PolymorphicInstanceCall) \ | 387 M(PolymorphicInstanceCall) \ |
| 388 M(StaticCall) \ | 388 M(StaticCall) \ |
| 389 M(LoadLocal) \ | 389 M(LoadLocal) \ |
| 390 M(DropTemps) \ | 390 M(DropTemps) \ |
| 391 M(StoreLocal) \ | 391 M(StoreLocal) \ |
| 392 M(StrictCompare) \ | 392 M(StrictCompare) \ |
| 393 M(EqualityCompare) \ | 393 M(EqualityCompare) \ |
| 394 M(RelationalOp) \ | 394 M(RelationalOp) \ |
| (...skipping 2334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2729 | 2729 |
| 2730 PRINT_OPERANDS_TO_SUPPORT | 2730 PRINT_OPERANDS_TO_SUPPORT |
| 2731 | 2731 |
| 2732 private: | 2732 private: |
| 2733 const TokenPosition token_pos_; | 2733 const TokenPosition token_pos_; |
| 2734 | 2734 |
| 2735 DISALLOW_COPY_AND_ASSIGN(AssertBooleanInstr); | 2735 DISALLOW_COPY_AND_ASSIGN(AssertBooleanInstr); |
| 2736 }; | 2736 }; |
| 2737 | 2737 |
| 2738 | 2738 |
| 2739 // Denotes the current context, normally held in a register. This is | 2739 // Denotes a special parameter, currently either the context of a closure |
| 2740 // a computation, not a value, because it's mutable. | 2740 // (normally held in a register) or the type arguments of a generic function. |
| 2741 class CurrentContextInstr : public TemplateDefinition<0, NoThrow> { | 2741 // This is a computation, not a value, because it's mutable. |
| 2742 class SpecialParameterInstr : public TemplateDefinition<0, NoThrow> { |
| 2742 public: | 2743 public: |
| 2743 explicit CurrentContextInstr(intptr_t deopt_id) | 2744 enum SpecialParameterKind { kContext, kTypeArgs }; |
| 2744 : TemplateDefinition(deopt_id) {} | 2745 SpecialParameterInstr(SpecialParameterKind kind, intptr_t deopt_id) |
| 2746 : TemplateDefinition(deopt_id), kind_(kind) {} |
| 2745 | 2747 |
| 2746 DECLARE_INSTRUCTION(CurrentContext) | 2748 DECLARE_INSTRUCTION(SpecialParameter) |
| 2747 virtual CompileType ComputeType() const; | 2749 virtual CompileType ComputeType() const; |
| 2748 | 2750 |
| 2749 virtual bool ComputeCanDeoptimize() const { return false; } | 2751 virtual bool ComputeCanDeoptimize() const { return false; } |
| 2750 | 2752 |
| 2751 virtual EffectSet Effects() const { return EffectSet::None(); } | 2753 virtual EffectSet Effects() const { return EffectSet::None(); } |
| 2752 virtual EffectSet Dependencies() const { return EffectSet::None(); } | 2754 virtual EffectSet Dependencies() const { return EffectSet::None(); } |
| 2753 virtual bool AttributesEqual(Instruction* other) const { return true; } | 2755 virtual bool AttributesEqual(Instruction* other) const { return true; } |
| 2756 SpecialParameterKind kind() const { return kind_; } |
| 2754 | 2757 |
| 2755 private: | 2758 private: |
| 2756 DISALLOW_COPY_AND_ASSIGN(CurrentContextInstr); | 2759 const SpecialParameterKind kind_; |
| 2760 DISALLOW_COPY_AND_ASSIGN(SpecialParameterInstr); |
| 2757 }; | 2761 }; |
| 2758 | 2762 |
| 2759 | 2763 |
| 2760 struct ArgumentsInfo { | 2764 struct ArgumentsInfo { |
| 2761 ArgumentsInfo(intptr_t type_args_len, | 2765 ArgumentsInfo(intptr_t type_args_len, |
| 2762 intptr_t pushed_argc, | 2766 intptr_t pushed_argc, |
| 2763 const Array& argument_names) | 2767 const Array& argument_names) |
| 2764 : type_args_len(type_args_len), | 2768 : type_args_len(type_args_len), |
| 2765 pushed_argc(pushed_argc), | 2769 pushed_argc(pushed_argc), |
| 2766 argument_names(argument_names) {} | 2770 argument_names(argument_names) {} |
| (...skipping 5468 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8235 LocationSummary* Name::MakeLocationSummary(Zone* zone, bool opt) const { \ | 8239 LocationSummary* Name::MakeLocationSummary(Zone* zone, bool opt) const { \ |
| 8236 UNIMPLEMENTED(); \ | 8240 UNIMPLEMENTED(); \ |
| 8237 return NULL; \ | 8241 return NULL; \ |
| 8238 } \ | 8242 } \ |
| 8239 void Name::EmitNativeCode(FlowGraphCompiler* compiler) { UNIMPLEMENTED(); } | 8243 void Name::EmitNativeCode(FlowGraphCompiler* compiler) { UNIMPLEMENTED(); } |
| 8240 | 8244 |
| 8241 | 8245 |
| 8242 } // namespace dart | 8246 } // namespace dart |
| 8243 | 8247 |
| 8244 #endif // RUNTIME_VM_INTERMEDIATE_LANGUAGE_H_ | 8248 #endif // RUNTIME_VM_INTERMEDIATE_LANGUAGE_H_ |
| OLD | NEW |