Skip to content
Browse files

git-svn-id: http://hotruby.googlecode.com/svn/trunk@24 4fb8041d-b042-…

…0410-9571-f50be27af959
  • Loading branch information...
1 parent 179bbbe commit 01021508005443a692d6c67915e45b02c8c518e8 yukoba@accelart.jp committed Jan 15, 2008
View
4 ActionScript/buildFlash.bat
@@ -1,4 +1,4 @@
@echo off
set "PATH=%FLEX_HOME%\bin;%PATH%"
-copy /b "%~p0\..\src\ASHeader.as" + %1 + "%~p0\..\src\RubyVM.js" + "%~p0\..\src\RubyNative.js" HotRubyFlash.as
-mxmlc --strict=false --warnings=false -default-size 600 400 -default-frame-rate=30 -default-background-color=0xFFFFFF HotRubyFlash.as
+copy /b "%~p0\..\src\ASHeader.as" + %1 + "%~p0\..\web\js\HotRuby.js" HotRubyFlash.as
+mxmlc --strict=false --warnings=false HotRubyFlash.as
View
4 ActionScript/buildFlashDebug.bat
@@ -1,4 +1,4 @@
@echo off
set "PATH=%FLEX_HOME%\bin;%PATH%"
-copy /b "%~p0\..\src\ASHeader.as" + %1 + "%~p0\..\src\RubyVM.js" + "%~p0\..\src\RubyNative.js" HotRubyFlash.as
-mxmlc -debug=true --strict=false --warnings=false -default-size 600 400 -default-frame-rate=30 -default-background-color=0xFFFFFF HotRubyFlash.as
+copy /b "%~p0\..\src\ASHeader.as" + %1 + "%~p0\..\web\js\HotRuby.js" HotRubyFlash.as
+mxmlc -debug=true --strict=false --warnings=false HotRubyFlash.as
View
1 ActionScript/test.as
@@ -1 +0,0 @@
-var src = ["YARVInstructionSequence\/SimpleDataFormat",1,1,1,{"arg_size":0,"local_size":1,"stack_max":2},"<main>","insertSort\\insertSort.rb","top",[],0,[],[1,["putnil"],["putnil"],["defineclass","InsertionSort",["YARVInstructionSequence\/SimpleDataFormat",1,1,1,{"arg_size":0,"local_size":2,"stack_max":2},"<class:InsertionSort>","insertSort\\insertSort.rb","class",["msg"],0,[],[2,["putstring","Insertion Sort:"],["setlocal",2],3,["putnil"],["getlocal",2],["send","puts",1,null,8,null],["pop"],5,["putnil"],["definemethod","sort",["YARVInstructionSequence\/SimpleDataFormat",1,1,1,{"arg_size":0,"local_size":5,"stack_max":3},"sort","insertSort\\insertSort.rb","method",["ary","i","n","tmp"],0,[["break",null,"label_24","label_50","label_50",0]],[6,["duparray",[3,6,2,5,3,7,1,8]],["setlocal",5],7,["putnil"],["putstring","Before insertion sort"],["send","puts",1,null,8,null],["pop"],8,["putnil"],["getlocal",5],["send","puts",1,null,8,null],["pop"],"label_24",10,["putobject",1],["getlocal",5],["send","length",0,null,0,null],["putobject",1],["send","-",1,null,0,null],["newrange",0],["send","each",0,["YARVInstructionSequence\/SimpleDataFormat",1,1,1,{"arg_size":1,"local_size":1,"stack_max":5},"block in sort","insertSort\\insertSort.rb","block",[],[0,[],0,-1,0,-1,0],[["break",null,"label_14","label_181","label_181",0],["next",null,"label_14","label_181","label_128",0],["redo",null,"label_14","label_181","label_14",0],["redo",null,"label_8","label_181","label_8",0],["next",null,"label_8","label_181","label_181",0]],[20,["getdynamic",1,0],["expandarray",1,0],10,["setlocal",4],"label_8",11,["getlocal",4],["setlocal",3],12,["jump","label_128"],"label_14",13,["getlocal",5],["getlocal",3],["send","[]",1,null,0,null],["getlocal",5],["getlocal",3],["putobject",1],["send","-",1,null,0,null],["send","[]",1,null,0,null],["send","<",1,null,0,null],["branchunless","label_116"],["jump","label_52"],"label_52",14,["getlocal",5],["getlocal",3],["send","[]",1,null,0,null],["setlocal",2],15,["getlocal",5],["getlocal",3],["getlocal",5],["getlocal",3],["putobject",1],["send","-",1,null,0,null],["send","[]",1,null,0,null],["send","[]=",2,null,0,null],["pop"],16,["getlocal",5],["getlocal",3],["putobject",1],["send","-",1,null,0,null],["getlocal",2],["send","[]=",2,null,0,null],["pop"],13,["jump","label_116"],"label_116",18,["getlocal",3],["putobject",1],["send","-",1,null,0,null],["setlocal",3],"label_128",12,["getlocal",3],["putobject",1],["send",">=",1,null,0,null],["branchunless","label_180"],["jump","label_142"],"label_142",["getlocal",5],["getlocal",3],["send","[]",1,null,0,null],["getlocal",5],["getlocal",3],["putobject",1],["send","-",1,null,0,null],["send","[]",1,null,0,null],["send","<",1,null,0,null],["branchunless","label_180"],["jump","label_14"],"label_180",["putnil"],"label_181",["leave"]]],0,null],"label_50",["pop"],21,["putnil"],["putstring","After insertion sort"],["send","puts",1,null,8,null],["pop"],22,["putnil"],["getlocal",5],["send","puts",1,null,8,null],["leave"]]],0],["putnil"],["leave"]]],0],["pop"],26,["putnil"],["getconstant","InsertionSort"],["send","new",0,null,0,null],["send","sort",0,null,0,null],["leave"]]];
View
8 test/asEnv/HotRubyFlash-config.xml
@@ -0,0 +1,8 @@
+<flex-config>
+ <default-size>
+ <width>640</width>
+ <height>480</height>
+ </default-size>
+ <output>asEnv.swf</output>
+ <default-background-color>#FFFFFF</default-background-color>
+</flex-config>
View
2 test/asEnv/asEnv.js
@@ -1 +1 @@
-var src = ["YARVInstructionSequence\/SimpleDataFormat",1,1,1,{"arg_size":0,"local_size":4,"stack_max":4},"<main>","asEnv\\asEnv.rb","top",["textField","g","callback"],0,[["break",null,"label_189","label_198","label_198",0]],[1,["getglobal","$native"],["send","TextField",0,null,0,null],["send","new",0,null,0,null],["setlocal",4],2,["getlocal",4],["getglobal","$native"],["send","TextFieldAutoSize",0,null,0,null],["send","LEFT",0,null,0,null],["send","autoSize=",1,null,0,null],["pop"],3,["getlocal",4],["putstring","Memory: "],["getglobal","$native"],["send","System",0,null,0,null],["send","totalMemory",0,null,0,null],["send","to_s",0,null,0,null],["send","+",1,null,0,null],["putstring"," bytes\n"],["send","+",1,null,0,null],["send","text=",1,null,0,null],["pop"],4,["getglobal","$native"],["send","_root",0,null,0,null],["getlocal",4],["send","addChild",1,null,0,null],["pop"],6,["getglobal","$native"],["send","_root",0,null,0,null],["send","graphics",0,null,0,null],["setlocal",3],7,["getlocal",3],["putobject",16711680],["send","beginFill",1,null,0,null],["pop"],8,["getlocal",3],["putobject",100],["putobject",100],["putobject",100],["send","drawCircle",3,null,0,null],["pop"],9,["getlocal",3],["send","endFill",0,null,0,null],["pop"],11,["getlocal",3],["putobject",65280],["putobject",0.5],["send","beginFill",2,null,0,null],["pop"],12,["getlocal",3],["putobject",200],["putobject",200],["putobject",100],["send","drawCircle",3,null,0,null],["pop"],13,["getlocal",3],["send","endFill",0,null,0,null],["pop"],"label_189",15,["putnil"],["getconstant","Proc"],["send","new",0,["YARVInstructionSequence\/SimpleDataFormat",1,1,1,{"arg_size":1,"local_size":1,"stack_max":4},"block in <main>","asEnv\\asEnv.rb","block",["evt"],[1,[],0,0,-1,-1,3],[["redo",null,"label_0","label_47","label_0",0],["next",null,"label_0","label_47","label_47",0]],["label_0",15,["getdynamic",4,1],["dup"],["send","text",0,null,0,null],["putstring","type: "],["getdynamic",1,0],["send","type",0,null,0,null],["send","+",1,null,0,null],["putstring","\n"],["send","+",1,null,0,null],["send","+",1,null,0,null],["send","text=",1,null,0,null],"label_47",["leave"]]],0,null],"label_198",["setlocal",2],16,["getlocal",4],["putstring","click"],["getlocal",2],["send","addEventListener",2,null,0,null],["leave"]]];
+var src = ["YARVInstructionSequence\/SimpleDataFormat",1,1,1,{"arg_size":0,"local_size":5,"stack_max":4},"<main>","asEnv\\asEnv.rb","top",["n","textField","g","callback"],0,[["break",null,"label_215","label_224","label_224",0]],[1,["getglobal","$native"],["setlocal",5],2,["getlocal",5],["putstring","flash.text.*"],["send","import",1,null,0,null],["pop"],3,["getlocal",5],["putstring","flash.system.*"],["send","import",1,null,0,null],["pop"],5,["getlocal",5],["send","TextField",0,null,0,null],["send","new",0,null,0,null],["setlocal",4],6,["getlocal",4],["getlocal",5],["send","TextFieldAutoSize",0,null,0,null],["send","LEFT",0,null,0,null],["send","autoSize=",1,null,0,null],["pop"],7,["getlocal",4],["putstring","Memory: "],["getlocal",5],["send","System",0,null,0,null],["send","totalMemory",0,null,0,null],["send","to_s",0,null,0,null],["send","+",1,null,0,null],["putstring"," bytes\n"],["send","+",1,null,0,null],["send","text=",1,null,0,null],["pop"],8,["getlocal",5],["send","_root",0,null,0,null],["getlocal",4],["send","addChild",1,null,0,null],["pop"],10,["getlocal",5],["send","_root",0,null,0,null],["send","graphics",0,null,0,null],["setlocal",3],11,["getlocal",3],["putobject",16711680],["send","beginFill",1,null,0,null],["pop"],12,["getlocal",3],["putobject",100],["putobject",100],["putobject",100],["send","drawCircle",3,null,0,null],["pop"],13,["getlocal",3],["send","endFill",0,null,0,null],["pop"],15,["getlocal",3],["putobject",65280],["putobject",0.5],["send","beginFill",2,null,0,null],["pop"],16,["getlocal",3],["putobject",200],["putobject",200],["putobject",100],["send","drawCircle",3,null,0,null],["pop"],17,["getlocal",3],["send","endFill",0,null,0,null],["pop"],"label_215",19,["putnil"],["getconstant","Proc"],["send","new",0,["YARVInstructionSequence\/SimpleDataFormat",1,1,1,{"arg_size":1,"local_size":1,"stack_max":4},"block in <main>","asEnv\\asEnv.rb","block",["evt"],[1,[],0,0,-1,-1,3],[["redo",null,"label_0","label_47","label_0",0],["next",null,"label_0","label_47","label_47",0]],["label_0",19,["getdynamic",4,1],["dup"],["send","text",0,null,0,null],["putstring","type: "],["getdynamic",1,0],["send","type",0,null,0,null],["send","+",1,null,0,null],["putstring","\n"],["send","+",1,null,0,null],["send","+",1,null,0,null],["send","text=",1,null,0,null],"label_47",["leave"]]],0,null],"label_224",["setlocal",2],20,["getlocal",4],["putstring","click"],["getlocal",2],["send","addEventListener",2,null,0,null],["leave"]]];
View
14 test/asEnv/asEnv.rb
@@ -1,9 +1,13 @@
-textField = $native.TextField.new
-textField.autoSize = $native.TextFieldAutoSize.LEFT
-textField.text = "Memory: " + $native.System.totalMemory.to_s + " bytes\n"
-$native._root.addChild(textField)
+n = $native
+n.import("flash.text.*")
+n.import("flash.system.*")
-g = $native._root.graphics
+textField = n.TextField.new
+textField.autoSize = n.TextFieldAutoSize.LEFT
+textField.text = "Memory: " + n.System.totalMemory.to_s + " bytes\n"
+n._root.addChild(textField)
+
+g = n._root.graphics
g.beginFill 0xFF0000
g.drawCircle 100, 100, 100
g.endFill
View
104 test/asEnv/asEnv_pretty.json
@@ -5,13 +5,14 @@
1,
{
"arg_size": 0,
- "local_size": 4,
+ "local_size": 5,
"stack_max": 4
},
"<main>",
"asEnv\\asEnv.rb",
"top",
[
+ "n",
"textField",
"g",
"callback"
@@ -21,9 +22,9 @@
[
"break",
null,
- "label_189",
- "label_198",
- "label_198",
+ "label_215",
+ "label_224",
+ "label_224",
0
]
],
@@ -34,6 +35,55 @@
"$native"
],
[
+ "setlocal",
+ 5
+ ],
+ 2,
+ [
+ "getlocal",
+ 5
+ ],
+ [
+ "putstring",
+ "flash.text.*"
+ ],
+ [
+ "send",
+ "import",
+ 1,
+ null,
+ 0,
+ null
+ ],
+ [
+ "pop"
+ ],
+ 3,
+ [
+ "getlocal",
+ 5
+ ],
+ [
+ "putstring",
+ "flash.system.*"
+ ],
+ [
+ "send",
+ "import",
+ 1,
+ null,
+ 0,
+ null
+ ],
+ [
+ "pop"
+ ],
+ 5,
+ [
+ "getlocal",
+ 5
+ ],
+ [
"send",
"TextField",
0,
@@ -53,14 +103,14 @@
"setlocal",
4
],
- 2,
+ 6,
[
"getlocal",
4
],
[
- "getglobal",
- "$native"
+ "getlocal",
+ 5
],
[
"send",
@@ -89,7 +139,7 @@
[
"pop"
],
- 3,
+ 7,
[
"getlocal",
4
@@ -99,8 +149,8 @@
"Memory: "
],
[
- "getglobal",
- "$native"
+ "getlocal",
+ 5
],
[
"send",
@@ -157,10 +207,10 @@
[
"pop"
],
- 4,
+ 8,
[
- "getglobal",
- "$native"
+ "getlocal",
+ 5
],
[
"send",
@@ -185,10 +235,10 @@
[
"pop"
],
- 6,
+ 10,
[
- "getglobal",
- "$native"
+ "getlocal",
+ 5
],
[
"send",
@@ -210,7 +260,7 @@
"setlocal",
3
],
- 7,
+ 11,
[
"getlocal",
3
@@ -230,7 +280,7 @@
[
"pop"
],
- 8,
+ 12,
[
"getlocal",
3
@@ -258,7 +308,7 @@
[
"pop"
],
- 9,
+ 13,
[
"getlocal",
3
@@ -274,7 +324,7 @@
[
"pop"
],
- 11,
+ 15,
[
"getlocal",
3
@@ -298,7 +348,7 @@
[
"pop"
],
- 12,
+ 16,
[
"getlocal",
3
@@ -326,7 +376,7 @@
[
"pop"
],
- 13,
+ 17,
[
"getlocal",
3
@@ -342,8 +392,8 @@
[
"pop"
],
- "label_189",
- 15,
+ "label_215",
+ 19,
[
"putnil"
],
@@ -402,7 +452,7 @@
],
[
"label_0",
- 15,
+ 19,
[
"getdynamic",
4,
@@ -481,12 +531,12 @@
0,
null
],
- "label_198",
+ "label_224",
[
"setlocal",
2
],
- 16,
+ 20,
[
"getlocal",
4
View
8 test/asEnv/build.bat
@@ -0,0 +1,8 @@
+@echo off
+set "PATH=%FLEX_HOME%\bin;%PATH%"
+
+cd ..
+call compile.bat asEnv
+cd asEnv
+
+call ..\..\ActionScript\buildFlash.bat asEnv.js

0 comments on commit 0102150

Please sign in to comment.
Something went wrong with that request. Please try again.