Commit Graph

55 Commits

Author SHA1 Message Date
Tor Andersson
6fd45b8374 Guard String.fromCharCode malloc with try/endtry. 2014-01-25 22:57:40 +01:00
Tor Andersson
4ee7ef822d Fix off-by-one error in String.fromCharCode(). 2014-01-25 17:51:57 +01:00
Tor Andersson
90b54a9eec Add userdata class.
js_newuserdata(J, tag, ptr) creates a userdata object, wrapping the ptr.
It takes the prototype for the new object from the top of the stack, just
like js_newcconstructor does.

js_touserdata(J, tag, idx) extracts the userdata pointer. Throws a
TypeError if the object is not a userdata object with a matching tag.

js_isuserdata(J, tag, idx) checks if a value on the stack is a userdata
object with a matching tag.
2014-01-24 17:11:49 +01:00
Tor Andersson
195816c208 Set property attributes on built-in objects and respect DontEnum. 2014-01-23 17:53:22 +01:00
Tor Andersson
3a92e13e47 Rename files and move a few functions around. 2014-01-21 13:58:32 +01:00