Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
47 lines (39 loc) · 1.6 KB

File metadata and controls

47 lines (39 loc) · 1.6 KB
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#include "devs_internal.h"
DEVS_DERIVE(TypeError_prototype, Error_prototype)
DEVS_DERIVE(RangeError_prototype, Error_prototype)
static void meth1_error_ctor(devs_ctx_t *ctx, unsigned blt, unsigned str) {
devs_map_t *m = devs_arg_self_map(ctx);
if (!m)
return;
if (m->proto == NULL)
m->proto = devs_get_builtin_object(ctx, blt);
value_t msg = devs_arg(ctx, 0);
if (devs_is_undefined(msg))
msg = devs_builtin_string(str);
devs_map_set_string_field(ctx, m, DEVS_BUILTIN_STRING_MESSAGE, msg);
devs_ret_gc_ptr(ctx, m);
}
void meth1_Error___ctor__(devs_ctx_t *ctx) {
meth1_error_ctor(ctx, DEVS_BUILTIN_OBJECT_ERROR_PROTOTYPE, DEVS_BUILTIN_STRING_ERROR);
}
void meth1_RangeError___ctor__(devs_ctx_t *ctx) {
meth1_error_ctor(ctx, DEVS_BUILTIN_OBJECT_RANGEERROR_PROTOTYPE, DEVS_BUILTIN_STRING_RANGEERROR);
}
void meth1_TypeError___ctor__(devs_ctx_t *ctx) {
meth1_error_ctor(ctx, DEVS_BUILTIN_OBJECT_TYPEERROR_PROTOTYPE, DEVS_BUILTIN_STRING_TYPEERROR);
}
void meth1_SyntaxError___ctor__(devs_ctx_t *ctx) {
meth1_error_ctor(ctx, DEVS_BUILTIN_OBJECT_SYNTAXERROR_PROTOTYPE,
DEVS_BUILTIN_STRING_SYNTAXERROR);
}
value_t prop_Error_name(devs_ctx_t *ctx, value_t self) {
value_t ctor = devs_object_get_built_in_field(ctx, self, DEVS_BUILTIN_STRING_CONSTRUCTOR);
if (devs_is_undefined(ctor))
return devs_undefined;
return devs_object_get_built_in_field(ctx, ctor, DEVS_BUILTIN_STRING_NAME);
}
void meth0_Error_print(devs_ctx_t *ctx) {
value_t exn = devs_arg_self(ctx);
devs_dump_exception(ctx, exn);
devs_track_exception(ctx);
}
Morty Proxy This is a proxified and sanitized view of the page, visit original site.