Mercurial > octave-nkf
diff src/interp-core/jit-typeinfo.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 | 0464e3ceb85b |
line wrap: on
line diff
--- a/src/interp-core/jit-typeinfo.h Fri Aug 03 17:38:05 2012 -0700 +++ b/src/interp-core/jit-typeinfo.h Sat Aug 04 00:19:07 2012 -0500 @@ -267,6 +267,7 @@ JIT_CALL (1); JIT_CALL (2); + JIT_CALL (3); #undef JIT_CALL #undef JIT_PARAMS @@ -549,9 +550,10 @@ return instance->end_fn; } - static const jit_function& end (jit_type *ty) + static const jit_function& end (jit_value *value, jit_value *index, + jit_value *count) { - return instance->end_fn.overload (ty); + return instance->do_end (value, index, count); } private: jit_typeinfo (llvm::Module *m, llvm::ExecutionEngine *e); @@ -619,6 +621,9 @@ return do_cast (to).overload (from); } + const jit_function& do_end (jit_value *value, jit_value *index, + jit_value *count); + jit_type *new_type (const std::string& name, jit_type *parent, llvm::Type *llvm_type); @@ -738,6 +743,7 @@ jit_operation make_range_fn; jit_paren_subsref paren_subsref_fn; jit_paren_subsasgn paren_subsasgn_fn; + jit_operation end1_fn; jit_operation end_fn; // type id -> cast function TO that type