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

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

Issue 2894953002: Support inlining of calls where type arguments are passed to generic functions. (Closed)
Patch Set: Merge branch 'master' into slave Created 3 years, 5 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) 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
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 2376 matching lines...) Expand 10 before | Expand all | Expand 10 after
2771 2771
2772 PRINT_OPERANDS_TO_SUPPORT 2772 PRINT_OPERANDS_TO_SUPPORT
2773 2773
2774 private: 2774 private:
2775 const TokenPosition token_pos_; 2775 const TokenPosition token_pos_;
2776 2776
2777 DISALLOW_COPY_AND_ASSIGN(AssertBooleanInstr); 2777 DISALLOW_COPY_AND_ASSIGN(AssertBooleanInstr);
2778 }; 2778 };
2779 2779
2780 2780
2781 // Denotes the current context, normally held in a register. This is 2781 // Denotes a special parameter, currently either the context of a closure
2782 // a computation, not a value, because it's mutable. 2782 // (normally held in a register) or the type arguments of a generic function.
Vyacheslav Egorov (Google) 2017/07/03 16:15:43 "normally held in a register" part of the comment
regis 2017/07/05 18:41:30 Updated comment.
2783 class CurrentContextInstr : public TemplateDefinition<0, NoThrow> { 2783 // This is a computation, not a value, because it's mutable.
Vyacheslav Egorov (Google) 2017/07/03 16:15:43 "This is computation, not a value" is an obsolete
regis 2017/07/05 18:41:29 Removed comment.
2784 class SpecialParameterInstr : public TemplateDefinition<0, NoThrow> {
2784 public: 2785 public:
2785 explicit CurrentContextInstr(intptr_t deopt_id) 2786 enum SpecialParameterKind { kContext, kTypeArgs };
2786 : TemplateDefinition(deopt_id) {} 2787 SpecialParameterInstr(SpecialParameterKind kind, intptr_t deopt_id)
2788 : TemplateDefinition(deopt_id), kind_(kind) {}
2787 2789
2788 DECLARE_INSTRUCTION(CurrentContext) 2790 DECLARE_INSTRUCTION(SpecialParameter)
2789 virtual CompileType ComputeType() const; 2791 virtual CompileType ComputeType() const;
2790 2792
2791 virtual bool ComputeCanDeoptimize() const { return false; } 2793 virtual bool ComputeCanDeoptimize() const { return false; }
2792 2794
2793 virtual EffectSet Effects() const { return EffectSet::None(); } 2795 virtual EffectSet Effects() const { return EffectSet::None(); }
2794 virtual EffectSet Dependencies() const { return EffectSet::None(); } 2796 virtual EffectSet Dependencies() const { return EffectSet::None(); }
2795 virtual bool AttributesEqual(Instruction* other) const { return true; } 2797 virtual bool AttributesEqual(Instruction* other) const { return true; }
Vyacheslav Egorov (Google) 2017/07/03 16:15:43 this needs to be: return kind() == other->AsSpec
regis 2017/07/05 18:41:30 Done.
2798 SpecialParameterKind kind() const { return kind_; }
2796 2799
2797 private: 2800 private:
2798 DISALLOW_COPY_AND_ASSIGN(CurrentContextInstr); 2801 const SpecialParameterKind kind_;
2802 DISALLOW_COPY_AND_ASSIGN(SpecialParameterInstr);
2799 }; 2803 };
2800 2804
2801 2805
2802 struct ArgumentsInfo { 2806 struct ArgumentsInfo {
2803 ArgumentsInfo(intptr_t type_args_len, 2807 ArgumentsInfo(intptr_t type_args_len,
2804 intptr_t pushed_argc, 2808 intptr_t pushed_argc,
2805 const Array& argument_names) 2809 const Array& argument_names)
2806 : type_args_len(type_args_len), 2810 : type_args_len(type_args_len),
2807 pushed_argc(pushed_argc), 2811 pushed_argc(pushed_argc),
2808 argument_names(argument_names) {} 2812 argument_names(argument_names) {}
(...skipping 5447 matching lines...) Expand 10 before | Expand all | Expand 10 after
8256 LocationSummary* Name::MakeLocationSummary(Zone* zone, bool opt) const { \ 8260 LocationSummary* Name::MakeLocationSummary(Zone* zone, bool opt) const { \
8257 UNIMPLEMENTED(); \ 8261 UNIMPLEMENTED(); \
8258 return NULL; \ 8262 return NULL; \
8259 } \ 8263 } \
8260 void Name::EmitNativeCode(FlowGraphCompiler* compiler) { UNIMPLEMENTED(); } 8264 void Name::EmitNativeCode(FlowGraphCompiler* compiler) { UNIMPLEMENTED(); }
8261 8265
8262 8266
8263 } // namespace dart 8267 } // namespace dart
8264 8268
8265 #endif // RUNTIME_VM_INTERMEDIATE_LANGUAGE_H_ 8269 #endif // RUNTIME_VM_INTERMEDIATE_LANGUAGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698