Version 1.3.5

Optimize initialization of some arrays in the builtins.

Fix mac-nm script to support filenames with spaces.

Support for using the V8 profiler when V8 is embedded in a Windows DLL.

Changed typeof RegExp from 'object' to 'function' for compatibility. Fixed bug where regexps were not callable across contexts.

Added context independent script compilation to the API.

Added API call to get the stack trace for an exception.

Added API for getting object mirrors.

Make sure that SSE3 instructions are used whenever possible even when running off a snapshot generated without using SSE3 instructions.

Tweaked the handling of the initial size and growth policy of the heap.

Added native code generation for RegExp to 64-bit version.

Added JavaScript debugger support to 64-bit version.



git-svn-id: http://v8.googlecode.com/svn/trunk@2722 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
diff --git a/test/cctest/cctest.status b/test/cctest/cctest.status
index 9abe408..68aabb5 100644
--- a/test/cctest/cctest.status
+++ b/test/cctest/cctest.status
@@ -60,61 +60,3 @@
 # the JavaScript stacks are separate.
 test-api/ExceptionOrder: FAIL
 test-api/TryCatchInTryFinally: FAIL
-
-
-[ $arch == x64 ]
-test-decls/Present: CRASH || FAIL
-test-decls/Unknown: CRASH || FAIL
-test-decls/Appearing: CRASH || FAIL
-test-decls/Absent: CRASH || FAIL
-test-debug/DebugStub: CRASH || FAIL
-test-decls/AbsentInPrototype: CRASH || FAIL
-test-decls/Reappearing: CRASH || FAIL
-test-debug/DebugInfo: CRASH || FAIL
-test-decls/ExistsInPrototype: CRASH || FAIL
-test-debug/BreakPointICStore: CRASH || FAIL
-test-debug/BreakPointICLoad: CRASH || FAIL
-test-debug/BreakPointICCall: CRASH || FAIL
-test-debug/BreakPointReturn: CRASH || FAIL
-test-debug/GCDuringBreakPointProcessing: CRASH || FAIL
-test-debug/BreakPointSurviveGC: CRASH || FAIL
-test-debug/BreakPointThroughJavaScript: CRASH || FAIL
-test-debug/ScriptBreakPointByNameThroughJavaScript: CRASH || FAIL
-test-debug/ScriptBreakPointByIdThroughJavaScript: CRASH || FAIL
-test-debug/EnableDisableScriptBreakPoint: CRASH || FAIL
-test-debug/ConditionalScriptBreakPoint: CRASH || FAIL
-test-debug/ScriptBreakPointIgnoreCount: CRASH || FAIL
-test-debug/ScriptBreakPointReload: CRASH || FAIL
-test-debug/ScriptBreakPointMultiple: CRASH || FAIL
-test-debug/RemoveBreakPointInBreak: CRASH || FAIL
-test-debug/DebugEvaluate: CRASH || FAIL
-test-debug/ScriptBreakPointLine: CRASH || FAIL
-test-debug/ScriptBreakPointLineOffset: CRASH || FAIL
-test-debug/DebugStepLinear: CRASH || FAIL
-test-debug/DebugStepKeyedLoadLoop: CRASH || FAIL
-test-debug/DebugStepKeyedStoreLoop: CRASH || FAIL
-test-debug/DebugStepLinearMixedICs: CRASH || FAIL
-test-debug/DebugStepFor: CRASH || FAIL
-test-debug/DebugStepIf: CRASH || FAIL
-test-debug/DebugStepSwitch: CRASH || FAIL
-test-debug/StepInOutSimple: CRASH || FAIL
-test-debug/StepInOutBranch: CRASH || FAIL
-test-debug/StepInOutTree: CRASH || FAIL
-test-debug/DebugStepNatives: CRASH || FAIL
-test-debug/DebugStepFunctionApply: CRASH || FAIL
-test-debug/DebugStepFunctionCall: CRASH || FAIL
-test-debug/StepWithException: CRASH || FAIL
-test-debug/DebugBreak: CRASH || FAIL
-test-debug/DisableBreak: CRASH || FAIL
-test-debug/MessageQueues: CRASH || FAIL
-test-debug/CallFunctionInDebugger: SKIP
-test-debug/RecursiveBreakpoints: CRASH || FAIL
-test-debug/DebuggerUnload: CRASH || FAIL
-test-debug/DebuggerHostDispatch: CRASH || FAIL
-test-debug/DebugBreakInMessageHandler: CRASH || FAIL
-test-debug/NoDebugBreakInAfterCompileMessageHandler: CRASH || FAIL
-test-api/Threading: CRASH || FAIL
-test-api/Threading2: PASS || TIMEOUT
-test-api/TryCatchSourceInfo: CRASH || FAIL
-test-api/RegExpInterruption: PASS || TIMEOUT
-test-api/RegExpStringModification: PASS || TIMEOUT
diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc
index 35ac031..e1caba3 100644
--- a/test/cctest/test-api.cc
+++ b/test/cctest/test-api.cc
@@ -7738,3 +7738,31 @@
 
   free(pixel_data);
 }
+
+THREADED_TEST(ScriptContextDependence) {
+  v8::HandleScope scope;
+  LocalContext c1;
+  const char *source = "foo";
+  v8::Handle<v8::Script> dep = v8::Script::Compile(v8::String::New(source));
+  v8::Handle<v8::Script> indep = v8::Script::New(v8::String::New(source));
+  c1->Global()->Set(v8::String::New("foo"), v8::Integer::New(100));
+  CHECK_EQ(dep->Run()->Int32Value(), 100);
+  CHECK_EQ(indep->Run()->Int32Value(), 100);
+  LocalContext c2;
+  c2->Global()->Set(v8::String::New("foo"), v8::Integer::New(101));
+  CHECK_EQ(dep->Run()->Int32Value(), 100);
+  CHECK_EQ(indep->Run()->Int32Value(), 101);
+}
+
+THREADED_TEST(StackTrace) {
+  v8::HandleScope scope;
+  LocalContext context;
+  v8::TryCatch try_catch;
+  const char *source = "function foo() { FAIL.FAIL; }; foo();";
+  v8::Handle<v8::String> src = v8::String::New(source);
+  v8::Handle<v8::String> origin = v8::String::New("stack-trace-test");
+  v8::Script::New(src, origin)->Run();
+  CHECK(try_catch.HasCaught());
+  v8::String::Utf8Value stack(try_catch.StackTrace());
+  CHECK(strstr(*stack, "at foo (stack-trace-test") != NULL);
+}
diff --git a/test/cctest/test-debug.cc b/test/cctest/test-debug.cc
index 9e2c38d..f5e4f3a 100644
--- a/test/cctest/test-debug.cc
+++ b/test/cctest/test-debug.cc
@@ -487,9 +487,7 @@
     CHECK_EQ(debug_break,
         Code::GetCodeFromTargetAddress(it1.it()->rinfo()->target_address()));
   } else {
-    // TODO(1240753): Make the test architecture independent or split
-    // parts of the debugger into architecture dependent files.
-    CHECK_EQ(0xE8, *(it1.rinfo()->pc()));
+    CHECK(Debug::IsDebugBreakAtReturn(it1.it()->rinfo()));
   }
 
   // Clear the break point and check that the debug break function is no longer
