50 This->last_index = last_index;
78 for(
i=0;
i <
n;
i++) {
79 if(
ret->parens[
i].index == -1) {
80 ctx->match_parens[
i].index = 0;
81 ctx->match_parens[
i].length = 0;
83 ctx->match_parens[
i].index =
ret->parens[
i].index;
84 ctx->match_parens[
i].length =
ret->parens[
i].length;
89 memset(
ctx->match_parens+
n, 0,
sizeof(
ctx->match_parens) -
n*
sizeof(
ctx->match_parens[0]));
96 ctx->last_match_length =
ret->match_len;
136 match->cp = (*ret)->cp;
137 match->match_len = (*ret)->match_len;
145 (*ret)->cp =
match->cp;
146 (*ret)->match_len =
match->match_len;
211 if (
result->match_len == 0)
312 WARN(
"Not a RegExp\n");
369 if(
result->parens[
i].index != -1) {
424 DWORD last_index = 0;
430 WARN(
"Not a RegExp\n");
644 WARN(
"regexp_new failed\n");
765 for(
i=0;
i < match_cnt;
i++) {
921 case DISPATCH_CONSTRUCT: {
1002 WARN(
"wrong flag %c\n", *
p);
HRESULT create_array(script_ctx_t *ctx, DWORD length, jsdisp_t **ret)
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
HRESULT create_builtin_constructor(script_ctx_t *ctx, builtin_invoke_t value_proc, const WCHAR *name, const builtin_info_t *builtin_info, DWORD flags, jsdisp_t *prototype, jsdisp_t **ret)
HRESULT Function_value(script_ctx_t *ctx, jsval_t vthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static match_state_t * alloc_match_state(regexp_t *regexp, heap_pool_t *pool, const WCHAR *pos)
_ACRTIMP double __cdecl floor(double)
GLdouble GLdouble GLdouble r
GLboolean GLboolean GLboolean b
GLuint GLsizei GLsizei * length
GLenum GLenum GLenum input
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
static HRESULT to_string(VARIANT *src, BSTR *dst)
HRESULT jsdisp_propput_name(jsdisp_t *obj, const WCHAR *name, jsval_t val)
HRESULT init_dispex_from_constr(jsdisp_t *dispex, script_ctx_t *ctx, const builtin_info_t *builtin_info, jsdisp_t *constr)
HRESULT gc_process_linked_val(struct gc_ctx *gc_ctx, enum gc_traverse_op op, jsdisp_t *obj, jsval_t *link)
ULONG jsdisp_release(jsdisp_t *obj)
HRESULT init_dispex(jsdisp_t *dispex, script_ctx_t *ctx, const builtin_info_t *builtin_info, jsdisp_t *prototype)
HRESULT jsdisp_propput_idx(jsdisp_t *obj, DWORD idx, jsval_t val)
jsdisp_t * jsdisp_addref(jsdisp_t *obj)
HRESULT builtin_set_const(script_ctx_t *ctx, jsdisp_t *jsthis, jsval_t value)
jsdisp_t * to_jsdisp(IDispatch *disp)
HRESULT regexp_execute(regexp_t *regexp, void *cx, heap_pool_t *pool, const WCHAR *str, DWORD str_len, match_state_t *result)
regexp_t * regexp_new(void *cx, heap_pool_t *pool, const WCHAR *str, DWORD str_len, WORD flags, BOOL flat)
void regexp_destroy(regexp_t *re)
HRESULT to_flat_string(script_ctx_t *, jsval_t, jsstr_t **, const WCHAR **)
#define REM_NO_CTX_UPDATE
void heap_pool_clear(heap_pool_t *)
heap_pool_t * heap_pool_mark(heap_pool_t *)
#define SCRIPTLANGUAGEVERSION_ES5
#define JS_E_FUNCTION_EXPECTED
static BOOL is_int32(double d)
static IDispatch * to_disp(jsdisp_t *jsdisp)
HRESULT to_number(script_ctx_t *, jsval_t, double *)
#define JS_E_REGEXP_SYNTAX
#define JS_E_REGEXP_EXPECTED
static BOOL is_class(jsdisp_t *jsdisp, jsclass_t class)
const unsigned int PROPF_METHOD
const unsigned int PROPF_CONSTR
static HRESULT regexp_match(script_ctx_t *ctx, jsdisp_t *dispex, jsstr_t *jsstr, BOOL gflag, match_result_t **match_result, DWORD *result_cnt)
static HRESULT RegExp_toString(script_ctx_t *ctx, jsval_t vthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static const builtin_info_t RegExpInst_info
static HRESULT RegExp_gc_traverse(struct gc_ctx *gc_ctx, enum gc_traverse_op op, jsdisp_t *dispex)
static HRESULT RegExpConstr_get_idx1(script_ctx_t *ctx, jsdisp_t *jsthis, jsval_t *r)
static HRESULT RegExpConstr_get_idx4(script_ctx_t *ctx, jsdisp_t *jsthis, jsval_t *r)
static const builtin_prop_t RegExpConstr_props[]
HRESULT create_regexp_var(script_ctx_t *ctx, jsval_t src_arg, jsval_t *flags_arg, jsdisp_t **ret)
static RegExpInstance * regexp_this(jsval_t vthis)
HRESULT regexp_string_match(script_ctx_t *ctx, jsdisp_t *re, jsstr_t *jsstr, jsval_t *r)
static HRESULT RegExpConstr_get_idx2(script_ctx_t *ctx, jsdisp_t *jsthis, jsval_t *r)
static HRESULT RegExp_test(script_ctx_t *ctx, jsval_t vthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static HRESULT RegExpConstr_get_leftContext(script_ctx_t *ctx, jsdisp_t *jsthis, jsval_t *r)
static HRESULT RegExpConstr_get_idx8(script_ctx_t *ctx, jsdisp_t *jsthis, jsval_t *r)
static HRESULT global_idx(script_ctx_t *ctx, DWORD idx, jsval_t *r)
static HRESULT do_regexp_match_next(script_ctx_t *ctx, RegExpInstance *regexp, DWORD rem_flags, jsstr_t *jsstr, const WCHAR *str, match_state_t *ret)
static HRESULT RegExp_get_global(script_ctx_t *ctx, jsdisp_t *jsthis, jsval_t *r)
static RegExpInstance * regexp_from_jsdisp(jsdisp_t *jsdisp)
HRESULT create_regexp_constr(script_ctx_t *ctx, jsdisp_t *object_prototype, jsdisp_t **ret)
static const builtin_prop_t RegExp_props[]
static HRESULT RegExp_exec(script_ctx_t *ctx, jsval_t vthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static HRESULT alloc_regexp(script_ctx_t *ctx, jsstr_t *str, jsdisp_t *object_prototype, RegExpInstance **ret)
static HRESULT RegExpConstr_get_idx6(script_ctx_t *ctx, jsdisp_t *jsthis, jsval_t *r)
static HRESULT create_match_array(script_ctx_t *ctx, jsstr_t *input_str, const match_state_t *result, IDispatch **ret)
static HRESULT RegExpConstr_value(script_ctx_t *ctx, jsval_t vthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static HRESULT RegExp_value(script_ctx_t *ctx, jsval_t vthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static const builtin_info_t RegExpConstr_info
static HRESULT run_exec(script_ctx_t *ctx, jsval_t vthis, jsval_t arg, jsstr_t **input, match_state_t **result, BOOL *ret)
static HRESULT RegExpConstr_get_rightContext(script_ctx_t *ctx, jsdisp_t *jsthis, jsval_t *r)
static HRESULT RegExpConstr_get_idx9(script_ctx_t *ctx, jsdisp_t *jsthis, jsval_t *r)
HRESULT regexp_match_next(script_ctx_t *ctx, jsdisp_t *dispex, DWORD rem_flags, jsstr_t *jsstr, match_state_t **ret)
static HRESULT RegExp_set_lastIndex(script_ctx_t *ctx, jsdisp_t *jsthis, jsval_t value)
HRESULT create_regexp(script_ctx_t *ctx, jsstr_t *src, DWORD flags, jsdisp_t **ret)
static HRESULT RegExpConstr_get_idx5(script_ctx_t *ctx, jsdisp_t *jsthis, jsval_t *r)
static INT index_from_val(script_ctx_t *ctx, jsval_t v)
static HRESULT RegExp_get_source(script_ctx_t *ctx, jsdisp_t *jsthis, jsval_t *r)
static void set_last_index(RegExpInstance *This, DWORD last_index)
static HRESULT RegExpConstr_get_idx7(script_ctx_t *ctx, jsdisp_t *jsthis, jsval_t *r)
static HRESULT RegExp_get_lastIndex(script_ctx_t *ctx, jsdisp_t *jsthis, jsval_t *r)
static HRESULT RegExp_get_multiline(script_ctx_t *ctx, jsdisp_t *jsthis, jsval_t *r)
static void RegExp_destructor(jsdisp_t *dispex)
static const builtin_info_t RegExp_info
static HRESULT RegExp_get_ignoreCase(script_ctx_t *ctx, jsdisp_t *jsthis, jsval_t *r)
static const builtin_prop_t RegExpInst_props[]
static HRESULT RegExpConstr_get_idx3(script_ctx_t *ctx, jsdisp_t *jsthis, jsval_t *r)
HRESULT parse_regexp_flags(const WCHAR *str, DWORD str_len, DWORD *ret)
jsstr_t * jsstr_alloc_len(const WCHAR *buf, unsigned len)
jsstr_t * jsstr_undefined(void)
jsstr_t * jsstr_empty(void)
jsstr_t * jsstr_alloc_buf(unsigned len, WCHAR **buf)
static jsstr_t * jsstr_substr(jsstr_t *str, unsigned off, unsigned len)
static jsstr_t * jsstr_addref(jsstr_t *str)
static const WCHAR * jsstr_flatten(jsstr_t *str)
static void jsstr_release(jsstr_t *str)
static unsigned jsstr_length(jsstr_t *str)
static unsigned jsstr_flush(jsstr_t *str, WCHAR *buf)
HRESULT jsval_copy(jsval_t v, jsval_t *r)
void jsval_release(jsval_t val)
static jsval_t jsval_null(void)
static jsval_t jsval_string(jsstr_t *str)
static jsval_t jsval_undefined(void)
static jsval_t jsval_obj(jsdisp_t *obj)
static jsval_t jsval_bool(BOOL b)
static BOOL is_undefined(jsval_t v)
static jsval_t jsval_disp(IDispatch *obj)
static IDispatch * get_object(jsval_t v)
static BOOL is_object_instance(jsval_t v)
static jsval_t jsval_number(double n)
static void ULONG ULONG * ret_size
#define CONTAINING_RECORD(address, type, field)