Commit 4c2c6654 authored by verwaest@chromium.org's avatar verwaest@chromium.org

Turn off tracking of fields for the roll.

Revert polymorphic stores suspect of crashes.

Revert "Turn on tracking of fields."
Revert "Turn polymorphic stores monomorphic if store sequence matches."
Revert "Fix polymorphic store."

R=danno@chromium.org

Review URL: https://chromiumcodereview.appspot.com/14812010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14593 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent bd8df839
...@@ -193,8 +193,8 @@ DEFINE_bool(clever_optimizations, ...@@ -193,8 +193,8 @@ DEFINE_bool(clever_optimizations,
true, true,
"Optimize object size, Array shift, DOM strings and string +") "Optimize object size, Array shift, DOM strings and string +")
DEFINE_bool(pretenure_literals, true, "allocate literals in old space") DEFINE_bool(pretenure_literals, true, "allocate literals in old space")
DEFINE_bool(track_fields, true, "track fields with only smi values") DEFINE_bool(track_fields, false, "track fields with only smi values")
DEFINE_bool(track_double_fields, true, "track fields with double values") DEFINE_bool(track_double_fields, false, "track fields with double values")
DEFINE_implication(track_double_fields, track_fields) DEFINE_implication(track_double_fields, track_fields)
// Flags for data representation optimizations // Flags for data representation optimizations
......
...@@ -7218,67 +7218,6 @@ void HOptimizedGraphBuilder::HandlePolymorphicStoreNamedField( ...@@ -7218,67 +7218,6 @@ void HOptimizedGraphBuilder::HandlePolymorphicStoreNamedField(
HValue* value, HValue* value,
SmallMapList* types, SmallMapList* types,
Handle<String> name) { Handle<String> name) {
// Use monomorphic store if property lookup results in the same field index
// and compatible representation for all maps. Requires special map check on
// the set of all handled maps.
if (types->length() <= kMaxStorePolymorphism) {
int previous_field_offset = 0;
bool previous_field_is_in_object = false;
Representation previous_representation = Representation::None();
Handle<Map> map;
LookupResult lookup(isolate());
int count;
for (count = 0; count < types->length(); ++count) {
map = types->at(count);
if (!ComputeLoadStoreField(map, name, &lookup, false) ||
lookup.IsTransition()) {
break;
}
Representation representation = lookup.representation();
int index = ComputeLoadStoreFieldIndex(map, &lookup);
bool is_in_object = index < 0;
int offset = index * kPointerSize;
if (index < 0) {
offset += map->instance_size();
} else {
offset += FixedArray::kHeaderSize;
}
if (count == 0) {
previous_field_offset = offset;
previous_field_is_in_object = is_in_object;
previous_representation = representation;
} else if (offset != previous_field_offset ||
is_in_object != previous_field_is_in_object ||
!representation.IsCompatibleForStore(
previous_representation)) {
break;
}
}
if (types->length() == count) {
AddInstruction(new(zone()) HCheckNonSmi(object));
AddInstruction(HCheckMaps::New(object, types, zone()));
HInstruction* instr = BuildStoreNamedField(
object, name, value, map, &lookup);
AddInstruction(instr);
instr->set_position(expr->position());
// The HSimulate for the store should not see the stored value in
// effect contexts (it is not materialized at expr->id() in the
// unoptimized code).
if (instr->HasObservableSideEffects()) {
if (ast_context()->IsEffect()) {
AddSimulate(expr->id(), REMOVABLE_SIMULATE);
} else {
Push(value);
AddSimulate(expr->id(), REMOVABLE_SIMULATE);
Drop(1);
}
}
return ast_context()->ReturnValue(value);
}
}
// TODO(ager): We should recognize when the prototype chains for different // TODO(ager): We should recognize when the prototype chains for different
// maps are identical. In that case we can avoid repeatedly generating the // maps are identical. In that case we can avoid repeatedly generating the
// same prototype map checks. // same prototype map checks.
......
...@@ -1338,7 +1338,6 @@ void LAllocator::BuildLiveRanges() { ...@@ -1338,7 +1338,6 @@ void LAllocator::BuildLiveRanges() {
#ifdef DEBUG #ifdef DEBUG
if (block_id == 0) { if (block_id == 0) {
ALLOW_HANDLE_DEREF(isolate(), "Printing debug information");
BitVector::Iterator iterator(live); BitVector::Iterator iterator(live);
bool found = false; bool found = false;
while (!iterator.Done()) { while (!iterator.Done()) {
......
...@@ -108,10 +108,6 @@ class Representation { ...@@ -108,10 +108,6 @@ class Representation {
(!IsDouble() && !other.IsDouble()); (!IsDouble() && !other.IsDouble());
} }
bool IsCompatibleForStore(const Representation& other) const {
return Equals(other);
}
bool is_more_general_than(const Representation& other) const { bool is_more_general_than(const Representation& other) const {
ASSERT(kind_ != kExternal); ASSERT(kind_ != kExternal);
ASSERT(other.kind_ != kExternal); ASSERT(other.kind_ != kExternal);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment