furnace-avm2 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (185) hide show
  1. data/Gemfile.lock +2 -2
  2. data/bin/furnace-avm2 +1 -2
  3. data/furnace-avm2.gemspec +1 -2
  4. data/lib/{avm2.rb → furnace-avm2.rb} +3 -5
  5. data/lib/furnace-avm2/abc.rb +68 -0
  6. data/lib/{avm2 → furnace-avm2}/abc/metadata/const_pool_info.rb +1 -1
  7. data/lib/{avm2 → furnace-avm2}/abc/metadata/exception_info.rb +1 -1
  8. data/lib/{avm2 → furnace-avm2}/abc/metadata/file.rb +1 -1
  9. data/lib/{avm2 → furnace-avm2}/abc/metadata/instance_info.rb +1 -1
  10. data/lib/{avm2 → furnace-avm2}/abc/metadata/klass_info.rb +1 -1
  11. data/lib/{avm2 → furnace-avm2}/abc/metadata/metadata_info.rb +1 -1
  12. data/lib/{avm2 → furnace-avm2}/abc/metadata/method_body_info.rb +4 -4
  13. data/lib/{avm2 → furnace-avm2}/abc/metadata/method_info.rb +1 -1
  14. data/lib/{avm2 → furnace-avm2}/abc/metadata/multiname_info.rb +1 -1
  15. data/lib/{avm2 → furnace-avm2}/abc/metadata/multiname_kind_genericname.rb +1 -1
  16. data/lib/{avm2 → furnace-avm2}/abc/metadata/multiname_kind_multiname.rb +1 -1
  17. data/lib/{avm2 → furnace-avm2}/abc/metadata/multiname_kind_multinamel.rb +1 -1
  18. data/lib/{avm2 → furnace-avm2}/abc/metadata/multiname_kind_qname.rb +1 -1
  19. data/lib/{avm2 → furnace-avm2}/abc/metadata/multiname_kind_rtqname.rb +1 -1
  20. data/lib/{avm2 → furnace-avm2}/abc/metadata/multiname_kind_rtqnamel.rb +1 -1
  21. data/lib/{avm2 → furnace-avm2}/abc/metadata/namespace_info.rb +1 -1
  22. data/lib/{avm2 → furnace-avm2}/abc/metadata/ns_set_info.rb +1 -1
  23. data/lib/{avm2 → furnace-avm2}/abc/metadata/option_detail.rb +1 -1
  24. data/lib/{avm2 → furnace-avm2}/abc/metadata/option_info.rb +1 -1
  25. data/lib/{avm2 → furnace-avm2}/abc/metadata/record_with_traits.rb +1 -1
  26. data/lib/{avm2 → furnace-avm2}/abc/metadata/script_info.rb +1 -1
  27. data/lib/{avm2 → furnace-avm2}/abc/metadata/trait_class.rb +2 -1
  28. data/lib/{avm2 → furnace-avm2}/abc/metadata/trait_function.rb +2 -1
  29. data/lib/{avm2 → furnace-avm2}/abc/metadata/trait_info.rb +1 -1
  30. data/lib/{avm2 → furnace-avm2}/abc/metadata/trait_method.rb +1 -1
  31. data/lib/{avm2 → furnace-avm2}/abc/metadata/trait_slot.rb +1 -1
  32. data/lib/{avm2 → furnace-avm2}/abc/opcodes/arithmetic/as3_add.rb +1 -1
  33. data/lib/{avm2 → furnace-avm2}/abc/opcodes/arithmetic/as3_add_i.rb +1 -1
  34. data/lib/{avm2 → furnace-avm2}/abc/opcodes/arithmetic/as3_declocal.rb +1 -1
  35. data/lib/{avm2 → furnace-avm2}/abc/opcodes/arithmetic/as3_declocal_i.rb +1 -1
  36. data/lib/{avm2 → furnace-avm2}/abc/opcodes/arithmetic/as3_decrement.rb +1 -1
  37. data/lib/{avm2 → furnace-avm2}/abc/opcodes/arithmetic/as3_decrement_i.rb +1 -1
  38. data/lib/{avm2 → furnace-avm2}/abc/opcodes/arithmetic/as3_divide.rb +1 -1
  39. data/lib/{avm2 → furnace-avm2}/abc/opcodes/arithmetic/as3_equals.rb +1 -1
  40. data/lib/{avm2 → furnace-avm2}/abc/opcodes/arithmetic/as3_greaterequals.rb +1 -1
  41. data/lib/{avm2 → furnace-avm2}/abc/opcodes/arithmetic/as3_greaterthan.rb +1 -1
  42. data/lib/{avm2 → furnace-avm2}/abc/opcodes/arithmetic/as3_inclocal.rb +1 -1
  43. data/lib/{avm2 → furnace-avm2}/abc/opcodes/arithmetic/as3_inclocal_i.rb +1 -1
  44. data/lib/{avm2 → furnace-avm2}/abc/opcodes/arithmetic/as3_increment.rb +1 -1
  45. data/lib/{avm2 → furnace-avm2}/abc/opcodes/arithmetic/as3_increment_i.rb +1 -1
  46. data/lib/{avm2 → furnace-avm2}/abc/opcodes/arithmetic/as3_lessequals.rb +1 -1
  47. data/lib/{avm2 → furnace-avm2}/abc/opcodes/arithmetic/as3_lessthan.rb +1 -1
  48. data/lib/{avm2 → furnace-avm2}/abc/opcodes/arithmetic/as3_modulo.rb +1 -1
  49. data/lib/{avm2 → furnace-avm2}/abc/opcodes/arithmetic/as3_multiply.rb +1 -1
  50. data/lib/{avm2 → furnace-avm2}/abc/opcodes/arithmetic/as3_multiply_i.rb +1 -1
  51. data/lib/{avm2 → furnace-avm2}/abc/opcodes/arithmetic/as3_negate.rb +1 -1
  52. data/lib/{avm2 → furnace-avm2}/abc/opcodes/arithmetic/as3_negate_i.rb +1 -1
  53. data/lib/{avm2 → furnace-avm2}/abc/opcodes/arithmetic/as3_not.rb +1 -1
  54. data/lib/{avm2 → furnace-avm2}/abc/opcodes/arithmetic/as3_strictequals.rb +1 -1
  55. data/lib/{avm2 → furnace-avm2}/abc/opcodes/arithmetic/as3_subtract.rb +1 -1
  56. data/lib/{avm2 → furnace-avm2}/abc/opcodes/arithmetic/as3_subtract_i.rb +1 -1
  57. data/lib/{avm2 → furnace-avm2}/abc/opcodes/arithmetic_opcode.rb +1 -1
  58. data/lib/{avm2 → furnace-avm2}/abc/opcodes/bitwise/as3_bitand.rb +1 -1
  59. data/lib/{avm2 → furnace-avm2}/abc/opcodes/bitwise/as3_bitnot.rb +1 -1
  60. data/lib/{avm2 → furnace-avm2}/abc/opcodes/bitwise/as3_bitor.rb +1 -1
  61. data/lib/{avm2 → furnace-avm2}/abc/opcodes/bitwise/as3_bitxor.rb +1 -1
  62. data/lib/{avm2 → furnace-avm2}/abc/opcodes/bitwise/as3_lshift.rb +1 -1
  63. data/lib/{avm2 → furnace-avm2}/abc/opcodes/bitwise/as3_rshift.rb +1 -1
  64. data/lib/{avm2 → furnace-avm2}/abc/opcodes/bitwise/as3_urshift.rb +1 -1
  65. data/lib/{avm2 → furnace-avm2}/abc/opcodes/bitwise_opcode.rb +1 -1
  66. data/lib/{avm2 → furnace-avm2}/abc/opcodes/contextual_opcode.rb +1 -1
  67. data/lib/{avm2 → furnace-avm2}/abc/opcodes/control_transfer/as3_ifeq.rb +1 -1
  68. data/lib/{avm2 → furnace-avm2}/abc/opcodes/control_transfer/as3_iffalse.rb +1 -1
  69. data/lib/{avm2 → furnace-avm2}/abc/opcodes/control_transfer/as3_ifge.rb +1 -1
  70. data/lib/{avm2 → furnace-avm2}/abc/opcodes/control_transfer/as3_ifgt.rb +1 -1
  71. data/lib/{avm2 → furnace-avm2}/abc/opcodes/control_transfer/as3_ifle.rb +1 -1
  72. data/lib/{avm2 → furnace-avm2}/abc/opcodes/control_transfer/as3_iflt.rb +1 -1
  73. data/lib/{avm2 → furnace-avm2}/abc/opcodes/control_transfer/as3_ifne.rb +1 -1
  74. data/lib/{avm2 → furnace-avm2}/abc/opcodes/control_transfer/as3_ifnge.rb +1 -1
  75. data/lib/{avm2 → furnace-avm2}/abc/opcodes/control_transfer/as3_ifngt.rb +1 -1
  76. data/lib/{avm2 → furnace-avm2}/abc/opcodes/control_transfer/as3_ifnle.rb +1 -1
  77. data/lib/{avm2 → furnace-avm2}/abc/opcodes/control_transfer/as3_ifnlt.rb +1 -1
  78. data/lib/{avm2 → furnace-avm2}/abc/opcodes/control_transfer/as3_ifstricteq.rb +1 -1
  79. data/lib/{avm2 → furnace-avm2}/abc/opcodes/control_transfer/as3_ifstrictne.rb +1 -1
  80. data/lib/{avm2 → furnace-avm2}/abc/opcodes/control_transfer/as3_iftrue.rb +1 -1
  81. data/lib/{avm2 → furnace-avm2}/abc/opcodes/control_transfer/as3_jump.rb +1 -1
  82. data/lib/{avm2 → furnace-avm2}/abc/opcodes/control_transfer/as3_lookupswitch.rb +1 -1
  83. data/lib/{avm2 → furnace-avm2}/abc/opcodes/control_transfer_opcode.rb +1 -1
  84. data/lib/{avm2 → furnace-avm2}/abc/opcodes/exception/as3_newcatch.rb +1 -1
  85. data/lib/{avm2 → furnace-avm2}/abc/opcodes/exception_opcode.rb +1 -1
  86. data/lib/{avm2 → furnace-avm2}/abc/opcodes/function_invocation/as3_call.rb +1 -1
  87. data/lib/{avm2 → furnace-avm2}/abc/opcodes/function_invocation/as3_callproperty.rb +1 -1
  88. data/lib/{avm2 → furnace-avm2}/abc/opcodes/function_invocation/as3_callpropvoid.rb +1 -1
  89. data/lib/{avm2 → furnace-avm2}/abc/opcodes/function_invocation/as3_callsuper.rb +1 -1
  90. data/lib/{avm2 → furnace-avm2}/abc/opcodes/function_invocation/as3_callsupervoid.rb +1 -1
  91. data/lib/{avm2 → furnace-avm2}/abc/opcodes/function_invocation_opcode.rb +1 -1
  92. data/lib/{avm2 → furnace-avm2}/abc/opcodes/function_return/as3_returnvalue.rb +1 -1
  93. data/lib/{avm2 → furnace-avm2}/abc/opcodes/function_return/as3_returnvoid.rb +1 -1
  94. data/lib/{avm2 → furnace-avm2}/abc/opcodes/function_return_opcode.rb +1 -1
  95. data/lib/{avm2 → furnace-avm2}/abc/opcodes/generic/as3_astypelate.rb +1 -1
  96. data/lib/{avm2 → furnace-avm2}/abc/opcodes/generic/as3_checkfilter.rb +1 -1
  97. data/lib/{avm2 → furnace-avm2}/abc/opcodes/generic/as3_dup.rb +1 -1
  98. data/lib/{avm2 → furnace-avm2}/abc/opcodes/generic/as3_dxnslate.rb +1 -1
  99. data/lib/{avm2 → furnace-avm2}/abc/opcodes/generic/as3_escxattr.rb +1 -1
  100. data/lib/{avm2 → furnace-avm2}/abc/opcodes/generic/as3_getglobalscope.rb +1 -1
  101. data/lib/{avm2 → furnace-avm2}/abc/opcodes/generic/as3_getlex.rb +1 -1
  102. data/lib/{avm2 → furnace-avm2}/abc/opcodes/generic/as3_getscopeobject.rb +1 -1
  103. data/lib/{avm2 → furnace-avm2}/abc/opcodes/generic/as3_getslot.rb +1 -1
  104. data/lib/{avm2 → furnace-avm2}/abc/opcodes/generic/as3_hasnext.rb +1 -1
  105. data/lib/{avm2 → furnace-avm2}/abc/opcodes/generic/as3_hasnext2.rb +1 -1
  106. data/lib/{avm2 → furnace-avm2}/abc/opcodes/generic/as3_in.rb +1 -1
  107. data/lib/{avm2 → furnace-avm2}/abc/opcodes/generic/as3_instanceof.rb +1 -1
  108. data/lib/{avm2 → furnace-avm2}/abc/opcodes/generic/as3_istypelate.rb +1 -1
  109. data/lib/{avm2 → furnace-avm2}/abc/opcodes/generic/as3_kill.rb +1 -1
  110. data/lib/{avm2 → furnace-avm2}/abc/opcodes/generic/as3_label.rb +1 -1
  111. data/lib/{avm2 → furnace-avm2}/abc/opcodes/generic/as3_nextname.rb +1 -1
  112. data/lib/{avm2 → furnace-avm2}/abc/opcodes/generic/as3_nextvalue.rb +1 -1
  113. data/lib/{avm2 → furnace-avm2}/abc/opcodes/generic/as3_nop.rb +1 -1
  114. data/lib/{avm2 → furnace-avm2}/abc/opcodes/generic/as3_pop.rb +1 -1
  115. data/lib/{avm2 → furnace-avm2}/abc/opcodes/generic/as3_popscope.rb +1 -1
  116. data/lib/{avm2 → furnace-avm2}/abc/opcodes/generic/as3_setslot.rb +1 -1
  117. data/lib/{avm2 → furnace-avm2}/abc/opcodes/generic/as3_swap.rb +1 -1
  118. data/lib/{avm2 → furnace-avm2}/abc/opcodes/generic/as3_throw.rb +1 -1
  119. data/lib/{avm2 → furnace-avm2}/abc/opcodes/generic/as3_typeof.rb +1 -1
  120. data/lib/{avm2 → furnace-avm2}/abc/opcodes/load_store/as3_getlocal.rb +1 -1
  121. data/lib/{avm2 → furnace-avm2}/abc/opcodes/load_store/as3_getlocal_0.rb +1 -1
  122. data/lib/{avm2 → furnace-avm2}/abc/opcodes/load_store/as3_getlocal_1.rb +1 -1
  123. data/lib/{avm2 → furnace-avm2}/abc/opcodes/load_store/as3_getlocal_2.rb +1 -1
  124. data/lib/{avm2 → furnace-avm2}/abc/opcodes/load_store/as3_getlocal_3.rb +1 -1
  125. data/lib/{avm2 → furnace-avm2}/abc/opcodes/load_store/as3_setlocal.rb +1 -1
  126. data/lib/{avm2 → furnace-avm2}/abc/opcodes/load_store/as3_setlocal_0.rb +1 -1
  127. data/lib/{avm2 → furnace-avm2}/abc/opcodes/load_store/as3_setlocal_1.rb +1 -1
  128. data/lib/{avm2 → furnace-avm2}/abc/opcodes/load_store/as3_setlocal_2.rb +1 -1
  129. data/lib/{avm2 → furnace-avm2}/abc/opcodes/load_store/as3_setlocal_3.rb +1 -1
  130. data/lib/{avm2 → furnace-avm2}/abc/opcodes/load_store_opcode.rb +1 -1
  131. data/lib/{avm2 → furnace-avm2}/abc/opcodes/object_manipulation/as3_construct.rb +1 -1
  132. data/lib/{avm2 → furnace-avm2}/abc/opcodes/object_manipulation/as3_constructsuper.rb +1 -1
  133. data/lib/{avm2 → furnace-avm2}/abc/opcodes/object_manipulation/as3_newactivation.rb +1 -1
  134. data/lib/{avm2 → furnace-avm2}/abc/opcodes/object_manipulation/as3_newarray.rb +1 -1
  135. data/lib/{avm2 → furnace-avm2}/abc/opcodes/object_manipulation/as3_newclass.rb +1 -1
  136. data/lib/{avm2 → furnace-avm2}/abc/opcodes/object_manipulation/as3_newfunction.rb +1 -1
  137. data/lib/{avm2 → furnace-avm2}/abc/opcodes/object_manipulation/as3_newobject.rb +1 -1
  138. data/lib/{avm2 → furnace-avm2}/abc/opcodes/object_manipulation_opcode.rb +1 -1
  139. data/lib/{avm2 → furnace-avm2}/abc/opcodes/opcode.rb +1 -1
  140. data/lib/{avm2 → furnace-avm2}/abc/opcodes/property/as3_constructprop.rb +1 -1
  141. data/lib/{avm2 → furnace-avm2}/abc/opcodes/property/as3_deleteproperty.rb +1 -1
  142. data/lib/{avm2 → furnace-avm2}/abc/opcodes/property/as3_findproperty.rb +1 -1
  143. data/lib/{avm2 → furnace-avm2}/abc/opcodes/property/as3_findpropstrict.rb +1 -1
  144. data/lib/{avm2 → furnace-avm2}/abc/opcodes/property/as3_getdescendants.rb +1 -1
  145. data/lib/{avm2 → furnace-avm2}/abc/opcodes/property/as3_getproperty.rb +1 -1
  146. data/lib/{avm2 → furnace-avm2}/abc/opcodes/property/as3_getsuper.rb +1 -1
  147. data/lib/{avm2 → furnace-avm2}/abc/opcodes/property/as3_initproperty.rb +1 -1
  148. data/lib/{avm2 → furnace-avm2}/abc/opcodes/property/as3_setproperty.rb +1 -1
  149. data/lib/{avm2 → furnace-avm2}/abc/opcodes/property/as3_setsuper.rb +1 -1
  150. data/lib/{avm2 → furnace-avm2}/abc/opcodes/property_opcode.rb +1 -1
  151. data/lib/{avm2 → furnace-avm2}/abc/opcodes/push_literal/as3_pushbyte.rb +1 -1
  152. data/lib/{avm2 → furnace-avm2}/abc/opcodes/push_literal/as3_pushdouble.rb +1 -1
  153. data/lib/{avm2 → furnace-avm2}/abc/opcodes/push_literal/as3_pushfalse.rb +1 -1
  154. data/lib/{avm2 → furnace-avm2}/abc/opcodes/push_literal/as3_pushint.rb +1 -1
  155. data/lib/{avm2 → furnace-avm2}/abc/opcodes/push_literal/as3_pushnan.rb +1 -1
  156. data/lib/{avm2 → furnace-avm2}/abc/opcodes/push_literal/as3_pushnull.rb +1 -1
  157. data/lib/{avm2 → furnace-avm2}/abc/opcodes/push_literal/as3_pushscope.rb +1 -1
  158. data/lib/{avm2 → furnace-avm2}/abc/opcodes/push_literal/as3_pushshort.rb +1 -1
  159. data/lib/{avm2 → furnace-avm2}/abc/opcodes/push_literal/as3_pushstring.rb +1 -1
  160. data/lib/{avm2 → furnace-avm2}/abc/opcodes/push_literal/as3_pushtrue.rb +1 -1
  161. data/lib/{avm2 → furnace-avm2}/abc/opcodes/push_literal/as3_pushundefined.rb +1 -1
  162. data/lib/{avm2 → furnace-avm2}/abc/opcodes/push_literal/as3_pushwith.rb +1 -1
  163. data/lib/{avm2 → furnace-avm2}/abc/opcodes/push_literal_opcode.rb +1 -1
  164. data/lib/{avm2 → furnace-avm2}/abc/opcodes/type_conversion/as3_applytype.rb +1 -1
  165. data/lib/{avm2 → furnace-avm2}/abc/opcodes/type_conversion/as3_coerce.rb +1 -1
  166. data/lib/{avm2 → furnace-avm2}/abc/opcodes/type_conversion/as3_coerce_a.rb +1 -1
  167. data/lib/{avm2 → furnace-avm2}/abc/opcodes/type_conversion/as3_coerce_b.rb +1 -1
  168. data/lib/{avm2 → furnace-avm2}/abc/opcodes/type_conversion/as3_coerce_s.rb +1 -1
  169. data/lib/{avm2 → furnace-avm2}/abc/opcodes/type_conversion/as3_convert_d.rb +1 -1
  170. data/lib/{avm2 → furnace-avm2}/abc/opcodes/type_conversion/as3_convert_i.rb +1 -1
  171. data/lib/{avm2 → furnace-avm2}/abc/opcodes/type_conversion/as3_convert_o.rb +1 -1
  172. data/lib/{avm2 → furnace-avm2}/abc/opcodes/type_conversion/as3_convert_s.rb +1 -1
  173. data/lib/{avm2 → furnace-avm2}/abc/opcodes/type_conversion/as3_convert_u.rb +1 -1
  174. data/lib/{avm2 → furnace-avm2}/abc/opcodes/type_conversion_opcode.rb +1 -1
  175. data/lib/{avm2 → furnace-avm2}/abc/primitives/opcode_sequence.rb +1 -1
  176. data/lib/{avm2 → furnace-avm2}/abc/primitives/record.rb +2 -2
  177. data/lib/{avm2 → furnace-avm2}/binary/choice_definition.rb +1 -1
  178. data/lib/{avm2 → furnace-avm2}/binary/record.rb +3 -3
  179. data/lib/furnace-avm2/transform.rb +6 -0
  180. data/lib/{avm2 → furnace-avm2}/transform/ast_build.rb +1 -1
  181. data/lib/{avm2 → furnace-avm2}/transform/ast_normalize.rb +1 -1
  182. metadata +185 -186
  183. data/lib/avm2/abc.rb +0 -68
  184. data/lib/avm2/transform.rb +0 -6
  185. data/lib/avm2/version.rb +0 -3
@@ -1,14 +1,14 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- furnace-avm2 (0.0.2)
4
+ furnace-avm2 (0.0.3)
5
5
  furnace (>= 0.0.4)
6
6
  trollop
7
7
 
8
8
  GEM
9
9
  remote: http://rubygems.org/
10
10
  specs:
11
- furnace (0.0.4)
11
+ furnace (0.0.5)
12
12
  trollop (1.16.2)
13
13
 
14
14
  PLATFORMS
@@ -18,7 +18,7 @@ opts = Trollop::options do
18
18
  Usage: #{__FILE__} [options]
19
19
  EOS
20
20
 
21
- opt :input, "Input file", :type => :string
21
+ opt :input, "Input file", :type => :string, :required => true
22
22
  opt :output, "Output file", :type => :string
23
23
  opt :verbose, "Be verbose", :default => false
24
24
 
@@ -37,7 +37,6 @@ EOS
37
37
  opt :ast, "Build AST", :default => false
38
38
  end
39
39
 
40
- Trollop::die "Input file is required" unless opts[:input]
41
40
  Trollop::die "Stray arguments: #{ARGV}" unless ARGV.empty?
42
41
 
43
42
  abc = nil
@@ -1,10 +1,9 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
  $:.push File.expand_path("../lib", __FILE__)
