2020-01-02 15:13:47 -05:00
|
|
|
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
|
2020-09-05 20:34:02 -04:00
|
|
|
|
2019-10-04 20:28:51 -04:00
|
|
|
use crate::js::CLI_SNAPSHOT;
|
|
|
|
use crate::js::COMPILER_SNAPSHOT;
|
2020-04-22 14:24:49 -04:00
|
|
|
use deno_core::Snapshot;
|
2020-01-05 11:56:18 -05:00
|
|
|
use deno_core::StartupData;
|
2019-06-23 07:49:49 -04:00
|
|
|
|
2019-04-08 10:12:43 -04:00
|
|
|
pub fn deno_isolate_init() -> StartupData<'static> {
|
2019-06-23 07:49:49 -04:00
|
|
|
debug!("Deno isolate init with snapshots.");
|
2019-09-02 17:07:11 -04:00
|
|
|
let data = CLI_SNAPSHOT;
|
2020-04-22 14:24:49 -04:00
|
|
|
StartupData::Snapshot(Snapshot::Static(data))
|
2019-03-04 18:09:35 -05:00
|
|
|
}
|
|
|
|
|
2019-06-23 07:49:49 -04:00
|
|
|
pub fn compiler_isolate_init() -> StartupData<'static> {
|
|
|
|
debug!("Deno isolate init with snapshots.");
|
2019-09-02 17:07:11 -04:00
|
|
|
let data = COMPILER_SNAPSHOT;
|
2020-04-22 14:24:49 -04:00
|
|
|
StartupData::Snapshot(Snapshot::Static(data))
|
2019-03-04 18:09:35 -05:00
|
|
|
}
|