-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
907 changed files
with
1,374 additions
and
587 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,79 +1,39 @@ | ||
/* | ||
* Main build file for the XDK. | ||
* Main build file for the XVM project, producing the XDK. | ||
*/ | ||
|
||
plugins { | ||
java | ||
} | ||
|
||
tasks.withType<AbstractArchiveTask> { | ||
setProperty("archiveFileName", "xvm.jar") | ||
} | ||
|
||
tasks.withType(Jar::class) { | ||
manifest { | ||
attributes["Manifest-Version"] = "1.0" | ||
attributes["Sealed"] = "true" | ||
attributes["Main-Class"] = "org.xvm.tool.Launcher" | ||
attributes["Name"] = "/org/xvm/" | ||
attributes["Specification-Title"] = "xvm" | ||
attributes["Specification-Version"] = "0.1" | ||
attributes["Specification-Vendor"] = "xtclang.org" | ||
attributes["Implementation-Title"] = "xvm-prototype" | ||
attributes["Implementation-Version"] = "0.1" | ||
attributes["Implementation-Vendor"] = "xtclang.org" | ||
} | ||
} | ||
|
||
sourceSets { | ||
main { | ||
java { | ||
exclude("./src/main/java") | ||
srcDir("./src") | ||
} | ||
resources { | ||
exclude("./src/main/resources") | ||
srcDir("./resources") | ||
allprojects { | ||
configurations.all { | ||
resolutionStrategy.dependencySubstitution { | ||
substitute(module("org.xtclang.xvm:utils")).with(project(":utils")) | ||
substitute(module("org.xtclang.xvm:unicode")).with(project(":unicode")) | ||
substitute(module("org.xtclang.xvm:ecstasy")).with(project(":ecstasy")) | ||
substitute(module("org.xtclang.xvm:javatools_bridge")).with(project(":javatools_bridge")) | ||
substitute(module("org.xtclang.xvm:javatools")).with(project(":javatools")) | ||
substitute(module("org.xtclang.xvm:javatools_launcher")).with(project(":javatools_launcher")) | ||
substitute(module("org.xtclang.xvm:xdk")).with(project(":xdk")) | ||
} | ||
} | ||
test { | ||
java { | ||
exclude("./src/test/java") | ||
// TODO srcDir("./tests") | ||
} | ||
resources { | ||
exclude("./src/test/resources") | ||
srcDir("./resources") | ||
|
||
repositories { | ||
jcenter { | ||
content { | ||
excludeGroup("org.xtclang.xvm") | ||
} | ||
} | ||
} | ||
} | ||
|
||
java { | ||
sourceCompatibility = JavaVersion.VERSION_11 | ||
targetCompatibility = JavaVersion.VERSION_11 | ||
} | ||
|
||
repositories { | ||
// Use jcenter for resolving dependencies. | ||
// You can declare any Maven/Ivy/file repository here. | ||
jcenter() | ||
} | ||
|
||
dependencies { | ||
// dependencies exported to consumers (found on their compile classpath), e.g.: | ||
// api("org.apache.commons:commons-math3:3.6.1") | ||
|
||
// dependencies used internally (not exposed to consumers on their own compile classpath), e.g.: | ||
// implementation("com.google.guava:guava:28.2-jre") | ||
|
||
// Use JUnit test framework | ||
testImplementation("junit:junit:4.12") | ||
} | ||
|
||
tasks.register<Copy>("copyJar") { | ||
description = "Copy the prototype JAR after it is built." | ||
dependsOn("build") | ||
from(file("${buildDir}/lib/xvm.jar")) | ||
into(file("${buildDir}/xdk/prototype")) | ||
implementation("org.xtclang.xvm:utils:") | ||
implementation("org.xtclang.xvm:unicode:") | ||
implementation("org.xtclang.xvm:ecstasy:") | ||
implementation("org.xtclang.xvm:javatools_bridge:") | ||
implementation("org.xtclang.xvm:javatools:") | ||
implementation("org.xtclang.xvm:javatools_launcher:") | ||
implementation("org.xtclang.xvm:xdk:") | ||
} | ||
|
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/* | ||
* Build file for the Ecstasy core library of the XDK. | ||
* | ||
* This project does NOT build the Ecstasy.xtc file. (The :xdk project builds it.) | ||
* | ||
* This project can update the Unicode data files, if a Unicode release has occurred and provided | ||
* a new `ucd.all.flat.zip`; that is the only time that the Unicode data files have to be updated. | ||
*/ | ||
|
||
tasks.register<Copy>("importUnicodeFiles") { | ||
description = "Copy the various Unicode data files from :unicode to :ecstasy project." | ||
from(file("${project(":unicode").buildDir}/resources/")) | ||
include("Char*.txt", "Char*.dat") | ||
into(file("src/main/resources/text/")) | ||
} | ||
|
||
tasks.register("rebuildUnicodeFiles") { | ||
description = "Force the rebuild of the `./src/main/resources/text` data files by running the :unicode project and copying the results." | ||
val make = project(":unicode").tasks["run"] | ||
val copy = tasks["importUnicodeFiles"] | ||
dependsOn(make) | ||
dependsOn(copy) | ||
copy.mustRunAfter(make) | ||
} | ||
|
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
xsrc/system/text/CharBlocks.txt → ...sy/src/main/resources/text/CharBlocks.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
xsrc/system/text/CharNums.txt → ecstasy/src/main/resources/text/CharNums.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
Nums: [index] "str" (freq) | ||
Nums: [index] "str" (freq) | ||
-------------------- | ||
[0] "-1/2" (1x) | ||
[1] "0" (83x) | ||
|
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
# Directory: ./javatools/ # | ||
|
||
This directory contains the "javatools" project, which is a | ||
set of Java classes that implement the Ecstasy lexer, parser, | ||
compiler, IR, runtime, etc. | ||
|
||
This project uses the library produced by the "utils" project, | ||
and the `implicit.x` resource file from the "ecstasy" project. | ||
|
||
Long term, this project will be used to help support IDE | ||
plug-ins for common Java-based IDEs, such as IntelliJ IDEA. | ||
|
||
(Note: The test portion of this project may have dependencies | ||
on test frameworks.) | ||
|
||
This project produces the `javatools.jar` file. | ||
|
||
The License is the Apache License, Version 2.0. | ||
|
||
## Compiler | ||
|
||
Status: Suitable for use | ||
|
||
* Driven by `org.xvm.tool.Compiler` | ||
* (The original command line tool for the compiler is | ||
`org.xvm.compiler.CommandLine`) | ||
* Lexed by `org.xvm.compiler.Lexer` into | ||
`org.xvm.compiler.Token` objects | ||
* Recursive descent parsed by `org.xvm.compiler.Parser` into | ||
`org.xvm.compiler.ast.AstNode` objects | ||
* AST nodes are multi-pass compiled (with optional re-queuing) | ||
via `org.xvm.compiler.ast.StageManager` | ||
|
||
## Assembler | ||
|
||
Status: Suitable for use | ||
|
||
* Structures are all based on `org.xvm.asm.XvmStructure` | ||
* Constant values and persistent identity references encoded | ||
as `org.xvm.asm.Constant` objects | ||
* Inheritance tree of component types starting with | ||
`org.xvm.asm.Component` | ||
* Virtual machine instructions encoded as `org.xvm.asm.Op` | ||
objects (see the `ops.txt` file in the documentation) | ||
|
||
## Runtime | ||
|
||
Status: Working proof-of-concept (will be replaced by an | ||
LLVM-based adaptive compiler). | ||
|
||
* Command line is `org.xvm.tool.Runner` | ||
* Implementation in `org.xvm.runtime` package | ||
|
||
**Warning:** This runtime is not speedy, by any stretch; this | ||
is expected, because it is only intended as a proof-of-concept. | ||
The runtime is currently implemented as an interpreter, and | ||
the interpreter (which would be naturally slow to begin with) | ||
has not been optimized. Its pupose is to be malleable and easy | ||
to test, so that we could prove out the design of the compiler | ||
and the Ecstasy IR. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/* | ||
* Build file for the Java tools portion of the XDK. | ||
*/ | ||
|
||
plugins { | ||
java | ||
} | ||
|
||
tasks.withType(Jar::class) { | ||
manifest { | ||
attributes["Manifest-Version"] = "1.0" | ||
attributes["Sealed"] = "true" | ||
attributes["Main-Class"] = "org.xvm.tool.Launcher" | ||
attributes["Name"] = "/org/xvm/" | ||
attributes["Specification-Title"] = "xvm" | ||
attributes["Specification-Version"] = "0.1.0" | ||
attributes["Specification-Vendor"] = "xtclang.org" | ||
attributes["Implementation-Title"] = "xvm-prototype" | ||
attributes["Implementation-Version"] = "0.1.0" | ||
attributes["Implementation-Vendor"] = "xtclang.org" | ||
} | ||
} | ||
|
||
java { | ||
sourceCompatibility = JavaVersion.VERSION_11 | ||
targetCompatibility = JavaVersion.VERSION_11 | ||
} | ||
|
||
dependencies { | ||
// Use JUnit test framework | ||
testImplementation("junit:junit:4.12") | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.