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

Unified Diff: src/hydrogen.cc

Issue 14812010: Turn off tracking of fields for the roll. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
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
« no previous file with comments | « src/flag-definitions.h ('k') | src/lithium-allocator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen.cc
diff --git a/src/hydrogen.cc b/src/hydrogen.cc
index 537b791d7006ebf17d78dac8cb5fb7e866b583a5..f50a2d5796c3880b0a3a0fc3d4b4d3e327d690da 100644
--- a/src/hydrogen.cc
+++ b/src/hydrogen.cc
@@ -7218,67 +7218,6 @@ void HOptimizedGraphBuilder::HandlePolymorphicStoreNamedField(
HValue* value,
SmallMapList* types,
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
// maps are identical. In that case we can avoid repeatedly generating the
// same prototype map checks.
« no previous file with comments | « src/flag-definitions.h ('k') | src/lithium-allocator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698