3
- require "avm2/version"
4
3
 
5
4
  Gem::Specification.new do |s|
6
5
  s.name = "furnace-avm2"
7
- s.version = AVM2::VERSION
6
+ s.version = "0.0.4"
8
7
  s.authors = ["Peter Zotov"]
9
8
  s.email = ["whitequark@whitequark.org"]
10
9
  s.homepage = "http://github.com/whitequark/furnace-avm2"
@@ -4,10 +4,8 @@ require "furnace/transform"
4
4
 
5
5
  require "furnace/graphviz"
6
6
 
7
- module AVM2
7
+ module Furnace::AVM2
8
8
  end
9
9
 
10
- require "avm2/version"
11
-
12
- require "avm2/abc"
13
- require "avm2/transform"
10
+ require "furnace-avm2/abc"
11
+ require "furnace-avm2/transform"
@@ -0,0 +1,68 @@
1
+ module Furnace::AVM2::ABC
2
+ AST = Furnace::AST
3
+ CFG = Furnace::CFG
4
+ end
5
+
6
+ require_relative "binary/choice_definition"
7
+ require_relative "binary/record"
8
+
9
+ require_relative "abc/primitives/record"
10
+ require_relative "abc/primitives/opcode_sequence"
11
+
12
+ require_relative "abc/opcodes/opcode"
13
+ require_relative "abc/opcodes/contextual_opcode"
14
+
15
+ require_relative "abc/opcodes/load_store_opcode"
16
+ require_relative "abc/opcodes/arithmetic_opcode"
17
+ require_relative "abc/opcodes/bitwise_opcode"
18
+ require_relative "abc/opcodes/type_conversion_opcode"
19
+ require_relative "abc/opcodes/push_literal_opcode"
20
+ require_relative "abc/opcodes/control_transfer_opcode"
21
+ require_relative "abc/opcodes/function_invocation_opcode"
22
+ require_relative "abc/opcodes/function_return_opcode"
23
+ require_relative "abc/opcodes/exception_opcode"
24
+
25
+ require_relative "abc/opcodes/property_opcode"
26
+
27
+ Dir[File.join(File.dirname(__FILE__), "abc", "opcodes", "*", "*.rb")].each do |file|
28
+ require file
29
+ end
30
+
31
+ Furnace::AVM2::ABC::Opcode::MAP.freeze
32
+
33
+ require_relative "abc/metadata/namespace_info"
34
+ require_relative "abc/metadata/ns_set_info"
35
+ require_relative "abc/metadata/multiname_kind_multiname"
36
+ require_relative "abc/metadata/multiname_kind_multinamel"
37
+ require_relative "abc/metadata/multiname_kind_qname"
38
+ require_relative "abc/metadata/multiname_kind_rtqname"
39
+ require_relative "abc/metadata/multiname_kind_rtqnamel"
40
+ require_relative "abc/metadata/multiname_kind_genericname"
41
+ require_relative "abc/metadata/multiname_info"
42
+ require_relative "abc/metadata/const_pool_info"
43
+
44
+ require_relative "abc/metadata/option_detail"
45
+ require_relative "abc/metadata/option_info"
46
+ require_relative "abc/metadata/method_info"
47
+
48
+ require_relative "abc/metadata/metadata_info"
49
+
50
+ require_relative "abc/metadata/trait_slot"
51
+ require_relative "abc/metadata/trait_method"
52
+ require_relative "abc/metadata/trait_class"
53
+ require_relative "abc/metadata/trait_function"
54
+ require_relative "abc/metadata/trait_info"
55
+
56
+ require_relative "abc/metadata/record_with_traits"
57
+
58
+ require_relative "abc/metadata/instance_info"
59
+ require_relative "abc/metadata/klass_info"
60
+
61
+ require_relative "abc/metadata/script_info"
62
+
63
+ require_relative "abc/metadata/exception_info"
64
+ require_relative "abc/metadata/method_body_info"
65
+
66
+ require_relative "abc/metadata/file"
67
+
68
+ Furnace::AVM2::Binary::Record.codegen_each
@@ -1,4 +1,4 @@
1
- module AVM2::ABC
1
+ module Furnace::AVM2::ABC
2
2
  class ConstPoolInfo < Record
