diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2010-03-29 01:04:53 -0700 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2010-03-29 01:04:53 -0700 |
commit | 40ea061c30a9f6be21a35239341a259847f8cac5 (patch) | |
tree | 39fe4dd570c86f55f4cee93f0ef7dbf944015a2a /deps/v8/src/regexp.js | |
parent | d1b78c3f5d948728dcee852a9c2bfd59f4e01fbd (diff) | |
download | node-40ea061c30a9f6be21a35239341a259847f8cac5.tar.gz |
Upgrade V8 to 2.2.0
Diffstat (limited to 'deps/v8/src/regexp.js')
-rw-r--r-- | deps/v8/src/regexp.js | 26 |
1 files changed, 2 insertions, 24 deletions
diff --git a/deps/v8/src/regexp.js b/deps/v8/src/regexp.js index dc1b0429f..cc9723c81 100644 --- a/deps/v8/src/regexp.js +++ b/deps/v8/src/regexp.js @@ -71,32 +71,10 @@ function DoConstructRegExp(object, pattern, flags, isConstructorCall) { } } - if (isConstructorCall) { - // ECMA-262, section 15.10.7.1. - %SetProperty(object, 'source', pattern, - DONT_DELETE | READ_ONLY | DONT_ENUM); - - // ECMA-262, section 15.10.7.2. - %SetProperty(object, 'global', global, DONT_DELETE | READ_ONLY | DONT_ENUM); - - // ECMA-262, section 15.10.7.3. - %SetProperty(object, 'ignoreCase', ignoreCase, - DONT_DELETE | READ_ONLY | DONT_ENUM); - - // ECMA-262, section 15.10.7.4. - %SetProperty(object, 'multiline', multiline, - DONT_DELETE | READ_ONLY | DONT_ENUM); - - // ECMA-262, section 15.10.7.5. - %SetProperty(object, 'lastIndex', 0, DONT_DELETE | DONT_ENUM); - } else { // RegExp is being recompiled via RegExp.prototype.compile. - %IgnoreAttributesAndSetProperty(object, 'source', pattern); - %IgnoreAttributesAndSetProperty(object, 'global', global); - %IgnoreAttributesAndSetProperty(object, 'ignoreCase', ignoreCase); - %IgnoreAttributesAndSetProperty(object, 'multiline', multiline); - %IgnoreAttributesAndSetProperty(object, 'lastIndex', 0); + if (!isConstructorCall) { regExpCache.type = 'none'; } + %RegExpInitializeObject(object, pattern, global, ignoreCase, multiline); // Call internal function to compile the pattern. %RegExpCompile(object, pattern, flags); |