| Index: src/js/regexp.js
|
| diff --git a/src/js/regexp.js b/src/js/regexp.js
|
| index 3c0dddedbc523f8d32d0614ddc99012a4b68b218..b5574877ec3a19f16dd1fdbd5efbe9762e05b99f 100644
|
| --- a/src/js/regexp.js
|
| +++ b/src/js/regexp.js
|
| @@ -72,36 +72,6 @@ function RegExpInitialize(object, pattern, flags) {
|
| }
|
|
|
|
|
| -function PatternFlags(pattern) {
|
| - return (REGEXP_GLOBAL(pattern) ? 'g' : '') +
|
| - (REGEXP_IGNORE_CASE(pattern) ? 'i' : '') +
|
| - (REGEXP_MULTILINE(pattern) ? 'm' : '') +
|
| - (REGEXP_UNICODE(pattern) ? 'u' : '') +
|
| - (REGEXP_STICKY(pattern) ? 'y' : '');
|
| -}
|
| -
|
| -
|
| -// ES#sec-regexp.prototype.compile RegExp.prototype.compile (pattern, flags)
|
| -function RegExpCompileJS(pattern, flags) {
|
| - if (!IS_REGEXP(this)) {
|
| - throw %make_type_error(kIncompatibleMethodReceiver,
|
| - "RegExp.prototype.compile", this);
|
| - }
|
| -
|
| - if (IS_REGEXP(pattern)) {
|
| - if (!IS_UNDEFINED(flags)) throw %make_type_error(kRegExpFlags);
|
| -
|
| - flags = PatternFlags(pattern);
|
| - pattern = REGEXP_SOURCE(pattern);
|
| - }
|
| -
|
| - RegExpInitialize(this, pattern, flags);
|
| -
|
| - // Return undefined for compatibility with JSC.
|
| - // See http://crbug.com/585775 for web compat details.
|
| -}
|
| -
|
| -
|
| function DoRegExpExec(regexp, string, index) {
|
| return %_RegExpExec(regexp, string, index, RegExpLastMatchInfo);
|
| }
|
| @@ -166,18 +136,6 @@ function RegExpSubclassTest(string) {
|
| %FunctionRemovePrototype(RegExpSubclassTest);
|
|
|
|
|
| -function RegExpToString() {
|
| - if (!IS_RECEIVER(this)) {
|
| - throw %make_type_error(
|
| - kIncompatibleMethodReceiver, 'RegExp.prototype.toString', this);
|
| - }
|
| - if (this === GlobalRegExpPrototype) {
|
| - %IncrementUseCounter(kRegExpPrototypeToString);
|
| - }
|
| - return '/' + TO_STRING(this.source) + '/' + TO_STRING(this.flags);
|
| -}
|
| -
|
| -
|
| function AtSurrogatePair(subject, index) {
|
| if (index + 1 >= subject.length) return false;
|
| var first = %_StringCharCodeAt(subject, index);
|
| @@ -781,8 +739,6 @@ function RegExpSubclassSearch(string) {
|
|
|
| utils.InstallFunctions(GlobalRegExp.prototype, DONT_ENUM, [
|
| "test", RegExpSubclassTest,
|
| - "toString", RegExpToString,
|
| - "compile", RegExpCompileJS,
|
| matchSymbol, RegExpSubclassMatch,
|
| replaceSymbol, RegExpSubclassReplace,
|
| searchSymbol, RegExpSubclassSearch,
|
|
|