Reviewers: Steven,

Message:
For obvious reasons, new RegExp() works only after the constructor has been
defined. PTAL.

Description:
Fix debug builds broken by r9399.


Please review this at http://codereview.chromium.org/7996002/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files:
  M src/regexp.js


Index: src/regexp.js
diff --git a/src/regexp.js b/src/regexp.js
index 6ccabb20801943b337b1e1d28b238bd31cda3642..9d36411a63109cd95c0d7b58b96f796059c10f13 100644
--- a/src/regexp.js
+++ b/src/regexp.js
@@ -408,9 +408,9 @@ var lastMatchInfoOverride = null;
 function SetUpRegExp() {
   %CheckIsBootstrapping();
   %FunctionSetInstanceClassName($RegExp, 'RegExp');
-  %FunctionSetPrototype($RegExp, new $RegExp());
   %SetProperty($RegExp.prototype, 'constructor', $RegExp, DONT_ENUM);
   %SetCode($RegExp, RegExpConstructor);
+  %FunctionSetPrototype($RegExp, new $RegExp());

   InstallFunctions($RegExp.prototype, DONT_ENUM, $Array(
     "exec", RegExpExec,


--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to