- SL = serialization library.
- SC =
SerializationContext
- DC =
DeserializationContext
Add method SerializationContext.getReference(Instance instance)
to get the SerializableReference
of an already registered instance:
I've got this Ceylon source: | |
``` | |
class C() { | |
shared void m(String staticArg) { | |
print("Greeting: " + staticArg); | |
} | |
for (i in 0..1) { | |
m(""); | |
} |
1 b java.lang.String::charAt (33 bytes) | |
2 b java.lang.Math::max (11 bytes) | |
3 b java.util.jar.Manifest$FastInputStream::readLine (167 bytes) | |
4 b sun.nio.cs.UTF_8$Decoder::decodeArrayLoop (553 bytes) | |
5 b java.util.Properties$LineReader::readLine (383 bytes) | |
6 b java.lang.String::hashCode (60 bytes) | |
7 b java.lang.String::indexOf (151 bytes) | |
8 b sun.nio.cs.ext.DoubleByteDecoder::decodeSingle (10 bytes) | |
9 b java.lang.String::lastIndexOf (156 bytes) | |
10 b java.lang.String::replace (142 bytes) |
# If you want to allow filename that differ only by case set this variable to true. | |
allowcasecollision=$(git config hooks.allowcasecollision) | |
if [ "$allowcasecollision" != "true" ] && | |
test "$(git diff --cached --name-only | | |
LC_ALL=C tr [A-Z] [a-z] | | |
sort | | |
uniq --repeated )" | |
then | |
echo "Error: Attempt to add a file name which differs only by case from " |
// This is the Array constructor I was testing. Note that if we can't create a primitive backing array we don't bother to copy the array again, we use the one we've already sorted. | |
private static <Element> java.lang.Object createArray( | |
final TypeDescriptor $reifiedElement, | |
ceylon.language.Iterable<? extends Element,?> elements, | |
final Callable<? extends Comparison> comparing) { | |
int size = Util.toInt(elements.getSize()); | |
java.lang.Class<?> clazz = $reifiedElement.getArrayElementClass(); | |
final java.lang.Object[] sortedArray; | |
if (comparing != null) { |
Caused by: java.lang.RuntimeException: undecidable canonicalization | |
at com.redhat.ceylon.compiler.typechecker.model.ProducedType.resolveAliases(ProducedType.java:1772) | |
at com.redhat.ceylon.compiler.typechecker.model.ProducedType.curriedResolveAliases(ProducedType.java:1817) | |
at com.redhat.ceylon.compiler.typechecker.model.ProducedType.resolveAliases(ProducedType.java:1776) | |
at com.redhat.ceylon.compiler.typechecker.model.ProducedType.curriedResolveAliases(ProducedType.java:1817) | |
at com.redhat.ceylon.compiler.typechecker.model.ProducedType.resolveAliases(ProducedType.java:1776) | |
at com.redhat.ceylon.compiler.typechecker.model.ProducedType.curriedResolveAliases(ProducedType.java:1817) | |
at com.redhat.ceylon.compiler.typechecker.model.ProducedType.resolveAliases(ProducedType.java:1776) | |
at com.redhat.ceylon.compiler.typechecker.model.ProducedType.curriedResolveAliases(ProducedType.java:1817) | |
at com.redhat.ceylon.compiler.typechecker.model.ProducedType.resolveAliases(ProducedType.java:1776) |
import ceylon.language.meta{type} | |
Integer dynamicIterationBench({Integer*} iterable) { | |
variable value sum = 0; | |
for (int in iterable) { | |
sum += int; | |
} | |
return sum; | |
} |
#!/bin/sh | |
# | |
# An example hook script to verify what is about to be committed. | |
# Called by "git commit" with no arguments. The hook should | |
# exit with non-zero status after issuing an appropriate message if | |
# it wants to stop the commit. | |
# | |
# To enable this hook, rename this file to "pre-commit". | |
if git rev-parse --verify HEAD >/dev/null 2>&1 |
warmup | |
------ | |
iteration | |
385.97869ms 100 size 1000000 iterations | |
4950000000 | |
indexedAccess | |
7936.174072ms 100 size 1000000 iterations | |
4950000000 | |
size=10, iterations=10000000 |
import java.lang.management{ManagementFactory} | |
import ceylon.interop.java{CeylonIterable} | |
import java.lang{Runtime} | |
import java.util{Arrays} | |
class BenchmarkResult<out Result>(name, iterations, result, nanoseconds, memory) { | |
shared String name; | |
shared Integer iterations; | |
shared Result result; | |
shared Integer nanoseconds; |