removed dependency on v8 in favor of bin/cs

This commit is contained in:
Jeremy Ashkenas
2009-12-24 22:08:32 -08:00
parent 2f35bba083
commit 6865f5be92
9 changed files with 3 additions and 127 deletions

View File

@@ -1,21 +0,0 @@
(function(){
var nums;
var a = [1, 2, 3];
var d = [];
for (var b=0, c=a.length; b<c; b++) {
var n = a[b];
if (n % 2 !== 0) {
nums = d.push(n * n);
}
}
nums = d;
var result;
var e = nums;
var h = [];
for (var f=0, g=e.length; f<g; f++) {
n = e[f];
h[f] = n * 2;
}
result = h;
print(result.join(',') === '2,18');
})();

View File

@@ -1,9 +0,0 @@
(function(){
var result;
try {
result = nonexistent * missing;
} catch (error) {
result = true;
}
print(result);
})();

View File

@@ -1,27 +0,0 @@
(function(){
var Base = function() {
};
Base.prototype.func = function(string) {
return 'zero/' + string;
};
var FirstChild = function() {
};
FirstChild.prototype.__proto__ = new Base();
FirstChild.prototype.func = function(string) {
return FirstChild.prototype.__proto__.func.call(this, 'one/') + string;
};
var SecondChild = function() {
};
SecondChild.prototype.__proto__ = new FirstChild();
SecondChild.prototype.func = function(string) {
return SecondChild.prototype.__proto__.func.call(this, 'two/') + string;
};
var ThirdChild = function() {
};
ThirdChild.prototype.__proto__ = new SecondChild();
ThirdChild.prototype.func = function(string) {
return ThirdChild.prototype.__proto__.func.call(this, 'three/') + string;
};
var result = (new ThirdChild()).func('four');
print(result === 'zero/one/two/three/four');
})();

View File

@@ -1,6 +0,0 @@
(function(){
var a = b = d = true;
var c = false;
var result = a ? b ? c ? false : d ? true : null : null : null;
print(result);
})();

View File

@@ -1,10 +0,0 @@
(function(){
var a = 5;
var atype = typeof a;
var b = "hello";
var btype = typeof b;
var Klass = function() {
};
var k = new Klass();
print(atype === 'number' && btype === 'string' && k instanceof Klass);
})();

View File

@@ -16,7 +16,7 @@ func: =>
else
c.text + '---'.
c.list: let for let in c.text.split('') if let is '-'.
c.list: l for l in c.text.split('') if l is '-'.
c.single: c.list[1, 1][0].

View File

@@ -1,29 +0,0 @@
(function(){
var func = function() {
var a = 3;
var b = [];
while (a >= 0) {
b.push('o');
a--;
}
var c = {
"text": b
};
if (!(42 > 41)) {
c = 'error';
}
c.text = false ? 'error' : c.text + '---';
var d = c.text.split('');
var g = [];
for (var e=0, f=d.length; e<f; e++) {
var let = d[e];
if (let === '-') {
c.list = g.push(let);
}
}
c.list = g;
c.single = c.list.slice(1, 1 + 1)[0];
return c.single;
};
print(func() === '-');
})();

View File

@@ -1,16 +0,0 @@
(function(){
var num = 10;
var result;
if (num === 5) {
result = false;
} else if (num === 'a') {
result = false;
} else if (num === 10) {
result = true;
} else if (num === 11) {
result = false;
} else {
result = false;
}
print(result);
})();