Revision: 12268
Author: [email protected]
Date: Tue Aug 7 07:06:25 2012
Log: Unify handling of bailout IDs for property loads.
Renamed Property::ReturnId to Property::LoadId, which describes its use more
accurately. Compound assignments and CountOperations now consistently use
Property::LoadId() instead of their own CompoundLoadId/CountId.
Review URL: https://chromiumcodereview.appspot.com/10832157
http://code.google.com/p/v8/source/detail?r=12268
Modified:
/branches/bleeding_edge/src/arm/full-codegen-arm.cc
/branches/bleeding_edge/src/ast.cc
/branches/bleeding_edge/src/ast.h
/branches/bleeding_edge/src/hydrogen.cc
/branches/bleeding_edge/src/ia32/full-codegen-ia32.cc
/branches/bleeding_edge/src/mips/full-codegen-mips.cc
/branches/bleeding_edge/src/x64/full-codegen-x64.cc
=======================================
--- /branches/bleeding_edge/src/arm/full-codegen-arm.cc Mon Aug 6 07:13:09
2012
+++ /branches/bleeding_edge/src/arm/full-codegen-arm.cc Tue Aug 7 07:06:25
2012
@@ -1837,11 +1837,11 @@
break;
case NAMED_PROPERTY:
EmitNamedPropertyLoad(property);
- PrepareForBailoutForId(expr->CompoundLoadId(), TOS_REG);
+ PrepareForBailoutForId(property->LoadId(), TOS_REG);
break;
case KEYED_PROPERTY:
EmitKeyedPropertyLoad(property);
- PrepareForBailoutForId(expr->CompoundLoadId(), TOS_REG);
+ PrepareForBailoutForId(property->LoadId(), TOS_REG);
break;
}
}
@@ -2277,7 +2277,7 @@
if (key->IsPropertyName()) {
VisitForAccumulatorValue(expr->obj());
EmitNamedPropertyLoad(expr);
- PrepareForBailoutForId(expr->ReturnId(), TOS_REG);
+ PrepareForBailoutForId(expr->LoadId(), TOS_REG);
context()->Plug(r0);
} else {
VisitForStackValue(expr->obj());
@@ -4063,7 +4063,7 @@
if (assign_type == VARIABLE) {
PrepareForBailout(expr->expression(), TOS_REG);
} else {
- PrepareForBailoutForId(expr->CountId(), TOS_REG);
+ PrepareForBailoutForId(prop->LoadId(), TOS_REG);
}
// Call ToNumber only if operand is not a smi.
=======================================
--- /branches/bleeding_edge/src/ast.cc Mon Aug 6 07:13:09 2012
+++ /branches/bleeding_edge/src/ast.cc Tue Aug 7 07:06:25 2012
@@ -125,7 +125,6 @@
value_(value),
pos_(pos),
binary_operation_(NULL),
- compound_load_id_(GetNextId(isolate)),
assignment_id_(GetNextId(isolate)),
block_start_(false),
block_end_(false),
=======================================
--- /branches/bleeding_edge/src/ast.h Mon Aug 6 07:13:09 2012
+++ /branches/bleeding_edge/src/ast.h Tue Aug 7 07:06:25 2012
@@ -1513,7 +1513,7 @@
Expression* key() const { return key_; }
virtual int position() const { return pos_; }
- BailoutId ReturnId() const { return return_id_; }
+ BailoutId LoadId() const { return load_id_; }
bool IsStringLength() const { return is_string_length_; }
bool IsStringAccess() const { return is_string_access_; }
@@ -1538,7 +1538,7 @@
obj_(obj),
key_(key),
pos_(pos),
- return_id_(GetNextId(isolate)),
+ load_id_(GetNextId(isolate)),
is_monomorphic_(false),
is_uninitialized_(false),
is_array_length_(false),
@@ -1550,7 +1550,7 @@
Expression* obj_;
Expression* key_;
int pos_;
- const BailoutId return_id_;
+ const BailoutId load_id_;
SmallMapList receiver_types_;
bool is_monomorphic_ : 1;
@@ -1810,11 +1810,9 @@
virtual SmallMapList* GetReceiverTypes() { return &receiver_types_; }
BailoutId AssignmentId() const { return assignment_id_; }
- BailoutId CountId() const { return count_id_; }
-
- TypeFeedbackId CountBinOpFeedbackId() const { return reuse(CountId()); }
+
+ TypeFeedbackId CountBinOpFeedbackId() const { return count_id_; }
TypeFeedbackId CountStoreFeedbackId() const { return reuse(id()); }
-
protected:
template<class> friend class AstNodeFactory;
@@ -1839,7 +1837,7 @@
Expression* expression_;
int pos_;
const BailoutId assignment_id_;
- const BailoutId count_id_;
+ const TypeFeedbackId count_id_;
SmallMapList receiver_types_;
};
@@ -1961,7 +1959,6 @@
void mark_block_start() { block_start_ = true; }
void mark_block_end() { block_end_ = true; }
- BailoutId CompoundLoadId() const { return compound_load_id_; }
BailoutId AssignmentId() const { return assignment_id_; }
// Type feedback information.
@@ -1994,7 +1991,6 @@
Expression* value_;
int pos_;
BinaryOperation* binary_operation_;
- const BailoutId compound_load_id_;
const BailoutId assignment_id_;
bool block_start_;
=======================================
--- /branches/bleeding_edge/src/hydrogen.cc Mon Aug 6 07:28:27 2012
+++ /branches/bleeding_edge/src/hydrogen.cc Tue Aug 7 07:06:25 2012
@@ -5421,7 +5421,7 @@
load = BuildLoadNamedGeneric(object, name, prop);
}
PushAndAdd(load);
- if (load->HasObservableSideEffects())
AddSimulate(expr->CompoundLoadId());
+ if (load->HasObservableSideEffects()) AddSimulate(prop->LoadId());
CHECK_ALIVE(VisitForValue(expr->value()));
HValue* right = Pop();
@@ -5465,11 +5465,11 @@
bool has_side_effects = false;
HValue* load = HandleKeyedElementAccess(
- obj, key, NULL, prop, expr->CompoundLoadId(),
RelocInfo::kNoPosition,
+ obj, key, NULL, prop, prop->LoadId(), RelocInfo::kNoPosition,
false, // is_store
&has_side_effects);
Push(load);
- if (has_side_effects) AddSimulate(expr->CompoundLoadId());
+ if (has_side_effects) AddSimulate(prop->LoadId());
CHECK_ALIVE(VisitForValue(expr->value()));
@@ -6956,7 +6956,7 @@
0,
NULL,
prop->id(),
- prop->ReturnId(),
+ prop->LoadId(),
NORMAL_RETURN);
}
@@ -7832,7 +7832,7 @@
load = BuildLoadNamedGeneric(object, name, prop);
}
PushAndAdd(load);
- if (load->HasObservableSideEffects()) AddSimulate(expr->CountId());
+ if (load->HasObservableSideEffects()) AddSimulate(prop->LoadId());
after = BuildIncrement(returns_original_input, expr);
input = Pop();
@@ -7875,11 +7875,11 @@
bool has_side_effects = false;
HValue* load = HandleKeyedElementAccess(
- obj, key, NULL, prop, expr->CountId(), RelocInfo::kNoPosition,
+ obj, key, NULL, prop, prop->LoadId(), RelocInfo::kNoPosition,
false, // is_store
&has_side_effects);
Push(load);
- if (has_side_effects) AddSimulate(expr->CountId());
+ if (has_side_effects) AddSimulate(prop->LoadId());
after = BuildIncrement(returns_original_input, expr);
input = Pop();
=======================================
--- /branches/bleeding_edge/src/ia32/full-codegen-ia32.cc Mon Aug 6
07:13:09 2012
+++ /branches/bleeding_edge/src/ia32/full-codegen-ia32.cc Tue Aug 7
07:06:25 2012
@@ -1791,11 +1791,11 @@
break;
case NAMED_PROPERTY:
EmitNamedPropertyLoad(property);
- PrepareForBailoutForId(expr->CompoundLoadId(), TOS_REG);
+ PrepareForBailoutForId(property->LoadId(), TOS_REG);
break;
case KEYED_PROPERTY:
EmitKeyedPropertyLoad(property);
- PrepareForBailoutForId(expr->CompoundLoadId(), TOS_REG);
+ PrepareForBailoutForId(property->LoadId(), TOS_REG);
break;
}
}
@@ -2216,7 +2216,7 @@
VisitForAccumulatorValue(expr->obj());
__ mov(edx, result_register());
EmitNamedPropertyLoad(expr);
- PrepareForBailoutForId(expr->ReturnId(), TOS_REG);
+ PrepareForBailoutForId(expr->LoadId(), TOS_REG);
context()->Plug(eax);
} else {
VisitForStackValue(expr->obj());
@@ -4033,7 +4033,7 @@
if (assign_type == VARIABLE) {
PrepareForBailout(expr->expression(), TOS_REG);
} else {
- PrepareForBailoutForId(expr->CountId(), TOS_REG);
+ PrepareForBailoutForId(prop->LoadId(), TOS_REG);
}
// Call ToNumber only if operand is not a smi.
=======================================
--- /branches/bleeding_edge/src/mips/full-codegen-mips.cc Mon Aug 6
07:13:09 2012
+++ /branches/bleeding_edge/src/mips/full-codegen-mips.cc Tue Aug 7
07:06:25 2012
@@ -1850,11 +1850,11 @@
break;
case NAMED_PROPERTY:
EmitNamedPropertyLoad(property);
- PrepareForBailoutForId(expr->CompoundLoadId(), TOS_REG);
+ PrepareForBailoutForId(property->LoadId(), TOS_REG);
break;
case KEYED_PROPERTY:
EmitKeyedPropertyLoad(property);
- PrepareForBailoutForId(expr->CompoundLoadId(), TOS_REG);
+ PrepareForBailoutForId(property->LoadId(), TOS_REG);
break;
}
}
@@ -2301,7 +2301,7 @@
if (key->IsPropertyName()) {
VisitForAccumulatorValue(expr->obj());
EmitNamedPropertyLoad(expr);
- PrepareForBailoutForId(expr->ReturnId(), TOS_REG);
+ PrepareForBailoutForId(expr->LoadId(), TOS_REG);
context()->Plug(v0);
} else {
VisitForStackValue(expr->obj());
@@ -4105,7 +4105,7 @@
if (assign_type == VARIABLE) {
PrepareForBailout(expr->expression(), TOS_REG);
} else {
- PrepareForBailoutForId(expr->CountId(), TOS_REG);
+ PrepareForBailoutForId(prop->LoadId(), TOS_REG);
}
// Call ToNumber only if operand is not a smi.
=======================================
--- /branches/bleeding_edge/src/x64/full-codegen-x64.cc Mon Aug 6 07:13:09
2012
+++ /branches/bleeding_edge/src/x64/full-codegen-x64.cc Tue Aug 7 07:06:25
2012
@@ -1809,11 +1809,11 @@
break;
case NAMED_PROPERTY:
EmitNamedPropertyLoad(property);
- PrepareForBailoutForId(expr->CompoundLoadId(), TOS_REG);
+ PrepareForBailoutForId(property->LoadId(), TOS_REG);
break;
case KEYED_PROPERTY:
EmitKeyedPropertyLoad(property);
- PrepareForBailoutForId(expr->CompoundLoadId(), TOS_REG);
+ PrepareForBailoutForId(property->LoadId(), TOS_REG);
break;
}
}
@@ -2190,7 +2190,7 @@
if (key->IsPropertyName()) {
VisitForAccumulatorValue(expr->obj());
EmitNamedPropertyLoad(expr);
- PrepareForBailoutForId(expr->ReturnId(), TOS_REG);
+ PrepareForBailoutForId(expr->LoadId(), TOS_REG);
context()->Plug(rax);
} else {
VisitForStackValue(expr->obj());
@@ -4023,7 +4023,7 @@
if (assign_type == VARIABLE) {
PrepareForBailout(expr->expression(), TOS_REG);
} else {
- PrepareForBailoutForId(expr->CountId(), TOS_REG);
+ PrepareForBailoutForId(prop->LoadId(), TOS_REG);
}
// Call ToNumber only if operand is not a smi.
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev