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

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

Issue 1847543002: Expose a lower bound of malloc'd memory via heap statistics (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: updates Created 4 years, 8 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 | « test/cctest/test-bit-vector.cc ('k') | test/cctest/test-liveedit.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 556 matching lines...) Expand 10 before | Expand all | Expand 10 after
567 expectations.AddDataField(map, NONE, Representation::Smi(), any_type); 567 expectations.AddDataField(map, NONE, Representation::Smi(), any_type);
568 if (i == detach_property_at_index) { 568 if (i == detach_property_at_index) {
569 detach_point_map = map; 569 detach_point_map = map;
570 } 570 }
571 } 571 }
572 } 572 }
573 CHECK(!map->is_deprecated()); 573 CHECK(!map->is_deprecated());
574 CHECK(map->is_stable()); 574 CHECK(map->is_stable());
575 CHECK(expectations.Check(*map)); 575 CHECK(expectations.Check(*map));
576 576
577 Zone zone; 577 Zone zone(isolate->allocator());
578 578
579 if (is_detached_map) { 579 if (is_detached_map) {
580 detach_point_map = Map::ReconfigureProperty( 580 detach_point_map = Map::ReconfigureProperty(
581 detach_point_map, detach_property_at_index, kData, NONE, 581 detach_point_map, detach_property_at_index, kData, NONE,
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()));
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after
959 map2 = 959 map2 =
960 expectations2.AddDataField(map2, READ_ONLY, to_representation, to_type); 960 expectations2.AddDataField(map2, READ_ONLY, to_representation, to_type);
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; 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("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
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
1044 map2 = 1044 map2 =
1045 expectations2.AddDataField(map2, READ_ONLY, to_representation, to_type); 1045 expectations2.AddDataField(map2, READ_ONLY, to_representation, to_type);
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; 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("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
(...skipping 1114 matching lines...) Expand 10 before | Expand all | Expand 10 after
2179 Handle<AccessorPair> pair = CreateAccessorPair(true, true); 2179 Handle<AccessorPair> pair = CreateAccessorPair(true, true);
2180 TransitionToAccessorConstantOperator transition_op(pair); 2180 TransitionToAccessorConstantOperator transition_op(pair);
2181 2181
2182 SameMapChecker checker; 2182 SameMapChecker checker;
2183 TestTransitionTo(transition_op, transition_op, checker); 2183 TestTransitionTo(transition_op, transition_op, checker);
2184 } 2184 }
2185 2185
2186 2186
2187 // TODO(ishell): add this test once IS_ACCESSOR_FIELD_SUPPORTED is supported. 2187 // TODO(ishell): add this test once IS_ACCESSOR_FIELD_SUPPORTED is supported.
2188 // TEST(TransitionAccessorConstantToAnotherAccessorConstant) 2188 // TEST(TransitionAccessorConstantToAnotherAccessorConstant)
OLDNEW
« no previous file with comments | « test/cctest/test-bit-vector.cc ('k') | test/cctest/test-liveedit.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698