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

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

Issue 2751103003: VM: Propagate non-nullness from instance calls. (Closed)
Patch Set: canonicalize redundant redefinitions Created 3 years, 9 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/flow_graph_type_propagator.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 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 2391 matching lines...) Expand 10 before | Expand all | Expand 10 after
2402 2402
2403 private: 2403 private:
2404 const ICData::DeoptReasonId deopt_reason_; 2404 const ICData::DeoptReasonId deopt_reason_;
2405 2405
2406 DISALLOW_COPY_AND_ASSIGN(DeoptimizeInstr); 2406 DISALLOW_COPY_AND_ASSIGN(DeoptimizeInstr);
2407 }; 2407 };
2408 2408
2409 2409
2410 class RedefinitionInstr : public TemplateDefinition<1, NoThrow> { 2410 class RedefinitionInstr : public TemplateDefinition<1, NoThrow> {
2411 public: 2411 public:
2412 explicit RedefinitionInstr(Value* value) : type_(NULL) { 2412 explicit RedefinitionInstr(Value* value) : constrained_type_(NULL) {
2413 SetInputAt(0, value); 2413 SetInputAt(0, value);
2414 } 2414 }
2415 2415
2416 DECLARE_INSTRUCTION(Redefinition) 2416 DECLARE_INSTRUCTION(Redefinition)
2417 2417
2418 Value* value() const { return inputs_[0]; } 2418 Value* value() const { return inputs_[0]; }
2419 2419
2420 virtual CompileType ComputeType() const; 2420 virtual CompileType ComputeType() const;
2421 virtual bool RecomputeType(); 2421 virtual bool RecomputeType();
2422 2422
2423 void set_type(CompileType* type) { type_ = type; } 2423 virtual Definition* Canonicalize(FlowGraph* flow_graph);
2424 CompileType* type() const { return type_; } 2424
2425 void set_constrained_type(CompileType* type) { constrained_type_ = type; }
2426 CompileType* constrained_type() const { return constrained_type_; }
2425 2427
2426 virtual bool CanDeoptimize() const { return false; } 2428 virtual bool CanDeoptimize() const { return false; }
2427 virtual EffectSet Dependencies() const { return EffectSet::None(); } 2429 virtual EffectSet Dependencies() const { return EffectSet::None(); }
2428 virtual EffectSet Effects() const { return EffectSet::None(); } 2430 virtual EffectSet Effects() const { return EffectSet::None(); }
2429 2431
2430 private: 2432 private:
2431 CompileType* type_; 2433 CompileType* constrained_type_;
2432 DISALLOW_COPY_AND_ASSIGN(RedefinitionInstr); 2434 DISALLOW_COPY_AND_ASSIGN(RedefinitionInstr);
2433 }; 2435 };
2434 2436
2435 2437
2436 class ConstraintInstr : public TemplateDefinition<1, NoThrow> { 2438 class ConstraintInstr : public TemplateDefinition<1, NoThrow> {
2437 public: 2439 public:
2438 ConstraintInstr(Value* value, Range* constraint) 2440 ConstraintInstr(Value* value, Range* constraint)
2439 : constraint_(constraint), target_(NULL) { 2441 : constraint_(constraint), target_(NULL) {
2440 SetInputAt(0, value); 2442 SetInputAt(0, value);
2441 } 2443 }
(...skipping 5599 matching lines...) Expand 10 before | Expand all | Expand 10 after
8041 LocationSummary* Name::MakeLocationSummary(Zone* zone, bool opt) const { \ 8043 LocationSummary* Name::MakeLocationSummary(Zone* zone, bool opt) const { \
8042 UNIMPLEMENTED(); \ 8044 UNIMPLEMENTED(); \
8043 return NULL; \ 8045 return NULL; \
8044 } \ 8046 } \
8045 void Name::EmitNativeCode(FlowGraphCompiler* compiler) { UNIMPLEMENTED(); } 8047 void Name::EmitNativeCode(FlowGraphCompiler* compiler) { UNIMPLEMENTED(); }
8046 8048
8047 8049
8048 } // namespace dart 8050 } // namespace dart
8049 8051
8050 #endif // RUNTIME_VM_INTERMEDIATE_LANGUAGE_H_ 8052 #endif // RUNTIME_VM_INTERMEDIATE_LANGUAGE_H_
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_type_propagator.cc ('k') | runtime/vm/intermediate_language.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698