3
3
  def self.cpool_array_of(name, type, options={})
4
4
  field_size, field_array = :"#{name}_count", :"#{name}s"
@@ -1,4 +1,4 @@
1
- module AVM2::ABC
1
+ module Furnace::AVM2::ABC
2
2
  class ExceptionInfo < Record
3
3
  vuint30 :from_offset
4
4
  vuint30 :to_offset
@@ -1,4 +1,4 @@
1
- module AVM2::ABC
1
+ module Furnace::AVM2::ABC
2
2
  class File < Record
3
3
  uint16 :minor_version
4
4
  uint16 :major_version
@@ -1,4 +1,4 @@
1
- module AVM2::ABC
1
+ module Furnace::AVM2::ABC
2
2
  class InstanceInfo < Record
3
3
  include RecordWithTraits
4
4
 
@@ -1,4 +1,4 @@
1
- module AVM2::ABC
1
+ module Furnace::AVM2::ABC
2
2
  class KlassInfo < Record
3
3
  include RecordWithTraits
4
4
 
@@ -1,4 +1,4 @@
1
- module AVM2::ABC
1
+ module Furnace::AVM2::ABC
2
2
  class MetadataInfo < Record
3
3
  vuint30 :name
4
4
 
@@ -1,4 +1,4 @@
1
- module AVM2::ABC
1
+ module Furnace::AVM2::ABC
2
2
  class MethodBodyInfo < Record
