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

Unified Diff: src/objects-inl.h

Issue 2015513002: [runtime] Ensure that all elements kind transitions are chained to the root map. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebasing 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/objects.cc ('k') | test/cctest/test-field-type-tracking.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects-inl.h
diff --git a/src/objects-inl.h b/src/objects-inl.h
index f873f9478bcf5964b0fa4b47967c01a772c420db..940b4110521d254a98eb8f7d7fc0804c68c8d443 100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -18,6 +18,7 @@
#include "src/conversions-inl.h"
#include "src/factory.h"
#include "src/field-index-inl.h"
+#include "src/field-type.h"
#include "src/handles-inl.h"
#include "src/heap/heap-inl.h"
#include "src/heap/heap.h"
@@ -2810,6 +2811,25 @@ FixedArrayBase* Map::GetInitialElements() {
return NULL;
}
+// static
+Handle<Map> Map::ReconfigureProperty(Handle<Map> map, int modify_index,
+ PropertyKind new_kind,
+ PropertyAttributes new_attributes,
+ Representation new_representation,
+ Handle<FieldType> new_field_type,
+ StoreMode store_mode) {
+ return Reconfigure(map, map->elements_kind(), modify_index, new_kind,
+ new_attributes, new_representation, new_field_type,
+ store_mode);
+}
+
+// static
+Handle<Map> Map::ReconfigureElementsKind(Handle<Map> map,
+ ElementsKind new_elements_kind) {
+ return Reconfigure(map, new_elements_kind, -1, kData, NONE,
+ Representation::None(), FieldType::None(map->GetIsolate()),
+ ALLOW_IN_DESCRIPTOR);
+}
Object** DescriptorArray::GetKeySlot(int descriptor_number) {
DCHECK(descriptor_number < number_of_descriptors());
« no previous file with comments | « src/objects.cc ('k') | test/cctest/test-field-type-tracking.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698