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

Unified Diff: src/factory.h

Issue 1151853003: [strong] create strong array literals Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix a test Created 5 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/compiler/js-typed-lowering.cc ('k') | src/factory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/factory.h
diff --git a/src/factory.h b/src/factory.h
index 8eaa216ee84646ba9f3d0d42c8c6d2188be5d69f..f6ba596b7d9cca90958e580328468d5b183053c1 100644
--- a/src/factory.h
+++ b/src/factory.h
@@ -401,23 +401,26 @@ class Factory final {
// Create a JSArray with no elements.
Handle<JSArray> NewJSArray(
ElementsKind elements_kind,
+ ObjectStrength strength = WEAK,
PretenureFlag pretenure = NOT_TENURED);
// Create a JSArray with a specified length and elements initialized
// according to the specified mode.
Handle<JSArray> NewJSArray(
ElementsKind elements_kind, int length, int capacity,
+ ObjectStrength strength = WEAK,
ArrayStorageAllocationMode mode = DONT_INITIALIZE_ARRAY_ELEMENTS,
PretenureFlag pretenure = NOT_TENURED);
Handle<JSArray> NewJSArray(
int capacity,
ElementsKind elements_kind = TERMINAL_FAST_ELEMENTS_KIND,
+ ObjectStrength strength = WEAK,
PretenureFlag pretenure = NOT_TENURED) {
if (capacity != 0) {
elements_kind = GetHoleyElementsKind(elements_kind);
}
- return NewJSArray(elements_kind, 0, capacity,
+ return NewJSArray(elements_kind, 0, capacity, strength,
INITIALIZE_ARRAY_ELEMENTS_WITH_HOLE, pretenure);
}
@@ -426,14 +429,16 @@ class Factory final {
Handle<FixedArrayBase> elements,
ElementsKind elements_kind,
int length,
+ ObjectStrength strength = WEAK,
PretenureFlag pretenure = NOT_TENURED);
Handle<JSArray> NewJSArrayWithElements(
Handle<FixedArrayBase> elements,
ElementsKind elements_kind = TERMINAL_FAST_ELEMENTS_KIND,
+ ObjectStrength strength = WEAK,
PretenureFlag pretenure = NOT_TENURED) {
- return NewJSArrayWithElements(
- elements, elements_kind, elements->length(), pretenure);
+ return NewJSArrayWithElements(elements, elements_kind, elements->length(),
+ strength, pretenure);
}
void NewJSArrayStorage(
« no previous file with comments | « src/compiler/js-typed-lowering.cc ('k') | src/factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698