Skip to content
This repository has been archived by the owner on Nov 2, 2019. It is now read-only.

Commit

Permalink
Debug opcode adjustments.
Browse files Browse the repository at this point in the history
  • Loading branch information
whitequark committed Aug 19, 2012
1 parent b3361ed commit bc086e9
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 4 deletions.
6 changes: 5 additions & 1 deletion lib/furnace-avm2/abc/opcodes/debug/as3_debugfile.rb
Expand Up @@ -3,7 +3,11 @@ class AS3DebugFile < Opcode
instruction 0xf1

body do
vuint30 :index
const_ref :file, :string
end

def parameters
[ body.file ]
end

consume 0
Expand Down
6 changes: 5 additions & 1 deletion lib/furnace-avm2/abc/opcodes/debug/as3_debugline.rb
Expand Up @@ -3,7 +3,11 @@ class AS3DebugLine < Opcode
instruction 0xf0

body do
vuint30 :linenum
vuint30 :line
end

def parameters
[ body.line ]
end

consume 0
Expand Down
4 changes: 4 additions & 0 deletions lib/furnace-avm2/abc/opcodes/push_literal/as3_pushstring.rb
Expand Up @@ -6,6 +6,10 @@ class AS3PushString < PushLiteralOpcode
const_ref :value, :string
end

def parameters
[ body.line ]
end

type :string
end
end
6 changes: 4 additions & 2 deletions lib/furnace-avm2/transform/cfg_build.rb
Expand Up @@ -81,8 +81,10 @@ def transform(code, body)
end

# Skip nops
unless [ ABC::AS3Jump, ABC::AS3Label,
ABC::AS3Kill, ABC::AS3Nop ].include? opcode.class
unless [ ABC::AS3Jump, ABC::AS3Label,
ABC::AS3Kill, ABC::AS3Nop,
ABC::AS3Debug, ABC::AS3DebugFile, ABC::AS3DebugLine
].include? opcode.class
@pending_queue << opcode
end

Expand Down

0 comments on commit bc086e9

Please sign in to comment.