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" |
11 #include "vm/hash_map.h" | 11 #include "vm/hash_map.h" |
12 | 12 |
13 #include "vm/flow_graph.h" | 13 #include "vm/flow_graph.h" |
14 #include "vm/flow_graph_builder.h" | 14 #include "vm/flow_graph_builder.h" |
15 #include "vm/intermediate_language.h" | 15 #include "vm/intermediate_language.h" |
16 #include "vm/kernel.h" | |
17 | 16 |
18 namespace dart { | 17 namespace dart { |
19 namespace kernel { | 18 namespace kernel { |
20 | 19 |
21 class StreamingFlowGraphBuilder; | 20 class StreamingFlowGraphBuilder; |
22 | 21 |
23 class KernelConstMapKeyEqualsTraits { | 22 class KernelConstMapKeyEqualsTraits { |
24 public: | 23 public: |
25 static const char* Name() { return "KernelConstMapKeyEqualsTraits"; } | 24 static const char* Name() { return "KernelConstMapKeyEqualsTraits"; } |
26 static bool ReportStats() { return false; } | 25 static bool ReportStats() { return false; } |
(...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
544 | 543 |
545 TranslationHelper& translation_helper_; | 544 TranslationHelper& translation_helper_; |
546 ActiveClass* active_class_; | 545 ActiveClass* active_class_; |
547 TypeParameterScope* type_parameter_scope_; | 546 TypeParameterScope* type_parameter_scope_; |
548 Zone* zone_; | 547 Zone* zone_; |
549 AbstractType& result_; | 548 AbstractType& result_; |
550 bool finalize_; | 549 bool finalize_; |
551 }; | 550 }; |
552 | 551 |
553 | 552 |
554 // There are several cases when we are compiling constant expressions: | |
555 // | |
556 // * constant field initializers: | |
557 // const FieldName = <expr>; | |
558 // | |
559 // * constant expressions: | |
560 // const [<expr>, ...] | |
561 // const {<expr> : <expr>, ...} | |
562 // const Constructor(<expr>, ...) | |
563 // | |
564 // * constant default parameters: | |
565 // f(a, [b = <expr>]) | |
566 // f(a, {b: <expr>}) | |
567 // | |
568 // * constant values to compare in a [SwitchCase] | |
569 // case <expr>: | |
570 // | |
571 // In all cases `<expr>` must be recursively evaluated and canonicalized at | |
572 // compile-time. | |
573 class ConstantEvaluator : public ExpressionVisitor { | |
574 public: | |
575 ConstantEvaluator(FlowGraphBuilder* builder, | |
576 Zone* zone, | |
577 TranslationHelper* h, | |
578 DartTypeTranslator* type_translator); | |
579 virtual ~ConstantEvaluator() {} | |
580 | |
581 Instance& EvaluateExpression(Expression* node); | |
582 Object& EvaluateExpressionSafe(Expression* node); | |
583 Instance& EvaluateConstructorInvocation(ConstructorInvocation* node); | |
584 Instance& EvaluateListLiteral(ListLiteral* node); | |
585 Instance& EvaluateMapLiteral(MapLiteral* node); | |
586 | |
587 virtual void VisitDefaultExpression(Expression* node) { UNREACHABLE(); } | |
588 | |
589 virtual void VisitBigintLiteral(BigintLiteral* node); | |
590 virtual void VisitBoolLiteral(BoolLiteral* node); | |
591 virtual void VisitDoubleLiteral(DoubleLiteral* node); | |
592 virtual void VisitIntLiteral(IntLiteral* node); | |
593 virtual void VisitNullLiteral(NullLiteral* node); | |
594 virtual void VisitStringLiteral(StringLiteral* node); | |
595 virtual void VisitSymbolLiteral(SymbolLiteral* node); | |
596 virtual void VisitTypeLiteral(TypeLiteral* node); | |
597 | |
598 virtual void VisitListLiteral(ListLiteral* node); | |
599 virtual void VisitMapLiteral(MapLiteral* node); | |
600 | |
601 virtual void VisitConstructorInvocation(ConstructorInvocation* node); | |
602 virtual void VisitMethodInvocation(MethodInvocation* node); | |
603 virtual void VisitStaticGet(StaticGet* node); | |
604 virtual void VisitVariableGet(VariableGet* node); | |
605 virtual void VisitLet(Let* node); | |
606 virtual void VisitStaticInvocation(StaticInvocation* node); | |
607 virtual void VisitStringConcatenation(StringConcatenation* node); | |
608 virtual void VisitConditionalExpression(ConditionalExpression* node); | |
609 virtual void VisitLogicalExpression(LogicalExpression* node); | |
610 virtual void VisitNot(Not* node); | |
611 virtual void VisitPropertyGet(PropertyGet* node); | |
612 | |
613 private: | |
614 // This will translate type arguments form [kernel_arguments]. If no type | |
615 // arguments are passed and the [target] is a factory then the null type | |
616 // argument array will be returned. | |
617 // | |
618 // If none of these cases apply, NULL will be returned. | |
619 const TypeArguments* TranslateTypeArguments(const Function& target, | |
620 dart::Class* target_klass, | |
621 Arguments* kernel_arguments); | |
622 | |
623 const Object& RunFunction(const Function& function, | |
624 Arguments* arguments, | |
625 const Instance* receiver = NULL, | |
626 const TypeArguments* type_args = NULL); | |
627 | |
628 const Object& RunFunction(const Function& function, | |
629 const Array& arguments, | |
630 const Array& names); | |
631 | |
632 RawObject* EvaluateConstConstructorCall(const dart::Class& type_class, | |
633 const TypeArguments& type_arguments, | |
634 const Function& constructor, | |
635 const Object& argument); | |
636 | |
637 void AssertBoolInCheckedMode() { | |
638 if (isolate_->type_checks() && !result_.IsBool()) { | |
639 translation_helper_.ReportError("Expected boolean expression."); | |
640 } | |
641 } | |
642 | |
643 bool EvaluateBooleanExpression(Expression* expression) { | |
644 EvaluateExpression(expression); | |
645 AssertBoolInCheckedMode(); | |
646 return result_.raw() == Bool::True().raw(); | |
647 } | |
648 | |
649 bool GetCachedConstant(TreeNode* node, Instance* value); | |
650 void CacheConstantValue(TreeNode* node, const Instance& value); | |
651 | |
652 FlowGraphBuilder* builder_; | |
653 Isolate* isolate_; | |
654 Zone* zone_; | |
655 TranslationHelper& translation_helper_; | |
656 DartTypeTranslator& type_translator_; | |
657 | |
658 Script& script_; | |
659 Instance& result_; | |
660 }; | |
661 | |
662 | |
663 struct FunctionScope { | 553 struct FunctionScope { |
664 intptr_t kernel_offset; | 554 intptr_t kernel_offset; |
665 LocalScope* scope; | 555 LocalScope* scope; |
666 }; | 556 }; |
667 | 557 |
668 | 558 |
669 class ScopeBuildingResult : public ZoneAllocated { | 559 class ScopeBuildingResult : public ZoneAllocated { |
670 public: | 560 public: |
671 ScopeBuildingResult() | 561 ScopeBuildingResult() |
672 : this_variable(NULL), | 562 : this_variable(NULL), |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
721 Instruction* entry; | 611 Instruction* entry; |
722 intptr_t try_index; | 612 intptr_t try_index; |
723 | 613 |
724 YieldContinuation(Instruction* entry, intptr_t try_index) | 614 YieldContinuation(Instruction* entry, intptr_t try_index) |
725 : entry(entry), try_index(try_index) {} | 615 : entry(entry), try_index(try_index) {} |
726 | 616 |
727 YieldContinuation() | 617 YieldContinuation() |
728 : entry(NULL), try_index(CatchClauseNode::kInvalidTryIndex) {} | 618 : entry(NULL), try_index(CatchClauseNode::kInvalidTryIndex) {} |
729 }; | 619 }; |
730 | 620 |
731 class FlowGraphBuilder : public ExpressionVisitor, public StatementVisitor { | 621 class FlowGraphBuilder { |
732 public: | 622 public: |
733 FlowGraphBuilder(TreeNode* node, | 623 FlowGraphBuilder(intptr_t kernel_offset, |
734 ParsedFunction* parsed_function, | 624 ParsedFunction* parsed_function, |
735 const ZoneGrowableArray<const ICData*>& ic_data_array, | 625 const ZoneGrowableArray<const ICData*>& ic_data_array, |
736 InlineExitCollector* exit_collector, | 626 InlineExitCollector* exit_collector, |
737 intptr_t osr_id, | 627 intptr_t osr_id, |
738 intptr_t first_block_id = 1); | 628 intptr_t first_block_id = 1); |
739 virtual ~FlowGraphBuilder(); | 629 virtual ~FlowGraphBuilder(); |
740 | 630 |
741 FlowGraph* BuildGraph(); | 631 FlowGraph* BuildGraph(); |
742 | 632 |
743 virtual void VisitDefaultExpression(Expression* node) { UNREACHABLE(); } | |
744 virtual void VisitDefaultStatement(Statement* node) { UNREACHABLE(); } | |
745 | |
746 virtual void VisitInvalidExpression(InvalidExpression* node); | |
747 virtual void VisitNullLiteral(NullLiteral* node); | |
748 virtual void VisitBoolLiteral(BoolLiteral* node); | |
749 virtual void VisitIntLiteral(IntLiteral* node); | |
750 virtual void VisitBigintLiteral(BigintLiteral* node); | |
751 virtual void VisitDoubleLiteral(DoubleLiteral* node); | |
752 virtual void VisitStringLiteral(StringLiteral* node); | |
753 virtual void VisitSymbolLiteral(SymbolLiteral* node); | |
754 virtual void VisitTypeLiteral(TypeLiteral* node); | |
755 virtual void VisitVariableGet(VariableGet* node); | |
756 virtual void VisitVariableSet(VariableSet* node); | |
757 virtual void VisitStaticGet(StaticGet* node); | |
758 virtual void VisitStaticSet(StaticSet* node); | |
759 virtual void VisitPropertyGet(PropertyGet* node); | |
760 virtual void VisitPropertySet(PropertySet* node); | |
761 virtual void VisitDirectPropertyGet(DirectPropertyGet* node); | |
762 virtual void VisitDirectPropertySet(DirectPropertySet* node); | |
763 virtual void VisitStaticInvocation(StaticInvocation* node); | |
764 virtual void VisitMethodInvocation(MethodInvocation* node); | |
765 virtual void VisitDirectMethodInvocation(DirectMethodInvocation* node); | |
766 virtual void VisitConstructorInvocation(ConstructorInvocation* node); | |
767 virtual void VisitIsExpression(IsExpression* node); | |
768 virtual void VisitAsExpression(AsExpression* node); | |
769 virtual void VisitConditionalExpression(ConditionalExpression* node); | |
770 virtual void VisitLogicalExpression(LogicalExpression* node); | |
771 virtual void VisitNot(Not* node); | |
772 virtual void VisitThisExpression(ThisExpression* node); | |
773 virtual void VisitStringConcatenation(StringConcatenation* node); | |
774 virtual void VisitListLiteral(ListLiteral* node); | |
775 virtual void VisitMapLiteral(MapLiteral* node); | |
776 virtual void VisitFunctionExpression(FunctionExpression* node); | |
777 virtual void VisitLet(Let* node); | |
778 virtual void VisitThrow(Throw* node); | |
779 virtual void VisitRethrow(Rethrow* node); | |
780 | |
781 virtual void VisitInvalidStatement(InvalidStatement* node); | |
782 virtual void VisitEmptyStatement(EmptyStatement* node); | |
783 virtual void VisitBlock(Block* node); | |
784 virtual void VisitReturnStatement(ReturnStatement* node); | |
785 virtual void VisitExpressionStatement(ExpressionStatement* node); | |
786 virtual void VisitVariableDeclaration(VariableDeclaration* node); | |
787 virtual void VisitFunctionDeclaration(FunctionDeclaration* node); | |
788 virtual void VisitIfStatement(IfStatement* node); | |
789 virtual void VisitWhileStatement(WhileStatement* node); | |
790 virtual void VisitDoStatement(DoStatement* node); | |
791 virtual void VisitForStatement(ForStatement* node); | |
792 virtual void VisitForInStatement(ForInStatement* node); | |
793 virtual void VisitLabeledStatement(LabeledStatement* node); | |
794 virtual void VisitBreakStatement(BreakStatement* node); | |
795 virtual void VisitSwitchStatement(SwitchStatement* node); | |
796 virtual void VisitContinueSwitchStatement(ContinueSwitchStatement* node); | |
797 virtual void VisitAssertStatement(AssertStatement* node); | |
798 virtual void VisitTryFinally(TryFinally* node); | |
799 virtual void VisitTryCatch(TryCatch* node); | |
800 virtual void VisitYieldStatement(YieldStatement* node); | |
801 | |
802 private: | 633 private: |
803 FlowGraph* BuildGraphOfFunction(FunctionNode* node, | |
804 Constructor* constructor = NULL); | |
805 FlowGraph* BuildGraphOfFieldAccessor(Field* node, | |
806 LocalVariable* setter_value); | |
807 FlowGraph* BuildGraphOfStaticFieldInitializer(Field* node); | |
808 FlowGraph* BuildGraphOfMethodExtractor(const Function& method); | 634 FlowGraph* BuildGraphOfMethodExtractor(const Function& method); |
809 FlowGraph* BuildGraphOfImplicitClosureFunction(FunctionNode* kernel_function, | |
810 const Function& function); | |
811 FlowGraph* BuildGraphOfNoSuchMethodDispatcher(const Function& function); | 635 FlowGraph* BuildGraphOfNoSuchMethodDispatcher(const Function& function); |
812 FlowGraph* BuildGraphOfInvokeFieldDispatcher(const Function& function); | 636 FlowGraph* BuildGraphOfInvokeFieldDispatcher(const Function& function); |
813 | 637 |
814 Fragment NativeFunctionBody(FunctionNode* kernel_function, | 638 Fragment NativeFunctionBody(intptr_t first_positional_offset, |
815 const Function& function); | 639 const Function& function); |
816 | 640 |
817 void SetupDefaultParameterValues(FunctionNode* function); | |
818 | |
819 TargetEntryInstr* BuildTargetEntry(); | 641 TargetEntryInstr* BuildTargetEntry(); |
820 JoinEntryInstr* BuildJoinEntry(); | 642 JoinEntryInstr* BuildJoinEntry(); |
821 JoinEntryInstr* BuildJoinEntry(intptr_t try_index); | 643 JoinEntryInstr* BuildJoinEntry(intptr_t try_index); |
822 | 644 |
823 Fragment TranslateArguments(Arguments* node, Array* argument_names); | |
824 ArgumentArray GetArguments(int count); | 645 ArgumentArray GetArguments(int count); |
825 | 646 |
826 Fragment TranslateInitializers(Class* kernel_class, | |
827 List<Initializer>* initialiers); | |
828 Fragment TranslateFieldInitializer(NameIndex canonical_name, | |
829 Expression* init); | |
830 | |
831 Fragment TranslateStatement(Statement* statement); | |
832 Fragment TranslateCondition(Expression* expression, bool* negate); | |
833 Fragment TranslateExpression(Expression* expression); | |
834 | |
835 Fragment TranslateFinallyFinalizers(TryFinallyBlock* outer_finally, | 647 Fragment TranslateFinallyFinalizers(TryFinallyBlock* outer_finally, |
836 intptr_t target_context_depth); | 648 intptr_t target_context_depth); |
837 | 649 |
838 Fragment TranslateFunctionNode(FunctionNode* node, TreeNode* parent); | |
839 | |
840 Fragment EnterScope(TreeNode* node, bool* new_context = NULL); | |
841 Fragment EnterScope(intptr_t kernel_offset, bool* new_context = NULL); | 650 Fragment EnterScope(intptr_t kernel_offset, bool* new_context = NULL); |
842 Fragment ExitScope(TreeNode* node); | |
843 Fragment ExitScope(intptr_t kernel_offset); | 651 Fragment ExitScope(intptr_t kernel_offset); |
844 | 652 |
845 Fragment LoadContextAt(int depth); | 653 Fragment LoadContextAt(int depth); |
846 Fragment AdjustContextTo(int depth); | 654 Fragment AdjustContextTo(int depth); |
847 | 655 |
848 Fragment PushContext(int size); | 656 Fragment PushContext(int size); |
849 Fragment PopContext(); | 657 Fragment PopContext(); |
850 | 658 |
851 Fragment LoadInstantiatorTypeArguments(); | 659 Fragment LoadInstantiatorTypeArguments(); |
852 Fragment LoadFunctionTypeArguments(); | 660 Fragment LoadFunctionTypeArguments(); |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
935 Fragment StringInterpolate(TokenPosition position); | 743 Fragment StringInterpolate(TokenPosition position); |
936 Fragment StringInterpolateSingle(TokenPosition position); | 744 Fragment StringInterpolateSingle(TokenPosition position); |
937 Fragment ThrowTypeError(); | 745 Fragment ThrowTypeError(); |
938 Fragment ThrowNoSuchMethodError(); | 746 Fragment ThrowNoSuchMethodError(); |
939 Fragment BuildImplicitClosureCreation(const Function& target); | 747 Fragment BuildImplicitClosureCreation(const Function& target); |
940 Fragment GuardFieldLength(const dart::Field& field, intptr_t deopt_id); | 748 Fragment GuardFieldLength(const dart::Field& field, intptr_t deopt_id); |
941 Fragment GuardFieldClass(const dart::Field& field, intptr_t deopt_id); | 749 Fragment GuardFieldClass(const dart::Field& field, intptr_t deopt_id); |
942 | 750 |
943 Fragment EvaluateAssertion(); | 751 Fragment EvaluateAssertion(); |
944 Fragment CheckReturnTypeInCheckedMode(); | 752 Fragment CheckReturnTypeInCheckedMode(); |
945 Fragment CheckVariableTypeInCheckedMode(VariableDeclaration* variable); | |
946 Fragment CheckVariableTypeInCheckedMode(const AbstractType& dst_type, | 753 Fragment CheckVariableTypeInCheckedMode(const AbstractType& dst_type, |
947 const dart::String& name_symbol); | 754 const dart::String& name_symbol); |
948 Fragment CheckBooleanInCheckedMode(); | 755 Fragment CheckBooleanInCheckedMode(); |
949 Fragment CheckAssignableInCheckedMode(const dart::AbstractType& dst_type, | 756 Fragment CheckAssignableInCheckedMode(const dart::AbstractType& dst_type, |
950 const dart::String& dst_name); | 757 const dart::String& dst_name); |
951 | 758 |
952 Fragment AssertBool(); | 759 Fragment AssertBool(); |
953 Fragment AssertAssignable(const dart::AbstractType& dst_type, | 760 Fragment AssertAssignable(const dart::AbstractType& dst_type, |
954 const dart::String& dst_name); | 761 const dart::String& dst_name); |
955 | 762 |
956 template <class Invocation> | |
957 bool RecognizeComparisonWithNull(Token::Kind token_kind, Invocation* node); | |
958 | |
959 bool NeedsDebugStepCheck(const Function& function, TokenPosition position); | 763 bool NeedsDebugStepCheck(const Function& function, TokenPosition position); |
960 bool NeedsDebugStepCheck(Value* value, TokenPosition position); | 764 bool NeedsDebugStepCheck(Value* value, TokenPosition position); |
961 Fragment DebugStepCheck(TokenPosition position); | 765 Fragment DebugStepCheck(TokenPosition position); |
962 | 766 |
963 dart::RawFunction* LookupMethodByMember(NameIndex target, | 767 dart::RawFunction* LookupMethodByMember(NameIndex target, |
964 const dart::String& method_name); | 768 const dart::String& method_name); |
965 | 769 |
966 LocalVariable* MakeTemporary(); | 770 LocalVariable* MakeTemporary(); |
967 LocalVariable* MakeNonTemporary(const dart::String& symbol); | 771 LocalVariable* MakeNonTemporary(const dart::String& symbol); |
968 | 772 |
969 intptr_t CurrentTryIndex(); | 773 intptr_t CurrentTryIndex(); |
970 intptr_t AllocateTryIndex() { return next_used_try_index_++; } | 774 intptr_t AllocateTryIndex() { return next_used_try_index_++; } |
971 | 775 |
972 void AddVariable(VariableDeclaration* declaration, LocalVariable* variable); | |
973 void AddParameter(VariableDeclaration* declaration, | |
974 LocalVariable* variable, | |
975 intptr_t pos); | |
976 dart::LocalVariable* LookupVariable(VariableDeclaration* var); | 776 dart::LocalVariable* LookupVariable(VariableDeclaration* var); |
977 dart::LocalVariable* LookupVariable(intptr_t kernel_offset); | 777 dart::LocalVariable* LookupVariable(intptr_t kernel_offset); |
978 | 778 |
979 void SetTempIndex(Definition* definition); | 779 void SetTempIndex(Definition* definition); |
980 | 780 |
981 void Push(Definition* definition); | 781 void Push(Definition* definition); |
982 Value* Pop(); | 782 Value* Pop(); |
983 Fragment Drop(); | 783 Fragment Drop(); |
984 | 784 |
985 bool IsInlining() { return exit_collector_ != NULL; } | 785 bool IsInlining() { return exit_collector_ != NULL; } |
986 | 786 |
987 Token::Kind MethodKind(const dart::String& name); | 787 Token::Kind MethodKind(const dart::String& name); |
988 | 788 |
989 void InlineBailout(const char* reason); | 789 void InlineBailout(const char* reason); |
990 | 790 |
991 TranslationHelper translation_helper_; | 791 TranslationHelper translation_helper_; |
992 Zone* zone_; | 792 Zone* zone_; |
993 | 793 |
994 // The node we are currently compiling (e.g. FunctionNode, Constructor, | 794 intptr_t kernel_offset_; |
995 // Field) | |
996 TreeNode* node_; | |
997 | 795 |
998 ParsedFunction* parsed_function_; | 796 ParsedFunction* parsed_function_; |
999 intptr_t osr_id_; | 797 intptr_t osr_id_; |
1000 const ZoneGrowableArray<const ICData*>& ic_data_array_; | 798 const ZoneGrowableArray<const ICData*>& ic_data_array_; |
1001 InlineExitCollector* exit_collector_; | 799 InlineExitCollector* exit_collector_; |
1002 | 800 |
1003 intptr_t next_block_id_; | 801 intptr_t next_block_id_; |
1004 intptr_t AllocateBlockId() { return next_block_id_++; } | 802 intptr_t AllocateBlockId() { return next_block_id_++; } |
1005 | 803 |
1006 intptr_t next_function_id_; | 804 intptr_t next_function_id_; |
1007 intptr_t AllocateFunctionId() { return next_function_id_++; } | 805 intptr_t AllocateFunctionId() { return next_function_id_++; } |
1008 | 806 |
1009 intptr_t context_depth_; | 807 intptr_t context_depth_; |
1010 intptr_t loop_depth_; | 808 intptr_t loop_depth_; |
1011 intptr_t try_depth_; | 809 intptr_t try_depth_; |
1012 intptr_t catch_depth_; | 810 intptr_t catch_depth_; |
1013 intptr_t for_in_depth_; | 811 intptr_t for_in_depth_; |
1014 Fragment fragment_; | |
1015 Value* stack_; | 812 Value* stack_; |
1016 intptr_t pending_argument_count_; | 813 intptr_t pending_argument_count_; |
1017 | 814 |
1018 GraphEntryInstr* graph_entry_; | 815 GraphEntryInstr* graph_entry_; |
1019 | 816 |
1020 ScopeBuildingResult* scopes_; | 817 ScopeBuildingResult* scopes_; |
1021 | 818 |
1022 GrowableArray<YieldContinuation> yield_continuations_; | 819 GrowableArray<YieldContinuation> yield_continuations_; |
1023 | 820 |
1024 LocalVariable* CurrentException() { | 821 LocalVariable* CurrentException() { |
(...skipping 23 matching lines...) Expand all Loading... |
1048 // [TryCatchBlock] class. | 845 // [TryCatchBlock] class. |
1049 TryCatchBlock* try_catch_block_; | 846 TryCatchBlock* try_catch_block_; |
1050 intptr_t next_used_try_index_; | 847 intptr_t next_used_try_index_; |
1051 | 848 |
1052 // A chained list of catch blocks. Chaining and lookup is done by the | 849 // A chained list of catch blocks. Chaining and lookup is done by the |
1053 // [CatchBlock] class. | 850 // [CatchBlock] class. |
1054 CatchBlock* catch_block_; | 851 CatchBlock* catch_block_; |
1055 | 852 |
1056 ActiveClass active_class_; | 853 ActiveClass active_class_; |
1057 DartTypeTranslator type_translator_; | 854 DartTypeTranslator type_translator_; |
1058 ConstantEvaluator constant_evaluator_; | |
1059 | 855 |
1060 StreamingFlowGraphBuilder* streaming_flow_graph_builder_; | 856 StreamingFlowGraphBuilder* streaming_flow_graph_builder_; |
1061 | 857 |
1062 friend class BreakableBlock; | 858 friend class BreakableBlock; |
1063 friend class CatchBlock; | 859 friend class CatchBlock; |
1064 friend class ConstantEvaluator; | 860 friend class ConstantEvaluator; |
1065 friend class DartTypeTranslator; | 861 friend class DartTypeTranslator; |
1066 friend class StreamingFlowGraphBuilder; | 862 friend class StreamingFlowGraphBuilder; |
1067 friend class ScopeBuilder; | 863 friend class ScopeBuilder; |
1068 friend class SwitchBlock; | 864 friend class SwitchBlock; |
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1308 namespace kernel { | 1104 namespace kernel { |
1309 | 1105 |
1310 RawObject* EvaluateMetadata(const dart::Field& metadata_field); | 1106 RawObject* EvaluateMetadata(const dart::Field& metadata_field); |
1311 RawObject* BuildParameterDescriptor(const Function& function); | 1107 RawObject* BuildParameterDescriptor(const Function& function); |
1312 | 1108 |
1313 } // namespace kernel | 1109 } // namespace kernel |
1314 } // namespace dart | 1110 } // namespace dart |
1315 | 1111 |
1316 #endif // !defined(DART_PRECOMPILED_RUNTIME) | 1112 #endif // !defined(DART_PRECOMPILED_RUNTIME) |
1317 #endif // RUNTIME_VM_KERNEL_TO_IL_H_ | 1113 #endif // RUNTIME_VM_KERNEL_TO_IL_H_ |
OLD | NEW |