diff options
author | Eduardo Julian | 2018-08-23 17:18:30 -0400 |
---|---|---|
committer | Eduardo Julian | 2018-08-23 17:18:30 -0400 |
commit | d9965e587905cd715ecd4c7150236d660321a02c (patch) | |
tree | fb67b317abaf15a7cf7624f7542d15b6e8ecc055 /new-luxc/source/luxc/lang/translation/jvm/runtime.jvm.lux | |
parent | 27eed2a94ff9446014564958439fc5381584568b (diff) |
Optimized text clipping.
Diffstat (limited to 'new-luxc/source/luxc/lang/translation/jvm/runtime.jvm.lux')
-rw-r--r-- | new-luxc/source/luxc/lang/translation/jvm/runtime.jvm.lux | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/new-luxc/source/luxc/lang/translation/jvm/runtime.jvm.lux b/new-luxc/source/luxc/lang/translation/jvm/runtime.jvm.lux index 20c31bd5d..3c8563d75 100644 --- a/new-luxc/source/luxc/lang/translation/jvm/runtime.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/jvm/runtime.jvm.lux @@ -133,17 +133,11 @@ (def: text-methods Def - (|>> ($d.method #$.Public $.staticM "text_clip" ($t.method (list $String $t.int $t.int) (#.Some $Variant) (list)) + (|>> ($d.method #$.Public $.staticM "text_char" ($t.method (list $String $t.int) (#.Some $Variant) (list)) (try-methodI (|>> (_.ALOAD 0) (_.ILOAD 1) - (_.ILOAD 2) - (_.INVOKEVIRTUAL "java.lang.String" "substring" ($t.method (list $t.int $t.int) (#.Some $String) (list)) #0)))) - ($d.method #$.Public $.staticM "text_char" ($t.method (list $String $t.int) (#.Some $Variant) (list)) - (try-methodI - (|>> (_.ALOAD 0) - (_.ILOAD 1) - (_.INVOKEVIRTUAL "java.lang.String" "codePointAt" ($t.method (list $t.int) (#.Some $t.int) (list)) #0) + (_.INVOKEVIRTUAL "java.lang.String" "charAt" ($t.method (list $t.int) (#.Some $t.char) (list)) #0) _.I2L (_.wrap #$.Long)))) )) |