furnace-avm2 0.9.0 → 0.9.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +2 -2
- data/bin/furnace-avm2 +5 -1
- data/bin/furnace-avm2-decompiler +80 -13
- data/bin/furnace-avm2-shell +32 -0
- data/furnace-avm2.gemspec +1 -1
- data/lib/furnace-avm2/abc.rb +1 -7
- data/lib/furnace-avm2/abc/metadata/file.rb +65 -0
- data/lib/furnace-avm2/abc/metadata/instance_info.rb +17 -11
- data/lib/furnace-avm2/abc/metadata/metadata_info.rb +14 -4
- data/lib/furnace-avm2/abc/metadata/method_body_info.rb +11 -3
- data/lib/furnace-avm2/abc/metadata/method_info.rb +3 -4
- data/lib/furnace-avm2/abc/metadata/multiname_kind_genericname.rb +3 -2
- data/lib/furnace-avm2/abc/metadata/multiname_kind_multiname.rb +11 -2
- data/lib/furnace-avm2/abc/metadata/multiname_kind_multinamel.rb +4 -0
- data/lib/furnace-avm2/abc/metadata/multiname_kind_qname.rb +10 -2
- data/lib/furnace-avm2/abc/metadata/multiname_kind_rtqname.rb +4 -0
- data/lib/furnace-avm2/abc/metadata/multiname_kind_rtqnamel.rb +4 -0
- data/lib/furnace-avm2/abc/metadata/script_info.rb +11 -7
- data/lib/furnace-avm2/abc/metadata/trait_class.rb +2 -2
- data/lib/furnace-avm2/abc/metadata/trait_info.rb +1 -1
- data/lib/furnace-avm2/abc/metadata/trait_method.rb +4 -3
- data/lib/furnace-avm2/abc/metadata/trait_slot.rb +2 -2
- data/lib/furnace-avm2/abc/opcodes/alchemy/alchemy_extend_1.rb +8 -0
- data/lib/furnace-avm2/abc/opcodes/alchemy/alchemy_extend_16.rb +8 -0
- data/lib/furnace-avm2/abc/opcodes/alchemy/alchemy_extend_8.rb +8 -0
- data/lib/furnace-avm2/abc/opcodes/alchemy/alchemy_load_float32.rb +8 -0
- data/lib/furnace-avm2/abc/opcodes/alchemy/alchemy_load_float64.rb +8 -0
- data/lib/furnace-avm2/abc/opcodes/alchemy/alchemy_load_int16.rb +8 -0
- data/lib/furnace-avm2/abc/opcodes/alchemy/alchemy_load_int32.rb +8 -0
- data/lib/furnace-avm2/abc/opcodes/alchemy/alchemy_load_int8.rb +8 -0
- data/lib/furnace-avm2/abc/opcodes/alchemy/alchemy_store_float32.rb +8 -0
- data/lib/furnace-avm2/abc/opcodes/alchemy/alchemy_store_float64.rb +8 -0
- data/lib/furnace-avm2/abc/opcodes/alchemy/alchemy_store_int16.rb +8 -0
- data/lib/furnace-avm2/abc/opcodes/alchemy/alchemy_store_int32.rb +8 -0
- data/lib/furnace-avm2/abc/opcodes/alchemy/alchemy_store_int8.rb +8 -0
- data/lib/furnace-avm2/abc/opcodes/arithmetic/as3_add.rb +1 -1
- data/lib/furnace-avm2/abc/opcodes/arithmetic/as3_add_i.rb +1 -1
- data/lib/furnace-avm2/abc/opcodes/arithmetic/as3_declocal.rb +1 -1
- data/lib/furnace-avm2/abc/opcodes/arithmetic/as3_declocal_i.rb +1 -1
- data/lib/furnace-avm2/abc/opcodes/arithmetic/as3_decrement.rb +1 -1
- data/lib/furnace-avm2/abc/opcodes/arithmetic/as3_decrement_i.rb +1 -1
- data/lib/furnace-avm2/abc/opcodes/arithmetic/as3_divide.rb +1 -1
- data/lib/furnace-avm2/abc/opcodes/arithmetic/as3_equals.rb +1 -1
- data/lib/furnace-avm2/abc/opcodes/arithmetic/as3_greaterequals.rb +1 -1
- data/lib/furnace-avm2/abc/opcodes/arithmetic/as3_greaterthan.rb +1 -1
- data/lib/furnace-avm2/abc/opcodes/arithmetic/as3_inclocal.rb +1 -1
- data/lib/furnace-avm2/abc/opcodes/arithmetic/as3_inclocal_i.rb +1 -1
- data/lib/furnace-avm2/abc/opcodes/arithmetic/as3_increment.rb +1 -1
- data/lib/furnace-avm2/abc/opcodes/arithmetic/as3_increment_i.rb +1 -1
- data/lib/furnace-avm2/abc/opcodes/arithmetic/as3_lessequals.rb +1 -1
- data/lib/furnace-avm2/abc/opcodes/arithmetic/as3_lessthan.rb +1 -1
- data/lib/furnace-avm2/abc/opcodes/arithmetic/as3_modulo.rb +1 -1
- data/lib/furnace-avm2/abc/opcodes/arithmetic/as3_multiply.rb +1 -1
- data/lib/furnace-avm2/abc/opcodes/arithmetic/as3_multiply_i.rb +1 -1
- data/lib/furnace-avm2/abc/opcodes/arithmetic/as3_negate.rb +1 -1
- data/lib/furnace-avm2/abc/opcodes/arithmetic/as3_negate_i.rb +1 -1
- data/lib/furnace-avm2/abc/opcodes/arithmetic/as3_not.rb +1 -1
- data/lib/furnace-avm2/abc/opcodes/arithmetic/as3_strictequals.rb +1 -1
- data/lib/furnace-avm2/abc/opcodes/arithmetic/as3_subtract.rb +1 -1
- data/lib/furnace-avm2/abc/opcodes/arithmetic/as3_subtract_i.rb +1 -1
- data/lib/furnace-avm2/abc/opcodes/bitwise/as3_bitand.rb +1 -1
- data/lib/furnace-avm2/abc/opcodes/bitwise/as3_bitnot.rb +1 -1
- data/lib/furnace-avm2/abc/opcodes/bitwise/as3_bitor.rb +1 -1
- data/lib/furnace-avm2/abc/opcodes/bitwise/as3_bitxor.rb +1 -1
- data/lib/furnace-avm2/abc/opcodes/bitwise/as3_lshift.rb +1 -1
- data/lib/furnace-avm2/abc/opcodes/bitwise/as3_rshift.rb +1 -1
- data/lib/furnace-avm2/abc/opcodes/bitwise/as3_urshift.rb +1 -1
- data/lib/furnace-avm2/abc/opcodes/control_transfer/as3_lookupswitch.rb +1 -1
- data/lib/furnace-avm2/abc/opcodes/control_transfer_opcode.rb +0 -4
- data/lib/furnace-avm2/abc/opcodes/exception/as3_newcatch.rb +1 -1
- data/lib/furnace-avm2/abc/opcodes/function_invocation/as3_callproplex.rb +4 -0
- data/lib/furnace-avm2/abc/opcodes/function_invocation_opcode.rb +4 -0
- data/lib/furnace-avm2/abc/opcodes/function_return/as3_returnvalue.rb +1 -1
- data/lib/furnace-avm2/abc/opcodes/function_return/as3_returnvoid.rb +1 -1
- data/lib/furnace-avm2/abc/opcodes/generic/as3_escxattr.rb +1 -1
- data/lib/furnace-avm2/abc/opcodes/generic/as3_escxelem.rb +8 -0
- data/lib/furnace-avm2/abc/opcodes/generic/as3_getlex.rb +4 -0
- data/lib/furnace-avm2/abc/opcodes/object_manipulation/as3_newfunction.rb +5 -1
- data/lib/furnace-avm2/abc/opcodes/property/as3_constructprop.rb +4 -0
- data/lib/furnace-avm2/abc/opcodes/property_opcode.rb +4 -0
- data/lib/furnace-avm2/abc/opcodes/push_literal/as3_pushuint.rb +11 -0
- data/lib/furnace-avm2/abc/opcodes/type_conversion/as3_applytype.rb +1 -1
- data/lib/furnace-avm2/abc/opcodes/type_conversion/as3_coerce.rb +5 -1
- data/lib/furnace-avm2/abc/opcodes/type_conversion/as3_coerce_a.rb +1 -1
- data/lib/furnace-avm2/abc/opcodes/type_conversion/as3_coerce_b.rb +1 -1
- data/lib/furnace-avm2/abc/opcodes/type_conversion/as3_coerce_s.rb +1 -1
- data/lib/furnace-avm2/abc/opcodes/type_conversion/as3_convert_d.rb +1 -1
- data/lib/furnace-avm2/abc/opcodes/type_conversion/as3_convert_i.rb +1 -1
- data/lib/furnace-avm2/abc/opcodes/type_conversion/as3_convert_o.rb +1 -1
- data/lib/furnace-avm2/abc/opcodes/type_conversion/as3_convert_s.rb +1 -1
- data/lib/furnace-avm2/abc/opcodes/type_conversion/as3_convert_u.rb +1 -1
- data/lib/furnace-avm2/abc/primitives/opcode_sequence.rb +35 -23
- data/lib/furnace-avm2/abc/primitives/record.rb +11 -0
- data/lib/furnace-avm2/binary/record.rb +9 -7
- data/lib/furnace-avm2/source/declaration_tokens/callee_token.rb +8 -5
- data/lib/furnace-avm2/source/declaration_tokens/class_implementations_token.rb +5 -1
- data/lib/furnace-avm2/source/declaration_tokens/class_specifiers_token.rb +2 -1
- data/lib/furnace-avm2/source/declaration_tokens/class_token.rb +5 -1
- data/lib/furnace-avm2/source/declaration_tokens/metadata_token.rb +25 -0
- data/lib/furnace-avm2/source/declaration_tokens/method_specifiers_token.rb +4 -3
- data/lib/furnace-avm2/source/declaration_tokens/method_token.rb +1 -0
- data/lib/furnace-avm2/source/declaration_tokens/multiname_token.rb +28 -13
- data/lib/furnace-avm2/source/declaration_tokens/package_token.rb +9 -8
- data/lib/furnace-avm2/source/declaration_tokens/scope_token.rb +2 -0
- data/lib/furnace-avm2/source/declaration_tokens/script_token.rb +4 -1
- data/lib/furnace-avm2/source/declaration_tokens/slot_token.rb +1 -0
- data/lib/furnace-avm2/source/declaration_tokens/specifiers_token.rb +11 -9
- data/lib/furnace-avm2/source/decompiler.rb +372 -101
- data/lib/furnace-avm2/source/implementation_tokens/closure_name_token.rb +7 -0
- data/lib/furnace-avm2/source/implementation_tokens/closure_token.rb +9 -0
- data/lib/furnace-avm2/source/implementation_tokens/instance_of_token.rb +9 -0
- data/lib/furnace-avm2/source/implementation_tokens/supplementary_comment_token.rb +16 -0
- data/lib/furnace-avm2/source/implementation_tokens/xml_literal_token.rb +14 -0
- data/lib/furnace-avm2/transform/ast_build.rb +3 -2
- data/lib/furnace-avm2/transform/ast_normalize.rb +39 -7
- data/lib/furnace-avm2/transform/cfg_build.rb +16 -6
- data/lib/furnace-avm2/transform/cfg_reduce.rb +4 -3
- data/lib/furnace-avm2/transform/nf_normalize.rb +15 -7
- data/lib/furnace-avm2/version.rb +1 -1
- data/test/basic.as +15 -0
- data/test/global.as +11 -0
- metadata +46 -29
- data/bin/furnace-avm2-benchmark +0 -38
- data/lib/furnace-avm2/abc/opcodes/arithmetic_opcode.rb +0 -4
- data/lib/furnace-avm2/abc/opcodes/bitwise_opcode.rb +0 -4
- data/lib/furnace-avm2/abc/opcodes/exception_opcode.rb +0 -4
- data/lib/furnace-avm2/abc/opcodes/function_return_opcode.rb +0 -4
- data/lib/furnace-avm2/abc/opcodes/object_manipulation_opcode.rb +0 -4
- data/lib/furnace-avm2/abc/opcodes/type_conversion_opcode.rb +0 -4
@@ -0,0 +1,16 @@
|
|
1
|
+
module Furnace::AVM2::Tokens
|
2
|
+
class SupplementaryCommentToken < Furnace::Code::SurroundedToken
|
3
|
+
def initialize(origin, content, children, options={})
|
4
|
+
super(origin, children, options)
|
5
|
+
@content = content
|
6
|
+
end
|
7
|
+
|
8
|
+
def text_before
|
9
|
+
if @options[:commented]
|
10
|
+
"* #{@content} * "
|
11
|
+
else
|
12
|
+
"/* #{@content} */ "
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -102,8 +102,8 @@ module Furnace::AVM2
|
|
102
102
|
puts "opcode: #{opcode.inspect}"
|
103
103
|
end
|
104
104
|
|
105
|
-
finalize_complex_expr.(opcode, shortjump, [ :and, :or ], 1)
|
106
105
|
finalize_complex_expr.(opcode, ternary, CONDITIONAL_OPERATORS, nil, [:ternary_if, false])
|
106
|
+
finalize_complex_expr.(opcode, shortjump, [ :and, :or ], 1)
|
107
107
|
|
108
108
|
if dup == 1 && (opcode.is_a?(ABC::AS3CoerceB) ||
|
109
109
|
opcode.is_a?(ABC::AS3IfTrue) || opcode.is_a?(ABC::AS3IfFalse))
|
@@ -139,7 +139,8 @@ module Furnace::AVM2
|
|
139
139
|
elsif opcode.is_a?(ABC::AS3Dup)
|
140
140
|
node = stack.last
|
141
141
|
|
142
|
-
if CONST_OPERATORS.include?
|
142
|
+
if CONST_OPERATORS.include?(node.type) ||
|
143
|
+
(node.type == :get_local && node.children.first == 0)
|
143
144
|
dup_node = node.dup
|
144
145
|
dup_node.metadata[:label] = opcode.offset
|
145
146
|
produce.(dup_node)
|
@@ -3,6 +3,10 @@ module Furnace::AVM2
|
|
3
3
|
class ASTNormalize
|
4
4
|
include AST::Visitor
|
5
5
|
|
6
|
+
def initialize(options={})
|
7
|
+
@options = options
|
8
|
+
end
|
9
|
+
|
6
10
|
def transform(ast)
|
7
11
|
visit ast
|
8
12
|
|
@@ -42,17 +46,36 @@ module Furnace::AVM2
|
|
42
46
|
:lt => [false, :<],
|
43
47
|
:nlt => [true, :<],
|
44
48
|
:strict_eq => [false, :===],
|
45
|
-
:strict_ne => [
|
49
|
+
:strict_ne => [true, :===], # Why? Because of (lookup-switch ...).
|
46
50
|
:true => [false, :expand],
|
47
51
|
:false => [true, :expand]
|
48
52
|
}
|
53
|
+
|
54
|
+
def transform_conditional(node, comp, reverse)
|
55
|
+
node.update(comp)
|
56
|
+
node.parent.children[0] = !node.parent.children[0] if reverse
|
57
|
+
end
|
58
|
+
|
49
59
|
IF_MAPPING.each do |cond, (reverse, comp)|
|
50
60
|
define_method :"on_if_#{cond}" do |node|
|
51
|
-
node.
|
52
|
-
|
53
|
-
|
54
|
-
|
61
|
+
if node.parent.type == :jump_if || comp != :expand
|
62
|
+
# Parent is a conditional, or this is an explicit comparsion.
|
63
|
+
transform_conditional(node, comp, reverse)
|
64
|
+
elsif node.parent.type == :ternary_if && node.index == 1
|
65
|
+
# Parent is a comparsion-less ternary operator, and this
|
66
|
+
# node is in condition position.
|
67
|
+
transform_conditional(node, comp, reverse)
|
55
68
|
node.parent.update(:ternary_if_boolean)
|
69
|
+
elsif node.children.count == 2
|
70
|
+
# This is an implicit comparsion, and it is not located in
|
71
|
+
# a condition position of a conditional or a ternary operator.
|
72
|
+
# Turn it into a ternary operator as of itself.
|
73
|
+
node.update(:ternary_if_boolean, [
|
74
|
+
!comp, *node.children
|
75
|
+
])
|
76
|
+
on_ternary_if_boolean(node)
|
77
|
+
else
|
78
|
+
transform_conditional(node, comp, reverse)
|
56
79
|
end
|
57
80
|
end
|
58
81
|
end
|
@@ -92,12 +115,21 @@ module Furnace::AVM2
|
|
92
115
|
alias :on_jump_if :fix_boolean
|
93
116
|
|
94
117
|
def replace_with_nop(node)
|
95
|
-
|
118
|
+
if @options[:eliminate_nops]
|
119
|
+
node.update(:remove)
|
120
|
+
else
|
121
|
+
node.update(:nop)
|
122
|
+
end
|
96
123
|
end
|
97
|
-
alias :on_label :replace_with_nop
|
98
124
|
alias :on_debug :replace_with_nop
|
99
125
|
alias :on_debug_file :replace_with_nop
|
100
126
|
alias :on_debug_line :replace_with_nop
|
127
|
+
|
128
|
+
def on_nop(node)
|
129
|
+
if @options[:eliminate_nops]
|
130
|
+
node.update(:remove)
|
131
|
+
end
|
132
|
+
end
|
101
133
|
end
|
102
134
|
end
|
103
135
|
end
|
@@ -5,6 +5,9 @@ module Furnace::AVM2
|
|
5
5
|
|
6
6
|
def transform(ast)
|
7
7
|
@ast = ast
|
8
|
+
|
9
|
+
@jumps = Set.new
|
10
|
+
|
8
11
|
visit @ast
|
9
12
|
|
10
13
|
@cfg = CFG::Graph.new
|
@@ -12,8 +15,6 @@ module Furnace::AVM2
|
|
12
15
|
@pending_label = nil
|
13
16
|
@pending_queue = []
|
14
17
|
|
15
|
-
@jumps = []
|
16
|
-
|
17
18
|
@ast.children.each_with_index do |node, index|
|
18
19
|
@pending_label ||= node.metadata[:label]
|
19
20
|
@pending_queue << node if ![:nop, :jump].include? node.type
|
@@ -22,16 +23,25 @@ module Furnace::AVM2
|
|
22
23
|
next_label = next_node.metadata[:label] if next_node
|
23
24
|
|
24
25
|
case node.type
|
26
|
+
when :label
|
27
|
+
@jumps.add node.children.first
|
28
|
+
node.update :nop
|
29
|
+
|
25
30
|
when :return_value, :return_void
|
26
31
|
cutoff(nil, [nil])
|
27
32
|
|
28
33
|
when :jump
|
29
|
-
@jumps
|
30
|
-
cutoff(nil, [node.children.delete_at(0)])
|
34
|
+
@jumps.add(node.children[0])
|
35
|
+
cutoff(nil, [ node.children.delete_at(0) ])
|
31
36
|
|
32
37
|
when :jump_if
|
33
|
-
@jumps
|
34
|
-
cutoff(node, [node.children.delete_at(1), next_label])
|
38
|
+
@jumps.add(node.children[1])
|
39
|
+
cutoff(node, [ node.children.delete_at(1), next_label ])
|
40
|
+
|
41
|
+
when :lookup_switch
|
42
|
+
jumps_to = [ node.children[0] ] + node.children[1]
|
43
|
+
@jumps.merge(jumps_to)
|
44
|
+
cutoff(node, jumps_to)
|
35
45
|
|
36
46
|
else
|
37
47
|
if @jumps.include? next_label
|
@@ -54,7 +54,10 @@ module Furnace::AVM2
|
|
54
54
|
end
|
55
55
|
|
56
56
|
if block.cti
|
57
|
-
if
|
57
|
+
if block.cti.type == :lookup_switch
|
58
|
+
# this is a switch
|
59
|
+
|
60
|
+
elsif @loops.include?(block)
|
58
61
|
# we're trapped in a strange loop
|
59
62
|
reverse = !block.cti.children[0]
|
60
63
|
in_root, out_root = block.targets
|
@@ -86,8 +89,6 @@ module Furnace::AVM2
|
|
86
89
|
|
87
90
|
# (while (condition)
|
88
91
|
# (body ...))
|
89
|
-
# (for-in '(var name) # to be done
|
90
|
-
# (body ...))
|
91
92
|
nodes << AST::Node.new(:while, [
|
92
93
|
expr,
|
93
94
|
body
|
@@ -18,6 +18,10 @@ module Furnace::AVM2
|
|
18
18
|
end
|
19
19
|
end
|
20
20
|
|
21
|
+
def on_nop(node)
|
22
|
+
node.update(:remove)
|
23
|
+
end
|
24
|
+
|
21
25
|
COERCE_MAP = {
|
22
26
|
:coerce_a => :any,
|
23
27
|
:coerce_b => :bool,
|
@@ -60,9 +64,12 @@ module Furnace::AVM2
|
|
60
64
|
[:while,
|
61
65
|
[:has_next2, capture(:object_reg), capture(:index_reg)],
|
62
66
|
[:begin,
|
63
|
-
[
|
64
|
-
|
65
|
-
[capture(:
|
67
|
+
[ either_multi[
|
68
|
+
[ :set_local, capture(:value_reg) ],
|
69
|
+
[ :set_slot, capture(:value_reg), [:get_scope_object, 1] ],
|
70
|
+
],
|
71
|
+
[ either[:coerce, :convert], capture(:value_type),
|
72
|
+
[ capture(:iterator),
|
66
73
|
[:get_local, backref(:object_reg)],
|
67
74
|
[:get_local, backref(:index_reg)]]]],
|
68
75
|
capture_rest(:body)]]
|
@@ -83,6 +90,11 @@ module Furnace::AVM2
|
|
83
90
|
end
|
84
91
|
|
85
92
|
def on_while(node)
|
93
|
+
*whatever, code = node.children
|
94
|
+
if SuperfluousContinueMatcher.match code.children.last
|
95
|
+
code.children.slice! -1
|
96
|
+
end
|
97
|
+
|
86
98
|
if captures = ForInMatcher.match(node)
|
87
99
|
parent = node.parent
|
88
100
|
|
@@ -113,10 +125,6 @@ module Furnace::AVM2
|
|
113
125
|
index_node.update(:remove)
|
114
126
|
object_node.update(:remove)
|
115
127
|
|
116
|
-
if SuperfluousContinueMatcher.match captures[:body].last
|
117
|
-
captures[:body].slice! -1
|
118
|
-
end
|
119
|
-
|
120
128
|
node.update(type, [
|
121
129
|
captures[:value_reg],
|
122
130
|
captures[:value_type],
|
data/lib/furnace-avm2/version.rb
CHANGED
data/test/basic.as
CHANGED
@@ -207,6 +207,21 @@ package test {
|
|
207
207
|
}
|
208
208
|
}
|
209
209
|
|
210
|
+
class Closures {
|
211
|
+
function a() {
|
212
|
+
var a:int = 1;
|
213
|
+
var f = function(param) {
|
214
|
+
var b:int = 10;
|
215
|
+
return a + this.fuga() + hoge() + param;
|
216
|
+
};
|
217
|
+
var q = function() {
|
218
|
+
test123();
|
219
|
+
};
|
220
|
+
q();
|
221
|
+
return f;
|
222
|
+
}
|
223
|
+
}
|
224
|
+
|
210
225
|
class Exceptions {
|
211
226
|
function c() {
|
212
227
|
try {
|
data/test/global.as
ADDED
metadata
CHANGED
@@ -1,45 +1,46 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: furnace-avm2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
|
4
|
+
version: 0.9.1
|
5
|
+
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Peter Zotov
|
9
|
-
autorequire:
|
9
|
+
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-04-
|
12
|
+
date: 2012-04-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: furnace
|
16
|
-
|
16
|
+
requirement: &81548020 !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
17
18
|
requirements:
|
18
19
|
- - ! '>='
|
19
20
|
- !ruby/object:Gem::Version
|
20
|
-
version: 0.1.
|
21
|
-
none: false
|
22
|
-
requirement: *2056
|
23
|
-
prerelease: false
|
21
|
+
version: 0.1.1
|
24
22
|
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: *81548020
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: trollop
|
27
|
-
|
27
|
+
requirement: &81547740 !ruby/object:Gem::Requirement
|
28
|
+
none: false
|
28
29
|
requirements:
|
29
30
|
- - ! '>='
|
30
31
|
- !ruby/object:Gem::Version
|
31
32
|
version: '0'
|
32
|
-
none: false
|
33
|
-
requirement: *2074
|
34
|
-
prerelease: false
|
35
33
|
type: :runtime
|
36
|
-
|
34
|
+
prerelease: false
|
35
|
+
version_requirements: *81547740
|
36
|
+
description: furnace-avm2 allows one to load, modify and write back Flash ActionScript3
|
37
|
+
bytecode. It can also decompile it.
|
37
38
|
email:
|
38
39
|
- whitequark@whitequark.org
|
39
40
|
executables:
|
40
41
|
- furnace-avm2
|
41
|
-
- furnace-avm2-benchmark
|
42
42
|
- furnace-avm2-decompiler
|
43
|
+
- furnace-avm2-shell
|
43
44
|
extensions: []
|
44
45
|
extra_rdoc_files: []
|
45
46
|
files:
|
@@ -50,8 +51,8 @@ files:
|
|
50
51
|
- Rakefile
|
51
52
|
- abcdump.abc
|
52
53
|
- bin/furnace-avm2
|
53
|
-
- bin/furnace-avm2-benchmark
|
54
54
|
- bin/furnace-avm2-decompiler
|
55
|
+
- bin/furnace-avm2-shell
|
55
56
|
- furnace-avm2.gemspec
|
56
57
|
- lib/furnace-avm2.rb
|
57
58
|
- lib/furnace-avm2/abc.rb
|
@@ -82,6 +83,19 @@ files:
|
|
82
83
|
- lib/furnace-avm2/abc/metadata/trait_info.rb
|
83
84
|
- lib/furnace-avm2/abc/metadata/trait_method.rb
|
84
85
|
- lib/furnace-avm2/abc/metadata/trait_slot.rb
|
86
|
+
- lib/furnace-avm2/abc/opcodes/alchemy/alchemy_extend_1.rb
|
87
|
+
- lib/furnace-avm2/abc/opcodes/alchemy/alchemy_extend_16.rb
|
88
|
+
- lib/furnace-avm2/abc/opcodes/alchemy/alchemy_extend_8.rb
|
89
|
+
- lib/furnace-avm2/abc/opcodes/alchemy/alchemy_load_float32.rb
|
90
|
+
- lib/furnace-avm2/abc/opcodes/alchemy/alchemy_load_float64.rb
|
91
|
+
- lib/furnace-avm2/abc/opcodes/alchemy/alchemy_load_int16.rb
|
92
|
+
- lib/furnace-avm2/abc/opcodes/alchemy/alchemy_load_int32.rb
|
93
|
+
- lib/furnace-avm2/abc/opcodes/alchemy/alchemy_load_int8.rb
|
94
|
+
- lib/furnace-avm2/abc/opcodes/alchemy/alchemy_store_float32.rb
|
95
|
+
- lib/furnace-avm2/abc/opcodes/alchemy/alchemy_store_float64.rb
|
96
|
+
- lib/furnace-avm2/abc/opcodes/alchemy/alchemy_store_int16.rb
|
97
|
+
- lib/furnace-avm2/abc/opcodes/alchemy/alchemy_store_int32.rb
|
98
|
+
- lib/furnace-avm2/abc/opcodes/alchemy/alchemy_store_int8.rb
|
85
99
|
- lib/furnace-avm2/abc/opcodes/arithmetic/as3_add.rb
|
86
100
|
- lib/furnace-avm2/abc/opcodes/arithmetic/as3_add_i.rb
|
87
101
|
- lib/furnace-avm2/abc/opcodes/arithmetic/as3_declocal.rb
|
@@ -107,7 +121,6 @@ files:
|
|
107
121
|
- lib/furnace-avm2/abc/opcodes/arithmetic/as3_strictequals.rb
|
108
122
|
- lib/furnace-avm2/abc/opcodes/arithmetic/as3_subtract.rb
|
109
123
|
- lib/furnace-avm2/abc/opcodes/arithmetic/as3_subtract_i.rb
|
110
|
-
- lib/furnace-avm2/abc/opcodes/arithmetic_opcode.rb
|
111
124
|
- lib/furnace-avm2/abc/opcodes/bitwise/as3_bitand.rb
|
112
125
|
- lib/furnace-avm2/abc/opcodes/bitwise/as3_bitnot.rb
|
113
126
|
- lib/furnace-avm2/abc/opcodes/bitwise/as3_bitor.rb
|
@@ -115,7 +128,6 @@ files:
|
|
115
128
|
- lib/furnace-avm2/abc/opcodes/bitwise/as3_lshift.rb
|
116
129
|
- lib/furnace-avm2/abc/opcodes/bitwise/as3_rshift.rb
|
117
130
|
- lib/furnace-avm2/abc/opcodes/bitwise/as3_urshift.rb
|
118
|
-
- lib/furnace-avm2/abc/opcodes/bitwise_opcode.rb
|
119
131
|
- lib/furnace-avm2/abc/opcodes/contextual_opcode.rb
|
120
132
|
- lib/furnace-avm2/abc/opcodes/control_transfer/as3_ifeq.rb
|
121
133
|
- lib/furnace-avm2/abc/opcodes/control_transfer/as3_iffalse.rb
|
@@ -138,7 +150,6 @@ files:
|
|
138
150
|
- lib/furnace-avm2/abc/opcodes/debug/as3_debugfile.rb
|
139
151
|
- lib/furnace-avm2/abc/opcodes/debug/as3_debugline.rb
|
140
152
|
- lib/furnace-avm2/abc/opcodes/exception/as3_newcatch.rb
|
141
|
-
- lib/furnace-avm2/abc/opcodes/exception_opcode.rb
|
142
153
|
- lib/furnace-avm2/abc/opcodes/function_invocation/as3_call.rb
|
143
154
|
- lib/furnace-avm2/abc/opcodes/function_invocation/as3_callproperty.rb
|
144
155
|
- lib/furnace-avm2/abc/opcodes/function_invocation/as3_callproplex.rb
|
@@ -148,12 +159,12 @@ files:
|
|
148
159
|
- lib/furnace-avm2/abc/opcodes/function_invocation_opcode.rb
|
149
160
|
- lib/furnace-avm2/abc/opcodes/function_return/as3_returnvalue.rb
|
150
161
|
- lib/furnace-avm2/abc/opcodes/function_return/as3_returnvoid.rb
|
151
|
-
- lib/furnace-avm2/abc/opcodes/function_return_opcode.rb
|
152
162
|
- lib/furnace-avm2/abc/opcodes/generic/as3_astypelate.rb
|
153
163
|
- lib/furnace-avm2/abc/opcodes/generic/as3_checkfilter.rb
|
154
164
|
- lib/furnace-avm2/abc/opcodes/generic/as3_dup.rb
|
155
165
|
- lib/furnace-avm2/abc/opcodes/generic/as3_dxnslate.rb
|
156
166
|
- lib/furnace-avm2/abc/opcodes/generic/as3_escxattr.rb
|
167
|
+
- lib/furnace-avm2/abc/opcodes/generic/as3_escxelem.rb
|
157
168
|
- lib/furnace-avm2/abc/opcodes/generic/as3_getglobalscope.rb
|
158
169
|
- lib/furnace-avm2/abc/opcodes/generic/as3_getlex.rb
|
159
170
|
- lib/furnace-avm2/abc/opcodes/generic/as3_getscopeobject.rb
|
@@ -192,7 +203,6 @@ files:
|
|
192
203
|
- lib/furnace-avm2/abc/opcodes/object_manipulation/as3_newclass.rb
|
193
204
|
- lib/furnace-avm2/abc/opcodes/object_manipulation/as3_newfunction.rb
|
194
205
|
- lib/furnace-avm2/abc/opcodes/object_manipulation/as3_newobject.rb
|
195
|
-
- lib/furnace-avm2/abc/opcodes/object_manipulation_opcode.rb
|
196
206
|
- lib/furnace-avm2/abc/opcodes/opcode.rb
|
197
207
|
- lib/furnace-avm2/abc/opcodes/property/as3_constructprop.rb
|
198
208
|
- lib/furnace-avm2/abc/opcodes/property/as3_deleteproperty.rb
|
@@ -215,6 +225,7 @@ files:
|
|
215
225
|
- lib/furnace-avm2/abc/opcodes/push_literal/as3_pushshort.rb
|
216
226
|
- lib/furnace-avm2/abc/opcodes/push_literal/as3_pushstring.rb
|
217
227
|
- lib/furnace-avm2/abc/opcodes/push_literal/as3_pushtrue.rb
|
228
|
+
- lib/furnace-avm2/abc/opcodes/push_literal/as3_pushuint.rb
|
218
229
|
- lib/furnace-avm2/abc/opcodes/push_literal/as3_pushundefined.rb
|
219
230
|
- lib/furnace-avm2/abc/opcodes/push_literal/as3_pushwith.rb
|
220
231
|
- lib/furnace-avm2/abc/opcodes/push_literal_opcode.rb
|
@@ -228,7 +239,6 @@ files:
|
|
228
239
|
- lib/furnace-avm2/abc/opcodes/type_conversion/as3_convert_o.rb
|
229
240
|
- lib/furnace-avm2/abc/opcodes/type_conversion/as3_convert_s.rb
|
230
241
|
- lib/furnace-avm2/abc/opcodes/type_conversion/as3_convert_u.rb
|
231
|
-
- lib/furnace-avm2/abc/opcodes/type_conversion_opcode.rb
|
232
242
|
- lib/furnace-avm2/abc/primitives/opcode_sequence.rb
|
233
243
|
- lib/furnace-avm2/abc/primitives/record.rb
|
234
244
|
- lib/furnace-avm2/binary/choice_definition.rb
|
@@ -247,6 +257,7 @@ files:
|
|
247
257
|
- lib/furnace-avm2/source/declaration_tokens/function_name_token.rb
|
248
258
|
- lib/furnace-avm2/source/declaration_tokens/import_token.rb
|
249
259
|
- lib/furnace-avm2/source/declaration_tokens/initialization_token.rb
|
260
|
+
- lib/furnace-avm2/source/declaration_tokens/metadata_token.rb
|
250
261
|
- lib/furnace-avm2/source/declaration_tokens/method_specifiers_token.rb
|
251
262
|
- lib/furnace-avm2/source/declaration_tokens/method_token.rb
|
252
263
|
- lib/furnace-avm2/source/declaration_tokens/multiname_token.rb
|
@@ -269,6 +280,8 @@ files:
|
|
269
280
|
- lib/furnace-avm2/source/implementation_tokens/binary_operator_token.rb
|
270
281
|
- lib/furnace-avm2/source/implementation_tokens/break_token.rb
|
271
282
|
- lib/furnace-avm2/source/implementation_tokens/call_token.rb
|
283
|
+
- lib/furnace-avm2/source/implementation_tokens/closure_name_token.rb
|
284
|
+
- lib/furnace-avm2/source/implementation_tokens/closure_token.rb
|
272
285
|
- lib/furnace-avm2/source/implementation_tokens/continue_token.rb
|
273
286
|
- lib/furnace-avm2/source/implementation_tokens/control_flow_token.rb
|
274
287
|
- lib/furnace-avm2/source/implementation_tokens/control_transfer_token.rb
|
@@ -285,6 +298,7 @@ files:
|
|
285
298
|
- lib/furnace-avm2/source/implementation_tokens/immediate_typename_token.rb
|
286
299
|
- lib/furnace-avm2/source/implementation_tokens/in_token.rb
|
287
300
|
- lib/furnace-avm2/source/implementation_tokens/index_token.rb
|
301
|
+
- lib/furnace-avm2/source/implementation_tokens/instance_of_token.rb
|
288
302
|
- lib/furnace-avm2/source/implementation_tokens/is_complex.rb
|
289
303
|
- lib/furnace-avm2/source/implementation_tokens/is_simple.rb
|
290
304
|
- lib/furnace-avm2/source/implementation_tokens/is_token.rb
|
@@ -300,6 +314,7 @@ files:
|
|
300
314
|
- lib/furnace-avm2/source/implementation_tokens/rtname_token.rb
|
301
315
|
- lib/furnace-avm2/source/implementation_tokens/statement_token.rb
|
302
316
|
- lib/furnace-avm2/source/implementation_tokens/super_token.rb
|
317
|
+
- lib/furnace-avm2/source/implementation_tokens/supplementary_comment_token.rb
|
303
318
|
- lib/furnace-avm2/source/implementation_tokens/switch_token.rb
|
304
319
|
- lib/furnace-avm2/source/implementation_tokens/ternary_operator_token.rb
|
305
320
|
- lib/furnace-avm2/source/implementation_tokens/throw_token.rb
|
@@ -308,6 +323,7 @@ files:
|
|
308
323
|
- lib/furnace-avm2/source/implementation_tokens/unary_post_operator_token.rb
|
309
324
|
- lib/furnace-avm2/source/implementation_tokens/variable_name_token.rb
|
310
325
|
- lib/furnace-avm2/source/implementation_tokens/while_token.rb
|
326
|
+
- lib/furnace-avm2/source/implementation_tokens/xml_literal_token.rb
|
311
327
|
- lib/furnace-avm2/transform.rb
|
312
328
|
- lib/furnace-avm2/transform/ast_build.rb
|
313
329
|
- lib/furnace-avm2/transform/ast_normalize.rb
|
@@ -316,29 +332,30 @@ files:
|
|
316
332
|
- lib/furnace-avm2/transform/nf_normalize.rb
|
317
333
|
- lib/furnace-avm2/version.rb
|
318
334
|
- test/basic.as
|
335
|
+
- test/global.as
|
319
336
|
homepage: http://github.com/whitequark/furnace-avm2
|
320
337
|
licenses: []
|
321
|
-
post_install_message:
|
338
|
+
post_install_message:
|
322
339
|
rdoc_options: []
|
323
340
|
require_paths:
|
324
341
|
- lib
|
325
342
|
required_ruby_version: !ruby/object:Gem::Requirement
|
343
|
+
none: false
|
326
344
|
requirements:
|
327
345
|
- - ! '>='
|
328
346
|
- !ruby/object:Gem::Version
|
329
347
|
version: '0'
|
330
|
-
none: false
|
331
348
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
349
|
+
none: false
|
332
350
|
requirements:
|
333
351
|
- - ! '>='
|
334
352
|
- !ruby/object:Gem::Version
|
335
353
|
version: '0'
|
336
|
-
none: false
|
337
354
|
requirements: []
|
338
|
-
rubyforge_project:
|
339
|
-
rubygems_version: 1.8.
|
340
|
-
signing_key:
|
355
|
+
rubyforge_project:
|
356
|
+
rubygems_version: 1.8.17
|
357
|
+
signing_key:
|
341
358
|
specification_version: 3
|
342
359
|
summary: AVM2 analysis framework based on Furnace
|
343
360
|
test_files: []
|
344
|
-
|
361
|
+
has_rdoc:
|