Upload Kmake

This commit is contained in:
Gorochu
2026-05-26 23:36:42 -07:00
parent ba051b2f74
commit 555ec72358
41615 changed files with 13344630 additions and 1 deletions

View File

@ -0,0 +1,12 @@
// Copyright 2020 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
let count = 2;
TypeError.prototype.__defineGetter__("name", function () {
if (count <= 0) return;
count--;
WebAssembly.compile();
});
;
console.log(new TypeError());

View File

@ -0,0 +1,11 @@
Error
*%(basename)s:9: Error: WebAssembly.compile(): Argument 0 must be a buffer source
WebAssembly.compile();
^
Error: WebAssembly.compile(): Argument 0 must be a buffer source
at TypeError.name (*%(basename)s:9:15)
at TypeError.toString (<anonymous>)
at console.log (<anonymous>)
at *%(basename)s:12:9
1 pending unhandled Promise rejection(s) detected.

View File

@ -0,0 +1,9 @@
// Copyright 2020 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
d8.file.execute('test/mjsunit/mjsunit.js');
Promise.resolve().then(() => {
assertEquals('foo', 'bar');
});

View File

@ -0,0 +1,12 @@
undefined:0: Failure: expected <"foo"> found <"bar">
Stack: MjsUnitAssertionError
at assertEquals test/mjsunit/mjsunit.js {NUMBER}:{NUMBER}
at *%(basename)s 8:3
MjsUnitAssertionError
at assertEquals test/mjsunit/mjsunit.js {NUMBER}:{NUMBER}
at *%(basename)s 8:3
1 pending unhandled Promise rejection(s) detected.

View File

@ -0,0 +1,11 @@
// Copyright 2018 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
d8.file.execute("test/mjsunit/mjsunit.js");
let promise = new Promise(function(resolve, reject) {
throw new Error("Error in creation");
});
assertPromiseResult(promise);

View File

@ -0,0 +1,12 @@
test/mjsunit/mjsunit.js:{NUMBER}: Error: Error in creation
throw concatenateErrors(stack, e);
^
Error
at assertPromiseResult (test/mjsunit/mjsunit.js:{NUMBER}:{NUMBER})
at *%(basename)s:11:1
Error: Error in creation
at *%(basename)s:8:9
at new Promise (<anonymous>)
at *%(basename)s:7:15

View File

@ -0,0 +1,14 @@
// Copyright 2018 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
d8.file.execute("test/mjsunit/mjsunit.js");
let reject_handler;
let promise = new Promise(function(resolve, reject) {
reject_handler = reject;
});
assertPromiseResult(promise);
reject_handler("Reject with callback");

View File

@ -0,0 +1,10 @@
test/mjsunit/mjsunit.js:{NUMBER}: Error: Reject with callback
throw concatenateErrors(stack, e);
^
Error
at assertPromiseResult (test/mjsunit/mjsunit.js:{NUMBER}:{NUMBER})
at *%(basename)s:12:1
Error: Reject with callback
at concatenateErrors (test/mjsunit/mjsunit.js:{NUMBER}:{NUMBER})
at test/mjsunit/mjsunit.js:{NUMBER}:{NUMBER}

View File

@ -0,0 +1,11 @@
// Copyright 2018 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
d8.file.execute("test/mjsunit/mjsunit.js");
let obj = {f: 1254};
assertPromiseResult(
Promise.reject(obj), (o) => {print(o.f)},
_ => {throw new Error('Error in reject handler')});

View File

@ -0,0 +1,12 @@
test/mjsunit/mjsunit.js:{NUMBER}: Error: Error in reject handler
throw concatenateErrors(stack, e);
^
Error
at assertPromiseResult (test/mjsunit/mjsunit.js:{NUMBER}:{NUMBER})
at *%(basename)s:9:1
Error: Error in reject handler
at *%(basename)s:11:17
at test/mjsunit/mjsunit.js:{NUMBER}:{NUMBER}

View File

@ -0,0 +1,11 @@
// Copyright 2018 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
d8.file.execute("test/mjsunit/mjsunit.js");
let obj = {f: 1254};
assertPromiseResult(
Promise.resolve(obj), _ => {throw new Error('Error in resolve handler')},
(o) => {print(o.f)});

View File

