Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(148)

Side by Side Diff: runtime/vm/kernel_to_il.h

Issue 2628693004: TokenPositions on more nodes when running from Kernel (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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(
569 const AbstractType& type); 569 const dart::String& name,
570 const AbstractType& type,
571 TokenPosition declaration_pos = TokenPosition::kNoSource,
572 TokenPosition token_pos = TokenPosition::kNoSource);
570 573
571 void AddParameters(FunctionNode* function, intptr_t pos = 0); 574 void AddParameters(FunctionNode* function, intptr_t pos = 0);
572 void AddParameter(VariableDeclaration* declaration, intptr_t pos); 575 void AddParameter(VariableDeclaration* declaration, intptr_t pos);
573 void AddVariable(VariableDeclaration* declaration); 576 void AddVariable(VariableDeclaration* declaration);
574 void AddExceptionVariable(GrowableArray<LocalVariable*>* variables, 577 void AddExceptionVariable(GrowableArray<LocalVariable*>* variables,
575 const char* prefix, 578 const char* prefix,
576 intptr_t nesting_depth); 579 intptr_t nesting_depth);
577 void AddTryVariables(); 580 void AddTryVariables();
578 void AddCatchVariables(); 581 void AddCatchVariables();
579 void AddIteratorVariable(); 582 void AddIteratorVariable();
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
795 intptr_t offset, 798 intptr_t offset,
796 const Type& type, 799 const Type& type,
797 intptr_t class_id, 800 intptr_t class_id,
798 bool is_immutable = false); 801 bool is_immutable = false);
799 Fragment LoadLocal(LocalVariable* variable); 802 Fragment LoadLocal(LocalVariable* variable);
800 Fragment InitStaticField(const dart::Field& field); 803 Fragment InitStaticField(const dart::Field& field);
801 Fragment LoadStaticField(); 804 Fragment LoadStaticField();
802 Fragment NullConstant(); 805 Fragment NullConstant();
803 Fragment NativeCall(const dart::String* name, const Function* function); 806 Fragment NativeCall(const dart::String* name, const Function* function);
804 Fragment PushArgument(); 807 Fragment PushArgument();
805 Fragment Return(); 808 Fragment Return(TokenPosition position = TokenPosition::kNoSource);
Kevin Millikin (Google) 2017/01/12 13:43:04 None of the other methods have default values for
jensj 2017/01/13 10:14:44 Done.
806 Fragment StaticCall(TokenPosition position, 809 Fragment StaticCall(TokenPosition position,
807 const Function& target, 810 const Function& target,
808 intptr_t argument_count); 811 intptr_t argument_count);
809 Fragment StaticCall(TokenPosition position, 812 Fragment StaticCall(TokenPosition position,
810 const Function& target, 813 const Function& target,
811 intptr_t argument_count, 814 intptr_t argument_count,
812 const Array& argument_names); 815 const Array& argument_names);
813 Fragment StoreIndexed(intptr_t class_id); 816 Fragment StoreIndexed(intptr_t class_id);
814 Fragment StoreInstanceFieldGuarded(const dart::Field& field); 817 Fragment StoreInstanceFieldGuarded(const dart::Field& field);
815 Fragment StoreInstanceField( 818 Fragment StoreInstanceField(
816 const dart::Field& field, 819 const dart::Field& field,
817 StoreBarrierType emit_store_barrier = kEmitStoreBarrier); 820 StoreBarrierType emit_store_barrier = kEmitStoreBarrier);
818 Fragment StoreInstanceField( 821 Fragment StoreInstanceField(
819 intptr_t offset, 822 intptr_t offset,
820 StoreBarrierType emit_store_barrier = kEmitStoreBarrier); 823 StoreBarrierType emit_store_barrier = kEmitStoreBarrier);
821 Fragment StoreLocal(LocalVariable* variable); 824 Fragment StoreLocal(LocalVariable* variable,
825 TokenPosition position = TokenPosition::kNoSource);
Kevin Millikin (Google) 2017/01/12 13:43:04 Also here, I'd make this required. For consistenc
jensj 2017/01/13 10:14:44 Done.
822 Fragment StoreStaticField(const dart::Field& field); 826 Fragment StoreStaticField(const dart::Field& field);
823 Fragment StringInterpolate(); 827 Fragment StringInterpolate(TokenPosition position);
824 Fragment ThrowTypeError(); 828 Fragment ThrowTypeError();
825 Fragment ThrowNoSuchMethodError(); 829 Fragment ThrowNoSuchMethodError();
826 Fragment BuildImplicitClosureCreation(const Function& target); 830 Fragment BuildImplicitClosureCreation(const Function& target);
827 Fragment GuardFieldLength(const dart::Field& field, intptr_t deopt_id); 831 Fragment GuardFieldLength(const dart::Field& field, intptr_t deopt_id);
828 Fragment GuardFieldClass(const dart::Field& field, intptr_t deopt_id); 832 Fragment GuardFieldClass(const dart::Field& field, intptr_t deopt_id);
829 833
830 dart::RawFunction* LookupMethodByMember(Member* target, 834 dart::RawFunction* LookupMethodByMember(Member* target,
831 const dart::String& method_name); 835 const dart::String& method_name);
832 836
833 LocalVariable* MakeTemporary(); 837 LocalVariable* MakeTemporary();
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
941 friend class SwitchBlock; 945 friend class SwitchBlock;
942 friend class TryCatchBlock; 946 friend class TryCatchBlock;
943 friend class TryFinallyBlock; 947 friend class TryFinallyBlock;
944 }; 948 };
945 949
946 } // namespace kernel 950 } // namespace kernel
947 } // namespace dart 951 } // namespace dart
948 952
949 #endif // !defined(DART_PRECOMPILED_RUNTIME) 953 #endif // !defined(DART_PRECOMPILED_RUNTIME)
950 #endif // RUNTIME_VM_KERNEL_TO_IL_H_ 954 #endif // RUNTIME_VM_KERNEL_TO_IL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698