Skip to content

Commit

Permalink
Merge pull request #12 from simon300000/patch-TCO
Browse files Browse the repository at this point in the history
fix TCO, add return value
  • Loading branch information
ruanyf committed Jul 16, 2019
2 parents 81e171a + 57c6610 commit 327a79e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion es-checker.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ var api = {
objectProto: { passes: "'use strict'; var a = { b: 2 }, c = { __proto__: a }; if (c.b !== 2) throw 0;" },
objectSuper: { passes: "'use strict'; var a = { b: 2 }, c = { d() { return super.b; } }; Object.setPrototypeOf(c,a); if (c.d() !== 2) throw 0;" },
extendNatives: { dependencies: ["class"], passes: "'use strict'; class Foo extends Array { }; var a = new Foo(); a.push(1,2,3); if (a.length !== 3) throw 0;" },
TCO: { passes: "'use strict'; +function a(b){ if (b<6E4) a(b+1); }(0);" },
TCO: { passes: "'use strict'; +function a(b){ if (b<6E4) return a(b+1); }(0);" },
functionNameInference: { passes: "'use strict'; var a = { b: function(){} }; if (a.b.name != 'b') throw 0;" },
ObjectStatics: { is: "'use strict'; return ('getOwnPropertySymbols' in Object) && ('assign' in Object) && ('is' in Object);" },
ArrayStatics: { is: "'use strict'; return ('from' in Array) && ('of' in Array);" },
Expand Down
2 changes: 1 addition & 1 deletion lib/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ var api = {
objectProto: { passes: "'use strict'; var a = { b: 2 }, c = { __proto__: a }; if (c.b !== 2) throw 0;" },
objectSuper: { passes: "'use strict'; var a = { b: 2 }, c = { d() { return super.b; } }; Object.setPrototypeOf(c,a); if (c.d() !== 2) throw 0;" },
extendNatives: { dependencies: ["class"], passes: "'use strict'; class Foo extends Array { }; var a = new Foo(); a.push(1,2,3); if (a.length !== 3) throw 0;" },
TCO: { passes: "'use strict'; +function a(b){ if (b<6E4) a(b+1); }(0);" },
TCO: { passes: "'use strict'; +function a(b){ if (b<6E4) return a(b+1); }(0);" },
functionNameInference: { passes: "'use strict'; var a = { b: function(){} }; if (a.b.name != 'b') throw 0;" },
ObjectStatics: { is: "'use strict'; return ('getOwnPropertySymbols' in Object) && ('assign' in Object) && ('is' in Object);" },
ArrayStatics: { is: "'use strict'; return ('from' in Array) && ('of' in Array);" },
Expand Down
2 changes: 1 addition & 1 deletion public/es-checker.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ var api = {
objectProto: { passes: "'use strict'; var a = { b: 2 }, c = { __proto__: a }; if (c.b !== 2) throw 0;" },
objectSuper: { passes: "'use strict'; var a = { b: 2 }, c = { d() { return super.b; } }; Object.setPrototypeOf(c,a); if (c.d() !== 2) throw 0;" },
extendNatives: { dependencies: ["class"], passes: "'use strict'; class Foo extends Array { }; var a = new Foo(); a.push(1,2,3); if (a.length !== 3) throw 0;" },
TCO: { passes: "'use strict'; +function a(b){ if (b<6E4) a(b+1); }(0);" },
TCO: { passes: "'use strict'; +function a(b){ if (b<6E4) return a(b+1); }(0);" },
functionNameInference: { passes: "'use strict'; var a = { b: function(){} }; if (a.b.name != 'b') throw 0;" },
ObjectStatics: { is: "'use strict'; return ('getOwnPropertySymbols' in Object) && ('assign' in Object) && ('is' in Object);" },
ArrayStatics: { is: "'use strict'; return ('from' in Array) && ('of' in Array);" },
Expand Down

0 comments on commit 327a79e

Please sign in to comment.