Changeset 4947 for lang/javascript
- Timestamp:
- 01/19/08 15:14:57 (5 years ago)
- Files:
-
- 1 modified
-
lang/javascript/jsruby/trunk/src/smachine.js (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lang/javascript/jsruby/trunk/src/smachine.js
r4946 r4947 36 36 37 37 RubyEngine.RubyObject.Numeric.methods.upto = function(self, args, block) { 38 console.log("self:", self.toSource());39 console.log("args:", args.toSource());40 console.dir(block);41 38 if (!block) return null; 42 39 var b = new RubyEngine.SMachine.BlockIterator(block, function(b){ … … 167 164 this.writeStdout("\n"); 168 165 } 169 } ,166 } 170 167 } 171 168 … … 177 174 this.compile(node); 178 175 this.loop(); 179 console.dir(this.stack);180 176 181 177 //var ret; … … 187 183 compile: function(x) { 188 184 if (Array.prototype.isPrototypeOf(x)) { 189 this.command.push( new RubyEngine.SMachine.Iterator(x) ); 185 if (x.length==1) { 186 this.command.push( this.compile(x[0]) ); 187 } else { 188 this.command.push( new RubyEngine.SMachine.Iterator(x) ); 189 } 190 190 } else if (RubyEngine.Node.Expression.prototype.isPrototypeOf(x)) { 191 191 var list = x.list;
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)