diff options
Diffstat (limited to 'stdlib/source/lux/tool/compiler/language/lux/phase/generation/jvm/function/field/variable/partial/count.lux')
-rw-r--r-- | stdlib/source/lux/tool/compiler/language/lux/phase/generation/jvm/function/field/variable/partial/count.lux | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/stdlib/source/lux/tool/compiler/language/lux/phase/generation/jvm/function/field/variable/partial/count.lux b/stdlib/source/lux/tool/compiler/language/lux/phase/generation/jvm/function/field/variable/partial/count.lux new file mode 100644 index 000000000..579a63992 --- /dev/null +++ b/stdlib/source/lux/tool/compiler/language/lux/phase/generation/jvm/function/field/variable/partial/count.lux @@ -0,0 +1,30 @@ +(.module: + [lux (#- type) + [control + ["." try]] + [target + [jvm + ["_" bytecode (#+ Bytecode)] + [encoding + [name (#+ External)] + ["." unsigned]] + ["." type]]]] + ["." ///// #_ + ["#." abstract]]) + +(def: #export field "partials") +(def: #export type type.int) + +(def: #export initial + (Bytecode Any) + (|> 0 unsigned.u1 try.assume _.bipush)) + +(def: this + _.aload-0) + +(def: #export value + (Bytecode Any) + ($_ _.compose + ..this + (_.getfield /////abstract.class ..field ..type) + )) |