39 static const WCHAR ignoreCaseW[] = {
'i',
'g',
'n',
'o',
'r',
'e',
'C',
'a',
's',
'e',0};
47 {
'l',
'e',
'f',
't',
'C',
'o',
'n',
't',
'e',
'x',
't',0};
49 {
'r',
'i',
'g',
'h',
't',
'C',
'o',
'n',
't',
'e',
'x',
't',0};
73 This->last_index = last_index;
101 for(
i=0;
i <
n;
i++) {
102 if(
ret->parens[
i].index == -1) {
103 ctx->match_parens[
i].index = 0;
104 ctx->match_parens[
i].length = 0;
106 ctx->match_parens[
i].index =
ret->parens[
i].index;
107 ctx->match_parens[
i].length =
ret->parens[
i].length;
112 memset(
ctx->match_parens+
n, 0,
sizeof(
ctx->match_parens) -
n*
sizeof(
ctx->match_parens[0]));
119 ctx->last_match_length =
ret->match_len;
159 match->cp = (*ret)->cp;
160 match->match_len = (*ret)->match_len;
168 (*ret)->cp =
match->cp;
169 (*ret)->match_len =
match->match_len;
334 FIXME(
"Not a RegExp\n");
381 static const WCHAR indexW[] = {
'i',
'n',
'd',
'e',
'x',0};
382 static const WCHAR inputW[] = {
'i',
'n',
'p',
'u',
't',0};
383 static const WCHAR lastIndexW[] = {
'l',
'a',
's',
't',
'I',
'n',
'd',
'e',
'x',0};
384 static const WCHAR zeroW[] = {
'0',0};
395 if(
result->parens[
i].index != -1)
447 DWORD last_index = 0;
453 FIXME(
"Not a RegExp\n");
665 WARN(
"regexp_new failed\n");
676 unsigned flags, opt_len = 0;
729 static const WCHAR indexW[] = {
'i',
'n',
'd',
'e',
'x',0};
730 static const WCHAR inputW[] = {
'i',
'n',
'p',
'u',
't',0};
731 static const WCHAR lastIndexW[] = {
'l',
'a',
's',
't',
'I',
'n',
'd',
'e',
'x',0};
735 unsigned match_cnt,
i;
793 for(
i=0;
i < match_cnt;
i++) {
954 case DISPATCH_CONSTRUCT: {
1009 static const WCHAR RegExpW[] = {
'R',
'e',
'g',
'E',
'x',
'p',0};
1042 WARN(
"wrong flag %c\n", *
p);
static HRESULT RegExp_get_lastIndex(script_ctx_t *ctx, jsdisp_t *jsthis, jsval_t *r)
void regexp_destroy(regexp_t *re)
jsstr_t * jsstr_alloc_len(const WCHAR *buf, unsigned len)
static const WCHAR * jsstr_flatten(jsstr_t *str)
void jsval_release(jsval_t val)
static jsstr_t * jsstr_substr(jsstr_t *str, unsigned off, unsigned len)
static HRESULT RegExpConstr_get_leftContext(script_ctx_t *ctx, jsdisp_t *jsthis, jsval_t *r)
static match_state_t * alloc_match_state(regexp_t *regexp, heap_pool_t *pool, const WCHAR *pos)
static HRESULT RegExpConstr_get_rightContext(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)
#define JS_E_FUNCTION_EXPECTED
jsstr_t * jsstr_undefined(void)
static const WCHAR idx3W[]
static jsval_t jsval_null(void)
static IDispatch * get_object(jsval_t v)
static jsstr_t * jsstr_addref(jsstr_t *str)
static HRESULT regexp_match(script_ctx_t *ctx, jsdisp_t *dispex, jsstr_t *jsstr, BOOL gflag, match_result_t **match_result, DWORD *result_cnt)
GLdouble GLdouble GLdouble r
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)
static void RegExp_destructor(jsdisp_t *dispex)
static const WCHAR rightContextW[]
static BOOL is_undefined(jsval_t v)
static unsigned jsstr_flush(jsstr_t *str, WCHAR *buf)
static BOOL is_string(parse_buffer *buf)
static void set_last_index(RegExpInstance *This, DWORD last_index)
HRESULT regexp_string_match(script_ctx_t *ctx, jsdisp_t *re, jsstr_t *jsstr, jsval_t *r)
static unsigned jsstr_length(jsstr_t *str)
static void jsstr_release(jsstr_t *str)
static const WCHAR idx4W[]
HRESULT create_regexp_var(script_ctx_t *ctx, jsval_t src_arg, jsval_t *flags_arg, jsdisp_t **ret)
void clear_ei(script_ctx_t *ctx)
static void * heap_realloc(void *mem, size_t len)
static void * heap_alloc(size_t len)
static const WCHAR toStringW[]
GLsizei GLsizei GLuint * obj
HRESULT create_regexp(script_ctx_t *ctx, jsstr_t *src, DWORD flags, jsdisp_t **ret)
static const WCHAR leftContextW[]
static HRESULT RegExp_set_lastIndex(script_ctx_t *ctx, jsdisp_t *jsthis, jsval_t value)
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)
HRESULT to_number(script_ctx_t *, jsval_t, double *) DECLSPEC_HIDDEN
static const builtin_prop_t RegExpConstr_props[]
HRESULT jsval_copy(jsval_t v, jsval_t *r)
static BOOL is_class(jsdisp_t *jsdisp, jsclass_t class)
static jsstr_t * get_string(jsval_t v)
#define REM_NO_CTX_UPDATE
static const WCHAR inputW[]
static const builtin_prop_t RegExp_props[]
#define JS_E_REGEXP_SYNTAX
GLenum GLuint GLenum GLsizei length
jsstr_t * jsstr_empty(void)
static HRESULT global_idx(script_ctx_t *ctx, DWORD idx, jsval_t *r)
static HRESULT RegExpConstr_get_idx3(script_ctx_t *ctx, jsdisp_t *jsthis, jsval_t *r)
static const builtin_prop_t RegExpInst_props[]
static const WCHAR idx6W[]
regexp_t * regexp_new(void *cx, heap_pool_t *pool, const WCHAR *str, DWORD str_len, WORD flags, BOOL flat)
static BOOL is_object_instance(jsval_t v)
static HRESULT RegExp_test(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static jsval_t jsval_string(jsstr_t *str)
static HRESULT RegExpConstr_get_idx1(script_ctx_t *ctx, jsdisp_t *jsthis, jsval_t *r)
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
static HRESULT RegExpConstr_get_idx5(script_ctx_t *ctx, jsdisp_t *jsthis, jsval_t *r)
GLboolean GLboolean GLboolean b
static jsval_t jsval_disp(IDispatch *obj)
static BOOL is_vclass(vdisp_t *vdisp, jsclass_t class)
static const WCHAR execW[]
static HRESULT RegExpConstr_get_idx2(script_ctx_t *ctx, jsdisp_t *jsthis, jsval_t *r)
static INT index_from_val(script_ctx_t *ctx, jsval_t v)
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 RegExpInstance * regexp_from_jsdisp(jsdisp_t *jsdisp)
static RegExpInstance * regexp_from_vdisp(vdisp_t *vdisp)
static HRESULT RegExp_get_global(script_ctx_t *ctx, jsdisp_t *jsthis, jsval_t *r)
static const WCHAR idx9W[]
static HRESULT run_exec(script_ctx_t *ctx, vdisp_t *jsthis, jsval_t arg, jsstr_t **input, match_state_t **result, BOOL *ret)
static HRESULT RegExpConstr_value(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
HRESULT regexp_execute(regexp_t *regexp, void *cx, heap_pool_t *pool, const WCHAR *str, DWORD str_len, match_state_t *result)
static const builtin_info_t RegExpConstr_info
HRESULT parse_regexp_flags(const WCHAR *str, DWORD str_len, DWORD *ret)
static const WCHAR idx8W[]
static HRESULT RegExp_get_multiline(script_ctx_t *ctx, jsdisp_t *jsthis, jsval_t *r)
static HRESULT alloc_regexp(script_ctx_t *ctx, jsdisp_t *object_prototype, RegExpInstance **ret)
static const WCHAR idx5W[]
static HRESULT RegExp_get_ignoreCase(script_ctx_t *ctx, jsdisp_t *jsthis, jsval_t *r)
#define DEFAULT_FUNCTION_VALUE
static IDispatch * to_disp(jsdisp_t *jsdisp)
static HRESULT RegExpConstr_get_idx8(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 const WCHAR idx2W[]
jsdisp_t * iface_to_jsdisp(IDispatch *iface)
HRESULT jsdisp_propput_idx(jsdisp_t *obj, DWORD idx, jsval_t val)
static const WCHAR multilineW[]
HRESULT create_regexp_constr(script_ctx_t *ctx, jsdisp_t *object_prototype, jsdisp_t **ret)
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 const WCHAR ignoreCaseW[]
HRESULT builtin_set_const(script_ctx_t *ctx, jsdisp_t *jsthis, jsval_t value)
static const WCHAR sourceW[]
HRESULT create_array(script_ctx_t *ctx, DWORD length, jsdisp_t **ret)
static HRESULT RegExpConstr_get_idx7(script_ctx_t *ctx, jsdisp_t *jsthis, jsval_t *r)
static HRESULT RegExp_toString(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static HRESULT RegExp_get_source(script_ctx_t *ctx, jsdisp_t *jsthis, jsval_t *r)
static void jsdisp_release(jsdisp_t *jsdisp)
HRESULT init_dispex(jsdisp_t *dispex, script_ctx_t *ctx, const builtin_info_t *builtin_info, jsdisp_t *prototype)
static jsval_t jsval_obj(jsdisp_t *obj)
static HRESULT RegExpConstr_get_idx9(script_ctx_t *ctx, jsdisp_t *jsthis, jsval_t *r)
jsstr_t * jsstr_alloc_buf(unsigned len, WCHAR **buf)
static const builtin_info_t RegExpInst_info
static const WCHAR idx7W[]
HRESULT jsdisp_propput_name(jsdisp_t *obj, const WCHAR *name, jsval_t val)
HRESULT throw_type_error(script_ctx_t *ctx, HRESULT error, const WCHAR *str)
static jsval_t jsval_bool(BOOL b)
static const WCHAR idx1W[]
_Check_return_ _CRTIMP double __cdecl floor(_In_ double x)
static const WCHAR lastIndexW[]
HRESULT init_dispex_from_constr(jsdisp_t *dispex, script_ctx_t *ctx, const builtin_info_t *builtin_info, jsdisp_t *constr)
heap_pool_t * heap_pool_mark(heap_pool_t *) DECLSPEC_HIDDEN
static const builtin_info_t RegExp_info
static const WCHAR RegExpW[]
static BOOL is_int32(double d)
static HRESULT RegExp_exec(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
HRESULT to_flat_string(script_ctx_t *, jsval_t, jsstr_t **, const WCHAR **) DECLSPEC_HIDDEN
static const WCHAR testW[]
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 GLint GLint GLenum GLenum GLenum GLint GLuint GLenum GLenum GLfloat GLenum GLfloat GLenum GLint const GLfloat GLenum GLint const GLushort GLint GLint GLsizei GLsizei GLenum GLsizei GLsizei GLenum GLenum const GLvoid GLenum GLdouble GLenum GLint GLenum GLenum GLint GLenum GLenum GLfloat GLenum GLenum GLfloat GLenum GLfloat GLenum GLushort const GLubyte GLenum GLenum GLenum GLint GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLvoid GLenum GLenum GLint GLenum GLint GLenum GLint GLuint GLdouble GLdouble GLdouble GLdouble GLdouble GLdouble const GLfloat GLenum const GLdouble GLdouble GLdouble GLdouble GLdouble GLdouble GLdouble GLdouble GLdouble GLdouble GLdouble GLint GLint GLsizei GLsizei GLenum GLuint GLenum array
static jsval_t jsval_number(double n)
const char * debugstr_jsval(const jsval_t) DECLSPEC_HIDDEN
HRESULT throw_regexp_error(script_ctx_t *ctx, HRESULT error, const WCHAR *str)
WINE_DEFAULT_DEBUG_CHANNEL(jscript)
static BOOL heap_free(void *mem)
static HRESULT RegExp_value(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static const WCHAR globalW[]
void heap_pool_clear(heap_pool_t *) DECLSPEC_HIDDEN