mirror of
https://github.com/denoland/deno.git
synced 2025-08-04 02:48:24 +00:00
refactor(core): move op cache sync responsibility to rust space (#10340)
Even if bootstrapping the JS runtime is low level, it's an abstraction leak of core to require users to call `Deno.core.ops()` in JS space. So instead we're introducing a `JsRuntime::sync_ops_cache()` method, once we have runtime extensions a new runtime will ensure the ops cache is setup (for the provided extensions) and then loading/unloading plugins should be the only operations that require op cache syncs
This commit is contained in:
parent
1c7164257d
commit
83bece56b0
17 changed files with 31 additions and 51 deletions
|
@ -778,7 +778,6 @@ delete Object.prototype.__proto__;
|
|||
}
|
||||
hasStarted = true;
|
||||
languageService = ts.createLanguageService(host);
|
||||
core.ops();
|
||||
setLogDebug(debugFlag, "TSLS");
|
||||
debug("serverInit()");
|
||||
}
|
||||
|
@ -793,13 +792,9 @@ delete Object.prototype.__proto__;
|
|||
throw new Error("The compiler runtime already started.");
|
||||
}
|
||||
hasStarted = true;
|
||||
core.ops();
|
||||
setLogDebug(!!debugFlag, "TS");
|
||||
}
|
||||
|
||||
// Setup the compiler runtime during the build process.
|
||||
core.ops();
|
||||
|
||||
// A build time only op that provides some setup information that is used to
|
||||
// ensure the snapshot is setup properly.
|
||||
/** @type {{ buildSpecifier: string; libs: string[] }} */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue