comparison src/interp-core/jit-typeinfo.cc @ 15124:0464e3ceb85b

Skip functions when resolving end context in JIT * src/interp-core/jit-ir.cc (jit_magic_end::resolve_context): Skip functions. * src/interp-core/jit-typeinfo.cc (jit_type::jit_type): Add askip_paren parameter. (jit_typeinfo::addbuiltin): Skip end resolution for builtin functions. * src/interp-core/jit-typeinfo.h (jit_type::skip_paren): New function. (jit_typeinfo::new_type): Add skip_paren argument.
author Max Brister <max@2bass.com>
date Tue, 07 Aug 2012 14:59:58 -0500
parents d29f2583cf7b
children bd6bb87e2bea
comparison
equal deleted inserted replaced
15123:4e0ab3b28418 15124:0464e3ceb85b
498 << mat.array << "]"; 498 << mat.array << "]";
499 } 499 }
500 500
501 // -------------------- jit_type -------------------- 501 // -------------------- jit_type --------------------
502 jit_type::jit_type (const std::string& aname, jit_type *aparent, 502 jit_type::jit_type (const std::string& aname, jit_type *aparent,
503 llvm::Type *allvm_type, int aid) : 503 llvm::Type *allvm_type, bool askip_paren, int aid) :
504 mname (aname), mparent (aparent), llvm_type (allvm_type), mid (aid), 504 mname (aname), mparent (aparent), llvm_type (allvm_type), mid (aid),
505 mdepth (aparent ? aparent->mdepth + 1 : 0) 505 mdepth (aparent ? aparent->mdepth + 1 : 0), mskip_paren (askip_paren)
506 { 506 {
507 std::memset (msret, 0, sizeof (msret)); 507 std::memset (msret, 0, sizeof (msret));
508 std::memset (mpointer_arg, 0, sizeof (mpointer_arg)); 508 std::memset (mpointer_arg, 0, sizeof (mpointer_arg));
509 std::memset (mpack, 0, sizeof (mpack)); 509 std::memset (mpack, 0, sizeof (mpack));
510 std::memset (munpack, 0, sizeof (munpack)); 510 std::memset (munpack, 0, sizeof (munpack));
1798 return end_fn.overload (value->type (), idx->type (), count->type ()); 1798 return end_fn.overload (value->type (), idx->type (), count->type ());
1799 } 1799 }
1800 1800
1801 jit_type* 1801 jit_type*
1802 jit_typeinfo::new_type (const std::string& name, jit_type *parent, 1802 jit_typeinfo::new_type (const std::string& name, jit_type *parent,
1803 llvm::Type *llvm_type) 1803 llvm::Type *llvm_type, bool skip_paren)
1804 { 1804 {
1805 jit_type *ret = new jit_type (name, parent, llvm_type, next_id++); 1805 jit_type *ret = new jit_type (name, parent, llvm_type, skip_paren, next_id++);
1806 id_to_type.push_back (ret); 1806 id_to_type.push_back (ret);
1807 return ret; 1807 return ret;
1808 } 1808 }
1809 1809
1810 void 1810 void
1916 } 1916 }
1917 1917
1918 void 1918 void
1919 jit_typeinfo::add_builtin (const std::string& name) 1919 jit_typeinfo::add_builtin (const std::string& name)
1920 { 1920 {
1921 jit_type *btype = new_type (name, any, any->to_llvm ()); 1921 jit_type *btype = new_type (name, any, any->to_llvm (), true);
1922 builtins[name] = btype; 1922 builtins[name] = btype;
1923 1923
1924 octave_builtin *ov_builtin = find_builtin (name); 1924 octave_builtin *ov_builtin = find_builtin (name);
1925 if (ov_builtin) 1925 if (ov_builtin)
1926 ov_builtin->stash_jit (*btype); 1926 ov_builtin->stash_jit (*btype);