4bfc062aaf
fix: correctly flatten locals in control flow statements
2024-09-05 17:13:34 +03:00
9ec99def3f
fix: variable declarations shouldn't collide with defined name of named function exp
2024-09-05 13:29:42 +03:00
8f13ff3e0b
fix: scope gets polluted by arguments with named function expressions
2024-09-05 13:29:20 +03:00
d7353e19ed
fix: treat "arguments" as a keyword (as per strict soecifications)
2024-09-05 13:18:53 +03:00
e509edc459
fix: wrong arguments when compilling function bodies
2024-09-05 13:03:49 +03:00
b6a90b108b
fix: wrong check for var decl collisions
2024-09-05 13:03:36 +03:00
55caf1e206
refactor: remove unneeded old comments
2024-09-05 13:03:04 +03:00
eac4a3af23
fix: throw access before decl for const and let in runtime
2024-09-05 00:31:03 +03:00
5b4adf5286
a clusterfuck of fixes with let and const
2024-09-05 00:28:13 +03:00
9265a7d813
Merge branch 'master' into ES6
2024-09-04 15:52:03 +03:00
1589ef51b0
refactor: move src and resources to standard places
2024-09-04 15:32:54 +03:00
marregui
313b20a3b3
Add first test ( #23 )
...
* Add the first test and upgrade build.gradle to modern standards
1. gradle wrapper
2. ./gradlew run
3. manifest will look like
Manifest-Version: 1.0
Main-Class: me.topchetoeu.jscript.runtime.SimpleRepl
Build-Timestamp: 2024-09-04T10:44:35.990+0200
Build-Branch: ma/add-first-tests
Build-Revision: 412edc0ebc
Build-Jdk: 21.0.3 (Oracle Corporation 21.0.3+7-LTS-152)
Build-Author: TopchetoEU
4. build/distributions contains a zip and a jar which contain jscript-0.9.41-beta.jar
5. unnecessary libs have been removed
6. gradle has been updated to 8.10
7. first test has been added
* fix: revert removal of Jabel (for support of Java 11)
---------
Co-authored-by: TopchetoEU <36534413+TopchetoEU@users.noreply.github.com>
2024-09-04 15:29:17 +03:00
ce9b419757
reafactor: make globals initializer use ES6 features
2024-09-04 10:45:34 +03:00
6f8efe74c4
fix: print was returning java null, not JS undefined
2024-09-04 10:45:14 +03:00
bd503ed943
feat: impl new instructions
2024-09-04 10:44:58 +03:00
5359c54694
fix: rethrow SyntaxException from compilation as EngineException
2024-09-04 10:44:44 +03:00
93c246ad97
refactor: remove arg loading from frame
2024-09-04 10:44:24 +03:00
7c8efaf066
fix: incorrect printing of object-like values
2024-09-04 10:43:40 +03:00
546d663466
feat: add this arg capture
2024-09-04 10:42:21 +03:00
f929015f55
ammend to prev commit
2024-09-04 10:41:52 +03:00
2a5f6aa9aa
fix: use _STR and _INT variants of member instructions
2024-09-04 10:41:17 +03:00
78d233a6bd
refactor: remove ArgumentsNode
2024-09-04 10:39:11 +03:00
3f25868f19
fix: some scope bug fixes
2024-09-04 10:38:16 +03:00
e3f1bc0949
fix: incorrect compilation of if-else
2024-09-04 10:36:48 +03:00
506726fd76
feat: implement ES6 variables and rest args
2024-09-04 10:36:25 +03:00
4cbc108686
feat: implement optional arguments
2024-09-04 10:00:48 +03:00
c39c06b792
refactor: move away intrinsic logic to final methods for performance
2024-09-04 10:00:45 +03:00
7ab78b9cea
fix: control flow nodes were making scopes instead of compound nodes
2024-09-04 10:00:43 +03:00
87e077d70d
oops
2024-09-04 10:00:40 +03:00
52f7c15ac8
refactor: change how function scope keeps track of arguments
2024-09-04 10:00:38 +03:00
6932bea677
refactor: remove unused class
2024-09-04 10:00:36 +03:00
82d6f52a26
refactor: make some classes final for performance
2024-09-04 10:00:33 +03:00
1b87c2f5a6
fix: add for-of to statement list
2024-09-04 10:00:30 +03:00
163dfe7b6e
feat: implement access to intrinsics
2024-09-04 10:00:25 +03:00
2b6d4a87ca
fix: for in and for of not reading open paren
2024-09-04 10:00:22 +03:00
349d392269
major rewrite: clean up a lot of code and lay ground for ES6 support
2024-09-04 10:00:15 +03:00
6481e992fa
feat: implement "has" function for scopes
2024-09-04 10:00:11 +03:00
4a5e5a71af
feat: Create new scope system for ES6+ support
2024-09-04 10:00:02 +03:00
89ba921b4a
refactor: rename statements to nodes
2024-09-04 10:00:00 +03:00
a45f4109d8
feat: add environment in Source
2024-09-04 09:59:57 +03:00
62aba62a41
refactor: make Environment more reusable
2024-09-04 09:59:54 +03:00
4048d6ef1c
refactor: rename ES5 to JavaScript
2024-09-04 09:59:42 +03:00
d0ccf00f14
everything all at once
2024-09-04 09:59:35 +03:00
f09feae08f
refactor: clean up parsing
2024-09-04 09:59:32 +03:00
ef0fc5a61d
refactor: distribute parse functions in node classes
2024-09-04 09:59:28 +03:00
bab59d454f
refactor: Transition to a Value class
2024-09-04 09:59:26 +03:00
3475e3a130
refactor: Remove environment-related bloat
2024-09-04 09:59:15 +03:00
49b52d90a7
fix: wrappers cache compare objects with .equals and not ==
2024-04-21 11:03:00 +03:00
8a8de518a6
feat: make Function constructor
2024-04-20 23:44:02 +03:00
099201e4ad
refactor: remove testing junk in REPL
2024-04-20 22:23:45 +03:00
f8553b79f9
fix: run module in an isolated context
2024-04-20 22:22:55 +03:00
ba6462458c
fix: some fixes in the filesystem
2024-04-20 22:18:47 +03:00
e33cdbb172
fix: properties not applied to wrappers without constructor method
2024-04-13 01:03:34 +03:00
fc6ddf7d3c
feat: allow interface proxy wrappers
2024-04-12 16:37:06 +03:00
7f275095a2
fix: continue statement compiled incorrectly
2024-04-07 12:50:58 +03:00
6fb31be12c
fix(debugger): handle all errors when generating description
2024-04-07 12:33:26 +03:00
d6ede0b404
fix: incorrect toFixed behavior
2024-04-03 15:52:01 +03:00
71b40240c0
feat: add Number.toFixed
2024-04-03 15:09:01 +03:00
a8775d212f
fix: clean up extensions at some points
2024-04-03 14:52:29 +03:00
71872a8d64
fix
2024-04-03 14:25:14 +03:00
c707f880f7
fix: use Extensions instead of Environment
2024-04-03 14:21:23 +03:00
0d629a6e82
fix: use correct class instead of proxy
2024-04-03 12:27:15 +03:00
6eea342d04
fix: fuck
2024-04-02 18:24:43 +03:00
ece9cf68dc
fix: correctly update proto chain
2024-04-02 18:19:05 +03:00
11ecd8c68f
fix: exec debugger close logic on application exit
2024-04-02 18:05:49 +03:00
48bd304c6e
fix: environment forks fixes
2024-04-02 18:05:20 +03:00
d8e46c3149
fix: clone environment correctly
2024-03-31 16:11:32 +03:00
5fc5eb08f8
fix: update breakpoints when removing bp
2024-03-30 12:52:44 +02:00
8acbc003c4
fix: properly resolve breakpoints
2024-03-30 12:13:04 +02:00
fda33112a7
fix: load maps when attaching debugger
2024-03-30 11:13:45 +02:00
c291328cc3
fix: detach debugger after close
2024-03-30 10:22:12 +02:00
7cb267b0d9
fix: some issues with debugger
2024-03-30 09:55:20 +02:00
4e31766665
fix: add new vscode debugger functions
2024-03-29 21:53:15 +02:00
b5b63c4342
fix: make global cache of native wrappers
2024-03-28 16:08:07 +02:00
18f70a0d58
fix: i hate wrappers
2024-03-28 15:10:21 +02:00
d38b600366
fix: some more wrapper issues
2024-03-28 14:52:49 +02:00
0ac7af2ea3
fix: take into account empty classes
2024-03-28 14:21:23 +02:00
5185c93663
fix: don't include non-exposing wrappers in proto chain
...
feat: allow adding custom wrappers
2024-03-28 00:57:09 +02:00
510422cab7
feat: implement logic for exposing non-static fields
2024-03-27 23:39:33 +02:00
e0f3274a95
feat: add simple for-of loop (not intended for production usage)
2024-03-27 23:08:21 +02:00
5ba858545a
fix: defer handles of async functions
2024-03-09 00:28:30 +02:00
446ecd8f2b
fix: promise defers callback twice
2024-03-08 17:23:50 +02:00
b30f94de8f
refactor: move function pushMsg signatures in EventLoop
2024-03-08 16:53:47 +02:00
47b4dd3c15
refactor: rename code to runtime
2024-03-06 23:23:01 +02:00
0fb336373a
fix: make fs calls synchronized
2024-03-06 12:50:57 +02:00
b33325a98d
fix: clear buffer of line writer file
2024-03-05 17:10:06 +02:00
ccf75d6066
fix: don't use Context.NULL in global scope
2024-03-05 16:51:50 +02:00
3e6214659b
fix: use new global API
2024-03-05 15:54:51 +02:00
7c6622c53d
fix: separate scope records from scopes
2024-03-05 15:45:02 +02:00
70d5871091
fix: properly check permissions
2024-03-03 20:47:54 +02:00
7b9bbe576b
feat: add std streams as global variables
2024-03-03 20:31:20 +02:00
e6399c1546
refactor: remove unused var
2024-03-02 14:01:58 +02:00
c8253795b2
fix: make debugging work again
2024-03-02 13:56:48 +02:00
49dd725669
refactor: fully separate event loop from context
2024-02-29 00:23:14 +02:00
52489ad3a8
feat: separate compilation and runtime
2024-02-26 13:22:56 +02:00
c4d44547c8
fix: call move when passing same array to copyTo
2024-02-21 11:03:19 +02:00
c6dc031cfd
fix: respect return value of constructors
2024-02-21 11:01:33 +02:00
285960bdd6
refactor: rework fs error system
2024-02-09 13:46:57 +02:00
cf99845f6b
refactor: rework permission system
2024-01-13 11:05:43 +02:00
304665904f
feat: extract log API to console
2024-01-12 09:53:56 +02:00
46136e77e2
build: improve build scripts
2024-01-11 10:47:41 +02:00
e772f0b50d
feat: change custom build script to gradle
2024-01-11 09:56:50 +02:00
187ad55291
fix: fully remove typescript
2024-01-10 17:02:45 +02:00
8156a1733f
refactor: move debugging logic out of core
2024-01-10 17:01:24 +02:00
d1937fdb63
remove typescript
2024-01-10 16:51:40 +02:00
cfa0e001b9
refactor: split up code in 4 modules
2024-01-10 11:21:49 +02:00
c10d071346
feat: some API improvements
2024-01-10 11:21:35 +02:00
89eea7d62b
refactor: remove old useless exceptions
2024-01-06 19:51:48 +02:00
72a0d39d0b
fix: make java 11 compatible
2024-01-06 18:27:36 +02:00
d8585a20bf
refactor: don't require ctx in frame.push
2024-01-06 18:23:34 +02:00
e4c9a8756e
fix: debugger hanging sometimes
2024-01-06 18:23:20 +02:00
292ca64cb9
fix: wrong behavior in Number.toString (which somehow broke typescript)
2024-01-06 17:50:06 +02:00
0251c4689d
fix: use Values to access members in ObjectLib, instead of direct access
2024-01-06 17:49:27 +02:00
3173919b49
fix: implement proper parseInt logic
2024-01-06 17:48:35 +02:00
45f133c6b0
fix: use Values.call instead of direct calling
2024-01-06 17:48:10 +02:00
34276d720c
fix: remove sparse call arguments
2024-01-06 17:47:38 +02:00
2c634778c3
fix: report proper function name in String.length errors
2024-01-06 17:47:07 +02:00
4aa757e625
fix: Function.bind now passess this argument, instead of the function itself
2024-01-06 17:46:39 +02:00
918f2623cd
fix: small issue with sparse arrays
2024-01-06 17:46:13 +02:00
a321fc14bc
fix: wrong signature of Map.forEach
2024-01-06 17:45:56 +02:00
07a6f18b16
refactor: some spring cleaning in array lib, fix small issue with join
2024-01-06 17:45:52 +02:00
5f4011aa0c
refactor: move NO_RETURN to Values, remove some casters from Values
2024-01-06 17:45:44 +02:00
71f735b812
fix: some more libs fixes
2024-01-04 13:58:04 +02:00
e575b3287e
fix: try-catch-finally fix #457846982
2024-01-04 13:57:41 +02:00
4fa5f5a815
feat: use new wrapper API in libs
2024-01-04 10:02:14 +02:00
a61c6a494e
fix: some Argument and Engine API improvements,
2024-01-04 10:02:01 +02:00
978ee8db79
feat: make better native wrapper API
2023-12-28 16:55:57 +02:00
e372941e99
refactor: generalize Reading class
2023-12-27 20:18:41 +02:00
c36a0db860
refactor: remove more dead code
2023-12-27 20:18:23 +02:00
d6ee59363f
refactor: remove unneeded event system
2023-12-27 20:10:11 +02:00
d5fd6e650e
fix: clean up debugger API
2023-12-27 20:02:45 +02:00
c0b895e00a
feat: greatly improve Context API
2023-12-27 14:22:18 +02:00
9ea5cd9277
refactor: remove old Data API
2023-12-27 14:21:52 +02:00
aaf9a6fa45
fix: pass environment to compiler via simple environment wrapper
2023-12-27 13:59:19 +02:00
579f09c837
fix: pass arguments to regex constructor in LOAD_REGEX
2023-12-27 13:28:17 +02:00
3343262e72
fix: main now uses new env API
2023-12-27 13:16:21 +02:00
153a1a9a49
feat: readd permissions API via new env API
2023-12-27 13:16:12 +02:00
bf38587271
feat: readd module API via env API
2023-12-27 13:15:46 +02:00
21534efd60
feat: readd FS API via new env API
2023-12-27 13:14:46 +02:00
802f2f3f52
fix: access env via context
2023-12-27 13:14:09 +02:00
38acc20a6f
refactor: greatly improve Environment API
2023-12-26 17:12:20 +02:00
d7f6010319
fix: make code java 11 compatible
2023-12-26 14:22:35 +02:00
2f58f6b245
feat: implement basic module system
2023-12-26 14:12:41 +02:00
4bc363485f
fix: losts of FS API improvements
2023-12-26 14:02:32 +02:00
8e01db637b
fix: improve path resolutions and FS API
2023-12-26 11:27:40 +02:00
1c64912786
feat: create memory-light directory list file
2023-12-26 11:27:09 +02:00
28265a8f44
fix: some bug fixes and improvements with File interface
2023-12-26 11:26:08 +02:00
e9e020512e
fix: environment pushed when it shouldn't be
2023-12-24 15:17:38 +02:00
4b0bbf5190
fix: correctly convert virtual to real path
2023-12-24 14:40:27 +02:00
031f78ebf1
fix: don't include ts's code in repo anymore
2023-12-24 14:32:37 +02:00