chakra-core / chakra-core/ChakraCore

Suggestion: Convert 262.js, DbgController.js and Encode.js into bytecode

Open
#6,591 1 comment 0 reactions 0 assignees View on GitHub
Suggestion
Dominant language
JavaScript
Stars
9.3k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Description

These js files implement certain features used in `ch` currently they are embedded within `ch` as raw strings of javascript, so when launching `ch` with the flags that imply they're needed they have to be parsed and converted to bytecode before execution begins.

- There are numerous test cases that use `DbgController.js` and it's fairly long, so converting these into bytecode in advance could result in a measurable speed up in running the testsuite.
- `262.js` is much smaller but still could be worth doing.
- I'm not sure on `Encode.js` - it may just need deleting, I can't see what it's for.

On the back of #6583 this would be fairly easy to do - the script I've written as part of that could be just expanded to include generating these new bytecode files.

|Pros|Cons|
|---|---|
|Speed up test suite|More generated files in the source tree|
|Get rid of DbgController build step|Speed up likely small|
|Delete jstoc script||

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.