#include <assert.h>
#include "jscript.h"
#include "wine/debug.h"
Go to the source code of this file.
|
| WINE_DEFAULT_DEBUG_CHANNEL (jscript) |
|
static BoolInstance * | bool_from_jsdisp (jsdisp_t *jsdisp) |
|
static BoolInstance * | bool_from_vdisp (vdisp_t *vdisp) |
|
static BoolInstance * | bool_this (vdisp_t *jsthis) |
|
BOOL | bool_obj_value (jsdisp_t *obj) |
|
static HRESULT | Bool_toString (script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r) |
|
static HRESULT | Bool_valueOf (script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r) |
|
static HRESULT | Bool_value (script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r) |
|
static HRESULT | BoolConstr_value (script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r) |
|
static HRESULT | alloc_bool (script_ctx_t *ctx, jsdisp_t *object_prototype, BoolInstance **ret) |
|
HRESULT | create_bool_constr (script_ctx_t *ctx, jsdisp_t *object_prototype, jsdisp_t **ret) |
|
HRESULT | create_bool (script_ctx_t *ctx, BOOL b, jsdisp_t **ret) |
|
|
static const WCHAR | toStringW [] = {'t','o','S','t','r','i','n','g',0} |
|
static const WCHAR | valueOfW [] = {'v','a','l','u','e','O','f',0} |
|
static const builtin_prop_t | Bool_props [] |
|
static const builtin_info_t | Bool_info |
|
static const builtin_info_t | BoolInst_info |
|
◆ alloc_bool()
Definition at line 175 of file bool.c.
176{
179
181 if(!bool)
183
184 if(object_prototype)
186 else
188
192 }
193
196}
static BOOL heap_free(void *mem)
static const builtin_info_t Bool_info
static const builtin_info_t BoolInst_info
HRESULT init_dispex_from_constr(jsdisp_t *dispex, script_ctx_t *ctx, const builtin_info_t *builtin_info, jsdisp_t *constr)
HRESULT init_dispex(jsdisp_t *dispex, script_ctx_t *ctx, const builtin_info_t *builtin_info, jsdisp_t *prototype)
Referenced by create_bool(), and create_bool_constr().
◆ bool_from_jsdisp()
◆ bool_from_vdisp()
Definition at line 42 of file bool.c.
43{
45}
static BoolInstance * bool_from_jsdisp(jsdisp_t *jsdisp)
Referenced by bool_this().
◆ bool_obj_value()
◆ bool_this()
Definition at line 47 of file bool.c.
48{
50}
static BoolInstance * bool_from_vdisp(vdisp_t *vdisp)
static BOOL is_vclass(vdisp_t *vdisp, jsclass_t class)
Referenced by Bool_toString(), and Bool_valueOf().
◆ Bool_toString()
Definition at line 59 of file bool.c.
60{
62
63 static const WCHAR trueW[] = {
't',
'r',
'u',
'e',0};
64 static const WCHAR falseW[] = {
'f',
'a',
'l',
's',
'e',0};
65
67
70
73
77
79 }
80
82}
static BoolInstance * bool_this(vdisp_t *jsthis)
HRESULT throw_type_error(script_ctx_t *ctx, HRESULT error, const WCHAR *str)
GLdouble GLdouble GLdouble r
#define JS_E_BOOLEAN_EXPECTED
static const WCHAR falseW[]
static const WCHAR trueW[]
static jsstr_t * jsstr_alloc(const WCHAR *str)
static jsval_t jsval_string(jsstr_t *str)
◆ Bool_value()
Definition at line 99 of file bool.c.
101{
103
105 case INVOKE_FUNC:
107 default:
110 }
111
113
114}
#define JS_E_FUNCTION_EXPECTED
◆ Bool_valueOf()
Definition at line 85 of file bool.c.
86{
88
90
93
97}
static jsval_t jsval_bool(BOOL b)
◆ BoolConstr_value()
Definition at line 138 of file bool.c.
140{
143
148 }
149
151 case DISPATCH_CONSTRUCT: {
153
157
160 }
161
162 case INVOKE_FUNC:
166
167 default:
170 }
171
173}
HRESULT create_bool(script_ctx_t *ctx, BOOL b, jsdisp_t **ret)
HRESULT to_boolean(jsval_t, BOOL *) DECLSPEC_HIDDEN
static jsval_t jsval_obj(jsdisp_t *obj)
Referenced by create_bool_constr().
◆ create_bool()
Definition at line 216 of file bool.c.
217{
220
224
226
227 *
ret = &
bool->dispex;
229}
static HRESULT alloc_bool(script_ctx_t *ctx, jsdisp_t *object_prototype, BoolInstance **ret)
Referenced by BoolConstr_value(), and to_object().
◆ create_bool_constr()
Definition at line 198 of file bool.c.
199{
202
203 static const WCHAR BooleanW[] = {
'B',
'o',
'o',
'l',
'e',
'a',
'n',0};
204
208
211
214}
static HRESULT BoolConstr_value(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *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 const WCHAR BooleanW[]
static void jsdisp_release(jsdisp_t *jsdisp)
Referenced by init_constructors().
◆ WINE_DEFAULT_DEBUG_CHANNEL()
WINE_DEFAULT_DEBUG_CHANNEL |
( |
jscript |
| ) |
|
◆ Bool_info
Initial value:= {
}
static const builtin_prop_t Bool_props[]
static HRESULT Bool_value(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
Definition at line 121 of file bool.c.
Referenced by alloc_bool().
◆ Bool_props
Initial value:= {
}
static const WCHAR valueOfW[]
static HRESULT Bool_valueOf(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static HRESULT Bool_toString(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r)
static const WCHAR toStringW[]
Definition at line 116 of file bool.c.
◆ BoolInst_info
◆ toStringW
◆ valueOfW