[turbolizer] Change turbolizer to ES2015 modules
Bug: v8:7327 Change-Id: If2670e2b8e64a34f5de7855615e2288b6f2f3133 Reviewed-on: https://chromium-review.googlesource.com/1131193 Commit-Queue: Sigurd Schneider <sigurds@chromium.org> Reviewed-by: Georg Neis <neis@chromium.org> Cr-Commit-Position: refs/heads/master@{#54371}
This commit is contained in:
parent
80508f1457
commit
1dec2864d2
3
.gitignore
vendored
3
.gitignore
vendored
@ -102,3 +102,6 @@ v8.ignition_dispatches_table.json
|
||||
/Default/
|
||||
node_modules
|
||||
tools/turbolizer/build
|
||||
tools/turbolizer/.rpt2_cache
|
||||
tools/turbolizer/deploy
|
||||
|
||||
|
390
tools/turbolizer/package-lock.json
generated
390
tools/turbolizer/package-lock.json
generated
@ -241,17 +241,55 @@
|
||||
"@types/d3-selection": "*"
|
||||
}
|
||||
},
|
||||
"@types/estree": {
|
||||
"version": "0.0.39",
|
||||
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz",
|
||||
"integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw=="
|
||||
},
|
||||
"@types/geojson": {
|
||||
"version": "7946.0.3",
|
||||
"resolved": "https://registry.npmjs.org/@types/geojson/-/geojson-7946.0.3.tgz",
|
||||
"integrity": "sha512-BYHiG1vQJ7T93uswzuXZ0OBPWqj5tsAPtaMDQADV8sn2InllXarwg9llr6uaW22q1QCwBZ81gVajOpYWzjesug=="
|
||||
},
|
||||
"@types/node": {
|
||||
"version": "10.5.2",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-10.5.2.tgz",
|
||||
"integrity": "sha512-m9zXmifkZsMHZBOyxZWilMwmTlpC8x5Ty360JKTiXvlXZfBWYpsg9ZZvP/Ye+iZUh+Q+MxDLjItVTWIsfwz+8Q=="
|
||||
},
|
||||
"@types/semver": {
|
||||
"version": "5.5.0",
|
||||
"resolved": "https://registry.npmjs.org/@types/semver/-/semver-5.5.0.tgz",
|
||||
"integrity": "sha512-41qEJgBH/TWgo5NFSvBCJ1qkoi3Q6ONSF2avrHq1LVEZfYpdHmj0y9SuTK+u9ZhG1sYQKBL1AWXKyLWP4RaUoQ==",
|
||||
"dev": true
|
||||
},
|
||||
"arr-diff": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz",
|
||||
"integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=",
|
||||
"requires": {
|
||||
"arr-flatten": "^1.0.1"
|
||||
}
|
||||
},
|
||||
"arr-flatten": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz",
|
||||
"integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg=="
|
||||
},
|
||||
"array-unique": {
|
||||
"version": "0.2.1",
|
||||
"resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz",
|
||||
"integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM="
|
||||
},
|
||||
"braces": {
|
||||
"version": "1.8.5",
|
||||
"resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz",
|
||||
"integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=",
|
||||
"requires": {
|
||||
"expand-range": "^1.8.1",
|
||||
"preserve": "^0.2.0",
|
||||
"repeat-element": "^1.1.2"
|
||||
}
|
||||
},
|
||||
"commander": {
|
||||
"version": "2.15.1",
|
||||
"resolved": "https://registry.npmjs.org/commander/-/commander-2.15.1.tgz",
|
||||
@ -264,9 +302,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"d3": {
|
||||
"version": "5.4.0",
|
||||
"resolved": "https://registry.npmjs.org/d3/-/d3-5.4.0.tgz",
|
||||
"integrity": "sha1-CQGZqFadHeI9BKP/B/4TYJX+p04=",
|
||||
"version": "5.5.0",
|
||||
"resolved": "https://registry.npmjs.org/d3/-/d3-5.5.0.tgz",
|
||||
"integrity": "sha512-HRDSYvT3n7kMvJH7Avp7iR0Xsz97bkCFka9aOg04EdyXyiAP8yQzUpLH3712y9R7ffVo1g94t1OYFHBB0yI9vQ==",
|
||||
"requires": {
|
||||
"d3-array": "1",
|
||||
"d3-axis": "1",
|
||||
@ -343,9 +381,9 @@
|
||||
"integrity": "sha512-dmL9Zr/v39aSSMnLOTd58in2RbregCg4UtGyUArvEKTTN6S3HKEy+ziBWVYo9PTzRyVW+pUBHUtRKz0HYX+SQg=="
|
||||
},
|
||||
"d3-contour": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/d3-contour/-/d3-contour-1.2.0.tgz",
|
||||
"integrity": "sha512-nDzZ2KDnrgTrhMjV8TH0RNrljk6uPNAGkG/v/1SKNVvJa2JU8szjh7o2ZYTX8yufA2oCI5HyeMqbzwiB+oDoIA==",
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmjs.org/d3-contour/-/d3-contour-1.3.0.tgz",
|
||||
"integrity": "sha512-6zccxidQRtcydx0lWqHawdW1UcBzKZTxv0cW90Dlx98pY/L7GjQJmftH1tWopYFDaLCoXU0ECg9x/z2EuFT8tg==",
|
||||
"requires": {
|
||||
"d3-array": "^1.1.1"
|
||||
}
|
||||
@ -445,9 +483,9 @@
|
||||
"integrity": "sha1-ZkLlBsb6OmSFldKyRpeIqNElKdM="
|
||||
},
|
||||
"d3-scale": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/d3-scale/-/d3-scale-2.0.0.tgz",
|
||||
"integrity": "sha512-Sa2Ny6CoJT7x6dozxPnvUQT61epGWsgppFvnNl8eJEzfJBG0iDBBTJAtz2JKem7Mb+NevnaZiDiIDHsuWkv6vg==",
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/d3-scale/-/d3-scale-2.1.0.tgz",
|
||||
"integrity": "sha512-Bb2N3ZgzPdKVEoWGkt8lPV6R7YdpSBWI70Xf26NQHOVjs77a6gLUmBOOPt9d9nB8JiQhwXY1RHCa+eSyWCJZIQ==",
|
||||
"requires": {
|
||||
"d3-array": "^1.2.0",
|
||||
"d3-collection": "1",
|
||||
@ -541,6 +579,97 @@
|
||||
"sigmund": "^1.0.1"
|
||||
}
|
||||
},
|
||||
"estree-walker": {
|
||||
"version": "0.5.2",
|
||||
"resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.5.2.tgz",
|
||||
"integrity": "sha512-XpCnW/AE10ws/kDAs37cngSkvgIR8aN3G0MS85m7dUpuK2EREo9VJ00uvw6Dg/hXEpfsE1I1TvJOJr+Z+TL+ig=="
|
||||
},
|
||||
"expand-brackets": {
|
||||
"version": "0.1.5",
|
||||
"resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz",
|
||||
"integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=",
|
||||
"requires": {
|
||||
"is-posix-bracket": "^0.1.0"
|
||||
}
|
||||
},
|
||||
"expand-range": {
|
||||
"version": "1.8.2",
|
||||
"resolved": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz",
|
||||
"integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=",
|
||||
"requires": {
|
||||
"fill-range": "^2.1.0"
|
||||
}
|
||||
},
|
||||
"extglob": {
|
||||
"version": "0.3.2",
|
||||
"resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz",
|
||||
"integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=",
|
||||
"requires": {
|
||||
"is-extglob": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"filename-regex": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz",
|
||||
"integrity": "sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY="
|
||||
},
|
||||
"fill-range": {
|
||||
"version": "2.2.4",
|
||||
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.4.tgz",
|
||||
"integrity": "sha512-cnrcCbj01+j2gTG921VZPnHbjmdAf8oQV/iGeV2kZxGSyfYjjTyY79ErsK1WJWMpw6DaApEX72binqJE+/d+5Q==",
|
||||
"requires": {
|
||||
"is-number": "^2.1.0",
|
||||
"isobject": "^2.0.0",
|
||||
"randomatic": "^3.0.0",
|
||||
"repeat-element": "^1.1.2",
|
||||
"repeat-string": "^1.5.2"
|
||||
}
|
||||
},
|
||||
"for-in": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz",
|
||||
"integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA="
|
||||
},
|
||||
"for-own": {
|
||||
"version": "0.1.5",
|
||||
"resolved": "https://registry.npmjs.org/for-own/-/for-own-0.1.5.tgz",
|
||||
"integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=",
|
||||
"requires": {
|
||||
"for-in": "^1.0.1"
|
||||
}
|
||||
},
|
||||
"fs-extra": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-5.0.0.tgz",
|
||||
"integrity": "sha512-66Pm4RYbjzdyeuqudYqhFiNBbCIuI9kgRqLPSHIlXHidW8NIQtVdkM1yeZ4lXwuhbTETv3EUGMNHAAw6hiundQ==",
|
||||
"requires": {
|
||||
"graceful-fs": "^4.1.2",
|
||||
"jsonfile": "^4.0.0",
|
||||
"universalify": "^0.1.0"
|
||||
}
|
||||
},
|
||||
"glob-base": {
|
||||
"version": "0.3.0",
|
||||
"resolved": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz",
|
||||
"integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=",
|
||||
"requires": {
|
||||
"glob-parent": "^2.0.0",
|
||||
"is-glob": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"glob-parent": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz",
|
||||
"integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=",
|
||||
"requires": {
|
||||
"is-glob": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"graceful-fs": {
|
||||
"version": "4.1.11",
|
||||
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz",
|
||||
"integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg="
|
||||
},
|
||||
"iconv-lite": {
|
||||
"version": "0.4.23",
|
||||
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.23.tgz",
|
||||
@ -549,6 +678,89 @@
|
||||
"safer-buffer": ">= 2.1.2 < 3"
|
||||
}
|
||||
},
|
||||
"is-buffer": {
|
||||
"version": "1.1.6",
|
||||
"resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz",
|
||||
"integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w=="
|
||||
},
|
||||
"is-dotfile": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.3.tgz",
|
||||
"integrity": "sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE="
|
||||
},
|
||||
"is-equal-shallow": {
|
||||
"version": "0.1.3",
|
||||
"resolved": "https://registry.npmjs.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz",
|
||||
"integrity": "sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ=",
|
||||
"requires": {
|
||||
"is-primitive": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"is-extendable": {
|
||||
"version": "0.1.1",
|
||||
"resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz",
|
||||
"integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik="
|
||||
},
|
||||
"is-extglob": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz",
|
||||
"integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA="
|
||||
},
|
||||
"is-glob": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz",
|
||||
"integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=",
|
||||
"requires": {
|
||||
"is-extglob": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"is-number": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz",
|
||||
"integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=",
|
||||
"requires": {
|
||||
"kind-of": "^3.0.2"
|
||||
}
|
||||
},
|
||||
"is-posix-bracket": {
|
||||
"version": "0.1.1",
|
||||
"resolved": "https://registry.npmjs.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz",
|
||||
"integrity": "sha1-MzTceXdDaOkvAW5vvAqI9c1ua8Q="
|
||||
},
|
||||
"is-primitive": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz",
|
||||
"integrity": "sha1-IHurkWOEmcB7Kt8kCkGochADRXU="
|
||||
},
|
||||
"isarray": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
|
||||
"integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE="
|
||||
},
|
||||
"isobject": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz",
|
||||
"integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=",
|
||||
"requires": {
|
||||
"isarray": "1.0.0"
|
||||
}
|
||||
},
|
||||
"jsonfile": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz",
|
||||
"integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=",
|
||||
"requires": {
|
||||
"graceful-fs": "^4.1.6"
|
||||
}
|
||||
},
|
||||
"kind-of": {
|
||||
"version": "3.2.2",
|
||||
"resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
|
||||
"integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
|
||||
"requires": {
|
||||
"is-buffer": "^1.1.5"
|
||||
}
|
||||
},
|
||||
"lru-cache": {
|
||||
"version": "4.1.3",
|
||||
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.3.tgz",
|
||||
@ -559,12 +771,162 @@
|
||||
"yallist": "^2.1.2"
|
||||
}
|
||||
},
|
||||
"math-random": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/math-random/-/math-random-1.0.1.tgz",
|
||||
"integrity": "sha1-izqsWIuKZuSXXjzepn97sylgH6w="
|
||||
},
|
||||
"micromatch": {
|
||||
"version": "2.3.11",
|
||||
"resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz",
|
||||
"integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=",
|
||||
"requires": {
|
||||
"arr-diff": "^2.0.0",
|
||||
"array-unique": "^0.2.1",
|
||||
"braces": "^1.8.2",
|
||||
"expand-brackets": "^0.1.4",
|
||||
"extglob": "^0.3.1",
|
||||
"filename-regex": "^2.0.0",
|
||||
"is-extglob": "^1.0.0",
|
||||
"is-glob": "^2.0.1",
|
||||
"kind-of": "^3.0.2",
|
||||
"normalize-path": "^2.0.1",
|
||||
"object.omit": "^2.0.0",
|
||||
"parse-glob": "^3.0.4",
|
||||
"regex-cache": "^0.4.2"
|
||||
}
|
||||
},
|
||||
"normalize-path": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz",
|
||||
"integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=",
|
||||
"requires": {
|
||||
"remove-trailing-separator": "^1.0.1"
|
||||
}
|
||||
},
|
||||
"object.omit": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz",
|
||||
"integrity": "sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=",
|
||||
"requires": {
|
||||
"for-own": "^0.1.4",
|
||||
"is-extendable": "^0.1.1"
|
||||
}
|
||||
},
|
||||
"parse-glob": {
|
||||
"version": "3.0.4",
|
||||
"resolved": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz",
|
||||
"integrity": "sha1-ssN2z7EfNVE7rdFz7wu246OIORw=",
|
||||
"requires": {
|
||||
"glob-base": "^0.3.0",
|
||||
"is-dotfile": "^1.0.0",
|
||||
"is-extglob": "^1.0.0",
|
||||
"is-glob": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"path-parse": {
|
||||
"version": "1.0.5",
|
||||
"resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.5.tgz",
|
||||
"integrity": "sha1-PBrfhx6pzWyUMbbqK9dKD/BVxME="
|
||||
},
|
||||
"pegjs": {
|
||||
"version": "0.10.0",
|
||||
"resolved": "https://registry.npmjs.org/pegjs/-/pegjs-0.10.0.tgz",
|
||||
"integrity": "sha1-z4uvrm7d/0tafvsYUmnqr0YQ3b0="
|
||||
},
|
||||
"preserve": {
|
||||
"version": "0.2.0",
|
||||
"resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz",
|
||||
"integrity": "sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks="
|
||||
},
|
||||
"pseudomap": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz",
|
||||
"integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=",
|
||||
"dev": true
|
||||
},
|
||||
"randomatic": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/randomatic/-/randomatic-3.0.0.tgz",
|
||||
"integrity": "sha512-VdxFOIEY3mNO5PtSRkkle/hPJDHvQhK21oa73K4yAc9qmp6N429gAyF1gZMOTMeS0/AYzaV/2Trcef+NaIonSA==",
|
||||
"requires": {
|
||||
"is-number": "^4.0.0",
|
||||
"kind-of": "^6.0.0",
|
||||
"math-random": "^1.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"is-number": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz",
|
||||
"integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ=="
|
||||
},
|
||||
"kind-of": {
|
||||
"version": "6.0.2",
|
||||
"resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz",
|
||||
"integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA=="
|
||||
}
|
||||
}
|
||||
},
|
||||
"regex-cache": {
|
||||
"version": "0.4.4",
|
||||
"resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.4.tgz",
|
||||
"integrity": "sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ==",
|
||||
"requires": {
|
||||
"is-equal-shallow": "^0.1.3"
|
||||
}
|
||||
},
|
||||
"remove-trailing-separator": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz",
|
||||
"integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8="
|
||||
},
|
||||
"repeat-element": {
|
||||
"version": "1.1.2",
|
||||
"resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.2.tgz",
|
||||
"integrity": "sha1-7wiaF40Ug7quTZPrmLT55OEdmQo="
|
||||
},
|
||||
"repeat-string": {
|
||||
"version": "1.6.1",
|
||||
"resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz",
|
||||
"integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc="
|
||||
},
|
||||
"resolve": {
|
||||
"version": "1.8.1",
|
||||
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.8.1.tgz",
|
||||
"integrity": "sha512-AicPrAC7Qu1JxPCZ9ZgCZlY35QgFnNqc+0LtbRNxnVw4TXvjQ72wnuL9JQcEBgXkI9JM8MsT9kaQoHcpCRJOYA==",
|
||||
"requires": {
|
||||
"path-parse": "^1.0.5"
|
||||
}
|
||||
},
|
||||
"rollup": {
|
||||
"version": "0.62.0",
|
||||
"resolved": "https://registry.npmjs.org/rollup/-/rollup-0.62.0.tgz",
|
||||
"integrity": "sha512-mZS0aIGfYzuJySJD78znu9/hCJsNfBzg4lDuZGMj0hFVcYHt2evNRHv8aqiu9/w6z6Qn8AQoVl4iyEjDmisGeA==",
|
||||
"requires": {
|
||||
"@types/estree": "0.0.39",
|
||||
"@types/node": "*"
|
||||
}
|
||||
},
|
||||
"rollup-plugin-typescript2": {
|
||||
"version": "0.15.1",
|
||||
"resolved": "https://registry.npmjs.org/rollup-plugin-typescript2/-/rollup-plugin-typescript2-0.15.1.tgz",
|
||||
"integrity": "sha512-lJ/yfIj1fmp0KyfgPmd2QFeRpLgXlc58fS3Ha9Loc7/p3qByDL7CRndcI9MflE/pUSrfUdDjZMR0mHSKvqrZ+g==",
|
||||
"requires": {
|
||||
"fs-extra": "^5.0.0",
|
||||
"resolve": "^1.7.1",
|
||||
"rollup-pluginutils": "^2.0.1",
|
||||
"tslib": "1.9.2"
|
||||
}
|
||||
},
|
||||
"rollup-pluginutils": {
|
||||
"version": "2.3.0",
|
||||
"resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.3.0.tgz",
|
||||
"integrity": "sha512-xB6hsRsjdJdIYWEyYUJy/3ki5g69wrf0luHPGNK3ZSocV6HLNfio59l3dZ3TL4xUwEKgROhFi9jOCt6c5gfUWw==",
|
||||
"requires": {
|
||||
"estree-walker": "^0.5.2",
|
||||
"micromatch": "^2.3.11"
|
||||
}
|
||||
},
|
||||
"rw": {
|
||||
"version": "1.3.3",
|
||||
"resolved": "https://registry.npmjs.org/rw/-/rw-1.3.3.tgz",
|
||||
@ -587,6 +949,11 @@
|
||||
"integrity": "sha1-P/IfGYytIXX587eBhT/ZTQ0ZtZA=",
|
||||
"dev": true
|
||||
},
|
||||
"tslib": {
|
||||
"version": "1.9.2",
|
||||
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.2.tgz",
|
||||
"integrity": "sha512-AVP5Xol3WivEr7hnssHDsaM+lVrVXWUvd1cfXTRkTj80b//6g2wIFEH6hZG0muGZRnHGrfttpdzRk3YlBkWjKw=="
|
||||
},
|
||||
"typescript": {
|
||||
"version": "2.9.1",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-2.9.1.tgz",
|
||||
@ -603,6 +970,11 @@
|
||||
"editorconfig": "^0.15.0"
|
||||
}
|
||||
},
|
||||
"universalify": {
|
||||
"version": "0.1.2",
|
||||
"resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz",
|
||||
"integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg=="
|
||||
},
|
||||
"yallist": {
|
||||
"version": "2.1.2",
|
||||
"resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz",
|
||||
|
@ -2,9 +2,8 @@
|
||||
"name": "turbolizer",
|
||||
"version": "0.1.0",
|
||||
"description": "Visualization tool for V8 TurboFan IR graphs",
|
||||
"main": "index.html",
|
||||
"scripts": {
|
||||
"build": "tsc",
|
||||
"build": "rollup -c",
|
||||
"watch": "tsc --watch",
|
||||
"deploy": "./deploy.sh",
|
||||
"format": "tsfmt -r"
|
||||
@ -13,7 +12,10 @@
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@types/d3": "^5.0.0",
|
||||
"d3": "^5.4.0"
|
||||
"d3": "^5.5.0",
|
||||
"pegjs": "^0.10.0",
|
||||
"rollup": "^0.62.0",
|
||||
"rollup-plugin-typescript2": "^0.15.1"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
12
tools/turbolizer/rollup.config.js
Normal file
12
tools/turbolizer/rollup.config.js
Normal file
@ -0,0 +1,12 @@
|
||||
// Copyright 2018 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.
|
||||
|
||||
import typescript from 'rollup-plugin-typescript2';
|
||||
|
||||
export default {
|
||||
entry: "src/turbo-visualizer.ts",
|
||||
format: "iife",
|
||||
plugins: [typescript({abortOnError:false})],
|
||||
dest: "build/turbolizer.js"
|
||||
};
|
@ -2,14 +2,18 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
"use strict";
|
||||
import {Source,SourceResolver,sourcePositionToStringKey} from "./source-resolver.js"
|
||||
import {SelectionBroker} from "./selection-broker.js"
|
||||
import {View} from "./view.js"
|
||||
import {MySelection} from "./selection.js"
|
||||
import {anyToString,ViewElements} from "./util.js"
|
||||
|
||||
enum CodeMode {
|
||||
export enum CodeMode {
|
||||
MAIN_SOURCE = "main function",
|
||||
INLINED_SOURCE = "inlined function"
|
||||
};
|
||||
|
||||
class CodeView extends View {
|
||||
export class CodeView extends View {
|
||||
broker: SelectionBroker;
|
||||
source: Source;
|
||||
sourceResolver: SourceResolver;
|
||||
|
@ -2,25 +2,22 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
const MAX_RANK_SENTINEL = 0;
|
||||
const GRAPH_MARGIN = 250;
|
||||
const WIDTH = 'width';
|
||||
const HEIGHT = 'height';
|
||||
const VISIBILITY = 'visibility';
|
||||
const SOURCE_PANE_ID = 'left';
|
||||
const SOURCE_COLLAPSE_ID = 'source-shrink';
|
||||
const SOURCE_EXPAND_ID = 'source-expand';
|
||||
const INTERMEDIATE_PANE_ID = 'middle';
|
||||
const GRAPH_PANE_ID = 'graph';
|
||||
const SCHEDULE_PANE_ID = 'schedule';
|
||||
const GENERATED_PANE_ID = 'right';
|
||||
const DISASSEMBLY_PANE_ID = 'disassembly';
|
||||
const DISASSEMBLY_COLLAPSE_ID = 'disassembly-shrink';
|
||||
const DISASSEMBLY_EXPAND_ID = 'disassembly-expand';
|
||||
const COLLAPSE_PANE_BUTTON_VISIBLE = 'button-input';
|
||||
const COLLAPSE_PANE_BUTTON_INVISIBLE = 'button-input-invisible';
|
||||
const UNICODE_BLOCK = '▋';
|
||||
const PROF_COLS = [
|
||||
export const MAX_RANK_SENTINEL = 0;
|
||||
export const GRAPH_MARGIN = 250;
|
||||
export const SOURCE_PANE_ID = 'left';
|
||||
export const SOURCE_COLLAPSE_ID = 'source-shrink';
|
||||
export const SOURCE_EXPAND_ID = 'source-expand';
|
||||
export const INTERMEDIATE_PANE_ID = 'middle';
|
||||
export const GRAPH_PANE_ID = 'graph';
|
||||
export const SCHEDULE_PANE_ID = 'schedule';
|
||||
export const GENERATED_PANE_ID = 'right';
|
||||
export const DISASSEMBLY_PANE_ID = 'disassembly';
|
||||
export const DISASSEMBLY_COLLAPSE_ID = 'disassembly-shrink';
|
||||
export const DISASSEMBLY_EXPAND_ID = 'disassembly-expand';
|
||||
export const COLLAPSE_PANE_BUTTON_VISIBLE = 'button-input';
|
||||
export const COLLAPSE_PANE_BUTTON_INVISIBLE = 'button-input-invisible';
|
||||
export const UNICODE_BLOCK = '▋';
|
||||
export const PROF_COLS = [
|
||||
{ perc: 0, col: { r: 255, g: 255, b: 255 } },
|
||||
{ perc: 0.5, col: { r: 255, g: 255, b: 128 } },
|
||||
{ perc: 5, col: { r: 255, g: 128, b: 0 } },
|
||||
|
@ -2,9 +2,11 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
"use strict";
|
||||
import {PROF_COLS, UNICODE_BLOCK} from "./constants.js"
|
||||
import {SelectionBroker} from "./selection-broker.js"
|
||||
import {TextView} from "./text-view.js"
|
||||
|
||||
class DisassemblyView extends TextView {
|
||||
export class DisassemblyView extends TextView {
|
||||
SOURCE_POSITION_HEADER_REGEX: any;
|
||||
addr_event_counts: any;
|
||||
total_event_counts: any;
|
||||
|
@ -2,13 +2,15 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
var MINIMUM_EDGE_SEPARATION = 20;
|
||||
import {GNode, DEFAULT_NODE_BUBBLE_RADIUS} from "./node.js"
|
||||
|
||||
function isEdgeInitiallyVisible(target, index, source, type) {
|
||||
export const MINIMUM_EDGE_SEPARATION = 20;
|
||||
|
||||
export function isEdgeInitiallyVisible(target, index, source, type) {
|
||||
return type == "control" && (target.cfg || source.cfg);
|
||||
}
|
||||
|
||||
class Edge {
|
||||
export class Edge {
|
||||
target: GNode;
|
||||
source: GNode;
|
||||
index: number;
|
||||
@ -89,4 +91,4 @@ class Edge {
|
||||
|
||||
}
|
||||
|
||||
const edgeToStr = (e: Edge) => e.stringID();
|
||||
export const edgeToStr = (e: Edge) => e.stringID();
|
||||
|
@ -2,7 +2,13 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
var DEFAULT_NODE_ROW_SEPARATION = 130
|
||||
|
||||
import {MAX_RANK_SENTINEL} from "./constants.js"
|
||||
import {MINIMUM_EDGE_SEPARATION} from "./edge.js"
|
||||
import {NODE_INPUT_WIDTH, MINIMUM_NODE_OUTPUT_APPROACH, DEFAULT_NODE_BUBBLE_RADIUS} from "./node.js"
|
||||
|
||||
|
||||
const DEFAULT_NODE_ROW_SEPARATION = 130
|
||||
|
||||
var traceLayout = false;
|
||||
|
||||
@ -246,7 +252,7 @@ function newGraphOccupation(graph) {
|
||||
return occupation;
|
||||
}
|
||||
|
||||
function layoutNodeGraph(graph) {
|
||||
export function layoutNodeGraph(graph) {
|
||||
// First determine the set of nodes that have no outputs. Those are the
|
||||
// basis for bottom-up DFS to determine rank and node placement.
|
||||
var endNodesHasNoOutputs = [];
|
||||
|
@ -2,7 +2,16 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
"use strict";
|
||||
import * as d3 from "d3"
|
||||
import {layoutNodeGraph} from "./graph-layout.js"
|
||||
import {MAX_RANK_SENTINEL} from "./constants.js"
|
||||
import {GNode, nodeToStr, isNodeInitiallyVisible} from "./node.js"
|
||||
import {NODE_INPUT_WIDTH, MINIMUM_NODE_OUTPUT_APPROACH} from "./node.js"
|
||||
import {DEFAULT_NODE_BUBBLE_RADIUS} from "./node.js"
|
||||
import {Edge, edgeToStr} from "./edge.js"
|
||||
import {View, PhaseView} from "./view.js"
|
||||
import {MySelection} from "./selection.js"
|
||||
import {partial, alignUp} from "./util.js"
|
||||
|
||||
function nodeToStringKey(n) {
|
||||
return "" + n.id;
|
||||
@ -18,7 +27,7 @@ interface GraphState {
|
||||
hideDead: boolean
|
||||
}
|
||||
|
||||
class GraphView extends View implements PhaseView {
|
||||
export class GraphView extends View implements PhaseView {
|
||||
divElement: d3.Selection<any, any, any, any>;
|
||||
svg: d3.Selection<any, any, any, any>;
|
||||
showPhaseByName: (string) => void;
|
||||
@ -272,7 +281,7 @@ class GraphView extends View implements PhaseView {
|
||||
};
|
||||
|
||||
measureText(text) {
|
||||
const textMeasure = document.getElementById('text-measure');
|
||||
const textMeasure = document.getElementById('text-measure') as SVGTSpanElement;
|
||||
textMeasure.textContent = text;
|
||||
return {
|
||||
width: textMeasure.getBBox().width,
|
||||
@ -304,7 +313,7 @@ class GraphView extends View implements PhaseView {
|
||||
n.labelbbox = g.measureText(n.displayLabel);
|
||||
n.typebbox = g.measureText(n.getDisplayType());
|
||||
var innerwidth = Math.max(n.labelbbox.width, n.typebbox.width);
|
||||
n.width = MoreMath.alignUp(innerwidth + NODE_INPUT_WIDTH * 2,
|
||||
n.width = alignUp(innerwidth + NODE_INPUT_WIDTH * 2,
|
||||
NODE_INPUT_WIDTH);
|
||||
var innerheight = Math.max(n.labelbbox.height, n.typebbox.height);
|
||||
n.normalheight = innerheight + 20;
|
||||
@ -748,10 +757,10 @@ class GraphView extends View implements PhaseView {
|
||||
newGs.append("rect")
|
||||
.attr("rx", 10)
|
||||
.attr("ry", 10)
|
||||
.attr(WIDTH, function (d) {
|
||||
.attr('width', function (d) {
|
||||
return d.getTotalNodeWidth();
|
||||
})
|
||||
.attr(HEIGHT, function (d) {
|
||||
.attr('height', function (d) {
|
||||
return graph.getNodeHeight(d);
|
||||
})
|
||||
|
||||
@ -856,7 +865,7 @@ class GraphView extends View implements PhaseView {
|
||||
})
|
||||
.attr("transform", function (d) { return "translate(" + d.x + "," + d.y + ")"; })
|
||||
.select('rect')
|
||||
.attr(HEIGHT, function (d) { return graph.getNodeHeight(d); });
|
||||
.attr('height', function (d) { return graph.getNodeHeight(d); });
|
||||
|
||||
graph.visibleBubbles = d3.selectAll('circle');
|
||||
|
||||
|
@ -2,9 +2,13 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
"use strict";
|
||||
import {GraphView} from "./graph-view.js"
|
||||
import {ScheduleView} from "./schedule-view.js"
|
||||
import {SourceResolver} from "./source-resolver.js"
|
||||
import {SelectionBroker} from "./selection-broker.js"
|
||||
import {View, PhaseView} from "./view.js"
|
||||
|
||||
class GraphMultiView extends View {
|
||||
export class GraphMultiView extends View {
|
||||
sourceResolver: SourceResolver;
|
||||
selectionBroker: SelectionBroker;
|
||||
graph: GraphView;
|
||||
|
@ -1,9 +0,0 @@
|
||||
// Copyright 2014 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.
|
||||
|
||||
const MoreMath = {
|
||||
alignUp: (raw, multiple) => {
|
||||
return Math.floor((raw + multiple - 1) / multiple) * multiple;
|
||||
}
|
||||
};
|
@ -2,13 +2,15 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
const TYPE_HEIGHT = 25;
|
||||
const DEFAULT_NODE_BUBBLE_RADIUS = 12;
|
||||
const NODE_INPUT_WIDTH = 50;
|
||||
const MINIMUM_NODE_INPUT_APPROACH = 15 + 2 * DEFAULT_NODE_BUBBLE_RADIUS;
|
||||
const MINIMUM_NODE_OUTPUT_APPROACH = 15;
|
||||
import {NodeOrigin} from "./source-resolver.js"
|
||||
import {MINIMUM_EDGE_SEPARATION} from "./edge.js"
|
||||
|
||||
function isNodeInitiallyVisible(node) {
|
||||
export const DEFAULT_NODE_BUBBLE_RADIUS = 12;
|
||||
export const NODE_INPUT_WIDTH = 50;
|
||||
export const MINIMUM_NODE_OUTPUT_APPROACH = 15;
|
||||
const MINIMUM_NODE_INPUT_APPROACH = 15 + 2 * DEFAULT_NODE_BUBBLE_RADIUS;
|
||||
|
||||
export function isNodeInitiallyVisible(node) {
|
||||
return node.cfg;
|
||||
}
|
||||
|
||||
@ -22,7 +24,7 @@ function formatOrigin(origin) {
|
||||
return "unknown origin";
|
||||
}
|
||||
|
||||
class GNode {
|
||||
export class GNode {
|
||||
control: boolean;
|
||||
opcode: string;
|
||||
live: boolean;
|
||||
@ -177,4 +179,4 @@ class GNode {
|
||||
}
|
||||
};
|
||||
|
||||
const nodeToStr = (n: GNode) => "N" + n.id;
|
||||
export const nodeToStr = (n: GNode) => "N" + n.id;
|
||||
|
@ -2,9 +2,12 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
"use strict";
|
||||
import {Schedule,SourceResolver} from "./source-resolver.js"
|
||||
import {isIterable} from "./util.js"
|
||||
import {PhaseView} from "./view.js"
|
||||
import {TextView} from "./text-view.js"
|
||||
|
||||
class ScheduleView extends TextView implements PhaseView {
|
||||
export class ScheduleView extends TextView implements PhaseView {
|
||||
schedule: Schedule;
|
||||
sourceResolver: SourceResolver;
|
||||
|
||||
|
@ -2,7 +2,9 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
class SelectionBroker {
|
||||
import {SourceResolver, sourcePositionValid} from "./source-resolver.js"
|
||||
|
||||
export class SelectionBroker {
|
||||
sourceResolver: SourceResolver;
|
||||
sourcePositionHandlers: Array<SelectionHandler>;
|
||||
nodeHandlers: Array<NodeSelectionHandler>;
|
||||
|
@ -2,7 +2,9 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
class MySelection {
|
||||
import {isIterable} from "./util.js"
|
||||
|
||||
export class MySelection {
|
||||
selection: any;
|
||||
stringKey: (o: any) => string;
|
||||
|
||||
|
@ -2,6 +2,8 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
import {sortUnique, anyToString} from "./util.js"
|
||||
|
||||
function sourcePositionLe(a, b) {
|
||||
if (a.inliningId == b.inliningId) {
|
||||
return a.scriptOffset - b.scriptOffset;
|
||||
@ -14,7 +16,7 @@ function sourcePositionEq(a, b) {
|
||||
a.scriptOffset == b.scriptOffset;
|
||||
}
|
||||
|
||||
function sourcePositionToStringKey(sourcePosition): string {
|
||||
export function sourcePositionToStringKey(sourcePosition): string {
|
||||
if (!sourcePosition) return "undefined";
|
||||
if (sourcePosition.inliningId && sourcePosition.scriptOffset)
|
||||
return "SP:" + sourcePosition.inliningId + ":" + sourcePosition.scriptOffset;
|
||||
@ -23,12 +25,12 @@ function sourcePositionToStringKey(sourcePosition): string {
|
||||
return "undefined";
|
||||
}
|
||||
|
||||
function sourcePositionValid(l) {
|
||||
export function sourcePositionValid(l) {
|
||||
return (typeof l.scriptOffset !== undefined
|
||||
&& typeof l.inliningId !== undefined) || typeof l.bytecodePosition != undefined;
|
||||
}
|
||||
|
||||
interface SourcePosition {
|
||||
export interface SourcePosition {
|
||||
scriptOffset: number;
|
||||
inliningId: number;
|
||||
}
|
||||
@ -38,7 +40,7 @@ interface TurboFanOrigin {
|
||||
reducer: string;
|
||||
}
|
||||
|
||||
interface NodeOrigin {
|
||||
export interface NodeOrigin {
|
||||
nodeId: number;
|
||||
}
|
||||
|
||||
@ -52,7 +54,7 @@ type TurboFanBytecodeOrigin = BytecodePosition & TurboFanOrigin;
|
||||
|
||||
type AnyPosition = SourcePosition | BytecodePosition;
|
||||
|
||||
interface Source {
|
||||
export interface Source {
|
||||
sourcePositions: Array<SourcePosition>;
|
||||
sourceName: string;
|
||||
functionName: string;
|
||||
@ -70,11 +72,11 @@ interface Phase {
|
||||
data: any;
|
||||
}
|
||||
|
||||
interface Schedule {
|
||||
export interface Schedule {
|
||||
nodes: Array<any>;
|
||||
}
|
||||
|
||||
class SourceResolver {
|
||||
export class SourceResolver {
|
||||
nodePositionMap: Array<AnyPosition>;
|
||||
sources: Array<Source>;
|
||||
inlinings: Array<Inlining>;
|
||||
|
@ -2,13 +2,11 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
"use strict";
|
||||
import {View} from "./view.js"
|
||||
import {anyToString, ViewElements, isIterable} from "./util.js"
|
||||
import {MySelection} from "./selection.js"
|
||||
|
||||
function anyToString(x: any): string {
|
||||
return "" + x;
|
||||
}
|
||||
|
||||
abstract class TextView extends View {
|
||||
export abstract class TextView extends View {
|
||||
selectionHandler: NodeSelectionHandler;
|
||||
blockSelectionHandler: BlockSelectionHandler;
|
||||
nodeSelectionHandler: NodeSelectionHandler;
|
||||
|
@ -2,6 +2,14 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
import * as C from "./constants.js"
|
||||
import {SourceResolver} from "./source-resolver.js"
|
||||
import {SelectionBroker} from "./selection-broker.js"
|
||||
import {DisassemblyView} from "./disassembly-view.js"
|
||||
import {GraphMultiView} from "./graphmultiview.js"
|
||||
import {CodeMode, CodeView} from "./code-view.js"
|
||||
import * as d3 from "d3"
|
||||
|
||||
class Snapper {
|
||||
resizer: Resizer;
|
||||
sourceExpand: HTMLElement;
|
||||
@ -12,10 +20,10 @@ class Snapper {
|
||||
constructor(resizer: Resizer) {
|
||||
const snapper = this;
|
||||
snapper.resizer = resizer;
|
||||
snapper.sourceExpand = document.getElementById(SOURCE_EXPAND_ID);
|
||||
snapper.sourceCollapse = document.getElementById(SOURCE_COLLAPSE_ID);
|
||||
snapper.disassemblyExpand = document.getElementById(DISASSEMBLY_EXPAND_ID);
|
||||
snapper.disassemblyCollapse = document.getElementById(DISASSEMBLY_COLLAPSE_ID);
|
||||
snapper.sourceExpand = document.getElementById(C.SOURCE_EXPAND_ID);
|
||||
snapper.sourceCollapse = document.getElementById(C.SOURCE_COLLAPSE_ID);
|
||||
snapper.disassemblyExpand = document.getElementById(C.DISASSEMBLY_EXPAND_ID);
|
||||
snapper.disassemblyCollapse = document.getElementById(C.DISASSEMBLY_COLLAPSE_ID);
|
||||
|
||||
document.getElementById("source-collapse").addEventListener("click", function () {
|
||||
resizer.snapper.toggleSourceExpanded();
|
||||
@ -112,9 +120,9 @@ class Resizer {
|
||||
resizer.panes_updated_callback = panes_updated_callback;
|
||||
resizer.dead_width = dead_width
|
||||
resizer.client_width = document.body.getBoundingClientRect().width;
|
||||
resizer.left = document.getElementById(SOURCE_PANE_ID);
|
||||
resizer.middle = document.getElementById(INTERMEDIATE_PANE_ID);
|
||||
resizer.right = document.getElementById(GENERATED_PANE_ID);
|
||||
resizer.left = document.getElementById(C.SOURCE_PANE_ID);
|
||||
resizer.middle = document.getElementById(C.INTERMEDIATE_PANE_ID);
|
||||
resizer.right = document.getElementById(C.GENERATED_PANE_ID);
|
||||
resizer.resizer_left = d3.select('.resizer-left');
|
||||
resizer.resizer_right = d3.select('.resizer-right');
|
||||
resizer.sep_left = resizer.client_width / 3;
|
||||
@ -188,7 +196,6 @@ class Resizer {
|
||||
}
|
||||
|
||||
window.onload = function () {
|
||||
"use strict";
|
||||
var svg = null;
|
||||
var multiview = null;
|
||||
var disassemblyView = null;
|
||||
@ -237,24 +244,24 @@ window.onload = function () {
|
||||
sourceResolver.setNodePositionMap(jsonObj.nodePositions);
|
||||
sourceResolver.parsePhases(jsonObj.phases);
|
||||
|
||||
let sourceView = new CodeView(SOURCE_PANE_ID, selectionBroker, sourceResolver, fnc, CodeMode.MAIN_SOURCE);
|
||||
let sourceView = new CodeView(C.SOURCE_PANE_ID, selectionBroker, sourceResolver, fnc, CodeMode.MAIN_SOURCE);
|
||||
sourceView.show(null, null);
|
||||
sourceViews.push(sourceView);
|
||||
|
||||
sourceResolver.forEachSource((source) => {
|
||||
let sourceView = new CodeView(SOURCE_PANE_ID, selectionBroker, sourceResolver, source, CodeMode.INLINED_SOURCE);
|
||||
let sourceView = new CodeView(C.SOURCE_PANE_ID, selectionBroker, sourceResolver, source, CodeMode.INLINED_SOURCE);
|
||||
sourceView.show(null, null);
|
||||
sourceViews.push(sourceView);
|
||||
});
|
||||
|
||||
disassemblyView = new DisassemblyView(GENERATED_PANE_ID, selectionBroker);
|
||||
disassemblyView = new DisassemblyView(C.GENERATED_PANE_ID, selectionBroker);
|
||||
disassemblyView.initializeCode(fnc.sourceText);
|
||||
if (sourceResolver.disassemblyPhase) {
|
||||
disassemblyView.initializePerfProfile(jsonObj.eventCounts);
|
||||
disassemblyView.show(sourceResolver.disassemblyPhase.data, null);
|
||||
}
|
||||
|
||||
multiview = new GraphMultiView(INTERMEDIATE_PANE_ID, selectionBroker, sourceResolver);
|
||||
multiview = new GraphMultiView(C.INTERMEDIATE_PANE_ID, selectionBroker, sourceResolver);
|
||||
multiview.show(jsonObj);
|
||||
} catch (err) {
|
||||
if (window.confirm("Error: Exception during load of TurboFan JSON file:\n" +
|
||||
|
@ -2,7 +2,9 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
"use strict";
|
||||
export function anyToString(x: any): string {
|
||||
return "" + x;
|
||||
}
|
||||
|
||||
function computeScrollTop(container, element) {
|
||||
const height = container.offsetHeight;
|
||||
@ -17,7 +19,7 @@ function computeScrollTop(container, element) {
|
||||
return pos;
|
||||
}
|
||||
|
||||
class ViewElements {
|
||||
export class ViewElements {
|
||||
container: HTMLElement;
|
||||
scrollTop: number;
|
||||
|
||||
@ -84,7 +86,7 @@ function upperBound(a, value, compare, lookup) {
|
||||
}
|
||||
|
||||
|
||||
function sortUnique<T>(arr: Array<T>, f: (a: T, b: T) => number, equal: (a: T, b: T) => boolean) {
|
||||
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;
|
||||
arr = arr.sort(f);
|
||||
let ret = [arr[0]];
|
||||
@ -97,14 +99,18 @@ function sortUnique<T>(arr: Array<T>, f: (a: T, b: T) => number, equal: (a: T, b
|
||||
}
|
||||
|
||||
// Partial application without binding the receiver
|
||||
function partial(f, ...arguments1) {
|
||||
export function partial(f, ...arguments1) {
|
||||
return function (...arguments2) {
|
||||
var arguments2 = Array.from(arguments);
|
||||
f.apply(this, [...arguments1, ...arguments2]);
|
||||
}
|
||||
}
|
||||
|
||||
function isIterable(obj: any): obj is Iterable<any> {
|
||||
export function isIterable(obj: any): obj is Iterable<any> {
|
||||
return obj != null && obj != undefined
|
||||
&& typeof obj != 'string' && typeof obj[Symbol.iterator] === 'function';
|
||||
}
|
||||
|
||||
export function alignUp(raw:number, multiple:number):number {
|
||||
return Math.floor((raw + multiple - 1) / multiple) * multiple;
|
||||
}
|
||||
|
@ -2,9 +2,7 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
"use strict";
|
||||
|
||||
abstract class View {
|
||||
export abstract class View {
|
||||
container: HTMLElement;
|
||||
divNode: HTMLElement;
|
||||
abstract initializeContent(data: any, rememberedSelection: Selection): void;
|
||||
@ -32,7 +30,7 @@ abstract class View {
|
||||
}
|
||||
}
|
||||
|
||||
interface PhaseView {
|
||||
export interface PhaseView {
|
||||
onresize();
|
||||
searchInputAction(searchInput: HTMLInputElement, e: Event);
|
||||
}
|
||||
|
@ -1,12 +1,15 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"outFile": "build/turbolizer.js",
|
||||
"allowJs": true,
|
||||
"outDir": "build/",
|
||||
"allowJs": false,
|
||||
"target": "es2017",
|
||||
"sourceMap": true
|
||||
"module": "es2015",
|
||||
"sourceMap": true,
|
||||
"experimentalDecorators": true,
|
||||
"emitDecoratorMetadata": true,
|
||||
"moduleResolution": "node"
|
||||
},
|
||||
"files": [
|
||||
"src/monkey.ts",
|
||||
"src/util.ts",
|
||||
"src/lang-disassembly.ts",
|
||||
"src/node.ts",
|
||||
@ -26,4 +29,4 @@
|
||||
"src/graphmultiview.ts",
|
||||
"src/turbo-visualizer.ts"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user