| Index: runtime/vm/intermediate_language.h
|
| ===================================================================
|
| --- runtime/vm/intermediate_language.h (revision 41566)
|
| +++ runtime/vm/intermediate_language.h (working copy)
|
| @@ -631,7 +631,7 @@
|
|
|
| // Call instructions override this function and return the number of
|
| // pushed arguments.
|
| - virtual intptr_t ArgumentCount() const = 0;
|
| + virtual intptr_t ArgumentCount() const { return 0; }
|
| virtual PushArgumentInstr* PushArgumentAt(intptr_t index) const {
|
| UNREACHABLE();
|
| return NULL;
|
| @@ -1568,9 +1568,6 @@
|
| public:
|
| explicit Definition(intptr_t deopt_id = Isolate::kNoDeoptId);
|
|
|
| - // Overridden by definitions that have pushed arguments.
|
| - virtual intptr_t ArgumentCount() const { return 0; }
|
| -
|
| // Overridden by definitions that have call counts.
|
| virtual intptr_t CallCount() const {
|
| UNREACHABLE();
|
| @@ -1604,15 +1601,11 @@
|
| // propagation during graph building.
|
| CompileType* Type() {
|
| if (type_ == NULL) {
|
| - type_ = ComputeInitialType();
|
| + type_ = ZoneCompileType::Wrap(ComputeType());
|
| }
|
| return type_;
|
| }
|
|
|
| - virtual CompileType* ComputeInitialType() const {
|
| - return ZoneCompileType::Wrap(ComputeType());
|
| - }
|
| -
|
| // Does this define a mint?
|
| inline bool IsMintDefinition();
|
|
|
| @@ -1837,8 +1830,6 @@
|
| virtual CompileType ComputeType() const;
|
| virtual bool RecomputeType();
|
|
|
| - virtual intptr_t ArgumentCount() const { return 0; }
|
| -
|
| intptr_t InputCount() const { return inputs_.length(); }
|
|
|
| Value* InputAt(intptr_t i) const { return inputs_[i]; }
|
| @@ -1930,8 +1921,6 @@
|
| // Get the block entry for that instruction.
|
| virtual BlockEntryInstr* GetBlock() const { return block_; }
|
|
|
| - virtual intptr_t ArgumentCount() const { return 0; }
|
| -
|
| intptr_t InputCount() const { return 0; }
|
| Value* InputAt(intptr_t i) const {
|
| UNREACHABLE();
|
| @@ -1973,8 +1962,6 @@
|
|
|
| DECLARE_INSTRUCTION(PushArgument)
|
|
|
| - virtual intptr_t ArgumentCount() const { return 0; }
|
| -
|
| virtual CompileType ComputeType() const;
|
|
|
| Value* value() const { return InputAt(0); }
|
| @@ -2005,8 +1992,6 @@
|
|
|
| DECLARE_INSTRUCTION(Return)
|
|
|
| - virtual intptr_t ArgumentCount() const { return 0; }
|
| -
|
| virtual intptr_t token_pos() const { return token_pos_; }
|
| Value* value() const { return inputs_[0]; }
|
|
|
| @@ -2091,8 +2076,6 @@
|
|
|
| DECLARE_INSTRUCTION(Goto)
|
|
|
| - virtual intptr_t ArgumentCount() const { return 0; }
|
| -
|
| JoinEntryInstr* successor() const { return successor_; }
|
| void set_successor(JoinEntryInstr* successor) { successor_ = successor; }
|
| virtual intptr_t SuccessorCount() const;
|
| @@ -2323,8 +2306,6 @@
|
| deopt_reason_(deopt_reason) {
|
| }
|
|
|
| - virtual intptr_t ArgumentCount() const { return 0; }
|
| -
|
| virtual bool CanDeoptimize() const { return true; }
|
|
|
| virtual bool AttributesEqual(Instruction* other) const {
|
| @@ -3192,7 +3173,7 @@
|
|
|
| intptr_t num_temps() const { return num_temps_; }
|
|
|
| - virtual CompileType* ComputeInitialType() const;
|
| + virtual CompileType ComputeType() const;
|
|
|
| virtual void PrintOperandsTo(BufferFormatter* f) const;
|
|
|
| @@ -3228,7 +3209,7 @@
|
| }
|
|
|
| DECLARE_INSTRUCTION(StoreLocal)
|
| - virtual CompileType* ComputeInitialType() const;
|
| + virtual CompileType ComputeType() const;
|
|
|
| const LocalVariable& local() const { return local_; }
|
| Value* value() const { return inputs_[0]; }
|
| @@ -3306,7 +3287,6 @@
|
| virtual intptr_t token_pos() const { return token_pos_; }
|
| virtual bool CanDeoptimize() const { return false; }
|
| virtual EffectSet Effects() const { return EffectSet::All(); }
|
| - virtual intptr_t ArgumentCount() const { return 0; }
|
| virtual Instruction* Canonicalize(FlowGraph* flow_graph);
|
|
|
| private:
|
| @@ -3367,8 +3347,6 @@
|
| bool is_initialization() const { return is_initialization_; }
|
| virtual intptr_t token_pos() const { return token_pos_; }
|
|
|
| - virtual CompileType* ComputeInitialType() const;
|
| -
|
| const Field& field() const { return field_; }
|
| intptr_t offset_in_bytes() const { return offset_in_bytes_; }
|
|
|
| @@ -3431,8 +3409,6 @@
|
|
|
| const Field& field() const { return field_; }
|
|
|
| - virtual intptr_t ArgumentCount() const { return 0; }
|
| -
|
| virtual bool CanDeoptimize() const { return true; }
|
| virtual bool CanBecomeDeoptimizationTarget() const {
|
| // Ensure that we record kDeopt PC descriptor in unoptimized code.
|
| @@ -3525,7 +3501,6 @@
|
| };
|
|
|
| DECLARE_INSTRUCTION(StoreStaticField)
|
| - virtual CompileType* ComputeInitialType() const;
|
|
|
| const Field& field() const { return field_; }
|
| Value* value() const { return inputs_[kValuePos]; }
|
| @@ -4285,7 +4260,6 @@
|
|
|
| DECLARE_INSTRUCTION(InitStaticField)
|
|
|
| - virtual intptr_t ArgumentCount() const { return 0; }
|
| virtual bool CanDeoptimize() const { return true; }
|
| virtual EffectSet Effects() const { return EffectSet::All(); }
|
| virtual Instruction* Canonicalize(FlowGraph* flow_graph);
|
| @@ -4363,8 +4337,6 @@
|
|
|
| DECLARE_INSTRUCTION(CheckEitherNonSmi)
|
|
|
| - virtual intptr_t ArgumentCount() const { return 0; }
|
| -
|
| virtual bool CanDeoptimize() const { return true; }
|
|
|
| virtual Instruction* Canonicalize(FlowGraph* flow_graph);
|
| @@ -6811,8 +6783,6 @@
|
|
|
| DECLARE_INSTRUCTION(CheckStackOverflow)
|
|
|
| - virtual intptr_t ArgumentCount() const { return 0; }
|
| -
|
| virtual bool CanDeoptimize() const { return true; }
|
|
|
| virtual EffectSet Effects() const { return EffectSet::None(); }
|
| @@ -7315,8 +7285,6 @@
|
|
|
| DECLARE_INSTRUCTION(CheckClass)
|
|
|
| - virtual intptr_t ArgumentCount() const { return 0; }
|
| -
|
| virtual bool CanDeoptimize() const { return true; }
|
|
|
| virtual intptr_t token_pos() const { return token_pos_; }
|
| @@ -7368,8 +7336,6 @@
|
|
|
| DECLARE_INSTRUCTION(CheckSmi)
|
|
|
| - virtual intptr_t ArgumentCount() const { return 0; }
|
| -
|
| virtual bool CanDeoptimize() const { return true; }
|
|
|
| virtual Instruction* Canonicalize(FlowGraph* flow_graph);
|
| @@ -7398,8 +7364,6 @@
|
|
|
| DECLARE_INSTRUCTION(CheckClassId)
|
|
|
| - virtual intptr_t ArgumentCount() const { return 0; }
|
| -
|
| virtual bool CanDeoptimize() const { return true; }
|
|
|
| virtual Instruction* Canonicalize(FlowGraph* flow_graph);
|
| @@ -7433,8 +7397,6 @@
|
|
|
| DECLARE_INSTRUCTION(CheckArrayBound)
|
|
|
| - virtual intptr_t ArgumentCount() const { return 0; }
|
| -
|
| virtual bool CanDeoptimize() const { return true; }
|
|
|
| bool IsRedundant(const RangeBoundary& length);
|
|
|