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

Side by Side Diff: test/cctest/test-field-type-tracking.cc

Issue 1546933002: Ensure that all non-stable maps created by Map::AddMissingTransitions() are marked as such. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressing comments Created 5 years 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 unified diff | Download patch
« no previous file with comments | « src/objects-debug.cc ('k') | test/cctest/test-unboxed-doubles.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <stdlib.h> 5 #include <stdlib.h>
6 #include <utility> 6 #include <utility>
7 7
8 #include "test/cctest/test-api.h" 8 #include "test/cctest/test-api.h"
9 9
10 #include "src/v8.h" 10 #include "src/v8.h"
(...skipping 603 matching lines...) Expand 10 before | Expand all | Expand 10 after
614 CHECK(!info.dependencies()->HasAborted()); 614 CHECK(!info.dependencies()->HasAborted());
615 615
616 } else { 616 } else {
617 CHECK(!field_owner->is_deprecated()); 617 CHECK(!field_owner->is_deprecated());
618 CHECK(map->is_stable()); // Map did not change, must be left stable. 618 CHECK(map->is_stable()); // Map did not change, must be left stable.
619 CHECK_EQ(*map, *new_map); 619 CHECK_EQ(*map, *new_map);
620 620
621 CHECK_EQ(expected_field_type_dependency, info.dependencies()->HasAborted()); 621 CHECK_EQ(expected_field_type_dependency, info.dependencies()->HasAborted());
622 } 622 }
623 623
624 {
625 // Check that all previous maps are not stable.
626 Map* tmp = *new_map;
627 while (true) {
628 Object* back = tmp->GetBackPointer();
629 if (back->IsUndefined()) break;
630 tmp = Map::cast(back);
631 CHECK(!tmp->is_stable());
632 }
633 }
634
624 info.dependencies()->Rollback(); // Properly cleanup compilation info. 635 info.dependencies()->Rollback(); // Properly cleanup compilation info.
625 636
626 // Update all deprecated maps and check that they are now the same. 637 // Update all deprecated maps and check that they are now the same.
627 Handle<Map> updated_map = Map::Update(map); 638 Handle<Map> updated_map = Map::Update(map);
628 CHECK_EQ(*new_map, *updated_map); 639 CHECK_EQ(*new_map, *updated_map);
629 } 640 }
630 641
631 642
632 static void TestGeneralizeRepresentation( 643 static void TestGeneralizeRepresentation(
633 Representation from_representation, Handle<HeapType> from_type, 644 Representation from_representation, Handle<HeapType> from_type,
(...skipping 1545 matching lines...) Expand 10 before | Expand all | Expand 10 after
2179 Handle<AccessorPair> pair = CreateAccessorPair(true, true); 2190 Handle<AccessorPair> pair = CreateAccessorPair(true, true);
2180 TransitionToAccessorConstantOperator transition_op(pair); 2191 TransitionToAccessorConstantOperator transition_op(pair);
2181 2192
2182 SameMapChecker checker; 2193 SameMapChecker checker;
2183 TestTransitionTo(transition_op, transition_op, checker); 2194 TestTransitionTo(transition_op, transition_op, checker);
2184 } 2195 }
2185 2196
2186 2197
2187 // TODO(ishell): add this test once IS_ACCESSOR_FIELD_SUPPORTED is supported. 2198 // TODO(ishell): add this test once IS_ACCESSOR_FIELD_SUPPORTED is supported.
2188 // TEST(TransitionAccessorConstantToAnotherAccessorConstant) 2199 // TEST(TransitionAccessorConstantToAnotherAccessorConstant)
OLDNEW
« no previous file with comments | « src/objects-debug.cc ('k') | test/cctest/test-unboxed-doubles.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698