Commit Graph

103 Commits

Author SHA1 Message Date
Alexander Udalov 763572663e Delete almost all code related to signature writing
Delete org.jetbrains.jet.rt.signature and jet.typeinfo packages from runtime,
refactor BothSignatureWriter so that it now writes only java generic signature
and saves parameter types and kinds
2013-08-26 15:59:54 +04:00
Pavel V. Talanov a9b57a5535 Rearrange JvmStdlibNames, delete old annotations
Delete unused constants
Move constants related to abi to JvmAbi class
Constants related to annotation names are now in JvmAnnotationNames
Remove old annotation classes
Deprecate JetClass and JetPackageClass name constants
2013-08-26 15:59:36 +04:00
Pavel V. Talanov 977cd7608a Split KotlinInfo annotation into two: KotlinClass and KotlinPackage
Two annotations are needed to properly distinguish package classes
2013-08-23 17:39:23 +04:00
Pavel V. Talanov 8a508fe938 Refactor: use constants instead of string literals 2013-08-23 17:39:22 +04:00
Alexander Udalov 6ae81c3ade Store ABI version along with serialized descriptors
KotlinInfo annotation now has a version() field, which should be equal to the
compiler's JvmAbi.VERSION in order for this class to properly load and be used.

Create ErrorReporter class, which has a trace to which it can report errors
(now only related to ABI version). This is done because a dependency of
DeserializedDescriptorResolver from BindingTrace would be confusing.
Implementation of ErrorReporter will probably need to change when we untie
deserialization from java-resolve.

