ReactOS
0.4.15-dev-5615-gc3644fd
|
#include <stdarg.h>
#include <stdio.h>
#include <stdint.h>
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
#include "ole2.h"
#include "dispex.h"
#include "activscp.h"
#include "resource.h"
#include "wine/heap.h"
#include "wine/list.h"
#include "jsval.h"
Go to the source code of this file.
Classes | |
struct | heap_pool_t |
struct | vdisp_t |
struct | builtin_prop_t |
struct | builtin_info_t |
struct | jsdisp_t |
struct | named_item_t |
struct | cc_ctx_t |
struct | JSCaller |
struct | _property_desc_t |
struct | jsexcept_t |
struct | match_result_t |
struct | _script_ctx_t |
Typedefs | |
typedef struct _jsval_t | jsval_t |
typedef struct _jsstr_t | jsstr_t |
typedef struct _script_ctx_t | script_ctx_t |
typedef struct _dispex_prop_t | dispex_prop_t |
typedef struct _property_desc_t | property_desc_t |
typedef struct jsdisp_t | jsdisp_t |
typedef HRESULT(* | builtin_invoke_t) (script_ctx_t *, vdisp_t *, WORD, unsigned, jsval_t *, jsval_t *) |
typedef HRESULT(* | builtin_getter_t) (script_ctx_t *, jsdisp_t *, jsval_t *) |
typedef HRESULT(* | builtin_setter_t) (script_ctx_t *, jsdisp_t *, jsval_t) |
typedef struct named_item_t | named_item_t |
typedef struct _cc_var_t | cc_var_t |
Enumerations | |
enum | jsclass_t { JSCLASS_NONE, JSCLASS_ARRAY, JSCLASS_BOOLEAN, JSCLASS_DATE, JSCLASS_ENUMERATOR, JSCLASS_ERROR, JSCLASS_FUNCTION, JSCLASS_GLOBAL, JSCLASS_MATH, JSCLASS_NUMBER, JSCLASS_OBJECT, JSCLASS_REGEXP, JSCLASS_STRING, JSCLASS_ARGUMENTS, JSCLASS_VBARRAY, JSCLASS_JSON } |
enum | hint_t { NO_HINT, HINT_STRING, HINT_NUMBER } |
Variables | |
HINSTANCE jscript_hinstance | DECLSPEC_HIDDEN |
#define DEFAULT_FUNCTION_VALUE {NULL, Function_value,0, Function_get_value} |
#define DISPATCH_JSCRIPT_INTERNAL_MASK DISPATCH_JSCRIPT_CALLEREXECSSOURCE |
#define JS_E_ARRAY_EXPECTED MAKE_JSERROR(IDS_ARRAY_EXPECTED) |
#define JS_E_BOOLEAN_EXPECTED MAKE_JSERROR(IDS_NOT_BOOL) |
#define JS_E_CANNOT_CREATE_OBJ MAKE_JSERROR(IDS_CREATE_OBJ_ERROR) |
#define JS_E_DATE_EXPECTED MAKE_JSERROR(IDS_NOT_DATE) |
#define JS_E_DISABLED_CC MAKE_JSERROR(IDS_DISABLED_CC) |
#define JS_E_ENUMERATOR_EXPECTED MAKE_JSERROR(IDS_NOT_ENUMERATOR) |
#define JS_E_EXPECTED_ASSIGN MAKE_JSERROR(IDS_EXPECTED_ASSIGN) |
#define JS_E_EXPECTED_AT MAKE_JSERROR(IDS_EXPECTED_AT) |
#define JS_E_EXPECTED_CCEND MAKE_JSERROR(IDS_EXPECTED_CCEND) |
#define JS_E_EXPECTED_IDENTIFIER MAKE_JSERROR(IDS_EXPECTED_IDENTIFIER) |
#define JS_E_FRACTION_DIGITS_OUT_OF_RANGE MAKE_JSERROR(IDS_FRACTION_DIGITS_OUT_OF_RANGE) |
#define JS_E_FUNCTION_EXPECTED MAKE_JSERROR(IDS_NOT_FUNC) |
#define JS_E_ILLEGAL_ASSIGN MAKE_JSERROR(IDS_ILLEGAL_ASSIGN) |
#define JS_E_INVALID_ACTION MAKE_JSERROR(IDS_UNSUPPORTED_ACTION) |
#define JS_E_INVALID_BREAK MAKE_JSERROR(IDS_INVALID_BREAK) |
#define JS_E_INVALID_CHAR MAKE_JSERROR(IDS_INVALID_CHAR) |
#define JS_E_INVALID_CONTINUE MAKE_JSERROR(IDS_INVALID_CONTINUE) |
#define JS_E_INVALID_DELETE MAKE_JSERROR(IDS_INVALID_DELETE) |
#define JS_E_INVALID_LENGTH MAKE_JSERROR(IDS_INVALID_LENGTH) |
#define JS_E_INVALID_PROPERTY MAKE_JSERROR(IDS_NO_PROPERTY) |
#define JS_E_INVALID_URI_CHAR MAKE_JSERROR(IDS_URI_INVALID_CHAR) |
#define JS_E_INVALID_URI_CODING MAKE_JSERROR(IDS_URI_INVALID_CODING) |
#define JS_E_INVALID_WRITABLE_PROP_DESC MAKE_JSERROR(IDS_INVALID_WRITABLE_PROP_DESC) |
#define JS_E_INVALIDARG MAKE_JSERROR(IDS_INVALID_CALL_ARG) |
#define JS_E_JSCRIPT_EXPECTED MAKE_JSERROR(IDS_JSCRIPT_EXPECTED) |
#define JS_E_LABEL_NOT_FOUND MAKE_JSERROR(IDS_LABEL_NOT_FOUND) |
#define JS_E_LABEL_REDEFINED MAKE_JSERROR(IDS_LABEL_REDEFINED) |
#define JS_E_MISPLACED_RETURN MAKE_JSERROR(IDS_MISPLACED_RETURN) |
#define JS_E_MISSING_ARG MAKE_JSERROR(IDS_ARG_NOT_OPT) |
#define JS_E_MISSING_LBRACKET MAKE_JSERROR(IDS_LBRACKET) |
#define JS_E_MISSING_RBRACKET MAKE_JSERROR(IDS_RBRACKET) |
#define JS_E_MISSING_SEMICOLON MAKE_JSERROR(IDS_SEMICOLON) |
#define JS_E_NONCONFIGURABLE_REDEFINED MAKE_JSERROR(IDS_NONCONFIGURABLE_REDEFINED) |
#define JS_E_NONWRITABLE_MODIFIED MAKE_JSERROR(IDS_NONWRITABLE_MODIFIED) |
#define JS_E_NUMBER_EXPECTED MAKE_JSERROR(IDS_NOT_NUM) |
#define JS_E_OBJECT_EXPECTED MAKE_JSERROR(IDS_OBJECT_EXPECTED) |
#define JS_E_OBJECT_REQUIRED MAKE_JSERROR(IDS_OBJECT_REQUIRED) |
#define JS_E_PRECISION_OUT_OF_RANGE MAKE_JSERROR(IDS_PRECISION_OUT_OF_RANGE) |
#define JS_E_PROP_DESC_MISMATCH MAKE_JSERROR(IDS_PROP_DESC_MISMATCH) |
#define JS_E_REGEXP_SYNTAX MAKE_JSERROR(IDS_REGEXP_SYNTAX_ERROR) |
#define JS_E_SUBSCRIPT_OUT_OF_RANGE MAKE_JSERROR(IDS_SUBSCRIPT_OUT_OF_RANGE) |
#define JS_E_SYNTAX MAKE_JSERROR(IDS_SYNTAX_ERROR) |
#define JS_E_TO_PRIMITIVE MAKE_JSERROR(IDS_TO_PRIMITIVE) |
#define JS_E_UNDEFINED_VARIABLE MAKE_JSERROR(IDS_UNDEFINED) |
#define JS_E_UNTERMINATED_STRING MAKE_JSERROR(IDS_UNTERMINATED_STR) |
#define JS_E_VBARRAY_EXPECTED MAKE_JSERROR(IDS_NOT_VBARRAY) |
#define MAKE_JSERROR | ( | code | ) | MAKE_HRESULT(SEVERITY_ERROR, FACILITY_JSCRIPT, code) |
#define PROPF_ALL (PROPF_ENUMERABLE | PROPF_WRITABLE | PROPF_CONFIGURABLE) |
#define PROPF_ES5 ((SCRIPTLANGUAGEVERSION_HTML|SCRIPTLANGUAGEVERSION_ES5) << PROPF_VERSION_SHIFT) |
#define PROPF_HTML (SCRIPTLANGUAGEVERSION_HTML << PROPF_VERSION_SHIFT) |
typedef HRESULT(* builtin_getter_t) (script_ctx_t *, jsdisp_t *, jsval_t *) |
typedef HRESULT(* builtin_setter_t) (script_ctx_t *, jsdisp_t *, jsval_t) |
typedef struct _dispex_prop_t dispex_prop_t |
typedef struct named_item_t named_item_t |
typedef struct _property_desc_t property_desc_t |
typedef struct _script_ctx_t script_ctx_t |
Enumerator | |
---|---|
NO_HINT | |
HINT_STRING | |
HINT_NUMBER |
Definition at line 119 of file jscript.h.
Definition at line 73 of file array.c.
Referenced by stringify_array().
Definition at line 908 of file dispex.c.
Referenced by interp_obj_prop().
Definition at line 52 of file bool.c.
Referenced by maybe_to_primitive().
HRESULT builtin_set_const | ( | script_ctx_t * | , |
jsdisp_t * | , | ||
jsval_t | |||
) |
Definition at line 555 of file dispex.c.
void clear_ei | ( | script_ctx_t * | ) |
Definition at line 430 of file engine.c.
Referenced by compile_error(), disp_call(), disp_call_value(), disp_propget(), disp_propput(), DispatchEx_InvokeEx(), Err_Clear(), exec_global_code(), index_from_val(), JScriptParse_ParseScriptText(), release_script(), script_release(), unwind_exception(), and variant_change_type().
HRESULT create_activex_constr | ( | script_ctx_t * | , |
jsdisp_t ** | |||
) |
Definition at line 188 of file activex.c.
Referenced by init_global().
HRESULT create_array | ( | script_ctx_t * | , |
DWORD | , | ||
jsdisp_t ** | |||
) |
Definition at line 1381 of file array.c.
Referenced by Array_concat(), Array_map(), Array_slice(), Array_splice(), ArrayConstr_value(), create_match_array(), interp_carray(), parse_json_value(), regexp_string_match(), String_split(), and VBArray_toArray().
HRESULT create_array_constr | ( | script_ctx_t * | , |
jsdisp_t * | , | ||
jsdisp_t ** | |||
) |
Definition at line 1364 of file array.c.
Referenced by init_constructors().
IUnknown* create_ax_site | ( | script_ctx_t * | ) |
Definition at line 324 of file jscript.c.
HRESULT create_bool | ( | script_ctx_t * | , |
BOOL | , | ||
jsdisp_t ** | |||
) |
Definition at line 216 of file bool.c.
Referenced by BoolConstr_value(), and to_object().
HRESULT create_bool_constr | ( | script_ctx_t * | , |
jsdisp_t * | , | ||
jsdisp_t ** | |||
) |
Definition at line 198 of file bool.c.
Referenced by init_constructors().
HRESULT create_builtin_constructor | ( | script_ctx_t * | , |
builtin_invoke_t | , | ||
const WCHAR * | , | ||
const builtin_info_t * | , | ||
DWORD | , | ||
jsdisp_t * | , | ||
jsdisp_t ** | |||
) |
Definition at line 686 of file function.c.
Referenced by create_array_constr(), create_bool_constr(), create_date_constr(), create_enumerator_constr(), create_number_constr(), create_object_constr(), create_regexp_constr(), create_string_constr(), create_vbarray_constr(), and init_error_constr().
HRESULT create_builtin_function | ( | script_ctx_t * | , |
builtin_invoke_t | , | ||
const WCHAR * | , | ||
const builtin_info_t * | , | ||
DWORD | , | ||
jsdisp_t * | , | ||
jsdisp_t ** | |||
) |
Definition at line 651 of file function.c.
Referenced by create_activex_constr(), create_builtin_constructor(), and prop_get().
HRESULT create_date_constr | ( | script_ctx_t * | , |
jsdisp_t * | , | ||
jsdisp_t ** | |||
) |
Definition at line 2534 of file date.c.
Referenced by init_constructors().
HRESULT create_dispex | ( | script_ctx_t * | , |
const builtin_info_t * | , | ||
jsdisp_t * | , | ||
jsdisp_t ** | |||
) |
Definition at line 957 of file dispex.c.
Referenced by create_object_prototype(), init_global(), interp_enter_catch(), InterpretedFunction_call(), and Object_create().
HRESULT create_enumerator_constr | ( | script_ctx_t * | , |
jsdisp_t * | , | ||
jsdisp_t ** | |||
) |
Definition at line 332 of file enumerator.c.
Referenced by init_constructors().
HRESULT create_jscaller | ( | script_ctx_t * | ) |
Definition at line 1047 of file jsutils.c.
Referenced by JScriptParse_InitNew().
Definition at line 1072 of file jscript.c.
Referenced by JScriptEncodeFactory_CreateInstance(), and JScriptFactory_CreateInstance().
HRESULT create_json | ( | script_ctx_t * | , |
jsdisp_t ** | |||
) |
Definition at line 837 of file json.c.
Referenced by init_global().
HRESULT create_math | ( | script_ctx_t * | , |
jsdisp_t ** | |||
) |
Definition at line 533 of file math.c.
Referenced by init_global().
HRESULT create_number | ( | script_ctx_t * | , |
double | , | ||
jsdisp_t ** | |||
) |
Definition at line 632 of file number.c.
Referenced by NumberConstr_value(), and to_object().
HRESULT create_number_constr | ( | script_ctx_t * | , |
jsdisp_t * | , | ||
jsdisp_t ** | |||
) |
Definition at line 613 of file number.c.
Referenced by init_constructors().
HRESULT create_object | ( | script_ctx_t * | , |
jsdisp_t * | , | ||
jsdisp_t ** | |||
) |
Definition at line 731 of file object.c.
Referenced by create_activex_constr(), create_source_function(), d3drm3_CreateObject(), interp_new_obj(), InterpretedFunction_call(), Object_getOwnPropertyDescriptor(), ObjectConstr_value(), parse_json_value(), and to_object().
HRESULT create_object_constr | ( | script_ctx_t * | , |
jsdisp_t * | , | ||
jsdisp_t ** | |||
) |
Definition at line 718 of file object.c.
Referenced by init_constructors().
HRESULT create_object_prototype | ( | script_ctx_t * | , |
jsdisp_t ** | |||
) |
Definition at line 726 of file object.c.
Referenced by init_global().
HRESULT create_regexp | ( | script_ctx_t * | , |
jsstr_t * | , | ||
DWORD | , | ||
jsdisp_t ** | |||
) |
Definition at line 644 of file jsregexp.c.
Referenced by create_regexp_var(), interp_new(), interp_regexp(), and String_match().
HRESULT create_regexp_constr | ( | script_ctx_t * | , |
jsdisp_t * | , | ||
jsdisp_t ** | |||
) |
Definition at line 1004 of file jsregexp.c.
Referenced by init_constructors().
HRESULT create_regexp_var | ( | script_ctx_t * | , |
jsval_t | , | ||
jsval_t * | , | ||
jsdisp_t ** | |||
) |
Definition at line 674 of file jsregexp.c.
Referenced by RegExpConstr_value(), and String_search().
HRESULT create_string | ( | script_ctx_t * | , |
jsstr_t * | , | ||
jsdisp_t ** | |||
) |
Definition at line 1787 of file string.c.
Referenced by StringConstr_value(), and to_object().
HRESULT create_string_constr | ( | script_ctx_t * | , |
jsdisp_t * | , | ||
jsdisp_t ** | |||
) |
Definition at line 1769 of file string.c.
Referenced by init_constructors().
HRESULT create_vbarray | ( | script_ctx_t * | , |
SAFEARRAY * | , | ||
jsdisp_t ** | |||
) |
Definition at line 347 of file vbarray.c.
Referenced by to_object().
HRESULT create_vbarray_constr | ( | script_ctx_t * | , |
jsdisp_t * | , | ||
jsdisp_t ** | |||
) |
Definition at line 330 of file vbarray.c.
Referenced by init_constructors().
Definition at line 35 of file jsutils.c.
Referenced by Arguments_idx_put(), Array_forEach(), Array_map(), bind_event_target(), builtin_set_const(), create_regexp_var(), exprval_call(), Function_bind(), interp_add(), interp_carray_set(), interp_eq(), interp_eq2(), interp_gt(), interp_gteq(), interp_lt(), interp_lteq(), interp_neq(), invoke_prop_func(), jsdisp_define_property(), JSGlobal_eval(), JSON_stringify(), Object_create(), Object_getPrototypeOf(), print_backtrace(), prop_get(), prop_put(), to_string(), and unwind_exception().
Definition at line 111 of file decode.c.
Referenced by compile_script().
HRESULT disp_call | ( | script_ctx_t * | , |
IDispatch * | , | ||
DISPID | , | ||
WORD | , | ||
unsigned | , | ||
jsval_t * | , | ||
jsval_t * | |||
) |
Definition at line 1136 of file dispex.c.
Referenced by do_icall(), do_mcall(), exprval_call(), and interp_newenum().
HRESULT disp_call_value | ( | script_ctx_t * | , |
IDispatch * | , | ||
IDispatch * | , | ||
WORD | , | ||
unsigned | , | ||
jsval_t * | , | ||
jsval_t * | |||
) |
Definition at line 1228 of file dispex.c.
Referenced by Array_forEach(), Array_map(), exprval_call(), Function_apply(), interp_call(), interp_new(), and invoke_prop_func().
Definition at line 1511 of file dispex.c.
Referenced by interp_delete_ident().
HRESULT disp_delete_name | ( | script_ctx_t * | , |
IDispatch * | , | ||
jsstr_t * | , | ||
BOOL * | |||
) |
Definition at line 1574 of file dispex.c.
Referenced by interp_delete().
HRESULT disp_propget | ( | script_ctx_t * | , |
IDispatch * | , | ||
DISPID | , | ||
jsval_t * | |||
) |
Definition at line 1458 of file dispex.c.
Referenced by exprval_propget(), interp_array(), interp_member(), and to_primitive().
HRESULT disp_propput | ( | script_ctx_t * | , |
IDispatch * | , | ||
DISPID | , | ||
jsval_t | |||
) |
Definition at line 1359 of file dispex.c.
Referenced by assign_ident(), exprval_propput(), interp_assign_member(), and interp_set_member().
Definition at line 727 of file jsutils.c.
Referenced by literal_as_string(), stringify(), and to_string().
HRESULT Function_get_value | ( | script_ctx_t * | , |
jsdisp_t * | , | ||
jsval_t * | |||
) |
Definition at line 487 of file function.c.
Definition at line 264 of file function.c.
Referenced by invoke_prop_func(), and jsdisp_call_value().
Definition at line 471 of file function.c.
Definition at line 199 of file jscript.h.
Referenced by Error_toString(), and Object_toString().
void* heap_pool_alloc | ( | heap_pool_t * | , |
DWORD | |||
) |
Definition at line 77 of file jsutils.c.
Referenced by add_dynamic_var(), alloc_local(), alloc_match_state(), compiler_alloc(), compiler_alloc_zero(), heap_pool_grow(), InitMatch(), NewRENode(), parser_alloc(), and parser_alloc_tmp().
void heap_pool_clear | ( | heap_pool_t * | ) |
Definition at line 146 of file jsutils.c.
Referenced by RegExp2_Test(), RegExp_exec(), regexp_execute(), regexp_match(), regexp_match_next(), regexp_new(), regexp_string_match(), and RegExp_test().
void heap_pool_free | ( | heap_pool_t * | ) |
Definition at line 169 of file jsutils.c.
Referenced by compile_script(), RegExp2_Release(), release_bytecode(), release_exec(), release_script(), release_vbscode(), and script_release().
void* heap_pool_grow | ( | heap_pool_t * | , |
void * | , | ||
DWORD | , | ||
DWORD | |||
) |
Definition at line 130 of file jsutils.c.
Referenced by PushBackTrackState(), and ReallocStateStack().
void heap_pool_init | ( | heap_pool_t * | ) |
Definition at line 71 of file jsutils.c.
Referenced by alloc_vbscode(), compile_script(), create_regexp(), exec_script(), init_code(), JScriptParse_InitNew(), release_script(), and VBScriptFactory_CreateInstance().
heap_pool_t* heap_pool_mark | ( | heap_pool_t * | ) |
Definition at line 182 of file jsutils.c.
Referenced by RegExp2_Test(), RegExp_exec(), regexp_execute(), regexp_match(), regexp_match_next(), regexp_new(), regexp_string_match(), and RegExp_test().
Definition at line 1060 of file dispex.c.
Referenced by Array_sort(), ArrayConstr_isArray(), concat_obj(), create_regexp_var(), disp_call(), disp_call_value(), disp_delete(), disp_delete_name(), disp_get_id(), disp_propget(), disp_propput(), exec_source(), Function_apply(), init_dispex_from_constr(), interp_carray_set(), interp_instanceof(), interp_obj_prop(), maybe_to_primitive(), RegExpConstr_value(), set_disp(), String_match(), String_replace(), String_search(), String_split(), stringify(), to_primitive(), and typeof_string().
HRESULT init_dispex | ( | jsdisp_t * | , |
script_ctx_t * | , | ||
const builtin_info_t * | , | ||
jsdisp_t * | |||
) |
Definition at line 919 of file dispex.c.
Referenced by alloc_array(), alloc_bool(), alloc_doc_node(), alloc_enumerator(), alloc_error(), alloc_number(), alloc_regexp(), alloc_vbarray(), create_child_collection(), create_date(), create_dispex(), create_dom_implementation(), create_event(), create_func_disp(), create_function(), create_history(), create_html_rect(), create_inner_window(), create_mime_types_collection(), create_parseError(), create_plugins_collection(), create_storage(), HTMLCurrentStyle_Create(), HTMLDocument_Create(), HTMLDOMAttribute_Create(), HTMLDOMTextNode_Create(), HTMLElement_get_attr_col(), HTMLElement_Init(), HTMLElementCollection_Create(), HTMLFiltersCollection_Create(), HTMLImageElementFactory_Create(), HTMLLocation_Create(), HTMLOptionElementFactory_Create(), HTMLScreen_Create(), HTMLSelectionObject_Create(), HTMLStyle_Create(), HTMLStyleSheet_Create(), HTMLStyleSheetRulesCollection_Create(), HTMLStyleSheetsCollection_Create(), HTMLTxtRange_Create(), HTMLXMLHttpRequestFactory_create(), HTMLXMLHttpRequestFactory_Create(), init_dispex_from_constr(), MXNamespaceManager_create(), MXWriter_create(), OmNavigator_Create(), SAXAttributes_create(), string_alloc(), XSLProcessor_create(), and XSLTemplate_create().
HRESULT init_dispex_from_constr | ( | jsdisp_t * | , |
script_ctx_t * | , | ||
const builtin_info_t * | , | ||
jsdisp_t * | |||
) |
Definition at line 1030 of file dispex.c.
Referenced by alloc_array(), alloc_bool(), alloc_enumerator(), alloc_error(), alloc_number(), alloc_regexp(), alloc_vbarray(), create_date(), create_function(), create_json(), create_math(), create_object(), setup_arguments_object(), and string_alloc().
HRESULT init_error_constr | ( | script_ctx_t * | , |
jsdisp_t * | |||
) |
Definition at line 328 of file error.c.
Referenced by init_constructors().
HRESULT init_function_constr | ( | script_ctx_t * | , |
jsdisp_t * | |||
) |
Definition at line 1010 of file function.c.