#pike __REAL_VERSION__ |
#pragma strict_types |
|
|
|
|
|
local { |
|
constant WEAK_INDICES = __builtin.PIKE_WEAK_INDICES; |
constant WEAK_VALUES = __builtin.PIKE_WEAK_VALUES; |
constant WEAK = WEAK_INDICES|WEAK_VALUES; |
|
|
|
constant INDEX_FROM_BEG = __builtin.INDEX_FROM_BEG; |
constant INDEX_FROM_END = __builtin.INDEX_FROM_END; |
constant OPEN_BOUND = __builtin.OPEN_BOUND; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#if constant(__builtin.DestructImmediate) |
constant DestructImmediate = __builtin.DestructImmediate; |
#endif |
|
#if constant(__builtin.InhibitDestruct) |
constant InhibitDestruct = __builtin.InhibitDestruct; |
#endif |
|
constant BacktraceFrame = __builtin.backtrace_frame; |
|
#if constant(__builtin.LiveBacktraceFrame) |
constant LiveBacktraceFrame = __builtin.LiveBacktraceFrame; |
#endif |
|
#if constant(__builtin.FakeObject) |
constant FakeObject = __builtin.FakeObject; |
#endif |
|
constant __Backend = __builtin.Backend; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
constant Backend = __builtin.DefaultBackendClass; |
|
|
|
#if constant(__builtin.PollDeviceBackend) |
constant PollDeviceBackend = __builtin.PollDeviceBackend; |
#endif |
|
#if constant(__builtin.PollBackend) |
constant PollBackend = __builtin.PollBackend; |
#endif |
|
|
|
|
|
|
|
|
|
|
#if constant(__builtin.PollBackend) |
constant SmallBackend = __builtin.PollBackend; |
#elif constant(__builtin.PollDeviceBackend) |
constant SmallBackend = __builtin.PollDeviceBackend; |
#else |
constant SmallBackend = __builtin.SelectBackend; |
#endif |
|
|
|
#if constant(__builtin.SelectBackend) |
constant SelectBackend = __builtin.SelectBackend; |
#endif |
|
constant DefaultBackend = __builtin.__backend; |
|
constant gc_parameters = __builtin.gc_parameters; |
constant implicit_gc_real_time = __builtin.implicit_gc_real_time; |
constant count_memory = __builtin.count_memory; |
constant identify_cycle = __builtin.identify_cycle; |
|
constant get_runtime_info = __builtin.get_runtime_info; |
|
|
constant soft_cast = predef::__soft_cast; |
constant low_check_call = predef::__low_check_call; |
constant get_return_type = predef::__get_return_type; |
constant get_first_arg_type = predef::__get_first_arg_type; |
constant get_type_attributes = predef::__get_type_attributes; |
|
|
#if constant(__builtin.__HAVE_CPP_PREFIX_SUPPORT__) |
|
|
|
|
constant __HAVE_CPP_PREFIX_SUPPORT__ = __builtin.__HAVE_CPP_PREFIX_SUPPORT__; |
#endif |
|
program Encoder = [program] master()->Encoder; |
program Decoder = [program] master()->Decoder; |
program Codec = [program] master()->Codec; |
|
#if constant(__builtin.Annotation) |
program Annotation = __builtin.Annotation; |
#endif |
|
#if constant(__builtin.ProxyFactory) |
constant ProxyFactory = __builtin.ProxyFactory; |
#endif |
|
#if 0 |
protected constant TYPE = typeof(typeof([mixed]0)); |
|
TYPE check_call(TYPE fun_type, TYPE ... arg_types) |
{ |
array(TYPE) conts = allocate(sizeof(arg_types) + 1); |
conts[0] = fun_type; |
foreach(arg_types; int i; TYPE arg_type) { |
if (!(conts[i+1] = low_check_call(conts[i], arg_type, |
(i == (sizeof(arg_types)-1))?2:0))) { |
werror("Error: Bad argument %d to function, got %O, expected %O.\n", |
i+1, arg_type, get_first_arg_type(conts[i])); |
break; |
} |
} |
if (!conts[sizeof(arg_types)]) { |
int i; |
for(i = 0; (i < sizeof(arg_types)) && conts[i+1]; i++) { |
TYPE param_type = get_first_arg_type(conts[i]); |
if (arg_types[i] <= param_type) continue; |
werror("Warning: Potentially bad argument %d to function, got %O, expected %O.\n", |
i+1, arg_types[i], param_type); |
} |
return 0; |
} |
TYPE ret = get_return_type(conts[-1]); |
if (!ret) { |
werror("Error: Too few arguments.\n"); |
} |
return ret; |
} |
#endif /* 0 */ |
|
} |
|
|