Jason Williams
1052ccdd0c
Bytecode Interpreter (new branch) ( #860 )
...
Nodes implement CodeGen which generates instructions onto a stack held in Context.
The VM will interpret the instructions from Context.
There are some issues:
- Only basic instructions are added, but I'm working off https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey/Internals/Bytecode for now it should be easy to add more in.
- The Stack is a Vec, this isn't ideal (we may be able to live with it for now) but the stack should really be a fixed sized array. This isn't possible because Value can't be copied in there as it holds Rc and Gc values. Can we have fixed-sized Values that hold a pointer? Something like the "stackvec" crate should help
- put all VM related code behind "vm" feature flag
Co-authored-by: Jason Williams <jwilliams720@bloomberg.net>
Co-authored-by: Halid Odat <halidodat@gmail.com>
4 years ago
tofpie
14ef50ce47
Fix delete when the property is not configurable ( #1024 )
...
* Fix delete when the property is not configurable
* Implement suggestion
Co-authored-by: Halid Odat <halidodat@gmail.com>
Co-authored-by: tofpie <tofpie@users.noreply.github.com>
Co-authored-by: Halid Odat <halidodat@gmail.com>
4 years ago
Annika
90a8587ff5
Don't panic when function parameters share names ( #1017 )
...
* Don't panic when function parameters share names
* rustfmt
4 years ago
tofpie
e0a135e46a
Fix attributes on properties of functions and constructors ( #1023 )
...
Co-authored-by: tofpie <tofpie@users.noreply.github.com>
4 years ago
tofpie
57d5679a58
Implement for..in ( #976 )
...
* Implement for..in
* Fix code styling issue
* Add break and continue with label
* Add break and continue for while and do-while
* Add unit tests
* Fix formatting
* Split node ForInOfLoop into ForInLoop and ForOfLoop
* Fix issues in ForInOfLoop node splitting
* Merge with master branch
Co-authored-by: tofpie <tofpie@users.noreply.github.com>
4 years ago
tofpie
a77c879298
Fix spread in new and call expressions ( #1021 )
...
* Fix spread in new and call expressions
* Fix formatting
* Add unit tests
* Fix unit test
Co-authored-by: tofpie <tofpie@users.noreply.github.com>
4 years ago
tofpie
d6a594757f
Implement support of Symbol.toPrimitive ( #1020 )
...
Co-authored-by: João Borges <rageknify@gmail.com>
Co-authored-by: tofpie <tofpie@users.noreply.github.com>
4 years ago
Iban Eguia
9e9bf6531a
Upgraded dependencies, removed deprecated deps, updated the test262 submodule ( #1022 )
...
* Upgraded some dependencies, removed deprecated encoding deps, updated the test262 submodule
* Using previous syntax for yarn dependency
* Updated lockfile
4 years ago
tofpie
e11abfb3a2
Implement early errors for non-assignable nodes in assignment ( #1019 )
...
Co-authored-by: tofpie <tofpie@users.noreply.github.com>
4 years ago
tofpie
0331f486a6
Implement logical assignment operators (&&= and ||=) ( #1018 )
...
* Implement logical assignment operators (&&= and ||=)
* Add unit tests
Co-authored-by: tofpie <tofpie@users.noreply.github.com>
4 years ago
tofpie
4fb319dec6
Fix test suite name when it contains a dot ( #985 )
...
Co-authored-by: tofpie <tofpie@users.noreply.github.com>
4 years ago
dependabot[bot]
3b83767e58
Bump webpack-cli from 4.3.0 to 4.3.1 ( #1016 )
4 years ago
Halid Odat
4625c1ac29
Fix `Object.defineProperty()` ( #1005 )
...
- Fix panic if first argument is not supplied.
- Fix panic if second argument is not supplied.
- Fix bug when the object is not a object.
- Implemented `DefinePropertyOrThrow()`
4 years ago
tofpie
4cede758ed
Implement property accessors ( #987 )
...
Co-authored-by: tofpie <tofpie@users.noreply.github.com>
4 years ago
Annika
aac39cdd4b
Fix Clippy erorrs ( #1015 )
4 years ago
Halid Odat
724930dd8e
Fix `Object.prototype.hasOwnProperty()` ( #1004 )
...
- Fix panic when argument is not supplied.
- Fix panic when `this` is not a object.
- Fix Symbol property handling.
4 years ago
Annika
fd5c606a7b
StatementList: Rename `statements` to `items` ( #1014 )
4 years ago
tofpie
23bc476a94
Implement coalescing (?? and ??=) ( #1013 )
...
* Implement coalescing (?? and ??=)
* Add unit tests
Co-authored-by: tofpie <tofpie@users.noreply.github.com>
4 years ago
dependabot[bot]
aa951264bc
Bump webpack from 5.11.0 to 5.11.1 ( #1006 )
...
Bumps [webpack](https://github.com/webpack/webpack ) from 5.11.0 to 5.11.1.
- [Release notes](https://github.com/webpack/webpack/releases )
- [Commits](https://github.com/webpack/webpack/compare/v5.11.0...v5.11.1 )
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
4 years ago
dependabot[bot]
a068ef2a8a
Bump webpack-dev-server from 3.11.0 to 3.11.1 ( #1011 )
4 years ago
dependabot[bot]
67ee6faa58
Bump git2 from 0.13.14 to 0.13.15 ( #1008 )
4 years ago
dependabot[bot]
a44e5c5403
Bump serde_json from 1.0.60 to 1.0.61 ( #1007 )
4 years ago
tofpie
6f3641d593
Add numeric separator lexing ( #995 )
...
* Add numeric separator handling
* Implement suggestions from PR review
Co-authored-by: tofpie <tofpie@users.noreply.github.com>
4 years ago
dependabot[bot]
cb0582399a
Bump webpack-cli from 4.2.0 to 4.3.0 ( #1002 )
4 years ago
tofpie
880f6521d6
Fix comparison with infinity ( #1001 )
...
Co-authored-by: tofpie <tofpie@users.noreply.github.com>
4 years ago
54k1
7b103a5c0b
Error handling in environment ( #659 )
...
* Map ErrorKind to JS Errors
* Fix fmt
* Modify code with suggestions
* rebase and fix compilation errors
* Remove redundant clone
* Remove duplicate file
* cargo fmt
4 years ago
tofpie
f34e0b58e8
Fix logical expressions evaluation ( #999 )
...
* Fix logical expressions evaluation
* Remove redundant clones
Co-authored-by: tofpie <tofpie@users.noreply.github.com>
4 years ago
dependabot[bot]
015c11e47f
Bump git2 from 0.13.13 to 0.13.14 ( #993 )
4 years ago
dependabot[bot]
0ff3be9ba6
Bump rand from 0.7.3 to 0.8.0 ( #990 )
4 years ago
tofpie
b2dba535a6
Implement Object.prototype.isPrototypeOf ( #983 )
...
* Implement Object.prototype.isPrototypeOf
* Fix formatting
Co-authored-by: tofpie <tofpie@users.noreply.github.com>
4 years ago
dependabot[bot]
23f0b75fcf
Update rand requirement from 0.7.3 to 0.8.0 in /boa ( #992 )
4 years ago
dependabot[bot]
22f8c5d0ce
Bump git2 from 0.13.12 to 0.13.13 ( #991 )
4 years ago
tofpie
395a28c2ab
Fix prototypes for Number, String and Boolean ( #981 )
...
* Fix prototype for Number, String and Boolean
* Fix formatting issue
Co-authored-by: tofpie <tofpie@users.noreply.github.com>
4 years ago
Jevan Chan
880792e422
Read file input in bytes instead of string ( #979 )
4 years ago
tofpie
d46080d9ef
Fix enumerable attribute on string length property ( #974 )
...
* Fix enumerable attribute on string length property
* Remove unnecessary conversion
* Fix length for string value
Co-authored-by: tofpie <tofpie@users.noreply.github.com>
4 years ago
tofpie
b5cf0f0a29
Fix enumerable attribute on array length property ( #972 )
...
* Fix enumerable attribute on array length property
* Fix enumerable attribute on Array.prototype length property
* Add Attribute::Permanent to property length of Array.prototype
Co-authored-by: tofpie <tofpie@users.noreply.github.com>
4 years ago
dependabot[bot]
c49f2258b2
Bump webpack from 5.10.3 to 5.11.0 ( #978 )
4 years ago
Iban Eguia
b058b2d8a5
Fixed build in master ( #977 )
4 years ago
Nathan Royer
5c986767bc
Implement Number.prototype.toPrecision ( #962 )
4 years ago
tofpie
751a037ddf
Implement the optional `space` parameter in `JSON.stringify` ( #961 )
...
Co-authored-by: João Borges <rageknify@gmail.com>
Co-authored-by: tofpie <tofpie@users.noreply.github.com>
4 years ago
João Borges
4f1f8ebbc7
Docs: Fix word in comment ( #975 )
4 years ago
tofpie
a6ec41e33f
Fix unit tests that can be failed due to daylight saving time ( #968 )
...
Co-authored-by: tofpie <tofpie@users.noreply.github.com>
4 years ago
dependabot[bot]
4e82a980c0
Bump rustyline from 7.0.0 to 7.1.0 ( #970 )
4 years ago
dependabot[bot]
e71fcd5211
Bump webpack from 5.10.1 to 5.10.3 ( #969 )
4 years ago
Jakub Fijałkowski
8f388d501d
Reduce the number of `Array`-related panics ( #919 )
4 years ago
dependabot[bot]
90cd480052
Bump indexmap from 1.6.0 to 1.6.1 ( #966 )
4 years ago
tofpie
8f590d781a
Fix single line comment lexing with CRLF line ending ( #964 )
...
Co-authored-by: tofpie <tofpie@users.noreply.github.com>
4 years ago
dependabot[bot]
ff139045d4
Bump webpack from 5.10.0 to 5.10.1 ( #965 )
4 years ago
tofpie
0c068cb35b
Fix unresolved links in documentation ( #960 )
...
* Fix unresolved links in documentation
* Fix more unresolved links
* Fix even more unresolved links
* Fix more links
* Treat variables as code
Co-authored-by: Iban Eguia <razican@protonmail.ch>
Co-authored-by: tofpie <tofpie@users.noreply.github.com>
Co-authored-by: Iban Eguia <razican@protonmail.ch>
4 years ago
tofpie
6d866f8012
Fix Unicode character escape sequence parsing ( #959 )
...
Co-authored-by: tofpie <tofpie@users.noreply.github.com>
4 years ago