# This lines are automatically generated by tool/opcode_for_pp.PL. # ANY CHANGES WILL BE LOST! package Text::Xslate::PP::Const; use strict; use parent qw(Exporter); { no strict 'refs'; our @EXPORT = ( grep { defined &{$_} } sort keys %Text::Xslate::PP::Const:: ); our @EXPORT_OK = (@EXPORT, qw(%OPS @OPCODE @OPARGS)); our %EXPORT_TAGS = ( all => \@EXPORT_OK, ); } use constant TXARGf_SV => 0x01; use constant TXARGf_INT => 0x02; use constant TXARGf_KEY => 0x04; use constant TXARGf_VAR => 0x08; use constant TXARGf_PC => 0x10; # note that these flags are different form XS's because # of the difference of data structure use constant TXCODE_W_SV => TXARGf_SV; use constant TXCODE_W_SVIV => (TXARGf_SV | TXARGf_INT) ; use constant TXCODE_W_KEY => (TXARGf_SV | TXARGf_KEY); use constant TXCODE_W_INT => (TXARGf_SV | TXARGf_INT); use constant TXCODE_W_VAR => (TXARGf_SV | TXARGf_INT | TXARGf_VAR); use constant TXCODE_GOTO => (TXARGf_SV | TXARGf_INT | TXARGf_PC); # template representation, stored in $self->{template}{$file} use constant TXo_MTIME => 0; use constant TXo_CACHEPATH => 1; use constant TXo_FULLPATH => 2; # vm execution frame use constant TXframe_NAME => 0; use constant TXframe_OUTPUT => 1; use constant TXframe_RETADDR => 2; use constant TXframe_START_LVAR => 3; use constant TX_VERBOSE_DEFAULT => 1; # for-loop variables use constant TXfor_ITEM => 0; use constant TXfor_ITER => 1; use constant TXfor_ARRAY => 2; # types use constant TXt_RAW => 'Text::Xslate::Type::Raw'; use constant TXt_MACRO => 'Text::Xslate::PP::Type::Macro'; use constant TXt_PAIR => 'Text::Xslate::PP::Type::Pair'; our %OPS = ( noop => 0, move_to_sb => 1, move_from_sb => 2, save_to_lvar => 3, load_lvar => 4, load_lvar_to_sb => 5, localize_s => 6, localize_vars => 7, push => 8, pushmark => 9, nil => 10, literal => 11, literal_i => 12, fetch_s => 13, fetch_field => 14, fetch_field_s => 15, print => 16, print_raw => 17, print_raw_s => 18, include => 19, find_file => 20, suffix => 21, for_start => 22, for_iter => 23, add => 24, sub => 25, mul => 26, div => 27, mod => 28, concat => 29, repeat => 30, bitor => 31, bitand => 32, bitxor => 33, bitneg => 34, and => 35, dand => 36, or => 37, dor => 38, not => 39, minus => 40, max_index => 41, builtin_mark_raw => 42, builtin_unmark_raw => 43, builtin_uri_escape => 44, builtin_is_array_ref => 45, builtin_is_hash_ref => 46, builtin_html_escape => 47, is_code_ref => 48, merge_hash => 49, match => 50, eq => 51, ne => 52, lt => 53, le => 54, gt => 55, ge => 56, ncmp => 57, scmp => 58, range => 59, fetch_symbol => 60, funcall => 61, macro_end => 62, methodcall_s => 63, make_array => 64, make_hash => 65, enter => 66, leave => 67, goto => 68, vars => 69, depend => 70, macro_begin => 71, macro_nargs => 72, macro_outer => 73, set_opinfo => 74, super => 75, end => 76, ); # %OPS our @OPCODE = ( \&Text::Xslate::PP::Opcode::op_noop, # 0 \&Text::Xslate::PP::Opcode::op_move_to_sb, # 1 \&Text::Xslate::PP::Opcode::op_move_from_sb, # 2 \&Text::Xslate::PP::Opcode::op_save_to_lvar, # 3 \&Text::Xslate::PP::Opcode::op_load_lvar, # 4 \&Text::Xslate::PP::Opcode::op_load_lvar_to_sb, # 5 \&Text::Xslate::PP::Opcode::op_localize_s, # 6 \&Text::Xslate::PP::Opcode::op_localize_vars, # 7 \&Text::Xslate::PP::Opcode::op_push, # 8 \&Text::Xslate::PP::Opcode::op_pushmark, # 9 \&Text::Xslate::PP::Opcode::op_nil, # 10 \&Text::Xslate::PP::Opcode::op_literal, # 11 \&Text::Xslate::PP::Opcode::op_literal_i, # 12 \&Text::Xslate::PP::Opcode::op_fetch_s, # 13 \&Text::Xslate::PP::Opcode::op_fetch_field, # 14 \&Text::Xslate::PP::Opcode::op_fetch_field_s, # 15 \&Text::Xslate::PP::Opcode::op_print, # 16 \&Text::Xslate::PP::Opcode::op_print_raw, # 17 \&Text::Xslate::PP::Opcode::op_print_raw_s, # 18 \&Text::Xslate::PP::Opcode::op_include, # 19 \&Text::Xslate::PP::Opcode::op_find_file, # 20 \&Text::Xslate::PP::Opcode::op_suffix, # 21 \&Text::Xslate::PP::Opcode::op_for_start, # 22 \&Text::Xslate::PP::Opcode::op_for_iter, # 23 \&Text::Xslate::PP::Opcode::op_add, # 24 \&Text::Xslate::PP::Opcode::op_sub, # 25 \&Text::Xslate::PP::Opcode::op_mul, # 26 \&Text::Xslate::PP::Opcode::op_div, # 27 \&Text::Xslate::PP::Opcode::op_mod, # 28 \&Text::Xslate::PP::Opcode::op_concat, # 29 \&Text::Xslate::PP::Opcode::op_repeat, # 30 \&Text::Xslate::PP::Opcode::op_bitor, # 31 \&Text::Xslate::PP::Opcode::op_bitand, # 32 \&Text::Xslate::PP::Opcode::op_bitxor, # 33 \&Text::Xslate::PP::Opcode::op_bitneg, # 34 \&Text::Xslate::PP::Opcode::op_and, # 35 \&Text::Xslate::PP::Opcode::op_dand, # 36 \&Text::Xslate::PP::Opcode::op_or, # 37 \&Text::Xslate::PP::Opcode::op_dor, # 38 \&Text::Xslate::PP::Opcode::op_not, # 39 \&Text::Xslate::PP::Opcode::op_minus, # 40 \&Text::Xslate::PP::Opcode::op_max_index, # 41 \&Text::Xslate::PP::Opcode::op_builtin_mark_raw, # 42 \&Text::Xslate::PP::Opcode::op_builtin_unmark_raw, # 43 \&Text::Xslate::PP::Opcode::op_builtin_uri_escape, # 44 \&Text::Xslate::PP::Opcode::op_builtin_is_array_ref, # 45 \&Text::Xslate::PP::Opcode::op_builtin_is_hash_ref, # 46 \&Text::Xslate::PP::Opcode::op_builtin_html_escape, # 47 \&Text::Xslate::PP::Opcode::op_is_code_ref, # 48 \&Text::Xslate::PP::Opcode::op_merge_hash, # 49 \&Text::Xslate::PP::Opcode::op_match, # 50 \&Text::Xslate::PP::Opcode::op_eq, # 51 \&Text::Xslate::PP::Opcode::op_ne, # 52 \&Text::Xslate::PP::Opcode::op_lt, # 53 \&Text::Xslate::PP::Opcode::op_le, # 54 \&Text::Xslate::PP::Opcode::op_gt, # 55 \&Text::Xslate::PP::Opcode::op_ge, # 56 \&Text::Xslate::PP::Opcode::op_ncmp, # 57 \&Text::Xslate::PP::Opcode::op_scmp, # 58 \&Text::Xslate::PP::Opcode::op_range, # 59 \&Text::Xslate::PP::Opcode::op_fetch_symbol, # 60 \&Text::Xslate::PP::Opcode::op_funcall, # 61 \&Text::Xslate::PP::Opcode::op_macro_end, # 62 \&Text::Xslate::PP::Opcode::op_methodcall_s, # 63 \&Text::Xslate::PP::Opcode::op_make_array, # 64 \&Text::Xslate::PP::Opcode::op_make_hash, # 65 \&Text::Xslate::PP::Opcode::op_enter, # 66 \&Text::Xslate::PP::Opcode::op_leave, # 67 \&Text::Xslate::PP::Opcode::op_goto, # 68 \&Text::Xslate::PP::Opcode::op_vars, # 69 \&Text::Xslate::PP::Opcode::op_depend, # 70 \&Text::Xslate::PP::Opcode::op_macro_begin, # 71 \&Text::Xslate::PP::Opcode::op_macro_nargs, # 72 \&Text::Xslate::PP::Opcode::op_macro_outer, # 73 \&Text::Xslate::PP::Opcode::op_set_opinfo, # 74 \&Text::Xslate::PP::Opcode::op_super, # 75 \&Text::Xslate::PP::Opcode::op_end, # 76 ); # @OPCODE our @OPARGS = ( 0, # noop 0, # move_to_sb 0, # move_from_sb TXCODE_W_VAR, # save_to_lvar TXCODE_W_VAR, # load_lvar TXCODE_W_VAR, # load_lvar_to_sb TXCODE_W_KEY, # localize_s 0, # localize_vars 0, # push 0, # pushmark 0, # nil TXCODE_W_SV, # literal TXCODE_W_SVIV, # literal_i TXCODE_W_KEY, # fetch_s 0, # fetch_field TXCODE_W_KEY, # fetch_field_s 0, # print 0, # print_raw TXCODE_W_SV, # print_raw_s 0, # include 0, # find_file 0, # suffix TXCODE_W_VAR, # for_start TXCODE_GOTO, # for_iter 0, # add 0, # sub 0, # mul 0, # div 0, # mod TXCODE_W_SV, # concat TXCODE_W_SV, # repeat 0, # bitor 0, # bitand 0, # bitxor 0, # bitneg TXCODE_GOTO, # and TXCODE_GOTO, # dand TXCODE_GOTO, # or TXCODE_GOTO, # dor 0, # not 0, # minus 0, # max_index 0, # builtin_mark_raw 0, # builtin_unmark_raw 0, # builtin_uri_escape 0, # builtin_is_array_ref 0, # builtin_is_hash_ref 0, # builtin_html_escape 0, # is_code_ref 0, # merge_hash 0, # match 0, # eq 0, # ne 0, # lt 0, # le 0, # gt 0, # ge 0, # ncmp 0, # scmp 0, # range TXCODE_W_KEY, # fetch_symbol 0, # funcall 0, # macro_end TXCODE_W_KEY, # methodcall_s 0, # make_array 0, # make_hash 0, # enter 0, # leave TXCODE_GOTO, # goto 0, # vars TXCODE_W_SV, # depend TXCODE_W_KEY, # macro_begin TXCODE_W_SVIV, # macro_nargs TXCODE_W_SVIV, # macro_outer 0, # set_opinfo 0, # super 0, # end ); # @OPARGS 1; __END__ =pod =head1 NAME Text::Xslate::PP::Const - Text::Xslate constants in pure Perl =head1 DESCRIPTION This module is used by Text::Xslate::PP internally. =head1 SEE ALSO L L =head1 LICENSE AND COPYRIGHT Copyright (c) 2010 by Makamaka Hannyaharamitu (makamaka). This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =cut