Implement fir to html dump
This commit is contained in:
committed by
Mikhail Glukhikh
parent
32e941cb53
commit
61b410e276
@@ -0,0 +1,33 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
|
||||||
|
* that can be found in the license/LICENSE.txt file.
|
||||||
|
*/
|
||||||
|
|
||||||
|
plugins {
|
||||||
|
kotlin("jvm")
|
||||||
|
id("jps-compatible")
|
||||||
|
}
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
maven { setUrl("https://dl.bintray.com/kotlin/kotlinx.html/") }
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
compile(project(":core:descriptors"))
|
||||||
|
compile(project(":core:deserialization"))
|
||||||
|
compile(project(":compiler:fir:cones"))
|
||||||
|
compile(project(":compiler:fir:tree"))
|
||||||
|
compile(project(":compiler:fir:resolve"))
|
||||||
|
compile(project(":compiler:fir:java"))
|
||||||
|
compile(project(":compiler:cli"))
|
||||||
|
|
||||||
|
compileOnly(intellijCoreDep()) { includeJars("intellij-core") }
|
||||||
|
compile("org.jetbrains.kotlinx:kotlinx-html-jvm:0.6.12")
|
||||||
|
}
|
||||||
|
|
||||||
|
sourceSets {
|
||||||
|
"main" { projectDefault() }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
testsJar()
|
||||||
@@ -0,0 +1,81 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2010-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
|
||||||
|
* that can be found in the license/LICENSE.txt file.
|
||||||
|
*/
|
||||||
|
|
||||||
|
body.dark {
|
||||||
|
background-color: #2b2b2b;
|
||||||
|
color: #bababa;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dark .toggle-theme {
|
||||||
|
background-color: #6a7878;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dark .return-label {
|
||||||
|
color: #6a7878;
|
||||||
|
background-color: #333333;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dark .label {
|
||||||
|
color: dodgerblue;
|
||||||
|
background-color: #333333;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dark .expression-type {
|
||||||
|
color: #6a7878;
|
||||||
|
background-color: #333333;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dark .keyword {
|
||||||
|
color: #8ba558;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dark a.ref.selected {
|
||||||
|
background-color: rgba(77, 255, 27, 0.44);
|
||||||
|
}
|
||||||
|
|
||||||
|
.dark .unresolved {
|
||||||
|
text-decoration-color: blue;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dark .error {
|
||||||
|
text-decoration-color: red;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dark .error.unsupported {
|
||||||
|
text-decoration-color: cyan;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dark a.ref.external {
|
||||||
|
color: #bababa;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dark a.container-ref,
|
||||||
|
.dark a.ref,
|
||||||
|
.dark a.ref:visited,
|
||||||
|
.dark a.package-fqn,
|
||||||
|
.dark a.package-fqn:visited {
|
||||||
|
color: rgb(223, 190, 149);
|
||||||
|
}
|
||||||
|
|
||||||
|
.dark a.container-ref:visited {
|
||||||
|
color: rgb(223, 185, 67);
|
||||||
|
}
|
||||||
|
|
||||||
|
.dark :target {
|
||||||
|
background-color: #9f5000;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dark .string-literal {
|
||||||
|
color: #98b884;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dark .declaration .simple-name {
|
||||||
|
color: #dfb943
|
||||||
|
}
|
||||||
|
|
||||||
|
.dark .line {
|
||||||
|
background-color: #313335;
|
||||||
|
border-right: thin solid darkgray;
|
||||||
|
}
|
||||||
@@ -0,0 +1,70 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2010-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
|
||||||
|
* that can be found in the license/LICENSE.txt file.
|
||||||
|
*/
|
||||||
|
|
||||||
|
.dark .toggle-theme {
|
||||||
|
background-color: #dfdfdf;
|
||||||
|
}
|
||||||
|
|
||||||
|
.white .return-label {
|
||||||
|
background-color: lightgray;
|
||||||
|
}
|
||||||
|
|
||||||
|
.white .label {
|
||||||
|
color: dodgerblue;
|
||||||
|
background-color: lightgray;
|
||||||
|
}
|
||||||
|
|
||||||
|
.white .expression-type {
|
||||||
|
background-color: lightgray;
|
||||||
|
}
|
||||||
|
|
||||||
|
.white .keyword {
|
||||||
|
color: #8ba558;
|
||||||
|
}
|
||||||
|
|
||||||
|
.white a.ref.selected {
|
||||||
|
background-color: rgba(77, 255, 27, 0.44);
|
||||||
|
}
|
||||||
|
|
||||||
|
.white .unresolved {
|
||||||
|
text-decoration-color: blue;
|
||||||
|
}
|
||||||
|
|
||||||
|
.white .error {
|
||||||
|
text-decoration-color: red;
|
||||||
|
}
|
||||||
|
|
||||||
|
.white .error.unsupported {
|
||||||
|
text-decoration-color: cyan;
|
||||||
|
}
|
||||||
|
|
||||||
|
.white a.ref.external {
|
||||||
|
color: black;
|
||||||
|
}
|
||||||
|
|
||||||
|
.white a.container-ref,
|
||||||
|
.white a.ref,
|
||||||
|
.white a.ref:visited,
|
||||||
|
.white a.package-fqn,
|
||||||
|
.white a.package-fqn:visited {
|
||||||
|
color: rgb(0, 0, 238);
|
||||||
|
}
|
||||||
|
|
||||||
|
.white :target {
|
||||||
|
background-color: yellow;
|
||||||
|
}
|
||||||
|
|
||||||
|
.white .string-literal {
|
||||||
|
color: #98b884;
|
||||||
|
}
|
||||||
|
|
||||||
|
.white .declaration .simple-name {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.white .line {
|
||||||
|
background-color: lightgray;
|
||||||
|
border-right: thin solid darkgray;
|
||||||
|
}
|
||||||
@@ -0,0 +1,79 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2010-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
|
||||||
|
* that can be found in the license/LICENSE.txt file.
|
||||||
|
*/
|
||||||
|
|
||||||
|
function updateSelectedRefs() {
|
||||||
|
$("a.ref.selected").removeClass("selected");
|
||||||
|
$("a.ref").each(function () {
|
||||||
|
if ($(this).attr("jshref") == window.location.href) {
|
||||||
|
$(this).addClass("selected");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
var key = "fir-dump-theme";
|
||||||
|
|
||||||
|
|
||||||
|
var theme = localStorage.getItem(key);
|
||||||
|
if (!theme) {
|
||||||
|
theme = "white"
|
||||||
|
}
|
||||||
|
|
||||||
|
function toggleTheme() {
|
||||||
|
var body = $("body");
|
||||||
|
body.removeClass(theme);
|
||||||
|
if (theme === "white") {
|
||||||
|
theme = "dark"
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
theme = "white"
|
||||||
|
}
|
||||||
|
body.addClass(theme);
|
||||||
|
|
||||||
|
localStorage.setItem(key, theme);
|
||||||
|
}
|
||||||
|
|
||||||
|
$(document).ready(function () {
|
||||||
|
$(".fold-container").click(function (event) {
|
||||||
|
$(this).toggleClass("unfold");
|
||||||
|
event.stopPropagation();
|
||||||
|
});
|
||||||
|
var refs = $('a.ref:not(.external)');
|
||||||
|
refs.each(function () {
|
||||||
|
var href = $(this).prop('href');
|
||||||
|
$(this).attr('href', 'javascript:void(0);');
|
||||||
|
$(this).attr('jshref', href);
|
||||||
|
});
|
||||||
|
refs.bind('click', function (e) {
|
||||||
|
var href = $(this).attr('jshref');
|
||||||
|
if (!e.metaKey && e.ctrlKey) {
|
||||||
|
e.metaKey = e.ctrlKey;
|
||||||
|
}
|
||||||
|
if (e.metaKey) {
|
||||||
|
location.href = href;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
updateSelectedRefs();
|
||||||
|
$(window).on('hashchange', function (e) {
|
||||||
|
updateSelectedRefs()
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
var body = $("body");
|
||||||
|
body.prepend("<button class='toggle-theme' onclick='toggleTheme()'>💡</button>");
|
||||||
|
body.addClass(theme);
|
||||||
|
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
window.onload = function () {
|
||||||
|
var $line = $('.line');
|
||||||
|
var maxWidth = Math.max.apply(Math, $line.map(function () {
|
||||||
|
return $(this).width();
|
||||||
|
}).get());
|
||||||
|
$line.each(function () {
|
||||||
|
$(this).width(maxWidth)
|
||||||
|
})
|
||||||
|
};
|
||||||
@@ -0,0 +1,61 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2010-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
|
||||||
|
* that can be found in the license/LICENSE.txt file.
|
||||||
|
*/
|
||||||
|
|
||||||
|
pre {
|
||||||
|
counter-reset: line;
|
||||||
|
}
|
||||||
|
|
||||||
|
.line:after {
|
||||||
|
content: counter(line);
|
||||||
|
-webkit-user-select: none;
|
||||||
|
padding-right: 5px;
|
||||||
|
margin-right: 0;
|
||||||
|
margin-left: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.line {
|
||||||
|
counter-increment: line;
|
||||||
|
display: inline-flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
.unresolved {
|
||||||
|
text-decoration-style: wavy;
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
|
||||||
|
.error {
|
||||||
|
text-decoration-style: wavy;
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
|
||||||
|
a.container-ref,
|
||||||
|
a.package-fqn,
|
||||||
|
a.ref {
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.expression-type, .label, .return-label {
|
||||||
|
border-radius: 5px;
|
||||||
|
padding-left: 5px;
|
||||||
|
padding-right: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fold-region {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fold-container.unfold > .fold-region {
|
||||||
|
display: inline;
|
||||||
|
}
|
||||||
|
|
||||||
|
.toggle-theme {
|
||||||
|
border-style: solid;
|
||||||
|
border-width: thin;
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.line {
|
||||||
|
margin-right: 5px;
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -36,6 +36,7 @@ include ":kotlin-build-common",
|
|||||||
":compiler:fir:resolve",
|
":compiler:fir:resolve",
|
||||||
":compiler:fir:java",
|
":compiler:fir:java",
|
||||||
":compiler:fir:modularized-tests",
|
":compiler:fir:modularized-tests",
|
||||||
|
":compiler:fir:dump",
|
||||||
":compiler:frontend",
|
":compiler:frontend",
|
||||||
":compiler:frontend.common",
|
":compiler:frontend.common",
|
||||||
":compiler:frontend.java",
|
":compiler:frontend.java",
|
||||||
|
|||||||
Reference in New Issue
Block a user