Mercurial > hg > octave-lyh
changeset 14986:70ff15b6d996
Ignore unkonwn functions during compilation
* src/pt-jit.cc (jit_typeinfo::jit_typeinfo): Initialize unknown_function.
(jit_typeinfo::type_of): Return unknown_function for unkonwn functions.
* src/pt-jit.h (jit_typeinfo::unknown_function): New variable.
author | Max Brister <max@2bass.com> |
---|---|
date | Tue, 10 Jul 2012 17:14:32 -0500 |
parents | f5925478bc15 |
children | 65f74f52886c |
files | src/pt-jit.cc src/pt-jit.h |
diffstat | 2 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/pt-jit.cc +++ b/src/pt-jit.cc @@ -1188,6 +1188,9 @@ casts[complex->type_id ()].add_overload (fn, false, complex, complex); // -------------------- builtin functions -------------------- + add_builtin ("#unknown_function"); + unknown_function = builtins["#unknown_function"]; + add_builtin ("sin"); register_intrinsic ("sin", llvm::Intrinsic::sin, scalar, scalar); register_generic ("sin", matrix, matrix); @@ -1494,7 +1497,8 @@ // have octave_value fully support the needed functionality octave_builtin *builtin = dynamic_cast<octave_builtin *> (ov.internal_rep ()); - return builtin ? builtin->to_jit () : 0; + return builtin && builtin->to_jit () ? builtin->to_jit () + : unknown_function; } if (ov.is_range ())