-
Notifications
You must be signed in to change notification settings - Fork 30k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[top-level-await] Implement spec fix for cycle root detection Refs: http://github.com/v8/v8/commit/9689b17687b21c800c3f7400df4255c55b9c6ec0 PR-URL: #37865 Backport-PR-URL: #37985 Reviewed-By: Michaël Zasso <[email protected]>
- Loading branch information
1 parent
f2cef54
commit 2fd97ce
Showing
13 changed files
with
109 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
deps/v8/test/mjsunit/harmony/modules-import-rqstd-order-async-cycle.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// 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. | ||
|
||
// Flags: --harmony-top-level-await | ||
|
||
import "modules-skip-async-cycle-start.mjs" | ||
|
||
assertEquals(globalThis.test_order, [ | ||
'2', 'async before', 'async after', '1', | ||
'3', 'start', | ||
]); |
14 changes: 14 additions & 0 deletions
14
deps/v8/test/mjsunit/harmony/modules-skip-async-cycle-1.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// 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. | ||
|
||
// Flags: --harmony-top-level-await | ||
|
||
import "modules-skip-async-cycle-2.mjs"; | ||
import "modules-skip-async-cycle-leaf.mjs"; | ||
|
||
if (globalThis.test_order === undefined) { | ||
globalThis.test_order = []; | ||
} | ||
globalThis.test_order.push('1'); | ||
|
12 changes: 12 additions & 0 deletions
12
deps/v8/test/mjsunit/harmony/modules-skip-async-cycle-2.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// 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. | ||
|
||
// Flags: --harmony-top-level-await | ||
|
||
import "modules-skip-async-cycle-1.mjs"; | ||
|
||
if (globalThis.test_order === undefined) { | ||
globalThis.test_order = []; | ||
} | ||
globalThis.test_order.push('2'); |
12 changes: 12 additions & 0 deletions
12
deps/v8/test/mjsunit/harmony/modules-skip-async-cycle-3.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// 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. | ||
|
||
// Flags: --harmony-top-level-await | ||
|
||
import "modules-skip-async-cycle-2.mjs"; | ||
|
||
if (globalThis.test_order === undefined) { | ||
globalThis.test_order = []; | ||
} | ||
globalThis.test_order.push('3'); |
13 changes: 13 additions & 0 deletions
13
deps/v8/test/mjsunit/harmony/modules-skip-async-cycle-leaf.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// 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. | ||
|
||
// Flags: --harmony-top-level-await | ||
|
||
if (globalThis.test_order === undefined) { | ||
globalThis.test_order = []; | ||
} | ||
|
||
globalThis.test_order.push('async before'); | ||
await 0; | ||
globalThis.test_order.push('async after'); |
13 changes: 13 additions & 0 deletions
13
deps/v8/test/mjsunit/harmony/modules-skip-async-cycle-start.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// 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. | ||
|
||
// Flags: --harmony-top-level-await | ||
|
||
import "modules-skip-async-cycle-1.mjs"; | ||
import "modules-skip-async-cycle-3.mjs"; | ||
|
||
if (globalThis.test_order === undefined) { | ||
globalThis.test_order = []; | ||
} | ||
globalThis.test_order.push('start'); |