1
0
mirror of https://github.com/sehugg/8bitworkshop.git synced 2024-11-25 18:33:11 +00:00

fixed so there can only be one linkstep

This commit is contained in:
Steven Hugg 2019-06-01 20:02:50 -04:00
parent 168ccb691d
commit ed7f5fb7a6
2 changed files with 24 additions and 29 deletions

View File

@ -41,7 +41,6 @@ TODO:
- VCS asm library
- better VCS single stepping, maybe also listings
- VCS skips step on lsr/lsr after run to line
- error msg when #link doesn't work
- figure out folders for projects for real
- click to break on raster position
- restructure src/ folders
@ -59,9 +58,12 @@ TODO:
- error showing replay div before rom starts
- compiler flags for final ROM build
- workermain: split build functions, better msg types
- sdcc: can't link asm files before c files (e.g. acheader.s must be last)
- what if >1 file with same name? (local/nonlocal/directory)
- what if .c and .s names collide?
- builds:
- what if >1 file with same name? (local/nonlocal/directory)
- what if .c and .s names collide?
- maybe put stuff in examples/ dir?
- error msg when #link doesn't work
- sdcc: can't link asm files before c files (e.g. acheader.s must be last)
- live coding URL
- resize memory browser when vertical div resize
- preroll the emulator so optimizer does its thing before loading rom
@ -156,6 +158,7 @@ TODO:
- z80
- can't single step on PUSH insns in listings?
- order of acheader.s
- ctrl+alt+l on ubuntu locks screen
WEB WORKER FORMAT

View File

@ -292,7 +292,6 @@ interface BuildStep extends WorkerBuildStep {
params?
result?
code?
generated?
prefix?
maxts?
};
@ -1989,6 +1988,7 @@ function applyDefaultErrorPath(errors:WorkerError[], path:string) {
function executeBuildSteps() {
buildstartseq = workerseq;
var linkstep : BuildStep = null;
while (buildsteps.length) {
var step = buildsteps.shift(); // get top of array
var platform = step.platform;
@ -2014,37 +2014,29 @@ function executeBuildSteps() {
}
// combine files with a link tool?
if (step.result.linktool) {
var linkstep = {
tool:step.result.linktool,
platform:platform,
files:step.result.files,
args:step.result.args
};
step.generated = linkstep.files;
// find previous link step to combine
for (var i=0; i<buildsteps.length; i++) {
var ls = buildsteps[i];
if (ls.tool == linkstep.tool && ls.platform == linkstep.platform && ls.files && ls.args) {
if (step.result.order === 'last') { // TODO: not used
ls.files = linkstep.files.concat(ls.files);
ls.args = linkstep.args.concat(ls.args);
} else {
ls.files = ls.files.concat(linkstep.files);
ls.args = ls.args.concat(linkstep.args);
}
linkstep = null;
break;
}
if (linkstep) {
linkstep.files = linkstep.files.concat(step.result.files);
linkstep.args = linkstep.args.concat(step.result.args);
} else {
linkstep = {
tool:step.result.linktool,
platform:platform,
files:step.result.files,
args:step.result.args
};
}
if (linkstep) buildsteps.push(linkstep);
}
// process with another tool?
if (step.result.nexttool) {
var asmstep = step.result;
asmstep.tool = step.result.nexttool;
asmstep.platform = platform;
buildsteps.push(asmstep); // TODO: unshift changes order
step.generated = asmstep.files;
buildsteps.push(asmstep);
}
// process final step?
if (buildsteps.length == 0 && linkstep) {
buildsteps.push(linkstep);
linkstep = null;
}
}
}