# 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,
for_start => 20,
for_iter => 21,
add => 22,
sub => 23,
mul => 24,
div => 25,
mod => 26,
concat => 27,
repeat => 28,
bitor => 29,
bitand => 30,
bitxor => 31,
bitneg => 32,
and => 33,
dand => 34,
or => 35,
dor => 36,
not => 37,
minus => 38,
max_index => 39,
builtin_mark_raw => 40,
builtin_unmark_raw => 41,
builtin_uri_escape => 42,
builtin_is_array_ref => 43,
builtin_is_hash_ref => 44,
builtin_html_escape => 45,
match => 46,
eq => 47,
ne => 48,
lt => 49,
le => 50,
gt => 51,
ge => 52,
ncmp => 53,
scmp => 54,
range => 55,
fetch_symbol => 56,
funcall => 57,
macro_end => 58,
methodcall_s => 59,
make_array => 60,
make_hash => 61,
enter => 62,
leave => 63,
goto => 64,
depend => 65,
macro_begin => 66,
macro_nargs => 67,
macro_outer => 68,
set_opinfo => 69,
super => 70,
end => 71,
); # %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_for_start, # 20
\&Text::Xslate::PP::Opcode::op_for_iter, # 21
\&Text::Xslate::PP::Opcode::op_add, # 22
\&Text::Xslate::PP::Opcode::op_sub, # 23
\&Text::Xslate::PP::Opcode::op_mul, # 24
\&Text::Xslate::PP::Opcode::op_div, # 25
\&Text::Xslate::PP::Opcode::op_mod, # 26
\&Text::Xslate::PP::Opcode::op_concat, # 27
\&Text::Xslate::PP::Opcode::op_repeat, # 28
\&Text::Xslate::PP::Opcode::op_bitor, # 29
\&Text::Xslate::PP::Opcode::op_bitand, # 30
\&Text::Xslate::PP::Opcode::op_bitxor, # 31
\&Text::Xslate::PP::Opcode::op_bitneg, # 32
\&Text::Xslate::PP::Opcode::op_and, # 33
\&Text::Xslate::PP::Opcode::op_dand, # 34
\&Text::Xslate::PP::Opcode::op_or, # 35
\&Text::Xslate::PP::Opcode::op_dor, # 36
\&Text::Xslate::PP::Opcode::op_not, # 37
\&Text::Xslate::PP::Opcode::op_minus, # 38
\&Text::Xslate::PP::Opcode::op_max_index, # 39
\&Text::Xslate::PP::Opcode::op_builtin_mark_raw, # 40
\&Text::Xslate::PP::Opcode::op_builtin_unmark_raw, # 41
\&Text::Xslate::PP::Opcode::op_builtin_uri_escape, # 42
\&Text::Xslate::PP::Opcode::op_builtin_is_array_ref, # 43
\&Text::Xslate::PP::Opcode::op_builtin_is_hash_ref, # 44
\&Text::Xslate::PP::Opcode::op_builtin_html_escape, # 45
\&Text::Xslate::PP::Opcode::op_match, # 46
\&Text::Xslate::PP::Opcode::op_eq, # 47
\&Text::Xslate::PP::Opcode::op_ne, # 48
\&Text::Xslate::PP::Opcode::op_lt, # 49
\&Text::Xslate::PP::Opcode::op_le, # 50
\&Text::Xslate::PP::Opcode::op_gt, # 51
\&Text::Xslate::PP::Opcode::op_ge, # 52
\&Text::Xslate::PP::Opcode::op_ncmp, # 53
\&Text::Xslate::PP::Opcode::op_scmp, # 54
\&Text::Xslate::PP::Opcode::op_range, # 55
\&Text::Xslate::PP::Opcode::op_fetch_symbol, # 56
\&Text::Xslate::PP::Opcode::op_funcall, # 57
\&Text::Xslate::PP::Opcode::op_macro_end, # 58
\&Text::Xslate::PP::Opcode::op_methodcall_s, # 59
\&Text::Xslate::PP::Opcode::op_make_array, # 60
\&Text::Xslate::PP::Opcode::op_make_hash, # 61
\&Text::Xslate::PP::Opcode::op_enter, # 62
\&Text::Xslate::PP::Opcode::op_leave, # 63
\&Text::Xslate::PP::Opcode::op_goto, # 64
\&Text::Xslate::PP::Opcode::op_depend, # 65
\&Text::Xslate::PP::Opcode::op_macro_begin, # 66
\&Text::Xslate::PP::Opcode::op_macro_nargs, # 67
\&Text::Xslate::PP::Opcode::op_macro_outer, # 68
\&Text::Xslate::PP::Opcode::op_set_opinfo, # 69
\&Text::Xslate::PP::Opcode::op_super, # 70
\&Text::Xslate::PP::Opcode::op_end, # 71
); # @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
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, # 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
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<Text::Xslate>
L<Text::Xslate::PP>
=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