1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-01 16:51:13 -05:00
Commit graph

47 commits

Author SHA1 Message Date
Kitson Kelly
ee9c627cc5 Split out compiler snapshot (#1566)
Speeds up startup time, reduces runtime heap size.
2019-01-28 20:41:28 -05:00
Kitson Kelly
7d08db2191 Fix JSON Modules (#1514) 2019-01-14 00:18:42 -05:00
Kitson Kelly
de9c67a702 Cleanup compiler and re-enable tests (#1512) 2019-01-13 23:44:11 -05:00
Ryan Dahl
0ceb554343
Native ES modules (#1460)
* Native ES modules

This is a major refactor of internal compiler.

Before: JS and TS both were sent through the typescript compiler where
their imports were parsed and handled. Both compiled to AMD JS and
finally sent to V8

Now: JS is sent directly into V8. TS is sent through the typescript
compiler, but tsc generates ES modules now instead of AMD. This
generated JS is then dumped into V8.

This should much faster for pure JS code. It may improve TS compilation
speed.

In the future this allows us to separate TS out of the runtime heap and
into its own dedicated snapshot. This will result in a smaller runtime
heap, and thus should be faster.

Some tests were unfortunately disabled to ease landing this patch:
1. compiler_tests.ts which I intend to bring back in later commits.
2. Some text_encoding_test.ts tests which made the file invalid utf8.
   See PR for a discussion.
Also worth noting that this is necessary to support WASM
2019-01-09 12:59:46 -05:00
Ryan Dahl
f37d67e809
Revert "Split Runner from Compiler" (#1462)
This reverts commit 3d03f5b0cb.
2019-01-06 14:17:13 -05:00
Ryan Dahl
ea6c9f2f36
Revert "use byte array instead of string for code fetch (#1307)" (#1455)
This reverts commit e976b3e041.

There is nothing technically wrong with this commit, but it's adding
complexity to a big refactor (native ES modules #975). Since it's not
necessary and simply a philosophical preference, I will revert for now
and try to bring it back later.
2019-01-03 22:11:01 -05:00
Satya Rohith
6be1164d89 Remove assertion for empty modules (#1450) 2019-01-03 22:09:07 -05:00
Ryan Dahl
2c477dd7cb Happy new year! 2019-01-02 02:37:08 +01:00
F001
e976b3e041 use byte array instead of string for code fetch (#1307) 2018-12-12 04:43:42 -05:00
Ryan Dahl
c113df1bb8
Process source maps in Rust instead of JS (#1280)
- Improves speed and binary size significantly.
- Makes deno_last_exception() output a JSON structure.
- Isolate::execute and Isolate::event_loop now return
  structured, mapped JSError objects on errors.
- Removes libdeno functions:
  libdeno.setGlobalErrorHandler()
  libdeno.setPromiseRejectHandler()
  libdeno.setPromiseErrorExaminer()

In collaboration with Ryan Dahl.
2018-12-06 23:05:36 -05:00
Ryan Dahl
b7178e1704 Upgrade Prettier to support BigInt syntax in TS 2018-11-30 16:26:53 -08:00
Kitson Kelly
3d03f5b0cb Split Runner from Compiler 2018-11-20 08:46:56 -08:00
Kitson Kelly
34b6b86c76 Ensure global type instances are available. 2018-11-09 08:39:49 -08:00
Kitson Kelly
f477b45a0a Improve preparing stack traces 2018-11-06 06:37:16 -08:00
Ryan Dahl
b3400d822f Decode main.js.map during snapshotting.
Pro:
time ./out/debug/deno tests/error_001.ts  3.0s -> 0.4s

Con:
time ./tool/build.py snapshot              33s -> 1m52s
out/debug/gen/snapshot_deno.bin            39M -> 121M
2018-11-05 13:26:54 -08:00
Kitson Kelly
7f8284addf Fix performance regression with JSON Modules 2018-11-01 19:33:18 -07:00
Kitson Kelly
2422e52625 Add ability to load JSON as modules (#1065) 2018-10-30 20:50:40 -07:00
Kitson Kelly
8b39d2c99e Separate source map from output code. 2018-10-29 08:16:35 -07:00
Kitson Kelly
2cfa608324 Support CheckJS 2018-10-24 15:29:30 -07:00
Ryan Dahl
5cf37c2f20 Revert "Support CheckJS"
Broken in master.

This reverts commit dd230d520b.
2018-10-23 07:07:17 -07:00
Kitson Kelly
dd230d520b Support CheckJS 2018-10-23 06:01:11 -07:00
Kitson Kelly
8ef7da2611 Enforce media types 2018-10-23 04:48:00 -07:00
Kitson Kelly
10a97679ac Align JSDoc to style guide. 2018-10-14 17:38:23 -04:00
Kitson Kelly
ec402c6932 Replace globals.d.ts with lib.deno_runtime.d.ts 2018-10-11 20:29:43 -04:00
Kitson Kelly
6c42ded097 Hide compiler module (#909)
Fixes #876
2018-10-05 10:13:22 -04:00
Ryan Dahl
2f44db6756 Use underscores in filenames. 2018-10-04 00:25:55 -04:00
Ryan Dahl
b1d9014b5b Print 'Compiling' when compiling TS. 2018-09-27 17:34:51 -04:00
Ryan Dahl
7fb2821937 format 2018-09-25 17:02:49 -04:00
Bartek Iwańczuk
3fe4be07ca Add flag --recompile (#801) 2018-09-24 15:33:50 -04:00
Ryan Dahl
e2a285b871 Better NotFound error handling in CodeFetch
throwResolutionError was swallowing unrelated errors.
2018-09-09 23:12:22 -04:00
Daniel Ramos
b7ebc1b699 Add type aliases for sourceCode and outputCode 2018-09-09 10:51:15 -04:00
Kitson Kelly
9101fd1493 Cleanup public API of DenoCompiler 2018-09-06 18:31:32 -04:00
Kitson Kelly
11aef6e107 Integrate format diagnostic host in DenoCompiler 2018-09-06 18:31:32 -04:00
Kitson Kelly
1e709aa348 Fix TypeScript exports in bundle 2018-09-06 11:04:56 -04:00
Mirko Jotic
fcdfacc2de Implementing --deps flag
- Adding a ModuleId type alias to specify original url or local file of
dependency
- Modifying ModuleMetaData class to contain ModuleId
- Adding a --deps flag
2018-09-06 10:42:07 -04:00
Kitson Kelly
10dc71133a Mark APIs at internal and include JSDoc in types 2018-09-05 08:45:55 -04:00
Ryan Dahl
787832c68e Format. 2018-09-03 10:45:58 -04:00
Kitson Kelly
739ef6a8ec Fix circular dependencies 2018-09-02 11:28:45 -04:00
ShinDarth
bbc4e55bda Minor code refactoring 2018-09-01 21:59:52 -04:00
Kitson Kelly
b3dac82887 Remove lib.globals.d.ts 2018-09-01 15:06:03 -04:00
Kitson Kelly
f83aee02e6 Bundle most types into globals.d.ts (#642) 2018-09-01 10:45:26 -04:00
Kitson Kelly
634a9e3932 Updates to compiler.ts comments and logging. 2018-08-28 08:44:34 -04:00
Kitson Kelly
54aefa2886 Two-pass module evaluation.
Plus changes to tests to accomodate.
2018-08-28 08:44:34 -04:00
Francesco Borzì
84c38f34ee Prevent circular imports in ts code (#576) 2018-08-25 15:42:49 -04:00
Kitson Kelly
c003df53ab Integrate ScriptSnapshot into ModuleMetaData 2018-08-24 17:16:54 -04:00
Kitson Kelly
59231d74b5 Improve DenoCompiler.makeDefine and localRequire 2018-08-23 17:55:22 -04:00
Ryan Dahl
e7cab71574
runtime.ts refactor into compiler.ts (#564)
Adds compiler_test.ts
2018-08-22 17:17:26 -04:00