aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--documentation/bookmark/architecture.md2
-rw-r--r--documentation/bookmark/business/compensation.md2
-rw-r--r--documentation/bookmark/business/competitiveness.md2
-rw-r--r--documentation/bookmark/business/estimation.md4
-rw-r--r--documentation/bookmark/business/hierarchy.md2
-rw-r--r--documentation/bookmark/business/incentive.md4
-rw-r--r--documentation/bookmark/business/organizational_design.md2
-rw-r--r--documentation/bookmark/business/service.md4
-rw-r--r--documentation/bookmark/communication.md2
-rw-r--r--documentation/bookmark/comonad.md3
-rw-r--r--documentation/bookmark/database.md2
-rw-r--r--documentation/bookmark/game/design.md2
-rw-r--r--documentation/bookmark/graphic/2d.md4
-rw-r--r--documentation/bookmark/html.md4
-rw-r--r--documentation/bookmark/law.md2
-rw-r--r--documentation/bookmark/logging.md1
-rw-r--r--documentation/bookmark/math/geometry/3d.md1
-rw-r--r--documentation/bookmark/math/geometry/bezier_curves.md2
-rw-r--r--documentation/bookmark/open_source.md5
-rw-r--r--documentation/bookmark/procedural_generation/art.md4
-rw-r--r--documentation/bookmark/programming_language/design.md2
-rw-r--r--documentation/bookmark/web_framework.md4
-rw-r--r--stdlib/source/library/lux/meta/compiler/language/lux/phase/extension/analysis/jvm.lux2
-rw-r--r--stdlib/source/library/lux/meta/compiler/language/lux/phase/extension/declaration/jvm.lux6
-rw-r--r--stdlib/source/library/lux/meta/compiler/language/lux/phase/extension/generation/jvm/host.lux2
-rw-r--r--stdlib/source/library/lux/meta/compiler/language/lux/phase/generation/jvm/function.lux4
-rw-r--r--stdlib/source/library/lux/meta/compiler/language/lux/phase/generation/jvm/host.lux2
-rw-r--r--stdlib/source/library/lux/meta/compiler/language/lux/phase/generation/jvm/program.lux2
-rw-r--r--stdlib/source/library/lux/meta/compiler/language/lux/phase/generation/jvm/runtime.lux492
-rw-r--r--stdlib/source/library/lux/meta/target/jvm/attribute.lux26
-rw-r--r--stdlib/source/library/lux/meta/target/jvm/class.lux25
-rw-r--r--stdlib/source/test/lux/meta/extension.lux2
32 files changed, 340 insertions, 283 deletions
diff --git a/documentation/bookmark/architecture.md b/documentation/bookmark/architecture.md
index a5fca0ab8..5216418db 100644
--- a/documentation/bookmark/architecture.md
+++ b/documentation/bookmark/architecture.md
@@ -1,6 +1,6 @@
# Reference
-0. []()
+0. [Why Do We Create System Architecture Diagrams Anyway?](https://www.ilograph.com/blog/posts/why-create-system-architecture-diagrams/)
0. [A Syntactic Theory of Software Architecture](https://www.panda.sys.t.u-tokyo.ac.jp/kushiro/ReferencePaper/Pattern&Framework/00385969.pdf)
0. [How to plan the architectural attributes?](https://kalali.blog/2022/06/software-architecture-attributes-how-to-decide/)
0. [Architectural Decision Records](https://adr.github.io/)
diff --git a/documentation/bookmark/business/compensation.md b/documentation/bookmark/business/compensation.md
index 8b6d02af4..16e4c8bb9 100644
--- a/documentation/bookmark/business/compensation.md
+++ b/documentation/bookmark/business/compensation.md
@@ -1,5 +1,5 @@
# Reference
-0. []()
+0. [Rewriting the story of compensation](https://news.shopify.com/rewriting-the-story-of-compensation#)
0. [Compensation as a Reflection of Values](https://oxide.computer/blog/compensation-as-a-reflection-of-values)
diff --git a/documentation/bookmark/business/competitiveness.md b/documentation/bookmark/business/competitiveness.md
index c6d91341f..b0cb1b0d3 100644
--- a/documentation/bookmark/business/competitiveness.md
+++ b/documentation/bookmark/business/competitiveness.md
@@ -1,5 +1,7 @@
# Reference
+0. [The Lens Of Asymmetry](https://blog.kerryjones.net/posts/the-lens-of-asymmetry/)
+0. [Meritocracy vs Topocracy](https://www.michelecoscia.com/?p=2205)
0. [Who Cares If It Scales?](https://betterprogramming.pub/who-cares-if-it-scales-1946adca8167)
0. [On Structural Advantage](https://medium.com/gamemakers/on-structural-advantage-7c6d6440ebc1)
0. [Moats: Durable competitive advantage](https://longform.asmartbear.com/posts/moats/)
diff --git a/documentation/bookmark/business/estimation.md b/documentation/bookmark/business/estimation.md
new file mode 100644
index 000000000..73131eca5
--- /dev/null
+++ b/documentation/bookmark/business/estimation.md
@@ -0,0 +1,4 @@
+# Reference
+
+0. [11 Laws of Software Estimation for Complex Work](https://mdalmijn.com/11-laws-of-software-estimation-for-complex-work/)
+
diff --git a/documentation/bookmark/business/hierarchy.md b/documentation/bookmark/business/hierarchy.md
index ed4a1f7e3..8bc94b534 100644
--- a/documentation/bookmark/business/hierarchy.md
+++ b/documentation/bookmark/business/hierarchy.md
@@ -1,6 +1,6 @@
# Reference
-0. []()
+0. [The Hierarchy Is Bullshit (And Bad For Business)](https://charity.wtf/2022/09/23/the-hierarchy-is-bullshit-and-bad-for-business/)
0. [Why tall hierarchies slow organizations down and how to fix them](https://lucasfcosta.com/2022/08/13/decision-making-hierarchies.html)
0. [Rethinking Hierarchy in the Workplace: Flat structures, research shows, can create more functional teams.](https://www.gsb.stanford.edu/insights/rethinking-hierarchy-workplace)
diff --git a/documentation/bookmark/business/incentive.md b/documentation/bookmark/business/incentive.md
new file mode 100644
index 000000000..7a0355d9b
--- /dev/null
+++ b/documentation/bookmark/business/incentive.md
@@ -0,0 +1,4 @@
+# Reference
+
+0. [Be critical or be corrupted](https://www.cenizal.com/be-critical-or-be-corrupted/)
+
diff --git a/documentation/bookmark/business/organizational_design.md b/documentation/bookmark/business/organizational_design.md
index 7ed380e31..6006c0ac6 100644
--- a/documentation/bookmark/business/organizational_design.md
+++ b/documentation/bookmark/business/organizational_design.md
@@ -1,5 +1,5 @@
# Reference
-0. []()
+0. [metalabel](https://www.metalabel.xyz/)
0. [Work Is Work: In which returns diminish.](https://codahale.com/work-is-work/)
diff --git a/documentation/bookmark/business/service.md b/documentation/bookmark/business/service.md
new file mode 100644
index 000000000..c3ff09125
--- /dev/null
+++ b/documentation/bookmark/business/service.md
@@ -0,0 +1,4 @@
+# Reference
+
+0. [White glove service](https://seths.blog/2022/09/white-glove-service/)
+
diff --git a/documentation/bookmark/communication.md b/documentation/bookmark/communication.md
index 9b1d5b7a1..b6621cf7d 100644
--- a/documentation/bookmark/communication.md
+++ b/documentation/bookmark/communication.md
@@ -1,5 +1,5 @@
# Reference
-0. []()
+0. [Beware What Sounds Insightful](https://commoncog.com/beware-what-sounds-insightful/)
0. [Don’t sound weak. Use negations](https://tips.ariyh.com/p/negations-increase-engagement?triedSigningIn=true)
diff --git a/documentation/bookmark/comonad.md b/documentation/bookmark/comonad.md
index f7f9886c1..f6de6e2c4 100644
--- a/documentation/bookmark/comonad.md
+++ b/documentation/bookmark/comonad.md
@@ -1,4 +1,5 @@
# Reference
-1. [Functional Flocks](https://ec-jones.github.io/flocking.html)
+0. [Comonads as Spaces](https://blog.functorial.com/posts/2016-08-07-Comonads-As-Spaces.html)
+0. [Functional Flocks](https://ec-jones.github.io/flocking.html)
diff --git a/documentation/bookmark/database.md b/documentation/bookmark/database.md
index ae966251f..63f40ca45 100644
--- a/documentation/bookmark/database.md
+++ b/documentation/bookmark/database.md
@@ -140,13 +140,13 @@
# Exemplar
-0. []()
0. [Debunking “Purpose-Built Data Systems”: Enter the Universal Database](https://tiledb.com/blog/debunking-purpose-built-data-systems-enter-the-universal-database-2021-08-04)
0. [Irmin](https://irmin.org/)
0. [Database of Databases](https://dbdb.io/)
## General
+0. [How FoundationDB works and why it works](https://blog.the-pans.com/notes-on-the-foundationdb-paper/)
0. [FeatureBase: The First OLAP Database Built Entirely on Bitmaps](https://www.featurebase.com/)
0. [FeatureBase](https://github.com/FeatureBaseDB/featurebase)
0. [Velox: Meta’s Unified Execution Engine](https://research.facebook.com/publications/velox-metas-unified-execution-engine/)
diff --git a/documentation/bookmark/game/design.md b/documentation/bookmark/game/design.md
index fdb3eb4d3..478780aed 100644
--- a/documentation/bookmark/game/design.md
+++ b/documentation/bookmark/game/design.md
@@ -1,6 +1,6 @@
# Reference
-0. []()
+0. [Ludonarrative dissonance](https://en.wikipedia.org/wiki/Ludonarrative_dissonance)
0. [Creating a system of game play notation](https://lostgarden.home.blog/2006/01/16/creating-a-system-of-game-play-notation/)
0. [How to design an Abstract Strategy Board Game *Top 10 Mechanisms*](https://www.youtube.com/watch?v=fBWDfXE9xsU)
diff --git a/documentation/bookmark/graphic/2d.md b/documentation/bookmark/graphic/2d.md
new file mode 100644
index 000000000..54ce89464
--- /dev/null
+++ b/documentation/bookmark/graphic/2d.md
@@ -0,0 +1,4 @@
+# Reference
+
+0. [2D graphics primitives](http://www.mare.ee/indrek/misc/2d.pdf)
+
diff --git a/documentation/bookmark/html.md b/documentation/bookmark/html.md
new file mode 100644
index 000000000..4c1e698e2
--- /dev/null
+++ b/documentation/bookmark/html.md
@@ -0,0 +1,4 @@
+# Reference
+
+0. [Idiosyncrasies of the HTML parser](https://htmlparser.info/)
+
diff --git a/documentation/bookmark/law.md b/documentation/bookmark/law.md
index da270d6fe..1976f2ee2 100644
--- a/documentation/bookmark/law.md
+++ b/documentation/bookmark/law.md
@@ -1,6 +1,6 @@
# Reference
-0. []()
+0. [Poor writing, not specialized concepts, drives processing difficulty in legal language](https://www.sciencedirect.com/science/article/pii/S0010027722000580)
0. [Legal Sources for Not-a-Lawyers: learn some law without totally warping your brain](https://writing.kemitchell.com/2022/06/26/Legal-Sources-Not-a-Lawyers)
0. [Text Prudent](https://textprudent.com/)
0. [Reviewers Edition](https://reviewersedition.org/)
diff --git a/documentation/bookmark/logging.md b/documentation/bookmark/logging.md
index ea8d31ce2..f065e5540 100644
--- a/documentation/bookmark/logging.md
+++ b/documentation/bookmark/logging.md
@@ -1,5 +1,6 @@
# Reference
+0. [Better Java logging, inspired by Clojure and Rust](https://mccue.dev/pages/9-25-22-better-java-logging)
0. [Spans - a key concept of distributed tracing](https://signoz.io/blog/distributed-tracing-span/)
0. [Structured Logging for Python](https://www.structlog.org/en/latest/)
0. [The Value of Correlation IDs](https://www.rapid7.com/blog/post/2016/12/23/the-value-of-correlation-ids/)
diff --git a/documentation/bookmark/math/geometry/3d.md b/documentation/bookmark/math/geometry/3d.md
index ea6ebebda..4ce5c86a6 100644
--- a/documentation/bookmark/math/geometry/3d.md
+++ b/documentation/bookmark/math/geometry/3d.md
@@ -1,4 +1,5 @@
# Reference
+0. [Fast, Branchless Ray/Bounding Box Intersections, Part 3: Boundaries](https://tavianator.com/2022/ray_box_boundary.html)
0. [Exponentially Better Rotations](https://thenumbat.github.io/Exponential-Rotations/)
diff --git a/documentation/bookmark/math/geometry/bezier_curves.md b/documentation/bookmark/math/geometry/bezier_curves.md
index d627248d9..a471fe9d3 100644
--- a/documentation/bookmark/math/geometry/bezier_curves.md
+++ b/documentation/bookmark/math/geometry/bezier_curves.md
@@ -1,6 +1,6 @@
# Reference
-0. []()
+0. [Fast cubic Bézier curve offsetting.](https://gasiulis.name/cubic-curve-offsetting/)
0. [Parallel curves of cubic Béziers](https://raphlinus.github.io/curves/2022/09/09/parallel-beziers.html)
0. [Curves and Surfaces](https://ciechanow.ski/curves-and-surfaces/)
0. [The Beauty of Bézier Curves](https://www.youtube.com/watch?v=aVwxzDHniEw)
diff --git a/documentation/bookmark/open_source.md b/documentation/bookmark/open_source.md
index 2a8c67a86..b9561d140 100644
--- a/documentation/bookmark/open_source.md
+++ b/documentation/bookmark/open_source.md
@@ -1,6 +1,9 @@
# Reference
-0. []()
+0. [StarTrack](https://github.com/seladb/StarTrack-js)
+0. [1% rule](https://en.wikipedia.org/wiki/1%25_rule)
+0. [Open Source Antidote: critical and alternative views on free and open source software](https://writing.kemitchell.com/lists/Antidote.html)
+0. [There is no “software supply chain”](https://iliana.fyi/blog/software-supply-chain/)
0. [The Myth of Mass Collaboration](https://staltz.com/the-myth-of-mass-collaboration.html)
0. [Open Source Explained](https://blog.erlend.sh/open-source-explained)
0. [Trust Signals in Open Source Projects](https://hackernoon.com/the-signs-of-a-great-open-source-project)
diff --git a/documentation/bookmark/procedural_generation/art.md b/documentation/bookmark/procedural_generation/art.md
new file mode 100644
index 000000000..990770381
--- /dev/null
+++ b/documentation/bookmark/procedural_generation/art.md
@@ -0,0 +1,4 @@
+# Reference
+
+0. [Flow Fields](https://tylerxhobbs.com/essays/2020/flow-fields)
+
diff --git a/documentation/bookmark/programming_language/design.md b/documentation/bookmark/programming_language/design.md
index 3957c22ac..4c259af8f 100644
--- a/documentation/bookmark/programming_language/design.md
+++ b/documentation/bookmark/programming_language/design.md
@@ -1,5 +1,5 @@
# Reference
-0. []()
+0. [Commentary on Friction in Language Design](https://www.youtube.com/watch?v=aq2lsAbtWc4)
0. [Computer Science - Brian Kernighan on successful language design](https://www.youtube.com/watch?v=Sg4U4r_AgJU)
diff --git a/documentation/bookmark/web_framework.md b/documentation/bookmark/web_framework.md
index 9c6ab4865..930585786 100644
--- a/documentation/bookmark/web_framework.md
+++ b/documentation/bookmark/web_framework.md
@@ -5,7 +5,7 @@
# Virtual DOM
-0. []()
+0. [You Might Not Need The Virtual DOM](https://blog.functorial.com/posts/2018-03-12-You-Might-Not-Need-The-Virtual-DOM.html)
0. [Virtual DOM is pure overhead](https://svelte.dev/blog/virtual-dom-is-pure-overhead)
0. [million: <1kb virtual DOM - it's fast!](https://million.js.org/)
0. [Optimal Virtual DOM](https://blog.kabir.sh/posts/optimal-virtual-dom.html)
@@ -17,7 +17,7 @@
# Reference
-0. []()
+0. [JavaScript APIs You Don’t Know About](https://www.smashingmagazine.com/2022/09/javascript-api-guide/)
0. [JavaScript Hydration Is a Workaround, Not a Solution](https://thenewstack.io/javascript-hydration-is-a-workaround-not-a-solution/)
0. [Functional UI](https://take.surf/2022/07/04/functional-ui)
0. [UIs Are Not Pure Functions of the Model - React.js and Cocoa Side by Side](https://blog.metaobject.com/2018/12/uis-are-not-pure-functions-of-model.html)
diff --git a/stdlib/source/library/lux/meta/compiler/language/lux/phase/extension/analysis/jvm.lux b/stdlib/source/library/lux/meta/compiler/language/lux/phase/extension/analysis/jvm.lux
index 3cd840518..170753ca1 100644
--- a/stdlib/source/library/lux/meta/compiler/language/lux/phase/extension/analysis/jvm.lux
+++ b/stdlib/source/library/lux/meta/compiler/language/lux/phase/extension/analysis/jvm.lux
@@ -2424,7 +2424,7 @@
(list#each ..class_name interfaces)
fields
methods
- sequence.empty))))
+ (list)))))
(def constant::modifier
(Modifier field.Field)
diff --git a/stdlib/source/library/lux/meta/compiler/language/lux/phase/extension/declaration/jvm.lux b/stdlib/source/library/lux/meta/compiler/language/lux/phase/extension/declaration/jvm.lux
index 6d67ae206..a51e62ed5 100644
--- a/stdlib/source/library/lux/meta/compiler/language/lux/phase/extension/declaration/jvm.lux
+++ b/stdlib/source/library/lux/meta/compiler/language/lux/phase/extension/declaration/jvm.lux
@@ -696,7 +696,7 @@
(list#each ..class_name interfaces)
fields
methods
- sequence.empty))))
+ (list)))))
(def (mock_value valueT)
(-> (Type Value) (Bytecode Any))
@@ -914,7 +914,7 @@
(list#each ..class_name interfaces)
(list#each ..field_definition fields)
(list#each product.right methods)
- sequence.empty))
+ (list)))
_ (..save_class! name bytecode all_dependencies)]
(in declaration.no_requirements)))]))
@@ -956,7 +956,7 @@
(list#each ..class_name supers)
(list)
(list#each ..method_declaration method_declarations)
- sequence.empty))
+ (list)))
artifact_id (generation.learn_custom name unit.none)
.let [artifact [name bytecode]]
_ (generation.execute! artifact)
diff --git a/stdlib/source/library/lux/meta/compiler/language/lux/phase/extension/generation/jvm/host.lux b/stdlib/source/library/lux/meta/compiler/language/lux/phase/extension/generation/jvm/host.lux
index cbd08f066..5f51dcaba 100644
--- a/stdlib/source/library/lux/meta/compiler/language/lux/phase/extension/generation/jvm/host.lux
+++ b/stdlib/source/library/lux/meta/compiler/language/lux/phase/extension/generation/jvm/host.lux
@@ -1341,7 +1341,7 @@
(foreign.variables total_environment)
(list.partial (..with_anonymous_init class total_environment super_class inputsTI)
methods!)
- (sequence.sequence)))
+ (list)))
.let [artifact [anonymous_class_name bytecode]]
_ (//////generation.execute! artifact)
_ (//////generation.save! artifact_id {.#None} artifact)]
diff --git a/stdlib/source/library/lux/meta/compiler/language/lux/phase/generation/jvm/function.lux b/stdlib/source/library/lux/meta/compiler/language/lux/phase/generation/jvm/function.lux
index e7fa794d8..76640103d 100644
--- a/stdlib/source/library/lux/meta/compiler/language/lux/phase/generation/jvm/function.lux
+++ b/stdlib/source/library/lux/meta/compiler/language/lux/phase/generation/jvm/function.lux
@@ -20,6 +20,7 @@
["_" bytecode (.only Label Bytecode) (.use "[1]#[0]" monad)]
["[0]" version]
["[0]" modifier (.only Modifier) (.use "[1]#[0]" monoid)]
+ ["[0]" attribute]
["[0]" field (.only Field)]
["[0]" method (.only Method)]
["[0]" class (.only Class)]
@@ -114,6 +115,7 @@
(generate archive bodyS)))
.let [function_class (//runtime.class_name function_context)]
[fields methods instance] (..with generate archive @begin function_class environment arity bodyG)
+ module generation.module
class (phase.lifted (class.class version.v6_0
..modifier
(name.internal function_class)
@@ -121,7 +123,7 @@
(..internal /abstract.class) (list)
fields
methods
- (sequence.sequence)))
+ (list (attribute.source_file module))))
.let [bytecode [function_class (\\format.result class.format class)]]
_ (generation.execute! bytecode)
_ (generation.save! (product.right function_context) {.#None} bytecode)]
diff --git a/stdlib/source/library/lux/meta/compiler/language/lux/phase/generation/jvm/host.lux b/stdlib/source/library/lux/meta/compiler/language/lux/phase/generation/jvm/host.lux
index a7f0a8444..ea6b16da0 100644
--- a/stdlib/source/library/lux/meta/compiler/language/lux/phase/generation/jvm/host.lux
+++ b/stdlib/source/library/lux/meta/compiler/language/lux/phase/generation/jvm/host.lux
@@ -129,7 +129,7 @@
valueG
(_.putstatic (type.class bytecode_name (list)) //value.field :value:)
_.return)}))
- (sequence.sequence))]
+ (list))]
(io.run! (do [! (try.with io.monad)]
[bytecode (at ! each (\\format.result class.format)
(io.io bytecode))
diff --git a/stdlib/source/library/lux/meta/compiler/language/lux/phase/generation/jvm/program.lux b/stdlib/source/library/lux/meta/compiler/language/lux/phase/generation/jvm/program.lux
index 097959d4c..de928bd0b 100644
--- a/stdlib/source/library/lux/meta/compiler/language/lux/phase/generation/jvm/program.lux
+++ b/stdlib/source/library/lux/meta/compiler/language/lux/phase/generation/jvm/program.lux
@@ -165,4 +165,4 @@
(list)
(list)
(list main)
- (sequence.sequence)))]))
+ (list)))]))
diff --git a/stdlib/source/library/lux/meta/compiler/language/lux/phase/generation/jvm/runtime.lux b/stdlib/source/library/lux/meta/compiler/language/lux/phase/generation/jvm/runtime.lux
index c1ffb137b..9966acbd6 100644
--- a/stdlib/source/library/lux/meta/compiler/language/lux/phase/generation/jvm/runtime.lux
+++ b/stdlib/source/library/lux/meta/compiler/language/lux/phase/generation/jvm/runtime.lux
@@ -160,14 +160,14 @@
$right? _.aload_1
$value _.aload_2]
(method.method ..modifier ..variant::name
- .false ..variant::type
- (list)
- {.#Some (all _.composite
- new_variant ... A[3]
- (..set! ..variant_lefts $lefts) ... A[3]
- (..set! ..variant_right? $right?) ... A[3]
- (..set! ..variant_value $value) ... A[3]
- _.areturn)})))
+ .false ..variant::type
+ (list)
+ {.#Some (all _.composite
+ new_variant ... A[3]
+ (..set! ..variant_lefts $lefts) ... A[3]
+ (..set! ..variant_right? $right?) ... A[3]
+ (..set! ..variant_value $value) ... A[3]
+ _.areturn)})))
(def .public left_right? _.aconst_null)
(def .public right_right? ..unit)
@@ -222,15 +222,15 @@
(def decode_frac::method
(method.method ..modifier ..decode_frac::name
- .false ..decode_frac::type
- (list)
- {.#Some
- (..risky
- (all _.composite
- _.aload_0
- (_.invokestatic //type.frac "parseDouble" (type.method [(list) (list //type.text) type.double (list)]))
- (//value.wrap type.double)
- ))}))
+ .false ..decode_frac::type
+ (list)
+ {.#Some
+ (..risky
+ (all _.composite
+ _.aload_0
+ (_.invokestatic //type.frac "parseDouble" (type.method [(list) (list //type.text) type.double (list)]))
+ (//value.wrap type.double)
+ ))}))
(def .public log!
(Bytecode Any)
@@ -259,12 +259,12 @@
(def (failure name message)
(-> Text Text (Resource Method))
(method.method ..modifier name
- .false ..failure::type
- (list)
- {.#Some
- (all _.composite
- (..illegal_state_exception message)
- _.athrow)}))
+ .false ..failure::type
+ (list)
+ {.#Some
+ (all _.composite
+ (..illegal_state_exception message)
+ _.athrow)}))
(def pm_failure::name "pm_failure")
(def .public pm_failure (..procedure ..pm_failure::name ..failure::type))
@@ -281,19 +281,19 @@
(def push::method
(method.method ..modifier ..push::name
- .false ..push::type
- (list)
- {.#Some
- (let [new_stack_frame! (all _.composite
- _.iconst_2
- (_.anewarray //type.value))
- $head _.aload_1
- $tail _.aload_0]
- (all _.composite
- new_stack_frame!
- (..set! ..stack_head $head)
- (..set! ..stack_tail $tail)
- _.areturn))}))
+ .false ..push::type
+ (list)
+ {.#Some
+ (let [new_stack_frame! (all _.composite
+ _.iconst_2
+ (_.anewarray //type.value))
+ $head _.aload_1
+ $tail _.aload_0]
+ (all _.composite
+ new_stack_frame!
+ (..set! ..stack_head $head)
+ (..set! ..stack_tail $tail)
+ _.areturn))}))
(def when::name "when")
(def when::type (type.method [(list) (list //type.variant //type.lefts //type.right?) //type.value (list)]))
@@ -301,80 +301,80 @@
(def when::method
(method.method ..modifier ..when::name
- .false ..when::type
- (list)
- {.#Some
- (do _.monad
- [@loop _.new_label
- @perfect_match! _.new_label
- @lefts_match! _.new_label
- @maybe_nested _.new_label
- @mismatch! _.new_label
- .let [$variant _.aload_0
- $lefts _.iload_1
- $right? _.aload_2
-
- ::lefts (all _.composite
- (..get ..variant_lefts)
- (//value.unwrap type.int))
- ::right? (..get ..variant_right?)
- ::value (..get ..variant_value)
-
- not_found _.aconst_null
-
- super_nested_lefts (all _.composite
- _.swap
- _.isub
- (_.int (i32.i32 (.i64 +1)))
- _.isub)
- super_nested (all _.composite
- ... lefts, sumT
- super_nested_lefts ... super_lefts
- $variant ::right? ... super_lefts, super_right
- $variant ::value ... super_lefts, super_right, super_value
- ..variant)
-
- update_$variant (all _.composite
- $variant ::value
- (_.checkcast //type.variant)
- _.astore_0)
- update_$lefts (all _.composite
- _.isub
- (_.int (i32.i32 (.i64 +1)))
- _.isub)
- again (is (-> Label (Bytecode Any))
- (function (_ @)
- (all _.composite
- ... lefts, sumT
- update_$variant ... lefts, sumT
- update_$lefts ... sub_lefts
- (_.goto @))))]]
- (all _.composite
- $lefts
- (_.set_label @loop)
- $variant ::lefts
- _.dup2 (_.if_icmpeq @lefts_match!)
- _.dup2 (_.if_icmpgt @maybe_nested)
- $right? (_.ifnull @mismatch!) ... lefts, sumT
- super_nested ... super_variant
- _.areturn
- (_.set_label @lefts_match!) ... lefts, sumT
- $right? ... lefts, sumT, wants_right?
- $variant ::right? ... lefts, sumT, wants_right?, is_right?
- (_.if_acmpeq @perfect_match!) ... lefts, sumT
- (_.set_label @mismatch!) ... lefts, sumT
- ... _.pop2
- not_found
- _.areturn
- (_.set_label @maybe_nested) ... lefts, sumT
- $variant ::right? ... lefts, sumT, right?
- (_.ifnull @mismatch!) ... lefts, sumT
- (again @loop)
- (_.set_label @perfect_match!) ... lefts, sumT
- ... _.pop2
- $variant ::value
- _.areturn
- ))}))
+ .false ..when::type
+ (list)
+ {.#Some
+ (do _.monad
+ [@loop _.new_label
+ @perfect_match! _.new_label
+ @lefts_match! _.new_label
+ @maybe_nested _.new_label
+ @mismatch! _.new_label
+ .let [$variant _.aload_0
+ $lefts _.iload_1
+ $right? _.aload_2
+
+ ::lefts (all _.composite
+ (..get ..variant_lefts)
+ (//value.unwrap type.int))
+ ::right? (..get ..variant_right?)
+ ::value (..get ..variant_value)
+
+ not_found _.aconst_null
+
+ super_nested_lefts (all _.composite
+ _.swap
+ _.isub
+ (_.int (i32.i32 (.i64 +1)))
+ _.isub)
+ super_nested (all _.composite
+ ... lefts, sumT
+ super_nested_lefts ... super_lefts
+ $variant ::right? ... super_lefts, super_right
+ $variant ::value ... super_lefts, super_right, super_value
+ ..variant)
+
+ update_$variant (all _.composite
+ $variant ::value
+ (_.checkcast //type.variant)
+ _.astore_0)
+ update_$lefts (all _.composite
+ _.isub
+ (_.int (i32.i32 (.i64 +1)))
+ _.isub)
+ again (is (-> Label (Bytecode Any))
+ (function (_ @)
+ (all _.composite
+ ... lefts, sumT
+ update_$variant ... lefts, sumT
+ update_$lefts ... sub_lefts
+ (_.goto @))))]]
+ (all _.composite
+ $lefts
+ (_.set_label @loop)
+ $variant ::lefts
+ _.dup2 (_.if_icmpeq @lefts_match!)
+ _.dup2 (_.if_icmpgt @maybe_nested)
+ $right? (_.ifnull @mismatch!) ... lefts, sumT
+ super_nested ... super_variant
+ _.areturn
+ (_.set_label @lefts_match!) ... lefts, sumT
+ $right? ... lefts, sumT, wants_right?
+ $variant ::right? ... lefts, sumT, wants_right?, is_right?
+ (_.if_acmpeq @perfect_match!) ... lefts, sumT
+ (_.set_label @mismatch!) ... lefts, sumT
+ ... _.pop2
+ not_found
+ _.areturn
+ (_.set_label @maybe_nested) ... lefts, sumT
+ $variant ::right? ... lefts, sumT, right?
+ (_.ifnull @mismatch!) ... lefts, sumT
+ (again @loop)
+ (_.set_label @perfect_match!) ... lefts, sumT
+ ... _.pop2
+ $variant ::value
+ _.areturn
+ ))}))
(def projection_type (type.method [(list) (list //type.tuple //type.offset) //type.value (list)]))
@@ -413,61 +413,61 @@
left_projection::method
(method.method ..modifier ..left_projection::name
- .false ..projection_type
- (list)
- {.#Some
- (do _.monad
- [@loop _.new_label
- @recursive _.new_label
- .let [::left (all _.composite
- $lefts
- _.aaload)]]
- (all _.composite
- (_.set_label @loop)
- $lefts $last_right (_.if_icmpge @recursive)
- $tuple ::left
- _.areturn
- (_.set_label @recursive)
- ... Recursive
- (recur @loop)))})
+ .false ..projection_type
+ (list)
+ {.#Some
+ (do _.monad
+ [@loop _.new_label
+ @recursive _.new_label
+ .let [::left (all _.composite
+ $lefts
+ _.aaload)]]
+ (all _.composite
+ (_.set_label @loop)
+ $lefts $last_right (_.if_icmpge @recursive)
+ $tuple ::left
+ _.areturn
+ (_.set_label @recursive)
+ ... Recursive
+ (recur @loop)))})
right_projection::method
(method.method ..modifier ..right_projection::name
- .false ..projection_type
- (list)
- {.#Some
- (do _.monad
- [@loop _.new_label
- @not_tail _.new_label
- @slice _.new_label
- .let [$right (all _.composite
- $lefts
- _.iconst_1
- _.iadd)
- $::nested (all _.composite
- $tuple
- _.swap
- _.aaload)
- super_nested (all _.composite
- $tuple
- $right
- $tuple::size
- (_.invokestatic (type.class "java.util.Arrays" (list)) "copyOfRange"
- (type.method [(list) (list //type.tuple //type.index //type.index) //type.tuple (list)])))]]
- (all _.composite
- (_.set_label @loop)
- $last_right $right
- _.dup2 (_.if_icmpne @not_tail)
- ... _.pop
- $::nested
- _.areturn
- (_.set_label @not_tail)
- (_.if_icmpgt @slice)
- ... Must recurse
- (recur @loop)
- (_.set_label @slice)
- super_nested
- _.areturn))})]
+ .false ..projection_type
+ (list)
+ {.#Some
+ (do _.monad
+ [@loop _.new_label
+ @not_tail _.new_label
+ @slice _.new_label
+ .let [$right (all _.composite
+ $lefts
+ _.iconst_1
+ _.iadd)
+ $::nested (all _.composite
+ $tuple
+ _.swap
+ _.aaload)
+ super_nested (all _.composite
+ $tuple
+ $right
+ $tuple::size
+ (_.invokestatic (type.class "java.util.Arrays" (list)) "copyOfRange"
+ (type.method [(list) (list //type.tuple //type.index //type.index) //type.tuple (list)])))]]
+ (all _.composite
+ (_.set_label @loop)
+ $last_right $right
+ _.dup2 (_.if_icmpne @not_tail)
+ ... _.pop
+ $::nested
+ _.areturn
+ (_.set_label @not_tail)
+ (_.if_icmpgt @slice)
+ ... Must recurse
+ (recur @loop)
+ (_.set_label @slice)
+ super_nested
+ _.areturn))})]
[left_projection::method
right_projection::method]))
@@ -493,63 +493,63 @@
(def try::method
(method.method ..modifier ..try::name
- .false ..try::type
- (list)
- {.#Some
- (do _.monad
- [@try _.new_label
- @handler _.new_label
- .let [$unsafe ..this
-
- ^StringWriter (type.class "java.io.StringWriter" (list))
- string_writer (all _.composite
- (_.new ^StringWriter)
- _.dup
- (_.invokespecial ^StringWriter "<init>" (type.method [(list) (list) type.void (list)])))
-
- ^PrintWriter (type.class "java.io.PrintWriter" (list))
- print_writer (all _.composite
- ... WTW
- (_.new ^PrintWriter) ... WTWP
- _.dup_x1 ... WTPWP
- _.swap ... WTPPW
- ..true ... WTPPWZ
- (_.invokespecial ^PrintWriter "<init>" (type.method [(list) (list (type.class "java.io.Writer" (list)) type.boolean) type.void (list)]))
- ... WTP
- )
- unsafe_application (all _.composite
- $unsafe
- ..unit
- ..apply)
- stack_trace (all _.composite
- ... T
- string_writer ... TW
- _.dup_x1 ... WTW
- print_writer ... WTP
- (_.invokevirtual //type.error "printStackTrace" (type.method [(list) (list ^PrintWriter) type.void (list)])) ... W
- (_.invokevirtual ^StringWriter "toString" (type.method [(list) (list) //type.text (list)])) ... S
- )]]
- (all _.composite
- (_.try @try @handler @handler //type.error)
- (_.set_label @try)
- unsafe_application
- ..right_injection
- _.areturn
- (_.set_label @handler) ... T
- stack_trace ... S
- ..left_injection
- _.areturn
- ))}))
+ .false ..try::type
+ (list)
+ {.#Some
+ (do _.monad
+ [@try _.new_label
+ @handler _.new_label
+ .let [$unsafe ..this
+
+ ^StringWriter (type.class "java.io.StringWriter" (list))
+ string_writer (all _.composite
+ (_.new ^StringWriter)
+ _.dup
+ (_.invokespecial ^StringWriter "<init>" (type.method [(list) (list) type.void (list)])))
+
+ ^PrintWriter (type.class "java.io.PrintWriter" (list))
+ print_writer (all _.composite
+ ... WTW
+ (_.new ^PrintWriter) ... WTWP
+ _.dup_x1 ... WTPWP
+ _.swap ... WTPPW
+ ..true ... WTPPWZ
+ (_.invokespecial ^PrintWriter "<init>" (type.method [(list) (list (type.class "java.io.Writer" (list)) type.boolean) type.void (list)]))
+ ... WTP
+ )
+ unsafe_application (all _.composite
+ $unsafe
+ ..unit
+ ..apply)
+ stack_trace (all _.composite
+ ... T
+ string_writer ... TW
+ _.dup_x1 ... WTW
+ print_writer ... WTP
+ (_.invokevirtual //type.error "printStackTrace" (type.method [(list) (list ^PrintWriter) type.void (list)])) ... W
+ (_.invokevirtual ^StringWriter "toString" (type.method [(list) (list) //type.text (list)])) ... S
+ )]]
+ (all _.composite
+ (_.try @try @handler @handler //type.error)
+ (_.set_label @try)
+ unsafe_application
+ ..right_injection
+ _.areturn
+ (_.set_label @handler) ... T
+ stack_trace ... S
+ ..left_injection
+ _.areturn
+ ))}))
(def throw::method
(method.method ..modifier ..throw::name
- .false ..throw::type
- (list)
- {.#Some
- (all _.composite
- _.aload_0
- _.athrow
- )}))
+ .false ..throw::type
+ (list)
+ {.#Some
+ (all _.composite
+ _.aload_0
+ _.athrow
+ )}))
(def reflection
(All (_ category)
@@ -586,7 +586,7 @@
..try::method
..throw::method))
- sequence.empty))]
+ (list)))]
(do ////.monad
[_ (generation.execute! [class bytecode])
_ (generation.save! ..artifact_id {.#None} [class bytecode])]
@@ -599,36 +599,36 @@
//function/arity.maximum)
(list#each (function (_ arity)
(method.method method.public ..apply::name
- .false (..apply::type arity)
- (list)
- {.#Some
- (let [previous_inputs (|> arity
- list.indices
- (monad.each _.monad _.aload))]
- (all _.composite
- previous_inputs
- (_.invokevirtual //function.class ..apply::name (..apply::type (-- arity)))
- (_.checkcast //function.class)
- (_.aload arity)
- (_.invokevirtual //function.class ..apply::name (..apply::type //function/arity.minimum))
- _.areturn))})))
+ .false (..apply::type arity)
+ (list)
+ {.#Some
+ (let [previous_inputs (|> arity
+ list.indices
+ (monad.each _.monad _.aload))]
+ (all _.composite
+ previous_inputs
+ (_.invokevirtual //function.class ..apply::name (..apply::type (-- arity)))
+ (_.checkcast //function.class)
+ (_.aload arity)
+ (_.invokevirtual //function.class ..apply::name (..apply::type //function/arity.minimum))
+ _.areturn))})))
(list.partial (method.method (modifier#composite method.public method.abstract)
- ..apply::name
- .false (..apply::type //function/arity.minimum)
- (list)
- {.#None})))
+ ..apply::name
+ .false (..apply::type //function/arity.minimum)
+ (list)
+ {.#None})))
<init>::method (method.method method.public "<init>"
- .false //function.init
- (list)
- {.#Some
- (let [$partials _.iload_1]
- (all _.composite
- ..this
- (_.invokespecial ^Object "<init>" (type.method [(list) (list) type.void (list)]))
- ..this
- $partials
- (_.putfield //function.class //function/count.field //function/count.type)
- _.return))})
+ .false //function.init
+ (list)
+ {.#Some
+ (let [$partials _.iload_1]
+ (all _.composite
+ ..this
+ (_.invokespecial ^Object "<init>" (type.method [(list) (list) type.void (list)]))
+ ..this
+ $partials
+ (_.putfield //function.class //function/count.field //function/count.type)
+ _.return))})
modifier (is (Modifier Class)
(all modifier#composite
class.public
@@ -648,7 +648,7 @@
(name.internal (..reflection ^Object)) (list)
(list partial_count)
(list.partial <init>::method apply::method+)
- sequence.empty))]
+ (list)))]
(do ////.monad
[_ (generation.execute! [class bytecode])
... _ (generation.save! //function.artifact_id {.#None} [class bytecode])
diff --git a/stdlib/source/library/lux/meta/target/jvm/attribute.lux b/stdlib/source/library/lux/meta/target/jvm/attribute.lux
index 21578c4e5..f3410723a 100644
--- a/stdlib/source/library/lux/meta/target/jvm/attribute.lux
+++ b/stdlib/source/library/lux/meta/target/jvm/attribute.lux
@@ -61,7 +61,8 @@
(Variant
{#Constant (Info (Constant Any))}
{#Code (Info <Code>)}
- {#Signature (Info (Index UTF8))})))
+ {#Signature (Info (Index UTF8))}
+ {#Source_File (Info (Index UTF8))})))
(type .public Code
<Code>)
@@ -75,6 +76,7 @@
(info_equivalence /constant.equivalence)
(info_equivalence (/code.equivalence equivalence))
(info_equivalence //index.equivalence)
+ (info_equivalence //index.equivalence)
))))
(def common_attribute_length
@@ -93,7 +95,8 @@
(|> length //unsigned.value (n.+ ..common_attribute_length))])
([#Constant]
[#Code]
- [#Signature])))
+ [#Signature]
+ [#Source_File])))
... TODO: Inline ASAP
(def (constant' index @name)
@@ -137,6 +140,22 @@
[it (|> it //signature.signature //pool.utf8)]
(at ! each (signature' it) (//pool.utf8 "Signature"))))
+... TODO: Inline ASAP
+(def (source_file' it @name)
+ (-> (Index UTF8) (Index UTF8)
+ Attribute)
+ {#Source_File [#name @name
+ ... https://docs.oracle.com/javase/specs/jvms/se7/html/jvms-4.html#jvms-4.7.10
+ #length (|> //index.length //unsigned.u4 try.trusted)
+ #info it]})
+
+(def .public (source_file it)
+ (-> Text
+ (Resource Attribute))
+ (do [! //pool.monad]
+ [it (//pool.utf8 it)]
+ (at ! each (source_file' it) (//pool.utf8 "SourceFile"))))
+
(def .public (format it)
(Format Attribute)
(when it
@@ -147,4 +166,7 @@
((info_format (/code.format format)) it)
{#Signature it}
+ ((info_format //index.format) it)
+
+ {#Source_File it}
((info_format //index.format) it)))
diff --git a/stdlib/source/library/lux/meta/target/jvm/class.lux b/stdlib/source/library/lux/meta/target/jvm/class.lux
index 1a5b3a1d8..ba01154b6 100644
--- a/stdlib/source/library/lux/meta/target/jvm/class.lux
+++ b/stdlib/source/library/lux/meta/target/jvm/class.lux
@@ -94,22 +94,23 @@
Internal (Maybe (Signature Inheritance)) Internal (List Internal)
(List (Resource Field))
(List (Resource Method))
- (Sequence Attribute)
+ (List (Resource Attribute))
(Try Class))
(do try.monad
- [[pool [@this @super @interfaces] =fields =methods @signature]
+ [[pool [@this @super @interfaces] fields methods attributes @signature]
(<| (state.result' //pool.empty)
(do [! //pool.monad]
[classes (install_classes this super interfaces)
- =fields (monad.all ! fields)
- =methods (monad.all ! methods)
+ fields (monad.all ! fields)
+ methods (monad.all ! methods)
+ attributes (monad.all ! attributes)
@signature (when signature
{.#Some signature}
(at ! each (|>> {.#Some}) (//attribute.signature signature))
{.#None}
(in {.#None}))]
- (in [classes =fields =methods @signature])))]
+ (in [classes fields methods attributes @signature])))]
(in [#magic //magic.code
#minor_version //version.default_minor
#major_version version
@@ -118,14 +119,14 @@
#this @this
#super @super
#interfaces @interfaces
- #fields (sequence.of_list =fields)
- #methods (sequence.of_list =methods)
- #attributes (when @signature
- {.#Some @signature}
- (sequence.suffix @signature attributes)
+ #fields (sequence.of_list fields)
+ #methods (sequence.of_list methods)
+ #attributes (sequence.of_list (when @signature
+ {.#Some @signature}
+ {.#Item @signature attributes}
- {.#None}
- attributes)])))
+ {.#None}
+ attributes))])))
(def .public (format class)
(Format Class)
diff --git a/stdlib/source/test/lux/meta/extension.lux b/stdlib/source/test/lux/meta/extension.lux
index cdcf0879d..ab58d17b3 100644
--- a/stdlib/source/test/lux/meta/extension.lux
+++ b/stdlib/source/test/lux/meta/extension.lux
@@ -176,7 +176,7 @@
(list)
(list)
(list)
- sequence.empty)))
+ (list))))
@.js (js.comment commentary
(js.statement (js.string commentary)))
@.python (python.comment commentary