mirror of https://github.com/svaarala/duktape.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
53 lines
1.4 KiB
53 lines
1.4 KiB
--- !ditz.rubyforge.org,2008-03-06/issue
|
|
title: add a directive to prevent tail calls to a function
|
|
desc: |-
|
|
Some functions are sensitive to tail calls, and it would be useful to
|
|
reject tail calls for them. For instance, any function using Duktape.act()
|
|
to introspect the call stack is potentially affected by being called
|
|
through a tail call.
|
|
|
|
Add a directive to refuse tailcalls for an Ecmascript function, e.g.::
|
|
|
|
function foo() {
|
|
'use duk notailcall';
|
|
}
|
|
|
|
Or perhaps shorter::
|
|
|
|
function foo() {
|
|
'use duk notail';
|
|
}
|
|
|
|
Current practice seems to be to prefix directives with "use ", without
|
|
that convention one could use::
|
|
|
|
function foo() {
|
|
'duk notail';
|
|
}
|
|
|
|
Other than the "use " prefix (used also by asm.js) there doesn't seem to
|
|
be a best practice for custom directive naming. For instance:
|
|
|
|
http://wiki.ecmascript.org/doku.php?id=harmony:pragmas
|
|
|
|
indicates this as an open issue for Harmony pragmas and suggests something
|
|
like "use moz widgets".
|
|
type: :task
|
|
component: duk
|
|
release: v0.11
|
|
reporter: Sami Vaarala <sami.vaarala@iki.fi>
|
|
status: :closed
|
|
disposition: :fixed
|
|
creation_time: 2014-06-09 08:56:48.057459 Z
|
|
references: []
|
|
|
|
id: 814f4d860f890951f528005abc2039a37fe59d1c
|
|
log_events:
|
|
- - 2014-06-09 08:56:48.521379 Z
|
|
- Sami Vaarala <sami.vaarala@iki.fi>
|
|
- created
|
|
- ""
|
|
- - 2014-06-09 10:13:52.240206 Z
|
|
- Sami Vaarala <sami.vaarala@iki.fi>
|
|
- closed with disposition fixed
|
|
- ""
|
|
|