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
3573abf4
Commit
3573abf4
authored
Aug 08, 2017
by
yann300
Committed by
GitHub
Aug 08, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #537 from ethereum/soliditySourceLocation
Improve solidity reduced trace
parents
94d6049f
765e06d3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
4 deletions
+11
-4
internalCallTree.js
src/util/internalCallTree.js
+11
-4
No files found.
src/util/internalCallTree.js
View file @
3573abf4
...
@@ -116,14 +116,21 @@ async function buildTree (tree, step, scopeId) {
...
@@ -116,14 +116,21 @@ async function buildTree (tree, step, scopeId) {
return
false
return
false
}
}
var
currentSourceLocation
=
{}
function
includedSource
(
source
,
included
)
{
return
(
included
.
start
!==
-
1
&&
included
.
length
!==
-
1
&&
included
.
file
!==
-
1
&&
included
.
start
>=
source
.
start
&&
included
.
start
+
included
.
length
<=
source
.
start
+
source
.
length
&&
included
.
file
===
source
.
file
)
}
var
currentSourceLocation
=
{
start
:
-
1
,
length
:
-
1
,
file
:
-
1
}
while
(
step
<
tree
.
traceManager
.
trace
.
length
)
{
while
(
step
<
tree
.
traceManager
.
trace
.
length
)
{
var
sourceLocation
var
sourceLocation
try
{
try
{
sourceLocation
=
await
tree
.
extractSourceLocation
(
step
)
sourceLocation
=
await
tree
.
extractSourceLocation
(
step
)
if
(
sourceLocation
.
start
!==
currentSourceLocation
.
start
||
if
(
!
includedSource
(
sourceLocation
,
currentSourceLocation
))
{
sourceLocation
.
length
!==
currentSourceLocation
.
length
||
sourceLocation
.
file
!==
currentSourceLocation
.
file
)
{
tree
.
reducedTrace
.
push
(
step
)
tree
.
reducedTrace
.
push
(
step
)
currentSourceLocation
=
sourceLocation
currentSourceLocation
=
sourceLocation
}
}
...
...
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