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

Side by Side Diff: test/cctest/test-migrations.cc

Issue 927153002: GCMole issues fixes (part 2). (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed comments Created 5 years, 10 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | 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 "src/v8.h" 8 #include "src/v8.h"
9 9
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 554 matching lines...) Expand 10 before | Expand all | Expand 10 after
565 565
566 CHECK(!new_map->is_deprecated()); 566 CHECK(!new_map->is_deprecated());
567 CHECK(!new_map->is_dictionary_map()); 567 CHECK(!new_map->is_dictionary_map());
568 CHECK(expectations.Check(*new_map)); 568 CHECK(expectations.Check(*new_map));
569 } 569 }
570 570
571 Handle<Map> active_map = maps[kPropCount - 1]; 571 Handle<Map> active_map = maps[kPropCount - 1];
572 CHECK(!active_map->is_deprecated()); 572 CHECK(!active_map->is_deprecated());
573 573
574 // Update all deprecated maps and check that they are now the same. 574 // Update all deprecated maps and check that they are now the same.
575 CHECK_EQ(*active_map, *Map::Update(map)); 575 Handle<Map> updated_map = Map::Update(map);
576 CHECK_EQ(*active_map, *updated_map);
576 for (int i = 0; i < kPropCount; i++) { 577 for (int i = 0; i < kPropCount; i++) {
577 Handle<Map> updated_map = Map::Update(maps[i]); 578 updated_map = Map::Update(maps[i]);
578 CHECK_EQ(*active_map, *updated_map); 579 CHECK_EQ(*active_map, *updated_map);
579 } 580 }
580 } 581 }
581 582
582 583
583 static void TestGeneralizeRepresentationTrivial( 584 static void TestGeneralizeRepresentationTrivial(
584 Representation from_representation, Handle<HeapType> from_type, 585 Representation from_representation, Handle<HeapType> from_type,
585 Representation to_representation, Handle<HeapType> to_type, 586 Representation to_representation, Handle<HeapType> to_type,
586 Representation expected_representation, Handle<HeapType> expected_type, 587 Representation expected_representation, Handle<HeapType> expected_type,
587 bool expected_field_type_dependency = true) { 588 bool expected_field_type_dependency = true) {
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
828 829
829 CHECK(!new_map->is_deprecated()); 830 CHECK(!new_map->is_deprecated());
830 CHECK(!new_map->is_dictionary_map()); 831 CHECK(!new_map->is_dictionary_map());
831 CHECK(expectations.Check(*new_map)); 832 CHECK(expectations.Check(*new_map));
832 } 833 }
833 834
834 Handle<Map> active_map = maps[kPropCount - 1]; 835 Handle<Map> active_map = maps[kPropCount - 1];
835 CHECK(!active_map->is_deprecated()); 836 CHECK(!active_map->is_deprecated());
836 837
837 // Update all deprecated maps and check that they are now the same. 838 // Update all deprecated maps and check that they are now the same.
838 CHECK_EQ(*active_map, *Map::Update(map)); 839 Handle<Map> updated_map = Map::Update(map);
840 CHECK_EQ(*active_map, *updated_map);
839 for (int i = 0; i < kPropCount; i++) { 841 for (int i = 0; i < kPropCount; i++) {
840 Handle<Map> updated_map = Map::Update(maps[i]); 842 updated_map = Map::Update(maps[i]);
841 CHECK_EQ(*active_map, *updated_map); 843 CHECK_EQ(*active_map, *updated_map);
842 } 844 }
843 } 845 }
844 846
845 847
846 //////////////////////////////////////////////////////////////////////////////// 848 ////////////////////////////////////////////////////////////////////////////////
847 // A set of tests for attribute reconfiguration case. 849 // A set of tests for attribute reconfiguration case.
848 // 850 //
849 851
850 // This test ensures that representation/field type generalization is correctly 852 // This test ensures that representation/field type generalization is correctly
(...skipping 698 matching lines...) Expand 10 before | Expand all | Expand 10 after
1549 CHECK(expectations2.Check(*new_map2)); 1551 CHECK(expectations2.Check(*new_map2));
1550 } else { 1552 } else {
1551 CHECK(expectations.Check(*new_map2)); 1553 CHECK(expectations.Check(*new_map2));
1552 } 1554 }
1553 } 1555 }
1554 1556
1555 Handle<Map> active_map = maps[kPropCount - 1]; 1557 Handle<Map> active_map = maps[kPropCount - 1];
1556 CHECK(!active_map->is_deprecated()); 1558 CHECK(!active_map->is_deprecated());
1557 1559
1558 // Update all deprecated maps and check that they are now the same. 1560 // Update all deprecated maps and check that they are now the same.
1559 CHECK_EQ(*active_map, *Map::Update(map)); 1561 Handle<Map> updated_map = Map::Update(map);
1562 CHECK_EQ(*active_map, *updated_map);
1560 for (int i = 0; i < kPropCount; i++) { 1563 for (int i = 0; i < kPropCount; i++) {
1561 Handle<Map> updated_map = Map::Update(maps[i]); 1564 updated_map = Map::Update(maps[i]);
1562 CHECK_EQ(*active_map, *updated_map); 1565 CHECK_EQ(*active_map, *updated_map);
1563 } 1566 }
1564 } 1567 }
1565 1568
1566 1569
1567 TEST(ElementsKindTransitionFromMapOwningDescriptor) { 1570 TEST(ElementsKindTransitionFromMapOwningDescriptor) {
1568 CcTest::InitializeVM(); 1571 CcTest::InitializeVM();
1569 v8::HandleScope scope(CcTest::isolate()); 1572 v8::HandleScope scope(CcTest::isolate());
1570 Isolate* isolate = CcTest::i_isolate(); 1573 Isolate* isolate = CcTest::i_isolate();
1571 Handle<HeapType> any_type = HeapType::Any(isolate); 1574 Handle<HeapType> any_type = HeapType::Any(isolate);
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after
2020 Handle<AccessorPair> pair = CreateAccessorPair(true, true); 2023 Handle<AccessorPair> pair = CreateAccessorPair(true, true);
2021 TransitionToAccessorConstantOperator transition_op(pair); 2024 TransitionToAccessorConstantOperator transition_op(pair);
2022 2025
2023 SameMapChecker checker; 2026 SameMapChecker checker;
2024 TestTransitionTo(transition_op, transition_op, checker); 2027 TestTransitionTo(transition_op, transition_op, checker);
2025 } 2028 }
2026 2029
2027 2030
2028 // TODO(ishell): add this test once IS_ACCESSOR_FIELD_SUPPORTED is supported. 2031 // TODO(ishell): add this test once IS_ACCESSOR_FIELD_SUPPORTED is supported.
2029 // TEST(TransitionAccessorConstantToAnotherAccessorConstant) 2032 // TEST(TransitionAccessorConstantToAnotherAccessorConstant)
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698