115 for(
i=0;
i <
ctx->func->var_cnt;
i++) {
123 for(
i=0;
i <
ctx->func->arg_cnt;
i++) {
137 for(
i=0;
i <
ctx->vbthis->desc->prop_cnt;
i++) {
140 ref->u.v =
ctx->vbthis->props+
i;
149 ref->u.d.disp =
ctx->this_obj;
155 if(
ctx->func->code_ctx->context) {
159 ref->u.d.disp =
ctx->func->code_ctx->context;
179 ref->u.d.disp = &
ctx->script->global_obj->IDispatch_iface;
192 if((
item->flags & SCRIPTITEM_GLOBALMEMBERS)) {
231 new_var->
next =
ctx->script->global_vars;
232 ctx->script->global_vars = new_var;
234 new_var->
next =
ctx->dynamic_vars;
235 ctx->dynamic_vars = new_var;
238 *out_var = &new_var->
v;
247 memset(ei, 0,
sizeof(*ei));
253 return ctx->stack + --
ctx->top;
259 return ctx->stack + (
ctx->top-
n-1);
264 if(
ctx->stack_size ==
ctx->top) {
273 ctx->stack = new_stack;
274 ctx->stack_size *= 2;
354 IDispatch_Release(disp);
454 dp->cNamedArgs = is_propput ? 1 : 0;
455 dp->cArgs =
arg_cnt + dp->cNamedArgs;
470 dp->rgvarg =
ctx->stack +
ctx->top-dp->cArgs;
472 dp->rgvarg = is_propput ?
ctx->stack+
ctx->top-1 :
NULL;
483 FIXME(
"NULL array\n");
492 FIXME(
"argc %d does not match cDims %d\n", dp->cArgs,
array->cDims);
520 BSTR identifier =
ctx->instr->arg1.bstr;
521 const unsigned arg_cnt =
ctx->instr->arg2.uint;
536 FIXME(
"REF_VAR no res\n");
559 FIXME(
"arguments not implemented\n");
590 FIXME(
"arguments on object\n");
595 IDispatch_AddRef(
ref.u.obj);
601 if(
res && !
ctx->func->code_ctx->option_explicit &&
arg_cnt == 0) {
640 const BSTR identifier =
ctx->instr->arg1.bstr;
641 const unsigned arg_cnt =
ctx->instr->arg2.uint;
661 IDispatch_Release(
obj);
706 IDispatch_Release(disp);
748 FIXME(
"Unsupported array type %x\n",
V_VT(
v));
753 FIXME(
"null array\n");
761 FIXME(
"non-array assign\n");
772 FIXME(
"functions not implemented\n");
778 FIXME(
"REF_CONST\n");
781 if(
ctx->func->code_ctx->option_explicit) {
782 FIXME(
"throw exception\n");
805 const unsigned arg_cnt =
ctx->instr->arg2.uint;
823 const unsigned arg_cnt =
ctx->instr->arg2.uint;
830 FIXME(
"arguments not supported\n");
849 BSTR identifier =
ctx->instr->arg1.bstr;
850 const unsigned arg_cnt =
ctx->instr->arg2.uint;
881 BSTR identifier =
ctx->instr->arg1.bstr;
882 const unsigned arg_cnt =
ctx->instr->arg2.uint;
891 FIXME(
"arguments not supported\n");
976 const unsigned n =
ctx->instr->arg1.uint;
992 static const WCHAR regexpW[] = {
'r',
'e',
'g',
'e',
'x',
'p',0};
1005 for(class_desc =
ctx->script->classes; class_desc; class_desc = class_desc->
next) {
1026 const unsigned array_id =
ctx->instr->arg2.uint;
1035 ctx->arrays = heap_alloc_zero(
ctx->func->array_cnt *
sizeof(
SAFEARRAY*));
1047 FIXME(
"got ref.type = %d\n",
ref.type);
1051 if(
ctx->arrays[array_id]) {
1052 FIXME(
"Array already initialized\n");
1056 array_desc =
ctx->func->array_descs + array_id;
1059 if(!
ctx->arrays[array_id])
1124 DISPPARAMS dp = {0};
1138 hres = IUnknown_QueryInterface(
V_UNKNOWN(&iterv), &IID_IEnumVARIANT, (
void**)&iter);
1141 FIXME(
"Could not get IEnumVARIANT iface: %08x\n",
hres);
1172 const unsigned loop_end =
ctx->instr->arg1.uint;
1183 FIXME(
"uninitialized\n");
1191 hres = IEnumVARIANT_Next(iter, 1, &
v,
NULL);
1212 const unsigned arg =
ctx->instr->arg1.uint;
1222 const unsigned arg =
ctx->instr->arg1.uint;
1241 const unsigned arg =
ctx->instr->arg1.uint;
1304 IDispatch_AddRef(
ctx->this_obj);
1315 TRACE(
"%s\n",
arg ?
"true" :
"false");
1324 const int err_mode =
ctx->instr->arg1.uint;
1326 TRACE(
"%d\n", err_mode);
1328 ctx->resume_next = err_mode;
1405 const unsigned arg =
ctx->instr->arg1.uint;
1693 const unsigned arg =
ctx->instr->arg1.uint;
1724 if(disp1 == disp2) {
1725 *
ret = VARIANT_TRUE;
1729 if(!disp1 || !disp2) {
1730 *
ret = VARIANT_FALSE;
1740 IUnknown_Release(
unk1);
1745 *
ret = VARIANT_TRUE;
1747 hres = IUnknown_QueryInterface(
unk1, &IID_IObjectIdentity, (
void**)&
identity);
1751 *
ret =
hres ==
S_OK ? VARIANT_TRUE : VARIANT_FALSE;
1753 *
ret = VARIANT_FALSE;
1757 IUnknown_Release(
unk1);
1758 IUnknown_Release(unk2);
1779 IDispatch_Release(
l);
1782 IDispatch_Release(
r);
2013 FIXME(
"ref.type is not REF_VAR\n");
2033#define X(x,n,a,b) interp_ ## x,
2039#define X(x,n,a,b) n,
2060 IDispatch_Release(
ctx->this_obj);
2063 for(
i=0;
i <
ctx->func->arg_cnt;
i++)
2068 for(
i=0;
i <
ctx->func->var_cnt;
i++)
2073 for(
i=0;
i <
ctx->func->var_cnt;
i++) {
2095 FIXME(
"wrong arg_cnt %d, expected %d\n", dp ?
arg_cnt(dp) : 0,
func->arg_cnt);
2111 for(
i=0;
i <
func->arg_cnt;
i++) {
2114 if(
func->args[
i].by_ref)
2149 IActiveScriptSite_OnEnterScript(
ctx->site);
2154 }
else if (
ctx->host_global) {
2169 if(
hres != SCRIPT_E_RECORDED) {
2182 WARN(
"Failed %08x in resume next mode\n",
hres);
2190 while((++exec.
instr)->op != OP_catch);
2197 if(exec.
top > stack_off) {
2199 }
else if(exec.
top < stack_off) {
2203 while(exec.
top < stack_off) {
2224 IActiveScriptSite_OnLeaveScript(
ctx->site);
static void * heap_alloc(size_t len)
static BOOL heap_free(void *mem)
static void * heap_realloc(void *mem, size_t len)
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
HRESULT WINAPI SafeArrayUnlock(SAFEARRAY *psa)
HRESULT WINAPI SafeArrayPtrOfIndex(SAFEARRAY *psa, LONG *rgIndices, void **ppvData)
HRESULT WINAPI SafeArrayLock(SAFEARRAY *psa)
HRESULT WINAPI SafeArrayDestroy(SAFEARRAY *psa)
SAFEARRAY *WINAPI SafeArrayCreate(VARTYPE vt, UINT cDims, SAFEARRAYBOUND *rgsabound)
HRESULT create_safearray_iter(SAFEARRAY *sa, IEnumVARIANT **ev)
HRESULT report_script_error(script_ctx_t *ctx)
IDispatch * lookup_named_item(script_ctx_t *ctx, const WCHAR *name, unsigned flags)
#define VBS_RUNTIME_ERROR
static HRESULT disp_get_id(script_ctx_t *ctx, IDispatch *disp, const WCHAR *name, BSTR name_bstr, DWORD flags, DISPID *id)
GLdouble GLdouble GLdouble r
GLuint GLuint GLsizei GLenum const GLvoid * indices
GLboolean GLboolean GLboolean b
GLenum const GLvoid * addr
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
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 * u
static HRESULT interp_is(exec_ctx_t *ctx)
static HRESULT interp_or(exec_ctx_t *ctx)
static HRESULT interp_concat(exec_ctx_t *ctx)
static HRESULT assign_value(exec_ctx_t *ctx, VARIANT *dst, VARIANT *src, WORD flags)
static HRESULT interp_set_member(exec_ctx_t *ctx)
static HRESULT interp_pop(exec_ctx_t *ctx)
static HRESULT interp_step(exec_ctx_t *ctx)
static VARIANT * stack_top(exec_ctx_t *ctx, unsigned n)
static DISPID propput_dispid
void clear_ei(EXCEPINFO *ei)
static HRESULT interp_catch(exec_ctx_t *ctx)
static HRESULT stack_assume_val(exec_ctx_t *ctx, unsigned n)
static HRESULT interp_gt(exec_ctx_t *ctx)
static HRESULT assign_ident(exec_ctx_t *ctx, BSTR name, WORD flags, DISPPARAMS *dp)
static HRESULT interp_icallv(exec_ctx_t *ctx)
static HRESULT interp_not(exec_ctx_t *ctx)
static HRESULT interp_nequal(exec_ctx_t *ctx)
static HRESULT interp_set_ident(exec_ctx_t *ctx)
static HRESULT stack_pop_val(exec_ctx_t *ctx, variant_val_t *r)
static HRESULT stack_pop_disp(exec_ctx_t *ctx, IDispatch **ret)
static HRESULT interp_val(exec_ctx_t *ctx)
static HRESULT interp_lt(exec_ctx_t *ctx)
static HRESULT interp_bool(exec_ctx_t *ctx)
static HRESULT interp_dim(exec_ctx_t *ctx)
static HRESULT interp_enumnext(exec_ctx_t *ctx)
static HRESULT interp_add(exec_ctx_t *ctx)
static HRESULT interp_ret(exec_ctx_t *ctx)
static int stack_pop_bool(exec_ctx_t *ctx, BOOL *b)
static HRESULT interp_exp(exec_ctx_t *ctx)
static void instr_jmp(exec_ctx_t *ctx, unsigned addr)
static void stack_popn(exec_ctx_t *ctx, unsigned n)
static HRESULT stack_push_null(exec_ctx_t *ctx)
HRESULT exec_script(script_ctx_t *ctx, BOOL extern_caller, function_t *func, vbdisp_t *vbthis, DISPPARAMS *dp, VARIANT *res)
static HRESULT interp_mod(exec_ctx_t *ctx)
static HRESULT interp_errmode(exec_ctx_t *ctx)
static void vbstack_to_dp(exec_ctx_t *ctx, unsigned arg_cnt, BOOL is_propput, DISPPARAMS *dp)
static HRESULT interp_retval(exec_ctx_t *ctx)
static HRESULT interp_empty(exec_ctx_t *ctx)
static HRESULT interp_xor(exec_ctx_t *ctx)
static HRESULT interp_lteq(exec_ctx_t *ctx)
static const unsigned op_move[]
static HRESULT interp_mcallv(exec_ctx_t *ctx)
static HRESULT disp_cmp(IDispatch *disp1, IDispatch *disp2, VARIANT_BOOL *ret)
static HRESULT interp_null(exec_ctx_t *ctx)
static HRESULT do_mcall(exec_ctx_t *ctx, VARIANT *res)
static HRESULT interp_idiv(exec_ctx_t *ctx)
static HRESULT interp_jmp_false(exec_ctx_t *ctx)
static HRESULT interp_eqv(exec_ctx_t *ctx)
static HRESULT interp_hres(exec_ctx_t *ctx)
static HRESULT interp_icall(exec_ctx_t *ctx)
static HRESULT interp_double(exec_ctx_t *ctx)
static HRESULT lookup_identifier(exec_ctx_t *ctx, BSTR name, vbdisp_invoke_type_t invoke_type, ref_t *ref)
static HRESULT interp_assign_member(exec_ctx_t *ctx)
static HRESULT stack_assume_disp(exec_ctx_t *ctx, unsigned n, IDispatch **disp)
static HRESULT interp_int(exec_ctx_t *ctx)
static HRESULT interp_jmp(exec_ctx_t *ctx)
static HRESULT interp_jmp_true(exec_ctx_t *ctx)
static BOOL lookup_dynamic_vars(dynamic_var_t *var, const WCHAR *name, ref_t *ref)
static HRESULT interp_neg(exec_ctx_t *ctx)
static HRESULT interp_newenum(exec_ctx_t *ctx)
static void stack_pop_deref(exec_ctx_t *ctx, variant_val_t *r)
void release_dynamic_vars(dynamic_var_t *var)
static HRESULT cmp_oper(exec_ctx_t *ctx)
static HRESULT interp_imp(exec_ctx_t *ctx)
static HRESULT array_access(exec_ctx_t *ctx, SAFEARRAY *array, DISPPARAMS *dp, VARIANT **ret)
static HRESULT interp_gteq(exec_ctx_t *ctx)
static void release_val(variant_val_t *v)
static HRESULT stack_push(exec_ctx_t *ctx, VARIANT *v)
HRESULT(* instr_func_t)(exec_ctx_t *)
static HRESULT interp_case(exec_ctx_t *ctx)
static const instr_func_t op_funcs[]
static HRESULT interp_and(exec_ctx_t *ctx)
static HRESULT interp_new(exec_ctx_t *ctx)
static HRESULT interp_equal(exec_ctx_t *ctx)
static HRESULT interp_string(exec_ctx_t *ctx)
static HRESULT interp_mul(exec_ctx_t *ctx)
static HRESULT var_cmp(exec_ctx_t *ctx, VARIANT *l, VARIANT *r)
static HRESULT interp_me(exec_ctx_t *ctx)
static HRESULT interp_div(exec_ctx_t *ctx)
static HRESULT do_icall(exec_ctx_t *ctx, VARIANT *res)
static HRESULT interp_stop(exec_ctx_t *ctx)
static VARIANT * stack_pop(exec_ctx_t *ctx)
static HRESULT interp_sub(exec_ctx_t *ctx)
static HRESULT interp_assign_ident(exec_ctx_t *ctx)
static HRESULT interp_incc(exec_ctx_t *ctx)
static void release_exec(exec_ctx_t *ctx)
static HRESULT interp_mcall(exec_ctx_t *ctx)
static HRESULT interp_const(exec_ctx_t *ctx)
static HRESULT interp_nothing(exec_ctx_t *ctx)
static HRESULT add_dynamic_var(exec_ctx_t *ctx, const WCHAR *name, BOOL is_const, VARIANT **out_var)
HRESULT disp_call(script_ctx_t *ctx, IDispatch *disp, DISPID id, WORD flags, unsigned argc, jsval_t *argv, jsval_t *ret)
HRESULT disp_propput(script_ctx_t *ctx, IDispatch *disp, DISPID id, jsval_t val)
void * heap_pool_alloc(heap_pool_t *, DWORD) __WINE_ALLOC_SIZE(2) DECLSPEC_HIDDEN
void heap_pool_free(heap_pool_t *) DECLSPEC_HIDDEN
void heap_pool_init(heap_pool_t *) DECLSPEC_HIDDEN
HRESULT create_regexp(script_ctx_t *, jsstr_t *, DWORD, jsdisp_t **) DECLSPEC_HIDDEN
#define memcpy(s1, s2, n)
static const char * debugstr_variant(const VARIANT *var)
static VARIANTARG static DISPID
static HRESULT get_builtin_id(DispatchEx *This, BSTR name, DWORD grfdex, DISPID *ret)
BSTR WINAPI SysAllocString(LPCOLESTR str)
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
#define DISPATCH_PROPERTYPUT
#define DISPATCH_PROPERTYPUTREF
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
struct _class_desc_t * next
struct _dynamic_var_t * next
IDispatchEx IDispatchEx_iface
dynamic_var_t * dynamic_vars
HRESULT WINAPI VarNot(LPVARIANT pVarIn, LPVARIANT pVarOut)
HRESULT WINAPI VarMul(LPVARIANT left, LPVARIANT right, LPVARIANT result)
HRESULT WINAPI VarAnd(LPVARIANT left, LPVARIANT right, LPVARIANT result)
HRESULT WINAPI VarXor(LPVARIANT pVarLeft, LPVARIANT pVarRight, LPVARIANT pVarOut)
HRESULT WINAPI VarDiv(LPVARIANT left, LPVARIANT right, LPVARIANT result)
HRESULT WINAPI VarSub(LPVARIANT left, LPVARIANT right, LPVARIANT result)
HRESULT WINAPI VarCat(LPVARIANT left, LPVARIANT right, LPVARIANT out)
HRESULT WINAPI VarOr(LPVARIANT pVarLeft, LPVARIANT pVarRight, LPVARIANT pVarOut)
HRESULT WINAPI VarAdd(LPVARIANT left, LPVARIANT right, LPVARIANT result)
HRESULT WINAPI VarImp(LPVARIANT left, LPVARIANT right, LPVARIANT result)
HRESULT WINAPI DECLSPEC_HOTPATCH VariantClear(VARIANTARG *pVarg)
HRESULT WINAPI VarIdiv(LPVARIANT left, LPVARIANT right, LPVARIANT result)
HRESULT WINAPI VarMod(LPVARIANT left, LPVARIANT right, LPVARIANT result)
HRESULT WINAPI VarEqv(LPVARIANT pVarLeft, LPVARIANT pVarRight, LPVARIANT pVarOut)
HRESULT WINAPI VarCmp(LPVARIANT left, LPVARIANT right, LCID lcid, DWORD flags)
HRESULT WINAPI VarNeg(LPVARIANT pVarIn, LPVARIANT pVarOut)
HRESULT WINAPI VariantCopyInd(VARIANT *pvargDest, VARIANTARG *pvargSrc)
HRESULT WINAPI VariantCopy(VARIANTARG *pvargDest, VARIANTARG *pvargSrc)
HRESULT WINAPI VarPow(LPVARIANT left, LPVARIANT right, LPVARIANT result)
HRESULT create_vbdisp(const class_desc_t *desc, vbdisp_t **ret)
HRESULT get_disp_value(script_ctx_t *ctx, IDispatch *disp, VARIANT *v)
HRESULT to_int(VARIANT *v, int *ret)
BSTR get_vbscript_error_string(HRESULT) DECLSPEC_HIDDEN
static unsigned arg_cnt(const DISPPARAMS *dp)
BSTR get_vbscript_string(int) DECLSPEC_HIDDEN
_In_ ULONG _In_ ULONG_PTR ident
#define DISP_E_UNKNOWNNAME