Clean up how we use opIds (#4118)

This commit is contained in:
Ryan Dahl 2020-02-25 09:14:27 -05:00 committed by GitHub
parent 805992b14a
commit 91b606aaae
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
74 changed files with 367 additions and 589 deletions

View file

@ -1,7 +1,6 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
// 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 dispatch from "./dispatch.ts";
import { sendSync } from "./dispatch_json.ts";
import { assert } from "./util.ts";
import { exposeForTest } from "./internals.ts";
@ -44,7 +43,7 @@ export function applySourceMap(location: Location): Location {
const { filename, line, column } = location;
// On this side, line/column are 1 based, but in the source maps, they are
// 0 based, so we have to convert back and forth
const res = sendSync(dispatch.OP_APPLY_SOURCE_MAP, {
const res = sendSync("op_apply_source_map", {
filename,
line: line - 1,
column: column - 1