frozen constant objects should live in the data segment
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 431
- Forks
- 20
- PR merge metrics
- No merged PRs in 30d
Description
similar to toshok/echo-js#10.
pirouette does the following to map objective-c enums:
var enum = Object.create(null);
Object.defineProperty (enum, "foo", 5);
...
Object.freeze(enum);
esprima does the same with its syntax object, which is a set of constant strings.
If we can statically determine that an object is constructed and populated with constants - and then frozen, we can move the construction/population out of code entirely, and put it in the data segment of the executable instead.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the issue's examples from pirouette and esprima, focusing on Object.create, Object.defineProperty, and Object.freeze. No repository files or tests are identified; done would require statically recognizing frozen objects populated with constants and placing their construction in the executable's data segment instead of generated code.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100