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

Unified Diff: runtime/vm/intermediate_language.h

Issue 15946002: Allow breakpoints on strict equal (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 7 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
Index: runtime/vm/intermediate_language.h
===================================================================
--- runtime/vm/intermediate_language.h (revision 23094)
+++ runtime/vm/intermediate_language.h (working copy)
@@ -2704,8 +2704,11 @@
class ComparisonInstr : public TemplateDefinition<2> {
public:
- ComparisonInstr(Token::Kind kind, Value* left, Value* right)
- : kind_(kind) {
+ ComparisonInstr(intptr_t token_pos,
+ Token::Kind kind,
+ Value* left,
+ Value* right)
+ : token_pos_(token_pos), kind_(kind) {
SetInputAt(0, left);
SetInputAt(1, right);
}
@@ -2715,6 +2718,7 @@
virtual ComparisonInstr* AsComparison() { return this; }
+ intptr_t token_pos() const { return token_pos_; }
Token::Kind kind() const { return kind_; }
virtual void EmitBranchCode(FlowGraphCompiler* compiler,
@@ -2725,6 +2729,7 @@
}
protected:
+ intptr_t token_pos_;
Token::Kind kind_;
};
@@ -2791,7 +2796,10 @@
class StrictCompareInstr : public ComparisonInstr {
public:
- StrictCompareInstr(Token::Kind kind, Value* left, Value* right);
+ StrictCompareInstr(intptr_t token_pos,
+ Token::Kind kind,
+ Value* left,
+ Value* right);
DECLARE_INSTRUCTION(StrictCompare)
virtual CompileType ComputeType() const;
@@ -2837,9 +2845,8 @@
Value* left,
Value* right,
const Array& ic_data_array)
- : ComparisonInstr(kind, left, right),
+ : ComparisonInstr(token_pos, kind, left, right),
ic_data_(GetICData(ic_data_array)),
- token_pos_(token_pos),
receiver_class_id_(kIllegalCid) {
ASSERT((kind == Token::kEQ) || (kind == Token::kNE));
}
@@ -2854,8 +2861,6 @@
}
void set_ic_data(const ICData* value) { ic_data_ = value; }
- intptr_t token_pos() const { return token_pos_; }
-
// Receiver class id is computed from collected ICData.
void set_receiver_class_id(intptr_t value) { receiver_class_id_ = value; }
intptr_t receiver_class_id() const { return receiver_class_id_; }
@@ -2902,7 +2907,6 @@
private:
const ICData* ic_data_;
- const intptr_t token_pos_;
intptr_t receiver_class_id_; // Set by optimizer.
DISALLOW_COPY_AND_ASSIGN(EqualityCompareInstr);
@@ -2916,9 +2920,8 @@
Value* left,
Value* right,
const Array& ic_data_array)
- : ComparisonInstr(kind, left, right),
+ : ComparisonInstr(token_pos, kind, left, right),
ic_data_(GetICData(ic_data_array)),
- token_pos_(token_pos),
operands_class_id_(kIllegalCid) {
ASSERT(Token::IsRelationalOperator(kind));
}
@@ -2933,8 +2936,6 @@
}
void set_ic_data(const ICData* value) { ic_data_ = value; }
- intptr_t token_pos() const { return token_pos_; }
-
// TODO(srdjan): instead of class-id pass an enum that can differentiate
// between boxed and unboxed doubles and integers.
void set_operands_class_id(intptr_t value) {
@@ -2978,7 +2979,6 @@
private:
const ICData* ic_data_;
- const intptr_t token_pos_;
intptr_t operands_class_id_; // class id of both operands.
DISALLOW_COPY_AND_ASSIGN(RelationalOpInstr);

Powered by Google App Engine
This is Rietveld 408576698