From 77301f3a456c015daa9d8f9aa3d80fd4e45f8e7e Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Wed, 8 Sep 2021 21:44:06 -0400 Subject: De-bracing part 0 --- lux-js/source/program.lux | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) (limited to 'lux-js/source') diff --git a/lux-js/source/program.lux b/lux-js/source/program.lux index fde4d1e96..2cdc6fc66 100644 --- a/lux-js/source/program.lux +++ b/lux-js/source/program.lux @@ -162,10 +162,10 @@ [] ... Methods (program/IntValue - [] (getValue self) java/lang/Object + [] (getValue self []) java/lang/Object (:as java/lang/Object value)) (org/openjdk/nashorn/api/scripting/AbstractJSObject - [] (getMember self {member java/lang/String}) java/lang/Object + [] (getMember self [member java/lang/String]) java/lang/Object (case member (^ (static runtime.i64_high_field)) (|> value .nat runtime.high jvm_int) @@ -182,10 +182,12 @@ (ffi.object [] org/openjdk/nashorn/api/scripting/AbstractJSObject [] [] (org/openjdk/nashorn/api/scripting/AbstractJSObject - [] (isFunction self) boolean + [] (isFunction self []) boolean #1) (org/openjdk/nashorn/api/scripting/AbstractJSObject - [] (call self {this java/lang/Object} {args [java/lang/Object]}) java/lang/Object + [] (call self [this java/lang/Object + args [java/lang/Object]]) + java/lang/Object (debug.inspection js_object)) )) @@ -194,10 +196,12 @@ (ffi.object [] org/openjdk/nashorn/api/scripting/AbstractJSObject [] [] (org/openjdk/nashorn/api/scripting/AbstractJSObject - [] (isFunction self) boolean + [] (isFunction self []) boolean #1) (org/openjdk/nashorn/api/scripting/AbstractJSObject - [] (call self {this java/lang/Object} {args [java/lang/Object]}) java/lang/Object + [] (call self [this java/lang/Object + args [java/lang/Object]]) + java/lang/Object (|> (java/util/Arrays::copyOfRange value (|> args (array.read! 0) maybe.trusted (:as Int)) (.int (array.size value))) @@ -223,13 +227,14 @@ [] ... Methods (program/StructureValue - [] (getValue self) java/lang/Object + [] (getValue self []) java/lang/Object (:as (Array java/lang/Object) value)) (org/openjdk/nashorn/api/scripting/AbstractJSObject - [] (isArray self) boolean + [] (isArray self []) boolean #1) (org/openjdk/nashorn/api/scripting/AbstractJSObject - [] (getMember self {member java/lang/String}) java/lang/Object + [] (getMember self [member java/lang/String]) + java/lang/Object (case member (^or "toJSON" "toString") (:as java/lang/Object @@ -260,7 +265,7 @@ (panic! (exception.error ..unknown_member [(:as Text member) (:as java/lang/Object value)]))) ) (org/openjdk/nashorn/api/scripting/AbstractJSObject - [] (getSlot self {idx int}) java/lang/Object + [] (getSlot self [idx int]) java/lang/Object (|> value (array.read! (|> idx java/lang/Integer::longValue (:as Nat))) maybe.trusted -- cgit v1.2.3