Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(138)

Unified Diff: src/regexp.js

Issue 9415010: Make built-ins strict mode conforming, and support a --use-strict flag. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed Yang's comments. Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/proxy.js ('k') | src/runtime.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/regexp.js
diff --git a/src/regexp.js b/src/regexp.js
index 00dd7f15b77ecb682a5747fbb5ebfe2b4c0593a7..4f2eb62c7279523793a9eecea54d739f8e454b25 100644
--- a/src/regexp.js
+++ b/src/regexp.js
@@ -28,7 +28,7 @@
// Expect $Object = global.Object;
// Expect $Array = global.Array;
-const $RegExp = global.RegExp;
+var $RegExp = global.RegExp;
// A recursive descent parser for Patterns according to the grammar of
// ECMA-262 15.10.1, with deviations noted below.
@@ -413,13 +413,13 @@ function SetUpRegExp() {
// The properties input, $input, and $_ are aliases for each other. When this
// value is set the value it is set to is coerced to a string.
// Getter and setter for the input.
- function RegExpGetInput() {
+ var RegExpGetInput = function() {
var regExpInput = LAST_INPUT(lastMatchInfo);
return IS_UNDEFINED(regExpInput) ? "" : regExpInput;
- }
- function RegExpSetInput(string) {
+ };
+ var RegExpSetInput = function(string) {
LAST_INPUT(lastMatchInfo) = ToString(string);
- }
+ };
%DefineAccessor($RegExp, 'input', GETTER, RegExpGetInput, DONT_DELETE);
%DefineAccessor($RegExp, 'input', SETTER, RegExpSetInput, DONT_DELETE);
@@ -441,8 +441,8 @@ function SetUpRegExp() {
// Getter and setter for multiline.
var multiline = false;
- function RegExpGetMultiline() { return multiline; }
- function RegExpSetMultiline(flag) { multiline = flag ? true : false; }
+ var RegExpGetMultiline = function() { return multiline; };
+ var RegExpSetMultiline = function(flag) { multiline = flag ? true : false; };
%DefineAccessor($RegExp, 'multiline', GETTER, RegExpGetMultiline,
DONT_DELETE);
@@ -454,7 +454,7 @@ function SetUpRegExp() {
DONT_ENUM | DONT_DELETE);
- function NoOpSetter(ignored) {}
+ var NoOpSetter = function(ignored) {};
// Static properties set by a successful match.
« no previous file with comments | « src/proxy.js ('k') | src/runtime.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698