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
ecbfbf1b
Commit
ecbfbf1b
authored
May 19, 2016
by
yann300
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rename lastPropertyChange
parent
da22990a
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
9 deletions
+8
-9
asmCode.js
src/asmCode.js
+0
-1
traceManager.js
src/traceManager.js
+8
-8
No files found.
src/asmCode.js
View file @
ecbfbf1b
...
...
@@ -45,7 +45,6 @@ module.exports = React.createClass({
},
componentWillReceiveProps
:
function
(
nextProps
)
{
console
.
log
(
'new prop asmCode'
)
if
(
nextProps
.
currentStepIndex
<
0
)
return
codeResolver
.
setWeb3
(
this
.
context
.
web3
)
var
self
=
this
...
...
src/traceManager.js
View file @
ecbfbf1b
...
...
@@ -145,7 +145,7 @@ module.exports = {
},
getStorageAt
:
function
(
stepIndex
,
callback
)
{
var
stoChange
=
this
.
lastPropertyChange
(
stepIndex
,
this
.
vmTraceChangesRef
)
var
stoChange
=
this
.
findLowerBound
(
stepIndex
,
this
.
vmTraceChangesRef
)
if
(
!
stoChange
)
{
return
{}
}
...
...
@@ -169,13 +169,13 @@ module.exports = {
},
getCallDataAt
:
function
(
stepIndex
,
callback
)
{
var
callDataChange
=
this
.
lastPropertyChange
(
stepIndex
,
this
.
callDataChanges
)
var
callDataChange
=
this
.
findLowerBound
(
stepIndex
,
this
.
callDataChanges
)
if
(
!
callDataChange
)
return
[
''
]
callback
([
this
.
trace
[
callDataChange
].
calldata
])
},
getCallStackAt
:
function
(
stepIndex
,
callback
)
{
var
callStackChange
=
this
.
lastPropertyChange
(
stepIndex
,
this
.
depthChanges
)
var
callStackChange
=
this
.
findLowerBound
(
stepIndex
,
this
.
depthChanges
)
if
(
!
callStackChange
)
return
''
callback
(
this
.
callStack
[
callStackChange
].
stack
)
},
...
...
@@ -190,7 +190,7 @@ module.exports = {
},
getLastDepthIndexChangeSince
:
function
(
stepIndex
,
callback
)
{
var
depthIndex
=
this
.
lastPropertyChange
(
stepIndex
,
this
.
depthChanges
)
var
depthIndex
=
this
.
findLowerBound
(
stepIndex
,
this
.
depthChanges
)
callback
(
depthIndex
)
},
...
...
@@ -202,7 +202,7 @@ module.exports = {
},
getMemoryAt
:
function
(
stepIndex
,
callback
)
{
var
lastChanges
=
this
.
lastPropertyChange
(
stepIndex
,
this
.
memoryChanges
)
var
lastChanges
=
this
.
findLowerBound
(
stepIndex
,
this
.
memoryChanges
)
if
(
!
lastChanges
)
return
''
callback
(
this
.
trace
[
lastChanges
].
memory
)
},
...
...
@@ -289,7 +289,7 @@ module.exports = {
},
// util section
lastPropertyChange
:
function
(
target
,
changes
)
{
findLowerBound
:
function
(
target
,
changes
)
{
if
(
changes
.
length
===
1
)
{
if
(
changes
[
0
]
>
target
)
{
// we only a closest maximum, returning 0
...
...
@@ -301,9 +301,9 @@ module.exports = {
var
middle
=
Math
.
floor
(
changes
.
length
/
2
)
if
(
changes
[
middle
]
>
target
)
{
return
this
.
lastPropertyChange
(
target
,
changes
.
slice
(
0
,
middle
))
return
this
.
findLowerBound
(
target
,
changes
.
slice
(
0
,
middle
))
}
else
if
(
changes
[
middle
]
<
target
)
{
return
this
.
lastPropertyChange
(
target
,
changes
.
slice
(
middle
,
changes
.
length
))
return
this
.
findLowerBound
(
target
,
changes
.
slice
(
middle
,
changes
.
length
))
}
else
{
return
changes
[
middle
]
}
...
...
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