Skip to content

Instantly share code, notes, and snippets.

@jnthn
Last active July 11, 2018 13:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jnthn/2c891b816f9ad83ad1693f73b6631120 to your computer and use it in GitHub Desktop.
Save jnthn/2c891b816f9ad83ad1693f73b6631120 to your computer and use it in GitHub Desktop.
sp_getarg_o r1(3), liti16(0) # Read the arg
sp_p6oget_o r8(3), r1(3), liti16(16) # Read Str from Scalar container
sp_guardconc r8(3), sslot(1), litui32(30) # Str:D type check of self; deopt if it fails
takedispatcher r3(2) # Clear any set dispatcher (probably can go?)
sp_p6oget_s r5(1), r8(3), liti16(8) # Read the str boxed in the Str
chars r6(1), r5(1) # Call chars primitive
p6box_i r4(3), r6(1) # Box the result
return_o r4(3) # Return it
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment