Lines Matching refs:typespec

173         if (sym->typespec().is_string() && sym->strval() == val)  in make_constant()
191 if (sym->typespec().simpletype() == type in make_constant()
210 if (sym->typespec().is_int() && sym->intval() == val) in make_constant()
227 if (sym->typespec().is_float() && sym->floatval() == val) in make_constant()
245 if (sym->typespec().simpletype() == type && sym->vecval() == val) in make_constant()
281 if (equivalent(sym->typespec(), type)) in coerce()
287 if (acceptfloat && sym->typespec().is_float()) in coerce()
290 if (type.is_unsized_array() && sym->typespec().is_array() in coerce()
291 && equivalent(sym->typespec().elementtype(), type.elementtype())) { in coerce()
297 if (sym->symtype() == SymTypeConst && sym->typespec().is_int() in coerce()
352 TypeSpec type = dest->typespec(); in codegen_int()
410 if (retloc->typespec().is_structure()) { in codegen()
411 StructSpec* structspec = retloc->typespec().structspec(); in codegen()
458 typespec()); in codegen()
487 if (typespec().is_structure_array()) { in codegen()
490 StructSpec* structspec = typespec().structspec(); in codegen()
498 if (typespec().is_structure()) { in codegen()
501 StructSpec* structspec = typespec().structspec(); in codegen()
533 emitcode(typespec().is_array() ? "arraycopy" : "assign", dest, operand); in codegen()
582 if (ofield->typespec().is_array()) { in codegen_assign_struct()
584 TypeSpec elemtype = dfield->typespec().elementtype(); in codegen_assign_struct()
601 } else if (dfield->typespec().is_array()) { in codegen_assign_struct()
624 TypeSpec type = sym->typespec().elementtype(); in one_default_literal()
633 if (islit && lit->typespec().is_int()) in one_default_literal()
640 if (islit && lit->typespec().is_int()) in one_default_literal()
642 else if (islit && lit->typespec().is_float()) in one_default_literal()
649 if (islit && lit->typespec().is_int()) { in one_default_literal()
652 } else if (islit && lit->typespec().is_float()) { in one_default_literal()
655 } else if (init && init->typespec() == type in one_default_literal()
665 && val->typespec().is_string()) { // "space" name case in one_default_literal()
694 if (islit && lit->typespec().is_int()) { in one_default_literal()
699 } else if (islit && lit->typespec().is_float()) { in one_default_literal()
704 } else if (init && init->typespec() == type in one_default_literal()
712 && val->typespec().is_string()) { in one_default_literal()
745 if (islit && lit->typespec().is_string()) in one_default_literal()
767 if (sym->typespec().is_structure() in param_default_literals()
768 || sym->typespec().is_structure_array()) { in param_default_literals()
822 if (typespec().is_structure()) { in codegen_initializer()
824 } else if (typespec().is_array()) { in codegen_initializer()
827 codegen_initlist(init, typespec(), sym); in codegen_initializer()
864 const TypeSpec& srctype = src->typespec(); in codegen_aassign()
916 codegen_initlist(init, fieldsym->typespec(), fieldsym); in codegen_initlist()
936 OSL_DASSERT(sym->typespec() == type); in codegen_initlist()
951 TypeDesc itype = i->typespec().simpletype(); in codegen_initlist()
1012 if (sym->typespec().is_structure() in codegen_initlist()
1023 if (sym->typespec().is_array()) { in codegen_initlist()
1025 dest = codegen_aassign(sym->typespec().elementtype(), dest, sym, in codegen_initlist()
1032 if (!sym->typespec().is_array()) // non-array type shouldn't loop in codegen_initlist()
1054 OSL_ASSERT(sym->typespec().is_structure_based()); in codegen_struct_initializers()
1059 StructSpec* structspec(sym->typespec().structspec()); in codegen_struct_initializers()
1071 StructSpec* structspec(sym->typespec().structspec()); in codegen_struct_initializers()
1079 if (fieldsym->typespec().is_structure_based() in codegen_struct_initializers()
1123 dest = codegen_aassign(fieldsym->typespec().elementtype(), in codegen_struct_initializers()
1149 Symbol* one = sym->typespec().is_int() ? m_compiler->make_constant(1) in codegen()
1162 Symbol* one = sym->typespec().is_int() ? m_compiler->make_constant(1) in codegen()
1165 dest = m_compiler->make_temporary(sym->typespec()); in codegen()
1192 if (!dest || !equivalent(dest->typespec(), typespec())) in codegen()
1193 dest = m_compiler->make_temporary(typespec()); in codegen()
1194 if (lv->typespec().is_array()) { in codegen()
1198 lv->typespec().elementtype()); in codegen()
1204 lv->typespec().elementtype()); in codegen()
1207 } else if (lv->typespec().is_structure_array()) { in codegen()
1212 codegen_copy_struct_array_element(lv->typespec().structspec(), in codegen()
1219 } else if (lv->typespec().is_triple()) { in codegen()
1221 } else if (lv->typespec().is_matrix()) { in codegen()
1267 if (lv->typespec().is_array()) { in codegen_assign()
1268 TypeSpec elemtype = lv->typespec().elementtype(); in codegen_assign()
1284 } else if (lv->typespec().is_triple()) { in codegen_assign()
1286 } else if (lv->typespec().is_matrix()) { in codegen_assign()
1307 Symbol* tmp = m_compiler->make_temporary(typespec()); in codegen()
1328 src = coerce(src, typespec()); in codegen_assign()
1470 fc.typecheck(typespec()); in codegen()
1489 if (dest == NULL || !equivalent(dest->typespec(), typespec())) in codegen()
1490 dest = m_compiler->make_temporary(typespec()); in codegen()
1493 if (esym->typespec().is_closure()) { in codegen()
1525 fc.typecheck(typespec()); in codegen()
1538 if (dest == NULL || !equivalent(dest->typespec(), typespec())) in codegen()
1539 dest = m_compiler->make_temporary(typespec()); in codegen()
1542 if (typespec().is_closure()) { in codegen()
1555 if (lsym->typespec().is_float_based() && rsym->typespec().is_int()) { in codegen()
1561 rsym = m_compiler->make_temporary(lsym->typespec()); in codegen()
1564 } else if (lsym->typespec().is_int() in codegen()
1565 && rsym->typespec().is_float_based()) { in codegen()
1571 lsym = m_compiler->make_temporary(rsym->typespec()); in codegen()
1619 dest = m_compiler->make_temporary(typespec()); in codegen()
1672 if (equivalent(typespec(), e->typespec())) in codegen()
1677 if (dest == NULL || !equivalent(dest->typespec(), typespec())) in codegen()
1678 dest = m_compiler->make_temporary(typespec()); in codegen()
1688 if (dest == NULL || !equivalent(dest->typespec(), typespec())) in codegen()
1689 dest = m_compiler->make_temporary(typespec()); in codegen()
1692 if (typespec().is_triple()) { in codegen()
1698 && (val->typespec().is_float() || val->typespec().is_int())) in codegen()
1706 return m_compiler->make_constant(typespec().simpletype(), f[0], in codegen()
1714 if (dest && typespec().is_float() && nchildren() == 1 in codegen()
1715 && child(0)->typespec().is_float()) { in codegen()
1724 if (argval->typespec().is_int() && !typespec().is_int()) { in codegen()
1748 emitcode(typespec().string().c_str(), argdest.size(), in codegen()
1760 if (!typespec().is_void() && arg == 0) in argread()
1776 if (typespec().is_void()) { in argwrite()
1802 dest = m_compiler->make_temporary(typespec()); in codegen()
1808 if (!typespec().is_void()) { in codegen()
1809 if (dest == NULL || !equivalent(dest->typespec(), typespec())) in codegen()
1810 dest = m_compiler->make_temporary(typespec()); in codegen()
1827 int returnarg = !typespec().is_void(); in codegen()
1843 func()->return_location(typespec().is_void() ? NULL : dest); in codegen()
1851 const TypeSpec& ftype(f->sym()->typespec()); in codegen()
1911 bool isclosure = func() && func()->typespec().is_closure(); in codegen()
1918 if (!typespec().is_void()) { // Insert the return dest if non-void in codegen()
1966 bool is_struct = arg->typespec().is_structure(); in codegen_arg()
1995 && !equivalent(origarg->typespec(), form->typespec()) in codegen_arg()
2000 origarg->typespec(), origarg->name(), argnum + 1, in codegen_arg()
2001 user_function()->func()->name(), form->typespec()); in codegen_arg()
2042 TypeSpec t = typespec(); in codegen()