@ -0,0 +1,13 @@
test/mjsunit/mjsunit.js:{NUMBER}: Error: Error in resolve handler
throw concatenateErrors(stack, e);
^
Error
at assertPromiseResult (test/mjsunit/mjsunit.js:{NUMBER}:{NUMBER})
at *%(basename)s:9:1
Error: Error in resolve handler
at *%(basename)s:10:39
at test/mjsunit/mjsunit.js:{NUMBER}:{NUMBER}

View File

@ -0,0 +1,32 @@
// Copyright 2019 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --experimental-stack-trace-frames
// Test wasm compilation explicitly, since this creates a promise which is only
// resolved later, i.e. the message queue gets empty in-between.
// The important part here is that d8 exits with a non-zero exit code.
d8.file.execute('test/mjsunit/mjsunit.js');
d8.file.execute('test/mjsunit/wasm/wasm-module-builder.js');
assertPromiseResult((async function test() {
let ok_buffer = (() => {
let builder = new WasmModuleBuilder();
builder.addFunction(undefined, kSig_i_v).addBody([kExprI32Const, 42]);
return builder.toBuffer();
})();
let bad_buffer = new ArrayBuffer(0);
let kNumCompiles = 3;
// Three compilations of the OK module should succeed.
for (var i = 0; i < kNumCompiles; ++i) {
await WebAssembly.compile(ok_buffer);
}
// Three compilations of the bad module should fail.
for (var i = 0; i < kNumCompiles; ++i) {
await WebAssembly.compile(bad_buffer);
}
})());

View File

@ -0,0 +1,11 @@
test/mjsunit/mjsunit.js:{NUMBER}: CompileError: WebAssembly.compile(): BufferSource argument is empty
throw concatenateErrors(stack, e);
^
Error
at assertPromiseResult (test/mjsunit/mjsunit.js:{NUMBER}:{NUMBER})
at *%(basename)s:{NUMBER}:1
CompileError: WebAssembly.compile(): BufferSource argument is empty
at WebAssembly.compile (<anonymous>)
at test (*%(basename)s:{NUMBER}:23)

View File

@ -0,0 +1,7 @@
// Copyright 2019 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
d8.file.execute("test/mjsunit/mjsunit.js");
assertNotSame(1, 1);

View File

@ -0,0 +1,10 @@
test/mjsunit/mjsunit.js:{NUMBER}: Failure: expected <not same as 1> found <1>
Stack: MjsUnitAssertionError
at assertNotSame *mjsunit.js {NUMBER}:{NUMBER}
at *%(basename)s 7:1
throw new MjsUnitAssertionError(
^
MjsUnitAssertionError
at assertNotSame *mjsunit.js {NUMBER}:{NUMBER}
at *%(basename)s 7:1

View File

@ -0,0 +1,7 @@
// Copyright 2018 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
d8.file.execute("test/mjsunit/mjsunit.js");
assertTrue(false);

View File

@ -0,0 +1,10 @@
test/mjsunit/mjsunit.js:{NUMBER}: Failure: expected <true> found <false>
Stack: MjsUnitAssertionError
at assertTrue *mjsunit.js {NUMBER}:{NUMBER}
at *%(basename)s 7:1
throw new MjsUnitAssertionError(
^
MjsUnitAssertionError
at assertTrue *mjsunit.js {NUMBER}:{NUMBER}
at *%(basename)s 7:1

View File

@ -0,0 +1,6 @@
// Copyright 2021 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
(function(){ 0, {}(); })();
0, function(){function(){ ; }(); ;

View File

@ -0,0 +1,4 @@
*%(basename)s:6: SyntaxError: Function statements require a function name
0, function(){function(){ ; }(); ;
^^^^^^^^
SyntaxError: Function statements require a function name

View File

@ -0,0 +1,10 @@
// Copyright 2018 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
d8.file.execute("test/mjsunit/mjsunit.js");
let obj = {f: 6254};
assertPromiseResult(
Promise.reject(obj), assertUnreachable, (o) => {print(o.f)});

View File

@ -0,0 +1 @@
6254

View File

@ -0,0 +1,14 @@
// Copyright 2018 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
d8.file.execute("test/mjsunit/mjsunit.js");
let resolve_handler;
let promise = new Promise(function(resolve, reject) {
resolve_handler = resolve;
});
assertPromiseResult(promise);
resolve_handler({f: 3463});

View File

@ -0,0 +1,9 @@
// Copyright 2018 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
d8.file.execute("test/mjsunit/mjsunit.js");
let obj = {f: 1254};
assertPromiseResult(Promise.resolve(obj), (o) => {print(o.f)});

View File

@ -0,0 +1 @@
1254