Class: AdLint::Cc1::BuiltinFunction

Inherits:
NamedFunction show all
Defined in:
lib/adlint/cc1/builtin.rb

Direct Known Subclasses

EvalFunction, InspectFunction

Instance Attribute Summary

Attributes included from Nameable

#name

Attributes inherited from TypedObject

#type

Attributes inherited from Object

#declarations_and_definitions

Attributes included from Bindable

#binding

Instance Method Summary collapse

Methods inherited from NamedFunction

#designated_by_lvalue?, #signature

Methods included from Nameable

#named?

Methods inherited from Function

#function?, #implicit?, #name, #named?, #signature, #temporary?, #variable?

Methods inherited from TypedObject

#to_pointer, #to_pointer_value, #to_value, #to_variable

Methods inherited from Object

#declared_as_auto?, #declared_as_extern?, #declared_as_register?, #declared_as_static?, #designated_by_lvalue?, #function?, #named?, #storage_class_specifiers, #temporary?, #variable?

Methods included from Bindable

#be_alias_to, #bind_to

Constructor Details

#initialize(type_tbl, name) ⇒ BuiltinFunction

Returns a new instance of BuiltinFunction.



39
40
41
# File 'lib/adlint/cc1/builtin.rb', line 39

def initialize(type_tbl, name)
  super(nil, type_tbl.builtin_function_type, name)
end

Instance Method Details

#builtin?Boolean

Returns:

  • (Boolean)


47
48
49
# File 'lib/adlint/cc1/builtin.rb', line 47

def builtin?
  true
end

#call(interp, funcall_expr, args) ⇒ Object



51
52
53
# File 'lib/adlint/cc1/builtin.rb', line 51

def call(interp, funcall_expr, args)
  interp.create_tmpvar(type.return_type)
end

#explicit?Boolean

Returns:

  • (Boolean)


43
44
45
# File 'lib/adlint/cc1/builtin.rb', line 43

def explicit?
  true
end