Merge from v8 at revision 3723
diff --git a/src/regexp-macro-assembler.cc b/src/regexp-macro-assembler.cc
index 3685fcd..0fcfc33 100644
--- a/src/regexp-macro-assembler.cc
+++ b/src/regexp-macro-assembler.cc
@@ -122,7 +122,10 @@
 
   bool is_ascii = subject->IsAsciiRepresentation();
 
+  // The string has been flattened, so it it is a cons string it contains the
+  // full string in the first part.
   if (StringShape(subject_ptr).IsCons()) {
+    ASSERT_EQ(0, ConsString::cast(subject_ptr)->second()->length());
     subject_ptr = ConsString::cast(subject_ptr)->first();
   }
   // Ensure that an underlying string has the same ascii-ness.
@@ -141,8 +144,7 @@
                        start_offset,
                        input_start,
                        input_end,
-                       offsets_vector,
-                       previous_index == 0);
+                       offsets_vector);
   return res;
 }
 
@@ -153,14 +155,11 @@
     int start_offset,
     const byte* input_start,
     const byte* input_end,
-    int* output,
-    bool at_start) {
+    int* output) {
   typedef int (*matcher)(String*, int, const byte*,
-                         const byte*, int*, int, Address, int);
+                         const byte*, int*, Address, int);
   matcher matcher_func = FUNCTION_CAST<matcher>(code->entry());
 
-  int at_start_val = at_start ? 1 : 0;
-
   // Ensure that the minimum stack has been allocated.
   RegExpStack stack;
   Address stack_base = RegExpStack::stack_base();
@@ -172,7 +171,6 @@
                                           input_start,
                                           input_end,
                                           output,
-                                          at_start_val,
                                           stack_base,
                                           direct_call);
   ASSERT(result <= SUCCESS);