Mercurial > octave-nkf
comparison src/jit-ir.h @ 15067:df4538e3b50b
ND scalar indexing in JIT.
* src/jit-ir.cc (jit_magic_end::jit_magic_end): Use jit_magic_end::context.
* src/jit-ir.h (jit_call::jit_call): New overload.
(jit_magic_end::context): New class.
(jit_magic_end::jit_magic_end): moved to src/jit-ir.cc.
* src/jit-typeinfo.cc (octave_jit_paren_scalar): New function.
(jit_typeinfo::jit_typeinfo): Generate ND scalar indexing.
(jit_typeinfo::gen_subsref): New function.
* src/jit-typeinfo.h (jit_typeinfo::gen_subsref): New declaration.
* src/pt-jit.cc (jit_convert::visit_index_expression, jit_convert::do_assign):
Update resolve call.
(jit_convert::resolve): Resolve ND indices.
* src/pt-jit.h (jit_convert::resolve): Change function signature.
author | Max Brister <max@2bass.com> |
---|---|
date | Tue, 31 Jul 2012 11:51:01 -0500 |
parents | bc32288f4a42 |
children |
comparison
equal
deleted
inserted
replaced
15066:6451a584305e | 15067:df4538e3b50b |
---|---|
1072 JIT_CALL_CONST (3) | 1072 JIT_CALL_CONST (3) |
1073 JIT_CALL_CONST (4) | 1073 JIT_CALL_CONST (4) |
1074 | 1074 |
1075 #undef JIT_CALL_CONST | 1075 #undef JIT_CALL_CONST |
1076 | 1076 |
1077 jit_call (const jit_operation& aoperation, | |
1078 const std::vector<jit_value *>& args) | |
1079 : jit_instruction (args), moperation (aoperation) | |
1080 {} | |
1077 | 1081 |
1078 const jit_operation& operation (void) const { return moperation; } | 1082 const jit_operation& operation (void) const { return moperation; } |
1079 | 1083 |
1080 bool can_error (void) const | 1084 bool can_error (void) const |
1081 { | 1085 { |
1149 // for now only handles the 1D case | 1153 // for now only handles the 1D case |
1150 class | 1154 class |
1151 jit_magic_end : public jit_instruction | 1155 jit_magic_end : public jit_instruction |
1152 { | 1156 { |
1153 public: | 1157 public: |
1154 jit_magic_end (const std::vector<jit_value *>& context) | 1158 class |
1155 : jit_instruction (context) | 1159 context |
1156 {} | 1160 { |
1161 public: | |
1162 context (void) : value (0), index (0), count (0) | |
1163 {} | |
1164 | |
1165 context (jit_value *avalue, size_t aindex, size_t acount) | |
1166 : value (avalue), index (aindex), count (acount) | |
1167 {} | |
1168 | |
1169 jit_value *value; | |
1170 size_t index; | |
1171 size_t count; | |
1172 }; | |
1173 | |
1174 jit_magic_end (const std::vector<context>& full_context); | |
1157 | 1175 |
1158 const jit_function& overload () const; | 1176 const jit_function& overload () const; |
1159 | 1177 |
1160 jit_value *resolve_context (void) const; | 1178 jit_value *resolve_context (void) const; |
1161 | 1179 |