Skip to content

Commit

Permalink
Update test result
Browse files Browse the repository at this point in the history
  • Loading branch information
yhara committed Nov 3, 2024
1 parent 50017a7 commit d288843
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 4 deletions.
6 changes: 6 additions & 0 deletions lib/skc_async_experiment/tests/cps/async.sk
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
class App
def self.run -> Int
sleep_sec(1)
2
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
source: lib/skc_async_experiment/tests/cps.rs
expression: compile(sk_path).unwrap()
input_file: lib/skc_async_experiment/tests/cps/async.sk
---
extern([+]) print (Int)->Void;
extern() sleep_sec (ChiikaEnv,Int,(ChiikaEnv,Void)->RustFuture)->RustFuture;
extern([+]) Int#+ (Int,Int)->Int;
extern([+]) Int#- (Int,Int)->Int;
extern([+]) Int#* (Int,Int)->Int;
extern([+]) Int#% (Int,Int)->Int;
extern([+]) Int#and (Int,Int)->Int;
extern([+]) Int#or (Int,Int)->Int;
extern([+]) Int#xor (Int,Int)->Int;
extern([+]) Int#lshift (Int,Int)->Int;
extern([+]) Int#rshift (Int,Int)->Int;
extern([+]) Int#< (Int,Int)->Bool;
extern([+]) Int#<= (Int,Int)->Bool;
extern([+]) Int#> (Int,Int)->Bool;
extern([+]) Int#>= (Int,Int)->Bool;
extern([+]) Int#== (Int,Int)->Bool;
fun run(ChiikaEnv $env, (ChiikaEnv,Int)->RustFuture $cont) -> RustFuture {
chiika_env_push_frame(%arg0, 1) #-> Void
chiika_env_set(%arg0, 0, (%arg1 as Any), 6) #-> Void
return sleep_sec[*](%arg0, 1, run_1) # RustFuture #-> Never
}
fun run_1(ChiikaEnv $env, Void $async_result) -> RustFuture {
%arg1 #-> Void
alloc $0 #-> Void
$0 = 2 #-> Void
return (chiika_env_pop_frame(%arg0, 1) as (ChiikaEnv,Int)->RustFuture)(%arg0, $0) # RustFuture #-> Never
}
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,7 @@ fun run'f(ChiikaEnv $env) -> RustFuture {
}
fun run'e(ChiikaEnv $env, Int $ifResult) -> RustFuture {
%arg1 #-> Int
3 #-> Int
alloc $0 #-> Void
$0 = 3 #-> Void
return (chiika_env_pop_frame(%arg0, 1) as (ChiikaEnv,Int)->RustFuture)(%arg0, $0) # RustFuture #-> Never
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ extern([+]) Int#>= (Int,Int)->Bool;
extern([+]) Int#== (Int,Int)->Bool;
fun run() -> Int {
if true
1
1 #-> Int
else
2
2 #-> Int
end #-> Int
3 #-> Int
return 3 # Int #-> Never
}

0 comments on commit d288843

Please sign in to comment.