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

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

Issue 1911313002: Pass debug name as Vector instead of const char* (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@wasm-offset-table-1
Patch Set: rebase Created 4 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 unified diff | Download patch
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 571 matching lines...) Expand 10 before | Expand all | Expand 10 after
582 Representation::Tagged(), any_type, FORCE_FIELD); 582 Representation::Tagged(), any_type, FORCE_FIELD);
583 expectations.SetDataField(detach_property_at_index, 583 expectations.SetDataField(detach_property_at_index,
584 Representation::Tagged(), any_type); 584 Representation::Tagged(), any_type);
585 CHECK(map->is_deprecated()); 585 CHECK(map->is_deprecated());
586 CHECK(expectations.Check(*detach_point_map, 586 CHECK(expectations.Check(*detach_point_map,
587 detach_point_map->NumberOfOwnDescriptors())); 587 detach_point_map->NumberOfOwnDescriptors()));
588 } 588 }
589 589
590 // Create new maps by generalizing representation of propX field. 590 // Create new maps by generalizing representation of propX field.
591 Handle<Map> field_owner(map->FindFieldOwner(property_index), isolate); 591 Handle<Map> field_owner(map->FindFieldOwner(property_index), isolate);
592 CompilationInfo info("testing", isolate, &zone); 592 CompilationInfo info(ArrayVector("testing"), isolate, &zone);
593 CHECK(!info.dependencies()->HasAborted()); 593 CHECK(!info.dependencies()->HasAborted());
594 594
595 info.dependencies()->AssumeFieldType(field_owner); 595 info.dependencies()->AssumeFieldType(field_owner);
596 596
597 Handle<Map> new_map = 597 Handle<Map> new_map =
598 Map::ReconfigureProperty(map, property_index, kData, NONE, 598 Map::ReconfigureProperty(map, property_index, kData, NONE,
599 to_representation, to_type, FORCE_FIELD); 599 to_representation, to_type, FORCE_FIELD);
600 600
601 expectations.SetDataField(property_index, expected_representation, 601 expectations.SetDataField(property_index, expected_representation,
602 expected_type); 602 expected_type);
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after
961 961
962 for (int i = kSplitProp + 1; i < kPropCount; i++) { 962 for (int i = kSplitProp + 1; i < kPropCount; i++) {
963 map2 = expectations2.AddDataField(map2, NONE, to_representation, to_type); 963 map2 = expectations2.AddDataField(map2, NONE, to_representation, to_type);
964 } 964 }
965 CHECK(!map2->is_deprecated()); 965 CHECK(!map2->is_deprecated());
966 CHECK(map2->is_stable()); 966 CHECK(map2->is_stable());
967 CHECK(expectations2.Check(*map2)); 967 CHECK(expectations2.Check(*map2));
968 968
969 Zone zone(isolate->allocator()); 969 Zone zone(isolate->allocator());
970 Handle<Map> field_owner(map->FindFieldOwner(kSplitProp), isolate); 970 Handle<Map> field_owner(map->FindFieldOwner(kSplitProp), isolate);
971 CompilationInfo info("testing", isolate, &zone); 971 CompilationInfo info(ArrayVector("testing"), isolate, &zone);
972 CHECK(!info.dependencies()->HasAborted()); 972 CHECK(!info.dependencies()->HasAborted());
973 info.dependencies()->AssumeFieldType(field_owner); 973 info.dependencies()->AssumeFieldType(field_owner);
974 974
975 // Reconfigure attributes of property |kSplitProp| of |map2| to NONE, which 975 // Reconfigure attributes of property |kSplitProp| of |map2| to NONE, which
976 // should generalize representations in |map1|. 976 // should generalize representations in |map1|.
977 Handle<Map> new_map = 977 Handle<Map> new_map =
978 Map::ReconfigureExistingProperty(map2, kSplitProp, kData, NONE); 978 Map::ReconfigureExistingProperty(map2, kSplitProp, kData, NONE);
979 979
980 // |map2| should be left unchanged but marked unstable. 980 // |map2| should be left unchanged but marked unstable.
981 CHECK(!map2->is_stable()); 981 CHECK(!map2->is_stable());
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
1046 1046
1047 for (int i = kSplitProp + 1; i < kPropCount; i++) { 1047 for (int i = kSplitProp + 1; i < kPropCount; i++) {
1048 map2 = expectations2.AddDataField(map2, NONE, to_representation, to_type); 1048 map2 = expectations2.AddDataField(map2, NONE, to_representation, to_type);
1049 } 1049 }
1050 CHECK(!map2->is_deprecated()); 1050 CHECK(!map2->is_deprecated());
1051 CHECK(map2->is_stable()); 1051 CHECK(map2->is_stable());
1052 CHECK(expectations2.Check(*map2)); 1052 CHECK(expectations2.Check(*map2));
1053 1053
1054 Zone zone(isolate->allocator()); 1054 Zone zone(isolate->allocator());
1055 Handle<Map> field_owner(map->FindFieldOwner(kSplitProp), isolate); 1055 Handle<Map> field_owner(map->FindFieldOwner(kSplitProp), isolate);
1056 CompilationInfo info("testing", isolate, &zone); 1056 CompilationInfo info(ArrayVector("testing"), isolate, &zone);
1057 CHECK(!info.dependencies()->HasAborted()); 1057 CHECK(!info.dependencies()->HasAborted());
1058 info.dependencies()->AssumeFieldType(field_owner); 1058 info.dependencies()->AssumeFieldType(field_owner);
1059 1059
1060 // Reconfigure attributes of property |kSplitProp| of |map2| to NONE, which 1060 // Reconfigure attributes of property |kSplitProp| of |map2| to NONE, which
1061 // should generalize representations in |map1|. 1061 // should generalize representations in |map1|.
1062 Handle<Map> new_map = 1062 Handle<Map> new_map =
1063 Map::ReconfigureExistingProperty(map2, kSplitProp, kData, NONE); 1063 Map::ReconfigureExistingProperty(map2, kSplitProp, kData, NONE);
1064 1064
1065 // |map2| should be left unchanged but marked unstable. 1065 // |map2| should be left unchanged but marked unstable.
1066 CHECK(!map2->is_stable()); 1066 CHECK(!map2->is_stable());
(...skipping 1055 matching lines...) Expand 10 before | Expand all | Expand 10 after
2122 Handle<AccessorPair> pair = CreateAccessorPair(true, true); 2122 Handle<AccessorPair> pair = CreateAccessorPair(true, true);
2123 TransitionToAccessorConstantOperator transition_op(pair); 2123 TransitionToAccessorConstantOperator transition_op(pair);
2124 2124
2125 SameMapChecker checker; 2125 SameMapChecker checker;
2126 TestTransitionTo(transition_op, transition_op, checker); 2126 TestTransitionTo(transition_op, transition_op, checker);
2127 } 2127 }
2128 2128
2129 2129
2130 // TODO(ishell): add this test once IS_ACCESSOR_FIELD_SUPPORTED is supported. 2130 // TODO(ishell): add this test once IS_ACCESSOR_FIELD_SUPPORTED is supported.
2131 // TEST(TransitionAccessorConstantToAnotherAccessorConstant) 2131 // TEST(TransitionAccessorConstantToAnotherAccessorConstant)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698