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

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

Issue 1867913004: Specialize instance calls when the call receiver is the method receiver and the method class has a … (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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/vm/il_printer.cc ('k') | runtime/vm/intermediate_language.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) 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 VM_INTERMEDIATE_LANGUAGE_H_ 5 #ifndef VM_INTERMEDIATE_LANGUAGE_H_
6 #define VM_INTERMEDIATE_LANGUAGE_H_ 6 #define 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 2874 matching lines...) Expand 10 before | Expand all | Expand 10 after
2885 const intptr_t checked_argument_count_; 2885 const intptr_t checked_argument_count_;
2886 2886
2887 DISALLOW_COPY_AND_ASSIGN(InstanceCallInstr); 2887 DISALLOW_COPY_AND_ASSIGN(InstanceCallInstr);
2888 }; 2888 };
2889 2889
2890 2890
2891 class PolymorphicInstanceCallInstr : public TemplateDefinition<0, Throws> { 2891 class PolymorphicInstanceCallInstr : public TemplateDefinition<0, Throws> {
2892 public: 2892 public:
2893 PolymorphicInstanceCallInstr(InstanceCallInstr* instance_call, 2893 PolymorphicInstanceCallInstr(InstanceCallInstr* instance_call,
2894 const ICData& ic_data, 2894 const ICData& ic_data,
2895 bool with_checks) 2895 bool with_checks,
2896 bool complete)
2896 : TemplateDefinition(instance_call->deopt_id()), 2897 : TemplateDefinition(instance_call->deopt_id()),
2897 instance_call_(instance_call), 2898 instance_call_(instance_call),
2898 ic_data_(ic_data), 2899 ic_data_(ic_data),
2899 with_checks_(with_checks) { 2900 with_checks_(with_checks),
2901 complete_(complete) {
2900 ASSERT(instance_call_ != NULL); 2902 ASSERT(instance_call_ != NULL);
2901 ASSERT(ic_data.NumberOfChecks() > 0); 2903 ASSERT(ic_data.NumberOfChecks() > 0);
2902 } 2904 }
2903 2905
2904 InstanceCallInstr* instance_call() const { return instance_call_; } 2906 InstanceCallInstr* instance_call() const { return instance_call_; }
2905 bool with_checks() const { return with_checks_; } 2907 bool with_checks() const { return with_checks_; }
2908 bool complete() const { return complete_; }
2906 virtual TokenPosition token_pos() const { 2909 virtual TokenPosition token_pos() const {
2907 return instance_call_->token_pos(); 2910 return instance_call_->token_pos();
2908 } 2911 }
2909 2912
2910 virtual intptr_t ArgumentCount() const { 2913 virtual intptr_t ArgumentCount() const {
2911 return instance_call()->ArgumentCount(); 2914 return instance_call()->ArgumentCount();
2912 } 2915 }
2913 virtual PushArgumentInstr* PushArgumentAt(intptr_t index) const { 2916 virtual PushArgumentInstr* PushArgumentAt(intptr_t index) const {
2914 return instance_call()->PushArgumentAt(index); 2917 return instance_call()->PushArgumentAt(index);
2915 } 2918 }
(...skipping 11 matching lines...) Expand all
2927 virtual bool CanDeoptimize() const { return true; } 2930 virtual bool CanDeoptimize() const { return true; }
2928 2931
2929 virtual EffectSet Effects() const { return EffectSet::All(); } 2932 virtual EffectSet Effects() const { return EffectSet::All(); }
2930 2933
2931 PRINT_OPERANDS_TO_SUPPORT 2934 PRINT_OPERANDS_TO_SUPPORT
2932 2935
2933 private: 2936 private:
2934 InstanceCallInstr* instance_call_; 2937 InstanceCallInstr* instance_call_;
2935 const ICData& ic_data_; 2938 const ICData& ic_data_;
2936 const bool with_checks_; 2939 const bool with_checks_;
2940 const bool complete_;
2937 2941
2938 DISALLOW_COPY_AND_ASSIGN(PolymorphicInstanceCallInstr); 2942 DISALLOW_COPY_AND_ASSIGN(PolymorphicInstanceCallInstr);
2939 }; 2943 };
2940 2944
2941 2945
2942 class StrictCompareInstr : public ComparisonInstr { 2946 class StrictCompareInstr : public ComparisonInstr {
2943 public: 2947 public:
2944 StrictCompareInstr(TokenPosition token_pos, 2948 StrictCompareInstr(TokenPosition token_pos,
2945 Token::Kind kind, 2949 Token::Kind kind,
2946 Value* left, 2950 Value* left,
(...skipping 5333 matching lines...) Expand 10 before | Expand all | Expand 10 after
8280 LocationSummary* Name::MakeLocationSummary(Zone* zone, bool opt) const { \ 8284 LocationSummary* Name::MakeLocationSummary(Zone* zone, bool opt) const { \
8281 UNIMPLEMENTED(); \ 8285 UNIMPLEMENTED(); \
8282 return NULL; \ 8286 return NULL; \
8283 } \ 8287 } \
8284 void Name::EmitNativeCode(FlowGraphCompiler* compiler) { UNIMPLEMENTED(); } 8288 void Name::EmitNativeCode(FlowGraphCompiler* compiler) { UNIMPLEMENTED(); }
8285 8289
8286 8290
8287 } // namespace dart 8291 } // namespace dart
8288 8292
8289 #endif // VM_INTERMEDIATE_LANGUAGE_H_ 8293 #endif // VM_INTERMEDIATE_LANGUAGE_H_
OLDNEW
« no previous file with comments | « runtime/vm/il_printer.cc ('k') | runtime/vm/intermediate_language.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698