Iban Eguia
ba84f526de
Added syntax highlighting for numbers, identifiers and template literals ( #1047 )
...
* Added syntax highlighting for numbers, identifiers and template literals
* Update boa_cli/src/helper.rs
Co-authored-by: Jevan Chan <jevan.cnchan@gmail.com>
* Update boa_cli/src/helper.rs
Co-authored-by: Jevan Chan <jevan.cnchan@gmail.com>
Co-authored-by: Jevan Chan <jevan.cnchan@gmail.com>
4 years ago
54k1
d9916fcc9c
Modify environment binding behaviour of function ( #1010 )
...
* Modify environment binding behaviour of function
* Add basic test
4 years ago
Annika
89419e202f
VM: Implement variable declaration (var, const, and let) ( #1030 )
...
* VM: Implement LetDeclList and the `let` keyword
* Support var and const
* Split defining and initializing into separate instructions
* DefLet doesn't need the value
* InitLexical initializes value if set
* Code review
* Fix rustfmt
* Add documentation
* InitLexical fix
Co-authored-by: jasonwilliams <jase.williams@gmail.com>
4 years ago
tofpie
1a7e832791
Add receiver parameter to object internal methods ( #1042 )
...
Co-authored-by: tofpie <tofpie@users.noreply.github.com>
4 years ago
Jevan Chan
e8bc79c26a
Implement String.prototype.split ( #1026 )
4 years ago
dependabot[bot]
8140b9346d
Bump serde_yaml from 0.8.14 to 0.8.15 ( #1043 )
4 years ago
dependabot[bot]
0e41be1144
Bump rand from 0.8.0 to 0.8.1 ( #1039 )
4 years ago
dependabot[bot]
ceca316ca5
Bump getrandom from 0.2.0 to 0.2.1 ( #1037 )
4 years ago
dependabot[bot]
34f3221ea8
Bump html-webpack-plugin from 4.5.0 to 4.5.1 ( #1036 )
4 years ago
Jason Williams
ce78947fce
update launch.json ( #1034 )
...
- cpp version is no longer needed
- add VM launch config using cargo args
4 years ago
Iban Eguia
5e78ff83f5
Fixed some panics ( #1029 )
...
* Fixed some panics, Object.setPrototypeOf and Object.getPrototypeOf are almost spec compliant
* Small documentation fix
* Fixed clippy lint
* Added `RequireObjectCoercible`
* Fixed compilation error
* cargo fmt
4 years ago
Iban Eguia
553ea529f3
Fixed some extra regex panics ( #1031 )
4 years ago
Jason Williams
98945c8cb3
wrap the regress panic for now ( #1027 )
4 years ago
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