summaryrefslogtreecommitdiff
path: root/js/error_stack.ts
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2019-08-21 20:42:48 -0400
committerGitHub <noreply@github.com>2019-08-21 20:42:48 -0400
commitbdc97b3976786bb744a27e59b0f4f28554a682df (patch)
treebf4635ad903de542c10620e95adb72eee03d9204 /js/error_stack.ts
parentb764d1b8ffc4bf5e2ab89bdbd978d708a6da0f24 (diff)
Organize dispatch a bit (#2796)
Just some clean up reorganization around flatbuffer/minimal dispatch code. This is prep for adding a JSON dispatcher.
Diffstat (limited to 'js/error_stack.ts')
-rw-r--r--js/error_stack.ts6
1 files changed, 2 insertions, 4 deletions
diff --git a/js/error_stack.ts b/js/error_stack.ts
index e97020687..003717a72 100644
--- a/js/error_stack.ts
+++ b/js/error_stack.ts
@@ -2,9 +2,7 @@
// Some of the code here is adapted directly from V8 and licensed under a BSD
// style license available here: https://github.com/v8/v8/blob/24886f2d1c565287d33d71e4109a53bf0b54b75c/LICENSE.v8
-import * as msg from "gen/cli/msg_generated";
-import * as flatbuffers from "./flatbuffers";
-import * as dispatch from "./dispatch";
+import { sendSync, msg, flatbuffers } from "./dispatch_flatbuffers";
import { assert } from "./util";
export interface Location {
@@ -77,7 +75,7 @@ function res(baseRes: msg.Base | null): Location {
*/
export function applySourceMap(location: Location): Location {
const { filename, line, column } = location;
- return res(dispatch.sendSync(...req(filename, line, column)));
+ return res(sendSync(...req(filename, line, column)));
}
/** Mutate the call site so that it returns the location, instead of its