3
3
  root_ref :method
4
4
  vuint30 :max_stack
@@ -21,12 +21,12 @@ module AVM2::ABC
21
21
 
22
22
  def code_to_ast
23
23
  pipeline = Furnace::Transform::Pipeline.new([
24
- AVM2::Transform::ASTBuild.new(validate: true),
25
- AVM2::Transform::ASTNormalize.new
24
+ Furnace::AVM2::Transform::ASTBuild.new(validate: true),
25
+ Furnace::AVM2::Transform::ASTNormalize.new
26
26
  ])
27
27
 
28
28
  ast, = pipeline.run(code, self)
29
29
  ast
30
30
  end
31
31
  end
32
- end
32
+ end
@@ -1,4 +1,4 @@
1
- module AVM2::ABC
1
+ module Furnace::AVM2::ABC
2
2
  class MethodInfo < Record
3
3
  NEED_ARGUMENTS = 0x01
4
4
  NEED_ACTIVATION = 0x02
@@ -1,4 +1,4 @@
1
- module AVM2::ABC
1
+ module Furnace::AVM2::ABC
2
2
  class MultinameInfo < Record
3
3
  XlatTable = {
4
4
  :QName => 0x07,
@@ -1,4 +1,4 @@
1
- module AVM2::ABC
1
+ module Furnace::AVM2::ABC
2
2
  # Undocumented
3
3
  class MultinameKindGenericName < Record
4
4
  vuint30 :name_type
@@ -1,4 +1,4 @@
1
- module AVM2::ABC
1
+ module Furnace::AVM2::ABC
2
2
  class MultinameKindMultiname < Record
3
3
  const_ref :name, :string
4
4
  const_ref :ns_set, :ns_set
@@ -1,4 +1,4 @@
1
- module AVM2::ABC
1
+ module Furnace::AVM2::ABC
2
2
  class MultinameKindMultinameL < Record
3
3
  const_ref :ns_set, :ns_set
4
4
 
@@ -1,4 +1,4 @@
1
- module AVM2::ABC
1
+ module Furnace::AVM2::ABC
2
2
  class MultinameKindQName < Record
3
3
  const_ref :ns, :namespace
4
4
  const_ref :name, :string
@@ -1,4 +1,4 @@
1
- module AVM2::ABC
1
+ module Furnace::AVM2::ABC
2
2
  class MultinameKindRTQName < Record
3
3
  const_ref :name, :string
4
4
 
@@ -1,4 +1,4 @@
1
- module AVM2::ABC
1
+ module Furnace::AVM2::ABC
2
2
  class MultinameKindRTQNameL < Record
3
3
  def to_s
4
4
  "(rt)::(rt)"
@@ -1,4 +1,4 @@
1
- module AVM2::ABC
1
+ module Furnace::AVM2::ABC
2
2
  class NamespaceInfo < Record
3
3
  XlatTable = {
4
4
  :Namespace => 0x08,
@@ -1,4 +1,4 @@
1
- module AVM2::ABC
1
+ module Furnace::AVM2::ABC
2
2
  class NsSetInfo < Record
3
3
  const_array_of :ns, :namespace, :plural => :ns
4
4
 
@@ -1,4 +1,4 @@
1
- module AVM2::ABC
1
+ module Furnace::AVM2::ABC
2
2
  class OptionDetail < Record
3
3
  vuint30 :value_idx
4
4
  uint8 :value_kind_raw
@@ -1,4 +1,4 @@
1
- module AVM2::ABC
1
+ module Furnace::AVM2::ABC
2
2
  class OptionInfo < Record
3
3
  abc_array_of :option, :nested, :class => OptionDetail
4
4
  end
@@ -1,4 +1,4 @@
1
- module AVM2::ABC
1
+ module Furnace::AVM2::ABC
2
2
  module RecordWithTraits
3
3
  TraitInfo::XlatTable.keys.each do |trait_type|
4
4
  basename = trait_type.to_s.downcase
@@ -1,4 +1,4 @@
1
- module AVM2::ABC
1
+ module Furnace::AVM2::ABC
2
2
  class ScriptInfo < Record
3
3
  vuint30 :init
4
4
 
@@ -1,9 +1,10 @@
1
- module AVM2::ABC
1
+ module Furnace::AVM2::ABC
2
2
  class TraitClass < Record
3
3
  vuint30 :slot_id
4
4
  vuint30 :classi
5
5
 
6
6
  def to_astlet(trait)
7
+ :class
7
8
  end
8
9
  end
9
10
  end
@@ -1,9 +1,10 @@
1
- module AVM2::ABC
1
+ module Furnace::AVM2::ABC
2
2
  class TraitFunction < Record
3
3
  vuint30 :slot_id
4
4
  root_ref :method
5
5
 
6
6
  def to_astlet(trait)
7
+ :function
7
8
  end
8
9
  end
9
10
  end
@@ -1,4 +1,4 @@
1
- module AVM2::ABC
1
+ module Furnace::AVM2::ABC
2
2
  class TraitInfo < Record
3
3
  XlatTable = {
4
4
  :Slot => 0,
@@ -1,4 +1,4 @@
1
- module AVM2::ABC
1
+ module Furnace::AVM2::ABC
2
2
  class TraitMethod < Record
3
3
  vuint30 :disp_id
4
4
  root_ref :method
@@ -1,4 +1,4 @@
1
- module AVM2::ABC
1
+ module Furnace::AVM2::ABC
2
2
  class TraitSlot < Record
3
3
  XlatTable = {
4
4
  :Int => 0x03,
@@ -1,4 +1,4 @@
1
- module AVM2::ABC
1
+ module Furnace::AVM2::ABC
2
2
  class AS3Add < ArithmeticOpcode
3
3
  instruction 0xa0
4
4
 
@@ -1,4 +1,4 @@
1
- module AVM2::ABC
1
+ module Furnace::AVM2::ABC
2
2
  class AS3AddI < ArithmeticOpcode
3
3
  instruction 0xc5
4
4
 
@@ -1,4 +1,4 @@
1
- module AVM2::ABC
1
+ module Furnace::AVM2::ABC
2
2
  class AS3DecLocal < ArithmeticOpcode
3
3
  instruction 0x94
4
4
 
@@ -1,4 +1,4 @@
1
- module AVM2::ABC
1
+ module Furnace::AVM2::ABC
2
2
  class AS3DecLocalI < ArithmeticOpcode
3
3
  instruction 0xc3
4
4
 
@@ -1,4 +1,4 @@
1
- module AVM2::ABC
1
+ module Furnace::AVM2::ABC
2
2
  class AS3Decrement < ArithmeticOpcode
3
3
  instruction 0x93
4
4
 
@@ -1,4 +1,4 @@
1
- module AVM2::ABC
1
+ module Furnace::AVM2::ABC
2
2
  class AS3DecrementI < ArithmeticOpcode
3
3
  instruction 0xc1
4
4
 
@@ -1,4 +1,4 @@
1
- module AVM2::ABC
1
+ module Furnace::AVM2::ABC
2
2
  class AS3Divide < ArithmeticOpcode
3
3
  instruction 0xa3
4
4
 
@@ -1,4 +1,4 @@
1
- module AVM2::ABC
1
+ module Furnace::AVM2::ABC
2
2
  class AS3Equals < ArithmeticOpcode
3
3
  instruction 0xab
4
4
  ast_type :==
@@ -1,4 +1,4 @@
1
- module AVM2::ABC
1
+ module Furnace::AVM2::ABC
2
2
  class AS3GreaterEquals < ArithmeticOpcode
3
3
  instruction 0xb0
4
4
  ast_type :>=
@@ -1,4 +1,4 @@
1
- module AVM2::ABC
1
+ module Furnace::AVM2::ABC
2
2
  class AS3GreaterThan < ArithmeticOpcode
3
3
  instruction 0xaf
4
4
  ast_type :>
@@ -1,4 +1,4 @@
1
- module AVM2::ABC
1
+ module Furnace::AVM2::ABC
2
2
  class AS3IncLocal < ArithmeticOpcode
3
3
  instruction 0x92
4
4
 
@@ -1,4 +1,4 @@
1
- module AVM2::ABC
1
+ module Furnace::AVM2::ABC
2
2
  class AS3IncLocalI < ArithmeticOpcode
3
3
  instruction 0xc2
4
4
 
@@ -1,4 +1,4 @@
1
- module AVM2::ABC
1
+ module Furnace::AVM2::ABC
2
2
  class AS3Increment < ArithmeticOpcode
3
3
  instruction 0x91
4
4
 
@@ -1,4 +1,4 @@
1
- module AVM2::ABC
1
+ module Furnace::AVM2::ABC
2
2
  class AS3IncrementI < ArithmeticOpcode
3
3
  instruction 0xc0
4
4
 
@@ -1,4 +1,4 @@
1
- module AVM2::ABC
1
+ module Furnace::AVM2::ABC
2
2
  class AS3LessEquals < ArithmeticOpcode
3
3
  instruction 0xae
4
4
  ast_type :<=
@@ -1,4 +1,4 @@
1
- module AVM2::ABC
1
+ module Furnace::AVM2::ABC
2
2
  class AS3LessThan < ArithmeticOpcode
3
3
  instruction 0xad
4
4
  ast_type :<