Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Null PMC access in --target=PAST output #14

Closed
masak opened this Issue May 15, 2011 · 2 comments

Comments

Projects
None yet
3 participants
Owner

masak commented May 15, 2011

Running nqp commit a555ce,

$ ./nqp --target=PAST
> say(42)

"past" => PMC 'PAST;Block'  {
    <hll> => "nqp"
    <loadinit> => PMC 'PAST;Stmts'  {
        [0] => PMC 'PAST;Op'  {
            <pasttype> => "if"
            [0] => PMC 'PAST;Op'  {
                <pirop> => "isnull IP"
                [0] => PMC 'PAST;Op'  {
                    <pirop> => "nqp_get_sc Ps"
                    [0] => "1305448589.01501"
                }
            }
            [1] => PMC 'PAST;Stmts'  {
                [0] => PMC 'PAST;Op'  {
                    <pirop> => "nqp_dynop_setup v"
                }
                [1] => PMC 'PAST;Op'  {
                    <name> => "hll_map"
                    <pasttype> => "callmethod"
                    [0] => PMC 'PAST;Op'  {
                        <pirop> => "getinterp P"
                    }
                    [1] => PMC 'PAST;Op'  {
                        <pirop> => "get_class Ps"
                        [0] => "LexPad"
                    }
                    [2] => PMC 'PAST;Op'  {
                        <pirop> => "get_class Ps"
                        [0] => "NQPLexPad"
                    }
                }
                [2] => PMC 'PAST;Op'  {
                    <pasttype> => "bind"
                    [0] => PMC 'PAST;Var'  {
                        <isdecl> => 1
                        <name> => "cur_sc"
                        <scope> => "register"
                    }
                    [1] => PMC 'PAST;Op'  {
                        <pirop> => "nqp_create_sc Ps"
                        [0] => \past
                    }
                }
                [3] => PMC 'PAST;Stmts'  {
                    [0] => PMC 'PAST;Op'  {
                        <pirop> => "nqp_set_sc_object vsiP"
                        [0] => \past
                        [1] => 0
                        [2] => PMC 'PAST;Op'  {
                            <pirop> => "nqp_set_sc_for_object__0PP"
                            [0] => PMC 'PAST;Op'  {
                                <name> => "new_type"
                                <pasttype> => "callmethod"
                                [0] => PMC 'PAST;Op'  {
                                    <pirop> => "nqp_get_sc_object Psi"
                                    [0] => "__6MODEL_CORE__"
                                    [1] => 0
                                }
                                [1] => PMC 'PAST;Val'  {
                                    <named> => "name"
                                    <value> => "GLOBALish"
                                }
                            }
                            [1] => PMC 'PAST;Var'  {
                                <name> => "cur_sc"
                                <scope> => "register"
                            }
                        }
                    }
                    [1] => PMC 'PAST;Stmts'  {
                        [0] => PMC 'PAST;Op'  {
                            <name> => "set_static_lexpad_value"
                            <pasttype> => "callmethod"
                            [0] => PMC 'PAST;Op'  {
                                <name> => "get_lexinfo"
                                <pasttype> => "callmethod"
                                [0] => PMC 'PAST;Val'  {
                                    <value> => \past
                                }
                            }
                            [1] => "GLOBALish"
                            [2] => PMC 'PAST;Op'  {
                                <pirop> => "nqp_get_sc_object Psi"
                                [0] => \past
                                [1] => \past
                            }
                        }
                        [1] => PMC 'PAST;Op'  {
                            <name> => "finish_static_lexpad"
                            <pasttype> => "callmethod"
                            [0] => PMC 'PAST;Op'  {
                                <name> => "get_lexinfo"
                                <pasttype> => "callmethod"
                                [0] => PMC 'PAST;Val'  {
                                    <value> => \past
                                }
                            }
                        }
                    }
                    [2] => PMC 'PAST;Stmts'  {
                        [0] => PMC 'PAST;Op'  {
                            <name> => "set_static_lexpad_value"
                            <pasttype> => "callmethod"
                            [0] => PMC 'PAST;Op'  {
                                <name> => "get_lexinfo"
                                <pasttype> => "callmethod"
                                [0] => PMC 'PAST;Val'  {
                                    <value> => \past
                                }
                            }
                            [1] => "$?PACKAGE"
                            [2] => PMC 'PAST;Op'  {
                                <pirop> => "nqp_get_sc_object Psi"
                                [0] => \past
                                [1] => \past
                            }
                        }
                        [1] => PMC 'PAST;Op'  {
                            <name> => "finish_static_lexpad"
                            <pasttype> => "callmethod"
                            [0] => PMC 'PAST;Op'  {
                                <name> => "get_lexinfo"
                                <pasttype> => "callmethod"
                                [0] => PMC 'PAST;Val'  {
                                    <value> => \past
                                }
                            }
                        }
                    }
                    [3] => PMC 'PAST;Stmts'  {
                        [0] => PMC 'PAST;Op'  {
                            <pirop> => "load_bytecode vs"
                            [0] => "ModuleLoader.pbc"
                        }
                        [1] => PMC 'PAST;Op'  {
                            <name> => "set_outer_ctx"
                            <pasttype> => "callmethod"
                            [0] => PMC 'PAST;Var'  {
                                <name> => "block"
                                <scope> => "register"
                            }
                            [1] => PMC 'PAST;Op'  {
                                <name> => "load_setting"
                                <pasttype> => "callmethod"
                                [0] => PMC 'PAST;Var'  {
                                    <name> => "ModuleLoader"
                                    <namespace> => ResizablePMCArray (size:0) [
                                    ]
                                    <scope> => "package"
                                }
                                [1] => "NQPCORE"
                            }
                        }
                    }
                    [4] => PMC 'PAST;Stmts'  {
                        [0] => PMC 'PAST;Op'  {
                            <pirop> => "load_bytecode vs"
                            [0] => "ModuleLoader.pbc"
                        }
                        [1] => PMC 'PAST;Op'  {
                            <name> => "load_module"
                            <pasttype> => "callmethod"
                            [0] => PMC 'PAST;Var'  {
                                <name> => "ModuleLoader"
                                <namespace> => ResizablePMCArray (size:0) [
                                ]
                                <scope> => "package"
                            }
                            [1] => "NQPRegex"
                            [2] => PMC 'PAST;Op'  {
                                <pirop> => "nqp_get_sc_object Psi"
                                [0] => \past
                                [1] => \past
                            }
                        }
                    }
                }
            }
            [2] => PMC 'PAST;Stmts'  {
                [0] => \past
                [1] => \past
            }
        }
        [1] => PMC 'PAST;Op'  {
            <pasttype> => "bind"
            [0] => PMC 'PAST;Var'  {
                <name> => "GLOBAL"
                <namespace> => ResizablePMCArray (size:0) [
                ]
                <scope> => "package"
            }
            [1] => PMC 'PAST;Op'  {
                <pirop> => "nqp_get_sc_object Psi"
                [0] => \past
                [1] => \past
            }
        }
    }
    <loadlibs> => ResizablePMCArray (size:2) [
        "nqp_group",
        "nqp_ops"
    ]
    <namespace> => ResizableStringArray (size:0) [
    ]
    <pos> => 0
    <source> => "say(42)\n"
    <symtable> => Hash {
        "$?PACKAGE" => Hash {
            "scope" => "lexical",
            "value" => PMC 'SixModelObject' { ... }
        },
        "$test_counter" => Hash {
            "scope" => "lexical",
            "value" => 0
        },
        "$todo_reason" => Hash {
            "scope" => "lexical",
            "value" => ""
        },
        "$todo_upto_test_num" => Hash {
            "scope" => "lexical",
            "value" => 0
        },
        "@ARGS" => Hash {
            "scope" => "lexical",
            "value" => ResizablePMCArray (size:0) [
            ]
        },
        "EXPORTHOW" => Hash {
            "scope" => "lexical",
            "value" => PMC 'SixModelObject' Null PMC access in invoke()
current instr.: 'parrot;Data;Dumper;Default;pmcDefault' pc 228 (runtime/parrot/library/Data/Dumper/Default.pir:190)
... call repeated 1 times
called from Sub 'parrot;Data;Dumper;Base;dump' pc 383 (runtime/parrot/library/Data/Dumper/Base.pir:251)
called from Sub 'parrot;Data;Dumper;Default;dumpWithName' pc 40 (runtime/parrot/library/Data/Dumper/Default.pir:56)
called from Sub 'parrot;Data;Dumper;Default;genericHash' pc 184 (runtime/parrot/library/Data/Dumper/Default.pir:153)
called from Sub 'parrot;Data;Dumper;Base;dump' pc 383 (runtime/parrot/library/Data/Dumper/Base.pir:251)
called from Sub 'parrot;Data;Dumper;Default;dumpWithName' pc 40 (runtime/parrot/library/Data/Dumper/Default.pir:56)
called from Sub 'parrot;Data;Dumper;Default;genericHash' pc 184 (runtime/parrot/library/Data/Dumper/Default.pir:153)
called from Sub 'parrot;Data;Dumper;Base;dump' pc 383 (runtime/parrot/library/Data/Dumper/Base.pir:251)
called from Sub 'parrot;Capture;__dump' pc 600 (runtime/parrot/library/Data/Dumper/Default.pir:454)
called from Sub 'parrot;Data;Dumper;Default;pmcDefault' pc 261 (runtime/parrot/library/Data/Dumper/Default.pir:208)
called from Sub 'parrot;Data;Dumper;Base;dump' pc 383 (runtime/parrot/library/Data/Dumper/Base.pir:251)
called from Sub 'parrot;Data;Dumper;Default;dumpWithName' pc 40 (runtime/parrot/library/Data/Dumper/Default.pir:56)
called from Sub 'parrot;Data;Dumper;dumper' pc 70 (runtime/parrot/library/Data/Dumper.pir:43)
called from Sub '_dumper' pc 56 (runtime/parrot/library/dumper.pir:89)
called from Sub 'nqp;HLL;Compiler;dumper' pc 40305 (src/stage2/gen/NQPHLL.pir:12963)
called from Sub 'nqp;HLL;Compiler;_block1592' pc 36119 (src/stage2/gen/NQPHLL.pir:11187)
called from Sub 'nqp;HLL;Compiler;_block1558' pc 35928 (src/stage2/gen/NQPHLL.pir:11094)
called from Sub 'nqp;HLL;Compiler;interactive' pc 35702 (src/stage2/gen/NQPHLL.pir:10994)
called from Sub 'nqp;HLL;Compiler;command_line' pc 37837 (src/stage2/gen/NQPHLL.pir:11870)
called from Sub 'MAIN' pc 20117 (src/stage2/gen/NQP.pir:4565)
called from Sub '_block11' pc 176 (src/stage2/gen/NQP.pir:78)
Member

Benabik commented Aug 22, 2011

There's actually a variety of things that cause dumper to throw errors... I can't get parse or past trees to print.

Member

arnsholt commented Oct 5, 2013

Works in latest NQP (using --target=ast instead of --target=PAST).

@arnsholt arnsholt closed this Oct 5, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment