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

Unified Diff: runtime/vm/intermediate_language.h

Issue 19395003: Cleanups. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/flow_graph_optimizer.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language.h
===================================================================
--- runtime/vm/intermediate_language.h (revision 25102)
+++ runtime/vm/intermediate_language.h (working copy)
@@ -4330,10 +4330,11 @@
public:
CheckEitherNonSmiInstr(Value* left,
Value* right,
- InstanceCallInstr* instance_call) {
+ intptr_t deopt_id) {
SetInputAt(0, left);
SetInputAt(1, right);
- deopt_id_ = instance_call->deopt_id();
+ // Override generated deopt-id.
+ deopt_id_ = deopt_id;
}
Value* left() const { return inputs_[0]; }
@@ -4660,11 +4661,12 @@
BinaryDoubleOpInstr(Token::Kind op_kind,
Value* left,
Value* right,
- InstanceCallInstr* instance_call)
+ intptr_t deopt_id)
: op_kind_(op_kind) {
SetInputAt(0, left);
SetInputAt(1, right);
- deopt_id_ = instance_call->deopt_id();
+ // Overrided generated deopt_id.
+ deopt_id_ = deopt_id;
}
Value* left() const { return inputs_[0]; }
@@ -5678,12 +5680,12 @@
BinaryMintOpInstr(Token::Kind op_kind,
Value* left,
Value* right,
- InstanceCallInstr* instance_call)
- : op_kind_(op_kind),
- instance_call_(instance_call) {
+ intptr_t deopt_id)
+ : op_kind_(op_kind) {
SetInputAt(0, left);
SetInputAt(1, right);
- deopt_id_ = instance_call->deopt_id();
+ // Override generated deopt-id.
+ deopt_id_ = deopt_id;
}
Value* left() const { return inputs_[0]; }
@@ -5691,8 +5693,6 @@
Token::Kind op_kind() const { return op_kind_; }
- InstanceCallInstr* instance_call() const { return instance_call_; }
-
virtual void PrintOperandsTo(BufferFormatter* f) const;
virtual bool CanDeoptimize() const {
@@ -5731,7 +5731,6 @@
private:
const Token::Kind op_kind_;
- InstanceCallInstr* instance_call_;
DISALLOW_COPY_AND_ASSIGN(BinaryMintOpInstr);
};
@@ -5742,12 +5741,13 @@
ShiftMintOpInstr(Token::Kind op_kind,
Value* left,
Value* right,
- InstanceCallInstr* instance_call)
+ intptr_t deopt_id)
: op_kind_(op_kind) {
ASSERT(op_kind == Token::kSHR || op_kind == Token::kSHL);
SetInputAt(0, left);
SetInputAt(1, right);
- deopt_id_ = instance_call->deopt_id();
+ // Override generated deopt-id.
+ deopt_id_ = deopt_id;
}
Value* left() const { return inputs_[0]; }
@@ -5796,13 +5796,12 @@
class UnaryMintOpInstr : public TemplateDefinition<1> {
public:
- UnaryMintOpInstr(Token::Kind op_kind,
- Value* value,
- InstanceCallInstr* instance_call)
+ UnaryMintOpInstr(Token::Kind op_kind, Value* value, intptr_t deopt_id)
: op_kind_(op_kind) {
ASSERT(op_kind == Token::kBIT_NOT);
SetInputAt(0, value);
- deopt_id_ = instance_call->deopt_id();
+ // Override generated deopt-id.
+ deopt_id_ = deopt_id;
}
Value* value() const { return inputs_[0]; }
@@ -5850,16 +5849,16 @@
class BinarySmiOpInstr : public TemplateDefinition<2> {
public:
BinarySmiOpInstr(Token::Kind op_kind,
- InstanceCallInstr* instance_call,
Value* left,
- Value* right)
+ Value* right,
+ intptr_t deopt_id)
: op_kind_(op_kind),
- instance_call_(instance_call),
overflow_(true),
is_truncating_(false) {
SetInputAt(0, left);
SetInputAt(1, right);
- deopt_id_ = instance_call->deopt_id();
+ // Override generated deopt-id.
+ deopt_id_ = deopt_id;
}
Value* left() const { return inputs_[0]; }
@@ -5867,10 +5866,6 @@
Token::Kind op_kind() const { return op_kind_; }
- InstanceCallInstr* instance_call() const { return instance_call_; }
-
- const ICData* ic_data() const { return instance_call()->ic_data(); }
-
void set_overflow(bool overflow) { overflow_ = overflow; }
void set_is_truncating(bool value) { is_truncating_ = value; }
@@ -5902,7 +5897,6 @@
private:
const Token::Kind op_kind_;
- InstanceCallInstr* instance_call_;
bool overflow_;
bool is_truncating_;
@@ -5914,12 +5908,13 @@
class UnarySmiOpInstr : public TemplateDefinition<1> {
public:
UnarySmiOpInstr(Token::Kind op_kind,
- InstanceCallInstr* instance_call,
- Value* value)
+ Value* value,
+ intptr_t deopt_id)
: op_kind_(op_kind) {
ASSERT((op_kind == Token::kNEGATE) || (op_kind == Token::kBIT_NOT));
SetInputAt(0, value);
- deopt_id_ = instance_call->deopt_id();
+ // Override generated deopt-id.
+ deopt_id_ = deopt_id;
}
Value* value() const { return inputs_[0]; }
@@ -6041,9 +6036,10 @@
// and creates a Smi.
class DoubleToSmiInstr : public TemplateDefinition<1> {
public:
- DoubleToSmiInstr(Value* value, InstanceCallInstr* instance_call) {
+ DoubleToSmiInstr(Value* value, intptr_t deopt_id) {
SetInputAt(0, value);
- deopt_id_ = instance_call->deopt_id();
+ // Override generated deopt-id.
+ deopt_id_ = deopt_id;
}
Value* value() const { return inputs_[0]; }
@@ -6072,11 +6068,12 @@
class DoubleToDoubleInstr : public TemplateDefinition<1> {
public:
DoubleToDoubleInstr(Value* value,
- InstanceCallInstr* instance_call,
- MethodRecognizer::Kind recognized_kind)
+ MethodRecognizer::Kind recognized_kind,
+ intptr_t deopt_id)
: recognized_kind_(recognized_kind) {
SetInputAt(0, value);
- deopt_id_ = instance_call->deopt_id();
+ // Override generated deopt-id.
+ deopt_id_ = deopt_id;
}
Value* value() const { return inputs_[0]; }
@@ -6258,12 +6255,11 @@
class CheckArrayBoundInstr : public TemplateInstruction<2> {
public:
- CheckArrayBoundInstr(Value* length,
- Value* index,
- InstanceCallInstr* instance_call) {
+ CheckArrayBoundInstr(Value* length, Value* index, intptr_t deopt_id) {
SetInputAt(kLengthPos, length);
SetInputAt(kIndexPos, index);
- deopt_id_ = instance_call->deopt_id();
+ // Override generated deopt-id.
+ deopt_id_ = deopt_id;
}
Value* length() const { return inputs_[kLengthPos]; }
« no previous file with comments | « runtime/vm/flow_graph_optimizer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698