@@ -501,9 +499,7 @@
   it2.FindBreakLocationFromPosition(position);
   CHECK_EQ(mode, it2.it()->rinfo()->rmode());
   if (mode == v8::internal::RelocInfo::JS_RETURN) {
-    // TODO(1240753): Make the test architecture independent or split
-    // parts of the debugger into architecture dependent files.
-    CHECK_NE(0xE8, *(it2.rinfo()->pc()));
+    CHECK(!Debug::IsDebugBreakAtReturn(it2.it()->rinfo()));
   }
 }
 
@@ -5357,3 +5353,20 @@
   v8::Debug::SetMessageHandler2(NULL);
   CheckDebuggerUnloaded();
 }
+
+
+TEST(GetMirror) {
+  v8::HandleScope scope;
+  DebugLocalContext env;
+  v8::Handle<v8::Value> obj = v8::Debug::GetMirror(v8::String::New("hodja"));
+  v8::Handle<v8::Function> run_test = v8::Handle<v8::Function>::Cast(
+      v8::Script::New(
+          v8::String::New(
+              "function runTest(mirror) {"
+              "  return mirror.isString() && (mirror.length() == 5);"
+              "}"
+              ""
+              "runTest;"))->Run());
+  v8::Handle<v8::Value> result = run_test->Call(env->Global(), 1, &obj);
+  CHECK(result->IsTrue());
+}
diff --git a/test/cctest/test-decls.cc b/test/cctest/test-decls.cc
index 6c48f64..f083027 100644
--- a/test/cctest/test-decls.cc
+++ b/test/cctest/test-decls.cc
@@ -111,7 +111,7 @@
   if (is_initialized_) return;
   HandleScope scope;
   Local<FunctionTemplate> function = FunctionTemplate::New();
