[Laszlo-dev] UPDATE: For Review: Change 20080823-bargull-ZMZ Summary: add RegExp support to swf8

André Bargull andre.bargull at udo.edu
Wed Aug 27 09:17:39 PDT 2008


Change 20080823-bargull-ZMZ by bargull at dell--p4--2-53 on 2008-08-23 21:13:55
in /home/Admin/src/svn/openlaszlo/trunk
for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: add RegExp support to swf8

New Features: LPP-1584, LPP-6546

Bugs Fixed:

Technical Reviewer: max
QA Reviewer: rbitter
Doc Reviewer: (pending)

Documentation:

Release Notes:

Details:
Adds support for RegExp to swf8 by using Flash's ExternalInterface to 
proxy regular expressions to the browser.
Also defines "String.prototype.match", "String.prototype.replace" and 
"String.prototype.search".
Internally a simple cache is used to reuse compiled RegExps on the 
browser-part (LzCache).
Some extra work was necessary to workaround ExternalInterface bugs, this 
is documented in "LzRegExp.lzs".

UPDATES:
- LzCache: changed type from "Object" to "*" for swf9
- LzCache: fixed braino in LzCache#clear()
- LzCache: moved class from lfc/helpers to lfc/core, because it is 
needed in the kernel/swf8, but lfc/helpers is included after the 
kernel-files
- RegExp: changed "is RegExp" to "instanceof RegExp" for a small 
performance improvement (cf. LPP-6692)
- RegExp: added indexOf-test for a small performance improvement

Tests:
buildlfc swf8 + cd lps/includes/source; ant clean build
test/regexp.lzx

Files:
A WEB-INF/lps/lfc/core/LzCache.lzs
M WEB-INF/lps/lfc/core/Library.lzs
A WEB-INF/lps/lfc/kernel/swf/LzRegExp.lzs
M WEB-INF/lps/lfc/kernel/swf/Library.lzs
M WEB-INF/lps/lfc/helpers/Library.lzs
A lps/includes/source/regexp.js
M lps/includes/source/embed-library.lzs
A test/regexp.lzx

Changeset: 
http://svn.openlaszlo.org/openlaszlo/patches/20080823-bargull-ZMZ.tar




More information about the Laszlo-dev mailing list