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

Unified Diff: src/objects.h

Issue 1086873003: Array() in optimized code can create with wrong ElementsKind in corner cases. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address comments and test failure. Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/mips64/lithium-codegen-mips64.cc ('k') | src/objects.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.h
diff --git a/src/objects.h b/src/objects.h
index f9ed74a480a42e74ab7b789d5e34aaa6c98b6845..23fe4cda220288b9b08c28311554838f80335240 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -10406,6 +10406,11 @@ class JSArray: public JSObject {
// capacity is non-zero.
static void Initialize(Handle<JSArray> array, int capacity, int length = 0);
+ // If the JSArray has fast elements, and new_length would result in
+ // normalization, returns true.
+ static inline bool SetElementsLengthWouldNormalize(
+ Heap* heap, Handle<Object> new_length_handle);
+
// Initializes the array to a certain length.
inline bool AllowsSetElementsLength();
// Can cause GC.
« no previous file with comments | « src/mips64/lithium-codegen-mips64.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698