Commit 00d556f0 authored by Marja Hölttä's avatar Marja Hölttä Committed by V8 LUCI CQ

Revert "[rab/gsab] Update to the new spec"

This reverts commit 6207d61f.

Reason for revert: Incorrect implementation of the flag-not-on case.

Original change's description:
> [rab/gsab] Update to the new spec
>
> - Remove ResizableArrayBuffer / GrowableSharedArrayBuffer constructors,
> use options bags
> - Add AB.prototype.resizable and SAB.prototype.growable
> - Update receiver checks in (S?)AB.prototype methods
>
> Bug: v8:11111
> Change-Id: I4f8cb71a4c8e07483a3ffad83d98129da162b839
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3021174
> Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
> Reviewed-by: Shu-yu Guo <syg@chromium.org>
> Commit-Queue: Marja Hölttä <marja@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#75761}

Bug: v8:11111, chromium:1230129, chromium:1230408
No-Try: True
Tbr: mlippautz@chromium.org
Change-Id: I25aa10cb3dc20fdaeb45e6169fc01eec9a89f72c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3038061Reviewed-by: 's avatarMarja Hölttä <marja@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#75778}
parent ed636840
...@@ -18,103 +18,115 @@ transitioning javascript builtin ArrayBufferPrototypeGetByteLength( ...@@ -18,103 +18,115 @@ transitioning javascript builtin ArrayBufferPrototypeGetByteLength(
ThrowTypeError( ThrowTypeError(
MessageTemplate::kIncompatibleMethodReceiver, functionName, receiver); MessageTemplate::kIncompatibleMethodReceiver, functionName, receiver);
} }
// 4. Let length be O.[[ArrayBufferByteLength]]. // 4. If IsResizableArrayBuffer(O) is true, throw a TypeError exception.
if (IsResizableArrayBuffer(o)) {
ThrowTypeError(
MessageTemplate::kIncompatibleMethodReceiver, functionName, receiver);
}
// 5. If IsDetachedBuffer(O) is true, throw a TypeError exception.
// TODO(v8:4895): We don't actually throw here.
// 6. Let length be O.[[ArrayBufferByteLength]].
const length = o.byte_length; const length = o.byte_length;
// 5. Return length. // 7. Return length.
return Convert<Number>(length); return Convert<Number>(length);
} }
// #sec-get-arraybuffer.prototype.maxbytelength // #sec-get-sharedarraybuffer.prototype.bytelength
transitioning javascript builtin ArrayBufferPrototypeGetMaxByteLength( transitioning javascript builtin SharedArrayBufferPrototypeGetByteLength(
js-implicit context: NativeContext, receiver: JSAny)(): Number { js-implicit context: NativeContext, receiver: JSAny)(): Number {
// 1. Let O be the this value. // 1. Let O be the this value.
// 2. Perform ? RequireInternalSlot(O, [[ArrayBufferData]]). // 2. Perform ? RequireInternalSlot(O, [[ArrayBufferData]]).
const functionName = 'get ArrayBuffer.prototype.maxByteLength'; const functionName = 'get SharedArrayBuffer.prototype.byteLength';
const o = Cast<JSArrayBuffer>(receiver) otherwise const o = Cast<JSArrayBuffer>(receiver) otherwise
ThrowTypeError( ThrowTypeError(
MessageTemplate::kIncompatibleMethodReceiver, functionName, receiver); MessageTemplate::kIncompatibleMethodReceiver, functionName, receiver);
// 3. If IsSharedArrayBuffer(O) is true, throw a TypeError exception. // 3. Perform ? RequireInternalSlot(O, [[ArrayBufferData]]).
if (IsSharedArrayBuffer(o)) { if (!IsSharedArrayBuffer(o)) {
ThrowTypeError( ThrowTypeError(
MessageTemplate::kIncompatibleMethodReceiver, functionName, receiver); MessageTemplate::kIncompatibleMethodReceiver, functionName, receiver);
} }
// 4. If IsDetachedBuffer(O) is true, return 0_F. // 4. If IsResizableArrayBuffer(O) is true, throw a TypeError exception.
if (IsDetachedBuffer(o)) { if (IsResizableArrayBuffer(o)) {
return 0; ThrowTypeError(
MessageTemplate::kIncompatibleMethodReceiver, functionName, receiver);
} }
// 5. If IsResizableArrayBuffer(O) is true, then // 5. Let length be O.[[ArrayBufferByteLength]].
// a. Let length be O.[[ArrayBufferMaxByteLength]]. const length = o.byte_length;
// 6. Else, // 6. Return length.
// a. Let length be O.[[ArrayBufferByteLength]]. return Convert<Number>(length);
// 7. Return F(length);
assert(IsResizableArrayBuffer(o) || o.max_byte_length == o.byte_length);
return Convert<Number>(o.max_byte_length);
} }
// #sec-get-arraybuffer.prototype.resizable // #sec-get-resizablearraybuffer.prototype.bytelength
transitioning javascript builtin ArrayBufferPrototypeGetResizable( transitioning javascript builtin ResizableArrayBufferPrototypeGetByteLength(
js-implicit context: NativeContext, receiver: JSAny)(): Boolean { js-implicit context: NativeContext, receiver: JSAny)(): Number {
// 1. Let O be the this value. // 1. Let O be the this value.
// 2. Perform ? RequireInternalSlot(O, [[ArrayBufferData]]). // 2. Perform ? RequireInternalSlot(O, [[ArrayBufferMaxByteLength]]).
const functionName = 'get ArrayBuffer.prototype.resizable'; const functionName = 'get ResizableArrayBuffer.prototype.byteLength';
const o = Cast<JSArrayBuffer>(receiver) otherwise const o = Cast<JSArrayBuffer>(receiver) otherwise
ThrowTypeError( ThrowTypeError(
MessageTemplate::kIncompatibleMethodReceiver, functionName, receiver); MessageTemplate::kIncompatibleMethodReceiver, functionName, receiver);
if (!IsResizableArrayBuffer(o)) {
ThrowTypeError(
MessageTemplate::kIncompatibleMethodReceiver, functionName, receiver);
}
// 3. If IsSharedArrayBuffer(O) is true, throw a TypeError exception. // 3. If IsSharedArrayBuffer(O) is true, throw a TypeError exception.
if (IsSharedArrayBuffer(o)) { if (IsSharedArrayBuffer(o)) {
ThrowTypeError( ThrowTypeError(
MessageTemplate::kIncompatibleMethodReceiver, functionName, receiver); MessageTemplate::kIncompatibleMethodReceiver, functionName, receiver);
} }
// 4. Return IsResizableArrayBuffer(O). // 4. Let length be O.[[ArrayBufferByteLength]].
if (IsResizableArrayBuffer(o)) { const length = o.byte_length;
return True; // 5. Return length.
} return Convert<Number>(length);
return False;
} }
// #sec-get-growablesharedarraybuffer.prototype.maxbytelength // #sec-get-resizablearraybuffer.prototype.maxbytelength
transitioning javascript builtin transitioning javascript builtin ResizableArrayBufferPrototypeGetMaxByteLength(
SharedArrayBufferPrototypeGetMaxByteLength(
js-implicit context: NativeContext, receiver: JSAny)(): Number { js-implicit context: NativeContext, receiver: JSAny)(): Number {
// 1. Let O be the this value. // 1. Let O be the this value.
// 2. Perform ? RequireInternalSlot(O, [[ArrayBufferData]]). // 2. Perform ? RequireInternalSlot(O, [[ArrayBufferMaxByteLength]]).
const functionName = 'get SharedArrayBuffer.prototype.maxByteLength'; const functionName = 'get ResizableArrayBuffer.prototype.maxByteLength';
const o = Cast<JSArrayBuffer>(receiver) otherwise const o = Cast<JSArrayBuffer>(receiver) otherwise
ThrowTypeError( ThrowTypeError(
MessageTemplate::kIncompatibleMethodReceiver, functionName, receiver); MessageTemplate::kIncompatibleMethodReceiver, functionName, receiver);
// 3. If IsSharedArrayBuffer(O) is false, throw a TypeError exception. if (!IsResizableArrayBuffer(o)) {
if (!IsSharedArrayBuffer(o)) {
ThrowTypeError( ThrowTypeError(
MessageTemplate::kIncompatibleMethodReceiver, functionName, receiver); MessageTemplate::kIncompatibleMethodReceiver, functionName, receiver);
} }
// 4. If IsResizableArrayBuffer(O) is true, then // 3. If IsSharedArrayBuffer(O) is true, throw a TypeError exception.
// a. Let length be O.[[ArrayBufferMaxByteLength]]. if (IsSharedArrayBuffer(o)) {
// 5. Else, ThrowTypeError(
// a. Let length be O.[[ArrayBufferByteLength]]. MessageTemplate::kIncompatibleMethodReceiver, functionName, receiver);
// 6. Return F(length); }
assert(IsResizableArrayBuffer(o) || o.max_byte_length == o.byte_length); // 4. Let length be O.[[ArrayBufferMaxByteLength]].
return Convert<Number>(o.max_byte_length); const length = o.max_byte_length;
// 5. Return length.
return Convert<Number>(length);
} }
// #sec-get-sharedarraybuffer.prototype.growable // #sec-get-growablesharedarraybuffer.prototype.maxbytelength
transitioning javascript builtin SharedArrayBufferPrototypeGetGrowable( transitioning javascript builtin
js-implicit context: NativeContext, receiver: JSAny)(): Boolean { GrowableSharedArrayBufferPrototypeGetMaxByteLength(
js-implicit context: NativeContext, receiver: JSAny)(): Number {
// 1. Let O be the this value. // 1. Let O be the this value.
// 2. Perform ? RequireInternalSlot(O, [[ArrayBufferData]]). // 2. Perform ? RequireInternalSlot(O, [[ArrayBufferMaxByteLength]]).
const functionName = 'get SharedArrayBuffer.prototype.growable'; const functionName = 'get GrowableSharedArrayBuffer.prototype.maxByteLength';
const o = Cast<JSArrayBuffer>(receiver) otherwise const o = Cast<JSArrayBuffer>(receiver) otherwise
ThrowTypeError( ThrowTypeError(
MessageTemplate::kIncompatibleMethodReceiver, functionName, receiver); MessageTemplate::kIncompatibleMethodReceiver, functionName, receiver);
if (!IsResizableArrayBuffer(o)) {
ThrowTypeError(
MessageTemplate::kIncompatibleMethodReceiver, functionName, receiver);
}
// 3. If IsSharedArrayBuffer(O) is false, throw a TypeError exception. // 3. If IsSharedArrayBuffer(O) is false, throw a TypeError exception.
if (!IsSharedArrayBuffer(o)) { if (!IsSharedArrayBuffer(o)) {
ThrowTypeError( ThrowTypeError(
MessageTemplate::kIncompatibleMethodReceiver, functionName, receiver); MessageTemplate::kIncompatibleMethodReceiver, functionName, receiver);
} }
// 4. Return IsResizableArrayBuffer(O). // 4. Let length be O.[[ArrayBufferMaxByteLength]].
if (IsResizableArrayBuffer(o)) { const length = o.max_byte_length;
return True; // 5. Return length.
} return Convert<Number>(length);
return False;
} }
// #sec-arraybuffer.isview // #sec-arraybuffer.isview
......
...@@ -50,11 +50,16 @@ bool RoundUpToPageSize(size_t byte_length, size_t page_size, ...@@ -50,11 +50,16 @@ bool RoundUpToPageSize(size_t byte_length, size_t page_size,
Object ConstructBuffer(Isolate* isolate, Handle<JSFunction> target, Object ConstructBuffer(Isolate* isolate, Handle<JSFunction> target,
Handle<JSReceiver> new_target, Handle<Object> length, Handle<JSReceiver> new_target, Handle<Object> length,
Handle<Object> max_length, InitializedFlag initialized) { Handle<Object> max_length, InitializedFlag initialized) {
SharedFlag shared = *target != target->native_context().array_buffer_fun() SharedFlag shared =
? SharedFlag::kShared (*target != target->native_context().array_buffer_fun() &&
: SharedFlag::kNotShared; *target != target->native_context().resizable_array_buffer_fun())
ResizableFlag resizable = max_length.is_null() ? ResizableFlag::kNotResizable ? SharedFlag::kShared
: ResizableFlag::kResizable; : SharedFlag::kNotShared;
ResizableFlag resizable =
(*target == target->native_context().resizable_array_buffer_fun() ||
*target == target->native_context().growable_shared_array_buffer_fun())
? ResizableFlag::kResizable
: ResizableFlag::kNotResizable;
Handle<JSObject> result; Handle<JSObject> result;
ASSIGN_RETURN_FAILURE_ON_EXCEPTION( ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
isolate, result, isolate, result,
...@@ -78,9 +83,12 @@ Object ConstructBuffer(Isolate* isolate, Handle<JSFunction> target, ...@@ -78,9 +83,12 @@ Object ConstructBuffer(Isolate* isolate, Handle<JSFunction> target,
if (resizable == ResizableFlag::kNotResizable) { if (resizable == ResizableFlag::kNotResizable) {
backing_store = backing_store =
BackingStore::Allocate(isolate, byte_length, shared, initialized); BackingStore::Allocate(isolate, byte_length, shared, initialized);
max_byte_length = byte_length;
} else { } else {
if (!TryNumberToSize(*max_length, &max_byte_length)) { Handle<Object> number_max_length;
ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, number_max_length,
Object::ToInteger(isolate, max_length));
if (!TryNumberToSize(*number_max_length, &max_byte_length)) {
THROW_NEW_ERROR_RETURN_FAILURE( THROW_NEW_ERROR_RETURN_FAILURE(
isolate, isolate,
NewRangeError(MessageTemplate::kInvalidArrayBufferMaxLength)); NewRangeError(MessageTemplate::kInvalidArrayBufferMaxLength));
...@@ -129,7 +137,10 @@ BUILTIN(ArrayBufferConstructor) { ...@@ -129,7 +137,10 @@ BUILTIN(ArrayBufferConstructor) {
HandleScope scope(isolate); HandleScope scope(isolate);
Handle<JSFunction> target = args.target(); Handle<JSFunction> target = args.target();
DCHECK(*target == target->native_context().array_buffer_fun() || DCHECK(*target == target->native_context().array_buffer_fun() ||
*target == target->native_context().shared_array_buffer_fun()); *target == target->native_context().shared_array_buffer_fun() ||
*target == target->native_context().resizable_array_buffer_fun() ||
*target ==
target->native_context().growable_shared_array_buffer_fun());
if (args.new_target()->IsUndefined(isolate)) { // [[Call]] if (args.new_target()->IsUndefined(isolate)) { // [[Call]]
THROW_NEW_ERROR_RETURN_FAILURE( THROW_NEW_ERROR_RETURN_FAILURE(
isolate, NewTypeError(MessageTemplate::kConstructorNotFunction, isolate, NewTypeError(MessageTemplate::kConstructorNotFunction,
...@@ -147,19 +158,9 @@ BUILTIN(ArrayBufferConstructor) { ...@@ -147,19 +158,9 @@ BUILTIN(ArrayBufferConstructor) {
isolate, NewRangeError(MessageTemplate::kInvalidArrayBufferLength)); isolate, NewRangeError(MessageTemplate::kInvalidArrayBufferLength));
} }
Handle<Object> options = args.atOrUndefined(isolate, 2); Handle<Object> max_length = args.atOrUndefined(isolate, 2);
Handle<Object> max_length; return ConstructBuffer(isolate, target, new_target, number_length, max_length,
ASSIGN_RETURN_FAILURE_ON_EXCEPTION( InitializedFlag::kZeroInitialized);
isolate, max_length,
JSObject::ReadFromOptionsBag(
options, isolate->factory()->max_byte_length_string(), isolate));
Handle<Object> number_max_length;
if (!max_length->IsUndefined(isolate)) {
ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, number_max_length,
Object::ToInteger(isolate, max_length));
}
return ConstructBuffer(isolate, target, new_target, number_length,
number_max_length, InitializedFlag::kZeroInitialized);
} }
// This is a helper to construct an ArrayBuffer with uinitialized memory. // This is a helper to construct an ArrayBuffer with uinitialized memory.
...@@ -461,45 +462,45 @@ static Object ResizeHelper(BuiltinArguments args, Isolate* isolate, ...@@ -461,45 +462,45 @@ static Object ResizeHelper(BuiltinArguments args, Isolate* isolate,
return ReadOnlyRoots(isolate).undefined_value(); return ReadOnlyRoots(isolate).undefined_value();
} }
// ES #sec-get-sharedarraybuffer.prototype.bytelength // ES #sec-get-growablesharedarraybuffer.prototype.bytelength
// get SharedArrayBuffer.prototype.byteLength // get GrowableSharedArrayBuffer.prototype.byteLength
BUILTIN(SharedArrayBufferPrototypeGetByteLength) { BUILTIN(GrowableSharedArrayBufferPrototypeGetByteLength) {
const char* const kMethodName = "get SharedArrayBuffer.prototype.byteLength"; const char* const kMethodName =
"get GrowableSharedArrayBuffer.prototype.byteLength";
HandleScope scope(isolate); HandleScope scope(isolate);
// 1. Let O be the this value. // 1. Let O be the this value.
// 2. Perform ? RequireInternalSlot(O, [[ArrayBufferData]]). // 2. Perform ? RequireInternalSlot(O, [[ArrayBufferMaxLength]]).
CHECK_RECEIVER(JSArrayBuffer, array_buffer, kMethodName); CHECK_RECEIVER(JSArrayBuffer, array_buffer, kMethodName);
CHECK_RESIZABLE(true, array_buffer, kMethodName);
// 3. If IsSharedArrayBuffer(O) is false, throw a TypeError exception. // 3. If IsSharedArrayBuffer(O) is false, throw a TypeError exception.
CHECK_SHARED(true, array_buffer, kMethodName); CHECK_SHARED(true, array_buffer, kMethodName);
// 4. Let length be ArrayBufferByteLength(O, SeqCst). // 4. Let length be ArrayBufferByteLength(O, SeqCst).
size_t byte_length;
if (array_buffer->is_resizable()) {
// Invariant: byte_length for GSAB is 0 (it needs to be read from the
// BackingStore).
DCHECK_EQ(0, array_buffer->byte_length());
byte_length = // Invariant: byte_length for GSAB is 0 (it needs to be read from the
array_buffer->GetBackingStore()->byte_length(std::memory_order_seq_cst); // BackingStore).
} else { DCHECK_EQ(0, array_buffer->byte_length());
byte_length = array_buffer->byte_length();
} size_t byte_length =
// 5. Return F(length). array_buffer->GetBackingStore()->byte_length(std::memory_order_seq_cst);
// 5. Return length.
return *isolate->factory()->NewNumberFromSize(byte_length); return *isolate->factory()->NewNumberFromSize(byte_length);
} }
// ES #sec-arraybuffer.prototype.resize // ES #sec-resizablearraybuffer.prototype.resize
// ArrayBuffer.prototype.resize(new_size)) // ResizableArrayBuffer.prototype.resize(new_size))
BUILTIN(ArrayBufferPrototypeResize) { BUILTIN(ResizableArrayBufferPrototypeResize) {
const char* const kMethodName = "ArrayBuffer.prototype.resize"; const char* const kMethodName = "ResizableArrayBuffer.prototype.resize";
constexpr bool kIsShared = false; constexpr bool kIsShared = false;
return ResizeHelper(args, isolate, kMethodName, kIsShared); return ResizeHelper(args, isolate, kMethodName, kIsShared);
} }
// ES #sec-sharedarraybuffer.prototype.grow // ES #sec-growablesharedarraybuffer.prototype.grow
// SharedArrayBuffer.prototype.grow(new_size)) // GrowableSharedArrayBuffer.prototype.grow(new_size))
BUILTIN(SharedArrayBufferPrototypeGrow) { BUILTIN(GrowableSharedArrayBufferPrototypeGrow) {
const char* const kMethodName = "SharedArrayBuffer.prototype.grow"; const char* const kMethodName = "GrowableSharedArrayBuffer.prototype.grow";
constexpr bool kIsShared = true; constexpr bool kIsShared = true;
return ResizeHelper(args, isolate, kMethodName, kIsShared); return ResizeHelper(args, isolate, kMethodName, kIsShared);
} }
......
...@@ -394,8 +394,6 @@ namespace internal { ...@@ -394,8 +394,6 @@ namespace internal {
CPP(ArrayBufferConstructor) \ CPP(ArrayBufferConstructor) \
CPP(ArrayBufferConstructor_DoNotInitialize) \ CPP(ArrayBufferConstructor_DoNotInitialize) \
CPP(ArrayBufferPrototypeSlice) \ CPP(ArrayBufferPrototypeSlice) \
/* https://tc39.es/proposal-resizablearraybuffer/ */ \
CPP(ArrayBufferPrototypeResize) \
\ \
/* AsyncFunction */ \ /* AsyncFunction */ \
TFS(AsyncFunctionEnter, kClosure, kReceiver) \ TFS(AsyncFunctionEnter, kClosure, kReceiver) \
...@@ -801,6 +799,11 @@ namespace internal { ...@@ -801,6 +799,11 @@ namespace internal {
ASM(RegExpInterpreterTrampoline, CCall) \ ASM(RegExpInterpreterTrampoline, CCall) \
ASM(RegExpExperimentalTrampoline, CCall) \ ASM(RegExpExperimentalTrampoline, CCall) \
\ \
/* ResizableArrayBuffer & GrowableSharedArrayBuffer */ \
CPP(ResizableArrayBufferPrototypeResize) \
CPP(GrowableSharedArrayBufferPrototypeGrow) \
CPP(GrowableSharedArrayBufferPrototypeGetByteLength) \
\
/* Set */ \ /* Set */ \
TFJ(SetConstructor, kDontAdaptArgumentsSentinel) \ TFJ(SetConstructor, kDontAdaptArgumentsSentinel) \
TFJ(SetPrototypeHas, 1, kReceiver, kKey) \ TFJ(SetPrototypeHas, 1, kReceiver, kKey) \
...@@ -820,11 +823,7 @@ namespace internal { ...@@ -820,11 +823,7 @@ namespace internal {
TFS(SetOrSetIteratorToList, kSource) \ TFS(SetOrSetIteratorToList, kSource) \
\ \
/* SharedArrayBuffer */ \ /* SharedArrayBuffer */ \
CPP(SharedArrayBufferPrototypeGetByteLength) \
CPP(SharedArrayBufferPrototypeSlice) \ CPP(SharedArrayBufferPrototypeSlice) \
/* https://tc39.es/proposal-resizablearraybuffer/ */ \
CPP(SharedArrayBufferPrototypeGrow) \
\
TFJ(AtomicsLoad, 2, kReceiver, kArray, kIndex) \ TFJ(AtomicsLoad, 2, kReceiver, kArray, kIndex) \
TFJ(AtomicsStore, 3, kReceiver, kArray, kIndex, kValue) \ TFJ(AtomicsStore, 3, kReceiver, kArray, kIndex, kValue) \
TFJ(AtomicsExchange, 3, kReceiver, kArray, kIndex, kValue) \ TFJ(AtomicsExchange, 3, kReceiver, kArray, kIndex, kValue) \
......
...@@ -1423,7 +1423,6 @@ void JSArrayBuffer::JSArrayBufferPrint(std::ostream& os) { ...@@ -1423,7 +1423,6 @@ void JSArrayBuffer::JSArrayBufferPrint(std::ostream& os) {
JSObjectPrintHeader(os, *this, "JSArrayBuffer"); JSObjectPrintHeader(os, *this, "JSArrayBuffer");
os << "\n - backing_store: " << backing_store(); os << "\n - backing_store: " << backing_store();
os << "\n - byte_length: " << byte_length(); os << "\n - byte_length: " << byte_length();
os << "\n - max_byte_length: " << max_byte_length();
if (is_external()) os << "\n - external"; if (is_external()) os << "\n - external";
if (is_detachable()) os << "\n - detachable"; if (is_detachable()) os << "\n - detachable";
if (was_detached()) os << "\n - detached"; if (was_detached()) os << "\n - detached";
......
...@@ -2720,10 +2720,19 @@ MaybeHandle<JSArrayBuffer> Factory::NewJSArrayBufferAndBackingStore( ...@@ -2720,10 +2720,19 @@ MaybeHandle<JSArrayBuffer> Factory::NewJSArrayBufferAndBackingStore(
Handle<JSArrayBuffer> Factory::NewJSSharedArrayBuffer( Handle<JSArrayBuffer> Factory::NewJSSharedArrayBuffer(
std::shared_ptr<BackingStore> backing_store) { std::shared_ptr<BackingStore> backing_store) {
DCHECK_IMPLIES(backing_store->is_resizable(), FLAG_harmony_rab_gsab); Handle<Map> map;
Handle<Map> map( if (backing_store->is_resizable()) {
isolate()->native_context()->shared_array_buffer_fun().initial_map(), DCHECK(FLAG_harmony_rab_gsab);
isolate()); map = Handle<Map>(isolate()
->native_context()
->growable_shared_array_buffer_fun()
.initial_map(),
isolate());
} else {
map = Handle<Map>(
isolate()->native_context()->shared_array_buffer_fun().initial_map(),
isolate());
}
auto result = Handle<JSArrayBuffer>::cast( auto result = Handle<JSArrayBuffer>::cast(
NewJSObjectFromMap(map, AllocationType::kYoung)); NewJSObjectFromMap(map, AllocationType::kYoung));
ResizableFlag resizable = backing_store->is_resizable() ResizableFlag resizable = backing_store->is_resizable()
......
...@@ -233,7 +233,12 @@ class Genesis { ...@@ -233,7 +233,12 @@ class Genesis {
#undef DECLARE_FEATURE_INITIALIZATION #undef DECLARE_FEATURE_INITIALIZATION
void InitializeGlobal_regexp_linear_flag(); void InitializeGlobal_regexp_linear_flag();
enum ArrayBufferKind { ARRAY_BUFFER, SHARED_ARRAY_BUFFER }; enum ArrayBufferKind {
ARRAY_BUFFER,
SHARED_ARRAY_BUFFER,
RESIZABLE_ARRAY_BUFFER,
GROWABLE_SHARED_ARRAY_BUFFER
};
Handle<JSFunction> CreateArrayBuffer(Handle<String> name, Handle<JSFunction> CreateArrayBuffer(Handle<String> name,
ArrayBufferKind array_buffer_kind); ArrayBufferKind array_buffer_kind);
...@@ -3278,6 +3283,25 @@ void Genesis::InitializeGlobal(Handle<JSGlobalObject> global_object, ...@@ -3278,6 +3283,25 @@ void Genesis::InitializeGlobal(Handle<JSGlobalObject> global_object,
InstallSpeciesGetter(isolate_, shared_array_buffer_fun); InstallSpeciesGetter(isolate_, shared_array_buffer_fun);
} }
{ // R e s i z a b l e A r r a y B u f f e r
Handle<String> name = factory->ResizableArrayBuffer_string();
Handle<JSFunction> resizable_array_buffer_fun =
CreateArrayBuffer(name, RESIZABLE_ARRAY_BUFFER);
InstallWithIntrinsicDefaultProto(isolate_, resizable_array_buffer_fun,
Context::RESIZABLE_ARRAY_BUFFER_FUN_INDEX);
InstallSpeciesGetter(isolate_, resizable_array_buffer_fun);
}
{ // G r o w a b l e S h a r e d A r r a y B u f f e r
Handle<String> name = factory->GrowableSharedArrayBuffer_string();
Handle<JSFunction> growable_shared_array_buffer_fun =
CreateArrayBuffer(name, GROWABLE_SHARED_ARRAY_BUFFER);
InstallWithIntrinsicDefaultProto(
isolate_, growable_shared_array_buffer_fun,
Context::GROWABLE_SHARED_ARRAY_BUFFER_FUN_INDEX);
InstallSpeciesGetter(isolate_, growable_shared_array_buffer_fun);
}
{ // -- A t o m i c s { // -- A t o m i c s
Handle<JSObject> atomics_object = Handle<JSObject> atomics_object =
factory->NewJSObject(isolate_->object_function(), AllocationType::kOld); factory->NewJSObject(isolate_->object_function(), AllocationType::kOld);
...@@ -4394,7 +4418,6 @@ EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_import_assertions) ...@@ -4394,7 +4418,6 @@ EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_import_assertions)
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_private_brand_checks) EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_private_brand_checks)
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_class_static_blocks) EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_class_static_blocks)
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_error_cause) EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_error_cause)
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_rab_gsab)
#ifdef V8_INTL_SUPPORT #ifdef V8_INTL_SUPPORT
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_intl_best_fit_matcher) EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_intl_best_fit_matcher)
...@@ -4560,6 +4583,19 @@ void Genesis::InitializeGlobal_harmony_intl_locale_info() { ...@@ -4560,6 +4583,19 @@ void Genesis::InitializeGlobal_harmony_intl_locale_info() {
#endif // V8_INTL_SUPPORT #endif // V8_INTL_SUPPORT
void Genesis::InitializeGlobal_harmony_rab_gsab() {
if (!FLAG_harmony_rab_gsab) return;
Handle<JSGlobalObject> global(native_context()->global_object(), isolate());
JSObject::AddProperty(isolate_, global, "ResizableArrayBuffer",
isolate()->resizable_array_buffer_fun(), DONT_ENUM);
JSObject::AddProperty(isolate_, global, "GrowableSharedArrayBuffer",
isolate()->growable_shared_array_buffer_fun(),
DONT_ENUM);
}
Handle<JSFunction> Genesis::CreateArrayBuffer( Handle<JSFunction> Genesis::CreateArrayBuffer(
Handle<String> name, ArrayBufferKind array_buffer_kind) { Handle<String> name, ArrayBufferKind array_buffer_kind) {
// Create the %ArrayBufferPrototype% // Create the %ArrayBufferPrototype%
...@@ -4585,38 +4621,44 @@ Handle<JSFunction> Genesis::CreateArrayBuffer( ...@@ -4585,38 +4621,44 @@ Handle<JSFunction> Genesis::CreateArrayBuffer(
InstallFunctionWithBuiltinId(isolate(), array_buffer_fun, "isView", InstallFunctionWithBuiltinId(isolate(), array_buffer_fun, "isView",
Builtin::kArrayBufferIsView, 1, true); Builtin::kArrayBufferIsView, 1, true);
// Install the "byteLength" and "maxByteLength" getters on the // Install the "byteLength" getter on the {prototype}.
// {prototype}.
SimpleInstallGetter(isolate(), prototype, factory()->byte_length_string(), SimpleInstallGetter(isolate(), prototype, factory()->byte_length_string(),
Builtin::kArrayBufferPrototypeGetByteLength, false); Builtin::kArrayBufferPrototypeGetByteLength, false);
SimpleInstallGetter(
isolate(), prototype, factory()->max_byte_length_string(),
Builtin::kArrayBufferPrototypeGetMaxByteLength, false);
SimpleInstallGetter(isolate(), prototype, factory()->resizable_string(),
Builtin::kArrayBufferPrototypeGetResizable, false);
SimpleInstallFunction(isolate(), prototype, "slice", SimpleInstallFunction(isolate(), prototype, "slice",
Builtin::kArrayBufferPrototypeSlice, 2, true); Builtin::kArrayBufferPrototypeSlice, 2, true);
SimpleInstallFunction(isolate(), prototype, "resize",
Builtin::kArrayBufferPrototypeResize, 1, true);
break; break;
case SHARED_ARRAY_BUFFER: case SHARED_ARRAY_BUFFER:
// Install the "byteLength" and "maxByteLength" getters on the // Install the "byteLength" getter on the {prototype}.
// {prototype}.
SimpleInstallGetter(isolate(), prototype, factory()->byte_length_string(), SimpleInstallGetter(isolate(), prototype, factory()->byte_length_string(),
Builtin::kSharedArrayBufferPrototypeGetByteLength, Builtin::kSharedArrayBufferPrototypeGetByteLength,
false); false);
SimpleInstallGetter(
isolate(), prototype, factory()->max_byte_length_string(),
Builtin::kSharedArrayBufferPrototypeGetMaxByteLength, false);
SimpleInstallGetter(isolate(), prototype, factory()->growable_string(),
Builtin::kSharedArrayBufferPrototypeGetGrowable,
false);
SimpleInstallFunction(isolate(), prototype, "slice", SimpleInstallFunction(isolate(), prototype, "slice",
Builtin::kSharedArrayBufferPrototypeSlice, 2, true); Builtin::kSharedArrayBufferPrototypeSlice, 2, true);
break;
case RESIZABLE_ARRAY_BUFFER:
SimpleInstallGetter(isolate(), prototype, factory()->byte_length_string(),
Builtin::kResizableArrayBufferPrototypeGetByteLength,
false);
SimpleInstallGetter(
isolate(), prototype, factory()->max_byte_length_string(),
Builtin::kResizableArrayBufferPrototypeGetMaxByteLength, false);
SimpleInstallFunction(isolate(), prototype, "resize",
Builtin::kResizableArrayBufferPrototypeResize, 1,
true);
break;
case GROWABLE_SHARED_ARRAY_BUFFER:
SimpleInstallGetter(
isolate(), prototype, factory()->byte_length_string(),
Builtin::kGrowableSharedArrayBufferPrototypeGetByteLength, true);
SimpleInstallGetter(
isolate(), prototype, factory()->max_byte_length_string(),
Builtin::kGrowableSharedArrayBufferPrototypeGetMaxByteLength, false);
SimpleInstallFunction(isolate(), prototype, "grow", SimpleInstallFunction(isolate(), prototype, "grow",
Builtin::kSharedArrayBufferPrototypeGrow, 1, true); Builtin::kGrowableSharedArrayBufferPrototypeGrow, 1,
true);
break; break;
} }
......
This diff is collapsed.
...@@ -132,6 +132,8 @@ enum ContextLookupFlags { ...@@ -132,6 +132,8 @@ enum ContextLookupFlags {
V(GENERATOR_OBJECT_PROTOTYPE_MAP_INDEX, Map, generator_object_prototype_map) \ V(GENERATOR_OBJECT_PROTOTYPE_MAP_INDEX, Map, generator_object_prototype_map) \
V(ASYNC_GENERATOR_OBJECT_PROTOTYPE_MAP_INDEX, Map, \ V(ASYNC_GENERATOR_OBJECT_PROTOTYPE_MAP_INDEX, Map, \
async_generator_object_prototype_map) \ async_generator_object_prototype_map) \
V(GROWABLE_SHARED_ARRAY_BUFFER_FUN_INDEX, JSFunction, \
growable_shared_array_buffer_fun) \
V(INITIAL_ARRAY_ITERATOR_MAP_INDEX, Map, initial_array_iterator_map) \ V(INITIAL_ARRAY_ITERATOR_MAP_INDEX, Map, initial_array_iterator_map) \
V(INITIAL_ARRAY_ITERATOR_PROTOTYPE_INDEX, JSObject, \ V(INITIAL_ARRAY_ITERATOR_PROTOTYPE_INDEX, JSObject, \
initial_array_iterator_prototype) \ initial_array_iterator_prototype) \
...@@ -243,6 +245,7 @@ enum ContextLookupFlags { ...@@ -243,6 +245,7 @@ enum ContextLookupFlags {
V(REGEXP_SPLIT_FUNCTION_INDEX, JSFunction, regexp_split_function) \ V(REGEXP_SPLIT_FUNCTION_INDEX, JSFunction, regexp_split_function) \
V(INITIAL_REGEXP_STRING_ITERATOR_PROTOTYPE_MAP_INDEX, Map, \ V(INITIAL_REGEXP_STRING_ITERATOR_PROTOTYPE_MAP_INDEX, Map, \
initial_regexp_string_iterator_prototype_map) \ initial_regexp_string_iterator_prototype_map) \
V(RESIZABLE_ARRAY_BUFFER_FUN_INDEX, JSFunction, resizable_array_buffer_fun) \
V(SCRIPT_CONTEXT_TABLE_INDEX, ScriptContextTable, script_context_table) \ V(SCRIPT_CONTEXT_TABLE_INDEX, ScriptContextTable, script_context_table) \
V(SCRIPT_EXECUTION_CALLBACK_INDEX, Object, script_execution_callback) \ V(SCRIPT_EXECUTION_CALLBACK_INDEX, Object, script_execution_callback) \
V(SECURITY_TOKEN_INDEX, Object, security_token) \ V(SECURITY_TOKEN_INDEX, Object, security_token) \
......
...@@ -3954,17 +3954,6 @@ bool JSObject::IsExtensible(Handle<JSObject> object) { ...@@ -3954,17 +3954,6 @@ bool JSObject::IsExtensible(Handle<JSObject> object) {
return object->map().is_extensible(); return object->map().is_extensible();
} }
// static
MaybeHandle<Object> JSObject::ReadFromOptionsBag(Handle<Object> options,
Handle<String> option_name,
Isolate* isolate) {
if (options->IsJSReceiver()) {
Handle<JSReceiver> js_options = Handle<JSReceiver>::cast(options);
return JSObject::GetProperty(isolate, js_options, option_name);
}
return MaybeHandle<Object>(isolate->factory()->undefined_value());
}
template <typename Dictionary> template <typename Dictionary>
void JSObject::ApplyAttributesToDictionary( void JSObject::ApplyAttributesToDictionary(
Isolate* isolate, ReadOnlyRoots roots, Handle<Dictionary> dictionary, Isolate* isolate, ReadOnlyRoots roots, Handle<Dictionary> dictionary,
......
...@@ -715,10 +715,6 @@ class JSObject : public TorqueGeneratedJSObject<JSObject, JSReceiver> { ...@@ -715,10 +715,6 @@ class JSObject : public TorqueGeneratedJSObject<JSObject, JSReceiver> {
static bool IsExtensible(Handle<JSObject> object); static bool IsExtensible(Handle<JSObject> object);
static MaybeHandle<Object> ReadFromOptionsBag(Handle<Object> options,
Handle<String> option_name,
Isolate* isolate);
// Dispatched behavior. // Dispatched behavior.
void JSObjectShortPrint(StringStream* accumulator); void JSObjectShortPrint(StringStream* accumulator);
DECL_PRINTER(JSObject) DECL_PRINTER(JSObject)
......
...@@ -83,9 +83,6 @@ Running test: testArrayBuffer ...@@ -83,9 +83,6 @@ Running test: testArrayBuffer
Symbol(Symbol.toStringTag) own string ArrayBuffer Symbol(Symbol.toStringTag) own string ArrayBuffer
byteLength own no value, getter byteLength own no value, getter
constructor own function undefined constructor own function undefined
maxByteLength own no value, getter
resizable own no value, getter
resize own function undefined
slice own function undefined slice own function undefined
Internal properties Internal properties
[[Prototype]] object undefined [[Prototype]] object undefined
...@@ -131,9 +128,6 @@ Running test: testArrayBufferFromWebAssemblyMemory ...@@ -131,9 +128,6 @@ Running test: testArrayBufferFromWebAssemblyMemory
Symbol(Symbol.toStringTag) own string ArrayBuffer Symbol(Symbol.toStringTag) own string ArrayBuffer
byteLength own no value, getter byteLength own no value, getter
constructor own function undefined constructor own function undefined
maxByteLength own no value, getter
resizable own no value, getter
resize own function undefined
slice own function undefined slice own function undefined
Internal properties Internal properties
[[Prototype]] object undefined [[Prototype]] object undefined
......
...@@ -22,12 +22,8 @@ const ctors = [ ...@@ -22,12 +22,8 @@ const ctors = [
MyUint8Array MyUint8Array
]; ];
function CreateGrowableSharedArrayBuffer(byteLength, maxByteLength) {
return new SharedArrayBuffer(byteLength, {maxByteLength: maxByteLength});
}
(function TypedArrayPrototype() { (function TypedArrayPrototype() {
const gsab = CreateGrowableSharedArrayBuffer(40, 80); const gsab = new GrowableSharedArrayBuffer(40, 80);
const sab = new SharedArrayBuffer(80); const sab = new SharedArrayBuffer(80);
for (let ctor of ctors) { for (let ctor of ctors) {
...@@ -38,7 +34,7 @@ function CreateGrowableSharedArrayBuffer(byteLength, maxByteLength) { ...@@ -38,7 +34,7 @@ function CreateGrowableSharedArrayBuffer(byteLength, maxByteLength) {
})(); })();
(function TypedArrayLengthAndByteLength() { (function TypedArrayLengthAndByteLength() {
const gsab = CreateGrowableSharedArrayBuffer(40, 80); const gsab = new GrowableSharedArrayBuffer(40, 80);
for (let ctor of ctors) { for (let ctor of ctors) {
const ta = new ctor(gsab, 0, 3); const ta = new ctor(gsab, 0, 3);
...@@ -81,7 +77,7 @@ function CreateGrowableSharedArrayBuffer(byteLength, maxByteLength) { ...@@ -81,7 +77,7 @@ function CreateGrowableSharedArrayBuffer(byteLength, maxByteLength) {
})(); })();
(function ConstructInvalid() { (function ConstructInvalid() {
const gsab = CreateGrowableSharedArrayBuffer(40, 80); const gsab = new GrowableSharedArrayBuffer(40, 80);
for (let ctor of ctors) { for (let ctor of ctors) {
// Length too big. // Length too big.
...@@ -111,7 +107,7 @@ function CreateGrowableSharedArrayBuffer(byteLength, maxByteLength) { ...@@ -111,7 +107,7 @@ function CreateGrowableSharedArrayBuffer(byteLength, maxByteLength) {
})(); })();
(function TypedArrayLengthWhenGrown1() { (function TypedArrayLengthWhenGrown1() {
const gsab = CreateGrowableSharedArrayBuffer(16, 40); const gsab = new GrowableSharedArrayBuffer(16, 40);
// Create TAs which cover the bytes 0-7. // Create TAs which cover the bytes 0-7.
let tas_and_lengths = []; let tas_and_lengths = [];
...@@ -142,7 +138,7 @@ function CreateGrowableSharedArrayBuffer(byteLength, maxByteLength) { ...@@ -142,7 +138,7 @@ function CreateGrowableSharedArrayBuffer(byteLength, maxByteLength) {
// The previous test with offsets. // The previous test with offsets.
(function TypedArrayLengthWhenGrown2() { (function TypedArrayLengthWhenGrown2() {
const gsab = CreateGrowableSharedArrayBuffer(20, 40); const gsab = new GrowableSharedArrayBuffer(20, 40);
// Create TAs which cover the bytes 8-15. // Create TAs which cover the bytes 8-15.
let tas_and_lengths = []; let tas_and_lengths = [];
...@@ -172,7 +168,7 @@ function CreateGrowableSharedArrayBuffer(byteLength, maxByteLength) { ...@@ -172,7 +168,7 @@ function CreateGrowableSharedArrayBuffer(byteLength, maxByteLength) {
})(); })();
(function LengthTracking1() { (function LengthTracking1() {
const gsab = CreateGrowableSharedArrayBuffer(16, 40); const gsab = new GrowableSharedArrayBuffer(16, 40);
let tas = []; let tas = [];
for (let ctor of ctors) { for (let ctor of ctors) {
...@@ -208,7 +204,7 @@ function CreateGrowableSharedArrayBuffer(byteLength, maxByteLength) { ...@@ -208,7 +204,7 @@ function CreateGrowableSharedArrayBuffer(byteLength, maxByteLength) {
// The previous test with offsets. // The previous test with offsets.
(function LengthTracking2() { (function LengthTracking2() {
const gsab = CreateGrowableSharedArrayBuffer(16, 40); const gsab = new GrowableSharedArrayBuffer(16, 40);
const offset = 8; const offset = 8;
let tas = []; let tas = [];
...@@ -249,7 +245,7 @@ function CreateGrowableSharedArrayBuffer(byteLength, maxByteLength) { ...@@ -249,7 +245,7 @@ function CreateGrowableSharedArrayBuffer(byteLength, maxByteLength) {
} }
%EnsureFeedbackVectorForFunction(ReadElement2); %EnsureFeedbackVectorForFunction(ReadElement2);
const gsab = CreateGrowableSharedArrayBuffer(16, 40); const gsab = new GrowableSharedArrayBuffer(16, 40);
const i8a = new Int8Array(gsab, 0, 4); const i8a = new Int8Array(gsab, 0, 4);
for (let i = 0; i < 3; ++i) { for (let i = 0; i < 3; ++i) {
...@@ -298,7 +294,7 @@ function CreateGrowableSharedArrayBuffer(byteLength, maxByteLength) { ...@@ -298,7 +294,7 @@ function CreateGrowableSharedArrayBuffer(byteLength, maxByteLength) {
%EnsureFeedbackVectorForFunction(HasElement); %EnsureFeedbackVectorForFunction(HasElement);
%EnsureFeedbackVectorForFunction(WriteElement); %EnsureFeedbackVectorForFunction(WriteElement);
const gsab = CreateGrowableSharedArrayBuffer(16, 40); const gsab = new GrowableSharedArrayBuffer(16, 40);
const i8a = new Int8Array(gsab); // length-tracking const i8a = new Int8Array(gsab); // length-tracking
assertEquals(16, i8a.length); assertEquals(16, i8a.length);
...@@ -346,7 +342,7 @@ function CreateGrowableSharedArrayBuffer(byteLength, maxByteLength) { ...@@ -346,7 +342,7 @@ function CreateGrowableSharedArrayBuffer(byteLength, maxByteLength) {
})(); })();
(function EnumerateElements() { (function EnumerateElements() {
let gsab = CreateGrowableSharedArrayBuffer(100, 200); let gsab = new GrowableSharedArrayBuffer(100, 200);
for (let ctor of ctors) { for (let ctor of ctors) {
const ta = new ctor(gsab, 0, 3); const ta = new ctor(gsab, 0, 3);
let keys = ''; let keys = '';
...@@ -378,7 +374,7 @@ function CreateGrowableSharedArrayBuffer(byteLength, maxByteLength) { ...@@ -378,7 +374,7 @@ function CreateGrowableSharedArrayBuffer(byteLength, maxByteLength) {
const buffer_byte_length = no_elements * ctor.BYTES_PER_ELEMENT; const buffer_byte_length = no_elements * ctor.BYTES_PER_ELEMENT;
// We can use the same GSAB for all the TAs below, since we won't modify it // We can use the same GSAB for all the TAs below, since we won't modify it
// after writing the initial values. // after writing the initial values.
const gsab = CreateGrowableSharedArrayBuffer(buffer_byte_length, const gsab = new GrowableSharedArrayBuffer(buffer_byte_length,
2 * buffer_byte_length); 2 * buffer_byte_length);
const byte_offset = offset * ctor.BYTES_PER_ELEMENT; const byte_offset = offset * ctor.BYTES_PER_ELEMENT;
...@@ -427,7 +423,7 @@ function CreateGrowableSharedArrayBuffer(byteLength, maxByteLength) { ...@@ -427,7 +423,7 @@ function CreateGrowableSharedArrayBuffer(byteLength, maxByteLength) {
// Helpers for iteration tests. // Helpers for iteration tests.
function CreateGsab(buffer_byte_length, ctor) { function CreateGsab(buffer_byte_length, ctor) {
const gsab = CreateGrowableSharedArrayBuffer(buffer_byte_length, const gsab = new GrowableSharedArrayBuffer(buffer_byte_length,
2 * buffer_byte_length); 2 * buffer_byte_length);
// Write some data into the array. // Write some data into the array.
let ta_write = new ctor(gsab); let ta_write = new ctor(gsab);
......
...@@ -22,12 +22,8 @@ const ctors = [ ...@@ -22,12 +22,8 @@ const ctors = [
MyUint8Array MyUint8Array
]; ];
function CreateResizableArrayBuffer(byteLength, maxByteLength) {
return new ArrayBuffer(byteLength, {maxByteLength: maxByteLength});
}
(function ConstructorThrowsIfBufferDetached() { (function ConstructorThrowsIfBufferDetached() {
const rab = CreateResizableArrayBuffer(40, 80); const rab = new ResizableArrayBuffer(40, 80);
%ArrayBufferDetach(rab); %ArrayBufferDetach(rab);
for (let ctor of ctors) { for (let ctor of ctors) {
...@@ -38,7 +34,7 @@ function CreateResizableArrayBuffer(byteLength, maxByteLength) { ...@@ -38,7 +34,7 @@ function CreateResizableArrayBuffer(byteLength, maxByteLength) {
})(); })();
(function TypedArrayLengthAndByteLength() { (function TypedArrayLengthAndByteLength() {
const rab = CreateResizableArrayBuffer(40, 80); const rab = new ResizableArrayBuffer(40, 80);
let tas = []; let tas = [];
for (let ctor of ctors) { for (let ctor of ctors) {
...@@ -57,7 +53,7 @@ function CreateResizableArrayBuffer(byteLength, maxByteLength) { ...@@ -57,7 +53,7 @@ function CreateResizableArrayBuffer(byteLength, maxByteLength) {
})(); })();
(function AccessDetachedTypedArray() { (function AccessDetachedTypedArray() {
const rab = CreateResizableArrayBuffer(16, 40); const rab = new ResizableArrayBuffer(16, 40);
const i8a = new Int8Array(rab, 0, 4); const i8a = new Int8Array(rab, 0, 4);
...@@ -94,7 +90,7 @@ function CreateResizableArrayBuffer(byteLength, maxByteLength) { ...@@ -94,7 +90,7 @@ function CreateResizableArrayBuffer(byteLength, maxByteLength) {
} }
%EnsureFeedbackVectorForFunction(ReadElement2); %EnsureFeedbackVectorForFunction(ReadElement2);
const rab = CreateResizableArrayBuffer(16, 40); const rab = new ResizableArrayBuffer(16, 40);
const i8a = new Int8Array(rab, 0, 4); const i8a = new Int8Array(rab, 0, 4);
assertEquals(0, ReadElement2(i8a)); assertEquals(0, ReadElement2(i8a));
...@@ -118,7 +114,7 @@ function CreateResizableArrayBuffer(byteLength, maxByteLength) { ...@@ -118,7 +114,7 @@ function CreateResizableArrayBuffer(byteLength, maxByteLength) {
} }
%EnsureFeedbackVectorForFunction(WriteElement2); %EnsureFeedbackVectorForFunction(WriteElement2);
const rab = CreateResizableArrayBuffer(16, 40); const rab = new ResizableArrayBuffer(16, 40);
const i8a = new Int8Array(rab, 0, 4); const i8a = new Int8Array(rab, 0, 4);
assertEquals(0, i8a[2]); assertEquals(0, i8a[2]);
......
...@@ -22,12 +22,8 @@ const ctors = [ ...@@ -22,12 +22,8 @@ const ctors = [
MyUint8Array MyUint8Array
]; ];
function CreateResizableArrayBuffer(byteLength, maxByteLength) {
return new ArrayBuffer(byteLength, {maxByteLength: maxByteLength});
}
(function TypedArrayPrototype() { (function TypedArrayPrototype() {
const rab = CreateResizableArrayBuffer(40, 80); const rab = new ResizableArrayBuffer(40, 80);
const ab = new ArrayBuffer(80); const ab = new ArrayBuffer(80);
for (let ctor of ctors) { for (let ctor of ctors) {
...@@ -38,7 +34,7 @@ function CreateResizableArrayBuffer(byteLength, maxByteLength) { ...@@ -38,7 +34,7 @@ function CreateResizableArrayBuffer(byteLength, maxByteLength) {
})(); })();
(function TypedArrayLengthAndByteLength() { (function TypedArrayLengthAndByteLength() {
const rab = CreateResizableArrayBuffer(40, 80); const rab = new ResizableArrayBuffer(40, 80);
for (let ctor of ctors) { for (let ctor of ctors) {
const ta = new ctor(rab, 0, 3); const ta = new ctor(rab, 0, 3);
...@@ -81,7 +77,7 @@ function CreateResizableArrayBuffer(byteLength, maxByteLength) { ...@@ -81,7 +77,7 @@ function CreateResizableArrayBuffer(byteLength, maxByteLength) {
})(); })();
(function ConstructInvalid() { (function ConstructInvalid() {
const rab = CreateResizableArrayBuffer(40, 80); const rab = new ResizableArrayBuffer(40, 80);
for (let ctor of ctors) { for (let ctor of ctors) {
// Length too big. // Length too big.
...@@ -111,7 +107,7 @@ function CreateResizableArrayBuffer(byteLength, maxByteLength) { ...@@ -111,7 +107,7 @@ function CreateResizableArrayBuffer(byteLength, maxByteLength) {
})(); })();
(function TypedArrayLengthWhenResizedOutOfBounds1() { (function TypedArrayLengthWhenResizedOutOfBounds1() {
const rab = CreateResizableArrayBuffer(16, 40); const rab = new ResizableArrayBuffer(16, 40);
// Create TAs which cover the bytes 0-7. // Create TAs which cover the bytes 0-7.
let tas_and_lengths = []; let tas_and_lengths = [];
...@@ -150,7 +146,7 @@ function CreateResizableArrayBuffer(byteLength, maxByteLength) { ...@@ -150,7 +146,7 @@ function CreateResizableArrayBuffer(byteLength, maxByteLength) {
// The previous test with offsets. // The previous test with offsets.
(function TypedArrayLengthWhenResizedOutOfBounds2() { (function TypedArrayLengthWhenResizedOutOfBounds2() {
const rab = CreateResizableArrayBuffer(20, 40); const rab = new ResizableArrayBuffer(20, 40);
// Create TAs which cover the bytes 8-15. // Create TAs which cover the bytes 8-15.
let tas_and_lengths = []; let tas_and_lengths = [];
...@@ -188,7 +184,7 @@ function CreateResizableArrayBuffer(byteLength, maxByteLength) { ...@@ -188,7 +184,7 @@ function CreateResizableArrayBuffer(byteLength, maxByteLength) {
})(); })();
(function LengthTracking1() { (function LengthTracking1() {
const rab = CreateResizableArrayBuffer(16, 40); const rab = new ResizableArrayBuffer(16, 40);
let tas = []; let tas = [];
for (let ctor of ctors) { for (let ctor of ctors) {
...@@ -250,7 +246,7 @@ function CreateResizableArrayBuffer(byteLength, maxByteLength) { ...@@ -250,7 +246,7 @@ function CreateResizableArrayBuffer(byteLength, maxByteLength) {
// The previous test with offsets. // The previous test with offsets.
(function LengthTracking2() { (function LengthTracking2() {
const rab = CreateResizableArrayBuffer(16, 40); const rab = new ResizableArrayBuffer(16, 40);
const offset = 8; const offset = 8;
let tas = []; let tas = [];
...@@ -326,7 +322,7 @@ function CreateResizableArrayBuffer(byteLength, maxByteLength) { ...@@ -326,7 +322,7 @@ function CreateResizableArrayBuffer(byteLength, maxByteLength) {
if (ctor.BYTES_PER_ELEMENT != 1) { if (ctor.BYTES_PER_ELEMENT != 1) {
continue; continue;
} }
const rab = CreateResizableArrayBuffer(16, 40); const rab = new ResizableArrayBuffer(16, 40);
const array = new ctor(rab, 0, 4); const array = new ctor(rab, 0, 4);
// Initial values // Initial values
...@@ -385,7 +381,7 @@ function CreateResizableArrayBuffer(byteLength, maxByteLength) { ...@@ -385,7 +381,7 @@ function CreateResizableArrayBuffer(byteLength, maxByteLength) {
if (ctor.BYTES_PER_ELEMENT != 1) { if (ctor.BYTES_PER_ELEMENT != 1) {
continue; continue;
} }
const rab = CreateResizableArrayBuffer(16, 40); const rab = new ResizableArrayBuffer(16, 40);
const array = new ctor(rab, 0, 4); const array = new ctor(rab, 0, 4);
// Within-bounds read // Within-bounds read
...@@ -423,7 +419,7 @@ function CreateResizableArrayBuffer(byteLength, maxByteLength) { ...@@ -423,7 +419,7 @@ function CreateResizableArrayBuffer(byteLength, maxByteLength) {
} }
%EnsureFeedbackVectorForFunction(ReadElement2); %EnsureFeedbackVectorForFunction(ReadElement2);
const rab = CreateResizableArrayBuffer(16, 40); const rab = new ResizableArrayBuffer(16, 40);
const i8a = new Int8Array(rab, 0, 4); const i8a = new Int8Array(rab, 0, 4);
for (let i = 0; i < 3; ++i) { for (let i = 0; i < 3; ++i) {
...@@ -473,7 +469,7 @@ function CreateResizableArrayBuffer(byteLength, maxByteLength) { ...@@ -473,7 +469,7 @@ function CreateResizableArrayBuffer(byteLength, maxByteLength) {
} }
%EnsureFeedbackVectorForFunction(HasElement2); %EnsureFeedbackVectorForFunction(HasElement2);
const rab = CreateResizableArrayBuffer(16, 40); const rab = new ResizableArrayBuffer(16, 40);
const i8a = new Int8Array(rab, 0, 4); const i8a = new Int8Array(rab, 0, 4);
...@@ -509,7 +505,7 @@ function CreateResizableArrayBuffer(byteLength, maxByteLength) { ...@@ -509,7 +505,7 @@ function CreateResizableArrayBuffer(byteLength, maxByteLength) {
} }
%EnsureFeedbackVectorForFunction(WriteElement2); %EnsureFeedbackVectorForFunction(WriteElement2);
const rab = CreateResizableArrayBuffer(16, 40); const rab = new ResizableArrayBuffer(16, 40);
const i8a = new Int8Array(rab, 0, 4); const i8a = new Int8Array(rab, 0, 4);
assertEquals(0, i8a[2]); assertEquals(0, i8a[2]);
...@@ -558,7 +554,7 @@ function CreateResizableArrayBuffer(byteLength, maxByteLength) { ...@@ -558,7 +554,7 @@ function CreateResizableArrayBuffer(byteLength, maxByteLength) {
return 2 in ta; return 2 in ta;
} }
const rab = CreateResizableArrayBuffer(16, 40); const rab = new ResizableArrayBuffer(16, 40);
const i8a = new Int8Array(rab, 0, 4); const i8a = new Int8Array(rab, 0, 4);
i8a.__proto__ = {2: 'wrong value'}; i8a.__proto__ = {2: 'wrong value'};
i8a[2] = 10; i8a[2] = 10;
...@@ -580,7 +576,7 @@ function CreateResizableArrayBuffer(byteLength, maxByteLength) { ...@@ -580,7 +576,7 @@ function CreateResizableArrayBuffer(byteLength, maxByteLength) {
%EnsureFeedbackVectorForFunction(ReadElement2); %EnsureFeedbackVectorForFunction(ReadElement2);
%EnsureFeedbackVectorForFunction(HasElement2); %EnsureFeedbackVectorForFunction(HasElement2);
const rab = CreateResizableArrayBuffer(16, 40); const rab = new ResizableArrayBuffer(16, 40);
const i8a = new Int8Array(rab, 0, 4); const i8a = new Int8Array(rab, 0, 4);
i8a.__proto__ = {2: 'wrong value'}; i8a.__proto__ = {2: 'wrong value'};
i8a[2] = 10; i8a[2] = 10;
...@@ -597,7 +593,7 @@ function CreateResizableArrayBuffer(byteLength, maxByteLength) { ...@@ -597,7 +593,7 @@ function CreateResizableArrayBuffer(byteLength, maxByteLength) {
})(); })();
(function EnumerateElements() { (function EnumerateElements() {
let rab = CreateResizableArrayBuffer(100, 200); let rab = new ResizableArrayBuffer(100, 200);
for (let ctor of ctors) { for (let ctor of ctors) {
const ta = new ctor(rab, 0, 3); const ta = new ctor(rab, 0, 3);
let keys = ''; let keys = '';
...@@ -629,7 +625,7 @@ function CreateResizableArrayBuffer(byteLength, maxByteLength) { ...@@ -629,7 +625,7 @@ function CreateResizableArrayBuffer(byteLength, maxByteLength) {
const buffer_byte_length = no_elements * ctor.BYTES_PER_ELEMENT; const buffer_byte_length = no_elements * ctor.BYTES_PER_ELEMENT;
// We can use the same RAB for all the TAs below, since we won't modify it // We can use the same RAB for all the TAs below, since we won't modify it
// after writing the initial values. // after writing the initial values.
const rab = CreateResizableArrayBuffer(buffer_byte_length, const rab = new ResizableArrayBuffer(buffer_byte_length,
2 * buffer_byte_length); 2 * buffer_byte_length);
const byte_offset = offset * ctor.BYTES_PER_ELEMENT; const byte_offset = offset * ctor.BYTES_PER_ELEMENT;
...@@ -678,7 +674,7 @@ function CreateResizableArrayBuffer(byteLength, maxByteLength) { ...@@ -678,7 +674,7 @@ function CreateResizableArrayBuffer(byteLength, maxByteLength) {
// Helpers for iteration tests. // Helpers for iteration tests.
function CreateRab(buffer_byte_length, ctor) { function CreateRab(buffer_byte_length, ctor) {
const rab = CreateResizableArrayBuffer(buffer_byte_length, const rab = new ResizableArrayBuffer(buffer_byte_length,
2 * buffer_byte_length); 2 * buffer_byte_length);
// Write some data into the array. // Write some data into the array.
let ta_write = new ctor(rab); let ta_write = new ctor(rab);
......
...@@ -583,13 +583,17 @@ ...@@ -583,13 +583,17 @@
'language/module-code/export-expname-binding-index': [FAIL], 'language/module-code/export-expname-binding-index': [FAIL],
# https://bugs.chromium.org/p/v8/issues/detail?id=11111 # https://bugs.chromium.org/p/v8/issues/detail?id=11111
'built-ins/ArrayBuffer/prototype/resize/resize-grow': [FAIL], 'built-ins/ArrayBuffer/options-maxbytelength-diminuitive': [FAIL],
'built-ins/ArrayBuffer/prototype/resize/resize-same-size': [FAIL], 'built-ins/ArrayBuffer/options-maxbytelength-excessive': [FAIL],
'built-ins/ArrayBuffer/prototype/resize/resize-same-size-zero-explicit': [FAIL], 'built-ins/ArrayBuffer/options-maxbytelength-negative': [FAIL],
'built-ins/ArrayBuffer/prototype/resize/resize-same-size-zero-implicit': [FAIL], 'built-ins/ArrayBuffer/options-maxbytelength-object': [FAIL],
'built-ins/ArrayBuffer/prototype/resize/resize-shrink': [FAIL], 'built-ins/ArrayBuffer/options-maxbytelength-poisoned': [FAIL],
'built-ins/ArrayBuffer/prototype/resize/resize-shrink-zero-explicit': [FAIL], 'built-ins/ArrayBuffer/options-maxbytelength-undefined': [FAIL],
'built-ins/ArrayBuffer/prototype/resize/resize-shrink-zero-implicit': [FAIL], 'built-ins/ArrayBuffer/options-non-object': [FAIL],
'built-ins/ArrayBuffer/prototype/maxByteLength/*': [FAIL],
'built-ins/ArrayBuffer/prototype/resizable/*': [FAIL],
'built-ins/ArrayBuffer/prototype/resize/*': [FAIL],
'built-ins/ArrayBuffer/prototype/resize/this-is-sharedarraybuffer': [PASS],
'built-ins/ArrayBuffer/prototype/transfer/*': [FAIL], 'built-ins/ArrayBuffer/prototype/transfer/*': [FAIL],
'built-ins/ArrayBuffer/prototype/transfer/this-is-sharedarraybuffer': [PASS], 'built-ins/ArrayBuffer/prototype/transfer/this-is-sharedarraybuffer': [PASS],
'built-ins/DataView/prototype/byteLength/resizable-array-buffer-auto': [FAIL], 'built-ins/DataView/prototype/byteLength/resizable-array-buffer-auto': [FAIL],
...@@ -616,36 +620,53 @@ ...@@ -616,36 +620,53 @@
'built-ins/DataView/prototype/setUint16/resizable-buffer': [FAIL], 'built-ins/DataView/prototype/setUint16/resizable-buffer': [FAIL],
'built-ins/DataView/prototype/setUint32/resizable-buffer': [FAIL], 'built-ins/DataView/prototype/setUint32/resizable-buffer': [FAIL],
'built-ins/DataView/prototype/setUint8/resizable-buffer': [FAIL], 'built-ins/DataView/prototype/setUint8/resizable-buffer': [FAIL],
'built-ins/SharedArrayBuffer/options-maxbytelength-diminuitive': [FAIL],
'built-ins/SharedArrayBuffer/options-maxbytelength-excessive': [FAIL],
'built-ins/SharedArrayBuffer/options-maxbytelength-negative': [FAIL],
'built-ins/SharedArrayBuffer/options-maxbytelength-object': [FAIL],
'built-ins/SharedArrayBuffer/options-maxbytelength-poisoned': [FAIL],
'built-ins/SharedArrayBuffer/options-maxbytelength-undefined': [FAIL],
'built-ins/SharedArrayBuffer/options-non-object': [FAIL],
'built-ins/SharedArrayBuffer/prototype/growable/*': [FAIL],
'built-ins/SharedArrayBuffer/prototype/grow/*': [FAIL],
'built-ins/SharedArrayBuffer/prototype/grow/this-is-sharedarraybuffer': [PASS],
'built-ins/SharedArrayBuffer/prototype/maxByteLength/*': [FAIL],
'built-ins/TypedArrayConstructors/ctors/typedarray-arg/out-of-bounds-when-species-retrieved-different-type': [FAIL], 'built-ins/TypedArrayConstructors/ctors/typedarray-arg/out-of-bounds-when-species-retrieved-different-type': [FAIL],
'built-ins/TypedArrayConstructors/ctors/typedarray-arg/out-of-bounds-when-species-retrieved-same-type': [FAIL], 'built-ins/TypedArrayConstructors/ctors/typedarray-arg/out-of-bounds-when-species-retrieved-same-type': [FAIL],
'built-ins/TypedArrayConstructors/internals/HasProperty/resizable-array-buffer-auto': [FAIL], 'built-ins/TypedArrayConstructors/internals/HasProperty/resizable-array-buffer-auto': [FAIL],
'built-ins/TypedArrayConstructors/internals/HasProperty/resizable-array-buffer-fixed': [FAIL], 'built-ins/TypedArrayConstructors/internals/HasProperty/resizable-array-buffer-fixed': [FAIL],
'built-ins/TypedArrayConstructors/internals/OwnPropertyKeys/integer-indexes-resizable-array-buffer-auto': [FAIL], 'built-ins/TypedArrayConstructors/internals/OwnPropertyKeys/integer-indexes-resizable-array-buffer-auto': [FAIL],
'built-ins/TypedArrayConstructors/internals/OwnPropertyKeys/integer-indexes-resizable-array-buffer-fixed': [FAIL],
'built-ins/TypedArray/prototype/at/return-abrupt-from-this-out-of-bounds': [FAIL], 'built-ins/TypedArray/prototype/at/return-abrupt-from-this-out-of-bounds': [FAIL],
'built-ins/TypedArray/prototype/byteLength/resizable-array-buffer-auto': [FAIL],
'built-ins/TypedArray/prototype/byteLength/resizable-array-buffer-fixed': [FAIL],
'built-ins/TypedArray/prototype/byteOffset/resizable-array-buffer-auto': [FAIL], 'built-ins/TypedArray/prototype/byteOffset/resizable-array-buffer-auto': [FAIL],
'built-ins/TypedArray/prototype/byteOffset/resizable-array-buffer-fixed': [FAIL], 'built-ins/TypedArray/prototype/byteOffset/resizable-array-buffer-fixed': [FAIL],
'built-ins/TypedArray/prototype/copyWithin/return-abrupt-from-this-out-of-bounds': [FAIL], 'built-ins/TypedArray/prototype/copyWithin/return-abrupt-from-this-out-of-bounds': [FAIL],
'built-ins/TypedArray/prototype/entries/return-abrupt-from-this-out-of-bounds': [FAIL], 'built-ins/TypedArray/prototype/entries/return-abrupt-from-this-out-of-bounds': [FAIL],
'built-ins/TypedArray/prototype/every/return-abrupt-from-this-out-of-bounds': [SKIP], 'built-ins/TypedArray/prototype/every/return-abrupt-from-this-out-of-bounds': [FAIL],
'built-ins/TypedArray/prototype/fill/return-abrupt-from-this-out-of-bounds': [SKIP], 'built-ins/TypedArray/prototype/fill/return-abrupt-from-this-out-of-bounds': [FAIL],
'built-ins/TypedArray/prototype/filter/return-abrupt-from-this-out-of-bounds': [SKIP], 'built-ins/TypedArray/prototype/filter/return-abrupt-from-this-out-of-bounds': [FAIL],
'built-ins/TypedArray/prototype/findIndex/return-abrupt-from-this-out-of-bounds': [SKIP], 'built-ins/TypedArray/prototype/findIndex/return-abrupt-from-this-out-of-bounds': [FAIL],
'built-ins/TypedArray/prototype/find/return-abrupt-from-this-out-of-bounds': [SKIP], 'built-ins/TypedArray/prototype/find/return-abrupt-from-this-out-of-bounds': [FAIL],
'built-ins/TypedArray/prototype/forEach/return-abrupt-from-this-out-of-bounds': [SKIP], 'built-ins/TypedArray/prototype/forEach/return-abrupt-from-this-out-of-bounds': [FAIL],
'built-ins/TypedArray/prototype/includes/return-abrupt-from-this-out-of-bounds': [FAIL], 'built-ins/TypedArray/prototype/includes/return-abrupt-from-this-out-of-bounds': [FAIL],
'built-ins/TypedArray/prototype/indexOf/return-abrupt-from-this-out-of-bounds': [FAIL], 'built-ins/TypedArray/prototype/indexOf/return-abrupt-from-this-out-of-bounds': [FAIL],
'built-ins/TypedArray/prototype/join/return-abrupt-from-this-out-of-bounds': [SKIP], 'built-ins/TypedArray/prototype/join/return-abrupt-from-this-out-of-bounds': [FAIL],
'built-ins/TypedArray/prototype/keys/return-abrupt-from-this-out-of-bounds': [FAIL], 'built-ins/TypedArray/prototype/keys/return-abrupt-from-this-out-of-bounds': [FAIL],
'built-ins/TypedArray/prototype/lastIndexOf/return-abrupt-from-this-out-of-bounds': [FAIL], 'built-ins/TypedArray/prototype/lastIndexOf/return-abrupt-from-this-out-of-bounds': [FAIL],
'built-ins/TypedArray/prototype/length/resizable-array-buffer-auto': [FAIL],
'built-ins/TypedArray/prototype/length/resizable-array-buffer-fixed': [FAIL],
'built-ins/TypedArray/prototype/map/return-abrupt-from-this-out-of-bounds': [FAIL], 'built-ins/TypedArray/prototype/map/return-abrupt-from-this-out-of-bounds': [FAIL],
'built-ins/TypedArray/prototype/reduce/return-abrupt-from-this-out-of-bounds': [SKIP], 'built-ins/TypedArray/prototype/reduce/return-abrupt-from-this-out-of-bounds': [FAIL],
'built-ins/TypedArray/prototype/reduceRight/return-abrupt-from-this-out-of-bounds': [SKIP], 'built-ins/TypedArray/prototype/reduceRight/return-abrupt-from-this-out-of-bounds': [FAIL],
'built-ins/TypedArray/prototype/reverse/return-abrupt-from-this-out-of-bounds': [FAIL], 'built-ins/TypedArray/prototype/reverse/return-abrupt-from-this-out-of-bounds': [FAIL],
'built-ins/TypedArray/prototype/set/typedarray-arg-set-values-same-buffer-same-type-resized': [FAIL],
'built-ins/TypedArray/prototype/set/typedarray-arg-target-out-of-bounds': [FAIL], 'built-ins/TypedArray/prototype/set/typedarray-arg-target-out-of-bounds': [FAIL],
'built-ins/TypedArray/prototype/slice/return-abrupt-from-this-out-of-bounds': [FAIL], 'built-ins/TypedArray/prototype/slice/return-abrupt-from-this-out-of-bounds': [FAIL],
'built-ins/TypedArray/prototype/some/return-abrupt-from-this-out-of-bounds': [SKIP], 'built-ins/TypedArray/prototype/some/return-abrupt-from-this-out-of-bounds': [FAIL],
'built-ins/TypedArray/prototype/sort/return-abrupt-from-this-out-of-bounds': [FAIL], 'built-ins/TypedArray/prototype/sort/return-abrupt-from-this-out-of-bounds': [FAIL],
'built-ins/TypedArray/prototype/toLocaleString/return-abrupt-from-this-out-of-bounds': [SKIP], 'built-ins/TypedArray/prototype/toLocaleString/return-abrupt-from-this-out-of-bounds': [FAIL],
'built-ins/TypedArray/prototype/values/return-abrupt-from-this-out-of-bounds': [FAIL], 'built-ins/TypedArray/prototype/values/return-abrupt-from-this-out-of-bounds': [FAIL],
# https://bugs.chromium.org/p/v8/issues/detail?id=11544 # https://bugs.chromium.org/p/v8/issues/detail?id=11544
...@@ -707,12 +728,6 @@ ...@@ -707,12 +728,6 @@
'harness/detachArrayBuffer': [SKIP], 'harness/detachArrayBuffer': [SKIP],
'harness/detachArrayBuffer-host-detachArrayBuffer': [SKIP], 'harness/detachArrayBuffer-host-detachArrayBuffer': [SKIP],
# https://github.com/tc39/test262/issues/3038
'built-ins/SharedArrayBuffer/options-maxbytelength-undefined': [FAIL],
'built-ins/SharedArrayBuffer/options-non-object': [FAIL],
'built-ins/SharedArrayBuffer/prototype/growable/this-is-arraybuffer': [FAIL],
'built-ins/SharedArrayBuffer/prototype/maxByteLength/this-is-arraybuffer': [FAIL],
############################ SKIPPED TESTS ############################# ############################ SKIPPED TESTS #############################
# These tests take a looong time to run. # These tests take a looong time to run.
......
...@@ -329,66 +329,66 @@ KNOWN_MAPS = { ...@@ -329,66 +329,66 @@ KNOWN_MAPS = {
("read_only_space", 0x03215): (67, "BasicBlockCountersMarkerMap"), ("read_only_space", 0x03215): (67, "BasicBlockCountersMarkerMap"),
("read_only_space", 0x03259): (91, "ArrayBoilerplateDescriptionMap"), ("read_only_space", 0x03259): (91, "ArrayBoilerplateDescriptionMap"),
("read_only_space", 0x03359): (104, "InterceptorInfoMap"), ("read_only_space", 0x03359): (104, "InterceptorInfoMap"),
("read_only_space", 0x05675): (76, "PromiseFulfillReactionJobTaskMap"), ("read_only_space", 0x05691): (76, "PromiseFulfillReactionJobTaskMap"),
("read_only_space", 0x0569d): (77, "PromiseRejectReactionJobTaskMap"), ("read_only_space", 0x056b9): (77, "PromiseRejectReactionJobTaskMap"),
("read_only_space", 0x056c5): (78, "CallableTaskMap"), ("read_only_space", 0x056e1): (78, "CallableTaskMap"),
("read_only_space", 0x056ed): (79, "CallbackTaskMap"), ("read_only_space", 0x05709): (79, "CallbackTaskMap"),
("read_only_space", 0x05715): (80, "PromiseResolveThenableJobTaskMap"), ("read_only_space", 0x05731): (80, "PromiseResolveThenableJobTaskMap"),
("read_only_space", 0x0573d): (83, "FunctionTemplateInfoMap"), ("read_only_space", 0x05759): (83, "FunctionTemplateInfoMap"),
("read_only_space", 0x05765): (84, "ObjectTemplateInfoMap"), ("read_only_space", 0x05781): (84, "ObjectTemplateInfoMap"),
("read_only_space", 0x0578d): (85, "AccessCheckInfoMap"), ("read_only_space", 0x057a9): (85, "AccessCheckInfoMap"),
("read_only_space", 0x057b5): (86, "AccessorInfoMap"), ("read_only_space", 0x057d1): (86, "AccessorInfoMap"),
("read_only_space", 0x057dd): (87, "AccessorPairMap"), ("read_only_space", 0x057f9): (87, "AccessorPairMap"),
("read_only_space", 0x05805): (88, "AliasedArgumentsEntryMap"), ("read_only_space", 0x05821): (88, "AliasedArgumentsEntryMap"),
("read_only_space", 0x0582d): (89, "AllocationMementoMap"), ("read_only_space", 0x05849): (89, "AllocationMementoMap"),
("read_only_space", 0x05855): (92, "AsmWasmDataMap"), ("read_only_space", 0x05871): (92, "AsmWasmDataMap"),
("read_only_space", 0x0587d): (93, "AsyncGeneratorRequestMap"), ("read_only_space", 0x05899): (93, "AsyncGeneratorRequestMap"),
("read_only_space", 0x058a5): (94, "BaselineDataMap"), ("read_only_space", 0x058c1): (94, "BaselineDataMap"),
("read_only_space", 0x058cd): (95, "BreakPointMap"), ("read_only_space", 0x058e9): (95, "BreakPointMap"),
("read_only_space", 0x058f5): (96, "BreakPointInfoMap"), ("read_only_space", 0x05911): (96, "BreakPointInfoMap"),
("read_only_space", 0x0591d): (97, "CachedTemplateObjectMap"), ("read_only_space", 0x05939): (97, "CachedTemplateObjectMap"),
("read_only_space", 0x05945): (99, "ClassPositionsMap"), ("read_only_space", 0x05961): (99, "ClassPositionsMap"),
("read_only_space", 0x0596d): (100, "DebugInfoMap"), ("read_only_space", 0x05989): (100, "DebugInfoMap"),
("read_only_space", 0x05995): (103, "FunctionTemplateRareDataMap"), ("read_only_space", 0x059b1): (103, "FunctionTemplateRareDataMap"),
("read_only_space", 0x059bd): (105, "InterpreterDataMap"), ("read_only_space", 0x059d9): (105, "InterpreterDataMap"),
("read_only_space", 0x059e5): (106, "ModuleRequestMap"), ("read_only_space", 0x05a01): (106, "ModuleRequestMap"),
("read_only_space", 0x05a0d): (107, "PromiseCapabilityMap"), ("read_only_space", 0x05a29): (107, "PromiseCapabilityMap"),
("read_only_space", 0x05a35): (108, "PromiseReactionMap"), ("read_only_space", 0x05a51): (108, "PromiseReactionMap"),
("read_only_space", 0x05a5d): (109, "PropertyDescriptorObjectMap"), ("read_only_space", 0x05a79): (109, "PropertyDescriptorObjectMap"),
("read_only_space", 0x05a85): (110, "PrototypeInfoMap"), ("read_only_space", 0x05aa1): (110, "PrototypeInfoMap"),
("read_only_space", 0x05aad): (111, "RegExpBoilerplateDescriptionMap"), ("read_only_space", 0x05ac9): (111, "RegExpBoilerplateDescriptionMap"),
("read_only_space", 0x05ad5): (112, "ScriptMap"), ("read_only_space", 0x05af1): (112, "ScriptMap"),
("read_only_space", 0x05afd): (113, "SourceTextModuleInfoEntryMap"), ("read_only_space", 0x05b19): (113, "SourceTextModuleInfoEntryMap"),
("read_only_space", 0x05b25): (114, "StackFrameInfoMap"), ("read_only_space", 0x05b41): (114, "StackFrameInfoMap"),
("read_only_space", 0x05b4d): (115, "TemplateObjectDescriptionMap"), ("read_only_space", 0x05b69): (115, "TemplateObjectDescriptionMap"),
("read_only_space", 0x05b75): (116, "Tuple2Map"), ("read_only_space", 0x05b91): (116, "Tuple2Map"),
("read_only_space", 0x05b9d): (117, "WasmExceptionTagMap"), ("read_only_space", 0x05bb9): (117, "WasmExceptionTagMap"),
("read_only_space", 0x05bc5): (118, "WasmIndirectFunctionTableMap"), ("read_only_space", 0x05be1): (118, "WasmIndirectFunctionTableMap"),
("read_only_space", 0x05bed): (136, "SloppyArgumentsElementsMap"), ("read_only_space", 0x05c09): (136, "SloppyArgumentsElementsMap"),
("read_only_space", 0x05c15): (153, "DescriptorArrayMap"), ("read_only_space", 0x05c31): (153, "DescriptorArrayMap"),
("read_only_space", 0x05c3d): (158, "UncompiledDataWithoutPreparseDataMap"), ("read_only_space", 0x05c59): (158, "UncompiledDataWithoutPreparseDataMap"),
("read_only_space", 0x05c65): (157, "UncompiledDataWithPreparseDataMap"), ("read_only_space", 0x05c81): (157, "UncompiledDataWithPreparseDataMap"),
("read_only_space", 0x05c8d): (174, "OnHeapBasicBlockProfilerDataMap"), ("read_only_space", 0x05ca9): (174, "OnHeapBasicBlockProfilerDataMap"),
("read_only_space", 0x05cb5): (170, "InternalClassMap"), ("read_only_space", 0x05cd1): (170, "InternalClassMap"),
("read_only_space", 0x05cdd): (181, "SmiPairMap"), ("read_only_space", 0x05cf9): (181, "SmiPairMap"),
("read_only_space", 0x05d05): (180, "SmiBoxMap"), ("read_only_space", 0x05d21): (180, "SmiBoxMap"),
("read_only_space", 0x05d2d): (147, "ExportedSubClassBaseMap"), ("read_only_space", 0x05d49): (147, "ExportedSubClassBaseMap"),
("read_only_space", 0x05d55): (148, "ExportedSubClassMap"), ("read_only_space", 0x05d71): (148, "ExportedSubClassMap"),
("read_only_space", 0x05d7d): (68, "AbstractInternalClassSubclass1Map"), ("read_only_space", 0x05d99): (68, "AbstractInternalClassSubclass1Map"),
("read_only_space", 0x05da5): (69, "AbstractInternalClassSubclass2Map"), ("read_only_space", 0x05dc1): (69, "AbstractInternalClassSubclass2Map"),
("read_only_space", 0x05dcd): (135, "InternalClassWithSmiElementsMap"), ("read_only_space", 0x05de9): (135, "InternalClassWithSmiElementsMap"),
("read_only_space", 0x05df5): (171, "InternalClassWithStructElementsMap"), ("read_only_space", 0x05e11): (171, "InternalClassWithStructElementsMap"),
("read_only_space", 0x05e1d): (149, "ExportedSubClass2Map"), ("read_only_space", 0x05e39): (149, "ExportedSubClass2Map"),
("read_only_space", 0x05e45): (182, "SortStateMap"), ("read_only_space", 0x05e61): (182, "SortStateMap"),
("read_only_space", 0x05e6d): (90, "AllocationSiteWithWeakNextMap"), ("read_only_space", 0x05e89): (90, "AllocationSiteWithWeakNextMap"),
("read_only_space", 0x05e95): (90, "AllocationSiteWithoutWeakNextMap"), ("read_only_space", 0x05eb1): (90, "AllocationSiteWithoutWeakNextMap"),
("read_only_space", 0x05ebd): (81, "LoadHandler1Map"), ("read_only_space", 0x05ed9): (81, "LoadHandler1Map"),
("read_only_space", 0x05ee5): (81, "LoadHandler2Map"), ("read_only_space", 0x05f01): (81, "LoadHandler2Map"),
("read_only_space", 0x05f0d): (81, "LoadHandler3Map"), ("read_only_space", 0x05f29): (81, "LoadHandler3Map"),
("read_only_space", 0x05f35): (82, "StoreHandler0Map"), ("read_only_space", 0x05f51): (82, "StoreHandler0Map"),
("read_only_space", 0x05f5d): (82, "StoreHandler1Map"), ("read_only_space", 0x05f79): (82, "StoreHandler1Map"),
("read_only_space", 0x05f85): (82, "StoreHandler2Map"), ("read_only_space", 0x05fa1): (82, "StoreHandler2Map"),
("read_only_space", 0x05fad): (82, "StoreHandler3Map"), ("read_only_space", 0x05fc9): (82, "StoreHandler3Map"),
("map_space", 0x02119): (1057, "ExternalMap"), ("map_space", 0x02119): (1057, "ExternalMap"),
("map_space", 0x02141): (1098, "JSMessageObjectMap"), ("map_space", 0x02141): (1098, "JSMessageObjectMap"),
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment