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

Unified Diff: src/objects.h

Issue 1191313003: More cleanup related to setting array.length (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 6 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/elements.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 4f73eb42e7a057a77db18a8af84dd7a98773b508..0cfee84e9ee14192b5ec994640a2e5af6dc1b2d3 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -10184,15 +10184,15 @@ class JSArray: public JSObject {
// 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);
+ static inline bool SetLengthWouldNormalize(Heap* heap, uint32_t new_length);
// Initializes the array to a certain length.
- inline bool AllowsSetElementsLength();
- // Can cause GC.
- MUST_USE_RESULT static MaybeHandle<Object> SetElementsLength(
- Handle<JSArray> array,
- Handle<Object> length);
+ inline bool AllowsSetLength();
+
+ static void SetLength(Handle<JSArray> array, uint32_t length);
+ // Same as above but will also queue splice records if |array| is observed.
+ static MaybeHandle<Object> ObservableSetLength(Handle<JSArray> array,
+ uint32_t length);
// Set the content of the array to the content of storage.
static inline void SetContent(Handle<JSArray> array,
« no previous file with comments | « src/elements.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698