summaryrefslogtreecommitdiff
path: root/libdeno/binding.cc
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2018-10-25 11:00:14 -0400
committerRyan Dahl <ry@tinyclouds.org>2018-11-05 13:26:54 -0800
commitb3400d822f6e9a1100e693cc06cd09c8249d4422 (patch)
treec93f4119d3e911f6201b827b13c1f7528f8892a7 /libdeno/binding.cc
parent27ecfc1617c79d23255e025fcbd0257b3523906a (diff)
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
Diffstat (limited to 'libdeno/binding.cc')
-rw-r--r--libdeno/binding.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/libdeno/binding.cc b/libdeno/binding.cc
index 6cf0a7a21..999ccac47 100644
--- a/libdeno/binding.cc
+++ b/libdeno/binding.cc
@@ -521,13 +521,6 @@ void InitializeContext(v8::Isolate* isolate, v8::Local<v8::Context> context,
.FromJust());
{
- auto source = deno::v8_str(js_source);
- CHECK(
- deno_val->Set(context, deno::v8_str("mainSource"), source).FromJust());
-
- bool r = deno::ExecuteV8StringSource(context, js_filename, source);
- CHECK(r);
-
if (source_map != nullptr) {
v8::TryCatch try_catch(isolate);
v8::ScriptOrigin origin(v8_str("set_source_map.js"));
@@ -551,6 +544,13 @@ void InitializeContext(v8::Isolate* isolate, v8::Local<v8::Context> context,
source_map_obj.ToLocalChecked())
.FromJust());
}
+
+ auto source = deno::v8_str(js_source);
+ CHECK(
+ deno_val->Set(context, deno::v8_str("mainSource"), source).FromJust());
+
+ bool r = deno::ExecuteV8StringSource(context, js_filename, source);
+ CHECK(r);
}
}