Check if PsiClass is actually a compiled class before trying to load serialized
data from it: otherwise it can be a Java source, as was in wrongAbiVersion()
test, and ASM will fail when trying to read that file. Rewrite the test so that
it now has a compiled Kotlin classes to check against (also include sources to
recompile this binary data later, although it won't probably be needed)
2013-08-23 17:39:20 +04:00
Alexander Udalov d0b84416b5 KotlinInfo data parameter is now String[]
This is done because byte arrays in annotation arguments cannot be longer than
65535 bytes, and serialized data's length for kotlin.KotlinPackage class from
stdlib is already close to this number
2013-08-23 17:39:19 +04:00
Alexander Udalov 83501c3722 KotlinInfo now has only one parameter data
Name table is now also stored in data, before the serialized class.
ClassData is now public, since it's used in plenty of places as a holder of
deserialized protobuf classes.
2013-08-23 17:39:12 +04:00
Alexander Udalov 1acc1564d9 Add KotlinInfo annotation, serialize classes to bytecode 2013-08-23 17:39:11 +04:00
Alexander Udalov 33bcee7d6d Fix iterators for one-element progressions
In case of start==end hasNext was always false, which resulted in iterators
over one-element progressions not iterating that element
2013-06-20 23:27:11 +04:00
Alexander Udalov aea8f3bcee Fix and test ProgressionUtil
Arithmetical modulo implementation was incorrect (-10 mod 1 == 0, but was 1)
2013-06-20 22:23:02 +04:00
Alexander Udalov 980e409768 Optimize integer progression iterators
With the help of ProgressionUtil hasNext and next* consist now of only several
bytecode instructions
2013-06-20 22:20:39 +04:00
Alexander Udalov d85ca47184 Generate optimized bytecode for 'for' in progression
Instead of checking for overflow at the end of each iteration, calculate the
actual final loop parameter value before the loop, save it to the local
variable and at the end of the iteration check if the loop parameter is exactly
equal to this final value.

ProgressionUtil.getProgressionFinalElement() credits go to @geevee
2013-06-20 20:19:54 +04:00
Alexander Udalov ee80e0b8ca Fix loops over progressions near to MAX_VALUE/MIN_VALUE
#KT-492 Fixed

For Byte, Char and Short ranges, promote the type of the loop parameter to int
to avoid overflows. For Int and Long ranges at the end of the loop over a
progression we now check if the new (incremented) value of the loop parameter
is greater than the old value iff increment > 0
2013-06-20 16:03:00 +04:00
Natalia.Ukhorskaya b9e5227b58 Change String argument of property delegate method to PropertyMetadata 2013-04-30 21:47:24 +04:00
Alexander Udalov 77ef20a51e Generate KFunction/KMemberFunction/KExtensionFunction
#KT-1183 In Progress
2013-04-22 17:59:30 +04:00
Alexander Udalov 76fa9642f0 toString() for FunctionN classes
It's implemented as if the types were reified: getting the real type parameters
of the corresponding FunctionN class
2013-04-22 17:59:29 +04:00
Alexander Udalov 6f6cb03549 Make FunctionN interfaces
FunctionN and ExtensionFunctionN are now interfaces, with the corresponding
implementations in FunctionImplN and ExtensionFunctionImplN

Update test data
2013-04-22 17:59:29 +04:00
Alexander Udalov 34470ec89a Regenerate FunctionN and ExtensionFunctionN classes
GenerateFunctions now also generates Java classes in runtime/src/jet/
directory, and they have the matching declarations to those in
compiler/src/jet/

Delete ExtensionFunctionN's protected constructor, as it wasn't needed

Delete toString(), a more useful version will be implemented soon
2013-04-22 17:59:29 +04:00
Evgeny Gerashchenko 93f8d572fc Renamed runtime Tuple0 class to Unit. 2013-03-22 16:38:24 +04:00
Evgeny Gerashchenko ec5331057a Removed unnecessary final on local variables. 2013-03-13 14:12:50 +04:00
Mikhael Bogdanov b3ec87f956 ClassObject instance field refactoring 2013-03-04 16:42:55 +04:00
Evgeny Gerashchenko 021496c07d Prohibited NaN steps. 2013-02-13 18:08:36 +04:00
Alexander Udalov 1021ec5ff4 Add Intrinsics.areEqual()
It's more safe, short and less error-prone (especially w.r.t. nullability of
generic types)
2013-02-06 17:54:26 +04:00
Andrey Breslav 79e27f2d90 Write vararg flag on value parameters 2013-01-31 22:05:56 +04:00
Andrey Breslav b42777a28c Remove unused parameters 2013-01-31 22:05:56 +04:00
Evgeny Gerashchenko 58f37f38f4 Renamed NumberSequence to Progression. 2013-01-29 22:55:10 +04:00
Evgeny Gerashchenko b7c4b9e263 Added primitive contains() to float and double ranges. 2013-01-29 22:55:09 +04:00
Evgeny Gerashchenko a24bf67688 Dropped unnecessary primitive iterable traits. 2013-01-29 22:55:08 +04:00
Evgeny Gerashchenko cec0389a8a Added equals, hashCode and toString to sequences. 2013-01-29 22:55:07 +04:00
Evgeny Gerashchenko a947633bec Inlined getter calls. 2013-01-29 22:55:07 +04:00
Evgeny Gerashchenko 0539be1b1c Rearranged methods in ranges. 2013-01-29 22:55:07 +04:00
Evgeny Gerashchenko 90e474ca75 Subclassed ranges from sequence. 2013-01-29 22:55:07 +04:00
Evgeny Gerashchenko 79d3440c92 Subclassed Float/DoubleRange from iterable (for uniformity). 2013-01-29 22:55:07 +04:00
Evgeny Gerashchenko 9fa3e47b65 Added start and end property to generic range. 2013-01-29 22:55:05 +04:00
Evgeny Gerashchenko 0e0c048074 New structure of range classes. 2013-01-29 22:55:05 +04:00
Evgeny Gerashchenko 8c4abd4d9c Simpler toString() in ranges. 2013-01-29 22:55:05 +04:00
Evgeny Gerashchenko 0ff3589bb9 Moved *Range.step() functions to stdlib. 2013-01-29 22:55:05 +04:00
Evgeny Gerashchenko 4736b8d6e7 Introduced sequence classes. 2013-01-29 22:55:04 +04:00
Evgeny Gerashchenko abe7ca21bf Moved primitive iterators to upper level. 2013-01-29 22:55:04 +04:00
Evgeny Gerashchenko 88a6cffb34 Simplified primitive iterators. 2013-01-29 22:55:04 +04:00
Evgeny Gerashchenko c8a194c0a8 Dropped *Range.isReversed 2013-01-29 22:55:04 +04:00
Evgeny Gerashchenko 797b961484 Rearranged methods to follow common structure. 2013-01-29 22:55:03 +04:00
Evgeny Gerashchenko 9cd67dfc5c Removed unnecessary iteratorStart property of ranges. 2013-01-29 22:55:03 +04:00
Evgeny Gerashchenko eb8107115d Moved IntRange.count to Ranges class. 2013-01-29 22:55:03 +04:00
Evgeny Gerashchenko af0997a147 Removed static count() in all but IntRange. 2013-01-29 22:55:03 +04:00
Evgeny Gerashchenko 52b7ee6447 Happy new year 2013! 2013-01-28 18:58:08 +04:00
Andrey Breslav 56acd57e73 KT-3267 Put binary format version into the generated class files
#KT-3267 Fixed
2013-01-23 20:12:47 +04:00
Natalia.Ukhorskaya 65f1efb921 Add JetPackageClass annotation 2013-01-15 19:45:07 +04:00
Evgeny Gerashchenko e03eaf6dde Removed @author javadocs from code. 2012-12-28 17:44:31 +04:00
Andrey Breslav f925bfccd0 Changing default nullability for type arguments to NotNull 2012-12-14 15:28:21 +04:00