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

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

Issue 2803853004: Reland: VM [KERNEL] Avoid emitting :expr_temp and capturing :iterator (Closed)
Patch Set: VM [KERNEL] Avoid emitting :expr_temp and capturing :iterator Created 3 years, 8 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
« no previous file with comments | « runtime/observatory/tests/service/service.status ('k') | runtime/vm/kernel_to_il.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 622 matching lines...) Expand 10 before | Expand all | Expand 10 after
633 parsed_function_(parsed_function), 633 parsed_function_(parsed_function),
634 node_(node), 634 node_(node),
635 translation_helper_(Thread::Current()), 635 translation_helper_(Thread::Current()),
636 zone_(translation_helper_.zone()), 636 zone_(translation_helper_.zone()),
637 type_translator_(&translation_helper_, 637 type_translator_(&translation_helper_,
638 &active_class_, 638 &active_class_,
639 /*finalize=*/true), 639 /*finalize=*/true),
640 current_function_scope_(NULL), 640 current_function_scope_(NULL),
641 scope_(NULL), 641 scope_(NULL),
642 depth_(0), 642 depth_(0),
643 name_index_(0) {} 643 name_index_(0),
644 needs_expr_temp_(false) {}
644 645
645 virtual ~ScopeBuilder() {} 646 virtual ~ScopeBuilder() {}
646 647
647 ScopeBuildingResult* BuildScopes(); 648 ScopeBuildingResult* BuildScopes();
648 649
649 virtual void VisitName(Name* node) { /* NOP */ 650 virtual void VisitName(Name* node) { /* NOP */
650 } 651 }
651 652
652 virtual void VisitThisExpression(ThisExpression* node); 653 virtual void VisitThisExpression(ThisExpression* node);
653 virtual void VisitTypeParameterType(TypeParameterType* node); 654 virtual void VisitTypeParameterType(TypeParameterType* node);
654 virtual void VisitVariableGet(VariableGet* node); 655 virtual void VisitVariableGet(VariableGet* node);
655 virtual void VisitVariableSet(VariableSet* node); 656 virtual void VisitVariableSet(VariableSet* node);
657 virtual void VisitConditionalExpression(ConditionalExpression* node);
658 virtual void VisitLogicalExpression(LogicalExpression* node);
656 virtual void VisitFunctionExpression(FunctionExpression* node); 659 virtual void VisitFunctionExpression(FunctionExpression* node);
657 virtual void VisitLet(Let* node); 660 virtual void VisitLet(Let* node);
658 virtual void VisitBlock(Block* node); 661 virtual void VisitBlock(Block* node);
659 virtual void VisitVariableDeclaration(VariableDeclaration* node); 662 virtual void VisitVariableDeclaration(VariableDeclaration* node);
660 virtual void VisitFunctionDeclaration(FunctionDeclaration* node); 663 virtual void VisitFunctionDeclaration(FunctionDeclaration* node);
661 virtual void VisitWhileStatement(WhileStatement* node); 664 virtual void VisitWhileStatement(WhileStatement* node);
662 virtual void VisitDoStatement(DoStatement* node); 665 virtual void VisitDoStatement(DoStatement* node);
663 virtual void VisitForStatement(ForStatement* node); 666 virtual void VisitForStatement(ForStatement* node);
664 virtual void VisitForInStatement(ForInStatement* node); 667 virtual void VisitForInStatement(ForInStatement* node);
665 virtual void VisitSwitchStatement(SwitchStatement* node); 668 virtual void VisitSwitchStatement(SwitchStatement* node);
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
732 TranslationHelper translation_helper_; 735 TranslationHelper translation_helper_;
733 Zone* zone_; 736 Zone* zone_;
734 DartTypeTranslator type_translator_; 737 DartTypeTranslator type_translator_;
735 738
736 FunctionNode* current_function_node_; 739 FunctionNode* current_function_node_;
737 LocalScope* current_function_scope_; 740 LocalScope* current_function_scope_;
738 LocalScope* scope_; 741 LocalScope* scope_;
739 DepthState depth_; 742 DepthState depth_;
740 743
741 intptr_t name_index_; 744 intptr_t name_index_;
745
746 bool needs_expr_temp_;
742 }; 747 };
743 748
744 class FlowGraphBuilder : public ExpressionVisitor, public StatementVisitor { 749 class FlowGraphBuilder : public ExpressionVisitor, public StatementVisitor {
745 public: 750 public:
746 FlowGraphBuilder(TreeNode* node, 751 FlowGraphBuilder(TreeNode* node,
747 ParsedFunction* parsed_function, 752 ParsedFunction* parsed_function,
748 const ZoneGrowableArray<const ICData*>& ic_data_array, 753 const ZoneGrowableArray<const ICData*>& ic_data_array,
749 InlineExitCollector* exit_collector, 754 InlineExitCollector* exit_collector,
750 intptr_t osr_id, 755 intptr_t osr_id,
751 intptr_t first_block_id = 1); 756 intptr_t first_block_id = 1);
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after
1130 namespace kernel { 1135 namespace kernel {
1131 1136
1132 RawObject* EvaluateMetadata(TreeNode* const kernel_node); 1137 RawObject* EvaluateMetadata(TreeNode* const kernel_node);
1133 RawObject* BuildParameterDescriptor(TreeNode* const kernel_node); 1138 RawObject* BuildParameterDescriptor(TreeNode* const kernel_node);
1134 1139
1135 } // namespace kernel 1140 } // namespace kernel
1136 } // namespace dart 1141 } // namespace dart
1137 1142
1138 #endif // !defined(DART_PRECOMPILED_RUNTIME) 1143 #endif // !defined(DART_PRECOMPILED_RUNTIME)
1139 #endif // RUNTIME_VM_KERNEL_TO_IL_H_ 1144 #endif // RUNTIME_VM_KERNEL_TO_IL_H_
OLDNEW
« no previous file with comments | « runtime/observatory/tests/service/service.status ('k') | runtime/vm/kernel_to_il.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698