Open
Bug 723959
Opened 12 years ago
Updated 4 months ago
ES6: Tail-call optimization in IonMonkey
Categories
(Core :: JavaScript Engine, enhancement, P3)
Core
JavaScript Engine
Tracking
()
NEW
People
(Reporter: dmandelin, Unassigned)
References
(Blocks 1 open bug, )
Details
(Whiteboard: [js:p3])
TCO is one of the ES6 proposals, and the proposal requires calls in "proper tail position" to get TCO'd. There is a benchmark here: http://jsperf.com/tco#chart=bar
Comment 1•12 years ago
|
||
Hi, in here is a discussion about how TCO makes possible to use constant stack space, so is important in the view of memory consumption. http://www.mega-nerd.com/erikd/Blog/CodeHacking/fp-tail-js.html
Comment 2•11 years ago
|
||
I have seen often extracts that look like the following: foo(); return; Do these count as "proper tail position"?
Comment 3•11 years ago
|
||
(In reply to David Rajchenbach Teller [:Yoric] from comment #2) > I have seen often extracts that look like the following: > > foo(); > return; > > Do these count as "proper tail position"? No, that's not a proper tail position, because it wouldn't be ok to just return whatever `foo()` returns. That extract must always return `undefined`.
Updated•10 years ago
|
Assignee | ||
Updated•10 years ago
|
Assignee: general → nobody
Updated•9 years ago
|
Summary: Harmony: Tail-call optimization in IonMonkey → ES6: Tail-call optimization in IonMonkey
Comment 5•9 years ago
|
||
WebKit is apparently the first widely used ES engine that supports proper tail call elimination: https://www.webkit.org/blog/4054/es6-in-webkit/
https://bugs.chromium.org/p/v8/issues/detail?id=4698 Chrome also is done.
Comment 7•8 years ago
|
||
More details on Webkit: https://webkit.org/blog/6240/ecmascript-6-proper-tail-calls-in-webkit/
Updated•2 years ago
|
Severity: normal → S3
Comment hidden (spam) |
You need to log in
before you can comment on or make changes to this bug.
Description
•