From 940bd554301c495740aae543dd553dcb6e5fee54 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Thu, 20 Jun 2019 03:03:44 -0400 Subject: Re-factored labels. --- stdlib/source/lux/target/jvm/attribute/code.lux | 26 ++++++++-------------- .../source/lux/target/jvm/attribute/code/label.lux | 19 ++++++++++++++++ 2 files changed, 28 insertions(+), 17 deletions(-) create mode 100644 stdlib/source/lux/target/jvm/attribute/code/label.lux diff --git a/stdlib/source/lux/target/jvm/attribute/code.lux b/stdlib/source/lux/target/jvm/attribute/code.lux index 9d65fe1d9..120b56d9c 100644 --- a/stdlib/source/lux/target/jvm/attribute/code.lux +++ b/stdlib/source/lux/target/jvm/attribute/code.lux @@ -15,17 +15,9 @@ ["." /// #_ [constant (#+ Class)] ["#." encoding (#+ U2)] - ["#." index (#+ Index)]]) - -(type: #export Label U2) - -(def: #export label-equivalence - (Equivalence Label) - ///encoding.u2-equivalence) - -(def: #export label-format - (Format Label) - ///encoding.u2-format) + ["#." index (#+ Index)]] + ["." / #_ + ["#." label (#+ Label)]]) (type: #export Exception {#start-pc Label @@ -36,9 +28,9 @@ (def: #export exception-equivalence (Equivalence Exception) ($_ equivalence.product - ..label-equivalence - ..label-equivalence - ..label-equivalence + /label.equivalence + /label.equivalence + /label.equivalence ///index.equivalence )) @@ -58,9 +50,9 @@ (def: exception-format (Format Exception) ($_ binaryF.and - ..label-format - ..label-format - ..label-format + /label.format + /label.format + /label.format ///index.format )) diff --git a/stdlib/source/lux/target/jvm/attribute/code/label.lux b/stdlib/source/lux/target/jvm/attribute/code/label.lux new file mode 100644 index 000000000..1a26aab43 --- /dev/null +++ b/stdlib/source/lux/target/jvm/attribute/code/label.lux @@ -0,0 +1,19 @@ +(.module: + [lux #* + [abstract + [equivalence (#+ Equivalence)]] + [data + [format + [binary (#+ Format)]]]] + ["." //// #_ + ["#." encoding (#+ U2)]]) + +(type: #export Label U2) + +(def: #export equivalence + (Equivalence Label) + ////encoding.u2-equivalence) + +(def: #export format + (Format Label) + ////encoding.u2-format) -- cgit v1.2.3