projects
/
platform
/
upstream
/
js.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Imported Upstream version 1.0.0
[platform/upstream/js.git]
/
js
/
src
/
jit-test
/
lib
/
range.js
1
// Library file for tests to load.
2
3
function Range(start, stop) {
4
this.i = start;
5
this.stop = stop;
6
}
7
Range.prototype = {
8
__iterator__: function() this,
9
next: function() {
10
if (this.i >= this.stop)
11
throw StopIteration;
12
return this.i++;
13
}
14
};
15
16
function range(start, stop) {
17
return new Range(start, stop);
18
}