Add String#lastIndexOf and improve tests (#163)

This commit is contained in:
Max Graey
2018-07-10 04:31:51 +03:00
committed by Daniel Wirtz
parent c4199673ef
commit 365884ff73
11 changed files with 2112 additions and 1172 deletions

View File

@ -132,7 +132,7 @@
(call $~lib/env/abort
(i32.const 0)
(i32.const 12)
(i32.const 231)
(i32.const 255)
(i32.const 4)
)
(unreachable)
@ -154,31 +154,31 @@
(get_local $1)
)
)
(tee_local $3
(tee_local $2
(select
(tee_local $3
(tee_local $2
(select
(get_local $2)
(i32.const 0)
(i32.gt_s
(tee_local $3
(i32.load
(get_local $0)
)
)
(i32.lt_s
(get_local $2)
(i32.const 0)
(get_local $3)
)
)
)
(tee_local $2
(i32.load
(get_local $0)
)
)
(i32.lt_s
(get_local $3)
(i32.const 0)
(i32.gt_s
(get_local $2)
(i32.const 0)
)
)
)
)
(get_local $2)
(get_local $3)
)
(return
(i32.const 0)
@ -192,7 +192,7 @@
(i32.const 4)
)
(i32.shl
(get_local $3)
(get_local $2)
(i32.const 1)
)
)