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

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

Issue 2453463006: Revert "Revert "Recognize and optimize a.runtimeType == b.runtimeType pattern."" (Closed)
Patch Set: Created 4 years, 1 month 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/flow_graph_inliner.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 2947 matching lines...) Expand 10 before | Expand all | Expand 10 after
2958 virtual intptr_t CallCount() const { return ic_data().AggregateCount(); } 2958 virtual intptr_t CallCount() const { return ic_data().AggregateCount(); }
2959 2959
2960 DECLARE_INSTRUCTION(PolymorphicInstanceCall) 2960 DECLARE_INSTRUCTION(PolymorphicInstanceCall)
2961 2961
2962 const ICData& ic_data() const { return ic_data_; } 2962 const ICData& ic_data() const { return ic_data_; }
2963 2963
2964 virtual bool CanDeoptimize() const { return true; } 2964 virtual bool CanDeoptimize() const { return true; }
2965 2965
2966 virtual EffectSet Effects() const { return EffectSet::All(); } 2966 virtual EffectSet Effects() const { return EffectSet::All(); }
2967 2967
2968 virtual Definition* Canonicalize(FlowGraph* graph);
2969
2970 static RawType* ComputeRuntimeType(const ICData& ic_data);
2971
2968 PRINT_OPERANDS_TO_SUPPORT 2972 PRINT_OPERANDS_TO_SUPPORT
2969 2973
2970 private: 2974 private:
2971 InstanceCallInstr* instance_call_; 2975 InstanceCallInstr* instance_call_;
2972 const ICData& ic_data_; 2976 const ICData& ic_data_;
2973 bool with_checks_; 2977 bool with_checks_;
2974 const bool complete_; 2978 const bool complete_;
2975 2979
2976 DISALLOW_COPY_AND_ASSIGN(PolymorphicInstanceCallInstr); 2980 DISALLOW_COPY_AND_ASSIGN(PolymorphicInstanceCallInstr);
2977 }; 2981 };
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
3317 } 3321 }
3318 3322
3319 // ICData for static calls carries call count. 3323 // ICData for static calls carries call count.
3320 const ICData* ic_data() const { return ic_data_; } 3324 const ICData* ic_data() const { return ic_data_; }
3321 bool HasICData() const { 3325 bool HasICData() const {
3322 return (ic_data() != NULL) && !ic_data()->IsNull(); 3326 return (ic_data() != NULL) && !ic_data()->IsNull();
3323 } 3327 }
3324 3328
3325 DECLARE_INSTRUCTION(StaticCall) 3329 DECLARE_INSTRUCTION(StaticCall)
3326 virtual CompileType ComputeType() const; 3330 virtual CompileType ComputeType() const;
3331 virtual Definition* Canonicalize(FlowGraph* flow_graph);
3327 3332
3328 // Accessors forwarded to the AST node. 3333 // Accessors forwarded to the AST node.
3329 const Function& function() const { return function_; } 3334 const Function& function() const { return function_; }
3330 const Array& argument_names() const { return argument_names_; } 3335 const Array& argument_names() const { return argument_names_; }
3331 virtual TokenPosition token_pos() const { return token_pos_; } 3336 virtual TokenPosition token_pos() const { return token_pos_; }
3332 3337
3333 virtual intptr_t ArgumentCount() const { return arguments_->length(); } 3338 virtual intptr_t ArgumentCount() const { return arguments_->length(); }
3334 virtual PushArgumentInstr* PushArgumentAt(intptr_t index) const { 3339 virtual PushArgumentInstr* PushArgumentAt(intptr_t index) const {
3335 return (*arguments_)[index]; 3340 return (*arguments_)[index];
3336 } 3341 }
(...skipping 5046 matching lines...) Expand 10 before | Expand all | Expand 10 after
8383 LocationSummary* Name::MakeLocationSummary(Zone* zone, bool opt) const { \ 8388 LocationSummary* Name::MakeLocationSummary(Zone* zone, bool opt) const { \
8384 UNIMPLEMENTED(); \ 8389 UNIMPLEMENTED(); \
8385 return NULL; \ 8390 return NULL; \
8386 } \ 8391 } \
8387 void Name::EmitNativeCode(FlowGraphCompiler* compiler) { UNIMPLEMENTED(); } 8392 void Name::EmitNativeCode(FlowGraphCompiler* compiler) { UNIMPLEMENTED(); }
8388 8393
8389 8394
8390 } // namespace dart 8395 } // namespace dart
8391 8396
8392 #endif // VM_INTERMEDIATE_LANGUAGE_H_ 8397 #endif // VM_INTERMEDIATE_LANGUAGE_H_
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_inliner.cc ('k') | runtime/vm/intermediate_language.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698