diff options
author | Sunil Shetye | 2018-06-22 15:17:51 +0530 |
---|---|---|
committer | Sunil Shetye | 2018-06-22 16:38:30 +0530 |
commit | 870479a2e4b932426a904b2ebae7e4ee72037326 (patch) | |
tree | 7e089fd43599783dbddeef0bc7460dd085389b29 /js/Misc/EDGE_TRIGGER.js | |
parent | ec185db61d5b6fa65322296e48a983de36436cd0 (diff) | |
download | sci2js-870479a2e4b932426a904b2ebae7e4ee72037326.tar.gz sci2js-870479a2e4b932426a904b2ebae7e4ee72037326.tar.bz2 sci2js-870479a2e4b932426a904b2ebae7e4ee72037326.zip |
save global variables in first pass
read those variables in second pass
Diffstat (limited to 'js/Misc/EDGE_TRIGGER.js')
-rw-r--r-- | js/Misc/EDGE_TRIGGER.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/js/Misc/EDGE_TRIGGER.js b/js/Misc/EDGE_TRIGGER.js index bb2418b5..aebcc2d2 100644 --- a/js/Misc/EDGE_TRIGGER.js +++ b/js/Misc/EDGE_TRIGGER.js @@ -2,7 +2,7 @@ function EDGE_TRIGGER() { EDGE_TRIGGER.prototype.define = function EDGE_TRIGGER() { scs_m_1=scicos_diagram(); -scs_m_1.objs[1-1]=EDGETRIGGER["define"-1]; +scs_m_1.objs[1-1]=this.EDGETRIGGER["define"-1]; scs_m_1.objs[2-1]=IFTHEL_f("define"); scs_m_1.objs[3-1]=IN_f("define"); scs_m_1.objs[4-1]=CLKOUTV_f("define"); @@ -105,9 +105,9 @@ spath[$+1-1]=path[k-1]; } xx=arg1[spath-1]; execstr("xxn="+xx.gui+"(\'set\',xx)"); -if (diffobjs(xxn,xx)) { +if (diffobjs(this.xxn,xx)) { model=xx.model; -model_n=xxn.model; +model_n=this.xxn.model; if (!is_modelica_block(xx)) { modified=or(model.sim!=model_n.sim)||!isequal(model.state,model_n.state)||!isequal(model.dstate,model_n.dstate)||!isequal(model.rpar,model_n.rpar)||!isequal(model.ipar,model_n.ipar)||!isequal(model.label,model_n.label); if (or(model.in1!=model_n.in1)||or(model.out!=model_n.out)) { @@ -130,7 +130,7 @@ needcompile=4; if ((model.nzcross!=model_n.nzcross)||(model.nmode!=model_n.nmode)) { needcompile=4; } -if (prod[size(model_n.sim)-1]>1) { +if (prod(size(model_n.sim))>1) { if (model_n.sim[2-1]>1000) { if (model.sim[1-1]!=model_n.sim[1-1]) { needcompile=4; @@ -145,7 +145,7 @@ if (or(eq.model!=eqn.model)||or(eq.inputs!=eqn.inputs)||or(eq.outputs!=eqn.outpu needcompile=4; } } -arg1[spath-1]=xxn; +arg1[spath-1]=this.xxn; newpar[size(newpar)+1-1]=path; y=max(y,needcompile); } |