V7_PRIVATE void init_array(void) { init_standard_constructor(V7_CLASS_ARRAY, Array_ctor); SET_PROP_FUNC(s_prototypes[V7_CLASS_ARRAY], "length", Arr_length); SET_METHOD(s_prototypes[V7_CLASS_ARRAY], "push", Arr_push); SET_METHOD(s_prototypes[V7_CLASS_ARRAY], "sort", Arr_sort); SET_RO_PROP_V(s_global, "Array", s_constructors[V7_CLASS_ARRAY]); }
static void init_string(void) { SET_PROP_FUNC(s_prototypes[V7_CLASS_STRING], "length", Str_length); SET_METHOD(s_prototypes[V7_CLASS_STRING], "charCodeAt", Str_charCodeAt); SET_METHOD(s_prototypes[V7_CLASS_STRING], "charAt", Str_charAt); SET_METHOD(s_prototypes[V7_CLASS_STRING], "indexOf", Str_indexOf); SET_METHOD(s_prototypes[V7_CLASS_STRING], "substr", Str_substr); SET_METHOD(s_prototypes[V7_CLASS_STRING], "match", Str_match); SET_METHOD(s_prototypes[V7_CLASS_STRING], "split", Str_split); SET_RO_PROP_V(s_global, "String", s_constructors[V7_CLASS_STRING]); }
V7_PRIVATE void init_string(void) { init_standard_constructor(V7_CLASS_STRING, String_ctor); SET_PROP_FUNC(s_prototypes[V7_CLASS_STRING], "length", Str_length); SET_METHOD(s_prototypes[V7_CLASS_STRING], "charCodeAt", Str_charCodeAt); SET_METHOD(s_prototypes[V7_CLASS_STRING], "charAt", Str_charAt); SET_METHOD(s_prototypes[V7_CLASS_STRING], "indexOf", Str_indexOf); SET_METHOD(s_prototypes[V7_CLASS_STRING], "substr", Str_substr); SET_METHOD(s_prototypes[V7_CLASS_STRING], "match", Str_match); SET_METHOD(s_prototypes[V7_CLASS_STRING], "split", Str_split); SET_METHOD(s_prototypes[V7_CLASS_STRING], "search", Str_search); SET_METHOD(s_prototypes[V7_CLASS_STRING], "replace", Str_replace); SET_RO_PROP_V(s_global, "String", s_constructors[V7_CLASS_STRING]); }