Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
J
jadx
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open-source
jadx
Commits
12b63712
Commit
12b63712
authored
May 01, 2014
by
Skylot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
core: fix basic block initial id
parent
24d22aaa
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
7 deletions
+2
-7
BlockMakerVisitor.java
...c/main/java/jadx/core/dex/visitors/BlockMakerVisitor.java
+2
-7
No files found.
jadx-core/src/main/java/jadx/core/dex/visitors/BlockMakerVisitor.java
View file @
12b63712
...
...
@@ -24,7 +24,6 @@ import jadx.core.utils.exceptions.JadxRuntimeException;
import
java.util.ArrayList
;
import
java.util.BitSet
;
import
java.util.Collections
;
import
java.util.EnumSet
;
import
java.util.HashMap
;
import
java.util.Iterator
;
...
...
@@ -44,8 +43,6 @@ public class BlockMakerVisitor extends AbstractVisitor {
private
static
final
BitSet
EMPTY_BITSET
=
new
EmptyBitSet
();
private
static
int
nextBlockId
;
@Override
public
void
visit
(
MethodNode
mth
)
{
if
(
mth
.
isNoCode
())
{
...
...
@@ -59,8 +56,6 @@ public class BlockMakerVisitor extends AbstractVisitor {
}
private
static
void
splitBasicBlocks
(
MethodNode
mth
)
{
nextBlockId
=
0
;
InsnNode
prevInsn
=
null
;
Map
<
Integer
,
BlockNode
>
blocksMap
=
new
HashMap
<
Integer
,
BlockNode
>();
BlockNode
curBlock
=
startNewBlock
(
mth
,
0
);
...
...
@@ -221,13 +216,13 @@ public class BlockMakerVisitor extends AbstractVisitor {
}
private
static
BlockNode
startNewBlock
(
MethodNode
mth
,
int
offset
)
{
BlockNode
block
=
new
BlockNode
(
++
nextBlockId
,
offset
);
BlockNode
block
=
new
BlockNode
(
mth
.
getBasicBlocks
().
size
()
,
offset
);
mth
.
getBasicBlocks
().
add
(
block
);
return
block
;
}
private
static
void
computeDominators
(
MethodNode
mth
)
{
List
<
BlockNode
>
basicBlocks
=
Collections
.
unmodifiableList
(
mth
.
getBasicBlocks
()
);
List
<
BlockNode
>
basicBlocks
=
mth
.
getBasicBlocks
(
);
int
nBlocks
=
basicBlocks
.
size
();
for
(
int
i
=
0
;
i
<
nBlocks
;
i
++)
{
BlockNode
block
=
basicBlocks
.
get
(
i
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment