furnace-avm2 0.0.9 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +1 -1
- data/Gemfile.lock +4 -3
- data/LICENSE +20 -0
- data/bin/furnace-avm2 +36 -6
- data/bin/furnace-avm2-decompiler +141 -0
- data/furnace-avm2.gemspec +2 -2
- data/lib/furnace-avm2.rb +1 -0
- data/lib/furnace-avm2/abc.rb +24 -7
- data/lib/furnace-avm2/abc/metadata/{option_detail.rb → default_value.rb} +5 -1
- data/lib/furnace-avm2/abc/metadata/initializer_body.rb +8 -0
- data/lib/furnace-avm2/abc/metadata/instance_info.rb +19 -4
- data/lib/furnace-avm2/abc/metadata/klass_info.rb +1 -4
- data/lib/furnace-avm2/abc/metadata/method_body_info.rb +27 -10
- data/lib/furnace-avm2/abc/metadata/method_info.rb +20 -13
- data/lib/furnace-avm2/abc/metadata/multiname_info.rb +6 -0
- data/lib/furnace-avm2/abc/metadata/multiname_kind_genericname.rb +8 -5
- data/lib/furnace-avm2/abc/metadata/multiname_kind_multiname.rb +4 -0
- data/lib/furnace-avm2/abc/metadata/multiname_kind_qname.rb +5 -1
- data/lib/furnace-avm2/abc/metadata/record_with_value.rb +90 -0
- data/lib/furnace-avm2/abc/metadata/script_info.rb +25 -1
- data/lib/furnace-avm2/abc/metadata/trait_class.rb +7 -3
- data/lib/furnace-avm2/abc/metadata/trait_info.rb +8 -4
- data/lib/furnace-avm2/abc/metadata/trait_method.rb +4 -0
- data/lib/furnace-avm2/abc/metadata/trait_slot.rb +5 -51
- 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/debug/as3_debug.rb +15 -0
- data/lib/furnace-avm2/abc/opcodes/debug/as3_debugfile.rb +12 -0
- data/lib/furnace-avm2/abc/opcodes/debug/as3_debugline.rb +12 -0
- data/lib/furnace-avm2/abc/opcodes/function_invocation/as3_callproplex.rb +21 -0
- data/lib/furnace-avm2/abc/opcodes/push_literal/as3_pushbyte.rb +1 -1
- data/lib/furnace-avm2/abc/opcodes/push_literal/as3_pushshort.rb +1 -1
- data/lib/furnace-avm2/binary/record.rb +21 -1
- data/lib/furnace-avm2/source/declaration_tokens/argument_declaration_token.rb +4 -0
- data/lib/furnace-avm2/source/declaration_tokens/arguments_token.rb +15 -0
- data/lib/furnace-avm2/source/declaration_tokens/callee_token.rb +72 -0
- data/lib/furnace-avm2/source/declaration_tokens/class_implementations_token.rb +21 -0
- data/lib/furnace-avm2/source/declaration_tokens/class_inheritance_token.rb +17 -0
- data/lib/furnace-avm2/source/declaration_tokens/class_name_token.rb +21 -0
- data/lib/furnace-avm2/source/declaration_tokens/class_specifiers_token.rb +12 -0
- data/lib/furnace-avm2/source/declaration_tokens/class_token.rb +21 -0
- data/lib/furnace-avm2/source/declaration_tokens/comment_token.rb +22 -0
- data/lib/furnace-avm2/source/declaration_tokens/constructor_specifiers_token.rb +12 -0
- data/lib/furnace-avm2/source/declaration_tokens/constructor_token.rb +15 -0
- data/lib/furnace-avm2/source/declaration_tokens/function_name_token.rb +14 -0
- data/lib/furnace-avm2/source/declaration_tokens/import_token.rb +17 -0
- data/lib/furnace-avm2/source/declaration_tokens/initialization_token.rb +7 -0
- data/lib/furnace-avm2/source/declaration_tokens/method_specifiers_token.rb +13 -0
- data/lib/furnace-avm2/source/declaration_tokens/method_token.rb +15 -0
- data/lib/furnace-avm2/source/declaration_tokens/multiname_token.rb +41 -0
- data/lib/furnace-avm2/source/declaration_tokens/namespace_name_token.rb +16 -0
- data/lib/furnace-avm2/source/declaration_tokens/package_name_token.rb +17 -0
- data/lib/furnace-avm2/source/declaration_tokens/package_token.rb +29 -0
- data/lib/furnace-avm2/source/declaration_tokens/rest_argument_token.rb +12 -0
- data/lib/furnace-avm2/source/declaration_tokens/scope_token.rb +23 -0
- data/lib/furnace-avm2/source/declaration_tokens/script_token.rb +14 -0
- data/lib/furnace-avm2/source/declaration_tokens/slot_name_token.rb +17 -0
- data/lib/furnace-avm2/source/declaration_tokens/slot_token.rb +23 -0
- data/lib/furnace-avm2/source/declaration_tokens/specifiers_token.rb +32 -0
- data/lib/furnace-avm2/source/declaration_tokens/token_with_traits.rb +51 -0
- data/lib/furnace-avm2/source/declaration_tokens/type_token.rb +7 -0
- data/lib/furnace-avm2/source/decompiler.rb +669 -0
- data/lib/furnace-avm2/source/implementation_tokens/access_token.rb +9 -0
- data/lib/furnace-avm2/source/implementation_tokens/array_token.rb +17 -0
- data/lib/furnace-avm2/source/implementation_tokens/as_token.rb +9 -0
- data/lib/furnace-avm2/source/implementation_tokens/assignment_token.rb +9 -0
- data/lib/furnace-avm2/source/implementation_tokens/binary_operator_token.rb +14 -0
- data/lib/furnace-avm2/source/implementation_tokens/break_token.rb +9 -0
- data/lib/furnace-avm2/source/implementation_tokens/call_token.rb +5 -0
- data/lib/furnace-avm2/source/implementation_tokens/continue_token.rb +9 -0
- data/lib/furnace-avm2/source/implementation_tokens/control_flow_token.rb +26 -0
- data/lib/furnace-avm2/source/implementation_tokens/control_transfer_token.rb +20 -0
- data/lib/furnace-avm2/source/implementation_tokens/delete_token.rb +9 -0
- data/lib/furnace-avm2/source/implementation_tokens/do_token.rb +9 -0
- data/lib/furnace-avm2/source/implementation_tokens/else_if_token.rb +9 -0
- data/lib/furnace-avm2/source/implementation_tokens/else_token.rb +22 -0
- data/lib/furnace-avm2/source/implementation_tokens/for_each_token.rb +9 -0
- data/lib/furnace-avm2/source/implementation_tokens/for_token.rb +9 -0
- data/lib/furnace-avm2/source/implementation_tokens/generic_specializers_token.rb +17 -0
- data/lib/furnace-avm2/source/implementation_tokens/generic_type_token.rb +9 -0
- data/lib/furnace-avm2/source/implementation_tokens/if_token.rb +9 -0
- data/lib/furnace-avm2/source/implementation_tokens/immediate_token.rb +14 -0
- data/lib/furnace-avm2/source/implementation_tokens/immediate_typename_token.rb +14 -0
- data/lib/furnace-avm2/source/implementation_tokens/in_token.rb +9 -0
- data/lib/furnace-avm2/source/implementation_tokens/index_token.rb +9 -0
- data/lib/furnace-avm2/source/implementation_tokens/is_complex.rb +7 -0
- data/lib/furnace-avm2/source/implementation_tokens/is_simple.rb +7 -0
- data/lib/furnace-avm2/source/implementation_tokens/is_token.rb +9 -0
- data/lib/furnace-avm2/source/implementation_tokens/label_declaration_token.rb +12 -0
- data/lib/furnace-avm2/source/implementation_tokens/label_token.rb +12 -0
- data/lib/furnace-avm2/source/implementation_tokens/local_variable_token.rb +7 -0
- data/lib/furnace-avm2/source/implementation_tokens/new_token.rb +9 -0
- data/lib/furnace-avm2/source/implementation_tokens/object_pair_token.rb +9 -0
- data/lib/furnace-avm2/source/implementation_tokens/object_token.rb +17 -0
- data/lib/furnace-avm2/source/implementation_tokens/parentheses_token.rb +11 -0
- data/lib/furnace-avm2/source/implementation_tokens/property_name_token.rb +14 -0
- data/lib/furnace-avm2/source/implementation_tokens/return_token.rb +16 -0
- data/lib/furnace-avm2/source/implementation_tokens/rtname_token.rb +9 -0
- data/lib/furnace-avm2/source/implementation_tokens/statement_token.rb +8 -0
- data/lib/furnace-avm2/source/implementation_tokens/super_token.rb +9 -0
- data/lib/furnace-avm2/source/implementation_tokens/switch_token.rb +9 -0
- data/lib/furnace-avm2/source/implementation_tokens/ternary_operator_token.rb +13 -0
- data/lib/furnace-avm2/source/implementation_tokens/throw_token.rb +12 -0
- data/lib/furnace-avm2/source/implementation_tokens/typeof_token.rb +13 -0
- data/lib/furnace-avm2/source/implementation_tokens/unary_operator_token.rb +14 -0
- data/lib/furnace-avm2/source/implementation_tokens/unary_post_operator_token.rb +14 -0
- data/lib/furnace-avm2/source/implementation_tokens/variable_name_token.rb +14 -0
- data/lib/furnace-avm2/source/implementation_tokens/while_token.rb +9 -0
- data/lib/furnace-avm2/transform.rb +5 -1
- data/lib/furnace-avm2/transform/ast_build.rb +22 -7
- data/lib/furnace-avm2/transform/ast_normalize.rb +61 -20
- data/lib/furnace-avm2/transform/cfg_build.rb +86 -0
- data/lib/furnace-avm2/transform/cfg_reduce.rb +249 -0
- data/lib/furnace-avm2/transform/nf_normalize.rb +130 -0
- data/lib/furnace-avm2/version.rb +4 -2
- data/test/basic.as +239 -0
- metadata +110 -38
- data/lib/furnace-avm2/abc/metadata/option_info.rb +0 -5
- data/test/exception.as +0 -29
- data/test/literal.as +0 -5
- data/test/logic.as +0 -23
- data/test/loops.as +0 -30
- data/test/number.as +0 -14
- data/test/switch.as +0 -38
- data/test/ternary.as +0 -22
@@ -7,23 +7,24 @@ module Furnace::AVM2::ABC
|
|
7
7
|
SET_DXNS = 0x40
|
8
8
|
HAS_PARAM_NAMES = 0x80
|
9
9
|
|
10
|
-
vuint30
|
10
|
+
vuint30 :param_count, :value => lambda { param_types.count }
|
11
11
|
|
12
|
-
const_ref
|
13
|
-
const_array
|
12
|
+
const_ref :return_type, :multiname
|
13
|
+
const_array :param_types, :multiname, :initial_length => :param_count
|
14
14
|
|
15
|
-
const_ref
|
15
|
+
const_ref :name, :string
|
16
16
|
|
17
|
-
uint8
|
18
|
-
flag
|
19
|
-
flag
|
20
|
-
flag
|
21
|
-
flag
|
22
|
-
flag
|
23
|
-
flag
|
17
|
+
uint8 :flags
|
18
|
+
flag :needs_arguments, :flags, NEED_ARGUMENTS
|
19
|
+
flag :needs_activation, :flags, NEED_ACTIVATION
|
20
|
+
flag :needs_rest, :flags, NEED_REST
|
21
|
+
flag :has_defaults, :flags, HAS_OPTIONAL
|
22
|
+
flag :set_dxns, :flags, SET_DXNS
|
23
|
+
flag :has_param_names, :flags, HAS_PARAM_NAMES
|
24
24
|
|
25
|
-
|
26
|
-
|
25
|
+
abc_array_of :default, :nested, :class => DefaultValue, :if => :has_defaults?
|
26
|
+
|
27
|
+
const_array :param_names, :string, :initial_length => :param_count, :if => :has_param_names?
|
27
28
|
|
28
29
|
def to_astlet(index, name=nil)
|
29
30
|
root = AST::Node.new(:method)
|
@@ -53,5 +54,11 @@ module Furnace::AVM2::ABC
|
|
53
54
|
|
54
55
|
root.normalize_hierarchy!
|
55
56
|
end
|
57
|
+
|
58
|
+
def collect_ns
|
59
|
+
ns = param_types.compact.map(&:collect_ns).reduce([], :+)
|
60
|
+
ns += return_type.collect_ns if return_type
|
61
|
+
ns
|
62
|
+
end
|
56
63
|
end
|
57
64
|
end
|
@@ -1,16 +1,19 @@
|
|
1
1
|
module Furnace::AVM2::ABC
|
2
2
|
# Undocumented
|
3
3
|
class MultinameKindGenericName < Record
|
4
|
-
|
5
|
-
|
6
|
-
abc_array_of :parameter, :vuint30
|
4
|
+
const_ref :name, :multiname
|
5
|
+
const_array_of :parameter, :multiname
|
7
6
|
|
8
7
|
def to_s
|
9
|
-
"(
|
8
|
+
"#{name.to_s}<#{parameters.map(&:to_s).join(",")}>"
|
10
9
|
end
|
11
10
|
|
12
11
|
def to_astlet
|
13
|
-
AST::Node.new(:generic, [
|
12
|
+
AST::Node.new(:generic, [ name.to_astlet, parameters.map(&:to_astlet) ])
|
13
|
+
end
|
14
|
+
|
15
|
+
def collect_ns
|
16
|
+
[ *name.collect_ns, *parameters.map(&:collect_ns).reduce([], :+) ]
|
14
17
|
end
|
15
18
|
end
|
16
19
|
end
|
@@ -12,7 +12,7 @@ module Furnace::AVM2::ABC
|
|
12
12
|
end
|
13
13
|
|
14
14
|
def to_astlet
|
15
|
-
node = AST::Node.new(:q)
|
15
|
+
node = AST::Node.new(:q, [])
|
16
16
|
|
17
17
|
if ns && ns.name == ""
|
18
18
|
elsif ns
|
@@ -37,6 +37,10 @@ module Furnace::AVM2::ABC
|
|
37
37
|
end
|
38
38
|
end
|
39
39
|
|
40
|
+
def collect_ns
|
41
|
+
[ ns ]
|
42
|
+
end
|
43
|
+
|
40
44
|
def context_size
|
41
45
|
0
|
42
46
|
end
|
@@ -0,0 +1,90 @@
|
|
1
|
+
module Furnace::AVM2::ABC
|
2
|
+
module RecordWithValue
|
3
|
+
XlatTable = {
|
4
|
+
:Int => 0x03,
|
5
|
+
:UInt => 0x04,
|
6
|
+
:Double => 0x06,
|
7
|
+
:Utf8 => 0x01,
|
8
|
+
:True => 0x0B,
|
9
|
+
:False => 0x0A,
|
10
|
+
:Null => 0x0C,
|
11
|
+
:Undefined => 0x00,
|
12
|
+
:Namespace => 0x08,
|
13
|
+
:PackageNamespace => 0x16,
|
14
|
+
:PackageInternalNs => 0x17,
|
15
|
+
:ProtectedNamespace => 0x18,
|
16
|
+
:ExplicitNamespace => 0x19,
|
17
|
+
:StaticProtectedNs => 0x1A,
|
18
|
+
:PrivateNs => 0x05,
|
19
|
+
}
|
20
|
+
|
21
|
+
def value
|
22
|
+
if value_idx > 0
|
23
|
+
case value_kind
|
24
|
+
when :Int
|
25
|
+
AST::Node.new(:integer, [ root.constant_pool.ints[value_idx - 1] ])
|
26
|
+
when :UInt
|
27
|
+
AST::Node.new(:integer, [ root.constant_pool.uints[value_idx - 1] ])
|
28
|
+
when :Double
|
29
|
+
AST::Node.new(:double, [ root.constant_pool.doubles[value_idx - 1] ])
|
30
|
+
when :Utf8
|
31
|
+
AST::Node.new(:string, [ root.constant_pool.strings[value_idx - 1] ])
|
32
|
+
when :True
|
33
|
+
AST::Node.new(:true)
|
34
|
+
when :False
|
35
|
+
AST::Node.new(:false)
|
36
|
+
when :Null
|
37
|
+
AST::Node.new(:null)
|
38
|
+
when :Undefined
|
39
|
+
AST::Node.new(:undefined)
|
40
|
+
else
|
41
|
+
raise "unknown value kind #{value_kind}"
|
42
|
+
end
|
43
|
+
else
|
44
|
+
nil
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
def ruby_value
|
49
|
+
if value_idx > 0
|
50
|
+
case value_kind
|
51
|
+
when :Int
|
52
|
+
root.constant_pool.ints[value_idx - 1]
|
53
|
+
when :UInt
|
54
|
+
root.constant_pool.uints[value_idx - 1]
|
55
|
+
when :Double
|
56
|
+
root.constant_pool.doubles[value_idx - 1]
|
57
|
+
when :Utf8
|
58
|
+
root.constant_pool.strings[value_idx - 1]
|
59
|
+
when :True
|
60
|
+
true
|
61
|
+
when :False
|
62
|
+
false
|
63
|
+
when :Null
|
64
|
+
nil
|
65
|
+
when :Namespace
|
66
|
+
:"%%Namespace"
|
67
|
+
else
|
68
|
+
raise "unknown value kind #{value_kind}"
|
69
|
+
end
|
70
|
+
else
|
71
|
+
nil
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
75
|
+
def printable_value
|
76
|
+
if value_idx > 0
|
77
|
+
case value_kind
|
78
|
+
when :Null
|
79
|
+
"null"
|
80
|
+
when :Undefined
|
81
|
+
"undefined"
|
82
|
+
when :Int, :UInt, :Double, :Utf8, :True, :False
|
83
|
+
ruby_value.inspect
|
84
|
+
end
|
85
|
+
else
|
86
|
+
nil
|
87
|
+
end
|
88
|
+
end
|
89
|
+
end
|
90
|
+
end
|
@@ -1,7 +1,31 @@
|
|
1
1
|
module Furnace::AVM2::ABC
|
2
2
|
class ScriptInfo < Record
|
3
|
-
|
3
|
+
include InitializerBody
|
4
|
+
|
5
|
+
root_ref :initializer, :method
|
4
6
|
|
5
7
|
abc_array_of :trait, :nested, :class => TraitInfo
|
8
|
+
|
9
|
+
def collect_ns
|
10
|
+
ns = []
|
11
|
+
ns += initializer.collect_ns if initializer
|
12
|
+
traits.each { |trait| ns += trait.collect_ns }
|
13
|
+
ns
|
14
|
+
end
|
15
|
+
|
16
|
+
def decompile(options={})
|
17
|
+
Furnace::AVM2::Tokens::PackageToken.new(self,
|
18
|
+
options.merge(ns: collect_ns,
|
19
|
+
package_type: :script,
|
20
|
+
package_name: non_init_traits[0].name))
|
21
|
+
end
|
22
|
+
|
23
|
+
def any_code?
|
24
|
+
non_init_traits.any?
|
25
|
+
end
|
26
|
+
|
27
|
+
def non_init_traits
|
28
|
+
traits.reject { |trait| trait.kind == :Class }
|
29
|
+
end
|
6
30
|
end
|
7
31
|
end
|
@@ -1,10 +1,14 @@
|
|
1
1
|
module Furnace::AVM2::ABC
|
2
2
|
class TraitClass < Record
|
3
|
-
vuint30
|
4
|
-
|
3
|
+
vuint30 :slot_id
|
4
|
+
root_ref :klass, :klass, :plural => :klasses
|
5
5
|
|
6
6
|
def to_astlet(trait)
|
7
|
-
:class
|
7
|
+
AST::Node.new(:class, [trait.name.to_astlet, klass.instance.name.to_astlet])
|
8
|
+
end
|
9
|
+
|
10
|
+
def collect_ns
|
11
|
+
[]
|
8
12
|
end
|
9
13
|
end
|
10
14
|
end
|
@@ -10,9 +10,9 @@ module Furnace::AVM2::ABC
|
|
10
10
|
:Const => 6
|
11
11
|
}
|
12
12
|
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
TRAIT_FINAL = 0x01
|
14
|
+
TRAIT_OVERRIDE = 0x02
|
15
|
+
TRAIT_METADATA = 0x04
|
16
16
|
|
17
17
|
attr_accessor :kind_raw
|
18
18
|
|
@@ -34,6 +34,10 @@ module Furnace::AVM2::ABC
|
|
34
34
|
const_ref :name, :multiname
|
35
35
|
|
36
36
|
attributes :attributes
|
37
|
+
flag :final, :attributes, TRAIT_FINAL
|
38
|
+
flag :override, :attributes, TRAIT_OVERRIDE
|
39
|
+
flag :metadata, :attributes, TRAIT_METADATA
|
40
|
+
|
37
41
|
xlat_field :kind
|
38
42
|
|
39
43
|
choice :data, :selection => :kind do
|
@@ -46,7 +50,7 @@ module Furnace::AVM2::ABC
|
|
46
50
|
variant :Const, :nested, :class => TraitSlot
|
47
51
|
end
|
48
52
|
|
49
|
-
abc_array_of :metadata, :vuint30, :plural => :metadata, :if =>
|
53
|
+
abc_array_of :metadata, :vuint30, :plural => :metadata, :if => :metadata?
|
50
54
|
|
51
55
|
def method_missing(method, *args, &block)
|
52
56
|
data.send(method, *args, &block)
|
@@ -1,22 +1,6 @@
|
|
1
1
|
module Furnace::AVM2::ABC
|
2
2
|
class TraitSlot < Record
|
3
|
-
|
4
|
-
:Int => 0x03,
|
5
|
-
:UInt => 0x04,
|
6
|
-
:Double => 0x06,
|
7
|
-
:Utf8 => 0x01,
|
8
|
-
:True => 0x0B,
|
9
|
-
:False => 0x0A,
|
10
|
-
:Null => 0x0C,
|
11
|
-
:Undefined => 0x00,
|
12
|
-
:Namespace => 0x08,
|
13
|
-
:PackageNamespace => 0x16,
|
14
|
-
:PackageInternalNs => 0x17,
|
15
|
-
:ProtectedNamespace => 0x18,
|
16
|
-
:ExplicitNamespace => 0x19,
|
17
|
-
:StaticProtectedNs => 0x1A,
|
18
|
-
:PrivateNs => 0x05,
|
19
|
-
}
|
3
|
+
include RecordWithValue
|
20
4
|
|
21
5
|
vuint30 :idx
|
22
6
|
const_ref :type, :multiname
|
@@ -30,41 +14,11 @@ module Furnace::AVM2::ABC
|
|
30
14
|
AST::Node.new(:slot, [ (trait.name ? trait.name.to_astlet : nil), (type ? type.to_astlet : nil), value, idx ])
|
31
15
|
end
|
32
16
|
|
33
|
-
def
|
34
|
-
if
|
35
|
-
|
36
|
-
when :Int
|
37
|
-
AST::Node.new(:integer, [ root.constant_pool.ints[value_idx - 1] ])
|
38
|
-
when :UInt
|
39
|
-
AST::Node.new(:integer, [ root.constant_pool.uints[value_idx - 1] ])
|
40
|
-
when :Double
|
41
|
-
AST::Node.new(:double, [ root.constant_pool.doubles[value_idx - 1] ])
|
42
|
-
when :Utf8
|
43
|
-
AST::Node.new(:string, [ root.constant_pool.strings[value_idx - 1] ])
|
44
|
-
when :True
|
45
|
-
AST::Node.new(:true)
|
46
|
-
when :False
|
47
|
-
AST::Node.new(:false)
|
48
|
-
when :Null
|
49
|
-
AST::Node.new(:null)
|
50
|
-
when :Undefined
|
51
|
-
AST::Node.new(:undefined)
|
52
|
-
else
|
53
|
-
raise "unknown value kind #{value_kind}"
|
54
|
-
end
|
17
|
+
def collect_ns
|
18
|
+
if type
|
19
|
+
type.collect_ns
|
55
20
|
else
|
56
|
-
|
57
|
-
end
|
58
|
-
end
|
59
|
-
|
60
|
-
def ruby_value
|
61
|
-
astlet_value = self.value
|
62
|
-
if astlet_value
|
63
|
-
if astlet_value.children.count > 0
|
64
|
-
astlet_value.children.first
|
65
|
-
else
|
66
|
-
astlet_value.name
|
67
|
-
end
|
21
|
+
[]
|
68
22
|
end
|
69
23
|
end
|
70
24
|
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
module Furnace::AVM2::ABC
|
2
|
+
class AS3CallPropertyLex < Opcode
|
3
|
+
include ContextualOpcode
|
4
|
+
|
5
|
+
instruction 0x4c
|
6
|
+
|
7
|
+
implicit_operand false
|
8
|
+
|
9
|
+
body do
|
10
|
+
const_ref :property, :multiname
|
11
|
+
vuint30 :arg_count
|
12
|
+
end
|
13
|
+
|
14
|
+
consume { body.arg_count }
|
15
|
+
produce 1
|
16
|
+
|
17
|
+
def disassemble_parameters
|
18
|
+
"#{body.property.to_s}(#{body.arg_count})"
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|