Author: [email protected]
Date: Wed Jul 15 01:24:12 2009
New Revision: 2463

Added:
    branches/1.2/test/mjsunit/regexp-call-as-function.js
       - copied unchanged from r2451,  
/branches/bleeding_edge/test/mjsunit/regexp-call-as-function.js
Modified:
    branches/1.2/src/arm/stub-cache-arm.cc
    branches/1.2/src/execution.cc
    branches/1.2/src/flag-definitions.h
    branches/1.2/src/version.cc
    branches/1.2/test/mozilla/mozilla.status

Log:
Merge r2451 and r2453 to branches/1.2.
Review URL: http://codereview.chromium.org/155559

Modified: branches/1.2/src/arm/stub-cache-arm.cc
==============================================================================
--- branches/1.2/src/arm/stub-cache-arm.cc      (original)
+++ branches/1.2/src/arm/stub-cache-arm.cc      Wed Jul 15 01:24:12 2009
@@ -1121,8 +1121,6 @@
  }


-// TODO(1224671): IC stubs for keyed loads have not been implemented
-// for ARM.
  Object* KeyedLoadStubCompiler::CompileLoadField(String* name,
                                                  JSObject* receiver,
                                                  JSObject* holder,

Modified: branches/1.2/src/execution.cc
==============================================================================
--- branches/1.2/src/execution.cc       (original)
+++ branches/1.2/src/execution.cc       Wed Jul 15 01:24:12 2009
@@ -164,19 +164,16 @@
    // If you return a function from here, it will be called when an
    // attempt is made to call the given object as a function.

-  // The regular expression code here is really meant more as an
-  // example than anything else. KJS does not support calling regular
-  // expressions as functions, but SpiderMonkey does.
-  if (FLAG_call_regexp) {
-    bool is_regexp =
-        object->IsHeapObject() &&
-        (HeapObject::cast(*object)->map()->constructor() ==
-         *Top::regexp_function());
+  // Regular expressions can be called as functions in both Firefox
+  // and Safari so we allow it too.
+  bool is_regexp =
+      object->IsHeapObject() &&
+      (HeapObject::cast(*object)->map()->constructor() ==
+       *Top::regexp_function());

-    if (is_regexp) {
-      Handle<String> exec = Factory::exec_symbol();
-      return Handle<Object>(object->GetProperty(*exec));
-    }
+  if (is_regexp) {
+    Handle<String> exec = Factory::exec_symbol();
+    return Handle<Object>(object->GetProperty(*exec));
    }

    // Objects created through the API can have an instance-call handler

Modified: branches/1.2/src/flag-definitions.h
==============================================================================
--- branches/1.2/src/flag-definitions.h (original)
+++ branches/1.2/src/flag-definitions.h Wed Jul 15 01:24:12 2009
@@ -144,9 +144,6 @@
              "automatically set the debug break flag when debugger commands  
are "
              "in the queue (experimental)")

-// execution.cc
-DEFINE_bool(call_regexp, false, "allow calls to RegExp objects")
-
  // frames.cc
  DEFINE_int(max_stack_trace_source_length, 300,
             "maximum length of function source code printed in a stack  
trace.")

Modified: branches/1.2/src/version.cc
==============================================================================
--- branches/1.2/src/version.cc (original)
+++ branches/1.2/src/version.cc Wed Jul 15 01:24:12 2009
@@ -35,7 +35,7 @@
  #define MAJOR_VERSION     1
  #define MINOR_VERSION     2
  #define BUILD_NUMBER      14
-#define PATCH_LEVEL       0
+#define PATCH_LEVEL       1
  #define CANDIDATE_VERSION false

  // Define SONAME to have the SCons build the put a specific SONAME into the

Modified: branches/1.2/test/mozilla/mozilla.status
==============================================================================
--- branches/1.2/test/mozilla/mozilla.status    (original)
+++ branches/1.2/test/mozilla/mozilla.status    Wed Jul 15 01:24:12 2009
@@ -321,10 +321,6 @@
  js1_5/Regress/regress-172699: FAIL_OK


-# Calls regexp objects with function call syntax; non-ECMA behavior.
-js1_2/Objects/toString-001: FAIL_OK
-
-
  # Assumes that the prototype of a function is enumerable. Non-ECMA,
  # see section 15.3.3.1, page 86.
  ecma/GlobalObject/15.1.2.2-1: FAIL_OK
@@ -338,6 +334,7 @@
  # Tests that rely on specific details of function decompilation or
  # print strings for errors. Non-ECMA behavior.
  js1_2/function/tostring-2: FAIL_OK
+js1_2/Objects/toString-001: FAIL_OK
  js1_5/Exceptions/regress-332472: FAIL_OK
  js1_5/Regress/regress-173067: FAIL_OK
  js1_5/Regress/regress-355556: FAIL_OK
@@ -561,22 +558,10 @@
  ecma_3/Function/regress-137181: FAIL


-# Calls regexp objects with function call syntax; non-ECMA behavior.
-ecma_2/RegExp/regress-001: FAIL
-js1_2/regexp/regress-6359: FAIL
-js1_2/regexp/regress-9141: FAIL
-js1_5/Regress/regress-224956: FAIL
-js1_5/Regress/regress-325925: FAIL
-js1_2/regexp/simple_form: FAIL
-
-
  # Tests that rely on specific details of function decompilation or
  # print strings for errors. Non-ECMA behavior.
  js1_4/Regress/function-003: FAIL

-
-# Relies on JavaScript 1.2 / 1.3 deprecated features.
-js1_2/function/regexparg-1: FAIL

  # 'export' and 'import' are not keywords in V8.
  ecma_2/Exceptions/lexical-010: FAIL

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

Reply via email to