| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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_KERNEL_TO_IL_H_ | 5 #ifndef RUNTIME_VM_KERNEL_TO_IL_H_ |
| 6 #define RUNTIME_VM_KERNEL_TO_IL_H_ | 6 #define RUNTIME_VM_KERNEL_TO_IL_H_ |
| 7 | 7 |
| 8 #if !defined(DART_PRECOMPILED_RUNTIME) | 8 #if !defined(DART_PRECOMPILED_RUNTIME) |
| 9 | 9 |
| 10 #include "vm/growable_array.h" | 10 #include "vm/growable_array.h" |
| (...skipping 543 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 554 virtual void VisitTryCatch(TryCatch* node); | 554 virtual void VisitTryCatch(TryCatch* node); |
| 555 virtual void VisitTryFinally(TryFinally* node); | 555 virtual void VisitTryFinally(TryFinally* node); |
| 556 virtual void VisitYieldStatement(YieldStatement* node); | 556 virtual void VisitYieldStatement(YieldStatement* node); |
| 557 virtual void VisitAssertStatement(AssertStatement* node); | 557 virtual void VisitAssertStatement(AssertStatement* node); |
| 558 | 558 |
| 559 virtual void VisitFunctionNode(FunctionNode* node); | 559 virtual void VisitFunctionNode(FunctionNode* node); |
| 560 | 560 |
| 561 virtual void VisitConstructor(Constructor* node); | 561 virtual void VisitConstructor(Constructor* node); |
| 562 | 562 |
| 563 private: | 563 private: |
| 564 void EnterScope(TreeNode* node); | 564 void EnterScope(TreeNode* node, TokenPosition start_position); |
| 565 void ExitScope(); | 565 void ExitScope(TokenPosition end_position); |
| 566 | 566 |
| 567 const Type& TranslateVariableType(VariableDeclaration* variable); | 567 const Type& TranslateVariableType(VariableDeclaration* variable); |
| 568 LocalVariable* MakeVariable(const dart::String& name, | 568 LocalVariable* MakeVariable(TokenPosition declaration_pos, |
| 569 TokenPosition token_pos, |
| 570 const dart::String& name, |
| 569 const AbstractType& type); | 571 const AbstractType& type); |
| 570 | 572 |
| 571 void AddParameters(FunctionNode* function, intptr_t pos = 0); | 573 void AddParameters(FunctionNode* function, intptr_t pos = 0); |
| 572 void AddParameter(VariableDeclaration* declaration, intptr_t pos); | 574 void AddParameter(VariableDeclaration* declaration, intptr_t pos); |
| 573 void AddVariable(VariableDeclaration* declaration); | 575 void AddVariable(VariableDeclaration* declaration); |
| 574 void AddExceptionVariable(GrowableArray<LocalVariable*>* variables, | 576 void AddExceptionVariable(GrowableArray<LocalVariable*>* variables, |
| 575 const char* prefix, | 577 const char* prefix, |
| 576 intptr_t nesting_depth); | 578 intptr_t nesting_depth); |
| 577 void AddTryVariables(); | 579 void AddTryVariables(); |
| 578 void AddCatchVariables(); | 580 void AddCatchVariables(); |
| (...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 795 intptr_t offset, | 797 intptr_t offset, |
| 796 const Type& type, | 798 const Type& type, |
| 797 intptr_t class_id, | 799 intptr_t class_id, |
| 798 bool is_immutable = false); | 800 bool is_immutable = false); |
| 799 Fragment LoadLocal(LocalVariable* variable); | 801 Fragment LoadLocal(LocalVariable* variable); |
| 800 Fragment InitStaticField(const dart::Field& field); | 802 Fragment InitStaticField(const dart::Field& field); |
| 801 Fragment LoadStaticField(); | 803 Fragment LoadStaticField(); |
| 802 Fragment NullConstant(); | 804 Fragment NullConstant(); |
| 803 Fragment NativeCall(const dart::String* name, const Function* function); | 805 Fragment NativeCall(const dart::String* name, const Function* function); |
| 804 Fragment PushArgument(); | 806 Fragment PushArgument(); |
| 805 Fragment Return(); | 807 Fragment Return(TokenPosition position); |
| 806 Fragment StaticCall(TokenPosition position, | 808 Fragment StaticCall(TokenPosition position, |
| 807 const Function& target, | 809 const Function& target, |
| 808 intptr_t argument_count); | 810 intptr_t argument_count); |
| 809 Fragment StaticCall(TokenPosition position, | 811 Fragment StaticCall(TokenPosition position, |
| 810 const Function& target, | 812 const Function& target, |
| 811 intptr_t argument_count, | 813 intptr_t argument_count, |
| 812 const Array& argument_names); | 814 const Array& argument_names); |
| 813 Fragment StoreIndexed(intptr_t class_id); | 815 Fragment StoreIndexed(intptr_t class_id); |
| 814 Fragment StoreInstanceFieldGuarded(const dart::Field& field); | 816 Fragment StoreInstanceFieldGuarded(const dart::Field& field); |
| 815 Fragment StoreInstanceField( | 817 Fragment StoreInstanceField( |
| 816 const dart::Field& field, | 818 const dart::Field& field, |
| 817 StoreBarrierType emit_store_barrier = kEmitStoreBarrier); | 819 StoreBarrierType emit_store_barrier = kEmitStoreBarrier); |
| 818 Fragment StoreInstanceField( | 820 Fragment StoreInstanceField( |
| 819 intptr_t offset, | 821 intptr_t offset, |
| 820 StoreBarrierType emit_store_barrier = kEmitStoreBarrier); | 822 StoreBarrierType emit_store_barrier = kEmitStoreBarrier); |
| 821 Fragment StoreLocal(LocalVariable* variable); | 823 Fragment StoreLocal(TokenPosition position, LocalVariable* variable); |
| 822 Fragment StoreStaticField(const dart::Field& field); | 824 Fragment StoreStaticField(const dart::Field& field); |
| 823 Fragment StringInterpolate(); | 825 Fragment StringInterpolate(TokenPosition position); |
| 824 Fragment ThrowTypeError(); | 826 Fragment ThrowTypeError(); |
| 825 Fragment ThrowNoSuchMethodError(); | 827 Fragment ThrowNoSuchMethodError(); |
| 826 Fragment BuildImplicitClosureCreation(const Function& target); | 828 Fragment BuildImplicitClosureCreation(const Function& target); |
| 827 Fragment GuardFieldLength(const dart::Field& field, intptr_t deopt_id); | 829 Fragment GuardFieldLength(const dart::Field& field, intptr_t deopt_id); |
| 828 Fragment GuardFieldClass(const dart::Field& field, intptr_t deopt_id); | 830 Fragment GuardFieldClass(const dart::Field& field, intptr_t deopt_id); |
| 829 | 831 |
| 830 dart::RawFunction* LookupMethodByMember(Member* target, | 832 dart::RawFunction* LookupMethodByMember(Member* target, |
| 831 const dart::String& method_name); | 833 const dart::String& method_name); |
| 832 | 834 |
| 833 LocalVariable* MakeTemporary(); | 835 LocalVariable* MakeTemporary(); |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 941 friend class SwitchBlock; | 943 friend class SwitchBlock; |
| 942 friend class TryCatchBlock; | 944 friend class TryCatchBlock; |
| 943 friend class TryFinallyBlock; | 945 friend class TryFinallyBlock; |
| 944 }; | 946 }; |
| 945 | 947 |
| 946 } // namespace kernel | 948 } // namespace kernel |
| 947 } // namespace dart | 949 } // namespace dart |
| 948 | 950 |
| 949 #endif // !defined(DART_PRECOMPILED_RUNTIME) | 951 #endif // !defined(DART_PRECOMPILED_RUNTIME) |
| 950 #endif // RUNTIME_VM_KERNEL_TO_IL_H_ | 952 #endif // RUNTIME_VM_KERNEL_TO_IL_H_ |
| OLD | NEW |