Commit c5f87848 authored by Danylo Boiko's avatar Danylo Boiko Committed by V8 LUCI CQ

[turbolizer] Initial TS code refactoring

- basic file movement
- dependencies update
- grammar fix
- refactoring common files (from new folder 'common')

Change-Id: Ie47d565202aefe247ef6fd9e64108926e467d533
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3695385Reviewed-by: 's avatarTobias Tebbi <tebbi@chromium.org>
Commit-Queue: Danylo Boiko <danielboyko02@gmail.com>
Cr-Commit-Position: refs/heads/main@{#81050}
parent fb235844
...@@ -2276,7 +2276,7 @@ std::ostream& operator<<(std::ostream& out, const InstructionRangesAsJSON& s) { ...@@ -2276,7 +2276,7 @@ std::ostream& operator<<(std::ostream& out, const InstructionRangesAsJSON& s) {
need_comma = true; need_comma = true;
} }
out << "}"; out << "}";
out << ", \"blockIdtoInstructionRange\": {"; out << ", \"blockIdToInstructionRange\": {";
need_comma = false; need_comma = false;
for (auto block : s.sequence->instruction_blocks()) { for (auto block : s.sequence->instruction_blocks()) {
if (need_comma) out << ", "; if (need_comma) out << ", ";
......
This diff is collapsed.
{ {
"name": "turbolizer", "name": "turbolizer",
"version": "0.1.0", "version": "0.1.1",
"description": "Visualization tool for V8 TurboFan IR graphs", "description": "Visualization tool for V8 TurboFan IR graphs",
"scripts": { "scripts": {
"build": "rollup -c", "build": "rollup -c",
...@@ -13,22 +13,23 @@ ...@@ -13,22 +13,23 @@
"author": "The V8 team", "author": "The V8 team",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@types/d3": "^5.7.2", "@types/d3": "^5.16.0",
"d3": "^5.7.0", "d3": "^5.16.0",
"rollup-plugin-node-resolve": "^4.0.0", "rollup-plugin-node-resolve": "^4.0.0",
"rollup-plugin-typescript2": "^0.20.1" "rollup-plugin-typescript2": "^0.32.1"
}, },
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://github.com/v8/v8.git" "url": "https://github.com/v8/v8.git"
}, },
"devDependencies": { "devDependencies": {
"chai": "^4.2.0", "@types/node": "^17.0.41",
"local-web-server": "^2.6.0", "chai": "^4.3.6",
"mocha": "^5.2.0", "local-web-server": "^5.2.1",
"rollup": "^0.68.2", "mocha": "^10.0.0",
"ts-mocha": "^2.0.0", "rollup": "^2.75.6",
"tslint": "^5.12.0", "ts-mocha": "^10.0.0",
"typescript": "^3.2.2" "tslint": "^5.20.1",
"typescript": "^4.7.3"
} }
} }
...@@ -2,18 +2,16 @@ ...@@ -2,18 +2,16 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
import typescript from 'rollup-plugin-typescript2'; import typescript from "rollup-plugin-typescript2";
import node from 'rollup-plugin-node-resolve'; import node from "rollup-plugin-node-resolve";
import path from 'path'; import path from "path";
const onwarn = warning => { const warningHandler = (warning) => {
// Silence circular dependency warning for moment package // Silence circular dependency warning for moment package
const node_modules = path.normalize('node_modules/'); const node_modules = path.normalize('node_modules/');
if (warning.code === 'CIRCULAR_DEPENDENCY' && if (warning.code === 'CIRCULAR_DEPENDENCY' && warning.importer.indexOf(node_modules)) {
!warning.importer.indexOf(node_modules)) { return;
return
} }
console.warn(`(!) ${warning.message}`) console.warn(`(!) ${warning.message}`)
} }
...@@ -27,5 +25,5 @@ export default { ...@@ -27,5 +25,5 @@ export default {
format: "iife", format: "iife",
sourcemap: true sourcemap: true
}, },
onwarn: onwarn onwarn: warningHandler
}; };
...@@ -4,22 +4,22 @@ ...@@ -4,22 +4,22 @@
export const MAX_RANK_SENTINEL = 0; export const MAX_RANK_SENTINEL = 0;
export const GRAPH_MARGIN = 250; export const GRAPH_MARGIN = 250;
export const SOURCE_PANE_ID = 'left'; export const SOURCE_PANE_ID = "left";
export const SOURCE_COLLAPSE_ID = 'source-shrink'; export const SOURCE_COLLAPSE_ID = "source-shrink";
export const SOURCE_EXPAND_ID = 'source-expand'; export const SOURCE_EXPAND_ID = "source-expand";
export const INTERMEDIATE_PANE_ID = 'middle'; export const INTERMEDIATE_PANE_ID = "middle";
export const GRAPH_PANE_ID = 'graph'; export const GRAPH_PANE_ID = "graph";
export const SCHEDULE_PANE_ID = 'schedule'; export const SCHEDULE_PANE_ID = "schedule";
export const GENERATED_PANE_ID = 'right'; export const GENERATED_PANE_ID = "right";
export const DISASSEMBLY_PANE_ID = 'disassembly'; export const DISASSEMBLY_PANE_ID = "disassembly";
export const DISASSEMBLY_COLLAPSE_ID = 'disassembly-shrink'; export const DISASSEMBLY_COLLAPSE_ID = "disassembly-shrink";
export const DISASSEMBLY_EXPAND_ID = 'disassembly-expand'; export const DISASSEMBLY_EXPAND_ID = "disassembly-expand";
export const RANGES_PANE_ID = "ranges"; export const RANGES_PANE_ID = "ranges";
export const RANGES_COLLAPSE_VERT_ID = "ranges-shrink-vert"; export const RANGES_COLLAPSE_VERT_ID = "ranges-shrink-vert";
export const RANGES_EXPAND_VERT_ID = "ranges-expand-vert"; export const RANGES_EXPAND_VERT_ID = "ranges-expand-vert";
export const RANGES_COLLAPSE_HOR_ID = "ranges-shrink-hor"; export const RANGES_COLLAPSE_HOR_ID = "ranges-shrink-hor";
export const RANGES_EXPAND_HOR_ID = "ranges-expand-hor"; export const RANGES_EXPAND_HOR_ID = "ranges-expand-hor";
export const UNICODE_BLOCK = '&#9611;'; export const UNICODE_BLOCK = "&#9611;";
export const PROF_COLS = [ export const PROF_COLS = [
{ perc: 0, col: { r: 255, g: 255, b: 255 } }, { perc: 0, col: { r: 255, g: 255, b: 255 } },
{ perc: 0.5, col: { r: 255, g: 255, b: 128 } }, { perc: 0.5, col: { r: 255, g: 255, b: 128 } },
......
...@@ -3,80 +3,39 @@ ...@@ -3,80 +3,39 @@
// found in the LICENSE file. // found in the LICENSE file.
export function anyToString(x: any): string { export function anyToString(x: any): string {
return "" + x; return `${x}`;
} }
function computeScrollTop(container, element) { export function sortUnique<T>(arr: Array<T>, f: (a: T, b: T) => number, equal: (a: T, b: T) => boolean): Array<T> {
const height = container.offsetHeight;
const margin = Math.floor(height / 4);
const pos = element.offsetTop;
const currentScrollTop = container.scrollTop;
if (pos < currentScrollTop + margin) {
return Math.max(0, pos - margin);
} else if (pos > (currentScrollTop + 3 * margin)) {
return Math.max(0, pos - 3 * margin);
}
return pos;
}
export class ViewElements {
container: HTMLElement;
scrollTop: number;
constructor(container: HTMLElement) {
this.container = container;
this.scrollTop = undefined;
}
consider(element, doConsider) {
if (!doConsider) return;
const newScrollTop = computeScrollTop(this.container, element);
if (isNaN(newScrollTop)) {
console.log("NOO");
}
if (this.scrollTop === undefined) {
this.scrollTop = newScrollTop;
} else {
this.scrollTop = Math.min(this.scrollTop, newScrollTop);
}
}
apply(doApply) {
if (!doApply || this.scrollTop === undefined) return;
this.container.scrollTop = this.scrollTop;
}
}
export function sortUnique<T>(arr: Array<T>, f: (a: T, b: T) => number, equal: (a: T, b: T) => boolean) {
if (arr.length == 0) return arr; if (arr.length == 0) return arr;
arr = arr.sort(f); arr = arr.sort(f);
const ret = [arr[0]]; const uniqueArr = [arr[0]];
for (let i = 1; i < arr.length; i++) { for (let i = 1; i < arr.length; i++) {
if (!equal(arr[i - 1], arr[i])) { if (!equal(arr[i - 1], arr[i])) {
ret.push(arr[i]); uniqueArr.push(arr[i]);
} }
} }
return ret; return uniqueArr;
} }
// Partial application without binding the receiver // Partial application without binding the receiver
export function partial(f: any, ...arguments1: Array<any>) { export function partial(func: any, ...arguments1: Array<any>) {
return function (this: any, ...arguments2: Array<any>) { return function (this: any, ...arguments2: Array<any>) {
f.apply(this, [...arguments1, ...arguments2]); func.apply(this, [...arguments1, ...arguments2]);
}; };
} }
export function isIterable(obj: any): obj is Iterable<any> { export function isIterable(obj: any): obj is Iterable<any> {
return obj != null && obj != undefined return obj !== null && obj !== undefined
&& typeof obj != 'string' && typeof obj[Symbol.iterator] === 'function'; && typeof obj !== "string" && typeof obj[Symbol.iterator] === "function";
} }
export function alignUp(raw: number, multiple: number): number { export function alignUp(raw: number, multiple: number): number {
return Math.floor((raw + multiple - 1) / multiple) * multiple; return Math.floor((raw + multiple - 1) / multiple) * multiple;
} }
export function measureText(text: string) { export function measureText(text: string): { width: number, height: number } {
const textMeasure = document.getElementById('text-measure'); const textMeasure = document.getElementById("text-measure");
if (textMeasure instanceof SVGTSpanElement) { if (textMeasure instanceof SVGTSpanElement) {
textMeasure.textContent = text; textMeasure.textContent = text;
return { return {
...@@ -88,13 +47,13 @@ export function measureText(text: string) { ...@@ -88,13 +47,13 @@ export function measureText(text: string) {
} }
// Interpolate between the given start and end values by a fraction of val/max. // Interpolate between the given start and end values by a fraction of val/max.
export function interpolate(val: number, max: number, start: number, end: number) { export function interpolate(val: number, max: number, start: number, end: number): number {
return start + (end - start) * (val / max); return start + (end - start) * (val / max);
} }
export function createElement(tag: string, cls: string, content?: string) { export function createElement(tag: string, cls: string, content?: string): HTMLElement {
const el = document.createElement(tag); const el = document.createElement(tag);
el.className = cls; el.className = cls;
if (content != undefined) el.innerText = content; if (content !== undefined) el.innerText = content;
return el; return el;
} }
// Copyright 2022 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
export class ViewElements {
container: HTMLElement;
scrollTop: number;
constructor(container: HTMLElement) {
this.container = container;
this.scrollTop = undefined;
}
public consider(element: HTMLElement, doConsider: boolean): void {
if (!doConsider) return;
const newScrollTop = this.computeScrollTop(element);
if (isNaN(newScrollTop)) {
console.warn("New scroll top value is NaN");
}
if (this.scrollTop === undefined) {
this.scrollTop = newScrollTop;
} else {
this.scrollTop = Math.min(this.scrollTop, newScrollTop);
}
}
public apply(doApply: boolean): void {
if (!doApply || this.scrollTop === undefined) return;
this.container.scrollTop = this.scrollTop;
}
private computeScrollTop(element: HTMLElement): number {
const height = this.container.offsetHeight;
const margin = Math.floor(height / 4);
const pos = element.offsetTop;
const currentScrollTop = this.container.scrollTop;
if (pos < currentScrollTop + margin) {
return Math.max(0, pos - margin);
} else if (pos > (currentScrollTop + 3 * margin)) {
return Math.max(0, pos - 3 * margin);
}
return pos;
}
}
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
import { GNode, MINIMUM_EDGE_SEPARATION, DEFAULT_NODE_BUBBLE_RADIUS } from "../src/node"; import { GNode, MINIMUM_EDGE_SEPARATION, DEFAULT_NODE_BUBBLE_RADIUS } from "./node";
import { Graph } from "./graph"; import { Graph } from "./graph";
const BEZIER_CONSTANT = 0.3; const BEZIER_CONSTANT = 0.3;
......
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
import { MAX_RANK_SENTINEL } from "../src/constants"; import { MAX_RANK_SENTINEL } from "./common/constants";
import { Edge } from "../src/edge"; import { Edge } from "./edge";
import { GNode, MINIMUM_EDGE_SEPARATION, NODE_INPUT_WIDTH, MINIMUM_NODE_OUTPUT_APPROACH, DEFAULT_NODE_BUBBLE_RADIUS } from "../src/node"; import { GNode, MINIMUM_EDGE_SEPARATION, NODE_INPUT_WIDTH, MINIMUM_NODE_OUTPUT_APPROACH, DEFAULT_NODE_BUBBLE_RADIUS } from "./node";
import { Graph } from "./graph"; import { Graph } from "./graph";
const DEFAULT_NODE_ROW_SEPARATION = 150; const DEFAULT_NODE_ROW_SEPARATION = 150;
......
...@@ -2,12 +2,12 @@ ...@@ -2,12 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
import { GraphView } from "../src/graph-view"; import { GraphView } from "./views/graph-view";
import { ScheduleView } from "../src/schedule-view"; import { ScheduleView } from "./views/schedule-view";
import { SequenceView } from "../src/sequence-view"; import { SequenceView } from "./views/sequence-view";
import { SourceResolver } from "../src/source-resolver"; import { SourceResolver } from "./source-resolver";
import { SelectionBroker } from "../src/selection-broker"; import { SelectionBroker } from "./selection/selection-broker";
import { View, PhaseView } from "../src/view"; import { View, PhaseView } from "./views/view";
import { GNode } from "./node"; import { GNode } from "./node";
const multiviewID = "multiview"; const multiviewID = "multiview";
......
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
import { Edge } from "../src/edge"; import { Edge } from "./edge";
import { NodeLabel } from "./node-label"; import { NodeLabel } from "./node-label";
import { MAX_RANK_SENTINEL } from "./constants"; import { MAX_RANK_SENTINEL } from "./common/constants";
import { alignUp, measureText } from "./util"; import { alignUp, measureText } from "./common/util";
export const DEFAULT_NODE_BUBBLE_RADIUS = 12; export const DEFAULT_NODE_BUBBLE_RADIUS = 12;
export const NODE_INPUT_WIDTH = 50; export const NODE_INPUT_WIDTH = 50;
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
// found in the LICENSE file. // found in the LICENSE file.
import * as d3 from "d3"; import * as d3 from "d3";
import * as C from "../src/constants"; import * as C from "./common/constants";
class Snapper { class Snapper {
resizer: Resizer; resizer: Resizer;
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
import { SourceResolver, sourcePositionValid } from "../src/source-resolver"; import { SourceResolver, sourcePositionValid } from "../source-resolver";
import { ClearableHandler, SelectionHandler, NodeSelectionHandler, BlockSelectionHandler, InstructionSelectionHandler, RegisterAllocationSelectionHandler } from "../src/selection-handler"; import { ClearableHandler, SelectionHandler, NodeSelectionHandler, BlockSelectionHandler, InstructionSelectionHandler, RegisterAllocationSelectionHandler } from "./selection-handler";
export class SelectionBroker { export class SelectionBroker {
sourceResolver: SourceResolver; sourceResolver: SourceResolver;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
import { GNode } from "./node"; import { GNode } from "../node";
export class MySelection { export class MySelection {
selection: any; selection: any;
...@@ -45,8 +45,8 @@ export class MySelection { ...@@ -45,8 +45,8 @@ export class MySelection {
return this.selection.has(key); return this.selection.has(key);
} }
selectedKeys() { selectedKeys(): Set<string> {
const result = new Set(); const result = new Set<string>();
for (const i of this.selection.keys()) { for (const i of this.selection.keys()) {
result.add(i); result.add(i);
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
import { sortUnique, anyToString } from "../src/util"; import { sortUnique, anyToString } from "./common/util";
import { NodeLabel } from "./node-label"; import { NodeLabel } from "./node-label";
function sourcePositionLe(a, b) { function sourcePositionLe(a, b) {
......
// Copyright 2022 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
export class Tabs { export class Tabs {
private container: HTMLElement; private container: HTMLElement;
......
...@@ -2,15 +2,15 @@ ...@@ -2,15 +2,15 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
import { SourceResolver } from "../src/source-resolver"; import * as C from "./common/constants";
import { SelectionBroker } from "../src/selection-broker"; import { SourceResolver } from "./source-resolver";
import { DisassemblyView } from "../src/disassembly-view"; import { SelectionBroker } from "./selection/selection-broker";
import { GraphMultiView } from "../src/graphmultiview"; import { DisassemblyView } from "./views/disassembly-view";
import { CodeMode, CodeView } from "../src/code-view"; import { GraphMultiView } from "./graphmultiview";
import { Tabs } from "../src/tabs"; import { CodeMode, CodeView } from "./views/code-view";
import { Resizer } from "../src/resizer"; import { Tabs } from "./tabs";
import * as C from "../src/constants"; import { Resizer } from "./resizer";
import { InfoView } from "./info-view"; import { InfoView } from "./views/info-view";
window.onload = function () { window.onload = function () {
let multiview: GraphMultiView = null; let multiview: GraphMultiView = null;
......
...@@ -10,12 +10,12 @@ declare global { ...@@ -10,12 +10,12 @@ declare global {
const PR: PR; const PR: PR;
} }
import { Source, SourceResolver, sourcePositionToStringKey } from "../src/source-resolver"; import { Source, SourceResolver, sourcePositionToStringKey } from "../source-resolver";
import { SelectionBroker } from "../src/selection-broker"; import { SelectionBroker } from "../selection/selection-broker";
import { View } from "../src/view"; import { View } from "./view";
import { MySelection } from "../src/selection"; import { MySelection } from "../selection/selection";
import { ViewElements } from "../src/util"; import { ViewElements } from "../common/view-elements";
import { SelectionHandler } from "./selection-handler"; import { SelectionHandler } from "../selection/selection-handler";
export enum CodeMode { export enum CodeMode {
MAIN_SOURCE = "main function", MAIN_SOURCE = "main function",
......
...@@ -2,12 +2,12 @@ ...@@ -2,12 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
import { PROF_COLS, UNICODE_BLOCK } from "../src/constants"; import { PROF_COLS, UNICODE_BLOCK } from "../common/constants";
import { SelectionBroker } from "../src/selection-broker"; import { SelectionBroker } from "../selection/selection-broker";
import { TextView } from "../src/text-view"; import { TextView } from "./text-view";
import { MySelection } from "./selection"; import { MySelection } from "../selection/selection";
import { anyToString, interpolate } from "./util"; import { anyToString, interpolate } from "../common/util";
import { InstructionSelectionHandler } from "./selection-handler"; import { InstructionSelectionHandler } from "../selection/selection-handler";
const toolboxHTML = `<div id="disassembly-toolbox"> const toolboxHTML = `<div id="disassembly-toolbox">
<form> <form>
......
...@@ -3,17 +3,17 @@ ...@@ -3,17 +3,17 @@
// found in the LICENSE file. // found in the LICENSE file.
import * as d3 from "d3"; import * as d3 from "d3";
import { layoutNodeGraph } from "../src/graph-layout"; import { layoutNodeGraph } from "../graph-layout";
import { GNode, nodeToStr } from "../src/node"; import { GNode, nodeToStr } from "../node";
import { NODE_INPUT_WIDTH } from "../src/node"; import { NODE_INPUT_WIDTH } from "../node";
import { DEFAULT_NODE_BUBBLE_RADIUS } from "../src/node"; import { DEFAULT_NODE_BUBBLE_RADIUS } from "../node";
import { Edge, edgeToStr } from "../src/edge"; import { Edge, edgeToStr } from "../edge";
import { PhaseView } from "../src/view"; import { PhaseView } from "./view";
import { MySelection } from "../src/selection"; import { MySelection } from "../selection/selection";
import { partial } from "../src/util"; import { partial } from "../common/util";
import { NodeSelectionHandler, ClearableHandler } from "./selection-handler"; import { NodeSelectionHandler, ClearableHandler } from "../selection/selection-handler";
import { Graph } from "./graph"; import { Graph } from "../graph";
import { SelectionBroker } from "./selection-broker"; import { SelectionBroker } from "../selection/selection-broker";
function nodeToStringKey(n: GNode) { function nodeToStringKey(n: GNode) {
return "" + n.id; return "" + n.id;
......
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
import { createElement } from "../src/util"; import { createElement } from "../common/util";
import { SequenceView } from "../src/sequence-view"; import { SequenceView } from "./sequence-view";
import { RegisterAllocation, Range, ChildRange, Interval } from "../src/source-resolver"; import { RegisterAllocation, Range, ChildRange, Interval } from "../source-resolver";
class Constants { class Constants {
// Determines how many rows each div group holds for the purposes of // Determines how many rows each div group holds for the purposes of
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
import { Schedule, SourceResolver } from "../src/source-resolver"; import { Schedule, SourceResolver } from "../source-resolver";
import { TextView } from "../src/text-view"; import { TextView } from "./text-view";
export class ScheduleView extends TextView { export class ScheduleView extends TextView {
schedule: Schedule; schedule: Schedule;
......
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
import { Sequence } from "../src/source-resolver"; import { Sequence } from "../source-resolver";
import { createElement } from "../src/util"; import { createElement } from "../common/util";
import { TextView } from "../src/text-view"; import { TextView } from "./text-view";
import { RangeView } from "../src/range-view"; import { RangeView } from "./range-view";
export class SequenceView extends TextView { export class SequenceView extends TextView {
sequence: Sequence; sequence: Sequence;
......
...@@ -2,12 +2,13 @@ ...@@ -2,12 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
import { PhaseView } from "../src/view"; import { PhaseView } from "./view";
import { anyToString, ViewElements, isIterable } from "../src/util"; import { anyToString, isIterable } from "../common/util";
import { MySelection } from "../src/selection"; import { MySelection } from "../selection/selection";
import { SourceResolver } from "./source-resolver"; import { SourceResolver } from "../source-resolver";
import { SelectionBroker } from "./selection-broker"; import { SelectionBroker } from "../selection/selection-broker";
import { NodeSelectionHandler, BlockSelectionHandler, RegisterAllocationSelectionHandler } from "./selection-handler"; import { NodeSelectionHandler, BlockSelectionHandler, RegisterAllocationSelectionHandler } from "../selection/selection-handler";
import { ViewElements } from "../common/view-elements";
export abstract class TextView extends PhaseView { export abstract class TextView extends PhaseView {
selectionHandler: NodeSelectionHandler; selectionHandler: NodeSelectionHandler;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
import { GNode } from "./node"; import { GNode } from "../node";
export abstract class View { export abstract class View {
protected container: HTMLElement; protected container: HTMLElement;
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
"compilerOptions": { "compilerOptions": {
"outDir": "build/", "outDir": "build/",
"allowJs": false, "allowJs": false,
"target": "es2018", "target": "es2021",
"module": "es2015", "module": "es2020",
"sourceMap": true, "sourceMap": true,
"experimentalDecorators": true, "experimentalDecorators": true,
"emitDecoratorMetadata": true, "emitDecoratorMetadata": true,
...@@ -11,29 +11,30 @@ ...@@ -11,29 +11,30 @@
"noUnusedLocals": true, "noUnusedLocals": true,
"noImplicitReturns": true, "noImplicitReturns": true,
"noImplicitThis": true, "noImplicitThis": true,
"lib": ["dom", "es6", "dom.iterable", "scripthost", "es2018"] "lib": ["es2020", "es2021", "dom", "dom.iterable", "scripthost"]
}, },
"files": [ "files": [
"src/util.ts", "src/common/util.ts",
"src/common/constants.ts",
"src/common/view-elements.ts",
"src/selection/selection.ts",
"src/selection/selection-broker.ts",
"src/selection/selection-handler.ts",
"src/views/view.ts",
"src/views/code-view.ts",
"src/views/graph-view.ts",
"src/views/schedule-view.ts",
"src/views/disassembly-view.ts",
"src/views/text-view.ts",
"src/views/info-view.ts",
"src/node.ts", "src/node.ts",
"src/edge.ts", "src/edge.ts",
"src/graph.ts", "src/graph.ts",
"src/node-label.ts", "src/node-label.ts",
"src/source-resolver.ts", "src/source-resolver.ts",
"src/selection.ts",
"src/selection-broker.ts",
"src/selection-handler.ts",
"src/constants.ts",
"src/view.ts",
"src/text-view.ts",
"src/code-view.ts",
"src/graph-layout.ts", "src/graph-layout.ts",
"src/graph-view.ts",
"src/schedule-view.ts",
"src/disassembly-view.ts",
"src/graphmultiview.ts", "src/graphmultiview.ts",
"src/turbo-visualizer.ts", "src/turbo-visualizer.ts",
"src/resizer.ts", "src/resizer.ts"
"src/info-view.ts"
] ]
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment