-
Notifications
You must be signed in to change notification settings - Fork 10.1k
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
[jsinterp] Actual JS interpreter #11272
Closed
Closed
Changes from 1 commit
Commits
Show all changes
127 commits
Select commit
Hold shift + click to select a range
d328b8c
[jsinterp] Actual parsing
sulyi 2c85715
[jsinterp] Handling comments
sulyi cc895cd
[jsinterp] Parsing expr (cleanup needed)
sulyi 8c87a18
[jsinterp] Calling field and test
sulyi 2076b0b
[jsinterp] Clean up
sulyi da73cd9
[jsinterp] Quick regex fixes (thx to yan12125)
sulyi 71a485f
[jsinterp] Complex call test (thx to yan12125)
sulyi 8842f08
[jsinterp] String literal regex change
sulyi c485fe7
[jsinterp] Reject method call when name is empty (+reminder TOTOs)
sulyi ba5a400
[jsinterp] Simpler regex regex (+more TOTO)
sulyi b089388
[jsinterp] Lexer overhaul
sulyi 9bd5dee
[jsinterp] Value parsing
sulyi aa7eb3d
[jsinterp] No OrderedDict
sulyi a0fa6bf
[jsinterp] Parser mock up
sulyi 67d5653
[jsinterp] Minor quick fixes
sulyi a89d490
[jsinterp] TokenStream, expression mock up
sulyi f6005dc
[jsinterp] Adding _operator_expression using reversed polish notation
sulyi f605783
[jsinterp] Parser - take one (untested)
sulyi f6ad8db
[jsinterp] Refactoring and minor fixes
sulyi 7864078
[jsinterp] Preliminary fixes after some testing of ast
sulyi d422aef
[jsinterp] Very basic interpreter
sulyi ce4a616
[jsinterp] Token class for tokens
sulyi c426efd
[jsinterp] More tokens
sulyi c2f280d
[jsinterp] Compatibility fix
sulyi 8ff8a70
[jsinterp] Str tokens are easier to deal with
sulyi 599b9db
[jsinterp] First parser tests
sulyi 70a5e31
[jsinterp] Parentheses fix (test and parser)
sulyi 4999fcc
[jsinterp] More test and str fix
sulyi 651a1e7
[jsinterp] Coding convention fixes
sulyi dd6a2b5
[jsinterp] Clean up
sulyi c5c1273
Merge branch 'master' into jsinterp
sulyi 6fa4eb6
[jsinterp] Fixing compatibility
sulyi a9c7310
[jsinterp] Adding context handling
sulyi e392f78
[jsinterp] Formatting code
sulyi 88d2a4e
[jsinterp] Unittest2 in reqs
sulyi 200903c
[jsinterp] Fixing py3 zip generator issues in parser tests
sulyi 9d1f756
[jsinterp] Fixing deep copy zip in test_jsinterp_parse
sulyi f942bb3
[jsinterp] Refactoring getvalue and putvalue
sulyi 9b5e55a
[jsinterp] Mozilla-central test first try
sulyi aa6e752
[jsinterp] Fixing Reference repr
sulyi 86de1e8
[jsinterp] Adding function declaration and fixing block statement parser
sulyi 4f55fe7
[jsinterp] Adding if parser (test needed)
sulyi 57c8ccb
[jsinterp] Re-prioritising TODOs
sulyi ad49621
[jsinterp] Adding with and switch parser and fixes (tests needed)
sulyi c2e6ca5
[jsinterp] Adding code to if and switch test
sulyi ad288aa
[jsinterp] Parser test code fixes
sulyi 48aaa41
[jsinterp] Finished parser if test
sulyi dedb6ee
[jsinterp] Added try parser (test needed)
sulyi bae3166
[jsinterp] Added debugger and throw parser (test needed)
sulyi 96e5068
[jsinterp] Adding parser for label statement and function expression
sulyi f24cafe
[jsinterp] Adding parser object literal
sulyi a8a445f
[jsinterp] Fixing TokenStrem pop, label statement, function body
sulyi 253e326
[jsinterp] Adding do and while parser
sulyi 3ba28c6
[jsinterp] Adding for parser
sulyi cc9cb30
[jsinterp] Reprioritizing TODOs in test_jsinterp_parser.py
sulyi 007f19e
[jsinterp] Adding code to parser tests
sulyi cf4c9c3
[jsinterp] Adding switch ast to parser test
sulyi 558290d
[jsinterp] Adding object ast to parser test
sulyi f7993a1
[jsinterp] Refactor
sulyi 2533dc4
[jsinterp] Adding ast to test_function_expression
sulyi fe141c4
[jsinterp] Refactor _object_literal
sulyi a2e42ed
[jsinterp] Adding ast to do parser test
sulyi 4b8754c
[jsinterp] Adding ast to while parser test
sulyi b397ea2
[jsinterp] Adding ast to for parser test
sulyi cd0bb42
[jsinterp] Adding ast to for empty and for in parser test
sulyi ab37e2b
[test] Adding jstests test suite
sulyi c4c2aa2
[test] Adding support for signed values (hopefully)
sulyi e1444dd
[test] Adding support for signed values
sulyi 0e4dd1a
[test, jsinterp] Adding sign test and refactor and fixing interpretation
sulyi d7443e1
[jsinterp] Adding interpreter support for pre- and postfix expressions
sulyi cd2bf30
[test] Adding logging to TestJSInterpreterParse
sulyi 5238ed1
[test] Adding logging to TestJSInterpreter
sulyi 1716801
[jsinterp] Adding interpreter support to get field
sulyi fce5722
[jsinterp] Adding error handling to global variable init
sulyi ee3dc29
[jsinterp] Adding interpreter support for set field
sulyi 4e6f689
[jsinterp] Fixing set field
sulyi dca2e9e
[jsinterp] Fixing compat import
sulyi 3b53669
[jsinterp] Adding function declaration and call
sulyi 3f075d8
[test] jstest fixes
sulyi 3d0252a
[jsinterp] Refactoring jsparser
sulyi a5e7022
[jstests] Ordering imports in __init__
sulyi bddf482
[jstests] Doc, dynamic import
sulyi 41596ff
[jsbuilt-ins] jsbuilt_ins mock up
sulyi 6f2ac27
[jsbuilt-ins] Table of content of the book of black magic
sulyi 1725514
[jsinterp] super object in subclasses __init__
sulyi 0eef083
[jsbuilt-ins] a riddle wrapped in mystery inside an enigma
sulyi 484a7d2
[jsbuilt-ins] adding _type and JSObject constructor
sulyi 65e9b0b
[jsbuilt-ins] adding Function and Array constructors
sulyi 2dd9864
[jsbuilt-ins] minor props fix
sulyi a500c34
[jsbuilt-ins] major props fix
sulyi 598f5f2
[jsbuilt-ins] String mock up Function constructor fix, to_string plac…
sulyi 56cecdd
[jsbuilt-ins] fixing to_string
sulyi 9ead39c
[jsbuilt-ins] fixing numerical stability of to_string
sulyi 8733120
[jsbuilt-ins] implementing Boolean object
sulyi 8729fe6
[jsbuilt-ins] adding type conversions (to number )
sulyi ec79b14
[jsbuilt-ins] adding Number class and prototype
sulyi dbedff2
[jsbuilt-ins] global object properties mock up
sulyi 4d386f0
[jsbuilt-ins] major refactor
sulyi 0136be4
[jsbuilt-ins] fixing constructors
sulyi 49dba39
Merge branch 'master' into jsinterp
sulyi 1126698
[jsinterp] Renaming `jsinterp` to jsinterp2
sulyi e44a252
[jsinterp] Using unicode literals
sulyi 53f8eff
[jsbuilt_ins] Fixing circular imports
sulyi 61fe8d2
[jsbuilt-ins] premerge
sulyi b856d55
Merge branch 'jsbuilt-ins' into jsinterp
sulyi 70ac98a
[jsinterp] Fixing missed unicode support (yet again)
sulyi 1f40e3e
[jsinterp] Test suit update
sulyi db0dc7b
[jsinterp] Fixing typos and code style
sulyi d977e93
[jsinterp] Fixing test skip messages
sulyi 38b2602
[jsinterp] Complying with PEP 479
sulyi b9061d6
[jsinterp] Fixing TODOs and comments
sulyi 2ce996c
[jsinterp] Unicode docstring hack
sulyi 70d9194
[jsinterp] Multi level logging in tests
sulyi 1b9d883
[jsinterp] Faking `Logger.getChild` for py2.6
sulyi 327bb2d
[jsinterp] Fixing code style
sulyi f9f030a
[jsinterp] Implementing String split
sulyi db44dee
[jsinterp] Renaming tests
sulyi 105faaf
[jsinterp] Revert `youtube-dl/youtube_dl/extractor/youtube.py`
sulyi b8a1742
[jsinterp] Rename `js2test` to `jstests`
sulyi 848aa79
[jsinterp] Fixing incomplete refactor
sulyi bbea188
[jsinterp] revert `youtube_dl/extractor/youtube.py` (yet again)
sulyi 37d6306
[jsinterp] Adding `JSArrayPrototype#_slice`
sulyi 8060889
[jsinterp] TODOs in `JSStringPrototype#_split`
sulyi a8c640e
[jsinterp] Fixing broken Assignment Expression
sulyi a33b47e
[jsinterp] Adding handling lineterminator
sulyi 93c0bb5
[jsinterp] Fixing types and operators
sulyi c0ef911
[jsinterp] Adding delete and void operators
sulyi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think
JSInterpreter#extract_function
is useful filtering code before execution, therefore I'd like to continue supporting it. But here it needs to get object from outer context, and that behaviour is not in spec. I'd like to suggest a flag that disables these kind of features.