Skip to content

[tests] Create compatibility test shell functions and global arguments array#357

Merged
Hans-Halverson merged 1 commit into
masterfrom
shell-compat-methods
Jun 18, 2026
Merged

[tests] Create compatibility test shell functions and global arguments array#357
Hans-Halverson merged 1 commit into
masterfrom
shell-compat-methods

Conversation

@Hans-Halverson

Copy link
Copy Markdown
Owner

Summary

Add a compatibility layer for use with standard JS benchmark suites (octane, jetstream, web tooling benchmark) under the --test-shell-compat flag. This adds a number of global functions and objects used in standalone JS engine binaries for other engines (e.g. d8/jsc).

Adds:

  • gc
  • load/loadString
  • print/printErr
  • read/readFile
  • runString
  • performance.now
  • arguments - a global array of arguments passed to the CLI after --

Also refactors how optional global are installed, centralizing in a install_optional_globals function.

Tests

  • CI
  • Successfully used upstack with octane, jetstream, and web tooling benchmark

@Hans-Halverson Hans-Halverson merged commit 1be7f14 into master Jun 18, 2026
9 checks passed
@Hans-Halverson Hans-Halverson deleted the shell-compat-methods branch June 18, 2026 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant