fn create_compiler_worker(
  global_state: GlobalState,
  permissions: Permissions,
) -> CompilerWorker {
  // TODO(bartlomieju): these $deno$ specifiers should be unified for all subcommands
  // like 'eval', 'repl'
  let entry_point =
    ModuleSpecifier::resolve_url_or_path("./__$deno$ts_compiler.ts").unwrap();
  let worker_state = State::new(
    global_state.clone(),
    Some(permissions),
    entry_point,
    None,
    true,
  )
  .expect("Unable to create worker state");

  // TODO(bartlomieju): this metric is never used anywhere
  // Count how many times we start the compiler worker.
  global_state.compiler_starts.fetch_add(1, Ordering::SeqCst);

  let mut worker = CompilerWorker::new(
    "TS".to_string(),
    startup_data::compiler_isolate_init(),
    worker_state,
  );
  worker.execute("bootstrap.tsCompilerRuntime()").unwrap();
  worker
}
/// Create a new worker with snapshot of TS compiler and setup compiler's
/// runtime.
Create a new worker with snapshot of TS compiler and setup compiler's
runtime.
Create a new worker with snapshot of TS compiler and setup compiler ' s runtime .
fn create_compiler_worker(
  global_state: GlobalState,
  permissions: Permissions,
) -> CompilerWorker {
  // TODO(bartlomieju): these $deno$ specifiers should be unified for all subcommands
  // like 'eval', 'repl'
  let entry_point =
    ModuleSpecifier::resolve_url_or_path("./__$deno$ts_compiler.ts").unwrap();
  let worker_state = State::new(
    global_state.clone(),
    Some(permissions),
    entry_point,
    None,
    true,
  )
  .expect("Unable to create worker state");
  // TODO(bartlomieju): this metric is never used anywhere
  // Count how many times we start the compiler worker.
  global_state.compiler_starts.fetch_add(1, Ordering::SeqCst);
  let mut worker = CompilerWorker::new(
    "TS".to_string(),
    startup_data::compiler_isolate_init(),
    worker_state,
  );
  worker.execute("bootstrap.tsCompilerRuntime()").unwrap();
  worker
}
fn create_compiler_worker ( global_state : GlobalState , permissions : Permissions , ) -> CompilerWorker { // TODO(bartlomieju): these $deno$ specifiers should be unified for all subcommands // like 'eval', 'repl' let entry_point = ModuleSpecifier :: resolve_url_or_path ( " " ) . unwrap ( ) ; let worker_state = State :: new ( global_state . clone ( ) , Some ( permissions ) , entry_point , None , true , ) . expect ( " " ) ; // TODO(bartlomieju): this metric is never used anywhere // Count how many times we start the compiler worker. global_state . compiler_starts . fetch_add ( 1 , Ordering :: SeqCst ) ; let mut worker = CompilerWorker :: new ( " " . to_string ( ) , startup_data :: compiler_isolate_init ( ) , worker_state , ) ; worker . execute ( " " ) . unwrap ( ) ; worker }
Create a new worker with snapshot of TS compiler and setup compiler's
runtime.
Create a new worker with snapshot of TS compiler and setup compiler ' s runtime .
global_state
GlobalState
permissions
Permissions
global_state
GlobalState
permissions
Permissions