Mercurial > octave-nkf
diff src/interp-core/jit-ir.h @ 15102:d29f2583cf7b
Support end in multi indexing in JIT
* src/interp-core/jit-ir.cc (jit_magic_end::context::context): New function.
(jit_magic_end::jit_magic_end): Take context vector as argument.
(jit_magic_end::resolve_context): Return a context.
(jit_magic_end::print): Prettify output.
(jit_magic_end::overload): Use context.
* src/interp-core/jit-ir.h (jit_magic_end::context::context,
jit_magic_end::print): Move implementation to src/jit-ir.cc.
(jit_magic_end::short_print): Prettify output.
(jit_magic_end::resolve_context): Return a context.
* src/interp-core/jit-typeinfo.cc (octave_jit_end_matrix): New function.
(jit_typeinfo::jit_typeinfo): Initilaize end_fn and end1_fn.
(jit_typeinfo::do_end): New function.
(jit_typeinfo::new_type): Moved location in file.
* src/interp-core/jit-typeinfo.h (jit_typeinfo::end): Take index and count
arguments.
(jit_typeinfo::do_end): New declaration.
* src/interp-core/pt-jit.cc (jit_convert::resolve): Pass extra argument to
context constructor.
(jit_convert::convert_llvm::visit): New arguments to jit_magic_end overload.
author | Max Brister <max@2bass.com> |
---|---|
date | Sat, 04 Aug 2012 00:19:07 -0500 |
parents | 909a2797935b |
children | a7a56b436de2 |
line wrap: on
line diff
--- a/src/interp-core/jit-ir.h Fri Aug 03 17:38:05 2012 -0700 +++ b/src/interp-core/jit-ir.h Sat Aug 04 00:19:07 2012 -0500 @@ -1162,34 +1162,32 @@ context (void) : value (0), index (0), count (0) {} - context (jit_value *avalue, size_t aindex, size_t acount) - : value (avalue), index (aindex), count (acount) - {} + context (jit_convert& convert, jit_value *avalue, size_t aindex, + size_t acount); jit_value *value; - size_t index; - size_t count; + jit_const_index *index; + jit_const_index *count; }; jit_magic_end (const std::vector<context>& full_context); + virtual bool infer (void); + const jit_function& overload () const; - jit_value *resolve_context (void) const; + virtual std::ostream& print (std::ostream& os, size_t indent = 0) const; - virtual bool infer (void); + context resolve_context (void) const; virtual std::ostream& short_print (std::ostream& os) const { - return os << "magic_end"; - } - - virtual std::ostream& print (std::ostream& os, size_t indent = 0) const - { - return short_print (print_indent (os, indent)); + return os << "magic_end" << "#" << id (); } JIT_VALUE_ACCEPT; +private: + std::vector<context> contexts; }; class