Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F4408622
snapshot.c
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
630 B
Referenced Files
None
Subscribers
None
snapshot.c
View Options
#include
<string.h>
#include
"ant.h"
#include
"snapshot.h"
#include
"runtime.h"
#include
"internal.h"
#include
"snapshot_data.h"
#include
"gc/objects.h"
ant_value_t
ant_load_snapshot
(
ant_t
*
js
)
{
if
(
!
js
)
return
js_mkundef
();
const
char
*
src
=
(
const
char
*
)
ant_snapshot_source
;
ant_value_t
result
=
js_eval_bytecode
(
js
,
src
,
ant_snapshot_source_len
);
gc_pin_existing_objects
(
js
);
builtin_object_freeze
(
js
,
&
rt
->
ant_obj
,
1
);
return
vtype
(
result
)
==
T_ERR
?
result
:
js_true
;
}
const
uint8_t
*
ant_get_snapshot_source
(
size_t
*
len
)
{
if
(
len
)
*
len
=
ant_snapshot_source_len
;
return
ant_snapshot_source
;
}
File Metadata
Details
Attached
Mime Type
text/x-c
Expires
Fri, May 1, 6:52 PM (1 d, 23 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
541562
Default Alt Text
snapshot.c (630 B)
Attached To
Mode
rANT Ant
Attached
Detach File
Event Timeline
Log In to Comment