-  Local<Value> data = Integer::New(reinterpret_cast<intptr_t>(this));
+  Local<Value> data = External::New(this);
   GetHolder(function)->SetNamedPropertyHandler(&HandleGet,
                                                &HandleSet,
                                                &HandleHas,
@@ -179,8 +179,7 @@
 
 
 DeclarationContext* DeclarationContext::GetInstance(const AccessorInfo& info) {
-  Local<Value> data = info.Data();
-  return reinterpret_cast<DeclarationContext*>(Int32::Cast(*data)->Value());
+  return static_cast<DeclarationContext*>(External::Unwrap(info.Data()));
 }
 
 
diff --git a/test/cctest/test-heap.cc b/test/cctest/test-heap.cc
index 6b5907c..37dbdd7 100644
--- a/test/cctest/test-heap.cc
+++ b/test/cctest/test-heap.cc
@@ -44,35 +44,26 @@
 
 static void CheckOddball(Object* obj, const char* string) {
   CHECK(obj->IsOddball());
-#ifndef V8_HOST_ARCH_64_BIT
-// TODO(X64): Reenable when native builtins work.
   bool exc;
   Object* print_string = *Execution::ToString(Handle<Object>(obj), &exc);
   CHECK(String::cast(print_string)->IsEqualTo(CStrVector(string)));
-#endif  // V8_HOST_ARCH_64_BIT
 }
 
 
 static void CheckSmi(int value, const char* string) {
-#ifndef V8_HOST_ARCH_64_BIT
-// TODO(X64): Reenable when native builtins work.
   bool exc;
   Object* print_string =
       *Execution::ToString(Handle<Object>(Smi::FromInt(value)), &exc);
   CHECK(String::cast(print_string)->IsEqualTo(CStrVector(string)));
-#endif  // V8_HOST_ARCH_64_BIT
 }
 
 
 static void CheckNumber(double value, const char* string) {
   Object* obj = Heap::NumberFromDouble(value);
   CHECK(obj->IsNumber());
-#ifndef V8_HOST_ARCH_64_BIT
-// TODO(X64): Reenable when native builtins work.
   bool exc;
   Object* print_string = *Execution::ToString(Handle<Object>(obj), &exc);
   CHECK(String::cast(print_string)->IsEqualTo(CStrVector(string)));
-#endif  // V8_HOST_ARCH_64_BIT
 }
 
 
@@ -492,8 +483,11 @@
 static void CheckSymbols(const char** strings) {
   for (const char* string = *strings; *strings != 0; string = *strings++) {
     Object* a = Heap::LookupAsciiSymbol(string);
+    // LookupAsciiSymbol may return a failure if a GC is needed.
+    if (a->IsFailure()) continue;
     CHECK(a->IsSymbol());
     Object* b = Heap::LookupAsciiSymbol(string);
+    if (b->IsFailure()) continue;
     CHECK_EQ(b, a);
     CHECK(String::cast(b)->IsEqualTo(CStrVector(string)));
   }
diff --git a/test/cctest/test-regexp.cc b/test/cctest/test-regexp.cc
index 8d8326c..89c7868 100644
--- a/test/cctest/test-regexp.cc
+++ b/test/cctest/test-regexp.cc
@@ -38,18 +38,21 @@
 #include "jsregexp.h"
 #include "regexp-macro-assembler.h"
 #include "regexp-macro-assembler-irregexp.h"
+#ifdef V8_NATIVE_REGEXP
 #ifdef V8_TARGET_ARCH_ARM
 #include "arm/regexp-macro-assembler-arm.h"
 #endif
 #ifdef V8_TARGET_ARCH_X64
-// No X64-implementation yet.
+#include "x64/macro-assembler-x64.h"
+#include "x64/regexp-macro-assembler-x64.h"
 #endif
 #ifdef V8_TARGET_ARCH_IA32
 #include "ia32/macro-assembler-ia32.h"
 #include "ia32/regexp-macro-assembler-ia32.h"
 #endif
+#else
 #include "interpreter-irregexp.h"
-
+#endif
 
 using namespace v8::internal;
 
@@ -599,75 +602,20 @@
 
 // Tests of interpreter.
 
-TEST(MacroAssembler) {
-  V8::Initialize(NULL);
-  byte codes[1024];
-  RegExpMacroAssemblerIrregexp m(Vector<byte>(codes, 1024));
-  // ^f(o)o.
-  Label fail, fail2, start;
-  uc16 foo_chars[3];
-  foo_chars[0] = 'f';
-  foo_chars[1] = 'o';
-  foo_chars[2] = 'o';
-  Vector<const uc16> foo(foo_chars, 3);
-  m.SetRegister(4, 42);
-  m.PushRegister(4, RegExpMacroAssembler::kNoStackLimitCheck);
-  m.AdvanceRegister(4, 42);
-  m.GoTo(&start);
-  m.Fail();
-  m.Bind(&start);
-  m.PushBacktrack(&fail2);
-  m.CheckCharacters(foo, 0, &fail, true);
-  m.WriteCurrentPositionToRegister(0, 0);
-  m.PushCurrentPosition();
-  m.AdvanceCurrentPosition(3);
-  m.WriteCurrentPositionToRegister(1, 0);
-  m.PopCurrentPosition();
-  m.AdvanceCurrentPosition(1);
-  m.WriteCurrentPositionToRegister(2, 0);
-  m.AdvanceCurrentPosition(1);
-  m.WriteCurrentPositionToRegister(3, 0);
-  m.Succeed();
 
-  m.Bind(&fail);
-  m.Backtrack();
-  m.Succeed();
-
-  m.Bind(&fail2);
-  m.PopRegister(0);
-  m.Fail();
-
-  v8::HandleScope scope;
-
-  Handle<String> source = Factory::NewStringFromAscii(CStrVector("^f(o)o"));
-  Handle<ByteArray> array = Handle<ByteArray>::cast(m.GetCode(source));
-  int captures[5];
-
-  const uc16 str1[] = {'f', 'o', 'o', 'b', 'a', 'r'};
-  Handle<String> f1_16 =
-      Factory::NewStringFromTwoByte(Vector<const uc16>(str1, 6));
-
-  CHECK(IrregexpInterpreter::Match(array, f1_16, captures, 0));
-  CHECK_EQ(0, captures[0]);
-  CHECK_EQ(3, captures[1]);
-  CHECK_EQ(1, captures[2]);
-  CHECK_EQ(2, captures[3]);
-  CHECK_EQ(84, captures[4]);
-
-  const uc16 str2[] = {'b', 'a', 'r', 'f', 'o', 'o'};
-  Handle<String> f2_16 =
-      Factory::NewStringFromTwoByte(Vector<const uc16>(str2, 6));
-
-  CHECK(!IrregexpInterpreter::Match(array, f2_16, captures, 0));
-  CHECK_EQ(42, captures[0]);
-}
-
-#ifdef V8_TARGET_ARCH_IA32  // IA32 Native Regexp only tests.
 #ifdef V8_NATIVE_REGEXP
 
+#ifdef V8_TARGET_ARCH_IA32
+typedef RegExpMacroAssemblerIA32 ArchRegExpMacroAssembler;
+#endif
+#ifdef V8_TARGET_ARCH_X64
+typedef RegExpMacroAssemblerX64 ArchRegExpMacroAssembler;
+#endif
+
 class ContextInitializer {
  public:
-  ContextInitializer() : env_(), scope_(), stack_guard_() {
+  ContextInitializer()
+      : env_(), scope_(), zone_(DELETE_ON_EXIT), stack_guard_() {
     env_ = v8::Context::New();
     env_->Enter();
   }
@@ -678,18 +626,19 @@
  private:
   v8::Persistent<v8::Context> env_;
   v8::HandleScope scope_;
+  v8::internal::ZoneScope zone_;
   v8::internal::StackGuard stack_guard_;
 };
 
 
-static RegExpMacroAssemblerIA32::Result ExecuteIA32(Code* code,
-                                                    String* input,
-                                                    int start_offset,
-                                                    const byte* input_start,
-                                                    const byte* input_end,
-                                                    int* captures,
-                                                    bool at_start) {
-  return RegExpMacroAssemblerIA32::Execute(
+static ArchRegExpMacroAssembler::Result Execute(Code* code,
+                                                String* input,
+                                                int start_offset,
+                                                const byte* input_start,
+                                                const byte* input_end,
+                                                int* captures,
+                                                bool at_start) {
+  return NativeRegExpMacroAssembler::Execute(
       code,
       input,
       start_offset,
@@ -700,11 +649,11 @@
 }
 
 
-TEST(MacroAssemblerIA32Success) {
+TEST(MacroAssemblerNativeSuccess) {
   v8::V8::Initialize();
   ContextInitializer initializer;
 
-  RegExpMacroAssemblerIA32 m(RegExpMacroAssemblerIA32::ASCII, 4);
+  ArchRegExpMacroAssembler m(NativeRegExpMacroAssembler::ASCII, 4);
 
   m.Succeed();
 
@@ -718,16 +667,16 @@
   const byte* start_adr =
       reinterpret_cast<const byte*>(seq_input->GetCharsAddress());
 
-  RegExpMacroAssemblerIA32::Result result =
-      ExecuteIA32(*code,
-                  *input,
-                  0,
-                  start_adr,
-                  start_adr + seq_input->length(),
-                  captures,
-                  true);
+  NativeRegExpMacroAssembler::Result result =
+      Execute(*code,
+              *input,
+              0,
+              start_adr,
+              start_adr + seq_input->length(),
+              captures,
+              true);
 
-  CHECK_EQ(RegExpMacroAssemblerIA32::SUCCESS, result);
+  CHECK_EQ(NativeRegExpMacroAssembler::SUCCESS, result);
   CHECK_EQ(-1, captures[0]);
   CHECK_EQ(-1, captures[1]);
   CHECK_EQ(-1, captures[2]);
@@ -735,11 +684,11 @@
 }
 
 
-TEST(MacroAssemblerIA32Simple) {
+TEST(MacroAssemblerNativeSimple) {
   v8::V8::Initialize();
   ContextInitializer initializer;
 
-  RegExpMacroAssemblerIA32 m(RegExpMacroAssemblerIA32::ASCII, 4);
+  ArchRegExpMacroAssembler m(NativeRegExpMacroAssembler::ASCII, 4);
 
   uc16 foo_chars[3] = {'f', 'o', 'o'};
   Vector<const uc16> foo(foo_chars, 3);
@@ -762,16 +711,16 @@
   Handle<SeqAsciiString> seq_input = Handle<SeqAsciiString>::cast(input);
   Address start_adr = seq_input->GetCharsAddress();
 
-  RegExpMacroAssemblerIA32::Result result =
-      ExecuteIA32(*code,
-                  *input,
-                  0,
-                  start_adr,
-                  start_adr + input->length(),
-                  captures,
-                  true);
+  NativeRegExpMacroAssembler::Result result =
+      Execute(*code,
+              *input,
+              0,
+              start_adr,
+              start_adr + input->length(),
+              captures,
+              true);
 
-  CHECK_EQ(RegExpMacroAssemblerIA32::SUCCESS, result);
+  CHECK_EQ(NativeRegExpMacroAssembler::SUCCESS, result);
   CHECK_EQ(0, captures[0]);
   CHECK_EQ(3, captures[1]);
   CHECK_EQ(-1, captures[2]);
@@ -781,23 +730,23 @@
   seq_input = Handle<SeqAsciiString>::cast(input);
   start_adr = seq_input->GetCharsAddress();
 
-  result = ExecuteIA32(*code,
-                       *input,
-                       0,
-                       start_adr,
-                       start_adr + input->length(),
-                       captures,
-                       true);
+  result = Execute(*code,
+                   *input,
+                   0,
+                   start_adr,
+                   start_adr + input->length(),
+                   captures,
+                   true);
 
-  CHECK_EQ(RegExpMacroAssemblerIA32::FAILURE, result);
+  CHECK_EQ(NativeRegExpMacroAssembler::FAILURE, result);
 }
 
 
-TEST(MacroAssemblerIA32SimpleUC16) {
+TEST(MacroAssemblerNativeSimpleUC16) {
   v8::V8::Initialize();
   ContextInitializer initializer;
 
-  RegExpMacroAssemblerIA32 m(RegExpMacroAssemblerIA32::UC16, 4);
+  ArchRegExpMacroAssembler m(NativeRegExpMacroAssembler::UC16, 4);
 
   uc16 foo_chars[3] = {'f', 'o', 'o'};
   Vector<const uc16> foo(foo_chars, 3);
@@ -822,16 +771,16 @@
   Handle<SeqTwoByteString> seq_input = Handle<SeqTwoByteString>::cast(input);
   Address start_adr = seq_input->GetCharsAddress();
 
-  RegExpMacroAssemblerIA32::Result result =
-      ExecuteIA32(*code,
-                  *input,
-                  0,
-                  start_adr,
-                  start_adr + input->length(),
-                  captures,
-                  true);
+  NativeRegExpMacroAssembler::Result result =
+      Execute(*code,
+              *input,
+              0,
+              start_adr,
+              start_adr + input->length(),
+              captures,
+              true);
 
-  CHECK_EQ(RegExpMacroAssemblerIA32::SUCCESS, result);
+  CHECK_EQ(NativeRegExpMacroAssembler::SUCCESS, result);
   CHECK_EQ(0, captures[0]);
   CHECK_EQ(3, captures[1]);
   CHECK_EQ(-1, captures[2]);
@@ -842,23 +791,23 @@
   seq_input = Handle<SeqTwoByteString>::cast(input);
   start_adr = seq_input->GetCharsAddress();
 
-  result = ExecuteIA32(*code,
-                       *input,
-                       0,
-                       start_adr,
-                       start_adr + input->length() * 2,
-                       captures,
-                       true);
+  result = Execute(*code,
+                   *input,
+                   0,
+                   start_adr,
+                   start_adr + input->length() * 2,
+                   captures,
+                   true);
 
-  CHECK_EQ(RegExpMacroAssemblerIA32::FAILURE, result);
+  CHECK_EQ(NativeRegExpMacroAssembler::FAILURE, result);
 }
 
 
-TEST(MacroAssemblerIA32Backtrack) {
+TEST(MacroAssemblerNativeBacktrack) {
   v8::V8::Initialize();
   ContextInitializer initializer;
 
-  RegExpMacroAssemblerIA32 m(RegExpMacroAssemblerIA32::ASCII, 0);
+  ArchRegExpMacroAssembler m(NativeRegExpMacroAssembler::ASCII, 0);
 
   Label fail;
   Label backtrack;
@@ -879,24 +828,24 @@
   Handle<SeqAsciiString> seq_input = Handle<SeqAsciiString>::cast(input);
   Address start_adr = seq_input->GetCharsAddress();
 
-  RegExpMacroAssemblerIA32::Result result =
-      ExecuteIA32(*code,
-                  *input,
-                  0,
-                  start_adr,
-                  start_adr + input->length(),
-                  NULL,
-                  true);
+  NativeRegExpMacroAssembler::Result result =
+      Execute(*code,
+              *input,
+              0,
+              start_adr,
+              start_adr + input->length(),
+              NULL,
+              true);
 
-  CHECK_EQ(RegExpMacroAssemblerIA32::FAILURE, result);
+  CHECK_EQ(NativeRegExpMacroAssembler::FAILURE, result);
 }
 
 
-TEST(MacroAssemblerIA32BackReferenceASCII) {
+TEST(MacroAssemblerNativeBackReferenceASCII) {
   v8::V8::Initialize();
   ContextInitializer initializer;
 
-  RegExpMacroAssemblerIA32 m(RegExpMacroAssemblerIA32::ASCII, 3);
+  ArchRegExpMacroAssembler m(NativeRegExpMacroAssembler::ASCII, 3);
 
   m.WriteCurrentPositionToRegister(0, 0);
   m.AdvanceCurrentPosition(2);
@@ -922,27 +871,27 @@
   Address start_adr = seq_input->GetCharsAddress();
 
   int output[3];
-  RegExpMacroAssemblerIA32::Result result =
-      ExecuteIA32(*code,
-                  *input,
-                  0,
-                  start_adr,
-                  start_adr + input->length(),
-                  output,
-                  true);
+  NativeRegExpMacroAssembler::Result result =
+      Execute(*code,
+              *input,
+              0,
+              start_adr,
+              start_adr + input->length(),
+              output,
+              true);
 
-  CHECK_EQ(RegExpMacroAssemblerIA32::SUCCESS, result);
+  CHECK_EQ(NativeRegExpMacroAssembler::SUCCESS, result);
   CHECK_EQ(0, output[0]);
   CHECK_EQ(2, output[1]);
   CHECK_EQ(6, output[2]);
 }
 
 
-TEST(MacroAssemblerIA32BackReferenceUC16) {
+TEST(MacroAssemblerNativeBackReferenceUC16) {
   v8::V8::Initialize();
   ContextInitializer initializer;
 
-  RegExpMacroAssemblerIA32 m(RegExpMacroAssemblerIA32::UC16, 3);
+  ArchRegExpMacroAssembler m(NativeRegExpMacroAssembler::UC16, 3);
 
   m.WriteCurrentPositionToRegister(0, 0);
   m.AdvanceCurrentPosition(2);
@@ -970,8 +919,8 @@
   Address start_adr = seq_input->GetCharsAddress();
 
   int output[3];
-  RegExpMacroAssemblerIA32::Result result =
-      ExecuteIA32(*code,
+  NativeRegExpMacroAssembler::Result result =
+      Execute(*code,
                   *input,
                   0,
                   start_adr,
@@ -979,7 +928,7 @@
                   output,
                   true);
 
-  CHECK_EQ(RegExpMacroAssemblerIA32::SUCCESS, result);
+  CHECK_EQ(NativeRegExpMacroAssembler::SUCCESS, result);
   CHECK_EQ(0, output[0]);
   CHECK_EQ(2, output[1]);
   CHECK_EQ(6, output[2]);
@@ -987,11 +936,11 @@
 
 
 
-TEST(MacroAssemblerIA32AtStart) {
+TEST(MacroAssemblernativeAtStart) {
   v8::V8::Initialize();
   ContextInitializer initializer;
 
-  RegExpMacroAssemblerIA32 m(RegExpMacroAssemblerIA32::ASCII, 0);
+  ArchRegExpMacroAssembler m(NativeRegExpMacroAssembler::ASCII, 0);
 
   Label not_at_start, newline, fail;
   m.CheckNotAtStart(&not_at_start);
@@ -1022,34 +971,34 @@
   Handle<SeqAsciiString> seq_input = Handle<SeqAsciiString>::cast(input);
   Address start_adr = seq_input->GetCharsAddress();
 
-  RegExpMacroAssemblerIA32::Result result =
-      ExecuteIA32(*code,
-                  *input,
-                  0,
-                  start_adr,
-                  start_adr + input->length(),
-                  NULL,
-                  true);
+  NativeRegExpMacroAssembler::Result result =
+      Execute(*code,
+              *input,
+              0,
+              start_adr,
+              start_adr + input->length(),
+              NULL,
+              true);
 
-  CHECK_EQ(RegExpMacroAssemblerIA32::SUCCESS, result);
+  CHECK_EQ(NativeRegExpMacroAssembler::SUCCESS, result);
 
-  result = ExecuteIA32(*code,
-                       *input,
-                       3,
-                       start_adr + 3,
-                       start_adr + input->length(),
-                       NULL,
-                       false);
+  result = Execute(*code,
+                   *input,
+                   3,
+                   start_adr + 3,
+                   start_adr + input->length(),
+                   NULL,
+                   false);
 
-  CHECK_EQ(RegExpMacroAssemblerIA32::SUCCESS, result);
+  CHECK_EQ(NativeRegExpMacroAssembler::SUCCESS, result);
 }
 
 
-TEST(MacroAssemblerIA32BackRefNoCase) {
+TEST(MacroAssemblerNativeBackRefNoCase) {
   v8::V8::Initialize();
   ContextInitializer initializer;
 
-  RegExpMacroAssemblerIA32 m(RegExpMacroAssemblerIA32::ASCII, 4);
+  ArchRegExpMacroAssembler m(NativeRegExpMacroAssembler::ASCII, 4);
 
   Label fail, succ;
 
@@ -1084,16 +1033,16 @@
   Address start_adr = seq_input->GetCharsAddress();
 
   int output[4];
-  RegExpMacroAssemblerIA32::Result result =
-      ExecuteIA32(*code,
-                  *input,
-                  0,
-                  start_adr,
-                  start_adr + input->length(),
-                  output,
-                  true);
+  NativeRegExpMacroAssembler::Result result =
+      Execute(*code,
+              *input,
+              0,
+              start_adr,
+              start_adr + input->length(),
+              output,
+              true);
 
-  CHECK_EQ(RegExpMacroAssemblerIA32::SUCCESS, result);
+  CHECK_EQ(NativeRegExpMacroAssembler::SUCCESS, result);
   CHECK_EQ(0, output[0]);
   CHECK_EQ(12, output[1]);
   CHECK_EQ(0, output[2]);
@@ -1102,11 +1051,11 @@
 
 
 
-TEST(MacroAssemblerIA32Registers) {
+TEST(MacroAssemblerNativeRegisters) {
   v8::V8::Initialize();
   ContextInitializer initializer;
 
-  RegExpMacroAssemblerIA32 m(RegExpMacroAssemblerIA32::ASCII, 5);
+  ArchRegExpMacroAssembler m(NativeRegExpMacroAssembler::ASCII, 5);
 
   uc16 foo_chars[3] = {'f', 'o', 'o'};
   Vector<const uc16> foo(foo_chars, 3);
@@ -1184,8 +1133,8 @@
   Address start_adr = seq_input->GetCharsAddress();
 
   int output[5];
-  RegExpMacroAssemblerIA32::Result result =
-      ExecuteIA32(*code,
+  NativeRegExpMacroAssembler::Result result =
+      Execute(*code,
                   *input,
                   0,
                   start_adr,
@@ -1193,7 +1142,7 @@
                   output,
                   true);
 
-  CHECK_EQ(RegExpMacroAssemblerIA32::SUCCESS, result);
+  CHECK_EQ(NativeRegExpMacroAssembler::SUCCESS, result);
   CHECK_EQ(0, output[0]);
   CHECK_EQ(3, output[1]);
   CHECK_EQ(6, output[2]);
@@ -1202,11 +1151,11 @@
 }
 
 
-TEST(MacroAssemblerIA32StackOverflow) {
+TEST(MacroAssemblerStackOverflow) {
   v8::V8::Initialize();
   ContextInitializer initializer;
 
-  RegExpMacroAssemblerIA32 m(RegExpMacroAssemblerIA32::ASCII, 0);
+  ArchRegExpMacroAssembler m(NativeRegExpMacroAssembler::ASCII, 0);
 
   Label loop;
   m.Bind(&loop);
@@ -1224,26 +1173,26 @@
   Handle<SeqAsciiString> seq_input = Handle<SeqAsciiString>::cast(input);
   Address start_adr = seq_input->GetCharsAddress();
 
-  RegExpMacroAssemblerIA32::Result result =
-      ExecuteIA32(*code,
-                  *input,
-                  0,
-                  start_adr,
-                  start_adr + input->length(),
-                  NULL,
-                  true);
+  NativeRegExpMacroAssembler::Result result =
+      Execute(*code,
+              *input,
+              0,
+              start_adr,
+              start_adr + input->length(),
+              NULL,
+              true);
 
-  CHECK_EQ(RegExpMacroAssemblerIA32::EXCEPTION, result);
+  CHECK_EQ(NativeRegExpMacroAssembler::EXCEPTION, result);
   CHECK(Top::has_pending_exception());
   Top::clear_pending_exception();
 }
 
 
-TEST(MacroAssemblerIA32LotsOfRegisters) {
+TEST(MacroAssemblerNativeLotsOfRegisters) {
   v8::V8::Initialize();
   ContextInitializer initializer;
 
-  RegExpMacroAssemblerIA32 m(RegExpMacroAssemblerIA32::ASCII, 2);
+  ArchRegExpMacroAssembler m(NativeRegExpMacroAssembler::ASCII, 2);
 
   // At least 2048, to ensure the allocated space for registers
   // span one full page.
@@ -1270,24 +1219,88 @@
   Address start_adr = seq_input->GetCharsAddress();
 
   int captures[2];
-  RegExpMacroAssemblerIA32::Result result =
-      ExecuteIA32(*code,
-                  *input,
-                  0,
-                  start_adr,
-                  start_adr + input->length(),
-                  captures,
-                  true);
+  NativeRegExpMacroAssembler::Result result =
+      Execute(*code,
+              *input,
+              0,
+              start_adr,
+              start_adr + input->length(),
+              captures,
+              true);
 
-  CHECK_EQ(RegExpMacroAssemblerIA32::SUCCESS, result);
+  CHECK_EQ(NativeRegExpMacroAssembler::SUCCESS, result);
   CHECK_EQ(0, captures[0]);
   CHECK_EQ(42, captures[1]);
 
   Top::clear_pending_exception();
 }
 
-#endif  // V8_REGEXP_NATIVE
-#endif  // V8_TARGET_ARCH_IA32
+#else  // ! V8_REGEX_NATIVE
+
+TEST(MacroAssembler) {
+  V8::Initialize(NULL);
+  byte codes[1024];
+  RegExpMacroAssemblerIrregexp m(Vector<byte>(codes, 1024));
+  // ^f(o)o.
+  Label fail, fail2, start;
+  uc16 foo_chars[3];
+  foo_chars[0] = 'f';
+  foo_chars[1] = 'o';
+  foo_chars[2] = 'o';
+  Vector<const uc16> foo(foo_chars, 3);
+  m.SetRegister(4, 42);
+  m.PushRegister(4, RegExpMacroAssembler::kNoStackLimitCheck);
+  m.AdvanceRegister(4, 42);
+  m.GoTo(&start);
+  m.Fail();
+  m.Bind(&start);
+  m.PushBacktrack(&fail2);
+  m.CheckCharacters(foo, 0, &fail, true);
+  m.WriteCurrentPositionToRegister(0, 0);
+  m.PushCurrentPosition();
+  m.AdvanceCurrentPosition(3);
+  m.WriteCurrentPositionToRegister(1, 0);
+  m.PopCurrentPosition();
+  m.AdvanceCurrentPosition(1);
+  m.WriteCurrentPositionToRegister(2, 0);
+  m.AdvanceCurrentPosition(1);
+  m.WriteCurrentPositionToRegister(3, 0);
+  m.Succeed();
+
+  m.Bind(&fail);
+  m.Backtrack();
+  m.Succeed();
+
+  m.Bind(&fail2);
+  m.PopRegister(0);
+  m.Fail();
+
+  v8::HandleScope scope;
+
+  Handle<String> source = Factory::NewStringFromAscii(CStrVector("^f(o)o"));
+  Handle<ByteArray> array = Handle<ByteArray>::cast(m.GetCode(source));
+  int captures[5];
+
+  const uc16 str1[] = {'f', 'o', 'o', 'b', 'a', 'r'};
+  Handle<String> f1_16 =
+      Factory::NewStringFromTwoByte(Vector<const uc16>(str1, 6));
+
+  CHECK(IrregexpInterpreter::Match(array, f1_16, captures, 0));
+  CHECK_EQ(0, captures[0]);
+  CHECK_EQ(3, captures[1]);
+  CHECK_EQ(1, captures[2]);
+  CHECK_EQ(2, captures[3]);
+  CHECK_EQ(84, captures[4]);
+
+  const uc16 str2[] = {'b', 'a', 'r', 'f', 'o', 'o'};
+  Handle<String> f2_16 =
+      Factory::NewStringFromTwoByte(Vector<const uc16>(str2, 6));
+
+  CHECK(!IrregexpInterpreter::Match(array, f2_16, captures, 0));
+  CHECK_EQ(42, captures[0]);
+}
+
+#endif  // ! V8_REGEXP_NATIVE
 
 
 TEST(AddInverseToTable) {
diff --git a/test/message/message.status b/test/message/message.status
index 9afaa0f..fc2896b 100644
--- a/test/message/message.status
+++ b/test/message/message.status
@@ -29,16 +29,3 @@
 
 # All tests in the bug directory are expected to fail.
 bugs: FAIL
-
-[ $arch == x64 ]
-
-simple-throw: FAIL
-try-catch-finally-throw-in-catch-and-finally: FAIL
-try-catch-finally-throw-in-catch: FAIL
-try-catch-finally-throw-in-finally: FAIL
-try-finally-throw-in-finally: FAIL
-try-finally-throw-in-try-and-finally: FAIL
-try-finally-throw-in-try: FAIL
-overwritten-builtins: FAIL
-regress/regress-73: FAIL
-regress/regress-75: FAIL
diff --git a/test/mjsunit/div-mod.js b/test/mjsunit/div-mod.js
index 39fab27..a8a19b3 100644
--- a/test/mjsunit/div-mod.js
+++ b/test/mjsunit/div-mod.js
@@ -48,7 +48,7 @@
   divmod(div_func, mod_func, 0, divisor);
   divmod(div_func, mod_func, 1 / 0, divisor);
   // Floating point number test.
-  for (exp = -1024; exp <= 1024; exp += 4) {
+  for (exp = -1024; exp <= 1024; exp += 8) {
     divmod(div_func, mod_func, Math.pow(2, exp), divisor);
     divmod(div_func, mod_func, 0.9999999 * Math.pow(2, exp), divisor);
     divmod(div_func, mod_func, 1.0000001 * Math.pow(2, exp), divisor);
@@ -76,13 +76,7 @@
   8,
   9,
   10,
-  // These ones in the middle don't add much apart from slowness to the test.
   0x1000000,
-  0x2000000,
-  0x4000000,
-  0x8000000,
-  0x10000000,
-  0x20000000,
   0x40000000,
   12,
   60,
@@ -92,4 +86,3 @@
 for (var i = 0; i < divisors.length; i++) {
   run_tests_for(divisors[i]);
 }
-
diff --git a/test/mjsunit/mjsunit.js b/test/mjsunit/mjsunit.js
index 2c52a31..1fb3f02 100644
--- a/test/mjsunit/mjsunit.js
+++ b/test/mjsunit/mjsunit.js
@@ -179,9 +179,13 @@
 
 function assertDoesNotThrow(code) {
   try {
-    eval(code);
+    if (typeof code == 'function') {
+      code();
+    } else {
+      eval(code);
+    }
   } catch (e) {
-    assertTrue(false, "threw an exception");
+    assertTrue(false, "threw an exception: " + (e.message || e));
   }
 }
 
diff --git a/test/mjsunit/mjsunit.status b/test/mjsunit/mjsunit.status
index 6853cdc..4bf67e8 100644
--- a/test/mjsunit/mjsunit.status
+++ b/test/mjsunit/mjsunit.status
@@ -73,33 +73,3 @@
 
 # Times out often in release mode on ARM.
 array-splice: PASS || TIMEOUT
-
-[ $arch == x64 ]
-
-debug-backtrace: CRASH || FAIL
-debug-backtrace-text: CRASH || FAIL
-debug-multiple-breakpoints: CRASH || FAIL
-debug-breakpoints: CRASH || FAIL
-debug-changebreakpoint: CRASH || FAIL
-debug-clearbreakpoint: CRASH || FAIL
-debug-conditional-breakpoints: CRASH || FAIL
-debug-constructor: CRASH || FAIL
-debug-continue: CRASH || FAIL
-debug-enable-disable-breakpoints: CRASH || FAIL
-debug-evaluate-recursive: CRASH || FAIL
-debug-event-listener: CRASH || FAIL
-debug-evaluate: CRASH || FAIL
-debug-ignore-breakpoints: CRASH || FAIL
-debug-setbreakpoint: CRASH || FAIL
-debug-step-stub-callfunction: CRASH || FAIL
-debug-step: CRASH || FAIL
-debug-stepin-builtin: CRASH || FAIL
-debug-stepin-constructor: CRASH || FAIL
-debug-stepin-function-call: CRASH || FAIL
-debug-stepin-accessor: CRASH || FAIL
-fuzz-natives: PASS || TIMEOUT
-debug-handle: CRASH || FAIL
-debug-clearbreakpointgroup: CRASH || FAIL
-regress/regress-269: CRASH || FAIL
-regress/regress-998565: CRASH || FAIL
-tools/tickprocessor: PASS || CRASH || FAIL
diff --git a/test/mjsunit/simple-constructor.js b/test/mjsunit/simple-constructor.js
new file mode 100755
index 0000000..b26d651
--- /dev/null
+++ b/test/mjsunit/simple-constructor.js
@@ -0,0 +1,78 @@
+// Copyright 2008 the V8 project authors. All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above
+//       copyright notice, this list of conditions and the following
+//       disclaimer in the documentation and/or other materials provided
+//       with the distribution.
+//     * Neither the name of Google Inc. nor the names of its
+//       contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+function props(x) {
+  var array = [];
+  for (var p in x) array.push(p);
+  return array.sort();
+}
+
+function f1() {
+  this.x = 1;
+}
+
+function f2(x) {
+  this.x = x;
+}
+
+function f3(x) {
+  this.x = x;
+  this.y = 1;
+  this.z = f1;
+}
+
+function f4(x) {
+  this.x = x;
+  this.y = 1;
+  if (x == 1) return;
+  this.z = f1;
+}
+
+o1_1 = new f1();
+o1_2 = new f1();
+assertArrayEquals(["x"], props(o1_1));
+assertArrayEquals(["x"], props(o1_2));
+
+o2_1 = new f2(0);
+o2_2 = new f2(0);
+assertArrayEquals(["x"], props(o2_1));
+assertArrayEquals(["x"], props(o2_2));
+
+o3_1 = new f3(0);
+o3_2 = new f3(0);
+assertArrayEquals(["x", "y", "z"], props(o3_1));
+assertArrayEquals(["x", "y", "z"], props(o3_2));
+
+o4_0_1 = new f4(0);
+o4_0_2 = new f4(0);
+assertArrayEquals(["x", "y", "z"], props(o4_0_1));
+assertArrayEquals(["x", "y", "z"], props(o4_0_2));
+
+o4_1_1 = new f4(1);
+o4_1_2 = new f4(1);
+assertArrayEquals(["x", "y"], props(o4_1_1));
+assertArrayEquals(["x", "y"], props(o4_1_2));
diff --git a/test/mjsunit/stack-traces.js b/test/mjsunit/stack-traces.js
index 3bb5755..d7ece2c 100644
--- a/test/mjsunit/stack-traces.js
+++ b/test/mjsunit/stack-traces.js
@@ -103,22 +103,24 @@
 
 // Utility function for testing that the expected strings occur
 // in the stack trace produced when running the given function.
-function testTrace(fun, expected, unexpected) {
+function testTrace(name, fun, expected, unexpected) {
   var threw = false;
   try {
     fun();
   } catch (e) {
     for (var i = 0; i < expected.length; i++) {
-      assertTrue(e.stack.indexOf(expected[i]) != -1);
+      assertTrue(e.stack.indexOf(expected[i]) != -1,
+                 name + " doesn't contain expected[" + i + "]");
     }
     if (unexpected) {
       for (var i = 0; i < unexpected.length; i++) {
-        assertEquals(e.stack.indexOf(unexpected[i]), -1);
+        assertEquals(e.stack.indexOf(unexpected[i]), -1,
+                     name + " contains unexpected[" + i + "]");
       }
     }
     threw = true;
   }
-  assertTrue(threw);
+  assertTrue(threw, name + " didn't throw");
 }
 
 // Test that the error constructor is not shown in the trace
@@ -127,10 +129,11 @@
   try {
     FAIL;
   } catch (e) {
-    assertEquals(-1, e.stack.indexOf('at new ReferenceError'));
+    assertEquals(-1, e.stack.indexOf('at new ReferenceError'),
+                 "CallerCensorship contained new ReferenceError");
     threw = true;
   }
-  assertTrue(threw);
+  assertTrue(threw, "CallerCensorship didn't throw");
 }
 
 // Test that the explicit constructor call is shown in the trace
@@ -143,10 +146,11 @@
       }
     });
   } catch (e) {
-    assertTrue(e.stack.indexOf('at new ReferenceError') != -1);
+    assertTrue(e.stack.indexOf('at new ReferenceError') != -1,
+               "UnintendedCallerCensorship didn't contain new ReferenceError");
     threw = true;
   }
-  assertTrue(threw);
+  assertTrue(threw, "UnintendedCallerCensorship didn't throw");
 }
 
 // If an error occurs while the stack trace is being formatted it should
@@ -161,9 +165,10 @@
     n.foo();
   } catch (e) {
     threw = true;
-    assertTrue(e.stack.indexOf('<error: ReferenceError') != -1);
+    assertTrue(e.stack.indexOf('<error: ReferenceError') != -1,
+               "ErrorsDuringFormatting didn't contain error: ReferenceError");
   }
-  assertTrue(threw);
+  assertTrue(threw, "ErrorsDuringFormatting didn't throw");
   threw = false;
   // Now we can't even format the message saying that we couldn't format
   // the stack frame.  Put that in your pipe and smoke it!
@@ -172,26 +177,28 @@
     n.foo();
   } catch (e) {
     threw = true;
-    assertTrue(e.stack.indexOf('<error>') != -1);
+    assertTrue(e.stack.indexOf('<error>') != -1,
+               "ErrorsDuringFormatting didn't contain <error>");
   }
-  assertTrue(threw);
+  assertTrue(threw, "ErrorsDuringFormatting didnt' throw (2)");
 }
 
-testTrace(testArrayNative, ["Array.map (native)"]);
-testTrace(testNested, ["at one", "at two", "at three"]);
-testTrace(testMethodNameInference, ["at Foo.bar"]);
-testTrace(testImplicitConversion, ["at Nirk.valueOf"]);
-testTrace(testEval, ["at Doo (eval at testEval"]);
-testTrace(testNestedEval, ["eval at Inner (eval at Outer"]);
-testTrace(testValue, ["at Number.causeError"]);
-testTrace(testConstructor, ["new Plonk"]);
-testTrace(testRenamedMethod, ["Wookie.a$b$c$d [as d]"]);
-testTrace(testAnonymousMethod, ["Array.<anonymous>"]);
-testTrace(testDefaultCustomError, ["hep-hey", "new CustomError"],
-    ["collectStackTrace"]);
-testTrace(testStrippedCustomError, ["hep-hey"], ["new CustomError",
-    "collectStackTrace"]);
 
+testTrace("testArrayNative", testArrayNative, ["Array.map (native)"]);
+testTrace("testNested", testNested, ["at one", "at two", "at three"]);
+testTrace("testMethodNameInference", testMethodNameInference, ["at Foo.bar"]);
+testTrace("testImplicitConversion", testImplicitConversion, ["at Nirk.valueOf"]);
+testTrace("testEval", testEval, ["at Doo (eval at testEval"]);
+testTrace("testNestedEval", testNestedEval, ["eval at Inner (eval at Outer"]);
+testTrace("testValue", testValue, ["at Number.causeError"]);
+testTrace("testConstructor", testConstructor, ["new Plonk"]);
+testTrace("testRenamedMethod", testRenamedMethod, ["Wookie.a$b$c$d [as d]"]);
+testTrace("testAnonymousMethod", testAnonymousMethod, ["Array.<anonymous>"]);
+testTrace("testDefaultCustomError", testDefaultCustomError,
+    ["hep-hey", "new CustomError"],
+    ["collectStackTrace"]);
+testTrace("testStrippedCustomError", testStrippedCustomError, ["hep-hey"],
+    ["new CustomError", "collectStackTrace"]);
 testCallerCensorship();
 testUnintendedCallerCensorship();
 testErrorsDuringFormatting();
diff --git a/test/mjsunit/tools/logreader.js b/test/mjsunit/tools/logreader.js
index dfd7f9f..8ed5ffd 100644
--- a/test/mjsunit/tools/logreader.js
+++ b/test/mjsunit/tools/logreader.js
@@ -80,3 +80,19 @@
   assertEquals('bbbbaaaa', reader.expandBackRef_('bbbb#2:4'));
   assertEquals('"#1:1"', reader.expandBackRef_('"#1:1"'));
 })();
+
+
+// See http://code.google.com/p/v8/issues/detail?id=420
+(function testReadingTruncatedLog() {
+  // Having an incorrect event in the middle of a log should throw an exception.
+  var reader1 = new devtools.profiler.LogReader({});
+  assertThrows(function() {
+    reader1.processLogChunk('alias,a,b\nxxxx\nalias,c,d\n');
+  });
+
+  // But having it as the last record should not.
+  var reader2 = new devtools.profiler.LogReader({});
+  assertDoesNotThrow(function() {
+    reader2.processLogChunk('alias,a,b\nalias,c,d\nxxxx');
+  });
+})();
diff --git a/test/mjsunit/tools/tickprocessor.js b/test/mjsunit/tools/tickprocessor.js
index 00c3fb1..83bdac8 100644
--- a/test/mjsunit/tools/tickprocessor.js
+++ b/test/mjsunit/tools/tickprocessor.js
@@ -227,6 +227,78 @@
 })();
 
 
+// http://code.google.com/p/v8/issues/detail?id=427
+(function testWindowsProcessExeAndDllMapFile() {
+  function exeSymbols(exeName) {
+    return [
+      ' 0000:00000000       ___ImageBase               00400000     <linker-defined>',
+      ' 0001:00000780       ?RunMain@@YAHHQAPAD@Z      00401780 f   shell.obj',
+      ' 0001:00000ac0       _main                      00401ac0 f   shell.obj',
+      ''
+    ].join('\r\n');
+  }
+
+  function dllSymbols(dllName) {
+    return [
+      ' 0000:00000000       ___ImageBase               01c30000     <linker-defined>',
+      ' 0001:00000780       _DllMain@12                01c31780 f   libcmt:dllmain.obj',
+      ' 0001:00000ac0       ___DllMainCRTStartup       01c31ac0 f   libcmt:dllcrt0.obj',
+      ''
+    ].join('\r\n');
+  }
+
+  var oldRead = read;
+
+  read = exeSymbols;
+  var exe_exe_syms = [];
+  (new WindowsCppEntriesProvider()).parseVmSymbols(
+      'chrome.exe', 0x00400000, 0x00472000,
+      function (name, start, end) {
+        exe_exe_syms.push(Array.prototype.slice.apply(arguments, [0]));
+      });
+  assertEquals(
+      [['RunMain', 0x00401780, 0x00401ac0],
+       ['_main', 0x00401ac0, 0x00472000]],
+      exe_exe_syms, '.exe with .exe symbols');
+
+  read = dllSymbols;
+  var exe_dll_syms = [];
+  (new WindowsCppEntriesProvider()).parseVmSymbols(
+      'chrome.exe', 0x00400000, 0x00472000,
+      function (name, start, end) {
+        exe_dll_syms.push(Array.prototype.slice.apply(arguments, [0]));
+      });
+  assertEquals(
+      [],
+      exe_dll_syms, '.exe with .dll symbols');
+
+  read = dllSymbols;
+  var dll_dll_syms = [];
+  (new WindowsCppEntriesProvider()).parseVmSymbols(
+      'chrome.dll', 0x01c30000, 0x02b80000,
+      function (name, start, end) {
+        dll_dll_syms.push(Array.prototype.slice.apply(arguments, [0]));
+      });
+  assertEquals(
+      [['_DllMain@12', 0x01c31780, 0x01c31ac0],
+       ['___DllMainCRTStartup', 0x01c31ac0, 0x02b80000]],
+      dll_dll_syms, '.dll with .dll symbols');
+
+  read = exeSymbols;
+  var dll_exe_syms = [];
+  (new WindowsCppEntriesProvider()).parseVmSymbols(
+      'chrome.dll', 0x01c30000, 0x02b80000,
+      function (name, start, end) {
+        dll_exe_syms.push(Array.prototype.slice.apply(arguments, [0]));
+      });
+  assertEquals(
+      [],
+      dll_exe_syms, '.dll with .exe symbols');
+
+  read = oldRead;
+})();
+
+
 function CppEntriesProviderMock() {
 };
 
diff --git a/test/mozilla/mozilla.status b/test/mozilla/mozilla.status
index c4628a0..a1551dc 100644
--- a/test/mozilla/mozilla.status
+++ b/test/mozilla/mozilla.status
@@ -278,6 +278,11 @@
 js1_2/regexp/endLine: FAIL_OK
 
 
+# To be compatible with safari typeof a regexp yields 'function';
+# in firefox it yields 'object'.
+js1_2/function/regexparg-1: FAIL_OK
+
+
 # Date trouble?
 js1_5/Date/regress-301738-02: FAIL_OK
 
@@ -803,10 +808,3 @@
 ecma/Expressions/11.10-3: SKIP
 ecma/Expressions/11.7.1: SKIP
 ecma_3/RegExp/regress-209067: SKIP
-
-[ $ARCH == x64 ]
-
-# Tests that fail on the 64-bit port.  This section should be empty
-# when the 64-bit port is fully debugged.
-
-js1_2/regexp/regress-9141: FAIL