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

1008 commits

Author SHA1 Message Date
Goffert van Gool
40d6daf824 Read version from Cargo.toml (#1267) 2018-12-13 16:16:58 -05:00
Tim Wang
07369a6270 Fix typo in errors.ts JSDoc 2018-12-13 15:36:15 -05:00
Ryan Dahl
79b4140a77 travis: remove use_sysroot 2018-12-13 14:36:37 -05:00
Allen Hai
b8202d2a02 fix typo on website 2018-12-12 18:26:51 -05:00
Bartek Iwańczuk
c2b91a3ef6 Flesh out open() modes (#1282) 2018-12-12 12:05:58 -05:00
Tnarita0000
e31866a60d Change default to false Base.bool 2018-12-12 11:44:56 -05:00
ggtmtmgg
6b8daf9f3f js_errors: rename source_url to script_name (#1329) 2018-12-12 11:44:13 -05:00
F001
e976b3e041 use byte array instead of string for code fetch (#1307) 2018-12-12 04:43:42 -05:00
Kevin (Kun) "Kassimo" Qian
65dd0d516d Simplify src fetch logic and auto append suffix in cache search (#1322) 2018-12-12 02:34:12 -05:00
Kevin (Kun) "Kassimo" Qian
8502cb0ccb Avoid Uint8Array.prototype throwing type error in console.log (#1327) 2018-12-12 02:32:24 -05:00
Kevin (Kun) "Kassimo" Qian
585de35b1d readDir entry mode (#1326) 2018-12-12 02:31:18 -05:00
Ryan Dahl
a8c3b44804 Remove custom panic handler.
This was introduced because Tokio would swallow panics. This is still
the case, but this panic handler causes more problems than it solves.
It requires people to know how to use debuggers to inspect stacktraces.

TODO:
- Fix Tokio to not swallow errors.
- Be vigilant in the intrim to not introduce broken tests due to this
  unfortunate "feature" of tokio.
2018-12-11 15:22:54 -05:00
Ryan Dahl
81c8926ee9 Use default filename for Isolate::execute. 2018-12-11 15:07:55 -05:00
Ryan Dahl
bba1a0d44a tools: remove_and_symlink can be skipped on unix
This is more optimial and this fixes a problem where occasionally
remove_and_symlink will error with:

    gen/compiler_bundle/main.js --sourcemapFile /Users/rld/src/deno --silent
    Traceback (most recent call last):
      File "../../tools/run_node.py", line 18, in <module>
        util.remove_and_symlink(target_rel, "node_modules", True)
      File "/Users/rld/src/deno/tools/util.py", line 103, in remove_and_symlink
        symlink(target, name, target_is_dir)
      File "/Users/rld/src/deno/tools/util.py", line 141, in symlink
        os.symlink(target, name)
    OSError: [Errno 17] File exists
2018-12-11 15:07:38 -05:00
Ryan Dahl
8d3e8b1c64 Remove dead code: ASSET_PREFIX 2018-12-11 15:06:56 -05:00
Ryan Dahl
acd9fa2298 deno_dir: move tests into submodule 2018-12-11 15:06:56 -05:00
Ryan Dahl
52079b26db Minor rename for CodeFetch parameters
This bring it inline with terminology used in V8
See ResolveCallback in v8.h
2018-12-11 15:06:56 -05:00
Ryan Dahl
f230734623 build: snapshot doesn't need source_map
Continuation of the work done in c113df.
2018-12-11 15:06:21 -05:00
F001
c1de50b0ca Replace blocking! macro by generic function (#1305) 2018-12-11 08:36:34 -05:00
Ryan Dahl
9a960b9f58
Use stderr for exceptions (#1303) 2018-12-10 17:50:41 -05:00
Kevin (Kun) "Kassimo" Qian
1548792fb3 Add more console types formatting support (#1299) 2018-12-10 12:01:02 -05:00
binaryta
c427c2df42 Add TooLarge error code for buffers (#1298)
In collaboration with @yushimatenjin
2018-12-09 15:38:30 -05:00
Kevin (Kun) "Kassimo" Qian
f2447f6a23 Add more profiling and debugging guides 2018-12-08 21:34:53 -05:00
Bert Belder
be2e5cce79
Track the master branch of the chromium_build repo 2018-12-08 01:09:58 +01:00
Bert Belder
8c86bc7205
build: manage win lld-link.exe thin archive flag with config("thin_archive") 2018-12-08 00:21:30 +01:00
Ryan Dahl
e6121762f8 v0.2.2
- Don't crash when .mime file not exist in cache (#1291)
- Process source maps in Rust instead of JS (#1280)
- Use alternate TextEncoder/TextDecoder implementation (#1281)
- Upgrade flatbuffers to 80d148
- Fix memory leaks (#1265, #1275)
2018-12-07 17:44:49 -05:00
Bartek Iwańczuk
ba429ccde8 Add benchmark for net/http (#1289) 2018-12-07 16:36:16 -05:00
Kevin (Kun) "Kassimo" Qian
0d3584cf46 Don't crash when .mime file not exist in cache (#1291) 2018-12-07 13:39:10 -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
Kitson Kelly
568ac0c902 Add ASCII support to TextDecoder 2018-12-06 18:45:10 -05:00
Kitson Kelly
6cc89b9e27 Use alternate TextEncoder/TextDecoder implementation (#1281)
This is faster and smaller.
2018-12-06 10:01:15 -08:00
F001
60c008d23b Isolate::from_raw_ptr and other cleanups.
`Isolate::from_void_ptr` is renamed to `from_raw_ptr`, to keep
consistency with std libs.

It is changed to `unsafe` function, because it can't guarantee that the
input is valid. This guarantee should be provided by the caller.

Its return type is changed to `&Isolate`, because `&mut Isolate` type
requires that no other aliases co-exist in this period of time, this
does not seem true. So I changed most of the methods to accept shared
reference `&Isolate`. It is easier to reason about the correctness of
`unsafe` blocks. As long as these shared references are in the same
thread, these `unsafe` codes are probably correct.
2018-12-05 00:14:53 -08:00
Ryan Dahl
45320beca8 Upgrade flatbuffers to 80d148 2018-12-04 17:22:52 -08:00
Ryan Dahl
d70b04c6d7
Add deno_config struct for isolate creation. (#1277)
In preperation for adding other callbacks to libdeno.
2018-12-04 15:06:20 -08:00
F001
30420ad317 Remove static lifetime bound in OpCreator (#1276)
The main purpose of this PR is to remove the `'static` lifetime bound in

type OpCreator =
  fn(state: &Arc<IsolateState>, base: &msg::Base, data: &'static mut [u8])
    -> Box<Op>;

The reason is simple: it is plain wrong, the `data` is actually not `'static`. It is created when the message is sent from C side, and will be recycled when the message is responded. It violates the definition of `'static` lifetime.

If someone save this pointer somewhere else, and reuse it later again, uninitialized memory could be accessed. This kind of memory unsafety does not happen yet because the logic is carefully organized in this project. Lifetime constraints are maintained by code convention. It could be more robust if we can express this constraint by Rust's type system.

Basic idea: tie buffer's lifetime to an object's lifetime, a.k.a, RAII. The type `deno_buf` is pretty suitable for this job.
2018-12-04 13:21:02 -08:00
Ryan Dahl
0bec0fa594 Remove leaks from snapshot_creator 2018-12-03 19:34:01 -08:00
F001
9e839b7e23 Avoid memory leak (#1265) 2018-12-03 19:07:34 -08:00
Kevin (Kun) "Kassimo" Qian
f6c841a6cd Turn off kPromiseResolvedAfterResolved warning 2018-12-03 16:30:08 -08:00
Ryan Dahl
8373046719 Add LSAN build to travis.
For now it only runs test_cc and has to filter out a test which leaks.
However we will expand this over time until the entire build is LSAN clean.
2018-12-03 15:31:06 -08:00
Ryan Dahl
f25220b2cf Fix test_cc memory leaks.
These were discovered using the LSAN.
http://dev.chromium.org/developers/testing/leaksanitizer
2018-12-03 15:31:06 -08:00
Ryan Dahl
b39f4c146e gn snapshot template's target_name should be target 2018-12-03 13:44:21 -08:00
Ryan Dahl
f727214db0 Use include_bytes! instead of incbin.
This is the second attempt at this patch. The first version was reverted
in 2ffd78daf9

The problem, I suspect, was that the snapshot was represented as a
source_set, which inserted a node into the dependency tree.
include_bytes does properly insert the snapshot into rustc's depfile but
the use of source_set confused gn. Now the that the deno executable has
the create_deno_snapshot as a direct dependency, changes will be
propagated.
2018-12-03 13:44:21 -08:00
Bert Belder
7d02971c2c
third_party: symlink //third_party/v8/build => //build 2018-12-03 12:14:05 -08:00
Bert Belder
6aa02f1fd9
.gitattributes: add symlink target types
This is a first step toward removing the fix_symlinks() hack from
tools/third_party.py.
2018-12-03 11:34:17 -08:00
Bert Belder
e5d1ac8074
.gitattributes: not all files are text 2018-12-03 11:33:58 -08:00
kyraNET
7c6479e28f feat: Support for bigints in console 2018-11-30 22:37:26 -08:00
Kyra
a05d9aaead doc: Remove TS and V8 versions from README file (#1258) 2018-11-30 22:36:48 -08:00
Ryan Dahl
5d161f366f Cargo and GN should build into same directory.
Currently gn builds into "target/debug"
however cargo tells gn to build into
"target/debug/build/deno-26d2b5325de0f0cf/out"
This patch changes it so that they both build into "target/debug".
2018-11-30 16:34:10 -08:00
Ryan Dahl
b5c6bfa0c8 v0.2.1
- Allow async functions in REPL (#1233)
- Handle Location header relative URI (#1240)
- Add deno.readAll() (#1234)
- Add Process.output (#1235)
- Upgrade to TypeScript 3.2.1
- Upgrade crates: tokio 0.1.13, hyper 0.12.16, ring 0.13.5
2018-11-30 16:28:27 -08:00
Ryan Dahl
b7178e1704 Upgrade Prettier to support BigInt syntax in TS 2018-11-30 16:26:53 -08:00