From 979a6cfbd549765f5858c83d3446f2a3f2857075 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9onard=20G=C3=A9rard?= Date: Mon, 14 Feb 2011 15:22:13 +0100 Subject: [PATCH] Do stuff in pervasives. --- lib/java/jeptagon/Pervasives.java | 10 ++++++++++ lib/pervasives.epi | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/lib/java/jeptagon/Pervasives.java b/lib/java/jeptagon/Pervasives.java index 69d1e77..2c1b6bb 100644 --- a/lib/java/jeptagon/Pervasives.java +++ b/lib/java/jeptagon/Pervasives.java @@ -95,4 +95,14 @@ public class Pervasives { c6 = v6; } } + + public static int do_stuff(int coeff) { + int x = 13; + for (int i = 0; i < coeff; i++) { + for (int j = 0; j < 1000000; j++) { + x = (x + j) % (x + j/x) + 13; + } + } + return x; + } } diff --git a/lib/pervasives.epi b/lib/pervasives.epi index 2e76e49..0b66f7c 100644 --- a/lib/pervasives.epi +++ b/lib/pervasives.epi @@ -27,4 +27,4 @@ val fun (or)(bool;bool) returns (bool) val fun (xor)(bool;bool) returns (bool) val fun (~-)(int) returns (int) val fun (~-.)(float) returns (float) - +val fun do_stuff(int) returns (int)