-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merge the runtime features we've made up to this point #2
Merged
Conversation
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
We've implemented the Script, Agent, Realm and Completion record and refactored existing code so that we can start writing code to execute the AST we generate from parsing. We also have a VM which will be used when executing nodes to perform required tasks.
This prevents ambigiouties between the namespace Value and type Value.
This commit implements the ApplyStringOrNumericBinaryOperator Abstract Operation and the binary ops needed to execute the operation.
There is no unit tests for this commit as the next commit will change ASTTests to use the parser. So for testing literals we need execution of expression statements.
Before we would throw on normal completions when calling update empty.
This helps our code be cleaner and not having to worry about null Values.
If a parameter of a function is excluded it is defaulted to undefined. The indexer for list now supports this behaviour
Callable doesn't need to inherit from Object and would make more sense for Callable to be an interface.
This allows for the Object constructor to be used in code. This commits also implements the spec code for adding global properties
Currently, if you had a new expression with arguments, it would be parsed as a new expression with a CallExpression rhs. This behaviour prevents new expressions with arguments from being evaluted correctly
The Object constructor in javascript is a global object. So we imitate that behaviour as a singleton.
BuiltinFunction objects support functions that are run in C# but will be calling in javascript. For example, functions created on prototypes are BuiltinFunction objects
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR got out of hand and got outside of the scope of just being the JS "ast" as it includes a lot of runtime components.
I'm merging this to be able to start to refactor a lot of the code in a separate pr and start to make pull request for small features instead.