2 Copyright (C) 2001-2007, Parrot Foundation.
7 src/pmc/null.pmc - NULL
11 This simply creates a way of catching C<NULL> register accesses without
12 really slowing down the bytecode execution.
22 PARROT_DOES_NOT_RETURN
24 null_pmc_access(PARROT_INTERP, int index)
26 Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_NULL_REG_ACCESS,
27 "Null PMC access in %s()",
28 Parrot_get_vtable_name(interp, index));
31 pmclass Null singleton {
37 Overrides the default to do nothing.
47 VTABLE void *get_pointer() {
52 VTABLE void set_pointer(void *p) {
57 VTABLE INTVAL does(STRING *what) {
60 /* XXX maybe a hack to get TGE running again */
66 =item C<INTVAL is_same(PMC *value)>
68 Returns true if value is also a null PMC, false otherwise.
73 VTABLE INTVAL is_same(PMC *value) {
74 return PMC_IS_NULL(value);
79 =item C<PMC *find_method(STRING *method_name)>
83 Gives a more informative message than the automaticaaly generated version.
87 VTABLE PMC *find_method(STRING *method_name) {
88 Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_NULL_REG_ACCESS,
89 "Null PMC access in find_method('%Ss')",
105 * c-file-style: "parrot"
107 * vim: expandtab shiftwidth=4: