Merge pull request #80 from yann300/asmitemindexchanged

codemager
pull/7/head
yann300 8 years ago committed by GitHub
commit cc7f3cc1a0
  1. 9
      src/ui/ASMCode.js
  2. 8
      src/ui/Ethdebugger.js
  3. 4
      src/ui/VmDebugger.js

@ -1,12 +1,11 @@
'use strict'
var style = require('./styles/basicStyles')
var yo = require('yo-yo')
var CodeManager = require('../code/codeManager')
var ui = require('../helpers/ui')
function ASMCode (_parent, _traceManager) {
function ASMCode (_parent, _codeManager) {
this.parent = _parent
this.codeManager = new CodeManager(_traceManager)
this.codeManager = _codeManager
this.code
this.address
this.codeView
@ -27,13 +26,9 @@ ASMCode.prototype.render = function () {
}
ASMCode.prototype.init = function () {
var self = this
this.codeManager.register('indexChanged', this, this.indexChanged)
this.codeManager.register('codeChanged', this, this.codeChanged)
this.codeManager.register('loadingCode', this, function (address) {})
this.parent.register('indexChanged', this, function (index) {
self.codeManager.resolveStep(index, self.parent.tx)
})
}
ASMCode.prototype.indexChanged = function (index) {

@ -11,6 +11,7 @@ var yo = require('yo-yo')
var ui = require('../helpers/ui')
var Web3Providers = require('../web3Provider/web3Providers')
var DummyProvider = require('../web3Provider/dummyProvider')
var CodeManager = require('../code/codeManager')
function Ethdebugger () {
util.extend(this, new EventManager())
@ -24,8 +25,13 @@ function Ethdebugger () {
this.addProvider('DUMMYWEB3', new DummyProvider())
this.switchProvider('DUMMYWEB3')
this.traceManager = new TraceManager()
this.codeManager = new CodeManager(this.traceManager)
var self = this
this.traceManager.register('indexChanged', this, function (index) {
self.codeManager.resolveStep(index, self.tx)
})
this.txBrowser = new TxBrowser(this)
this.txBrowser.register('newTxLoading', this, function () {
self.unLoad()
@ -40,7 +46,7 @@ function Ethdebugger () {
this.stepManager.register('stepChanged', this, function (stepIndex) {
self.stepChanged(stepIndex)
})
this.vmDebugger = new VmDebugger(this, this.traceManager)
this.vmDebugger = new VmDebugger(this, this.traceManager, this.codeManager)
this.sticker = new Sticker(this, this.traceManager)
}

@ -11,8 +11,8 @@ var FullStoragesChangesPanel = require('./FullStoragesChanges')
var yo = require('yo-yo')
var ui = require('../helpers/ui')
function VmDebugger (_parent, _traceManager) {
this.asmCode = new ASMCode(_parent, _traceManager)
function VmDebugger (_parent, _traceManager, _codeManager) {
this.asmCode = new ASMCode(_parent, _codeManager)
this.stackPanel = new StackPanel(_parent, _traceManager)
this.storagePanel = new StoragePanel(_parent, _traceManager)
this.memoryPanel = new MemoryPanel(_parent, _traceManager)

Loading…
Cancel
Save