Author: [email protected]
Date: Wed Mar  4 04:22:05 2009
New Revision: 1417

Added:
    trunk/test/mjsunit/regress/regress-246.js
       - copied unchanged from r1412,  
/branches/bleeding_edge/test/mjsunit/regress/regress-246.js
    trunk/test/mjsunit/regress/regress-253.js
       - copied unchanged from r1416,  
/branches/bleeding_edge/test/mjsunit/regress/regress-253.js
Modified:
    trunk/src/api.cc
    trunk/src/parser.cc
    trunk/src/runtime.cc

Log:
Merge revisions 1412 and 1416 from bleeding_edge to trunk
forming V8 version 1.0.3.2. Fixes issue 253 and issue 246.
Review URL: http://codereview.chromium.org/39128

Modified: trunk/src/api.cc
==============================================================================
--- trunk/src/api.cc    (original)
+++ trunk/src/api.cc    Wed Mar  4 04:22:05 2009
@@ -2185,7 +2185,7 @@


  const char* v8::V8::GetVersion() {
-  return "1.0.3.1";
+  return "1.0.3.2";
  }



Modified: trunk/src/parser.cc
==============================================================================
--- trunk/src/parser.cc (original)
+++ trunk/src/parser.cc Wed Mar  4 04:22:05 2009
@@ -3607,7 +3607,7 @@
      next_pos_(0),
      in_(in),
      error_(error),
-    simple_(true),
+    simple_(false),
      contains_anchor_(false),
      captures_(NULL),
      is_scanned_for_captures_(false),
@@ -3677,6 +3677,11 @@
    if (has_more()) {
      ReportError(CStrVector("Unmatched ')'") CHECK_FAILED);
    }
+  // If the result of parsing is a literal string atom, and it has the
+  // same length as the input, then the atom is identical to the input.
+  if (result->IsAtom() && result->AsAtom()->length() == in()->length()) {
+    simple_ = true;
+  }
    return result;
  }

@@ -3876,7 +3881,6 @@
          Advance(2);
          break;
        }
-      simple_ = false;
        break;
      case '{': {
        int dummy;
@@ -3933,7 +3937,6 @@
        is_greedy = false;
        Advance();
      }
-    simple_ = false;  // Adding quantifier might *remove* look-ahead.
      builder.AddQuantifierToAtom(min, max, is_greedy);
    }
  }

Modified: trunk/src/runtime.cc
==============================================================================
--- trunk/src/runtime.cc        (original)
+++ trunk/src/runtime.cc        Wed Mar  4 04:22:05 2009
@@ -2164,16 +2164,22 @@

  static Object* Runtime_ToFastProperties(Arguments args) {
    ASSERT(args.length() == 1);
-  CONVERT_ARG_CHECKED(JSObject, object, 0);
-  object->TransformToFastProperties(0);
+  Handle<Object> object = args.at<Object>(0);
+  if (object->IsJSObject()) {
+    Handle<JSObject> js_object = Handle<JSObject>::cast(object);
+    js_object->TransformToFastProperties(0);
+  }
    return *object;
  }


  static Object* Runtime_ToSlowProperties(Arguments args) {
    ASSERT(args.length() == 1);
-  CONVERT_ARG_CHECKED(JSObject, object, 0);
-  object->NormalizeProperties(CLEAR_INOBJECT_PROPERTIES);
+  Handle<Object> object = args.at<Object>(0);
+  if (object->IsJSObject()) {
+    Handle<JSObject> js_object = Handle<JSObject>::cast(object);
+    js_object->NormalizeProperties(CLEAR_INOBJECT_PROPERTIES);
+  }
    return *object;
  }


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

Reply via email to