63#define MIN_BLOCK_SIZE 128
64#define ARENA_FREE_FILLER 0xaa
82 if(!
heap->block_cnt) {
93 heap->blocks[0] = tmp;
104 if(
heap->last_block+1 ==
heap->block_cnt) {
119 return heap->blocks[
heap->last_block];
161 for(
i=0;
i <
heap->block_cnt;
i++)
165 heap->last_block =
heap->offset = 0;
175 for(
i=0;
i <
heap->block_cnt;
i++)
412 static const WCHAR toStringW[] = {
't',
'o',
'S',
't',
'r',
'i',
'n',
'g',0};
413 static const WCHAR valueOfW[] = {
'v',
'a',
'l',
'u',
'e',
'O',
'f',0};
433 WARN(
"call error - forwarding exception\n");
449 WARN(
"call error - forwarding exception\n");
502 if(
'0' <=
c &&
c <=
'9')
505 if(
'a' <=
c &&
c <=
'f')
508 if(
'A' <=
c &&
c <=
'F')
521 static const WCHAR infinityW[] = {
'I',
'n',
'f',
'i',
'n',
'i',
't',
'y'};
533 }
else if(*
ptr ==
'+') {
549 if(*
ptr ==
'0' &&
ptr[1] ==
'x') {
563 d =
d*10 + (*
ptr++ -
'0');
565 if(*
ptr ==
'e' || *
ptr ==
'E') {
573 }
else if(*
ptr ==
'+') {
578 l =
l*10 + (*
ptr++ -
'0');
583 }
else if(*
ptr ==
'.') {
670 const double p32 = (
double)0xffffffff + 1;
703 static const WCHAR zeroW[] = {
'0',0};
729 static const WCHAR InfinityW[] = {
'-',
'I',
'n',
'f',
'i',
'n',
'i',
't',
'y',0};
759 static const WCHAR nullW[] = {
'n',
'u',
'l',
'l',0};
760 static const WCHAR trueW[] = {
't',
'r',
'u',
'e',0};
761 static const WCHAR falseW[] = {
'f',
'a',
'l',
's',
'e',0};
839 IDispatch_AddRef(*disp);
859 WARN(
"object expected\n");
933 V_BOOL(
dst) =
b ? VARIANT_TRUE : VARIANT_FALSE;
962 FIXME(
"vt %d not implemented\n",
vt);
985 *
ppv = &
This->IServiceProvider_iface;
988 *
ppv = &
This->IServiceProvider_iface;
1029 if(
IsEqualGUID(guidService, &SID_VariantConversion) &&
This->ctx &&
This->ctx->active_script) {
1030 TRACE(
"(%p)->(SID_VariantConversion)\n",
This);
1031 return IActiveScript_QueryInterface(
This->ctx->active_script,
riid,
ppv);
ios_base &_STLP_CALL dec(ios_base &__s)
static void * heap_alloc(size_t len)
static BOOL heap_free(void *mem)
static void * heap_realloc(void *mem, size_t len)
#define InterlockedIncrement
static const WCHAR toStringW[]
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
static void list_remove(struct list_entry *entry)
static void list_add_head(struct list_entry *head, struct list_entry *entry)
static void list_init(struct list_entry *head)
static const WCHAR valueOfW[]
HRESULT create_bool(script_ctx_t *ctx, BOOL b, jsdisp_t **ret)
static BOOL get_bool(D3DXPARAMETER_TYPE type, const void *data)
const char * wine_dbg_sprintf(const char *format,...)
#define WINE_DECLARE_DEBUG_CHANNEL(x)
HRESULT throw_type_error(script_ctx_t *ctx, HRESULT error, const WCHAR *str)
static REFPROPVARIANT PROPVAR_CHANGE_FLAGS VARTYPE vt
void clear_ei(script_ctx_t *ctx)
double pow(double x, double y)
GLdouble GLdouble GLdouble r
GLboolean GLboolean GLboolean b
GLenum GLuint GLenum GLsizei const GLchar * buf
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
_Check_return_ double __cdecl fmod(_In_ double x, _In_ double y)
_Check_return_ _CRTIMP double __cdecl floor(_In_ double x)
HRESULT jsdisp_call(jsdisp_t *disp, DISPID id, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
HRESULT disp_propget(script_ctx_t *ctx, IDispatch *disp, DISPID id, jsval_t *val)
HRESULT jsdisp_get_id(jsdisp_t *jsdisp, const WCHAR *name, DWORD flags, DISPID *id)
jsdisp_t * iface_to_jsdisp(IDispatch *iface)
static const WCHAR InfinityW[]
HRESULT create_number(script_ctx_t *, double, jsdisp_t **) DECLSPEC_HIDDEN
HRESULT create_string(script_ctx_t *, jsstr_t *, jsdisp_t **) DECLSPEC_HIDDEN
HRESULT create_object(script_ctx_t *, jsdisp_t *, jsdisp_t **) DECLSPEC_HIDDEN
#define JS_E_OBJECT_EXPECTED
static void jsdisp_release(jsdisp_t *jsdisp)
static BOOL is_int32(double d)
HRESULT create_vbarray(script_ctx_t *, SAFEARRAY *, jsdisp_t **) DECLSPEC_HIDDEN
static IDispatch * to_disp(jsdisp_t *jsdisp)
#define JS_E_TO_PRIMITIVE
static BOOL is_class(jsdisp_t *jsdisp, jsclass_t class)
static const WCHAR falseW[]
static const WCHAR trueW[]
static const WCHAR nullW[]
jsstr_t * jsstr_null_bstr(void)
jsstr_t * jsstr_alloc_len(const WCHAR *buf, unsigned len)
jsstr_t * jsstr_nan(void)
BOOL is_null_bstr(jsstr_t *str)
jsstr_t * jsstr_undefined(void)
const char * debugstr_jsstr(jsstr_t *str)
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)
static jsstr_t * jsstr_alloc(const WCHAR *str)
HRESULT create_jscaller(script_ctx_t *ctx)
void * heap_pool_alloc(heap_pool_t *heap, DWORD size)
static HRESULT WINAPI JSCaller_QueryInterface(IServiceProvider *iface, REFIID riid, void **ppv)
HRESULT to_boolean(jsval_t val, BOOL *ret)
void heap_pool_init(heap_pool_t *heap)
static HRESULT str_to_number(jsstr_t *str, double *ret)
HRESULT variant_change_type(script_ctx_t *ctx, VARIANT *dst, VARIANT *src, VARTYPE vt)
HRESULT variant_to_jsval(VARIANT *var, jsval_t *r)
heap_pool_t * heap_pool_mark(heap_pool_t *heap)
static jsstr_t * int_to_string(int i)
static HRESULT jsval_variant(jsval_t *val, VARIANT *var)
static HRESULT WINAPI JSCaller_QueryService(IServiceProvider *iface, REFGUID guidService, REFIID riid, void **ppv)
HRESULT jsval_copy(jsval_t v, jsval_t *r)
HRESULT to_flat_string(script_ctx_t *ctx, jsval_t val, jsstr_t **str, const WCHAR **ret_str)
static ULONG WINAPI JSCaller_Release(IServiceProvider *iface)
static ULONG WINAPI JSCaller_AddRef(IServiceProvider *iface)
void * heap_pool_grow(heap_pool_t *heap, void *mem, DWORD size, DWORD inc)
HRESULT to_object(script_ctx_t *ctx, jsval_t val, IDispatch **disp)
#define ARENA_FREE_FILLER
HRESULT to_uint32(script_ctx_t *ctx, jsval_t val, UINT32 *ret)
HRESULT to_string(script_ctx_t *ctx, jsval_t val, jsstr_t **str)
static DWORD block_size(DWORD block)
void heap_pool_free(heap_pool_t *heap)
const char * debugstr_jsval(const jsval_t v)
void heap_pool_clear(heap_pool_t *heap)
static JSCaller * impl_from_IServiceProvider(IServiceProvider *iface)
HRESULT double_to_string(double n, jsstr_t **str)
HRESULT to_number(script_ctx_t *ctx, jsval_t val, double *ret)
HRESULT to_primitive(script_ctx_t *ctx, jsval_t val, jsval_t *ret, hint_t hint)
static const IServiceProviderVtbl ServiceProviderVtbl
HRESULT to_integer(script_ctx_t *ctx, jsval_t v, double *ret)
void jsval_release(jsval_t val)
HRESULT jsval_to_variant(jsval_t val, VARIANT *retv)
HRESULT to_int32(script_ctx_t *ctx, jsval_t v, INT *ret)
static int hex_to_int(WCHAR c)
static VARIANT * get_variant(jsval_t v)
static jsval_t jsval_null(void)
static jsval_t jsval_string(jsstr_t *str)
static jsval_t jsval_undefined(void)
static jsval_t jsval_bool(BOOL b)
static jsval_type_t jsval_type(jsval_t v)
static jsstr_t * get_string(jsval_t v)
static double get_number(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)
#define memcpy(s1, s2, n)
static const char * debugstr_variant(const VARIANT *var)
static const char mbstate_t *static wchar_t const char mbstate_t *static const wchar_t int *static double
static VARIANTARG static DISPID
#define MAKELCID(lgid, srtid)
UINT WINAPI SysStringLen(BSTR str)
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
BSTR WINAPI SysAllocStringLen(const OLECHAR *str, unsigned int len)
#define IsEqualGUID(rguid1, rguid2)
_Check_return_ _CRTIMP int __cdecl wcsncmp(_In_reads_or_z_(_MaxCount) const wchar_t *_Str1, _In_reads_or_z_(_MaxCount) const wchar_t *_Str2, _In_ size_t _MaxCount)
#define SUBLANG_ENGLISH_US
#define CONTAINING_RECORD(address, type, field)
HRESULT WINAPI VariantChangeTypeEx(VARIANTARG *pvargDest, VARIANTARG *pvargSrc, LCID lcid, USHORT wFlags, VARTYPE vt)
HRESULT WINAPI DECLSPEC_HOTPATCH VariantClear(VARIANTARG *pVarg)
HRESULT WINAPI VariantCopy(VARIANTARG *pvargDest, VARIANTARG *pvargSrc)
static unsigned int block