Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
baas-ide
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
guxukai
baas-ide
Commits
c88caade
Commit
c88caade
authored
Dec 12, 2016
by
yann300
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use extractStatesDefinitions
parent
8551a651
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
14 deletions
+3
-14
internalCallTree.js
src/util/internalCallTree.js
+3
-14
No files found.
src/util/internalCallTree.js
View file @
c88caade
...
@@ -74,11 +74,10 @@ function buildTree (tree, step, scopeId, trace) {
...
@@ -74,11 +74,10 @@ function buildTree (tree, step, scopeId, trace) {
if
(
!
error
)
{
if
(
!
error
)
{
tree
.
solidityProxy
.
contractNameAt
(
step
,
(
error
,
contractName
)
=>
{
// cached
tree
.
solidityProxy
.
contractNameAt
(
step
,
(
error
,
contractName
)
=>
{
// cached
if
(
!
error
)
{
if
(
!
error
)
{
tree
.
solidityProxy
.
extractStateVariablesAt
(
step
,
(
error
,
stateVars
)
=>
{
// cached
var
states
=
tree
.
solidityProxy
.
extractStatesDefinitions
()
if
(
!
error
)
{
tree
.
scopes
[
scopeId
].
locals
[
variableDeclaration
.
attributes
.
name
]
=
{
tree
.
scopes
[
scopeId
].
locals
[
variableDeclaration
.
attributes
.
name
]
=
{
name
:
variableDeclaration
.
attributes
.
name
,
name
:
variableDeclaration
.
attributes
.
name
,
type
:
decodeInfo
.
parseType
(
variableDeclaration
.
attributes
.
type
,
contractName
,
stateVars
),
type
:
decodeInfo
.
parseType
(
variableDeclaration
.
attributes
.
type
,
states
,
contractName
),
stackHeight
:
stack
.
length
stackHeight
:
stack
.
length
}
}
}
}
...
@@ -86,8 +85,6 @@ function buildTree (tree, step, scopeId, trace) {
...
@@ -86,8 +85,6 @@ function buildTree (tree, step, scopeId, trace) {
}
}
})
})
}
}
})
}
}
}
step
++
step
++
...
@@ -116,15 +113,7 @@ function resolveVariableDeclaration (tree, step, sourceLocation) {
...
@@ -116,15 +113,7 @@ function resolveVariableDeclaration (tree, step, sourceLocation) {
tree
.
variableDeclarationByFile
[
sourceLocation
.
file
]
=
extractVariableDeclarations
(
tree
.
solidityProxy
.
ast
(
sourceLocation
),
tree
.
astWalker
)
tree
.
variableDeclarationByFile
[
sourceLocation
.
file
]
=
extractVariableDeclarations
(
tree
.
solidityProxy
.
ast
(
sourceLocation
),
tree
.
astWalker
)
}
}
var
variableDeclarations
=
tree
.
variableDeclarationByFile
[
sourceLocation
.
file
]
var
variableDeclarations
=
tree
.
variableDeclarationByFile
[
sourceLocation
.
file
]
var
ret
=
null
return
variableDeclarations
[
sourceLocation
.
start
+
':'
+
sourceLocation
.
length
+
':'
+
sourceLocation
.
file
]
tree
.
solidityProxy
.
extractStateVariablesAt
(
step
,
(
error
,
stateVars
)
=>
{
// cached
if
(
error
)
{
console
.
log
(
error
)
}
else
{
ret
=
variableDeclarations
[
sourceLocation
.
start
+
':'
+
sourceLocation
.
length
+
':'
+
sourceLocation
.
file
]
}
})
return
ret
}
}
function
extractVariableDeclarations
(
ast
,
astWalker
)
{
function
extractVariableDeclarations
(
ast
,
astWalker
)
{
...
...
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