Class: Duby::JVM::Types::DoubleType
- Inherits:
-
FloatType
- Object
- AST::Node
- AST::TypeReference
- Type
- PrimitiveType
- Number
- FloatType
- Duby::JVM::Types::DoubleType
- Defined in:
- lib/duby/jvm/types/floats.rb
Constant Summary
Constants inherited from AST::TypeReference
AST::TypeReference::BlockType, AST::TypeReference::ErrorType, AST::TypeReference::NoType, AST::TypeReference::NullType, AST::TypeReference::UnreachableType
Instance Attribute Summary
Attributes inherited from Type
Attributes inherited from AST::TypeReference
Attributes included from AST::Named
Attributes inherited from AST::Node
#children, #inferred_type, #newline, #parent, #position
Instance Method Summary collapse
- #box_type ⇒ Object
- #init_value(builder) ⇒ Object
- #literal(builder, value) ⇒ Object
- #math_type ⇒ Object
- #prefix ⇒ Object
- #wide? ⇒ Boolean
- #widen(builder, type) ⇒ Object
Methods inherited from FloatType
Methods inherited from Number
#add_delegates, #add_intrinsics, #boolean_operator, #box, #delegate_intrinsic, #jump_if, #math_operator, #suffix, #unary_operator
Methods inherited from PrimitiveType
#add_intrinsics, #convertible_to?, #initialize, #interfaces, #newarray, #primitive?, #primitive_type, #superclass
Methods inherited from Type
#add_enumerable_macros, #add_intrinsics, #add_macro, #add_method, #aload, #array?, #array_type, #assignable_from?, #astore, #basic_type, #compatible?, #component_type, #constructor, #declared_class_methods, #declared_constructors, #declared_instance_methods, #declared_intrinsics, #dynamic?, #expand_each, #field_getter, #field_setter, #get_method, #initialize, #inner_class?, #inner_class_getter, #inspect, #interface?, #interfaces, #intrinsics, #is_parent, #iterable?, #java_method, #jvm_type, #load, #log, #meta, #meta?, #newarray, #primitive?, #return, #store, #superclass, #to_source, #unmeta, #void?
Methods included from MethodLookup
#each_is_exact, #each_is_exact_or_subtype_or_convertible, #field_lookup, #find_jls, #find_method, #inner_class, #is_more_specific?, #log, #phase1, #phase2, #phase3, #primitive_convertible?
Methods inherited from AST::TypeReference
#==, #block?, #compatible?, #component_type, #eql?, #error?, #hash, #initialize, #is_parent, #iterable?, #meta?, #narrow, #null?, #primitive?, #to_s, #unmeta, #unreachable?
Methods included from AST::Named
Methods inherited from AST::Node
#<<, ===, #[], #_set_parent, child, child_name, #each, #empty?, #expr?, #initialize, #initialize_copy, #insert, #inspect, #line_number, #log, #precompile, #resolve_if, #resolved!, #resolved?, #simple_name, #temp, #to_s
Constructor Details
This class inherits a constructor from Duby::JVM::Types::PrimitiveType
Instance Method Details
#box_type ⇒ Object
57 58 59 |
# File 'lib/duby/jvm/types/floats.rb', line 57 def box_type java.lang.Double end |
#init_value(builder) ⇒ Object
65 66 67 |
# File 'lib/duby/jvm/types/floats.rb', line 65 def init_value(builder) builder.dconst_0 end |
#literal(builder, value) ⇒ Object
69 70 71 72 73 74 75 76 77 78 |
# File 'lib/duby/jvm/types/floats.rb', line 69 def literal(builder, value) case value when 0.0 builder.dconst_0 when 1.0 builder.dconst_1 else builder.ldc_double(value) end end |
#math_type ⇒ Object
53 54 55 |
# File 'lib/duby/jvm/types/floats.rb', line 53 def math_type Double end |
#prefix ⇒ Object
49 50 51 |
# File 'lib/duby/jvm/types/floats.rb', line 49 def prefix 'd' end |