JavaScript-Duktape
view release on metacpan or search on metacpan
lib/JavaScript/Duktape/C/lib/duktape.c view on Meta::CPAN
#if !defined(DUK_USE_ES6_OBJECT_PROTO_PROPERTY)
DUK_DD(DUK_DDPRINT("delete Object.prototype.__proto__ built-in which is not enabled in features"));
(void) duk_hobject_delprop_raw(thr, thr->builtins[DUK_BIDX_OBJECT_PROTOTYPE], DUK_HTHREAD_STRING___PROTO__(thr), DUK_DELPROP_FLAG_THROW);
#endif
#if !defined(DUK_USE_ES6_OBJECT_SETPROTOTYPEOF)
DUK_DD(DUK_DDPRINT("delete Object.setPrototypeOf built-in which is not enabled in features"));
(void) duk_hobject_delprop_raw(thr, thr->builtins[DUK_BIDX_OBJECT_CONSTRUCTOR], DUK_HTHREAD_STRING_SET_PROTOTYPE_OF(thr), DUK_DELPROP_FLAG_THROW);
#endif
/* XXX: relocate */
duk_push_string(thr,
/* Endianness indicator */
#if defined(DUK_USE_INTEGER_LE)
"l"
#elif defined(DUK_USE_INTEGER_BE)
"b"
#elif defined(DUK_USE_INTEGER_ME) /* integer mixed endian not really used now */
"m"
#else
"?"
lib/JavaScript/Duktape/C/lib/duktape.c view on Meta::CPAN
* The number of local variables should be kept to a minimum: if
* the variables are spilled, they will need to be loaded from
* memory anyway.
*
* Any 'goto restart_execution;' code path in opcode dispatch must
* ensure 'curr_pc' is synced back to act->curr_pc before the goto
* takes place.
*
* The interpreter must be very careful with memory pointers, as
* many pointers are not guaranteed to be 'stable' and may be
* reallocated and relocated on-the-fly quite easily (e.g. by a
* memory allocation or a property access).
*
* The following are assumed to have stable pointers:
* - the current thread
* - the current function
* - the bytecode, constant table, inner function table of the
* current function (as they are a part of the function allocation)
*
* The following are assumed to have semi-stable pointers:
* - the current activation entry: stable as long as callstack
lib/JavaScript/Duktape/C/lib/duktape.c view on Meta::CPAN
return error_count;
}
/*
* Minimal test of user supplied allocation functions
*
* - Basic alloc + realloc + free cycle
*
* - Realloc to significantly larger size to (hopefully) trigger a
* relocation and check that relocation copying works
*/
DUK_LOCAL duk_uint_t duk__selftest_alloc_funcs(duk_alloc_function alloc_func,
duk_realloc_function realloc_func,
duk_free_function free_func,
void *udata) {
duk_uint_t error_count = 0;
void *ptr;
void *new_ptr;
duk_small_int_t i, j;
( run in 1.319 second using v1.01-cache-2.11-cpan-71847e10f99 )