Changeset 27410
- Timestamp:
- 12/25/08 22:43:59 (4 years ago)
- Location:
- lang/javascript/hsp-on-js
- Files:
-
- 3 modified
-
branches/int-immediate/src/compiler.js (modified) (2 diffs)
-
branches/int-immediate/src/evaluator.js (modified) (1 diff)
-
trunk/src/compiler.js (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lang/javascript/hsp-on-js/branches/int-immediate/src/compiler.js
r27396 r27410 486 486 でも、変数として受け取ることがないパラメータの場合、それは無駄である。 487 487 このパラメータを true にすれば値そのものを積む命令を生成する。 488 489 戻り値: パラメータが単一の変数であり、 490 変数を積む命令を生成したとき true 、そうでないとき false 488 491 */ 489 492 compileParameter: function compileParameter(sequence, notReceiveVar) { … … 521 524 break; 522 525 case Token.Type.STRUCT: 523 usedPushVar = this.compileStruct(sequence, notReceiveVar || !this.isOnlyVar(this.tokensPos, headPos)); 526 var onlyVar = this.isOnlyVar(this.tokensPos, headPos); 527 var result = this.compileStruct(sequence, notReceiveVar || !onlyVar); 528 if(onlyVar) usedPushVar = result; 524 529 break; 525 530 case Token.Type.LABEL: -
lang/javascript/hsp-on-js/branches/int-immediate/src/evaluator.js
r27396 r27410 765 765 push('if(frame.userDefFunc && frame.userDefFunc.isCType) {'); 766 766 if(usedPushVar) { 767 // なんか単一の変数でない式なのに true になっていることがあるっぽいので後で調べる 768 push(' stack[stack.length - 1] = toValue(stack[stack.length - 1]);'); 767 push(' stack[stack.length - 1] = stack[stack.length - 1].toValue();'); 769 768 } 770 769 push('} else {'); indent ++ -
lang/javascript/hsp-on-js/trunk/src/compiler.js
r27213 r27410 487 487 でも、変数として受け取ることがないパラメータの場合、それは無駄である。 488 488 このパラメータを true にすれば値そのものを積む命令を生成する。 489 490 戻り値: パラメータが単一の変数であり、 491 変数を積む命令を生成したとき true 、そうでないとき false 489 492 */ 490 493 compileParameter: function compileParameter(sequence, notReceiveVar) { … … 522 525 break; 523 526 case Token.Type.STRUCT: 524 usedPushVar = this.compileStruct(sequence, notReceiveVar || !this.isOnlyVar(this.tokensPos, headPos)); 527 var onlyVar = this.isOnlyVar(this.tokensPos, headPos); 528 var result = this.compileStruct(sequence, notReceiveVar || !onlyVar); 529 if(onlyVar) usedPushVar = result; 525 530 break; 526 531 case Token.Type.LABEL:
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)