Module: Mirah::JVM::Types

Included in:
Typer, Typer::JavaSource, Typer::JavaTyper
Defined in:
lib/mirah/jvm/types/floats.rb,
lib/mirah/jvm/types/type.rb,
lib/mirah/jvm/types/number.rb,
lib/mirah/jvm/types/boolean.rb,
lib/mirah/jvm/types/factory.rb,
lib/mirah/jvm/types/literals.rb,
lib/mirah/jvm/types/meta_type.rb,
lib/mirah/jvm/types/null_type.rb,
lib/mirah/jvm/types/void_type.rb,
lib/mirah/jvm/types/array_type.rb,
lib/mirah/jvm/types/enumerable.rb,
lib/mirah/jvm/types/extensions.rb,
lib/mirah/jvm/types/basic_types.rb,
lib/mirah/jvm/types/dynamic_type.rb,
lib/mirah/jvm/types/source_mirror.rb,
lib/mirah/jvm/types/primitive_type.rb,
lib/mirah/jvm/types/type_definition.rb,
lib/mirah/jvm/types/unreachable_type.rb,
lib/mirah/jvm/types/interface_definition.rb,
lib/mirah/jvm/types/intrinsics.rb,
lib/mirah/jvm/types/integers.rb,
lib/mirah/jvm/types/methods.rb

Overview

Copyright © 2010 The Mirah project authors. All Rights Reserved. All contributing project authors may be found in the NOTICE file.

Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Defined Under Namespace

Modules: ArgumentConversion Classes: ArrayMetaType, ArrayType, BooleanType, ComparisonIntrinsic, DoubleType, DynamicType, ExtendedType, FixnumLiteral, FloatLiteral, FloatType, IntegerType, InterfaceDefinition, Intrinsic, IterableType, JavaCallable, JavaConstructor, JavaDynamicMethod, JavaFieldAccessor, JavaFieldGetter, JavaFieldSetter, JavaMethod, JavaSourceMirror, JavaStaticMethod, LongType, MetaType, MirahMember, NarrowingType, NullType, Number, PrimitiveType, StringType, Type, TypeDefMeta, TypeDefinition, TypeFactory, UnreachableType, VoidType

Constant Summary collapse

Boolean =
BooleanType.new('boolean', java.lang.Boolean)
Byte =
IntegerType.new('byte', java.lang.Byte)
Char =
IntegerType.new('char', java.lang.Character)
Short =
IntegerType.new('short', java.lang.Short)
Int =
IntegerType.new('int', java.lang.Integer)
Long =
LongType.new('long', java.lang.Long)
Float =
FloatType.new('float', java.lang.Float)
Double =
DoubleType.new('double', java.lang.Double)
Object =

TODO these shouldn’t be constants. They should be loaded from the compilation class path.

Type.new(BiteScript::ASM::ClassMirror.load('java.lang.Object'))
ClassType =
Type.new(BiteScript::ASM::ClassMirror.load('java.lang.Class'))
String =
StringType.new(
BiteScript::ASM::ClassMirror.load('java.lang.String'))
Iterable =
IterableType.new(
BiteScript::ASM::ClassMirror.load('java.lang.Iterable'))
Void =
VoidType.new
Unreachable =
UnreachableType.new
Null =
NullType.new
WIDENING_CONVERSIONS =
{
  Byte => [Byte, Short, Int, Long, Float, Double],
  Short => [Short, Int, Long, Float, Double],
  Char => [Char, Int, Long, Float, Double],
  Int => [Int, Long, Float, Double],
  Long => [Long, Float, Double],
  Float => [Float, Double],
  Double => [Double]
}
TYPE_ORDERING =
[Byte, Short, Int, Long, Float, Double]