Bug 18728 - SQUIRRELFISH: invalid regular expression constants should throw exceptions
Summary: SQUIRRELFISH: invalid regular expression constants should throw exceptions
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks: 18624
  Show dependency treegraph
 
Reported: 2008-04-24 21:18 PDT by Cameron Zwarich (cpst)
Modified: 2008-04-25 01:33 PDT (History)
0 users

See Also:


Attachments
Proposed patch (2.06 KB, patch)
2008-04-24 21:29 PDT, Cameron Zwarich (cpst)
mjs: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Cameron Zwarich (cpst) 2008-04-24 21:18:34 PDT
Currently, SquirrelFish doesn't throw exceptions for invalid regular expression constants. The exception gets created, but there is no VM_CHECK_EXCEPTION() in the body of op_new_regexp, so it gets ignored. However, we should really just create the code to throw the exception at compile time. This affects the JavaScriptCore regression test ecma_3/RegExp/regress-188206.js.
Comment 1 Cameron Zwarich (cpst) 2008-04-24 21:29:39 PDT
Created attachment 20807 [details]
Proposed patch

This patch fixes the test and is a 0.7% progression on SunSpider, because of the better code path in op_new_regexp.
Comment 2 Maciej Stachowiak 2008-04-24 21:49:06 PDT
Comment on attachment 20807 [details]
Proposed patch

r=me
Comment 3 Oliver Hunt 2008-04-25 01:33:08 PDT
Landed r32537