1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-01 09:24:20 -04:00
Commit graph

330 commits

Author SHA1 Message Date
Kitson Kelly
efa1eeb8b3 Compiler cleanups and minor improvements (#1656) 2019-02-02 18:27:53 -05:00
Ryan Dahl
18b815e336 Support --fmt 2019-02-02 17:48:43 -05:00
Kevin (Kun) "Kassimo" Qian
c144733f72 Avoid --info crash on missing filename (#1660) 2019-02-02 17:39:28 -05:00
Ryan Dahl
4b61170e22 Better error message for bad filename CLI argument. 2019-02-02 17:33:21 -05:00
Ryan Dahl
1770a77bca Clean up return value of deno_execute
and deno_respond
2019-02-02 16:46:31 -05:00
Kevin (Kun) "Kassimo" Qian
0b082c4361 Clarify writeFile options and avoid unexpected perm modification (#1643) 2019-02-02 14:26:18 -05:00
Kevin (Kun) "Kassimo" Qian
3650bae5f6 Add --info flag to display file info (compiled code/source map) (#1647) 2019-02-02 01:28:31 -05:00
Dmitry Sharshakov
16ed1f2545 Add performance.now (#1633) 2019-02-02 01:27:42 -05:00
Bert Belder
e5899b14e2
src: simplify rust code 2019-02-01 14:58:25 -08:00
Amen
0be9d1ff0e nit: add missing dot when printing help 2019-01-30 19:51:44 -05:00
Ryan Dahl
00597ffde1
Refactor libdeno ES module interface. (#1624)
Allows for future asynchronous module loading.

Add support for import.meta.url

Fixes #1496
2019-01-30 17:21:31 -05:00
JaePil Jung
dc09c3a65d Minor code cleanups (#1613) 2019-01-29 10:37:27 -05:00
Kitson Kelly
ee9c627cc5 Split out compiler snapshot (#1566)
Speeds up startup time, reduces runtime heap size.
2019-01-28 20:41:28 -05:00
bokuweb
aaaa35548e timers: use int instead of double for timeout type (#1469) 2019-01-26 22:10:38 +01:00
JaePil Jung
7f88b5fff3 Minor code cleanups (#1570) 2019-01-24 10:54:43 -05:00
Yoshiya Hinosawa
77114fbda4 chore: update license lines (#1557) 2019-01-21 13:03:30 -06:00
Kevin (Kun) "Kassimo" Qian
f9b167deb0 Avoid crashes on ES module resolution when module not found (#1546) 2019-01-18 15:15:09 -05:00
Ryan Dahl
315e4abd7e
mkdir should not be recursive by default (#1530)
It should return an error if a file with the given path exists and
recursive isn't specified.

Because mode is not used on windows and rarely used in unix, it is made
to the last parameter.

In collaboration with Stefan Dombrowski <sdo451@gmail.com>
2019-01-17 23:39:06 -05:00
Ryan Dahl
eb6f7f901b
Remove resolve_addr::tests::resolve_addr_err (#1531)
On some nameservers bad domain names still resolve.
2019-01-16 11:25:26 -05:00
wangcong
bc22dca2aa use upper case name for static variable c_rid (#1537) 2019-01-16 10:27:17 -05:00
Kevin (Kun) "Kassimo" Qian
431e455642 Kill all pending accepts when TCP listener is closed (#1517) 2019-01-15 20:36:51 -05:00
Kevin (Kun) "Kassimo" Qian
c870cf4082 Add --prefetch flag for deps prefetch without running (#1475) 2019-01-15 12:19:58 -05:00
Bert Belder
d8adeb41de Clippy fixes (also fixes build with nightly) (#1527) 2019-01-15 07:06:25 -05:00
Kevin (Kun) "Kassimo" Qian
f9c7c921af trim_left_matches (deprecated) => trim_start_matches (#1524) 2019-01-14 21:21:36 -05:00
Andy Hayden
526fdac053
Update to rust 2018 edition 2019-01-14 22:30:04 +01:00
Ryan Dahl
3c1a0ad19e
Properly parse network addresses. (#1515) 2019-01-13 22:14:59 -05:00
Bert Belder
69c370c5cc
src: remove dependency on the 'kernel32' crate 2019-01-14 02:18:18 +01:00
Kevin (Kun) "Kassimo" Qian
e29a676b78 Avoid show confusing lines in gen/bundle/main.js that throws error (#1502) 2019-01-12 09:14:09 -05:00
Ryan Dahl
6322f45e7b Pipe new exception info through into JSError
Adds a new integration test for syntax error.
2019-01-11 21:44:26 -05:00
Ryan Dahl
cca3a9562b
Re-enable --recompile (#1492) 2019-01-09 20:52:13 -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
3afdae165d
Add --allow-all flag (#1482) 2019-01-09 11:59:54 -05:00
Ryan Dahl
6f79ad721a
Minimal Worker support (#1476)
This adds the ability to spawn additional Isolates from Rust and send
and receive messages from them. This is preliminary work to support
running the typescript compiler in a separate isolate and thus support
native ES modules. Ref #975.
2019-01-08 14:44:06 -05:00
Ryan Dahl
9ff6bca863
Isolate::execute_mod wrap filename in CString (#1479)
When we called js_filename.as_ptr() without using CString it wasn't
necessarally null terminated, which was creating spurious failures.
2019-01-08 14:42:53 -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
57301909cd
Add deno.pid (#1464) 2019-01-06 14:16:42 -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
Ryan Dahl
a8d326b431
resolve_module: handle "." and ".." referrers (#1454) 2019-01-03 12:51:56 -05:00
Ryan Dahl
7024d9f253 Add rust binding and test for deno_execute_mod() 2019-01-03 09:45:40 -05:00
Ryan Dahl
d2b85d4904 Use camel-case for libdeno::deno_recv_cb
For better greppability and conformance with other symbols in libdeno.rs
2019-01-03 09:45:40 -05:00
Ryan Dahl
5b9c488921 Fix test js_error_apply_source_map_2
If the project is checked out into a directory not called "deno" this
test fails.
2019-01-03 05:41:51 -05:00
Ryan Dahl
2c477dd7cb Happy new year! 2019-01-02 02:37:08 +01:00
Kevin (Kun) "Kassimo" Qian
73fb98ce70 Lazily create .mime files only with mismatch/no extension (#1417) 2018-12-27 20:40:06 +00:00
Ryan Dahl
6cc998f28b
Remove support for extensionless import (#1396) 2018-12-23 11:44:08 -05:00
Yoshiya Hinosawa
bee55fcd20 make stdout unbuffered (#1355) 2018-12-22 23:53:29 -05:00
Kevin (Kun) "Kassimo" Qian
e4be1209b6 Avoid fetch segfault on empty Uri (#1394) 2018-12-21 04:47:09 -05:00
Bert Belder
3a31633041
log: bump default minimum log level to "warn" 2018-12-19 12:19:45 +01:00
Bert Belder
22874d44a6
build: fix RLS-invoked 'cargo check' build 2018-12-19 04:10:10 +01:00
F001
0bb43ebbfc remove repeative permission checks (#1350) 2018-12-14 03:29:17 -05:00
Ryan Dahl
9cfb533c83
Check that IsolateState is thread safe. (#1321) 2018-12-13 16:26:46 -05:00