Skip to content
This repository has been archived by the owner on Jan 27, 2025. It is now read-only.

Commit

Permalink
REPL cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
fholm committed Jan 14, 2011
1 parent fc524e4 commit 28d1a5d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 30 deletions.
2 changes: 1 addition & 1 deletion Src/Core/IronJS/Api.fs
Original file line number Diff line number Diff line change
Expand Up @@ -886,7 +886,7 @@ type Function() =
let c = f.Compiler
let c = c.compileAs<Func<IjsFunc,IjsObj,'a0,'a1,IjsBox>>(f)
c.Invoke(f,t,a0,a1)

#if CLR2
#else
//----------------------------------------------------------------------------
Expand Down
30 changes: 1 addition & 29 deletions Src/Tools/IronJS.REPL/Program.fs
Original file line number Diff line number Diff line change
Expand Up @@ -13,41 +13,13 @@ module Main =
let console = Seq.initInfinite (fun _ -> printf ">>> "; Console.ReadLine())
let toString : Box -> string = Api.TypeConverter.toString

let sw = new System.Diagnostics.Stopwatch();
sw.Start();
ctx.Execute @"
(function () {
function bitsinbyte(b) {
var m = 1, c = 0;
while(m<0x100) {
if(b & m) c++;
m <<= 1;
}
return c;
}
function TimeFunc(func) {
var x, y, t;
for(var x=0; x<350; x++)
for(var y=0; y<256; y++) func(y);
}
TimeFunc(bitsinbyte);
})();
" |> ignore
sw.Stop();

printfn "%i" sw.ElapsedMilliseconds
Console.ReadLine() |> ignore

(*
printfn "IronJS v%s" IronJS.Version.Tagged
printfn "Type #exit to quit"

console |> Seq.find (fun cmd ->
match cmd with
| "#exit" -> true
| _ -> printfn "%s" (toString (Utils.box (ctx.Execute cmd))); false
)*)
)

main() |> ignore

0 comments on commit 28d1a5d

Please sign in to comment.