Changeset 25739
- Timestamp:
- 12/03/08 11:23:47 (4 years ago)
- Location:
- lang/javascript/hsp-on-js/trunk/src
- Files:
-
- 2 modified
-
evaluator.js (modified) (2 diffs)
-
struct-array.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
lang/javascript/hsp-on-js/trunk/src/evaluator.js
r25644 r25739 177 177 } 178 178 } else { 179 // 比較演算は必ず int 型の値が返ってくることに依存 179 180 push('var variable = '+variableExpr+';'); 180 181 if(indicesCount == 0) { 181 push('if(variable.value.getType() != arg.getType()) variable.reset(arg.getType());');182 push('if(variable.value.getType() != '+VarType.INT+') variable.reset('+VarType.INT+');'); 182 183 push('variable.value.assign(0, variable.value.at(0).'+operateMethodNames[calcCode]+'(arg));'); 183 184 } else if(indicesCount == 1) { 184 185 push('var offset = self.scanArg(stack.pop(), "i").toIntValue()._value;'); 185 push('if(variable.value.getType() != arg.getType()) {');186 push('if(variable.value.getType() != '+VarType.INT+') {'); 186 187 push(' if(offset == 0) {'); 187 push(' variable.reset( arg.getType());');188 push(' variable.reset('+VarType.INT+');'); 188 189 push(' } else {'); 189 190 push(' throw new HSPError(ErrorCode.INVALID_ARRAYSTORE);'); 190 191 push(' }'); 191 192 push('}'); 193 push('variable.value.expand1D(offset);'); 192 194 push('variable.value.assign(offset, variable.value.at(offset).'+operateMethodNames[calcCode]+'(arg));'); 193 195 } else { … … 197 199 push('array.expand(indices);'); 198 200 push('var offset = array.getOffset(indices);'); 199 push('if(array.getType() != arg.getType()) {');201 push('if(array.getType() != '+VarType.INT+') {'); 200 202 push(' if(offset == 0) {'); 201 push(' variable.reset( arg.getType());');203 push(' variable.reset('+VarType.INT+');'); 202 204 push(' array = variable.value;'); 203 205 push(' array.expand(indices);'); -
lang/javascript/hsp-on-js/trunk/src/struct-array.js
r24973 r25739 48 48 } 49 49 } 50 if(index == len) this.expand([len]);50 if(index == len) ++ this.l0; 51 51 this.searchFrom = index + 1; 52 52 var members = [];
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)