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.
32 lines
1.1 KiB
32 lines
1.1 KiB
--- !ditz.rubyforge.org,2008-03-06/issue
|
|
title: check String.prototype.replace() RegExp semantics
|
|
desc: |-
|
|
The current interpretation is that RegExp matching is done in the same
|
|
process as replacer function calls, which exposes lastIndex to the
|
|
replacer and even allows the replacer to interfere with the matching
|
|
process.
|
|
|
|
The E5.1 requirements can also be read to indicate that all matches are
|
|
first found into some internal temporary value, and the replacement step
|
|
happens only after all matches have been found -- i.e. the RegExp matching
|
|
process is complete and lastIndex has been written to zero by the last
|
|
non-matching exec() call. V8 seems to follow these semantics, but they
|
|
may be more expensive to implement (larger code footprint of an already
|
|
large function).
|
|
|
|
See: testcases/test-bi-string-proto-replace.js.
|
|
type: :task
|
|
component: duk
|
|
release:
|
|
reporter: sva <sami.vaarala@iki.fi>
|
|
status: :unstarted
|
|
disposition:
|
|
creation_time: 2013-03-13 20:42:16.761586 Z
|
|
references: []
|
|
|
|
id: 560dd28a08cb739fb4541c806b0c64104b9f9d6b
|
|
log_events:
|
|
- - 2013-03-13 20:42:17.006318 Z
|
|
- sva <sami.vaarala@iki.fi>
|
|
- created
|
|
- ""
|
|
|