Import Cobalt 16.154703
diff --git a/src/v8/test/BUILD.gn b/src/v8/test/BUILD.gn
index 14fa27b..532a3dd 100644
--- a/src/v8/test/BUILD.gn
+++ b/src/v8/test/BUILD.gn
@@ -28,6 +28,7 @@
       ":benchmarks_run",
       ":bot_default_run",
       ":default_run",
+      ":d8_default_run",
       ":mozilla_run",
       "test262:test262_run",
     ]
@@ -44,6 +45,7 @@
   if (v8_test_isolation_mode != "noop") {
     deps = [
       ":cctest_run",
+      ":debugger_run",
       ":fuzzer_run",
       ":inspector-test_run",
       ":intl_run",
@@ -74,6 +76,19 @@
   isolate = "default.isolate"
 }
 
+v8_isolate_run("d8_default") {
+  deps = [
+    ":debugger_run",
+    ":intl_run",
+    ":message_run",
+    ":mjsunit_run",
+    ":preparser_run",
+    ":webkit_run",
+  ]
+
+  isolate = "d8_default.isolate"
+}
+
 v8_isolate_run("optimize_for_size") {
   deps = [
     ":cctest_run",
@@ -123,6 +138,14 @@
   isolate = "cctest/cctest_exe.isolate"
 }
 
+v8_isolate_run("debugger") {
+  deps = [
+    "..:d8_run",
+  ]
+
+  isolate = "debugger/debugger.isolate"
+}
+
 v8_isolate_run("fuzzer") {
   deps = [
     "..:v8_simple_json_fuzzer",
diff --git a/src/v8/test/benchmarks/testcfg.py b/src/v8/test/benchmarks/testcfg.py
index cdbb0ad..fd956aa 100644
--- a/src/v8/test/benchmarks/testcfg.py
+++ b/src/v8/test/benchmarks/testcfg.py
@@ -34,29 +34,18 @@
 from testrunner.objects import testcase
 
 
-class BenchmarksVariantGenerator(testsuite.VariantGenerator):
-  # Both --noopt and --stressopt are very slow. Add TF but without
-  # always opt to match the way the benchmarks are run for performance
-  # testing.
-  def FilterVariantsByTest(self, testcase):
-    if testcase.outcomes and statusfile.OnlyStandardVariant(
-        testcase.outcomes):
-      return self.standard_variant
-    return self.fast_variants
-
-  def GetFlagSets(self, testcase, variant):
-    return testsuite.FAST_VARIANT_FLAGS[variant]
+class VariantsGenerator(testsuite.VariantsGenerator):
+  def _get_variants(self, test):
+    return self._standard_variant
 
 
-class BenchmarksTestSuite(testsuite.TestSuite):
-
+class TestSuite(testsuite.TestSuite):
   def __init__(self, name, root):
-    super(BenchmarksTestSuite, self).__init__(name, root)
+    super(TestSuite, self).__init__(name, root)
     self.testroot = os.path.join(root, "data")
 
   def ListTests(self, context):
-    tests = []
-    for test in [
+    tests = map(self._create_test, [
         "kraken/ai-astar",
         "kraken/audio-beat-detection",
         "kraken/audio-dft",
@@ -113,60 +102,47 @@
         "sunspider/string-fasta",
         "sunspider/string-tagcloud",
         "sunspider/string-unpack-code",
-        "sunspider/string-validate-input"]:
-      tests.append(testcase.TestCase(self, test))
+        "sunspider/string-validate-input",
+    ])
     return tests
 
-  def GetFlagsForTestCase(self, testcase, context):
-    result = []
-    result += context.mode_flags
-    if testcase.path.startswith("kraken"):
-      result.append(os.path.join(self.testroot, "%s-data.js" % testcase.path))
-      result.append(os.path.join(self.testroot, "%s.js" % testcase.path))
-    elif testcase.path.startswith("octane"):
-      result.append(os.path.join(self.testroot, "octane/base.js"))
-      result.append(os.path.join(self.testroot, "%s.js" % testcase.path))
-      if testcase.path.startswith("octane/gbemu"):
-        result.append(os.path.join(self.testroot, "octane/gbemu-part2.js"))
-      elif testcase.path.startswith("octane/typescript"):
-        result.append(os.path.join(self.testroot,
-                                   "octane/typescript-compiler.js"))
-        result.append(os.path.join(self.testroot, "octane/typescript-input.js"))
-      elif testcase.path.startswith("octane/zlib"):
-        result.append(os.path.join(self.testroot, "octane/zlib-data.js"))
-      result += ["-e", "BenchmarkSuite.RunSuites({});"]
-    elif testcase.path.startswith("sunspider"):
-      result.append(os.path.join(self.testroot, "%s.js" % testcase.path))
-    return testcase.flags + result
+  def _test_class(self):
+    return TestCase
 
-  def GetSourceForTest(self, testcase):
-    filename = os.path.join(self.testroot, testcase.path + ".js")
-    with open(filename) as f:
-      return f.read()
+  def _variants_gen_class(self):
+    return VariantsGenerator
 
-  def DownloadData(self):
-    print "Benchmarks download is deprecated. It's part of DEPS."
+  def _LegacyVariantsGeneratorFactory(self):
+    return testsuite.StandardLegacyVariantsGenerator
 
-    def rm_dir(directory):
-      directory_name = os.path.join(self.root, directory)
-      if os.path.exists(directory_name):
-        shutil.rmtree(directory_name)
 
-    # Clean up old directories and archive files.
-    rm_dir('kraken')
-    rm_dir('octane')
-    rm_dir('sunspider')
-    archive_files = [f for f in os.listdir(self.root)
-                     if f.startswith("downloaded_") or
-                        f.startswith("CHECKED_OUT_")]
-    if len(archive_files) > 0:
-      print "Clobber outdated test archives ..."
-      for f in archive_files:
-        os.remove(os.path.join(self.root, f))
+class TestCase(testcase.TestCase):
+  def _get_files_params(self, ctx):
+    path = self.path
+    testroot = self.suite.testroot
+    files = []
+    if path.startswith("kraken"):
+      files.append(os.path.join(testroot, "%s-data.js" % path))
+      files.append(os.path.join(testroot, "%s.js" % path))
+    elif path.startswith("octane"):
+      files.append(os.path.join(testroot, "octane/base.js"))
+      files.append(os.path.join(testroot, "%s.js" % path))
+      if path.startswith("octane/gbemu"):
+        files.append(os.path.join(testroot, "octane/gbemu-part2.js"))
+      elif path.startswith("octane/typescript"):
+        files.append(os.path.join(testroot,
+                                  "octane/typescript-compiler.js"))
+        files.append(os.path.join(testroot, "octane/typescript-input.js"))
+      elif path.startswith("octane/zlib"):
+        files.append(os.path.join(testroot, "octane/zlib-data.js"))
+      files += ["-e", "BenchmarkSuite.RunSuites({});"]
+    elif path.startswith("sunspider"):
+      files.append(os.path.join(testroot, "%s.js" % path))
+    return files
 
-  def _VariantGeneratorFactory(self):
-    return BenchmarksVariantGenerator
+  def _get_source_path(self):
+    return os.path.join(self.suite.testroot, self.path + self._get_suffix())
 
 
 def GetSuite(name, root):
-  return BenchmarksTestSuite(name, root)
+  return TestSuite(name, root)
diff --git a/src/v8/test/bot_default.gyp b/src/v8/test/bot_default.gyp
index 13c77e2..11223e0 100644
--- a/src/v8/test/bot_default.gyp
+++ b/src/v8/test/bot_default.gyp
@@ -11,6 +11,7 @@
           'type': 'none',
           'dependencies': [
             'cctest/cctest.gyp:cctest_run',
+            'debugger/debugger.gyp:debugger_run',
             'fuzzer/fuzzer.gyp:fuzzer_run',
             'inspector/inspector.gyp:inspector-test_run',
             'intl/intl.gyp:intl_run',
diff --git a/src/v8/test/cctest/BUILD.gn b/src/v8/test/cctest/BUILD.gn
index 152c79b..b6c9109 100644
--- a/src/v8/test/cctest/BUILD.gn
+++ b/src/v8/test/cctest/BUILD.gn
@@ -82,14 +82,16 @@
     "compiler/test-run-load-store.cc",
     "compiler/test-run-machops.cc",
     "compiler/test-run-native-calls.cc",
+    "compiler/test-run-retpoline.cc",
     "compiler/test-run-stackcheck.cc",
     "compiler/test-run-stubs.cc",
+    "compiler/test-run-tail-calls.cc",
     "compiler/test-run-unwinding-info.cc",
     "compiler/test-run-variables.cc",
     "compiler/test-run-wasm-machops.cc",
+    "compiler/value-helper.cc",
     "compiler/value-helper.h",
     "expression-type-collector-macros.h",
-    "ffi/test-ffi.cc",
     "gay-fixed.cc",
     "gay-fixed.h",
     "gay-precision.cc",
@@ -103,6 +105,7 @@
     "heap/test-array-buffer-tracker.cc",
     "heap/test-compaction.cc",
     "heap/test-concurrent-marking.cc",
+    "heap/test-embedder-tracing.cc",
     "heap/test-heap.cc",
     "heap/test-incremental-marking.cc",
     "heap/test-invalidated-slots.cc",
@@ -228,6 +231,7 @@
     "wasm/test-run-wasm.cc",
     "wasm/test-streaming-compilation.cc",
     "wasm/test-wasm-breakpoints.cc",
+    "wasm/test-wasm-codegen.cc",
     "wasm/test-wasm-interpreter-entry.cc",
     "wasm/test-wasm-stack.cc",
     "wasm/test-wasm-trap-position.cc",
@@ -249,6 +253,8 @@
 
   if (v8_current_cpu == "arm") {
     sources += [  ### gcmole(arch:arm) ###
+      "assembler-helper-arm.cc",
+      "assembler-helper-arm.h",
       "test-assembler-arm.cc",
       "test-code-stubs-arm.cc",
       "test-code-stubs.cc",
@@ -256,7 +262,7 @@
       "test-disasm-arm.cc",
       "test-macro-assembler-arm.cc",
       "test-run-wasm-relocation-arm.cc",
-      "test-simulator-arm.cc",
+      "test-sync-primitives-arm.cc",
     ]
   } else if (v8_current_cpu == "arm64") {
     sources += [  ### gcmole(arch:arm64) ###
@@ -269,7 +275,7 @@
       "test-javascript-arm64.cc",
       "test-js-arm64-variables.cc",
       "test-run-wasm-relocation-arm64.cc",
-      "test-simulator-arm64.cc",
+      "test-sync-primitives-arm64.cc",
       "test-utils-arm64.cc",
       "test-utils-arm64.h",
     ]
@@ -346,13 +352,6 @@
     ]
   }
 
-  if (is_linux) {
-    # TODO(machenbach): Translate 'or OS=="qnx"' from gyp.
-    sources += [ "test-platform-linux.cc" ]
-  } else if (is_win) {
-    sources += [ "test-platform-win32.cc" ]
-  }
-
   configs = [
     "../..:external_config",
     "../..:internal_config_base",
@@ -427,6 +426,7 @@
     "../../tools/consarray.js",
     "../../tools/profile.js",
     "../../tools/profile_view.js",
+    "../../tools/arguments.js",
     "../../tools/logreader.js",
     "log-eq-of-logging-and-traversal.js",
   ]
diff --git a/src/v8/test/cctest/assembler-helper-arm.cc b/src/v8/test/cctest/assembler-helper-arm.cc
new file mode 100644
index 0000000..3ba5f60
--- /dev/null
+++ b/src/v8/test/cctest/assembler-helper-arm.cc
@@ -0,0 +1,33 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "test/cctest/assembler-helper-arm.h"
+
+#include "src/assembler-inl.h"
+#include "src/isolate-inl.h"
+#include "src/v8.h"
+#include "test/cctest/cctest.h"
+
+namespace v8 {
+namespace internal {
+
+Handle<Code> AssembleCodeImpl(std::function<void(Assembler&)> assemble) {
+  Isolate* isolate = CcTest::i_isolate();
+  Assembler assm(isolate, nullptr, 0);
+
+  assemble(assm);
+  assm.bx(lr);
+
+  CodeDesc desc;
+  assm.GetCode(isolate, &desc);
+  Handle<Code> code =
+      isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
+  if (FLAG_print_code) {
+    code->Print();
+  }
+  return code;
+}
+
+}  // namespace internal
+}  // namespace v8
diff --git a/src/v8/test/cctest/assembler-helper-arm.h b/src/v8/test/cctest/assembler-helper-arm.h
new file mode 100644
index 0000000..c0b0cf8
--- /dev/null
+++ b/src/v8/test/cctest/assembler-helper-arm.h
@@ -0,0 +1,35 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef V8_CCTEST_ASSEMBLER_HELPER_ARM_H_
+#define V8_CCTEST_ASSEMBLER_HELPER_ARM_H_
+
+#include <functional>
+
+#include "src/handles.h"
+#include "src/simulator.h"
+
+namespace v8 {
+namespace internal {
+
+// TODO(arm): Refine these signatures per test case, they can have arbitrary
+// return and argument types and arbitrary number of arguments.
+using F_iiiii = Object*(int x, int p1, int p2, int p3, int p4);
+using F_piiii = Object*(void* p0, int p1, int p2, int p3, int p4);
+using F_ppiii = Object*(void* p0, void* p1, int p2, int p3, int p4);
+using F_pppii = Object*(void* p0, void* p1, void* p2, int p3, int p4);
+using F_ippii = Object*(int p0, void* p1, void* p2, int p3, int p4);
+
+Handle<Code> AssembleCodeImpl(std::function<void(Assembler&)> assemble);
+
+template <typename Signature>
+GeneratedCode<Signature> AssembleCode(
+    std::function<void(Assembler&)> assemble) {
+  return GeneratedCode<Signature>::FromCode(*AssembleCodeImpl(assemble));
+}
+
+}  // namespace internal
+}  // namespace v8
+
+#endif  // V8_CCTEST_ASSEMBLER_HELPER_ARM_H_
diff --git a/src/v8/test/cctest/cctest.cc b/src/v8/test/cctest/cctest.cc
index 45015a2..5daef04 100644
--- a/src/v8/test/cctest/cctest.cc
+++ b/src/v8/test/cctest/cctest.cc
@@ -47,11 +47,11 @@
 static InitializationState initialization_state_ = kUnset;
 static bool disable_automatic_dispose_ = false;
 
-CcTest* CcTest::last_ = NULL;
+CcTest* CcTest::last_ = nullptr;
 bool CcTest::initialize_called_ = false;
 v8::base::Atomic32 CcTest::isolate_used_ = 0;
-v8::ArrayBuffer::Allocator* CcTest::allocator_ = NULL;
-v8::Isolate* CcTest::isolate_ = NULL;
+v8::ArrayBuffer::Allocator* CcTest::allocator_ = nullptr;
+v8::Isolate* CcTest::isolate_ = nullptr;
 
 CcTest::CcTest(TestFunction* callback, const char* file, const char* name,
                bool enabled, bool initialize)
@@ -82,20 +82,30 @@
 
 void CcTest::Run() {
   if (!initialize_) {
-    CHECK(initialization_state_ != kInitialized);
+    CHECK_NE(initialization_state_, kInitialized);
     initialization_state_ = kUninitialized;
-    CHECK(CcTest::isolate_ == NULL);
+    CHECK_NULL(CcTest::isolate_);
   } else {
-    CHECK(initialization_state_ != kUninitialized);
+    CHECK_NE(initialization_state_, kUninitialized);
     initialization_state_ = kInitialized;
-    if (isolate_ == NULL) {
+    if (isolate_ == nullptr) {
       v8::Isolate::CreateParams create_params;
       create_params.array_buffer_allocator = allocator_;
       isolate_ = v8::Isolate::New(create_params);
     }
     isolate_->Enter();
   }
+#ifdef DEBUG
+  const size_t active_isolates = i::Isolate::non_disposed_isolates();
+#endif  // DEBUG
   callback_();
+#ifdef DEBUG
+  // This DCHECK ensures that all Isolates are properly disposed after finishing
+  // the test. Stray Isolates lead to stray tasks in the platform which can
+  // interact weirdly when swapping in new platforms (for testing) or during
+  // shutdown.
+  DCHECK_EQ(active_isolates, i::Isolate::non_disposed_isolates());
+#endif  // DEBUG
   if (initialize_) {
     if (v8::Locker::IsActive()) {
       v8::Locker locker(isolate_);
@@ -142,7 +152,7 @@
 }
 
 void CcTest::TearDown() {
-  if (isolate_ != NULL) isolate_->Dispose();
+  if (isolate_ != nullptr) isolate_->Dispose();
 }
 
 v8::Local<v8::Context> CcTest::NewContext(CcTestExtensionFlags extensions,
@@ -208,7 +218,7 @@
 HandleAndZoneScope::~HandleAndZoneScope() {}
 
 static void PrintTestList(CcTest* current) {
-  if (current == NULL) return;
+  if (current == nullptr) return;
   PrintTestList(current->prev());
   printf("%s/%s\n", current->file(), current->name());
 }
@@ -253,13 +263,13 @@
   }
 
   v8::V8::InitializeICUDefaultLocation(argv[0]);
-  v8::Platform* platform = v8::platform::CreateDefaultPlatform();
-  v8::V8::InitializePlatform(platform);
+  std::unique_ptr<v8::Platform> platform(v8::platform::NewDefaultPlatform());
+  v8::V8::InitializePlatform(platform.get());
   v8::internal::FlagList::SetFlagsFromCommandLine(&argc, argv, true);
   v8::V8::Initialize();
   v8::V8::InitializeExternalStartupData(argv[0]);
 
-  if (i::trap_handler::UseTrapHandler()) {
+  if (i::trap_handler::IsTrapHandlerEnabled()) {
     v8::V8::RegisterDefaultSignalHandler();
   }
 
@@ -291,7 +301,7 @@
         char* file = arg_copy;
         char* name = testname + 1;
         CcTest* test = CcTest::last();
-        while (test != NULL) {
+        while (test != nullptr) {
           if (test->enabled()
               && strcmp(test->file(), file) == 0
               && strcmp(test->name(), name) == 0) {
@@ -305,7 +315,7 @@
         // Run all tests with the specified file or test name.
         char* file_or_name = arg_copy;
         CcTest* test = CcTest::last();
-        while (test != NULL) {
+        while (test != nullptr) {
           if (test->enabled()
               && (strcmp(test->file(), file_or_name) == 0
                   || strcmp(test->name(), file_or_name) == 0)) {
@@ -324,9 +334,8 @@
   // TODO(svenpanne) See comment above.
   // if (!disable_automatic_dispose_) v8::V8::Dispose();
   v8::V8::ShutdownPlatform();
-  delete platform;
   return 0;
 }
 
-RegisterThreadedTest *RegisterThreadedTest::first_ = NULL;
+RegisterThreadedTest* RegisterThreadedTest::first_ = nullptr;
 int RegisterThreadedTest::count_ = 0;
diff --git a/src/v8/test/cctest/cctest.gyp b/src/v8/test/cctest/cctest.gyp
index 049bd27..5124495 100644
--- a/src/v8/test/cctest/cctest.gyp
+++ b/src/v8/test/cctest/cctest.gyp
@@ -71,15 +71,17 @@
       'compiler/test-run-load-store.cc',
       'compiler/test-run-machops.cc',
       'compiler/test-run-native-calls.cc',
+      'compiler/test-run-retpoline.cc',
       'compiler/test-run-stackcheck.cc',
       'compiler/test-run-stubs.cc',
+      'compiler/test-run-tail-calls.cc',
       'compiler/test-run-variables.cc',
       'compiler/test-run-wasm-machops.cc',
+      'compiler/value-helper.cc',
       'compiler/value-helper.h',
       'cctest.cc',
       'cctest.h',
       'expression-type-collector-macros.h',
-      'ffi/test-ffi.cc',
       'gay-fixed.cc',
       'gay-fixed.h',
       'gay-precision.cc',
@@ -93,6 +95,7 @@
       'heap/test-array-buffer-tracker.cc',
       'heap/test-compaction.cc',
       'heap/test-concurrent-marking.cc',
+      'heap/test-embedder-tracing.cc',
       'heap/test-heap.cc',
       'heap/test-incremental-marking.cc',
       'heap/test-invalidated-slots.cc',
@@ -218,6 +221,7 @@
       'wasm/test-run-wasm-relocation.cc',
       'wasm/test-run-wasm-simd.cc',
       'wasm/test-wasm-breakpoints.cc',
+      "wasm/test-wasm-codegen.cc",
       'wasm/test-wasm-interpreter-entry.cc',
       'wasm/test-wasm-stack.cc',
       'wasm/test-wasm-trap-position.cc',
@@ -244,6 +248,8 @@
       'test-run-wasm-relocation-x64.cc',
     ],
     'cctest_sources_arm': [  ### gcmole(arch:arm) ###
+      'assembler-helper-arm.cc',
+      'assembler-helper-arm.h',
       'test-assembler-arm.cc',
       'test-code-stubs.cc',
       'test-code-stubs.h',
@@ -251,7 +257,7 @@
       'test-disasm-arm.cc',
       'test-macro-assembler-arm.cc',
       'test-run-wasm-relocation-arm.cc',
-      'test-simulator-arm.cc',
+      'test-sync-primitives-arm.cc',
     ],
     'cctest_sources_arm64': [  ### gcmole(arch:arm64) ###
       'test-utils-arm64.cc',
@@ -265,7 +271,7 @@
       'test-javascript-arm64.cc',
       'test-js-arm64-variables.cc',
       'test-run-wasm-relocation-arm64.cc',
-      'test-simulator-arm64.cc',
+      'test-sync-primitives-arm64.cc',
     ],
     'cctest_sources_s390': [  ### gcmole(arch:s390) ###
       'test-assembler-s390.cc',
@@ -395,15 +401,7 @@
             '<@(cctest_sources_mips64el)',
           ],
         }],
-        [ 'OS=="linux" or OS=="qnx"', {
-          'sources': [
-            'test-platform-linux.cc',
-          ],
-        }],
         [ 'OS=="win"', {
-          'sources': [
-            'test-platform-win32.cc',
-          ],
           'msvs_settings': {
             'VCCLCompilerTool': {
               # MSVS wants this for gay-{precision,shortest}.cc.
@@ -447,6 +445,7 @@
            '../../tools/consarray.js',
            '../../tools/profile.js',
            '../../tools/profile_view.js',
+           '../../tools/arguments.js',
            '../../tools/logreader.js',
            'log-eq-of-logging-and-traversal.js',
         ],
diff --git a/src/v8/test/cctest/cctest.h b/src/v8/test/cctest/cctest.h
index 155d739..37c4c0c 100644
--- a/src/v8/test/cctest/cctest.h
+++ b/src/v8/test/cctest/cctest.h
@@ -32,6 +32,7 @@
 
 #include "include/libplatform/libplatform.h"
 #include "include/v8-platform.h"
+#include "src/assembler.h"
 #include "src/debug/debug-interface.h"
 #include "src/factory.h"
 #include "src/flags.h"
@@ -114,7 +115,7 @@
   bool enabled() { return enabled_; }
 
   static v8::Isolate* isolate() {
-    CHECK(isolate_ != NULL);
+    CHECK_NOT_NULL(isolate_);
     v8::base::Relaxed_Store(&isolate_used_, 1);
     return isolate_;
   }
@@ -246,7 +247,7 @@
  public:
   explicit RegisterThreadedTest(CcTest::TestFunction* callback,
                                 const char* name)
-      : fuzzer_(NULL), callback_(callback), name_(name) {
+      : fuzzer_(nullptr), callback_(callback), name_(name) {
     prev_ = first_;
     first_ = this;
     count_++;
@@ -567,6 +568,25 @@
   CHECK_GE(expected, actual - kEpsilon);
 }
 
+static inline uint8_t* AllocateAssemblerBuffer(
+    size_t* allocated,
+    size_t requested = v8::internal::AssemblerBase::kMinimalBufferSize) {
+  size_t page_size = v8::internal::AllocatePageSize();
+  size_t alloc_size = RoundUp(requested, page_size);
+  void* result = v8::internal::AllocatePages(
+      nullptr, alloc_size, page_size, v8::PageAllocator::kReadWriteExecute);
+  CHECK(result);
+  *allocated = alloc_size;
+  return static_cast<uint8_t*>(result);
+}
+
+static inline void MakeAssemblerBufferExecutable(uint8_t* buffer,
+                                                 size_t allocated) {
+  bool result = v8::internal::SetPermissions(buffer, allocated,
+                                             v8::PageAllocator::kReadExecute);
+  CHECK(result);
+}
+
 static v8::debug::DebugDelegate dummy_delegate;
 
 static inline void EnableDebugger(v8::Isolate* isolate) {
@@ -632,21 +652,26 @@
   ManualGCScope()
       : flag_concurrent_marking_(i::FLAG_concurrent_marking),
         flag_concurrent_sweeping_(i::FLAG_concurrent_sweeping),
-        flag_stress_incremental_marking_(i::FLAG_stress_incremental_marking) {
+        flag_stress_incremental_marking_(i::FLAG_stress_incremental_marking),
+        flag_parallel_marking_(i::FLAG_parallel_marking) {
     i::FLAG_concurrent_marking = false;
     i::FLAG_concurrent_sweeping = false;
     i::FLAG_stress_incremental_marking = false;
+    // Parallel marking has a dependency on concurrent marking.
+    i::FLAG_parallel_marking = false;
   }
   ~ManualGCScope() {
     i::FLAG_concurrent_marking = flag_concurrent_marking_;
     i::FLAG_concurrent_sweeping = flag_concurrent_sweeping_;
     i::FLAG_stress_incremental_marking = flag_stress_incremental_marking_;
+    i::FLAG_parallel_marking = flag_parallel_marking_;
   }
 
  private:
   bool flag_concurrent_marking_;
   bool flag_concurrent_sweeping_;
   bool flag_stress_incremental_marking_;
+  bool flag_parallel_marking_;
 };
 
 // This is an abstract base class that can be overridden to implement a test
@@ -655,10 +680,28 @@
 class TestPlatform : public v8::Platform {
  public:
   // v8::Platform implementation.
+  v8::PageAllocator* GetPageAllocator() override {
+    return old_platform_->GetPageAllocator();
+  }
+
   void OnCriticalMemoryPressure() override {
     old_platform_->OnCriticalMemoryPressure();
   }
 
+  bool OnCriticalMemoryPressure(size_t length) override {
+    return old_platform_->OnCriticalMemoryPressure(length);
+  }
+
+  std::shared_ptr<v8::TaskRunner> GetForegroundTaskRunner(
+      v8::Isolate* isolate) override {
+    return old_platform_->GetForegroundTaskRunner(isolate);
+  }
+
+  std::shared_ptr<v8::TaskRunner> GetBackgroundTaskRunner(
+      v8::Isolate* isolate) override {
+    return old_platform_->GetBackgroundTaskRunner(isolate);
+  }
+
   void CallOnBackgroundThread(v8::Task* task,
                               ExpectedRuntime expected_runtime) override {
     old_platform_->CallOnBackgroundThread(task, expected_runtime);
diff --git a/src/v8/test/cctest/cctest.status b/src/v8/test/cctest/cctest.status
index 4eaa735..2840bcc 100644
--- a/src/v8/test/cctest/cctest.status
+++ b/src/v8/test/cctest/cctest.status
@@ -71,17 +71,28 @@
 
   # BUG(5193). The cpu profiler tests are notoriously flaky.
   'test-cpu-profiler/CollectCpuProfile': [SKIP],
+  'test-cpu-profiler/CollectCpuProfileSamples': [SKIP],
   'test-cpu-profiler/CollectDeoptEvents': [SKIP],
   'test-cpu-profiler/CpuProfileDeepStack': [SKIP],
+  'test-cpu-profiler/DeoptAtFirstLevelInlinedSource': [SKIP],
+  'test-cpu-profiler/DeoptAtSecondLevelInlinedSource': [SKIP],
+  'test-cpu-profiler/DeoptUntrackedFunction': [SKIP],
   'test-cpu-profiler/FunctionApplySample': [SKIP],
   'test-cpu-profiler/HotDeoptNoFrameEntry': [SKIP],
   'test-cpu-profiler/JsNative1JsNative2JsSample': [SKIP],
   'test-cpu-profiler/JsNativeJsRuntimeJsSample': [SKIP],
   'test-cpu-profiler/JsNativeJsRuntimeJsSampleMultiple': [SKIP],
   'test-cpu-profiler/JsNativeJsSample': [SKIP],
+  'test-cpu-profiler/NativeAccessorUninitializedIC': [SKIP],
   'test-cpu-profiler/SampleWhenFrameIsNotSetup': [SKIP],
   'test-sampler/LibSamplerCollectSample': [SKIP],
 
+  # BUG(7202). The test is flaky.
+  'test-cpu-profiler/NativeFrameStackTrace': [SKIP],
+
+  # BUG(7054)
+  'test-cpu-profiler/StaticCollectSampleAPI': [SKIP],
+
   # BUG(2340). Preprocessing stack traces is disabled at the moment.
   'test-heap/PreprocessStackTrace': [FAIL],
 
@@ -101,6 +112,9 @@
 
   # Test that serialization with unknown external reference fails.
   'test-serialize/SnapshotCreatorUnknownExternalReferences': [FAIL],
+  'test-serialize/SnapshotCreatorUnknownHandles': [FAIL],
+  'test-serialize/SnapshotCreatorNoExternalReferencesCustomFail1': [FAIL],
+  'test-serialize/SnapshotCreatorNoExternalReferencesCustomFail2': [FAIL],
 
   ############################################################################
   # Slow tests.
@@ -108,6 +122,7 @@
   'test-strings/StringOOM*': [PASS, ['mode == debug', SKIP]],
   'test-serialize/CustomSnapshotDataBlobImmortalImmovableRoots': [PASS, ['mode == debug', SKIP]],
   'test-parsing/ObjectRestNegativeTestSlow': [PASS, ['mode == debug', SKIP]],
+
 }],  # ALWAYS
 
 ##############################################################################
@@ -153,6 +168,15 @@
 }],  # 'arch == arm64 and mode == debug and simulator_run'
 
 ##############################################################################
+# TODO(ahaas): Port multiple return values to ARM, MIPS, S390 and PPC
+['arch == s390 or arch == s390x or arch == ppc or arch == ppc64', {
+  'test-multiple-return/*': [SKIP],
+}],
+# TODO(ahaas): Port multiple return values to ARM, MIPS, S390 and PPC
+['arch == mips or arch == mips64 or arch == mipsel or arch == mips64el or arch == s390 or arch == s390x or arch == ppc or arch == ppc64', {
+  'test-multiple-return/ReturnLastValue*': [SKIP],
+}],
+##############################################################################
 ['asan == True', {
   # Skip tests not suitable for ASAN.
   'test-assembler-x64/AssemblerX64XchglOperations': [SKIP],
@@ -171,6 +195,11 @@
 ['tsan == True', {
   # BUG(v8:6133).
   'test-cpu-profiler/TickEvents': [SKIP],
+  # BUG(v8:6924). The test allocates a lot of memory.
+  'test-api/NewStringRangeError': [PASS, NO_VARIANTS],
+
+  # BUG(chromium:794911).
+  'test-cpu-profiler/TracingCpuProfiler': [SKIP],
 }],  # 'tsan == True'
 
 ##############################################################################
@@ -349,6 +378,11 @@
 }],  # 'arch == ppc or arch == ppc64 or arch == s390 or arch == s390x'
 
 ##############################################################################
+['variant == stress_incremental_marking', {
+  'test-heap-profiler/SamplingHeapProfiler': [SKIP],
+}],  # variant == stress_incremental_marking
+
+##############################################################################
 ['variant == wasm_traps', {
   'test-accessors/*': [SKIP],
   'test-api-interceptors/*': [SKIP],
diff --git a/src/v8/test/cctest/compiler/c-signature.h b/src/v8/test/cctest/compiler/c-signature.h
index 1c2f963..0aea6e9 100644
--- a/src/v8/test/cctest/compiler/c-signature.h
+++ b/src/v8/test/cctest/compiler/c-signature.h
@@ -28,18 +28,16 @@
   V(int*, MachineType::Pointer())
 
 template <typename T>
-inline MachineType MachineTypeForC() {
-  while (false) {
-    // All other types T must be assignable to Object*
-    *(static_cast<Object* volatile*>(0)) = static_cast<T>(0);
-  }
+inline constexpr MachineType MachineTypeForC() {
+  static_assert(std::is_convertible<T, Object*>::value,
+                "all non-specialized types must be convertible to Object*");
   return MachineType::AnyTagged();
 }
 
-#define DECLARE_TEMPLATE_SPECIALIZATION(ctype, mtype) \
-  template <>                                         \
-  inline MachineType MachineTypeForC<ctype>() {       \
-    return mtype;                                     \
+#define DECLARE_TEMPLATE_SPECIALIZATION(ctype, mtype)     \
+  template <>                                             \
+  inline MachineType constexpr MachineTypeForC<ctype>() { \
+    return mtype;                                         \
   }
 FOREACH_CTYPE_MACHINE_TYPE_MAPPING(DECLARE_TEMPLATE_SPECIALIZATION)
 #undef DECLARE_TEMPLATE_SPECIALIZATION
@@ -51,21 +49,13 @@
       : MachineSignature(return_count, parameter_count, reps) {}
 
  public:
-  template <typename P1 = void, typename P2 = void, typename P3 = void,
-            typename P4 = void, typename P5 = void>
+  template <typename... Params>
   static void VerifyParams(MachineSignature* sig) {
-    // Verifies the C signature against the machine types. Maximum {5} params.
-    CHECK_LT(sig->parameter_count(), 6u);
-    const int kMax = 5;
-    MachineType params[] = {MachineTypeForC<P1>(), MachineTypeForC<P2>(),
-                            MachineTypeForC<P3>(), MachineTypeForC<P4>(),
-                            MachineTypeForC<P5>()};
-    for (int p = kMax - 1; p >= 0; p--) {
-      if (p < static_cast<int>(sig->parameter_count())) {
-        CHECK_EQ(sig->GetParam(p), params[p]);
-      } else {
-        CHECK_EQ(MachineType::None(), params[p]);
-      }
+    // Verifies the C signature against the machine types.
+    std::array<MachineType, sizeof...(Params)> params{
+        {MachineTypeForC<Params>()...}};
+    for (size_t p = 0; p < params.size(); ++p) {
+      CHECK_EQ(sig->GetParam(p), params[p]);
     }
   }
 
@@ -73,96 +63,59 @@
     return reinterpret_cast<CSignature*>(msig);
   }
 
+  template <typename... ParamMachineTypes>
   static CSignature* New(Zone* zone, MachineType ret,
-                         MachineType p1 = MachineType::None(),
-                         MachineType p2 = MachineType::None(),
-                         MachineType p3 = MachineType::None(),
-                         MachineType p4 = MachineType::None(),
-                         MachineType p5 = MachineType::None()) {
-    MachineType* buffer = zone->NewArray<MachineType>(6);
-    int pos = 0;
+                         ParamMachineTypes... params) {
+    constexpr size_t param_count = sizeof...(params);
+    std::array<MachineType, param_count> param_arr{{params...}};
+    const size_t buffer_size =
+        param_count + (ret == MachineType::None() ? 0 : 1);
+    MachineType* buffer = zone->NewArray<MachineType>(buffer_size);
+    size_t pos = 0;
     size_t return_count = 0;
     if (ret != MachineType::None()) {
       buffer[pos++] = ret;
       return_count++;
     }
-    buffer[pos++] = p1;
-    buffer[pos++] = p2;
-    buffer[pos++] = p3;
-    buffer[pos++] = p4;
-    buffer[pos++] = p5;
-    size_t param_count = 5;
-    if (p5 == MachineType::None()) param_count--;
-    if (p4 == MachineType::None()) param_count--;
-    if (p3 == MachineType::None()) param_count--;
-    if (p2 == MachineType::None()) param_count--;
-    if (p1 == MachineType::None()) param_count--;
-    for (size_t i = 0; i < param_count; i++) {
-      // Check that there are no MachineType::None()'s in the middle of
-      // parameters.
-      CHECK_NE(MachineType::None(), buffer[return_count + i]);
+    for (MachineType p : param_arr) {
+      // Check that there are no MachineType::None()'s in the parameters.
+      CHECK_NE(MachineType::None(), p);
+      buffer[pos++] = p;
     }
+    DCHECK_EQ(buffer_size, pos);
     return new (zone) CSignature(return_count, param_count, buffer);
   }
 };
 
-
-template <typename Ret, uint16_t kParamCount>
-class CSignatureOf : public CSignature {
- protected:
-  MachineType storage_[1 + kParamCount];
-
-  CSignatureOf()
-      : CSignature(MachineTypeForC<Ret>() != MachineType::None() ? 1 : 0,
-                   kParamCount, reinterpret_cast<MachineType*>(&storage_)) {
-    if (return_count_ == 1) storage_[0] = MachineTypeForC<Ret>();
-  }
-  void Set(int index, MachineType type) {
-    CHECK_LE(0, index);
-    CHECK_LT(index, kParamCount);
-    reps_[return_count_ + index] = type;
-  }
-};
-
 // Helper classes for instantiating Signature objects to be callable from C.
-template <typename Ret>
-class CSignature0 : public CSignatureOf<Ret, 0> {
+template <typename Ret, typename... Params>
+class CSignatureOf : public CSignature {
  public:
-  CSignature0() : CSignatureOf<Ret, 0>() {}
-};
-
-template <typename Ret, typename P1>
-class CSignature1 : public CSignatureOf<Ret, 1> {
- public:
-  CSignature1() : CSignatureOf<Ret, 1>() {
-    this->Set(0, MachineTypeForC<P1>());
+  CSignatureOf() : CSignature(kReturnCount, kParamCount, storage_) {
+    constexpr std::array<MachineType, kParamCount> param_types{
+        MachineTypeForC<Params>()...};
+    if (kReturnCount == 1) storage_[0] = MachineTypeForC<Ret>();
+    static_assert(
+        std::is_same<decltype(*reps_), decltype(*param_types.data())>::value,
+        "type mismatch, cannot memcpy");
+    memcpy(storage_ + kReturnCount, param_types.data(),
+           sizeof(*storage_) * kParamCount);
   }
+
+ private:
+  static constexpr size_t kReturnCount =
+      MachineTypeForC<Ret>() == MachineType::None() ? 0 : 1;
+  static constexpr size_t kParamCount = sizeof...(Params);
+
+  MachineType storage_[kReturnCount + kParamCount];
 };
 
-template <typename Ret, typename P1, typename P2>
-class CSignature2 : public CSignatureOf<Ret, 2> {
- public:
-  CSignature2() : CSignatureOf<Ret, 2>() {
-    this->Set(0, MachineTypeForC<P1>());
-    this->Set(1, MachineTypeForC<P2>());
-  }
-};
+typedef CSignatureOf<int32_t, int32_t, int32_t> CSignature_i_ii;
+typedef CSignatureOf<uint32_t, uint32_t, uint32_t> CSignature_u_uu;
+typedef CSignatureOf<float, float, float> CSignature_f_ff;
+typedef CSignatureOf<double, double, double> CSignature_d_dd;
+typedef CSignatureOf<Object*, Object*, Object*> CSignature_o_oo;
 
-template <typename Ret, typename P1, typename P2, typename P3>
-class CSignature3 : public CSignatureOf<Ret, 3> {
- public:
-  CSignature3() : CSignatureOf<Ret, 3>() {
-    this->Set(0, MachineTypeForC<P1>());
-    this->Set(1, MachineTypeForC<P2>());
-    this->Set(2, MachineTypeForC<P3>());
-  }
-};
-
-typedef CSignature2<int32_t, int32_t, int32_t> CSignature_i_ii;
-typedef CSignature2<uint32_t, uint32_t, uint32_t> CSignature_u_uu;
-typedef CSignature2<float, float, float> CSignature_f_ff;
-typedef CSignature2<double, double, double> CSignature_d_dd;
-typedef CSignature2<Object*, Object*, Object*> CSignature_o_oo;
 }  // namespace compiler
 }  // namespace internal
 }  // namespace v8
diff --git a/src/v8/test/cctest/compiler/call-tester.h b/src/v8/test/cctest/compiler/call-tester.h
index 20dc3c8..2907d4d 100644
--- a/src/v8/test/cctest/compiler/call-tester.h
+++ b/src/v8/test/cctest/compiler/call-tester.h
@@ -6,119 +6,15 @@
 #define V8_CCTEST_COMPILER_CALL_TESTER_H_
 
 #include "src/handles.h"
+#include "src/objects/code.h"
 #include "src/simulator.h"
 #include "test/cctest/compiler/c-signature.h"
 
-#if V8_TARGET_ARCH_IA32
-#if __GNUC__
-#define V8_CDECL __attribute__((cdecl))
-#else
-#define V8_CDECL __cdecl
-#endif
-#else
-#define V8_CDECL
-#endif
-
 namespace v8 {
 namespace internal {
 namespace compiler {
 
 template <typename R>
-inline R CastReturnValue(uintptr_t r) {
-  return reinterpret_cast<R>(r);
-}
-
-template <>
-inline void CastReturnValue(uintptr_t r) {}
-
-template <>
-inline bool CastReturnValue(uintptr_t r) {
-  return static_cast<bool>(r);
-}
-
-template <>
-inline int32_t CastReturnValue(uintptr_t r) {
-  return static_cast<int32_t>(r);
-}
-
-template <>
-inline uint32_t CastReturnValue(uintptr_t r) {
-  return static_cast<uint32_t>(r);
-}
-
-template <>
-inline int64_t CastReturnValue(uintptr_t r) {
-  return static_cast<int64_t>(r);
-}
-
-template <>
-inline uint64_t CastReturnValue(uintptr_t r) {
-  return static_cast<uint64_t>(r);
-}
-
-template <>
-inline int16_t CastReturnValue(uintptr_t r) {
-  return static_cast<int16_t>(r);
-}
-
-template <>
-inline uint16_t CastReturnValue(uintptr_t r) {
-  return static_cast<uint16_t>(r);
-}
-
-template <>
-inline int8_t CastReturnValue(uintptr_t r) {
-  return static_cast<int8_t>(r);
-}
-
-template <>
-inline uint8_t CastReturnValue(uintptr_t r) {
-  return static_cast<uint8_t>(r);
-}
-
-template <>
-inline double CastReturnValue(uintptr_t r) {
-  UNREACHABLE();
-}
-
-template <typename R>
-struct ParameterTraits {
-  static uintptr_t Cast(R r) { return static_cast<uintptr_t>(r); }
-};
-
-template <>
-struct ParameterTraits<int*> {
-  static uintptr_t Cast(int* r) { return reinterpret_cast<uintptr_t>(r); }
-};
-
-template <typename T>
-struct ParameterTraits<T*> {
-  static uintptr_t Cast(void* r) { return reinterpret_cast<uintptr_t>(r); }
-};
-
-
-#if !V8_TARGET_ARCH_32_BIT
-
-// Additional template specialization required for mips64 to sign-extend
-// parameters defined by calling convention.
-template <>
-struct ParameterTraits<int32_t> {
-  static int64_t Cast(int32_t r) { return static_cast<int64_t>(r); }
-};
-
-#if !V8_TARGET_ARCH_PPC64
-template <>
-struct ParameterTraits<uint32_t> {
-  static int64_t Cast(uint32_t r) {
-    return static_cast<int64_t>(static_cast<int32_t>(r));
-  }
-};
-#endif
-
-#endif  // !V8_TARGET_ARCH_64_BIT
-
-
-template <typename R>
 class CallHelper {
  public:
   explicit CallHelper(Isolate* isolate, MachineSignature* csig)
@@ -129,9 +25,10 @@
 
   template <typename... Params>
   R Call(Params... args) {
-    using FType = R(V8_CDECL*)(Params...);
     CSignature::VerifyParams<Params...>(csig_);
-    return DoCall(FUNCTION_CAST<FType>(Generate()), args...);
+    byte* entry = Generate();
+    auto fn = GeneratedCode<R, Params...>::FromAddress(isolate_, entry);
+    return fn.Call(args...);
   }
 
  protected:
@@ -140,51 +37,6 @@
   virtual byte* Generate() = 0;
 
  private:
-#if USE_SIMULATOR && V8_TARGET_ARCH_ARM64
-  uintptr_t CallSimulator(byte* f, Simulator::CallArgument* args) {
-    Simulator* simulator = Simulator::current(isolate_);
-    return static_cast<uintptr_t>(simulator->CallInt64(f, args));
-  }
-
-  template <typename F, typename... Params>
-  R DoCall(F* f, Params... args) {
-    Simulator::CallArgument args_arr[] = {Simulator::CallArgument(args)...,
-                                          Simulator::CallArgument::End()};
-    return CastReturnValue<R>(CallSimulator(FUNCTION_ADDR(f), args_arr));
-  }
-#elif USE_SIMULATOR && \
-    (V8_TARGET_ARCH_MIPS64 || V8_TARGET_ARCH_PPC64 || V8_TARGET_ARCH_S390X)
-  uintptr_t CallSimulator(byte* f, int64_t p1 = 0, int64_t p2 = 0,
-                          int64_t p3 = 0, int64_t p4 = 0, int64_t p5 = 0) {
-    Simulator* simulator = Simulator::current(isolate_);
-    return static_cast<uintptr_t>(simulator->Call(f, 5, p1, p2, p3, p4, p5));
-  }
-
-  template <typename F, typename... Params>
-  R DoCall(F* f, Params... args) {
-    return CastReturnValue<R>(CallSimulator(
-        FUNCTION_ADDR(f), ParameterTraits<Params>::Cast(args)...));
-  }
-#elif USE_SIMULATOR && (V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_MIPS || \
-                        V8_TARGET_ARCH_PPC || V8_TARGET_ARCH_S390)
-  uintptr_t CallSimulator(byte* f, int32_t p1 = 0, int32_t p2 = 0,
-                          int32_t p3 = 0, int32_t p4 = 0, int32_t p5 = 0) {
-    Simulator* simulator = Simulator::current(isolate_);
-    return static_cast<uintptr_t>(simulator->Call(f, 5, p1, p2, p3, p4, p5));
-  }
-
-  template <typename F, typename... Params>
-  R DoCall(F* f, Params... args) {
-    return CastReturnValue<R>(CallSimulator(
-        FUNCTION_ADDR(f), ParameterTraits<Params>::Cast(args)...));
-  }
-#else
-  template <typename F, typename... Params>
-  R DoCall(F* f, Params... args) {
-    return f(args...);
-  }
-#endif
-
   Isolate* isolate_;
 };
 
diff --git a/src/v8/test/cctest/compiler/code-assembler-tester.h b/src/v8/test/cctest/compiler/code-assembler-tester.h
index 8bfdb72..2002980 100644
--- a/src/v8/test/cctest/compiler/code-assembler-tester.h
+++ b/src/v8/test/cctest/compiler/code-assembler-tester.h
@@ -6,6 +6,7 @@
 #define V8_TEST_CCTEST_COMPILER_CODE_ASSEMBLER_TESTER_H_
 
 #include "src/compiler/code-assembler.h"
+#include "src/compiler/raw-machine-assembler.h"
 #include "src/handles.h"
 #include "src/interface-descriptors.h"
 #include "src/isolate.h"
@@ -30,15 +31,24 @@
         scope_(isolate),
         state_(isolate, &zone_, parameter_count, kind, "test") {}
 
-  // This constructor is intended to be used for creating code objects with
-  // specific flags.
   CodeAssemblerTester(Isolate* isolate, Code::Kind kind)
       : zone_(isolate->allocator(), ZONE_NAME),
         scope_(isolate),
         state_(isolate, &zone_, 0, kind, "test") {}
 
+  CodeAssemblerTester(Isolate* isolate, CallDescriptor* call_descriptor,
+                      const char* name = "test")
+      : zone_(isolate->allocator(), ZONE_NAME),
+        scope_(isolate),
+        state_(isolate, &zone_, call_descriptor, Code::STUB, name, 0, -1) {}
+
   CodeAssemblerState* state() { return &state_; }
 
+  // Direct low-level access to the machine assembler, for testing only.
+  RawMachineAssembler* raw_assembler_for_testing() {
+    return state_.raw_assembler_.get();
+  }
+
   Handle<Code> GenerateCode() { return CodeAssembler::GenerateCode(&state_); }
 
   Handle<Code> GenerateCodeCloseAndEscape() {
diff --git a/src/v8/test/cctest/compiler/codegen-tester.cc b/src/v8/test/cctest/compiler/codegen-tester.cc
index 63b3a3d..f66385a 100644
--- a/src/v8/test/cctest/compiler/codegen-tester.cc
+++ b/src/v8/test/cctest/compiler/codegen-tester.cc
@@ -48,92 +48,92 @@
   CHECK_EQ(true, wWord32Equal.Int32Compare(257, 257));
   CHECK_EQ(true, wWord32Equal.Int32Compare(65539, 65539));
   CHECK_EQ(true, wWord32Equal.Int32Compare(-1, -1));
-  CHECK_EQ(true, wWord32Equal.Int32Compare(0xffffffff, 0xffffffff));
+  CHECK_EQ(true, wWord32Equal.Int32Compare(0xFFFFFFFF, 0xFFFFFFFF));
 
   CHECK_EQ(false, wWord32Equal.Int32Compare(0, 1));
   CHECK_EQ(false, wWord32Equal.Int32Compare(257, 256));
   CHECK_EQ(false, wWord32Equal.Int32Compare(65539, 65537));
   CHECK_EQ(false, wWord32Equal.Int32Compare(-1, -2));
-  CHECK_EQ(false, wWord32Equal.Int32Compare(0xffffffff, 0xfffffffe));
+  CHECK_EQ(false, wWord32Equal.Int32Compare(0xFFFFFFFF, 0xFFFFFFFE));
 
   CHECK_EQ(false, wInt32LessThan.Int32Compare(0, 0));
   CHECK_EQ(false, wInt32LessThan.Int32Compare(357, 357));
   CHECK_EQ(false, wInt32LessThan.Int32Compare(75539, 75539));
   CHECK_EQ(false, wInt32LessThan.Int32Compare(-1, -1));
-  CHECK_EQ(false, wInt32LessThan.Int32Compare(0xffffffff, 0xffffffff));
+  CHECK_EQ(false, wInt32LessThan.Int32Compare(0xFFFFFFFF, 0xFFFFFFFF));
 
   CHECK_EQ(true, wInt32LessThan.Int32Compare(0, 1));
   CHECK_EQ(true, wInt32LessThan.Int32Compare(456, 457));
   CHECK_EQ(true, wInt32LessThan.Int32Compare(85537, 85539));
   CHECK_EQ(true, wInt32LessThan.Int32Compare(-2, -1));
-  CHECK_EQ(true, wInt32LessThan.Int32Compare(0xfffffffe, 0xffffffff));
+  CHECK_EQ(true, wInt32LessThan.Int32Compare(0xFFFFFFFE, 0xFFFFFFFF));
 
   CHECK_EQ(false, wInt32LessThan.Int32Compare(1, 0));
   CHECK_EQ(false, wInt32LessThan.Int32Compare(457, 456));
   CHECK_EQ(false, wInt32LessThan.Int32Compare(85539, 85537));
   CHECK_EQ(false, wInt32LessThan.Int32Compare(-1, -2));
-  CHECK_EQ(false, wInt32LessThan.Int32Compare(0xffffffff, 0xfffffffe));
+  CHECK_EQ(false, wInt32LessThan.Int32Compare(0xFFFFFFFF, 0xFFFFFFFE));
 
   CHECK_EQ(true, wInt32LessThanOrEqual.Int32Compare(0, 0));
   CHECK_EQ(true, wInt32LessThanOrEqual.Int32Compare(357, 357));
   CHECK_EQ(true, wInt32LessThanOrEqual.Int32Compare(75539, 75539));
   CHECK_EQ(true, wInt32LessThanOrEqual.Int32Compare(-1, -1));
-  CHECK_EQ(true, wInt32LessThanOrEqual.Int32Compare(0xffffffff, 0xffffffff));
+  CHECK_EQ(true, wInt32LessThanOrEqual.Int32Compare(0xFFFFFFFF, 0xFFFFFFFF));
 
   CHECK_EQ(true, wInt32LessThanOrEqual.Int32Compare(0, 1));
   CHECK_EQ(true, wInt32LessThanOrEqual.Int32Compare(456, 457));
   CHECK_EQ(true, wInt32LessThanOrEqual.Int32Compare(85537, 85539));
   CHECK_EQ(true, wInt32LessThanOrEqual.Int32Compare(-2, -1));
-  CHECK_EQ(true, wInt32LessThanOrEqual.Int32Compare(0xfffffffe, 0xffffffff));
+  CHECK_EQ(true, wInt32LessThanOrEqual.Int32Compare(0xFFFFFFFE, 0xFFFFFFFF));
 
   CHECK_EQ(false, wInt32LessThanOrEqual.Int32Compare(1, 0));
   CHECK_EQ(false, wInt32LessThanOrEqual.Int32Compare(457, 456));
   CHECK_EQ(false, wInt32LessThanOrEqual.Int32Compare(85539, 85537));
   CHECK_EQ(false, wInt32LessThanOrEqual.Int32Compare(-1, -2));
-  CHECK_EQ(false, wInt32LessThanOrEqual.Int32Compare(0xffffffff, 0xfffffffe));
+  CHECK_EQ(false, wInt32LessThanOrEqual.Int32Compare(0xFFFFFFFF, 0xFFFFFFFE));
 
   // Unsigned comparisons.
   CHECK_EQ(false, wUint32LessThan.Int32Compare(0, 0));
   CHECK_EQ(false, wUint32LessThan.Int32Compare(357, 357));
   CHECK_EQ(false, wUint32LessThan.Int32Compare(75539, 75539));
   CHECK_EQ(false, wUint32LessThan.Int32Compare(-1, -1));
-  CHECK_EQ(false, wUint32LessThan.Int32Compare(0xffffffff, 0xffffffff));
-  CHECK_EQ(false, wUint32LessThan.Int32Compare(0xffffffff, 0));
+  CHECK_EQ(false, wUint32LessThan.Int32Compare(0xFFFFFFFF, 0xFFFFFFFF));
+  CHECK_EQ(false, wUint32LessThan.Int32Compare(0xFFFFFFFF, 0));
   CHECK_EQ(false, wUint32LessThan.Int32Compare(-2999, 0));
 
   CHECK_EQ(true, wUint32LessThan.Int32Compare(0, 1));
   CHECK_EQ(true, wUint32LessThan.Int32Compare(456, 457));
   CHECK_EQ(true, wUint32LessThan.Int32Compare(85537, 85539));
   CHECK_EQ(true, wUint32LessThan.Int32Compare(-11, -10));
-  CHECK_EQ(true, wUint32LessThan.Int32Compare(0xfffffffe, 0xffffffff));
-  CHECK_EQ(true, wUint32LessThan.Int32Compare(0, 0xffffffff));
+  CHECK_EQ(true, wUint32LessThan.Int32Compare(0xFFFFFFFE, 0xFFFFFFFF));
+  CHECK_EQ(true, wUint32LessThan.Int32Compare(0, 0xFFFFFFFF));
   CHECK_EQ(true, wUint32LessThan.Int32Compare(0, -2996));
 
   CHECK_EQ(false, wUint32LessThan.Int32Compare(1, 0));
   CHECK_EQ(false, wUint32LessThan.Int32Compare(457, 456));
   CHECK_EQ(false, wUint32LessThan.Int32Compare(85539, 85537));
   CHECK_EQ(false, wUint32LessThan.Int32Compare(-10, -21));
-  CHECK_EQ(false, wUint32LessThan.Int32Compare(0xffffffff, 0xfffffffe));
+  CHECK_EQ(false, wUint32LessThan.Int32Compare(0xFFFFFFFF, 0xFFFFFFFE));
 
   CHECK_EQ(true, wUint32LessThanOrEqual.Int32Compare(0, 0));
   CHECK_EQ(true, wUint32LessThanOrEqual.Int32Compare(357, 357));
   CHECK_EQ(true, wUint32LessThanOrEqual.Int32Compare(75539, 75539));
   CHECK_EQ(true, wUint32LessThanOrEqual.Int32Compare(-1, -1));
-  CHECK_EQ(true, wUint32LessThanOrEqual.Int32Compare(0xffffffff, 0xffffffff));
+  CHECK_EQ(true, wUint32LessThanOrEqual.Int32Compare(0xFFFFFFFF, 0xFFFFFFFF));
 
   CHECK_EQ(true, wUint32LessThanOrEqual.Int32Compare(0, 1));
   CHECK_EQ(true, wUint32LessThanOrEqual.Int32Compare(456, 457));
   CHECK_EQ(true, wUint32LessThanOrEqual.Int32Compare(85537, 85539));
   CHECK_EQ(true, wUint32LessThanOrEqual.Int32Compare(-300, -299));
   CHECK_EQ(true, wUint32LessThanOrEqual.Int32Compare(-300, -300));
-  CHECK_EQ(true, wUint32LessThanOrEqual.Int32Compare(0xfffffffe, 0xffffffff));
+  CHECK_EQ(true, wUint32LessThanOrEqual.Int32Compare(0xFFFFFFFE, 0xFFFFFFFF));
   CHECK_EQ(true, wUint32LessThanOrEqual.Int32Compare(0, -2995));
 
   CHECK_EQ(false, wUint32LessThanOrEqual.Int32Compare(1, 0));
   CHECK_EQ(false, wUint32LessThanOrEqual.Int32Compare(457, 456));
   CHECK_EQ(false, wUint32LessThanOrEqual.Int32Compare(85539, 85537));
   CHECK_EQ(false, wUint32LessThanOrEqual.Int32Compare(-130, -170));
-  CHECK_EQ(false, wUint32LessThanOrEqual.Int32Compare(0xffffffff, 0xfffffffe));
+  CHECK_EQ(false, wUint32LessThanOrEqual.Int32Compare(0xFFFFFFFF, 0xFFFFFFFE));
   CHECK_EQ(false, wUint32LessThanOrEqual.Int32Compare(-2997, 0));
 
   CompareWrapper wFloat64Equal(IrOpcode::kFloat64Equal);
@@ -285,7 +285,7 @@
 
 
 void Int32BinopInputShapeTester::TestAllInputShapes() {
-  std::vector<int32_t> inputs = ValueHelper::int32_vector();
+  Vector<const int32_t> inputs = ValueHelper::int32_vector();
   int num_int_inputs = static_cast<int>(inputs.size());
   if (num_int_inputs > 16) num_int_inputs = 16;  // limit to 16 inputs
 
@@ -319,7 +319,6 @@
 
       gen->gen(&m, n0, n1);
 
-      if (false) printf("Int32BinopInputShapeTester i=%d, j=%d\n", i, j);
       if (i >= 0) {
         input_a = inputs[i];
         RunRight(&m);
@@ -340,7 +339,6 @@
       input_a = *pl;
       input_b = *pr;
       int32_t expect = gen->expected(input_a, input_b);
-      if (false) printf("  cmp(a=%d, b=%d) ?== %d\n", input_a, input_b, expect);
       CHECK_EQ(expect, m->Call(input_a, input_b));
     }
   }
@@ -352,7 +350,6 @@
   FOR_UINT32_INPUTS(i) {
     input_a = *i;
     int32_t expect = gen->expected(input_a, input_b);
-    if (false) printf("  cmp(a=%d, b=%d) ?== %d\n", input_a, input_b, expect);
     CHECK_EQ(expect, m->Call(input_a, input_b));
   }
 }
@@ -363,7 +360,6 @@
   FOR_UINT32_INPUTS(i) {
     input_b = *i;
     int32_t expect = gen->expected(input_a, input_b);
-    if (false) printf("  cmp(a=%d, b=%d) ?== %d\n", input_a, input_b, expect);
     CHECK_EQ(expect, m->Call(input_a, input_b));
   }
 }
diff --git a/src/v8/test/cctest/compiler/codegen-tester.h b/src/v8/test/cctest/compiler/codegen-tester.h
index ea1eee5..7e7e4be 100644
--- a/src/v8/test/cctest/compiler/codegen-tester.h
+++ b/src/v8/test/cctest/compiler/codegen-tester.h
@@ -22,22 +22,18 @@
                                   public CallHelper<ReturnType>,
                                   public RawMachineAssembler {
  public:
-  RawMachineAssemblerTester(MachineType p0 = MachineType::None(),
-                            MachineType p1 = MachineType::None(),
-                            MachineType p2 = MachineType::None(),
-                            MachineType p3 = MachineType::None(),
-                            MachineType p4 = MachineType::None())
+  template <typename... ParamMachTypes>
+  explicit RawMachineAssemblerTester(ParamMachTypes... p)
       : HandleAndZoneScope(),
         CallHelper<ReturnType>(
             main_isolate(),
-            CSignature::New(main_zone(), MachineTypeForC<ReturnType>(), p0, p1,
-                            p2, p3, p4)),
+            CSignature::New(main_zone(), MachineTypeForC<ReturnType>(), p...)),
         RawMachineAssembler(
             main_isolate(), new (main_zone()) Graph(main_zone()),
             Linkage::GetSimplifiedCDescriptor(
                 main_zone(),
-                CSignature::New(main_zone(), MachineTypeForC<ReturnType>(), p0,
-                                p1, p2, p3, p4),
+                CSignature::New(main_zone(), MachineTypeForC<ReturnType>(),
+                                p...),
                 true),
             MachineType::PointerRepresentation(),
             InstructionSelector::SupportedMachineOperatorFlags(),
@@ -68,10 +64,9 @@
       Schedule* schedule = this->Export();
       CallDescriptor* call_descriptor = this->call_descriptor();
       Graph* graph = this->graph();
-      CompilationInfo info(ArrayVector("testing"), main_isolate(), main_zone(),
-                           Code::STUB);
-      code_ = Pipeline::GenerateCodeForTesting(&info, call_descriptor, graph,
-                                               schedule);
+      CompilationInfo info(ArrayVector("testing"), main_zone(), Code::STUB);
+      code_ = Pipeline::GenerateCodeForTesting(
+          &info, main_isolate(), call_descriptor, graph, schedule);
     }
     return this->code_.ToHandleChecked()->entry();
   }
@@ -80,17 +75,24 @@
   MaybeHandle<Code> code_;
 };
 
-
 template <typename ReturnType>
 class BufferedRawMachineAssemblerTester
     : public RawMachineAssemblerTester<int32_t> {
  public:
-  BufferedRawMachineAssemblerTester(MachineType p0 = MachineType::None(),
-                                    MachineType p1 = MachineType::None(),
-                                    MachineType p2 = MachineType::None(),
-                                    MachineType p3 = MachineType::None())
-      : BufferedRawMachineAssemblerTester(ComputeParameterCount(p0, p1, p2, p3),
-                                          p0, p1, p2, p3) {}
+  template <typename... ParamMachTypes>
+  explicit BufferedRawMachineAssemblerTester(ParamMachTypes... p)
+      : RawMachineAssemblerTester<int32_t>(
+            MachineType::Pointer(), ((void)p, MachineType::Pointer())...),
+        test_graph_signature_(
+            CSignature::New(this->main_zone(), MachineType::Int32(), p...)),
+        return_parameter_index_(sizeof...(p)) {
+    static_assert(sizeof...(p) <= arraysize(parameter_nodes_),
+                  "increase parameter_nodes_ array");
+    std::array<MachineType, sizeof...(p)> p_arr{{p...}};
+    for (size_t i = 0; i < p_arr.size(); ++i) {
+      parameter_nodes_[i] = Load(p_arr[i], RawMachineAssembler::Parameter(i));
+    }
+  }
 
   virtual byte* Generate() { return RawMachineAssemblerTester::Generate(); }
 
@@ -100,7 +102,7 @@
   // parameters from memory. Thereby it is possible to pass 64 bit parameters
   // to the IR graph.
   Node* Parameter(size_t index) {
-    CHECK_GT(4, index);
+    CHECK_GT(arraysize(parameter_nodes_), index);
     return parameter_nodes_[index];
   }
 
@@ -115,141 +117,37 @@
     RawMachineAssembler::Return(Int32Constant(1234));
   }
 
-  ReturnType Call() {
+  template <typename... Params>
+  ReturnType Call(Params... p) {
     ReturnType return_value;
-    CSignature::VerifyParams(test_graph_signature_);
-    CallHelper<int32_t>::Call(reinterpret_cast<void*>(&return_value));
-    return return_value;
-  }
-
-  template <typename P0>
-  ReturnType Call(P0 p0) {
-    ReturnType return_value;
-    CSignature::VerifyParams<P0>(test_graph_signature_);
-    CallHelper<int32_t>::Call(reinterpret_cast<void*>(&p0),
+    CSignature::VerifyParams<Params...>(test_graph_signature_);
+    CallHelper<int32_t>::Call(reinterpret_cast<void*>(&p)...,
                               reinterpret_cast<void*>(&return_value));
     return return_value;
   }
 
-  template <typename P0, typename P1>
-  ReturnType Call(P0 p0, P1 p1) {
-    ReturnType return_value;
-    CSignature::VerifyParams<P0, P1>(test_graph_signature_);
-    CallHelper<int32_t>::Call(reinterpret_cast<void*>(&p0),
-                              reinterpret_cast<void*>(&p1),
-                              reinterpret_cast<void*>(&return_value));
-    return return_value;
-  }
-
-  template <typename P0, typename P1, typename P2>
-  ReturnType Call(P0 p0, P1 p1, P2 p2) {
-    ReturnType return_value;
-    CSignature::VerifyParams<P0, P1, P2>(test_graph_signature_);
-    CallHelper<int32_t>::Call(
-        reinterpret_cast<void*>(&p0), reinterpret_cast<void*>(&p1),
-        reinterpret_cast<void*>(&p2), reinterpret_cast<void*>(&return_value));
-    return return_value;
-  }
-
-  template <typename P0, typename P1, typename P2, typename P3>
-  ReturnType Call(P0 p0, P1 p1, P2 p2, P3 p3) {
-    ReturnType return_value;
-    CSignature::VerifyParams<P0, P1, P2, P3>(test_graph_signature_);
-    CallHelper<int32_t>::Call(
-        reinterpret_cast<void*>(&p0), reinterpret_cast<void*>(&p1),
-        reinterpret_cast<void*>(&p2), reinterpret_cast<void*>(&p3),
-        reinterpret_cast<void*>(&return_value));
-    return return_value;
-  }
-
  private:
-  BufferedRawMachineAssemblerTester(uint32_t return_parameter_index,
-                                    MachineType p0, MachineType p1,
-                                    MachineType p2, MachineType p3)
-      : RawMachineAssemblerTester<int32_t>(
-            MachineType::Pointer(),
-            p0 == MachineType::None() ? MachineType::None()
-                                      : MachineType::Pointer(),
-            p1 == MachineType::None() ? MachineType::None()
-                                      : MachineType::Pointer(),
-            p2 == MachineType::None() ? MachineType::None()
-                                      : MachineType::Pointer(),
-            p3 == MachineType::None() ? MachineType::None()
-                                      : MachineType::Pointer()),
-        test_graph_signature_(
-            CSignature::New(main_zone(), MachineType::Int32(), p0, p1, p2, p3)),
-        return_parameter_index_(return_parameter_index) {
-    parameter_nodes_[0] = p0 == MachineType::None()
-                              ? nullptr
-                              : Load(p0, RawMachineAssembler::Parameter(0));
-    parameter_nodes_[1] = p1 == MachineType::None()
-                              ? nullptr
-                              : Load(p1, RawMachineAssembler::Parameter(1));
-    parameter_nodes_[2] = p2 == MachineType::None()
-                              ? nullptr
-                              : Load(p2, RawMachineAssembler::Parameter(2));
-    parameter_nodes_[3] = p3 == MachineType::None()
-                              ? nullptr
-                              : Load(p3, RawMachineAssembler::Parameter(3));
-  }
-
-
-  static uint32_t ComputeParameterCount(MachineType p0, MachineType p1,
-                                        MachineType p2, MachineType p3) {
-    if (p0 == MachineType::None()) {
-      return 0;
-    }
-    if (p1 == MachineType::None()) {
-      return 1;
-    }
-    if (p2 == MachineType::None()) {
-      return 2;
-    }
-    if (p3 == MachineType::None()) {
-      return 3;
-    }
-    return 4;
-  }
-
-
   CSignature* test_graph_signature_;
   Node* parameter_nodes_[4];
   uint32_t return_parameter_index_;
 };
 
-
 template <>
 class BufferedRawMachineAssemblerTester<void>
     : public RawMachineAssemblerTester<void> {
  public:
-  BufferedRawMachineAssemblerTester(MachineType p0 = MachineType::None(),
-                                    MachineType p1 = MachineType::None(),
-                                    MachineType p2 = MachineType::None(),
-                                    MachineType p3 = MachineType::None())
-      : RawMachineAssemblerTester<void>(
-            p0 == MachineType::None() ? MachineType::None()
-                                      : MachineType::Pointer(),
-            p1 == MachineType::None() ? MachineType::None()
-                                      : MachineType::Pointer(),
-            p2 == MachineType::None() ? MachineType::None()
-                                      : MachineType::Pointer(),
-            p3 == MachineType::None() ? MachineType::None()
-                                      : MachineType::Pointer()),
+  template <typename... ParamMachTypes>
+  explicit BufferedRawMachineAssemblerTester(ParamMachTypes... p)
+      : RawMachineAssemblerTester<void>(((void)p, MachineType::Pointer())...),
         test_graph_signature_(
             CSignature::New(RawMachineAssemblerTester<void>::main_zone(),
-                            MachineType::None(), p0, p1, p2, p3)) {
-    parameter_nodes_[0] = p0 == MachineType::None()
-                              ? nullptr
-                              : Load(p0, RawMachineAssembler::Parameter(0));
-    parameter_nodes_[1] = p1 == MachineType::None()
-                              ? nullptr
-                              : Load(p1, RawMachineAssembler::Parameter(1));
-    parameter_nodes_[2] = p2 == MachineType::None()
-                              ? nullptr
-                              : Load(p2, RawMachineAssembler::Parameter(2));
-    parameter_nodes_[3] = p3 == MachineType::None()
-                              ? nullptr
-                              : Load(p3, RawMachineAssembler::Parameter(3));
+                            MachineType::None(), p...)) {
+    static_assert(sizeof...(p) <= arraysize(parameter_nodes_),
+                  "increase parameter_nodes_ array");
+    std::array<MachineType, sizeof...(p)> p_arr{{p...}};
+    for (size_t i = 0; i < p_arr.size(); ++i) {
+      parameter_nodes_[i] = Load(p_arr[i], RawMachineAssembler::Parameter(i));
+    }
   }
 
   virtual byte* Generate() { return RawMachineAssemblerTester::Generate(); }
@@ -260,49 +158,21 @@
   // parameters from memory. Thereby it is possible to pass 64 bit parameters
   // to the IR graph.
   Node* Parameter(size_t index) {
-    CHECK_GT(4, index);
+    CHECK_GT(arraysize(parameter_nodes_), index);
     return parameter_nodes_[index];
   }
 
-
-  void Call() {
-    CSignature::VerifyParams(test_graph_signature_);
-    CallHelper<void>::Call();
-  }
-
-  template <typename P0>
-  void Call(P0 p0) {
-    CSignature::VerifyParams<P0>(test_graph_signature_);
-    CallHelper<void>::Call(reinterpret_cast<void*>(&p0));
-  }
-
-  template <typename P0, typename P1>
-  void Call(P0 p0, P1 p1) {
-    CSignature::VerifyParams<P0, P1>(test_graph_signature_);
-    CallHelper<void>::Call(reinterpret_cast<void*>(&p0),
-                           reinterpret_cast<void*>(&p1));
-  }
-
-  template <typename P0, typename P1, typename P2>
-  void Call(P0 p0, P1 p1, P2 p2) {
-    CSignature::VerifyParams<P0, P1, P2>(test_graph_signature_);
-    CallHelper<void>::Call(reinterpret_cast<void*>(&p0),
-                           reinterpret_cast<void*>(&p1),
-                           reinterpret_cast<void*>(&p2));
-  }
-
-  template <typename P0, typename P1, typename P2, typename P3>
-  void Call(P0 p0, P1 p1, P2 p2, P3 p3) {
-    CSignature::VerifyParams<P0, P1, P2, P3>(test_graph_signature_);
-    CallHelper<void>::Call(
-        reinterpret_cast<void*>(&p0), reinterpret_cast<void*>(&p1),
-        reinterpret_cast<void*>(&p2), reinterpret_cast<void*>(&p3));
+  template <typename... Params>
+  void Call(Params... p) {
+    CSignature::VerifyParams<Params...>(test_graph_signature_);
+    CallHelper<void>::Call(reinterpret_cast<void*>(&p)...);
   }
 
  private:
   CSignature* test_graph_signature_;
   Node* parameter_nodes_[4];
 };
+
 static const bool USE_RESULT_BUFFER = true;
 static const bool USE_RETURN_REGISTER = false;
 static const int32_t CHECK_VALUE = 0x99BEEDCE;
@@ -475,7 +345,7 @@
       default:
         UNREACHABLE();
     }
-    return NULL;
+    return nullptr;
   }
 
   bool Int32Compare(int32_t a, int32_t b) {
diff --git a/src/v8/test/cctest/compiler/function-tester.cc b/src/v8/test/cctest/compiler/function-tester.cc
index facbd8e..2455d9f 100644
--- a/src/v8/test/cctest/compiler/function-tester.cc
+++ b/src/v8/test/cctest/compiler/function-tester.cc
@@ -129,7 +129,7 @@
 
 Handle<JSFunction> FunctionTester::ForMachineGraph(Graph* graph,
                                                    int param_count) {
-  JSFunction* p = NULL;
+  JSFunction* p = nullptr;
   {  // because of the implicit handle scope of FunctionTester.
     FunctionTester f(graph, param_count);
     p = *f.function;
@@ -152,7 +152,8 @@
   CHECK(info.shared_info()->HasBytecodeArray());
   JSFunction::EnsureLiterals(function);
 
-  Handle<Code> code = Pipeline::GenerateCodeForTesting(&info);
+  Handle<Code> code =
+      Pipeline::GenerateCodeForTesting(&info, function->GetIsolate());
   CHECK(!code.is_null());
   info.dependencies()->Commit(code);
   info.context()->native_context()->AddOptimizedCode(*code);
@@ -168,7 +169,8 @@
   CompilationInfo info(parse_info.zone(), function->GetIsolate(), shared,
                        function);
 
-  Handle<Code> code = Pipeline::GenerateCodeForTesting(&info, graph);
+  Handle<Code> code =
+      Pipeline::GenerateCodeForTesting(&info, function->GetIsolate(), graph);
   CHECK(!code.is_null());
   function->set_code(*code);
   return function;
diff --git a/src/v8/test/cctest/compiler/graph-builder-tester.h b/src/v8/test/cctest/compiler/graph-builder-tester.h
index 0de682e..24c2877 100644
--- a/src/v8/test/cctest/compiler/graph-builder-tester.h
+++ b/src/v8/test/cctest/compiler/graph-builder-tester.h
@@ -50,18 +50,14 @@
                            public GraphAndBuilders,
                            public CallHelper<ReturnType> {
  public:
-  explicit GraphBuilderTester(MachineType p0 = MachineType::None(),
-                              MachineType p1 = MachineType::None(),
-                              MachineType p2 = MachineType::None(),
-                              MachineType p3 = MachineType::None(),
-                              MachineType p4 = MachineType::None())
+  template <typename... ParamMachTypes>
+  explicit GraphBuilderTester(ParamMachTypes... p)
       : GraphAndBuilders(main_zone()),
         CallHelper<ReturnType>(
             main_isolate(),
-            CSignature::New(main_zone(), MachineTypeForC<ReturnType>(), p0, p1,
-                            p2, p3, p4)),
-        effect_(NULL),
-        return_(NULL),
+            CSignature::New(main_zone(), MachineTypeForC<ReturnType>(), p...)),
+        effect_(nullptr),
+        return_(nullptr),
         parameters_(main_zone()->template NewArray<Node*>(parameter_count())) {
     Begin(static_cast<int>(parameter_count()));
     InitParameters();
@@ -89,7 +85,7 @@
     Node* zero = graph()->NewNode(common()->Int32Constant(0));
     return_ = graph()->NewNode(common()->Return(), zero, value, effect_,
                                graph()->start());
-    effect_ = NULL;
+    effect_ = nullptr;
   }
 
   // Close the graph.
@@ -192,37 +188,10 @@
     return NewNode(simplified()->StoreElement(access), object, index, value);
   }
 
-  Node* NewNode(const Operator* op) {
-    return MakeNode(op, 0, static_cast<Node**>(NULL));
-  }
-
-  Node* NewNode(const Operator* op, Node* n1) { return MakeNode(op, 1, &n1); }
-
-  Node* NewNode(const Operator* op, Node* n1, Node* n2) {
-    Node* buffer[] = {n1, n2};
-    return MakeNode(op, arraysize(buffer), buffer);
-  }
-
-  Node* NewNode(const Operator* op, Node* n1, Node* n2, Node* n3) {
-    Node* buffer[] = {n1, n2, n3};
-    return MakeNode(op, arraysize(buffer), buffer);
-  }
-
-  Node* NewNode(const Operator* op, Node* n1, Node* n2, Node* n3, Node* n4) {
-    Node* buffer[] = {n1, n2, n3, n4};
-    return MakeNode(op, arraysize(buffer), buffer);
-  }
-
-  Node* NewNode(const Operator* op, Node* n1, Node* n2, Node* n3, Node* n4,
-                Node* n5) {
-    Node* buffer[] = {n1, n2, n3, n4, n5};
-    return MakeNode(op, arraysize(buffer), buffer);
-  }
-
-  Node* NewNode(const Operator* op, Node* n1, Node* n2, Node* n3, Node* n4,
-                Node* n5, Node* n6) {
-    Node* nodes[] = {n1, n2, n3, n4, n5, n6};
-    return MakeNode(op, arraysize(nodes), nodes);
+  template <typename... NodePtrs>
+  Node* NewNode(const Operator* op, NodePtrs... n) {
+    std::array<Node*, sizeof...(n)> inputs{{n...}};
+    return MakeNode(op, inputs.size(), inputs.data());
   }
 
   Node* NewNode(const Operator* op, int value_input_count,
@@ -248,7 +217,7 @@
     CHECK_LT(op->ControlInputCount(), 2);
     CHECK_LT(op->EffectInputCount(), 2);
 
-    Node* result = NULL;
+    Node* result = nullptr;
     if (!has_control && !has_effect) {
       result = graph()->NewNode(op, value_input_count, value_inputs);
     } else {
@@ -280,9 +249,9 @@
       Zone* zone = graph()->zone();
       CallDescriptor* desc =
           Linkage::GetSimplifiedCDescriptor(zone, this->csig_);
-      CompilationInfo info(ArrayVector("testing"), main_isolate(), main_zone(),
-                           Code::STUB);
-      code_ = Pipeline::GenerateCodeForTesting(&info, desc, graph());
+      CompilationInfo info(ArrayVector("testing"), main_zone(), Code::STUB);
+      code_ = Pipeline::GenerateCodeForTesting(&info, main_isolate(), desc,
+                                               graph());
 #ifdef ENABLE_DISASSEMBLER
       if (!code_.is_null() && FLAG_print_opt_code) {
         OFStream os(stdout);
diff --git a/src/v8/test/cctest/compiler/test-code-generator.cc b/src/v8/test/cctest/compiler/test-code-generator.cc
index 3de36ac..10158c2 100644
--- a/src/v8/test/cctest/compiler/test-code-generator.cc
+++ b/src/v8/test/cctest/compiler/test-code-generator.cc
@@ -4,6 +4,7 @@
 
 #include "src/assembler-inl.h"
 #include "src/base/utils/random-number-generator.h"
+#include "src/code-stub-assembler.h"
 #include "src/codegen.h"
 #include "src/compilation-info.h"
 #include "src/compiler/code-generator.h"
@@ -13,12 +14,15 @@
 #include "src/objects-inl.h"
 
 #include "test/cctest/cctest.h"
+#include "test/cctest/compiler/code-assembler-tester.h"
 #include "test/cctest/compiler/function-tester.h"
 
 namespace v8 {
 namespace internal {
 namespace compiler {
 
+#define __ assembler.
+
 namespace {
 
 int GetSlotSizeInBytes(MachineRepresentation rep) {
@@ -36,43 +40,474 @@
   UNREACHABLE();
 }
 
+// Forward declaration.
+Handle<Code> BuildTeardownFunction(Isolate* isolate, CallDescriptor* descriptor,
+                                   std::vector<AllocatedOperand> parameters);
+
+// Build the `setup` function. It takes a code object and a FixedArray as
+// parameters and calls the former while passing it each element of the array as
+// arguments:
+// ~~~
+// FixedArray setup(CodeObject* test, FixedArray state_in) {
+//   FixedArray state_out = AllocateFixedArray(state_in.length());
+//   // `test` will tail-call to its first parameter which will be `teardown`.
+//   return test(teardown, state_out, state_in[0], state_in[1],
+//               state_in[2], ...);
+// }
+// ~~~
+//
+// This function needs to convert each element of the FixedArray to raw unboxed
+// values to pass to the `test` function. The array will have been created using
+// `GenerateInitialState()` and needs to be converted in the following way:
+//
+// | Parameter type | FixedArray element  | Conversion                         |
+// |----------------+---------------------+------------------------------------|
+// | kTagged        | Smi                 | None.                              |
+// | kFloat32       | HeapNumber          | Load value and convert to Float32. |
+// | kFloat64       | HeapNumber          | Load value.                        |
+// | kSimd128       | FixedArray<Smi>[4]  | Untag each Smi and write the       |
+// |                |                     | results into lanes of a new        |
+// |                |                     | 128-bit vector.                    |
+//
+Handle<Code> BuildSetupFunction(Isolate* isolate, CallDescriptor* descriptor,
+                                std::vector<AllocatedOperand> parameters) {
+  CodeAssemblerTester tester(isolate, 2);
+  CodeStubAssembler assembler(tester.state());
+  std::vector<Node*> params;
+  // The first parameter is always the callee.
+  params.push_back(__ Parameter(0));
+  params.push_back(
+      __ HeapConstant(BuildTeardownFunction(isolate, descriptor, parameters)));
+  // First allocate the FixedArray which will hold the final results. Here we
+  // should take care of all allocations, meaning we allocate HeapNumbers and
+  // FixedArrays representing Simd128 values.
+  Node* state_out = __ AllocateFixedArray(PACKED_ELEMENTS,
+                                          __ IntPtrConstant(parameters.size()));
+  for (int i = 0; i < static_cast<int>(parameters.size()); i++) {
+    switch (parameters[i].representation()) {
+      case MachineRepresentation::kTagged:
+        break;
+      case MachineRepresentation::kFloat32:
+      case MachineRepresentation::kFloat64:
+        __ StoreFixedArrayElement(state_out, i, __ AllocateHeapNumber());
+        break;
+      case MachineRepresentation::kSimd128: {
+        __ StoreFixedArrayElement(
+            state_out, i,
+            __ AllocateFixedArray(PACKED_SMI_ELEMENTS, __ IntPtrConstant(4)));
+        break;
+      }
+      default:
+        UNREACHABLE();
+        break;
+    }
+  }
+  params.push_back(state_out);
+  // Then take each element of the initial state and pass them as arguments.
+  Node* state_in = __ Parameter(1);
+  for (int i = 0; i < static_cast<int>(parameters.size()); i++) {
+    Node* element = __ LoadFixedArrayElement(state_in, __ IntPtrConstant(i));
+    // Unbox all elements before passing them as arguments.
+    switch (parameters[i].representation()) {
+      // Tagged parameters are Smis, they do not need unboxing.
+      case MachineRepresentation::kTagged:
+        break;
+      case MachineRepresentation::kFloat32:
+        element = __ TruncateFloat64ToFloat32(__ LoadHeapNumberValue(element));
+        break;
+      case MachineRepresentation::kFloat64:
+        element = __ LoadHeapNumberValue(element);
+        break;
+      case MachineRepresentation::kSimd128: {
+        Node* vector = tester.raw_assembler_for_testing()->AddNode(
+            tester.raw_assembler_for_testing()->machine()->I32x4Splat(),
+            __ Int32Constant(0));
+        for (int lane = 0; lane < 4; lane++) {
+          Node* lane_value = __ SmiToWord32(
+              __ LoadFixedArrayElement(element, __ IntPtrConstant(lane)));
+          vector = tester.raw_assembler_for_testing()->AddNode(
+              tester.raw_assembler_for_testing()->machine()->I32x4ReplaceLane(
+                  lane),
+              vector, lane_value);
+        }
+        element = vector;
+        break;
+      }
+      default:
+        UNREACHABLE();
+        break;
+    }
+    params.push_back(element);
+  }
+  __ Return(tester.raw_assembler_for_testing()->AddNode(
+      tester.raw_assembler_for_testing()->common()->Call(descriptor),
+      static_cast<int>(params.size()), params.data()));
+  return tester.GenerateCodeCloseAndEscape();
+}
+
+// Build the `teardown` function. It takes a FixedArray as argument, fills it
+// with the rest of its parameters and returns it. The parameters need to be
+// consistent with `parameters`.
+// ~~~
+// FixedArray teardown(CodeObject* /* unused  */, FixedArray result,
+//                     // Tagged registers.
+//                     Object* r0, Object* r1, ...,
+//                     // FP registers.
+//                     Float32 s0, Float64 d1, ...,
+//                     // Mixed stack slots.
+//                     Float64 mem0, Object* mem1, Float32 mem2, ...) {
+//   result[0] = r0;
+//   result[1] = r1;
+//   ...
+//   result[..] = s0;
+//   ...
+//   result[..] = mem0;
+//   ...
+//   return result;
+// }
+// ~~~
+//
+// This function needs to convert its parameters into values fit for a
+// FixedArray, essentially reverting what the `setup` function did:
+//
+// | Parameter type | Parameter value   | Conversion                           |
+// |----------------+-------------------+--------------------------------------|
+// | kTagged        | Smi or HeapNumber | None.                                |
+// | kFloat32       | Raw Float32       | Convert to Float64.                  |
+// | kFloat64       | Raw Float64       | None.                                |
+// | kSimd128       | Raw Simd128       | Split into 4 Word32 values and tag   |
+// |                |                   | them.                                |
+//
+// Note that it is possible for a `kTagged` value to go from a Smi to a
+// HeapNumber. This is because `AssembleMove` will allocate a new HeapNumber if
+// it is asked to move a FP constant to a tagged register or slot.
+//
+// Finally, it is important that this function does not call `RecordWrite` which
+// is why "setup" is in charge of all allocations and we are using
+// SKIP_WRITE_BARRIER. The reason for this is that `RecordWrite` may clobber the
+// top 64 bits of Simd128 registers. This is the case on x64, ia32 and Arm64 for
+// example.
+Handle<Code> BuildTeardownFunction(Isolate* isolate, CallDescriptor* descriptor,
+                                   std::vector<AllocatedOperand> parameters) {
+  CodeAssemblerTester tester(isolate, descriptor);
+  CodeStubAssembler assembler(tester.state());
+  Node* result_array = __ Parameter(1);
+  for (int i = 0; i < static_cast<int>(parameters.size()); i++) {
+    // The first argument is not used and the second is "result_array".
+    Node* param = __ Parameter(i + 2);
+    switch (parameters[i].representation()) {
+      case MachineRepresentation::kTagged:
+        __ StoreFixedArrayElement(result_array, i, param, SKIP_WRITE_BARRIER);
+        break;
+      // Box FP values into HeapNumbers.
+      case MachineRepresentation::kFloat32:
+        param =
+            tester.raw_assembler_for_testing()->ChangeFloat32ToFloat64(param);
+      // Fallthrough
+      case MachineRepresentation::kFloat64:
+        __ StoreObjectFieldNoWriteBarrier(
+            __ LoadFixedArrayElement(result_array, i), HeapNumber::kValueOffset,
+            param, MachineRepresentation::kFloat64);
+        break;
+      case MachineRepresentation::kSimd128: {
+        Node* vector = __ LoadFixedArrayElement(result_array, i);
+        for (int lane = 0; lane < 4; lane++) {
+          Node* lane_value =
+              __ SmiFromWord32(tester.raw_assembler_for_testing()->AddNode(
+                  tester.raw_assembler_for_testing()
+                      ->machine()
+                      ->I32x4ExtractLane(lane),
+                  param));
+          __ StoreFixedArrayElement(vector, lane, lane_value,
+                                    SKIP_WRITE_BARRIER);
+        }
+        break;
+      }
+      default:
+        UNREACHABLE();
+        break;
+    }
+  }
+  __ Return(result_array);
+  return tester.GenerateCodeCloseAndEscape();
+}
+
+// Print the content of `value`, representing the register or stack slot
+// described by `operand`.
+void PrintStateValue(std::ostream& os, Isolate* isolate, Handle<Object> value,
+                     AllocatedOperand operand) {
+  switch (operand.representation()) {
+    case MachineRepresentation::kTagged:
+      if (value->IsSmi()) {
+        os << Smi::cast(*value)->value();
+      } else {
+        os << value->Number();
+      }
+      break;
+    case MachineRepresentation::kFloat32:
+    case MachineRepresentation::kFloat64:
+      os << value->Number();
+      break;
+    case MachineRepresentation::kSimd128: {
+      FixedArray* vector = FixedArray::cast(*value);
+      os << "[";
+      for (int lane = 0; lane < 4; lane++) {
+        os << Smi::cast(*vector->GetValueChecked<Smi>(isolate, lane))->value();
+        if (lane < 3) {
+          os << ", ";
+        }
+      }
+      os << "]";
+      break;
+    }
+    default:
+      UNREACHABLE();
+      break;
+  }
+  os << " (" << operand.representation() << " ";
+  if (operand.location_kind() == AllocatedOperand::REGISTER) {
+    os << "register";
+  } else {
+    DCHECK_EQ(operand.location_kind(), AllocatedOperand::STACK_SLOT);
+    os << "stack slot";
+  }
+  os << ")";
+}
+
+bool TestSimd128Moves() {
+#if defined(V8_TARGET_ARCH_MIPS) || defined(V8_TARGET_ARCH_MIPS64)
+  // TODO(mips): Implement support for the kSimd128 representation in
+  // AssembleMove and AssembleSwap on MIPS.
+  return false;
+#else
+  return CpuFeatures::SupportsWasmSimd128();
+#endif
+}
+
 }  // namespace
 
-// Wrapper around the CodeGenerator with the ability to randomly generate moves
-// and swaps which can then be executed. The `slots` map represents how many
-// slots should be allocated per representation. Parallel moves will then be
-// generated by randomly picking slots. Constants can be provided so that
-// parallel moves may use them.
+#undef __
+
+// Representation of a test environment. It describes a set of registers, stack
+// slots and constants available to the CodeGeneratorTester to perform moves
+// with. It has the ability to randomly generate lists of moves and run the code
+// generated by the CodeGeneratorTester.
 //
-// At the moment, only the following representations are tested:
+// The following representations are tested:
 //   - kTagged
 //   - kFloat32
 //   - kFloat64
-//   - kSimd128
+//   - kSimd128 (if supported)
 // There is no need to test using Word32 or Word64 as they are the same as
 // Tagged as far as the code generator is concerned.
-class CodeGeneratorTester : public HandleAndZoneScope {
+//
+// Testing the generated code is achieved by wrapping it around `setup` and
+// `teardown` functions, written using the CodeStubAssembler. The key idea here
+// is that `teardown` and the generated code share the same custom
+// CallDescriptor. This descriptor assigns parameters to either registers or
+// stack slot of a given representation and therefore essentially describes the
+// environment.
+//
+// What happens is the following:
+//
+//   - The `setup` function receives a FixedArray as the initial state. It
+//     unpacks it and passes each element as arguments to the generated code
+//     `test`. We also pass the `teardown` function as a first argument as well
+//     as a newly allocated FixedArray as a second argument which will hold the
+//     final results. Thanks to the custom CallDescriptor, registers and stack
+//     slots get initialised according to the content of the initial FixedArray.
+//
+//   - The `test` function performs the list of moves on its parameters and
+//     eventually tail-calls to its first parameter, which is the `teardown`
+//     function.
+//
+//   - The `teardown` function receives the final results as a FixedArray, fills
+//     it with the rest of its arguments and returns it. Thanks to the
+//     tail-call, this is as if the `setup` function called `teardown` directly,
+//     except now moves were performed!
+//
+// .----------------setup--------------------------.
+// | Take a FixedArray as parameters with          |
+// | all the initial values of registers           |
+// | and stack slots.                              | <- CodeStubAssembler
+// |                                               |
+// | Allocate a new FixedArray `result` with       |
+// | initial values.                               |
+// |                                               |
+// | Call test(teardown, result, state[0],         |
+// |           state[1], state[2], ...);           |
+// '-----------------------------------------------'
+//   |
+//   V
+// .----------------test-------------------------------.
+// | - Move(param3, param42);                          |
+// | - Swap(param64, param4);                          |
+// | - Move(param2, param6);                           | <- CodeGeneratorTester
+// | ...                                               |
+// |                                                   |
+// | // "teardown" is the first parameter as well as   |
+// | // the callee.                                    |
+// | TailCall teardown(teardown, result, param2, ...); |
+// '---------------------------------------------------'
+//   |
+//   V
+// .----------------teardown---------------------------.
+// | Fill in the incoming `result` FixedArray with all |
+// | parameters and return it.                         | <- CodeStubAssembler
+// '---------------------------------------------------'
+
+class TestEnvironment : public HandleAndZoneScope {
  public:
-  CodeGeneratorTester(std::map<MachineRepresentation, int> slots =
-                          std::map<MachineRepresentation, int>{},
-                      std::initializer_list<Constant> constants = {})
-      : info_(ArrayVector("test"), main_isolate(), main_zone(), Code::STUB),
-        descriptor_(Linkage::GetStubCallDescriptor(
-            main_isolate(), main_zone(), VoidDescriptor(main_isolate()), 0,
-            CallDescriptor::kNoFlags, Operator::kNoProperties,
-            MachineType::AnyTagged(), 0)),
-        linkage_(descriptor_),
-        blocks_(main_zone()),
-        sequence_(main_isolate(), main_zone(), &blocks_),
+  // These constants may be tuned to experiment with different environments.
+
+  static constexpr int kGeneralRegisterCount = 4;
+  static constexpr int kDoubleRegisterCount = 6;
+
+  static constexpr int kTaggedSlotCount = 64;
+  static constexpr int kFloat32SlotCount = 64;
+  static constexpr int kFloat64SlotCount = 64;
+  static constexpr int kSimd128SlotCount = 16;
+
+  // TODO(all): Test all types of constants (e.g. ExternalReference and
+  // HeapObject).
+  static constexpr int kSmiConstantCount = 4;
+  static constexpr int kFloatConstantCount = 4;
+  static constexpr int kDoubleConstantCount = 4;
+
+  TestEnvironment()
+      : blocks_(1, main_zone()),
+        code_(main_isolate(), main_zone(), &blocks_),
         rng_(CcTest::random_number_generator()),
-        frame_(descriptor_->CalculateFixedFrameSize()),
-        generator_(main_zone(), &frame_, &linkage_, &sequence_, &info_,
-                   base::Optional<OsrHelper>(), kNoSourcePosition, nullptr) {
-    // Keep track of all supported representations depending on what kind of
-    // stack slots are supported.
-    for (const auto& slot : slots) {
-      supported_reps_.push_back(slot.first);
+        supported_reps_({MachineRepresentation::kTagged,
+                         MachineRepresentation::kFloat32,
+                         MachineRepresentation::kFloat64}) {
+    // Create and initialize a single empty block in blocks_.
+    InstructionBlock* block = new (main_zone()) InstructionBlock(
+        main_zone(), RpoNumber::FromInt(0), RpoNumber::Invalid(),
+        RpoNumber::Invalid(), false, false);
+    block->set_ao_number(RpoNumber::FromInt(0));
+    blocks_[0] = block;
+
+    int stack_slot_count =
+        kTaggedSlotCount + kFloat32SlotCount + kFloat64SlotCount;
+    if (TestSimd128Moves()) {
+      stack_slot_count += kSimd128SlotCount;
+      supported_reps_.push_back(MachineRepresentation::kSimd128);
     }
+    // The "teardown" and "test" functions share the same descriptor with the
+    // following signature:
+    // ~~~
+    // FixedArray f(CodeObject* teardown, FixedArray preallocated_result,
+    //              // Tagged registers.
+    //              Object*, Object*, ...,
+    //              // FP registers.
+    //              Float32, Float64, Simd128, ...,
+    //              // Mixed stack slots.
+    //              Float64, Object*, Float32, Simd128, ...);
+    // ~~~
+    LocationSignature::Builder test_signature(
+        main_zone(), 1,
+        2 + kGeneralRegisterCount + kDoubleRegisterCount + stack_slot_count);
+
+    // The first parameter will be the code object of the "teardown"
+    // function. This way, the "test" function can tail-call to it.
+    test_signature.AddParam(LinkageLocation::ForRegister(
+        kReturnRegister0.code(), MachineType::AnyTagged()));
+
+    // The second parameter will be a pre-allocated FixedArray that the
+    // "teardown" function will fill with result and then return. We place this
+    // parameter on the first stack argument slot which is always -1. And
+    // therefore slots to perform moves on start at -2.
+    test_signature.AddParam(
+        LinkageLocation::ForCallerFrameSlot(-1, MachineType::AnyTagged()));
+    int slot_parameter_n = -2;
+    const int kTotalStackParameterCount = stack_slot_count + 1;
+
+    // Initialise registers.
+
+    // Make sure that the target has enough general purpose registers to
+    // generate a call to a CodeObject using this descriptor. We have reserved
+    // kReturnRegister0 as the first parameter, and the call will need a
+    // register to hold the CodeObject address. So the maximum number of
+    // registers left to test with is the number of available registers minus 2.
+    DCHECK_LE(
+        kGeneralRegisterCount,
+        RegisterConfiguration::Default()->num_allocatable_general_registers() -
+            2);
+
+    int32_t general_mask =
+        RegisterConfiguration::Default()->allocatable_general_codes_mask();
+    // kReturnRegister0 is used to hold the "teardown" code object, do not
+    // generate moves using it.
+    std::unique_ptr<const RegisterConfiguration> registers(
+        RegisterConfiguration::RestrictGeneralRegisters(
+            general_mask & ~kReturnRegister0.bit()));
+
+    for (int i = 0; i < kGeneralRegisterCount; i++) {
+      int code = registers->GetAllocatableGeneralCode(i);
+      AddRegister(&test_signature, MachineRepresentation::kTagged, code);
+    }
+    // We assume that Double, Float and Simd128 registers alias, depending on
+    // kSimpleFPAliasing. For this reason, we allocate a Float, Double and
+    // Simd128 together, hence the reason why `kDoubleRegisterCount` should be a
+    // multiple of 3 and 2 in case Simd128 is not supported.
+    static_assert(
+        ((kDoubleRegisterCount % 2) == 0) && ((kDoubleRegisterCount % 3) == 0),
+        "kDoubleRegisterCount should be a multiple of two and three.");
+    for (int i = 0; i < kDoubleRegisterCount; i += 2) {
+      if (kSimpleFPAliasing) {
+        // Allocate three registers at once if kSimd128 is supported, else
+        // allocate in pairs.
+        AddRegister(&test_signature, MachineRepresentation::kFloat32,
+                    registers->GetAllocatableFloatCode(i));
+        AddRegister(&test_signature, MachineRepresentation::kFloat64,
+                    registers->GetAllocatableDoubleCode(i + 1));
+        if (TestSimd128Moves()) {
+          AddRegister(&test_signature, MachineRepresentation::kSimd128,
+                      registers->GetAllocatableSimd128Code(i + 2));
+          i++;
+        }
+      } else {
+        // Make sure we do not allocate FP registers which alias. To do this, we
+        // allocate three 128-bit registers and then convert two of them to a
+        // float and a double. With this aliasing scheme, a Simd128 register
+        // aliases two Double registers and four Float registers, so we need to
+        // scale indexes accordingly:
+        //
+        //   Simd128 register: q0, q1, q2, q3,  q4, q5
+        //                      |   |       |    |
+        //                      V   V       V    V
+        //   Aliases:          s0, d2, q2, s12, d8, q5
+        //
+        // This isn't space efficient at all but suits our need.
+        static_assert(
+            kDoubleRegisterCount < 8,
+            "Arm has a q8 and a d16 register but no overlapping s32 register.");
+        int first_simd128 = registers->GetAllocatableSimd128Code(i);
+        int second_simd128 = registers->GetAllocatableSimd128Code(i + 1);
+        AddRegister(&test_signature, MachineRepresentation::kFloat32,
+                    first_simd128 * 4);
+        AddRegister(&test_signature, MachineRepresentation::kFloat64,
+                    second_simd128 * 2);
+        if (TestSimd128Moves()) {
+          int third_simd128 = registers->GetAllocatableSimd128Code(i + 2);
+          AddRegister(&test_signature, MachineRepresentation::kSimd128,
+                      third_simd128);
+          i++;
+        }
+      }
+    }
+
+    // Initialise stack slots.
+
+    std::map<MachineRepresentation, int> slots = {
+        {MachineRepresentation::kTagged, kTaggedSlotCount},
+        {MachineRepresentation::kFloat32, kFloat32SlotCount},
+        {MachineRepresentation::kFloat64, kFloat64SlotCount}};
+    if (TestSimd128Moves()) {
+      slots.emplace(MachineRepresentation::kSimd128, kSimd128SlotCount);
+    }
+
     // Allocate new slots until we run out of them.
     while (std::any_of(slots.cbegin(), slots.cend(),
                        [](const std::pair<MachineRepresentation, int>& entry) {
@@ -89,75 +524,301 @@
       if (entry->second > 0) {
         // Keep a map of (MachineRepresentation . std::vector<int>) with
         // allocated slots to pick from for each representation.
-        RegisterSlot(rep, frame_.AllocateSpillSlot(GetSlotSizeInBytes(rep)));
+        int slot = slot_parameter_n;
+        slot_parameter_n -= (GetSlotSizeInBytes(rep) / kPointerSize);
+        AddStackSlot(&test_signature, rep, slot);
         entry->second--;
       }
     }
-    for (auto constant : constants) {
-      int virtual_register = AllocateConstant(constant);
-      // Associate constants with their compatible representations.
-      // TODO(all): Test all types of constants.
-      switch (constant.type()) {
-        // Integer constants are always moved to a tagged location, whatever
-        // their sizes.
-        case Constant::kInt32:
-        case Constant::kInt64:
-          RegisterConstant(MachineRepresentation::kTagged, virtual_register);
-          break;
-        // FP constants may be moved to a tagged location using a heap number,
-        // or directly to a location of the same size.
-        case Constant::kFloat32:
-          RegisterConstant(MachineRepresentation::kTagged, virtual_register);
-          RegisterConstant(MachineRepresentation::kFloat32, virtual_register);
-          break;
-        case Constant::kFloat64:
-          RegisterConstant(MachineRepresentation::kTagged, virtual_register);
-          RegisterConstant(MachineRepresentation::kFloat64, virtual_register);
-          break;
-        default:
-          break;
-      }
+
+    // Initialise random constants.
+
+    // While constants do not know about Smis, we need to be able to
+    // differentiate between a pointer to a HeapNumber and a integer. For this
+    // reason, we make sure all integers are Smis, including constants.
+    for (int i = 0; i < kSmiConstantCount; i++) {
+      intptr_t smi_value = reinterpret_cast<intptr_t>(
+          Smi::FromInt(rng_->NextInt(Smi::kMaxValue)));
+      Constant constant = kPointerSize == 8
+                              ? Constant(static_cast<int64_t>(smi_value))
+                              : Constant(static_cast<int32_t>(smi_value));
+      AddConstant(MachineRepresentation::kTagged, AllocateConstant(constant));
     }
-    // Force a frame to be created.
-    generator_.frame_access_state()->MarkHasFrame(true);
-    generator_.AssembleConstructFrame();
-    // TODO(all): Generate a stack check here so that we fail gracefully if the
-    // frame is too big.
+    // Float and Double constants can be moved to both Tagged and FP registers
+    // or slots. Register them as compatible with both FP and Tagged
+    // destinations.
+    for (int i = 0; i < kFloatConstantCount; i++) {
+      int virtual_register =
+          AllocateConstant(Constant(DoubleToFloat32(rng_->NextDouble())));
+      AddConstant(MachineRepresentation::kTagged, virtual_register);
+      AddConstant(MachineRepresentation::kFloat32, virtual_register);
+    }
+    for (int i = 0; i < kDoubleConstantCount; i++) {
+      int virtual_register = AllocateConstant(Constant(rng_->NextDouble()));
+      AddConstant(MachineRepresentation::kTagged, virtual_register);
+      AddConstant(MachineRepresentation::kFloat64, virtual_register);
+    }
+
+    // The "teardown" function returns a FixedArray with the resulting state.
+    test_signature.AddReturn(LinkageLocation::ForRegister(
+        kReturnRegister0.code(), MachineType::AnyTagged()));
+
+    test_descriptor_ = new (main_zone())
+        CallDescriptor(CallDescriptor::kCallCodeObject,  // kind
+                       MachineType::AnyTagged(),         // target MachineType
+                       LinkageLocation::ForAnyRegister(
+                           MachineType::AnyTagged()),  // target location
+                       test_signature.Build(),         // location_sig
+                       kTotalStackParameterCount,      // stack_parameter_count
+                       Operator::kNoProperties,        // properties
+                       kNoCalleeSaved,                 // callee-saved registers
+                       kNoCalleeSaved,                 // callee-saved fp
+                       CallDescriptor::kNoFlags);      // flags
   }
 
   int AllocateConstant(Constant constant) {
-    int virtual_register = sequence_.NextVirtualRegister();
-    sequence_.AddConstant(virtual_register, constant);
+    int virtual_register = code_.NextVirtualRegister();
+    code_.AddConstant(virtual_register, constant);
     return virtual_register;
   }
 
   // Register a constant referenced by `virtual_register` as compatible with
   // `rep`.
-  void RegisterConstant(MachineRepresentation rep, int virtual_register) {
-    auto entry = constants_.find(rep);
-    if (entry == constants_.end()) {
-      std::vector<int> vregs = {virtual_register};
-      constants_.emplace(rep, vregs);
+  void AddConstant(MachineRepresentation rep, int virtual_register) {
+    auto entry = allocated_constants_.find(rep);
+    if (entry == allocated_constants_.end()) {
+      allocated_constants_.emplace(
+          rep, std::vector<ConstantOperand>{ConstantOperand(virtual_register)});
     } else {
-      entry->second.push_back(virtual_register);
+      entry->second.emplace_back(virtual_register);
     }
   }
 
-  void RegisterSlot(MachineRepresentation rep, int slot) {
+  // Register a new register or stack slot as compatible with `rep`. As opposed
+  // to constants, registers and stack slots are written to on `setup` and read
+  // from on `teardown`. Therefore they are part of the environment's layout,
+  // and are parameters of the `test` function.
+
+  void AddRegister(LocationSignature::Builder* test_signature,
+                   MachineRepresentation rep, int code) {
+    AllocatedOperand operand(AllocatedOperand::REGISTER, rep, code);
+    layout_.push_back(operand);
+    test_signature->AddParam(LinkageLocation::ForRegister(
+        code, MachineType::TypeForRepresentation(rep)));
+    auto entry = allocated_registers_.find(rep);
+    if (entry == allocated_registers_.end()) {
+      allocated_registers_.emplace(rep, std::vector<AllocatedOperand>{operand});
+    } else {
+      entry->second.push_back(operand);
+    }
+  }
+
+  void AddStackSlot(LocationSignature::Builder* test_signature,
+                    MachineRepresentation rep, int slot) {
+    AllocatedOperand operand(AllocatedOperand::STACK_SLOT, rep, slot);
+    layout_.push_back(operand);
+    test_signature->AddParam(LinkageLocation::ForCallerFrameSlot(
+        slot, MachineType::TypeForRepresentation(rep)));
     auto entry = allocated_slots_.find(rep);
     if (entry == allocated_slots_.end()) {
-      std::vector<int> slots = {slot};
-      allocated_slots_.emplace(rep, slots);
+      allocated_slots_.emplace(rep, std::vector<AllocatedOperand>{operand});
     } else {
-      entry->second.push_back(slot);
+      entry->second.push_back(operand);
     }
   }
 
-  enum PushTypeFlag {
-    kRegisterPush = CodeGenerator::kRegisterPush,
-    kStackSlotPush = CodeGenerator::kStackSlotPush,
-    kScalarPush = CodeGenerator::kScalarPush
-  };
+  // Generate a random initial state to test moves against. A "state" is a
+  // packed FixedArray with Smis and HeapNumbers, according to the layout of the
+  // environment.
+  Handle<FixedArray> GenerateInitialState() {
+    Handle<FixedArray> state = main_isolate()->factory()->NewFixedArray(
+        static_cast<int>(layout_.size()));
+    for (int i = 0; i < state->length(); i++) {
+      switch (layout_[i].representation()) {
+        case MachineRepresentation::kTagged:
+          state->set(i, Smi::FromInt(rng_->NextInt(Smi::kMaxValue)));
+          break;
+        case MachineRepresentation::kFloat32:
+          // HeapNumbers are Float64 values. However, we will convert it to a
+          // Float32 and back inside `setup` and `teardown`. Make sure the value
+          // we pick fits in a Float32.
+          state->set(
+              i, *main_isolate()->factory()->NewHeapNumber(
+                     static_cast<double>(DoubleToFloat32(rng_->NextDouble()))));
+          break;
+        case MachineRepresentation::kFloat64:
+          state->set(
+              i, *main_isolate()->factory()->NewHeapNumber(rng_->NextDouble()));
+          break;
+        case MachineRepresentation::kSimd128: {
+          Handle<FixedArray> vector =
+              main_isolate()->factory()->NewFixedArray(4);
+          for (int lane = 0; lane < 4; lane++) {
+            vector->set(lane, Smi::FromInt(rng_->NextInt(Smi::kMaxValue)));
+          }
+          state->set(i, *vector);
+          break;
+        }
+        default:
+          UNREACHABLE();
+          break;
+      }
+    }
+    return state;
+  }
+
+  // Run the code generated by a CodeGeneratorTester against `state_in` and
+  // return a new resulting state.
+  Handle<FixedArray> Run(Handle<Code> test, Handle<FixedArray> state_in) {
+    Handle<FixedArray> state_out = main_isolate()->factory()->NewFixedArray(
+        static_cast<int>(layout_.size()));
+    {
+      Handle<Code> setup =
+          BuildSetupFunction(main_isolate(), test_descriptor_, layout_);
+      // FunctionTester maintains its own HandleScope which means that its
+      // return value will be freed along with it. Copy the result into
+      // state_out.
+      FunctionTester ft(setup, 2);
+      Handle<FixedArray> result = ft.CallChecked<FixedArray>(test, state_in);
+      CHECK_EQ(result->length(), state_in->length());
+      result->CopyTo(0, *state_out, 0, result->length());
+    }
+    return state_out;
+  }
+
+  // For a given operand representing either a register or a stack slot, return
+  // what position it should live in inside a FixedArray state.
+  int OperandToStatePosition(const AllocatedOperand& operand) const {
+    // Search `layout_` for `operand`.
+    auto it = std::find_if(layout_.cbegin(), layout_.cend(),
+                           [operand](const AllocatedOperand& this_operand) {
+                             return this_operand.Equals(operand);
+                           });
+    DCHECK_NE(it, layout_.cend());
+    return static_cast<int>(std::distance(layout_.cbegin(), it));
+  }
+
+  // Perform the given list of moves on `state_in` and return a newly allocated
+  // state with the results.
+  Handle<FixedArray> SimulateMoves(ParallelMove* moves,
+                                   Handle<FixedArray> state_in) {
+    Handle<FixedArray> state_out = main_isolate()->factory()->NewFixedArray(
+        static_cast<int>(layout_.size()));
+    // We do not want to modify `state_in` in place so perform the moves on a
+    // copy.
+    state_in->CopyTo(0, *state_out, 0, state_in->length());
+    for (auto move : *moves) {
+      int to_index =
+          OperandToStatePosition(AllocatedOperand::cast(move->destination()));
+      InstructionOperand from = move->source();
+      if (from.IsConstant()) {
+        Constant constant =
+            code_.GetConstant(ConstantOperand::cast(from).virtual_register());
+        Handle<Object> constant_value;
+        switch (constant.type()) {
+          case Constant::kInt32:
+            constant_value =
+                Handle<Smi>(reinterpret_cast<Smi*>(
+                                static_cast<intptr_t>(constant.ToInt32())),
+                            main_isolate());
+            break;
+          case Constant::kInt64:
+            constant_value =
+                Handle<Smi>(reinterpret_cast<Smi*>(
+                                static_cast<intptr_t>(constant.ToInt64())),
+                            main_isolate());
+            break;
+          case Constant::kFloat32:
+            constant_value = main_isolate()->factory()->NewHeapNumber(
+                static_cast<double>(constant.ToFloat32()));
+            break;
+          case Constant::kFloat64:
+            constant_value = main_isolate()->factory()->NewHeapNumber(
+                constant.ToFloat64().value());
+            break;
+          default:
+            UNREACHABLE();
+            break;
+        }
+        state_out->set(to_index, *constant_value);
+      } else {
+        int from_index = OperandToStatePosition(AllocatedOperand::cast(from));
+        state_out->set(to_index, *state_out->GetValueChecked<Object>(
+                                     main_isolate(), from_index));
+      }
+    }
+    return state_out;
+  }
+
+  // Perform the given list of swaps on `state_in` and return a newly allocated
+  // state with the results.
+  Handle<FixedArray> SimulateSwaps(ParallelMove* swaps,
+                                   Handle<FixedArray> state_in) {
+    Handle<FixedArray> state_out = main_isolate()->factory()->NewFixedArray(
+        static_cast<int>(layout_.size()));
+    // We do not want to modify `state_in` in place so perform the swaps on a
+    // copy.
+    state_in->CopyTo(0, *state_out, 0, state_in->length());
+    for (auto swap : *swaps) {
+      int lhs_index =
+          OperandToStatePosition(AllocatedOperand::cast(swap->destination()));
+      int rhs_index =
+          OperandToStatePosition(AllocatedOperand::cast(swap->source()));
+      Handle<Object> lhs =
+          state_out->GetValueChecked<Object>(main_isolate(), lhs_index);
+      Handle<Object> rhs =
+          state_out->GetValueChecked<Object>(main_isolate(), rhs_index);
+      state_out->set(lhs_index, *rhs);
+      state_out->set(rhs_index, *lhs);
+    }
+    return state_out;
+  }
+
+  // Compare the given state with a reference.
+  void CheckState(Handle<FixedArray> actual, Handle<FixedArray> expected) {
+    for (int i = 0; i < static_cast<int>(layout_.size()); i++) {
+      Handle<Object> actual_value =
+          actual->GetValueChecked<Object>(main_isolate(), i);
+      Handle<Object> expected_value =
+          expected->GetValueChecked<Object>(main_isolate(), i);
+      if (!CompareValues(actual_value, expected_value,
+                         layout_[i].representation())) {
+        std::ostringstream expected_str;
+        PrintStateValue(expected_str, main_isolate(), expected_value,
+                        layout_[i]);
+        std::ostringstream actual_str;
+        PrintStateValue(actual_str, main_isolate(), actual_value, layout_[i]);
+        V8_Fatal(__FILE__, __LINE__, "Expected: '%s' but got '%s'",
+                 expected_str.str().c_str(), actual_str.str().c_str());
+      }
+    }
+  }
+
+  bool CompareValues(Handle<Object> actual, Handle<Object> expected,
+                     MachineRepresentation rep) {
+    switch (rep) {
+      case MachineRepresentation::kTagged:
+      case MachineRepresentation::kFloat32:
+      case MachineRepresentation::kFloat64:
+        return actual->StrictEquals(*expected);
+      case MachineRepresentation::kSimd128:
+        for (int lane = 0; lane < 4; lane++) {
+          Handle<Smi> actual_lane =
+              FixedArray::cast(*actual)->GetValueChecked<Smi>(main_isolate(),
+                                                              lane);
+          Handle<Smi> expected_lane =
+              FixedArray::cast(*expected)->GetValueChecked<Smi>(main_isolate(),
+                                                                lane);
+          if (!actual_lane->StrictEquals(*expected_lane)) {
+            return false;
+          }
+        }
+        return true;
+      default:
+        UNREACHABLE();
+        break;
+    }
+  }
 
   enum OperandConstraint {
     kNone,
@@ -219,8 +880,9 @@
                                          MachineRepresentation rep) {
     // Only generate a Constant if the operand is a source and we have a
     // constant with a compatible representation in stock.
-    bool generate_constant = (constraint != kCannotBeConstant) &&
-                             (constants_.find(rep) != constants_.end());
+    bool generate_constant =
+        (constraint != kCannotBeConstant) &&
+        (allocated_constants_.find(rep) != allocated_constants_.end());
     switch (rng_->NextInt(generate_constant ? 3 : 2)) {
       case 0:
         return CreateRandomStackSlotOperand(rep);
@@ -232,51 +894,98 @@
     UNREACHABLE();
   }
 
-  InstructionOperand CreateRandomRegisterOperand(MachineRepresentation rep) {
-    int code;
-    const RegisterConfiguration* conf = RegisterConfiguration::Default();
-    switch (rep) {
-      case MachineRepresentation::kFloat32: {
-        int index = rng_->NextInt(conf->num_allocatable_float_registers());
-        code = conf->RegisterConfiguration::GetAllocatableFloatCode(index);
-        break;
-      }
-      case MachineRepresentation::kFloat64: {
-        int index = rng_->NextInt(conf->num_allocatable_double_registers());
-        code = conf->RegisterConfiguration::GetAllocatableDoubleCode(index);
-        break;
-      }
-      case MachineRepresentation::kSimd128: {
-        int index = rng_->NextInt(conf->num_allocatable_simd128_registers());
-        code = conf->RegisterConfiguration::GetAllocatableSimd128Code(index);
-        break;
-      }
-      case MachineRepresentation::kTagged: {
-        // Pick an allocatable register that is not the return register.
-        do {
-          int index = rng_->NextInt(conf->num_allocatable_general_registers());
-          code = conf->RegisterConfiguration::GetAllocatableGeneralCode(index);
-        } while (code == kReturnRegister0.code());
-        break;
-      }
-      default:
-        UNREACHABLE();
-        break;
-    }
-    return AllocatedOperand(LocationOperand::REGISTER, rep, code);
+  AllocatedOperand CreateRandomRegisterOperand(MachineRepresentation rep) {
+    int index =
+        rng_->NextInt(static_cast<int>(allocated_registers_[rep].size()));
+    return allocated_registers_[rep][index];
   }
 
-  InstructionOperand CreateRandomStackSlotOperand(MachineRepresentation rep) {
+  AllocatedOperand CreateRandomStackSlotOperand(MachineRepresentation rep) {
     int index = rng_->NextInt(static_cast<int>(allocated_slots_[rep].size()));
-    return AllocatedOperand(LocationOperand::STACK_SLOT, rep,
-                            allocated_slots_[rep][index]);
+    return allocated_slots_[rep][index];
   }
 
-  InstructionOperand CreateRandomConstant(MachineRepresentation rep) {
-    int index = rng_->NextInt(static_cast<int>(constants_[rep].size()));
-    return ConstantOperand(constants_[rep][index]);
+  ConstantOperand CreateRandomConstant(MachineRepresentation rep) {
+    int index =
+        rng_->NextInt(static_cast<int>(allocated_constants_[rep].size()));
+    return allocated_constants_[rep][index];
   }
 
+  v8::base::RandomNumberGenerator* rng() const { return rng_; }
+  InstructionSequence* code() { return &code_; }
+  CallDescriptor* test_descriptor() { return test_descriptor_; }
+
+ private:
+  ZoneVector<InstructionBlock*> blocks_;
+  InstructionSequence code_;
+  v8::base::RandomNumberGenerator* rng_;
+  // The layout describes the type of each element in the environment, in order.
+  std::vector<AllocatedOperand> layout_;
+  CallDescriptor* test_descriptor_;
+  // Allocated constants, registers and stack slots that we can generate moves
+  // with. Each per compatible representation.
+  std::vector<MachineRepresentation> supported_reps_;
+  std::map<MachineRepresentation, std::vector<ConstantOperand>>
+      allocated_constants_;
+  std::map<MachineRepresentation, std::vector<AllocatedOperand>>
+      allocated_registers_;
+  std::map<MachineRepresentation, std::vector<AllocatedOperand>>
+      allocated_slots_;
+};
+
+// static
+constexpr int TestEnvironment::kGeneralRegisterCount;
+constexpr int TestEnvironment::kDoubleRegisterCount;
+constexpr int TestEnvironment::kTaggedSlotCount;
+constexpr int TestEnvironment::kFloat32SlotCount;
+constexpr int TestEnvironment::kFloat64SlotCount;
+constexpr int TestEnvironment::kSimd128SlotCount;
+constexpr int TestEnvironment::kSmiConstantCount;
+constexpr int TestEnvironment::kFloatConstantCount;
+constexpr int TestEnvironment::kDoubleConstantCount;
+
+// Wrapper around the CodeGenerator. Code generated by this can only be called
+// using the given `TestEnvironment`.
+//
+// TODO(planglois): We execute moves on stack parameters only which restricts
+// ourselves to small positive offsets relative to the frame pointer. We should
+// test large and negative offsets too. A way to do this would be to move some
+// stack parameters to local spill slots and create artificial stack space
+// between them.
+class CodeGeneratorTester {
+ public:
+  explicit CodeGeneratorTester(TestEnvironment* environment)
+      : zone_(environment->main_zone()),
+        info_(ArrayVector("test"), environment->main_zone(), Code::STUB),
+        linkage_(environment->test_descriptor()),
+        frame_(environment->test_descriptor()->CalculateFixedFrameSize()),
+        generator_(environment->main_zone(), &frame_, &linkage_,
+                   environment->code(), &info_, environment->main_isolate(),
+                   base::Optional<OsrHelper>(), kNoSourcePosition, nullptr,
+                   nullptr) {
+    // Force a frame to be created.
+    generator_.frame_access_state()->MarkHasFrame(true);
+    generator_.AssembleConstructFrame();
+    // TODO(all): Generate a stack check here so that we fail gracefully if the
+    // frame is too big.
+  }
+
+  Instruction* CreateTailCall(int stack_slot_delta) {
+    int optional_padding_slot = stack_slot_delta;
+    InstructionOperand callee[] = {
+        ImmediateOperand(ImmediateOperand::INLINE, optional_padding_slot),
+        ImmediateOperand(ImmediateOperand::INLINE, stack_slot_delta)};
+    Instruction* tail_call = Instruction::New(zone_, kArchTailCallCodeObject, 0,
+                                              nullptr, 2, callee, 0, nullptr);
+    return tail_call;
+  }
+
+  enum PushTypeFlag {
+    kRegisterPush = CodeGenerator::kRegisterPush,
+    kStackSlotPush = CodeGenerator::kStackSlotPush,
+    kScalarPush = CodeGenerator::kScalarPush
+  };
+
   void CheckAssembleTailCallGaps(Instruction* instr,
                                  int first_unused_stack_slot,
                                  CodeGeneratorTester::PushTypeFlag push_type) {
@@ -318,152 +1027,149 @@
   }
 
   Handle<Code> Finalize() {
-    InstructionOperand zero = ImmediateOperand(ImmediateOperand::INLINE, 0);
-    generator_.AssembleReturn(&zero);
-
     generator_.FinishCode();
     generator_.safepoints()->Emit(generator_.tasm(),
                                   frame_.GetTotalFrameSlotCount());
     return generator_.FinalizeCode();
   }
 
-  void Disassemble() {
-    HandleScope scope(main_isolate());
-    Handle<Code> code = Finalize();
-    if (FLAG_print_code) {
-      code->Print();
-    }
-  }
+  Handle<Code> FinalizeForExecuting() {
+    InstructionSequence* sequence = generator_.code();
 
-  void Run() {
-    HandleScope scope(main_isolate());
-    Handle<Code> code = Finalize();
-    if (FLAG_print_code) {
-      code->Print();
-    }
-    FunctionTester ft(code);
-    ft.Call();
-  }
+    sequence->StartBlock(RpoNumber::FromInt(0));
+    // The environment expects this code to tail-call to it's first parameter
+    // placed in `kReturnRegister0`.
+    sequence->AddInstruction(Instruction::New(zone_, kArchPrepareTailCall));
 
-  v8::base::RandomNumberGenerator* rng() const { return rng_; }
+    // We use either zero or one slots.
+    int first_unused_stack_slot =
+        V8_TARGET_ARCH_STORES_RETURN_ADDRESS_ON_STACK ? 1 : 0;
+    int optional_padding_slot = first_unused_stack_slot;
+    InstructionOperand callee[] = {
+        AllocatedOperand(LocationOperand::REGISTER,
+                         MachineRepresentation::kTagged,
+                         kReturnRegister0.code()),
+        ImmediateOperand(ImmediateOperand::INLINE, optional_padding_slot),
+        ImmediateOperand(ImmediateOperand::INLINE, first_unused_stack_slot)};
+    Instruction* tail_call = Instruction::New(zone_, kArchTailCallCodeObject, 0,
+                                              nullptr, 3, callee, 0, nullptr);
+    sequence->AddInstruction(tail_call);
+    sequence->EndBlock(RpoNumber::FromInt(0));
+
+    generator_.AssembleBlock(
+        sequence->InstructionBlockAt(RpoNumber::FromInt(0)));
+
+    return Finalize();
+  }
 
  private:
+  Zone* zone_;
   CompilationInfo info_;
-  CallDescriptor* descriptor_;
   Linkage linkage_;
-  ZoneVector<InstructionBlock*> blocks_;
-  InstructionSequence sequence_;
-  std::vector<MachineRepresentation> supported_reps_;
-  std::map<MachineRepresentation, std::vector<int>> allocated_slots_;
-  std::map<MachineRepresentation, std::vector<int>> constants_;
-  v8::base::RandomNumberGenerator* rng_;
   Frame frame_;
   CodeGenerator generator_;
 };
 
 // The following fuzz tests will assemble a lot of moves, wrap them in
-// executable native code and run them. At this time, we only check that
-// something is actually generated, and that it runs on hardware or the
-// simulator.
-
-// TODO(all): It would be great to record the data on the stack after all moves
-// are executed so that we could test the functionality in an architecture
-// independent way. We would also have to make sure we generate moves compatible
-// with each other as the gap-resolver tests do.
+// executable native code and run them. In order to check that moves were
+// performed correctly, we need to setup an environment with an initial state
+// and get it back after the list of moves were performed.
+//
+// We have two components to do this: TestEnvironment and CodeGeneratorTester.
+//
+// The TestEnvironment is in charge of bringing up an environment consisting of
+// a set of registers, stack slots and constants, with initial values in
+// them. The CodeGeneratorTester is a wrapper around the CodeGenerator and its
+// only purpose is to generate code for a list of moves. The TestEnvironment is
+// then able to run this code against the environment and return a resulting
+// state.
+//
+// A "state" here is a packed FixedArray with tagged values which can either be
+// Smis or HeapNumbers. When calling TestEnvironment::Run(...), registers and
+// stack slots will be initialised according to this FixedArray. A new
+// FixedArray is returned containing values that were moved by the generated
+// code.
+//
+// And finally, we are able to compare the resulting FixedArray against a
+// reference, computed with a simulation of AssembleMove and AssembleSwap. See
+// SimulateMoves and SimulateSwaps.
 
 TEST(FuzzAssembleMove) {
-  // Test small and potentially large ranges separately. Note that the number of
-  // slots affects how much stack is allocated when running the generated code.
-  // This means we have to be careful not to exceed the stack limit, which is
-  // lower on Windows.
-  for (auto n : {64, 500}) {
-    std::map<MachineRepresentation, int> slots = {
-        {MachineRepresentation::kTagged, n},
-        {MachineRepresentation::kFloat32, n},
-        {MachineRepresentation::kFloat64, n}};
-    if (CpuFeatures::SupportsWasmSimd128()) {
-      // Generate fewer 128-bit slots.
-      slots.emplace(MachineRepresentation::kSimd128, n / 4);
-    }
-    CodeGeneratorTester c(
-        slots,
-        {Constant(0), Constant(1), Constant(2), Constant(3), Constant(4),
-         Constant(5), Constant(6), Constant(7),
-         Constant(static_cast<float>(0.1)), Constant(static_cast<float>(0.2)),
-         Constant(static_cast<float>(0.3)), Constant(static_cast<float>(0.4)),
-         Constant(static_cast<double>(0.5)), Constant(static_cast<double>(0.6)),
-         Constant(static_cast<double>(0.7)),
-         Constant(static_cast<double>(0.8))});
-    ParallelMove* moves = c.GenerateRandomMoves(1000);
-    for (const auto m : *moves) {
-      c.CheckAssembleMove(&m->source(), &m->destination());
-    }
-    c.Run();
+  TestEnvironment env;
+  CodeGeneratorTester c(&env);
+
+  Handle<FixedArray> state_in = env.GenerateInitialState();
+  ParallelMove* moves = env.GenerateRandomMoves(1000);
+
+  for (auto m : *moves) {
+    c.CheckAssembleMove(&m->source(), &m->destination());
   }
+
+  Handle<Code> test = c.FinalizeForExecuting();
+  if (FLAG_print_code) {
+    test->Print();
+  }
+
+  Handle<FixedArray> actual = env.Run(test, state_in);
+  Handle<FixedArray> expected = env.SimulateMoves(moves, state_in);
+  env.CheckState(actual, expected);
 }
 
 TEST(FuzzAssembleSwap) {
-  // Test small and potentially large ranges separately. Note that the number of
-  // slots affects how much stack is allocated when running the generated code.
-  // This means we have to be careful not to exceed the stack limit, which is
-  // lower on Windows.
-  for (auto n : {64, 500}) {
-    std::map<MachineRepresentation, int> slots = {
-        {MachineRepresentation::kTagged, n},
-        {MachineRepresentation::kFloat32, n},
-        {MachineRepresentation::kFloat64, n}};
-    if (CpuFeatures::SupportsWasmSimd128()) {
-      // Generate fewer 128-bit slots.
-      slots.emplace(MachineRepresentation::kSimd128, n / 4);
-    }
-    CodeGeneratorTester c(slots);
-    ParallelMove* moves = c.GenerateRandomSwaps(1000);
-    for (const auto m : *moves) {
-      c.CheckAssembleSwap(&m->source(), &m->destination());
-    }
-    c.Run();
+  TestEnvironment env;
+  CodeGeneratorTester c(&env);
+
+  Handle<FixedArray> state_in = env.GenerateInitialState();
+  ParallelMove* swaps = env.GenerateRandomSwaps(1000);
+
+  for (auto s : *swaps) {
+    c.CheckAssembleSwap(&s->source(), &s->destination());
   }
+
+  Handle<Code> test = c.FinalizeForExecuting();
+  if (FLAG_print_code) {
+    test->Print();
+  }
+
+  Handle<FixedArray> actual = env.Run(test, state_in);
+  Handle<FixedArray> expected = env.SimulateSwaps(swaps, state_in);
+  env.CheckState(actual, expected);
 }
 
 TEST(FuzzAssembleMoveAndSwap) {
-  // Test small and potentially large ranges separately. Note that the number of
-  // slots affects how much stack is allocated when running the generated code.
-  // This means we have to be careful not to exceed the stack limit, which is
-  // lower on Windows.
-  for (auto n : {64, 500}) {
-    std::map<MachineRepresentation, int> slots = {
-        {MachineRepresentation::kTagged, n},
-        {MachineRepresentation::kFloat32, n},
-        {MachineRepresentation::kFloat64, n}};
-    if (CpuFeatures::SupportsWasmSimd128()) {
-      // Generate fewer 128-bit slots.
-      slots.emplace(MachineRepresentation::kSimd128, n / 4);
+  TestEnvironment env;
+  CodeGeneratorTester c(&env);
+
+  Handle<FixedArray> state_in = env.GenerateInitialState();
+  Handle<FixedArray> expected =
+      env.main_isolate()->factory()->NewFixedArray(state_in->length());
+  state_in->CopyTo(0, *expected, 0, state_in->length());
+
+  for (int i = 0; i < 1000; i++) {
+    // Randomly alternate between swaps and moves.
+    if (env.rng()->NextInt(2) == 0) {
+      ParallelMove* move = env.GenerateRandomMoves(1);
+      expected = env.SimulateMoves(move, expected);
+      c.CheckAssembleMove(&move->at(0)->source(), &move->at(0)->destination());
+    } else {
+      ParallelMove* swap = env.GenerateRandomSwaps(1);
+      expected = env.SimulateSwaps(swap, expected);
+      c.CheckAssembleSwap(&swap->at(0)->source(), &swap->at(0)->destination());
     }
-    CodeGeneratorTester c(
-        slots,
-        {Constant(0), Constant(1), Constant(2), Constant(3), Constant(4),
-         Constant(5), Constant(6), Constant(7),
-         Constant(static_cast<float>(0.1)), Constant(static_cast<float>(0.2)),
-         Constant(static_cast<float>(0.3)), Constant(static_cast<float>(0.4)),
-         Constant(static_cast<double>(0.5)), Constant(static_cast<double>(0.6)),
-         Constant(static_cast<double>(0.7)),
-         Constant(static_cast<double>(0.8))});
-    for (int i = 0; i < 1000; i++) {
-      // Randomly alternate between swaps and moves.
-      if (c.rng()->NextInt(2) == 0) {
-        MoveOperands* move = c.GenerateRandomMoves(1)->at(0);
-        c.CheckAssembleMove(&move->source(), &move->destination());
-      } else {
-        MoveOperands* move = c.GenerateRandomSwaps(1)->at(0);
-        c.CheckAssembleSwap(&move->source(), &move->destination());
-      }
-    }
-    c.Run();
   }
+
+  Handle<Code> test = c.FinalizeForExecuting();
+  if (FLAG_print_code) {
+    test->Print();
+  }
+
+  Handle<FixedArray> actual = env.Run(test, state_in);
+  env.CheckState(actual, expected);
 }
 
 TEST(AssembleTailCallGap) {
   const RegisterConfiguration* conf = RegisterConfiguration::Default();
+  TestEnvironment env;
 
   // This test assumes at least 4 registers are allocatable.
   CHECK_LE(4, conf->num_allocatable_general_registers());
@@ -511,80 +1217,89 @@
 
   {
     // Generate a series of register pushes only.
-    CodeGeneratorTester c;
-    Instruction* instr = Instruction::New(c.main_zone(), kArchNop);
+    CodeGeneratorTester c(&env);
+    Instruction* instr = c.CreateTailCall(first_slot + 4);
     instr
         ->GetOrCreateParallelMove(Instruction::FIRST_GAP_POSITION,
-                                  c.main_zone())
+                                  env.main_zone())
         ->AddMove(r3, slot_0);
     instr
         ->GetOrCreateParallelMove(Instruction::FIRST_GAP_POSITION,
-                                  c.main_zone())
+                                  env.main_zone())
         ->AddMove(r2, slot_1);
     instr
         ->GetOrCreateParallelMove(Instruction::FIRST_GAP_POSITION,
-                                  c.main_zone())
+                                  env.main_zone())
         ->AddMove(r1, slot_2);
     instr
         ->GetOrCreateParallelMove(Instruction::FIRST_GAP_POSITION,
-                                  c.main_zone())
+                                  env.main_zone())
         ->AddMove(r0, slot_3);
 
     c.CheckAssembleTailCallGaps(instr, first_slot + 4,
                                 CodeGeneratorTester::kRegisterPush);
-    c.Disassemble();
+    Handle<Code> code = c.Finalize();
+    if (FLAG_print_code) {
+      code->Print();
+    }
   }
 
   {
     // Generate a series of stack pushes only.
-    CodeGeneratorTester c;
-    Instruction* instr = Instruction::New(c.main_zone(), kArchNop);
+    CodeGeneratorTester c(&env);
+    Instruction* instr = c.CreateTailCall(first_slot + 4);
     instr
         ->GetOrCreateParallelMove(Instruction::FIRST_GAP_POSITION,
-                                  c.main_zone())
+                                  env.main_zone())
         ->AddMove(slot_minus_4, slot_0);
     instr
         ->GetOrCreateParallelMove(Instruction::FIRST_GAP_POSITION,
-                                  c.main_zone())
+                                  env.main_zone())
         ->AddMove(slot_minus_3, slot_1);
     instr
         ->GetOrCreateParallelMove(Instruction::FIRST_GAP_POSITION,
-                                  c.main_zone())
+                                  env.main_zone())
         ->AddMove(slot_minus_2, slot_2);
     instr
         ->GetOrCreateParallelMove(Instruction::FIRST_GAP_POSITION,
-                                  c.main_zone())
+                                  env.main_zone())
         ->AddMove(slot_minus_1, slot_3);
 
     c.CheckAssembleTailCallGaps(instr, first_slot + 4,
                                 CodeGeneratorTester::kStackSlotPush);
-    c.Disassemble();
+    Handle<Code> code = c.Finalize();
+    if (FLAG_print_code) {
+      code->Print();
+    }
   }
 
   {
     // Generate a mix of stack and register pushes.
-    CodeGeneratorTester c;
-    Instruction* instr = Instruction::New(c.main_zone(), kArchNop);
+    CodeGeneratorTester c(&env);
+    Instruction* instr = c.CreateTailCall(first_slot + 4);
     instr
         ->GetOrCreateParallelMove(Instruction::FIRST_GAP_POSITION,
-                                  c.main_zone())
+                                  env.main_zone())
         ->AddMove(slot_minus_2, slot_0);
     instr
         ->GetOrCreateParallelMove(Instruction::FIRST_GAP_POSITION,
-                                  c.main_zone())
+                                  env.main_zone())
         ->AddMove(r1, slot_1);
     instr
         ->GetOrCreateParallelMove(Instruction::FIRST_GAP_POSITION,
-                                  c.main_zone())
+                                  env.main_zone())
         ->AddMove(slot_minus_1, slot_2);
     instr
         ->GetOrCreateParallelMove(Instruction::FIRST_GAP_POSITION,
-                                  c.main_zone())
+                                  env.main_zone())
         ->AddMove(r0, slot_3);
 
     c.CheckAssembleTailCallGaps(instr, first_slot + 4,
                                 CodeGeneratorTester::kScalarPush);
-    c.Disassemble();
+    Handle<Code> code = c.Finalize();
+    if (FLAG_print_code) {
+      code->Print();
+    }
   }
 }
 
diff --git a/src/v8/test/cctest/compiler/test-graph-visualizer.cc b/src/v8/test/cctest/compiler/test-graph-visualizer.cc
index 842a23b..942a7e8 100644
--- a/src/v8/test/cctest/compiler/test-graph-visualizer.cc
+++ b/src/v8/test/cctest/compiler/test-graph-visualizer.cc
@@ -35,7 +35,7 @@
   Node* k = graph.NewNode(common.Int32Constant(0));
   Node* phi =
       graph.NewNode(common.Phi(MachineRepresentation::kTagged, 1), k, start);
-  phi->ReplaceInput(0, NULL);
+  phi->ReplaceInput(0, nullptr);
   graph.SetEnd(phi);
 
   OFStream os(stdout);
@@ -54,7 +54,7 @@
   Node* k = graph.NewNode(common.Int32Constant(0));
   Node* phi =
       graph.NewNode(common.Phi(MachineRepresentation::kTagged, 1), k, start);
-  phi->ReplaceInput(1, NULL);
+  phi->ReplaceInput(1, nullptr);
   graph.SetEnd(phi);
 
   OFStream os(stdout);
@@ -73,7 +73,7 @@
   Node* k = graph.NewNode(common.Int32Constant(0));
   Node* phi =
       graph.NewNode(common.Phi(MachineRepresentation::kTagged, 1), k, start);
-  phi->ReplaceInput(0, NULL);
+  phi->ReplaceInput(0, nullptr);
   graph.SetEnd(start);
 
   OFStream os(stdout);
@@ -90,7 +90,7 @@
   Node* start = graph.NewNode(common.Start(0));
   graph.SetStart(start);
   Node* merge = graph.NewNode(common.Merge(2), start, start);
-  merge->ReplaceInput(1, NULL);
+  merge->ReplaceInput(1, nullptr);
   graph.SetEnd(merge);
 
   OFStream os(stdout);
diff --git a/src/v8/test/cctest/compiler/test-instruction.cc b/src/v8/test/cctest/compiler/test-instruction.cc
index a8d3443..d0addad 100644
--- a/src/v8/test/cctest/compiler/test-instruction.cc
+++ b/src/v8/test/cctest/compiler/test-instruction.cc
@@ -30,7 +30,7 @@
         schedule(zone()),
         common(zone()),
         machine(zone()),
-        code(NULL) {}
+        code(nullptr) {}
 
   Graph graph;
   Schedule schedule;
diff --git a/src/v8/test/cctest/compiler/test-js-constant-cache.cc b/src/v8/test/cctest/compiler/test-js-constant-cache.cc
index 94b846f..ee53f26 100644
--- a/src/v8/test/cctest/compiler/test-js-constant-cache.cc
+++ b/src/v8/test/cctest/compiler/test-js-constant-cache.cc
@@ -5,14 +5,7 @@
 #include "src/assembler.h"
 #include "src/compiler/js-graph.h"
 #include "src/compiler/node-properties.h"
-#include "src/factory.h"
-// FIXME(mstarzinger, marja): This is weird, but required because of the missing
-// (disallowed) include: src/factory.h -> src/objects-inl.h
-#include "src/objects-inl.h"
-// FIXME(mstarzinger, marja): This is weird, but required because of the missing
-// (disallowed) include: src/feedback-vector.h ->
-// src/feedback-vector-inl.h
-#include "src/feedback-vector-inl.h"
+#include "src/factory-inl.h"
 #include "test/cctest/cctest.h"
 #include "test/cctest/compiler/value-helper.h"
 
diff --git a/src/v8/test/cctest/compiler/test-js-typed-lowering.cc b/src/v8/test/cctest/compiler/test-js-typed-lowering.cc
index 8e24bac..3ae652e 100644
--- a/src/v8/test/cctest/compiler/test-js-typed-lowering.cc
+++ b/src/v8/test/cctest/compiler/test-js-typed-lowering.cc
@@ -10,13 +10,9 @@
 #include "src/compiler/operator-properties.h"
 #include "src/compiler/simplified-operator.h"
 #include "src/compiler/typer.h"
-#include "src/factory.h"
+#include "src/factory-inl.h"
 #include "src/isolate.h"
-#include "src/objects-inl.h"
-// FIXME(mstarzinger, marja): This is weird, but required because of the missing
-// (disallowed) include: src/feedback-vector.h ->
-// src/feedback-vector-inl.h
-#include "src/feedback-vector-inl.h"
+#include "src/objects.h"
 #include "test/cctest/cctest.h"
 
 namespace v8 {
@@ -27,15 +23,15 @@
  public:
   explicit JSTypedLoweringTester(int num_parameters = 0)
       : isolate(main_isolate()),
-        binop(NULL),
-        unop(NULL),
+        binop(nullptr),
+        unop(nullptr),
         javascript(main_zone()),
         machine(main_zone()),
         simplified(main_zone()),
         common(main_zone()),
         graph(main_zone()),
         typer(main_isolate(), Typer::kNoFlags, &graph),
-        context_node(NULL) {
+        context_node(nullptr) {
     graph.SetStart(graph.NewNode(common.Start(num_parameters)));
     graph.SetEnd(graph.NewNode(common.End(1), graph.start()));
     typer.Run();
@@ -99,7 +95,7 @@
   Node* start() { return graph.start(); }
 
   Node* context() {
-    if (context_node == NULL) {
+    if (context_node == nullptr) {
       context_node = graph.NewNode(common.Parameter(-1), graph.start());
     }
     return context_node;
@@ -524,7 +520,7 @@
 
   {  // ToString(number)
     Node* r = R.ReduceUnop(op, Type::Number());
-    CHECK_EQ(IrOpcode::kJSToString, r->opcode());
+    CHECK_EQ(IrOpcode::kNumberToString, r->opcode());
   }
 
   {  // ToString(string)
@@ -683,13 +679,13 @@
 TEST(RemoveToNumberEffects) {
   JSTypedLoweringTester R;
 
-  Node* effect_use = NULL;
+  Node* effect_use = nullptr;
   Node* zero = R.graph.NewNode(R.common.NumberConstant(0));
   for (int i = 0; i < 10; i++) {
     Node* p0 = R.Parameter(Type::Number());
     Node* ton = R.Unop(R.javascript.ToNumber(), p0);
     Node* frame_state = R.EmptyFrameState(R.context());
-    effect_use = NULL;
+    effect_use = nullptr;
 
     switch (i) {
       case 0:
@@ -724,13 +720,13 @@
     }
 
     R.CheckEffectInput(R.start(), ton);
-    if (effect_use != NULL) R.CheckEffectInput(ton, effect_use);
+    if (effect_use != nullptr) R.CheckEffectInput(ton, effect_use);
 
     Node* r = R.reduce(ton);
     CHECK_EQ(p0, r);
     CHECK_NE(R.start(), r);
 
-    if (effect_use != NULL) {
+    if (effect_use != nullptr) {
       R.CheckEffectInput(R.start(), effect_use);
       // Check that value uses of ToNumber() do not go to start().
       for (int i = 0; i < effect_use->op()->ValueInputCount(); i++) {
diff --git a/src/v8/test/cctest/compiler/test-jump-threading.cc b/src/v8/test/cctest/compiler/test-jump-threading.cc
index f115989..eace236 100644
--- a/src/v8/test/cctest/compiler/test-jump-threading.cc
+++ b/src/v8/test/cctest/compiler/test-jump-threading.cc
@@ -19,7 +19,7 @@
         blocks_(main_zone()),
         sequence_(main_isolate(), main_zone(), &blocks_),
         rpo_number_(RpoNumber::FromInt(0)),
-        current_(NULL) {}
+        current_(nullptr) {}
 
   ZoneVector<InstructionBlock*> blocks_;
   InstructionSequence sequence_;
@@ -29,8 +29,8 @@
   int Jump(int target) {
     Start();
     InstructionOperand ops[] = {UseRpo(target)};
-    sequence_.AddInstruction(
-        Instruction::New(main_zone(), kArchJmp, 0, NULL, 1, ops, 0, NULL));
+    sequence_.AddInstruction(Instruction::New(main_zone(), kArchJmp, 0, nullptr,
+                                              1, ops, 0, nullptr));
     int pos = static_cast<int>(sequence_.instructions().size() - 1);
     End();
     return pos;
@@ -45,7 +45,7 @@
     InstructionCode code = 119 | FlagsModeField::encode(kFlags_branch) |
                            FlagsConditionField::encode(kEqual);
     sequence_.AddInstruction(
-        Instruction::New(main_zone(), code, 0, NULL, 2, ops, 0, NULL));
+        Instruction::New(main_zone(), code, 0, nullptr, 2, ops, 0, nullptr));
     int pos = static_cast<int>(sequence_.instructions().size() - 1);
     End();
     return pos;
@@ -78,14 +78,14 @@
   void End() {
     Start();
     sequence_.EndBlock(current_->rpo_number());
-    current_ = NULL;
+    current_ = nullptr;
     rpo_number_ = RpoNumber::FromInt(rpo_number_.ToInt() + 1);
   }
   InstructionOperand UseRpo(int num) {
     return sequence_.AddImmediate(Constant(RpoNumber::FromInt(num)));
   }
   void Start(bool deferred = false) {
-    if (current_ == NULL) {
+    if (current_ == nullptr) {
       current_ = new (main_zone())
           InstructionBlock(main_zone(), rpo_number_, RpoNumber::Invalid(),
                            RpoNumber::Invalid(), deferred, false);
@@ -94,7 +94,7 @@
     }
   }
   void Defer() {
-    CHECK(current_ == NULL);
+    CHECK_NULL(current_);
     Start(true);
   }
   void AddGapMove(int index, const InstructionOperand& from,
diff --git a/src/v8/test/cctest/compiler/test-linkage.cc b/src/v8/test/cctest/compiler/test-linkage.cc
index 99d7517..13f493e 100644
--- a/src/v8/test/cctest/compiler/test-linkage.cc
+++ b/src/v8/test/cctest/compiler/test-linkage.cc
@@ -33,11 +33,14 @@
   Handle<String> source_code = isolate->factory()
                                    ->NewStringFromUtf8(CStrVector(source))
                                    .ToHandleChecked();
-  Handle<SharedFunctionInfo> shared = Compiler::GetSharedFunctionInfoForScript(
-      source_code, Handle<String>(), 0, 0, v8::ScriptOriginOptions(),
-      Handle<Object>(), Handle<Context>(isolate->native_context()), NULL, NULL,
-      v8::ScriptCompiler::kNoCompileOptions, NOT_NATIVES_CODE,
-      Handle<FixedArray>());
+  Handle<SharedFunctionInfo> shared =
+      Compiler::GetSharedFunctionInfoForScript(
+          source_code, MaybeHandle<String>(), 0, 0, v8::ScriptOriginOptions(),
+          MaybeHandle<Object>(), Handle<Context>(isolate->native_context()),
+          nullptr, nullptr, v8::ScriptCompiler::kNoCompileOptions,
+          ScriptCompiler::kNoCacheNoReason, NOT_NATIVES_CODE,
+          MaybeHandle<FixedArray>())
+          .ToHandleChecked();
   return isolate->factory()->NewFunctionFromSharedFunctionInfo(
       shared, isolate->native_context());
 }
@@ -105,7 +108,7 @@
   Isolate* isolate = CcTest::InitIsolateOnce();
   Zone zone(isolate->allocator(), ZONE_NAME);
   Callable callable = Builtins::CallableFor(isolate, Builtins::kToNumber);
-  CompilationInfo info(ArrayVector("test"), isolate, &zone, Code::STUB);
+  CompilationInfo info(ArrayVector("test"), &zone, Code::STUB);
   CallDescriptor* descriptor = Linkage::GetStubCallDescriptor(
       isolate, &zone, callable.descriptor(), 0, CallDescriptor::kNoFlags,
       Operator::kNoProperties);
diff --git a/src/v8/test/cctest/compiler/test-loop-analysis.cc b/src/v8/test/cctest/compiler/test-loop-analysis.cc
index ffb0872..734fa4b 100644
--- a/src/v8/test/cctest/compiler/test-loop-analysis.cc
+++ b/src/v8/test/cctest/compiler/test-loop-analysis.cc
@@ -45,9 +45,9 @@
         zero(jsgraph.Int32Constant(0)),
         one(jsgraph.OneConstant()),
         half(jsgraph.Constant(0.5)),
-        self(graph.NewNode(common.Int32Constant(0xaabbccdd))),
+        self(graph.NewNode(common.Int32Constant(0xAABBCCDD))),
         dead(graph.NewNode(common.Dead())),
-        loop_tree(NULL) {
+        loop_tree(nullptr) {
     graph.SetEnd(end);
     graph.SetStart(start);
     leaf[0] = zero;
@@ -123,7 +123,7 @@
   }
 
   LoopTree* GetLoopTree() {
-    if (loop_tree == NULL) {
+    if (loop_tree == nullptr) {
       if (FLAG_trace_turbo_graph) {
         OFStream os(stdout);
         os << AsRPO(graph);
@@ -168,7 +168,7 @@
       CHECK(loop);
       // Check parentage.
       LoopTree::Loop* parent =
-          i == 0 ? NULL : tree->ContainingLoop(chain[i - 1]);
+          i == 0 ? nullptr : tree->ContainingLoop(chain[i - 1]);
       CHECK_EQ(parent, loop->parent());
       for (int j = i - 1; j >= 0; j--) {
         // This loop should be nested inside all the outer loops.
diff --git a/src/v8/test/cctest/compiler/test-machine-operator-reducer.cc b/src/v8/test/cctest/compiler/test-machine-operator-reducer.cc
index b146080..df18062 100644
--- a/src/v8/test/cctest/compiler/test-machine-operator-reducer.cc
+++ b/src/v8/test/cctest/compiler/test-machine-operator-reducer.cc
@@ -78,8 +78,8 @@
                          MachineOperatorBuilder::Flags flags =
                              MachineOperatorBuilder::kAllOptionalOps)
       : isolate(main_isolate()),
-        binop(NULL),
-        unop(NULL),
+        binop(nullptr),
+        unop(nullptr),
         machine(main_zone(), MachineType::PointerRepresentation(), flags),
         common(main_zone()),
         graph(main_zone()),
@@ -447,12 +447,12 @@
 
   Node* x = R->Parameter(0);
   Node* y = R->Parameter(1);
-  Node* thirty_one = R->Constant<int32_t>(0x1f);
+  Node* thirty_one = R->Constant<int32_t>(0x1F);
   Node* y_and_thirty_one =
       R->graph.NewNode(R->machine.Word32And(), y, thirty_one);
 
   // If the underlying machine shift instructions 'and' their right operand
-  // with 0x1f then:  x << (y & 0x1f) => x << y
+  // with 0x1F then:  x << (y & 0x1F) => x << y
   R->CheckFoldBinop(x, y, x, y_and_thirty_one);
 }
 
diff --git a/src/v8/test/cctest/compiler/test-multiple-return.cc b/src/v8/test/cctest/compiler/test-multiple-return.cc
index 25e5527..1f46e87 100644
--- a/src/v8/test/cctest/compiler/test-multiple-return.cc
+++ b/src/v8/test/cctest/compiler/test-multiple-return.cc
@@ -5,13 +5,14 @@
 #include <cmath>
 #include <functional>
 #include <limits>
+#include <memory>
 
 #include "src/assembler.h"
 #include "src/base/bits.h"
-#include "src/base/utils/random-number-generator.h"
 #include "src/codegen.h"
 #include "src/compiler.h"
 #include "src/compiler/linkage.h"
+#include "src/machine-type.h"
 #include "src/macro-assembler.h"
 #include "src/objects-inl.h"
 #include "test/cctest/cctest.h"
@@ -24,93 +25,360 @@
 
 namespace {
 
-CallDescriptor* GetCallDescriptor(Zone* zone, int return_count,
-                                  int param_count) {
-  LocationSignature::Builder locations(zone, return_count, param_count);
-  const RegisterConfiguration* config = RegisterConfiguration::Default();
+int size(MachineType type) {
+  return 1 << ElementSizeLog2Of(type.representation());
+}
 
-  // Add return location(s).
-  CHECK(return_count <= config->num_allocatable_general_registers());
-  for (int i = 0; i < return_count; i++) {
-    locations.AddReturn(LinkageLocation::ForRegister(
-        config->allocatable_general_codes()[i], MachineType::AnyTagged()));
+int num_registers(MachineType type) {
+  const RegisterConfiguration* config = RegisterConfiguration::Default();
+  switch (type.representation()) {
+    case MachineRepresentation::kWord32:
+    case MachineRepresentation::kWord64:
+      return config->num_allocatable_general_registers();
+    case MachineRepresentation::kFloat32:
+      return config->num_allocatable_float_registers();
+    case MachineRepresentation::kFloat64:
+      return config->num_allocatable_double_registers();
+    default:
+      UNREACHABLE();
+  }
+}
+
+const int* codes(MachineType type) {
+  const RegisterConfiguration* config = RegisterConfiguration::Default();
+  switch (type.representation()) {
+    case MachineRepresentation::kWord32:
+    case MachineRepresentation::kWord64:
+      return config->allocatable_general_codes();
+    case MachineRepresentation::kFloat32:
+      return config->allocatable_float_codes();
+    case MachineRepresentation::kFloat64:
+      return config->allocatable_double_codes();
+    default:
+      UNREACHABLE();
+  }
+}
+
+CallDescriptor* CreateMonoCallDescriptor(Zone* zone, int return_count,
+                                         int param_count, MachineType type) {
+  LocationSignature::Builder locations(zone, return_count, param_count);
+
+  int span = std::max(1, size(type) / kPointerSize);
+  int stack_params = 0;
+  for (int i = 0; i < param_count; i++) {
+    LinkageLocation location = LinkageLocation::ForAnyRegister();
+    if (i < num_registers(type)) {
+      location = LinkageLocation::ForRegister(codes(type)[i], type);
+    } else {
+      int slot = span * (i - param_count);
+      location = LinkageLocation::ForCallerFrameSlot(slot, type);
+      stack_params += span;
+    }
+    locations.AddParam(location);
   }
 
-  // Add register and/or stack parameter(s).
-  CHECK(param_count <= config->num_allocatable_general_registers());
-  for (int i = 0; i < param_count; i++) {
-    locations.AddParam(LinkageLocation::ForRegister(
-        config->allocatable_general_codes()[i], MachineType::AnyTagged()));
+  int stack_returns = 0;
+  for (int i = 0; i < return_count; i++) {
+    LinkageLocation location = LinkageLocation::ForAnyRegister();
+    if (i < num_registers(type)) {
+      location = LinkageLocation::ForRegister(codes(type)[i], type);
+    } else {
+      int slot = span * (num_registers(type) - i) - stack_params - 1;
+      location = LinkageLocation::ForCallerFrameSlot(slot, type);
+      stack_returns += span;
+    }
+    locations.AddReturn(location);
   }
 
   const RegList kCalleeSaveRegisters = 0;
   const RegList kCalleeSaveFPRegisters = 0;
 
-  // The target for wasm calls is always a code object.
   MachineType target_type = MachineType::AnyTagged();
-  LinkageLocation target_loc = LinkageLocation::ForAnyRegister();
+  LinkageLocation target_loc = LinkageLocation::ForAnyRegister(target_type);
   return new (zone) CallDescriptor(       // --
       CallDescriptor::kCallCodeObject,    // kind
       target_type,                        // target MachineType
       target_loc,                         // target location
       locations.Build(),                  // location_sig
-      0,                                  // js_parameter_count
+      stack_params,                       // on-stack parameter count
       compiler::Operator::kNoProperties,  // properties
       kCalleeSaveRegisters,               // callee-saved registers
       kCalleeSaveFPRegisters,             // callee-saved fp regs
       CallDescriptor::kNoFlags,           // flags
-      "c-call");
+      "c-call",                           // debug name
+      0,                                  // allocatable registers
+      stack_returns);                     // on-stack return count
 }
+
 }  // namespace
 
-
-TEST(ReturnThreeValues) {
-  v8::internal::AccountingAllocator allocator;
-  Zone zone(&allocator, ZONE_NAME);
-  CallDescriptor* desc = GetCallDescriptor(&zone, 3, 2);
-  HandleAndZoneScope handles;
-  RawMachineAssembler m(handles.main_isolate(),
-                        new (handles.main_zone()) Graph(handles.main_zone()),
-                        desc, MachineType::PointerRepresentation(),
-                        InstructionSelector::SupportedMachineOperatorFlags());
-
-  Node* p0 = m.Parameter(0);
-  Node* p1 = m.Parameter(1);
-  Node* add = m.Int32Add(p0, p1);
-  Node* sub = m.Int32Sub(p0, p1);
-  Node* mul = m.Int32Mul(p0, p1);
-  m.Return(add, sub, mul);
-
-  CompilationInfo info(ArrayVector("testing"), handles.main_isolate(),
-                       handles.main_zone(), Code::STUB);
-  Handle<Code> code =
-      Pipeline::GenerateCodeForTesting(&info, desc, m.graph(), m.Export());
-#ifdef ENABLE_DISASSEMBLER
-  if (FLAG_print_code) {
-    OFStream os(stdout);
-    code->Disassemble("three_value", os);
+Node* Constant(RawMachineAssembler& m, MachineType type, int value) {
+  switch (type.representation()) {
+    case MachineRepresentation::kWord32:
+      return m.Int32Constant(static_cast<int32_t>(value));
+    case MachineRepresentation::kWord64:
+      return m.Int64Constant(static_cast<int64_t>(value));
+    case MachineRepresentation::kFloat32:
+      return m.Float32Constant(static_cast<float>(value));
+    case MachineRepresentation::kFloat64:
+      return m.Float64Constant(static_cast<double>(value));
+    default:
+      UNREACHABLE();
   }
-#endif
-
-  RawMachineAssemblerTester<int32_t> mt;
-  Node* a = mt.Int32Constant(123);
-  Node* b = mt.Int32Constant(456);
-  Node* ret3 = mt.AddNode(mt.common()->Call(desc), mt.HeapConstant(code), a, b);
-  Node* x = mt.AddNode(mt.common()->Projection(0), ret3);
-  Node* y = mt.AddNode(mt.common()->Projection(1), ret3);
-  Node* z = mt.AddNode(mt.common()->Projection(2), ret3);
-  Node* ret = mt.Int32Add(mt.Int32Add(x, y), z);
-  mt.Return(ret);
-#ifdef ENABLE_DISASSEMBLER
-  Handle<Code> code2 = mt.GetCode();
-  if (FLAG_print_code) {
-    OFStream os(stdout);
-    code2->Disassemble("three_value_call", os);
-  }
-#endif
-  CHECK_EQ((123 + 456) + (123 - 456) + (123 * 456), mt.Call());
 }
 
+Node* Add(RawMachineAssembler& m, MachineType type, Node* a, Node* b) {
+  switch (type.representation()) {
+    case MachineRepresentation::kWord32:
+      return m.Int32Add(a, b);
+    case MachineRepresentation::kWord64:
+      return m.Int64Add(a, b);
+    case MachineRepresentation::kFloat32:
+      return m.Float32Add(a, b);
+    case MachineRepresentation::kFloat64:
+      return m.Float64Add(a, b);
+    default:
+      UNREACHABLE();
+  }
+}
+
+Node* Sub(RawMachineAssembler& m, MachineType type, Node* a, Node* b) {
+  switch (type.representation()) {
+    case MachineRepresentation::kWord32:
+      return m.Int32Sub(a, b);
+    case MachineRepresentation::kWord64:
+      return m.Int64Sub(a, b);
+    case MachineRepresentation::kFloat32:
+      return m.Float32Sub(a, b);
+    case MachineRepresentation::kFloat64:
+      return m.Float64Sub(a, b);
+    default:
+      UNREACHABLE();
+  }
+}
+
+Node* Mul(RawMachineAssembler& m, MachineType type, Node* a, Node* b) {
+  switch (type.representation()) {
+    case MachineRepresentation::kWord32:
+      return m.Int32Mul(a, b);
+    case MachineRepresentation::kWord64:
+      return m.Int64Mul(a, b);
+    case MachineRepresentation::kFloat32:
+      return m.Float32Mul(a, b);
+    case MachineRepresentation::kFloat64:
+      return m.Float64Mul(a, b);
+    default:
+      UNREACHABLE();
+  }
+}
+
+Node* ToInt32(RawMachineAssembler& m, MachineType type, Node* a) {
+  switch (type.representation()) {
+    case MachineRepresentation::kWord32:
+      return a;
+    case MachineRepresentation::kWord64:
+      return m.TruncateInt64ToInt32(a);
+    case MachineRepresentation::kFloat32:
+      return m.TruncateFloat32ToInt32(a);
+    case MachineRepresentation::kFloat64:
+      return m.RoundFloat64ToInt32(a);
+    default:
+      UNREACHABLE();
+  }
+}
+
+void TestReturnMultipleValues(MachineType type) {
+  const int kMaxCount = 20;
+  for (int count = 0; count < kMaxCount; ++count) {
+    printf("\n==== type = %s, count = %d ====\n\n\n",
+           MachineReprToString(type.representation()), count);
+    v8::internal::AccountingAllocator allocator;
+    Zone zone(&allocator, ZONE_NAME);
+    CallDescriptor* desc = CreateMonoCallDescriptor(&zone, count, 2, type);
+    HandleAndZoneScope handles;
+    RawMachineAssembler m(handles.main_isolate(),
+                          new (handles.main_zone()) Graph(handles.main_zone()),
+                          desc, MachineType::PointerRepresentation(),
+                          InstructionSelector::SupportedMachineOperatorFlags());
+
+    Node* p0 = m.Parameter(0);
+    Node* p1 = m.Parameter(1);
+    typedef Node* Node_ptr;
+    std::unique_ptr<Node_ptr[]> returns(new Node_ptr[count]);
+    for (int i = 0; i < count; ++i) {
+      if (i % 3 == 0) returns[i] = Add(m, type, p0, p1);
+      if (i % 3 == 1) returns[i] = Sub(m, type, p0, p1);
+      if (i % 3 == 2) returns[i] = Mul(m, type, p0, p1);
+    }
+    m.Return(count, returns.get());
+
+    CompilationInfo info(ArrayVector("testing"), handles.main_zone(),
+                         Code::STUB);
+    Handle<Code> code = Pipeline::GenerateCodeForTesting(
+        &info, handles.main_isolate(), desc, m.graph(), m.Export());
+#ifdef ENABLE_DISASSEMBLER
+    if (FLAG_print_code) {
+      OFStream os(stdout);
+      code->Disassemble("multi_value", os);
+    }
+#endif
+
+    const int a = 47, b = 12;
+    int expect = 0;
+    for (int i = 0, sign = +1; i < count; ++i) {
+      if (i % 3 == 0) expect += sign * (a + b);
+      if (i % 3 == 1) expect += sign * (a - b);
+      if (i % 3 == 2) expect += sign * (a * b);
+      if (i % 4 == 0) sign = -sign;
+    }
+
+    RawMachineAssemblerTester<int32_t> mt;
+    Node* na = Constant(mt, type, a);
+    Node* nb = Constant(mt, type, b);
+    Node* ret_multi =
+        mt.AddNode(mt.common()->Call(desc), mt.HeapConstant(code), na, nb);
+    Node* ret = Constant(mt, type, 0);
+    bool sign = false;
+    for (int i = 0; i < count; ++i) {
+      Node* x = (count == 1)
+                    ? ret_multi
+                    : mt.AddNode(mt.common()->Projection(i), ret_multi);
+      ret = sign ? Sub(mt, type, ret, x) : Add(mt, type, ret, x);
+      if (i % 4 == 0) sign = !sign;
+    }
+    mt.Return(ToInt32(mt, type, ret));
+#ifdef ENABLE_DISASSEMBLER
+    Handle<Code> code2 = mt.GetCode();
+    if (FLAG_print_code) {
+      OFStream os(stdout);
+      code2->Disassemble("multi_value_call", os);
+    }
+#endif
+    CHECK_EQ(expect, mt.Call());
+  }
+}
+
+#define TEST_MULTI(Type, type) \
+  TEST(ReturnMultiple##Type) { TestReturnMultipleValues(type); }
+
+TEST_MULTI(Int32, MachineType::Int32())
+#if (!V8_TARGET_ARCH_32_BIT)
+TEST_MULTI(Int64, MachineType::Int64())
+#endif
+TEST_MULTI(Float32, MachineType::Float32())
+TEST_MULTI(Float64, MachineType::Float64())
+
+#undef TEST_MULTI
+
+void ReturnLastValue(MachineType type) {
+  int slot_counts[] = {1, 2, 3, 600};
+  for (auto slot_count : slot_counts) {
+    v8::internal::AccountingAllocator allocator;
+    Zone zone(&allocator, ZONE_NAME);
+    const int return_count = num_registers(type) + slot_count;
+
+    CallDescriptor* desc =
+        CreateMonoCallDescriptor(&zone, return_count, 0, type);
+
+    HandleAndZoneScope handles;
+    RawMachineAssembler m(handles.main_isolate(),
+                          new (handles.main_zone()) Graph(handles.main_zone()),
+                          desc, MachineType::PointerRepresentation(),
+                          InstructionSelector::SupportedMachineOperatorFlags());
+
+    std::unique_ptr<Node* []> returns(new Node*[return_count]);
+
+    for (int i = 0; i < return_count; ++i) {
+      returns[i] = Constant(m, type, i);
+    }
+
+    m.Return(return_count, returns.get());
+
+    CompilationInfo info(ArrayVector("testing"), handles.main_zone(),
+                         Code::STUB);
+    Handle<Code> code = Pipeline::GenerateCodeForTesting(
+        &info, handles.main_isolate(), desc, m.graph(), m.Export());
+
+    // Generate caller.
+    int expect = return_count - 1;
+    RawMachineAssemblerTester<int32_t> mt;
+    Node* code_node = mt.HeapConstant(code);
+
+    Node* call = mt.AddNode(mt.common()->Call(desc), 1, &code_node);
+
+    mt.Return(ToInt32(
+        mt, type, mt.AddNode(mt.common()->Projection(return_count - 1), call)));
+
+    CHECK_EQ(expect, mt.Call());
+  }
+}
+
+TEST(ReturnLastValueInt32) { ReturnLastValue(MachineType::Int32()); }
+#if (!V8_TARGET_ARCH_32_BIT)
+TEST(ReturnLastValueInt64) { ReturnLastValue(MachineType::Int64()); }
+#endif
+TEST(ReturnLastValueFloat32) { ReturnLastValue(MachineType::Float32()); }
+TEST(ReturnLastValueFloat64) { ReturnLastValue(MachineType::Float64()); }
+
+void ReturnSumOfReturns(MachineType type) {
+  for (int unused_stack_slots = 0; unused_stack_slots <= 2;
+       ++unused_stack_slots) {
+    v8::internal::AccountingAllocator allocator;
+    Zone zone(&allocator, ZONE_NAME);
+    // Let {unused_stack_slots + 1} returns be on the stack.
+    const int return_count = num_registers(type) + unused_stack_slots + 1;
+
+    CallDescriptor* desc =
+        CreateMonoCallDescriptor(&zone, return_count, 0, type);
+
+    HandleAndZoneScope handles;
+    RawMachineAssembler m(handles.main_isolate(),
+                          new (handles.main_zone()) Graph(handles.main_zone()),
+                          desc, MachineType::PointerRepresentation(),
+                          InstructionSelector::SupportedMachineOperatorFlags());
+
+    std::unique_ptr<Node* []> returns(new Node*[return_count]);
+
+    for (int i = 0; i < return_count; ++i) {
+      returns[i] = Constant(m, type, i);
+    }
+
+    m.Return(return_count, returns.get());
+
+    CompilationInfo info(ArrayVector("testing"), handles.main_zone(),
+                         Code::STUB);
+    Handle<Code> code = Pipeline::GenerateCodeForTesting(
+        &info, handles.main_isolate(), desc, m.graph(), m.Export());
+
+    // Generate caller.
+    RawMachineAssemblerTester<int32_t> mt;
+    Node* code_node = mt.HeapConstant(code);
+
+    Node* call = mt.AddNode(mt.common()->Call(desc), 1, &code_node);
+
+    uint32_t expect = 0;
+    Node* result = mt.Int32Constant(0);
+
+    for (int i = 0; i < return_count; ++i) {
+      expect += i;
+      result = mt.Int32Add(
+          result,
+          ToInt32(mt, type, mt.AddNode(mt.common()->Projection(i), call)));
+    }
+
+    mt.Return(result);
+
+    CHECK_EQ(expect, mt.Call());
+  }
+}
+
+TEST(ReturnSumOfReturnsInt32) { ReturnSumOfReturns(MachineType::Int32()); }
+#if (!V8_TARGET_ARCH_32_BIT)
+TEST(ReturnSumOfReturnsInt64) { ReturnSumOfReturns(MachineType::Int64()); }
+#endif
+TEST(ReturnSumOfReturnsFloat32) { ReturnSumOfReturns(MachineType::Float32()); }
+TEST(ReturnSumOfReturnsFloat64) { ReturnSumOfReturns(MachineType::Float64()); }
+
 }  // namespace compiler
 }  // namespace internal
 }  // namespace v8
diff --git a/src/v8/test/cctest/compiler/test-node.cc b/src/v8/test/cctest/compiler/test-node.cc
index 9d1ad5c..a8927de 100644
--- a/src/v8/test/cctest/compiler/test-node.cc
+++ b/src/v8/test/cctest/compiler/test-node.cc
@@ -466,13 +466,13 @@
 
   n2->ReplaceInput(0, nullptr);
 
-  CHECK_INPUTS(n2, NULL, n1);
+  CHECK_INPUTS(n2, nullptr, n1);
 
   CHECK_USES(n0, n1);
 
   n2->ReplaceInput(1, nullptr);
 
-  CHECK_INPUTS(n2, NULL, NULL);
+  CHECK_INPUTS(n2, nullptr, nullptr);
 
   CHECK_USES(n1, NONE);
 }
@@ -495,10 +495,10 @@
   CHECK_USES(n1, n3);
   CHECK_USES(n2, n3);
 
-  n3->ReplaceInput(1, NULL);
+  n3->ReplaceInput(1, nullptr);
   CHECK_USES(n1, NONE);
 
-  CHECK_INPUTS(n3, n0, NULL, n2);
+  CHECK_INPUTS(n3, n0, nullptr, n2);
 }
 
 
@@ -808,13 +808,13 @@
 
     CHECK_USES(n0, n1, n2);
     n1->NullAllInputs();
-    CHECK_INPUTS(n1, NULL);
+    CHECK_INPUTS(n1, nullptr);
     CHECK_INPUTS(n2, n0, n1);
     CHECK_USES(n0, n2);
 
     n2->NullAllInputs();
-    CHECK_INPUTS(n1, NULL);
-    CHECK_INPUTS(n2, NULL, NULL);
+    CHECK_INPUTS(n1, nullptr);
+    CHECK_INPUTS(n2, nullptr, nullptr);
     CHECK_USES(n0, NONE);
   }
 
@@ -830,7 +830,7 @@
     n1->NullAllInputs();
 
     CHECK_INPUTS(n0, NONE);
-    CHECK_INPUTS(n1, NULL);
+    CHECK_INPUTS(n1, nullptr);
     CHECK_USES(n0, NONE);
     CHECK_USES(n1, NONE);
   }
diff --git a/src/v8/test/cctest/compiler/test-operator.cc b/src/v8/test/cctest/compiler/test-operator.cc
index 10dad49..7428359 100644
--- a/src/v8/test/cctest/compiler/test-operator.cc
+++ b/src/v8/test/cctest/compiler/test-operator.cc
@@ -261,7 +261,7 @@
 
 
 TEST(TestOpParameter_Operator1int) {
-  int values[] = {7777, -66, 0, 11, 1, 0x666aff};
+  int values[] = {7777, -66, 0, 11, 1, 0x666AFF};
 
   for (size_t i = 0; i < arraysize(values); i++) {
     Operator1<int> op(33, NONE, "Scurvy", 0, 0, 0, 0, 0, 0, values[i]);
diff --git a/src/v8/test/cctest/compiler/test-representation-change.cc b/src/v8/test/cctest/compiler/test-representation-change.cc
index e61713f..08cd73f 100644
--- a/src/v8/test/cctest/compiler/test-representation-change.cc
+++ b/src/v8/test/cctest/compiler/test-representation-change.cc
@@ -285,7 +285,7 @@
         from_type->Maybe(Type::MinusZero())
             ? use_info.minus_zero_check()
             : CheckForMinusZeroMode::kDontCheckForMinusZero;
-    CHECK_EQ(mode, CheckMinusZeroModeOf(c->op()));
+    CHECK_EQ(mode, CheckMinusZeroParametersOf(c->op()).mode());
   }
 }
 
@@ -444,11 +444,13 @@
 static void TestMinusZeroCheck(IrOpcode::Value expected, Type* from_type) {
   RepresentationChangerTester r;
 
-  CheckChange(expected, MachineRepresentation::kFloat64, from_type,
-              UseInfo::CheckedSignedSmallAsWord32(kDistinguishZeros));
+  CheckChange(
+      expected, MachineRepresentation::kFloat64, from_type,
+      UseInfo::CheckedSignedSmallAsWord32(kDistinguishZeros, VectorSlotPair()));
 
-  CheckChange(expected, MachineRepresentation::kFloat64, from_type,
-              UseInfo::CheckedSignedSmallAsWord32(kIdentifyZeros));
+  CheckChange(
+      expected, MachineRepresentation::kFloat64, from_type,
+      UseInfo::CheckedSignedSmallAsWord32(kIdentifyZeros, VectorSlotPair()));
 
   CheckChange(expected, MachineRepresentation::kFloat64, from_type,
               UseInfo::CheckedSigned32AsWord32(kDistinguishZeros));
diff --git a/src/v8/test/cctest/compiler/test-run-bytecode-graph-builder.cc b/src/v8/test/cctest/compiler/test-run-bytecode-graph-builder.cc
index a1dde0d..ffcf052 100644
--- a/src/v8/test/cctest/compiler/test-run-bytecode-graph-builder.cc
+++ b/src/v8/test/cctest/compiler/test-run-bytecode-graph-builder.cc
@@ -121,7 +121,14 @@
     Handle<SharedFunctionInfo> shared(function->shared());
     CompilationInfo compilation_info(&zone, function->GetIsolate(), shared,
                                      function);
-    Handle<Code> code = Pipeline::GenerateCodeForTesting(&compilation_info);
+
+    // Compiler relies on canonicalized handles, let's create
+    // a canonicalized scope and migrate existing handles there.
+    CanonicalHandleScope canonical(isolate_);
+    compilation_info.ReopenHandlesInNewHandleScope();
+
+    Handle<Code> code = Pipeline::GenerateCodeForTesting(
+        &compilation_info, function->GetIsolate());
     function->set_code(*code);
 
     return function;
diff --git a/src/v8/test/cctest/compiler/test-run-intrinsics.cc b/src/v8/test/cctest/compiler/test-run-intrinsics.cc
index 3d6f1fb..96ab8cb 100644
--- a/src/v8/test/cctest/compiler/test-run-intrinsics.cc
+++ b/src/v8/test/cctest/compiler/test-run-intrinsics.cc
@@ -106,24 +106,6 @@
   T.CheckCall(T.Val("bbb"), T.Val(""), T.Val("bbb"));
 }
 
-
-TEST(StringCompare) {
-  FunctionTester T("(function(a,b) { return %_StringCompare(a,b); })", flags);
-
-  T.CheckCall(T.Val(-1), T.Val("aaa"), T.Val("bbb"));
-  T.CheckCall(T.Val(0.0), T.Val("bbb"), T.Val("bbb"));
-  T.CheckCall(T.Val(+1), T.Val("ccc"), T.Val("bbb"));
-}
-
-
-TEST(SubString) {
-  FunctionTester T("(function(a,b) { return %_SubString(a,b,b+3); })", flags);
-
-  T.CheckCall(T.Val("aaa"), T.Val("aaabbb"), T.Val(0.0));
-  T.CheckCall(T.Val("abb"), T.Val("aaabbb"), T.Val(2));
-  T.CheckCall(T.Val("aaa"), T.Val("aaa"), T.Val(0.0));
-}
-
 }  // namespace compiler
 }  // namespace internal
 }  // namespace v8
diff --git a/src/v8/test/cctest/compiler/test-run-jsobjects.cc b/src/v8/test/cctest/compiler/test-run-jsobjects.cc
index ce6756d..0c2912c 100644
--- a/src/v8/test/cctest/compiler/test-run-jsobjects.cc
+++ b/src/v8/test/cctest/compiler/test-run-jsobjects.cc
@@ -4,14 +4,7 @@
 
 #include "src/factory.h"
 #include "src/isolate.h"
-#include "src/objects.h"
-// FIXME(mstarzinger, marja): This is weird, but required because of the missing
-// (disallowed) include: src/factory.h -> src/objects-inl.h
 #include "src/objects-inl.h"
-// FIXME(mstarzinger, marja): This is weird, but required because of the missing
-// (disallowed) include: src/feedback-vector.h ->
-// src/feedback-vector-inl.h
-#include "src/feedback-vector-inl.h"
 #include "test/cctest/compiler/function-tester.h"
 
 namespace v8 {
diff --git a/src/v8/test/cctest/compiler/test-run-jsops.cc b/src/v8/test/cctest/compiler/test-run-jsops.cc
index 49033f7..dfa2299 100644
--- a/src/v8/test/cctest/compiler/test-run-jsops.cc
+++ b/src/v8/test/cctest/compiler/test-run-jsops.cc
@@ -104,7 +104,7 @@
   FunctionTester T("(function(a,b) { return a >>> b; })");
 
   T.CheckCall(4, 8, 1);
-  T.CheckCall(0x7ffffffc, -8, 1);
+  T.CheckCall(0x7FFFFFFC, -8, 1);
   T.CheckCall(T.Val(4), T.Val("8"), T.Val(1));
   T.CheckCall(T.Val(4), T.Val(8), T.Val("1"));
 }
diff --git a/src/v8/test/cctest/compiler/test-run-load-store.cc b/src/v8/test/cctest/compiler/test-run-load-store.cc
index 2774bbe..8014d5b 100644
--- a/src/v8/test/cctest/compiler/test-run-load-store.cc
+++ b/src/v8/test/cctest/compiler/test-run-load-store.cc
@@ -16,33 +16,6 @@
 #include "test/cctest/compiler/value-helper.h"
 
 
-namespace {
-template <typename Type>
-void CheckOobValue(Type val) {
-  UNREACHABLE();
-}
-
-template <>
-void CheckOobValue(int32_t val) {
-  CHECK_EQ(0, val);
-}
-
-template <>
-void CheckOobValue(int64_t val) {
-  CHECK_EQ(0, val);
-}
-
-template <>
-void CheckOobValue(float val) {
-  CHECK(std::isnan(val));
-}
-
-template <>
-void CheckOobValue(double val) {
-  CHECK(std::isnan(val));
-}
-}  // namespace
-
 namespace v8 {
 namespace internal {
 namespace compiler {
@@ -80,7 +53,7 @@
   int32_t p1 = 0;  // loads directly from this location.
 
   int32_t offsets[] = {-2000000, -100, -101, 1,          3,
-                       7,        120,  2000, 2000000000, 0xff};
+                       7,        120,  2000, 2000000000, 0xFF};
 
   for (size_t i = 0; i < arraysize(offsets); i++) {
     RawMachineAssemblerTester<int32_t> m;
@@ -109,7 +82,7 @@
   float p2 = 0.0f;  // and stores directly into this location.
 
   FOR_INT32_INPUTS(i) {
-    int32_t magic = 0x2342aabb + *i * 3;
+    int32_t magic = 0x2342AABB + *i * 3;
     RawMachineAssemblerTester<int32_t> m;
     int32_t offset = *i;
     byte* from = reinterpret_cast<byte*>(&p1) - offset;
@@ -146,7 +119,7 @@
   double p2 = 0;  // and stores directly into this location.
 
   FOR_INT32_INPUTS(i) {
-    int32_t magic = 0x2342aabb + *i * 3;
+    int32_t magic = 0x2342AABB + *i * 3;
     RawMachineAssemblerTester<int32_t> m;
     int32_t offset = *i;
     byte* from = reinterpret_cast<byte*>(&p1) - offset;
@@ -418,9 +391,9 @@
   FOR_INT32_INPUTS(i) {
     buffer[0] = *i;
 
-    CHECK_EQ(static_cast<int8_t>(*i & 0xff), m.Call());
-    CHECK_EQ(static_cast<int8_t>(*i & 0xff), buffer[1]);
-    CHECK_EQ(static_cast<int16_t>(*i & 0xffff), buffer[2]);
+    CHECK_EQ(static_cast<int8_t>(*i & 0xFF), m.Call());
+    CHECK_EQ(static_cast<int8_t>(*i & 0xFF), buffer[1]);
+    CHECK_EQ(static_cast<int16_t>(*i & 0xFFFF), buffer[2]);
     CHECK_EQ(*i, buffer[3]);
   }
 }
@@ -451,9 +424,9 @@
   FOR_UINT32_INPUTS(i) {
     buffer[0] = *i;
 
-    CHECK_EQ((*i & 0xff), m.Call());
-    CHECK_EQ((*i & 0xff), buffer[1]);
-    CHECK_EQ((*i & 0xffff), buffer[2]);
+    CHECK_EQ((*i & 0xFF), m.Call());
+    CHECK_EQ((*i & 0xFF), buffer[1]);
+    CHECK_EQ((*i & 0xFFFF), buffer[2]);
     CHECK_EQ(*i, buffer[3]);
   }
 }
@@ -479,7 +452,7 @@
 
 namespace {
 void RunLoadStoreSignExtend64(TestAlignment t) {
-  if (true) return;  // TODO(titzer): sign extension of loads to 64-bit.
+  if ((true)) return;  // TODO(titzer): sign extension of loads to 64-bit.
   int64_t buffer[5];
   RawMachineAssemblerTester<int64_t> m;
   Node* load8 = m.LoadFromPointer(LSB(&buffer[0], 1), MachineType::Int8());
@@ -512,10 +485,10 @@
   FOR_INT64_INPUTS(i) {
     buffer[0] = *i;
 
-    CHECK_EQ(static_cast<int8_t>(*i & 0xff), m.Call());
-    CHECK_EQ(static_cast<int8_t>(*i & 0xff), buffer[1]);
-    CHECK_EQ(static_cast<int16_t>(*i & 0xffff), buffer[2]);
-    CHECK_EQ(static_cast<int32_t>(*i & 0xffffffff), buffer[3]);
+    CHECK_EQ(static_cast<int8_t>(*i & 0xFF), m.Call());
+    CHECK_EQ(static_cast<int8_t>(*i & 0xFF), buffer[1]);
+    CHECK_EQ(static_cast<int16_t>(*i & 0xFFFF), buffer[2]);
+    CHECK_EQ(static_cast<int32_t>(*i & 0xFFFFFFFF), buffer[3]);
     CHECK_EQ(*i, buffer[4]);
   }
 }
@@ -555,31 +528,16 @@
   FOR_UINT64_INPUTS(i) {
     buffer[0] = *i;
 
-    CHECK_EQ((*i & 0xff), m.Call());
-    CHECK_EQ((*i & 0xff), buffer[1]);
-    CHECK_EQ((*i & 0xffff), buffer[2]);
-    CHECK_EQ((*i & 0xffffffff), buffer[3]);
+    CHECK_EQ((*i & 0xFF), m.Call());
+    CHECK_EQ((*i & 0xFF), buffer[1]);
+    CHECK_EQ((*i & 0xFFFF), buffer[2]);
+    CHECK_EQ((*i & 0xFFFFFFFF), buffer[3]);
     CHECK_EQ(*i, buffer[4]);
   }
 }
 
 }  // namespace
 
-TEST(RunCheckedLoadInt64) {
-  int64_t buffer[] = {0x66bbccddeeff0011LL, 0x1122334455667788LL};
-  RawMachineAssemblerTester<int64_t> m(MachineType::Int32());
-  Node* base = m.PointerConstant(buffer);
-  Node* index = m.Parameter(0);
-  Node* length = m.Int32Constant(16);
-  Node* load = m.AddNode(m.machine()->CheckedLoad(MachineType::Int64()), base,
-                         index, length);
-  m.Return(load);
-
-  CHECK_EQ(buffer[0], m.Call(0));
-  CHECK_EQ(buffer[1], m.Call(8));
-  CheckOobValue(m.Call(16));
-}
-
 TEST(RunLoadStoreSignExtend64) {
   RunLoadStoreSignExtend64(TestAlignment::kAligned);
 }
@@ -596,33 +554,6 @@
   RunLoadStoreZeroExtend64(TestAlignment::kUnaligned);
 }
 
-TEST(RunCheckedStoreInt64) {
-  const int64_t write = 0x5566778899aabbLL;
-  const int64_t before = 0x33bbccddeeff0011LL;
-  int64_t buffer[] = {before, before};
-  RawMachineAssemblerTester<int32_t> m(MachineType::Int32());
-  Node* base = m.PointerConstant(buffer);
-  Node* index = m.Parameter(0);
-  Node* length = m.Int32Constant(16);
-  Node* value = m.Int64Constant(write);
-  Node* store =
-      m.AddNode(m.machine()->CheckedStore(MachineRepresentation::kWord64), base,
-                index, length, value);
-  USE(store);
-  m.Return(m.Int32Constant(11));
-
-  CHECK_EQ(11, m.Call(16));
-  CHECK_EQ(before, buffer[0]);
-  CHECK_EQ(before, buffer[1]);
-
-  CHECK_EQ(11, m.Call(0));
-  CHECK_EQ(write, buffer[0]);
-  CHECK_EQ(before, buffer[1]);
-
-  CHECK_EQ(11, m.Call(8));
-  CHECK_EQ(write, buffer[0]);
-  CHECK_EQ(write, buffer[1]);
-}
 #endif
 
 namespace {
@@ -677,515 +608,6 @@
   LoadStoreTruncation<int16_t>(MachineType::Int16(), TestAlignment::kUnaligned);
 }
 
-void TestRunOobCheckedLoad(bool length_is_immediate) {
-  USE(CheckOobValue<int32_t>);
-  USE(CheckOobValue<int64_t>);
-  USE(CheckOobValue<float>);
-  USE(CheckOobValue<double>);
-
-  RawMachineAssemblerTester<int32_t> m(MachineType::Int32(),
-                                       MachineType::Int32());
-  MachineOperatorBuilder machine(m.zone());
-  const int32_t kNumElems = 27;
-  const int32_t kLength = kNumElems * 4;
-
-  int32_t buffer[kNumElems];
-  Node* base = m.PointerConstant(buffer);
-  Node* offset = m.Parameter(0);
-  Node* len = length_is_immediate ? m.Int32Constant(kLength) : m.Parameter(1);
-  Node* node =
-      m.AddNode(machine.CheckedLoad(MachineType::Int32()), base, offset, len);
-  m.Return(node);
-
-  {
-    // randomize memory.
-    v8::base::RandomNumberGenerator rng;
-    rng.SetSeed(100);
-    rng.NextBytes(&buffer[0], sizeof(buffer));
-  }
-
-  // in-bounds accesses.
-  for (int32_t i = 0; i < kNumElems; i++) {
-    int32_t offset = static_cast<int32_t>(i * sizeof(int32_t));
-    int32_t expected = buffer[i];
-    CHECK_EQ(expected, m.Call(offset, kLength));
-  }
-
-  // slightly out-of-bounds accesses.
-  for (int32_t i = kLength; i < kNumElems + 30; i++) {
-    int32_t offset = static_cast<int32_t>(i * sizeof(int32_t));
-    CheckOobValue(m.Call(offset, kLength));
-  }
-
-  // way out-of-bounds accesses.
-  for (int32_t offset = -2000000000; offset <= 2000000000;
-       offset += 100000000) {
-    if (offset == 0) continue;
-    CheckOobValue(m.Call(offset, kLength));
-  }
-}
-
-TEST(RunOobCheckedLoad) { TestRunOobCheckedLoad(false); }
-
-TEST(RunOobCheckedLoadImm) { TestRunOobCheckedLoad(true); }
-
-void TestRunOobCheckedStore(bool length_is_immediate) {
-  RawMachineAssemblerTester<int32_t> m(MachineType::Int32(),
-                                       MachineType::Int32());
-  MachineOperatorBuilder machine(m.zone());
-  const int32_t kNumElems = 29;
-  const int32_t kValue = -78227234;
-  const int32_t kLength = kNumElems * 4;
-
-  int32_t buffer[kNumElems + kNumElems];
-  Node* base = m.PointerConstant(buffer);
-  Node* offset = m.Parameter(0);
-  Node* len = length_is_immediate ? m.Int32Constant(kLength) : m.Parameter(1);
-  Node* val = m.Int32Constant(kValue);
-  m.AddNode(machine.CheckedStore(MachineRepresentation::kWord32), base, offset,
-            len, val);
-  m.Return(val);
-
-  // in-bounds accesses.
-  for (int32_t i = 0; i < kNumElems; i++) {
-    memset(buffer, 0, sizeof(buffer));
-    int32_t offset = static_cast<int32_t>(i * sizeof(int32_t));
-    CHECK_EQ(kValue, m.Call(offset, kLength));
-    for (int32_t j = 0; j < kNumElems + kNumElems; j++) {
-      if (i == j) {
-        CHECK_EQ(kValue, buffer[j]);
-      } else {
-        CHECK_EQ(0, buffer[j]);
-      }
-    }
-  }
-
-  memset(buffer, 0, sizeof(buffer));
-
-  // slightly out-of-bounds accesses.
-  for (int32_t i = kLength; i < kNumElems + 30; i++) {
-    int32_t offset = static_cast<int32_t>(i * sizeof(int32_t));
-    CHECK_EQ(kValue, m.Call(offset, kLength));
-    for (int32_t j = 0; j < kNumElems + kNumElems; j++) {
-      CHECK_EQ(0, buffer[j]);
-    }
-  }
-
-  // way out-of-bounds accesses.
-  for (int32_t offset = -2000000000; offset <= 2000000000;
-       offset += 100000000) {
-    if (offset == 0) continue;
-    CHECK_EQ(kValue, m.Call(offset, kLength));
-    for (int32_t j = 0; j < kNumElems + kNumElems; j++) {
-      CHECK_EQ(0, buffer[j]);
-    }
-  }
-}
-
-TEST(RunOobCheckedStore) { TestRunOobCheckedStore(false); }
-
-TEST(RunOobCheckedStoreImm) { TestRunOobCheckedStore(true); }
-
-// TODO(titzer): CheckedLoad/CheckedStore don't support 64-bit offsets.
-#define ALLOW_64_BIT_OFFSETS 0
-
-#if V8_TARGET_ARCH_64_BIT && ALLOW_64_BIT_OFFSETS
-
-void TestRunOobCheckedLoad64(uint32_t pseudo_base, bool length_is_immediate) {
-  RawMachineAssemblerTester<int32_t> m(MachineType::Uint64(),
-                                       MachineType::Uint64());
-  MachineOperatorBuilder machine(m.zone());
-  const uint32_t kNumElems = 25;
-  const uint32_t kLength = kNumElems * 4;
-  int32_t real_buffer[kNumElems];
-
-  // Simulate the end of a large buffer.
-  int32_t* buffer = real_buffer - (pseudo_base / 4);
-  uint64_t length = kLength + pseudo_base;
-
-  Node* base = m.PointerConstant(buffer);
-  Node* offset = m.Parameter(0);
-  Node* len = length_is_immediate ? m.Int64Constant(length) : m.Parameter(1);
-  Node* node =
-      m.AddNode(machine.CheckedLoad(MachineType::Int32()), base, offset, len);
-  m.Return(node);
-
-  {
-    // randomize memory.
-    v8::base::RandomNumberGenerator rng;
-    rng.SetSeed(100);
-    rng.NextBytes(&real_buffer[0], sizeof(real_buffer));
-  }
-
-  // in-bounds accesses.
-  for (uint32_t i = 0; i < kNumElems; i++) {
-    uint64_t offset = pseudo_base + i * 4;
-    int32_t expected = real_buffer[i];
-    CHECK_EQ(expected, m.Call(offset, length));
-  }
-
-  // in-bounds accesses w.r.t lower 32-bits, but upper bits set.
-  for (uint64_t i = 0x100000000ULL; i != 0; i <<= 1) {
-    uint64_t offset = pseudo_base + i;
-    CheckOobValue(m.Call(offset, length));
-  }
-
-  // slightly out-of-bounds accesses.
-  for (uint32_t i = kLength; i < kNumElems + 30; i++) {
-    uint64_t offset = pseudo_base + i * 4;
-    CheckOobValue(0, m.Call(offset, length));
-  }
-
-  // way out-of-bounds accesses.
-  for (uint64_t offset = length; offset < 100 * A_BILLION; offset += A_GIG) {
-    if (offset < length) continue;
-    CheckOobValue(0, m.Call(offset, length));
-  }
-}
-
-TEST(RunOobCheckedLoad64_0) {
-  TestRunOobCheckedLoad64(0, false);
-  TestRunOobCheckedLoad64(0, true);
-}
-
-TEST(RunOobCheckedLoad64_1) {
-  TestRunOobCheckedLoad64(1 * A_BILLION, false);
-  TestRunOobCheckedLoad64(1 * A_BILLION, true);
-}
-
-TEST(RunOobCheckedLoad64_2) {
-  TestRunOobCheckedLoad64(2 * A_BILLION, false);
-  TestRunOobCheckedLoad64(2 * A_BILLION, true);
-}
-
-TEST(RunOobCheckedLoad64_3) {
-  TestRunOobCheckedLoad64(3 * A_BILLION, false);
-  TestRunOobCheckedLoad64(3 * A_BILLION, true);
-}
-
-TEST(RunOobCheckedLoad64_4) {
-  TestRunOobCheckedLoad64(4 * A_BILLION, false);
-  TestRunOobCheckedLoad64(4 * A_BILLION, true);
-}
-
-void TestRunOobCheckedStore64(uint32_t pseudo_base, bool length_is_immediate) {
-  RawMachineAssemblerTester<int32_t> m(MachineType::Uint64(),
-                                       MachineType::Uint64());
-  MachineOperatorBuilder machine(m.zone());
-  const uint32_t kNumElems = 21;
-  const uint32_t kLength = kNumElems * 4;
-  const uint32_t kValue = 897234987;
-  int32_t real_buffer[kNumElems + kNumElems];
-
-  // Simulate the end of a large buffer.
-  int32_t* buffer = real_buffer - (pseudo_base / 4);
-  uint64_t length = kLength + pseudo_base;
-
-  Node* base = m.PointerConstant(buffer);
-  Node* offset = m.Parameter(0);
-  Node* len = length_is_immediate ? m.Int64Constant(length) : m.Parameter(1);
-  Node* val = m.Int32Constant(kValue);
-  m.AddNode(machine.CheckedStore(MachineRepresentation::kWord32), base, offset,
-            len, val);
-  m.Return(val);
-
-  // in-bounds accesses.
-  for (uint32_t i = 0; i < kNumElems; i++) {
-    memset(real_buffer, 0, sizeof(real_buffer));
-    uint64_t offset = pseudo_base + i * 4;
-    CHECK_EQ(kValue, m.Call(offset, length));
-    for (uint32_t j = 0; j < kNumElems + kNumElems; j++) {
-      if (i == j) {
-        CHECK_EQ(kValue, real_buffer[j]);
-      } else {
-        CHECK_EQ(0, real_buffer[j]);
-      }
-    }
-  }
-
-  memset(real_buffer, 0, sizeof(real_buffer));
-
-  // in-bounds accesses w.r.t lower 32-bits, but upper bits set.
-  for (uint64_t i = 0x100000000ULL; i != 0; i <<= 1) {
-    uint64_t offset = pseudo_base + i;
-    CHECK_EQ(kValue, m.Call(offset, length));
-    for (int32_t j = 0; j < kNumElems + kNumElems; j++) {
-      CHECK_EQ(0, real_buffer[j]);
-    }
-  }
-
-  // slightly out-of-bounds accesses.
-  for (uint32_t i = kLength; i < kNumElems + 30; i++) {
-    uint64_t offset = pseudo_base + i * 4;
-    CHECK_EQ(kValue, m.Call(offset, length));
-    for (int32_t j = 0; j < kNumElems + kNumElems; j++) {
-      CHECK_EQ(0, real_buffer[j]);
-    }
-  }
-
-  // way out-of-bounds accesses.
-  for (uint64_t offset = length; offset < 100 * A_BILLION; offset += A_GIG) {
-    if (offset < length) continue;
-    CHECK_EQ(kValue, m.Call(offset, length));
-    for (int32_t j = 0; j < kNumElems + kNumElems; j++) {
-      CHECK_EQ(0, real_buffer[j]);
-    }
-  }
-}
-
-TEST(RunOobCheckedStore64_0) {
-  TestRunOobCheckedStore64(0, false);
-  TestRunOobCheckedStore64(0, true);
-}
-
-TEST(RunOobCheckedStore64_1) {
-  TestRunOobCheckedStore64(1 * A_BILLION, false);
-  TestRunOobCheckedStore64(1 * A_BILLION, true);
-}
-
-TEST(RunOobCheckedStore64_2) {
-  TestRunOobCheckedStore64(2 * A_BILLION, false);
-  TestRunOobCheckedStore64(2 * A_BILLION, true);
-}
-
-TEST(RunOobCheckedStore64_3) {
-  TestRunOobCheckedStore64(3 * A_BILLION, false);
-  TestRunOobCheckedStore64(3 * A_BILLION, true);
-}
-
-TEST(RunOobCheckedStore64_4) {
-  TestRunOobCheckedStore64(4 * A_BILLION, false);
-  TestRunOobCheckedStore64(4 * A_BILLION, true);
-}
-
-#endif
-
-void TestRunOobCheckedLoad_pseudo(uint64_t x, bool length_is_immediate) {
-  RawMachineAssemblerTester<int32_t> m(MachineType::Uint32(),
-                                       MachineType::Uint32());
-
-  uint32_t pseudo_base = static_cast<uint32_t>(x);
-  MachineOperatorBuilder machine(m.zone());
-  const uint32_t kNumElems = 29;
-  const uint32_t kLength = pseudo_base + kNumElems * 4;
-
-  int32_t buffer[kNumElems];
-  Node* base = m.PointerConstant(reinterpret_cast<byte*>(buffer) - pseudo_base);
-  Node* offset = m.Parameter(0);
-  Node* len = length_is_immediate ? m.Int32Constant(kLength) : m.Parameter(1);
-  Node* node =
-      m.AddNode(machine.CheckedLoad(MachineType::Int32()), base, offset, len);
-  m.Return(node);
-
-  {
-    // randomize memory.
-    v8::base::RandomNumberGenerator rng;
-    rng.SetSeed(100);
-    rng.NextBytes(&buffer[0], sizeof(buffer));
-  }
-
-  // in-bounds accesses.
-  for (uint32_t i = 0; i < kNumElems; i++) {
-    uint32_t offset = static_cast<uint32_t>(i * sizeof(int32_t));
-    uint32_t expected = buffer[i];
-    CHECK_EQ(expected,
-             static_cast<uint32_t>(m.Call(offset + pseudo_base, kLength)));
-  }
-
-  // slightly out-of-bounds accesses.
-  for (uint32_t i = kNumElems; i < kNumElems + 30; i++) {
-    uint32_t offset = i * sizeof(int32_t);
-    CheckOobValue(m.Call(offset + pseudo_base, kLength));
-  }
-
-  // way out-of-bounds accesses.
-  for (uint64_t i = pseudo_base + sizeof(buffer); i < 0xFFFFFFFF;
-       i += A_BILLION) {
-    uint32_t offset = static_cast<uint32_t>(i);
-    CheckOobValue(m.Call(offset, kLength));
-  }
-}
-
-TEST(RunOobCheckedLoad_pseudo0) {
-  TestRunOobCheckedLoad_pseudo(0, false);
-  TestRunOobCheckedLoad_pseudo(0, true);
-}
-
-TEST(RunOobCheckedLoad_pseudo1) {
-  TestRunOobCheckedLoad_pseudo(100000, false);
-  TestRunOobCheckedLoad_pseudo(100000, true);
-}
-
-TEST(RunOobCheckedLoad_pseudo2) {
-  TestRunOobCheckedLoad_pseudo(A_BILLION, false);
-  TestRunOobCheckedLoad_pseudo(A_BILLION, true);
-}
-
-TEST(RunOobCheckedLoad_pseudo3) {
-  TestRunOobCheckedLoad_pseudo(A_GIG, false);
-  TestRunOobCheckedLoad_pseudo(A_GIG, true);
-}
-
-TEST(RunOobCheckedLoad_pseudo4) {
-  TestRunOobCheckedLoad_pseudo(2 * A_BILLION, false);
-  TestRunOobCheckedLoad_pseudo(2 * A_BILLION, true);
-}
-
-TEST(RunOobCheckedLoad_pseudo5) {
-  TestRunOobCheckedLoad_pseudo(2 * A_GIG, false);
-  TestRunOobCheckedLoad_pseudo(2 * A_GIG, true);
-}
-
-TEST(RunOobCheckedLoad_pseudo6) {
-  TestRunOobCheckedLoad_pseudo(3 * A_BILLION, false);
-  TestRunOobCheckedLoad_pseudo(3 * A_BILLION, true);
-}
-
-TEST(RunOobCheckedLoad_pseudo7) {
-  TestRunOobCheckedLoad_pseudo(3 * A_GIG, false);
-  TestRunOobCheckedLoad_pseudo(3 * A_GIG, true);
-}
-
-TEST(RunOobCheckedLoad_pseudo8) {
-  TestRunOobCheckedLoad_pseudo(4 * A_BILLION, false);
-  TestRunOobCheckedLoad_pseudo(4 * A_BILLION, true);
-}
-
-template <typename MemType>
-void TestRunOobCheckedLoadT_pseudo(uint64_t x, bool length_is_immediate) {
-  const int32_t kReturn = 11999;
-  const uint32_t kNumElems = 29;
-  MemType buffer[kNumElems];
-  uint32_t pseudo_base = static_cast<uint32_t>(x);
-  const uint32_t kLength = static_cast<uint32_t>(pseudo_base + sizeof(buffer));
-
-  MemType result;
-
-  RawMachineAssemblerTester<int32_t> m(MachineType::Uint32(),
-                                       MachineType::Uint32());
-  MachineOperatorBuilder machine(m.zone());
-  Node* base = m.PointerConstant(reinterpret_cast<byte*>(buffer) - pseudo_base);
-  Node* offset = m.Parameter(0);
-  Node* len = length_is_immediate ? m.Int32Constant(kLength) : m.Parameter(1);
-  Node* node = m.AddNode(machine.CheckedLoad(MachineTypeForC<MemType>()), base,
-                         offset, len);
-  Node* store = m.StoreToPointer(
-      &result, MachineTypeForC<MemType>().representation(), node);
-  USE(store);
-  m.Return(m.Int32Constant(kReturn));
-
-  {
-    // randomize memory.
-    v8::base::RandomNumberGenerator rng;
-    rng.SetSeed(103);
-    rng.NextBytes(&buffer[0], sizeof(buffer));
-  }
-
-  // in-bounds accesses.
-  for (uint32_t i = 0; i < kNumElems; i++) {
-    uint32_t offset = static_cast<uint32_t>(i * sizeof(MemType));
-    MemType expected = buffer[i];
-    CHECK_EQ(kReturn, m.Call(offset + pseudo_base, kLength));
-    CHECK_EQ(expected, result);
-  }
-
-  // slightly out-of-bounds accesses.
-  for (uint32_t i = kNumElems; i < kNumElems + 30; i++) {
-    uint32_t offset = static_cast<uint32_t>(i * sizeof(MemType));
-    CHECK_EQ(kReturn, m.Call(offset + pseudo_base, kLength));
-    CheckOobValue(result);
-  }
-
-  // way out-of-bounds accesses.
-  for (uint64_t i = pseudo_base + sizeof(buffer); i < 0xFFFFFFFF;
-       i += A_BILLION) {
-    uint32_t offset = static_cast<uint32_t>(i);
-    CHECK_EQ(kReturn, m.Call(offset, kLength));
-    CheckOobValue(result);
-  }
-}
-
-TEST(RunOobCheckedLoadT_pseudo0) {
-  TestRunOobCheckedLoadT_pseudo<int32_t>(0, false);
-  TestRunOobCheckedLoadT_pseudo<int32_t>(0, true);
-  TestRunOobCheckedLoadT_pseudo<float>(0, false);
-  TestRunOobCheckedLoadT_pseudo<float>(0, true);
-  TestRunOobCheckedLoadT_pseudo<double>(0, false);
-  TestRunOobCheckedLoadT_pseudo<double>(0, true);
-}
-
-TEST(RunOobCheckedLoadT_pseudo1) {
-  TestRunOobCheckedLoadT_pseudo<int32_t>(100000, false);
-  TestRunOobCheckedLoadT_pseudo<int32_t>(100000, true);
-  TestRunOobCheckedLoadT_pseudo<float>(100000, false);
-  TestRunOobCheckedLoadT_pseudo<float>(100000, true);
-  TestRunOobCheckedLoadT_pseudo<double>(100000, false);
-  TestRunOobCheckedLoadT_pseudo<double>(100000, true);
-}
-
-TEST(RunOobCheckedLoadT_pseudo2) {
-  TestRunOobCheckedLoadT_pseudo<int32_t>(A_BILLION, false);
-  TestRunOobCheckedLoadT_pseudo<int32_t>(A_BILLION, true);
-  TestRunOobCheckedLoadT_pseudo<float>(A_BILLION, false);
-  TestRunOobCheckedLoadT_pseudo<float>(A_BILLION, true);
-  TestRunOobCheckedLoadT_pseudo<double>(A_BILLION, false);
-  TestRunOobCheckedLoadT_pseudo<double>(A_BILLION, true);
-}
-
-TEST(RunOobCheckedLoadT_pseudo3) {
-  TestRunOobCheckedLoadT_pseudo<int32_t>(A_GIG, false);
-  TestRunOobCheckedLoadT_pseudo<int32_t>(A_GIG, true);
-  TestRunOobCheckedLoadT_pseudo<float>(A_GIG, false);
-  TestRunOobCheckedLoadT_pseudo<float>(A_GIG, true);
-  TestRunOobCheckedLoadT_pseudo<double>(A_GIG, false);
-  TestRunOobCheckedLoadT_pseudo<double>(A_GIG, true);
-}
-
-TEST(RunOobCheckedLoadT_pseudo4) {
-  TestRunOobCheckedLoadT_pseudo<int32_t>(2 * A_BILLION, false);
-  TestRunOobCheckedLoadT_pseudo<int32_t>(2 * A_BILLION, true);
-  TestRunOobCheckedLoadT_pseudo<float>(2 * A_BILLION, false);
-  TestRunOobCheckedLoadT_pseudo<float>(2 * A_BILLION, true);
-  TestRunOobCheckedLoadT_pseudo<double>(2 * A_BILLION, false);
-  TestRunOobCheckedLoadT_pseudo<double>(2 * A_BILLION, true);
-}
-
-TEST(RunOobCheckedLoadT_pseudo5) {
-  TestRunOobCheckedLoadT_pseudo<int32_t>(2 * A_GIG, false);
-  TestRunOobCheckedLoadT_pseudo<int32_t>(2 * A_GIG, true);
-  TestRunOobCheckedLoadT_pseudo<float>(2 * A_GIG, false);
-  TestRunOobCheckedLoadT_pseudo<float>(2 * A_GIG, true);
-  TestRunOobCheckedLoadT_pseudo<double>(2 * A_GIG, false);
-  TestRunOobCheckedLoadT_pseudo<double>(2 * A_GIG, true);
-}
-
-TEST(RunOobCheckedLoadT_pseudo6) {
-  TestRunOobCheckedLoadT_pseudo<int32_t>(3 * A_BILLION, false);
-  TestRunOobCheckedLoadT_pseudo<int32_t>(3 * A_BILLION, true);
-  TestRunOobCheckedLoadT_pseudo<float>(3 * A_BILLION, false);
-  TestRunOobCheckedLoadT_pseudo<float>(3 * A_BILLION, true);
-  TestRunOobCheckedLoadT_pseudo<double>(3 * A_BILLION, false);
-  TestRunOobCheckedLoadT_pseudo<double>(3 * A_BILLION, true);
-}
-
-TEST(RunOobCheckedLoadT_pseudo7) {
-  TestRunOobCheckedLoadT_pseudo<int32_t>(3 * A_GIG, false);
-  TestRunOobCheckedLoadT_pseudo<int32_t>(3 * A_GIG, true);
-  TestRunOobCheckedLoadT_pseudo<float>(3 * A_GIG, false);
-  TestRunOobCheckedLoadT_pseudo<float>(3 * A_GIG, true);
-  TestRunOobCheckedLoadT_pseudo<double>(3 * A_GIG, false);
-  TestRunOobCheckedLoadT_pseudo<double>(3 * A_GIG, true);
-}
-
-TEST(RunOobCheckedLoadT_pseudo8) {
-  TestRunOobCheckedLoadT_pseudo<int32_t>(4 * A_BILLION, false);
-  TestRunOobCheckedLoadT_pseudo<int32_t>(4 * A_BILLION, true);
-  TestRunOobCheckedLoadT_pseudo<float>(4 * A_BILLION, false);
-  TestRunOobCheckedLoadT_pseudo<float>(4 * A_BILLION, true);
-  TestRunOobCheckedLoadT_pseudo<double>(4 * A_BILLION, false);
-  TestRunOobCheckedLoadT_pseudo<double>(4 * A_BILLION, true);
-}
-
 }  // namespace compiler
 }  // namespace internal
 }  // namespace v8
diff --git a/src/v8/test/cctest/compiler/test-run-machops.cc b/src/v8/test/cctest/compiler/test-run-machops.cc
index a2cc262..7f752b8 100644
--- a/src/v8/test/cctest/compiler/test-run-machops.cc
+++ b/src/v8/test/cctest/compiler/test-run-machops.cc
@@ -9,6 +9,7 @@
 #include "src/base/bits.h"
 #include "src/base/ieee754.h"
 #include "src/base/utils/random-number-generator.h"
+#include "src/boxed-float.h"
 #include "src/codegen.h"
 #include "src/objects-inl.h"
 #include "src/utils.h"
@@ -73,13 +74,13 @@
   m.Return(m.AddNode(m.machine()->Word32ReverseBits().op(), m.Parameter(0)));
 
   CHECK_EQ(uint32_t(0x00000000), m.Call(uint32_t(0x00000000)));
-  CHECK_EQ(uint32_t(0x12345678), m.Call(uint32_t(0x1e6a2c48)));
-  CHECK_EQ(uint32_t(0xfedcba09), m.Call(uint32_t(0x905d3b7f)));
+  CHECK_EQ(uint32_t(0x12345678), m.Call(uint32_t(0x1E6A2C48)));
+  CHECK_EQ(uint32_t(0xFEDCBA09), m.Call(uint32_t(0x905D3B7F)));
   CHECK_EQ(uint32_t(0x01010101), m.Call(uint32_t(0x80808080)));
   CHECK_EQ(uint32_t(0x01020408), m.Call(uint32_t(0x10204080)));
-  CHECK_EQ(uint32_t(0xf0703010), m.Call(uint32_t(0x080c0e0f)));
-  CHECK_EQ(uint32_t(0x1f8d0a3a), m.Call(uint32_t(0x5c50b1f8)));
-  CHECK_EQ(uint32_t(0xffffffff), m.Call(uint32_t(0xffffffff)));
+  CHECK_EQ(uint32_t(0xF0703010), m.Call(uint32_t(0x080C0E0F)));
+  CHECK_EQ(uint32_t(0x1F8D0A3A), m.Call(uint32_t(0x5C50B1F8)));
+  CHECK_EQ(uint32_t(0xFFFFFFFF), m.Call(uint32_t(0xFFFFFFFF)));
 }
 
 TEST(RunWord32ReverseBytes) {
@@ -92,12 +93,12 @@
 
   CHECK_EQ(uint32_t(0x00000000), m.Call(uint32_t(0x00000000)));
   CHECK_EQ(uint32_t(0x12345678), m.Call(uint32_t(0x78563412)));
-  CHECK_EQ(uint32_t(0xfedcba09), m.Call(uint32_t(0x09badcfe)));
+  CHECK_EQ(uint32_t(0xFEDCBA09), m.Call(uint32_t(0x09BADCFE)));
   CHECK_EQ(uint32_t(0x01010101), m.Call(uint32_t(0x01010101)));
   CHECK_EQ(uint32_t(0x01020408), m.Call(uint32_t(0x08040201)));
-  CHECK_EQ(uint32_t(0xf0703010), m.Call(uint32_t(0x103070f0)));
-  CHECK_EQ(uint32_t(0x1f8d0a3a), m.Call(uint32_t(0x3a0a8d1f)));
-  CHECK_EQ(uint32_t(0xffffffff), m.Call(uint32_t(0xffffffff)));
+  CHECK_EQ(uint32_t(0xF0703010), m.Call(uint32_t(0x103070F0)));
+  CHECK_EQ(uint32_t(0x1F8D0A3A), m.Call(uint32_t(0x3A0A8D1F)));
+  CHECK_EQ(uint32_t(0xFFFFFFFF), m.Call(uint32_t(0xFFFFFFFF)));
 }
 
 TEST(RunWord32Ctz) {
@@ -113,34 +114,34 @@
   CHECK_EQ(30, m.Call(uint32_t(0x40000000)));
   CHECK_EQ(29, m.Call(uint32_t(0x20000000)));
   CHECK_EQ(28, m.Call(uint32_t(0x10000000)));
-  CHECK_EQ(27, m.Call(uint32_t(0xa8000000)));
-  CHECK_EQ(26, m.Call(uint32_t(0xf4000000)));
+  CHECK_EQ(27, m.Call(uint32_t(0xA8000000)));
+  CHECK_EQ(26, m.Call(uint32_t(0xF4000000)));
   CHECK_EQ(25, m.Call(uint32_t(0x62000000)));
   CHECK_EQ(24, m.Call(uint32_t(0x91000000)));
-  CHECK_EQ(23, m.Call(uint32_t(0xcd800000)));
+  CHECK_EQ(23, m.Call(uint32_t(0xCD800000)));
   CHECK_EQ(22, m.Call(uint32_t(0x09400000)));
-  CHECK_EQ(21, m.Call(uint32_t(0xaf200000)));
-  CHECK_EQ(20, m.Call(uint32_t(0xac100000)));
-  CHECK_EQ(19, m.Call(uint32_t(0xe0b80000)));
-  CHECK_EQ(18, m.Call(uint32_t(0x9ce40000)));
-  CHECK_EQ(17, m.Call(uint32_t(0xc7920000)));
-  CHECK_EQ(16, m.Call(uint32_t(0xb8f10000)));
-  CHECK_EQ(15, m.Call(uint32_t(0x3b9f8000)));
-  CHECK_EQ(14, m.Call(uint32_t(0xdb4c4000)));
-  CHECK_EQ(13, m.Call(uint32_t(0xe9a32000)));
-  CHECK_EQ(12, m.Call(uint32_t(0xfca61000)));
-  CHECK_EQ(11, m.Call(uint32_t(0x6c8a7800)));
-  CHECK_EQ(10, m.Call(uint32_t(0x8ce5a400)));
-  CHECK_EQ(9, m.Call(uint32_t(0xcb7d0200)));
-  CHECK_EQ(8, m.Call(uint32_t(0xcb4dc100)));
-  CHECK_EQ(7, m.Call(uint32_t(0xdfbec580)));
-  CHECK_EQ(6, m.Call(uint32_t(0x27a9db40)));
-  CHECK_EQ(5, m.Call(uint32_t(0xde3bcb20)));
-  CHECK_EQ(4, m.Call(uint32_t(0xd7e8a610)));
-  CHECK_EQ(3, m.Call(uint32_t(0x9afdbc88)));
-  CHECK_EQ(2, m.Call(uint32_t(0x9afdbc84)));
-  CHECK_EQ(1, m.Call(uint32_t(0x9afdbc82)));
-  CHECK_EQ(0, m.Call(uint32_t(0x9afdbc81)));
+  CHECK_EQ(21, m.Call(uint32_t(0xAF200000)));
+  CHECK_EQ(20, m.Call(uint32_t(0xAC100000)));
+  CHECK_EQ(19, m.Call(uint32_t(0xE0B80000)));
+  CHECK_EQ(18, m.Call(uint32_t(0x9CE40000)));
+  CHECK_EQ(17, m.Call(uint32_t(0xC7920000)));
+  CHECK_EQ(16, m.Call(uint32_t(0xB8F10000)));
+  CHECK_EQ(15, m.Call(uint32_t(0x3B9F8000)));
+  CHECK_EQ(14, m.Call(uint32_t(0xDB4C4000)));
+  CHECK_EQ(13, m.Call(uint32_t(0xE9A32000)));
+  CHECK_EQ(12, m.Call(uint32_t(0xFCA61000)));
+  CHECK_EQ(11, m.Call(uint32_t(0x6C8A7800)));
+  CHECK_EQ(10, m.Call(uint32_t(0x8CE5A400)));
+  CHECK_EQ(9, m.Call(uint32_t(0xCB7D0200)));
+  CHECK_EQ(8, m.Call(uint32_t(0xCB4DC100)));
+  CHECK_EQ(7, m.Call(uint32_t(0xDFBEC580)));
+  CHECK_EQ(6, m.Call(uint32_t(0x27A9DB40)));
+  CHECK_EQ(5, m.Call(uint32_t(0xDE3BCB20)));
+  CHECK_EQ(4, m.Call(uint32_t(0xD7E8A610)));
+  CHECK_EQ(3, m.Call(uint32_t(0x9AFDBC88)));
+  CHECK_EQ(2, m.Call(uint32_t(0x9AFDBC84)));
+  CHECK_EQ(1, m.Call(uint32_t(0x9AFDBC82)));
+  CHECK_EQ(0, m.Call(uint32_t(0x9AFDBC81)));
 }
 
 TEST(RunWord32Clz) {
@@ -154,11 +155,11 @@
   CHECK_EQ(4, m.Call(uint32_t(0x08050000)));
   CHECK_EQ(5, m.Call(uint32_t(0x04006000)));
   CHECK_EQ(6, m.Call(uint32_t(0x02000000)));
-  CHECK_EQ(7, m.Call(uint32_t(0x010000a0)));
-  CHECK_EQ(8, m.Call(uint32_t(0x00800c00)));
+  CHECK_EQ(7, m.Call(uint32_t(0x010000A0)));
+  CHECK_EQ(8, m.Call(uint32_t(0x00800C00)));
   CHECK_EQ(9, m.Call(uint32_t(0x00400000)));
-  CHECK_EQ(10, m.Call(uint32_t(0x0020000d)));
-  CHECK_EQ(11, m.Call(uint32_t(0x00100f00)));
+  CHECK_EQ(10, m.Call(uint32_t(0x0020000D)));
+  CHECK_EQ(11, m.Call(uint32_t(0x00100F00)));
   CHECK_EQ(12, m.Call(uint32_t(0x00080000)));
   CHECK_EQ(13, m.Call(uint32_t(0x00041000)));
   CHECK_EQ(14, m.Call(uint32_t(0x00020020)));
@@ -194,11 +195,11 @@
   CHECK_EQ(0, m.Call(uint32_t(0x00000000)));
   CHECK_EQ(1, m.Call(uint32_t(0x00000001)));
   CHECK_EQ(1, m.Call(uint32_t(0x80000000)));
-  CHECK_EQ(32, m.Call(uint32_t(0xffffffff)));
-  CHECK_EQ(6, m.Call(uint32_t(0x000dc100)));
-  CHECK_EQ(9, m.Call(uint32_t(0xe00dc100)));
-  CHECK_EQ(11, m.Call(uint32_t(0xe00dc103)));
-  CHECK_EQ(9, m.Call(uint32_t(0x000dc107)));
+  CHECK_EQ(32, m.Call(uint32_t(0xFFFFFFFF)));
+  CHECK_EQ(6, m.Call(uint32_t(0x000DC100)));
+  CHECK_EQ(9, m.Call(uint32_t(0xE00DC100)));
+  CHECK_EQ(11, m.Call(uint32_t(0xE00DC103)));
+  CHECK_EQ(9, m.Call(uint32_t(0x000DC107)));
 }
 
 
@@ -212,13 +213,13 @@
   m.Return(m.AddNode(m.machine()->Word64ReverseBits().op(), m.Parameter(0)));
 
   CHECK_EQ(uint64_t(0x0000000000000000), m.Call(uint64_t(0x0000000000000000)));
-  CHECK_EQ(uint64_t(0x1234567890abcdef), m.Call(uint64_t(0xf7b3d5091e6a2c48)));
-  CHECK_EQ(uint64_t(0xfedcba0987654321), m.Call(uint64_t(0x84c2a6e1905d3b7f)));
+  CHECK_EQ(uint64_t(0x1234567890ABCDEF), m.Call(uint64_t(0xF7B3D5091E6A2C48)));
+  CHECK_EQ(uint64_t(0xFEDCBA0987654321), m.Call(uint64_t(0x84C2A6E1905D3B7F)));
   CHECK_EQ(uint64_t(0x0101010101010101), m.Call(uint64_t(0x8080808080808080)));
-  CHECK_EQ(uint64_t(0x0102040803060c01), m.Call(uint64_t(0x803060c010204080)));
-  CHECK_EQ(uint64_t(0xf0703010e060200f), m.Call(uint64_t(0xf0040607080c0e0f)));
-  CHECK_EQ(uint64_t(0x2f8a6df01c21fa3b), m.Call(uint64_t(0xdc5f84380fb651f4)));
-  CHECK_EQ(uint64_t(0xffffffffffffffff), m.Call(uint64_t(0xffffffffffffffff)));
+  CHECK_EQ(uint64_t(0x0102040803060C01), m.Call(uint64_t(0x803060C010204080)));
+  CHECK_EQ(uint64_t(0xF0703010E060200F), m.Call(uint64_t(0xF0040607080C0E0F)));
+  CHECK_EQ(uint64_t(0x2F8A6DF01C21FA3B), m.Call(uint64_t(0xDC5F84380FB651F4)));
+  CHECK_EQ(uint64_t(0xFFFFFFFFFFFFFFFF), m.Call(uint64_t(0xFFFFFFFFFFFFFFFF)));
 }
 
 TEST(RunWord64ReverseBytes) {
@@ -230,13 +231,13 @@
   m.Return(m.AddNode(m.machine()->Word64ReverseBytes().op(), m.Parameter(0)));
 
   CHECK_EQ(uint64_t(0x0000000000000000), m.Call(uint64_t(0x0000000000000000)));
-  CHECK_EQ(uint64_t(0x1234567890abcdef), m.Call(uint64_t(0xefcdab9078563412)));
-  CHECK_EQ(uint64_t(0xfedcba0987654321), m.Call(uint64_t(0x2143658709badcfe)));
+  CHECK_EQ(uint64_t(0x1234567890ABCDEF), m.Call(uint64_t(0xEFCDAB9078563412)));
+  CHECK_EQ(uint64_t(0xFEDCBA0987654321), m.Call(uint64_t(0x2143658709BADCFE)));
   CHECK_EQ(uint64_t(0x0101010101010101), m.Call(uint64_t(0x0101010101010101)));
-  CHECK_EQ(uint64_t(0x0102040803060c01), m.Call(uint64_t(0x010c060308040201)));
-  CHECK_EQ(uint64_t(0xf0703010e060200f), m.Call(uint64_t(0x0f2060e0103070f0)));
-  CHECK_EQ(uint64_t(0x2f8a6df01c21fa3b), m.Call(uint64_t(0x3bfa211cf06d8a2f)));
-  CHECK_EQ(uint64_t(0xffffffffffffffff), m.Call(uint64_t(0xffffffffffffffff)));
+  CHECK_EQ(uint64_t(0x0102040803060C01), m.Call(uint64_t(0x010C060308040201)));
+  CHECK_EQ(uint64_t(0xF0703010E060200F), m.Call(uint64_t(0x0F2060E0103070F0)));
+  CHECK_EQ(uint64_t(0x2F8A6DF01C21FA3B), m.Call(uint64_t(0x3BFA211CF06D8A2F)));
+  CHECK_EQ(uint64_t(0xFFFFFFFFFFFFFFFF), m.Call(uint64_t(0xFFFFFFFFFFFFFFFF)));
 }
 
 TEST(RunWord64Clz) {
@@ -250,11 +251,11 @@
   CHECK_EQ(4, m.Call(uint64_t(0x0805000000000000)));
   CHECK_EQ(5, m.Call(uint64_t(0x0400600000000000)));
   CHECK_EQ(6, m.Call(uint64_t(0x0200000000000000)));
-  CHECK_EQ(7, m.Call(uint64_t(0x010000a000000000)));
-  CHECK_EQ(8, m.Call(uint64_t(0x00800c0000000000)));
+  CHECK_EQ(7, m.Call(uint64_t(0x010000A000000000)));
+  CHECK_EQ(8, m.Call(uint64_t(0x00800C0000000000)));
   CHECK_EQ(9, m.Call(uint64_t(0x0040000000000000)));
-  CHECK_EQ(10, m.Call(uint64_t(0x0020000d00000000)));
-  CHECK_EQ(11, m.Call(uint64_t(0x00100f0000000000)));
+  CHECK_EQ(10, m.Call(uint64_t(0x0020000D00000000)));
+  CHECK_EQ(11, m.Call(uint64_t(0x00100F0000000000)));
   CHECK_EQ(12, m.Call(uint64_t(0x0008000000000000)));
   CHECK_EQ(13, m.Call(uint64_t(0x0004100000000000)));
   CHECK_EQ(14, m.Call(uint64_t(0x0002002000000000)));
@@ -282,11 +283,11 @@
   CHECK_EQ(36, m.Call(uint64_t(0x0000000008050000)));
   CHECK_EQ(37, m.Call(uint64_t(0x0000000004006000)));
   CHECK_EQ(38, m.Call(uint64_t(0x0000000002000000)));
-  CHECK_EQ(39, m.Call(uint64_t(0x00000000010000a0)));
-  CHECK_EQ(40, m.Call(uint64_t(0x0000000000800c00)));
+  CHECK_EQ(39, m.Call(uint64_t(0x00000000010000A0)));
+  CHECK_EQ(40, m.Call(uint64_t(0x0000000000800C00)));
   CHECK_EQ(41, m.Call(uint64_t(0x0000000000400000)));
-  CHECK_EQ(42, m.Call(uint64_t(0x000000000020000d)));
-  CHECK_EQ(43, m.Call(uint64_t(0x0000000000100f00)));
+  CHECK_EQ(42, m.Call(uint64_t(0x000000000020000D)));
+  CHECK_EQ(43, m.Call(uint64_t(0x0000000000100F00)));
   CHECK_EQ(44, m.Call(uint64_t(0x0000000000080000)));
   CHECK_EQ(45, m.Call(uint64_t(0x0000000000041000)));
   CHECK_EQ(46, m.Call(uint64_t(0x0000000000020020)));
@@ -324,66 +325,66 @@
   CHECK_EQ(62, m.Call(uint64_t(0x4000000000000000)));
   CHECK_EQ(61, m.Call(uint64_t(0x2000000000000000)));
   CHECK_EQ(60, m.Call(uint64_t(0x1000000000000000)));
-  CHECK_EQ(59, m.Call(uint64_t(0xa800000000000000)));
-  CHECK_EQ(58, m.Call(uint64_t(0xf400000000000000)));
+  CHECK_EQ(59, m.Call(uint64_t(0xA800000000000000)));
+  CHECK_EQ(58, m.Call(uint64_t(0xF400000000000000)));
   CHECK_EQ(57, m.Call(uint64_t(0x6200000000000000)));
   CHECK_EQ(56, m.Call(uint64_t(0x9100000000000000)));
-  CHECK_EQ(55, m.Call(uint64_t(0xcd80000000000000)));
+  CHECK_EQ(55, m.Call(uint64_t(0xCD80000000000000)));
   CHECK_EQ(54, m.Call(uint64_t(0x0940000000000000)));
-  CHECK_EQ(53, m.Call(uint64_t(0xaf20000000000000)));
-  CHECK_EQ(52, m.Call(uint64_t(0xac10000000000000)));
-  CHECK_EQ(51, m.Call(uint64_t(0xe0b8000000000000)));
-  CHECK_EQ(50, m.Call(uint64_t(0x9ce4000000000000)));
-  CHECK_EQ(49, m.Call(uint64_t(0xc792000000000000)));
-  CHECK_EQ(48, m.Call(uint64_t(0xb8f1000000000000)));
-  CHECK_EQ(47, m.Call(uint64_t(0x3b9f800000000000)));
-  CHECK_EQ(46, m.Call(uint64_t(0xdb4c400000000000)));
-  CHECK_EQ(45, m.Call(uint64_t(0xe9a3200000000000)));
-  CHECK_EQ(44, m.Call(uint64_t(0xfca6100000000000)));
-  CHECK_EQ(43, m.Call(uint64_t(0x6c8a780000000000)));
-  CHECK_EQ(42, m.Call(uint64_t(0x8ce5a40000000000)));
-  CHECK_EQ(41, m.Call(uint64_t(0xcb7d020000000000)));
-  CHECK_EQ(40, m.Call(uint64_t(0xcb4dc10000000000)));
-  CHECK_EQ(39, m.Call(uint64_t(0xdfbec58000000000)));
-  CHECK_EQ(38, m.Call(uint64_t(0x27a9db4000000000)));
-  CHECK_EQ(37, m.Call(uint64_t(0xde3bcb2000000000)));
-  CHECK_EQ(36, m.Call(uint64_t(0xd7e8a61000000000)));
-  CHECK_EQ(35, m.Call(uint64_t(0x9afdbc8800000000)));
-  CHECK_EQ(34, m.Call(uint64_t(0x9afdbc8400000000)));
-  CHECK_EQ(33, m.Call(uint64_t(0x9afdbc8200000000)));
-  CHECK_EQ(32, m.Call(uint64_t(0x9afdbc8100000000)));
+  CHECK_EQ(53, m.Call(uint64_t(0xAF20000000000000)));
+  CHECK_EQ(52, m.Call(uint64_t(0xAC10000000000000)));
+  CHECK_EQ(51, m.Call(uint64_t(0xE0B8000000000000)));
+  CHECK_EQ(50, m.Call(uint64_t(0x9CE4000000000000)));
+  CHECK_EQ(49, m.Call(uint64_t(0xC792000000000000)));
+  CHECK_EQ(48, m.Call(uint64_t(0xB8F1000000000000)));
+  CHECK_EQ(47, m.Call(uint64_t(0x3B9F800000000000)));
+  CHECK_EQ(46, m.Call(uint64_t(0xDB4C400000000000)));
+  CHECK_EQ(45, m.Call(uint64_t(0xE9A3200000000000)));
+  CHECK_EQ(44, m.Call(uint64_t(0xFCA6100000000000)));
+  CHECK_EQ(43, m.Call(uint64_t(0x6C8A780000000000)));
+  CHECK_EQ(42, m.Call(uint64_t(0x8CE5A40000000000)));
+  CHECK_EQ(41, m.Call(uint64_t(0xCB7D020000000000)));
+  CHECK_EQ(40, m.Call(uint64_t(0xCB4DC10000000000)));
+  CHECK_EQ(39, m.Call(uint64_t(0xDFBEC58000000000)));
+  CHECK_EQ(38, m.Call(uint64_t(0x27A9DB4000000000)));
+  CHECK_EQ(37, m.Call(uint64_t(0xDE3BCB2000000000)));
+  CHECK_EQ(36, m.Call(uint64_t(0xD7E8A61000000000)));
+  CHECK_EQ(35, m.Call(uint64_t(0x9AFDBC8800000000)));
+  CHECK_EQ(34, m.Call(uint64_t(0x9AFDBC8400000000)));
+  CHECK_EQ(33, m.Call(uint64_t(0x9AFDBC8200000000)));
+  CHECK_EQ(32, m.Call(uint64_t(0x9AFDBC8100000000)));
   CHECK_EQ(31, m.Call(uint64_t(0x0000000080000000)));
   CHECK_EQ(30, m.Call(uint64_t(0x0000000040000000)));
   CHECK_EQ(29, m.Call(uint64_t(0x0000000020000000)));
   CHECK_EQ(28, m.Call(uint64_t(0x0000000010000000)));
-  CHECK_EQ(27, m.Call(uint64_t(0x00000000a8000000)));
-  CHECK_EQ(26, m.Call(uint64_t(0x00000000f4000000)));
+  CHECK_EQ(27, m.Call(uint64_t(0x00000000A8000000)));
+  CHECK_EQ(26, m.Call(uint64_t(0x00000000F4000000)));
   CHECK_EQ(25, m.Call(uint64_t(0x0000000062000000)));
   CHECK_EQ(24, m.Call(uint64_t(0x0000000091000000)));
-  CHECK_EQ(23, m.Call(uint64_t(0x00000000cd800000)));
+  CHECK_EQ(23, m.Call(uint64_t(0x00000000CD800000)));
   CHECK_EQ(22, m.Call(uint64_t(0x0000000009400000)));
-  CHECK_EQ(21, m.Call(uint64_t(0x00000000af200000)));
-  CHECK_EQ(20, m.Call(uint64_t(0x00000000ac100000)));
-  CHECK_EQ(19, m.Call(uint64_t(0x00000000e0b80000)));
-  CHECK_EQ(18, m.Call(uint64_t(0x000000009ce40000)));
-  CHECK_EQ(17, m.Call(uint64_t(0x00000000c7920000)));
-  CHECK_EQ(16, m.Call(uint64_t(0x00000000b8f10000)));
-  CHECK_EQ(15, m.Call(uint64_t(0x000000003b9f8000)));
-  CHECK_EQ(14, m.Call(uint64_t(0x00000000db4c4000)));
-  CHECK_EQ(13, m.Call(uint64_t(0x00000000e9a32000)));
-  CHECK_EQ(12, m.Call(uint64_t(0x00000000fca61000)));
-  CHECK_EQ(11, m.Call(uint64_t(0x000000006c8a7800)));
-  CHECK_EQ(10, m.Call(uint64_t(0x000000008ce5a400)));
-  CHECK_EQ(9, m.Call(uint64_t(0x00000000cb7d0200)));
-  CHECK_EQ(8, m.Call(uint64_t(0x00000000cb4dc100)));
-  CHECK_EQ(7, m.Call(uint64_t(0x00000000dfbec580)));
-  CHECK_EQ(6, m.Call(uint64_t(0x0000000027a9db40)));
-  CHECK_EQ(5, m.Call(uint64_t(0x00000000de3bcb20)));
-  CHECK_EQ(4, m.Call(uint64_t(0x00000000d7e8a610)));
-  CHECK_EQ(3, m.Call(uint64_t(0x000000009afdbc88)));
-  CHECK_EQ(2, m.Call(uint64_t(0x000000009afdbc84)));
-  CHECK_EQ(1, m.Call(uint64_t(0x000000009afdbc82)));
-  CHECK_EQ(0, m.Call(uint64_t(0x000000009afdbc81)));
+  CHECK_EQ(21, m.Call(uint64_t(0x00000000AF200000)));
+  CHECK_EQ(20, m.Call(uint64_t(0x00000000AC100000)));
+  CHECK_EQ(19, m.Call(uint64_t(0x00000000E0B80000)));
+  CHECK_EQ(18, m.Call(uint64_t(0x000000009CE40000)));
+  CHECK_EQ(17, m.Call(uint64_t(0x00000000C7920000)));
+  CHECK_EQ(16, m.Call(uint64_t(0x00000000B8F10000)));
+  CHECK_EQ(15, m.Call(uint64_t(0x000000003B9F8000)));
+  CHECK_EQ(14, m.Call(uint64_t(0x00000000DB4C4000)));
+  CHECK_EQ(13, m.Call(uint64_t(0x00000000E9A32000)));
+  CHECK_EQ(12, m.Call(uint64_t(0x00000000FCA61000)));
+  CHECK_EQ(11, m.Call(uint64_t(0x000000006C8A7800)));
+  CHECK_EQ(10, m.Call(uint64_t(0x000000008CE5A400)));
+  CHECK_EQ(9, m.Call(uint64_t(0x00000000CB7D0200)));
+  CHECK_EQ(8, m.Call(uint64_t(0x00000000CB4DC100)));
+  CHECK_EQ(7, m.Call(uint64_t(0x00000000DFBEC580)));
+  CHECK_EQ(6, m.Call(uint64_t(0x0000000027A9DB40)));
+  CHECK_EQ(5, m.Call(uint64_t(0x00000000DE3BCB20)));
+  CHECK_EQ(4, m.Call(uint64_t(0x00000000D7E8A610)));
+  CHECK_EQ(3, m.Call(uint64_t(0x000000009AFDBC88)));
+  CHECK_EQ(2, m.Call(uint64_t(0x000000009AFDBC84)));
+  CHECK_EQ(1, m.Call(uint64_t(0x000000009AFDBC82)));
+  CHECK_EQ(0, m.Call(uint64_t(0x000000009AFDBC81)));
 }
 
 
@@ -398,11 +399,11 @@
   CHECK_EQ(0, m.Call(uint64_t(0x0000000000000000)));
   CHECK_EQ(1, m.Call(uint64_t(0x0000000000000001)));
   CHECK_EQ(1, m.Call(uint64_t(0x8000000000000000)));
-  CHECK_EQ(64, m.Call(uint64_t(0xffffffffffffffff)));
-  CHECK_EQ(12, m.Call(uint64_t(0x000dc100000dc100)));
-  CHECK_EQ(18, m.Call(uint64_t(0xe00dc100e00dc100)));
-  CHECK_EQ(22, m.Call(uint64_t(0xe00dc103e00dc103)));
-  CHECK_EQ(18, m.Call(uint64_t(0x000dc107000dc107)));
+  CHECK_EQ(64, m.Call(uint64_t(0xFFFFFFFFFFFFFFFF)));
+  CHECK_EQ(12, m.Call(uint64_t(0x000DC100000DC100)));
+  CHECK_EQ(18, m.Call(uint64_t(0xE00DC100E00DC100)));
+  CHECK_EQ(22, m.Call(uint64_t(0xE00DC103E00DC103)));
+  CHECK_EQ(18, m.Call(uint64_t(0x000DC107000DC107)));
 }
 #endif  // V8_TARGET_ARCH_64_BIT
 
@@ -420,13 +421,13 @@
     case 4:
       return m->Int32Constant(-1);
     case 5:
-      return m->Int32Constant(0xff);
+      return m->Int32Constant(0xFF);
     case 6:
       return m->Int32Constant(0x01234567);
     case 7:
-      return m->Load(MachineType::Int32(), m->PointerConstant(NULL));
+      return m->Load(MachineType::Int32(), m->PointerConstant(nullptr));
     default:
-      return NULL;
+      return nullptr;
   }
 }
 
@@ -482,13 +483,13 @@
     case 4:
       return m->Int64Constant(-1);
     case 5:
-      return m->Int64Constant(0xff);
+      return m->Int64Constant(0xFF);
     case 6:
-      return m->Int64Constant(0x0123456789abcdefLL);
+      return m->Int64Constant(0x0123456789ABCDEFLL);
     case 7:
-      return m->Load(MachineType::Int64(), m->PointerConstant(NULL));
+      return m->Load(MachineType::Int64(), m->PointerConstant(nullptr));
     default:
-      return NULL;
+      return nullptr;
   }
 }
 
@@ -885,8 +886,8 @@
       MachineType::Int32(), MachineType::Int32(), MachineType::Int32());
   BuildDiamondPhi(&m, m.Parameter(0), MachineRepresentation::kWord32,
                   m.Parameter(1), m.Parameter(2));
-  int32_t c1 = 0x260cb75a;
-  int32_t c2 = 0xcd3e9c8b;
+  int32_t c1 = 0x260CB75A;
+  int32_t c2 = 0xCD3E9C8B;
   int result = m.Call(0, c1, c2);
   CHECK_EQ(c2, result);
   result = m.Call(1, c1, c2);
@@ -940,8 +941,8 @@
   m.Bind(&end);
   m.Return(phi);
 
-  int32_t c1 = 0xa81903b4;
-  int32_t c2 = 0x5a1207da;
+  int32_t c1 = 0xA81903B4;
+  int32_t c2 = 0x5A1207DA;
   int result = m.Call(0, c1, c2);
   CHECK_EQ(c1, result);
   result = m.Call(1, c1, c2);
@@ -2421,10 +2422,10 @@
     RawMachineAssemblerTester<int32_t> m;
     Uint32BinopTester bt(&m);
     bt.AddReturn(
-        m.Word32Shl(bt.param0, m.Word32And(bt.param1, m.Int32Constant(0x1f))));
+        m.Word32Shl(bt.param0, m.Word32And(bt.param1, m.Int32Constant(0x1F))));
     FOR_UINT32_INPUTS(i) {
       FOR_UINT32_INPUTS(j) {
-        uint32_t expected = *i << (*j & 0x1f);
+        uint32_t expected = *i << (*j & 0x1F);
         CHECK_EQ(expected, bt.call(*i, *j));
       }
     }
@@ -2433,10 +2434,10 @@
     RawMachineAssemblerTester<int32_t> m;
     Uint32BinopTester bt(&m);
     bt.AddReturn(
-        m.Word32Shl(bt.param0, m.Word32And(m.Int32Constant(0x1f), bt.param1)));
+        m.Word32Shl(bt.param0, m.Word32And(m.Int32Constant(0x1F), bt.param1)));
     FOR_UINT32_INPUTS(i) {
       FOR_UINT32_INPUTS(j) {
-        uint32_t expected = *i << (0x1f & *j);
+        uint32_t expected = *i << (0x1F & *j);
         CHECK_EQ(expected, bt.call(*i, *j));
       }
     }
@@ -2449,10 +2450,10 @@
     RawMachineAssemblerTester<int32_t> m;
     Uint32BinopTester bt(&m);
     bt.AddReturn(
-        m.Word32Shr(bt.param0, m.Word32And(bt.param1, m.Int32Constant(0x1f))));
+        m.Word32Shr(bt.param0, m.Word32And(bt.param1, m.Int32Constant(0x1F))));
     FOR_UINT32_INPUTS(i) {
       FOR_UINT32_INPUTS(j) {
-        uint32_t expected = *i >> (*j & 0x1f);
+        uint32_t expected = *i >> (*j & 0x1F);
         CHECK_EQ(expected, bt.call(*i, *j));
       }
     }
@@ -2461,10 +2462,10 @@
     RawMachineAssemblerTester<int32_t> m;
     Uint32BinopTester bt(&m);
     bt.AddReturn(
-        m.Word32Shr(bt.param0, m.Word32And(m.Int32Constant(0x1f), bt.param1)));
+        m.Word32Shr(bt.param0, m.Word32And(m.Int32Constant(0x1F), bt.param1)));
     FOR_UINT32_INPUTS(i) {
       FOR_UINT32_INPUTS(j) {
-        uint32_t expected = *i >> (0x1f & *j);
+        uint32_t expected = *i >> (0x1F & *j);
         CHECK_EQ(expected, bt.call(*i, *j));
       }
     }
@@ -2477,10 +2478,10 @@
     RawMachineAssemblerTester<int32_t> m;
     Int32BinopTester bt(&m);
     bt.AddReturn(
-        m.Word32Sar(bt.param0, m.Word32And(bt.param1, m.Int32Constant(0x1f))));
+        m.Word32Sar(bt.param0, m.Word32And(bt.param1, m.Int32Constant(0x1F))));
     FOR_INT32_INPUTS(i) {
       FOR_INT32_INPUTS(j) {
-        int32_t expected = *i >> (*j & 0x1f);
+        int32_t expected = *i >> (*j & 0x1F);
         CHECK_EQ(expected, bt.call(*i, *j));
       }
     }
@@ -2489,10 +2490,10 @@
     RawMachineAssemblerTester<int32_t> m;
     Int32BinopTester bt(&m);
     bt.AddReturn(
-        m.Word32Sar(bt.param0, m.Word32And(m.Int32Constant(0x1f), bt.param1)));
+        m.Word32Sar(bt.param0, m.Word32And(m.Int32Constant(0x1F), bt.param1)));
     FOR_INT32_INPUTS(i) {
       FOR_INT32_INPUTS(j) {
-        int32_t expected = *i >> (0x1f & *j);
+        int32_t expected = *i >> (0x1F & *j);
         CHECK_EQ(expected, bt.call(*i, *j));
       }
     }
@@ -3523,8 +3524,10 @@
 
 TEST(RunDeadNodes) {
   for (int i = 0; true; i++) {
-    RawMachineAssemblerTester<int32_t> m(i == 5 ? MachineType::Int32()
-                                                : MachineType::None());
+    RawMachineAssemblerTester<int32_t> m_v;
+    RawMachineAssemblerTester<int32_t> m_i(MachineType::Int32());
+    RawMachineAssemblerTester<int32_t>& m = i == 5 ? m_i : m_v;
+
     int constant = 0x55 + i;
     switch (i) {
       case 0:
@@ -3690,7 +3693,7 @@
   m.Return(m.Float64Mod(m.Parameter(0), m.Parameter(1)));
 
   FOR_FLOAT64_INPUTS(i) {
-    FOR_FLOAT64_INPUTS(j) { CHECK_DOUBLE_EQ(modulo(*i, *j), m.Call(*i, *j)); }
+    FOR_FLOAT64_INPUTS(j) { CHECK_DOUBLE_EQ(Modulo(*i, *j), m.Call(*i, *j)); }
   }
 }
 
@@ -3700,9 +3703,9 @@
 
   const Operator* ops[] = {m.machine()->Float32Add(), m.machine()->Float32Sub(),
                            m.machine()->Float32Mul(), m.machine()->Float32Div(),
-                           NULL};
+                           nullptr};
 
-  for (int i = 0; ops[i] != NULL; i++) {
+  for (int i = 0; ops[i] != nullptr; i++) {
     RawMachineAssemblerTester<int32_t> m;
     int constant = 0x53355 + i;
     m.AddNode(ops[i], m.Float32Constant(0.1f), m.Float32Constant(1.11f));
@@ -3717,9 +3720,9 @@
 
   const Operator* ops[] = {m.machine()->Float64Add(), m.machine()->Float64Sub(),
                            m.machine()->Float64Mul(), m.machine()->Float64Div(),
-                           m.machine()->Float64Mod(), NULL};
+                           m.machine()->Float64Mod(), nullptr};
 
-  for (int i = 0; ops[i] != NULL; i++) {
+  for (int i = 0; ops[i] != nullptr; i++) {
     RawMachineAssemblerTester<int32_t> m;
     int constant = 0x53355 + i;
     m.AddNode(ops[i], m.Float64Constant(0.1), m.Float64Constant(1.11));
@@ -4034,7 +4037,7 @@
   bt.AddReturn(m.Float64Mod(bt.param0, bt.param1));
 
   FOR_FLOAT64_INPUTS(i) {
-    FOR_FLOAT64_INPUTS(j) { CHECK_DOUBLE_EQ(modulo(*i, *j), bt.call(*i, *j)); }
+    FOR_FLOAT64_INPUTS(j) { CHECK_DOUBLE_EQ(Modulo(*i, *j), bt.call(*i, *j)); }
   }
 }
 
@@ -4180,9 +4183,9 @@
 
   FOR_UINT64_INPUTS(i) {
     FOR_UINT64_INPUTS(j) {
-      m.Call(static_cast<uint32_t>(*i & 0xffffffff),
+      m.Call(static_cast<uint32_t>(*i & 0xFFFFFFFF),
              static_cast<uint32_t>(*i >> 32),
-             static_cast<uint32_t>(*j & 0xffffffff),
+             static_cast<uint32_t>(*j & 0xFFFFFFFF),
              static_cast<uint32_t>(*j >> 32));
       CHECK_EQ(*i + *j, ToInt64(low, high));
     }
@@ -4201,9 +4204,9 @@
     FOR_UINT64_INPUTS(j) {
       CHECK_EQ(
           static_cast<uint32_t>((*i + *j) >> 32),
-          static_cast<uint32_t>(m.Call(static_cast<uint32_t>(*i & 0xffffffff),
+          static_cast<uint32_t>(m.Call(static_cast<uint32_t>(*i & 0xFFFFFFFF),
                                        static_cast<uint32_t>(*i >> 32),
-                                       static_cast<uint32_t>(*j & 0xffffffff),
+                                       static_cast<uint32_t>(*j & 0xFFFFFFFF),
                                        static_cast<uint32_t>(*j >> 32))));
     }
   }
@@ -4263,9 +4266,9 @@
 
   FOR_UINT64_INPUTS(i) {
     FOR_UINT64_INPUTS(j) {
-      m.Call(static_cast<uint32_t>(*i & 0xffffffff),
+      m.Call(static_cast<uint32_t>(*i & 0xFFFFFFFF),
              static_cast<uint32_t>(*i >> 32),
-             static_cast<uint32_t>(*j & 0xffffffff),
+             static_cast<uint32_t>(*j & 0xFFFFFFFF),
              static_cast<uint32_t>(*j >> 32));
       CHECK_EQ(*i - *j, ToInt64(low, high));
     }
@@ -4284,9 +4287,9 @@
     FOR_UINT64_INPUTS(j) {
       CHECK_EQ(
           static_cast<uint32_t>((*i - *j) >> 32),
-          static_cast<uint32_t>(m.Call(static_cast<uint32_t>(*i & 0xffffffff),
+          static_cast<uint32_t>(m.Call(static_cast<uint32_t>(*i & 0xFFFFFFFF),
                                        static_cast<uint32_t>(*i >> 32),
-                                       static_cast<uint32_t>(*j & 0xffffffff),
+                                       static_cast<uint32_t>(*j & 0xFFFFFFFF),
                                        static_cast<uint32_t>(*j >> 32))));
     }
   }
@@ -4346,9 +4349,9 @@
 
   FOR_UINT64_INPUTS(i) {
     FOR_UINT64_INPUTS(j) {
-      m.Call(static_cast<uint32_t>(*i & 0xffffffff),
+      m.Call(static_cast<uint32_t>(*i & 0xFFFFFFFF),
              static_cast<uint32_t>(*i >> 32),
-             static_cast<uint32_t>(*j & 0xffffffff),
+             static_cast<uint32_t>(*j & 0xFFFFFFFF),
              static_cast<uint32_t>(*j >> 32));
       CHECK_EQ(*i * *j, ToInt64(low, high));
     }
@@ -4367,9 +4370,9 @@
     FOR_UINT64_INPUTS(j) {
       CHECK_EQ(
           static_cast<uint32_t>((*i * *j) >> 32),
-          static_cast<uint32_t>(m.Call(static_cast<uint32_t>(*i & 0xffffffff),
+          static_cast<uint32_t>(m.Call(static_cast<uint32_t>(*i & 0xFFFFFFFF),
                                        static_cast<uint32_t>(*i >> 32),
-                                       static_cast<uint32_t>(*j & 0xffffffff),
+                                       static_cast<uint32_t>(*j & 0xFFFFFFFF),
                                        static_cast<uint32_t>(*j >> 32))));
     }
   }
@@ -4429,7 +4432,7 @@
 
   FOR_UINT64_INPUTS(i) {
     for (uint32_t j = 0; j < 64; j++) {
-      m.Call(static_cast<uint32_t>(*i & 0xffffffff),
+      m.Call(static_cast<uint32_t>(*i & 0xFFFFFFFF),
              static_cast<uint32_t>(*i >> 32), j);
       CHECK_EQ(*i << j, ToInt64(low, high));
     }
@@ -4447,7 +4450,7 @@
     for (uint32_t j = 0; j < 64; j++) {
       CHECK_EQ(
           static_cast<uint32_t>((*i << j) >> 32),
-          static_cast<uint32_t>(m.Call(static_cast<uint32_t>(*i & 0xffffffff),
+          static_cast<uint32_t>(m.Call(static_cast<uint32_t>(*i & 0xFFFFFFFF),
                                        static_cast<uint32_t>(*i >> 32), j)));
     }
   }
@@ -4503,7 +4506,7 @@
 
   FOR_UINT64_INPUTS(i) {
     for (uint32_t j = 0; j < 64; j++) {
-      m.Call(static_cast<uint32_t>(*i & 0xffffffff),
+      m.Call(static_cast<uint32_t>(*i & 0xFFFFFFFF),
              static_cast<uint32_t>(*i >> 32), j);
       CHECK_EQ(*i >> j, ToInt64(low, high));
     }
@@ -4521,7 +4524,7 @@
     for (uint32_t j = 0; j < 64; j++) {
       CHECK_EQ(
           static_cast<uint32_t>((*i >> j) >> 32),
-          static_cast<uint32_t>(m.Call(static_cast<uint32_t>(*i & 0xffffffff),
+          static_cast<uint32_t>(m.Call(static_cast<uint32_t>(*i & 0xFFFFFFFF),
                                        static_cast<uint32_t>(*i >> 32), j)));
     }
   }
@@ -4545,7 +4548,7 @@
 
   FOR_INT64_INPUTS(i) {
     for (uint32_t j = 0; j < 64; j++) {
-      m.Call(static_cast<uint32_t>(*i & 0xffffffff),
+      m.Call(static_cast<uint32_t>(*i & 0xFFFFFFFF),
              static_cast<uint32_t>(*i >> 32), j);
       CHECK_EQ(*i >> j, static_cast<int64_t>(ToInt64(low, high)));
     }
@@ -4563,7 +4566,7 @@
     for (uint32_t j = 0; j < 64; j++) {
       CHECK_EQ(
           static_cast<uint32_t>((*i >> j) >> 32),
-          static_cast<uint32_t>(m.Call(static_cast<uint32_t>(*i & 0xffffffff),
+          static_cast<uint32_t>(m.Call(static_cast<uint32_t>(*i & 0xFFFFFFFF),
                                        static_cast<uint32_t>(*i >> 32), j)));
     }
   }
@@ -4572,7 +4575,7 @@
 
 TEST(RunDeadChangeFloat64ToInt32) {
   RawMachineAssemblerTester<int32_t> m;
-  const int magic = 0x88abcda4;
+  const int magic = 0x88ABCDA4;
   m.ChangeFloat64ToInt32(m.Float64Constant(999.78));
   m.Return(m.Int32Constant(magic));
   CHECK_EQ(magic, m.Call());
@@ -4581,7 +4584,7 @@
 
 TEST(RunDeadChangeInt32ToFloat64) {
   RawMachineAssemblerTester<int32_t> m;
-  const int magic = 0x8834abcd;
+  const int magic = 0x8834ABCD;
   m.ChangeInt32ToFloat64(m.Int32Constant(magic - 6888));
   m.Return(m.Int32Constant(magic));
   CHECK_EQ(magic, m.Call());
@@ -4924,7 +4927,7 @@
   Node* b =
       load_b ? m->Load(MachineType::Float64(), m->PointerConstant(&buffer[1]))
              : m->Float64Constant(y);
-  Node* cmp = NULL;
+  Node* cmp = nullptr;
   bool expected = false;
   switch (test_case) {
     // Equal tests.
@@ -5093,7 +5096,7 @@
                                       MachineType::Pointer());
     Node* p0 = m.Parameter(0);
     Node* p1 = m.Parameter(1);
-    Node* res = NULL;
+    Node* res = nullptr;
     bool expected = false;
     switch (test) {
       case 0:
@@ -5537,7 +5540,7 @@
 TEST(RunWord64EqualInBranchP) {
   int64_t input;
   RawMachineLabel blocka, blockb;
-  RawMachineAssemblerTester<int64_t> m;
+  RawMachineAssemblerTester<int32_t> m;
   if (!m.machine()->Is64()) return;
   Node* value = m.LoadFromPointer(&input, MachineType::Int64());
   m.Branch(m.Word64Equal(value, m.Int64Constant(0)), &blocka, &blockb);
@@ -5545,11 +5548,11 @@
   m.Return(m.Int32Constant(1));
   m.Bind(&blockb);
   m.Return(m.Int32Constant(2));
-  input = V8_INT64_C(0);
+  input = int64_t{0};
   CHECK_EQ(1, m.Call());
-  input = V8_INT64_C(1);
+  input = int64_t{1};
   CHECK_EQ(2, m.Call());
-  input = V8_INT64_C(0x100000000);
+  input = int64_t{0x100000000};
   CHECK_EQ(2, m.Call());
 }
 
@@ -5721,9 +5724,9 @@
   m.Return(m.Float64InsertLowWord32(m.Parameter(0), m.Parameter(1)));
   FOR_FLOAT64_INPUTS(i) {
     FOR_INT32_INPUTS(j) {
-      double expected = bit_cast<double>(
-          (bit_cast<uint64_t>(*i) & ~(V8_UINT64_C(0xFFFFFFFF))) |
-          (static_cast<uint64_t>(bit_cast<uint32_t>(*j))));
+      double expected =
+          bit_cast<double>((bit_cast<uint64_t>(*i) & ~(uint64_t{0xFFFFFFFF})) |
+                           (static_cast<uint64_t>(bit_cast<uint32_t>(*j))));
       CHECK_DOUBLE_EQ(expected, m.Call(*i, *j));
     }
   }
@@ -6186,8 +6189,7 @@
 
 namespace {
 
-int32_t const kMagicFoo0 = 0xdeadbeef;
-
+int32_t const kMagicFoo0 = 0xDEADBEEF;
 
 int32_t foo0() { return kMagicFoo0; }
 
@@ -6297,17 +6299,17 @@
 
 TEST(RunBitcastInt64ToFloat64) {
   int64_t input = 1;
-  double output = 0.0;
+  Float64 output;
   RawMachineAssemblerTester<int32_t> m;
   m.StoreToPointer(
-      &output, MachineRepresentation::kFloat64,
+      output.get_bits_address(), MachineRepresentation::kFloat64,
       m.BitcastInt64ToFloat64(m.LoadFromPointer(&input, MachineType::Int64())));
   m.Return(m.Int32Constant(11));
   FOR_INT64_INPUTS(i) {
     input = *i;
     CHECK_EQ(11, m.Call());
-    double expected = bit_cast<double>(input);
-    CHECK_EQ(bit_cast<int64_t>(expected), bit_cast<int64_t>(output));
+    Float64 expected = Float64::FromBits(input);
+    CHECK_EQ(expected.get_bits(), output.get_bits());
   }
 }
 
@@ -6482,80 +6484,80 @@
     uint64_t input;
     uint64_t expected;
   } values[] = {{0x0, 0x0},
-                {0x1, 0x3ff0000000000000},
-                {0xffffffff, 0x41efffffffe00000},
-                {0x1b09788b, 0x41bb09788b000000},
-                {0x4c5fce8, 0x419317f3a0000000},
-                {0xcc0de5bf, 0x41e981bcb7e00000},
+                {0x1, 0x3FF0000000000000},
+                {0xFFFFFFFF, 0x41EFFFFFFFE00000},
+                {0x1B09788B, 0x41BB09788B000000},
+                {0x4C5FCE8, 0x419317F3A0000000},
+                {0xCC0DE5BF, 0x41E981BCB7E00000},
                 {0x2, 0x4000000000000000},
                 {0x3, 0x4008000000000000},
                 {0x4, 0x4010000000000000},
                 {0x5, 0x4014000000000000},
                 {0x8, 0x4020000000000000},
                 {0x9, 0x4022000000000000},
-                {0xffffffffffffffff, 0x43f0000000000000},
-                {0xfffffffffffffffe, 0x43f0000000000000},
-                {0xfffffffffffffffd, 0x43f0000000000000},
-                {0x100000000, 0x41f0000000000000},
-                {0xffffffff00000000, 0x43efffffffe00000},
-                {0x1b09788b00000000, 0x43bb09788b000000},
-                {0x4c5fce800000000, 0x439317f3a0000000},
-                {0xcc0de5bf00000000, 0x43e981bcb7e00000},
+                {0xFFFFFFFFFFFFFFFF, 0x43F0000000000000},
+                {0xFFFFFFFFFFFFFFFE, 0x43F0000000000000},
+                {0xFFFFFFFFFFFFFFFD, 0x43F0000000000000},
+                {0x100000000, 0x41F0000000000000},
+                {0xFFFFFFFF00000000, 0x43EFFFFFFFE00000},
+                {0x1B09788B00000000, 0x43BB09788B000000},
+                {0x4C5FCE800000000, 0x439317F3A0000000},
+                {0xCC0DE5BF00000000, 0x43E981BCB7E00000},
                 {0x200000000, 0x4200000000000000},
                 {0x300000000, 0x4208000000000000},
                 {0x400000000, 0x4210000000000000},
                 {0x500000000, 0x4214000000000000},
                 {0x800000000, 0x4220000000000000},
                 {0x900000000, 0x4222000000000000},
-                {0x273a798e187937a3, 0x43c39d3cc70c3c9c},
-                {0xece3af835495a16b, 0x43ed9c75f06a92b4},
-                {0xb668ecc11223344, 0x43a6cd1d98224467},
-                {0x9e, 0x4063c00000000000},
-                {0x43, 0x4050c00000000000},
-                {0xaf73, 0x40e5ee6000000000},
-                {0x116b, 0x40b16b0000000000},
-                {0x658ecc, 0x415963b300000000},
-                {0x2b3b4c, 0x41459da600000000},
-                {0x88776655, 0x41e10eeccaa00000},
-                {0x70000000, 0x41dc000000000000},
-                {0x7200000, 0x419c800000000000},
-                {0x7fffffff, 0x41dfffffffc00000},
-                {0x56123761, 0x41d5848dd8400000},
-                {0x7fffff00, 0x41dfffffc0000000},
-                {0x761c4761eeeeeeee, 0x43dd8711d87bbbbc},
-                {0x80000000eeeeeeee, 0x43e00000001dddde},
-                {0x88888888dddddddd, 0x43e11111111bbbbc},
-                {0xa0000000dddddddd, 0x43e40000001bbbbc},
-                {0xddddddddaaaaaaaa, 0x43ebbbbbbbb55555},
-                {0xe0000000aaaaaaaa, 0x43ec000000155555},
-                {0xeeeeeeeeeeeeeeee, 0x43edddddddddddde},
-                {0xfffffffdeeeeeeee, 0x43efffffffbdddde},
-                {0xf0000000dddddddd, 0x43ee0000001bbbbc},
-                {0x7fffffdddddddd, 0x435ffffff7777777},
-                {0x3fffffaaaaaaaa, 0x434fffffd5555555},
-                {0x1fffffaaaaaaaa, 0x433fffffaaaaaaaa},
-                {0xfffff, 0x412ffffe00000000},
-                {0x7ffff, 0x411ffffc00000000},
-                {0x3ffff, 0x410ffff800000000},
-                {0x1ffff, 0x40fffff000000000},
-                {0xffff, 0x40efffe000000000},
-                {0x7fff, 0x40dfffc000000000},
-                {0x3fff, 0x40cfff8000000000},
-                {0x1fff, 0x40bfff0000000000},
-                {0xfff, 0x40affe0000000000},
-                {0x7ff, 0x409ffc0000000000},
-                {0x3ff, 0x408ff80000000000},
-                {0x1ff, 0x407ff00000000000},
-                {0x3fffffffffff, 0x42cfffffffffff80},
-                {0x1fffffffffff, 0x42bfffffffffff00},
-                {0xfffffffffff, 0x42affffffffffe00},
-                {0x7ffffffffff, 0x429ffffffffffc00},
-                {0x3ffffffffff, 0x428ffffffffff800},
-                {0x1ffffffffff, 0x427ffffffffff000},
-                {0x8000008000000000, 0x43e0000010000000},
-                {0x8000008000000001, 0x43e0000010000000},
-                {0x8000000000000400, 0x43e0000000000000},
-                {0x8000000000000401, 0x43e0000000000001}};
+                {0x273A798E187937A3, 0x43C39D3CC70C3C9C},
+                {0xECE3AF835495A16B, 0x43ED9C75F06A92B4},
+                {0xB668ECC11223344, 0x43A6CD1D98224467},
+                {0x9E, 0x4063C00000000000},
+                {0x43, 0x4050C00000000000},
+                {0xAF73, 0x40E5EE6000000000},
+                {0x116B, 0x40B16B0000000000},
+                {0x658ECC, 0x415963B300000000},
+                {0x2B3B4C, 0x41459DA600000000},
+                {0x88776655, 0x41E10EECCAA00000},
+                {0x70000000, 0x41DC000000000000},
+                {0x7200000, 0x419C800000000000},
+                {0x7FFFFFFF, 0x41DFFFFFFFC00000},
+                {0x56123761, 0x41D5848DD8400000},
+                {0x7FFFFF00, 0x41DFFFFFC0000000},
+                {0x761C4761EEEEEEEE, 0x43DD8711D87BBBBC},
+                {0x80000000EEEEEEEE, 0x43E00000001DDDDE},
+                {0x88888888DDDDDDDD, 0x43E11111111BBBBC},
+                {0xA0000000DDDDDDDD, 0x43E40000001BBBBC},
+                {0xDDDDDDDDAAAAAAAA, 0x43EBBBBBBBB55555},
+                {0xE0000000AAAAAAAA, 0x43EC000000155555},
+                {0xEEEEEEEEEEEEEEEE, 0x43EDDDDDDDDDDDDE},
+                {0xFFFFFFFDEEEEEEEE, 0x43EFFFFFFFBDDDDE},
+                {0xF0000000DDDDDDDD, 0x43EE0000001BBBBC},
+                {0x7FFFFFDDDDDDDD, 0x435FFFFFF7777777},
+                {0x3FFFFFAAAAAAAA, 0x434FFFFFD5555555},
+                {0x1FFFFFAAAAAAAA, 0x433FFFFFAAAAAAAA},
+                {0xFFFFF, 0x412FFFFE00000000},
+                {0x7FFFF, 0x411FFFFC00000000},
+                {0x3FFFF, 0x410FFFF800000000},
+                {0x1FFFF, 0x40FFFFF000000000},
+                {0xFFFF, 0x40EFFFE000000000},
+                {0x7FFF, 0x40DFFFC000000000},
+                {0x3FFF, 0x40CFFF8000000000},
+                {0x1FFF, 0x40BFFF0000000000},
+                {0xFFF, 0x40AFFE0000000000},
+                {0x7FF, 0x409FFC0000000000},
+                {0x3FF, 0x408FF80000000000},
+                {0x1FF, 0x407FF00000000000},
+                {0x3FFFFFFFFFFF, 0x42CFFFFFFFFFFF80},
+                {0x1FFFFFFFFFFF, 0x42BFFFFFFFFFFF00},
+                {0xFFFFFFFFFFF, 0x42AFFFFFFFFFFE00},
+                {0x7FFFFFFFFFF, 0x429FFFFFFFFFFC00},
+                {0x3FFFFFFFFFF, 0x428FFFFFFFFFF800},
+                {0x1FFFFFFFFFF, 0x427FFFFFFFFFF000},
+                {0x8000008000000000, 0x43E0000010000000},
+                {0x8000008000000001, 0x43E0000010000000},
+                {0x8000000000000400, 0x43E0000000000000},
+                {0x8000000000000401, 0x43E0000000000001}};
 
   BufferedRawMachineAssemblerTester<double> m(MachineType::Uint64());
   m.Return(m.RoundUint64ToFloat64(m.Parameter(0)));
@@ -6571,81 +6573,81 @@
     uint64_t input;
     uint32_t expected;
   } values[] = {{0x0, 0x0},
-                {0x1, 0x3f800000},
-                {0xffffffff, 0x4f800000},
-                {0x1b09788b, 0x4dd84bc4},
-                {0x4c5fce8, 0x4c98bf9d},
-                {0xcc0de5bf, 0x4f4c0de6},
+                {0x1, 0x3F800000},
+                {0xFFFFFFFF, 0x4F800000},
+                {0x1B09788B, 0x4DD84BC4},
+                {0x4C5FCE8, 0x4C98BF9D},
+                {0xCC0DE5BF, 0x4F4C0DE6},
                 {0x2, 0x40000000},
                 {0x3, 0x40400000},
                 {0x4, 0x40800000},
-                {0x5, 0x40a00000},
+                {0x5, 0x40A00000},
                 {0x8, 0x41000000},
                 {0x9, 0x41100000},
-                {0xffffffffffffffff, 0x5f800000},
-                {0xfffffffffffffffe, 0x5f800000},
-                {0xfffffffffffffffd, 0x5f800000},
+                {0xFFFFFFFFFFFFFFFF, 0x5F800000},
+                {0xFFFFFFFFFFFFFFFE, 0x5F800000},
+                {0xFFFFFFFFFFFFFFFD, 0x5F800000},
                 {0x0, 0x0},
-                {0x100000000, 0x4f800000},
-                {0xffffffff00000000, 0x5f800000},
-                {0x1b09788b00000000, 0x5dd84bc4},
-                {0x4c5fce800000000, 0x5c98bf9d},
-                {0xcc0de5bf00000000, 0x5f4c0de6},
+                {0x100000000, 0x4F800000},
+                {0xFFFFFFFF00000000, 0x5F800000},
+                {0x1B09788B00000000, 0x5DD84BC4},
+                {0x4C5FCE800000000, 0x5C98BF9D},
+                {0xCC0DE5BF00000000, 0x5F4C0DE6},
                 {0x200000000, 0x50000000},
                 {0x300000000, 0x50400000},
                 {0x400000000, 0x50800000},
-                {0x500000000, 0x50a00000},
+                {0x500000000, 0x50A00000},
                 {0x800000000, 0x51000000},
                 {0x900000000, 0x51100000},
-                {0x273a798e187937a3, 0x5e1ce9e6},
-                {0xece3af835495a16b, 0x5f6ce3b0},
-                {0xb668ecc11223344, 0x5d3668ed},
-                {0x9e, 0x431e0000},
+                {0x273A798E187937A3, 0x5E1CE9E6},
+                {0xECE3AF835495A16B, 0x5F6CE3B0},
+                {0xB668ECC11223344, 0x5D3668ED},
+                {0x9E, 0x431E0000},
                 {0x43, 0x42860000},
-                {0xaf73, 0x472f7300},
-                {0x116b, 0x458b5800},
-                {0x658ecc, 0x4acb1d98},
-                {0x2b3b4c, 0x4a2ced30},
-                {0x88776655, 0x4f087766},
-                {0x70000000, 0x4ee00000},
-                {0x7200000, 0x4ce40000},
-                {0x7fffffff, 0x4f000000},
-                {0x56123761, 0x4eac246f},
-                {0x7fffff00, 0x4efffffe},
-                {0x761c4761eeeeeeee, 0x5eec388f},
-                {0x80000000eeeeeeee, 0x5f000000},
-                {0x88888888dddddddd, 0x5f088889},
-                {0xa0000000dddddddd, 0x5f200000},
-                {0xddddddddaaaaaaaa, 0x5f5dddde},
-                {0xe0000000aaaaaaaa, 0x5f600000},
-                {0xeeeeeeeeeeeeeeee, 0x5f6eeeef},
-                {0xfffffffdeeeeeeee, 0x5f800000},
-                {0xf0000000dddddddd, 0x5f700000},
-                {0x7fffffdddddddd, 0x5b000000},
-                {0x3fffffaaaaaaaa, 0x5a7fffff},
-                {0x1fffffaaaaaaaa, 0x59fffffd},
-                {0xfffff, 0x497ffff0},
-                {0x7ffff, 0x48ffffe0},
-                {0x3ffff, 0x487fffc0},
-                {0x1ffff, 0x47ffff80},
-                {0xffff, 0x477fff00},
-                {0x7fff, 0x46fffe00},
-                {0x3fff, 0x467ffc00},
-                {0x1fff, 0x45fff800},
-                {0xfff, 0x457ff000},
-                {0x7ff, 0x44ffe000},
-                {0x3ff, 0x447fc000},
-                {0x1ff, 0x43ff8000},
-                {0x3fffffffffff, 0x56800000},
-                {0x1fffffffffff, 0x56000000},
-                {0xfffffffffff, 0x55800000},
-                {0x7ffffffffff, 0x55000000},
-                {0x3ffffffffff, 0x54800000},
-                {0x1ffffffffff, 0x54000000},
-                {0x8000008000000000, 0x5f000000},
-                {0x8000008000000001, 0x5f000001},
-                {0x8000000000000400, 0x5f000000},
-                {0x8000000000000401, 0x5f000000}};
+                {0xAF73, 0x472F7300},
+                {0x116B, 0x458B5800},
+                {0x658ECC, 0x4ACB1D98},
+                {0x2B3B4C, 0x4A2CED30},
+                {0x88776655, 0x4F087766},
+                {0x70000000, 0x4EE00000},
+                {0x7200000, 0x4CE40000},
+                {0x7FFFFFFF, 0x4F000000},
+                {0x56123761, 0x4EAC246F},
+                {0x7FFFFF00, 0x4EFFFFFE},
+                {0x761C4761EEEEEEEE, 0x5EEC388F},
+                {0x80000000EEEEEEEE, 0x5F000000},
+                {0x88888888DDDDDDDD, 0x5F088889},
+                {0xA0000000DDDDDDDD, 0x5F200000},
+                {0xDDDDDDDDAAAAAAAA, 0x5F5DDDDE},
+                {0xE0000000AAAAAAAA, 0x5F600000},
+                {0xEEEEEEEEEEEEEEEE, 0x5F6EEEEF},
+                {0xFFFFFFFDEEEEEEEE, 0x5F800000},
+                {0xF0000000DDDDDDDD, 0x5F700000},
+                {0x7FFFFFDDDDDDDD, 0x5B000000},
+                {0x3FFFFFAAAAAAAA, 0x5A7FFFFF},
+                {0x1FFFFFAAAAAAAA, 0x59FFFFFD},
+                {0xFFFFF, 0x497FFFF0},
+                {0x7FFFF, 0x48FFFFE0},
+                {0x3FFFF, 0x487FFFC0},
+                {0x1FFFF, 0x47FFFF80},
+                {0xFFFF, 0x477FFF00},
+                {0x7FFF, 0x46FFFE00},
+                {0x3FFF, 0x467FFC00},
+                {0x1FFF, 0x45FFF800},
+                {0xFFF, 0x457FF000},
+                {0x7FF, 0x44FFE000},
+                {0x3FF, 0x447FC000},
+                {0x1FF, 0x43FF8000},
+                {0x3FFFFFFFFFFF, 0x56800000},
+                {0x1FFFFFFFFFFF, 0x56000000},
+                {0xFFFFFFFFFFF, 0x55800000},
+                {0x7FFFFFFFFFF, 0x55000000},
+                {0x3FFFFFFFFFF, 0x54800000},
+                {0x1FFFFFFFFFF, 0x54000000},
+                {0x8000008000000000, 0x5F000000},
+                {0x8000008000000001, 0x5F000001},
+                {0x8000000000000400, 0x5F000000},
+                {0x8000000000000401, 0x5F000000}};
 
   BufferedRawMachineAssemblerTester<float> m(MachineType::Uint64());
   m.Return(m.RoundUint64ToFloat32(m.Parameter(0)));
@@ -6694,17 +6696,17 @@
 
 TEST(RunBitcastInt32ToFloat32) {
   int32_t input = 1;
-  float output = 0.0;
+  Float32 output;
   RawMachineAssemblerTester<int32_t> m;
   m.StoreToPointer(
-      &output, MachineRepresentation::kFloat32,
+      output.get_bits_address(), MachineRepresentation::kFloat32,
       m.BitcastInt32ToFloat32(m.LoadFromPointer(&input, MachineType::Int32())));
   m.Return(m.Int32Constant(11));
   FOR_INT32_INPUTS(i) {
     input = *i;
     CHECK_EQ(11, m.Call());
-    float expected = bit_cast<float>(input);
-    CHECK_EQ(bit_cast<int32_t>(expected), bit_cast<int32_t>(output));
+    Float32 expected = Float32::FromBits(input);
+    CHECK_EQ(expected.get_bits(), output.get_bits());
   }
 }
 
@@ -6736,7 +6738,7 @@
 
   // TODO(titzer): all this descriptor hackery is just to call the above
   // functions as code objects instead of direct addresses.
-  CSignature0<int32_t> sig;
+  CSignatureOf<int32_t> sig;
   CallDescriptor* c = Linkage::GetSimplifiedCDescriptor(r.zone(), &sig);
   LinkageLocation ret[] = {c->GetReturnLocation(0)};
   Signature<LinkageLocation> loc(1, 0, ret);
@@ -6831,7 +6833,7 @@
 TEST(Regression5951) {
   BufferedRawMachineAssemblerTester<int64_t> m(MachineType::Int64());
   m.Return(m.Word64And(m.Word64Shr(m.Parameter(0), m.Int64Constant(0)),
-                       m.Int64Constant(0xffffffffffffffffl)));
+                       m.Int64Constant(0xFFFFFFFFFFFFFFFFl)));
   int64_t input = 1234;
   CHECK_EQ(input, m.Call(input));
 }
@@ -6878,7 +6880,7 @@
 TEST(Regression5951_32bit) {
   BufferedRawMachineAssemblerTester<int32_t> m(MachineType::Int32());
   m.Return(m.Word32And(m.Word32Shr(m.Parameter(0), m.Int32Constant(0)),
-                       m.Int32Constant(0xffffffff)));
+                       m.Int32Constant(0xFFFFFFFF)));
   int32_t input = 1234;
   CHECK_EQ(input, m.Call(input));
 }
@@ -6911,6 +6913,8 @@
   for (RelocIterator it(*code,
                         1 << RelocInfo::WASM_FUNCTION_TABLE_SIZE_REFERENCE);
        !it.done(); it.next()) {
+    // TODO(6792): No longer needed once WebAssembly code is off heap.
+    CodeSpaceMemoryModificationScope modification_scope(code->GetHeap());
     it.rinfo()->update_wasm_function_table_size_reference(
         code->GetIsolate(), old_value, new_value, FLUSH_ICACHE_IF_NEEDED);
   }
diff --git a/src/v8/test/cctest/compiler/test-run-native-calls.cc b/src/v8/test/cctest/compiler/test-run-native-calls.cc
index 70a0455..42196e6 100644
--- a/src/v8/test/cctest/compiler/test-run-native-calls.cc
+++ b/src/v8/test/cctest/compiler/test-run-native-calls.cc
@@ -207,7 +207,7 @@
         compiler::Operator::kNoProperties,  // properties
         kCalleeSaveRegisters,               // callee-saved registers
         kCalleeSaveFPRegisters,             // callee-saved fp regs
-        CallDescriptor::kUseNativeStack,    // flags
+        CallDescriptor::kNoFlags,           // flags
         "c-call");
   }
 
@@ -256,10 +256,9 @@
 Handle<Code> CompileGraph(const char* name, CallDescriptor* desc, Graph* graph,
                           Schedule* schedule = nullptr) {
   Isolate* isolate = CcTest::InitIsolateOnce();
-  CompilationInfo info(ArrayVector("testing"), isolate, graph->zone(),
-                       Code::STUB);
+  CompilationInfo info(ArrayVector("testing"), graph->zone(), Code::STUB);
   Handle<Code> code =
-      Pipeline::GenerateCodeForTesting(&info, desc, graph, schedule);
+      Pipeline::GenerateCodeForTesting(&info, isolate, desc, graph, schedule);
   CHECK(!code.is_null());
 #ifdef ENABLE_DISASSEMBLER
   if (FLAG_print_opt_code) {
@@ -447,7 +446,7 @@
       inner = CompileGraph("Compute", desc, &graph, raw.Export());
     }
 
-    CSignature0<int32_t> csig;
+    CSignatureOf<int32_t> csig;
     ArgsBuffer<CType> io(num_params, seed);
 
     {
@@ -584,7 +583,7 @@
     inner = CompileGraph("CopyTwentyInt32", desc, &graph, raw.Export());
   }
 
-  CSignature0<int32_t> csig;
+  CSignatureOf<int32_t> csig;
   Handle<Code> wrapper = Handle<Code>::null();
   {
     // Loads parameters from the input buffer and calls the above code.
@@ -1077,7 +1076,7 @@
       char bytes[kDoubleSize];
       V8_ALIGNED(8) char output[kDoubleSize];
       int expected_size = 0;
-      CSignature0<int32_t> csig;
+      CSignatureOf<int32_t> csig;
       {
         // Wrap the select code with a callable function that passes constants.
         Zone zone(&allocator, ZONE_NAME);
@@ -1212,7 +1211,7 @@
 
 #if !V8_TARGET_ARCH_32_BIT
 TEST(RunStackSlotInt64) {
-  int64_t magic = 0x123456789abcdef0;
+  int64_t magic = 0x123456789ABCDEF0;
   TestStackSlot(MachineType::Int64(), magic);
 }
 #endif
diff --git a/src/v8/test/cctest/compiler/test-run-retpoline.cc b/src/v8/test/cctest/compiler/test-run-retpoline.cc
new file mode 100644
index 0000000..152ed44
--- /dev/null
+++ b/src/v8/test/cctest/compiler/test-run-retpoline.cc
@@ -0,0 +1,208 @@
+// Copyright 2018 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "src/assembler-inl.h"
+#include "src/code-stub-assembler.h"
+
+#include "test/cctest/cctest.h"
+#include "test/cctest/compiler/code-assembler-tester.h"
+#include "test/cctest/compiler/function-tester.h"
+
+namespace v8 {
+namespace internal {
+namespace compiler {
+namespace test_run_retpoline {
+
+#define __ assembler.
+
+namespace {
+
+// Function that takes a number of pointer-sized integer arguments, calculates a
+// weighted sum of them and returns it.
+Handle<Code> BuildCallee(Isolate* isolate, CallDescriptor* descriptor) {
+  CodeAssemblerTester tester(isolate, descriptor, "callee");
+  CodeStubAssembler assembler(tester.state());
+  int param_count = static_cast<int>(descriptor->StackParameterCount());
+  Node* sum = __ IntPtrConstant(0);
+  for (int i = 0; i < param_count; ++i) {
+    Node* product = __ IntPtrMul(__ Parameter(i), __ IntPtrConstant(i + 1));
+    sum = __ IntPtrAdd(sum, product);
+  }
+  __ Return(sum);
+  return tester.GenerateCodeCloseAndEscape();
+}
+
+// Function that tail-calls another function with a number of pointer-sized
+// integer arguments.
+Handle<Code> BuildCaller(Isolate* isolate, CallDescriptor* descriptor,
+                         CallDescriptor* callee_descriptor, bool tail) {
+  CodeAssemblerTester tester(isolate, descriptor, "caller");
+  CodeStubAssembler assembler(tester.state());
+  std::vector<Node*> params;
+  // The first parameter is always the callee.
+  Handle<Code> callee = BuildCallee(isolate, callee_descriptor);
+  // defeat the instruction selector.
+  CodeStubAssembler::Variable target_var(&assembler,
+                                         MachineRepresentation::kTagged);
+  CodeStubAssembler::Label t(&assembler), f(&assembler),
+      end(&assembler, &target_var);
+  __ Branch(__ Int32Constant(0), &t, &f);
+  __ BIND(&t);
+  target_var.Bind(__ HeapConstant(callee));
+  __ Goto(&end);
+  __ BIND(&f);
+  target_var.Bind(__ HeapConstant(callee));
+  __ Goto(&end);
+  __ BIND(&end);
+  params.push_back(target_var.value());
+
+  int param_count = static_cast<int>(callee_descriptor->StackParameterCount());
+  for (int i = 0; i < param_count; ++i) {
+    params.push_back(__ IntPtrConstant(i));
+  }
+  DCHECK_EQ(param_count + 1, params.size());
+  if (tail) {
+    tester.raw_assembler_for_testing()->TailCallN(
+        callee_descriptor, param_count + 1, params.data());
+  } else {
+    Node* result = tester.raw_assembler_for_testing()->CallN(
+        callee_descriptor, param_count + 1, params.data());
+    __ Return(result);
+  }
+  return tester.GenerateCodeCloseAndEscape();
+}
+
+// Setup function, which calls "caller".
+Handle<Code> BuildSetupFunction(Isolate* isolate,
+                                CallDescriptor* caller_descriptor,
+                                CallDescriptor* callee_descriptor, bool tail) {
+  CodeAssemblerTester tester(isolate, 0);
+  CodeStubAssembler assembler(tester.state());
+  std::vector<Node*> params;
+  // The first parameter is always the callee.
+  params.push_back(__ HeapConstant(
+      BuildCaller(isolate, caller_descriptor, callee_descriptor, tail)));
+  // Set up arguments for "Caller".
+  int param_count = static_cast<int>(caller_descriptor->StackParameterCount());
+  for (int i = 0; i < param_count; ++i) {
+    // Use values that are different from the ones we will pass to this
+    // function's callee later.
+    params.push_back(__ IntPtrConstant(i + 42));
+  }
+  DCHECK_EQ(param_count + 1, params.size());
+  Node* raw_result = tester.raw_assembler_for_testing()->CallN(
+      caller_descriptor, param_count + 1, params.data());
+  __ Return(__ SmiTag(raw_result));
+  return tester.GenerateCodeCloseAndEscape();
+}
+
+CallDescriptor* CreateDescriptorForStackArguments(Zone* zone,
+                                                  int stack_param_count) {
+  LocationSignature::Builder locations(zone, 1,
+                                       static_cast<size_t>(stack_param_count));
+
+  locations.AddReturn(LinkageLocation::ForRegister(kReturnRegister0.code(),
+                                                   MachineType::IntPtr()));
+
+  for (int i = 0; i < stack_param_count; ++i) {
+    locations.AddParam(LinkageLocation::ForCallerFrameSlot(
+        i - stack_param_count, MachineType::IntPtr()));
+  }
+
+  return new (zone)
+      CallDescriptor(CallDescriptor::kCallCodeObject,  // kind
+                     MachineType::AnyTagged(),         // target MachineType
+                     LinkageLocation::ForAnyRegister(
+                         MachineType::AnyTagged()),  // target location
+                     locations.Build(),              // location_sig
+                     stack_param_count,              // stack_parameter_count
+                     Operator::kNoProperties,        // properties
+                     kNoCalleeSaved,                 // callee-saved registers
+                     kNoCalleeSaved,                 // callee-saved fp
+                     CallDescriptor::kRetpoline);    // flags
+}
+
+// Test a tail call from a caller with n parameters to a callee with m
+// parameters. All parameters are pointer-sized.
+void TestHelper(int n, int m, bool tail) {
+  HandleAndZoneScope scope;
+  Isolate* isolate = scope.main_isolate();
+  Zone* zone = scope.main_zone();
+  CallDescriptor* caller_descriptor =
+      CreateDescriptorForStackArguments(zone, n);
+  CallDescriptor* callee_descriptor =
+      CreateDescriptorForStackArguments(zone, m);
+  Handle<Code> setup =
+      BuildSetupFunction(isolate, caller_descriptor, callee_descriptor, tail);
+  FunctionTester ft(setup, 0);
+  Handle<Object> result = ft.Call().ToHandleChecked();
+  int expected = 0;
+  for (int i = 0; i < m; ++i) expected += (i + 1) * i;
+  CHECK_EQ(expected, Handle<Smi>::cast(result)->value());
+}
+
+}  // namespace
+
+#undef __
+
+TEST(RetpolineOddEven) {
+  TestHelper(1, 0, false);
+  TestHelper(1, 2, false);
+  TestHelper(3, 2, false);
+  TestHelper(3, 4, false);
+}
+
+TEST(RetpolineOddEvenTail) {
+  TestHelper(1, 0, true);
+  TestHelper(1, 2, true);
+  TestHelper(3, 2, true);
+  TestHelper(3, 4, true);
+}
+
+TEST(RetpolineOddOdd) {
+  TestHelper(1, 1, false);
+  TestHelper(1, 3, false);
+  TestHelper(3, 1, false);
+  TestHelper(3, 3, false);
+}
+
+TEST(RetpolineOddOddTail) {
+  TestHelper(1, 1, true);
+  TestHelper(1, 3, true);
+  TestHelper(3, 1, true);
+  TestHelper(3, 3, true);
+}
+
+TEST(RetpolineEvenEven) {
+  TestHelper(0, 0, false);
+  TestHelper(0, 2, false);
+  TestHelper(2, 0, false);
+  TestHelper(2, 2, false);
+}
+
+TEST(RetpolineEvenEvenTail) {
+  TestHelper(0, 0, true);
+  TestHelper(0, 2, true);
+  TestHelper(2, 0, true);
+  TestHelper(2, 2, true);
+}
+
+TEST(RetpolineEvenOdd) {
+  TestHelper(0, 1, false);
+  TestHelper(0, 3, false);
+  TestHelper(2, 1, false);
+  TestHelper(2, 3, false);
+}
+
+TEST(RetpolineEvenOddTail) {
+  TestHelper(0, 1, true);
+  TestHelper(0, 3, true);
+  TestHelper(2, 1, true);
+  TestHelper(2, 3, true);
+}
+
+}  // namespace test_run_retpoline
+}  // namespace compiler
+}  // namespace internal
+}  // namespace v8
diff --git a/src/v8/test/cctest/compiler/test-run-stubs.cc b/src/v8/test/cctest/compiler/test-run-stubs.cc
index d42a803..139db1e 100644
--- a/src/v8/test/cctest/compiler/test-run-stubs.cc
+++ b/src/v8/test/cctest/compiler/test-run-stubs.cc
@@ -24,7 +24,7 @@
  public:
   StubTester(Isolate* isolate, Zone* zone, CodeStub* stub)
       : zone_(zone),
-        info_(ArrayVector("test"), isolate, zone, Code::STUB),
+        info_(ArrayVector("test"), zone, Code::STUB),
         interface_descriptor_(stub->GetCallInterfaceDescriptor()),
         descriptor_(Linkage::GetStubCallDescriptor(
             isolate, zone, interface_descriptor_,
@@ -37,7 +37,7 @@
 
   StubTester(Isolate* isolate, Zone* zone, Builtins::Name name)
       : zone_(zone),
-        info_(ArrayVector("test"), isolate, zone, Code::STUB),
+        info_(ArrayVector("test"), zone, Code::STUB),
         interface_descriptor_(
             Builtins::CallableFor(isolate, name).descriptor()),
         descriptor_(Linkage::GetStubCallDescriptor(
@@ -101,12 +101,12 @@
   FunctionTester tester_;
 };
 
-TEST(RunStringLengthStub) {
+TEST(RunStringWrapperLengthStub) {
   HandleAndZoneScope scope;
   Isolate* isolate = scope.main_isolate();
   Zone* zone = scope.main_zone();
 
-  StubTester tester(isolate, zone, Builtins::kLoadIC_StringLength);
+  StubTester tester(isolate, zone, Builtins::kLoadIC_StringWrapperLength);
 
   // Actuall call through to the stub, verifying its result.
   const char* testString = "Und das Lamm schrie HURZ!";
@@ -119,6 +119,119 @@
   CHECK_EQ(static_cast<int>(strlen(testString)), Smi::ToInt(*result));
 }
 
+TEST(RunArrayExtractStubSimple) {
+  HandleAndZoneScope scope;
+  Isolate* isolate = scope.main_isolate();
+  Zone* zone = scope.main_zone();
+
+  StubTester tester(isolate, zone, Builtins::kExtractFastJSArray);
+
+  // Actuall call through to the stub, verifying its result.
+  Handle<JSArray> source_array = isolate->factory()->NewJSArray(
+      PACKED_ELEMENTS, 5, 10, INITIALIZE_ARRAY_ELEMENTS_WITH_HOLE);
+  static_cast<FixedArray*>(source_array->elements())->set(0, Smi::FromInt(5));
+  static_cast<FixedArray*>(source_array->elements())->set(1, Smi::FromInt(4));
+  static_cast<FixedArray*>(source_array->elements())->set(2, Smi::FromInt(3));
+  static_cast<FixedArray*>(source_array->elements())->set(3, Smi::FromInt(2));
+  static_cast<FixedArray*>(source_array->elements())->set(4, Smi::FromInt(1));
+  Handle<JSArray> result = Handle<JSArray>::cast(
+      tester.Call(source_array, Handle<Smi>(Smi::FromInt(0), isolate),
+                  Handle<Smi>(Smi::FromInt(5), isolate)));
+  CHECK_NE(*source_array, *result);
+  CHECK_EQ(result->GetElementsKind(), PACKED_ELEMENTS);
+  CHECK_EQ(static_cast<FixedArray*>(result->elements())->get(0),
+           Smi::FromInt(5));
+  CHECK_EQ(static_cast<FixedArray*>(result->elements())->get(1),
+           Smi::FromInt(4));
+  CHECK_EQ(static_cast<FixedArray*>(result->elements())->get(2),
+           Smi::FromInt(3));
+  CHECK_EQ(static_cast<FixedArray*>(result->elements())->get(3),
+           Smi::FromInt(2));
+  CHECK_EQ(static_cast<FixedArray*>(result->elements())->get(4),
+           Smi::FromInt(1));
+}
+
+TEST(RunArrayExtractDoubleStubSimple) {
+  HandleAndZoneScope scope;
+  Isolate* isolate = scope.main_isolate();
+  Zone* zone = scope.main_zone();
+
+  StubTester tester(isolate, zone, Builtins::kExtractFastJSArray);
+
+  // Actuall call through to the stub, verifying its result.
+  Handle<JSArray> source_array = isolate->factory()->NewJSArray(
+      PACKED_DOUBLE_ELEMENTS, 5, 10, INITIALIZE_ARRAY_ELEMENTS_WITH_HOLE);
+  static_cast<FixedDoubleArray*>(source_array->elements())->set(0, 5);
+  static_cast<FixedDoubleArray*>(source_array->elements())->set(1, 4);
+  static_cast<FixedDoubleArray*>(source_array->elements())->set(2, 3);
+  static_cast<FixedDoubleArray*>(source_array->elements())->set(3, 2);
+  static_cast<FixedDoubleArray*>(source_array->elements())->set(4, 1);
+  Handle<JSArray> result = Handle<JSArray>::cast(
+      tester.Call(source_array, Handle<Smi>(Smi::FromInt(0), isolate),
+                  Handle<Smi>(Smi::FromInt(5), isolate)));
+  CHECK_NE(*source_array, *result);
+  CHECK_EQ(result->GetElementsKind(), PACKED_DOUBLE_ELEMENTS);
+  CHECK_EQ(static_cast<FixedDoubleArray*>(result->elements())->get_scalar(0),
+           5);
+  CHECK_EQ(static_cast<FixedDoubleArray*>(result->elements())->get_scalar(1),
+           4);
+  CHECK_EQ(static_cast<FixedDoubleArray*>(result->elements())->get_scalar(2),
+           3);
+  CHECK_EQ(static_cast<FixedDoubleArray*>(result->elements())->get_scalar(3),
+           2);
+  CHECK_EQ(static_cast<FixedDoubleArray*>(result->elements())->get_scalar(4),
+           1);
+}
+
+TEST(RunArrayExtractStubTooBigForNewSpace) {
+  HandleAndZoneScope scope;
+  Isolate* isolate = scope.main_isolate();
+  Zone* zone = scope.main_zone();
+
+  StubTester tester(isolate, zone, Builtins::kExtractFastJSArray);
+
+  // Actuall call through to the stub, verifying its result.
+  Handle<JSArray> source_array = isolate->factory()->NewJSArray(
+      PACKED_ELEMENTS, 500000, 500000, INITIALIZE_ARRAY_ELEMENTS_WITH_HOLE);
+  for (int i = 0; i < 500000; ++i) {
+    static_cast<FixedArray*>(source_array->elements())->set(i, Smi::FromInt(i));
+  }
+  Handle<JSArray> result = Handle<JSArray>::cast(
+      tester.Call(source_array, Handle<Smi>(Smi::FromInt(0), isolate),
+                  Handle<Smi>(Smi::FromInt(500000), isolate)));
+  CHECK_NE(*source_array, *result);
+  CHECK_EQ(result->GetElementsKind(), PACKED_ELEMENTS);
+  for (int i = 0; i < 500000; ++i) {
+    CHECK_EQ(static_cast<FixedArray*>(source_array->elements())->get(i),
+             static_cast<FixedArray*>(result->elements())->get(i));
+  }
+}
+
+TEST(RunArrayExtractDoubleStubTooBigForNewSpace) {
+  HandleAndZoneScope scope;
+  Isolate* isolate = scope.main_isolate();
+  Zone* zone = scope.main_zone();
+
+  StubTester tester(isolate, zone, Builtins::kExtractFastJSArray);
+
+  // Actuall call through to the stub, verifying its result.
+  Handle<JSArray> source_array = isolate->factory()->NewJSArray(
+      PACKED_DOUBLE_ELEMENTS, 500000, 500000,
+      INITIALIZE_ARRAY_ELEMENTS_WITH_HOLE, TENURED);
+  for (int i = 0; i < 500000; ++i) {
+    static_cast<FixedDoubleArray*>(source_array->elements())->set(i, i);
+  }
+  Handle<JSArray> result = Handle<JSArray>::cast(
+      tester.Call(source_array, Handle<Smi>(Smi::FromInt(0), isolate),
+                  Handle<Smi>(Smi::FromInt(500000), isolate)));
+  CHECK_NE(*source_array, *result);
+  CHECK_EQ(result->GetElementsKind(), PACKED_DOUBLE_ELEMENTS);
+  for (int i = 0; i < 500000; ++i) {
+    CHECK_EQ(
+        static_cast<FixedDoubleArray*>(source_array->elements())->get_scalar(i),
+        static_cast<FixedDoubleArray*>(result->elements())->get_scalar(i));
+  }
+}
 
 }  // namespace compiler
 }  // namespace internal
diff --git a/src/v8/test/cctest/compiler/test-run-tail-calls.cc b/src/v8/test/cctest/compiler/test-run-tail-calls.cc
new file mode 100644
index 0000000..2fbc90d
--- /dev/null
+++ b/src/v8/test/cctest/compiler/test-run-tail-calls.cc
@@ -0,0 +1,171 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "src/assembler-inl.h"
+#include "src/base/utils/random-number-generator.h"
+#include "src/code-stub-assembler.h"
+
+#include "test/cctest/cctest.h"
+#include "test/cctest/compiler/code-assembler-tester.h"
+#include "test/cctest/compiler/function-tester.h"
+
+namespace v8 {
+namespace internal {
+namespace compiler {
+namespace test_run_tail_calls {
+
+#define __ assembler.
+
+namespace {
+
+// Function that takes a number of pointer-sized integer arguments, calculates a
+// weighted sum of them and returns it.
+Handle<Code> BuildCallee(Isolate* isolate, CallDescriptor* descriptor) {
+  CodeAssemblerTester tester(isolate, descriptor, "callee");
+  CodeStubAssembler assembler(tester.state());
+  int param_count = static_cast<int>(descriptor->StackParameterCount());
+  Node* sum = __ IntPtrConstant(0);
+  for (int i = 0; i < param_count; ++i) {
+    Node* product = __ IntPtrMul(__ Parameter(i), __ IntPtrConstant(i + 1));
+    sum = __ IntPtrAdd(sum, product);
+  }
+  __ Return(sum);
+  return tester.GenerateCodeCloseAndEscape();
+}
+
+// Function that tail-calls another function with a number of pointer-sized
+// integer arguments.
+Handle<Code> BuildCaller(Isolate* isolate, CallDescriptor* descriptor,
+                         CallDescriptor* callee_descriptor) {
+  CodeAssemblerTester tester(isolate, descriptor, "caller");
+  CodeStubAssembler assembler(tester.state());
+  std::vector<Node*> params;
+  // The first parameter is always the callee.
+  params.push_back(__ HeapConstant(BuildCallee(isolate, callee_descriptor)));
+  int param_count = static_cast<int>(callee_descriptor->StackParameterCount());
+  for (int i = 0; i < param_count; ++i) {
+    params.push_back(__ IntPtrConstant(i));
+  }
+  DCHECK_EQ(param_count + 1, params.size());
+  tester.raw_assembler_for_testing()->TailCallN(callee_descriptor,
+                                                param_count + 1, params.data());
+  return tester.GenerateCodeCloseAndEscape();
+}
+
+// Setup function, which calls "caller".
+Handle<Code> BuildSetupFunction(Isolate* isolate,
+                                CallDescriptor* caller_descriptor,
+                                CallDescriptor* callee_descriptor) {
+  CodeAssemblerTester tester(isolate, 0);
+  CodeStubAssembler assembler(tester.state());
+  std::vector<Node*> params;
+  // The first parameter is always the callee.
+  params.push_back(__ HeapConstant(
+      BuildCaller(isolate, caller_descriptor, callee_descriptor)));
+  // Set up arguments for "Caller".
+  int param_count = static_cast<int>(caller_descriptor->StackParameterCount());
+  for (int i = 0; i < param_count; ++i) {
+    // Use values that are different from the ones we will pass to this
+    // function's callee later.
+    params.push_back(__ IntPtrConstant(i + 42));
+  }
+  DCHECK_EQ(param_count + 1, params.size());
+  Node* raw_result = tester.raw_assembler_for_testing()->CallN(
+      caller_descriptor, param_count + 1, params.data());
+  __ Return(__ SmiTag(raw_result));
+  return tester.GenerateCodeCloseAndEscape();
+}
+
+CallDescriptor* CreateDescriptorForStackArguments(Zone* zone,
+                                                  int stack_param_count) {
+  LocationSignature::Builder locations(zone, 1,
+                                       static_cast<size_t>(stack_param_count));
+
+  locations.AddReturn(LinkageLocation::ForRegister(kReturnRegister0.code(),
+                                                   MachineType::IntPtr()));
+
+  for (int i = 0; i < stack_param_count; ++i) {
+    locations.AddParam(LinkageLocation::ForCallerFrameSlot(
+        i - stack_param_count, MachineType::IntPtr()));
+  }
+
+  return new (zone)
+      CallDescriptor(CallDescriptor::kCallCodeObject,  // kind
+                     MachineType::AnyTagged(),         // target MachineType
+                     LinkageLocation::ForAnyRegister(
+                         MachineType::AnyTagged()),  // target location
+                     locations.Build(),              // location_sig
+                     stack_param_count,              // stack_parameter_count
+                     Operator::kNoProperties,        // properties
+                     kNoCalleeSaved,                 // callee-saved registers
+                     kNoCalleeSaved,                 // callee-saved fp
+                     CallDescriptor::kNoFlags);      // flags
+}
+
+// Test a tail call from a caller with n parameters to a callee with m
+// parameters. All parameters are pointer-sized.
+void TestHelper(int n, int m) {
+  HandleAndZoneScope scope;
+  Isolate* isolate = scope.main_isolate();
+  Zone* zone = scope.main_zone();
+  CallDescriptor* caller_descriptor =
+      CreateDescriptorForStackArguments(zone, n);
+  CallDescriptor* callee_descriptor =
+      CreateDescriptorForStackArguments(zone, m);
+  Handle<Code> setup =
+      BuildSetupFunction(isolate, caller_descriptor, callee_descriptor);
+  FunctionTester ft(setup, 0);
+  Handle<Object> result = ft.Call().ToHandleChecked();
+  int expected = 0;
+  for (int i = 0; i < m; ++i) expected += (i + 1) * i;
+  CHECK_EQ(expected, Handle<Smi>::cast(result)->value());
+}
+
+}  // namespace
+
+#undef __
+
+TEST(CallerOddCalleeEven) {
+  TestHelper(1, 0);
+  TestHelper(1, 2);
+  TestHelper(3, 2);
+  TestHelper(3, 4);
+}
+
+TEST(CallerOddCalleeOdd) {
+  TestHelper(1, 1);
+  TestHelper(1, 3);
+  TestHelper(3, 1);
+  TestHelper(3, 3);
+}
+
+TEST(CallerEvenCalleeEven) {
+  TestHelper(0, 0);
+  TestHelper(0, 2);
+  TestHelper(2, 0);
+  TestHelper(2, 2);
+}
+
+TEST(CallerEvenCalleeOdd) {
+  TestHelper(0, 1);
+  TestHelper(0, 3);
+  TestHelper(2, 1);
+  TestHelper(2, 3);
+}
+
+TEST(FuzzStackParamCount) {
+  const int kNumTests = 20;
+  const int kMaxSlots = 30;
+  base::RandomNumberGenerator* const rng = CcTest::random_number_generator();
+  for (int i = 0; i < kNumTests; ++i) {
+    int n = rng->NextInt(kMaxSlots);
+    int m = rng->NextInt(kMaxSlots);
+    TestHelper(n, m);
+  }
+}
+
+}  // namespace test_run_tail_calls
+}  // namespace compiler
+}  // namespace internal
+}  // namespace v8
diff --git a/src/v8/test/cctest/compiler/test-run-variables.cc b/src/v8/test/cctest/compiler/test-run-variables.cc
index d1f564a..728d60f 100644
--- a/src/v8/test/cctest/compiler/test-run-variables.cc
+++ b/src/v8/test/cctest/compiler/test-run-variables.cc
@@ -10,38 +10,56 @@
 namespace internal {
 namespace compiler {
 
-static const char* throws = NULL;
+static const char* throws = nullptr;
 
-static const char* load_tests[] = {
-    "var x = a; r = x",                       "123",       "0",
-    "var x = (r = x)",                        "undefined", "undefined",
-    "var x = (a?1:2); r = x",                 "1",         "2",
-    "const x = a; r = x",                     "123",       "0",
-    "const x = (a?3:4); r = x",               "3",         "4",
-    "'use strict'; const x = a; r = x",       "123",       "0",
-    "'use strict'; const x = (r = x)",        throws,      throws,
-    "'use strict'; const x = (a?5:6); r = x", "5",         "6",
-    "'use strict'; let x = a; r = x",         "123",       "0",
-    "'use strict'; let x = (r = x)",          throws,      throws,
-    "'use strict'; let x = (a?7:8); r = x",   "7",         "8",
-    NULL};
+static const char* load_tests[] = {"var x = a; r = x",
+                                   "123",
+                                   "0",
+                                   "var x = (r = x)",
+                                   "undefined",
+                                   "undefined",
+                                   "var x = (a?1:2); r = x",
+                                   "1",
+                                   "2",
+                                   "const x = a; r = x",
+                                   "123",
+                                   "0",
+                                   "const x = (a?3:4); r = x",
+                                   "3",
+                                   "4",
+                                   "'use strict'; const x = a; r = x",
+                                   "123",
+                                   "0",
+                                   "'use strict'; const x = (r = x)",
+                                   throws,
+                                   throws,
+                                   "'use strict'; const x = (a?5:6); r = x",
+                                   "5",
+                                   "6",
+                                   "'use strict'; let x = a; r = x",
+                                   "123",
+                                   "0",
+                                   "'use strict'; let x = (r = x)",
+                                   throws,
+                                   throws,
+                                   "'use strict'; let x = (a?7:8); r = x",
+                                   "7",
+                                   "8",
+                                   nullptr};
 
 static const char* store_tests[] = {
-    "var x = 1; x = a; r = x",                     "123",  "0",
-    "var x = (a?(x=4,2):3); r = x",                "2",    "3",
-    "var x = (a?4:5); x = a; r = x",               "123",  "0",
+    "var x = 1; x = a; r = x", "123", "0", "var x = (a?(x=4,2):3); r = x", "2",
+    "3", "var x = (a?4:5); x = a; r = x", "123", "0",
     // Assignments to 'const' are SyntaxErrors, handled by the parser,
     // hence we cannot test them here because they are early errors.
-    "'use strict'; let x = 1; x = a; r = x",       "123",  "0",
-    "'use strict'; let x = (a?(x=4,2):3); r = x",  throws, "3",
-    "'use strict'; let x = (a?4:5); x = a; r = x", "123",  "0",
-    NULL};
-
+    "'use strict'; let x = 1; x = a; r = x", "123", "0",
+    "'use strict'; let x = (a?(x=4,2):3); r = x", throws, "3",
+    "'use strict'; let x = (a?4:5); x = a; r = x", "123", "0", nullptr};
 
 static void RunVariableTests(const char* source, const char* tests[]) {
   EmbeddedVector<char, 512> buffer;
 
-  for (int i = 0; tests[i] != NULL; i += 3) {
+  for (int i = 0; tests[i] != nullptr; i += 3) {
     SNPrintF(buffer, source, tests[i]);
     PrintF("#%d: %s\n", i / 3, buffer.start());
     FunctionTester T(buffer.start());
diff --git a/src/v8/test/cctest/compiler/test-run-wasm-machops.cc b/src/v8/test/cctest/compiler/test-run-wasm-machops.cc
index 7f63484..2f15364 100644
--- a/src/v8/test/cctest/compiler/test-run-wasm-machops.cc
+++ b/src/v8/test/cctest/compiler/test-run-wasm-machops.cc
@@ -24,6 +24,8 @@
                                               uint32_t old_size,
                                               uint32_t new_size) {
   Isolate* isolate = CcTest::i_isolate();
+  // TODO(6792): No longer needed once WebAssembly code is off heap.
+  CodeSpaceMemoryModificationScope modification_scope(isolate->heap());
   bool modified = false;
   int mode_mask =
       RelocInfo::ModeMask(RelocInfo::WASM_FUNCTION_TABLE_SIZE_REFERENCE);
@@ -48,7 +50,8 @@
   CType new_buffer[kNumElems];
   byte* raw = reinterpret_cast<byte*>(buffer);
   byte* new_raw = reinterpret_cast<byte*>(new_buffer);
-  WasmContext wasm_context = {raw, sizeof(buffer)};
+  WasmContext wasm_context;
+  wasm_context.SetRawMemory(raw, sizeof(buffer));
   for (size_t i = 0; i < sizeof(buffer); i++) {
     raw[i] = static_cast<byte>((i + sizeof(CType)) ^ 0xAA);
     new_raw[i] = static_cast<byte>((i + sizeof(CType)) ^ 0xAA);
@@ -68,8 +71,7 @@
   CHECK(buffer[0] != buffer[1]);
   CHECK_EQ(OK, m.Call());
   CHECK(buffer[0] == buffer[1]);
-  wasm_context.mem_size = sizeof(new_buffer);
-  wasm_context.mem_start = new_raw;
+  wasm_context.SetRawMemory(new_raw, sizeof(new_buffer));
   CHECK(new_buffer[0] != new_buffer[1]);
   CHECK_EQ(OK, m.Call());
   CHECK(new_buffer[0] == new_buffer[1]);
@@ -99,7 +101,7 @@
     int32_t y = kNumElems - x - 1;
     // initialize the buffer with raw data.
     byte* raw = reinterpret_cast<byte*>(buffer);
-    wasm_context = {raw, sizeof(buffer)};
+    wasm_context.SetRawMemory(raw, sizeof(buffer));
     for (size_t i = 0; i < sizeof(buffer); i++) {
       raw[i] = static_cast<byte>((i + sizeof(buffer)) ^ 0xAA);
     }
@@ -128,8 +130,7 @@
       new_raw[i] = static_cast<byte>((i + sizeof(buffer)) ^ 0xAA);
     }
 
-    wasm_context.mem_size = sizeof(new_buffer);
-    wasm_context.mem_start = new_raw;
+    wasm_context.SetRawMemory(new_raw, sizeof(new_buffer));
 
     CHECK(new_buffer[x] != new_buffer[y]);
     CHECK_EQ(OK, m.Call());
@@ -152,7 +153,8 @@
 TEST(Uint32LessThanMemoryRelocation) {
   RawMachineAssemblerTester<uint32_t> m;
   RawMachineLabel within_bounds, out_of_bounds;
-  WasmContext wasm_context = {reinterpret_cast<Address>(1234), 0x200};
+  WasmContext wasm_context;
+  wasm_context.SetRawMemory(reinterpret_cast<void*>(1234), 0x200);
   Node* index = m.Int32Constant(0x200);
   Node* wasm_context_node =
       m.RelocatableIntPtrConstant(reinterpret_cast<uintptr_t>(&wasm_context),
@@ -162,14 +164,14 @@
   Node* cond = m.AddNode(m.machine()->Uint32LessThan(), index, limit);
   m.Branch(cond, &within_bounds, &out_of_bounds);
   m.Bind(&within_bounds);
-  m.Return(m.Int32Constant(0xaced));
+  m.Return(m.Int32Constant(0xACED));
   m.Bind(&out_of_bounds);
-  m.Return(m.Int32Constant(0xdeadbeef));
+  m.Return(m.Int32Constant(0xDEADBEEF));
   // Check that index is out of bounds with current size
-  CHECK_EQ(0xdeadbeef, m.Call());
-  wasm_context.mem_size = 0x400;
+  CHECK_EQ(0xDEADBEEF, m.Call());
+  wasm_context.SetRawMemory(wasm_context.mem_start, 0x400);
   // Check that after limit is increased, index is within bounds.
-  CHECK_EQ(0xacedu, m.Call());
+  CHECK_EQ(0xACEDu, m.Call());
 }
 
 TEST(Uint32LessThanFunctionTableRelocation) {
@@ -181,17 +183,17 @@
   Node* cond = m.AddNode(m.machine()->Uint32LessThan(), index, limit);
   m.Branch(cond, &within_bounds, &out_of_bounds);
   m.Bind(&within_bounds);
-  m.Return(m.Int32Constant(0xaced));
+  m.Return(m.Int32Constant(0xACED));
   m.Bind(&out_of_bounds);
-  m.Return(m.Int32Constant(0xdeadbeef));
+  m.Return(m.Int32Constant(0xDEADBEEF));
   // Check that index is out of bounds with current size
-  CHECK_EQ(0xdeadbeef, m.Call());
+  CHECK_EQ(0xDEADBEEF, m.Call());
   m.GenerateCode();
 
   Handle<Code> code = m.GetCode();
   UpdateFunctionTableSizeReferences(code, 0x200, 0x400);
   // Check that after limit is increased, index is within bounds.
-  CHECK_EQ(0xaced, m.Call());
+  CHECK_EQ(0xACED, m.Call());
 }
 
 }  // namespace compiler
diff --git a/src/v8/test/cctest/compiler/value-helper.cc b/src/v8/test/cctest/compiler/value-helper.cc
new file mode 100644
index 0000000..abafa40
--- /dev/null
+++ b/src/v8/test/cctest/compiler/value-helper.cc
@@ -0,0 +1,21 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "test/cctest/compiler/value-helper.h"
+
+namespace v8 {
+namespace internal {
+namespace compiler {
+
+// Define constexpr arrays of ValueHelper for external references.
+constexpr int8_t ValueHelper::int8_array[];
+constexpr int16_t ValueHelper::int16_array[];
+constexpr uint32_t ValueHelper::uint32_array[];
+constexpr uint64_t ValueHelper::uint64_array[];
+constexpr float ValueHelper::float32_array[];
+constexpr double ValueHelper::float64_array[];
+
+}  // namespace compiler
+}  // namespace internal
+}  // namespace v8
diff --git a/src/v8/test/cctest/compiler/value-helper.h b/src/v8/test/cctest/compiler/value-helper.h
index 87cdb58..a69a371 100644
--- a/src/v8/test/cctest/compiler/value-helper.h
+++ b/src/v8/test/cctest/compiler/value-helper.h
@@ -7,9 +7,11 @@
 
 #include <stdint.h>
 
+#include "src/base/template-utils.h"
 #include "src/compiler/common-operator.h"
-#include "src/compiler/node.h"
 #include "src/compiler/node-matchers.h"
+#include "src/compiler/node.h"
+#include "src/heap/heap-inl.h"
 #include "src/isolate.h"
 #include "src/objects.h"
 #include "test/cctest/cctest.h"
@@ -60,283 +62,278 @@
     CheckHeapConstant(isolate_->heap()->false_value(), node);
   }
 
-  static std::vector<float> float32_vector() {
-    static const float nan = std::numeric_limits<float>::quiet_NaN();
-    static const float kValues[] = {
-        -std::numeric_limits<float>::infinity(),
-        -2.70497e+38f,
-        -1.4698e+37f,
-        -1.22813e+35f,
-        -1.20555e+35f,
-        -1.34584e+34f,
-        -1.0079e+32f,
-        -6.49364e+26f,
-        -3.06077e+25f,
-        -1.46821e+25f,
-        -1.17658e+23f,
-        -1.9617e+22f,
-        -2.7357e+20f,
-        -9223372036854775808.0f,  // INT64_MIN
-        -1.48708e+13f,
-        -1.89633e+12f,
-        -4.66622e+11f,
-        -2.22581e+11f,
-        -1.45381e+10f,
-        -2147483904.0f,  // First float32 after INT32_MIN
-        -2147483648.0f,  // INT32_MIN
-        -2147483520.0f,  // Last float32 before INT32_MIN
-        -1.3956e+09f,
-        -1.32951e+09f,
-        -1.30721e+09f,
-        -1.19756e+09f,
-        -9.26822e+08f,
-        -6.35647e+08f,
-        -4.00037e+08f,
-        -1.81227e+08f,
-        -5.09256e+07f,
-        -964300.0f,
-        -192446.0f,
-        -28455.0f,
-        -27194.0f,
-        -26401.0f,
-        -20575.0f,
-        -17069.0f,
-        -9167.0f,
-        -960.178f,
-        -113.0f,
-        -62.0f,
-        -15.0f,
-        -7.0f,
-        -1.0f,
-        -0.0256635f,
-        -4.60374e-07f,
-        -3.63759e-10f,
-        -4.30175e-14f,
-        -5.27385e-15f,
-        -1.5707963267948966f,
-        -1.48084e-15f,
-        -2.220446049250313e-16f,
-        -1.05755e-19f,
-        -3.2995e-21f,
-        -1.67354e-23f,
-        -1.11885e-23f,
-        -1.78506e-30f,
-        -5.07594e-31f,
-        -3.65799e-31f,
-        -1.43718e-34f,
-        -1.27126e-38f,
-        -0.0f,
-        0.0f,
-        1.17549e-38f,
-        1.56657e-37f,
-        4.08512e-29f,
-        3.31357e-28f,
-        6.25073e-22f,
-        4.1723e-13f,
-        1.44343e-09f,
-        1.5707963267948966f,
-        5.27004e-08f,
-        9.48298e-08f,
-        5.57888e-07f,
-        4.89988e-05f,
-        0.244326f,
-        1.0f,
-        12.4895f,
-        19.0f,
-        47.0f,
-        106.0f,
-        538.324f,
-        564.536f,
-        819.124f,
-        7048.0f,
-        12611.0f,
-        19878.0f,
-        20309.0f,
-        797056.0f,
-        1.77219e+09f,
-        2147483648.0f,  // INT32_MAX + 1
-        4294967296.0f,  // UINT32_MAX + 1
-        1.51116e+11f,
-        4.18193e+13f,
-        3.59167e+16f,
-        9223372036854775808.0f,   // INT64_MAX + 1
-        18446744073709551616.0f,  // UINT64_MAX + 1
-        3.38211e+19f,
-        2.67488e+20f,
-        1.78831e+21f,
-        9.20914e+21f,
-        8.35654e+23f,
-        1.4495e+24f,
-        5.94015e+25f,
-        4.43608e+30f,
-        2.44502e+33f,
-        2.61152e+33f,
-        1.38178e+37f,
-        1.71306e+37f,
-        3.31899e+38f,
-        3.40282e+38f,
-        std::numeric_limits<float>::infinity(),
-        nan,
-        -nan,
-    };
-    return std::vector<float>(&kValues[0], &kValues[arraysize(kValues)]);
+  static constexpr float float32_array[] = {
+      -std::numeric_limits<float>::infinity(),
+      -2.70497e+38f,
+      -1.4698e+37f,
+      -1.22813e+35f,
+      -1.20555e+35f,
+      -1.34584e+34f,
+      -1.0079e+32f,
+      -6.49364e+26f,
+      -3.06077e+25f,
+      -1.46821e+25f,
+      -1.17658e+23f,
+      -1.9617e+22f,
+      -2.7357e+20f,
+      -9223372036854775808.0f,  // INT64_MIN
+      -1.48708e+13f,
+      -1.89633e+12f,
+      -4.66622e+11f,
+      -2.22581e+11f,
+      -1.45381e+10f,
+      -2147483904.0f,  // First float32 after INT32_MIN
+      -2147483648.0f,  // INT32_MIN
+      -2147483520.0f,  // Last float32 before INT32_MIN
+      -1.3956e+09f,
+      -1.32951e+09f,
+      -1.30721e+09f,
+      -1.19756e+09f,
+      -9.26822e+08f,
+      -6.35647e+08f,
+      -4.00037e+08f,
+      -1.81227e+08f,
+      -5.09256e+07f,
+      -964300.0f,
+      -192446.0f,
+      -28455.0f,
+      -27194.0f,
+      -26401.0f,
+      -20575.0f,
+      -17069.0f,
+      -9167.0f,
+      -960.178f,
+      -113.0f,
+      -62.0f,
+      -15.0f,
+      -7.0f,
+      -1.0f,
+      -0.0256635f,
+      -4.60374e-07f,
+      -3.63759e-10f,
+      -4.30175e-14f,
+      -5.27385e-15f,
+      -1.5707963267948966f,
+      -1.48084e-15f,
+      -2.220446049250313e-16f,
+      -1.05755e-19f,
+      -3.2995e-21f,
+      -1.67354e-23f,
+      -1.11885e-23f,
+      -1.78506e-30f,
+      -5.07594e-31f,
+      -3.65799e-31f,
+      -1.43718e-34f,
+      -1.27126e-38f,
+      -0.0f,
+      0.0f,
+      1.17549e-38f,
+      1.56657e-37f,
+      4.08512e-29f,
+      3.31357e-28f,
+      6.25073e-22f,
+      4.1723e-13f,
+      1.44343e-09f,
+      1.5707963267948966f,
+      5.27004e-08f,
+      9.48298e-08f,
+      5.57888e-07f,
+      4.89988e-05f,
+      0.244326f,
+      1.0f,
+      12.4895f,
+      19.0f,
+      47.0f,
+      106.0f,
+      538.324f,
+      564.536f,
+      819.124f,
+      7048.0f,
+      12611.0f,
+      19878.0f,
+      20309.0f,
+      797056.0f,
+      1.77219e+09f,
+      2147483648.0f,  // INT32_MAX + 1
+      4294967296.0f,  // UINT32_MAX + 1
+      1.51116e+11f,
+      4.18193e+13f,
+      3.59167e+16f,
+      9223372036854775808.0f,   // INT64_MAX + 1
+      18446744073709551616.0f,  // UINT64_MAX + 1
+      3.38211e+19f,
+      2.67488e+20f,
+      1.78831e+21f,
+      9.20914e+21f,
+      8.35654e+23f,
+      1.4495e+24f,
+      5.94015e+25f,
+      4.43608e+30f,
+      2.44502e+33f,
+      2.61152e+33f,
+      1.38178e+37f,
+      1.71306e+37f,
+      3.31899e+38f,
+      3.40282e+38f,
+      std::numeric_limits<float>::infinity(),
+      std::numeric_limits<float>::quiet_NaN(),
+      -std::numeric_limits<float>::quiet_NaN()};
+
+  static constexpr Vector<const float> float32_vector() {
+    return ArrayVector(float32_array);
   }
 
-  static std::vector<double> float64_vector() {
-    static const double nan = std::numeric_limits<double>::quiet_NaN();
-    static const double values[] = {-2e66,
-                                    -2.220446049250313e-16,
-                                    -9223373136366403584.0,
-                                    -9223372036854775808.0,  // INT64_MIN
-                                    -2147483649.5,
-                                    -2147483648.25,
-                                    -2147483648.0,
-                                    -2147483647.875,
-                                    -2147483647.125,
-                                    -2147483647.0,
-                                    -999.75,
-                                    -2e66,
-                                    -1.75,
-                                    -1.5707963267948966,
-                                    -1.0,
-                                    -0.5,
-                                    -0.0,
-                                    0.0,
-                                    3e-88,
-                                    0.125,
-                                    0.25,
-                                    0.375,
-                                    0.5,
-                                    1.0,
-                                    1.17549e-38,
-                                    1.56657e-37,
-                                    1.0000001,
-                                    1.25,
-                                    1.5707963267948966,
-                                    2,
-                                    3.1e7,
-                                    5.125,
-                                    6.25,
-                                    888,
-                                    982983.25,
-                                    2147483647.0,
-                                    2147483647.375,
-                                    2147483647.75,
-                                    2147483648.0,
-                                    2147483648.25,
-                                    2147483649.25,
-                                    9223372036854775808.0,  // INT64_MAX + 1
-                                    9223373136366403584.0,
-                                    18446744073709551616.0,  // UINT64_MAX + 1
-                                    2e66,
-                                    V8_INFINITY,
-                                    -V8_INFINITY,
-                                    -nan,
-                                    nan};
-    return std::vector<double>(&values[0], &values[arraysize(values)]);
+  static constexpr double float64_array[] = {
+      -2e66,
+      -2.220446049250313e-16,
+      -9223373136366403584.0,
+      -9223372036854775808.0,  // INT64_MIN
+      -2147483649.5,
+      -2147483648.25,
+      -2147483648.0,
+      -2147483647.875,
+      -2147483647.125,
+      -2147483647.0,
+      -999.75,
+      -2e66,
+      -1.75,
+      -1.5707963267948966,
+      -1.0,
+      -0.5,
+      -0.0,
+      0.0,
+      3e-88,
+      0.125,
+      0.25,
+      0.375,
+      0.5,
+      1.0,
+      1.17549e-38,
+      1.56657e-37,
+      1.0000001,
+      1.25,
+      1.5707963267948966,
+      2,
+      3.1e7,
+      5.125,
+      6.25,
+      888,
+      982983.25,
+      2147483647.0,
+      2147483647.375,
+      2147483647.75,
+      2147483648.0,
+      2147483648.25,
+      2147483649.25,
+      9223372036854775808.0,  // INT64_MAX + 1
+      9223373136366403584.0,
+      18446744073709551616.0,  // UINT64_MAX + 1
+      2e66,
+      V8_INFINITY,
+      -V8_INFINITY,
+      std::numeric_limits<double>::quiet_NaN(),
+      -std::numeric_limits<double>::quiet_NaN()};
+
+  static constexpr Vector<const double> float64_vector() {
+    return ArrayVector(float64_array);
   }
 
-  static const std::vector<int32_t> int32_vector() {
-    std::vector<uint32_t> values = uint32_vector();
-    return std::vector<int32_t>(values.begin(), values.end());
+  static constexpr uint32_t uint32_array[] = {
+      0x00000000, 0x00000001, 0xFFFFFFFF, 0x1B09788B, 0x04C5FCE8, 0xCC0DE5BF,
+      // This row is useful for testing lea optimizations on intel.
+      0x00000002, 0x00000003, 0x00000004, 0x00000005, 0x00000008, 0x00000009,
+      0x273A798E, 0x187937A3, 0xECE3AF83, 0x5495A16B, 0x0B668ECC, 0x11223344,
+      0x0000009E, 0x00000043, 0x0000AF73, 0x0000116B, 0x00658ECC, 0x002B3B4C,
+      0x88776655, 0x70000000, 0x07200000, 0x7FFFFFFF, 0x56123761, 0x7FFFFF00,
+      0x761C4761, 0x80000000, 0x88888888, 0xA0000000, 0xDDDDDDDD, 0xE0000000,
+      0xEEEEEEEE, 0xFFFFFFFD, 0xF0000000, 0x007FFFFF, 0x003FFFFF, 0x001FFFFF,
+      0x000FFFFF, 0x0007FFFF, 0x0003FFFF, 0x0001FFFF, 0x0000FFFF, 0x00007FFF,
+      0x00003FFF, 0x00001FFF, 0x00000FFF, 0x000007FF, 0x000003FF, 0x000001FF,
+      // Bit pattern of a quiet NaN and signaling NaN, with or without
+      // additional payload.
+      0x7FC00000, 0x7F800000, 0x7FFFFFFF, 0x7F876543};
+
+  static constexpr Vector<const uint32_t> uint32_vector() {
+    return ArrayVector(uint32_array);
   }
 
-  static const std::vector<uint32_t> uint32_vector() {
-    static const uint32_t kValues[] = {
-        0x00000000, 0x00000001, 0xffffffff, 0x1b09788b, 0x04c5fce8, 0xcc0de5bf,
-        // This row is useful for testing lea optimizations on intel.
-        0x00000002, 0x00000003, 0x00000004, 0x00000005, 0x00000008, 0x00000009,
-        0x273a798e, 0x187937a3, 0xece3af83, 0x5495a16b, 0x0b668ecc, 0x11223344,
-        0x0000009e, 0x00000043, 0x0000af73, 0x0000116b, 0x00658ecc, 0x002b3b4c,
-        0x88776655, 0x70000000, 0x07200000, 0x7fffffff, 0x56123761, 0x7fffff00,
-        0x761c4761, 0x80000000, 0x88888888, 0xa0000000, 0xdddddddd, 0xe0000000,
-        0xeeeeeeee, 0xfffffffd, 0xf0000000, 0x007fffff, 0x003fffff, 0x001fffff,
-        0x000fffff, 0x0007ffff, 0x0003ffff, 0x0001ffff, 0x0000ffff, 0x00007fff,
-        0x00003fff, 0x00001fff, 0x00000fff, 0x000007ff, 0x000003ff, 0x000001ff};
-    return std::vector<uint32_t>(&kValues[0], &kValues[arraysize(kValues)]);
+  static constexpr Vector<const int32_t> int32_vector() {
+    return Vector<const int32_t>::cast(uint32_vector());
   }
 
-  static const std::vector<int64_t> int64_vector() {
-    std::vector<uint64_t> values = uint64_vector();
-    return std::vector<int64_t>(values.begin(), values.end());
+  static constexpr uint64_t uint64_array[] = {
+      0x00000000, 0x00000001, 0xFFFFFFFF, 0x1B09788B, 0x04C5FCE8, 0xCC0DE5BF,
+      0x00000002, 0x00000003, 0x00000004, 0x00000005, 0x00000008, 0x00000009,
+      0xFFFFFFFFFFFFFFFF, 0xFFFFFFFFFFFFFFFE, 0xFFFFFFFFFFFFFFFD,
+      0x0000000000000000, 0x0000000100000000, 0xFFFFFFFF00000000,
+      0x1B09788B00000000, 0x04C5FCE800000000, 0xCC0DE5BF00000000,
+      0x0000000200000000, 0x0000000300000000, 0x0000000400000000,
+      0x0000000500000000, 0x0000000800000000, 0x0000000900000000,
+      0x273A798E187937A3, 0xECE3AF835495A16B, 0x0B668ECC11223344, 0x0000009E,
+      0x00000043, 0x0000AF73, 0x0000116B, 0x00658ECC, 0x002B3B4C, 0x88776655,
+      0x70000000, 0x07200000, 0x7FFFFFFF, 0x56123761, 0x7FFFFF00,
+      0x761C4761EEEEEEEE, 0x80000000EEEEEEEE, 0x88888888DDDDDDDD,
+      0xA0000000DDDDDDDD, 0xDDDDDDDDAAAAAAAA, 0xE0000000AAAAAAAA,
+      0xEEEEEEEEEEEEEEEE, 0xFFFFFFFDEEEEEEEE, 0xF0000000DDDDDDDD,
+      0x007FFFFFDDDDDDDD, 0x003FFFFFAAAAAAAA, 0x001FFFFFAAAAAAAA, 0x000FFFFF,
+      0x0007FFFF, 0x0003FFFF, 0x0001FFFF, 0x0000FFFF, 0x00007FFF, 0x00003FFF,
+      0x00001FFF, 0x00000FFF, 0x000007FF, 0x000003FF, 0x000001FF,
+      0x00003FFFFFFFFFFF, 0x00001FFFFFFFFFFF, 0x00000FFFFFFFFFFF,
+      0x000007FFFFFFFFFF, 0x000003FFFFFFFFFF, 0x000001FFFFFFFFFF,
+      0x8000008000000000, 0x8000008000000001, 0x8000000000000400,
+      0x8000000000000401, 0x0000000000000020,
+      // Bit pattern of a quiet NaN and signaling NaN, with or without
+      // additional payload.
+      0x7FF8000000000000, 0x7FF0000000000000, 0x7FF8123456789ABC,
+      0x7FF7654321FEDCBA};
+
+  static constexpr Vector<const uint64_t> uint64_vector() {
+    return ArrayVector(uint64_array);
   }
 
-  static const std::vector<uint64_t> uint64_vector() {
-    static const uint64_t kValues[] = {
-        0x00000000,         0x00000001,         0xffffffff,
-        0x1b09788b,         0x04c5fce8,         0xcc0de5bf,
-        0x00000002,         0x00000003,         0x00000004,
-        0x00000005,         0x00000008,         0x00000009,
-        0xffffffffffffffff, 0xfffffffffffffffe, 0xfffffffffffffffd,
-        0x0000000000000000, 0x0000000100000000, 0xffffffff00000000,
-        0x1b09788b00000000, 0x04c5fce800000000, 0xcc0de5bf00000000,
-        0x0000000200000000, 0x0000000300000000, 0x0000000400000000,
-        0x0000000500000000, 0x0000000800000000, 0x0000000900000000,
-        0x273a798e187937a3, 0xece3af835495a16b, 0x0b668ecc11223344,
-        0x0000009e,         0x00000043,         0x0000af73,
-        0x0000116b,         0x00658ecc,         0x002b3b4c,
-        0x88776655,         0x70000000,         0x07200000,
-        0x7fffffff,         0x56123761,         0x7fffff00,
-        0x761c4761eeeeeeee, 0x80000000eeeeeeee, 0x88888888dddddddd,
-        0xa0000000dddddddd, 0xddddddddaaaaaaaa, 0xe0000000aaaaaaaa,
-        0xeeeeeeeeeeeeeeee, 0xfffffffdeeeeeeee, 0xf0000000dddddddd,
-        0x007fffffdddddddd, 0x003fffffaaaaaaaa, 0x001fffffaaaaaaaa,
-        0x000fffff,         0x0007ffff,         0x0003ffff,
-        0x0001ffff,         0x0000ffff,         0x00007fff,
-        0x00003fff,         0x00001fff,         0x00000fff,
-        0x000007ff,         0x000003ff,         0x000001ff,
-        0x00003fffffffffff, 0x00001fffffffffff, 0x00000fffffffffff,
-        0x000007ffffffffff, 0x000003ffffffffff, 0x000001ffffffffff,
-        0x8000008000000000, 0x8000008000000001, 0x8000000000000400,
-        0x8000000000000401, 0x0000000000000020};
-    return std::vector<uint64_t>(&kValues[0], &kValues[arraysize(kValues)]);
+  static constexpr Vector<const int64_t> int64_vector() {
+    return Vector<const int64_t>::cast(uint64_vector());
   }
 
-  static const std::vector<double> nan_vector(size_t limit = 0) {
-    static const double nan = std::numeric_limits<double>::quiet_NaN();
-    static const double values[] = {-nan,               -V8_INFINITY * -0.0,
-                                    -V8_INFINITY * 0.0, V8_INFINITY * -0.0,
-                                    V8_INFINITY * 0.0,  nan};
-    return std::vector<double>(&values[0], &values[arraysize(values)]);
+  static constexpr int16_t int16_array[] = {
+      0, 1, 2, INT16_MAX - 1, INT16_MAX, INT16_MIN, INT16_MIN + 1, -2, -1};
+
+  static constexpr Vector<const int16_t> int16_vector() {
+    return ArrayVector(int16_array);
   }
 
-  static const std::vector<int16_t> int16_vector() {
-    static const int16_t kValues[] = {
-        0, 1, 2, INT16_MAX - 1, INT16_MAX, INT16_MIN, INT16_MIN + 1, -2, -1};
-    return std::vector<int16_t>(&kValues[0], &kValues[arraysize(kValues)]);
+  static constexpr Vector<const uint16_t> uint16_vector() {
+    return Vector<const uint16_t>::cast(int16_vector());
   }
 
-  static const std::vector<uint16_t> uint16_vector() {
-    std::vector<int16_t> values = int16_vector();
-    return std::vector<uint16_t>(values.begin(), values.end());
+  static constexpr int8_t int8_array[] = {
+      0, 1, 2, INT8_MAX - 1, INT8_MAX, INT8_MIN, INT8_MIN + 1, -2, -1};
+
+  static constexpr Vector<const int8_t> int8_vector() {
+    return ArrayVector(int8_array);
   }
 
-  static const std::vector<int8_t> int8_vector() {
-    static const int8_t kValues[] = {
-        0, 1, 2, INT8_MAX - 1, INT8_MAX, INT8_MIN, INT8_MIN + 1, -2, -1};
-    return std::vector<int8_t>(&kValues[0], &kValues[arraysize(kValues)]);
+  static constexpr Vector<const uint8_t> uint8_vector() {
+    return Vector<const uint8_t>::cast(ArrayVector(int8_array));
   }
 
-  static const std::vector<uint8_t> uint8_vector() {
-    std::vector<int8_t> values = int8_vector();
-    return std::vector<uint8_t>(values.begin(), values.end());
-  }
+  static constexpr uint32_t ror_array[31] = {
+      1,  2,  3,  4,  5,  6,  7,  8,  9,  10, 11, 12, 13, 14, 15, 16,
+      17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31};
 
-  static const std::vector<uint32_t> ror_vector() {
-    static const uint32_t kValues[31] = {
-        1,  2,  3,  4,  5,  6,  7,  8,  9,  10, 11, 12, 13, 14, 15, 16,
-        17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31};
-    return std::vector<uint32_t>(&kValues[0], &kValues[arraysize(kValues)]);
+  static constexpr Vector<const uint32_t> ror_vector() {
+    return ArrayVector(ror_array);
   }
 };
 
 // Helper macros that can be used in FOR_INT32_INPUTS(i) { ... *i ... }
 // Watch out, these macros aren't hygenic; they pollute your scope. Thanks STL.
-#define FOR_INPUTS(ctype, itype, var)                          \
-  std::vector<ctype> var##_vec =                               \
-      ::v8::internal::compiler::ValueHelper::itype##_vector(); \
-  for (std::vector<ctype>::iterator var = var##_vec.begin();   \
-       var != var##_vec.end(); ++var)
+#define FOR_INPUTS(ctype, itype, var)                             \
+  Vector<const ctype> var##_vec =                                 \
+      ::v8::internal::compiler::ValueHelper::itype##_vector();    \
+  for (Vector<const ctype>::iterator var = var##_vec.begin(),     \
+                                     var##_end = var##_vec.end(); \
+       var != var##_end; ++var)
 
 #define FOR_INT32_INPUTS(var) FOR_INPUTS(int32_t, int32, var)
 #define FOR_UINT32_INPUTS(var) FOR_INPUTS(uint32_t, uint32, var)
diff --git a/src/v8/test/cctest/expression-type-collector-macros.h b/src/v8/test/cctest/expression-type-collector-macros.h
index 68d6948..39774f0 100644
--- a/src/v8/test/cctest/expression-type-collector-macros.h
+++ b/src/v8/test/cctest/expression-type-collector-macros.h
@@ -33,11 +33,11 @@
 #define CHECK_TYPE(type) CHECK(types[index].bounds.Narrows(type));
 #endif
 
-#define CHECK_EXPR(ekind, type)                  \
-  CHECK_LT(index, types.size());                 \
-  CHECK(strcmp(#ekind, types[index].kind) == 0); \
-  CHECK_EQ(depth, types[index].depth);           \
-  CHECK_TYPE(type);                              \
+#define CHECK_EXPR(ekind, type)                   \
+  CHECK_LT(index, types.size());                  \
+  CHECK_EQ(strcmp(#ekind, types[index].kind), 0); \
+  CHECK_EQ(depth, types[index].depth);            \
+  CHECK_TYPE(type);                               \
   for (int j = (++depth, ++index, 0); j < 1 ? 1 : (--depth, 0); ++j)
 
 #define CHECK_VAR(vname, type)                                     \
diff --git a/src/v8/test/cctest/ffi/test-ffi.cc b/src/v8/test/cctest/ffi/test-ffi.cc
deleted file mode 100644
index 9d87244..0000000
--- a/src/v8/test/cctest/ffi/test-ffi.cc
+++ /dev/null
@@ -1,222 +0,0 @@
-// Copyright 2017 the V8 project authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "src/api.h"
-#include "src/codegen.h"
-#include "src/ffi/ffi-compiler.h"
-#include "src/objects-inl.h"
-#include "test/cctest/cctest.h"
-
-namespace v8 {
-namespace internal {
-namespace ffi {
-
-static void hello_world() { printf("hello world from native code\n"); }
-
-TEST(Run_FFI_Hello) {
-  Isolate* isolate = CcTest::InitIsolateOnce();
-  HandleScope scope(isolate);
-
-  Handle<String> name =
-      isolate->factory()->InternalizeUtf8String("hello_world");
-  Handle<Object> undefined = isolate->factory()->undefined_value();
-
-  AccountingAllocator allocator;
-  Zone zone(&allocator, ZONE_NAME);
-  FFISignature::Builder sig_builder(&zone, 0, 0);
-  NativeFunction func = {sig_builder.Build(),
-                         reinterpret_cast<uint8_t*>(hello_world)};
-
-  Handle<JSFunction> jsfunc = CompileJSToNativeWrapper(isolate, name, func);
-
-  Handle<Object> result =
-      Execution::Call(isolate, jsfunc, undefined, 0, nullptr).ToHandleChecked();
-
-  CHECK(result->IsUndefined(isolate));
-}
-
-static int add2(int x, int y) { return x + y; }
-
-TEST(Run_FFI_add2) {
-  Isolate* isolate = CcTest::InitIsolateOnce();
-  HandleScope scope(isolate);
-
-  Handle<String> name = isolate->factory()->InternalizeUtf8String("add2");
-  Handle<Object> undefined = isolate->factory()->undefined_value();
-
-  AccountingAllocator allocator;
-  Zone zone(&allocator, ZONE_NAME);
-  FFISignature::Builder sig_builder(&zone, 1, 2);
-  sig_builder.AddReturn(FFIType::kInt32);
-  sig_builder.AddParam(FFIType::kInt32);
-  sig_builder.AddParam(FFIType::kInt32);
-  NativeFunction func = {sig_builder.Build(), reinterpret_cast<uint8_t*>(add2)};
-
-  Handle<JSFunction> jsfunc = CompileJSToNativeWrapper(isolate, name, func);
-
-  // Simple math should work.
-  {
-    Handle<Object> args[] = {isolate->factory()->NewNumber(1.0),
-                             isolate->factory()->NewNumber(41.0)};
-    Handle<Object> result =
-        Execution::Call(isolate, jsfunc, undefined, arraysize(args), args)
-            .ToHandleChecked();
-    CHECK_EQ(42.0, result->Number());
-  }
-
-  // Truncate floating point to integer.
-  {
-    Handle<Object> args[] = {isolate->factory()->NewNumber(1.9),
-                             isolate->factory()->NewNumber(41.0)};
-    Handle<Object> result =
-        Execution::Call(isolate, jsfunc, undefined, arraysize(args), args)
-            .ToHandleChecked();
-    CHECK_EQ(42.0, result->Number());
-  }
-
-  // INT_MAX + 1 should wrap.
-  {
-    Handle<Object> args[] = {isolate->factory()->NewNumber(kMaxInt),
-                             isolate->factory()->NewNumber(1)};
-    Handle<Object> result =
-        Execution::Call(isolate, jsfunc, undefined, arraysize(args), args)
-            .ToHandleChecked();
-    CHECK_EQ(kMinInt, result->Number());
-  }
-
-  // INT_MIN + -1 should wrap.
-  {
-    Handle<Object> args[] = {isolate->factory()->NewNumber(kMinInt),
-                             isolate->factory()->NewNumber(-1)};
-    Handle<Object> result =
-        Execution::Call(isolate, jsfunc, undefined, arraysize(args), args)
-            .ToHandleChecked();
-    CHECK_EQ(kMaxInt, result->Number());
-  }
-
-  // Numbers get truncated to the 32 least significant bits.
-  {
-    Handle<Object> args[] = {isolate->factory()->NewNumber(1ull << 40),
-                             isolate->factory()->NewNumber(-1)};
-    Handle<Object> result =
-        Execution::Call(isolate, jsfunc, undefined, arraysize(args), args)
-            .ToHandleChecked();
-    CHECK_EQ(-1, result->Number());
-  }
-
-  // String '57' converts to 57.
-  {
-    Handle<Object> args[] = {
-        isolate->factory()->NewStringFromAsciiChecked("57"),
-        isolate->factory()->NewNumber(41.0)};
-    Handle<Object> result =
-        Execution::Call(isolate, jsfunc, undefined, arraysize(args), args)
-            .ToHandleChecked();
-    CHECK_EQ(98.0, result->Number());
-  }
-
-  // String 'foo' converts to 0.
-  {
-    Handle<Object> args[] = {
-        isolate->factory()->NewStringFromAsciiChecked("foo"),
-        isolate->factory()->NewNumber(41.0)};
-    Handle<Object> result =
-        Execution::Call(isolate, jsfunc, undefined, arraysize(args), args)
-            .ToHandleChecked();
-    CHECK_EQ(41.0, result->Number());
-  }
-
-  // String '58o' converts to 0.
-  {
-    Handle<Object> args[] = {
-        isolate->factory()->NewStringFromAsciiChecked("58o"),
-        isolate->factory()->NewNumber(41.0)};
-    Handle<Object> result =
-        Execution::Call(isolate, jsfunc, undefined, arraysize(args), args)
-            .ToHandleChecked();
-    CHECK_EQ(41.0, result->Number());
-  }
-
-  // NaN converts to 0.
-  {
-    Handle<Object> args[] = {isolate->factory()->nan_value(),
-                             isolate->factory()->NewNumber(41.0)};
-    Handle<Object> result =
-        Execution::Call(isolate, jsfunc, undefined, arraysize(args), args)
-            .ToHandleChecked();
-    CHECK_EQ(41.0, result->Number());
-  }
-
-  // null converts to 0.
-  {
-    Handle<Object> args[] = {isolate->factory()->null_value(),
-                             isolate->factory()->NewNumber(41.0)};
-    Handle<Object> result =
-        Execution::Call(isolate, jsfunc, undefined, arraysize(args), args)
-            .ToHandleChecked();
-    CHECK_EQ(41.0, result->Number());
-  }
-}
-
-static int add6(int a, int b, int c, int d, int e, int f) {
-  return a + b + c + d + e + f;
-}
-
-TEST(Run_FFI_add6) {
-  Isolate* isolate = CcTest::InitIsolateOnce();
-  HandleScope scope(isolate);
-
-  Handle<String> name = isolate->factory()->InternalizeUtf8String("add6");
-  Handle<Object> undefined = isolate->factory()->undefined_value();
-
-  AccountingAllocator allocator;
-  Zone zone(&allocator, ZONE_NAME);
-  FFISignature::Builder sig_builder(&zone, 1, 7);
-  sig_builder.AddReturn(FFIType::kInt32);
-  for (int i = 0; i < 7; i++) {
-    sig_builder.AddParam(FFIType::kInt32);
-  }
-  NativeFunction func = {sig_builder.Build(), reinterpret_cast<uint8_t*>(add6)};
-
-  Handle<JSFunction> jsfunc = CompileJSToNativeWrapper(isolate, name, func);
-  Handle<Object> args[] = {
-      isolate->factory()->NewNumber(1), isolate->factory()->NewNumber(2),
-      isolate->factory()->NewNumber(3), isolate->factory()->NewNumber(4),
-      isolate->factory()->NewNumber(5), isolate->factory()->NewNumber(6)};
-
-  Handle<Object> result =
-      Execution::Call(isolate, jsfunc, undefined, arraysize(args), args)
-          .ToHandleChecked();
-
-  CHECK_EQ(21.0, result->Number());
-
-  {
-    // Ensure builtin frames are generated
-    FLAG_allow_natives_syntax = true;
-    v8::Local<v8::Value> res = CompileRun(
-        "var o = { valueOf: function() { %DebugTrace(); return 1; } }; o;");
-    Handle<JSReceiver> param(v8::Utils::OpenHandle(v8::Object::Cast(*res)));
-    Handle<Object> args[] = {param,
-                             isolate->factory()->NewNumber(2),
-                             isolate->factory()->NewNumber(3),
-                             isolate->factory()->NewNumber(4),
-                             isolate->factory()->NewNumber(5),
-                             isolate->factory()->NewNumber(6),
-                             isolate->factory()->NewNumber(21)};
-
-    Handle<Object> result =
-        Execution::Call(isolate, jsfunc, undefined, arraysize(args), args)
-            .ToHandleChecked();
-    CHECK_EQ(21.0, result->Number());
-    CHECK_EQ(
-        1.0,
-        res->NumberValue(
-               reinterpret_cast<v8::Isolate*>(isolate)->GetCurrentContext())
-            .ToChecked());
-  }
-}
-
-}  // namespace ffi
-}  // namespace internal
-}  // namespace v8
diff --git a/src/v8/test/cctest/gay-fixed.cc b/src/v8/test/cctest/gay-fixed.cc
index 86ebb24..75c872f 100644
--- a/src/v8/test/cctest/gay-fixed.cc
+++ b/src/v8/test/cctest/gay-fixed.cc
@@ -27,7 +27,7 @@
 
 // This file contains 100.000 decimal representations of random doubles. They
 // have been generated using Gay's dtoa to produce the fixed representation:
-//         dtoa(v, 3, number_digits, &decimal_point, &sign, NULL);
+//         dtoa(v, 3, number_digits, &decimal_point, &sign, nullptr);
 
 #include "src/v8.h"
 
diff --git a/src/v8/test/cctest/gay-precision.cc b/src/v8/test/cctest/gay-precision.cc
index 68d29f8..0661e92 100644
--- a/src/v8/test/cctest/gay-precision.cc
+++ b/src/v8/test/cctest/gay-precision.cc
@@ -27,7 +27,7 @@
 
 // This file contains 100.000 decimal representations of random doubles. They
 // have been generated using Gay's dtoa to produce the precision representation:
-//         dtoa(v, 2, number_digits, &decimal_point, &sign, NULL);
+//         dtoa(v, 2, number_digits, &decimal_point, &sign, nullptr);
 
 #include "src/v8.h"
 
diff --git a/src/v8/test/cctest/gay-shortest.cc b/src/v8/test/cctest/gay-shortest.cc
index 4560553..b810fd2 100644
--- a/src/v8/test/cctest/gay-shortest.cc
+++ b/src/v8/test/cctest/gay-shortest.cc
@@ -27,7 +27,7 @@
 
 // This file contains 100.000 decimal representations of random doubles. They
 // have been generated using Gay's dtoa to produce the shortest representation:
-//          decimal_rep = dtoa(v, 0, 0, &decimal_point, &sign, NULL);
+//          decimal_rep = dtoa(v, 0, 0, &decimal_point, &sign, nullptr);
 
 #include "src/v8.h"
 
diff --git a/src/v8/test/cctest/heap/heap-tester.h b/src/v8/test/cctest/heap/heap-tester.h
index 926a750..b7cab9e 100644
--- a/src/v8/test/cctest/heap/heap-tester.h
+++ b/src/v8/test/cctest/heap/heap-tester.h
@@ -40,6 +40,9 @@
   V(Regress658718)                                        \
   V(Regress670675)                                        \
   V(Regress5831)                                          \
+  V(Regress777177)                                        \
+  V(Regress791582)                                        \
+  V(Regress779503)                                        \
   V(RegressMissingWriteBarrierInAllocate)                 \
   V(WriteBarriersInCopyJSObject)
 
diff --git a/src/v8/test/cctest/heap/heap-utils.cc b/src/v8/test/cctest/heap/heap-utils.cc
index 6e92b96..433097e 100644
--- a/src/v8/test/cctest/heap/heap-utils.cc
+++ b/src/v8/test/cctest/heap/heap-utils.cc
@@ -20,7 +20,7 @@
   heap->CollectAllGarbage(Heap::kFinalizeIncrementalMarkingMask,
                           GarbageCollectionReason::kTesting);
   heap->mark_compact_collector()->EnsureSweepingCompleted();
-  heap->old_space()->EmptyAllocationInfo();
+  heap->old_space()->FreeLinearAllocationArea();
   for (Page* page : *heap->old_space()) {
     page->MarkNeverAllocateForTesting();
   }
@@ -68,11 +68,10 @@
   int length;
   int free_memory = padding_size;
   if (tenure == i::TENURED) {
-    heap->old_space()->EmptyAllocationInfo();
+    heap->old_space()->FreeLinearAllocationArea();
     int overall_free_memory = static_cast<int>(heap->old_space()->Available());
     CHECK(padding_size <= overall_free_memory || overall_free_memory == 0);
   } else {
-    heap->new_space()->DisableInlineAllocationSteps();
     int overall_free_memory =
         static_cast<int>(*heap->new_space()->allocation_limit_address() -
                          *heap->new_space()->allocation_top_address());
@@ -105,7 +104,7 @@
 
 void AllocateAllButNBytes(v8::internal::NewSpace* space, int extra_bytes,
                           std::vector<Handle<FixedArray>>* out_handles) {
-  space->DisableInlineAllocationSteps();
+  PauseAllocationObserversScope pause_observers(space->heap());
   int space_remaining = static_cast<int>(*space->allocation_limit_address() -
                                          *space->allocation_top_address());
   CHECK(space_remaining >= extra_bytes);
@@ -124,7 +123,7 @@
 
 bool FillUpOnePage(v8::internal::NewSpace* space,
                    std::vector<Handle<FixedArray>>* out_handles) {
-  space->DisableInlineAllocationSteps();
+  PauseAllocationObserversScope pause_observers(space->heap());
   int space_remaining = static_cast<int>(*space->allocation_limit_address() -
                                          *space->allocation_top_address());
   if (space_remaining == 0) return false;
@@ -162,7 +161,7 @@
 
   while (!marking->IsComplete()) {
     marking->Step(i::MB, i::IncrementalMarking::NO_GC_VIA_STACK_GUARD,
-                  i::IncrementalMarking::FORCE_COMPLETION, i::StepOrigin::kV8);
+                  i::StepOrigin::kV8);
     if (marking->IsReadyToOverApproximateWeakClosure()) {
       marking->FinalizeIncrementally();
     }
@@ -171,16 +170,17 @@
 }
 
 void SimulateFullSpace(v8::internal::PagedSpace* space) {
+  CodeSpaceMemoryModificationScope modification_scope(space->heap());
   i::MarkCompactCollector* collector = space->heap()->mark_compact_collector();
   if (collector->sweeping_in_progress()) {
     collector->EnsureSweepingCompleted();
   }
-  space->EmptyAllocationInfo();
+  space->FreeLinearAllocationArea();
   space->ResetFreeList();
 }
 
 void AbandonCurrentlyFreeMemory(PagedSpace* space) {
-  space->EmptyAllocationInfo();
+  space->FreeLinearAllocationArea();
   for (Page* page : *space) {
     page->MarkNeverAllocateForTesting();
   }
@@ -204,7 +204,7 @@
     int remaining = static_cast<int>(limit - top);
     space->heap()->CreateFillerObjectAt(top, remaining,
                                         ClearRecordedSlots::kNo);
-    space->EmptyAllocationInfo();
+    space->FreeLinearAllocationArea();
   }
 }
 
diff --git a/src/v8/test/cctest/heap/test-alloc.cc b/src/v8/test/cctest/heap/test-alloc.cc
index 06aec9a..4cf4a44 100644
--- a/src/v8/test/cctest/heap/test-alloc.cc
+++ b/src/v8/test/cctest/heap/test-alloc.cc
@@ -84,8 +84,8 @@
   // Test that we can allocate in old pointer space and code space.
   heap::SimulateFullSpace(heap->code_space());
   heap->AllocateFixedArray(100, TENURED).ToObjectChecked();
-  heap->CopyCode(CcTest::i_isolate()->builtins()->builtin(
-      Builtins::kIllegal)).ToObjectChecked();
+  Code* illegal = CcTest::i_isolate()->builtins()->builtin(Builtins::kIllegal);
+  heap->CopyCode(illegal, illegal->code_data_container()).ToObjectChecked();
 
   // Return success.
   return heap->true_value();
@@ -129,8 +129,7 @@
 Handle<AccessorInfo> TestAccessorInfo(
       Isolate* isolate, PropertyAttributes attributes) {
   Handle<String> name = isolate->factory()->NewStringFromStaticChars("get");
-  return Accessors::MakeAccessor(isolate, name, &TestGetter, &TestSetter,
-                                 attributes);
+  return Accessors::MakeAccessor(isolate, name, &TestGetter, &TestSetter);
 }
 
 
@@ -140,8 +139,8 @@
   v8::HandleScope scope(CcTest::isolate());
   v8::Local<v8::Context> env = v8::Context::New(CcTest::isolate());
   env->Enter();
-  Handle<JSFunction> function = factory->NewFunction(
-      factory->function_string());
+  Handle<JSFunction> function =
+      factory->NewFunctionForTest(factory->function_string());
   // Force the creation of an initial map and set the code to
   // something empty.
   factory->NewJSObject(function);
@@ -229,6 +228,7 @@
       // kMaxRegularHeapObjectSize.
       size_t requested = (kMaxRegularHeapObjectSize << (Pseudorandom() % 3)) +
                          Pseudorandom() % 5000 + 1;
+      requested = RoundUp(requested, MemoryAllocator::GetCommitPageSize());
       size_t allocated = 0;
 
       // The request size has to be at least 2 code guard pages larger than the
@@ -236,7 +236,7 @@
       Address base = code_range.AllocateRawMemory(
           requested, requested - (2 * MemoryAllocator::CodePageGuardSize()),
           &allocated);
-      CHECK(base != NULL);
+      CHECK_NOT_NULL(base);
       blocks.emplace_back(base, static_cast<int>(allocated));
       current_allocated += static_cast<int>(allocated);
       total_allocated += static_cast<int>(allocated);
diff --git a/src/v8/test/cctest/heap/test-array-buffer-tracker.cc b/src/v8/test/cctest/heap/test-array-buffer-tracker.cc
index 73286f3..f3907a0 100644
--- a/src/v8/test/cctest/heap/test-array-buffer-tracker.cc
+++ b/src/v8/test/cctest/heap/test-array-buffer-tracker.cc
@@ -335,6 +335,7 @@
              Page::FromAddress(buf2->address()));
     heap::GcAndSweep(heap, OLD_SPACE);
   }
+  isolate->Dispose();
 }
 
 TEST(ArrayBuffer_RetainedSizeIncreases) {
diff --git a/src/v8/test/cctest/heap/test-compaction.cc b/src/v8/test/cctest/heap/test-compaction.cc
index d98aa1f..06ac948 100644
--- a/src/v8/test/cctest/heap/test-compaction.cc
+++ b/src/v8/test/cctest/heap/test-compaction.cc
@@ -5,13 +5,7 @@
 #include "src/factory.h"
 #include "src/heap/mark-compact.h"
 #include "src/isolate.h"
-// FIXME(mstarzinger, marja): This is weird, but required because of the missing
-// (disallowed) include: src/factory.h -> src/objects-inl.h
 #include "src/objects-inl.h"
-// FIXME(mstarzinger, marja): This is weird, but required because of the missing
-// (disallowed) include: src/feedback-vector.h ->
-// src/feedback-vector-inl.h
-#include "src/feedback-vector-inl.h"
 #include "test/cctest/cctest.h"
 #include "test/cctest/heap/heap-tester.h"
 #include "test/cctest/heap/heap-utils.h"
@@ -52,9 +46,7 @@
 
   // Disable concurrent sweeping to ensure memory is in an expected state, i.e.,
   // we can reach the state of a half aborted page.
-  FLAG_concurrent_sweeping = false;
-  FLAG_concurrent_marking = false;
-  FLAG_stress_incremental_marking = false;
+  ManualGCScope manual_gc_scope;
   FLAG_manual_evacuation_candidates_selection = true;
   CcTest::InitializeVM();
   Isolate* isolate = CcTest::i_isolate();
@@ -97,9 +89,7 @@
 
   // Disable concurrent sweeping to ensure memory is in an expected state, i.e.,
   // we can reach the state of a half aborted page.
-  FLAG_concurrent_sweeping = false;
-  FLAG_concurrent_marking = false;
-  FLAG_stress_incremental_marking = false;
+  ManualGCScope manual_gc_scope;
   FLAG_manual_evacuation_candidates_selection = true;
 
   const int objects_per_page = 10;
@@ -174,9 +164,7 @@
 
   // Disable concurrent sweeping to ensure memory is in an expected state, i.e.,
   // we can reach the state of a half aborted page.
-  FLAG_concurrent_sweeping = false;
-  FLAG_concurrent_marking = false;
-  FLAG_stress_incremental_marking = false;
+  ManualGCScope manual_gc_scope;
   FLAG_manual_evacuation_candidates_selection = true;
 
   const int objects_per_page = 10;
@@ -264,9 +252,7 @@
 
   // Disable concurrent sweeping to ensure memory is in an expected state, i.e.,
   // we can reach the state of a half aborted page.
-  FLAG_concurrent_sweeping = false;
-  FLAG_concurrent_marking = false;
-  FLAG_stress_incremental_marking = false;
+  ManualGCScope manual_gc_scope;
   FLAG_manual_evacuation_candidates_selection = true;
 
   const int objects_per_page = 10;
@@ -353,7 +339,7 @@
       Address broken_address = holder->address() + 2 * kPointerSize + 1;
       // Convert it to a vector to create a string from it.
       Vector<const uint8_t> string_to_broken_addresss(
-          reinterpret_cast<const uint8_t*>(&broken_address), 8);
+          reinterpret_cast<const uint8_t*>(&broken_address), kPointerSize);
 
       Handle<String> string;
       do {
diff --git a/src/v8/test/cctest/heap/test-concurrent-marking.cc b/src/v8/test/cctest/heap/test-concurrent-marking.cc
index 36bf49c..5ee99c6 100644
--- a/src/v8/test/cctest/heap/test-concurrent-marking.cc
+++ b/src/v8/test/cctest/heap/test-concurrent-marking.cc
@@ -31,12 +31,20 @@
   if (!i::FLAG_concurrent_marking) return;
   CcTest::InitializeVM();
   Heap* heap = CcTest::heap();
-  ConcurrentMarking::MarkingWorklist shared, bailout;
+  CcTest::CollectAllGarbage();
+  if (!heap->incremental_marking()->IsStopped()) return;
+  MarkCompactCollector* collector = CcTest::heap()->mark_compact_collector();
+  if (collector->sweeping_in_progress()) {
+    collector->EnsureSweepingCompleted();
+  }
+
+  ConcurrentMarking::MarkingWorklist shared, bailout, on_hold;
   WeakObjects weak_objects;
   ConcurrentMarking* concurrent_marking =
-      new ConcurrentMarking(heap, &shared, &bailout, &weak_objects);
+      new ConcurrentMarking(heap, &shared, &bailout, &on_hold, &weak_objects);
   PublishSegment(&shared, heap->undefined_value());
   concurrent_marking->ScheduleTasks();
+  concurrent_marking->WaitForTasks();
   concurrent_marking->EnsureCompleted();
   delete concurrent_marking;
 }
@@ -45,19 +53,43 @@
   if (!i::FLAG_concurrent_marking) return;
   CcTest::InitializeVM();
   Heap* heap = CcTest::heap();
-  ConcurrentMarking::MarkingWorklist shared, bailout;
+  CcTest::CollectAllGarbage();
+  if (!heap->incremental_marking()->IsStopped()) return;
+  MarkCompactCollector* collector = CcTest::heap()->mark_compact_collector();
+  if (collector->sweeping_in_progress()) {
+    collector->EnsureSweepingCompleted();
+  }
+
+  ConcurrentMarking::MarkingWorklist shared, bailout, on_hold;
   WeakObjects weak_objects;
   ConcurrentMarking* concurrent_marking =
-      new ConcurrentMarking(heap, &shared, &bailout, &weak_objects);
+      new ConcurrentMarking(heap, &shared, &bailout, &on_hold, &weak_objects);
   PublishSegment(&shared, heap->undefined_value());
   concurrent_marking->ScheduleTasks();
+  concurrent_marking->WaitForTasks();
   concurrent_marking->EnsureCompleted();
   PublishSegment(&shared, heap->undefined_value());
   concurrent_marking->RescheduleTasksIfNeeded();
+  concurrent_marking->WaitForTasks();
   concurrent_marking->EnsureCompleted();
   delete concurrent_marking;
 }
 
+TEST(ConcurrentMarkingMarkedBytes) {
+  if (!i::FLAG_concurrent_marking) return;
+  CcTest::InitializeVM();
+  Isolate* isolate = CcTest::i_isolate();
+  Heap* heap = CcTest::heap();
+  HandleScope sc(isolate);
+  Handle<FixedArray> root = isolate->factory()->NewFixedArray(1000000);
+  CcTest::CollectAllGarbage();
+  if (!heap->incremental_marking()->IsStopped()) return;
+  heap::SimulateIncrementalMarking(heap, false);
+  heap->concurrent_marking()->WaitForTasks();
+  heap->concurrent_marking()->EnsureCompleted();
+  CHECK_GE(heap->concurrent_marking()->TotalMarkedBytes(), root->Size());
+}
+
 }  // namespace heap
 }  // namespace internal
 }  // namespace v8
diff --git a/src/v8/test/cctest/heap/test-embedder-tracing.cc b/src/v8/test/cctest/heap/test-embedder-tracing.cc
new file mode 100644
index 0000000..82e4e3d
--- /dev/null
+++ b/src/v8/test/cctest/heap/test-embedder-tracing.cc
@@ -0,0 +1,197 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "include/v8.h"
+#include "src/api.h"
+#include "src/objects-inl.h"
+#include "src/objects/module.h"
+#include "src/objects/script.h"
+#include "src/objects/shared-function-info.h"
+#include "test/cctest/cctest.h"
+
+namespace v8 {
+namespace internal {
+namespace heap {
+
+namespace {
+
+v8::Local<v8::Object> ConstructTraceableJSApiObject(
+    v8::Local<v8::Context> context, void* first_field, void* second_field) {
+  v8::EscapableHandleScope scope(context->GetIsolate());
+  v8::Local<v8::FunctionTemplate> function_t =
+      v8::FunctionTemplate::New(context->GetIsolate());
+  v8::Local<v8::ObjectTemplate> instance_t = function_t->InstanceTemplate();
+  instance_t->SetInternalFieldCount(2);
+  v8::Local<v8::Function> function =
+      function_t->GetFunction(context).ToLocalChecked();
+  v8::Local<v8::Object> instance =
+      function->NewInstance(context).ToLocalChecked();
+  instance->SetAlignedPointerInInternalField(0, first_field);
+  instance->SetAlignedPointerInInternalField(1, second_field);
+  CHECK(!instance.IsEmpty());
+  i::Handle<i::JSReceiver> js_obj = v8::Utils::OpenHandle(*instance);
+  CHECK_EQ(i::JS_API_OBJECT_TYPE, js_obj->map()->instance_type());
+  return scope.Escape(instance);
+}
+
+class TestEmbedderHeapTracer final : public v8::EmbedderHeapTracer {
+ public:
+  explicit TestEmbedderHeapTracer(v8::Isolate* isolate) : isolate_(isolate) {}
+
+  void RegisterV8References(
+      const std::vector<std::pair<void*, void*>>& embedder_fields) final {
+    registered_from_v8_.insert(registered_from_v8_.end(),
+                               embedder_fields.begin(), embedder_fields.end());
+  }
+
+  void AddReferenceForTracing(v8::Persistent<v8::Object>* persistent) {
+    to_register_with_v8_.push_back(persistent);
+  }
+
+  bool AdvanceTracing(double deadline_in_ms,
+                      AdvanceTracingActions actions) final {
+    for (auto persistent : to_register_with_v8_) {
+      persistent->RegisterExternalReference(isolate_);
+    }
+    to_register_with_v8_.clear();
+    return false;
+  }
+
+  void TracePrologue() final {}
+  void TraceEpilogue() final {}
+  void AbortTracing() final {}
+  void EnterFinalPause() final {}
+
+  bool IsRegisteredFromV8(void* first_field) const {
+    for (auto pair : registered_from_v8_) {
+      if (pair.first == first_field) return true;
+    }
+    return false;
+  }
+
+ private:
+  v8::Isolate* const isolate_;
+  std::vector<std::pair<void*, void*>> registered_from_v8_;
+  std::vector<v8::Persistent<v8::Object>*> to_register_with_v8_;
+};
+
+}  // namespace
+
+TEST(V8RegisteringEmbedderReference) {
+  // Tests that wrappers are properly registered with the embedder heap
+  // tracer.
+  ManualGCScope manual_gc;
+  CcTest::InitializeVM();
+  v8::Isolate* isolate = CcTest::isolate();
+  TestEmbedderHeapTracer tracer(isolate);
+  isolate->SetEmbedderHeapTracer(&tracer);
+  v8::HandleScope scope(isolate);
+  v8::Local<v8::Context> context = v8::Context::New(isolate);
+  v8::Context::Scope context_scope(context);
+
+  void* first_field = reinterpret_cast<void*>(0x2);
+  v8::Local<v8::Object> api_object =
+      ConstructTraceableJSApiObject(context, first_field, nullptr);
+  CHECK(!api_object.IsEmpty());
+  CcTest::CollectGarbage(i::OLD_SPACE);
+  CHECK(tracer.IsRegisteredFromV8(first_field));
+}
+
+TEST(EmbedderRegisteringV8Reference) {
+  // Tests that references that are registered by the embedder heap tracer are
+  // considered live by V8.
+  ManualGCScope manual_gc;
+  CcTest::InitializeVM();
+  v8::Isolate* isolate = CcTest::isolate();
+  TestEmbedderHeapTracer tracer(isolate);
+  isolate->SetEmbedderHeapTracer(&tracer);
+  v8::HandleScope scope(isolate);
+  v8::Local<v8::Context> context = v8::Context::New(isolate);
+  v8::Context::Scope context_scope(context);
+
+  v8::Persistent<v8::Object> g;
+  {
+    v8::HandleScope inner_scope(isolate);
+    v8::Local<v8::Object> o =
+        v8::Local<v8::Object>::New(isolate, v8::Object::New(isolate));
+    g.Reset(isolate, o);
+    g.SetWeak();
+  }
+  tracer.AddReferenceForTracing(&g);
+  CcTest::CollectGarbage(i::OLD_SPACE);
+  CHECK(!g.IsEmpty());
+}
+
+namespace {
+
+void ResurrectingFinalizer(
+    const v8::WeakCallbackInfo<v8::Global<v8::Object>>& data) {
+  data.GetParameter()->ClearWeak();
+}
+
+}  // namespace
+
+TEST(TracingInRevivedSubgraph) {
+  // Tests that wrappers are traced when they are contained with in a subgraph
+  // that is revived by a finalizer.
+  ManualGCScope manual_gc;
+  CcTest::InitializeVM();
+  v8::Isolate* isolate = CcTest::isolate();
+  TestEmbedderHeapTracer tracer(isolate);
+  isolate->SetEmbedderHeapTracer(&tracer);
+  v8::HandleScope scope(isolate);
+  v8::Local<v8::Context> context = v8::Context::New(isolate);
+  v8::Context::Scope context_scope(context);
+
+  v8::Global<v8::Object> g;
+  void* first_field = reinterpret_cast<void*>(0x4);
+  {
+    v8::HandleScope inner_scope(isolate);
+    v8::Local<v8::Object> api_object =
+        ConstructTraceableJSApiObject(context, first_field, nullptr);
+    CHECK(!api_object.IsEmpty());
+    v8::Local<v8::Object> o =
+        v8::Local<v8::Object>::New(isolate, v8::Object::New(isolate));
+    o->Set(context, v8_str("link"), api_object).FromJust();
+    g.Reset(isolate, o);
+    g.SetWeak(&g, ResurrectingFinalizer, v8::WeakCallbackType::kFinalizer);
+  }
+  CcTest::CollectGarbage(i::OLD_SPACE);
+  CHECK(tracer.IsRegisteredFromV8(first_field));
+}
+
+TEST(TracingInEphemerons) {
+  // Tests that wrappers that are part of ephemerons are traced.
+  ManualGCScope manual_gc;
+  CcTest::InitializeVM();
+  v8::Isolate* isolate = CcTest::isolate();
+  TestEmbedderHeapTracer tracer(isolate);
+  isolate->SetEmbedderHeapTracer(&tracer);
+  v8::HandleScope scope(isolate);
+  v8::Local<v8::Context> context = v8::Context::New(isolate);
+  v8::Context::Scope context_scope(context);
+
+  v8::Local<v8::Object> key =
+      v8::Local<v8::Object>::New(isolate, v8::Object::New(isolate));
+  void* first_field = reinterpret_cast<void*>(0x8);
+  i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate);
+  Handle<JSWeakMap> weak_map = i_isolate->factory()->NewJSWeakMap();
+  {
+    v8::HandleScope inner_scope(isolate);
+    v8::Local<v8::Object> api_object =
+        ConstructTraceableJSApiObject(context, first_field, nullptr);
+    CHECK(!api_object.IsEmpty());
+    Handle<JSObject> js_key =
+        handle(JSObject::cast(*v8::Utils::OpenHandle(*key)));
+    Handle<JSReceiver> js_api_object = v8::Utils::OpenHandle(*api_object);
+    int32_t hash = js_key->GetOrCreateHash(i_isolate)->value();
+    JSWeakCollection::Set(weak_map, js_key, js_api_object, hash);
+  }
+  CcTest::CollectGarbage(i::OLD_SPACE);
+  CHECK(tracer.IsRegisteredFromV8(first_field));
+}
+
+}  // namespace heap
+}  // namespace internal
+}  // namespace v8
diff --git a/src/v8/test/cctest/heap/test-heap.cc b/src/v8/test/cctest/heap/test-heap.cc
index ab2ba1a..d14d39b 100644
--- a/src/v8/test/cctest/heap/test-heap.cc
+++ b/src/v8/test/cctest/heap/test-heap.cc
@@ -200,9 +200,11 @@
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
 
-  Code* tmp = nullptr;
-  heap->CopyCode(*code).To(&tmp);
-  Handle<Code> copy(tmp);
+  Handle<Code> copy;
+  {
+    CodeSpaceMemoryModificationScope modification_scope(isolate->heap());
+    copy = factory->CopyCode(code);
+  }
 
   CheckEmbeddedObjectsAreEqual(code, copy);
   CcTest::CollectAllAvailableGarbage();
@@ -213,7 +215,7 @@
   // Test FindCodeObject
 #define __ assm.
 
-  Assembler assm(isolate, NULL, 0);
+  Assembler assm(isolate, nullptr, 0);
 
   __ nop();  // supported on all architectures
 
@@ -363,12 +365,15 @@
   {
     HandleScope inner_scope(isolate);
     // Allocate a function and keep it in global object's property.
-    Handle<JSFunction> function = factory->NewFunction(name);
-    JSReceiver::SetProperty(global, name, function, SLOPPY).Check();
+    Handle<JSFunction> function = factory->NewFunctionForTest(name);
+    JSReceiver::SetProperty(global, name, function, LanguageMode::kSloppy)
+        .Check();
     // Allocate an object.  Unrooted after leaving the scope.
     Handle<JSObject> obj = factory->NewJSObject(function);
-    JSReceiver::SetProperty(obj, prop_name, twenty_three, SLOPPY).Check();
-    JSReceiver::SetProperty(obj, prop_namex, twenty_four, SLOPPY).Check();
+    JSReceiver::SetProperty(obj, prop_name, twenty_three, LanguageMode::kSloppy)
+        .Check();
+    JSReceiver::SetProperty(obj, prop_namex, twenty_four, LanguageMode::kSloppy)
+        .Check();
 
     CHECK_EQ(Smi::FromInt(23),
              *Object::GetProperty(obj, prop_name).ToHandleChecked());
@@ -390,8 +395,10 @@
     HandleScope inner_scope(isolate);
     // Allocate another object, make it reachable from global.
     Handle<JSObject> obj = factory->NewJSObject(function);
-    JSReceiver::SetProperty(global, obj_name, obj, SLOPPY).Check();
-    JSReceiver::SetProperty(obj, prop_name, twenty_three, SLOPPY).Check();
+    JSReceiver::SetProperty(global, obj_name, obj, LanguageMode::kSloppy)
+        .Check();
+    JSReceiver::SetProperty(obj, prop_name, twenty_three, LanguageMode::kSloppy)
+        .Check();
   }
 
   // After gc, it should survive.
@@ -744,14 +751,13 @@
 
 TEST(BytecodeArray) {
   if (FLAG_never_compact) return;
-  static const uint8_t kRawBytes[] = {0xc3, 0x7e, 0xa5, 0x5a};
+  static const uint8_t kRawBytes[] = {0xC3, 0x7E, 0xA5, 0x5A};
   static const int kRawBytesSize = sizeof(kRawBytes);
   static const int kFrameSize = 32;
   static const int kParameterCount = 2;
 
-  FLAG_concurrent_marking = false;
+  ManualGCScope manual_gc_scope;
   FLAG_manual_evacuation_candidates_selection = true;
-  FLAG_stress_incremental_marking = false;
   CcTest::InitializeVM();
   Isolate* isolate = CcTest::i_isolate();
   Heap* heap = isolate->heap();
@@ -804,7 +810,7 @@
 }
 
 TEST(BytecodeArrayAging) {
-  static const uint8_t kRawBytes[] = {0xc3, 0x7e, 0xa5, 0x5a};
+  static const uint8_t kRawBytes[] = {0xC3, 0x7E, 0xA5, 0x5A};
   static const int kRawBytesSize = sizeof(kRawBytes);
   static const int kFrameSize = 32;
   static const int kParameterCount = 2;
@@ -924,18 +930,21 @@
 
   v8::HandleScope sc(CcTest::isolate());
   Handle<String> name = factory->InternalizeUtf8String("theFunction");
-  Handle<JSFunction> function = factory->NewFunction(name);
+  Handle<JSFunction> function = factory->NewFunctionForTest(name);
 
   Handle<Smi> twenty_three(Smi::FromInt(23), isolate);
   Handle<Smi> twenty_four(Smi::FromInt(24), isolate);
 
   Handle<String> prop_name = factory->InternalizeUtf8String("theSlot");
   Handle<JSObject> obj = factory->NewJSObject(function);
-  JSReceiver::SetProperty(obj, prop_name, twenty_three, SLOPPY).Check();
+  JSReceiver::SetProperty(obj, prop_name, twenty_three, LanguageMode::kSloppy)
+      .Check();
   CHECK_EQ(Smi::FromInt(23),
            *Object::GetProperty(obj, prop_name).ToHandleChecked());
   // Check that we can add properties to function objects.
-  JSReceiver::SetProperty(function, prop_name, twenty_four, SLOPPY).Check();
+  JSReceiver::SetProperty(function, prop_name, twenty_four,
+                          LanguageMode::kSloppy)
+      .Check();
   CHECK_EQ(Smi::FromInt(24),
            *Object::GetProperty(function, prop_name).ToHandleChecked());
 }
@@ -962,50 +971,55 @@
   CHECK(Just(false) == JSReceiver::HasOwnProperty(obj, first));
 
   // add first
-  JSReceiver::SetProperty(obj, first, one, SLOPPY).Check();
+  JSReceiver::SetProperty(obj, first, one, LanguageMode::kSloppy).Check();
   CHECK(Just(true) == JSReceiver::HasOwnProperty(obj, first));
 
   // delete first
-  CHECK(Just(true) == JSReceiver::DeleteProperty(obj, first, SLOPPY));
+  CHECK(Just(true) ==
+        JSReceiver::DeleteProperty(obj, first, LanguageMode::kSloppy));
   CHECK(Just(false) == JSReceiver::HasOwnProperty(obj, first));
 
   // add first and then second
-  JSReceiver::SetProperty(obj, first, one, SLOPPY).Check();
-  JSReceiver::SetProperty(obj, second, two, SLOPPY).Check();
+  JSReceiver::SetProperty(obj, first, one, LanguageMode::kSloppy).Check();
+  JSReceiver::SetProperty(obj, second, two, LanguageMode::kSloppy).Check();
   CHECK(Just(true) == JSReceiver::HasOwnProperty(obj, first));
   CHECK(Just(true) == JSReceiver::HasOwnProperty(obj, second));
 
   // delete first and then second
-  CHECK(Just(true) == JSReceiver::DeleteProperty(obj, first, SLOPPY));
+  CHECK(Just(true) ==
+        JSReceiver::DeleteProperty(obj, first, LanguageMode::kSloppy));
   CHECK(Just(true) == JSReceiver::HasOwnProperty(obj, second));
-  CHECK(Just(true) == JSReceiver::DeleteProperty(obj, second, SLOPPY));
+  CHECK(Just(true) ==
+        JSReceiver::DeleteProperty(obj, second, LanguageMode::kSloppy));
   CHECK(Just(false) == JSReceiver::HasOwnProperty(obj, first));
   CHECK(Just(false) == JSReceiver::HasOwnProperty(obj, second));
 
   // add first and then second
-  JSReceiver::SetProperty(obj, first, one, SLOPPY).Check();
-  JSReceiver::SetProperty(obj, second, two, SLOPPY).Check();
+  JSReceiver::SetProperty(obj, first, one, LanguageMode::kSloppy).Check();
+  JSReceiver::SetProperty(obj, second, two, LanguageMode::kSloppy).Check();
   CHECK(Just(true) == JSReceiver::HasOwnProperty(obj, first));
   CHECK(Just(true) == JSReceiver::HasOwnProperty(obj, second));
 
   // delete second and then first
-  CHECK(Just(true) == JSReceiver::DeleteProperty(obj, second, SLOPPY));
+  CHECK(Just(true) ==
+        JSReceiver::DeleteProperty(obj, second, LanguageMode::kSloppy));
   CHECK(Just(true) == JSReceiver::HasOwnProperty(obj, first));
-  CHECK(Just(true) == JSReceiver::DeleteProperty(obj, first, SLOPPY));
+  CHECK(Just(true) ==
+        JSReceiver::DeleteProperty(obj, first, LanguageMode::kSloppy));
   CHECK(Just(false) == JSReceiver::HasOwnProperty(obj, first));
   CHECK(Just(false) == JSReceiver::HasOwnProperty(obj, second));
 
   // check string and internalized string match
   const char* string1 = "fisk";
   Handle<String> s1 = factory->NewStringFromAsciiChecked(string1);
-  JSReceiver::SetProperty(obj, s1, one, SLOPPY).Check();
+  JSReceiver::SetProperty(obj, s1, one, LanguageMode::kSloppy).Check();
   Handle<String> s1_string = factory->InternalizeUtf8String(string1);
   CHECK(Just(true) == JSReceiver::HasOwnProperty(obj, s1_string));
 
   // check internalized string and string match
   const char* string2 = "fugl";
   Handle<String> s2_string = factory->InternalizeUtf8String(string2);
-  JSReceiver::SetProperty(obj, s2_string, one, SLOPPY).Check();
+  JSReceiver::SetProperty(obj, s2_string, one, LanguageMode::kSloppy).Check();
   Handle<String> s2 = factory->NewStringFromAsciiChecked(string2);
   CHECK(Just(true) == JSReceiver::HasOwnProperty(obj, s2));
 }
@@ -1018,7 +1032,7 @@
 
   v8::HandleScope sc(CcTest::isolate());
   Handle<String> name = factory->InternalizeUtf8String("theFunction");
-  Handle<JSFunction> function = factory->NewFunction(name);
+  Handle<JSFunction> function = factory->NewFunctionForTest(name);
 
   Handle<String> prop_name = factory->InternalizeUtf8String("theSlot");
   Handle<JSObject> obj = factory->NewJSObject(function);
@@ -1026,7 +1040,8 @@
 
   // Set a propery
   Handle<Smi> twenty_three(Smi::FromInt(23), isolate);
-  JSReceiver::SetProperty(obj, prop_name, twenty_three, SLOPPY).Check();
+  JSReceiver::SetProperty(obj, prop_name, twenty_three, LanguageMode::kSloppy)
+      .Check();
   CHECK_EQ(Smi::FromInt(23),
            *Object::GetProperty(obj, prop_name).ToHandleChecked());
 
@@ -1060,7 +1075,8 @@
   CHECK(array->HasSmiOrObjectElements());
 
   // array[length] = name.
-  JSReceiver::SetElement(isolate, array, 0, name, SLOPPY).Check();
+  JSReceiver::SetElement(isolate, array, 0, name, LanguageMode::kSloppy)
+      .Check();
   CHECK_EQ(Smi::FromInt(1), array->length());
   element = i::Object::GetElement(isolate, array, 0).ToHandleChecked();
   CHECK_EQ(*element, *name);
@@ -1074,7 +1090,9 @@
   CHECK(array->HasDictionaryElements());  // Must be in slow mode.
 
   // array[length] = name.
-  JSReceiver::SetElement(isolate, array, int_length, name, SLOPPY).Check();
+  JSReceiver::SetElement(isolate, array, int_length, name,
+                         LanguageMode::kSloppy)
+      .Check();
   uint32_t new_int_length = 0;
   CHECK(array->length()->ToArrayIndex(&new_int_length));
   CHECK_EQ(static_cast<double>(int_length), new_int_length - 1);
@@ -1102,11 +1120,12 @@
   Handle<Smi> one(Smi::FromInt(1), isolate);
   Handle<Smi> two(Smi::FromInt(2), isolate);
 
-  JSReceiver::SetProperty(obj, first, one, SLOPPY).Check();
-  JSReceiver::SetProperty(obj, second, two, SLOPPY).Check();
+  JSReceiver::SetProperty(obj, first, one, LanguageMode::kSloppy).Check();
+  JSReceiver::SetProperty(obj, second, two, LanguageMode::kSloppy).Check();
 
-  JSReceiver::SetElement(isolate, obj, 0, first, SLOPPY).Check();
-  JSReceiver::SetElement(isolate, obj, 1, second, SLOPPY).Check();
+  JSReceiver::SetElement(isolate, obj, 0, first, LanguageMode::kSloppy).Check();
+  JSReceiver::SetElement(isolate, obj, 1, second, LanguageMode::kSloppy)
+      .Check();
 
   // Make the clone.
   Handle<Object> value1, value2;
@@ -1128,11 +1147,13 @@
   CHECK_EQ(*value1, *value2);
 
   // Flip the values.
-  JSReceiver::SetProperty(clone, first, two, SLOPPY).Check();
-  JSReceiver::SetProperty(clone, second, one, SLOPPY).Check();
+  JSReceiver::SetProperty(clone, first, two, LanguageMode::kSloppy).Check();
+  JSReceiver::SetProperty(clone, second, one, LanguageMode::kSloppy).Check();
 
-  JSReceiver::SetElement(isolate, clone, 0, second, SLOPPY).Check();
-  JSReceiver::SetElement(isolate, clone, 1, first, SLOPPY).Check();
+  JSReceiver::SetElement(isolate, clone, 0, second, LanguageMode::kSloppy)
+      .Check();
+  JSReceiver::SetElement(isolate, clone, 1, first, LanguageMode::kSloppy)
+      .Check();
 
   value1 = Object::GetElement(isolate, obj, 1).ToHandleChecked();
   value2 = Object::GetElement(isolate, clone, 0).ToHandleChecked();
@@ -1155,7 +1176,7 @@
   Isolate* isolate = CcTest::i_isolate();
   Factory* factory = isolate->factory();
 
-  const unsigned char chars[] = { 0xe5, 0xa4, 0xa7 };
+  const unsigned char chars[] = {0xE5, 0xA4, 0xA7};
   for (int length = 0; length < 100; length++) {
     v8::HandleScope scope(CcTest::isolate());
     char* non_one_byte = NewArray<char>(3 * length + 1);
@@ -1194,7 +1215,8 @@
   // Count the number of objects found in the heap.
   int found_count = 0;
   HeapIterator iterator(heap);
-  for (HeapObject* obj = iterator.next(); obj != NULL; obj = iterator.next()) {
+  for (HeapObject* obj = iterator.next(); obj != nullptr;
+       obj = iterator.next()) {
     for (int i = 0; i < size; i++) {
       if (*objs[i] == obj) {
         found_count++;
@@ -1570,7 +1592,7 @@
   int max_double_unaligned_fill = Heap::GetMaximumFillToAlign(kDoubleUnaligned);
   CHECK_EQ(maximum_double_misalignment, max_double_unaligned_fill);
 
-  Address base = static_cast<Address>(NULL);
+  Address base = static_cast<Address>(nullptr);
   int fill = 0;
 
   // Word alignment never requires fill.
@@ -1598,7 +1620,7 @@
   Heap* heap = CcTest::heap();
   AllocationResult allocation =
       heap->new_space()->AllocateRawAligned(size, alignment);
-  HeapObject* obj = NULL;
+  HeapObject* obj = nullptr;
   allocation.To(&obj);
   heap->CreateFillerObjectAt(obj->address(), size, ClearRecordedSlots::kNo);
   return obj;
@@ -1665,7 +1687,7 @@
   Heap* heap = CcTest::heap();
   AllocationResult allocation =
       heap->old_space()->AllocateRawAligned(size, alignment);
-  HeapObject* obj = NULL;
+  HeapObject* obj = nullptr;
   allocation.To(&obj);
   heap->CreateFillerObjectAt(obj->address(), size, ClearRecordedSlots::kNo);
   return obj;
@@ -1682,7 +1704,7 @@
   }
   Address top = *top_addr;
   // Now force the remaining allocation onto the free list.
-  CcTest::heap()->old_space()->EmptyAllocationInfo();
+  CcTest::heap()->old_space()->FreeLinearAllocationArea();
   return top;
 }
 
@@ -1743,8 +1765,7 @@
   HeapIterator iterator(CcTest::heap());
   intptr_t size_of_objects_1 = CcTest::heap()->SizeOfObjects();
   intptr_t size_of_objects_2 = 0;
-  for (HeapObject* obj = iterator.next();
-       obj != NULL;
+  for (HeapObject* obj = iterator.next(); obj != nullptr;
        obj = iterator.next()) {
     if (!obj->IsFreeSpace()) {
       size_of_objects_2 += obj->Size();
@@ -1857,7 +1878,8 @@
 static int NumberOfGlobalObjects() {
   int count = 0;
   HeapIterator iterator(CcTest::heap());
-  for (HeapObject* obj = iterator.next(); obj != NULL; obj = iterator.next()) {
+  for (HeapObject* obj = iterator.next(); obj != nullptr;
+       obj = iterator.next()) {
     if (obj->IsJSGlobalObject()) count++;
   }
   return count;
@@ -2103,7 +2125,7 @@
     // Discard any pending GC requests otherwise we will get GC when we enter
     // code below.
     marking->Step(MB, IncrementalMarking::NO_GC_VIA_STACK_GUARD,
-                  IncrementalMarking::FORCE_COMPLETION, StepOrigin::kV8);
+                  StepOrigin::kV8);
   }
 
   CHECK(marking->IsMarking());
@@ -2167,28 +2189,12 @@
 
   CHECK_EQ(CcTest::heap()->gc_count(), initial_gc_count);
 
-  // TODO(hpayer): We cannot write proper unit test right now for heap.
-  // The ideal test would call kMaxIdleMarkingDelayCounter to test the
-  // marking delay counter.
-
-  // Perform a huge incremental marking step but don't complete marking.
   do {
     marking->Step(1 * MB, IncrementalMarking::NO_GC_VIA_STACK_GUARD,
-                  IncrementalMarking::DO_NOT_FORCE_COMPLETION, StepOrigin::kV8);
-    CHECK(!marking->IsIdleMarkingDelayCounterLimitReached());
+                  StepOrigin::kV8);
   } while (
       !CcTest::heap()->mark_compact_collector()->marking_worklist()->IsEmpty());
 
-  // The next invocations of incremental marking are not going to complete
-  // marking
-  // since the completion threshold is not reached
-  for (size_t i = 0; i < IncrementalMarking::kMaxIdleMarkingDelayCounter - 2;
-       i++) {
-    marking->Step(1 * MB, IncrementalMarking::NO_GC_VIA_STACK_GUARD,
-                  IncrementalMarking::DO_NOT_FORCE_COMPLETION, StepOrigin::kV8);
-    CHECK(!marking->IsIdleMarkingDelayCounterLimitReached());
-  }
-
   marking->SetWeakClosureWasOverApproximatedForTesting(true);
 
   // The next idle notification has to finish incremental marking.
@@ -2742,7 +2748,9 @@
   FLAG_gc_global = true;
   FLAG_retain_maps_for_n_gc = 0;
   CcTest::heap()->set_allocation_timeout(gc_count);
-  JSReceiver::SetProperty(object, prop_name, twenty_three, SLOPPY).Check();
+  JSReceiver::SetProperty(object, prop_name, twenty_three,
+                          LanguageMode::kSloppy)
+      .Check();
 }
 
 
@@ -2873,16 +2881,16 @@
   // The optimizer can allocate stuff, messing up the test.
   FLAG_opt = false;
   FLAG_always_opt = false;
-  // Parallel compaction increases fragmentation, depending on how existing
-  // memory is distributed. Since this is non-deterministic because of
-  // concurrent sweeping, we disable it for this test.
-  FLAG_parallel_compaction = false;
-  FLAG_concurrent_marking = false;
-  // Concurrent sweeping adds non determinism, depending on when memory is
-  // available for further reuse.
-  FLAG_concurrent_sweeping = false;
-  // Fast evacuation of pages may result in a different page count in old space.
+  // - Parallel compaction increases fragmentation, depending on how existing
+  //   memory is distributed. Since this is non-deterministic because of
+  //   concurrent sweeping, we disable it for this test.
+  // - Concurrent sweeping adds non determinism, depending on when memory is
+  //   available for further reuse.
+  // - Fast evacuation of pages may result in a different page count in old
+  //   space.
+  ManualGCScope manual_gc_scope;
   FLAG_page_promotion = false;
+  FLAG_parallel_compaction = false;
   CcTest::InitializeVM();
   Isolate* isolate = CcTest::i_isolate();
   // If there's snapshot available, we don't know whether 20 small arrays will
@@ -3164,14 +3172,14 @@
 
   virtual void Dispose() {
     i::DeleteArray(data_);
-    data_ = NULL;
+    data_ = nullptr;
   }
 
   const char* data() const { return data_; }
 
   size_t length() const { return length_; }
 
-  bool IsDisposed() { return data_ == NULL; }
+  bool IsDisposed() { return data_ == nullptr; }
 
  private:
   const char* data_;
@@ -3329,7 +3337,7 @@
 
   // We need filler the size of AllocationMemento object, plus an extra
   // fill pointer value.
-  HeapObject* obj = NULL;
+  HeapObject* obj = nullptr;
   AllocationResult allocation =
       CcTest::heap()->new_space()->AllocateRawUnaligned(
           AllocationMemento::kSize + kPointerSize);
@@ -3378,8 +3386,7 @@
   // Start incremental marking to active write barrier.
   heap::SimulateIncrementalMarking(heap, false);
   heap->incremental_marking()->AdvanceIncrementalMarking(
-      10000000, IncrementalMarking::NO_GC_VIA_STACK_GUARD,
-      IncrementalMarking::FORCE_COMPLETION, StepOrigin::kV8);
+      10000000, IncrementalMarking::NO_GC_VIA_STACK_GUARD, StepOrigin::kV8);
 
   // Create references from the large object to the object on the evacuation
   // candidate.
@@ -3443,7 +3450,7 @@
   }
   // This big step should be sufficient to mark the whole array.
   marking->Step(100 * MB, IncrementalMarking::NO_GC_VIA_STACK_GUARD,
-                IncrementalMarking::FORCE_COMPLETION, StepOrigin::kV8);
+                StepOrigin::kV8);
   CHECK(marking->IsComplete() ||
         marking->IsReadyToOverApproximateWeakClosure());
 }
@@ -3905,6 +3912,30 @@
   CHECK_EQ(code_chain_length_before - 1, code_chain_length_after);
 }
 
+TEST(NextCodeLinkInCodeDataContainerIsCleared) {
+  FLAG_always_opt = false;
+  FLAG_allow_natives_syntax = true;
+  CcTest::InitializeVM();
+  Isolate* isolate = CcTest::i_isolate();
+  v8::internal::Heap* heap = CcTest::heap();
+
+  if (!isolate->use_optimizer()) return;
+  HandleScope outer_scope(heap->isolate());
+  Handle<CodeDataContainer> code_data_container;
+  {
+    HandleScope scope(heap->isolate());
+    Handle<JSFunction> mortal1 =
+        OptimizeDummyFunction(CcTest::isolate(), "mortal1");
+    Handle<JSFunction> mortal2 =
+        OptimizeDummyFunction(CcTest::isolate(), "mortal2");
+    CHECK_EQ(mortal2->code()->next_code_link(), mortal1->code());
+    code_data_container = scope.CloseAndEscape(
+        Handle<CodeDataContainer>(mortal2->code()->code_data_container()));
+    CompileRun("mortal1 = null; mortal2 = null;");
+  }
+  CcTest::CollectAllAvailableGarbage();
+  CHECK(code_data_container->next_code_link()->IsUndefined(isolate));
+}
 
 static Handle<Code> DummyOptimizedCode(Isolate* isolate) {
   i::byte buffer[i::Assembler::kMinimalBufferSize];
@@ -3912,7 +3943,8 @@
                       v8::internal::CodeObjectRequired::kYes);
   CodeDesc desc;
   masm.Push(isolate->factory()->undefined_value());
-  masm.Drop(1);
+  masm.Push(isolate->factory()->undefined_value());
+  masm.Drop(2);
   masm.GetCode(isolate, &desc);
   Handle<Object> undefined(isolate->heap()->undefined_value(), isolate);
   Handle<Code> code =
@@ -4338,7 +4370,7 @@
                                     i::GarbageCollectionReason::kTesting);
     }
     marking->Step(128, IncrementalMarking::NO_GC_VIA_STACK_GUARD,
-                  IncrementalMarking::FORCE_COMPLETION, StepOrigin::kV8);
+                  StepOrigin::kV8);
     CcTest::CollectGarbage(NEW_SPACE);
     CHECK(weak_cell->value()->IsFixedArray());
     weak_cells[i] = inner_scope.CloseAndEscape(weak_cell);
@@ -4425,16 +4457,20 @@
 
 
 static void RequestInterrupt(const v8::FunctionCallbackInfo<v8::Value>& args) {
-  CcTest::isolate()->RequestInterrupt(&InterruptCallback357137, NULL);
+  CcTest::isolate()->RequestInterrupt(&InterruptCallback357137, nullptr);
 }
 
 HEAP_TEST(Regress538257) {
-  FLAG_concurrent_marking = false;
+  ManualGCScope manual_gc_scope;
   FLAG_manual_evacuation_candidates_selection = true;
   v8::Isolate::CreateParams create_params;
   // Set heap limits.
   create_params.constraints.set_max_semi_space_size_in_kb(1024);
+#ifdef DEBUG
+  create_params.constraints.set_max_old_space_size(20);
+#else
   create_params.constraints.set_max_old_space_size(6);
+#endif
   create_params.array_buffer_allocator = CcTest::array_buffer_allocator();
   v8::Isolate* isolate = v8::Isolate::New(create_params);
   isolate->Enter();
@@ -4472,7 +4508,7 @@
       v8::String::NewFromUtf8(isolate, "interrupt", v8::NewStringType::kNormal)
           .ToLocalChecked(),
       v8::FunctionTemplate::New(isolate, RequestInterrupt));
-  v8::Local<v8::Context> context = v8::Context::New(isolate, NULL, global);
+  v8::Local<v8::Context> context = v8::Context::New(isolate, nullptr, global);
   CHECK(!context.IsEmpty());
   v8::Context::Scope cscope(context);
 
@@ -4504,7 +4540,7 @@
   // way the filler object shares the mark bits with the following live object.
   o1->Shrink(kFixedArrayLen - 1);
 
-  for (HeapObject* obj = it.next(); obj != NULL; obj = it.next()) {
+  for (HeapObject* obj = it.next(); obj != nullptr; obj = it.next()) {
     // Let's not optimize the loop away.
     CHECK_NOT_NULL(obj->address());
   }
@@ -4588,7 +4624,7 @@
   IncrementalMarking::MarkingState* marking_state = marking->marking_state();
   while (!marking_state->IsBlack(weak_map_table) && !marking->IsStopped()) {
     marking->Step(MB, IncrementalMarking::NO_GC_VIA_STACK_GUARD,
-                  IncrementalMarking::FORCE_COMPLETION, StepOrigin::kV8);
+                  StepOrigin::kV8);
   }
   // Stash the backing store in a handle.
   Handle<Object> save(weak_map->table(), isolate);
@@ -4613,7 +4649,7 @@
   Handle<JSArray> array = factory->NewJSArray(2);
 
   Handle<String> name = factory->InternalizeUtf8String("testArray");
-  JSReceiver::SetProperty(global, name, array, SLOPPY).Check();
+  JSReceiver::SetProperty(global, name, array, LanguageMode::kSloppy).Check();
   CompileRun("testArray[0] = 1; testArray[1] = 2; testArray.shift();");
   CcTest::CollectGarbage(OLD_SPACE);
 }
@@ -4736,58 +4772,6 @@
   }
 }
 
-
-static void TestRightTrimFixedTypedArray(i::ExternalArrayType type,
-                                         int initial_length,
-                                         int elements_to_trim) {
-  v8::HandleScope scope(CcTest::isolate());
-  Isolate* isolate = CcTest::i_isolate();
-  Factory* factory = isolate->factory();
-  Heap* heap = isolate->heap();
-
-  Handle<FixedTypedArrayBase> array =
-      factory->NewFixedTypedArray(initial_length, type, true);
-  int old_size = array->size();
-  heap->RightTrimFixedArray(*array, elements_to_trim);
-
-  // Check that free space filler is at the right place and did not smash the
-  // array header.
-  CHECK(array->IsFixedArrayBase());
-  CHECK_EQ(initial_length - elements_to_trim, array->length());
-  int new_size = array->size();
-  if (new_size != old_size) {
-    // Free space filler should be created in this case.
-    Address next_obj_address = array->address() + array->size();
-    CHECK(HeapObject::FromAddress(next_obj_address)->IsFiller());
-  }
-  CcTest::CollectAllAvailableGarbage();
-}
-
-
-TEST(Regress472513) {
-  CcTest::InitializeVM();
-  v8::HandleScope scope(CcTest::isolate());
-
-  // The combination of type/initial_length/elements_to_trim triggered
-  // typed array header smashing with free space filler (crbug/472513).
-
-  // 64-bit cases.
-  TestRightTrimFixedTypedArray(i::kExternalUint8Array, 32, 6);
-  TestRightTrimFixedTypedArray(i::kExternalUint8Array, 32 - 7, 6);
-  TestRightTrimFixedTypedArray(i::kExternalUint16Array, 16, 6);
-  TestRightTrimFixedTypedArray(i::kExternalUint16Array, 16 - 3, 6);
-  TestRightTrimFixedTypedArray(i::kExternalUint32Array, 8, 6);
-  TestRightTrimFixedTypedArray(i::kExternalUint32Array, 8 - 1, 6);
-
-  // 32-bit cases.
-  TestRightTrimFixedTypedArray(i::kExternalUint8Array, 16, 3);
-  TestRightTrimFixedTypedArray(i::kExternalUint8Array, 16 - 3, 3);
-  TestRightTrimFixedTypedArray(i::kExternalUint16Array, 8, 3);
-  TestRightTrimFixedTypedArray(i::kExternalUint16Array, 8 - 1, 3);
-  TestRightTrimFixedTypedArray(i::kExternalUint32Array, 4, 3);
-}
-
-
 TEST(WeakFixedArray) {
   CcTest::InitializeVM();
   v8::HandleScope scope(CcTest::isolate());
@@ -5001,7 +4985,7 @@
       v8::String::NewFromUtf8(isolate, "check", v8::NewStringType::kNormal)
           .ToLocalChecked(),
       v8::FunctionTemplate::New(isolate, CheckLeak));
-  v8::Local<v8::Context> context = v8::Context::New(isolate, NULL, global);
+  v8::Local<v8::Context> context = v8::Context::New(isolate, nullptr, global);
   v8::Context::Scope cscope(context);
 
   const char* test =
@@ -5056,7 +5040,7 @@
                                     isolate, CheckEqualSharedFunctionInfos));
   global->Set(isolate, "remove",
               v8::FunctionTemplate::New(isolate, RemoveCodeAndGC));
-  v8::Local<v8::Context> context = v8::Context::New(isolate, NULL, global);
+  v8::Local<v8::Context> context = v8::Context::New(isolate, nullptr, global);
   v8::Context::Scope cscope(context);
   CompileRun(
       "function f() { return function g() {}; }"
@@ -5086,7 +5070,7 @@
   int script_count = 0;
   {
     HeapIterator it(heap);
-    for (HeapObject* obj = it.next(); obj != NULL; obj = it.next()) {
+    for (HeapObject* obj = it.next(); obj != nullptr; obj = it.next()) {
       if (obj->IsScript()) script_count++;
     }
   }
@@ -5113,7 +5097,7 @@
   int sfi_count = 0;
   {
     HeapIterator it(heap);
-    for (HeapObject* obj = it.next(); obj != NULL; obj = it.next()) {
+    for (HeapObject* obj = it.next(); obj != nullptr; obj = it.next()) {
       if (!obj->IsSharedFunctionInfo()) continue;
       sfi_count++;
     }
@@ -5128,8 +5112,7 @@
 }
 
 HEAP_TEST(Regress587004) {
-  FLAG_concurrent_marking = false;
-  FLAG_concurrent_sweeping = false;
+  ManualGCScope manual_gc_scope;
 #ifdef VERIFY_HEAP
   FLAG_verify_heap = false;
 #endif
@@ -5171,8 +5154,7 @@
   FLAG_stress_compaction = true;
   FLAG_manual_evacuation_candidates_selection = true;
   FLAG_parallel_compaction = false;
-  FLAG_concurrent_marking = false;
-  FLAG_concurrent_sweeping = false;
+  ManualGCScope manual_gc_scope;
   CcTest::InitializeVM();
   v8::HandleScope scope(CcTest::isolate());
   Heap* heap = CcTest::heap();
@@ -5194,7 +5176,7 @@
   // Make sure the byte arrays will be promoted on the next GC.
   CcTest::CollectGarbage(NEW_SPACE);
   // This number is close to large free list category threshold.
-  const int N = 0x3eee;
+  const int N = 0x3EEE;
   {
     std::vector<FixedArray*> arrays;
     std::set<Page*> pages;
@@ -5316,7 +5298,7 @@
   // only partially marked the large object.
   while (!marking->IsComplete()) {
     marking->Step(i::KB, i::IncrementalMarking::NO_GC_VIA_STACK_GUARD,
-                  IncrementalMarking::FORCE_COMPLETION, StepOrigin::kV8);
+                  StepOrigin::kV8);
     if (page->IsFlagSet(Page::HAS_PROGRESS_BAR) && page->progress_bar() > 0) {
       CHECK_NE(page->progress_bar(), arr.get()->Size());
       {
@@ -5334,7 +5316,7 @@
   // Finish marking with bigger steps to speed up test.
   while (!marking->IsComplete()) {
     marking->Step(10 * i::MB, i::IncrementalMarking::NO_GC_VIA_STACK_GUARD,
-                  IncrementalMarking::FORCE_COMPLETION, StepOrigin::kV8);
+                  StepOrigin::kV8);
     if (marking->IsReadyToOverApproximateWeakClosure()) {
       marking->FinalizeIncrementally();
     }
@@ -5417,7 +5399,7 @@
   }
   while (!marking->IsComplete()) {
     marking->Step(i::MB, i::IncrementalMarking::NO_GC_VIA_STACK_GUARD,
-                  IncrementalMarking::FORCE_COMPLETION, StepOrigin::kV8);
+                  StepOrigin::kV8);
     if (marking->IsReadyToOverApproximateWeakClosure()) {
       marking->FinalizeIncrementally();
     }
@@ -5448,8 +5430,7 @@
   if (!FLAG_incremental_marking) return;
   FLAG_manual_evacuation_candidates_selection = true;
   FLAG_parallel_compaction = false;
-  FLAG_concurrent_marking = false;
-  FLAG_concurrent_sweeping = false;
+  ManualGCScope manual_gc_scope;
   CcTest::InitializeVM();
   v8::HandleScope scope(CcTest::isolate());
   Heap* heap = CcTest::heap();
@@ -5478,7 +5459,7 @@
   IncrementalMarking* marking = heap->incremental_marking();
   while (!marking->IsComplete()) {
     marking->Step(MB, i::IncrementalMarking::NO_GC_VIA_STACK_GUARD,
-                  IncrementalMarking::FORCE_COMPLETION, StepOrigin::kV8);
+                  StepOrigin::kV8);
     if (marking->IsReadyToOverApproximateWeakClosure()) {
       marking->FinalizeIncrementally();
     }
@@ -5696,9 +5677,8 @@
 
   CcTest::CollectAllGarbage();
   CHECK(chunk->CommittedPhysicalMemory() < committed_memory_before);
-  size_t shrinked_size =
-      RoundUp((array->address() - chunk->address()) + array->Size(),
-              base::OS::CommitPageSize());
+  size_t shrinked_size = RoundUp(
+      (array->address() - chunk->address()) + array->Size(), CommitPageSize());
   CHECK_EQ(shrinked_size, chunk->CommittedPhysicalMemory());
 }
 
@@ -5805,15 +5785,14 @@
     if (marking->IsStopped()) break;
     double deadline = heap->MonotonicallyIncreasingTimeInMs() + 1;
     marking->AdvanceIncrementalMarking(
-        deadline, IncrementalMarking::GC_VIA_STACK_GUARD,
-        IncrementalMarking::FORCE_COMPLETION, StepOrigin::kV8);
+        deadline, IncrementalMarking::GC_VIA_STACK_GUARD, StepOrigin::kV8);
   }
   DCHECK(marking->IsStopped());
 }
 
 namespace {
 Handle<Code> GenerateDummyImmovableCode(Isolate* isolate) {
-  Assembler assm(isolate, NULL, 256);
+  Assembler assm(isolate, nullptr, 256);
 
   const int kNumberOfNops = 1 << 10;
   for (int i = 0; i < kNumberOfNops; i++) {
@@ -5822,9 +5801,10 @@
 
   CodeDesc desc;
   assm.GetCode(isolate, &desc);
-  const bool kImmovable = true;
-  Handle<Code> code =
-      isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>(), kImmovable);
+  Handle<Code> code = isolate->factory()->NewCode(
+      desc, Code::STUB, Handle<Code>(), Builtins::kNoBuiltinId,
+      HandlerTable::Empty(isolate), MaybeHandle<ByteArray>(),
+      DeoptimizationData::Empty(isolate), kImmovable);
   CHECK(code->IsCode());
 
   return code;
@@ -5974,6 +5954,50 @@
   }
 }
 
+HEAP_TEST(Regress779503) {
+  // The following regression test ensures that the Scavenger does not allocate
+  // over invalid slots. More specific, the Scavenger should not sweep a page
+  // that it currently processes because it might allocate over the currently
+  // processed slot.
+  const int kArraySize = 2048;
+  CcTest::InitializeVM();
+  Isolate* isolate = CcTest::i_isolate();
+  Heap* heap = CcTest::heap();
+  heap::SealCurrentObjects(heap);
+  {
+    HandleScope handle_scope(isolate);
+    // The byte array filled with kHeapObjectTag ensures that we cannot read
+    // from the slot again and interpret it as heap value. Doing so will crash.
+    Handle<ByteArray> byte_array = isolate->factory()->NewByteArray(kArraySize);
+    CHECK(heap->InNewSpace(*byte_array));
+    for (int i = 0; i < kArraySize; i++) {
+      byte_array->set(i, kHeapObjectTag);
+    }
+
+    {
+      HandleScope handle_scope(isolate);
+      // The FixedArray in old space serves as space for slots.
+      Handle<FixedArray> fixed_array =
+          isolate->factory()->NewFixedArray(kArraySize, TENURED);
+      CHECK(!heap->InNewSpace(*fixed_array));
+      for (int i = 0; i < kArraySize; i++) {
+        fixed_array->set(i, *byte_array);
+      }
+    }
+    // Delay sweeper tasks to allow the scavenger to sweep the page it is
+    // currently scavenging.
+    CcTest::heap()->delay_sweeper_tasks_for_testing_ = true;
+    CcTest::CollectGarbage(OLD_SPACE);
+    CHECK(heap->InNewSpace(*byte_array));
+  }
+  // Scavenging and sweeping the same page will crash as slots will be
+  // overridden.
+  CcTest::CollectGarbage(NEW_SPACE);
+  CcTest::heap()->delay_sweeper_tasks_for_testing_ = false;
+}
+
 }  // namespace heap
 }  // namespace internal
 }  // namespace v8
+
+#undef __
diff --git a/src/v8/test/cctest/heap/test-incremental-marking.cc b/src/v8/test/cctest/heap/test-incremental-marking.cc
index a28f9a1..0548ba4 100644
--- a/src/v8/test/cctest/heap/test-incremental-marking.cc
+++ b/src/v8/test/cctest/heap/test-incremental-marking.cc
@@ -33,11 +33,14 @@
 
 class MockPlatform : public TestPlatform {
  public:
-  MockPlatform() : task_(nullptr) {
+  MockPlatform() : task_(nullptr), old_platform_(i::V8::GetCurrentPlatform()) {
     // Now that it's completely constructed, make this the current platform.
     i::V8::SetPlatformForTesting(this);
   }
-  virtual ~MockPlatform() { delete task_; }
+  virtual ~MockPlatform() {
+    delete task_;
+    i::V8::SetPlatformForTesting(old_platform_);
+  }
 
   void CallOnForegroundThread(v8::Isolate* isolate, Task* task) override {
     task_ = task;
@@ -56,6 +59,7 @@
 
  private:
   Task* task_;
+  v8::Platform* old_platform_;
 };
 
 TEST(IncrementalMarkingUsingTasks) {
diff --git a/src/v8/test/cctest/heap/test-invalidated-slots.cc b/src/v8/test/cctest/heap/test-invalidated-slots.cc
index 65de790..f7900cb 100644
--- a/src/v8/test/cctest/heap/test-invalidated-slots.cc
+++ b/src/v8/test/cctest/heap/test-invalidated-slots.cc
@@ -135,6 +135,7 @@
 }
 
 HEAP_TEST(InvalidatedSlotsEvacuationCandidate) {
+  ManualGCScope manual_gc_scope;
   CcTest::InitializeVM();
   Heap* heap = CcTest::heap();
   std::vector<ByteArray*> byte_arrays;
diff --git a/src/v8/test/cctest/heap/test-lab.cc b/src/v8/test/cctest/heap/test-lab.cc
index d2f5ac2..f8ef6f5 100644
--- a/src/v8/test/cctest/heap/test-lab.cc
+++ b/src/v8/test/cctest/heap/test-lab.cc
@@ -5,12 +5,9 @@
 #include <vector>
 
 #include "src/globals.h"
-#include "src/heap/heap.h"
-#include "src/heap/spaces.h"
+#include "src/heap/heap-inl.h"
 #include "src/heap/spaces-inl.h"
-// FIXME(mstarzinger, marja): This is weird, but required because of the missing
-// (disallowed) include: src/heap/incremental-marking.h -> src/objects-inl.h
-#include "src/objects-inl.h"
+#include "src/objects.h"
 #include "test/cctest/cctest.h"
 
 namespace v8 {
diff --git a/src/v8/test/cctest/heap/test-mark-compact.cc b/src/v8/test/cctest/heap/test-mark-compact.cc
index 8f704b1..2eb5c56 100644
--- a/src/v8/test/cctest/heap/test-mark-compact.cc
+++ b/src/v8/test/cctest/heap/test-mark-compact.cc
@@ -129,8 +129,9 @@
   { HandleScope scope(isolate);
     // allocate a garbage
     Handle<String> func_name = factory->InternalizeUtf8String("theFunction");
-    Handle<JSFunction> function = factory->NewFunction(func_name);
-    JSReceiver::SetProperty(global, func_name, function, SLOPPY).Check();
+    Handle<JSFunction> function = factory->NewFunctionForTest(func_name);
+    JSReceiver::SetProperty(global, func_name, function, LanguageMode::kSloppy)
+        .Check();
 
     factory->NewJSObject(function);
   }
@@ -147,10 +148,12 @@
     Handle<JSObject> obj = factory->NewJSObject(function);
 
     Handle<String> obj_name = factory->InternalizeUtf8String("theObject");
-    JSReceiver::SetProperty(global, obj_name, obj, SLOPPY).Check();
+    JSReceiver::SetProperty(global, obj_name, obj, LanguageMode::kSloppy)
+        .Check();
     Handle<String> prop_name = factory->InternalizeUtf8String("theSlot");
     Handle<Smi> twenty_three(Smi::FromInt(23), isolate);
-    JSReceiver::SetProperty(obj, prop_name, twenty_three, SLOPPY).Check();
+    JSReceiver::SetProperty(obj, prop_name, twenty_three, LanguageMode::kSloppy)
+        .Check();
   }
 
   CcTest::CollectGarbage(OLD_SPACE);
@@ -328,7 +331,7 @@
   array->set_length(9);
   heap->CreateFillerObjectAt(old_end - kPointerSize, kPointerSize,
                              ClearRecordedSlots::kNo);
-  heap->old_space()->EmptyAllocationInfo();
+  heap->old_space()->FreeLinearAllocationArea();
   Page* page = Page::FromAddress(array->address());
   IncrementalMarking::MarkingState* marking_state = marking->marking_state();
   for (auto object_and_size :
diff --git a/src/v8/test/cctest/heap/test-page-promotion.cc b/src/v8/test/cctest/heap/test-page-promotion.cc
index 5eb2aec..1464bc4 100644
--- a/src/v8/test/cctest/heap/test-page-promotion.cc
+++ b/src/v8/test/cctest/heap/test-page-promotion.cc
@@ -6,8 +6,6 @@
 #include "src/heap/array-buffer-tracker.h"
 #include "src/heap/spaces-inl.h"
 #include "src/isolate.h"
-// FIXME(mstarzinger, marja): This is weird, but required because of the missing
-// (disallowed) include: src/factory.h -> src/objects-inl.h
 #include "src/objects-inl.h"
 #include "test/cctest/cctest.h"
 #include "test/cctest/heap/heap-tester.h"
@@ -193,7 +191,8 @@
     heap->CollectGarbage(NEW_SPACE, i::GarbageCollectionReason::kTesting);
     heap->new_space()->Shrink();
     heap->memory_allocator()->unmapper()->WaitUntilCompleted();
-    heap->mark_compact_collector()->sweeper().StartSweeperTasks();
+    heap->delay_sweeper_tasks_for_testing_ = false;
+    heap->mark_compact_collector()->sweeper()->StartSweeperTasks();
     heap->mark_compact_collector()->EnsureSweepingCompleted();
   }
   isolate->Dispose();
diff --git a/src/v8/test/cctest/heap/test-spaces.cc b/src/v8/test/cctest/heap/test-spaces.cc
index 6dffd6a..bec9f97 100644
--- a/src/v8/test/cctest/heap/test-spaces.cc
+++ b/src/v8/test/cctest/heap/test-spaces.cc
@@ -30,11 +30,8 @@
 #include "src/base/platform/platform.h"
 #include "src/factory.h"
 #include "src/heap/spaces-inl.h"
-// FIXME(mstarzinger, marja): This is weird, but required because of the missing
-// (disallowed) include: src/heap/incremental-marking.h -> src/objects-inl.h
 #include "src/objects-inl.h"
 #include "src/snapshot/snapshot.h"
-#include "src/v8.h"
 #include "test/cctest/cctest.h"
 #include "test/cctest/heap/heap-tester.h"
 #include "test/cctest/heap/heap-utils.h"
@@ -83,14 +80,11 @@
   DISALLOW_COPY_AND_ASSIGN(TestCodeRangeScope);
 };
 
-namespace test_spaces {
-
 static void VerifyMemoryChunk(Isolate* isolate,
                               Heap* heap,
                               CodeRange* code_range,
                               size_t reserve_area_size,
                               size_t commit_area_size,
-                              size_t second_commit_area_size,
                               Executability executable) {
   MemoryAllocator* memory_allocator = new MemoryAllocator(isolate);
   CHECK(memory_allocator->SetUp(heap->MaxReserved(), 0));
@@ -105,16 +99,15 @@
         (executable == EXECUTABLE) ? MemoryAllocator::CodePageGuardSize() : 0;
 
     MemoryChunk* memory_chunk = memory_allocator->AllocateChunk(
-        reserve_area_size, commit_area_size, executable, NULL);
-    size_t alignment = code_range != NULL && code_range->valid()
+        reserve_area_size, commit_area_size, executable, nullptr);
+    size_t alignment = code_range != nullptr && code_range->valid()
                            ? MemoryChunk::kAlignment
-                           : base::OS::CommitPageSize();
+                           : CommitPageSize();
     size_t reserved_size =
         ((executable == EXECUTABLE))
             ? RoundUp(header_size + guard_size + reserve_area_size + guard_size,
                       alignment)
-            : RoundUp(header_size + reserve_area_size,
-                      base::OS::CommitPageSize());
+            : RoundUp(header_size + reserve_area_size, CommitPageSize());
     CHECK(memory_chunk->size() == reserved_size);
     CHECK(memory_chunk->area_start() <
           memory_chunk->address() + memory_chunk->size());
@@ -122,24 +115,12 @@
           memory_chunk->address() + memory_chunk->size());
     CHECK(static_cast<size_t>(memory_chunk->area_size()) == commit_area_size);
 
-    Address area_start = memory_chunk->area_start();
-
-    memory_chunk->CommitArea(second_commit_area_size);
-    CHECK(area_start == memory_chunk->area_start());
-    CHECK(memory_chunk->area_start() <
-          memory_chunk->address() + memory_chunk->size());
-    CHECK(memory_chunk->area_end() <=
-          memory_chunk->address() + memory_chunk->size());
-    CHECK(static_cast<size_t>(memory_chunk->area_size()) ==
-          second_commit_area_size);
-
     memory_allocator->Free<MemoryAllocator::kFull>(memory_chunk);
   }
   memory_allocator->TearDown();
   delete memory_allocator;
 }
 
-
 TEST(Regress3540) {
   Isolate* isolate = CcTest::i_isolate();
   Heap* heap = isolate->heap();
@@ -175,8 +156,7 @@
   delete memory_allocator;
 }
 
-
-static unsigned int Pseudorandom() {
+static unsigned int PseudorandomAreaSize() {
   static uint32_t lo = 2345;
   lo = 18273 * (lo & 0xFFFFF) + (lo >> 16);
   return lo & 0xFFFFF;
@@ -188,11 +168,10 @@
   Heap* heap = isolate->heap();
 
   size_t reserve_area_size = 1 * MB;
-  size_t initial_commit_area_size, second_commit_area_size;
+  size_t initial_commit_area_size;
 
   for (int i = 0; i < 100; i++) {
-    initial_commit_area_size = Pseudorandom();
-    second_commit_area_size = Pseudorandom();
+    initial_commit_area_size = PseudorandomAreaSize();
 
     // With CodeRange.
     CodeRange* code_range = new CodeRange(isolate);
@@ -204,7 +183,6 @@
                       code_range,
                       reserve_area_size,
                       initial_commit_area_size,
-                      second_commit_area_size,
                       EXECUTABLE);
 
     VerifyMemoryChunk(isolate,
@@ -212,7 +190,6 @@
                       code_range,
                       reserve_area_size,
                       initial_commit_area_size,
-                      second_commit_area_size,
                       NOT_EXECUTABLE);
     delete code_range;
 
@@ -223,7 +200,6 @@
                       code_range,
                       reserve_area_size,
                       initial_commit_area_size,
-                      second_commit_area_size,
                       EXECUTABLE);
 
     VerifyMemoryChunk(isolate,
@@ -231,7 +207,6 @@
                       code_range,
                       reserve_area_size,
                       initial_commit_area_size,
-                      second_commit_area_size,
                       NOT_EXECUTABLE);
     delete code_range;
   }
@@ -255,7 +230,6 @@
         NOT_EXECUTABLE);
 
     first_page->InsertAfter(faked_space.anchor()->prev_page());
-    CHECK(Page::IsValid(first_page));
     CHECK(first_page->next_page() == faked_space.anchor());
     total_pages++;
 
@@ -267,7 +241,6 @@
     Page* other = memory_allocator->AllocatePage(
         faked_space.AreaSize(), static_cast<PagedSpace*>(&faked_space),
         NOT_EXECUTABLE);
-    CHECK(Page::IsValid(other));
     total_pages++;
     other->InsertAfter(first_page);
     int page_count = 0;
@@ -278,7 +251,7 @@
     CHECK(total_pages == page_count);
 
     Page* second_page = first_page->next_page();
-    CHECK(Page::IsValid(second_page));
+    CHECK_NOT_NULL(second_page);
 
     // OldSpace's destructor will tear down the space and free up all pages.
   }
@@ -321,7 +294,7 @@
   TestMemoryAllocatorScope test_scope(isolate, memory_allocator);
 
   OldSpace* s = new OldSpace(heap, OLD_SPACE, NOT_EXECUTABLE);
-  CHECK(s != NULL);
+  CHECK_NOT_NULL(s);
 
   CHECK(s->SetUp());
 
@@ -341,7 +314,7 @@
   v8::V8::Initialize();
 
   LargeObjectSpace* lo = CcTest::heap()->lo_space();
-  CHECK(lo != NULL);
+  CHECK_NOT_NULL(lo);
 
   int lo_size = Page::kPageSize;
 
@@ -436,7 +409,7 @@
 static HeapObject* AllocateUnaligned(NewSpace* space, int size) {
   AllocationResult allocation = space->AllocateRawUnaligned(size);
   CHECK(!allocation.IsRetry());
-  HeapObject* filler = NULL;
+  HeapObject* filler = nullptr;
   CHECK(allocation.To(&filler));
   space->heap()->CreateFillerObjectAt(filler->address(), size,
                                       ClearRecordedSlots::kNo);
@@ -446,7 +419,7 @@
 static HeapObject* AllocateUnaligned(PagedSpace* space, int size) {
   AllocationResult allocation = space->AllocateRaw(size, kDoubleUnaligned);
   CHECK(!allocation.IsRetry());
-  HeapObject* filler = NULL;
+  HeapObject* filler = nullptr;
   CHECK(allocation.To(&filler));
   space->heap()->CreateFillerObjectAt(filler->address(), size,
                                       ClearRecordedSlots::kNo);
@@ -456,7 +429,7 @@
 static HeapObject* AllocateUnaligned(LargeObjectSpace* space, int size) {
   AllocationResult allocation = space->AllocateRaw(size, EXECUTABLE);
   CHECK(!allocation.IsRetry());
-  HeapObject* filler = NULL;
+  HeapObject* filler = nullptr;
   CHECK(allocation.To(&filler));
   return filler;
 }
@@ -466,7 +439,7 @@
   explicit Observer(intptr_t step_size)
       : AllocationObserver(step_size), count_(0) {}
 
-  void Step(int bytes_allocated, Address, size_t) override { count_++; }
+  void Step(int bytes_allocated, Address addr, size_t) override { count_++; }
 
   int count() const { return count_; }
 
@@ -565,7 +538,6 @@
   isolate->Dispose();
 }
 
-
 UNINITIALIZED_TEST(InlineAllocationObserverCadence) {
   v8::Isolate::CreateParams create_params;
   create_params.array_buffer_allocator = CcTest::array_buffer_allocator();
@@ -603,6 +575,90 @@
   isolate->Dispose();
 }
 
+HEAP_TEST(Regress777177) {
+  CcTest::InitializeVM();
+  Isolate* isolate = CcTest::i_isolate();
+  Heap* heap = isolate->heap();
+  HandleScope scope(isolate);
+  PagedSpace* old_space = heap->old_space();
+  Observer observer(128);
+  old_space->AddAllocationObserver(&observer);
+
+  int area_size = old_space->AreaSize();
+  int max_object_size = kMaxRegularHeapObjectSize;
+  int filler_size = area_size - max_object_size;
+
+  {
+    // Ensure a new linear allocation area on a fresh page.
+    AlwaysAllocateScope always_allocate(isolate);
+    heap::SimulateFullSpace(old_space);
+    AllocationResult result = old_space->AllocateRaw(filler_size, kWordAligned);
+    HeapObject* obj = result.ToObjectChecked();
+    heap->CreateFillerObjectAt(obj->address(), filler_size,
+                               ClearRecordedSlots::kNo);
+  }
+
+  {
+    // Allocate all bytes of the linear allocation area. This moves top_ and
+    // top_on_previous_step_ to the next page.
+    AllocationResult result =
+        old_space->AllocateRaw(max_object_size, kWordAligned);
+    HeapObject* obj = result.ToObjectChecked();
+    // Simulate allocation folding moving the top pointer back.
+    old_space->SetTopAndLimit(obj->address(), old_space->limit());
+  }
+
+  {
+    // This triggers assert in crbug.com/777177.
+    AllocationResult result = old_space->AllocateRaw(filler_size, kWordAligned);
+    HeapObject* obj = result.ToObjectChecked();
+    heap->CreateFillerObjectAt(obj->address(), filler_size,
+                               ClearRecordedSlots::kNo);
+  }
+  old_space->RemoveAllocationObserver(&observer);
+}
+
+HEAP_TEST(Regress791582) {
+  CcTest::InitializeVM();
+  Isolate* isolate = CcTest::i_isolate();
+  Heap* heap = isolate->heap();
+  HandleScope scope(isolate);
+  NewSpace* new_space = heap->new_space();
+  if (new_space->TotalCapacity() < new_space->MaximumCapacity()) {
+    new_space->Grow();
+  }
+
+  int until_page_end = static_cast<int>(new_space->limit() - new_space->top());
+
+  if (until_page_end % kPointerSize != 0) {
+    // The test works if the size of allocation area size is a multiple of
+    // pointer size. This is usually the case unless some allocation observer
+    // is already active (e.g. incremental marking observer).
+    return;
+  }
+
+  Observer observer(128);
+  new_space->AddAllocationObserver(&observer);
+
+  {
+    AllocationResult result =
+        new_space->AllocateRaw(until_page_end, kWordAligned);
+    HeapObject* obj = result.ToObjectChecked();
+    heap->CreateFillerObjectAt(obj->address(), until_page_end,
+                               ClearRecordedSlots::kNo);
+    // Simulate allocation folding moving the top pointer back.
+    *new_space->allocation_top_address() = obj->address();
+  }
+
+  {
+    // This triggers assert in crbug.com/791582
+    AllocationResult result = new_space->AllocateRaw(256, kWordAligned);
+    HeapObject* obj = result.ToObjectChecked();
+    heap->CreateFillerObjectAt(obj->address(), 256, ClearRecordedSlots::kNo);
+  }
+  new_space->RemoveAllocationObserver(&observer);
+}
+
 TEST(ShrinkPageToHighWaterMarkFreeSpaceEnd) {
   FLAG_stress_incremental_marking = false;
   CcTest::InitializeVM();
@@ -618,8 +674,8 @@
 
   // Reset space so high water mark is consistent.
   PagedSpace* old_space = CcTest::heap()->old_space();
+  old_space->FreeLinearAllocationArea();
   old_space->ResetFreeList();
-  old_space->EmptyAllocationInfo();
 
   HeapObject* filler =
       HeapObject::FromAddress(array->address() + array->Size());
@@ -627,7 +683,7 @@
   size_t shrunk = old_space->ShrinkPageToHighWaterMark(page);
   size_t should_have_shrunk =
       RoundDown(static_cast<size_t>(Page::kAllocatableMemory - array->Size()),
-                base::OS::CommitPageSize());
+                CommitPageSize());
   CHECK_EQ(should_have_shrunk, shrunk);
 }
 
@@ -647,7 +703,7 @@
   // Reset space so high water mark and fillers are consistent.
   PagedSpace* old_space = CcTest::heap()->old_space();
   old_space->ResetFreeList();
-  old_space->EmptyAllocationInfo();
+  old_space->FreeLinearAllocationArea();
 
   size_t shrunk = old_space->ShrinkPageToHighWaterMark(page);
   CHECK_EQ(0u, shrunk);
@@ -669,8 +725,8 @@
 
   // Reset space so high water mark and fillers are consistent.
   PagedSpace* old_space = CcTest::heap()->old_space();
+  old_space->FreeLinearAllocationArea();
   old_space->ResetFreeList();
-  old_space->EmptyAllocationInfo();
 
   HeapObject* filler =
       HeapObject::FromAddress(array->address() + array->Size());
@@ -696,8 +752,8 @@
 
   // Reset space so high water mark and fillers are consistent.
   PagedSpace* old_space = CcTest::heap()->old_space();
+  old_space->FreeLinearAllocationArea();
   old_space->ResetFreeList();
-  old_space->EmptyAllocationInfo();
 
   HeapObject* filler =
       HeapObject::FromAddress(array->address() + array->Size());
@@ -707,7 +763,6 @@
   CHECK_EQ(0u, shrunk);
 }
 
-}  // namespace test_spaces
 }  // namespace heap
 }  // namespace internal
 }  // namespace v8
diff --git a/src/v8/test/cctest/interpreter/bytecode-expectations-printer.h b/src/v8/test/cctest/interpreter/bytecode-expectations-printer.h
index 89f79d3..be5b143 100644
--- a/src/v8/test/cctest/interpreter/bytecode-expectations-printer.h
+++ b/src/v8/test/cctest/interpreter/bytecode-expectations-printer.h
@@ -18,6 +18,7 @@
 
 namespace internal {
 
+class BytecodeArray;
 class SourcePositionTableIterator;
 
 namespace interpreter {
diff --git a/src/v8/test/cctest/interpreter/bytecode_expectations/ArrayLiterals.golden b/src/v8/test/cctest/interpreter/bytecode_expectations/ArrayLiterals.golden
index e5de344..5687804 100644
--- a/src/v8/test/cctest/interpreter/bytecode_expectations/ArrayLiterals.golden
+++ b/src/v8/test/cctest/interpreter/bytecode_expectations/ArrayLiterals.golden
@@ -34,17 +34,17 @@
   /*   30 E> */ B(StackCheck),
   /*   42 S> */ B(LdaSmi), I8(1),
                 B(Star), R(0),
-  /*   45 S> */ B(CreateArrayLiteral), U8(0), U8(1), U8(37),
+  /*   45 S> */ B(CreateArrayLiteral), U8(0), U8(0), U8(37),
                 B(Star), R(2),
                 B(LdaZero),
                 B(Star), R(1),
                 B(Ldar), R(0),
-  /*   54 E> */ B(StaKeyedProperty), R(2), R(1), U8(2),
+  /*   54 E> */ B(StaKeyedProperty), R(2), R(1), U8(1),
                 B(LdaSmi), I8(1),
                 B(Star), R(1),
                 B(Ldar), R(0),
-  /*   59 E> */ B(AddSmi), I8(1), U8(0),
-                B(StaKeyedProperty), R(2), R(1), U8(2),
+  /*   59 E> */ B(AddSmi), I8(1), U8(3),
+                B(StaKeyedProperty), R(2), R(1), U8(1),
                 B(Ldar), R(2),
   /*   65 S> */ B(Return),
 ]
@@ -63,7 +63,7 @@
 bytecode array length: 6
 bytecodes: [
   /*   30 E> */ B(StackCheck),
-  /*   34 S> */ B(CreateArrayLiteral), U8(0), U8(2), U8(4),
+  /*   34 S> */ B(CreateArrayLiteral), U8(0), U8(0), U8(4),
   /*   61 S> */ B(Return),
 ]
 constant pool: [
@@ -83,29 +83,29 @@
   /*   30 E> */ B(StackCheck),
   /*   42 S> */ B(LdaSmi), I8(1),
                 B(Star), R(0),
-  /*   45 S> */ B(CreateArrayLiteral), U8(0), U8(7), U8(4),
+  /*   45 S> */ B(CreateArrayLiteral), U8(0), U8(0), U8(4),
                 B(Star), R(2),
                 B(LdaZero),
                 B(Star), R(1),
-                B(CreateArrayLiteral), U8(1), U8(0), U8(37),
+                B(CreateArrayLiteral), U8(1), U8(3), U8(37),
                 B(Star), R(4),
                 B(LdaZero),
                 B(Star), R(3),
                 B(Ldar), R(0),
-  /*   56 E> */ B(StaKeyedProperty), R(4), R(3), U8(1),
+  /*   56 E> */ B(StaKeyedProperty), R(4), R(3), U8(4),
                 B(Ldar), R(4),
-                B(StaKeyedProperty), R(2), R(1), U8(8),
+                B(StaKeyedProperty), R(2), R(1), U8(1),
                 B(LdaSmi), I8(1),
                 B(Star), R(1),
-                B(CreateArrayLiteral), U8(2), U8(4), U8(37),
+                B(CreateArrayLiteral), U8(2), U8(6), U8(37),
                 B(Star), R(4),
                 B(LdaZero),
                 B(Star), R(3),
                 B(Ldar), R(0),
-  /*   68 E> */ B(AddSmi), I8(2), U8(3),
-                B(StaKeyedProperty), R(4), R(3), U8(5),
+  /*   68 E> */ B(AddSmi), I8(2), U8(9),
+                B(StaKeyedProperty), R(4), R(3), U8(7),
                 B(Ldar), R(4),
-                B(StaKeyedProperty), R(2), R(1), U8(8),
+                B(StaKeyedProperty), R(2), R(1), U8(1),
                 B(Ldar), R(2),
   /*   76 S> */ B(Return),
 ]
diff --git a/src/v8/test/cctest/interpreter/bytecode_expectations/ArrayLiteralsWide.golden b/src/v8/test/cctest/interpreter/bytecode_expectations/ArrayLiteralsWide.golden
deleted file mode 100644
index f29f5b3..0000000
--- a/src/v8/test/cctest/interpreter/bytecode_expectations/ArrayLiteralsWide.golden
+++ /dev/null
@@ -1,1050 +0,0 @@
-#
-# Autogenerated by generate-bytecode-expectations.
-#
-
----
-wrap: yes
-
----
-snippet: "
-  var a;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  return [ 1 , 2 ];
-"
-frame size: 1
-parameter count: 1
-bytecode array length: 1033
-bytecodes: [
-  /*   30 E> */ B(StackCheck),
-  /*   41 S> */ B(LdaConstant), U8(0),
-                B(Star), R(0),
-  /*   51 S> */ B(LdaConstant), U8(1),
-                B(Star), R(0),
-  /*   61 S> */ B(LdaConstant), U8(2),
-                B(Star), R(0),
-  /*   71 S> */ B(LdaConstant), U8(3),
-                B(Star), R(0),
-  /*   81 S> */ B(LdaConstant), U8(4),
-                B(Star), R(0),
-  /*   91 S> */ B(LdaConstant), U8(5),
-                B(Star), R(0),
-  /*  101 S> */ B(LdaConstant), U8(6),
-                B(Star), R(0),
-  /*  111 S> */ B(LdaConstant), U8(7),
-                B(Star), R(0),
-  /*  121 S> */ B(LdaConstant), U8(8),
-                B(Star), R(0),
-  /*  131 S> */ B(LdaConstant), U8(9),
-                B(Star), R(0),
-  /*  141 S> */ B(LdaConstant), U8(10),
-                B(Star), R(0),
-  /*  151 S> */ B(LdaConstant), U8(11),
-                B(Star), R(0),
-  /*  161 S> */ B(LdaConstant), U8(12),
-                B(Star), R(0),
-  /*  171 S> */ B(LdaConstant), U8(13),
-                B(Star), R(0),
-  /*  181 S> */ B(LdaConstant), U8(14),
-                B(Star), R(0),
-  /*  191 S> */ B(LdaConstant), U8(15),
-                B(Star), R(0),
-  /*  201 S> */ B(LdaConstant), U8(16),
-                B(Star), R(0),
-  /*  211 S> */ B(LdaConstant), U8(17),
-                B(Star), R(0),
-  /*  221 S> */ B(LdaConstant), U8(18),
-                B(Star), R(0),
-  /*  231 S> */ B(LdaConstant), U8(19),
-                B(Star), R(0),
-  /*  241 S> */ B(LdaConstant), U8(20),
-                B(Star), R(0),
-  /*  251 S> */ B(LdaConstant), U8(21),
-                B(Star), R(0),
-  /*  261 S> */ B(LdaConstant), U8(22),
-                B(Star), R(0),
-  /*  271 S> */ B(LdaConstant), U8(23),
-                B(Star), R(0),
-  /*  281 S> */ B(LdaConstant), U8(24),
-                B(Star), R(0),
-  /*  291 S> */ B(LdaConstant), U8(25),
-                B(Star), R(0),
-  /*  301 S> */ B(LdaConstant), U8(26),
-                B(Star), R(0),
-  /*  311 S> */ B(LdaConstant), U8(27),
-                B(Star), R(0),
-  /*  321 S> */ B(LdaConstant), U8(28),
-                B(Star), R(0),
-  /*  331 S> */ B(LdaConstant), U8(29),
-                B(Star), R(0),
-  /*  341 S> */ B(LdaConstant), U8(30),
-                B(Star), R(0),
-  /*  351 S> */ B(LdaConstant), U8(31),
-                B(Star), R(0),
-  /*  361 S> */ B(LdaConstant), U8(32),
-                B(Star), R(0),
-  /*  371 S> */ B(LdaConstant), U8(33),
-                B(Star), R(0),
-  /*  381 S> */ B(LdaConstant), U8(34),
-                B(Star), R(0),
-  /*  391 S> */ B(LdaConstant), U8(35),
-                B(Star), R(0),
-  /*  401 S> */ B(LdaConstant), U8(36),
-                B(Star), R(0),
-  /*  411 S> */ B(LdaConstant), U8(37),
-                B(Star), R(0),
-  /*  421 S> */ B(LdaConstant), U8(38),
-                B(Star), R(0),
-  /*  431 S> */ B(LdaConstant), U8(39),
-                B(Star), R(0),
-  /*  441 S> */ B(LdaConstant), U8(40),
-                B(Star), R(0),
-  /*  451 S> */ B(LdaConstant), U8(41),
-                B(Star), R(0),
-  /*  461 S> */ B(LdaConstant), U8(42),
-                B(Star), R(0),
-  /*  471 S> */ B(LdaConstant), U8(43),
-                B(Star), R(0),
-  /*  481 S> */ B(LdaConstant), U8(44),
-                B(Star), R(0),
-  /*  491 S> */ B(LdaConstant), U8(45),
-                B(Star), R(0),
-  /*  501 S> */ B(LdaConstant), U8(46),
-                B(Star), R(0),
-  /*  511 S> */ B(LdaConstant), U8(47),
-                B(Star), R(0),
-  /*  521 S> */ B(LdaConstant), U8(48),
-                B(Star), R(0),
-  /*  531 S> */ B(LdaConstant), U8(49),
-                B(Star), R(0),
-  /*  541 S> */ B(LdaConstant), U8(50),
-                B(Star), R(0),
-  /*  551 S> */ B(LdaConstant), U8(51),
-                B(Star), R(0),
-  /*  561 S> */ B(LdaConstant), U8(52),
-                B(Star), R(0),
-  /*  571 S> */ B(LdaConstant), U8(53),
-                B(Star), R(0),
-  /*  581 S> */ B(LdaConstant), U8(54),
-                B(Star), R(0),
-  /*  591 S> */ B(LdaConstant), U8(55),
-                B(Star), R(0),
-  /*  601 S> */ B(LdaConstant), U8(56),
-                B(Star), R(0),
-  /*  611 S> */ B(LdaConstant), U8(57),
-                B(Star), R(0),
-  /*  621 S> */ B(LdaConstant), U8(58),
-                B(Star), R(0),
-  /*  631 S> */ B(LdaConstant), U8(59),
-                B(Star), R(0),
-  /*  641 S> */ B(LdaConstant), U8(60),
-                B(Star), R(0),
-  /*  651 S> */ B(LdaConstant), U8(61),
-                B(Star), R(0),
-  /*  661 S> */ B(LdaConstant), U8(62),
-                B(Star), R(0),
-  /*  671 S> */ B(LdaConstant), U8(63),
-                B(Star), R(0),
-  /*  681 S> */ B(LdaConstant), U8(64),
-                B(Star), R(0),
-  /*  691 S> */ B(LdaConstant), U8(65),
-                B(Star), R(0),
-  /*  701 S> */ B(LdaConstant), U8(66),
-                B(Star), R(0),
-  /*  711 S> */ B(LdaConstant), U8(67),
-                B(Star), R(0),
-  /*  721 S> */ B(LdaConstant), U8(68),
-                B(Star), R(0),
-  /*  731 S> */ B(LdaConstant), U8(69),
-                B(Star), R(0),
-  /*  741 S> */ B(LdaConstant), U8(70),
-                B(Star), R(0),
-  /*  751 S> */ B(LdaConstant), U8(71),
-                B(Star), R(0),
-  /*  761 S> */ B(LdaConstant), U8(72),
-                B(Star), R(0),
-  /*  771 S> */ B(LdaConstant), U8(73),
-                B(Star), R(0),
-  /*  781 S> */ B(LdaConstant), U8(74),
-                B(Star), R(0),
-  /*  791 S> */ B(LdaConstant), U8(75),
-                B(Star), R(0),
-  /*  801 S> */ B(LdaConstant), U8(76),
-                B(Star), R(0),
-  /*  811 S> */ B(LdaConstant), U8(77),
-                B(Star), R(0),
-  /*  821 S> */ B(LdaConstant), U8(78),
-                B(Star), R(0),
-  /*  831 S> */ B(LdaConstant), U8(79),
-                B(Star), R(0),
-  /*  841 S> */ B(LdaConstant), U8(80),
-                B(Star), R(0),
-  /*  851 S> */ B(LdaConstant), U8(81),
-                B(Star), R(0),
-  /*  861 S> */ B(LdaConstant), U8(82),
-                B(Star), R(0),
-  /*  871 S> */ B(LdaConstant), U8(83),
-                B(Star), R(0),
-  /*  881 S> */ B(LdaConstant), U8(84),
-                B(Star), R(0),
-  /*  891 S> */ B(LdaConstant), U8(85),
-                B(Star), R(0),
-  /*  901 S> */ B(LdaConstant), U8(86),
-                B(Star), R(0),
-  /*  911 S> */ B(LdaConstant), U8(87),
-                B(Star), R(0),
-  /*  921 S> */ B(LdaConstant), U8(88),
-                B(Star), R(0),
-  /*  931 S> */ B(LdaConstant), U8(89),
-                B(Star), R(0),
-  /*  941 S> */ B(LdaConstant), U8(90),
-                B(Star), R(0),
-  /*  951 S> */ B(LdaConstant), U8(91),
-                B(Star), R(0),
-  /*  961 S> */ B(LdaConstant), U8(92),
-                B(Star), R(0),
-  /*  971 S> */ B(LdaConstant), U8(93),
-                B(Star), R(0),
-  /*  981 S> */ B(LdaConstant), U8(94),
-                B(Star), R(0),
-  /*  991 S> */ B(LdaConstant), U8(95),
-                B(Star), R(0),
-  /* 1001 S> */ B(LdaConstant), U8(96),
-                B(Star), R(0),
-  /* 1011 S> */ B(LdaConstant), U8(97),
-                B(Star), R(0),
-  /* 1021 S> */ B(LdaConstant), U8(98),
-                B(Star), R(0),
-  /* 1031 S> */ B(LdaConstant), U8(99),
-                B(Star), R(0),
-  /* 1041 S> */ B(LdaConstant), U8(100),
-                B(Star), R(0),
-  /* 1051 S> */ B(LdaConstant), U8(101),
-                B(Star), R(0),
-  /* 1061 S> */ B(LdaConstant), U8(102),
-                B(Star), R(0),
-  /* 1071 S> */ B(LdaConstant), U8(103),
-                B(Star), R(0),
-  /* 1081 S> */ B(LdaConstant), U8(104),
-                B(Star), R(0),
-  /* 1091 S> */ B(LdaConstant), U8(105),
-                B(Star), R(0),
-  /* 1101 S> */ B(LdaConstant), U8(106),
-                B(Star), R(0),
-  /* 1111 S> */ B(LdaConstant), U8(107),
-                B(Star), R(0),
-  /* 1121 S> */ B(LdaConstant), U8(108),
-                B(Star), R(0),
-  /* 1131 S> */ B(LdaConstant), U8(109),
-                B(Star), R(0),
-  /* 1141 S> */ B(LdaConstant), U8(110),
-                B(Star), R(0),
-  /* 1151 S> */ B(LdaConstant), U8(111),
-                B(Star), R(0),
-  /* 1161 S> */ B(LdaConstant), U8(112),
-                B(Star), R(0),
-  /* 1171 S> */ B(LdaConstant), U8(113),
-                B(Star), R(0),
-  /* 1181 S> */ B(LdaConstant), U8(114),
-                B(Star), R(0),
-  /* 1191 S> */ B(LdaConstant), U8(115),
-                B(Star), R(0),
-  /* 1201 S> */ B(LdaConstant), U8(116),
-                B(Star), R(0),
-  /* 1211 S> */ B(LdaConstant), U8(117),
-                B(Star), R(0),
-  /* 1221 S> */ B(LdaConstant), U8(118),
-                B(Star), R(0),
-  /* 1231 S> */ B(LdaConstant), U8(119),
-                B(Star), R(0),
-  /* 1241 S> */ B(LdaConstant), U8(120),
-                B(Star), R(0),
-  /* 1251 S> */ B(LdaConstant), U8(121),
-                B(Star), R(0),
-  /* 1261 S> */ B(LdaConstant), U8(122),
-                B(Star), R(0),
-  /* 1271 S> */ B(LdaConstant), U8(123),
-                B(Star), R(0),
-  /* 1281 S> */ B(LdaConstant), U8(124),
-                B(Star), R(0),
-  /* 1291 S> */ B(LdaConstant), U8(125),
-                B(Star), R(0),
-  /* 1301 S> */ B(LdaConstant), U8(126),
-                B(Star), R(0),
-  /* 1311 S> */ B(LdaConstant), U8(127),
-                B(Star), R(0),
-  /* 1321 S> */ B(LdaConstant), U8(128),
-                B(Star), R(0),
-  /* 1331 S> */ B(LdaConstant), U8(129),
-                B(Star), R(0),
-  /* 1341 S> */ B(LdaConstant), U8(130),
-                B(Star), R(0),
-  /* 1351 S> */ B(LdaConstant), U8(131),
-                B(Star), R(0),
-  /* 1361 S> */ B(LdaConstant), U8(132),
-                B(Star), R(0),
-  /* 1371 S> */ B(LdaConstant), U8(133),
-                B(Star), R(0),
-  /* 1381 S> */ B(LdaConstant), U8(134),
-                B(Star), R(0),
-  /* 1391 S> */ B(LdaConstant), U8(135),
-                B(Star), R(0),
-  /* 1401 S> */ B(LdaConstant), U8(136),
-                B(Star), R(0),
-  /* 1411 S> */ B(LdaConstant), U8(137),
-                B(Star), R(0),
-  /* 1421 S> */ B(LdaConstant), U8(138),
-                B(Star), R(0),
-  /* 1431 S> */ B(LdaConstant), U8(139),
-                B(Star), R(0),
-  /* 1441 S> */ B(LdaConstant), U8(140),
-                B(Star), R(0),
-  /* 1451 S> */ B(LdaConstant), U8(141),
-                B(Star), R(0),
-  /* 1461 S> */ B(LdaConstant), U8(142),
-                B(Star), R(0),
-  /* 1471 S> */ B(LdaConstant), U8(143),
-                B(Star), R(0),
-  /* 1481 S> */ B(LdaConstant), U8(144),
-                B(Star), R(0),
-  /* 1491 S> */ B(LdaConstant), U8(145),
-                B(Star), R(0),
-  /* 1501 S> */ B(LdaConstant), U8(146),
-                B(Star), R(0),
-  /* 1511 S> */ B(LdaConstant), U8(147),
-                B(Star), R(0),
-  /* 1521 S> */ B(LdaConstant), U8(148),
-                B(Star), R(0),
-  /* 1531 S> */ B(LdaConstant), U8(149),
-                B(Star), R(0),
-  /* 1541 S> */ B(LdaConstant), U8(150),
-                B(Star), R(0),
-  /* 1551 S> */ B(LdaConstant), U8(151),
-                B(Star), R(0),
-  /* 1561 S> */ B(LdaConstant), U8(152),
-                B(Star), R(0),
-  /* 1571 S> */ B(LdaConstant), U8(153),
-                B(Star), R(0),
-  /* 1581 S> */ B(LdaConstant), U8(154),
-                B(Star), R(0),
-  /* 1591 S> */ B(LdaConstant), U8(155),
-                B(Star), R(0),
-  /* 1601 S> */ B(LdaConstant), U8(156),
-                B(Star), R(0),
-  /* 1611 S> */ B(LdaConstant), U8(157),
-                B(Star), R(0),
-  /* 1621 S> */ B(LdaConstant), U8(158),
-                B(Star), R(0),
-  /* 1631 S> */ B(LdaConstant), U8(159),
-                B(Star), R(0),
-  /* 1641 S> */ B(LdaConstant), U8(160),
-                B(Star), R(0),
-  /* 1651 S> */ B(LdaConstant), U8(161),
-                B(Star), R(0),
-  /* 1661 S> */ B(LdaConstant), U8(162),
-                B(Star), R(0),
-  /* 1671 S> */ B(LdaConstant), U8(163),
-                B(Star), R(0),
-  /* 1681 S> */ B(LdaConstant), U8(164),
-                B(Star), R(0),
-  /* 1691 S> */ B(LdaConstant), U8(165),
-                B(Star), R(0),
-  /* 1701 S> */ B(LdaConstant), U8(166),
-                B(Star), R(0),
-  /* 1711 S> */ B(LdaConstant), U8(167),
-                B(Star), R(0),
-  /* 1721 S> */ B(LdaConstant), U8(168),
-                B(Star), R(0),
-  /* 1731 S> */ B(LdaConstant), U8(169),
-                B(Star), R(0),
-  /* 1741 S> */ B(LdaConstant), U8(170),
-                B(Star), R(0),
-  /* 1751 S> */ B(LdaConstant), U8(171),
-                B(Star), R(0),
-  /* 1761 S> */ B(LdaConstant), U8(172),
-                B(Star), R(0),
-  /* 1771 S> */ B(LdaConstant), U8(173),
-                B(Star), R(0),
-  /* 1781 S> */ B(LdaConstant), U8(174),
-                B(Star), R(0),
-  /* 1791 S> */ B(LdaConstant), U8(175),
-                B(Star), R(0),
-  /* 1801 S> */ B(LdaConstant), U8(176),
-                B(Star), R(0),
-  /* 1811 S> */ B(LdaConstant), U8(177),
-                B(Star), R(0),
-  /* 1821 S> */ B(LdaConstant), U8(178),
-                B(Star), R(0),
-  /* 1831 S> */ B(LdaConstant), U8(179),
-                B(Star), R(0),
-  /* 1841 S> */ B(LdaConstant), U8(180),
-                B(Star), R(0),
-  /* 1851 S> */ B(LdaConstant), U8(181),
-                B(Star), R(0),
-  /* 1861 S> */ B(LdaConstant), U8(182),
-                B(Star), R(0),
-  /* 1871 S> */ B(LdaConstant), U8(183),
-                B(Star), R(0),
-  /* 1881 S> */ B(LdaConstant), U8(184),
-                B(Star), R(0),
-  /* 1891 S> */ B(LdaConstant), U8(185),
-                B(Star), R(0),
-  /* 1901 S> */ B(LdaConstant), U8(186),
-                B(Star), R(0),
-  /* 1911 S> */ B(LdaConstant), U8(187),
-                B(Star), R(0),
-  /* 1921 S> */ B(LdaConstant), U8(188),
-                B(Star), R(0),
-  /* 1931 S> */ B(LdaConstant), U8(189),
-                B(Star), R(0),
-  /* 1941 S> */ B(LdaConstant), U8(190),
-                B(Star), R(0),
-  /* 1951 S> */ B(LdaConstant), U8(191),
-                B(Star), R(0),
-  /* 1961 S> */ B(LdaConstant), U8(192),
-                B(Star), R(0),
-  /* 1971 S> */ B(LdaConstant), U8(193),
-                B(Star), R(0),
-  /* 1981 S> */ B(LdaConstant), U8(194),
-                B(Star), R(0),
-  /* 1991 S> */ B(LdaConstant), U8(195),
-                B(Star), R(0),
-  /* 2001 S> */ B(LdaConstant), U8(196),
-                B(Star), R(0),
-  /* 2011 S> */ B(LdaConstant), U8(197),
-                B(Star), R(0),
-  /* 2021 S> */ B(LdaConstant), U8(198),
-                B(Star), R(0),
-  /* 2031 S> */ B(LdaConstant), U8(199),
-                B(Star), R(0),
-  /* 2041 S> */ B(LdaConstant), U8(200),
-                B(Star), R(0),
-  /* 2051 S> */ B(LdaConstant), U8(201),
-                B(Star), R(0),
-  /* 2061 S> */ B(LdaConstant), U8(202),
-                B(Star), R(0),
-  /* 2071 S> */ B(LdaConstant), U8(203),
-                B(Star), R(0),
-  /* 2081 S> */ B(LdaConstant), U8(204),
-                B(Star), R(0),
-  /* 2091 S> */ B(LdaConstant), U8(205),
-                B(Star), R(0),
-  /* 2101 S> */ B(LdaConstant), U8(206),
-                B(Star), R(0),
-  /* 2111 S> */ B(LdaConstant), U8(207),
-                B(Star), R(0),
-  /* 2121 S> */ B(LdaConstant), U8(208),
-                B(Star), R(0),
-  /* 2131 S> */ B(LdaConstant), U8(209),
-                B(Star), R(0),
-  /* 2141 S> */ B(LdaConstant), U8(210),
-                B(Star), R(0),
-  /* 2151 S> */ B(LdaConstant), U8(211),
-                B(Star), R(0),
-  /* 2161 S> */ B(LdaConstant), U8(212),
-                B(Star), R(0),
-  /* 2171 S> */ B(LdaConstant), U8(213),
-                B(Star), R(0),
-  /* 2181 S> */ B(LdaConstant), U8(214),
-                B(Star), R(0),
-  /* 2191 S> */ B(LdaConstant), U8(215),
-                B(Star), R(0),
-  /* 2201 S> */ B(LdaConstant), U8(216),
-                B(Star), R(0),
-  /* 2211 S> */ B(LdaConstant), U8(217),
-                B(Star), R(0),
-  /* 2221 S> */ B(LdaConstant), U8(218),
-                B(Star), R(0),
-  /* 2231 S> */ B(LdaConstant), U8(219),
-                B(Star), R(0),
-  /* 2241 S> */ B(LdaConstant), U8(220),
-                B(Star), R(0),
-  /* 2251 S> */ B(LdaConstant), U8(221),
-                B(Star), R(0),
-  /* 2261 S> */ B(LdaConstant), U8(222),
-                B(Star), R(0),
-  /* 2271 S> */ B(LdaConstant), U8(223),
-                B(Star), R(0),
-  /* 2281 S> */ B(LdaConstant), U8(224),
-                B(Star), R(0),
-  /* 2291 S> */ B(LdaConstant), U8(225),
-                B(Star), R(0),
-  /* 2301 S> */ B(LdaConstant), U8(226),
-                B(Star), R(0),
-  /* 2311 S> */ B(LdaConstant), U8(227),
-                B(Star), R(0),
-  /* 2321 S> */ B(LdaConstant), U8(228),
-                B(Star), R(0),
-  /* 2331 S> */ B(LdaConstant), U8(229),
-                B(Star), R(0),
-  /* 2341 S> */ B(LdaConstant), U8(230),
-                B(Star), R(0),
-  /* 2351 S> */ B(LdaConstant), U8(231),
-                B(Star), R(0),
-  /* 2361 S> */ B(LdaConstant), U8(232),
-                B(Star), R(0),
-  /* 2371 S> */ B(LdaConstant), U8(233),
-                B(Star), R(0),
-  /* 2381 S> */ B(LdaConstant), U8(234),
-                B(Star), R(0),
-  /* 2391 S> */ B(LdaConstant), U8(235),
-                B(Star), R(0),
-  /* 2401 S> */ B(LdaConstant), U8(236),
-                B(Star), R(0),
-  /* 2411 S> */ B(LdaConstant), U8(237),
-                B(Star), R(0),
-  /* 2421 S> */ B(LdaConstant), U8(238),
-                B(Star), R(0),
-  /* 2431 S> */ B(LdaConstant), U8(239),
-                B(Star), R(0),
-  /* 2441 S> */ B(LdaConstant), U8(240),
-                B(Star), R(0),
-  /* 2451 S> */ B(LdaConstant), U8(241),
-                B(Star), R(0),
-  /* 2461 S> */ B(LdaConstant), U8(242),
-                B(Star), R(0),
-  /* 2471 S> */ B(LdaConstant), U8(243),
-                B(Star), R(0),
-  /* 2481 S> */ B(LdaConstant), U8(244),
-                B(Star), R(0),
-  /* 2491 S> */ B(LdaConstant), U8(245),
-                B(Star), R(0),
-  /* 2501 S> */ B(LdaConstant), U8(246),
-                B(Star), R(0),
-  /* 2511 S> */ B(LdaConstant), U8(247),
-                B(Star), R(0),
-  /* 2521 S> */ B(LdaConstant), U8(248),
-                B(Star), R(0),
-  /* 2531 S> */ B(LdaConstant), U8(249),
-                B(Star), R(0),
-  /* 2541 S> */ B(LdaConstant), U8(250),
-                B(Star), R(0),
-  /* 2551 S> */ B(LdaConstant), U8(251),
-                B(Star), R(0),
-  /* 2561 S> */ B(LdaConstant), U8(252),
-                B(Star), R(0),
-  /* 2571 S> */ B(LdaConstant), U8(253),
-                B(Star), R(0),
-  /* 2581 S> */ B(LdaConstant), U8(254),
-                B(Star), R(0),
-  /* 2591 S> */ B(LdaConstant), U8(255),
-                B(Star), R(0),
-  /* 2601 S> */ B(Wide), B(CreateArrayLiteral), U16(256), U16(0), U8(37),
-  /* 2618 S> */ B(Return),
-]
-constant pool: [
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  TUPLE2_TYPE,
-]
-handlers: [
-]
-
diff --git a/src/v8/test/cctest/interpreter/bytecode_expectations/AssignmentsInBinaryExpression.golden b/src/v8/test/cctest/interpreter/bytecode_expectations/AssignmentsInBinaryExpression.golden
index 925795a..07d2ea7 100644
--- a/src/v8/test/cctest/interpreter/bytecode_expectations/AssignmentsInBinaryExpression.golden
+++ b/src/v8/test/cctest/interpreter/bytecode_expectations/AssignmentsInBinaryExpression.golden
@@ -102,11 +102,11 @@
                 B(Star), R(0),
   /*   46 S> */ B(LdaSmi), I8(56),
                 B(Star), R(0),
-  /*   59 E> */ B(Sub), R(0), U8(0),
+  /*   59 E> */ B(Sub), R(0), U8(1),
                 B(Star), R(1),
                 B(LdaSmi), I8(57),
                 B(Star), R(0),
-  /*   63 E> */ B(Add), R(1), U8(1),
+  /*   63 E> */ B(Add), R(1), U8(0),
                 B(Star), R(0),
   /*   75 S> */ B(Inc), U8(2),
                 B(Star), R(0),
@@ -203,11 +203,11 @@
   /*   63 E> */ B(Add), R(2), U8(0),
                 B(Star), R(2),
                 B(Ldar), R(0),
-  /*   78 E> */ B(AddSmi), I8(1), U8(1),
+  /*   78 E> */ B(AddSmi), I8(1), U8(2),
                 B(Star), R(3),
                 B(LdaSmi), I8(2),
                 B(Star), R(1),
-  /*   83 E> */ B(Mul), R(3), U8(2),
+  /*   83 E> */ B(Mul), R(3), U8(1),
   /*   73 E> */ B(Add), R(2), U8(3),
                 B(Star), R(2),
                 B(LdaSmi), I8(3),
@@ -249,7 +249,7 @@
   /*   55 E> */ B(Add), R(1), U8(0),
                 B(Star), R(1),
                 B(Ldar), R(0),
-                B(ToNumber), U8(1),
+                B(ToNumeric), U8(1),
                 B(Star), R(2),
                 B(Inc), U8(1),
                 B(Star), R(0),
diff --git a/src/v8/test/cctest/interpreter/bytecode_expectations/AsyncGenerators.golden b/src/v8/test/cctest/interpreter/bytecode_expectations/AsyncGenerators.golden
index 314ec61..50d084f 100644
--- a/src/v8/test/cctest/interpreter/bytecode_expectations/AsyncGenerators.golden
+++ b/src/v8/test/cctest/interpreter/bytecode_expectations/AsyncGenerators.golden
@@ -14,7 +14,7 @@
 "
 frame size: 9
 parameter count: 1
-bytecode array length: 230
+bytecode array length: 216
 bytecodes: [
                 B(Ldar), R(0),
                 B(JumpIfUndefined), U8(18),
@@ -23,7 +23,7 @@
                 B(RestoreGeneratorState), R(0),
                 B(Star), R(1),
                 B(SwitchOnSmiNoFeedback), U8(0), U8(2), I8(0),
-                B(Abort), U8(45),
+                B(Abort), U8(15),
                 B(LdaSmi), I8(-2),
                 B(Star), R(1),
                 B(Mov), R(closure), R(2),
@@ -36,10 +36,7 @@
                 B(Ldar), R(0),
   /*   17 E> */ B(SuspendGenerator), R(0), R(0), U8(6), U8(0),
   /*   22 S> */ B(Return),
-                B(RestoreGeneratorRegisters), R(0), R(0), U8(6),
-                B(LdaSmi), I8(-2),
-                B(Star), R(1),
-                B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(0), U8(1),
+                B(ResumeGenerator), R(0), R(1), R(0), U8(6),
                 B(Star), R(6),
                 B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
                 B(SwitchOnSmiNoFeedback), U8(2), U8(2), I8(0),
@@ -48,17 +45,14 @@
                 B(LdaZero),
                 B(Star), R(2),
                 B(Mov), R(6), R(3),
-                B(Jump), U8(107),
+                B(Jump), U8(100),
                 B(LdaUndefined),
                 B(Star), R(7),
                 B(Mov), R(0), R(6),
                 B(CallJSRuntime), U8(%async_generator_await_uncaught), R(6), U8(2),
                 B(SuspendGenerator), R(0), R(0), U8(6), U8(1),
   /*   22 S> */ B(Return),
-                B(RestoreGeneratorRegisters), R(0), R(0), U8(6),
-                B(LdaSmi), I8(-2),
-                B(Star), R(1),
-                B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(0), U8(1),
+                B(ResumeGenerator), R(0), R(1), R(0), U8(6),
                 B(Star), R(6),
                 B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
                 B(Star), R(7),
@@ -120,7 +114,7 @@
 ]
 constant pool: [
   Smi [37],
-  Smi [86],
+  Smi [79],
   Smi [15],
   Smi [7],
   ONE_BYTE_INTERNALIZED_STRING_TYPE [".catch"],
@@ -130,8 +124,8 @@
   Smi [23],
 ]
 handlers: [
-  [40, 175, 183],
-  [43, 136, 138],
+  [40, 161, 169],
+  [43, 122, 124],
 ]
 
 ---
@@ -141,7 +135,7 @@
 "
 frame size: 9
 parameter count: 1
-bytecode array length: 283
+bytecode array length: 262
 bytecodes: [
                 B(Ldar), R(0),
                 B(JumpIfUndefined), U8(18),
@@ -150,7 +144,7 @@
                 B(RestoreGeneratorState), R(0),
                 B(Star), R(1),
                 B(SwitchOnSmiNoFeedback), U8(0), U8(3), I8(0),
-                B(Abort), U8(45),
+                B(Abort), U8(15),
                 B(LdaSmi), I8(-2),
                 B(Star), R(1),
                 B(Mov), R(closure), R(2),
@@ -163,10 +157,7 @@
                 B(Ldar), R(0),
   /*   17 E> */ B(SuspendGenerator), R(0), R(0), U8(6), U8(0),
   /*   31 S> */ B(Return),
-                B(RestoreGeneratorRegisters), R(0), R(0), U8(6),
-                B(LdaSmi), I8(-2),
-                B(Star), R(1),
-                B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(0), U8(1),
+                B(ResumeGenerator), R(0), R(1), R(0), U8(6),
                 B(Star), R(6),
                 B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
                 B(SwitchOnSmiNoFeedback), U8(3), U8(2), I8(0),
@@ -175,7 +166,7 @@
                 B(LdaZero),
                 B(Star), R(2),
                 B(Mov), R(6), R(3),
-                B(Jump), U8(160),
+                B(Jump), U8(146),
   /*   22 S> */ B(LdaSmi), I8(42),
                 B(Star), R(7),
                 B(LdaFalse),
@@ -184,10 +175,7 @@
                 B(InvokeIntrinsic), U8(Runtime::k_AsyncGeneratorYield), R(6), U8(3),
                 B(SuspendGenerator), R(0), R(0), U8(6), U8(1),
   /*   31 S> */ B(Return),
-                B(RestoreGeneratorRegisters), R(0), R(0), U8(6),
-                B(LdaSmi), I8(-2),
-                B(Star), R(1),
-                B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(0), U8(1),
+                B(ResumeGenerator), R(0), R(1), R(0), U8(6),
                 B(Star), R(6),
                 B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
                 B(SwitchOnSmiNoFeedback), U8(5), U8(2), I8(0),
@@ -196,17 +184,14 @@
                 B(LdaZero),
                 B(Star), R(2),
                 B(Mov), R(6), R(3),
-                B(Jump), U8(107),
+                B(Jump), U8(100),
                 B(LdaUndefined),
                 B(Star), R(7),
                 B(Mov), R(0), R(6),
                 B(CallJSRuntime), U8(%async_generator_await_uncaught), R(6), U8(2),
                 B(SuspendGenerator), R(0), R(0), U8(6), U8(2),
   /*   31 S> */ B(Return),
-                B(RestoreGeneratorRegisters), R(0), R(0), U8(6),
-                B(LdaSmi), I8(-2),
-                B(Star), R(1),
-                B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(0), U8(1),
+                B(ResumeGenerator), R(0), R(1), R(0), U8(6),
                 B(Star), R(6),
                 B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
                 B(Star), R(7),
@@ -268,8 +253,8 @@
 ]
 constant pool: [
   Smi [37],
-  Smi [90],
-  Smi [139],
+  Smi [83],
+  Smi [125],
   Smi [15],
   Smi [7],
   Smi [15],
@@ -281,8 +266,8 @@
   Smi [23],
 ]
 handlers: [
-  [40, 228, 236],
-  [43, 189, 191],
+  [40, 207, 215],
+  [43, 168, 170],
 ]
 
 ---
@@ -290,263 +275,248 @@
   async function* f() { for (let x of [42]) yield x }
   f();
 "
-frame size: 22
+frame size: 23
 parameter count: 1
-bytecode array length: 571
+bytecode array length: 536
 bytecodes: [
                 B(Ldar), R(2),
                 B(JumpIfUndefined), U8(18),
                 B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetContext), R(2), U8(1),
-                B(PushContext), R(11),
+                B(PushContext), R(12),
                 B(RestoreGeneratorState), R(2),
-                B(Star), R(10),
+                B(Star), R(11),
                 B(SwitchOnSmiNoFeedback), U8(0), U8(3), I8(0),
-                B(Abort), U8(45),
+                B(Abort), U8(15),
                 B(LdaSmi), I8(-2),
-                B(Star), R(10),
-                B(Mov), R(closure), R(11),
-                B(Mov), R(this), R(12),
-                B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(11), U8(2),
+                B(Star), R(11),
+                B(Mov), R(closure), R(12),
+                B(Mov), R(this), R(13),
+                B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(12), U8(2),
                 B(Star), R(2),
   /*   17 E> */ B(StackCheck),
-                B(Mov), R(context), R(13),
                 B(Mov), R(context), R(14),
+                B(Mov), R(context), R(15),
                 B(Ldar), R(2),
-  /*   17 E> */ B(SuspendGenerator), R(2), R(0), U8(15), U8(0),
+  /*   17 E> */ B(SuspendGenerator), R(2), R(0), U8(16), U8(0),
   /*   50 S> */ B(Return),
-                B(RestoreGeneratorRegisters), R(2), R(0), U8(15),
-                B(LdaSmi), I8(-2),
-                B(Star), R(10),
-                B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(2), U8(1),
-                B(Star), R(15),
+                B(ResumeGenerator), R(2), R(11), R(0), U8(16),
+                B(Star), R(16),
                 B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(2), U8(1),
                 B(SwitchOnSmiNoFeedback), U8(3), U8(2), I8(0),
-                B(Ldar), R(15),
+                B(Ldar), R(16),
   /*   17 E> */ B(Throw),
                 B(LdaZero),
-                B(Star), R(11),
-                B(Mov), R(15), R(12),
-                B(JumpConstant), U8(21),
+                B(Star), R(12),
+                B(Mov), R(16), R(13),
+                B(JumpConstant), U8(20),
                 B(LdaZero),
-                B(Star), R(6),
-                B(Mov), R(context), R(17),
+                B(Star), R(7),
                 B(Mov), R(context), R(18),
+                B(Mov), R(context), R(19),
   /*   36 S> */ B(CreateArrayLiteral), U8(5), U8(0), U8(37),
-                B(Star), R(19),
-                B(LdaNamedProperty), R(19), U8(6), U8(1),
                 B(Star), R(20),
-                B(CallProperty0), R(20), R(19), U8(3),
+                B(LdaNamedProperty), R(20), U8(6), U8(1),
+                B(Star), R(21),
+                B(CallProperty0), R(21), R(20), U8(3),
                 B(JumpIfJSReceiver), U8(7),
                 B(CallRuntime), U16(Runtime::kThrowSymbolIteratorInvalid), R(0), U8(0),
                 B(Star), R(4),
-                B(Ldar), R(10),
-                B(SwitchOnSmiNoFeedback), U8(7), U8(1), I8(1),
-                B(LdaSmi), I8(-2),
-  /*   36 E> */ B(TestEqualStrictNoFeedback), R(10),
-                B(JumpIfTrue), U8(4),
-                B(Abort), U8(45),
-  /*   31 S> */ B(LdaNamedProperty), R(4), U8(8), U8(7),
-                B(Star), R(19),
-                B(CallProperty0), R(19), R(4), U8(5),
+  /*   36 E> */ B(LdaNamedProperty), R(4), U8(7), U8(5),
                 B(Star), R(5),
-  /*   31 E> */ B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(5), U8(1),
+                B(Ldar), R(11),
+                B(SwitchOnSmiNoFeedback), U8(8), U8(1), I8(1),
+                B(LdaSmi), I8(-2),
+                B(TestEqualStrictNoFeedback), R(11),
+                B(JumpIfTrue), U8(4),
+                B(Abort), U8(15),
+  /*   31 S> */ B(CallProperty0), R(5), R(4), U8(7),
+                B(Star), R(6),
+  /*   31 E> */ B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(6), U8(1),
                 B(ToBooleanLogicalNot),
                 B(JumpIfFalse), U8(7),
-                B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(5), U8(1),
-                B(LdaNamedProperty), R(5), U8(9), U8(9),
-                B(JumpIfToBooleanTrue), U8(77),
-                B(LdaNamedProperty), R(5), U8(10), U8(11),
-                B(Star), R(7),
+                B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(6), U8(1),
+                B(LdaNamedProperty), R(6), U8(9), U8(9),
+                B(JumpIfToBooleanTrue), U8(70),
+                B(LdaNamedProperty), R(6), U8(10), U8(11),
+                B(Star), R(8),
                 B(LdaSmi), I8(2),
-                B(Star), R(6),
-                B(Mov), R(7), R(3),
+                B(Star), R(7),
+                B(Mov), R(8), R(3),
   /*   22 E> */ B(StackCheck),
                 B(Mov), R(3), R(0),
   /*   42 S> */ B(LdaFalse),
-                B(Star), R(21),
-                B(Mov), R(2), R(19),
-                B(Mov), R(0), R(20),
-                B(InvokeIntrinsic), U8(Runtime::k_AsyncGeneratorYield), R(19), U8(3),
-                B(SuspendGenerator), R(2), R(0), U8(19), U8(1),
+                B(Star), R(22),
+                B(Mov), R(2), R(20),
+                B(Mov), R(0), R(21),
+                B(InvokeIntrinsic), U8(Runtime::k_AsyncGeneratorYield), R(20), U8(3),
+                B(SuspendGenerator), R(2), R(0), U8(20), U8(1),
   /*   50 S> */ B(Return),
-                B(RestoreGeneratorRegisters), R(2), R(0), U8(19),
-                B(LdaSmi), I8(-2),
-                B(Star), R(10),
-                B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(2), U8(1),
-                B(Star), R(19),
+                B(ResumeGenerator), R(2), R(11), R(0), U8(20),
+                B(Star), R(20),
                 B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(2), U8(1),
                 B(SwitchOnSmiNoFeedback), U8(11), U8(2), I8(0),
-                B(Ldar), R(19),
+                B(Ldar), R(20),
   /*   42 E> */ B(Throw),
                 B(LdaZero),
-                B(Star), R(15),
-                B(Mov), R(19), R(16),
+                B(Star), R(16),
+                B(Mov), R(20), R(17),
                 B(Jump), U8(62),
                 B(LdaZero),
-                B(Star), R(6),
-                B(JumpLoop), U8(116), I8(0),
+                B(Star), R(7),
+                B(JumpLoop), U8(103), I8(0),
                 B(Jump), U8(40),
-                B(Star), R(19),
+                B(Star), R(20),
                 B(Ldar), R(closure),
-                B(CreateCatchContext), R(19), U8(13), U8(14),
-                B(Star), R(18),
+                B(CreateCatchContext), R(20), U8(13), U8(14),
+                B(Star), R(19),
                 B(LdaTheHole),
                 B(SetPendingMessage),
-                B(Ldar), R(18),
-                B(PushContext), R(19),
+                B(Ldar), R(19),
+                B(PushContext), R(20),
                 B(LdaSmi), I8(2),
-                B(TestEqualStrict), R(6), U8(13),
+                B(TestEqualStrict), R(7), U8(13),
                 B(JumpIfFalse), U8(6),
                 B(LdaSmi), I8(1),
-                B(Star), R(6),
+                B(Star), R(7),
                 B(LdaImmutableCurrentContextSlot), U8(4),
-                B(Star), R(20),
-                B(CallRuntime), U16(Runtime::kReThrow), R(20), U8(1),
-                B(PopContext), R(19),
+                B(Star), R(21),
+                B(CallRuntime), U16(Runtime::kReThrow), R(21), U8(1),
+                B(PopContext), R(20),
                 B(LdaSmi), I8(-1),
+                B(Star), R(17),
                 B(Star), R(16),
-                B(Star), R(15),
                 B(Jump), U8(8),
-                B(Star), R(16),
+                B(Star), R(17),
                 B(LdaSmi), I8(1),
-                B(Star), R(15),
+                B(Star), R(16),
                 B(LdaTheHole),
                 B(SetPendingMessage),
-                B(Star), R(17),
+                B(Star), R(18),
                 B(LdaZero),
-                B(TestEqualStrict), R(6), U8(14),
-                B(JumpIfTrue), U8(104),
+                B(TestEqualStrict), R(7), U8(14),
+                B(JumpIfTrue), U8(90),
                 B(LdaNamedProperty), R(4), U8(15), U8(15),
-                B(Star), R(8),
+                B(Star), R(9),
                 B(TestUndetectable),
                 B(JumpIfFalse), U8(4),
-                B(Jump), U8(93),
+                B(Jump), U8(79),
                 B(LdaSmi), I8(1),
-                B(TestEqualStrict), R(6), U8(18),
-                B(JumpIfFalse), U8(61),
-                B(Ldar), R(8),
-                B(TestTypeOf), U8(5),
+                B(TestEqualStrict), R(7), U8(17),
+                B(JumpIfFalse), U8(47),
+                B(Ldar), R(9),
+                B(TestTypeOf), U8(6),
                 B(JumpIfFalse), U8(4),
                 B(Jump), U8(18),
-                B(Wide), B(LdaSmi), I16(136),
-                B(Star), R(18),
-                B(LdaConstant), U8(16),
+                B(Wide), B(LdaSmi), I16(144),
                 B(Star), R(19),
-                B(CallRuntime), U16(Runtime::kNewTypeError), R(18), U8(2),
+                B(LdaConstant), U8(16),
+                B(Star), R(20),
+                B(CallRuntime), U16(Runtime::kNewTypeError), R(19), U8(2),
                 B(Throw),
-                B(Mov), R(context), R(18),
-                B(Mov), R(8), R(19),
+                B(Mov), R(context), R(19),
+                B(Mov), R(9), R(20),
+                B(Mov), R(4), R(21),
+                B(InvokeIntrinsic), U8(Runtime::k_Call), R(20), U8(2),
+                B(Jump), U8(6),
+                B(LdaTheHole),
+                B(SetPendingMessage),
+                B(Ldar), R(19),
+                B(Jump), U8(27),
+                B(Mov), R(9), R(19),
                 B(Mov), R(4), R(20),
                 B(InvokeIntrinsic), U8(Runtime::k_Call), R(19), U8(2),
-                B(Jump), U8(20),
-                B(Star), R(19),
-                B(Ldar), R(closure),
-                B(CreateCatchContext), R(19), U8(13), U8(17),
-                B(Star), R(18),
-                B(LdaTheHole),
-                B(SetPendingMessage),
-                B(Ldar), R(18),
-                B(PushContext), R(19),
-                B(PopContext), R(19),
-                B(Jump), U8(27),
-                B(Mov), R(8), R(18),
-                B(Mov), R(4), R(19),
-                B(InvokeIntrinsic), U8(Runtime::k_Call), R(18), U8(2),
-                B(Star), R(9),
-                B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(9), U8(1),
+                B(Star), R(10),
+                B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(10), U8(1),
                 B(JumpIfToBooleanFalse), U8(4),
                 B(Jump), U8(7),
-                B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(9), U8(1),
-                B(Ldar), R(17),
+                B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(10), U8(1),
+                B(Ldar), R(18),
                 B(SetPendingMessage),
-                B(Ldar), R(15),
-                B(SwitchOnSmiNoFeedback), U8(18), U8(2), I8(0),
+                B(Ldar), R(16),
+                B(SwitchOnSmiNoFeedback), U8(17), U8(2), I8(0),
                 B(Jump), U8(13),
                 B(LdaZero),
-                B(Star), R(11),
-                B(Mov), R(16), R(12),
-                B(Jump), U8(110),
-                B(Ldar), R(16),
+                B(Star), R(12),
+                B(Mov), R(17), R(13),
+                B(Jump), U8(103),
+                B(Ldar), R(17),
                 B(ReThrow),
                 B(LdaUndefined),
-                B(Star), R(16),
-                B(Mov), R(2), R(15),
-                B(CallJSRuntime), U8(%async_generator_await_uncaught), R(15), U8(2),
-                B(SuspendGenerator), R(2), R(0), U8(15), U8(2),
-  /*   50 S> */ B(Return),
-                B(RestoreGeneratorRegisters), R(2), R(0), U8(15),
-                B(LdaSmi), I8(-2),
-                B(Star), R(10),
-                B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(2), U8(1),
-                B(Star), R(15),
-                B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(2), U8(1),
-                B(Star), R(16),
-                B(LdaZero),
-                B(TestEqualStrictNoFeedback), R(16),
-                B(JumpIfTrue), U8(5),
-                B(Ldar), R(15),
-                B(ReThrow),
-                B(LdaZero),
-                B(Star), R(11),
-                B(Mov), R(15), R(12),
-                B(Jump), U8(55),
-                B(Jump), U8(39),
-                B(Star), R(15),
-                B(Ldar), R(closure),
-                B(CreateCatchContext), R(15), U8(13), U8(20),
-                B(Star), R(14),
-                B(LdaTheHole),
-                B(SetPendingMessage),
-                B(Ldar), R(14),
-                B(PushContext), R(15),
-                B(LdaImmutableCurrentContextSlot), U8(4),
                 B(Star), R(17),
                 B(Mov), R(2), R(16),
-                B(InvokeIntrinsic), U8(Runtime::k_AsyncGeneratorReject), R(16), U8(2),
-                B(PopContext), R(15),
+                B(CallJSRuntime), U8(%async_generator_await_uncaught), R(16), U8(2),
+                B(SuspendGenerator), R(2), R(0), U8(16), U8(2),
+  /*   50 S> */ B(Return),
+                B(ResumeGenerator), R(2), R(11), R(0), U8(16),
+                B(Star), R(16),
+                B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(2), U8(1),
+                B(Star), R(17),
+                B(LdaZero),
+                B(TestEqualStrictNoFeedback), R(17),
+                B(JumpIfTrue), U8(5),
+                B(Ldar), R(16),
+                B(ReThrow),
+                B(LdaZero),
                 B(Star), R(12),
-                B(LdaSmi), I8(1),
-                B(Star), R(11),
-                B(Jump), U8(16),
-                B(LdaSmi), I8(-1),
-                B(Star), R(12),
-                B(Star), R(11),
-                B(Jump), U8(8),
-                B(Star), R(12),
-                B(LdaSmi), I8(2),
-                B(Star), R(11),
+                B(Mov), R(16), R(13),
+                B(Jump), U8(55),
+                B(Jump), U8(39),
+                B(Star), R(16),
+                B(Ldar), R(closure),
+                B(CreateCatchContext), R(16), U8(13), U8(19),
+                B(Star), R(15),
                 B(LdaTheHole),
                 B(SetPendingMessage),
+                B(Ldar), R(15),
+                B(PushContext), R(16),
+                B(LdaImmutableCurrentContextSlot), U8(4),
+                B(Star), R(18),
+                B(Mov), R(2), R(17),
+                B(InvokeIntrinsic), U8(Runtime::k_AsyncGeneratorReject), R(17), U8(2),
+                B(PopContext), R(16),
                 B(Star), R(13),
-                B(InvokeIntrinsic), U8(Runtime::k_GeneratorClose), R(2), U8(1),
-                B(Ldar), R(13),
+                B(LdaSmi), I8(1),
+                B(Star), R(12),
+                B(Jump), U8(16),
+                B(LdaSmi), I8(-1),
+                B(Star), R(13),
+                B(Star), R(12),
+                B(Jump), U8(8),
+                B(Star), R(13),
+                B(LdaSmi), I8(2),
+                B(Star), R(12),
+                B(LdaTheHole),
                 B(SetPendingMessage),
-                B(Ldar), R(11),
-                B(SwitchOnSmiNoFeedback), U8(22), U8(3), I8(0),
+                B(Star), R(14),
+                B(InvokeIntrinsic), U8(Runtime::k_GeneratorClose), R(2), U8(1),
+                B(Ldar), R(14),
+                B(SetPendingMessage),
+                B(Ldar), R(12),
+                B(SwitchOnSmiNoFeedback), U8(21), U8(3), I8(0),
                 B(Jump), U8(22),
                 B(LdaTrue),
-                B(Star), R(16),
-                B(Mov), R(2), R(14),
-                B(Mov), R(12), R(15),
-                B(InvokeIntrinsic), U8(Runtime::k_AsyncGeneratorResolve), R(14), U8(3),
+                B(Star), R(17),
+                B(Mov), R(2), R(15),
+                B(Mov), R(13), R(16),
+                B(InvokeIntrinsic), U8(Runtime::k_AsyncGeneratorResolve), R(15), U8(3),
   /*   50 S> */ B(Return),
-                B(Ldar), R(12),
+                B(Ldar), R(13),
   /*   50 S> */ B(Return),
-                B(Ldar), R(12),
+                B(Ldar), R(13),
                 B(ReThrow),
                 B(LdaUndefined),
   /*   50 S> */ B(Return),
 ]
 constant pool: [
   Smi [37],
-  Smi [104],
-  Smi [427],
+  Smi [103],
+  Smi [399],
   Smi [15],
   Smi [7],
   TUPLE2_TYPE,
   SYMBOL_TYPE,
-  Smi [78],
   ONE_BYTE_INTERNALIZED_STRING_TYPE ["next"],
+  Smi [72],
   ONE_BYTE_INTERNALIZED_STRING_TYPE ["done"],
   ONE_BYTE_INTERNALIZED_STRING_TYPE ["value"],
   Smi [15],
@@ -555,21 +525,20 @@
   FIXED_ARRAY_TYPE,
   ONE_BYTE_INTERNALIZED_STRING_TYPE ["return"],
   ONE_BYTE_INTERNALIZED_STRING_TYPE [""],
-  FIXED_ARRAY_TYPE,
   Smi [6],
   Smi [14],
   FIXED_ARRAY_TYPE,
-  Smi [448],
+  Smi [420],
   Smi [6],
   Smi [20],
   Smi [23],
 ]
 handlers: [
-  [40, 516, 524],
-  [43, 477, 479],
-  [90, 277, 285],
-  [93, 237, 239],
-  [346, 356, 358],
+  [40, 481, 489],
+  [43, 442, 444],
+  [83, 263, 271],
+  [86, 223, 225],
+  [332, 342, 344],
 ]
 
 ---
@@ -578,9 +547,9 @@
   async function* f() { yield* g() }
   f();
 "
-frame size: 17
+frame size: 18
 parameter count: 1
-bytecode array length: 560
+bytecode array length: 526
 bytecodes: [
                 B(Ldar), R(0),
                 B(JumpIfUndefined), U8(18),
@@ -589,7 +558,7 @@
                 B(RestoreGeneratorState), R(0),
                 B(Star), R(1),
                 B(SwitchOnSmiNoFeedback), U8(0), U8(5), I8(0),
-                B(Abort), U8(45),
+                B(Abort), U8(15),
                 B(LdaSmi), I8(-2),
                 B(Star), R(1),
                 B(Mov), R(closure), R(2),
@@ -602,10 +571,7 @@
                 B(Ldar), R(0),
   /*   44 E> */ B(SuspendGenerator), R(0), R(0), U8(6), U8(0),
   /*   60 S> */ B(Return),
-                B(RestoreGeneratorRegisters), R(0), R(0), U8(6),
-                B(LdaSmi), I8(-2),
-                B(Star), R(1),
-                B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(0), U8(1),
+                B(ResumeGenerator), R(0), R(1), R(0), U8(6),
                 B(Star), R(6),
                 B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
                 B(SwitchOnSmiNoFeedback), U8(5), U8(2), I8(0),
@@ -615,69 +581,86 @@
                 B(Star), R(2),
                 B(Mov), R(6), R(3),
                 B(JumpConstant), U8(22),
-  /*   49 S> */ B(LdaGlobal), U8(7), U8(2),
-                B(Star), R(12),
-  /*   56 E> */ B(CallUndefinedReceiver0), R(12), U8(0),
-                B(Star), R(10),
-                B(LdaNamedProperty), R(10), U8(8), U8(26),
+  /*   49 S> */ B(LdaGlobal), U8(7), U8(0),
+                B(Star), R(13),
+  /*   56 E> */ B(CallUndefinedReceiver0), R(13), U8(2),
+                B(Star), R(11),
+                B(LdaNamedProperty), R(11), U8(8), U8(4),
                 B(JumpIfUndefined), U8(17),
                 B(JumpIfNull), U8(15),
-                B(Star), R(11),
-                B(CallProperty0), R(11), R(10), U8(28),
+                B(Star), R(12),
+                B(CallProperty0), R(12), R(11), U8(6),
                 B(JumpIfJSReceiver), U8(23),
                 B(CallRuntime), U16(Runtime::kThrowSymbolAsyncIteratorInvalid), R(0), U8(0),
-                B(LdaNamedProperty), R(10), U8(9), U8(4),
-                B(Star), R(11),
-                B(CallProperty0), R(11), R(10), U8(16),
-                B(Star), R(11),
-                B(InvokeIntrinsic), U8(Runtime::k_CreateAsyncFromSyncIterator), R(11), U8(1),
+                B(LdaNamedProperty), R(11), U8(9), U8(8),
+                B(Star), R(12),
+                B(CallProperty0), R(12), R(11), U8(10),
+                B(Star), R(12),
+                B(InvokeIntrinsic), U8(Runtime::k_CreateAsyncFromSyncIterator), R(12), U8(1),
                 B(Star), R(8),
+                B(LdaNamedProperty), R(8), U8(10), U8(12),
+                B(Star), R(10),
                 B(LdaUndefined),
                 B(Star), R(9),
                 B(LdaZero),
                 B(Star), R(7),
                 B(Ldar), R(1),
-                B(SwitchOnSmiNoFeedback), U8(10), U8(3), I8(1),
+                B(SwitchOnSmiNoFeedback), U8(11), U8(3), I8(1),
                 B(LdaSmi), I8(-2),
                 B(TestEqualStrictNoFeedback), R(1),
                 B(JumpIfTrue), U8(4),
-                B(Abort), U8(45),
+                B(Abort), U8(15),
                 B(Ldar), R(7),
-                B(SwitchOnSmiNoFeedback), U8(13), U8(2), I8(1),
-                B(LdaNamedProperty), R(8), U8(15), U8(8),
-                B(Star), R(12),
-                B(CallProperty1), R(12), R(8), R(9), U8(22),
-                B(Jump), U8(118),
-                B(LdaNamedProperty), R(8), U8(16), U8(6),
+                B(SwitchOnSmiNoFeedback), U8(14), U8(2), I8(1),
+                B(CallProperty1), R(10), R(8), R(9), U8(14),
+                B(Jump), U8(112),
+                B(LdaNamedProperty), R(8), U8(16), U8(16),
                 B(JumpIfUndefined), U8(13),
                 B(JumpIfNull), U8(11),
-                B(Star), R(12),
-                B(CallProperty1), R(12), R(8), R(9), U8(18),
-                B(Jump), U8(101),
+                B(Star), R(13),
+                B(CallProperty1), R(13), R(8), R(9), U8(18),
+                B(Jump), U8(95),
                 B(LdaZero),
                 B(Star), R(2),
                 B(Mov), R(9), R(3),
                 B(JumpConstant), U8(23),
-                B(LdaNamedProperty), R(8), U8(17), U8(10),
+                B(LdaNamedProperty), R(8), U8(17), U8(20),
                 B(JumpIfUndefined), U8(13),
                 B(JumpIfNull), U8(11),
-                B(Star), R(12),
-                B(CallProperty1), R(12), R(8), R(9), U8(24),
-                B(Jump), U8(76),
-                B(LdaNamedProperty), R(8), U8(16), U8(6),
-                B(Star), R(12),
-                B(JumpIfUndefined), U8(63),
-                B(JumpIfNull), U8(61),
-                B(CallProperty0), R(12), R(8), U8(20),
+                B(Star), R(13),
+                B(CallProperty1), R(13), R(8), R(9), U8(22),
+                B(Jump), U8(70),
+                B(LdaNamedProperty), R(8), U8(16), U8(24),
+                B(JumpIfUndefined), U8(59),
+                B(JumpIfNull), U8(57),
+                B(Star), R(13),
+                B(CallProperty0), R(13), R(8), U8(26),
+                B(Jump), U8(2),
                 B(Star), R(14),
                 B(Mov), R(0), R(13),
                 B(CallJSRuntime), U8(%async_generator_await_uncaught), R(13), U8(2),
                 B(SuspendGenerator), R(0), R(0), U8(13), U8(2),
   /*   60 S> */ B(Return),
-                B(RestoreGeneratorRegisters), R(0), R(0), U8(13),
-                B(LdaSmi), I8(-2),
-                B(Star), R(1),
-                B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(0), U8(1),
+                B(ResumeGenerator), R(0), R(1), R(0), U8(13),
+                B(Star), R(13),
+                B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
+                B(Star), R(14),
+                B(LdaZero),
+                B(TestEqualStrictNoFeedback), R(14),
+                B(JumpIfTrue), U8(5),
+                B(Ldar), R(13),
+                B(ReThrow),
+                B(Ldar), R(13),
+                B(JumpIfJSReceiver), U8(9),
+                B(Star), R(15),
+                B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(15), U8(1),
+                B(CallRuntime), U16(Runtime::kThrowThrowMethodMissing), R(0), U8(0),
+                B(Star), R(14),
+                B(Mov), R(0), R(13),
+                B(CallJSRuntime), U8(%async_generator_await_uncaught), R(13), U8(2),
+                B(SuspendGenerator), R(0), R(0), U8(13), U8(3),
+  /*   60 S> */ B(Return),
+                B(ResumeGenerator), R(0), R(1), R(0), U8(13),
                 B(Star), R(13),
                 B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
                 B(Star), R(14),
@@ -690,47 +673,22 @@
                 B(Mov), R(13), R(6),
                 B(JumpIfJSReceiver), U8(7),
                 B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(6), U8(1),
-                B(CallRuntime), U16(Runtime::kThrowThrowMethodMissing), R(0), U8(0),
-                B(Star), R(13),
-                B(Mov), R(0), R(12),
-                B(CallJSRuntime), U8(%async_generator_await_uncaught), R(12), U8(2),
-                B(SuspendGenerator), R(0), R(0), U8(12), U8(3),
-  /*   60 S> */ B(Return),
-                B(RestoreGeneratorRegisters), R(0), R(0), U8(12),
-                B(LdaSmi), I8(-2),
-                B(Star), R(1),
-                B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(0), U8(1),
-                B(Star), R(12),
-                B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
-                B(Star), R(13),
-                B(LdaZero),
-                B(TestEqualStrictNoFeedback), R(13),
-                B(JumpIfTrue), U8(5),
-                B(Ldar), R(12),
-                B(ReThrow),
-                B(Ldar), R(12),
-                B(Mov), R(12), R(6),
-                B(JumpIfJSReceiver), U8(7),
-                B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(6), U8(1),
-                B(LdaNamedProperty), R(6), U8(18), U8(12),
-                B(JumpIfToBooleanTrue), U8(47),
-                B(LdaNamedProperty), R(6), U8(19), U8(14),
-                B(Star), R(15),
-                B(LdaFalse),
+                B(LdaNamedProperty), R(6), U8(18), U8(28),
+                B(JumpIfToBooleanTrue), U8(40),
+                B(LdaNamedProperty), R(6), U8(19), U8(30),
                 B(Star), R(16),
-                B(Mov), R(0), R(14),
-                B(InvokeIntrinsic), U8(Runtime::k_AsyncGeneratorYield), R(14), U8(3),
-                B(SuspendGenerator), R(0), R(0), U8(14), U8(1),
+                B(LdaFalse),
+                B(Star), R(17),
+                B(Mov), R(0), R(15),
+                B(InvokeIntrinsic), U8(Runtime::k_AsyncGeneratorYield), R(15), U8(3),
+                B(SuspendGenerator), R(0), R(0), U8(15), U8(1),
   /*   60 S> */ B(Return),
-                B(RestoreGeneratorRegisters), R(0), R(0), U8(14),
-                B(LdaSmi), I8(-2),
-                B(Star), R(1),
-                B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(0), U8(1),
+                B(ResumeGenerator), R(0), R(1), R(0), U8(15),
                 B(Star), R(9),
                 B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
                 B(Star), R(7),
-                B(JumpLoop), U8(252), I8(0),
-                B(LdaNamedProperty), R(6), U8(19), U8(14),
+                B(JumpLoop), U8(226), I8(0),
+                B(LdaNamedProperty), R(6), U8(19), U8(32),
                 B(Star), R(8),
                 B(LdaSmi), I8(1),
                 B(TestEqualStrictNoFeedback), R(7),
@@ -738,17 +696,14 @@
                 B(LdaZero),
                 B(Star), R(2),
                 B(Mov), R(8), R(3),
-                B(Jump), U8(107),
+                B(Jump), U8(100),
                 B(LdaUndefined),
                 B(Star), R(7),
                 B(Mov), R(0), R(6),
                 B(CallJSRuntime), U8(%async_generator_await_uncaught), R(6), U8(2),
                 B(SuspendGenerator), R(0), R(0), U8(6), U8(4),
   /*   60 S> */ B(Return),
-                B(RestoreGeneratorRegisters), R(0), R(0), U8(6),
-                B(LdaSmi), I8(-2),
-                B(Star), R(1),
-                B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(0), U8(1),
+                B(ResumeGenerator), R(0), R(1), R(0), U8(6),
                 B(Star), R(6),
                 B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
                 B(Star), R(7),
@@ -810,35 +765,35 @@
 ]
 constant pool: [
   Smi [37],
-  Smi [125],
-  Smi [125],
-  Smi [125],
-  Smi [416],
+  Smi [124],
+  Smi [124],
+  Smi [124],
+  Smi [389],
   Smi [15],
   Smi [7],
   ONE_BYTE_INTERNALIZED_STRING_TYPE ["g"],
   SYMBOL_TYPE,
   SYMBOL_TYPE,
-  Smi [230],
-  Smi [102],
-  Smi [162],
-  Smi [17],
-  Smi [42],
   ONE_BYTE_INTERNALIZED_STRING_TYPE ["next"],
+  Smi [211],
+  Smi [98],
+  Smi [150],
+  Smi [11],
+  Smi [36],
   ONE_BYTE_INTERNALIZED_STRING_TYPE ["return"],
   ONE_BYTE_INTERNALIZED_STRING_TYPE ["throw"],
   ONE_BYTE_INTERNALIZED_STRING_TYPE ["done"],
   ONE_BYTE_INTERNALIZED_STRING_TYPE ["value"],
   ONE_BYTE_INTERNALIZED_STRING_TYPE [".catch"],
   FIXED_ARRAY_TYPE,
-  Smi [437],
-  Smi [324],
+  Smi [410],
+  Smi [297],
   Smi [6],
   Smi [20],
   Smi [23],
 ]
 handlers: [
-  [40, 505, 513],
-  [43, 466, 468],
+  [40, 471, 479],
+  [43, 432, 434],
 ]
 
diff --git a/src/v8/test/cctest/interpreter/bytecode_expectations/BasicLoops.golden b/src/v8/test/cctest/interpreter/bytecode_expectations/BasicLoops.golden
index dc397b8..951e4b5 100644
--- a/src/v8/test/cctest/interpreter/bytecode_expectations/BasicLoops.golden
+++ b/src/v8/test/cctest/interpreter/bytecode_expectations/BasicLoops.golden
@@ -489,15 +489,15 @@
                 B(Star), R(0),
   /*   45 E> */ B(StackCheck),
   /*   68 S> */ B(LdaSmi), I8(1),
-  /*   74 E> */ B(TestEqual), R(0), U8(1),
+  /*   74 E> */ B(TestEqual), R(0), U8(0),
                 B(JumpIfFalse), U8(4),
   /*   80 S> */ B(Jump), U8(21),
   /*   89 S> */ B(LdaSmi), I8(2),
-  /*   95 E> */ B(TestEqual), R(0), U8(2),
+  /*   95 E> */ B(TestEqual), R(0), U8(1),
                 B(JumpIfFalse), U8(4),
   /*  101 S> */ B(Jump), U8(2),
   /*   55 S> */ B(Ldar), R(0),
-  /*   59 E> */ B(AddSmi), I8(1), U8(0),
+  /*   59 E> */ B(AddSmi), I8(1), U8(2),
                 B(Star), R(0),
                 B(JumpLoop), U8(26), I8(0),
                 B(LdaUndefined),
@@ -524,15 +524,15 @@
                 B(Star), R(0),
   /*   34 E> */ B(StackCheck),
   /*   66 S> */ B(LdaSmi), I8(1),
-  /*   72 E> */ B(TestEqual), R(0), U8(1),
+  /*   72 E> */ B(TestEqual), R(0), U8(0),
                 B(JumpIfFalse), U8(4),
   /*   78 S> */ B(Jump), U8(21),
   /*   87 S> */ B(LdaSmi), I8(2),
-  /*   93 E> */ B(TestEqual), R(0), U8(2),
+  /*   93 E> */ B(TestEqual), R(0), U8(1),
                 B(JumpIfFalse), U8(4),
   /*   99 S> */ B(Jump), U8(2),
   /*   53 S> */ B(Ldar), R(0),
-  /*   57 E> */ B(AddSmi), I8(1), U8(0),
+  /*   57 E> */ B(AddSmi), I8(1), U8(2),
                 B(Star), R(0),
                 B(JumpLoop), U8(26), I8(0),
                 B(LdaUndefined),
@@ -565,11 +565,11 @@
                 B(JumpIfFalse), U8(22),
   /*   45 E> */ B(StackCheck),
   /*   85 S> */ B(Ldar), R(0),
-  /*   91 E> */ B(AddSmi), I8(1), U8(2),
+  /*   91 E> */ B(AddSmi), I8(1), U8(1),
                 B(Star), R(0),
   /*   98 S> */ B(Jump), U8(2),
   /*   72 S> */ B(Ldar), R(1),
-  /*   76 E> */ B(AddSmi), I8(1), U8(1),
+  /*   76 E> */ B(AddSmi), I8(1), U8(2),
                 B(Star), R(1),
                 B(JumpLoop), U8(24), I8(0),
                 B(LdaUndefined),
@@ -601,10 +601,10 @@
                 B(JumpIfToBooleanFalse), U8(19),
   /*   45 E> */ B(StackCheck),
   /*   74 S> */ B(Ldar), R(0),
-  /*   80 E> */ B(MulSmi), I8(12), U8(1),
+  /*   80 E> */ B(MulSmi), I8(12), U8(0),
                 B(Star), R(0),
   /*   67 S> */ B(Ldar), R(1),
-                B(Dec), U8(0),
+                B(Dec), U8(1),
                 B(Star), R(1),
                 B(JumpLoop), U8(18), I8(0),
   /*   88 S> */ B(Ldar), R(0),
@@ -660,14 +660,14 @@
                 B(Star), R(1),
   /*   45 E> */ B(StackCheck),
   /*   76 S> */ B(Ldar), R(0),
-  /*   82 E> */ B(AddSmi), I8(1), U8(1),
+  /*   82 E> */ B(AddSmi), I8(1), U8(0),
                 B(Star), R(0),
   /*   89 S> */ B(LdaSmi), I8(20),
-  /*   95 E> */ B(TestEqual), R(0), U8(2),
+  /*   95 E> */ B(TestEqual), R(0), U8(1),
                 B(JumpIfFalse), U8(4),
   /*  102 S> */ B(Jump), U8(11),
   /*   69 S> */ B(Ldar), R(1),
-                B(Inc), U8(0),
+                B(Inc), U8(2),
                 B(Star), R(1),
                 B(JumpLoop), U8(23), I8(0),
   /*  112 S> */ B(Ldar), R(0),
diff --git a/src/v8/test/cctest/interpreter/bytecode_expectations/BreakableBlocks.golden b/src/v8/test/cctest/interpreter/bytecode_expectations/BreakableBlocks.golden
index ee8cace..2ddfd55 100644
--- a/src/v8/test/cctest/interpreter/bytecode_expectations/BreakableBlocks.golden
+++ b/src/v8/test/cctest/interpreter/bytecode_expectations/BreakableBlocks.golden
@@ -62,25 +62,25 @@
   /*  106 S> */ B(LdaZero),
                 B(Star), R(2),
   /*  111 S> */ B(LdaSmi), I8(3),
-  /*  111 E> */ B(TestLessThan), R(2), U8(2),
+  /*  111 E> */ B(TestLessThan), R(2), U8(1),
                 B(JumpIfFalse), U8(34),
   /*   93 E> */ B(StackCheck),
   /*  129 S> */ B(Ldar), R(0),
-                B(Inc), U8(4),
+                B(Inc), U8(2),
                 B(Star), R(0),
   /*  142 S> */ B(Ldar), R(2),
-  /*  148 E> */ B(Add), R(1), U8(5),
+  /*  148 E> */ B(Add), R(1), U8(3),
                 B(Star), R(3),
                 B(LdaSmi), I8(12),
-  /*  152 E> */ B(TestEqual), R(3), U8(6),
+  /*  152 E> */ B(TestEqual), R(3), U8(4),
                 B(JumpIfFalse), U8(4),
   /*  161 S> */ B(Jump), U8(20),
   /*  118 S> */ B(Ldar), R(2),
-                B(Inc), U8(3),
+                B(Inc), U8(5),
                 B(Star), R(2),
                 B(JumpLoop), U8(36), I8(1),
   /*   84 S> */ B(Ldar), R(1),
-                B(Inc), U8(1),
+                B(Inc), U8(6),
                 B(Star), R(1),
                 B(JumpLoop), U8(56), I8(0),
   /*  188 S> */ B(Ldar), R(0),
diff --git a/src/v8/test/cctest/interpreter/bytecode_expectations/CallAndSpread.golden b/src/v8/test/cctest/interpreter/bytecode_expectations/CallAndSpread.golden
index 1315be3..9c1b26d 100644
--- a/src/v8/test/cctest/interpreter/bytecode_expectations/CallAndSpread.golden
+++ b/src/v8/test/cctest/interpreter/bytecode_expectations/CallAndSpread.golden
@@ -14,13 +14,13 @@
 bytecode array length: 25
 bytecodes: [
   /*   30 E> */ B(StackCheck),
-  /*   34 S> */ B(LdaGlobal), U8(0), U8(2),
+  /*   34 S> */ B(LdaGlobal), U8(0), U8(0),
                 B(Star), R(1),
-  /*   39 E> */ B(LdaNamedProperty), R(1), U8(1), U8(4),
+  /*   39 E> */ B(LdaNamedProperty), R(1), U8(1), U8(2),
                 B(Star), R(0),
-                B(CreateArrayLiteral), U8(2), U8(6), U8(37),
+                B(CreateArrayLiteral), U8(2), U8(4), U8(37),
                 B(Star), R(2),
-  /*   39 E> */ B(CallWithSpread), R(0), R(1), U8(2), U8(0),
+  /*   39 E> */ B(CallWithSpread), R(0), R(1), U8(2), U8(5),
                 B(LdaUndefined),
   /*   58 S> */ B(Return),
 ]
@@ -41,15 +41,15 @@
 bytecode array length: 28
 bytecodes: [
   /*   30 E> */ B(StackCheck),
-  /*   34 S> */ B(LdaGlobal), U8(0), U8(2),
+  /*   34 S> */ B(LdaGlobal), U8(0), U8(0),
                 B(Star), R(1),
-  /*   39 E> */ B(LdaNamedProperty), R(1), U8(1), U8(4),
+  /*   39 E> */ B(LdaNamedProperty), R(1), U8(1), U8(2),
                 B(Star), R(0),
                 B(LdaZero),
                 B(Star), R(2),
-                B(CreateArrayLiteral), U8(2), U8(6), U8(37),
+                B(CreateArrayLiteral), U8(2), U8(4), U8(37),
                 B(Star), R(3),
-  /*   39 E> */ B(CallWithSpread), R(0), R(1), U8(3), U8(0),
+  /*   39 E> */ B(CallWithSpread), R(0), R(1), U8(3), U8(5),
                 B(LdaUndefined),
   /*   61 S> */ B(Return),
 ]
diff --git a/src/v8/test/cctest/interpreter/bytecode_expectations/CallGlobal.golden b/src/v8/test/cctest/interpreter/bytecode_expectations/CallGlobal.golden
index b313251..5c5c0ac 100644
--- a/src/v8/test/cctest/interpreter/bytecode_expectations/CallGlobal.golden
+++ b/src/v8/test/cctest/interpreter/bytecode_expectations/CallGlobal.golden
@@ -17,9 +17,9 @@
 bytecode array length: 10
 bytecodes: [
   /*   27 E> */ B(StackCheck),
-  /*   32 S> */ B(LdaGlobal), U8(0), U8(2),
+  /*   32 S> */ B(LdaGlobal), U8(0), U8(0),
                 B(Star), R(0),
-  /*   39 E> */ B(CallUndefinedReceiver0), R(0), U8(0),
+  /*   39 E> */ B(CallUndefinedReceiver0), R(0), U8(2),
   /*   43 S> */ B(Return),
 ]
 constant pool: [
@@ -39,7 +39,7 @@
 bytecode array length: 24
 bytecodes: [
   /*   34 E> */ B(StackCheck),
-  /*   39 S> */ B(LdaGlobal), U8(0), U8(2),
+  /*   39 S> */ B(LdaGlobal), U8(0), U8(0),
                 B(Star), R(0),
                 B(LdaSmi), I8(1),
                 B(Star), R(1),
@@ -47,7 +47,7 @@
                 B(Star), R(2),
                 B(LdaSmi), I8(3),
                 B(Star), R(3),
-  /*   46 E> */ B(CallUndefinedReceiver), R(0), R(1), U8(3), U8(0),
+  /*   46 E> */ B(CallUndefinedReceiver), R(0), R(1), U8(3), U8(2),
   /*   57 S> */ B(Return),
 ]
 constant pool: [
diff --git a/src/v8/test/cctest/interpreter/bytecode_expectations/CallLookupSlot.golden b/src/v8/test/cctest/interpreter/bytecode_expectations/CallLookupSlot.golden
index 9bc9e20..f4a4bc4 100644
--- a/src/v8/test/cctest/interpreter/bytecode_expectations/CallLookupSlot.golden
+++ b/src/v8/test/cctest/interpreter/bytecode_expectations/CallLookupSlot.golden
@@ -24,7 +24,7 @@
   /*   30 E> */ B(StackCheck),
   /*   34 S> */ B(CreateClosure), U8(0), U8(0), U8(2),
   /*   36 E> */ B(StaLookupSlot), U8(1), U8(0),
-  /*   52 S> */ B(LdaLookupGlobalSlot), U8(2), U8(3), U8(1),
+  /*   52 S> */ B(LdaLookupGlobalSlot), U8(2), U8(1), U8(1),
                 B(Star), R(2),
                 B(LdaConstant), U8(3),
                 B(Star), R(3),
@@ -39,10 +39,10 @@
                 B(Mov), R(closure), R(6),
                 B(CallRuntime), U16(Runtime::kResolvePossiblyDirectEval), R(4), U8(6),
                 B(Star), R(2),
-  /*   52 E> */ B(CallUndefinedReceiver1), R(2), R(3), U8(1),
-  /*   62 S> */ B(LdaLookupGlobalSlot), U8(1), U8(7), U8(1),
+  /*   52 E> */ B(CallUndefinedReceiver1), R(2), R(3), U8(3),
+  /*   62 S> */ B(LdaLookupGlobalSlot), U8(1), U8(5), U8(1),
                 B(Star), R(2),
-  /*   69 E> */ B(CallUndefinedReceiver0), R(2), U8(5),
+  /*   69 E> */ B(CallUndefinedReceiver0), R(2), U8(7),
   /*   73 S> */ B(Return),
 ]
 constant pool: [
diff --git a/src/v8/test/cctest/interpreter/bytecode_expectations/CallNew.golden b/src/v8/test/cctest/interpreter/bytecode_expectations/CallNew.golden
index db1c169..4e7e6d3 100644
--- a/src/v8/test/cctest/interpreter/bytecode_expectations/CallNew.golden
+++ b/src/v8/test/cctest/interpreter/bytecode_expectations/CallNew.golden
@@ -17,9 +17,9 @@
 bytecode array length: 12
 bytecodes: [
   /*   45 E> */ B(StackCheck),
-  /*   50 S> */ B(LdaGlobal), U8(0), U8(2),
+  /*   50 S> */ B(LdaGlobal), U8(0), U8(0),
                 B(Star), R(0),
-  /*   57 E> */ B(Construct), R(0), R(0), U8(0), U8(0),
+  /*   57 E> */ B(Construct), R(0), R(0), U8(0), U8(2),
   /*   67 S> */ B(Return),
 ]
 constant pool: [
@@ -39,12 +39,12 @@
 bytecode array length: 18
 bytecodes: [
   /*   58 E> */ B(StackCheck),
-  /*   63 S> */ B(LdaGlobal), U8(0), U8(2),
+  /*   63 S> */ B(LdaGlobal), U8(0), U8(0),
                 B(Star), R(0),
                 B(LdaSmi), I8(3),
                 B(Star), R(1),
                 B(Ldar), R(0),
-  /*   70 E> */ B(Construct), R(0), R(1), U8(1), U8(0),
+  /*   70 E> */ B(Construct), R(0), R(1), U8(1), U8(2),
   /*   81 S> */ B(Return),
 ]
 constant pool: [
@@ -69,7 +69,7 @@
 bytecode array length: 26
 bytecodes: [
   /*  100 E> */ B(StackCheck),
-  /*  105 S> */ B(LdaGlobal), U8(0), U8(2),
+  /*  105 S> */ B(LdaGlobal), U8(0), U8(0),
                 B(Star), R(0),
                 B(LdaSmi), I8(3),
                 B(Star), R(1),
@@ -78,7 +78,7 @@
                 B(LdaSmi), I8(5),
                 B(Star), R(3),
                 B(Ldar), R(0),
-  /*  112 E> */ B(Construct), R(0), R(1), U8(3), U8(0),
+  /*  112 E> */ B(Construct), R(0), R(1), U8(3), U8(2),
   /*  129 S> */ B(Return),
 ]
 constant pool: [
diff --git a/src/v8/test/cctest/interpreter/bytecode_expectations/ClassAndSuperClass.golden b/src/v8/test/cctest/interpreter/bytecode_expectations/ClassAndSuperClass.golden
index ea44a8a..f1149ac 100644
--- a/src/v8/test/cctest/interpreter/bytecode_expectations/ClassAndSuperClass.golden
+++ b/src/v8/test/cctest/interpreter/bytecode_expectations/ClassAndSuperClass.golden
@@ -27,15 +27,15 @@
                 B(Mov), R(closure), R(0),
   /*   99 E> */ B(StackCheck),
   /*  104 S> */ B(LdaConstant), U8(0),
-  /*  111 E> */ B(LdaKeyedProperty), R(closure), U8(2),
+  /*  111 E> */ B(LdaKeyedProperty), R(closure), U8(1),
                 B(Star), R(4),
                 B(LdaConstant), U8(1),
                 B(Star), R(5),
                 B(Mov), R(this), R(3),
   /*  117 E> */ B(CallRuntime), U16(Runtime::kLoadFromSuper), R(3), U8(3),
                 B(Star), R(1),
-  /*  117 E> */ B(CallAnyReceiver), R(1), R(this), U8(1), U8(0),
-  /*  126 E> */ B(AddSmi), I8(1), U8(6),
+  /*  117 E> */ B(CallAnyReceiver), R(1), R(this), U8(1), U8(3),
+  /*  126 E> */ B(AddSmi), I8(1), U8(0),
   /*  130 S> */ B(Return),
 ]
 constant pool: [
@@ -104,18 +104,18 @@
     test = new B().constructor;
   })();
 "
-frame size: 4
+frame size: 5
 parameter count: 1
 bytecode array length: 40
 bytecodes: [
                 B(Mov), R(closure), R(1),
   /*  113 E> */ B(StackCheck),
   /*  118 S> */ B(Ldar), R(1),
-                B(GetSuperConstructor), R(2),
+                B(GetSuperConstructor), R(3),
                 B(LdaSmi), I8(1),
-                B(Star), R(3),
+                B(Star), R(4),
                 B(Ldar), R(0),
-  /*  118 E> */ B(Construct), R(2), R(3), U8(1), U8(0),
+  /*  118 E> */ B(Construct), R(3), R(4), U8(1), U8(0),
                 B(Star), R(2),
                 B(Ldar), R(this),
   /*  118 E> */ B(ThrowSuperAlreadyCalledIfNotHole),
@@ -147,16 +147,16 @@
     test = new B().constructor;
   })();
 "
-frame size: 3
+frame size: 4
 parameter count: 1
 bytecode array length: 36
 bytecodes: [
                 B(Mov), R(closure), R(1),
   /*  112 E> */ B(StackCheck),
   /*  117 S> */ B(Ldar), R(1),
-                B(GetSuperConstructor), R(2),
+                B(GetSuperConstructor), R(3),
                 B(Ldar), R(0),
-  /*  117 E> */ B(Construct), R(2), R(0), U8(0), U8(0),
+  /*  117 E> */ B(Construct), R(3), R(0), U8(0), U8(0),
                 B(Star), R(2),
                 B(Ldar), R(this),
   /*  117 E> */ B(ThrowSuperAlreadyCalledIfNotHole),
diff --git a/src/v8/test/cctest/interpreter/bytecode_expectations/ClassDeclarations.golden b/src/v8/test/cctest/interpreter/bytecode_expectations/ClassDeclarations.golden
index 4efdd0a..ab03cea 100644
--- a/src/v8/test/cctest/interpreter/bytecode_expectations/ClassDeclarations.golden
+++ b/src/v8/test/cctest/interpreter/bytecode_expectations/ClassDeclarations.golden
@@ -12,40 +12,30 @@
     speak() { console.log(this.name + ' is speaking.'); }
   }
 "
-frame size: 8
+frame size: 7
 parameter count: 1
-bytecode array length: 67
+bytecode array length: 38
 bytecodes: [
   /*   30 E> */ B(StackCheck),
-                B(CreateClosure), U8(0), U8(0), U8(2),
-                B(Star), R(2),
                 B(LdaTheHole),
-                B(Star), R(3),
-                B(LdaSmi), I8(34),
                 B(Star), R(5),
-                B(Wide), B(LdaSmi), I16(148),
+                B(CreateClosure), U8(1), U8(0), U8(2),
+                B(Star), R(2),
+                B(LdaConstant), U8(0),
+                B(Star), R(3),
+                B(CreateClosure), U8(2), U8(1), U8(2),
                 B(Star), R(6),
                 B(Mov), R(2), R(4),
                 B(CallRuntime), U16(Runtime::kDefineClass), R(3), U8(4),
                 B(Star), R(3),
-                B(LdaConstant), U8(1),
-                B(Star), R(5),
-                B(CreateClosure), U8(2), U8(1), U8(2),
-                B(Star), R(6),
-                B(LdaSmi), I8(2),
-                B(Star), R(7),
-                B(Ldar), R(6),
-                B(StaDataPropertyInLiteral), R(3), R(5), U8(1), U8(2),
-                B(CallRuntime), U16(Runtime::kInstallClassNameAccessor), R(2), U8(1),
-                B(CallRuntime), U16(Runtime::kToFastProperties), R(2), U8(1),
-                B(Star), R(0),
-                B(Star), R(1),
+                B(Mov), R(4), R(0),
+                B(Mov), R(0), R(1),
                 B(LdaUndefined),
   /*  149 S> */ B(Return),
 ]
 constant pool: [
+  FIXED_ARRAY_TYPE,
   SHARED_FUNCTION_INFO_TYPE,
-  ONE_BYTE_INTERNALIZED_STRING_TYPE ["speak"],
   SHARED_FUNCTION_INFO_TYPE,
 ]
 handlers: [
@@ -58,40 +48,30 @@
     speak() { console.log(this.name + ' is speaking.'); }
   }
 "
-frame size: 8
+frame size: 7
 parameter count: 1
-bytecode array length: 67
+bytecode array length: 38
 bytecodes: [
   /*   30 E> */ B(StackCheck),
-                B(CreateClosure), U8(0), U8(0), U8(2),
-                B(Star), R(2),
                 B(LdaTheHole),
-                B(Star), R(3),
-                B(LdaSmi), I8(34),
                 B(Star), R(5),
-                B(Wide), B(LdaSmi), I16(148),
+                B(CreateClosure), U8(1), U8(0), U8(2),
+                B(Star), R(2),
+                B(LdaConstant), U8(0),
+                B(Star), R(3),
+                B(CreateClosure), U8(2), U8(1), U8(2),
                 B(Star), R(6),
                 B(Mov), R(2), R(4),
                 B(CallRuntime), U16(Runtime::kDefineClass), R(3), U8(4),
                 B(Star), R(3),
-                B(LdaConstant), U8(1),
-                B(Star), R(5),
-                B(CreateClosure), U8(2), U8(1), U8(2),
-                B(Star), R(6),
-                B(LdaSmi), I8(2),
-                B(Star), R(7),
-                B(Ldar), R(6),
-                B(StaDataPropertyInLiteral), R(3), R(5), U8(1), U8(2),
-                B(CallRuntime), U16(Runtime::kInstallClassNameAccessor), R(2), U8(1),
-                B(CallRuntime), U16(Runtime::kToFastProperties), R(2), U8(1),
-                B(Star), R(0),
-                B(Star), R(1),
+                B(Mov), R(4), R(0),
+                B(Mov), R(0), R(1),
                 B(LdaUndefined),
   /*  149 S> */ B(Return),
 ]
 constant pool: [
+  FIXED_ARRAY_TYPE,
   SHARED_FUNCTION_INFO_TYPE,
-  ONE_BYTE_INTERNALIZED_STRING_TYPE ["speak"],
   SHARED_FUNCTION_INFO_TYPE,
 ]
 handlers: [
@@ -106,9 +86,9 @@
     static [n1]() { return n1; }
   }
 "
-frame size: 9
+frame size: 11
 parameter count: 1
-bytecode array length: 106
+bytecode array length: 75
 bytecodes: [
                 B(CreateFunctionContext), U8(2),
                 B(PushContext), R(2),
@@ -117,44 +97,36 @@
   /*   43 E> */ B(StaCurrentContextSlot), U8(4),
   /*   57 S> */ B(LdaConstant), U8(1),
   /*   57 E> */ B(StaCurrentContextSlot), U8(5),
-                B(CreateClosure), U8(2), U8(0), U8(2),
-                B(Star), R(3),
                 B(LdaTheHole),
-                B(Star), R(4),
-                B(LdaSmi), I8(62),
                 B(Star), R(6),
-                B(Wide), B(LdaSmi), I16(128),
-                B(Star), R(7),
-                B(Mov), R(3), R(5),
-                B(CallRuntime), U16(Runtime::kDefineClass), R(4), U8(4),
+                B(CreateClosure), U8(3), U8(0), U8(2),
+                B(Star), R(3),
+                B(LdaConstant), U8(2),
                 B(Star), R(4),
                 B(LdaImmutableCurrentContextSlot), U8(4),
-  /*   75 E> */ B(ToName), R(6),
-                B(CreateClosure), U8(3), U8(1), U8(2),
-                B(Star), R(7),
-                B(LdaSmi), I8(2),
+  /*   75 E> */ B(ToName), R(7),
+                B(CreateClosure), U8(4), U8(1), U8(2),
                 B(Star), R(8),
-                B(Ldar), R(7),
-                B(StaDataPropertyInLiteral), R(4), R(6), U8(3), U8(3),
                 B(LdaImmutableCurrentContextSlot), U8(5),
-  /*  106 E> */ B(ToName), R(6),
-                B(LdaConstant), U8(4),
-                B(TestEqualStrictNoFeedback), R(6),
+  /*  106 E> */ B(ToName), R(9),
+                B(LdaConstant), U8(5),
+                B(TestEqualStrictNoFeedback), R(9),
                 B(Mov), R(3), R(5),
                 B(JumpIfFalse), U8(7),
                 B(CallRuntime), U16(Runtime::kThrowStaticPrototypeError), R(0), U8(0),
-                B(CreateClosure), U8(5), U8(2), U8(2),
-                B(StaDataPropertyInLiteral), R(5), R(6), U8(3), U8(5),
-                B(CallRuntime), U16(Runtime::kInstallClassNameAccessorWithCheck), R(3), U8(1),
-                B(CallRuntime), U16(Runtime::kToFastProperties), R(3), U8(1),
-                B(Star), R(0),
-                B(Star), R(1),
+                B(CreateClosure), U8(6), U8(2), U8(2),
+                B(Star), R(10),
+                B(CallRuntime), U16(Runtime::kDefineClass), R(4), U8(7),
+                B(Star), R(4),
+                B(Mov), R(3), R(0),
+                B(Mov), R(0), R(1),
                 B(LdaUndefined),
   /*  129 S> */ B(Return),
 ]
 constant pool: [
   ONE_BYTE_INTERNALIZED_STRING_TYPE ["a"],
   ONE_BYTE_INTERNALIZED_STRING_TYPE ["b"],
+  FIXED_ARRAY_TYPE,
   SHARED_FUNCTION_INFO_TYPE,
   SHARED_FUNCTION_INFO_TYPE,
   ONE_BYTE_INTERNALIZED_STRING_TYPE ["prototype"],
@@ -169,34 +141,32 @@
   class C { constructor() { count++; }}
   return new C();
 "
-frame size: 8
+frame size: 7
 parameter count: 1
-bytecode array length: 55
+bytecode array length: 45
 bytecodes: [
                 B(CreateFunctionContext), U8(1),
                 B(PushContext), R(2),
   /*   30 E> */ B(StackCheck),
   /*   46 S> */ B(LdaZero),
   /*   46 E> */ B(StaCurrentContextSlot), U8(4),
-                B(CreateClosure), U8(0), U8(0), U8(2),
-                B(Star), R(3),
                 B(LdaTheHole),
-                B(Star), R(4),
-                B(LdaSmi), I8(49),
                 B(Star), R(6),
-                B(LdaSmi), I8(86),
-                B(Star), R(7),
-                B(Mov), R(3), R(5),
-                B(CallRuntime), U16(Runtime::kDefineClass), R(4), U8(4),
+                B(CreateClosure), U8(1), U8(0), U8(2),
+                B(Star), R(3),
+                B(LdaConstant), U8(0),
                 B(Star), R(4),
-                B(CallRuntime), U16(Runtime::kInstallClassNameAccessor), R(3), U8(1),
-                B(CallRuntime), U16(Runtime::kToFastProperties), R(3), U8(1),
-                B(Star), R(0),
-                B(Star), R(1),
-  /*   94 S> */ B(Construct), R(1), R(0), U8(0), U8(1),
+                B(Mov), R(3), R(5),
+                B(CallRuntime), U16(Runtime::kDefineClass), R(4), U8(3),
+                B(Star), R(4),
+                B(Mov), R(5), R(0),
+                B(Mov), R(0), R(1),
+  /*   87 S> */ B(Ldar), R(1),
+  /*   94 E> */ B(Construct), R(3), R(0), U8(0), U8(1),
   /*  102 S> */ B(Return),
 ]
 constant pool: [
+  FIXED_ARRAY_TYPE,
   SHARED_FUNCTION_INFO_TYPE,
 ]
 handlers: [
@@ -207,52 +177,41 @@
   (class {})
   class E { static name () {}}
 "
-frame size: 8
+frame size: 7
 parameter count: 1
-bytecode array length: 92
+bytecode array length: 61
 bytecodes: [
   /*   30 E> */ B(StackCheck),
-  /*   34 S> */ B(CreateClosure), U8(0), U8(0), U8(2),
-                B(Star), R(2),
-                B(LdaTheHole),
-                B(Star), R(3),
-                B(LdaSmi), I8(35),
+  /*   34 S> */ B(LdaTheHole),
                 B(Star), R(5),
-                B(LdaSmi), I8(43),
-                B(Star), R(6),
-                B(Mov), R(2), R(4),
-                B(CallRuntime), U16(Runtime::kDefineClass), R(3), U8(4),
-                B(Star), R(3),
-                B(CallRuntime), U16(Runtime::kToFastProperties), R(2), U8(1),
-                B(CreateClosure), U8(1), U8(1), U8(2),
+                B(CreateClosure), U8(1), U8(0), U8(2),
                 B(Star), R(2),
-                B(LdaTheHole),
+                B(LdaConstant), U8(0),
                 B(Star), R(3),
-                B(LdaSmi), I8(45),
-                B(Star), R(5),
-                B(LdaSmi), I8(73),
-                B(Star), R(6),
                 B(Mov), R(2), R(4),
-                B(CallRuntime), U16(Runtime::kDefineClass), R(3), U8(4),
+                B(CallRuntime), U16(Runtime::kDefineClass), R(3), U8(3),
                 B(Star), R(3),
+                B(LdaTheHole),
+                B(Star), R(5),
+                B(CreateClosure), U8(3), U8(1), U8(2),
+                B(Star), R(2),
                 B(LdaConstant), U8(2),
-                B(Star), R(5),
-                B(CreateClosure), U8(3), U8(2), U8(2),
+                B(Star), R(3),
+                B(CreateClosure), U8(4), U8(2), U8(2),
                 B(Star), R(6),
-                B(LdaSmi), I8(2),
-                B(Star), R(7),
-                B(Ldar), R(6),
-                B(StaDataPropertyInLiteral), R(4), R(5), U8(1), U8(3),
-                B(CallRuntime), U16(Runtime::kToFastProperties), R(2), U8(1),
-                B(Star), R(0),
-                B(Star), R(1),
+                B(Mov), R(2), R(4),
+                B(CallRuntime), U16(Runtime::kDefineClass), R(3), U8(4),
+                B(Star), R(3),
+                B(Mov), R(4), R(0),
+                B(Mov), R(0), R(1),
                 B(LdaUndefined),
   /*   74 S> */ B(Return),
 ]
 constant pool: [
+  FIXED_ARRAY_TYPE,
   SHARED_FUNCTION_INFO_TYPE,
+  FIXED_ARRAY_TYPE,
   SHARED_FUNCTION_INFO_TYPE,
-  ONE_BYTE_INTERNALIZED_STRING_TYPE ["name"],
   SHARED_FUNCTION_INFO_TYPE,
 ]
 handlers: [
diff --git a/src/v8/test/cctest/interpreter/bytecode_expectations/ClassFields.golden b/src/v8/test/cctest/interpreter/bytecode_expectations/ClassFields.golden
new file mode 100644
index 0000000..b8b7710
--- /dev/null
+++ b/src/v8/test/cctest/interpreter/bytecode_expectations/ClassFields.golden
@@ -0,0 +1,251 @@
+#
+# Autogenerated by generate-bytecode-expectations.
+#
+
+---
+wrap: yes
+public fields: yes
+
+---
+snippet: "
+  {
+    class A {
+      a;
+      ['b'];
+    }
+  
+    class B {
+      a = 1;
+      ['b'] = this.a;
+    }
+    new A;
+    new B;
+  }
+"
+frame size: 10
+parameter count: 1
+bytecode array length: 129
+bytecodes: [
+  /*   30 E> */ B(StackCheck),
+                B(Ldar), R(closure),
+                B(CreateBlockContext), U8(0),
+                B(PushContext), R(4),
+                B(LdaTheHole),
+                B(StaCurrentContextSlot), U8(4),
+                B(LdaTheHole),
+                B(Star), R(8),
+                B(CreateClosure), U8(2), U8(0), U8(2),
+                B(Star), R(5),
+                B(LdaConstant), U8(1),
+                B(Star), R(6),
+                B(LdaConstant), U8(3),
+                B(StaCurrentContextSlot), U8(4),
+                B(Star), R(9),
+                B(Mov), R(5), R(7),
+                B(CallRuntime), U16(Runtime::kDefineClass), R(6), U8(4),
+                B(Star), R(6),
+                B(Mov), R(7), R(1),
+                B(CreateClosure), U8(4), U8(1), U8(2),
+                B(Star), R(7),
+                B(StaNamedProperty), R(5), U8(5), U8(2),
+                B(PopContext), R(4),
+                B(Mov), R(1), R(2),
+                B(Ldar), R(closure),
+  /*   38 E> */ B(CreateBlockContext), U8(6),
+                B(PushContext), R(4),
+                B(LdaTheHole),
+                B(StaCurrentContextSlot), U8(4),
+                B(LdaTheHole),
+                B(Star), R(8),
+                B(CreateClosure), U8(8), U8(4), U8(2),
+                B(Star), R(5),
+                B(LdaConstant), U8(7),
+                B(Star), R(6),
+                B(LdaConstant), U8(3),
+                B(StaCurrentContextSlot), U8(4),
+                B(Star), R(9),
+                B(Mov), R(5), R(7),
+                B(CallRuntime), U16(Runtime::kDefineClass), R(6), U8(4),
+                B(Star), R(6),
+                B(Mov), R(7), R(0),
+                B(CreateClosure), U8(9), U8(5), U8(2),
+                B(Star), R(7),
+                B(StaNamedProperty), R(5), U8(5), U8(6),
+                B(PopContext), R(4),
+                B(Mov), R(0), R(3),
+  /*  120 S> */ B(Ldar), R(1),
+  /*  120 E> */ B(Construct), R(1), R(0), U8(0), U8(8),
+  /*  129 S> */ B(Ldar), R(0),
+  /*  129 E> */ B(Construct), R(0), R(0), U8(0), U8(10),
+                B(LdaUndefined),
+  /*  138 S> */ B(Return),
+]
+constant pool: [
+  FIXED_ARRAY_TYPE,
+  FIXED_ARRAY_TYPE,
+  SHARED_FUNCTION_INFO_TYPE,
+  ONE_BYTE_INTERNALIZED_STRING_TYPE ["b"],
+  SHARED_FUNCTION_INFO_TYPE,
+  SYMBOL_TYPE,
+  FIXED_ARRAY_TYPE,
+  FIXED_ARRAY_TYPE,
+  SHARED_FUNCTION_INFO_TYPE,
+  SHARED_FUNCTION_INFO_TYPE,
+]
+handlers: [
+]
+
+---
+snippet: "
+  {
+    class A extends class {} {
+      a;
+      ['b'];
+    }
+  
+    class B extends class {} {
+      a = 1;
+      ['b'] = this.a;
+      foo() { return 1; }
+      constructor() {
+        super();
+      }
+    }
+  
+    class C extends B {
+      a = 1;
+      ['b'] = this.a;
+      constructor() {
+        (() => super())();
+      }
+    }
+  
+    new A;
+    new B;
+    new C;
+  }
+"
+frame size: 15
+parameter count: 1
+bytecode array length: 244
+bytecodes: [
+  /*   30 E> */ B(StackCheck),
+                B(Ldar), R(closure),
+                B(CreateBlockContext), U8(0),
+                B(PushContext), R(6),
+                B(LdaTheHole),
+                B(StaCurrentContextSlot), U8(4),
+                B(LdaTheHole),
+                B(Star), R(14),
+                B(CreateClosure), U8(3), U8(0), U8(2),
+                B(Star), R(11),
+                B(LdaConstant), U8(2),
+                B(Star), R(12),
+                B(Mov), R(11), R(13),
+                B(CallRuntime), U16(Runtime::kDefineClass), R(12), U8(3),
+                B(Star), R(12),
+                B(CreateClosure), U8(4), U8(1), U8(2),
+                B(Star), R(7),
+                B(LdaConstant), U8(1),
+                B(Star), R(8),
+                B(LdaConstant), U8(5),
+                B(StaCurrentContextSlot), U8(4),
+                B(Star), R(11),
+                B(Mov), R(7), R(9),
+                B(Mov), R(13), R(10),
+                B(CallRuntime), U16(Runtime::kDefineClass), R(8), U8(4),
+                B(Star), R(8),
+                B(Mov), R(9), R(2),
+                B(CreateClosure), U8(6), U8(2), U8(2),
+                B(Star), R(9),
+                B(StaNamedProperty), R(7), U8(7), U8(3),
+                B(PopContext), R(6),
+                B(Mov), R(2), R(3),
+                B(Ldar), R(closure),
+  /*   38 E> */ B(CreateBlockContext), U8(8),
+                B(PushContext), R(6),
+                B(LdaTheHole),
+                B(StaCurrentContextSlot), U8(4),
+                B(LdaTheHole),
+                B(Star), R(14),
+                B(CreateClosure), U8(11), U8(5), U8(2),
+                B(Star), R(11),
+                B(LdaConstant), U8(10),
+                B(Star), R(12),
+                B(Mov), R(11), R(13),
+                B(CallRuntime), U16(Runtime::kDefineClass), R(12), U8(3),
+                B(Star), R(12),
+                B(CreateClosure), U8(12), U8(6), U8(2),
+                B(Star), R(7),
+                B(LdaConstant), U8(9),
+                B(Star), R(8),
+                B(LdaConstant), U8(5),
+                B(StaCurrentContextSlot), U8(4),
+                B(Star), R(11),
+                B(CreateClosure), U8(13), U8(7), U8(2),
+                B(Star), R(12),
+                B(Mov), R(7), R(9),
+                B(Mov), R(13), R(10),
+                B(CallRuntime), U16(Runtime::kDefineClass), R(8), U8(5),
+                B(Star), R(8),
+                B(Mov), R(9), R(1),
+                B(CreateClosure), U8(14), U8(8), U8(2),
+                B(Star), R(9),
+                B(StaNamedProperty), R(7), U8(7), U8(9),
+                B(PopContext), R(6),
+                B(Mov), R(1), R(4),
+                B(Ldar), R(closure),
+  /*   90 E> */ B(CreateBlockContext), U8(15),
+                B(PushContext), R(6),
+                B(LdaTheHole),
+                B(StaCurrentContextSlot), U8(4),
+  /*  236 E> */ B(CreateClosure), U8(17), U8(11), U8(2),
+                B(Star), R(7),
+                B(LdaConstant), U8(16),
+                B(Star), R(8),
+                B(LdaConstant), U8(5),
+                B(StaCurrentContextSlot), U8(4),
+                B(Star), R(11),
+                B(Mov), R(7), R(9),
+                B(Mov), R(1), R(10),
+                B(CallRuntime), U16(Runtime::kDefineClass), R(8), U8(4),
+                B(Star), R(8),
+                B(Mov), R(9), R(0),
+                B(CreateClosure), U8(18), U8(12), U8(2),
+                B(Star), R(9),
+                B(StaNamedProperty), R(7), U8(7), U8(13),
+                B(PopContext), R(6),
+                B(Mov), R(0), R(5),
+  /*  329 S> */ B(Ldar), R(2),
+  /*  329 E> */ B(Construct), R(2), R(0), U8(0), U8(15),
+  /*  338 S> */ B(Ldar), R(1),
+  /*  338 E> */ B(Construct), R(1), R(0), U8(0), U8(17),
+  /*  347 S> */ B(Ldar), R(0),
+  /*  347 E> */ B(Construct), R(0), R(0), U8(0), U8(19),
+                B(LdaUndefined),
+  /*  356 S> */ B(Return),
+]
+constant pool: [
+  FIXED_ARRAY_TYPE,
+  FIXED_ARRAY_TYPE,
+  FIXED_ARRAY_TYPE,
+  SHARED_FUNCTION_INFO_TYPE,
+  SHARED_FUNCTION_INFO_TYPE,
+  ONE_BYTE_INTERNALIZED_STRING_TYPE ["b"],
+  SHARED_FUNCTION_INFO_TYPE,
+  SYMBOL_TYPE,
+  FIXED_ARRAY_TYPE,
+  FIXED_ARRAY_TYPE,
+  FIXED_ARRAY_TYPE,
+  SHARED_FUNCTION_INFO_TYPE,
+  SHARED_FUNCTION_INFO_TYPE,
+  SHARED_FUNCTION_INFO_TYPE,
+  SHARED_FUNCTION_INFO_TYPE,
+  FIXED_ARRAY_TYPE,
+  FIXED_ARRAY_TYPE,
+  SHARED_FUNCTION_INFO_TYPE,
+  SHARED_FUNCTION_INFO_TYPE,
+]
+handlers: [
+]
+
diff --git a/src/v8/test/cctest/interpreter/bytecode_expectations/CompareNil.golden b/src/v8/test/cctest/interpreter/bytecode_expectations/CompareNil.golden
index 840735d..83a267c 100644
--- a/src/v8/test/cctest/interpreter/bytecode_expectations/CompareNil.golden
+++ b/src/v8/test/cctest/interpreter/bytecode_expectations/CompareNil.golden
@@ -276,7 +276,7 @@
                 B(JumpIfUndefined), U8(12),
   /*   64 E> */ B(StackCheck),
   /*   92 S> */ B(Ldar), R(1),
-                B(Inc), U8(3),
+                B(Inc), U8(0),
                 B(Star), R(1),
                 B(JumpLoop), U8(11), I8(0),
                 B(LdaUndefined),
diff --git a/src/v8/test/cctest/interpreter/bytecode_expectations/ContextVariables.golden b/src/v8/test/cctest/interpreter/bytecode_expectations/ContextVariables.golden
index 2cd0101..3d262e4 100644
--- a/src/v8/test/cctest/interpreter/bytecode_expectations/ContextVariables.golden
+++ b/src/v8/test/cctest/interpreter/bytecode_expectations/ContextVariables.golden
@@ -82,9 +82,9 @@
                 B(CreateFunctionContext), U8(1),
                 B(PushContext), R(0),
   /*   30 E> */ B(StackCheck),
-  /*   41 S> */ B(CreateClosure), U8(0), U8(2), U8(2),
+  /*   41 S> */ B(CreateClosure), U8(0), U8(0), U8(2),
                 B(Star), R(1),
-  /*   64 E> */ B(CallUndefinedReceiver0), R(1), U8(0),
+  /*   64 E> */ B(CallUndefinedReceiver0), R(1), U8(1),
   /*   68 S> */ B(LdaCurrentContextSlot), U8(4),
   /*   77 S> */ B(Return),
 ]
@@ -898,9 +898,9 @@
   /* 3421 E> */ B(StaCurrentContextSlot), U8(254),
   /* 3435 S> */ B(LdaZero),
   /* 3435 E> */ B(StaCurrentContextSlot), U8(255),
-  /* 3438 S> */ B(LdaGlobal), U8(0), U8(2),
+  /* 3438 S> */ B(LdaGlobal), U8(0), U8(0),
                 B(Star), R(2),
-  /* 3438 E> */ B(CallUndefinedReceiver0), R(2), U8(0),
+  /* 3438 E> */ B(CallUndefinedReceiver0), R(2), U8(2),
   /* 3454 S> */ B(LdaSmi), I8(100),
   /* 3454 E> */ B(Wide), B(StaCurrentContextSlot), U16(256),
   /* 3459 S> */ B(Wide), B(LdaCurrentContextSlot), U16(256),
diff --git a/src/v8/test/cctest/interpreter/bytecode_expectations/CountOperators.golden b/src/v8/test/cctest/interpreter/bytecode_expectations/CountOperators.golden
index 2aefc7a..50a25c6 100644
--- a/src/v8/test/cctest/interpreter/bytecode_expectations/CountOperators.golden
+++ b/src/v8/test/cctest/interpreter/bytecode_expectations/CountOperators.golden
@@ -36,7 +36,7 @@
   /*   30 E> */ B(StackCheck),
   /*   42 S> */ B(LdaSmi), I8(1),
                 B(Star), R(0),
-  /*   45 S> */ B(ToNumber), U8(0),
+  /*   45 S> */ B(ToNumeric), U8(0),
                 B(Star), R(1),
                 B(Inc), U8(0),
                 B(Star), R(0),
@@ -79,7 +79,7 @@
   /*   30 E> */ B(StackCheck),
   /*   42 S> */ B(LdaSmi), I8(1),
                 B(Star), R(0),
-  /*   45 S> */ B(ToNumber), U8(0),
+  /*   45 S> */ B(ToNumeric), U8(0),
                 B(Star), R(1),
                 B(Dec), U8(0),
                 B(Star), R(0),
@@ -95,18 +95,19 @@
 snippet: "
   var a = { val: 1 }; return a.val++;
 "
-frame size: 3
+frame size: 4
 parameter count: 1
-bytecode array length: 26
+bytecode array length: 28
 bytecodes: [
   /*   30 E> */ B(StackCheck),
   /*   42 S> */ B(CreateObjectLiteral), U8(0), U8(0), U8(41), R(1),
                 B(Mov), R(1), R(0),
   /*   54 S> */ B(LdaNamedProperty), R(1), U8(1), U8(1),
-                B(ToNumber), U8(5),
+                B(ToNumeric), U8(3),
                 B(Star), R(2),
-                B(Inc), U8(5),
-  /*   66 E> */ B(StaNamedProperty), R(1), U8(1), U8(3),
+                B(Inc), U8(3),
+                B(Star), R(3),
+  /*   66 E> */ B(StaNamedProperty), R(1), U8(1), U8(4),
                 B(Ldar), R(2),
   /*   69 S> */ B(Return),
 ]
@@ -121,16 +122,18 @@
 snippet: "
   var a = { val: 1 }; return --a.val;
 "
-frame size: 2
+frame size: 3
 parameter count: 1
-bytecode array length: 20
+bytecode array length: 24
 bytecodes: [
   /*   30 E> */ B(StackCheck),
   /*   42 S> */ B(CreateObjectLiteral), U8(0), U8(0), U8(41), R(1),
                 B(Mov), R(1), R(0),
   /*   54 S> */ B(LdaNamedProperty), R(1), U8(1), U8(1),
-                B(Dec), U8(5),
-  /*   65 E> */ B(StaNamedProperty), R(1), U8(1), U8(3),
+                B(Dec), U8(3),
+                B(Star), R(2),
+  /*   65 E> */ B(StaNamedProperty), R(1), U8(1), U8(4),
+                B(Ldar), R(2),
   /*   69 S> */ B(Return),
 ]
 constant pool: [
@@ -144,9 +147,9 @@
 snippet: "
   var name = 'var'; var a = { val: 1 }; return a[name]--;
 "
-frame size: 5
+frame size: 6
 parameter count: 1
-bytecode array length: 31
+bytecode array length: 33
 bytecodes: [
   /*   30 E> */ B(StackCheck),
   /*   45 S> */ B(LdaConstant), U8(0),
@@ -155,10 +158,11 @@
                 B(Mov), R(2), R(1),
   /*   72 S> */ B(Ldar), R(0),
   /*   81 E> */ B(LdaKeyedProperty), R(2), U8(1),
-                B(ToNumber), U8(5),
+                B(ToNumeric), U8(3),
                 B(Star), R(4),
-                B(Dec), U8(5),
-  /*   86 E> */ B(StaKeyedProperty), R(2), R(0), U8(3),
+                B(Dec), U8(3),
+                B(Star), R(5),
+  /*   86 E> */ B(StaKeyedProperty), R(2), R(0), U8(4),
                 B(Ldar), R(4),
   /*   89 S> */ B(Return),
 ]
@@ -173,9 +177,9 @@
 snippet: "
   var name = 'var'; var a = { val: 1 }; return ++a[name];
 "
-frame size: 3
+frame size: 5
 parameter count: 1
-bytecode array length: 25
+bytecode array length: 29
 bytecodes: [
   /*   30 E> */ B(StackCheck),
   /*   45 S> */ B(LdaConstant), U8(0),
@@ -184,8 +188,10 @@
                 B(Mov), R(2), R(1),
   /*   72 S> */ B(Ldar), R(0),
   /*   83 E> */ B(LdaKeyedProperty), R(2), U8(1),
-                B(Inc), U8(5),
-  /*   87 E> */ B(StaKeyedProperty), R(2), R(0), U8(3),
+                B(Inc), U8(3),
+                B(Star), R(4),
+  /*   87 E> */ B(StaKeyedProperty), R(2), R(0), U8(4),
+                B(Ldar), R(4),
   /*   89 S> */ B(Return),
 ]
 constant pool: [
@@ -237,7 +243,7 @@
   /*   53 S> */ B(CreateClosure), U8(0), U8(0), U8(2),
                 B(Star), R(0),
   /*   78 S> */ B(LdaCurrentContextSlot), U8(4),
-                B(ToNumber), U8(1),
+                B(ToNumeric), U8(1),
                 B(Star), R(2),
                 B(Dec), U8(1),
   /*   86 E> */ B(StaCurrentContextSlot), U8(4),
@@ -254,9 +260,9 @@
 snippet: "
   var idx = 1; var a = [1, 2]; return a[idx++] = 2;
 "
-frame size: 4
+frame size: 5
 parameter count: 1
-bytecode array length: 28
+bytecode array length: 32
 bytecodes: [
   /*   30 E> */ B(StackCheck),
   /*   44 S> */ B(LdaSmi), I8(1),
@@ -264,12 +270,14 @@
   /*   55 S> */ B(CreateArrayLiteral), U8(0), U8(0), U8(37),
                 B(Star), R(1),
   /*   63 S> */ B(Ldar), R(0),
-                B(ToNumber), U8(1),
+                B(ToNumeric), U8(1),
                 B(Star), R(3),
                 B(Inc), U8(1),
                 B(Star), R(0),
                 B(LdaSmi), I8(2),
+                B(Star), R(4),
   /*   79 E> */ B(StaKeyedProperty), R(1), R(3), U8(2),
+                B(Ldar), R(4),
   /*   83 S> */ B(Return),
 ]
 constant pool: [
diff --git a/src/v8/test/cctest/interpreter/bytecode_expectations/CreateRestParameter.golden b/src/v8/test/cctest/interpreter/bytecode_expectations/CreateRestParameter.golden
index 9f8ca4b..1d79f8e 100644
--- a/src/v8/test/cctest/interpreter/bytecode_expectations/CreateRestParameter.golden
+++ b/src/v8/test/cctest/interpreter/bytecode_expectations/CreateRestParameter.golden
@@ -88,11 +88,11 @@
                 B(Mov), R(arg0), R(1),
                 B(Mov), R(0), R(2),
   /*   29 S> */ B(LdaZero),
-  /*   44 E> */ B(LdaKeyedProperty), R(2), U8(0),
+  /*   44 E> */ B(LdaKeyedProperty), R(2), U8(1),
                 B(Star), R(4),
                 B(LdaZero),
-  /*   59 E> */ B(LdaKeyedProperty), R(3), U8(2),
-  /*   48 E> */ B(Add), R(4), U8(4),
+  /*   59 E> */ B(LdaKeyedProperty), R(3), U8(3),
+  /*   48 E> */ B(Add), R(4), U8(0),
   /*   63 S> */ B(Return),
 ]
 constant pool: [
diff --git a/src/v8/test/cctest/interpreter/bytecode_expectations/DeclareGlobals.golden b/src/v8/test/cctest/interpreter/bytecode_expectations/DeclareGlobals.golden
index cec1c48..0d1edb6 100644
--- a/src/v8/test/cctest/interpreter/bytecode_expectations/DeclareGlobals.golden
+++ b/src/v8/test/cctest/interpreter/bytecode_expectations/DeclareGlobals.golden
@@ -22,7 +22,7 @@
                 B(CallRuntime), U16(Runtime::kDeclareGlobalsForInterpreter), R(1), U8(3),
   /*    0 E> */ B(StackCheck),
   /*    8 S> */ B(LdaSmi), I8(1),
-  /*    8 E> */ B(StaGlobalSloppy), U8(1), U8(2),
+  /*    8 E> */ B(StaGlobal), U8(1), U8(2),
                 B(LdaUndefined),
   /*   10 S> */ B(Return),
 ]
@@ -74,9 +74,9 @@
                 B(CallRuntime), U16(Runtime::kDeclareGlobalsForInterpreter), R(1), U8(3),
   /*    0 E> */ B(StackCheck),
   /*    8 S> */ B(LdaSmi), I8(1),
-  /*    8 E> */ B(StaGlobalSloppy), U8(1), U8(2),
+  /*    8 E> */ B(StaGlobal), U8(1), U8(2),
   /*   11 S> */ B(LdaSmi), I8(2),
-  /*   12 E> */ B(StaGlobalSloppy), U8(1), U8(4),
+  /*   12 E> */ B(StaGlobal), U8(1), U8(4),
                 B(Star), R(0),
   /*   15 S> */ B(Return),
 ]
diff --git a/src/v8/test/cctest/interpreter/bytecode_expectations/Eval.golden b/src/v8/test/cctest/interpreter/bytecode_expectations/Eval.golden
index 17952e7..eb7b9d1 100644
--- a/src/v8/test/cctest/interpreter/bytecode_expectations/Eval.golden
+++ b/src/v8/test/cctest/interpreter/bytecode_expectations/Eval.golden
@@ -22,7 +22,7 @@
                 B(Ldar), R(0),
                 B(StaCurrentContextSlot), U8(5),
   /*   30 E> */ B(StackCheck),
-  /*   34 S> */ B(LdaLookupGlobalSlot), U8(0), U8(2), U8(1),
+  /*   34 S> */ B(LdaLookupGlobalSlot), U8(0), U8(0), U8(1),
                 B(Star), R(2),
                 B(LdaConstant), U8(1),
                 B(Star), R(3),
@@ -37,7 +37,7 @@
                 B(Mov), R(closure), R(6),
                 B(CallRuntime), U16(Runtime::kResolvePossiblyDirectEval), R(4), U8(6),
                 B(Star), R(2),
-  /*   41 E> */ B(CallUndefinedReceiver1), R(2), R(3), U8(0),
+  /*   41 E> */ B(CallUndefinedReceiver1), R(2), R(3), U8(2),
   /*   52 S> */ B(Return),
 ]
 constant pool: [
diff --git a/src/v8/test/cctest/interpreter/bytecode_expectations/ForAwaitOf.golden b/src/v8/test/cctest/interpreter/bytecode_expectations/ForAwaitOf.golden
index 8bc6d82..fd83a29 100644
--- a/src/v8/test/cctest/interpreter/bytecode_expectations/ForAwaitOf.golden
+++ b/src/v8/test/cctest/interpreter/bytecode_expectations/ForAwaitOf.golden
@@ -14,155 +14,173 @@
   }
   f();
 "
-frame size: 23
+frame size: 24
 parameter count: 1
-bytecode array length: 589
+bytecode array length: 554
 bytecodes: [
                 B(Ldar), R(2),
                 B(JumpIfUndefined), U8(18),
                 B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetContext), R(2), U8(1),
-                B(PushContext), R(12),
+                B(PushContext), R(13),
                 B(RestoreGeneratorState), R(2),
-                B(Star), R(11),
+                B(Star), R(12),
                 B(SwitchOnSmiNoFeedback), U8(0), U8(3), I8(0),
-                B(Abort), U8(45),
+                B(Abort), U8(15),
                 B(LdaSmi), I8(-2),
-                B(Star), R(11),
-                B(Mov), R(closure), R(12),
-                B(Mov), R(this), R(13),
-                B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(12), U8(2),
+                B(Star), R(12),
+                B(Mov), R(closure), R(13),
+                B(Mov), R(this), R(14),
+                B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(13), U8(2),
                 B(Star), R(2),
   /*   16 E> */ B(StackCheck),
                 B(CallJSRuntime), U8(%async_function_promise_create), R(0), U8(0),
-                B(Star), R(10),
-                B(Mov), R(context), R(14),
+                B(Star), R(11),
                 B(Mov), R(context), R(15),
+                B(Mov), R(context), R(16),
                 B(LdaZero),
-                B(Star), R(6),
-                B(Mov), R(context), R(18),
+                B(Star), R(7),
                 B(Mov), R(context), R(19),
+                B(Mov), R(context), R(20),
   /*   43 S> */ B(CreateArrayLiteral), U8(3), U8(0), U8(37),
-                B(Star), R(20),
-                B(LdaNamedProperty), R(20), U8(4), U8(5),
+                B(Star), R(21),
+                B(LdaNamedProperty), R(21), U8(4), U8(1),
                 B(JumpIfUndefined), U8(17),
                 B(JumpIfNull), U8(15),
-                B(Star), R(21),
-                B(CallProperty0), R(21), R(20), U8(7),
+                B(Star), R(22),
+                B(CallProperty0), R(22), R(21), U8(3),
                 B(JumpIfJSReceiver), U8(23),
                 B(CallRuntime), U16(Runtime::kThrowSymbolAsyncIteratorInvalid), R(0), U8(0),
-                B(LdaNamedProperty), R(20), U8(5), U8(1),
-                B(Star), R(21),
-                B(CallProperty0), R(21), R(20), U8(3),
-                B(Star), R(21),
-                B(InvokeIntrinsic), U8(Runtime::k_CreateAsyncFromSyncIterator), R(21), U8(1),
+                B(LdaNamedProperty), R(21), U8(5), U8(5),
+                B(Star), R(22),
+                B(CallProperty0), R(22), R(21), U8(7),
+                B(Star), R(22),
+                B(InvokeIntrinsic), U8(Runtime::k_CreateAsyncFromSyncIterator), R(22), U8(1),
                 B(Star), R(4),
-                B(Ldar), R(11),
-                B(SwitchOnSmiNoFeedback), U8(6), U8(1), I8(0),
+  /*   43 E> */ B(LdaNamedProperty), R(4), U8(6), U8(9),
+                B(Star), R(5),
+                B(Ldar), R(12),
+                B(SwitchOnSmiNoFeedback), U8(7), U8(1), I8(0),
                 B(LdaSmi), I8(-2),
-  /*   43 E> */ B(TestEqualStrictNoFeedback), R(11),
+                B(TestEqualStrictNoFeedback), R(12),
                 B(JumpIfTrue), U8(4),
-                B(Abort), U8(45),
-  /*   40 S> */ B(LdaNamedProperty), R(4), U8(7), U8(11),
-                B(Star), R(20),
-                B(CallProperty0), R(20), R(4), U8(9),
-                B(Star), R(21),
-                B(Mov), R(2), R(20),
-                B(Mov), R(10), R(22),
-                B(CallJSRuntime), U8(%async_function_await_uncaught), R(20), U8(3),
-                B(SuspendGenerator), R(2), R(0), U8(20), U8(0),
+                B(Abort), U8(15),
+  /*   40 S> */ B(CallProperty0), R(5), R(4), U8(11),
+                B(Star), R(22),
+                B(Mov), R(2), R(21),
+                B(Mov), R(11), R(23),
+                B(CallJSRuntime), U8(%async_function_await_uncaught), R(21), U8(3),
+                B(SuspendGenerator), R(2), R(0), U8(21), U8(0),
   /*   57 S> */ B(Return),
-                B(RestoreGeneratorRegisters), R(2), R(0), U8(20),
-                B(LdaSmi), I8(-2),
-                B(Star), R(11),
-                B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(2), U8(1),
-                B(Star), R(20),
-                B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(2), U8(1),
+                B(ResumeGenerator), R(2), R(12), R(0), U8(21),
                 B(Star), R(21),
+                B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(2), U8(1),
+                B(Star), R(22),
                 B(LdaZero),
-                B(TestEqualStrictNoFeedback), R(21),
+                B(TestEqualStrictNoFeedback), R(22),
                 B(JumpIfTrue), U8(5),
-                B(Ldar), R(20),
+                B(Ldar), R(21),
                 B(ReThrow),
-                B(Mov), R(20), R(5),
-  /*   40 E> */ B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(20), U8(1),
+                B(Mov), R(21), R(6),
+  /*   40 E> */ B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(21), U8(1),
                 B(ToBooleanLogicalNot),
                 B(JumpIfFalse), U8(7),
-                B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(5), U8(1),
-                B(LdaNamedProperty), R(5), U8(8), U8(13),
+                B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(6), U8(1),
+                B(LdaNamedProperty), R(6), U8(8), U8(13),
                 B(JumpIfToBooleanTrue), U8(25),
-                B(LdaNamedProperty), R(5), U8(9), U8(15),
-                B(Star), R(7),
+                B(LdaNamedProperty), R(6), U8(9), U8(15),
+                B(Star), R(8),
                 B(LdaSmi), I8(2),
-                B(Star), R(6),
-                B(Mov), R(7), R(3),
+                B(Star), R(7),
+                B(Mov), R(8), R(3),
   /*   23 E> */ B(StackCheck),
                 B(Mov), R(3), R(0),
                 B(LdaZero),
-                B(Star), R(6),
-                B(JumpLoop), U8(111), I8(0),
+                B(Star), R(7),
+                B(JumpLoop), U8(98), I8(0),
                 B(Jump), U8(40),
-                B(Star), R(20),
+                B(Star), R(21),
                 B(Ldar), R(closure),
-                B(CreateCatchContext), R(20), U8(10), U8(11),
-                B(Star), R(19),
+                B(CreateCatchContext), R(21), U8(10), U8(11),
+                B(Star), R(20),
                 B(LdaTheHole),
                 B(SetPendingMessage),
-                B(Ldar), R(19),
-                B(PushContext), R(20),
+                B(Ldar), R(20),
+                B(PushContext), R(21),
                 B(LdaSmi), I8(2),
-                B(TestEqualStrict), R(6), U8(17),
+                B(TestEqualStrict), R(7), U8(17),
                 B(JumpIfFalse), U8(6),
                 B(LdaSmi), I8(1),
-                B(Star), R(6),
+                B(Star), R(7),
                 B(LdaImmutableCurrentContextSlot), U8(4),
-                B(Star), R(21),
-                B(CallRuntime), U16(Runtime::kReThrow), R(21), U8(1),
-                B(PopContext), R(20),
+                B(Star), R(22),
+                B(CallRuntime), U16(Runtime::kReThrow), R(22), U8(1),
+                B(PopContext), R(21),
                 B(LdaSmi), I8(-1),
+                B(Star), R(18),
                 B(Star), R(17),
-                B(Star), R(16),
                 B(Jump), U8(7),
-                B(Star), R(17),
-                B(LdaZero),
-                B(Star), R(16),
-                B(LdaTheHole),
-                B(SetPendingMessage),
                 B(Star), R(18),
                 B(LdaZero),
-                B(TestEqualStrict), R(6), U8(18),
-                B(JumpIfTrue), U8(199),
+                B(Star), R(17),
+                B(LdaTheHole),
+                B(SetPendingMessage),
+                B(Star), R(19),
+                B(LdaZero),
+                B(TestEqualStrict), R(7), U8(18),
+                B(JumpIfTrue), U8(171),
                 B(LdaNamedProperty), R(4), U8(12), U8(19),
-                B(Star), R(8),
+                B(Star), R(9),
                 B(TestUndetectable),
                 B(JumpIfFalse), U8(4),
-                B(Jump), U8(188),
+                B(Jump), U8(160),
                 B(LdaSmi), I8(1),
-                B(TestEqualStrict), R(6), U8(22),
-                B(JumpIfFalse), U8(109),
-                B(Ldar), R(8),
-                B(TestTypeOf), U8(5),
+                B(TestEqualStrict), R(7), U8(21),
+                B(JumpIfFalse), U8(88),
+                B(Ldar), R(9),
+                B(TestTypeOf), U8(6),
                 B(JumpIfFalse), U8(4),
                 B(Jump), U8(18),
-                B(Wide), B(LdaSmi), I16(136),
-                B(Star), R(19),
-                B(LdaConstant), U8(13),
+                B(Wide), B(LdaSmi), I16(144),
                 B(Star), R(20),
-                B(CallRuntime), U16(Runtime::kNewTypeError), R(19), U8(2),
+                B(LdaConstant), U8(13),
+                B(Star), R(21),
+                B(CallRuntime), U16(Runtime::kNewTypeError), R(20), U8(2),
                 B(Throw),
-                B(Mov), R(context), R(19),
-                B(Mov), R(8), R(20),
+                B(Mov), R(context), R(20),
+                B(Mov), R(9), R(21),
+                B(Mov), R(4), R(22),
+                B(InvokeIntrinsic), U8(Runtime::k_Call), R(21), U8(2),
+                B(Star), R(22),
+                B(Mov), R(2), R(21),
+                B(Mov), R(11), R(23),
+                B(CallJSRuntime), U8(%async_function_await_caught), R(21), U8(3),
+                B(SuspendGenerator), R(2), R(0), U8(21), U8(1),
+  /*   57 S> */ B(Return),
+                B(ResumeGenerator), R(2), R(12), R(0), U8(21),
+                B(Star), R(21),
+                B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(2), U8(1),
+                B(Star), R(22),
+                B(LdaZero),
+                B(TestEqualStrictNoFeedback), R(22),
+                B(JumpIfTrue), U8(5),
+                B(Ldar), R(21),
+                B(ReThrow),
+                B(Ldar), R(21),
+                B(Jump), U8(6),
+                B(LdaTheHole),
+                B(SetPendingMessage),
+                B(Ldar), R(20),
+                B(Jump), U8(67),
+                B(Mov), R(9), R(20),
                 B(Mov), R(4), R(21),
                 B(InvokeIntrinsic), U8(Runtime::k_Call), R(20), U8(2),
                 B(Star), R(21),
                 B(Mov), R(2), R(20),
-                B(Mov), R(10), R(22),
-                B(CallJSRuntime), U8(%async_function_await_caught), R(20), U8(3),
-                B(SuspendGenerator), R(2), R(0), U8(20), U8(1),
+                B(Mov), R(11), R(22),
+                B(CallJSRuntime), U8(%async_function_await_uncaught), R(20), U8(3),
+                B(SuspendGenerator), R(2), R(0), U8(20), U8(2),
   /*   57 S> */ B(Return),
-                B(RestoreGeneratorRegisters), R(2), R(0), U8(20),
-                B(LdaSmi), I8(-2),
-                B(Star), R(11),
-                B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(2), U8(1),
+                B(ResumeGenerator), R(2), R(12), R(0), U8(20),
                 B(Star), R(20),
                 B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(2), U8(1),
                 B(Star), R(21),
@@ -171,111 +189,78 @@
                 B(JumpIfTrue), U8(5),
                 B(Ldar), R(20),
                 B(ReThrow),
-                B(Ldar), R(20),
-                B(Jump), U8(20),
-                B(Star), R(20),
-                B(Ldar), R(closure),
-                B(CreateCatchContext), R(20), U8(10), U8(14),
-                B(Star), R(19),
-                B(LdaTheHole),
-                B(SetPendingMessage),
-                B(Ldar), R(19),
-                B(PushContext), R(20),
-                B(PopContext), R(20),
-                B(Jump), U8(74),
-                B(Mov), R(8), R(19),
-                B(Mov), R(4), R(20),
-                B(InvokeIntrinsic), U8(Runtime::k_Call), R(19), U8(2),
-                B(Star), R(20),
-                B(Mov), R(2), R(19),
-                B(Mov), R(10), R(21),
-                B(CallJSRuntime), U8(%async_function_await_uncaught), R(19), U8(3),
-                B(SuspendGenerator), R(2), R(0), U8(19), U8(2),
-  /*   57 S> */ B(Return),
-                B(RestoreGeneratorRegisters), R(2), R(0), U8(19),
-                B(LdaSmi), I8(-2),
-                B(Star), R(11),
-                B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(2), U8(1),
-                B(Star), R(19),
-                B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(2), U8(1),
-                B(Star), R(20),
-                B(LdaZero),
-                B(TestEqualStrictNoFeedback), R(20),
-                B(JumpIfTrue), U8(5),
-                B(Ldar), R(19),
-                B(ReThrow),
-                B(Mov), R(19), R(9),
-                B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(19), U8(1),
+                B(Mov), R(20), R(10),
+                B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(20), U8(1),
                 B(JumpIfToBooleanFalse), U8(4),
                 B(Jump), U8(7),
-                B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(9), U8(1),
-                B(Ldar), R(18),
+                B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(10), U8(1),
+                B(Ldar), R(19),
                 B(SetPendingMessage),
                 B(LdaZero),
-                B(TestEqualStrictNoFeedback), R(16),
+                B(TestEqualStrictNoFeedback), R(17),
                 B(JumpIfFalse), U8(5),
-                B(Ldar), R(17),
+                B(Ldar), R(18),
                 B(ReThrow),
                 B(LdaUndefined),
-                B(Star), R(17),
-                B(Mov), R(10), R(16),
-                B(CallJSRuntime), U8(%promise_resolve), R(16), U8(2),
+                B(Star), R(18),
+                B(Mov), R(11), R(17),
+                B(CallJSRuntime), U8(%promise_resolve), R(17), U8(2),
                 B(LdaZero),
-                B(Star), R(12),
-                B(Mov), R(10), R(13),
+                B(Star), R(13),
+                B(Mov), R(11), R(14),
                 B(Jump), U8(58),
                 B(Jump), U8(42),
-                B(Star), R(16),
+                B(Star), R(17),
                 B(Ldar), R(closure),
-                B(CreateCatchContext), R(16), U8(10), U8(15),
-                B(Star), R(15),
+                B(CreateCatchContext), R(17), U8(10), U8(14),
+                B(Star), R(16),
                 B(LdaTheHole),
                 B(SetPendingMessage),
-                B(Ldar), R(15),
-                B(PushContext), R(16),
+                B(Ldar), R(16),
+                B(PushContext), R(17),
                 B(LdaImmutableCurrentContextSlot), U8(4),
-                B(Star), R(18),
-                B(LdaFalse),
                 B(Star), R(19),
-                B(Mov), R(10), R(17),
-                B(CallJSRuntime), U8(%promise_internal_reject), R(17), U8(3),
-                B(PopContext), R(16),
+                B(LdaFalse),
+                B(Star), R(20),
+                B(Mov), R(11), R(18),
+                B(CallJSRuntime), U8(%promise_internal_reject), R(18), U8(3),
+                B(PopContext), R(17),
                 B(LdaZero),
-                B(Star), R(12),
-                B(Mov), R(10), R(13),
+                B(Star), R(13),
+                B(Mov), R(11), R(14),
                 B(Jump), U8(16),
                 B(LdaSmi), I8(-1),
+                B(Star), R(14),
                 B(Star), R(13),
-                B(Star), R(12),
                 B(Jump), U8(8),
-                B(Star), R(13),
+                B(Star), R(14),
                 B(LdaSmi), I8(1),
-                B(Star), R(12),
+                B(Star), R(13),
                 B(LdaTheHole),
                 B(SetPendingMessage),
-                B(Star), R(14),
-                B(CallJSRuntime), U8(%async_function_promise_release), R(10), U8(1),
-                B(Ldar), R(14),
+                B(Star), R(15),
+                B(CallJSRuntime), U8(%async_function_promise_release), R(11), U8(1),
+                B(Ldar), R(15),
                 B(SetPendingMessage),
-                B(Ldar), R(12),
-                B(SwitchOnSmiNoFeedback), U8(16), U8(2), I8(0),
+                B(Ldar), R(13),
+                B(SwitchOnSmiNoFeedback), U8(15), U8(2), I8(0),
                 B(Jump), U8(8),
-                B(Ldar), R(13),
+                B(Ldar), R(14),
   /*   57 S> */ B(Return),
-                B(Ldar), R(13),
+                B(Ldar), R(14),
                 B(ReThrow),
                 B(LdaUndefined),
   /*   57 S> */ B(Return),
 ]
 constant pool: [
-  Smi [89],
-  Smi [339],
-  Smi [419],
+  Smi [95],
+  Smi [332],
+  Smi [391],
   TUPLE2_TYPE,
   SYMBOL_TYPE,
   SYMBOL_TYPE,
-  Smi [40],
   ONE_BYTE_INTERNALIZED_STRING_TYPE ["next"],
+  Smi [34],
   ONE_BYTE_INTERNALIZED_STRING_TYPE ["done"],
   ONE_BYTE_INTERNALIZED_STRING_TYPE ["value"],
   ONE_BYTE_INTERNALIZED_STRING_TYPE [".catch"],
@@ -283,16 +268,15 @@
   ONE_BYTE_INTERNALIZED_STRING_TYPE ["return"],
   ONE_BYTE_INTERNALIZED_STRING_TYPE [""],
   FIXED_ARRAY_TYPE,
-  FIXED_ARRAY_TYPE,
   Smi [6],
   Smi [9],
 ]
 handlers: [
-  [46, 548, 556],
-  [49, 506, 508],
-  [55, 257, 265],
-  [58, 217, 219],
-  [325, 383, 385],
+  [46, 513, 521],
+  [49, 471, 473],
+  [55, 250, 258],
+  [58, 210, 212],
+  [318, 369, 371],
 ]
 
 ---
@@ -302,156 +286,174 @@
   }
   f();
 "
-frame size: 23
+frame size: 24
 parameter count: 1
-bytecode array length: 618
+bytecode array length: 583
 bytecodes: [
                 B(Ldar), R(2),
                 B(JumpIfUndefined), U8(18),
                 B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetContext), R(2), U8(1),
-                B(PushContext), R(12),
+                B(PushContext), R(13),
                 B(RestoreGeneratorState), R(2),
-                B(Star), R(11),
+                B(Star), R(12),
                 B(SwitchOnSmiNoFeedback), U8(0), U8(3), I8(0),
-                B(Abort), U8(45),
+                B(Abort), U8(15),
                 B(LdaSmi), I8(-2),
-                B(Star), R(11),
-                B(Mov), R(closure), R(12),
-                B(Mov), R(this), R(13),
-                B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(12), U8(2),
+                B(Star), R(12),
+                B(Mov), R(closure), R(13),
+                B(Mov), R(this), R(14),
+                B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(13), U8(2),
                 B(Star), R(2),
   /*   16 E> */ B(StackCheck),
                 B(CallJSRuntime), U8(%async_function_promise_create), R(0), U8(0),
-                B(Star), R(10),
-                B(Mov), R(context), R(14),
+                B(Star), R(11),
                 B(Mov), R(context), R(15),
+                B(Mov), R(context), R(16),
                 B(LdaZero),
-                B(Star), R(6),
-                B(Mov), R(context), R(18),
+                B(Star), R(7),
                 B(Mov), R(context), R(19),
+                B(Mov), R(context), R(20),
   /*   43 S> */ B(CreateArrayLiteral), U8(3), U8(0), U8(37),
-                B(Star), R(20),
-                B(LdaNamedProperty), R(20), U8(4), U8(5),
+                B(Star), R(21),
+                B(LdaNamedProperty), R(21), U8(4), U8(1),
                 B(JumpIfUndefined), U8(17),
                 B(JumpIfNull), U8(15),
-                B(Star), R(21),
-                B(CallProperty0), R(21), R(20), U8(7),
+                B(Star), R(22),
+                B(CallProperty0), R(22), R(21), U8(3),
                 B(JumpIfJSReceiver), U8(23),
                 B(CallRuntime), U16(Runtime::kThrowSymbolAsyncIteratorInvalid), R(0), U8(0),
-                B(LdaNamedProperty), R(20), U8(5), U8(1),
-                B(Star), R(21),
-                B(CallProperty0), R(21), R(20), U8(3),
-                B(Star), R(21),
-                B(InvokeIntrinsic), U8(Runtime::k_CreateAsyncFromSyncIterator), R(21), U8(1),
+                B(LdaNamedProperty), R(21), U8(5), U8(5),
+                B(Star), R(22),
+                B(CallProperty0), R(22), R(21), U8(7),
+                B(Star), R(22),
+                B(InvokeIntrinsic), U8(Runtime::k_CreateAsyncFromSyncIterator), R(22), U8(1),
                 B(Star), R(4),
-                B(Ldar), R(11),
-                B(SwitchOnSmiNoFeedback), U8(6), U8(1), I8(0),
+  /*   43 E> */ B(LdaNamedProperty), R(4), U8(6), U8(9),
+                B(Star), R(5),
+                B(Ldar), R(12),
+                B(SwitchOnSmiNoFeedback), U8(7), U8(1), I8(0),
                 B(LdaSmi), I8(-2),
-  /*   43 E> */ B(TestEqualStrictNoFeedback), R(11),
+                B(TestEqualStrictNoFeedback), R(12),
                 B(JumpIfTrue), U8(4),
-                B(Abort), U8(45),
-  /*   40 S> */ B(LdaNamedProperty), R(4), U8(7), U8(11),
-                B(Star), R(20),
-                B(CallProperty0), R(20), R(4), U8(9),
-                B(Star), R(21),
-                B(Mov), R(2), R(20),
-                B(Mov), R(10), R(22),
-                B(CallJSRuntime), U8(%async_function_await_uncaught), R(20), U8(3),
-                B(SuspendGenerator), R(2), R(0), U8(20), U8(0),
+                B(Abort), U8(15),
+  /*   40 S> */ B(CallProperty0), R(5), R(4), U8(11),
+                B(Star), R(22),
+                B(Mov), R(2), R(21),
+                B(Mov), R(11), R(23),
+                B(CallJSRuntime), U8(%async_function_await_uncaught), R(21), U8(3),
+                B(SuspendGenerator), R(2), R(0), U8(21), U8(0),
   /*   68 S> */ B(Return),
-                B(RestoreGeneratorRegisters), R(2), R(0), U8(20),
-                B(LdaSmi), I8(-2),
-                B(Star), R(11),
-                B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(2), U8(1),
-                B(Star), R(20),
-                B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(2), U8(1),
+                B(ResumeGenerator), R(2), R(12), R(0), U8(21),
                 B(Star), R(21),
+                B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(2), U8(1),
+                B(Star), R(22),
                 B(LdaZero),
-                B(TestEqualStrictNoFeedback), R(21),
+                B(TestEqualStrictNoFeedback), R(22),
                 B(JumpIfTrue), U8(5),
-                B(Ldar), R(20),
+                B(Ldar), R(21),
                 B(ReThrow),
-                B(Mov), R(20), R(5),
-  /*   40 E> */ B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(20), U8(1),
+                B(Mov), R(21), R(6),
+  /*   40 E> */ B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(21), U8(1),
                 B(ToBooleanLogicalNot),
                 B(JumpIfFalse), U8(7),
-                B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(5), U8(1),
-                B(LdaNamedProperty), R(5), U8(8), U8(13),
+                B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(6), U8(1),
+                B(LdaNamedProperty), R(6), U8(8), U8(13),
                 B(JumpIfToBooleanTrue), U8(27),
-                B(LdaNamedProperty), R(5), U8(9), U8(15),
-                B(Star), R(7),
+                B(LdaNamedProperty), R(6), U8(9), U8(15),
+                B(Star), R(8),
                 B(LdaSmi), I8(2),
-                B(Star), R(6),
-                B(Mov), R(7), R(3),
+                B(Star), R(7),
+                B(Mov), R(8), R(3),
   /*   23 E> */ B(StackCheck),
                 B(Mov), R(3), R(0),
   /*   56 S> */ B(LdaZero),
-                B(Star), R(16),
-                B(Mov), R(7), R(17),
+                B(Star), R(17),
+                B(Mov), R(8), R(18),
                 B(Jump), U8(56),
                 B(Jump), U8(40),
-                B(Star), R(20),
+                B(Star), R(21),
                 B(Ldar), R(closure),
-                B(CreateCatchContext), R(20), U8(10), U8(11),
-                B(Star), R(19),
+                B(CreateCatchContext), R(21), U8(10), U8(11),
+                B(Star), R(20),
                 B(LdaTheHole),
                 B(SetPendingMessage),
-                B(Ldar), R(19),
-                B(PushContext), R(20),
+                B(Ldar), R(20),
+                B(PushContext), R(21),
                 B(LdaSmi), I8(2),
-                B(TestEqualStrict), R(6), U8(17),
+                B(TestEqualStrict), R(7), U8(17),
                 B(JumpIfFalse), U8(6),
                 B(LdaSmi), I8(1),
-                B(Star), R(6),
+                B(Star), R(7),
                 B(LdaImmutableCurrentContextSlot), U8(4),
-                B(Star), R(21),
-                B(CallRuntime), U16(Runtime::kReThrow), R(21), U8(1),
-                B(PopContext), R(20),
+                B(Star), R(22),
+                B(CallRuntime), U16(Runtime::kReThrow), R(22), U8(1),
+                B(PopContext), R(21),
                 B(LdaSmi), I8(-1),
+                B(Star), R(18),
                 B(Star), R(17),
-                B(Star), R(16),
                 B(Jump), U8(8),
-                B(Star), R(17),
+                B(Star), R(18),
                 B(LdaSmi), I8(1),
-                B(Star), R(16),
+                B(Star), R(17),
                 B(LdaTheHole),
                 B(SetPendingMessage),
-                B(Star), R(18),
+                B(Star), R(19),
                 B(LdaZero),
-                B(TestEqualStrict), R(6), U8(18),
-                B(JumpIfTrue), U8(199),
+                B(TestEqualStrict), R(7), U8(18),
+                B(JumpIfTrue), U8(171),
                 B(LdaNamedProperty), R(4), U8(12), U8(19),
-                B(Star), R(8),
+                B(Star), R(9),
                 B(TestUndetectable),
                 B(JumpIfFalse), U8(4),
-                B(Jump), U8(188),
+                B(Jump), U8(160),
                 B(LdaSmi), I8(1),
-                B(TestEqualStrict), R(6), U8(22),
-                B(JumpIfFalse), U8(109),
-                B(Ldar), R(8),
-                B(TestTypeOf), U8(5),
+                B(TestEqualStrict), R(7), U8(21),
+                B(JumpIfFalse), U8(88),
+                B(Ldar), R(9),
+                B(TestTypeOf), U8(6),
                 B(JumpIfFalse), U8(4),
                 B(Jump), U8(18),
-                B(Wide), B(LdaSmi), I16(136),
-                B(Star), R(19),
-                B(LdaConstant), U8(13),
+                B(Wide), B(LdaSmi), I16(144),
                 B(Star), R(20),
-                B(CallRuntime), U16(Runtime::kNewTypeError), R(19), U8(2),
+                B(LdaConstant), U8(13),
+                B(Star), R(21),
+                B(CallRuntime), U16(Runtime::kNewTypeError), R(20), U8(2),
                 B(Throw),
-                B(Mov), R(context), R(19),
-                B(Mov), R(8), R(20),
+                B(Mov), R(context), R(20),
+                B(Mov), R(9), R(21),
+                B(Mov), R(4), R(22),
+                B(InvokeIntrinsic), U8(Runtime::k_Call), R(21), U8(2),
+                B(Star), R(22),
+                B(Mov), R(2), R(21),
+                B(Mov), R(11), R(23),
+                B(CallJSRuntime), U8(%async_function_await_caught), R(21), U8(3),
+                B(SuspendGenerator), R(2), R(0), U8(21), U8(1),
+  /*   68 S> */ B(Return),
+                B(ResumeGenerator), R(2), R(12), R(0), U8(21),
+                B(Star), R(21),
+                B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(2), U8(1),
+                B(Star), R(22),
+                B(LdaZero),
+                B(TestEqualStrictNoFeedback), R(22),
+                B(JumpIfTrue), U8(5),
+                B(Ldar), R(21),
+                B(ReThrow),
+                B(Ldar), R(21),
+                B(Jump), U8(6),
+                B(LdaTheHole),
+                B(SetPendingMessage),
+                B(Ldar), R(20),
+                B(Jump), U8(67),
+                B(Mov), R(9), R(20),
                 B(Mov), R(4), R(21),
                 B(InvokeIntrinsic), U8(Runtime::k_Call), R(20), U8(2),
                 B(Star), R(21),
                 B(Mov), R(2), R(20),
-                B(Mov), R(10), R(22),
-                B(CallJSRuntime), U8(%async_function_await_caught), R(20), U8(3),
-                B(SuspendGenerator), R(2), R(0), U8(20), U8(1),
+                B(Mov), R(11), R(22),
+                B(CallJSRuntime), U8(%async_function_await_uncaught), R(20), U8(3),
+                B(SuspendGenerator), R(2), R(0), U8(20), U8(2),
   /*   68 S> */ B(Return),
-                B(RestoreGeneratorRegisters), R(2), R(0), U8(20),
-                B(LdaSmi), I8(-2),
-                B(Star), R(11),
-                B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(2), U8(1),
+                B(ResumeGenerator), R(2), R(12), R(0), U8(20),
                 B(Star), R(20),
                 B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(2), U8(1),
                 B(Star), R(21),
@@ -460,127 +462,93 @@
                 B(JumpIfTrue), U8(5),
                 B(Ldar), R(20),
                 B(ReThrow),
-                B(Ldar), R(20),
-                B(Jump), U8(20),
-                B(Star), R(20),
-                B(Ldar), R(closure),
-                B(CreateCatchContext), R(20), U8(10), U8(14),
-                B(Star), R(19),
-                B(LdaTheHole),
-                B(SetPendingMessage),
-                B(Ldar), R(19),
-                B(PushContext), R(20),
-                B(PopContext), R(20),
-                B(Jump), U8(74),
-                B(Mov), R(8), R(19),
-                B(Mov), R(4), R(20),
-                B(InvokeIntrinsic), U8(Runtime::k_Call), R(19), U8(2),
-                B(Star), R(20),
-                B(Mov), R(2), R(19),
-                B(Mov), R(10), R(21),
-                B(CallJSRuntime), U8(%async_function_await_uncaught), R(19), U8(3),
-                B(SuspendGenerator), R(2), R(0), U8(19), U8(2),
-  /*   68 S> */ B(Return),
-                B(RestoreGeneratorRegisters), R(2), R(0), U8(19),
-                B(LdaSmi), I8(-2),
-                B(Star), R(11),
-                B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(2), U8(1),
-                B(Star), R(19),
-                B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(2), U8(1),
-                B(Star), R(20),
-                B(LdaZero),
-                B(TestEqualStrictNoFeedback), R(20),
-                B(JumpIfTrue), U8(5),
-                B(Ldar), R(19),
-                B(ReThrow),
-                B(Mov), R(19), R(9),
-                B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(19), U8(1),
+                B(Mov), R(20), R(10),
+                B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(20), U8(1),
                 B(JumpIfToBooleanFalse), U8(4),
                 B(Jump), U8(7),
-                B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(9), U8(1),
-                B(Ldar), R(18),
+                B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(10), U8(1),
+                B(Ldar), R(19),
                 B(SetPendingMessage),
-                B(Ldar), R(16),
-                B(SwitchOnSmiNoFeedback), U8(15), U8(2), I8(0),
+                B(Ldar), R(17),
+                B(SwitchOnSmiNoFeedback), U8(14), U8(2), I8(0),
                 B(Jump), U8(13),
                 B(LdaZero),
-                B(Star), R(12),
-                B(Mov), R(17), R(13),
+                B(Star), R(13),
+                B(Mov), R(18), R(14),
                 B(Jump), U8(81),
-                B(Ldar), R(17),
+                B(Ldar), R(18),
                 B(ReThrow),
                 B(LdaUndefined),
-                B(Star), R(17),
-                B(Mov), R(10), R(16),
-                B(CallJSRuntime), U8(%promise_resolve), R(16), U8(2),
+                B(Star), R(18),
+                B(Mov), R(11), R(17),
+                B(CallJSRuntime), U8(%promise_resolve), R(17), U8(2),
                 B(LdaSmi), I8(1),
-                B(Star), R(12),
-                B(Mov), R(10), R(13),
+                B(Star), R(13),
+                B(Mov), R(11), R(14),
                 B(Jump), U8(59),
                 B(Jump), U8(43),
-                B(Star), R(16),
+                B(Star), R(17),
                 B(Ldar), R(closure),
-                B(CreateCatchContext), R(16), U8(10), U8(17),
-                B(Star), R(15),
+                B(CreateCatchContext), R(17), U8(10), U8(16),
+                B(Star), R(16),
                 B(LdaTheHole),
                 B(SetPendingMessage),
-                B(Ldar), R(15),
-                B(PushContext), R(16),
+                B(Ldar), R(16),
+                B(PushContext), R(17),
                 B(LdaImmutableCurrentContextSlot), U8(4),
-                B(Star), R(18),
-                B(LdaFalse),
                 B(Star), R(19),
-                B(Mov), R(10), R(17),
-                B(CallJSRuntime), U8(%promise_internal_reject), R(17), U8(3),
-                B(PopContext), R(16),
+                B(LdaFalse),
+                B(Star), R(20),
+                B(Mov), R(11), R(18),
+                B(CallJSRuntime), U8(%promise_internal_reject), R(18), U8(3),
+                B(PopContext), R(17),
                 B(LdaSmi), I8(1),
-                B(Star), R(12),
-                B(Mov), R(10), R(13),
+                B(Star), R(13),
+                B(Mov), R(11), R(14),
                 B(Jump), U8(16),
                 B(LdaSmi), I8(-1),
+                B(Star), R(14),
                 B(Star), R(13),
-                B(Star), R(12),
                 B(Jump), U8(8),
-                B(Star), R(13),
+                B(Star), R(14),
                 B(LdaSmi), I8(2),
-                B(Star), R(12),
+                B(Star), R(13),
                 B(LdaTheHole),
                 B(SetPendingMessage),
-                B(Star), R(14),
-                B(CallJSRuntime), U8(%async_function_promise_release), R(10), U8(1),
-                B(Ldar), R(14),
+                B(Star), R(15),
+                B(CallJSRuntime), U8(%async_function_promise_release), R(11), U8(1),
+                B(Ldar), R(15),
                 B(SetPendingMessage),
-                B(Ldar), R(12),
-                B(SwitchOnSmiNoFeedback), U8(18), U8(3), I8(0),
+                B(Ldar), R(13),
+                B(SwitchOnSmiNoFeedback), U8(17), U8(3), I8(0),
                 B(Jump), U8(21),
-                B(Mov), R(10), R(15),
-                B(Mov), R(13), R(16),
-                B(CallJSRuntime), U8(%promise_resolve), R(15), U8(2),
-                B(Ldar), R(10),
+                B(Mov), R(11), R(16),
+                B(Mov), R(14), R(17),
+                B(CallJSRuntime), U8(%promise_resolve), R(16), U8(2),
+                B(Ldar), R(11),
   /*   68 S> */ B(Return),
-                B(Ldar), R(13),
+                B(Ldar), R(14),
   /*   68 S> */ B(Return),
-                B(Ldar), R(13),
+                B(Ldar), R(14),
                 B(ReThrow),
                 B(LdaUndefined),
   /*   68 S> */ B(Return),
 ]
 constant pool: [
-  Smi [89],
-  Smi [342],
-  Smi [422],
+  Smi [95],
+  Smi [335],
+  Smi [394],
   TUPLE2_TYPE,
   SYMBOL_TYPE,
   SYMBOL_TYPE,
-  Smi [40],
   ONE_BYTE_INTERNALIZED_STRING_TYPE ["next"],
+  Smi [34],
   ONE_BYTE_INTERNALIZED_STRING_TYPE ["done"],
   ONE_BYTE_INTERNALIZED_STRING_TYPE ["value"],
   ONE_BYTE_INTERNALIZED_STRING_TYPE [".catch"],
   FIXED_ARRAY_TYPE,
   ONE_BYTE_INTERNALIZED_STRING_TYPE ["return"],
   ONE_BYTE_INTERNALIZED_STRING_TYPE [""],
-  FIXED_ARRAY_TYPE,
   Smi [6],
   Smi [14],
   FIXED_ARRAY_TYPE,
@@ -589,11 +557,11 @@
   Smi [22],
 ]
 handlers: [
-  [46, 564, 572],
-  [49, 521, 523],
-  [55, 259, 267],
-  [58, 219, 221],
-  [328, 386, 388],
+  [46, 529, 537],
+  [49, 486, 488],
+  [55, 252, 260],
+  [58, 212, 214],
+  [321, 372, 374],
 ]
 
 ---
@@ -606,87 +574,84 @@
   }
   f();
 "
-frame size: 23
+frame size: 24
 parameter count: 1
-bytecode array length: 607
+bytecode array length: 572
 bytecodes: [
                 B(Ldar), R(2),
                 B(JumpIfUndefined), U8(18),
                 B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetContext), R(2), U8(1),
-                B(PushContext), R(12),
+                B(PushContext), R(13),
                 B(RestoreGeneratorState), R(2),
-                B(Star), R(11),
+                B(Star), R(12),
                 B(SwitchOnSmiNoFeedback), U8(0), U8(3), I8(0),
-                B(Abort), U8(45),
+                B(Abort), U8(15),
                 B(LdaSmi), I8(-2),
-                B(Star), R(11),
-                B(Mov), R(closure), R(12),
-                B(Mov), R(this), R(13),
-                B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(12), U8(2),
+                B(Star), R(12),
+                B(Mov), R(closure), R(13),
+                B(Mov), R(this), R(14),
+                B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(13), U8(2),
                 B(Star), R(2),
   /*   16 E> */ B(StackCheck),
                 B(CallJSRuntime), U8(%async_function_promise_create), R(0), U8(0),
-                B(Star), R(10),
-                B(Mov), R(context), R(14),
+                B(Star), R(11),
                 B(Mov), R(context), R(15),
+                B(Mov), R(context), R(16),
                 B(LdaZero),
-                B(Star), R(6),
-                B(Mov), R(context), R(18),
+                B(Star), R(7),
                 B(Mov), R(context), R(19),
+                B(Mov), R(context), R(20),
   /*   43 S> */ B(CreateArrayLiteral), U8(3), U8(0), U8(37),
-                B(Star), R(20),
-                B(LdaNamedProperty), R(20), U8(4), U8(5),
+                B(Star), R(21),
+                B(LdaNamedProperty), R(21), U8(4), U8(1),
                 B(JumpIfUndefined), U8(17),
                 B(JumpIfNull), U8(15),
-                B(Star), R(21),
-                B(CallProperty0), R(21), R(20), U8(7),
+                B(Star), R(22),
+                B(CallProperty0), R(22), R(21), U8(3),
                 B(JumpIfJSReceiver), U8(23),
                 B(CallRuntime), U16(Runtime::kThrowSymbolAsyncIteratorInvalid), R(0), U8(0),
-                B(LdaNamedProperty), R(20), U8(5), U8(1),
-                B(Star), R(21),
-                B(CallProperty0), R(21), R(20), U8(3),
-                B(Star), R(21),
-                B(InvokeIntrinsic), U8(Runtime::k_CreateAsyncFromSyncIterator), R(21), U8(1),
+                B(LdaNamedProperty), R(21), U8(5), U8(5),
+                B(Star), R(22),
+                B(CallProperty0), R(22), R(21), U8(7),
+                B(Star), R(22),
+                B(InvokeIntrinsic), U8(Runtime::k_CreateAsyncFromSyncIterator), R(22), U8(1),
                 B(Star), R(4),
-                B(Ldar), R(11),
-                B(SwitchOnSmiNoFeedback), U8(6), U8(1), I8(0),
+  /*   43 E> */ B(LdaNamedProperty), R(4), U8(6), U8(9),
+                B(Star), R(5),
+                B(Ldar), R(12),
+                B(SwitchOnSmiNoFeedback), U8(7), U8(1), I8(0),
                 B(LdaSmi), I8(-2),
-  /*   43 E> */ B(TestEqualStrictNoFeedback), R(11),
+                B(TestEqualStrictNoFeedback), R(12),
                 B(JumpIfTrue), U8(4),
-                B(Abort), U8(45),
-  /*   40 S> */ B(LdaNamedProperty), R(4), U8(7), U8(11),
-                B(Star), R(20),
-                B(CallProperty0), R(20), R(4), U8(9),
-                B(Star), R(21),
-                B(Mov), R(2), R(20),
-                B(Mov), R(10), R(22),
-                B(CallJSRuntime), U8(%async_function_await_uncaught), R(20), U8(3),
-                B(SuspendGenerator), R(2), R(0), U8(20), U8(0),
+                B(Abort), U8(15),
+  /*   40 S> */ B(CallProperty0), R(5), R(4), U8(11),
+                B(Star), R(22),
+                B(Mov), R(2), R(21),
+                B(Mov), R(11), R(23),
+                B(CallJSRuntime), U8(%async_function_await_uncaught), R(21), U8(3),
+                B(SuspendGenerator), R(2), R(0), U8(21), U8(0),
   /*  114 S> */ B(Return),
-                B(RestoreGeneratorRegisters), R(2), R(0), U8(20),
-                B(LdaSmi), I8(-2),
-                B(Star), R(11),
-                B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(2), U8(1),
-                B(Star), R(20),
-                B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(2), U8(1),
+                B(ResumeGenerator), R(2), R(12), R(0), U8(21),
                 B(Star), R(21),
+                B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(2), U8(1),
+                B(Star), R(22),
                 B(LdaZero),
-                B(TestEqualStrictNoFeedback), R(21),
+                B(TestEqualStrictNoFeedback), R(22),
                 B(JumpIfTrue), U8(5),
-                B(Ldar), R(20),
+                B(Ldar), R(21),
                 B(ReThrow),
-                B(Mov), R(20), R(5),
-  /*   40 E> */ B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(20), U8(1),
+                B(Mov), R(21), R(6),
+  /*   40 E> */ B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(21), U8(1),
                 B(ToBooleanLogicalNot),
                 B(JumpIfFalse), U8(7),
-                B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(5), U8(1),
-                B(LdaNamedProperty), R(5), U8(8), U8(13),
+                B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(6), U8(1),
+                B(LdaNamedProperty), R(6), U8(8), U8(13),
                 B(JumpIfToBooleanTrue), U8(43),
-                B(LdaNamedProperty), R(5), U8(9), U8(15),
-                B(Star), R(7),
+                B(LdaNamedProperty), R(6), U8(9), U8(15),
+                B(Star), R(8),
                 B(LdaSmi), I8(2),
-                B(Star), R(6),
-                B(Mov), R(7), R(3),
+                B(Star), R(7),
+                B(Mov), R(8), R(3),
   /*   23 E> */ B(StackCheck),
                 B(Mov), R(3), R(0),
   /*   63 S> */ B(LdaSmi), I8(10),
@@ -698,71 +663,92 @@
                 B(JumpIfFalse), U8(4),
   /*  103 S> */ B(Jump), U8(8),
                 B(LdaZero),
-                B(Star), R(6),
-                B(JumpLoop), U8(129), I8(0),
+                B(Star), R(7),
+                B(JumpLoop), U8(116), I8(0),
                 B(Jump), U8(40),
-                B(Star), R(20),
+                B(Star), R(21),
                 B(Ldar), R(closure),
-                B(CreateCatchContext), R(20), U8(10), U8(11),
-                B(Star), R(19),
+                B(CreateCatchContext), R(21), U8(10), U8(11),
+                B(Star), R(20),
                 B(LdaTheHole),
                 B(SetPendingMessage),
-                B(Ldar), R(19),
-                B(PushContext), R(20),
+                B(Ldar), R(20),
+                B(PushContext), R(21),
                 B(LdaSmi), I8(2),
-                B(TestEqualStrict), R(6), U8(19),
+                B(TestEqualStrict), R(7), U8(19),
                 B(JumpIfFalse), U8(6),
                 B(LdaSmi), I8(1),
-                B(Star), R(6),
+                B(Star), R(7),
                 B(LdaImmutableCurrentContextSlot), U8(4),
-                B(Star), R(21),
-                B(CallRuntime), U16(Runtime::kReThrow), R(21), U8(1),
-                B(PopContext), R(20),
+                B(Star), R(22),
+                B(CallRuntime), U16(Runtime::kReThrow), R(22), U8(1),
+                B(PopContext), R(21),
                 B(LdaSmi), I8(-1),
+                B(Star), R(18),
                 B(Star), R(17),
-                B(Star), R(16),
                 B(Jump), U8(7),
-                B(Star), R(17),
-                B(LdaZero),
-                B(Star), R(16),
-                B(LdaTheHole),
-                B(SetPendingMessage),
                 B(Star), R(18),
                 B(LdaZero),
-                B(TestEqualStrict), R(6), U8(20),
-                B(JumpIfTrue), U8(199),
+                B(Star), R(17),
+                B(LdaTheHole),
+                B(SetPendingMessage),
+                B(Star), R(19),
+                B(LdaZero),
+                B(TestEqualStrict), R(7), U8(20),
+                B(JumpIfTrue), U8(171),
                 B(LdaNamedProperty), R(4), U8(12), U8(21),
-                B(Star), R(8),
+                B(Star), R(9),
                 B(TestUndetectable),
                 B(JumpIfFalse), U8(4),
-                B(Jump), U8(188),
+                B(Jump), U8(160),
                 B(LdaSmi), I8(1),
-                B(TestEqualStrict), R(6), U8(24),
-                B(JumpIfFalse), U8(109),
-                B(Ldar), R(8),
-                B(TestTypeOf), U8(5),
+                B(TestEqualStrict), R(7), U8(23),
+                B(JumpIfFalse), U8(88),
+                B(Ldar), R(9),
+                B(TestTypeOf), U8(6),
                 B(JumpIfFalse), U8(4),
                 B(Jump), U8(18),
-                B(Wide), B(LdaSmi), I16(136),
-                B(Star), R(19),
-                B(LdaConstant), U8(13),
+                B(Wide), B(LdaSmi), I16(144),
                 B(Star), R(20),
-                B(CallRuntime), U16(Runtime::kNewTypeError), R(19), U8(2),
+                B(LdaConstant), U8(13),
+                B(Star), R(21),
+                B(CallRuntime), U16(Runtime::kNewTypeError), R(20), U8(2),
                 B(Throw),
-                B(Mov), R(context), R(19),
-                B(Mov), R(8), R(20),
+                B(Mov), R(context), R(20),
+                B(Mov), R(9), R(21),
+                B(Mov), R(4), R(22),
+                B(InvokeIntrinsic), U8(Runtime::k_Call), R(21), U8(2),
+                B(Star), R(22),
+                B(Mov), R(2), R(21),
+                B(Mov), R(11), R(23),
+                B(CallJSRuntime), U8(%async_function_await_caught), R(21), U8(3),
+                B(SuspendGenerator), R(2), R(0), U8(21), U8(1),
+  /*  114 S> */ B(Return),
+                B(ResumeGenerator), R(2), R(12), R(0), U8(21),
+                B(Star), R(21),
+                B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(2), U8(1),
+                B(Star), R(22),
+                B(LdaZero),
+                B(TestEqualStrictNoFeedback), R(22),
+                B(JumpIfTrue), U8(5),
+                B(Ldar), R(21),
+                B(ReThrow),
+                B(Ldar), R(21),
+                B(Jump), U8(6),
+                B(LdaTheHole),
+                B(SetPendingMessage),
+                B(Ldar), R(20),
+                B(Jump), U8(67),
+                B(Mov), R(9), R(20),
                 B(Mov), R(4), R(21),
                 B(InvokeIntrinsic), U8(Runtime::k_Call), R(20), U8(2),
                 B(Star), R(21),
                 B(Mov), R(2), R(20),
-                B(Mov), R(10), R(22),
-                B(CallJSRuntime), U8(%async_function_await_caught), R(20), U8(3),
-                B(SuspendGenerator), R(2), R(0), U8(20), U8(1),
+                B(Mov), R(11), R(22),
+                B(CallJSRuntime), U8(%async_function_await_uncaught), R(20), U8(3),
+                B(SuspendGenerator), R(2), R(0), U8(20), U8(2),
   /*  114 S> */ B(Return),
-                B(RestoreGeneratorRegisters), R(2), R(0), U8(20),
-                B(LdaSmi), I8(-2),
-                B(Star), R(11),
-                B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(2), U8(1),
+                B(ResumeGenerator), R(2), R(12), R(0), U8(20),
                 B(Star), R(20),
                 B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(2), U8(1),
                 B(Star), R(21),
@@ -771,111 +757,78 @@
                 B(JumpIfTrue), U8(5),
                 B(Ldar), R(20),
                 B(ReThrow),
-                B(Ldar), R(20),
-                B(Jump), U8(20),
-                B(Star), R(20),
-                B(Ldar), R(closure),
-                B(CreateCatchContext), R(20), U8(10), U8(14),
-                B(Star), R(19),
-                B(LdaTheHole),
-                B(SetPendingMessage),
-                B(Ldar), R(19),
-                B(PushContext), R(20),
-                B(PopContext), R(20),
-                B(Jump), U8(74),
-                B(Mov), R(8), R(19),
-                B(Mov), R(4), R(20),
-                B(InvokeIntrinsic), U8(Runtime::k_Call), R(19), U8(2),
-                B(Star), R(20),
-                B(Mov), R(2), R(19),
-                B(Mov), R(10), R(21),
-                B(CallJSRuntime), U8(%async_function_await_uncaught), R(19), U8(3),
-                B(SuspendGenerator), R(2), R(0), U8(19), U8(2),
-  /*  114 S> */ B(Return),
-                B(RestoreGeneratorRegisters), R(2), R(0), U8(19),
-                B(LdaSmi), I8(-2),
-                B(Star), R(11),
-                B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(2), U8(1),
-                B(Star), R(19),
-                B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(2), U8(1),
-                B(Star), R(20),
-                B(LdaZero),
-                B(TestEqualStrictNoFeedback), R(20),
-                B(JumpIfTrue), U8(5),
-                B(Ldar), R(19),
-                B(ReThrow),
-                B(Mov), R(19), R(9),
-                B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(19), U8(1),
+                B(Mov), R(20), R(10),
+                B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(20), U8(1),
                 B(JumpIfToBooleanFalse), U8(4),
                 B(Jump), U8(7),
-                B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(9), U8(1),
-                B(Ldar), R(18),
+                B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(10), U8(1),
+                B(Ldar), R(19),
                 B(SetPendingMessage),
                 B(LdaZero),
-                B(TestEqualStrictNoFeedback), R(16),
+                B(TestEqualStrictNoFeedback), R(17),
                 B(JumpIfFalse), U8(5),
-                B(Ldar), R(17),
+                B(Ldar), R(18),
                 B(ReThrow),
                 B(LdaUndefined),
-                B(Star), R(17),
-                B(Mov), R(10), R(16),
-                B(CallJSRuntime), U8(%promise_resolve), R(16), U8(2),
+                B(Star), R(18),
+                B(Mov), R(11), R(17),
+                B(CallJSRuntime), U8(%promise_resolve), R(17), U8(2),
                 B(LdaZero),
-                B(Star), R(12),
-                B(Mov), R(10), R(13),
+                B(Star), R(13),
+                B(Mov), R(11), R(14),
                 B(Jump), U8(58),
                 B(Jump), U8(42),
-                B(Star), R(16),
+                B(Star), R(17),
                 B(Ldar), R(closure),
-                B(CreateCatchContext), R(16), U8(10), U8(15),
-                B(Star), R(15),
+                B(CreateCatchContext), R(17), U8(10), U8(14),
+                B(Star), R(16),
                 B(LdaTheHole),
                 B(SetPendingMessage),
-                B(Ldar), R(15),
-                B(PushContext), R(16),
+                B(Ldar), R(16),
+                B(PushContext), R(17),
                 B(LdaImmutableCurrentContextSlot), U8(4),
-                B(Star), R(18),
-                B(LdaFalse),
                 B(Star), R(19),
-                B(Mov), R(10), R(17),
-                B(CallJSRuntime), U8(%promise_internal_reject), R(17), U8(3),
-                B(PopContext), R(16),
+                B(LdaFalse),
+                B(Star), R(20),
+                B(Mov), R(11), R(18),
+                B(CallJSRuntime), U8(%promise_internal_reject), R(18), U8(3),
+                B(PopContext), R(17),
                 B(LdaZero),
-                B(Star), R(12),
-                B(Mov), R(10), R(13),
+                B(Star), R(13),
+                B(Mov), R(11), R(14),
                 B(Jump), U8(16),
                 B(LdaSmi), I8(-1),
+                B(Star), R(14),
                 B(Star), R(13),
-                B(Star), R(12),
                 B(Jump), U8(8),
-                B(Star), R(13),
+                B(Star), R(14),
                 B(LdaSmi), I8(1),
-                B(Star), R(12),
+                B(Star), R(13),
                 B(LdaTheHole),
                 B(SetPendingMessage),
-                B(Star), R(14),
-                B(CallJSRuntime), U8(%async_function_promise_release), R(10), U8(1),
-                B(Ldar), R(14),
+                B(Star), R(15),
+                B(CallJSRuntime), U8(%async_function_promise_release), R(11), U8(1),
+                B(Ldar), R(15),
                 B(SetPendingMessage),
-                B(Ldar), R(12),
-                B(SwitchOnSmiNoFeedback), U8(16), U8(2), I8(0),
+                B(Ldar), R(13),
+                B(SwitchOnSmiNoFeedback), U8(15), U8(2), I8(0),
                 B(Jump), U8(8),
-                B(Ldar), R(13),
+                B(Ldar), R(14),
   /*  114 S> */ B(Return),
-                B(Ldar), R(13),
+                B(Ldar), R(14),
                 B(ReThrow),
                 B(LdaUndefined),
   /*  114 S> */ B(Return),
 ]
 constant pool: [
-  Smi [89],
-  Smi [357],
-  Smi [437],
+  Smi [95],
+  Smi [350],
+  Smi [409],
   TUPLE2_TYPE,
   SYMBOL_TYPE,
   SYMBOL_TYPE,
-  Smi [40],
   ONE_BYTE_INTERNALIZED_STRING_TYPE ["next"],
+  Smi [34],
   ONE_BYTE_INTERNALIZED_STRING_TYPE ["done"],
   ONE_BYTE_INTERNALIZED_STRING_TYPE ["value"],
   ONE_BYTE_INTERNALIZED_STRING_TYPE [".catch"],
@@ -883,16 +836,15 @@
   ONE_BYTE_INTERNALIZED_STRING_TYPE ["return"],
   ONE_BYTE_INTERNALIZED_STRING_TYPE [""],
   FIXED_ARRAY_TYPE,
-  FIXED_ARRAY_TYPE,
   Smi [6],
   Smi [9],
 ]
 handlers: [
-  [46, 566, 574],
-  [49, 524, 526],
-  [55, 275, 283],
-  [58, 235, 237],
-  [343, 401, 403],
+  [46, 531, 539],
+  [49, 489, 491],
+  [55, 268, 276],
+  [58, 228, 230],
+  [336, 387, 389],
 ]
 
 ---
@@ -903,186 +855,180 @@
   }
   f();
 "
-frame size: 19
+frame size: 20
 parameter count: 1
-bytecode array length: 417
+bytecode array length: 403
 bytecodes: [
   /*   16 E> */ B(StackCheck),
                 B(CallJSRuntime), U8(%async_function_promise_create), R(0), U8(0),
-                B(Star), R(8),
-                B(Mov), R(context), R(11),
+                B(Star), R(9),
                 B(Mov), R(context), R(12),
-  /*   31 S> */ B(CreateObjectLiteral), U8(0), U8(0), U8(41), R(13),
-                B(Mov), R(13), R(1),
+                B(Mov), R(context), R(13),
+  /*   31 S> */ B(CreateObjectLiteral), U8(0), U8(0), U8(41), R(14),
+                B(Mov), R(14), R(1),
                 B(LdaZero),
-                B(Star), R(4),
-                B(Mov), R(context), R(15),
+                B(Star), R(5),
                 B(Mov), R(context), R(16),
+                B(Mov), R(context), R(17),
   /*   68 S> */ B(CreateArrayLiteral), U8(1), U8(1), U8(37),
-                B(Star), R(17),
-                B(LdaNamedProperty), R(17), U8(2), U8(2),
                 B(Star), R(18),
-                B(CallProperty0), R(18), R(17), U8(4),
+                B(LdaNamedProperty), R(18), U8(2), U8(2),
+                B(Star), R(19),
+                B(CallProperty0), R(19), R(18), U8(4),
                 B(JumpIfJSReceiver), U8(7),
                 B(CallRuntime), U16(Runtime::kThrowSymbolIteratorInvalid), R(0), U8(0),
                 B(Star), R(2),
-  /*   59 S> */ B(LdaNamedProperty), R(2), U8(3), U8(8),
-                B(Star), R(17),
-                B(CallProperty0), R(17), R(2), U8(6),
+  /*   68 E> */ B(LdaNamedProperty), R(2), U8(3), U8(6),
                 B(Star), R(3),
-  /*   59 E> */ B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(3), U8(1),
+  /*   59 S> */ B(CallProperty0), R(3), R(2), U8(8),
+                B(Star), R(4),
+  /*   59 E> */ B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(4), U8(1),
                 B(ToBooleanLogicalNot),
                 B(JumpIfFalse), U8(7),
-                B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(3), U8(1),
-                B(LdaNamedProperty), R(3), U8(4), U8(10),
+                B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(4), U8(1),
+                B(LdaNamedProperty), R(4), U8(4), U8(10),
                 B(JumpIfToBooleanTrue), U8(30),
-  /*   58 E> */ B(LdaNamedProperty), R(3), U8(5), U8(12),
-                B(Star), R(5),
+  /*   58 E> */ B(LdaNamedProperty), R(4), U8(5), U8(12),
+                B(Star), R(6),
                 B(LdaSmi), I8(2),
-                B(Star), R(4),
-                B(Ldar), R(5),
+                B(Star), R(5),
+                B(Ldar), R(6),
                 B(StaNamedProperty), R(1), U8(6), U8(14),
   /*   53 E> */ B(StackCheck),
   /*   87 S> */ B(LdaNamedProperty), R(1), U8(6), U8(16),
-                B(Star), R(14),
+                B(Star), R(15),
                 B(LdaZero),
-                B(Star), R(13),
+                B(Star), R(14),
                 B(Jump), U8(56),
                 B(Jump), U8(40),
-                B(Star), R(17),
+                B(Star), R(18),
                 B(Ldar), R(closure),
-                B(CreateCatchContext), R(17), U8(7), U8(8),
-                B(Star), R(16),
+                B(CreateCatchContext), R(18), U8(7), U8(8),
+                B(Star), R(17),
                 B(LdaTheHole),
                 B(SetPendingMessage),
-                B(Ldar), R(16),
-                B(PushContext), R(17),
+                B(Ldar), R(17),
+                B(PushContext), R(18),
                 B(LdaSmi), I8(2),
-                B(TestEqualStrict), R(4), U8(18),
+                B(TestEqualStrict), R(5), U8(18),
                 B(JumpIfFalse), U8(6),
                 B(LdaSmi), I8(1),
-                B(Star), R(4),
+                B(Star), R(5),
                 B(LdaImmutableCurrentContextSlot), U8(4),
-                B(Star), R(18),
-                B(CallRuntime), U16(Runtime::kReThrow), R(18), U8(1),
-                B(PopContext), R(17),
+                B(Star), R(19),
+                B(CallRuntime), U16(Runtime::kReThrow), R(19), U8(1),
+                B(PopContext), R(18),
                 B(LdaSmi), I8(-1),
+                B(Star), R(15),
                 B(Star), R(14),
-                B(Star), R(13),
                 B(Jump), U8(8),
-                B(Star), R(14),
+                B(Star), R(15),
                 B(LdaSmi), I8(1),
-                B(Star), R(13),
+                B(Star), R(14),
                 B(LdaTheHole),
                 B(SetPendingMessage),
-                B(Star), R(15),
+                B(Star), R(16),
                 B(LdaZero),
-                B(TestEqualStrict), R(4), U8(19),
-                B(JumpIfTrue), U8(104),
+                B(TestEqualStrict), R(5), U8(19),
+                B(JumpIfTrue), U8(90),
                 B(LdaNamedProperty), R(2), U8(9), U8(20),
-                B(Star), R(6),
+                B(Star), R(7),
                 B(TestUndetectable),
                 B(JumpIfFalse), U8(4),
-                B(Jump), U8(93),
+                B(Jump), U8(79),
                 B(LdaSmi), I8(1),
-                B(TestEqualStrict), R(4), U8(23),
-                B(JumpIfFalse), U8(61),
-                B(Ldar), R(6),
-                B(TestTypeOf), U8(5),
+                B(TestEqualStrict), R(5), U8(22),
+                B(JumpIfFalse), U8(47),
+                B(Ldar), R(7),
+                B(TestTypeOf), U8(6),
                 B(JumpIfFalse), U8(4),
                 B(Jump), U8(18),
-                B(Wide), B(LdaSmi), I16(136),
-                B(Star), R(16),
-                B(LdaConstant), U8(10),
+                B(Wide), B(LdaSmi), I16(144),
                 B(Star), R(17),
-                B(CallRuntime), U16(Runtime::kNewTypeError), R(16), U8(2),
+                B(LdaConstant), U8(10),
+                B(Star), R(18),
+                B(CallRuntime), U16(Runtime::kNewTypeError), R(17), U8(2),
                 B(Throw),
-                B(Mov), R(context), R(16),
-                B(Mov), R(6), R(17),
+                B(Mov), R(context), R(17),
+                B(Mov), R(7), R(18),
+                B(Mov), R(2), R(19),
+                B(InvokeIntrinsic), U8(Runtime::k_Call), R(18), U8(2),
+                B(Jump), U8(6),
+                B(LdaTheHole),
+                B(SetPendingMessage),
+                B(Ldar), R(17),
+                B(Jump), U8(27),
+                B(Mov), R(7), R(17),
                 B(Mov), R(2), R(18),
                 B(InvokeIntrinsic), U8(Runtime::k_Call), R(17), U8(2),
-                B(Jump), U8(20),
-                B(Star), R(17),
-                B(Ldar), R(closure),
-                B(CreateCatchContext), R(17), U8(7), U8(11),
-                B(Star), R(16),
-                B(LdaTheHole),
-                B(SetPendingMessage),
-                B(Ldar), R(16),
-                B(PushContext), R(17),
-                B(PopContext), R(17),
-                B(Jump), U8(27),
-                B(Mov), R(6), R(16),
-                B(Mov), R(2), R(17),
-                B(InvokeIntrinsic), U8(Runtime::k_Call), R(16), U8(2),
-                B(Star), R(7),
-                B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(7), U8(1),
+                B(Star), R(8),
+                B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(8), U8(1),
                 B(JumpIfToBooleanFalse), U8(4),
                 B(Jump), U8(7),
-                B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(7), U8(1),
-                B(Ldar), R(15),
+                B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(8), U8(1),
+                B(Ldar), R(16),
                 B(SetPendingMessage),
-                B(Ldar), R(13),
-                B(SwitchOnSmiNoFeedback), U8(12), U8(2), I8(0),
+                B(Ldar), R(14),
+                B(SwitchOnSmiNoFeedback), U8(11), U8(2), I8(0),
                 B(Jump), U8(13),
                 B(LdaZero),
-                B(Star), R(9),
-                B(Mov), R(14), R(10),
+                B(Star), R(10),
+                B(Mov), R(15), R(11),
                 B(Jump), U8(81),
-                B(Ldar), R(14),
+                B(Ldar), R(15),
                 B(ReThrow),
                 B(LdaUndefined),
-                B(Star), R(14),
-                B(Mov), R(8), R(13),
-                B(CallJSRuntime), U8(%promise_resolve), R(13), U8(2),
+                B(Star), R(15),
+                B(Mov), R(9), R(14),
+                B(CallJSRuntime), U8(%promise_resolve), R(14), U8(2),
                 B(LdaSmi), I8(1),
-                B(Star), R(9),
-                B(Mov), R(8), R(10),
+                B(Star), R(10),
+                B(Mov), R(9), R(11),
                 B(Jump), U8(59),
                 B(Jump), U8(43),
-                B(Star), R(13),
+                B(Star), R(14),
                 B(Ldar), R(closure),
-                B(CreateCatchContext), R(13), U8(7), U8(14),
-                B(Star), R(12),
+                B(CreateCatchContext), R(14), U8(7), U8(13),
+                B(Star), R(13),
                 B(LdaTheHole),
                 B(SetPendingMessage),
-                B(Ldar), R(12),
-                B(PushContext), R(13),
+                B(Ldar), R(13),
+                B(PushContext), R(14),
                 B(LdaImmutableCurrentContextSlot), U8(4),
-                B(Star), R(15),
-                B(LdaFalse),
                 B(Star), R(16),
-                B(Mov), R(8), R(14),
-                B(CallJSRuntime), U8(%promise_internal_reject), R(14), U8(3),
-                B(PopContext), R(13),
+                B(LdaFalse),
+                B(Star), R(17),
+                B(Mov), R(9), R(15),
+                B(CallJSRuntime), U8(%promise_internal_reject), R(15), U8(3),
+                B(PopContext), R(14),
                 B(LdaSmi), I8(1),
-                B(Star), R(9),
-                B(Mov), R(8), R(10),
+                B(Star), R(10),
+                B(Mov), R(9), R(11),
                 B(Jump), U8(16),
                 B(LdaSmi), I8(-1),
+                B(Star), R(11),
                 B(Star), R(10),
-                B(Star), R(9),
                 B(Jump), U8(8),
-                B(Star), R(10),
+                B(Star), R(11),
                 B(LdaSmi), I8(2),
-                B(Star), R(9),
+                B(Star), R(10),
                 B(LdaTheHole),
                 B(SetPendingMessage),
-                B(Star), R(11),
-                B(CallJSRuntime), U8(%async_function_promise_release), R(8), U8(1),
-                B(Ldar), R(11),
+                B(Star), R(12),
+                B(CallJSRuntime), U8(%async_function_promise_release), R(9), U8(1),
+                B(Ldar), R(12),
                 B(SetPendingMessage),
-                B(Ldar), R(9),
-                B(SwitchOnSmiNoFeedback), U8(15), U8(3), I8(0),
+                B(Ldar), R(10),
+                B(SwitchOnSmiNoFeedback), U8(14), U8(3), I8(0),
                 B(Jump), U8(21),
-                B(Mov), R(8), R(12),
-                B(Mov), R(10), R(13),
-                B(CallJSRuntime), U8(%promise_resolve), R(12), U8(2),
-                B(Ldar), R(8),
+                B(Mov), R(9), R(13),
+                B(Mov), R(11), R(14),
+                B(CallJSRuntime), U8(%promise_resolve), R(13), U8(2),
+                B(Ldar), R(9),
   /*   96 S> */ B(Return),
-                B(Ldar), R(10),
+                B(Ldar), R(11),
   /*   96 S> */ B(Return),
-                B(Ldar), R(10),
+                B(Ldar), R(11),
                 B(ReThrow),
                 B(LdaUndefined),
   /*   96 S> */ B(Return),
@@ -1099,7 +1045,6 @@
   FIXED_ARRAY_TYPE,
   ONE_BYTE_INTERNALIZED_STRING_TYPE ["return"],
   ONE_BYTE_INTERNALIZED_STRING_TYPE [""],
-  FIXED_ARRAY_TYPE,
   Smi [6],
   Smi [14],
   FIXED_ARRAY_TYPE,
@@ -1108,8 +1053,8 @@
   Smi [22],
 ]
 handlers: [
-  [10, 363, 371],
-  [13, 320, 322],
+  [10, 349, 357],
+  [13, 306, 308],
   [27, 153, 161],
   [30, 113, 115],
   [222, 232, 234],
diff --git a/src/v8/test/cctest/interpreter/bytecode_expectations/ForIn.golden b/src/v8/test/cctest/interpreter/bytecode_expectations/ForIn.golden
index 55f94ab..579cf70 100644
--- a/src/v8/test/cctest/interpreter/bytecode_expectations/ForIn.golden
+++ b/src/v8/test/cctest/interpreter/bytecode_expectations/ForIn.golden
@@ -107,23 +107,23 @@
   /*   30 E> */ B(StackCheck),
   /*   42 S> */ B(LdaZero),
                 B(Star), R(0),
-  /*   59 S> */ B(CreateArrayLiteral), U8(0), U8(0), U8(37),
+  /*   59 S> */ B(CreateArrayLiteral), U8(0), U8(1), U8(37),
                 B(JumpIfUndefined), U8(48),
                 B(JumpIfNull), U8(46),
                 B(ToObject), R(3),
                 B(ForInEnumerate), R(3),
-                B(ForInPrepare), R(4), U8(2),
+                B(ForInPrepare), R(4), U8(0),
                 B(LdaZero),
                 B(Star), R(7),
   /*   54 S> */ B(ForInContinue), R(7), R(6),
                 B(JumpIfFalse), U8(31),
-                B(ForInNext), R(3), R(7), R(4), U8(2),
+                B(ForInNext), R(3), R(7), R(4), U8(0),
                 B(JumpIfUndefined), U8(17),
                 B(Star), R(1),
   /*   45 E> */ B(StackCheck),
                 B(Star), R(2),
   /*   70 S> */ B(Ldar), R(1),
-  /*   75 E> */ B(Add), R(0), U8(1),
+  /*   75 E> */ B(Add), R(0), U8(2),
                 B(Mov), R(0), R(8),
                 B(Star), R(0),
   /*   72 E> */ B(ForInStep), R(7),
@@ -153,32 +153,32 @@
   /*   30 E> */ B(StackCheck),
   /*   42 S> */ B(CreateObjectLiteral), U8(0), U8(0), U8(41), R(1),
                 B(Mov), R(1), R(0),
-  /*   77 S> */ B(CreateArrayLiteral), U8(1), U8(1), U8(37),
+  /*   77 S> */ B(CreateArrayLiteral), U8(1), U8(2), U8(37),
                 B(JumpIfUndefined), U8(72),
                 B(JumpIfNull), U8(70),
                 B(ToObject), R(1),
                 B(ForInEnumerate), R(1),
-                B(ForInPrepare), R(2), U8(12),
+                B(ForInPrepare), R(2), U8(1),
                 B(LdaZero),
                 B(Star), R(5),
   /*   68 S> */ B(ForInContinue), R(5), R(4),
                 B(JumpIfFalse), U8(55),
-                B(ForInNext), R(1), R(5), R(2), U8(12),
+                B(ForInNext), R(1), R(5), R(2), U8(1),
                 B(JumpIfUndefined), U8(41),
                 B(Star), R(6),
                 B(Ldar), R(6),
-  /*   67 E> */ B(StaNamedProperty), R(0), U8(2), U8(10),
+  /*   67 E> */ B(StaNamedProperty), R(0), U8(2), U8(3),
   /*   62 E> */ B(StackCheck),
-  /*  100 S> */ B(LdaNamedProperty), R(0), U8(2), U8(4),
+  /*  100 S> */ B(LdaNamedProperty), R(0), U8(2), U8(5),
                 B(Star), R(6),
                 B(LdaSmi), I8(10),
-  /*  106 E> */ B(TestEqual), R(6), U8(6),
+  /*  106 E> */ B(TestEqual), R(6), U8(7),
                 B(JumpIfFalse), U8(4),
   /*  113 S> */ B(Jump), U8(17),
-  /*  130 S> */ B(LdaNamedProperty), R(0), U8(2), U8(7),
+  /*  130 S> */ B(LdaNamedProperty), R(0), U8(2), U8(8),
                 B(Star), R(6),
                 B(LdaSmi), I8(20),
-  /*  136 E> */ B(TestEqual), R(6), U8(9),
+  /*  136 E> */ B(TestEqual), R(6), U8(10),
                 B(JumpIfFalse), U8(4),
   /*  143 S> */ B(Jump), U8(9),
                 B(ForInStep), R(5),
@@ -207,26 +207,26 @@
   /*   30 E> */ B(StackCheck),
   /*   42 S> */ B(CreateArrayLiteral), U8(0), U8(0), U8(37),
                 B(Star), R(0),
-  /*   72 S> */ B(CreateArrayLiteral), U8(1), U8(1), U8(37),
+  /*   72 S> */ B(CreateArrayLiteral), U8(1), U8(2), U8(37),
                 B(JumpIfUndefined), U8(51),
                 B(JumpIfNull), U8(49),
                 B(ToObject), R(1),
                 B(ForInEnumerate), R(1),
-                B(ForInPrepare), R(2), U8(8),
+                B(ForInPrepare), R(2), U8(1),
                 B(LdaZero),
                 B(Star), R(5),
   /*   65 S> */ B(ForInContinue), R(5), R(4),
                 B(JumpIfFalse), U8(34),
-                B(ForInNext), R(1), R(5), R(2), U8(8),
+                B(ForInNext), R(1), R(5), R(2), U8(1),
                 B(JumpIfUndefined), U8(20),
                 B(Star), R(6),
                 B(LdaZero),
                 B(Star), R(8),
                 B(Ldar), R(6),
-  /*   64 E> */ B(StaKeyedProperty), R(0), R(8), U8(6),
+  /*   64 E> */ B(StaKeyedProperty), R(0), R(8), U8(3),
   /*   59 E> */ B(StackCheck),
   /*   83 S> */ B(LdaSmi), I8(3),
-  /*   91 E> */ B(LdaKeyedProperty), R(0), U8(4),
+  /*   91 E> */ B(LdaKeyedProperty), R(0), U8(5),
   /*   95 S> */ B(Return),
                 B(ForInStep), R(5),
                 B(Star), R(5),
diff --git a/src/v8/test/cctest/interpreter/bytecode_expectations/ForOf.golden b/src/v8/test/cctest/interpreter/bytecode_expectations/ForOf.golden
index 2e61a65..46e62ed 100644
--- a/src/v8/test/cctest/interpreter/bytecode_expectations/ForOf.golden
+++ b/src/v8/test/cctest/interpreter/bytecode_expectations/ForOf.golden
@@ -9,118 +9,112 @@
 snippet: "
   for (var p of [0, 1, 2]) {}
 "
-frame size: 14
+frame size: 15
 parameter count: 1
-bytecode array length: 262
+bytecode array length: 248
 bytecodes: [
   /*   30 E> */ B(StackCheck),
                 B(LdaZero),
-                B(Star), R(4),
-                B(Mov), R(context), R(10),
+                B(Star), R(5),
                 B(Mov), R(context), R(11),
+                B(Mov), R(context), R(12),
   /*   48 S> */ B(CreateArrayLiteral), U8(0), U8(0), U8(37),
-                B(Star), R(12),
-                B(LdaNamedProperty), R(12), U8(1), U8(1),
                 B(Star), R(13),
-                B(CallProperty0), R(13), R(12), U8(3),
+                B(LdaNamedProperty), R(13), U8(1), U8(1),
+                B(Star), R(14),
+                B(CallProperty0), R(14), R(13), U8(3),
                 B(JumpIfJSReceiver), U8(7),
                 B(CallRuntime), U16(Runtime::kThrowSymbolIteratorInvalid), R(0), U8(0),
                 B(Star), R(2),
-  /*   43 S> */ B(LdaNamedProperty), R(2), U8(2), U8(7),
-                B(Star), R(12),
-                B(CallProperty0), R(12), R(2), U8(5),
+  /*   48 E> */ B(LdaNamedProperty), R(2), U8(2), U8(5),
                 B(Star), R(3),
-  /*   43 E> */ B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(3), U8(1),
+  /*   43 S> */ B(CallProperty0), R(3), R(2), U8(7),
+                B(Star), R(4),
+  /*   43 E> */ B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(4), U8(1),
                 B(ToBooleanLogicalNot),
                 B(JumpIfFalse), U8(7),
-                B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(3), U8(1),
-                B(LdaNamedProperty), R(3), U8(3), U8(9),
+                B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(4), U8(1),
+                B(LdaNamedProperty), R(4), U8(3), U8(9),
                 B(JumpIfToBooleanTrue), U8(25),
-                B(LdaNamedProperty), R(3), U8(4), U8(11),
-                B(Star), R(5),
+                B(LdaNamedProperty), R(4), U8(4), U8(11),
+                B(Star), R(6),
                 B(LdaSmi), I8(2),
-                B(Star), R(4),
-                B(Mov), R(5), R(0),
+                B(Star), R(5),
+                B(Mov), R(6), R(0),
   /*   34 E> */ B(StackCheck),
                 B(Mov), R(0), R(1),
                 B(LdaZero),
-                B(Star), R(4),
-                B(JumpLoop), U8(50), I8(0),
+                B(Star), R(5),
+                B(JumpLoop), U8(44), I8(0),
                 B(Jump), U8(36),
-                B(Star), R(12),
+                B(Star), R(13),
                 B(Ldar), R(closure),
-                B(CreateCatchContext), R(12), U8(5), U8(6),
-                B(PushContext), R(12),
-                B(Star), R(11),
+                B(CreateCatchContext), R(13), U8(5), U8(6),
+                B(PushContext), R(13),
+                B(Star), R(12),
                 B(LdaSmi), I8(2),
-                B(TestEqualStrict), R(4), U8(13),
+                B(TestEqualStrict), R(5), U8(13),
                 B(JumpIfFalse), U8(6),
                 B(LdaSmi), I8(1),
-                B(Star), R(4),
+                B(Star), R(5),
                 B(LdaImmutableCurrentContextSlot), U8(4),
-                B(Star), R(13),
-                B(CallRuntime), U16(Runtime::kReThrow), R(13), U8(1),
-                B(PopContext), R(12),
+                B(Star), R(14),
+                B(CallRuntime), U16(Runtime::kReThrow), R(14), U8(1),
+                B(PopContext), R(13),
                 B(LdaSmi), I8(-1),
+                B(Star), R(10),
                 B(Star), R(9),
-                B(Star), R(8),
                 B(Jump), U8(7),
-                B(Star), R(9),
-                B(LdaZero),
-                B(Star), R(8),
-                B(LdaTheHole),
-                B(SetPendingMessage),
                 B(Star), R(10),
                 B(LdaZero),
-                B(TestEqualStrict), R(4), U8(14),
-                B(JumpIfTrue), U8(104),
-                B(LdaNamedProperty), R(2), U8(7), U8(15),
-                B(Star), R(6),
-                B(TestUndetectable),
-                B(JumpIfFalse), U8(4),
-                B(Jump), U8(93),
-                B(LdaSmi), I8(1),
-                B(TestEqualStrict), R(4), U8(18),
-                B(JumpIfFalse), U8(61),
-                B(Ldar), R(6),
-                B(TestTypeOf), U8(5),
-                B(JumpIfFalse), U8(4),
-                B(Jump), U8(18),
-                B(Wide), B(LdaSmi), I16(136),
-                B(Star), R(11),
-                B(LdaConstant), U8(8),
-                B(Star), R(12),
-                B(CallRuntime), U16(Runtime::kNewTypeError), R(11), U8(2),
-                B(Throw),
-                B(Mov), R(context), R(11),
-                B(Mov), R(6), R(12),
-                B(Mov), R(2), R(13),
-                B(InvokeIntrinsic), U8(Runtime::k_Call), R(12), U8(2),
-                B(Jump), U8(20),
-                B(Star), R(12),
-                B(Ldar), R(closure),
-                B(CreateCatchContext), R(12), U8(5), U8(9),
-                B(Star), R(11),
+                B(Star), R(9),
                 B(LdaTheHole),
                 B(SetPendingMessage),
-                B(Ldar), R(11),
-                B(PushContext), R(12),
-                B(PopContext), R(12),
-                B(Jump), U8(27),
-                B(Mov), R(6), R(11),
-                B(Mov), R(2), R(12),
-                B(InvokeIntrinsic), U8(Runtime::k_Call), R(11), U8(2),
+                B(Star), R(11),
+                B(LdaZero),
+                B(TestEqualStrict), R(5), U8(14),
+                B(JumpIfTrue), U8(90),
+                B(LdaNamedProperty), R(2), U8(7), U8(15),
                 B(Star), R(7),
-                B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(7), U8(1),
+                B(TestUndetectable),
+                B(JumpIfFalse), U8(4),
+                B(Jump), U8(79),
+                B(LdaSmi), I8(1),
+                B(TestEqualStrict), R(5), U8(17),
+                B(JumpIfFalse), U8(47),
+                B(Ldar), R(7),
+                B(TestTypeOf), U8(6),
+                B(JumpIfFalse), U8(4),
+                B(Jump), U8(18),
+                B(Wide), B(LdaSmi), I16(144),
+                B(Star), R(12),
+                B(LdaConstant), U8(8),
+                B(Star), R(13),
+                B(CallRuntime), U16(Runtime::kNewTypeError), R(12), U8(2),
+                B(Throw),
+                B(Mov), R(context), R(12),
+                B(Mov), R(7), R(13),
+                B(Mov), R(2), R(14),
+                B(InvokeIntrinsic), U8(Runtime::k_Call), R(13), U8(2),
+                B(Jump), U8(6),
+                B(LdaTheHole),
+                B(SetPendingMessage),
+                B(Ldar), R(12),
+                B(Jump), U8(27),
+                B(Mov), R(7), R(12),
+                B(Mov), R(2), R(13),
+                B(InvokeIntrinsic), U8(Runtime::k_Call), R(12), U8(2),
+                B(Star), R(8),
+                B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(8), U8(1),
                 B(JumpIfToBooleanFalse), U8(4),
                 B(Jump), U8(7),
-                B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(7), U8(1),
-                B(Ldar), R(10),
+                B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(8), U8(1),
+                B(Ldar), R(11),
                 B(SetPendingMessage),
                 B(LdaZero),
-                B(TestEqualStrictNoFeedback), R(8),
+                B(TestEqualStrictNoFeedback), R(9),
                 B(JumpIfFalse), U8(5),
-                B(Ldar), R(9),
+                B(Ldar), R(10),
                 B(ReThrow),
                 B(LdaUndefined),
   /*   62 S> */ B(Return),
@@ -135,7 +129,6 @@
   FIXED_ARRAY_TYPE,
   ONE_BYTE_INTERNALIZED_STRING_TYPE ["return"],
   ONE_BYTE_INTERNALIZED_STRING_TYPE [""],
-  FIXED_ARRAY_TYPE,
 ]
 handlers: [
   [7, 124, 132],
@@ -148,122 +141,116 @@
   var x = 'potatoes';
   for (var p of x) { return p; }
 "
-frame size: 15
+frame size: 16
 parameter count: 1
-bytecode array length: 272
+bytecode array length: 258
 bytecodes: [
   /*   30 E> */ B(StackCheck),
   /*   42 S> */ B(LdaConstant), U8(0),
                 B(Star), R(0),
                 B(LdaZero),
-                B(Star), R(5),
-                B(Mov), R(context), R(11),
+                B(Star), R(6),
                 B(Mov), R(context), R(12),
+                B(Mov), R(context), R(13),
   /*   68 S> */ B(LdaNamedProperty), R(0), U8(1), U8(0),
-                B(Star), R(14),
-                B(CallProperty0), R(14), R(0), U8(2),
-                B(Mov), R(0), R(13),
+                B(Star), R(15),
+                B(CallProperty0), R(15), R(0), U8(2),
+                B(Mov), R(0), R(14),
                 B(JumpIfJSReceiver), U8(7),
                 B(CallRuntime), U16(Runtime::kThrowSymbolIteratorInvalid), R(0), U8(0),
                 B(Star), R(3),
-  /*   63 S> */ B(LdaNamedProperty), R(3), U8(2), U8(6),
-                B(Star), R(13),
-                B(CallProperty0), R(13), R(3), U8(4),
+  /*   68 E> */ B(LdaNamedProperty), R(3), U8(2), U8(4),
                 B(Star), R(4),
-  /*   63 E> */ B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(4), U8(1),
+  /*   63 S> */ B(CallProperty0), R(4), R(3), U8(6),
+                B(Star), R(5),
+  /*   63 E> */ B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(5), U8(1),
                 B(ToBooleanLogicalNot),
                 B(JumpIfFalse), U8(7),
-                B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(4), U8(1),
-                B(LdaNamedProperty), R(4), U8(3), U8(8),
+                B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(5), U8(1),
+                B(LdaNamedProperty), R(5), U8(3), U8(8),
                 B(JumpIfToBooleanTrue), U8(27),
-                B(LdaNamedProperty), R(4), U8(4), U8(10),
-                B(Star), R(6),
+                B(LdaNamedProperty), R(5), U8(4), U8(10),
+                B(Star), R(7),
                 B(LdaSmi), I8(2),
-                B(Star), R(5),
-                B(Mov), R(6), R(1),
+                B(Star), R(6),
+                B(Mov), R(7), R(1),
   /*   54 E> */ B(StackCheck),
                 B(Mov), R(1), R(2),
   /*   73 S> */ B(LdaZero),
-                B(Star), R(9),
-                B(Mov), R(6), R(10),
+                B(Star), R(10),
+                B(Mov), R(7), R(11),
                 B(Jump), U8(52),
                 B(Jump), U8(36),
-                B(Star), R(13),
+                B(Star), R(14),
                 B(Ldar), R(closure),
-                B(CreateCatchContext), R(13), U8(5), U8(6),
-                B(PushContext), R(13),
-                B(Star), R(12),
+                B(CreateCatchContext), R(14), U8(5), U8(6),
+                B(PushContext), R(14),
+                B(Star), R(13),
                 B(LdaSmi), I8(2),
-                B(TestEqualStrict), R(5), U8(12),
+                B(TestEqualStrict), R(6), U8(12),
                 B(JumpIfFalse), U8(6),
                 B(LdaSmi), I8(1),
-                B(Star), R(5),
+                B(Star), R(6),
                 B(LdaImmutableCurrentContextSlot), U8(4),
-                B(Star), R(14),
-                B(CallRuntime), U16(Runtime::kReThrow), R(14), U8(1),
-                B(PopContext), R(13),
+                B(Star), R(15),
+                B(CallRuntime), U16(Runtime::kReThrow), R(15), U8(1),
+                B(PopContext), R(14),
                 B(LdaSmi), I8(-1),
+                B(Star), R(11),
                 B(Star), R(10),
-                B(Star), R(9),
                 B(Jump), U8(8),
-                B(Star), R(10),
+                B(Star), R(11),
                 B(LdaSmi), I8(1),
-                B(Star), R(9),
+                B(Star), R(10),
                 B(LdaTheHole),
                 B(SetPendingMessage),
-                B(Star), R(11),
+                B(Star), R(12),
                 B(LdaZero),
-                B(TestEqualStrict), R(5), U8(13),
-                B(JumpIfTrue), U8(104),
+                B(TestEqualStrict), R(6), U8(13),
+                B(JumpIfTrue), U8(90),
                 B(LdaNamedProperty), R(3), U8(7), U8(14),
-                B(Star), R(7),
+                B(Star), R(8),
                 B(TestUndetectable),
                 B(JumpIfFalse), U8(4),
-                B(Jump), U8(93),
+                B(Jump), U8(79),
                 B(LdaSmi), I8(1),
-                B(TestEqualStrict), R(5), U8(17),
-                B(JumpIfFalse), U8(61),
-                B(Ldar), R(7),
-                B(TestTypeOf), U8(5),
+                B(TestEqualStrict), R(6), U8(16),
+                B(JumpIfFalse), U8(47),
+                B(Ldar), R(8),
+                B(TestTypeOf), U8(6),
                 B(JumpIfFalse), U8(4),
                 B(Jump), U8(18),
-                B(Wide), B(LdaSmi), I16(136),
-                B(Star), R(12),
+                B(Wide), B(LdaSmi), I16(144),
+                B(Star), R(13),
                 B(LdaConstant), U8(8),
-                B(Star), R(13),
-                B(CallRuntime), U16(Runtime::kNewTypeError), R(12), U8(2),
+                B(Star), R(14),
+                B(CallRuntime), U16(Runtime::kNewTypeError), R(13), U8(2),
                 B(Throw),
-                B(Mov), R(context), R(12),
-                B(Mov), R(7), R(13),
-                B(Mov), R(3), R(14),
-                B(InvokeIntrinsic), U8(Runtime::k_Call), R(13), U8(2),
-                B(Jump), U8(20),
-                B(Star), R(13),
-                B(Ldar), R(closure),
-                B(CreateCatchContext), R(13), U8(5), U8(9),
-                B(Star), R(12),
+                B(Mov), R(context), R(13),
+                B(Mov), R(8), R(14),
+                B(Mov), R(3), R(15),
+                B(InvokeIntrinsic), U8(Runtime::k_Call), R(14), U8(2),
+                B(Jump), U8(6),
                 B(LdaTheHole),
                 B(SetPendingMessage),
-                B(Ldar), R(12),
-                B(PushContext), R(13),
-                B(PopContext), R(13),
+                B(Ldar), R(13),
                 B(Jump), U8(27),
-                B(Mov), R(7), R(12),
-                B(Mov), R(3), R(13),
-                B(InvokeIntrinsic), U8(Runtime::k_Call), R(12), U8(2),
-                B(Star), R(8),
-                B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(8), U8(1),
+                B(Mov), R(8), R(13),
+                B(Mov), R(3), R(14),
+                B(InvokeIntrinsic), U8(Runtime::k_Call), R(13), U8(2),
+                B(Star), R(9),
+                B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(9), U8(1),
                 B(JumpIfToBooleanFalse), U8(4),
                 B(Jump), U8(7),
-                B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(8), U8(1),
-                B(Ldar), R(11),
+                B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(9), U8(1),
+                B(Ldar), R(12),
                 B(SetPendingMessage),
-                B(Ldar), R(9),
-                B(SwitchOnSmiNoFeedback), U8(10), U8(2), I8(0),
+                B(Ldar), R(10),
+                B(SwitchOnSmiNoFeedback), U8(9), U8(2), I8(0),
                 B(Jump), U8(8),
-                B(Ldar), R(10),
+                B(Ldar), R(11),
   /*   85 S> */ B(Return),
-                B(Ldar), R(10),
+                B(Ldar), R(11),
                 B(ReThrow),
                 B(LdaUndefined),
   /*   85 S> */ B(Return),
@@ -278,7 +265,6 @@
   FIXED_ARRAY_TYPE,
   ONE_BYTE_INTERNALIZED_STRING_TYPE ["return"],
   ONE_BYTE_INTERNALIZED_STRING_TYPE [""],
-  FIXED_ARRAY_TYPE,
   Smi [6],
   Smi [9],
 ]
@@ -295,38 +281,38 @@
     if (x == 20) break;
   }
 "
-frame size: 14
+frame size: 15
 parameter count: 1
-bytecode array length: 280
+bytecode array length: 266
 bytecodes: [
   /*   30 E> */ B(StackCheck),
                 B(LdaZero),
-                B(Star), R(4),
-                B(Mov), R(context), R(10),
+                B(Star), R(5),
                 B(Mov), R(context), R(11),
+                B(Mov), R(context), R(12),
   /*   48 S> */ B(CreateArrayLiteral), U8(0), U8(0), U8(37),
-                B(Star), R(12),
-                B(LdaNamedProperty), R(12), U8(1), U8(1),
                 B(Star), R(13),
-                B(CallProperty0), R(13), R(12), U8(3),
+                B(LdaNamedProperty), R(13), U8(1), U8(1),
+                B(Star), R(14),
+                B(CallProperty0), R(14), R(13), U8(3),
                 B(JumpIfJSReceiver), U8(7),
                 B(CallRuntime), U16(Runtime::kThrowSymbolIteratorInvalid), R(0), U8(0),
                 B(Star), R(2),
-  /*   43 S> */ B(LdaNamedProperty), R(2), U8(2), U8(7),
-                B(Star), R(12),
-                B(CallProperty0), R(12), R(2), U8(5),
+  /*   48 E> */ B(LdaNamedProperty), R(2), U8(2), U8(5),
                 B(Star), R(3),
-  /*   43 E> */ B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(3), U8(1),
+  /*   43 S> */ B(CallProperty0), R(3), R(2), U8(7),
+                B(Star), R(4),
+  /*   43 E> */ B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(4), U8(1),
                 B(ToBooleanLogicalNot),
                 B(JumpIfFalse), U8(7),
-                B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(3), U8(1),
-                B(LdaNamedProperty), R(3), U8(3), U8(9),
+                B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(4), U8(1),
+                B(LdaNamedProperty), R(4), U8(3), U8(9),
                 B(JumpIfToBooleanTrue), U8(43),
-                B(LdaNamedProperty), R(3), U8(4), U8(11),
-                B(Star), R(5),
+                B(LdaNamedProperty), R(4), U8(4), U8(11),
+                B(Star), R(6),
                 B(LdaSmi), I8(2),
-                B(Star), R(4),
-                B(Mov), R(5), R(0),
+                B(Star), R(5),
+                B(Mov), R(6), R(0),
   /*   34 E> */ B(StackCheck),
                 B(Mov), R(0), R(1),
   /*   66 S> */ B(LdaSmi), I8(10),
@@ -338,83 +324,77 @@
                 B(JumpIfFalse), U8(4),
   /*  104 S> */ B(Jump), U8(8),
                 B(LdaZero),
-                B(Star), R(4),
-                B(JumpLoop), U8(68), I8(0),
+                B(Star), R(5),
+                B(JumpLoop), U8(62), I8(0),
                 B(Jump), U8(36),
-                B(Star), R(12),
+                B(Star), R(13),
                 B(Ldar), R(closure),
-                B(CreateCatchContext), R(12), U8(5), U8(6),
-                B(PushContext), R(12),
-                B(Star), R(11),
+                B(CreateCatchContext), R(13), U8(5), U8(6),
+                B(PushContext), R(13),
+                B(Star), R(12),
                 B(LdaSmi), I8(2),
-                B(TestEqualStrict), R(4), U8(15),
+                B(TestEqualStrict), R(5), U8(15),
                 B(JumpIfFalse), U8(6),
                 B(LdaSmi), I8(1),
-                B(Star), R(4),
+                B(Star), R(5),
                 B(LdaImmutableCurrentContextSlot), U8(4),
-                B(Star), R(13),
-                B(CallRuntime), U16(Runtime::kReThrow), R(13), U8(1),
-                B(PopContext), R(12),
+                B(Star), R(14),
+                B(CallRuntime), U16(Runtime::kReThrow), R(14), U8(1),
+                B(PopContext), R(13),
                 B(LdaSmi), I8(-1),
+                B(Star), R(10),
                 B(Star), R(9),
-                B(Star), R(8),
                 B(Jump), U8(7),
-                B(Star), R(9),
-                B(LdaZero),
-                B(Star), R(8),
-                B(LdaTheHole),
-                B(SetPendingMessage),
                 B(Star), R(10),
                 B(LdaZero),
-                B(TestEqualStrict), R(4), U8(16),
-                B(JumpIfTrue), U8(104),
-                B(LdaNamedProperty), R(2), U8(7), U8(17),
-                B(Star), R(6),
-                B(TestUndetectable),
-                B(JumpIfFalse), U8(4),
-                B(Jump), U8(93),
-                B(LdaSmi), I8(1),
-                B(TestEqualStrict), R(4), U8(20),
-                B(JumpIfFalse), U8(61),
-                B(Ldar), R(6),
-                B(TestTypeOf), U8(5),
-                B(JumpIfFalse), U8(4),
-                B(Jump), U8(18),
-                B(Wide), B(LdaSmi), I16(136),
-                B(Star), R(11),
-                B(LdaConstant), U8(8),
-                B(Star), R(12),
-                B(CallRuntime), U16(Runtime::kNewTypeError), R(11), U8(2),
-                B(Throw),
-                B(Mov), R(context), R(11),
-                B(Mov), R(6), R(12),
-                B(Mov), R(2), R(13),
-                B(InvokeIntrinsic), U8(Runtime::k_Call), R(12), U8(2),
-                B(Jump), U8(20),
-                B(Star), R(12),
-                B(Ldar), R(closure),
-                B(CreateCatchContext), R(12), U8(5), U8(9),
-                B(Star), R(11),
+                B(Star), R(9),
                 B(LdaTheHole),
                 B(SetPendingMessage),
-                B(Ldar), R(11),
-                B(PushContext), R(12),
-                B(PopContext), R(12),
-                B(Jump), U8(27),
-                B(Mov), R(6), R(11),
-                B(Mov), R(2), R(12),
-                B(InvokeIntrinsic), U8(Runtime::k_Call), R(11), U8(2),
+                B(Star), R(11),
+                B(LdaZero),
+                B(TestEqualStrict), R(5), U8(16),
+                B(JumpIfTrue), U8(90),
+                B(LdaNamedProperty), R(2), U8(7), U8(17),
                 B(Star), R(7),
-                B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(7), U8(1),
+                B(TestUndetectable),
+                B(JumpIfFalse), U8(4),
+                B(Jump), U8(79),
+                B(LdaSmi), I8(1),
+                B(TestEqualStrict), R(5), U8(19),
+                B(JumpIfFalse), U8(47),
+                B(Ldar), R(7),
+                B(TestTypeOf), U8(6),
+                B(JumpIfFalse), U8(4),
+                B(Jump), U8(18),
+                B(Wide), B(LdaSmi), I16(144),
+                B(Star), R(12),
+                B(LdaConstant), U8(8),
+                B(Star), R(13),
+                B(CallRuntime), U16(Runtime::kNewTypeError), R(12), U8(2),
+                B(Throw),
+                B(Mov), R(context), R(12),
+                B(Mov), R(7), R(13),
+                B(Mov), R(2), R(14),
+                B(InvokeIntrinsic), U8(Runtime::k_Call), R(13), U8(2),
+                B(Jump), U8(6),
+                B(LdaTheHole),
+                B(SetPendingMessage),
+                B(Ldar), R(12),
+                B(Jump), U8(27),
+                B(Mov), R(7), R(12),
+                B(Mov), R(2), R(13),
+                B(InvokeIntrinsic), U8(Runtime::k_Call), R(12), U8(2),
+                B(Star), R(8),
+                B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(8), U8(1),
                 B(JumpIfToBooleanFalse), U8(4),
                 B(Jump), U8(7),
-                B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(7), U8(1),
-                B(Ldar), R(10),
+                B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(8), U8(1),
+                B(Ldar), R(11),
                 B(SetPendingMessage),
                 B(LdaZero),
-                B(TestEqualStrictNoFeedback), R(8),
+                B(TestEqualStrictNoFeedback), R(9),
                 B(JumpIfFalse), U8(5),
-                B(Ldar), R(9),
+                B(Ldar), R(10),
                 B(ReThrow),
                 B(LdaUndefined),
   /*  113 S> */ B(Return),
@@ -429,7 +409,6 @@
   FIXED_ARRAY_TYPE,
   ONE_BYTE_INTERNALIZED_STRING_TYPE ["return"],
   ONE_BYTE_INTERNALIZED_STRING_TYPE [""],
-  FIXED_ARRAY_TYPE,
 ]
 handlers: [
   [7, 142, 150],
@@ -442,124 +421,118 @@
   var x = { 'a': 1, 'b': 2 };
   for (x['a'] of [1,2,3]) { return x['a']; }
 "
-frame size: 13
+frame size: 14
 parameter count: 1
-bytecode array length: 282
+bytecode array length: 268
 bytecodes: [
   /*   30 E> */ B(StackCheck),
-  /*   42 S> */ B(CreateObjectLiteral), U8(0), U8(0), U8(41), R(7),
-                B(Mov), R(7), R(0),
+  /*   42 S> */ B(CreateObjectLiteral), U8(0), U8(0), U8(41), R(8),
+                B(Mov), R(8), R(0),
                 B(LdaZero),
-                B(Star), R(3),
-                B(Mov), R(context), R(9),
+                B(Star), R(4),
                 B(Mov), R(context), R(10),
+                B(Mov), R(context), R(11),
   /*   77 S> */ B(CreateArrayLiteral), U8(1), U8(1), U8(37),
-                B(Star), R(11),
-                B(LdaNamedProperty), R(11), U8(2), U8(2),
                 B(Star), R(12),
-                B(CallProperty0), R(12), R(11), U8(4),
+                B(LdaNamedProperty), R(12), U8(2), U8(2),
+                B(Star), R(13),
+                B(CallProperty0), R(13), R(12), U8(4),
                 B(JumpIfJSReceiver), U8(7),
                 B(CallRuntime), U16(Runtime::kThrowSymbolIteratorInvalid), R(0), U8(0),
                 B(Star), R(1),
-  /*   68 S> */ B(LdaNamedProperty), R(1), U8(3), U8(8),
-                B(Star), R(11),
-                B(CallProperty0), R(11), R(1), U8(6),
+  /*   77 E> */ B(LdaNamedProperty), R(1), U8(3), U8(6),
                 B(Star), R(2),
-  /*   68 E> */ B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(2), U8(1),
+  /*   68 S> */ B(CallProperty0), R(2), R(1), U8(8),
+                B(Star), R(3),
+  /*   68 E> */ B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(3), U8(1),
                 B(ToBooleanLogicalNot),
                 B(JumpIfFalse), U8(7),
-                B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(2), U8(1),
-                B(LdaNamedProperty), R(2), U8(4), U8(10),
+                B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(3), U8(1),
+                B(LdaNamedProperty), R(3), U8(4), U8(10),
                 B(JumpIfToBooleanTrue), U8(30),
-  /*   67 E> */ B(LdaNamedProperty), R(2), U8(5), U8(12),
-                B(Star), R(4),
+  /*   67 E> */ B(LdaNamedProperty), R(3), U8(5), U8(12),
+                B(Star), R(5),
                 B(LdaSmi), I8(2),
-                B(Star), R(3),
-                B(Ldar), R(4),
+                B(Star), R(4),
+                B(Ldar), R(5),
                 B(StaNamedProperty), R(0), U8(6), U8(14),
   /*   62 E> */ B(StackCheck),
   /*   96 S> */ B(LdaNamedProperty), R(0), U8(6), U8(16),
-                B(Star), R(8),
-                B(LdaZero),
-                B(Star), R(7),
-                B(Jump), U8(52),
-                B(Jump), U8(36),
-                B(Star), R(11),
-                B(Ldar), R(closure),
-                B(CreateCatchContext), R(11), U8(7), U8(8),
-                B(PushContext), R(11),
-                B(Star), R(10),
-                B(LdaSmi), I8(2),
-                B(TestEqualStrict), R(3), U8(18),
-                B(JumpIfFalse), U8(6),
-                B(LdaSmi), I8(1),
-                B(Star), R(3),
-                B(LdaImmutableCurrentContextSlot), U8(4),
-                B(Star), R(12),
-                B(CallRuntime), U16(Runtime::kReThrow), R(12), U8(1),
-                B(PopContext), R(11),
-                B(LdaSmi), I8(-1),
-                B(Star), R(8),
-                B(Star), R(7),
-                B(Jump), U8(8),
-                B(Star), R(8),
-                B(LdaSmi), I8(1),
-                B(Star), R(7),
-                B(LdaTheHole),
-                B(SetPendingMessage),
                 B(Star), R(9),
                 B(LdaZero),
-                B(TestEqualStrict), R(3), U8(19),
-                B(JumpIfTrue), U8(104),
-                B(LdaNamedProperty), R(1), U8(9), U8(20),
-                B(Star), R(5),
-                B(TestUndetectable),
-                B(JumpIfFalse), U8(4),
-                B(Jump), U8(93),
-                B(LdaSmi), I8(1),
-                B(TestEqualStrict), R(3), U8(23),
-                B(JumpIfFalse), U8(61),
-                B(Ldar), R(5),
-                B(TestTypeOf), U8(5),
-                B(JumpIfFalse), U8(4),
-                B(Jump), U8(18),
-                B(Wide), B(LdaSmi), I16(136),
-                B(Star), R(10),
-                B(LdaConstant), U8(10),
-                B(Star), R(11),
-                B(CallRuntime), U16(Runtime::kNewTypeError), R(10), U8(2),
-                B(Throw),
-                B(Mov), R(context), R(10),
-                B(Mov), R(5), R(11),
-                B(Mov), R(1), R(12),
-                B(InvokeIntrinsic), U8(Runtime::k_Call), R(11), U8(2),
-                B(Jump), U8(20),
-                B(Star), R(11),
+                B(Star), R(8),
+                B(Jump), U8(52),
+                B(Jump), U8(36),
+                B(Star), R(12),
                 B(Ldar), R(closure),
-                B(CreateCatchContext), R(11), U8(7), U8(11),
-                B(Star), R(10),
+                B(CreateCatchContext), R(12), U8(7), U8(8),
+                B(PushContext), R(12),
+                B(Star), R(11),
+                B(LdaSmi), I8(2),
+                B(TestEqualStrict), R(4), U8(18),
+                B(JumpIfFalse), U8(6),
+                B(LdaSmi), I8(1),
+                B(Star), R(4),
+                B(LdaImmutableCurrentContextSlot), U8(4),
+                B(Star), R(13),
+                B(CallRuntime), U16(Runtime::kReThrow), R(13), U8(1),
+                B(PopContext), R(12),
+                B(LdaSmi), I8(-1),
+                B(Star), R(9),
+                B(Star), R(8),
+                B(Jump), U8(8),
+                B(Star), R(9),
+                B(LdaSmi), I8(1),
+                B(Star), R(8),
                 B(LdaTheHole),
                 B(SetPendingMessage),
-                B(Ldar), R(10),
-                B(PushContext), R(11),
-                B(PopContext), R(11),
-                B(Jump), U8(27),
-                B(Mov), R(5), R(10),
-                B(Mov), R(1), R(11),
-                B(InvokeIntrinsic), U8(Runtime::k_Call), R(10), U8(2),
+                B(Star), R(10),
+                B(LdaZero),
+                B(TestEqualStrict), R(4), U8(19),
+                B(JumpIfTrue), U8(90),
+                B(LdaNamedProperty), R(1), U8(9), U8(20),
                 B(Star), R(6),
-                B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(6), U8(1),
+                B(TestUndetectable),
+                B(JumpIfFalse), U8(4),
+                B(Jump), U8(79),
+                B(LdaSmi), I8(1),
+                B(TestEqualStrict), R(4), U8(22),
+                B(JumpIfFalse), U8(47),
+                B(Ldar), R(6),
+                B(TestTypeOf), U8(6),
+                B(JumpIfFalse), U8(4),
+                B(Jump), U8(18),
+                B(Wide), B(LdaSmi), I16(144),
+                B(Star), R(11),
+                B(LdaConstant), U8(10),
+                B(Star), R(12),
+                B(CallRuntime), U16(Runtime::kNewTypeError), R(11), U8(2),
+                B(Throw),
+                B(Mov), R(context), R(11),
+                B(Mov), R(6), R(12),
+                B(Mov), R(1), R(13),
+                B(InvokeIntrinsic), U8(Runtime::k_Call), R(12), U8(2),
+                B(Jump), U8(6),
+                B(LdaTheHole),
+                B(SetPendingMessage),
+                B(Ldar), R(11),
+                B(Jump), U8(27),
+                B(Mov), R(6), R(11),
+                B(Mov), R(1), R(12),
+                B(InvokeIntrinsic), U8(Runtime::k_Call), R(11), U8(2),
+                B(Star), R(7),
+                B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(7), U8(1),
                 B(JumpIfToBooleanFalse), U8(4),
                 B(Jump), U8(7),
-                B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(6), U8(1),
-                B(Ldar), R(9),
+                B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(7), U8(1),
+                B(Ldar), R(10),
                 B(SetPendingMessage),
-                B(Ldar), R(7),
-                B(SwitchOnSmiNoFeedback), U8(12), U8(2), I8(0),
+                B(Ldar), R(8),
+                B(SwitchOnSmiNoFeedback), U8(11), U8(2), I8(0),
                 B(Jump), U8(8),
-                B(Ldar), R(8),
+                B(Ldar), R(9),
   /*  105 S> */ B(Return),
-                B(Ldar), R(8),
+                B(Ldar), R(9),
                 B(ReThrow),
                 B(LdaUndefined),
   /*  105 S> */ B(Return),
@@ -576,7 +549,6 @@
   FIXED_ARRAY_TYPE,
   ONE_BYTE_INTERNALIZED_STRING_TYPE ["return"],
   ONE_BYTE_INTERNALIZED_STRING_TYPE [""],
-  FIXED_ARRAY_TYPE,
   Smi [6],
   Smi [9],
 ]
diff --git a/src/v8/test/cctest/interpreter/bytecode_expectations/ForOfLoop.golden b/src/v8/test/cctest/interpreter/bytecode_expectations/ForOfLoop.golden
index 1d6bfa0..1ea568a 100644
--- a/src/v8/test/cctest/interpreter/bytecode_expectations/ForOfLoop.golden
+++ b/src/v8/test/cctest/interpreter/bytecode_expectations/ForOfLoop.golden
@@ -13,118 +13,112 @@
   }
   f([1, 2, 3]);
 "
-frame size: 16
+frame size: 17
 parameter count: 2
-bytecode array length: 262
+bytecode array length: 248
 bytecodes: [
   /*   10 E> */ B(StackCheck),
                 B(LdaZero),
-                B(Star), R(6),
-                B(Mov), R(context), R(12),
+                B(Star), R(7),
                 B(Mov), R(context), R(13),
+                B(Mov), R(context), R(14),
   /*   34 S> */ B(LdaNamedProperty), R(arg0), U8(0), U8(0),
-                B(Star), R(15),
-                B(CallProperty0), R(15), R(arg0), U8(2),
-                B(Mov), R(arg0), R(14),
+                B(Star), R(16),
+                B(CallProperty0), R(16), R(arg0), U8(2),
+                B(Mov), R(arg0), R(15),
                 B(JumpIfJSReceiver), U8(7),
                 B(CallRuntime), U16(Runtime::kThrowSymbolIteratorInvalid), R(0), U8(0),
                 B(Star), R(4),
-  /*   29 S> */ B(LdaNamedProperty), R(4), U8(1), U8(6),
-                B(Star), R(14),
-                B(CallProperty0), R(14), R(4), U8(4),
+  /*   34 E> */ B(LdaNamedProperty), R(4), U8(1), U8(4),
                 B(Star), R(5),
-  /*   29 E> */ B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(5), U8(1),
+  /*   29 S> */ B(CallProperty0), R(5), R(4), U8(6),
+                B(Star), R(6),
+  /*   29 E> */ B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(6), U8(1),
                 B(ToBooleanLogicalNot),
                 B(JumpIfFalse), U8(7),
-                B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(5), U8(1),
-                B(LdaNamedProperty), R(5), U8(2), U8(8),
+                B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(6), U8(1),
+                B(LdaNamedProperty), R(6), U8(2), U8(8),
                 B(JumpIfToBooleanTrue), U8(28),
-                B(LdaNamedProperty), R(5), U8(3), U8(10),
-                B(Star), R(7),
+                B(LdaNamedProperty), R(6), U8(3), U8(10),
+                B(Star), R(8),
                 B(LdaSmi), I8(2),
-                B(Star), R(6),
-                B(Mov), R(7), R(3),
+                B(Star), R(7),
+                B(Mov), R(8), R(3),
   /*   20 E> */ B(StackCheck),
                 B(Mov), R(3), R(1),
   /*   49 S> */ B(Mov), R(1), R(0),
                 B(LdaZero),
-                B(Star), R(6),
-                B(JumpLoop), U8(53), I8(0),
+                B(Star), R(7),
+                B(JumpLoop), U8(47), I8(0),
                 B(Jump), U8(36),
-                B(Star), R(14),
+                B(Star), R(15),
                 B(Ldar), R(closure),
-  /*   49 E> */ B(CreateCatchContext), R(14), U8(4), U8(5),
-                B(PushContext), R(14),
-                B(Star), R(13),
+  /*   49 E> */ B(CreateCatchContext), R(15), U8(4), U8(5),
+                B(PushContext), R(15),
+                B(Star), R(14),
                 B(LdaSmi), I8(2),
-                B(TestEqualStrict), R(6), U8(12),
+                B(TestEqualStrict), R(7), U8(12),
                 B(JumpIfFalse), U8(6),
                 B(LdaSmi), I8(1),
-                B(Star), R(6),
+                B(Star), R(7),
                 B(LdaImmutableCurrentContextSlot), U8(4),
-                B(Star), R(15),
-                B(CallRuntime), U16(Runtime::kReThrow), R(15), U8(1),
-                B(PopContext), R(14),
+                B(Star), R(16),
+                B(CallRuntime), U16(Runtime::kReThrow), R(16), U8(1),
+                B(PopContext), R(15),
                 B(LdaSmi), I8(-1),
+                B(Star), R(12),
                 B(Star), R(11),
-                B(Star), R(10),
                 B(Jump), U8(7),
-                B(Star), R(11),
-                B(LdaZero),
-                B(Star), R(10),
-                B(LdaTheHole),
-                B(SetPendingMessage),
                 B(Star), R(12),
                 B(LdaZero),
-                B(TestEqualStrict), R(6), U8(13),
-                B(JumpIfTrue), U8(104),
-                B(LdaNamedProperty), R(4), U8(6), U8(14),
-                B(Star), R(8),
-                B(TestUndetectable),
-                B(JumpIfFalse), U8(4),
-                B(Jump), U8(93),
-                B(LdaSmi), I8(1),
-                B(TestEqualStrict), R(6), U8(17),
-                B(JumpIfFalse), U8(61),
-                B(Ldar), R(8),
-                B(TestTypeOf), U8(5),
-                B(JumpIfFalse), U8(4),
-                B(Jump), U8(18),
-                B(Wide), B(LdaSmi), I16(136),
-                B(Star), R(13),
-                B(LdaConstant), U8(7),
-                B(Star), R(14),
-                B(CallRuntime), U16(Runtime::kNewTypeError), R(13), U8(2),
-                B(Throw),
-                B(Mov), R(context), R(13),
-                B(Mov), R(8), R(14),
-                B(Mov), R(4), R(15),
-                B(InvokeIntrinsic), U8(Runtime::k_Call), R(14), U8(2),
-                B(Jump), U8(20),
-                B(Star), R(14),
-                B(Ldar), R(closure),
-                B(CreateCatchContext), R(14), U8(4), U8(8),
-                B(Star), R(13),
+                B(Star), R(11),
                 B(LdaTheHole),
                 B(SetPendingMessage),
-                B(Ldar), R(13),
-                B(PushContext), R(14),
-                B(PopContext), R(14),
-                B(Jump), U8(27),
-                B(Mov), R(8), R(13),
-                B(Mov), R(4), R(14),
-                B(InvokeIntrinsic), U8(Runtime::k_Call), R(13), U8(2),
+                B(Star), R(13),
+                B(LdaZero),
+                B(TestEqualStrict), R(7), U8(13),
+                B(JumpIfTrue), U8(90),
+                B(LdaNamedProperty), R(4), U8(6), U8(14),
                 B(Star), R(9),
-                B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(9), U8(1),
+                B(TestUndetectable),
+                B(JumpIfFalse), U8(4),
+                B(Jump), U8(79),
+                B(LdaSmi), I8(1),
+                B(TestEqualStrict), R(7), U8(16),
+                B(JumpIfFalse), U8(47),
+                B(Ldar), R(9),
+                B(TestTypeOf), U8(6),
+                B(JumpIfFalse), U8(4),
+                B(Jump), U8(18),
+                B(Wide), B(LdaSmi), I16(144),
+                B(Star), R(14),
+                B(LdaConstant), U8(7),
+                B(Star), R(15),
+                B(CallRuntime), U16(Runtime::kNewTypeError), R(14), U8(2),
+                B(Throw),
+                B(Mov), R(context), R(14),
+                B(Mov), R(9), R(15),
+                B(Mov), R(4), R(16),
+                B(InvokeIntrinsic), U8(Runtime::k_Call), R(15), U8(2),
+                B(Jump), U8(6),
+                B(LdaTheHole),
+                B(SetPendingMessage),
+                B(Ldar), R(14),
+                B(Jump), U8(27),
+                B(Mov), R(9), R(14),
+                B(Mov), R(4), R(15),
+                B(InvokeIntrinsic), U8(Runtime::k_Call), R(14), U8(2),
+                B(Star), R(10),
+                B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(10), U8(1),
                 B(JumpIfToBooleanFalse), U8(4),
                 B(Jump), U8(7),
-                B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(9), U8(1),
-                B(Ldar), R(12),
+                B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(10), U8(1),
+                B(Ldar), R(13),
                 B(SetPendingMessage),
                 B(LdaZero),
-                B(TestEqualStrictNoFeedback), R(10),
+                B(TestEqualStrictNoFeedback), R(11),
                 B(JumpIfFalse), U8(5),
-                B(Ldar), R(11),
+                B(Ldar), R(12),
                 B(ReThrow),
                 B(LdaUndefined),
   /*   54 S> */ B(Return),
@@ -138,7 +132,6 @@
   FIXED_ARRAY_TYPE,
   ONE_BYTE_INTERNALIZED_STRING_TYPE ["return"],
   ONE_BYTE_INTERNALIZED_STRING_TYPE [""],
-  FIXED_ARRAY_TYPE,
 ]
 handlers: [
   [7, 124, 132],
@@ -153,158 +146,152 @@
   }
   f([1, 2, 3]);
 "
-frame size: 23
+frame size: 24
 parameter count: 2
-bytecode array length: 345
+bytecode array length: 331
 bytecodes: [
                 B(CreateFunctionContext), U8(4),
-                B(PushContext), R(8),
+                B(PushContext), R(9),
                 B(Ldar), R(this),
                 B(StaCurrentContextSlot), U8(5),
                 B(Ldar), R(arg0),
                 B(StaCurrentContextSlot), U8(4),
                 B(CreateMappedArguments),
                 B(StaCurrentContextSlot), U8(7),
-                B(Ldar), R(7),
+                B(Ldar), R(8),
                 B(StaCurrentContextSlot), U8(6),
   /*   10 E> */ B(StackCheck),
                 B(Ldar), R(closure),
                 B(CreateBlockContext), U8(0),
-                B(PushContext), R(9),
+                B(PushContext), R(10),
                 B(LdaTheHole),
                 B(StaCurrentContextSlot), U8(4),
                 B(LdaZero),
-                B(Star), R(3),
-                B(Mov), R(context), R(12),
+                B(Star), R(4),
                 B(Mov), R(context), R(13),
-  /*   34 S> */ B(LdaContextSlot), R(9), U8(4), U8(0),
-                B(Star), R(14),
-                B(LdaNamedProperty), R(14), U8(1), U8(0),
+                B(Mov), R(context), R(14),
+  /*   34 S> */ B(LdaContextSlot), R(10), U8(4), U8(0),
                 B(Star), R(15),
-                B(CallProperty0), R(15), R(14), U8(2),
+                B(LdaNamedProperty), R(15), U8(1), U8(0),
+                B(Star), R(16),
+                B(CallProperty0), R(16), R(15), U8(2),
                 B(JumpIfJSReceiver), U8(7),
                 B(CallRuntime), U16(Runtime::kThrowSymbolIteratorInvalid), R(0), U8(0),
                 B(Star), R(1),
-  /*   29 S> */ B(LdaNamedProperty), R(1), U8(2), U8(6),
-                B(Star), R(14),
-                B(CallProperty0), R(14), R(1), U8(4),
+  /*   34 E> */ B(LdaNamedProperty), R(1), U8(2), U8(4),
                 B(Star), R(2),
-  /*   29 E> */ B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(2), U8(1),
+  /*   29 S> */ B(CallProperty0), R(2), R(1), U8(6),
+                B(Star), R(3),
+  /*   29 E> */ B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(3), U8(1),
                 B(ToBooleanLogicalNot),
                 B(JumpIfFalse), U8(7),
-                B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(2), U8(1),
-                B(LdaNamedProperty), R(2), U8(3), U8(8),
+                B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(3), U8(1),
+                B(LdaNamedProperty), R(3), U8(3), U8(8),
                 B(JumpIfToBooleanTrue), U8(78),
-                B(LdaNamedProperty), R(2), U8(4), U8(10),
-                B(Star), R(4),
+                B(LdaNamedProperty), R(3), U8(4), U8(10),
+                B(Star), R(5),
                 B(LdaSmi), I8(2),
-                B(Star), R(3),
-                B(Mov), R(4), R(0),
+                B(Star), R(4),
+                B(Mov), R(5), R(0),
   /*   20 E> */ B(StackCheck),
                 B(Ldar), R(closure),
                 B(CreateBlockContext), U8(5),
-                B(PushContext), R(14),
+                B(PushContext), R(15),
                 B(LdaTheHole),
                 B(StaCurrentContextSlot), U8(4),
-                B(Ldar), R(4),
+                B(Ldar), R(5),
                 B(StaCurrentContextSlot), U8(4),
-  /*   41 S> */ B(LdaLookupGlobalSlot), U8(6), U8(14), U8(1),
-                B(Star), R(15),
-                B(LdaConstant), U8(7),
+  /*   41 S> */ B(LdaLookupGlobalSlot), U8(6), U8(12), U8(3),
                 B(Star), R(16),
+                B(LdaConstant), U8(7),
+                B(Star), R(17),
                 B(LdaZero),
-                B(Star), R(20),
-                B(LdaSmi), I8(37),
                 B(Star), R(21),
-                B(LdaSmi), I8(41),
+                B(LdaSmi), I8(37),
                 B(Star), R(22),
-                B(Mov), R(15), R(17),
+                B(LdaSmi), I8(41),
+                B(Star), R(23),
                 B(Mov), R(16), R(18),
-                B(Mov), R(closure), R(19),
-                B(CallRuntime), U16(Runtime::kResolvePossiblyDirectEval), R(17), U8(6),
-                B(Star), R(15),
-  /*   41 E> */ B(CallUndefinedReceiver1), R(15), R(16), U8(12),
-                B(PopContext), R(14),
+                B(Mov), R(17), R(19),
+                B(Mov), R(closure), R(20),
+                B(CallRuntime), U16(Runtime::kResolvePossiblyDirectEval), R(18), U8(6),
+                B(Star), R(16),
+  /*   41 E> */ B(CallUndefinedReceiver1), R(16), R(17), U8(14),
+                B(PopContext), R(15),
                 B(LdaZero),
-                B(Star), R(3),
-                B(JumpLoop), U8(103), I8(0),
+                B(Star), R(4),
+                B(JumpLoop), U8(97), I8(0),
                 B(Jump), U8(36),
-                B(Star), R(14),
+                B(Star), R(15),
                 B(Ldar), R(closure),
-                B(CreateCatchContext), R(14), U8(8), U8(9),
-                B(PushContext), R(14),
-                B(Star), R(13),
+                B(CreateCatchContext), R(15), U8(8), U8(9),
+                B(PushContext), R(15),
+                B(Star), R(14),
                 B(LdaSmi), I8(2),
-                B(TestEqualStrict), R(3), U8(16),
+                B(TestEqualStrict), R(4), U8(16),
                 B(JumpIfFalse), U8(6),
                 B(LdaSmi), I8(1),
-                B(Star), R(3),
+                B(Star), R(4),
                 B(LdaImmutableCurrentContextSlot), U8(4),
-                B(Star), R(15),
-                B(CallRuntime), U16(Runtime::kReThrow), R(15), U8(1),
-                B(PopContext), R(14),
+                B(Star), R(16),
+                B(CallRuntime), U16(Runtime::kReThrow), R(16), U8(1),
+                B(PopContext), R(15),
                 B(LdaSmi), I8(-1),
+                B(Star), R(12),
                 B(Star), R(11),
-                B(Star), R(10),
                 B(Jump), U8(7),
-                B(Star), R(11),
-                B(LdaZero),
-                B(Star), R(10),
-                B(LdaTheHole),
-                B(SetPendingMessage),
                 B(Star), R(12),
                 B(LdaZero),
-                B(TestEqualStrict), R(3), U8(17),
-                B(JumpIfTrue), U8(104),
-                B(LdaNamedProperty), R(1), U8(10), U8(18),
-                B(Star), R(5),
-                B(TestUndetectable),
-                B(JumpIfFalse), U8(4),
-                B(Jump), U8(93),
-                B(LdaSmi), I8(1),
-                B(TestEqualStrict), R(3), U8(21),
-                B(JumpIfFalse), U8(61),
-                B(Ldar), R(5),
-                B(TestTypeOf), U8(5),
-                B(JumpIfFalse), U8(4),
-                B(Jump), U8(18),
-                B(Wide), B(LdaSmi), I16(136),
-                B(Star), R(13),
-                B(LdaConstant), U8(11),
-                B(Star), R(14),
-                B(CallRuntime), U16(Runtime::kNewTypeError), R(13), U8(2),
-                B(Throw),
-                B(Mov), R(context), R(13),
-                B(Mov), R(5), R(14),
-                B(Mov), R(1), R(15),
-                B(InvokeIntrinsic), U8(Runtime::k_Call), R(14), U8(2),
-                B(Jump), U8(20),
-                B(Star), R(14),
-                B(Ldar), R(closure),
-                B(CreateCatchContext), R(14), U8(8), U8(12),
-                B(Star), R(13),
+                B(Star), R(11),
                 B(LdaTheHole),
                 B(SetPendingMessage),
-                B(Ldar), R(13),
-                B(PushContext), R(14),
-                B(PopContext), R(14),
-                B(Jump), U8(27),
-                B(Mov), R(5), R(13),
-                B(Mov), R(1), R(14),
-                B(InvokeIntrinsic), U8(Runtime::k_Call), R(13), U8(2),
+                B(Star), R(13),
+                B(LdaZero),
+                B(TestEqualStrict), R(4), U8(17),
+                B(JumpIfTrue), U8(90),
+                B(LdaNamedProperty), R(1), U8(10), U8(18),
                 B(Star), R(6),
-                B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(6), U8(1),
+                B(TestUndetectable),
+                B(JumpIfFalse), U8(4),
+                B(Jump), U8(79),
+                B(LdaSmi), I8(1),
+                B(TestEqualStrict), R(4), U8(20),
+                B(JumpIfFalse), U8(47),
+                B(Ldar), R(6),
+                B(TestTypeOf), U8(6),
+                B(JumpIfFalse), U8(4),
+                B(Jump), U8(18),
+                B(Wide), B(LdaSmi), I16(144),
+                B(Star), R(14),
+                B(LdaConstant), U8(11),
+                B(Star), R(15),
+                B(CallRuntime), U16(Runtime::kNewTypeError), R(14), U8(2),
+                B(Throw),
+                B(Mov), R(context), R(14),
+                B(Mov), R(6), R(15),
+                B(Mov), R(1), R(16),
+                B(InvokeIntrinsic), U8(Runtime::k_Call), R(15), U8(2),
+                B(Jump), U8(6),
+                B(LdaTheHole),
+                B(SetPendingMessage),
+                B(Ldar), R(14),
+                B(Jump), U8(27),
+                B(Mov), R(6), R(14),
+                B(Mov), R(1), R(15),
+                B(InvokeIntrinsic), U8(Runtime::k_Call), R(14), U8(2),
+                B(Star), R(7),
+                B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(7), U8(1),
                 B(JumpIfToBooleanFalse), U8(4),
                 B(Jump), U8(7),
-                B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(6), U8(1),
-                B(Ldar), R(12),
+                B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(7), U8(1),
+                B(Ldar), R(13),
                 B(SetPendingMessage),
                 B(LdaZero),
-                B(TestEqualStrictNoFeedback), R(10),
+                B(TestEqualStrictNoFeedback), R(11),
                 B(JumpIfFalse), U8(5),
-                B(Ldar), R(11),
+                B(Ldar), R(12),
                 B(ReThrow),
-                B(PopContext), R(9),
+                B(PopContext), R(10),
                 B(LdaUndefined),
   /*   54 S> */ B(Return),
 ]
@@ -321,7 +308,6 @@
   FIXED_ARRAY_TYPE,
   ONE_BYTE_INTERNALIZED_STRING_TYPE ["return"],
   ONE_BYTE_INTERNALIZED_STRING_TYPE [""],
-  FIXED_ARRAY_TYPE,
 ]
 handlers: [
   [35, 205, 213],
@@ -336,127 +322,121 @@
   }
   f([1, 2, 3]);
 "
-frame size: 14
+frame size: 15
 parameter count: 2
-bytecode array length: 280
+bytecode array length: 266
 bytecodes: [
   /*   10 E> */ B(StackCheck),
                 B(LdaZero),
-                B(Star), R(4),
-                B(Mov), R(context), R(10),
+                B(Star), R(5),
                 B(Mov), R(context), R(11),
+                B(Mov), R(context), R(12),
   /*   34 S> */ B(LdaNamedProperty), R(arg0), U8(0), U8(0),
-                B(Star), R(13),
-                B(CallProperty0), R(13), R(arg0), U8(2),
-                B(Mov), R(arg0), R(12),
+                B(Star), R(14),
+                B(CallProperty0), R(14), R(arg0), U8(2),
+                B(Mov), R(arg0), R(13),
                 B(JumpIfJSReceiver), U8(7),
                 B(CallRuntime), U16(Runtime::kThrowSymbolIteratorInvalid), R(0), U8(0),
                 B(Star), R(2),
-  /*   29 S> */ B(LdaNamedProperty), R(2), U8(1), U8(6),
-                B(Star), R(12),
-                B(CallProperty0), R(12), R(2), U8(4),
+  /*   34 E> */ B(LdaNamedProperty), R(2), U8(1), U8(4),
                 B(Star), R(3),
-  /*   29 E> */ B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(3), U8(1),
+  /*   29 S> */ B(CallProperty0), R(3), R(2), U8(6),
+                B(Star), R(4),
+  /*   29 E> */ B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(4), U8(1),
                 B(ToBooleanLogicalNot),
                 B(JumpIfFalse), U8(7),
-                B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(3), U8(1),
-                B(LdaNamedProperty), R(3), U8(2), U8(8),
+                B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(4), U8(1),
+                B(LdaNamedProperty), R(4), U8(2), U8(8),
                 B(JumpIfToBooleanTrue), U8(46),
-                B(LdaNamedProperty), R(3), U8(3), U8(10),
-                B(Star), R(5),
+                B(LdaNamedProperty), R(4), U8(3), U8(10),
+                B(Star), R(6),
                 B(LdaSmi), I8(2),
-                B(Star), R(4),
-                B(Mov), R(5), R(1),
+                B(Star), R(5),
+                B(Mov), R(6), R(1),
   /*   20 E> */ B(StackCheck),
                 B(Ldar), R(closure),
                 B(CreateBlockContext), U8(4),
-                B(PushContext), R(12),
+                B(PushContext), R(13),
                 B(LdaTheHole),
                 B(StaCurrentContextSlot), U8(4),
-                B(Ldar), R(5),
+                B(Ldar), R(6),
                 B(StaCurrentContextSlot), U8(4),
-  /*   41 S> */ B(CreateClosure), U8(5), U8(14), U8(2),
-                B(Star), R(13),
-  /*   67 E> */ B(CallUndefinedReceiver0), R(13), U8(12),
-                B(PopContext), R(12),
+  /*   41 S> */ B(CreateClosure), U8(5), U8(12), U8(2),
+                B(Star), R(14),
+  /*   67 E> */ B(CallUndefinedReceiver0), R(14), U8(13),
+                B(PopContext), R(13),
                 B(LdaZero),
-                B(Star), R(4),
-                B(JumpLoop), U8(71), I8(0),
+                B(Star), R(5),
+                B(JumpLoop), U8(65), I8(0),
                 B(Jump), U8(36),
-                B(Star), R(12),
+                B(Star), R(13),
                 B(Ldar), R(closure),
-                B(CreateCatchContext), R(12), U8(6), U8(7),
-                B(PushContext), R(12),
-                B(Star), R(11),
+                B(CreateCatchContext), R(13), U8(6), U8(7),
+                B(PushContext), R(13),
+                B(Star), R(12),
                 B(LdaSmi), I8(2),
-                B(TestEqualStrict), R(4), U8(15),
+                B(TestEqualStrict), R(5), U8(15),
                 B(JumpIfFalse), U8(6),
                 B(LdaSmi), I8(1),
-                B(Star), R(4),
+                B(Star), R(5),
                 B(LdaImmutableCurrentContextSlot), U8(4),
-                B(Star), R(13),
-                B(CallRuntime), U16(Runtime::kReThrow), R(13), U8(1),
-                B(PopContext), R(12),
+                B(Star), R(14),
+                B(CallRuntime), U16(Runtime::kReThrow), R(14), U8(1),
+                B(PopContext), R(13),
                 B(LdaSmi), I8(-1),
+                B(Star), R(10),
                 B(Star), R(9),
-                B(Star), R(8),
                 B(Jump), U8(7),
-                B(Star), R(9),
-                B(LdaZero),
-                B(Star), R(8),
-                B(LdaTheHole),
-                B(SetPendingMessage),
                 B(Star), R(10),
                 B(LdaZero),
-                B(TestEqualStrict), R(4), U8(16),
-                B(JumpIfTrue), U8(104),
-                B(LdaNamedProperty), R(2), U8(8), U8(17),
-                B(Star), R(6),
-                B(TestUndetectable),
-                B(JumpIfFalse), U8(4),
-                B(Jump), U8(93),
-                B(LdaSmi), I8(1),
-                B(TestEqualStrict), R(4), U8(20),
-                B(JumpIfFalse), U8(61),
-                B(Ldar), R(6),
-                B(TestTypeOf), U8(5),
-                B(JumpIfFalse), U8(4),
-                B(Jump), U8(18),
-                B(Wide), B(LdaSmi), I16(136),
-                B(Star), R(11),
-                B(LdaConstant), U8(9),
-                B(Star), R(12),
-                B(CallRuntime), U16(Runtime::kNewTypeError), R(11), U8(2),
-                B(Throw),
-                B(Mov), R(context), R(11),
-                B(Mov), R(6), R(12),
-                B(Mov), R(2), R(13),
-                B(InvokeIntrinsic), U8(Runtime::k_Call), R(12), U8(2),
-                B(Jump), U8(20),
-                B(Star), R(12),
-                B(Ldar), R(closure),
-                B(CreateCatchContext), R(12), U8(6), U8(10),
-                B(Star), R(11),
+                B(Star), R(9),
                 B(LdaTheHole),
                 B(SetPendingMessage),
-                B(Ldar), R(11),
-                B(PushContext), R(12),
-                B(PopContext), R(12),
-                B(Jump), U8(27),
-                B(Mov), R(6), R(11),
-                B(Mov), R(2), R(12),
-                B(InvokeIntrinsic), U8(Runtime::k_Call), R(11), U8(2),
+                B(Star), R(11),
+                B(LdaZero),
+                B(TestEqualStrict), R(5), U8(16),
+                B(JumpIfTrue), U8(90),
+                B(LdaNamedProperty), R(2), U8(8), U8(17),
                 B(Star), R(7),
-                B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(7), U8(1),
+                B(TestUndetectable),
+                B(JumpIfFalse), U8(4),
+                B(Jump), U8(79),
+                B(LdaSmi), I8(1),
+                B(TestEqualStrict), R(5), U8(19),
+                B(JumpIfFalse), U8(47),
+                B(Ldar), R(7),
+                B(TestTypeOf), U8(6),
+                B(JumpIfFalse), U8(4),
+                B(Jump), U8(18),
+                B(Wide), B(LdaSmi), I16(144),
+                B(Star), R(12),
+                B(LdaConstant), U8(9),
+                B(Star), R(13),
+                B(CallRuntime), U16(Runtime::kNewTypeError), R(12), U8(2),
+                B(Throw),
+                B(Mov), R(context), R(12),
+                B(Mov), R(7), R(13),
+                B(Mov), R(2), R(14),
+                B(InvokeIntrinsic), U8(Runtime::k_Call), R(13), U8(2),
+                B(Jump), U8(6),
+                B(LdaTheHole),
+                B(SetPendingMessage),
+                B(Ldar), R(12),
+                B(Jump), U8(27),
+                B(Mov), R(7), R(12),
+                B(Mov), R(2), R(13),
+                B(InvokeIntrinsic), U8(Runtime::k_Call), R(12), U8(2),
+                B(Star), R(8),
+                B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(8), U8(1),
                 B(JumpIfToBooleanFalse), U8(4),
                 B(Jump), U8(7),
-                B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(7), U8(1),
-                B(Ldar), R(10),
+                B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(8), U8(1),
+                B(Ldar), R(11),
                 B(SetPendingMessage),
                 B(LdaZero),
-                B(TestEqualStrictNoFeedback), R(8),
+                B(TestEqualStrictNoFeedback), R(9),
                 B(JumpIfFalse), U8(5),
-                B(Ldar), R(9),
+                B(Ldar), R(10),
                 B(ReThrow),
                 B(LdaUndefined),
   /*   73 S> */ B(Return),
@@ -472,7 +452,6 @@
   FIXED_ARRAY_TYPE,
   ONE_BYTE_INTERNALIZED_STRING_TYPE ["return"],
   ONE_BYTE_INTERNALIZED_STRING_TYPE [""],
-  FIXED_ARRAY_TYPE,
 ]
 handlers: [
   [7, 142, 150],
@@ -487,134 +466,128 @@
   }
   f([{ x: 0, y: 3 }, { x: 1, y: 9 }, { x: -12, y: 17 }]);
 "
-frame size: 19
+frame size: 20
 parameter count: 2
-bytecode array length: 300
+bytecode array length: 286
 bytecodes: [
   /*   10 E> */ B(StackCheck),
                 B(LdaZero),
-                B(Star), R(9),
-                B(Mov), R(context), R(15),
+                B(Star), R(10),
                 B(Mov), R(context), R(16),
+                B(Mov), R(context), R(17),
   /*   41 S> */ B(LdaNamedProperty), R(arg0), U8(0), U8(0),
-                B(Star), R(18),
-                B(CallProperty0), R(18), R(arg0), U8(2),
-                B(Mov), R(arg0), R(17),
+                B(Star), R(19),
+                B(CallProperty0), R(19), R(arg0), U8(2),
+                B(Mov), R(arg0), R(18),
                 B(JumpIfJSReceiver), U8(7),
                 B(CallRuntime), U16(Runtime::kThrowSymbolIteratorInvalid), R(0), U8(0),
                 B(Star), R(7),
-  /*   36 S> */ B(LdaNamedProperty), R(7), U8(1), U8(6),
-                B(Star), R(17),
-                B(CallProperty0), R(17), R(7), U8(4),
+  /*   41 E> */ B(LdaNamedProperty), R(7), U8(1), U8(4),
                 B(Star), R(8),
-  /*   36 E> */ B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(8), U8(1),
+  /*   36 S> */ B(CallProperty0), R(8), R(7), U8(6),
+                B(Star), R(9),
+  /*   36 E> */ B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(9), U8(1),
                 B(ToBooleanLogicalNot),
                 B(JumpIfFalse), U8(7),
-                B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(8), U8(1),
-                B(LdaNamedProperty), R(8), U8(2), U8(8),
+                B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(9), U8(1),
+                B(LdaNamedProperty), R(9), U8(2), U8(8),
                 B(JumpIfToBooleanTrue), U8(66),
-                B(LdaNamedProperty), R(8), U8(3), U8(10),
-                B(Star), R(10),
+                B(LdaNamedProperty), R(9), U8(3), U8(10),
+                B(Star), R(11),
                 B(LdaSmi), I8(2),
-                B(Star), R(9),
-                B(Mov), R(10), R(5),
+                B(Star), R(10),
+                B(Mov), R(11), R(5),
   /*   20 E> */ B(StackCheck),
                 B(Mov), R(5), R(6),
                 B(Ldar), R(6),
                 B(JumpIfUndefined), U8(6),
                 B(Ldar), R(6),
                 B(JumpIfNotNull), U8(16),
-                B(LdaSmi), I8(65),
-                B(Star), R(17),
-                B(LdaConstant), U8(4),
+                B(LdaSmi), I8(74),
                 B(Star), R(18),
-                B(CallRuntime), U16(Runtime::kNewTypeError), R(17), U8(2),
+                B(LdaConstant), U8(4),
+                B(Star), R(19),
+                B(CallRuntime), U16(Runtime::kNewTypeError), R(18), U8(2),
   /*   31 E> */ B(Throw),
-  /*   31 S> */ B(LdaNamedProperty), R(6), U8(4), U8(14),
+  /*   31 S> */ B(LdaNamedProperty), R(6), U8(4), U8(12),
                 B(Star), R(1),
-  /*   34 S> */ B(LdaNamedProperty), R(6), U8(5), U8(16),
+  /*   34 S> */ B(LdaNamedProperty), R(6), U8(5), U8(14),
                 B(Star), R(2),
   /*   56 S> */ B(Ldar), R(2),
-  /*   58 E> */ B(Add), R(1), U8(18),
+  /*   58 E> */ B(Add), R(1), U8(16),
                 B(Star), R(0),
                 B(LdaZero),
-                B(Star), R(9),
-                B(JumpLoop), U8(91), I8(0),
+                B(Star), R(10),
+                B(JumpLoop), U8(85), I8(0),
                 B(Jump), U8(36),
-                B(Star), R(17),
+                B(Star), R(18),
                 B(Ldar), R(closure),
-  /*   56 E> */ B(CreateCatchContext), R(17), U8(6), U8(7),
-                B(PushContext), R(17),
-                B(Star), R(16),
+  /*   56 E> */ B(CreateCatchContext), R(18), U8(6), U8(7),
+                B(PushContext), R(18),
+                B(Star), R(17),
                 B(LdaSmi), I8(2),
-                B(TestEqualStrict), R(9), U8(19),
+                B(TestEqualStrict), R(10), U8(17),
                 B(JumpIfFalse), U8(6),
                 B(LdaSmi), I8(1),
-                B(Star), R(9),
+                B(Star), R(10),
                 B(LdaImmutableCurrentContextSlot), U8(4),
-                B(Star), R(18),
-                B(CallRuntime), U16(Runtime::kReThrow), R(18), U8(1),
-                B(PopContext), R(17),
+                B(Star), R(19),
+                B(CallRuntime), U16(Runtime::kReThrow), R(19), U8(1),
+                B(PopContext), R(18),
                 B(LdaSmi), I8(-1),
+                B(Star), R(15),
                 B(Star), R(14),
-                B(Star), R(13),
                 B(Jump), U8(7),
-                B(Star), R(14),
-                B(LdaZero),
-                B(Star), R(13),
-                B(LdaTheHole),
-                B(SetPendingMessage),
                 B(Star), R(15),
                 B(LdaZero),
-                B(TestEqualStrict), R(9), U8(20),
-                B(JumpIfTrue), U8(104),
-                B(LdaNamedProperty), R(7), U8(8), U8(21),
-                B(Star), R(11),
-                B(TestUndetectable),
-                B(JumpIfFalse), U8(4),
-                B(Jump), U8(93),
-                B(LdaSmi), I8(1),
-                B(TestEqualStrict), R(9), U8(24),
-                B(JumpIfFalse), U8(61),
-                B(Ldar), R(11),
-                B(TestTypeOf), U8(5),
-                B(JumpIfFalse), U8(4),
-                B(Jump), U8(18),
-                B(Wide), B(LdaSmi), I16(136),
-                B(Star), R(16),
-                B(LdaConstant), U8(9),
-                B(Star), R(17),
-                B(CallRuntime), U16(Runtime::kNewTypeError), R(16), U8(2),
-                B(Throw),
-                B(Mov), R(context), R(16),
-                B(Mov), R(11), R(17),
-                B(Mov), R(7), R(18),
-                B(InvokeIntrinsic), U8(Runtime::k_Call), R(17), U8(2),
-                B(Jump), U8(20),
-                B(Star), R(17),
-                B(Ldar), R(closure),
-                B(CreateCatchContext), R(17), U8(6), U8(10),
-                B(Star), R(16),
+                B(Star), R(14),
                 B(LdaTheHole),
                 B(SetPendingMessage),
-                B(Ldar), R(16),
-                B(PushContext), R(17),
-                B(PopContext), R(17),
-                B(Jump), U8(27),
-                B(Mov), R(11), R(16),
-                B(Mov), R(7), R(17),
-                B(InvokeIntrinsic), U8(Runtime::k_Call), R(16), U8(2),
+                B(Star), R(16),
+                B(LdaZero),
+                B(TestEqualStrict), R(10), U8(18),
+                B(JumpIfTrue), U8(90),
+                B(LdaNamedProperty), R(7), U8(8), U8(19),
                 B(Star), R(12),
-                B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(12), U8(1),
+                B(TestUndetectable),
+                B(JumpIfFalse), U8(4),
+                B(Jump), U8(79),
+                B(LdaSmi), I8(1),
+                B(TestEqualStrict), R(10), U8(21),
+                B(JumpIfFalse), U8(47),
+                B(Ldar), R(12),
+                B(TestTypeOf), U8(6),
+                B(JumpIfFalse), U8(4),
+                B(Jump), U8(18),
+                B(Wide), B(LdaSmi), I16(144),
+                B(Star), R(17),
+                B(LdaConstant), U8(9),
+                B(Star), R(18),
+                B(CallRuntime), U16(Runtime::kNewTypeError), R(17), U8(2),
+                B(Throw),
+                B(Mov), R(context), R(17),
+                B(Mov), R(12), R(18),
+                B(Mov), R(7), R(19),
+                B(InvokeIntrinsic), U8(Runtime::k_Call), R(18), U8(2),
+                B(Jump), U8(6),
+                B(LdaTheHole),
+                B(SetPendingMessage),
+                B(Ldar), R(17),
+                B(Jump), U8(27),
+                B(Mov), R(12), R(17),
+                B(Mov), R(7), R(18),
+                B(InvokeIntrinsic), U8(Runtime::k_Call), R(17), U8(2),
+                B(Star), R(13),
+                B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(13), U8(1),
                 B(JumpIfToBooleanFalse), U8(4),
                 B(Jump), U8(7),
-                B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(12), U8(1),
-                B(Ldar), R(15),
+                B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(13), U8(1),
+                B(Ldar), R(16),
                 B(SetPendingMessage),
                 B(LdaZero),
-                B(TestEqualStrictNoFeedback), R(13),
+                B(TestEqualStrictNoFeedback), R(14),
                 B(JumpIfFalse), U8(5),
-                B(Ldar), R(14),
+                B(Ldar), R(15),
                 B(ReThrow),
                 B(LdaUndefined),
   /*   65 S> */ B(Return),
@@ -630,7 +603,6 @@
   FIXED_ARRAY_TYPE,
   ONE_BYTE_INTERNALIZED_STRING_TYPE ["return"],
   ONE_BYTE_INTERNALIZED_STRING_TYPE [""],
-  FIXED_ARRAY_TYPE,
 ]
 handlers: [
   [7, 162, 170],
@@ -645,18 +617,183 @@
   }
   f([1, 2, 3]);
 "
-frame size: 19
+frame size: 20
 parameter count: 2
-bytecode array length: 341
+bytecode array length: 320
 bytecodes: [
                 B(Ldar), R(3),
                 B(JumpIfUndefined), U8(18),
                 B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetContext), R(3), U8(1),
-                B(PushContext), R(12),
+                B(PushContext), R(13),
                 B(RestoreGeneratorState), R(3),
-                B(Star), R(11),
+                B(Star), R(12),
                 B(SwitchOnSmiNoFeedback), U8(0), U8(1), I8(0),
-                B(Abort), U8(45),
+                B(Abort), U8(15),
+                B(LdaSmi), I8(-2),
+                B(Star), R(12),
+                B(CreateFunctionContext), U8(1),
+                B(PushContext), R(13),
+                B(Ldar), R(arg0),
+                B(StaCurrentContextSlot), U8(4),
+                B(Mov), R(closure), R(14),
+                B(Mov), R(this), R(15),
+                B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(14), U8(2),
+                B(Star), R(3),
+  /*   11 E> */ B(StackCheck),
+  /*   11 E> */ B(SuspendGenerator), R(3), R(0), U8(14), U8(0),
+  /*   55 S> */ B(Return),
+                B(ResumeGenerator), R(3), R(12), R(0), U8(14),
+                B(Star), R(14),
+                B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(3), U8(1),
+                B(SwitchOnSmiNoFeedback), U8(1), U8(2), I8(0),
+                B(Ldar), R(14),
+  /*   11 E> */ B(Throw),
+                B(Ldar), R(14),
+  /*   55 S> */ B(Return),
+                B(LdaZero),
+                B(Star), R(8),
+                B(Mov), R(context), R(16),
+                B(Mov), R(context), R(17),
+  /*   35 S> */ B(LdaImmutableCurrentContextSlot), U8(4),
+                B(Star), R(18),
+                B(LdaNamedProperty), R(18), U8(3), U8(0),
+                B(Star), R(19),
+                B(CallProperty0), R(19), R(18), U8(2),
+                B(JumpIfJSReceiver), U8(7),
+                B(CallRuntime), U16(Runtime::kThrowSymbolIteratorInvalid), R(0), U8(0),
+                B(Star), R(5),
+  /*   35 E> */ B(LdaNamedProperty), R(5), U8(4), U8(4),
+                B(Star), R(6),
+  /*   30 S> */ B(CallProperty0), R(6), R(5), U8(6),
+                B(Star), R(7),
+  /*   30 E> */ B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(7), U8(1),
+                B(ToBooleanLogicalNot),
+                B(JumpIfFalse), U8(7),
+                B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(7), U8(1),
+                B(LdaNamedProperty), R(7), U8(5), U8(8),
+                B(JumpIfToBooleanTrue), U8(28),
+                B(LdaNamedProperty), R(7), U8(6), U8(10),
+                B(Star), R(9),
+                B(LdaSmi), I8(2),
+                B(Star), R(8),
+                B(Mov), R(9), R(4),
+  /*   21 E> */ B(StackCheck),
+                B(Mov), R(4), R(1),
+  /*   50 S> */ B(Mov), R(1), R(0),
+                B(LdaZero),
+                B(Star), R(8),
+                B(JumpLoop), U8(47), I8(0),
+                B(Jump), U8(36),
+                B(Star), R(18),
+                B(Ldar), R(closure),
+  /*   50 E> */ B(CreateCatchContext), R(18), U8(7), U8(8),
+                B(PushContext), R(18),
+                B(Star), R(17),
+                B(LdaSmi), I8(2),
+                B(TestEqualStrict), R(8), U8(12),
+                B(JumpIfFalse), U8(6),
+                B(LdaSmi), I8(1),
+                B(Star), R(8),
+                B(LdaImmutableCurrentContextSlot), U8(4),
+                B(Star), R(19),
+                B(CallRuntime), U16(Runtime::kReThrow), R(19), U8(1),
+                B(PopContext), R(18),
+                B(LdaSmi), I8(-1),
+                B(Star), R(15),
+                B(Star), R(14),
+                B(Jump), U8(7),
+                B(Star), R(15),
+                B(LdaZero),
+                B(Star), R(14),
+                B(LdaTheHole),
+                B(SetPendingMessage),
+                B(Star), R(16),
+                B(LdaZero),
+                B(TestEqualStrict), R(8), U8(13),
+                B(JumpIfTrue), U8(90),
+                B(LdaNamedProperty), R(5), U8(9), U8(14),
+                B(Star), R(10),
+                B(TestUndetectable),
+                B(JumpIfFalse), U8(4),
+                B(Jump), U8(79),
+                B(LdaSmi), I8(1),
+                B(TestEqualStrict), R(8), U8(16),
+                B(JumpIfFalse), U8(47),
+                B(Ldar), R(10),
+                B(TestTypeOf), U8(6),
+                B(JumpIfFalse), U8(4),
+                B(Jump), U8(18),
+                B(Wide), B(LdaSmi), I16(144),
+                B(Star), R(17),
+                B(LdaConstant), U8(10),
+                B(Star), R(18),
+                B(CallRuntime), U16(Runtime::kNewTypeError), R(17), U8(2),
+                B(Throw),
+                B(Mov), R(context), R(17),
+                B(Mov), R(10), R(18),
+                B(Mov), R(5), R(19),
+                B(InvokeIntrinsic), U8(Runtime::k_Call), R(18), U8(2),
+                B(Jump), U8(6),
+                B(LdaTheHole),
+                B(SetPendingMessage),
+                B(Ldar), R(17),
+                B(Jump), U8(27),
+                B(Mov), R(10), R(17),
+                B(Mov), R(5), R(18),
+                B(InvokeIntrinsic), U8(Runtime::k_Call), R(17), U8(2),
+                B(Star), R(11),
+                B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(11), U8(1),
+                B(JumpIfToBooleanFalse), U8(4),
+                B(Jump), U8(7),
+                B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(11), U8(1),
+                B(Ldar), R(16),
+                B(SetPendingMessage),
+                B(LdaZero),
+                B(TestEqualStrictNoFeedback), R(14),
+                B(JumpIfFalse), U8(5),
+                B(Ldar), R(15),
+                B(ReThrow),
+                B(LdaUndefined),
+  /*   55 S> */ B(Return),
+]
+constant pool: [
+  Smi [37],
+  Smi [10],
+  Smi [7],
+  SYMBOL_TYPE,
+  ONE_BYTE_INTERNALIZED_STRING_TYPE ["next"],
+  ONE_BYTE_INTERNALIZED_STRING_TYPE ["done"],
+  ONE_BYTE_INTERNALIZED_STRING_TYPE ["value"],
+  ONE_BYTE_INTERNALIZED_STRING_TYPE [".catch"],
+  FIXED_ARRAY_TYPE,
+  ONE_BYTE_INTERNALIZED_STRING_TYPE ["return"],
+  ONE_BYTE_INTERNALIZED_STRING_TYPE [""],
+]
+handlers: [
+  [78, 196, 204],
+  [81, 160, 162],
+  [264, 274, 276],
+]
+
+---
+snippet: "
+  function* f(arr) {
+    for (let x of arr) yield x;
+  }
+  f([1, 2, 3]);
+"
+frame size: 19
+parameter count: 2
+bytecode array length: 380
+bytecodes: [
+                B(Ldar), R(2),
+                B(JumpIfUndefined), U8(18),
+                B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetContext), R(2), U8(1),
+                B(PushContext), R(12),
+                B(RestoreGeneratorState), R(2),
+                B(Star), R(11),
+                B(SwitchOnSmiNoFeedback), U8(0), U8(2), I8(0),
+                B(Abort), U8(15),
                 B(LdaSmi), I8(-2),
                 B(Star), R(11),
                 B(CreateFunctionContext), U8(1),
@@ -666,58 +803,76 @@
                 B(Mov), R(closure), R(13),
                 B(Mov), R(this), R(14),
                 B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(13), U8(2),
-                B(Star), R(3),
+                B(Star), R(2),
   /*   11 E> */ B(StackCheck),
-  /*   11 E> */ B(SuspendGenerator), R(3), R(0), U8(13), U8(0),
-  /*   55 S> */ B(Return),
-                B(RestoreGeneratorRegisters), R(3), R(0), U8(13),
-                B(LdaSmi), I8(-2),
-                B(Star), R(11),
-                B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(3), U8(1),
+  /*   11 E> */ B(SuspendGenerator), R(2), R(0), U8(13), U8(0),
+  /*   49 S> */ B(Return),
+                B(ResumeGenerator), R(2), R(11), R(0), U8(13),
                 B(Star), R(13),
-                B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(3), U8(1),
-                B(SwitchOnSmiNoFeedback), U8(1), U8(2), I8(0),
+                B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(2), U8(1),
+                B(SwitchOnSmiNoFeedback), U8(2), U8(2), I8(0),
                 B(Ldar), R(13),
   /*   11 E> */ B(Throw),
                 B(Ldar), R(13),
-  /*   55 S> */ B(Return),
+  /*   49 S> */ B(Return),
                 B(LdaZero),
                 B(Star), R(7),
                 B(Mov), R(context), R(15),
                 B(Mov), R(context), R(16),
   /*   35 S> */ B(LdaImmutableCurrentContextSlot), U8(4),
                 B(Star), R(17),
-                B(LdaNamedProperty), R(17), U8(3), U8(0),
+                B(LdaNamedProperty), R(17), U8(4), U8(0),
                 B(Star), R(18),
                 B(CallProperty0), R(18), R(17), U8(2),
                 B(JumpIfJSReceiver), U8(7),
                 B(CallRuntime), U16(Runtime::kThrowSymbolIteratorInvalid), R(0), U8(0),
+                B(Star), R(4),
+  /*   35 E> */ B(LdaNamedProperty), R(4), U8(5), U8(4),
                 B(Star), R(5),
-  /*   30 S> */ B(LdaNamedProperty), R(5), U8(4), U8(6),
-                B(Star), R(17),
-                B(CallProperty0), R(17), R(5), U8(4),
+                B(Ldar), R(11),
+                B(SwitchOnSmiNoFeedback), U8(6), U8(1), I8(1),
+                B(LdaSmi), I8(-2),
+                B(TestEqualStrictNoFeedback), R(11),
+                B(JumpIfTrue), U8(4),
+                B(Abort), U8(15),
+  /*   30 S> */ B(CallProperty0), R(5), R(4), U8(6),
                 B(Star), R(6),
   /*   30 E> */ B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(6), U8(1),
                 B(ToBooleanLogicalNot),
                 B(JumpIfFalse), U8(7),
                 B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(6), U8(1),
-                B(LdaNamedProperty), R(6), U8(5), U8(8),
-                B(JumpIfToBooleanTrue), U8(28),
-                B(LdaNamedProperty), R(6), U8(6), U8(10),
+                B(LdaNamedProperty), R(6), U8(7), U8(8),
+                B(JumpIfToBooleanTrue), U8(67),
+                B(LdaNamedProperty), R(6), U8(8), U8(10),
                 B(Star), R(8),
                 B(LdaSmi), I8(2),
                 B(Star), R(7),
-                B(Mov), R(8), R(4),
+                B(Mov), R(8), R(3),
   /*   21 E> */ B(StackCheck),
-                B(Mov), R(4), R(1),
-  /*   50 S> */ B(Mov), R(1), R(0),
+                B(Mov), R(3), R(0),
+  /*   40 S> */ B(LdaFalse),
+                B(Star), R(18),
+                B(Mov), R(0), R(17),
+                B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(17), U8(2),
+                B(SuspendGenerator), R(2), R(0), U8(17), U8(1),
+  /*   49 S> */ B(Return),
+                B(ResumeGenerator), R(2), R(11), R(0), U8(17),
+                B(Star), R(17),
+                B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(2), U8(1),
+                B(SwitchOnSmiNoFeedback), U8(9), U8(2), I8(0),
+                B(Ldar), R(17),
+  /*   40 E> */ B(Throw),
+                B(LdaZero),
+                B(Star), R(13),
+                B(Mov), R(17), R(14),
+                B(Jump), U8(58),
                 B(LdaZero),
                 B(Star), R(7),
-                B(JumpLoop), U8(53), I8(0),
+                B(JumpLoop), U8(100), I8(0),
                 B(Jump), U8(36),
                 B(Star), R(17),
                 B(Ldar), R(closure),
-  /*   50 E> */ B(CreateCatchContext), R(17), U8(7), U8(8),
+                B(CreateCatchContext), R(17), U8(11), U8(12),
                 B(PushContext), R(17),
                 B(Star), R(16),
                 B(LdaSmi), I8(2),
@@ -732,51 +887,45 @@
                 B(LdaSmi), I8(-1),
                 B(Star), R(14),
                 B(Star), R(13),
-                B(Jump), U8(7),
+                B(Jump), U8(8),
                 B(Star), R(14),
-                B(LdaZero),
+                B(LdaSmi), I8(1),
                 B(Star), R(13),
                 B(LdaTheHole),
                 B(SetPendingMessage),
                 B(Star), R(15),
                 B(LdaZero),
                 B(TestEqualStrict), R(7), U8(13),
-                B(JumpIfTrue), U8(104),
-                B(LdaNamedProperty), R(5), U8(9), U8(14),
+                B(JumpIfTrue), U8(90),
+                B(LdaNamedProperty), R(4), U8(13), U8(14),
                 B(Star), R(9),
                 B(TestUndetectable),
                 B(JumpIfFalse), U8(4),
-                B(Jump), U8(93),
+                B(Jump), U8(79),
                 B(LdaSmi), I8(1),
-                B(TestEqualStrict), R(7), U8(17),
-                B(JumpIfFalse), U8(61),
+                B(TestEqualStrict), R(7), U8(16),
+                B(JumpIfFalse), U8(47),
                 B(Ldar), R(9),
-                B(TestTypeOf), U8(5),
+                B(TestTypeOf), U8(6),
                 B(JumpIfFalse), U8(4),
                 B(Jump), U8(18),
-                B(Wide), B(LdaSmi), I16(136),
+                B(Wide), B(LdaSmi), I16(144),
                 B(Star), R(16),
-                B(LdaConstant), U8(10),
+                B(LdaConstant), U8(14),
                 B(Star), R(17),
                 B(CallRuntime), U16(Runtime::kNewTypeError), R(16), U8(2),
                 B(Throw),
                 B(Mov), R(context), R(16),
                 B(Mov), R(9), R(17),
-                B(Mov), R(5), R(18),
+                B(Mov), R(4), R(18),
                 B(InvokeIntrinsic), U8(Runtime::k_Call), R(17), U8(2),
-                B(Jump), U8(20),
-                B(Star), R(17),
-                B(Ldar), R(closure),
-                B(CreateCatchContext), R(17), U8(7), U8(11),
-                B(Star), R(16),
+                B(Jump), U8(6),
                 B(LdaTheHole),
                 B(SetPendingMessage),
                 B(Ldar), R(16),
-                B(PushContext), R(17),
-                B(PopContext), R(17),
                 B(Jump), U8(27),
                 B(Mov), R(9), R(16),
-                B(Mov), R(5), R(17),
+                B(Mov), R(4), R(17),
                 B(InvokeIntrinsic), U8(Runtime::k_Call), R(16), U8(2),
                 B(Star), R(10),
                 B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(10), U8(1),
@@ -785,223 +934,24 @@
                 B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(10), U8(1),
                 B(Ldar), R(15),
                 B(SetPendingMessage),
-                B(LdaZero),
-                B(TestEqualStrictNoFeedback), R(13),
-                B(JumpIfFalse), U8(5),
-                B(Ldar), R(14),
-                B(ReThrow),
-                B(LdaUndefined),
-  /*   55 S> */ B(Return),
-]
-constant pool: [
-  Smi [37],
-  Smi [10],
-  Smi [7],
-  SYMBOL_TYPE,
-  ONE_BYTE_INTERNALIZED_STRING_TYPE ["next"],
-  ONE_BYTE_INTERNALIZED_STRING_TYPE ["done"],
-  ONE_BYTE_INTERNALIZED_STRING_TYPE ["value"],
-  ONE_BYTE_INTERNALIZED_STRING_TYPE [".catch"],
-  FIXED_ARRAY_TYPE,
-  ONE_BYTE_INTERNALIZED_STRING_TYPE ["return"],
-  ONE_BYTE_INTERNALIZED_STRING_TYPE [""],
-  FIXED_ARRAY_TYPE,
-]
-handlers: [
-  [85, 203, 211],
-  [88, 167, 169],
-  [271, 281, 283],
-]
-
----
-snippet: "
-  function* f(arr) {
-    for (let x of arr) yield x;
-  }
-  f([1, 2, 3]);
-"
-frame size: 18
-parameter count: 2
-bytecode array length: 408
-bytecodes: [
-                B(Ldar), R(2),
-                B(JumpIfUndefined), U8(18),
-                B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetContext), R(2), U8(1),
-                B(PushContext), R(11),
-                B(RestoreGeneratorState), R(2),
-                B(Star), R(10),
-                B(SwitchOnSmiNoFeedback), U8(0), U8(2), I8(0),
-                B(Abort), U8(45),
-                B(LdaSmi), I8(-2),
-                B(Star), R(10),
-                B(CreateFunctionContext), U8(1),
-                B(PushContext), R(11),
-                B(Ldar), R(arg0),
-                B(StaCurrentContextSlot), U8(4),
-                B(Mov), R(closure), R(12),
-                B(Mov), R(this), R(13),
-                B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(12), U8(2),
-                B(Star), R(2),
-  /*   11 E> */ B(StackCheck),
-  /*   11 E> */ B(SuspendGenerator), R(2), R(0), U8(12), U8(0),
-  /*   49 S> */ B(Return),
-                B(RestoreGeneratorRegisters), R(2), R(0), U8(12),
-                B(LdaSmi), I8(-2),
-                B(Star), R(10),
-                B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(2), U8(1),
-                B(Star), R(12),
-                B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(2), U8(1),
-                B(SwitchOnSmiNoFeedback), U8(2), U8(2), I8(0),
-                B(Ldar), R(12),
-  /*   11 E> */ B(Throw),
-                B(Ldar), R(12),
-  /*   49 S> */ B(Return),
-                B(LdaZero),
-                B(Star), R(6),
-                B(Mov), R(context), R(14),
-                B(Mov), R(context), R(15),
-  /*   35 S> */ B(LdaImmutableCurrentContextSlot), U8(4),
-                B(Star), R(16),
-                B(LdaNamedProperty), R(16), U8(4), U8(0),
-                B(Star), R(17),
-                B(CallProperty0), R(17), R(16), U8(2),
-                B(JumpIfJSReceiver), U8(7),
-                B(CallRuntime), U16(Runtime::kThrowSymbolIteratorInvalid), R(0), U8(0),
-                B(Star), R(4),
-                B(Ldar), R(10),
-                B(SwitchOnSmiNoFeedback), U8(5), U8(1), I8(1),
-                B(LdaSmi), I8(-2),
-  /*   35 E> */ B(TestEqualStrictNoFeedback), R(10),
-                B(JumpIfTrue), U8(4),
-                B(Abort), U8(45),
-  /*   30 S> */ B(LdaNamedProperty), R(4), U8(6), U8(6),
-                B(Star), R(16),
-                B(CallProperty0), R(16), R(4), U8(4),
-                B(Star), R(5),
-  /*   30 E> */ B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(5), U8(1),
-                B(ToBooleanLogicalNot),
-                B(JumpIfFalse), U8(7),
-                B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(5), U8(1),
-                B(LdaNamedProperty), R(5), U8(7), U8(8),
-                B(JumpIfToBooleanTrue), U8(74),
-                B(LdaNamedProperty), R(5), U8(8), U8(10),
-                B(Star), R(7),
-                B(LdaSmi), I8(2),
-                B(Star), R(6),
-                B(Mov), R(7), R(3),
-  /*   21 E> */ B(StackCheck),
-                B(Mov), R(3), R(0),
-  /*   40 S> */ B(LdaFalse),
-                B(Star), R(17),
-                B(Mov), R(0), R(16),
-                B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(16), U8(2),
-                B(SuspendGenerator), R(2), R(0), U8(16), U8(1),
-  /*   49 S> */ B(Return),
-                B(RestoreGeneratorRegisters), R(2), R(0), U8(16),
-                B(LdaSmi), I8(-2),
-                B(Star), R(10),
-                B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(2), U8(1),
-                B(Star), R(16),
-                B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(2), U8(1),
-                B(SwitchOnSmiNoFeedback), U8(9), U8(2), I8(0),
-                B(Ldar), R(16),
-  /*   40 E> */ B(Throw),
-                B(LdaZero),
-                B(Star), R(12),
-                B(Mov), R(16), R(13),
-                B(Jump), U8(58),
-                B(LdaZero),
-                B(Star), R(6),
-                B(JumpLoop), U8(113), I8(0),
-                B(Jump), U8(36),
-                B(Star), R(16),
-                B(Ldar), R(closure),
-                B(CreateCatchContext), R(16), U8(11), U8(12),
-                B(PushContext), R(16),
-                B(Star), R(15),
-                B(LdaSmi), I8(2),
-                B(TestEqualStrict), R(6), U8(12),
-                B(JumpIfFalse), U8(6),
-                B(LdaSmi), I8(1),
-                B(Star), R(6),
-                B(LdaImmutableCurrentContextSlot), U8(4),
-                B(Star), R(17),
-                B(CallRuntime), U16(Runtime::kReThrow), R(17), U8(1),
-                B(PopContext), R(16),
-                B(LdaSmi), I8(-1),
-                B(Star), R(13),
-                B(Star), R(12),
-                B(Jump), U8(8),
-                B(Star), R(13),
-                B(LdaSmi), I8(1),
-                B(Star), R(12),
-                B(LdaTheHole),
-                B(SetPendingMessage),
-                B(Star), R(14),
-                B(LdaZero),
-                B(TestEqualStrict), R(6), U8(13),
-                B(JumpIfTrue), U8(104),
-                B(LdaNamedProperty), R(4), U8(13), U8(14),
-                B(Star), R(8),
-                B(TestUndetectable),
-                B(JumpIfFalse), U8(4),
-                B(Jump), U8(93),
-                B(LdaSmi), I8(1),
-                B(TestEqualStrict), R(6), U8(17),
-                B(JumpIfFalse), U8(61),
-                B(Ldar), R(8),
-                B(TestTypeOf), U8(5),
-                B(JumpIfFalse), U8(4),
-                B(Jump), U8(18),
-                B(Wide), B(LdaSmi), I16(136),
-                B(Star), R(15),
-                B(LdaConstant), U8(14),
-                B(Star), R(16),
-                B(CallRuntime), U16(Runtime::kNewTypeError), R(15), U8(2),
-                B(Throw),
-                B(Mov), R(context), R(15),
-                B(Mov), R(8), R(16),
-                B(Mov), R(4), R(17),
-                B(InvokeIntrinsic), U8(Runtime::k_Call), R(16), U8(2),
-                B(Jump), U8(20),
-                B(Star), R(16),
-                B(Ldar), R(closure),
-                B(CreateCatchContext), R(16), U8(11), U8(15),
-                B(Star), R(15),
-                B(LdaTheHole),
-                B(SetPendingMessage),
-                B(Ldar), R(15),
-                B(PushContext), R(16),
-                B(PopContext), R(16),
-                B(Jump), U8(27),
-                B(Mov), R(8), R(15),
-                B(Mov), R(4), R(16),
-                B(InvokeIntrinsic), U8(Runtime::k_Call), R(15), U8(2),
-                B(Star), R(9),
-                B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(9), U8(1),
-                B(JumpIfToBooleanFalse), U8(4),
-                B(Jump), U8(7),
-                B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(9), U8(1),
-                B(Ldar), R(14),
-                B(SetPendingMessage),
-                B(Ldar), R(12),
-                B(SwitchOnSmiNoFeedback), U8(16), U8(2), I8(0),
-                B(Jump), U8(8),
                 B(Ldar), R(13),
+                B(SwitchOnSmiNoFeedback), U8(15), U8(2), I8(0),
+                B(Jump), U8(8),
+                B(Ldar), R(14),
   /*   49 S> */ B(Return),
-                B(Ldar), R(13),
+                B(Ldar), R(14),
                 B(ReThrow),
                 B(LdaUndefined),
   /*   49 S> */ B(Return),
 ]
 constant pool: [
   Smi [37],
-  Smi [97],
+  Smi [96],
   Smi [10],
   Smi [7],
   SYMBOL_TYPE,
-  Smi [75],
   ONE_BYTE_INTERNALIZED_STRING_TYPE ["next"],
+  Smi [69],
   ONE_BYTE_INTERNALIZED_STRING_TYPE ["done"],
   ONE_BYTE_INTERNALIZED_STRING_TYPE ["value"],
   Smi [15],
@@ -1010,14 +960,13 @@
   FIXED_ARRAY_TYPE,
   ONE_BYTE_INTERNALIZED_STRING_TYPE ["return"],
   ONE_BYTE_INTERNALIZED_STRING_TYPE [""],
-  FIXED_ARRAY_TYPE,
   Smi [6],
   Smi [9],
 ]
 handlers: [
-  [85, 263, 271],
-  [88, 227, 229],
-  [332, 342, 344],
+  [78, 249, 257],
+  [81, 213, 215],
+  [318, 328, 330],
 ]
 
 ---
@@ -1027,178 +976,172 @@
   }
   f([1, 2, 3]);
 "
-frame size: 23
+frame size: 24
 parameter count: 2
-bytecode array length: 386
+bytecode array length: 372
 bytecodes: [
                 B(CreateFunctionContext), U8(1),
-                B(PushContext), R(12),
+                B(PushContext), R(13),
                 B(Ldar), R(arg0),
                 B(StaCurrentContextSlot), U8(4),
   /*   16 E> */ B(StackCheck),
                 B(CallJSRuntime), U8(%async_function_promise_create), R(0), U8(0),
-                B(Star), R(11),
-                B(Mov), R(context), R(15),
+                B(Star), R(12),
                 B(Mov), R(context), R(16),
+                B(Mov), R(context), R(17),
                 B(LdaZero),
-                B(Star), R(7),
-                B(Mov), R(context), R(19),
+                B(Star), R(8),
                 B(Mov), R(context), R(20),
+                B(Mov), R(context), R(21),
   /*   40 S> */ B(LdaImmutableCurrentContextSlot), U8(4),
-                B(Star), R(21),
-                B(LdaNamedProperty), R(21), U8(0), U8(0),
                 B(Star), R(22),
-                B(CallProperty0), R(22), R(21), U8(2),
+                B(LdaNamedProperty), R(22), U8(0), U8(0),
+                B(Star), R(23),
+                B(CallProperty0), R(23), R(22), U8(2),
                 B(JumpIfJSReceiver), U8(7),
                 B(CallRuntime), U16(Runtime::kThrowSymbolIteratorInvalid), R(0), U8(0),
                 B(Star), R(5),
-  /*   35 S> */ B(LdaNamedProperty), R(5), U8(1), U8(6),
-                B(Star), R(21),
-                B(CallProperty0), R(21), R(5), U8(4),
+  /*   40 E> */ B(LdaNamedProperty), R(5), U8(1), U8(4),
                 B(Star), R(6),
-  /*   35 E> */ B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(6), U8(1),
+  /*   35 S> */ B(CallProperty0), R(6), R(5), U8(6),
+                B(Star), R(7),
+  /*   35 E> */ B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(7), U8(1),
                 B(ToBooleanLogicalNot),
                 B(JumpIfFalse), U8(7),
-                B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(6), U8(1),
-                B(LdaNamedProperty), R(6), U8(2), U8(8),
+                B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(7), U8(1),
+                B(LdaNamedProperty), R(7), U8(2), U8(8),
                 B(JumpIfToBooleanTrue), U8(28),
-                B(LdaNamedProperty), R(6), U8(3), U8(10),
-                B(Star), R(8),
+                B(LdaNamedProperty), R(7), U8(3), U8(10),
+                B(Star), R(9),
                 B(LdaSmi), I8(2),
-                B(Star), R(7),
-                B(Mov), R(8), R(4),
+                B(Star), R(8),
+                B(Mov), R(9), R(4),
   /*   26 E> */ B(StackCheck),
                 B(Mov), R(4), R(1),
   /*   55 S> */ B(Mov), R(1), R(0),
                 B(LdaZero),
-                B(Star), R(7),
-                B(JumpLoop), U8(53), I8(0),
+                B(Star), R(8),
+                B(JumpLoop), U8(47), I8(0),
                 B(Jump), U8(40),
-                B(Star), R(21),
+                B(Star), R(22),
                 B(Ldar), R(closure),
-  /*   55 E> */ B(CreateCatchContext), R(21), U8(4), U8(5),
-                B(Star), R(20),
+  /*   55 E> */ B(CreateCatchContext), R(22), U8(4), U8(5),
+                B(Star), R(21),
                 B(LdaTheHole),
                 B(SetPendingMessage),
-                B(Ldar), R(20),
-                B(PushContext), R(21),
+                B(Ldar), R(21),
+                B(PushContext), R(22),
                 B(LdaSmi), I8(2),
-                B(TestEqualStrict), R(7), U8(12),
+                B(TestEqualStrict), R(8), U8(12),
                 B(JumpIfFalse), U8(6),
                 B(LdaSmi), I8(1),
-                B(Star), R(7),
+                B(Star), R(8),
                 B(LdaImmutableCurrentContextSlot), U8(4),
-                B(Star), R(22),
-                B(CallRuntime), U16(Runtime::kReThrow), R(22), U8(1),
-                B(PopContext), R(21),
+                B(Star), R(23),
+                B(CallRuntime), U16(Runtime::kReThrow), R(23), U8(1),
+                B(PopContext), R(22),
                 B(LdaSmi), I8(-1),
+                B(Star), R(19),
                 B(Star), R(18),
-                B(Star), R(17),
                 B(Jump), U8(7),
-                B(Star), R(18),
-                B(LdaZero),
-                B(Star), R(17),
-                B(LdaTheHole),
-                B(SetPendingMessage),
                 B(Star), R(19),
                 B(LdaZero),
-                B(TestEqualStrict), R(7), U8(13),
-                B(JumpIfTrue), U8(104),
+                B(Star), R(18),
+                B(LdaTheHole),
+                B(SetPendingMessage),
+                B(Star), R(20),
+                B(LdaZero),
+                B(TestEqualStrict), R(8), U8(13),
+                B(JumpIfTrue), U8(90),
                 B(LdaNamedProperty), R(5), U8(6), U8(14),
-                B(Star), R(9),
+                B(Star), R(10),
                 B(TestUndetectable),
                 B(JumpIfFalse), U8(4),
-                B(Jump), U8(93),
+                B(Jump), U8(79),
                 B(LdaSmi), I8(1),
-                B(TestEqualStrict), R(7), U8(17),
-                B(JumpIfFalse), U8(61),
-                B(Ldar), R(9),
-                B(TestTypeOf), U8(5),
+                B(TestEqualStrict), R(8), U8(16),
+                B(JumpIfFalse), U8(47),
+                B(Ldar), R(10),
+                B(TestTypeOf), U8(6),
                 B(JumpIfFalse), U8(4),
                 B(Jump), U8(18),
-                B(Wide), B(LdaSmi), I16(136),
-                B(Star), R(20),
-                B(LdaConstant), U8(7),
+                B(Wide), B(LdaSmi), I16(144),
                 B(Star), R(21),
-                B(CallRuntime), U16(Runtime::kNewTypeError), R(20), U8(2),
+                B(LdaConstant), U8(7),
+                B(Star), R(22),
+                B(CallRuntime), U16(Runtime::kNewTypeError), R(21), U8(2),
                 B(Throw),
-                B(Mov), R(context), R(20),
-                B(Mov), R(9), R(21),
+                B(Mov), R(context), R(21),
+                B(Mov), R(10), R(22),
+                B(Mov), R(5), R(23),
+                B(InvokeIntrinsic), U8(Runtime::k_Call), R(22), U8(2),
+                B(Jump), U8(6),
+                B(LdaTheHole),
+                B(SetPendingMessage),
+                B(Ldar), R(21),
+                B(Jump), U8(27),
+                B(Mov), R(10), R(21),
                 B(Mov), R(5), R(22),
                 B(InvokeIntrinsic), U8(Runtime::k_Call), R(21), U8(2),
-                B(Jump), U8(20),
-                B(Star), R(21),
-                B(Ldar), R(closure),
-                B(CreateCatchContext), R(21), U8(4), U8(8),
-                B(Star), R(20),
-                B(LdaTheHole),
-                B(SetPendingMessage),
-                B(Ldar), R(20),
-                B(PushContext), R(21),
-                B(PopContext), R(21),
-                B(Jump), U8(27),
-                B(Mov), R(9), R(20),
-                B(Mov), R(5), R(21),
-                B(InvokeIntrinsic), U8(Runtime::k_Call), R(20), U8(2),
-                B(Star), R(10),
-                B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(10), U8(1),
+                B(Star), R(11),
+                B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(11), U8(1),
                 B(JumpIfToBooleanFalse), U8(4),
                 B(Jump), U8(7),
-                B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(10), U8(1),
-                B(Ldar), R(19),
+                B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(11), U8(1),
+                B(Ldar), R(20),
                 B(SetPendingMessage),
                 B(LdaZero),
-                B(TestEqualStrictNoFeedback), R(17),
+                B(TestEqualStrictNoFeedback), R(18),
                 B(JumpIfFalse), U8(5),
-                B(Ldar), R(18),
+                B(Ldar), R(19),
                 B(ReThrow),
                 B(LdaUndefined),
-                B(Star), R(18),
-                B(Mov), R(11), R(17),
-                B(CallJSRuntime), U8(%promise_resolve), R(17), U8(2),
+                B(Star), R(19),
+                B(Mov), R(12), R(18),
+                B(CallJSRuntime), U8(%promise_resolve), R(18), U8(2),
                 B(LdaZero),
-                B(Star), R(13),
-                B(Mov), R(11), R(14),
+                B(Star), R(14),
+                B(Mov), R(12), R(15),
                 B(Jump), U8(58),
                 B(Jump), U8(42),
-                B(Star), R(17),
+                B(Star), R(18),
                 B(Ldar), R(closure),
-                B(CreateCatchContext), R(17), U8(4), U8(9),
-                B(Star), R(16),
+                B(CreateCatchContext), R(18), U8(4), U8(8),
+                B(Star), R(17),
                 B(LdaTheHole),
                 B(SetPendingMessage),
-                B(Ldar), R(16),
-                B(PushContext), R(17),
+                B(Ldar), R(17),
+                B(PushContext), R(18),
                 B(LdaImmutableCurrentContextSlot), U8(4),
-                B(Star), R(19),
-                B(LdaFalse),
                 B(Star), R(20),
-                B(Mov), R(11), R(18),
-                B(CallJSRuntime), U8(%promise_internal_reject), R(18), U8(3),
-                B(PopContext), R(17),
+                B(LdaFalse),
+                B(Star), R(21),
+                B(Mov), R(12), R(19),
+                B(CallJSRuntime), U8(%promise_internal_reject), R(19), U8(3),
+                B(PopContext), R(18),
                 B(LdaZero),
-                B(Star), R(13),
-                B(Mov), R(11), R(14),
+                B(Star), R(14),
+                B(Mov), R(12), R(15),
                 B(Jump), U8(16),
                 B(LdaSmi), I8(-1),
+                B(Star), R(15),
                 B(Star), R(14),
-                B(Star), R(13),
                 B(Jump), U8(8),
-                B(Star), R(14),
+                B(Star), R(15),
                 B(LdaSmi), I8(1),
-                B(Star), R(13),
+                B(Star), R(14),
                 B(LdaTheHole),
                 B(SetPendingMessage),
-                B(Star), R(15),
-                B(CallJSRuntime), U8(%async_function_promise_release), R(11), U8(1),
-                B(Ldar), R(15),
+                B(Star), R(16),
+                B(CallJSRuntime), U8(%async_function_promise_release), R(12), U8(1),
+                B(Ldar), R(16),
                 B(SetPendingMessage),
-                B(Ldar), R(13),
-                B(SwitchOnSmiNoFeedback), U8(10), U8(2), I8(0),
+                B(Ldar), R(14),
+                B(SwitchOnSmiNoFeedback), U8(9), U8(2), I8(0),
                 B(Jump), U8(8),
-                B(Ldar), R(14),
+                B(Ldar), R(15),
   /*   60 S> */ B(Return),
-                B(Ldar), R(14),
+                B(Ldar), R(15),
                 B(ReThrow),
                 B(LdaUndefined),
   /*   60 S> */ B(Return),
@@ -1213,13 +1156,12 @@
   ONE_BYTE_INTERNALIZED_STRING_TYPE ["return"],
   ONE_BYTE_INTERNALIZED_STRING_TYPE [""],
   FIXED_ARRAY_TYPE,
-  FIXED_ARRAY_TYPE,
   Smi [6],
   Smi [9],
 ]
 handlers: [
-  [18, 345, 353],
-  [21, 303, 305],
+  [18, 331, 339],
+  [21, 289, 291],
   [27, 149, 157],
   [30, 109, 111],
   [217, 227, 229],
@@ -1232,224 +1174,215 @@
   }
   f([1, 2, 3]);
 "
-frame size: 24
+frame size: 25
 parameter count: 2
-bytecode array length: 480
+bytecode array length: 459
 bytecodes: [
                 B(Ldar), R(2),
                 B(JumpIfUndefined), U8(18),
                 B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetContext), R(2), U8(1),
-                B(PushContext), R(12),
+                B(PushContext), R(13),
                 B(RestoreGeneratorState), R(2),
-                B(Star), R(11),
+                B(Star), R(12),
                 B(SwitchOnSmiNoFeedback), U8(0), U8(1), I8(0),
-                B(Abort), U8(45),
+                B(Abort), U8(15),
                 B(LdaSmi), I8(-2),
-                B(Star), R(11),
+                B(Star), R(12),
                 B(CreateFunctionContext), U8(1),
-                B(PushContext), R(12),
+                B(PushContext), R(13),
                 B(Ldar), R(arg0),
                 B(StaCurrentContextSlot), U8(4),
-                B(Mov), R(closure), R(13),
-                B(Mov), R(this), R(14),
-                B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(13), U8(2),
+                B(Mov), R(closure), R(14),
+                B(Mov), R(this), R(15),
+                B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(14), U8(2),
                 B(Star), R(2),
   /*   16 E> */ B(StackCheck),
                 B(CallJSRuntime), U8(%async_function_promise_create), R(0), U8(0),
-                B(Star), R(10),
-                B(Mov), R(context), R(15),
+                B(Star), R(11),
                 B(Mov), R(context), R(16),
+                B(Mov), R(context), R(17),
                 B(LdaZero),
-                B(Star), R(6),
-                B(Mov), R(context), R(19),
+                B(Star), R(7),
                 B(Mov), R(context), R(20),
+                B(Mov), R(context), R(21),
   /*   40 S> */ B(LdaImmutableCurrentContextSlot), U8(4),
-                B(Star), R(21),
-                B(LdaNamedProperty), R(21), U8(1), U8(0),
                 B(Star), R(22),
-                B(CallProperty0), R(22), R(21), U8(2),
+                B(LdaNamedProperty), R(22), U8(1), U8(0),
+                B(Star), R(23),
+                B(CallProperty0), R(23), R(22), U8(2),
                 B(JumpIfJSReceiver), U8(7),
                 B(CallRuntime), U16(Runtime::kThrowSymbolIteratorInvalid), R(0), U8(0),
                 B(Star), R(4),
-                B(Ldar), R(11),
-                B(SwitchOnSmiNoFeedback), U8(2), U8(1), I8(0),
-                B(LdaSmi), I8(-2),
-  /*   40 E> */ B(TestEqualStrictNoFeedback), R(11),
-                B(JumpIfTrue), U8(4),
-                B(Abort), U8(45),
-  /*   35 S> */ B(LdaNamedProperty), R(4), U8(3), U8(6),
-                B(Star), R(21),
-                B(CallProperty0), R(21), R(4), U8(4),
+  /*   40 E> */ B(LdaNamedProperty), R(4), U8(2), U8(4),
                 B(Star), R(5),
-  /*   35 E> */ B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(5), U8(1),
+                B(Ldar), R(12),
+                B(SwitchOnSmiNoFeedback), U8(3), U8(1), I8(0),
+                B(LdaSmi), I8(-2),
+                B(TestEqualStrictNoFeedback), R(12),
+                B(JumpIfTrue), U8(4),
+                B(Abort), U8(15),
+  /*   35 S> */ B(CallProperty0), R(5), R(4), U8(6),
+                B(Star), R(6),
+  /*   35 E> */ B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(6), U8(1),
                 B(ToBooleanLogicalNot),
                 B(JumpIfFalse), U8(7),
-                B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(5), U8(1),
-                B(LdaNamedProperty), R(5), U8(4), U8(8),
-                B(JumpIfToBooleanTrue), U8(72),
-                B(LdaNamedProperty), R(5), U8(5), U8(10),
-                B(Star), R(7),
+                B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(6), U8(1),
+                B(LdaNamedProperty), R(6), U8(4), U8(8),
+                B(JumpIfToBooleanTrue), U8(65),
+                B(LdaNamedProperty), R(6), U8(5), U8(10),
+                B(Star), R(8),
                 B(LdaSmi), I8(2),
-                B(Star), R(6),
-                B(Mov), R(7), R(3),
+                B(Star), R(7),
+                B(Mov), R(8), R(3),
   /*   26 E> */ B(StackCheck),
                 B(Mov), R(3), R(0),
-  /*   45 S> */ B(Mov), R(2), R(21),
-                B(Mov), R(0), R(22),
-                B(Mov), R(10), R(23),
-                B(CallJSRuntime), U8(%async_function_await_uncaught), R(21), U8(3),
-                B(SuspendGenerator), R(2), R(0), U8(21), U8(0),
+  /*   45 S> */ B(Mov), R(2), R(22),
+                B(Mov), R(0), R(23),
+                B(Mov), R(11), R(24),
+                B(CallJSRuntime), U8(%async_function_await_uncaught), R(22), U8(3),
+                B(SuspendGenerator), R(2), R(0), U8(22), U8(0),
   /*   54 S> */ B(Return),
-                B(RestoreGeneratorRegisters), R(2), R(0), U8(21),
-                B(LdaSmi), I8(-2),
-                B(Star), R(11),
-                B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(2), U8(1),
-                B(Star), R(21),
-                B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(2), U8(1),
+                B(ResumeGenerator), R(2), R(12), R(0), U8(22),
                 B(Star), R(22),
+                B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(2), U8(1),
+                B(Star), R(23),
                 B(LdaZero),
-                B(TestEqualStrictNoFeedback), R(22),
+                B(TestEqualStrictNoFeedback), R(23),
                 B(JumpIfTrue), U8(5),
-                B(Ldar), R(21),
+                B(Ldar), R(22),
                 B(ReThrow),
                 B(LdaZero),
-                B(Star), R(6),
-                B(JumpLoop), U8(111), I8(0),
+                B(Star), R(7),
+                B(JumpLoop), U8(98), I8(0),
                 B(Jump), U8(40),
-                B(Star), R(21),
+                B(Star), R(22),
                 B(Ldar), R(closure),
-                B(CreateCatchContext), R(21), U8(6), U8(7),
-                B(Star), R(20),
+                B(CreateCatchContext), R(22), U8(6), U8(7),
+                B(Star), R(21),
                 B(LdaTheHole),
                 B(SetPendingMessage),
-                B(Ldar), R(20),
-                B(PushContext), R(21),
+                B(Ldar), R(21),
+                B(PushContext), R(22),
                 B(LdaSmi), I8(2),
-                B(TestEqualStrict), R(6), U8(12),
+                B(TestEqualStrict), R(7), U8(12),
                 B(JumpIfFalse), U8(6),
                 B(LdaSmi), I8(1),
-                B(Star), R(6),
+                B(Star), R(7),
                 B(LdaImmutableCurrentContextSlot), U8(4),
-                B(Star), R(22),
-                B(CallRuntime), U16(Runtime::kReThrow), R(22), U8(1),
-                B(PopContext), R(21),
+                B(Star), R(23),
+                B(CallRuntime), U16(Runtime::kReThrow), R(23), U8(1),
+                B(PopContext), R(22),
                 B(LdaSmi), I8(-1),
+                B(Star), R(19),
                 B(Star), R(18),
-                B(Star), R(17),
                 B(Jump), U8(7),
-                B(Star), R(18),
-                B(LdaZero),
-                B(Star), R(17),
-                B(LdaTheHole),
-                B(SetPendingMessage),
                 B(Star), R(19),
                 B(LdaZero),
-                B(TestEqualStrict), R(6), U8(13),
-                B(JumpIfTrue), U8(104),
+                B(Star), R(18),
+                B(LdaTheHole),
+                B(SetPendingMessage),
+                B(Star), R(20),
+                B(LdaZero),
+                B(TestEqualStrict), R(7), U8(13),
+                B(JumpIfTrue), U8(90),
                 B(LdaNamedProperty), R(4), U8(8), U8(14),
-                B(Star), R(8),
+                B(Star), R(9),
                 B(TestUndetectable),
                 B(JumpIfFalse), U8(4),
-                B(Jump), U8(93),
+                B(Jump), U8(79),
                 B(LdaSmi), I8(1),
-                B(TestEqualStrict), R(6), U8(17),
-                B(JumpIfFalse), U8(61),
-                B(Ldar), R(8),
-                B(TestTypeOf), U8(5),
+                B(TestEqualStrict), R(7), U8(16),
+                B(JumpIfFalse), U8(47),
+                B(Ldar), R(9),
+                B(TestTypeOf), U8(6),
                 B(JumpIfFalse), U8(4),
                 B(Jump), U8(18),
-                B(Wide), B(LdaSmi), I16(136),
-                B(Star), R(20),
-                B(LdaConstant), U8(9),
+                B(Wide), B(LdaSmi), I16(144),
                 B(Star), R(21),
-                B(CallRuntime), U16(Runtime::kNewTypeError), R(20), U8(2),
+                B(LdaConstant), U8(9),
+                B(Star), R(22),
+                B(CallRuntime), U16(Runtime::kNewTypeError), R(21), U8(2),
                 B(Throw),
-                B(Mov), R(context), R(20),
-                B(Mov), R(8), R(21),
+                B(Mov), R(context), R(21),
+                B(Mov), R(9), R(22),
+                B(Mov), R(4), R(23),
+                B(InvokeIntrinsic), U8(Runtime::k_Call), R(22), U8(2),
+                B(Jump), U8(6),
+                B(LdaTheHole),
+                B(SetPendingMessage),
+                B(Ldar), R(21),
+                B(Jump), U8(27),
+                B(Mov), R(9), R(21),
                 B(Mov), R(4), R(22),
                 B(InvokeIntrinsic), U8(Runtime::k_Call), R(21), U8(2),
-                B(Jump), U8(20),
-                B(Star), R(21),
-                B(Ldar), R(closure),
-                B(CreateCatchContext), R(21), U8(6), U8(10),
-                B(Star), R(20),
-                B(LdaTheHole),
-                B(SetPendingMessage),
-                B(Ldar), R(20),
-                B(PushContext), R(21),
-                B(PopContext), R(21),
-                B(Jump), U8(27),
-                B(Mov), R(8), R(20),
-                B(Mov), R(4), R(21),
-                B(InvokeIntrinsic), U8(Runtime::k_Call), R(20), U8(2),
-                B(Star), R(9),
-                B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(9), U8(1),
+                B(Star), R(10),
+                B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(10), U8(1),
                 B(JumpIfToBooleanFalse), U8(4),
                 B(Jump), U8(7),
-                B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(9), U8(1),
-                B(Ldar), R(19),
+                B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(10), U8(1),
+                B(Ldar), R(20),
                 B(SetPendingMessage),
                 B(LdaZero),
-                B(TestEqualStrictNoFeedback), R(17),
+                B(TestEqualStrictNoFeedback), R(18),
                 B(JumpIfFalse), U8(5),
-                B(Ldar), R(18),
+                B(Ldar), R(19),
                 B(ReThrow),
                 B(LdaUndefined),
-                B(Star), R(18),
-                B(Mov), R(10), R(17),
-                B(CallJSRuntime), U8(%promise_resolve), R(17), U8(2),
+                B(Star), R(19),
+                B(Mov), R(11), R(18),
+                B(CallJSRuntime), U8(%promise_resolve), R(18), U8(2),
                 B(LdaZero),
-                B(Star), R(13),
-                B(Mov), R(10), R(14),
+                B(Star), R(14),
+                B(Mov), R(11), R(15),
                 B(Jump), U8(58),
                 B(Jump), U8(42),
-                B(Star), R(17),
+                B(Star), R(18),
                 B(Ldar), R(closure),
-                B(CreateCatchContext), R(17), U8(6), U8(11),
-                B(Star), R(16),
+                B(CreateCatchContext), R(18), U8(6), U8(10),
+                B(Star), R(17),
                 B(LdaTheHole),
                 B(SetPendingMessage),
-                B(Ldar), R(16),
-                B(PushContext), R(17),
+                B(Ldar), R(17),
+                B(PushContext), R(18),
                 B(LdaImmutableCurrentContextSlot), U8(4),
-                B(Star), R(19),
-                B(LdaFalse),
                 B(Star), R(20),
-                B(Mov), R(10), R(18),
-                B(CallJSRuntime), U8(%promise_internal_reject), R(18), U8(3),
-                B(PopContext), R(17),
+                B(LdaFalse),
+                B(Star), R(21),
+                B(Mov), R(11), R(19),
+                B(CallJSRuntime), U8(%promise_internal_reject), R(19), U8(3),
+                B(PopContext), R(18),
                 B(LdaZero),
-                B(Star), R(13),
-                B(Mov), R(10), R(14),
+                B(Star), R(14),
+                B(Mov), R(11), R(15),
                 B(Jump), U8(16),
                 B(LdaSmi), I8(-1),
+                B(Star), R(15),
                 B(Star), R(14),
-                B(Star), R(13),
                 B(Jump), U8(8),
-                B(Star), R(14),
+                B(Star), R(15),
                 B(LdaSmi), I8(1),
-                B(Star), R(13),
+                B(Star), R(14),
                 B(LdaTheHole),
                 B(SetPendingMessage),
-                B(Star), R(15),
-                B(CallJSRuntime), U8(%async_function_promise_release), R(10), U8(1),
-                B(Ldar), R(15),
+                B(Star), R(16),
+                B(CallJSRuntime), U8(%async_function_promise_release), R(11), U8(1),
+                B(Ldar), R(16),
                 B(SetPendingMessage),
-                B(Ldar), R(13),
-                B(SwitchOnSmiNoFeedback), U8(12), U8(2), I8(0),
+                B(Ldar), R(14),
+                B(SwitchOnSmiNoFeedback), U8(11), U8(2), I8(0),
                 B(Jump), U8(8),
-                B(Ldar), R(14),
+                B(Ldar), R(15),
   /*   54 S> */ B(Return),
-                B(Ldar), R(14),
+                B(Ldar), R(15),
                 B(ReThrow),
                 B(LdaUndefined),
   /*   54 S> */ B(Return),
 ]
 constant pool: [
-  Smi [75],
+  Smi [81],
   SYMBOL_TYPE,
-  Smi [78],
   ONE_BYTE_INTERNALIZED_STRING_TYPE ["next"],
+  Smi [72],
   ONE_BYTE_INTERNALIZED_STRING_TYPE ["done"],
   ONE_BYTE_INTERNALIZED_STRING_TYPE ["value"],
   ONE_BYTE_INTERNALIZED_STRING_TYPE [".catch"],
@@ -1457,15 +1390,14 @@
   ONE_BYTE_INTERNALIZED_STRING_TYPE ["return"],
   ONE_BYTE_INTERNALIZED_STRING_TYPE [""],
   FIXED_ARRAY_TYPE,
-  FIXED_ARRAY_TYPE,
   Smi [6],
   Smi [9],
 ]
 handlers: [
-  [54, 439, 447],
-  [57, 397, 399],
-  [63, 243, 251],
-  [66, 203, 205],
-  [311, 321, 323],
+  [54, 418, 426],
+  [57, 376, 378],
+  [63, 236, 244],
+  [66, 196, 198],
+  [304, 314, 316],
 ]
 
diff --git a/src/v8/test/cctest/interpreter/bytecode_expectations/FunctionLiterals.golden b/src/v8/test/cctest/interpreter/bytecode_expectations/FunctionLiterals.golden
index f168f2f..98fa04d 100644
--- a/src/v8/test/cctest/interpreter/bytecode_expectations/FunctionLiterals.golden
+++ b/src/v8/test/cctest/interpreter/bytecode_expectations/FunctionLiterals.golden
@@ -32,9 +32,9 @@
 bytecode array length: 11
 bytecodes: [
   /*   30 E> */ B(StackCheck),
-  /*   34 S> */ B(CreateClosure), U8(0), U8(2), U8(2),
+  /*   34 S> */ B(CreateClosure), U8(0), U8(0), U8(2),
                 B(Star), R(0),
-  /*   56 E> */ B(CallUndefinedReceiver0), R(0), U8(0),
+  /*   56 E> */ B(CallUndefinedReceiver0), R(0), U8(1),
   /*   58 S> */ B(Return),
 ]
 constant pool: [
@@ -52,11 +52,11 @@
 bytecode array length: 16
 bytecodes: [
   /*   30 E> */ B(StackCheck),
-  /*   34 S> */ B(CreateClosure), U8(0), U8(2), U8(2),
+  /*   34 S> */ B(CreateClosure), U8(0), U8(0), U8(2),
                 B(Star), R(0),
                 B(LdaSmi), I8(1),
                 B(Star), R(1),
-  /*   67 E> */ B(CallUndefinedReceiver1), R(0), R(1), U8(0),
+  /*   67 E> */ B(CallUndefinedReceiver1), R(0), R(1), U8(1),
   /*   70 S> */ B(Return),
 ]
 constant pool: [
diff --git a/src/v8/test/cctest/interpreter/bytecode_expectations/Generators.golden b/src/v8/test/cctest/interpreter/bytecode_expectations/Generators.golden
index fba1807..f09cd9f 100644
--- a/src/v8/test/cctest/interpreter/bytecode_expectations/Generators.golden
+++ b/src/v8/test/cctest/interpreter/bytecode_expectations/Generators.golden
@@ -13,7 +13,7 @@
 "
 frame size: 4
 parameter count: 1
-bytecode array length: 73
+bytecode array length: 66
 bytecodes: [
                 B(Ldar), R(0),
                 B(JumpIfUndefined), U8(18),
@@ -22,7 +22,7 @@
                 B(RestoreGeneratorState), R(0),
                 B(Star), R(1),
                 B(SwitchOnSmiNoFeedback), U8(0), U8(1), I8(0),
-                B(Abort), U8(45),
+                B(Abort), U8(15),
                 B(LdaSmi), I8(-2),
                 B(Star), R(1),
                 B(Mov), R(closure), R(2),
@@ -32,10 +32,7 @@
   /*   11 E> */ B(StackCheck),
   /*   11 E> */ B(SuspendGenerator), R(0), R(0), U8(2), U8(0),
   /*   16 S> */ B(Return),
-                B(RestoreGeneratorRegisters), R(0), R(0), U8(2),
-                B(LdaSmi), I8(-2),
-                B(Star), R(1),
-                B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(0), U8(1),
+                B(ResumeGenerator), R(0), R(1), R(0), U8(2),
                 B(Star), R(2),
                 B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
                 B(SwitchOnSmiNoFeedback), U8(1), U8(2), I8(0),
@@ -61,7 +58,7 @@
 "
 frame size: 4
 parameter count: 1
-bytecode array length: 118
+bytecode array length: 104
 bytecodes: [
                 B(Ldar), R(0),
                 B(JumpIfUndefined), U8(18),
@@ -70,7 +67,7 @@
                 B(RestoreGeneratorState), R(0),
                 B(Star), R(1),
                 B(SwitchOnSmiNoFeedback), U8(0), U8(2), I8(0),
-                B(Abort), U8(45),
+                B(Abort), U8(15),
                 B(LdaSmi), I8(-2),
                 B(Star), R(1),
                 B(Mov), R(closure), R(2),
@@ -80,10 +77,7 @@
   /*   11 E> */ B(StackCheck),
   /*   11 E> */ B(SuspendGenerator), R(0), R(0), U8(2), U8(0),
   /*   25 S> */ B(Return),
-                B(RestoreGeneratorRegisters), R(0), R(0), U8(2),
-                B(LdaSmi), I8(-2),
-                B(Star), R(1),
-                B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(0), U8(1),
+                B(ResumeGenerator), R(0), R(1), R(0), U8(2),
                 B(Star), R(2),
                 B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
                 B(SwitchOnSmiNoFeedback), U8(2), U8(2), I8(0),
@@ -98,10 +92,7 @@
                 B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(2), U8(2),
                 B(SuspendGenerator), R(0), R(0), U8(2), U8(1),
   /*   25 S> */ B(Return),
-                B(RestoreGeneratorRegisters), R(0), R(0), U8(2),
-                B(LdaSmi), I8(-2),
-                B(Star), R(1),
-                B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(0), U8(1),
+                B(ResumeGenerator), R(0), R(1), R(0), U8(2),
                 B(Star), R(2),
                 B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
                 B(SwitchOnSmiNoFeedback), U8(4), U8(2), I8(0),
@@ -114,7 +105,7 @@
 ]
 constant pool: [
   Smi [29],
-  Smi [74],
+  Smi [67],
   Smi [10],
   Smi [7],
   Smi [10],
@@ -128,185 +119,173 @@
   function* f() { for (let x of [42]) yield x }
   f();
 "
-frame size: 17
+frame size: 18
 parameter count: 1
-bytecode array length: 402
+bytecode array length: 374
 bytecodes: [
                 B(Ldar), R(2),
                 B(JumpIfUndefined), U8(18),
                 B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetContext), R(2), U8(1),
-                B(PushContext), R(11),
+                B(PushContext), R(12),
                 B(RestoreGeneratorState), R(2),
-                B(Star), R(10),
+                B(Star), R(11),
                 B(SwitchOnSmiNoFeedback), U8(0), U8(2), I8(0),
-                B(Abort), U8(45),
+                B(Abort), U8(15),
                 B(LdaSmi), I8(-2),
-                B(Star), R(10),
-                B(Mov), R(closure), R(11),
-                B(Mov), R(this), R(12),
-                B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(11), U8(2),
+                B(Star), R(11),
+                B(Mov), R(closure), R(12),
+                B(Mov), R(this), R(13),
+                B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(12), U8(2),
                 B(Star), R(2),
   /*   11 E> */ B(StackCheck),
-  /*   11 E> */ B(SuspendGenerator), R(2), R(0), U8(11), U8(0),
+  /*   11 E> */ B(SuspendGenerator), R(2), R(0), U8(12), U8(0),
   /*   44 S> */ B(Return),
-                B(RestoreGeneratorRegisters), R(2), R(0), U8(11),
-                B(LdaSmi), I8(-2),
-                B(Star), R(10),
-                B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(2), U8(1),
-                B(Star), R(11),
+                B(ResumeGenerator), R(2), R(11), R(0), U8(12),
+                B(Star), R(12),
                 B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(2), U8(1),
                 B(SwitchOnSmiNoFeedback), U8(2), U8(2), I8(0),
-                B(Ldar), R(11),
+                B(Ldar), R(12),
   /*   11 E> */ B(Throw),
-                B(Ldar), R(11),
+                B(Ldar), R(12),
   /*   44 S> */ B(Return),
                 B(LdaZero),
-                B(Star), R(6),
-                B(Mov), R(context), R(13),
+                B(Star), R(7),
                 B(Mov), R(context), R(14),
+                B(Mov), R(context), R(15),
   /*   30 S> */ B(CreateArrayLiteral), U8(4), U8(0), U8(37),
-                B(Star), R(15),
-                B(LdaNamedProperty), R(15), U8(5), U8(1),
                 B(Star), R(16),
-                B(CallProperty0), R(16), R(15), U8(3),
+                B(LdaNamedProperty), R(16), U8(5), U8(1),
+                B(Star), R(17),
+                B(CallProperty0), R(17), R(16), U8(3),
                 B(JumpIfJSReceiver), U8(7),
                 B(CallRuntime), U16(Runtime::kThrowSymbolIteratorInvalid), R(0), U8(0),
                 B(Star), R(4),
-                B(Ldar), R(10),
-                B(SwitchOnSmiNoFeedback), U8(6), U8(1), I8(1),
-                B(LdaSmi), I8(-2),
-  /*   30 E> */ B(TestEqualStrictNoFeedback), R(10),
-                B(JumpIfTrue), U8(4),
-                B(Abort), U8(45),
-  /*   25 S> */ B(LdaNamedProperty), R(4), U8(7), U8(7),
-                B(Star), R(15),
-                B(CallProperty0), R(15), R(4), U8(5),
+  /*   30 E> */ B(LdaNamedProperty), R(4), U8(6), U8(5),
                 B(Star), R(5),
-  /*   25 E> */ B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(5), U8(1),
+                B(Ldar), R(11),
+                B(SwitchOnSmiNoFeedback), U8(7), U8(1), I8(1),
+                B(LdaSmi), I8(-2),
+                B(TestEqualStrictNoFeedback), R(11),
+                B(JumpIfTrue), U8(4),
+                B(Abort), U8(15),
+  /*   25 S> */ B(CallProperty0), R(5), R(4), U8(7),
+                B(Star), R(6),
+  /*   25 E> */ B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(6), U8(1),
                 B(ToBooleanLogicalNot),
                 B(JumpIfFalse), U8(7),
-                B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(5), U8(1),
-                B(LdaNamedProperty), R(5), U8(8), U8(9),
-                B(JumpIfToBooleanTrue), U8(74),
-                B(LdaNamedProperty), R(5), U8(9), U8(11),
-                B(Star), R(7),
+                B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(6), U8(1),
+                B(LdaNamedProperty), R(6), U8(8), U8(9),
+                B(JumpIfToBooleanTrue), U8(67),
+                B(LdaNamedProperty), R(6), U8(9), U8(11),
+                B(Star), R(8),
                 B(LdaSmi), I8(2),
-                B(Star), R(6),
-                B(Mov), R(7), R(3),
+                B(Star), R(7),
+                B(Mov), R(8), R(3),
   /*   16 E> */ B(StackCheck),
                 B(Mov), R(3), R(0),
   /*   36 S> */ B(LdaFalse),
-                B(Star), R(16),
-                B(Mov), R(0), R(15),
-                B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(15), U8(2),
-                B(SuspendGenerator), R(2), R(0), U8(15), U8(1),
+                B(Star), R(17),
+                B(Mov), R(0), R(16),
+                B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(16), U8(2),
+                B(SuspendGenerator), R(2), R(0), U8(16), U8(1),
   /*   44 S> */ B(Return),
-                B(RestoreGeneratorRegisters), R(2), R(0), U8(15),
-                B(LdaSmi), I8(-2),
-                B(Star), R(10),
-                B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(2), U8(1),
-                B(Star), R(15),
+                B(ResumeGenerator), R(2), R(11), R(0), U8(16),
+                B(Star), R(16),
                 B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(2), U8(1),
                 B(SwitchOnSmiNoFeedback), U8(10), U8(2), I8(0),
-                B(Ldar), R(15),
+                B(Ldar), R(16),
   /*   36 E> */ B(Throw),
                 B(LdaZero),
-                B(Star), R(11),
-                B(Mov), R(15), R(12),
+                B(Star), R(12),
+                B(Mov), R(16), R(13),
                 B(Jump), U8(58),
                 B(LdaZero),
-                B(Star), R(6),
-                B(JumpLoop), U8(113), I8(0),
+                B(Star), R(7),
+                B(JumpLoop), U8(100), I8(0),
                 B(Jump), U8(36),
-                B(Star), R(15),
+                B(Star), R(16),
                 B(Ldar), R(closure),
-                B(CreateCatchContext), R(15), U8(12), U8(13),
-                B(PushContext), R(15),
-                B(Star), R(14),
+                B(CreateCatchContext), R(16), U8(12), U8(13),
+                B(PushContext), R(16),
+                B(Star), R(15),
                 B(LdaSmi), I8(2),
-                B(TestEqualStrict), R(6), U8(13),
+                B(TestEqualStrict), R(7), U8(13),
                 B(JumpIfFalse), U8(6),
                 B(LdaSmi), I8(1),
-                B(Star), R(6),
+                B(Star), R(7),
                 B(LdaImmutableCurrentContextSlot), U8(4),
-                B(Star), R(16),
-                B(CallRuntime), U16(Runtime::kReThrow), R(16), U8(1),
-                B(PopContext), R(15),
+                B(Star), R(17),
+                B(CallRuntime), U16(Runtime::kReThrow), R(17), U8(1),
+                B(PopContext), R(16),
                 B(LdaSmi), I8(-1),
+                B(Star), R(13),
                 B(Star), R(12),
-                B(Star), R(11),
                 B(Jump), U8(8),
-                B(Star), R(12),
+                B(Star), R(13),
                 B(LdaSmi), I8(1),
-                B(Star), R(11),
+                B(Star), R(12),
                 B(LdaTheHole),
                 B(SetPendingMessage),
-                B(Star), R(13),
+                B(Star), R(14),
                 B(LdaZero),
-                B(TestEqualStrict), R(6), U8(14),
-                B(JumpIfTrue), U8(104),
+                B(TestEqualStrict), R(7), U8(14),
+                B(JumpIfTrue), U8(90),
                 B(LdaNamedProperty), R(4), U8(14), U8(15),
-                B(Star), R(8),
+                B(Star), R(9),
                 B(TestUndetectable),
                 B(JumpIfFalse), U8(4),
-                B(Jump), U8(93),
+                B(Jump), U8(79),
                 B(LdaSmi), I8(1),
-                B(TestEqualStrict), R(6), U8(18),
-                B(JumpIfFalse), U8(61),
-                B(Ldar), R(8),
-                B(TestTypeOf), U8(5),
+                B(TestEqualStrict), R(7), U8(17),
+                B(JumpIfFalse), U8(47),
+                B(Ldar), R(9),
+                B(TestTypeOf), U8(6),
                 B(JumpIfFalse), U8(4),
                 B(Jump), U8(18),
-                B(Wide), B(LdaSmi), I16(136),
-                B(Star), R(14),
+                B(Wide), B(LdaSmi), I16(144),
+                B(Star), R(15),
                 B(LdaConstant), U8(15),
-                B(Star), R(15),
-                B(CallRuntime), U16(Runtime::kNewTypeError), R(14), U8(2),
+                B(Star), R(16),
+                B(CallRuntime), U16(Runtime::kNewTypeError), R(15), U8(2),
                 B(Throw),
-                B(Mov), R(context), R(14),
-                B(Mov), R(8), R(15),
-                B(Mov), R(4), R(16),
-                B(InvokeIntrinsic), U8(Runtime::k_Call), R(15), U8(2),
-                B(Jump), U8(20),
-                B(Star), R(15),
-                B(Ldar), R(closure),
-                B(CreateCatchContext), R(15), U8(12), U8(16),
-                B(Star), R(14),
+                B(Mov), R(context), R(15),
+                B(Mov), R(9), R(16),
+                B(Mov), R(4), R(17),
+                B(InvokeIntrinsic), U8(Runtime::k_Call), R(16), U8(2),
+                B(Jump), U8(6),
                 B(LdaTheHole),
                 B(SetPendingMessage),
-                B(Ldar), R(14),
-                B(PushContext), R(15),
-                B(PopContext), R(15),
+                B(Ldar), R(15),
                 B(Jump), U8(27),
-                B(Mov), R(8), R(14),
-                B(Mov), R(4), R(15),
-                B(InvokeIntrinsic), U8(Runtime::k_Call), R(14), U8(2),
-                B(Star), R(9),
-                B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(9), U8(1),
+                B(Mov), R(9), R(15),
+                B(Mov), R(4), R(16),
+                B(InvokeIntrinsic), U8(Runtime::k_Call), R(15), U8(2),
+                B(Star), R(10),
+                B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(10), U8(1),
                 B(JumpIfToBooleanFalse), U8(4),
                 B(Jump), U8(7),
-                B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(9), U8(1),
-                B(Ldar), R(13),
+                B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(10), U8(1),
+                B(Ldar), R(14),
                 B(SetPendingMessage),
-                B(Ldar), R(11),
-                B(SwitchOnSmiNoFeedback), U8(17), U8(2), I8(0),
+                B(Ldar), R(12),
+                B(SwitchOnSmiNoFeedback), U8(16), U8(2), I8(0),
                 B(Jump), U8(8),
-                B(Ldar), R(12),
+                B(Ldar), R(13),
   /*   44 S> */ B(Return),
-                B(Ldar), R(12),
+                B(Ldar), R(13),
                 B(ReThrow),
                 B(LdaUndefined),
   /*   44 S> */ B(Return),
 ]
 constant pool: [
   Smi [29],
-  Smi [91],
+  Smi [90],
   Smi [10],
   Smi [7],
   TUPLE2_TYPE,
   SYMBOL_TYPE,
-  Smi [75],
   ONE_BYTE_INTERNALIZED_STRING_TYPE ["next"],
+  Smi [69],
   ONE_BYTE_INTERNALIZED_STRING_TYPE ["done"],
   ONE_BYTE_INTERNALIZED_STRING_TYPE ["value"],
   Smi [15],
@@ -315,14 +294,13 @@
   FIXED_ARRAY_TYPE,
   ONE_BYTE_INTERNALIZED_STRING_TYPE ["return"],
   ONE_BYTE_INTERNALIZED_STRING_TYPE [""],
-  FIXED_ARRAY_TYPE,
   Smi [6],
   Smi [9],
 ]
 handlers: [
-  [77, 257, 265],
-  [80, 221, 223],
-  [326, 336, 338],
+  [70, 243, 251],
+  [73, 207, 209],
+  [312, 322, 324],
 ]
 
 ---
@@ -331,9 +309,9 @@
   function* f() { yield* g() }
   f();
 "
-frame size: 9
+frame size: 10
 parameter count: 1
-bytecode array length: 265
+bytecode array length: 255
 bytecodes: [
                 B(Ldar), R(0),
                 B(JumpIfUndefined), U8(18),
@@ -342,7 +320,7 @@
                 B(RestoreGeneratorState), R(0),
                 B(Star), R(1),
                 B(SwitchOnSmiNoFeedback), U8(0), U8(2), I8(0),
-                B(Abort), U8(45),
+                B(Abort), U8(15),
                 B(LdaSmi), I8(-2),
                 B(Star), R(1),
                 B(Mov), R(closure), R(2),
@@ -352,10 +330,7 @@
   /*   38 E> */ B(StackCheck),
   /*   38 E> */ B(SuspendGenerator), R(0), R(0), U8(2), U8(0),
   /*   54 S> */ B(Return),
-                B(RestoreGeneratorRegisters), R(0), R(0), U8(2),
-                B(LdaSmi), I8(-2),
-                B(Star), R(1),
-                B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(0), U8(1),
+                B(ResumeGenerator), R(0), R(1), R(0), U8(2),
                 B(Star), R(2),
                 B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
                 B(SwitchOnSmiNoFeedback), U8(2), U8(2), I8(0),
@@ -363,71 +338,70 @@
   /*   38 E> */ B(Throw),
                 B(Ldar), R(2),
   /*   54 S> */ B(Return),
-  /*   43 S> */ B(LdaGlobal), U8(4), U8(2),
-                B(Star), R(8),
-  /*   50 E> */ B(CallUndefinedReceiver0), R(8), U8(0),
-                B(Star), R(6),
-                B(LdaNamedProperty), R(6), U8(5), U8(4),
+  /*   43 S> */ B(LdaGlobal), U8(4), U8(0),
+                B(Star), R(9),
+  /*   50 E> */ B(CallUndefinedReceiver0), R(9), U8(2),
                 B(Star), R(7),
-                B(CallProperty0), R(7), R(6), U8(16),
+                B(LdaNamedProperty), R(7), U8(5), U8(4),
+                B(Star), R(8),
+                B(CallProperty0), R(8), R(7), U8(6),
                 B(JumpIfJSReceiver), U8(7),
                 B(CallRuntime), U16(Runtime::kThrowSymbolIteratorInvalid), R(0), U8(0),
                 B(Star), R(4),
+                B(LdaNamedProperty), R(4), U8(6), U8(8),
+                B(Star), R(6),
                 B(LdaUndefined),
                 B(Star), R(5),
                 B(LdaZero),
                 B(Star), R(3),
                 B(Ldar), R(1),
-                B(SwitchOnSmiNoFeedback), U8(6), U8(1), I8(1),
+                B(SwitchOnSmiNoFeedback), U8(7), U8(1), I8(1),
                 B(LdaSmi), I8(-2),
                 B(TestEqualStrictNoFeedback), R(1),
                 B(JumpIfTrue), U8(4),
-                B(Abort), U8(45),
+                B(Abort), U8(15),
                 B(Ldar), R(3),
-                B(SwitchOnSmiNoFeedback), U8(7), U8(2), I8(1),
-                B(LdaNamedProperty), R(4), U8(9), U8(8),
-                B(Star), R(8),
-                B(CallProperty1), R(8), R(4), R(5), U8(22),
-                B(Jump), U8(65),
-                B(LdaNamedProperty), R(4), U8(10), U8(6),
+                B(SwitchOnSmiNoFeedback), U8(8), U8(2), I8(1),
+                B(CallProperty1), R(6), R(4), R(5), U8(10),
+                B(Jump), U8(69),
+                B(LdaNamedProperty), R(4), U8(10), U8(12),
                 B(JumpIfUndefined), U8(13),
                 B(JumpIfNull), U8(11),
-                B(Star), R(8),
-                B(CallProperty1), R(8), R(4), R(5), U8(18),
-                B(Jump), U8(48),
+                B(Star), R(9),
+                B(CallProperty1), R(9), R(4), R(5), U8(14),
+                B(Jump), U8(52),
                 B(Ldar), R(5),
   /*   54 S> */ B(Return),
-                B(LdaNamedProperty), R(4), U8(11), U8(10),
+                B(LdaNamedProperty), R(4), U8(11), U8(16),
                 B(JumpIfUndefined), U8(13),
                 B(JumpIfNull), U8(11),
-                B(Star), R(8),
-                B(CallProperty1), R(8), R(4), R(5), U8(24),
-                B(Jump), U8(28),
-                B(LdaNamedProperty), R(4), U8(10), U8(6),
-                B(Star), R(8),
-                B(JumpIfUndefined), U8(15),
-                B(JumpIfNull), U8(13),
-                B(CallProperty0), R(8), R(4), U8(20),
-                B(JumpIfJSReceiver), U8(7),
-                B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(2), U8(1),
+                B(Star), R(9),
+                B(CallProperty1), R(9), R(4), R(5), U8(18),
+                B(Jump), U8(32),
+                B(LdaNamedProperty), R(4), U8(10), U8(20),
+                B(JumpIfUndefined), U8(21),
+                B(JumpIfNull), U8(19),
+                B(Star), R(9),
+                B(CallProperty0), R(9), R(4), U8(22),
+                B(Jump), U8(2),
+                B(JumpIfJSReceiver), U8(9),
+                B(Star), R(9),
+                B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(9), U8(1),
                 B(CallRuntime), U16(Runtime::kThrowThrowMethodMissing), R(0), U8(0),
                 B(Star), R(2),
                 B(JumpIfJSReceiver), U8(7),
                 B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(2), U8(1),
-                B(LdaNamedProperty), R(2), U8(12), U8(12),
-                B(JumpIfToBooleanTrue), U8(33),
+                B(LdaNamedProperty), R(2), U8(12), U8(24),
+                B(JumpIfToBooleanTrue), U8(26),
                 B(Ldar), R(2),
-                B(SuspendGenerator), R(0), R(0), U8(8), U8(1),
+                B(SuspendGenerator), R(0), R(0), U8(9), U8(1),
   /*   54 S> */ B(Return),
-                B(RestoreGeneratorRegisters), R(0), R(0), U8(8),
-                B(LdaSmi), I8(-2),
-                B(Star), R(1),
-                B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(0), U8(1),
+                B(ResumeGenerator), R(0), R(1), R(0), U8(9),
                 B(Star), R(5),
                 B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
                 B(Star), R(3),
-                B(JumpLoop), U8(139), I8(0),
-                B(LdaNamedProperty), R(2), U8(13), U8(14),
+                B(JumpLoop), U8(130), I8(0),
+                B(LdaNamedProperty), R(2), U8(13), U8(26),
                 B(Star), R(4),
                 B(LdaSmi), I8(1),
                 B(TestEqualStrictNoFeedback), R(3),
@@ -439,15 +413,15 @@
 ]
 constant pool: [
   Smi [29],
-  Smi [92],
+  Smi [91],
   Smi [10],
   Smi [7],
   ONE_BYTE_INTERNALIZED_STRING_TYPE ["g"],
   SYMBOL_TYPE,
-  Smi [117],
-  Smi [17],
-  Smi [37],
   ONE_BYTE_INTERNALIZED_STRING_TYPE ["next"],
+  Smi [115],
+  Smi [11],
+  Smi [31],
   ONE_BYTE_INTERNALIZED_STRING_TYPE ["return"],
   ONE_BYTE_INTERNALIZED_STRING_TYPE ["throw"],
   ONE_BYTE_INTERNALIZED_STRING_TYPE ["done"],
diff --git a/src/v8/test/cctest/interpreter/bytecode_expectations/GlobalCompoundExpressions.golden b/src/v8/test/cctest/interpreter/bytecode_expectations/GlobalCompoundExpressions.golden
index 53ae78a..b24e5d0 100644
--- a/src/v8/test/cctest/interpreter/bytecode_expectations/GlobalCompoundExpressions.golden
+++ b/src/v8/test/cctest/interpreter/bytecode_expectations/GlobalCompoundExpressions.golden
@@ -19,7 +19,7 @@
   /*   26 E> */ B(StackCheck),
   /*   31 S> */ B(LdaGlobal), U8(0), U8(0),
                 B(BitwiseAndSmi), I8(1), U8(2),
-  /*   45 E> */ B(StaGlobalSloppy), U8(0), U8(3),
+  /*   45 E> */ B(StaGlobal), U8(0), U8(3),
   /*   50 S> */ B(Return),
 ]
 constant pool: [
@@ -41,7 +41,7 @@
   /*   27 E> */ B(StackCheck),
   /*   32 S> */ B(LdaGlobal), U8(0), U8(0),
                 B(AddSmi), I8(1), U8(2),
-  /*   51 E> */ B(StaGlobalSloppy), U8(0), U8(3),
+  /*   51 E> */ B(StaGlobal), U8(0), U8(3),
   /*   56 S> */ B(Return),
 ]
 constant pool: [
diff --git a/src/v8/test/cctest/interpreter/bytecode_expectations/GlobalCountOperators.golden b/src/v8/test/cctest/interpreter/bytecode_expectations/GlobalCountOperators.golden
index 2e0b987..f0479d5 100644
--- a/src/v8/test/cctest/interpreter/bytecode_expectations/GlobalCountOperators.golden
+++ b/src/v8/test/cctest/interpreter/bytecode_expectations/GlobalCountOperators.golden
@@ -18,8 +18,8 @@
 bytecodes: [
   /*   26 E> */ B(StackCheck),
   /*   31 S> */ B(LdaGlobal), U8(0), U8(0),
-                B(Inc), U8(4),
-  /*   40 E> */ B(StaGlobalSloppy), U8(0), U8(2),
+                B(Inc), U8(2),
+  /*   40 E> */ B(StaGlobal), U8(0), U8(3),
   /*   47 S> */ B(Return),
 ]
 constant pool: [
@@ -40,10 +40,10 @@
 bytecodes: [
   /*   26 E> */ B(StackCheck),
   /*   31 S> */ B(LdaGlobal), U8(0), U8(0),
-                B(ToNumber), U8(4),
+                B(ToNumeric), U8(2),
                 B(Star), R(0),
-                B(Dec), U8(4),
-  /*   44 E> */ B(StaGlobalSloppy), U8(0), U8(2),
+                B(Dec), U8(2),
+  /*   44 E> */ B(StaGlobal), U8(0), U8(3),
                 B(Ldar), R(0),
   /*   47 S> */ B(Return),
 ]
@@ -65,8 +65,8 @@
 bytecodes: [
   /*   27 E> */ B(StackCheck),
   /*   46 S> */ B(LdaGlobal), U8(0), U8(0),
-                B(Dec), U8(4),
-  /*   55 E> */ B(StaGlobalStrict), U8(0), U8(2),
+                B(Dec), U8(2),
+  /*   55 E> */ B(StaGlobal), U8(0), U8(3),
   /*   67 S> */ B(Return),
 ]
 constant pool: [
@@ -87,10 +87,10 @@
 bytecodes: [
   /*   27 E> */ B(StackCheck),
   /*   32 S> */ B(LdaGlobal), U8(0), U8(0),
-                B(ToNumber), U8(4),
+                B(ToNumeric), U8(2),
                 B(Star), R(0),
-                B(Inc), U8(4),
-  /*   50 E> */ B(StaGlobalSloppy), U8(0), U8(2),
+                B(Inc), U8(2),
+  /*   50 E> */ B(StaGlobal), U8(0), U8(3),
                 B(Ldar), R(0),
   /*   53 S> */ B(Return),
 ]
diff --git a/src/v8/test/cctest/interpreter/bytecode_expectations/HeapNumberConstants.golden b/src/v8/test/cctest/interpreter/bytecode_expectations/HeapNumberConstants.golden
index 5ffe8ca..d6b6bb6 100644
--- a/src/v8/test/cctest/interpreter/bytecode_expectations/HeapNumberConstants.golden
+++ b/src/v8/test/cctest/interpreter/bytecode_expectations/HeapNumberConstants.golden
@@ -55,1056 +55,11 @@
   /*   30 E> */ B(StackCheck),
   /*   42 S> */ B(LdaConstant), U8(0),
                 B(Star), R(0),
-  /*   48 S> */ B(LdaConstant), U8(1),
+  /*   48 S> */ B(LdaConstant), U8(0),
   /*   60 S> */ B(Return),
 ]
 constant pool: [
   HEAP_NUMBER_TYPE [3.14],
-  HEAP_NUMBER_TYPE [3.14],
-]
-handlers: [
-]
-
----
-snippet: "
-  var a;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414;
-  a = 1.414; a = 3.14;
-"
-frame size: 1
-parameter count: 1
-bytecode array length: 1033
-bytecodes: [
-  /*   30 E> */ B(StackCheck),
-  /*   41 S> */ B(LdaConstant), U8(0),
-                B(Star), R(0),
-  /*   52 S> */ B(LdaConstant), U8(1),
-                B(Star), R(0),
-  /*   63 S> */ B(LdaConstant), U8(2),
-                B(Star), R(0),
-  /*   74 S> */ B(LdaConstant), U8(3),
-                B(Star), R(0),
-  /*   85 S> */ B(LdaConstant), U8(4),
-                B(Star), R(0),
-  /*   96 S> */ B(LdaConstant), U8(5),
-                B(Star), R(0),
-  /*  107 S> */ B(LdaConstant), U8(6),
-                B(Star), R(0),
-  /*  118 S> */ B(LdaConstant), U8(7),
-                B(Star), R(0),
-  /*  129 S> */ B(LdaConstant), U8(8),
-                B(Star), R(0),
-  /*  140 S> */ B(LdaConstant), U8(9),
-                B(Star), R(0),
-  /*  151 S> */ B(LdaConstant), U8(10),
-                B(Star), R(0),
-  /*  162 S> */ B(LdaConstant), U8(11),
-                B(Star), R(0),
-  /*  173 S> */ B(LdaConstant), U8(12),
-                B(Star), R(0),
-  /*  184 S> */ B(LdaConstant), U8(13),
-                B(Star), R(0),
-  /*  195 S> */ B(LdaConstant), U8(14),
-                B(Star), R(0),
-  /*  206 S> */ B(LdaConstant), U8(15),
-                B(Star), R(0),
-  /*  217 S> */ B(LdaConstant), U8(16),
-                B(Star), R(0),
-  /*  228 S> */ B(LdaConstant), U8(17),
-                B(Star), R(0),
-  /*  239 S> */ B(LdaConstant), U8(18),
-                B(Star), R(0),
-  /*  250 S> */ B(LdaConstant), U8(19),
-                B(Star), R(0),
-  /*  261 S> */ B(LdaConstant), U8(20),
-                B(Star), R(0),
-  /*  272 S> */ B(LdaConstant), U8(21),
-                B(Star), R(0),
-  /*  283 S> */ B(LdaConstant), U8(22),
-                B(Star), R(0),
-  /*  294 S> */ B(LdaConstant), U8(23),
-                B(Star), R(0),
-  /*  305 S> */ B(LdaConstant), U8(24),
-                B(Star), R(0),
-  /*  316 S> */ B(LdaConstant), U8(25),
-                B(Star), R(0),
-  /*  327 S> */ B(LdaConstant), U8(26),
-                B(Star), R(0),
-  /*  338 S> */ B(LdaConstant), U8(27),
-                B(Star), R(0),
-  /*  349 S> */ B(LdaConstant), U8(28),
-                B(Star), R(0),
-  /*  360 S> */ B(LdaConstant), U8(29),
-                B(Star), R(0),
-  /*  371 S> */ B(LdaConstant), U8(30),
-                B(Star), R(0),
-  /*  382 S> */ B(LdaConstant), U8(31),
-                B(Star), R(0),
-  /*  393 S> */ B(LdaConstant), U8(32),
-                B(Star), R(0),
-  /*  404 S> */ B(LdaConstant), U8(33),
-                B(Star), R(0),
-  /*  415 S> */ B(LdaConstant), U8(34),
-                B(Star), R(0),
-  /*  426 S> */ B(LdaConstant), U8(35),
-                B(Star), R(0),
-  /*  437 S> */ B(LdaConstant), U8(36),
-                B(Star), R(0),
-  /*  448 S> */ B(LdaConstant), U8(37),
-                B(Star), R(0),
-  /*  459 S> */ B(LdaConstant), U8(38),
-                B(Star), R(0),
-  /*  470 S> */ B(LdaConstant), U8(39),
-                B(Star), R(0),
-  /*  481 S> */ B(LdaConstant), U8(40),
-                B(Star), R(0),
-  /*  492 S> */ B(LdaConstant), U8(41),
-                B(Star), R(0),
-  /*  503 S> */ B(LdaConstant), U8(42),
-                B(Star), R(0),
-  /*  514 S> */ B(LdaConstant), U8(43),
-                B(Star), R(0),
-  /*  525 S> */ B(LdaConstant), U8(44),
-                B(Star), R(0),
-  /*  536 S> */ B(LdaConstant), U8(45),
-                B(Star), R(0),
-  /*  547 S> */ B(LdaConstant), U8(46),
-                B(Star), R(0),
-  /*  558 S> */ B(LdaConstant), U8(47),
-                B(Star), R(0),
-  /*  569 S> */ B(LdaConstant), U8(48),
-                B(Star), R(0),
-  /*  580 S> */ B(LdaConstant), U8(49),
-                B(Star), R(0),
-  /*  591 S> */ B(LdaConstant), U8(50),
-                B(Star), R(0),
-  /*  602 S> */ B(LdaConstant), U8(51),
-                B(Star), R(0),
-  /*  613 S> */ B(LdaConstant), U8(52),
-                B(Star), R(0),
-  /*  624 S> */ B(LdaConstant), U8(53),
-                B(Star), R(0),
-  /*  635 S> */ B(LdaConstant), U8(54),
-                B(Star), R(0),
-  /*  646 S> */ B(LdaConstant), U8(55),
-                B(Star), R(0),
-  /*  657 S> */ B(LdaConstant), U8(56),
-                B(Star), R(0),
-  /*  668 S> */ B(LdaConstant), U8(57),
-                B(Star), R(0),
-  /*  679 S> */ B(LdaConstant), U8(58),
-                B(Star), R(0),
-  /*  690 S> */ B(LdaConstant), U8(59),
-                B(Star), R(0),
-  /*  701 S> */ B(LdaConstant), U8(60),
-                B(Star), R(0),
-  /*  712 S> */ B(LdaConstant), U8(61),
-                B(Star), R(0),
-  /*  723 S> */ B(LdaConstant), U8(62),
-                B(Star), R(0),
-  /*  734 S> */ B(LdaConstant), U8(63),
-                B(Star), R(0),
-  /*  745 S> */ B(LdaConstant), U8(64),
-                B(Star), R(0),
-  /*  756 S> */ B(LdaConstant), U8(65),
-                B(Star), R(0),
-  /*  767 S> */ B(LdaConstant), U8(66),
-                B(Star), R(0),
-  /*  778 S> */ B(LdaConstant), U8(67),
-                B(Star), R(0),
-  /*  789 S> */ B(LdaConstant), U8(68),
-                B(Star), R(0),
-  /*  800 S> */ B(LdaConstant), U8(69),
-                B(Star), R(0),
-  /*  811 S> */ B(LdaConstant), U8(70),
-                B(Star), R(0),
-  /*  822 S> */ B(LdaConstant), U8(71),
-                B(Star), R(0),
-  /*  833 S> */ B(LdaConstant), U8(72),
-                B(Star), R(0),
-  /*  844 S> */ B(LdaConstant), U8(73),
-                B(Star), R(0),
-  /*  855 S> */ B(LdaConstant), U8(74),
-                B(Star), R(0),
-  /*  866 S> */ B(LdaConstant), U8(75),
-                B(Star), R(0),
-  /*  877 S> */ B(LdaConstant), U8(76),
-                B(Star), R(0),
-  /*  888 S> */ B(LdaConstant), U8(77),
-                B(Star), R(0),
-  /*  899 S> */ B(LdaConstant), U8(78),
-                B(Star), R(0),
-  /*  910 S> */ B(LdaConstant), U8(79),
-                B(Star), R(0),
-  /*  921 S> */ B(LdaConstant), U8(80),
-                B(Star), R(0),
-  /*  932 S> */ B(LdaConstant), U8(81),
-                B(Star), R(0),
-  /*  943 S> */ B(LdaConstant), U8(82),
-                B(Star), R(0),
-  /*  954 S> */ B(LdaConstant), U8(83),
-                B(Star), R(0),
-  /*  965 S> */ B(LdaConstant), U8(84),
-                B(Star), R(0),
-  /*  976 S> */ B(LdaConstant), U8(85),
-                B(Star), R(0),
-  /*  987 S> */ B(LdaConstant), U8(86),
-                B(Star), R(0),
-  /*  998 S> */ B(LdaConstant), U8(87),
-                B(Star), R(0),
-  /* 1009 S> */ B(LdaConstant), U8(88),
-                B(Star), R(0),
-  /* 1020 S> */ B(LdaConstant), U8(89),
-                B(Star), R(0),
-  /* 1031 S> */ B(LdaConstant), U8(90),
-                B(Star), R(0),
-  /* 1042 S> */ B(LdaConstant), U8(91),
-                B(Star), R(0),
-  /* 1053 S> */ B(LdaConstant), U8(92),
-                B(Star), R(0),
-  /* 1064 S> */ B(LdaConstant), U8(93),
-                B(Star), R(0),
-  /* 1075 S> */ B(LdaConstant), U8(94),
-                B(Star), R(0),
-  /* 1086 S> */ B(LdaConstant), U8(95),
-                B(Star), R(0),
-  /* 1097 S> */ B(LdaConstant), U8(96),
-                B(Star), R(0),
-  /* 1108 S> */ B(LdaConstant), U8(97),
-                B(Star), R(0),
-  /* 1119 S> */ B(LdaConstant), U8(98),
-                B(Star), R(0),
-  /* 1130 S> */ B(LdaConstant), U8(99),
-                B(Star), R(0),
-  /* 1141 S> */ B(LdaConstant), U8(100),
-                B(Star), R(0),
-  /* 1152 S> */ B(LdaConstant), U8(101),
-                B(Star), R(0),
-  /* 1163 S> */ B(LdaConstant), U8(102),
-                B(Star), R(0),
-  /* 1174 S> */ B(LdaConstant), U8(103),
-                B(Star), R(0),
-  /* 1185 S> */ B(LdaConstant), U8(104),
-                B(Star), R(0),
-  /* 1196 S> */ B(LdaConstant), U8(105),
-                B(Star), R(0),
-  /* 1207 S> */ B(LdaConstant), U8(106),
-                B(Star), R(0),
-  /* 1218 S> */ B(LdaConstant), U8(107),
-                B(Star), R(0),
-  /* 1229 S> */ B(LdaConstant), U8(108),
-                B(Star), R(0),
-  /* 1240 S> */ B(LdaConstant), U8(109),
-                B(Star), R(0),
-  /* 1251 S> */ B(LdaConstant), U8(110),
-                B(Star), R(0),
-  /* 1262 S> */ B(LdaConstant), U8(111),
-                B(Star), R(0),
-  /* 1273 S> */ B(LdaConstant), U8(112),
-                B(Star), R(0),
-  /* 1284 S> */ B(LdaConstant), U8(113),
-                B(Star), R(0),
-  /* 1295 S> */ B(LdaConstant), U8(114),
-                B(Star), R(0),
-  /* 1306 S> */ B(LdaConstant), U8(115),
-                B(Star), R(0),
-  /* 1317 S> */ B(LdaConstant), U8(116),
-                B(Star), R(0),
-  /* 1328 S> */ B(LdaConstant), U8(117),
-                B(Star), R(0),
-  /* 1339 S> */ B(LdaConstant), U8(118),
-                B(Star), R(0),
-  /* 1350 S> */ B(LdaConstant), U8(119),
-                B(Star), R(0),
-  /* 1361 S> */ B(LdaConstant), U8(120),
-                B(Star), R(0),
-  /* 1372 S> */ B(LdaConstant), U8(121),
-                B(Star), R(0),
-  /* 1383 S> */ B(LdaConstant), U8(122),
-                B(Star), R(0),
-  /* 1394 S> */ B(LdaConstant), U8(123),
-                B(Star), R(0),
-  /* 1405 S> */ B(LdaConstant), U8(124),
-                B(Star), R(0),
-  /* 1416 S> */ B(LdaConstant), U8(125),
-                B(Star), R(0),
-  /* 1427 S> */ B(LdaConstant), U8(126),
-                B(Star), R(0),
-  /* 1438 S> */ B(LdaConstant), U8(127),
-                B(Star), R(0),
-  /* 1449 S> */ B(LdaConstant), U8(128),
-                B(Star), R(0),
-  /* 1460 S> */ B(LdaConstant), U8(129),
-                B(Star), R(0),
-  /* 1471 S> */ B(LdaConstant), U8(130),
-                B(Star), R(0),
-  /* 1482 S> */ B(LdaConstant), U8(131),
-                B(Star), R(0),
-  /* 1493 S> */ B(LdaConstant), U8(132),
-                B(Star), R(0),
-  /* 1504 S> */ B(LdaConstant), U8(133),
-                B(Star), R(0),
-  /* 1515 S> */ B(LdaConstant), U8(134),
-                B(Star), R(0),
-  /* 1526 S> */ B(LdaConstant), U8(135),
-                B(Star), R(0),
-  /* 1537 S> */ B(LdaConstant), U8(136),
-                B(Star), R(0),
-  /* 1548 S> */ B(LdaConstant), U8(137),
-                B(Star), R(0),
-  /* 1559 S> */ B(LdaConstant), U8(138),
-                B(Star), R(0),
-  /* 1570 S> */ B(LdaConstant), U8(139),
-                B(Star), R(0),
-  /* 1581 S> */ B(LdaConstant), U8(140),
-                B(Star), R(0),
-  /* 1592 S> */ B(LdaConstant), U8(141),
-                B(Star), R(0),
-  /* 1603 S> */ B(LdaConstant), U8(142),
-                B(Star), R(0),
-  /* 1614 S> */ B(LdaConstant), U8(143),
-                B(Star), R(0),
-  /* 1625 S> */ B(LdaConstant), U8(144),
-                B(Star), R(0),
-  /* 1636 S> */ B(LdaConstant), U8(145),
-                B(Star), R(0),
-  /* 1647 S> */ B(LdaConstant), U8(146),
-                B(Star), R(0),
-  /* 1658 S> */ B(LdaConstant), U8(147),
-                B(Star), R(0),
-  /* 1669 S> */ B(LdaConstant), U8(148),
-                B(Star), R(0),
-  /* 1680 S> */ B(LdaConstant), U8(149),
-                B(Star), R(0),
-  /* 1691 S> */ B(LdaConstant), U8(150),
-                B(Star), R(0),
-  /* 1702 S> */ B(LdaConstant), U8(151),
-                B(Star), R(0),
-  /* 1713 S> */ B(LdaConstant), U8(152),
-                B(Star), R(0),
-  /* 1724 S> */ B(LdaConstant), U8(153),
-                B(Star), R(0),
-  /* 1735 S> */ B(LdaConstant), U8(154),
-                B(Star), R(0),
-  /* 1746 S> */ B(LdaConstant), U8(155),
-                B(Star), R(0),
-  /* 1757 S> */ B(LdaConstant), U8(156),
-                B(Star), R(0),
-  /* 1768 S> */ B(LdaConstant), U8(157),
-                B(Star), R(0),
-  /* 1779 S> */ B(LdaConstant), U8(158),
-                B(Star), R(0),
-  /* 1790 S> */ B(LdaConstant), U8(159),
-                B(Star), R(0),
-  /* 1801 S> */ B(LdaConstant), U8(160),
-                B(Star), R(0),
-  /* 1812 S> */ B(LdaConstant), U8(161),
-                B(Star), R(0),
-  /* 1823 S> */ B(LdaConstant), U8(162),
-                B(Star), R(0),
-  /* 1834 S> */ B(LdaConstant), U8(163),
-                B(Star), R(0),
-  /* 1845 S> */ B(LdaConstant), U8(164),
-                B(Star), R(0),
-  /* 1856 S> */ B(LdaConstant), U8(165),
-                B(Star), R(0),
-  /* 1867 S> */ B(LdaConstant), U8(166),
-                B(Star), R(0),
-  /* 1878 S> */ B(LdaConstant), U8(167),
-                B(Star), R(0),
-  /* 1889 S> */ B(LdaConstant), U8(168),
-                B(Star), R(0),
-  /* 1900 S> */ B(LdaConstant), U8(169),
-                B(Star), R(0),
-  /* 1911 S> */ B(LdaConstant), U8(170),
-                B(Star), R(0),
-  /* 1922 S> */ B(LdaConstant), U8(171),
-                B(Star), R(0),
-  /* 1933 S> */ B(LdaConstant), U8(172),
-                B(Star), R(0),
-  /* 1944 S> */ B(LdaConstant), U8(173),
-                B(Star), R(0),
-  /* 1955 S> */ B(LdaConstant), U8(174),
-                B(Star), R(0),
-  /* 1966 S> */ B(LdaConstant), U8(175),
-                B(Star), R(0),
-  /* 1977 S> */ B(LdaConstant), U8(176),
-                B(Star), R(0),
-  /* 1988 S> */ B(LdaConstant), U8(177),
-                B(Star), R(0),
-  /* 1999 S> */ B(LdaConstant), U8(178),
-                B(Star), R(0),
-  /* 2010 S> */ B(LdaConstant), U8(179),
-                B(Star), R(0),
-  /* 2021 S> */ B(LdaConstant), U8(180),
-                B(Star), R(0),
-  /* 2032 S> */ B(LdaConstant), U8(181),
-                B(Star), R(0),
-  /* 2043 S> */ B(LdaConstant), U8(182),
-                B(Star), R(0),
-  /* 2054 S> */ B(LdaConstant), U8(183),
-                B(Star), R(0),
-  /* 2065 S> */ B(LdaConstant), U8(184),
-                B(Star), R(0),
-  /* 2076 S> */ B(LdaConstant), U8(185),
-                B(Star), R(0),
-  /* 2087 S> */ B(LdaConstant), U8(186),
-                B(Star), R(0),
-  /* 2098 S> */ B(LdaConstant), U8(187),
-                B(Star), R(0),
-  /* 2109 S> */ B(LdaConstant), U8(188),
-                B(Star), R(0),
-  /* 2120 S> */ B(LdaConstant), U8(189),
-                B(Star), R(0),
-  /* 2131 S> */ B(LdaConstant), U8(190),
-                B(Star), R(0),
-  /* 2142 S> */ B(LdaConstant), U8(191),
-                B(Star), R(0),
-  /* 2153 S> */ B(LdaConstant), U8(192),
-                B(Star), R(0),
-  /* 2164 S> */ B(LdaConstant), U8(193),
-                B(Star), R(0),
-  /* 2175 S> */ B(LdaConstant), U8(194),
-                B(Star), R(0),
-  /* 2186 S> */ B(LdaConstant), U8(195),
-                B(Star), R(0),
-  /* 2197 S> */ B(LdaConstant), U8(196),
-                B(Star), R(0),
-  /* 2208 S> */ B(LdaConstant), U8(197),
-                B(Star), R(0),
-  /* 2219 S> */ B(LdaConstant), U8(198),
-                B(Star), R(0),
-  /* 2230 S> */ B(LdaConstant), U8(199),
-                B(Star), R(0),
-  /* 2241 S> */ B(LdaConstant), U8(200),
-                B(Star), R(0),
-  /* 2252 S> */ B(LdaConstant), U8(201),
-                B(Star), R(0),
-  /* 2263 S> */ B(LdaConstant), U8(202),
-                B(Star), R(0),
-  /* 2274 S> */ B(LdaConstant), U8(203),
-                B(Star), R(0),
-  /* 2285 S> */ B(LdaConstant), U8(204),
-                B(Star), R(0),
-  /* 2296 S> */ B(LdaConstant), U8(205),
-                B(Star), R(0),
-  /* 2307 S> */ B(LdaConstant), U8(206),
-                B(Star), R(0),
-  /* 2318 S> */ B(LdaConstant), U8(207),
-                B(Star), R(0),
-  /* 2329 S> */ B(LdaConstant), U8(208),
-                B(Star), R(0),
-  /* 2340 S> */ B(LdaConstant), U8(209),
-                B(Star), R(0),
-  /* 2351 S> */ B(LdaConstant), U8(210),
-                B(Star), R(0),
-  /* 2362 S> */ B(LdaConstant), U8(211),
-                B(Star), R(0),
-  /* 2373 S> */ B(LdaConstant), U8(212),
-                B(Star), R(0),
-  /* 2384 S> */ B(LdaConstant), U8(213),
-                B(Star), R(0),
-  /* 2395 S> */ B(LdaConstant), U8(214),
-                B(Star), R(0),
-  /* 2406 S> */ B(LdaConstant), U8(215),
-                B(Star), R(0),
-  /* 2417 S> */ B(LdaConstant), U8(216),
-                B(Star), R(0),
-  /* 2428 S> */ B(LdaConstant), U8(217),
-                B(Star), R(0),
-  /* 2439 S> */ B(LdaConstant), U8(218),
-                B(Star), R(0),
-  /* 2450 S> */ B(LdaConstant), U8(219),
-                B(Star), R(0),
-  /* 2461 S> */ B(LdaConstant), U8(220),
-                B(Star), R(0),
-  /* 2472 S> */ B(LdaConstant), U8(221),
-                B(Star), R(0),
-  /* 2483 S> */ B(LdaConstant), U8(222),
-                B(Star), R(0),
-  /* 2494 S> */ B(LdaConstant), U8(223),
-                B(Star), R(0),
-  /* 2505 S> */ B(LdaConstant), U8(224),
-                B(Star), R(0),
-  /* 2516 S> */ B(LdaConstant), U8(225),
-                B(Star), R(0),
-  /* 2527 S> */ B(LdaConstant), U8(226),
-                B(Star), R(0),
-  /* 2538 S> */ B(LdaConstant), U8(227),
-                B(Star), R(0),
-  /* 2549 S> */ B(LdaConstant), U8(228),
-                B(Star), R(0),
-  /* 2560 S> */ B(LdaConstant), U8(229),
-                B(Star), R(0),
-  /* 2571 S> */ B(LdaConstant), U8(230),
-                B(Star), R(0),
-  /* 2582 S> */ B(LdaConstant), U8(231),
-                B(Star), R(0),
-  /* 2593 S> */ B(LdaConstant), U8(232),
-                B(Star), R(0),
-  /* 2604 S> */ B(LdaConstant), U8(233),
-                B(Star), R(0),
-  /* 2615 S> */ B(LdaConstant), U8(234),
-                B(Star), R(0),
-  /* 2626 S> */ B(LdaConstant), U8(235),
-                B(Star), R(0),
-  /* 2637 S> */ B(LdaConstant), U8(236),
-                B(Star), R(0),
-  /* 2648 S> */ B(LdaConstant), U8(237),
-                B(Star), R(0),
-  /* 2659 S> */ B(LdaConstant), U8(238),
-                B(Star), R(0),
-  /* 2670 S> */ B(LdaConstant), U8(239),
-                B(Star), R(0),
-  /* 2681 S> */ B(LdaConstant), U8(240),
-                B(Star), R(0),
-  /* 2692 S> */ B(LdaConstant), U8(241),
-                B(Star), R(0),
-  /* 2703 S> */ B(LdaConstant), U8(242),
-                B(Star), R(0),
-  /* 2714 S> */ B(LdaConstant), U8(243),
-                B(Star), R(0),
-  /* 2725 S> */ B(LdaConstant), U8(244),
-                B(Star), R(0),
-  /* 2736 S> */ B(LdaConstant), U8(245),
-                B(Star), R(0),
-  /* 2747 S> */ B(LdaConstant), U8(246),
-                B(Star), R(0),
-  /* 2758 S> */ B(LdaConstant), U8(247),
-                B(Star), R(0),
-  /* 2769 S> */ B(LdaConstant), U8(248),
-                B(Star), R(0),
-  /* 2780 S> */ B(LdaConstant), U8(249),
-                B(Star), R(0),
-  /* 2791 S> */ B(LdaConstant), U8(250),
-                B(Star), R(0),
-  /* 2802 S> */ B(LdaConstant), U8(251),
-                B(Star), R(0),
-  /* 2813 S> */ B(LdaConstant), U8(252),
-                B(Star), R(0),
-  /* 2824 S> */ B(LdaConstant), U8(253),
-                B(Star), R(0),
-  /* 2835 S> */ B(LdaConstant), U8(254),
-                B(Star), R(0),
-  /* 2846 S> */ B(LdaConstant), U8(255),
-                B(Star), R(0),
-  /* 2857 S> */ B(Wide), B(LdaConstant), U16(256),
-                B(Star), R(0),
-                B(LdaUndefined),
-  /* 2867 S> */ B(Return),
-]
-constant pool: [
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [1.414],
-  HEAP_NUMBER_TYPE [3.14],
 ]
 handlers: [
 ]
diff --git a/src/v8/test/cctest/interpreter/bytecode_expectations/IfConditions.golden b/src/v8/test/cctest/interpreter/bytecode_expectations/IfConditions.golden
index 82ece6c..e68211a 100644
--- a/src/v8/test/cctest/interpreter/bytecode_expectations/IfConditions.golden
+++ b/src/v8/test/cctest/interpreter/bytecode_expectations/IfConditions.golden
@@ -396,7 +396,7 @@
 "
 frame size: 0
 parameter count: 3
-bytecode array length: 81
+bytecode array length: 82
 bytecodes: [
   /*   10 E> */ B(StackCheck),
   /*   21 S> */ B(Ldar), R(arg1),
@@ -435,7 +435,7 @@
   /*  202 S> */ B(LdaSmi), I8(1),
   /*  211 S> */ B(Return),
   /*  216 S> */ B(Ldar), R(arg1),
-  /*  222 E> */ B(TestInstanceOf), R(arg0),
+  /*  222 E> */ B(TestInstanceOf), R(arg0), U8(6),
                 B(JumpIfFalse), U8(5),
   /*  238 S> */ B(LdaSmi), I8(1),
   /*  247 S> */ B(Return),
diff --git a/src/v8/test/cctest/interpreter/bytecode_expectations/JumpsRequiringConstantWideOperands.golden b/src/v8/test/cctest/interpreter/bytecode_expectations/JumpsRequiringConstantWideOperands.golden
deleted file mode 100644
index 16e648e..0000000
--- a/src/v8/test/cctest/interpreter/bytecode_expectations/JumpsRequiringConstantWideOperands.golden
+++ /dev/null
@@ -1,1294 +0,0 @@
-#
-# Autogenerated by generate-bytecode-expectations.
-#
-
----
-wrap: yes
-
----
-snippet: "
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.1;
-  var x = 0.2;
-  var x = 0.2;
-  var x = 0.2;
-  var x = 0.2;
-  var x = 0.2;
-  var x = 0.2;
-  var x = 0.2;
-  var x = 0.2;
-  var x = 0.2;
-  var x = 0.2;
-  var x = 0.2;
-  var x = 0.2;
-  var x = 0.2;
-  var x = 0.2;
-  var x = 0.2;
-  var x = 0.2;
-  var x = 0.2;
-  var x = 0.2;
-  var x = 0.2;
-  var x = 0.2;
-  var x = 0.2;
-  var x = 0.2;
-  var x = 0.2;
-  var x = 0.2;
-  var x = 0.2;
-  var x = 0.2;
-  var x = 0.2;
-  var x = 0.2;
-  var x = 0.2;
-  var x = 0.2;
-  var x = 0.2;
-  var x = 0.2;
-  var x = 0.3;
-  var x = 0.3;
-  var x = 0.3;
-  var x = 0.3;
-  var x = 0.3;
-  var x = 0.3;
-  var x = 0.3;
-  var x = 0.3;
-  var x = 0.3;
-  var x = 0.3;
-  var x = 0.3;
-  var x = 0.3;
-  var x = 0.3;
-  var x = 0.3;
-  var x = 0.3;
-  var x = 0.3;
-  var x = 0.4;
-  var x = 0.4;
-  var x = 0.4;
-  var x = 0.4;
-  var x = 0.4;
-  var x = 0.4;
-  var x = 0.4;
-  var x = 0.4;
-  for (var i = 0; i < 3; i++) {
-    if (i == 1) continue;
-    if (i == 2) break;
-  }
-  return 3;
-"
-frame size: 2
-parameter count: 1
-bytecode array length: 1412
-bytecodes: [
-  /*   30 E> */ B(StackCheck),
-  /*   42 S> */ B(LdaConstant), U8(0),
-                B(Star), R(0),
-  /*   55 S> */ B(LdaConstant), U8(1),
-                B(Star), R(0),
-  /*   68 S> */ B(LdaConstant), U8(2),
-                B(Star), R(0),
-  /*   81 S> */ B(LdaConstant), U8(3),
-                B(Star), R(0),
-  /*   94 S> */ B(LdaConstant), U8(4),
-                B(Star), R(0),
-  /*  107 S> */ B(LdaConstant), U8(5),
-                B(Star), R(0),
-  /*  120 S> */ B(LdaConstant), U8(6),
-                B(Star), R(0),
-  /*  133 S> */ B(LdaConstant), U8(7),
-                B(Star), R(0),
-  /*  146 S> */ B(LdaConstant), U8(8),
-                B(Star), R(0),
-  /*  159 S> */ B(LdaConstant), U8(9),
-                B(Star), R(0),
-  /*  172 S> */ B(LdaConstant), U8(10),
-                B(Star), R(0),
-  /*  185 S> */ B(LdaConstant), U8(11),
-                B(Star), R(0),
-  /*  198 S> */ B(LdaConstant), U8(12),
-                B(Star), R(0),
-  /*  211 S> */ B(LdaConstant), U8(13),
-                B(Star), R(0),
-  /*  224 S> */ B(LdaConstant), U8(14),
-                B(Star), R(0),
-  /*  237 S> */ B(LdaConstant), U8(15),
-                B(Star), R(0),
-  /*  250 S> */ B(LdaConstant), U8(16),
-                B(Star), R(0),
-  /*  263 S> */ B(LdaConstant), U8(17),
-                B(Star), R(0),
-  /*  276 S> */ B(LdaConstant), U8(18),
-                B(Star), R(0),
-  /*  289 S> */ B(LdaConstant), U8(19),
-                B(Star), R(0),
-  /*  302 S> */ B(LdaConstant), U8(20),
-                B(Star), R(0),
-  /*  315 S> */ B(LdaConstant), U8(21),
-                B(Star), R(0),
-  /*  328 S> */ B(LdaConstant), U8(22),
-                B(Star), R(0),
-  /*  341 S> */ B(LdaConstant), U8(23),
-                B(Star), R(0),
-  /*  354 S> */ B(LdaConstant), U8(24),
-                B(Star), R(0),
-  /*  367 S> */ B(LdaConstant), U8(25),
-                B(Star), R(0),
-  /*  380 S> */ B(LdaConstant), U8(26),
-                B(Star), R(0),
-  /*  393 S> */ B(LdaConstant), U8(27),
-                B(Star), R(0),
-  /*  406 S> */ B(LdaConstant), U8(28),
-                B(Star), R(0),
-  /*  419 S> */ B(LdaConstant), U8(29),
-                B(Star), R(0),
-  /*  432 S> */ B(LdaConstant), U8(30),
-                B(Star), R(0),
-  /*  445 S> */ B(LdaConstant), U8(31),
-                B(Star), R(0),
-  /*  458 S> */ B(LdaConstant), U8(32),
-                B(Star), R(0),
-  /*  471 S> */ B(LdaConstant), U8(33),
-                B(Star), R(0),
-  /*  484 S> */ B(LdaConstant), U8(34),
-                B(Star), R(0),
-  /*  497 S> */ B(LdaConstant), U8(35),
-                B(Star), R(0),
-  /*  510 S> */ B(LdaConstant), U8(36),
-                B(Star), R(0),
-  /*  523 S> */ B(LdaConstant), U8(37),
-                B(Star), R(0),
-  /*  536 S> */ B(LdaConstant), U8(38),
-                B(Star), R(0),
-  /*  549 S> */ B(LdaConstant), U8(39),
-                B(Star), R(0),
-  /*  562 S> */ B(LdaConstant), U8(40),
-                B(Star), R(0),
-  /*  575 S> */ B(LdaConstant), U8(41),
-                B(Star), R(0),
-  /*  588 S> */ B(LdaConstant), U8(42),
-                B(Star), R(0),
-  /*  601 S> */ B(LdaConstant), U8(43),
-                B(Star), R(0),
-  /*  614 S> */ B(LdaConstant), U8(44),
-                B(Star), R(0),
-  /*  627 S> */ B(LdaConstant), U8(45),
-                B(Star), R(0),
-  /*  640 S> */ B(LdaConstant), U8(46),
-                B(Star), R(0),
-  /*  653 S> */ B(LdaConstant), U8(47),
-                B(Star), R(0),
-  /*  666 S> */ B(LdaConstant), U8(48),
-                B(Star), R(0),
-  /*  679 S> */ B(LdaConstant), U8(49),
-                B(Star), R(0),
-  /*  692 S> */ B(LdaConstant), U8(50),
-                B(Star), R(0),
-  /*  705 S> */ B(LdaConstant), U8(51),
-                B(Star), R(0),
-  /*  718 S> */ B(LdaConstant), U8(52),
-                B(Star), R(0),
-  /*  731 S> */ B(LdaConstant), U8(53),
-                B(Star), R(0),
-  /*  744 S> */ B(LdaConstant), U8(54),
-                B(Star), R(0),
-  /*  757 S> */ B(LdaConstant), U8(55),
-                B(Star), R(0),
-  /*  770 S> */ B(LdaConstant), U8(56),
-                B(Star), R(0),
-  /*  783 S> */ B(LdaConstant), U8(57),
-                B(Star), R(0),
-  /*  796 S> */ B(LdaConstant), U8(58),
-                B(Star), R(0),
-  /*  809 S> */ B(LdaConstant), U8(59),
-                B(Star), R(0),
-  /*  822 S> */ B(LdaConstant), U8(60),
-                B(Star), R(0),
-  /*  835 S> */ B(LdaConstant), U8(61),
-                B(Star), R(0),
-  /*  848 S> */ B(LdaConstant), U8(62),
-                B(Star), R(0),
-  /*  861 S> */ B(LdaConstant), U8(63),
-                B(Star), R(0),
-  /*  874 S> */ B(LdaConstant), U8(64),
-                B(Star), R(0),
-  /*  887 S> */ B(LdaConstant), U8(65),
-                B(Star), R(0),
-  /*  900 S> */ B(LdaConstant), U8(66),
-                B(Star), R(0),
-  /*  913 S> */ B(LdaConstant), U8(67),
-                B(Star), R(0),
-  /*  926 S> */ B(LdaConstant), U8(68),
-                B(Star), R(0),
-  /*  939 S> */ B(LdaConstant), U8(69),
-                B(Star), R(0),
-  /*  952 S> */ B(LdaConstant), U8(70),
-                B(Star), R(0),
-  /*  965 S> */ B(LdaConstant), U8(71),
-                B(Star), R(0),
-  /*  978 S> */ B(LdaConstant), U8(72),
-                B(Star), R(0),
-  /*  991 S> */ B(LdaConstant), U8(73),
-                B(Star), R(0),
-  /* 1004 S> */ B(LdaConstant), U8(74),
-                B(Star), R(0),
-  /* 1017 S> */ B(LdaConstant), U8(75),
-                B(Star), R(0),
-  /* 1030 S> */ B(LdaConstant), U8(76),
-                B(Star), R(0),
-  /* 1043 S> */ B(LdaConstant), U8(77),
-                B(Star), R(0),
-  /* 1056 S> */ B(LdaConstant), U8(78),
-                B(Star), R(0),
-  /* 1069 S> */ B(LdaConstant), U8(79),
-                B(Star), R(0),
-  /* 1082 S> */ B(LdaConstant), U8(80),
-                B(Star), R(0),
-  /* 1095 S> */ B(LdaConstant), U8(81),
-                B(Star), R(0),
-  /* 1108 S> */ B(LdaConstant), U8(82),
-                B(Star), R(0),
-  /* 1121 S> */ B(LdaConstant), U8(83),
-                B(Star), R(0),
-  /* 1134 S> */ B(LdaConstant), U8(84),
-                B(Star), R(0),
-  /* 1147 S> */ B(LdaConstant), U8(85),
-                B(Star), R(0),
-  /* 1160 S> */ B(LdaConstant), U8(86),
-                B(Star), R(0),
-  /* 1173 S> */ B(LdaConstant), U8(87),
-                B(Star), R(0),
-  /* 1186 S> */ B(LdaConstant), U8(88),
-                B(Star), R(0),
-  /* 1199 S> */ B(LdaConstant), U8(89),
-                B(Star), R(0),
-  /* 1212 S> */ B(LdaConstant), U8(90),
-                B(Star), R(0),
-  /* 1225 S> */ B(LdaConstant), U8(91),
-                B(Star), R(0),
-  /* 1238 S> */ B(LdaConstant), U8(92),
-                B(Star), R(0),
-  /* 1251 S> */ B(LdaConstant), U8(93),
-                B(Star), R(0),
-  /* 1264 S> */ B(LdaConstant), U8(94),
-                B(Star), R(0),
-  /* 1277 S> */ B(LdaConstant), U8(95),
-                B(Star), R(0),
-  /* 1290 S> */ B(LdaConstant), U8(96),
-                B(Star), R(0),
-  /* 1303 S> */ B(LdaConstant), U8(97),
-                B(Star), R(0),
-  /* 1316 S> */ B(LdaConstant), U8(98),
-                B(Star), R(0),
-  /* 1329 S> */ B(LdaConstant), U8(99),
-                B(Star), R(0),
-  /* 1342 S> */ B(LdaConstant), U8(100),
-                B(Star), R(0),
-  /* 1355 S> */ B(LdaConstant), U8(101),
-                B(Star), R(0),
-  /* 1368 S> */ B(LdaConstant), U8(102),
-                B(Star), R(0),
-  /* 1381 S> */ B(LdaConstant), U8(103),
-                B(Star), R(0),
-  /* 1394 S> */ B(LdaConstant), U8(104),
-                B(Star), R(0),
-  /* 1407 S> */ B(LdaConstant), U8(105),
-                B(Star), R(0),
-  /* 1420 S> */ B(LdaConstant), U8(106),
-                B(Star), R(0),
-  /* 1433 S> */ B(LdaConstant), U8(107),
-                B(Star), R(0),
-  /* 1446 S> */ B(LdaConstant), U8(108),
-                B(Star), R(0),
-  /* 1459 S> */ B(LdaConstant), U8(109),
-                B(Star), R(0),
-  /* 1472 S> */ B(LdaConstant), U8(110),
-                B(Star), R(0),
-  /* 1485 S> */ B(LdaConstant), U8(111),
-                B(Star), R(0),
-  /* 1498 S> */ B(LdaConstant), U8(112),
-                B(Star), R(0),
-  /* 1511 S> */ B(LdaConstant), U8(113),
-                B(Star), R(0),
-  /* 1524 S> */ B(LdaConstant), U8(114),
-                B(Star), R(0),
-  /* 1537 S> */ B(LdaConstant), U8(115),
-                B(Star), R(0),
-  /* 1550 S> */ B(LdaConstant), U8(116),
-                B(Star), R(0),
-  /* 1563 S> */ B(LdaConstant), U8(117),
-                B(Star), R(0),
-  /* 1576 S> */ B(LdaConstant), U8(118),
-                B(Star), R(0),
-  /* 1589 S> */ B(LdaConstant), U8(119),
-                B(Star), R(0),
-  /* 1602 S> */ B(LdaConstant), U8(120),
-                B(Star), R(0),
-  /* 1615 S> */ B(LdaConstant), U8(121),
-                B(Star), R(0),
-  /* 1628 S> */ B(LdaConstant), U8(122),
-                B(Star), R(0),
-  /* 1641 S> */ B(LdaConstant), U8(123),
-                B(Star), R(0),
-  /* 1654 S> */ B(LdaConstant), U8(124),
-                B(Star), R(0),
-  /* 1667 S> */ B(LdaConstant), U8(125),
-                B(Star), R(0),
-  /* 1680 S> */ B(LdaConstant), U8(126),
-                B(Star), R(0),
-  /* 1693 S> */ B(LdaConstant), U8(127),
-                B(Star), R(0),
-  /* 1706 S> */ B(LdaConstant), U8(128),
-                B(Star), R(0),
-  /* 1719 S> */ B(LdaConstant), U8(129),
-                B(Star), R(0),
-  /* 1732 S> */ B(LdaConstant), U8(130),
-                B(Star), R(0),
-  /* 1745 S> */ B(LdaConstant), U8(131),
-                B(Star), R(0),
-  /* 1758 S> */ B(LdaConstant), U8(132),
-                B(Star), R(0),
-  /* 1771 S> */ B(LdaConstant), U8(133),
-                B(Star), R(0),
-  /* 1784 S> */ B(LdaConstant), U8(134),
-                B(Star), R(0),
-  /* 1797 S> */ B(LdaConstant), U8(135),
-                B(Star), R(0),
-  /* 1810 S> */ B(LdaConstant), U8(136),
-                B(Star), R(0),
-  /* 1823 S> */ B(LdaConstant), U8(137),
-                B(Star), R(0),
-  /* 1836 S> */ B(LdaConstant), U8(138),
-                B(Star), R(0),
-  /* 1849 S> */ B(LdaConstant), U8(139),
-                B(Star), R(0),
-  /* 1862 S> */ B(LdaConstant), U8(140),
-                B(Star), R(0),
-  /* 1875 S> */ B(LdaConstant), U8(141),
-                B(Star), R(0),
-  /* 1888 S> */ B(LdaConstant), U8(142),
-                B(Star), R(0),
-  /* 1901 S> */ B(LdaConstant), U8(143),
-                B(Star), R(0),
-  /* 1914 S> */ B(LdaConstant), U8(144),
-                B(Star), R(0),
-  /* 1927 S> */ B(LdaConstant), U8(145),
-                B(Star), R(0),
-  /* 1940 S> */ B(LdaConstant), U8(146),
-                B(Star), R(0),
-  /* 1953 S> */ B(LdaConstant), U8(147),
-                B(Star), R(0),
-  /* 1966 S> */ B(LdaConstant), U8(148),
-                B(Star), R(0),
-  /* 1979 S> */ B(LdaConstant), U8(149),
-                B(Star), R(0),
-  /* 1992 S> */ B(LdaConstant), U8(150),
-                B(Star), R(0),
-  /* 2005 S> */ B(LdaConstant), U8(151),
-                B(Star), R(0),
-  /* 2018 S> */ B(LdaConstant), U8(152),
-                B(Star), R(0),
-  /* 2031 S> */ B(LdaConstant), U8(153),
-                B(Star), R(0),
-  /* 2044 S> */ B(LdaConstant), U8(154),
-                B(Star), R(0),
-  /* 2057 S> */ B(LdaConstant), U8(155),
-                B(Star), R(0),
-  /* 2070 S> */ B(LdaConstant), U8(156),
-                B(Star), R(0),
-  /* 2083 S> */ B(LdaConstant), U8(157),
-                B(Star), R(0),
-  /* 2096 S> */ B(LdaConstant), U8(158),
-                B(Star), R(0),
-  /* 2109 S> */ B(LdaConstant), U8(159),
-                B(Star), R(0),
-  /* 2122 S> */ B(LdaConstant), U8(160),
-                B(Star), R(0),
-  /* 2135 S> */ B(LdaConstant), U8(161),
-                B(Star), R(0),
-  /* 2148 S> */ B(LdaConstant), U8(162),
-                B(Star), R(0),
-  /* 2161 S> */ B(LdaConstant), U8(163),
-                B(Star), R(0),
-  /* 2174 S> */ B(LdaConstant), U8(164),
-                B(Star), R(0),
-  /* 2187 S> */ B(LdaConstant), U8(165),
-                B(Star), R(0),
-  /* 2200 S> */ B(LdaConstant), U8(166),
-                B(Star), R(0),
-  /* 2213 S> */ B(LdaConstant), U8(167),
-                B(Star), R(0),
-  /* 2226 S> */ B(LdaConstant), U8(168),
-                B(Star), R(0),
-  /* 2239 S> */ B(LdaConstant), U8(169),
-                B(Star), R(0),
-  /* 2252 S> */ B(LdaConstant), U8(170),
-                B(Star), R(0),
-  /* 2265 S> */ B(LdaConstant), U8(171),
-                B(Star), R(0),
-  /* 2278 S> */ B(LdaConstant), U8(172),
-                B(Star), R(0),
-  /* 2291 S> */ B(LdaConstant), U8(173),
-                B(Star), R(0),
-  /* 2304 S> */ B(LdaConstant), U8(174),
-                B(Star), R(0),
-  /* 2317 S> */ B(LdaConstant), U8(175),
-                B(Star), R(0),
-  /* 2330 S> */ B(LdaConstant), U8(176),
-                B(Star), R(0),
-  /* 2343 S> */ B(LdaConstant), U8(177),
-                B(Star), R(0),
-  /* 2356 S> */ B(LdaConstant), U8(178),
-                B(Star), R(0),
-  /* 2369 S> */ B(LdaConstant), U8(179),
-                B(Star), R(0),
-  /* 2382 S> */ B(LdaConstant), U8(180),
-                B(Star), R(0),
-  /* 2395 S> */ B(LdaConstant), U8(181),
-                B(Star), R(0),
-  /* 2408 S> */ B(LdaConstant), U8(182),
-                B(Star), R(0),
-  /* 2421 S> */ B(LdaConstant), U8(183),
-                B(Star), R(0),
-  /* 2434 S> */ B(LdaConstant), U8(184),
-                B(Star), R(0),
-  /* 2447 S> */ B(LdaConstant), U8(185),
-                B(Star), R(0),
-  /* 2460 S> */ B(LdaConstant), U8(186),
-                B(Star), R(0),
-  /* 2473 S> */ B(LdaConstant), U8(187),
-                B(Star), R(0),
-  /* 2486 S> */ B(LdaConstant), U8(188),
-                B(Star), R(0),
-  /* 2499 S> */ B(LdaConstant), U8(189),
-                B(Star), R(0),
-  /* 2512 S> */ B(LdaConstant), U8(190),
-                B(Star), R(0),
-  /* 2525 S> */ B(LdaConstant), U8(191),
-                B(Star), R(0),
-  /* 2538 S> */ B(LdaConstant), U8(192),
-                B(Star), R(0),
-  /* 2551 S> */ B(LdaConstant), U8(193),
-                B(Star), R(0),
-  /* 2564 S> */ B(LdaConstant), U8(194),
-                B(Star), R(0),
-  /* 2577 S> */ B(LdaConstant), U8(195),
-                B(Star), R(0),
-  /* 2590 S> */ B(LdaConstant), U8(196),
-                B(Star), R(0),
-  /* 2603 S> */ B(LdaConstant), U8(197),
-                B(Star), R(0),
-  /* 2616 S> */ B(LdaConstant), U8(198),
-                B(Star), R(0),
-  /* 2629 S> */ B(LdaConstant), U8(199),
-                B(Star), R(0),
-  /* 2642 S> */ B(LdaConstant), U8(200),
-                B(Star), R(0),
-  /* 2655 S> */ B(LdaConstant), U8(201),
-                B(Star), R(0),
-  /* 2668 S> */ B(LdaConstant), U8(202),
-                B(Star), R(0),
-  /* 2681 S> */ B(LdaConstant), U8(203),
-                B(Star), R(0),
-  /* 2694 S> */ B(LdaConstant), U8(204),
-                B(Star), R(0),
-  /* 2707 S> */ B(LdaConstant), U8(205),
-                B(Star), R(0),
-  /* 2720 S> */ B(LdaConstant), U8(206),
-                B(Star), R(0),
-  /* 2733 S> */ B(LdaConstant), U8(207),
-                B(Star), R(0),
-  /* 2746 S> */ B(LdaConstant), U8(208),
-                B(Star), R(0),
-  /* 2759 S> */ B(LdaConstant), U8(209),
-                B(Star), R(0),
-  /* 2772 S> */ B(LdaConstant), U8(210),
-                B(Star), R(0),
-  /* 2785 S> */ B(LdaConstant), U8(211),
-                B(Star), R(0),
-  /* 2798 S> */ B(LdaConstant), U8(212),
-                B(Star), R(0),
-  /* 2811 S> */ B(LdaConstant), U8(213),
-                B(Star), R(0),
-  /* 2824 S> */ B(LdaConstant), U8(214),
-                B(Star), R(0),
-  /* 2837 S> */ B(LdaConstant), U8(215),
-                B(Star), R(0),
-  /* 2850 S> */ B(LdaConstant), U8(216),
-                B(Star), R(0),
-  /* 2863 S> */ B(LdaConstant), U8(217),
-                B(Star), R(0),
-  /* 2876 S> */ B(LdaConstant), U8(218),
-                B(Star), R(0),
-  /* 2889 S> */ B(LdaConstant), U8(219),
-                B(Star), R(0),
-  /* 2902 S> */ B(LdaConstant), U8(220),
-                B(Star), R(0),
-  /* 2915 S> */ B(LdaConstant), U8(221),
-                B(Star), R(0),
-  /* 2928 S> */ B(LdaConstant), U8(222),
-                B(Star), R(0),
-  /* 2941 S> */ B(LdaConstant), U8(223),
-                B(Star), R(0),
-  /* 2954 S> */ B(LdaConstant), U8(224),
-                B(Star), R(0),
-  /* 2967 S> */ B(LdaConstant), U8(225),
-                B(Star), R(0),
-  /* 2980 S> */ B(LdaConstant), U8(226),
-                B(Star), R(0),
-  /* 2993 S> */ B(LdaConstant), U8(227),
-                B(Star), R(0),
-  /* 3006 S> */ B(LdaConstant), U8(228),
-                B(Star), R(0),
-  /* 3019 S> */ B(LdaConstant), U8(229),
-                B(Star), R(0),
-  /* 3032 S> */ B(LdaConstant), U8(230),
-                B(Star), R(0),
-  /* 3045 S> */ B(LdaConstant), U8(231),
-                B(Star), R(0),
-  /* 3058 S> */ B(LdaConstant), U8(232),
-                B(Star), R(0),
-  /* 3071 S> */ B(LdaConstant), U8(233),
-                B(Star), R(0),
-  /* 3084 S> */ B(LdaConstant), U8(234),
-                B(Star), R(0),
-  /* 3097 S> */ B(LdaConstant), U8(235),
-                B(Star), R(0),
-  /* 3110 S> */ B(LdaConstant), U8(236),
-                B(Star), R(0),
-  /* 3123 S> */ B(LdaConstant), U8(237),
-                B(Star), R(0),
-  /* 3136 S> */ B(LdaConstant), U8(238),
-                B(Star), R(0),
-  /* 3149 S> */ B(LdaConstant), U8(239),
-                B(Star), R(0),
-  /* 3162 S> */ B(LdaConstant), U8(240),
-                B(Star), R(0),
-  /* 3175 S> */ B(LdaConstant), U8(241),
-                B(Star), R(0),
-  /* 3188 S> */ B(LdaConstant), U8(242),
-                B(Star), R(0),
-  /* 3201 S> */ B(LdaConstant), U8(243),
-                B(Star), R(0),
-  /* 3214 S> */ B(LdaConstant), U8(244),
-                B(Star), R(0),
-  /* 3227 S> */ B(LdaConstant), U8(245),
-                B(Star), R(0),
-  /* 3240 S> */ B(LdaConstant), U8(246),
-                B(Star), R(0),
-  /* 3253 S> */ B(LdaConstant), U8(247),
-                B(Star), R(0),
-  /* 3266 S> */ B(LdaConstant), U8(248),
-                B(Star), R(0),
-  /* 3279 S> */ B(LdaConstant), U8(249),
-                B(Star), R(0),
-  /* 3292 S> */ B(LdaConstant), U8(250),
-                B(Star), R(0),
-  /* 3305 S> */ B(LdaConstant), U8(251),
-                B(Star), R(0),
-  /* 3318 S> */ B(LdaConstant), U8(252),
-                B(Star), R(0),
-  /* 3331 S> */ B(LdaConstant), U8(253),
-                B(Star), R(0),
-  /* 3344 S> */ B(LdaConstant), U8(254),
-                B(Star), R(0),
-  /* 3357 S> */ B(LdaConstant), U8(255),
-                B(Star), R(0),
-  /* 3370 S> */ B(Wide), B(LdaConstant), U16(256),
-                B(Star), R(0),
-  /* 3383 S> */ B(Wide), B(LdaConstant), U16(257),
-                B(Star), R(0),
-  /* 3396 S> */ B(Wide), B(LdaConstant), U16(258),
-                B(Star), R(0),
-  /* 3409 S> */ B(Wide), B(LdaConstant), U16(259),
-                B(Star), R(0),
-  /* 3422 S> */ B(Wide), B(LdaConstant), U16(260),
-                B(Star), R(0),
-  /* 3435 S> */ B(Wide), B(LdaConstant), U16(261),
-                B(Star), R(0),
-  /* 3448 S> */ B(Wide), B(LdaConstant), U16(262),
-                B(Star), R(0),
-  /* 3461 S> */ B(Wide), B(LdaConstant), U16(263),
-                B(Star), R(0),
-  /* 3474 S> */ B(Wide), B(LdaConstant), U16(264),
-                B(Star), R(0),
-  /* 3487 S> */ B(Wide), B(LdaConstant), U16(265),
-                B(Star), R(0),
-  /* 3500 S> */ B(Wide), B(LdaConstant), U16(266),
-                B(Star), R(0),
-  /* 3513 S> */ B(Wide), B(LdaConstant), U16(267),
-                B(Star), R(0),
-  /* 3526 S> */ B(Wide), B(LdaConstant), U16(268),
-                B(Star), R(0),
-  /* 3539 S> */ B(Wide), B(LdaConstant), U16(269),
-                B(Star), R(0),
-  /* 3552 S> */ B(Wide), B(LdaConstant), U16(270),
-                B(Star), R(0),
-  /* 3565 S> */ B(Wide), B(LdaConstant), U16(271),
-                B(Star), R(0),
-  /* 3578 S> */ B(Wide), B(LdaConstant), U16(272),
-                B(Star), R(0),
-  /* 3591 S> */ B(Wide), B(LdaConstant), U16(273),
-                B(Star), R(0),
-  /* 3604 S> */ B(Wide), B(LdaConstant), U16(274),
-                B(Star), R(0),
-  /* 3617 S> */ B(Wide), B(LdaConstant), U16(275),
-                B(Star), R(0),
-  /* 3630 S> */ B(Wide), B(LdaConstant), U16(276),
-                B(Star), R(0),
-  /* 3643 S> */ B(Wide), B(LdaConstant), U16(277),
-                B(Star), R(0),
-  /* 3656 S> */ B(Wide), B(LdaConstant), U16(278),
-                B(Star), R(0),
-  /* 3669 S> */ B(Wide), B(LdaConstant), U16(279),
-                B(Star), R(0),
-  /* 3682 S> */ B(Wide), B(LdaConstant), U16(280),
-                B(Star), R(0),
-  /* 3695 S> */ B(Wide), B(LdaConstant), U16(281),
-                B(Star), R(0),
-  /* 3708 S> */ B(Wide), B(LdaConstant), U16(282),
-                B(Star), R(0),
-  /* 3721 S> */ B(Wide), B(LdaConstant), U16(283),
-                B(Star), R(0),
-  /* 3734 S> */ B(Wide), B(LdaConstant), U16(284),
-                B(Star), R(0),
-  /* 3747 S> */ B(Wide), B(LdaConstant), U16(285),
-                B(Star), R(0),
-  /* 3760 S> */ B(Wide), B(LdaConstant), U16(286),
-                B(Star), R(0),
-  /* 3773 S> */ B(Wide), B(LdaConstant), U16(287),
-                B(Star), R(0),
-  /* 3786 S> */ B(Wide), B(LdaConstant), U16(288),
-                B(Star), R(0),
-  /* 3799 S> */ B(Wide), B(LdaConstant), U16(289),
-                B(Star), R(0),
-  /* 3812 S> */ B(Wide), B(LdaConstant), U16(290),
-                B(Star), R(0),
-  /* 3825 S> */ B(Wide), B(LdaConstant), U16(291),
-                B(Star), R(0),
-  /* 3838 S> */ B(Wide), B(LdaConstant), U16(292),
-                B(Star), R(0),
-  /* 3851 S> */ B(Wide), B(LdaConstant), U16(293),
-                B(Star), R(0),
-  /* 3864 S> */ B(Wide), B(LdaConstant), U16(294),
-                B(Star), R(0),
-  /* 3877 S> */ B(Wide), B(LdaConstant), U16(295),
-                B(Star), R(0),
-  /* 3890 S> */ B(Wide), B(LdaConstant), U16(296),
-                B(Star), R(0),
-  /* 3903 S> */ B(Wide), B(LdaConstant), U16(297),
-                B(Star), R(0),
-  /* 3916 S> */ B(Wide), B(LdaConstant), U16(298),
-                B(Star), R(0),
-  /* 3929 S> */ B(Wide), B(LdaConstant), U16(299),
-                B(Star), R(0),
-  /* 3942 S> */ B(Wide), B(LdaConstant), U16(300),
-                B(Star), R(0),
-  /* 3955 S> */ B(Wide), B(LdaConstant), U16(301),
-                B(Star), R(0),
-  /* 3968 S> */ B(Wide), B(LdaConstant), U16(302),
-                B(Star), R(0),
-  /* 3981 S> */ B(Wide), B(LdaConstant), U16(303),
-                B(Star), R(0),
-  /* 3994 S> */ B(Wide), B(LdaConstant), U16(304),
-                B(Star), R(0),
-  /* 4007 S> */ B(Wide), B(LdaConstant), U16(305),
-                B(Star), R(0),
-  /* 4020 S> */ B(Wide), B(LdaConstant), U16(306),
-                B(Star), R(0),
-  /* 4033 S> */ B(Wide), B(LdaConstant), U16(307),
-                B(Star), R(0),
-  /* 4046 S> */ B(Wide), B(LdaConstant), U16(308),
-                B(Star), R(0),
-  /* 4059 S> */ B(Wide), B(LdaConstant), U16(309),
-                B(Star), R(0),
-  /* 4072 S> */ B(Wide), B(LdaConstant), U16(310),
-                B(Star), R(0),
-  /* 4085 S> */ B(Wide), B(LdaConstant), U16(311),
-                B(Star), R(0),
-  /* 4103 S> */ B(LdaZero),
-                B(Star), R(1),
-  /* 4108 S> */ B(LdaSmi), I8(3),
-  /* 4108 E> */ B(TestLessThan), R(1), U8(0),
-                B(Wide), B(JumpIfFalse), U16(39),
-  /* 4090 E> */ B(StackCheck),
-  /* 4122 S> */ B(LdaSmi), I8(1),
-  /* 4128 E> */ B(TestEqual), R(1), U8(2),
-                B(Wide), B(JumpIfFalse), U16(7),
-  /* 4134 S> */ B(Wide), B(Jump), U16(16),
-  /* 4146 S> */ B(LdaSmi), I8(2),
-  /* 4152 E> */ B(TestEqual), R(1), U8(3),
-                B(Wide), B(JumpIfFalse), U16(7),
-  /* 4158 S> */ B(Wide), B(Jump), U16(12),
-  /* 4114 S> */ B(Ldar), R(1),
-                B(Inc), U8(1),
-                B(Star), R(1),
-                B(JumpLoop), U8(42), I8(0),
-  /* 4167 S> */ B(LdaSmi), I8(3),
-  /* 4176 S> */ B(Return),
-]
-constant pool: [
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.1],
-  HEAP_NUMBER_TYPE [0.2],
-  HEAP_NUMBER_TYPE [0.2],
-  HEAP_NUMBER_TYPE [0.2],
-  HEAP_NUMBER_TYPE [0.2],
-  HEAP_NUMBER_TYPE [0.2],
-  HEAP_NUMBER_TYPE [0.2],
-  HEAP_NUMBER_TYPE [0.2],
-  HEAP_NUMBER_TYPE [0.2],
-  HEAP_NUMBER_TYPE [0.2],
-  HEAP_NUMBER_TYPE [0.2],
-  HEAP_NUMBER_TYPE [0.2],
-  HEAP_NUMBER_TYPE [0.2],
-  HEAP_NUMBER_TYPE [0.2],
-  HEAP_NUMBER_TYPE [0.2],
-  HEAP_NUMBER_TYPE [0.2],
-  HEAP_NUMBER_TYPE [0.2],
-  HEAP_NUMBER_TYPE [0.2],
-  HEAP_NUMBER_TYPE [0.2],
-  HEAP_NUMBER_TYPE [0.2],
-  HEAP_NUMBER_TYPE [0.2],
-  HEAP_NUMBER_TYPE [0.2],
-  HEAP_NUMBER_TYPE [0.2],
-  HEAP_NUMBER_TYPE [0.2],
-  HEAP_NUMBER_TYPE [0.2],
-  HEAP_NUMBER_TYPE [0.2],
-  HEAP_NUMBER_TYPE [0.2],
-  HEAP_NUMBER_TYPE [0.2],
-  HEAP_NUMBER_TYPE [0.2],
-  HEAP_NUMBER_TYPE [0.2],
-  HEAP_NUMBER_TYPE [0.2],
-  HEAP_NUMBER_TYPE [0.2],
-  HEAP_NUMBER_TYPE [0.2],
-  HEAP_NUMBER_TYPE [0.3],
-  HEAP_NUMBER_TYPE [0.3],
-  HEAP_NUMBER_TYPE [0.3],
-  HEAP_NUMBER_TYPE [0.3],
-  HEAP_NUMBER_TYPE [0.3],
-  HEAP_NUMBER_TYPE [0.3],
-  HEAP_NUMBER_TYPE [0.3],
-  HEAP_NUMBER_TYPE [0.3],
-  HEAP_NUMBER_TYPE [0.3],
-  HEAP_NUMBER_TYPE [0.3],
-  HEAP_NUMBER_TYPE [0.3],
-  HEAP_NUMBER_TYPE [0.3],
-  HEAP_NUMBER_TYPE [0.3],
-  HEAP_NUMBER_TYPE [0.3],
-  HEAP_NUMBER_TYPE [0.3],
-  HEAP_NUMBER_TYPE [0.3],
-  HEAP_NUMBER_TYPE [0.4],
-  HEAP_NUMBER_TYPE [0.4],
-  HEAP_NUMBER_TYPE [0.4],
-  HEAP_NUMBER_TYPE [0.4],
-  HEAP_NUMBER_TYPE [0.4],
-  HEAP_NUMBER_TYPE [0.4],
-  HEAP_NUMBER_TYPE [0.4],
-  HEAP_NUMBER_TYPE [0.4],
-]
-handlers: [
-]
-
diff --git a/src/v8/test/cctest/interpreter/bytecode_expectations/LookupSlot.golden b/src/v8/test/cctest/interpreter/bytecode_expectations/LookupSlot.golden
index 5162768..e90b425 100644
--- a/src/v8/test/cctest/interpreter/bytecode_expectations/LookupSlot.golden
+++ b/src/v8/test/cctest/interpreter/bytecode_expectations/LookupSlot.golden
@@ -23,7 +23,7 @@
                 B(Ldar), R(0),
                 B(StaCurrentContextSlot), U8(5),
   /*   10 E> */ B(StackCheck),
-  /*   14 S> */ B(LdaLookupGlobalSlot), U8(0), U8(2), U8(1),
+  /*   14 S> */ B(LdaLookupGlobalSlot), U8(0), U8(0), U8(1),
                 B(Star), R(2),
                 B(LdaConstant), U8(1),
                 B(Star), R(3),
@@ -38,7 +38,7 @@
                 B(Mov), R(closure), R(6),
                 B(CallRuntime), U16(Runtime::kResolvePossiblyDirectEval), R(4), U8(6),
                 B(Star), R(2),
-  /*   14 E> */ B(CallUndefinedReceiver1), R(2), R(3), U8(0),
+  /*   14 E> */ B(CallUndefinedReceiver1), R(2), R(3), U8(2),
   /*   35 S> */ B(LdaLookupGlobalSlot), U8(2), U8(4), U8(1),
   /*   44 S> */ B(Return),
 ]
@@ -67,7 +67,7 @@
                 B(Ldar), R(0),
                 B(StaCurrentContextSlot), U8(5),
   /*   10 E> */ B(StackCheck),
-  /*   14 S> */ B(LdaLookupGlobalSlot), U8(0), U8(2), U8(1),
+  /*   14 S> */ B(LdaLookupGlobalSlot), U8(0), U8(0), U8(1),
                 B(Star), R(2),
                 B(LdaConstant), U8(1),
                 B(Star), R(3),
@@ -82,7 +82,7 @@
                 B(Mov), R(closure), R(6),
                 B(CallRuntime), U16(Runtime::kResolvePossiblyDirectEval), R(4), U8(6),
                 B(Star), R(2),
-  /*   14 E> */ B(CallUndefinedReceiver1), R(2), R(3), U8(0),
+  /*   14 E> */ B(CallUndefinedReceiver1), R(2), R(3), U8(2),
   /*   35 S> */ B(LdaLookupGlobalSlotInsideTypeof), U8(2), U8(4), U8(1),
                 B(TypeOf),
   /*   51 S> */ B(Return),
@@ -114,7 +114,7 @@
   /*   10 E> */ B(StackCheck),
   /*   14 S> */ B(LdaSmi), I8(20),
   /*   16 E> */ B(StaLookupSlot), U8(0), U8(0),
-  /*   22 S> */ B(LdaLookupGlobalSlot), U8(1), U8(2), U8(1),
+  /*   22 S> */ B(LdaLookupGlobalSlot), U8(1), U8(0), U8(1),
                 B(Star), R(2),
                 B(LdaConstant), U8(2),
                 B(Star), R(3),
@@ -129,7 +129,7 @@
                 B(Mov), R(closure), R(6),
                 B(CallRuntime), U16(Runtime::kResolvePossiblyDirectEval), R(4), U8(6),
                 B(Star), R(2),
-  /*   29 E> */ B(CallUndefinedReceiver1), R(2), R(3), U8(0),
+  /*   29 E> */ B(CallUndefinedReceiver1), R(2), R(3), U8(2),
   /*   38 S> */ B(Return),
 ]
 constant pool: [
@@ -162,7 +162,7 @@
                 B(Ldar), R(0),
                 B(StaCurrentContextSlot), U8(5),
   /*   38 E> */ B(StackCheck),
-  /*   44 S> */ B(LdaLookupGlobalSlot), U8(0), U8(2), U8(1),
+  /*   44 S> */ B(LdaLookupGlobalSlot), U8(0), U8(0), U8(1),
                 B(Star), R(2),
                 B(LdaConstant), U8(1),
                 B(Star), R(3),
@@ -177,7 +177,7 @@
                 B(Mov), R(closure), R(6),
                 B(CallRuntime), U16(Runtime::kResolvePossiblyDirectEval), R(4), U8(6),
                 B(Star), R(2),
-  /*   44 E> */ B(CallUndefinedReceiver1), R(2), R(3), U8(0),
+  /*   44 E> */ B(CallUndefinedReceiver1), R(2), R(3), U8(2),
   /*   66 S> */ B(LdaLookupContextSlot), U8(2), U8(6), U8(1),
   /*   75 S> */ B(Return),
 ]
@@ -211,7 +211,7 @@
                 B(Ldar), R(0),
                 B(StaCurrentContextSlot), U8(5),
   /*   34 E> */ B(StackCheck),
-  /*   40 S> */ B(LdaLookupGlobalSlot), U8(0), U8(2), U8(1),
+  /*   40 S> */ B(LdaLookupGlobalSlot), U8(0), U8(0), U8(1),
                 B(Star), R(2),
                 B(LdaConstant), U8(1),
                 B(Star), R(3),
@@ -226,7 +226,7 @@
                 B(Mov), R(closure), R(6),
                 B(CallRuntime), U16(Runtime::kResolvePossiblyDirectEval), R(4), U8(6),
                 B(Star), R(2),
-  /*   40 E> */ B(CallUndefinedReceiver1), R(2), R(3), U8(0),
+  /*   40 E> */ B(CallUndefinedReceiver1), R(2), R(3), U8(2),
   /*   62 S> */ B(LdaLookupGlobalSlot), U8(2), U8(4), U8(1),
   /*   71 S> */ B(Return),
 ]
diff --git a/src/v8/test/cctest/interpreter/bytecode_expectations/LookupSlotWideInEval.golden b/src/v8/test/cctest/interpreter/bytecode_expectations/LookupSlotWideInEval.golden
deleted file mode 100644
index 9eaa6ad..0000000
--- a/src/v8/test/cctest/interpreter/bytecode_expectations/LookupSlotWideInEval.golden
+++ /dev/null
@@ -1,4218 +0,0 @@
-#
-# Autogenerated by generate-bytecode-expectations.
-#
-
----
-wrap: no
-test function name: f
-
----
-snippet: "
-  var f;
-  var x = 1;
-  function f1() {
-    eval(\"function t() {\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"return x;\" +
-    \"};\" +
-    \"f = t; f();\"
-  );
-  }
-  f1();
-"
-frame size: 1
-parameter count: 1
-bytecode array length: 1034
-bytecodes: [
-  /*   10 E> */ B(StackCheck),
-  /*   22 S> */ B(LdaConstant), U8(0),
-                B(Star), R(0),
-  /*   34 S> */ B(LdaConstant), U8(1),
-                B(Star), R(0),
-  /*   46 S> */ B(LdaConstant), U8(2),
-                B(Star), R(0),
-  /*   58 S> */ B(LdaConstant), U8(3),
-                B(Star), R(0),
-  /*   70 S> */ B(LdaConstant), U8(4),
-                B(Star), R(0),
-  /*   82 S> */ B(LdaConstant), U8(5),
-                B(Star), R(0),
-  /*   94 S> */ B(LdaConstant), U8(6),
-                B(Star), R(0),
-  /*  106 S> */ B(LdaConstant), U8(7),
-                B(Star), R(0),
-  /*  118 S> */ B(LdaConstant), U8(8),
-                B(Star), R(0),
-  /*  130 S> */ B(LdaConstant), U8(9),
-                B(Star), R(0),
-  /*  142 S> */ B(LdaConstant), U8(10),
-                B(Star), R(0),
-  /*  154 S> */ B(LdaConstant), U8(11),
-                B(Star), R(0),
-  /*  166 S> */ B(LdaConstant), U8(12),
-                B(Star), R(0),
-  /*  178 S> */ B(LdaConstant), U8(13),
-                B(Star), R(0),
-  /*  190 S> */ B(LdaConstant), U8(14),
-                B(Star), R(0),
-  /*  202 S> */ B(LdaConstant), U8(15),
-                B(Star), R(0),
-  /*  214 S> */ B(LdaConstant), U8(16),
-                B(Star), R(0),
-  /*  226 S> */ B(LdaConstant), U8(17),
-                B(Star), R(0),
-  /*  238 S> */ B(LdaConstant), U8(18),
-                B(Star), R(0),
-  /*  250 S> */ B(LdaConstant), U8(19),
-                B(Star), R(0),
-  /*  262 S> */ B(LdaConstant), U8(20),
-                B(Star), R(0),
-  /*  274 S> */ B(LdaConstant), U8(21),
-                B(Star), R(0),
-  /*  286 S> */ B(LdaConstant), U8(22),
-                B(Star), R(0),
-  /*  298 S> */ B(LdaConstant), U8(23),
-                B(Star), R(0),
-  /*  310 S> */ B(LdaConstant), U8(24),
-                B(Star), R(0),
-  /*  322 S> */ B(LdaConstant), U8(25),
-                B(Star), R(0),
-  /*  334 S> */ B(LdaConstant), U8(26),
-                B(Star), R(0),
-  /*  346 S> */ B(LdaConstant), U8(27),
-                B(Star), R(0),
-  /*  358 S> */ B(LdaConstant), U8(28),
-                B(Star), R(0),
-  /*  370 S> */ B(LdaConstant), U8(29),
-                B(Star), R(0),
-  /*  382 S> */ B(LdaConstant), U8(30),
-                B(Star), R(0),
-  /*  394 S> */ B(LdaConstant), U8(31),
-                B(Star), R(0),
-  /*  406 S> */ B(LdaConstant), U8(32),
-                B(Star), R(0),
-  /*  418 S> */ B(LdaConstant), U8(33),
-                B(Star), R(0),
-  /*  430 S> */ B(LdaConstant), U8(34),
-                B(Star), R(0),
-  /*  442 S> */ B(LdaConstant), U8(35),
-                B(Star), R(0),
-  /*  454 S> */ B(LdaConstant), U8(36),
-                B(Star), R(0),
-  /*  466 S> */ B(LdaConstant), U8(37),
-                B(Star), R(0),
-  /*  478 S> */ B(LdaConstant), U8(38),
-                B(Star), R(0),
-  /*  490 S> */ B(LdaConstant), U8(39),
-                B(Star), R(0),
-  /*  502 S> */ B(LdaConstant), U8(40),
-                B(Star), R(0),
-  /*  514 S> */ B(LdaConstant), U8(41),
-                B(Star), R(0),
-  /*  526 S> */ B(LdaConstant), U8(42),
-                B(Star), R(0),
-  /*  538 S> */ B(LdaConstant), U8(43),
-                B(Star), R(0),
-  /*  550 S> */ B(LdaConstant), U8(44),
-                B(Star), R(0),
-  /*  562 S> */ B(LdaConstant), U8(45),
-                B(Star), R(0),
-  /*  574 S> */ B(LdaConstant), U8(46),
-                B(Star), R(0),
-  /*  586 S> */ B(LdaConstant), U8(47),
-                B(Star), R(0),
-  /*  598 S> */ B(LdaConstant), U8(48),
-                B(Star), R(0),
-  /*  610 S> */ B(LdaConstant), U8(49),
-                B(Star), R(0),
-  /*  622 S> */ B(LdaConstant), U8(50),
-                B(Star), R(0),
-  /*  634 S> */ B(LdaConstant), U8(51),
-                B(Star), R(0),
-  /*  646 S> */ B(LdaConstant), U8(52),
-                B(Star), R(0),
-  /*  658 S> */ B(LdaConstant), U8(53),
-                B(Star), R(0),
-  /*  670 S> */ B(LdaConstant), U8(54),
-                B(Star), R(0),
-  /*  682 S> */ B(LdaConstant), U8(55),
-                B(Star), R(0),
-  /*  694 S> */ B(LdaConstant), U8(56),
-                B(Star), R(0),
-  /*  706 S> */ B(LdaConstant), U8(57),
-                B(Star), R(0),
-  /*  718 S> */ B(LdaConstant), U8(58),
-                B(Star), R(0),
-  /*  730 S> */ B(LdaConstant), U8(59),
-                B(Star), R(0),
-  /*  742 S> */ B(LdaConstant), U8(60),
-                B(Star), R(0),
-  /*  754 S> */ B(LdaConstant), U8(61),
-                B(Star), R(0),
-  /*  766 S> */ B(LdaConstant), U8(62),
-                B(Star), R(0),
-  /*  778 S> */ B(LdaConstant), U8(63),
-                B(Star), R(0),
-  /*  790 S> */ B(LdaConstant), U8(64),
-                B(Star), R(0),
-  /*  802 S> */ B(LdaConstant), U8(65),
-                B(Star), R(0),
-  /*  814 S> */ B(LdaConstant), U8(66),
-                B(Star), R(0),
-  /*  826 S> */ B(LdaConstant), U8(67),
-                B(Star), R(0),
-  /*  838 S> */ B(LdaConstant), U8(68),
-                B(Star), R(0),
-  /*  850 S> */ B(LdaConstant), U8(69),
-                B(Star), R(0),
-  /*  862 S> */ B(LdaConstant), U8(70),
-                B(Star), R(0),
-  /*  874 S> */ B(LdaConstant), U8(71),
-                B(Star), R(0),
-  /*  886 S> */ B(LdaConstant), U8(72),
-                B(Star), R(0),
-  /*  898 S> */ B(LdaConstant), U8(73),
-                B(Star), R(0),
-  /*  910 S> */ B(LdaConstant), U8(74),
-                B(Star), R(0),
-  /*  922 S> */ B(LdaConstant), U8(75),
-                B(Star), R(0),
-  /*  934 S> */ B(LdaConstant), U8(76),
-                B(Star), R(0),
-  /*  946 S> */ B(LdaConstant), U8(77),
-                B(Star), R(0),
-  /*  958 S> */ B(LdaConstant), U8(78),
-                B(Star), R(0),
-  /*  970 S> */ B(LdaConstant), U8(79),
-                B(Star), R(0),
-  /*  982 S> */ B(LdaConstant), U8(80),
-                B(Star), R(0),
-  /*  994 S> */ B(LdaConstant), U8(81),
-                B(Star), R(0),
-  /* 1006 S> */ B(LdaConstant), U8(82),
-                B(Star), R(0),
-  /* 1018 S> */ B(LdaConstant), U8(83),
-                B(Star), R(0),
-  /* 1030 S> */ B(LdaConstant), U8(84),
-                B(Star), R(0),
-  /* 1042 S> */ B(LdaConstant), U8(85),
-                B(Star), R(0),
-  /* 1054 S> */ B(LdaConstant), U8(86),
-                B(Star), R(0),
-  /* 1066 S> */ B(LdaConstant), U8(87),
-                B(Star), R(0),
-  /* 1078 S> */ B(LdaConstant), U8(88),
-                B(Star), R(0),
-  /* 1090 S> */ B(LdaConstant), U8(89),
-                B(Star), R(0),
-  /* 1102 S> */ B(LdaConstant), U8(90),
-                B(Star), R(0),
-  /* 1114 S> */ B(LdaConstant), U8(91),
-                B(Star), R(0),
-  /* 1126 S> */ B(LdaConstant), U8(92),
-                B(Star), R(0),
-  /* 1138 S> */ B(LdaConstant), U8(93),
-                B(Star), R(0),
-  /* 1150 S> */ B(LdaConstant), U8(94),
-                B(Star), R(0),
-  /* 1162 S> */ B(LdaConstant), U8(95),
-                B(Star), R(0),
-  /* 1174 S> */ B(LdaConstant), U8(96),
-                B(Star), R(0),
-  /* 1186 S> */ B(LdaConstant), U8(97),
-                B(Star), R(0),
-  /* 1198 S> */ B(LdaConstant), U8(98),
-                B(Star), R(0),
-  /* 1210 S> */ B(LdaConstant), U8(99),
-                B(Star), R(0),
-  /* 1222 S> */ B(LdaConstant), U8(100),
-                B(Star), R(0),
-  /* 1234 S> */ B(LdaConstant), U8(101),
-                B(Star), R(0),
-  /* 1246 S> */ B(LdaConstant), U8(102),
-                B(Star), R(0),
-  /* 1258 S> */ B(LdaConstant), U8(103),
-                B(Star), R(0),
-  /* 1270 S> */ B(LdaConstant), U8(104),
-                B(Star), R(0),
-  /* 1282 S> */ B(LdaConstant), U8(105),
-                B(Star), R(0),
-  /* 1294 S> */ B(LdaConstant), U8(106),
-                B(Star), R(0),
-  /* 1306 S> */ B(LdaConstant), U8(107),
-                B(Star), R(0),
-  /* 1318 S> */ B(LdaConstant), U8(108),
-                B(Star), R(0),
-  /* 1330 S> */ B(LdaConstant), U8(109),
-                B(Star), R(0),
-  /* 1342 S> */ B(LdaConstant), U8(110),
-                B(Star), R(0),
-  /* 1354 S> */ B(LdaConstant), U8(111),
-                B(Star), R(0),
-  /* 1366 S> */ B(LdaConstant), U8(112),
-                B(Star), R(0),
-  /* 1378 S> */ B(LdaConstant), U8(113),
-                B(Star), R(0),
-  /* 1390 S> */ B(LdaConstant), U8(114),
-                B(Star), R(0),
-  /* 1402 S> */ B(LdaConstant), U8(115),
-                B(Star), R(0),
-  /* 1414 S> */ B(LdaConstant), U8(116),
-                B(Star), R(0),
-  /* 1426 S> */ B(LdaConstant), U8(117),
-                B(Star), R(0),
-  /* 1438 S> */ B(LdaConstant), U8(118),
-                B(Star), R(0),
-  /* 1450 S> */ B(LdaConstant), U8(119),
-                B(Star), R(0),
-  /* 1462 S> */ B(LdaConstant), U8(120),
-                B(Star), R(0),
-  /* 1474 S> */ B(LdaConstant), U8(121),
-                B(Star), R(0),
-  /* 1486 S> */ B(LdaConstant), U8(122),
-                B(Star), R(0),
-  /* 1498 S> */ B(LdaConstant), U8(123),
-                B(Star), R(0),
-  /* 1510 S> */ B(LdaConstant), U8(124),
-                B(Star), R(0),
-  /* 1522 S> */ B(LdaConstant), U8(125),
-                B(Star), R(0),
-  /* 1534 S> */ B(LdaConstant), U8(126),
-                B(Star), R(0),
-  /* 1546 S> */ B(LdaConstant), U8(127),
-                B(Star), R(0),
-  /* 1558 S> */ B(LdaConstant), U8(128),
-                B(Star), R(0),
-  /* 1570 S> */ B(LdaConstant), U8(129),
-                B(Star), R(0),
-  /* 1582 S> */ B(LdaConstant), U8(130),
-                B(Star), R(0),
-  /* 1594 S> */ B(LdaConstant), U8(131),
-                B(Star), R(0),
-  /* 1606 S> */ B(LdaConstant), U8(132),
-                B(Star), R(0),
-  /* 1618 S> */ B(LdaConstant), U8(133),
-                B(Star), R(0),
-  /* 1630 S> */ B(LdaConstant), U8(134),
-                B(Star), R(0),
-  /* 1642 S> */ B(LdaConstant), U8(135),
-                B(Star), R(0),
-  /* 1654 S> */ B(LdaConstant), U8(136),
-                B(Star), R(0),
-  /* 1666 S> */ B(LdaConstant), U8(137),
-                B(Star), R(0),
-  /* 1678 S> */ B(LdaConstant), U8(138),
-                B(Star), R(0),
-  /* 1690 S> */ B(LdaConstant), U8(139),
-                B(Star), R(0),
-  /* 1702 S> */ B(LdaConstant), U8(140),
-                B(Star), R(0),
-  /* 1714 S> */ B(LdaConstant), U8(141),
-                B(Star), R(0),
-  /* 1726 S> */ B(LdaConstant), U8(142),
-                B(Star), R(0),
-  /* 1738 S> */ B(LdaConstant), U8(143),
-                B(Star), R(0),
-  /* 1750 S> */ B(LdaConstant), U8(144),
-                B(Star), R(0),
-  /* 1762 S> */ B(LdaConstant), U8(145),
-                B(Star), R(0),
-  /* 1774 S> */ B(LdaConstant), U8(146),
-                B(Star), R(0),
-  /* 1786 S> */ B(LdaConstant), U8(147),
-                B(Star), R(0),
-  /* 1798 S> */ B(LdaConstant), U8(148),
-                B(Star), R(0),
-  /* 1810 S> */ B(LdaConstant), U8(149),
-                B(Star), R(0),
-  /* 1822 S> */ B(LdaConstant), U8(150),
-                B(Star), R(0),
-  /* 1834 S> */ B(LdaConstant), U8(151),
-                B(Star), R(0),
-  /* 1846 S> */ B(LdaConstant), U8(152),
-                B(Star), R(0),
-  /* 1858 S> */ B(LdaConstant), U8(153),
-                B(Star), R(0),
-  /* 1870 S> */ B(LdaConstant), U8(154),
-                B(Star), R(0),
-  /* 1882 S> */ B(LdaConstant), U8(155),
-                B(Star), R(0),
-  /* 1894 S> */ B(LdaConstant), U8(156),
-                B(Star), R(0),
-  /* 1906 S> */ B(LdaConstant), U8(157),
-                B(Star), R(0),
-  /* 1918 S> */ B(LdaConstant), U8(158),
-                B(Star), R(0),
-  /* 1930 S> */ B(LdaConstant), U8(159),
-                B(Star), R(0),
-  /* 1942 S> */ B(LdaConstant), U8(160),
-                B(Star), R(0),
-  /* 1954 S> */ B(LdaConstant), U8(161),
-                B(Star), R(0),
-  /* 1966 S> */ B(LdaConstant), U8(162),
-                B(Star), R(0),
-  /* 1978 S> */ B(LdaConstant), U8(163),
-                B(Star), R(0),
-  /* 1990 S> */ B(LdaConstant), U8(164),
-                B(Star), R(0),
-  /* 2002 S> */ B(LdaConstant), U8(165),
-                B(Star), R(0),
-  /* 2014 S> */ B(LdaConstant), U8(166),
-                B(Star), R(0),
-  /* 2026 S> */ B(LdaConstant), U8(167),
-                B(Star), R(0),
-  /* 2038 S> */ B(LdaConstant), U8(168),
-                B(Star), R(0),
-  /* 2050 S> */ B(LdaConstant), U8(169),
-                B(Star), R(0),
-  /* 2062 S> */ B(LdaConstant), U8(170),
-                B(Star), R(0),
-  /* 2074 S> */ B(LdaConstant), U8(171),
-                B(Star), R(0),
-  /* 2086 S> */ B(LdaConstant), U8(172),
-                B(Star), R(0),
-  /* 2098 S> */ B(LdaConstant), U8(173),
-                B(Star), R(0),
-  /* 2110 S> */ B(LdaConstant), U8(174),
-                B(Star), R(0),
-  /* 2122 S> */ B(LdaConstant), U8(175),
-                B(Star), R(0),
-  /* 2134 S> */ B(LdaConstant), U8(176),
-                B(Star), R(0),
-  /* 2146 S> */ B(LdaConstant), U8(177),
-                B(Star), R(0),
-  /* 2158 S> */ B(LdaConstant), U8(178),
-                B(Star), R(0),
-  /* 2170 S> */ B(LdaConstant), U8(179),
-                B(Star), R(0),
-  /* 2182 S> */ B(LdaConstant), U8(180),
-                B(Star), R(0),
-  /* 2194 S> */ B(LdaConstant), U8(181),
-                B(Star), R(0),
-  /* 2206 S> */ B(LdaConstant), U8(182),
-                B(Star), R(0),
-  /* 2218 S> */ B(LdaConstant), U8(183),
-                B(Star), R(0),
-  /* 2230 S> */ B(LdaConstant), U8(184),
-                B(Star), R(0),
-  /* 2242 S> */ B(LdaConstant), U8(185),
-                B(Star), R(0),
-  /* 2254 S> */ B(LdaConstant), U8(186),
-                B(Star), R(0),
-  /* 2266 S> */ B(LdaConstant), U8(187),
-                B(Star), R(0),
-  /* 2278 S> */ B(LdaConstant), U8(188),
-                B(Star), R(0),
-  /* 2290 S> */ B(LdaConstant), U8(189),
-                B(Star), R(0),
-  /* 2302 S> */ B(LdaConstant), U8(190),
-                B(Star), R(0),
-  /* 2314 S> */ B(LdaConstant), U8(191),
-                B(Star), R(0),
-  /* 2326 S> */ B(LdaConstant), U8(192),
-                B(Star), R(0),
-  /* 2338 S> */ B(LdaConstant), U8(193),
-                B(Star), R(0),
-  /* 2350 S> */ B(LdaConstant), U8(194),
-                B(Star), R(0),
-  /* 2362 S> */ B(LdaConstant), U8(195),
-                B(Star), R(0),
-  /* 2374 S> */ B(LdaConstant), U8(196),
-                B(Star), R(0),
-  /* 2386 S> */ B(LdaConstant), U8(197),
-                B(Star), R(0),
-  /* 2398 S> */ B(LdaConstant), U8(198),
-                B(Star), R(0),
-  /* 2410 S> */ B(LdaConstant), U8(199),
-                B(Star), R(0),
-  /* 2422 S> */ B(LdaConstant), U8(200),
-                B(Star), R(0),
-  /* 2434 S> */ B(LdaConstant), U8(201),
-                B(Star), R(0),
-  /* 2446 S> */ B(LdaConstant), U8(202),
-                B(Star), R(0),
-  /* 2458 S> */ B(LdaConstant), U8(203),
-                B(Star), R(0),
-  /* 2470 S> */ B(LdaConstant), U8(204),
-                B(Star), R(0),
-  /* 2482 S> */ B(LdaConstant), U8(205),
-                B(Star), R(0),
-  /* 2494 S> */ B(LdaConstant), U8(206),
-                B(Star), R(0),
-  /* 2506 S> */ B(LdaConstant), U8(207),
-                B(Star), R(0),
-  /* 2518 S> */ B(LdaConstant), U8(208),
-                B(Star), R(0),
-  /* 2530 S> */ B(LdaConstant), U8(209),
-                B(Star), R(0),
-  /* 2542 S> */ B(LdaConstant), U8(210),
-                B(Star), R(0),
-  /* 2554 S> */ B(LdaConstant), U8(211),
-                B(Star), R(0),
-  /* 2566 S> */ B(LdaConstant), U8(212),
-                B(Star), R(0),
-  /* 2578 S> */ B(LdaConstant), U8(213),
-                B(Star), R(0),
-  /* 2590 S> */ B(LdaConstant), U8(214),
-                B(Star), R(0),
-  /* 2602 S> */ B(LdaConstant), U8(215),
-                B(Star), R(0),
-  /* 2614 S> */ B(LdaConstant), U8(216),
-                B(Star), R(0),
-  /* 2626 S> */ B(LdaConstant), U8(217),
-                B(Star), R(0),
-  /* 2638 S> */ B(LdaConstant), U8(218),
-                B(Star), R(0),
-  /* 2650 S> */ B(LdaConstant), U8(219),
-                B(Star), R(0),
-  /* 2662 S> */ B(LdaConstant), U8(220),
-                B(Star), R(0),
-  /* 2674 S> */ B(LdaConstant), U8(221),
-                B(Star), R(0),
-  /* 2686 S> */ B(LdaConstant), U8(222),
-                B(Star), R(0),
-  /* 2698 S> */ B(LdaConstant), U8(223),
-                B(Star), R(0),
-  /* 2710 S> */ B(LdaConstant), U8(224),
-                B(Star), R(0),
-  /* 2722 S> */ B(LdaConstant), U8(225),
-                B(Star), R(0),
-  /* 2734 S> */ B(LdaConstant), U8(226),
-                B(Star), R(0),
-  /* 2746 S> */ B(LdaConstant), U8(227),
-                B(Star), R(0),
-  /* 2758 S> */ B(LdaConstant), U8(228),
-                B(Star), R(0),
-  /* 2770 S> */ B(LdaConstant), U8(229),
-                B(Star), R(0),
-  /* 2782 S> */ B(LdaConstant), U8(230),
-                B(Star), R(0),
-  /* 2794 S> */ B(LdaConstant), U8(231),
-                B(Star), R(0),
-  /* 2806 S> */ B(LdaConstant), U8(232),
-                B(Star), R(0),
-  /* 2818 S> */ B(LdaConstant), U8(233),
-                B(Star), R(0),
-  /* 2830 S> */ B(LdaConstant), U8(234),
-                B(Star), R(0),
-  /* 2842 S> */ B(LdaConstant), U8(235),
-                B(Star), R(0),
-  /* 2854 S> */ B(LdaConstant), U8(236),
-                B(Star), R(0),
-  /* 2866 S> */ B(LdaConstant), U8(237),
-                B(Star), R(0),
-  /* 2878 S> */ B(LdaConstant), U8(238),
-                B(Star), R(0),
-  /* 2890 S> */ B(LdaConstant), U8(239),
-                B(Star), R(0),
-  /* 2902 S> */ B(LdaConstant), U8(240),
-                B(Star), R(0),
-  /* 2914 S> */ B(LdaConstant), U8(241),
-                B(Star), R(0),
-  /* 2926 S> */ B(LdaConstant), U8(242),
-                B(Star), R(0),
-  /* 2938 S> */ B(LdaConstant), U8(243),
-                B(Star), R(0),
-  /* 2950 S> */ B(LdaConstant), U8(244),
-                B(Star), R(0),
-  /* 2962 S> */ B(LdaConstant), U8(245),
-                B(Star), R(0),
-  /* 2974 S> */ B(LdaConstant), U8(246),
-                B(Star), R(0),
-  /* 2986 S> */ B(LdaConstant), U8(247),
-                B(Star), R(0),
-  /* 2998 S> */ B(LdaConstant), U8(248),
-                B(Star), R(0),
-  /* 3010 S> */ B(LdaConstant), U8(249),
-                B(Star), R(0),
-  /* 3022 S> */ B(LdaConstant), U8(250),
-                B(Star), R(0),
-  /* 3034 S> */ B(LdaConstant), U8(251),
-                B(Star), R(0),
-  /* 3046 S> */ B(LdaConstant), U8(252),
-                B(Star), R(0),
-  /* 3058 S> */ B(LdaConstant), U8(253),
-                B(Star), R(0),
-  /* 3070 S> */ B(LdaConstant), U8(254),
-                B(Star), R(0),
-  /* 3082 S> */ B(LdaConstant), U8(255),
-                B(Star), R(0),
-  /* 3086 S> */ B(Wide), B(LdaLookupGlobalSlot), U16(256), U16(0), U16(1),
-  /* 3095 S> */ B(Return),
-]
-constant pool: [
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  ONE_BYTE_INTERNALIZED_STRING_TYPE ["x"],
-]
-handlers: [
-]
-
----
-snippet: "
-  var f;
-  var x = 1;
-  function f1() {
-    eval(\"function t() {\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"return typeof x;\" +
-    \"};\" +
-    \"f = t; f();\"
-  );
-  }
-  f1();
-"
-frame size: 1
-parameter count: 1
-bytecode array length: 1035
-bytecodes: [
-  /*   10 E> */ B(StackCheck),
-  /*   22 S> */ B(LdaConstant), U8(0),
-                B(Star), R(0),
-  /*   34 S> */ B(LdaConstant), U8(1),
-                B(Star), R(0),
-  /*   46 S> */ B(LdaConstant), U8(2),
-                B(Star), R(0),
-  /*   58 S> */ B(LdaConstant), U8(3),
-                B(Star), R(0),
-  /*   70 S> */ B(LdaConstant), U8(4),
-                B(Star), R(0),
-  /*   82 S> */ B(LdaConstant), U8(5),
-                B(Star), R(0),
-  /*   94 S> */ B(LdaConstant), U8(6),
-                B(Star), R(0),
-  /*  106 S> */ B(LdaConstant), U8(7),
-                B(Star), R(0),
-  /*  118 S> */ B(LdaConstant), U8(8),
-                B(Star), R(0),
-  /*  130 S> */ B(LdaConstant), U8(9),
-                B(Star), R(0),
-  /*  142 S> */ B(LdaConstant), U8(10),
-                B(Star), R(0),
-  /*  154 S> */ B(LdaConstant), U8(11),
-                B(Star), R(0),
-  /*  166 S> */ B(LdaConstant), U8(12),
-                B(Star), R(0),
-  /*  178 S> */ B(LdaConstant), U8(13),
-                B(Star), R(0),
-  /*  190 S> */ B(LdaConstant), U8(14),
-                B(Star), R(0),
-  /*  202 S> */ B(LdaConstant), U8(15),
-                B(Star), R(0),
-  /*  214 S> */ B(LdaConstant), U8(16),
-                B(Star), R(0),
-  /*  226 S> */ B(LdaConstant), U8(17),
-                B(Star), R(0),
-  /*  238 S> */ B(LdaConstant), U8(18),
-                B(Star), R(0),
-  /*  250 S> */ B(LdaConstant), U8(19),
-                B(Star), R(0),
-  /*  262 S> */ B(LdaConstant), U8(20),
-                B(Star), R(0),
-  /*  274 S> */ B(LdaConstant), U8(21),
-                B(Star), R(0),
-  /*  286 S> */ B(LdaConstant), U8(22),
-                B(Star), R(0),
-  /*  298 S> */ B(LdaConstant), U8(23),
-                B(Star), R(0),
-  /*  310 S> */ B(LdaConstant), U8(24),
-                B(Star), R(0),
-  /*  322 S> */ B(LdaConstant), U8(25),
-                B(Star), R(0),
-  /*  334 S> */ B(LdaConstant), U8(26),
-                B(Star), R(0),
-  /*  346 S> */ B(LdaConstant), U8(27),
-                B(Star), R(0),
-  /*  358 S> */ B(LdaConstant), U8(28),
-                B(Star), R(0),
-  /*  370 S> */ B(LdaConstant), U8(29),
-                B(Star), R(0),
-  /*  382 S> */ B(LdaConstant), U8(30),
-                B(Star), R(0),
-  /*  394 S> */ B(LdaConstant), U8(31),
-                B(Star), R(0),
-  /*  406 S> */ B(LdaConstant), U8(32),
-                B(Star), R(0),
-  /*  418 S> */ B(LdaConstant), U8(33),
-                B(Star), R(0),
-  /*  430 S> */ B(LdaConstant), U8(34),
-                B(Star), R(0),
-  /*  442 S> */ B(LdaConstant), U8(35),
-                B(Star), R(0),
-  /*  454 S> */ B(LdaConstant), U8(36),
-                B(Star), R(0),
-  /*  466 S> */ B(LdaConstant), U8(37),
-                B(Star), R(0),
-  /*  478 S> */ B(LdaConstant), U8(38),
-                B(Star), R(0),
-  /*  490 S> */ B(LdaConstant), U8(39),
-                B(Star), R(0),
-  /*  502 S> */ B(LdaConstant), U8(40),
-                B(Star), R(0),
-  /*  514 S> */ B(LdaConstant), U8(41),
-                B(Star), R(0),
-  /*  526 S> */ B(LdaConstant), U8(42),
-                B(Star), R(0),
-  /*  538 S> */ B(LdaConstant), U8(43),
-                B(Star), R(0),
-  /*  550 S> */ B(LdaConstant), U8(44),
-                B(Star), R(0),
-  /*  562 S> */ B(LdaConstant), U8(45),
-                B(Star), R(0),
-  /*  574 S> */ B(LdaConstant), U8(46),
-                B(Star), R(0),
-  /*  586 S> */ B(LdaConstant), U8(47),
-                B(Star), R(0),
-  /*  598 S> */ B(LdaConstant), U8(48),
-                B(Star), R(0),
-  /*  610 S> */ B(LdaConstant), U8(49),
-                B(Star), R(0),
-  /*  622 S> */ B(LdaConstant), U8(50),
-                B(Star), R(0),
-  /*  634 S> */ B(LdaConstant), U8(51),
-                B(Star), R(0),
-  /*  646 S> */ B(LdaConstant), U8(52),
-                B(Star), R(0),
-  /*  658 S> */ B(LdaConstant), U8(53),
-                B(Star), R(0),
-  /*  670 S> */ B(LdaConstant), U8(54),
-                B(Star), R(0),
-  /*  682 S> */ B(LdaConstant), U8(55),
-                B(Star), R(0),
-  /*  694 S> */ B(LdaConstant), U8(56),
-                B(Star), R(0),
-  /*  706 S> */ B(LdaConstant), U8(57),
-                B(Star), R(0),
-  /*  718 S> */ B(LdaConstant), U8(58),
-                B(Star), R(0),
-  /*  730 S> */ B(LdaConstant), U8(59),
-                B(Star), R(0),
-  /*  742 S> */ B(LdaConstant), U8(60),
-                B(Star), R(0),
-  /*  754 S> */ B(LdaConstant), U8(61),
-                B(Star), R(0),
-  /*  766 S> */ B(LdaConstant), U8(62),
-                B(Star), R(0),
-  /*  778 S> */ B(LdaConstant), U8(63),
-                B(Star), R(0),
-  /*  790 S> */ B(LdaConstant), U8(64),
-                B(Star), R(0),
-  /*  802 S> */ B(LdaConstant), U8(65),
-                B(Star), R(0),
-  /*  814 S> */ B(LdaConstant), U8(66),
-                B(Star), R(0),
-  /*  826 S> */ B(LdaConstant), U8(67),
-                B(Star), R(0),
-  /*  838 S> */ B(LdaConstant), U8(68),
-                B(Star), R(0),
-  /*  850 S> */ B(LdaConstant), U8(69),
-                B(Star), R(0),
-  /*  862 S> */ B(LdaConstant), U8(70),
-                B(Star), R(0),
-  /*  874 S> */ B(LdaConstant), U8(71),
-                B(Star), R(0),
-  /*  886 S> */ B(LdaConstant), U8(72),
-                B(Star), R(0),
-  /*  898 S> */ B(LdaConstant), U8(73),
-                B(Star), R(0),
-  /*  910 S> */ B(LdaConstant), U8(74),
-                B(Star), R(0),
-  /*  922 S> */ B(LdaConstant), U8(75),
-                B(Star), R(0),
-  /*  934 S> */ B(LdaConstant), U8(76),
-                B(Star), R(0),
-  /*  946 S> */ B(LdaConstant), U8(77),
-                B(Star), R(0),
-  /*  958 S> */ B(LdaConstant), U8(78),
-                B(Star), R(0),
-  /*  970 S> */ B(LdaConstant), U8(79),
-                B(Star), R(0),
-  /*  982 S> */ B(LdaConstant), U8(80),
-                B(Star), R(0),
-  /*  994 S> */ B(LdaConstant), U8(81),
-                B(Star), R(0),
-  /* 1006 S> */ B(LdaConstant), U8(82),
-                B(Star), R(0),
-  /* 1018 S> */ B(LdaConstant), U8(83),
-                B(Star), R(0),
-  /* 1030 S> */ B(LdaConstant), U8(84),
-                B(Star), R(0),
-  /* 1042 S> */ B(LdaConstant), U8(85),
-                B(Star), R(0),
-  /* 1054 S> */ B(LdaConstant), U8(86),
-                B(Star), R(0),
-  /* 1066 S> */ B(LdaConstant), U8(87),
-                B(Star), R(0),
-  /* 1078 S> */ B(LdaConstant), U8(88),
-                B(Star), R(0),
-  /* 1090 S> */ B(LdaConstant), U8(89),
-                B(Star), R(0),
-  /* 1102 S> */ B(LdaConstant), U8(90),
-                B(Star), R(0),
-  /* 1114 S> */ B(LdaConstant), U8(91),
-                B(Star), R(0),
-  /* 1126 S> */ B(LdaConstant), U8(92),
-                B(Star), R(0),
-  /* 1138 S> */ B(LdaConstant), U8(93),
-                B(Star), R(0),
-  /* 1150 S> */ B(LdaConstant), U8(94),
-                B(Star), R(0),
-  /* 1162 S> */ B(LdaConstant), U8(95),
-                B(Star), R(0),
-  /* 1174 S> */ B(LdaConstant), U8(96),
-                B(Star), R(0),
-  /* 1186 S> */ B(LdaConstant), U8(97),
-                B(Star), R(0),
-  /* 1198 S> */ B(LdaConstant), U8(98),
-                B(Star), R(0),
-  /* 1210 S> */ B(LdaConstant), U8(99),
-                B(Star), R(0),
-  /* 1222 S> */ B(LdaConstant), U8(100),
-                B(Star), R(0),
-  /* 1234 S> */ B(LdaConstant), U8(101),
-                B(Star), R(0),
-  /* 1246 S> */ B(LdaConstant), U8(102),
-                B(Star), R(0),
-  /* 1258 S> */ B(LdaConstant), U8(103),
-                B(Star), R(0),
-  /* 1270 S> */ B(LdaConstant), U8(104),
-                B(Star), R(0),
-  /* 1282 S> */ B(LdaConstant), U8(105),
-                B(Star), R(0),
-  /* 1294 S> */ B(LdaConstant), U8(106),
-                B(Star), R(0),
-  /* 1306 S> */ B(LdaConstant), U8(107),
-                B(Star), R(0),
-  /* 1318 S> */ B(LdaConstant), U8(108),
-                B(Star), R(0),
-  /* 1330 S> */ B(LdaConstant), U8(109),
-                B(Star), R(0),
-  /* 1342 S> */ B(LdaConstant), U8(110),
-                B(Star), R(0),
-  /* 1354 S> */ B(LdaConstant), U8(111),
-                B(Star), R(0),
-  /* 1366 S> */ B(LdaConstant), U8(112),
-                B(Star), R(0),
-  /* 1378 S> */ B(LdaConstant), U8(113),
-                B(Star), R(0),
-  /* 1390 S> */ B(LdaConstant), U8(114),
-                B(Star), R(0),
-  /* 1402 S> */ B(LdaConstant), U8(115),
-                B(Star), R(0),
-  /* 1414 S> */ B(LdaConstant), U8(116),
-                B(Star), R(0),
-  /* 1426 S> */ B(LdaConstant), U8(117),
-                B(Star), R(0),
-  /* 1438 S> */ B(LdaConstant), U8(118),
-                B(Star), R(0),
-  /* 1450 S> */ B(LdaConstant), U8(119),
-                B(Star), R(0),
-  /* 1462 S> */ B(LdaConstant), U8(120),
-                B(Star), R(0),
-  /* 1474 S> */ B(LdaConstant), U8(121),
-                B(Star), R(0),
-  /* 1486 S> */ B(LdaConstant), U8(122),
-                B(Star), R(0),
-  /* 1498 S> */ B(LdaConstant), U8(123),
-                B(Star), R(0),
-  /* 1510 S> */ B(LdaConstant), U8(124),
-                B(Star), R(0),
-  /* 1522 S> */ B(LdaConstant), U8(125),
-                B(Star), R(0),
-  /* 1534 S> */ B(LdaConstant), U8(126),
-                B(Star), R(0),
-  /* 1546 S> */ B(LdaConstant), U8(127),
-                B(Star), R(0),
-  /* 1558 S> */ B(LdaConstant), U8(128),
-                B(Star), R(0),
-  /* 1570 S> */ B(LdaConstant), U8(129),
-                B(Star), R(0),
-  /* 1582 S> */ B(LdaConstant), U8(130),
-                B(Star), R(0),
-  /* 1594 S> */ B(LdaConstant), U8(131),
-                B(Star), R(0),
-  /* 1606 S> */ B(LdaConstant), U8(132),
-                B(Star), R(0),
-  /* 1618 S> */ B(LdaConstant), U8(133),
-                B(Star), R(0),
-  /* 1630 S> */ B(LdaConstant), U8(134),
-                B(Star), R(0),
-  /* 1642 S> */ B(LdaConstant), U8(135),
-                B(Star), R(0),
-  /* 1654 S> */ B(LdaConstant), U8(136),
-                B(Star), R(0),
-  /* 1666 S> */ B(LdaConstant), U8(137),
-                B(Star), R(0),
-  /* 1678 S> */ B(LdaConstant), U8(138),
-                B(Star), R(0),
-  /* 1690 S> */ B(LdaConstant), U8(139),
-                B(Star), R(0),
-  /* 1702 S> */ B(LdaConstant), U8(140),
-                B(Star), R(0),
-  /* 1714 S> */ B(LdaConstant), U8(141),
-                B(Star), R(0),
-  /* 1726 S> */ B(LdaConstant), U8(142),
-                B(Star), R(0),
-  /* 1738 S> */ B(LdaConstant), U8(143),
-                B(Star), R(0),
-  /* 1750 S> */ B(LdaConstant), U8(144),
-                B(Star), R(0),
-  /* 1762 S> */ B(LdaConstant), U8(145),
-                B(Star), R(0),
-  /* 1774 S> */ B(LdaConstant), U8(146),
-                B(Star), R(0),
-  /* 1786 S> */ B(LdaConstant), U8(147),
-                B(Star), R(0),
-  /* 1798 S> */ B(LdaConstant), U8(148),
-                B(Star), R(0),
-  /* 1810 S> */ B(LdaConstant), U8(149),
-                B(Star), R(0),
-  /* 1822 S> */ B(LdaConstant), U8(150),
-                B(Star), R(0),
-  /* 1834 S> */ B(LdaConstant), U8(151),
-                B(Star), R(0),
-  /* 1846 S> */ B(LdaConstant), U8(152),
-                B(Star), R(0),
-  /* 1858 S> */ B(LdaConstant), U8(153),
-                B(Star), R(0),
-  /* 1870 S> */ B(LdaConstant), U8(154),
-                B(Star), R(0),
-  /* 1882 S> */ B(LdaConstant), U8(155),
-                B(Star), R(0),
-  /* 1894 S> */ B(LdaConstant), U8(156),
-                B(Star), R(0),
-  /* 1906 S> */ B(LdaConstant), U8(157),
-                B(Star), R(0),
-  /* 1918 S> */ B(LdaConstant), U8(158),
-                B(Star), R(0),
-  /* 1930 S> */ B(LdaConstant), U8(159),
-                B(Star), R(0),
-  /* 1942 S> */ B(LdaConstant), U8(160),
-                B(Star), R(0),
-  /* 1954 S> */ B(LdaConstant), U8(161),
-                B(Star), R(0),
-  /* 1966 S> */ B(LdaConstant), U8(162),
-                B(Star), R(0),
-  /* 1978 S> */ B(LdaConstant), U8(163),
-                B(Star), R(0),
-  /* 1990 S> */ B(LdaConstant), U8(164),
-                B(Star), R(0),
-  /* 2002 S> */ B(LdaConstant), U8(165),
-                B(Star), R(0),
-  /* 2014 S> */ B(LdaConstant), U8(166),
-                B(Star), R(0),
-  /* 2026 S> */ B(LdaConstant), U8(167),
-                B(Star), R(0),
-  /* 2038 S> */ B(LdaConstant), U8(168),
-                B(Star), R(0),
-  /* 2050 S> */ B(LdaConstant), U8(169),
-                B(Star), R(0),
-  /* 2062 S> */ B(LdaConstant), U8(170),
-                B(Star), R(0),
-  /* 2074 S> */ B(LdaConstant), U8(171),
-                B(Star), R(0),
-  /* 2086 S> */ B(LdaConstant), U8(172),
-                B(Star), R(0),
-  /* 2098 S> */ B(LdaConstant), U8(173),
-                B(Star), R(0),
-  /* 2110 S> */ B(LdaConstant), U8(174),
-                B(Star), R(0),
-  /* 2122 S> */ B(LdaConstant), U8(175),
-                B(Star), R(0),
-  /* 2134 S> */ B(LdaConstant), U8(176),
-                B(Star), R(0),
-  /* 2146 S> */ B(LdaConstant), U8(177),
-                B(Star), R(0),
-  /* 2158 S> */ B(LdaConstant), U8(178),
-                B(Star), R(0),
-  /* 2170 S> */ B(LdaConstant), U8(179),
-                B(Star), R(0),
-  /* 2182 S> */ B(LdaConstant), U8(180),
-                B(Star), R(0),
-  /* 2194 S> */ B(LdaConstant), U8(181),
-                B(Star), R(0),
-  /* 2206 S> */ B(LdaConstant), U8(182),
-                B(Star), R(0),
-  /* 2218 S> */ B(LdaConstant), U8(183),
-                B(Star), R(0),
-  /* 2230 S> */ B(LdaConstant), U8(184),
-                B(Star), R(0),
-  /* 2242 S> */ B(LdaConstant), U8(185),
-                B(Star), R(0),
-  /* 2254 S> */ B(LdaConstant), U8(186),
-                B(Star), R(0),
-  /* 2266 S> */ B(LdaConstant), U8(187),
-                B(Star), R(0),
-  /* 2278 S> */ B(LdaConstant), U8(188),
-                B(Star), R(0),
-  /* 2290 S> */ B(LdaConstant), U8(189),
-                B(Star), R(0),
-  /* 2302 S> */ B(LdaConstant), U8(190),
-                B(Star), R(0),
-  /* 2314 S> */ B(LdaConstant), U8(191),
-                B(Star), R(0),
-  /* 2326 S> */ B(LdaConstant), U8(192),
-                B(Star), R(0),
-  /* 2338 S> */ B(LdaConstant), U8(193),
-                B(Star), R(0),
-  /* 2350 S> */ B(LdaConstant), U8(194),
-                B(Star), R(0),
-  /* 2362 S> */ B(LdaConstant), U8(195),
-                B(Star), R(0),
-  /* 2374 S> */ B(LdaConstant), U8(196),
-                B(Star), R(0),
-  /* 2386 S> */ B(LdaConstant), U8(197),
-                B(Star), R(0),
-  /* 2398 S> */ B(LdaConstant), U8(198),
-                B(Star), R(0),
-  /* 2410 S> */ B(LdaConstant), U8(199),
-                B(Star), R(0),
-  /* 2422 S> */ B(LdaConstant), U8(200),
-                B(Star), R(0),
-  /* 2434 S> */ B(LdaConstant), U8(201),
-                B(Star), R(0),
-  /* 2446 S> */ B(LdaConstant), U8(202),
-                B(Star), R(0),
-  /* 2458 S> */ B(LdaConstant), U8(203),
-                B(Star), R(0),
-  /* 2470 S> */ B(LdaConstant), U8(204),
-                B(Star), R(0),
-  /* 2482 S> */ B(LdaConstant), U8(205),
-                B(Star), R(0),
-  /* 2494 S> */ B(LdaConstant), U8(206),
-                B(Star), R(0),
-  /* 2506 S> */ B(LdaConstant), U8(207),
-                B(Star), R(0),
-  /* 2518 S> */ B(LdaConstant), U8(208),
-                B(Star), R(0),
-  /* 2530 S> */ B(LdaConstant), U8(209),
-                B(Star), R(0),
-  /* 2542 S> */ B(LdaConstant), U8(210),
-                B(Star), R(0),
-  /* 2554 S> */ B(LdaConstant), U8(211),
-                B(Star), R(0),
-  /* 2566 S> */ B(LdaConstant), U8(212),
-                B(Star), R(0),
-  /* 2578 S> */ B(LdaConstant), U8(213),
-                B(Star), R(0),
-  /* 2590 S> */ B(LdaConstant), U8(214),
-                B(Star), R(0),
-  /* 2602 S> */ B(LdaConstant), U8(215),
-                B(Star), R(0),
-  /* 2614 S> */ B(LdaConstant), U8(216),
-                B(Star), R(0),
-  /* 2626 S> */ B(LdaConstant), U8(217),
-                B(Star), R(0),
-  /* 2638 S> */ B(LdaConstant), U8(218),
-                B(Star), R(0),
-  /* 2650 S> */ B(LdaConstant), U8(219),
-                B(Star), R(0),
-  /* 2662 S> */ B(LdaConstant), U8(220),
-                B(Star), R(0),
-  /* 2674 S> */ B(LdaConstant), U8(221),
-                B(Star), R(0),
-  /* 2686 S> */ B(LdaConstant), U8(222),
-                B(Star), R(0),
-  /* 2698 S> */ B(LdaConstant), U8(223),
-                B(Star), R(0),
-  /* 2710 S> */ B(LdaConstant), U8(224),
-                B(Star), R(0),
-  /* 2722 S> */ B(LdaConstant), U8(225),
-                B(Star), R(0),
-  /* 2734 S> */ B(LdaConstant), U8(226),
-                B(Star), R(0),
-  /* 2746 S> */ B(LdaConstant), U8(227),
-                B(Star), R(0),
-  /* 2758 S> */ B(LdaConstant), U8(228),
-                B(Star), R(0),
-  /* 2770 S> */ B(LdaConstant), U8(229),
-                B(Star), R(0),
-  /* 2782 S> */ B(LdaConstant), U8(230),
-                B(Star), R(0),
-  /* 2794 S> */ B(LdaConstant), U8(231),
-                B(Star), R(0),
-  /* 2806 S> */ B(LdaConstant), U8(232),
-                B(Star), R(0),
-  /* 2818 S> */ B(LdaConstant), U8(233),
-                B(Star), R(0),
-  /* 2830 S> */ B(LdaConstant), U8(234),
-                B(Star), R(0),
-  /* 2842 S> */ B(LdaConstant), U8(235),
-                B(Star), R(0),
-  /* 2854 S> */ B(LdaConstant), U8(236),
-                B(Star), R(0),
-  /* 2866 S> */ B(LdaConstant), U8(237),
-                B(Star), R(0),
-  /* 2878 S> */ B(LdaConstant), U8(238),
-                B(Star), R(0),
-  /* 2890 S> */ B(LdaConstant), U8(239),
-                B(Star), R(0),
-  /* 2902 S> */ B(LdaConstant), U8(240),
-                B(Star), R(0),
-  /* 2914 S> */ B(LdaConstant), U8(241),
-                B(Star), R(0),
-  /* 2926 S> */ B(LdaConstant), U8(242),
-                B(Star), R(0),
-  /* 2938 S> */ B(LdaConstant), U8(243),
-                B(Star), R(0),
-  /* 2950 S> */ B(LdaConstant), U8(244),
-                B(Star), R(0),
-  /* 2962 S> */ B(LdaConstant), U8(245),
-                B(Star), R(0),
-  /* 2974 S> */ B(LdaConstant), U8(246),
-                B(Star), R(0),
-  /* 2986 S> */ B(LdaConstant), U8(247),
-                B(Star), R(0),
-  /* 2998 S> */ B(LdaConstant), U8(248),
-                B(Star), R(0),
-  /* 3010 S> */ B(LdaConstant), U8(249),
-                B(Star), R(0),
-  /* 3022 S> */ B(LdaConstant), U8(250),
-                B(Star), R(0),
-  /* 3034 S> */ B(LdaConstant), U8(251),
-                B(Star), R(0),
-  /* 3046 S> */ B(LdaConstant), U8(252),
-                B(Star), R(0),
-  /* 3058 S> */ B(LdaConstant), U8(253),
-                B(Star), R(0),
-  /* 3070 S> */ B(LdaConstant), U8(254),
-                B(Star), R(0),
-  /* 3082 S> */ B(LdaConstant), U8(255),
-                B(Star), R(0),
-  /* 3086 S> */ B(Wide), B(LdaLookupGlobalSlotInsideTypeof), U16(256), U16(0), U16(1),
-                B(TypeOf),
-  /* 3102 S> */ B(Return),
-]
-constant pool: [
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  ONE_BYTE_INTERNALIZED_STRING_TYPE ["x"],
-]
-handlers: [
-]
-
----
-snippet: "
-  var f;
-  var x = 1;
-  function f1() {
-    eval(\"function t() {\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"x = 10;\" +
-    \"};\" +
-    \"f = t; f();\"
-  );
-  }
-  f1();
-"
-frame size: 1
-parameter count: 1
-bytecode array length: 1034
-bytecodes: [
-  /*   10 E> */ B(StackCheck),
-  /*   22 S> */ B(LdaConstant), U8(0),
-                B(Star), R(0),
-  /*   34 S> */ B(LdaConstant), U8(1),
-                B(Star), R(0),
-  /*   46 S> */ B(LdaConstant), U8(2),
-                B(Star), R(0),
-  /*   58 S> */ B(LdaConstant), U8(3),
-                B(Star), R(0),
-  /*   70 S> */ B(LdaConstant), U8(4),
-                B(Star), R(0),
-  /*   82 S> */ B(LdaConstant), U8(5),
-                B(Star), R(0),
-  /*   94 S> */ B(LdaConstant), U8(6),
-                B(Star), R(0),
-  /*  106 S> */ B(LdaConstant), U8(7),
-                B(Star), R(0),
-  /*  118 S> */ B(LdaConstant), U8(8),
-                B(Star), R(0),
-  /*  130 S> */ B(LdaConstant), U8(9),
-                B(Star), R(0),
-  /*  142 S> */ B(LdaConstant), U8(10),
-                B(Star), R(0),
-  /*  154 S> */ B(LdaConstant), U8(11),
-                B(Star), R(0),
-  /*  166 S> */ B(LdaConstant), U8(12),
-                B(Star), R(0),
-  /*  178 S> */ B(LdaConstant), U8(13),
-                B(Star), R(0),
-  /*  190 S> */ B(LdaConstant), U8(14),
-                B(Star), R(0),
-  /*  202 S> */ B(LdaConstant), U8(15),
-                B(Star), R(0),
-  /*  214 S> */ B(LdaConstant), U8(16),
-                B(Star), R(0),
-  /*  226 S> */ B(LdaConstant), U8(17),
-                B(Star), R(0),
-  /*  238 S> */ B(LdaConstant), U8(18),
-                B(Star), R(0),
-  /*  250 S> */ B(LdaConstant), U8(19),
-                B(Star), R(0),
-  /*  262 S> */ B(LdaConstant), U8(20),
-                B(Star), R(0),
-  /*  274 S> */ B(LdaConstant), U8(21),
-                B(Star), R(0),
-  /*  286 S> */ B(LdaConstant), U8(22),
-                B(Star), R(0),
-  /*  298 S> */ B(LdaConstant), U8(23),
-                B(Star), R(0),
-  /*  310 S> */ B(LdaConstant), U8(24),
-                B(Star), R(0),
-  /*  322 S> */ B(LdaConstant), U8(25),
-                B(Star), R(0),
-  /*  334 S> */ B(LdaConstant), U8(26),
-                B(Star), R(0),
-  /*  346 S> */ B(LdaConstant), U8(27),
-                B(Star), R(0),
-  /*  358 S> */ B(LdaConstant), U8(28),
-                B(Star), R(0),
-  /*  370 S> */ B(LdaConstant), U8(29),
-                B(Star), R(0),
-  /*  382 S> */ B(LdaConstant), U8(30),
-                B(Star), R(0),
-  /*  394 S> */ B(LdaConstant), U8(31),
-                B(Star), R(0),
-  /*  406 S> */ B(LdaConstant), U8(32),
-                B(Star), R(0),
-  /*  418 S> */ B(LdaConstant), U8(33),
-                B(Star), R(0),
-  /*  430 S> */ B(LdaConstant), U8(34),
-                B(Star), R(0),
-  /*  442 S> */ B(LdaConstant), U8(35),
-                B(Star), R(0),
-  /*  454 S> */ B(LdaConstant), U8(36),
-                B(Star), R(0),
-  /*  466 S> */ B(LdaConstant), U8(37),
-                B(Star), R(0),
-  /*  478 S> */ B(LdaConstant), U8(38),
-                B(Star), R(0),
-  /*  490 S> */ B(LdaConstant), U8(39),
-                B(Star), R(0),
-  /*  502 S> */ B(LdaConstant), U8(40),
-                B(Star), R(0),
-  /*  514 S> */ B(LdaConstant), U8(41),
-                B(Star), R(0),
-  /*  526 S> */ B(LdaConstant), U8(42),
-                B(Star), R(0),
-  /*  538 S> */ B(LdaConstant), U8(43),
-                B(Star), R(0),
-  /*  550 S> */ B(LdaConstant), U8(44),
-                B(Star), R(0),
-  /*  562 S> */ B(LdaConstant), U8(45),
-                B(Star), R(0),
-  /*  574 S> */ B(LdaConstant), U8(46),
-                B(Star), R(0),
-  /*  586 S> */ B(LdaConstant), U8(47),
-                B(Star), R(0),
-  /*  598 S> */ B(LdaConstant), U8(48),
-                B(Star), R(0),
-  /*  610 S> */ B(LdaConstant), U8(49),
-                B(Star), R(0),
-  /*  622 S> */ B(LdaConstant), U8(50),
-                B(Star), R(0),
-  /*  634 S> */ B(LdaConstant), U8(51),
-                B(Star), R(0),
-  /*  646 S> */ B(LdaConstant), U8(52),
-                B(Star), R(0),
-  /*  658 S> */ B(LdaConstant), U8(53),
-                B(Star), R(0),
-  /*  670 S> */ B(LdaConstant), U8(54),
-                B(Star), R(0),
-  /*  682 S> */ B(LdaConstant), U8(55),
-                B(Star), R(0),
-  /*  694 S> */ B(LdaConstant), U8(56),
-                B(Star), R(0),
-  /*  706 S> */ B(LdaConstant), U8(57),
-                B(Star), R(0),
-  /*  718 S> */ B(LdaConstant), U8(58),
-                B(Star), R(0),
-  /*  730 S> */ B(LdaConstant), U8(59),
-                B(Star), R(0),
-  /*  742 S> */ B(LdaConstant), U8(60),
-                B(Star), R(0),
-  /*  754 S> */ B(LdaConstant), U8(61),
-                B(Star), R(0),
-  /*  766 S> */ B(LdaConstant), U8(62),
-                B(Star), R(0),
-  /*  778 S> */ B(LdaConstant), U8(63),
-                B(Star), R(0),
-  /*  790 S> */ B(LdaConstant), U8(64),
-                B(Star), R(0),
-  /*  802 S> */ B(LdaConstant), U8(65),
-                B(Star), R(0),
-  /*  814 S> */ B(LdaConstant), U8(66),
-                B(Star), R(0),
-  /*  826 S> */ B(LdaConstant), U8(67),
-                B(Star), R(0),
-  /*  838 S> */ B(LdaConstant), U8(68),
-                B(Star), R(0),
-  /*  850 S> */ B(LdaConstant), U8(69),
-                B(Star), R(0),
-  /*  862 S> */ B(LdaConstant), U8(70),
-                B(Star), R(0),
-  /*  874 S> */ B(LdaConstant), U8(71),
-                B(Star), R(0),
-  /*  886 S> */ B(LdaConstant), U8(72),
-                B(Star), R(0),
-  /*  898 S> */ B(LdaConstant), U8(73),
-                B(Star), R(0),
-  /*  910 S> */ B(LdaConstant), U8(74),
-                B(Star), R(0),
-  /*  922 S> */ B(LdaConstant), U8(75),
-                B(Star), R(0),
-  /*  934 S> */ B(LdaConstant), U8(76),
-                B(Star), R(0),
-  /*  946 S> */ B(LdaConstant), U8(77),
-                B(Star), R(0),
-  /*  958 S> */ B(LdaConstant), U8(78),
-                B(Star), R(0),
-  /*  970 S> */ B(LdaConstant), U8(79),
-                B(Star), R(0),
-  /*  982 S> */ B(LdaConstant), U8(80),
-                B(Star), R(0),
-  /*  994 S> */ B(LdaConstant), U8(81),
-                B(Star), R(0),
-  /* 1006 S> */ B(LdaConstant), U8(82),
-                B(Star), R(0),
-  /* 1018 S> */ B(LdaConstant), U8(83),
-                B(Star), R(0),
-  /* 1030 S> */ B(LdaConstant), U8(84),
-                B(Star), R(0),
-  /* 1042 S> */ B(LdaConstant), U8(85),
-                B(Star), R(0),
-  /* 1054 S> */ B(LdaConstant), U8(86),
-                B(Star), R(0),
-  /* 1066 S> */ B(LdaConstant), U8(87),
-                B(Star), R(0),
-  /* 1078 S> */ B(LdaConstant), U8(88),
-                B(Star), R(0),
-  /* 1090 S> */ B(LdaConstant), U8(89),
-                B(Star), R(0),
-  /* 1102 S> */ B(LdaConstant), U8(90),
-                B(Star), R(0),
-  /* 1114 S> */ B(LdaConstant), U8(91),
-                B(Star), R(0),
-  /* 1126 S> */ B(LdaConstant), U8(92),
-                B(Star), R(0),
-  /* 1138 S> */ B(LdaConstant), U8(93),
-                B(Star), R(0),
-  /* 1150 S> */ B(LdaConstant), U8(94),
-                B(Star), R(0),
-  /* 1162 S> */ B(LdaConstant), U8(95),
-                B(Star), R(0),
-  /* 1174 S> */ B(LdaConstant), U8(96),
-                B(Star), R(0),
-  /* 1186 S> */ B(LdaConstant), U8(97),
-                B(Star), R(0),
-  /* 1198 S> */ B(LdaConstant), U8(98),
-                B(Star), R(0),
-  /* 1210 S> */ B(LdaConstant), U8(99),
-                B(Star), R(0),
-  /* 1222 S> */ B(LdaConstant), U8(100),
-                B(Star), R(0),
-  /* 1234 S> */ B(LdaConstant), U8(101),
-                B(Star), R(0),
-  /* 1246 S> */ B(LdaConstant), U8(102),
-                B(Star), R(0),
-  /* 1258 S> */ B(LdaConstant), U8(103),
-                B(Star), R(0),
-  /* 1270 S> */ B(LdaConstant), U8(104),
-                B(Star), R(0),
-  /* 1282 S> */ B(LdaConstant), U8(105),
-                B(Star), R(0),
-  /* 1294 S> */ B(LdaConstant), U8(106),
-                B(Star), R(0),
-  /* 1306 S> */ B(LdaConstant), U8(107),
-                B(Star), R(0),
-  /* 1318 S> */ B(LdaConstant), U8(108),
-                B(Star), R(0),
-  /* 1330 S> */ B(LdaConstant), U8(109),
-                B(Star), R(0),
-  /* 1342 S> */ B(LdaConstant), U8(110),
-                B(Star), R(0),
-  /* 1354 S> */ B(LdaConstant), U8(111),
-                B(Star), R(0),
-  /* 1366 S> */ B(LdaConstant), U8(112),
-                B(Star), R(0),
-  /* 1378 S> */ B(LdaConstant), U8(113),
-                B(Star), R(0),
-  /* 1390 S> */ B(LdaConstant), U8(114),
-                B(Star), R(0),
-  /* 1402 S> */ B(LdaConstant), U8(115),
-                B(Star), R(0),
-  /* 1414 S> */ B(LdaConstant), U8(116),
-                B(Star), R(0),
-  /* 1426 S> */ B(LdaConstant), U8(117),
-                B(Star), R(0),
-  /* 1438 S> */ B(LdaConstant), U8(118),
-                B(Star), R(0),
-  /* 1450 S> */ B(LdaConstant), U8(119),
-                B(Star), R(0),
-  /* 1462 S> */ B(LdaConstant), U8(120),
-                B(Star), R(0),
-  /* 1474 S> */ B(LdaConstant), U8(121),
-                B(Star), R(0),
-  /* 1486 S> */ B(LdaConstant), U8(122),
-                B(Star), R(0),
-  /* 1498 S> */ B(LdaConstant), U8(123),
-                B(Star), R(0),
-  /* 1510 S> */ B(LdaConstant), U8(124),
-                B(Star), R(0),
-  /* 1522 S> */ B(LdaConstant), U8(125),
-                B(Star), R(0),
-  /* 1534 S> */ B(LdaConstant), U8(126),
-                B(Star), R(0),
-  /* 1546 S> */ B(LdaConstant), U8(127),
-                B(Star), R(0),
-  /* 1558 S> */ B(LdaConstant), U8(128),
-                B(Star), R(0),
-  /* 1570 S> */ B(LdaConstant), U8(129),
-                B(Star), R(0),
-  /* 1582 S> */ B(LdaConstant), U8(130),
-                B(Star), R(0),
-  /* 1594 S> */ B(LdaConstant), U8(131),
-                B(Star), R(0),
-  /* 1606 S> */ B(LdaConstant), U8(132),
-                B(Star), R(0),
-  /* 1618 S> */ B(LdaConstant), U8(133),
-                B(Star), R(0),
-  /* 1630 S> */ B(LdaConstant), U8(134),
-                B(Star), R(0),
-  /* 1642 S> */ B(LdaConstant), U8(135),
-                B(Star), R(0),
-  /* 1654 S> */ B(LdaConstant), U8(136),
-                B(Star), R(0),
-  /* 1666 S> */ B(LdaConstant), U8(137),
-                B(Star), R(0),
-  /* 1678 S> */ B(LdaConstant), U8(138),
-                B(Star), R(0),
-  /* 1690 S> */ B(LdaConstant), U8(139),
-                B(Star), R(0),
-  /* 1702 S> */ B(LdaConstant), U8(140),
-                B(Star), R(0),
-  /* 1714 S> */ B(LdaConstant), U8(141),
-                B(Star), R(0),
-  /* 1726 S> */ B(LdaConstant), U8(142),
-                B(Star), R(0),
-  /* 1738 S> */ B(LdaConstant), U8(143),
-                B(Star), R(0),
-  /* 1750 S> */ B(LdaConstant), U8(144),
-                B(Star), R(0),
-  /* 1762 S> */ B(LdaConstant), U8(145),
-                B(Star), R(0),
-  /* 1774 S> */ B(LdaConstant), U8(146),
-                B(Star), R(0),
-  /* 1786 S> */ B(LdaConstant), U8(147),
-                B(Star), R(0),
-  /* 1798 S> */ B(LdaConstant), U8(148),
-                B(Star), R(0),
-  /* 1810 S> */ B(LdaConstant), U8(149),
-                B(Star), R(0),
-  /* 1822 S> */ B(LdaConstant), U8(150),
-                B(Star), R(0),
-  /* 1834 S> */ B(LdaConstant), U8(151),
-                B(Star), R(0),
-  /* 1846 S> */ B(LdaConstant), U8(152),
-                B(Star), R(0),
-  /* 1858 S> */ B(LdaConstant), U8(153),
-                B(Star), R(0),
-  /* 1870 S> */ B(LdaConstant), U8(154),
-                B(Star), R(0),
-  /* 1882 S> */ B(LdaConstant), U8(155),
-                B(Star), R(0),
-  /* 1894 S> */ B(LdaConstant), U8(156),
-                B(Star), R(0),
-  /* 1906 S> */ B(LdaConstant), U8(157),
-                B(Star), R(0),
-  /* 1918 S> */ B(LdaConstant), U8(158),
-                B(Star), R(0),
-  /* 1930 S> */ B(LdaConstant), U8(159),
-                B(Star), R(0),
-  /* 1942 S> */ B(LdaConstant), U8(160),
-                B(Star), R(0),
-  /* 1954 S> */ B(LdaConstant), U8(161),
-                B(Star), R(0),
-  /* 1966 S> */ B(LdaConstant), U8(162),
-                B(Star), R(0),
-  /* 1978 S> */ B(LdaConstant), U8(163),
-                B(Star), R(0),
-  /* 1990 S> */ B(LdaConstant), U8(164),
-                B(Star), R(0),
-  /* 2002 S> */ B(LdaConstant), U8(165),
-                B(Star), R(0),
-  /* 2014 S> */ B(LdaConstant), U8(166),
-                B(Star), R(0),
-  /* 2026 S> */ B(LdaConstant), U8(167),
-                B(Star), R(0),
-  /* 2038 S> */ B(LdaConstant), U8(168),
-                B(Star), R(0),
-  /* 2050 S> */ B(LdaConstant), U8(169),
-                B(Star), R(0),
-  /* 2062 S> */ B(LdaConstant), U8(170),
-                B(Star), R(0),
-  /* 2074 S> */ B(LdaConstant), U8(171),
-                B(Star), R(0),
-  /* 2086 S> */ B(LdaConstant), U8(172),
-                B(Star), R(0),
-  /* 2098 S> */ B(LdaConstant), U8(173),
-                B(Star), R(0),
-  /* 2110 S> */ B(LdaConstant), U8(174),
-                B(Star), R(0),
-  /* 2122 S> */ B(LdaConstant), U8(175),
-                B(Star), R(0),
-  /* 2134 S> */ B(LdaConstant), U8(176),
-                B(Star), R(0),
-  /* 2146 S> */ B(LdaConstant), U8(177),
-                B(Star), R(0),
-  /* 2158 S> */ B(LdaConstant), U8(178),
-                B(Star), R(0),
-  /* 2170 S> */ B(LdaConstant), U8(179),
-                B(Star), R(0),
-  /* 2182 S> */ B(LdaConstant), U8(180),
-                B(Star), R(0),
-  /* 2194 S> */ B(LdaConstant), U8(181),
-                B(Star), R(0),
-  /* 2206 S> */ B(LdaConstant), U8(182),
-                B(Star), R(0),
-  /* 2218 S> */ B(LdaConstant), U8(183),
-                B(Star), R(0),
-  /* 2230 S> */ B(LdaConstant), U8(184),
-                B(Star), R(0),
-  /* 2242 S> */ B(LdaConstant), U8(185),
-                B(Star), R(0),
-  /* 2254 S> */ B(LdaConstant), U8(186),
-                B(Star), R(0),
-  /* 2266 S> */ B(LdaConstant), U8(187),
-                B(Star), R(0),
-  /* 2278 S> */ B(LdaConstant), U8(188),
-                B(Star), R(0),
-  /* 2290 S> */ B(LdaConstant), U8(189),
-                B(Star), R(0),
-  /* 2302 S> */ B(LdaConstant), U8(190),
-                B(Star), R(0),
-  /* 2314 S> */ B(LdaConstant), U8(191),
-                B(Star), R(0),
-  /* 2326 S> */ B(LdaConstant), U8(192),
-                B(Star), R(0),
-  /* 2338 S> */ B(LdaConstant), U8(193),
-                B(Star), R(0),
-  /* 2350 S> */ B(LdaConstant), U8(194),
-                B(Star), R(0),
-  /* 2362 S> */ B(LdaConstant), U8(195),
-                B(Star), R(0),
-  /* 2374 S> */ B(LdaConstant), U8(196),
-                B(Star), R(0),
-  /* 2386 S> */ B(LdaConstant), U8(197),
-                B(Star), R(0),
-  /* 2398 S> */ B(LdaConstant), U8(198),
-                B(Star), R(0),
-  /* 2410 S> */ B(LdaConstant), U8(199),
-                B(Star), R(0),
-  /* 2422 S> */ B(LdaConstant), U8(200),
-                B(Star), R(0),
-  /* 2434 S> */ B(LdaConstant), U8(201),
-                B(Star), R(0),
-  /* 2446 S> */ B(LdaConstant), U8(202),
-                B(Star), R(0),
-  /* 2458 S> */ B(LdaConstant), U8(203),
-                B(Star), R(0),
-  /* 2470 S> */ B(LdaConstant), U8(204),
-                B(Star), R(0),
-  /* 2482 S> */ B(LdaConstant), U8(205),
-                B(Star), R(0),
-  /* 2494 S> */ B(LdaConstant), U8(206),
-                B(Star), R(0),
-  /* 2506 S> */ B(LdaConstant), U8(207),
-                B(Star), R(0),
-  /* 2518 S> */ B(LdaConstant), U8(208),
-                B(Star), R(0),
-  /* 2530 S> */ B(LdaConstant), U8(209),
-                B(Star), R(0),
-  /* 2542 S> */ B(LdaConstant), U8(210),
-                B(Star), R(0),
-  /* 2554 S> */ B(LdaConstant), U8(211),
-                B(Star), R(0),
-  /* 2566 S> */ B(LdaConstant), U8(212),
-                B(Star), R(0),
-  /* 2578 S> */ B(LdaConstant), U8(213),
-                B(Star), R(0),
-  /* 2590 S> */ B(LdaConstant), U8(214),
-                B(Star), R(0),
-  /* 2602 S> */ B(LdaConstant), U8(215),
-                B(Star), R(0),
-  /* 2614 S> */ B(LdaConstant), U8(216),
-                B(Star), R(0),
-  /* 2626 S> */ B(LdaConstant), U8(217),
-                B(Star), R(0),
-  /* 2638 S> */ B(LdaConstant), U8(218),
-                B(Star), R(0),
-  /* 2650 S> */ B(LdaConstant), U8(219),
-                B(Star), R(0),
-  /* 2662 S> */ B(LdaConstant), U8(220),
-                B(Star), R(0),
-  /* 2674 S> */ B(LdaConstant), U8(221),
-                B(Star), R(0),
-  /* 2686 S> */ B(LdaConstant), U8(222),
-                B(Star), R(0),
-  /* 2698 S> */ B(LdaConstant), U8(223),
-                B(Star), R(0),
-  /* 2710 S> */ B(LdaConstant), U8(224),
-                B(Star), R(0),
-  /* 2722 S> */ B(LdaConstant), U8(225),
-                B(Star), R(0),
-  /* 2734 S> */ B(LdaConstant), U8(226),
-                B(Star), R(0),
-  /* 2746 S> */ B(LdaConstant), U8(227),
-                B(Star), R(0),
-  /* 2758 S> */ B(LdaConstant), U8(228),
-                B(Star), R(0),
-  /* 2770 S> */ B(LdaConstant), U8(229),
-                B(Star), R(0),
-  /* 2782 S> */ B(LdaConstant), U8(230),
-                B(Star), R(0),
-  /* 2794 S> */ B(LdaConstant), U8(231),
-                B(Star), R(0),
-  /* 2806 S> */ B(LdaConstant), U8(232),
-                B(Star), R(0),
-  /* 2818 S> */ B(LdaConstant), U8(233),
-                B(Star), R(0),
-  /* 2830 S> */ B(LdaConstant), U8(234),
-                B(Star), R(0),
-  /* 2842 S> */ B(LdaConstant), U8(235),
-                B(Star), R(0),
-  /* 2854 S> */ B(LdaConstant), U8(236),
-                B(Star), R(0),
-  /* 2866 S> */ B(LdaConstant), U8(237),
-                B(Star), R(0),
-  /* 2878 S> */ B(LdaConstant), U8(238),
-                B(Star), R(0),
-  /* 2890 S> */ B(LdaConstant), U8(239),
-                B(Star), R(0),
-  /* 2902 S> */ B(LdaConstant), U8(240),
-                B(Star), R(0),
-  /* 2914 S> */ B(LdaConstant), U8(241),
-                B(Star), R(0),
-  /* 2926 S> */ B(LdaConstant), U8(242),
-                B(Star), R(0),
-  /* 2938 S> */ B(LdaConstant), U8(243),
-                B(Star), R(0),
-  /* 2950 S> */ B(LdaConstant), U8(244),
-                B(Star), R(0),
-  /* 2962 S> */ B(LdaConstant), U8(245),
-                B(Star), R(0),
-  /* 2974 S> */ B(LdaConstant), U8(246),
-                B(Star), R(0),
-  /* 2986 S> */ B(LdaConstant), U8(247),
-                B(Star), R(0),
-  /* 2998 S> */ B(LdaConstant), U8(248),
-                B(Star), R(0),
-  /* 3010 S> */ B(LdaConstant), U8(249),
-                B(Star), R(0),
-  /* 3022 S> */ B(LdaConstant), U8(250),
-                B(Star), R(0),
-  /* 3034 S> */ B(LdaConstant), U8(251),
-                B(Star), R(0),
-  /* 3046 S> */ B(LdaConstant), U8(252),
-                B(Star), R(0),
-  /* 3058 S> */ B(LdaConstant), U8(253),
-                B(Star), R(0),
-  /* 3070 S> */ B(LdaConstant), U8(254),
-                B(Star), R(0),
-  /* 3082 S> */ B(LdaConstant), U8(255),
-                B(Star), R(0),
-  /* 3086 S> */ B(LdaSmi), I8(10),
-  /* 3088 E> */ B(Wide), B(StaLookupSlot), U16(256), U8(0),
-                B(LdaUndefined),
-  /* 3093 S> */ B(Return),
-]
-constant pool: [
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  ONE_BYTE_INTERNALIZED_STRING_TYPE ["x"],
-]
-handlers: [
-]
-
----
-snippet: "
-  var f;
-  var x = 1;
-  function f1() {
-    eval(\"function t() {\" +
-      \"'use strict';\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"var y = 2.3;\" +
-      \"x = 10;\" +
-    \"};\" +
-    \"f = t; f();\"
-  );
-  }
-  f1();
-"
-frame size: 1
-parameter count: 1
-bytecode array length: 1034
-bytecodes: [
-  /*   10 E> */ B(StackCheck),
-  /*   35 S> */ B(LdaConstant), U8(0),
-                B(Star), R(0),
-  /*   47 S> */ B(LdaConstant), U8(1),
-                B(Star), R(0),
-  /*   59 S> */ B(LdaConstant), U8(2),
-                B(Star), R(0),
-  /*   71 S> */ B(LdaConstant), U8(3),
-                B(Star), R(0),
-  /*   83 S> */ B(LdaConstant), U8(4),
-                B(Star), R(0),
-  /*   95 S> */ B(LdaConstant), U8(5),
-                B(Star), R(0),
-  /*  107 S> */ B(LdaConstant), U8(6),
-                B(Star), R(0),
-  /*  119 S> */ B(LdaConstant), U8(7),
-                B(Star), R(0),
-  /*  131 S> */ B(LdaConstant), U8(8),
-                B(Star), R(0),
-  /*  143 S> */ B(LdaConstant), U8(9),
-                B(Star), R(0),
-  /*  155 S> */ B(LdaConstant), U8(10),
-                B(Star), R(0),
-  /*  167 S> */ B(LdaConstant), U8(11),
-                B(Star), R(0),
-  /*  179 S> */ B(LdaConstant), U8(12),
-                B(Star), R(0),
-  /*  191 S> */ B(LdaConstant), U8(13),
-                B(Star), R(0),
-  /*  203 S> */ B(LdaConstant), U8(14),
-                B(Star), R(0),
-  /*  215 S> */ B(LdaConstant), U8(15),
-                B(Star), R(0),
-  /*  227 S> */ B(LdaConstant), U8(16),
-                B(Star), R(0),
-  /*  239 S> */ B(LdaConstant), U8(17),
-                B(Star), R(0),
-  /*  251 S> */ B(LdaConstant), U8(18),
-                B(Star), R(0),
-  /*  263 S> */ B(LdaConstant), U8(19),
-                B(Star), R(0),
-  /*  275 S> */ B(LdaConstant), U8(20),
-                B(Star), R(0),
-  /*  287 S> */ B(LdaConstant), U8(21),
-                B(Star), R(0),
-  /*  299 S> */ B(LdaConstant), U8(22),
-                B(Star), R(0),
-  /*  311 S> */ B(LdaConstant), U8(23),
-                B(Star), R(0),
-  /*  323 S> */ B(LdaConstant), U8(24),
-                B(Star), R(0),
-  /*  335 S> */ B(LdaConstant), U8(25),
-                B(Star), R(0),
-  /*  347 S> */ B(LdaConstant), U8(26),
-                B(Star), R(0),
-  /*  359 S> */ B(LdaConstant), U8(27),
-                B(Star), R(0),
-  /*  371 S> */ B(LdaConstant), U8(28),
-                B(Star), R(0),
-  /*  383 S> */ B(LdaConstant), U8(29),
-                B(Star), R(0),
-  /*  395 S> */ B(LdaConstant), U8(30),
-                B(Star), R(0),
-  /*  407 S> */ B(LdaConstant), U8(31),
-                B(Star), R(0),
-  /*  419 S> */ B(LdaConstant), U8(32),
-                B(Star), R(0),
-  /*  431 S> */ B(LdaConstant), U8(33),
-                B(Star), R(0),
-  /*  443 S> */ B(LdaConstant), U8(34),
-                B(Star), R(0),
-  /*  455 S> */ B(LdaConstant), U8(35),
-                B(Star), R(0),
-  /*  467 S> */ B(LdaConstant), U8(36),
-                B(Star), R(0),
-  /*  479 S> */ B(LdaConstant), U8(37),
-                B(Star), R(0),
-  /*  491 S> */ B(LdaConstant), U8(38),
-                B(Star), R(0),
-  /*  503 S> */ B(LdaConstant), U8(39),
-                B(Star), R(0),
-  /*  515 S> */ B(LdaConstant), U8(40),
-                B(Star), R(0),
-  /*  527 S> */ B(LdaConstant), U8(41),
-                B(Star), R(0),
-  /*  539 S> */ B(LdaConstant), U8(42),
-                B(Star), R(0),
-  /*  551 S> */ B(LdaConstant), U8(43),
-                B(Star), R(0),
-  /*  563 S> */ B(LdaConstant), U8(44),
-                B(Star), R(0),
-  /*  575 S> */ B(LdaConstant), U8(45),
-                B(Star), R(0),
-  /*  587 S> */ B(LdaConstant), U8(46),
-                B(Star), R(0),
-  /*  599 S> */ B(LdaConstant), U8(47),
-                B(Star), R(0),
-  /*  611 S> */ B(LdaConstant), U8(48),
-                B(Star), R(0),
-  /*  623 S> */ B(LdaConstant), U8(49),
-                B(Star), R(0),
-  /*  635 S> */ B(LdaConstant), U8(50),
-                B(Star), R(0),
-  /*  647 S> */ B(LdaConstant), U8(51),
-                B(Star), R(0),
-  /*  659 S> */ B(LdaConstant), U8(52),
-                B(Star), R(0),
-  /*  671 S> */ B(LdaConstant), U8(53),
-                B(Star), R(0),
-  /*  683 S> */ B(LdaConstant), U8(54),
-                B(Star), R(0),
-  /*  695 S> */ B(LdaConstant), U8(55),
-                B(Star), R(0),
-  /*  707 S> */ B(LdaConstant), U8(56),
-                B(Star), R(0),
-  /*  719 S> */ B(LdaConstant), U8(57),
-                B(Star), R(0),
-  /*  731 S> */ B(LdaConstant), U8(58),
-                B(Star), R(0),
-  /*  743 S> */ B(LdaConstant), U8(59),
-                B(Star), R(0),
-  /*  755 S> */ B(LdaConstant), U8(60),
-                B(Star), R(0),
-  /*  767 S> */ B(LdaConstant), U8(61),
-                B(Star), R(0),
-  /*  779 S> */ B(LdaConstant), U8(62),
-                B(Star), R(0),
-  /*  791 S> */ B(LdaConstant), U8(63),
-                B(Star), R(0),
-  /*  803 S> */ B(LdaConstant), U8(64),
-                B(Star), R(0),
-  /*  815 S> */ B(LdaConstant), U8(65),
-                B(Star), R(0),
-  /*  827 S> */ B(LdaConstant), U8(66),
-                B(Star), R(0),
-  /*  839 S> */ B(LdaConstant), U8(67),
-                B(Star), R(0),
-  /*  851 S> */ B(LdaConstant), U8(68),
-                B(Star), R(0),
-  /*  863 S> */ B(LdaConstant), U8(69),
-                B(Star), R(0),
-  /*  875 S> */ B(LdaConstant), U8(70),
-                B(Star), R(0),
-  /*  887 S> */ B(LdaConstant), U8(71),
-                B(Star), R(0),
-  /*  899 S> */ B(LdaConstant), U8(72),
-                B(Star), R(0),
-  /*  911 S> */ B(LdaConstant), U8(73),
-                B(Star), R(0),
-  /*  923 S> */ B(LdaConstant), U8(74),
-                B(Star), R(0),
-  /*  935 S> */ B(LdaConstant), U8(75),
-                B(Star), R(0),
-  /*  947 S> */ B(LdaConstant), U8(76),
-                B(Star), R(0),
-  /*  959 S> */ B(LdaConstant), U8(77),
-                B(Star), R(0),
-  /*  971 S> */ B(LdaConstant), U8(78),
-                B(Star), R(0),
-  /*  983 S> */ B(LdaConstant), U8(79),
-                B(Star), R(0),
-  /*  995 S> */ B(LdaConstant), U8(80),
-                B(Star), R(0),
-  /* 1007 S> */ B(LdaConstant), U8(81),
-                B(Star), R(0),
-  /* 1019 S> */ B(LdaConstant), U8(82),
-                B(Star), R(0),
-  /* 1031 S> */ B(LdaConstant), U8(83),
-                B(Star), R(0),
-  /* 1043 S> */ B(LdaConstant), U8(84),
-                B(Star), R(0),
-  /* 1055 S> */ B(LdaConstant), U8(85),
-                B(Star), R(0),
-  /* 1067 S> */ B(LdaConstant), U8(86),
-                B(Star), R(0),
-  /* 1079 S> */ B(LdaConstant), U8(87),
-                B(Star), R(0),
-  /* 1091 S> */ B(LdaConstant), U8(88),
-                B(Star), R(0),
-  /* 1103 S> */ B(LdaConstant), U8(89),
-                B(Star), R(0),
-  /* 1115 S> */ B(LdaConstant), U8(90),
-                B(Star), R(0),
-  /* 1127 S> */ B(LdaConstant), U8(91),
-                B(Star), R(0),
-  /* 1139 S> */ B(LdaConstant), U8(92),
-                B(Star), R(0),
-  /* 1151 S> */ B(LdaConstant), U8(93),
-                B(Star), R(0),
-  /* 1163 S> */ B(LdaConstant), U8(94),
-                B(Star), R(0),
-  /* 1175 S> */ B(LdaConstant), U8(95),
-                B(Star), R(0),
-  /* 1187 S> */ B(LdaConstant), U8(96),
-                B(Star), R(0),
-  /* 1199 S> */ B(LdaConstant), U8(97),
-                B(Star), R(0),
-  /* 1211 S> */ B(LdaConstant), U8(98),
-                B(Star), R(0),
-  /* 1223 S> */ B(LdaConstant), U8(99),
-                B(Star), R(0),
-  /* 1235 S> */ B(LdaConstant), U8(100),
-                B(Star), R(0),
-  /* 1247 S> */ B(LdaConstant), U8(101),
-                B(Star), R(0),
-  /* 1259 S> */ B(LdaConstant), U8(102),
-                B(Star), R(0),
-  /* 1271 S> */ B(LdaConstant), U8(103),
-                B(Star), R(0),
-  /* 1283 S> */ B(LdaConstant), U8(104),
-                B(Star), R(0),
-  /* 1295 S> */ B(LdaConstant), U8(105),
-                B(Star), R(0),
-  /* 1307 S> */ B(LdaConstant), U8(106),
-                B(Star), R(0),
-  /* 1319 S> */ B(LdaConstant), U8(107),
-                B(Star), R(0),
-  /* 1331 S> */ B(LdaConstant), U8(108),
-                B(Star), R(0),
-  /* 1343 S> */ B(LdaConstant), U8(109),
-                B(Star), R(0),
-  /* 1355 S> */ B(LdaConstant), U8(110),
-                B(Star), R(0),
-  /* 1367 S> */ B(LdaConstant), U8(111),
-                B(Star), R(0),
-  /* 1379 S> */ B(LdaConstant), U8(112),
-                B(Star), R(0),
-  /* 1391 S> */ B(LdaConstant), U8(113),
-                B(Star), R(0),
-  /* 1403 S> */ B(LdaConstant), U8(114),
-                B(Star), R(0),
-  /* 1415 S> */ B(LdaConstant), U8(115),
-                B(Star), R(0),
-  /* 1427 S> */ B(LdaConstant), U8(116),
-                B(Star), R(0),
-  /* 1439 S> */ B(LdaConstant), U8(117),
-                B(Star), R(0),
-  /* 1451 S> */ B(LdaConstant), U8(118),
-                B(Star), R(0),
-  /* 1463 S> */ B(LdaConstant), U8(119),
-                B(Star), R(0),
-  /* 1475 S> */ B(LdaConstant), U8(120),
-                B(Star), R(0),
-  /* 1487 S> */ B(LdaConstant), U8(121),
-                B(Star), R(0),
-  /* 1499 S> */ B(LdaConstant), U8(122),
-                B(Star), R(0),
-  /* 1511 S> */ B(LdaConstant), U8(123),
-                B(Star), R(0),
-  /* 1523 S> */ B(LdaConstant), U8(124),
-                B(Star), R(0),
-  /* 1535 S> */ B(LdaConstant), U8(125),
-                B(Star), R(0),
-  /* 1547 S> */ B(LdaConstant), U8(126),
-                B(Star), R(0),
-  /* 1559 S> */ B(LdaConstant), U8(127),
-                B(Star), R(0),
-  /* 1571 S> */ B(LdaConstant), U8(128),
-                B(Star), R(0),
-  /* 1583 S> */ B(LdaConstant), U8(129),
-                B(Star), R(0),
-  /* 1595 S> */ B(LdaConstant), U8(130),
-                B(Star), R(0),
-  /* 1607 S> */ B(LdaConstant), U8(131),
-                B(Star), R(0),
-  /* 1619 S> */ B(LdaConstant), U8(132),
-                B(Star), R(0),
-  /* 1631 S> */ B(LdaConstant), U8(133),
-                B(Star), R(0),
-  /* 1643 S> */ B(LdaConstant), U8(134),
-                B(Star), R(0),
-  /* 1655 S> */ B(LdaConstant), U8(135),
-                B(Star), R(0),
-  /* 1667 S> */ B(LdaConstant), U8(136),
-                B(Star), R(0),
-  /* 1679 S> */ B(LdaConstant), U8(137),
-                B(Star), R(0),
-  /* 1691 S> */ B(LdaConstant), U8(138),
-                B(Star), R(0),
-  /* 1703 S> */ B(LdaConstant), U8(139),
-                B(Star), R(0),
-  /* 1715 S> */ B(LdaConstant), U8(140),
-                B(Star), R(0),
-  /* 1727 S> */ B(LdaConstant), U8(141),
-                B(Star), R(0),
-  /* 1739 S> */ B(LdaConstant), U8(142),
-                B(Star), R(0),
-  /* 1751 S> */ B(LdaConstant), U8(143),
-                B(Star), R(0),
-  /* 1763 S> */ B(LdaConstant), U8(144),
-                B(Star), R(0),
-  /* 1775 S> */ B(LdaConstant), U8(145),
-                B(Star), R(0),
-  /* 1787 S> */ B(LdaConstant), U8(146),
-                B(Star), R(0),
-  /* 1799 S> */ B(LdaConstant), U8(147),
-                B(Star), R(0),
-  /* 1811 S> */ B(LdaConstant), U8(148),
-                B(Star), R(0),
-  /* 1823 S> */ B(LdaConstant), U8(149),
-                B(Star), R(0),
-  /* 1835 S> */ B(LdaConstant), U8(150),
-                B(Star), R(0),
-  /* 1847 S> */ B(LdaConstant), U8(151),
-                B(Star), R(0),
-  /* 1859 S> */ B(LdaConstant), U8(152),
-                B(Star), R(0),
-  /* 1871 S> */ B(LdaConstant), U8(153),
-                B(Star), R(0),
-  /* 1883 S> */ B(LdaConstant), U8(154),
-                B(Star), R(0),
-  /* 1895 S> */ B(LdaConstant), U8(155),
-                B(Star), R(0),
-  /* 1907 S> */ B(LdaConstant), U8(156),
-                B(Star), R(0),
-  /* 1919 S> */ B(LdaConstant), U8(157),
-                B(Star), R(0),
-  /* 1931 S> */ B(LdaConstant), U8(158),
-                B(Star), R(0),
-  /* 1943 S> */ B(LdaConstant), U8(159),
-                B(Star), R(0),
-  /* 1955 S> */ B(LdaConstant), U8(160),
-                B(Star), R(0),
-  /* 1967 S> */ B(LdaConstant), U8(161),
-                B(Star), R(0),
-  /* 1979 S> */ B(LdaConstant), U8(162),
-                B(Star), R(0),
-  /* 1991 S> */ B(LdaConstant), U8(163),
-                B(Star), R(0),
-  /* 2003 S> */ B(LdaConstant), U8(164),
-                B(Star), R(0),
-  /* 2015 S> */ B(LdaConstant), U8(165),
-                B(Star), R(0),
-  /* 2027 S> */ B(LdaConstant), U8(166),
-                B(Star), R(0),
-  /* 2039 S> */ B(LdaConstant), U8(167),
-                B(Star), R(0),
-  /* 2051 S> */ B(LdaConstant), U8(168),
-                B(Star), R(0),
-  /* 2063 S> */ B(LdaConstant), U8(169),
-                B(Star), R(0),
-  /* 2075 S> */ B(LdaConstant), U8(170),
-                B(Star), R(0),
-  /* 2087 S> */ B(LdaConstant), U8(171),
-                B(Star), R(0),
-  /* 2099 S> */ B(LdaConstant), U8(172),
-                B(Star), R(0),
-  /* 2111 S> */ B(LdaConstant), U8(173),
-                B(Star), R(0),
-  /* 2123 S> */ B(LdaConstant), U8(174),
-                B(Star), R(0),
-  /* 2135 S> */ B(LdaConstant), U8(175),
-                B(Star), R(0),
-  /* 2147 S> */ B(LdaConstant), U8(176),
-                B(Star), R(0),
-  /* 2159 S> */ B(LdaConstant), U8(177),
-                B(Star), R(0),
-  /* 2171 S> */ B(LdaConstant), U8(178),
-                B(Star), R(0),
-  /* 2183 S> */ B(LdaConstant), U8(179),
-                B(Star), R(0),
-  /* 2195 S> */ B(LdaConstant), U8(180),
-                B(Star), R(0),
-  /* 2207 S> */ B(LdaConstant), U8(181),
-                B(Star), R(0),
-  /* 2219 S> */ B(LdaConstant), U8(182),
-                B(Star), R(0),
-  /* 2231 S> */ B(LdaConstant), U8(183),
-                B(Star), R(0),
-  /* 2243 S> */ B(LdaConstant), U8(184),
-                B(Star), R(0),
-  /* 2255 S> */ B(LdaConstant), U8(185),
-                B(Star), R(0),
-  /* 2267 S> */ B(LdaConstant), U8(186),
-                B(Star), R(0),
-  /* 2279 S> */ B(LdaConstant), U8(187),
-                B(Star), R(0),
-  /* 2291 S> */ B(LdaConstant), U8(188),
-                B(Star), R(0),
-  /* 2303 S> */ B(LdaConstant), U8(189),
-                B(Star), R(0),
-  /* 2315 S> */ B(LdaConstant), U8(190),
-                B(Star), R(0),
-  /* 2327 S> */ B(LdaConstant), U8(191),
-                B(Star), R(0),
-  /* 2339 S> */ B(LdaConstant), U8(192),
-                B(Star), R(0),
-  /* 2351 S> */ B(LdaConstant), U8(193),
-                B(Star), R(0),
-  /* 2363 S> */ B(LdaConstant), U8(194),
-                B(Star), R(0),
-  /* 2375 S> */ B(LdaConstant), U8(195),
-                B(Star), R(0),
-  /* 2387 S> */ B(LdaConstant), U8(196),
-                B(Star), R(0),
-  /* 2399 S> */ B(LdaConstant), U8(197),
-                B(Star), R(0),
-  /* 2411 S> */ B(LdaConstant), U8(198),
-                B(Star), R(0),
-  /* 2423 S> */ B(LdaConstant), U8(199),
-                B(Star), R(0),
-  /* 2435 S> */ B(LdaConstant), U8(200),
-                B(Star), R(0),
-  /* 2447 S> */ B(LdaConstant), U8(201),
-                B(Star), R(0),
-  /* 2459 S> */ B(LdaConstant), U8(202),
-                B(Star), R(0),
-  /* 2471 S> */ B(LdaConstant), U8(203),
-                B(Star), R(0),
-  /* 2483 S> */ B(LdaConstant), U8(204),
-                B(Star), R(0),
-  /* 2495 S> */ B(LdaConstant), U8(205),
-                B(Star), R(0),
-  /* 2507 S> */ B(LdaConstant), U8(206),
-                B(Star), R(0),
-  /* 2519 S> */ B(LdaConstant), U8(207),
-                B(Star), R(0),
-  /* 2531 S> */ B(LdaConstant), U8(208),
-                B(Star), R(0),
-  /* 2543 S> */ B(LdaConstant), U8(209),
-                B(Star), R(0),
-  /* 2555 S> */ B(LdaConstant), U8(210),
-                B(Star), R(0),
-  /* 2567 S> */ B(LdaConstant), U8(211),
-                B(Star), R(0),
-  /* 2579 S> */ B(LdaConstant), U8(212),
-                B(Star), R(0),
-  /* 2591 S> */ B(LdaConstant), U8(213),
-                B(Star), R(0),
-  /* 2603 S> */ B(LdaConstant), U8(214),
-                B(Star), R(0),
-  /* 2615 S> */ B(LdaConstant), U8(215),
-                B(Star), R(0),
-  /* 2627 S> */ B(LdaConstant), U8(216),
-                B(Star), R(0),
-  /* 2639 S> */ B(LdaConstant), U8(217),
-                B(Star), R(0),
-  /* 2651 S> */ B(LdaConstant), U8(218),
-                B(Star), R(0),
-  /* 2663 S> */ B(LdaConstant), U8(219),
-                B(Star), R(0),
-  /* 2675 S> */ B(LdaConstant), U8(220),
-                B(Star), R(0),
-  /* 2687 S> */ B(LdaConstant), U8(221),
-                B(Star), R(0),
-  /* 2699 S> */ B(LdaConstant), U8(222),
-                B(Star), R(0),
-  /* 2711 S> */ B(LdaConstant), U8(223),
-                B(Star), R(0),
-  /* 2723 S> */ B(LdaConstant), U8(224),
-                B(Star), R(0),
-  /* 2735 S> */ B(LdaConstant), U8(225),
-                B(Star), R(0),
-  /* 2747 S> */ B(LdaConstant), U8(226),
-                B(Star), R(0),
-  /* 2759 S> */ B(LdaConstant), U8(227),
-                B(Star), R(0),
-  /* 2771 S> */ B(LdaConstant), U8(228),
-                B(Star), R(0),
-  /* 2783 S> */ B(LdaConstant), U8(229),
-                B(Star), R(0),
-  /* 2795 S> */ B(LdaConstant), U8(230),
-                B(Star), R(0),
-  /* 2807 S> */ B(LdaConstant), U8(231),
-                B(Star), R(0),
-  /* 2819 S> */ B(LdaConstant), U8(232),
-                B(Star), R(0),
-  /* 2831 S> */ B(LdaConstant), U8(233),
-                B(Star), R(0),
-  /* 2843 S> */ B(LdaConstant), U8(234),
-                B(Star), R(0),
-  /* 2855 S> */ B(LdaConstant), U8(235),
-                B(Star), R(0),
-  /* 2867 S> */ B(LdaConstant), U8(236),
-                B(Star), R(0),
-  /* 2879 S> */ B(LdaConstant), U8(237),
-                B(Star), R(0),
-  /* 2891 S> */ B(LdaConstant), U8(238),
-                B(Star), R(0),
-  /* 2903 S> */ B(LdaConstant), U8(239),
-                B(Star), R(0),
-  /* 2915 S> */ B(LdaConstant), U8(240),
-                B(Star), R(0),
-  /* 2927 S> */ B(LdaConstant), U8(241),
-                B(Star), R(0),
-  /* 2939 S> */ B(LdaConstant), U8(242),
-                B(Star), R(0),
-  /* 2951 S> */ B(LdaConstant), U8(243),
-                B(Star), R(0),
-  /* 2963 S> */ B(LdaConstant), U8(244),
-                B(Star), R(0),
-  /* 2975 S> */ B(LdaConstant), U8(245),
-                B(Star), R(0),
-  /* 2987 S> */ B(LdaConstant), U8(246),
-                B(Star), R(0),
-  /* 2999 S> */ B(LdaConstant), U8(247),
-                B(Star), R(0),
-  /* 3011 S> */ B(LdaConstant), U8(248),
-                B(Star), R(0),
-  /* 3023 S> */ B(LdaConstant), U8(249),
-                B(Star), R(0),
-  /* 3035 S> */ B(LdaConstant), U8(250),
-                B(Star), R(0),
-  /* 3047 S> */ B(LdaConstant), U8(251),
-                B(Star), R(0),
-  /* 3059 S> */ B(LdaConstant), U8(252),
-                B(Star), R(0),
-  /* 3071 S> */ B(LdaConstant), U8(253),
-                B(Star), R(0),
-  /* 3083 S> */ B(LdaConstant), U8(254),
-                B(Star), R(0),
-  /* 3095 S> */ B(LdaConstant), U8(255),
-                B(Star), R(0),
-  /* 3099 S> */ B(LdaSmi), I8(10),
-  /* 3101 E> */ B(Wide), B(StaLookupSlot), U16(256), U8(1),
-                B(LdaUndefined),
-  /* 3106 S> */ B(Return),
-]
-constant pool: [
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  HEAP_NUMBER_TYPE [2.3],
-  ONE_BYTE_INTERNALIZED_STRING_TYPE ["x"],
-]
-handlers: [
-]
-
diff --git a/src/v8/test/cctest/interpreter/bytecode_expectations/Modules.golden b/src/v8/test/cctest/interpreter/bytecode_expectations/Modules.golden
index f4021d1..9c87615 100644
--- a/src/v8/test/cctest/interpreter/bytecode_expectations/Modules.golden
+++ b/src/v8/test/cctest/interpreter/bytecode_expectations/Modules.golden
@@ -11,52 +11,46 @@
 snippet: "
   import \"bar\";
 "
-frame size: 5
+frame size: 6
 parameter count: 2
-bytecode array length: 96
+bytecode array length: 84
 bytecodes: [
-                B(Ldar), R(1),
+                B(Ldar), R(0),
                 B(JumpIfUndefined), U8(18),
-                B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetContext), R(1), U8(1),
-                B(PushContext), R(2),
-                B(RestoreGeneratorState), R(1),
-                B(Star), R(0),
+                B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetContext), R(0), U8(1),
+                B(PushContext), R(3),
+                B(RestoreGeneratorState), R(0),
+                B(Star), R(2),
                 B(SwitchOnSmiNoFeedback), U8(0), U8(1), I8(0),
-                B(Abort), U8(45),
+                B(Abort), U8(15),
                 B(LdaSmi), I8(-2),
-                B(Star), R(0),
+                B(Star), R(2),
                 B(LdaConstant), U8(1),
-                B(Star), R(4),
-                B(Mov), R(arg0), R(2),
-                B(Mov), R(closure), R(3),
-                B(CallRuntime), U16(Runtime::kPushModuleContext), R(2), U8(3),
-                B(PushContext), R(2),
-                B(Mov), R(this), R(4),
-                B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(3), U8(2),
-                B(StaCurrentContextSlot), U8(4),
-  /*    0 E> */ B(StackCheck),
-                B(Star), R(1),
-                B(LdaImmutableCurrentContextSlot), U8(4),
-  /*    0 E> */ B(SuspendGenerator), R(1), R(0), U8(3), U8(0),
-  /*   13 S> */ B(Return),
-                B(RestoreGeneratorRegisters), R(1), R(0), U8(3),
-                B(LdaSmi), I8(-2),
+                B(Star), R(5),
+                B(Mov), R(arg0), R(3),
+                B(Mov), R(closure), R(4),
+                B(CallRuntime), U16(Runtime::kPushModuleContext), R(3), U8(3),
+                B(PushContext), R(3),
+                B(Mov), R(this), R(5),
+                B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(4), U8(2),
                 B(Star), R(0),
-                B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(1), U8(1),
-                B(Star), R(3),
-                B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(1), U8(1),
-                B(SwitchOnSmiNoFeedback), U8(2), U8(2), I8(0),
-                B(Ldar), R(3),
-  /*    0 E> */ B(Throw),
-                B(Ldar), R(3),
+  /*    0 E> */ B(StackCheck),
+  /*    0 E> */ B(SuspendGenerator), R(0), R(0), U8(4), U8(0),
   /*   13 S> */ B(Return),
-                B(Ldar), R(3),
-                B(StaCurrentContextSlot), U8(5),
-                B(LdaCurrentContextSlot), U8(5),
+                B(ResumeGenerator), R(0), R(2), R(0), U8(4),
+                B(Star), R(4),
+                B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
+                B(SwitchOnSmiNoFeedback), U8(2), U8(2), I8(0),
+                B(Ldar), R(4),
+  /*    0 E> */ B(Throw),
+                B(Ldar), R(4),
+  /*   13 S> */ B(Return),
+                B(Mov), R(4), R(1),
+                B(Ldar), R(1),
   /*   13 S> */ B(Return),
 ]
 constant pool: [
-  Smi [47],
+  Smi [43],
   FIXED_ARRAY_TYPE,
   Smi [10],
   Smi [7],
@@ -68,52 +62,46 @@
 snippet: "
   import {foo} from \"bar\";
 "
-frame size: 5
+frame size: 6
 parameter count: 2
-bytecode array length: 96
+bytecode array length: 84
 bytecodes: [
-                B(Ldar), R(1),
+                B(Ldar), R(0),
                 B(JumpIfUndefined), U8(18),
-                B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetContext), R(1), U8(1),
-                B(PushContext), R(2),
-                B(RestoreGeneratorState), R(1),
-                B(Star), R(0),
+                B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetContext), R(0), U8(1),
+                B(PushContext), R(3),
+                B(RestoreGeneratorState), R(0),
+                B(Star), R(2),
                 B(SwitchOnSmiNoFeedback), U8(0), U8(1), I8(0),
-                B(Abort), U8(45),
+                B(Abort), U8(15),
                 B(LdaSmi), I8(-2),
-                B(Star), R(0),
+                B(Star), R(2),
                 B(LdaConstant), U8(1),
-                B(Star), R(4),
-                B(Mov), R(arg0), R(2),
-                B(Mov), R(closure), R(3),
-                B(CallRuntime), U16(Runtime::kPushModuleContext), R(2), U8(3),
-                B(PushContext), R(2),
-                B(Mov), R(this), R(4),
-                B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(3), U8(2),
-                B(StaCurrentContextSlot), U8(4),
-  /*    0 E> */ B(StackCheck),
-                B(Star), R(1),
-                B(LdaImmutableCurrentContextSlot), U8(4),
-  /*    0 E> */ B(SuspendGenerator), R(1), R(0), U8(3), U8(0),
-  /*   24 S> */ B(Return),
-                B(RestoreGeneratorRegisters), R(1), R(0), U8(3),
-                B(LdaSmi), I8(-2),
+                B(Star), R(5),
+                B(Mov), R(arg0), R(3),
+                B(Mov), R(closure), R(4),
+                B(CallRuntime), U16(Runtime::kPushModuleContext), R(3), U8(3),
+                B(PushContext), R(3),
+                B(Mov), R(this), R(5),
+                B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(4), U8(2),
                 B(Star), R(0),
-                B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(1), U8(1),
-                B(Star), R(3),
-                B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(1), U8(1),
-                B(SwitchOnSmiNoFeedback), U8(2), U8(2), I8(0),
-                B(Ldar), R(3),
-  /*    0 E> */ B(Throw),
-                B(Ldar), R(3),
+  /*    0 E> */ B(StackCheck),
+  /*    0 E> */ B(SuspendGenerator), R(0), R(0), U8(4), U8(0),
   /*   24 S> */ B(Return),
-                B(Ldar), R(3),
-                B(StaCurrentContextSlot), U8(5),
-                B(LdaCurrentContextSlot), U8(5),
+                B(ResumeGenerator), R(0), R(2), R(0), U8(4),
+                B(Star), R(4),
+                B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
+                B(SwitchOnSmiNoFeedback), U8(2), U8(2), I8(0),
+                B(Ldar), R(4),
+  /*    0 E> */ B(Throw),
+                B(Ldar), R(4),
+  /*   24 S> */ B(Return),
+                B(Mov), R(4), R(1),
+                B(Ldar), R(1),
   /*   24 S> */ B(Return),
 ]
 constant pool: [
-  Smi [47],
+  Smi [43],
   FIXED_ARRAY_TYPE,
   Smi [10],
   Smi [7],
@@ -127,76 +115,63 @@
   goo(42);
   { let x; { goo(42) } };
 "
-frame size: 6
+frame size: 7
 parameter count: 2
-bytecode array length: 140
+bytecode array length: 114
 bytecodes: [
                 B(Ldar), R(1),
                 B(JumpIfUndefined), U8(18),
                 B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetContext), R(1), U8(1),
-                B(PushContext), R(2),
+                B(PushContext), R(4),
                 B(RestoreGeneratorState), R(1),
-                B(Star), R(0),
-                B(SwitchOnSmiNoFeedback), U8(0), U8(1), I8(0),
-                B(Abort), U8(45),
-                B(LdaSmi), I8(-2),
-                B(Star), R(0),
-                B(LdaConstant), U8(1),
-                B(Star), R(4),
-                B(Mov), R(arg0), R(2),
-                B(Mov), R(closure), R(3),
-                B(CallRuntime), U16(Runtime::kPushModuleContext), R(2), U8(3),
-                B(PushContext), R(2),
-                B(Mov), R(this), R(4),
-                B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(3), U8(2),
-                B(StaCurrentContextSlot), U8(4),
-  /*    0 E> */ B(StackCheck),
-                B(Star), R(1),
-                B(LdaImmutableCurrentContextSlot), U8(4),
-  /*    0 E> */ B(SuspendGenerator), R(1), R(0), U8(3), U8(0),
-  /*   64 S> */ B(Return),
-                B(RestoreGeneratorRegisters), R(1), R(0), U8(3),
-                B(LdaSmi), I8(-2),
-                B(Star), R(0),
-                B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(1), U8(1),
                 B(Star), R(3),
+                B(SwitchOnSmiNoFeedback), U8(0), U8(1), I8(0),
+                B(Abort), U8(15),
+                B(LdaSmi), I8(-2),
+                B(Star), R(3),
+                B(LdaConstant), U8(1),
+                B(Star), R(6),
+                B(Mov), R(arg0), R(4),
+                B(Mov), R(closure), R(5),
+                B(CallRuntime), U16(Runtime::kPushModuleContext), R(4), U8(3),
+                B(PushContext), R(4),
+                B(Mov), R(this), R(6),
+                B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(5), U8(2),
+                B(Star), R(1),
+  /*    0 E> */ B(StackCheck),
+  /*    0 E> */ B(SuspendGenerator), R(1), R(0), U8(5), U8(0),
+  /*   64 S> */ B(Return),
+                B(ResumeGenerator), R(1), R(3), R(0), U8(5),
+                B(Star), R(5),
                 B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(1), U8(1),
                 B(SwitchOnSmiNoFeedback), U8(2), U8(2), I8(0),
-                B(Ldar), R(3),
+                B(Ldar), R(5),
   /*    0 E> */ B(Throw),
-                B(Ldar), R(3),
+                B(Ldar), R(5),
   /*   64 S> */ B(Return),
   /*   32 S> */ B(LdaModuleVariable), I8(-1), U8(0),
                 B(ThrowReferenceErrorIfHole), U8(4),
-                B(Star), R(3),
-                B(LdaSmi), I8(42),
-                B(Star), R(4),
-  /*   32 E> */ B(CallUndefinedReceiver1), R(3), R(4), U8(0),
-                B(Ldar), R(closure),
-                B(CreateBlockContext), U8(5),
-                B(PushContext), R(3),
-                B(LdaTheHole),
-                B(StaCurrentContextSlot), U8(4),
-  /*   47 S> */ B(LdaUndefined),
-  /*   47 E> */ B(StaCurrentContextSlot), U8(4),
-  /*   52 S> */ B(LdaModuleVariable), I8(-1), U8(1),
-                B(ThrowReferenceErrorIfHole), U8(4),
-                B(Star), R(4),
-                B(LdaSmi), I8(42),
                 B(Star), R(5),
-  /*   52 E> */ B(CallUndefinedReceiver1), R(4), R(5), U8(2),
-                B(StaContextSlot), R(3), U8(5), U8(0),
-                B(PopContext), R(3),
-                B(LdaCurrentContextSlot), U8(5),
+                B(LdaSmi), I8(42),
+                B(Star), R(6),
+  /*   32 E> */ B(CallUndefinedReceiver1), R(5), R(6), U8(0),
+  /*   47 S> */ B(LdaUndefined),
+                B(Star), R(0),
+  /*   52 S> */ B(LdaModuleVariable), I8(-1), U8(0),
+                B(ThrowReferenceErrorIfHole), U8(4),
+                B(Star), R(5),
+                B(LdaSmi), I8(42),
+                B(Star), R(6),
+  /*   52 E> */ B(CallUndefinedReceiver1), R(5), R(6), U8(2),
+                B(Star), R(2),
   /*   64 S> */ B(Return),
 ]
 constant pool: [
-  Smi [47],
+  Smi [43],
   FIXED_ARRAY_TYPE,
   Smi [10],
   Smi [7],
   ONE_BYTE_INTERNALIZED_STRING_TYPE ["goo"],
-  FIXED_ARRAY_TYPE,
 ]
 handlers: [
 ]
@@ -207,74 +182,61 @@
   foo++;
   { let x; { foo++ } };
 "
-frame size: 5
+frame size: 7
 parameter count: 2
-bytecode array length: 137
+bytecode array length: 112
 bytecodes: [
                 B(Ldar), R(1),
                 B(JumpIfUndefined), U8(18),
                 B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetContext), R(1), U8(1),
-                B(PushContext), R(2),
+                B(PushContext), R(4),
                 B(RestoreGeneratorState), R(1),
-                B(Star), R(0),
-                B(SwitchOnSmiNoFeedback), U8(0), U8(1), I8(0),
-                B(Abort), U8(45),
-                B(LdaSmi), I8(-2),
-                B(Star), R(0),
-                B(LdaConstant), U8(1),
-                B(Star), R(4),
-                B(Mov), R(arg0), R(2),
-                B(Mov), R(closure), R(3),
-                B(CallRuntime), U16(Runtime::kPushModuleContext), R(2), U8(3),
-                B(PushContext), R(2),
-                B(Mov), R(this), R(4),
-                B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(3), U8(2),
-                B(StaCurrentContextSlot), U8(4),
-  /*    0 E> */ B(StackCheck),
-                B(Star), R(1),
-                B(LdaImmutableCurrentContextSlot), U8(4),
-  /*    0 E> */ B(SuspendGenerator), R(1), R(0), U8(3), U8(0),
-  /*   49 S> */ B(Return),
-                B(RestoreGeneratorRegisters), R(1), R(0), U8(3),
-                B(LdaSmi), I8(-2),
-                B(Star), R(0),
-                B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(1), U8(1),
                 B(Star), R(3),
+                B(SwitchOnSmiNoFeedback), U8(0), U8(1), I8(0),
+                B(Abort), U8(15),
+                B(LdaSmi), I8(-2),
+                B(Star), R(3),
+                B(LdaConstant), U8(1),
+                B(Star), R(6),
+                B(Mov), R(arg0), R(4),
+                B(Mov), R(closure), R(5),
+                B(CallRuntime), U16(Runtime::kPushModuleContext), R(4), U8(3),
+                B(PushContext), R(4),
+                B(Mov), R(this), R(6),
+                B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(5), U8(2),
+                B(Star), R(1),
+  /*    0 E> */ B(StackCheck),
+  /*    0 E> */ B(SuspendGenerator), R(1), R(0), U8(5), U8(0),
+  /*   49 S> */ B(Return),
+                B(ResumeGenerator), R(1), R(3), R(0), U8(5),
+                B(Star), R(5),
                 B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(1), U8(1),
                 B(SwitchOnSmiNoFeedback), U8(2), U8(2), I8(0),
-                B(Ldar), R(3),
+                B(Ldar), R(5),
   /*    0 E> */ B(Throw),
-                B(Ldar), R(3),
+                B(Ldar), R(5),
   /*   49 S> */ B(Return),
   /*   17 S> */ B(LdaSmi), I8(42),
   /*   17 E> */ B(StaModuleVariable), I8(1), U8(0),
   /*   21 S> */ B(LdaModuleVariable), I8(1), U8(0),
                 B(Inc), U8(0),
   /*   24 E> */ B(StaModuleVariable), I8(1), U8(0),
-                B(Ldar), R(closure),
-                B(CreateBlockContext), U8(4),
-                B(PushContext), R(3),
-                B(LdaTheHole),
-                B(StaCurrentContextSlot), U8(4),
   /*   34 S> */ B(LdaUndefined),
-  /*   34 E> */ B(StaCurrentContextSlot), U8(4),
-  /*   39 S> */ B(LdaModuleVariable), I8(1), U8(1),
-                B(ToNumber), U8(1),
-                B(Star), R(4),
+                B(Star), R(0),
+  /*   39 S> */ B(LdaModuleVariable), I8(1), U8(0),
+                B(ToNumeric), U8(1),
+                B(Star), R(5),
                 B(Inc), U8(1),
-  /*   42 E> */ B(StaModuleVariable), I8(1), U8(1),
-                B(Ldar), R(4),
-                B(StaContextSlot), R(3), U8(5), U8(0),
-                B(PopContext), R(3),
-                B(LdaCurrentContextSlot), U8(5),
+  /*   42 E> */ B(StaModuleVariable), I8(1), U8(0),
+                B(Mov), R(5), R(2),
+                B(Ldar), R(2),
   /*   49 S> */ B(Return),
 ]
 constant pool: [
-  Smi [47],
+  Smi [43],
   FIXED_ARRAY_TYPE,
   Smi [10],
   Smi [7],
-  FIXED_ARRAY_TYPE,
 ]
 handlers: [
 ]
@@ -285,76 +247,64 @@
   foo++;
   { let x; { foo++ } };
 "
-frame size: 5
+frame size: 7
 parameter count: 2
-bytecode array length: 141
+bytecode array length: 118
 bytecodes: [
                 B(Ldar), R(1),
                 B(JumpIfUndefined), U8(18),
                 B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetContext), R(1), U8(1),
-                B(PushContext), R(2),
+                B(PushContext), R(4),
                 B(RestoreGeneratorState), R(1),
-                B(Star), R(0),
+                B(Star), R(3),
                 B(SwitchOnSmiNoFeedback), U8(0), U8(1), I8(0),
-                B(Abort), U8(45),
+                B(Abort), U8(15),
                 B(LdaSmi), I8(-2),
-                B(Star), R(0),
+                B(Star), R(3),
                 B(LdaConstant), U8(1),
-                B(Star), R(4),
-                B(Mov), R(arg0), R(2),
-                B(Mov), R(closure), R(3),
-                B(CallRuntime), U16(Runtime::kPushModuleContext), R(2), U8(3),
-                B(PushContext), R(2),
-                B(Mov), R(this), R(4),
-                B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(3), U8(2),
-                B(StaCurrentContextSlot), U8(4),
+                B(Star), R(6),
+                B(Mov), R(arg0), R(4),
+                B(Mov), R(closure), R(5),
+                B(CallRuntime), U16(Runtime::kPushModuleContext), R(4), U8(3),
+                B(PushContext), R(4),
+                B(Mov), R(this), R(6),
+                B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(5), U8(2),
                 B(Star), R(1),
                 B(LdaTheHole),
                 B(StaModuleVariable), I8(1), U8(0),
   /*    0 E> */ B(StackCheck),
-                B(LdaImmutableCurrentContextSlot), U8(4),
-  /*    0 E> */ B(SuspendGenerator), R(1), R(0), U8(3), U8(0),
+                B(Ldar), R(1),
+  /*    0 E> */ B(SuspendGenerator), R(1), R(0), U8(5), U8(0),
   /*   49 S> */ B(Return),
-                B(RestoreGeneratorRegisters), R(1), R(0), U8(3),
-                B(LdaSmi), I8(-2),
-                B(Star), R(0),
-                B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(1), U8(1),
-                B(Star), R(3),
+                B(ResumeGenerator), R(1), R(3), R(0), U8(5),
+                B(Star), R(5),
                 B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(1), U8(1),
                 B(SwitchOnSmiNoFeedback), U8(2), U8(2), I8(0),
-                B(Ldar), R(3),
+                B(Ldar), R(5),
   /*    0 E> */ B(Throw),
-                B(Ldar), R(3),
+                B(Ldar), R(5),
   /*   49 S> */ B(Return),
   /*   17 S> */ B(LdaSmi), I8(42),
   /*   17 E> */ B(StaModuleVariable), I8(1), U8(0),
   /*   21 S> */ B(LdaModuleVariable), I8(1), U8(0),
                 B(Inc), U8(0),
   /*   24 E> */ B(StaModuleVariable), I8(1), U8(0),
-                B(Ldar), R(closure),
-                B(CreateBlockContext), U8(4),
-                B(PushContext), R(3),
-                B(LdaTheHole),
-                B(StaCurrentContextSlot), U8(4),
   /*   34 S> */ B(LdaUndefined),
-  /*   34 E> */ B(StaCurrentContextSlot), U8(4),
-  /*   39 S> */ B(LdaModuleVariable), I8(1), U8(1),
-                B(ToNumber), U8(1),
-                B(Star), R(4),
+                B(Star), R(0),
+  /*   39 S> */ B(LdaModuleVariable), I8(1), U8(0),
+                B(ToNumeric), U8(1),
+                B(Star), R(5),
                 B(Inc), U8(1),
-  /*   42 E> */ B(StaModuleVariable), I8(1), U8(1),
-                B(Ldar), R(4),
-                B(StaContextSlot), R(3), U8(5), U8(0),
-                B(PopContext), R(3),
-                B(LdaCurrentContextSlot), U8(5),
+  /*   42 E> */ B(StaModuleVariable), I8(1), U8(0),
+                B(Mov), R(5), R(2),
+                B(Ldar), R(2),
   /*   49 S> */ B(Return),
 ]
 constant pool: [
-  Smi [51],
+  Smi [49],
   FIXED_ARRAY_TYPE,
   Smi [10],
   Smi [7],
-  FIXED_ARRAY_TYPE,
 ]
 handlers: [
 ]
@@ -365,76 +315,64 @@
   foo++;
   { let x; { foo++ } };
 "
-frame size: 5
+frame size: 7
 parameter count: 2
-bytecode array length: 145
+bytecode array length: 122
 bytecodes: [
                 B(Ldar), R(1),
                 B(JumpIfUndefined), U8(18),
                 B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetContext), R(1), U8(1),
-                B(PushContext), R(2),
+                B(PushContext), R(4),
                 B(RestoreGeneratorState), R(1),
-                B(Star), R(0),
+                B(Star), R(3),
                 B(SwitchOnSmiNoFeedback), U8(0), U8(1), I8(0),
-                B(Abort), U8(45),
+                B(Abort), U8(15),
                 B(LdaSmi), I8(-2),
-                B(Star), R(0),
+                B(Star), R(3),
                 B(LdaConstant), U8(1),
-                B(Star), R(4),
-                B(Mov), R(arg0), R(2),
-                B(Mov), R(closure), R(3),
-                B(CallRuntime), U16(Runtime::kPushModuleContext), R(2), U8(3),
-                B(PushContext), R(2),
-                B(Mov), R(this), R(4),
-                B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(3), U8(2),
-                B(StaCurrentContextSlot), U8(4),
+                B(Star), R(6),
+                B(Mov), R(arg0), R(4),
+                B(Mov), R(closure), R(5),
+                B(CallRuntime), U16(Runtime::kPushModuleContext), R(4), U8(3),
+                B(PushContext), R(4),
+                B(Mov), R(this), R(6),
+                B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(5), U8(2),
                 B(Star), R(1),
                 B(LdaTheHole),
                 B(StaModuleVariable), I8(1), U8(0),
   /*    0 E> */ B(StackCheck),
-                B(LdaImmutableCurrentContextSlot), U8(4),
-  /*    0 E> */ B(SuspendGenerator), R(1), R(0), U8(3), U8(0),
+                B(Ldar), R(1),
+  /*    0 E> */ B(SuspendGenerator), R(1), R(0), U8(5), U8(0),
   /*   51 S> */ B(Return),
-                B(RestoreGeneratorRegisters), R(1), R(0), U8(3),
-                B(LdaSmi), I8(-2),
-                B(Star), R(0),
-                B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(1), U8(1),
-                B(Star), R(3),
+                B(ResumeGenerator), R(1), R(3), R(0), U8(5),
+                B(Star), R(5),
                 B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(1), U8(1),
                 B(SwitchOnSmiNoFeedback), U8(2), U8(2), I8(0),
-                B(Ldar), R(3),
+                B(Ldar), R(5),
   /*    0 E> */ B(Throw),
-                B(Ldar), R(3),
+                B(Ldar), R(5),
   /*   51 S> */ B(Return),
   /*   19 S> */ B(LdaSmi), I8(42),
   /*   19 E> */ B(StaModuleVariable), I8(1), U8(0),
   /*   23 S> */ B(LdaModuleVariable), I8(1), U8(0),
                 B(Inc), U8(0),
   /*   26 E> */ B(CallRuntime), U16(Runtime::kThrowConstAssignError), R(0), U8(0),
-                B(Ldar), R(closure),
-                B(CreateBlockContext), U8(4),
-                B(PushContext), R(3),
-                B(LdaTheHole),
-                B(StaCurrentContextSlot), U8(4),
   /*   36 S> */ B(LdaUndefined),
-  /*   36 E> */ B(StaCurrentContextSlot), U8(4),
-  /*   41 S> */ B(LdaModuleVariable), I8(1), U8(1),
-                B(ToNumber), U8(1),
-                B(Star), R(4),
+                B(Star), R(0),
+  /*   41 S> */ B(LdaModuleVariable), I8(1), U8(0),
+                B(ToNumeric), U8(1),
+                B(Star), R(5),
                 B(Inc), U8(1),
   /*   44 E> */ B(CallRuntime), U16(Runtime::kThrowConstAssignError), R(0), U8(0),
-                B(Ldar), R(4),
-                B(StaContextSlot), R(3), U8(5), U8(0),
-                B(PopContext), R(3),
-                B(LdaCurrentContextSlot), U8(5),
+                B(Mov), R(5), R(2),
+                B(Ldar), R(2),
   /*   51 S> */ B(Return),
 ]
 constant pool: [
-  Smi [51],
+  Smi [49],
   FIXED_ARRAY_TYPE,
   Smi [10],
   Smi [7],
-  FIXED_ARRAY_TYPE,
 ]
 handlers: [
 ]
@@ -443,56 +381,51 @@
 snippet: "
   export default (function () {});
 "
-frame size: 5
+frame size: 6
 parameter count: 2
-bytecode array length: 107
+bytecode array length: 97
 bytecodes: [
-                B(Ldar), R(1),
+                B(Ldar), R(0),
                 B(JumpIfUndefined), U8(18),
-                B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetContext), R(1), U8(1),
-                B(PushContext), R(2),
-                B(RestoreGeneratorState), R(1),
-                B(Star), R(0),
+                B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetContext), R(0), U8(1),
+                B(PushContext), R(3),
+                B(RestoreGeneratorState), R(0),
+                B(Star), R(2),
                 B(SwitchOnSmiNoFeedback), U8(0), U8(1), I8(0),
-                B(Abort), U8(45),
+                B(Abort), U8(15),
                 B(LdaSmi), I8(-2),
-                B(Star), R(0),
+                B(Star), R(2),
                 B(LdaConstant), U8(1),
-                B(Star), R(4),
-                B(Mov), R(arg0), R(2),
-                B(Mov), R(closure), R(3),
-                B(CallRuntime), U16(Runtime::kPushModuleContext), R(2), U8(3),
-                B(PushContext), R(2),
-                B(Mov), R(this), R(4),
-                B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(3), U8(2),
-                B(StaCurrentContextSlot), U8(4),
-                B(Star), R(1),
+                B(Star), R(5),
+                B(Mov), R(arg0), R(3),
+                B(Mov), R(closure), R(4),
+                B(CallRuntime), U16(Runtime::kPushModuleContext), R(3), U8(3),
+                B(PushContext), R(3),
+                B(Mov), R(this), R(5),
+                B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(4), U8(2),
+                B(Star), R(0),
                 B(LdaTheHole),
                 B(StaModuleVariable), I8(1), U8(0),
   /*    0 E> */ B(StackCheck),
-                B(LdaImmutableCurrentContextSlot), U8(4),
-  /*    0 E> */ B(SuspendGenerator), R(1), R(0), U8(3), U8(0),
+                B(Ldar), R(0),
+  /*    0 E> */ B(SuspendGenerator), R(0), R(0), U8(4), U8(0),
   /*   32 S> */ B(Return),
-                B(RestoreGeneratorRegisters), R(1), R(0), U8(3),
-                B(LdaSmi), I8(-2),
-                B(Star), R(0),
-                B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(1), U8(1),
-                B(Star), R(3),
-                B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(1), U8(1),
+                B(ResumeGenerator), R(0), R(2), R(0), U8(4),
+                B(Star), R(4),
+                B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
                 B(SwitchOnSmiNoFeedback), U8(2), U8(2), I8(0),
-                B(Ldar), R(3),
+                B(Ldar), R(4),
   /*    0 E> */ B(Throw),
-                B(Ldar), R(3),
+                B(Ldar), R(4),
   /*   32 S> */ B(Return),
-                B(Ldar), R(3),
-                B(StaCurrentContextSlot), U8(5),
+                B(Mov), R(4), R(1),
                 B(CreateClosure), U8(4), U8(0), U8(0),
                 B(StaModuleVariable), I8(1), U8(0),
-                B(LdaCurrentContextSlot), U8(5),
+                B(Ldar), R(1),
   /*   32 S> */ B(Return),
 ]
 constant pool: [
-  Smi [51],
+  Smi [49],
   FIXED_ARRAY_TYPE,
   Smi [10],
   Smi [7],
@@ -507,69 +440,62 @@
 "
 frame size: 8
 parameter count: 2
-bytecode array length: 140
+bytecode array length: 118
 bytecodes: [
-                B(Ldar), R(1),
+                B(Ldar), R(0),
                 B(JumpIfUndefined), U8(18),
-                B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetContext), R(1), U8(1),
-                B(PushContext), R(2),
-                B(RestoreGeneratorState), R(1),
-                B(Star), R(0),
+                B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetContext), R(0), U8(1),
+                B(PushContext), R(3),
+                B(RestoreGeneratorState), R(0),
+                B(Star), R(2),
                 B(SwitchOnSmiNoFeedback), U8(0), U8(1), I8(0),
-                B(Abort), U8(45),
+                B(Abort), U8(15),
                 B(LdaSmi), I8(-2),
-                B(Star), R(0),
+                B(Star), R(2),
                 B(LdaConstant), U8(1),
-                B(Star), R(4),
-                B(Mov), R(arg0), R(2),
-                B(Mov), R(closure), R(3),
-                B(CallRuntime), U16(Runtime::kPushModuleContext), R(2), U8(3),
-                B(PushContext), R(2),
-                B(Mov), R(this), R(4),
-                B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(3), U8(2),
-                B(StaCurrentContextSlot), U8(4),
-                B(Star), R(1),
+                B(Star), R(5),
+                B(Mov), R(arg0), R(3),
+                B(Mov), R(closure), R(4),
+                B(CallRuntime), U16(Runtime::kPushModuleContext), R(3), U8(3),
+                B(PushContext), R(3),
+                B(Mov), R(this), R(5),
+                B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(4), U8(2),
+                B(Star), R(0),
                 B(LdaTheHole),
                 B(StaModuleVariable), I8(1), U8(0),
   /*    0 E> */ B(StackCheck),
-                B(LdaImmutableCurrentContextSlot), U8(4),
-  /*    0 E> */ B(SuspendGenerator), R(1), R(0), U8(3), U8(0),
+                B(Ldar), R(0),
+  /*    0 E> */ B(SuspendGenerator), R(0), R(0), U8(4), U8(0),
   /*   26 S> */ B(Return),
-                B(RestoreGeneratorRegisters), R(1), R(0), U8(3),
-                B(LdaSmi), I8(-2),
-                B(Star), R(0),
-                B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(1), U8(1),
-                B(Star), R(3),
-                B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(1), U8(1),
+                B(ResumeGenerator), R(0), R(2), R(0), U8(4),
+                B(Star), R(4),
+                B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
                 B(SwitchOnSmiNoFeedback), U8(2), U8(2), I8(0),
-                B(Ldar), R(3),
+                B(Ldar), R(4),
   /*    0 E> */ B(Throw),
-                B(Ldar), R(3),
+                B(Ldar), R(4),
   /*   26 S> */ B(Return),
-                B(Ldar), R(3),
-                B(StaCurrentContextSlot), U8(5),
-                B(CreateClosure), U8(4), U8(0), U8(0),
-                B(Star), R(3),
+                B(Mov), R(4), R(1),
                 B(LdaTheHole),
-                B(Star), R(4),
-                B(LdaSmi), I8(16),
-                B(Star), R(6),
-                B(LdaSmi), I8(24),
                 B(Star), R(7),
-                B(Mov), R(3), R(5),
-                B(CallRuntime), U16(Runtime::kDefineClass), R(4), U8(4),
+                B(CreateClosure), U8(5), U8(0), U8(0),
                 B(Star), R(4),
-                B(CallRuntime), U16(Runtime::kInstallClassNameAccessor), R(3), U8(1),
-                B(CallRuntime), U16(Runtime::kToFastProperties), R(3), U8(1),
+                B(LdaConstant), U8(4),
+                B(Star), R(5),
+                B(Mov), R(4), R(6),
+                B(CallRuntime), U16(Runtime::kDefineClass), R(5), U8(3),
+                B(Star), R(5),
+                B(Ldar), R(6),
                 B(StaModuleVariable), I8(1), U8(0),
-                B(LdaCurrentContextSlot), U8(5),
+                B(Ldar), R(1),
   /*   26 S> */ B(Return),
 ]
 constant pool: [
-  Smi [51],
+  Smi [49],
   FIXED_ARRAY_TYPE,
   Smi [10],
   Smi [7],
+  FIXED_ARRAY_TYPE,
   SHARED_FUNCTION_INFO_TYPE,
 ]
 handlers: [
@@ -579,52 +505,46 @@
 snippet: "
   export {foo as goo} from \"bar\"
 "
-frame size: 5
+frame size: 6
 parameter count: 2
-bytecode array length: 96
+bytecode array length: 84
 bytecodes: [
-                B(Ldar), R(1),
+                B(Ldar), R(0),
                 B(JumpIfUndefined), U8(18),
-                B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetContext), R(1), U8(1),
-                B(PushContext), R(2),
-                B(RestoreGeneratorState), R(1),
-                B(Star), R(0),
+                B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetContext), R(0), U8(1),
+                B(PushContext), R(3),
+                B(RestoreGeneratorState), R(0),
+                B(Star), R(2),
                 B(SwitchOnSmiNoFeedback), U8(0), U8(1), I8(0),
-                B(Abort), U8(45),
+                B(Abort), U8(15),
                 B(LdaSmi), I8(-2),
-                B(Star), R(0),
+                B(Star), R(2),
                 B(LdaConstant), U8(1),
-                B(Star), R(4),
-                B(Mov), R(arg0), R(2),
-                B(Mov), R(closure), R(3),
-                B(CallRuntime), U16(Runtime::kPushModuleContext), R(2), U8(3),
-                B(PushContext), R(2),
-                B(Mov), R(this), R(4),
-                B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(3), U8(2),
-                B(StaCurrentContextSlot), U8(4),
-  /*    0 E> */ B(StackCheck),
-                B(Star), R(1),
-                B(LdaImmutableCurrentContextSlot), U8(4),
-  /*    0 E> */ B(SuspendGenerator), R(1), R(0), U8(3), U8(0),
-  /*   30 S> */ B(Return),
-                B(RestoreGeneratorRegisters), R(1), R(0), U8(3),
-                B(LdaSmi), I8(-2),
+                B(Star), R(5),
+                B(Mov), R(arg0), R(3),
+                B(Mov), R(closure), R(4),
+                B(CallRuntime), U16(Runtime::kPushModuleContext), R(3), U8(3),
+                B(PushContext), R(3),
+                B(Mov), R(this), R(5),
+                B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(4), U8(2),
                 B(Star), R(0),
-                B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(1), U8(1),
-                B(Star), R(3),
-                B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(1), U8(1),
-                B(SwitchOnSmiNoFeedback), U8(2), U8(2), I8(0),
-                B(Ldar), R(3),
-  /*    0 E> */ B(Throw),
-                B(Ldar), R(3),
+  /*    0 E> */ B(StackCheck),
+  /*    0 E> */ B(SuspendGenerator), R(0), R(0), U8(4), U8(0),
   /*   30 S> */ B(Return),
-                B(Ldar), R(3),
-                B(StaCurrentContextSlot), U8(5),
-                B(LdaCurrentContextSlot), U8(5),
+                B(ResumeGenerator), R(0), R(2), R(0), U8(4),
+                B(Star), R(4),
+                B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
+                B(SwitchOnSmiNoFeedback), U8(2), U8(2), I8(0),
+                B(Ldar), R(4),
+  /*    0 E> */ B(Throw),
+                B(Ldar), R(4),
+  /*   30 S> */ B(Return),
+                B(Mov), R(4), R(1),
+                B(Ldar), R(1),
   /*   30 S> */ B(Return),
 ]
 constant pool: [
-  Smi [47],
+  Smi [43],
   FIXED_ARRAY_TYPE,
   Smi [10],
   Smi [7],
@@ -636,52 +556,46 @@
 snippet: "
   export * from \"bar\"
 "
-frame size: 5
+frame size: 6
 parameter count: 2
-bytecode array length: 96
+bytecode array length: 84
 bytecodes: [
-                B(Ldar), R(1),
+                B(Ldar), R(0),
                 B(JumpIfUndefined), U8(18),
-                B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetContext), R(1), U8(1),
-                B(PushContext), R(2),
-                B(RestoreGeneratorState), R(1),
-                B(Star), R(0),
+                B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetContext), R(0), U8(1),
+                B(PushContext), R(3),
+                B(RestoreGeneratorState), R(0),
+                B(Star), R(2),
                 B(SwitchOnSmiNoFeedback), U8(0), U8(1), I8(0),
-                B(Abort), U8(45),
+                B(Abort), U8(15),
                 B(LdaSmi), I8(-2),
-                B(Star), R(0),
+                B(Star), R(2),
                 B(LdaConstant), U8(1),
-                B(Star), R(4),
-                B(Mov), R(arg0), R(2),
-                B(Mov), R(closure), R(3),
-                B(CallRuntime), U16(Runtime::kPushModuleContext), R(2), U8(3),
-                B(PushContext), R(2),
-                B(Mov), R(this), R(4),
-                B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(3), U8(2),
-                B(StaCurrentContextSlot), U8(4),
-  /*    0 E> */ B(StackCheck),
-                B(Star), R(1),
-                B(LdaImmutableCurrentContextSlot), U8(4),
-  /*    0 E> */ B(SuspendGenerator), R(1), R(0), U8(3), U8(0),
-  /*   19 S> */ B(Return),
-                B(RestoreGeneratorRegisters), R(1), R(0), U8(3),
-                B(LdaSmi), I8(-2),
+                B(Star), R(5),
+                B(Mov), R(arg0), R(3),
+                B(Mov), R(closure), R(4),
+                B(CallRuntime), U16(Runtime::kPushModuleContext), R(3), U8(3),
+                B(PushContext), R(3),
+                B(Mov), R(this), R(5),
+                B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(4), U8(2),
                 B(Star), R(0),
-                B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(1), U8(1),
-                B(Star), R(3),
-                B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(1), U8(1),
-                B(SwitchOnSmiNoFeedback), U8(2), U8(2), I8(0),
-                B(Ldar), R(3),
-  /*    0 E> */ B(Throw),
-                B(Ldar), R(3),
+  /*    0 E> */ B(StackCheck),
+  /*    0 E> */ B(SuspendGenerator), R(0), R(0), U8(4), U8(0),
   /*   19 S> */ B(Return),
-                B(Ldar), R(3),
-                B(StaCurrentContextSlot), U8(5),
-                B(LdaCurrentContextSlot), U8(5),
+                B(ResumeGenerator), R(0), R(2), R(0), U8(4),
+                B(Star), R(4),
+                B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
+                B(SwitchOnSmiNoFeedback), U8(2), U8(2), I8(0),
+                B(Ldar), R(4),
+  /*    0 E> */ B(Throw),
+                B(Ldar), R(4),
+  /*   19 S> */ B(Return),
+                B(Mov), R(4), R(1),
+                B(Ldar), R(1),
   /*   19 S> */ B(Return),
 ]
 constant pool: [
-  Smi [47],
+  Smi [43],
   FIXED_ARRAY_TYPE,
   Smi [10],
   Smi [7],
@@ -694,66 +608,55 @@
   import * as foo from \"bar\"
   foo.f(foo, foo.x);
 "
-frame size: 7
+frame size: 9
 parameter count: 2
-bytecode array length: 134
+bytecode array length: 111
 bytecodes: [
-                B(Ldar), R(1),
+                B(Ldar), R(0),
                 B(JumpIfUndefined), U8(18),
-                B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetContext), R(1), U8(1),
-                B(PushContext), R(2),
-                B(RestoreGeneratorState), R(1),
-                B(Star), R(0),
+                B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetContext), R(0), U8(1),
+                B(PushContext), R(4),
+                B(RestoreGeneratorState), R(0),
+                B(Star), R(3),
                 B(SwitchOnSmiNoFeedback), U8(0), U8(1), I8(0),
-                B(Abort), U8(45),
+                B(Abort), U8(15),
                 B(LdaSmi), I8(-2),
-                B(Star), R(0),
+                B(Star), R(3),
                 B(LdaConstant), U8(1),
-                B(Star), R(4),
-                B(Mov), R(arg0), R(2),
-                B(Mov), R(closure), R(3),
-                B(CallRuntime), U16(Runtime::kPushModuleContext), R(2), U8(3),
-                B(PushContext), R(2),
-                B(Mov), R(this), R(4),
-                B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(3), U8(2),
-                B(StaCurrentContextSlot), U8(4),
-                B(Star), R(1),
-                B(LdaZero),
-                B(Star), R(3),
-                B(CallRuntime), U16(Runtime::kGetModuleNamespace), R(3), U8(1),
-                B(StaCurrentContextSlot), U8(5),
-  /*    0 E> */ B(StackCheck),
-                B(LdaImmutableCurrentContextSlot), U8(4),
-  /*    0 E> */ B(SuspendGenerator), R(1), R(0), U8(3), U8(0),
-  /*   45 S> */ B(Return),
-                B(RestoreGeneratorRegisters), R(1), R(0), U8(3),
-                B(LdaSmi), I8(-2),
+                B(Star), R(6),
+                B(Mov), R(arg0), R(4),
+                B(Mov), R(closure), R(5),
+                B(CallRuntime), U16(Runtime::kPushModuleContext), R(4), U8(3),
+                B(PushContext), R(4),
+                B(Mov), R(this), R(6),
+                B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(5), U8(2),
                 B(Star), R(0),
-                B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(1), U8(1),
-                B(Star), R(3),
-                B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(1), U8(1),
-                B(SwitchOnSmiNoFeedback), U8(2), U8(2), I8(0),
-                B(Ldar), R(3),
-  /*    0 E> */ B(Throw),
-                B(Ldar), R(3),
-  /*   45 S> */ B(Return),
-  /*   27 S> */ B(LdaImmutableCurrentContextSlot), U8(5),
-                B(Star), R(4),
-  /*   31 E> */ B(LdaNamedProperty), R(4), U8(4), U8(2),
-                B(Star), R(3),
-                B(LdaImmutableCurrentContextSlot), U8(5),
+                B(LdaZero),
                 B(Star), R(5),
-                B(LdaImmutableCurrentContextSlot), U8(5),
-                B(Star), R(6),
-  /*   42 E> */ B(LdaNamedProperty), R(6), U8(5), U8(4),
-                B(Star), R(6),
-  /*   31 E> */ B(CallProperty2), R(3), R(4), R(5), R(6), U8(0),
-                B(StaCurrentContextSlot), U8(6),
-                B(LdaCurrentContextSlot), U8(6),
+                B(CallRuntime), U16(Runtime::kGetModuleNamespace), R(5), U8(1),
+                B(Star), R(1),
+  /*    0 E> */ B(StackCheck),
+                B(Ldar), R(0),
+  /*    0 E> */ B(SuspendGenerator), R(0), R(0), U8(5), U8(0),
+  /*   45 S> */ B(Return),
+                B(ResumeGenerator), R(0), R(3), R(0), U8(5),
+                B(Star), R(5),
+                B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
+                B(SwitchOnSmiNoFeedback), U8(2), U8(2), I8(0),
+                B(Ldar), R(5),
+  /*    0 E> */ B(Throw),
+                B(Ldar), R(5),
+  /*   45 S> */ B(Return),
+  /*   31 S> */ B(LdaNamedProperty), R(1), U8(4), U8(0),
+                B(Star), R(5),
+  /*   42 E> */ B(LdaNamedProperty), R(1), U8(5), U8(2),
+                B(Star), R(8),
+  /*   31 E> */ B(CallProperty2), R(5), R(1), R(1), R(8), U8(4),
+                B(Star), R(2),
   /*   45 S> */ B(Return),
 ]
 constant pool: [
-  Smi [57],
+  Smi [55],
   FIXED_ARRAY_TYPE,
   Smi [10],
   Smi [7],
diff --git a/src/v8/test/cctest/interpreter/bytecode_expectations/NewAndSpread.golden b/src/v8/test/cctest/interpreter/bytecode_expectations/NewAndSpread.golden
index 9f701fe..6a2e1a8 100644
--- a/src/v8/test/cctest/interpreter/bytecode_expectations/NewAndSpread.golden
+++ b/src/v8/test/cctest/interpreter/bytecode_expectations/NewAndSpread.golden
@@ -10,34 +10,31 @@
   class A { constructor(...args) { this.args = args; } }
   new A(...[1, 2, 3]);
 "
-frame size: 7
+frame size: 6
 parameter count: 1
-bytecode array length: 57
+bytecode array length: 45
 bytecodes: [
   /*   30 E> */ B(StackCheck),
-                B(CreateClosure), U8(0), U8(0), U8(2),
-                B(Star), R(2),
                 B(LdaTheHole),
-                B(Star), R(3),
-                B(LdaSmi), I8(34),
                 B(Star), R(5),
-                B(LdaSmi), I8(88),
-                B(Star), R(6),
-                B(Mov), R(2), R(4),
-                B(CallRuntime), U16(Runtime::kDefineClass), R(3), U8(4),
+                B(CreateClosure), U8(1), U8(0), U8(2),
+                B(Star), R(2),
+                B(LdaConstant), U8(0),
                 B(Star), R(3),
-                B(CallRuntime), U16(Runtime::kInstallClassNameAccessor), R(2), U8(1),
-                B(CallRuntime), U16(Runtime::kToFastProperties), R(2), U8(1),
-                B(Star), R(0),
-                B(Star), R(1),
-  /*   89 S> */ B(CreateArrayLiteral), U8(1), U8(3), U8(37),
+                B(Mov), R(2), R(4),
+                B(CallRuntime), U16(Runtime::kDefineClass), R(3), U8(3),
+                B(Star), R(3),
+                B(Mov), R(4), R(0),
+                B(Mov), R(0), R(1),
+  /*   89 S> */ B(CreateArrayLiteral), U8(2), U8(1), U8(37),
                 B(Star), R(3),
                 B(Ldar), R(1),
-  /*   89 E> */ B(ConstructWithSpread), R(1), R(3), U8(1), U8(1),
+  /*   89 E> */ B(ConstructWithSpread), R(2), R(3), U8(1), U8(2),
                 B(LdaUndefined),
   /*  110 S> */ B(Return),
 ]
 constant pool: [
+  FIXED_ARRAY_TYPE,
   SHARED_FUNCTION_INFO_TYPE,
   TUPLE2_TYPE,
 ]
@@ -49,36 +46,33 @@
   class A { constructor(...args) { this.args = args; } }
   new A(0, ...[1, 2, 3]);
 "
-frame size: 7
+frame size: 6
 parameter count: 1
-bytecode array length: 60
+bytecode array length: 48
 bytecodes: [
   /*   30 E> */ B(StackCheck),
-                B(CreateClosure), U8(0), U8(0), U8(2),
-                B(Star), R(2),
                 B(LdaTheHole),
-                B(Star), R(3),
-                B(LdaSmi), I8(34),
                 B(Star), R(5),
-                B(LdaSmi), I8(88),
-                B(Star), R(6),
-                B(Mov), R(2), R(4),
-                B(CallRuntime), U16(Runtime::kDefineClass), R(3), U8(4),
+                B(CreateClosure), U8(1), U8(0), U8(2),
+                B(Star), R(2),
+                B(LdaConstant), U8(0),
                 B(Star), R(3),
-                B(CallRuntime), U16(Runtime::kInstallClassNameAccessor), R(2), U8(1),
-                B(CallRuntime), U16(Runtime::kToFastProperties), R(2), U8(1),
-                B(Star), R(0),
-                B(Star), R(1),
+                B(Mov), R(2), R(4),
+                B(CallRuntime), U16(Runtime::kDefineClass), R(3), U8(3),
+                B(Star), R(3),
+                B(Mov), R(4), R(0),
+                B(Mov), R(0), R(1),
   /*   89 S> */ B(LdaZero),
                 B(Star), R(3),
-                B(CreateArrayLiteral), U8(1), U8(3), U8(37),
+                B(CreateArrayLiteral), U8(2), U8(1), U8(37),
                 B(Star), R(4),
                 B(Ldar), R(1),
-  /*   89 E> */ B(ConstructWithSpread), R(1), R(3), U8(2), U8(1),
+  /*   89 E> */ B(ConstructWithSpread), R(2), R(3), U8(2), U8(2),
                 B(LdaUndefined),
   /*  113 S> */ B(Return),
 ]
 constant pool: [
+  FIXED_ARRAY_TYPE,
   SHARED_FUNCTION_INFO_TYPE,
   TUPLE2_TYPE,
 ]
@@ -90,42 +84,38 @@
   class A { constructor(...args) { this.args = args; } }
   new A(0, ...[1, 2, 3], 4);
 "
-frame size: 7
+frame size: 6
 parameter count: 1
-bytecode array length: 81
+bytecode array length: 66
 bytecodes: [
   /*   30 E> */ B(StackCheck),
-                B(CreateClosure), U8(0), U8(0), U8(2),
-                B(Star), R(2),
                 B(LdaTheHole),
-                B(Star), R(3),
-                B(LdaSmi), I8(34),
                 B(Star), R(5),
-                B(LdaSmi), I8(88),
-                B(Star), R(6),
+                B(CreateClosure), U8(1), U8(0), U8(2),
+                B(Star), R(2),
+                B(LdaConstant), U8(0),
+                B(Star), R(3),
                 B(Mov), R(2), R(4),
-                B(CallRuntime), U16(Runtime::kDefineClass), R(3), U8(4),
+                B(CallRuntime), U16(Runtime::kDefineClass), R(3), U8(3),
                 B(Star), R(3),
-                B(CallRuntime), U16(Runtime::kInstallClassNameAccessor), R(2), U8(1),
-                B(CallRuntime), U16(Runtime::kToFastProperties), R(2), U8(1),
-                B(Star), R(0),
-                B(Star), R(1),
-  /*   89 S> */ B(CreateArrayLiteral), U8(1), U8(1), U8(37),
+                B(Mov), R(4), R(0),
+                B(Mov), R(0), R(1),
+  /*   89 S> */ B(CreateArrayLiteral), U8(2), U8(1), U8(37),
                 B(Star), R(3),
-                B(CreateArrayLiteral), U8(2), U8(2), U8(37),
+                B(CreateArrayLiteral), U8(3), U8(2), U8(37),
                 B(Star), R(4),
                 B(CallJSRuntime), U8(%spread_iterable), R(4), U8(1),
                 B(Star), R(4),
-                B(CreateArrayLiteral), U8(3), U8(3), U8(37),
+                B(CreateArrayLiteral), U8(4), U8(3), U8(37),
                 B(Star), R(5),
                 B(CallJSRuntime), U8(%spread_arguments), R(3), U8(3),
                 B(Star), R(3),
-                B(Mov), R(1), R(2),
                 B(CallJSRuntime), U8(%reflect_construct), R(2), U8(2),
                 B(LdaUndefined),
   /*  116 S> */ B(Return),
 ]
 constant pool: [
+  FIXED_ARRAY_TYPE,
   SHARED_FUNCTION_INFO_TYPE,
   TUPLE2_TYPE,
   TUPLE2_TYPE,
diff --git a/src/v8/test/cctest/interpreter/bytecode_expectations/ObjectLiterals.golden b/src/v8/test/cctest/interpreter/bytecode_expectations/ObjectLiterals.golden
index 5aab58c..63014f7 100644
--- a/src/v8/test/cctest/interpreter/bytecode_expectations/ObjectLiterals.golden
+++ b/src/v8/test/cctest/interpreter/bytecode_expectations/ObjectLiterals.golden
@@ -75,8 +75,8 @@
   /*   30 E> */ B(StackCheck),
   /*   42 S> */ B(LdaSmi), I8(1),
                 B(Star), R(0),
-  /*   45 S> */ B(CreateObjectLiteral), U8(0), U8(1), U8(41), R(1),
-  /*   69 E> */ B(AddSmi), I8(1), U8(0),
+  /*   45 S> */ B(CreateObjectLiteral), U8(0), U8(0), U8(41), R(1),
+  /*   69 E> */ B(AddSmi), I8(1), U8(1),
                 B(StaNamedOwnProperty), R(1), U8(1), U8(2),
                 B(Ldar), R(1),
   /*   75 S> */ B(Return),
@@ -97,8 +97,8 @@
 bytecode array length: 17
 bytecodes: [
   /*   30 E> */ B(StackCheck),
-  /*   34 S> */ B(CreateObjectLiteral), U8(0), U8(1), U8(41), R(0),
-                B(CreateClosure), U8(1), U8(0), U8(2),
+  /*   34 S> */ B(CreateObjectLiteral), U8(0), U8(0), U8(41), R(0),
+                B(CreateClosure), U8(1), U8(1), U8(2),
                 B(StaNamedOwnProperty), R(0), U8(2), U8(2),
                 B(Ldar), R(0),
   /*   66 S> */ B(Return),
@@ -120,8 +120,8 @@
 bytecode array length: 17
 bytecodes: [
   /*   30 E> */ B(StackCheck),
-  /*   34 S> */ B(CreateObjectLiteral), U8(0), U8(1), U8(41), R(0),
-                B(CreateClosure), U8(1), U8(0), U8(2),
+  /*   34 S> */ B(CreateObjectLiteral), U8(0), U8(0), U8(41), R(0),
+                B(CreateClosure), U8(1), U8(1), U8(2),
                 B(StaNamedOwnProperty), R(0), U8(2), U8(2),
                 B(Ldar), R(0),
   /*   67 S> */ B(Return),
@@ -143,10 +143,10 @@
 bytecode array length: 33
 bytecodes: [
   /*   30 E> */ B(StackCheck),
-  /*   34 S> */ B(CreateObjectLiteral), U8(0), U8(1), U8(41), R(0),
+  /*   34 S> */ B(CreateObjectLiteral), U8(0), U8(0), U8(41), R(0),
                 B(LdaConstant), U8(1),
                 B(Star), R(2),
-                B(CreateClosure), U8(2), U8(0), U8(2),
+                B(CreateClosure), U8(2), U8(1), U8(2),
                 B(Star), R(3),
                 B(LdaNull),
                 B(Star), R(4),
@@ -174,12 +174,12 @@
 bytecode array length: 36
 bytecodes: [
   /*   30 E> */ B(StackCheck),
-  /*   34 S> */ B(CreateObjectLiteral), U8(0), U8(2), U8(41), R(0),
+  /*   34 S> */ B(CreateObjectLiteral), U8(0), U8(0), U8(41), R(0),
                 B(LdaConstant), U8(1),
                 B(Star), R(2),
-                B(CreateClosure), U8(2), U8(0), U8(2),
+                B(CreateClosure), U8(2), U8(1), U8(2),
                 B(Star), R(3),
-                B(CreateClosure), U8(3), U8(1), U8(2),
+                B(CreateClosure), U8(3), U8(2), U8(2),
                 B(Star), R(4),
                 B(LdaZero),
                 B(Star), R(5),
@@ -206,12 +206,12 @@
 bytecode array length: 33
 bytecodes: [
   /*   30 E> */ B(StackCheck),
-  /*   34 S> */ B(CreateObjectLiteral), U8(0), U8(1), U8(41), R(0),
+  /*   34 S> */ B(CreateObjectLiteral), U8(0), U8(0), U8(41), R(0),
                 B(LdaConstant), U8(1),
                 B(Star), R(2),
                 B(LdaNull),
                 B(Star), R(3),
-                B(CreateClosure), U8(2), U8(0), U8(2),
+                B(CreateClosure), U8(2), U8(1), U8(2),
                 B(Star), R(4),
                 B(LdaZero),
                 B(Star), R(5),
@@ -306,13 +306,14 @@
 "
 frame size: 3
 parameter count: 1
-bytecode array length: 26
+bytecode array length: 28
 bytecodes: [
   /*   30 E> */ B(StackCheck),
   /*   42 S> */ B(LdaConstant), U8(0),
                 B(Star), R(0),
   /*   50 S> */ B(CreateObjectLiteral), U8(1), U8(0), U8(41), R(1),
   /*   64 E> */ B(StaNamedOwnProperty), R(1), U8(2), U8(1),
+                B(Ldar), R(0),
   /*   68 E> */ B(ToName), R(2),
                 B(LdaSmi), I8(1),
                 B(StaDataPropertyInLiteral), R(1), R(2), U8(0), U8(3),
@@ -338,10 +339,10 @@
   /*   30 E> */ B(StackCheck),
   /*   42 S> */ B(LdaConstant), U8(0),
                 B(Star), R(0),
-  /*   50 S> */ B(CreateObjectLiteral), U8(1), U8(1), U8(41), R(1),
+  /*   50 S> */ B(CreateObjectLiteral), U8(1), U8(0), U8(41), R(1),
   /*   60 E> */ B(ToName), R(2),
                 B(LdaSmi), I8(1),
-                B(StaDataPropertyInLiteral), R(1), R(2), U8(0), U8(2),
+                B(StaDataPropertyInLiteral), R(1), R(2), U8(0), U8(1),
                 B(CreateEmptyObjectLiteral),
                 B(Star), R(3),
                 B(Mov), R(1), R(2),
@@ -367,13 +368,13 @@
   /*   30 E> */ B(StackCheck),
   /*   42 S> */ B(LdaConstant), U8(0),
                 B(Star), R(0),
-  /*   50 S> */ B(CreateObjectLiteral), U8(1), U8(2), U8(41), R(1),
+  /*   50 S> */ B(CreateObjectLiteral), U8(1), U8(0), U8(41), R(1),
   /*   60 E> */ B(ToName), R(2),
                 B(LdaConstant), U8(2),
-                B(StaDataPropertyInLiteral), R(1), R(2), U8(0), U8(3),
+                B(StaDataPropertyInLiteral), R(1), R(2), U8(0), U8(1),
                 B(LdaConstant), U8(3),
                 B(Star), R(3),
-                B(CreateClosure), U8(4), U8(0), U8(2),
+                B(CreateClosure), U8(4), U8(3), U8(2),
                 B(Star), R(4),
                 B(LdaZero),
                 B(Star), R(5),
@@ -381,7 +382,7 @@
                 B(CallRuntime), U16(Runtime::kDefineGetterPropertyUnchecked), R(2), U8(4),
                 B(LdaConstant), U8(3),
                 B(Star), R(3),
-                B(CreateClosure), U8(5), U8(1), U8(2),
+                B(CreateClosure), U8(5), U8(4), U8(2),
                 B(Star), R(4),
                 B(LdaZero),
                 B(Star), R(5),
diff --git a/src/v8/test/cctest/interpreter/bytecode_expectations/ObjectLiteralsWide.golden b/src/v8/test/cctest/interpreter/bytecode_expectations/ObjectLiteralsWide.golden
deleted file mode 100644
index dba4ae1..0000000
--- a/src/v8/test/cctest/interpreter/bytecode_expectations/ObjectLiteralsWide.golden
+++ /dev/null
@@ -1,1051 +0,0 @@
-#
-# Autogenerated by generate-bytecode-expectations.
-#
-
----
-wrap: yes
-
----
-snippet: "
-  var a;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  return { name: 'string', val: 9.2 };
-"
-frame size: 2
-parameter count: 1
-bytecode array length: 1037
-bytecodes: [
-  /*   30 E> */ B(StackCheck),
-  /*   41 S> */ B(LdaConstant), U8(0),
-                B(Star), R(0),
-  /*   51 S> */ B(LdaConstant), U8(1),
-                B(Star), R(0),
-  /*   61 S> */ B(LdaConstant), U8(2),
-                B(Star), R(0),
-  /*   71 S> */ B(LdaConstant), U8(3),
-                B(Star), R(0),
-  /*   81 S> */ B(LdaConstant), U8(4),
-                B(Star), R(0),
-  /*   91 S> */ B(LdaConstant), U8(5),
-                B(Star), R(0),
-  /*  101 S> */ B(LdaConstant), U8(6),
-                B(Star), R(0),
-  /*  111 S> */ B(LdaConstant), U8(7),
-                B(Star), R(0),
-  /*  121 S> */ B(LdaConstant), U8(8),
-                B(Star), R(0),
-  /*  131 S> */ B(LdaConstant), U8(9),
-                B(Star), R(0),
-  /*  141 S> */ B(LdaConstant), U8(10),
-                B(Star), R(0),
-  /*  151 S> */ B(LdaConstant), U8(11),
-                B(Star), R(0),
-  /*  161 S> */ B(LdaConstant), U8(12),
-                B(Star), R(0),
-  /*  171 S> */ B(LdaConstant), U8(13),
-                B(Star), R(0),
-  /*  181 S> */ B(LdaConstant), U8(14),
-                B(Star), R(0),
-  /*  191 S> */ B(LdaConstant), U8(15),
-                B(Star), R(0),
-  /*  201 S> */ B(LdaConstant), U8(16),
-                B(Star), R(0),
-  /*  211 S> */ B(LdaConstant), U8(17),
-                B(Star), R(0),
-  /*  221 S> */ B(LdaConstant), U8(18),
-                B(Star), R(0),
-  /*  231 S> */ B(LdaConstant), U8(19),
-                B(Star), R(0),
-  /*  241 S> */ B(LdaConstant), U8(20),
-                B(Star), R(0),
-  /*  251 S> */ B(LdaConstant), U8(21),
-                B(Star), R(0),
-  /*  261 S> */ B(LdaConstant), U8(22),
-                B(Star), R(0),
-  /*  271 S> */ B(LdaConstant), U8(23),
-                B(Star), R(0),
-  /*  281 S> */ B(LdaConstant), U8(24),
-                B(Star), R(0),
-  /*  291 S> */ B(LdaConstant), U8(25),
-                B(Star), R(0),
-  /*  301 S> */ B(LdaConstant), U8(26),
-                B(Star), R(0),
-  /*  311 S> */ B(LdaConstant), U8(27),
-                B(Star), R(0),
-  /*  321 S> */ B(LdaConstant), U8(28),
-                B(Star), R(0),
-  /*  331 S> */ B(LdaConstant), U8(29),
-                B(Star), R(0),
-  /*  341 S> */ B(LdaConstant), U8(30),
-                B(Star), R(0),
-  /*  351 S> */ B(LdaConstant), U8(31),
-                B(Star), R(0),
-  /*  361 S> */ B(LdaConstant), U8(32),
-                B(Star), R(0),
-  /*  371 S> */ B(LdaConstant), U8(33),
-                B(Star), R(0),
-  /*  381 S> */ B(LdaConstant), U8(34),
-                B(Star), R(0),
-  /*  391 S> */ B(LdaConstant), U8(35),
-                B(Star), R(0),
-  /*  401 S> */ B(LdaConstant), U8(36),
-                B(Star), R(0),
-  /*  411 S> */ B(LdaConstant), U8(37),
-                B(Star), R(0),
-  /*  421 S> */ B(LdaConstant), U8(38),
-                B(Star), R(0),
-  /*  431 S> */ B(LdaConstant), U8(39),
-                B(Star), R(0),
-  /*  441 S> */ B(LdaConstant), U8(40),
-                B(Star), R(0),
-  /*  451 S> */ B(LdaConstant), U8(41),
-                B(Star), R(0),
-  /*  461 S> */ B(LdaConstant), U8(42),
-                B(Star), R(0),
-  /*  471 S> */ B(LdaConstant), U8(43),
-                B(Star), R(0),
-  /*  481 S> */ B(LdaConstant), U8(44),
-                B(Star), R(0),
-  /*  491 S> */ B(LdaConstant), U8(45),
-                B(Star), R(0),
-  /*  501 S> */ B(LdaConstant), U8(46),
-                B(Star), R(0),
-  /*  511 S> */ B(LdaConstant), U8(47),
-                B(Star), R(0),
-  /*  521 S> */ B(LdaConstant), U8(48),
-                B(Star), R(0),
-  /*  531 S> */ B(LdaConstant), U8(49),
-                B(Star), R(0),
-  /*  541 S> */ B(LdaConstant), U8(50),
-                B(Star), R(0),
-  /*  551 S> */ B(LdaConstant), U8(51),
-                B(Star), R(0),
-  /*  561 S> */ B(LdaConstant), U8(52),
-                B(Star), R(0),
-  /*  571 S> */ B(LdaConstant), U8(53),
-                B(Star), R(0),
-  /*  581 S> */ B(LdaConstant), U8(54),
-                B(Star), R(0),
-  /*  591 S> */ B(LdaConstant), U8(55),
-                B(Star), R(0),
-  /*  601 S> */ B(LdaConstant), U8(56),
-                B(Star), R(0),
-  /*  611 S> */ B(LdaConstant), U8(57),
-                B(Star), R(0),
-  /*  621 S> */ B(LdaConstant), U8(58),
-                B(Star), R(0),
-  /*  631 S> */ B(LdaConstant), U8(59),
-                B(Star), R(0),
-  /*  641 S> */ B(LdaConstant), U8(60),
-                B(Star), R(0),
-  /*  651 S> */ B(LdaConstant), U8(61),
-                B(Star), R(0),
-  /*  661 S> */ B(LdaConstant), U8(62),
-                B(Star), R(0),
-  /*  671 S> */ B(LdaConstant), U8(63),
-                B(Star), R(0),
-  /*  681 S> */ B(LdaConstant), U8(64),
-                B(Star), R(0),
-  /*  691 S> */ B(LdaConstant), U8(65),
-                B(Star), R(0),
-  /*  701 S> */ B(LdaConstant), U8(66),
-                B(Star), R(0),
-  /*  711 S> */ B(LdaConstant), U8(67),
-                B(Star), R(0),
-  /*  721 S> */ B(LdaConstant), U8(68),
-                B(Star), R(0),
-  /*  731 S> */ B(LdaConstant), U8(69),
-                B(Star), R(0),
-  /*  741 S> */ B(LdaConstant), U8(70),
-                B(Star), R(0),
-  /*  751 S> */ B(LdaConstant), U8(71),
-                B(Star), R(0),
-  /*  761 S> */ B(LdaConstant), U8(72),
-                B(Star), R(0),
-  /*  771 S> */ B(LdaConstant), U8(73),
-                B(Star), R(0),
-  /*  781 S> */ B(LdaConstant), U8(74),
-                B(Star), R(0),
-  /*  791 S> */ B(LdaConstant), U8(75),
-                B(Star), R(0),
-  /*  801 S> */ B(LdaConstant), U8(76),
-                B(Star), R(0),
-  /*  811 S> */ B(LdaConstant), U8(77),
-                B(Star), R(0),
-  /*  821 S> */ B(LdaConstant), U8(78),
-                B(Star), R(0),
-  /*  831 S> */ B(LdaConstant), U8(79),
-                B(Star), R(0),
-  /*  841 S> */ B(LdaConstant), U8(80),
-                B(Star), R(0),
-  /*  851 S> */ B(LdaConstant), U8(81),
-                B(Star), R(0),
-  /*  861 S> */ B(LdaConstant), U8(82),
-                B(Star), R(0),
-  /*  871 S> */ B(LdaConstant), U8(83),
-                B(Star), R(0),
-  /*  881 S> */ B(LdaConstant), U8(84),
-                B(Star), R(0),
-  /*  891 S> */ B(LdaConstant), U8(85),
-                B(Star), R(0),
-  /*  901 S> */ B(LdaConstant), U8(86),
-                B(Star), R(0),
-  /*  911 S> */ B(LdaConstant), U8(87),
-                B(Star), R(0),
-  /*  921 S> */ B(LdaConstant), U8(88),
-                B(Star), R(0),
-  /*  931 S> */ B(LdaConstant), U8(89),
-                B(Star), R(0),
-  /*  941 S> */ B(LdaConstant), U8(90),
-                B(Star), R(0),
-  /*  951 S> */ B(LdaConstant), U8(91),
-                B(Star), R(0),
-  /*  961 S> */ B(LdaConstant), U8(92),
-                B(Star), R(0),
-  /*  971 S> */ B(LdaConstant), U8(93),
-                B(Star), R(0),
-  /*  981 S> */ B(LdaConstant), U8(94),
-                B(Star), R(0),
-  /*  991 S> */ B(LdaConstant), U8(95),
-                B(Star), R(0),
-  /* 1001 S> */ B(LdaConstant), U8(96),
-                B(Star), R(0),
-  /* 1011 S> */ B(LdaConstant), U8(97),
-                B(Star), R(0),
-  /* 1021 S> */ B(LdaConstant), U8(98),
-                B(Star), R(0),
-  /* 1031 S> */ B(LdaConstant), U8(99),
-                B(Star), R(0),
-  /* 1041 S> */ B(LdaConstant), U8(100),
-                B(Star), R(0),
-  /* 1051 S> */ B(LdaConstant), U8(101),
-                B(Star), R(0),
-  /* 1061 S> */ B(LdaConstant), U8(102),
-                B(Star), R(0),
-  /* 1071 S> */ B(LdaConstant), U8(103),
-                B(Star), R(0),
-  /* 1081 S> */ B(LdaConstant), U8(104),
-                B(Star), R(0),
-  /* 1091 S> */ B(LdaConstant), U8(105),
-                B(Star), R(0),
-  /* 1101 S> */ B(LdaConstant), U8(106),
-                B(Star), R(0),
-  /* 1111 S> */ B(LdaConstant), U8(107),
-                B(Star), R(0),
-  /* 1121 S> */ B(LdaConstant), U8(108),
-                B(Star), R(0),
-  /* 1131 S> */ B(LdaConstant), U8(109),
-                B(Star), R(0),
-  /* 1141 S> */ B(LdaConstant), U8(110),
-                B(Star), R(0),
-  /* 1151 S> */ B(LdaConstant), U8(111),
-                B(Star), R(0),
-  /* 1161 S> */ B(LdaConstant), U8(112),
-                B(Star), R(0),
-  /* 1171 S> */ B(LdaConstant), U8(113),
-                B(Star), R(0),
-  /* 1181 S> */ B(LdaConstant), U8(114),
-                B(Star), R(0),
-  /* 1191 S> */ B(LdaConstant), U8(115),
-                B(Star), R(0),
-  /* 1201 S> */ B(LdaConstant), U8(116),
-                B(Star), R(0),
-  /* 1211 S> */ B(LdaConstant), U8(117),
-                B(Star), R(0),
-  /* 1221 S> */ B(LdaConstant), U8(118),
-                B(Star), R(0),
-  /* 1231 S> */ B(LdaConstant), U8(119),
-                B(Star), R(0),
-  /* 1241 S> */ B(LdaConstant), U8(120),
-                B(Star), R(0),
-  /* 1251 S> */ B(LdaConstant), U8(121),
-                B(Star), R(0),
-  /* 1261 S> */ B(LdaConstant), U8(122),
-                B(Star), R(0),
-  /* 1271 S> */ B(LdaConstant), U8(123),
-                B(Star), R(0),
-  /* 1281 S> */ B(LdaConstant), U8(124),
-                B(Star), R(0),
-  /* 1291 S> */ B(LdaConstant), U8(125),
-                B(Star), R(0),
-  /* 1301 S> */ B(LdaConstant), U8(126),
-                B(Star), R(0),
-  /* 1311 S> */ B(LdaConstant), U8(127),
-                B(Star), R(0),
-  /* 1321 S> */ B(LdaConstant), U8(128),
-                B(Star), R(0),
-  /* 1331 S> */ B(LdaConstant), U8(129),
-                B(Star), R(0),
-  /* 1341 S> */ B(LdaConstant), U8(130),
-                B(Star), R(0),
-  /* 1351 S> */ B(LdaConstant), U8(131),
-                B(Star), R(0),
-  /* 1361 S> */ B(LdaConstant), U8(132),
-                B(Star), R(0),
-  /* 1371 S> */ B(LdaConstant), U8(133),
-                B(Star), R(0),
-  /* 1381 S> */ B(LdaConstant), U8(134),
-                B(Star), R(0),
-  /* 1391 S> */ B(LdaConstant), U8(135),
-                B(Star), R(0),
-  /* 1401 S> */ B(LdaConstant), U8(136),
-                B(Star), R(0),
-  /* 1411 S> */ B(LdaConstant), U8(137),
-                B(Star), R(0),
-  /* 1421 S> */ B(LdaConstant), U8(138),
-                B(Star), R(0),
-  /* 1431 S> */ B(LdaConstant), U8(139),
-                B(Star), R(0),
-  /* 1441 S> */ B(LdaConstant), U8(140),
-                B(Star), R(0),
-  /* 1451 S> */ B(LdaConstant), U8(141),
-                B(Star), R(0),
-  /* 1461 S> */ B(LdaConstant), U8(142),
-                B(Star), R(0),
-  /* 1471 S> */ B(LdaConstant), U8(143),
-                B(Star), R(0),
-  /* 1481 S> */ B(LdaConstant), U8(144),
-                B(Star), R(0),
-  /* 1491 S> */ B(LdaConstant), U8(145),
-                B(Star), R(0),
-  /* 1501 S> */ B(LdaConstant), U8(146),
-                B(Star), R(0),
-  /* 1511 S> */ B(LdaConstant), U8(147),
-                B(Star), R(0),
-  /* 1521 S> */ B(LdaConstant), U8(148),
-                B(Star), R(0),
-  /* 1531 S> */ B(LdaConstant), U8(149),
-                B(Star), R(0),
-  /* 1541 S> */ B(LdaConstant), U8(150),
-                B(Star), R(0),
-  /* 1551 S> */ B(LdaConstant), U8(151),
-                B(Star), R(0),
-  /* 1561 S> */ B(LdaConstant), U8(152),
-                B(Star), R(0),
-  /* 1571 S> */ B(LdaConstant), U8(153),
-                B(Star), R(0),
-  /* 1581 S> */ B(LdaConstant), U8(154),
-                B(Star), R(0),
-  /* 1591 S> */ B(LdaConstant), U8(155),
-                B(Star), R(0),
-  /* 1601 S> */ B(LdaConstant), U8(156),
-                B(Star), R(0),
-  /* 1611 S> */ B(LdaConstant), U8(157),
-                B(Star), R(0),
-  /* 1621 S> */ B(LdaConstant), U8(158),
-                B(Star), R(0),
-  /* 1631 S> */ B(LdaConstant), U8(159),
-                B(Star), R(0),
-  /* 1641 S> */ B(LdaConstant), U8(160),
-                B(Star), R(0),
-  /* 1651 S> */ B(LdaConstant), U8(161),
-                B(Star), R(0),
-  /* 1661 S> */ B(LdaConstant), U8(162),
-                B(Star), R(0),
-  /* 1671 S> */ B(LdaConstant), U8(163),
-                B(Star), R(0),
-  /* 1681 S> */ B(LdaConstant), U8(164),
-                B(Star), R(0),
-  /* 1691 S> */ B(LdaConstant), U8(165),
-                B(Star), R(0),
-  /* 1701 S> */ B(LdaConstant), U8(166),
-                B(Star), R(0),
-  /* 1711 S> */ B(LdaConstant), U8(167),
-                B(Star), R(0),
-  /* 1721 S> */ B(LdaConstant), U8(168),
-                B(Star), R(0),
-  /* 1731 S> */ B(LdaConstant), U8(169),
-                B(Star), R(0),
-  /* 1741 S> */ B(LdaConstant), U8(170),
-                B(Star), R(0),
-  /* 1751 S> */ B(LdaConstant), U8(171),
-                B(Star), R(0),
-  /* 1761 S> */ B(LdaConstant), U8(172),
-                B(Star), R(0),
-  /* 1771 S> */ B(LdaConstant), U8(173),
-                B(Star), R(0),
-  /* 1781 S> */ B(LdaConstant), U8(174),
-                B(Star), R(0),
-  /* 1791 S> */ B(LdaConstant), U8(175),
-                B(Star), R(0),
-  /* 1801 S> */ B(LdaConstant), U8(176),
-                B(Star), R(0),
-  /* 1811 S> */ B(LdaConstant), U8(177),
-                B(Star), R(0),
-  /* 1821 S> */ B(LdaConstant), U8(178),
-                B(Star), R(0),
-  /* 1831 S> */ B(LdaConstant), U8(179),
-                B(Star), R(0),
-  /* 1841 S> */ B(LdaConstant), U8(180),
-                B(Star), R(0),
-  /* 1851 S> */ B(LdaConstant), U8(181),
-                B(Star), R(0),
-  /* 1861 S> */ B(LdaConstant), U8(182),
-                B(Star), R(0),
-  /* 1871 S> */ B(LdaConstant), U8(183),
-                B(Star), R(0),
-  /* 1881 S> */ B(LdaConstant), U8(184),
-                B(Star), R(0),
-  /* 1891 S> */ B(LdaConstant), U8(185),
-                B(Star), R(0),
-  /* 1901 S> */ B(LdaConstant), U8(186),
-                B(Star), R(0),
-  /* 1911 S> */ B(LdaConstant), U8(187),
-                B(Star), R(0),
-  /* 1921 S> */ B(LdaConstant), U8(188),
-                B(Star), R(0),
-  /* 1931 S> */ B(LdaConstant), U8(189),
-                B(Star), R(0),
-  /* 1941 S> */ B(LdaConstant), U8(190),
-                B(Star), R(0),
-  /* 1951 S> */ B(LdaConstant), U8(191),
-                B(Star), R(0),
-  /* 1961 S> */ B(LdaConstant), U8(192),
-                B(Star), R(0),
-  /* 1971 S> */ B(LdaConstant), U8(193),
-                B(Star), R(0),
-  /* 1981 S> */ B(LdaConstant), U8(194),
-                B(Star), R(0),
-  /* 1991 S> */ B(LdaConstant), U8(195),
-                B(Star), R(0),
-  /* 2001 S> */ B(LdaConstant), U8(196),
-                B(Star), R(0),
-  /* 2011 S> */ B(LdaConstant), U8(197),
-                B(Star), R(0),
-  /* 2021 S> */ B(LdaConstant), U8(198),
-                B(Star), R(0),
-  /* 2031 S> */ B(LdaConstant), U8(199),
-                B(Star), R(0),
-  /* 2041 S> */ B(LdaConstant), U8(200),
-                B(Star), R(0),
-  /* 2051 S> */ B(LdaConstant), U8(201),
-                B(Star), R(0),
-  /* 2061 S> */ B(LdaConstant), U8(202),
-                B(Star), R(0),
-  /* 2071 S> */ B(LdaConstant), U8(203),
-                B(Star), R(0),
-  /* 2081 S> */ B(LdaConstant), U8(204),
-                B(Star), R(0),
-  /* 2091 S> */ B(LdaConstant), U8(205),
-                B(Star), R(0),
-  /* 2101 S> */ B(LdaConstant), U8(206),
-                B(Star), R(0),
-  /* 2111 S> */ B(LdaConstant), U8(207),
-                B(Star), R(0),
-  /* 2121 S> */ B(LdaConstant), U8(208),
-                B(Star), R(0),
-  /* 2131 S> */ B(LdaConstant), U8(209),
-                B(Star), R(0),
-  /* 2141 S> */ B(LdaConstant), U8(210),
-                B(Star), R(0),
-  /* 2151 S> */ B(LdaConstant), U8(211),
-                B(Star), R(0),
-  /* 2161 S> */ B(LdaConstant), U8(212),
-                B(Star), R(0),
-  /* 2171 S> */ B(LdaConstant), U8(213),
-                B(Star), R(0),
-  /* 2181 S> */ B(LdaConstant), U8(214),
-                B(Star), R(0),
-  /* 2191 S> */ B(LdaConstant), U8(215),
-                B(Star), R(0),
-  /* 2201 S> */ B(LdaConstant), U8(216),
-                B(Star), R(0),
-  /* 2211 S> */ B(LdaConstant), U8(217),
-                B(Star), R(0),
-  /* 2221 S> */ B(LdaConstant), U8(218),
-                B(Star), R(0),
-  /* 2231 S> */ B(LdaConstant), U8(219),
-                B(Star), R(0),
-  /* 2241 S> */ B(LdaConstant), U8(220),
-                B(Star), R(0),
-  /* 2251 S> */ B(LdaConstant), U8(221),
-                B(Star), R(0),
-  /* 2261 S> */ B(LdaConstant), U8(222),
-                B(Star), R(0),
-  /* 2271 S> */ B(LdaConstant), U8(223),
-                B(Star), R(0),
-  /* 2281 S> */ B(LdaConstant), U8(224),
-                B(Star), R(0),
-  /* 2291 S> */ B(LdaConstant), U8(225),
-                B(Star), R(0),
-  /* 2301 S> */ B(LdaConstant), U8(226),
-                B(Star), R(0),
-  /* 2311 S> */ B(LdaConstant), U8(227),
-                B(Star), R(0),
-  /* 2321 S> */ B(LdaConstant), U8(228),
-                B(Star), R(0),
-  /* 2331 S> */ B(LdaConstant), U8(229),
-                B(Star), R(0),
-  /* 2341 S> */ B(LdaConstant), U8(230),
-                B(Star), R(0),
-  /* 2351 S> */ B(LdaConstant), U8(231),
-                B(Star), R(0),
-  /* 2361 S> */ B(LdaConstant), U8(232),
-                B(Star), R(0),
-  /* 2371 S> */ B(LdaConstant), U8(233),
-                B(Star), R(0),
-  /* 2381 S> */ B(LdaConstant), U8(234),
-                B(Star), R(0),
-  /* 2391 S> */ B(LdaConstant), U8(235),
-                B(Star), R(0),
-  /* 2401 S> */ B(LdaConstant), U8(236),
-                B(Star), R(0),
-  /* 2411 S> */ B(LdaConstant), U8(237),
-                B(Star), R(0),
-  /* 2421 S> */ B(LdaConstant), U8(238),
-                B(Star), R(0),
-  /* 2431 S> */ B(LdaConstant), U8(239),
-                B(Star), R(0),
-  /* 2441 S> */ B(LdaConstant), U8(240),
-                B(Star), R(0),
-  /* 2451 S> */ B(LdaConstant), U8(241),
-                B(Star), R(0),
-  /* 2461 S> */ B(LdaConstant), U8(242),
-                B(Star), R(0),
-  /* 2471 S> */ B(LdaConstant), U8(243),
-                B(Star), R(0),
-  /* 2481 S> */ B(LdaConstant), U8(244),
-                B(Star), R(0),
-  /* 2491 S> */ B(LdaConstant), U8(245),
-                B(Star), R(0),
-  /* 2501 S> */ B(LdaConstant), U8(246),
-                B(Star), R(0),
-  /* 2511 S> */ B(LdaConstant), U8(247),
-                B(Star), R(0),
-  /* 2521 S> */ B(LdaConstant), U8(248),
-                B(Star), R(0),
-  /* 2531 S> */ B(LdaConstant), U8(249),
-                B(Star), R(0),
-  /* 2541 S> */ B(LdaConstant), U8(250),
-                B(Star), R(0),
-  /* 2551 S> */ B(LdaConstant), U8(251),
-                B(Star), R(0),
-  /* 2561 S> */ B(LdaConstant), U8(252),
-                B(Star), R(0),
-  /* 2571 S> */ B(LdaConstant), U8(253),
-                B(Star), R(0),
-  /* 2581 S> */ B(LdaConstant), U8(254),
-                B(Star), R(0),
-  /* 2591 S> */ B(LdaConstant), U8(255),
-                B(Star), R(0),
-  /* 2601 S> */ B(Wide), B(CreateObjectLiteral), U16(256), U16(0), U8(41), R16(1),
-                B(Ldar), R(1),
-  /* 2637 S> */ B(Return),
-]
-constant pool: [
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  FIXED_ARRAY_TYPE,
-]
-handlers: [
-]
-
diff --git a/src/v8/test/cctest/interpreter/bytecode_expectations/PropertyCall.golden b/src/v8/test/cctest/interpreter/bytecode_expectations/PropertyCall.golden
index 52a2553..c08ca88 100644
--- a/src/v8/test/cctest/interpreter/bytecode_expectations/PropertyCall.golden
+++ b/src/v8/test/cctest/interpreter/bytecode_expectations/PropertyCall.golden
@@ -16,9 +16,9 @@
 bytecode array length: 12
 bytecodes: [
   /*   10 E> */ B(StackCheck),
-  /*   25 S> */ B(LdaNamedProperty), R(arg0), U8(0), U8(2),
+  /*   25 S> */ B(LdaNamedProperty), R(arg0), U8(0), U8(0),
                 B(Star), R(0),
-  /*   25 E> */ B(CallProperty0), R(0), R(arg0), U8(0),
+  /*   25 E> */ B(CallProperty0), R(0), R(arg0), U8(2),
   /*   32 S> */ B(Return),
 ]
 constant pool: [
@@ -37,9 +37,9 @@
 bytecode array length: 14
 bytecodes: [
   /*   10 E> */ B(StackCheck),
-  /*   31 S> */ B(LdaNamedProperty), R(arg0), U8(0), U8(2),
+  /*   31 S> */ B(LdaNamedProperty), R(arg0), U8(0), U8(0),
                 B(Star), R(0),
-  /*   31 E> */ B(CallProperty2), R(0), R(arg0), R(arg1), R(arg2), U8(0),
+  /*   31 E> */ B(CallProperty2), R(0), R(arg0), R(arg1), R(arg2), U8(2),
   /*   42 S> */ B(Return),
 ]
 constant pool: [
@@ -58,12 +58,12 @@
 bytecode array length: 21
 bytecodes: [
   /*   10 E> */ B(StackCheck),
-  /*   28 S> */ B(LdaNamedProperty), R(arg0), U8(0), U8(2),
+  /*   28 S> */ B(LdaNamedProperty), R(arg0), U8(0), U8(0),
                 B(Star), R(0),
                 B(Ldar), R(arg1),
-  /*   35 E> */ B(Add), R(arg1), U8(4),
+  /*   35 E> */ B(Add), R(arg1), U8(2),
                 B(Star), R(2),
-  /*   28 E> */ B(CallProperty2), R(0), R(arg0), R(2), R(arg1), U8(0),
+  /*   28 E> */ B(CallProperty2), R(0), R(arg0), R(2), R(arg1), U8(3),
   /*   43 S> */ B(Return),
 ]
 constant pool: [
@@ -339,9 +339,9 @@
   /* 1144 S> */ B(LdaNamedProperty), R(arg0), U8(0), U8(250),
   /* 1153 S> */ B(LdaNamedProperty), R(arg0), U8(0), U8(252),
   /* 1162 S> */ B(LdaNamedProperty), R(arg0), U8(0), U8(254),
-  /* 1178 S> */ B(Wide), B(LdaNamedProperty), R16(arg0), U16(0), U16(258),
+  /* 1178 S> */ B(Wide), B(LdaNamedProperty), R16(arg0), U16(0), U16(256),
                 B(Star), R(0),
-  /* 1178 E> */ B(Wide), B(CallProperty0), R16(0), R16(arg0), U16(256),
+  /* 1178 E> */ B(Wide), B(CallProperty0), R16(0), R16(arg0), U16(258),
   /* 1185 S> */ B(Return),
 ]
 constant pool: [
@@ -360,23 +360,23 @@
 bytecode array length: 51
 bytecodes: [
   /*   10 E> */ B(StackCheck),
-  /*   25 S> */ B(LdaNamedProperty), R(arg0), U8(0), U8(6),
+  /*   25 S> */ B(LdaNamedProperty), R(arg0), U8(0), U8(0),
                 B(Star), R(2),
                 B(LdaSmi), I8(1),
                 B(Star), R(4),
-  /*   25 E> */ B(CallProperty1), R(2), R(arg0), R(4), U8(4),
+  /*   25 E> */ B(CallProperty1), R(2), R(arg0), R(4), U8(2),
                 B(Star), R(2),
-  /*   32 E> */ B(LdaNamedProperty), R(2), U8(0), U8(8),
+  /*   32 E> */ B(LdaNamedProperty), R(2), U8(0), U8(4),
                 B(Star), R(1),
                 B(LdaSmi), I8(2),
                 B(Star), R(3),
-  /*   33 E> */ B(CallProperty1), R(1), R(2), R(3), U8(2),
+  /*   33 E> */ B(CallProperty1), R(1), R(2), R(3), U8(6),
                 B(Star), R(1),
-  /*   40 E> */ B(LdaNamedProperty), R(1), U8(0), U8(10),
+  /*   40 E> */ B(LdaNamedProperty), R(1), U8(0), U8(8),
                 B(Star), R(0),
                 B(LdaSmi), I8(3),
                 B(Star), R(2),
-  /*   41 E> */ B(CallProperty1), R(0), R(1), R(2), U8(0),
+  /*   41 E> */ B(CallProperty1), R(0), R(1), R(2), U8(10),
   /*   49 S> */ B(Return),
 ]
 constant pool: [
diff --git a/src/v8/test/cctest/interpreter/bytecode_expectations/RegExpLiterals.golden b/src/v8/test/cctest/interpreter/bytecode_expectations/RegExpLiterals.golden
index c431b0e..69f63eb 100644
--- a/src/v8/test/cctest/interpreter/bytecode_expectations/RegExpLiterals.golden
+++ b/src/v8/test/cctest/interpreter/bytecode_expectations/RegExpLiterals.golden
@@ -50,13 +50,13 @@
 bytecode array length: 23
 bytecodes: [
   /*   30 E> */ B(StackCheck),
-  /*   34 S> */ B(CreateRegExpLiteral), U8(0), U8(2), U8(0),
+  /*   34 S> */ B(CreateRegExpLiteral), U8(0), U8(0), U8(0),
                 B(Star), R(1),
-  /*   48 E> */ B(LdaNamedProperty), R(1), U8(1), U8(3),
+  /*   48 E> */ B(LdaNamedProperty), R(1), U8(1), U8(1),
                 B(Star), R(0),
                 B(LdaConstant), U8(2),
                 B(Star), R(2),
-  /*   48 E> */ B(CallProperty1), R(0), R(1), R(2), U8(0),
+  /*   48 E> */ B(CallProperty1), R(0), R(1), R(2), U8(3),
   /*   61 S> */ B(Return),
 ]
 constant pool: [
diff --git a/src/v8/test/cctest/interpreter/bytecode_expectations/RegExpLiteralsWide.golden b/src/v8/test/cctest/interpreter/bytecode_expectations/RegExpLiteralsWide.golden
deleted file mode 100644
index 83162ff..0000000
--- a/src/v8/test/cctest/interpreter/bytecode_expectations/RegExpLiteralsWide.golden
+++ /dev/null
@@ -1,1050 +0,0 @@
-#
-# Autogenerated by generate-bytecode-expectations.
-#
-
----
-wrap: yes
-
----
-snippet: "
-  var a;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  a = 1.23;
-  return /ab+d/;
-"
-frame size: 1
-parameter count: 1
-bytecode array length: 1033
-bytecodes: [
-  /*   30 E> */ B(StackCheck),
-  /*   41 S> */ B(LdaConstant), U8(0),
-                B(Star), R(0),
-  /*   51 S> */ B(LdaConstant), U8(1),
-                B(Star), R(0),
-  /*   61 S> */ B(LdaConstant), U8(2),
-                B(Star), R(0),
-  /*   71 S> */ B(LdaConstant), U8(3),
-                B(Star), R(0),
-  /*   81 S> */ B(LdaConstant), U8(4),
-                B(Star), R(0),
-  /*   91 S> */ B(LdaConstant), U8(5),
-                B(Star), R(0),
-  /*  101 S> */ B(LdaConstant), U8(6),
-                B(Star), R(0),
-  /*  111 S> */ B(LdaConstant), U8(7),
-                B(Star), R(0),
-  /*  121 S> */ B(LdaConstant), U8(8),
-                B(Star), R(0),
-  /*  131 S> */ B(LdaConstant), U8(9),
-                B(Star), R(0),
-  /*  141 S> */ B(LdaConstant), U8(10),
-                B(Star), R(0),
-  /*  151 S> */ B(LdaConstant), U8(11),
-                B(Star), R(0),
-  /*  161 S> */ B(LdaConstant), U8(12),
-                B(Star), R(0),
-  /*  171 S> */ B(LdaConstant), U8(13),
-                B(Star), R(0),
-  /*  181 S> */ B(LdaConstant), U8(14),
-                B(Star), R(0),
-  /*  191 S> */ B(LdaConstant), U8(15),
-                B(Star), R(0),
-  /*  201 S> */ B(LdaConstant), U8(16),
-                B(Star), R(0),
-  /*  211 S> */ B(LdaConstant), U8(17),
-                B(Star), R(0),
-  /*  221 S> */ B(LdaConstant), U8(18),
-                B(Star), R(0),
-  /*  231 S> */ B(LdaConstant), U8(19),
-                B(Star), R(0),
-  /*  241 S> */ B(LdaConstant), U8(20),
-                B(Star), R(0),
-  /*  251 S> */ B(LdaConstant), U8(21),
-                B(Star), R(0),
-  /*  261 S> */ B(LdaConstant), U8(22),
-                B(Star), R(0),
-  /*  271 S> */ B(LdaConstant), U8(23),
-                B(Star), R(0),
-  /*  281 S> */ B(LdaConstant), U8(24),
-                B(Star), R(0),
-  /*  291 S> */ B(LdaConstant), U8(25),
-                B(Star), R(0),
-  /*  301 S> */ B(LdaConstant), U8(26),
-                B(Star), R(0),
-  /*  311 S> */ B(LdaConstant), U8(27),
-                B(Star), R(0),
-  /*  321 S> */ B(LdaConstant), U8(28),
-                B(Star), R(0),
-  /*  331 S> */ B(LdaConstant), U8(29),
-                B(Star), R(0),
-  /*  341 S> */ B(LdaConstant), U8(30),
-                B(Star), R(0),
-  /*  351 S> */ B(LdaConstant), U8(31),
-                B(Star), R(0),
-  /*  361 S> */ B(LdaConstant), U8(32),
-                B(Star), R(0),
-  /*  371 S> */ B(LdaConstant), U8(33),
-                B(Star), R(0),
-  /*  381 S> */ B(LdaConstant), U8(34),
-                B(Star), R(0),
-  /*  391 S> */ B(LdaConstant), U8(35),
-                B(Star), R(0),
-  /*  401 S> */ B(LdaConstant), U8(36),
-                B(Star), R(0),
-  /*  411 S> */ B(LdaConstant), U8(37),
-                B(Star), R(0),
-  /*  421 S> */ B(LdaConstant), U8(38),
-                B(Star), R(0),
-  /*  431 S> */ B(LdaConstant), U8(39),
-                B(Star), R(0),
-  /*  441 S> */ B(LdaConstant), U8(40),
-                B(Star), R(0),
-  /*  451 S> */ B(LdaConstant), U8(41),
-                B(Star), R(0),
-  /*  461 S> */ B(LdaConstant), U8(42),
-                B(Star), R(0),
-  /*  471 S> */ B(LdaConstant), U8(43),
-                B(Star), R(0),
-  /*  481 S> */ B(LdaConstant), U8(44),
-                B(Star), R(0),
-  /*  491 S> */ B(LdaConstant), U8(45),
-                B(Star), R(0),
-  /*  501 S> */ B(LdaConstant), U8(46),
-                B(Star), R(0),
-  /*  511 S> */ B(LdaConstant), U8(47),
-                B(Star), R(0),
-  /*  521 S> */ B(LdaConstant), U8(48),
-                B(Star), R(0),
-  /*  531 S> */ B(LdaConstant), U8(49),
-                B(Star), R(0),
-  /*  541 S> */ B(LdaConstant), U8(50),
-                B(Star), R(0),
-  /*  551 S> */ B(LdaConstant), U8(51),
-                B(Star), R(0),
-  /*  561 S> */ B(LdaConstant), U8(52),
-                B(Star), R(0),
-  /*  571 S> */ B(LdaConstant), U8(53),
-                B(Star), R(0),
-  /*  581 S> */ B(LdaConstant), U8(54),
-                B(Star), R(0),
-  /*  591 S> */ B(LdaConstant), U8(55),
-                B(Star), R(0),
-  /*  601 S> */ B(LdaConstant), U8(56),
-                B(Star), R(0),
-  /*  611 S> */ B(LdaConstant), U8(57),
-                B(Star), R(0),
-  /*  621 S> */ B(LdaConstant), U8(58),
-                B(Star), R(0),
-  /*  631 S> */ B(LdaConstant), U8(59),
-                B(Star), R(0),
-  /*  641 S> */ B(LdaConstant), U8(60),
-                B(Star), R(0),
-  /*  651 S> */ B(LdaConstant), U8(61),
-                B(Star), R(0),
-  /*  661 S> */ B(LdaConstant), U8(62),
-                B(Star), R(0),
-  /*  671 S> */ B(LdaConstant), U8(63),
-                B(Star), R(0),
-  /*  681 S> */ B(LdaConstant), U8(64),
-                B(Star), R(0),
-  /*  691 S> */ B(LdaConstant), U8(65),
-                B(Star), R(0),
-  /*  701 S> */ B(LdaConstant), U8(66),
-                B(Star), R(0),
-  /*  711 S> */ B(LdaConstant), U8(67),
-                B(Star), R(0),
-  /*  721 S> */ B(LdaConstant), U8(68),
-                B(Star), R(0),
-  /*  731 S> */ B(LdaConstant), U8(69),
-                B(Star), R(0),
-  /*  741 S> */ B(LdaConstant), U8(70),
-                B(Star), R(0),
-  /*  751 S> */ B(LdaConstant), U8(71),
-                B(Star), R(0),
-  /*  761 S> */ B(LdaConstant), U8(72),
-                B(Star), R(0),
-  /*  771 S> */ B(LdaConstant), U8(73),
-                B(Star), R(0),
-  /*  781 S> */ B(LdaConstant), U8(74),
-                B(Star), R(0),
-  /*  791 S> */ B(LdaConstant), U8(75),
-                B(Star), R(0),
-  /*  801 S> */ B(LdaConstant), U8(76),
-                B(Star), R(0),
-  /*  811 S> */ B(LdaConstant), U8(77),
-                B(Star), R(0),
-  /*  821 S> */ B(LdaConstant), U8(78),
-                B(Star), R(0),
-  /*  831 S> */ B(LdaConstant), U8(79),
-                B(Star), R(0),
-  /*  841 S> */ B(LdaConstant), U8(80),
-                B(Star), R(0),
-  /*  851 S> */ B(LdaConstant), U8(81),
-                B(Star), R(0),
-  /*  861 S> */ B(LdaConstant), U8(82),
-                B(Star), R(0),
-  /*  871 S> */ B(LdaConstant), U8(83),
-                B(Star), R(0),
-  /*  881 S> */ B(LdaConstant), U8(84),
-                B(Star), R(0),
-  /*  891 S> */ B(LdaConstant), U8(85),
-                B(Star), R(0),
-  /*  901 S> */ B(LdaConstant), U8(86),
-                B(Star), R(0),
-  /*  911 S> */ B(LdaConstant), U8(87),
-                B(Star), R(0),
-  /*  921 S> */ B(LdaConstant), U8(88),
-                B(Star), R(0),
-  /*  931 S> */ B(LdaConstant), U8(89),
-                B(Star), R(0),
-  /*  941 S> */ B(LdaConstant), U8(90),
-                B(Star), R(0),
-  /*  951 S> */ B(LdaConstant), U8(91),
-                B(Star), R(0),
-  /*  961 S> */ B(LdaConstant), U8(92),
-                B(Star), R(0),
-  /*  971 S> */ B(LdaConstant), U8(93),
-                B(Star), R(0),
-  /*  981 S> */ B(LdaConstant), U8(94),
-                B(Star), R(0),
-  /*  991 S> */ B(LdaConstant), U8(95),
-                B(Star), R(0),
-  /* 1001 S> */ B(LdaConstant), U8(96),
-                B(Star), R(0),
-  /* 1011 S> */ B(LdaConstant), U8(97),
-                B(Star), R(0),
-  /* 1021 S> */ B(LdaConstant), U8(98),
-                B(Star), R(0),
-  /* 1031 S> */ B(LdaConstant), U8(99),
-                B(Star), R(0),
-  /* 1041 S> */ B(LdaConstant), U8(100),
-                B(Star), R(0),
-  /* 1051 S> */ B(LdaConstant), U8(101),
-                B(Star), R(0),
-  /* 1061 S> */ B(LdaConstant), U8(102),
-                B(Star), R(0),
-  /* 1071 S> */ B(LdaConstant), U8(103),
-                B(Star), R(0),
-  /* 1081 S> */ B(LdaConstant), U8(104),
-                B(Star), R(0),
-  /* 1091 S> */ B(LdaConstant), U8(105),
-                B(Star), R(0),
-  /* 1101 S> */ B(LdaConstant), U8(106),
-                B(Star), R(0),
-  /* 1111 S> */ B(LdaConstant), U8(107),
-                B(Star), R(0),
-  /* 1121 S> */ B(LdaConstant), U8(108),
-                B(Star), R(0),
-  /* 1131 S> */ B(LdaConstant), U8(109),
-                B(Star), R(0),
-  /* 1141 S> */ B(LdaConstant), U8(110),
-                B(Star), R(0),
-  /* 1151 S> */ B(LdaConstant), U8(111),
-                B(Star), R(0),
-  /* 1161 S> */ B(LdaConstant), U8(112),
-                B(Star), R(0),
-  /* 1171 S> */ B(LdaConstant), U8(113),
-                B(Star), R(0),
-  /* 1181 S> */ B(LdaConstant), U8(114),
-                B(Star), R(0),
-  /* 1191 S> */ B(LdaConstant), U8(115),
-                B(Star), R(0),
-  /* 1201 S> */ B(LdaConstant), U8(116),
-                B(Star), R(0),
-  /* 1211 S> */ B(LdaConstant), U8(117),
-                B(Star), R(0),
-  /* 1221 S> */ B(LdaConstant), U8(118),
-                B(Star), R(0),
-  /* 1231 S> */ B(LdaConstant), U8(119),
-                B(Star), R(0),
-  /* 1241 S> */ B(LdaConstant), U8(120),
-                B(Star), R(0),
-  /* 1251 S> */ B(LdaConstant), U8(121),
-                B(Star), R(0),
-  /* 1261 S> */ B(LdaConstant), U8(122),
-                B(Star), R(0),
-  /* 1271 S> */ B(LdaConstant), U8(123),
-                B(Star), R(0),
-  /* 1281 S> */ B(LdaConstant), U8(124),
-                B(Star), R(0),
-  /* 1291 S> */ B(LdaConstant), U8(125),
-                B(Star), R(0),
-  /* 1301 S> */ B(LdaConstant), U8(126),
-                B(Star), R(0),
-  /* 1311 S> */ B(LdaConstant), U8(127),
-                B(Star), R(0),
-  /* 1321 S> */ B(LdaConstant), U8(128),
-                B(Star), R(0),
-  /* 1331 S> */ B(LdaConstant), U8(129),
-                B(Star), R(0),
-  /* 1341 S> */ B(LdaConstant), U8(130),
-                B(Star), R(0),
-  /* 1351 S> */ B(LdaConstant), U8(131),
-                B(Star), R(0),
-  /* 1361 S> */ B(LdaConstant), U8(132),
-                B(Star), R(0),
-  /* 1371 S> */ B(LdaConstant), U8(133),
-                B(Star), R(0),
-  /* 1381 S> */ B(LdaConstant), U8(134),
-                B(Star), R(0),
-  /* 1391 S> */ B(LdaConstant), U8(135),
-                B(Star), R(0),
-  /* 1401 S> */ B(LdaConstant), U8(136),
-                B(Star), R(0),
-  /* 1411 S> */ B(LdaConstant), U8(137),
-                B(Star), R(0),
-  /* 1421 S> */ B(LdaConstant), U8(138),
-                B(Star), R(0),
-  /* 1431 S> */ B(LdaConstant), U8(139),
-                B(Star), R(0),
-  /* 1441 S> */ B(LdaConstant), U8(140),
-                B(Star), R(0),
-  /* 1451 S> */ B(LdaConstant), U8(141),
-                B(Star), R(0),
-  /* 1461 S> */ B(LdaConstant), U8(142),
-                B(Star), R(0),
-  /* 1471 S> */ B(LdaConstant), U8(143),
-                B(Star), R(0),
-  /* 1481 S> */ B(LdaConstant), U8(144),
-                B(Star), R(0),
-  /* 1491 S> */ B(LdaConstant), U8(145),
-                B(Star), R(0),
-  /* 1501 S> */ B(LdaConstant), U8(146),
-                B(Star), R(0),
-  /* 1511 S> */ B(LdaConstant), U8(147),
-                B(Star), R(0),
-  /* 1521 S> */ B(LdaConstant), U8(148),
-                B(Star), R(0),
-  /* 1531 S> */ B(LdaConstant), U8(149),
-                B(Star), R(0),
-  /* 1541 S> */ B(LdaConstant), U8(150),
-                B(Star), R(0),
-  /* 1551 S> */ B(LdaConstant), U8(151),
-                B(Star), R(0),
-  /* 1561 S> */ B(LdaConstant), U8(152),
-                B(Star), R(0),
-  /* 1571 S> */ B(LdaConstant), U8(153),
-                B(Star), R(0),
-  /* 1581 S> */ B(LdaConstant), U8(154),
-                B(Star), R(0),
-  /* 1591 S> */ B(LdaConstant), U8(155),
-                B(Star), R(0),
-  /* 1601 S> */ B(LdaConstant), U8(156),
-                B(Star), R(0),
-  /* 1611 S> */ B(LdaConstant), U8(157),
-                B(Star), R(0),
-  /* 1621 S> */ B(LdaConstant), U8(158),
-                B(Star), R(0),
-  /* 1631 S> */ B(LdaConstant), U8(159),
-                B(Star), R(0),
-  /* 1641 S> */ B(LdaConstant), U8(160),
-                B(Star), R(0),
-  /* 1651 S> */ B(LdaConstant), U8(161),
-                B(Star), R(0),
-  /* 1661 S> */ B(LdaConstant), U8(162),
-                B(Star), R(0),
-  /* 1671 S> */ B(LdaConstant), U8(163),
-                B(Star), R(0),
-  /* 1681 S> */ B(LdaConstant), U8(164),
-                B(Star), R(0),
-  /* 1691 S> */ B(LdaConstant), U8(165),
-                B(Star), R(0),
-  /* 1701 S> */ B(LdaConstant), U8(166),
-                B(Star), R(0),
-  /* 1711 S> */ B(LdaConstant), U8(167),
-                B(Star), R(0),
-  /* 1721 S> */ B(LdaConstant), U8(168),
-                B(Star), R(0),
-  /* 1731 S> */ B(LdaConstant), U8(169),
-                B(Star), R(0),
-  /* 1741 S> */ B(LdaConstant), U8(170),
-                B(Star), R(0),
-  /* 1751 S> */ B(LdaConstant), U8(171),
-                B(Star), R(0),
-  /* 1761 S> */ B(LdaConstant), U8(172),
-                B(Star), R(0),
-  /* 1771 S> */ B(LdaConstant), U8(173),
-                B(Star), R(0),
-  /* 1781 S> */ B(LdaConstant), U8(174),
-                B(Star), R(0),
-  /* 1791 S> */ B(LdaConstant), U8(175),
-                B(Star), R(0),
-  /* 1801 S> */ B(LdaConstant), U8(176),
-                B(Star), R(0),
-  /* 1811 S> */ B(LdaConstant), U8(177),
-                B(Star), R(0),
-  /* 1821 S> */ B(LdaConstant), U8(178),
-                B(Star), R(0),
-  /* 1831 S> */ B(LdaConstant), U8(179),
-                B(Star), R(0),
-  /* 1841 S> */ B(LdaConstant), U8(180),
-                B(Star), R(0),
-  /* 1851 S> */ B(LdaConstant), U8(181),
-                B(Star), R(0),
-  /* 1861 S> */ B(LdaConstant), U8(182),
-                B(Star), R(0),
-  /* 1871 S> */ B(LdaConstant), U8(183),
-                B(Star), R(0),
-  /* 1881 S> */ B(LdaConstant), U8(184),
-                B(Star), R(0),
-  /* 1891 S> */ B(LdaConstant), U8(185),
-                B(Star), R(0),
-  /* 1901 S> */ B(LdaConstant), U8(186),
-                B(Star), R(0),
-  /* 1911 S> */ B(LdaConstant), U8(187),
-                B(Star), R(0),
-  /* 1921 S> */ B(LdaConstant), U8(188),
-                B(Star), R(0),
-  /* 1931 S> */ B(LdaConstant), U8(189),
-                B(Star), R(0),
-  /* 1941 S> */ B(LdaConstant), U8(190),
-                B(Star), R(0),
-  /* 1951 S> */ B(LdaConstant), U8(191),
-                B(Star), R(0),
-  /* 1961 S> */ B(LdaConstant), U8(192),
-                B(Star), R(0),
-  /* 1971 S> */ B(LdaConstant), U8(193),
-                B(Star), R(0),
-  /* 1981 S> */ B(LdaConstant), U8(194),
-                B(Star), R(0),
-  /* 1991 S> */ B(LdaConstant), U8(195),
-                B(Star), R(0),
-  /* 2001 S> */ B(LdaConstant), U8(196),
-                B(Star), R(0),
-  /* 2011 S> */ B(LdaConstant), U8(197),
-                B(Star), R(0),
-  /* 2021 S> */ B(LdaConstant), U8(198),
-                B(Star), R(0),
-  /* 2031 S> */ B(LdaConstant), U8(199),
-                B(Star), R(0),
-  /* 2041 S> */ B(LdaConstant), U8(200),
-                B(Star), R(0),
-  /* 2051 S> */ B(LdaConstant), U8(201),
-                B(Star), R(0),
-  /* 2061 S> */ B(LdaConstant), U8(202),
-                B(Star), R(0),
-  /* 2071 S> */ B(LdaConstant), U8(203),
-                B(Star), R(0),
-  /* 2081 S> */ B(LdaConstant), U8(204),
-                B(Star), R(0),
-  /* 2091 S> */ B(LdaConstant), U8(205),
-                B(Star), R(0),
-  /* 2101 S> */ B(LdaConstant), U8(206),
-                B(Star), R(0),
-  /* 2111 S> */ B(LdaConstant), U8(207),
-                B(Star), R(0),
-  /* 2121 S> */ B(LdaConstant), U8(208),
-                B(Star), R(0),
-  /* 2131 S> */ B(LdaConstant), U8(209),
-                B(Star), R(0),
-  /* 2141 S> */ B(LdaConstant), U8(210),
-                B(Star), R(0),
-  /* 2151 S> */ B(LdaConstant), U8(211),
-                B(Star), R(0),
-  /* 2161 S> */ B(LdaConstant), U8(212),
-                B(Star), R(0),
-  /* 2171 S> */ B(LdaConstant), U8(213),
-                B(Star), R(0),
-  /* 2181 S> */ B(LdaConstant), U8(214),
-                B(Star), R(0),
-  /* 2191 S> */ B(LdaConstant), U8(215),
-                B(Star), R(0),
-  /* 2201 S> */ B(LdaConstant), U8(216),
-                B(Star), R(0),
-  /* 2211 S> */ B(LdaConstant), U8(217),
-                B(Star), R(0),
-  /* 2221 S> */ B(LdaConstant), U8(218),
-                B(Star), R(0),
-  /* 2231 S> */ B(LdaConstant), U8(219),
-                B(Star), R(0),
-  /* 2241 S> */ B(LdaConstant), U8(220),
-                B(Star), R(0),
-  /* 2251 S> */ B(LdaConstant), U8(221),
-                B(Star), R(0),
-  /* 2261 S> */ B(LdaConstant), U8(222),
-                B(Star), R(0),
-  /* 2271 S> */ B(LdaConstant), U8(223),
-                B(Star), R(0),
-  /* 2281 S> */ B(LdaConstant), U8(224),
-                B(Star), R(0),
-  /* 2291 S> */ B(LdaConstant), U8(225),
-                B(Star), R(0),
-  /* 2301 S> */ B(LdaConstant), U8(226),
-                B(Star), R(0),
-  /* 2311 S> */ B(LdaConstant), U8(227),
-                B(Star), R(0),
-  /* 2321 S> */ B(LdaConstant), U8(228),
-                B(Star), R(0),
-  /* 2331 S> */ B(LdaConstant), U8(229),
-                B(Star), R(0),
-  /* 2341 S> */ B(LdaConstant), U8(230),
-                B(Star), R(0),
-  /* 2351 S> */ B(LdaConstant), U8(231),
-                B(Star), R(0),
-  /* 2361 S> */ B(LdaConstant), U8(232),
-                B(Star), R(0),
-  /* 2371 S> */ B(LdaConstant), U8(233),
-                B(Star), R(0),
-  /* 2381 S> */ B(LdaConstant), U8(234),
-                B(Star), R(0),
-  /* 2391 S> */ B(LdaConstant), U8(235),
-                B(Star), R(0),
-  /* 2401 S> */ B(LdaConstant), U8(236),
-                B(Star), R(0),
-  /* 2411 S> */ B(LdaConstant), U8(237),
-                B(Star), R(0),
-  /* 2421 S> */ B(LdaConstant), U8(238),
-                B(Star), R(0),
-  /* 2431 S> */ B(LdaConstant), U8(239),
-                B(Star), R(0),
-  /* 2441 S> */ B(LdaConstant), U8(240),
-                B(Star), R(0),
-  /* 2451 S> */ B(LdaConstant), U8(241),
-                B(Star), R(0),
-  /* 2461 S> */ B(LdaConstant), U8(242),
-                B(Star), R(0),
-  /* 2471 S> */ B(LdaConstant), U8(243),
-                B(Star), R(0),
-  /* 2481 S> */ B(LdaConstant), U8(244),
-                B(Star), R(0),
-  /* 2491 S> */ B(LdaConstant), U8(245),
-                B(Star), R(0),
-  /* 2501 S> */ B(LdaConstant), U8(246),
-                B(Star), R(0),
-  /* 2511 S> */ B(LdaConstant), U8(247),
-                B(Star), R(0),
-  /* 2521 S> */ B(LdaConstant), U8(248),
-                B(Star), R(0),
-  /* 2531 S> */ B(LdaConstant), U8(249),
-                B(Star), R(0),
-  /* 2541 S> */ B(LdaConstant), U8(250),
-                B(Star), R(0),
-  /* 2551 S> */ B(LdaConstant), U8(251),
-                B(Star), R(0),
-  /* 2561 S> */ B(LdaConstant), U8(252),
-                B(Star), R(0),
-  /* 2571 S> */ B(LdaConstant), U8(253),
-                B(Star), R(0),
-  /* 2581 S> */ B(LdaConstant), U8(254),
-                B(Star), R(0),
-  /* 2591 S> */ B(LdaConstant), U8(255),
-                B(Star), R(0),
-  /* 2601 S> */ B(Wide), B(CreateRegExpLiteral), U16(256), U16(0), U8(0),
-  /* 2615 S> */ B(Return),
-]
-constant pool: [
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  HEAP_NUMBER_TYPE [1.23],
-  ONE_BYTE_INTERNALIZED_STRING_TYPE ["ab+d"],
-]
-handlers: [
-]
-
diff --git a/src/v8/test/cctest/interpreter/bytecode_expectations/StandardForLoop.golden b/src/v8/test/cctest/interpreter/bytecode_expectations/StandardForLoop.golden
index 6f6823d..e056714 100644
--- a/src/v8/test/cctest/interpreter/bytecode_expectations/StandardForLoop.golden
+++ b/src/v8/test/cctest/interpreter/bytecode_expectations/StandardForLoop.golden
@@ -99,7 +99,7 @@
                 B(TestEqual), R(2), U8(3),
                 B(JumpIfFalse), U8(54),
   /*   17 E> */ B(StackCheck),
-  /*   48 S> */ B(LdaLookupGlobalSlot), U8(2), U8(6), U8(1),
+  /*   48 S> */ B(LdaLookupGlobalSlot), U8(2), U8(4), U8(3),
                 B(Star), R(7),
                 B(LdaConstant), U8(3),
                 B(Star), R(8),
@@ -114,7 +114,7 @@
                 B(Mov), R(closure), R(11),
                 B(CallRuntime), U16(Runtime::kResolvePossiblyDirectEval), R(9), U8(6),
                 B(Star), R(7),
-  /*   48 E> */ B(CallUndefinedReceiver1), R(7), R(8), U8(4),
+  /*   48 E> */ B(CallUndefinedReceiver1), R(7), R(8), U8(6),
                 B(LdaZero),
                 B(Star), R(2),
                 B(LdaCurrentContextSlot), U8(4),
@@ -188,9 +188,9 @@
                 B(TestEqual), R(3), U8(3),
                 B(JumpIfFalse), U8(22),
   /*   17 E> */ B(StackCheck),
-  /*   48 S> */ B(CreateClosure), U8(1), U8(6), U8(2),
+  /*   48 S> */ B(CreateClosure), U8(1), U8(4), U8(2),
                 B(Star), R(5),
-  /*   74 E> */ B(CallUndefinedReceiver0), R(5), U8(4),
+  /*   74 E> */ B(CallUndefinedReceiver0), R(5), U8(5),
                 B(LdaZero),
                 B(Star), R(3),
                 B(LdaCurrentContextSlot), U8(4),
@@ -231,25 +231,25 @@
                 B(JumpIfUndefined), U8(6),
                 B(Ldar), R(3),
                 B(JumpIfNotNull), U8(16),
-                B(LdaSmi), I8(65),
+                B(LdaSmi), I8(74),
                 B(Star), R(4),
                 B(LdaConstant), U8(1),
                 B(Star), R(5),
                 B(CallRuntime), U16(Runtime::kNewTypeError), R(4), U8(2),
   /*   28 E> */ B(Throw),
-  /*   37 S> */ B(LdaNamedProperty), R(3), U8(1), U8(3),
+  /*   37 S> */ B(LdaNamedProperty), R(3), U8(1), U8(1),
                 B(Star), R(1),
-  /*   37 S> */ B(LdaNamedProperty), R(3), U8(2), U8(5),
+  /*   37 S> */ B(LdaNamedProperty), R(3), U8(2), U8(3),
                 B(Star), R(2),
   /*   55 S> */ B(LdaZero),
-  /*   55 E> */ B(TestGreaterThan), R(2), U8(7),
+  /*   55 E> */ B(TestGreaterThan), R(2), U8(5),
                 B(JumpIfFalse), U8(19),
   /*   17 E> */ B(StackCheck),
   /*   75 S> */ B(Ldar), R(2),
-  /*   77 E> */ B(Add), R(1), U8(9),
+  /*   77 E> */ B(Add), R(1), U8(6),
                 B(Star), R(0),
   /*   62 S> */ B(Ldar), R(2),
-                B(Dec), U8(8),
+                B(Dec), U8(7),
                 B(Star), R(2),
                 B(JumpLoop), U8(20), I8(0),
                 B(LdaUndefined),
@@ -272,7 +272,7 @@
 "
 frame size: 6
 parameter count: 1
-bytecode array length: 96
+bytecode array length: 89
 bytecodes: [
                 B(Ldar), R(2),
                 B(JumpIfUndefined), U8(18),
@@ -281,7 +281,7 @@
                 B(RestoreGeneratorState), R(2),
                 B(Star), R(3),
                 B(SwitchOnSmiNoFeedback), U8(0), U8(1), I8(0),
-                B(Abort), U8(45),
+                B(Abort), U8(15),
                 B(LdaSmi), I8(-2),
                 B(Star), R(3),
                 B(Mov), R(closure), R(4),
@@ -291,10 +291,7 @@
   /*   11 E> */ B(StackCheck),
   /*   11 E> */ B(SuspendGenerator), R(2), R(0), U8(4), U8(0),
   /*   62 S> */ B(Return),
-                B(RestoreGeneratorRegisters), R(2), R(0), U8(4),
-                B(LdaSmi), I8(-2),
-                B(Star), R(3),
-                B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(2), U8(1),
+                B(ResumeGenerator), R(2), R(3), R(0), U8(4),
                 B(Star), R(4),
                 B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(2), U8(1),
                 B(SwitchOnSmiNoFeedback), U8(1), U8(2), I8(0),
@@ -333,7 +330,7 @@
 "
 frame size: 5
 parameter count: 1
-bytecode array length: 151
+bytecode array length: 137
 bytecodes: [
                 B(Ldar), R(1),
                 B(JumpIfUndefined), U8(18),
@@ -342,7 +339,7 @@
                 B(RestoreGeneratorState), R(1),
                 B(Star), R(2),
                 B(SwitchOnSmiNoFeedback), U8(0), U8(2), I8(0),
-                B(Abort), U8(45),
+                B(Abort), U8(15),
                 B(LdaSmi), I8(-2),
                 B(Star), R(2),
                 B(Mov), R(closure), R(3),
@@ -352,10 +349,7 @@
   /*   11 E> */ B(StackCheck),
   /*   11 E> */ B(SuspendGenerator), R(1), R(0), U8(3), U8(0),
   /*   56 S> */ B(Return),
-                B(RestoreGeneratorRegisters), R(1), R(0), U8(3),
-                B(LdaSmi), I8(-2),
-                B(Star), R(2),
-                B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(1), U8(1),
+                B(ResumeGenerator), R(1), R(2), R(0), U8(3),
                 B(Star), R(3),
                 B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(1), U8(1),
                 B(SwitchOnSmiNoFeedback), U8(2), U8(2), I8(0),
@@ -370,10 +364,10 @@
                 B(LdaSmi), I8(-2),
   /*   31 E> */ B(TestEqualStrictNoFeedback), R(2),
                 B(JumpIfTrue), U8(4),
-                B(Abort), U8(45),
+                B(Abort), U8(15),
   /*   36 S> */ B(LdaSmi), I8(10),
   /*   36 E> */ B(TestLessThan), R(0), U8(0),
-                B(JumpIfFalse), U8(56),
+                B(JumpIfFalse), U8(49),
   /*   18 E> */ B(StackCheck),
   /*   47 S> */ B(LdaFalse),
                 B(Star), R(4),
@@ -381,10 +375,7 @@
                 B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(3), U8(2),
                 B(SuspendGenerator), R(1), R(0), U8(3), U8(1),
   /*   56 S> */ B(Return),
-                B(RestoreGeneratorRegisters), R(1), R(0), U8(3),
-                B(LdaSmi), I8(-2),
-                B(Star), R(2),
-                B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(1), U8(1),
+                B(ResumeGenerator), R(1), R(2), R(0), U8(3),
                 B(Star), R(3),
                 B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(1), U8(1),
                 B(SwitchOnSmiNoFeedback), U8(5), U8(2), I8(0),
@@ -395,13 +386,13 @@
   /*   44 S> */ B(Ldar), R(0),
                 B(Inc), U8(1),
                 B(Star), R(0),
-                B(JumpLoop), U8(72), I8(0),
+                B(JumpLoop), U8(65), I8(0),
                 B(LdaUndefined),
   /*   56 S> */ B(Return),
 ]
 constant pool: [
   Smi [29],
-  Smi [60],
+  Smi [53],
   Smi [10],
   Smi [7],
   Smi [36],
@@ -509,7 +500,7 @@
 "
 frame size: 12
 parameter count: 1
-bytecode array length: 231
+bytecode array length: 224
 bytecodes: [
                 B(Ldar), R(1),
                 B(JumpIfUndefined), U8(18),
@@ -518,7 +509,7 @@
                 B(RestoreGeneratorState), R(1),
                 B(Star), R(3),
                 B(SwitchOnSmiNoFeedback), U8(0), U8(1), I8(0),
-                B(Abort), U8(45),
+                B(Abort), U8(15),
                 B(LdaSmi), I8(-2),
                 B(Star), R(3),
                 B(Mov), R(closure), R(4),
@@ -537,10 +528,10 @@
                 B(LdaSmi), I8(-2),
   /*   36 E> */ B(TestEqualStrictNoFeedback), R(3),
                 B(JumpIfTrue), U8(4),
-                B(Abort), U8(45),
+                B(Abort), U8(15),
   /*   41 S> */ B(LdaSmi), I8(10),
   /*   41 E> */ B(TestLessThan), R(0), U8(0),
-                B(JumpIfFalse), U8(59),
+                B(JumpIfFalse), U8(52),
   /*   23 E> */ B(StackCheck),
   /*   52 S> */ B(Mov), R(1), R(8),
                 B(Mov), R(0), R(9),
@@ -548,10 +539,7 @@
                 B(CallJSRuntime), U8(%async_function_await_uncaught), R(8), U8(3),
                 B(SuspendGenerator), R(1), R(0), U8(8), U8(0),
   /*   61 S> */ B(Return),
-                B(RestoreGeneratorRegisters), R(1), R(0), U8(8),
-                B(LdaSmi), I8(-2),
-                B(Star), R(3),
-                B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(1), U8(1),
+                B(ResumeGenerator), R(1), R(3), R(0), U8(8),
                 B(Star), R(8),
                 B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(1), U8(1),
                 B(Star), R(9),
@@ -563,7 +551,7 @@
   /*   49 S> */ B(Ldar), R(0),
                 B(Inc), U8(1),
                 B(Star), R(0),
-                B(JumpLoop), U8(75), I8(0),
+                B(JumpLoop), U8(68), I8(0),
                 B(LdaUndefined),
                 B(Star), R(9),
                 B(Mov), R(2), R(8),
@@ -624,7 +612,7 @@
   Smi [9],
 ]
 handlers: [
-  [46, 190, 198],
-  [49, 148, 150],
+  [46, 183, 191],
+  [49, 141, 143],
 ]
 
diff --git a/src/v8/test/cctest/interpreter/bytecode_expectations/StaticClassFields.golden b/src/v8/test/cctest/interpreter/bytecode_expectations/StaticClassFields.golden
new file mode 100644
index 0000000..80a2e4f
--- /dev/null
+++ b/src/v8/test/cctest/interpreter/bytecode_expectations/StaticClassFields.golden
@@ -0,0 +1,339 @@
+#
+# Autogenerated by generate-bytecode-expectations.
+#
+
+---
+wrap: yes
+public fields: yes
+static fields: yes
+
+---
+snippet: "
+  {
+    class A {
+      a;
+      ['b'];
+      static c;
+      static ['d'];
+    }
+  
+    class B {
+      a = 1;
+      ['b'] = this.a;
+      static c = 3;
+      static ['d'] = this.c;
+    }
+    new A;
+    new B;
+  }
+"
+frame size: 11
+parameter count: 1
+bytecode array length: 193
+bytecodes: [
+  /*   30 E> */ B(StackCheck),
+                B(Ldar), R(closure),
+                B(CreateBlockContext), U8(0),
+                B(PushContext), R(4),
+                B(LdaTheHole),
+                B(StaCurrentContextSlot), U8(4),
+                B(LdaTheHole),
+                B(StaCurrentContextSlot), U8(5),
+                B(LdaTheHole),
+                B(Star), R(8),
+                B(CreateClosure), U8(2), U8(0), U8(2),
+                B(Star), R(5),
+                B(LdaConstant), U8(1),
+                B(Star), R(6),
+                B(LdaConstant), U8(3),
+                B(StaCurrentContextSlot), U8(4),
+                B(Star), R(9),
+                B(LdaConstant), U8(4),
+                B(Star), R(10),
+                B(LdaConstant), U8(5),
+                B(TestEqualStrictNoFeedback), R(10),
+                B(Mov), R(5), R(7),
+                B(JumpIfFalse), U8(7),
+                B(CallRuntime), U16(Runtime::kThrowStaticPrototypeError), R(0), U8(0),
+                B(Ldar), R(10),
+                B(StaCurrentContextSlot), U8(5),
+                B(CallRuntime), U16(Runtime::kDefineClass), R(6), U8(5),
+                B(Star), R(6),
+                B(Mov), R(5), R(1),
+                B(CreateClosure), U8(6), U8(1), U8(2),
+                B(Star), R(7),
+                B(StaNamedProperty), R(5), U8(7), U8(2),
+                B(CreateClosure), U8(8), U8(4), U8(2),
+                B(Star), R(9),
+                B(CallProperty0), R(9), R(1), U8(5),
+                B(PopContext), R(4),
+                B(Mov), R(1), R(2),
+                B(Ldar), R(closure),
+  /*   38 E> */ B(CreateBlockContext), U8(9),
+                B(PushContext), R(4),
+                B(LdaTheHole),
+                B(StaCurrentContextSlot), U8(4),
+                B(LdaTheHole),
+                B(StaCurrentContextSlot), U8(5),
+                B(LdaTheHole),
+                B(Star), R(8),
+                B(CreateClosure), U8(11), U8(7), U8(2),
+                B(Star), R(5),
+                B(LdaConstant), U8(10),
+                B(Star), R(6),
+                B(LdaConstant), U8(3),
+                B(StaCurrentContextSlot), U8(4),
+                B(Star), R(9),
+                B(LdaConstant), U8(4),
+                B(Star), R(10),
+                B(LdaConstant), U8(5),
+                B(TestEqualStrictNoFeedback), R(10),
+                B(Mov), R(5), R(7),
+                B(JumpIfFalse), U8(7),
+                B(CallRuntime), U16(Runtime::kThrowStaticPrototypeError), R(0), U8(0),
+                B(Ldar), R(10),
+                B(StaCurrentContextSlot), U8(5),
+                B(CallRuntime), U16(Runtime::kDefineClass), R(6), U8(5),
+                B(Star), R(6),
+                B(Mov), R(5), R(0),
+                B(CreateClosure), U8(12), U8(8), U8(2),
+                B(Star), R(7),
+                B(StaNamedProperty), R(5), U8(7), U8(9),
+                B(CreateClosure), U8(13), U8(11), U8(2),
+                B(Star), R(9),
+                B(CallProperty0), R(9), R(0), U8(12),
+                B(PopContext), R(4),
+                B(Mov), R(0), R(3),
+  /*  197 S> */ B(Ldar), R(2),
+  /*  197 E> */ B(Construct), R(2), R(0), U8(0), U8(14),
+  /*  206 S> */ B(Ldar), R(0),
+  /*  206 E> */ B(Construct), R(0), R(0), U8(0), U8(16),
+                B(LdaUndefined),
+  /*  215 S> */ B(Return),
+]
+constant pool: [
+  FIXED_ARRAY_TYPE,
+  FIXED_ARRAY_TYPE,
+  SHARED_FUNCTION_INFO_TYPE,
+  ONE_BYTE_INTERNALIZED_STRING_TYPE ["b"],
+  ONE_BYTE_INTERNALIZED_STRING_TYPE ["d"],
+  ONE_BYTE_INTERNALIZED_STRING_TYPE ["prototype"],
+  SHARED_FUNCTION_INFO_TYPE,
+  SYMBOL_TYPE,
+  SHARED_FUNCTION_INFO_TYPE,
+  FIXED_ARRAY_TYPE,
+  FIXED_ARRAY_TYPE,
+  SHARED_FUNCTION_INFO_TYPE,
+  SHARED_FUNCTION_INFO_TYPE,
+  SHARED_FUNCTION_INFO_TYPE,
+]
+handlers: [
+]
+
+---
+snippet: "
+  {
+    class A extends class {} {
+      a;
+      ['b'];
+      static c;
+      static ['d'];
+    }
+  
+    class B extends class {} {
+      a = 1;
+      ['b'] = this.a;
+      static c = 3;
+      static ['d'] = this.c;
+      foo() { return 1; }
+      constructor() {
+        super();
+      }
+    }
+  
+    class C extends B {
+      a = 1;
+      ['b'] = this.a;
+      static c = 3;
+      static ['d'] = super.foo();
+      constructor() {
+        (() => super())();
+      }
+    }
+  
+    new A;
+    new B;
+    new C;
+  }
+"
+frame size: 15
+parameter count: 1
+bytecode array length: 346
+bytecodes: [
+  /*   30 E> */ B(StackCheck),
+                B(Ldar), R(closure),
+                B(CreateBlockContext), U8(0),
+                B(PushContext), R(6),
+                B(LdaTheHole),
+                B(StaCurrentContextSlot), U8(4),
+                B(LdaTheHole),
+                B(StaCurrentContextSlot), U8(5),
+                B(LdaTheHole),
+                B(Star), R(14),
+                B(CreateClosure), U8(3), U8(0), U8(2),
+                B(Star), R(11),
+                B(LdaConstant), U8(2),
+                B(Star), R(12),
+                B(Mov), R(11), R(13),
+                B(CallRuntime), U16(Runtime::kDefineClass), R(12), U8(3),
+                B(Star), R(12),
+                B(CreateClosure), U8(4), U8(1), U8(2),
+                B(Star), R(7),
+                B(LdaConstant), U8(1),
+                B(Star), R(8),
+                B(LdaConstant), U8(5),
+                B(StaCurrentContextSlot), U8(4),
+                B(Star), R(11),
+                B(LdaConstant), U8(6),
+                B(Star), R(12),
+                B(LdaConstant), U8(7),
+                B(TestEqualStrictNoFeedback), R(12),
+                B(Mov), R(13), R(10),
+                B(Mov), R(7), R(9),
+                B(JumpIfFalse), U8(7),
+                B(CallRuntime), U16(Runtime::kThrowStaticPrototypeError), R(0), U8(0),
+                B(Ldar), R(12),
+                B(StaCurrentContextSlot), U8(5),
+                B(CallRuntime), U16(Runtime::kDefineClass), R(8), U8(5),
+                B(Star), R(8),
+                B(Mov), R(7), R(2),
+                B(CreateClosure), U8(8), U8(2), U8(2),
+                B(Star), R(9),
+                B(StaNamedProperty), R(7), U8(9), U8(3),
+                B(CreateClosure), U8(10), U8(5), U8(2),
+                B(Star), R(11),
+                B(CallProperty0), R(11), R(2), U8(6),
+                B(PopContext), R(6),
+                B(Mov), R(2), R(3),
+                B(Ldar), R(closure),
+  /*   38 E> */ B(CreateBlockContext), U8(11),
+                B(PushContext), R(6),
+                B(LdaTheHole),
+                B(StaCurrentContextSlot), U8(4),
+                B(LdaTheHole),
+                B(StaCurrentContextSlot), U8(5),
+                B(LdaTheHole),
+                B(Star), R(14),
+                B(CreateClosure), U8(14), U8(8), U8(2),
+                B(Star), R(11),
+                B(LdaConstant), U8(13),
+                B(Star), R(12),
+                B(Mov), R(11), R(13),
+                B(CallRuntime), U16(Runtime::kDefineClass), R(12), U8(3),
+                B(Star), R(12),
+                B(CreateClosure), U8(15), U8(9), U8(2),
+                B(Star), R(7),
+                B(LdaConstant), U8(12),
+                B(Star), R(8),
+                B(LdaConstant), U8(5),
+                B(StaCurrentContextSlot), U8(4),
+                B(Star), R(11),
+                B(LdaConstant), U8(6),
+                B(Star), R(12),
+                B(LdaConstant), U8(7),
+                B(TestEqualStrictNoFeedback), R(12),
+                B(Mov), R(7), R(9),
+                B(Mov), R(13), R(10),
+                B(JumpIfFalse), U8(7),
+                B(CallRuntime), U16(Runtime::kThrowStaticPrototypeError), R(0), U8(0),
+                B(Ldar), R(12),
+                B(StaCurrentContextSlot), U8(5),
+                B(CreateClosure), U8(16), U8(10), U8(2),
+                B(Star), R(13),
+                B(CallRuntime), U16(Runtime::kDefineClass), R(8), U8(6),
+                B(Star), R(8),
+                B(Mov), R(7), R(1),
+                B(CreateClosure), U8(17), U8(11), U8(2),
+                B(Star), R(9),
+                B(StaNamedProperty), R(7), U8(9), U8(12),
+                B(CreateClosure), U8(18), U8(14), U8(2),
+                B(Star), R(11),
+                B(CallProperty0), R(11), R(1), U8(15),
+                B(PopContext), R(6),
+                B(Mov), R(1), R(4),
+                B(Ldar), R(closure),
+  /*  122 E> */ B(CreateBlockContext), U8(19),
+                B(PushContext), R(6),
+                B(LdaTheHole),
+                B(StaCurrentContextSlot), U8(4),
+                B(LdaTheHole),
+                B(StaCurrentContextSlot), U8(5),
+  /*  313 E> */ B(CreateClosure), U8(21), U8(17), U8(2),
+                B(Star), R(7),
+                B(LdaConstant), U8(20),
+                B(Star), R(8),
+                B(LdaConstant), U8(5),
+                B(StaCurrentContextSlot), U8(4),
+                B(Star), R(11),
+                B(LdaConstant), U8(6),
+                B(Star), R(12),
+                B(LdaConstant), U8(7),
+                B(TestEqualStrictNoFeedback), R(12),
+                B(Mov), R(1), R(10),
+                B(Mov), R(7), R(9),
+                B(JumpIfFalse), U8(7),
+                B(CallRuntime), U16(Runtime::kThrowStaticPrototypeError), R(0), U8(0),
+                B(Ldar), R(12),
+                B(StaCurrentContextSlot), U8(5),
+                B(CallRuntime), U16(Runtime::kDefineClass), R(8), U8(5),
+                B(Star), R(8),
+                B(Mov), R(7), R(0),
+                B(CreateClosure), U8(22), U8(18), U8(2),
+                B(Star), R(9),
+                B(StaNamedProperty), R(7), U8(9), U8(19),
+                B(CreateClosure), U8(23), U8(21), U8(2),
+                B(Star), R(11),
+                B(Ldar), R(0),
+                B(StaNamedProperty), R(11), U8(24), U8(22),
+                B(CallProperty0), R(11), R(0), U8(24),
+                B(PopContext), R(6),
+                B(Mov), R(0), R(5),
+  /*  456 S> */ B(Ldar), R(3),
+  /*  456 E> */ B(Construct), R(3), R(0), U8(0), U8(26),
+  /*  465 S> */ B(Ldar), R(4),
+  /*  465 E> */ B(Construct), R(4), R(0), U8(0), U8(28),
+  /*  474 S> */ B(Ldar), R(0),
+  /*  474 E> */ B(Construct), R(0), R(0), U8(0), U8(30),
+                B(LdaUndefined),
+  /*  483 S> */ B(Return),
+]
+constant pool: [
+  FIXED_ARRAY_TYPE,
+  FIXED_ARRAY_TYPE,
+  FIXED_ARRAY_TYPE,
+  SHARED_FUNCTION_INFO_TYPE,
+  SHARED_FUNCTION_INFO_TYPE,
+  ONE_BYTE_INTERNALIZED_STRING_TYPE ["b"],
+  ONE_BYTE_INTERNALIZED_STRING_TYPE ["d"],
+  ONE_BYTE_INTERNALIZED_STRING_TYPE ["prototype"],
+  SHARED_FUNCTION_INFO_TYPE,
+  SYMBOL_TYPE,
+  SHARED_FUNCTION_INFO_TYPE,
+  FIXED_ARRAY_TYPE,
+  FIXED_ARRAY_TYPE,
+  FIXED_ARRAY_TYPE,
+  SHARED_FUNCTION_INFO_TYPE,
+  SHARED_FUNCTION_INFO_TYPE,
+  SHARED_FUNCTION_INFO_TYPE,
+  SHARED_FUNCTION_INFO_TYPE,
+  SHARED_FUNCTION_INFO_TYPE,
+  FIXED_ARRAY_TYPE,
+  FIXED_ARRAY_TYPE,
+  SHARED_FUNCTION_INFO_TYPE,
+  SHARED_FUNCTION_INFO_TYPE,
+  SHARED_FUNCTION_INFO_TYPE,
+  SYMBOL_TYPE,
+]
+handlers: [
+]
+
diff --git a/src/v8/test/cctest/interpreter/bytecode_expectations/StoreGlobal.golden b/src/v8/test/cctest/interpreter/bytecode_expectations/StoreGlobal.golden
index 8a24433..927b9f3 100644
--- a/src/v8/test/cctest/interpreter/bytecode_expectations/StoreGlobal.golden
+++ b/src/v8/test/cctest/interpreter/bytecode_expectations/StoreGlobal.golden
@@ -18,7 +18,7 @@
 bytecodes: [
   /*   21 E> */ B(StackCheck),
   /*   26 S> */ B(LdaSmi), I8(2),
-  /*   28 E> */ B(StaGlobalSloppy), U8(0), U8(0),
+  /*   28 E> */ B(StaGlobal), U8(0), U8(0),
                 B(LdaUndefined),
   /*   33 S> */ B(Return),
 ]
@@ -39,7 +39,7 @@
 bytecodes: [
   /*   26 E> */ B(StackCheck),
   /*   32 S> */ B(Ldar), R(arg0),
-  /*   34 E> */ B(StaGlobalSloppy), U8(0), U8(0),
+  /*   34 E> */ B(StaGlobal), U8(0), U8(0),
                 B(LdaUndefined),
   /*   39 S> */ B(Return),
 ]
@@ -61,7 +61,7 @@
 bytecodes: [
   /*   35 E> */ B(StackCheck),
   /*   40 S> */ B(LdaSmi), I8(2),
-  /*   42 E> */ B(StaGlobalStrict), U8(0), U8(0),
+  /*   42 E> */ B(StaGlobal), U8(0), U8(0),
                 B(LdaUndefined),
   /*   47 S> */ B(Return),
 ]
@@ -83,7 +83,7 @@
 bytecodes: [
   /*   17 E> */ B(StackCheck),
   /*   22 S> */ B(LdaSmi), I8(2),
-  /*   24 E> */ B(StaGlobalSloppy), U8(0), U8(0),
+  /*   24 E> */ B(StaGlobal), U8(0), U8(0),
                 B(LdaUndefined),
   /*   29 S> */ B(Return),
 ]
@@ -363,7 +363,7 @@
   /* 1287 S> */ B(LdaNamedProperty), R(arg0), U8(0), U8(252),
   /* 1297 S> */ B(LdaNamedProperty), R(arg0), U8(0), U8(254),
   /* 1305 S> */ B(LdaSmi), I8(2),
-  /* 1307 E> */ B(Wide), B(StaGlobalSloppy), U16(1), U16(256),
+  /* 1307 E> */ B(Wide), B(StaGlobal), U16(1), U16(256),
                 B(LdaUndefined),
   /* 1312 S> */ B(Return),
 ]
@@ -645,7 +645,7 @@
   /* 1303 S> */ B(LdaNamedProperty), R(arg0), U8(0), U8(252),
   /* 1313 S> */ B(LdaNamedProperty), R(arg0), U8(0), U8(254),
   /* 1321 S> */ B(LdaSmi), I8(2),
-  /* 1323 E> */ B(Wide), B(StaGlobalStrict), U16(1), U16(256),
+  /* 1323 E> */ B(Wide), B(StaGlobal), U16(1), U16(256),
                 B(LdaUndefined),
   /* 1328 S> */ B(Return),
 ]
diff --git a/src/v8/test/cctest/interpreter/bytecode_expectations/SuperCallAndSpread.golden b/src/v8/test/cctest/interpreter/bytecode_expectations/SuperCallAndSpread.golden
index 0d36442..cf04f8e 100644
--- a/src/v8/test/cctest/interpreter/bytecode_expectations/SuperCallAndSpread.golden
+++ b/src/v8/test/cctest/interpreter/bytecode_expectations/SuperCallAndSpread.golden
@@ -17,7 +17,7 @@
     test = new B(1, 2, 3).constructor;
   })();
 "
-frame size: 4
+frame size: 5
 parameter count: 1
 bytecode array length: 19
 bytecodes: [
@@ -26,9 +26,9 @@
                 B(Mov), R(closure), R(1),
   /*   93 E> */ B(StackCheck),
   /*   93 S> */ B(Ldar), R(1),
-                B(GetSuperConstructor), R(3),
+                B(GetSuperConstructor), R(4),
                 B(Ldar), R(0),
-  /*   93 E> */ B(ConstructWithSpread), R(3), R(2), U8(1), U8(0),
+  /*   93 E> */ B(ConstructWithSpread), R(4), R(2), U8(1), U8(0),
   /*   93 S> */ B(Return),
 ]
 constant pool: [
@@ -49,7 +49,7 @@
     test = new B(1, 2, 3).constructor;
   })();
 "
-frame size: 7
+frame size: 8
 parameter count: 1
 bytecode array length: 40
 bytecodes: [
@@ -59,12 +59,12 @@
   /*  128 E> */ B(StackCheck),
                 B(Mov), R(2), R(3),
   /*  140 S> */ B(Ldar), R(closure),
-                B(GetSuperConstructor), R(4),
+                B(GetSuperConstructor), R(5),
                 B(LdaSmi), I8(1),
-                B(Star), R(5),
+                B(Star), R(6),
                 B(Ldar), R(0),
-                B(Mov), R(2), R(6),
-  /*  140 E> */ B(ConstructWithSpread), R(4), R(5), U8(2), U8(0),
+                B(Mov), R(2), R(7),
+  /*  140 E> */ B(ConstructWithSpread), R(5), R(6), U8(2), U8(0),
                 B(Star), R(4),
                 B(Ldar), R(this),
   /*  140 E> */ B(ThrowSuperAlreadyCalledIfNotHole),
diff --git a/src/v8/test/cctest/interpreter/bytecode_expectations/Switch.golden b/src/v8/test/cctest/interpreter/bytecode_expectations/Switch.golden
index a853183..ca596e7 100644
--- a/src/v8/test/cctest/interpreter/bytecode_expectations/Switch.golden
+++ b/src/v8/test/cctest/interpreter/bytecode_expectations/Switch.golden
@@ -25,7 +25,7 @@
                 B(Mov), R(0), R(1),
                 B(JumpIfTrue), U8(11),
                 B(LdaSmi), I8(2),
-                B(TestEqualStrict), R(1), U8(1),
+                B(TestEqualStrict), R(1), U8(0),
                 B(JumpIfTrue), U8(7),
                 B(Jump), U8(8),
   /*   66 S> */ B(LdaSmi), I8(2),
@@ -60,7 +60,7 @@
                 B(Mov), R(0), R(1),
                 B(JumpIfTrue), U8(11),
                 B(LdaSmi), I8(2),
-                B(TestEqualStrict), R(1), U8(1),
+                B(TestEqualStrict), R(1), U8(0),
                 B(JumpIfTrue), U8(10),
                 B(Jump), U8(14),
   /*   66 S> */ B(LdaSmi), I8(2),
@@ -97,7 +97,7 @@
                 B(Mov), R(0), R(1),
                 B(JumpIfTrue), U8(11),
                 B(LdaSmi), I8(2),
-                B(TestEqualStrict), R(1), U8(1),
+                B(TestEqualStrict), R(1), U8(0),
                 B(JumpIfTrue), U8(8),
                 B(Jump), U8(12),
   /*   66 S> */ B(LdaSmi), I8(2),
@@ -134,7 +134,7 @@
                 B(Mov), R(0), R(1),
                 B(JumpIfTrue), U8(11),
                 B(LdaSmi), I8(3),
-                B(TestEqualStrict), R(1), U8(1),
+                B(TestEqualStrict), R(1), U8(0),
                 B(JumpIfTrue), U8(6),
                 B(Jump), U8(6),
   /*   66 S> */ B(Jump), U8(10),
@@ -172,7 +172,7 @@
                 B(TestEqualStrict), R(1), U8(0),
                 B(JumpIfTrue), U8(11),
                 B(LdaSmi), I8(3),
-                B(TestEqualStrict), R(1), U8(1),
+                B(TestEqualStrict), R(1), U8(0),
                 B(JumpIfTrue), U8(10),
                 B(Jump), U8(14),
   /*   74 S> */ B(LdaSmi), I8(1),
@@ -313,7 +313,7 @@
                 B(Mov), R(0), R(1),
                 B(JumpIfTrue), U8(11),
                 B(LdaSmi), I8(2),
-                B(TestEqualStrict), R(1), U8(1),
+                B(TestEqualStrict), R(1), U8(0),
                 B(JumpIfTrueConstant), U8(0),
                 B(JumpConstant), U8(1),
   /*   68 S> */ B(LdaSmi), I8(2),
@@ -478,18 +478,18 @@
   /*   42 S> */ B(LdaSmi), I8(1),
                 B(Star), R(0),
   /*   45 S> */ B(LdaSmi), I8(1),
-                B(TestEqualStrict), R(0), U8(3),
+                B(TestEqualStrict), R(0), U8(0),
                 B(Mov), R(0), R(1),
                 B(JumpIfTrue), U8(11),
                 B(LdaSmi), I8(2),
-                B(TestEqualStrict), R(1), U8(4),
+                B(TestEqualStrict), R(1), U8(0),
                 B(JumpIfTrue), U8(32),
                 B(Jump), U8(34),
   /*   70 S> */ B(Ldar), R(0),
-  /*   79 E> */ B(AddSmi), I8(1), U8(0),
+  /*   79 E> */ B(AddSmi), I8(1), U8(1),
                 B(Star), R(2),
                 B(LdaSmi), I8(2),
-                B(TestEqualStrict), R(2), U8(1),
+                B(TestEqualStrict), R(2), U8(2),
                 B(JumpIfTrue), U8(4),
                 B(Jump), U8(8),
   /*  101 S> */ B(LdaSmi), I8(1),
diff --git a/src/v8/test/cctest/interpreter/bytecode_expectations/ThisFunction.golden b/src/v8/test/cctest/interpreter/bytecode_expectations/ThisFunction.golden
index 6e4eec5..3e7bb57 100644
--- a/src/v8/test/cctest/interpreter/bytecode_expectations/ThisFunction.golden
+++ b/src/v8/test/cctest/interpreter/bytecode_expectations/ThisFunction.golden
@@ -12,12 +12,11 @@
   f = function f() {};
   f();
 "
-frame size: 1
+frame size: 0
 parameter count: 1
-bytecode array length: 6
+bytecode array length: 3
 bytecodes: [
   /*   21 E> */ B(StackCheck),
-                B(Mov), R(closure), R(0),
                 B(LdaUndefined),
   /*   25 S> */ B(Return),
 ]
@@ -36,8 +35,8 @@
 parameter count: 1
 bytecode array length: 7
 bytecodes: [
-  /*   21 E> */ B(StackCheck),
                 B(Mov), R(closure), R(0),
+  /*   21 E> */ B(StackCheck),
   /*   26 S> */ B(Ldar), R(0),
   /*   35 S> */ B(Return),
 ]
diff --git a/src/v8/test/cctest/interpreter/bytecode_expectations/TopLevelObjectLiterals.golden b/src/v8/test/cctest/interpreter/bytecode_expectations/TopLevelObjectLiterals.golden
index a78163a..0747228 100644
--- a/src/v8/test/cctest/interpreter/bytecode_expectations/TopLevelObjectLiterals.golden
+++ b/src/v8/test/cctest/interpreter/bytecode_expectations/TopLevelObjectLiterals.golden
@@ -21,11 +21,11 @@
                 B(Mov), R(closure), R(3),
                 B(CallRuntime), U16(Runtime::kDeclareGlobalsForInterpreter), R(1), U8(3),
   /*    0 E> */ B(StackCheck),
-  /*    8 S> */ B(CreateObjectLiteral), U8(1), U8(3), U8(41), R(1),
-                B(CreateClosure), U8(2), U8(2), U8(0),
+  /*    8 S> */ B(CreateObjectLiteral), U8(1), U8(2), U8(41), R(1),
+                B(CreateClosure), U8(2), U8(3), U8(0),
                 B(StaNamedOwnProperty), R(1), U8(3), U8(4),
                 B(Ldar), R(1),
-  /*    8 E> */ B(StaGlobalSloppy), U8(4), U8(6),
+  /*    8 E> */ B(StaGlobal), U8(4), U8(6),
                 B(LdaUndefined),
   /*   33 S> */ B(Return),
 ]
diff --git a/src/v8/test/cctest/interpreter/bytecode_expectations/UnaryOperators.golden b/src/v8/test/cctest/interpreter/bytecode_expectations/UnaryOperators.golden
index 2297a7f..b8b4c4b 100644
--- a/src/v8/test/cctest/interpreter/bytecode_expectations/UnaryOperators.golden
+++ b/src/v8/test/cctest/interpreter/bytecode_expectations/UnaryOperators.golden
@@ -101,8 +101,8 @@
   /*   30 E> */ B(StackCheck),
   /*   42 S> */ B(Wide), B(LdaSmi), I16(1234),
                 B(Star), R(0),
-  /*   64 S> */ B(Mul), R(0), U8(0),
-  /*   68 E> */ B(SubSmi), I8(1), U8(1),
+  /*   64 S> */ B(Mul), R(0), U8(1),
+  /*   68 E> */ B(SubSmi), I8(1), U8(0),
                 B(LdaUndefined),
                 B(Star), R(1),
   /*   83 S> */ B(Return),
diff --git a/src/v8/test/cctest/interpreter/bytecode_expectations/WideRegisters.golden b/src/v8/test/cctest/interpreter/bytecode_expectations/WideRegisters.golden
index 9445051..6d7309b 100644
--- a/src/v8/test/cctest/interpreter/bytecode_expectations/WideRegisters.golden
+++ b/src/v8/test/cctest/interpreter/bytecode_expectations/WideRegisters.golden
@@ -905,11 +905,11 @@
                 B(JumpIfFalse), U8(31),
   /* 1518 E> */ B(StackCheck),
   /* 1555 S> */ B(Wide), B(Ldar), R16(128),
-  /* 1561 E> */ B(Add), R(1), U8(2),
+  /* 1561 E> */ B(Add), R(1), U8(1),
                 B(Wide), B(Mov), R16(1), R16(157),
                 B(Star), R(1),
   /* 1548 S> */ B(Wide), B(Ldar), R16(128),
-                B(Inc), U8(1),
+                B(Inc), U8(2),
                 B(Wide), B(Star), R16(128),
                 B(JumpLoop), U8(36), I8(0),
   /* 1567 S> */ B(Wide), B(Ldar), R16(128),
@@ -1097,17 +1097,17 @@
                 B(JumpIfNull), U8(72),
                 B(Wide), B(ToObject), R16(157),
                 B(Wide), B(ForInEnumerate), R16(157),
-                B(Wide), B(ForInPrepare), R16(158), U16(1),
+                B(Wide), B(ForInPrepare), R16(158), U16(0),
                 B(LdaZero),
                 B(Wide), B(Star), R16(161),
   /* 1526 S> */ B(Wide), B(ForInContinue), R16(161), R16(160),
                 B(JumpIfFalse), U8(45),
-                B(Wide), B(ForInNext), R16(157), R16(161), R16(158), U16(1),
+                B(Wide), B(ForInNext), R16(157), R16(161), R16(158), U16(0),
                 B(JumpIfUndefined), U8(22),
                 B(Wide), B(Star), R16(128),
   /* 1521 E> */ B(StackCheck),
   /* 1541 S> */ B(Wide), B(Ldar), R16(128),
-  /* 1547 E> */ B(Add), R(1), U8(0),
+  /* 1547 E> */ B(Add), R(1), U8(1),
                 B(Wide), B(Mov), R16(1), R16(162),
                 B(Star), R(1),
   /* 1544 E> */ B(Wide), B(ForInStep), R16(161),
diff --git a/src/v8/test/cctest/interpreter/generate-bytecode-expectations.cc b/src/v8/test/cctest/interpreter/generate-bytecode-expectations.cc
index 081be12..4064ea1 100644
--- a/src/v8/test/cctest/interpreter/generate-bytecode-expectations.cc
+++ b/src/v8/test/cctest/interpreter/generate-bytecode-expectations.cc
@@ -44,6 +44,8 @@
         top_level_(false),
         do_expressions_(false),
         async_iteration_(false),
+        public_fields_(false),
+        static_fields_(false),
         verbose_(false) {}
 
   bool Validate() const;
@@ -63,6 +65,8 @@
   bool top_level() const { return top_level_; }
   bool do_expressions() const { return do_expressions_; }
   bool async_iteration() const { return async_iteration_; }
+  bool public_fields() const { return public_fields_; }
+  bool static_fields() const { return static_fields_; }
   bool verbose() const { return verbose_; }
   bool suppress_runtime_errors() const { return rebaseline_ && !verbose_; }
   std::vector<std::string> input_filenames() const { return input_filenames_; }
@@ -80,6 +84,8 @@
   bool top_level_;
   bool do_expressions_;
   bool async_iteration_;
+  bool public_fields_;
+  bool static_fields_;
   bool verbose_;
   std::vector<std::string> input_filenames_;
   std::string output_filename_;
@@ -169,6 +175,10 @@
       options.do_expressions_ = true;
     } else if (strcmp(argv[i], "--async-iteration") == 0) {
       options.async_iteration_ = true;
+    } else if (strcmp(argv[i], "--public-fields") == 0) {
+      options.public_fields_ = true;
+    } else if (strcmp(argv[i], "--static-fields") == 0) {
+      options.static_fields_ = true;
     } else if (strcmp(argv[i], "--verbose") == 0) {
       options.verbose_ = true;
     } else if (strncmp(argv[i], "--output=", 9) == 0) {
@@ -273,6 +283,10 @@
       do_expressions_ = ParseBoolean(line.c_str() + 16);
     } else if (line.compare(0, 17, "async iteration: ") == 0) {
       async_iteration_ = ParseBoolean(line.c_str() + 17);
+    } else if (line.compare(0, 15, "public fields: ") == 0) {
+      public_fields_ = ParseBoolean(line.c_str() + 15);
+    } else if (line.compare(0, 15, "static fields: ") == 0) {
+      static_fields_ = ParseBoolean(line.c_str() + 15);
     } else if (line == "---") {
       break;
     } else if (line.empty()) {
@@ -296,12 +310,14 @@
   if (top_level_) stream << "\ntop level: yes";
   if (do_expressions_) stream << "\ndo expressions: yes";
   if (async_iteration_) stream << "\nasync iteration: yes";
+  if (public_fields_) stream << "\npublic fields: yes";
+  if (static_fields_) stream << "\nstatic fields: yes";
 
   stream << "\n\n";
 }
 
 V8InitializationScope::V8InitializationScope(const char* exec_path)
-    : platform_(v8::platform::CreateDefaultPlatform()) {
+    : platform_(v8::platform::NewDefaultPlatform()) {
   i::FLAG_always_opt = false;
   i::FLAG_allow_natives_syntax = true;
 
@@ -399,7 +415,8 @@
   }
 
   if (options.do_expressions()) i::FLAG_harmony_do_expressions = true;
-  if (options.async_iteration()) i::FLAG_harmony_async_iteration = true;
+  if (options.public_fields()) i::FLAG_harmony_public_fields = true;
+  if (options.static_fields()) i::FLAG_harmony_static_fields = true;
 
   stream << "#\n# Autogenerated by generate-bytecode-expectations.\n#\n\n";
   options.PrintHeader(stream);
@@ -408,7 +425,8 @@
   }
 
   i::FLAG_harmony_do_expressions = false;
-  i::FLAG_harmony_async_iteration = false;
+  i::FLAG_harmony_public_fields = false;
+  i::FLAG_harmony_static_fields = false;
 }
 
 bool WriteExpectationsFile(const std::vector<std::string>& snippet_list,
@@ -455,7 +473,8 @@
          "Specify the name of the test function.\n"
          "  --top-level   Process top level code, not the top-level function.\n"
          "  --do-expressions  Enable harmony_do_expressions flag.\n"
-         "  --async-iteration  Enable harmony_async_iteration flag.\n"
+         "  --public-fields  Enable harmony_public_fields flag.\n"
+         "  --static-fields  Enable harmony_static_fields flag.\n"
          "  --output=file.name\n"
          "      Specify the output file. If not specified, output goes to "
          "stdout.\n"
diff --git a/src/v8/test/cctest/interpreter/interpreter-tester.h b/src/v8/test/cctest/interpreter/interpreter-tester.h
index 8bc6e67..93e1d93 100644
--- a/src/v8/test/cctest/interpreter/interpreter-tester.h
+++ b/src/v8/test/cctest/interpreter/interpreter-tester.h
@@ -83,6 +83,11 @@
 
   static const char kFunctionName[];
 
+  // Expose raw RegisterList construction to tests.
+  static RegisterList NewRegisterList(int first_reg_index, int register_count) {
+    return RegisterList(first_reg_index, register_count);
+  }
+
  private:
   Isolate* isolate_;
   const char* source_;
diff --git a/src/v8/test/cctest/interpreter/source-position-matcher.cc b/src/v8/test/cctest/interpreter/source-position-matcher.cc
index 9cff95a..2fcc292 100644
--- a/src/v8/test/cctest/interpreter/source-position-matcher.cc
+++ b/src/v8/test/cctest/interpreter/source-position-matcher.cc
@@ -150,7 +150,7 @@
   for (size_t i = 0; i < original_positions->size(); ++i) {
     PositionTableEntry original = original_positions->at(i);
     PositionTableEntry optimized = original_positions->at(i);
-    CHECK(original.source_position > 0);
+    CHECK_GT(original.source_position, 0);
     if ((original.is_statement || optimized.is_statement) ||
         (original.source_position != optimized.source_position) ||
         (original.source_position < 0)) {
diff --git a/src/v8/test/cctest/interpreter/test-bytecode-generator.cc b/src/v8/test/cctest/interpreter/test-bytecode-generator.cc
index 50e7034..1db0f70 100644
--- a/src/v8/test/cctest/interpreter/test-bytecode-generator.cc
+++ b/src/v8/test/cctest/interpreter/test-bytecode-generator.cc
@@ -331,10 +331,6 @@
       "var a = 1.2; return 2.6;\n",
 
       "var a = 3.14; return 3.14;\n",
-
-      "var a;"                    //
-      REPEAT_256("\na = 1.414;")  //
-      " a = 3.14;\n",
   };
 
   CHECK(CompareTexts(BuildActual(printer, snippets),
@@ -950,25 +946,6 @@
                      LoadGolden("BasicLoops.golden")));
 }
 
-TEST(JumpsRequiringConstantWideOperands) {
-  InitializedIgnitionHandleScope scope;
-  BytecodeExpectationsPrinter printer(CcTest::isolate());
-  const char* snippets[] = {
-    REPEAT_256("var x = 0.1;\n")
-    REPEAT_32("var x = 0.2;\n")
-    REPEAT_16("var x = 0.3;\n")
-    REPEAT_8("var x = 0.4;\n")
-    "for (var i = 0; i < 3; i++) {\n"
-    "  if (i == 1) continue;\n"
-    "  if (i == 2) break;\n"
-    "}\n"
-    "return 3;\n",
-  };
-
-  CHECK(CompareTexts(BuildActual(printer, snippets),
-                     LoadGolden("JumpsRequiringConstantWideOperands.golden")));
-}
-
 TEST(UnaryOperators) {
   InitializedIgnitionHandleScope scope;
   BytecodeExpectationsPrinter printer(CcTest::isolate());
@@ -1197,20 +1174,6 @@
                      LoadGolden("RegExpLiterals.golden")));
 }
 
-TEST(RegExpLiteralsWide) {
-  InitializedIgnitionHandleScope scope;
-  BytecodeExpectationsPrinter printer(CcTest::isolate());
-
-  const char* snippets[] = {
-      "var a;"                   //
-      REPEAT_256("\na = 1.23;")  //
-      "\nreturn /ab+d/;\n",
-  };
-
-  CHECK(CompareTexts(BuildActual(printer, snippets),
-                     LoadGolden("RegExpLiteralsWide.golden")));
-}
-
 TEST(ArrayLiterals) {
   InitializedIgnitionHandleScope scope;
   BytecodeExpectationsPrinter printer(CcTest::isolate());
@@ -1229,20 +1192,6 @@
                      LoadGolden("ArrayLiterals.golden")));
 }
 
-TEST(ArrayLiteralsWide) {
-  InitializedIgnitionHandleScope scope;
-  BytecodeExpectationsPrinter printer(CcTest::isolate());
-
-  const char* snippets[] = {
-      "var a;"                   //
-      REPEAT_256("\na = 1.23;")  //
-      "\nreturn [ 1 , 2 ];\n",
-  };
-
-  CHECK(CompareTexts(BuildActual(printer, snippets),
-                     LoadGolden("ArrayLiteralsWide.golden")));
-}
-
 TEST(ObjectLiterals) {
   InitializedIgnitionHandleScope scope;
   BytecodeExpectationsPrinter printer(CcTest::isolate());
@@ -1283,19 +1232,6 @@
                      LoadGolden("ObjectLiterals.golden")));
 }
 
-TEST(ObjectLiteralsWide) {
-  InitializedIgnitionHandleScope scope;
-  BytecodeExpectationsPrinter printer(CcTest::isolate());
-  const char* snippets[] = {
-      "var a;"                   //
-      REPEAT_256("\na = 1.23;")  //
-      "\nreturn { name: 'string', val: 9.2 };\n",
-  };
-
-  CHECK(CompareTexts(BuildActual(printer, snippets),
-                     LoadGolden("ObjectLiteralsWide.golden")));
-}
-
 TEST(TopLevelObjectLiterals) {
   InitializedIgnitionHandleScope scope;
   BytecodeExpectationsPrinter printer(CcTest::isolate());
@@ -2016,41 +1952,6 @@
   CHECK(CompareTexts(actual, LoadGolden("LookupSlotInEval.golden")));
 }
 
-TEST(LookupSlotWideInEval) {
-  InitializedIgnitionHandleScope scope;
-  BytecodeExpectationsPrinter printer(CcTest::isolate());
-  printer.set_wrap(false);
-  printer.set_test_function_name("f");
-
-  const char* snippets[] = {
-      REPEAT_256("    \"var y = 2.3;\" +\n")  //
-      "    \"return x;\" +\n",
-
-      REPEAT_256("    \"var y = 2.3;\" +\n")  //
-      "    \"return typeof x;\" +\n",
-
-      REPEAT_256("    \"var y = 2.3;\" +\n")  //
-      "    \"x = 10;\" +\n",
-
-      "    \"'use strict';\" +\n"             //
-      REPEAT_256("    \"var y = 2.3;\" +\n")  //
-      "    \"x = 10;\" +\n",
-  };
-
-  std::string actual = BuildActual(printer, snippets,
-                                   "var f;\n"
-                                   "var x = 1;\n"
-                                   "function f1() {\n"
-                                   "  eval(\"function t() {\" +\n",
-
-                                   "  \"};\" +\n"
-                                   "  \"f = t; f();\"\n);\n"
-                                   "}\n"
-                                   "f1();");
-
-  CHECK(CompareTexts(actual, LoadGolden("LookupSlotWideInEval.golden")));
-}
-
 TEST(DeleteLookupSlotInEval) {
   InitializedIgnitionHandleScope scope;
   BytecodeExpectationsPrinter printer(CcTest::isolate());
@@ -2332,6 +2233,127 @@
                      LoadGolden("ClassAndSuperClass.golden")));
 }
 
+TEST(ClassFields) {
+  bool old_flag = i::FLAG_harmony_public_fields;
+  i::FLAG_harmony_public_fields = true;
+  InitializedIgnitionHandleScope scope;
+  BytecodeExpectationsPrinter printer(CcTest::isolate());
+
+  const char* snippets[] = {
+      "{\n"
+      "  class A {\n"
+      "    a;\n"
+      "    ['b'];\n"
+      "  }\n"
+      "\n"
+      "  class B {\n"
+      "    a = 1;\n"
+      "    ['b'] = this.a;\n"
+      "  }\n"
+      "  new A;\n"
+      "  new B;\n"
+      "}\n",
+
+      "{\n"
+      "  class A extends class {} {\n"
+      "    a;\n"
+      "    ['b'];\n"
+      "  }\n"
+      "\n"
+      "  class B extends class {} {\n"
+      "    a = 1;\n"
+      "    ['b'] = this.a;\n"
+      "    foo() { return 1; }\n"
+      "    constructor() {\n"
+      "      super();\n"
+      "    }\n"
+      "  }\n"
+      "\n"
+      "  class C extends B {\n"
+      "    a = 1;\n"
+      "    ['b'] = this.a;\n"
+      "    constructor() {\n"
+      "      (() => super())();\n"
+      "    }\n"
+      "  }\n"
+      "\n"
+      "  new A;\n"
+      "  new B;\n"
+      "  new C;\n"
+      "}\n"};
+
+  CHECK(CompareTexts(BuildActual(printer, snippets),
+                     LoadGolden("ClassFields.golden")));
+  i::FLAG_harmony_public_fields = old_flag;
+}
+
+TEST(StaticClassFields) {
+  bool old_flag = i::FLAG_harmony_public_fields;
+  bool old_static_flag = i::FLAG_harmony_static_fields;
+  i::FLAG_harmony_public_fields = true;
+  i::FLAG_harmony_static_fields = true;
+  InitializedIgnitionHandleScope scope;
+  BytecodeExpectationsPrinter printer(CcTest::isolate());
+
+  const char* snippets[] = {
+      "{\n"
+      "  class A {\n"
+      "    a;\n"
+      "    ['b'];\n"
+      "    static c;\n"
+      "    static ['d'];\n"
+      "  }\n"
+      "\n"
+      "  class B {\n"
+      "    a = 1;\n"
+      "    ['b'] = this.a;\n"
+      "    static c = 3;\n"
+      "    static ['d'] = this.c;\n"
+      "  }\n"
+      "  new A;\n"
+      "  new B;\n"
+      "}\n",
+
+      "{\n"
+      "  class A extends class {} {\n"
+      "    a;\n"
+      "    ['b'];\n"
+      "    static c;\n"
+      "    static ['d'];\n"
+      "  }\n"
+      "\n"
+      "  class B extends class {} {\n"
+      "    a = 1;\n"
+      "    ['b'] = this.a;\n"
+      "    static c = 3;\n"
+      "    static ['d'] = this.c;\n"
+      "    foo() { return 1; }\n"
+      "    constructor() {\n"
+      "      super();\n"
+      "    }\n"
+      "  }\n"
+      "\n"
+      "  class C extends B {\n"
+      "    a = 1;\n"
+      "    ['b'] = this.a;\n"
+      "    static c = 3;\n"
+      "    static ['d'] = super.foo();\n"
+      "    constructor() {\n"
+      "      (() => super())();\n"
+      "    }\n"
+      "  }\n"
+      "\n"
+      "  new A;\n"
+      "  new B;\n"
+      "  new C;\n"
+      "}\n"};
+
+  CHECK(CompareTexts(BuildActual(printer, snippets),
+                     LoadGolden("StaticClassFields.golden")));
+  i::FLAG_harmony_public_fields = old_flag;
+  i::FLAG_harmony_static_fields = old_static_flag;
+}
+
 TEST(Generators) {
   InitializedIgnitionHandleScope scope;
   BytecodeExpectationsPrinter printer(CcTest::isolate());
@@ -2358,8 +2380,6 @@
 }
 
 TEST(AsyncGenerators) {
-  bool old_flag = i::FLAG_harmony_async_iteration;
-  i::FLAG_harmony_async_iteration = true;
   InitializedIgnitionHandleScope scope;
   BytecodeExpectationsPrinter printer(CcTest::isolate());
   printer.set_wrap(false);
@@ -2382,7 +2402,6 @@
 
   CHECK(CompareTexts(BuildActual(printer, snippets),
                      LoadGolden("AsyncGenerators.golden")));
-  i::FLAG_harmony_async_iteration = old_flag;
 }
 
 TEST(Modules) {
@@ -2500,8 +2519,6 @@
 }
 
 TEST(ForAwaitOf) {
-  bool old_flag = i::FLAG_harmony_async_iteration;
-  i::FLAG_harmony_async_iteration = true;
   InitializedIgnitionHandleScope scope;
   BytecodeExpectationsPrinter printer(CcTest::isolate());
   printer.set_wrap(false);
@@ -2534,8 +2551,6 @@
 
   CHECK(CompareTexts(BuildActual(printer, snippets),
                      LoadGolden("ForAwaitOf.golden")));
-
-  i::FLAG_harmony_async_iteration = old_flag;
 }
 
 TEST(StandardForLoop) {
diff --git a/src/v8/test/cctest/interpreter/test-interpreter-intrinsics.cc b/src/v8/test/cctest/interpreter/test-interpreter-intrinsics.cc
index 8d1f551..b8ebef3 100644
--- a/src/v8/test/cctest/interpreter/test-interpreter-intrinsics.cc
+++ b/src/v8/test/cctest/interpreter/test-interpreter-intrinsics.cc
@@ -26,8 +26,9 @@
   template <class... A>
   Handle<Object> Invoke(A... args) {
     CHECK(IntrinsicsHelper::IsSupported(function_id_));
-    BytecodeArrayBuilder builder(isolate_, zone_, sizeof...(args), 0, 0);
-    RegisterList reg_list(builder.Receiver().index(), sizeof...(args));
+    BytecodeArrayBuilder builder(zone_, sizeof...(args), 0, 0);
+    RegisterList reg_list = InterpreterTester::NewRegisterList(
+        builder.Receiver().index(), sizeof...(args));
     builder.CallRuntime(function_id_, reg_list).Return();
     InterpreterTester tester(isolate_, builder.ToBytecodeArray(isolate_));
     auto callable = tester.GetCallable<A...>();
@@ -216,14 +217,6 @@
            *has_property_helper.Invoke(
                has_property_helper.NewObject("'y'"),
                has_property_helper.NewObject("({ x: 20 })")));
-
-  InvokeIntrinsicHelper sub_string_helper(isolate, handles.main_zone(),
-                                          Runtime::kInlineSubString);
-  CHECK(sub_string_helper
-            .Invoke(sub_string_helper.NewObject("'foobar'"),
-                    sub_string_helper.NewObject("3"),
-                    sub_string_helper.NewObject("6"))
-            ->SameValue(*sub_string_helper.NewObject("'bar'")));
 }
 
 TEST(ClassOf) {
diff --git a/src/v8/test/cctest/interpreter/test-interpreter.cc b/src/v8/test/cctest/interpreter/test-interpreter.cc
index e1134e8..cd77fd4 100644
--- a/src/v8/test/cctest/interpreter/test-interpreter.cc
+++ b/src/v8/test/cctest/interpreter/test-interpreter.cc
@@ -35,7 +35,7 @@
   Zone* zone = handles.main_zone();
   Handle<Object> undefined_value = isolate->factory()->undefined_value();
 
-  BytecodeArrayBuilder builder(isolate, zone, 1, 0);
+  BytecodeArrayBuilder builder(zone, 1, 0);
   builder.Return();
   Handle<BytecodeArray> bytecode_array = builder.ToBytecodeArray(isolate);
 
@@ -51,7 +51,7 @@
   Zone* zone = handles.main_zone();
   Handle<Object> undefined_value = isolate->factory()->undefined_value();
 
-  BytecodeArrayBuilder builder(isolate, zone, 1, 0);
+  BytecodeArrayBuilder builder(zone, 1, 0);
   builder.LoadUndefined().Return();
   Handle<BytecodeArray> bytecode_array = builder.ToBytecodeArray(isolate);
 
@@ -67,7 +67,7 @@
   Zone* zone = handles.main_zone();
   Handle<Object> null_value = isolate->factory()->null_value();
 
-  BytecodeArrayBuilder builder(isolate, zone, 1, 0);
+  BytecodeArrayBuilder builder(zone, 1, 0);
   builder.LoadNull().Return();
   Handle<BytecodeArray> bytecode_array = builder.ToBytecodeArray(isolate);
 
@@ -83,7 +83,7 @@
   Zone* zone = handles.main_zone();
   Handle<Object> the_hole_value = isolate->factory()->the_hole_value();
 
-  BytecodeArrayBuilder builder(isolate, zone, 1, 0);
+  BytecodeArrayBuilder builder(zone, 1, 0);
   builder.LoadTheHole().Return();
   Handle<BytecodeArray> bytecode_array = builder.ToBytecodeArray(isolate);
 
@@ -99,7 +99,7 @@
   Zone* zone = handles.main_zone();
   Handle<Object> true_value = isolate->factory()->true_value();
 
-  BytecodeArrayBuilder builder(isolate, zone, 1, 0);
+  BytecodeArrayBuilder builder(zone, 1, 0);
   builder.LoadTrue().Return();
   Handle<BytecodeArray> bytecode_array = builder.ToBytecodeArray(isolate);
 
@@ -115,7 +115,7 @@
   Zone* zone = handles.main_zone();
   Handle<Object> false_value = isolate->factory()->false_value();
 
-  BytecodeArrayBuilder builder(isolate, zone, 1, 0);
+  BytecodeArrayBuilder builder(zone, 1, 0);
   builder.LoadFalse().Return();
   Handle<BytecodeArray> bytecode_array = builder.ToBytecodeArray(isolate);
 
@@ -132,7 +132,7 @@
 
   // Small Smis.
   for (int i = -128; i < 128; i++) {
-    BytecodeArrayBuilder builder(isolate, zone, 1, 0);
+    BytecodeArrayBuilder builder(zone, 1, 0);
     builder.LoadLiteral(Smi::FromInt(i)).Return();
     Handle<BytecodeArray> bytecode_array = builder.ToBytecodeArray(isolate);
 
@@ -144,7 +144,7 @@
 
   // Large Smis.
   {
-    BytecodeArrayBuilder builder(isolate, zone, 1, 0);
+    BytecodeArrayBuilder builder(zone, 1, 0);
 
     builder.LoadLiteral(Smi::FromInt(0x12345678)).Return();
     Handle<BytecodeArray> bytecode_array = builder.ToBytecodeArray(isolate);
@@ -160,9 +160,9 @@
     AstValueFactory ast_factory(zone, isolate->ast_string_constants(),
                                 isolate->heap()->HashSeed());
 
-    BytecodeArrayBuilder builder(isolate, zone, 1, 0);
+    BytecodeArrayBuilder builder(zone, 1, 0);
 
-    builder.LoadLiteral(ast_factory.NewNumber(-2.1e19)).Return();
+    builder.LoadLiteral(-2.1e19).Return();
 
     ast_factory.Internalize(isolate);
     Handle<BytecodeArray> bytecode_array = builder.ToBytecodeArray(isolate);
@@ -178,7 +178,7 @@
     AstValueFactory ast_factory(zone, isolate->ast_string_constants(),
                                 isolate->heap()->HashSeed());
 
-    BytecodeArrayBuilder builder(isolate, zone, 1, 0);
+    BytecodeArrayBuilder builder(zone, 1, 0);
 
     const AstRawString* raw_string = ast_factory.GetOneByteString("String");
     builder.LoadLiteral(raw_string).Return();
@@ -199,7 +199,7 @@
   Zone* zone = handles.main_zone();
   Handle<Object> true_value = isolate->factory()->true_value();
   for (int i = 0; i <= kMaxInt8; i++) {
-    BytecodeArrayBuilder builder(isolate, zone, 1, i + 1);
+    BytecodeArrayBuilder builder(zone, 1, i + 1);
 
     Register reg(i);
     builder.LoadTrue()
@@ -282,10 +282,10 @@
         Isolate* isolate = handles.main_isolate();
         Zone* zone = handles.main_zone();
         Factory* factory = isolate->factory();
-        BytecodeArrayBuilder builder(isolate, zone, 1, 1);
-
         FeedbackVectorSpec feedback_spec(zone);
-        FeedbackSlot slot = feedback_spec.AddInterpreterBinaryOpICSlot();
+        BytecodeArrayBuilder builder(zone, 1, 1, &feedback_spec);
+
+        FeedbackSlot slot = feedback_spec.AddBinaryOpICSlot();
         Handle<i::FeedbackMetadata> metadata =
             NewFeedbackMetadata(isolate, &feedback_spec);
 
@@ -320,10 +320,10 @@
         Isolate* isolate = handles.main_isolate();
         Zone* zone = handles.main_zone();
         Factory* factory = isolate->factory();
-        BytecodeArrayBuilder builder(isolate, zone, 1, 1);
-
         FeedbackVectorSpec feedback_spec(zone);
-        FeedbackSlot slot = feedback_spec.AddInterpreterBinaryOpICSlot();
+        BytecodeArrayBuilder builder(zone, 1, 1, &feedback_spec);
+
+        FeedbackSlot slot = feedback_spec.AddBinaryOpICSlot();
         Handle<i::FeedbackMetadata> metadata =
             NewFeedbackMetadata(isolate, &feedback_spec);
 
@@ -359,24 +359,21 @@
         Isolate* isolate = handles.main_isolate();
         Zone* zone = handles.main_zone();
         Factory* factory = isolate->factory();
-        AstValueFactory ast_factory(zone, isolate->ast_string_constants(),
-                                    isolate->heap()->HashSeed());
-        BytecodeArrayBuilder builder(isolate, zone, 1, 1);
-
         FeedbackVectorSpec feedback_spec(zone);
-        FeedbackSlot slot = feedback_spec.AddInterpreterBinaryOpICSlot();
+        BytecodeArrayBuilder builder(zone, 1, 1, &feedback_spec);
+
+        FeedbackSlot slot = feedback_spec.AddBinaryOpICSlot();
         Handle<i::FeedbackMetadata> metadata =
             NewFeedbackMetadata(isolate, &feedback_spec);
 
         Register reg(0);
         double lhs = lhs_inputs[l];
         double rhs = rhs_inputs[r];
-        builder.LoadLiteral(ast_factory.NewNumber(lhs))
+        builder.LoadLiteral(lhs)
             .StoreAccumulatorInRegister(reg)
-            .LoadLiteral(ast_factory.NewNumber(rhs))
+            .LoadLiteral(rhs)
             .BinaryOperation(kArithmeticOperators[o], reg, GetIndex(slot))
             .Return();
-        ast_factory.Internalize(isolate);
         Handle<BytecodeArray> bytecode_array = builder.ToBytecodeArray(isolate);
 
         InterpreterTester tester(isolate, bytecode_array, metadata);
@@ -390,6 +387,97 @@
   }
 }
 
+TEST(InterpreterBinaryOpsBigInt) {
+  // This test only checks that the recorded type feedback is kBigInt.
+  AstBigInt inputs[] = {AstBigInt("1"), AstBigInt("-42"), AstBigInt("0xFFFF")};
+  for (size_t l = 0; l < arraysize(inputs); l++) {
+    for (size_t r = 0; r < arraysize(inputs); r++) {
+      for (size_t o = 0; o < arraysize(kArithmeticOperators); o++) {
+        // Skip over unsigned right shift.
+        if (kArithmeticOperators[o] == Token::Value::SHR) continue;
+
+        HandleAndZoneScope handles;
+        Isolate* isolate = handles.main_isolate();
+        Zone* zone = handles.main_zone();
+        FeedbackVectorSpec feedback_spec(zone);
+        BytecodeArrayBuilder builder(zone, 1, 1, &feedback_spec);
+
+        FeedbackSlot slot = feedback_spec.AddBinaryOpICSlot();
+        Handle<i::FeedbackMetadata> metadata =
+            NewFeedbackMetadata(isolate, &feedback_spec);
+
+        Register reg(0);
+        auto lhs = inputs[l];
+        auto rhs = inputs[r];
+        builder.LoadLiteral(lhs)
+            .StoreAccumulatorInRegister(reg)
+            .LoadLiteral(rhs)
+            .BinaryOperation(kArithmeticOperators[o], reg, GetIndex(slot))
+            .Return();
+        Handle<BytecodeArray> bytecode_array = builder.ToBytecodeArray(isolate);
+
+        InterpreterTester tester(isolate, bytecode_array, metadata);
+        auto callable = tester.GetCallable<>();
+        Handle<Object> return_value = callable().ToHandleChecked();
+        CHECK(return_value->IsBigInt());
+        Object* feedback = callable.vector()->Get(slot);
+        CHECK(feedback->IsSmi());
+        CHECK_EQ(BinaryOperationFeedback::kBigInt,
+                 static_cast<Smi*>(feedback)->value());
+      }
+    }
+  }
+}
+
+namespace {
+
+struct LiteralForTest {
+  enum Type { kString, kHeapNumber, kSmi, kTrue, kFalse, kUndefined, kNull };
+
+  explicit LiteralForTest(const AstRawString* string)
+      : type(kString), string(string) {}
+  explicit LiteralForTest(double number) : type(kHeapNumber), number(number) {}
+  explicit LiteralForTest(int smi) : type(kSmi), smi(smi) {}
+  explicit LiteralForTest(Type type) : type(type) {}
+
+  Type type;
+  union {
+    const AstRawString* string;
+    double number;
+    int smi;
+  };
+};
+
+void LoadLiteralForTest(BytecodeArrayBuilder* builder,
+                        const LiteralForTest& value) {
+  switch (value.type) {
+    case LiteralForTest::kString:
+      builder->LoadLiteral(value.string);
+      return;
+    case LiteralForTest::kHeapNumber:
+      builder->LoadLiteral(value.number);
+      return;
+    case LiteralForTest::kSmi:
+      builder->LoadLiteral(Smi::FromInt(value.smi));
+      return;
+    case LiteralForTest::kTrue:
+      builder->LoadTrue();
+      return;
+    case LiteralForTest::kFalse:
+      builder->LoadFalse();
+      return;
+    case LiteralForTest::kUndefined:
+      builder->LoadUndefined();
+      return;
+    case LiteralForTest::kNull:
+      builder->LoadNull();
+      return;
+  }
+  UNREACHABLE();
+}
+
+}  // anonymous namespace
+
 TEST(InterpreterStringAdd) {
   HandleAndZoneScope handles;
   Isolate* isolate = handles.main_isolate();
@@ -400,53 +488,51 @@
 
   struct TestCase {
     const AstRawString* lhs;
-    const AstValue* rhs;
+    LiteralForTest rhs;
     Handle<Object> expected_value;
     int32_t expected_feedback;
   } test_cases[] = {
       {ast_factory.GetOneByteString("a"),
-       ast_factory.NewString(ast_factory.GetOneByteString("b")),
+       LiteralForTest(ast_factory.GetOneByteString("b")),
        factory->NewStringFromStaticChars("ab"),
        BinaryOperationFeedback::kString},
       {ast_factory.GetOneByteString("aaaaaa"),
-       ast_factory.NewString(ast_factory.GetOneByteString("b")),
+       LiteralForTest(ast_factory.GetOneByteString("b")),
        factory->NewStringFromStaticChars("aaaaaab"),
        BinaryOperationFeedback::kString},
       {ast_factory.GetOneByteString("aaa"),
-       ast_factory.NewString(ast_factory.GetOneByteString("bbbbb")),
+       LiteralForTest(ast_factory.GetOneByteString("bbbbb")),
        factory->NewStringFromStaticChars("aaabbbbb"),
        BinaryOperationFeedback::kString},
       {ast_factory.GetOneByteString(""),
-       ast_factory.NewString(ast_factory.GetOneByteString("b")),
+       LiteralForTest(ast_factory.GetOneByteString("b")),
        factory->NewStringFromStaticChars("b"),
        BinaryOperationFeedback::kString},
       {ast_factory.GetOneByteString("a"),
-       ast_factory.NewString(ast_factory.GetOneByteString("")),
+       LiteralForTest(ast_factory.GetOneByteString("")),
        factory->NewStringFromStaticChars("a"),
        BinaryOperationFeedback::kString},
-      {ast_factory.GetOneByteString("1.11"), ast_factory.NewNumber(2.5),
+      {ast_factory.GetOneByteString("1.11"), LiteralForTest(2.5),
        factory->NewStringFromStaticChars("1.112.5"),
        BinaryOperationFeedback::kAny},
-      {ast_factory.GetOneByteString("-1.11"), ast_factory.NewNumber(2.56),
+      {ast_factory.GetOneByteString("-1.11"), LiteralForTest(2.56),
        factory->NewStringFromStaticChars("-1.112.56"),
        BinaryOperationFeedback::kAny},
-      {ast_factory.GetOneByteString(""), ast_factory.NewNumber(2.5),
+      {ast_factory.GetOneByteString(""), LiteralForTest(2.5),
        factory->NewStringFromStaticChars("2.5"), BinaryOperationFeedback::kAny},
   };
 
   for (size_t i = 0; i < arraysize(test_cases); i++) {
-    BytecodeArrayBuilder builder(isolate, zone, 1, 1);
     FeedbackVectorSpec feedback_spec(zone);
-    FeedbackSlot slot = feedback_spec.AddInterpreterBinaryOpICSlot();
+    BytecodeArrayBuilder builder(zone, 1, 1, &feedback_spec);
+    FeedbackSlot slot = feedback_spec.AddBinaryOpICSlot();
     Handle<i::FeedbackMetadata> metadata =
         NewFeedbackMetadata(isolate, &feedback_spec);
 
     Register reg(0);
-    builder.LoadLiteral(test_cases[i].lhs)
-        .StoreAccumulatorInRegister(reg)
-        .LoadLiteral(test_cases[i].rhs)
-        .BinaryOperation(Token::Value::ADD, reg, GetIndex(slot))
-        .Return();
+    builder.LoadLiteral(test_cases[i].lhs).StoreAccumulatorInRegister(reg);
+    LoadLiteralForTest(&builder, test_cases[i].rhs);
+    builder.BinaryOperation(Token::Value::ADD, reg, GetIndex(slot)).Return();
     ast_factory.Internalize(isolate);
     Handle<BytecodeArray> bytecode_array = builder.ToBytecodeArray(isolate);
 
@@ -466,7 +552,7 @@
   HandleAndZoneScope handles;
   Isolate* isolate = handles.main_isolate();
   Zone* zone = handles.main_zone();
-  BytecodeArrayBuilder builder(isolate, zone, 1, 0);
+  BytecodeArrayBuilder builder(zone, 1, 0);
 
   builder.LoadAccumulatorWithRegister(builder.Receiver()).Return();
   Handle<BytecodeArray> bytecode_array = builder.ToBytecodeArray(isolate);
@@ -491,16 +577,16 @@
   Zone* zone = handles.main_zone();
   AstValueFactory ast_factory(zone, isolate->ast_string_constants(),
                               isolate->heap()->HashSeed());
-  BytecodeArrayBuilder builder(isolate, zone, 8, 0);
-
   FeedbackVectorSpec feedback_spec(zone);
-  FeedbackSlot slot = feedback_spec.AddInterpreterBinaryOpICSlot();
-  FeedbackSlot slot1 = feedback_spec.AddInterpreterBinaryOpICSlot();
-  FeedbackSlot slot2 = feedback_spec.AddInterpreterBinaryOpICSlot();
-  FeedbackSlot slot3 = feedback_spec.AddInterpreterBinaryOpICSlot();
-  FeedbackSlot slot4 = feedback_spec.AddInterpreterBinaryOpICSlot();
-  FeedbackSlot slot5 = feedback_spec.AddInterpreterBinaryOpICSlot();
-  FeedbackSlot slot6 = feedback_spec.AddInterpreterBinaryOpICSlot();
+  BytecodeArrayBuilder builder(zone, 8, 0, &feedback_spec);
+
+  FeedbackSlot slot = feedback_spec.AddBinaryOpICSlot();
+  FeedbackSlot slot1 = feedback_spec.AddBinaryOpICSlot();
+  FeedbackSlot slot2 = feedback_spec.AddBinaryOpICSlot();
+  FeedbackSlot slot3 = feedback_spec.AddBinaryOpICSlot();
+  FeedbackSlot slot4 = feedback_spec.AddBinaryOpICSlot();
+  FeedbackSlot slot5 = feedback_spec.AddBinaryOpICSlot();
+  FeedbackSlot slot6 = feedback_spec.AddBinaryOpICSlot();
 
   Handle<i::FeedbackMetadata> metadata =
       NewFeedbackMetadata(isolate, &feedback_spec);
@@ -545,125 +631,114 @@
 
   struct BinaryOpExpectation {
     Token::Value op;
-    const AstValue* arg1;
-    const AstValue* arg2;
+    LiteralForTest arg1;
+    LiteralForTest arg2;
     Handle<Object> result;
     int32_t feedback;
   };
 
   BinaryOpExpectation const kTestCases[] = {
       // ADD
-      {Token::Value::ADD, ast_factory.NewSmi(2), ast_factory.NewSmi(3),
+      {Token::Value::ADD, LiteralForTest(2), LiteralForTest(3),
        Handle<Smi>(Smi::FromInt(5), isolate),
        BinaryOperationFeedback::kSignedSmall},
-      {Token::Value::ADD, ast_factory.NewSmi(Smi::kMaxValue),
-       ast_factory.NewSmi(1),
+      {Token::Value::ADD, LiteralForTest(Smi::kMaxValue), LiteralForTest(1),
        isolate->factory()->NewHeapNumber(Smi::kMaxValue + 1.0),
        BinaryOperationFeedback::kNumber},
-      {Token::Value::ADD, ast_factory.NewNumber(3.1415), ast_factory.NewSmi(3),
+      {Token::Value::ADD, LiteralForTest(3.1415), LiteralForTest(3),
        isolate->factory()->NewHeapNumber(3.1415 + 3),
        BinaryOperationFeedback::kNumber},
-      {Token::Value::ADD, ast_factory.NewNumber(3.1415),
-       ast_factory.NewNumber(1.4142),
+      {Token::Value::ADD, LiteralForTest(3.1415), LiteralForTest(1.4142),
        isolate->factory()->NewHeapNumber(3.1415 + 1.4142),
        BinaryOperationFeedback::kNumber},
-      {Token::Value::ADD,
-       ast_factory.NewString(ast_factory.GetOneByteString("foo")),
-       ast_factory.NewString(ast_factory.GetOneByteString("bar")),
+      {Token::Value::ADD, LiteralForTest(ast_factory.GetOneByteString("foo")),
+       LiteralForTest(ast_factory.GetOneByteString("bar")),
        isolate->factory()->NewStringFromAsciiChecked("foobar"),
        BinaryOperationFeedback::kString},
-      {Token::Value::ADD, ast_factory.NewSmi(2),
-       ast_factory.NewString(ast_factory.GetOneByteString("2")),
+      {Token::Value::ADD, LiteralForTest(2),
+       LiteralForTest(ast_factory.GetOneByteString("2")),
        isolate->factory()->NewStringFromAsciiChecked("22"),
        BinaryOperationFeedback::kAny},
       // SUB
-      {Token::Value::SUB, ast_factory.NewSmi(2), ast_factory.NewSmi(3),
+      {Token::Value::SUB, LiteralForTest(2), LiteralForTest(3),
        Handle<Smi>(Smi::FromInt(-1), isolate),
        BinaryOperationFeedback::kSignedSmall},
-      {Token::Value::SUB,
-       ast_factory.NewSmi(static_cast<uint32_t>(Smi::kMinValue)),
-       ast_factory.NewSmi(1),
+      {Token::Value::SUB, LiteralForTest(Smi::kMinValue), LiteralForTest(1),
        isolate->factory()->NewHeapNumber(Smi::kMinValue - 1.0),
        BinaryOperationFeedback::kNumber},
-      {Token::Value::SUB, ast_factory.NewNumber(3.1415), ast_factory.NewSmi(3),
+      {Token::Value::SUB, LiteralForTest(3.1415), LiteralForTest(3),
        isolate->factory()->NewHeapNumber(3.1415 - 3),
        BinaryOperationFeedback::kNumber},
-      {Token::Value::SUB, ast_factory.NewNumber(3.1415),
-       ast_factory.NewNumber(1.4142),
+      {Token::Value::SUB, LiteralForTest(3.1415), LiteralForTest(1.4142),
        isolate->factory()->NewHeapNumber(3.1415 - 1.4142),
        BinaryOperationFeedback::kNumber},
-      {Token::Value::SUB, ast_factory.NewSmi(2),
-       ast_factory.NewString(ast_factory.GetOneByteString("1")),
+      {Token::Value::SUB, LiteralForTest(2),
+       LiteralForTest(ast_factory.GetOneByteString("1")),
        Handle<Smi>(Smi::FromInt(1), isolate), BinaryOperationFeedback::kAny},
       // MUL
-      {Token::Value::MUL, ast_factory.NewSmi(2), ast_factory.NewSmi(3),
+      {Token::Value::MUL, LiteralForTest(2), LiteralForTest(3),
        Handle<Smi>(Smi::FromInt(6), isolate),
        BinaryOperationFeedback::kSignedSmall},
-      {Token::Value::MUL,
-       ast_factory.NewSmi(static_cast<uint32_t>(Smi::kMinValue)),
-       ast_factory.NewSmi(2),
+      {Token::Value::MUL, LiteralForTest(Smi::kMinValue), LiteralForTest(2),
        isolate->factory()->NewHeapNumber(Smi::kMinValue * 2.0),
        BinaryOperationFeedback::kNumber},
-      {Token::Value::MUL, ast_factory.NewNumber(3.1415), ast_factory.NewSmi(3),
+      {Token::Value::MUL, LiteralForTest(3.1415), LiteralForTest(3),
        isolate->factory()->NewHeapNumber(3 * 3.1415),
        BinaryOperationFeedback::kNumber},
-      {Token::Value::MUL, ast_factory.NewNumber(3.1415),
-       ast_factory.NewNumber(1.4142),
+      {Token::Value::MUL, LiteralForTest(3.1415), LiteralForTest(1.4142),
        isolate->factory()->NewHeapNumber(3.1415 * 1.4142),
        BinaryOperationFeedback::kNumber},
-      {Token::Value::MUL, ast_factory.NewSmi(2),
-       ast_factory.NewString(ast_factory.GetOneByteString("1")),
+      {Token::Value::MUL, LiteralForTest(2),
+       LiteralForTest(ast_factory.GetOneByteString("1")),
        Handle<Smi>(Smi::FromInt(2), isolate), BinaryOperationFeedback::kAny},
       // DIV
-      {Token::Value::DIV, ast_factory.NewSmi(6), ast_factory.NewSmi(3),
+      {Token::Value::DIV, LiteralForTest(6), LiteralForTest(3),
        Handle<Smi>(Smi::FromInt(2), isolate),
        BinaryOperationFeedback::kSignedSmall},
-      {Token::Value::DIV, ast_factory.NewSmi(3), ast_factory.NewSmi(2),
+      {Token::Value::DIV, LiteralForTest(3), LiteralForTest(2),
        isolate->factory()->NewHeapNumber(3.0 / 2.0),
        BinaryOperationFeedback::kSignedSmallInputs},
-      {Token::Value::DIV, ast_factory.NewNumber(3.1415), ast_factory.NewSmi(3),
+      {Token::Value::DIV, LiteralForTest(3.1415), LiteralForTest(3),
        isolate->factory()->NewHeapNumber(3.1415 / 3),
        BinaryOperationFeedback::kNumber},
-      {Token::Value::DIV, ast_factory.NewNumber(3.1415),
-       ast_factory.NewNumber(-std::numeric_limits<double>::infinity()),
+      {Token::Value::DIV, LiteralForTest(3.1415),
+       LiteralForTest(-std::numeric_limits<double>::infinity()),
        isolate->factory()->NewHeapNumber(-0.0),
        BinaryOperationFeedback::kNumber},
-      {Token::Value::DIV, ast_factory.NewSmi(2),
-       ast_factory.NewString(ast_factory.GetOneByteString("1")),
+      {Token::Value::DIV, LiteralForTest(2),
+       LiteralForTest(ast_factory.GetOneByteString("1")),
        Handle<Smi>(Smi::FromInt(2), isolate), BinaryOperationFeedback::kAny},
       // MOD
-      {Token::Value::MOD, ast_factory.NewSmi(5), ast_factory.NewSmi(3),
+      {Token::Value::MOD, LiteralForTest(5), LiteralForTest(3),
        Handle<Smi>(Smi::FromInt(2), isolate),
        BinaryOperationFeedback::kSignedSmall},
-      {Token::Value::MOD, ast_factory.NewSmi(static_cast<uint32_t>(-4)),
-       ast_factory.NewSmi(2), isolate->factory()->NewHeapNumber(-0.0),
+      {Token::Value::MOD, LiteralForTest(-4), LiteralForTest(2),
+       isolate->factory()->NewHeapNumber(-0.0),
        BinaryOperationFeedback::kNumber},
-      {Token::Value::MOD, ast_factory.NewNumber(3.1415), ast_factory.NewSmi(3),
+      {Token::Value::MOD, LiteralForTest(3.1415), LiteralForTest(3),
        isolate->factory()->NewHeapNumber(fmod(3.1415, 3.0)),
        BinaryOperationFeedback::kNumber},
-      {Token::Value::MOD, ast_factory.NewNumber(-3.1415),
-       ast_factory.NewNumber(-1.4142),
+      {Token::Value::MOD, LiteralForTest(-3.1415), LiteralForTest(-1.4142),
        isolate->factory()->NewHeapNumber(fmod(-3.1415, -1.4142)),
        BinaryOperationFeedback::kNumber},
-      {Token::Value::MOD, ast_factory.NewSmi(3),
-       ast_factory.NewString(ast_factory.GetOneByteString("-2")),
+      {Token::Value::MOD, LiteralForTest(3),
+       LiteralForTest(ast_factory.GetOneByteString("-2")),
        Handle<Smi>(Smi::FromInt(1), isolate), BinaryOperationFeedback::kAny}};
 
   for (const BinaryOpExpectation& test_case : kTestCases) {
-    BytecodeArrayBuilder builder(isolate, zone, 1, 1);
-
     i::FeedbackVectorSpec feedback_spec(zone);
-    i::FeedbackSlot slot0 = feedback_spec.AddInterpreterBinaryOpICSlot();
+    BytecodeArrayBuilder builder(zone, 1, 1, &feedback_spec);
+
+    i::FeedbackSlot slot0 = feedback_spec.AddBinaryOpICSlot();
 
     Handle<i::FeedbackMetadata> metadata =
         i::NewFeedbackMetadata(isolate, &feedback_spec);
 
     Register reg(0);
-    builder.LoadLiteral(test_case.arg1)
-        .StoreAccumulatorInRegister(reg)
-        .LoadLiteral(test_case.arg2)
-        .BinaryOperation(test_case.op, reg, GetIndex(slot0))
-        .Return();
+    LoadLiteralForTest(&builder, test_case.arg1);
+    builder.StoreAccumulatorInRegister(reg);
+    LoadLiteralForTest(&builder, test_case.arg2);
+    builder.BinaryOperation(test_case.op, reg, GetIndex(slot0)).Return();
 
     ast_factory.Internalize(isolate);
     Handle<BytecodeArray> bytecode_array = builder.ToBytecodeArray(isolate);
@@ -688,7 +763,7 @@
 
   struct BinaryOpExpectation {
     Token::Value op;
-    const AstValue* arg1;
+    LiteralForTest arg1;
     int32_t arg2;
     Handle<Object> result;
     int32_t feedback;
@@ -696,84 +771,77 @@
 
   BinaryOpExpectation const kTestCases[] = {
       // ADD
-      {Token::Value::ADD, ast_factory.NewSmi(2), 42,
+      {Token::Value::ADD, LiteralForTest(2), 42,
        Handle<Smi>(Smi::FromInt(44), isolate),
        BinaryOperationFeedback::kSignedSmall},
-      {Token::Value::ADD, ast_factory.NewSmi(2), Smi::kMaxValue,
+      {Token::Value::ADD, LiteralForTest(2), Smi::kMaxValue,
        isolate->factory()->NewHeapNumber(Smi::kMaxValue + 2.0),
        BinaryOperationFeedback::kNumber},
-      {Token::Value::ADD, ast_factory.NewNumber(3.1415), 2,
+      {Token::Value::ADD, LiteralForTest(3.1415), 2,
        isolate->factory()->NewHeapNumber(3.1415 + 2.0),
        BinaryOperationFeedback::kNumber},
-      {Token::Value::ADD,
-       ast_factory.NewString(ast_factory.GetOneByteString("2")), 2,
+      {Token::Value::ADD, LiteralForTest(ast_factory.GetOneByteString("2")), 2,
        isolate->factory()->NewStringFromAsciiChecked("22"),
        BinaryOperationFeedback::kAny},
       // SUB
-      {Token::Value::SUB, ast_factory.NewSmi(2), 42,
+      {Token::Value::SUB, LiteralForTest(2), 42,
        Handle<Smi>(Smi::FromInt(-40), isolate),
        BinaryOperationFeedback::kSignedSmall},
-      {Token::Value::SUB,
-       ast_factory.NewSmi(static_cast<uint32_t>(Smi::kMinValue)), 1,
+      {Token::Value::SUB, LiteralForTest(Smi::kMinValue), 1,
        isolate->factory()->NewHeapNumber(Smi::kMinValue - 1.0),
        BinaryOperationFeedback::kNumber},
-      {Token::Value::SUB, ast_factory.NewNumber(3.1415), 2,
+      {Token::Value::SUB, LiteralForTest(3.1415), 2,
        isolate->factory()->NewHeapNumber(3.1415 - 2.0),
        BinaryOperationFeedback::kNumber},
-      {Token::Value::SUB,
-       ast_factory.NewString(ast_factory.GetOneByteString("2")), 2,
+      {Token::Value::SUB, LiteralForTest(ast_factory.GetOneByteString("2")), 2,
        Handle<Smi>(Smi::kZero, isolate), BinaryOperationFeedback::kAny},
       // BIT_OR
-      {Token::Value::BIT_OR, ast_factory.NewSmi(4), 1,
+      {Token::Value::BIT_OR, LiteralForTest(4), 1,
        Handle<Smi>(Smi::FromInt(5), isolate),
        BinaryOperationFeedback::kSignedSmall},
-      {Token::Value::BIT_OR, ast_factory.NewNumber(3.1415), 8,
+      {Token::Value::BIT_OR, LiteralForTest(3.1415), 8,
        Handle<Smi>(Smi::FromInt(11), isolate),
        BinaryOperationFeedback::kNumber},
-      {Token::Value::BIT_OR,
-       ast_factory.NewString(ast_factory.GetOneByteString("2")), 1,
-       Handle<Smi>(Smi::FromInt(3), isolate), BinaryOperationFeedback::kAny},
+      {Token::Value::BIT_OR, LiteralForTest(ast_factory.GetOneByteString("2")),
+       1, Handle<Smi>(Smi::FromInt(3), isolate), BinaryOperationFeedback::kAny},
       // BIT_AND
-      {Token::Value::BIT_AND, ast_factory.NewSmi(3), 1,
+      {Token::Value::BIT_AND, LiteralForTest(3), 1,
        Handle<Smi>(Smi::FromInt(1), isolate),
        BinaryOperationFeedback::kSignedSmall},
-      {Token::Value::BIT_AND, ast_factory.NewNumber(3.1415), 2,
+      {Token::Value::BIT_AND, LiteralForTest(3.1415), 2,
        Handle<Smi>(Smi::FromInt(2), isolate), BinaryOperationFeedback::kNumber},
-      {Token::Value::BIT_AND,
-       ast_factory.NewString(ast_factory.GetOneByteString("2")), 1,
-       Handle<Smi>(Smi::kZero, isolate), BinaryOperationFeedback::kAny},
+      {Token::Value::BIT_AND, LiteralForTest(ast_factory.GetOneByteString("2")),
+       1, Handle<Smi>(Smi::kZero, isolate), BinaryOperationFeedback::kAny},
       // SHL
-      {Token::Value::SHL, ast_factory.NewSmi(3), 1,
+      {Token::Value::SHL, LiteralForTest(3), 1,
        Handle<Smi>(Smi::FromInt(6), isolate),
        BinaryOperationFeedback::kSignedSmall},
-      {Token::Value::SHL, ast_factory.NewNumber(3.1415), 2,
+      {Token::Value::SHL, LiteralForTest(3.1415), 2,
        Handle<Smi>(Smi::FromInt(12), isolate),
        BinaryOperationFeedback::kNumber},
-      {Token::Value::SHL,
-       ast_factory.NewString(ast_factory.GetOneByteString("2")), 1,
+      {Token::Value::SHL, LiteralForTest(ast_factory.GetOneByteString("2")), 1,
        Handle<Smi>(Smi::FromInt(4), isolate), BinaryOperationFeedback::kAny},
       // SAR
-      {Token::Value::SAR, ast_factory.NewSmi(3), 1,
+      {Token::Value::SAR, LiteralForTest(3), 1,
        Handle<Smi>(Smi::FromInt(1), isolate),
        BinaryOperationFeedback::kSignedSmall},
-      {Token::Value::SAR, ast_factory.NewNumber(3.1415), 2,
+      {Token::Value::SAR, LiteralForTest(3.1415), 2,
        Handle<Smi>(Smi::kZero, isolate), BinaryOperationFeedback::kNumber},
-      {Token::Value::SAR,
-       ast_factory.NewString(ast_factory.GetOneByteString("2")), 1,
+      {Token::Value::SAR, LiteralForTest(ast_factory.GetOneByteString("2")), 1,
        Handle<Smi>(Smi::FromInt(1), isolate), BinaryOperationFeedback::kAny}};
 
   for (const BinaryOpExpectation& test_case : kTestCases) {
-    BytecodeArrayBuilder builder(isolate, zone, 1, 1);
-
     i::FeedbackVectorSpec feedback_spec(zone);
-    i::FeedbackSlot slot0 = feedback_spec.AddInterpreterBinaryOpICSlot();
+    BytecodeArrayBuilder builder(zone, 1, 1, &feedback_spec);
+
+    i::FeedbackSlot slot0 = feedback_spec.AddBinaryOpICSlot();
 
     Handle<i::FeedbackMetadata> metadata =
         i::NewFeedbackMetadata(isolate, &feedback_spec);
 
     Register reg(0);
-    builder.LoadLiteral(test_case.arg1)
-        .StoreAccumulatorInRegister(reg)
+    LoadLiteralForTest(&builder, test_case.arg1);
+    builder.StoreAccumulatorInRegister(reg)
         .LoadLiteral(Smi::FromInt(test_case.arg2))
         .BinaryOperation(test_case.op, reg, GetIndex(slot0))
         .Return();
@@ -801,6 +869,8 @@
   Handle<Smi> smi_max = Handle<Smi>(Smi::FromInt(Smi::kMaxValue), isolate);
   Handle<Smi> smi_min = Handle<Smi>(Smi::FromInt(Smi::kMinValue), isolate);
   Handle<HeapNumber> number = isolate->factory()->NewHeapNumber(2.1);
+  Handle<BigInt> bigint =
+      BigInt::FromNumber(isolate, smi_max).ToHandleChecked();
   Handle<String> str = isolate->factory()->NewStringFromAsciiChecked("42");
 
   struct TestCase {
@@ -808,19 +878,23 @@
     Handle<Smi> smi_feedback_value;
     Handle<Smi> smi_to_number_feedback_value;
     Handle<HeapNumber> number_feedback_value;
+    Handle<BigInt> bigint_feedback_value;
     Handle<Object> any_feedback_value;
   };
   TestCase const kTestCases[] = {
-      {Token::Value::INC, smi_one, smi_max, number, str},
-      {Token::Value::DEC, smi_one, smi_min, number, str}};
+      // Testing ADD and BIT_NOT would require generalizing the test setup.
+      {Token::Value::SUB, smi_one, smi_min, number, bigint, str},
+      {Token::Value::INC, smi_one, smi_max, number, bigint, str},
+      {Token::Value::DEC, smi_one, smi_min, number, bigint, str}};
   for (TestCase const& test_case : kTestCases) {
-    BytecodeArrayBuilder builder(isolate, zone, 4, 0);
-
     i::FeedbackVectorSpec feedback_spec(zone);
-    i::FeedbackSlot slot0 = feedback_spec.AddInterpreterBinaryOpICSlot();
-    i::FeedbackSlot slot1 = feedback_spec.AddInterpreterBinaryOpICSlot();
-    i::FeedbackSlot slot2 = feedback_spec.AddInterpreterBinaryOpICSlot();
-    i::FeedbackSlot slot3 = feedback_spec.AddInterpreterBinaryOpICSlot();
+    BytecodeArrayBuilder builder(zone, 5, 0, &feedback_spec);
+
+    i::FeedbackSlot slot0 = feedback_spec.AddBinaryOpICSlot();
+    i::FeedbackSlot slot1 = feedback_spec.AddBinaryOpICSlot();
+    i::FeedbackSlot slot2 = feedback_spec.AddBinaryOpICSlot();
+    i::FeedbackSlot slot3 = feedback_spec.AddBinaryOpICSlot();
+    i::FeedbackSlot slot4 = feedback_spec.AddBinaryOpICSlot();
 
     Handle<i::FeedbackMetadata> metadata =
         i::NewFeedbackMetadata(isolate, &feedback_spec);
@@ -833,18 +907,21 @@
         .UnaryOperation(test_case.op, GetIndex(slot2))
         .LoadAccumulatorWithRegister(builder.Parameter(2))
         .UnaryOperation(test_case.op, GetIndex(slot3))
+        .LoadAccumulatorWithRegister(builder.Parameter(3))
+        .UnaryOperation(test_case.op, GetIndex(slot4))
         .Return();
 
     Handle<BytecodeArray> bytecode_array = builder.ToBytecodeArray(isolate);
 
     InterpreterTester tester(isolate, bytecode_array, metadata);
     typedef Handle<Object> H;
-    auto callable = tester.GetCallable<H, H, H, H>();
+    auto callable = tester.GetCallable<H, H, H, H, H>();
 
     Handle<Object> return_val =
         callable(test_case.smi_feedback_value,
                  test_case.smi_to_number_feedback_value,
-                 test_case.number_feedback_value, test_case.any_feedback_value)
+                 test_case.number_feedback_value,
+                 test_case.bigint_feedback_value, test_case.any_feedback_value)
             .ToHandleChecked();
     USE(return_val);
     Object* feedback0 = callable.vector()->Get(slot0);
@@ -864,8 +941,13 @@
 
     Object* feedback3 = callable.vector()->Get(slot3);
     CHECK(feedback3->IsSmi());
-    CHECK_EQ(BinaryOperationFeedback::kAny,
+    CHECK_EQ(BinaryOperationFeedback::kBigInt,
              static_cast<Smi*>(feedback3)->value());
+
+    Object* feedback4 = callable.vector()->Get(slot4);
+    CHECK(feedback4->IsSmi());
+    CHECK_EQ(BinaryOperationFeedback::kAny,
+             static_cast<Smi*>(feedback4)->value());
   }
 }
 
@@ -878,12 +960,12 @@
       Token::Value::SHL,    Token::Value::SHR,     Token::Value::SAR};
 
   for (Token::Value op : kBitwiseBinaryOperators) {
-    BytecodeArrayBuilder builder(isolate, zone, 4, 0);
-
     i::FeedbackVectorSpec feedback_spec(zone);
-    i::FeedbackSlot slot0 = feedback_spec.AddInterpreterBinaryOpICSlot();
-    i::FeedbackSlot slot1 = feedback_spec.AddInterpreterBinaryOpICSlot();
-    i::FeedbackSlot slot2 = feedback_spec.AddInterpreterBinaryOpICSlot();
+    BytecodeArrayBuilder builder(zone, 4, 0, &feedback_spec);
+
+    i::FeedbackSlot slot0 = feedback_spec.AddBinaryOpICSlot();
+    i::FeedbackSlot slot1 = feedback_spec.AddBinaryOpICSlot();
+    i::FeedbackSlot slot2 = feedback_spec.AddBinaryOpICSlot();
 
     Handle<i::FeedbackMetadata> metadata =
         i::NewFeedbackMetadata(isolate, &feedback_spec);
@@ -929,7 +1011,7 @@
   HandleAndZoneScope handles;
   Isolate* isolate = handles.main_isolate();
   Zone* zone = handles.main_zone();
-  BytecodeArrayBuilder builder(isolate, zone, 1, 0);
+  BytecodeArrayBuilder builder(zone, 1, 0);
 
   builder.LoadLiteral(Smi::FromInt(5))
       .StoreAccumulatorInRegister(builder.Receiver())
@@ -1054,7 +1136,7 @@
 
   const AstRawString* name = ast_factory.GetOneByteString("val");
 
-  BytecodeArrayBuilder builder(isolate, zone, 1, 0);
+  BytecodeArrayBuilder builder(zone, 1, 0, &feedback_spec);
 
   builder.LoadNamedProperty(builder.Receiver(), name, GetIndex(slot)).Return();
   ast_factory.Internalize(isolate);
@@ -1106,7 +1188,7 @@
 
   const AstRawString* key = ast_factory.GetOneByteString("key");
 
-  BytecodeArrayBuilder builder(isolate, zone, 1, 1);
+  BytecodeArrayBuilder builder(zone, 1, 1, &feedback_spec);
 
   builder.LoadLiteral(key)
       .LoadKeyedProperty(builder.Receiver(), GetIndex(slot))
@@ -1141,17 +1223,18 @@
                               isolate->heap()->HashSeed());
 
   FeedbackVectorSpec feedback_spec(zone);
-  FeedbackSlot slot = feedback_spec.AddStoreICSlot(SLOPPY);
+  FeedbackSlot slot = feedback_spec.AddStoreICSlot(LanguageMode::kStrict);
 
   Handle<i::FeedbackMetadata> metadata =
       NewFeedbackMetadata(isolate, &feedback_spec);
 
   const AstRawString* name = ast_factory.GetOneByteString("val");
 
-  BytecodeArrayBuilder builder(isolate, zone, 1, 0);
+  BytecodeArrayBuilder builder(zone, 1, 0, &feedback_spec);
 
   builder.LoadLiteral(Smi::FromInt(999))
-      .StoreNamedProperty(builder.Receiver(), name, GetIndex(slot), STRICT)
+      .StoreNamedProperty(builder.Receiver(), name, GetIndex(slot),
+                          LanguageMode::kStrict)
       .Return();
   ast_factory.Internalize(isolate);
   Handle<BytecodeArray> bytecode_array = builder.ToBytecodeArray(isolate);
@@ -1203,20 +1286,20 @@
                               isolate->heap()->HashSeed());
 
   FeedbackVectorSpec feedback_spec(zone);
-  FeedbackSlot slot = feedback_spec.AddKeyedStoreICSlot(SLOPPY);
+  FeedbackSlot slot = feedback_spec.AddKeyedStoreICSlot(LanguageMode::kSloppy);
 
   Handle<i::FeedbackMetadata> metadata =
       NewFeedbackMetadata(isolate, &feedback_spec);
 
   const AstRawString* name = ast_factory.GetOneByteString("val");
 
-  BytecodeArrayBuilder builder(isolate, zone, 1, 1);
+  BytecodeArrayBuilder builder(zone, 1, 1, &feedback_spec);
 
   builder.LoadLiteral(name)
       .StoreAccumulatorInRegister(Register(0))
       .LoadLiteral(Smi::FromInt(999))
       .StoreKeyedProperty(builder.Receiver(), Register(0), GetIndex(slot),
-                          i::SLOPPY)
+                          i::LanguageMode::kSloppy)
       .Return();
   ast_factory.Internalize(isolate);
   Handle<BytecodeArray> bytecode_array = builder.ToBytecodeArray(isolate);
@@ -1268,7 +1351,7 @@
 
   // Check with no args.
   {
-    BytecodeArrayBuilder builder(isolate, zone, 1, 1);
+    BytecodeArrayBuilder builder(zone, 1, 1, &feedback_spec);
     Register reg = builder.register_allocator()->NewRegister();
     RegisterList args = builder.register_allocator()->NewRegisterList(1);
     builder.LoadNamedProperty(builder.Receiver(), name, slot_index)
@@ -1292,7 +1375,7 @@
 
   // Check that receiver is passed properly.
   {
-    BytecodeArrayBuilder builder(isolate, zone, 1, 1);
+    BytecodeArrayBuilder builder(zone, 1, 1, &feedback_spec);
     Register reg = builder.register_allocator()->NewRegister();
     RegisterList args = builder.register_allocator()->NewRegisterList(1);
     builder.LoadNamedProperty(builder.Receiver(), name, slot_index)
@@ -1317,7 +1400,7 @@
 
   // Check with two parameters (+ receiver).
   {
-    BytecodeArrayBuilder builder(isolate, zone, 1, 4);
+    BytecodeArrayBuilder builder(zone, 1, 4, &feedback_spec);
     Register reg = builder.register_allocator()->NewRegister();
     RegisterList args = builder.register_allocator()->NewRegisterList(3);
 
@@ -1350,7 +1433,7 @@
 
   // Check with 10 parameters (+ receiver).
   {
-    BytecodeArrayBuilder builder(isolate, zone, 1, 12);
+    BytecodeArrayBuilder builder(zone, 1, 12, &feedback_spec);
     Register reg = builder.register_allocator()->NewRegister();
     RegisterList args = builder.register_allocator()->NewRegisterList(11);
 
@@ -1358,25 +1441,25 @@
         .StoreAccumulatorInRegister(reg)
         .LoadAccumulatorWithRegister(builder.Receiver())
         .StoreAccumulatorInRegister(args[0])
-        .LoadLiteral(ast_factory.NewString(ast_factory.GetOneByteString("a")))
+        .LoadLiteral(ast_factory.GetOneByteString("a"))
         .StoreAccumulatorInRegister(args[1])
-        .LoadLiteral(ast_factory.NewString(ast_factory.GetOneByteString("b")))
+        .LoadLiteral(ast_factory.GetOneByteString("b"))
         .StoreAccumulatorInRegister(args[2])
-        .LoadLiteral(ast_factory.NewString(ast_factory.GetOneByteString("c")))
+        .LoadLiteral(ast_factory.GetOneByteString("c"))
         .StoreAccumulatorInRegister(args[3])
-        .LoadLiteral(ast_factory.NewString(ast_factory.GetOneByteString("d")))
+        .LoadLiteral(ast_factory.GetOneByteString("d"))
         .StoreAccumulatorInRegister(args[4])
-        .LoadLiteral(ast_factory.NewString(ast_factory.GetOneByteString("e")))
+        .LoadLiteral(ast_factory.GetOneByteString("e"))
         .StoreAccumulatorInRegister(args[5])
-        .LoadLiteral(ast_factory.NewString(ast_factory.GetOneByteString("f")))
+        .LoadLiteral(ast_factory.GetOneByteString("f"))
         .StoreAccumulatorInRegister(args[6])
-        .LoadLiteral(ast_factory.NewString(ast_factory.GetOneByteString("g")))
+        .LoadLiteral(ast_factory.GetOneByteString("g"))
         .StoreAccumulatorInRegister(args[7])
-        .LoadLiteral(ast_factory.NewString(ast_factory.GetOneByteString("h")))
+        .LoadLiteral(ast_factory.GetOneByteString("h"))
         .StoreAccumulatorInRegister(args[8])
-        .LoadLiteral(ast_factory.NewString(ast_factory.GetOneByteString("i")))
+        .LoadLiteral(ast_factory.GetOneByteString("i"))
         .StoreAccumulatorInRegister(args[9])
-        .LoadLiteral(ast_factory.NewString(ast_factory.GetOneByteString("j")))
+        .LoadLiteral(ast_factory.GetOneByteString("j"))
         .StoreAccumulatorInRegister(args[10]);
 
     builder.CallProperty(reg, args, call_slot_index);
@@ -1427,12 +1510,12 @@
   HandleAndZoneScope handles;
   Isolate* isolate = handles.main_isolate();
   Zone* zone = handles.main_zone();
-  BytecodeArrayBuilder builder(isolate, zone, 1, 2);
-
   FeedbackVectorSpec feedback_spec(zone);
-  FeedbackSlot slot = feedback_spec.AddInterpreterBinaryOpICSlot();
-  FeedbackSlot slot1 = feedback_spec.AddInterpreterBinaryOpICSlot();
-  FeedbackSlot slot2 = feedback_spec.AddInterpreterBinaryOpICSlot();
+  BytecodeArrayBuilder builder(zone, 1, 2, &feedback_spec);
+
+  FeedbackSlot slot = feedback_spec.AddBinaryOpICSlot();
+  FeedbackSlot slot1 = feedback_spec.AddBinaryOpICSlot();
+  FeedbackSlot slot2 = feedback_spec.AddBinaryOpICSlot();
 
   Handle<i::FeedbackMetadata> metadata =
       NewFeedbackMetadata(isolate, &feedback_spec);
@@ -1464,14 +1547,14 @@
   HandleAndZoneScope handles;
   Isolate* isolate = handles.main_isolate();
   Zone* zone = handles.main_zone();
-  BytecodeArrayBuilder builder(isolate, zone, 1, 2);
-
   FeedbackVectorSpec feedback_spec(zone);
-  FeedbackSlot slot = feedback_spec.AddInterpreterBinaryOpICSlot();
-  FeedbackSlot slot1 = feedback_spec.AddInterpreterBinaryOpICSlot();
-  FeedbackSlot slot2 = feedback_spec.AddInterpreterBinaryOpICSlot();
-  FeedbackSlot slot3 = feedback_spec.AddInterpreterBinaryOpICSlot();
-  FeedbackSlot slot4 = feedback_spec.AddInterpreterBinaryOpICSlot();
+  BytecodeArrayBuilder builder(zone, 1, 2, &feedback_spec);
+
+  FeedbackSlot slot = feedback_spec.AddBinaryOpICSlot();
+  FeedbackSlot slot1 = feedback_spec.AddBinaryOpICSlot();
+  FeedbackSlot slot2 = feedback_spec.AddBinaryOpICSlot();
+  FeedbackSlot slot3 = feedback_spec.AddBinaryOpICSlot();
+  FeedbackSlot slot4 = feedback_spec.AddBinaryOpICSlot();
 
   Handle<i::FeedbackMetadata> metadata =
       NewFeedbackMetadata(isolate, &feedback_spec);
@@ -1514,14 +1597,14 @@
   HandleAndZoneScope handles;
   Isolate* isolate = handles.main_isolate();
   Zone* zone = handles.main_zone();
-  BytecodeArrayBuilder builder(isolate, zone, 1, 2);
-
   FeedbackVectorSpec feedback_spec(zone);
-  FeedbackSlot slot = feedback_spec.AddInterpreterBinaryOpICSlot();
-  FeedbackSlot slot1 = feedback_spec.AddInterpreterBinaryOpICSlot();
-  FeedbackSlot slot2 = feedback_spec.AddInterpreterBinaryOpICSlot();
-  FeedbackSlot slot3 = feedback_spec.AddInterpreterBinaryOpICSlot();
-  FeedbackSlot slot4 = feedback_spec.AddInterpreterBinaryOpICSlot();
+  BytecodeArrayBuilder builder(zone, 1, 2, &feedback_spec);
+
+  FeedbackSlot slot = feedback_spec.AddBinaryOpICSlot();
+  FeedbackSlot slot1 = feedback_spec.AddBinaryOpICSlot();
+  FeedbackSlot slot2 = feedback_spec.AddBinaryOpICSlot();
+  FeedbackSlot slot3 = feedback_spec.AddBinaryOpICSlot();
+  FeedbackSlot slot4 = feedback_spec.AddBinaryOpICSlot();
 
   Handle<i::FeedbackMetadata> metadata =
       NewFeedbackMetadata(isolate, &feedback_spec);
@@ -1565,10 +1648,10 @@
   Zone* zone = handles.main_zone();
   AstValueFactory ast_factory(zone, isolate->ast_string_constants(),
                               isolate->heap()->HashSeed());
-  BytecodeArrayBuilder builder(isolate, zone, 1, 257);
-
   FeedbackVectorSpec feedback_spec(zone);
-  FeedbackSlot slot = feedback_spec.AddInterpreterBinaryOpICSlot();
+  BytecodeArrayBuilder builder(zone, 1, 257, &feedback_spec);
+
+  FeedbackSlot slot = feedback_spec.AddBinaryOpICSlot();
   Handle<i::FeedbackMetadata> metadata =
       NewFeedbackMetadata(isolate, &feedback_spec);
 
@@ -1579,7 +1662,7 @@
   builder.StoreAccumulatorInRegister(reg);
   // Consume all 8-bit operands
   for (int i = 1; i <= 256; i++) {
-    builder.LoadLiteral(ast_factory.NewNumber(i + 0.5));
+    builder.LoadLiteral(i + 0.5);
     builder.BinaryOperation(Token::Value::ADD, reg, GetIndex(slot));
     builder.StoreAccumulatorInRegister(reg);
   }
@@ -1626,7 +1709,7 @@
   Zone* zone = handles.main_zone();
   AstValueFactory ast_factory(zone, isolate->ast_string_constants(),
                               isolate->heap()->HashSeed());
-  BytecodeArrayBuilder builder(isolate, zone, 1, 1);
+  BytecodeArrayBuilder builder(zone, 1, 1);
   Register reg(0);
   BytecodeLabel done;
 
@@ -1635,7 +1718,7 @@
   // Consume all 16-bit constant pool entries. Make sure to use doubles so that
   // the jump can't re-use an integer.
   for (int i = 1; i <= 65536; i++) {
-    builder.LoadLiteral(ast_factory.NewNumber(i + 0.5));
+    builder.LoadLiteral(i + 0.5);
   }
   builder.Jump(&done);
   builder.LoadLiteral(Smi::kZero);
@@ -1716,10 +1799,10 @@
         HandleAndZoneScope handles;
         Isolate* isolate = handles.main_isolate();
         Zone* zone = handles.main_zone();
-        BytecodeArrayBuilder builder(isolate, zone, 1, 1);
-
         FeedbackVectorSpec feedback_spec(zone);
-        FeedbackSlot slot = feedback_spec.AddInterpreterCompareICSlot();
+        BytecodeArrayBuilder builder(zone, 1, 1, &feedback_spec);
+
+        FeedbackSlot slot = feedback_spec.AddCompareICSlot();
         Handle<i::FeedbackMetadata> metadata =
             NewFeedbackMetadata(isolate, &feedback_spec);
 
@@ -1764,17 +1847,17 @@
         AstValueFactory ast_factory(zone, isolate->ast_string_constants(),
                                     isolate->heap()->HashSeed());
 
-        BytecodeArrayBuilder builder(isolate, zone, 1, 1);
-
         FeedbackVectorSpec feedback_spec(zone);
-        FeedbackSlot slot = feedback_spec.AddInterpreterCompareICSlot();
+        BytecodeArrayBuilder builder(zone, 1, 1, &feedback_spec);
+
+        FeedbackSlot slot = feedback_spec.AddCompareICSlot();
         Handle<i::FeedbackMetadata> metadata =
             NewFeedbackMetadata(isolate, &feedback_spec);
 
         Register r0(0);
-        builder.LoadLiteral(ast_factory.NewNumber(inputs[i]))
+        builder.LoadLiteral(inputs[i])
             .StoreAccumulatorInRegister(r0)
-            .LoadLiteral(ast_factory.NewNumber(inputs[j]))
+            .LoadLiteral(inputs[j])
             .CompareOperation(comparison, r0, GetIndex(slot))
             .Return();
 
@@ -1795,6 +1878,49 @@
   }
 }
 
+TEST(InterpreterBigIntComparisons) {
+  // This test only checks that the recorded type feedback is kBigInt.
+  AstBigInt inputs[] = {AstBigInt("0"), AstBigInt("-42"),
+                        AstBigInt("0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF")};
+  for (size_t c = 0; c < arraysize(kComparisonTypes); c++) {
+    Token::Value comparison = kComparisonTypes[c];
+    for (size_t i = 0; i < arraysize(inputs); i++) {
+      for (size_t j = 0; j < arraysize(inputs); j++) {
+        HandleAndZoneScope handles;
+        Isolate* isolate = handles.main_isolate();
+        Zone* zone = handles.main_zone();
+        AstValueFactory ast_factory(zone, isolate->ast_string_constants(),
+                                    isolate->heap()->HashSeed());
+
+        FeedbackVectorSpec feedback_spec(zone);
+        BytecodeArrayBuilder builder(zone, 1, 1, &feedback_spec);
+
+        FeedbackSlot slot = feedback_spec.AddCompareICSlot();
+        Handle<i::FeedbackMetadata> metadata =
+            NewFeedbackMetadata(isolate, &feedback_spec);
+
+        Register r0(0);
+        builder.LoadLiteral(inputs[i])
+            .StoreAccumulatorInRegister(r0)
+            .LoadLiteral(inputs[j])
+            .CompareOperation(comparison, r0, GetIndex(slot))
+            .Return();
+
+        ast_factory.Internalize(isolate);
+        Handle<BytecodeArray> bytecode_array = builder.ToBytecodeArray(isolate);
+        InterpreterTester tester(isolate, bytecode_array, metadata);
+        auto callable = tester.GetCallable<>();
+        Handle<Object> return_value = callable().ToHandleChecked();
+        CHECK(return_value->IsBoolean());
+        Object* feedback = callable.vector()->Get(slot);
+        CHECK(feedback->IsSmi());
+        CHECK_EQ(CompareOperationFeedback::kBigInt,
+                 static_cast<Smi*>(feedback)->value());
+      }
+    }
+  }
+}
+
 TEST(InterpreterStringComparisons) {
   HandleAndZoneScope handles;
   Isolate* isolate = handles.main_isolate();
@@ -1814,11 +1940,11 @@
         const char* rhs = inputs[j].c_str();
 
         FeedbackVectorSpec feedback_spec(zone);
-        FeedbackSlot slot = feedback_spec.AddInterpreterCompareICSlot();
+        FeedbackSlot slot = feedback_spec.AddCompareICSlot();
         Handle<i::FeedbackMetadata> metadata =
             NewFeedbackMetadata(isolate, &feedback_spec);
 
-        BytecodeArrayBuilder builder(isolate, zone, 1, 1);
+        BytecodeArrayBuilder builder(zone, 1, 1, &feedback_spec);
         Register r0(0);
         builder.LoadLiteral(ast_factory.GetOneByteString(lhs))
             .StoreAccumulatorInRegister(r0)
@@ -1853,9 +1979,9 @@
   Register string_reg = builder->register_allocator()->NewRegister();
 
   (*builder)
-      .LoadLiteral(ast_factory->NewString(ast_factory->GetOneByteString(cstr)))
+      .LoadLiteral(ast_factory->GetOneByteString(cstr))
       .StoreAccumulatorInRegister(string_reg)
-      .LoadLiteral(ast_factory->NewString(ast_factory->GetOneByteString(" ")))
+      .LoadLiteral(ast_factory->GetOneByteString(" "))
       .BinaryOperation(Token::Value::ADD, string_reg,
                        GetIndex(string_add_slot));
 }
@@ -1893,12 +2019,11 @@
             Zone* zone = handles.main_zone();
             AstValueFactory ast_factory(zone, isolate->ast_string_constants(),
                                         isolate->heap()->HashSeed());
-            BytecodeArrayBuilder builder(isolate, zone, 1, 0);
-
             FeedbackVectorSpec feedback_spec(zone);
-            FeedbackSlot string_add_slot =
-                feedback_spec.AddInterpreterBinaryOpICSlot();
-            FeedbackSlot slot = feedback_spec.AddInterpreterCompareICSlot();
+            BytecodeArrayBuilder builder(zone, 1, 0, &feedback_spec);
+
+            FeedbackSlot string_add_slot = feedback_spec.AddBinaryOpICSlot();
+            FeedbackSlot slot = feedback_spec.AddCompareICSlot();
             Handle<i::FeedbackMetadata> metadata =
                 NewFeedbackMetadata(isolate, &feedback_spec);
 
@@ -1908,13 +2033,11 @@
             if (which_side == kRhsIsString) {
               // Comparison with HeapNumber on the lhs and String on the rhs.
 
-              builder.LoadLiteral(ast_factory.NewNumber(lhs))
-                  .StoreAccumulatorInRegister(lhs_reg);
+              builder.LoadLiteral(lhs).StoreAccumulatorInRegister(lhs_reg);
 
               if (string_type == kInternalizedStringConstant) {
                 // rhs string is internalized.
-                builder.LoadLiteral(ast_factory.NewString(
-                    ast_factory.GetOneByteString(rhs_cstr)));
+                builder.LoadLiteral(ast_factory.GetOneByteString(rhs_cstr));
               } else {
                 CHECK_EQ(string_type, kComputedString);
                 // rhs string is not internalized (append a space to the end).
@@ -1928,8 +2051,7 @@
 
               if (string_type == kInternalizedStringConstant) {
                 // lhs string is internalized
-                builder.LoadLiteral(ast_factory.NewString(
-                    ast_factory.GetOneByteString(lhs_cstr)));
+                builder.LoadLiteral(ast_factory.GetOneByteString(lhs_cstr));
               } else {
                 CHECK_EQ(string_type, kComputedString);
                 // lhs string is not internalized (append a space to the end).
@@ -1938,7 +2060,7 @@
               }
               builder.StoreAccumulatorInRegister(lhs_reg);
 
-              builder.LoadLiteral(ast_factory.NewNumber(rhs));
+              builder.LoadLiteral(rhs);
             }
 
             builder.CompareOperation(comparison, lhs_reg, GetIndex(slot))
@@ -2073,7 +2195,7 @@
     LiteralFlag literal_flag = kLiterals[l];
     if (literal_flag == LiteralFlag::kOther) continue;
 
-    BytecodeArrayBuilder builder(isolate, zone, 1, 0);
+    BytecodeArrayBuilder builder(zone, 1, 0);
     builder.LoadAccumulatorWithRegister(builder.Receiver())
         .CompareTypeOf(kLiterals[l])
         .Return();
@@ -2095,27 +2217,32 @@
   Zone* zone = handles.main_zone();
   Factory* factory = isolate->factory();
   Handle<i::String> name = factory->NewStringFromAsciiChecked("cons");
-  Handle<i::JSFunction> func = factory->NewFunction(name);
+  Handle<i::JSFunction> func = factory->NewFunctionForTest(name);
   Handle<i::JSObject> instance = factory->NewJSObject(func);
   Handle<i::Object> other = factory->NewNumber(3.3333);
   Handle<i::Object> cases[] = {Handle<i::Object>::cast(instance), other};
   for (size_t i = 0; i < arraysize(cases); i++) {
     bool expected_value = (i == 0);
-    BytecodeArrayBuilder builder(isolate, zone, 1, 1);
+    FeedbackVectorSpec feedback_spec(zone);
+    BytecodeArrayBuilder builder(zone, 1, 1, &feedback_spec);
 
     Register r0(0);
     size_t case_entry = builder.AllocateDeferredConstantPoolEntry();
     builder.SetDeferredConstantPoolEntry(case_entry, cases[i]);
     builder.LoadConstantPoolEntry(case_entry).StoreAccumulatorInRegister(r0);
 
+    FeedbackSlot slot = feedback_spec.AddInstanceOfSlot();
+    Handle<i::FeedbackMetadata> metadata =
+        NewFeedbackMetadata(isolate, &feedback_spec);
+
     size_t func_entry = builder.AllocateDeferredConstantPoolEntry();
     builder.SetDeferredConstantPoolEntry(func_entry, func);
     builder.LoadConstantPoolEntry(func_entry)
-        .CompareOperation(Token::Value::INSTANCEOF, r0)
+        .CompareOperation(Token::Value::INSTANCEOF, r0, GetIndex(slot))
         .Return();
 
     Handle<BytecodeArray> bytecode_array = builder.ToBytecodeArray(isolate);
-    InterpreterTester tester(isolate, bytecode_array);
+    InterpreterTester tester(isolate, bytecode_array, metadata);
     auto callable = tester.GetCallable<>();
     Handle<Object> return_value = callable().ToHandleChecked();
     CHECK(return_value->IsBoolean());
@@ -2137,7 +2264,7 @@
   const char* properties[] = {"length", "fuzzle", "x", "0"};
   for (size_t i = 0; i < arraysize(properties); i++) {
     bool expected_value = (i == 0);
-    BytecodeArrayBuilder builder(isolate, zone, 1, 1);
+    BytecodeArrayBuilder builder(zone, 1, 1);
 
     Register r0(0);
     builder.LoadLiteral(ast_factory.GetOneByteString(properties[i]))
@@ -2165,7 +2292,7 @@
   Zone* zone = handles.main_zone();
   for (size_t i = 1; i < 10; i++) {
     bool expected_value = ((i & 1) == 1);
-    BytecodeArrayBuilder builder(isolate, zone, 1, 0);
+    BytecodeArrayBuilder builder(zone, 1, 0);
 
     Register r0(0);
     builder.LoadFalse();
@@ -2189,26 +2316,24 @@
   AstValueFactory ast_factory(zone, isolate->ast_string_constants(),
                               isolate->heap()->HashSeed());
 
-  std::pair<const AstValue*, bool> object_type_tuples[] = {
-      std::make_pair(ast_factory.NewUndefined(), true),
-      std::make_pair(ast_factory.NewNull(), true),
-      std::make_pair(ast_factory.NewBoolean(false), true),
-      std::make_pair(ast_factory.NewBoolean(true), false),
-      std::make_pair(ast_factory.NewNumber(9.1), false),
-      std::make_pair(ast_factory.NewNumber(0), true),
-      std::make_pair(
-          ast_factory.NewString(ast_factory.GetOneByteString("hello")), false),
-      std::make_pair(ast_factory.NewString(ast_factory.GetOneByteString("")),
-                     true),
+  std::pair<LiteralForTest, bool> object_type_tuples[] = {
+      std::make_pair(LiteralForTest(LiteralForTest::kUndefined), true),
+      std::make_pair(LiteralForTest(LiteralForTest::kNull), true),
+      std::make_pair(LiteralForTest(LiteralForTest::kFalse), true),
+      std::make_pair(LiteralForTest(LiteralForTest::kTrue), false),
+      std::make_pair(LiteralForTest(9.1), false),
+      std::make_pair(LiteralForTest(0), true),
+      std::make_pair(LiteralForTest(ast_factory.GetOneByteString("hello")),
+                     false),
+      std::make_pair(LiteralForTest(ast_factory.GetOneByteString("")), true),
   };
 
   for (size_t i = 0; i < arraysize(object_type_tuples); i++) {
-    BytecodeArrayBuilder builder(isolate, zone, 1, 0);
+    BytecodeArrayBuilder builder(zone, 1, 0);
 
     Register r0(0);
-    builder.LoadLiteral(object_type_tuples[i].first);
-    builder.LogicalNot(ToBooleanMode::kConvertToBoolean);
-    builder.Return();
+    LoadLiteralForTest(&builder, object_type_tuples[i].first);
+    builder.LogicalNot(ToBooleanMode::kConvertToBoolean).Return();
     ast_factory.Internalize(isolate);
     Handle<BytecodeArray> bytecode_array = builder.ToBytecodeArray(isolate);
     InterpreterTester tester(isolate, bytecode_array);
@@ -2251,7 +2376,7 @@
   Isolate* isolate = handles.main_isolate();
   Zone* zone = handles.main_zone();
 
-  BytecodeArrayBuilder builder(isolate, zone, 1, 2);
+  BytecodeArrayBuilder builder(zone, 1, 2);
   RegisterList args = builder.register_allocator()->NewRegisterList(2);
 
   builder.LoadLiteral(Smi::FromInt(15))
@@ -2274,7 +2399,7 @@
   Isolate* isolate = handles.main_isolate();
   Zone* zone = handles.main_zone();
 
-  BytecodeArrayBuilder builder(isolate, zone, 1, 2);
+  BytecodeArrayBuilder builder(zone, 1, 2);
 
   builder.LoadLiteral(Smi::FromInt(15))
       .StoreAccumulatorInRegister(Register(0))
@@ -3288,17 +3413,17 @@
       {"var r = 0;\n"
        "for (var a in [0,6,7,9]) { r = r + (1 << a); }\n"
        "return r;\n",
-       0xf},
+       0xF},
       {"var r = 0;\n"
        "for (var a in [0,6,7,9]) { r = r + (1 << a); }\n"
        "var r = 0;\n"
        "for (var a in [0,6,7,9]) { r = r + (1 << a); }\n"
        "return r;\n",
-       0xf},
+       0xF},
       {"var r = 0;\n"
        "for (var a in 'foobar') { r = r + (1 << a); }\n"
        "return r;\n",
-       0x3f},
+       0x3F},
       {"var r = 0;\n"
        "for (var a in {1:0, 10:1, 100:2, 1000:3}) {\n"
        "  r = r + Number(a);\n"
@@ -4465,7 +4590,7 @@
     std::string source = os.str();
     InterpreterTester tester(isolate, source.c_str(), "*");
     auto callable = tester.GetCallable<Handle<Object>>();
-    Handle<Object> arg = handle(Smi::FromInt(0xaa55), isolate);
+    Handle<Object> arg = handle(Smi::FromInt(0xAA55), isolate);
     Handle<Object> return_value = callable(arg).ToHandleChecked();
     Handle<Smi> actual = Handle<Smi>::cast(return_value);
     CHECK_EQ(actual->value(), parameter);
diff --git a/src/v8/test/cctest/libplatform/test-tracing.cc b/src/v8/test/cctest/libplatform/test-tracing.cc
index 369d7bc..da20205 100644
--- a/src/v8/test/cctest/libplatform/test-tracing.cc
+++ b/src/v8/test/cctest/libplatform/test-tracing.cc
@@ -42,7 +42,7 @@
   uint8_t category_enabled_flag = 41;
   trace_object.Initialize('X', &category_enabled_flag, "Test.Trace",
                           "Test.Scope", 42, 123, 0, nullptr, nullptr, nullptr,
-                          nullptr, 0);
+                          nullptr, 0, 1729, 4104);
   CHECK_EQ('X', trace_object.phase());
   CHECK_EQ(category_enabled_flag, *trace_object.category_enabled_flag());
   CHECK_EQ(std::string("Test.Trace"), std::string(trace_object.name()));
@@ -96,7 +96,7 @@
     CHECK_NOT_NULL(trace_object);
     trace_object->Initialize('X', &category_enabled_flag, names[i].c_str(),
                              "Test.Scope", 42, 123, 0, nullptr, nullptr,
-                             nullptr, nullptr, 0);
+                             nullptr, nullptr, 0, 1729, 4104);
     trace_object = ring_buffer->GetEventByHandle(handles[i]);
     CHECK_NOT_NULL(trace_object);
     CHECK_EQ('X', trace_object->phase());
@@ -130,35 +130,40 @@
 
 TEST(TestJSONTraceWriter) {
   std::ostringstream stream;
-  v8::Platform* old_platform = i::V8::GetCurrentPlatform();
-  v8::Platform* default_platform = v8::platform::CreateDefaultPlatform();
-  i::V8::SetPlatformForTesting(default_platform);
   // Create a scope for the tracing controller to terminate the trace writer.
   {
-    TracingController tracing_controller;
-    static_cast<v8::platform::DefaultPlatform*>(default_platform)
-        ->SetTracingController(&tracing_controller);
+    v8::Platform* old_platform = i::V8::GetCurrentPlatform();
+    std::unique_ptr<v8::Platform> default_platform(
+        v8::platform::NewDefaultPlatform());
+    i::V8::SetPlatformForTesting(default_platform.get());
+    auto tracing =
+        base::make_unique<v8::platform::tracing::TracingController>();
+    v8::platform::tracing::TracingController* tracing_controller =
+        tracing.get();
+    static_cast<v8::platform::DefaultPlatform*>(default_platform.get())
+        ->SetTracingController(std::move(tracing));
     TraceWriter* writer = TraceWriter::CreateJSONTraceWriter(stream);
 
     TraceBuffer* ring_buffer =
         TraceBuffer::CreateTraceBufferRingBuffer(1, writer);
-    tracing_controller.Initialize(ring_buffer);
+    tracing_controller->Initialize(ring_buffer);
     TraceConfig* trace_config = new TraceConfig();
     trace_config->AddIncludedCategory("v8-cat");
-    tracing_controller.StartTracing(trace_config);
+    tracing_controller->StartTracing(trace_config);
 
     TraceObject trace_object;
     trace_object.InitializeForTesting(
-        'X', tracing_controller.GetCategoryGroupEnabled("v8-cat"), "Test0",
+        'X', tracing_controller->GetCategoryGroupEnabled("v8-cat"), "Test0",
         v8::internal::tracing::kGlobalScope, 42, 123, 0, nullptr, nullptr,
         nullptr, nullptr, TRACE_EVENT_FLAG_HAS_ID, 11, 22, 100, 50, 33, 44);
     writer->AppendTraceEvent(&trace_object);
     trace_object.InitializeForTesting(
-        'Y', tracing_controller.GetCategoryGroupEnabled("v8-cat"), "Test1",
+        'Y', tracing_controller->GetCategoryGroupEnabled("v8-cat"), "Test1",
         v8::internal::tracing::kGlobalScope, 43, 456, 0, nullptr, nullptr,
         nullptr, nullptr, 0, 55, 66, 110, 55, 77, 88);
     writer->AppendTraceEvent(&trace_object);
-    tracing_controller.StopTracing();
+    tracing_controller->StopTracing();
+    i::V8::SetPlatformForTesting(old_platform);
   }
 
   std::string trace_str = stream.str();
@@ -170,32 +175,32 @@
       "\"Test1\",\"dur\":77,\"tdur\":88,\"args\":{}}]}";
 
   CHECK_EQ(expected_trace_str, trace_str);
-
-  i::V8::SetPlatformForTesting(old_platform);
 }
 
 TEST(TestTracingController) {
   v8::Platform* old_platform = i::V8::GetCurrentPlatform();
-  v8::Platform* default_platform = v8::platform::CreateDefaultPlatform();
-  i::V8::SetPlatformForTesting(default_platform);
+  std::unique_ptr<v8::Platform> default_platform(
+      v8::platform::NewDefaultPlatform());
+  i::V8::SetPlatformForTesting(default_platform.get());
 
-  TracingController tracing_controller;
-  static_cast<v8::platform::DefaultPlatform*>(default_platform)
-      ->SetTracingController(&tracing_controller);
+  auto tracing = base::make_unique<v8::platform::tracing::TracingController>();
+  v8::platform::tracing::TracingController* tracing_controller = tracing.get();
+  static_cast<v8::platform::DefaultPlatform*>(default_platform.get())
+      ->SetTracingController(std::move(tracing));
 
   MockTraceWriter* writer = new MockTraceWriter();
   TraceBuffer* ring_buffer =
       TraceBuffer::CreateTraceBufferRingBuffer(1, writer);
-  tracing_controller.Initialize(ring_buffer);
+  tracing_controller->Initialize(ring_buffer);
   TraceConfig* trace_config = new TraceConfig();
   trace_config->AddIncludedCategory("v8");
-  tracing_controller.StartTracing(trace_config);
+  tracing_controller->StartTracing(trace_config);
 
   TRACE_EVENT0("v8", "v8.Test");
   // cat category is not included in default config
   TRACE_EVENT0("cat", "v8.Test2");
   TRACE_EVENT0("v8", "v8.Test3");
-  tracing_controller.StopTracing();
+  tracing_controller->StopTracing();
 
   CHECK_EQ(2u, writer->events().size());
   CHECK_EQ(std::string("v8.Test"), writer->events()[0]);
@@ -220,10 +225,6 @@
 
 TEST(TestTracingControllerMultipleArgsAndCopy) {
   std::ostringstream stream;
-  v8::Platform* old_platform = i::V8::GetCurrentPlatform();
-  v8::Platform* default_platform = v8::platform::CreateDefaultPlatform();
-  i::V8::SetPlatformForTesting(default_platform);
-
   uint64_t aa = 11;
   unsigned int bb = 22;
   uint16_t cc = 33;
@@ -246,17 +247,25 @@
 
   // Create a scope for the tracing controller to terminate the trace writer.
   {
-    TracingController tracing_controller;
-    static_cast<v8::platform::DefaultPlatform*>(default_platform)
-        ->SetTracingController(&tracing_controller);
+    v8::Platform* old_platform = i::V8::GetCurrentPlatform();
+    std::unique_ptr<v8::Platform> default_platform(
+        v8::platform::NewDefaultPlatform());
+    i::V8::SetPlatformForTesting(default_platform.get());
+
+    auto tracing =
+        base::make_unique<v8::platform::tracing::TracingController>();
+    v8::platform::tracing::TracingController* tracing_controller =
+        tracing.get();
+    static_cast<v8::platform::DefaultPlatform*>(default_platform.get())
+        ->SetTracingController(std::move(tracing));
     TraceWriter* writer = TraceWriter::CreateJSONTraceWriter(stream);
 
     TraceBuffer* ring_buffer =
         TraceBuffer::CreateTraceBufferRingBuffer(1, writer);
-    tracing_controller.Initialize(ring_buffer);
+    tracing_controller->Initialize(ring_buffer);
     TraceConfig* trace_config = new TraceConfig();
     trace_config->AddIncludedCategory("v8");
-    tracing_controller.StartTracing(trace_config);
+    tracing_controller->StartTracing(trace_config);
 
     TRACE_EVENT1("v8", "v8.Test.aa", "aa", aa);
     TRACE_EVENT1("v8", "v8.Test.bb", "bb", bb);
@@ -296,7 +305,9 @@
                          std::move(trace_event_arg), "a2",
                          new ConvertableToTraceFormatMock(123));
 
-    tracing_controller.StopTracing();
+    tracing_controller->StopTracing();
+
+    i::V8::SetPlatformForTesting(old_platform);
   }
 
   std::string trace_str = stream.str();
@@ -337,8 +348,6 @@
   CHECK_EQ(all_args[21], "\"mm1\":\"INIT\",\"mm2\":\"\\\"INIT\\\"\"");
   CHECK_EQ(all_args[22], "\"a1\":[42,42]");
   CHECK_EQ(all_args[23], "\"a1\":[42,42],\"a2\":[123,123]");
-
-  i::V8::SetPlatformForTesting(old_platform);
 }
 
 namespace {
@@ -356,58 +365,60 @@
 
 TEST(TracingObservers) {
   v8::Platform* old_platform = i::V8::GetCurrentPlatform();
-  v8::Platform* default_platform = v8::platform::CreateDefaultPlatform();
-  i::V8::SetPlatformForTesting(default_platform);
+  std::unique_ptr<v8::Platform> default_platform(
+      v8::platform::NewDefaultPlatform());
+  i::V8::SetPlatformForTesting(default_platform.get());
 
-  v8::platform::tracing::TracingController tracing_controller;
-  static_cast<v8::platform::DefaultPlatform*>(default_platform)
-      ->SetTracingController(&tracing_controller);
+  auto tracing = base::make_unique<v8::platform::tracing::TracingController>();
+  v8::platform::tracing::TracingController* tracing_controller = tracing.get();
+  static_cast<v8::platform::DefaultPlatform*>(default_platform.get())
+      ->SetTracingController(std::move(tracing));
   MockTraceWriter* writer = new MockTraceWriter();
   v8::platform::tracing::TraceBuffer* ring_buffer =
       v8::platform::tracing::TraceBuffer::CreateTraceBufferRingBuffer(1,
                                                                       writer);
-  tracing_controller.Initialize(ring_buffer);
+  tracing_controller->Initialize(ring_buffer);
   v8::platform::tracing::TraceConfig* trace_config =
       new v8::platform::tracing::TraceConfig();
   trace_config->AddIncludedCategory("v8");
 
   TraceStateObserverImpl observer;
-  tracing_controller.AddTraceStateObserver(&observer);
+  tracing_controller->AddTraceStateObserver(&observer);
 
   CHECK_EQ(0, observer.enabled_count);
   CHECK_EQ(0, observer.disabled_count);
 
-  tracing_controller.StartTracing(trace_config);
+  tracing_controller->StartTracing(trace_config);
 
   CHECK_EQ(1, observer.enabled_count);
   CHECK_EQ(0, observer.disabled_count);
 
   TraceStateObserverImpl observer2;
-  tracing_controller.AddTraceStateObserver(&observer2);
+  tracing_controller->AddTraceStateObserver(&observer2);
 
   CHECK_EQ(1, observer2.enabled_count);
   CHECK_EQ(0, observer2.disabled_count);
 
-  tracing_controller.RemoveTraceStateObserver(&observer2);
+  tracing_controller->RemoveTraceStateObserver(&observer2);
 
   CHECK_EQ(1, observer2.enabled_count);
   CHECK_EQ(0, observer2.disabled_count);
 
-  tracing_controller.StopTracing();
+  tracing_controller->StopTracing();
 
   CHECK_EQ(1, observer.enabled_count);
   CHECK_EQ(1, observer.disabled_count);
   CHECK_EQ(1, observer2.enabled_count);
   CHECK_EQ(0, observer2.disabled_count);
 
-  tracing_controller.RemoveTraceStateObserver(&observer);
+  tracing_controller->RemoveTraceStateObserver(&observer);
 
   CHECK_EQ(1, observer.enabled_count);
   CHECK_EQ(1, observer.disabled_count);
 
   trace_config = new v8::platform::tracing::TraceConfig();
-  tracing_controller.StartTracing(trace_config);
-  tracing_controller.StopTracing();
+  tracing_controller->StartTracing(trace_config);
+  tracing_controller->StopTracing();
 
   CHECK_EQ(1, observer.enabled_count);
   CHECK_EQ(1, observer.disabled_count);
diff --git a/src/v8/test/cctest/log-eq-of-logging-and-traversal.js b/src/v8/test/cctest/log-eq-of-logging-and-traversal.js
index 522a372..cc3c818 100644
--- a/src/v8/test/cctest/log-eq-of-logging-and-traversal.js
+++ b/src/v8/test/cctest/log-eq-of-logging-and-traversal.js
@@ -39,7 +39,8 @@
 function LogProcessor() {
   LogReader.call(this, {
       'code-creation': {
-          parsers: [null, parseInt, parseInt, parseInt, null, 'var-args'],
+          parsers: [null, parseInt, parseInt, parseInt, parseInt,
+                    null, 'var-args'],
           processor: this.processCodeCreation },
       'code-move': { parsers: [parseInt, parseInt],
           processor: this.processCodeMove },
@@ -55,8 +56,10 @@
 LogProcessor.prototype.__proto__ = LogReader.prototype;
 
 LogProcessor.prototype.processCodeCreation = function(
-    type, kind, start, size, name, maybe_func) {
-  if (type != "LazyCompile" && type != "Script" && type != "Function") return;
+    type, kind, timestamp, start, size, name, maybe_func) {
+  if (type != "LazyCompile" && type != "Script" && type != "Function") {
+    return;
+  }
   // Scripts will compile into anonymous functions starting at 1:1. Adjust the
   // name here so that it matches corrsponding function's name during the heap
   // traversal.
@@ -66,9 +69,9 @@
   if (maybe_func.length) {
     var funcAddr = parseInt(maybe_func[0]);
     var state = parseState(maybe_func[1]);
-    this.profile.addFuncCode(type, name, start, size, funcAddr, state);
+    this.profile.addFuncCode(type, name, timestamp, start, size, funcAddr, state);
   } else {
-    this.profile.addCode(type, name, start, size);
+    this.profile.addCode(type, name, timestamp, start, size);
   }
 };
 
@@ -100,6 +103,7 @@
     logging_processor.profile.codeMap_.getAllDynamicEntriesWithAddresses();
   if (logging_entries.length === 0)
     return "logging_entries.length === 0";
+
   var traversal_processor = new LogProcessor();
   for ( ; pos < log_lines_length; ++pos) {
     line = log_lines[pos];
@@ -170,6 +174,7 @@
   return [equal, comparison];
 }
 
+
 var result = RunTest();
 if (typeof result !== "string") {
   var out = [];
@@ -182,6 +187,13 @@
                (c[2] ? c[2] : "---") + " " +
                (c[3] ? c[3] : "---"));
     }
+    out.push("================================================")
+    out.push("MAKE SURE TO USE A CLEAN ISOLATiE!");
+    out.push("Use tools/test.py");
+    out.push("================================================")
+    out.push("*   Lines are the same");
+    out.push("--- Line is missing"
+    out.push("================================================")
   }
   result[0] ? true : out.join("\n");
 } else {
diff --git a/src/v8/test/cctest/parsing/test-preparser.cc b/src/v8/test/cctest/parsing/test-preparser.cc
index 5b974a1..48aa482 100644
--- a/src/v8/test/cctest/parsing/test-preparser.cc
+++ b/src/v8/test/cctest/parsing/test-preparser.cc
@@ -2,6 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include "src/api.h"
 #include "src/ast/ast.h"
 #include "src/compiler.h"
 #include "src/objects-inl.h"
@@ -37,7 +38,6 @@
   i::FLAG_aggressive_lazy_inner_functions = true;
   i::Isolate* isolate = CcTest::i_isolate();
   i::Factory* factory = isolate->factory();
-  i::HandleScope scope(isolate);
   LocalContext env;
 
   struct {
@@ -45,77 +45,49 @@
     bool strict_outer;
     bool strict_test_function;
     bool arrow;
-    std::vector<unsigned> location;  // "Directions" to the relevant scope.
   } outers[] = {
       // Normal case (test function at the laziness boundary):
-      {"(function outer() { function test(%s) { %s \n"
-       "function skippable() { } } })();",
-       false,
-       false,
-       false,
-       {0, 0}},
+      {"function test(%s) { %s function skippable() { } } test;", false, false,
+       false},
 
-      {"(function outer() { let test2 = function test(%s) { %s \n"
-       "function skippable() { } } })();",
-       false,
-       false,
-       false,
-       {0, 0}},
+      {"var test2 = function test(%s) { %s function skippable() { } }; test2",
+       false, false, false},
 
       // Arrow functions (they can never be at the laziness boundary):
-      {"(function outer() { function inner() { (%s) => { %s } \n"
-       "function skippable() { } } })();",
-       false,
-       false,
-       true,
-       {0, 0}},
+      {"function test() { (%s) => { %s }; function skippable() { } } test;",
+       false, false, true},
 
-      // Repeat the above mentioned cases w/ outer function declaring itself
-      // strict:
-      {"(function outer() { 'use strict'; function test(%s) { %s \n"
-       "function skippable() { } } })();",
-       true,
-       false,
-       false,
-       {0, 0}},
+      // Repeat the above mentioned cases with global 'use strict'
+      {"'use strict'; function test(%s) { %s function skippable() { } } test;",
+       true, false, false},
 
-      {"(function outer() { 'use strict'; function inner() { "
-       "(%s) => { %s } \nfunction skippable() { } } })();",
-       true,
-       false,
-       true,
-       {0, 0}},
+      {"'use strict'; var test2 = function test(%s) { %s \n"
+       "function skippable() { } }; test2",
+       true, false, false},
+
+      {"'use strict'; function test() { (%s) => { %s };\n"
+       "function skippable() { } } test;",
+       true, false, true},
 
       // ... and with the test function declaring itself strict:
-      {"(function outer() { function test(%s) { 'use strict'; %s \n"
-       "function skippable() { } } })();",
-       false,
-       true,
-       false,
-       {0, 0}},
+      {"function test(%s) { 'use strict'; %s function skippable() { } } test;",
+       false, true, false},
 
-      {"(function outer() { function inner() { "
-       "(%s) => { 'use strict'; %s } \nfunction skippable() { } } })();",
-       false,
-       true,
-       true,
-       {0, 0}},
+      {"var test2 = function test(%s) { 'use strict'; %s \n"
+       "function skippable() { } }; test2",
+       false, true, false},
+
+      {"function test() { 'use strict'; (%s) => { %s };\n"
+       "function skippable() { } } test;",
+       false, true, true},
 
       // Methods containing skippable functions.
-      {"class MyClass { constructor(%s) { %s \n"
-       "function skippable() { } } }",
-       true,
-       true,
-       false,
-       {0, 0}},
-
-      {"class MyClass { test(%s) { %s \n"
-       "function skippable() { } } }",
-       true,
-       true,
-       false,
-       // The default constructor is scope 0 inside the class.
-       {0, 1}},
+      {"function get_method() {\n"
+       "  class MyClass { test_method(%s) { %s function skippable() { } } }\n"
+       "  var o = new MyClass(); return o.test_method;\n"
+       "}\n"
+       "get_method();",
+       true, true, false},
 
       // FIXME(marja): Generators and async functions
   };
@@ -135,11 +107,16 @@
     Inner(const char* p, const char* s, SkipTests skip, Bailout bailout)
         : params(p), source(s), skip(skip), bailout(bailout) {}
 
+    Inner(const char* s, std::function<void()> p, std::function<void()> e)
+        : source(s), prologue(p), epilogue(e) {}
+
     const char* params = "";
     const char* source;
     SkipTests skip = DONT_SKIP;
     PreciseMaybeAssigned precise_maybe_assigned = PreciseMaybeAssigned::YES;
     Bailout bailout = Bailout::NO;
+    std::function<void()> prologue = nullptr;
+    std::function<void()> epilogue = nullptr;
   } inners[] = {
       // Simple cases
       {"var1;"},
@@ -175,20 +152,20 @@
 
       // Functions.
       {"function f1() { let var2; }"},
-      {"var var1 = function f1() { let var2; }"},
-      {"let var1 = function f1() { let var2; }"},
-      {"const var1 = function f1() { let var2; }"},
-      {"var var1 = function() { let var2; }"},
-      {"let var1 = function() { let var2; }"},
-      {"const var1 = function() { let var2; }"},
+      {"var var1 = function f1() { let var2; };"},
+      {"let var1 = function f1() { let var2; };"},
+      {"const var1 = function f1() { let var2; };"},
+      {"var var1 = function() { let var2; };"},
+      {"let var1 = function() { let var2; };"},
+      {"const var1 = function() { let var2; };"},
 
       {"function *f1() { let var2; }"},
-      {"let var1 = function *f1() { let var2; }"},
-      {"let var1 = function*() { let var2; }"},
+      {"let var1 = function *f1() { let var2; };"},
+      {"let var1 = function*() { let var2; };"},
 
       {"async function f1() { let var2; }"},
-      {"let var1 = async function f1() { let var2; }"},
-      {"let var1 = async function() { let var2; }"},
+      {"let var1 = async function f1() { let var2; };"},
+      {"let var1 = async function() { let var2; };"},
 
       // Redeclarations.
       {"var var1; var var1;"},
@@ -216,15 +193,15 @@
       {"arguments = 5;", SKIP_STRICT},
       {"if (true) { arguments; }"},
       {"if (true) { arguments = 5; }", SKIP_STRICT},
-      {"() => { arguments; }"},
+      {"() => { arguments; };"},
       {"var1, var2, var3", "arguments;"},
       {"var1, var2, var3", "arguments = 5;", SKIP_STRICT},
-      {"var1, var2, var3", "() => { arguments; }"},
-      {"var1, var2, var3", "() => { arguments = 5; }", SKIP_STRICT},
+      {"var1, var2, var3", "() => { arguments; };"},
+      {"var1, var2, var3", "() => { arguments = 5; };", SKIP_STRICT},
 
       {"this;"},
       {"if (true) { this; }"},
-      {"() => { this; }"},
+      {"() => { this; };"},
 
       // Variable called "arguments"
       {"var arguments;", SKIP_STRICT},
@@ -462,6 +439,9 @@
       {"if (true) { function *f1() {} }"},
       {"if (true) { async function f1() {} }"},
 
+      // (Potentially sloppy) block function shadowing a catch variable.
+      {"try { } catch(var1) { if (true) { function var1() {} } }"},
+
       // Simple parameters.
       {"var1", ""},
       {"var1", "var1;"},
@@ -529,21 +509,21 @@
       {"{name1: var1}", "name1 = 16;", SKIP_STRICT_FUNCTION},
       {"{var1}", "var1 = 16;", SKIP_STRICT_FUNCTION},
 
-      {"[var1]", "() => { var1; }", SKIP_STRICT_FUNCTION},
-      {"{name1: var1}", "() => { var1; }", SKIP_STRICT_FUNCTION},
-      {"{name1: var1}", "() => { name1; }", SKIP_STRICT_FUNCTION},
-      {"{var1}", "() => { var1; }", SKIP_STRICT_FUNCTION},
+      {"[var1]", "() => { var1; };", SKIP_STRICT_FUNCTION},
+      {"{name1: var1}", "() => { var1; };", SKIP_STRICT_FUNCTION},
+      {"{name1: var1}", "() => { name1; };", SKIP_STRICT_FUNCTION},
+      {"{var1}", "() => { var1; };", SKIP_STRICT_FUNCTION},
 
       {"[var1, var2, var3]", "", SKIP_STRICT_FUNCTION},
       {"{name1: var1, name2: var2, name3: var3}", "", SKIP_STRICT_FUNCTION},
       {"{var1, var2, var3}", "", SKIP_STRICT_FUNCTION},
 
-      {"[var1, var2, var3]", "() => { var2 = 16;}", SKIP_STRICT_FUNCTION},
-      {"{name1: var1, name2: var2, name3: var3}", "() => { var2 = 16;}",
+      {"[var1, var2, var3]", "() => { var2 = 16;};", SKIP_STRICT_FUNCTION},
+      {"{name1: var1, name2: var2, name3: var3}", "() => { var2 = 16;};",
        SKIP_STRICT_FUNCTION},
-      {"{name1: var1, name2: var2, name3: var3}", "() => { name2 = 16;}",
+      {"{name1: var1, name2: var2, name3: var3}", "() => { name2 = 16;};",
        SKIP_STRICT_FUNCTION},
-      {"{var1, var2, var3}", "() => { var2 = 16;}", SKIP_STRICT_FUNCTION},
+      {"{var1, var2, var3}", "() => { var2 = 16;};", SKIP_STRICT_FUNCTION},
 
       // Nesting destructuring.
       {"[var1, [var2, var3], {var4, name5: [var5, var6]}]", "",
@@ -559,9 +539,9 @@
 
       // Destructuring rest. Because we can.
       {"var1, ...[var2]", "", SKIP_STRICT_FUNCTION},
-      {"var1, ...[var2]", "() => { var2; }", SKIP_STRICT_FUNCTION},
+      {"var1, ...[var2]", "() => { var2; };", SKIP_STRICT_FUNCTION},
       {"var1, ...{0: var2}", "", SKIP_STRICT_FUNCTION},
-      {"var1, ...{0: var2}", "() => { var2; }", SKIP_STRICT_FUNCTION},
+      {"var1, ...{0: var2}", "() => { var2; };", SKIP_STRICT_FUNCTION},
       {"var1, ...[]", "", SKIP_STRICT_FUNCTION},
       {"var1, ...{}", "", SKIP_STRICT_FUNCTION},
       {"var1, ...[var2, var3]", "", SKIP_STRICT_FUNCTION},
@@ -580,16 +560,16 @@
        PreciseMaybeAssigned::NO},
 
       // Locals shadowing parameters.
-      {"var1, var2", "var var1 = 16; () => { var1 = 17; }"},
+      {"var1, var2", "var var1 = 16; () => { var1 = 17; };"},
 
       // Locals shadowing destructuring parameters and the rest parameter.
-      {"[var1, var2]", "var var1 = 16; () => { var1 = 17; }",
+      {"[var1, var2]", "var var1 = 16; () => { var1 = 17; };",
        SKIP_STRICT_FUNCTION},
-      {"{var1, var2}", "var var1 = 16; () => { var1 = 17; }",
+      {"{var1, var2}", "var var1 = 16; () => { var1 = 17; };",
        SKIP_STRICT_FUNCTION},
-      {"var1, var2, ...var3", "var var3 = 16; () => { var3 = 17; }",
+      {"var1, var2, ...var3", "var var3 = 16; () => { var3 = 17; };",
        SKIP_STRICT_FUNCTION},
-      {"var1, var2 = var1", "var var1 = 16; () => { var1 = 17; }",
+      {"var1, var2 = var1", "var var1 = 16; () => { var1 = 17; };",
        SKIP_STRICT_FUNCTION, PreciseMaybeAssigned::NO},
 
       // Hoisted sloppy block function shadowing a parameter.
@@ -629,13 +609,13 @@
 
       // Classes
       {"class MyClass {}"},
-      {"var1 = class MyClass {}"},
-      {"var var1 = class MyClass {}"},
-      {"let var1 = class MyClass {}"},
-      {"const var1 = class MyClass {}"},
-      {"var var1 = class {}"},
-      {"let var1 = class {}"},
-      {"const var1 = class {}"},
+      {"var1 = class MyClass {};"},
+      {"var var1 = class MyClass {};"},
+      {"let var1 = class MyClass {};"},
+      {"const var1 = class MyClass {};"},
+      {"var var1 = class {};"},
+      {"let var1 = class {};"},
+      {"const var1 = class {};"},
 
       {"class MyClass { constructor() {} }"},
       {"class MyClass { constructor() { var var1; } }"},
@@ -675,6 +655,28 @@
       {"class MyClass extends MyBase { static m() { var var1 = 11; } }"},
       {"class MyClass extends MyBase { static m() { var var1; function foo() { "
        "var1 = 11; } } }"},
+
+      {"class X { ['bar'] = 1; }; new X;",
+       [] { i::FLAG_harmony_public_fields = true; },
+       [] { i::FLAG_harmony_public_fields = false; }},
+      {"class X { static ['foo'] = 2; }; new X;",
+       [] {
+         i::FLAG_harmony_public_fields = true;
+         i::FLAG_harmony_static_fields = true;
+       },
+       [] {
+         i::FLAG_harmony_public_fields = false;
+         i::FLAG_harmony_static_fields = false;
+       }},
+      {"class X { ['bar'] = 1; static ['foo'] = 2; }; new X;",
+       [] {
+         i::FLAG_harmony_public_fields = true;
+         i::FLAG_harmony_static_fields = true;
+       },
+       [] {
+         i::FLAG_harmony_public_fields = false;
+         i::FLAG_harmony_static_fields = false;
+       }},
   };
 
   for (unsigned outer_ix = 0; outer_ix < arraysize(outers); ++outer_ix) {
@@ -698,84 +700,77 @@
       int source_len = Utf8LengthHelper(inners[inner_ix].source);
       int len = code_len + params_len + source_len;
 
+      if (inners[inner_ix].prologue != nullptr) {
+        inners[inner_ix].prologue();
+      }
+
       i::ScopedVector<char> program(len + 1);
       i::SNPrintF(program, code, inners[inner_ix].params,
                   inners[inner_ix].source);
 
+      i::HandleScope scope(isolate);
+
       i::Handle<i::String> source =
           factory->InternalizeUtf8String(program.start());
       source->PrintOn(stdout);
       printf("\n");
 
-      // First compile with the lazy inner function and extract the scope data.
-      i::Handle<i::Script> script = factory->NewScript(source);
-      i::ParseInfo lazy_info(script);
+      // Compile and run the script to get a pointer to the lazy function.
+      v8::Local<v8::Value> v = CompileRun(program.start());
+      i::Handle<i::Object> o = v8::Utils::OpenHandle(*v);
+      i::Handle<i::JSFunction> f = i::Handle<i::JSFunction>::cast(o);
+      i::Handle<i::SharedFunctionInfo> shared = i::handle(f->shared());
 
-      // No need to run scope analysis; preparser scope data is produced when
-      // parsing.
-      CHECK(i::parsing::ParseProgram(&lazy_info, isolate));
-
-      // Retrieve the scope data we produced.
-      i::Scope* scope_with_data = i::ScopeTestHelper::FindScope(
-          lazy_info.literal()->scope(), outers[outer_ix].location);
-      i::ProducedPreParsedScopeData* produced_data =
-          scope_with_data->AsDeclarationScope()
-              ->produced_preparsed_scope_data();
-      i::MaybeHandle<i::PreParsedScopeData> maybe_produced_data_on_heap =
-          produced_data->Serialize(isolate);
       if (inners[inner_ix].bailout == Bailout::BAILOUT_IF_OUTER_SLOPPY &&
           !outers[outer_ix].strict_outer) {
-        DCHECK(maybe_produced_data_on_heap.is_null());
+        CHECK(!shared->HasPreParsedScopeData());
         continue;
       }
-      DCHECK(!maybe_produced_data_on_heap.is_null());
-      i::Handle<i::PreParsedScopeData> produced_data_on_heap =
-          maybe_produced_data_on_heap.ToHandleChecked();
 
-      // Then parse eagerly and check against the scope data.
-      script = factory->NewScript(source);
+      CHECK(shared->HasPreParsedScopeData());
+      i::Handle<i::PreParsedScopeData> produced_data_on_heap(
+          i::PreParsedScopeData::cast(shared->preparsed_scope_data()));
 
-      i::ParseInfo eager_normal(script);
-      eager_normal.set_allow_lazy_parsing(false);
+      // Parse the lazy function using the scope data.
+      i::ParseInfo using_scope_data(shared);
+      using_scope_data.set_lazy_compile();
+      using_scope_data.consumed_preparsed_scope_data()->SetData(
+          produced_data_on_heap);
+      CHECK(i::parsing::ParseFunction(&using_scope_data, shared, isolate));
 
-      CHECK(i::parsing::ParseProgram(&eager_normal, isolate));
-      CHECK(i::Compiler::Analyze(&eager_normal));
+      // Verify that we skipped at least one function inside that scope.
+      i::DeclarationScope* scope_with_skipped_functions =
+          using_scope_data.literal()->scope();
+      CHECK(i::ScopeTestHelper::HasSkippedFunctionInside(
+          scope_with_skipped_functions));
 
-      // Compare the allocation of the variables in two cases: 1) normal scope
-      // allocation 2) allocation based on the preparse data.
+      // Do scope allocation (based on the preparsed scope data).
+      i::DeclarationScope::Analyze(&using_scope_data);
 
-      i::Scope* normal_scope = i::ScopeTestHelper::FindScope(
-          eager_normal.literal()->scope(), outers[outer_ix].location);
-      CHECK_NULL(normal_scope->sibling());
-      CHECK(normal_scope->is_function_scope());
+      // Parse the lazy function again eagerly to produce baseline data.
+      i::ParseInfo not_using_scope_data(shared);
+      not_using_scope_data.set_lazy_compile();
+      CHECK(i::parsing::ParseFunction(&not_using_scope_data, shared, isolate));
 
-      i::ParseInfo eager_using_scope_data(script);
-      eager_using_scope_data.set_allow_lazy_parsing(false);
+      // Verify that we didn't skip anything (there's no preparsed scope data,
+      // so we cannot skip).
+      i::DeclarationScope* scope_without_skipped_functions =
+          not_using_scope_data.literal()->scope();
+      CHECK(!i::ScopeTestHelper::HasSkippedFunctionInside(
+          scope_without_skipped_functions));
 
-      CHECK(i::parsing::ParseProgram(&eager_using_scope_data, isolate));
-      // Don't run scope analysis (that would obviously decide the correct
-      // allocation for the variables).
+      // Do normal scope allocation.
+      i::DeclarationScope::Analyze(&not_using_scope_data);
 
-      i::Scope* unallocated_scope = i::ScopeTestHelper::FindScope(
-          eager_using_scope_data.literal()->scope(), outers[outer_ix].location);
-      CHECK_NULL(unallocated_scope->sibling());
-      CHECK(unallocated_scope->is_function_scope());
-
-      // Mark all inner functions as "skipped", so that we don't try to restore
-      // data for them. No test should contain eager functions, because we
-      // cannot properly decide whether we have or don't have data for them.
-      i::ScopeTestHelper::MarkInnerFunctionsAsSkipped(unallocated_scope);
-      i::ConsumedPreParsedScopeData* consumed_preparsed_scope_data =
-          lazy_info.consumed_preparsed_scope_data();
-      consumed_preparsed_scope_data->SetData(produced_data_on_heap);
-      consumed_preparsed_scope_data->SkipFunctionDataForTesting();
-      consumed_preparsed_scope_data->RestoreScopeAllocationData(
-          unallocated_scope->AsDeclarationScope());
-      i::ScopeTestHelper::AllocateWithoutVariableResolution(unallocated_scope);
-
+      // Verify that scope allocation gave the same results when parsing w/ the
+      // scope data (and skipping functions), and when parsing without.
       i::ScopeTestHelper::CompareScopes(
-          normal_scope, unallocated_scope,
+          scope_without_skipped_functions, scope_with_skipped_functions,
           inners[inner_ix].precise_maybe_assigned == PreciseMaybeAssigned::YES);
+
+      if (inners[inner_ix].epilogue != nullptr) {
+        inners[inner_ix].epilogue();
+      }
     }
   }
 }
@@ -816,6 +811,20 @@
   bytes.WriteUint8(0);
   bytes.OverwriteFirstUint32(2017);
   bytes.WriteUint8(100);
+  // Write quarter bytes between uint8s and uint32s to verify they're stored
+  // correctly.
+  bytes.WriteQuarter(3);
+  bytes.WriteQuarter(0);
+  bytes.WriteQuarter(2);
+  bytes.WriteQuarter(1);
+  bytes.WriteQuarter(0);
+  bytes.WriteUint8(50);
+  bytes.WriteQuarter(0);
+  bytes.WriteQuarter(1);
+  bytes.WriteQuarter(2);
+  bytes.WriteUint32(50);
+  // End with a lonely quarter.
+  bytes.WriteQuarter(2);
 
   i::Handle<i::PodArray<uint8_t>> data_on_heap = bytes.Serialize(isolate);
   i::ConsumedPreParsedScopeData::ByteData bytes_for_reading;
@@ -830,4 +839,15 @@
   CHECK_EQ(bytes_for_reading.ReadUint32(), 0);
   CHECK_EQ(bytes_for_reading.ReadUint8(), 0);
   CHECK_EQ(bytes_for_reading.ReadUint8(), 100);
+  CHECK_EQ(bytes_for_reading.ReadQuarter(), 3);
+  CHECK_EQ(bytes_for_reading.ReadQuarter(), 0);
+  CHECK_EQ(bytes_for_reading.ReadQuarter(), 2);
+  CHECK_EQ(bytes_for_reading.ReadQuarter(), 1);
+  CHECK_EQ(bytes_for_reading.ReadQuarter(), 0);
+  CHECK_EQ(bytes_for_reading.ReadUint8(), 50);
+  CHECK_EQ(bytes_for_reading.ReadQuarter(), 0);
+  CHECK_EQ(bytes_for_reading.ReadQuarter(), 1);
+  CHECK_EQ(bytes_for_reading.ReadQuarter(), 2);
+  CHECK_EQ(bytes_for_reading.ReadUint32(), 50);
+  CHECK_EQ(bytes_for_reading.ReadQuarter(), 2);
 }
diff --git a/src/v8/test/cctest/parsing/test-scanner-streams.cc b/src/v8/test/cctest/parsing/test-scanner-streams.cc
index 27fc086..ab207e5 100644
--- a/src/v8/test/cctest/parsing/test-scanner-streams.cc
+++ b/src/v8/test/cctest/parsing/test-scanner-streams.cc
@@ -500,7 +500,7 @@
       "\xbf\0",         // third chunk - end of 2-byte seq
   };
   const std::vector<std::vector<uint16_t>> unicode_expected = {
-      {0xd800, 0xdc00, 97}, {0xfff, 97}, {0xff, 97}, {0xd800, 0xdc00, 97, 0xff},
+      {0xD800, 0xDC00, 97}, {0xFFF, 97}, {0xFF, 97}, {0xD800, 0xDC00, 97, 0xFF},
   };
   CHECK_EQ(unicode_expected.size(), arraysize(cases));
   TestChunkStreamAgainstReference(cases, unicode_expected);
@@ -508,7 +508,7 @@
 
 TEST(Regress6836) {
   const char* cases[] = {
-      // 0xc2 is a lead byte, but there's no continuation. The bug occurs when
+      // 0xC2 is a lead byte, but there's no continuation. The bug occurs when
       // this happens near the chunk end.
       "X\xc2Y\0",
       // Last chunk ends with a 2-byte char lead.
@@ -518,7 +518,7 @@
       "X\xe0\xbf\0",
   };
   const std::vector<std::vector<uint16_t>> unicode_expected = {
-      {0x58, 0xfffd, 0x59}, {0x58, 0xfffd}, {0x58, 0xfffd},
+      {0x58, 0xFFFD, 0x59}, {0x58, 0xFFFD}, {0x58, 0xFFFD},
   };
   CHECK_EQ(unicode_expected.size(), arraysize(cases));
   TestChunkStreamAgainstReference(cases, unicode_expected);
@@ -540,12 +540,12 @@
       "X\xf4\x90\x80\x80Y\0",
   };
   const std::vector<std::vector<uint16_t>> unicode_expected = {
-      {0x58, 0xfffd, 0xfffd, 0x59},
-      {0x58, 0xfffd, 0xfffd, 0x59},
-      {0x58, 0xfffd, 0xfffd, 0xfffd, 0x59},
-      {0x58, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0x59},
-      {0x58, 0xfffd, 0xfffd, 0xfffd, 0x59},
-      {0x58, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0x59},
+      {0x58, 0xFFFD, 0xFFFD, 0x59},
+      {0x58, 0xFFFD, 0xFFFD, 0x59},
+      {0x58, 0xFFFD, 0xFFFD, 0xFFFD, 0x59},
+      {0x58, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x59},
+      {0x58, 0xFFFD, 0xFFFD, 0xFFFD, 0x59},
+      {0x58, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x59},
   };
   CHECK_EQ(unicode_expected.size(), arraysize(cases));
   TestChunkStreamAgainstReference(cases, unicode_expected);
diff --git a/src/v8/test/cctest/parsing/test-scanner.cc b/src/v8/test/cctest/parsing/test-scanner.cc
index 9c18bfb..ea7a8fb 100644
--- a/src/v8/test/cctest/parsing/test-scanner.cc
+++ b/src/v8/test/cctest/parsing/test-scanner.cc
@@ -29,7 +29,6 @@
   std::unique_ptr<UnicodeCache> unicode_cache;
   std::unique_ptr<Utf16CharacterStream> stream;
   std::unique_ptr<Scanner> scanner;
-  int use_counts[v8::Isolate::kUseCounterFeatureCount];
 
   Scanner* operator->() const { return scanner.get(); }
   Scanner* get() const { return scanner.get(); }
@@ -39,11 +38,8 @@
   ScannerTestHelper helper;
   helper.unicode_cache = std::unique_ptr<UnicodeCache>(new UnicodeCache);
   helper.stream = ScannerStream::ForTesting(src);
-  for (int i = 0; i < v8::Isolate::kUseCounterFeatureCount; i++) {
-    helper.use_counts[i] = 0;
-  }
-  helper.scanner = std::unique_ptr<Scanner>(
-      new Scanner(helper.unicode_cache.get(), helper.use_counts));
+  helper.scanner =
+      std::unique_ptr<Scanner>(new Scanner(helper.unicode_cache.get()));
   helper.scanner->Initialize(helper.stream.get(), false);
   return helper;
 }
diff --git a/src/v8/test/cctest/print-extension.cc b/src/v8/test/cctest/print-extension.cc
index dcac797..226d37a 100644
--- a/src/v8/test/cctest/print-extension.cc
+++ b/src/v8/test/cctest/print-extension.cc
@@ -41,7 +41,7 @@
     if (i != 0) printf(" ");
     v8::HandleScope scope(args.GetIsolate());
     v8::String::Utf8Value str(args.GetIsolate(), args[i]);
-    if (*str == NULL) return;
+    if (*str == nullptr) return;
     printf("%s", *str);
   }
   printf("\n");
diff --git a/src/v8/test/cctest/profiler-extension.cc b/src/v8/test/cctest/profiler-extension.cc
index df5cec7..28fb146 100644
--- a/src/v8/test/cctest/profiler-extension.cc
+++ b/src/v8/test/cctest/profiler-extension.cc
@@ -53,8 +53,7 @@
   if (name->Equals(context, v8_str(isolate, "collectSample")).FromJust()) {
     return v8::FunctionTemplate::New(isolate, ProfilerExtension::CollectSample);
   }
-  CHECK(false);
-  return v8::Local<v8::FunctionTemplate>();
+  UNREACHABLE();
 }
 
 void ProfilerExtension::StartProfiling(
@@ -74,7 +73,7 @@
 
 void ProfilerExtension::CollectSample(
     const v8::FunctionCallbackInfo<v8::Value>& args) {
-  profiler_->CollectSample();
+  v8::CpuProfiler::CollectSample(args.GetIsolate());
 }
 
 }  // namespace internal
diff --git a/src/v8/test/cctest/scope-test-helper.h b/src/v8/test/cctest/scope-test-helper.h
index 7101ad6..b5b6df4 100644
--- a/src/v8/test/cctest/scope-test-helper.h
+++ b/src/v8/test/cctest/scope-test-helper.h
@@ -17,10 +17,6 @@
     return var->scope()->MustAllocateInContext(var);
   }
 
-  static void AllocateWithoutVariableResolution(Scope* scope) {
-    scope->AllocateVariablesRecursively();
-  }
-
   static void CompareScopes(Scope* baseline, Scope* scope,
                             bool precise_maybe_assigned) {
     CHECK_EQ(baseline->scope_type(), scope->scope_type());
@@ -109,6 +105,20 @@
       MarkInnerFunctionsAsSkipped(inner);
     }
   }
+
+  static bool HasSkippedFunctionInside(Scope* scope) {
+    if (scope->scope_type() == ScopeType::FUNCTION_SCOPE &&
+        scope->AsDeclarationScope()->is_skipped_function()) {
+      return true;
+    }
+    for (Scope* inner = scope->inner_scope(); inner != nullptr;
+         inner = inner->sibling()) {
+      if (HasSkippedFunctionInside(inner)) {
+        return true;
+      }
+    }
+    return false;
+  }
 };
 }  // namespace internal
 }  // namespace v8
diff --git a/src/v8/test/cctest/test-access-checks.cc b/src/v8/test/cctest/test-access-checks.cc
index f260a15..acea843 100644
--- a/src/v8/test/cctest/test-access-checks.cc
+++ b/src/v8/test/cctest/test-access-checks.cc
@@ -348,7 +348,7 @@
   isolate->SetFailedAccessCheckCallbackFunction([](v8::Local<v8::Object> target,
                                                    v8::AccessType type,
                                                    v8::Local<v8::Value> data) {
-    CHECK(false);  // This should never be called.
+    UNREACHABLE();  // This should never be called.
   });
 
   v8::HandleScope scope(isolate);
diff --git a/src/v8/test/cctest/test-accessors.cc b/src/v8/test/cctest/test-accessors.cc
index 070a1a0..6a68ef1 100644
--- a/src/v8/test/cctest/test-accessors.cc
+++ b/src/v8/test/cctest/test-accessors.cc
@@ -334,7 +334,7 @@
   v8::Isolate* isolate = context->GetIsolate();
   v8::HandleScope scope(isolate);
   v8::Local<v8::ObjectTemplate> obj = ObjectTemplate::New(isolate);
-  obj->SetAccessor(v8_str("xxx"), CheckAccessorArgsCorrect, NULL,
+  obj->SetAccessor(v8_str("xxx"), CheckAccessorArgsCorrect, nullptr,
                    v8_str("data"));
   v8::Local<v8::Object> inst =
       obj->NewInstance(context.local()).ToLocalChecked();
@@ -363,7 +363,7 @@
   v8::Isolate* isolate = context->GetIsolate();
   v8::HandleScope scope(isolate);
   v8::Local<v8::ObjectTemplate> obj = ObjectTemplate::New(isolate);
-  obj->SetAccessor(v8_str("xxx"), EmptyGetter, NULL, v8_str("data"));
+  obj->SetAccessor(v8_str("xxx"), EmptyGetter, nullptr, v8_str("data"));
   v8::Local<v8::Object> inst =
       obj->NewInstance(context.local()).ToLocalChecked();
   CHECK(
@@ -384,7 +384,7 @@
   v8::HandleScope scope(isolate);
   {
     v8::Local<v8::ObjectTemplate> obj = ObjectTemplate::New(isolate);
-    obj->SetAccessor(v8_str("xxx"), EmptyGetter, NULL, v8_str("data"));
+    obj->SetAccessor(v8_str("xxx"), EmptyGetter, nullptr, v8_str("data"));
     LocalContext context;
     v8::Local<v8::Object> inst =
         obj->NewInstance(context.local()).ToLocalChecked();
@@ -400,7 +400,7 @@
   }
   {
     v8::Local<v8::ObjectTemplate> obj = ObjectTemplate::New(isolate);
-    obj->SetAccessor(v8_str("xxx"), CheckAccessorArgsCorrect, NULL,
+    obj->SetAccessor(v8_str("xxx"), CheckAccessorArgsCorrect, nullptr,
                      v8_str("data"));
     LocalContext context;
     v8::Local<v8::Object> inst =
@@ -596,7 +596,7 @@
 
   v8::Local<v8::ObjectTemplate> obj = ObjectTemplate::New(isolate);
   obj->SetHandler(v8::NamedPropertyHandlerConfiguration(
-      JSONStringifyGetter, NULL, NULL, NULL, JSONStringifyEnumerator));
+      JSONStringifyGetter, nullptr, nullptr, nullptr, JSONStringifyEnumerator));
   CHECK(env->Global()
             ->Set(env.local(), v8_str("obj"),
                   obj->NewInstance(env.local()).ToLocalChecked())
@@ -647,10 +647,32 @@
       "    set : function() { set_value = this; }"
       "});"
       "function getter() { return x; }"
-      "function setter() { x = 1; }"
-      "for (var i = 0; i < 4; i++) { getter(); setter(); }");
-  CHECK(v8::Utils::OpenHandle(*CompileRun("getter()"))->IsJSGlobalProxy());
-  CHECK(v8::Utils::OpenHandle(*CompileRun("set_value"))->IsJSGlobalProxy());
+      "function setter() { x = 1; }");
+
+  Local<Script> check_getter = v8_compile("getter()");
+  Local<Script> check_setter = v8_compile("setter(); set_value");
+
+  // Ensure that LoadGlobalICs in getter and StoreGlobalICs setter get
+  // JSGlobalProxy as a receiver regardless of the current IC state and
+  // the order in which ICs are executed.
+  for (int i = 0; i < 10; i++) {
+    CHECK(
+        v8::Utils::OpenHandle(*check_getter->Run(env.local()).ToLocalChecked())
+            ->IsJSGlobalProxy());
+  }
+  for (int i = 0; i < 10; i++) {
+    CHECK(
+        v8::Utils::OpenHandle(*check_setter->Run(env.local()).ToLocalChecked())
+            ->IsJSGlobalProxy());
+  }
+  for (int i = 0; i < 10; i++) {
+    CHECK(
+        v8::Utils::OpenHandle(*check_getter->Run(env.local()).ToLocalChecked())
+            ->IsJSGlobalProxy());
+    CHECK(
+        v8::Utils::OpenHandle(*check_setter->Run(env.local()).ToLocalChecked())
+            ->IsJSGlobalProxy());
+  }
 }
 
 
diff --git a/src/v8/test/cctest/test-allocation.cc b/src/v8/test/cctest/test-allocation.cc
index f31b036..139829d 100644
--- a/src/v8/test/cctest/test-allocation.cc
+++ b/src/v8/test/cctest/test-allocation.cc
@@ -4,6 +4,12 @@
 #include <stdlib.h>
 #include <string.h>
 
+#if V8_OS_POSIX
+#include <setjmp.h>
+#include <signal.h>
+#include <unistd.h>  // NOLINT
+#endif
+
 #include "src/v8.h"
 
 #include "test/cctest/cctest.h"
@@ -17,7 +23,7 @@
 #include "src/allocation.h"
 #include "src/zone/accounting-allocator.h"
 
-// ASAN isn't configured to return NULL, so skip all of these tests.
+// ASAN isn't configured to return nullptr, so skip all of these tests.
 #if !defined(V8_USE_ADDRESS_SANITIZER) && !defined(MEMORY_SANITIZER) && \
     !defined(THREAD_SANITIZER)
 
@@ -35,6 +41,11 @@
 
   void OnCriticalMemoryPressure() override { oom_callback_called = true; }
 
+  bool OnCriticalMemoryPressure(size_t length) override {
+    oom_callback_called = true;
+    return true;
+  }
+
   static AllocationPlatform* current_platform;
   bool oom_callback_called = false;
 };
@@ -122,7 +133,7 @@
   // On failure, this won't return, since an AlignedAlloc failure is fatal.
   // In that case, behavior is checked in OnAlignedAllocOOM before exit.
   void* result = v8::internal::AlignedAlloc(GetHugeMemoryAmount(),
-                                            v8::base::OS::AllocateAlignment());
+                                            v8::internal::AllocatePageSize());
   // On a few systems, allocation somehow succeeds.
   CHECK_EQ(result == nullptr, platform.oom_callback_called);
 }
@@ -143,7 +154,7 @@
   CHECK(!platform.oom_callback_called);
   v8::internal::VirtualMemory result;
   bool success = v8::internal::AlignedAllocVirtualMemory(
-      GetHugeMemoryAmount(), v8::base::OS::AllocateAlignment(), nullptr,
+      GetHugeMemoryAmount(), v8::internal::AllocatePageSize(), nullptr,
       &result);
   // On a few systems, allocation somehow succeeds.
   CHECK_IMPLIES(success, result.IsReserved());
diff --git a/src/v8/test/cctest/test-api-accessors.cc b/src/v8/test/cctest/test-api-accessors.cc
index 85fb3bd..fad8c0b 100644
--- a/src/v8/test/cctest/test-api-accessors.cc
+++ b/src/v8/test/cctest/test-api-accessors.cc
@@ -245,7 +245,7 @@
 
   v8::Local<v8::ObjectTemplate> object_template = templ->InstanceTemplate();
   object_template->SetAccessor(
-      v8_str("foo"), NULL, Setter, v8::Local<v8::Value>(),
+      v8_str("foo"), nullptr, Setter, v8::Local<v8::Value>(),
       v8::AccessControl::DEFAULT, v8::PropertyAttribute::DontDelete);
 
   v8::Local<v8::Context> ctx =
diff --git a/src/v8/test/cctest/test-api-interceptors.cc b/src/v8/test/cctest/test-api-interceptors.cc
index 4880950..fd811ab 100644
--- a/src/v8/test/cctest/test-api-interceptors.cc
+++ b/src/v8/test/cctest/test-api-interceptors.cc
@@ -98,10 +98,10 @@
   SimpleAccessorSetter(Local<String>::Cast(sym->Name()), value, info);
 }
 
-void StringInterceptorGetter(
-    Local<String> name,
-    const v8::PropertyCallbackInfo<v8::Value>&
-        info) {  // Intercept names that start with 'interceptor_'.
+void InterceptorGetter(Local<Name> generic_name,
+                       const v8::PropertyCallbackInfo<v8::Value>& info) {
+  if (generic_name->IsSymbol()) return;
+  Local<String> name = Local<String>::Cast(generic_name);
   String::Utf8Value utf8(info.GetIsolate(), name);
   char* name_str = *utf8;
   char prefix[] = "interceptor_";
@@ -117,9 +117,10 @@
           .ToLocalChecked());
 }
 
-
-void StringInterceptorSetter(Local<String> name, Local<Value> value,
-                             const v8::PropertyCallbackInfo<v8::Value>& info) {
+void InterceptorSetter(Local<Name> generic_name, Local<Value> value,
+                       const v8::PropertyCallbackInfo<v8::Value>& info) {
+  if (generic_name->IsSymbol()) return;
+  Local<String> name = Local<String>::Cast(generic_name);
   // Intercept accesses that set certain integer values, for which the name does
   // not start with 'accessor_'.
   String::Utf8Value utf8(info.GetIsolate(), name);
@@ -140,18 +141,6 @@
   }
 }
 
-void InterceptorGetter(Local<Name> generic_name,
-                       const v8::PropertyCallbackInfo<v8::Value>& info) {
-  if (generic_name->IsSymbol()) return;
-  StringInterceptorGetter(Local<String>::Cast(generic_name), info);
-}
-
-void InterceptorSetter(Local<Name> generic_name, Local<Value> value,
-                       const v8::PropertyCallbackInfo<v8::Value>& info) {
-  if (generic_name->IsSymbol()) return;
-  StringInterceptorSetter(Local<String>::Cast(generic_name), value, info);
-}
-
 void GenericInterceptorGetter(Local<Name> generic_name,
                               const v8::PropertyCallbackInfo<v8::Value>& info) {
   Local<String> str;
@@ -198,19 +187,20 @@
   templ->PrototypeTemplate()->SetAccessor(name, getter, setter);
 }
 
-void AddInterceptor(Local<FunctionTemplate> templ,
-                    v8::NamedPropertyGetterCallback getter,
-                    v8::NamedPropertySetterCallback setter) {
-  templ->InstanceTemplate()->SetNamedPropertyHandler(getter, setter);
-}
-
-
 void AddAccessor(Local<FunctionTemplate> templ, Local<Name> name,
                  v8::AccessorNameGetterCallback getter,
                  v8::AccessorNameSetterCallback setter) {
   templ->PrototypeTemplate()->SetAccessor(name, getter, setter);
 }
 
+void AddStringOnlyInterceptor(Local<FunctionTemplate> templ,
+                              v8::GenericNamedPropertyGetterCallback getter,
+                              v8::GenericNamedPropertySetterCallback setter) {
+  templ->InstanceTemplate()->SetHandler(v8::NamedPropertyHandlerConfiguration(
+      getter, setter, nullptr, nullptr, nullptr, Local<v8::Value>(),
+      v8::PropertyHandlerFlags::kOnlyInterceptStrings));
+}
+
 void AddInterceptor(Local<FunctionTemplate> templ,
                     v8::GenericNamedPropertyGetterCallback getter,
                     v8::GenericNamedPropertySetterCallback setter) {
@@ -716,20 +706,21 @@
 void GetterCallbackOrder(Local<Name> property,
                          const v8::PropertyCallbackInfo<v8::Value>& info) {
   get_was_called_in_order = true;
-  CHECK(define_was_called_in_order);
+  CHECK(!define_was_called_in_order);
   info.GetReturnValue().Set(property);
 }
 
 void DefinerCallbackOrder(Local<Name> property,
                           const v8::PropertyDescriptor& desc,
                           const v8::PropertyCallbackInfo<v8::Value>& info) {
-  CHECK(!get_was_called_in_order);  // Define called before get.
+  // Get called before DefineProperty because we query the descriptor first.
+  CHECK(get_was_called_in_order);
   define_was_called_in_order = true;
 }
 
 }  // namespace
 
-// Check that definer callback is called before getter callback.
+// Check that getter callback is called before definer callback.
 THREADED_TEST(DefinerCallbackGetAndDefine) {
   v8::HandleScope scope(CcTest::isolate());
   v8::Local<v8::FunctionTemplate> templ =
@@ -1516,7 +1507,7 @@
 
   child->Inherit(parent);
   AddAccessor(parent, age, SymbolAccessorGetter, SymbolAccessorSetter);
-  AddInterceptor(child, StringInterceptorGetter, StringInterceptorSetter);
+  AddStringOnlyInterceptor(child, InterceptorGetter, InterceptorSetter);
 
   env->Global()
       ->Set(env.local(), v8_str("Child"),
@@ -2283,7 +2274,7 @@
   desc->InstanceTemplate()->SetHandler(v8::NamedPropertyHandlerConfiguration(
       PrePropertyHandlerGet, 0, PrePropertyHandlerQuery));
   is_bootstrapping = true;
-  LocalContext env(NULL, desc->InstanceTemplate());
+  LocalContext env(nullptr, desc->InstanceTemplate());
   is_bootstrapping = false;
   CompileRun("var pre = 'Object: pre'; var on = 'Object: on';");
   v8::Local<Value> result_pre = CompileRun("pre");
@@ -3251,10 +3242,10 @@
   v8::Isolate* isolate = CcTest::isolate();
   v8::HandleScope scope(isolate);
   v8::Local<v8::ObjectTemplate> obj = ObjectTemplate::New(isolate);
-  obj->SetHandler(v8::NamedPropertyHandlerConfiguration(NoBlockGetterX, NULL,
-                                                        NULL, PDeleter, NULL));
+  obj->SetHandler(v8::NamedPropertyHandlerConfiguration(
+      NoBlockGetterX, nullptr, nullptr, PDeleter, nullptr));
   obj->SetHandler(v8::IndexedPropertyHandlerConfiguration(
-      NoBlockGetterI, NULL, NULL, IDeleter, NULL));
+      NoBlockGetterI, nullptr, nullptr, IDeleter, nullptr));
   LocalContext context;
   context->Global()
       ->Set(context.local(), v8_str("k"),
@@ -3360,10 +3351,10 @@
   v8::Isolate* isolate = CcTest::isolate();
   v8::HandleScope scope(isolate);
   v8::Local<v8::ObjectTemplate> obj = ObjectTemplate::New(isolate);
-  obj->SetHandler(
-      v8::NamedPropertyHandlerConfiguration(GetK, NULL, NULL, NULL, NamedEnum));
+  obj->SetHandler(v8::NamedPropertyHandlerConfiguration(GetK, nullptr, nullptr,
+                                                        nullptr, NamedEnum));
   obj->SetHandler(v8::IndexedPropertyHandlerConfiguration(
-      IndexedGetK, NULL, NULL, NULL, IndexedEnum));
+      IndexedGetK, nullptr, nullptr, nullptr, IndexedEnum));
   LocalContext context;
   context->Global()
       ->Set(context.local(), v8_str("k"),
@@ -4386,7 +4377,7 @@
   CompileRun(
       "Number.prototype.__proto__ = new Bug;"
       "var x;"
-      "x = 0xdead;"
+      "x = 0xDEAD;"
       "x.boom = 0;"
       "x = 's';"
       "x.boom = 0;"
@@ -4452,9 +4443,9 @@
   obj_template->Set(v8_str("7"), v8::Integer::New(CcTest::isolate(), 7));
   obj_template->Set(v8_str("x"), v8::Integer::New(CcTest::isolate(), 42));
   obj_template->SetHandler(v8::IndexedPropertyHandlerConfiguration(
-      NULL, NULL, NULL, NULL, IndexedPropertyEnumerator));
+      nullptr, nullptr, nullptr, nullptr, IndexedPropertyEnumerator));
   obj_template->SetHandler(v8::NamedPropertyHandlerConfiguration(
-      NULL, NULL, NULL, NULL, NamedPropertyEnumerator));
+      nullptr, nullptr, nullptr, nullptr, NamedPropertyEnumerator));
 
   LocalContext context;
   v8::Local<v8::Object> global = context->Global();
@@ -4519,7 +4510,7 @@
   obj_template->Set(v8_str("x"), v8::Integer::New(CcTest::isolate(), 42));
   // First just try a failing indexed interceptor.
   obj_template->SetHandler(v8::IndexedPropertyHandlerConfiguration(
-      NULL, NULL, NULL, NULL, IndexedPropertyEnumeratorException));
+      nullptr, nullptr, nullptr, nullptr, IndexedPropertyEnumeratorException));
 
   LocalContext context;
   v8::Local<v8::Object> global = context->Global();
@@ -4565,7 +4556,7 @@
   obj_template->Set(v8_str("x"), v8::Integer::New(CcTest::isolate(), 42));
   // First just try a failing indexed interceptor.
   obj_template->SetHandler(v8::NamedPropertyHandlerConfiguration(
-      NULL, NULL, NULL, NULL, NamedPropertyEnumeratorException));
+      nullptr, nullptr, nullptr, nullptr, NamedPropertyEnumeratorException));
 
   LocalContext context;
   v8::Local<v8::Object> global = context->Global();
@@ -5067,7 +5058,7 @@
   v8::HandleScope scope(isolate);
   v8::Local<v8::ObjectTemplate> obj = ObjectTemplate::New(isolate);
   obj->SetHandler(v8::NamedPropertyHandlerConfiguration(
-      ConcatNamedPropertyGetter, NULL, RestrictiveNamedQuery, NULL,
+      ConcatNamedPropertyGetter, nullptr, RestrictiveNamedQuery, nullptr,
       EnumCallbackWithNames));
   LocalContext context;
   context->Global()
@@ -5118,7 +5109,7 @@
   v8::HandleScope scope(isolate);
   v8::Local<v8::ObjectTemplate> obj = ObjectTemplate::New(isolate);
   obj->SetHandler(v8::NamedPropertyHandlerConfiguration(
-      ConcatNamedPropertyGetter, NULL, QueryInterceptorForFoo, NULL,
+      ConcatNamedPropertyGetter, nullptr, QueryInterceptorForFoo, nullptr,
       EnumCallbackWithNames));
   LocalContext context;
   context->Global()
@@ -5140,7 +5131,7 @@
   v8::HandleScope scope(isolate);
   v8::Local<v8::ObjectTemplate> obj = ObjectTemplate::New(isolate);
   obj->SetHandler(v8::IndexedPropertyHandlerConfiguration(
-      ConcatIndexedPropertyGetter, NULL, RestrictiveIndexedQuery, NULL,
+      ConcatIndexedPropertyGetter, nullptr, RestrictiveIndexedQuery, nullptr,
       SloppyArgsIndexedPropertyEnumerator));
   LocalContext context;
   context->Global()
@@ -5175,7 +5166,7 @@
   v8::HandleScope scope(isolate);
   v8::Local<v8::ObjectTemplate> obj = ObjectTemplate::New(isolate);
   obj->SetHandler(v8::IndexedPropertyHandlerConfiguration(
-      ConcatIndexedPropertyGetter, NULL, RestrictiveIndexedQuery, NULL,
+      ConcatIndexedPropertyGetter, nullptr, RestrictiveIndexedQuery, nullptr,
       EnumCallbackWithIndices));
   LocalContext context;
   context->Global()
@@ -5207,7 +5198,8 @@
   v8::HandleScope scope(isolate);
   v8::Local<v8::ObjectTemplate> obj = ObjectTemplate::New(isolate);
   obj->SetHandler(v8::NamedPropertyHandlerConfiguration(
-      ConcatNamedPropertyGetter, NULL, RestrictiveNamedQuery, NULL, NamedEnum));
+      ConcatNamedPropertyGetter, nullptr, RestrictiveNamedQuery, nullptr,
+      NamedEnum));
   LocalContext context;
   context->Global()
       ->Set(context.local(), v8_str("obj"),
diff --git a/src/v8/test/cctest/test-api.cc b/src/v8/test/cctest/test-api.cc
index 7dfe54e..73dc19a 100644
--- a/src/v8/test/cctest/test-api.cc
+++ b/src/v8/test/cctest/test-api.cc
@@ -72,6 +72,7 @@
 using ::v8::Maybe;
 using ::v8::Message;
 using ::v8::MessageCallback;
+using ::v8::Module;
 using ::v8::Name;
 using ::v8::None;
 using ::v8::Object;
@@ -434,7 +435,7 @@
 
 class TestResource: public String::ExternalStringResource {
  public:
-  explicit TestResource(uint16_t* data, int* counter = NULL,
+  explicit TestResource(uint16_t* data, int* counter = nullptr,
                         bool owning_data = true)
       : data_(data), length_(0), counter_(counter), owning_data_(owning_data) {
     while (data[length_]) ++length_;
@@ -442,7 +443,7 @@
 
   ~TestResource() {
     if (owning_data_) i::DeleteArray(data_);
-    if (counter_ != NULL) ++*counter_;
+    if (counter_ != nullptr) ++*counter_;
   }
 
   const uint16_t* data() const {
@@ -463,7 +464,7 @@
 
 class TestOneByteResource : public String::ExternalOneByteStringResource {
  public:
-  explicit TestOneByteResource(const char* data, int* counter = NULL,
+  explicit TestOneByteResource(const char* data, int* counter = nullptr,
                                size_t offset = 0)
       : orig_data_(data),
         data_(data + offset),
@@ -472,7 +473,7 @@
 
   ~TestOneByteResource() {
     i::DeleteArray(orig_data_);
-    if (counter_ != NULL) ++*counter_;
+    if (counter_ != nullptr) ++*counter_;
   }
 
   const char* data() const {
@@ -677,12 +678,12 @@
 
   // Turn into external string with unaligned resource data.
   const char* c_cons = "_abcdefghijklmnopqrstuvwxyz";
-  bool success =
-      cons->MakeExternal(new TestOneByteResource(i::StrDup(c_cons), NULL, 1));
+  bool success = cons->MakeExternal(
+      new TestOneByteResource(i::StrDup(c_cons), nullptr, 1));
   CHECK(success);
   const char* c_slice = "_bcdefghijklmnopqrstuvwxyz";
-  success =
-      slice->MakeExternal(new TestOneByteResource(i::StrDup(c_slice), NULL, 1));
+  success = slice->MakeExternal(
+      new TestOneByteResource(i::StrDup(c_slice), nullptr, 1));
   CHECK(success);
 
   // Trigger GCs and force evacuation.
@@ -1389,10 +1390,10 @@
   expected_ptr = reinterpret_cast<void*>(1);
   TestExternalPointerWrapping();
 
-  expected_ptr = reinterpret_cast<void*>(0xdeadbeef);
+  expected_ptr = reinterpret_cast<void*>(0xDEADBEEF);
   TestExternalPointerWrapping();
 
-  expected_ptr = reinterpret_cast<void*>(0xdeadbeef + 1);
+  expected_ptr = reinterpret_cast<void*>(0xDEADBEEF + 1);
   TestExternalPointerWrapping();
 
 #if defined(V8_HOST_ARCH_X64)
@@ -1400,10 +1401,10 @@
   expected_ptr = reinterpret_cast<void*>(0x400000000);
   TestExternalPointerWrapping();
 
-  expected_ptr = reinterpret_cast<void*>(0xdeadbeefdeadbeef);
+  expected_ptr = reinterpret_cast<void*>(0xDEADBEEFDEADBEEF);
   TestExternalPointerWrapping();
 
-  expected_ptr = reinterpret_cast<void*>(0xdeadbeefdeadbeef + 1);
+  expected_ptr = reinterpret_cast<void*>(0xDEADBEEFDEADBEEF + 1);
   TestExternalPointerWrapping();
 #endif
 }
@@ -1523,7 +1524,7 @@
     // The code will not be run in that case, due to the "if" guard.
     int32_t value =
         static_cast<int32_t>(static_cast<uint32_t>(i::Smi::kMaxValue) + 1);
-    CHECK(value > i::Smi::kMaxValue);
+    CHECK_GT(value, i::Smi::kMaxValue);
     CHECK(!i::Smi::IsValid(value));
 
     Local<v8::Integer> value_obj = v8::Integer::New(isolate, value);
@@ -2599,7 +2600,7 @@
           ->Get(context, v8_str("callFunctionRecursively"))
           .ToLocalChecked();
   args.GetReturnValue().Set(function.As<Function>()
-                                ->Call(context, args.This(), 0, NULL)
+                                ->Call(context, args.This(), 0, nullptr)
                                 .ToLocalChecked());
 }
 
@@ -2612,7 +2613,7 @@
               v8::FunctionTemplate::New(isolate, CallScriptRecursivelyCall));
   global->Set(v8_str("callFunctionRecursively"),
               v8::FunctionTemplate::New(isolate, CallFunctionRecursivelyCall));
-  LocalContext env(NULL, global);
+  LocalContext env(nullptr, global);
 
   CHECK(env->Global()
             ->Set(env.local(), v8_str("depth"), v8::Integer::New(isolate, 0))
@@ -2717,7 +2718,7 @@
   v8::HandleScope scope(isolate);
   Local<v8::ObjectTemplate> global_template = v8::ObjectTemplate::New(isolate);
   global_template->SetInternalFieldCount(1);
-  LocalContext env(NULL, global_template);
+  LocalContext env(nullptr, global_template);
   v8::Local<v8::Object> global_proxy = env->Global();
   v8::Local<v8::Object> global = global_proxy->GetPrototype().As<v8::Object>();
   CHECK_EQ(1, global->InternalFieldCount());
@@ -2758,7 +2759,7 @@
                               .ToLocalChecked();
   CHECK_EQ(1, obj->InternalFieldCount());
 
-  CheckAlignedPointerInInternalField(obj, NULL);
+  CheckAlignedPointerInInternalField(obj, nullptr);
 
   int* heap_allocated = new int[100];
   CheckAlignedPointerInInternalField(obj, heap_allocated);
@@ -2828,7 +2829,7 @@
   LocalContext env;
   v8::HandleScope scope(env->GetIsolate());
 
-  CheckAlignedPointerInEmbedderData(&env, 0, NULL);
+  CheckAlignedPointerInEmbedderData(&env, 0, nullptr);
 
   int* heap_allocated = new int[100];
   CheckAlignedPointerInEmbedderData(&env, 1, heap_allocated);
@@ -2939,7 +2940,7 @@
   CHECK_EQ(hash1, hash2);
   {
     // Re-attach global proxy to a new context, hash should stay the same.
-    LocalContext env2(NULL, Local<ObjectTemplate>(), global_proxy);
+    LocalContext env2(nullptr, Local<ObjectTemplate>(), global_proxy);
     int hash3 = global_proxy->GetIdentityHash();
     CHECK_EQ(hash1, hash3);
   }
@@ -3527,7 +3528,7 @@
 
   CHECK_EQ(1024, static_cast<int>(ab_contents.ByteLength()));
   uint8_t* data = static_cast<uint8_t*>(ab_contents.Data());
-  CHECK(data != NULL);
+  CHECK_NOT_NULL(data);
   CHECK(env->Global()->Set(env.local(), v8_str("ab"), ab).FromJust());
 
   v8::Local<v8::Value> result = CompileRun("ab.byteLength");
@@ -3781,8 +3782,8 @@
   ScopedArrayBufferContents contents(ab->Externalize());
 
   // Array buffers should have normal allocation mode.
-  CHECK(contents.AllocationMode() ==
-        v8::ArrayBuffer::Allocator::AllocationMode::kNormal);
+  CHECK_EQ(contents.AllocationMode(),
+           v8::ArrayBuffer::Allocator::AllocationMode::kNormal);
   // The allocation must contain the buffer (normally they will be equal, but
   // this is not required by the contract).
   CHECK_NOT_NULL(contents.AllocationBase());
@@ -3830,7 +3831,7 @@
 
   CHECK_EQ(1024, static_cast<int>(ab_contents.ByteLength()));
   uint8_t* data = static_cast<uint8_t*>(ab_contents.Data());
-  CHECK(data != NULL);
+  CHECK_NOT_NULL(data);
   CHECK(env->Global()->Set(env.local(), v8_str("ab"), ab).FromJust());
 
   v8::Local<v8::Value> result = CompileRun("ab.byteLength");
@@ -4867,86 +4868,6 @@
 }
 
 
-TEST(NativeWeakMap) {
-  v8::Isolate* isolate = CcTest::isolate();
-  HandleScope scope(isolate);
-  Local<v8::NativeWeakMap> weak_map(v8::NativeWeakMap::New(isolate));
-  CHECK(!weak_map.IsEmpty());
-
-  LocalContext env;
-  Local<Object> value = v8::Object::New(isolate);
-
-  Local<Object> local1 = v8::Object::New(isolate);
-  CHECK(!weak_map->Has(local1));
-  CHECK(weak_map->Get(local1)->IsUndefined());
-  weak_map->Set(local1, value);
-  CHECK(weak_map->Has(local1));
-  CHECK(value->Equals(env.local(), weak_map->Get(local1)).FromJust());
-
-  WeakCallCounter counter(1234);
-  WeakCallCounterAndPersistent<Value> o1(&counter);
-  WeakCallCounterAndPersistent<Value> o2(&counter);
-  WeakCallCounterAndPersistent<Value> s1(&counter);
-  {
-    HandleScope scope(isolate);
-    Local<v8::Object> obj1 = v8::Object::New(isolate);
-    Local<v8::Object> obj2 = v8::Object::New(isolate);
-    Local<v8::Symbol> sym1 = v8::Symbol::New(isolate);
-
-    weak_map->Set(obj1, value);
-    weak_map->Set(obj2, value);
-    weak_map->Set(sym1, value);
-
-    o1.handle.Reset(isolate, obj1);
-    o2.handle.Reset(isolate, obj2);
-    s1.handle.Reset(isolate, sym1);
-
-    CHECK(weak_map->Has(local1));
-    CHECK(weak_map->Has(obj1));
-    CHECK(weak_map->Has(obj2));
-    CHECK(weak_map->Has(sym1));
-
-    CHECK(value->Equals(env.local(), weak_map->Get(local1)).FromJust());
-    CHECK(value->Equals(env.local(), weak_map->Get(obj1)).FromJust());
-    CHECK(value->Equals(env.local(), weak_map->Get(obj2)).FromJust());
-    CHECK(value->Equals(env.local(), weak_map->Get(sym1)).FromJust());
-  }
-  CcTest::CollectAllGarbage();
-  {
-    HandleScope scope(isolate);
-    CHECK(value->Equals(env.local(), weak_map->Get(local1)).FromJust());
-    CHECK(value->Equals(env.local(),
-                        weak_map->Get(Local<Value>::New(isolate, o1.handle)))
-              .FromJust());
-    CHECK(value->Equals(env.local(),
-                        weak_map->Get(Local<Value>::New(isolate, o2.handle)))
-              .FromJust());
-    CHECK(value->Equals(env.local(),
-                        weak_map->Get(Local<Value>::New(isolate, s1.handle)))
-              .FromJust());
-  }
-
-  o1.handle.SetWeak(&o1, &WeakPointerCallback,
-                    v8::WeakCallbackType::kParameter);
-  o2.handle.SetWeak(&o2, &WeakPointerCallback,
-                    v8::WeakCallbackType::kParameter);
-  s1.handle.SetWeak(&s1, &WeakPointerCallback,
-                    v8::WeakCallbackType::kParameter);
-
-  CcTest::CollectAllGarbage();
-  CHECK_EQ(3, counter.NumberOfWeakCalls());
-
-  CHECK(o1.handle.IsEmpty());
-  CHECK(o2.handle.IsEmpty());
-  CHECK(s1.handle.IsEmpty());
-
-  CHECK(value->Equals(env.local(), weak_map->Get(local1)).FromJust());
-  CHECK(weak_map->Delete(local1));
-  CHECK(!weak_map->Has(local1));
-  CHECK(weak_map->Get(local1)->IsUndefined());
-}
-
-
 THREADED_TEST(GetSetProperty) {
   LocalContext context;
   v8::Isolate* isolate = context->GetIsolate();
@@ -5255,7 +5176,7 @@
           ->Get(context.local(), v8_str("ReturnThisStrict"))
           .ToLocalChecked());
 
-  v8::Local<Value>* args0 = NULL;
+  v8::Local<Value>* args0 = nullptr;
   Local<v8::Array> a0 = Local<v8::Array>::Cast(
       Foo->Call(context.local(), Foo, 0, args0).ToLocalChecked());
   CHECK_EQ(0u, a0->Length());
@@ -5322,47 +5243,49 @@
                       .FromJust());
 
   Local<v8::Value> r1 =
-      ReturnThisSloppy->Call(context.local(), v8::Undefined(isolate), 0, NULL)
+      ReturnThisSloppy
+          ->Call(context.local(), v8::Undefined(isolate), 0, nullptr)
           .ToLocalChecked();
   CHECK(r1->StrictEquals(context->Global()));
   Local<v8::Value> r2 =
-      ReturnThisSloppy->Call(context.local(), v8::Null(isolate), 0, NULL)
+      ReturnThisSloppy->Call(context.local(), v8::Null(isolate), 0, nullptr)
           .ToLocalChecked();
   CHECK(r2->StrictEquals(context->Global()));
   Local<v8::Value> r3 =
-      ReturnThisSloppy->Call(context.local(), v8_num(42), 0, NULL)
+      ReturnThisSloppy->Call(context.local(), v8_num(42), 0, nullptr)
           .ToLocalChecked();
   CHECK(r3->IsNumberObject());
   CHECK_EQ(42.0, r3.As<v8::NumberObject>()->ValueOf());
   Local<v8::Value> r4 =
-      ReturnThisSloppy->Call(context.local(), v8_str("hello"), 0, NULL)
+      ReturnThisSloppy->Call(context.local(), v8_str("hello"), 0, nullptr)
           .ToLocalChecked();
   CHECK(r4->IsStringObject());
   CHECK(r4.As<v8::StringObject>()->ValueOf()->StrictEquals(v8_str("hello")));
   Local<v8::Value> r5 =
-      ReturnThisSloppy->Call(context.local(), v8::True(isolate), 0, NULL)
+      ReturnThisSloppy->Call(context.local(), v8::True(isolate), 0, nullptr)
           .ToLocalChecked();
   CHECK(r5->IsBooleanObject());
   CHECK(r5.As<v8::BooleanObject>()->ValueOf());
 
   Local<v8::Value> r6 =
-      ReturnThisStrict->Call(context.local(), v8::Undefined(isolate), 0, NULL)
+      ReturnThisStrict
+          ->Call(context.local(), v8::Undefined(isolate), 0, nullptr)
           .ToLocalChecked();
   CHECK(r6->IsUndefined());
   Local<v8::Value> r7 =
-      ReturnThisStrict->Call(context.local(), v8::Null(isolate), 0, NULL)
+      ReturnThisStrict->Call(context.local(), v8::Null(isolate), 0, nullptr)
           .ToLocalChecked();
   CHECK(r7->IsNull());
   Local<v8::Value> r8 =
-      ReturnThisStrict->Call(context.local(), v8_num(42), 0, NULL)
+      ReturnThisStrict->Call(context.local(), v8_num(42), 0, nullptr)
           .ToLocalChecked();
   CHECK(r8->StrictEquals(v8_num(42)));
   Local<v8::Value> r9 =
-      ReturnThisStrict->Call(context.local(), v8_str("hello"), 0, NULL)
+      ReturnThisStrict->Call(context.local(), v8_str("hello"), 0, nullptr)
           .ToLocalChecked();
   CHECK(r9->StrictEquals(v8_str("hello")));
   Local<v8::Value> r10 =
-      ReturnThisStrict->Call(context.local(), v8::True(isolate), 0, NULL)
+      ReturnThisStrict->Call(context.local(), v8::True(isolate), 0, nullptr)
           .ToLocalChecked();
   CHECK(r10->StrictEquals(v8::True(isolate)));
 }
@@ -5383,7 +5306,7 @@
   Local<Function> Foo = Local<Function>::Cast(
       context->Global()->Get(context.local(), v8_str("Foo")).ToLocalChecked());
 
-  v8::Local<Value>* args0 = NULL;
+  v8::Local<Value>* args0 = nullptr;
   Local<v8::Array> a0 = Local<v8::Array>::Cast(
       Foo->NewInstance(context.local(), 0, args0).ToLocalChecked());
   CHECK_EQ(0u, a0->Length());
@@ -5462,52 +5385,45 @@
   CHECK_EQ(5312874545152.0,
            obj->ToNumber(env.local()).ToLocalChecked()->Value());
   CHECK_EQ(0, obj->ToInt32(env.local()).ToLocalChecked()->Value());
-  CHECK(0u ==
-        obj->ToUint32(env.local())
-            .ToLocalChecked()
-            ->Value());  // NOLINT - no CHECK_EQ for unsigned.
+  CHECK_EQ(0, obj->ToUint32(env.local()).ToLocalChecked()->Value());
   // Large number.
   CompileRun("var obj = -1234567890123;");
   obj = env->Global()->Get(env.local(), v8_str("obj")).ToLocalChecked();
   CHECK_EQ(-1234567890123.0,
            obj->ToNumber(env.local()).ToLocalChecked()->Value());
   CHECK_EQ(-1912276171, obj->ToInt32(env.local()).ToLocalChecked()->Value());
-  CHECK(2382691125u ==
-        obj->ToUint32(env.local()).ToLocalChecked()->Value());  // NOLINT
+  CHECK_EQ(2382691125, obj->ToUint32(env.local()).ToLocalChecked()->Value());
   // Small positive integer.
   CompileRun("var obj = 42;");
   obj = env->Global()->Get(env.local(), v8_str("obj")).ToLocalChecked();
   CHECK_EQ(42.0, obj->ToNumber(env.local()).ToLocalChecked()->Value());
   CHECK_EQ(42, obj->ToInt32(env.local()).ToLocalChecked()->Value());
-  CHECK(42u == obj->ToUint32(env.local()).ToLocalChecked()->Value());  // NOLINT
+  CHECK_EQ(42, obj->ToUint32(env.local()).ToLocalChecked()->Value());
   // Negative integer.
   CompileRun("var obj = -37;");
   obj = env->Global()->Get(env.local(), v8_str("obj")).ToLocalChecked();
   CHECK_EQ(-37.0, obj->ToNumber(env.local()).ToLocalChecked()->Value());
   CHECK_EQ(-37, obj->ToInt32(env.local()).ToLocalChecked()->Value());
-  CHECK(4294967259u ==
-        obj->ToUint32(env.local()).ToLocalChecked()->Value());  // NOLINT
+  CHECK_EQ(4294967259, obj->ToUint32(env.local()).ToLocalChecked()->Value());
   // Positive non-int32 integer.
   CompileRun("var obj = 0x81234567;");
   obj = env->Global()->Get(env.local(), v8_str("obj")).ToLocalChecked();
   CHECK_EQ(2166572391.0, obj->ToNumber(env.local()).ToLocalChecked()->Value());
   CHECK_EQ(-2128394905, obj->ToInt32(env.local()).ToLocalChecked()->Value());
-  CHECK(2166572391u ==
-        obj->ToUint32(env.local()).ToLocalChecked()->Value());  // NOLINT
+  CHECK_EQ(2166572391, obj->ToUint32(env.local()).ToLocalChecked()->Value());
   // Fraction.
   CompileRun("var obj = 42.3;");
   obj = env->Global()->Get(env.local(), v8_str("obj")).ToLocalChecked();
   CHECK_EQ(42.3, obj->ToNumber(env.local()).ToLocalChecked()->Value());
   CHECK_EQ(42, obj->ToInt32(env.local()).ToLocalChecked()->Value());
-  CHECK(42u == obj->ToUint32(env.local()).ToLocalChecked()->Value());  // NOLINT
+  CHECK_EQ(42, obj->ToUint32(env.local()).ToLocalChecked()->Value());
   // Large negative fraction.
   CompileRun("var obj = -5726623061.75;");
   obj = env->Global()->Get(env.local(), v8_str("obj")).ToLocalChecked();
   CHECK_EQ(-5726623061.75,
            obj->ToNumber(env.local()).ToLocalChecked()->Value());
   CHECK_EQ(-1431655765, obj->ToInt32(env.local()).ToLocalChecked()->Value());
-  CHECK(2863311531u ==
-        obj->ToUint32(env.local()).ToLocalChecked()->Value());  // NOLINT
+  CHECK_EQ(2863311531, obj->ToUint32(env.local()).ToLocalChecked()->Value());
 }
 
 
@@ -5780,23 +5696,55 @@
 
 static void check_custom_rethrowing_message(v8::Local<v8::Message> message,
                                             v8::Local<v8::Value> data) {
+  CHECK(data->IsExternal());
+  int* callcount = static_cast<int*>(data.As<v8::External>()->Value());
+  ++*callcount;
+
   const char* uncaught_error = "Uncaught exception";
   CHECK(message->Get()
             ->Equals(CcTest::isolate()->GetCurrentContext(),
                      v8_str(uncaught_error))
             .FromJust());
+  // Test that compiling code inside a message handler works.
+  CHECK(CompileRunChecked(CcTest::isolate(), "(function(a) { return a; })(42)")
+            ->Equals(CcTest::isolate()->GetCurrentContext(),
+                     v8::Integer::NewFromUnsigned(CcTest::isolate(), 42))
+            .FromJust());
 }
 
 
 TEST(CustomErrorRethrowsOnToString) {
+  int callcount = 0;
   LocalContext context;
-  v8::HandleScope scope(context->GetIsolate());
-  context->GetIsolate()->AddMessageListener(check_custom_rethrowing_message);
+  v8::Isolate* isolate = context->GetIsolate();
+  v8::HandleScope scope(isolate);
+  context->GetIsolate()->AddMessageListener(
+      check_custom_rethrowing_message, v8::External::New(isolate, &callcount));
 
   CompileRun(
       "var e = { toString: function() { throw e; } };"
       "try { throw e; } finally {}");
 
+  CHECK_EQ(callcount, 1);
+  context->GetIsolate()->RemoveMessageListeners(
+      check_custom_rethrowing_message);
+}
+
+TEST(CustomErrorRethrowsOnToStringInsideVerboseTryCatch) {
+  int callcount = 0;
+  LocalContext context;
+  v8::Isolate* isolate = context->GetIsolate();
+  v8::HandleScope scope(isolate);
+  v8::TryCatch try_catch(isolate);
+  try_catch.SetVerbose(true);
+  context->GetIsolate()->AddMessageListener(
+      check_custom_rethrowing_message, v8::External::New(isolate, &callcount));
+
+  CompileRun(
+      "var e = { toString: function() { throw e; } };"
+      "try { throw e; } finally {}");
+
+  CHECK_EQ(callcount, 1);
   context->GetIsolate()->RemoveMessageListeners(
       check_custom_rethrowing_message);
 }
@@ -6451,7 +6399,7 @@
   v8::Isolate* isolate = context->GetIsolate();
   v8::HandleScope scope(isolate);
   Local<ObjectTemplate> templ = ObjectTemplate::New(isolate);
-  templ->SetAccessor(v8_str("x"), GetXValue, NULL, v8_str("donut"));
+  templ->SetAccessor(v8_str("x"), GetXValue, nullptr, v8_str("donut"));
   CHECK(context->Global()
             ->Set(context.local(), v8_str("obj"),
                   templ->NewInstance(context.local()).ToLocalChecked())
@@ -6469,7 +6417,7 @@
   v8::Isolate* isolate = context->GetIsolate();
   v8::HandleScope scope(isolate);
   Local<ObjectTemplate> templ = ObjectTemplate::New(isolate);
-  templ->SetAccessor(v8_str("x"), GetXValue, NULL, v8_str("donut"));
+  templ->SetAccessor(v8_str("x"), GetXValue, nullptr, v8_str("donut"));
   CHECK(context->Global()
             ->Set(context.local(), v8_str("obj"),
                   templ->NewInstance(context.local()).ToLocalChecked())
@@ -6521,7 +6469,7 @@
   v8::Isolate* isolate = CcTest::isolate();
   v8::HandleScope scope(isolate);
   Local<ObjectTemplate> templ = ObjectTemplate::New(isolate);
-  templ->SetAccessor(v8_str("x"), GetXValue, NULL, v8_str("donut"));
+  templ->SetAccessor(v8_str("x"), GetXValue, nullptr, v8_str("donut"));
   LocalContext context;
   CHECK(context->Global()
             ->Set(context.local(), v8_str("obj"),
@@ -6593,7 +6541,7 @@
   CHECK(CompileRun("obj2.x")->IsUndefined());
 
   CHECK(GetGlobalProperty(&context, "obj1")
-            ->SetAccessor(context.local(), v8_str("x"), GetXValue, NULL,
+            ->SetAccessor(context.local(), v8_str("x"), GetXValue, nullptr,
                           v8_str("donut"))
             .FromJust());
 
@@ -6601,7 +6549,7 @@
   CHECK(CompileRun("obj2.x")->IsUndefined());
 
   CHECK(GetGlobalProperty(&context, "obj2")
-            ->SetAccessor(context.local(), v8_str("x"), GetXValue, NULL,
+            ->SetAccessor(context.local(), v8_str("x"), GetXValue, nullptr,
                           v8_str("donut"))
             .FromJust());
 
@@ -6629,11 +6577,11 @@
   ExpectTrue("Object.getOwnPropertyDescriptor(obj2, 'x').configurable");
 
   CHECK(GetGlobalProperty(&context, "obj1")
-            ->SetAccessor(context.local(), v8_str("x"), GetXValue, NULL,
+            ->SetAccessor(context.local(), v8_str("x"), GetXValue, nullptr,
                           v8_str("donut"))
             .FromJust());
   CHECK(GetGlobalProperty(&context, "obj2")
-            ->SetAccessor(context.local(), v8_str("x"), GetXValue, NULL,
+            ->SetAccessor(context.local(), v8_str("x"), GetXValue, nullptr,
                           v8_str("donut"))
             .FromJust());
 
@@ -6657,13 +6605,13 @@
   ExpectString("obj2.x", "z");
 
   CHECK(!GetGlobalProperty(&context, "obj1")
-            ->SetAccessor(context.local(), v8_str("x"), GetXValue, NULL,
-                          v8_str("donut"))
-            .FromJust());
+             ->SetAccessor(context.local(), v8_str("x"), GetXValue, nullptr,
+                           v8_str("donut"))
+             .FromJust());
   CHECK(!GetGlobalProperty(&context, "obj2")
-            ->SetAccessor(context.local(), v8_str("x"), GetXValue, NULL,
-                          v8_str("donut"))
-            .FromJust());
+             ->SetAccessor(context.local(), v8_str("x"), GetXValue, nullptr,
+                           v8_str("donut"))
+             .FromJust());
 
   ExpectString("obj1.x", "z");
   ExpectString("obj2.x", "z");
@@ -6683,11 +6631,11 @@
   CompileRun("var obj2 = {};");
 
   CHECK(GetGlobalProperty(&context, "obj1")
-            ->SetAccessor(context.local(), v8_str("x"), GetXValue, NULL,
+            ->SetAccessor(context.local(), v8_str("x"), GetXValue, nullptr,
                           v8_str("donut"), v8::DEFAULT, v8::DontDelete)
             .FromJust());
   CHECK(GetGlobalProperty(&context, "obj2")
-            ->SetAccessor(context.local(), v8_str("x"), GetXValue, NULL,
+            ->SetAccessor(context.local(), v8_str("x"), GetXValue, nullptr,
                           v8_str("donut"), v8::DEFAULT, v8::DontDelete)
             .FromJust());
 
@@ -6698,13 +6646,13 @@
   ExpectTrue("!Object.getOwnPropertyDescriptor(obj2, 'x').configurable");
 
   CHECK(!GetGlobalProperty(&context, "obj1")
-            ->SetAccessor(context.local(), v8_str("x"), GetXValue, NULL,
-                          v8_str("donut"))
-            .FromJust());
+             ->SetAccessor(context.local(), v8_str("x"), GetXValue, nullptr,
+                           v8_str("donut"))
+             .FromJust());
   CHECK(!GetGlobalProperty(&context, "obj2")
-            ->SetAccessor(context.local(), v8_str("x"), GetXValue, NULL,
-                          v8_str("donut"))
-            .FromJust());
+             ->SetAccessor(context.local(), v8_str("x"), GetXValue, nullptr,
+                           v8_str("donut"))
+             .FromJust());
 
   {
     v8::TryCatch try_catch(isolate);
@@ -6754,11 +6702,11 @@
   CompileRun("var obj2 = {};");
 
   CHECK(GetGlobalProperty(&context, "obj1")
-            ->SetAccessor(context.local(), v8_str("239"), Get239Value, NULL,
+            ->SetAccessor(context.local(), v8_str("239"), Get239Value, nullptr,
                           v8_str("donut"))
             .FromJust());
   CHECK(GetGlobalProperty(&context, "obj2")
-            ->SetAccessor(context.local(), v8_str("239"), Get239Value, NULL,
+            ->SetAccessor(context.local(), v8_str("239"), Get239Value, nullptr,
                           v8_str("donut"))
             .FromJust());
 
@@ -6810,7 +6758,7 @@
   v8::Isolate* isolate = CcTest::isolate();
   v8::HandleScope scope(isolate);
   Local<ObjectTemplate> templ = ObjectTemplate::New(isolate);
-  templ->SetAccessor(v8_str("x"), NULL, SetXValue, v8_str("donut"));
+  templ->SetAccessor(v8_str("x"), nullptr, SetXValue, v8_str("donut"));
   LocalContext context;
   CHECK(context->Global()
             ->Set(context.local(), v8_str("obj"),
@@ -6833,8 +6781,9 @@
   v8::Isolate* isolate = CcTest::isolate();
   v8::HandleScope scope(isolate);
   Local<ObjectTemplate> templ = ObjectTemplate::New(isolate);
-  templ->SetAccessor(v8_str("x"), static_cast<v8::AccessorGetterCallback>(NULL),
-                     NULL, v8_str("donut"));
+  templ->SetAccessor(v8_str("x"),
+                     static_cast<v8::AccessorGetterCallback>(nullptr), nullptr,
+                     v8_str("donut"));
   LocalContext context;
   CHECK(context->Global()
             ->Set(context.local(), v8_str("obj"),
@@ -7194,7 +7143,7 @@
 
 TEST(NullExtensions) {
   v8::HandleScope handle_scope(CcTest::isolate());
-  v8::RegisterExtension(new Extension("nulltest", NULL));
+  v8::RegisterExtension(new Extension("nulltest", nullptr));
   const char* extension_names[] = {"nulltest"};
   v8::ExtensionConfiguration extensions(1, extension_names);
   v8::Local<Context> context = Context::New(CcTest::isolate(), &extensions);
@@ -7204,10 +7153,9 @@
             .FromJust());
 }
 
-
 static const char* kEmbeddedExtensionSource =
     "function Ret54321(){return 54321;}~~@@$"
-    "$%% THIS IS A SERIES OF NON-NULL-TERMINATED STRINGS.";
+    "$%% THIS IS A SERIES OF NON-nullptr-TERMINATED STRINGS.";
 static const int kEmbeddedExtensionSourceValidLen = 34;
 
 
@@ -7218,7 +7166,7 @@
   const char* extension_names[] = {"srclentest_fail"};
   v8::ExtensionConfiguration extensions(1, extension_names);
   v8::Local<Context> context = Context::New(CcTest::isolate(), &extensions);
-  CHECK(0 == *context);
+  CHECK_NULL(*context);
 }
 
 
@@ -7241,7 +7189,7 @@
                 .FromJust());
     } else {
       // Anything but exactly the right length should fail to compile.
-      CHECK(0 == *context);
+      CHECK_NULL(*context);
     }
   }
 }
@@ -7589,7 +7537,7 @@
 static const char* last_location;
 static const char* last_message;
 void StoringErrorCallback(const char* location, const char* message) {
-  if (last_location == NULL) {
+  if (last_location == nullptr) {
     last_location = location;
     last_message = message;
   }
@@ -7605,7 +7553,7 @@
   v8::RegisterExtension(new Extension("A", "", 1, aDeps));
   static const char* bDeps[] = {"A"};
   v8::RegisterExtension(new Extension("B", "", 1, bDeps));
-  last_location = NULL;
+  last_location = nullptr;
   v8::ExtensionConfiguration config(1, bDeps);
   v8::Local<Context> context = Context::New(CcTest::isolate(), &config);
   CHECK(context.IsEmpty());
@@ -7663,84 +7611,6 @@
   v8::Global<v8::Object> handle;
 };
 
-
-static void SetFlag(const v8::WeakCallbackInfo<FlagAndPersistent>& data) {
-  data.GetParameter()->flag = true;
-  data.GetParameter()->handle.Reset();
-}
-
-
-static void IndependentWeakHandle(bool global_gc, bool interlinked) {
-  i::FLAG_stress_incremental_marking = false;
-  // Parallel scavenge introduces too much fragmentation.
-  i::FLAG_parallel_scavenge = false;
-  v8::Isolate* iso = CcTest::isolate();
-  v8::HandleScope scope(iso);
-  v8::Local<Context> context = Context::New(iso);
-  Context::Scope context_scope(context);
-
-  FlagAndPersistent object_a, object_b;
-
-  size_t big_heap_size = 0;
-  size_t big_array_size = 0;
-
-  {
-    v8::HandleScope handle_scope(iso);
-    Local<Object> a(v8::Object::New(iso));
-    Local<Object> b(v8::Object::New(iso));
-    object_a.handle.Reset(iso, a);
-    object_b.handle.Reset(iso, b);
-    if (interlinked) {
-      a->Set(context, v8_str("x"), b).FromJust();
-      b->Set(context, v8_str("x"), a).FromJust();
-    }
-    if (global_gc) {
-      CcTest::CollectAllGarbage();
-    } else {
-      CcTest::CollectGarbage(i::NEW_SPACE);
-    }
-    v8::Local<Value> big_array = v8::Array::New(CcTest::isolate(), 5000);
-    // Verify that we created an array where the space was reserved up front.
-    big_array_size =
-        v8::internal::JSArray::cast(*v8::Utils::OpenHandle(*big_array))
-            ->elements()
-            ->Size();
-    CHECK_LE(20000, big_array_size);
-    a->Set(context, v8_str("y"), big_array).FromJust();
-    big_heap_size = CcTest::heap()->SizeOfObjects();
-  }
-
-  object_a.flag = false;
-  object_b.flag = false;
-  object_a.handle.SetWeak(&object_a, &SetFlag,
-                          v8::WeakCallbackType::kParameter);
-  object_b.handle.SetWeak(&object_b, &SetFlag,
-                          v8::WeakCallbackType::kParameter);
-  CHECK(!object_b.handle.IsIndependent());
-  object_a.handle.MarkIndependent();
-  object_b.handle.MarkIndependent();
-  CHECK(object_b.handle.IsIndependent());
-  if (global_gc) {
-    CcTest::CollectAllGarbage();
-  } else {
-    CcTest::CollectGarbage(i::NEW_SPACE);
-  }
-  // A single GC should be enough to reclaim the memory, since we are using
-  // phantom handles.
-  CHECK_GT(big_heap_size - big_array_size, CcTest::heap()->SizeOfObjects());
-  CHECK(object_a.flag);
-  CHECK(object_b.flag);
-}
-
-
-TEST(IndependentWeakHandle) {
-  IndependentWeakHandle(false, false);
-  IndependentWeakHandle(false, true);
-  IndependentWeakHandle(true, false);
-  IndependentWeakHandle(true, true);
-}
-
-
 class Trivial {
  public:
   explicit Trivial(int x) : x_(x) {}
@@ -7814,9 +7684,6 @@
 
     handle.SetWeak<v8::Persistent<v8::Object>>(
         &handle, CheckInternalFields, v8::WeakCallbackType::kInternalFields);
-    if (!global_gc) {
-      handle.MarkIndependent();
-    }
   }
   if (global_gc) {
     CcTest::CollectAllGarbage();
@@ -7836,130 +7703,6 @@
   InternalFieldCallback(true);
 }
 
-
-static void ResetUseValueAndSetFlag(
-    const v8::WeakCallbackInfo<FlagAndPersistent>& data) {
-  // Blink will reset the handle, and then use the other handle, so they
-  // can't use the same backing slot.
-  data.GetParameter()->handle.Reset();
-  data.GetParameter()->flag = true;
-}
-
-void v8::internal::heap::HeapTester::ResetWeakHandle(bool global_gc) {
-  using v8::Context;
-  using v8::Local;
-  using v8::Object;
-
-  v8::Isolate* iso = CcTest::isolate();
-  v8::HandleScope scope(iso);
-  v8::Local<Context> context = Context::New(iso);
-  Context::Scope context_scope(context);
-
-  FlagAndPersistent object_a, object_b;
-
-  {
-    v8::HandleScope handle_scope(iso);
-    Local<Object> a(v8::Object::New(iso));
-    Local<Object> b(v8::Object::New(iso));
-    object_a.handle.Reset(iso, a);
-    object_b.handle.Reset(iso, b);
-    if (global_gc) {
-      CcTest::CollectAllGarbage(Heap::kAbortIncrementalMarkingMask);
-    } else {
-      CcTest::CollectGarbage(i::NEW_SPACE);
-    }
-  }
-
-  object_a.flag = false;
-  object_b.flag = false;
-  object_a.handle.SetWeak(&object_a, &ResetUseValueAndSetFlag,
-                          v8::WeakCallbackType::kParameter);
-  object_b.handle.SetWeak(&object_b, &ResetUseValueAndSetFlag,
-                          v8::WeakCallbackType::kParameter);
-  if (!global_gc) {
-    object_a.handle.MarkIndependent();
-    object_b.handle.MarkIndependent();
-    CHECK(object_b.handle.IsIndependent());
-  }
-  if (global_gc) {
-    CcTest::CollectAllGarbage(Heap::kAbortIncrementalMarkingMask);
-  } else {
-    CcTest::CollectGarbage(i::NEW_SPACE);
-  }
-  CHECK(object_a.flag);
-  CHECK(object_b.flag);
-}
-
-
-THREADED_HEAP_TEST(ResetWeakHandle) {
-  v8::internal::heap::HeapTester::ResetWeakHandle(false);
-  v8::internal::heap::HeapTester::ResetWeakHandle(true);
-}
-
-static void InvokeScavenge() { CcTest::CollectGarbage(i::NEW_SPACE); }
-
-static void InvokeMarkSweep() { CcTest::CollectAllGarbage(); }
-
-static void ForceScavenge2(
-    const v8::WeakCallbackInfo<FlagAndPersistent>& data) {
-  data.GetParameter()->flag = true;
-  InvokeScavenge();
-}
-
-static void ForceScavenge1(
-    const v8::WeakCallbackInfo<FlagAndPersistent>& data) {
-  data.GetParameter()->handle.Reset();
-  data.SetSecondPassCallback(ForceScavenge2);
-}
-
-
-static void ForceMarkSweep2(
-    const v8::WeakCallbackInfo<FlagAndPersistent>& data) {
-  data.GetParameter()->flag = true;
-  InvokeMarkSweep();
-}
-
-static void ForceMarkSweep1(
-    const v8::WeakCallbackInfo<FlagAndPersistent>& data) {
-  data.GetParameter()->handle.Reset();
-  data.SetSecondPassCallback(ForceMarkSweep2);
-}
-
-
-THREADED_TEST(GCFromWeakCallbacks) {
-  v8::Isolate* isolate = CcTest::isolate();
-  v8::Locker locker(CcTest::isolate());
-  v8::HandleScope scope(isolate);
-  v8::Local<Context> context = Context::New(isolate);
-  Context::Scope context_scope(context);
-
-  static const int kNumberOfGCTypes = 2;
-  typedef v8::WeakCallbackInfo<FlagAndPersistent>::Callback Callback;
-  Callback gc_forcing_callback[kNumberOfGCTypes] = {&ForceScavenge1,
-                                                    &ForceMarkSweep1};
-
-  typedef void (*GCInvoker)();
-  GCInvoker invoke_gc[kNumberOfGCTypes] = {&InvokeScavenge, &InvokeMarkSweep};
-
-  for (int outer_gc = 0; outer_gc < kNumberOfGCTypes; outer_gc++) {
-    for (int inner_gc = 0; inner_gc < kNumberOfGCTypes; inner_gc++) {
-      FlagAndPersistent object;
-      {
-        v8::HandleScope handle_scope(isolate);
-        object.handle.Reset(isolate, v8::Object::New(isolate));
-      }
-      object.flag = false;
-      object.handle.SetWeak(&object, gc_forcing_callback[inner_gc],
-                            v8::WeakCallbackType::kParameter);
-      object.handle.MarkIndependent();
-      invoke_gc[outer_gc]();
-      EmptyMessageQueues(isolate);
-      CHECK(object.flag);
-    }
-  }
-}
-
-
 v8::Local<Function> args_fun;
 
 
@@ -7984,7 +7727,7 @@
   v8::Local<v8::ObjectTemplate> global = ObjectTemplate::New(isolate);
   global->Set(v8_str("f"),
               v8::FunctionTemplate::New(isolate, ArgumentsTestCallback));
-  LocalContext context(NULL, global);
+  LocalContext context(nullptr, global);
   args_fun = context->Global()
                  ->Get(context.local(), v8_str("f"))
                  .ToLocalChecked()
@@ -8173,31 +7916,31 @@
   v8::HandleScope scope(context->GetIsolate());
   v8::Local<String> str = v8_str("abcde");
   // abc<Icelandic eth><Unicode snowman>.
-  v8::Local<String> str2 = v8_str("abc\303\260\342\230\203");
+  v8::Local<String> str2 = v8_str("abc\xC3\xB0\xE2\x98\x83");
   v8::Local<String> str3 =
       v8::String::NewFromUtf8(context->GetIsolate(), "abc\0def",
                               v8::NewStringType::kNormal, 7)
           .ToLocalChecked();
-  // "ab" + lead surrogate + "cd" + trail surrogate + "ef"
-  uint16_t orphans[8] = { 0x61, 0x62, 0xd800, 0x63, 0x64, 0xdc00, 0x65, 0x66 };
+  // "ab" + lead surrogate + "wx" + trail surrogate + "yz"
+  uint16_t orphans[8] = {0x61, 0x62, 0xD800, 0x77, 0x78, 0xDC00, 0x79, 0x7A};
   v8::Local<String> orphans_str =
       v8::String::NewFromTwoByte(context->GetIsolate(), orphans,
                                  v8::NewStringType::kNormal, 8)
           .ToLocalChecked();
   // single lead surrogate
-  uint16_t lead[1] = { 0xd800 };
+  uint16_t lead[1] = {0xD800};
   v8::Local<String> lead_str =
       v8::String::NewFromTwoByte(context->GetIsolate(), lead,
                                  v8::NewStringType::kNormal, 1)
           .ToLocalChecked();
   // single trail surrogate
-  uint16_t trail[1] = { 0xdc00 };
+  uint16_t trail[1] = {0xDC00};
   v8::Local<String> trail_str =
       v8::String::NewFromTwoByte(context->GetIsolate(), trail,
                                  v8::NewStringType::kNormal, 1)
           .ToLocalChecked();
   // surrogate pair
-  uint16_t pair[2] = { 0xd800,  0xdc00 };
+  uint16_t pair[2] = {0xD800, 0xDC00};
   v8::Local<String> pair_str =
       v8::String::NewFromTwoByte(context->GetIsolate(), pair,
                                  v8::NewStringType::kNormal, 2)
@@ -8205,12 +7948,12 @@
   const int kStride = 4;  // Must match stride in for loops in JS below.
   CompileRun(
       "var left = '';"
-      "for (var i = 0; i < 0xd800; i += 4) {"
+      "for (var i = 0; i < 0xD800; i += 4) {"
       "  left = left + String.fromCharCode(i);"
       "}");
   CompileRun(
       "var right = '';"
-      "for (var i = 0; i < 0xd800; i += 4) {"
+      "for (var i = 0; i < 0xD800; i += 4) {"
       "  right = String.fromCharCode(i) + right;"
       "}");
   v8::Local<v8::Object> global = context->Global();
@@ -8222,11 +7965,11 @@
                                  .As<String>();
 
   CHECK_EQ(5, str2->Length());
-  CHECK_EQ(0xd800 / kStride, left_tree->Length());
-  CHECK_EQ(0xd800 / kStride, right_tree->Length());
+  CHECK_EQ(0xD800 / kStride, left_tree->Length());
+  CHECK_EQ(0xD800 / kStride, right_tree->Length());
 
   char buf[100];
-  char utf8buf[0xd800 * 3];
+  char utf8buf[0xD800 * 3];
   uint16_t wbuf[100];
   int len;
   int charlen;
@@ -8235,58 +7978,58 @@
   len = str2->WriteUtf8(utf8buf, sizeof(utf8buf), &charlen);
   CHECK_EQ(9, len);
   CHECK_EQ(5, charlen);
-  CHECK_EQ(0, strcmp(utf8buf, "abc\303\260\342\230\203"));
+  CHECK_EQ(0, strcmp(utf8buf, "abc\xC3\xB0\xE2\x98\x83"));
 
   memset(utf8buf, 0x1, 1000);
   len = str2->WriteUtf8(utf8buf, 8, &charlen);
   CHECK_EQ(8, len);
   CHECK_EQ(5, charlen);
-  CHECK_EQ(0, strncmp(utf8buf, "abc\303\260\342\230\203\1", 9));
+  CHECK_EQ(0, strncmp(utf8buf, "abc\xC3\xB0\xE2\x98\x83\x01", 9));
 
   memset(utf8buf, 0x1, 1000);
   len = str2->WriteUtf8(utf8buf, 7, &charlen);
   CHECK_EQ(5, len);
   CHECK_EQ(4, charlen);
-  CHECK_EQ(0, strncmp(utf8buf, "abc\303\260\1", 5));
+  CHECK_EQ(0, strncmp(utf8buf, "abc\xC3\xB0\x01", 5));
 
   memset(utf8buf, 0x1, 1000);
   len = str2->WriteUtf8(utf8buf, 6, &charlen);
   CHECK_EQ(5, len);
   CHECK_EQ(4, charlen);
-  CHECK_EQ(0, strncmp(utf8buf, "abc\303\260\1", 5));
+  CHECK_EQ(0, strncmp(utf8buf, "abc\xC3\xB0\x01", 5));
 
   memset(utf8buf, 0x1, 1000);
   len = str2->WriteUtf8(utf8buf, 5, &charlen);
   CHECK_EQ(5, len);
   CHECK_EQ(4, charlen);
-  CHECK_EQ(0, strncmp(utf8buf, "abc\303\260\1", 5));
+  CHECK_EQ(0, strncmp(utf8buf, "abc\xC3\xB0\x01", 5));
 
   memset(utf8buf, 0x1, 1000);
   len = str2->WriteUtf8(utf8buf, 4, &charlen);
   CHECK_EQ(3, len);
   CHECK_EQ(3, charlen);
-  CHECK_EQ(0, strncmp(utf8buf, "abc\1", 4));
+  CHECK_EQ(0, strncmp(utf8buf, "abc\x01", 4));
 
   memset(utf8buf, 0x1, 1000);
   len = str2->WriteUtf8(utf8buf, 3, &charlen);
   CHECK_EQ(3, len);
   CHECK_EQ(3, charlen);
-  CHECK_EQ(0, strncmp(utf8buf, "abc\1", 4));
+  CHECK_EQ(0, strncmp(utf8buf, "abc\x01", 4));
 
   memset(utf8buf, 0x1, 1000);
   len = str2->WriteUtf8(utf8buf, 2, &charlen);
   CHECK_EQ(2, len);
   CHECK_EQ(2, charlen);
-  CHECK_EQ(0, strncmp(utf8buf, "ab\1", 3));
+  CHECK_EQ(0, strncmp(utf8buf, "ab\x01", 3));
 
   // allow orphan surrogates by default
   memset(utf8buf, 0x1, 1000);
   len = orphans_str->WriteUtf8(utf8buf, sizeof(utf8buf), &charlen);
   CHECK_EQ(13, len);
   CHECK_EQ(8, charlen);
-  CHECK_EQ(0, strcmp(utf8buf, "ab\355\240\200cd\355\260\200ef"));
+  CHECK_EQ(0, strcmp(utf8buf, "ab\xED\xA0\x80wx\xED\xB0\x80yz"));
 
-  // replace orphan surrogates with unicode replacement character
+  // replace orphan surrogates with Unicode replacement character
   memset(utf8buf, 0x1, 1000);
   len = orphans_str->WriteUtf8(utf8buf,
                                sizeof(utf8buf),
@@ -8294,9 +8037,9 @@
                                String::REPLACE_INVALID_UTF8);
   CHECK_EQ(13, len);
   CHECK_EQ(8, charlen);
-  CHECK_EQ(0, strcmp(utf8buf, "ab\357\277\275cd\357\277\275ef"));
+  CHECK_EQ(0, strcmp(utf8buf, "ab\xEF\xBF\xBDwx\xEF\xBF\xBDyz"));
 
-  // replace single lead surrogate with unicode replacement character
+  // replace single lead surrogate with Unicode replacement character
   memset(utf8buf, 0x1, 1000);
   len = lead_str->WriteUtf8(utf8buf,
                             sizeof(utf8buf),
@@ -8304,9 +8047,9 @@
                             String::REPLACE_INVALID_UTF8);
   CHECK_EQ(4, len);
   CHECK_EQ(1, charlen);
-  CHECK_EQ(0, strcmp(utf8buf, "\357\277\275"));
+  CHECK_EQ(0, strcmp(utf8buf, "\xEF\xBF\xBD"));
 
-  // replace single trail surrogate with unicode replacement character
+  // replace single trail surrogate with Unicode replacement character
   memset(utf8buf, 0x1, 1000);
   len = trail_str->WriteUtf8(utf8buf,
                              sizeof(utf8buf),
@@ -8314,7 +8057,7 @@
                              String::REPLACE_INVALID_UTF8);
   CHECK_EQ(4, len);
   CHECK_EQ(1, charlen);
-  CHECK_EQ(0, strcmp(utf8buf, "\357\277\275"));
+  CHECK_EQ(0, strcmp(utf8buf, "\xEF\xBF\xBD"));
 
   // do not replace / write anything if surrogate pair does not fit the buffer
   // space
@@ -8329,14 +8072,14 @@
   memset(utf8buf, 0x1, sizeof(utf8buf));
   len = GetUtf8Length(left_tree);
   int utf8_expected =
-      (0x80 + (0x800 - 0x80) * 2 + (0xd800 - 0x800) * 3) / kStride;
+      (0x80 + (0x800 - 0x80) * 2 + (0xD800 - 0x800) * 3) / kStride;
   CHECK_EQ(utf8_expected, len);
   len = left_tree->WriteUtf8(utf8buf, utf8_expected, &charlen);
   CHECK_EQ(utf8_expected, len);
-  CHECK_EQ(0xd800 / kStride, charlen);
-  CHECK_EQ(0xed, static_cast<unsigned char>(utf8buf[utf8_expected - 3]));
-  CHECK_EQ(0x9f, static_cast<unsigned char>(utf8buf[utf8_expected - 2]));
-  CHECK_EQ(0xc0 - kStride,
+  CHECK_EQ(0xD800 / kStride, charlen);
+  CHECK_EQ(0xED, static_cast<unsigned char>(utf8buf[utf8_expected - 3]));
+  CHECK_EQ(0x9F, static_cast<unsigned char>(utf8buf[utf8_expected - 2]));
+  CHECK_EQ(0xC0 - kStride,
            static_cast<unsigned char>(utf8buf[utf8_expected - 1]));
   CHECK_EQ(1, utf8buf[utf8_expected]);
 
@@ -8345,10 +8088,10 @@
   CHECK_EQ(utf8_expected, len);
   len = right_tree->WriteUtf8(utf8buf, utf8_expected, &charlen);
   CHECK_EQ(utf8_expected, len);
-  CHECK_EQ(0xd800 / kStride, charlen);
-  CHECK_EQ(0xed, static_cast<unsigned char>(utf8buf[0]));
-  CHECK_EQ(0x9f, static_cast<unsigned char>(utf8buf[1]));
-  CHECK_EQ(0xc0 - kStride, static_cast<unsigned char>(utf8buf[2]));
+  CHECK_EQ(0xD800 / kStride, charlen);
+  CHECK_EQ(0xED, static_cast<unsigned char>(utf8buf[0]));
+  CHECK_EQ(0x9F, static_cast<unsigned char>(utf8buf[1]));
+  CHECK_EQ(0xC0 - kStride, static_cast<unsigned char>(utf8buf[2]));
   CHECK_EQ(1, utf8buf[utf8_expected]);
 
   memset(buf, 0x1, sizeof(buf));
@@ -8367,7 +8110,7 @@
   CHECK_EQ(4, len);
   len = str->Write(wbuf, 0, 4);
   CHECK_EQ(4, len);
-  CHECK_EQ(0, strncmp("abcd\1", buf, 5));
+  CHECK_EQ(0, strncmp("abcd\x01", buf, 5));
   uint16_t answer2[] = {'a', 'b', 'c', 'd', 0x101};
   CHECK_EQ(0, StrNCmp16(answer2, wbuf, 5));
 
@@ -8377,7 +8120,7 @@
   CHECK_EQ(5, len);
   len = str->Write(wbuf, 0, 5);
   CHECK_EQ(5, len);
-  CHECK_EQ(0, strncmp("abcde\1", buf, 6));
+  CHECK_EQ(0, strncmp("abcde\x01", buf, 6));
   uint16_t answer3[] = {'a', 'b', 'c', 'd', 'e', 0x101};
   CHECK_EQ(0, StrNCmp16(answer3, wbuf, 6));
 
@@ -8416,7 +8159,7 @@
   CHECK_EQ(1, len);
   len = str->Write(wbuf, 4, 1);
   CHECK_EQ(1, len);
-  CHECK_EQ(0, strncmp("e\1", buf, 2));
+  CHECK_EQ(0, strncmp("e\x01", buf, 2));
   uint16_t answer6[] = {'e', 0x101};
   CHECK_EQ(0, StrNCmp16(answer6, wbuf, 2));
 
@@ -8426,7 +8169,7 @@
   CHECK_EQ(1, len);
   len = str->Write(wbuf, 3, 1);
   CHECK_EQ(1, len);
-  CHECK_EQ(0, strncmp("d\1", buf, 2));
+  CHECK_EQ(0, strncmp("d\x01", buf, 2));
   uint16_t answer7[] = {'d', 0x101};
   CHECK_EQ(0, StrNCmp16(answer7, wbuf, 2));
 
@@ -8462,10 +8205,10 @@
   CHECK_EQ(8, len);
   CHECK_EQ('X', utf8buf[8]);
   CHECK_EQ(5, charlen);
-  CHECK_EQ(0, strncmp(utf8buf, "abc\303\260\342\230\203", 8));
-  CHECK_NE(0, strcmp(utf8buf, "abc\303\260\342\230\203"));
+  CHECK_EQ(0, strncmp(utf8buf, "abc\xC3\xB0\xE2\x98\x83", 8));
+  CHECK_NE(0, strcmp(utf8buf, "abc\xC3\xB0\xE2\x98\x83"));
   utf8buf[8] = '\0';
-  CHECK_EQ(0, strcmp(utf8buf, "abc\303\260\342\230\203"));
+  CHECK_EQ(0, strcmp(utf8buf, "abc\xC3\xB0\xE2\x98\x83"));
 
   memset(utf8buf, 0x1, sizeof(utf8buf));
   utf8buf[5] = 'X';
@@ -8484,9 +8227,9 @@
   CHECK_EQ(0, buf[3]);
   CHECK_EQ(0, strcmp("def", buf + 4));
 
-  CHECK_EQ(0, str->WriteOneByte(NULL, 0, 0, String::NO_NULL_TERMINATION));
-  CHECK_EQ(0, str->WriteUtf8(NULL, 0, 0, String::NO_NULL_TERMINATION));
-  CHECK_EQ(0, str->Write(NULL, 0, 0, String::NO_NULL_TERMINATION));
+  CHECK_EQ(0, str->WriteOneByte(nullptr, 0, 0, String::NO_NULL_TERMINATION));
+  CHECK_EQ(0, str->WriteUtf8(nullptr, 0, 0, String::NO_NULL_TERMINATION));
+  CHECK_EQ(0, str->Write(nullptr, 0, 0, String::NO_NULL_TERMINATION));
 }
 
 
@@ -8557,16 +8300,16 @@
       "X\xf4\x90\x80Y\0",
   };
   const std::vector<std::vector<uint16_t>> unicode_expected = {
-      {0x58, 0xfffd, 0xfffd, 0x59},
-      {0x58, 0xfffd, 0xfffd, 0x59},
-      {0x58, 0xfffd, 0xfffd, 0xfffd, 0x59},
-      {0x58, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0x59},
-      {0x58, 0xfffd, 0xfffd, 0xfffd, 0x59},
-      {0x58, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0x59},
-      {0x58, 0xfffd, 0xfffd, 0x59},
-      {0x58, 0xfffd, 0xfffd, 0xfffd, 0x59},
-      {0x58, 0xfffd, 0xfffd, 0x59},
-      {0x58, 0xfffd, 0xfffd, 0xfffd, 0x59},
+      {0x58, 0xFFFD, 0xFFFD, 0x59},
+      {0x58, 0xFFFD, 0xFFFD, 0x59},
+      {0x58, 0xFFFD, 0xFFFD, 0xFFFD, 0x59},
+      {0x58, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x59},
+      {0x58, 0xFFFD, 0xFFFD, 0xFFFD, 0x59},
+      {0x58, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x59},
+      {0x58, 0xFFFD, 0xFFFD, 0x59},
+      {0x58, 0xFFFD, 0xFFFD, 0xFFFD, 0x59},
+      {0x58, 0xFFFD, 0xFFFD, 0x59},
+      {0x58, 0xFFFD, 0xFFFD, 0xFFFD, 0x59},
   };
   CHECK_EQ(unicode_expected.size(), arraysize(cases));
   TestUtf8DecodingAgainstReference(cases, unicode_expected);
@@ -8580,10 +8323,10 @@
       "var p = [];"
       "var plens = [20, 3, 3];"
       "p.push('01234567890123456789');"
-      "var lead = 0xd800;"
-      "var trail = 0xdc00;"
-      "p.push(String.fromCharCode(0xd800));"
-      "p.push(String.fromCharCode(0xdc00));"
+      "var lead = 0xD800;"
+      "var trail = 0xDC00;"
+      "p.push(String.fromCharCode(0xD800));"
+      "p.push(String.fromCharCode(0xDC00));"
       "var a = [];"
       "var b = [];"
       "var c = [];"
@@ -8610,8 +8353,9 @@
       "    var newc = 'x' + c[m] + c[n] + 'y';"
       "    c2.push(newc.substring(1, newc.length - 1));"
       "    var utf = alens[m] + alens[n];"  // And here.
-           // The 'n's that start with 0xdc.. are 6-8
-           // The 'm's that end with 0xd8.. are 1, 4 and 7
+                                            // The 'n's that start with 0xDC..
+                                            // are 6-8 The 'm's that end with
+                                            // 0xD8.. are 1, 4 and 7
       "    if ((m % 3) == 1 && n >= 6) utf -= 2;"
       "    a2lens.push(utf);"
       "  }"
@@ -8644,41 +8388,41 @@
 
   CompileRun(
       "var sym0 = 'benedictus';"
-      "var sym0b = 'S\303\270ren';"
-      "var sym1 = '\355\240\201\355\260\207';"
-      "var sym2 = '\360\220\220\210';"
-      "var sym3 = 'x\355\240\201\355\260\207';"
-      "var sym4 = 'x\360\220\220\210';"
+      "var sym0b = 'S\xC3\xB8ren';"
+      "var sym1 = '\xED\xA0\x81\xED\xB0\x87';"
+      "var sym2 = '\xF0\x90\x90\x88';"
+      "var sym3 = 'x\xED\xA0\x81\xED\xB0\x87';"
+      "var sym4 = 'x\xF0\x90\x90\x88';"
       "if (sym1.length != 2) throw sym1;"
-      "if (sym1.charCodeAt(1) != 0xdc07) throw sym1.charCodeAt(1);"
+      "if (sym1.charCodeAt(1) != 0xDC07) throw sym1.charCodeAt(1);"
       "if (sym2.length != 2) throw sym2;"
-      "if (sym2.charCodeAt(1) != 0xdc08) throw sym2.charCodeAt(2);"
+      "if (sym2.charCodeAt(1) != 0xDC08) throw sym2.charCodeAt(2);"
       "if (sym3.length != 3) throw sym3;"
-      "if (sym3.charCodeAt(2) != 0xdc07) throw sym1.charCodeAt(2);"
+      "if (sym3.charCodeAt(2) != 0xDC07) throw sym1.charCodeAt(2);"
       "if (sym4.length != 3) throw sym4;"
-      "if (sym4.charCodeAt(2) != 0xdc08) throw sym2.charCodeAt(2);");
+      "if (sym4.charCodeAt(2) != 0xDC08) throw sym2.charCodeAt(2);");
   Local<String> sym0 =
       v8::String::NewFromUtf8(context->GetIsolate(), "benedictus",
                               v8::NewStringType::kInternalized)
           .ToLocalChecked();
   Local<String> sym0b =
-      v8::String::NewFromUtf8(context->GetIsolate(), "S\303\270ren",
+      v8::String::NewFromUtf8(context->GetIsolate(), "S\xC3\xB8ren",
                               v8::NewStringType::kInternalized)
           .ToLocalChecked();
   Local<String> sym1 =
-      v8::String::NewFromUtf8(context->GetIsolate(), "\355\240\201\355\260\207",
+      v8::String::NewFromUtf8(context->GetIsolate(), "\xED\xA0\x81\xED\xB0\x87",
                               v8::NewStringType::kInternalized)
           .ToLocalChecked();
   Local<String> sym2 =
-      v8::String::NewFromUtf8(context->GetIsolate(), "\360\220\220\210",
+      v8::String::NewFromUtf8(context->GetIsolate(), "\xF0\x90\x90\x88",
                               v8::NewStringType::kInternalized)
           .ToLocalChecked();
   Local<String> sym3 = v8::String::NewFromUtf8(context->GetIsolate(),
-                                               "x\355\240\201\355\260\207",
+                                               "x\xED\xA0\x81\xED\xB0\x87",
                                                v8::NewStringType::kInternalized)
                            .ToLocalChecked();
   Local<String> sym4 =
-      v8::String::NewFromUtf8(context->GetIsolate(), "x\360\220\220\210",
+      v8::String::NewFromUtf8(context->GetIsolate(), "x\xF0\x90\x90\x88",
                               v8::NewStringType::kInternalized)
           .ToLocalChecked();
   v8::Local<v8::Object> global = context->Global();
@@ -8711,10 +8455,10 @@
   int size = 1024 * 64;
   uint8_t* buffer = new uint8_t[size];
   for (int i = 0; i < size; i += 4) {
-    buffer[i] = 0xf0;
-    buffer[i + 1] = 0x9d;
+    buffer[i] = 0xF0;
+    buffer[i + 1] = 0x9D;
     buffer[i + 2] = 0x80;
-    buffer[i + 3] = 0x9e;
+    buffer[i + 3] = 0x9E;
   }
 
   // Now invoke the decoder without last 3 bytes
@@ -8736,9 +8480,9 @@
   int size = 1024 * 63;
   uint8_t* buffer = new uint8_t[size];
   for (int i = 0; i < size; i += 3) {
-    buffer[i] = 0xe2;
+    buffer[i] = 0xE2;
     buffer[i + 1] = 0x80;
-    buffer[i + 2] = 0xa6;
+    buffer[i + 2] = 0xA6;
   }
 
   // Now invoke the decoder without last 3 bytes
@@ -8994,7 +8738,7 @@
           : arg_this->Get(context, v8_str("trouble_caller")).ToLocalChecked();
   CHECK(trouble_callee->IsFunction());
   args.GetReturnValue().Set(Function::Cast(*trouble_callee)
-                                ->Call(context, arg_this, 0, NULL)
+                                ->Call(context, arg_this, 0, nullptr)
                                 .FromMaybe(v8::Local<v8::Value>()));
 }
 
@@ -9040,7 +8784,7 @@
       global->Get(env.local(), v8_str("trouble_caller")).ToLocalChecked();
   CHECK(trouble_caller->IsFunction());
   Function::Cast(*trouble_caller)
-      ->Call(env.local(), global, 0, NULL)
+      ->Call(env.local(), global, 0, nullptr)
       .FromMaybe(v8::Local<v8::Value>());
   CHECK_EQ(1, report_count);
   isolate->RemoveMessageListeners(ApiUncaughtExceptionTestListener);
@@ -9087,7 +8831,9 @@
   Local<Value> trouble =
       global->Get(env.local(), v8_str("trouble")).ToLocalChecked();
   CHECK(trouble->IsFunction());
-  CHECK(Function::Cast(*trouble)->Call(env.local(), global, 0, NULL).IsEmpty());
+  CHECK(Function::Cast(*trouble)
+            ->Call(env.local(), global, 0, nullptr)
+            .IsEmpty());
   isolate->RemoveMessageListeners(ExceptionInNativeScriptTestListener);
 }
 
@@ -9181,7 +8927,7 @@
       v8::ObjectTemplate::New(isolate);
   global_template->SetAccessCheckCallback(SecurityTestCallback, v8_num(42));
   // Create an environment
-  v8::Local<Context> context0 = Context::New(isolate, NULL, global_template);
+  v8::Local<Context> context0 = Context::New(isolate, nullptr, global_template);
   context0->Enter();
 
   v8::Local<v8::Object> global0 = context0->Global();
@@ -9197,7 +8943,7 @@
   // Create another environment, should fail security checks.
   v8::HandleScope scope1(isolate);
 
-  v8::Local<Context> context1 = Context::New(isolate, NULL, global_template);
+  v8::Local<Context> context1 = Context::New(isolate, nullptr, global_template);
   context1->Enter();
 
   v8::Local<v8::Object> global1 = context1->Global();
@@ -9267,7 +9013,7 @@
     // Enter env2
     Context::Scope scope_env2(env2);
     Local<Value> result = Function::Cast(*spy)
-                              ->Call(env2, env2->Global(), 0, NULL)
+                              ->Call(env2, env2->Global(), 0, nullptr)
                               .ToLocalChecked();
     CHECK(result->IsFunction());
   }
@@ -9278,7 +9024,9 @@
 
     // Call cross_domain_call, it should throw an exception
     v8::TryCatch try_catch(env1->GetIsolate());
-    CHECK(Function::Cast(*spy2)->Call(env2, env2->Global(), 0, NULL).IsEmpty());
+    CHECK(Function::Cast(*spy2)
+              ->Call(env2, env2->Global(), 0, nullptr)
+              .IsEmpty());
     CHECK(try_catch.HasCaught());
   }
 }
@@ -9604,7 +9352,7 @@
     CHECK(get_prop->IsFunction());
     v8::TryCatch try_catch(env1->GetIsolate());
     Local<Value> r = Function::Cast(*get_prop)
-                         ->Call(env1.local(), global1, 0, NULL)
+                         ->Call(env1.local(), global1, 0, nullptr)
                          .ToLocalChecked();
     CHECK(!try_catch.HasCaught());
     CHECK_EQ(1, r->Int32Value(env1.local()).FromJust());
@@ -9698,7 +9446,7 @@
   inner_global_template ->SetAccessorProperty(
       v8_str("this_x"), FunctionTemplate::New(env1->GetIsolate(), GetThisX));
   v8::Local<Context> env2 =
-      Context::New(env1->GetIsolate(), NULL, inner_global_template);
+      Context::New(env1->GetIsolate(), nullptr, inner_global_template);
 
   Local<Value> foo = v8_str("foo");
 
@@ -9873,20 +9621,20 @@
 static void UnreachableGetter(
     Local<String> name,
     const v8::PropertyCallbackInfo<v8::Value>& info) {
-  CHECK(false);  // This function should not be called..
+  UNREACHABLE();  // This function should not be called..
 }
 
 
 static void UnreachableSetter(Local<String>,
                               Local<Value>,
                               const v8::PropertyCallbackInfo<void>&) {
-  CHECK(false);  // This function should not be called.
+  UNREACHABLE();  // This function should not be called.
 }
 
 
 static void UnreachableFunction(
     const v8::FunctionCallbackInfo<v8::Value>& info) {
-  CHECK(false);  // This function should not be called..
+  UNREACHABLE();  // This function should not be called..
 }
 
 
@@ -9917,7 +9665,7 @@
       v8::DEFAULT);
 
   // Create an environment
-  v8::Local<Context> context0 = Context::New(isolate, NULL, global_template);
+  v8::Local<Context> context0 = Context::New(isolate, nullptr, global_template);
   context0->Enter();
 
   v8::Local<v8::Object> global0 = context0->Global();
@@ -10087,7 +9835,7 @@
                                v8::DEFAULT);
 
   // Create an environment
-  v8::Local<Context> context0 = Context::New(isolate, NULL, global_template);
+  v8::Local<Context> context0 = Context::New(isolate, nullptr, global_template);
   context0->Enter();
 
   v8::Local<v8::Object> global0 = context0->Global();
@@ -10167,7 +9915,7 @@
       v8::AccessControl(v8::ALL_CAN_READ | v8::ALL_CAN_WRITE));
 
   // Create an environment
-  v8::Local<Context> context0 = Context::New(isolate, NULL, obj_template);
+  v8::Local<Context> context0 = Context::New(isolate, nullptr, obj_template);
   context0->Enter();
 
   v8::Local<v8::Object> global0 = context0->Global();
@@ -10258,7 +10006,7 @@
   global_template->SetAccessor(v8_str("unreachable"), UnreachableGetter, 0,
                                v8::Local<Value>(), v8::DEFAULT);
 
-  v8::Local<Context> context0 = Context::New(isolate, NULL, global_template);
+  v8::Local<Context> context0 = Context::New(isolate, nullptr, global_template);
   context0->Enter();
 
   Local<v8::Object> global = context0->Global();
@@ -10489,7 +10237,7 @@
       "thrown";
 
   {
-    LocalContext env(NULL, instance_template);
+    LocalContext env(nullptr, instance_template);
     // Hold on to the global object so it can be used again in another
     // environment initialization.
     global_object = env->Global();
@@ -10504,7 +10252,7 @@
 
   {
     // Create new environment reusing the global object.
-    LocalContext env(NULL, instance_template, global_object);
+    LocalContext env(nullptr, instance_template, global_object);
     Local<Value> value = CompileRun("x");
     CHECK_EQ(42, value->Int32Value(env.local()).FromJust());
     value = CompileRun("f()");
@@ -10603,7 +10351,7 @@
 
   Local<Value> foo;
   {
-    LocalContext env(NULL, instance_template);
+    LocalContext env(nullptr, instance_template);
     // Hold on to the global object so it can be used again in another
     // environment initialization.
     global_object = env->Global();
@@ -10612,7 +10360,7 @@
 
   {
     // Create new environment reusing the global object.
-    LocalContext env(NULL, instance_template, global_object);
+    LocalContext env(nullptr, instance_template, global_object);
     CHECK(env->Global()->Set(env.local(), v8_str("foo"), foo).FromJust());
     CompileRun("foo()");
   }
@@ -10662,7 +10410,7 @@
   v8::HandleScope handle_scope(isolate);
 
   Local<ObjectTemplate> global_template = v8::ObjectTemplate::New(isolate);
-  LocalContext context(NULL, global_template);
+  LocalContext context(nullptr, global_template);
 
   Local<v8::FunctionTemplate> t = v8::FunctionTemplate::New(isolate);
   t->InstanceTemplate()->SetHandler(
@@ -11927,24 +11675,25 @@
                                      .ToLocalChecked();
 
     Local<v8::Value> a1 =
-        instance->CallAsFunction(context.local(), v8::Undefined(isolate), 0,
-                                 NULL)
+        instance
+            ->CallAsFunction(context.local(), v8::Undefined(isolate), 0,
+                             nullptr)
             .ToLocalChecked();
     CHECK(a1->StrictEquals(instance));
     Local<v8::Value> a2 =
-        instance->CallAsFunction(context.local(), v8::Null(isolate), 0, NULL)
+        instance->CallAsFunction(context.local(), v8::Null(isolate), 0, nullptr)
             .ToLocalChecked();
     CHECK(a2->StrictEquals(instance));
     Local<v8::Value> a3 =
-        instance->CallAsFunction(context.local(), v8_num(42), 0, NULL)
+        instance->CallAsFunction(context.local(), v8_num(42), 0, nullptr)
             .ToLocalChecked();
     CHECK(a3->StrictEquals(instance));
     Local<v8::Value> a4 =
-        instance->CallAsFunction(context.local(), v8_str("hello"), 0, NULL)
+        instance->CallAsFunction(context.local(), v8_str("hello"), 0, nullptr)
             .ToLocalChecked();
     CHECK(a4->StrictEquals(instance));
     Local<v8::Value> a5 =
-        instance->CallAsFunction(context.local(), v8::True(isolate), 0, NULL)
+        instance->CallAsFunction(context.local(), v8::True(isolate), 0, nullptr)
             .ToLocalChecked();
     CHECK(a5->StrictEquals(instance));
   }
@@ -11968,55 +11717,59 @@
             .ToLocalChecked());
 
     Local<v8::Value> a1 =
-        ReturnThisSloppy->CallAsFunction(context.local(),
-                                         v8::Undefined(isolate), 0, NULL)
+        ReturnThisSloppy
+            ->CallAsFunction(context.local(), v8::Undefined(isolate), 0,
+                             nullptr)
             .ToLocalChecked();
     CHECK(a1->StrictEquals(context->Global()));
     Local<v8::Value> a2 =
-        ReturnThisSloppy->CallAsFunction(context.local(), v8::Null(isolate), 0,
-                                         NULL)
+        ReturnThisSloppy
+            ->CallAsFunction(context.local(), v8::Null(isolate), 0, nullptr)
             .ToLocalChecked();
     CHECK(a2->StrictEquals(context->Global()));
     Local<v8::Value> a3 =
-        ReturnThisSloppy->CallAsFunction(context.local(), v8_num(42), 0, NULL)
+        ReturnThisSloppy
+            ->CallAsFunction(context.local(), v8_num(42), 0, nullptr)
             .ToLocalChecked();
     CHECK(a3->IsNumberObject());
     CHECK_EQ(42.0, a3.As<v8::NumberObject>()->ValueOf());
     Local<v8::Value> a4 =
-        ReturnThisSloppy->CallAsFunction(context.local(), v8_str("hello"), 0,
-                                         NULL)
+        ReturnThisSloppy
+            ->CallAsFunction(context.local(), v8_str("hello"), 0, nullptr)
             .ToLocalChecked();
     CHECK(a4->IsStringObject());
     CHECK(a4.As<v8::StringObject>()->ValueOf()->StrictEquals(v8_str("hello")));
     Local<v8::Value> a5 =
-        ReturnThisSloppy->CallAsFunction(context.local(), v8::True(isolate), 0,
-                                         NULL)
+        ReturnThisSloppy
+            ->CallAsFunction(context.local(), v8::True(isolate), 0, nullptr)
             .ToLocalChecked();
     CHECK(a5->IsBooleanObject());
     CHECK(a5.As<v8::BooleanObject>()->ValueOf());
 
     Local<v8::Value> a6 =
-        ReturnThisStrict->CallAsFunction(context.local(),
-                                         v8::Undefined(isolate), 0, NULL)
+        ReturnThisStrict
+            ->CallAsFunction(context.local(), v8::Undefined(isolate), 0,
+                             nullptr)
             .ToLocalChecked();
     CHECK(a6->IsUndefined());
     Local<v8::Value> a7 =
-        ReturnThisStrict->CallAsFunction(context.local(), v8::Null(isolate), 0,
-                                         NULL)
+        ReturnThisStrict
+            ->CallAsFunction(context.local(), v8::Null(isolate), 0, nullptr)
             .ToLocalChecked();
     CHECK(a7->IsNull());
     Local<v8::Value> a8 =
-        ReturnThisStrict->CallAsFunction(context.local(), v8_num(42), 0, NULL)
+        ReturnThisStrict
+            ->CallAsFunction(context.local(), v8_num(42), 0, nullptr)
             .ToLocalChecked();
     CHECK(a8->StrictEquals(v8_num(42)));
     Local<v8::Value> a9 =
-        ReturnThisStrict->CallAsFunction(context.local(), v8_str("hello"), 0,
-                                         NULL)
+        ReturnThisStrict
+            ->CallAsFunction(context.local(), v8_str("hello"), 0, nullptr)
             .ToLocalChecked();
     CHECK(a9->StrictEquals(v8_str("hello")));
     Local<v8::Value> a10 =
-        ReturnThisStrict->CallAsFunction(context.local(), v8::True(isolate), 0,
-                                         NULL)
+        ReturnThisStrict
+            ->CallAsFunction(context.local(), v8::True(isolate), 0, nullptr)
             .ToLocalChecked();
     CHECK(a10->StrictEquals(v8::True(isolate)));
   }
@@ -12384,7 +12137,7 @@
   proto_templ->Set(v8_str("method"), method_templ);
   v8::Local<v8::ObjectTemplate> templ = fun_templ->InstanceTemplate();
   templ->SetHandler(v8::NamedPropertyHandlerConfiguration(
-      InterceptorCallICFastApi, NULL, NULL, NULL, NULL,
+      InterceptorCallICFastApi, nullptr, nullptr, nullptr, nullptr,
       v8::External::New(isolate, &interceptor_call_count)));
   LocalContext context;
   v8::Local<v8::Function> fun =
@@ -12422,7 +12175,7 @@
   fun_templ->SetHiddenPrototype(true);
   v8::Local<v8::ObjectTemplate> templ = fun_templ->InstanceTemplate();
   templ->SetHandler(v8::NamedPropertyHandlerConfiguration(
-      InterceptorCallICFastApi, NULL, NULL, NULL, NULL,
+      InterceptorCallICFastApi, nullptr, nullptr, nullptr, nullptr,
       v8::External::New(isolate, &interceptor_call_count)));
   LocalContext context;
   v8::Local<v8::Function> fun =
@@ -12463,7 +12216,7 @@
   fun_templ->SetHiddenPrototype(true);
   v8::Local<v8::ObjectTemplate> templ = fun_templ->InstanceTemplate();
   templ->SetHandler(v8::NamedPropertyHandlerConfiguration(
-      InterceptorCallICFastApi, NULL, NULL, NULL, NULL,
+      InterceptorCallICFastApi, nullptr, nullptr, nullptr, nullptr,
       v8::External::New(isolate, &interceptor_call_count)));
   LocalContext context;
   v8::Local<v8::Function> fun =
@@ -12514,7 +12267,7 @@
   fun_templ->SetHiddenPrototype(true);
   v8::Local<v8::ObjectTemplate> templ = fun_templ->InstanceTemplate();
   templ->SetHandler(v8::NamedPropertyHandlerConfiguration(
-      InterceptorCallICFastApi, NULL, NULL, NULL, NULL,
+      InterceptorCallICFastApi, nullptr, nullptr, nullptr, nullptr,
       v8::External::New(isolate, &interceptor_call_count)));
   LocalContext context;
   v8::Local<v8::Function> fun =
@@ -12565,7 +12318,7 @@
   fun_templ->SetHiddenPrototype(true);
   v8::Local<v8::ObjectTemplate> templ = fun_templ->InstanceTemplate();
   templ->SetHandler(v8::NamedPropertyHandlerConfiguration(
-      InterceptorCallICFastApi, NULL, NULL, NULL, NULL,
+      InterceptorCallICFastApi, nullptr, nullptr, nullptr, nullptr,
       v8::External::New(isolate, &interceptor_call_count)));
   LocalContext context;
   v8::Local<v8::Function> fun =
@@ -12620,7 +12373,7 @@
   fun_templ->SetHiddenPrototype(true);
   v8::Local<v8::ObjectTemplate> templ = fun_templ->InstanceTemplate();
   templ->SetHandler(v8::NamedPropertyHandlerConfiguration(
-      InterceptorCallICFastApi, NULL, NULL, NULL, NULL,
+      InterceptorCallICFastApi, nullptr, nullptr, nullptr, nullptr,
       v8::External::New(isolate, &interceptor_call_count)));
   LocalContext context;
   v8::Local<v8::Function> fun =
@@ -13029,11 +12782,11 @@
   CHECK(
       context->Global()->Set(context.local(), v8_str("func"), func).FromJust());
 
-  MessageCallback callbacks[] =
-      { NULL, WebKitLike, ThrowViaApi, ThrowFromJS, WithTryCatch };
+  MessageCallback callbacks[] = {nullptr, WebKitLike, ThrowViaApi, ThrowFromJS,
+                                 WithTryCatch};
   for (unsigned i = 0; i < sizeof(callbacks)/sizeof(callbacks[0]); i++) {
     MessageCallback callback = callbacks[i];
-    if (callback != NULL) {
+    if (callback != nullptr) {
       isolate->AddMessageListener(callback);
     }
     // Some small number to control number of times message handler should
@@ -13043,7 +12796,7 @@
         "var thrown = false;\n"
         "try { func(); } catch(e) { thrown = true; }\n"
         "thrown\n");
-    if (callback != NULL) {
+    if (callback != nullptr) {
       isolate->RemoveMessageListeners(callback);
     }
   }
@@ -13095,7 +12848,7 @@
 
   // Add 'i' as an accessor to the instance template with ReadOnly attributes
   // but the attribute does not have effect because it is duplicated with
-  // NULL setter.
+  // nullptr setter.
   child_instance_templ->SetAccessor(v8_str("i"), ChildGetter, 0,
                                     v8::Local<Value>(), v8::DEFAULT,
                                     v8::ReadOnly);
@@ -13805,7 +13558,7 @@
   fuzzing_ = false;
   for (int i = 0; i < RegisterThreadedTest::count(); i++) {
     ApiTestFuzzer *fuzzer = RegisterThreadedTest::nth(i)->fuzzer_;
-    if (fuzzer != NULL) fuzzer->Join();
+    if (fuzzer != nullptr) fuzzer->Join();
   }
 }
 
@@ -13990,7 +13743,7 @@
 static int GetGlobalObjectsCount() {
   int count = 0;
   i::HeapIterator it(CcTest::heap());
-  for (i::HeapObject* object = it.next(); object != NULL; object = it.next())
+  for (i::HeapObject* object = it.next(); object != nullptr; object = it.next())
     if (object->IsJSGlobalObject()) {
       i::JSGlobalObject* g = i::JSGlobalObject::cast(object);
       // Skip dummy global object.
@@ -14282,12 +14035,12 @@
 class SetFunctionEntryHookTest {
  public:
   SetFunctionEntryHookTest() {
-    CHECK(instance_ == NULL);
+    CHECK_NULL(instance_);
     instance_ = this;
   }
   ~SetFunctionEntryHookTest() {
     CHECK(instance_ == this);
-    instance_ = NULL;
+    instance_ = nullptr;
   }
   void Reset() {
     symbols_.clear();
@@ -14297,7 +14050,7 @@
   void RunTest();
   void OnJitEvent(const v8::JitCodeEvent* event);
   static void JitEvent(const v8::JitCodeEvent* event) {
-    CHECK(instance_ != NULL);
+    CHECK_NOT_NULL(instance_);
     instance_->OnJitEvent(event);
   }
 
@@ -14305,12 +14058,12 @@
                    uintptr_t return_addr_location);
   static void EntryHook(uintptr_t function,
                         uintptr_t return_addr_location) {
-    CHECK(instance_ != NULL);
+    CHECK_NOT_NULL(instance_);
     instance_->OnEntryHook(function, return_addr_location);
   }
 
   static void RuntimeCallback(const v8::FunctionCallbackInfo<v8::Value>& args) {
-    CHECK(instance_ != NULL);
+    CHECK_NOT_NULL(instance_);
     args.GetReturnValue().Set(v8_num(42));
   }
   void RunLoopInNewEnv(v8::Isolate* isolate);
@@ -14337,8 +14090,7 @@
 
   static SetFunctionEntryHookTest* instance_;
 };
-SetFunctionEntryHookTest* SetFunctionEntryHookTest::instance_ = NULL;
-
+SetFunctionEntryHookTest* SetFunctionEntryHookTest::instance_ = nullptr;
 
 // Returns true if addr is in the range [start, start+len).
 static bool Overlaps(i::Address start, size_t len, i::Address addr) {
@@ -14378,19 +14130,19 @@
 void SetFunctionEntryHookTest::OnJitEvent(const v8::JitCodeEvent* event) {
   switch (event->type) {
     case v8::JitCodeEvent::CODE_ADDED: {
-        CHECK(event->code_start != NULL);
-        CHECK_NE(0, static_cast<int>(event->code_len));
-        CHECK(event->name.str != NULL);
-        size_t symbol_id = symbols_.size();
+      CHECK_NOT_NULL(event->code_start);
+      CHECK_NE(0, static_cast<int>(event->code_len));
+      CHECK_NOT_NULL(event->name.str);
+      size_t symbol_id = symbols_.size();
 
-        // Record the new symbol.
-        SymbolInfo& info = symbols_[symbol_id];
-        info.id = symbol_id;
-        info.size = event->code_len;
-        info.name.assign(event->name.str, event->name.str + event->name.len);
+      // Record the new symbol.
+      SymbolInfo& info = symbols_[symbol_id];
+      info.id = symbol_id;
+      info.size = event->code_len;
+      info.name.assign(event->name.str, event->name.str + event->name.len);
 
-        // And record it's location.
-        InsertSymbolAt(reinterpret_cast<i::Address>(event->code_start), &info);
+      // And record it's location.
+      InsertSymbolAt(reinterpret_cast<i::Address>(event->code_start), &info);
       }
       break;
 
@@ -14423,7 +14175,7 @@
   // Get the function's code object.
   i::Code* function_code = i::Code::GetCodeFromTargetAddress(
       reinterpret_cast<i::Address>(function));
-  CHECK(function_code != NULL);
+  CHECK_NOT_NULL(function_code);
 
   // Then try and look up the caller's code object.
   i::Address caller = *reinterpret_cast<i::Address*>(return_addr_location);
@@ -14459,15 +14211,14 @@
   }
 
   // If not a direct hit, it'll have to be the previous symbol.
-  if (it == symbol_locations_.begin())
-    return NULL;
+  if (it == symbol_locations_.begin()) return nullptr;
 
   --it;
   size_t offs = addr - it->first;
   if (offs < it->second->size)
     return it->second;
 
-  return NULL;
+  return nullptr;
 }
 
 
@@ -14480,15 +14231,14 @@
     SymbolInfo* function = it->first.second;
 
     // Filter out non-matching functions.
-    if (function_name != NULL) {
+    if (function_name != nullptr) {
       if (function->name.find(function_name) == std::string::npos)
         continue;
     }
 
     // Filter out non-matching callers.
-    if (caller_name != NULL) {
-      if (caller == NULL)
-        continue;
+    if (caller_name != nullptr) {
+      if (caller == nullptr) continue;
       if (caller->name.find(caller_name) == std::string::npos)
         continue;
     }
@@ -14559,27 +14309,27 @@
 
     // Check the expected invocation counts.
     if (i::FLAG_always_opt) {
-      CHECK_EQ(2, CountInvocations(NULL, "bar"));
+      CHECK_EQ(2, CountInvocations(nullptr, "bar"));
       CHECK_EQ(200, CountInvocations("bar", "foo"));
-      CHECK_EQ(200, CountInvocations(NULL, "foo"));
+      CHECK_EQ(200, CountInvocations(nullptr, "foo"));
     } else if (i::FLAG_opt) {
       // For ignition we don't see the actual functions being called, instead
       // we see the InterpreterEntryTrampoline at least 102 times
       // (100 unoptimized calls to foo, and 2 calls to bar).
-      CHECK_LE(102, CountInvocations(NULL, "InterpreterEntryTrampoline"));
+      CHECK_LE(102, CountInvocations(nullptr, "InterpreterEntryTrampoline"));
       // We should also see the calls to the optimized function foo.
-      CHECK_EQ(100, CountInvocations(NULL, "foo"));
+      CHECK_EQ(100, CountInvocations(nullptr, "foo"));
     } else {
       // For ignition without an optimizing compiler, we should only see the
       // InterpreterEntryTrampoline.
       // (200 unoptimized calls to foo, and 2 calls to bar).
-      CHECK_LE(202, CountInvocations(NULL, "InterpreterEntryTrampoline"));
+      CHECK_LE(202, CountInvocations(nullptr, "InterpreterEntryTrampoline"));
     }
 
     // Verify that we have an entry hook on some specific stubs.
-    CHECK_NE(0, CountInvocations(NULL, "CEntryStub"));
-    CHECK_NE(0, CountInvocations(NULL, "JSEntryStub"));
-    CHECK_NE(0, CountInvocations(NULL, "JSEntryTrampoline"));
+    CHECK_NE(0, CountInvocations(nullptr, "CEntryStub"));
+    CHECK_NE(0, CountInvocations(nullptr, "JSEntryStub"));
+    CHECK_NE(0, CountInvocations(nullptr, "JSEntryTrampoline"));
   }
   isolate->Dispose();
 
@@ -14615,8 +14365,8 @@
   test.RunTest();
 }
 
-static v8::base::HashMap* code_map = NULL;
-static v8::base::HashMap* jitcode_line_info = NULL;
+static v8::base::HashMap* code_map = nullptr;
+static v8::base::HashMap* jitcode_line_info = nullptr;
 static int saw_bar = 0;
 static int move_events = 0;
 
@@ -14664,24 +14414,24 @@
 
 
 static void event_handler(const v8::JitCodeEvent* event) {
-  CHECK(event != NULL);
-  CHECK(code_map != NULL);
-  CHECK(jitcode_line_info != NULL);
+  CHECK_NOT_NULL(event);
+  CHECK_NOT_NULL(code_map);
+  CHECK_NOT_NULL(jitcode_line_info);
 
   class DummyJitCodeLineInfo {
   };
 
   switch (event->type) {
     case v8::JitCodeEvent::CODE_ADDED: {
-        CHECK(event->code_start != NULL);
-        CHECK_NE(0, static_cast<int>(event->code_len));
-        CHECK(event->name.str != NULL);
-        v8::base::HashMap::Entry* entry = code_map->LookupOrInsert(
-            event->code_start, i::ComputePointerHash(event->code_start));
-        entry->value = reinterpret_cast<void*>(event->code_len);
+      CHECK_NOT_NULL(event->code_start);
+      CHECK_NE(0, static_cast<int>(event->code_len));
+      CHECK_NOT_NULL(event->name.str);
+      v8::base::HashMap::Entry* entry = code_map->LookupOrInsert(
+          event->code_start, i::ComputePointerHash(event->code_start));
+      entry->value = reinterpret_cast<void*>(event->code_len);
 
-        if (FunctionNameIs("bar", event)) {
-          ++saw_bar;
+      if (FunctionNameIs("bar", event)) {
+        ++saw_bar;
         }
       }
       break;
@@ -14697,7 +14447,7 @@
         // before its existence can be logged.
         v8::base::HashMap::Entry* entry =
             code_map->Lookup(event->code_start, hash);
-        if (entry != NULL) {
+        if (entry != nullptr) {
           ++move_events;
 
           CHECK_EQ(reinterpret_cast<void*>(event->code_len), entry->value);
@@ -14713,8 +14463,7 @@
 
     case v8::JitCodeEvent::CODE_REMOVED:
       // Object/code removal events are currently not dispatched from the GC.
-      CHECK(false);
-      break;
+      UNREACHABLE();
 
     // For CODE_START_LINE_INFO_RECORDING event, we will create one
     // DummyJitCodeLineInfo data structure pointed by event->user_dat. We
@@ -14732,28 +14481,27 @@
     // data structure is created before during CODE_START_LINE_INFO_RECORDING
     // event. And delete it in CODE_END_LINE_INFO_RECORDING event handling.
     case v8::JitCodeEvent::CODE_END_LINE_INFO_RECORDING: {
-        CHECK(event->user_data != NULL);
-        uint32_t hash = i::ComputePointerHash(event->user_data);
-        v8::base::HashMap::Entry* entry =
-            jitcode_line_info->Lookup(event->user_data, hash);
-        CHECK(entry != NULL);
-        delete reinterpret_cast<DummyJitCodeLineInfo*>(event->user_data);
+      CHECK_NOT_NULL(event->user_data);
+      uint32_t hash = i::ComputePointerHash(event->user_data);
+      v8::base::HashMap::Entry* entry =
+          jitcode_line_info->Lookup(event->user_data, hash);
+      CHECK_NOT_NULL(entry);
+      delete reinterpret_cast<DummyJitCodeLineInfo*>(event->user_data);
       }
       break;
 
     case v8::JitCodeEvent::CODE_ADD_LINE_POS_INFO: {
-        CHECK(event->user_data != NULL);
-        uint32_t hash = i::ComputePointerHash(event->user_data);
-        v8::base::HashMap::Entry* entry =
-            jitcode_line_info->Lookup(event->user_data, hash);
-        CHECK(entry != NULL);
+      CHECK_NOT_NULL(event->user_data);
+      uint32_t hash = i::ComputePointerHash(event->user_data);
+      v8::base::HashMap::Entry* entry =
+          jitcode_line_info->Lookup(event->user_data, hash);
+      CHECK_NOT_NULL(entry);
       }
       break;
 
     default:
       // Impossible event.
-      CHECK(false);
-      break;
+      UNREACHABLE();
   }
 }
 
@@ -14829,13 +14577,13 @@
     // Force code movement.
     heap->CollectAllAvailableGarbage(i::GarbageCollectionReason::kTesting);
 
-    isolate->SetJitCodeEventHandler(v8::kJitCodeEventDefault, NULL);
+    isolate->SetJitCodeEventHandler(v8::kJitCodeEventDefault, nullptr);
 
     CHECK_LE(kIterations, saw_bar);
     CHECK_LT(0, move_events);
 
-    code_map = NULL;
-    jitcode_line_info = NULL;
+    code_map = nullptr;
+    jitcode_line_info = nullptr;
   }
 
   isolate->Exit();
@@ -14861,16 +14609,16 @@
 
     isolate->SetJitCodeEventHandler(v8::kJitCodeEventEnumExisting,
                                     event_handler);
-    isolate->SetJitCodeEventHandler(v8::kJitCodeEventDefault, NULL);
+    isolate->SetJitCodeEventHandler(v8::kJitCodeEventDefault, nullptr);
 
-    jitcode_line_info = NULL;
+    jitcode_line_info = nullptr;
     // We expect that we got some events. Note that if we could get code removal
     // notifications, we could compare two collections, one created by listening
     // from the time of creation of an isolate, and the other by subscribing
     // with EnumExisting.
     CHECK_LT(0u, code.occupancy());
 
-    code_map = NULL;
+    code_map = nullptr;
   }
 
   isolate->Exit();
@@ -15147,7 +14895,7 @@
   v8::Local<v8::Array> elms = obj.As<v8::Array>();
   CHECK_EQ(4u, elms->Length());
   int elmc0 = 0;
-  const char** elmv0 = NULL;
+  const char** elmv0 = nullptr;
   CheckProperties(
       isolate,
       elms->Get(context.local(), v8::Integer::New(isolate, 0)).ToLocalChecked(),
@@ -15207,7 +14955,7 @@
   v8::Local<v8::Array> elms = obj.As<v8::Array>();
   CHECK_EQ(4u, elms->Length());
   int elmc0 = 0;
-  const char** elmv0 = NULL;
+  const char** elmv0 = nullptr;
   CheckProperties(
       isolate,
       elms->Get(context.local(), v8::Integer::New(isolate, 0)).ToLocalChecked(),
@@ -15653,10 +15401,10 @@
       "0.5",
       "-0.5",   // This mainly testes PushBack in the Scanner.
       "--0.5",  // This mainly testes PushBack in the Scanner.
-      NULL};
+      nullptr};
 
   // Compile the sources as external two byte strings.
-  for (int i = 0; one_byte_sources[i] != NULL; i++) {
+  for (int i = 0; one_byte_sources[i] != nullptr; i++) {
     uint16_t* two_byte_string = AsciiToTwoByteString(one_byte_sources[i]);
     TestResource* uc16_resource = new TestResource(two_byte_string);
     v8::Local<v8::String> source =
@@ -16286,8 +16034,8 @@
 
 THREADED_TEST(GetCurrentContextWhenNotInContext) {
   i::Isolate* isolate = CcTest::i_isolate();
-  CHECK(isolate != NULL);
-  CHECK(isolate->context() == NULL);
+  CHECK_NOT_NULL(isolate);
+  CHECK_NULL(isolate->context());
   v8::Isolate* v8_isolate = reinterpret_cast<v8::Isolate*>(isolate);
   v8::HandleScope scope(v8_isolate);
   // The following should not crash, but return an empty handle.
@@ -17088,7 +16836,7 @@
   v8::String::Utf8Value stack(
       context->GetIsolate(),
       try_catch.StackTrace(context.local()).ToLocalChecked());
-  CHECK(strstr(*stack, "at foo (stack-trace-test") != NULL);
+  CHECK_NOT_NULL(strstr(*stack, "at foo (stack-trace-test"));
 }
 
 
@@ -17100,13 +16848,13 @@
   v8::HandleScope scope(CcTest::isolate());
   v8::String::Utf8Value func_name(CcTest::isolate(), frame->GetFunctionName());
   v8::String::Utf8Value script_name(CcTest::isolate(), frame->GetScriptName());
-  if (*script_name == NULL) {
+  if (*script_name == nullptr) {
     // The situation where there is no associated script, like for evals.
-    CHECK(expected_script_name == NULL);
+    CHECK_NULL(expected_script_name);
   } else {
-    CHECK(strstr(*script_name, expected_script_name) != NULL);
+    CHECK_NOT_NULL(strstr(*script_name, expected_script_name));
   }
-  CHECK(strstr(*func_name, expected_func_name) != NULL);
+  CHECK_NOT_NULL(strstr(*func_name, expected_func_name));
   CHECK_EQ(expected_line_number, frame->GetLineNumber());
   CHECK_EQ(expected_column, frame->GetColumn());
   CHECK_EQ(is_eval, frame->IsEval());
@@ -17125,7 +16873,7 @@
   const int kDisplayNameIsNotString = 6;
   const int kFunctionNameIsNotString = 7;
 
-  CHECK(args.Length() == 1);
+  CHECK_EQ(args.Length(), 1);
 
   v8::Local<v8::Context> context = args.GetIsolate()->GetCurrentContext();
   int testGroup = args[0]->Int32Value(context).FromJust();
@@ -17137,7 +16885,7 @@
                     stackTrace->GetFrame(0));
     checkStackFrame(origin, "foo", 6, 3, false, true, stackTrace->GetFrame(1));
     // This is the source string inside the eval which has the call to foo.
-    checkStackFrame(NULL, "", 1, 1, true, false, stackTrace->GetFrame(2));
+    checkStackFrame(nullptr, "", 1, 1, true, false, stackTrace->GetFrame(2));
     // The last frame is an anonymous function which has the initial eval call.
     checkStackFrame(origin, "", 8, 7, false, false, stackTrace->GetFrame(3));
   } else if (testGroup == kDetailedTest) {
@@ -17150,7 +16898,7 @@
                     stackTrace->GetFrame(1));
     bool is_eval = true;
     // This is the source string inside the eval which has the call to baz.
-    checkStackFrame(NULL, "", 1, 1, is_eval, false, stackTrace->GetFrame(2));
+    checkStackFrame(nullptr, "", 1, 1, is_eval, false, stackTrace->GetFrame(2));
     // The last frame is an anonymous function which has the initial eval call.
     checkStackFrame(origin, "", 10, 1, false, false, stackTrace->GetFrame(3));
   } else if (testGroup == kFunctionName) {
@@ -17310,7 +17058,9 @@
   Local<Value> trouble =
       global->Get(env.local(), v8_str("bar")).ToLocalChecked();
   CHECK(trouble->IsFunction());
-  CHECK(Function::Cast(*trouble)->Call(env.local(), global, 0, NULL).IsEmpty());
+  CHECK(Function::Cast(*trouble)
+            ->Call(env.local(), global, 0, nullptr)
+            .IsEmpty());
   isolate->SetCaptureStackTraceForUncaughtExceptions(false);
   isolate->RemoveMessageListeners(StackTraceForUncaughtExceptionListener);
   CHECK_EQ(1, report_count);
@@ -17606,6 +17356,8 @@
 void PromiseRejectCallback(v8::PromiseRejectMessage reject_message) {
   v8::Local<v8::Object> global = CcTest::global();
   v8::Local<v8::Context> context = CcTest::isolate()->GetCurrentContext();
+  CHECK_EQ(v8::Promise::PromiseState::kRejected,
+           reject_message.GetPromise()->State());
   if (reject_message.GetEvent() == v8::kPromiseRejectWithNoHandler) {
     promise_reject_counter++;
     global->Set(context, v8_str("rejected"), reject_message.GetPromise())
@@ -18075,7 +17827,7 @@
   v8::Local<v8::Script> script = CompileWithOrigin(scriptSource, "test");
   script->Run(context.local()).ToLocalChecked();
   for (int i = 0; i < 2; i++) {
-    CHECK(scriptIdInStack[i] != v8::Message::kNoScriptIdInfo);
+    CHECK_NE(scriptIdInStack[i], v8::Message::kNoScriptIdInfo);
     CHECK_EQ(scriptIdInStack[i], script->GetUnboundScript()->GetId());
   }
 }
@@ -18217,7 +17969,7 @@
   auto init_promise = global->Get(context, v8_str("init")).ToLocalChecked();
   CHECK(GetPromise("p")->Equals(env.local(), init_promise).FromJust());
   auto init_promise_obj = v8::Local<v8::Promise>::Cast(init_promise);
-  CHECK(init_promise_obj->State() == v8::Promise::PromiseState::kPending);
+  CHECK_EQ(init_promise_obj->State(), v8::Promise::PromiseState::kPending);
   CHECK(!init_promise_obj->HasHandler());
 
   promise_hook_data->Reset();
@@ -18536,7 +18288,7 @@
   v8::String::Utf8Value stack(
       context->GetIsolate(),
       try_catch.StackTrace(context.local()).ToLocalChecked());
-  CHECK(strstr(*stack, "at foo (source_url:3:5)") != NULL);
+  CHECK_NOT_NULL(strstr(*stack, "at foo (source_url:3:5)"));
 }
 
 
@@ -18713,7 +18465,6 @@
   }
 }
 
-
 THREADED_TEST(GetHeapStatistics) {
   LocalContext c1;
   v8::HandleScope scope(c1->GetIsolate());
@@ -18725,6 +18476,55 @@
   CHECK_NE(static_cast<int>(heap_statistics.used_heap_size()), 0);
 }
 
+TEST(NumberOfNativeContexts) {
+  static const size_t kNumTestContexts = 10;
+  i::Isolate* isolate = CcTest::i_isolate();
+  i::HandleScope scope(isolate);
+  v8::Global<v8::Context> context[kNumTestContexts];
+  v8::HeapStatistics heap_statistics;
+  CHECK_EQ(0u, heap_statistics.number_of_native_contexts());
+  CcTest::isolate()->GetHeapStatistics(&heap_statistics);
+  CHECK_EQ(0u, heap_statistics.number_of_native_contexts());
+  for (size_t i = 0; i < kNumTestContexts; i++) {
+    i::HandleScope inner(isolate);
+    context[i].Reset(CcTest::isolate(), v8::Context::New(CcTest::isolate()));
+    CcTest::isolate()->GetHeapStatistics(&heap_statistics);
+    CHECK_EQ(i + 1, heap_statistics.number_of_native_contexts());
+  }
+  for (size_t i = 0; i < kNumTestContexts; i++) {
+    context[i].Reset();
+    CcTest::CollectAllGarbage(i::Heap::kAbortIncrementalMarkingMask);
+    CcTest::isolate()->GetHeapStatistics(&heap_statistics);
+    CHECK_EQ(kNumTestContexts - i - 1u,
+             heap_statistics.number_of_native_contexts());
+  }
+}
+
+TEST(NumberOfDetachedContexts) {
+  static const size_t kNumTestContexts = 10;
+  i::Isolate* isolate = CcTest::i_isolate();
+  i::HandleScope scope(isolate);
+  v8::Global<v8::Context> context[kNumTestContexts];
+  v8::HeapStatistics heap_statistics;
+  CHECK_EQ(0u, heap_statistics.number_of_detached_contexts());
+  CcTest::isolate()->GetHeapStatistics(&heap_statistics);
+  CHECK_EQ(0u, heap_statistics.number_of_detached_contexts());
+  for (size_t i = 0; i < kNumTestContexts; i++) {
+    i::HandleScope inner(isolate);
+    v8::Local<v8::Context> local = v8::Context::New(CcTest::isolate());
+    context[i].Reset(CcTest::isolate(), local);
+    local->DetachGlobal();
+    CcTest::isolate()->GetHeapStatistics(&heap_statistics);
+    CHECK_EQ(i + 1, heap_statistics.number_of_detached_contexts());
+  }
+  for (size_t i = 0; i < kNumTestContexts; i++) {
+    context[i].Reset();
+    CcTest::CollectAllGarbage(i::Heap::kAbortIncrementalMarkingMask);
+    CcTest::isolate()->GetHeapStatistics(&heap_statistics);
+    CHECK_EQ(kNumTestContexts - i - 1u,
+             heap_statistics.number_of_detached_contexts());
+  }
+}
 
 class VisitorImpl : public v8::ExternalResourceVisitor {
  public:
@@ -18821,13 +18621,13 @@
   v8::Local<v8::String> string0 =
       v8::String::NewExternalTwoByte(env->GetIsolate(), resource[0])
           .ToLocalChecked();
-  resource[1] = new TestResource(two_byte_string, NULL, false);
+  resource[1] = new TestResource(two_byte_string, nullptr, false);
   v8::Local<v8::String> string1 =
       v8::String::NewExternalTwoByte(env->GetIsolate(), resource[1])
           .ToLocalChecked();
 
   // Externalized symbol.
-  resource[2] = new TestResource(two_byte_string, NULL, false);
+  resource[2] = new TestResource(two_byte_string, nullptr, false);
   v8::Local<v8::String> string2 =
       v8::String::NewFromUtf8(env->GetIsolate(), string,
                               v8::NewStringType::kInternalized)
@@ -18970,12 +18770,12 @@
   v8::TryCatch try_catch(isolate);
 
   // Special double values.
-  double snan = DoubleFromBits(0x7ff00000, 0x00000001);
-  double qnan = DoubleFromBits(0x7ff80000, 0x00000000);
-  double infinity = DoubleFromBits(0x7ff00000, 0x00000000);
-  double max_normal = DoubleFromBits(0x7fefffff, 0xffffffffu);
+  double snan = DoubleFromBits(0x7FF00000, 0x00000001);
+  double qnan = DoubleFromBits(0x7FF80000, 0x00000000);
+  double infinity = DoubleFromBits(0x7FF00000, 0x00000000);
+  double max_normal = DoubleFromBits(0x7FEFFFFF, 0xFFFFFFFFu);
   double min_normal = DoubleFromBits(0x00100000, 0x00000000);
-  double max_denormal = DoubleFromBits(0x000fffff, 0xffffffffu);
+  double max_denormal = DoubleFromBits(0x000FFFFF, 0xFFFFFFFFu);
   double min_denormal = DoubleFromBits(0x00000000, 0x00000001);
 
   // Date values are capped at +/-100000000 days (times 864e5 ms per day)
@@ -19022,9 +18822,9 @@
     !defined(USE_SIMULATOR)
       // Most significant fraction bit for quiet nan is set to 0
       // on MIPS architecture. Allowed by IEEE-754.
-      CHECK_EQ(0xffe, static_cast<int>((stored_bits >> 51) & 0xfff));
+      CHECK_EQ(0xFFE, static_cast<int>((stored_bits >> 51) & 0xFFF));
 #else
-      CHECK_EQ(0xfff, static_cast<int>((stored_bits >> 51) & 0xfff));
+      CHECK_EQ(0xFFF, static_cast<int>((stored_bits >> 51) & 0xFFF));
 #endif
     }
 
@@ -19044,9 +18844,9 @@
     !defined(USE_SIMULATOR)
       // Most significant fraction bit for quiet nan is set to 0
       // on MIPS architecture. Allowed by IEEE-754.
-      CHECK_EQ(0xffe, static_cast<int>((stored_bits >> 51) & 0xfff));
+      CHECK_EQ(0xFFE, static_cast<int>((stored_bits >> 51) & 0xFFF));
 #else
-      CHECK_EQ(0xfff, static_cast<int>((stored_bits >> 51) & 0xfff));
+      CHECK_EQ(0xFFF, static_cast<int>((stored_bits >> 51) & 0xFFF));
 #endif
     }
   }
@@ -19733,7 +19533,7 @@
   }
 }
 
-v8::Isolate* gc_callbacks_isolate = NULL;
+v8::Isolate* gc_callbacks_isolate = nullptr;
 int prologue_call_count = 0;
 int epilogue_call_count = 0;
 int prologue_call_count_second = 0;
@@ -20062,8 +19862,8 @@
   string_contents[length-1] = 0;
   // Simple case.
   Local<String> string =
-      String::NewExternalTwoByte(isolate,
-                                 new TestResource(string_contents, NULL, false))
+      String::NewExternalTwoByte(
+          isolate, new TestResource(string_contents, nullptr, false))
           .ToLocalChecked();
   CHECK(!string->IsOneByte() && string->ContainsOnlyOneByte());
   // Counter example.
@@ -20083,8 +19883,8 @@
   balanced = String::Concat(balanced, right);
   Local<String> cons_strings[] = {left, balanced, right};
   Local<String> two_byte =
-      String::NewExternalTwoByte(isolate,
-                                 new TestResource(string_contents, NULL, false))
+      String::NewExternalTwoByte(
+          isolate, new TestResource(string_contents, nullptr, false))
           .ToLocalChecked();
   USE(two_byte); USE(cons_strings);
   for (size_t i = 0; i < arraysize(cons_strings); i++) {
@@ -20107,8 +19907,8 @@
         int shift = 8 + (i % 7);
         string_contents[alignment + i] = 1 << shift;
         string = String::NewExternalTwoByte(
-                     isolate,
-                     new TestResource(string_contents + alignment, NULL, false))
+                     isolate, new TestResource(string_contents + alignment,
+                                               nullptr, false))
                      .ToLocalChecked();
         CHECK_EQ(size, string->Length());
         CHECK(!string->ContainsOnlyOneByte());
@@ -20148,7 +19948,7 @@
   global_template->SetAccessCheckCallback(AccessAlwaysBlocked);
 
   // Create a context and set an x property on it's global object.
-  LocalContext context0(NULL, global_template);
+  LocalContext context0(nullptr, global_template);
   CHECK(context0->Global()
             ->Set(context0.local(), v8_str("x"), v8_num(42))
             .FromJust());
@@ -20156,7 +19956,7 @@
 
   // Create a context with a different security token so that the
   // failed access check callback will be called on each access.
-  LocalContext context1(NULL, global_template);
+  LocalContext context1(nullptr, global_template);
   CHECK(context1->Global()
             ->Set(context1.local(), v8_str("other"), global0)
             .FromJust());
@@ -20204,8 +20004,9 @@
   try_catch.Reset();
 
   // DefineAccessor.
-  CHECK(global0->SetAccessor(context1.local(), v8_str("x"), GetXValue, NULL,
-                             v8_str("x"))
+  CHECK(global0
+            ->SetAccessor(context1.local(), v8_str("x"), GetXValue, nullptr,
+                          v8_str("x"))
             .IsNothing());
   CHECK(try_catch.HasCaught());
   try_catch.Reset();
@@ -20247,7 +20048,7 @@
 
   // Reset the failed access check callback so it does not influence
   // the other tests.
-  isolate->SetFailedAccessCheckCallbackFunction(NULL);
+  isolate->SetFailedAccessCheckCallbackFunction(nullptr);
 }
 
 
@@ -20256,12 +20057,12 @@
   v8::Isolate::CreateParams create_params;
   create_params.array_buffer_allocator = CcTest::array_buffer_allocator();
   v8::Isolate* isolate = v8::Isolate::New(create_params);
-  CHECK(isolate != NULL);
+  CHECK_NOT_NULL(isolate);
   CHECK(current_isolate != isolate);
   CHECK(current_isolate == CcTest::isolate());
 
   isolate->SetFatalErrorHandler(StoringErrorCallback);
-  last_location = last_message = NULL;
+  last_location = last_message = nullptr;
   isolate->Dispose();
   CHECK(!last_location);
   CHECK(!last_message);
@@ -20279,7 +20080,7 @@
     // Run something in this isolate.
     ExpectTrue("true");
     isolate->SetFatalErrorHandler(StoringErrorCallback);
-    last_location = last_message = NULL;
+    last_location = last_message = nullptr;
     // Still entered, should fail.
     isolate->Dispose();
     CHECK(last_location);
@@ -20307,10 +20108,10 @@
     v8::Context::Scope context_scope(context);
     v8::internal::Isolate* i_isolate =
         reinterpret_cast<v8::internal::Isolate*>(isolate1);
-    CHECK(i_isolate->IsFastArrayConstructorPrototypeChainIntact());
+    CHECK(i_isolate->IsNoElementsProtectorIntact());
     // Run something in new isolate.
     CompileRun(script);
-    CHECK(!i_isolate->IsFastArrayConstructorPrototypeChainIntact());
+    CHECK(!i_isolate->IsNoElementsProtectorIntact());
   }
   isolate1->Exit();
   isolate1->Dispose();
@@ -20443,7 +20244,7 @@
   isolate1->Exit();
 
   isolate2->SetFatalErrorHandler(StoringErrorCallback);
-  last_location = last_message = NULL;
+  last_location = last_message = nullptr;
 
   isolate1->Dispose();
   CHECK(!last_location);
@@ -20584,19 +20385,19 @@
         break;
 
       case SetFatalHandler:
-        isolate->SetFatalErrorHandler(NULL);
+        isolate->SetFatalErrorHandler(nullptr);
         break;
 
       case SetCounterFunction:
-        CcTest::isolate()->SetCounterFunction(NULL);
+        CcTest::isolate()->SetCounterFunction(nullptr);
         break;
 
       case SetCreateHistogramFunction:
-        CcTest::isolate()->SetCreateHistogramFunction(NULL);
+        CcTest::isolate()->SetCreateHistogramFunction(nullptr);
         break;
 
       case SetAddHistogramSampleFunction:
-        CcTest::isolate()->SetAddHistogramSampleFunction(NULL);
+        CcTest::isolate()->SetAddHistogramSampleFunction(nullptr);
         break;
     }
     isolate->Exit();
@@ -20965,8 +20766,8 @@
   v8::Context::Scope context_scope(context.local());
 
   v8::Local<v8::ObjectTemplate> tmpl = v8::ObjectTemplate::New(isolate);
-  tmpl->SetHandler(v8::NamedPropertyHandlerConfiguration(Getter, NULL, NULL,
-                                                         NULL, Enumerator));
+  tmpl->SetHandler(v8::NamedPropertyHandlerConfiguration(
+      Getter, nullptr, nullptr, nullptr, Enumerator));
   CHECK(context->Global()
             ->Set(context.local(), v8_str("o"),
                   tmpl->NewInstance(context.local()).ToLocalChecked())
@@ -20995,7 +20796,7 @@
           "})")
           .As<Function>();
   context->DetachGlobal();
-  CHECK(define_property->Call(context.local(), proxy, 0, NULL).IsEmpty());
+  CHECK(define_property->Call(context.local(), proxy, 0, nullptr).IsEmpty());
 }
 
 
@@ -21307,7 +21108,7 @@
   v8::HandleScope scope(isolate);
   Local<ObjectTemplate> templ = ObjectTemplate::New(isolate);
   templ->SetHandler(v8::IndexedPropertyHandlerConfiguration(
-      NULL, NULL, HasOwnPropertyIndexedPropertyQuery));
+      nullptr, nullptr, HasOwnPropertyIndexedPropertyQuery));
   LocalContext context;
   CHECK(context->Global()
             ->Set(context.local(), v8_str("obj"),
@@ -21891,9 +21692,7 @@
   CompileRun("ext2Calls++;");
 }
 
-
-void* g_passed_to_three = NULL;
-
+void* g_passed_to_three = nullptr;
 
 static void MicrotaskThree(void* data) {
   g_passed_to_three = data;
@@ -21935,7 +21734,7 @@
   CHECK_EQ(2, CompileRun("ext1Calls")->Int32Value(env.local()).FromJust());
   CHECK_EQ(2, CompileRun("ext2Calls")->Int32Value(env.local()).FromJust());
 
-  g_passed_to_three = NULL;
+  g_passed_to_three = nullptr;
   env->GetIsolate()->EnqueueMicrotask(MicrotaskThree);
   CompileRun("1+1;");
   CHECK(!g_passed_to_three);
@@ -21952,7 +21751,7 @@
   CHECK_EQ(&dummy, g_passed_to_three);
   CHECK_EQ(3, CompileRun("ext1Calls")->Int32Value(env.local()).FromJust());
   CHECK_EQ(3, CompileRun("ext2Calls")->Int32Value(env.local()).FromJust());
-  g_passed_to_three = NULL;
+  g_passed_to_three = nullptr;
 }
 
 
@@ -22257,7 +22056,7 @@
   } else if (strcmp(name, "c:V8.MegamorphicStubCacheUpdates") == 0) {
     return &updates_counter;
   }
-  return NULL;
+  return nullptr;
 }
 
 template <typename Stub, typename... Args>
@@ -22420,20 +22219,20 @@
     CHECK(!i_isolate->GetData(slot));
   }
   for (uint32_t slot = 0; slot < v8::Isolate::GetNumberOfDataSlots(); ++slot) {
-    void* data = reinterpret_cast<void*>(0xacce55ed + slot);
+    void* data = reinterpret_cast<void*>(0xACCE55ED + slot);
     isolate->SetData(slot, data);
   }
   for (uint32_t slot = 0; slot < v8::Isolate::GetNumberOfDataSlots(); ++slot) {
-    void* data = reinterpret_cast<void*>(0xacce55ed + slot);
+    void* data = reinterpret_cast<void*>(0xACCE55ED + slot);
     CHECK_EQ(data, isolate->GetData(slot));
     CHECK_EQ(data, i_isolate->GetData(slot));
   }
   for (uint32_t slot = 0; slot < v8::Isolate::GetNumberOfDataSlots(); ++slot) {
-    void* data = reinterpret_cast<void*>(0xdecea5ed + slot);
+    void* data = reinterpret_cast<void*>(0xDECEA5ED + slot);
     isolate->SetData(slot, data);
   }
   for (uint32_t slot = 0; slot < v8::Isolate::GetNumberOfDataSlots(); ++slot) {
-    void* data = reinterpret_cast<void*>(0xdecea5ed + slot);
+    void* data = reinterpret_cast<void*>(0xDECEA5ED + slot);
     CHECK_EQ(data, isolate->GetData(slot));
     CHECK_EQ(data, i_isolate->GetData(slot));
   }
@@ -22564,16 +22363,13 @@
   CheckInstanceCheckedAccessors(false);
 }
 
-
 static void EmptyInterceptorGetter(
-    Local<String> name, const v8::PropertyCallbackInfo<v8::Value>& info) {}
-
+    Local<Name> name, const v8::PropertyCallbackInfo<v8::Value>& info) {}
 
 static void EmptyInterceptorSetter(
-    Local<String> name, Local<Value> value,
+    Local<Name> name, Local<Value> value,
     const v8::PropertyCallbackInfo<v8::Value>& info) {}
 
-
 THREADED_TEST(InstanceCheckOnInstanceAccessorWithInterceptor) {
   v8::internal::FLAG_allow_natives_syntax = true;
   LocalContext context;
@@ -22581,8 +22377,8 @@
 
   Local<FunctionTemplate> templ = FunctionTemplate::New(context->GetIsolate());
   Local<ObjectTemplate> inst = templ->InstanceTemplate();
-  templ->InstanceTemplate()->SetNamedPropertyHandler(EmptyInterceptorGetter,
-                                                     EmptyInterceptorSetter);
+  templ->InstanceTemplate()->SetHandler(v8::NamedPropertyHandlerConfiguration(
+      EmptyInterceptorGetter, EmptyInterceptorSetter));
   inst->SetAccessor(v8_str("foo"), InstanceCheckedGetter, InstanceCheckedSetter,
                     Local<Value>(), v8::DEFAULT, v8::None,
                     v8::AccessorSignature::New(context->GetIsolate(), templ));
@@ -23049,7 +22845,7 @@
       // Setup signal handler
       memset(&action, 0, sizeof(action));
       action.sa_handler = SignalHandler;
-      sigaction(SIGCHLD, &action, NULL);
+      sigaction(SIGCHLD, &action, nullptr);
 
       // Send signal
       kill(getpid(), SIGCHLD);
@@ -23083,7 +22879,7 @@
 
 
 void UnreachableCallback(const v8::FunctionCallbackInfo<v8::Value>& args) {
-  CHECK(false);
+  UNREACHABLE();
 }
 
 
@@ -23099,7 +22895,7 @@
   global_template->SetAccessCheckCallback(AccessAlwaysBlocked);
 
   // Create a context and set an x property on it's global object.
-  LocalContext context0(NULL, global_template);
+  LocalContext context0(nullptr, global_template);
   v8::Local<v8::Object> global0 = context0->Global();
   global0->Set(context0.local(), v8_str("x"), v8_num(42)).FromJust();
   ExpectString("JSON.stringify(this)", "{\"x\":42}");
@@ -23116,7 +22912,7 @@
     }
     // Create a context with a different security token so that the
     // failed access check callback will be called on each access.
-    LocalContext context1(NULL, global_template);
+    LocalContext context1(nullptr, global_template);
     CHECK(context1->Global()
               ->Set(context1.local(), v8_str("other"), global0)
               .FromJust());
@@ -23196,13 +22992,13 @@
   global_template->SetAccessCheckCallback(AccessAlwaysBlocked);
 
   // Create a context and set an x property on it's global object.
-  LocalContext context0(NULL, global_template);
+  LocalContext context0(nullptr, global_template);
   v8::Local<v8::Object> global0 = context0->Global();
   CHECK(global0->Set(context0.local(), v8_str("x"), global0).FromJust());
 
   // Create a context with a different security token so that the
   // failed access check callback will be called on each access.
-  LocalContext context1(NULL, global_template);
+  LocalContext context1(nullptr, global_template);
   CHECK(context1->Global()
             ->Set(context1.local(), v8_str("other"), global0)
             .FromJust());
@@ -23237,8 +23033,8 @@
   CheckCorrectThrow("%GetProperty(other, 'x')");
   CheckCorrectThrow("%SetProperty(other, 'x', 'foo', 0)");
   CheckCorrectThrow("%AddNamedProperty(other, 'x', 'foo', 1)");
-  STATIC_ASSERT(i::SLOPPY == 0);
-  STATIC_ASSERT(i::STRICT == 1);
+  STATIC_ASSERT(static_cast<int>(i::LanguageMode::kSloppy) == 0);
+  STATIC_ASSERT(static_cast<int>(i::LanguageMode::kStrict) == 1);
   CheckCorrectThrow("%DeleteProperty(other, 'x', 0)");  // 0 == SLOPPY
   CheckCorrectThrow("%DeleteProperty(other, 'x', 1)");  // 1 == STRICT
   CheckCorrectThrow("%DeleteProperty(other, '1', 0)");
@@ -23252,7 +23048,7 @@
 
   // Reset the failed access check callback so it does not influence
   // the other tests.
-  isolate->SetFailedAccessCheckCallbackFunction(NULL);
+  isolate->SetFailedAccessCheckCallbackFunction(nullptr);
 }
 
 TEST(AccessCheckInIC) {
@@ -23281,13 +23077,13 @@
     global_template->SetAccessCheckCallback(AccessCounter);
 
     // Create a context and set an x property on its global object.
-    LocalContext context0(isolate, NULL, global_template);
+    LocalContext context0(isolate, nullptr, global_template);
     v8::Local<v8::Object> global0 = context0->Global();
     CHECK(global0->Set(context0.local(), v8_str("x"), global0).FromJust());
 
     // Create a context with a different security token so that the
     // failed access check callback will be called on each access.
-    LocalContext context1(isolate, NULL, global_template);
+    LocalContext context1(isolate, nullptr, global_template);
     CHECK(context1->Global()
               ->Set(context1.local(), v8_str("other"), global0)
               .FromJust());
@@ -23512,9 +23308,7 @@
   virtual void TestBody() {
     v8::Local<v8::FunctionTemplate> t = v8::FunctionTemplate::New(isolate_);
     t->InstanceTemplate()->SetNativeDataProperty(
-        v8_str("shouldContinue"),
-        &ShouldContinueNativeGetter,
-        NULL,
+        v8_str("shouldContinue"), &ShouldContinueNativeGetter, nullptr,
         v8::External::New(isolate_, this));
     CHECK(env_->Global()
               ->Set(env_.local(), v8_str("Klass"),
@@ -23721,7 +23515,7 @@
   v8::HandleScope scope(isolate);
 
   interrupt_was_called = false;
-  isolate->RequestInterrupt(&SmallScriptsInterruptCallback, NULL);
+  isolate->RequestInterrupt(&SmallScriptsInterruptCallback, nullptr);
   CompileRun("(function(x){return x;})(1);");
   CHECK(interrupt_was_called);
 }
@@ -23891,7 +23685,7 @@
     }
     // Global object must pass checks.
     Local<v8::Context> context =
-        v8::Context::New(isolate, NULL, signature_template);
+        v8::Context::New(isolate, nullptr, signature_template);
     v8::Context::Scope context_scope(context);
     // Install regular object that can pass signature checks.
     Local<Object> function_receiver =
@@ -24510,15 +24304,15 @@
       "var resolver;"
       "new Promise((res, rej) => { resolver = res; })");
   v8::Local<v8::Promise> promise = v8::Local<v8::Promise>::Cast(result);
-  CHECK(promise->State() == v8::Promise::PromiseState::kPending);
+  CHECK_EQ(promise->State(), v8::Promise::PromiseState::kPending);
 
   CompileRun("resolver('fulfilled')");
-  CHECK(promise->State() == v8::Promise::PromiseState::kFulfilled);
+  CHECK_EQ(promise->State(), v8::Promise::PromiseState::kFulfilled);
   CHECK(v8_str("fulfilled")->SameValue(promise->Result()));
 
   result = CompileRun("Promise.reject('rejected')");
   promise = v8::Local<v8::Promise>::Cast(result);
-  CHECK(promise->State() == v8::Promise::PromiseState::kRejected);
+  CHECK_EQ(promise->State(), v8::Promise::PromiseState::kRejected);
   CHECK(v8_str("rejected")->SameValue(promise->Result()));
 }
 
@@ -24726,14 +24520,14 @@
 void CheckMagicComments(v8::Isolate* isolate, Local<Script> script,
                         const char* expected_source_url,
                         const char* expected_source_mapping_url) {
-  if (expected_source_url != NULL) {
+  if (expected_source_url != nullptr) {
     v8::String::Utf8Value url(isolate,
                               script->GetUnboundScript()->GetSourceURL());
     CHECK_EQ(0, strcmp(expected_source_url, *url));
   } else {
     CHECK(script->GetUnboundScript()->GetSourceURL()->IsUndefined());
   }
-  if (expected_source_mapping_url != NULL) {
+  if (expected_source_mapping_url != nullptr) {
     v8::String::Utf8Value url(
         isolate, script->GetUnboundScript()->GetSourceMappingURL());
     CHECK_EQ(0, strcmp(expected_source_mapping_url, *url));
@@ -24758,11 +24552,11 @@
   SourceURLHelper(isolate,
                   "function foo() {}\n"
                   "//# sourceURL=bar1.js\n",
-                  "bar1.js", NULL);
+                  "bar1.js", nullptr);
   SourceURLHelper(isolate,
                   "function foo() {}\n"
                   "//# sourceMappingURL=bar2.js\n",
-                  NULL, "bar2.js");
+                  nullptr, "bar2.js");
 
   // Both sourceURL and sourceMappingURL.
   SourceURLHelper(isolate,
@@ -24776,58 +24570,58 @@
                   "function foo() {}\n"
                   "//# sourceURL=ignoreme.js\n"
                   "//# sourceURL=bar5.js\n",
-                  "bar5.js", NULL);
+                  "bar5.js", nullptr);
   SourceURLHelper(isolate,
                   "function foo() {}\n"
                   "//# sourceMappingURL=ignoreme.js\n"
                   "//# sourceMappingURL=bar6.js\n",
-                  NULL, "bar6.js");
+                  nullptr, "bar6.js");
 
   // SourceURL or sourceMappingURL in the middle of the script.
   SourceURLHelper(isolate,
                   "function foo() {}\n"
                   "//# sourceURL=bar7.js\n"
                   "function baz() {}\n",
-                  "bar7.js", NULL);
+                  "bar7.js", nullptr);
   SourceURLHelper(isolate,
                   "function foo() {}\n"
                   "//# sourceMappingURL=bar8.js\n"
                   "function baz() {}\n",
-                  NULL, "bar8.js");
+                  nullptr, "bar8.js");
 
   // Too much whitespace.
   SourceURLHelper(isolate,
                   "function foo() {}\n"
                   "//#  sourceURL=bar9.js\n"
                   "//#  sourceMappingURL=bar10.js\n",
-                  NULL, NULL);
+                  nullptr, nullptr);
   SourceURLHelper(isolate,
                   "function foo() {}\n"
                   "//# sourceURL =bar11.js\n"
                   "//# sourceMappingURL =bar12.js\n",
-                  NULL, NULL);
+                  nullptr, nullptr);
 
   // Disallowed characters in value.
   SourceURLHelper(isolate,
                   "function foo() {}\n"
                   "//# sourceURL=bar13 .js   \n"
                   "//# sourceMappingURL=bar14 .js \n",
-                  NULL, NULL);
+                  nullptr, nullptr);
   SourceURLHelper(isolate,
                   "function foo() {}\n"
                   "//# sourceURL=bar15\t.js   \n"
                   "//# sourceMappingURL=bar16\t.js \n",
-                  NULL, NULL);
+                  nullptr, nullptr);
   SourceURLHelper(isolate,
                   "function foo() {}\n"
                   "//# sourceURL=bar17'.js   \n"
                   "//# sourceMappingURL=bar18'.js \n",
-                  NULL, NULL);
+                  nullptr, nullptr);
   SourceURLHelper(isolate,
                   "function foo() {}\n"
                   "//# sourceURL=bar19\".js   \n"
                   "//# sourceMappingURL=bar20\".js \n",
-                  NULL, NULL);
+                  nullptr, nullptr);
 
   // Not too much whitespace.
   SourceURLHelper(isolate,
@@ -24875,13 +24669,13 @@
                                 .ToLocalChecked());
   CHECK(v8_num(13)
             ->Equals(env.local(),
-                     get->Call(env.local(), x, 0, NULL).ToLocalChecked())
+                     get->Call(env.local(), x, 0, nullptr).ToLocalChecked())
             .FromJust());
   Local<Value> args[] = {v8_num(14)};
   set->Call(env.local(), x, 1, args).ToLocalChecked();
   CHECK(v8_num(14)
             ->Equals(env.local(),
-                     get->Call(env.local(), x, 0, NULL).ToLocalChecked())
+                     get->Call(env.local(), x, 0, nullptr).ToLocalChecked())
             .FromJust());
   desc =
       x->GetOwnPropertyDescriptor(env.local(), Symbol::GetToStringTag(isolate))
@@ -24958,7 +24752,7 @@
 
   virtual size_t GetMoreData(const uint8_t** src) {
     // Unlike in real use cases, this function will never block.
-    if (chunks_[index_] == NULL) {
+    if (chunks_[index_] == nullptr) {
       return 0;
     }
     // Copy the data, since the caller takes ownership of it.
@@ -24975,12 +24769,12 @@
   // too).
   static char* FullSourceString(const char** chunks) {
     size_t total_len = 0;
-    for (size_t i = 0; chunks[i] != NULL; ++i) {
+    for (size_t i = 0; chunks[i] != nullptr; ++i) {
       total_len += strlen(chunks[i]);
     }
     char* full_string = new char[total_len + 1];
     size_t offset = 0;
-    for (size_t i = 0; chunks[i] != NULL; ++i) {
+    for (size_t i = 0; chunks[i] != nullptr; ++i) {
       size_t len = strlen(chunks[i]);
       memcpy(full_string + offset, chunks[i], len);
       offset += len;
@@ -25000,8 +24794,8 @@
                       v8::ScriptCompiler::StreamedSource::Encoding encoding =
                           v8::ScriptCompiler::StreamedSource::ONE_BYTE,
                       bool expected_success = true,
-                      const char* expected_source_url = NULL,
-                      const char* expected_source_mapping_url = NULL) {
+                      const char* expected_source_url = nullptr,
+                      const char* expected_source_mapping_url = nullptr) {
   LocalContext env;
   v8::Isolate* isolate = env->GetIsolate();
   v8::HandleScope scope(isolate);
@@ -25043,19 +24837,16 @@
   // This script is unrealistically small, since no one chunk is enough to fill
   // the backing buffer of Scanner, let alone overflow it.
   const char* chunks[] = {"function foo() { ret", "urn 13; } f", "oo(); ",
-                          NULL};
+                          nullptr};
   RunStreamingTest(chunks);
 }
 
 TEST(StreamingScriptConstantArray) {
   // When run with Ignition, tests that the streaming parser canonicalizes
   // handles so that they are only added to the constant pool array once.
-  const char* chunks[] = {"var a = {};",
-                          "var b = {};",
-                          "var c = 'testing';",
-                          "var d = 'testing';",
-                          "13;",
-                          NULL};
+  const char* chunks[] = {
+      "var a = {};",        "var b = {};", "var c = 'testing';",
+      "var d = 'testing';", "13;",         nullptr};
   RunStreamingTest(chunks);
 }
 
@@ -25073,7 +24864,7 @@
       "    return g();\n"
       "  })()\n"
       "})()\n";
-  const char* chunks[] = {chunk1, NULL};
+  const char* chunks[] = {chunk1, nullptr};
   RunStreamingTest(chunks);
 }
 
@@ -25093,7 +24884,7 @@
       "  for (i = 0; i < 13; ++i) { result = result + 1; }\n"
       "  return result;\n"
       "}\n";
-  const char* chunks[] = {chunk1, "foo(); ", NULL};
+  const char* chunks[] = {chunk1, "foo(); ", nullptr};
   RunStreamingTest(chunks);
 }
 
@@ -25105,7 +24896,7 @@
         "  // This will result in a parse error.\n"
         "  var if else then foo";
     char chunk2[] = "  13\n";
-    const char* chunks[] = {chunk1, chunk2, "foo();", NULL};
+    const char* chunks[] = {chunk1, chunk2, "foo();", nullptr};
 
     RunStreamingTest(chunks, v8::ScriptCompiler::StreamedSource::ONE_BYTE,
                      false);
@@ -25116,7 +24907,7 @@
         "  // This will be parsed successfully.\n"
         "  function foo() { return ";
     char chunk2[] = "  13; }\n";
-    const char* chunks[] = {chunk1, chunk2, "foo();", NULL};
+    const char* chunks[] = {chunk1, chunk2, "foo();", nullptr};
 
     RunStreamingTest(chunks);
   }
@@ -25133,7 +24924,7 @@
       "  var foob\xec\x92\x81r = 13;\n"
       "  return foob\xec\x92\x81r;\n"
       "}\n";
-  const char* chunks[] = {chunk1, "foo(); ", NULL};
+  const char* chunks[] = {chunk1, "foo(); ", nullptr};
   RunStreamingTest(chunks, v8::ScriptCompiler::StreamedSource::UTF8);
 }
 
@@ -25143,7 +24934,7 @@
   // characters is correct. Here is an UTF-8 character which will take three
   // bytes.
   const char* reference = "\xec\x92\x81";
-  CHECK(3u == strlen(reference));  // NOLINT - no CHECK_EQ for unsigned.
+  CHECK_EQ(3, strlen(reference));
 
   char chunk1[] =
       "function foo() {\n"
@@ -25157,7 +24948,7 @@
   for (int i = 0; i < 3; ++i) {
     chunk2[i] = reference[i];
   }
-  const char* chunks[] = {chunk1, chunk2, "foo();", NULL};
+  const char* chunks[] = {chunk1, chunk2, "foo();", nullptr};
   RunStreamingTest(chunks, v8::ScriptCompiler::StreamedSource::UTF8);
 }
 
@@ -25178,7 +24969,7 @@
   chunk1[strlen(chunk1) - 1] = reference[0];
   chunk2[0] = reference[1];
   chunk2[1] = reference[2];
-  const char* chunks[] = {chunk1, chunk2, "foo();", NULL};
+  const char* chunks[] = {chunk1, chunk2, "foo();", nullptr};
   RunStreamingTest(chunks, v8::ScriptCompiler::StreamedSource::UTF8);
 }
 
@@ -25205,7 +24996,7 @@
     chunk2[0] = reference[0];
     chunk2[1] = reference[1];
     chunk3[0] = reference[2];
-    const char* chunks[] = {chunk1, chunk2, chunk3, "foo();", NULL};
+    const char* chunks[] = {chunk1, chunk2, chunk3, "foo();", nullptr};
     RunStreamingTest(chunks, v8::ScriptCompiler::StreamedSource::UTF8);
   }
   // The small chunk is at the end of a character
@@ -25223,7 +25014,7 @@
     chunk1[strlen(chunk1) - 1] = reference[0];
     chunk2[0] = reference[1];
     chunk2[1] = reference[2];
-    const char* chunks[] = {chunk1, chunk2, chunk3, "foo();", NULL};
+    const char* chunks[] = {chunk1, chunk2, chunk3, "foo();", nullptr};
     RunStreamingTest(chunks, v8::ScriptCompiler::StreamedSource::UTF8);
   }
   // Case 2: the script ends with a multi-byte character. Make sure that it's
@@ -25232,7 +25023,7 @@
     char chunk1[] =
         "var foob\xec\x92\x81 = 13;\n"
         "foob\xec\x92\x81";
-    const char* chunks[] = {chunk1, NULL};
+    const char* chunks[] = {chunk1, nullptr};
     RunStreamingTest(chunks, v8::ScriptCompiler::StreamedSource::UTF8);
   }
 }
@@ -25256,7 +25047,7 @@
   chunk1[strlen(chunk1) - 1] = reference[0];
   chunk2[0] = reference[1];
   chunk3[0] = reference[2];
-  const char* chunks[] = {chunk1, chunk2, chunk3, "foo();", NULL};
+  const char* chunks[] = {chunk1, chunk2, chunk3, "foo();", nullptr};
 
   RunStreamingTest(chunks, v8::ScriptCompiler::StreamedSource::UTF8);
 }
@@ -25264,7 +25055,7 @@
 
 TEST(StreamingProducesParserCache) {
   const char* chunks[] = {"function foo() { ret", "urn 13; } f", "oo(); ",
-                          NULL};
+                          nullptr};
 
   LocalContext env;
   v8::Isolate* isolate = env->GetIsolate();
@@ -25283,8 +25074,8 @@
   delete task;
 
   const v8::ScriptCompiler::CachedData* cached_data = source.GetCachedData();
-  CHECK(cached_data != NULL);
-  CHECK(cached_data->data != NULL);
+  CHECK_NOT_NULL(cached_data);
+  CHECK_NOT_NULL(cached_data->data);
   CHECK(!cached_data->rejected);
   CHECK_GT(cached_data->length, 0);
 }
@@ -25301,7 +25092,7 @@
                           "  };",
                           "  foo(2);",
                           "}",
-                          NULL};
+                          nullptr};
 
   LocalContext env;
   v8::Isolate* isolate = env->GetIsolate();
@@ -25354,7 +25145,7 @@
       "}\n";
   for (int i = 0; i < 5; ++i) chunk1[strlen(chunk1) - 5 + i] = reference[i];
 
-  const char* chunks[] = {chunk1, chunk2, "foo();", NULL};
+  const char* chunks[] = {chunk1, chunk2, "foo();", nullptr};
   RunStreamingTest(chunks, v8::ScriptCompiler::StreamedSource::UTF8, false);
 }
 
@@ -25375,7 +25166,7 @@
   chunk1[strlen(chunk1) - 1] = reference[0];
   chunk2[0] = reference[1];
   chunk2[1] = reference[2];
-  const char* chunks[] = {chunk1, chunk2, "foo();", NULL};
+  const char* chunks[] = {chunk1, chunk2, "foo();", nullptr};
   RunStreamingTest(chunks, v8::ScriptCompiler::StreamedSource::UTF8);
 }
 
@@ -25396,7 +25187,7 @@
   chunk1[strlen(chunk1) - 1] = reference[0];
   chunk2[0] = reference[1];
   chunk2[1] = reference[2];
-  const char* chunks[] = {chunk1, chunk2, "foo();", NULL};
+  const char* chunks[] = {chunk1, chunk2, "foo();", nullptr};
   RunStreamingTest(chunks, v8::ScriptCompiler::StreamedSource::UTF8);
 }
 
@@ -25413,7 +25204,7 @@
 
   // Then stream a script which (erroneously) tries to introduce the same
   // variable again.
-  const char* chunks[] = {"\"use strict\"; let x = 2;", NULL};
+  const char* chunks[] = {"\"use strict\"; let x = 2;", nullptr};
 
   v8::TryCatch try_catch(isolate);
   v8::ScriptCompiler::StreamedSource source(
@@ -25555,8 +25346,8 @@
   USE(script);
   const v8::ScriptCompiler::CachedData* original_cached_data =
       source.GetCachedData();
-  CHECK(original_cached_data != NULL);
-  CHECK(original_cached_data->data != NULL);
+  CHECK_NOT_NULL(original_cached_data);
+  CHECK_NOT_NULL(original_cached_data->data);
   CHECK(!original_cached_data->rejected);
   CHECK_GT(original_cached_data->length, 0);
   // Recompiling the same script with it won't reject the data.
@@ -25572,7 +25363,7 @@
     USE(script);
     const v8::ScriptCompiler::CachedData* new_cached_data =
         source_with_cached_data.GetCachedData();
-    CHECK(new_cached_data != NULL);
+    CHECK_NOT_NULL(new_cached_data);
     CHECK(!new_cached_data->rejected);
   }
   // Compile an incompatible script with the cached data. The new script doesn't
@@ -25592,7 +25383,7 @@
     USE(script);
     const v8::ScriptCompiler::CachedData* new_cached_data =
         source_with_cached_data.GetCachedData();
-    CHECK(new_cached_data != NULL);
+    CHECK_NOT_NULL(new_cached_data);
     CHECK(new_cached_data->rejected);
   }
 }
@@ -25717,7 +25508,7 @@
 
 TEST(SimpleStreamingScriptWithSourceURL) {
   const char* chunks[] = {"function foo() { ret", "urn 13; } f", "oo();\n",
-                          "//# sourceURL=bar2.js\n", NULL};
+                          "//# sourceURL=bar2.js\n", nullptr};
   RunStreamingTest(chunks, v8::ScriptCompiler::StreamedSource::UTF8, true,
                    "bar2.js");
 }
@@ -25725,7 +25516,7 @@
 
 TEST(StreamingScriptWithSplitSourceURL) {
   const char* chunks[] = {"function foo() { ret", "urn 13; } f",
-                          "oo();\n//# sourceURL=b", "ar2.js\n", NULL};
+                          "oo();\n//# sourceURL=b", "ar2.js\n", nullptr};
   RunStreamingTest(chunks, v8::ScriptCompiler::StreamedSource::UTF8, true,
                    "bar2.js");
 }
@@ -25733,19 +25524,22 @@
 
 TEST(StreamingScriptWithSourceMappingURLInTheMiddle) {
   const char* chunks[] = {"function foo() { ret", "urn 13; }\n//#",
-                          " sourceMappingURL=bar2.js\n", "foo();", NULL};
-  RunStreamingTest(chunks, v8::ScriptCompiler::StreamedSource::UTF8, true, NULL,
-                   "bar2.js");
+                          " sourceMappingURL=bar2.js\n", "foo();", nullptr};
+  RunStreamingTest(chunks, v8::ScriptCompiler::StreamedSource::UTF8, true,
+                   nullptr, "bar2.js");
 }
 
 
 TEST(NewStringRangeError) {
+  // This test uses a lot of memory and fails with flaky OOM when run
+  // with --stress-incremental-marking on TSAN.
+  i::FLAG_stress_incremental_marking = false;
   v8::Isolate* isolate = CcTest::isolate();
   v8::HandleScope handle_scope(isolate);
   const int length = i::String::kMaxLength + 1;
   const int buffer_size = length * sizeof(uint16_t);
   void* buffer = malloc(buffer_size);
-  if (buffer == NULL) return;
+  if (buffer == nullptr) return;
   memset(buffer, 'A', buffer_size);
   {
     v8::TryCatch try_catch(isolate);
@@ -26289,8 +26083,8 @@
   ScopedSharedArrayBufferContents contents(ab->Externalize());
 
   // Array buffers should have normal allocation mode.
-  CHECK(contents.AllocationMode() ==
-        v8::ArrayBuffer::Allocator::AllocationMode::kNormal);
+  CHECK_EQ(contents.AllocationMode(),
+           v8::ArrayBuffer::Allocator::AllocationMode::kNormal);
   // The allocation must contain the buffer (normally they will be equal, but
   // this is not required by the contract).
   CHECK_NOT_NULL(contents.AllocationBase());
@@ -26315,7 +26109,7 @@
   v8::HandleScope handle_scope(isolate);
   v8::Local<v8::ObjectTemplate> global_template =
       v8::ObjectTemplate::New(isolate);
-  LocalContext env(NULL, global_template);
+  LocalContext env(nullptr, global_template);
 
   i::FLAG_abort_on_uncaught_exception = true;
   isolate->SetAbortOnUncaughtExceptionCallback(NoAbortOnUncaughtException);
@@ -26326,7 +26120,7 @@
   v8::Local<v8::Function> foo = v8::Local<v8::Function>::Cast(
       global_object->Get(env.local(), v8_str("boom")).ToLocalChecked());
 
-  CHECK(foo->Call(env.local(), global_object, 0, NULL).IsEmpty());
+  CHECK(foo->Call(env.local(), global_object, 0, nullptr).IsEmpty());
 
   CHECK_EQ(1, nb_uncaught_exception_callback_calls);
 }
@@ -26662,7 +26456,7 @@
   CHECK(proxy->IsProxy());
   CHECK(!target->IsProxy());
   CHECK(proxy->IsRevoked());
-  CHECK(proxy->GetTarget()->SameValue(target));
+  CHECK(proxy->GetTarget()->IsNull());
   CHECK(proxy->GetHandler()->IsNull());
 }
 
@@ -26798,7 +26592,7 @@
   v8::Context::Scope scope(call_eval_context);
   args.GetReturnValue().Set(
       call_eval_bound_function
-          ->Call(call_eval_context, call_eval_context->Global(), 0, NULL)
+          ->Call(call_eval_context, call_eval_context->Global(), 0, nullptr)
           .ToLocalChecked());
 }
 
@@ -26831,8 +26625,8 @@
 
   obj_template->SetAccessCheckCallback(AccessAlwaysAllowed);
 
-  v8::Local<Context> context0 = Context::New(isolate, NULL, obj_template);
-  v8::Local<Context> context1 = Context::New(isolate, NULL, obj_template);
+  v8::Local<Context> context0 = Context::New(isolate, nullptr, obj_template);
+  v8::Local<Context> context1 = Context::New(isolate, nullptr, obj_template);
 
   Local<Value> foo = v8_str("foo");
   Local<Value> bar = v8_str("bar");
@@ -27019,7 +26813,7 @@
       v8::String::NewFromUtf8(isolate, "prop", v8::NewStringType::kInternalized)
           .ToLocalChecked(),
       &ensure_receiver_is_global_proxy);
-  LocalContext env(NULL, global_template);
+  LocalContext env(nullptr, global_template);
   CompileRun("for (var i = 0; i < 10; i++) this.prop");
   CompileRun("for (var i = 0; i < 10; i++) prop");
 }
@@ -27197,6 +26991,58 @@
   CHECK(result->Equals(i::String::cast(promise->result())));
 }
 
+void HostInitializeImportMetaObjectCallbackStatic(Local<Context> context,
+                                                  Local<Module> module,
+                                                  Local<Object> meta) {
+  CHECK(!module.IsEmpty());
+
+  meta->CreateDataProperty(context, v8_str("foo"), v8_str("bar")).ToChecked();
+}
+
+v8::MaybeLocal<Module> UnexpectedModuleResolveCallback(Local<Context> context,
+                                                       Local<String> specifier,
+                                                       Local<Module> referrer) {
+  CHECK_WITH_MSG(false, "Unexpected call to resolve callback");
+}
+
+TEST(ImportMeta) {
+  i::FLAG_harmony_dynamic_import = true;
+  i::FLAG_harmony_import_meta = true;
+  LocalContext context;
+  v8::Isolate* isolate = context->GetIsolate();
+  v8::HandleScope scope(isolate);
+
+  isolate->SetHostInitializeImportMetaObjectCallback(
+      HostInitializeImportMetaObjectCallbackStatic);
+
+  i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate);
+  Local<String> url = v8_str("www.google.com");
+  Local<String> source_text = v8_str("import.meta;");
+  v8::ScriptOrigin origin(url, Local<v8::Integer>(), Local<v8::Integer>(),
+                          Local<v8::Boolean>(), Local<v8::Integer>(),
+                          Local<v8::Value>(), Local<v8::Boolean>(),
+                          Local<v8::Boolean>(), True(isolate));
+  v8::ScriptCompiler::Source source(source_text, origin);
+  Local<Module> module =
+      v8::ScriptCompiler::CompileModule(isolate, &source).ToLocalChecked();
+  i::Handle<i::Object> meta =
+      i_isolate->RunHostInitializeImportMetaObjectCallback(
+          v8::Utils::OpenHandle(*module));
+  CHECK(meta->IsJSObject());
+  Local<Object> meta_obj = Local<Object>::Cast(v8::Utils::ToLocal(meta));
+  CHECK(meta_obj->Get(context.local(), v8_str("foo"))
+            .ToLocalChecked()
+            ->IsString());
+  CHECK(meta_obj->Get(context.local(), v8_str("zapp"))
+            .ToLocalChecked()
+            ->IsUndefined());
+
+  module->InstantiateModule(context.local(), UnexpectedModuleResolveCallback)
+      .ToChecked();
+  Local<Value> result = module->Evaluate(context.local()).ToLocalChecked();
+  CHECK(result->StrictEquals(Local<v8::Value>::Cast(v8::Utils::ToLocal(meta))));
+}
+
 TEST(GlobalTemplateWithDoubleProperty) {
   v8::Isolate* isolate = CcTest::isolate();
   v8::HandleScope handle_scope(isolate);
@@ -27259,3 +27105,19 @@
   CHECK(array->Get(3)->IsBoolean());
   CHECK(array->Get(4)->IsNull());
 }
+
+TEST(PersistentValueMap) {
+  v8::Isolate* isolate = CcTest::isolate();
+  v8::HandleScope scope(isolate);
+  LocalContext env;
+
+  v8::PersistentValueMap<
+      std::string, v8::Value,
+      v8::DefaultPersistentValueMapTraits<std::string, v8::Value>>
+      map(isolate);
+  v8::Local<v8::Value> value =
+      v8::String::NewFromUtf8(isolate, "value",
+                              v8::NewStringType::kInternalized)
+          .ToLocalChecked();
+  map.Set("key", value);
+}
diff --git a/src/v8/test/cctest/test-array-list.cc b/src/v8/test/cctest/test-array-list.cc
index b00d6f8..91882cd 100644
--- a/src/v8/test/cctest/test-array-list.cc
+++ b/src/v8/test/cctest/test-array-list.cc
@@ -4,16 +4,8 @@
 
 #include <stdlib.h>
 
-#include "src/v8.h"
-
 #include "src/factory.h"
-// FIXME(mstarzinger, marja): This is weird, but required because of the missing
-// (disallowed) include: src/factory.h -> src/objects-inl.h
 #include "src/objects-inl.h"
-// FIXME(mstarzinger, marja): This is weird, but required because of the missing
-// (disallowed) include: src/feedback-vector.h ->
-// src/feedback-vector-inl.h
-#include "src/feedback-vector-inl.h"
 #include "test/cctest/cctest.h"
 
 namespace v8 {
diff --git a/src/v8/test/cctest/test-assembler-arm.cc b/src/v8/test/cctest/test-assembler-arm.cc
index 5f40554..10a111c 100644
--- a/src/v8/test/cctest/test-assembler-arm.cc
+++ b/src/v8/test/cctest/test-assembler-arm.cc
@@ -27,7 +27,6 @@
 
 #include <iostream>  // NOLINT(readability/streams)
 
-#include "src/arm/simulator-arm.h"
 #include "src/assembler-inl.h"
 #include "src/base/utils/random-number-generator.h"
 #include "src/disassembler.h"
@@ -35,8 +34,11 @@
 #include "src/factory.h"
 #include "src/macro-assembler.h"
 #include "src/ostreams.h"
+#include "src/simulator.h"
 #include "src/v8.h"
+#include "test/cctest/assembler-helper-arm.h"
 #include "test/cctest/cctest.h"
+#include "test/cctest/compiler/value-helper.h"
 
 namespace v8 {
 namespace internal {
@@ -44,13 +46,6 @@
 
 using base::RandomNumberGenerator;
 
-// Define these function prototypes to match JSEntryFunction in execution.cc.
-typedef Object* (*F1)(int x, int p1, int p2, int p3, int p4);
-typedef Object* (*F2)(int x, int y, int p2, int p3, int p4);
-typedef Object* (*F3)(void* p0, int p1, int p2, int p3, int p4);
-typedef Object* (*F4)(void* p0, void* p1, int p2, int p3, int p4);
-typedef Object* (*F5)(uint32_t p0, void* p1, void* p2, int p3, int p4);
-
 #define __ assm.
 
 TEST(0) {
@@ -58,7 +53,7 @@
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
 
-  Assembler assm(isolate, NULL, 0);
+  Assembler assm(isolate, nullptr, 0);
 
   __ add(r0, r0, Operand(r1));
   __ mov(pc, Operand(lr));
@@ -71,9 +66,8 @@
   OFStream os(stdout);
   code->Print(os);
 #endif
-  F2 f = FUNCTION_CAST<F2>(code->entry());
-  int res =
-      reinterpret_cast<int>(CALL_GENERATED_CODE(isolate, f, 3, 4, 0, 0, 0));
+  auto f = GeneratedCode<F_iiiii>::FromCode(*code);
+  int res = reinterpret_cast<int>(f.Call(3, 4, 0, 0, 0));
   ::printf("f() = %d\n", res);
   CHECK_EQ(7, res);
 }
@@ -84,7 +78,7 @@
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
 
-  Assembler assm(isolate, NULL, 0);
+  Assembler assm(isolate, nullptr, 0);
   Label L, C;
 
   __ mov(r1, Operand(r0));
@@ -108,9 +102,8 @@
   OFStream os(stdout);
   code->Print(os);
 #endif
-  F1 f = FUNCTION_CAST<F1>(code->entry());
-  int res =
-      reinterpret_cast<int>(CALL_GENERATED_CODE(isolate, f, 100, 0, 0, 0, 0));
+  auto f = GeneratedCode<F_iiiii>::FromCode(*code);
+  int res = reinterpret_cast<int>(f.Call(100, 0, 0, 0, 0));
   ::printf("f() = %d\n", res);
   CHECK_EQ(5050, res);
 }
@@ -121,7 +114,7 @@
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
 
-  Assembler assm(isolate, NULL, 0);
+  Assembler assm(isolate, nullptr, 0);
   Label L, C;
 
   __ mov(r1, Operand(r0));
@@ -154,9 +147,8 @@
   OFStream os(stdout);
   code->Print(os);
 #endif
-  F1 f = FUNCTION_CAST<F1>(code->entry());
-  int res =
-      reinterpret_cast<int>(CALL_GENERATED_CODE(isolate, f, 10, 0, 0, 0, 0));
+  auto f = GeneratedCode<F_iiiii>::FromCode(*code);
+  int res = reinterpret_cast<int>(f.Call(10, 0, 0, 0, 0));
   ::printf("f() = %d\n", res);
   CHECK_EQ(3628800, res);
 }
@@ -174,7 +166,7 @@
   } T;
   T t;
 
-  Assembler assm(isolate, NULL, 0);
+  Assembler assm(isolate, nullptr, 0);
   Label L, C;
 
   __ mov(ip, Operand(sp));
@@ -202,12 +194,11 @@
   OFStream os(stdout);
   code->Print(os);
 #endif
-  F3 f = FUNCTION_CAST<F3>(code->entry());
+  auto f = GeneratedCode<F_piiii>::FromCode(*code);
   t.i = 100000;
   t.c = 10;
   t.s = 1000;
-  int res =
-      reinterpret_cast<int>(CALL_GENERATED_CODE(isolate, f, &t, 0, 0, 0, 0));
+  int res = reinterpret_cast<int>(f.Call(&t, 0, 0, 0, 0));
   ::printf("f() = %d\n", res);
   CHECK_EQ(101010, res);
   CHECK_EQ(100000/2, t.i);
@@ -244,7 +235,7 @@
 
   // Create a function that accepts &t, and loads, manipulates, and stores
   // the doubles and floats.
-  Assembler assm(isolate, NULL, 0);
+  Assembler assm(isolate, nullptr, 0);
   Label L, C;
 
   if (CpuFeatures::IsSupported(VFPv3)) {
@@ -281,7 +272,7 @@
     __ vstr(d4, r4, offsetof(T, e));
 
     // Move a literal into a register that requires 64 bits to encode.
-    // 0x3ff0000010000000 = 1.000000059604644775390625
+    // 0x3FF0000010000000 = 1.000000059604644775390625
     __ vmov(d4, Double(1.000000059604644775390625));
     __ vstr(d4, r4, offsetof(T, d));
 
@@ -334,7 +325,7 @@
     OFStream os(stdout);
     code->Print(os);
 #endif
-    F3 f = FUNCTION_CAST<F3>(code->entry());
+    auto f = GeneratedCode<F_piiii>::FromCode(*code);
     t.a = 1.5;
     t.b = 2.75;
     t.c = 17.17;
@@ -349,8 +340,7 @@
     t.n = 123.456;
     t.x = 4.5;
     t.y = 9.0;
-    Object* dummy = CALL_GENERATED_CODE(isolate, f, &t, 0, 0, 0, 0);
-    USE(dummy);
+    f.Call(&t, 0, 0, 0, 0);
     CHECK_EQ(-16.0f, t.p);
     CHECK_EQ(0.25f, t.o);
     CHECK_EQ(-123.456, t.n);
@@ -377,7 +367,7 @@
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
 
-  Assembler assm(isolate, NULL, 0);
+  Assembler assm(isolate, nullptr, 0);
 
   if (CpuFeatures::IsSupported(ARMv7)) {
     CpuFeatureScope scope(&assm, ARMv7);
@@ -397,9 +387,8 @@
     OFStream os(stdout);
     code->Print(os);
 #endif
-    F1 f = FUNCTION_CAST<F1>(code->entry());
-    int res = reinterpret_cast<int>(
-        CALL_GENERATED_CODE(isolate, f, 0xAAAAAAAA, 0, 0, 0, 0));
+    auto f = GeneratedCode<F_iiiii>::FromCode(*code);
+    int res = reinterpret_cast<int>(f.Call(0xAAAAAAAA, 0, 0, 0, 0));
     ::printf("f() = %d\n", res);
     CHECK_EQ(-7, res);
   }
@@ -412,7 +401,7 @@
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
 
-  Assembler assm(isolate, NULL, 0);
+  Assembler assm(isolate, nullptr, 0);
 
   __ usat(r1, 8, Operand(r0));           // Sat 0xFFFF to 0-255 = 0xFF.
   __ usat(r2, 12, Operand(r0, ASR, 9));  // Sat (0xFFFF>>9) to 0-4095 = 0x7F.
@@ -429,9 +418,8 @@
   OFStream os(stdout);
   code->Print(os);
 #endif
-  F1 f = FUNCTION_CAST<F1>(code->entry());
-  int res = reinterpret_cast<int>(
-      CALL_GENERATED_CODE(isolate, f, 0xFFFF, 0, 0, 0, 0));
+  auto f = GeneratedCode<F_iiiii>::FromCode(*code);
+  int res = reinterpret_cast<int>(f.Call(0xFFFF, 0, 0, 0, 0));
   ::printf("f() = %d\n", res);
   CHECK_EQ(382, res);
 }
@@ -450,7 +438,7 @@
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
 
-  Assembler assm(isolate, NULL, 0);
+  Assembler assm(isolate, nullptr, 0);
 
   Label wrong_exception;
 
@@ -498,9 +486,8 @@
   OFStream os(stdout);
   code->Print(os);
 #endif
-  F1 f = FUNCTION_CAST<F1>(code->entry());
-  int res =
-      reinterpret_cast<int>(CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0));
+  auto f = GeneratedCode<F_iiiii>::FromCode(*code);
+  int res = reinterpret_cast<int>(f.Call(0, 0, 0, 0, 0));
   ::printf("res = %d\n", res);
   CHECK_EQ(expected, res);
 }
@@ -578,8 +565,8 @@
   TestRoundingMode(u32_f64, RZ, kMinInt - 1.0, 0, true);
 
   // Positive values.
-  // kMaxInt is the maximum *signed* integer: 0x7fffffff.
-  static const uint32_t kMaxUInt = 0xffffffffu;
+  // kMaxInt is the maximum *signed* integer: 0x7FFFFFFF.
+  static const uint32_t kMaxUInt = 0xFFFFFFFFu;
   TestRoundingMode(u32_f64, RZ,  0, 0);
   TestRoundingMode(u32_f64, RZ,  0.5, 0);
   TestRoundingMode(u32_f64, RZ,  123.7,  123);
@@ -649,7 +636,7 @@
 
   // Create a function that uses vldm/vstm to move some double and
   // single precision values around in memory.
-  Assembler assm(isolate, NULL, 0);
+  Assembler assm(isolate, nullptr, 0);
 
   __ mov(ip, Operand(sp));
   __ stm(db_w, sp, r4.bit() | fp.bit() | lr.bit());
@@ -681,7 +668,7 @@
   OFStream os(stdout);
   code->Print(os);
 #endif
-  F4 fn = FUNCTION_CAST<F4>(code->entry());
+  auto fn = GeneratedCode<F_ppiii>::FromCode(*code);
   d.a = 1.1;
   d.b = 2.2;
   d.c = 3.3;
@@ -700,8 +687,7 @@
   f.g = 7.0;
   f.h = 8.0;
 
-  Object* dummy = CALL_GENERATED_CODE(isolate, fn, &d, &f, 0, 0, 0);
-  USE(dummy);
+  fn.Call(&d, &f, 0, 0, 0);
 
   CHECK_EQ(7.7, d.a);
   CHECK_EQ(8.8, d.b);
@@ -755,7 +741,7 @@
 
   // Create a function that uses vldm/vstm to move some double and
   // single precision values around in memory.
-  Assembler assm(isolate, NULL, 0);
+  Assembler assm(isolate, nullptr, 0);
 
   __ mov(ip, Operand(sp));
   __ stm(db_w, sp, r4.bit() | fp.bit() | lr.bit());
@@ -791,7 +777,7 @@
   OFStream os(stdout);
   code->Print(os);
 #endif
-  F4 fn = FUNCTION_CAST<F4>(code->entry());
+  auto fn = GeneratedCode<F_ppiii>::FromCode(*code);
   d.a = 1.1;
   d.b = 2.2;
   d.c = 3.3;
@@ -810,8 +796,7 @@
   f.g = 7.0;
   f.h = 8.0;
 
-  Object* dummy = CALL_GENERATED_CODE(isolate, fn, &d, &f, 0, 0, 0);
-  USE(dummy);
+  fn.Call(&d, &f, 0, 0, 0);
 
   CHECK_EQ(7.7, d.a);
   CHECK_EQ(8.8, d.b);
@@ -865,7 +850,7 @@
 
   // Create a function that uses vldm/vstm to move some double and
   // single precision values around in memory.
-  Assembler assm(isolate, NULL, 0);
+  Assembler assm(isolate, nullptr, 0);
 
   __ mov(ip, Operand(sp));
   __ stm(db_w, sp, r4.bit() | fp.bit() | lr.bit());
@@ -897,7 +882,7 @@
   OFStream os(stdout);
   code->Print(os);
 #endif
-  F4 fn = FUNCTION_CAST<F4>(code->entry());
+  auto fn = GeneratedCode<F_ppiii>::FromCode(*code);
   d.a = 1.1;
   d.b = 2.2;
   d.c = 3.3;
@@ -916,8 +901,7 @@
   f.g = 7.0;
   f.h = 8.0;
 
-  Object* dummy = CALL_GENERATED_CODE(isolate, fn, &d, &f, 0, 0, 0);
-  USE(dummy);
+  fn.Call(&d, &f, 0, 0, 0);
 
   CHECK_EQ(7.7, d.a);
   CHECK_EQ(8.8, d.b);
@@ -953,10 +937,10 @@
   } I;
   I i;
 
-  i.a = 0xabcd0001;
-  i.b = 0xabcd0000;
+  i.a = 0xABCD0001;
+  i.b = 0xABCD0000;
 
-  Assembler assm(isolate, NULL, 0);
+  Assembler assm(isolate, nullptr, 0);
 
   // Test HeapObject untagging.
   __ ldr(r1, MemOperand(r0, offsetof(I, a)));
@@ -970,13 +954,13 @@
   __ str(r2, MemOperand(r0, offsetof(I, b)));
 
   // Test corner cases.
-  __ mov(r1, Operand(0xffffffff));
+  __ mov(r1, Operand(0xFFFFFFFF));
   __ mov(r2, Operand::Zero());
   __ mov(r3, Operand(r1, ASR, 1), SetCC);  // Set the carry.
   __ adc(r3, r1, Operand(r2));
   __ str(r3, MemOperand(r0, offsetof(I, c)));
 
-  __ mov(r1, Operand(0xffffffff));
+  __ mov(r1, Operand(0xFFFFFFFF));
   __ mov(r2, Operand::Zero());
   __ mov(r3, Operand(r2, ASR, 1), SetCC);  // Unset the carry.
   __ adc(r3, r1, Operand(r2));
@@ -992,14 +976,13 @@
   OFStream os(stdout);
   code->Print(os);
 #endif
-  F3 f = FUNCTION_CAST<F3>(code->entry());
-  Object* dummy = CALL_GENERATED_CODE(isolate, f, &i, 0, 0, 0, 0);
-  USE(dummy);
+  auto f = GeneratedCode<F_piiii>::FromCode(*code);
+  f.Call(&i, 0, 0, 0, 0);
 
-  CHECK_EQ(static_cast<int32_t>(0xabcd0001), i.a);
-  CHECK_EQ(static_cast<int32_t>(0xabcd0000) >> 1, i.b);
+  CHECK_EQ(static_cast<int32_t>(0xABCD0001), i.a);
+  CHECK_EQ(static_cast<int32_t>(0xABCD0000) >> 1, i.b);
   CHECK_EQ(0x00000000, i.c);
-  CHECK_EQ(static_cast<int32_t>(0xffffffff), i.d);
+  CHECK_EQ(static_cast<int32_t>(0xFFFFFFFF), i.d);
 }
 
 
@@ -1009,7 +992,7 @@
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
 
-  Assembler assm(isolate, NULL, 0);
+  Assembler assm(isolate, nullptr, 0);
   Label target;
   __ b(eq, &target);
   __ b(ne, &target);
@@ -1045,7 +1028,7 @@
 
   // Create a function that accepts &t, and loads, manipulates, and stores
   // the doubles and floats.
-  Assembler assm(isolate, NULL, 0);
+  Assembler assm(isolate, nullptr, 0);
   Label L, C;
 
   if (CpuFeatures::IsSupported(VFPv3)) {
@@ -1119,15 +1102,14 @@
     OFStream os(stdout);
     code->Print(os);
 #endif
-    F3 f = FUNCTION_CAST<F3>(code->entry());
+    auto f = GeneratedCode<F_piiii>::FromCode(*code);
     t.a = 1.5;
     t.b = 2.75;
     t.c = 17.17;
     t.x = 1.5;
     t.y = 2.75;
     t.z = 17.17;
-    Object* dummy = CALL_GENERATED_CODE(isolate, f, &t, 0, 0, 0, 0);
-    USE(dummy);
+    f.Call(&t, 0, 0, 0, 0);
     CHECK_EQ(14.7610017472335499, t.a);
     CHECK_EQ(3.84200491244266251, t.b);
     CHECK_EQ(73.8818412254460241, t.c);
@@ -1160,7 +1142,7 @@
   T t;
 
   // Create a function that makes the four basic operations.
-  Assembler assm(isolate, NULL, 0);
+  Assembler assm(isolate, nullptr, 0);
 
   // Ensure FPSCR state (as JSEntryStub does).
   Label fpscr_done;
@@ -1192,36 +1174,35 @@
   OFStream os(stdout);
   code->Print(os);
 #endif
-  F3 f = FUNCTION_CAST<F3>(code->entry());
+  auto f = GeneratedCode<F_piiii>::FromCode(*code);
   t.left = bit_cast<double>(kHoleNanInt64);
   t.right = 1;
   t.add_result = 0;
   t.sub_result = 0;
   t.mul_result = 0;
   t.div_result = 0;
-  Object* dummy = CALL_GENERATED_CODE(isolate, f, &t, 0, 0, 0, 0);
-  USE(dummy);
-  const uint32_t kArmNanUpper32 = 0x7ff80000;
+  f.Call(&t, 0, 0, 0, 0);
+  const uint32_t kArmNanUpper32 = 0x7FF80000;
   const uint32_t kArmNanLower32 = 0x00000000;
 #ifdef DEBUG
   const uint64_t kArmNanInt64 =
       (static_cast<uint64_t>(kArmNanUpper32) << 32) | kArmNanLower32;
-  CHECK(kArmNanInt64 != kHoleNanInt64);
+  CHECK_NE(kArmNanInt64, kHoleNanInt64);
 #endif
   // With VFP2 the sign of the canonicalized Nan is undefined. So
   // we remove the sign bit for the upper tests.
   CHECK_EQ(kArmNanUpper32,
-           (bit_cast<int64_t>(t.add_result) >> 32) & 0x7fffffff);
-  CHECK_EQ(kArmNanLower32, bit_cast<int64_t>(t.add_result) & 0xffffffffu);
+           (bit_cast<int64_t>(t.add_result) >> 32) & 0x7FFFFFFF);
+  CHECK_EQ(kArmNanLower32, bit_cast<int64_t>(t.add_result) & 0xFFFFFFFFu);
   CHECK_EQ(kArmNanUpper32,
-           (bit_cast<int64_t>(t.sub_result) >> 32) & 0x7fffffff);
-  CHECK_EQ(kArmNanLower32, bit_cast<int64_t>(t.sub_result) & 0xffffffffu);
+           (bit_cast<int64_t>(t.sub_result) >> 32) & 0x7FFFFFFF);
+  CHECK_EQ(kArmNanLower32, bit_cast<int64_t>(t.sub_result) & 0xFFFFFFFFu);
   CHECK_EQ(kArmNanUpper32,
-           (bit_cast<int64_t>(t.mul_result) >> 32) & 0x7fffffff);
-  CHECK_EQ(kArmNanLower32, bit_cast<int64_t>(t.mul_result) & 0xffffffffu);
+           (bit_cast<int64_t>(t.mul_result) >> 32) & 0x7FFFFFFF);
+  CHECK_EQ(kArmNanLower32, bit_cast<int64_t>(t.mul_result) & 0xFFFFFFFFu);
   CHECK_EQ(kArmNanUpper32,
-           (bit_cast<int64_t>(t.div_result) >> 32) & 0x7fffffff);
-  CHECK_EQ(kArmNanLower32, bit_cast<int64_t>(t.div_result) & 0xffffffffu);
+           (bit_cast<int64_t>(t.div_result) >> 32) & 0x7FFFFFFF);
+  CHECK_EQ(kArmNanLower32, bit_cast<int64_t>(t.div_result) & 0xFFFFFFFFu);
 }
 
 #define CHECK_EQ_SPLAT(field, ex) \
@@ -1340,7 +1321,7 @@
 
   // Create a function that accepts &t, and loads, manipulates, and stores
   // the doubles, floats, and SIMD values.
-  Assembler assm(isolate, NULL, 0);
+  Assembler assm(isolate, nullptr, 0);
 
   if (CpuFeatures::IsSupported(NEON)) {
     CpuFeatureScope scope(&assm, NEON);
@@ -1381,7 +1362,7 @@
     __ vstr(d4, r0, offsetof(T, vqmovn_s32));
 
     // ARM core register to scalar.
-    __ mov(r4, Operand(0xfffffff8));
+    __ mov(r4, Operand(0xFFFFFFF8));
     __ vmov(d0, Double(0.0));
     __ vmov(NeonS8, d0, 1, r4);
     __ vmov(NeonS16, d0, 1, r4);
@@ -1393,8 +1374,8 @@
     __ vstr(d0, r0, offsetof(T, vmov_to_scalar2));
 
     // Scalar to ARM core register.
-    __ mov(r4, Operand(0xffffff00));
-    __ mov(r5, Operand(0xffffffff));
+    __ mov(r4, Operand(0xFFFFFF00));
+    __ mov(r5, Operand(0xFFFFFFFF));
     __ vmov(d0, r4, r5);
     __ vmov(NeonS8, r4, d0, 1);
     __ str(r4, MemOperand(r0, offsetof(T, vmov_from_scalar_s8)));
@@ -1446,7 +1427,7 @@
     __ vst1(Neon8, NeonListOperand(q1), NeonMemOperand(r4));
 
     // vdup (from register).
-    __ mov(r4, Operand(0xa));
+    __ mov(r4, Operand(0xA));
     __ vdup(Neon8, q0, r4);
     __ vdup(Neon16, q1, r4);
     __ vdup(Neon32, q2, r4);
@@ -1482,10 +1463,10 @@
     __ vst1(Neon8, NeonListOperand(q1), NeonMemOperand(r4));
 
     // vabs (integer).
-    __ mov(r4, Operand(0x7f7f7f7f));
+    __ mov(r4, Operand(0x7F7F7F7F));
     __ mov(r5, Operand(0x01010101));
     __ vmov(d0, r4, r5);
-    __ mov(r4, Operand(0xffffffff));
+    __ mov(r4, Operand(0xFFFFFFFF));
     __ mov(r5, Operand(0x80808080));
     __ vmov(d1, r4, r5);
     __ vabs(Neon8, q1, q0);
@@ -1509,7 +1490,7 @@
     __ vst1(Neon8, NeonListOperand(q1), NeonMemOperand(r4));
 
     // veor.
-    __ mov(r4, Operand(0xaa));
+    __ mov(r4, Operand(0xAA));
     __ vdup(Neon16, q0, r4);
     __ mov(r4, Operand(0x55));
     __ vdup(Neon16, q1, r4);
@@ -1517,15 +1498,15 @@
     __ add(r4, r0, Operand(static_cast<int32_t>(offsetof(T, veor))));
     __ vst1(Neon8, NeonListOperand(q1), NeonMemOperand(r4));
     // vand.
-    __ mov(r4, Operand(0xff));
+    __ mov(r4, Operand(0xFF));
     __ vdup(Neon16, q0, r4);
-    __ mov(r4, Operand(0xfe));
+    __ mov(r4, Operand(0xFE));
     __ vdup(Neon16, q1, r4);
     __ vand(q1, q1, q0);
     __ add(r4, r0, Operand(static_cast<int32_t>(offsetof(T, vand))));
     __ vst1(Neon8, NeonListOperand(q1), NeonMemOperand(r4));
     // vorr.
-    __ mov(r4, Operand(0xaa));
+    __ mov(r4, Operand(0xAA));
     __ vdup(Neon16, q0, r4);
     __ mov(r4, Operand(0x55));
     __ vdup(Neon16, q1, r4);
@@ -1636,7 +1617,7 @@
     __ vmax(NeonS8, q2, q0, q1);
     __ add(r4, r0, Operand(static_cast<int32_t>(offsetof(T, vmax_s8))));
     __ vst1(Neon8, NeonListOperand(q2), NeonMemOperand(r4));
-    __ mov(r4, Operand(0xff));
+    __ mov(r4, Operand(0xFF));
     __ vdup(Neon16, q0, r4);
     __ vdup(Neon8, q1, r4);
     __ vmin(NeonU16, q2, q0, q1);
@@ -1645,7 +1626,7 @@
     __ vmax(NeonU16, q2, q0, q1);
     __ add(r4, r0, Operand(static_cast<int32_t>(offsetof(T, vmax_u16))));
     __ vst1(Neon8, NeonListOperand(q2), NeonMemOperand(r4));
-    __ mov(r4, Operand(0xff));
+    __ mov(r4, Operand(0xFF));
     __ vdup(Neon32, q0, r4);
     __ vdup(Neon8, q1, r4);
     __ vmin(NeonS32, q2, q0, q1);
@@ -1674,14 +1655,14 @@
     __ vstr(d4, r0, offsetof(T, vpmin_s8));
     __ vpmax(NeonS8, d4, d0, d2);
     __ vstr(d4, r0, offsetof(T, vpmax_s8));
-    __ mov(r4, Operand(0xffff));
+    __ mov(r4, Operand(0xFFFF));
     __ vdup(Neon32, q0, r4);
     __ vdup(Neon16, q1, r4);
     __ vpmin(NeonU16, d4, d0, d2);
     __ vstr(d4, r0, offsetof(T, vpmin_u16));
     __ vpmax(NeonU16, d4, d0, d2);
     __ vstr(d4, r0, offsetof(T, vpmax_u16));
-    __ mov(r4, Operand(0xff));
+    __ mov(r4, Operand(0xFF));
     __ veor(q0, q0, q0);
     __ vmov(s0, r4);
     __ vdup(Neon8, q1, r4);
@@ -1759,16 +1740,16 @@
     __ vst1(Neon8, NeonListOperand(q1), NeonMemOperand(r4));
 
     // vqsub.
-    __ mov(r4, Operand(0x7f));
+    __ mov(r4, Operand(0x7F));
     __ vdup(Neon8, q0, r4);
-    __ mov(r4, Operand(0x3f));
+    __ mov(r4, Operand(0x3F));
     __ vdup(Neon8, q1, r4);
     __ vqsub(NeonU8, q1, q1, q0);
     __ add(r4, r0, Operand(static_cast<int32_t>(offsetof(T, vqsub_u8))));
     __ vst1(Neon8, NeonListOperand(q1), NeonMemOperand(r4));
     __ mov(r4, Operand(0x8000));
     __ vdup(Neon16, q0, r4);
-    __ mov(r4, Operand(0x7fff));
+    __ mov(r4, Operand(0x7FFF));
     __ vdup(Neon16, q1, r4);
     __ vqsub(NeonS16, q1, q1, q0);
     __ add(r4, r0, Operand(static_cast<int32_t>(offsetof(T, vqsub_s16))));
@@ -1825,7 +1806,7 @@
     __ vst1(Neon8, NeonListOperand(q1), NeonMemOperand(r4));
 
     // vsli, vsri.
-    __ mov(r4, Operand(0xffffffff));
+    __ mov(r4, Operand(0xFFFFFFFF));
     __ mov(r5, Operand(0x1));
     __ vmov(d0, r4, r5);
     __ vmov(d1, r5, r5);
@@ -1862,7 +1843,7 @@
     __ vcgt(NeonS8, q2, q0, q1);
     __ add(r4, r0, Operand(static_cast<int32_t>(offsetof(T, vcgt_s8))));
     __ vst1(Neon8, NeonListOperand(q2), NeonMemOperand(r4));
-    __ mov(r4, Operand(0xff));
+    __ mov(r4, Operand(0xFF));
     __ vdup(Neon16, q0, r4);
     __ vdup(Neon8, q1, r4);
     __ vcge(NeonU16, q2, q0, q1);
@@ -1871,7 +1852,7 @@
     __ vcgt(NeonU16, q2, q0, q1);
     __ add(r4, r0, Operand(static_cast<int32_t>(offsetof(T, vcgt_u16))));
     __ vst1(Neon8, NeonListOperand(q2), NeonMemOperand(r4));
-    __ mov(r4, Operand(0xff));
+    __ mov(r4, Operand(0xFF));
     __ vdup(Neon32, q0, r4);
     __ vdup(Neon8, q1, r4);
     __ vcge(NeonS32, q2, q0, q1);
@@ -1891,7 +1872,7 @@
     __ vst1(Neon8, NeonListOperand(q1), NeonMemOperand(r4));
 
     // vbsl.
-    __ mov(r4, Operand(0x00ff));
+    __ mov(r4, Operand(0x00FF));
     __ vdup(Neon16, q0, r4);
     __ mov(r4, Operand(0x01));
     __ vdup(Neon8, q1, r4);
@@ -2055,7 +2036,7 @@
 
     // vtb[l/x].
     __ mov(r4, Operand(0x06040200));
-    __ mov(r5, Operand(0xff050301));
+    __ mov(r5, Operand(0xFF050301));
     __ vmov(d2, r4, r5);  // d2 = ff05030106040200
     __ vtbl(d0, NeonListOperand(d2, 1), d2);
     __ vstr(d0, r0, offsetof(T, vtbl));
@@ -2073,7 +2054,7 @@
     OFStream os(stdout);
     code->Print(os);
 #endif
-    F3 f = FUNCTION_CAST<F3>(code->entry());
+    auto f = GeneratedCode<F_piiii>::FromCode(*code);
     t.src0 = 0x01020304;
     t.src1 = 0x11121314;
     t.src2 = 0x21222324;
@@ -2098,10 +2079,9 @@
     t.dstA3 = 0;
     t.lane_test[0] = 0x03020100;
     t.lane_test[1] = 0x07060504;
-    t.lane_test[2] = 0x0b0a0908;
-    t.lane_test[3] = 0x0f0e0d0c;
-    Object* dummy = CALL_GENERATED_CODE(isolate, f, &t, 0, 0, 0, 0);
-    USE(dummy);
+    t.lane_test[2] = 0x0B0A0908;
+    t.lane_test[3] = 0x0F0E0D0C;
+    f.Call(&t, 0, 0, 0, 0);
 
     CHECK_EQ(0x01020304u, t.dst0);
     CHECK_EQ(0x11121314u, t.dst1);
@@ -2116,30 +2096,30 @@
     CHECK_EQ(0x00830084u, t.dstA2);
     CHECK_EQ(0x00810082u, t.dstA3);
 
-    CHECK_EQ_32X4(vmovl_s8, 0x00430044u, 0x00410042u, 0xff83ff84u, 0xff81ff82u);
-    CHECK_EQ_32X4(vmovl_u16, 0xff84u, 0xff83u, 0xff82u, 0xff81u);
-    CHECK_EQ_32X4(vmovl_s32, 0xff84u, 0x0u, 0xff83u, 0x0u);
-    CHECK_EQ_32X2(vqmovn_u16, 0xff83ff84u, 0xff81ff82u);
+    CHECK_EQ_32X4(vmovl_s8, 0x00430044u, 0x00410042u, 0xFF83FF84u, 0xFF81FF82u);
+    CHECK_EQ_32X4(vmovl_u16, 0xFF84u, 0xFF83u, 0xFF82u, 0xFF81u);
+    CHECK_EQ_32X4(vmovl_s32, 0xFF84u, 0x0u, 0xFF83u, 0x0u);
+    CHECK_EQ_32X2(vqmovn_u16, 0xFF83FF84u, 0xFF81FF82u);
     CHECK_EQ_32X2(vqmovn_s8, 0x81828384u, 0x81828384u);
-    CHECK_EQ_32X2(vqmovn_s32, 0xff84u, 0xff83u);
+    CHECK_EQ_32X2(vqmovn_s32, 0xFF84u, 0xFF83u);
 
-    CHECK_EQ(0xfffffff8fff8f800u, t.vmov_to_scalar1);
-    CHECK_EQ(0xfff80000f8000000u, t.vmov_to_scalar2);
+    CHECK_EQ(0xFFFFFFF8FFF8F800u, t.vmov_to_scalar1);
+    CHECK_EQ(0xFFF80000F8000000u, t.vmov_to_scalar2);
     CHECK_EQ(0xFFFFFFFFu, t.vmov_from_scalar_s8);
     CHECK_EQ(0xFFu, t.vmov_from_scalar_u8);
     CHECK_EQ(0xFFFFFFFFu, t.vmov_from_scalar_s16);
     CHECK_EQ(0xFFFFu, t.vmov_from_scalar_u16);
     CHECK_EQ(0xFFFFFFFFu, t.vmov_from_scalar_32);
 
-    CHECK_EQ_32X4(vmov, 0x03020100u, 0x07060504u, 0x0b0a0908u, 0x0f0e0d0cu);
-    CHECK_EQ_32X4(vmvn, 0xfcfdfeffu, 0xf8f9fafbu, 0xf4f5f6f7u, 0xf0f1f2f3u);
+    CHECK_EQ_32X4(vmov, 0x03020100u, 0x07060504u, 0x0B0A0908u, 0x0F0E0D0Cu);
+    CHECK_EQ_32X4(vmvn, 0xFCFDFEFFu, 0xF8F9FAFBu, 0xF4F5F6F7u, 0xF0F1F2F3u);
 
-    CHECK_EQ_SPLAT(vdup8, 0x0a0a0a0au);
-    CHECK_EQ_SPLAT(vdup16, 0x000a000au);
-    CHECK_EQ_SPLAT(vdup32, 0x0000000au);
-    CHECK_EQ_SPLAT(vdupf, -1.0);  // bit pattern is 0xbf800000.
-    CHECK_EQ_32X2(vdupf_16, 0xbf80bf80u, 0xbf80bf80u);
-    CHECK_EQ_SPLAT(vdupf_8, 0xbfbfbfbfu);
+    CHECK_EQ_SPLAT(vdup8, 0x0A0A0A0Au);
+    CHECK_EQ_SPLAT(vdup16, 0x000A000Au);
+    CHECK_EQ_SPLAT(vdup32, 0x0000000Au);
+    CHECK_EQ_SPLAT(vdupf, -1.0);  // bit pattern is 0xBF800000.
+    CHECK_EQ_32X2(vdupf_16, 0xBF80BF80u, 0xBF80BF80u);
+    CHECK_EQ_SPLAT(vdupf_8, 0xBFBFBFBFu);
 
     // src: [-1, -1, 1, 1]
     CHECK_EQ_32X4(vcvt_s32_f32, -1, -1, 1, 1);
@@ -2154,17 +2134,17 @@
 
     CHECK_EQ_32X4(vabsf, 1.0, 0.0, 0.0, 1.0);
     CHECK_EQ_32X4(vnegf, 1.0, 0.0, -0.0, -1.0);
-    // src: [0x7f7f7f7f, 0x01010101, 0xffffffff, 0x80808080]
-    CHECK_EQ_32X4(vabs_s8, 0x7f7f7f7fu, 0x01010101u, 0x01010101u, 0x80808080u);
-    CHECK_EQ_32X4(vabs_s16, 0x7f7f7f7fu, 0x01010101u, 0x00010001u, 0x7f807f80u);
-    CHECK_EQ_32X4(vabs_s32, 0x7f7f7f7fu, 0x01010101u, 0x00000001u, 0x7f7f7f80u);
-    CHECK_EQ_32X4(vneg_s8, 0x81818181u, 0xffffffffu, 0x01010101u, 0x80808080u);
-    CHECK_EQ_32X4(vneg_s16, 0x80818081u, 0xfefffeffu, 0x00010001u, 0x7f807f80u);
-    CHECK_EQ_32X4(vneg_s32, 0x80808081u, 0xfefefeffu, 0x00000001u, 0x7f7f7f80u);
+    // src: [0x7F7F7F7F, 0x01010101, 0xFFFFFFFF, 0x80808080]
+    CHECK_EQ_32X4(vabs_s8, 0x7F7F7F7Fu, 0x01010101u, 0x01010101u, 0x80808080u);
+    CHECK_EQ_32X4(vabs_s16, 0x7F7F7F7Fu, 0x01010101u, 0x00010001u, 0x7F807F80u);
+    CHECK_EQ_32X4(vabs_s32, 0x7F7F7F7Fu, 0x01010101u, 0x00000001u, 0x7F7F7F80u);
+    CHECK_EQ_32X4(vneg_s8, 0x81818181u, 0xFFFFFFFFu, 0x01010101u, 0x80808080u);
+    CHECK_EQ_32X4(vneg_s16, 0x80818081u, 0xFEFFFEFFu, 0x00010001u, 0x7F807F80u);
+    CHECK_EQ_32X4(vneg_s32, 0x80808081u, 0xFEFEFEFFu, 0x00000001u, 0x7F7F7F80u);
 
-    CHECK_EQ_SPLAT(veor, 0x00ff00ffu);
-    CHECK_EQ_SPLAT(vand, 0x00fe00feu);
-    CHECK_EQ_SPLAT(vorr, 0x00ff00ffu);
+    CHECK_EQ_SPLAT(veor, 0x00FF00FFu);
+    CHECK_EQ_SPLAT(vand, 0x00FE00FEu);
+    CHECK_EQ_SPLAT(vorr, 0x00FF00FFu);
     CHECK_EQ_SPLAT(vaddf, 2.0);
     CHECK_EQ_32X2(vpaddf, 3.0, 7.0);
     CHECK_EQ_SPLAT(vminf, 1.0);
@@ -2175,101 +2155,101 @@
     CHECK_EQ_SPLAT(vrecps, -1.0f);   // 2 - (2 * 1.5)
     CHECK_ESTIMATE_SPLAT(vrsqrte, 0.5f, 0.1f);  // 1 / sqrt(4)
     CHECK_EQ_SPLAT(vrsqrts, -1.0f);  // (3 - (2 * 2.5)) / 2
-    CHECK_EQ_SPLAT(vceqf, 0xffffffffu);
+    CHECK_EQ_SPLAT(vceqf, 0xFFFFFFFFu);
     // [0] >= [-1, 1, -0, 0]
-    CHECK_EQ_32X4(vcgef, 0u, 0xffffffffu, 0xffffffffu, 0xffffffffu);
-    CHECK_EQ_32X4(vcgtf, 0u, 0xffffffffu, 0u, 0u);
+    CHECK_EQ_32X4(vcgef, 0u, 0xFFFFFFFFu, 0xFFFFFFFFu, 0xFFFFFFFFu);
+    CHECK_EQ_32X4(vcgtf, 0u, 0xFFFFFFFFu, 0u, 0u);
     // [0, 3, 0, 3, ...] and [3, 3, 3, 3, ...]
     CHECK_EQ_SPLAT(vmin_s8, 0x00030003u);
     CHECK_EQ_SPLAT(vmax_s8, 0x03030303u);
-    // [0x00ff, 0x00ff, ...] and [0xffff, 0xffff, ...]
-    CHECK_EQ_SPLAT(vmin_u16, 0x00ff00ffu);
-    CHECK_EQ_SPLAT(vmax_u16, 0xffffffffu);
-    // [0x000000ff, 0x000000ff, ...] and [0xffffffff, 0xffffffff, ...]
-    CHECK_EQ_SPLAT(vmin_s32, 0xffffffffu);
-    CHECK_EQ_SPLAT(vmax_s32, 0xffu);
+    // [0x00FF, 0x00FF, ...] and [0xFFFF, 0xFFFF, ...]
+    CHECK_EQ_SPLAT(vmin_u16, 0x00FF00FFu);
+    CHECK_EQ_SPLAT(vmax_u16, 0xFFFFFFFFu);
+    // [0x000000FF, 0x000000FF, ...] and [0xFFFFFFFF, 0xFFFFFFFF, ...]
+    CHECK_EQ_SPLAT(vmin_s32, 0xFFFFFFFFu);
+    CHECK_EQ_SPLAT(vmax_s32, 0xFFu);
     // [0, 3, 0, 3, ...] and [3, 3, 3, 3, ...]
     CHECK_EQ_32X2(vpadd_i8, 0x03030303u, 0x06060606u);
-    CHECK_EQ_32X2(vpadd_i16, 0x0c0c0606u, 0x06060606u);
-    CHECK_EQ_32X2(vpadd_i32, 0x12120c0cu, 0x06060606u);
+    CHECK_EQ_32X2(vpadd_i16, 0x0C0C0606u, 0x06060606u);
+    CHECK_EQ_32X2(vpadd_i32, 0x12120C0Cu, 0x06060606u);
     CHECK_EQ_32X2(vpmin_s8, 0x00000000u, 0x03030303u);
     CHECK_EQ_32X2(vpmax_s8, 0x03030303u, 0x03030303u);
     // [0, ffff, 0, ffff] and [ffff, ffff]
-    CHECK_EQ_32X2(vpmin_u16, 0x00000000u, 0xffffffffu);
-    CHECK_EQ_32X2(vpmax_u16, 0xffffffffu, 0xffffffffu);
-    // [0x000000ff, 0x00000000u] and [0xffffffff, 0xffffffff, ...]
-    CHECK_EQ_32X2(vpmin_s32, 0x00u, 0xffffffffu);
-    CHECK_EQ_32X2(vpmax_s32, 0xffu, 0xffffffffu);
+    CHECK_EQ_32X2(vpmin_u16, 0x00000000u, 0xFFFFFFFFu);
+    CHECK_EQ_32X2(vpmax_u16, 0xFFFFFFFFu, 0xFFFFFFFFu);
+    // [0x000000FF, 0x00000000u] and [0xFFFFFFFF, 0xFFFFFFFF, ...]
+    CHECK_EQ_32X2(vpmin_s32, 0x00u, 0xFFFFFFFFu);
+    CHECK_EQ_32X2(vpmax_s32, 0xFFu, 0xFFFFFFFFu);
     CHECK_EQ_SPLAT(vadd8, 0x03030303u);
     CHECK_EQ_SPLAT(vadd16, 0x00030003u);
     CHECK_EQ_SPLAT(vadd32, 0x00000003u);
     CHECK_EQ_SPLAT(vqadd_s8, 0x80808080u);
-    CHECK_EQ_SPLAT(vqadd_u16, 0xffffffffu);
+    CHECK_EQ_SPLAT(vqadd_u16, 0xFFFFFFFFu);
     CHECK_EQ_SPLAT(vqadd_s32, 0x80000000u);
     CHECK_EQ_SPLAT(vqsub_u8, 0x00000000u);
-    CHECK_EQ_SPLAT(vqsub_s16, 0x7fff7fffu);
+    CHECK_EQ_SPLAT(vqsub_s16, 0x7FFF7FFFu);
     CHECK_EQ_SPLAT(vqsub_u32, 0x00000000u);
-    CHECK_EQ_SPLAT(vsub8, 0xfefefefeu);
-    CHECK_EQ_SPLAT(vsub16, 0xfffefffeu);
-    CHECK_EQ_SPLAT(vsub32, 0xfffffffeu);
+    CHECK_EQ_SPLAT(vsub8, 0xFEFEFEFEu);
+    CHECK_EQ_SPLAT(vsub16, 0xFFFEFFFEu);
+    CHECK_EQ_SPLAT(vsub32, 0xFFFFFFFEu);
     CHECK_EQ_SPLAT(vmul8, 0x04040404u);
     CHECK_EQ_SPLAT(vmul16, 0x00040004u);
     CHECK_EQ_SPLAT(vmul32, 0x00000004u);
-    CHECK_EQ_SPLAT(vshl8, 0xaaaaaaaau);
-    CHECK_EQ_SPLAT(vshl16, 0xaa00aa00u);
-    CHECK_EQ_SPLAT(vshl32, 0xaaaa0000u);
-    CHECK_EQ_SPLAT(vshr_s8, 0xc0c0c0c0u);
+    CHECK_EQ_SPLAT(vshl8, 0xAAAAAAAAu);
+    CHECK_EQ_SPLAT(vshl16, 0xAA00AA00u);
+    CHECK_EQ_SPLAT(vshl32, 0xAAAA0000u);
+    CHECK_EQ_SPLAT(vshr_s8, 0xC0C0C0C0u);
     CHECK_EQ_SPLAT(vshr_u16, 0x00400040u);
-    CHECK_EQ_SPLAT(vshr_s32, 0xffffc040u);
-    CHECK_EQ_32X2(vsli_64, 0x01u, 0xffffffffu);
-    CHECK_EQ_32X2(vsri_64, 0xffffffffu, 0x01u);
-    CHECK_EQ_32X2(vsli_32, 0xffff0001u, 0x00010001u);
-    CHECK_EQ_32X2(vsri_32, 0x00000000u, 0x0000ffffu);
-    CHECK_EQ_SPLAT(vceq, 0x00ff00ffu);
+    CHECK_EQ_SPLAT(vshr_s32, 0xFFFFC040u);
+    CHECK_EQ_32X2(vsli_64, 0x01u, 0xFFFFFFFFu);
+    CHECK_EQ_32X2(vsri_64, 0xFFFFFFFFu, 0x01u);
+    CHECK_EQ_32X2(vsli_32, 0xFFFF0001u, 0x00010001u);
+    CHECK_EQ_32X2(vsri_32, 0x00000000u, 0x0000FFFFu);
+    CHECK_EQ_SPLAT(vceq, 0x00FF00FFu);
     // [0, 3, 0, 3, ...] >= [3, 3, 3, 3, ...]
-    CHECK_EQ_SPLAT(vcge_s8, 0x00ff00ffu);
+    CHECK_EQ_SPLAT(vcge_s8, 0x00FF00FFu);
     CHECK_EQ_SPLAT(vcgt_s8, 0u);
-    // [0x00ff, 0x00ff, ...] >= [0xffff, 0xffff, ...]
+    // [0x00FF, 0x00FF, ...] >= [0xFFFF, 0xFFFF, ...]
     CHECK_EQ_SPLAT(vcge_u16, 0u);
     CHECK_EQ_SPLAT(vcgt_u16, 0u);
-    // [0x000000ff, 0x000000ff, ...] >= [0xffffffff, 0xffffffff, ...]
-    CHECK_EQ_SPLAT(vcge_s32, 0xffffffffu);
-    CHECK_EQ_SPLAT(vcgt_s32, 0xffffffffu);
-    CHECK_EQ_SPLAT(vtst, 0x00ff00ffu);
+    // [0x000000FF, 0x000000FF, ...] >= [0xFFFFFFFF, 0xFFFFFFFF, ...]
+    CHECK_EQ_SPLAT(vcge_s32, 0xFFFFFFFFu);
+    CHECK_EQ_SPLAT(vcgt_s32, 0xFFFFFFFFu);
+    CHECK_EQ_SPLAT(vtst, 0x00FF00FFu);
     CHECK_EQ_SPLAT(vbsl, 0x02010201u);
 
-    CHECK_EQ_32X4(vext, 0x06050403u, 0x0a090807u, 0x0e0d0c0bu, 0x0201000fu);
+    CHECK_EQ_32X4(vext, 0x06050403u, 0x0A090807u, 0x0E0D0C0Bu, 0x0201000Fu);
 
     CHECK_EQ_32X4(vzip8a, 0x01010000u, 0x03030202u, 0x05050404u, 0x07070606u);
-    CHECK_EQ_32X4(vzip8b, 0x09090808u, 0x0b0b0a0au, 0x0d0d0c0cu, 0x0f0f0e0eu);
+    CHECK_EQ_32X4(vzip8b, 0x09090808u, 0x0B0B0A0Au, 0x0D0D0C0Cu, 0x0F0F0E0Eu);
     CHECK_EQ_32X4(vzip16a, 0x01000100u, 0x03020302u, 0x05040504u, 0x07060706u);
-    CHECK_EQ_32X4(vzip16b, 0x09080908u, 0x0b0a0b0au, 0x0d0c0d0cu, 0x0f0e0f0eu);
+    CHECK_EQ_32X4(vzip16b, 0x09080908u, 0x0B0A0B0Au, 0x0D0C0D0Cu, 0x0F0E0F0Eu);
     CHECK_EQ_32X4(vzip32a, 0x03020100u, 0x03020100u, 0x07060504u, 0x07060504u);
-    CHECK_EQ_32X4(vzip32b, 0x0b0a0908u, 0x0b0a0908u, 0x0f0e0d0cu, 0x0f0e0d0cu);
+    CHECK_EQ_32X4(vzip32b, 0x0B0A0908u, 0x0B0A0908u, 0x0F0E0D0Cu, 0x0F0E0D0Cu);
 
     CHECK_EQ_32X2(vzipd8a, 0x01010000u, 0x03030202u);
     CHECK_EQ_32X2(vzipd8b, 0x05050404u, 0x07070606u);
     CHECK_EQ_32X2(vzipd16a, 0x01000100u, 0x03020302u);
     CHECK_EQ_32X2(vzipd16b, 0x05040504u, 0x07060706u);
 
-    CHECK_EQ_32X4(vuzp8a, 0x06040200u, 0x0e0c0a08u, 0x06040200u, 0x0e0c0a08u);
-    CHECK_EQ_32X4(vuzp8b, 0x07050301u, 0x0f0d0b09u, 0x07050301u, 0x0f0d0b09u);
-    CHECK_EQ_32X4(vuzp16a, 0x05040100u, 0x0d0c0908u, 0x05040100u, 0x0d0c0908u);
-    CHECK_EQ_32X4(vuzp16b, 0x07060302u, 0x0f0e0b0au, 0x07060302u, 0x0f0e0b0au);
-    CHECK_EQ_32X4(vuzp32a, 0x03020100u, 0x0b0a0908u, 0x03020100u, 0x0b0a0908u);
-    CHECK_EQ_32X4(vuzp32b, 0x07060504u, 0x0f0e0d0cu, 0x07060504u, 0x0f0e0d0cu);
+    CHECK_EQ_32X4(vuzp8a, 0x06040200u, 0x0E0C0A08u, 0x06040200u, 0x0E0C0A08u);
+    CHECK_EQ_32X4(vuzp8b, 0x07050301u, 0x0F0D0B09u, 0x07050301u, 0x0F0D0B09u);
+    CHECK_EQ_32X4(vuzp16a, 0x05040100u, 0x0D0C0908u, 0x05040100u, 0x0D0C0908u);
+    CHECK_EQ_32X4(vuzp16b, 0x07060302u, 0x0F0E0B0Au, 0x07060302u, 0x0F0E0B0Au);
+    CHECK_EQ_32X4(vuzp32a, 0x03020100u, 0x0B0A0908u, 0x03020100u, 0x0B0A0908u);
+    CHECK_EQ_32X4(vuzp32b, 0x07060504u, 0x0F0E0D0Cu, 0x07060504u, 0x0F0E0D0Cu);
 
     CHECK_EQ_32X2(vuzpd8a, 0x06040200u, 0x06040200u);
     CHECK_EQ_32X2(vuzpd8b, 0x07050301u, 0x07050301u);
     CHECK_EQ_32X2(vuzpd16a, 0x05040100u, 0x05040100u);
     CHECK_EQ_32X2(vuzpd16b, 0x07060302u, 0x07060302u);
 
-    CHECK_EQ_32X4(vtrn8a, 0x02020000u, 0x06060404u, 0x0a0a0808u, 0x0e0e0c0cu);
-    CHECK_EQ_32X4(vtrn8b, 0x03030101u, 0x07070505u, 0x0b0b0909u, 0x0f0f0d0du);
-    CHECK_EQ_32X4(vtrn16a, 0x01000100u, 0x05040504u, 0x09080908u, 0x0d0c0d0cu);
-    CHECK_EQ_32X4(vtrn16b, 0x03020302u, 0x07060706u, 0x0b0a0b0au, 0x0f0e0f0eu);
-    CHECK_EQ_32X4(vtrn32a, 0x03020100u, 0x03020100u, 0x0b0a0908u, 0x0b0a0908u);
-    CHECK_EQ_32X4(vtrn32b, 0x07060504u, 0x07060504u, 0x0f0e0d0cu, 0x0f0e0d0cu);
+    CHECK_EQ_32X4(vtrn8a, 0x02020000u, 0x06060404u, 0x0A0A0808u, 0x0E0E0C0Cu);
+    CHECK_EQ_32X4(vtrn8b, 0x03030101u, 0x07070505u, 0x0B0B0909u, 0x0F0F0D0Du);
+    CHECK_EQ_32X4(vtrn16a, 0x01000100u, 0x05040504u, 0x09080908u, 0x0D0C0D0Cu);
+    CHECK_EQ_32X4(vtrn16b, 0x03020302u, 0x07060706u, 0x0B0A0B0Au, 0x0F0E0F0Eu);
+    CHECK_EQ_32X4(vtrn32a, 0x03020100u, 0x03020100u, 0x0B0A0908u, 0x0B0A0908u);
+    CHECK_EQ_32X4(vtrn32b, 0x07060504u, 0x07060504u, 0x0F0E0D0Cu, 0x0F0E0D0Cu);
 
     CHECK_EQ_32X2(vtrnd8a, 0x02020000u, 0x06060404u);
     CHECK_EQ_32X2(vtrnd8b, 0x03030101u, 0x07070505u);
@@ -2279,20 +2259,20 @@
     CHECK_EQ_32X2(vtrnd32b, 0x07060504u, 0x07060504u);
 
     // src: 0 1 2 3  4 5 6 7  8 9 a b  c d e f (little endian)
-    CHECK_EQ_32X4(vrev64_32, 0x07060504u, 0x03020100u, 0x0f0e0d0cu,
-                  0x0b0a0908u);
-    CHECK_EQ_32X4(vrev64_16, 0x05040706u, 0x01000302u, 0x0d0c0f0eu,
-                  0x09080b0au);
-    CHECK_EQ_32X4(vrev64_8, 0x04050607u, 0x00010203u, 0x0c0d0e0fu, 0x08090a0bu);
-    CHECK_EQ_32X4(vrev32_16, 0x01000302u, 0x05040706u, 0x09080b0au,
-                  0x0d0c0f0eu);
-    CHECK_EQ_32X4(vrev32_8, 0x00010203u, 0x04050607u, 0x08090a0bu, 0x0c0d0e0fu);
-    CHECK_EQ_32X4(vrev16_8, 0x02030001u, 0x06070405u, 0x0a0b0809u, 0x0e0f0c0du);
+    CHECK_EQ_32X4(vrev64_32, 0x07060504u, 0x03020100u, 0x0F0E0D0Cu,
+                  0x0B0A0908u);
+    CHECK_EQ_32X4(vrev64_16, 0x05040706u, 0x01000302u, 0x0D0C0F0Eu,
+                  0x09080B0Au);
+    CHECK_EQ_32X4(vrev64_8, 0x04050607u, 0x00010203u, 0x0C0D0E0Fu, 0x08090A0Bu);
+    CHECK_EQ_32X4(vrev32_16, 0x01000302u, 0x05040706u, 0x09080B0Au,
+                  0x0D0C0F0Eu);
+    CHECK_EQ_32X4(vrev32_8, 0x00010203u, 0x04050607u, 0x08090A0Bu, 0x0C0D0E0Fu);
+    CHECK_EQ_32X4(vrev16_8, 0x02030001u, 0x06070405u, 0x0A0B0809u, 0x0E0F0C0Du);
 
     CHECK_EQ(0x05010400u, t.vtbl[0]);
     CHECK_EQ(0x00030602u, t.vtbl[1]);
     CHECK_EQ(0x05010400u, t.vtbx[0]);
-    CHECK_EQ(0xff030602u, t.vtbx[1]);
+    CHECK_EQ(0xFF030602u, t.vtbx[1]);
   }
 }
 
@@ -2316,7 +2296,7 @@
 
   // Create a function that accepts &t, and loads, manipulates, and stores
   // the doubles and floats.
-  Assembler assm(isolate, NULL, 0);
+  Assembler assm(isolate, nullptr, 0);
 
   __ stm(db_w, sp, r4.bit() | lr.bit());
 
@@ -2350,7 +2330,7 @@
   OFStream os(stdout);
   code->Print(os);
 #endif
-  F3 f = FUNCTION_CAST<F3>(code->entry());
+  auto f = GeneratedCode<F_piiii>::FromCode(*code);
   t.src0 = 0x01020304;
   t.src1 = 0x11121314;
   t.src2 = 0x11121300;
@@ -2359,8 +2339,7 @@
   t.dst2 = 0;
   t.dst3 = 0;
   t.dst4 = 0;
-  Object* dummy = CALL_GENERATED_CODE(isolate, f, &t, 0, 0, 0, 0);
-  USE(dummy);
+  f.Call(&t, 0, 0, 0, 0);
   CHECK_EQ(0x12130304u, t.dst0);
   CHECK_EQ(0x01021213u, t.dst1);
   CHECK_EQ(0x00010003u, t.dst2);
@@ -2377,7 +2356,7 @@
   HandleScope scope(isolate);
 
   // Generate a code segment that will be longer than 2^24 bytes.
-  Assembler assm(isolate, NULL, 0);
+  Assembler assm(isolate, nullptr, 0);
   for (size_t i = 0; i < 1 << 23 ; ++i) {  // 2^23
     __ nop();
   }
@@ -2388,21 +2367,19 @@
   __ nop();
 }
 
-
-#define TEST_SDIV(expected_, dividend_, divisor_)          \
-  t.dividend = dividend_;                                  \
-  t.divisor = divisor_;                                    \
-  t.result = 0;                                            \
-  dummy = CALL_GENERATED_CODE(isolate, f, &t, 0, 0, 0, 0); \
+#define TEST_SDIV(expected_, dividend_, divisor_) \
+  t.dividend = dividend_;                         \
+  t.divisor = divisor_;                           \
+  t.result = 0;                                   \
+  f.Call(&t, 0, 0, 0, 0);                         \
   CHECK_EQ(expected_, t.result);
 
-
 TEST(sdiv) {
   // Test the sdiv.
   CcTest::InitializeVM();
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
-  Assembler assm(isolate, NULL, 0);
+  Assembler assm(isolate, nullptr, 0);
 
   struct T {
     int32_t dividend;
@@ -2431,8 +2408,7 @@
     OFStream os(stdout);
     code->Print(os);
 #endif
-    F3 f = FUNCTION_CAST<F3>(code->entry());
-    Object* dummy;
+    auto f = GeneratedCode<F_piiii>::FromCode(*code);
     TEST_SDIV(0, kMinInt, 0);
     TEST_SDIV(0, 1024, 0);
     TEST_SDIV(1073741824, kMinInt, -2);
@@ -2445,28 +2421,25 @@
     TEST_SDIV(-3, -10, 3);
     TEST_SDIV(5, -10, -2);
     TEST_SDIV(3, -10, -3);
-    USE(dummy);
   }
 }
 
 
 #undef TEST_SDIV
 
-
-#define TEST_UDIV(expected_, dividend_, divisor_)          \
-  t.dividend = dividend_;                                  \
-  t.divisor = divisor_;                                    \
-  t.result = 0;                                            \
-  dummy = CALL_GENERATED_CODE(isolate, f, &t, 0, 0, 0, 0); \
+#define TEST_UDIV(expected_, dividend_, divisor_) \
+  t.dividend = dividend_;                         \
+  t.divisor = divisor_;                           \
+  t.result = 0;                                   \
+  f.Call(&t, 0, 0, 0, 0);                         \
   CHECK_EQ(expected_, t.result);
 
-
 TEST(udiv) {
   // Test the udiv.
   CcTest::InitializeVM();
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
-  Assembler assm(isolate, NULL, 0);
+  Assembler assm(isolate, nullptr, 0);
 
   struct T {
     uint32_t dividend;
@@ -2495,13 +2468,11 @@
     OFStream os(stdout);
     code->Print(os);
 #endif
-    F3 f = FUNCTION_CAST<F3>(code->entry());
-    Object* dummy;
+    auto f = GeneratedCode<F_piiii>::FromCode(*code);
     TEST_UDIV(0u, 0, 0);
     TEST_UDIV(0u, 1024, 0);
     TEST_UDIV(5u, 10, 2);
     TEST_UDIV(3u, 10, 3);
-    USE(dummy);
   }
 }
 
@@ -2525,12 +2496,11 @@
 #ifdef OBJECT_PRINT
   code->Print(std::cout);
 #endif
-  F3 f = FUNCTION_CAST<F3>(code->entry());
+  auto f = GeneratedCode<F_piiii>::FromCode(*code);
   for (size_t i = 0; i < 128; ++i) {
     int32_t r, x = rng->NextInt(), y = rng->NextInt(), z = rng->NextInt();
-    Object* dummy = CALL_GENERATED_CODE(isolate, f, &r, x, y, z, 0);
+    f.Call(&r, x, y, z, 0);
     CHECK_EQ(base::bits::SignedMulHighAndAdd32(x, y, z), r);
-    USE(dummy);
   }
 }
 
@@ -2551,12 +2521,11 @@
 #ifdef OBJECT_PRINT
   code->Print(std::cout);
 #endif
-  F3 f = FUNCTION_CAST<F3>(code->entry());
+  auto f = GeneratedCode<F_piiii>::FromCode(*code);
   for (size_t i = 0; i < 128; ++i) {
     int32_t r, x = rng->NextInt(), y = rng->NextInt();
-    Object* dummy = CALL_GENERATED_CODE(isolate, f, &r, x, y, 0, 0);
+    f.Call(&r, x, y, 0, 0);
     CHECK_EQ(base::bits::SignedMulHigh32(x, y), r);
-    USE(dummy);
   }
 }
 
@@ -2577,12 +2546,11 @@
 #ifdef OBJECT_PRINT
   code->Print(std::cout);
 #endif
-  F3 f = FUNCTION_CAST<F3>(code->entry());
+  auto f = GeneratedCode<F_piiii>::FromCode(*code);
   for (size_t i = 0; i < 128; ++i) {
     int32_t r, x = rng->NextInt();
-    Object* dummy = CALL_GENERATED_CODE(isolate, f, &r, x, 0, 0, 0);
+    f.Call(&r, x, 0, 0, 0);
     CHECK_EQ(static_cast<int32_t>(static_cast<int8_t>(x)), r);
-    USE(dummy);
   }
 }
 
@@ -2603,12 +2571,11 @@
 #ifdef OBJECT_PRINT
   code->Print(std::cout);
 #endif
-  F3 f = FUNCTION_CAST<F3>(code->entry());
+  auto f = GeneratedCode<F_piiii>::FromCode(*code);
   for (size_t i = 0; i < 128; ++i) {
     int32_t r, x = rng->NextInt(), y = rng->NextInt();
-    Object* dummy = CALL_GENERATED_CODE(isolate, f, &r, x, y, 0, 0);
+    f.Call(&r, x, y, 0, 0);
     CHECK_EQ(static_cast<int32_t>(static_cast<int8_t>(x)) + y, r);
-    USE(dummy);
   }
 }
 
@@ -2629,12 +2596,11 @@
 #ifdef OBJECT_PRINT
   code->Print(std::cout);
 #endif
-  F3 f = FUNCTION_CAST<F3>(code->entry());
+  auto f = GeneratedCode<F_piiii>::FromCode(*code);
   for (size_t i = 0; i < 128; ++i) {
     int32_t r, x = rng->NextInt();
-    Object* dummy = CALL_GENERATED_CODE(isolate, f, &r, x, 0, 0, 0);
+    f.Call(&r, x, 0, 0, 0);
     CHECK_EQ(static_cast<int32_t>(static_cast<int16_t>(x)), r);
-    USE(dummy);
   }
 }
 
@@ -2655,12 +2621,11 @@
 #ifdef OBJECT_PRINT
   code->Print(std::cout);
 #endif
-  F3 f = FUNCTION_CAST<F3>(code->entry());
+  auto f = GeneratedCode<F_piiii>::FromCode(*code);
   for (size_t i = 0; i < 128; ++i) {
     int32_t r, x = rng->NextInt(), y = rng->NextInt();
-    Object* dummy = CALL_GENERATED_CODE(isolate, f, &r, x, y, 0, 0);
+    f.Call(&r, x, y, 0, 0);
     CHECK_EQ(static_cast<int32_t>(static_cast<int16_t>(x)) + y, r);
-    USE(dummy);
   }
 }
 
@@ -2681,12 +2646,11 @@
 #ifdef OBJECT_PRINT
   code->Print(std::cout);
 #endif
-  F3 f = FUNCTION_CAST<F3>(code->entry());
+  auto f = GeneratedCode<F_piiii>::FromCode(*code);
   for (size_t i = 0; i < 128; ++i) {
     int32_t r, x = rng->NextInt();
-    Object* dummy = CALL_GENERATED_CODE(isolate, f, &r, x, 0, 0, 0);
+    f.Call(&r, x, 0, 0, 0);
     CHECK_EQ(static_cast<int32_t>(static_cast<uint8_t>(x)), r);
-    USE(dummy);
   }
 }
 
@@ -2707,12 +2671,11 @@
 #ifdef OBJECT_PRINT
   code->Print(std::cout);
 #endif
-  F3 f = FUNCTION_CAST<F3>(code->entry());
+  auto f = GeneratedCode<F_piiii>::FromCode(*code);
   for (size_t i = 0; i < 128; ++i) {
     int32_t r, x = rng->NextInt(), y = rng->NextInt();
-    Object* dummy = CALL_GENERATED_CODE(isolate, f, &r, x, y, 0, 0);
+    f.Call(&r, x, y, 0, 0);
     CHECK_EQ(static_cast<int32_t>(static_cast<uint8_t>(x)) + y, r);
-    USE(dummy);
   }
 }
 
@@ -2733,12 +2696,11 @@
 #ifdef OBJECT_PRINT
   code->Print(std::cout);
 #endif
-  F3 f = FUNCTION_CAST<F3>(code->entry());
+  auto f = GeneratedCode<F_piiii>::FromCode(*code);
   for (size_t i = 0; i < 128; ++i) {
     int32_t r, x = rng->NextInt();
-    Object* dummy = CALL_GENERATED_CODE(isolate, f, &r, x, 0, 0, 0);
+    f.Call(&r, x, 0, 0, 0);
     CHECK_EQ(static_cast<int32_t>(static_cast<uint16_t>(x)), r);
-    USE(dummy);
   }
 }
 
@@ -2759,19 +2721,18 @@
 #ifdef OBJECT_PRINT
   code->Print(std::cout);
 #endif
-  F3 f = FUNCTION_CAST<F3>(code->entry());
+  auto f = GeneratedCode<F_piiii>::FromCode(*code);
   for (size_t i = 0; i < 128; ++i) {
     int32_t r, x = rng->NextInt(), y = rng->NextInt();
-    Object* dummy = CALL_GENERATED_CODE(isolate, f, &r, x, y, 0, 0);
+    f.Call(&r, x, y, 0, 0);
     CHECK_EQ(static_cast<int32_t>(static_cast<uint16_t>(x)) + y, r);
-    USE(dummy);
   }
 }
 
-#define TEST_RBIT(expected_, input_)                       \
-  t.input = input_;                                        \
-  t.result = 0;                                            \
-  dummy = CALL_GENERATED_CODE(isolate, f, &t, 0, 0, 0, 0); \
+#define TEST_RBIT(expected_, input_) \
+  t.input = input_;                  \
+  t.result = 0;                      \
+  f.Call(&t, 0, 0, 0, 0);            \
   CHECK_EQ(static_cast<uint32_t>(expected_), t.result);
 
 TEST(rbit) {
@@ -2803,15 +2764,13 @@
     code->Print(std::cout);
 #endif
 
-    F3 f = FUNCTION_CAST<F3>(code->entry());
-    Object* dummy = NULL;
-    TEST_RBIT(0xffffffff, 0xffffffff);
+    auto f = GeneratedCode<F_piiii>::FromCode(*code);
+    TEST_RBIT(0xFFFFFFFF, 0xFFFFFFFF);
     TEST_RBIT(0x00000000, 0x00000000);
-    TEST_RBIT(0xffff0000, 0x0000ffff);
-    TEST_RBIT(0xff00ff00, 0x00ff00ff);
-    TEST_RBIT(0xf0f0f0f0, 0x0f0f0f0f);
-    TEST_RBIT(0x1e6a2c48, 0x12345678);
-    USE(dummy);
+    TEST_RBIT(0xFFFF0000, 0x0000FFFF);
+    TEST_RBIT(0xFF00FF00, 0x00FF00FF);
+    TEST_RBIT(0xF0F0F0F0, 0x0F0F0F0F);
+    TEST_RBIT(0x1E6A2C48, 0x12345678);
   }
 }
 
@@ -2825,7 +2784,7 @@
   // Initialize a code object that will contain the code.
   Handle<HeapObject> code_object(isolate->heap()->undefined_value(), isolate);
 
-  Assembler assm(isolate, NULL, 0);
+  Assembler assm(isolate, nullptr, 0);
 
   Label start, target_away, target_faraway;
 
@@ -2880,9 +2839,8 @@
   assm.GetCode(isolate, &desc);
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, code_object);
-  F1 f = FUNCTION_CAST<F1>(code->entry());
-  int res =
-      reinterpret_cast<int>(CALL_GENERATED_CODE(isolate, f, 21, 0, 0, 0, 0));
+  auto f = GeneratedCode<F_iiiii>::FromCode(*code);
+  int res = reinterpret_cast<int>(f.Call(21, 0, 0, 0, 0));
   ::printf("f() = %d\n", res);
   CHECK_EQ(42, res);
 }
@@ -2893,7 +2851,7 @@
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
 
-  Assembler assm(isolate, NULL, 0);
+  Assembler assm(isolate, nullptr, 0);
 
   // Create a helper function:
   //  void TestMsrMrs(uint32_t nzcv,
@@ -2924,19 +2882,16 @@
   OFStream os(stdout);
   code->Print(os);
 #endif
-  F5 f = FUNCTION_CAST<F5>(code->entry());
-  Object* dummy = nullptr;
-  USE(dummy);
+  auto f = GeneratedCode<F_ippii>::FromCode(*code);
 
-#define CHECK_MSR_MRS(n, z, c, v)                                       \
-  do {                                                                  \
-    uint32_t nzcv = (n << 31) | (z << 30) | (c << 29) | (v << 28);      \
-    uint32_t result_conditionals = -1;                                  \
-    uint32_t result_mrs = -1;                                           \
-    dummy = CALL_GENERATED_CODE(isolate, f, nzcv, &result_conditionals, \
-                                &result_mrs, 0, 0);                     \
-    CHECK_EQ(nzcv, result_conditionals);                                \
-    CHECK_EQ(nzcv, result_mrs);                                         \
+#define CHECK_MSR_MRS(n, z, c, v)                                  \
+  do {                                                             \
+    uint32_t nzcv = (n << 31) | (z << 30) | (c << 29) | (v << 28); \
+    uint32_t result_conditionals = -1;                             \
+    uint32_t result_mrs = -1;                                      \
+    f.Call(nzcv, &result_conditionals, &result_mrs, 0, 0);         \
+    CHECK_EQ(nzcv, result_conditionals);                           \
+    CHECK_EQ(nzcv, result_mrs);                                    \
   } while (0);
 
   //            N  Z  C  V
@@ -2978,7 +2933,7 @@
 
   // Create a function that accepts &t, and loads, manipulates, and stores
   // the floats.
-  Assembler assm(isolate, NULL, 0);
+  Assembler assm(isolate, nullptr, 0);
   Label L, C;
 
 
@@ -3025,14 +2980,11 @@
     OFStream os(stdout);
     code->Print(os);
 #endif
-    F3 f = FUNCTION_CAST<F3>(code->entry());
-
-    Object* dummy = nullptr;
-    USE(dummy);
+    auto f = GeneratedCode<F_piiii>::FromCode(*code);
 
 #define CHECK_VRINT(input_val, ares, nres, mres, pres, zres) \
   t.input = input_val;                                       \
-  dummy = CALL_GENERATED_CODE(isolate, f, &t, 0, 0, 0, 0);   \
+  f.Call(&t, 0, 0, 0, 0);                                    \
   CHECK_EQ(ares, t.ar);                                      \
   CHECK_EQ(nres, t.nr);                                      \
   CHECK_EQ(mres, t.mr);                                      \
@@ -3053,7 +3005,7 @@
     // Check NaN propagation.
     float nan = std::numeric_limits<float>::quiet_NaN();
     t.input = nan;
-    dummy = CALL_GENERATED_CODE(isolate, f, &t, 0, 0, 0, 0);
+    f.Call(&t, 0, 0, 0, 0);
     CHECK_EQ(bit_cast<int32_t>(nan), bit_cast<int32_t>(t.ar));
     CHECK_EQ(bit_cast<int32_t>(nan), bit_cast<int32_t>(t.nr));
     CHECK_EQ(bit_cast<int32_t>(nan), bit_cast<int32_t>(t.mr));
@@ -3083,7 +3035,7 @@
 
   // Create a function that accepts &t, and loads, manipulates, and stores
   // the doubles and floats.
-  Assembler assm(isolate, NULL, 0);
+  Assembler assm(isolate, nullptr, 0);
   Label L, C;
 
 
@@ -3130,14 +3082,11 @@
     OFStream os(stdout);
     code->Print(os);
 #endif
-    F3 f = FUNCTION_CAST<F3>(code->entry());
-
-    Object* dummy = nullptr;
-    USE(dummy);
+    auto f = GeneratedCode<F_piiii>::FromCode(*code);
 
 #define CHECK_VRINT(input_val, ares, nres, mres, pres, zres) \
   t.input = input_val;                                       \
-  dummy = CALL_GENERATED_CODE(isolate, f, &t, 0, 0, 0, 0);   \
+  f.Call(&t, 0, 0, 0, 0);                                    \
   CHECK_EQ(ares, t.ar);                                      \
   CHECK_EQ(nres, t.nr);                                      \
   CHECK_EQ(mres, t.mr);                                      \
@@ -3158,7 +3107,7 @@
     // Check NaN propagation.
     double nan = std::numeric_limits<double>::quiet_NaN();
     t.input = nan;
-    dummy = CALL_GENERATED_CODE(isolate, f, &t, 0, 0, 0, 0);
+    f.Call(&t, 0, 0, 0, 0);
     CHECK_EQ(bit_cast<int64_t>(nan), bit_cast<int64_t>(t.ar));
     CHECK_EQ(bit_cast<int64_t>(nan), bit_cast<int64_t>(t.nr));
     CHECK_EQ(bit_cast<int64_t>(nan), bit_cast<int64_t>(t.mr));
@@ -3175,7 +3124,7 @@
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
 
-  Assembler assm(isolate, NULL, 0);
+  Assembler assm(isolate, nullptr, 0);
 
   // Used to indicate whether a condition passed or failed.
   static constexpr float kResultPass = 1.0f;
@@ -3270,34 +3219,31 @@
     OFStream os(stdout);
     code->Print(os);
 #endif
-    F5 f = FUNCTION_CAST<F5>(code->entry());
-    Object* dummy = nullptr;
-    USE(dummy);
+    auto f = GeneratedCode<F_ippii>::FromCode(*code);
 
     STATIC_ASSERT(kResultPass == -kResultFail);
-#define CHECK_VSEL(n, z, c, v, vseleq, vselge, vselgt, vselvs)                \
-  do {                                                                        \
-    ResultsF32 results_f32;                                                   \
-    ResultsF64 results_f64;                                                   \
-    uint32_t nzcv = (n << 31) | (z << 30) | (c << 29) | (v << 28);            \
-    dummy = CALL_GENERATED_CODE(isolate, f, nzcv, &results_f32, &results_f64, \
-                                0, 0);                                        \
-    CHECK_EQ(vseleq, results_f32.vseleq_);                                    \
-    CHECK_EQ(vselge, results_f32.vselge_);                                    \
-    CHECK_EQ(vselgt, results_f32.vselgt_);                                    \
-    CHECK_EQ(vselvs, results_f32.vselvs_);                                    \
-    CHECK_EQ(-vseleq, results_f32.vselne_);                                   \
-    CHECK_EQ(-vselge, results_f32.vsellt_);                                   \
-    CHECK_EQ(-vselgt, results_f32.vselle_);                                   \
-    CHECK_EQ(-vselvs, results_f32.vselvc_);                                   \
-    CHECK_EQ(vseleq, results_f64.vseleq_);                                    \
-    CHECK_EQ(vselge, results_f64.vselge_);                                    \
-    CHECK_EQ(vselgt, results_f64.vselgt_);                                    \
-    CHECK_EQ(vselvs, results_f64.vselvs_);                                    \
-    CHECK_EQ(-vseleq, results_f64.vselne_);                                   \
-    CHECK_EQ(-vselge, results_f64.vsellt_);                                   \
-    CHECK_EQ(-vselgt, results_f64.vselle_);                                   \
-    CHECK_EQ(-vselvs, results_f64.vselvc_);                                   \
+#define CHECK_VSEL(n, z, c, v, vseleq, vselge, vselgt, vselvs)     \
+  do {                                                             \
+    ResultsF32 results_f32;                                        \
+    ResultsF64 results_f64;                                        \
+    uint32_t nzcv = (n << 31) | (z << 30) | (c << 29) | (v << 28); \
+    f.Call(nzcv, &results_f32, &results_f64, 0, 0);                \
+    CHECK_EQ(vseleq, results_f32.vseleq_);                         \
+    CHECK_EQ(vselge, results_f32.vselge_);                         \
+    CHECK_EQ(vselgt, results_f32.vselgt_);                         \
+    CHECK_EQ(vselvs, results_f32.vselvs_);                         \
+    CHECK_EQ(-vseleq, results_f32.vselne_);                        \
+    CHECK_EQ(-vselge, results_f32.vsellt_);                        \
+    CHECK_EQ(-vselgt, results_f32.vselle_);                        \
+    CHECK_EQ(-vselvs, results_f32.vselvc_);                        \
+    CHECK_EQ(vseleq, results_f64.vseleq_);                         \
+    CHECK_EQ(vselge, results_f64.vselge_);                         \
+    CHECK_EQ(vselgt, results_f64.vselgt_);                         \
+    CHECK_EQ(vselvs, results_f64.vselvs_);                         \
+    CHECK_EQ(-vseleq, results_f64.vselne_);                        \
+    CHECK_EQ(-vselge, results_f64.vsellt_);                        \
+    CHECK_EQ(-vselgt, results_f64.vselle_);                        \
+    CHECK_EQ(-vselvs, results_f64.vselvc_);                        \
   } while (0);
 
     //         N  Z  C  V  vseleq       vselge       vselgt       vselvs
@@ -3328,7 +3274,7 @@
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
 
-  Assembler assm(isolate, NULL, 0);
+  Assembler assm(isolate, nullptr, 0);
 
   struct Inputs {
     double left_;
@@ -3364,22 +3310,20 @@
     OFStream os(stdout);
     code->Print(os);
 #endif
-    F4 f = FUNCTION_CAST<F4>(code->entry());
-    Object* dummy = nullptr;
-    USE(dummy);
+    auto f = GeneratedCode<F_ppiii>::FromCode(*code);
 
 #define CHECK_VMINMAX(left, right, vminnm, vmaxnm)                             \
   do {                                                                         \
     Inputs inputs = {left, right};                                             \
     Results results;                                                           \
-    dummy = CALL_GENERATED_CODE(isolate, f, &inputs, &results, 0, 0, 0);       \
+    f.Call(&inputs, &results, 0, 0, 0);                                        \
     /* Use a bit_cast to correctly identify -0.0 and NaNs. */                  \
     CHECK_EQ(bit_cast<uint64_t>(vminnm), bit_cast<uint64_t>(results.vminnm_)); \
     CHECK_EQ(bit_cast<uint64_t>(vmaxnm), bit_cast<uint64_t>(results.vmaxnm_)); \
   } while (0);
 
-    double nan_a = bit_cast<double>(UINT64_C(0x7ff8000000000001));
-    double nan_b = bit_cast<double>(UINT64_C(0x7ff8000000000002));
+    double nan_a = bit_cast<double>(UINT64_C(0x7FF8000000000001));
+    double nan_b = bit_cast<double>(UINT64_C(0x7FF8000000000002));
 
     CHECK_VMINMAX(1.0, -1.0, -1.0, 1.0);
     CHECK_VMINMAX(-1.0, 1.0, -1.0, 1.0);
@@ -3410,7 +3354,7 @@
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
 
-  Assembler assm(isolate, NULL, 0);
+  Assembler assm(isolate, nullptr, 0);
 
   struct Inputs {
     float left_;
@@ -3446,22 +3390,20 @@
     OFStream os(stdout);
     code->Print(os);
 #endif
-    F4 f = FUNCTION_CAST<F4>(code->entry());
-    Object* dummy = nullptr;
-    USE(dummy);
+    auto f = GeneratedCode<F_ppiii>::FromCode(*code);
 
 #define CHECK_VMINMAX(left, right, vminnm, vmaxnm)                             \
   do {                                                                         \
     Inputs inputs = {left, right};                                             \
     Results results;                                                           \
-    dummy = CALL_GENERATED_CODE(isolate, f, &inputs, &results, 0, 0, 0);       \
+    f.Call(&inputs, &results, 0, 0, 0);                                        \
     /* Use a bit_cast to correctly identify -0.0 and NaNs. */                  \
     CHECK_EQ(bit_cast<uint32_t>(vminnm), bit_cast<uint32_t>(results.vminnm_)); \
     CHECK_EQ(bit_cast<uint32_t>(vmaxnm), bit_cast<uint32_t>(results.vmaxnm_)); \
   } while (0);
 
-    float nan_a = bit_cast<float>(UINT32_C(0x7fc00001));
-    float nan_b = bit_cast<float>(UINT32_C(0x7fc00002));
+    float nan_a = bit_cast<float>(UINT32_C(0x7FC00001));
+    float nan_b = bit_cast<float>(UINT32_C(0x7FC00002));
 
     CHECK_VMINMAX(1.0f, -1.0f, -1.0f, 1.0f);
     CHECK_VMINMAX(-1.0f, 1.0f, -1.0f, 1.0f);
@@ -3487,7 +3429,7 @@
 }
 
 template <typename T, typename Inputs, typename Results>
-static F4 GenerateMacroFloatMinMax(MacroAssembler& assm) {
+static GeneratedCode<F_ppiii> GenerateMacroFloatMinMax(MacroAssembler& assm) {
   T a = T::from_code(0);  // d0/s0
   T b = T::from_code(1);  // d1/s1
   T c = T::from_code(2);  // d2/s2
@@ -3578,7 +3520,7 @@
   OFStream os(stdout);
   code->Print(os);
 #endif
-  return FUNCTION_CAST<F4>(code->entry());
+  return GeneratedCode<F_ppiii>::FromCode(*code);
 }
 
 TEST(macro_float_minmax_f64) {
@@ -3587,7 +3529,7 @@
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
 
-  MacroAssembler assm(isolate, NULL, 0, CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0, CodeObjectRequired::kYes);
 
   struct Inputs {
     double left_;
@@ -3605,16 +3547,13 @@
     double max_aba_;
   };
 
-  F4 f = GenerateMacroFloatMinMax<DwVfpRegister, Inputs, Results>(assm);
-
-  Object* dummy = nullptr;
-  USE(dummy);
+  auto f = GenerateMacroFloatMinMax<DwVfpRegister, Inputs, Results>(assm);
 
 #define CHECK_MINMAX(left, right, min, max)                                  \
   do {                                                                       \
     Inputs inputs = {left, right};                                           \
     Results results;                                                         \
-    dummy = CALL_GENERATED_CODE(isolate, f, &inputs, &results, 0, 0, 0);     \
+    f.Call(&inputs, &results, 0, 0, 0);                                      \
     /* Use a bit_cast to correctly identify -0.0 and NaNs. */                \
     CHECK_EQ(bit_cast<uint64_t>(min), bit_cast<uint64_t>(results.min_abc_)); \
     CHECK_EQ(bit_cast<uint64_t>(min), bit_cast<uint64_t>(results.min_aab_)); \
@@ -3624,8 +3563,8 @@
     CHECK_EQ(bit_cast<uint64_t>(max), bit_cast<uint64_t>(results.max_aba_)); \
   } while (0)
 
-  double nan_a = bit_cast<double>(UINT64_C(0x7ff8000000000001));
-  double nan_b = bit_cast<double>(UINT64_C(0x7ff8000000000002));
+  double nan_a = bit_cast<double>(UINT64_C(0x7FF8000000000001));
+  double nan_b = bit_cast<double>(UINT64_C(0x7FF8000000000002));
 
   CHECK_MINMAX(1.0, -1.0, -1.0, 1.0);
   CHECK_MINMAX(-1.0, 1.0, -1.0, 1.0);
@@ -3655,7 +3594,7 @@
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
 
-  MacroAssembler assm(isolate, NULL, 0, CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0, CodeObjectRequired::kYes);
 
   struct Inputs {
     float left_;
@@ -3673,15 +3612,13 @@
     float max_aba_;
   };
 
-  F4 f = GenerateMacroFloatMinMax<SwVfpRegister, Inputs, Results>(assm);
-  Object* dummy = nullptr;
-  USE(dummy);
+  auto f = GenerateMacroFloatMinMax<SwVfpRegister, Inputs, Results>(assm);
 
 #define CHECK_MINMAX(left, right, min, max)                                  \
   do {                                                                       \
     Inputs inputs = {left, right};                                           \
     Results results;                                                         \
-    dummy = CALL_GENERATED_CODE(isolate, f, &inputs, &results, 0, 0, 0);     \
+    f.Call(&inputs, &results, 0, 0, 0);                                      \
     /* Use a bit_cast to correctly identify -0.0 and NaNs. */                \
     CHECK_EQ(bit_cast<uint32_t>(min), bit_cast<uint32_t>(results.min_abc_)); \
     CHECK_EQ(bit_cast<uint32_t>(min), bit_cast<uint32_t>(results.min_aab_)); \
@@ -3691,8 +3628,8 @@
     CHECK_EQ(bit_cast<uint32_t>(max), bit_cast<uint32_t>(results.max_aba_)); \
   } while (0)
 
-  float nan_a = bit_cast<float>(UINT32_C(0x7fc00001));
-  float nan_b = bit_cast<float>(UINT32_C(0x7fc00002));
+  float nan_a = bit_cast<float>(UINT32_C(0x7FC00001));
+  float nan_b = bit_cast<float>(UINT32_C(0x7FC00002));
 
   CHECK_MINMAX(1.0f, -1.0f, -1.0f, 1.0f);
   CHECK_MINMAX(-1.0f, 1.0f, -1.0f, 1.0f);
@@ -3729,7 +3666,7 @@
   } T;
   T t;
 
-  Assembler assm(isolate, NULL, 0);
+  Assembler assm(isolate, nullptr, 0);
   __ ldrh(ip, MemOperand(r1, r2));
   __ str(ip, MemOperand(r0, offsetof(T, ldrh)));
   __ ldrsh(ip, MemOperand(r1, r2));
@@ -3746,30 +3683,27 @@
   OFStream os(stdout);
   code->Print(os);
 #endif
-  F4 f = FUNCTION_CAST<F4>(code->entry());
-
-  Object* dummy = nullptr;
-  USE(dummy);
+  auto f = GeneratedCode<F_ppiii>::FromCode(*code);
 
 #ifndef V8_TARGET_LITTLE_ENDIAN
 #error This test assumes a little-endian layout.
 #endif
-  uint64_t data = UINT64_C(0x84838281807f7e7d);
-  dummy = CALL_GENERATED_CODE(isolate, f, &t, &data, 0, 0, 0);
-  CHECK_EQ(0x00007e7du, t.ldrh);
-  CHECK_EQ(0x00007e7du, t.ldrsh);
-  CHECK_EQ(0x807f7e7du, t.ldr);
-  dummy = CALL_GENERATED_CODE(isolate, f, &t, &data, 1, 0, 0);
-  CHECK_EQ(0x00007f7eu, t.ldrh);
-  CHECK_EQ(0x00007f7eu, t.ldrsh);
-  CHECK_EQ(0x81807f7eu, t.ldr);
-  dummy = CALL_GENERATED_CODE(isolate, f, &t, &data, 2, 0, 0);
-  CHECK_EQ(0x0000807fu, t.ldrh);
-  CHECK_EQ(0xffff807fu, t.ldrsh);
-  CHECK_EQ(0x8281807fu, t.ldr);
-  dummy = CALL_GENERATED_CODE(isolate, f, &t, &data, 3, 0, 0);
+  uint64_t data = UINT64_C(0x84838281807F7E7D);
+  f.Call(&t, &data, 0, 0, 0);
+  CHECK_EQ(0x00007E7Du, t.ldrh);
+  CHECK_EQ(0x00007E7Du, t.ldrsh);
+  CHECK_EQ(0x807F7E7Du, t.ldr);
+  f.Call(&t, &data, 1, 0, 0);
+  CHECK_EQ(0x00007F7Eu, t.ldrh);
+  CHECK_EQ(0x00007F7Eu, t.ldrsh);
+  CHECK_EQ(0x81807F7Eu, t.ldr);
+  f.Call(&t, &data, 2, 0, 0);
+  CHECK_EQ(0x0000807Fu, t.ldrh);
+  CHECK_EQ(0xFFFF807Fu, t.ldrsh);
+  CHECK_EQ(0x8281807Fu, t.ldr);
+  f.Call(&t, &data, 3, 0, 0);
   CHECK_EQ(0x00008180u, t.ldrh);
-  CHECK_EQ(0xffff8180u, t.ldrsh);
+  CHECK_EQ(0xFFFF8180u, t.ldrsh);
   CHECK_EQ(0x83828180u, t.ldr);
 }
 
@@ -3779,7 +3713,7 @@
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
 
-  Assembler assm(isolate, NULL, 0);
+  Assembler assm(isolate, nullptr, 0);
   __ strh(r3, MemOperand(r0, r2));
   __ str(r3, MemOperand(r1, r2));
   __ bx(lr);
@@ -3792,10 +3726,7 @@
   OFStream os(stdout);
   code->Print(os);
 #endif
-  F4 f = FUNCTION_CAST<F4>(code->entry());
-
-  Object* dummy = nullptr;
-  USE(dummy);
+  auto f = GeneratedCode<F_ppiii>::FromCode(*code);
 
 #ifndef V8_TARGET_LITTLE_ENDIAN
 #error This test assumes a little-endian layout.
@@ -3803,30 +3734,30 @@
   {
     uint64_t strh = 0;
     uint64_t str = 0;
-    dummy = CALL_GENERATED_CODE(isolate, f, &strh, &str, 0, 0xfedcba98, 0);
-    CHECK_EQ(UINT64_C(0x000000000000ba98), strh);
-    CHECK_EQ(UINT64_C(0x00000000fedcba98), str);
+    f.Call(&strh, &str, 0, 0xFEDCBA98, 0);
+    CHECK_EQ(UINT64_C(0x000000000000BA98), strh);
+    CHECK_EQ(UINT64_C(0x00000000FEDCBA98), str);
   }
   {
     uint64_t strh = 0;
     uint64_t str = 0;
-    dummy = CALL_GENERATED_CODE(isolate, f, &strh, &str, 1, 0xfedcba98, 0);
-    CHECK_EQ(UINT64_C(0x0000000000ba9800), strh);
-    CHECK_EQ(UINT64_C(0x000000fedcba9800), str);
+    f.Call(&strh, &str, 1, 0xFEDCBA98, 0);
+    CHECK_EQ(UINT64_C(0x0000000000BA9800), strh);
+    CHECK_EQ(UINT64_C(0x000000FEDCBA9800), str);
   }
   {
     uint64_t strh = 0;
     uint64_t str = 0;
-    dummy = CALL_GENERATED_CODE(isolate, f, &strh, &str, 2, 0xfedcba98, 0);
-    CHECK_EQ(UINT64_C(0x00000000ba980000), strh);
-    CHECK_EQ(UINT64_C(0x0000fedcba980000), str);
+    f.Call(&strh, &str, 2, 0xFEDCBA98, 0);
+    CHECK_EQ(UINT64_C(0x00000000BA980000), strh);
+    CHECK_EQ(UINT64_C(0x0000FEDCBA980000), str);
   }
   {
     uint64_t strh = 0;
     uint64_t str = 0;
-    dummy = CALL_GENERATED_CODE(isolate, f, &strh, &str, 3, 0xfedcba98, 0);
-    CHECK_EQ(UINT64_C(0x000000ba98000000), strh);
-    CHECK_EQ(UINT64_C(0x00fedcba98000000), str);
+    f.Call(&strh, &str, 3, 0xFEDCBA98, 0);
+    CHECK_EQ(UINT64_C(0x000000BA98000000), strh);
+    CHECK_EQ(UINT64_C(0x00FEDCBA98000000), str);
   }
 }
 
@@ -3836,7 +3767,7 @@
   CcTest::InitializeVM();
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
-  Assembler assm(isolate, NULL, 0);
+  Assembler assm(isolate, nullptr, 0);
 
   typedef struct {
     uint64_t vswp_d0;
@@ -3852,10 +3783,10 @@
 
   uint64_t one = bit_cast<uint64_t>(1.0);
   __ mov(r5, Operand(one >> 32));
-  __ mov(r4, Operand(one & 0xffffffff));
+  __ mov(r4, Operand(one & 0xFFFFFFFF));
   uint64_t minus_one = bit_cast<uint64_t>(-1.0);
   __ mov(r7, Operand(minus_one >> 32));
-  __ mov(r6, Operand(minus_one & 0xffffffff));
+  __ mov(r6, Operand(minus_one & 0xFFFFFFFF));
 
   __ vmov(d0, r4, r5);  // d0 = 1.0
   __ vmov(d1, r6, r7);  // d1 = -1.0
@@ -3873,7 +3804,7 @@
 
   // q-register swap.
   const uint32_t test_1 = 0x01234567;
-  const uint32_t test_2 = 0x89abcdef;
+  const uint32_t test_2 = 0x89ABCDEF;
   __ mov(r4, Operand(test_1));
   __ mov(r5, Operand(test_2));
   __ vdup(Neon32, q4, r4);
@@ -3895,9 +3826,8 @@
   OFStream os(stdout);
   code->Print(os);
 #endif
-  F3 f = FUNCTION_CAST<F3>(code->entry());
-  Object* dummy = CALL_GENERATED_CODE(isolate, f, &t, 0, 0, 0, 0);
-  USE(dummy);
+  auto f = GeneratedCode<F_piiii>::FromCode(*code);
+  f.Call(&t, 0, 0, 0, 0);
   CHECK_EQ(minus_one, t.vswp_d0);
   CHECK_EQ(one, t.vswp_d1);
   if (CpuFeatures::IsSupported(VFP32DREGS)) {
@@ -3919,7 +3849,7 @@
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
 
-  Assembler assm(isolate, NULL, 0);
+  Assembler assm(isolate, nullptr, 0);
   Label end;
   __ mov(r0, Operand(isolate->factory()->infinity_value()));
   for (int i = 0; i < 1020; ++i) {
@@ -3934,7 +3864,7 @@
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
 
-  Assembler assm(isolate, NULL, 0);
+  Assembler assm(isolate, nullptr, 0);
   Label end;
   __ mov(r0, Operand(isolate->factory()->infinity_value()));
   for (int i = 0; i < 1020; ++i) {
@@ -3949,7 +3879,7 @@
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
 
-  Assembler assm(isolate, NULL, 0);
+  Assembler assm(isolate, nullptr, 0);
   Label end;
   __ mov(r0, Operand(isolate->factory()->infinity_value()));
   for (int i = 0; i < 1020; ++i) {
@@ -3964,7 +3894,7 @@
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
 
-  Assembler assm(isolate, NULL, 0);
+  Assembler assm(isolate, nullptr, 0);
   __ mov(r0, Operand(isolate->factory()->infinity_value()));
   __ BlockConstPoolFor(1019);
   for (int i = 0; i < 1019; ++i) __ nop();
@@ -3976,7 +3906,7 @@
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
 
-  Assembler assm(isolate, NULL, 0);
+  Assembler assm(isolate, nullptr, 0);
 
   // The assembler should have ip as a scratch by default.
   CHECK_EQ(*assm.GetScratchRegisterList(), ip.bit());
@@ -3993,6 +3923,174 @@
   CHECK_EQ(*assm.GetScratchRegisterList(), ip.bit());
 }
 
+TEST(split_add_immediate) {
+  CcTest::InitializeVM();
+  Isolate* isolate = CcTest::i_isolate();
+  HandleScope scope(isolate);
+
+  {
+    Assembler assm(isolate, nullptr, 0);
+    __ mov(r1, r0);
+    // Re-use the destination as a scratch.
+    __ add(r0, r1, Operand(0x12345678));
+    __ blx(lr);
+
+    CodeDesc desc;
+    assm.GetCode(isolate, &desc);
+    Handle<Code> code =
+        isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
+#ifdef DEBUG
+    OFStream os(stdout);
+    code->Print(os);
+#endif
+    auto f = GeneratedCode<F_iiiii>::FromCode(*code);
+    uint32_t res = reinterpret_cast<int>(f.Call(0, 0, 0, 0, 0));
+    ::printf("f() = 0x%x\n", res);
+    CHECK_EQ(0x12345678, res);
+  }
+
+  {
+    Assembler assm(isolate, nullptr, 0);
+    // Use ip as a scratch.
+    __ add(r0, r0, Operand(0x12345678));
+    __ blx(lr);
+
+    CodeDesc desc;
+    assm.GetCode(isolate, &desc);
+    Handle<Code> code =
+        isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
+#ifdef DEBUG
+    OFStream os(stdout);
+    code->Print(os);
+#endif
+    auto f = GeneratedCode<F_iiiii>::FromCode(*code);
+    uint32_t res = reinterpret_cast<int>(f.Call(0, 0, 0, 0, 0));
+    ::printf("f() = 0x%x\n", res);
+    CHECK_EQ(0x12345678, res);
+  }
+
+  {
+    Assembler assm(isolate, nullptr, 0);
+    UseScratchRegisterScope temps(&assm);
+    Register reserved = temps.Acquire();
+    USE(reserved);
+    // If ip is not available, split the operation into multiple additions.
+    __ add(r0, r0, Operand(0x12345678));
+    __ blx(lr);
+
+    CodeDesc desc;
+    assm.GetCode(isolate, &desc);
+    Handle<Code> code =
+        isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
+#ifdef DEBUG
+    OFStream os(stdout);
+    code->Print(os);
+#endif
+    auto f = GeneratedCode<F_iiiii>::FromCode(*code);
+    uint32_t res = reinterpret_cast<int>(f.Call(0, 0, 0, 0, 0));
+    ::printf("f() = 0x%x\n", res);
+    CHECK_EQ(0x12345678, res);
+  }
+}
+
+namespace {
+
+std::vector<Float32> Float32Inputs() {
+  std::vector<Float32> inputs;
+  FOR_FLOAT32_INPUTS(f) {
+    inputs.push_back(Float32::FromBits(bit_cast<uint32_t>(*f)));
+  }
+  FOR_UINT32_INPUTS(bits) { inputs.push_back(Float32::FromBits(*bits)); }
+  return inputs;
+}
+
+std::vector<Float64> Float64Inputs() {
+  std::vector<Float64> inputs;
+  FOR_FLOAT64_INPUTS(f) {
+    inputs.push_back(Float64::FromBits(bit_cast<uint64_t>(*f)));
+  }
+  FOR_UINT64_INPUTS(bits) { inputs.push_back(Float64::FromBits(*bits)); }
+  return inputs;
+}
+
+}  // namespace
+
+TEST(vabs_32) {
+  Isolate* isolate = CcTest::i_isolate();
+  HandleScope scope(isolate);
+
+  auto f = AssembleCode<F_iiiii>([](Assembler& assm) {
+    __ vmov(s0, r0);
+    __ vabs(s0, s0);
+    __ vmov(r0, s0);
+  });
+
+  for (Float32 f32 : Float32Inputs()) {
+    Float32 res = Float32::FromBits(
+        reinterpret_cast<uint32_t>(f.Call(f32.get_bits(), 0, 0, 0, 0)));
+    Float32 exp = Float32::FromBits(f32.get_bits() & ~(1 << 31));
+    CHECK_EQ(exp.get_bits(), res.get_bits());
+  }
+}
+
+TEST(vabs_64) {
+  Isolate* isolate = CcTest::i_isolate();
+  HandleScope scope(isolate);
+
+  auto f = AssembleCode<F_iiiii>([](Assembler& assm) {
+    __ vmov(d0, r0, r1);
+    __ vabs(d0, d0);
+    __ vmov(r1, r0, d0);
+  });
+
+  for (Float64 f64 : Float64Inputs()) {
+    uint32_t p0 = static_cast<uint32_t>(f64.get_bits());
+    uint32_t p1 = static_cast<uint32_t>(f64.get_bits() >> 32);
+    uint32_t res = reinterpret_cast<uint32_t>(f.Call(p0, p1, 0, 0, 0));
+    Float64 exp = Float64::FromBits(f64.get_bits() & ~(1ull << 63));
+    // We just get back the top word, so only compare that one.
+    CHECK_EQ(exp.get_bits() >> 32, res);
+  }
+}
+
+TEST(vneg_32) {
+  Isolate* isolate = CcTest::i_isolate();
+  HandleScope scope(isolate);
+
+  auto f = AssembleCode<F_iiiii>([](Assembler& assm) {
+    __ vmov(s0, r0);
+    __ vneg(s0, s0);
+    __ vmov(r0, s0);
+  });
+
+  for (Float32 f32 : Float32Inputs()) {
+    Float32 res = Float32::FromBits(
+        reinterpret_cast<uint32_t>(f.Call(f32.get_bits(), 0, 0, 0, 0)));
+    Float32 exp = Float32::FromBits(f32.get_bits() ^ (1 << 31));
+    CHECK_EQ(exp.get_bits(), res.get_bits());
+  }
+}
+
+TEST(vneg_64) {
+  Isolate* isolate = CcTest::i_isolate();
+  HandleScope scope(isolate);
+
+  auto f = AssembleCode<F_iiiii>([](Assembler& assm) {
+    __ vmov(d0, r0, r1);
+    __ vneg(d0, d0);
+    __ vmov(r1, r0, d0);
+  });
+
+  for (Float64 f64 : Float64Inputs()) {
+    uint32_t p0 = static_cast<uint32_t>(f64.get_bits());
+    uint32_t p1 = static_cast<uint32_t>(f64.get_bits() >> 32);
+    uint32_t res = reinterpret_cast<uint32_t>(f.Call(p0, p1, 0, 0, 0));
+    Float64 exp = Float64::FromBits(f64.get_bits() ^ (1ull << 63));
+    // We just get back the top word, so only compare that one.
+    CHECK_EQ(exp.get_bits() >> 32, res);
+  }
+}
+
 #undef __
 
 }  // namespace test_assembler_arm
diff --git a/src/v8/test/cctest/test-assembler-arm64.cc b/src/v8/test/cctest/test-assembler-arm64.cc
index 9ebe524..4fc8020 100644
--- a/src/v8/test/cctest/test-assembler-arm64.cc
+++ b/src/v8/test/cctest/test-assembler-arm64.cc
@@ -95,8 +95,7 @@
 // If more advance computation is required before the assert then access the
 // RegisterDump named core directly:
 //
-//   CHECK_EQUAL_64(0x1234, core.xreg(0) & 0xffff);
-
+//   CHECK_EQUAL_64(0x1234, core.xreg(0) & 0xFFFF);
 
 #if 0  // TODO(all): enable.
 static v8::Persistent<v8::Context> env;
@@ -122,14 +121,14 @@
 #define SETUP_SIZE(buf_size)                                   \
   Isolate* isolate = CcTest::i_isolate();                      \
   HandleScope scope(isolate);                                  \
-  CHECK(isolate != NULL);                                      \
+  CHECK_NOT_NULL(isolate);                                     \
   byte* buf = new byte[buf_size];                              \
   MacroAssembler masm(isolate, buf, buf_size,                  \
                       v8::internal::CodeObjectRequired::kYes); \
   Decoder<DispatchingDecoderVisitor>* decoder =                \
       new Decoder<DispatchingDecoderVisitor>();                \
   Simulator simulator(decoder);                                \
-  PrintDisassembler* pdis = NULL;                              \
+  PrintDisassembler* pdis = nullptr;                           \
   RegisterDump core;
 
 /*  if (Cctest::trace_sim()) {                                                 \
@@ -150,7 +149,6 @@
   simulator.ResetState();
 
 #define START_AFTER_RESET()                                                    \
-  __ SetStackPointer(csp);                                                     \
   __ PushCalleeSavedRegisters();                                               \
   __ Debug("Start test.", __LINE__, TRACE_ENABLE | LOG_ALL);
 
@@ -166,7 +164,7 @@
   core.Dump(&masm);                                         \
   __ PopCalleeSavedRegisters();                             \
   __ Ret();                                                 \
-  __ GetCode(masm.isolate(), NULL);
+  __ GetCode(masm.isolate(), nullptr);
 
 #define TEARDOWN()                                                             \
   delete pdis;                                                                 \
@@ -174,15 +172,14 @@
 
 #else  // ifdef USE_SIMULATOR.
 // Run the test on real hardware or models.
-#define SETUP_SIZE(buf_size)                                            \
-  Isolate* isolate = CcTest::i_isolate();                               \
-  HandleScope scope(isolate);                                           \
-  CHECK(isolate != NULL);                                               \
-  size_t actual_size;                                                   \
-  byte* buf = static_cast<byte*>(                                       \
-      v8::base::OS::Allocate(buf_size, &actual_size, true));            \
-  MacroAssembler masm(isolate, buf, static_cast<unsigned>(actual_size), \
-                      v8::internal::CodeObjectRequired::kYes);          \
+#define SETUP_SIZE(buf_size)                                     \
+  Isolate* isolate = CcTest::i_isolate();                        \
+  HandleScope scope(isolate);                                    \
+  CHECK_NOT_NULL(isolate);                                       \
+  size_t allocated;                                              \
+  byte* buf = AllocateAssemblerBuffer(&allocated, buf_size);     \
+  MacroAssembler masm(isolate, buf, static_cast<int>(allocated), \
+                      v8::internal::CodeObjectRequired::kYes);   \
   RegisterDump core;
 
 #define RESET()                                                                \
@@ -193,7 +190,6 @@
 
 
 #define START_AFTER_RESET()                                                    \
-  __ SetStackPointer(csp);                                                     \
   __ PushCalleeSavedRegisters();
 
 #define START()                                                                \
@@ -201,6 +197,7 @@
   START_AFTER_RESET();
 
 #define RUN()                                                       \
+  MakeAssemblerBufferExecutable(buf, allocated);                    \
   Assembler::FlushICache(isolate, buf, masm.SizeOfGeneratedCode()); \
   {                                                                 \
     void (*test_function)(void);                                    \
@@ -212,10 +209,9 @@
   core.Dump(&masm);             \
   __ PopCalleeSavedRegisters(); \
   __ Ret();                     \
-  __ GetCode(masm.isolate(), NULL);
+  __ GetCode(masm.isolate(), nullptr);
 
-#define TEARDOWN()                                                             \
-  v8::base::OS::Free(buf, actual_size);
+#define TEARDOWN() CHECK(v8::internal::FreePages(buf, allocated));
 
 #endif  // ifdef USE_SIMULATOR.
 
@@ -268,20 +264,20 @@
   __ Mov(x1, csp);
 
   // Add extended to the csp, and move the result to a normal register.
-  __ Mov(x17, 0xfff);
+  __ Mov(x17, 0xFFF);
   __ Add(csp, csp, Operand(x17, SXTB));
   __ Mov(x2, csp);
 
   // Create an csp using a logical instruction, and move to normal register.
-  __ Orr(csp, xzr, Operand(0x1fff));
+  __ Orr(csp, xzr, Operand(0x1FFF));
   __ Mov(x3, csp);
 
   // Write wcsp using a logical instruction.
-  __ Orr(wcsp, wzr, Operand(0xfffffff8L));
+  __ Orr(wcsp, wzr, Operand(0xFFFFFFF8L));
   __ Mov(x4, csp);
 
   // Write csp, and read back wcsp.
-  __ Orr(csp, xzr, Operand(0xfffffff8L));
+  __ Orr(csp, xzr, Operand(0xFFFFFFF8L));
   __ Mov(w5, wcsp);
 
   //  restore csp.
@@ -292,10 +288,10 @@
 
   CHECK_EQUAL_64(0x1000, x0);
   CHECK_EQUAL_64(0x1050, x1);
-  CHECK_EQUAL_64(0x104f, x2);
-  CHECK_EQUAL_64(0x1fff, x3);
-  CHECK_EQUAL_64(0xfffffff8, x4);
-  CHECK_EQUAL_64(0xfffffff8, x5);
+  CHECK_EQUAL_64(0x104F, x2);
+  CHECK_EQUAL_64(0x1FFF, x3);
+  CHECK_EQUAL_64(0xFFFFFFF8, x4);
+  CHECK_EQUAL_64(0xFFFFFFF8, x5);
 
   TEARDOWN();
 }
@@ -306,8 +302,8 @@
   SETUP();
 
   START();
-  __ Mvn(w0, 0xfff);
-  __ Mvn(x1, 0xfff);
+  __ Mvn(w0, 0xFFF);
+  __ Mvn(x1, 0xFFF);
   __ Mvn(w2, Operand(w0, LSL, 1));
   __ Mvn(x3, Operand(x1, LSL, 2));
   __ Mvn(w4, Operand(w0, LSR, 3));
@@ -326,22 +322,22 @@
 
   RUN();
 
-  CHECK_EQUAL_64(0xfffff000, x0);
-  CHECK_EQUAL_64(0xfffffffffffff000UL, x1);
-  CHECK_EQUAL_64(0x00001fff, x2);
-  CHECK_EQUAL_64(0x0000000000003fffUL, x3);
-  CHECK_EQUAL_64(0xe00001ff, x4);
-  CHECK_EQUAL_64(0xf0000000000000ffUL, x5);
+  CHECK_EQUAL_64(0xFFFFF000, x0);
+  CHECK_EQUAL_64(0xFFFFFFFFFFFFF000UL, x1);
+  CHECK_EQUAL_64(0x00001FFF, x2);
+  CHECK_EQUAL_64(0x0000000000003FFFUL, x3);
+  CHECK_EQUAL_64(0xE00001FF, x4);
+  CHECK_EQUAL_64(0xF0000000000000FFUL, x5);
   CHECK_EQUAL_64(0x00000001, x6);
   CHECK_EQUAL_64(0x0, x7);
-  CHECK_EQUAL_64(0x7ff80000, x8);
-  CHECK_EQUAL_64(0x3ffc000000000000UL, x9);
-  CHECK_EQUAL_64(0xffffff00, x10);
+  CHECK_EQUAL_64(0x7FF80000, x8);
+  CHECK_EQUAL_64(0x3FFC000000000000UL, x9);
+  CHECK_EQUAL_64(0xFFFFFF00, x10);
   CHECK_EQUAL_64(0x0000000000000001UL, x11);
-  CHECK_EQUAL_64(0xffff8003, x12);
-  CHECK_EQUAL_64(0xffffffffffff0007UL, x13);
-  CHECK_EQUAL_64(0xfffffffffffe000fUL, x14);
-  CHECK_EQUAL_64(0xfffffffffffe000fUL, x15);
+  CHECK_EQUAL_64(0xFFFF8003, x12);
+  CHECK_EQUAL_64(0xFFFFFFFFFFFF0007UL, x13);
+  CHECK_EQUAL_64(0xFFFFFFFFFFFE000FUL, x14);
+  CHECK_EQUAL_64(0xFFFFFFFFFFFE000FUL, x15);
 
   TEARDOWN();
 }
@@ -352,35 +348,35 @@
   SETUP();
 
   START();
-  __ Mov(x0, 0xffffffffffffffffL);
-  __ Mov(x1, 0xffffffffffffffffL);
-  __ Mov(x2, 0xffffffffffffffffL);
-  __ Mov(x3, 0xffffffffffffffffL);
+  __ Mov(x0, 0xFFFFFFFFFFFFFFFFL);
+  __ Mov(x1, 0xFFFFFFFFFFFFFFFFL);
+  __ Mov(x2, 0xFFFFFFFFFFFFFFFFL);
+  __ Mov(x3, 0xFFFFFFFFFFFFFFFFL);
 
-  __ Mov(x0, 0x0123456789abcdefL);
+  __ Mov(x0, 0x0123456789ABCDEFL);
 
-  __ movz(x1, 0xabcdL << 16);
-  __ movk(x2, 0xabcdL << 32);
-  __ movn(x3, 0xabcdL << 48);
+  __ movz(x1, 0xABCDL << 16);
+  __ movk(x2, 0xABCDL << 32);
+  __ movn(x3, 0xABCDL << 48);
 
-  __ Mov(x4, 0x0123456789abcdefL);
+  __ Mov(x4, 0x0123456789ABCDEFL);
   __ Mov(x5, x4);
 
   __ Mov(w6, -1);
 
   // Test that moves back to the same register have the desired effect. This
   // is a no-op for X registers, and a truncation for W registers.
-  __ Mov(x7, 0x0123456789abcdefL);
+  __ Mov(x7, 0x0123456789ABCDEFL);
   __ Mov(x7, x7);
-  __ Mov(x8, 0x0123456789abcdefL);
+  __ Mov(x8, 0x0123456789ABCDEFL);
   __ Mov(w8, w8);
-  __ Mov(x9, 0x0123456789abcdefL);
+  __ Mov(x9, 0x0123456789ABCDEFL);
   __ Mov(x9, Operand(x9));
-  __ Mov(x10, 0x0123456789abcdefL);
+  __ Mov(x10, 0x0123456789ABCDEFL);
   __ Mov(w10, Operand(w10));
 
-  __ Mov(w11, 0xfff);
-  __ Mov(x12, 0xfff);
+  __ Mov(w11, 0xFFF);
+  __ Mov(x12, 0xFFF);
   __ Mov(w13, Operand(w11, LSL, 1));
   __ Mov(x14, Operand(x12, LSL, 2));
   __ Mov(w15, Operand(w11, LSR, 3));
@@ -398,31 +394,31 @@
 
   RUN();
 
-  CHECK_EQUAL_64(0x0123456789abcdefL, x0);
-  CHECK_EQUAL_64(0x00000000abcd0000L, x1);
-  CHECK_EQUAL_64(0xffffabcdffffffffL, x2);
-  CHECK_EQUAL_64(0x5432ffffffffffffL, x3);
+  CHECK_EQUAL_64(0x0123456789ABCDEFL, x0);
+  CHECK_EQUAL_64(0x00000000ABCD0000L, x1);
+  CHECK_EQUAL_64(0xFFFFABCDFFFFFFFFL, x2);
+  CHECK_EQUAL_64(0x5432FFFFFFFFFFFFL, x3);
   CHECK_EQUAL_64(x4, x5);
   CHECK_EQUAL_32(-1, w6);
-  CHECK_EQUAL_64(0x0123456789abcdefL, x7);
-  CHECK_EQUAL_32(0x89abcdefL, w8);
-  CHECK_EQUAL_64(0x0123456789abcdefL, x9);
-  CHECK_EQUAL_32(0x89abcdefL, w10);
-  CHECK_EQUAL_64(0x00000fff, x11);
-  CHECK_EQUAL_64(0x0000000000000fffUL, x12);
-  CHECK_EQUAL_64(0x00001ffe, x13);
-  CHECK_EQUAL_64(0x0000000000003ffcUL, x14);
-  CHECK_EQUAL_64(0x000001ff, x15);
-  CHECK_EQUAL_64(0x00000000000000ffUL, x18);
+  CHECK_EQUAL_64(0x0123456789ABCDEFL, x7);
+  CHECK_EQUAL_32(0x89ABCDEFL, w8);
+  CHECK_EQUAL_64(0x0123456789ABCDEFL, x9);
+  CHECK_EQUAL_32(0x89ABCDEFL, w10);
+  CHECK_EQUAL_64(0x00000FFF, x11);
+  CHECK_EQUAL_64(0x0000000000000FFFUL, x12);
+  CHECK_EQUAL_64(0x00001FFE, x13);
+  CHECK_EQUAL_64(0x0000000000003FFCUL, x14);
+  CHECK_EQUAL_64(0x000001FF, x15);
+  CHECK_EQUAL_64(0x00000000000000FFUL, x18);
   CHECK_EQUAL_64(0x00000001, x19);
   CHECK_EQUAL_64(0x0, x20);
-  CHECK_EQUAL_64(0x7ff80000, x21);
-  CHECK_EQUAL_64(0x3ffc000000000000UL, x22);
-  CHECK_EQUAL_64(0x000000fe, x23);
-  CHECK_EQUAL_64(0xfffffffffffffffcUL, x24);
-  CHECK_EQUAL_64(0x00007ff8, x25);
-  CHECK_EQUAL_64(0x000000000000fff0UL, x26);
-  CHECK_EQUAL_64(0x000000000001ffe0UL, x27);
+  CHECK_EQUAL_64(0x7FF80000, x21);
+  CHECK_EQUAL_64(0x3FFC000000000000UL, x22);
+  CHECK_EQUAL_64(0x000000FE, x23);
+  CHECK_EQUAL_64(0xFFFFFFFFFFFFFFFCUL, x24);
+  CHECK_EQUAL_64(0x00007FF8, x25);
+  CHECK_EQUAL_64(0x000000000000FFF0UL, x26);
+  CHECK_EQUAL_64(0x000000000001FFE0UL, x27);
 
   TEARDOWN();
 }
@@ -433,29 +429,29 @@
   SETUP();
 
   START();
-  __ Mov(w0, 0xffffffffL);
-  __ Mov(w1, 0xffff1234L);
-  __ Mov(w2, 0x1234ffffL);
+  __ Mov(w0, 0xFFFFFFFFL);
+  __ Mov(w1, 0xFFFF1234L);
+  __ Mov(w2, 0x1234FFFFL);
   __ Mov(w3, 0x00000000L);
   __ Mov(w4, 0x00001234L);
   __ Mov(w5, 0x12340000L);
   __ Mov(w6, 0x12345678L);
   __ Mov(w7, (int32_t)0x80000000);
-  __ Mov(w8, (int32_t)0xffff0000);
+  __ Mov(w8, (int32_t)0xFFFF0000);
   __ Mov(w9, kWMinInt);
   END();
 
   RUN();
 
-  CHECK_EQUAL_64(0xffffffffL, x0);
-  CHECK_EQUAL_64(0xffff1234L, x1);
-  CHECK_EQUAL_64(0x1234ffffL, x2);
+  CHECK_EQUAL_64(0xFFFFFFFFL, x0);
+  CHECK_EQUAL_64(0xFFFF1234L, x1);
+  CHECK_EQUAL_64(0x1234FFFFL, x2);
   CHECK_EQUAL_64(0x00000000L, x3);
   CHECK_EQUAL_64(0x00001234L, x4);
   CHECK_EQUAL_64(0x12340000L, x5);
   CHECK_EQUAL_64(0x12345678L, x6);
   CHECK_EQUAL_64(0x80000000L, x7);
-  CHECK_EQUAL_64(0xffff0000L, x8);
+  CHECK_EQUAL_64(0xFFFF0000L, x8);
   CHECK_EQUAL_32(kWMinInt, w9);
 
   TEARDOWN();
@@ -467,18 +463,18 @@
   SETUP();
 
   START();
-  __ Mov(x0, 0xffffffffffffffffL);
-  __ Mov(x1, 0xffffffffffff1234L);
-  __ Mov(x2, 0xffffffff12345678L);
-  __ Mov(x3, 0xffff1234ffff5678L);
-  __ Mov(x4, 0x1234ffffffff5678L);
-  __ Mov(x5, 0x1234ffff5678ffffL);
-  __ Mov(x6, 0x12345678ffffffffL);
-  __ Mov(x7, 0x1234ffffffffffffL);
-  __ Mov(x8, 0x123456789abcffffL);
-  __ Mov(x9, 0x12345678ffff9abcL);
-  __ Mov(x10, 0x1234ffff56789abcL);
-  __ Mov(x11, 0xffff123456789abcL);
+  __ Mov(x0, 0xFFFFFFFFFFFFFFFFL);
+  __ Mov(x1, 0xFFFFFFFFFFFF1234L);
+  __ Mov(x2, 0xFFFFFFFF12345678L);
+  __ Mov(x3, 0xFFFF1234FFFF5678L);
+  __ Mov(x4, 0x1234FFFFFFFF5678L);
+  __ Mov(x5, 0x1234FFFF5678FFFFL);
+  __ Mov(x6, 0x12345678FFFFFFFFL);
+  __ Mov(x7, 0x1234FFFFFFFFFFFFL);
+  __ Mov(x8, 0x123456789ABCFFFFL);
+  __ Mov(x9, 0x12345678FFFF9ABCL);
+  __ Mov(x10, 0x1234FFFF56789ABCL);
+  __ Mov(x11, 0xFFFF123456789ABCL);
   __ Mov(x12, 0x0000000000000000L);
   __ Mov(x13, 0x0000000000001234L);
   __ Mov(x14, 0x0000000012345678L);
@@ -487,28 +483,28 @@
   __ Mov(x19, 0x1234000056780000L);
   __ Mov(x20, 0x1234567800000000L);
   __ Mov(x21, 0x1234000000000000L);
-  __ Mov(x22, 0x123456789abc0000L);
-  __ Mov(x23, 0x1234567800009abcL);
-  __ Mov(x24, 0x1234000056789abcL);
-  __ Mov(x25, 0x0000123456789abcL);
-  __ Mov(x26, 0x123456789abcdef0L);
-  __ Mov(x27, 0xffff000000000001L);
-  __ Mov(x28, 0x8000ffff00000000L);
+  __ Mov(x22, 0x123456789ABC0000L);
+  __ Mov(x23, 0x1234567800009ABCL);
+  __ Mov(x24, 0x1234000056789ABCL);
+  __ Mov(x25, 0x0000123456789ABCL);
+  __ Mov(x26, 0x123456789ABCDEF0L);
+  __ Mov(x27, 0xFFFF000000000001L);
+  __ Mov(x28, 0x8000FFFF00000000L);
   END();
 
   RUN();
 
-  CHECK_EQUAL_64(0xffffffffffff1234L, x1);
-  CHECK_EQUAL_64(0xffffffff12345678L, x2);
-  CHECK_EQUAL_64(0xffff1234ffff5678L, x3);
-  CHECK_EQUAL_64(0x1234ffffffff5678L, x4);
-  CHECK_EQUAL_64(0x1234ffff5678ffffL, x5);
-  CHECK_EQUAL_64(0x12345678ffffffffL, x6);
-  CHECK_EQUAL_64(0x1234ffffffffffffL, x7);
-  CHECK_EQUAL_64(0x123456789abcffffL, x8);
-  CHECK_EQUAL_64(0x12345678ffff9abcL, x9);
-  CHECK_EQUAL_64(0x1234ffff56789abcL, x10);
-  CHECK_EQUAL_64(0xffff123456789abcL, x11);
+  CHECK_EQUAL_64(0xFFFFFFFFFFFF1234L, x1);
+  CHECK_EQUAL_64(0xFFFFFFFF12345678L, x2);
+  CHECK_EQUAL_64(0xFFFF1234FFFF5678L, x3);
+  CHECK_EQUAL_64(0x1234FFFFFFFF5678L, x4);
+  CHECK_EQUAL_64(0x1234FFFF5678FFFFL, x5);
+  CHECK_EQUAL_64(0x12345678FFFFFFFFL, x6);
+  CHECK_EQUAL_64(0x1234FFFFFFFFFFFFL, x7);
+  CHECK_EQUAL_64(0x123456789ABCFFFFL, x8);
+  CHECK_EQUAL_64(0x12345678FFFF9ABCL, x9);
+  CHECK_EQUAL_64(0x1234FFFF56789ABCL, x10);
+  CHECK_EQUAL_64(0xFFFF123456789ABCL, x11);
   CHECK_EQUAL_64(0x0000000000000000L, x12);
   CHECK_EQUAL_64(0x0000000000001234L, x13);
   CHECK_EQUAL_64(0x0000000012345678L, x14);
@@ -517,13 +513,13 @@
   CHECK_EQUAL_64(0x1234000056780000L, x19);
   CHECK_EQUAL_64(0x1234567800000000L, x20);
   CHECK_EQUAL_64(0x1234000000000000L, x21);
-  CHECK_EQUAL_64(0x123456789abc0000L, x22);
-  CHECK_EQUAL_64(0x1234567800009abcL, x23);
-  CHECK_EQUAL_64(0x1234000056789abcL, x24);
-  CHECK_EQUAL_64(0x0000123456789abcL, x25);
-  CHECK_EQUAL_64(0x123456789abcdef0L, x26);
-  CHECK_EQUAL_64(0xffff000000000001L, x27);
-  CHECK_EQUAL_64(0x8000ffff00000000L, x28);
+  CHECK_EQUAL_64(0x123456789ABC0000L, x22);
+  CHECK_EQUAL_64(0x1234567800009ABCL, x23);
+  CHECK_EQUAL_64(0x1234000056789ABCL, x24);
+  CHECK_EQUAL_64(0x0000123456789ABCL, x25);
+  CHECK_EQUAL_64(0x123456789ABCDEF0L, x26);
+  CHECK_EQUAL_64(0xFFFF000000000001L, x27);
+  CHECK_EQUAL_64(0x8000FFFF00000000L, x28);
 
   TEARDOWN();
 }
@@ -534,8 +530,8 @@
   SETUP();
 
   START();
-  __ Mov(x0, 0xf0f0);
-  __ Mov(x1, 0xf00000ff);
+  __ Mov(x0, 0xF0F0);
+  __ Mov(x1, 0xF00000FF);
 
   __ Orr(x2, x0, Operand(x1));
   __ Orr(w3, w0, Operand(w1, LSL, 28));
@@ -545,22 +541,22 @@
   __ Orr(x7, x0, Operand(x1, ASR, 4));
   __ Orr(w8, w0, Operand(w1, ROR, 12));
   __ Orr(x9, x0, Operand(x1, ROR, 12));
-  __ Orr(w10, w0, Operand(0xf));
-  __ Orr(x11, x0, Operand(0xf0000000f0000000L));
+  __ Orr(w10, w0, Operand(0xF));
+  __ Orr(x11, x0, Operand(0xF0000000F0000000L));
   END();
 
   RUN();
 
-  CHECK_EQUAL_64(0xf000f0ff, x2);
-  CHECK_EQUAL_64(0xf000f0f0, x3);
-  CHECK_EQUAL_64(0xf00000ff0000f0f0L, x4);
-  CHECK_EQUAL_64(0x0f00f0ff, x5);
-  CHECK_EQUAL_64(0xff00f0ff, x6);
-  CHECK_EQUAL_64(0x0f00f0ff, x7);
-  CHECK_EQUAL_64(0x0ffff0f0, x8);
-  CHECK_EQUAL_64(0x0ff00000000ff0f0L, x9);
-  CHECK_EQUAL_64(0xf0ff, x10);
-  CHECK_EQUAL_64(0xf0000000f000f0f0L, x11);
+  CHECK_EQUAL_64(0xF000F0FF, x2);
+  CHECK_EQUAL_64(0xF000F0F0, x3);
+  CHECK_EQUAL_64(0xF00000FF0000F0F0L, x4);
+  CHECK_EQUAL_64(0x0F00F0FF, x5);
+  CHECK_EQUAL_64(0xFF00F0FF, x6);
+  CHECK_EQUAL_64(0x0F00F0FF, x7);
+  CHECK_EQUAL_64(0x0FFFF0F0, x8);
+  CHECK_EQUAL_64(0x0FF00000000FF0F0L, x9);
+  CHECK_EQUAL_64(0xF0FF, x10);
+  CHECK_EQUAL_64(0xF0000000F000F0F0L, x11);
 
   TEARDOWN();
 }
@@ -589,9 +585,9 @@
   CHECK_EQUAL_64(0x00010101, x7);
   CHECK_EQUAL_64(0x00020201, x8);
   CHECK_EQUAL_64(0x0000000400040401UL, x9);
-  CHECK_EQUAL_64(0x00000000ffffff81UL, x10);
-  CHECK_EQUAL_64(0xffffffffffff0101UL, x11);
-  CHECK_EQUAL_64(0xfffffffe00020201UL, x12);
+  CHECK_EQUAL_64(0x00000000FFFFFF81UL, x10);
+  CHECK_EQUAL_64(0xFFFFFFFFFFFF0101UL, x11);
+  CHECK_EQUAL_64(0xFFFFFFFE00020201UL, x12);
   CHECK_EQUAL_64(0x0000000400040401UL, x13);
 
   TEARDOWN();
@@ -604,10 +600,10 @@
 
   START();
   __ Mov(x0, 0);
-  __ Mov(x1, 0xf0f0f0f0f0f0f0f0UL);
+  __ Mov(x1, 0xF0F0F0F0F0F0F0F0UL);
 
-  __ Orr(x10, x0, Operand(0x1234567890abcdefUL));
-  __ Orr(w11, w1, Operand(0x90abcdef));
+  __ Orr(x10, x0, Operand(0x1234567890ABCDEFUL));
+  __ Orr(w11, w1, Operand(0x90ABCDEF));
 
   __ Orr(w12, w0, kWMinInt);
   __ Eor(w13, w0, kWMinInt);
@@ -616,9 +612,9 @@
   RUN();
 
   CHECK_EQUAL_64(0, x0);
-  CHECK_EQUAL_64(0xf0f0f0f0f0f0f0f0UL, x1);
-  CHECK_EQUAL_64(0x1234567890abcdefUL, x10);
-  CHECK_EQUAL_64(0xf0fbfdffUL, x11);
+  CHECK_EQUAL_64(0xF0F0F0F0F0F0F0F0UL, x1);
+  CHECK_EQUAL_64(0x1234567890ABCDEFUL, x10);
+  CHECK_EQUAL_64(0xF0FBFDFFUL, x11);
   CHECK_EQUAL_32(kWMinInt, w12);
   CHECK_EQUAL_32(kWMinInt, w13);
 
@@ -631,8 +627,8 @@
   SETUP();
 
   START();
-  __ Mov(x0, 0xf0f0);
-  __ Mov(x1, 0xf00000ff);
+  __ Mov(x0, 0xF0F0);
+  __ Mov(x1, 0xF00000FF);
 
   __ Orn(x2, x0, Operand(x1));
   __ Orn(w3, w0, Operand(w1, LSL, 4));
@@ -642,22 +638,22 @@
   __ Orn(x7, x0, Operand(x1, ASR, 1));
   __ Orn(w8, w0, Operand(w1, ROR, 16));
   __ Orn(x9, x0, Operand(x1, ROR, 16));
-  __ Orn(w10, w0, Operand(0xffff));
-  __ Orn(x11, x0, Operand(0xffff0000ffffL));
+  __ Orn(w10, w0, Operand(0xFFFF));
+  __ Orn(x11, x0, Operand(0xFFFF0000FFFFL));
   END();
 
   RUN();
 
-  CHECK_EQUAL_64(0xffffffff0ffffff0L, x2);
-  CHECK_EQUAL_64(0xfffff0ff, x3);
-  CHECK_EQUAL_64(0xfffffff0fffff0ffL, x4);
-  CHECK_EQUAL_64(0xffffffff87fffff0L, x5);
-  CHECK_EQUAL_64(0x07fffff0, x6);
-  CHECK_EQUAL_64(0xffffffff87fffff0L, x7);
-  CHECK_EQUAL_64(0xff00ffff, x8);
-  CHECK_EQUAL_64(0xff00ffffffffffffL, x9);
-  CHECK_EQUAL_64(0xfffff0f0, x10);
-  CHECK_EQUAL_64(0xffff0000fffff0f0L, x11);
+  CHECK_EQUAL_64(0xFFFFFFFF0FFFFFF0L, x2);
+  CHECK_EQUAL_64(0xFFFFF0FF, x3);
+  CHECK_EQUAL_64(0xFFFFFFF0FFFFF0FFL, x4);
+  CHECK_EQUAL_64(0xFFFFFFFF87FFFFF0L, x5);
+  CHECK_EQUAL_64(0x07FFFFF0, x6);
+  CHECK_EQUAL_64(0xFFFFFFFF87FFFFF0L, x7);
+  CHECK_EQUAL_64(0xFF00FFFF, x8);
+  CHECK_EQUAL_64(0xFF00FFFFFFFFFFFFL, x9);
+  CHECK_EQUAL_64(0xFFFFF0F0, x10);
+  CHECK_EQUAL_64(0xFFFF0000FFFFF0F0L, x11);
 
   TEARDOWN();
 }
@@ -682,14 +678,14 @@
 
   RUN();
 
-  CHECK_EQUAL_64(0xffffff7f, x6);
-  CHECK_EQUAL_64(0xfffffffffffefefdUL, x7);
-  CHECK_EQUAL_64(0xfffdfdfb, x8);
-  CHECK_EQUAL_64(0xfffffffbfffbfbf7UL, x9);
-  CHECK_EQUAL_64(0x0000007f, x10);
-  CHECK_EQUAL_64(0x0000fefd, x11);
-  CHECK_EQUAL_64(0x00000001fffdfdfbUL, x12);
-  CHECK_EQUAL_64(0xfffffffbfffbfbf7UL, x13);
+  CHECK_EQUAL_64(0xFFFFFF7F, x6);
+  CHECK_EQUAL_64(0xFFFFFFFFFFFEFEFDUL, x7);
+  CHECK_EQUAL_64(0xFFFDFDFB, x8);
+  CHECK_EQUAL_64(0xFFFFFFFBFFFBFBF7UL, x9);
+  CHECK_EQUAL_64(0x0000007F, x10);
+  CHECK_EQUAL_64(0x0000FEFD, x11);
+  CHECK_EQUAL_64(0x00000001FFFDFDFBUL, x12);
+  CHECK_EQUAL_64(0xFFFFFFFBFFFBFBF7UL, x13);
 
   TEARDOWN();
 }
@@ -700,8 +696,8 @@
   SETUP();
 
   START();
-  __ Mov(x0, 0xfff0);
-  __ Mov(x1, 0xf00000ff);
+  __ Mov(x0, 0xFFF0);
+  __ Mov(x1, 0xF00000FF);
 
   __ And(x2, x0, Operand(x1));
   __ And(w3, w0, Operand(w1, LSL, 4));
@@ -711,22 +707,22 @@
   __ And(x7, x0, Operand(x1, ASR, 20));
   __ And(w8, w0, Operand(w1, ROR, 28));
   __ And(x9, x0, Operand(x1, ROR, 28));
-  __ And(w10, w0, Operand(0xff00));
-  __ And(x11, x0, Operand(0xff));
+  __ And(w10, w0, Operand(0xFF00));
+  __ And(x11, x0, Operand(0xFF));
   END();
 
   RUN();
 
-  CHECK_EQUAL_64(0x000000f0, x2);
-  CHECK_EQUAL_64(0x00000ff0, x3);
-  CHECK_EQUAL_64(0x00000ff0, x4);
+  CHECK_EQUAL_64(0x000000F0, x2);
+  CHECK_EQUAL_64(0x00000FF0, x3);
+  CHECK_EQUAL_64(0x00000FF0, x4);
   CHECK_EQUAL_64(0x00000070, x5);
-  CHECK_EQUAL_64(0x0000ff00, x6);
-  CHECK_EQUAL_64(0x00000f00, x7);
-  CHECK_EQUAL_64(0x00000ff0, x8);
+  CHECK_EQUAL_64(0x0000FF00, x6);
+  CHECK_EQUAL_64(0x00000F00, x7);
+  CHECK_EQUAL_64(0x00000FF0, x8);
   CHECK_EQUAL_64(0x00000000, x9);
-  CHECK_EQUAL_64(0x0000ff00, x10);
-  CHECK_EQUAL_64(0x000000f0, x11);
+  CHECK_EQUAL_64(0x0000FF00, x10);
+  CHECK_EQUAL_64(0x000000F0, x11);
 
   TEARDOWN();
 }
@@ -737,7 +733,7 @@
   SETUP();
 
   START();
-  __ Mov(x0, 0xffffffffffffffffUL);
+  __ Mov(x0, 0xFFFFFFFFFFFFFFFFUL);
   __ Mov(x1, 0x8000000080008081UL);
   __ And(w6, w0, Operand(w1, UXTB));
   __ And(x7, x0, Operand(x1, UXTH, 1));
@@ -755,9 +751,9 @@
   CHECK_EQUAL_64(0x00010102, x7);
   CHECK_EQUAL_64(0x00020204, x8);
   CHECK_EQUAL_64(0x0000000400040408UL, x9);
-  CHECK_EQUAL_64(0xffffff81, x10);
-  CHECK_EQUAL_64(0xffffffffffff0102UL, x11);
-  CHECK_EQUAL_64(0xfffffffe00020204UL, x12);
+  CHECK_EQUAL_64(0xFFFFFF81, x10);
+  CHECK_EQUAL_64(0xFFFFFFFFFFFF0102UL, x11);
+  CHECK_EQUAL_64(0xFFFFFFFE00020204UL, x12);
   CHECK_EQUAL_64(0x0000000400040408UL, x13);
 
   TEARDOWN();
@@ -769,18 +765,18 @@
   SETUP();
 
   START();
-  __ Mov(x1, 0xf00000ff);
+  __ Mov(x1, 0xF00000FF);
   __ Ands(w0, w1, Operand(w1));
   END();
 
   RUN();
 
   CHECK_EQUAL_NZCV(NFlag);
-  CHECK_EQUAL_64(0xf00000ff, x0);
+  CHECK_EQUAL_64(0xF00000FF, x0);
 
   START();
-  __ Mov(x0, 0xfff0);
-  __ Mov(x1, 0xf00000ff);
+  __ Mov(x0, 0xFFF0);
+  __ Mov(x1, 0xF00000FF);
   __ Ands(w0, w0, Operand(w1, LSR, 4));
   END();
 
@@ -801,8 +797,8 @@
   CHECK_EQUAL_64(0x8000000000000000L, x0);
 
   START();
-  __ Mov(x0, 0xfff0);
-  __ Ands(w0, w0, Operand(0xf));
+  __ Mov(x0, 0xFFF0);
+  __ Ands(w0, w0, Operand(0xF));
   END();
 
   RUN();
@@ -811,7 +807,7 @@
   CHECK_EQUAL_64(0x00000000, x0);
 
   START();
-  __ Mov(x0, 0xff000000);
+  __ Mov(x0, 0xFF000000);
   __ Ands(w0, w0, Operand(0x80000000));
   END();
 
@@ -829,8 +825,8 @@
   SETUP();
 
   START();
-  __ Mov(x0, 0xfff0);
-  __ Mov(x1, 0xf00000ff);
+  __ Mov(x0, 0xFFF0);
+  __ Mov(x1, 0xF00000FF);
 
   __ Bic(x2, x0, Operand(x1));
   __ Bic(w3, w0, Operand(w1, LSL, 4));
@@ -840,34 +836,32 @@
   __ Bic(x7, x0, Operand(x1, ASR, 20));
   __ Bic(w8, w0, Operand(w1, ROR, 28));
   __ Bic(x9, x0, Operand(x1, ROR, 24));
-  __ Bic(x10, x0, Operand(0x1f));
+  __ Bic(x10, x0, Operand(0x1F));
   __ Bic(x11, x0, Operand(0x100));
 
   // Test bic into csp when the constant cannot be encoded in the immediate
   // field.
   // Use x20 to preserve csp. We check for the result via x21 because the
   // test infrastructure requires that csp be restored to its original value.
-  __ SetStackPointer(jssp);  // Change stack pointer to avoid consistency check.
   __ Mov(x20, csp);
-  __ Mov(x0, 0xffffff);
-  __ Bic(csp, x0, Operand(0xabcdef));
+  __ Mov(x0, 0xFFFFFF);
+  __ Bic(csp, x0, Operand(0xABCDEF));
   __ Mov(x21, csp);
   __ Mov(csp, x20);
-  __ SetStackPointer(csp);  // Restore stack pointer.
   END();
 
   RUN();
 
-  CHECK_EQUAL_64(0x0000ff00, x2);
-  CHECK_EQUAL_64(0x0000f000, x3);
-  CHECK_EQUAL_64(0x0000f000, x4);
-  CHECK_EQUAL_64(0x0000ff80, x5);
-  CHECK_EQUAL_64(0x000000f0, x6);
-  CHECK_EQUAL_64(0x0000f0f0, x7);
-  CHECK_EQUAL_64(0x0000f000, x8);
-  CHECK_EQUAL_64(0x0000ff00, x9);
-  CHECK_EQUAL_64(0x0000ffe0, x10);
-  CHECK_EQUAL_64(0x0000fef0, x11);
+  CHECK_EQUAL_64(0x0000FF00, x2);
+  CHECK_EQUAL_64(0x0000F000, x3);
+  CHECK_EQUAL_64(0x0000F000, x4);
+  CHECK_EQUAL_64(0x0000FF80, x5);
+  CHECK_EQUAL_64(0x000000F0, x6);
+  CHECK_EQUAL_64(0x0000F0F0, x7);
+  CHECK_EQUAL_64(0x0000F000, x8);
+  CHECK_EQUAL_64(0x0000FF00, x9);
+  CHECK_EQUAL_64(0x0000FFE0, x10);
+  CHECK_EQUAL_64(0x0000FEF0, x11);
 
   CHECK_EQUAL_64(0x543210, x21);
 
@@ -880,7 +874,7 @@
   SETUP();
 
   START();
-  __ Mov(x0, 0xffffffffffffffffUL);
+  __ Mov(x0, 0xFFFFFFFFFFFFFFFFUL);
   __ Mov(x1, 0x8000000080008081UL);
   __ Bic(w6, w0, Operand(w1, UXTB));
   __ Bic(x7, x0, Operand(x1, UXTH, 1));
@@ -894,14 +888,14 @@
 
   RUN();
 
-  CHECK_EQUAL_64(0xffffff7e, x6);
-  CHECK_EQUAL_64(0xfffffffffffefefdUL, x7);
-  CHECK_EQUAL_64(0xfffdfdfb, x8);
-  CHECK_EQUAL_64(0xfffffffbfffbfbf7UL, x9);
-  CHECK_EQUAL_64(0x0000007e, x10);
-  CHECK_EQUAL_64(0x0000fefd, x11);
-  CHECK_EQUAL_64(0x00000001fffdfdfbUL, x12);
-  CHECK_EQUAL_64(0xfffffffbfffbfbf7UL, x13);
+  CHECK_EQUAL_64(0xFFFFFF7E, x6);
+  CHECK_EQUAL_64(0xFFFFFFFFFFFEFEFDUL, x7);
+  CHECK_EQUAL_64(0xFFFDFDFB, x8);
+  CHECK_EQUAL_64(0xFFFFFFFBFFFBFBF7UL, x9);
+  CHECK_EQUAL_64(0x0000007E, x10);
+  CHECK_EQUAL_64(0x0000FEFD, x11);
+  CHECK_EQUAL_64(0x00000001FFFDFDFBUL, x12);
+  CHECK_EQUAL_64(0xFFFFFFFBFFFBFBF7UL, x13);
 
   TEARDOWN();
 }
@@ -912,7 +906,7 @@
   SETUP();
 
   START();
-  __ Mov(x1, 0xffff);
+  __ Mov(x1, 0xFFFF);
   __ Bics(w0, w1, Operand(w1));
   END();
 
@@ -922,7 +916,7 @@
   CHECK_EQUAL_64(0x00000000, x0);
 
   START();
-  __ Mov(x0, 0xffffffff);
+  __ Mov(x0, 0xFFFFFFFF);
   __ Bics(w0, w0, Operand(w0, LSR, 1));
   END();
 
@@ -943,8 +937,8 @@
   CHECK_EQUAL_64(0x00000000, x0);
 
   START();
-  __ Mov(x0, 0xffffffffffffffffL);
-  __ Bics(x0, x0, Operand(0x7fffffffffffffffL));
+  __ Mov(x0, 0xFFFFFFFFFFFFFFFFL);
+  __ Bics(x0, x0, Operand(0x7FFFFFFFFFFFFFFFL));
   END();
 
   RUN();
@@ -953,8 +947,8 @@
   CHECK_EQUAL_64(0x8000000000000000L, x0);
 
   START();
-  __ Mov(w0, 0xffff0000);
-  __ Bics(w0, w0, Operand(0xfffffff0));
+  __ Mov(w0, 0xFFFF0000);
+  __ Bics(w0, w0, Operand(0xFFFFFFF0));
   END();
 
   RUN();
@@ -971,8 +965,8 @@
   SETUP();
 
   START();
-  __ Mov(x0, 0xfff0);
-  __ Mov(x1, 0xf00000ff);
+  __ Mov(x0, 0xFFF0);
+  __ Mov(x1, 0xF00000FF);
 
   __ Eor(x2, x0, Operand(x1));
   __ Eor(w3, w0, Operand(w1, LSL, 4));
@@ -982,22 +976,22 @@
   __ Eor(x7, x0, Operand(x1, ASR, 20));
   __ Eor(w8, w0, Operand(w1, ROR, 28));
   __ Eor(x9, x0, Operand(x1, ROR, 28));
-  __ Eor(w10, w0, Operand(0xff00ff00));
-  __ Eor(x11, x0, Operand(0xff00ff00ff00ff00L));
+  __ Eor(w10, w0, Operand(0xFF00FF00));
+  __ Eor(x11, x0, Operand(0xFF00FF00FF00FF00L));
   END();
 
   RUN();
 
-  CHECK_EQUAL_64(0xf000ff0f, x2);
-  CHECK_EQUAL_64(0x0000f000, x3);
-  CHECK_EQUAL_64(0x0000000f0000f000L, x4);
-  CHECK_EQUAL_64(0x7800ff8f, x5);
-  CHECK_EQUAL_64(0xffff00f0, x6);
-  CHECK_EQUAL_64(0x0000f0f0, x7);
-  CHECK_EQUAL_64(0x0000f00f, x8);
-  CHECK_EQUAL_64(0x00000ff00000ffffL, x9);
-  CHECK_EQUAL_64(0xff0000f0, x10);
-  CHECK_EQUAL_64(0xff00ff00ff0000f0L, x11);
+  CHECK_EQUAL_64(0xF000FF0F, x2);
+  CHECK_EQUAL_64(0x0000F000, x3);
+  CHECK_EQUAL_64(0x0000000F0000F000L, x4);
+  CHECK_EQUAL_64(0x7800FF8F, x5);
+  CHECK_EQUAL_64(0xFFFF00F0, x6);
+  CHECK_EQUAL_64(0x0000F0F0, x7);
+  CHECK_EQUAL_64(0x0000F00F, x8);
+  CHECK_EQUAL_64(0x00000FF00000FFFFL, x9);
+  CHECK_EQUAL_64(0xFF0000F0, x10);
+  CHECK_EQUAL_64(0xFF00FF00FF0000F0L, x11);
 
   TEARDOWN();
 }
@@ -1026,9 +1020,9 @@
   CHECK_EQUAL_64(0x1111111111101013UL, x7);
   CHECK_EQUAL_64(0x11131315, x8);
   CHECK_EQUAL_64(0x1111111511151519UL, x9);
-  CHECK_EQUAL_64(0xeeeeee90, x10);
-  CHECK_EQUAL_64(0xeeeeeeeeeeee1013UL, x11);
-  CHECK_EQUAL_64(0xeeeeeeef11131315UL, x12);
+  CHECK_EQUAL_64(0xEEEEEE90, x10);
+  CHECK_EQUAL_64(0xEEEEEEEEEEEE1013UL, x11);
+  CHECK_EQUAL_64(0xEEEEEEEF11131315UL, x12);
   CHECK_EQUAL_64(0x1111111511151519UL, x13);
 
   TEARDOWN();
@@ -1040,8 +1034,8 @@
   SETUP();
 
   START();
-  __ Mov(x0, 0xfff0);
-  __ Mov(x1, 0xf00000ff);
+  __ Mov(x0, 0xFFF0);
+  __ Mov(x1, 0xF00000FF);
 
   __ Eon(x2, x0, Operand(x1));
   __ Eon(w3, w0, Operand(w1, LSL, 4));
@@ -1051,22 +1045,22 @@
   __ Eon(x7, x0, Operand(x1, ASR, 20));
   __ Eon(w8, w0, Operand(w1, ROR, 28));
   __ Eon(x9, x0, Operand(x1, ROR, 28));
-  __ Eon(w10, w0, Operand(0x03c003c0));
+  __ Eon(w10, w0, Operand(0x03C003C0));
   __ Eon(x11, x0, Operand(0x0000100000001000L));
   END();
 
   RUN();
 
-  CHECK_EQUAL_64(0xffffffff0fff00f0L, x2);
-  CHECK_EQUAL_64(0xffff0fff, x3);
-  CHECK_EQUAL_64(0xfffffff0ffff0fffL, x4);
-  CHECK_EQUAL_64(0xffffffff87ff0070L, x5);
-  CHECK_EQUAL_64(0x0000ff0f, x6);
-  CHECK_EQUAL_64(0xffffffffffff0f0fL, x7);
-  CHECK_EQUAL_64(0xffff0ff0, x8);
-  CHECK_EQUAL_64(0xfffff00fffff0000L, x9);
-  CHECK_EQUAL_64(0xfc3f03cf, x10);
-  CHECK_EQUAL_64(0xffffefffffff100fL, x11);
+  CHECK_EQUAL_64(0xFFFFFFFF0FFF00F0L, x2);
+  CHECK_EQUAL_64(0xFFFF0FFF, x3);
+  CHECK_EQUAL_64(0xFFFFFFF0FFFF0FFFL, x4);
+  CHECK_EQUAL_64(0xFFFFFFFF87FF0070L, x5);
+  CHECK_EQUAL_64(0x0000FF0F, x6);
+  CHECK_EQUAL_64(0xFFFFFFFFFFFF0F0FL, x7);
+  CHECK_EQUAL_64(0xFFFF0FF0, x8);
+  CHECK_EQUAL_64(0xFFFFF00FFFFF0000L, x9);
+  CHECK_EQUAL_64(0xFC3F03CF, x10);
+  CHECK_EQUAL_64(0xFFFFEFFFFFFF100FL, x11);
 
   TEARDOWN();
 }
@@ -1091,14 +1085,14 @@
 
   RUN();
 
-  CHECK_EQUAL_64(0xeeeeee6f, x6);
-  CHECK_EQUAL_64(0xeeeeeeeeeeefefecUL, x7);
-  CHECK_EQUAL_64(0xeeececea, x8);
-  CHECK_EQUAL_64(0xeeeeeeeaeeeaeae6UL, x9);
-  CHECK_EQUAL_64(0x1111116f, x10);
-  CHECK_EQUAL_64(0x111111111111efecUL, x11);
-  CHECK_EQUAL_64(0x11111110eeececeaUL, x12);
-  CHECK_EQUAL_64(0xeeeeeeeaeeeaeae6UL, x13);
+  CHECK_EQUAL_64(0xEEEEEE6F, x6);
+  CHECK_EQUAL_64(0xEEEEEEEEEEEFEFECUL, x7);
+  CHECK_EQUAL_64(0xEEECECEA, x8);
+  CHECK_EQUAL_64(0xEEEEEEEAEEEAEAE6UL, x9);
+  CHECK_EQUAL_64(0x1111116F, x10);
+  CHECK_EQUAL_64(0x111111111111EFECUL, x11);
+  CHECK_EQUAL_64(0x11111110EEECECEAUL, x12);
+  CHECK_EQUAL_64(0xEEEEEEEAEEEAEAE6UL, x13);
 
   TEARDOWN();
 }
@@ -1111,8 +1105,8 @@
   START();
   __ Mov(x16, 0);
   __ Mov(x17, 1);
-  __ Mov(x18, 0xffffffff);
-  __ Mov(x19, 0xffffffffffffffffUL);
+  __ Mov(x18, 0xFFFFFFFF);
+  __ Mov(x19, 0xFFFFFFFFFFFFFFFFUL);
 
   __ Mul(w0, w16, w16);
   __ Mul(w1, w16, w17);
@@ -1139,23 +1133,23 @@
 
   CHECK_EQUAL_64(0, x0);
   CHECK_EQUAL_64(0, x1);
-  CHECK_EQUAL_64(0xffffffff, x2);
+  CHECK_EQUAL_64(0xFFFFFFFF, x2);
   CHECK_EQUAL_64(1, x3);
   CHECK_EQUAL_64(0, x4);
-  CHECK_EQUAL_64(0xffffffff, x5);
-  CHECK_EQUAL_64(0xffffffff00000001UL, x6);
+  CHECK_EQUAL_64(0xFFFFFFFF, x5);
+  CHECK_EQUAL_64(0xFFFFFFFF00000001UL, x6);
   CHECK_EQUAL_64(1, x7);
-  CHECK_EQUAL_64(0xffffffffffffffffUL, x8);
+  CHECK_EQUAL_64(0xFFFFFFFFFFFFFFFFUL, x8);
   CHECK_EQUAL_64(1, x9);
   CHECK_EQUAL_64(1, x10);
   CHECK_EQUAL_64(0, x11);
   CHECK_EQUAL_64(0, x12);
   CHECK_EQUAL_64(1, x13);
-  CHECK_EQUAL_64(0xffffffff, x14);
+  CHECK_EQUAL_64(0xFFFFFFFF, x14);
   CHECK_EQUAL_64(0, x20);
-  CHECK_EQUAL_64(0xffffffff00000001UL, x21);
-  CHECK_EQUAL_64(0xffffffff, x22);
-  CHECK_EQUAL_64(0xffffffffffffffffUL, x23);
+  CHECK_EQUAL_64(0xFFFFFFFF00000001UL, x21);
+  CHECK_EQUAL_64(0xFFFFFFFF, x22);
+  CHECK_EQUAL_64(0xFFFFFFFFFFFFFFFFUL, x23);
 
   TEARDOWN();
 }
@@ -1180,7 +1174,7 @@
   SmullHelper(1, 1, 1);
   SmullHelper(-1, -1, 1);
   SmullHelper(1, -1, -1);
-  SmullHelper(0xffffffff80000000, 0x80000000, 1);
+  SmullHelper(0xFFFFFFFF80000000, 0x80000000, 1);
   SmullHelper(0x0000000080000000, 0x00010000, 0x00008000);
 }
 
@@ -1192,8 +1186,8 @@
   START();
   __ Mov(x16, 0);
   __ Mov(x17, 1);
-  __ Mov(x18, 0xffffffff);
-  __ Mov(x19, 0xffffffffffffffffUL);
+  __ Mov(x18, 0xFFFFFFFF);
+  __ Mov(x19, 0xFFFFFFFFFFFFFFFFUL);
 
   __ Madd(w0, w16, w16, w16);
   __ Madd(w1, w16, w16, w17);
@@ -1227,27 +1221,27 @@
 
   CHECK_EQUAL_64(0, x0);
   CHECK_EQUAL_64(1, x1);
-  CHECK_EQUAL_64(0xffffffff, x2);
-  CHECK_EQUAL_64(0xffffffff, x3);
+  CHECK_EQUAL_64(0xFFFFFFFF, x2);
+  CHECK_EQUAL_64(0xFFFFFFFF, x3);
   CHECK_EQUAL_64(1, x4);
   CHECK_EQUAL_64(0, x5);
   CHECK_EQUAL_64(0, x6);
-  CHECK_EQUAL_64(0xffffffff, x7);
-  CHECK_EQUAL_64(0xfffffffe, x8);
+  CHECK_EQUAL_64(0xFFFFFFFF, x7);
+  CHECK_EQUAL_64(0xFFFFFFFE, x8);
   CHECK_EQUAL_64(2, x9);
   CHECK_EQUAL_64(0, x10);
   CHECK_EQUAL_64(0, x11);
 
   CHECK_EQUAL_64(0, x12);
   CHECK_EQUAL_64(1, x13);
-  CHECK_EQUAL_64(0xffffffff, x14);
-  CHECK_EQUAL_64(0xffffffffffffffff, x15);
+  CHECK_EQUAL_64(0xFFFFFFFF, x14);
+  CHECK_EQUAL_64(0xFFFFFFFFFFFFFFFF, x15);
   CHECK_EQUAL_64(1, x20);
   CHECK_EQUAL_64(0x100000000UL, x21);
   CHECK_EQUAL_64(0, x22);
-  CHECK_EQUAL_64(0xffffffff, x23);
-  CHECK_EQUAL_64(0x1fffffffe, x24);
-  CHECK_EQUAL_64(0xfffffffe00000002UL, x25);
+  CHECK_EQUAL_64(0xFFFFFFFF, x23);
+  CHECK_EQUAL_64(0x1FFFFFFFE, x24);
+  CHECK_EQUAL_64(0xFFFFFFFE00000002UL, x25);
   CHECK_EQUAL_64(0, x26);
   CHECK_EQUAL_64(0, x27);
 
@@ -1262,8 +1256,8 @@
   START();
   __ Mov(x16, 0);
   __ Mov(x17, 1);
-  __ Mov(x18, 0xffffffff);
-  __ Mov(x19, 0xffffffffffffffffUL);
+  __ Mov(x18, 0xFFFFFFFF);
+  __ Mov(x19, 0xFFFFFFFFFFFFFFFFUL);
 
   __ Msub(w0, w16, w16, w16);
   __ Msub(w1, w16, w16, w17);
@@ -1297,29 +1291,29 @@
 
   CHECK_EQUAL_64(0, x0);
   CHECK_EQUAL_64(1, x1);
-  CHECK_EQUAL_64(0xffffffff, x2);
-  CHECK_EQUAL_64(0xffffffff, x3);
+  CHECK_EQUAL_64(0xFFFFFFFF, x2);
+  CHECK_EQUAL_64(0xFFFFFFFF, x3);
   CHECK_EQUAL_64(1, x4);
-  CHECK_EQUAL_64(0xfffffffe, x5);
-  CHECK_EQUAL_64(0xfffffffe, x6);
+  CHECK_EQUAL_64(0xFFFFFFFE, x5);
+  CHECK_EQUAL_64(0xFFFFFFFE, x6);
   CHECK_EQUAL_64(1, x7);
   CHECK_EQUAL_64(0, x8);
   CHECK_EQUAL_64(0, x9);
-  CHECK_EQUAL_64(0xfffffffe, x10);
-  CHECK_EQUAL_64(0xfffffffe, x11);
+  CHECK_EQUAL_64(0xFFFFFFFE, x10);
+  CHECK_EQUAL_64(0xFFFFFFFE, x11);
 
   CHECK_EQUAL_64(0, x12);
   CHECK_EQUAL_64(1, x13);
-  CHECK_EQUAL_64(0xffffffff, x14);
-  CHECK_EQUAL_64(0xffffffffffffffffUL, x15);
+  CHECK_EQUAL_64(0xFFFFFFFF, x14);
+  CHECK_EQUAL_64(0xFFFFFFFFFFFFFFFFUL, x15);
   CHECK_EQUAL_64(1, x20);
-  CHECK_EQUAL_64(0xfffffffeUL, x21);
-  CHECK_EQUAL_64(0xfffffffffffffffeUL, x22);
-  CHECK_EQUAL_64(0xffffffff00000001UL, x23);
+  CHECK_EQUAL_64(0xFFFFFFFEUL, x21);
+  CHECK_EQUAL_64(0xFFFFFFFFFFFFFFFEUL, x22);
+  CHECK_EQUAL_64(0xFFFFFFFF00000001UL, x23);
   CHECK_EQUAL_64(0, x24);
   CHECK_EQUAL_64(0x200000000UL, x25);
-  CHECK_EQUAL_64(0x1fffffffeUL, x26);
-  CHECK_EQUAL_64(0xfffffffffffffffeUL, x27);
+  CHECK_EQUAL_64(0x1FFFFFFFEUL, x26);
+  CHECK_EQUAL_64(0xFFFFFFFFFFFFFFFEUL, x27);
 
   TEARDOWN();
 }
@@ -1334,12 +1328,12 @@
   __ Mov(x21, 1);
   __ Mov(x22, 0x0000000100000000L);
   __ Mov(x23, 0x12345678);
-  __ Mov(x24, 0x0123456789abcdefL);
+  __ Mov(x24, 0x0123456789ABCDEFL);
   __ Mov(x25, 0x0000000200000000L);
   __ Mov(x26, 0x8000000000000000UL);
-  __ Mov(x27, 0xffffffffffffffffUL);
+  __ Mov(x27, 0xFFFFFFFFFFFFFFFFUL);
   __ Mov(x28, 0x5555555555555555UL);
-  __ Mov(x29, 0xaaaaaaaaaaaaaaaaUL);
+  __ Mov(x29, 0xAAAAAAAAAAAAAAAAUL);
 
   __ Smulh(x0, x20, x24);
   __ Smulh(x1, x21, x24);
@@ -1361,14 +1355,14 @@
   CHECK_EQUAL_64(0, x1);
   CHECK_EQUAL_64(0, x2);
   CHECK_EQUAL_64(0x01234567, x3);
-  CHECK_EQUAL_64(0x02468acf, x4);
-  CHECK_EQUAL_64(0xffffffffffffffffUL, x5);
+  CHECK_EQUAL_64(0x02468ACF, x4);
+  CHECK_EQUAL_64(0xFFFFFFFFFFFFFFFFUL, x5);
   CHECK_EQUAL_64(0x4000000000000000UL, x6);
   CHECK_EQUAL_64(0, x7);
   CHECK_EQUAL_64(0, x8);
-  CHECK_EQUAL_64(0x1c71c71c71c71c71UL, x9);
-  CHECK_EQUAL_64(0xe38e38e38e38e38eUL, x10);
-  CHECK_EQUAL_64(0x1c71c71c71c71c72UL, x11);
+  CHECK_EQUAL_64(0x1C71C71C71C71C71UL, x9);
+  CHECK_EQUAL_64(0xE38E38E38E38E38EUL, x10);
+  CHECK_EQUAL_64(0x1C71C71C71C71C72UL, x11);
 
   TEARDOWN();
 }
@@ -1380,8 +1374,8 @@
 
   START();
   __ Mov(x17, 1);
-  __ Mov(x18, 0xffffffff);
-  __ Mov(x19, 0xffffffffffffffffUL);
+  __ Mov(x18, 0xFFFFFFFF);
+  __ Mov(x19, 0xFFFFFFFFFFFFFFFFUL);
   __ Mov(x20, 4);
   __ Mov(x21, 0x200000000UL);
 
@@ -1402,8 +1396,8 @@
   CHECK_EQUAL_64(5, x11);
   CHECK_EQUAL_64(0x200000001UL, x12);
   CHECK_EQUAL_64(0x100000003UL, x13);
-  CHECK_EQUAL_64(0xfffffffe00000005UL, x14);
-  CHECK_EQUAL_64(0xfffffffe00000005UL, x15);
+  CHECK_EQUAL_64(0xFFFFFFFE00000005UL, x14);
+  CHECK_EQUAL_64(0xFFFFFFFE00000005UL, x15);
   CHECK_EQUAL_64(0x1, x22);
 
   TEARDOWN();
@@ -1416,8 +1410,8 @@
 
   START();
   __ Mov(x17, 1);
-  __ Mov(x18, 0xffffffff);
-  __ Mov(x19, 0xffffffffffffffffUL);
+  __ Mov(x18, 0xFFFFFFFF);
+  __ Mov(x19, 0xFFFFFFFFFFFFFFFFUL);
   __ Mov(x20, 4);
   __ Mov(x21, 0x200000000UL);
 
@@ -1436,11 +1430,11 @@
   CHECK_EQUAL_64(5, x9);
   CHECK_EQUAL_64(3, x10);
   CHECK_EQUAL_64(3, x11);
-  CHECK_EQUAL_64(0x1ffffffffUL, x12);
-  CHECK_EQUAL_64(0xffffffff00000005UL, x13);
+  CHECK_EQUAL_64(0x1FFFFFFFFUL, x12);
+  CHECK_EQUAL_64(0xFFFFFFFF00000005UL, x13);
   CHECK_EQUAL_64(0x200000003UL, x14);
   CHECK_EQUAL_64(0x200000003UL, x15);
-  CHECK_EQUAL_64(0x3ffffffffUL, x22);
+  CHECK_EQUAL_64(0x3FFFFFFFFUL, x22);
 
   TEARDOWN();
 }
@@ -1452,8 +1446,8 @@
 
   START();
   __ Mov(x16, 1);
-  __ Mov(x17, 0xffffffff);
-  __ Mov(x18, 0xffffffffffffffffUL);
+  __ Mov(x17, 0xFFFFFFFF);
+  __ Mov(x18, 0xFFFFFFFFFFFFFFFFUL);
   __ Mov(x19, 0x80000000);
   __ Mov(x20, 0x8000000000000000UL);
   __ Mov(x21, 2);
@@ -1497,15 +1491,15 @@
   RUN();
 
   CHECK_EQUAL_64(1, x0);
-  CHECK_EQUAL_64(0xffffffff, x1);
+  CHECK_EQUAL_64(0xFFFFFFFF, x1);
   CHECK_EQUAL_64(1, x2);
-  CHECK_EQUAL_64(0xffffffff, x3);
+  CHECK_EQUAL_64(0xFFFFFFFF, x3);
   CHECK_EQUAL_64(1, x4);
   CHECK_EQUAL_64(1, x5);
   CHECK_EQUAL_64(0, x6);
   CHECK_EQUAL_64(1, x7);
   CHECK_EQUAL_64(0, x8);
-  CHECK_EQUAL_64(0xffffffff00000001UL, x9);
+  CHECK_EQUAL_64(0xFFFFFFFF00000001UL, x9);
   CHECK_EQUAL_64(0x40000000, x10);
   CHECK_EQUAL_64(0xC0000000, x11);
   CHECK_EQUAL_64(0x40000000, x12);
@@ -1518,7 +1512,7 @@
   CHECK_EQUAL_64(0x8000000000000000UL, x25);
   CHECK_EQUAL_64(0, x26);
   CHECK_EQUAL_64(0, x27);
-  CHECK_EQUAL_64(0x7fffffffffffffffUL, x28);
+  CHECK_EQUAL_64(0x7FFFFFFFFFFFFFFFUL, x28);
   CHECK_EQUAL_64(0, x29);
   CHECK_EQUAL_64(0, x18);
   CHECK_EQUAL_64(0, x19);
@@ -1534,7 +1528,7 @@
   SETUP();
 
   START();
-  __ Mov(x24, 0xfedcba9876543210UL);
+  __ Mov(x24, 0xFEDCBA9876543210UL);
   __ Rbit(w0, w24);
   __ Rbit(x1, x24);
   __ Rev16(w2, w24);
@@ -1546,13 +1540,13 @@
 
   RUN();
 
-  CHECK_EQUAL_64(0x084c2a6e, x0);
-  CHECK_EQUAL_64(0x084c2a6e195d3b7fUL, x1);
+  CHECK_EQUAL_64(0x084C2A6E, x0);
+  CHECK_EQUAL_64(0x084C2A6E195D3B7FUL, x1);
   CHECK_EQUAL_64(0x54761032, x2);
-  CHECK_EQUAL_64(0xdcfe98ba54761032UL, x3);
+  CHECK_EQUAL_64(0xDCFE98BA54761032UL, x3);
   CHECK_EQUAL_64(0x10325476, x4);
-  CHECK_EQUAL_64(0x98badcfe10325476UL, x5);
-  CHECK_EQUAL_64(0x1032547698badcfeUL, x6);
+  CHECK_EQUAL_64(0x98BADCFE10325476UL, x5);
+  CHECK_EQUAL_64(0x1032547698BADCFEUL, x6);
 
   TEARDOWN();
 }
@@ -1564,7 +1558,7 @@
 
   START();
   __ Mov(x24, 0x0008000000800000UL);
-  __ Mov(x25, 0xff800000fff80000UL);
+  __ Mov(x25, 0xFF800000FFF80000UL);
   __ Mov(x26, 0);
   __ Clz(w0, w24);
   __ Clz(x1, x24);
@@ -1775,7 +1769,7 @@
 
   RUN();
 
-  CHECK_EQUAL_64(0xf, x0);
+  CHECK_EQUAL_64(0xF, x0);
 
   TEARDOWN();
 }
@@ -1962,7 +1956,7 @@
   __ Mov(x3, 1);
   __ Bind(&nzf_end);
 
-  __ Mov(x18, 0xffffffff00000000UL);
+  __ Mov(x18, 0xFFFFFFFF00000000UL);
 
   Label a, a_end;
   __ Cbz(w18, &a);
@@ -2002,7 +1996,7 @@
   __ Mov(x1, 0);
   __ Mov(x2, 0);
   __ Mov(x3, 0);
-  __ Mov(x16, 0xaaaaaaaaaaaaaaaaUL);
+  __ Mov(x16, 0xAAAAAAAAAAAAAAAAUL);
 
   Label bz, bz_end;
   __ Tbz(w16, 0, &bz);
@@ -2434,7 +2428,7 @@
   INIT_V8();
   SETUP();
 
-  uint64_t src[2] = {0xfedcba9876543210UL, 0x0123456789abcdefUL};
+  uint64_t src[2] = {0xFEDCBA9876543210UL, 0x0123456789ABCDEFUL};
   uint64_t dst[5] = {0, 0, 0, 0, 0};
   uintptr_t src_base = reinterpret_cast<uintptr_t>(src);
   uintptr_t dst_base = reinterpret_cast<uintptr_t>(dst);
@@ -2458,10 +2452,10 @@
 
   CHECK_EQUAL_64(0x76543210, x0);
   CHECK_EQUAL_64(0x76543210, dst[0]);
-  CHECK_EQUAL_64(0xfedcba98, x1);
-  CHECK_EQUAL_64(0xfedcba9800000000UL, dst[1]);
-  CHECK_EQUAL_64(0x0123456789abcdefUL, x2);
-  CHECK_EQUAL_64(0x0123456789abcdefUL, dst[2]);
+  CHECK_EQUAL_64(0xFEDCBA98, x1);
+  CHECK_EQUAL_64(0xFEDCBA9800000000UL, dst[1]);
+  CHECK_EQUAL_64(0x0123456789ABCDEFUL, x2);
+  CHECK_EQUAL_64(0x0123456789ABCDEFUL, dst[2]);
   CHECK_EQUAL_64(0x32, x3);
   CHECK_EQUAL_64(0x3200, dst[3]);
   CHECK_EQUAL_64(0x7654, x4);
@@ -2481,8 +2475,8 @@
   uint32_t dst[8192];
   uintptr_t src_base = reinterpret_cast<uintptr_t>(src);
   uintptr_t dst_base = reinterpret_cast<uintptr_t>(dst);
-  memset(src, 0xaa, 8192 * sizeof(src[0]));
-  memset(dst, 0xaa, 8192 * sizeof(dst[0]));
+  memset(src, 0xAA, 8192 * sizeof(src[0]));
+  memset(dst, 0xAA, 8192 * sizeof(dst[0]));
   src[0] = 0;
   src[6144] = 6144;
   src[8191] = 8191;
@@ -2525,7 +2519,7 @@
   INIT_V8();
   SETUP();
 
-  uint64_t src[2] = {0xfedcba9876543210UL, 0x0123456789abcdefUL};
+  uint64_t src[2] = {0xFEDCBA9876543210UL, 0x0123456789ABCDEFUL};
   uint64_t dst[6] = {0, 0, 0, 0, 0, 0};
   uintptr_t src_base = reinterpret_cast<uintptr_t>(src);
   uintptr_t dst_base = reinterpret_cast<uintptr_t>(dst);
@@ -2555,10 +2549,10 @@
 
   RUN();
 
-  CHECK_EQUAL_64(0xfedcba98, x0);
-  CHECK_EQUAL_64(0xfedcba9800000000UL, dst[1]);
-  CHECK_EQUAL_64(0x0123456789abcdefUL, x1);
-  CHECK_EQUAL_64(0x0123456789abcdefUL, dst[2]);
+  CHECK_EQUAL_64(0xFEDCBA98, x0);
+  CHECK_EQUAL_64(0xFEDCBA9800000000UL, dst[1]);
+  CHECK_EQUAL_64(0x0123456789ABCDEFUL, x1);
+  CHECK_EQUAL_64(0x0123456789ABCDEFUL, dst[2]);
   CHECK_EQUAL_64(0x01234567, x2);
   CHECK_EQUAL_64(0x0123456700000000UL, dst[4]);
   CHECK_EQUAL_64(0x32, x3);
@@ -2583,7 +2577,7 @@
   INIT_V8();
   SETUP();
 
-  uint64_t src[2] = {0xfedcba9876543210UL, 0x0123456789abcdefUL};
+  uint64_t src[2] = {0xFEDCBA9876543210UL, 0x0123456789ABCDEFUL};
   uint64_t dst[6] = {0, 0, 0, 0, 0, 0};
   uintptr_t src_base = reinterpret_cast<uintptr_t>(src);
   uintptr_t dst_base = reinterpret_cast<uintptr_t>(dst);
@@ -2613,12 +2607,12 @@
 
   RUN();
 
-  CHECK_EQUAL_64(0xfedcba98, x0);
-  CHECK_EQUAL_64(0xfedcba9800000000UL, dst[1]);
-  CHECK_EQUAL_64(0x0123456789abcdefUL, x1);
-  CHECK_EQUAL_64(0x0123456789abcdefUL, dst[2]);
-  CHECK_EQUAL_64(0x0123456789abcdefUL, x2);
-  CHECK_EQUAL_64(0x0123456789abcdefUL, dst[4]);
+  CHECK_EQUAL_64(0xFEDCBA98, x0);
+  CHECK_EQUAL_64(0xFEDCBA9800000000UL, dst[1]);
+  CHECK_EQUAL_64(0x0123456789ABCDEFUL, x1);
+  CHECK_EQUAL_64(0x0123456789ABCDEFUL, dst[2]);
+  CHECK_EQUAL_64(0x0123456789ABCDEFUL, x2);
+  CHECK_EQUAL_64(0x0123456789ABCDEFUL, dst[4]);
   CHECK_EQUAL_64(0x32, x3);
   CHECK_EQUAL_64(0x3200, dst[3]);
   CHECK_EQUAL_64(0x9876, x4);
@@ -2641,7 +2635,7 @@
   INIT_V8();
   SETUP();
 
-  uint32_t src[2] = {0x80008080, 0x7fff7f7f};
+  uint32_t src[2] = {0x80008080, 0x7FFF7F7F};
   uintptr_t src_base = reinterpret_cast<uintptr_t>(src);
 
   START();
@@ -2660,16 +2654,16 @@
 
   RUN();
 
-  CHECK_EQUAL_64(0xffffff80, x0);
-  CHECK_EQUAL_64(0x0000007f, x1);
-  CHECK_EQUAL_64(0xffff8080, x2);
-  CHECK_EQUAL_64(0x00007f7f, x3);
-  CHECK_EQUAL_64(0xffffffffffffff80UL, x4);
-  CHECK_EQUAL_64(0x000000000000007fUL, x5);
-  CHECK_EQUAL_64(0xffffffffffff8080UL, x6);
-  CHECK_EQUAL_64(0x0000000000007f7fUL, x7);
-  CHECK_EQUAL_64(0xffffffff80008080UL, x8);
-  CHECK_EQUAL_64(0x000000007fff7f7fUL, x9);
+  CHECK_EQUAL_64(0xFFFFFF80, x0);
+  CHECK_EQUAL_64(0x0000007F, x1);
+  CHECK_EQUAL_64(0xFFFF8080, x2);
+  CHECK_EQUAL_64(0x00007F7F, x3);
+  CHECK_EQUAL_64(0xFFFFFFFFFFFFFF80UL, x4);
+  CHECK_EQUAL_64(0x000000000000007FUL, x5);
+  CHECK_EQUAL_64(0xFFFFFFFFFFFF8080UL, x6);
+  CHECK_EQUAL_64(0x0000000000007F7FUL, x7);
+  CHECK_EQUAL_64(0xFFFFFFFF80008080UL, x8);
+  CHECK_EQUAL_64(0x000000007FFF7F7FUL, x9);
 
   TEARDOWN();
 }
@@ -2692,9 +2686,9 @@
   __ Mov(x24, 0);
   __ Mov(x25, 4);
   __ Mov(x26, -4);
-  __ Mov(x27, 0xfffffffc);  // 32-bit -4.
-  __ Mov(x28, 0xfffffffe);  // 32-bit -2.
-  __ Mov(x29, 0xffffffff);  // 32-bit -1.
+  __ Mov(x27, 0xFFFFFFFC);  // 32-bit -4.
+  __ Mov(x28, 0xFFFFFFFE);  // 32-bit -2.
+  __ Mov(x29, 0xFFFFFFFF);  // 32-bit -1.
 
   __ Ldr(w0, MemOperand(x16, x24));
   __ Ldr(x1, MemOperand(x16, x25));
@@ -2893,11 +2887,11 @@
   INIT_V8();
   SETUP();
 
-  uint8_t src[48] = {0x10, 0x32, 0x54, 0x76, 0x98, 0xba, 0xdc, 0xfe, 0x01, 0x23,
-                     0x45, 0x67, 0x89, 0xab, 0xcd, 0xef, 0x21, 0x43, 0x65, 0x87,
-                     0xa9, 0xcb, 0xed, 0x0f, 0x12, 0x34, 0x56, 0x78, 0x9a, 0xbc,
-                     0xde, 0xf0, 0x24, 0x46, 0x68, 0x8a, 0xac, 0xce, 0xe0, 0x02,
-                     0x42, 0x64, 0x86, 0xa8, 0xca, 0xec, 0x0e, 0x20};
+  uint8_t src[48] = {0x10, 0x32, 0x54, 0x76, 0x98, 0xBA, 0xDC, 0xFE, 0x01, 0x23,
+                     0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF, 0x21, 0x43, 0x65, 0x87,
+                     0xA9, 0xCB, 0xED, 0x0F, 0x12, 0x34, 0x56, 0x78, 0x9A, 0xBC,
+                     0xDE, 0xF0, 0x24, 0x46, 0x68, 0x8A, 0xAC, 0xCE, 0xE0, 0x02,
+                     0x42, 0x64, 0x86, 0xA8, 0xCA, 0xEC, 0x0E, 0x20};
 
   uint64_t dst[6] = {0, 0, 0, 0, 0, 0};
   uintptr_t src_base = reinterpret_cast<uintptr_t>(src);
@@ -2920,15 +2914,15 @@
 
   RUN();
 
-  CHECK_EQUAL_128(0xf0debc9a78563412, 0x0fedcba987654321, q0);
-  CHECK_EQUAL_64(0x0fedcba987654321, dst[0]);
-  CHECK_EQUAL_64(0xf0debc9a78563412, dst[1]);
-  CHECK_EQUAL_128(0xefcdab8967452301, 0xfedcba9876543210, q1);
-  CHECK_EQUAL_64(0xfedcba9876543210, dst[4]);
-  CHECK_EQUAL_64(0xefcdab8967452301, dst[5]);
-  CHECK_EQUAL_128(0x200eeccaa8866442, 0x02e0ceac8a684624, q2);
-  CHECK_EQUAL_64(0x02e0ceac8a684624, dst[2]);
-  CHECK_EQUAL_64(0x200eeccaa8866442, dst[3]);
+  CHECK_EQUAL_128(0xF0DEBC9A78563412, 0x0FEDCBA987654321, q0);
+  CHECK_EQUAL_64(0x0FEDCBA987654321, dst[0]);
+  CHECK_EQUAL_64(0xF0DEBC9A78563412, dst[1]);
+  CHECK_EQUAL_128(0xEFCDAB8967452301, 0xFEDCBA9876543210, q1);
+  CHECK_EQUAL_64(0xFEDCBA9876543210, dst[4]);
+  CHECK_EQUAL_64(0xEFCDAB8967452301, dst[5]);
+  CHECK_EQUAL_128(0x200EECCAA8866442, 0x02E0CEAC8A684624, q2);
+  CHECK_EQUAL_64(0x02E0CEAC8A684624, dst[2]);
+  CHECK_EQUAL_64(0x200EECCAA8866442, dst[3]);
   CHECK_EQUAL_64(src_base, x17);
   CHECK_EQUAL_64(dst_base + 16, x18);
   CHECK_EQUAL_64(src_base + 16, x19);
@@ -2969,22 +2963,22 @@
 
   CHECK_EQUAL_128(0, 0x0706050403020100, q2);
   CHECK_EQUAL_128(0, 0x0807060504030201, q3);
-  CHECK_EQUAL_128(0, 0x100f0e0d0c0b0a09, q4);
+  CHECK_EQUAL_128(0, 0x100F0E0D0C0B0A09, q4);
   CHECK_EQUAL_128(0, 0x0908070605040302, q5);
-  CHECK_EQUAL_128(0, 0x11100f0e0d0c0b0a, q6);
+  CHECK_EQUAL_128(0, 0x11100F0E0D0C0B0A, q6);
   CHECK_EQUAL_128(0, 0x1918171615141312, q7);
-  CHECK_EQUAL_128(0, 0x0a09080706050403, q16);
-  CHECK_EQUAL_128(0, 0x1211100f0e0d0c0b, q17);
-  CHECK_EQUAL_128(0, 0x1a19181716151413, q18);
-  CHECK_EQUAL_128(0, 0x2221201f1e1d1c1b, q19);
-  CHECK_EQUAL_128(0, 0x0b0a090807060504, q30);
-  CHECK_EQUAL_128(0, 0x131211100f0e0d0c, q31);
-  CHECK_EQUAL_128(0, 0x1b1a191817161514, q0);
-  CHECK_EQUAL_128(0, 0x232221201f1e1d1c, q1);
-  CHECK_EQUAL_128(0, 0x0c0b0a0908070605, q20);
-  CHECK_EQUAL_128(0, 0x14131211100f0e0d, q21);
-  CHECK_EQUAL_128(0, 0x1c1b1a1918171615, q22);
-  CHECK_EQUAL_128(0, 0x24232221201f1e1d, q23);
+  CHECK_EQUAL_128(0, 0x0A09080706050403, q16);
+  CHECK_EQUAL_128(0, 0x1211100F0E0D0C0B, q17);
+  CHECK_EQUAL_128(0, 0x1A19181716151413, q18);
+  CHECK_EQUAL_128(0, 0x2221201F1E1D1C1B, q19);
+  CHECK_EQUAL_128(0, 0x0B0A090807060504, q30);
+  CHECK_EQUAL_128(0, 0x131211100F0E0D0C, q31);
+  CHECK_EQUAL_128(0, 0x1B1A191817161514, q0);
+  CHECK_EQUAL_128(0, 0x232221201F1E1D1C, q1);
+  CHECK_EQUAL_128(0, 0x0C0B0A0908070605, q20);
+  CHECK_EQUAL_128(0, 0x14131211100F0E0D, q21);
+  CHECK_EQUAL_128(0, 0x1C1B1A1918171615, q22);
+  CHECK_EQUAL_128(0, 0x24232221201F1E1D, q23);
 
   TEARDOWN();
 }
@@ -3023,22 +3017,22 @@
 
   CHECK_EQUAL_128(0, 0x0706050403020100, q2);
   CHECK_EQUAL_128(0, 0x0807060504030201, q3);
-  CHECK_EQUAL_128(0, 0x100f0e0d0c0b0a09, q4);
+  CHECK_EQUAL_128(0, 0x100F0E0D0C0B0A09, q4);
   CHECK_EQUAL_128(0, 0x0908070605040302, q5);
-  CHECK_EQUAL_128(0, 0x11100f0e0d0c0b0a, q6);
+  CHECK_EQUAL_128(0, 0x11100F0E0D0C0B0A, q6);
   CHECK_EQUAL_128(0, 0x1918171615141312, q7);
-  CHECK_EQUAL_128(0, 0x0a09080706050403, q16);
-  CHECK_EQUAL_128(0, 0x1211100f0e0d0c0b, q17);
-  CHECK_EQUAL_128(0, 0x1a19181716151413, q18);
-  CHECK_EQUAL_128(0, 0x2221201f1e1d1c1b, q19);
-  CHECK_EQUAL_128(0, 0x0b0a090807060504, q30);
-  CHECK_EQUAL_128(0, 0x131211100f0e0d0c, q31);
-  CHECK_EQUAL_128(0, 0x1b1a191817161514, q0);
-  CHECK_EQUAL_128(0, 0x232221201f1e1d1c, q1);
-  CHECK_EQUAL_128(0, 0x0c0b0a0908070605, q20);
-  CHECK_EQUAL_128(0, 0x14131211100f0e0d, q21);
-  CHECK_EQUAL_128(0, 0x1c1b1a1918171615, q22);
-  CHECK_EQUAL_128(0, 0x24232221201f1e1d, q23);
+  CHECK_EQUAL_128(0, 0x0A09080706050403, q16);
+  CHECK_EQUAL_128(0, 0x1211100F0E0D0C0B, q17);
+  CHECK_EQUAL_128(0, 0x1A19181716151413, q18);
+  CHECK_EQUAL_128(0, 0x2221201F1E1D1C1B, q19);
+  CHECK_EQUAL_128(0, 0x0B0A090807060504, q30);
+  CHECK_EQUAL_128(0, 0x131211100F0E0D0C, q31);
+  CHECK_EQUAL_128(0, 0x1B1A191817161514, q0);
+  CHECK_EQUAL_128(0, 0x232221201F1E1D1C, q1);
+  CHECK_EQUAL_128(0, 0x0C0B0A0908070605, q20);
+  CHECK_EQUAL_128(0, 0x14131211100F0E0D, q21);
+  CHECK_EQUAL_128(0, 0x1C1B1A1918171615, q22);
+  CHECK_EQUAL_128(0, 0x24232221201F1E1D, q23);
   CHECK_EQUAL_64(src_base + 1, x17);
   CHECK_EQUAL_64(src_base + 1 + 16, x18);
   CHECK_EQUAL_64(src_base + 2 + 24, x19);
@@ -3074,20 +3068,20 @@
 
   RUN();
 
-  CHECK_EQUAL_128(0x0f0e0d0c0b0a0908, 0x0706050403020100, q2);
-  CHECK_EQUAL_128(0x100f0e0d0c0b0a09, 0x0807060504030201, q3);
-  CHECK_EQUAL_128(0x201f1e1d1c1b1a19, 0x1817161514131211, q4);
-  CHECK_EQUAL_128(0x11100f0e0d0c0b0a, 0x0908070605040302, q5);
-  CHECK_EQUAL_128(0x21201f1e1d1c1b1a, 0x1918171615141312, q6);
-  CHECK_EQUAL_128(0x31302f2e2d2c2b2a, 0x2928272625242322, q7);
-  CHECK_EQUAL_128(0x1211100f0e0d0c0b, 0x0a09080706050403, q16);
-  CHECK_EQUAL_128(0x2221201f1e1d1c1b, 0x1a19181716151413, q17);
-  CHECK_EQUAL_128(0x3231302f2e2d2c2b, 0x2a29282726252423, q18);
-  CHECK_EQUAL_128(0x4241403f3e3d3c3b, 0x3a39383736353433, q19);
-  CHECK_EQUAL_128(0x131211100f0e0d0c, 0x0b0a090807060504, q30);
-  CHECK_EQUAL_128(0x232221201f1e1d1c, 0x1b1a191817161514, q31);
-  CHECK_EQUAL_128(0x333231302f2e2d2c, 0x2b2a292827262524, q0);
-  CHECK_EQUAL_128(0x434241403f3e3d3c, 0x3b3a393837363534, q1);
+  CHECK_EQUAL_128(0x0F0E0D0C0B0A0908, 0x0706050403020100, q2);
+  CHECK_EQUAL_128(0x100F0E0D0C0B0A09, 0x0807060504030201, q3);
+  CHECK_EQUAL_128(0x201F1E1D1C1B1A19, 0x1817161514131211, q4);
+  CHECK_EQUAL_128(0x11100F0E0D0C0B0A, 0x0908070605040302, q5);
+  CHECK_EQUAL_128(0x21201F1E1D1C1B1A, 0x1918171615141312, q6);
+  CHECK_EQUAL_128(0x31302F2E2D2C2B2A, 0x2928272625242322, q7);
+  CHECK_EQUAL_128(0x1211100F0E0D0C0B, 0x0A09080706050403, q16);
+  CHECK_EQUAL_128(0x2221201F1E1D1C1B, 0x1A19181716151413, q17);
+  CHECK_EQUAL_128(0x3231302F2E2D2C2B, 0x2A29282726252423, q18);
+  CHECK_EQUAL_128(0x4241403F3E3D3C3B, 0x3A39383736353433, q19);
+  CHECK_EQUAL_128(0x131211100F0E0D0C, 0x0B0A090807060504, q30);
+  CHECK_EQUAL_128(0x232221201F1E1D1C, 0x1B1A191817161514, q31);
+  CHECK_EQUAL_128(0x333231302F2E2D2C, 0x2B2A292827262524, q0);
+  CHECK_EQUAL_128(0x434241403F3E3D3C, 0x3B3A393837363534, q1);
 
   TEARDOWN();
 }
@@ -3120,20 +3114,20 @@
 
   RUN();
 
-  CHECK_EQUAL_128(0x0f0e0d0c0b0a0908, 0x0706050403020100, q2);
-  CHECK_EQUAL_128(0x100f0e0d0c0b0a09, 0x0807060504030201, q3);
-  CHECK_EQUAL_128(0x201f1e1d1c1b1a19, 0x1817161514131211, q4);
-  CHECK_EQUAL_128(0x11100f0e0d0c0b0a, 0x0908070605040302, q5);
-  CHECK_EQUAL_128(0x21201f1e1d1c1b1a, 0x1918171615141312, q6);
-  CHECK_EQUAL_128(0x31302f2e2d2c2b2a, 0x2928272625242322, q7);
-  CHECK_EQUAL_128(0x1211100f0e0d0c0b, 0x0a09080706050403, q16);
-  CHECK_EQUAL_128(0x2221201f1e1d1c1b, 0x1a19181716151413, q17);
-  CHECK_EQUAL_128(0x3231302f2e2d2c2b, 0x2a29282726252423, q18);
-  CHECK_EQUAL_128(0x4241403f3e3d3c3b, 0x3a39383736353433, q19);
-  CHECK_EQUAL_128(0x131211100f0e0d0c, 0x0b0a090807060504, q30);
-  CHECK_EQUAL_128(0x232221201f1e1d1c, 0x1b1a191817161514, q31);
-  CHECK_EQUAL_128(0x333231302f2e2d2c, 0x2b2a292827262524, q0);
-  CHECK_EQUAL_128(0x434241403f3e3d3c, 0x3b3a393837363534, q1);
+  CHECK_EQUAL_128(0x0F0E0D0C0B0A0908, 0x0706050403020100, q2);
+  CHECK_EQUAL_128(0x100F0E0D0C0B0A09, 0x0807060504030201, q3);
+  CHECK_EQUAL_128(0x201F1E1D1C1B1A19, 0x1817161514131211, q4);
+  CHECK_EQUAL_128(0x11100F0E0D0C0B0A, 0x0908070605040302, q5);
+  CHECK_EQUAL_128(0x21201F1E1D1C1B1A, 0x1918171615141312, q6);
+  CHECK_EQUAL_128(0x31302F2E2D2C2B2A, 0x2928272625242322, q7);
+  CHECK_EQUAL_128(0x1211100F0E0D0C0B, 0x0A09080706050403, q16);
+  CHECK_EQUAL_128(0x2221201F1E1D1C1B, 0x1A19181716151413, q17);
+  CHECK_EQUAL_128(0x3231302F2E2D2C2B, 0x2A29282726252423, q18);
+  CHECK_EQUAL_128(0x4241403F3E3D3C3B, 0x3A39383736353433, q19);
+  CHECK_EQUAL_128(0x131211100F0E0D0C, 0x0B0A090807060504, q30);
+  CHECK_EQUAL_128(0x232221201F1E1D1C, 0x1B1A191817161514, q31);
+  CHECK_EQUAL_128(0x333231302F2E2D2C, 0x2B2A292827262524, q0);
+  CHECK_EQUAL_128(0x434241403F3E3D3C, 0x3B3A393837363534, q1);
   CHECK_EQUAL_64(src_base + 1, x17);
   CHECK_EQUAL_64(src_base + 1 + 32, x18);
   CHECK_EQUAL_64(src_base + 2 + 48, x19);
@@ -3195,13 +3189,13 @@
 
   RUN();
 
-  CHECK_EQUAL_128(0x0001020304050607, 0x08090a0b0c0d0e0f, q0);
+  CHECK_EQUAL_128(0x0001020304050607, 0x08090A0B0C0D0E0F, q0);
   CHECK_EQUAL_128(0x0100020103020403, 0x0504060507060807, q1);
   CHECK_EQUAL_128(0x0302010004030201, 0x0504030206050403, q2);
   CHECK_EQUAL_128(0x0706050403020100, 0x0807060504030201, q3);
-  CHECK_EQUAL_128(0x0f0e0d0c0b0a0908, 0x0706050003020100, q4);
-  CHECK_EQUAL_128(0x0f0e0d0c0b0a0908, 0x0100050403020100, q5);
-  CHECK_EQUAL_128(0x0f0e0d0c03020100, 0x0706050403020100, q6);
+  CHECK_EQUAL_128(0x0F0E0D0C0B0A0908, 0x0706050003020100, q4);
+  CHECK_EQUAL_128(0x0F0E0D0C0B0A0908, 0x0100050403020100, q5);
+  CHECK_EQUAL_128(0x0F0E0D0C03020100, 0x0706050403020100, q6);
   CHECK_EQUAL_128(0x0706050403020100, 0x0706050403020100, q7);
 
   TEARDOWN();
@@ -3230,14 +3224,14 @@
 
   RUN();
 
-  CHECK_EQUAL_128(0, 0x0e0c0a0806040200, q2);
-  CHECK_EQUAL_128(0, 0x0f0d0b0907050301, q3);
-  CHECK_EQUAL_128(0, 0x0f0d0b0907050301, q4);
-  CHECK_EQUAL_128(0, 0x100e0c0a08060402, q5);
-  CHECK_EQUAL_128(0, 0x0f0e0b0a07060302, q6);
-  CHECK_EQUAL_128(0, 0x11100d0c09080504, q7);
-  CHECK_EQUAL_128(0, 0x0e0d0c0b06050403, q31);
-  CHECK_EQUAL_128(0, 0x1211100f0a090807, q0);
+  CHECK_EQUAL_128(0, 0x0E0C0A0806040200, q2);
+  CHECK_EQUAL_128(0, 0x0F0D0B0907050301, q3);
+  CHECK_EQUAL_128(0, 0x0F0D0B0907050301, q4);
+  CHECK_EQUAL_128(0, 0x100E0C0A08060402, q5);
+  CHECK_EQUAL_128(0, 0x0F0E0B0A07060302, q6);
+  CHECK_EQUAL_128(0, 0x11100D0C09080504, q7);
+  CHECK_EQUAL_128(0, 0x0E0D0C0B06050403, q31);
+  CHECK_EQUAL_128(0, 0x1211100F0A090807, q0);
 
   TEARDOWN();
 }
@@ -3268,15 +3262,15 @@
 
   RUN();
 
-  CHECK_EQUAL_128(0, 0x0e0c0a0806040200, q2);
-  CHECK_EQUAL_128(0, 0x0f0d0b0907050301, q3);
-  CHECK_EQUAL_128(0, 0x0f0d0b0907050301, q4);
-  CHECK_EQUAL_128(0, 0x0f0e0b0a07060302, q5);
-  CHECK_EQUAL_128(0, 0x11100d0c09080504, q6);
-  CHECK_EQUAL_128(0, 0x0e0d0c0b06050403, q16);
-  CHECK_EQUAL_128(0, 0x1211100f0a090807, q17);
-  CHECK_EQUAL_128(0, 0x0f0e0d0c07060504, q31);
-  CHECK_EQUAL_128(0, 0x131211100b0a0908, q0);
+  CHECK_EQUAL_128(0, 0x0E0C0A0806040200, q2);
+  CHECK_EQUAL_128(0, 0x0F0D0B0907050301, q3);
+  CHECK_EQUAL_128(0, 0x0F0D0B0907050301, q4);
+  CHECK_EQUAL_128(0, 0x0F0E0B0A07060302, q5);
+  CHECK_EQUAL_128(0, 0x11100D0C09080504, q6);
+  CHECK_EQUAL_128(0, 0x0E0D0C0B06050403, q16);
+  CHECK_EQUAL_128(0, 0x1211100F0A090807, q17);
+  CHECK_EQUAL_128(0, 0x0F0E0D0C07060504, q31);
+  CHECK_EQUAL_128(0, 0x131211100B0A0908, q0);
 
   CHECK_EQUAL_64(src_base + 1, x17);
   CHECK_EQUAL_64(src_base + 1 + 16, x18);
@@ -3312,16 +3306,16 @@
 
   RUN();
 
-  CHECK_EQUAL_128(0x1e1c1a1816141210, 0x0e0c0a0806040200, q2);
-  CHECK_EQUAL_128(0x1f1d1b1917151311, 0x0f0d0b0907050301, q3);
-  CHECK_EQUAL_128(0x1f1d1b1917151311, 0x0f0d0b0907050301, q4);
-  CHECK_EQUAL_128(0x201e1c1a18161412, 0x100e0c0a08060402, q5);
-  CHECK_EQUAL_128(0x1f1e1b1a17161312, 0x0f0e0b0a07060302, q6);
-  CHECK_EQUAL_128(0x21201d1c19181514, 0x11100d0c09080504, q7);
-  CHECK_EQUAL_128(0x1e1d1c1b16151413, 0x0e0d0c0b06050403, q16);
-  CHECK_EQUAL_128(0x2221201f1a191817, 0x1211100f0a090807, q17);
-  CHECK_EQUAL_128(0x1b1a191817161514, 0x0b0a090807060504, q31);
-  CHECK_EQUAL_128(0x232221201f1e1d1c, 0x131211100f0e0d0c, q0);
+  CHECK_EQUAL_128(0x1E1C1A1816141210, 0x0E0C0A0806040200, q2);
+  CHECK_EQUAL_128(0x1F1D1B1917151311, 0x0F0D0B0907050301, q3);
+  CHECK_EQUAL_128(0x1F1D1B1917151311, 0x0F0D0B0907050301, q4);
+  CHECK_EQUAL_128(0x201E1C1A18161412, 0x100E0C0A08060402, q5);
+  CHECK_EQUAL_128(0x1F1E1B1A17161312, 0x0F0E0B0A07060302, q6);
+  CHECK_EQUAL_128(0x21201D1C19181514, 0x11100D0C09080504, q7);
+  CHECK_EQUAL_128(0x1E1D1C1B16151413, 0x0E0D0C0B06050403, q16);
+  CHECK_EQUAL_128(0x2221201F1A191817, 0x1211100F0A090807, q17);
+  CHECK_EQUAL_128(0x1B1A191817161514, 0x0B0A090807060504, q31);
+  CHECK_EQUAL_128(0x232221201F1E1D1C, 0x131211100F0E0D0C, q0);
 
   TEARDOWN();
 }
@@ -3352,16 +3346,16 @@
 
   RUN();
 
-  CHECK_EQUAL_128(0x1e1c1a1816141210, 0x0e0c0a0806040200, q2);
-  CHECK_EQUAL_128(0x1f1d1b1917151311, 0x0f0d0b0907050301, q3);
-  CHECK_EQUAL_128(0x1f1d1b1917151311, 0x0f0d0b0907050301, q4);
-  CHECK_EQUAL_128(0x201e1c1a18161412, 0x100e0c0a08060402, q5);
-  CHECK_EQUAL_128(0x1f1e1b1a17161312, 0x0f0e0b0a07060302, q6);
-  CHECK_EQUAL_128(0x21201d1c19181514, 0x11100d0c09080504, q7);
-  CHECK_EQUAL_128(0x1e1d1c1b16151413, 0x0e0d0c0b06050403, q16);
-  CHECK_EQUAL_128(0x2221201f1a191817, 0x1211100f0a090807, q17);
-  CHECK_EQUAL_128(0x1b1a191817161514, 0x0b0a090807060504, q31);
-  CHECK_EQUAL_128(0x232221201f1e1d1c, 0x131211100f0e0d0c, q0);
+  CHECK_EQUAL_128(0x1E1C1A1816141210, 0x0E0C0A0806040200, q2);
+  CHECK_EQUAL_128(0x1F1D1B1917151311, 0x0F0D0B0907050301, q3);
+  CHECK_EQUAL_128(0x1F1D1B1917151311, 0x0F0D0B0907050301, q4);
+  CHECK_EQUAL_128(0x201E1C1A18161412, 0x100E0C0A08060402, q5);
+  CHECK_EQUAL_128(0x1F1E1B1A17161312, 0x0F0E0B0A07060302, q6);
+  CHECK_EQUAL_128(0x21201D1C19181514, 0x11100D0C09080504, q7);
+  CHECK_EQUAL_128(0x1E1D1C1B16151413, 0x0E0D0C0B06050403, q16);
+  CHECK_EQUAL_128(0x2221201F1A191817, 0x1211100F0A090807, q17);
+  CHECK_EQUAL_128(0x1B1A191817161514, 0x0B0A090807060504, q31);
+  CHECK_EQUAL_128(0x232221201F1E1D1C, 0x131211100F0E0D0C, q0);
 
   CHECK_EQUAL_64(src_base + 1, x17);
   CHECK_EQUAL_64(src_base + 1 + 32, x18);
@@ -3432,22 +3426,22 @@
 
   RUN();
 
-  CHECK_EQUAL_128(0x0001020304050607, 0x08090a0b0c0d0e0f, q0);
-  CHECK_EQUAL_128(0x0102030405060708, 0x090a0b0c0d0e0f10, q1);
+  CHECK_EQUAL_128(0x0001020304050607, 0x08090A0B0C0D0E0F, q0);
+  CHECK_EQUAL_128(0x0102030405060708, 0x090A0B0C0D0E0F10, q1);
   CHECK_EQUAL_128(0x0100020103020403, 0x0504060507060807, q2);
-  CHECK_EQUAL_128(0x0302040305040605, 0x0706080709080a09, q3);
+  CHECK_EQUAL_128(0x0302040305040605, 0x0706080709080A09, q3);
   CHECK_EQUAL_128(0x0302010004030201, 0x0504030206050403, q4);
-  CHECK_EQUAL_128(0x0706050408070605, 0x090807060a090807, q5);
+  CHECK_EQUAL_128(0x0706050408070605, 0x090807060A090807, q5);
   CHECK_EQUAL_128(0x0706050403020100, 0x0807060504030201, q6);
-  CHECK_EQUAL_128(0x0f0e0d0c0b0a0908, 0x100f0e0d0c0b0a09, q7);
-  CHECK_EQUAL_128(0x0f0e0d0c0b0a0908, 0x0706050003020100, q8);
-  CHECK_EQUAL_128(0x1f1e1d1c1b1a1918, 0x1716150113121110, q9);
-  CHECK_EQUAL_128(0x0f0e0d0c0b0a0908, 0x0100050403020100, q10);
-  CHECK_EQUAL_128(0x1f1e1d1c1b1a1918, 0x0302151413121110, q11);
-  CHECK_EQUAL_128(0x0f0e0d0c03020100, 0x0706050403020100, q12);
-  CHECK_EQUAL_128(0x1f1e1d1c07060504, 0x1716151413121110, q13);
+  CHECK_EQUAL_128(0x0F0E0D0C0B0A0908, 0x100F0E0D0C0B0A09, q7);
+  CHECK_EQUAL_128(0x0F0E0D0C0B0A0908, 0x0706050003020100, q8);
+  CHECK_EQUAL_128(0x1F1E1D1C1B1A1918, 0x1716150113121110, q9);
+  CHECK_EQUAL_128(0x0F0E0D0C0B0A0908, 0x0100050403020100, q10);
+  CHECK_EQUAL_128(0x1F1E1D1C1B1A1918, 0x0302151413121110, q11);
+  CHECK_EQUAL_128(0x0F0E0D0C03020100, 0x0706050403020100, q12);
+  CHECK_EQUAL_128(0x1F1E1D1C07060504, 0x1716151413121110, q13);
   CHECK_EQUAL_128(0x0706050403020100, 0x0706050403020100, q14);
-  CHECK_EQUAL_128(0x0f0e0d0c0b0a0908, 0x1716151413121110, q15);
+  CHECK_EQUAL_128(0x0F0E0D0C0B0A0908, 0x1716151413121110, q15);
 
   TEARDOWN();
 }
@@ -3518,22 +3512,22 @@
 
   RUN();
 
-  CHECK_EQUAL_128(0x00020406080a0c0e, 0x10121416181a1c1e, q0);
-  CHECK_EQUAL_128(0x01030507090b0d0f, 0x11131517191b1d1f, q1);
-  CHECK_EQUAL_128(0x0100050409080d0c, 0x1110151419181d1c, q2);
-  CHECK_EQUAL_128(0x030207060b0a0f0e, 0x131217161b1a1f1e, q3);
-  CHECK_EQUAL_128(0x030201000b0a0908, 0x131211101b1a1918, q4);
-  CHECK_EQUAL_128(0x070605040f0e0d0c, 0x171615141f1e1d1c, q5);
+  CHECK_EQUAL_128(0x00020406080A0C0E, 0x10121416181A1C1E, q0);
+  CHECK_EQUAL_128(0x01030507090B0D0F, 0x11131517191B1D1F, q1);
+  CHECK_EQUAL_128(0x0100050409080D0C, 0x1110151419181D1C, q2);
+  CHECK_EQUAL_128(0x030207060B0A0F0E, 0x131217161B1A1F1E, q3);
+  CHECK_EQUAL_128(0x030201000B0A0908, 0x131211101B1A1918, q4);
+  CHECK_EQUAL_128(0x070605040F0E0D0C, 0x171615141F1E1D1C, q5);
   CHECK_EQUAL_128(0x0706050403020100, 0x1716151413121110, q6);
-  CHECK_EQUAL_128(0x0f0e0d0c0b0a0908, 0x1f1e1d1c1b1a1918, q7);
-  CHECK_EQUAL_128(0x0f0e0d0c0b0a0908, 0x0706050003020100, q8);
-  CHECK_EQUAL_128(0x1f1e1d1c1b1a1918, 0x1716150113121110, q9);
-  CHECK_EQUAL_128(0x0f0e0d0c0b0a0908, 0x0100050403020100, q10);
-  CHECK_EQUAL_128(0x1f1e1d1c1b1a1918, 0x0302151413121110, q11);
-  CHECK_EQUAL_128(0x0f0e0d0c03020100, 0x0706050403020100, q12);
-  CHECK_EQUAL_128(0x1f1e1d1c07060504, 0x1716151413121110, q13);
+  CHECK_EQUAL_128(0x0F0E0D0C0B0A0908, 0x1F1E1D1C1B1A1918, q7);
+  CHECK_EQUAL_128(0x0F0E0D0C0B0A0908, 0x0706050003020100, q8);
+  CHECK_EQUAL_128(0x1F1E1D1C1B1A1918, 0x1716150113121110, q9);
+  CHECK_EQUAL_128(0x0F0E0D0C0B0A0908, 0x0100050403020100, q10);
+  CHECK_EQUAL_128(0x1F1E1D1C1B1A1918, 0x0302151413121110, q11);
+  CHECK_EQUAL_128(0x0F0E0D0C03020100, 0x0706050403020100, q12);
+  CHECK_EQUAL_128(0x1F1E1D1C07060504, 0x1716151413121110, q13);
   CHECK_EQUAL_128(0x0706050403020100, 0x0706050403020100, q14);
-  CHECK_EQUAL_128(0x0f0e0d0c0b0a0908, 0x1716151413121110, q15);
+  CHECK_EQUAL_128(0x0F0E0D0C0B0A0908, 0x1716151413121110, q15);
 
   CHECK_EQUAL_64(src_base + 32, x17);
   CHECK_EQUAL_64(src_base + 32, x18);
@@ -3585,12 +3579,12 @@
   CHECK_EQUAL_128(0x0000000000000000, 0x0706070607060706, q5);
   CHECK_EQUAL_128(0x0605060506050605, 0x0605060506050605, q6);
   CHECK_EQUAL_128(0x0807080708070807, 0x0807080708070807, q7);
-  CHECK_EQUAL_128(0x0000000000000000, 0x0c0b0a090c0b0a09, q8);
-  CHECK_EQUAL_128(0x0000000000000000, 0x100f0e0d100f0e0d, q9);
-  CHECK_EQUAL_128(0x0d0c0b0a0d0c0b0a, 0x0d0c0b0a0d0c0b0a, q10);
-  CHECK_EQUAL_128(0x11100f0e11100f0e, 0x11100f0e11100f0e, q11);
+  CHECK_EQUAL_128(0x0000000000000000, 0x0C0B0A090C0B0A09, q8);
+  CHECK_EQUAL_128(0x0000000000000000, 0x100F0E0D100F0E0D, q9);
+  CHECK_EQUAL_128(0x0D0C0B0A0D0C0B0A, 0x0D0C0B0A0D0C0B0A, q10);
+  CHECK_EQUAL_128(0x11100F0E11100F0E, 0x11100F0E11100F0E, q11);
   CHECK_EQUAL_128(0x1918171615141312, 0x1918171615141312, q12);
-  CHECK_EQUAL_128(0x21201f1e1d1c1b1a, 0x21201f1e1d1c1b1a, q13);
+  CHECK_EQUAL_128(0x21201F1E1D1C1B1A, 0x21201F1E1D1C1B1A, q13);
 
   TEARDOWN();
 }
@@ -3627,12 +3621,12 @@
   CHECK_EQUAL_128(0x0000000000000000, 0x0706070607060706, q5);
   CHECK_EQUAL_128(0x0605060506050605, 0x0605060506050605, q6);
   CHECK_EQUAL_128(0x0807080708070807, 0x0807080708070807, q7);
-  CHECK_EQUAL_128(0x0000000000000000, 0x0c0b0a090c0b0a09, q8);
-  CHECK_EQUAL_128(0x0000000000000000, 0x100f0e0d100f0e0d, q9);
-  CHECK_EQUAL_128(0x0d0c0b0a0d0c0b0a, 0x0d0c0b0a0d0c0b0a, q10);
-  CHECK_EQUAL_128(0x11100f0e11100f0e, 0x11100f0e11100f0e, q11);
+  CHECK_EQUAL_128(0x0000000000000000, 0x0C0B0A090C0B0A09, q8);
+  CHECK_EQUAL_128(0x0000000000000000, 0x100F0E0D100F0E0D, q9);
+  CHECK_EQUAL_128(0x0D0C0B0A0D0C0B0A, 0x0D0C0B0A0D0C0B0A, q10);
+  CHECK_EQUAL_128(0x11100F0E11100F0E, 0x11100F0E11100F0E, q11);
   CHECK_EQUAL_128(0x1918171615141312, 0x1918171615141312, q12);
-  CHECK_EQUAL_128(0x21201f1e1d1c1b1a, 0x21201f1e1d1c1b1a, q13);
+  CHECK_EQUAL_128(0x21201F1E1D1C1B1A, 0x21201F1E1D1C1B1A, q13);
   CHECK_EQUAL_64(src_base + 34, x17);
 
   TEARDOWN();
@@ -3661,18 +3655,18 @@
 
   RUN();
 
-  CHECK_EQUAL_128(0, 0x15120f0c09060300, q2);
-  CHECK_EQUAL_128(0, 0x1613100d0a070401, q3);
-  CHECK_EQUAL_128(0, 0x1714110e0b080502, q4);
-  CHECK_EQUAL_128(0, 0x1613100d0a070401, q5);
-  CHECK_EQUAL_128(0, 0x1714110e0b080502, q6);
-  CHECK_EQUAL_128(0, 0x1815120f0c090603, q7);
-  CHECK_EQUAL_128(0, 0x15140f0e09080302, q8);
-  CHECK_EQUAL_128(0, 0x171611100b0a0504, q9);
-  CHECK_EQUAL_128(0, 0x191813120d0c0706, q10);
-  CHECK_EQUAL_128(0, 0x1211100f06050403, q31);
-  CHECK_EQUAL_128(0, 0x161514130a090807, q0);
-  CHECK_EQUAL_128(0, 0x1a1918170e0d0c0b, q1);
+  CHECK_EQUAL_128(0, 0x15120F0C09060300, q2);
+  CHECK_EQUAL_128(0, 0x1613100D0A070401, q3);
+  CHECK_EQUAL_128(0, 0x1714110E0B080502, q4);
+  CHECK_EQUAL_128(0, 0x1613100D0A070401, q5);
+  CHECK_EQUAL_128(0, 0x1714110E0B080502, q6);
+  CHECK_EQUAL_128(0, 0x1815120F0C090603, q7);
+  CHECK_EQUAL_128(0, 0x15140F0E09080302, q8);
+  CHECK_EQUAL_128(0, 0x171611100B0A0504, q9);
+  CHECK_EQUAL_128(0, 0x191813120D0C0706, q10);
+  CHECK_EQUAL_128(0, 0x1211100F06050403, q31);
+  CHECK_EQUAL_128(0, 0x161514130A090807, q0);
+  CHECK_EQUAL_128(0, 0x1A1918170E0D0C0B, q1);
 
   TEARDOWN();
 }
@@ -3703,21 +3697,21 @@
 
   RUN();
 
-  CHECK_EQUAL_128(0, 0x15120f0c09060300, q2);
-  CHECK_EQUAL_128(0, 0x1613100d0a070401, q3);
-  CHECK_EQUAL_128(0, 0x1714110e0b080502, q4);
-  CHECK_EQUAL_128(0, 0x1613100d0a070401, q5);
-  CHECK_EQUAL_128(0, 0x1714110e0b080502, q6);
-  CHECK_EQUAL_128(0, 0x1815120f0c090603, q7);
-  CHECK_EQUAL_128(0, 0x15140f0e09080302, q8);
-  CHECK_EQUAL_128(0, 0x171611100b0a0504, q9);
-  CHECK_EQUAL_128(0, 0x191813120d0c0706, q10);
-  CHECK_EQUAL_128(0, 0x1211100f06050403, q11);
-  CHECK_EQUAL_128(0, 0x161514130a090807, q12);
-  CHECK_EQUAL_128(0, 0x1a1918170e0d0c0b, q13);
+  CHECK_EQUAL_128(0, 0x15120F0C09060300, q2);
+  CHECK_EQUAL_128(0, 0x1613100D0A070401, q3);
+  CHECK_EQUAL_128(0, 0x1714110E0B080502, q4);
+  CHECK_EQUAL_128(0, 0x1613100D0A070401, q5);
+  CHECK_EQUAL_128(0, 0x1714110E0B080502, q6);
+  CHECK_EQUAL_128(0, 0x1815120F0C090603, q7);
+  CHECK_EQUAL_128(0, 0x15140F0E09080302, q8);
+  CHECK_EQUAL_128(0, 0x171611100B0A0504, q9);
+  CHECK_EQUAL_128(0, 0x191813120D0C0706, q10);
+  CHECK_EQUAL_128(0, 0x1211100F06050403, q11);
+  CHECK_EQUAL_128(0, 0x161514130A090807, q12);
+  CHECK_EQUAL_128(0, 0x1A1918170E0D0C0B, q13);
   CHECK_EQUAL_128(0, 0x1312111007060504, q31);
-  CHECK_EQUAL_128(0, 0x171615140b0a0908, q0);
-  CHECK_EQUAL_128(0, 0x1b1a19180f0e0d0c, q1);
+  CHECK_EQUAL_128(0, 0x171615140B0A0908, q0);
+  CHECK_EQUAL_128(0, 0x1B1A19180F0E0D0C, q1);
 
   CHECK_EQUAL_64(src_base + 1, x17);
   CHECK_EQUAL_64(src_base + 1 + 24, x18);
@@ -3753,21 +3747,21 @@
 
   RUN();
 
-  CHECK_EQUAL_128(0x2d2a2724211e1b18, 0x15120f0c09060300, q2);
-  CHECK_EQUAL_128(0x2e2b2825221f1c19, 0x1613100d0a070401, q3);
-  CHECK_EQUAL_128(0x2f2c292623201d1a, 0x1714110e0b080502, q4);
-  CHECK_EQUAL_128(0x2e2b2825221f1c19, 0x1613100d0a070401, q5);
-  CHECK_EQUAL_128(0x2f2c292623201d1a, 0x1714110e0b080502, q6);
-  CHECK_EQUAL_128(0x302d2a2724211e1b, 0x1815120f0c090603, q7);
-  CHECK_EQUAL_128(0x2d2c272621201b1a, 0x15140f0e09080302, q8);
-  CHECK_EQUAL_128(0x2f2e292823221d1c, 0x171611100b0a0504, q9);
-  CHECK_EQUAL_128(0x31302b2a25241f1e, 0x191813120d0c0706, q10);
-  CHECK_EQUAL_128(0x2a2928271e1d1c1b, 0x1211100f06050403, q11);
-  CHECK_EQUAL_128(0x2e2d2c2b2221201f, 0x161514130a090807, q12);
-  CHECK_EQUAL_128(0x3231302f26252423, 0x1a1918170e0d0c0b, q13);
-  CHECK_EQUAL_128(0x232221201f1e1d1c, 0x0b0a090807060504, q31);
-  CHECK_EQUAL_128(0x2b2a292827262524, 0x131211100f0e0d0c, q0);
-  CHECK_EQUAL_128(0x333231302f2e2d2c, 0x1b1a191817161514, q1);
+  CHECK_EQUAL_128(0x2D2A2724211E1B18, 0x15120F0C09060300, q2);
+  CHECK_EQUAL_128(0x2E2B2825221F1C19, 0x1613100D0A070401, q3);
+  CHECK_EQUAL_128(0x2F2C292623201D1A, 0x1714110E0B080502, q4);
+  CHECK_EQUAL_128(0x2E2B2825221F1C19, 0x1613100D0A070401, q5);
+  CHECK_EQUAL_128(0x2F2C292623201D1A, 0x1714110E0B080502, q6);
+  CHECK_EQUAL_128(0x302D2A2724211E1B, 0x1815120F0C090603, q7);
+  CHECK_EQUAL_128(0x2D2C272621201B1A, 0x15140F0E09080302, q8);
+  CHECK_EQUAL_128(0x2F2E292823221D1C, 0x171611100B0A0504, q9);
+  CHECK_EQUAL_128(0x31302B2A25241F1E, 0x191813120D0C0706, q10);
+  CHECK_EQUAL_128(0x2A2928271E1D1C1B, 0x1211100F06050403, q11);
+  CHECK_EQUAL_128(0x2E2D2C2B2221201F, 0x161514130A090807, q12);
+  CHECK_EQUAL_128(0x3231302F26252423, 0x1A1918170E0D0C0B, q13);
+  CHECK_EQUAL_128(0x232221201F1E1D1C, 0x0B0A090807060504, q31);
+  CHECK_EQUAL_128(0x2B2A292827262524, 0x131211100F0E0D0C, q0);
+  CHECK_EQUAL_128(0x333231302F2E2D2C, 0x1B1A191817161514, q1);
 
   TEARDOWN();
 }
@@ -3799,21 +3793,21 @@
 
   RUN();
 
-  CHECK_EQUAL_128(0x2d2a2724211e1b18, 0x15120f0c09060300, q2);
-  CHECK_EQUAL_128(0x2e2b2825221f1c19, 0x1613100d0a070401, q3);
-  CHECK_EQUAL_128(0x2f2c292623201d1a, 0x1714110e0b080502, q4);
-  CHECK_EQUAL_128(0x2e2b2825221f1c19, 0x1613100d0a070401, q5);
-  CHECK_EQUAL_128(0x2f2c292623201d1a, 0x1714110e0b080502, q6);
-  CHECK_EQUAL_128(0x302d2a2724211e1b, 0x1815120f0c090603, q7);
-  CHECK_EQUAL_128(0x2d2c272621201b1a, 0x15140f0e09080302, q8);
-  CHECK_EQUAL_128(0x2f2e292823221d1c, 0x171611100b0a0504, q9);
-  CHECK_EQUAL_128(0x31302b2a25241f1e, 0x191813120d0c0706, q10);
-  CHECK_EQUAL_128(0x2a2928271e1d1c1b, 0x1211100f06050403, q11);
-  CHECK_EQUAL_128(0x2e2d2c2b2221201f, 0x161514130a090807, q12);
-  CHECK_EQUAL_128(0x3231302f26252423, 0x1a1918170e0d0c0b, q13);
-  CHECK_EQUAL_128(0x232221201f1e1d1c, 0x0b0a090807060504, q31);
-  CHECK_EQUAL_128(0x2b2a292827262524, 0x131211100f0e0d0c, q0);
-  CHECK_EQUAL_128(0x333231302f2e2d2c, 0x1b1a191817161514, q1);
+  CHECK_EQUAL_128(0x2D2A2724211E1B18, 0x15120F0C09060300, q2);
+  CHECK_EQUAL_128(0x2E2B2825221F1C19, 0x1613100D0A070401, q3);
+  CHECK_EQUAL_128(0x2F2C292623201D1A, 0x1714110E0B080502, q4);
+  CHECK_EQUAL_128(0x2E2B2825221F1C19, 0x1613100D0A070401, q5);
+  CHECK_EQUAL_128(0x2F2C292623201D1A, 0x1714110E0B080502, q6);
+  CHECK_EQUAL_128(0x302D2A2724211E1B, 0x1815120F0C090603, q7);
+  CHECK_EQUAL_128(0x2D2C272621201B1A, 0x15140F0E09080302, q8);
+  CHECK_EQUAL_128(0x2F2E292823221D1C, 0x171611100B0A0504, q9);
+  CHECK_EQUAL_128(0x31302B2A25241F1E, 0x191813120D0C0706, q10);
+  CHECK_EQUAL_128(0x2A2928271E1D1C1B, 0x1211100F06050403, q11);
+  CHECK_EQUAL_128(0x2E2D2C2B2221201F, 0x161514130A090807, q12);
+  CHECK_EQUAL_128(0x3231302F26252423, 0x1A1918170E0D0C0B, q13);
+  CHECK_EQUAL_128(0x232221201F1E1D1C, 0x0B0A090807060504, q31);
+  CHECK_EQUAL_128(0x2B2A292827262524, 0x131211100F0E0D0C, q0);
+  CHECK_EQUAL_128(0x333231302F2E2D2C, 0x1B1A191817161514, q1);
 
   CHECK_EQUAL_64(src_base + 1, x17);
   CHECK_EQUAL_64(src_base + 1 + 48, x18);
@@ -3888,24 +3882,24 @@
 
   RUN();
 
-  CHECK_EQUAL_128(0x0001020304050607, 0x08090a0b0c0d0e0f, q0);
-  CHECK_EQUAL_128(0x0102030405060708, 0x090a0b0c0d0e0f10, q1);
-  CHECK_EQUAL_128(0x0203040506070809, 0x0a0b0c0d0e0f1011, q2);
+  CHECK_EQUAL_128(0x0001020304050607, 0x08090A0B0C0D0E0F, q0);
+  CHECK_EQUAL_128(0x0102030405060708, 0x090A0B0C0D0E0F10, q1);
+  CHECK_EQUAL_128(0x0203040506070809, 0x0A0B0C0D0E0F1011, q2);
   CHECK_EQUAL_128(0x0100020103020403, 0x0504060507060807, q3);
-  CHECK_EQUAL_128(0x0302040305040605, 0x0706080709080a09, q4);
-  CHECK_EQUAL_128(0x0504060507060807, 0x09080a090b0a0c0b, q5);
+  CHECK_EQUAL_128(0x0302040305040605, 0x0706080709080A09, q4);
+  CHECK_EQUAL_128(0x0504060507060807, 0x09080A090B0A0C0B, q5);
   CHECK_EQUAL_128(0x0302010004030201, 0x0504030206050403, q6);
-  CHECK_EQUAL_128(0x0706050408070605, 0x090807060a090807, q7);
-  CHECK_EQUAL_128(0x0b0a09080c0b0a09, 0x0d0c0b0a0e0d0c0b, q8);
+  CHECK_EQUAL_128(0x0706050408070605, 0x090807060A090807, q7);
+  CHECK_EQUAL_128(0x0B0A09080C0B0A09, 0x0D0C0B0A0E0D0C0B, q8);
   CHECK_EQUAL_128(0x0706050403020100, 0x0807060504030201, q9);
-  CHECK_EQUAL_128(0x0f0e0d0c0b0a0908, 0x100f0e0d0c0b0a09, q10);
+  CHECK_EQUAL_128(0x0F0E0D0C0B0A0908, 0x100F0E0D0C0B0A09, q10);
   CHECK_EQUAL_128(0x1716151413121110, 0x1817161514131211, q11);
-  CHECK_EQUAL_128(0x0f0e0d0c0b0a0908, 0x0706050003020100, q12);
-  CHECK_EQUAL_128(0x1f1e1d1c1b1a1918, 0x1716150113121110, q13);
-  CHECK_EQUAL_128(0x2f2e2d2c2b2a2928, 0x2726250223222120, q14);
-  CHECK_EQUAL_128(0x0f0e0d0c0b0a0908, 0x0100050403020100, q15);
-  CHECK_EQUAL_128(0x1f1e1d1c1b1a1918, 0x0302151413121110, q16);
-  CHECK_EQUAL_128(0x2f2e2d2c2b2a2928, 0x0504252423222120, q17);
+  CHECK_EQUAL_128(0x0F0E0D0C0B0A0908, 0x0706050003020100, q12);
+  CHECK_EQUAL_128(0x1F1E1D1C1B1A1918, 0x1716150113121110, q13);
+  CHECK_EQUAL_128(0x2F2E2D2C2B2A2928, 0x2726250223222120, q14);
+  CHECK_EQUAL_128(0x0F0E0D0C0B0A0908, 0x0100050403020100, q15);
+  CHECK_EQUAL_128(0x1F1E1D1C1B1A1918, 0x0302151413121110, q16);
+  CHECK_EQUAL_128(0x2F2E2D2C2B2A2928, 0x0504252423222120, q17);
 
   TEARDOWN();
 }
@@ -3980,29 +3974,29 @@
 
   RUN();
 
-  CHECK_EQUAL_128(0x000306090c0f1215, 0x181b1e2124272a2d, q0);
-  CHECK_EQUAL_128(0x0104070a0d101316, 0x191c1f2225282b2e, q1);
-  CHECK_EQUAL_128(0x0205080b0e111417, 0x1a1d202326292c2f, q2);
-  CHECK_EQUAL_128(0x010007060d0c1312, 0x19181f1e25242b2a, q3);
-  CHECK_EQUAL_128(0x030209080f0e1514, 0x1b1a212027262d2c, q4);
-  CHECK_EQUAL_128(0x05040b0a11101716, 0x1d1c232229282f2e, q5);
-  CHECK_EQUAL_128(0x030201000f0e0d0c, 0x1b1a191827262524, q6);
-  CHECK_EQUAL_128(0x0706050413121110, 0x1f1e1d1c2b2a2928, q7);
-  CHECK_EQUAL_128(0x0b0a090817161514, 0x232221202f2e2d2c, q8);
-  CHECK_EQUAL_128(0x0706050403020100, 0x1f1e1d1c1b1a1918, q9);
-  CHECK_EQUAL_128(0x0f0e0d0c0b0a0908, 0x2726252423222120, q10);
-  CHECK_EQUAL_128(0x1716151413121110, 0x2f2e2d2c2b2a2928, q11);
-  CHECK_EQUAL_128(0x0f0e0d0c0b0a0908, 0x0706050003020100, q12);
-  CHECK_EQUAL_128(0x1f1e1d1c1b1a1918, 0x1716150113121110, q13);
-  CHECK_EQUAL_128(0x2f2e2d2c2b2a2928, 0x2726250223222120, q14);
-  CHECK_EQUAL_128(0x0f0e0d0c0b0a0908, 0x0100050403020100, q15);
-  CHECK_EQUAL_128(0x1f1e1d1c1b1a1918, 0x0302151413121110, q16);
-  CHECK_EQUAL_128(0x2f2e2d2c2b2a2928, 0x0504252423222120, q17);
-  CHECK_EQUAL_128(0x0f0e0d0c03020100, 0x0706050403020100, q18);
-  CHECK_EQUAL_128(0x1f1e1d1c07060504, 0x1716151413121110, q19);
-  CHECK_EQUAL_128(0x2f2e2d2c0b0a0908, 0x2726252423222120, q20);
+  CHECK_EQUAL_128(0x000306090C0F1215, 0x181B1E2124272A2D, q0);
+  CHECK_EQUAL_128(0x0104070A0D101316, 0x191C1F2225282B2E, q1);
+  CHECK_EQUAL_128(0x0205080B0E111417, 0x1A1D202326292C2F, q2);
+  CHECK_EQUAL_128(0x010007060D0C1312, 0x19181F1E25242B2A, q3);
+  CHECK_EQUAL_128(0x030209080F0E1514, 0x1B1A212027262D2C, q4);
+  CHECK_EQUAL_128(0x05040B0A11101716, 0x1D1C232229282F2E, q5);
+  CHECK_EQUAL_128(0x030201000F0E0D0C, 0x1B1A191827262524, q6);
+  CHECK_EQUAL_128(0x0706050413121110, 0x1F1E1D1C2B2A2928, q7);
+  CHECK_EQUAL_128(0x0B0A090817161514, 0x232221202F2E2D2C, q8);
+  CHECK_EQUAL_128(0x0706050403020100, 0x1F1E1D1C1B1A1918, q9);
+  CHECK_EQUAL_128(0x0F0E0D0C0B0A0908, 0x2726252423222120, q10);
+  CHECK_EQUAL_128(0x1716151413121110, 0x2F2E2D2C2B2A2928, q11);
+  CHECK_EQUAL_128(0x0F0E0D0C0B0A0908, 0x0706050003020100, q12);
+  CHECK_EQUAL_128(0x1F1E1D1C1B1A1918, 0x1716150113121110, q13);
+  CHECK_EQUAL_128(0x2F2E2D2C2B2A2928, 0x2726250223222120, q14);
+  CHECK_EQUAL_128(0x0F0E0D0C0B0A0908, 0x0100050403020100, q15);
+  CHECK_EQUAL_128(0x1F1E1D1C1B1A1918, 0x0302151413121110, q16);
+  CHECK_EQUAL_128(0x2F2E2D2C2B2A2928, 0x0504252423222120, q17);
+  CHECK_EQUAL_128(0x0F0E0D0C03020100, 0x0706050403020100, q18);
+  CHECK_EQUAL_128(0x1F1E1D1C07060504, 0x1716151413121110, q19);
+  CHECK_EQUAL_128(0x2F2E2D2C0B0A0908, 0x2726252423222120, q20);
   CHECK_EQUAL_128(0x0706050403020100, 0x0706050403020100, q21);
-  CHECK_EQUAL_128(0x0f0e0d0c0b0a0908, 0x1716151413121110, q22);
+  CHECK_EQUAL_128(0x0F0E0D0C0B0A0908, 0x1716151413121110, q22);
   CHECK_EQUAL_128(0x1716151413121110, 0x2726252423222120, q23);
 
   CHECK_EQUAL_64(src_base + 48, x17);
@@ -4055,19 +4049,19 @@
   CHECK_EQUAL_128(0x0606060606060606, 0x0606060606060606, q5);
   CHECK_EQUAL_128(0x0000000000000000, 0x0605060506050605, q6);
   CHECK_EQUAL_128(0x0000000000000000, 0x0807080708070807, q7);
-  CHECK_EQUAL_128(0x0000000000000000, 0x0a090a090a090a09, q8);
+  CHECK_EQUAL_128(0x0000000000000000, 0x0A090A090A090A09, q8);
   CHECK_EQUAL_128(0x0706070607060706, 0x0706070607060706, q9);
   CHECK_EQUAL_128(0x0908090809080908, 0x0908090809080908, q10);
-  CHECK_EQUAL_128(0x0b0a0b0a0b0a0b0a, 0x0b0a0b0a0b0a0b0a, q11);
-  CHECK_EQUAL_128(0x0000000000000000, 0x0f0e0d0c0f0e0d0c, q12);
+  CHECK_EQUAL_128(0x0B0A0B0A0B0A0B0A, 0x0B0A0B0A0B0A0B0A, q11);
+  CHECK_EQUAL_128(0x0000000000000000, 0x0F0E0D0C0F0E0D0C, q12);
   CHECK_EQUAL_128(0x0000000000000000, 0x1312111013121110, q13);
   CHECK_EQUAL_128(0x0000000000000000, 0x1716151417161514, q14);
-  CHECK_EQUAL_128(0x100f0e0d100f0e0d, 0x100f0e0d100f0e0d, q15);
+  CHECK_EQUAL_128(0x100F0E0D100F0E0D, 0x100F0E0D100F0E0D, q15);
   CHECK_EQUAL_128(0x1413121114131211, 0x1413121114131211, q16);
   CHECK_EQUAL_128(0x1817161518171615, 0x1817161518171615, q17);
-  CHECK_EQUAL_128(0x201f1e1d1c1b1a19, 0x201f1e1d1c1b1a19, q18);
+  CHECK_EQUAL_128(0x201F1E1D1C1B1A19, 0x201F1E1D1C1B1A19, q18);
   CHECK_EQUAL_128(0x2827262524232221, 0x2827262524232221, q19);
-  CHECK_EQUAL_128(0x302f2e2d2c2b2a29, 0x302f2e2d2c2b2a29, q20);
+  CHECK_EQUAL_128(0x302F2E2D2C2B2A29, 0x302F2E2D2C2B2A29, q20);
 
   TEARDOWN();
 }
@@ -4106,19 +4100,19 @@
   CHECK_EQUAL_128(0x0606060606060606, 0x0606060606060606, q5);
   CHECK_EQUAL_128(0x0000000000000000, 0x0605060506050605, q6);
   CHECK_EQUAL_128(0x0000000000000000, 0x0807080708070807, q7);
-  CHECK_EQUAL_128(0x0000000000000000, 0x0a090a090a090a09, q8);
+  CHECK_EQUAL_128(0x0000000000000000, 0x0A090A090A090A09, q8);
   CHECK_EQUAL_128(0x0706070607060706, 0x0706070607060706, q9);
   CHECK_EQUAL_128(0x0908090809080908, 0x0908090809080908, q10);
-  CHECK_EQUAL_128(0x0b0a0b0a0b0a0b0a, 0x0b0a0b0a0b0a0b0a, q11);
-  CHECK_EQUAL_128(0x0000000000000000, 0x0f0e0d0c0f0e0d0c, q12);
+  CHECK_EQUAL_128(0x0B0A0B0A0B0A0B0A, 0x0B0A0B0A0B0A0B0A, q11);
+  CHECK_EQUAL_128(0x0000000000000000, 0x0F0E0D0C0F0E0D0C, q12);
   CHECK_EQUAL_128(0x0000000000000000, 0x1312111013121110, q13);
   CHECK_EQUAL_128(0x0000000000000000, 0x1716151417161514, q14);
-  CHECK_EQUAL_128(0x100f0e0d100f0e0d, 0x100f0e0d100f0e0d, q15);
+  CHECK_EQUAL_128(0x100F0E0D100F0E0D, 0x100F0E0D100F0E0D, q15);
   CHECK_EQUAL_128(0x1413121114131211, 0x1413121114131211, q16);
   CHECK_EQUAL_128(0x1817161518171615, 0x1817161518171615, q17);
-  CHECK_EQUAL_128(0x201f1e1d1c1b1a19, 0x201f1e1d1c1b1a19, q18);
+  CHECK_EQUAL_128(0x201F1E1D1C1B1A19, 0x201F1E1D1C1B1A19, q18);
   CHECK_EQUAL_128(0x2827262524232221, 0x2827262524232221, q19);
-  CHECK_EQUAL_128(0x302f2e2d2c2b2a29, 0x302f2e2d2c2b2a29, q20);
+  CHECK_EQUAL_128(0x302F2E2D2C2B2A29, 0x302F2E2D2C2B2A29, q20);
 
   TEARDOWN();
 }
@@ -4146,22 +4140,22 @@
 
   RUN();
 
-  CHECK_EQUAL_128(0, 0x1c1814100c080400, q2);
-  CHECK_EQUAL_128(0, 0x1d1915110d090501, q3);
-  CHECK_EQUAL_128(0, 0x1e1a16120e0a0602, q4);
-  CHECK_EQUAL_128(0, 0x1f1b17130f0b0703, q5);
-  CHECK_EQUAL_128(0, 0x1d1915110d090501, q6);
-  CHECK_EQUAL_128(0, 0x1e1a16120e0a0602, q7);
-  CHECK_EQUAL_128(0, 0x1f1b17130f0b0703, q8);
-  CHECK_EQUAL_128(0, 0x201c1814100c0804, q9);
-  CHECK_EQUAL_128(0, 0x1b1a13120b0a0302, q10);
-  CHECK_EQUAL_128(0, 0x1d1c15140d0c0504, q11);
-  CHECK_EQUAL_128(0, 0x1f1e17160f0e0706, q12);
+  CHECK_EQUAL_128(0, 0x1C1814100C080400, q2);
+  CHECK_EQUAL_128(0, 0x1D1915110D090501, q3);
+  CHECK_EQUAL_128(0, 0x1E1A16120E0A0602, q4);
+  CHECK_EQUAL_128(0, 0x1F1B17130F0B0703, q5);
+  CHECK_EQUAL_128(0, 0x1D1915110D090501, q6);
+  CHECK_EQUAL_128(0, 0x1E1A16120E0A0602, q7);
+  CHECK_EQUAL_128(0, 0x1F1B17130F0B0703, q8);
+  CHECK_EQUAL_128(0, 0x201C1814100C0804, q9);
+  CHECK_EQUAL_128(0, 0x1B1A13120B0A0302, q10);
+  CHECK_EQUAL_128(0, 0x1D1C15140D0C0504, q11);
+  CHECK_EQUAL_128(0, 0x1F1E17160F0E0706, q12);
   CHECK_EQUAL_128(0, 0x2120191811100908, q13);
   CHECK_EQUAL_128(0, 0x1615141306050403, q30);
-  CHECK_EQUAL_128(0, 0x1a1918170a090807, q31);
-  CHECK_EQUAL_128(0, 0x1e1d1c1b0e0d0c0b, q0);
-  CHECK_EQUAL_128(0, 0x2221201f1211100f, q1);
+  CHECK_EQUAL_128(0, 0x1A1918170A090807, q31);
+  CHECK_EQUAL_128(0, 0x1E1D1C1B0E0D0C0B, q0);
+  CHECK_EQUAL_128(0, 0x2221201F1211100F, q1);
 
   TEARDOWN();
 }
@@ -4197,25 +4191,25 @@
 
   RUN();
 
-  CHECK_EQUAL_128(0, 0x1c1814100c080400, q2);
-  CHECK_EQUAL_128(0, 0x1d1915110d090501, q3);
-  CHECK_EQUAL_128(0, 0x1e1a16120e0a0602, q4);
-  CHECK_EQUAL_128(0, 0x1f1b17130f0b0703, q5);
-  CHECK_EQUAL_128(0, 0x1d1915110d090501, q6);
-  CHECK_EQUAL_128(0, 0x1e1a16120e0a0602, q7);
-  CHECK_EQUAL_128(0, 0x1f1b17130f0b0703, q8);
-  CHECK_EQUAL_128(0, 0x201c1814100c0804, q9);
-  CHECK_EQUAL_128(0, 0x1b1a13120b0a0302, q10);
-  CHECK_EQUAL_128(0, 0x1d1c15140d0c0504, q11);
-  CHECK_EQUAL_128(0, 0x1f1e17160f0e0706, q12);
+  CHECK_EQUAL_128(0, 0x1C1814100C080400, q2);
+  CHECK_EQUAL_128(0, 0x1D1915110D090501, q3);
+  CHECK_EQUAL_128(0, 0x1E1A16120E0A0602, q4);
+  CHECK_EQUAL_128(0, 0x1F1B17130F0B0703, q5);
+  CHECK_EQUAL_128(0, 0x1D1915110D090501, q6);
+  CHECK_EQUAL_128(0, 0x1E1A16120E0A0602, q7);
+  CHECK_EQUAL_128(0, 0x1F1B17130F0B0703, q8);
+  CHECK_EQUAL_128(0, 0x201C1814100C0804, q9);
+  CHECK_EQUAL_128(0, 0x1B1A13120B0A0302, q10);
+  CHECK_EQUAL_128(0, 0x1D1C15140D0C0504, q11);
+  CHECK_EQUAL_128(0, 0x1F1E17160F0E0706, q12);
   CHECK_EQUAL_128(0, 0x2120191811100908, q13);
   CHECK_EQUAL_128(0, 0x1615141306050403, q14);
-  CHECK_EQUAL_128(0, 0x1a1918170a090807, q15);
-  CHECK_EQUAL_128(0, 0x1e1d1c1b0e0d0c0b, q16);
-  CHECK_EQUAL_128(0, 0x2221201f1211100f, q17);
+  CHECK_EQUAL_128(0, 0x1A1918170A090807, q15);
+  CHECK_EQUAL_128(0, 0x1E1D1C1B0E0D0C0B, q16);
+  CHECK_EQUAL_128(0, 0x2221201F1211100F, q17);
   CHECK_EQUAL_128(0, 0x1716151407060504, q30);
-  CHECK_EQUAL_128(0, 0x1b1a19180b0a0908, q31);
-  CHECK_EQUAL_128(0, 0x1f1e1d1c0f0e0d0c, q0);
+  CHECK_EQUAL_128(0, 0x1B1A19180B0A0908, q31);
+  CHECK_EQUAL_128(0, 0x1F1E1D1C0F0E0D0C, q0);
   CHECK_EQUAL_128(0, 0x2322212013121110, q1);
 
   CHECK_EQUAL_64(src_base + 1, x17);
@@ -4251,26 +4245,26 @@
 
   RUN();
 
-  CHECK_EQUAL_128(0x3c3834302c282420, 0x1c1814100c080400, q2);
-  CHECK_EQUAL_128(0x3d3935312d292521, 0x1d1915110d090501, q3);
-  CHECK_EQUAL_128(0x3e3a36322e2a2622, 0x1e1a16120e0a0602, q4);
-  CHECK_EQUAL_128(0x3f3b37332f2b2723, 0x1f1b17130f0b0703, q5);
-  CHECK_EQUAL_128(0x3d3935312d292521, 0x1d1915110d090501, q6);
-  CHECK_EQUAL_128(0x3e3a36322e2a2622, 0x1e1a16120e0a0602, q7);
-  CHECK_EQUAL_128(0x3f3b37332f2b2723, 0x1f1b17130f0b0703, q8);
-  CHECK_EQUAL_128(0x403c3834302c2824, 0x201c1814100c0804, q9);
-  CHECK_EQUAL_128(0x3b3a33322b2a2322, 0x1b1a13120b0a0302, q10);
-  CHECK_EQUAL_128(0x3d3c35342d2c2524, 0x1d1c15140d0c0504, q11);
-  CHECK_EQUAL_128(0x3f3e37362f2e2726, 0x1f1e17160f0e0706, q12);
+  CHECK_EQUAL_128(0x3C3834302C282420, 0x1C1814100C080400, q2);
+  CHECK_EQUAL_128(0x3D3935312D292521, 0x1D1915110D090501, q3);
+  CHECK_EQUAL_128(0x3E3A36322E2A2622, 0x1E1A16120E0A0602, q4);
+  CHECK_EQUAL_128(0x3F3B37332F2B2723, 0x1F1B17130F0B0703, q5);
+  CHECK_EQUAL_128(0x3D3935312D292521, 0x1D1915110D090501, q6);
+  CHECK_EQUAL_128(0x3E3A36322E2A2622, 0x1E1A16120E0A0602, q7);
+  CHECK_EQUAL_128(0x3F3B37332F2B2723, 0x1F1B17130F0B0703, q8);
+  CHECK_EQUAL_128(0x403C3834302C2824, 0x201C1814100C0804, q9);
+  CHECK_EQUAL_128(0x3B3A33322B2A2322, 0x1B1A13120B0A0302, q10);
+  CHECK_EQUAL_128(0x3D3C35342D2C2524, 0x1D1C15140D0C0504, q11);
+  CHECK_EQUAL_128(0x3F3E37362F2E2726, 0x1F1E17160F0E0706, q12);
   CHECK_EQUAL_128(0x4140393831302928, 0x2120191811100908, q13);
   CHECK_EQUAL_128(0x3635343326252423, 0x1615141306050403, q14);
-  CHECK_EQUAL_128(0x3a3938372a292827, 0x1a1918170a090807, q15);
-  CHECK_EQUAL_128(0x3e3d3c3b2e2d2c2b, 0x1e1d1c1b0e0d0c0b, q16);
-  CHECK_EQUAL_128(0x4241403f3231302f, 0x2221201f1211100f, q17);
-  CHECK_EQUAL_128(0x2b2a292827262524, 0x0b0a090807060504, q18);
-  CHECK_EQUAL_128(0x333231302f2e2d2c, 0x131211100f0e0d0c, q19);
-  CHECK_EQUAL_128(0x3b3a393837363534, 0x1b1a191817161514, q20);
-  CHECK_EQUAL_128(0x434241403f3e3d3c, 0x232221201f1e1d1c, q21);
+  CHECK_EQUAL_128(0x3A3938372A292827, 0x1A1918170A090807, q15);
+  CHECK_EQUAL_128(0x3E3D3C3B2E2D2C2B, 0x1E1D1C1B0E0D0C0B, q16);
+  CHECK_EQUAL_128(0x4241403F3231302F, 0x2221201F1211100F, q17);
+  CHECK_EQUAL_128(0x2B2A292827262524, 0x0B0A090807060504, q18);
+  CHECK_EQUAL_128(0x333231302F2E2D2C, 0x131211100F0E0D0C, q19);
+  CHECK_EQUAL_128(0x3B3A393837363534, 0x1B1A191817161514, q20);
+  CHECK_EQUAL_128(0x434241403F3E3D3C, 0x232221201F1E1D1C, q21);
   TEARDOWN();
 }
 
@@ -4306,26 +4300,26 @@
 
   RUN();
 
-  CHECK_EQUAL_128(0x3c3834302c282420, 0x1c1814100c080400, q2);
-  CHECK_EQUAL_128(0x3d3935312d292521, 0x1d1915110d090501, q3);
-  CHECK_EQUAL_128(0x3e3a36322e2a2622, 0x1e1a16120e0a0602, q4);
-  CHECK_EQUAL_128(0x3f3b37332f2b2723, 0x1f1b17130f0b0703, q5);
-  CHECK_EQUAL_128(0x3d3935312d292521, 0x1d1915110d090501, q6);
-  CHECK_EQUAL_128(0x3e3a36322e2a2622, 0x1e1a16120e0a0602, q7);
-  CHECK_EQUAL_128(0x3f3b37332f2b2723, 0x1f1b17130f0b0703, q8);
-  CHECK_EQUAL_128(0x403c3834302c2824, 0x201c1814100c0804, q9);
-  CHECK_EQUAL_128(0x3b3a33322b2a2322, 0x1b1a13120b0a0302, q10);
-  CHECK_EQUAL_128(0x3d3c35342d2c2524, 0x1d1c15140d0c0504, q11);
-  CHECK_EQUAL_128(0x3f3e37362f2e2726, 0x1f1e17160f0e0706, q12);
+  CHECK_EQUAL_128(0x3C3834302C282420, 0x1C1814100C080400, q2);
+  CHECK_EQUAL_128(0x3D3935312D292521, 0x1D1915110D090501, q3);
+  CHECK_EQUAL_128(0x3E3A36322E2A2622, 0x1E1A16120E0A0602, q4);
+  CHECK_EQUAL_128(0x3F3B37332F2B2723, 0x1F1B17130F0B0703, q5);
+  CHECK_EQUAL_128(0x3D3935312D292521, 0x1D1915110D090501, q6);
+  CHECK_EQUAL_128(0x3E3A36322E2A2622, 0x1E1A16120E0A0602, q7);
+  CHECK_EQUAL_128(0x3F3B37332F2B2723, 0x1F1B17130F0B0703, q8);
+  CHECK_EQUAL_128(0x403C3834302C2824, 0x201C1814100C0804, q9);
+  CHECK_EQUAL_128(0x3B3A33322B2A2322, 0x1B1A13120B0A0302, q10);
+  CHECK_EQUAL_128(0x3D3C35342D2C2524, 0x1D1C15140D0C0504, q11);
+  CHECK_EQUAL_128(0x3F3E37362F2E2726, 0x1F1E17160F0E0706, q12);
   CHECK_EQUAL_128(0x4140393831302928, 0x2120191811100908, q13);
   CHECK_EQUAL_128(0x3635343326252423, 0x1615141306050403, q14);
-  CHECK_EQUAL_128(0x3a3938372a292827, 0x1a1918170a090807, q15);
-  CHECK_EQUAL_128(0x3e3d3c3b2e2d2c2b, 0x1e1d1c1b0e0d0c0b, q16);
-  CHECK_EQUAL_128(0x4241403f3231302f, 0x2221201f1211100f, q17);
-  CHECK_EQUAL_128(0x2b2a292827262524, 0x0b0a090807060504, q30);
-  CHECK_EQUAL_128(0x333231302f2e2d2c, 0x131211100f0e0d0c, q31);
-  CHECK_EQUAL_128(0x3b3a393837363534, 0x1b1a191817161514, q0);
-  CHECK_EQUAL_128(0x434241403f3e3d3c, 0x232221201f1e1d1c, q1);
+  CHECK_EQUAL_128(0x3A3938372A292827, 0x1A1918170A090807, q15);
+  CHECK_EQUAL_128(0x3E3D3C3B2E2D2C2B, 0x1E1D1C1B0E0D0C0B, q16);
+  CHECK_EQUAL_128(0x4241403F3231302F, 0x2221201F1211100F, q17);
+  CHECK_EQUAL_128(0x2B2A292827262524, 0x0B0A090807060504, q30);
+  CHECK_EQUAL_128(0x333231302F2E2D2C, 0x131211100F0E0D0C, q31);
+  CHECK_EQUAL_128(0x3B3A393837363534, 0x1B1A191817161514, q0);
+  CHECK_EQUAL_128(0x434241403F3E3D3C, 0x232221201F1E1D1C, q1);
 
   CHECK_EQUAL_64(src_base + 1, x17);
   CHECK_EQUAL_64(src_base + 1 + 64, x18);
@@ -4407,38 +4401,38 @@
 
   RUN();
 
-  CHECK_EQUAL_128(0x0001020304050607, 0x08090a0b0c0d0e0f, q0);
-  CHECK_EQUAL_128(0x0102030405060708, 0x090a0b0c0d0e0f10, q1);
-  CHECK_EQUAL_128(0x0203040506070809, 0x0a0b0c0d0e0f1011, q2);
-  CHECK_EQUAL_128(0x030405060708090a, 0x0b0c0d0e0f101112, q3);
+  CHECK_EQUAL_128(0x0001020304050607, 0x08090A0B0C0D0E0F, q0);
+  CHECK_EQUAL_128(0x0102030405060708, 0x090A0B0C0D0E0F10, q1);
+  CHECK_EQUAL_128(0x0203040506070809, 0x0A0B0C0D0E0F1011, q2);
+  CHECK_EQUAL_128(0x030405060708090A, 0x0B0C0D0E0F101112, q3);
   CHECK_EQUAL_128(0x0100020103020403, 0x0504060507060807, q4);
-  CHECK_EQUAL_128(0x0302040305040605, 0x0706080709080a09, q5);
-  CHECK_EQUAL_128(0x0504060507060807, 0x09080a090b0a0c0b, q6);
-  CHECK_EQUAL_128(0x0706080709080a09, 0x0b0a0c0b0d0c0e0d, q7);
+  CHECK_EQUAL_128(0x0302040305040605, 0x0706080709080A09, q5);
+  CHECK_EQUAL_128(0x0504060507060807, 0x09080A090B0A0C0B, q6);
+  CHECK_EQUAL_128(0x0706080709080A09, 0x0B0A0C0B0D0C0E0D, q7);
   CHECK_EQUAL_128(0x0302010004030201, 0x0504030206050403, q8);
-  CHECK_EQUAL_128(0x0706050408070605, 0x090807060a090807, q9);
-  CHECK_EQUAL_128(0x0b0a09080c0b0a09, 0x0d0c0b0a0e0d0c0b, q10);
-  CHECK_EQUAL_128(0x0f0e0d0c100f0e0d, 0x11100f0e1211100f, q11);
+  CHECK_EQUAL_128(0x0706050408070605, 0x090807060A090807, q9);
+  CHECK_EQUAL_128(0x0B0A09080C0B0A09, 0x0D0C0B0A0E0D0C0B, q10);
+  CHECK_EQUAL_128(0x0F0E0D0C100F0E0D, 0x11100F0E1211100F, q11);
   CHECK_EQUAL_128(0x0706050403020100, 0x0807060504030201, q12);
-  CHECK_EQUAL_128(0x0f0e0d0c0b0a0908, 0x100f0e0d0c0b0a09, q13);
+  CHECK_EQUAL_128(0x0F0E0D0C0B0A0908, 0x100F0E0D0C0B0A09, q13);
   CHECK_EQUAL_128(0x1716151413121110, 0x1817161514131211, q14);
-  CHECK_EQUAL_128(0x1f1e1d1c1b1a1918, 0x201f1e1d1c1b1a19, q15);
-  CHECK_EQUAL_128(0x0f0e0d0c0b0a0908, 0x0706050003020100, q16);
-  CHECK_EQUAL_128(0x1f1e1d1c1b1a1918, 0x1716150113121110, q17);
-  CHECK_EQUAL_128(0x2f2e2d2c2b2a2928, 0x2726250223222120, q18);
-  CHECK_EQUAL_128(0x3f3e3d3c3b3a3938, 0x3736350333323130, q19);
-  CHECK_EQUAL_128(0x0f0e0d0c0b0a0908, 0x0100050403020100, q20);
-  CHECK_EQUAL_128(0x1f1e1d1c1b1a1918, 0x0302151413121110, q21);
-  CHECK_EQUAL_128(0x2f2e2d2c2b2a2928, 0x0504252423222120, q22);
-  CHECK_EQUAL_128(0x3f3e3d3c3b3a3938, 0x0706353433323130, q23);
-  CHECK_EQUAL_128(0x0f0e0d0c03020100, 0x0706050403020100, q24);
-  CHECK_EQUAL_128(0x1f1e1d1c07060504, 0x1716151413121110, q25);
-  CHECK_EQUAL_128(0x2f2e2d2c0b0a0908, 0x2726252423222120, q26);
-  CHECK_EQUAL_128(0x3f3e3d3c0f0e0d0c, 0x3736353433323130, q27);
+  CHECK_EQUAL_128(0x1F1E1D1C1B1A1918, 0x201F1E1D1C1B1A19, q15);
+  CHECK_EQUAL_128(0x0F0E0D0C0B0A0908, 0x0706050003020100, q16);
+  CHECK_EQUAL_128(0x1F1E1D1C1B1A1918, 0x1716150113121110, q17);
+  CHECK_EQUAL_128(0x2F2E2D2C2B2A2928, 0x2726250223222120, q18);
+  CHECK_EQUAL_128(0x3F3E3D3C3B3A3938, 0x3736350333323130, q19);
+  CHECK_EQUAL_128(0x0F0E0D0C0B0A0908, 0x0100050403020100, q20);
+  CHECK_EQUAL_128(0x1F1E1D1C1B1A1918, 0x0302151413121110, q21);
+  CHECK_EQUAL_128(0x2F2E2D2C2B2A2928, 0x0504252423222120, q22);
+  CHECK_EQUAL_128(0x3F3E3D3C3B3A3938, 0x0706353433323130, q23);
+  CHECK_EQUAL_128(0x0F0E0D0C03020100, 0x0706050403020100, q24);
+  CHECK_EQUAL_128(0x1F1E1D1C07060504, 0x1716151413121110, q25);
+  CHECK_EQUAL_128(0x2F2E2D2C0B0A0908, 0x2726252423222120, q26);
+  CHECK_EQUAL_128(0x3F3E3D3C0F0E0D0C, 0x3736353433323130, q27);
   CHECK_EQUAL_128(0x0706050403020100, 0x0706050403020100, q28);
-  CHECK_EQUAL_128(0x0f0e0d0c0b0a0908, 0x1716151413121110, q29);
+  CHECK_EQUAL_128(0x0F0E0D0C0B0A0908, 0x1716151413121110, q29);
   CHECK_EQUAL_128(0x1716151413121110, 0x2726252423222120, q30);
-  CHECK_EQUAL_128(0x1f1e1d1c1b1a1918, 0x3736353433323130, q31);
+  CHECK_EQUAL_128(0x1F1E1D1C1B1A1918, 0x3736353433323130, q31);
 
   TEARDOWN();
 }
@@ -4524,38 +4518,38 @@
 
   RUN();
 
-  CHECK_EQUAL_128(0x0004080c1014181c, 0x2024282c3034383c, q0);
-  CHECK_EQUAL_128(0x0105090d1115191d, 0x2125292d3135393d, q1);
-  CHECK_EQUAL_128(0x02060a0e12161a1e, 0x22262a2e32363a3e, q2);
-  CHECK_EQUAL_128(0x03070b0f13171b1f, 0x23272b2f33373b3f, q3);
+  CHECK_EQUAL_128(0x0004080C1014181C, 0x2024282C3034383C, q0);
+  CHECK_EQUAL_128(0x0105090D1115191D, 0x2125292D3135393D, q1);
+  CHECK_EQUAL_128(0x02060A0E12161A1E, 0x22262A2E32363A3E, q2);
+  CHECK_EQUAL_128(0x03070B0F13171B1F, 0x23272B2F33373B3F, q3);
   CHECK_EQUAL_128(0x0100090811101918, 0x2120292831303938, q4);
-  CHECK_EQUAL_128(0x03020b0a13121b1a, 0x23222b2a33323b3a, q5);
-  CHECK_EQUAL_128(0x05040d0c15141d1c, 0x25242d2c35343d3c, q6);
-  CHECK_EQUAL_128(0x07060f0e17161f1e, 0x27262f2e37363f3e, q7);
+  CHECK_EQUAL_128(0x03020B0A13121B1A, 0x23222B2A33323B3A, q5);
+  CHECK_EQUAL_128(0x05040D0C15141D1C, 0x25242D2C35343D3C, q6);
+  CHECK_EQUAL_128(0x07060F0E17161F1E, 0x27262F2E37363F3E, q7);
   CHECK_EQUAL_128(0x0302010013121110, 0x2322212033323130, q8);
   CHECK_EQUAL_128(0x0706050417161514, 0x2726252437363534, q9);
-  CHECK_EQUAL_128(0x0b0a09081b1a1918, 0x2b2a29283b3a3938, q10);
-  CHECK_EQUAL_128(0x0f0e0d0c1f1e1d1c, 0x2f2e2d2c3f3e3d3c, q11);
+  CHECK_EQUAL_128(0x0B0A09081B1A1918, 0x2B2A29283B3A3938, q10);
+  CHECK_EQUAL_128(0x0F0E0D0C1F1E1D1C, 0x2F2E2D2C3F3E3D3C, q11);
   CHECK_EQUAL_128(0x0706050403020100, 0x2726252423222120, q12);
-  CHECK_EQUAL_128(0x0f0e0d0c0b0a0908, 0x2f2e2d2c2b2a2928, q13);
+  CHECK_EQUAL_128(0x0F0E0D0C0B0A0908, 0x2F2E2D2C2B2A2928, q13);
   CHECK_EQUAL_128(0x1716151413121110, 0x3736353433323130, q14);
-  CHECK_EQUAL_128(0x1f1e1d1c1b1a1918, 0x3f3e3d3c3b3a3938, q15);
-  CHECK_EQUAL_128(0x0f0e0d0c0b0a0908, 0x0706050003020100, q16);
-  CHECK_EQUAL_128(0x1f1e1d1c1b1a1918, 0x1716150113121110, q17);
-  CHECK_EQUAL_128(0x2f2e2d2c2b2a2928, 0x2726250223222120, q18);
-  CHECK_EQUAL_128(0x3f3e3d3c3b3a3938, 0x3736350333323130, q19);
-  CHECK_EQUAL_128(0x0f0e0d0c0b0a0908, 0x0100050403020100, q20);
-  CHECK_EQUAL_128(0x1f1e1d1c1b1a1918, 0x0302151413121110, q21);
-  CHECK_EQUAL_128(0x2f2e2d2c2b2a2928, 0x0504252423222120, q22);
-  CHECK_EQUAL_128(0x3f3e3d3c3b3a3938, 0x0706353433323130, q23);
-  CHECK_EQUAL_128(0x0f0e0d0c03020100, 0x0706050403020100, q24);
-  CHECK_EQUAL_128(0x1f1e1d1c07060504, 0x1716151413121110, q25);
-  CHECK_EQUAL_128(0x2f2e2d2c0b0a0908, 0x2726252423222120, q26);
-  CHECK_EQUAL_128(0x3f3e3d3c0f0e0d0c, 0x3736353433323130, q27);
+  CHECK_EQUAL_128(0x1F1E1D1C1B1A1918, 0x3F3E3D3C3B3A3938, q15);
+  CHECK_EQUAL_128(0x0F0E0D0C0B0A0908, 0x0706050003020100, q16);
+  CHECK_EQUAL_128(0x1F1E1D1C1B1A1918, 0x1716150113121110, q17);
+  CHECK_EQUAL_128(0x2F2E2D2C2B2A2928, 0x2726250223222120, q18);
+  CHECK_EQUAL_128(0x3F3E3D3C3B3A3938, 0x3736350333323130, q19);
+  CHECK_EQUAL_128(0x0F0E0D0C0B0A0908, 0x0100050403020100, q20);
+  CHECK_EQUAL_128(0x1F1E1D1C1B1A1918, 0x0302151413121110, q21);
+  CHECK_EQUAL_128(0x2F2E2D2C2B2A2928, 0x0504252423222120, q22);
+  CHECK_EQUAL_128(0x3F3E3D3C3B3A3938, 0x0706353433323130, q23);
+  CHECK_EQUAL_128(0x0F0E0D0C03020100, 0x0706050403020100, q24);
+  CHECK_EQUAL_128(0x1F1E1D1C07060504, 0x1716151413121110, q25);
+  CHECK_EQUAL_128(0x2F2E2D2C0B0A0908, 0x2726252423222120, q26);
+  CHECK_EQUAL_128(0x3F3E3D3C0F0E0D0C, 0x3736353433323130, q27);
   CHECK_EQUAL_128(0x0706050403020100, 0x0706050403020100, q28);
-  CHECK_EQUAL_128(0x0f0e0d0c0b0a0908, 0x1716151413121110, q29);
+  CHECK_EQUAL_128(0x0F0E0D0C0B0A0908, 0x1716151413121110, q29);
   CHECK_EQUAL_128(0x1716151413121110, 0x2726252423222120, q30);
-  CHECK_EQUAL_128(0x1f1e1d1c1b1a1918, 0x3736353433323130, q31);
+  CHECK_EQUAL_128(0x1F1E1D1C1B1A1918, 0x3736353433323130, q31);
 
   CHECK_EQUAL_64(src_base + 64, x17);
   CHECK_EQUAL_64(src_base + 64, x18);
@@ -4610,24 +4604,24 @@
   CHECK_EQUAL_128(0x0808080808080808, 0x0808080808080808, q7);
   CHECK_EQUAL_128(0x0000000000000000, 0x0706070607060706, q8);
   CHECK_EQUAL_128(0x0000000000000000, 0x0908090809080908, q9);
-  CHECK_EQUAL_128(0x0000000000000000, 0x0b0a0b0a0b0a0b0a, q10);
-  CHECK_EQUAL_128(0x0000000000000000, 0x0d0c0d0c0d0c0d0c, q11);
+  CHECK_EQUAL_128(0x0000000000000000, 0x0B0A0B0A0B0A0B0A, q10);
+  CHECK_EQUAL_128(0x0000000000000000, 0x0D0C0D0C0D0C0D0C, q11);
   CHECK_EQUAL_128(0x0807080708070807, 0x0807080708070807, q12);
-  CHECK_EQUAL_128(0x0a090a090a090a09, 0x0a090a090a090a09, q13);
-  CHECK_EQUAL_128(0x0c0b0c0b0c0b0c0b, 0x0c0b0c0b0c0b0c0b, q14);
-  CHECK_EQUAL_128(0x0e0d0e0d0e0d0e0d, 0x0e0d0e0d0e0d0e0d, q15);
-  CHECK_EQUAL_128(0x0000000000000000, 0x1211100f1211100f, q16);
+  CHECK_EQUAL_128(0x0A090A090A090A09, 0x0A090A090A090A09, q13);
+  CHECK_EQUAL_128(0x0C0B0C0B0C0B0C0B, 0x0C0B0C0B0C0B0C0B, q14);
+  CHECK_EQUAL_128(0x0E0D0E0D0E0D0E0D, 0x0E0D0E0D0E0D0E0D, q15);
+  CHECK_EQUAL_128(0x0000000000000000, 0x1211100F1211100F, q16);
   CHECK_EQUAL_128(0x0000000000000000, 0x1615141316151413, q17);
-  CHECK_EQUAL_128(0x0000000000000000, 0x1a1918171a191817, q18);
-  CHECK_EQUAL_128(0x0000000000000000, 0x1e1d1c1b1e1d1c1b, q19);
+  CHECK_EQUAL_128(0x0000000000000000, 0x1A1918171A191817, q18);
+  CHECK_EQUAL_128(0x0000000000000000, 0x1E1D1C1B1E1D1C1B, q19);
   CHECK_EQUAL_128(0x1312111013121110, 0x1312111013121110, q20);
   CHECK_EQUAL_128(0x1716151417161514, 0x1716151417161514, q21);
-  CHECK_EQUAL_128(0x1b1a19181b1a1918, 0x1b1a19181b1a1918, q22);
-  CHECK_EQUAL_128(0x1f1e1d1c1f1e1d1c, 0x1f1e1d1c1f1e1d1c, q23);
+  CHECK_EQUAL_128(0x1B1A19181B1A1918, 0x1B1A19181B1A1918, q22);
+  CHECK_EQUAL_128(0x1F1E1D1C1F1E1D1C, 0x1F1E1D1C1F1E1D1C, q23);
   CHECK_EQUAL_128(0x2726252423222120, 0x2726252423222120, q24);
-  CHECK_EQUAL_128(0x2f2e2d2c2b2a2928, 0x2f2e2d2c2b2a2928, q25);
+  CHECK_EQUAL_128(0x2F2E2D2C2B2A2928, 0x2F2E2D2C2B2A2928, q25);
   CHECK_EQUAL_128(0x3736353433323130, 0x3736353433323130, q26);
-  CHECK_EQUAL_128(0x3f3e3d3c3b3a3938, 0x3f3e3d3c3b3a3938, q27);
+  CHECK_EQUAL_128(0x3F3E3D3C3B3A3938, 0x3F3E3D3C3B3A3938, q27);
 
   TEARDOWN();
 }
@@ -4675,24 +4669,24 @@
   CHECK_EQUAL_128(0x0808080808080808, 0x0808080808080808, q7);
   CHECK_EQUAL_128(0x0000000000000000, 0x0706070607060706, q8);
   CHECK_EQUAL_128(0x0000000000000000, 0x0908090809080908, q9);
-  CHECK_EQUAL_128(0x0000000000000000, 0x0b0a0b0a0b0a0b0a, q10);
-  CHECK_EQUAL_128(0x0000000000000000, 0x0d0c0d0c0d0c0d0c, q11);
+  CHECK_EQUAL_128(0x0000000000000000, 0x0B0A0B0A0B0A0B0A, q10);
+  CHECK_EQUAL_128(0x0000000000000000, 0x0D0C0D0C0D0C0D0C, q11);
   CHECK_EQUAL_128(0x0807080708070807, 0x0807080708070807, q12);
-  CHECK_EQUAL_128(0x0a090a090a090a09, 0x0a090a090a090a09, q13);
-  CHECK_EQUAL_128(0x0c0b0c0b0c0b0c0b, 0x0c0b0c0b0c0b0c0b, q14);
-  CHECK_EQUAL_128(0x0e0d0e0d0e0d0e0d, 0x0e0d0e0d0e0d0e0d, q15);
-  CHECK_EQUAL_128(0x0000000000000000, 0x1211100f1211100f, q16);
+  CHECK_EQUAL_128(0x0A090A090A090A09, 0x0A090A090A090A09, q13);
+  CHECK_EQUAL_128(0x0C0B0C0B0C0B0C0B, 0x0C0B0C0B0C0B0C0B, q14);
+  CHECK_EQUAL_128(0x0E0D0E0D0E0D0E0D, 0x0E0D0E0D0E0D0E0D, q15);
+  CHECK_EQUAL_128(0x0000000000000000, 0x1211100F1211100F, q16);
   CHECK_EQUAL_128(0x0000000000000000, 0x1615141316151413, q17);
-  CHECK_EQUAL_128(0x0000000000000000, 0x1a1918171a191817, q18);
-  CHECK_EQUAL_128(0x0000000000000000, 0x1e1d1c1b1e1d1c1b, q19);
+  CHECK_EQUAL_128(0x0000000000000000, 0x1A1918171A191817, q18);
+  CHECK_EQUAL_128(0x0000000000000000, 0x1E1D1C1B1E1D1C1B, q19);
   CHECK_EQUAL_128(0x1312111013121110, 0x1312111013121110, q20);
   CHECK_EQUAL_128(0x1716151417161514, 0x1716151417161514, q21);
-  CHECK_EQUAL_128(0x1b1a19181b1a1918, 0x1b1a19181b1a1918, q22);
-  CHECK_EQUAL_128(0x1f1e1d1c1f1e1d1c, 0x1f1e1d1c1f1e1d1c, q23);
+  CHECK_EQUAL_128(0x1B1A19181B1A1918, 0x1B1A19181B1A1918, q22);
+  CHECK_EQUAL_128(0x1F1E1D1C1F1E1D1C, 0x1F1E1D1C1F1E1D1C, q23);
   CHECK_EQUAL_128(0x2726252423222120, 0x2726252423222120, q24);
-  CHECK_EQUAL_128(0x2f2e2d2c2b2a2928, 0x2f2e2d2c2b2a2928, q25);
+  CHECK_EQUAL_128(0x2F2E2D2C2B2A2928, 0x2F2E2D2C2B2A2928, q25);
   CHECK_EQUAL_128(0x3736353433323130, 0x3736353433323130, q26);
-  CHECK_EQUAL_128(0x3f3e3d3c3b3a3938, 0x3f3e3d3c3b3a3938, q27);
+  CHECK_EQUAL_128(0x3F3E3D3C3B3A3938, 0x3F3E3D3C3B3A3938, q27);
   CHECK_EQUAL_64(src_base + 64, x17);
 
   TEARDOWN();
@@ -4741,10 +4735,10 @@
 
   RUN();
 
-  CHECK_EQUAL_128(0x0001020304050607, 0x08090a0b0c0d0e0f, q1);
-  CHECK_EQUAL_128(0x0100030205040706, 0x09080b0a0d0c0f0e, q2);
-  CHECK_EQUAL_128(0x0302010007060504, 0x0b0a09080f0e0d0c, q3);
-  CHECK_EQUAL_128(0x0706050403020100, 0x0f0e0d0c0b0a0908, q4);
+  CHECK_EQUAL_128(0x0001020304050607, 0x08090A0B0C0D0E0F, q1);
+  CHECK_EQUAL_128(0x0100030205040706, 0x09080B0A0D0C0F0E, q2);
+  CHECK_EQUAL_128(0x0302010007060504, 0x0B0A09080F0E0D0C, q3);
+  CHECK_EQUAL_128(0x0706050403020100, 0x0F0E0D0C0B0A0908, q4);
 
   TEARDOWN();
 }
@@ -4761,8 +4755,8 @@
   START();
   __ Mov(x17, dst_base);
   __ Mov(x18, dst_base);
-  __ Movi(v0.V2D(), 0x0001020304050607, 0x08090a0b0c0d0e0f);
-  __ Movi(v1.V2D(), 0x1011121314151617, 0x18191a1b1c1d1e1f);
+  __ Movi(v0.V2D(), 0x0001020304050607, 0x08090A0B0C0D0E0F);
+  __ Movi(v1.V2D(), 0x1011121314151617, 0x18191A1B1C1D1E1F);
 
   // Test B stores with and without post index.
   for (int i = 15; i >= 0; i--) {
@@ -4820,24 +4814,24 @@
   RUN();
 
   CHECK_EQUAL_128(0x1707160615051404, 0x1303120211011000, q2);
-  CHECK_EQUAL_128(0x1f0f1e0e1d0d1c0c, 0x1b0b1a0a19091808, q3);
+  CHECK_EQUAL_128(0x1F0F1E0E1D0D1C0C, 0x1B0B1A0A19091808, q3);
   CHECK_EQUAL_128(0x1707160615051404, 0x1303120211011000, q4);
-  CHECK_EQUAL_128(0x1f0f1e0e1d0d1c0c, 0x1b0b1a0a19091808, q5);
+  CHECK_EQUAL_128(0x1F0F1E0E1D0D1C0C, 0x1B0B1A0A19091808, q5);
 
   CHECK_EQUAL_128(0x1617060714150405, 0x1213020310110001, q6);
-  CHECK_EQUAL_128(0x1e1f0e0f1c1d0c0d, 0x1a1b0a0b18190809, q7);
+  CHECK_EQUAL_128(0x1E1F0E0F1C1D0C0D, 0x1A1B0A0B18190809, q7);
   CHECK_EQUAL_128(0x1617060714150405, 0x1213020310110001, q16);
-  CHECK_EQUAL_128(0x1e1f0e0f1c1d0c0d, 0x1a1b0a0b18190809, q17);
+  CHECK_EQUAL_128(0x1E1F0E0F1C1D0C0D, 0x1A1B0A0B18190809, q17);
 
   CHECK_EQUAL_128(0x1415161704050607, 0x1011121300010203, q18);
-  CHECK_EQUAL_128(0x1c1d1e1f0c0d0e0f, 0x18191a1b08090a0b, q19);
+  CHECK_EQUAL_128(0x1C1D1E1F0C0D0E0F, 0x18191A1B08090A0B, q19);
   CHECK_EQUAL_128(0x1415161704050607, 0x1011121300010203, q20);
-  CHECK_EQUAL_128(0x1c1d1e1f0c0d0e0f, 0x18191a1b08090a0b, q21);
+  CHECK_EQUAL_128(0x1C1D1E1F0C0D0E0F, 0x18191A1B08090A0B, q21);
 
   CHECK_EQUAL_128(0x1011121314151617, 0x0001020304050607, q22);
-  CHECK_EQUAL_128(0x18191a1b1c1d1e1f, 0x08090a0b0c0d0e0f, q23);
+  CHECK_EQUAL_128(0x18191A1B1C1D1E1F, 0x08090A0B0C0D0E0F, q23);
   CHECK_EQUAL_128(0x1011121314151617, 0x0001020304050607, q22);
-  CHECK_EQUAL_128(0x18191a1b1c1d1e1f, 0x08090a0b0c0d0e0f, q23);
+  CHECK_EQUAL_128(0x18191A1B1C1D1E1F, 0x08090A0B0C0D0E0F, q23);
 
   TEARDOWN();
 }
@@ -4854,9 +4848,9 @@
   START();
   __ Mov(x17, dst_base);
   __ Mov(x18, dst_base);
-  __ Movi(v0.V2D(), 0x0001020304050607, 0x08090a0b0c0d0e0f);
-  __ Movi(v1.V2D(), 0x1011121314151617, 0x18191a1b1c1d1e1f);
-  __ Movi(v2.V2D(), 0x2021222324252627, 0x28292a2b2c2d2e2f);
+  __ Movi(v0.V2D(), 0x0001020304050607, 0x08090A0B0C0D0E0F);
+  __ Movi(v1.V2D(), 0x1011121314151617, 0x18191A1B1C1D1E1F);
+  __ Movi(v2.V2D(), 0x2021222324252627, 0x28292A2B2C2D2E2F);
 
   // Test B stores with and without post index.
   for (int i = 15; i >= 0; i--) {
@@ -4918,25 +4912,25 @@
   RUN();
 
   CHECK_EQUAL_128(0x0524140423130322, 0x1202211101201000, q3);
-  CHECK_EQUAL_128(0x1a0a291909281808, 0x2717072616062515, q4);
-  CHECK_EQUAL_128(0x2f1f0f2e1e0e2d1d, 0x0d2c1c0c2b1b0b2a, q5);
+  CHECK_EQUAL_128(0x1A0A291909281808, 0x2717072616062515, q4);
+  CHECK_EQUAL_128(0x2F1F0F2E1E0E2D1D, 0x0D2C1C0C2B1B0B2A, q5);
   CHECK_EQUAL_128(0x0524140423130322, 0x1202211101201000, q6);
-  CHECK_EQUAL_128(0x1a0a291909281808, 0x2717072616062515, q7);
-  CHECK_EQUAL_128(0x2f1f0f2e1e0e2d1d, 0x0d2c1c0c2b1b0b2a, q16);
+  CHECK_EQUAL_128(0x1A0A291909281808, 0x2717072616062515, q7);
+  CHECK_EQUAL_128(0x2F1F0F2E1E0E2D1D, 0x0D2C1C0C2B1B0B2A, q16);
 
   CHECK_EQUAL_128(0x1415040522231213, 0x0203202110110001, q17);
-  CHECK_EQUAL_128(0x0a0b282918190809, 0x2627161706072425, q18);
-  CHECK_EQUAL_128(0x2e2f1e1f0e0f2c2d, 0x1c1d0c0d2a2b1a1b, q19);
+  CHECK_EQUAL_128(0x0A0B282918190809, 0x2627161706072425, q18);
+  CHECK_EQUAL_128(0x2E2F1E1F0E0F2C2D, 0x1C1D0C0D2A2B1A1B, q19);
   CHECK_EQUAL_128(0x1415040522231213, 0x0203202110110001, q20);
-  CHECK_EQUAL_128(0x0a0b282918190809, 0x2627161706072425, q21);
-  CHECK_EQUAL_128(0x2e2f1e1f0e0f2c2d, 0x1c1d0c0d2a2b1a1b, q22);
+  CHECK_EQUAL_128(0x0A0B282918190809, 0x2627161706072425, q21);
+  CHECK_EQUAL_128(0x2E2F1E1F0E0F2C2D, 0x1C1D0C0D2A2B1A1B, q22);
 
   CHECK_EQUAL_128(0x0405060720212223, 0x1011121300010203, q23);
-  CHECK_EQUAL_128(0x18191a1b08090a0b, 0x2425262714151617, q24);
-  CHECK_EQUAL_128(0x2c2d2e2f1c1d1e1f, 0x0c0d0e0f28292a2b, q25);
+  CHECK_EQUAL_128(0x18191A1B08090A0B, 0x2425262714151617, q24);
+  CHECK_EQUAL_128(0x2C2D2E2F1C1D1E1F, 0x0C0D0E0F28292A2B, q25);
   CHECK_EQUAL_128(0x0405060720212223, 0x1011121300010203, q26);
-  CHECK_EQUAL_128(0x18191a1b08090a0b, 0x2425262714151617, q27);
-  CHECK_EQUAL_128(0x2c2d2e2f1c1d1e1f, 0x0c0d0e0f28292a2b, q28);
+  CHECK_EQUAL_128(0x18191A1B08090A0B, 0x2425262714151617, q27);
+  CHECK_EQUAL_128(0x2C2D2E2F1C1D1E1F, 0x0C0D0E0F28292A2B, q28);
 
   TEARDOWN();
 }
@@ -4953,10 +4947,10 @@
   START();
   __ Mov(x17, dst_base);
   __ Mov(x18, dst_base);
-  __ Movi(v0.V2D(), 0x0001020304050607, 0x08090a0b0c0d0e0f);
-  __ Movi(v1.V2D(), 0x1011121314151617, 0x18191a1b1c1d1e1f);
-  __ Movi(v2.V2D(), 0x2021222324252627, 0x28292a2b2c2d2e2f);
-  __ Movi(v3.V2D(), 0x2021222324252627, 0x28292a2b2c2d2e2f);
+  __ Movi(v0.V2D(), 0x0001020304050607, 0x08090A0B0C0D0E0F);
+  __ Movi(v1.V2D(), 0x1011121314151617, 0x18191A1B1C1D1E1F);
+  __ Movi(v2.V2D(), 0x2021222324252627, 0x28292A2B2C2D2E2F);
+  __ Movi(v3.V2D(), 0x2021222324252627, 0x28292A2B2C2D2E2F);
 
   // Test B stores without post index.
   for (int i = 15; i >= 0; i--) {
@@ -5003,21 +4997,21 @@
 
   CHECK_EQUAL_128(0x2323130322221202, 0x2121110120201000, q4);
   CHECK_EQUAL_128(0x2727170726261606, 0x2525150524241404, q5);
-  CHECK_EQUAL_128(0x2b2b1b0b2a2a1a0a, 0x2929190928281808, q6);
-  CHECK_EQUAL_128(0x2f2f1f0f2e2e1e0e, 0x2d2d1d0d2c2c1c0c, q7);
+  CHECK_EQUAL_128(0x2B2B1B0B2A2A1A0A, 0x2929190928281808, q6);
+  CHECK_EQUAL_128(0x2F2F1F0F2E2E1E0E, 0x2D2D1D0D2C2C1C0C, q7);
 
   CHECK_EQUAL_128(0x2223222312130203, 0x2021202110110001, q16);
   CHECK_EQUAL_128(0x2627262716170607, 0x2425242514150405, q17);
-  CHECK_EQUAL_128(0x2a2b2a2b1a1b0a0b, 0x2829282918190809, q18);
-  CHECK_EQUAL_128(0x2e2f2e2f1e1f0e0f, 0x2c2d2c2d1c1d0c0d, q19);
+  CHECK_EQUAL_128(0x2A2B2A2B1A1B0A0B, 0x2829282918190809, q18);
+  CHECK_EQUAL_128(0x2E2F2E2F1E1F0E0F, 0x2C2D2C2D1C1D0C0D, q19);
 
   CHECK_EQUAL_128(0x2021222320212223, 0x1011121300010203, q20);
   CHECK_EQUAL_128(0x2425262724252627, 0x1415161704050607, q21);
-  CHECK_EQUAL_128(0x28292a2b28292a2b, 0x18191a1b08090a0b, q22);
-  CHECK_EQUAL_128(0x2c2d2e2f2c2d2e2f, 0x1c1d1e1f0c0d0e0f, q23);
+  CHECK_EQUAL_128(0x28292A2B28292A2B, 0x18191A1B08090A0B, q22);
+  CHECK_EQUAL_128(0x2C2D2E2F2C2D2E2F, 0x1C1D1E1F0C0D0E0F, q23);
 
-  CHECK_EQUAL_128(0x18191a1b1c1d1e1f, 0x08090a0b0c0d0e0f, q24);
-  CHECK_EQUAL_128(0x28292a2b2c2d2e2f, 0x28292a2b2c2d2e2f, q25);
+  CHECK_EQUAL_128(0x18191A1B1C1D1E1F, 0x08090A0B0C0D0E0F, q24);
+  CHECK_EQUAL_128(0x28292A2B2C2D2E2F, 0x28292A2B2C2D2E2F, q25);
   CHECK_EQUAL_128(0x1011121314151617, 0x0001020304050607, q26);
   CHECK_EQUAL_128(0x2021222324252627, 0x2021222324252627, q27);
 
@@ -5082,13 +5076,13 @@
 
   RUN();
 
-  CHECK_EQUAL_128(0x0001020304050607, 0x08090a0b0c0d0e0f, q0);
-  CHECK_EQUAL_128(0x0100030205040706, 0x09080b0a0d0c0f0e, q1);
-  CHECK_EQUAL_128(0x0302010007060504, 0x0b0a09080f0e0d0c, q2);
-  CHECK_EQUAL_128(0x0706050403020100, 0x0f0e0d0c0b0a0908, q3);
-  CHECK_EQUAL_128(0x0f0e0d0c0b0a0908, 0x0706050003020100, q4);
-  CHECK_EQUAL_128(0x0f0e0d0c0b0a0908, 0x0100050403020100, q5);
-  CHECK_EQUAL_128(0x0f0e0d0c03020100, 0x0706050403020100, q6);
+  CHECK_EQUAL_128(0x0001020304050607, 0x08090A0B0C0D0E0F, q0);
+  CHECK_EQUAL_128(0x0100030205040706, 0x09080B0A0D0C0F0E, q1);
+  CHECK_EQUAL_128(0x0302010007060504, 0x0B0A09080F0E0D0C, q2);
+  CHECK_EQUAL_128(0x0706050403020100, 0x0F0E0D0C0B0A0908, q3);
+  CHECK_EQUAL_128(0x0F0E0D0C0B0A0908, 0x0706050003020100, q4);
+  CHECK_EQUAL_128(0x0F0E0D0C0B0A0908, 0x0100050403020100, q5);
+  CHECK_EQUAL_128(0x0F0E0D0C03020100, 0x0706050403020100, q6);
   CHECK_EQUAL_128(0x0706050403020100, 0x0706050403020100, q7);
   CHECK_EQUAL_64(src_base + 16, x17);
   CHECK_EQUAL_64(src_base + 16, x18);
@@ -5141,10 +5135,10 @@
 
   RUN();
 
-  CHECK_EQUAL_128(0x0001020304050607, 0x08090a0b0c0d0e0f, q1);
-  CHECK_EQUAL_128(0x0100030205040706, 0x09080b0a0d0c0f0e, q2);
-  CHECK_EQUAL_128(0x0302010007060504, 0x0b0a09080f0e0d0c, q3);
-  CHECK_EQUAL_128(0x0706050403020100, 0x0f0e0d0c0b0a0908, q4);
+  CHECK_EQUAL_128(0x0001020304050607, 0x08090A0B0C0D0E0F, q1);
+  CHECK_EQUAL_128(0x0100030205040706, 0x09080B0A0D0C0F0E, q2);
+  CHECK_EQUAL_128(0x0302010007060504, 0x0B0A09080F0E0D0C, q3);
+  CHECK_EQUAL_128(0x0706050403020100, 0x0F0E0D0C0B0A0908, q4);
 
   TEARDOWN();
 }
@@ -5186,8 +5180,8 @@
   CHECK_EQUAL_128(0x0504050405040504, 0x0504050405040504, q3);
   CHECK_EQUAL_128(0, 0x0807060508070605, q4);
   CHECK_EQUAL_128(0x0908070609080706, 0x0908070609080706, q5);
-  CHECK_EQUAL_128(0, 0x0e0d0c0b0a090807, q6);
-  CHECK_EQUAL_128(0x0f0e0d0c0b0a0908, 0x0f0e0d0c0b0a0908, q7);
+  CHECK_EQUAL_128(0, 0x0E0D0C0B0A090807, q6);
+  CHECK_EQUAL_128(0x0F0E0D0C0B0A0908, 0x0F0E0D0C0B0A0908, q7);
 
   TEARDOWN();
 }
@@ -5221,8 +5215,8 @@
   CHECK_EQUAL_128(0, 0x0403040304030403, q2);
   CHECK_EQUAL_128(0x0504050405040504, 0x0504050405040504, q3);
   CHECK_EQUAL_128(0, 0x0908070609080706, q4);
-  CHECK_EQUAL_128(0x0a0908070a090807, 0x0a0908070a090807, q5);
-  CHECK_EQUAL_128(0x1211100f0e0d0c0b, 0x1211100f0e0d0c0b, q6);
+  CHECK_EQUAL_128(0x0A0908070A090807, 0x0A0908070A090807, q5);
+  CHECK_EQUAL_128(0x1211100F0E0D0C0B, 0x1211100F0E0D0C0B, q6);
   CHECK_EQUAL_64(src_base + 19, x17);
 
   TEARDOWN();
@@ -5268,10 +5262,10 @@
 
   RUN();
 
-  CHECK_EQUAL_128(0x0f0e0d0c0b0a0908, 0x0706050403020100, q0);
-  CHECK_EQUAL_128(0x1f1e1d1c1b1a1918, 0x1716151413121110, q1);
-  CHECK_EQUAL_128(0x2f2e2d2c2b2a2928, 0x2726252423222120, q2);
-  CHECK_EQUAL_128(0x3f3e3d3c3b3a3938, 0x3736353433323130, q3);
+  CHECK_EQUAL_128(0x0F0E0D0C0B0A0908, 0x0706050403020100, q0);
+  CHECK_EQUAL_128(0x1F1E1D1C1B1A1918, 0x1716151413121110, q1);
+  CHECK_EQUAL_128(0x2F2E2D2C2B2A2928, 0x2726252423222120, q2);
+  CHECK_EQUAL_128(0x3F3E3D3C3B3A3938, 0x3736353433323130, q3);
   CHECK_EQUAL_128(0, 0x0706050403020100, q16);
   CHECK_EQUAL_128(0x1716151413121110, 0x0706050403020100, q17);
   CHECK_EQUAL_128(0, 0x0706050403020100, q18);
@@ -5382,16 +5376,16 @@
 
   RUN();
 
-  CHECK_EQUAL_128(0x0f0e0d0c0b0a0908, 0x0706050403020100, q16);
-  CHECK_EQUAL_128(0x0f0e0d0c0b0a0908, 0x0706050403020100, q17);
-  CHECK_EQUAL_128(0x1f1e1d1c1b1a1918, 0x1716151413121110, q18);
-  CHECK_EQUAL_128(0x0f0e0d0c0b0a0908, 0x0706050403020100, q19);
-  CHECK_EQUAL_128(0x1f1e1d1c1b1a1918, 0x1716151413121110, q20);
-  CHECK_EQUAL_128(0x2f2e2d2c2b2a2928, 0x2726252423222120, q21);
-  CHECK_EQUAL_128(0x0f0e0d0c0b0a0908, 0x0706050403020100, q22);
-  CHECK_EQUAL_128(0x1f1e1d1c1b1a1918, 0x1716151413121110, q23);
-  CHECK_EQUAL_128(0x2f2e2d2c2b2a2928, 0x2726252423222120, q24);
-  CHECK_EQUAL_128(0x3f3e3d3c3b3a3938, 0x3736353433323130, q25);
+  CHECK_EQUAL_128(0x0F0E0D0C0B0A0908, 0x0706050403020100, q16);
+  CHECK_EQUAL_128(0x0F0E0D0C0B0A0908, 0x0706050403020100, q17);
+  CHECK_EQUAL_128(0x1F1E1D1C1B1A1918, 0x1716151413121110, q18);
+  CHECK_EQUAL_128(0x0F0E0D0C0B0A0908, 0x0706050403020100, q19);
+  CHECK_EQUAL_128(0x1F1E1D1C1B1A1918, 0x1716151413121110, q20);
+  CHECK_EQUAL_128(0x2F2E2D2C2B2A2928, 0x2726252423222120, q21);
+  CHECK_EQUAL_128(0x0F0E0D0C0B0A0908, 0x0706050403020100, q22);
+  CHECK_EQUAL_128(0x1F1E1D1C1B1A1918, 0x1716151413121110, q23);
+  CHECK_EQUAL_128(0x2F2E2D2C2B2A2928, 0x2726252423222120, q24);
+  CHECK_EQUAL_128(0x3F3E3D3C3B3A3938, 0x3736353433323130, q25);
 
   TEARDOWN();
 }
@@ -5440,16 +5434,16 @@
 
   RUN();
 
-  CHECK_EQUAL_128(0x0f0e0d0c0b0a0908, 0x0706050403020100, q16);
-  CHECK_EQUAL_128(0x0f0e0d0c0b0a0908, 0x0706050403020100, q17);
-  CHECK_EQUAL_128(0x1f1e1d1c1b1a1918, 0x1716151413121110, q18);
-  CHECK_EQUAL_128(0x0f0e0d0c0b0a0908, 0x0706050403020100, q19);
-  CHECK_EQUAL_128(0x1f1e1d1c1b1a1918, 0x1716151413121110, q20);
-  CHECK_EQUAL_128(0x2f2e2d2c2b2a2928, 0x2726252423222120, q21);
-  CHECK_EQUAL_128(0x0f0e0d0c0b0a0908, 0x0706050403020100, q22);
-  CHECK_EQUAL_128(0x1f1e1d1c1b1a1918, 0x1716151413121110, q23);
-  CHECK_EQUAL_128(0x2f2e2d2c2b2a2928, 0x2726252423222120, q24);
-  CHECK_EQUAL_128(0x3f3e3d3c3b3a3938, 0x3736353433323130, q25);
+  CHECK_EQUAL_128(0x0F0E0D0C0B0A0908, 0x0706050403020100, q16);
+  CHECK_EQUAL_128(0x0F0E0D0C0B0A0908, 0x0706050403020100, q17);
+  CHECK_EQUAL_128(0x1F1E1D1C1B1A1918, 0x1716151413121110, q18);
+  CHECK_EQUAL_128(0x0F0E0D0C0B0A0908, 0x0706050403020100, q19);
+  CHECK_EQUAL_128(0x1F1E1D1C1B1A1918, 0x1716151413121110, q20);
+  CHECK_EQUAL_128(0x2F2E2D2C2B2A2928, 0x2726252423222120, q21);
+  CHECK_EQUAL_128(0x0F0E0D0C0B0A0908, 0x0706050403020100, q22);
+  CHECK_EQUAL_128(0x1F1E1D1C1B1A1918, 0x1716151413121110, q23);
+  CHECK_EQUAL_128(0x2F2E2D2C2B2A2928, 0x2726252423222120, q24);
+  CHECK_EQUAL_128(0x3F3E3D3C3B3A3938, 0x3736353433323130, q25);
 
   TEARDOWN();
 }
@@ -5489,7 +5483,7 @@
   CHECK_EQUAL_128(0x1707160615051404, 0x1303120211011000, q0);
   CHECK_EQUAL_128(0x0504131203021110, 0x0100151413121110, q1);
   CHECK_EQUAL_128(0x1615140706050413, 0x1211100302010014, q2);
-  CHECK_EQUAL_128(0x3f3e3d3c3b3a3938, 0x3736353433323117, q3);
+  CHECK_EQUAL_128(0x3F3E3D3C3B3A3938, 0x3736353433323117, q3);
 
   TEARDOWN();
 }
@@ -5526,7 +5520,7 @@
 
   CHECK_EQUAL_128(0x1405041312030211, 0x1001000211011000, q0);
   CHECK_EQUAL_128(0x0605041312111003, 0x0201001716070615, q1);
-  CHECK_EQUAL_128(0x2f2e2d2c2b2a2928, 0x2726251716151407, q2);
+  CHECK_EQUAL_128(0x2F2E2D2C2B2A2928, 0x2726251716151407, q2);
 
   TEARDOWN();
 }
@@ -5566,9 +5560,9 @@
   RUN();
 
   CHECK_EQUAL_128(0x1312030211100100, 0x1303120211011000, q0);
-  CHECK_EQUAL_128(0x01000b0a19180908, 0x1716070615140504, q1);
+  CHECK_EQUAL_128(0x01000B0A19180908, 0x1716070615140504, q1);
   CHECK_EQUAL_128(0x1716151413121110, 0x0706050403020100, q2);
-  CHECK_EQUAL_128(0x1f1e1d1c1b1a1918, 0x0f0e0d0c0b0a0908, q3);
+  CHECK_EQUAL_128(0x1F1E1D1C1B1A1918, 0x0F0E0D0C0B0A0908, q3);
   TEARDOWN();
 }
 
@@ -5606,10 +5600,10 @@
   RUN();
 
   CHECK_EQUAL_128(0x1405041312030211, 0x1001000211011000, q0);
-  CHECK_EQUAL_128(0x1c0d0c1b1a0b0a19, 0x1809081716070615, q1);
-  CHECK_EQUAL_128(0x0504030201001003, 0x0201001f1e0f0e1d, q2);
-  CHECK_EQUAL_128(0x0d0c0b0a09081716, 0x1514131211100706, q3);
-  CHECK_EQUAL_128(0x4f4e4d4c4b4a1f1e, 0x1d1c1b1a19180f0e, q4);
+  CHECK_EQUAL_128(0x1C0D0C1B1A0B0A19, 0x1809081716070615, q1);
+  CHECK_EQUAL_128(0x0504030201001003, 0x0201001F1E0F0E1D, q2);
+  CHECK_EQUAL_128(0x0D0C0B0A09081716, 0x1514131211100706, q3);
+  CHECK_EQUAL_128(0x4F4E4D4C4B4A1F1E, 0x1D1C1B1A19180F0E, q4);
 
   TEARDOWN();
 }
@@ -5646,7 +5640,7 @@
   RUN();
 
   CHECK_EQUAL_128(0x2221201312111003, 0x0201000100201000, q0);
-  CHECK_EQUAL_128(0x1f1e1d2726252417, 0x1615140706050423, q1);
+  CHECK_EQUAL_128(0x1F1E1D2726252417, 0x1615140706050423, q1);
 
   TEARDOWN();
 }
@@ -5686,7 +5680,7 @@
   CHECK_EQUAL_128(0x2213120302212011, 0x1001001101201000, q0);
   CHECK_EQUAL_128(0x0201002726171607, 0x0625241514050423, q1);
   CHECK_EQUAL_128(0x1615140706050423, 0x2221201312111003, q2);
-  CHECK_EQUAL_128(0x3f3e3d3c3b3a3938, 0x3736352726252417, q3);
+  CHECK_EQUAL_128(0x3F3E3D3C3B3A3938, 0x3736352726252417, q3);
 
   TEARDOWN();
 }
@@ -5732,8 +5726,8 @@
   CHECK_EQUAL_128(0x0605042322212013, 0x1211100302010023, q1);
   CHECK_EQUAL_128(0x1007060504030201, 0x0025241716151407, q2);
   CHECK_EQUAL_128(0x0827262524232221, 0x2017161514131211, q3);
-  CHECK_EQUAL_128(0x281f1e1d1c1b1a19, 0x180f0e0d0c0b0a09, q4);
-  CHECK_EQUAL_128(0x5f5e5d5c5b5a5958, 0x572f2e2d2c2b2a29, q5);
+  CHECK_EQUAL_128(0x281F1E1D1C1B1A19, 0x180F0E0D0C0B0A09, q4);
+  CHECK_EQUAL_128(0x5F5E5D5C5B5A5958, 0x572F2E2D2C2B2A29, q5);
 
   TEARDOWN();
 }
@@ -5776,11 +5770,11 @@
 
   CHECK_EQUAL_128(0x2213120302212011, 0x1001001101201000, q0);
   CHECK_EQUAL_128(0x1809082726171607, 0x0625241514050423, q1);
-  CHECK_EQUAL_128(0x0e2d2c1d1c0d0c2b, 0x2a1b1a0b0a292819, q2);
-  CHECK_EQUAL_128(0x0504030201001003, 0x0201002f2e1f1e0f, q3);
+  CHECK_EQUAL_128(0x0E2D2C1D1C0D0C2B, 0x2A1B1A0B0A292819, q2);
+  CHECK_EQUAL_128(0x0504030201001003, 0x0201002F2E1F1E0F, q3);
   CHECK_EQUAL_128(0x2524232221201716, 0x1514131211100706, q4);
-  CHECK_EQUAL_128(0x1d1c1b1a19180f0e, 0x0d0c0b0a09082726, q5);
-  CHECK_EQUAL_128(0x6f6e6d6c6b6a2f2e, 0x2d2c2b2a29281f1e, q6);
+  CHECK_EQUAL_128(0x1D1C1B1A19180F0E, 0x0D0C0B0A09082726, q5);
+  CHECK_EQUAL_128(0x6F6E6D6C6B6A2F2E, 0x2D2C2B2A29281F1E, q6);
 
   TEARDOWN();
 }
@@ -5822,7 +5816,7 @@
   CHECK_EQUAL_128(0x1110010032221202, 0X3121110130201000, q0);
   CHECK_EQUAL_128(0x1003020100322322, 0X1312030231302120, q1);
   CHECK_EQUAL_128(0x1407060504333231, 0X3023222120131211, q2);
-  CHECK_EQUAL_128(0x3f3e3d3c3b373635, 0x3427262524171615, q3);
+  CHECK_EQUAL_128(0x3F3E3D3C3B373635, 0x3427262524171615, q3);
 
   TEARDOWN();
 }
@@ -5867,7 +5861,7 @@
   CHECK_EQUAL_128(0x1607063534252415, 0x1405043332232213, q1);
   CHECK_EQUAL_128(0x2221201312111003, 0x0201003736272617, q2);
   CHECK_EQUAL_128(0x2625241716151407, 0x0605043332313023, q3);
-  CHECK_EQUAL_128(0x4f4e4d4c4b4a4948, 0x4746453736353427, q4);
+  CHECK_EQUAL_128(0x4F4E4D4C4B4A4948, 0x4746453736353427, q4);
 
   TEARDOWN();
 }
@@ -5916,9 +5910,9 @@
   CHECK_EQUAL_128(0x3231302322212013, 0x1211100302010013, q1);
   CHECK_EQUAL_128(0x1007060504030201, 0x0015140706050433, q2);
   CHECK_EQUAL_128(0x3027262524232221, 0x2017161514131211, q3);
-  CHECK_EQUAL_128(0x180f0e0d0c0b0a09, 0x0837363534333231, q4);
-  CHECK_EQUAL_128(0x382f2e2d2c2b2a29, 0x281f1e1d1c1b1a19, q5);
-  CHECK_EQUAL_128(0x6f6e6d6c6b6a6968, 0x673f3e3d3c3b3a39, q6);
+  CHECK_EQUAL_128(0x180F0E0D0C0B0A09, 0x0837363534333231, q4);
+  CHECK_EQUAL_128(0x382F2E2D2C2B2A29, 0x281F1E1D1C1B1A19, q5);
+  CHECK_EQUAL_128(0x6F6E6D6C6B6A6968, 0x673F3E3D3C3B3A39, q6);
 
   TEARDOWN();
 }
@@ -5967,13 +5961,13 @@
 
   CHECK_EQUAL_128(0x1203023130212011, 0x1001000130201000, q0);
   CHECK_EQUAL_128(0x1607063534252415, 0x1405043332232213, q1);
-  CHECK_EQUAL_128(0x1a0b0a3938292819, 0x1809083736272617, q2);
-  CHECK_EQUAL_128(0x1e0f0e3d3c2d2c1d, 0x1c0d0c3b3a2b2a1b, q3);
-  CHECK_EQUAL_128(0x0504030201001003, 0x0201003f3e2f2e1f, q4);
+  CHECK_EQUAL_128(0x1A0B0A3938292819, 0x1809083736272617, q2);
+  CHECK_EQUAL_128(0x1E0F0E3D3C2D2C1D, 0x1C0D0C3B3A2B2A1B, q3);
+  CHECK_EQUAL_128(0x0504030201001003, 0x0201003F3E2F2E1F, q4);
   CHECK_EQUAL_128(0x2524232221201716, 0x1514131211100706, q5);
-  CHECK_EQUAL_128(0x0d0c0b0a09083736, 0x3534333231302726, q6);
-  CHECK_EQUAL_128(0x2d2c2b2a29281f1e, 0x1d1c1b1a19180f0e, q7);
-  CHECK_EQUAL_128(0x8f8e8d8c8b8a3f3e, 0x3d3c3b3a39382f2e, q8);
+  CHECK_EQUAL_128(0x0D0C0B0A09083736, 0x3534333231302726, q6);
+  CHECK_EQUAL_128(0x2D2C2B2A29281F1E, 0x1D1C1B1A19180F0E, q7);
+  CHECK_EQUAL_128(0x8F8E8D8C8B8A3F3E, 0x3D3C3B3A39382F2E, q8);
 
   TEARDOWN();
 }
@@ -6049,11 +6043,11 @@
   SETUP();
 
   START();
-  __ Movi(v0.V2D(), 0x0041424334353627, 0x28291a1b1c0d0e0f);
-  __ Movi(v1.V2D(), 0xafaeadacabaaa9a8, 0xa7a6a5a4a3a2a1a0);
-  __ Movi(v2.V2D(), 0xbfbebdbcbbbab9b8, 0xb7b6b5b4b3b2b1b0);
-  __ Movi(v3.V2D(), 0xcfcecdcccbcac9c8, 0xc7c6c5c4c3c2c1c0);
-  __ Movi(v4.V2D(), 0xdfdedddcdbdad9d8, 0xd7d6d5d4d3d2d1d0);
+  __ Movi(v0.V2D(), 0x0041424334353627, 0x28291A1B1C0D0E0F);
+  __ Movi(v1.V2D(), 0xAFAEADACABAAA9A8, 0xA7A6A5A4A3A2A1A0);
+  __ Movi(v2.V2D(), 0xBFBEBDBCBBBAB9B8, 0xB7B6B5B4B3B2B1B0);
+  __ Movi(v3.V2D(), 0xCFCECDCCCBCAC9C8, 0xC7C6C5C4C3C2C1C0);
+  __ Movi(v4.V2D(), 0xDFDEDDDCDBDAD9D8, 0xD7D6D5D4D3D2D1D0);
 
   __ Movi(v16.V2D(), 0x5555555555555555, 0x5555555555555555);
   __ Tbl(v16.V16B(), v1.V16B(), v0.V16B());
@@ -6083,15 +6077,15 @@
 
   RUN();
 
-  CHECK_EQUAL_128(0xa000000000000000, 0x0000000000adaeaf, q16);
-  CHECK_EQUAL_128(0xa000000000000000, 0x0000000000adaeaf, q17);
-  CHECK_EQUAL_128(0xa000000000000000, 0x0000000000adaeaf, q18);
-  CHECK_EQUAL_128(0x0f00000000000000, 0x0000000000424100, q19);
+  CHECK_EQUAL_128(0xA000000000000000, 0x0000000000ADAEAF, q16);
+  CHECK_EQUAL_128(0xA000000000000000, 0x0000000000ADAEAF, q17);
+  CHECK_EQUAL_128(0xA000000000000000, 0x0000000000ADAEAF, q18);
+  CHECK_EQUAL_128(0x0F00000000000000, 0x0000000000424100, q19);
 
-  CHECK_EQUAL_128(0xa0000000d4d5d6c7, 0xc8c9babbbcadaeaf, q20);
-  CHECK_EQUAL_128(0xa0000000d4d5d6c7, 0xc8c9babbbcadaeaf, q21);
-  CHECK_EQUAL_128(0xa0000000d4d5d6c7, 0xc8c9babbbcadaeaf, q22);
-  CHECK_EQUAL_128(0x0f000000c4c5c6b7, 0xb8b9aaabac424100, q26);
+  CHECK_EQUAL_128(0xA0000000D4D5D6C7, 0xC8C9BABBBCADAEAF, q20);
+  CHECK_EQUAL_128(0xA0000000D4D5D6C7, 0xC8C9BABBBCADAEAF, q21);
+  CHECK_EQUAL_128(0xA0000000D4D5D6C7, 0xC8C9BABBBCADAEAF, q22);
+  CHECK_EQUAL_128(0x0F000000C4C5C6B7, 0xB8B9AAABAC424100, q26);
 
   TEARDOWN();
 }
@@ -6101,11 +6095,11 @@
   SETUP();
 
   START();
-  __ Movi(v0.V2D(), 0x0041424334353627, 0x28291a1b1c0d0e0f);
-  __ Movi(v1.V2D(), 0xafaeadacabaaa9a8, 0xa7a6a5a4a3a2a1a0);
-  __ Movi(v2.V2D(), 0xbfbebdbcbbbab9b8, 0xb7b6b5b4b3b2b1b0);
-  __ Movi(v3.V2D(), 0xcfcecdcccbcac9c8, 0xc7c6c5c4c3c2c1c0);
-  __ Movi(v4.V2D(), 0xdfdedddcdbdad9d8, 0xd7d6d5d4d3d2d1d0);
+  __ Movi(v0.V2D(), 0x0041424334353627, 0x28291A1B1C0D0E0F);
+  __ Movi(v1.V2D(), 0xAFAEADACABAAA9A8, 0xA7A6A5A4A3A2A1A0);
+  __ Movi(v2.V2D(), 0xBFBEBDBCBBBAB9B8, 0xB7B6B5B4B3B2B1B0);
+  __ Movi(v3.V2D(), 0xCFCECDCCCBCAC9C8, 0xC7C6C5C4C3C2C1C0);
+  __ Movi(v4.V2D(), 0xDFDEDDDCDBDAD9D8, 0xD7D6D5D4D3D2D1D0);
 
   __ Movi(v16.V2D(), 0x5555555555555555, 0x5555555555555555);
   __ Tbx(v16.V16B(), v1.V16B(), v0.V16B());
@@ -6135,15 +6129,15 @@
 
   RUN();
 
-  CHECK_EQUAL_128(0xa055555555555555, 0x5555555555adaeaf, q16);
-  CHECK_EQUAL_128(0xa041424334353627, 0x28291a1b1cadaeaf, q17);
-  CHECK_EQUAL_128(0xa0aeadacabaaa9a8, 0xa7a6a5a4a3adaeaf, q18);
-  CHECK_EQUAL_128(0x0f41424334353627, 0x28291a1b1c424100, q19);
+  CHECK_EQUAL_128(0xA055555555555555, 0x5555555555ADAEAF, q16);
+  CHECK_EQUAL_128(0xA041424334353627, 0x28291A1B1CADAEAF, q17);
+  CHECK_EQUAL_128(0xA0AEADACABAAA9A8, 0xA7A6A5A4A3ADAEAF, q18);
+  CHECK_EQUAL_128(0x0F41424334353627, 0x28291A1B1C424100, q19);
 
-  CHECK_EQUAL_128(0xa0555555d4d5d6c7, 0xc8c9babbbcadaeaf, q20);
-  CHECK_EQUAL_128(0xa0414243d4d5d6c7, 0xc8c9babbbcadaeaf, q21);
-  CHECK_EQUAL_128(0xa0aeadacd4d5d6c7, 0xc8c9babbbcadaeaf, q22);
-  CHECK_EQUAL_128(0x0f414243c4c5c6b7, 0xb8b9aaabac424100, q26);
+  CHECK_EQUAL_128(0xA0555555D4D5D6C7, 0xC8C9BABBBCADAEAF, q20);
+  CHECK_EQUAL_128(0xA0414243D4D5D6C7, 0xC8C9BABBBCADAEAF, q21);
+  CHECK_EQUAL_128(0xA0AEADACD4D5D6C7, 0xC8C9BABBBCADAEAF, q22);
+  CHECK_EQUAL_128(0x0F414243C4C5C6B7, 0xB8B9AAABAC424100, q26);
 
   TEARDOWN();
 }
@@ -6153,7 +6147,7 @@
   SETUP();
 
   START();
-  __ Movi(v0.V2D(), 0x400000003f800000, 0xbf800000c0000000);
+  __ Movi(v0.V2D(), 0x400000003F800000, 0xBF800000C0000000);
   __ Fcvtl(v16.V2D(), v0.V2S());
   __ Fcvtl2(v17.V2D(), v0.V4S());
   __ Mov(v18, v0);
@@ -6161,7 +6155,7 @@
   __ Fcvtl(v18.V2D(), v18.V2S());
   __ Fcvtl2(v19.V2D(), v19.V4S());
 
-  __ Movi(v1.V2D(), 0x40003c003c004000, 0xc000bc00bc00c000);
+  __ Movi(v1.V2D(), 0x40003C003C004000, 0xC000BC00BC00C000);
   __ Fcvtl(v20.V4S(), v1.V4H());
   __ Fcvtl2(v21.V4S(), v1.V8H());
   __ Mov(v22, v1);
@@ -6173,15 +6167,15 @@
 
   RUN();
 
-  CHECK_EQUAL_128(0xbff0000000000000, 0xc000000000000000, q16);
-  CHECK_EQUAL_128(0x4000000000000000, 0x3ff0000000000000, q17);
-  CHECK_EQUAL_128(0xbff0000000000000, 0xc000000000000000, q18);
-  CHECK_EQUAL_128(0x4000000000000000, 0x3ff0000000000000, q19);
+  CHECK_EQUAL_128(0xBFF0000000000000, 0xC000000000000000, q16);
+  CHECK_EQUAL_128(0x4000000000000000, 0x3FF0000000000000, q17);
+  CHECK_EQUAL_128(0xBFF0000000000000, 0xC000000000000000, q18);
+  CHECK_EQUAL_128(0x4000000000000000, 0x3FF0000000000000, q19);
 
-  CHECK_EQUAL_128(0xc0000000bf800000, 0xbf800000c0000000, q20);
-  CHECK_EQUAL_128(0x400000003f800000, 0x3f80000040000000, q21);
-  CHECK_EQUAL_128(0xc0000000bf800000, 0xbf800000c0000000, q22);
-  CHECK_EQUAL_128(0x400000003f800000, 0x3f80000040000000, q23);
+  CHECK_EQUAL_128(0xC0000000BF800000, 0xBF800000C0000000, q20);
+  CHECK_EQUAL_128(0x400000003F800000, 0x3F80000040000000, q21);
+  CHECK_EQUAL_128(0xC0000000BF800000, 0xBF800000C0000000, q22);
+  CHECK_EQUAL_128(0x400000003F800000, 0x3F80000040000000, q23);
 
   TEARDOWN();
 }
@@ -6249,8 +6243,8 @@
 TEST(ldp_stp_quad) {
   SETUP();
 
-  uint64_t src[4] = {0x0123456789abcdef, 0xaaaaaaaa55555555, 0xfedcba9876543210,
-                     0x55555555aaaaaaaa};
+  uint64_t src[4] = {0x0123456789ABCDEF, 0xAAAAAAAA55555555, 0xFEDCBA9876543210,
+                     0x55555555AAAAAAAA};
   uint64_t dst[6] = {0, 0, 0, 0, 0, 0};
   uintptr_t src_base = reinterpret_cast<uintptr_t>(src);
   uintptr_t dst_base = reinterpret_cast<uintptr_t>(dst);
@@ -6264,14 +6258,14 @@
 
   RUN();
 
-  CHECK_EQUAL_128(0xaaaaaaaa55555555, 0x0123456789abcdef, q31);
-  CHECK_EQUAL_128(0x55555555aaaaaaaa, 0xfedcba9876543210, q0);
+  CHECK_EQUAL_128(0xAAAAAAAA55555555, 0x0123456789ABCDEF, q31);
+  CHECK_EQUAL_128(0x55555555AAAAAAAA, 0xFEDCBA9876543210, q0);
   CHECK_EQUAL_64(0, dst[0]);
   CHECK_EQUAL_64(0, dst[1]);
-  CHECK_EQUAL_64(0xfedcba9876543210, dst[2]);
-  CHECK_EQUAL_64(0x55555555aaaaaaaa, dst[3]);
-  CHECK_EQUAL_64(0x0123456789abcdef, dst[4]);
-  CHECK_EQUAL_64(0xaaaaaaaa55555555, dst[5]);
+  CHECK_EQUAL_64(0xFEDCBA9876543210, dst[2]);
+  CHECK_EQUAL_64(0x55555555AAAAAAAA, dst[3]);
+  CHECK_EQUAL_64(0x0123456789ABCDEF, dst[4]);
+  CHECK_EQUAL_64(0xAAAAAAAA55555555, dst[5]);
   CHECK_EQUAL_64(src_base + 4 * sizeof(src[0]), x16);
   CHECK_EQUAL_64(dst_base + 2 * sizeof(dst[1]), x17);
 
@@ -6282,8 +6276,8 @@
   INIT_V8();
   SETUP();
 
-  uint64_t src[3] = {0x0011223344556677UL, 0x8899aabbccddeeffUL,
-                     0xffeeddccbbaa9988UL};
+  uint64_t src[3] = {0x0011223344556677UL, 0x8899AABBCCDDEEFFUL,
+                     0xFFEEDDCCBBAA9988UL};
   uint64_t dst[7] = {0, 0, 0, 0, 0, 0, 0};
   uintptr_t src_base = reinterpret_cast<uintptr_t>(src);
   uintptr_t dst_base = reinterpret_cast<uintptr_t>(dst);
@@ -6311,19 +6305,19 @@
   CHECK_EQUAL_64(0x00112233, x1);
   CHECK_EQUAL_64(0x0011223344556677UL, dst[0]);
   CHECK_EQUAL_64(0x00112233, x2);
-  CHECK_EQUAL_64(0xccddeeff, x3);
-  CHECK_EQUAL_64(0xccddeeff00112233UL, dst[1]);
-  CHECK_EQUAL_64(0x8899aabbccddeeffUL, x4);
-  CHECK_EQUAL_64(0x8899aabbccddeeffUL, dst[2]);
-  CHECK_EQUAL_64(0xffeeddccbbaa9988UL, x5);
-  CHECK_EQUAL_64(0xffeeddccbbaa9988UL, dst[3]);
-  CHECK_EQUAL_64(0x8899aabb, x6);
-  CHECK_EQUAL_64(0xbbaa9988, x7);
-  CHECK_EQUAL_64(0xbbaa99888899aabbUL, dst[4]);
-  CHECK_EQUAL_64(0x8899aabbccddeeffUL, x8);
-  CHECK_EQUAL_64(0x8899aabbccddeeffUL, dst[5]);
-  CHECK_EQUAL_64(0xffeeddccbbaa9988UL, x9);
-  CHECK_EQUAL_64(0xffeeddccbbaa9988UL, dst[6]);
+  CHECK_EQUAL_64(0xCCDDEEFF, x3);
+  CHECK_EQUAL_64(0xCCDDEEFF00112233UL, dst[1]);
+  CHECK_EQUAL_64(0x8899AABBCCDDEEFFUL, x4);
+  CHECK_EQUAL_64(0x8899AABBCCDDEEFFUL, dst[2]);
+  CHECK_EQUAL_64(0xFFEEDDCCBBAA9988UL, x5);
+  CHECK_EQUAL_64(0xFFEEDDCCBBAA9988UL, dst[3]);
+  CHECK_EQUAL_64(0x8899AABB, x6);
+  CHECK_EQUAL_64(0xBBAA9988, x7);
+  CHECK_EQUAL_64(0xBBAA99888899AABBUL, dst[4]);
+  CHECK_EQUAL_64(0x8899AABBCCDDEEFFUL, x8);
+  CHECK_EQUAL_64(0x8899AABBCCDDEEFFUL, dst[5]);
+  CHECK_EQUAL_64(0xFFEEDDCCBBAA9988UL, x9);
+  CHECK_EQUAL_64(0xFFEEDDCCBBAA9988UL, dst[6]);
   CHECK_EQUAL_64(src_base, x16);
   CHECK_EQUAL_64(dst_base, x17);
   CHECK_EQUAL_64(src_base + 24, x18);
@@ -6337,8 +6331,8 @@
   INIT_V8();
   SETUP();
 
-  uint64_t src[3] = {0x0011223344556677, 0x8899aabbccddeeff,
-                     0xffeeddccbbaa9988};
+  uint64_t src[3] = {0x0011223344556677, 0x8899AABBCCDDEEFF,
+                     0xFFEEDDCCBBAA9988};
   uint64_t dst[7] = {0, 0, 0, 0, 0, 0, 0};
   uintptr_t src_base = reinterpret_cast<uintptr_t>(src);
   uintptr_t dst_base = reinterpret_cast<uintptr_t>(dst);
@@ -6369,19 +6363,19 @@
   CHECK_EQUAL_64(0x00112233, x1);
   CHECK_EQUAL_64(0x0011223344556677UL, dst[0]);
   CHECK_EQUAL_64(0x00112233, x2);
-  CHECK_EQUAL_64(0xccddeeff, x3);
-  CHECK_EQUAL_64(0xccddeeff00112233UL, dst[1]);
-  CHECK_EQUAL_64(0x8899aabbccddeeffUL, x4);
-  CHECK_EQUAL_64(0x8899aabbccddeeffUL, dst[2]);
-  CHECK_EQUAL_64(0xffeeddccbbaa9988UL, x5);
-  CHECK_EQUAL_64(0xffeeddccbbaa9988UL, dst[3]);
-  CHECK_EQUAL_64(0x8899aabb, x6);
-  CHECK_EQUAL_64(0xbbaa9988, x7);
-  CHECK_EQUAL_64(0xbbaa99888899aabbUL, dst[4]);
-  CHECK_EQUAL_64(0x8899aabbccddeeffUL, x8);
-  CHECK_EQUAL_64(0x8899aabbccddeeffUL, dst[5]);
-  CHECK_EQUAL_64(0xffeeddccbbaa9988UL, x9);
-  CHECK_EQUAL_64(0xffeeddccbbaa9988UL, dst[6]);
+  CHECK_EQUAL_64(0xCCDDEEFF, x3);
+  CHECK_EQUAL_64(0xCCDDEEFF00112233UL, dst[1]);
+  CHECK_EQUAL_64(0x8899AABBCCDDEEFFUL, x4);
+  CHECK_EQUAL_64(0x8899AABBCCDDEEFFUL, dst[2]);
+  CHECK_EQUAL_64(0xFFEEDDCCBBAA9988UL, x5);
+  CHECK_EQUAL_64(0xFFEEDDCCBBAA9988UL, dst[3]);
+  CHECK_EQUAL_64(0x8899AABB, x6);
+  CHECK_EQUAL_64(0xBBAA9988, x7);
+  CHECK_EQUAL_64(0xBBAA99888899AABBUL, dst[4]);
+  CHECK_EQUAL_64(0x8899AABBCCDDEEFFUL, x8);
+  CHECK_EQUAL_64(0x8899AABBCCDDEEFFUL, dst[5]);
+  CHECK_EQUAL_64(0xFFEEDDCCBBAA9988UL, x9);
+  CHECK_EQUAL_64(0xFFEEDDCCBBAA9988UL, dst[6]);
   CHECK_EQUAL_64(src_base - base_offset, x20);
   CHECK_EQUAL_64(dst_base - base_offset, x21);
   CHECK_EQUAL_64(src_base + base_offset + 24, x18);
@@ -6395,8 +6389,8 @@
   INIT_V8();
   SETUP();
 
-  uint64_t src[3] = {0x0011223344556677UL, 0x8899aabbccddeeffUL,
-                     0xffeeddccbbaa9988UL};
+  uint64_t src[3] = {0x0011223344556677UL, 0x8899AABBCCDDEEFFUL,
+                     0xFFEEDDCCBBAA9988UL};
   uint64_t dst[5] = {0, 0, 0, 0, 0};
   uintptr_t src_base = reinterpret_cast<uintptr_t>(src);
   uintptr_t dst_base = reinterpret_cast<uintptr_t>(dst);
@@ -6422,17 +6416,17 @@
   RUN();
 
   CHECK_EQUAL_64(0x00112233, x0);
-  CHECK_EQUAL_64(0xccddeeff, x1);
+  CHECK_EQUAL_64(0xCCDDEEFF, x1);
   CHECK_EQUAL_64(0x44556677, x2);
   CHECK_EQUAL_64(0x00112233, x3);
-  CHECK_EQUAL_64(0xccddeeff00112233UL, dst[0]);
+  CHECK_EQUAL_64(0xCCDDEEFF00112233UL, dst[0]);
   CHECK_EQUAL_64(0x0000000000112233UL, dst[1]);
-  CHECK_EQUAL_64(0x8899aabbccddeeffUL, x4);
-  CHECK_EQUAL_64(0xffeeddccbbaa9988UL, x5);
+  CHECK_EQUAL_64(0x8899AABBCCDDEEFFUL, x4);
+  CHECK_EQUAL_64(0xFFEEDDCCBBAA9988UL, x5);
   CHECK_EQUAL_64(0x0011223344556677UL, x6);
-  CHECK_EQUAL_64(0x8899aabbccddeeffUL, x7);
-  CHECK_EQUAL_64(0xffeeddccbbaa9988UL, dst[2]);
-  CHECK_EQUAL_64(0x8899aabbccddeeffUL, dst[3]);
+  CHECK_EQUAL_64(0x8899AABBCCDDEEFFUL, x7);
+  CHECK_EQUAL_64(0xFFEEDDCCBBAA9988UL, dst[2]);
+  CHECK_EQUAL_64(0x8899AABBCCDDEEFFUL, dst[3]);
   CHECK_EQUAL_64(0x0011223344556677UL, dst[4]);
   CHECK_EQUAL_64(src_base, x16);
   CHECK_EQUAL_64(dst_base, x17);
@@ -6450,8 +6444,8 @@
   INIT_V8();
   SETUP();
 
-  uint64_t src[3] = {0x0011223344556677, 0x8899aabbccddeeff,
-                     0xffeeddccbbaa9988};
+  uint64_t src[3] = {0x0011223344556677, 0x8899AABBCCDDEEFF,
+                     0xFFEEDDCCBBAA9988};
   uint64_t dst[5] = {0, 0, 0, 0, 0};
   uintptr_t src_base = reinterpret_cast<uintptr_t>(src);
   uintptr_t dst_base = reinterpret_cast<uintptr_t>(dst);
@@ -6485,17 +6479,17 @@
   RUN();
 
   CHECK_EQUAL_64(0x00112233, x0);
-  CHECK_EQUAL_64(0xccddeeff, x1);
+  CHECK_EQUAL_64(0xCCDDEEFF, x1);
   CHECK_EQUAL_64(0x44556677, x2);
   CHECK_EQUAL_64(0x00112233, x3);
-  CHECK_EQUAL_64(0xccddeeff00112233UL, dst[0]);
+  CHECK_EQUAL_64(0xCCDDEEFF00112233UL, dst[0]);
   CHECK_EQUAL_64(0x0000000000112233UL, dst[1]);
-  CHECK_EQUAL_64(0x8899aabbccddeeffUL, x4);
-  CHECK_EQUAL_64(0xffeeddccbbaa9988UL, x5);
+  CHECK_EQUAL_64(0x8899AABBCCDDEEFFUL, x4);
+  CHECK_EQUAL_64(0xFFEEDDCCBBAA9988UL, x5);
   CHECK_EQUAL_64(0x0011223344556677UL, x6);
-  CHECK_EQUAL_64(0x8899aabbccddeeffUL, x7);
-  CHECK_EQUAL_64(0xffeeddccbbaa9988UL, dst[2]);
-  CHECK_EQUAL_64(0x8899aabbccddeeffUL, dst[3]);
+  CHECK_EQUAL_64(0x8899AABBCCDDEEFFUL, x7);
+  CHECK_EQUAL_64(0xFFEEDDCCBBAA9988UL, dst[2]);
+  CHECK_EQUAL_64(0x8899AABBCCDDEEFFUL, dst[3]);
   CHECK_EQUAL_64(0x0011223344556677UL, dst[4]);
   CHECK_EQUAL_64(src_base, x24);
   CHECK_EQUAL_64(dst_base, x25);
@@ -6513,8 +6507,8 @@
   INIT_V8();
   SETUP();
 
-  uint64_t src[4] = {0x0011223344556677UL, 0x8899aabbccddeeffUL,
-                     0xffeeddccbbaa9988UL, 0x7766554433221100UL};
+  uint64_t src[4] = {0x0011223344556677UL, 0x8899AABBCCDDEEFFUL,
+                     0xFFEEDDCCBBAA9988UL, 0x7766554433221100UL};
   uint64_t dst[5] = {0, 0, 0, 0, 0};
   uintptr_t src_base = reinterpret_cast<uintptr_t>(src);
   uintptr_t dst_base = reinterpret_cast<uintptr_t>(dst);
@@ -6542,15 +6536,15 @@
   CHECK_EQUAL_64(0x44556677, x0);
   CHECK_EQUAL_64(0x00112233, x1);
   CHECK_EQUAL_64(0x00112233, x2);
-  CHECK_EQUAL_64(0xccddeeff, x3);
+  CHECK_EQUAL_64(0xCCDDEEFF, x3);
   CHECK_EQUAL_64(0x4455667700112233UL, dst[0]);
   CHECK_EQUAL_64(0x0000000000112233UL, dst[1]);
   CHECK_EQUAL_64(0x0011223344556677UL, x4);
-  CHECK_EQUAL_64(0x8899aabbccddeeffUL, x5);
-  CHECK_EQUAL_64(0x8899aabbccddeeffUL, x6);
-  CHECK_EQUAL_64(0xffeeddccbbaa9988UL, x7);
-  CHECK_EQUAL_64(0xffeeddccbbaa9988UL, dst[2]);
-  CHECK_EQUAL_64(0x8899aabbccddeeffUL, dst[3]);
+  CHECK_EQUAL_64(0x8899AABBCCDDEEFFUL, x5);
+  CHECK_EQUAL_64(0x8899AABBCCDDEEFFUL, x6);
+  CHECK_EQUAL_64(0xFFEEDDCCBBAA9988UL, x7);
+  CHECK_EQUAL_64(0xFFEEDDCCBBAA9988UL, dst[2]);
+  CHECK_EQUAL_64(0x8899AABBCCDDEEFFUL, dst[3]);
   CHECK_EQUAL_64(0x0011223344556677UL, dst[4]);
   CHECK_EQUAL_64(src_base, x16);
   CHECK_EQUAL_64(dst_base, x17);
@@ -6568,7 +6562,7 @@
   INIT_V8();
   SETUP();
 
-  uint64_t src[4] = {0x0011223344556677, 0x8899aabbccddeeff, 0xffeeddccbbaa9988,
+  uint64_t src[4] = {0x0011223344556677, 0x8899AABBCCDDEEFF, 0xFFEEDDCCBBAA9988,
                      0x7766554433221100};
   uint64_t dst[5] = {0, 0, 0, 0, 0};
   uintptr_t src_base = reinterpret_cast<uintptr_t>(src);
@@ -6605,15 +6599,15 @@
   CHECK_EQUAL_64(0x44556677, x0);
   CHECK_EQUAL_64(0x00112233, x1);
   CHECK_EQUAL_64(0x00112233, x2);
-  CHECK_EQUAL_64(0xccddeeff, x3);
+  CHECK_EQUAL_64(0xCCDDEEFF, x3);
   CHECK_EQUAL_64(0x4455667700112233UL, dst[0]);
   CHECK_EQUAL_64(0x0000000000112233UL, dst[1]);
   CHECK_EQUAL_64(0x0011223344556677UL, x4);
-  CHECK_EQUAL_64(0x8899aabbccddeeffUL, x5);
-  CHECK_EQUAL_64(0x8899aabbccddeeffUL, x6);
-  CHECK_EQUAL_64(0xffeeddccbbaa9988UL, x7);
-  CHECK_EQUAL_64(0xffeeddccbbaa9988UL, dst[2]);
-  CHECK_EQUAL_64(0x8899aabbccddeeffUL, dst[3]);
+  CHECK_EQUAL_64(0x8899AABBCCDDEEFFUL, x5);
+  CHECK_EQUAL_64(0x8899AABBCCDDEEFFUL, x6);
+  CHECK_EQUAL_64(0xFFEEDDCCBBAA9988UL, x7);
+  CHECK_EQUAL_64(0xFFEEDDCCBBAA9988UL, dst[2]);
+  CHECK_EQUAL_64(0x8899AABBCCDDEEFFUL, dst[3]);
   CHECK_EQUAL_64(0x0011223344556677UL, dst[4]);
   CHECK_EQUAL_64(src_base + base_offset, x24);
   CHECK_EQUAL_64(dst_base - base_offset, x25);
@@ -6631,7 +6625,7 @@
   INIT_V8();
   SETUP();
 
-  uint32_t src[2] = {0x80000000, 0x7fffffff};
+  uint32_t src[2] = {0x80000000, 0x7FFFFFFF};
   uintptr_t src_base = reinterpret_cast<uintptr_t>(src);
 
   START();
@@ -6641,8 +6635,8 @@
 
   RUN();
 
-  CHECK_EQUAL_64(0xffffffff80000000UL, x0);
-  CHECK_EQUAL_64(0x000000007fffffffUL, x1);
+  CHECK_EQUAL_64(0xFFFFFFFF80000000UL, x0);
+  CHECK_EQUAL_64(0x000000007FFFFFFFUL, x1);
 
   TEARDOWN();
 }
@@ -6652,7 +6646,7 @@
   INIT_V8();
   SETUP();
 
-  int64_t src[2] = {0x0123456789abcdefUL, 0x0123456789abcdefUL};
+  int64_t src[2] = {0x0123456789ABCDEFUL, 0x0123456789ABCDEFUL};
   int64_t dst[5] = {0, 0, 0, 0, 0};
   uintptr_t src_base = reinterpret_cast<uintptr_t>(src);
   uintptr_t dst_base = reinterpret_cast<uintptr_t>(dst);
@@ -6675,13 +6669,13 @@
 
   RUN();
 
-  CHECK_EQUAL_64(0x6789abcd, x0);
-  CHECK_EQUAL_64(0x6789abcd0000L, dst[0]);
-  CHECK_EQUAL_64(0xabcdef0123456789L, x1);
-  CHECK_EQUAL_64(0xcdef012345678900L, dst[1]);
-  CHECK_EQUAL_64(0x000000ab, dst[2]);
-  CHECK_EQUAL_64(0xabcdef01, x2);
-  CHECK_EQUAL_64(0x00abcdef01000000L, dst[3]);
+  CHECK_EQUAL_64(0x6789ABCD, x0);
+  CHECK_EQUAL_64(0x6789ABCD0000L, dst[0]);
+  CHECK_EQUAL_64(0xABCDEF0123456789L, x1);
+  CHECK_EQUAL_64(0xCDEF012345678900L, dst[1]);
+  CHECK_EQUAL_64(0x000000AB, dst[2]);
+  CHECK_EQUAL_64(0xABCDEF01, x2);
+  CHECK_EQUAL_64(0x00ABCDEF01000000L, dst[3]);
   CHECK_EQUAL_64(0x00000001, x3);
   CHECK_EQUAL_64(0x0100000000000000L, dst[4]);
   CHECK_EQUAL_64(src_base, x17);
@@ -6698,7 +6692,7 @@
 
   START();
 
-  __ Ldr(x1, Immediate(0x1234567890abcdefUL));
+  __ Ldr(x1, Immediate(0x1234567890ABCDEFUL));
 
   {
     v8::internal::PatchingAssembler::BlockPoolsScope scope(&masm);
@@ -6708,14 +6702,14 @@
     }
   }
 
-  __ Ldr(x2, Immediate(0x1234567890abcdefUL));
+  __ Ldr(x2, Immediate(0x1234567890ABCDEFUL));
 
   END();
 
   RUN();
 
-  CHECK_EQUAL_64(0x1234567890abcdefUL, x1);
-  CHECK_EQUAL_64(0x1234567890abcdefUL, x2);
+  CHECK_EQUAL_64(0x1234567890ABCDEFUL, x1);
+  CHECK_EQUAL_64(0x1234567890ABCDEFUL, x2);
 
   TEARDOWN();
 }
@@ -6725,13 +6719,13 @@
   SETUP();
 
   START();
-  __ Ldr(x2, Immediate(0x1234567890abcdefUL));
+  __ Ldr(x2, Immediate(0x1234567890ABCDEFUL));
   __ Ldr(d13, 1.234);
   END();
 
   RUN();
 
-  CHECK_EQUAL_64(0x1234567890abcdefUL, x2);
+  CHECK_EQUAL_64(0x1234567890ABCDEFUL, x2);
   CHECK_EQUAL_FP64(1.234, d13);
 
   TEARDOWN();
@@ -6764,7 +6758,7 @@
   __ CheckConstPool(true, true);
   CHECK_CONSTANT_POOL_SIZE(0);
 
-  __ Ldr(x0, Immediate(0x1234567890abcdefUL));
+  __ Ldr(x0, Immediate(0x1234567890ABCDEFUL));
   __ Ldr(d0, 1.234);
   CHECK_CONSTANT_POOL_SIZE(16);
 
@@ -6805,7 +6799,7 @@
   CHECK_CONSTANT_POOL_SIZE(0);
 
   // These loads should be after the pool (and will require a new one).
-  __ Ldr(x4, Immediate(0x34567890abcdef12UL));
+  __ Ldr(x4, Immediate(0x34567890ABCDEF12UL));
   __ Ldr(d4, 123.4);
   CHECK_CONSTANT_POOL_SIZE(16);
   END();
@@ -6813,9 +6807,9 @@
   RUN();
 
   // Check that the literals loaded correctly.
-  CHECK_EQUAL_64(0x1234567890abcdefUL, x0);
+  CHECK_EQUAL_64(0x1234567890ABCDEFUL, x0);
   CHECK_EQUAL_FP64(1.234, d0);
-  CHECK_EQUAL_64(0x34567890abcdef12UL, x4);
+  CHECK_EQUAL_64(0x34567890ABCDEF12UL, x4);
   CHECK_EQUAL_FP64(123.4, d4);
 
   TEARDOWN();
@@ -6859,17 +6853,17 @@
   START();
   __ Mov(x0, 0x0);
   __ Mov(x1, 0x1111);
-  __ Mov(x2, 0xffffffffffffffffL);
+  __ Mov(x2, 0xFFFFFFFFFFFFFFFFL);
   __ Mov(x3, 0x8000000000000000L);
 
   __ Add(x10, x0, Operand(0x123));
   __ Add(x11, x1, Operand(0x122000));
-  __ Add(x12, x0, Operand(0xabc << 12));
+  __ Add(x12, x0, Operand(0xABC << 12));
   __ Add(x13, x2, Operand(1));
 
   __ Add(w14, w0, Operand(0x123));
   __ Add(w15, w1, Operand(0x122000));
-  __ Add(w16, w0, Operand(0xabc << 12));
+  __ Add(w16, w0, Operand(0xABC << 12));
   __ Add(w17, w2, Operand(1));
 
   __ Sub(x20, x0, Operand(0x1));
@@ -6887,23 +6881,23 @@
 
   CHECK_EQUAL_64(0x123, x10);
   CHECK_EQUAL_64(0x123111, x11);
-  CHECK_EQUAL_64(0xabc000, x12);
+  CHECK_EQUAL_64(0xABC000, x12);
   CHECK_EQUAL_64(0x0, x13);
 
   CHECK_EQUAL_32(0x123, w14);
   CHECK_EQUAL_32(0x123111, w15);
-  CHECK_EQUAL_32(0xabc000, w16);
+  CHECK_EQUAL_32(0xABC000, w16);
   CHECK_EQUAL_32(0x0, w17);
 
-  CHECK_EQUAL_64(0xffffffffffffffffL, x20);
+  CHECK_EQUAL_64(0xFFFFFFFFFFFFFFFFL, x20);
   CHECK_EQUAL_64(0x1000, x21);
   CHECK_EQUAL_64(0x111, x22);
-  CHECK_EQUAL_64(0x7fffffffffffffffL, x23);
+  CHECK_EQUAL_64(0x7FFFFFFFFFFFFFFFL, x23);
 
-  CHECK_EQUAL_32(0xffffffff, w24);
+  CHECK_EQUAL_32(0xFFFFFFFF, w24);
   CHECK_EQUAL_32(0x1000, w25);
   CHECK_EQUAL_32(0x111, w26);
-  CHECK_EQUAL_32(0xffffffff, w27);
+  CHECK_EQUAL_32(0xFFFFFFFF, w27);
 
   TEARDOWN();
 }
@@ -6917,22 +6911,22 @@
   __ Mov(x0, 0x0);
   __ Mov(x1, 0x1);
 
-  __ Add(x10, x0, Operand(0x1234567890abcdefUL));
-  __ Add(x11, x1, Operand(0xffffffff));
+  __ Add(x10, x0, Operand(0x1234567890ABCDEFUL));
+  __ Add(x11, x1, Operand(0xFFFFFFFF));
 
   __ Add(w12, w0, Operand(0x12345678));
-  __ Add(w13, w1, Operand(0xffffffff));
+  __ Add(w13, w1, Operand(0xFFFFFFFF));
 
   __ Add(w18, w0, Operand(kWMinInt));
   __ Sub(w19, w0, Operand(kWMinInt));
 
-  __ Sub(x20, x0, Operand(0x1234567890abcdefUL));
+  __ Sub(x20, x0, Operand(0x1234567890ABCDEFUL));
   __ Sub(w21, w0, Operand(0x12345678));
   END();
 
   RUN();
 
-  CHECK_EQUAL_64(0x1234567890abcdefUL, x10);
+  CHECK_EQUAL_64(0x1234567890ABCDEFUL, x10);
   CHECK_EQUAL_64(0x100000000UL, x11);
 
   CHECK_EQUAL_32(0x12345678, w12);
@@ -6941,7 +6935,7 @@
   CHECK_EQUAL_32(kWMinInt, w18);
   CHECK_EQUAL_32(kWMinInt, w19);
 
-  CHECK_EQUAL_64(-0x1234567890abcdefUL, x20);
+  CHECK_EQUAL_64(-0x1234567890ABCDEFUL, x20);
   CHECK_EQUAL_32(-0x12345678, w21);
 
   TEARDOWN();
@@ -6954,9 +6948,9 @@
 
   START();
   __ Mov(x0, 0);
-  __ Mov(x1, 0x0123456789abcdefL);
-  __ Mov(x2, 0xfedcba9876543210L);
-  __ Mov(x3, 0xffffffffffffffffL);
+  __ Mov(x1, 0x0123456789ABCDEFL);
+  __ Mov(x2, 0xFEDCBA9876543210L);
+  __ Mov(x3, 0xFFFFFFFFFFFFFFFFL);
 
   __ Add(x10, x1, Operand(x2));
   __ Add(x11, x0, Operand(x1, LSL, 8));
@@ -6979,23 +6973,23 @@
 
   RUN();
 
-  CHECK_EQUAL_64(0xffffffffffffffffL, x10);
-  CHECK_EQUAL_64(0x23456789abcdef00L, x11);
-  CHECK_EQUAL_64(0x000123456789abcdL, x12);
-  CHECK_EQUAL_64(0x000123456789abcdL, x13);
-  CHECK_EQUAL_64(0xfffedcba98765432L, x14);
-  CHECK_EQUAL_64(0xff89abcd, x15);
-  CHECK_EQUAL_64(0xef89abcc, x18);
-  CHECK_EQUAL_64(0xef0123456789abccL, x19);
+  CHECK_EQUAL_64(0xFFFFFFFFFFFFFFFFL, x10);
+  CHECK_EQUAL_64(0x23456789ABCDEF00L, x11);
+  CHECK_EQUAL_64(0x000123456789ABCDL, x12);
+  CHECK_EQUAL_64(0x000123456789ABCDL, x13);
+  CHECK_EQUAL_64(0xFFFEDCBA98765432L, x14);
+  CHECK_EQUAL_64(0xFF89ABCD, x15);
+  CHECK_EQUAL_64(0xEF89ABCC, x18);
+  CHECK_EQUAL_64(0xEF0123456789ABCCL, x19);
 
-  CHECK_EQUAL_64(0x0123456789abcdefL, x20);
-  CHECK_EQUAL_64(0xdcba9876543210ffL, x21);
-  CHECK_EQUAL_64(0xfffedcba98765432L, x22);
-  CHECK_EQUAL_64(0xfffedcba98765432L, x23);
-  CHECK_EQUAL_64(0x000123456789abcdL, x24);
+  CHECK_EQUAL_64(0x0123456789ABCDEFL, x20);
+  CHECK_EQUAL_64(0xDCBA9876543210FFL, x21);
+  CHECK_EQUAL_64(0xFFFEDCBA98765432L, x22);
+  CHECK_EQUAL_64(0xFFFEDCBA98765432L, x23);
+  CHECK_EQUAL_64(0x000123456789ABCDL, x24);
   CHECK_EQUAL_64(0x00765432, x25);
   CHECK_EQUAL_64(0x10765432, x26);
-  CHECK_EQUAL_64(0x10fedcba98765432L, x27);
+  CHECK_EQUAL_64(0x10FEDCBA98765432L, x27);
 
   TEARDOWN();
 }
@@ -7007,8 +7001,8 @@
 
   START();
   __ Mov(x0, 0);
-  __ Mov(x1, 0x0123456789abcdefL);
-  __ Mov(x2, 0xfedcba9876543210L);
+  __ Mov(x1, 0x0123456789ABCDEFL);
+  __ Mov(x2, 0xFEDCBA9876543210L);
   __ Mov(w3, 0x80);
 
   __ Add(x10, x0, Operand(x1, UXTB, 0));
@@ -7041,30 +7035,30 @@
 
   RUN();
 
-  CHECK_EQUAL_64(0xefL, x10);
-  CHECK_EQUAL_64(0x1deL, x11);
-  CHECK_EQUAL_64(0x337bcL, x12);
-  CHECK_EQUAL_64(0x89abcdef0L, x13);
+  CHECK_EQUAL_64(0xEFL, x10);
+  CHECK_EQUAL_64(0x1DEL, x11);
+  CHECK_EQUAL_64(0x337BCL, x12);
+  CHECK_EQUAL_64(0x89ABCDEF0L, x13);
 
-  CHECK_EQUAL_64(0xffffffffffffffefL, x14);
-  CHECK_EQUAL_64(0xffffffffffffffdeL, x15);
-  CHECK_EQUAL_64(0xffffffffffff37bcL, x16);
-  CHECK_EQUAL_64(0xfffffffc4d5e6f78L, x17);
+  CHECK_EQUAL_64(0xFFFFFFFFFFFFFFEFL, x14);
+  CHECK_EQUAL_64(0xFFFFFFFFFFFFFFDEL, x15);
+  CHECK_EQUAL_64(0xFFFFFFFFFFFF37BCL, x16);
+  CHECK_EQUAL_64(0xFFFFFFFC4D5E6F78L, x17);
   CHECK_EQUAL_64(0x10L, x18);
   CHECK_EQUAL_64(0x20L, x19);
-  CHECK_EQUAL_64(0xc840L, x20);
-  CHECK_EQUAL_64(0x3b2a19080L, x21);
+  CHECK_EQUAL_64(0xC840L, x20);
+  CHECK_EQUAL_64(0x3B2A19080L, x21);
 
-  CHECK_EQUAL_64(0x0123456789abce0fL, x22);
-  CHECK_EQUAL_64(0x0123456789abcdcfL, x23);
+  CHECK_EQUAL_64(0x0123456789ABCE0FL, x22);
+  CHECK_EQUAL_64(0x0123456789ABCDCFL, x23);
 
-  CHECK_EQUAL_32(0x89abce2f, w24);
-  CHECK_EQUAL_32(0xffffffef, w25);
-  CHECK_EQUAL_32(0xffffffde, w26);
-  CHECK_EQUAL_32(0xc3b2a188, w27);
+  CHECK_EQUAL_32(0x89ABCE2F, w24);
+  CHECK_EQUAL_32(0xFFFFFFEF, w25);
+  CHECK_EQUAL_32(0xFFFFFFDE, w26);
+  CHECK_EQUAL_32(0xC3B2A188, w27);
 
-  CHECK_EQUAL_32(0x4d5e6f78, w28);
-  CHECK_EQUAL_64(0xfffffffc4d5e6f78L, x29);
+  CHECK_EQUAL_32(0x4D5E6F78, w28);
+  CHECK_EQUAL_64(0xFFFFFFFC4D5E6F78L, x29);
 
   CHECK_EQUAL_64(256, x30);
 
@@ -7094,7 +7088,7 @@
   __ Add(w19, w3, -0x344);
   __ Add(w20, w4, -2000);
 
-  __ Sub(w21, w3, -0xbc);
+  __ Sub(w21, w3, -0xBC);
   __ Sub(w22, w4, -2000);
   END();
 
@@ -7106,7 +7100,7 @@
 
   CHECK_EQUAL_64(600, x13);
   CHECK_EQUAL_64(5000, x14);
-  CHECK_EQUAL_64(0x1122334455667cdd, x15);
+  CHECK_EQUAL_64(0x1122334455667CDD, x15);
 
   CHECK_EQUAL_32(0x11223000, w19);
   CHECK_EQUAL_32(398000, w20);
@@ -7164,8 +7158,7 @@
   // pre-shifted encodable immediate followed by a post-shift applied to
   // the arithmetic or logical operation.
 
-  // Save csp and change stack pointer to avoid consistency check.
-  __ SetStackPointer(jssp);
+  // Save csp.
   __ Mov(x29, csp);
 
   // Set the registers to known values.
@@ -7173,28 +7166,28 @@
   __ Mov(csp, 0x1000);
 
   // Arithmetic ops.
-  __ Add(x1, x0, 0x1f7de);
-  __ Add(w2, w0, 0xffffff1);
+  __ Add(x1, x0, 0x1F7DE);
+  __ Add(w2, w0, 0xFFFFFF1);
   __ Adds(x3, x0, 0x18001);
-  __ Adds(w4, w0, 0xffffff1);
+  __ Adds(w4, w0, 0xFFFFFF1);
   __ Add(x5, x0, 0x10100);
-  __ Sub(w6, w0, 0xffffff1);
+  __ Sub(w6, w0, 0xFFFFFF1);
   __ Subs(x7, x0, 0x18001);
-  __ Subs(w8, w0, 0xffffff1);
+  __ Subs(w8, w0, 0xFFFFFF1);
 
   // Logical ops.
-  __ And(x9, x0, 0x1f7de);
-  __ Orr(w10, w0, 0xffffff1);
+  __ And(x9, x0, 0x1F7DE);
+  __ Orr(w10, w0, 0xFFFFFF1);
   __ Eor(x11, x0, 0x18001);
 
   // Ops using the stack pointer.
-  __ Add(csp, csp, 0x1f7f0);
+  __ Add(csp, csp, 0x1F7F0);
   __ Mov(x12, csp);
   __ Mov(csp, 0x1000);
 
-  __ Adds(x13, csp, 0x1f7f0);
+  __ Adds(x13, csp, 0x1F7F0);
 
-  __ Orr(csp, x0, 0x1f7f0);
+  __ Orr(csp, x0, 0x1F7F0);
   __ Mov(x14, csp);
   __ Mov(csp, 0x1000);
 
@@ -7203,25 +7196,24 @@
 
   //  Restore csp.
   __ Mov(csp, x29);
-  __ SetStackPointer(csp);
   END();
 
   RUN();
 
   CHECK_EQUAL_64(0x1000, x0);
-  CHECK_EQUAL_64(0x207de, x1);
-  CHECK_EQUAL_64(0x10000ff1, x2);
+  CHECK_EQUAL_64(0x207DE, x1);
+  CHECK_EQUAL_64(0x10000FF1, x2);
   CHECK_EQUAL_64(0x19001, x3);
-  CHECK_EQUAL_64(0x10000ff1, x4);
+  CHECK_EQUAL_64(0x10000FF1, x4);
   CHECK_EQUAL_64(0x11100, x5);
-  CHECK_EQUAL_64(0xf000100f, x6);
-  CHECK_EQUAL_64(0xfffffffffffe8fff, x7);
-  CHECK_EQUAL_64(0xf000100f, x8);
+  CHECK_EQUAL_64(0xF000100F, x6);
+  CHECK_EQUAL_64(0xFFFFFFFFFFFE8FFF, x7);
+  CHECK_EQUAL_64(0xF000100F, x8);
   CHECK_EQUAL_64(0x1000, x9);
-  CHECK_EQUAL_64(0xffffff1, x10);
-  CHECK_EQUAL_64(0x207f0, x12);
-  CHECK_EQUAL_64(0x207f0, x13);
-  CHECK_EQUAL_64(0x1f7f0, x14);
+  CHECK_EQUAL_64(0xFFFFFF1, x10);
+  CHECK_EQUAL_64(0x207F0, x12);
+  CHECK_EQUAL_64(0x207F0, x13);
+  CHECK_EQUAL_64(0x1F7F0, x14);
   CHECK_EQUAL_64(0x11100, x15);
 
   TEARDOWN();
@@ -7262,7 +7254,7 @@
   SETUP();
 
   START();
-  __ Mov(x0, 0xf123456789abcdefL);
+  __ Mov(x0, 0xF123456789ABCDEFL);
 
   // Immediate.
   __ Neg(x1, 0x123);
@@ -7287,17 +7279,17 @@
 
   RUN();
 
-  CHECK_EQUAL_64(0xfffffffffffffeddUL, x1);
-  CHECK_EQUAL_64(0xfffffedd, x2);
-  CHECK_EQUAL_64(0x1db97530eca86422UL, x3);
-  CHECK_EQUAL_64(0xd950c844, x4);
-  CHECK_EQUAL_64(0xe1db97530eca8643UL, x5);
-  CHECK_EQUAL_64(0xf7654322, x6);
-  CHECK_EQUAL_64(0x0076e5d4c3b2a191UL, x7);
-  CHECK_EQUAL_64(0x01d950c9, x8);
-  CHECK_EQUAL_64(0xffffff11, x9);
+  CHECK_EQUAL_64(0xFFFFFFFFFFFFFEDDUL, x1);
+  CHECK_EQUAL_64(0xFFFFFEDD, x2);
+  CHECK_EQUAL_64(0x1DB97530ECA86422UL, x3);
+  CHECK_EQUAL_64(0xD950C844, x4);
+  CHECK_EQUAL_64(0xE1DB97530ECA8643UL, x5);
+  CHECK_EQUAL_64(0xF7654322, x6);
+  CHECK_EQUAL_64(0x0076E5D4C3B2A191UL, x7);
+  CHECK_EQUAL_64(0x01D950C9, x8);
+  CHECK_EQUAL_64(0xFFFFFF11, x9);
   CHECK_EQUAL_64(0x0000000000000022UL, x10);
-  CHECK_EQUAL_64(0xfffcc844, x11);
+  CHECK_EQUAL_64(0xFFFCC844, x11);
   CHECK_EQUAL_64(0x0000000000019088UL, x12);
   CHECK_EQUAL_64(0x65432110, x13);
   CHECK_EQUAL_64(0x0000000765432110UL, x14);
@@ -7339,9 +7331,9 @@
 TEST(adcs_sbcs_x) {
   INIT_V8();
   uint64_t inputs[] = {
-      0x0000000000000000, 0x0000000000000001, 0x7ffffffffffffffe,
-      0x7fffffffffffffff, 0x8000000000000000, 0x8000000000000001,
-      0xfffffffffffffffe, 0xffffffffffffffff,
+      0x0000000000000000, 0x0000000000000001, 0x7FFFFFFFFFFFFFFE,
+      0x7FFFFFFFFFFFFFFF, 0x8000000000000000, 0x8000000000000001,
+      0xFFFFFFFFFFFFFFFE, 0xFFFFFFFFFFFFFFFF,
   };
   static const size_t input_count = sizeof(inputs) / sizeof(inputs[0]);
 
@@ -7355,134 +7347,134 @@
   static const Expected expected_adcs_x[input_count][input_count] = {
       {{0x0000000000000000, ZFlag, 0x0000000000000001, NoFlag},
        {0x0000000000000001, NoFlag, 0x0000000000000002, NoFlag},
-       {0x7ffffffffffffffe, NoFlag, 0x7fffffffffffffff, NoFlag},
-       {0x7fffffffffffffff, NoFlag, 0x8000000000000000, NVFlag},
+       {0x7FFFFFFFFFFFFFFE, NoFlag, 0x7FFFFFFFFFFFFFFF, NoFlag},
+       {0x7FFFFFFFFFFFFFFF, NoFlag, 0x8000000000000000, NVFlag},
        {0x8000000000000000, NFlag, 0x8000000000000001, NFlag},
        {0x8000000000000001, NFlag, 0x8000000000000002, NFlag},
-       {0xfffffffffffffffe, NFlag, 0xffffffffffffffff, NFlag},
-       {0xffffffffffffffff, NFlag, 0x0000000000000000, ZCFlag}},
+       {0xFFFFFFFFFFFFFFFE, NFlag, 0xFFFFFFFFFFFFFFFF, NFlag},
+       {0xFFFFFFFFFFFFFFFF, NFlag, 0x0000000000000000, ZCFlag}},
       {{0x0000000000000001, NoFlag, 0x0000000000000002, NoFlag},
        {0x0000000000000002, NoFlag, 0x0000000000000003, NoFlag},
-       {0x7fffffffffffffff, NoFlag, 0x8000000000000000, NVFlag},
+       {0x7FFFFFFFFFFFFFFF, NoFlag, 0x8000000000000000, NVFlag},
        {0x8000000000000000, NVFlag, 0x8000000000000001, NVFlag},
        {0x8000000000000001, NFlag, 0x8000000000000002, NFlag},
        {0x8000000000000002, NFlag, 0x8000000000000003, NFlag},
-       {0xffffffffffffffff, NFlag, 0x0000000000000000, ZCFlag},
+       {0xFFFFFFFFFFFFFFFF, NFlag, 0x0000000000000000, ZCFlag},
        {0x0000000000000000, ZCFlag, 0x0000000000000001, CFlag}},
-      {{0x7ffffffffffffffe, NoFlag, 0x7fffffffffffffff, NoFlag},
-       {0x7fffffffffffffff, NoFlag, 0x8000000000000000, NVFlag},
-       {0xfffffffffffffffc, NVFlag, 0xfffffffffffffffd, NVFlag},
-       {0xfffffffffffffffd, NVFlag, 0xfffffffffffffffe, NVFlag},
-       {0xfffffffffffffffe, NFlag, 0xffffffffffffffff, NFlag},
-       {0xffffffffffffffff, NFlag, 0x0000000000000000, ZCFlag},
-       {0x7ffffffffffffffc, CFlag, 0x7ffffffffffffffd, CFlag},
-       {0x7ffffffffffffffd, CFlag, 0x7ffffffffffffffe, CFlag}},
-      {{0x7fffffffffffffff, NoFlag, 0x8000000000000000, NVFlag},
+      {{0x7FFFFFFFFFFFFFFE, NoFlag, 0x7FFFFFFFFFFFFFFF, NoFlag},
+       {0x7FFFFFFFFFFFFFFF, NoFlag, 0x8000000000000000, NVFlag},
+       {0xFFFFFFFFFFFFFFFC, NVFlag, 0xFFFFFFFFFFFFFFFD, NVFlag},
+       {0xFFFFFFFFFFFFFFFD, NVFlag, 0xFFFFFFFFFFFFFFFE, NVFlag},
+       {0xFFFFFFFFFFFFFFFE, NFlag, 0xFFFFFFFFFFFFFFFF, NFlag},
+       {0xFFFFFFFFFFFFFFFF, NFlag, 0x0000000000000000, ZCFlag},
+       {0x7FFFFFFFFFFFFFFC, CFlag, 0x7FFFFFFFFFFFFFFD, CFlag},
+       {0x7FFFFFFFFFFFFFFD, CFlag, 0x7FFFFFFFFFFFFFFE, CFlag}},
+      {{0x7FFFFFFFFFFFFFFF, NoFlag, 0x8000000000000000, NVFlag},
        {0x8000000000000000, NVFlag, 0x8000000000000001, NVFlag},
-       {0xfffffffffffffffd, NVFlag, 0xfffffffffffffffe, NVFlag},
-       {0xfffffffffffffffe, NVFlag, 0xffffffffffffffff, NVFlag},
-       {0xffffffffffffffff, NFlag, 0x0000000000000000, ZCFlag},
+       {0xFFFFFFFFFFFFFFFD, NVFlag, 0xFFFFFFFFFFFFFFFE, NVFlag},
+       {0xFFFFFFFFFFFFFFFE, NVFlag, 0xFFFFFFFFFFFFFFFF, NVFlag},
+       {0xFFFFFFFFFFFFFFFF, NFlag, 0x0000000000000000, ZCFlag},
        {0x0000000000000000, ZCFlag, 0x0000000000000001, CFlag},
-       {0x7ffffffffffffffd, CFlag, 0x7ffffffffffffffe, CFlag},
-       {0x7ffffffffffffffe, CFlag, 0x7fffffffffffffff, CFlag}},
+       {0x7FFFFFFFFFFFFFFD, CFlag, 0x7FFFFFFFFFFFFFFE, CFlag},
+       {0x7FFFFFFFFFFFFFFE, CFlag, 0x7FFFFFFFFFFFFFFF, CFlag}},
       {{0x8000000000000000, NFlag, 0x8000000000000001, NFlag},
        {0x8000000000000001, NFlag, 0x8000000000000002, NFlag},
-       {0xfffffffffffffffe, NFlag, 0xffffffffffffffff, NFlag},
-       {0xffffffffffffffff, NFlag, 0x0000000000000000, ZCFlag},
+       {0xFFFFFFFFFFFFFFFE, NFlag, 0xFFFFFFFFFFFFFFFF, NFlag},
+       {0xFFFFFFFFFFFFFFFF, NFlag, 0x0000000000000000, ZCFlag},
        {0x0000000000000000, ZCVFlag, 0x0000000000000001, CVFlag},
        {0x0000000000000001, CVFlag, 0x0000000000000002, CVFlag},
-       {0x7ffffffffffffffe, CVFlag, 0x7fffffffffffffff, CVFlag},
-       {0x7fffffffffffffff, CVFlag, 0x8000000000000000, NCFlag}},
+       {0x7FFFFFFFFFFFFFFE, CVFlag, 0x7FFFFFFFFFFFFFFF, CVFlag},
+       {0x7FFFFFFFFFFFFFFF, CVFlag, 0x8000000000000000, NCFlag}},
       {{0x8000000000000001, NFlag, 0x8000000000000002, NFlag},
        {0x8000000000000002, NFlag, 0x8000000000000003, NFlag},
-       {0xffffffffffffffff, NFlag, 0x0000000000000000, ZCFlag},
+       {0xFFFFFFFFFFFFFFFF, NFlag, 0x0000000000000000, ZCFlag},
        {0x0000000000000000, ZCFlag, 0x0000000000000001, CFlag},
        {0x0000000000000001, CVFlag, 0x0000000000000002, CVFlag},
        {0x0000000000000002, CVFlag, 0x0000000000000003, CVFlag},
-       {0x7fffffffffffffff, CVFlag, 0x8000000000000000, NCFlag},
+       {0x7FFFFFFFFFFFFFFF, CVFlag, 0x8000000000000000, NCFlag},
        {0x8000000000000000, NCFlag, 0x8000000000000001, NCFlag}},
-      {{0xfffffffffffffffe, NFlag, 0xffffffffffffffff, NFlag},
-       {0xffffffffffffffff, NFlag, 0x0000000000000000, ZCFlag},
-       {0x7ffffffffffffffc, CFlag, 0x7ffffffffffffffd, CFlag},
-       {0x7ffffffffffffffd, CFlag, 0x7ffffffffffffffe, CFlag},
-       {0x7ffffffffffffffe, CVFlag, 0x7fffffffffffffff, CVFlag},
-       {0x7fffffffffffffff, CVFlag, 0x8000000000000000, NCFlag},
-       {0xfffffffffffffffc, NCFlag, 0xfffffffffffffffd, NCFlag},
-       {0xfffffffffffffffd, NCFlag, 0xfffffffffffffffe, NCFlag}},
-      {{0xffffffffffffffff, NFlag, 0x0000000000000000, ZCFlag},
+      {{0xFFFFFFFFFFFFFFFE, NFlag, 0xFFFFFFFFFFFFFFFF, NFlag},
+       {0xFFFFFFFFFFFFFFFF, NFlag, 0x0000000000000000, ZCFlag},
+       {0x7FFFFFFFFFFFFFFC, CFlag, 0x7FFFFFFFFFFFFFFD, CFlag},
+       {0x7FFFFFFFFFFFFFFD, CFlag, 0x7FFFFFFFFFFFFFFE, CFlag},
+       {0x7FFFFFFFFFFFFFFE, CVFlag, 0x7FFFFFFFFFFFFFFF, CVFlag},
+       {0x7FFFFFFFFFFFFFFF, CVFlag, 0x8000000000000000, NCFlag},
+       {0xFFFFFFFFFFFFFFFC, NCFlag, 0xFFFFFFFFFFFFFFFD, NCFlag},
+       {0xFFFFFFFFFFFFFFFD, NCFlag, 0xFFFFFFFFFFFFFFFE, NCFlag}},
+      {{0xFFFFFFFFFFFFFFFF, NFlag, 0x0000000000000000, ZCFlag},
        {0x0000000000000000, ZCFlag, 0x0000000000000001, CFlag},
-       {0x7ffffffffffffffd, CFlag, 0x7ffffffffffffffe, CFlag},
-       {0x7ffffffffffffffe, CFlag, 0x7fffffffffffffff, CFlag},
-       {0x7fffffffffffffff, CVFlag, 0x8000000000000000, NCFlag},
+       {0x7FFFFFFFFFFFFFFD, CFlag, 0x7FFFFFFFFFFFFFFE, CFlag},
+       {0x7FFFFFFFFFFFFFFE, CFlag, 0x7FFFFFFFFFFFFFFF, CFlag},
+       {0x7FFFFFFFFFFFFFFF, CVFlag, 0x8000000000000000, NCFlag},
        {0x8000000000000000, NCFlag, 0x8000000000000001, NCFlag},
-       {0xfffffffffffffffd, NCFlag, 0xfffffffffffffffe, NCFlag},
-       {0xfffffffffffffffe, NCFlag, 0xffffffffffffffff, NCFlag}}};
+       {0xFFFFFFFFFFFFFFFD, NCFlag, 0xFFFFFFFFFFFFFFFE, NCFlag},
+       {0xFFFFFFFFFFFFFFFE, NCFlag, 0xFFFFFFFFFFFFFFFF, NCFlag}}};
 
   static const Expected expected_sbcs_x[input_count][input_count] = {
-      {{0xffffffffffffffff, NFlag, 0x0000000000000000, ZCFlag},
-       {0xfffffffffffffffe, NFlag, 0xffffffffffffffff, NFlag},
+      {{0xFFFFFFFFFFFFFFFF, NFlag, 0x0000000000000000, ZCFlag},
+       {0xFFFFFFFFFFFFFFFE, NFlag, 0xFFFFFFFFFFFFFFFF, NFlag},
        {0x8000000000000001, NFlag, 0x8000000000000002, NFlag},
        {0x8000000000000000, NFlag, 0x8000000000000001, NFlag},
-       {0x7fffffffffffffff, NoFlag, 0x8000000000000000, NVFlag},
-       {0x7ffffffffffffffe, NoFlag, 0x7fffffffffffffff, NoFlag},
+       {0x7FFFFFFFFFFFFFFF, NoFlag, 0x8000000000000000, NVFlag},
+       {0x7FFFFFFFFFFFFFFE, NoFlag, 0x7FFFFFFFFFFFFFFF, NoFlag},
        {0x0000000000000001, NoFlag, 0x0000000000000002, NoFlag},
        {0x0000000000000000, ZFlag, 0x0000000000000001, NoFlag}},
       {{0x0000000000000000, ZCFlag, 0x0000000000000001, CFlag},
-       {0xffffffffffffffff, NFlag, 0x0000000000000000, ZCFlag},
+       {0xFFFFFFFFFFFFFFFF, NFlag, 0x0000000000000000, ZCFlag},
        {0x8000000000000002, NFlag, 0x8000000000000003, NFlag},
        {0x8000000000000001, NFlag, 0x8000000000000002, NFlag},
        {0x8000000000000000, NVFlag, 0x8000000000000001, NVFlag},
-       {0x7fffffffffffffff, NoFlag, 0x8000000000000000, NVFlag},
+       {0x7FFFFFFFFFFFFFFF, NoFlag, 0x8000000000000000, NVFlag},
        {0x0000000000000002, NoFlag, 0x0000000000000003, NoFlag},
        {0x0000000000000001, NoFlag, 0x0000000000000002, NoFlag}},
-      {{0x7ffffffffffffffd, CFlag, 0x7ffffffffffffffe, CFlag},
-       {0x7ffffffffffffffc, CFlag, 0x7ffffffffffffffd, CFlag},
-       {0xffffffffffffffff, NFlag, 0x0000000000000000, ZCFlag},
-       {0xfffffffffffffffe, NFlag, 0xffffffffffffffff, NFlag},
-       {0xfffffffffffffffd, NVFlag, 0xfffffffffffffffe, NVFlag},
-       {0xfffffffffffffffc, NVFlag, 0xfffffffffffffffd, NVFlag},
-       {0x7fffffffffffffff, NoFlag, 0x8000000000000000, NVFlag},
-       {0x7ffffffffffffffe, NoFlag, 0x7fffffffffffffff, NoFlag}},
-      {{0x7ffffffffffffffe, CFlag, 0x7fffffffffffffff, CFlag},
-       {0x7ffffffffffffffd, CFlag, 0x7ffffffffffffffe, CFlag},
+      {{0x7FFFFFFFFFFFFFFD, CFlag, 0x7FFFFFFFFFFFFFFE, CFlag},
+       {0x7FFFFFFFFFFFFFFC, CFlag, 0x7FFFFFFFFFFFFFFD, CFlag},
+       {0xFFFFFFFFFFFFFFFF, NFlag, 0x0000000000000000, ZCFlag},
+       {0xFFFFFFFFFFFFFFFE, NFlag, 0xFFFFFFFFFFFFFFFF, NFlag},
+       {0xFFFFFFFFFFFFFFFD, NVFlag, 0xFFFFFFFFFFFFFFFE, NVFlag},
+       {0xFFFFFFFFFFFFFFFC, NVFlag, 0xFFFFFFFFFFFFFFFD, NVFlag},
+       {0x7FFFFFFFFFFFFFFF, NoFlag, 0x8000000000000000, NVFlag},
+       {0x7FFFFFFFFFFFFFFE, NoFlag, 0x7FFFFFFFFFFFFFFF, NoFlag}},
+      {{0x7FFFFFFFFFFFFFFE, CFlag, 0x7FFFFFFFFFFFFFFF, CFlag},
+       {0x7FFFFFFFFFFFFFFD, CFlag, 0x7FFFFFFFFFFFFFFE, CFlag},
        {0x0000000000000000, ZCFlag, 0x0000000000000001, CFlag},
-       {0xffffffffffffffff, NFlag, 0x0000000000000000, ZCFlag},
-       {0xfffffffffffffffe, NVFlag, 0xffffffffffffffff, NVFlag},
-       {0xfffffffffffffffd, NVFlag, 0xfffffffffffffffe, NVFlag},
+       {0xFFFFFFFFFFFFFFFF, NFlag, 0x0000000000000000, ZCFlag},
+       {0xFFFFFFFFFFFFFFFE, NVFlag, 0xFFFFFFFFFFFFFFFF, NVFlag},
+       {0xFFFFFFFFFFFFFFFD, NVFlag, 0xFFFFFFFFFFFFFFFE, NVFlag},
        {0x8000000000000000, NVFlag, 0x8000000000000001, NVFlag},
-       {0x7fffffffffffffff, NoFlag, 0x8000000000000000, NVFlag}},
-      {{0x7fffffffffffffff, CVFlag, 0x8000000000000000, NCFlag},
-       {0x7ffffffffffffffe, CVFlag, 0x7fffffffffffffff, CVFlag},
+       {0x7FFFFFFFFFFFFFFF, NoFlag, 0x8000000000000000, NVFlag}},
+      {{0x7FFFFFFFFFFFFFFF, CVFlag, 0x8000000000000000, NCFlag},
+       {0x7FFFFFFFFFFFFFFE, CVFlag, 0x7FFFFFFFFFFFFFFF, CVFlag},
        {0x0000000000000001, CVFlag, 0x0000000000000002, CVFlag},
        {0x0000000000000000, ZCVFlag, 0x0000000000000001, CVFlag},
-       {0xffffffffffffffff, NFlag, 0x0000000000000000, ZCFlag},
-       {0xfffffffffffffffe, NFlag, 0xffffffffffffffff, NFlag},
+       {0xFFFFFFFFFFFFFFFF, NFlag, 0x0000000000000000, ZCFlag},
+       {0xFFFFFFFFFFFFFFFE, NFlag, 0xFFFFFFFFFFFFFFFF, NFlag},
        {0x8000000000000001, NFlag, 0x8000000000000002, NFlag},
        {0x8000000000000000, NFlag, 0x8000000000000001, NFlag}},
       {{0x8000000000000000, NCFlag, 0x8000000000000001, NCFlag},
-       {0x7fffffffffffffff, CVFlag, 0x8000000000000000, NCFlag},
+       {0x7FFFFFFFFFFFFFFF, CVFlag, 0x8000000000000000, NCFlag},
        {0x0000000000000002, CVFlag, 0x0000000000000003, CVFlag},
        {0x0000000000000001, CVFlag, 0x0000000000000002, CVFlag},
        {0x0000000000000000, ZCFlag, 0x0000000000000001, CFlag},
-       {0xffffffffffffffff, NFlag, 0x0000000000000000, ZCFlag},
+       {0xFFFFFFFFFFFFFFFF, NFlag, 0x0000000000000000, ZCFlag},
        {0x8000000000000002, NFlag, 0x8000000000000003, NFlag},
        {0x8000000000000001, NFlag, 0x8000000000000002, NFlag}},
-      {{0xfffffffffffffffd, NCFlag, 0xfffffffffffffffe, NCFlag},
-       {0xfffffffffffffffc, NCFlag, 0xfffffffffffffffd, NCFlag},
-       {0x7fffffffffffffff, CVFlag, 0x8000000000000000, NCFlag},
-       {0x7ffffffffffffffe, CVFlag, 0x7fffffffffffffff, CVFlag},
-       {0x7ffffffffffffffd, CFlag, 0x7ffffffffffffffe, CFlag},
-       {0x7ffffffffffffffc, CFlag, 0x7ffffffffffffffd, CFlag},
-       {0xffffffffffffffff, NFlag, 0x0000000000000000, ZCFlag},
-       {0xfffffffffffffffe, NFlag, 0xffffffffffffffff, NFlag}},
-      {{0xfffffffffffffffe, NCFlag, 0xffffffffffffffff, NCFlag},
-       {0xfffffffffffffffd, NCFlag, 0xfffffffffffffffe, NCFlag},
+      {{0xFFFFFFFFFFFFFFFD, NCFlag, 0xFFFFFFFFFFFFFFFE, NCFlag},
+       {0xFFFFFFFFFFFFFFFC, NCFlag, 0xFFFFFFFFFFFFFFFD, NCFlag},
+       {0x7FFFFFFFFFFFFFFF, CVFlag, 0x8000000000000000, NCFlag},
+       {0x7FFFFFFFFFFFFFFE, CVFlag, 0x7FFFFFFFFFFFFFFF, CVFlag},
+       {0x7FFFFFFFFFFFFFFD, CFlag, 0x7FFFFFFFFFFFFFFE, CFlag},
+       {0x7FFFFFFFFFFFFFFC, CFlag, 0x7FFFFFFFFFFFFFFD, CFlag},
+       {0xFFFFFFFFFFFFFFFF, NFlag, 0x0000000000000000, ZCFlag},
+       {0xFFFFFFFFFFFFFFFE, NFlag, 0xFFFFFFFFFFFFFFFF, NFlag}},
+      {{0xFFFFFFFFFFFFFFFE, NCFlag, 0xFFFFFFFFFFFFFFFF, NCFlag},
+       {0xFFFFFFFFFFFFFFFD, NCFlag, 0xFFFFFFFFFFFFFFFE, NCFlag},
        {0x8000000000000000, NCFlag, 0x8000000000000001, NCFlag},
-       {0x7fffffffffffffff, CVFlag, 0x8000000000000000, NCFlag},
-       {0x7ffffffffffffffe, CFlag, 0x7fffffffffffffff, CFlag},
-       {0x7ffffffffffffffd, CFlag, 0x7ffffffffffffffe, CFlag},
+       {0x7FFFFFFFFFFFFFFF, CVFlag, 0x8000000000000000, NCFlag},
+       {0x7FFFFFFFFFFFFFFE, CFlag, 0x7FFFFFFFFFFFFFFF, CFlag},
+       {0x7FFFFFFFFFFFFFFD, CFlag, 0x7FFFFFFFFFFFFFFE, CFlag},
        {0x0000000000000000, ZCFlag, 0x0000000000000001, CFlag},
-       {0xffffffffffffffff, NFlag, 0x0000000000000000, ZCFlag}}};
+       {0xFFFFFFFFFFFFFFFF, NFlag, 0x0000000000000000, ZCFlag}}};
 
   for (size_t left = 0; left < input_count; left++) {
     for (size_t right = 0; right < input_count; right++) {
@@ -7509,8 +7501,8 @@
 TEST(adcs_sbcs_w) {
   INIT_V8();
   uint32_t inputs[] = {
-      0x00000000, 0x00000001, 0x7ffffffe, 0x7fffffff,
-      0x80000000, 0x80000001, 0xfffffffe, 0xffffffff,
+      0x00000000, 0x00000001, 0x7FFFFFFE, 0x7FFFFFFF,
+      0x80000000, 0x80000001, 0xFFFFFFFE, 0xFFFFFFFF,
   };
   static const size_t input_count = sizeof(inputs) / sizeof(inputs[0]);
 
@@ -7524,134 +7516,134 @@
   static const Expected expected_adcs_w[input_count][input_count] = {
       {{0x00000000, ZFlag, 0x00000001, NoFlag},
        {0x00000001, NoFlag, 0x00000002, NoFlag},
-       {0x7ffffffe, NoFlag, 0x7fffffff, NoFlag},
-       {0x7fffffff, NoFlag, 0x80000000, NVFlag},
+       {0x7FFFFFFE, NoFlag, 0x7FFFFFFF, NoFlag},
+       {0x7FFFFFFF, NoFlag, 0x80000000, NVFlag},
        {0x80000000, NFlag, 0x80000001, NFlag},
        {0x80000001, NFlag, 0x80000002, NFlag},
-       {0xfffffffe, NFlag, 0xffffffff, NFlag},
-       {0xffffffff, NFlag, 0x00000000, ZCFlag}},
+       {0xFFFFFFFE, NFlag, 0xFFFFFFFF, NFlag},
+       {0xFFFFFFFF, NFlag, 0x00000000, ZCFlag}},
       {{0x00000001, NoFlag, 0x00000002, NoFlag},
        {0x00000002, NoFlag, 0x00000003, NoFlag},
-       {0x7fffffff, NoFlag, 0x80000000, NVFlag},
+       {0x7FFFFFFF, NoFlag, 0x80000000, NVFlag},
        {0x80000000, NVFlag, 0x80000001, NVFlag},
        {0x80000001, NFlag, 0x80000002, NFlag},
        {0x80000002, NFlag, 0x80000003, NFlag},
-       {0xffffffff, NFlag, 0x00000000, ZCFlag},
+       {0xFFFFFFFF, NFlag, 0x00000000, ZCFlag},
        {0x00000000, ZCFlag, 0x00000001, CFlag}},
-      {{0x7ffffffe, NoFlag, 0x7fffffff, NoFlag},
-       {0x7fffffff, NoFlag, 0x80000000, NVFlag},
-       {0xfffffffc, NVFlag, 0xfffffffd, NVFlag},
-       {0xfffffffd, NVFlag, 0xfffffffe, NVFlag},
-       {0xfffffffe, NFlag, 0xffffffff, NFlag},
-       {0xffffffff, NFlag, 0x00000000, ZCFlag},
-       {0x7ffffffc, CFlag, 0x7ffffffd, CFlag},
-       {0x7ffffffd, CFlag, 0x7ffffffe, CFlag}},
-      {{0x7fffffff, NoFlag, 0x80000000, NVFlag},
+      {{0x7FFFFFFE, NoFlag, 0x7FFFFFFF, NoFlag},
+       {0x7FFFFFFF, NoFlag, 0x80000000, NVFlag},
+       {0xFFFFFFFC, NVFlag, 0xFFFFFFFD, NVFlag},
+       {0xFFFFFFFD, NVFlag, 0xFFFFFFFE, NVFlag},
+       {0xFFFFFFFE, NFlag, 0xFFFFFFFF, NFlag},
+       {0xFFFFFFFF, NFlag, 0x00000000, ZCFlag},
+       {0x7FFFFFFC, CFlag, 0x7FFFFFFD, CFlag},
+       {0x7FFFFFFD, CFlag, 0x7FFFFFFE, CFlag}},
+      {{0x7FFFFFFF, NoFlag, 0x80000000, NVFlag},
        {0x80000000, NVFlag, 0x80000001, NVFlag},
-       {0xfffffffd, NVFlag, 0xfffffffe, NVFlag},
-       {0xfffffffe, NVFlag, 0xffffffff, NVFlag},
-       {0xffffffff, NFlag, 0x00000000, ZCFlag},
+       {0xFFFFFFFD, NVFlag, 0xFFFFFFFE, NVFlag},
+       {0xFFFFFFFE, NVFlag, 0xFFFFFFFF, NVFlag},
+       {0xFFFFFFFF, NFlag, 0x00000000, ZCFlag},
        {0x00000000, ZCFlag, 0x00000001, CFlag},
-       {0x7ffffffd, CFlag, 0x7ffffffe, CFlag},
-       {0x7ffffffe, CFlag, 0x7fffffff, CFlag}},
+       {0x7FFFFFFD, CFlag, 0x7FFFFFFE, CFlag},
+       {0x7FFFFFFE, CFlag, 0x7FFFFFFF, CFlag}},
       {{0x80000000, NFlag, 0x80000001, NFlag},
        {0x80000001, NFlag, 0x80000002, NFlag},
-       {0xfffffffe, NFlag, 0xffffffff, NFlag},
-       {0xffffffff, NFlag, 0x00000000, ZCFlag},
+       {0xFFFFFFFE, NFlag, 0xFFFFFFFF, NFlag},
+       {0xFFFFFFFF, NFlag, 0x00000000, ZCFlag},
        {0x00000000, ZCVFlag, 0x00000001, CVFlag},
        {0x00000001, CVFlag, 0x00000002, CVFlag},
-       {0x7ffffffe, CVFlag, 0x7fffffff, CVFlag},
-       {0x7fffffff, CVFlag, 0x80000000, NCFlag}},
+       {0x7FFFFFFE, CVFlag, 0x7FFFFFFF, CVFlag},
+       {0x7FFFFFFF, CVFlag, 0x80000000, NCFlag}},
       {{0x80000001, NFlag, 0x80000002, NFlag},
        {0x80000002, NFlag, 0x80000003, NFlag},
-       {0xffffffff, NFlag, 0x00000000, ZCFlag},
+       {0xFFFFFFFF, NFlag, 0x00000000, ZCFlag},
        {0x00000000, ZCFlag, 0x00000001, CFlag},
        {0x00000001, CVFlag, 0x00000002, CVFlag},
        {0x00000002, CVFlag, 0x00000003, CVFlag},
-       {0x7fffffff, CVFlag, 0x80000000, NCFlag},
+       {0x7FFFFFFF, CVFlag, 0x80000000, NCFlag},
        {0x80000000, NCFlag, 0x80000001, NCFlag}},
-      {{0xfffffffe, NFlag, 0xffffffff, NFlag},
-       {0xffffffff, NFlag, 0x00000000, ZCFlag},
-       {0x7ffffffc, CFlag, 0x7ffffffd, CFlag},
-       {0x7ffffffd, CFlag, 0x7ffffffe, CFlag},
-       {0x7ffffffe, CVFlag, 0x7fffffff, CVFlag},
-       {0x7fffffff, CVFlag, 0x80000000, NCFlag},
-       {0xfffffffc, NCFlag, 0xfffffffd, NCFlag},
-       {0xfffffffd, NCFlag, 0xfffffffe, NCFlag}},
-      {{0xffffffff, NFlag, 0x00000000, ZCFlag},
+      {{0xFFFFFFFE, NFlag, 0xFFFFFFFF, NFlag},
+       {0xFFFFFFFF, NFlag, 0x00000000, ZCFlag},
+       {0x7FFFFFFC, CFlag, 0x7FFFFFFD, CFlag},
+       {0x7FFFFFFD, CFlag, 0x7FFFFFFE, CFlag},
+       {0x7FFFFFFE, CVFlag, 0x7FFFFFFF, CVFlag},
+       {0x7FFFFFFF, CVFlag, 0x80000000, NCFlag},
+       {0xFFFFFFFC, NCFlag, 0xFFFFFFFD, NCFlag},
+       {0xFFFFFFFD, NCFlag, 0xFFFFFFFE, NCFlag}},
+      {{0xFFFFFFFF, NFlag, 0x00000000, ZCFlag},
        {0x00000000, ZCFlag, 0x00000001, CFlag},
-       {0x7ffffffd, CFlag, 0x7ffffffe, CFlag},
-       {0x7ffffffe, CFlag, 0x7fffffff, CFlag},
-       {0x7fffffff, CVFlag, 0x80000000, NCFlag},
+       {0x7FFFFFFD, CFlag, 0x7FFFFFFE, CFlag},
+       {0x7FFFFFFE, CFlag, 0x7FFFFFFF, CFlag},
+       {0x7FFFFFFF, CVFlag, 0x80000000, NCFlag},
        {0x80000000, NCFlag, 0x80000001, NCFlag},
-       {0xfffffffd, NCFlag, 0xfffffffe, NCFlag},
-       {0xfffffffe, NCFlag, 0xffffffff, NCFlag}}};
+       {0xFFFFFFFD, NCFlag, 0xFFFFFFFE, NCFlag},
+       {0xFFFFFFFE, NCFlag, 0xFFFFFFFF, NCFlag}}};
 
   static const Expected expected_sbcs_w[input_count][input_count] = {
-      {{0xffffffff, NFlag, 0x00000000, ZCFlag},
-       {0xfffffffe, NFlag, 0xffffffff, NFlag},
+      {{0xFFFFFFFF, NFlag, 0x00000000, ZCFlag},
+       {0xFFFFFFFE, NFlag, 0xFFFFFFFF, NFlag},
        {0x80000001, NFlag, 0x80000002, NFlag},
        {0x80000000, NFlag, 0x80000001, NFlag},
-       {0x7fffffff, NoFlag, 0x80000000, NVFlag},
-       {0x7ffffffe, NoFlag, 0x7fffffff, NoFlag},
+       {0x7FFFFFFF, NoFlag, 0x80000000, NVFlag},
+       {0x7FFFFFFE, NoFlag, 0x7FFFFFFF, NoFlag},
        {0x00000001, NoFlag, 0x00000002, NoFlag},
        {0x00000000, ZFlag, 0x00000001, NoFlag}},
       {{0x00000000, ZCFlag, 0x00000001, CFlag},
-       {0xffffffff, NFlag, 0x00000000, ZCFlag},
+       {0xFFFFFFFF, NFlag, 0x00000000, ZCFlag},
        {0x80000002, NFlag, 0x80000003, NFlag},
        {0x80000001, NFlag, 0x80000002, NFlag},
        {0x80000000, NVFlag, 0x80000001, NVFlag},
-       {0x7fffffff, NoFlag, 0x80000000, NVFlag},
+       {0x7FFFFFFF, NoFlag, 0x80000000, NVFlag},
        {0x00000002, NoFlag, 0x00000003, NoFlag},
        {0x00000001, NoFlag, 0x00000002, NoFlag}},
-      {{0x7ffffffd, CFlag, 0x7ffffffe, CFlag},
-       {0x7ffffffc, CFlag, 0x7ffffffd, CFlag},
-       {0xffffffff, NFlag, 0x00000000, ZCFlag},
-       {0xfffffffe, NFlag, 0xffffffff, NFlag},
-       {0xfffffffd, NVFlag, 0xfffffffe, NVFlag},
-       {0xfffffffc, NVFlag, 0xfffffffd, NVFlag},
-       {0x7fffffff, NoFlag, 0x80000000, NVFlag},
-       {0x7ffffffe, NoFlag, 0x7fffffff, NoFlag}},
-      {{0x7ffffffe, CFlag, 0x7fffffff, CFlag},
-       {0x7ffffffd, CFlag, 0x7ffffffe, CFlag},
+      {{0x7FFFFFFD, CFlag, 0x7FFFFFFE, CFlag},
+       {0x7FFFFFFC, CFlag, 0x7FFFFFFD, CFlag},
+       {0xFFFFFFFF, NFlag, 0x00000000, ZCFlag},
+       {0xFFFFFFFE, NFlag, 0xFFFFFFFF, NFlag},
+       {0xFFFFFFFD, NVFlag, 0xFFFFFFFE, NVFlag},
+       {0xFFFFFFFC, NVFlag, 0xFFFFFFFD, NVFlag},
+       {0x7FFFFFFF, NoFlag, 0x80000000, NVFlag},
+       {0x7FFFFFFE, NoFlag, 0x7FFFFFFF, NoFlag}},
+      {{0x7FFFFFFE, CFlag, 0x7FFFFFFF, CFlag},
+       {0x7FFFFFFD, CFlag, 0x7FFFFFFE, CFlag},
        {0x00000000, ZCFlag, 0x00000001, CFlag},
-       {0xffffffff, NFlag, 0x00000000, ZCFlag},
-       {0xfffffffe, NVFlag, 0xffffffff, NVFlag},
-       {0xfffffffd, NVFlag, 0xfffffffe, NVFlag},
+       {0xFFFFFFFF, NFlag, 0x00000000, ZCFlag},
+       {0xFFFFFFFE, NVFlag, 0xFFFFFFFF, NVFlag},
+       {0xFFFFFFFD, NVFlag, 0xFFFFFFFE, NVFlag},
        {0x80000000, NVFlag, 0x80000001, NVFlag},
-       {0x7fffffff, NoFlag, 0x80000000, NVFlag}},
-      {{0x7fffffff, CVFlag, 0x80000000, NCFlag},
-       {0x7ffffffe, CVFlag, 0x7fffffff, CVFlag},
+       {0x7FFFFFFF, NoFlag, 0x80000000, NVFlag}},
+      {{0x7FFFFFFF, CVFlag, 0x80000000, NCFlag},
+       {0x7FFFFFFE, CVFlag, 0x7FFFFFFF, CVFlag},
        {0x00000001, CVFlag, 0x00000002, CVFlag},
        {0x00000000, ZCVFlag, 0x00000001, CVFlag},
-       {0xffffffff, NFlag, 0x00000000, ZCFlag},
-       {0xfffffffe, NFlag, 0xffffffff, NFlag},
+       {0xFFFFFFFF, NFlag, 0x00000000, ZCFlag},
+       {0xFFFFFFFE, NFlag, 0xFFFFFFFF, NFlag},
        {0x80000001, NFlag, 0x80000002, NFlag},
        {0x80000000, NFlag, 0x80000001, NFlag}},
       {{0x80000000, NCFlag, 0x80000001, NCFlag},
-       {0x7fffffff, CVFlag, 0x80000000, NCFlag},
+       {0x7FFFFFFF, CVFlag, 0x80000000, NCFlag},
        {0x00000002, CVFlag, 0x00000003, CVFlag},
        {0x00000001, CVFlag, 0x00000002, CVFlag},
        {0x00000000, ZCFlag, 0x00000001, CFlag},
-       {0xffffffff, NFlag, 0x00000000, ZCFlag},
+       {0xFFFFFFFF, NFlag, 0x00000000, ZCFlag},
        {0x80000002, NFlag, 0x80000003, NFlag},
        {0x80000001, NFlag, 0x80000002, NFlag}},
-      {{0xfffffffd, NCFlag, 0xfffffffe, NCFlag},
-       {0xfffffffc, NCFlag, 0xfffffffd, NCFlag},
-       {0x7fffffff, CVFlag, 0x80000000, NCFlag},
-       {0x7ffffffe, CVFlag, 0x7fffffff, CVFlag},
-       {0x7ffffffd, CFlag, 0x7ffffffe, CFlag},
-       {0x7ffffffc, CFlag, 0x7ffffffd, CFlag},
-       {0xffffffff, NFlag, 0x00000000, ZCFlag},
-       {0xfffffffe, NFlag, 0xffffffff, NFlag}},
-      {{0xfffffffe, NCFlag, 0xffffffff, NCFlag},
-       {0xfffffffd, NCFlag, 0xfffffffe, NCFlag},
+      {{0xFFFFFFFD, NCFlag, 0xFFFFFFFE, NCFlag},
+       {0xFFFFFFFC, NCFlag, 0xFFFFFFFD, NCFlag},
+       {0x7FFFFFFF, CVFlag, 0x80000000, NCFlag},
+       {0x7FFFFFFE, CVFlag, 0x7FFFFFFF, CVFlag},
+       {0x7FFFFFFD, CFlag, 0x7FFFFFFE, CFlag},
+       {0x7FFFFFFC, CFlag, 0x7FFFFFFD, CFlag},
+       {0xFFFFFFFF, NFlag, 0x00000000, ZCFlag},
+       {0xFFFFFFFE, NFlag, 0xFFFFFFFF, NFlag}},
+      {{0xFFFFFFFE, NCFlag, 0xFFFFFFFF, NCFlag},
+       {0xFFFFFFFD, NCFlag, 0xFFFFFFFE, NCFlag},
        {0x80000000, NCFlag, 0x80000001, NCFlag},
-       {0x7fffffff, CVFlag, 0x80000000, NCFlag},
-       {0x7ffffffe, CFlag, 0x7fffffff, CFlag},
-       {0x7ffffffd, CFlag, 0x7ffffffe, CFlag},
+       {0x7FFFFFFF, CVFlag, 0x80000000, NCFlag},
+       {0x7FFFFFFE, CFlag, 0x7FFFFFFF, CFlag},
+       {0x7FFFFFFD, CFlag, 0x7FFFFFFE, CFlag},
        {0x00000000, ZCFlag, 0x00000001, CFlag},
-       {0xffffffff, NFlag, 0x00000000, ZCFlag}}};
+       {0xFFFFFFFF, NFlag, 0x00000000, ZCFlag}}};
 
   for (size_t left = 0; left < input_count; left++) {
     for (size_t right = 0; right < input_count; right++) {
@@ -7682,9 +7674,9 @@
   START();
   __ Mov(x0, 0);
   __ Mov(x1, 1);
-  __ Mov(x2, 0x0123456789abcdefL);
-  __ Mov(x3, 0xfedcba9876543210L);
-  __ Mov(x4, 0xffffffffffffffffL);
+  __ Mov(x2, 0x0123456789ABCDEFL);
+  __ Mov(x3, 0xFEDCBA9876543210L);
+  __ Mov(x4, 0xFFFFFFFFFFFFFFFFL);
 
   // Clear the C flag.
   __ Adds(x0, x0, Operand(0));
@@ -7719,29 +7711,29 @@
 
   RUN();
 
-  CHECK_EQUAL_64(0xffffffffffffffffL, x5);
+  CHECK_EQUAL_64(0xFFFFFFFFFFFFFFFFL, x5);
   CHECK_EQUAL_64(1L << 60, x6);
-  CHECK_EQUAL_64(0xf0123456789abcddL, x7);
+  CHECK_EQUAL_64(0xF0123456789ABCDDL, x7);
   CHECK_EQUAL_64(0x0111111111111110L, x8);
   CHECK_EQUAL_64(0x1222222222222221L, x9);
 
-  CHECK_EQUAL_32(0xffffffff, w10);
+  CHECK_EQUAL_32(0xFFFFFFFF, w10);
   CHECK_EQUAL_32(1 << 30, w11);
-  CHECK_EQUAL_32(0xf89abcdd, w12);
+  CHECK_EQUAL_32(0xF89ABCDD, w12);
   CHECK_EQUAL_32(0x91111110, w13);
-  CHECK_EQUAL_32(0x9a222221, w14);
+  CHECK_EQUAL_32(0x9A222221, w14);
 
-  CHECK_EQUAL_64(0xffffffffffffffffL + 1, x18);
+  CHECK_EQUAL_64(0xFFFFFFFFFFFFFFFFL + 1, x18);
   CHECK_EQUAL_64((1L << 60) + 1, x19);
-  CHECK_EQUAL_64(0xf0123456789abcddL + 1, x20);
+  CHECK_EQUAL_64(0xF0123456789ABCDDL + 1, x20);
   CHECK_EQUAL_64(0x0111111111111110L + 1, x21);
   CHECK_EQUAL_64(0x1222222222222221L + 1, x22);
 
-  CHECK_EQUAL_32(0xffffffff + 1, w23);
+  CHECK_EQUAL_32(0xFFFFFFFF + 1, w23);
   CHECK_EQUAL_32((1 << 30) + 1, w24);
-  CHECK_EQUAL_32(0xf89abcdd + 1, w25);
+  CHECK_EQUAL_32(0xF89ABCDD + 1, w25);
   CHECK_EQUAL_32(0x91111110 + 1, w26);
-  CHECK_EQUAL_32(0x9a222221 + 1, w27);
+  CHECK_EQUAL_32(0x9A222221 + 1, w27);
 
   TEARDOWN();
 }
@@ -7757,7 +7749,7 @@
 
   __ Mov(x0, 0);
   __ Mov(x1, 1);
-  __ Mov(x2, 0x0123456789abcdefL);
+  __ Mov(x2, 0x0123456789ABCDEFL);
 
   __ Adc(x10, x1, Operand(w2, UXTB, 1));
   __ Adc(x11, x1, Operand(x2, SXTH, 2));
@@ -7783,28 +7775,28 @@
 
   RUN();
 
-  CHECK_EQUAL_64(0x1df, x10);
-  CHECK_EQUAL_64(0xffffffffffff37bdL, x11);
-  CHECK_EQUAL_64(0xfffffff765432110L, x12);
-  CHECK_EQUAL_64(0x123456789abcdef1L, x13);
+  CHECK_EQUAL_64(0x1DF, x10);
+  CHECK_EQUAL_64(0xFFFFFFFFFFFF37BDL, x11);
+  CHECK_EQUAL_64(0xFFFFFFF765432110L, x12);
+  CHECK_EQUAL_64(0x123456789ABCDEF1L, x13);
 
-  CHECK_EQUAL_32(0x1df, w14);
-  CHECK_EQUAL_32(0xffff37bd, w15);
-  CHECK_EQUAL_32(0x9abcdef1, w9);
+  CHECK_EQUAL_32(0x1DF, w14);
+  CHECK_EQUAL_32(0xFFFF37BD, w15);
+  CHECK_EQUAL_32(0x9ABCDEF1, w9);
 
-  CHECK_EQUAL_64(0x1df + 1, x20);
-  CHECK_EQUAL_64(0xffffffffffff37bdL + 1, x21);
-  CHECK_EQUAL_64(0xfffffff765432110L + 1, x22);
-  CHECK_EQUAL_64(0x123456789abcdef1L + 1, x23);
+  CHECK_EQUAL_64(0x1DF + 1, x20);
+  CHECK_EQUAL_64(0xFFFFFFFFFFFF37BDL + 1, x21);
+  CHECK_EQUAL_64(0xFFFFFFF765432110L + 1, x22);
+  CHECK_EQUAL_64(0x123456789ABCDEF1L + 1, x23);
 
-  CHECK_EQUAL_32(0x1df + 1, w24);
-  CHECK_EQUAL_32(0xffff37bd + 1, w25);
-  CHECK_EQUAL_32(0x9abcdef1 + 1, w26);
+  CHECK_EQUAL_32(0x1DF + 1, w24);
+  CHECK_EQUAL_32(0xFFFF37BD + 1, w25);
+  CHECK_EQUAL_32(0x9ABCDEF1 + 1, w26);
 
   // Check that adc correctly sets the condition flags.
   START();
-  __ Mov(x0, 0xff);
-  __ Mov(x1, 0xffffffffffffffffL);
+  __ Mov(x0, 0xFF);
+  __ Mov(x1, 0xFFFFFFFFFFFFFFFFL);
   // Clear the C flag.
   __ Adds(x0, x0, Operand(0));
   __ Adcs(x10, x0, Operand(x1, SXTX, 1));
@@ -7815,7 +7807,7 @@
   CHECK_EQUAL_NZCV(CFlag);
 
   START();
-  __ Mov(x0, 0x7fffffffffffffffL);
+  __ Mov(x0, 0x7FFFFFFFFFFFFFFFL);
   __ Mov(x1, 1);
   // Clear the C flag.
   __ Adds(x0, x0, Operand(0));
@@ -7827,7 +7819,7 @@
   CHECK_EQUAL_NZCV(NVFlag);
 
   START();
-  __ Mov(x0, 0x7fffffffffffffffL);
+  __ Mov(x0, 0x7FFFFFFFFFFFFFFFL);
   // Clear the C flag.
   __ Adds(x0, x0, Operand(0));
   __ Adcs(x10, x0, Operand(1));
@@ -7851,36 +7843,36 @@
   // Clear the C flag.
   __ Adds(x0, x0, Operand(0));
 
-  __ Adc(x7, x0, Operand(0x1234567890abcdefUL));
-  __ Adc(w8, w0, Operand(0xffffffff));
-  __ Sbc(x9, x0, Operand(0x1234567890abcdefUL));
-  __ Sbc(w10, w0, Operand(0xffffffff));
-  __ Ngc(x11, Operand(0xffffffff00000000UL));
-  __ Ngc(w12, Operand(0xffff0000));
+  __ Adc(x7, x0, Operand(0x1234567890ABCDEFUL));
+  __ Adc(w8, w0, Operand(0xFFFFFFFF));
+  __ Sbc(x9, x0, Operand(0x1234567890ABCDEFUL));
+  __ Sbc(w10, w0, Operand(0xFFFFFFFF));
+  __ Ngc(x11, Operand(0xFFFFFFFF00000000UL));
+  __ Ngc(w12, Operand(0xFFFF0000));
 
   // Set the C flag.
   __ Cmp(w0, Operand(w0));
 
-  __ Adc(x18, x0, Operand(0x1234567890abcdefUL));
-  __ Adc(w19, w0, Operand(0xffffffff));
-  __ Sbc(x20, x0, Operand(0x1234567890abcdefUL));
-  __ Sbc(w21, w0, Operand(0xffffffff));
-  __ Ngc(x22, Operand(0xffffffff00000000UL));
-  __ Ngc(w23, Operand(0xffff0000));
+  __ Adc(x18, x0, Operand(0x1234567890ABCDEFUL));
+  __ Adc(w19, w0, Operand(0xFFFFFFFF));
+  __ Sbc(x20, x0, Operand(0x1234567890ABCDEFUL));
+  __ Sbc(w21, w0, Operand(0xFFFFFFFF));
+  __ Ngc(x22, Operand(0xFFFFFFFF00000000UL));
+  __ Ngc(w23, Operand(0xFFFF0000));
   END();
 
   RUN();
 
-  CHECK_EQUAL_64(0x1234567890abcdefUL, x7);
-  CHECK_EQUAL_64(0xffffffff, x8);
-  CHECK_EQUAL_64(0xedcba9876f543210UL, x9);
+  CHECK_EQUAL_64(0x1234567890ABCDEFUL, x7);
+  CHECK_EQUAL_64(0xFFFFFFFF, x8);
+  CHECK_EQUAL_64(0xEDCBA9876F543210UL, x9);
   CHECK_EQUAL_64(0, x10);
-  CHECK_EQUAL_64(0xffffffff, x11);
-  CHECK_EQUAL_64(0xffff, x12);
+  CHECK_EQUAL_64(0xFFFFFFFF, x11);
+  CHECK_EQUAL_64(0xFFFF, x12);
 
-  CHECK_EQUAL_64(0x1234567890abcdefUL + 1, x18);
+  CHECK_EQUAL_64(0x1234567890ABCDEFUL + 1, x18);
   CHECK_EQUAL_64(0, x19);
-  CHECK_EQUAL_64(0xedcba9876f543211UL, x20);
+  CHECK_EQUAL_64(0xEDCBA9876F543211UL, x20);
   CHECK_EQUAL_64(1, x21);
   CHECK_EQUAL_64(0x100000000UL, x22);
   CHECK_EQUAL_64(0x10000, x23);
@@ -7973,7 +7965,7 @@
 
   START();
   __ Mov(x0, 1);
-  __ Mov(x1, 0x7fffffffffffffffL);
+  __ Mov(x1, 0x7FFFFFFFFFFFFFFFL);
   __ Cmn(x1, Operand(x0));
   END();
 
@@ -7983,7 +7975,7 @@
 
   START();
   __ Mov(w0, 1);
-  __ Mov(w1, 0x7fffffff);
+  __ Mov(w1, 0x7FFFFFFF);
   __ Cmn(w1, Operand(w0));
   END();
 
@@ -7993,7 +7985,7 @@
 
   START();
   __ Mov(x0, 1);
-  __ Mov(x1, 0xffffffffffffffffL);
+  __ Mov(x1, 0xFFFFFFFFFFFFFFFFL);
   __ Cmn(x1, Operand(x0));
   END();
 
@@ -8003,7 +7995,7 @@
 
   START();
   __ Mov(w0, 1);
-  __ Mov(w1, 0xffffffff);
+  __ Mov(w1, 0xFFFFFFFF);
   __ Cmn(w1, Operand(w0));
   END();
 
@@ -8044,16 +8036,16 @@
   SETUP();
 
   START();
-  __ Mov(x18, 0xf0000000);
-  __ Mov(x19, 0xf000000010000000UL);
-  __ Mov(x20, 0xf0000000f0000000UL);
+  __ Mov(x18, 0xF0000000);
+  __ Mov(x19, 0xF000000010000000UL);
+  __ Mov(x20, 0xF0000000F0000000UL);
   __ Mov(x21, 0x7800000078000000UL);
-  __ Mov(x22, 0x3c0000003c000000UL);
+  __ Mov(x22, 0x3C0000003C000000UL);
   __ Mov(x23, 0x8000000780000000UL);
-  __ Mov(x24, 0x0000000f00000000UL);
-  __ Mov(x25, 0x00000003c0000000UL);
+  __ Mov(x24, 0x0000000F00000000UL);
+  __ Mov(x25, 0x00000003C0000000UL);
   __ Mov(x26, 0x8000000780000000UL);
-  __ Mov(x27, 0xc0000003);
+  __ Mov(x27, 0xC0000003);
 
   __ Cmp(w20, Operand(w21, LSL, 1));
   __ Mrs(x0, NZCV);
@@ -8102,11 +8094,11 @@
   START();
   __ Mov(w20, 0x2);
   __ Mov(w21, 0x1);
-  __ Mov(x22, 0xffffffffffffffffUL);
-  __ Mov(x23, 0xff);
-  __ Mov(x24, 0xfffffffffffffffeUL);
-  __ Mov(x25, 0xffff);
-  __ Mov(x26, 0xffffffff);
+  __ Mov(x22, 0xFFFFFFFFFFFFFFFFUL);
+  __ Mov(x23, 0xFF);
+  __ Mov(x24, 0xFFFFFFFFFFFFFFFEUL);
+  __ Mov(x25, 0xFFFF);
+  __ Mov(x26, 0xFFFFFFFF);
 
   __ Cmp(w20, Operand(w21, LSL, 1));
   __ Mrs(x0, NZCV);
@@ -8204,7 +8196,7 @@
   __ Mrs(x0, NZCV);
 
   __ Cmp(w20, Operand(w20));
-  __ Ccmp(x20, Operand(0xffffffffffffffffUL), NZCVFlag, eq);
+  __ Ccmp(x20, Operand(0xFFFFFFFFFFFFFFFFUL), NZCVFlag, eq);
   __ Mrs(x1, NZCV);
   END();
 
@@ -8224,9 +8216,9 @@
   START();
   __ Mov(w20, 0x2);
   __ Mov(w21, 0x1);
-  __ Mov(x22, 0xffffffffffffffffUL);
-  __ Mov(x23, 0xff);
-  __ Mov(x24, 0xfffffffffffffffeUL);
+  __ Mov(x22, 0xFFFFFFFFFFFFFFFFUL);
+  __ Mov(x23, 0xFF);
+  __ Mov(x24, 0xFFFFFFFFFFFFFFFEUL);
 
   __ Cmp(w20, Operand(w20));
   __ Ccmp(w20, Operand(w21, LSL, 1), NZCVFlag, eq);
@@ -8267,8 +8259,8 @@
 
   START();
   __ Mov(x16, 0);
-  __ Mov(x24, 0x0000000f0000000fUL);
-  __ Mov(x25, 0x0000001f0000001fUL);
+  __ Mov(x24, 0x0000000F0000000FUL);
+  __ Mov(x25, 0x0000001F0000001FUL);
   __ Mov(x26, 0);
   __ Mov(x27, 0);
 
@@ -8305,26 +8297,26 @@
 
   RUN();
 
-  CHECK_EQUAL_64(0x0000000f, x0);
-  CHECK_EQUAL_64(0x0000001f, x1);
+  CHECK_EQUAL_64(0x0000000F, x0);
+  CHECK_EQUAL_64(0x0000001F, x1);
   CHECK_EQUAL_64(0x00000020, x2);
-  CHECK_EQUAL_64(0x0000000f, x3);
-  CHECK_EQUAL_64(0xffffffe0ffffffe0UL, x4);
-  CHECK_EQUAL_64(0x0000000f0000000fUL, x5);
-  CHECK_EQUAL_64(0xffffffe0ffffffe1UL, x6);
-  CHECK_EQUAL_64(0x0000000f0000000fUL, x7);
+  CHECK_EQUAL_64(0x0000000F, x3);
+  CHECK_EQUAL_64(0xFFFFFFE0FFFFFFE0UL, x4);
+  CHECK_EQUAL_64(0x0000000F0000000FUL, x5);
+  CHECK_EQUAL_64(0xFFFFFFE0FFFFFFE1UL, x6);
+  CHECK_EQUAL_64(0x0000000F0000000FUL, x7);
   CHECK_EQUAL_64(0x00000001, x8);
-  CHECK_EQUAL_64(0xffffffff, x9);
-  CHECK_EQUAL_64(0x0000001f00000020UL, x10);
-  CHECK_EQUAL_64(0xfffffff0fffffff0UL, x11);
-  CHECK_EQUAL_64(0xfffffff0fffffff1UL, x12);
-  CHECK_EQUAL_64(0x0000000f, x13);
-  CHECK_EQUAL_64(0x0000000f0000000fUL, x14);
-  CHECK_EQUAL_64(0x0000000f, x15);
-  CHECK_EQUAL_64(0x0000000f0000000fUL, x18);
+  CHECK_EQUAL_64(0xFFFFFFFF, x9);
+  CHECK_EQUAL_64(0x0000001F00000020UL, x10);
+  CHECK_EQUAL_64(0xFFFFFFF0FFFFFFF0UL, x11);
+  CHECK_EQUAL_64(0xFFFFFFF0FFFFFFF1UL, x12);
+  CHECK_EQUAL_64(0x0000000F, x13);
+  CHECK_EQUAL_64(0x0000000F0000000FUL, x14);
+  CHECK_EQUAL_64(0x0000000F, x15);
+  CHECK_EQUAL_64(0x0000000F0000000FUL, x18);
   CHECK_EQUAL_64(0, x24);
-  CHECK_EQUAL_64(0x0000001f0000001fUL, x25);
-  CHECK_EQUAL_64(0x0000001f0000001fUL, x26);
+  CHECK_EQUAL_64(0x0000001F0000001FUL, x25);
+  CHECK_EQUAL_64(0x0000001F0000001FUL, x26);
   CHECK_EQUAL_64(0, x27);
 
   TEARDOWN();
@@ -8389,7 +8381,7 @@
   INIT_V8();
   SETUP();
 
-  uint64_t value = 0x0123456789abcdefUL;
+  uint64_t value = 0x0123456789ABCDEFUL;
   int shift[] = {1, 3, 5, 9, 17, 33};
 
   START();
@@ -8442,7 +8434,7 @@
   INIT_V8();
   SETUP();
 
-  uint64_t value = 0x0123456789abcdefUL;
+  uint64_t value = 0x0123456789ABCDEFUL;
   int shift[] = {1, 3, 5, 9, 17, 33};
 
   START();
@@ -8481,7 +8473,7 @@
   CHECK_EQUAL_64(value >> (shift[4] & 63), x20);
   CHECK_EQUAL_64(value >> (shift[5] & 63), x21);
 
-  value &= 0xffffffffUL;
+  value &= 0xFFFFFFFFUL;
   CHECK_EQUAL_32(value >> (shift[0] & 31), w22);
   CHECK_EQUAL_32(value >> (shift[1] & 31), w23);
   CHECK_EQUAL_32(value >> (shift[2] & 31), w24);
@@ -8497,7 +8489,7 @@
   INIT_V8();
   SETUP();
 
-  int64_t value = 0xfedcba98fedcba98UL;
+  int64_t value = 0xFEDCBA98FEDCBA98UL;
   int shift[] = {1, 3, 5, 9, 17, 33};
 
   START();
@@ -8536,7 +8528,7 @@
   CHECK_EQUAL_64(value >> (shift[4] & 63), x20);
   CHECK_EQUAL_64(value >> (shift[5] & 63), x21);
 
-  int32_t value32 = static_cast<int32_t>(value & 0xffffffffUL);
+  int32_t value32 = static_cast<int32_t>(value & 0xFFFFFFFFUL);
   CHECK_EQUAL_32(value32 >> (shift[0] & 31), w22);
   CHECK_EQUAL_32(value32 >> (shift[1] & 31), w23);
   CHECK_EQUAL_32(value32 >> (shift[2] & 31), w24);
@@ -8552,7 +8544,7 @@
   INIT_V8();
   SETUP();
 
-  uint64_t value = 0x0123456789abcdefUL;
+  uint64_t value = 0x0123456789ABCDEFUL;
   int shift[] = {4, 8, 12, 16, 24, 36};
 
   START();
@@ -8584,18 +8576,18 @@
   RUN();
 
   CHECK_EQUAL_64(value, x0);
-  CHECK_EQUAL_64(0xf0123456789abcdeUL, x16);
-  CHECK_EQUAL_64(0xef0123456789abcdUL, x17);
-  CHECK_EQUAL_64(0xdef0123456789abcUL, x18);
-  CHECK_EQUAL_64(0xcdef0123456789abUL, x19);
-  CHECK_EQUAL_64(0xabcdef0123456789UL, x20);
-  CHECK_EQUAL_64(0x789abcdef0123456UL, x21);
-  CHECK_EQUAL_32(0xf89abcde, w22);
-  CHECK_EQUAL_32(0xef89abcd, w23);
-  CHECK_EQUAL_32(0xdef89abc, w24);
-  CHECK_EQUAL_32(0xcdef89ab, w25);
-  CHECK_EQUAL_32(0xabcdef89, w26);
-  CHECK_EQUAL_32(0xf89abcde, w27);
+  CHECK_EQUAL_64(0xF0123456789ABCDEUL, x16);
+  CHECK_EQUAL_64(0xEF0123456789ABCDUL, x17);
+  CHECK_EQUAL_64(0xDEF0123456789ABCUL, x18);
+  CHECK_EQUAL_64(0xCDEF0123456789ABUL, x19);
+  CHECK_EQUAL_64(0xABCDEF0123456789UL, x20);
+  CHECK_EQUAL_64(0x789ABCDEF0123456UL, x21);
+  CHECK_EQUAL_32(0xF89ABCDE, w22);
+  CHECK_EQUAL_32(0xEF89ABCD, w23);
+  CHECK_EQUAL_32(0xDEF89ABC, w24);
+  CHECK_EQUAL_32(0xCDEF89AB, w25);
+  CHECK_EQUAL_32(0xABCDEF89, w26);
+  CHECK_EQUAL_32(0xF89ABCDE, w27);
 
   TEARDOWN();
 }
@@ -8606,7 +8598,7 @@
   SETUP();
 
   START();
-  __ Mov(x1, 0x0123456789abcdefL);
+  __ Mov(x1, 0x0123456789ABCDEFL);
 
   __ Mov(x10, 0x8888888888888888L);
   __ Mov(x11, 0x8888888888888888L);
@@ -8628,15 +8620,14 @@
 
   RUN();
 
+  CHECK_EQUAL_64(0x88888888888889ABL, x10);
+  CHECK_EQUAL_64(0x8888CDEF88888888L, x11);
 
-  CHECK_EQUAL_64(0x88888888888889abL, x10);
-  CHECK_EQUAL_64(0x8888cdef88888888L, x11);
+  CHECK_EQUAL_32(0x888888AB, w20);
+  CHECK_EQUAL_32(0x88CDEF88, w21);
 
-  CHECK_EQUAL_32(0x888888ab, w20);
-  CHECK_EQUAL_32(0x88cdef88, w21);
-
-  CHECK_EQUAL_64(0x8888888888ef8888L, x12);
-  CHECK_EQUAL_64(0x88888888888888abL, x13);
+  CHECK_EQUAL_64(0x8888888888EF8888L, x12);
+  CHECK_EQUAL_64(0x88888888888888ABL, x13);
 
   TEARDOWN();
 }
@@ -8647,8 +8638,8 @@
   SETUP();
 
   START();
-  __ Mov(x1, 0x0123456789abcdefL);
-  __ Mov(x2, 0xfedcba9876543210L);
+  __ Mov(x1, 0x0123456789ABCDEFL);
+  __ Mov(x2, 0xFEDCBA9876543210L);
 
   __ sbfm(x10, x1, 16, 31);
   __ sbfm(x11, x1, 32, 15);
@@ -8677,28 +8668,27 @@
 
   RUN();
 
-
-  CHECK_EQUAL_64(0xffffffffffff89abL, x10);
-  CHECK_EQUAL_64(0xffffcdef00000000L, x11);
+  CHECK_EQUAL_64(0xFFFFFFFFFFFF89ABL, x10);
+  CHECK_EQUAL_64(0xFFFFCDEF00000000L, x11);
   CHECK_EQUAL_64(0x4567L, x12);
-  CHECK_EQUAL_64(0x789abcdef0000L, x13);
+  CHECK_EQUAL_64(0x789ABCDEF0000L, x13);
 
-  CHECK_EQUAL_32(0xffffffab, w14);
-  CHECK_EQUAL_32(0xffcdef00, w15);
+  CHECK_EQUAL_32(0xFFFFFFAB, w14);
+  CHECK_EQUAL_32(0xFFCDEF00, w15);
   CHECK_EQUAL_32(0x54, w16);
   CHECK_EQUAL_32(0x00321000, w17);
 
   CHECK_EQUAL_64(0x01234567L, x18);
-  CHECK_EQUAL_64(0xfffffffffedcba98L, x19);
-  CHECK_EQUAL_64(0xffffffffffcdef00L, x20);
+  CHECK_EQUAL_64(0xFFFFFFFFFEDCBA98L, x19);
+  CHECK_EQUAL_64(0xFFFFFFFFFFCDEF00L, x20);
   CHECK_EQUAL_64(0x321000L, x21);
-  CHECK_EQUAL_64(0xffffffffffffabcdL, x22);
+  CHECK_EQUAL_64(0xFFFFFFFFFFFFABCDL, x22);
   CHECK_EQUAL_64(0x5432L, x23);
-  CHECK_EQUAL_64(0xffffffffffffffefL, x24);
+  CHECK_EQUAL_64(0xFFFFFFFFFFFFFFEFL, x24);
   CHECK_EQUAL_64(0x10, x25);
-  CHECK_EQUAL_64(0xffffffffffffcdefL, x26);
+  CHECK_EQUAL_64(0xFFFFFFFFFFFFCDEFL, x26);
   CHECK_EQUAL_64(0x3210, x27);
-  CHECK_EQUAL_64(0xffffffff89abcdefL, x28);
+  CHECK_EQUAL_64(0xFFFFFFFF89ABCDEFL, x28);
   CHECK_EQUAL_64(0x76543210, x29);
 
   TEARDOWN();
@@ -8710,8 +8700,8 @@
   SETUP();
 
   START();
-  __ Mov(x1, 0x0123456789abcdefL);
-  __ Mov(x2, 0xfedcba9876543210L);
+  __ Mov(x1, 0x0123456789ABCDEFL);
+  __ Mov(x2, 0xFEDCBA9876543210L);
 
   __ Mov(x10, 0x8888888888888888L);
   __ Mov(x11, 0x8888888888888888L);
@@ -8739,24 +8729,24 @@
 
   RUN();
 
-  CHECK_EQUAL_64(0x00000000000089abL, x10);
-  CHECK_EQUAL_64(0x0000cdef00000000L, x11);
+  CHECK_EQUAL_64(0x00000000000089ABL, x10);
+  CHECK_EQUAL_64(0x0000CDEF00000000L, x11);
   CHECK_EQUAL_64(0x4567L, x12);
-  CHECK_EQUAL_64(0x789abcdef0000L, x13);
+  CHECK_EQUAL_64(0x789ABCDEF0000L, x13);
 
-  CHECK_EQUAL_32(0x000000ab, w25);
-  CHECK_EQUAL_32(0x00cdef00, w26);
+  CHECK_EQUAL_32(0x000000AB, w25);
+  CHECK_EQUAL_32(0x00CDEF00, w26);
   CHECK_EQUAL_32(0x54, w27);
   CHECK_EQUAL_32(0x00321000, w28);
 
   CHECK_EQUAL_64(0x8000000000000000L, x15);
-  CHECK_EQUAL_64(0x0123456789abcdefL, x16);
+  CHECK_EQUAL_64(0x0123456789ABCDEFL, x16);
   CHECK_EQUAL_64(0x01234567L, x17);
-  CHECK_EQUAL_64(0xcdef00L, x18);
-  CHECK_EQUAL_64(0xabcdL, x19);
-  CHECK_EQUAL_64(0xefL, x20);
-  CHECK_EQUAL_64(0xcdefL, x21);
-  CHECK_EQUAL_64(0x89abcdefL, x22);
+  CHECK_EQUAL_64(0xCDEF00L, x18);
+  CHECK_EQUAL_64(0xABCDL, x19);
+  CHECK_EQUAL_64(0xEFL, x20);
+  CHECK_EQUAL_64(0xCDEFL, x21);
+  CHECK_EQUAL_64(0x89ABCDEFL, x22);
 
   TEARDOWN();
 }
@@ -8767,8 +8757,8 @@
   SETUP();
 
   START();
-  __ Mov(x1, 0x0123456789abcdefL);
-  __ Mov(x2, 0xfedcba9876543210L);
+  __ Mov(x1, 0x0123456789ABCDEFL);
+  __ Mov(x2, 0xFEDCBA9876543210L);
 
   __ Extr(w10, w1, w2, 0);
   __ Extr(x11, x1, x2, 0);
@@ -8786,15 +8776,15 @@
   RUN();
 
   CHECK_EQUAL_64(0x76543210, x10);
-  CHECK_EQUAL_64(0xfedcba9876543210L, x11);
-  CHECK_EQUAL_64(0xbb2a1908, x12);
-  CHECK_EQUAL_64(0x0048d159e26af37bUL, x13);
-  CHECK_EQUAL_64(0x89abcdef, x20);
-  CHECK_EQUAL_64(0x0123456789abcdefL, x21);
-  CHECK_EQUAL_64(0x19083b2a, x22);
-  CHECK_EQUAL_64(0x13579bdf, x23);
-  CHECK_EQUAL_64(0x7f6e5d4c3b2a1908UL, x24);
-  CHECK_EQUAL_64(0x02468acf13579bdeUL, x25);
+  CHECK_EQUAL_64(0xFEDCBA9876543210L, x11);
+  CHECK_EQUAL_64(0xBB2A1908, x12);
+  CHECK_EQUAL_64(0x0048D159E26AF37BUL, x13);
+  CHECK_EQUAL_64(0x89ABCDEF, x20);
+  CHECK_EQUAL_64(0x0123456789ABCDEFL, x21);
+  CHECK_EQUAL_64(0x19083B2A, x22);
+  CHECK_EQUAL_64(0x13579BDF, x23);
+  CHECK_EQUAL_64(0x7F6E5D4C3B2A1908UL, x24);
+  CHECK_EQUAL_64(0x02468ACF13579BDEUL, x25);
 
   TEARDOWN();
 }
@@ -8843,7 +8833,7 @@
   __ Fmov(x1, d1);
   __ Fmov(d2, x1);
   __ Fmov(d4, d1);
-  __ Fmov(d6, bit_cast<double>(0x0123456789abcdefL));
+  __ Fmov(d6, bit_cast<double>(0x0123456789ABCDEFL));
   __ Fmov(s6, s6);
   END();
 
@@ -8855,7 +8845,7 @@
   CHECK_EQUAL_64(bit_cast<uint64_t>(-13.0), x1);
   CHECK_EQUAL_FP64(-13.0, d2);
   CHECK_EQUAL_FP64(-13.0, d4);
-  CHECK_EQUAL_FP32(bit_cast<float>(0x89abcdef), s6);
+  CHECK_EQUAL_FP32(bit_cast<float>(0x89ABCDEF), s6);
 
   TEARDOWN();
 }
@@ -9171,12 +9161,12 @@
 TEST(fmadd_fmsub_double_nans) {
   INIT_V8();
   // Make sure that NaN propagation works correctly.
-  double s1 = bit_cast<double>(0x7ff5555511111111);
-  double s2 = bit_cast<double>(0x7ff5555522222222);
-  double sa = bit_cast<double>(0x7ff55555aaaaaaaa);
-  double q1 = bit_cast<double>(0x7ffaaaaa11111111);
-  double q2 = bit_cast<double>(0x7ffaaaaa22222222);
-  double qa = bit_cast<double>(0x7ffaaaaaaaaaaaaa);
+  double s1 = bit_cast<double>(0x7FF5555511111111);
+  double s2 = bit_cast<double>(0x7FF5555522222222);
+  double sa = bit_cast<double>(0x7FF55555AAAAAAAA);
+  double q1 = bit_cast<double>(0x7FFAAAAA11111111);
+  double q2 = bit_cast<double>(0x7FFAAAAA22222222);
+  double qa = bit_cast<double>(0x7FFAAAAAAAAAAAAA);
   CHECK(IsSignallingNaN(s1));
   CHECK(IsSignallingNaN(s2));
   CHECK(IsSignallingNaN(sa));
@@ -9185,9 +9175,9 @@
   CHECK(IsQuietNaN(qa));
 
   // The input NaNs after passing through ProcessNaN.
-  double s1_proc = bit_cast<double>(0x7ffd555511111111);
-  double s2_proc = bit_cast<double>(0x7ffd555522222222);
-  double sa_proc = bit_cast<double>(0x7ffd5555aaaaaaaa);
+  double s1_proc = bit_cast<double>(0x7FFD555511111111);
+  double s2_proc = bit_cast<double>(0x7FFD555522222222);
+  double sa_proc = bit_cast<double>(0x7FFD5555AAAAAAAA);
   double q1_proc = q1;
   double q2_proc = q2;
   double qa_proc = qa;
@@ -9199,10 +9189,10 @@
   CHECK(IsQuietNaN(qa_proc));
 
   // Negated NaNs as it would be done on ARMv8 hardware.
-  double s1_proc_neg = bit_cast<double>(0xfffd555511111111);
-  double sa_proc_neg = bit_cast<double>(0xfffd5555aaaaaaaa);
-  double q1_proc_neg = bit_cast<double>(0xfffaaaaa11111111);
-  double qa_proc_neg = bit_cast<double>(0xfffaaaaaaaaaaaaa);
+  double s1_proc_neg = bit_cast<double>(0xFFFD555511111111);
+  double sa_proc_neg = bit_cast<double>(0xFFFD5555AAAAAAAA);
+  double q1_proc_neg = bit_cast<double>(0xFFFAAAAA11111111);
+  double qa_proc_neg = bit_cast<double>(0xFFFAAAAAAAAAAAAA);
   CHECK(IsQuietNaN(s1_proc_neg));
   CHECK(IsQuietNaN(sa_proc_neg));
   CHECK(IsQuietNaN(q1_proc_neg));
@@ -9254,12 +9244,12 @@
 TEST(fmadd_fmsub_float_nans) {
   INIT_V8();
   // Make sure that NaN propagation works correctly.
-  float s1 = bit_cast<float>(0x7f951111);
-  float s2 = bit_cast<float>(0x7f952222);
-  float sa = bit_cast<float>(0x7f95aaaa);
-  float q1 = bit_cast<float>(0x7fea1111);
-  float q2 = bit_cast<float>(0x7fea2222);
-  float qa = bit_cast<float>(0x7feaaaaa);
+  float s1 = bit_cast<float>(0x7F951111);
+  float s2 = bit_cast<float>(0x7F952222);
+  float sa = bit_cast<float>(0x7F95AAAA);
+  float q1 = bit_cast<float>(0x7FEA1111);
+  float q2 = bit_cast<float>(0x7FEA2222);
+  float qa = bit_cast<float>(0x7FEAAAAA);
   CHECK(IsSignallingNaN(s1));
   CHECK(IsSignallingNaN(s2));
   CHECK(IsSignallingNaN(sa));
@@ -9268,9 +9258,9 @@
   CHECK(IsQuietNaN(qa));
 
   // The input NaNs after passing through ProcessNaN.
-  float s1_proc = bit_cast<float>(0x7fd51111);
-  float s2_proc = bit_cast<float>(0x7fd52222);
-  float sa_proc = bit_cast<float>(0x7fd5aaaa);
+  float s1_proc = bit_cast<float>(0x7FD51111);
+  float s2_proc = bit_cast<float>(0x7FD52222);
+  float sa_proc = bit_cast<float>(0x7FD5AAAA);
   float q1_proc = q1;
   float q2_proc = q2;
   float qa_proc = qa;
@@ -9282,10 +9272,10 @@
   CHECK(IsQuietNaN(qa_proc));
 
   // Negated NaNs as it would be done on ARMv8 hardware.
-  float s1_proc_neg = bit_cast<float>(0xffd51111);
-  float sa_proc_neg = bit_cast<float>(0xffd5aaaa);
-  float q1_proc_neg = bit_cast<float>(0xffea1111);
-  float qa_proc_neg = bit_cast<float>(0xffeaaaaa);
+  float s1_proc_neg = bit_cast<float>(0xFFD51111);
+  float sa_proc_neg = bit_cast<float>(0xFFD5AAAA);
+  float q1_proc_neg = bit_cast<float>(0xFFEA1111);
+  float qa_proc_neg = bit_cast<float>(0xFFEAAAAA);
   CHECK(IsQuietNaN(s1_proc_neg));
   CHECK(IsQuietNaN(sa_proc_neg));
   CHECK(IsQuietNaN(q1_proc_neg));
@@ -9501,10 +9491,10 @@
 TEST(fmax_fmin_d) {
   INIT_V8();
   // Use non-standard NaNs to check that the payload bits are preserved.
-  double snan = bit_cast<double>(0x7ff5555512345678);
-  double qnan = bit_cast<double>(0x7ffaaaaa87654321);
+  double snan = bit_cast<double>(0x7FF5555512345678);
+  double qnan = bit_cast<double>(0x7FFAAAAA87654321);
 
-  double snan_processed = bit_cast<double>(0x7ffd555512345678);
+  double snan_processed = bit_cast<double>(0x7FFD555512345678);
   double qnan_processed = qnan;
 
   CHECK(IsSignallingNaN(snan));
@@ -9586,10 +9576,10 @@
 TEST(fmax_fmin_s) {
   INIT_V8();
   // Use non-standard NaNs to check that the payload bits are preserved.
-  float snan = bit_cast<float>(0x7f951234);
-  float qnan = bit_cast<float>(0x7fea8765);
+  float snan = bit_cast<float>(0x7F951234);
+  float qnan = bit_cast<float>(0x7FEA8765);
 
-  float snan_processed = bit_cast<float>(0x7fd51234);
+  float snan_processed = bit_cast<float>(0x7FD51234);
   float qnan_processed = qnan;
 
   CHECK(IsSignallingNaN(snan));
@@ -9729,7 +9719,7 @@
 
     __ Fmov(s8, 0.0);
     __ Fmov(s9, 0.5);
-    __ Mov(w18, 0x7f800001);  // Single precision NaN.
+    __ Mov(w18, 0x7F800001);  // Single precision NaN.
     __ Fmov(s18, w18);
 
     __ Fcmp(s8, s8);
@@ -9751,7 +9741,7 @@
 
     __ Fmov(d19, 0.0);
     __ Fmov(d20, 0.5);
-    __ Mov(x21, 0x7ff0000000000001UL);   // Double precision NaN.
+    __ Mov(x21, 0x7FF0000000000001UL);  // Double precision NaN.
     __ Fmov(d21, x21);
 
     __ Fcmp(d19, d19);
@@ -10424,8 +10414,8 @@
   __ Fmov(s26, -0.0);
   __ Fmov(s27, FLT_MAX);
   __ Fmov(s28, FLT_MIN);
-  __ Fmov(s29, bit_cast<float>(0x7fc12345));  // Quiet NaN.
-  __ Fmov(s30, bit_cast<float>(0x7f812345));  // Signalling NaN.
+  __ Fmov(s29, bit_cast<float>(0x7FC12345));  // Quiet NaN.
+  __ Fmov(s30, bit_cast<float>(0x7F812345));  // Signalling NaN.
 
   __ Fcvt(d0, s16);
   __ Fcvt(d1, s17);
@@ -10466,8 +10456,8 @@
   //  - The top bit of the mantissa is forced to 1 (making it a quiet NaN).
   //  - The remaining mantissa bits are copied until they run out.
   //  - The low-order bits that haven't already been assigned are set to 0.
-  CHECK_EQUAL_FP64(bit_cast<double>(0x7ff82468a0000000), d13);
-  CHECK_EQUAL_FP64(bit_cast<double>(0x7ff82468a0000000), d14);
+  CHECK_EQUAL_FP64(bit_cast<double>(0x7FF82468A0000000), d13);
+  CHECK_EQUAL_FP64(bit_cast<double>(0x7FF82468A0000000), d14);
 
   TEARDOWN();
 }
@@ -10498,23 +10488,23 @@
       //    For normalized numbers:
       //         bit 29 (0x0000000020000000) is the lowest-order bit which will
       //                                     fit in the float's mantissa.
-      {bit_cast<double>(0x3ff0000000000000), bit_cast<float>(0x3f800000)},
-      {bit_cast<double>(0x3ff0000000000001), bit_cast<float>(0x3f800000)},
-      {bit_cast<double>(0x3ff0000010000000), bit_cast<float>(0x3f800000)},
-      {bit_cast<double>(0x3ff0000010000001), bit_cast<float>(0x3f800001)},
-      {bit_cast<double>(0x3ff0000020000000), bit_cast<float>(0x3f800001)},
-      {bit_cast<double>(0x3ff0000020000001), bit_cast<float>(0x3f800001)},
-      {bit_cast<double>(0x3ff0000030000000), bit_cast<float>(0x3f800002)},
-      {bit_cast<double>(0x3ff0000030000001), bit_cast<float>(0x3f800002)},
-      {bit_cast<double>(0x3ff0000040000000), bit_cast<float>(0x3f800002)},
-      {bit_cast<double>(0x3ff0000040000001), bit_cast<float>(0x3f800002)},
-      {bit_cast<double>(0x3ff0000050000000), bit_cast<float>(0x3f800002)},
-      {bit_cast<double>(0x3ff0000050000001), bit_cast<float>(0x3f800003)},
-      {bit_cast<double>(0x3ff0000060000000), bit_cast<float>(0x3f800003)},
+      {bit_cast<double>(0x3FF0000000000000), bit_cast<float>(0x3F800000)},
+      {bit_cast<double>(0x3FF0000000000001), bit_cast<float>(0x3F800000)},
+      {bit_cast<double>(0x3FF0000010000000), bit_cast<float>(0x3F800000)},
+      {bit_cast<double>(0x3FF0000010000001), bit_cast<float>(0x3F800001)},
+      {bit_cast<double>(0x3FF0000020000000), bit_cast<float>(0x3F800001)},
+      {bit_cast<double>(0x3FF0000020000001), bit_cast<float>(0x3F800001)},
+      {bit_cast<double>(0x3FF0000030000000), bit_cast<float>(0x3F800002)},
+      {bit_cast<double>(0x3FF0000030000001), bit_cast<float>(0x3F800002)},
+      {bit_cast<double>(0x3FF0000040000000), bit_cast<float>(0x3F800002)},
+      {bit_cast<double>(0x3FF0000040000001), bit_cast<float>(0x3F800002)},
+      {bit_cast<double>(0x3FF0000050000000), bit_cast<float>(0x3F800002)},
+      {bit_cast<double>(0x3FF0000050000001), bit_cast<float>(0x3F800003)},
+      {bit_cast<double>(0x3FF0000060000000), bit_cast<float>(0x3F800003)},
       //  - A mantissa that overflows into the exponent during rounding.
-      {bit_cast<double>(0x3feffffff0000000), bit_cast<float>(0x3f800000)},
+      {bit_cast<double>(0x3FEFFFFFF0000000), bit_cast<float>(0x3F800000)},
       //  - The largest double that rounds to a normal float.
-      {bit_cast<double>(0x47efffffefffffff), bit_cast<float>(0x7f7fffff)},
+      {bit_cast<double>(0x47EFFFFFEFFFFFFF), bit_cast<float>(0x7F7FFFFF)},
 
       // Doubles that are too big for a float.
       {kFP64PositiveInfinity, kFP32PositiveInfinity},
@@ -10522,7 +10512,7 @@
       //  - The smallest exponent that's too big for a float.
       {pow(2.0, 128), kFP32PositiveInfinity},
       //  - This exponent is in range, but the value rounds to infinity.
-      {bit_cast<double>(0x47effffff0000000), kFP32PositiveInfinity},
+      {bit_cast<double>(0x47EFFFFFF0000000), kFP32PositiveInfinity},
 
       // Doubles that are too small for a float.
       //  - The smallest (subnormal) double.
@@ -10532,36 +10522,36 @@
 
       // Normal doubles that become subnormal floats.
       //  - The largest subnormal float.
-      {bit_cast<double>(0x380fffffc0000000), bit_cast<float>(0x007fffff)},
+      {bit_cast<double>(0x380FFFFFC0000000), bit_cast<float>(0x007FFFFF)},
       //  - The smallest subnormal float.
-      {bit_cast<double>(0x36a0000000000000), bit_cast<float>(0x00000001)},
+      {bit_cast<double>(0x36A0000000000000), bit_cast<float>(0x00000001)},
       //  - Subnormal floats that need (ties-to-even) rounding.
       //    For these subnormals:
       //         bit 34 (0x0000000400000000) is the lowest-order bit which will
       //                                     fit in the float's mantissa.
-      {bit_cast<double>(0x37c159e000000000), bit_cast<float>(0x00045678)},
-      {bit_cast<double>(0x37c159e000000001), bit_cast<float>(0x00045678)},
-      {bit_cast<double>(0x37c159e200000000), bit_cast<float>(0x00045678)},
-      {bit_cast<double>(0x37c159e200000001), bit_cast<float>(0x00045679)},
-      {bit_cast<double>(0x37c159e400000000), bit_cast<float>(0x00045679)},
-      {bit_cast<double>(0x37c159e400000001), bit_cast<float>(0x00045679)},
-      {bit_cast<double>(0x37c159e600000000), bit_cast<float>(0x0004567a)},
-      {bit_cast<double>(0x37c159e600000001), bit_cast<float>(0x0004567a)},
-      {bit_cast<double>(0x37c159e800000000), bit_cast<float>(0x0004567a)},
-      {bit_cast<double>(0x37c159e800000001), bit_cast<float>(0x0004567a)},
-      {bit_cast<double>(0x37c159ea00000000), bit_cast<float>(0x0004567a)},
-      {bit_cast<double>(0x37c159ea00000001), bit_cast<float>(0x0004567b)},
-      {bit_cast<double>(0x37c159ec00000000), bit_cast<float>(0x0004567b)},
+      {bit_cast<double>(0x37C159E000000000), bit_cast<float>(0x00045678)},
+      {bit_cast<double>(0x37C159E000000001), bit_cast<float>(0x00045678)},
+      {bit_cast<double>(0x37C159E200000000), bit_cast<float>(0x00045678)},
+      {bit_cast<double>(0x37C159E200000001), bit_cast<float>(0x00045679)},
+      {bit_cast<double>(0x37C159E400000000), bit_cast<float>(0x00045679)},
+      {bit_cast<double>(0x37C159E400000001), bit_cast<float>(0x00045679)},
+      {bit_cast<double>(0x37C159E600000000), bit_cast<float>(0x0004567A)},
+      {bit_cast<double>(0x37C159E600000001), bit_cast<float>(0x0004567A)},
+      {bit_cast<double>(0x37C159E800000000), bit_cast<float>(0x0004567A)},
+      {bit_cast<double>(0x37C159E800000001), bit_cast<float>(0x0004567A)},
+      {bit_cast<double>(0x37C159EA00000000), bit_cast<float>(0x0004567A)},
+      {bit_cast<double>(0x37C159EA00000001), bit_cast<float>(0x0004567B)},
+      {bit_cast<double>(0x37C159EC00000000), bit_cast<float>(0x0004567B)},
       //  - The smallest double which rounds up to become a subnormal float.
       {bit_cast<double>(0x3690000000000001), bit_cast<float>(0x00000001)},
 
       // Check NaN payload preservation.
-      {bit_cast<double>(0x7ff82468a0000000), bit_cast<float>(0x7fc12345)},
-      {bit_cast<double>(0x7ff82468bfffffff), bit_cast<float>(0x7fc12345)},
+      {bit_cast<double>(0x7FF82468A0000000), bit_cast<float>(0x7FC12345)},
+      {bit_cast<double>(0x7FF82468BFFFFFFF), bit_cast<float>(0x7FC12345)},
       //  - Signalling NaNs become quiet NaNs.
-      {bit_cast<double>(0x7ff02468a0000000), bit_cast<float>(0x7fc12345)},
-      {bit_cast<double>(0x7ff02468bfffffff), bit_cast<float>(0x7fc12345)},
-      {bit_cast<double>(0x7ff000001fffffff), bit_cast<float>(0x7fc00000)},
+      {bit_cast<double>(0x7FF02468A0000000), bit_cast<float>(0x7FC12345)},
+      {bit_cast<double>(0x7FF02468BFFFFFFF), bit_cast<float>(0x7FC12345)},
+      {bit_cast<double>(0x7FF000001FFFFFFF), bit_cast<float>(0x7FC00000)},
   };
   int count = sizeof(test) / sizeof(test[0]);
 
@@ -10570,8 +10560,8 @@
     float expected = test[i].expected;
 
     // We only expect positive input.
-    CHECK(std::signbit(in) == 0);
-    CHECK(std::signbit(expected) == 0);
+    CHECK_EQ(std::signbit(in), 0);
+    CHECK_EQ(std::signbit(expected), 0);
 
     SETUP();
     START();
@@ -10602,7 +10592,7 @@
   __ Fmov(s3, -2.5);
   __ Fmov(s4, kFP32PositiveInfinity);
   __ Fmov(s5, kFP32NegativeInfinity);
-  __ Fmov(s6, 0x7fffff80);  // Largest float < INT32_MAX.
+  __ Fmov(s6, 0x7FFFFF80);  // Largest float < INT32_MAX.
   __ Fneg(s7, s6);          // Smallest float > INT32_MIN.
   __ Fmov(d8, 1.0);
   __ Fmov(d9, 1.1);
@@ -10617,14 +10607,14 @@
   __ Fmov(s19, -2.5);
   __ Fmov(s20, kFP32PositiveInfinity);
   __ Fmov(s21, kFP32NegativeInfinity);
-  __ Fmov(s22, 0x7fffff8000000000UL);   // Largest float < INT64_MAX.
+  __ Fmov(s22, 0x7FFFFF8000000000UL);   // Largest float < INT64_MAX.
   __ Fneg(s23, s22);                    // Smallest float > INT64_MIN.
   __ Fmov(d24, 1.1);
   __ Fmov(d25, 2.5);
   __ Fmov(d26, -2.5);
   __ Fmov(d27, kFP64PositiveInfinity);
   __ Fmov(d28, kFP64NegativeInfinity);
-  __ Fmov(d29, 0x7ffffffffffffc00UL);   // Largest double < INT64_MAX.
+  __ Fmov(d29, 0x7FFFFFFFFFFFFC00UL);   // Largest double < INT64_MAX.
   __ Fneg(d30, d29);                    // Smallest double > INT64_MIN.
 
   __ Fcvtas(w0, s0);
@@ -10664,32 +10654,32 @@
   CHECK_EQUAL_64(1, x0);
   CHECK_EQUAL_64(1, x1);
   CHECK_EQUAL_64(3, x2);
-  CHECK_EQUAL_64(0xfffffffd, x3);
-  CHECK_EQUAL_64(0x7fffffff, x4);
+  CHECK_EQUAL_64(0xFFFFFFFD, x3);
+  CHECK_EQUAL_64(0x7FFFFFFF, x4);
   CHECK_EQUAL_64(0x80000000, x5);
-  CHECK_EQUAL_64(0x7fffff80, x6);
+  CHECK_EQUAL_64(0x7FFFFF80, x6);
   CHECK_EQUAL_64(0x80000080, x7);
   CHECK_EQUAL_64(1, x8);
   CHECK_EQUAL_64(1, x9);
   CHECK_EQUAL_64(3, x10);
-  CHECK_EQUAL_64(0xfffffffd, x11);
-  CHECK_EQUAL_64(0x7fffffff, x12);
+  CHECK_EQUAL_64(0xFFFFFFFD, x11);
+  CHECK_EQUAL_64(0x7FFFFFFF, x12);
   CHECK_EQUAL_64(0x80000000, x13);
-  CHECK_EQUAL_64(0x7ffffffe, x14);
+  CHECK_EQUAL_64(0x7FFFFFFE, x14);
   CHECK_EQUAL_64(0x80000001, x15);
   CHECK_EQUAL_64(1, x17);
   CHECK_EQUAL_64(3, x18);
-  CHECK_EQUAL_64(0xfffffffffffffffdUL, x19);
-  CHECK_EQUAL_64(0x7fffffffffffffffUL, x20);
+  CHECK_EQUAL_64(0xFFFFFFFFFFFFFFFDUL, x19);
+  CHECK_EQUAL_64(0x7FFFFFFFFFFFFFFFUL, x20);
   CHECK_EQUAL_64(0x8000000000000000UL, x21);
-  CHECK_EQUAL_64(0x7fffff8000000000UL, x22);
+  CHECK_EQUAL_64(0x7FFFFF8000000000UL, x22);
   CHECK_EQUAL_64(0x8000008000000000UL, x23);
   CHECK_EQUAL_64(1, x24);
   CHECK_EQUAL_64(3, x25);
-  CHECK_EQUAL_64(0xfffffffffffffffdUL, x26);
-  CHECK_EQUAL_64(0x7fffffffffffffffUL, x27);
+  CHECK_EQUAL_64(0xFFFFFFFFFFFFFFFDUL, x26);
+  CHECK_EQUAL_64(0x7FFFFFFFFFFFFFFFUL, x27);
   CHECK_EQUAL_64(0x8000000000000000UL, x28);
-  CHECK_EQUAL_64(0x7ffffffffffffc00UL, x29);
+  CHECK_EQUAL_64(0x7FFFFFFFFFFFFC00UL, x29);
   CHECK_EQUAL_64(0x8000000000000400UL, x30);
 
   TEARDOWN();
@@ -10707,27 +10697,27 @@
   __ Fmov(s3, -2.5);
   __ Fmov(s4, kFP32PositiveInfinity);
   __ Fmov(s5, kFP32NegativeInfinity);
-  __ Fmov(s6, 0xffffff00);  // Largest float < UINT32_MAX.
+  __ Fmov(s6, 0xFFFFFF00);  // Largest float < UINT32_MAX.
   __ Fmov(d8, 1.0);
   __ Fmov(d9, 1.1);
   __ Fmov(d10, 2.5);
   __ Fmov(d11, -2.5);
   __ Fmov(d12, kFP64PositiveInfinity);
   __ Fmov(d13, kFP64NegativeInfinity);
-  __ Fmov(d14, 0xfffffffe);
+  __ Fmov(d14, 0xFFFFFFFE);
   __ Fmov(s16, 1.0);
   __ Fmov(s17, 1.1);
   __ Fmov(s18, 2.5);
   __ Fmov(s19, -2.5);
   __ Fmov(s20, kFP32PositiveInfinity);
   __ Fmov(s21, kFP32NegativeInfinity);
-  __ Fmov(s22, 0xffffff0000000000UL);  // Largest float < UINT64_MAX.
+  __ Fmov(s22, 0xFFFFFF0000000000UL);  // Largest float < UINT64_MAX.
   __ Fmov(d24, 1.1);
   __ Fmov(d25, 2.5);
   __ Fmov(d26, -2.5);
   __ Fmov(d27, kFP64PositiveInfinity);
   __ Fmov(d28, kFP64NegativeInfinity);
-  __ Fmov(d29, 0xfffffffffffff800UL);  // Largest double < UINT64_MAX.
+  __ Fmov(d29, 0xFFFFFFFFFFFFF800UL);  // Largest double < UINT64_MAX.
   __ Fmov(s30, 0x100000000UL);
 
   __ Fcvtau(w0, s0);
@@ -10767,30 +10757,30 @@
   CHECK_EQUAL_64(1, x1);
   CHECK_EQUAL_64(3, x2);
   CHECK_EQUAL_64(0, x3);
-  CHECK_EQUAL_64(0xffffffff, x4);
+  CHECK_EQUAL_64(0xFFFFFFFF, x4);
   CHECK_EQUAL_64(0, x5);
-  CHECK_EQUAL_64(0xffffff00, x6);
+  CHECK_EQUAL_64(0xFFFFFF00, x6);
   CHECK_EQUAL_64(1, x8);
   CHECK_EQUAL_64(1, x9);
   CHECK_EQUAL_64(3, x10);
   CHECK_EQUAL_64(0, x11);
-  CHECK_EQUAL_64(0xffffffff, x12);
+  CHECK_EQUAL_64(0xFFFFFFFF, x12);
   CHECK_EQUAL_64(0, x13);
-  CHECK_EQUAL_64(0xfffffffe, x14);
+  CHECK_EQUAL_64(0xFFFFFFFE, x14);
   CHECK_EQUAL_64(1, x16);
   CHECK_EQUAL_64(1, x17);
   CHECK_EQUAL_64(3, x18);
   CHECK_EQUAL_64(0, x19);
-  CHECK_EQUAL_64(0xffffffffffffffffUL, x20);
+  CHECK_EQUAL_64(0xFFFFFFFFFFFFFFFFUL, x20);
   CHECK_EQUAL_64(0, x21);
-  CHECK_EQUAL_64(0xffffff0000000000UL, x22);
+  CHECK_EQUAL_64(0xFFFFFF0000000000UL, x22);
   CHECK_EQUAL_64(1, x24);
   CHECK_EQUAL_64(3, x25);
   CHECK_EQUAL_64(0, x26);
-  CHECK_EQUAL_64(0xffffffffffffffffUL, x27);
+  CHECK_EQUAL_64(0xFFFFFFFFFFFFFFFFUL, x27);
   CHECK_EQUAL_64(0, x28);
-  CHECK_EQUAL_64(0xfffffffffffff800UL, x29);
-  CHECK_EQUAL_64(0xffffffff, x30);
+  CHECK_EQUAL_64(0xFFFFFFFFFFFFF800UL, x29);
+  CHECK_EQUAL_64(0xFFFFFFFF, x30);
 
   TEARDOWN();
 }
@@ -10807,7 +10797,7 @@
   __ Fmov(s3, -1.5);
   __ Fmov(s4, kFP32PositiveInfinity);
   __ Fmov(s5, kFP32NegativeInfinity);
-  __ Fmov(s6, 0x7fffff80);  // Largest float < INT32_MAX.
+  __ Fmov(s6, 0x7FFFFF80);  // Largest float < INT32_MAX.
   __ Fneg(s7, s6);          // Smallest float > INT32_MIN.
   __ Fmov(d8, 1.0);
   __ Fmov(d9, 1.1);
@@ -10822,14 +10812,14 @@
   __ Fmov(s19, -1.5);
   __ Fmov(s20, kFP32PositiveInfinity);
   __ Fmov(s21, kFP32NegativeInfinity);
-  __ Fmov(s22, 0x7fffff8000000000UL);   // Largest float < INT64_MAX.
+  __ Fmov(s22, 0x7FFFFF8000000000UL);   // Largest float < INT64_MAX.
   __ Fneg(s23, s22);                    // Smallest float > INT64_MIN.
   __ Fmov(d24, 1.1);
   __ Fmov(d25, 1.5);
   __ Fmov(d26, -1.5);
   __ Fmov(d27, kFP64PositiveInfinity);
   __ Fmov(d28, kFP64NegativeInfinity);
-  __ Fmov(d29, 0x7ffffffffffffc00UL);   // Largest double < INT64_MAX.
+  __ Fmov(d29, 0x7FFFFFFFFFFFFC00UL);   // Largest double < INT64_MAX.
   __ Fneg(d30, d29);                    // Smallest double > INT64_MIN.
 
   __ Fcvtms(w0, s0);
@@ -10869,32 +10859,32 @@
   CHECK_EQUAL_64(1, x0);
   CHECK_EQUAL_64(1, x1);
   CHECK_EQUAL_64(1, x2);
-  CHECK_EQUAL_64(0xfffffffe, x3);
-  CHECK_EQUAL_64(0x7fffffff, x4);
+  CHECK_EQUAL_64(0xFFFFFFFE, x3);
+  CHECK_EQUAL_64(0x7FFFFFFF, x4);
   CHECK_EQUAL_64(0x80000000, x5);
-  CHECK_EQUAL_64(0x7fffff80, x6);
+  CHECK_EQUAL_64(0x7FFFFF80, x6);
   CHECK_EQUAL_64(0x80000080, x7);
   CHECK_EQUAL_64(1, x8);
   CHECK_EQUAL_64(1, x9);
   CHECK_EQUAL_64(1, x10);
-  CHECK_EQUAL_64(0xfffffffe, x11);
-  CHECK_EQUAL_64(0x7fffffff, x12);
+  CHECK_EQUAL_64(0xFFFFFFFE, x11);
+  CHECK_EQUAL_64(0x7FFFFFFF, x12);
   CHECK_EQUAL_64(0x80000000, x13);
-  CHECK_EQUAL_64(0x7ffffffe, x14);
+  CHECK_EQUAL_64(0x7FFFFFFE, x14);
   CHECK_EQUAL_64(0x80000001, x15);
   CHECK_EQUAL_64(1, x17);
   CHECK_EQUAL_64(1, x18);
-  CHECK_EQUAL_64(0xfffffffffffffffeUL, x19);
-  CHECK_EQUAL_64(0x7fffffffffffffffUL, x20);
+  CHECK_EQUAL_64(0xFFFFFFFFFFFFFFFEUL, x19);
+  CHECK_EQUAL_64(0x7FFFFFFFFFFFFFFFUL, x20);
   CHECK_EQUAL_64(0x8000000000000000UL, x21);
-  CHECK_EQUAL_64(0x7fffff8000000000UL, x22);
+  CHECK_EQUAL_64(0x7FFFFF8000000000UL, x22);
   CHECK_EQUAL_64(0x8000008000000000UL, x23);
   CHECK_EQUAL_64(1, x24);
   CHECK_EQUAL_64(1, x25);
-  CHECK_EQUAL_64(0xfffffffffffffffeUL, x26);
-  CHECK_EQUAL_64(0x7fffffffffffffffUL, x27);
+  CHECK_EQUAL_64(0xFFFFFFFFFFFFFFFEUL, x26);
+  CHECK_EQUAL_64(0x7FFFFFFFFFFFFFFFUL, x27);
   CHECK_EQUAL_64(0x8000000000000000UL, x28);
-  CHECK_EQUAL_64(0x7ffffffffffffc00UL, x29);
+  CHECK_EQUAL_64(0x7FFFFFFFFFFFFC00UL, x29);
   CHECK_EQUAL_64(0x8000000000000400UL, x30);
 
   TEARDOWN();
@@ -10912,7 +10902,7 @@
   __ Fmov(s3, -1.5);
   __ Fmov(s4, kFP32PositiveInfinity);
   __ Fmov(s5, kFP32NegativeInfinity);
-  __ Fmov(s6, 0x7fffff80);  // Largest float < INT32_MAX.
+  __ Fmov(s6, 0x7FFFFF80);  // Largest float < INT32_MAX.
   __ Fneg(s7, s6);          // Smallest float > INT32_MIN.
   __ Fmov(d8, 1.0);
   __ Fmov(d9, 1.1);
@@ -10927,14 +10917,14 @@
   __ Fmov(s19, -1.5);
   __ Fmov(s20, kFP32PositiveInfinity);
   __ Fmov(s21, kFP32NegativeInfinity);
-  __ Fmov(s22, 0x7fffff8000000000UL);   // Largest float < INT64_MAX.
+  __ Fmov(s22, 0x7FFFFF8000000000UL);   // Largest float < INT64_MAX.
   __ Fneg(s23, s22);                    // Smallest float > INT64_MIN.
   __ Fmov(d24, 1.1);
   __ Fmov(d25, 1.5);
   __ Fmov(d26, -1.5);
   __ Fmov(d27, kFP64PositiveInfinity);
   __ Fmov(d28, kFP64NegativeInfinity);
-  __ Fmov(d29, 0x7ffffffffffffc00UL);   // Largest double < INT64_MAX.
+  __ Fmov(d29, 0x7FFFFFFFFFFFFC00UL);   // Largest double < INT64_MAX.
   __ Fneg(d30, d29);                    // Smallest double > INT64_MIN.
 
   __ Fcvtmu(w0, s0);
@@ -10974,30 +10964,30 @@
   CHECK_EQUAL_64(1, x1);
   CHECK_EQUAL_64(1, x2);
   CHECK_EQUAL_64(0, x3);
-  CHECK_EQUAL_64(0xffffffff, x4);
+  CHECK_EQUAL_64(0xFFFFFFFF, x4);
   CHECK_EQUAL_64(0, x5);
-  CHECK_EQUAL_64(0x7fffff80, x6);
+  CHECK_EQUAL_64(0x7FFFFF80, x6);
   CHECK_EQUAL_64(0, x7);
   CHECK_EQUAL_64(1, x8);
   CHECK_EQUAL_64(1, x9);
   CHECK_EQUAL_64(1, x10);
   CHECK_EQUAL_64(0, x11);
-  CHECK_EQUAL_64(0xffffffff, x12);
+  CHECK_EQUAL_64(0xFFFFFFFF, x12);
   CHECK_EQUAL_64(0, x13);
-  CHECK_EQUAL_64(0x7ffffffe, x14);
+  CHECK_EQUAL_64(0x7FFFFFFE, x14);
   CHECK_EQUAL_64(1, x17);
   CHECK_EQUAL_64(1, x18);
   CHECK_EQUAL_64(0x0UL, x19);
-  CHECK_EQUAL_64(0xffffffffffffffffUL, x20);
+  CHECK_EQUAL_64(0xFFFFFFFFFFFFFFFFUL, x20);
   CHECK_EQUAL_64(0x0UL, x21);
-  CHECK_EQUAL_64(0x7fffff8000000000UL, x22);
+  CHECK_EQUAL_64(0x7FFFFF8000000000UL, x22);
   CHECK_EQUAL_64(0x0UL, x23);
   CHECK_EQUAL_64(1, x24);
   CHECK_EQUAL_64(1, x25);
   CHECK_EQUAL_64(0x0UL, x26);
-  CHECK_EQUAL_64(0xffffffffffffffffUL, x27);
+  CHECK_EQUAL_64(0xFFFFFFFFFFFFFFFFUL, x27);
   CHECK_EQUAL_64(0x0UL, x28);
-  CHECK_EQUAL_64(0x7ffffffffffffc00UL, x29);
+  CHECK_EQUAL_64(0x7FFFFFFFFFFFFC00UL, x29);
   CHECK_EQUAL_64(0x0UL, x30);
 
   TEARDOWN();
@@ -11015,7 +11005,7 @@
   __ Fmov(s3, -1.5);
   __ Fmov(s4, kFP32PositiveInfinity);
   __ Fmov(s5, kFP32NegativeInfinity);
-  __ Fmov(s6, 0x7fffff80);  // Largest float < INT32_MAX.
+  __ Fmov(s6, 0x7FFFFF80);  // Largest float < INT32_MAX.
   __ Fneg(s7, s6);          // Smallest float > INT32_MIN.
   __ Fmov(d8, 1.0);
   __ Fmov(d9, 1.1);
@@ -11030,14 +11020,14 @@
   __ Fmov(s19, -1.5);
   __ Fmov(s20, kFP32PositiveInfinity);
   __ Fmov(s21, kFP32NegativeInfinity);
-  __ Fmov(s22, 0x7fffff8000000000UL);   // Largest float < INT64_MAX.
+  __ Fmov(s22, 0x7FFFFF8000000000UL);   // Largest float < INT64_MAX.
   __ Fneg(s23, s22);                    // Smallest float > INT64_MIN.
   __ Fmov(d24, 1.1);
   __ Fmov(d25, 1.5);
   __ Fmov(d26, -1.5);
   __ Fmov(d27, kFP64PositiveInfinity);
   __ Fmov(d28, kFP64NegativeInfinity);
-  __ Fmov(d29, 0x7ffffffffffffc00UL);   // Largest double < INT64_MAX.
+  __ Fmov(d29, 0x7FFFFFFFFFFFFC00UL);   // Largest double < INT64_MAX.
   __ Fneg(d30, d29);                    // Smallest double > INT64_MIN.
 
   __ Fcvtns(w0, s0);
@@ -11077,32 +11067,32 @@
   CHECK_EQUAL_64(1, x0);
   CHECK_EQUAL_64(1, x1);
   CHECK_EQUAL_64(2, x2);
-  CHECK_EQUAL_64(0xfffffffe, x3);
-  CHECK_EQUAL_64(0x7fffffff, x4);
+  CHECK_EQUAL_64(0xFFFFFFFE, x3);
+  CHECK_EQUAL_64(0x7FFFFFFF, x4);
   CHECK_EQUAL_64(0x80000000, x5);
-  CHECK_EQUAL_64(0x7fffff80, x6);
+  CHECK_EQUAL_64(0x7FFFFF80, x6);
   CHECK_EQUAL_64(0x80000080, x7);
   CHECK_EQUAL_64(1, x8);
   CHECK_EQUAL_64(1, x9);
   CHECK_EQUAL_64(2, x10);
-  CHECK_EQUAL_64(0xfffffffe, x11);
-  CHECK_EQUAL_64(0x7fffffff, x12);
+  CHECK_EQUAL_64(0xFFFFFFFE, x11);
+  CHECK_EQUAL_64(0x7FFFFFFF, x12);
   CHECK_EQUAL_64(0x80000000, x13);
-  CHECK_EQUAL_64(0x7ffffffe, x14);
+  CHECK_EQUAL_64(0x7FFFFFFE, x14);
   CHECK_EQUAL_64(0x80000001, x15);
   CHECK_EQUAL_64(1, x17);
   CHECK_EQUAL_64(2, x18);
-  CHECK_EQUAL_64(0xfffffffffffffffeUL, x19);
-  CHECK_EQUAL_64(0x7fffffffffffffffUL, x20);
+  CHECK_EQUAL_64(0xFFFFFFFFFFFFFFFEUL, x19);
+  CHECK_EQUAL_64(0x7FFFFFFFFFFFFFFFUL, x20);
   CHECK_EQUAL_64(0x8000000000000000UL, x21);
-  CHECK_EQUAL_64(0x7fffff8000000000UL, x22);
+  CHECK_EQUAL_64(0x7FFFFF8000000000UL, x22);
   CHECK_EQUAL_64(0x8000008000000000UL, x23);
   CHECK_EQUAL_64(1, x24);
   CHECK_EQUAL_64(2, x25);
-  CHECK_EQUAL_64(0xfffffffffffffffeUL, x26);
-  CHECK_EQUAL_64(0x7fffffffffffffffUL, x27);
-//  CHECK_EQUAL_64(0x8000000000000000UL, x28);
-  CHECK_EQUAL_64(0x7ffffffffffffc00UL, x29);
+  CHECK_EQUAL_64(0xFFFFFFFFFFFFFFFEUL, x26);
+  CHECK_EQUAL_64(0x7FFFFFFFFFFFFFFFUL, x27);
+  //  CHECK_EQUAL_64(0x8000000000000000UL, x28);
+  CHECK_EQUAL_64(0x7FFFFFFFFFFFFC00UL, x29);
   CHECK_EQUAL_64(0x8000000000000400UL, x30);
 
   TEARDOWN();
@@ -11120,27 +11110,27 @@
   __ Fmov(s3, -1.5);
   __ Fmov(s4, kFP32PositiveInfinity);
   __ Fmov(s5, kFP32NegativeInfinity);
-  __ Fmov(s6, 0xffffff00);  // Largest float < UINT32_MAX.
+  __ Fmov(s6, 0xFFFFFF00);  // Largest float < UINT32_MAX.
   __ Fmov(d8, 1.0);
   __ Fmov(d9, 1.1);
   __ Fmov(d10, 1.5);
   __ Fmov(d11, -1.5);
   __ Fmov(d12, kFP64PositiveInfinity);
   __ Fmov(d13, kFP64NegativeInfinity);
-  __ Fmov(d14, 0xfffffffe);
+  __ Fmov(d14, 0xFFFFFFFE);
   __ Fmov(s16, 1.0);
   __ Fmov(s17, 1.1);
   __ Fmov(s18, 1.5);
   __ Fmov(s19, -1.5);
   __ Fmov(s20, kFP32PositiveInfinity);
   __ Fmov(s21, kFP32NegativeInfinity);
-  __ Fmov(s22, 0xffffff0000000000UL);   // Largest float < UINT64_MAX.
+  __ Fmov(s22, 0xFFFFFF0000000000UL);  // Largest float < UINT64_MAX.
   __ Fmov(d24, 1.1);
   __ Fmov(d25, 1.5);
   __ Fmov(d26, -1.5);
   __ Fmov(d27, kFP64PositiveInfinity);
   __ Fmov(d28, kFP64NegativeInfinity);
-  __ Fmov(d29, 0xfffffffffffff800UL);   // Largest double < UINT64_MAX.
+  __ Fmov(d29, 0xFFFFFFFFFFFFF800UL);  // Largest double < UINT64_MAX.
   __ Fmov(s30, 0x100000000UL);
 
   __ Fcvtnu(w0, s0);
@@ -11180,30 +11170,30 @@
   CHECK_EQUAL_64(1, x1);
   CHECK_EQUAL_64(2, x2);
   CHECK_EQUAL_64(0, x3);
-  CHECK_EQUAL_64(0xffffffff, x4);
+  CHECK_EQUAL_64(0xFFFFFFFF, x4);
   CHECK_EQUAL_64(0, x5);
-  CHECK_EQUAL_64(0xffffff00, x6);
+  CHECK_EQUAL_64(0xFFFFFF00, x6);
   CHECK_EQUAL_64(1, x8);
   CHECK_EQUAL_64(1, x9);
   CHECK_EQUAL_64(2, x10);
   CHECK_EQUAL_64(0, x11);
-  CHECK_EQUAL_64(0xffffffff, x12);
+  CHECK_EQUAL_64(0xFFFFFFFF, x12);
   CHECK_EQUAL_64(0, x13);
-  CHECK_EQUAL_64(0xfffffffe, x14);
+  CHECK_EQUAL_64(0xFFFFFFFE, x14);
   CHECK_EQUAL_64(1, x16);
   CHECK_EQUAL_64(1, x17);
   CHECK_EQUAL_64(2, x18);
   CHECK_EQUAL_64(0, x19);
-  CHECK_EQUAL_64(0xffffffffffffffffUL, x20);
+  CHECK_EQUAL_64(0xFFFFFFFFFFFFFFFFUL, x20);
   CHECK_EQUAL_64(0, x21);
-  CHECK_EQUAL_64(0xffffff0000000000UL, x22);
+  CHECK_EQUAL_64(0xFFFFFF0000000000UL, x22);
   CHECK_EQUAL_64(1, x24);
   CHECK_EQUAL_64(2, x25);
   CHECK_EQUAL_64(0, x26);
-  CHECK_EQUAL_64(0xffffffffffffffffUL, x27);
-//  CHECK_EQUAL_64(0, x28);
-  CHECK_EQUAL_64(0xfffffffffffff800UL, x29);
-  CHECK_EQUAL_64(0xffffffff, x30);
+  CHECK_EQUAL_64(0xFFFFFFFFFFFFFFFFUL, x27);
+  //  CHECK_EQUAL_64(0, x28);
+  CHECK_EQUAL_64(0xFFFFFFFFFFFFF800UL, x29);
+  CHECK_EQUAL_64(0xFFFFFFFF, x30);
 
   TEARDOWN();
 }
@@ -11220,7 +11210,7 @@
   __ Fmov(s3, -1.5);
   __ Fmov(s4, kFP32PositiveInfinity);
   __ Fmov(s5, kFP32NegativeInfinity);
-  __ Fmov(s6, 0x7fffff80);  // Largest float < INT32_MAX.
+  __ Fmov(s6, 0x7FFFFF80);  // Largest float < INT32_MAX.
   __ Fneg(s7, s6);          // Smallest float > INT32_MIN.
   __ Fmov(d8, 1.0);
   __ Fmov(d9, 1.1);
@@ -11235,14 +11225,14 @@
   __ Fmov(s19, -1.5);
   __ Fmov(s20, kFP32PositiveInfinity);
   __ Fmov(s21, kFP32NegativeInfinity);
-  __ Fmov(s22, 0x7fffff8000000000UL);   // Largest float < INT64_MAX.
+  __ Fmov(s22, 0x7FFFFF8000000000UL);   // Largest float < INT64_MAX.
   __ Fneg(s23, s22);                    // Smallest float > INT64_MIN.
   __ Fmov(d24, 1.1);
   __ Fmov(d25, 1.5);
   __ Fmov(d26, -1.5);
   __ Fmov(d27, kFP64PositiveInfinity);
   __ Fmov(d28, kFP64NegativeInfinity);
-  __ Fmov(d29, 0x7ffffffffffffc00UL);   // Largest double < INT64_MAX.
+  __ Fmov(d29, 0x7FFFFFFFFFFFFC00UL);   // Largest double < INT64_MAX.
   __ Fneg(d30, d29);                    // Smallest double > INT64_MIN.
 
   __ Fcvtzs(w0, s0);
@@ -11282,32 +11272,32 @@
   CHECK_EQUAL_64(1, x0);
   CHECK_EQUAL_64(1, x1);
   CHECK_EQUAL_64(1, x2);
-  CHECK_EQUAL_64(0xffffffff, x3);
-  CHECK_EQUAL_64(0x7fffffff, x4);
+  CHECK_EQUAL_64(0xFFFFFFFF, x3);
+  CHECK_EQUAL_64(0x7FFFFFFF, x4);
   CHECK_EQUAL_64(0x80000000, x5);
-  CHECK_EQUAL_64(0x7fffff80, x6);
+  CHECK_EQUAL_64(0x7FFFFF80, x6);
   CHECK_EQUAL_64(0x80000080, x7);
   CHECK_EQUAL_64(1, x8);
   CHECK_EQUAL_64(1, x9);
   CHECK_EQUAL_64(1, x10);
-  CHECK_EQUAL_64(0xffffffff, x11);
-  CHECK_EQUAL_64(0x7fffffff, x12);
+  CHECK_EQUAL_64(0xFFFFFFFF, x11);
+  CHECK_EQUAL_64(0x7FFFFFFF, x12);
   CHECK_EQUAL_64(0x80000000, x13);
-  CHECK_EQUAL_64(0x7ffffffe, x14);
+  CHECK_EQUAL_64(0x7FFFFFFE, x14);
   CHECK_EQUAL_64(0x80000001, x15);
   CHECK_EQUAL_64(1, x17);
   CHECK_EQUAL_64(1, x18);
-  CHECK_EQUAL_64(0xffffffffffffffffUL, x19);
-  CHECK_EQUAL_64(0x7fffffffffffffffUL, x20);
+  CHECK_EQUAL_64(0xFFFFFFFFFFFFFFFFUL, x19);
+  CHECK_EQUAL_64(0x7FFFFFFFFFFFFFFFUL, x20);
   CHECK_EQUAL_64(0x8000000000000000UL, x21);
-  CHECK_EQUAL_64(0x7fffff8000000000UL, x22);
+  CHECK_EQUAL_64(0x7FFFFF8000000000UL, x22);
   CHECK_EQUAL_64(0x8000008000000000UL, x23);
   CHECK_EQUAL_64(1, x24);
   CHECK_EQUAL_64(1, x25);
-  CHECK_EQUAL_64(0xffffffffffffffffUL, x26);
-  CHECK_EQUAL_64(0x7fffffffffffffffUL, x27);
+  CHECK_EQUAL_64(0xFFFFFFFFFFFFFFFFUL, x26);
+  CHECK_EQUAL_64(0x7FFFFFFFFFFFFFFFUL, x27);
   CHECK_EQUAL_64(0x8000000000000000UL, x28);
-  CHECK_EQUAL_64(0x7ffffffffffffc00UL, x29);
+  CHECK_EQUAL_64(0x7FFFFFFFFFFFFC00UL, x29);
   CHECK_EQUAL_64(0x8000000000000400UL, x30);
 
   TEARDOWN();
@@ -11325,7 +11315,7 @@
   __ Fmov(s3, -1.5);
   __ Fmov(s4, kFP32PositiveInfinity);
   __ Fmov(s5, kFP32NegativeInfinity);
-  __ Fmov(s6, 0x7fffff80);  // Largest float < INT32_MAX.
+  __ Fmov(s6, 0x7FFFFF80);  // Largest float < INT32_MAX.
   __ Fneg(s7, s6);          // Smallest float > INT32_MIN.
   __ Fmov(d8, 1.0);
   __ Fmov(d9, 1.1);
@@ -11340,14 +11330,14 @@
   __ Fmov(s19, -1.5);
   __ Fmov(s20, kFP32PositiveInfinity);
   __ Fmov(s21, kFP32NegativeInfinity);
-  __ Fmov(s22, 0x7fffff8000000000UL);   // Largest float < INT64_MAX.
+  __ Fmov(s22, 0x7FFFFF8000000000UL);   // Largest float < INT64_MAX.
   __ Fneg(s23, s22);                    // Smallest float > INT64_MIN.
   __ Fmov(d24, 1.1);
   __ Fmov(d25, 1.5);
   __ Fmov(d26, -1.5);
   __ Fmov(d27, kFP64PositiveInfinity);
   __ Fmov(d28, kFP64NegativeInfinity);
-  __ Fmov(d29, 0x7ffffffffffffc00UL);   // Largest double < INT64_MAX.
+  __ Fmov(d29, 0x7FFFFFFFFFFFFC00UL);   // Largest double < INT64_MAX.
   __ Fneg(d30, d29);                    // Smallest double > INT64_MIN.
 
   __ Fcvtzu(w0, s0);
@@ -11387,30 +11377,30 @@
   CHECK_EQUAL_64(1, x1);
   CHECK_EQUAL_64(1, x2);
   CHECK_EQUAL_64(0, x3);
-  CHECK_EQUAL_64(0xffffffff, x4);
+  CHECK_EQUAL_64(0xFFFFFFFF, x4);
   CHECK_EQUAL_64(0, x5);
-  CHECK_EQUAL_64(0x7fffff80, x6);
+  CHECK_EQUAL_64(0x7FFFFF80, x6);
   CHECK_EQUAL_64(0, x7);
   CHECK_EQUAL_64(1, x8);
   CHECK_EQUAL_64(1, x9);
   CHECK_EQUAL_64(1, x10);
   CHECK_EQUAL_64(0, x11);
-  CHECK_EQUAL_64(0xffffffff, x12);
+  CHECK_EQUAL_64(0xFFFFFFFF, x12);
   CHECK_EQUAL_64(0, x13);
-  CHECK_EQUAL_64(0x7ffffffe, x14);
+  CHECK_EQUAL_64(0x7FFFFFFE, x14);
   CHECK_EQUAL_64(1, x17);
   CHECK_EQUAL_64(1, x18);
   CHECK_EQUAL_64(0x0UL, x19);
-  CHECK_EQUAL_64(0xffffffffffffffffUL, x20);
+  CHECK_EQUAL_64(0xFFFFFFFFFFFFFFFFUL, x20);
   CHECK_EQUAL_64(0x0UL, x21);
-  CHECK_EQUAL_64(0x7fffff8000000000UL, x22);
+  CHECK_EQUAL_64(0x7FFFFF8000000000UL, x22);
   CHECK_EQUAL_64(0x0UL, x23);
   CHECK_EQUAL_64(1, x24);
   CHECK_EQUAL_64(1, x25);
   CHECK_EQUAL_64(0x0UL, x26);
-  CHECK_EQUAL_64(0xffffffffffffffffUL, x27);
+  CHECK_EQUAL_64(0xFFFFFFFFFFFFFFFFUL, x27);
   CHECK_EQUAL_64(0x0UL, x28);
-  CHECK_EQUAL_64(0x7ffffffffffffc00UL, x29);
+  CHECK_EQUAL_64(0x7FFFFFFFFFFFFC00UL, x29);
   CHECK_EQUAL_64(0x0UL, x30);
 
   TEARDOWN();
@@ -11431,9 +11421,9 @@
                              uint64_t expected_scvtf_bits,
                              uint64_t expected_ucvtf_bits) {
   uint64_t u64 = in;
-  uint32_t u32 = u64 & 0xffffffff;
+  uint32_t u32 = u64 & 0xFFFFFFFF;
   int64_t s64 = static_cast<int64_t>(in);
-  int32_t s32 = s64 & 0x7fffffff;
+  int32_t s32 = s64 & 0x7FFFFFFF;
 
   bool cvtf_s32 = (s64 == s32);
   bool cvtf_u32 = (u64 == u32);
@@ -11521,63 +11511,63 @@
   // results should not depened on the rounding mode, and ucvtf and scvtf should
   // produce the same result.
   TestUScvtfHelper(0x0000000000000000, 0x0000000000000000, 0x0000000000000000);
-  TestUScvtfHelper(0x0000000000000001, 0x3ff0000000000000, 0x3ff0000000000000);
-  TestUScvtfHelper(0x0000000040000000, 0x41d0000000000000, 0x41d0000000000000);
-  TestUScvtfHelper(0x0000000100000000, 0x41f0000000000000, 0x41f0000000000000);
-  TestUScvtfHelper(0x4000000000000000, 0x43d0000000000000, 0x43d0000000000000);
+  TestUScvtfHelper(0x0000000000000001, 0x3FF0000000000000, 0x3FF0000000000000);
+  TestUScvtfHelper(0x0000000040000000, 0x41D0000000000000, 0x41D0000000000000);
+  TestUScvtfHelper(0x0000000100000000, 0x41F0000000000000, 0x41F0000000000000);
+  TestUScvtfHelper(0x4000000000000000, 0x43D0000000000000, 0x43D0000000000000);
   // Test mantissa extremities.
-  TestUScvtfHelper(0x4000000000000400, 0x43d0000000000001, 0x43d0000000000001);
+  TestUScvtfHelper(0x4000000000000400, 0x43D0000000000001, 0x43D0000000000001);
   // The largest int32_t that fits in a double.
-  TestUScvtfHelper(0x000000007fffffff, 0x41dfffffffc00000, 0x41dfffffffc00000);
+  TestUScvtfHelper(0x000000007FFFFFFF, 0x41DFFFFFFFC00000, 0x41DFFFFFFFC00000);
   // Values that would be negative if treated as an int32_t.
-  TestUScvtfHelper(0x00000000ffffffff, 0x41efffffffe00000, 0x41efffffffe00000);
-  TestUScvtfHelper(0x0000000080000000, 0x41e0000000000000, 0x41e0000000000000);
-  TestUScvtfHelper(0x0000000080000001, 0x41e0000000200000, 0x41e0000000200000);
+  TestUScvtfHelper(0x00000000FFFFFFFF, 0x41EFFFFFFFE00000, 0x41EFFFFFFFE00000);
+  TestUScvtfHelper(0x0000000080000000, 0x41E0000000000000, 0x41E0000000000000);
+  TestUScvtfHelper(0x0000000080000001, 0x41E0000000200000, 0x41E0000000200000);
   // The largest int64_t that fits in a double.
-  TestUScvtfHelper(0x7ffffffffffffc00, 0x43dfffffffffffff, 0x43dfffffffffffff);
+  TestUScvtfHelper(0x7FFFFFFFFFFFFC00, 0x43DFFFFFFFFFFFFF, 0x43DFFFFFFFFFFFFF);
   // Check for bit pattern reproduction.
-  TestUScvtfHelper(0x0123456789abcde0, 0x43723456789abcde, 0x43723456789abcde);
-  TestUScvtfHelper(0x0000000012345678, 0x41b2345678000000, 0x41b2345678000000);
+  TestUScvtfHelper(0x0123456789ABCDE0, 0x43723456789ABCDE, 0x43723456789ABCDE);
+  TestUScvtfHelper(0x0000000012345678, 0x41B2345678000000, 0x41B2345678000000);
 
   // Simple conversions of negative int64_t values. These require no rounding,
   // and the results should not depend on the rounding mode.
-  TestUScvtfHelper(0xffffffffc0000000, 0xc1d0000000000000, 0x43effffffff80000);
-  TestUScvtfHelper(0xffffffff00000000, 0xc1f0000000000000, 0x43efffffffe00000);
-  TestUScvtfHelper(0xc000000000000000, 0xc3d0000000000000, 0x43e8000000000000);
+  TestUScvtfHelper(0xFFFFFFFFC0000000, 0xC1D0000000000000, 0x43EFFFFFFFF80000);
+  TestUScvtfHelper(0xFFFFFFFF00000000, 0xC1F0000000000000, 0x43EFFFFFFFE00000);
+  TestUScvtfHelper(0xC000000000000000, 0xC3D0000000000000, 0x43E8000000000000);
 
   // Conversions which require rounding.
-  TestUScvtfHelper(0x1000000000000000, 0x43b0000000000000, 0x43b0000000000000);
-  TestUScvtfHelper(0x1000000000000001, 0x43b0000000000000, 0x43b0000000000000);
-  TestUScvtfHelper(0x1000000000000080, 0x43b0000000000000, 0x43b0000000000000);
-  TestUScvtfHelper(0x1000000000000081, 0x43b0000000000001, 0x43b0000000000001);
-  TestUScvtfHelper(0x1000000000000100, 0x43b0000000000001, 0x43b0000000000001);
-  TestUScvtfHelper(0x1000000000000101, 0x43b0000000000001, 0x43b0000000000001);
-  TestUScvtfHelper(0x1000000000000180, 0x43b0000000000002, 0x43b0000000000002);
-  TestUScvtfHelper(0x1000000000000181, 0x43b0000000000002, 0x43b0000000000002);
-  TestUScvtfHelper(0x1000000000000200, 0x43b0000000000002, 0x43b0000000000002);
-  TestUScvtfHelper(0x1000000000000201, 0x43b0000000000002, 0x43b0000000000002);
-  TestUScvtfHelper(0x1000000000000280, 0x43b0000000000002, 0x43b0000000000002);
-  TestUScvtfHelper(0x1000000000000281, 0x43b0000000000003, 0x43b0000000000003);
-  TestUScvtfHelper(0x1000000000000300, 0x43b0000000000003, 0x43b0000000000003);
+  TestUScvtfHelper(0x1000000000000000, 0x43B0000000000000, 0x43B0000000000000);
+  TestUScvtfHelper(0x1000000000000001, 0x43B0000000000000, 0x43B0000000000000);
+  TestUScvtfHelper(0x1000000000000080, 0x43B0000000000000, 0x43B0000000000000);
+  TestUScvtfHelper(0x1000000000000081, 0x43B0000000000001, 0x43B0000000000001);
+  TestUScvtfHelper(0x1000000000000100, 0x43B0000000000001, 0x43B0000000000001);
+  TestUScvtfHelper(0x1000000000000101, 0x43B0000000000001, 0x43B0000000000001);
+  TestUScvtfHelper(0x1000000000000180, 0x43B0000000000002, 0x43B0000000000002);
+  TestUScvtfHelper(0x1000000000000181, 0x43B0000000000002, 0x43B0000000000002);
+  TestUScvtfHelper(0x1000000000000200, 0x43B0000000000002, 0x43B0000000000002);
+  TestUScvtfHelper(0x1000000000000201, 0x43B0000000000002, 0x43B0000000000002);
+  TestUScvtfHelper(0x1000000000000280, 0x43B0000000000002, 0x43B0000000000002);
+  TestUScvtfHelper(0x1000000000000281, 0x43B0000000000003, 0x43B0000000000003);
+  TestUScvtfHelper(0x1000000000000300, 0x43B0000000000003, 0x43B0000000000003);
   // Check rounding of negative int64_t values (and large uint64_t values).
-  TestUScvtfHelper(0x8000000000000000, 0xc3e0000000000000, 0x43e0000000000000);
-  TestUScvtfHelper(0x8000000000000001, 0xc3e0000000000000, 0x43e0000000000000);
-  TestUScvtfHelper(0x8000000000000200, 0xc3e0000000000000, 0x43e0000000000000);
-  TestUScvtfHelper(0x8000000000000201, 0xc3dfffffffffffff, 0x43e0000000000000);
-  TestUScvtfHelper(0x8000000000000400, 0xc3dfffffffffffff, 0x43e0000000000000);
-  TestUScvtfHelper(0x8000000000000401, 0xc3dfffffffffffff, 0x43e0000000000001);
-  TestUScvtfHelper(0x8000000000000600, 0xc3dffffffffffffe, 0x43e0000000000001);
-  TestUScvtfHelper(0x8000000000000601, 0xc3dffffffffffffe, 0x43e0000000000001);
-  TestUScvtfHelper(0x8000000000000800, 0xc3dffffffffffffe, 0x43e0000000000001);
-  TestUScvtfHelper(0x8000000000000801, 0xc3dffffffffffffe, 0x43e0000000000001);
-  TestUScvtfHelper(0x8000000000000a00, 0xc3dffffffffffffe, 0x43e0000000000001);
-  TestUScvtfHelper(0x8000000000000a01, 0xc3dffffffffffffd, 0x43e0000000000001);
-  TestUScvtfHelper(0x8000000000000c00, 0xc3dffffffffffffd, 0x43e0000000000002);
+  TestUScvtfHelper(0x8000000000000000, 0xC3E0000000000000, 0x43E0000000000000);
+  TestUScvtfHelper(0x8000000000000001, 0xC3E0000000000000, 0x43E0000000000000);
+  TestUScvtfHelper(0x8000000000000200, 0xC3E0000000000000, 0x43E0000000000000);
+  TestUScvtfHelper(0x8000000000000201, 0xC3DFFFFFFFFFFFFF, 0x43E0000000000000);
+  TestUScvtfHelper(0x8000000000000400, 0xC3DFFFFFFFFFFFFF, 0x43E0000000000000);
+  TestUScvtfHelper(0x8000000000000401, 0xC3DFFFFFFFFFFFFF, 0x43E0000000000001);
+  TestUScvtfHelper(0x8000000000000600, 0xC3DFFFFFFFFFFFFE, 0x43E0000000000001);
+  TestUScvtfHelper(0x8000000000000601, 0xC3DFFFFFFFFFFFFE, 0x43E0000000000001);
+  TestUScvtfHelper(0x8000000000000800, 0xC3DFFFFFFFFFFFFE, 0x43E0000000000001);
+  TestUScvtfHelper(0x8000000000000801, 0xC3DFFFFFFFFFFFFE, 0x43E0000000000001);
+  TestUScvtfHelper(0x8000000000000A00, 0xC3DFFFFFFFFFFFFE, 0x43E0000000000001);
+  TestUScvtfHelper(0x8000000000000A01, 0xC3DFFFFFFFFFFFFD, 0x43E0000000000001);
+  TestUScvtfHelper(0x8000000000000C00, 0xC3DFFFFFFFFFFFFD, 0x43E0000000000002);
   // Round up to produce a result that's too big for the input to represent.
-  TestUScvtfHelper(0x7ffffffffffffe00, 0x43e0000000000000, 0x43e0000000000000);
-  TestUScvtfHelper(0x7fffffffffffffff, 0x43e0000000000000, 0x43e0000000000000);
-  TestUScvtfHelper(0xfffffffffffffc00, 0xc090000000000000, 0x43f0000000000000);
-  TestUScvtfHelper(0xffffffffffffffff, 0xbff0000000000000, 0x43f0000000000000);
+  TestUScvtfHelper(0x7FFFFFFFFFFFFE00, 0x43E0000000000000, 0x43E0000000000000);
+  TestUScvtfHelper(0x7FFFFFFFFFFFFFFF, 0x43E0000000000000, 0x43E0000000000000);
+  TestUScvtfHelper(0xFFFFFFFFFFFFFC00, 0xC090000000000000, 0x43F0000000000000);
+  TestUScvtfHelper(0xFFFFFFFFFFFFFFFF, 0xBFF0000000000000, 0x43F0000000000000);
 }
 
 
@@ -11586,9 +11576,9 @@
                                uint32_t expected_scvtf_bits,
                                uint32_t expected_ucvtf_bits) {
   uint64_t u64 = in;
-  uint32_t u32 = u64 & 0xffffffff;
+  uint32_t u32 = u64 & 0xFFFFFFFF;
   int64_t s64 = static_cast<int64_t>(in);
-  int32_t s32 = s64 & 0x7fffffff;
+  int32_t s32 = s64 & 0x7FFFFFFF;
 
   bool cvtf_s32 = (s64 == s32);
   bool cvtf_u32 = (u64 == u32);
@@ -11658,10 +11648,8 @@
     CHECK_EQUAL_FP32(expected_ucvtf, results_ucvtf_x[fbits]);
     if (cvtf_s32) CHECK_EQUAL_FP32(expected_scvtf, results_scvtf_w[fbits]);
     if (cvtf_u32) CHECK_EQUAL_FP32(expected_ucvtf, results_ucvtf_w[fbits]);
-    break;
   }
   for (int fbits = 33; fbits <= 64; fbits++) {
-    break;
     float expected_scvtf = expected_scvtf_base / powf(2, fbits);
     float expected_ucvtf = expected_ucvtf_base / powf(2, fbits);
     CHECK_EQUAL_FP32(expected_scvtf, results_scvtf_x[fbits]);
@@ -11678,28 +11666,28 @@
   // results should not depened on the rounding mode, and ucvtf and scvtf should
   // produce the same result.
   TestUScvtf32Helper(0x0000000000000000, 0x00000000, 0x00000000);
-  TestUScvtf32Helper(0x0000000000000001, 0x3f800000, 0x3f800000);
-  TestUScvtf32Helper(0x0000000040000000, 0x4e800000, 0x4e800000);
-  TestUScvtf32Helper(0x0000000100000000, 0x4f800000, 0x4f800000);
-  TestUScvtf32Helper(0x4000000000000000, 0x5e800000, 0x5e800000);
+  TestUScvtf32Helper(0x0000000000000001, 0x3F800000, 0x3F800000);
+  TestUScvtf32Helper(0x0000000040000000, 0x4E800000, 0x4E800000);
+  TestUScvtf32Helper(0x0000000100000000, 0x4F800000, 0x4F800000);
+  TestUScvtf32Helper(0x4000000000000000, 0x5E800000, 0x5E800000);
   // Test mantissa extremities.
-  TestUScvtf32Helper(0x0000000000800001, 0x4b000001, 0x4b000001);
-  TestUScvtf32Helper(0x4000008000000000, 0x5e800001, 0x5e800001);
+  TestUScvtf32Helper(0x0000000000800001, 0x4B000001, 0x4B000001);
+  TestUScvtf32Helper(0x4000008000000000, 0x5E800001, 0x5E800001);
   // The largest int32_t that fits in a float.
-  TestUScvtf32Helper(0x000000007fffff80, 0x4effffff, 0x4effffff);
+  TestUScvtf32Helper(0x000000007FFFFF80, 0x4EFFFFFF, 0x4EFFFFFF);
   // Values that would be negative if treated as an int32_t.
-  TestUScvtf32Helper(0x00000000ffffff00, 0x4f7fffff, 0x4f7fffff);
-  TestUScvtf32Helper(0x0000000080000000, 0x4f000000, 0x4f000000);
-  TestUScvtf32Helper(0x0000000080000100, 0x4f000001, 0x4f000001);
+  TestUScvtf32Helper(0x00000000FFFFFF00, 0x4F7FFFFF, 0x4F7FFFFF);
+  TestUScvtf32Helper(0x0000000080000000, 0x4F000000, 0x4F000000);
+  TestUScvtf32Helper(0x0000000080000100, 0x4F000001, 0x4F000001);
   // The largest int64_t that fits in a float.
-  TestUScvtf32Helper(0x7fffff8000000000, 0x5effffff, 0x5effffff);
+  TestUScvtf32Helper(0x7FFFFF8000000000, 0x5EFFFFFF, 0x5EFFFFFF);
   // Check for bit pattern reproduction.
-  TestUScvtf32Helper(0x0000000000876543, 0x4b076543, 0x4b076543);
+  TestUScvtf32Helper(0x0000000000876543, 0x4B076543, 0x4B076543);
 
   // Simple conversions of negative int64_t values. These require no rounding,
   // and the results should not depend on the rounding mode.
-  TestUScvtf32Helper(0xfffffc0000000000, 0xd4800000, 0x5f7ffffc);
-  TestUScvtf32Helper(0xc000000000000000, 0xde800000, 0x5f400000);
+  TestUScvtf32Helper(0xFFFFFC0000000000, 0xD4800000, 0x5F7FFFFC);
+  TestUScvtf32Helper(0xC000000000000000, 0xDE800000, 0x5F400000);
 
   // Conversions which require rounding.
   TestUScvtf32Helper(0x0000800000000000, 0x57000000, 0x57000000);
@@ -11716,28 +11704,28 @@
   TestUScvtf32Helper(0x0000800002800001, 0x57000003, 0x57000003);
   TestUScvtf32Helper(0x0000800003000000, 0x57000003, 0x57000003);
   // Check rounding of negative int64_t values (and large uint64_t values).
-  TestUScvtf32Helper(0x8000000000000000, 0xdf000000, 0x5f000000);
-  TestUScvtf32Helper(0x8000000000000001, 0xdf000000, 0x5f000000);
-  TestUScvtf32Helper(0x8000004000000000, 0xdf000000, 0x5f000000);
-  TestUScvtf32Helper(0x8000004000000001, 0xdeffffff, 0x5f000000);
-  TestUScvtf32Helper(0x8000008000000000, 0xdeffffff, 0x5f000000);
-  TestUScvtf32Helper(0x8000008000000001, 0xdeffffff, 0x5f000001);
-  TestUScvtf32Helper(0x800000c000000000, 0xdefffffe, 0x5f000001);
-  TestUScvtf32Helper(0x800000c000000001, 0xdefffffe, 0x5f000001);
-  TestUScvtf32Helper(0x8000010000000000, 0xdefffffe, 0x5f000001);
-  TestUScvtf32Helper(0x8000010000000001, 0xdefffffe, 0x5f000001);
-  TestUScvtf32Helper(0x8000014000000000, 0xdefffffe, 0x5f000001);
-  TestUScvtf32Helper(0x8000014000000001, 0xdefffffd, 0x5f000001);
-  TestUScvtf32Helper(0x8000018000000000, 0xdefffffd, 0x5f000002);
+  TestUScvtf32Helper(0x8000000000000000, 0xDF000000, 0x5F000000);
+  TestUScvtf32Helper(0x8000000000000001, 0xDF000000, 0x5F000000);
+  TestUScvtf32Helper(0x8000004000000000, 0xDF000000, 0x5F000000);
+  TestUScvtf32Helper(0x8000004000000001, 0xDEFFFFFF, 0x5F000000);
+  TestUScvtf32Helper(0x8000008000000000, 0xDEFFFFFF, 0x5F000000);
+  TestUScvtf32Helper(0x8000008000000001, 0xDEFFFFFF, 0x5F000001);
+  TestUScvtf32Helper(0x800000C000000000, 0xDEFFFFFE, 0x5F000001);
+  TestUScvtf32Helper(0x800000C000000001, 0xDEFFFFFE, 0x5F000001);
+  TestUScvtf32Helper(0x8000010000000000, 0xDEFFFFFE, 0x5F000001);
+  TestUScvtf32Helper(0x8000010000000001, 0xDEFFFFFE, 0x5F000001);
+  TestUScvtf32Helper(0x8000014000000000, 0xDEFFFFFE, 0x5F000001);
+  TestUScvtf32Helper(0x8000014000000001, 0xDEFFFFFD, 0x5F000001);
+  TestUScvtf32Helper(0x8000018000000000, 0xDEFFFFFD, 0x5F000002);
   // Round up to produce a result that's too big for the input to represent.
-  TestUScvtf32Helper(0x000000007fffffc0, 0x4f000000, 0x4f000000);
-  TestUScvtf32Helper(0x000000007fffffff, 0x4f000000, 0x4f000000);
-  TestUScvtf32Helper(0x00000000ffffff80, 0x4f800000, 0x4f800000);
-  TestUScvtf32Helper(0x00000000ffffffff, 0x4f800000, 0x4f800000);
-  TestUScvtf32Helper(0x7fffffc000000000, 0x5f000000, 0x5f000000);
-  TestUScvtf32Helper(0x7fffffffffffffff, 0x5f000000, 0x5f000000);
-  TestUScvtf32Helper(0xffffff8000000000, 0xd3000000, 0x5f800000);
-  TestUScvtf32Helper(0xffffffffffffffff, 0xbf800000, 0x5f800000);
+  TestUScvtf32Helper(0x000000007FFFFFC0, 0x4F000000, 0x4F000000);
+  TestUScvtf32Helper(0x000000007FFFFFFF, 0x4F000000, 0x4F000000);
+  TestUScvtf32Helper(0x00000000FFFFFF80, 0x4F800000, 0x4F800000);
+  TestUScvtf32Helper(0x00000000FFFFFFFF, 0x4F800000, 0x4F800000);
+  TestUScvtf32Helper(0x7FFFFFC000000000, 0x5F000000, 0x5F000000);
+  TestUScvtf32Helper(0x7FFFFFFFFFFFFFFF, 0x5F000000, 0x5F000000);
+  TestUScvtf32Helper(0xFFFFFF8000000000, 0xD3000000, 0x5F800000);
+  TestUScvtf32Helper(0xFFFFFFFFFFFFFFFF, 0xBF800000, 0x5F800000);
 }
 
 
@@ -11784,18 +11772,18 @@
 TEST(system_msr) {
   INIT_V8();
   // All FPCR fields that must be implemented: AHP, DN, FZ, RMode
-  const uint64_t fpcr_core = 0x07c00000;
+  const uint64_t fpcr_core = 0x07C00000;
 
   // All FPCR fields (including fields which may be read-as-zero):
   //  Stride, Len
   //  IDE, IXE, UFE, OFE, DZE, IOE
-  const uint64_t fpcr_all = fpcr_core | 0x00379f00;
+  const uint64_t fpcr_all = fpcr_core | 0x00379F00;
 
   SETUP();
 
   START();
   __ Mov(w0, 0);
-  __ Mov(w1, 0x7fffffff);
+  __ Mov(w1, 0x7FFFFFFF);
 
   __ Mov(x7, 0);
 
@@ -11965,14 +11953,14 @@
   __ adds(xzr, x1, xzr);
   __ adds(xzr, xzr, x1);
 
-  __ ands(xzr, x2, ~0xf);
-  __ ands(xzr, xzr, ~0xf);
+  __ ands(xzr, x2, ~0xF);
+  __ ands(xzr, xzr, ~0xF);
   __ ands(xzr, x0, x2);
   __ ands(xzr, x2, xzr);
   __ ands(xzr, xzr, x2);
 
-  __ bics(xzr, x3, ~0xf);
-  __ bics(xzr, xzr, ~0xf);
+  __ bics(xzr, x3, ~0xF);
+  __ bics(xzr, xzr, ~0xF);
   __ bics(xzr, x0, x3);
   __ bics(xzr, x3, xzr);
   __ bics(xzr, xzr, x3);
@@ -12020,7 +12008,6 @@
   CHECK(xzr.bit() == (1UL << kZeroRegCode));
 
   // Internal ABI definitions.
-  CHECK(jssp.bit() == (1UL << kJSSPCode));
   CHECK(csp.bit() == (1UL << kSPRegInternalCode));
   CHECK(csp.bit() != xzr.bit());
 
@@ -12028,35 +12015,11 @@
   CHECK(x0.bit() == w0.bit());
   CHECK(x1.bit() == w1.bit());
   CHECK(x10.bit() == w10.bit());
-  CHECK(jssp.bit() == wjssp.bit());
   CHECK(xzr.bit() == wzr.bit());
   CHECK(csp.bit() == wcsp.bit());
 }
 
 
-TEST(stack_pointer_override) {
-  // This test generates some stack maintenance code, but the test only checks
-  // the reported state.
-  INIT_V8();
-  SETUP();
-  START();
-
-  // The default stack pointer in V8 is jssp, but for compatibility with W16,
-  // the test framework sets it to csp before calling the test.
-  CHECK(csp.Is(__ StackPointer()));
-  __ SetStackPointer(x0);
-  CHECK(x0.Is(__ StackPointer()));
-  __ SetStackPointer(jssp);
-  CHECK(jssp.Is(__ StackPointer()));
-  __ SetStackPointer(csp);
-  CHECK(csp.Is(__ StackPointer()));
-
-  END();
-  RUN();
-  TEARDOWN();
-}
-
-
 TEST(peek_poke_simple) {
   INIT_V8();
   SETUP();
@@ -12115,10 +12078,10 @@
   CHECK_EQUAL_64(literal_base * 3, x2);
   CHECK_EQUAL_64(literal_base * 4, x3);
 
-  CHECK_EQUAL_64((literal_base * 1) & 0xffffffff, x10);
-  CHECK_EQUAL_64((literal_base * 2) & 0xffffffff, x11);
-  CHECK_EQUAL_64((literal_base * 3) & 0xffffffff, x12);
-  CHECK_EQUAL_64((literal_base * 4) & 0xffffffff, x13);
+  CHECK_EQUAL_64((literal_base * 1) & 0xFFFFFFFF, x10);
+  CHECK_EQUAL_64((literal_base * 2) & 0xFFFFFFFF, x11);
+  CHECK_EQUAL_64((literal_base * 3) & 0xFFFFFFFF, x12);
+  CHECK_EQUAL_64((literal_base * 4) & 0xFFFFFFFF, x13);
 
   TEARDOWN();
 }
@@ -12196,9 +12159,9 @@
   CHECK_EQUAL_64(literal_base * 6, x5);
   CHECK_EQUAL_64(literal_base * 7, x6);
 
-  CHECK_EQUAL_64((literal_base * 1) & 0xffffffff, x10);
-  CHECK_EQUAL_64((literal_base * 2) & 0xffffffff, x11);
-  CHECK_EQUAL_64((literal_base * 3) & 0xffffffff, x12);
+  CHECK_EQUAL_64((literal_base * 1) & 0xFFFFFFFF, x10);
+  CHECK_EQUAL_64((literal_base * 2) & 0xFFFFFFFF, x11);
+  CHECK_EQUAL_64((literal_base * 3) & 0xFFFFFFFF, x12);
 
   TEARDOWN();
 }
@@ -12242,8 +12205,8 @@
   uint64_t x0_expected = literal_base * 1;
   uint64_t x1_expected = literal_base * 2;
   uint64_t x4_expected = (x0_expected << 32) | (x0_expected >> 32);
-  uint64_t x5_expected = ((x1_expected << 16) & 0xffff0000) |
-                         ((x1_expected >> 16) & 0x0000ffff);
+  uint64_t x5_expected =
+      ((x1_expected << 16) & 0xFFFF0000) | ((x1_expected >> 16) & 0x0000FFFF);
 
   CHECK_EQUAL_64(x0_expected, x0);
   CHECK_EQUAL_64(x1_expected, x1);
@@ -12282,23 +12245,16 @@
   __ Poke(x1, 8);
   __ Poke(x0, 0);
   {
-    CHECK(__ StackPointer().Is(csp));
-    __ Mov(x4, __ StackPointer());
-    __ SetStackPointer(x4);
-
-    __ Poke(wzr, 0);    // Clobber the space we're about to drop.
-    __ Drop(1, kWRegSize);
-    __ Peek(x6, 0);
-    __ Claim(1);
-    __ Peek(w7, 10);
-    __ Poke(x3, 28);
+    __ Peek(x6, 4);
+    __ Peek(w7, 6);
     __ Poke(xzr, 0);    // Clobber the space we're about to drop.
-    __ Drop(1);
-    __ Poke(x2, 12);
-    __ Push(w0);
-
-    __ Mov(csp, __ StackPointer());
-    __ SetStackPointer(csp);
+    __ Poke(xzr, 8);    // Clobber the space we're about to drop.
+    __ Drop(2);
+    __ Poke(x3, 8);
+    __ Poke(x2, 0);
+    __ Claim(2);
+    __ Poke(x0, 0);
+    __ Poke(x1, 8);
   }
 
   __ Pop(x0, x1, x2, x3);
@@ -12311,8 +12267,8 @@
   uint64_t x2_expected = literal_base * 3;
   uint64_t x3_expected = literal_base * 4;
   uint64_t x6_expected = (x1_expected << 32) | (x0_expected >> 32);
-  uint64_t x7_expected = ((x1_expected << 16) & 0xffff0000) |
-                         ((x0_expected >> 48) & 0x0000ffff);
+  uint64_t x7_expected =
+      ((x1_expected << 16) & 0xFFFF0000) | ((x0_expected >> 48) & 0x0000FFFF);
 
   CHECK_EQUAL_64(x0_expected, x0);
   CHECK_EQUAL_64(x1_expected, x1);
@@ -12335,40 +12291,34 @@
   PushPopRegList
 };
 
-
-// The maximum number of registers that can be used by the PushPopJssp* tests,
+// The maximum number of registers that can be used by the PushPop* tests,
 // where a reg_count field is provided.
-static int const kPushPopJsspMaxRegCount = -1;
+static int const kPushPopMaxRegCount = -1;
 
 // Test a simple push-pop pattern:
-//  * Claim <claim> bytes to set the stack alignment.
 //  * Push <reg_count> registers with size <reg_size>.
 //  * Clobber the register contents.
 //  * Pop <reg_count> registers to restore the original contents.
-//  * Drop <claim> bytes to restore the original stack pointer.
 //
 // Different push and pop methods can be specified independently to test for
 // proper word-endian behaviour.
-static void PushPopJsspSimpleHelper(int reg_count,
-                                    int claim,
-                                    int reg_size,
-                                    PushPopMethod push_method,
-                                    PushPopMethod pop_method) {
+static void PushPopSimpleHelper(int reg_count, int reg_size,
+                                PushPopMethod push_method,
+                                PushPopMethod pop_method) {
   SETUP();
 
   START();
 
   // Registers in the TmpList can be used by the macro assembler for debug code
-  // (for example in 'Pop'), so we can't use them here. We can't use jssp
-  // because it will be the stack pointer for this test.
-  static RegList const allowed = ~(masm.TmpList()->list() | jssp.bit());
-  if (reg_count == kPushPopJsspMaxRegCount) {
+  // (for example in 'Pop'), so we can't use them here.
+  static RegList const allowed = ~(masm.TmpList()->list());
+  if (reg_count == kPushPopMaxRegCount) {
     reg_count = CountSetBits(allowed, kNumberOfRegisters);
   }
   // Work out which registers to use, based on reg_size.
   auto r = CreateRegisterArray<Register, kNumberOfRegisters>();
   auto x = CreateRegisterArray<Register, kNumberOfRegisters>();
-  RegList list = PopulateRegisterArray(NULL, x.data(), r.data(), reg_size,
+  RegList list = PopulateRegisterArray(nullptr, x.data(), r.data(), reg_size,
                                        reg_count, allowed);
 
   // The literal base is chosen to have two useful properties:
@@ -12379,10 +12329,6 @@
   uint64_t literal_base = 0x0100001000100101UL;
 
   {
-    CHECK(__ StackPointer().Is(csp));
-    __ Mov(jssp, __ StackPointer());
-    __ SetStackPointer(jssp);
-
     int i;
 
     // Initialize the registers.
@@ -12394,9 +12340,6 @@
       }
     }
 
-    // Claim memory first, as requested.
-    __ Claim(claim, kByteSizeInBytes);
-
     switch (push_method) {
       case PushPopByFour:
         // Push high-numbered registers first (to the highest addresses).
@@ -12409,7 +12352,7 @@
           case 2:  __ Push(r[1], r[0]);       break;
           case 1:  __ Push(r[0]);             break;
           default:
-            CHECK(i == 0);
+            CHECK_EQ(i, 0);
             break;
         }
         break;
@@ -12441,12 +12384,6 @@
         __ PopSizeRegList(list, reg_size);
         break;
     }
-
-    // Drop memory to restore jssp.
-    __ Drop(claim, kByteSizeInBytes);
-
-    __ Mov(csp, __ StackPointer());
-    __ SetStackPointer(csp);
   }
 
   END();
@@ -12456,7 +12393,7 @@
   // Check that the register contents were preserved.
   // Always use CHECK_EQUAL_64, even when testing W registers, so we can test
   // that the upper word was properly cleared by Pop.
-  literal_base &= (0xffffffffffffffffUL >> (64-reg_size));
+  literal_base &= (0xFFFFFFFFFFFFFFFFUL >> (64 - reg_size));
   for (int i = 0; i < reg_count; i++) {
     if (x[i].IsZero()) {
       CHECK_EQUAL_64(0, x[i]);
@@ -12468,77 +12405,53 @@
   TEARDOWN();
 }
 
-
-TEST(push_pop_jssp_simple_32) {
+TEST(push_pop_simple_32) {
   INIT_V8();
-  for (int claim = 0; claim <= 8; claim++) {
-    for (int count = 0; count <= 8; count++) {
-      PushPopJsspSimpleHelper(count, claim, kWRegSizeInBits,
-                              PushPopByFour, PushPopByFour);
-      PushPopJsspSimpleHelper(count, claim, kWRegSizeInBits,
-                              PushPopByFour, PushPopRegList);
-      PushPopJsspSimpleHelper(count, claim, kWRegSizeInBits,
-                              PushPopRegList, PushPopByFour);
-      PushPopJsspSimpleHelper(count, claim, kWRegSizeInBits,
-                              PushPopRegList, PushPopRegList);
-    }
-    // Test with the maximum number of registers.
-    PushPopJsspSimpleHelper(kPushPopJsspMaxRegCount, claim, kWRegSizeInBits,
-                            PushPopByFour, PushPopByFour);
-    PushPopJsspSimpleHelper(kPushPopJsspMaxRegCount, claim, kWRegSizeInBits,
-                            PushPopByFour, PushPopRegList);
-    PushPopJsspSimpleHelper(kPushPopJsspMaxRegCount, claim, kWRegSizeInBits,
-                            PushPopRegList, PushPopByFour);
-    PushPopJsspSimpleHelper(kPushPopJsspMaxRegCount, claim, kWRegSizeInBits,
-                            PushPopRegList, PushPopRegList);
+
+  for (int count = 0; count < kPushPopMaxRegCount; count += 4) {
+    PushPopSimpleHelper(count, kWRegSizeInBits, PushPopByFour, PushPopByFour);
+    PushPopSimpleHelper(count, kWRegSizeInBits, PushPopByFour, PushPopRegList);
+    PushPopSimpleHelper(count, kWRegSizeInBits, PushPopRegList, PushPopByFour);
+    PushPopSimpleHelper(count, kWRegSizeInBits, PushPopRegList, PushPopRegList);
   }
+  // Skip testing kPushPopMaxRegCount, as we exclude the temporary registers
+  // and we end up with a number of registers that is not a multiple of four and
+  // is not supported for pushing.
 }
 
-
-TEST(push_pop_jssp_simple_64) {
+TEST(push_pop_simple_64) {
   INIT_V8();
-  for (int claim = 0; claim <= 8; claim++) {
-    for (int count = 0; count <= 8; count++) {
-      PushPopJsspSimpleHelper(count, claim, kXRegSizeInBits,
-                              PushPopByFour, PushPopByFour);
-      PushPopJsspSimpleHelper(count, claim, kXRegSizeInBits,
-                              PushPopByFour, PushPopRegList);
-      PushPopJsspSimpleHelper(count, claim, kXRegSizeInBits,
-                              PushPopRegList, PushPopByFour);
-      PushPopJsspSimpleHelper(count, claim, kXRegSizeInBits,
-                              PushPopRegList, PushPopRegList);
-    }
-    // Test with the maximum number of registers.
-    PushPopJsspSimpleHelper(kPushPopJsspMaxRegCount, claim, kXRegSizeInBits,
-                            PushPopByFour, PushPopByFour);
-    PushPopJsspSimpleHelper(kPushPopJsspMaxRegCount, claim, kXRegSizeInBits,
-                            PushPopByFour, PushPopRegList);
-    PushPopJsspSimpleHelper(kPushPopJsspMaxRegCount, claim, kXRegSizeInBits,
-                            PushPopRegList, PushPopByFour);
-    PushPopJsspSimpleHelper(kPushPopJsspMaxRegCount, claim, kXRegSizeInBits,
-                            PushPopRegList, PushPopRegList);
+  for (int count = 0; count <= 8; count += 2) {
+    PushPopSimpleHelper(count, kXRegSizeInBits, PushPopByFour, PushPopByFour);
+    PushPopSimpleHelper(count, kXRegSizeInBits, PushPopByFour, PushPopRegList);
+    PushPopSimpleHelper(count, kXRegSizeInBits, PushPopRegList, PushPopByFour);
+    PushPopSimpleHelper(count, kXRegSizeInBits, PushPopRegList, PushPopRegList);
   }
+  // Test with the maximum number of registers.
+  PushPopSimpleHelper(kPushPopMaxRegCount, kXRegSizeInBits, PushPopByFour,
+                      PushPopByFour);
+  PushPopSimpleHelper(kPushPopMaxRegCount, kXRegSizeInBits, PushPopByFour,
+                      PushPopRegList);
+  PushPopSimpleHelper(kPushPopMaxRegCount, kXRegSizeInBits, PushPopRegList,
+                      PushPopByFour);
+  PushPopSimpleHelper(kPushPopMaxRegCount, kXRegSizeInBits, PushPopRegList,
+                      PushPopRegList);
 }
 
-
-// The maximum number of registers that can be used by the PushPopFPJssp* tests,
+// The maximum number of registers that can be used by the PushPopFP* tests,
 // where a reg_count field is provided.
-static int const kPushPopFPJsspMaxRegCount = -1;
+static int const kPushPopFPMaxRegCount = -1;
 
 // Test a simple push-pop pattern:
-//  * Claim <claim> bytes to set the stack alignment.
 //  * Push <reg_count> FP registers with size <reg_size>.
 //  * Clobber the register contents.
 //  * Pop <reg_count> FP registers to restore the original contents.
-//  * Drop <claim> bytes to restore the original stack pointer.
 //
 // Different push and pop methods can be specified independently to test for
 // proper word-endian behaviour.
-static void PushPopFPJsspSimpleHelper(int reg_count,
-                                      int claim,
-                                      int reg_size,
-                                      PushPopMethod push_method,
-                                      PushPopMethod pop_method) {
+static void PushPopFPSimpleHelper(int reg_count, int reg_size,
+                                  PushPopMethod push_method,
+                                  PushPopMethod pop_method) {
   SETUP();
 
   START();
@@ -12546,13 +12459,13 @@
   // We can use any floating-point register. None of them are reserved for
   // debug code, for example.
   static RegList const allowed = ~0;
-  if (reg_count == kPushPopFPJsspMaxRegCount) {
+  if (reg_count == kPushPopFPMaxRegCount) {
     reg_count = CountSetBits(allowed, kNumberOfVRegisters);
   }
   // Work out which registers to use, based on reg_size.
   auto v = CreateRegisterArray<VRegister, kNumberOfRegisters>();
   auto d = CreateRegisterArray<VRegister, kNumberOfRegisters>();
-  RegList list = PopulateVRegisterArray(NULL, d.data(), v.data(), reg_size,
+  RegList list = PopulateVRegisterArray(nullptr, d.data(), v.data(), reg_size,
                                         reg_count, allowed);
 
   // The literal base is chosen to have two useful properties:
@@ -12566,9 +12479,6 @@
 
   {
     CHECK(__ StackPointer().Is(csp));
-    __ Mov(jssp, __ StackPointer());
-    __ SetStackPointer(jssp);
-
     int i;
 
     // Initialize the registers, using X registers to load the literal.
@@ -12582,9 +12492,6 @@
       __ Add(x0, x0, x1);
     }
 
-    // Claim memory first, as requested.
-    __ Claim(claim, kByteSizeInBytes);
-
     switch (push_method) {
       case PushPopByFour:
         // Push high-numbered registers first (to the highest addresses).
@@ -12597,7 +12504,7 @@
           case 2:  __ Push(v[1], v[0]);       break;
           case 1:  __ Push(v[0]);             break;
           default:
-            CHECK(i == 0);
+            CHECK_EQ(i, 0);
             break;
         }
         break;
@@ -12629,12 +12536,6 @@
         __ PopSizeRegList(list, reg_size, CPURegister::kVRegister);
         break;
     }
-
-    // Drop memory to restore jssp.
-    __ Drop(claim, kByteSizeInBytes);
-
-    __ Mov(csp, __ StackPointer());
-    __ SetStackPointer(csp);
   }
 
   END();
@@ -12644,7 +12545,7 @@
   // Check that the register contents were preserved.
   // Always use CHECK_EQUAL_FP64, even when testing S registers, so we can
   // test that the upper word was properly cleared by Pop.
-  literal_base &= (0xffffffffffffffffUL >> (64-reg_size));
+  literal_base &= (0xFFFFFFFFFFFFFFFFUL >> (64 - reg_size));
   for (int i = 0; i < reg_count; i++) {
     uint64_t literal = literal_base * i;
     double expected;
@@ -12655,73 +12556,63 @@
   TEARDOWN();
 }
 
-
-TEST(push_pop_fp_jssp_simple_32) {
+TEST(push_pop_fp_simple_32) {
   INIT_V8();
-  for (int claim = 0; claim <= 8; claim++) {
-    for (int count = 0; count <= 8; count++) {
-      PushPopFPJsspSimpleHelper(count, claim, kSRegSizeInBits,
-                                PushPopByFour, PushPopByFour);
-      PushPopFPJsspSimpleHelper(count, claim, kSRegSizeInBits,
-                                PushPopByFour, PushPopRegList);
-      PushPopFPJsspSimpleHelper(count, claim, kSRegSizeInBits,
-                                PushPopRegList, PushPopByFour);
-      PushPopFPJsspSimpleHelper(count, claim, kSRegSizeInBits,
-                                PushPopRegList, PushPopRegList);
-    }
-    // Test with the maximum number of registers.
-    PushPopFPJsspSimpleHelper(kPushPopFPJsspMaxRegCount, claim, kSRegSizeInBits,
-                              PushPopByFour, PushPopByFour);
-    PushPopFPJsspSimpleHelper(kPushPopFPJsspMaxRegCount, claim, kSRegSizeInBits,
-                              PushPopByFour, PushPopRegList);
-    PushPopFPJsspSimpleHelper(kPushPopFPJsspMaxRegCount, claim, kSRegSizeInBits,
-                              PushPopRegList, PushPopByFour);
-    PushPopFPJsspSimpleHelper(kPushPopFPJsspMaxRegCount, claim, kSRegSizeInBits,
-                              PushPopRegList, PushPopRegList);
+  for (int count = 0; count <= 8; count += 4) {
+    PushPopFPSimpleHelper(count, kSRegSizeInBits, PushPopByFour, PushPopByFour);
+    PushPopFPSimpleHelper(count, kSRegSizeInBits, PushPopByFour,
+                          PushPopRegList);
+    PushPopFPSimpleHelper(count, kSRegSizeInBits, PushPopRegList,
+                          PushPopByFour);
+    PushPopFPSimpleHelper(count, kSRegSizeInBits, PushPopRegList,
+                          PushPopRegList);
   }
+  // Test with the maximum number of registers.
+  PushPopFPSimpleHelper(kPushPopFPMaxRegCount, kSRegSizeInBits, PushPopByFour,
+                        PushPopByFour);
+  PushPopFPSimpleHelper(kPushPopFPMaxRegCount, kSRegSizeInBits, PushPopByFour,
+                        PushPopRegList);
+  PushPopFPSimpleHelper(kPushPopFPMaxRegCount, kSRegSizeInBits, PushPopRegList,
+                        PushPopByFour);
+  PushPopFPSimpleHelper(kPushPopFPMaxRegCount, kSRegSizeInBits, PushPopRegList,
+                        PushPopRegList);
 }
 
-
-TEST(push_pop_fp_jssp_simple_64) {
+TEST(push_pop_fp_simple_64) {
   INIT_V8();
-  for (int claim = 0; claim <= 8; claim++) {
-    for (int count = 0; count <= 8; count++) {
-      PushPopFPJsspSimpleHelper(count, claim, kDRegSizeInBits,
-                                PushPopByFour, PushPopByFour);
-      PushPopFPJsspSimpleHelper(count, claim, kDRegSizeInBits,
-                                PushPopByFour, PushPopRegList);
-      PushPopFPJsspSimpleHelper(count, claim, kDRegSizeInBits,
-                                PushPopRegList, PushPopByFour);
-      PushPopFPJsspSimpleHelper(count, claim, kDRegSizeInBits,
-                                PushPopRegList, PushPopRegList);
-    }
-    // Test with the maximum number of registers.
-    PushPopFPJsspSimpleHelper(kPushPopFPJsspMaxRegCount, claim, kDRegSizeInBits,
-                              PushPopByFour, PushPopByFour);
-    PushPopFPJsspSimpleHelper(kPushPopFPJsspMaxRegCount, claim, kDRegSizeInBits,
-                              PushPopByFour, PushPopRegList);
-    PushPopFPJsspSimpleHelper(kPushPopFPJsspMaxRegCount, claim, kDRegSizeInBits,
-                              PushPopRegList, PushPopByFour);
-    PushPopFPJsspSimpleHelper(kPushPopFPJsspMaxRegCount, claim, kDRegSizeInBits,
-                              PushPopRegList, PushPopRegList);
+  for (int count = 0; count <= 8; count += 2) {
+    PushPopFPSimpleHelper(count, kDRegSizeInBits, PushPopByFour, PushPopByFour);
+    PushPopFPSimpleHelper(count, kDRegSizeInBits, PushPopByFour,
+                          PushPopRegList);
+    PushPopFPSimpleHelper(count, kDRegSizeInBits, PushPopRegList,
+                          PushPopByFour);
+    PushPopFPSimpleHelper(count, kDRegSizeInBits, PushPopRegList,
+                          PushPopRegList);
   }
+  // Test with the maximum number of registers.
+  PushPopFPSimpleHelper(kPushPopFPMaxRegCount, kDRegSizeInBits, PushPopByFour,
+                        PushPopByFour);
+  PushPopFPSimpleHelper(kPushPopFPMaxRegCount, kDRegSizeInBits, PushPopByFour,
+                        PushPopRegList);
+  PushPopFPSimpleHelper(kPushPopFPMaxRegCount, kDRegSizeInBits, PushPopRegList,
+                        PushPopByFour);
+  PushPopFPSimpleHelper(kPushPopFPMaxRegCount, kDRegSizeInBits, PushPopRegList,
+                        PushPopRegList);
 }
 
 
 // Push and pop data using an overlapping combination of Push/Pop and
 // RegList-based methods.
-static void PushPopJsspMixedMethodsHelper(int claim, int reg_size) {
+static void PushPopMixedMethodsHelper(int reg_size) {
   SETUP();
 
-  // Registers x8 and x9 are used by the macro assembler for debug code (for
-  // example in 'Pop'), so we can't use them here. We can't use jssp because it
-  // will be the stack pointer for this test.
-  static RegList const allowed =
-      ~(x8.bit() | x9.bit() | jssp.bit() | xzr.bit());
+  // Registers in the TmpList can be used by the macro assembler for debug code
+  // (for example in 'Pop'), so we can't use them here.
+  static RegList const allowed = ~(masm.TmpList()->list());
   // Work out which registers to use, based on reg_size.
   auto r = CreateRegisterArray<Register, 10>();
   auto x = CreateRegisterArray<Register, 10>();
-  PopulateRegisterArray(NULL, x.data(), r.data(), reg_size, 10, allowed);
+  PopulateRegisterArray(nullptr, x.data(), r.data(), reg_size, 10, allowed);
 
   // Calculate some handy register lists.
   RegList r0_to_r3 = 0;
@@ -12747,11 +12638,6 @@
   START();
   {
     CHECK(__ StackPointer().Is(csp));
-    __ Mov(jssp, __ StackPointer());
-    __ SetStackPointer(jssp);
-
-    // Claim memory first, as requested.
-    __ Claim(claim, kByteSizeInBytes);
 
     __ Mov(x[3], literal_base * 3);
     __ Mov(x[2], literal_base * 2);
@@ -12770,12 +12656,6 @@
     __ Pop(r[4], r[5]);
     Clobber(&masm, r6_to_r9);
     __ Pop(r[6], r[7], r[8], r[9]);
-
-    // Drop memory to restore jssp.
-    __ Drop(claim, kByteSizeInBytes);
-
-    __ Mov(csp, __ StackPointer());
-    __ SetStackPointer(csp);
   }
 
   END();
@@ -12784,7 +12664,7 @@
 
   // Always use CHECK_EQUAL_64, even when testing W registers, so we can test
   // that the upper word was properly cleared by Pop.
-  literal_base &= (0xffffffffffffffffUL >> (64-reg_size));
+  literal_base &= (0xFFFFFFFFFFFFFFFFUL >> (64 - reg_size));
 
   CHECK_EQUAL_64(literal_base * 3, x[9]);
   CHECK_EQUAL_64(literal_base * 2, x[8]);
@@ -12796,232 +12676,9 @@
   TEARDOWN();
 }
 
-
-TEST(push_pop_jssp_mixed_methods_64) {
+TEST(push_pop_mixed_methods_64) {
   INIT_V8();
-  for (int claim = 0; claim <= 8; claim++) {
-    PushPopJsspMixedMethodsHelper(claim, kXRegSizeInBits);
-  }
-}
-
-
-TEST(push_pop_jssp_mixed_methods_32) {
-  INIT_V8();
-  for (int claim = 0; claim <= 8; claim++) {
-    PushPopJsspMixedMethodsHelper(claim, kWRegSizeInBits);
-  }
-}
-
-
-// Push and pop data using overlapping X- and W-sized quantities.
-static void PushPopJsspWXOverlapHelper(int reg_count, int claim) {
-  // This test emits rather a lot of code.
-  SETUP_SIZE(BUF_SIZE * 2);
-
-  // Work out which registers to use, based on reg_size.
-  Register tmp = x8;
-  static RegList const allowed = ~(tmp.bit() | jssp.bit());
-  if (reg_count == kPushPopJsspMaxRegCount) {
-    reg_count = CountSetBits(allowed, kNumberOfRegisters);
-  }
-  auto w = CreateRegisterArray<Register, kNumberOfRegisters>();
-  auto x = CreateRegisterArray<Register, kNumberOfRegisters>();
-  RegList list =
-      PopulateRegisterArray(w.data(), x.data(), NULL, 0, reg_count, allowed);
-
-  // The number of W-sized slots we expect to pop. When we pop, we alternate
-  // between W and X registers, so we need reg_count*1.5 W-sized slots.
-  int const requested_w_slots = reg_count + reg_count / 2;
-
-  // Track what _should_ be on the stack, using W-sized slots.
-  static int const kMaxWSlots = kNumberOfRegisters + kNumberOfRegisters / 2;
-  uint32_t stack[kMaxWSlots];
-  for (int i = 0; i < kMaxWSlots; i++) {
-    stack[i] = 0xdeadbeef;
-  }
-
-  // The literal base is chosen to have two useful properties:
-  //  * When multiplied by small values (such as a register index), this value
-  //    is clearly readable in the result.
-  //  * The value is not formed from repeating fixed-size smaller values, so it
-  //    can be used to detect endianness-related errors.
-  static uint64_t const literal_base = 0x0100001000100101UL;
-  static uint64_t const literal_base_hi = literal_base >> 32;
-  static uint64_t const literal_base_lo = literal_base & 0xffffffff;
-  static uint64_t const literal_base_w = literal_base & 0xffffffff;
-
-  START();
-  {
-    CHECK(__ StackPointer().Is(csp));
-    __ Mov(jssp, __ StackPointer());
-    __ SetStackPointer(jssp);
-
-    // Initialize the registers.
-    for (int i = 0; i < reg_count; i++) {
-      // Always write into the X register, to ensure that the upper word is
-      // properly ignored by Push when testing W registers.
-      if (!x[i].IsZero()) {
-        __ Mov(x[i], literal_base * i);
-      }
-    }
-
-    // Claim memory first, as requested.
-    __ Claim(claim, kByteSizeInBytes);
-
-    // The push-pop pattern is as follows:
-    // Push:           Pop:
-    //  x[0](hi)   ->   w[0]
-    //  x[0](lo)   ->   x[1](hi)
-    //  w[1]       ->   x[1](lo)
-    //  w[1]       ->   w[2]
-    //  x[2](hi)   ->   x[2](hi)
-    //  x[2](lo)   ->   x[2](lo)
-    //  x[2](hi)   ->   w[3]
-    //  x[2](lo)   ->   x[4](hi)
-    //  x[2](hi)   ->   x[4](lo)
-    //  x[2](lo)   ->   w[5]
-    //  w[3]       ->   x[5](hi)
-    //  w[3]       ->   x[6](lo)
-    //  w[3]       ->   w[7]
-    //  w[3]       ->   x[8](hi)
-    //  x[4](hi)   ->   x[8](lo)
-    //  x[4](lo)   ->   w[9]
-    // ... pattern continues ...
-    //
-    // That is, registers are pushed starting with the lower numbers,
-    // alternating between x and w registers, and pushing i%4+1 copies of each,
-    // where i is the register number.
-    // Registers are popped starting with the higher numbers one-by-one,
-    // alternating between x and w registers, but only popping one at a time.
-    //
-    // This pattern provides a wide variety of alignment effects and overlaps.
-
-    // ---- Push ----
-
-    int active_w_slots = 0;
-    for (int i = 0; active_w_slots < requested_w_slots; i++) {
-      CHECK(i < reg_count);
-      // In order to test various arguments to PushMultipleTimes, and to try to
-      // exercise different alignment and overlap effects, we push each
-      // register a different number of times.
-      int times = i % 4 + 1;
-      if (i & 1) {
-        // Push odd-numbered registers as W registers.
-        __ Mov(tmp.W(), times);
-        __ PushMultipleTimes(w[i], tmp.W());
-
-        // Fill in the expected stack slots.
-        for (int j = 0; j < times; j++) {
-          if (w[i].Is(wzr)) {
-            // The zero register always writes zeroes.
-            stack[active_w_slots++] = 0;
-          } else {
-            stack[active_w_slots++] = literal_base_w * i;
-          }
-        }
-      } else {
-        // Push even-numbered registers as X registers.
-        __ Mov(tmp, times);
-        __ PushMultipleTimes(x[i], tmp);
-
-        // Fill in the expected stack slots.
-        for (int j = 0; j < times; j++) {
-          if (x[i].IsZero()) {
-            // The zero register always writes zeroes.
-            stack[active_w_slots++] = 0;
-            stack[active_w_slots++] = 0;
-          } else {
-            stack[active_w_slots++] = literal_base_hi * i;
-            stack[active_w_slots++] = literal_base_lo * i;
-          }
-        }
-      }
-    }
-    // Because we were pushing several registers at a time, we probably pushed
-    // more than we needed to.
-    if (active_w_slots > requested_w_slots) {
-      __ Drop(active_w_slots - requested_w_slots, kWRegSize);
-      // Bump the number of active W-sized slots back to where it should be,
-      // and fill the empty space with a dummy value.
-      do {
-        stack[active_w_slots--] = 0xdeadbeef;
-      } while (active_w_slots > requested_w_slots);
-    }
-
-    // ---- Pop ----
-
-    Clobber(&masm, list);
-
-    // If popping an even number of registers, the first one will be X-sized.
-    // Otherwise, the first one will be W-sized.
-    bool next_is_64 = !(reg_count & 1);
-    for (int i = reg_count-1; i >= 0; i--) {
-      if (next_is_64) {
-        __ Pop(x[i]);
-        active_w_slots -= 2;
-      } else {
-        __ Pop(w[i]);
-        active_w_slots -= 1;
-      }
-      next_is_64 = !next_is_64;
-    }
-    CHECK(active_w_slots == 0);
-
-    // Drop memory to restore jssp.
-    __ Drop(claim, kByteSizeInBytes);
-
-    __ Mov(csp, __ StackPointer());
-    __ SetStackPointer(csp);
-  }
-
-  END();
-
-  RUN();
-
-  int slot = 0;
-  for (int i = 0; i < reg_count; i++) {
-    // Even-numbered registers were written as W registers.
-    // Odd-numbered registers were written as X registers.
-    bool expect_64 = (i & 1);
-    uint64_t expected;
-
-    if (expect_64) {
-      uint64_t hi = stack[slot++];
-      uint64_t lo = stack[slot++];
-      expected = (hi << 32) | lo;
-    } else {
-      expected = stack[slot++];
-    }
-
-    // Always use CHECK_EQUAL_64, even when testing W registers, so we can
-    // test that the upper word was properly cleared by Pop.
-    if (x[i].IsZero()) {
-      CHECK_EQUAL_64(0, x[i]);
-    } else {
-      CHECK_EQUAL_64(expected, x[i]);
-    }
-  }
-  CHECK(slot == requested_w_slots);
-
-  TEARDOWN();
-}
-
-
-TEST(push_pop_jssp_wx_overlap) {
-  INIT_V8();
-  for (int claim = 0; claim <= 8; claim++) {
-    for (int count = 1; count <= 8; count++) {
-      PushPopJsspWXOverlapHelper(count, claim);
-      PushPopJsspWXOverlapHelper(count, claim);
-      PushPopJsspWXOverlapHelper(count, claim);
-      PushPopJsspWXOverlapHelper(count, claim);
-    }
-    // Test with the maximum number of registers.
-    PushPopJsspWXOverlapHelper(kPushPopJsspMaxRegCount, claim);
-    PushPopJsspWXOverlapHelper(kPushPopJsspMaxRegCount, claim);
-    PushPopJsspWXOverlapHelper(kPushPopJsspMaxRegCount, claim);
-    PushPopJsspWXOverlapHelper(kPushPopJsspMaxRegCount, claim);
-  }
+  PushPopMixedMethodsHelper(kXRegSizeInBits);
 }
 
 
@@ -13068,8 +12725,8 @@
   __ Claim(2);
   __ PushXRegList(0);
   __ PopXRegList(0);
-  __ PushXRegList(0xffffffff);
-  __ PopXRegList(0xffffffff);
+  __ PushXRegList(0xFFFFFFFF);
+  __ PopXRegList(0xFFFFFFFF);
   __ Drop(12);
 
   END();
@@ -13120,10 +12777,6 @@
 
   START();
 
-  CHECK(__ StackPointer().Is(csp));
-  __ Mov(jssp, __ StackPointer());
-  __ SetStackPointer(jssp);
-
   MacroAssembler::PushPopQueue queue(&masm);
 
   // Queue up registers.
@@ -13135,11 +12788,15 @@
   queue.Queue(w4);
   queue.Queue(w5);
   queue.Queue(w6);
+  queue.Queue(w7);
 
   queue.Queue(d0);
   queue.Queue(d1);
 
   queue.Queue(s2);
+  queue.Queue(s3);
+  queue.Queue(s4);
+  queue.Queue(s5);
 
   __ Mov(x0, 0x1234000000000000);
   __ Mov(x1, 0x1234000100010001);
@@ -13148,100 +12805,26 @@
   __ Mov(w4, 0x12340004);
   __ Mov(w5, 0x12340005);
   __ Mov(w6, 0x12340006);
+  __ Mov(w7, 0x12340007);
   __ Fmov(d0, 123400.0);
   __ Fmov(d1, 123401.0);
   __ Fmov(s2, 123402.0);
+  __ Fmov(s3, 123403.0);
+  __ Fmov(s4, 123404.0);
+  __ Fmov(s5, 123405.0);
 
   // Actually push them.
   queue.PushQueued();
 
-  Clobber(&masm, CPURegList(CPURegister::kRegister, kXRegSizeInBits, 0, 6));
-  Clobber(&masm, CPURegList(CPURegister::kVRegister, kDRegSizeInBits, 0, 2));
+  Clobber(&masm, CPURegList(CPURegister::kRegister, kXRegSizeInBits, 0, 8));
+  Clobber(&masm, CPURegList(CPURegister::kVRegister, kDRegSizeInBits, 0, 6));
 
   // Pop them conventionally.
-  __ Pop(s2);
+  __ Pop(s5, s4, s3, s2);
   __ Pop(d1, d0);
-  __ Pop(w6, w5, w4);
+  __ Pop(w7, w6, w5, w4);
   __ Pop(x3, x2, x1, x0);
 
-  __ Mov(csp, __ StackPointer());
-  __ SetStackPointer(csp);
-
-  END();
-
-  RUN();
-
-  CHECK_EQUAL_64(0x1234000000000000, x0);
-  CHECK_EQUAL_64(0x1234000100010001, x1);
-  CHECK_EQUAL_64(0x1234000200020002, x2);
-  CHECK_EQUAL_64(0x1234000300030003, x3);
-
-  CHECK_EQUAL_32(0x12340004, w4);
-  CHECK_EQUAL_32(0x12340005, w5);
-  CHECK_EQUAL_32(0x12340006, w6);
-
-  CHECK_EQUAL_FP64(123400.0, d0);
-  CHECK_EQUAL_FP64(123401.0, d1);
-
-  CHECK_EQUAL_FP32(123402.0, s2);
-
-  TEARDOWN();
-}
-
-
-TEST(pop_queued) {
-  INIT_V8();
-  SETUP();
-
-  START();
-
-  CHECK(__ StackPointer().Is(csp));
-  __ Mov(jssp, __ StackPointer());
-  __ SetStackPointer(jssp);
-
-  MacroAssembler::PushPopQueue queue(&masm);
-
-  __ Mov(x0, 0x1234000000000000);
-  __ Mov(x1, 0x1234000100010001);
-  __ Mov(x2, 0x1234000200020002);
-  __ Mov(x3, 0x1234000300030003);
-  __ Mov(w4, 0x12340004);
-  __ Mov(w5, 0x12340005);
-  __ Mov(w6, 0x12340006);
-  __ Fmov(d0, 123400.0);
-  __ Fmov(d1, 123401.0);
-  __ Fmov(s2, 123402.0);
-
-  // Push registers conventionally.
-  __ Push(x0, x1, x2, x3);
-  __ Push(w4, w5, w6);
-  __ Push(d0, d1);
-  __ Push(s2);
-
-  // Queue up a pop.
-  queue.Queue(s2);
-
-  queue.Queue(d1);
-  queue.Queue(d0);
-
-  queue.Queue(w6);
-  queue.Queue(w5);
-  queue.Queue(w4);
-
-  queue.Queue(x3);
-  queue.Queue(x2);
-  queue.Queue(x1);
-  queue.Queue(x0);
-
-  Clobber(&masm, CPURegList(CPURegister::kRegister, kXRegSizeInBits, 0, 6));
-  Clobber(&masm, CPURegList(CPURegister::kVRegister, kDRegSizeInBits, 0, 2));
-
-  // Actually pop them.
-  queue.PopQueued();
-
-  __ Mov(csp, __ StackPointer());
-  __ SetStackPointer(csp);
-
   END();
 
   RUN();
@@ -13254,16 +12837,407 @@
   CHECK_EQUAL_64(0x0000000012340004, x4);
   CHECK_EQUAL_64(0x0000000012340005, x5);
   CHECK_EQUAL_64(0x0000000012340006, x6);
+  CHECK_EQUAL_64(0x0000000012340007, x7);
 
   CHECK_EQUAL_FP64(123400.0, d0);
   CHECK_EQUAL_FP64(123401.0, d1);
 
   CHECK_EQUAL_FP32(123402.0, s2);
+  CHECK_EQUAL_FP32(123403.0, s3);
+  CHECK_EQUAL_FP32(123404.0, s4);
+  CHECK_EQUAL_FP32(123405.0, s5);
 
   TEARDOWN();
 }
 
 
+TEST(pop_queued) {
+  INIT_V8();
+  SETUP();
+
+  START();
+
+  MacroAssembler::PushPopQueue queue(&masm);
+
+  __ Mov(x0, 0x1234000000000000);
+  __ Mov(x1, 0x1234000100010001);
+  __ Mov(x2, 0x1234000200020002);
+  __ Mov(x3, 0x1234000300030003);
+  __ Mov(w4, 0x12340004);
+  __ Mov(w5, 0x12340005);
+  __ Mov(w6, 0x12340006);
+  __ Mov(w7, 0x12340007);
+  __ Fmov(d0, 123400.0);
+  __ Fmov(d1, 123401.0);
+  __ Fmov(s2, 123402.0);
+  __ Fmov(s3, 123403.0);
+  __ Fmov(s4, 123404.0);
+  __ Fmov(s5, 123405.0);
+
+  // Push registers conventionally.
+  __ Push(x0, x1, x2, x3);
+  __ Push(w4, w5, w6, w7);
+  __ Push(d0, d1);
+  __ Push(s2, s3, s4, s5);
+
+  // Queue up a pop.
+  queue.Queue(s5);
+  queue.Queue(s4);
+  queue.Queue(s3);
+  queue.Queue(s2);
+
+  queue.Queue(d1);
+  queue.Queue(d0);
+
+  queue.Queue(w7);
+  queue.Queue(w6);
+  queue.Queue(w5);
+  queue.Queue(w4);
+
+  queue.Queue(x3);
+  queue.Queue(x2);
+  queue.Queue(x1);
+  queue.Queue(x0);
+
+  Clobber(&masm, CPURegList(CPURegister::kRegister, kXRegSizeInBits, 0, 8));
+  Clobber(&masm, CPURegList(CPURegister::kVRegister, kDRegSizeInBits, 0, 6));
+
+  // Actually pop them.
+  queue.PopQueued();
+
+  END();
+
+  RUN();
+
+  CHECK_EQUAL_64(0x1234000000000000, x0);
+  CHECK_EQUAL_64(0x1234000100010001, x1);
+  CHECK_EQUAL_64(0x1234000200020002, x2);
+  CHECK_EQUAL_64(0x1234000300030003, x3);
+
+  CHECK_EQUAL_64(0x0000000012340004, x4);
+  CHECK_EQUAL_64(0x0000000012340005, x5);
+  CHECK_EQUAL_64(0x0000000012340006, x6);
+  CHECK_EQUAL_64(0x0000000012340007, x7);
+
+  CHECK_EQUAL_FP64(123400.0, d0);
+  CHECK_EQUAL_FP64(123401.0, d1);
+
+  CHECK_EQUAL_FP32(123402.0, s2);
+  CHECK_EQUAL_FP32(123403.0, s3);
+  CHECK_EQUAL_FP32(123404.0, s4);
+  CHECK_EQUAL_FP32(123405.0, s5);
+
+  TEARDOWN();
+}
+
+TEST(copy_slots_down) {
+  INIT_V8();
+  SETUP();
+
+  const uint64_t ones = 0x1111111111111111UL;
+  const uint64_t twos = 0x2222222222222222UL;
+  const uint64_t threes = 0x3333333333333333UL;
+  const uint64_t fours = 0x4444444444444444UL;
+
+  START();
+
+  // Test copying 12 slots down one slot.
+  __ Mov(x1, ones);
+  __ Mov(x2, twos);
+  __ Mov(x3, threes);
+  __ Mov(x4, fours);
+
+  __ Push(x1, x2, x3, x4);
+  __ Push(x1, x2, x1, x2);
+  __ Push(x3, x4, x3, x4);
+  __ Push(xzr, xzr);
+
+  __ Mov(x5, 1);
+  __ Mov(x6, 2);
+  __ Mov(x7, 12);
+  __ CopySlots(x5, x6, x7);
+
+  __ Pop(xzr, x4, x5, x6);
+  __ Pop(x7, x8, x9, x10);
+  __ Pop(x11, x12, x13, x14);
+  __ Pop(x15, xzr);
+
+  // Test copying one slot down one slot.
+  __ Push(x1, xzr, xzr, xzr);
+
+  __ Mov(x1, 2);
+  __ Mov(x2, 3);
+  __ Mov(x3, 1);
+  __ CopySlots(x1, x2, x3);
+
+  __ Drop(2);
+  __ Pop(x0, xzr);
+
+  END();
+
+  RUN();
+
+  CHECK_EQUAL_64(fours, x4);
+  CHECK_EQUAL_64(threes, x5);
+  CHECK_EQUAL_64(fours, x6);
+  CHECK_EQUAL_64(threes, x7);
+
+  CHECK_EQUAL_64(twos, x8);
+  CHECK_EQUAL_64(ones, x9);
+  CHECK_EQUAL_64(twos, x10);
+  CHECK_EQUAL_64(ones, x11);
+
+  CHECK_EQUAL_64(fours, x12);
+  CHECK_EQUAL_64(threes, x13);
+  CHECK_EQUAL_64(twos, x14);
+  CHECK_EQUAL_64(ones, x15);
+
+  CHECK_EQUAL_64(ones, x0);
+
+  TEARDOWN();
+}
+
+TEST(copy_slots_up) {
+  INIT_V8();
+  SETUP();
+
+  const uint64_t ones = 0x1111111111111111UL;
+  const uint64_t twos = 0x2222222222222222UL;
+  const uint64_t threes = 0x3333333333333333UL;
+
+  START();
+
+  __ Mov(x1, ones);
+  __ Mov(x2, twos);
+  __ Mov(x3, threes);
+
+  // Test copying one slot to the next slot higher in memory.
+  __ Push(xzr, x1);
+
+  __ Mov(x5, 1);
+  __ Mov(x6, 0);
+  __ Mov(x7, 1);
+  __ CopySlots(x5, x6, x7);
+
+  __ Pop(xzr, x10);
+
+  // Test copying two slots to the next two slots higher in memory.
+  __ Push(xzr, xzr);
+  __ Push(x1, x2);
+
+  __ Mov(x5, 2);
+  __ Mov(x6, 0);
+  __ Mov(x7, 2);
+  __ CopySlots(x5, x6, x7);
+
+  __ Drop(2);
+  __ Pop(x11, x12);
+
+  // Test copying three slots to the next three slots higher in memory.
+  __ Push(xzr, xzr, xzr, x1);
+  __ Push(x2, x3);
+
+  __ Mov(x5, 3);
+  __ Mov(x6, 0);
+  __ Mov(x7, 3);
+  __ CopySlots(x5, x6, x7);
+
+  __ Drop(2);
+  __ Pop(xzr, x0, x1, x2);
+
+  END();
+
+  RUN();
+
+  CHECK_EQUAL_64(ones, x10);
+  CHECK_EQUAL_64(twos, x11);
+  CHECK_EQUAL_64(ones, x12);
+  CHECK_EQUAL_64(threes, x0);
+  CHECK_EQUAL_64(twos, x1);
+  CHECK_EQUAL_64(ones, x2);
+
+  TEARDOWN();
+}
+
+TEST(copy_double_words_downwards_even) {
+  INIT_V8();
+  SETUP();
+
+  const uint64_t ones = 0x1111111111111111UL;
+  const uint64_t twos = 0x2222222222222222UL;
+  const uint64_t threes = 0x3333333333333333UL;
+  const uint64_t fours = 0x4444444444444444UL;
+
+  START();
+
+  // Test copying 12 slots up one slot.
+  __ Mov(x1, ones);
+  __ Mov(x2, twos);
+  __ Mov(x3, threes);
+  __ Mov(x4, fours);
+
+  __ Push(xzr, xzr);
+  __ Push(x1, x2, x3, x4);
+  __ Push(x1, x2, x1, x2);
+  __ Push(x3, x4, x3, x4);
+
+  __ SlotAddress(x5, 12);
+  __ SlotAddress(x6, 11);
+  __ Mov(x7, 12);
+  __ CopyDoubleWords(x5, x6, x7, TurboAssembler::kSrcLessThanDst);
+
+  __ Pop(xzr, x4, x5, x6);
+  __ Pop(x7, x8, x9, x10);
+  __ Pop(x11, x12, x13, x14);
+  __ Pop(x15, xzr);
+
+  END();
+
+  RUN();
+
+  CHECK_EQUAL_64(ones, x15);
+  CHECK_EQUAL_64(twos, x14);
+  CHECK_EQUAL_64(threes, x13);
+  CHECK_EQUAL_64(fours, x12);
+
+  CHECK_EQUAL_64(ones, x11);
+  CHECK_EQUAL_64(twos, x10);
+  CHECK_EQUAL_64(ones, x9);
+  CHECK_EQUAL_64(twos, x8);
+
+  CHECK_EQUAL_64(threes, x7);
+  CHECK_EQUAL_64(fours, x6);
+  CHECK_EQUAL_64(threes, x5);
+  CHECK_EQUAL_64(fours, x4);
+
+  TEARDOWN();
+}
+
+TEST(copy_double_words_downwards_odd) {
+  INIT_V8();
+  SETUP();
+
+  const uint64_t ones = 0x1111111111111111UL;
+  const uint64_t twos = 0x2222222222222222UL;
+  const uint64_t threes = 0x3333333333333333UL;
+  const uint64_t fours = 0x4444444444444444UL;
+  const uint64_t fives = 0x5555555555555555UL;
+
+  START();
+
+  // Test copying 13 slots up one slot.
+  __ Mov(x1, ones);
+  __ Mov(x2, twos);
+  __ Mov(x3, threes);
+  __ Mov(x4, fours);
+  __ Mov(x5, fives);
+
+  __ Push(xzr, x5);
+  __ Push(x1, x2, x3, x4);
+  __ Push(x1, x2, x1, x2);
+  __ Push(x3, x4, x3, x4);
+
+  __ SlotAddress(x5, 13);
+  __ SlotAddress(x6, 12);
+  __ Mov(x7, 13);
+  __ CopyDoubleWords(x5, x6, x7, TurboAssembler::kSrcLessThanDst);
+
+  __ Pop(xzr, x4);
+  __ Pop(x5, x6, x7, x8);
+  __ Pop(x9, x10, x11, x12);
+  __ Pop(x13, x14, x15, x16);
+
+  END();
+
+  RUN();
+
+  CHECK_EQUAL_64(fives, x16);
+
+  CHECK_EQUAL_64(ones, x15);
+  CHECK_EQUAL_64(twos, x14);
+  CHECK_EQUAL_64(threes, x13);
+  CHECK_EQUAL_64(fours, x12);
+
+  CHECK_EQUAL_64(ones, x11);
+  CHECK_EQUAL_64(twos, x10);
+  CHECK_EQUAL_64(ones, x9);
+  CHECK_EQUAL_64(twos, x8);
+
+  CHECK_EQUAL_64(threes, x7);
+  CHECK_EQUAL_64(fours, x6);
+  CHECK_EQUAL_64(threes, x5);
+  CHECK_EQUAL_64(fours, x4);
+
+  TEARDOWN();
+}
+
+TEST(copy_noop) {
+  INIT_V8();
+  SETUP();
+
+  const uint64_t ones = 0x1111111111111111UL;
+  const uint64_t twos = 0x2222222222222222UL;
+  const uint64_t threes = 0x3333333333333333UL;
+  const uint64_t fours = 0x4444444444444444UL;
+  const uint64_t fives = 0x5555555555555555UL;
+
+  START();
+
+  __ Mov(x1, ones);
+  __ Mov(x2, twos);
+  __ Mov(x3, threes);
+  __ Mov(x4, fours);
+  __ Mov(x5, fives);
+
+  __ Push(xzr, x5, x5, xzr);
+  __ Push(x3, x4, x3, x4);
+  __ Push(x1, x2, x1, x2);
+  __ Push(x1, x2, x3, x4);
+
+  // src < dst, count == 0
+  __ SlotAddress(x5, 3);
+  __ SlotAddress(x6, 2);
+  __ Mov(x7, 0);
+  __ CopyDoubleWords(x5, x6, x7, TurboAssembler::kSrcLessThanDst);
+
+  // dst < src, count == 0
+  __ SlotAddress(x5, 2);
+  __ SlotAddress(x6, 3);
+  __ Mov(x7, 0);
+  __ CopyDoubleWords(x5, x6, x7, TurboAssembler::kDstLessThanSrc);
+
+  __ Pop(x1, x2, x3, x4);
+  __ Pop(x5, x6, x7, x8);
+  __ Pop(x9, x10, x11, x12);
+  __ Pop(x13, x14, x15, x16);
+
+  END();
+
+  RUN();
+
+  CHECK_EQUAL_64(fours, x1);
+  CHECK_EQUAL_64(threes, x2);
+  CHECK_EQUAL_64(twos, x3);
+  CHECK_EQUAL_64(ones, x4);
+
+  CHECK_EQUAL_64(twos, x5);
+  CHECK_EQUAL_64(ones, x6);
+  CHECK_EQUAL_64(twos, x7);
+  CHECK_EQUAL_64(ones, x8);
+
+  CHECK_EQUAL_64(fours, x9);
+  CHECK_EQUAL_64(threes, x10);
+  CHECK_EQUAL_64(fours, x11);
+  CHECK_EQUAL_64(threes, x12);
+
+  CHECK_EQUAL_64(0, x13);
+  CHECK_EQUAL_64(fives, x14);
+  CHECK_EQUAL_64(fives, x15);
+  CHECK_EQUAL_64(0, x16);
+
+  TEARDOWN();
+}
+
 TEST(jump_both_smi) {
   INIT_V8();
   SETUP();
@@ -13275,13 +13249,13 @@
   START();
 
   __ Mov(x0, 0x5555555500000001UL);  // A pointer.
-  __ Mov(x1, 0xaaaaaaaa00000001UL);  // A pointer.
+  __ Mov(x1, 0xAAAAAAAA00000001UL);  // A pointer.
   __ Mov(x2, 0x1234567800000000UL);  // A smi.
   __ Mov(x3, 0x8765432100000000UL);  // A smi.
-  __ Mov(x4, 0xdead);
-  __ Mov(x5, 0xdead);
-  __ Mov(x6, 0xdead);
-  __ Mov(x7, 0xdead);
+  __ Mov(x4, 0xDEAD);
+  __ Mov(x5, 0xDEAD);
+  __ Mov(x6, 0xDEAD);
+  __ Mov(x7, 0xDEAD);
 
   __ JumpIfBothSmi(x0, x1, &cond_pass_00, &cond_fail_00);
   __ Bind(&return1);
@@ -13325,7 +13299,7 @@
   RUN();
 
   CHECK_EQUAL_64(0x5555555500000001UL, x0);
-  CHECK_EQUAL_64(0xaaaaaaaa00000001UL, x1);
+  CHECK_EQUAL_64(0xAAAAAAAA00000001UL, x1);
   CHECK_EQUAL_64(0x1234567800000000UL, x2);
   CHECK_EQUAL_64(0x8765432100000000UL, x3);
   CHECK_EQUAL_64(0, x4);
@@ -13348,13 +13322,13 @@
   START();
 
   __ Mov(x0, 0x5555555500000001UL);  // A pointer.
-  __ Mov(x1, 0xaaaaaaaa00000001UL);  // A pointer.
+  __ Mov(x1, 0xAAAAAAAA00000001UL);  // A pointer.
   __ Mov(x2, 0x1234567800000000UL);  // A smi.
   __ Mov(x3, 0x8765432100000000UL);  // A smi.
-  __ Mov(x4, 0xdead);
-  __ Mov(x5, 0xdead);
-  __ Mov(x6, 0xdead);
-  __ Mov(x7, 0xdead);
+  __ Mov(x4, 0xDEAD);
+  __ Mov(x5, 0xDEAD);
+  __ Mov(x6, 0xDEAD);
+  __ Mov(x7, 0xDEAD);
 
   __ JumpIfEitherSmi(x0, x1, &cond_pass_00, &cond_fail_00);
   __ Bind(&return1);
@@ -13398,7 +13372,7 @@
   RUN();
 
   CHECK_EQUAL_64(0x5555555500000001UL, x0);
-  CHECK_EQUAL_64(0xaaaaaaaa00000001UL, x1);
+  CHECK_EQUAL_64(0xAAAAAAAA00000001UL, x1);
   CHECK_EQUAL_64(0x1234567800000000UL, x2);
   CHECK_EQUAL_64(0x8765432100000000UL, x3);
   CHECK_EQUAL_64(0, x4);
@@ -14277,17 +14251,17 @@
   __ Mov(x2, reinterpret_cast<uintptr_t>(test_substring));
 
   // Test the maximum number of arguments, and sign extension.
-  __ Mov(w3, 0xffffffff);
-  __ Mov(w4, 0xffffffff);
-  __ Mov(x5, 0xffffffffffffffff);
-  __ Mov(x6, 0xffffffffffffffff);
+  __ Mov(w3, 0xFFFFFFFF);
+  __ Mov(w4, 0xFFFFFFFF);
+  __ Mov(x5, 0xFFFFFFFFFFFFFFFF);
+  __ Mov(x6, 0xFFFFFFFFFFFFFFFF);
   __ Fmov(s1, 1.234);
   __ Fmov(s2, 2.345);
   __ Fmov(d3, 3.456);
   __ Fmov(d4, 4.567);
 
   // Test printing callee-saved registers.
-  __ Mov(x28, 0x123456789abcdef);
+  __ Mov(x28, 0x123456789ABCDEF);
   __ Fmov(d10, 42.0);
 
   // Test with three arguments.
@@ -14319,16 +14293,6 @@
   __ Printf("StackPointer(csp): 0x%016" PRIx64 ", 0x%08" PRIx32 "\n",
             __ StackPointer(), __ StackPointer().W());
 
-  // Test with a different stack pointer.
-  const Register old_stack_pointer = __ StackPointer();
-  __ Mov(x29, old_stack_pointer);
-  __ SetStackPointer(x29);
-  // Print the stack pointer (not csp).
-  __ Printf("StackPointer(not csp): 0x%016" PRIx64 ", 0x%08" PRIx32 "\n",
-            __ StackPointer(), __ StackPointer().W());
-  __ Mov(old_stack_pointer, __ StackPointer());
-  __ SetStackPointer(old_stack_pointer);
-
   // Test with three arguments.
   __ Printf("3=%u, 4=%u, 5=%u\n", x10, x11, x12);
 
@@ -14379,10 +14343,10 @@
   __ Mov(x22, x0);
 
   // Test the maximum number of arguments, and sign extension.
-  __ Mov(w3, 0xffffffff);
-  __ Mov(w4, 0xffffffff);
-  __ Mov(x5, 0xffffffffffffffff);
-  __ Mov(x6, 0xffffffffffffffff);
+  __ Mov(w3, 0xFFFFFFFF);
+  __ Mov(w4, 0xFFFFFFFF);
+  __ Mov(x5, 0xFFFFFFFFFFFFFFFF);
+  __ Mov(x6, 0xFFFFFFFFFFFFFFFF);
   __ PrintfNoPreserve("w3(uint32): %" PRIu32 "\nw4(int32): %" PRId32 "\n"
                       "x5(uint64): %" PRIu64 "\nx6(int64): %" PRId64 "\n",
                       w3, w4, x5, x6);
@@ -14396,7 +14360,7 @@
   __ Mov(x24, x0);
 
   // Test printing callee-saved registers.
-  __ Mov(x28, 0x123456789abcdef);
+  __ Mov(x28, 0x123456789ABCDEF);
   __ PrintfNoPreserve("0x%" PRIx32 ", 0x%" PRIx64 "\n", w28, x28);
   __ Mov(x25, x0);
 
@@ -14404,33 +14368,21 @@
   __ PrintfNoPreserve("%g\n", d10);
   __ Mov(x26, x0);
 
-  // Test with a different stack pointer.
-  const Register old_stack_pointer = __ StackPointer();
-  __ Mov(x29, old_stack_pointer);
-  __ SetStackPointer(x29);
-  // Print the stack pointer (not csp).
-  __ PrintfNoPreserve(
-      "StackPointer(not csp): 0x%016" PRIx64 ", 0x%08" PRIx32 "\n",
-      __ StackPointer(), __ StackPointer().W());
-  __ Mov(x27, x0);
-  __ Mov(old_stack_pointer, __ StackPointer());
-  __ SetStackPointer(old_stack_pointer);
-
   // Test with three arguments.
   __ Mov(x3, 3);
   __ Mov(x4, 40);
   __ Mov(x5, 500);
   __ PrintfNoPreserve("3=%u, 4=%u, 5=%u\n", x3, x4, x5);
-  __ Mov(x28, x0);
+  __ Mov(x27, x0);
 
   // Mixed argument types.
-  __ Mov(w3, 0xffffffff);
+  __ Mov(w3, 0xFFFFFFFF);
   __ Fmov(s1, 1.234);
-  __ Mov(x5, 0xffffffffffffffff);
+  __ Mov(x5, 0xFFFFFFFFFFFFFFFF);
   __ Fmov(d3, 3.456);
   __ PrintfNoPreserve("w3: %" PRIu32 ", s1: %f, x5: %" PRIu64 ", d3: %f\n",
                       w3, s1, x5, d3);
-  __ Mov(x29, x0);
+  __ Mov(x28, x0);
 
   END();
   RUN();
@@ -14456,18 +14408,14 @@
   // %e: 3.456000e+00
   // %E: 4.567000E+00
   CHECK_EQUAL_64(13 + 10 + 17 + 17, x24);
-  // 0x89abcdef, 0x123456789abcdef
+  // 0x89ABCDEF, 0x123456789ABCDEF
   CHECK_EQUAL_64(30, x25);
   // 42
   CHECK_EQUAL_64(3, x26);
-  // StackPointer(not csp): 0x00007fb037ae2370, 0x37ae2370
-  // Note: This is an example value, but the field width is fixed here so the
-  // string length is still predictable.
-  CHECK_EQUAL_64(54, x27);
   // 3=3, 4=40, 5=500
-  CHECK_EQUAL_64(17, x28);
+  CHECK_EQUAL_64(17, x27);
   // w3: 4294967295, s1: 1.234000, x5: 18446744073709551615, d3: 3.456000
-  CHECK_EQUAL_64(69, x29);
+  CHECK_EQUAL_64(69, x28);
 
   TEARDOWN();
 }
@@ -14486,18 +14434,18 @@
   __ Adr(lr, &target);
 
   __ Blr(lr);
-  __ Mov(x0, 0xdeadbeef);
+  __ Mov(x0, 0xDEADBEEF);
   __ B(&end);
 
   __ Bind(&target);
-  __ Mov(x0, 0xc001c0de);
+  __ Mov(x0, 0xC001C0DE);
 
   __ Bind(&end);
   END();
 
   RUN();
 
-  CHECK_EQUAL_64(0xc001c0de, x0);
+  CHECK_EQUAL_64(0xC001C0DE, x0);
 
   TEARDOWN();
 }
@@ -14566,13 +14514,13 @@
 TEST(process_nan_double) {
   INIT_V8();
   // Make sure that NaN propagation works correctly.
-  double sn = bit_cast<double>(0x7ff5555511111111);
-  double qn = bit_cast<double>(0x7ffaaaaa11111111);
+  double sn = bit_cast<double>(0x7FF5555511111111);
+  double qn = bit_cast<double>(0x7FFAAAAA11111111);
   CHECK(IsSignallingNaN(sn));
   CHECK(IsQuietNaN(qn));
 
   // The input NaNs after passing through ProcessNaN.
-  double sn_proc = bit_cast<double>(0x7ffd555511111111);
+  double sn_proc = bit_cast<double>(0x7FFD555511111111);
   double qn_proc = qn;
   CHECK(IsQuietNaN(sn_proc));
   CHECK(IsQuietNaN(qn_proc));
@@ -14642,13 +14590,13 @@
 TEST(process_nan_float) {
   INIT_V8();
   // Make sure that NaN propagation works correctly.
-  float sn = bit_cast<float>(0x7f951111);
-  float qn = bit_cast<float>(0x7fea1111);
+  float sn = bit_cast<float>(0x7F951111);
+  float qn = bit_cast<float>(0x7FEA1111);
   CHECK(IsSignallingNaN(sn));
   CHECK(IsQuietNaN(qn));
 
   // The input NaNs after passing through ProcessNaN.
-  float sn_proc = bit_cast<float>(0x7fd51111);
+  float sn_proc = bit_cast<float>(0x7FD51111);
   float qn_proc = qn;
   CHECK(IsQuietNaN(sn_proc));
   CHECK(IsQuietNaN(qn_proc));
@@ -14752,18 +14700,18 @@
 TEST(process_nans_double) {
   INIT_V8();
   // Make sure that NaN propagation works correctly.
-  double sn = bit_cast<double>(0x7ff5555511111111);
-  double sm = bit_cast<double>(0x7ff5555522222222);
-  double qn = bit_cast<double>(0x7ffaaaaa11111111);
-  double qm = bit_cast<double>(0x7ffaaaaa22222222);
+  double sn = bit_cast<double>(0x7FF5555511111111);
+  double sm = bit_cast<double>(0x7FF5555522222222);
+  double qn = bit_cast<double>(0x7FFAAAAA11111111);
+  double qm = bit_cast<double>(0x7FFAAAAA22222222);
   CHECK(IsSignallingNaN(sn));
   CHECK(IsSignallingNaN(sm));
   CHECK(IsQuietNaN(qn));
   CHECK(IsQuietNaN(qm));
 
   // The input NaNs after passing through ProcessNaN.
-  double sn_proc = bit_cast<double>(0x7ffd555511111111);
-  double sm_proc = bit_cast<double>(0x7ffd555522222222);
+  double sn_proc = bit_cast<double>(0x7FFD555511111111);
+  double sm_proc = bit_cast<double>(0x7FFD555522222222);
   double qn_proc = qn;
   double qm_proc = qm;
   CHECK(IsQuietNaN(sn_proc));
@@ -14824,18 +14772,18 @@
 TEST(process_nans_float) {
   INIT_V8();
   // Make sure that NaN propagation works correctly.
-  float sn = bit_cast<float>(0x7f951111);
-  float sm = bit_cast<float>(0x7f952222);
-  float qn = bit_cast<float>(0x7fea1111);
-  float qm = bit_cast<float>(0x7fea2222);
+  float sn = bit_cast<float>(0x7F951111);
+  float sm = bit_cast<float>(0x7F952222);
+  float qn = bit_cast<float>(0x7FEA1111);
+  float qm = bit_cast<float>(0x7FEA2222);
   CHECK(IsSignallingNaN(sn));
   CHECK(IsSignallingNaN(sm));
   CHECK(IsQuietNaN(qn));
   CHECK(IsQuietNaN(qm));
 
   // The input NaNs after passing through ProcessNaN.
-  float sn_proc = bit_cast<float>(0x7fd51111);
-  float sm_proc = bit_cast<float>(0x7fd52222);
+  float sn_proc = bit_cast<float>(0x7FD51111);
+  float sm_proc = bit_cast<float>(0x7FD52222);
   float qn_proc = qn;
   float qm_proc = qm;
   CHECK(IsQuietNaN(sn_proc));
@@ -14949,12 +14897,12 @@
 
 TEST(default_nan_float) {
   INIT_V8();
-  float sn = bit_cast<float>(0x7f951111);
-  float sm = bit_cast<float>(0x7f952222);
-  float sa = bit_cast<float>(0x7f95aaaa);
-  float qn = bit_cast<float>(0x7fea1111);
-  float qm = bit_cast<float>(0x7fea2222);
-  float qa = bit_cast<float>(0x7feaaaaa);
+  float sn = bit_cast<float>(0x7F951111);
+  float sm = bit_cast<float>(0x7F952222);
+  float sa = bit_cast<float>(0x7F95AAAA);
+  float qn = bit_cast<float>(0x7FEA1111);
+  float qm = bit_cast<float>(0x7FEA2222);
+  float qa = bit_cast<float>(0x7FEAAAAA);
   CHECK(IsSignallingNaN(sn));
   CHECK(IsSignallingNaN(sm));
   CHECK(IsSignallingNaN(sa));
@@ -15077,12 +15025,12 @@
 
 TEST(default_nan_double) {
   INIT_V8();
-  double sn = bit_cast<double>(0x7ff5555511111111);
-  double sm = bit_cast<double>(0x7ff5555522222222);
-  double sa = bit_cast<double>(0x7ff55555aaaaaaaa);
-  double qn = bit_cast<double>(0x7ffaaaaa11111111);
-  double qm = bit_cast<double>(0x7ffaaaaa22222222);
-  double qa = bit_cast<double>(0x7ffaaaaaaaaaaaaa);
+  double sn = bit_cast<double>(0x7FF5555511111111);
+  double sm = bit_cast<double>(0x7FF5555522222222);
+  double sa = bit_cast<double>(0x7FF55555AAAAAAAA);
+  double qn = bit_cast<double>(0x7FFAAAAA11111111);
+  double qm = bit_cast<double>(0x7FFAAAAA22222222);
+  double qa = bit_cast<double>(0x7FFAAAAAAAAAAAAA);
   CHECK(IsSignallingNaN(sn));
   CHECK(IsSignallingNaN(sm));
   CHECK(IsSignallingNaN(sa));
@@ -15183,7 +15131,7 @@
     __ Abs(x11, x1, &fail);
     __ Abs(x12, x1, &fail, &next);
     __ Bind(&next);
-    __ Abs(x13, x1, NULL, &done);
+    __ Abs(x13, x1, nullptr, &done);
   } else {
     // labs is undefined for kXMinInt but our implementation in the
     // MacroAssembler will return kXMinInt in such a case.
@@ -15192,7 +15140,7 @@
     Label next;
     // The result is not representable.
     __ Abs(x10, x1);
-    __ Abs(x11, x1, NULL, &fail);
+    __ Abs(x11, x1, nullptr, &fail);
     __ Abs(x12, x1, &next, &fail);
     __ Bind(&next);
     __ Abs(x13, x1, &done);
@@ -15240,7 +15188,7 @@
     __ Abs(w11, w1, &fail);
     __ Abs(w12, w1, &fail, &next);
     __ Bind(&next);
-    __ Abs(w13, w1, NULL, &done);
+    __ Abs(w13, w1, nullptr, &done);
   } else {
     // abs is undefined for kWMinInt but our implementation in the
     // MacroAssembler will return kWMinInt in such a case.
@@ -15249,7 +15197,7 @@
     Label next;
     // The result is not representable.
     __ Abs(w10, w1);
-    __ Abs(w11, w1, NULL, &fail);
+    __ Abs(w11, w1, nullptr, &fail);
     __ Abs(w12, w1, &next, &fail);
     __ Bind(&next);
     __ Abs(w13, w1, &done);
@@ -15336,7 +15284,7 @@
     }
   }
 
-  CHECK(pool_count == 2);
+  CHECK_EQ(pool_count, 2);
 
   TEARDOWN();
 }
@@ -15513,3 +15461,23 @@
 
 }  // namespace internal
 }  // namespace v8
+
+#undef __
+#undef BUF_SIZE
+#undef SETUP
+#undef INIT_V8
+#undef SETUP_SIZE
+#undef RESET
+#undef START_AFTER_RESET
+#undef START
+#undef RUN
+#undef END
+#undef TEARDOWN
+#undef CHECK_EQUAL_NZCV
+#undef CHECK_EQUAL_REGISTERS
+#undef CHECK_EQUAL_32
+#undef CHECK_EQUAL_FP32
+#undef CHECK_EQUAL_64
+#undef CHECK_EQUAL_FP64
+#undef CHECK_EQUAL_128
+#undef CHECK_CONSTANT_POOL_SIZE
diff --git a/src/v8/test/cctest/test-assembler-ia32.cc b/src/v8/test/cctest/test-assembler-ia32.cc
index ab4a72f..5b79ff1 100644
--- a/src/v8/test/cctest/test-assembler-ia32.cc
+++ b/src/v8/test/cctest/test-assembler-ia32.cc
@@ -136,7 +136,7 @@
 
   // some relocated stuff here, not executed
   __ mov(eax, isolate->factory()->true_value());
-  __ jmp(NULL, RelocInfo::RUNTIME_ENTRY);
+  __ jmp(nullptr, RelocInfo::RUNTIME_ENTRY);
 
   CodeDesc desc;
   assm.GetCode(isolate, &desc);
@@ -308,7 +308,7 @@
   CcTest::InitializeVM();
   Isolate* isolate = reinterpret_cast<Isolate*>(CcTest::isolate());
   HandleScope scope(isolate);
-  Assembler assm(isolate, NULL, 0);
+  Assembler assm(isolate, nullptr, 0);
 
   Label target;
   __ j(equal, &target);
@@ -442,7 +442,7 @@
   global_template->Set(v8_str("do_sse2"),
                        v8::FunctionTemplate::New(isolate, DoSSE2));
 
-  LocalContext env(NULL, global_template);
+  LocalContext env(nullptr, global_template);
   CompileRun(
       "function foo(vec) {"
       "  return do_sse2(vec);"
@@ -521,6 +521,7 @@
     __ mulps(xmm2, xmm1);
     __ subps(xmm2, xmm0);
     __ divps(xmm2, xmm1);
+    __ haddps(xmm1, xmm0);
     __ cvttss2si(eax, xmm2);
     __ ret(0);
   }
@@ -1054,12 +1055,12 @@
     // blsmsk
     __ inc(eax);
     __ blsmsk(ebx, ecx);
-    __ cmp(ebx, Immediate(0x0000000fu));  // expected result
+    __ cmp(ebx, Immediate(0x0000000Fu));  // expected result
     __ j(not_equal, &exit);
 
     __ inc(eax);
     __ blsmsk(ebx, Operand(esp, 0));
-    __ cmp(ebx, Immediate(0x0000000fu));  // expected result
+    __ cmp(ebx, Immediate(0x0000000Fu));  // expected result
     __ j(not_equal, &exit);
 
     // blsr
@@ -1250,7 +1251,7 @@
     __ j(not_equal, &exit);
 
     // pdep
-    __ mov(edx, Immediate(0xfffffff0u));
+    __ mov(edx, Immediate(0xFFFFFFF0u));
 
     __ inc(eax);
     __ pdep(ebx, edx, ecx);
@@ -1263,16 +1264,16 @@
     __ j(not_equal, &exit);
 
     // pext
-    __ mov(edx, Immediate(0xfffffff0u));
+    __ mov(edx, Immediate(0xFFFFFFF0u));
 
     __ inc(eax);
     __ pext(ebx, edx, ecx);
-    __ cmp(ebx, Immediate(0x0000fffeu));  // expected result
+    __ cmp(ebx, Immediate(0x0000FFFEu));  // expected result
     __ j(not_equal, &exit);
 
     __ inc(eax);
     __ pext(ebx, edx, Operand(esp, 0));
-    __ cmp(ebx, Immediate(0x0000fffeu));  // expected result
+    __ cmp(ebx, Immediate(0x0000FFFEu));  // expected result
     __ j(not_equal, &exit);
 
     // sarx
diff --git a/src/v8/test/cctest/test-assembler-mips.cc b/src/v8/test/cctest/test-assembler-mips.cc
index e191b1e..1b337f5 100644
--- a/src/v8/test/cctest/test-assembler-mips.cc
+++ b/src/v8/test/cctest/test-assembler-mips.cc
@@ -35,7 +35,7 @@
 #include "src/factory.h"
 #include "src/macro-assembler.h"
 #include "src/mips/macro-assembler-mips.h"
-#include "src/mips/simulator-mips.h"
+#include "src/simulator.h"
 
 #include "test/cctest/cctest.h"
 
@@ -43,10 +43,11 @@
 namespace internal {
 
 // Define these function prototypes to match JSEntryFunction in execution.cc.
-typedef Object* (*F1)(int x, int p1, int p2, int p3, int p4);
-typedef Object* (*F2)(int x, int y, int p2, int p3, int p4);
-typedef Object* (*F3)(void* p, int p1, int p2, int p3, int p4);
-typedef Object* (*F4)(void* p0, void* p1, int p2, int p3, int p4);
+// TODO(mips): Refine these signatures per test case.
+typedef Object*(F1)(int x, int p1, int p2, int p3, int p4);
+typedef Object*(F2)(int x, int y, int p2, int p3, int p4);
+typedef Object*(F3)(void* p, int p1, int p2, int p3, int p4);
+typedef Object*(F4)(void* p0, void* p1, int p2, int p3, int p4);
 
 #define __ assm.
 
@@ -55,7 +56,8 @@
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
 
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
 
   // Addition.
   __ addu(v0, a0, a1);
@@ -66,10 +68,9 @@
   assm.GetCode(isolate, &desc);
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
-  F2 f = FUNCTION_CAST<F2>(code->entry());
-  int res = reinterpret_cast<int>(
-      CALL_GENERATED_CODE(isolate, f, 0xab0, 0xc, 0, 0, 0));
-  CHECK_EQ(static_cast<int32_t>(0xabc), res);
+  auto f = GeneratedCode<F2>::FromCode(*code);
+  int res = reinterpret_cast<int>(f.Call(0xAB0, 0xC, 0, 0, 0));
+  CHECK_EQ(static_cast<int32_t>(0xABC), res);
 }
 
 
@@ -78,7 +79,8 @@
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
 
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
   Label L, C;
 
   __ mov(a1, a0);
@@ -102,9 +104,8 @@
   assm.GetCode(isolate, &desc);
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
-  F1 f = FUNCTION_CAST<F1>(code->entry());
-  int res = reinterpret_cast<int>(
-      CALL_GENERATED_CODE(isolate, f, 50, 0, 0, 0, 0));
+  auto f = GeneratedCode<F1>::FromCode(*code);
+  int res = reinterpret_cast<int>(f.Call(50, 0, 0, 0, 0));
   CHECK_EQ(1275, res);
 }
 
@@ -114,7 +115,8 @@
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
 
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
 
   Label exit, error;
 
@@ -126,8 +128,8 @@
   __ ori(t0, zero_reg, 0);
   __ lui(t0, 0x1234);
   __ ori(t0, t0, 0);
-  __ ori(t0, t0, 0x0f0f);
-  __ ori(t0, t0, 0xf0f0);
+  __ ori(t0, t0, 0x0F0F);
+  __ ori(t0, t0, 0xF0F0);
   __ addiu(t1, t0, 1);
   __ addiu(t2, t1, -0x10);
 
@@ -135,20 +137,20 @@
   __ li(t0, 0x00000004);
   __ li(t1, 0x00001234);
   __ li(t2, 0x12345678);
-  __ li(t3, 0x7fffffff);
-  __ li(t4, 0xfffffffc);
-  __ li(t5, 0xffffedcc);
-  __ li(t6, 0xedcba988);
+  __ li(t3, 0x7FFFFFFF);
+  __ li(t4, 0xFFFFFFFC);
+  __ li(t5, 0xFFFFEDCC);
+  __ li(t6, 0xEDCBA988);
   __ li(t7, 0x80000000);
 
   // SPECIAL class.
   __ srl(v0, t2, 8);    // 0x00123456
-  __ sll(v0, v0, 11);   // 0x91a2b000
-  __ sra(v0, v0, 3);    // 0xf2345600
-  __ srav(v0, v0, t0);  // 0xff234560
-  __ sllv(v0, v0, t0);  // 0xf2345600
-  __ srlv(v0, v0, t0);  // 0x0f234560
-  __ Branch(&error, ne, v0, Operand(0x0f234560));
+  __ sll(v0, v0, 11);   // 0x91A2B000
+  __ sra(v0, v0, 3);    // 0xF2345600
+  __ srav(v0, v0, t0);  // 0xFF234560
+  __ sllv(v0, v0, t0);  // 0xF2345600
+  __ srlv(v0, v0, t0);  // 0x0F234560
+  __ Branch(&error, ne, v0, Operand(0x0F234560));
   __ nop();
 
   __ addu(v0, t0, t1);   // 0x00001238
@@ -158,15 +160,15 @@
   __ addu(v1, t3, t0);
   __ Branch(&error, ne, v1, Operand(0x80000003));
   __ nop();
-  __ subu(v1, t7, t0);  // 0x7ffffffc
-  __ Branch(&error, ne, v1, Operand(0x7ffffffc));
+  __ subu(v1, t7, t0);  // 0x7FFFFFFC
+  __ Branch(&error, ne, v1, Operand(0x7FFFFFFC));
   __ nop();
 
   __ and_(v0, t1, t2);  // 0x00001230
   __ or_(v0, v0, t1);   // 0x00001234
-  __ xor_(v0, v0, t2);  // 0x1234444c
-  __ nor(v0, v0, t2);   // 0xedcba987
-  __ Branch(&error, ne, v0, Operand(0xedcba983));
+  __ xor_(v0, v0, t2);  // 0x1234444C
+  __ nor(v0, v0, t2);   // 0xEDCBA987
+  __ Branch(&error, ne, v0, Operand(0xEDCBA983));
   __ nop();
 
   __ slt(v0, t7, t3);
@@ -187,7 +189,7 @@
   __ nop();
 
   __ slti(v0, t1, 0x00002000);  // 0x1
-  __ slti(v0, v0, 0xffff8000);  // 0x0
+  __ slti(v0, v0, 0xFFFF8000);  // 0x0
   __ Branch(&error, ne, v0, Operand(zero_reg));
   __ nop();
   __ sltiu(v0, t1, 0x00002000);  // 0x1
@@ -195,10 +197,10 @@
   __ Branch(&error, ne, v0, Operand(0x1));
   __ nop();
 
-  __ andi(v0, t1, 0xf0f0);  // 0x00001030
-  __ ori(v0, v0, 0x8a00);  // 0x00009a30
-  __ xori(v0, v0, 0x83cc);  // 0x000019fc
-  __ Branch(&error, ne, v0, Operand(0x000019fc));
+  __ andi(v0, t1, 0xF0F0);  // 0x00001030
+  __ ori(v0, v0, 0x8A00);   // 0x00009A30
+  __ xori(v0, v0, 0x83CC);  // 0x000019FC
+  __ Branch(&error, ne, v0, Operand(0x000019FC));
   __ nop();
   __ lui(v1, 0x8123);  // 0x81230000
   __ Branch(&error, ne, v1, Operand(0x81230000));
@@ -215,11 +217,11 @@
   __ addu(v0, v0, v1);  // 51
   __ Branch(&error, ne, v0, Operand(51));
   __ Movn(a0, t3, t0);  // Move a0<-t3 (t0 is NOT 0).
-  __ Ins(a0, t1, 12, 8);  // 0x7ff34fff
-  __ Branch(&error, ne, a0, Operand(0x7ff34fff));
+  __ Ins(a0, t1, 12, 8);  // 0x7FF34FFF
+  __ Branch(&error, ne, a0, Operand(0x7FF34FFF));
   __ Movz(a0, t6, t7);    // a0 not updated (t7 is NOT 0).
-  __ Ext(a1, a0, 8, 12);  // 0x34f
-  __ Branch(&error, ne, a1, Operand(0x34f));
+  __ Ext(a1, a0, 8, 12);  // 0x34F
+  __ Branch(&error, ne, a1, Operand(0x34F));
   __ Movz(a0, t6, v1);    // a0<-t6, v0 is 0, from 8 instr back.
   __ Branch(&error, ne, a0, Operand(t6));
 
@@ -240,9 +242,8 @@
   assm.GetCode(isolate, &desc);
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
-  F2 f = FUNCTION_CAST<F2>(code->entry());
-  int res = reinterpret_cast<int>(
-      CALL_GENERATED_CODE(isolate, f, 0xab0, 0xc, 0, 0, 0));
+  auto f = GeneratedCode<F2>::FromCode(*code);
+  int res = reinterpret_cast<int>(f.Call(0xAB0, 0xC, 0, 0, 0));
   CHECK_EQ(static_cast<int32_t>(0x31415926), res);
 }
 
@@ -275,7 +276,8 @@
 
   // Create a function that accepts &t, and loads, manipulates, and stores
   // the doubles t.a ... t.f.
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
   Label L, C;
 
   // Double precision floating point instructions.
@@ -342,7 +344,7 @@
   assm.GetCode(isolate, &desc);
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
-  F3 f = FUNCTION_CAST<F3>(code->entry());
+  auto f = GeneratedCode<F3>::FromCode(*code);
   // Double test values.
   t.a = 1.5e14;
   t.b = 2.75e11;
@@ -359,8 +361,7 @@
   t.fd = 0.0;
   t.fe = 0.0;
   t.ff = 0.0;
-  Object* dummy = CALL_GENERATED_CODE(isolate, f, &t, 0, 0, 0, 0);
-  USE(dummy);
+  f.Call(&t, 0, 0, 0, 0);
   // Expected double results.
   CHECK_EQ(1.5e14, t.a);
   CHECK_EQ(1.5e14, t.b);
@@ -404,7 +405,8 @@
   } T;
   T t;
 
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
   Label L, C;
 
   __ Ldc1(f4, MemOperand(a0, offsetof(T, a)));
@@ -446,12 +448,11 @@
   assm.GetCode(isolate, &desc);
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
-  F3 f = FUNCTION_CAST<F3>(code->entry());
+  auto f = GeneratedCode<F3>::FromCode(*code);
   t.a = 1.5e22;
   t.b = 2.75e11;
   t.c = 17.17;
-  Object* dummy = CALL_GENERATED_CODE(isolate, f, &t, 0, 0, 0, 0);
-  USE(dummy);
+  f.Call(&t, 0, 0, 0, 0);
 
   CHECK_EQ(2.75e11, t.a);
   CHECK_EQ(2.75e11, t.b);
@@ -473,7 +474,8 @@
   } T;
   T t;
 
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
   Label L, C;
 
   // Load all structure elements to registers.
@@ -509,13 +511,12 @@
   assm.GetCode(isolate, &desc);
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
-  F3 f = FUNCTION_CAST<F3>(code->entry());
+  auto f = GeneratedCode<F3>::FromCode(*code);
   t.a = 1.5e4;
   t.b = 2.75e8;
   t.i = 12345678;
   t.j = -100000;
-  Object* dummy = CALL_GENERATED_CODE(isolate, f, &t, 0, 0, 0, 0);
-  USE(dummy);
+  f.Call(&t, 0, 0, 0, 0);
 
   CHECK_EQ(12345678.0, t.a);
   CHECK_EQ(-100000.0, t.b);
@@ -542,7 +543,7 @@
   } T;
   T t;
 
-  Assembler assm(isolate, NULL, 0);
+  Assembler assm(isolate, nullptr, 0);
   Label L, C;
 
   // Basic word load/store.
@@ -579,25 +580,24 @@
   assm.GetCode(isolate, &desc);
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
-  F3 f = FUNCTION_CAST<F3>(code->entry());
+  auto f = GeneratedCode<F3>::FromCode(*code);
   t.ui = 0x11223344;
-  t.si = 0x99aabbcc;
-  Object* dummy = CALL_GENERATED_CODE(isolate, f, &t, 0, 0, 0, 0);
-  USE(dummy);
+  t.si = 0x99AABBCC;
+  f.Call(&t, 0, 0, 0, 0);
 
   CHECK_EQ(static_cast<int32_t>(0x11223344), t.r1);
 #if __BYTE_ORDER == __LITTLE_ENDIAN
   CHECK_EQ(static_cast<int32_t>(0x3344), t.r2);
-  CHECK_EQ(static_cast<int32_t>(0xffffbbcc), t.r3);
-  CHECK_EQ(static_cast<int32_t>(0x0000bbcc), t.r4);
-  CHECK_EQ(static_cast<int32_t>(0xffffffcc), t.r5);
-  CHECK_EQ(static_cast<int32_t>(0x3333bbcc), t.r6);
+  CHECK_EQ(static_cast<int32_t>(0xFFFFBBCC), t.r3);
+  CHECK_EQ(static_cast<int32_t>(0x0000BBCC), t.r4);
+  CHECK_EQ(static_cast<int32_t>(0xFFFFFFCC), t.r5);
+  CHECK_EQ(static_cast<int32_t>(0x3333BBCC), t.r6);
 #elif __BYTE_ORDER == __BIG_ENDIAN
   CHECK_EQ(static_cast<int32_t>(0x1122), t.r2);
-  CHECK_EQ(static_cast<int32_t>(0xffff99aa), t.r3);
-  CHECK_EQ(static_cast<int32_t>(0x000099aa), t.r4);
-  CHECK_EQ(static_cast<int32_t>(0xffffff99), t.r5);
-  CHECK_EQ(static_cast<int32_t>(0x99aa3333), t.r6);
+  CHECK_EQ(static_cast<int32_t>(0xFFFF99AA), t.r3);
+  CHECK_EQ(static_cast<int32_t>(0x000099AA), t.r4);
+  CHECK_EQ(static_cast<int32_t>(0xFFFFFF99), t.r5);
+  CHECK_EQ(static_cast<int32_t>(0x99AA3333), t.r6);
 #else
 #error Unknown endianness
 #endif
@@ -623,7 +623,8 @@
 
   // Create a function that accepts &t, and loads, manipulates, and stores
   // the doubles t.a ... t.f.
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
   Label neither_is_nan, less_than, outa_here;
 
   __ Ldc1(f4, MemOperand(a0, offsetof(T, a)));
@@ -672,7 +673,7 @@
   assm.GetCode(isolate, &desc);
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
-  F3 f = FUNCTION_CAST<F3>(code->entry());
+  auto f = GeneratedCode<F3>::FromCode(*code);
   t.a = 1.5e14;
   t.b = 2.75e11;
   t.c = 2.0;
@@ -680,8 +681,7 @@
   t.e = 0.0;
   t.f = 0.0;
   t.result = 0;
-  Object* dummy = CALL_GENERATED_CODE(isolate, f, &t, 0, 0, 0, 0);
-  USE(dummy);
+  f.Call(&t, 0, 0, 0, 0);
   CHECK_EQ(1.5e14, t.a);
   CHECK_EQ(2.75e11, t.b);
   CHECK_EQ(1, t.result);
@@ -714,7 +714,7 @@
     } T;
     T t;
 
-    MacroAssembler assm(isolate, NULL, 0,
+    MacroAssembler assm(isolate, nullptr, 0,
                         v8::internal::CodeObjectRequired::kYes);
 
     // Basic word load.
@@ -723,11 +723,11 @@
     // ROTR instruction (called through the Ror macro).
     __ Ror(t1, t0, 0x0004);
     __ Ror(t2, t0, 0x0008);
-    __ Ror(t3, t0, 0x000c);
+    __ Ror(t3, t0, 0x000C);
     __ Ror(t4, t0, 0x0010);
     __ Ror(t5, t0, 0x0014);
     __ Ror(t6, t0, 0x0018);
-    __ Ror(t7, t0, 0x001c);
+    __ Ror(t7, t0, 0x001C);
 
     // Basic word store.
     __ sw(t1, MemOperand(a0, offsetof(T, result_rotr_4)) );
@@ -770,10 +770,9 @@
     assm.GetCode(isolate, &desc);
     Handle<Code> code =
         isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
-    F3 f = FUNCTION_CAST<F3>(code->entry());
+    auto f = GeneratedCode<F3>::FromCode(*code);
     t.input = 0x12345678;
-    Object* dummy = CALL_GENERATED_CODE(isolate, f, &t, 0x0, 0, 0, 0);
-    USE(dummy);
+    f.Call(&t, 0x0, 0, 0, 0);
     CHECK_EQ(static_cast<int32_t>(0x81234567), t.result_rotr_4);
     CHECK_EQ(static_cast<int32_t>(0x78123456), t.result_rotr_8);
     CHECK_EQ(static_cast<int32_t>(0x67812345), t.result_rotr_12);
@@ -799,7 +798,8 @@
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
 
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
   Label exit, exit2, exit3;
 
   __ Branch(&exit, ge, a0, Operand(zero_reg));
@@ -834,7 +834,8 @@
   } T;
   T t;
 
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
   Label L, C;
 
   if (IsMipsArchVariant(kMips32r1) || IsMipsArchVariant(kLoongson)) return;
@@ -866,11 +867,10 @@
   assm.GetCode(isolate, &desc);
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
-  F3 f = FUNCTION_CAST<F3>(code->entry());
+  auto f = GeneratedCode<F3>::FromCode(*code);
   t.a = 2.147483646e+09;       // 0x7FFFFFFE -> 0xFF80000041DFFFFF as double.
-  t.b_word = 0x0ff00ff0;       // 0x0FF00FF0 -> 0x as double.
-  Object* dummy = CALL_GENERATED_CODE(isolate, f, &t, 0, 0, 0, 0);
-  USE(dummy);
+  t.b_word = 0x0FF00FF0;       // 0x0FF00FF0 -> 0x as double.
+  f.Call(&t, 0, 0, 0, 0);
   CHECK_EQ(static_cast<int32_t>(0x41DFFFFF), t.dbl_exp);
   CHECK_EQ(static_cast<int32_t>(0xFF800000), t.dbl_mant);
   CHECK_EQ(static_cast<int32_t>(0x7FFFFFFE), t.word);
@@ -909,7 +909,7 @@
   } T;
   T t;
 
-  Assembler assm(isolate, NULL, 0);
+  Assembler assm(isolate, nullptr, 0);
 
   // Test all combinations of LWL and vAddr.
   __ lw(t0, MemOperand(a0, offsetof(T, reg_init)) );
@@ -994,53 +994,52 @@
   assm.GetCode(isolate, &desc);
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
-  F3 f = FUNCTION_CAST<F3>(code->entry());
-  t.reg_init = 0xaabbccdd;
+  auto f = GeneratedCode<F3>::FromCode(*code);
+  t.reg_init = 0xAABBCCDD;
   t.mem_init = 0x11223344;
 
-  Object* dummy = CALL_GENERATED_CODE(isolate, f, &t, 0, 0, 0, 0);
-  USE(dummy);
+  f.Call(&t, 0, 0, 0, 0);
 
 #if __BYTE_ORDER == __LITTLE_ENDIAN
-  CHECK_EQ(static_cast<int32_t>(0x44bbccdd), t.lwl_0);
-  CHECK_EQ(static_cast<int32_t>(0x3344ccdd), t.lwl_1);
-  CHECK_EQ(static_cast<int32_t>(0x223344dd), t.lwl_2);
+  CHECK_EQ(static_cast<int32_t>(0x44BBCCDD), t.lwl_0);
+  CHECK_EQ(static_cast<int32_t>(0x3344CCDD), t.lwl_1);
+  CHECK_EQ(static_cast<int32_t>(0x223344DD), t.lwl_2);
   CHECK_EQ(static_cast<int32_t>(0x11223344), t.lwl_3);
 
   CHECK_EQ(static_cast<int32_t>(0x11223344), t.lwr_0);
-  CHECK_EQ(static_cast<int32_t>(0xaa112233), t.lwr_1);
-  CHECK_EQ(static_cast<int32_t>(0xaabb1122), t.lwr_2);
-  CHECK_EQ(static_cast<int32_t>(0xaabbcc11), t.lwr_3);
+  CHECK_EQ(static_cast<int32_t>(0xAA112233), t.lwr_1);
+  CHECK_EQ(static_cast<int32_t>(0xAABB1122), t.lwr_2);
+  CHECK_EQ(static_cast<int32_t>(0xAABBCC11), t.lwr_3);
 
-  CHECK_EQ(static_cast<int32_t>(0x112233aa), t.swl_0);
-  CHECK_EQ(static_cast<int32_t>(0x1122aabb), t.swl_1);
-  CHECK_EQ(static_cast<int32_t>(0x11aabbcc), t.swl_2);
-  CHECK_EQ(static_cast<int32_t>(0xaabbccdd), t.swl_3);
+  CHECK_EQ(static_cast<int32_t>(0x112233AA), t.swl_0);
+  CHECK_EQ(static_cast<int32_t>(0x1122AABB), t.swl_1);
+  CHECK_EQ(static_cast<int32_t>(0x11AABBCC), t.swl_2);
+  CHECK_EQ(static_cast<int32_t>(0xAABBCCDD), t.swl_3);
 
-  CHECK_EQ(static_cast<int32_t>(0xaabbccdd), t.swr_0);
-  CHECK_EQ(static_cast<int32_t>(0xbbccdd44), t.swr_1);
-  CHECK_EQ(static_cast<int32_t>(0xccdd3344), t.swr_2);
-  CHECK_EQ(static_cast<int32_t>(0xdd223344), t.swr_3);
+  CHECK_EQ(static_cast<int32_t>(0xAABBCCDD), t.swr_0);
+  CHECK_EQ(static_cast<int32_t>(0xBBCCDD44), t.swr_1);
+  CHECK_EQ(static_cast<int32_t>(0xCCDD3344), t.swr_2);
+  CHECK_EQ(static_cast<int32_t>(0xDD223344), t.swr_3);
 #elif __BYTE_ORDER == __BIG_ENDIAN
   CHECK_EQ(static_cast<int32_t>(0x11223344), t.lwl_0);
-  CHECK_EQ(static_cast<int32_t>(0x223344dd), t.lwl_1);
-  CHECK_EQ(static_cast<int32_t>(0x3344ccdd), t.lwl_2);
-  CHECK_EQ(static_cast<int32_t>(0x44bbccdd), t.lwl_3);
+  CHECK_EQ(static_cast<int32_t>(0x223344DD), t.lwl_1);
+  CHECK_EQ(static_cast<int32_t>(0x3344CCDD), t.lwl_2);
+  CHECK_EQ(static_cast<int32_t>(0x44BBCCDD), t.lwl_3);
 
-  CHECK_EQ(static_cast<int32_t>(0xaabbcc11), t.lwr_0);
-  CHECK_EQ(static_cast<int32_t>(0xaabb1122), t.lwr_1);
-  CHECK_EQ(static_cast<int32_t>(0xaa112233), t.lwr_2);
+  CHECK_EQ(static_cast<int32_t>(0xAABBCC11), t.lwr_0);
+  CHECK_EQ(static_cast<int32_t>(0xAABB1122), t.lwr_1);
+  CHECK_EQ(static_cast<int32_t>(0xAA112233), t.lwr_2);
   CHECK_EQ(static_cast<int32_t>(0x11223344), t.lwr_3);
 
-  CHECK_EQ(static_cast<int32_t>(0xaabbccdd), t.swl_0);
-  CHECK_EQ(static_cast<int32_t>(0x11aabbcc), t.swl_1);
-  CHECK_EQ(static_cast<int32_t>(0x1122aabb), t.swl_2);
-  CHECK_EQ(static_cast<int32_t>(0x112233aa), t.swl_3);
+  CHECK_EQ(static_cast<int32_t>(0xAABBCCDD), t.swl_0);
+  CHECK_EQ(static_cast<int32_t>(0x11AABBCC), t.swl_1);
+  CHECK_EQ(static_cast<int32_t>(0x1122AABB), t.swl_2);
+  CHECK_EQ(static_cast<int32_t>(0x112233AA), t.swl_3);
 
-  CHECK_EQ(static_cast<int32_t>(0xdd223344), t.swr_0);
-  CHECK_EQ(static_cast<int32_t>(0xccdd3344), t.swr_1);
-  CHECK_EQ(static_cast<int32_t>(0xbbccdd44), t.swr_2);
-  CHECK_EQ(static_cast<int32_t>(0xaabbccdd), t.swr_3);
+  CHECK_EQ(static_cast<int32_t>(0xDD223344), t.swr_0);
+  CHECK_EQ(static_cast<int32_t>(0xCCDD3344), t.swr_1);
+  CHECK_EQ(static_cast<int32_t>(0xBBCCDD44), t.swr_2);
+  CHECK_EQ(static_cast<int32_t>(0xAABBCCDD), t.swr_3);
 #else
 #error Unknown endianness
 #endif
@@ -1062,7 +1061,8 @@
   } T;
   T t;
 
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
 
   __ mov(t6, fp);  // Save frame pointer.
   __ mov(fp, a0);  // Access struct T by fp.
@@ -1120,7 +1120,7 @@
   assm.GetCode(isolate, &desc);
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
-  F3 f = FUNCTION_CAST<F3>(code->entry());
+  auto f = GeneratedCode<F3>::FromCode(*code);
   t.x = 1;
   t.y = 2;
   t.y1 = 3;
@@ -1128,8 +1128,7 @@
   t.y3 = 0XBABA;
   t.y4 = 0xDEDA;
 
-  Object* dummy = CALL_GENERATED_CODE(isolate, f, &t, 0, 0, 0, 0);
-  USE(dummy);
+  f.Call(&t, 0, 0, 0, 0);
 
   CHECK_EQ(3, t.y1);
 }
@@ -1151,7 +1150,8 @@
   } T;
   T t;
 
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
 
   __ sw(t0, MemOperand(a0, offsetof(T, cvt_small_in)));
   __ Cvt_d_uw(f10, t0, f4);
@@ -1174,13 +1174,12 @@
   assm.GetCode(isolate, &desc);
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
-  F3 f = FUNCTION_CAST<F3>(code->entry());
+  auto f = GeneratedCode<F3>::FromCode(*code);
 
   t.cvt_big_in = 0xFFFFFFFF;
   t.cvt_small_in  = 333;
 
-  Object* dummy = CALL_GENERATED_CODE(isolate, f, &t, 0, 0, 0, 0);
-  USE(dummy);
+  f.Call(&t, 0, 0, 0, 0);
 
   CHECK_EQ(t.cvt_big_out, static_cast<double>(t.cvt_big_in));
   CHECK_EQ(t.cvt_small_out, static_cast<double>(t.cvt_small_in));
@@ -1229,7 +1228,8 @@
 
 #undef ROUND_STRUCT_ELEMENT
 
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
 
   // Save FCSR.
   __ cfc1(a1, FCSR);
@@ -1295,7 +1295,7 @@
   assm.GetCode(isolate, &desc);
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
-  F3 f = FUNCTION_CAST<F3>(code->entry());
+  auto f = GeneratedCode<F3>::FromCode(*code);
 
   t.round_up_in = 123.51;
   t.round_down_in = 123.49;
@@ -1306,8 +1306,7 @@
   t.err3_in = static_cast<double>(1) + 0xFFFFFFFF;
   t.err4_in = NAN;
 
-  Object* dummy = CALL_GENERATED_CODE(isolate, f, &t, 0, 0, 0, 0);
-  USE(dummy);
+  f.Call(&t, 0, 0, 0, 0);
 
 #define GET_FPU_ERR(x) (static_cast<int>(x & kFCSRFlagMask))
 #define CHECK_NAN2008(x) (x & kFCSRNaN2008FlagMask)
@@ -1335,7 +1334,7 @@
   CcTest::InitializeVM();
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
-  Assembler assm(isolate, NULL, 0);
+  Assembler assm(isolate, nullptr, 0);
 
   Label target;
   __ beq(v0, v1, &target);
@@ -1353,7 +1352,7 @@
     CcTest::InitializeVM();
     Isolate* isolate = CcTest::i_isolate();
     HandleScope scope(isolate);
-    MacroAssembler assm(isolate, NULL, 0,
+    MacroAssembler assm(isolate, nullptr, 0,
                         v8::internal::CodeObjectRequired::kYes);
 
     typedef struct test {
@@ -1401,9 +1400,9 @@
     assm.GetCode(isolate, &desc);
     Handle<Code> code =
         isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
-    F3 f = FUNCTION_CAST<F3>(code->entry());
+    auto f = GeneratedCode<F3>::FromCode(*code);
 
-    (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+    (f.Call(&test, 0, 0, 0, 0));
 
     CHECK_EQ(1, test.a);
     CHECK_EQ(0, test.b);
@@ -1431,7 +1430,7 @@
         test.f = tests_D[j];
         test.i = inputs_S[i];
         test.j = tests_S[j];
-        (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+        (f.Call(&test, 0, 0, 0, 0));
         CHECK_EQ(outputs_D[i], test.g);
         CHECK_EQ(0, test.h);
         CHECK_EQ(outputs_S[i], test.k);
@@ -1439,7 +1438,7 @@
 
         test.f = tests_D[j+1];
         test.j = tests_S[j+1];
-        (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+        (f.Call(&test, 0, 0, 0, 0));
         CHECK_EQ(0, test.g);
         CHECK_EQ(outputs_D[i], test.h);
         CHECK_EQ(0, test.k);
@@ -1516,14 +1515,14 @@
     assm.GetCode(isolate, &desc);
     Handle<Code> code =
         isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
-    F3 f = FUNCTION_CAST<F3>(code->entry());
+    auto f = GeneratedCode<F3>::FromCode(*code);
     for (int i = 0; i < kTableLength; i++) {
       test.a = inputsa[i];
       test.b = inputsb[i];
       test.e = inputse[i];
       test.f = inputsf[i];
 
-      CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0);
+      f.Call(&test, 0, 0, 0, 0);
 
       CHECK_EQ(0, memcmp(&test.c, &outputsdmin[i], sizeof(test.c)));
       CHECK_EQ(0, memcmp(&test.d, &outputsdmax[i], sizeof(test.d)));
@@ -1540,7 +1539,7 @@
     CcTest::InitializeVM();
     Isolate* isolate = CcTest::i_isolate();
     HandleScope scope(isolate);
-    MacroAssembler assm(isolate, NULL, 0,
+    MacroAssembler assm(isolate, nullptr, 0,
                         v8::internal::CodeObjectRequired::kYes);
 
     typedef struct test_float {
@@ -1627,13 +1626,13 @@
     assm.GetCode(isolate, &desc);
     Handle<Code> code =
         isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
-    F3 f = FUNCTION_CAST<F3>(code->entry());
+    auto f = GeneratedCode<F3>::FromCode(*code);
 
     for (int j = 0; j < 4; j++) {
       test.fcsr = fcsr_inputs[j];
       for (int i = 0; i < kTableLength; i++) {
         test.a = inputs[i];
-        (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+        (f.Call(&test, 0, 0, 0, 0));
         CHECK_EQ(test.b, outputs[j][i]);
       }
     }
@@ -1646,7 +1645,7 @@
     CcTest::InitializeVM();
     Isolate* isolate = CcTest::i_isolate();
     HandleScope scope(isolate);
-    MacroAssembler assm(isolate, NULL, 0,
+    MacroAssembler assm(isolate, nullptr, 0,
                         v8::internal::CodeObjectRequired::kYes);
 
     typedef struct test {
@@ -1675,7 +1674,7 @@
     assm.GetCode(isolate, &desc);
     Handle<Code> code =
         isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
-    F3 f = FUNCTION_CAST<F3>(code->entry());
+    auto f = GeneratedCode<F3>::FromCode(*code);
 
     const int test_size = 3;
     const int input_size = 5;
@@ -1700,13 +1699,13 @@
         test.ft = inputs_ft[i];
         test.fd = tests_S[j];
         test.fs = inputs_fs[i];
-        (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+        (f.Call(&test, 0, 0, 0, 0));
         CHECK_EQ(test.dd, inputs_ds[i]);
         CHECK_EQ(test.fd, inputs_fs[i]);
 
         test.dd = tests_D[j+1];
         test.fd = tests_S[j+1];
-        (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+        (f.Call(&test, 0, 0, 0, 0));
         CHECK_EQ(test.dd, inputs_dt[i]);
         CHECK_EQ(test.fd, inputs_ft[i]);
       }
@@ -1721,7 +1720,7 @@
     CcTest::InitializeVM();
     Isolate* isolate = CcTest::i_isolate();
     HandleScope scope(isolate);
-    MacroAssembler assm(isolate, NULL, 0,
+    MacroAssembler assm(isolate, nullptr, 0,
                         v8::internal::CodeObjectRequired::kYes);
 
     typedef struct test_float {
@@ -1808,13 +1807,13 @@
     assm.GetCode(isolate, &desc);
     Handle<Code> code =
         isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
-    F3 f = FUNCTION_CAST<F3>(code->entry());
+    auto f = GeneratedCode<F3>::FromCode(*code);
 
     for (int j = 0; j < 4; j++) {
       test.fcsr = fcsr_inputs[j];
       for (int i = 0; i < kTableLength; i++) {
         test.a = inputs[i];
-        (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+        (f.Call(&test, 0, 0, 0, 0));
         CHECK_EQ(test.b, outputs[j][i]);
       }
     }
@@ -1826,7 +1825,7 @@
   CcTest::InitializeVM();
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
-  MacroAssembler assm(isolate, NULL, 0,
+  MacroAssembler assm(isolate, nullptr, 0,
                       v8::internal::CodeObjectRequired::kYes);
 
   typedef struct test_struct {
@@ -1834,14 +1833,10 @@
     uint64_t output;
   } TestStruct;
 
-  unsigned inputs[] = {
-    0x0, 0xffffffff, 0x80000000, 0x7fffffff
-  };
+  unsigned inputs[] = {0x0, 0xFFFFFFFF, 0x80000000, 0x7FFFFFFF};
 
-  uint64_t outputs[] = {
-    0x0, 0x41efffffffe00000,
-    0x41e0000000000000, 0x41dfffffffc00000
-  };
+  uint64_t outputs[] = {0x0, 0x41EFFFFFFFE00000, 0x41E0000000000000,
+                        0x41DFFFFFFFC00000};
 
   int kTableLength = sizeof(inputs)/sizeof(inputs[0]);
 
@@ -1857,10 +1852,10 @@
   assm.GetCode(isolate, &desc);
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
-  F3 f = FUNCTION_CAST<F3>(code->entry());
+  auto f = GeneratedCode<F3>::FromCode(*code);
   for (int i = 0; i < kTableLength; i++) {
     test.input = inputs[i];
-    (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+    (f.Call(&test, 0, 0, 0, 0));
     // Check outputs
     CHECK_EQ(test.output, outputs[i]);
   }
@@ -1939,13 +1934,13 @@
     assm.GetCode(isolate, &desc);
     Handle<Code> code =
         isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
-    F3 f = FUNCTION_CAST<F3>(code->entry());
+    auto f = GeneratedCode<F3>::FromCode(*code);
     for (int i = 0; i < kTableLength; i++) {
       test.a = inputsa[i];
       test.b = inputsb[i];
       test.c = inputsc[i];
       test.d = inputsd[i];
-      (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+      (f.Call(&test, 0, 0, 0, 0));
       if (i < kTableLength - 1) {
         CHECK_EQ(test.resd, resd[i]);
         CHECK_EQ(test.resf, resf[i]);
@@ -1968,7 +1963,7 @@
     CcTest::InitializeVM();
     Isolate* isolate = CcTest::i_isolate();
     HandleScope scope(isolate);
-    MacroAssembler assm(isolate, NULL, 0,
+    MacroAssembler assm(isolate, nullptr, 0,
                         v8::internal::CodeObjectRequired::kYes);
     const double dFPU64InvalidResult = static_cast<double>(kFPU64InvalidResult);
     typedef struct test_float {
@@ -2020,11 +2015,11 @@
     assm.GetCode(isolate, &desc);
     Handle<Code> code =
         isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
-    F3 f = FUNCTION_CAST<F3>(code->entry());
+    auto f = GeneratedCode<F3>::FromCode(*code);
     for (int i = 0; i < kTableLength; i++) {
       test.a = inputs_D[i];
       test.b = inputs_S[i];
-      (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+      (f.Call(&test, 0, 0, 0, 0));
       if ((test.isNaN2008 & kFCSRNaN2008FlagMask) &&
               kArchVariant == kMips32r6) {
         CHECK_EQ(test.c, outputsNaN2008[i]);
@@ -2043,7 +2038,7 @@
     CcTest::InitializeVM();
     Isolate* isolate = CcTest::i_isolate();
     HandleScope scope(isolate);
-    MacroAssembler assm(isolate, NULL, 0,
+    MacroAssembler assm(isolate, nullptr, 0,
                         v8::internal::CodeObjectRequired::kYes);
 
     typedef struct test_float {
@@ -2101,20 +2096,20 @@
     assm.GetCode(isolate, &desc);
     Handle<Code> code =
         isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
-    F3 f = FUNCTION_CAST<F3>(code->entry());
+    auto f = GeneratedCode<F3>::FromCode(*code);
     for (int i = 0; i < kTableLength; i++) {
       test.a = inputs_D[i];
       test.c = inputs_S[i];
 
       test.rt = 1;
-      (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+      (f.Call(&test, 0, 0, 0, 0));
       CHECK_EQ(test.b, test.bold);
       CHECK_EQ(test.d, test.dold);
       CHECK_EQ(test.b1, outputs_D[i]);
       CHECK_EQ(test.d1, outputs_S[i]);
 
       test.rt = 0;
-      (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+      (f.Call(&test, 0, 0, 0, 0));
       CHECK_EQ(test.b, outputs_D[i]);
       CHECK_EQ(test.d, outputs_S[i]);
       CHECK_EQ(test.b1, test.bold1);
@@ -2173,7 +2168,7 @@
           test.fcsr = 1 << (24+condition_flags[j]);
         }
         HandleScope scope(isolate);
-        MacroAssembler assm(isolate, NULL, 0,
+        MacroAssembler assm(isolate, nullptr, 0,
                             v8::internal::CodeObjectRequired::kYes);
         __ Ldc1(f2, MemOperand(a0, offsetof(TestFloat, srcd)));
         __ lwc1(f4, MemOperand(a0, offsetof(TestFloat, srcf)) );
@@ -2203,15 +2198,15 @@
         assm.GetCode(isolate, &desc);
         Handle<Code> code =
             isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
-        F3 f = FUNCTION_CAST<F3>(code->entry());
+        auto f = GeneratedCode<F3>::FromCode(*code);
 
-        (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+        (f.Call(&test, 0, 0, 0, 0));
         CHECK_EQ(test.dstf, outputs_S[i]);
         CHECK_EQ(test.dstd, outputs_D[i]);
         CHECK_EQ(test.dstf1, test.dstfold1);
         CHECK_EQ(test.dstd1, test.dstdold1);
         test.fcsr = 0;
-        (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+        (f.Call(&test, 0, 0, 0, 0));
         CHECK_EQ(test.dstf, test.dstfold);
         CHECK_EQ(test.dstd, test.dstdold);
         CHECK_EQ(test.dstf1, outputs_S[i]);
@@ -2227,7 +2222,8 @@
   CcTest::InitializeVM();
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
 
   typedef struct test_float {
     double a;
@@ -2288,12 +2284,12 @@
   assm.GetCode(isolate, &desc);
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
-  F3 f = FUNCTION_CAST<F3>(code->entry());
+  auto f = GeneratedCode<F3>::FromCode(*code);
   for (int j = 0; j < 4; j++) {
     test.fcsr = fcsr_inputs[j];
     for (int i = 0; i < kTableLength; i++) {
       test.a = inputs[i];
-      (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+      (f.Call(&test, 0, 0, 0, 0));
       CHECK_EQ(test.b, outputs[j][i]);
     }
   }
@@ -2304,7 +2300,8 @@
   CcTest::InitializeVM();
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
 
   typedef struct test_float {
     uint32_t isNaN2008;
@@ -2355,11 +2352,11 @@
   assm.GetCode(isolate, &desc);
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
-  F3 f = FUNCTION_CAST<F3>(code->entry());
+  auto f = GeneratedCode<F3>::FromCode(*code);
   for (int i = 0; i < kTableLength; i++) {
     test.a = inputs_D[i];
     test.b = inputs_S[i];
-    (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+    (f.Call(&test, 0, 0, 0, 0));
     if ((test.isNaN2008 & kFCSRNaN2008FlagMask) && kArchVariant == kMips32r6) {
       CHECK_EQ(test.c, outputsNaN2008[i]);
     } else {
@@ -2374,7 +2371,8 @@
   CcTest::InitializeVM();
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
 
   typedef struct test_float {
     uint32_t isNaN2008;
@@ -2424,11 +2422,11 @@
   assm.GetCode(isolate, &desc);
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
-  F3 f = FUNCTION_CAST<F3>(code->entry());
+  auto f = GeneratedCode<F3>::FromCode(*code);
   for (int i = 0; i < kTableLength; i++) {
     test.a = inputs_D[i];
     test.b = inputs_S[i];
-    (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+    (f.Call(&test, 0, 0, 0, 0));
     if ((test.isNaN2008 & kFCSRNaN2008FlagMask) && kArchVariant == kMips32r6) {
       CHECK_EQ(test.c, outputsNaN2008[i]);
     } else {
@@ -2444,7 +2442,7 @@
     CcTest::InitializeVM();
     Isolate* isolate = CcTest::i_isolate();
     HandleScope scope(isolate);
-    MacroAssembler assm(isolate, NULL, 0,
+    MacroAssembler assm(isolate, nullptr, 0,
                         v8::internal::CodeObjectRequired::kYes);
     const double dFPU64InvalidResult = static_cast<double>(kFPU64InvalidResult);
     typedef struct test_float {
@@ -2496,11 +2494,11 @@
     assm.GetCode(isolate, &desc);
     Handle<Code> code =
         isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
-    F3 f = FUNCTION_CAST<F3>(code->entry());
+    auto f = GeneratedCode<F3>::FromCode(*code);
     for (int i = 0; i < kTableLength; i++) {
       test.a = inputs_D[i];
       test.b = inputs_S[i];
-      (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+      (f.Call(&test, 0, 0, 0, 0));
       if ((test.isNaN2008 & kFCSRNaN2008FlagMask) &&
               kArchVariant == kMips32r6) {
         CHECK_EQ(test.c, outputsNaN2008[i]);
@@ -2518,7 +2516,8 @@
   CcTest::InitializeVM();
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
 
   typedef struct test_float {
     float a;
@@ -2569,13 +2568,13 @@
   assm.GetCode(isolate, &desc);
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
-  F3 f = FUNCTION_CAST<F3>(code->entry());
+  auto f = GeneratedCode<F3>::FromCode(*code);
   for (int i = 0; i < kTableLength; i++) {
     test.a = inputfs_S[i];
     test.b = inputft_S[i];
     test.c = inputfs_D[i];
     test.d = inputft_D[i];
-    (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+    (f.Call(&test, 0, 0, 0, 0));
     CHECK_EQ(test.resultS, outputs_S[i]);
     CHECK_EQ(test.resultD, outputs_D[i]);
   }
@@ -2591,7 +2590,8 @@
   CcTest::InitializeVM();
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
 
   typedef struct test_float {
     float a;
@@ -2648,7 +2648,7 @@
   assm.GetCode(isolate, &desc);
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
-  F3 f = FUNCTION_CAST<F3>(code->entry());
+  auto f = GeneratedCode<F3>::FromCode(*code);
 
   for (int i = 0; i < kTableLength; i++) {
     float f1;
@@ -2656,7 +2656,7 @@
     test.a = inputs_S[i];
     test.c = inputs_D[i];
 
-    (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+    (f.Call(&test, 0, 0, 0, 0));
 
     CHECK_EQ(test.resultS, outputs_S[i]);
     CHECK_EQ(test.resultD, outputs_D[i]);
@@ -2691,7 +2691,8 @@
   CcTest::InitializeVM();
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
 
   typedef struct test_float {
     float a;
@@ -2728,11 +2729,11 @@
   assm.GetCode(isolate, &desc);
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
-  F3 f = FUNCTION_CAST<F3>(code->entry());
+  auto f = GeneratedCode<F3>::FromCode(*code);
   for (int i = 0; i < kTableLength; i++) {
     test.a = inputs_S[i];
     test.c = inputs_D[i];
-    (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+    (f.Call(&test, 0, 0, 0, 0));
     CHECK_EQ(test.resultS, outputs_S[i]);
     CHECK_EQ(test.resultD, outputs_D[i]);
   }
@@ -2744,7 +2745,8 @@
   CcTest::InitializeVM();
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
 
   typedef struct test_float {
     float a;
@@ -2785,13 +2787,13 @@
   assm.GetCode(isolate, &desc);
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
-  F3 f = FUNCTION_CAST<F3>(code->entry());
+  auto f = GeneratedCode<F3>::FromCode(*code);
   for (int i = 0; i < kTableLength; i++) {
     test.a = inputfs_S[i];
     test.b = inputft_S[i];
     test.c = inputfs_D[i];
     test.d = inputft_D[i];
-    (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+    (f.Call(&test, 0, 0, 0, 0));
     CHECK_EQ(test.resultS, inputfs_S[i]*inputft_S[i]);
     CHECK_EQ(test.resultD, inputfs_D[i]*inputft_D[i]);
   }
@@ -2803,7 +2805,8 @@
   CcTest::InitializeVM();
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
 
   typedef struct test_float {
     double a;
@@ -2841,12 +2844,12 @@
   assm.GetCode(isolate, &desc);
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
-  F3 f = FUNCTION_CAST<F3>(code->entry());
+  auto f = GeneratedCode<F3>::FromCode(*code);
   for (int i = 0; i < kTableLength; i++) {
     test.a = inputs_D[i];
     test.c = inputs_S[i];
 
-    (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+    (f.Call(&test, 0, 0, 0, 0));
     CHECK_EQ(test.b, outputs_D[i]);
     CHECK_EQ(test.d, outputs_S[i]);
   }
@@ -2857,7 +2860,8 @@
   CcTest::InitializeVM();
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
 
   typedef struct test_float {
     uint32_t isNaN2008;
@@ -2908,11 +2912,11 @@
   assm.GetCode(isolate, &desc);
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
-  F3 f = FUNCTION_CAST<F3>(code->entry());
+  auto f = GeneratedCode<F3>::FromCode(*code);
   for (int i = 0; i < kTableLength; i++) {
     test.a = inputs_D[i];
     test.b = inputs_S[i];
-    (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+    (f.Call(&test, 0, 0, 0, 0));
     if ((test.isNaN2008 & kFCSRNaN2008FlagMask) && kArchVariant == kMips32r6) {
       CHECK_EQ(test.c, outputsNaN2008[i]);
     } else {
@@ -2928,7 +2932,7 @@
     CcTest::InitializeVM();
     Isolate* isolate = CcTest::i_isolate();
     HandleScope scope(isolate);
-    MacroAssembler assm(isolate, NULL, 0,
+    MacroAssembler assm(isolate, nullptr, 0,
                         v8::internal::CodeObjectRequired::kYes);
     const double dFPU64InvalidResult = static_cast<double>(kFPU64InvalidResult);
     typedef struct test_float {
@@ -2980,11 +2984,11 @@
     assm.GetCode(isolate, &desc);
     Handle<Code> code =
         isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
-    F3 f = FUNCTION_CAST<F3>(code->entry());
+    auto f = GeneratedCode<F3>::FromCode(*code);
     for (int i = 0; i < kTableLength; i++) {
       test.a = inputs_D[i];
       test.b = inputs_S[i];
-      (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+      (f.Call(&test, 0, 0, 0, 0));
       if ((test.isNaN2008 & kFCSRNaN2008FlagMask) &&
               kArchVariant == kMips32r6) {
         CHECK_EQ(test.c, outputsNaN2008[i]);
@@ -3001,7 +3005,8 @@
   CcTest::InitializeVM();
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
 
   typedef struct test_float {
     uint32_t isNaN2008;
@@ -3052,11 +3057,11 @@
   assm.GetCode(isolate, &desc);
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
-  F3 f = FUNCTION_CAST<F3>(code->entry());
+  auto f = GeneratedCode<F3>::FromCode(*code);
   for (int i = 0; i < kTableLength; i++) {
     test.a = inputs_D[i];
     test.b = inputs_S[i];
-    (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+    (f.Call(&test, 0, 0, 0, 0));
     if ((test.isNaN2008 & kFCSRNaN2008FlagMask) && kArchVariant == kMips32r6) {
       CHECK_EQ(test.c, outputsNaN2008[i]);
     } else {
@@ -3072,7 +3077,7 @@
     CcTest::InitializeVM();
     Isolate* isolate = CcTest::i_isolate();
     HandleScope scope(isolate);
-    MacroAssembler assm(isolate, NULL, 0,
+    MacroAssembler assm(isolate, nullptr, 0,
                         v8::internal::CodeObjectRequired::kYes);
     const double dFPU64InvalidResult = static_cast<double>(kFPU64InvalidResult);
     typedef struct test_float {
@@ -3124,11 +3129,11 @@
     assm.GetCode(isolate, &desc);
     Handle<Code> code =
         isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
-    F3 f = FUNCTION_CAST<F3>(code->entry());
+    auto f = GeneratedCode<F3>::FromCode(*code);
     for (int i = 0; i < kTableLength; i++) {
       test.a = inputs_D[i];
       test.b = inputs_S[i];
-      (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+      (f.Call(&test, 0, 0, 0, 0));
       if ((test.isNaN2008 & kFCSRNaN2008FlagMask) &&
               kArchVariant == kMips32r6) {
         CHECK_EQ(test.c, outputsNaN2008[i]);
@@ -3178,8 +3183,8 @@
 
   for (int i = 0; i < kNumCases; ++i) {
     __ bind(&labels[i]);
-    __ lui(v0, (values[i] >> 16) & 0xffff);
-    __ ori(v0, v0, values[i] & 0xffff);
+    __ lui(v0, (values[i] >> 16) & 0xFFFF);
+    __ ori(v0, v0, values[i] & 0xFFFF);
     __ b(&done);
     __ nop();
   }
@@ -3199,10 +3204,9 @@
 #ifdef OBJECT_PRINT
   code->Print(std::cout);
 #endif
-  F1 f = FUNCTION_CAST<F1>(code->entry());
+  auto f = GeneratedCode<F1>::FromCode(*code);
   for (int i = 0; i < kNumCases; ++i) {
-    int res = reinterpret_cast<int>(
-        CALL_GENERATED_CODE(isolate, f, i, 0, 0, 0, 0));
+    int res = reinterpret_cast<int>(f.Call(i, 0, 0, 0, 0));
     ::printf("f(%d) = %d\n", i, res);
     CHECK_EQ(values[i], res);
   }
@@ -3230,8 +3234,8 @@
 
   for (int i = 0; i < kNumCases; ++i) {
     __ bind(&labels[i]);
-    __ lui(v0, (values[i] >> 16) & 0xffff);
-    __ ori(v0, v0, values[i] & 0xffff);
+    __ lui(v0, (values[i] >> 16) & 0xFFFF);
+    __ ori(v0, v0, values[i] & 0xFFFF);
     __ b(&done);
     __ nop();
   }
@@ -3269,10 +3273,9 @@
 #ifdef OBJECT_PRINT
   code->Print(std::cout);
 #endif
-  F1 f = FUNCTION_CAST<F1>(code->entry());
+  auto f = GeneratedCode<F1>::FromCode(*code);
   for (int i = 0; i < kNumCases; ++i) {
-    int res = reinterpret_cast<int>(
-        CALL_GENERATED_CODE(isolate, f, i, 0, 0, 0, 0));
+    int res = reinterpret_cast<int>(f.Call(i, 0, 0, 0, 0));
     ::printf("f(%d) = %d\n", i, res);
     CHECK_EQ(values[i], res);
   }
@@ -3307,8 +3310,8 @@
     __ bind(&labels[i]);
     obj = *values[i];
     imm32 = reinterpret_cast<intptr_t>(obj);
-    __ lui(v0, (imm32 >> 16) & 0xffff);
-    __ ori(v0, v0, imm32 & 0xffff);
+    __ lui(v0, (imm32 >> 16) & 0xFFFF);
+    __ ori(v0, v0, imm32 & 0xFFFF);
     __ b(&done);
     __ nop();
   }
@@ -3346,10 +3349,9 @@
 #ifdef OBJECT_PRINT
   code->Print(std::cout);
 #endif
-  F1 f = FUNCTION_CAST<F1>(code->entry());
+  auto f = GeneratedCode<F1>::FromCode(*code);
   for (int i = 0; i < kNumCases; ++i) {
-    Handle<Object> result(
-        CALL_GENERATED_CODE(isolate, f, i, 0, 0, 0, 0), isolate);
+    Handle<Object> result(f.Call(i, 0, 0, 0, 0), isolate);
 #ifdef OBJECT_PRINT
     ::printf("f(%d) = ", i);
     result->Print(std::cout);
@@ -3375,7 +3377,7 @@
     } T;
     T t;
 
-    Assembler assm(isolate, NULL, 0);
+    Assembler assm(isolate, nullptr, 0);
 
     __ lw(a2, MemOperand(a0, offsetof(T, r1)));
     __ nop();
@@ -3394,11 +3396,10 @@
     assm.GetCode(isolate, &desc);
     Handle<Code> code =
         isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
-    F3 f = FUNCTION_CAST<F3>(code->entry());
+    auto f = GeneratedCode<F3>::FromCode(*code);
     t.r1 = 0x781A15C3;
     t.r2 = 0x8B71FCDE;
-    Object* dummy = CALL_GENERATED_CODE(isolate, f, &t, 0, 0, 0, 0);
-    USE(dummy);
+    f.Call(&t, 0, 0, 0, 0);
 
     CHECK_EQ(static_cast<int32_t>(0x1E58A8C3), t.r1);
     CHECK_EQ(static_cast<int32_t>(0xD18E3F7B), t.r2);
@@ -3438,7 +3439,7 @@
 
     // Create a function that accepts &t, and loads, manipulates, and stores
     // the doubles t.a ... t.f.
-    MacroAssembler assm(isolate, NULL, 0,
+    MacroAssembler assm(isolate, nullptr, 0,
                         v8::internal::CodeObjectRequired::kYes);
 
     __ Ldc1(f4, MemOperand(a0, offsetof(T, dSignalingNan)));
@@ -3529,7 +3530,7 @@
     assm.GetCode(isolate, &desc);
     Handle<Code> code =
         isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
-    F3 f = FUNCTION_CAST<F3>(code->entry());
+    auto f = GeneratedCode<F3>::FromCode(*code);
 
     t.dSignalingNan =  std::numeric_limits<double>::signaling_NaN();
     t.dQuietNan = std::numeric_limits<double>::quiet_NaN();
@@ -3554,8 +3555,7 @@
     t.fPosSubnorm   = FLT_MIN / 20.0;
     t.fPosZero      = +0.0;
 
-    Object* dummy = CALL_GENERATED_CODE(isolate, f, &t, 0, 0, 0, 0);
-    USE(dummy);
+    f.Call(&t, 0, 0, 0, 0);
     // Expected double results.
     CHECK_EQ(bit_cast<int64_t>(t.dSignalingNan), 0x001);
     CHECK_EQ(bit_cast<int64_t>(t.dQuietNan),     0x002);
@@ -3587,7 +3587,8 @@
   CcTest::InitializeVM();
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
 
   typedef struct test_float {
     int64_t fir;
@@ -3621,37 +3622,37 @@
   assm.GetCode(isolate, &desc);
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
-  F3 f = FUNCTION_CAST<F3>(code->entry());
+  auto f = GeneratedCode<F3>::FromCode(*code);
   test.a = -2.0;
   test.b = -2.0;
-  (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+  (f.Call(&test, 0, 0, 0, 0));
   CHECK_EQ(test.a, 2.0);
   CHECK_EQ(test.b, 2.0);
 
   test.a = 2.0;
   test.b = 2.0;
-  (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+  (f.Call(&test, 0, 0, 0, 0));
   CHECK_EQ(test.a, 2.0);
   CHECK_EQ(test.b, 2.0);
 
   // Testing biggest positive number
   test.a = std::numeric_limits<double>::max();
   test.b = std::numeric_limits<float>::max();
-  (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+  (f.Call(&test, 0, 0, 0, 0));
   CHECK_EQ(test.a, std::numeric_limits<double>::max());
   CHECK_EQ(test.b, std::numeric_limits<float>::max());
 
   // Testing smallest negative number
   test.a = -std::numeric_limits<double>::max();  // lowest()
   test.b = -std::numeric_limits<float>::max();   // lowest()
-  (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+  (f.Call(&test, 0, 0, 0, 0));
   CHECK_EQ(test.a, std::numeric_limits<double>::max());
   CHECK_EQ(test.b, std::numeric_limits<float>::max());
 
   // Testing smallest positive number
   test.a = -std::numeric_limits<double>::min();
   test.b = -std::numeric_limits<float>::min();
-  (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+  (f.Call(&test, 0, 0, 0, 0));
   CHECK_EQ(test.a, std::numeric_limits<double>::min());
   CHECK_EQ(test.b, std::numeric_limits<float>::min());
 
@@ -3660,7 +3661,7 @@
           / std::numeric_limits<double>::min();
   test.b = -std::numeric_limits<float>::max()
           / std::numeric_limits<float>::min();
-  (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+  (f.Call(&test, 0, 0, 0, 0));
   CHECK_EQ(test.a, std::numeric_limits<double>::max()
                  / std::numeric_limits<double>::min());
   CHECK_EQ(test.b, std::numeric_limits<float>::max()
@@ -3668,13 +3669,13 @@
 
   test.a = std::numeric_limits<double>::quiet_NaN();
   test.b = std::numeric_limits<float>::quiet_NaN();
-  (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+  (f.Call(&test, 0, 0, 0, 0));
   CHECK(std::isnan(test.a));
   CHECK(std::isnan(test.b));
 
   test.a = std::numeric_limits<double>::signaling_NaN();
   test.b = std::numeric_limits<float>::signaling_NaN();
-  (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+  (f.Call(&test, 0, 0, 0, 0));
   CHECK(std::isnan(test.a));
   CHECK(std::isnan(test.b));
 }
@@ -3684,7 +3685,8 @@
   CcTest::InitializeVM();
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
 
   typedef struct test_float {
     double a;
@@ -3714,12 +3716,12 @@
   assm.GetCode(isolate, &desc);
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
-  F3 f = FUNCTION_CAST<F3>(code->entry());
+  auto f = GeneratedCode<F3>::FromCode(*code);
   test.a = 2.0;
   test.b = 3.0;
   test.fa = 2.0;
   test.fb = 3.0;
-  (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+  (f.Call(&test, 0, 0, 0, 0));
   CHECK_EQ(test.c, 5.0);
   CHECK_EQ(test.fc, 5.0);
 
@@ -3727,7 +3729,7 @@
   test.b = -std::numeric_limits<double>::max();  // lowest()
   test.fa = std::numeric_limits<float>::max();
   test.fb = -std::numeric_limits<float>::max();  // lowest()
-  (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+  (f.Call(&test, 0, 0, 0, 0));
   CHECK_EQ(test.c, 0.0);
   CHECK_EQ(test.fc, 0.0);
 
@@ -3735,7 +3737,7 @@
   test.b = std::numeric_limits<double>::max();
   test.fa = std::numeric_limits<float>::max();
   test.fb = std::numeric_limits<float>::max();
-  (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+  (f.Call(&test, 0, 0, 0, 0));
   CHECK(!std::isfinite(test.c));
   CHECK(!std::isfinite(test.fc));
 
@@ -3743,7 +3745,7 @@
   test.b = std::numeric_limits<double>::signaling_NaN();
   test.fa = 5.0;
   test.fb = std::numeric_limits<float>::signaling_NaN();
-  (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+  (f.Call(&test, 0, 0, 0, 0));
   CHECK(std::isnan(test.c));
   CHECK(std::isnan(test.fc));
 }
@@ -3754,7 +3756,7 @@
     CcTest::InitializeVM();
     Isolate* isolate = CcTest::i_isolate();
     HandleScope scope(isolate);
-    MacroAssembler assm(isolate, NULL, 0,
+    MacroAssembler assm(isolate, nullptr, 0,
                         v8::internal::CodeObjectRequired::kYes);
 
     typedef struct test_float {
@@ -3869,12 +3871,12 @@
     assm.GetCode(isolate, &desc);
     Handle<Code> code =
         isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
-    F3 f = FUNCTION_CAST<F3>(code->entry());
+    auto f = GeneratedCode<F3>::FromCode(*code);
     test.dOp1 = 2.0;
     test.dOp2 = 3.0;
     test.fOp1 = 2.0;
     test.fOp2 = 3.0;
-    (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+    (f.Call(&test, 0, 0, 0, 0));
     CHECK_EQ(test.dF, 0U);
     CHECK_EQ(test.dUn, 0U);
     CHECK_EQ(test.dEq, 0U);
@@ -3896,7 +3898,7 @@
     test.dOp2 = std::numeric_limits<double>::min();
     test.fOp1 = std::numeric_limits<float>::min();
     test.fOp2 = -std::numeric_limits<float>::max();  // lowest()
-    (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+    (f.Call(&test, 0, 0, 0, 0));
     CHECK_EQ(test.dF, 0U);
     CHECK_EQ(test.dUn, 0U);
     CHECK_EQ(test.dEq, 0U);
@@ -3918,7 +3920,7 @@
     test.dOp2 = -std::numeric_limits<double>::max();  // lowest()
     test.fOp1 = std::numeric_limits<float>::max();
     test.fOp2 = std::numeric_limits<float>::max();
-    (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+    (f.Call(&test, 0, 0, 0, 0));
     CHECK_EQ(test.dF, 0U);
     CHECK_EQ(test.dUn, 0U);
     CHECK_EQ(test.dEq, 1U);
@@ -3940,7 +3942,7 @@
     test.dOp2 = 0.0;
     test.fOp1 = std::numeric_limits<float>::quiet_NaN();
     test.fOp2 = 0.0;
-    (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+    (f.Call(&test, 0, 0, 0, 0));
     CHECK_EQ(test.dF, 0U);
     CHECK_EQ(test.dUn, 1U);
     CHECK_EQ(test.dEq, 0U);
@@ -3966,7 +3968,7 @@
     CcTest::InitializeVM();
     Isolate* isolate = CcTest::i_isolate();
     HandleScope scope(isolate);
-    MacroAssembler assm(isolate, NULL, 0,
+    MacroAssembler assm(isolate, nullptr, 0,
                         v8::internal::CodeObjectRequired::kYes);
 
     typedef struct test_float {
@@ -4070,7 +4072,7 @@
     assm.GetCode(isolate, &desc);
     Handle<Code> code =
         isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
-    F3 f = FUNCTION_CAST<F3>(code->entry());
+    auto f = GeneratedCode<F3>::FromCode(*code);
     uint64_t dTrue  = 0xFFFFFFFFFFFFFFFF;
     uint64_t dFalse = 0x0000000000000000;
     uint32_t fTrue  = 0xFFFFFFFF;
@@ -4080,7 +4082,7 @@
     test.dOp2 = 3.0;
     test.fOp1 = 2.0;
     test.fOp2 = 3.0;
-    (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+    (f.Call(&test, 0, 0, 0, 0));
     CHECK_EQ(bit_cast<uint64_t>(test.dF), dFalse);
     CHECK_EQ(bit_cast<uint64_t>(test.dUn), dFalse);
     CHECK_EQ(bit_cast<uint64_t>(test.dEq), dFalse);
@@ -4105,7 +4107,7 @@
     test.dOp2 = std::numeric_limits<double>::min();
     test.fOp1 = std::numeric_limits<float>::min();
     test.fOp2 = -std::numeric_limits<float>::max();  // lowest()
-    (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+    (f.Call(&test, 0, 0, 0, 0));
     CHECK_EQ(bit_cast<uint64_t>(test.dF), dFalse);
     CHECK_EQ(bit_cast<uint64_t>(test.dUn), dFalse);
     CHECK_EQ(bit_cast<uint64_t>(test.dEq), dFalse);
@@ -4130,7 +4132,7 @@
     test.dOp2 = -std::numeric_limits<double>::max();  // lowest()
     test.fOp1 = std::numeric_limits<float>::max();
     test.fOp2 = std::numeric_limits<float>::max();
-    (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+    (f.Call(&test, 0, 0, 0, 0));
     CHECK_EQ(bit_cast<uint64_t>(test.dF), dFalse);
     CHECK_EQ(bit_cast<uint64_t>(test.dUn), dFalse);
     CHECK_EQ(bit_cast<uint64_t>(test.dEq), dTrue);
@@ -4155,7 +4157,7 @@
     test.dOp2 = 0.0;
     test.fOp1 = std::numeric_limits<float>::quiet_NaN();
     test.fOp2 = 0.0;
-    (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+    (f.Call(&test, 0, 0, 0, 0));
     CHECK_EQ(bit_cast<uint64_t>(test.dF), dFalse);
     CHECK_EQ(bit_cast<uint64_t>(test.dUn), dTrue);
     CHECK_EQ(bit_cast<uint64_t>(test.dEq), dFalse);
@@ -4183,7 +4185,8 @@
   CcTest::InitializeVM();
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
 
   typedef struct test_float {
     float    cvt_d_s_in;
@@ -4256,7 +4259,7 @@
   assm.GetCode(isolate, &desc);
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
-  F3 f = FUNCTION_CAST<F3>(code->entry());
+  auto f = GeneratedCode<F3>::FromCode(*code);
 
   test.cvt_d_s_in = -0.51;
   test.cvt_d_w_in = -1;
@@ -4269,7 +4272,7 @@
   test.cvt_w_s_in = -0.51;
   test.cvt_w_d_in = -0.51;
 
-  (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+  (f.Call(&test, 0, 0, 0, 0));
   CHECK_EQ(test.cvt_d_s_out, static_cast<double>(test.cvt_d_s_in));
   CHECK_EQ(test.cvt_d_w_out, static_cast<double>(test.cvt_d_w_in));
   if ((IsMipsArchVariant(kMips32r2) || IsMipsArchVariant(kMips32r6)) &&
@@ -4300,7 +4303,7 @@
   test.cvt_w_s_in = 0.49;
   test.cvt_w_d_in = 0.49;
 
-  (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+  (f.Call(&test, 0, 0, 0, 0));
   CHECK_EQ(test.cvt_d_s_out, static_cast<double>(test.cvt_d_s_in));
   CHECK_EQ(test.cvt_d_w_out, static_cast<double>(test.cvt_d_w_in));
   if ((IsMipsArchVariant(kMips32r2) || IsMipsArchVariant(kMips32r6)) &&
@@ -4331,7 +4334,7 @@
   test.cvt_w_s_in = std::numeric_limits<float>::max();
   test.cvt_w_d_in = std::numeric_limits<double>::max();
 
-  (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+  (f.Call(&test, 0, 0, 0, 0));
   CHECK_EQ(test.cvt_d_s_out, static_cast<double>(test.cvt_d_s_in));
   CHECK_EQ(test.cvt_d_w_out, static_cast<double>(test.cvt_d_w_in));
   if ((IsMipsArchVariant(kMips32r2) || IsMipsArchVariant(kMips32r6)) &&
@@ -4363,7 +4366,7 @@
   test.cvt_w_s_in = -std::numeric_limits<float>::max();   // lowest()
   test.cvt_w_d_in = -std::numeric_limits<double>::max();  // lowest()
 
-  (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+  (f.Call(&test, 0, 0, 0, 0));
   CHECK_EQ(test.cvt_d_s_out, static_cast<double>(test.cvt_d_s_in));
   CHECK_EQ(test.cvt_d_w_out, static_cast<double>(test.cvt_d_w_in));
   if ((IsMipsArchVariant(kMips32r2) || IsMipsArchVariant(kMips32r6)) &&
@@ -4402,7 +4405,7 @@
   test.cvt_w_s_in = std::numeric_limits<float>::min();
   test.cvt_w_d_in = std::numeric_limits<double>::min();
 
-  (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+  (f.Call(&test, 0, 0, 0, 0));
   CHECK_EQ(test.cvt_d_s_out, static_cast<double>(test.cvt_d_s_in));
   CHECK_EQ(test.cvt_d_w_out, static_cast<double>(test.cvt_d_w_in));
   if ((IsMipsArchVariant(kMips32r2) || IsMipsArchVariant(kMips32r6)) &&
@@ -4428,7 +4431,8 @@
   CcTest::InitializeVM();
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
 
   typedef struct test {
     double dOp1;
@@ -4469,9 +4473,9 @@
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
 
-  F3 f = FUNCTION_CAST<F3>(code->entry());
+  auto f = GeneratedCode<F3>::FromCode(*code);
 
-  (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+  (f.Call(&test, 0, 0, 0, 0));
 
   const int test_size = 3;
 
@@ -4512,7 +4516,7 @@
     test.fOp1 = fOp1[i];
     test.fOp2 = fOp2[i];
 
-    (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+    (f.Call(&test, 0, 0, 0, 0));
     CHECK_EQ(test.dRes, dRes[i]);
     CHECK_EQ(test.fRes, fRes[i]);
   }
@@ -4522,7 +4526,7 @@
   test.fOp1 = FLT_MAX;
   test.fOp2 = -0.0;
 
-  (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+  (f.Call(&test, 0, 0, 0, 0));
   CHECK(!std::isfinite(test.dRes));
   CHECK(!std::isfinite(test.fRes));
 
@@ -4531,7 +4535,7 @@
   test.fOp1 = 0.0;
   test.fOp2 = -0.0;
 
-  (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+  (f.Call(&test, 0, 0, 0, 0));
   CHECK(std::isnan(test.dRes));
   CHECK(std::isnan(test.fRes));
 
@@ -4540,7 +4544,7 @@
   test.fOp1 = std::numeric_limits<float>::quiet_NaN();
   test.fOp2 = -5.0;
 
-  (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+  (f.Call(&test, 0, 0, 0, 0));
   CHECK(std::isnan(test.dRes));
   CHECK(std::isnan(test.fRes));
 }
@@ -4550,7 +4554,8 @@
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
 
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
 
   __ align(v0, a0, a1, bp);
   __ jr(ra);
@@ -4561,10 +4566,10 @@
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
 
-  F2 f = FUNCTION_CAST<F2>(code->entry());
+  auto f = GeneratedCode<F2>::FromCode(*code);
 
-  uint32_t res = reinterpret_cast<uint32_t>(CALL_GENERATED_CODE(
-      isolate, f, rs_value, rt_value, 0, 0, 0));
+  uint32_t res =
+      reinterpret_cast<uint32_t>(f.Call(rs_value, rt_value, 0, 0, 0));
 
   return res;
 }
@@ -4581,13 +4586,15 @@
       uint32_t  expected_res;
     };
 
+    // clang-format off
     struct TestCaseAlign tc[] = {
-      // rs_value,    rt_value,    bp,  expected_res
-      { 0x11223344,   0xaabbccdd,   0,  0xaabbccdd },
-      { 0x11223344,   0xaabbccdd,   1,  0xbbccdd11 },
-      { 0x11223344,   0xaabbccdd,   2,  0xccdd1122 },
-      { 0x11223344,   0xaabbccdd,   3,  0xdd112233 },
+      // rs_value,    rt_value, bp,  expected_res
+      {0x11223344,  0xAABBCCDD,  0,    0xAABBCCDD},
+      {0x11223344,  0xAABBCCDD,  1,    0xBBCCDD11},
+      {0x11223344,  0xAABBCCDD,  2,    0xCCDD1122},
+      {0x11223344,  0xAABBCCDD,  3,    0xDD112233},
     };
+    // clang-format on
 
     size_t nr_test_cases = sizeof(tc) / sizeof(TestCaseAlign);
     for (size_t i = 0; i < nr_test_cases; ++i) {
@@ -4603,7 +4610,8 @@
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
 
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
 
   __ aluipc(v0, offset);
   __ jr(ra);
@@ -4614,11 +4622,10 @@
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
 
-  F2 f = FUNCTION_CAST<F2>(code->entry());
-  PC = (uint32_t) f;  // Set the program counter.
+  auto f = GeneratedCode<F2>::FromCode(*code);
+  PC = (uint32_t)code->entry();  // Set the program counter.
 
-  uint32_t res = reinterpret_cast<uint32_t>(
-      CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0));
+  uint32_t res = reinterpret_cast<uint32_t>(f.Call(0, 0, 0, 0, 0));
 
   return res;
 }
@@ -4657,7 +4664,8 @@
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
 
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
 
   __ auipc(v0, offset);
   __ jr(ra);
@@ -4668,11 +4676,10 @@
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
 
-  F2 f = FUNCTION_CAST<F2>(code->entry());
-  PC = (uint32_t) f;  // Set the program counter.
+  auto f = GeneratedCode<F2>::FromCode(*code);
+  PC = (uint32_t)code->entry();  // Set the program counter.
 
-  uint32_t res = reinterpret_cast<uint32_t>(
-      CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0));
+  uint32_t res = reinterpret_cast<uint32_t>(f.Call(0, 0, 0, 0, 0));
 
   return res;
 }
@@ -4711,27 +4718,28 @@
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
 
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
 
   // 256k instructions; 2^8k
-  // addiu t7, t0, 0xffff;  (0x250fffff)
+  // addiu t7, t0, 0xFFFF;  (0x250FFFFF)
   // ...
-  // addiu t4, t0, 0x0000;  (0x250c0000)
+  // addiu t4, t0, 0x0000;  (0x250C0000)
   uint32_t addiu_start_1 = 0x25000000;
-  for (int32_t i = 0xfffff; i >= 0xc0000; --i) {
+  for (int32_t i = 0xFFFFF; i >= 0xC0000; --i) {
     uint32_t addiu_new = addiu_start_1 + i;
     __ dd(addiu_new);
   }
 
-  __ lwpc(t8, offset);         // offset 0; 0xef080000 (t8 register)
+  __ lwpc(t8, offset);  // offset 0; 0xEF080000 (t8 register)
   __ mov(v0, t8);
 
   // 256k instructions; 2^8k
   // addiu t0, t0, 0x0000;  (0x25080000)
   // ...
-  // addiu t3, t0, 0xffff;  (0x250bffff)
+  // addiu t3, t0, 0xFFFF;  (0x250BFFFF)
   uint32_t addiu_start_2 = 0x25000000;
-  for (int32_t i = 0x80000; i <= 0xbffff; ++i) {
+  for (int32_t i = 0x80000; i <= 0xBFFFF; ++i) {
     uint32_t addiu_new = addiu_start_2 + i;
     __ dd(addiu_new);
   }
@@ -4744,10 +4752,9 @@
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
 
-  F2 f = FUNCTION_CAST<F2>(code->entry());
+  auto f = GeneratedCode<F2>::FromCode(*code);
 
-  uint32_t res = reinterpret_cast<uint32_t>(
-      CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0));
+  uint32_t res = reinterpret_cast<uint32_t>(f.Call(0, 0, 0, 0, 0));
 
   return res;
 }
@@ -4762,17 +4769,19 @@
       uint32_t expected_res;
     };
 
+    // clang-format off
     struct TestCaseLwpc tc[] = {
       // offset,   expected_res
-      { -262144,    0x250fffff },   // offset 0x40000
-      {      -4,    0x250c0003 },
-      {      -1,    0x250c0000 },
-      {       0,    0xef080000 },
+      { -262144,    0x250FFFFF },   // offset 0x40000
+      {      -4,    0x250C0003 },
+      {      -1,    0x250C0000 },
+      {       0,    0xEF080000 },
       {       1,    0x03001025 },   // mov(v0, t8)
       {       2,    0x25080000 },
       {       4,    0x25080002 },
-      {  262143,    0x250bfffd },   // offset 0x3ffff
+      {  262143,    0x250BFFFD },   // offset 0x3FFFF
     };
+    // clang-format on
 
     size_t nr_test_cases = sizeof(tc) / sizeof(TestCaseLwpc);
     for (size_t i = 0; i < nr_test_cases; ++i) {
@@ -4787,7 +4796,8 @@
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
 
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
 
   Label get_program_counter, stop_execution;
   __ push(ra);
@@ -4828,10 +4838,9 @@
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
 
-  F2 f = FUNCTION_CAST<F2>(code->entry());
+  auto f = GeneratedCode<F2>::FromCode(*code);
 
-  uint32_t res = reinterpret_cast<uint32_t>(
-      CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0));
+  uint32_t res = reinterpret_cast<uint32_t>(f.Call(0, 0, 0, 0, 0));
 
   return res;
 }
@@ -4868,7 +4877,8 @@
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
 
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
 
   Label stop_execution;
   __ li(v0, 0);
@@ -4900,10 +4910,9 @@
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
 
-  F2 f = FUNCTION_CAST<F2>(code->entry());
+  auto f = GeneratedCode<F2>::FromCode(*code);
 
-  uint32_t res = reinterpret_cast<uint32_t>(
-      CALL_GENERATED_CODE(isolate, f, value, 0, 0, 0, 0));
+  uint32_t res = reinterpret_cast<uint32_t>(f.Call(value, 0, 0, 0, 0));
 
   return res;
 }
@@ -4919,14 +4928,16 @@
       uint32_t  expected_res;
     };
 
+    // clang-format off
     struct TestCaseBeqzc tc[] = {
       //    value,    offset,   expected_res
       {       0x0,        -8,           0x66 },
       {       0x0,         0,         0x3334 },
       {       0x0,         1,         0x3333 },
-      {     0xabc,         1,         0x3334 },
+      {     0xABC,         1,         0x3334 },
       {       0x0,         4,         0x2033 },
     };
+    // clang-format on
 
     size_t nr_test_cases = sizeof(tc) / sizeof(TestCaseBeqzc);
     for (size_t i = 0; i < nr_test_cases; ++i) {
@@ -4936,12 +4947,196 @@
   }
 }
 
+void load_elements_of_vector(MacroAssembler& assm, const uint64_t elements[],
+                             MSARegister w, Register t0, Register t1) {
+  __ li(t0, static_cast<uint32_t>(elements[0] & 0xFFFFFFFF));
+  __ li(t1, static_cast<uint32_t>((elements[0] >> 32) & 0xFFFFFFFF));
+  __ insert_w(w, 0, t0);
+  __ insert_w(w, 1, t1);
+  __ li(t0, static_cast<uint32_t>(elements[1] & 0xFFFFFFFF));
+  __ li(t1, static_cast<uint32_t>((elements[1] >> 32) & 0xFFFFFFFF));
+  __ insert_w(w, 2, t0);
+  __ insert_w(w, 3, t1);
+}
+
+inline void store_elements_of_vector(MacroAssembler& assm, MSARegister w,
+                                     Register a) {
+  __ st_d(w, MemOperand(a, 0));
+}
+
+typedef union {
+  uint8_t b[16];
+  uint16_t h[8];
+  uint32_t w[4];
+  uint64_t d[2];
+} msa_reg_t;
+
+struct TestCaseMsaBranch {
+  uint64_t wt_lo;
+  uint64_t wt_hi;
+};
+
+template <typename Branch>
+void run_bz_bnz(TestCaseMsaBranch* input, Branch GenerateBranch,
+                bool branched) {
+  Isolate* isolate = CcTest::i_isolate();
+  HandleScope scope(isolate);
+
+  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  CpuFeatureScope fscope(&assm, MIPS_SIMD);
+
+  typedef struct {
+    uint64_t ws_lo;
+    uint64_t ws_hi;
+    uint64_t wd_lo;
+    uint64_t wd_hi;
+  } T;
+  T t = {0x20B9CC4F1A83E0C5, 0xA27E1B5F2F5BB18A, 0x0000000000000000,
+         0x0000000000000000};
+  msa_reg_t res;
+  Label do_not_move_w0_to_w2;
+
+  load_elements_of_vector(assm, &t.ws_lo, w0, t0, t1);
+  load_elements_of_vector(assm, &t.wd_lo, w2, t0, t1);
+  load_elements_of_vector(assm, &input->wt_lo, w1, t0, t1);
+  GenerateBranch(assm, do_not_move_w0_to_w2);
+  __ nop();
+  __ move_v(w2, w0);
+
+  __ bind(&do_not_move_w0_to_w2);
+  store_elements_of_vector(assm, w2, a0);
+  __ jr(ra);
+  __ nop();
+
+  CodeDesc desc;
+  assm.GetCode(isolate, &desc);
+  Handle<Code> code =
+      isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
+#ifdef OBJECT_PRINT
+  code->Print(std::cout);
+#endif
+  auto f = GeneratedCode<F3>::FromCode(*code);
+
+  (f.Call(&res, 0, 0, 0, 0));
+  if (branched) {
+    CHECK_EQ(t.wd_lo, res.d[0]);
+    CHECK_EQ(t.wd_hi, res.d[1]);
+  } else {
+    CHECK_EQ(t.ws_lo, res.d[0]);
+    CHECK_EQ(t.ws_hi, res.d[1]);
+  }
+}
+
+TEST(MSA_bz_bnz) {
+  if (!IsMipsArchVariant(kMips32r6) || !CpuFeatures::IsSupported(MIPS_SIMD))
+    return;
+
+  TestCaseMsaBranch tz_v[] = {
+      {0x0, 0x0}, {0xABC, 0x0}, {0x0, 0xABC}, {0xABC, 0xABC}};
+  for (unsigned i = 0; i < arraysize(tz_v); ++i) {
+    run_bz_bnz(
+        &tz_v[i],
+        [](MacroAssembler& assm, Label& br_target) { __ bz_v(w1, &br_target); },
+        tz_v[i].wt_lo == 0 && tz_v[i].wt_hi == 0);
+  }
+
+#define TEST_BZ_DF(input_array, lanes, instruction, int_type)         \
+  for (unsigned i = 0; i < arraysize(input_array); ++i) {             \
+    int j;                                                            \
+    int_type* element = reinterpret_cast<int_type*>(&input_array[i]); \
+    for (j = 0; j < lanes; ++j) {                                     \
+      if (element[j] == 0) {                                          \
+        break;                                                        \
+      }                                                               \
+    }                                                                 \
+    run_bz_bnz(&input_array[i],                                       \
+               [](MacroAssembler& assm, Label& br_target) {           \
+                 __ instruction(w1, &br_target);                      \
+               },                                                     \
+               j != lanes);                                           \
+  }
+  TestCaseMsaBranch tz_b[] = {{0x0, 0x0},
+                              {0xBC0000, 0x0},
+                              {0x0, 0xAB000000000000CD},
+                              {0x123456789ABCDEF0, 0xAAAAAAAAAAAAAAAA}};
+  TEST_BZ_DF(tz_b, kMSALanesByte, bz_b, int8_t)
+
+  TestCaseMsaBranch tz_h[] = {{0x0, 0x0},
+                              {0xBCDE0000, 0x0},
+                              {0x0, 0xABCD00000000ABCD},
+                              {0x123456789ABCDEF0, 0xAAAAAAAAAAAAAAAA}};
+  TEST_BZ_DF(tz_h, kMSALanesHalf, bz_h, int16_t)
+
+  TestCaseMsaBranch tz_w[] = {{0x0, 0x0},
+                              {0xBCDE123400000000, 0x0},
+                              {0x0, 0x000000001234ABCD},
+                              {0x123456789ABCDEF0, 0xAAAAAAAAAAAAAAAA}};
+  TEST_BZ_DF(tz_w, kMSALanesWord, bz_w, int32_t)
+
+  TestCaseMsaBranch tz_d[] = {{0x0, 0x0},
+                              {0xBCDE0000, 0x0},
+                              {0x0, 0xABCD00000000ABCD},
+                              {0x123456789ABCDEF0, 0xAAAAAAAAAAAAAAAA}};
+  TEST_BZ_DF(tz_d, kMSALanesDword, bz_d, int64_t)
+#undef TEST_BZ_DF
+
+  TestCaseMsaBranch tnz_v[] = {
+      {0x0, 0x0}, {0xABC, 0x0}, {0x0, 0xABC}, {0xABC, 0xABC}};
+  for (unsigned i = 0; i < arraysize(tnz_v); ++i) {
+    run_bz_bnz(&tnz_v[i],
+               [](MacroAssembler& assm, Label& br_target) {
+                 __ bnz_v(w1, &br_target);
+               },
+               tnz_v[i].wt_lo != 0 || tnz_v[i].wt_hi != 0);
+  }
+
+#define TEST_BNZ_DF(input_array, lanes, instruction, int_type)        \
+  for (unsigned i = 0; i < arraysize(input_array); ++i) {             \
+    int j;                                                            \
+    int_type* element = reinterpret_cast<int_type*>(&input_array[i]); \
+    for (j = 0; j < lanes; ++j) {                                     \
+      if (element[j] == 0) {                                          \
+        break;                                                        \
+      }                                                               \
+    }                                                                 \
+    run_bz_bnz(&input_array[i],                                       \
+               [](MacroAssembler& assm, Label& br_target) {           \
+                 __ instruction(w1, &br_target);                      \
+               },                                                     \
+               j == lanes);                                           \
+  }
+  TestCaseMsaBranch tnz_b[] = {{0x0, 0x0},
+                               {0xBC0000, 0x0},
+                               {0x0, 0xAB000000000000CD},
+                               {0x123456789ABCDEF0, 0xAAAAAAAAAAAAAAAA}};
+  TEST_BNZ_DF(tnz_b, 16, bnz_b, int8_t)
+
+  TestCaseMsaBranch tnz_h[] = {{0x0, 0x0},
+                               {0xBCDE0000, 0x0},
+                               {0x0, 0xABCD00000000ABCD},
+                               {0x123456789ABCDEF0, 0xAAAAAAAAAAAAAAAA}};
+  TEST_BNZ_DF(tnz_h, 8, bnz_h, int16_t)
+
+  TestCaseMsaBranch tnz_w[] = {{0x0, 0x0},
+                               {0xBCDE123400000000, 0x0},
+                               {0x0, 0x000000001234ABCD},
+                               {0x123456789ABCDEF0, 0xAAAAAAAAAAAAAAAA}};
+  TEST_BNZ_DF(tnz_w, 4, bnz_w, int32_t)
+
+  TestCaseMsaBranch tnz_d[] = {{0x0, 0x0},
+                               {0xBCDE0000, 0x0},
+                               {0x0, 0xABCD00000000ABCD},
+                               {0x123456789ABCDEF0, 0xAAAAAAAAAAAAAAAA}};
+  TEST_BNZ_DF(tnz_d, 2, bnz_d, int64_t)
+#undef TEST_BNZ_DF
+}
 
 uint32_t run_jialc(int16_t offset) {
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
 
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
 
   Label main_block, get_program_counter;
   __ push(ra);
@@ -4994,10 +5189,9 @@
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
 
-  F2 f = FUNCTION_CAST<F2>(code->entry());
+  auto f = GeneratedCode<F2>::FromCode(*code);
 
-  uint32_t res = reinterpret_cast<uint32_t>(
-      CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0));
+  uint32_t res = reinterpret_cast<uint32_t>(f.Call(0, 0, 0, 0, 0));
 
   return res;
 }
@@ -5032,7 +5226,8 @@
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
 
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
 
   __ addiupc(v0, imm19);
   __ jr(ra);
@@ -5043,11 +5238,10 @@
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
 
-  F2 f = FUNCTION_CAST<F2>(code->entry());
-  PC = (uint32_t) f;  // Set the program counter.
+  auto f = GeneratedCode<F2>::FromCode(*code);
+  PC = (uint32_t)code->entry();  // Set the program counter.
 
-  uint32_t rs = reinterpret_cast<uint32_t>(
-      CALL_GENERATED_CODE(isolate, f, imm19, 0, 0, 0, 0));
+  uint32_t rs = reinterpret_cast<uint32_t>(f.Call(imm19, 0, 0, 0, 0));
 
   return rs;
 }
@@ -5086,7 +5280,8 @@
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
 
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
 
   Label continue_1, stop_execution;
   __ push(ra);
@@ -5126,10 +5321,9 @@
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
 
-  F2 f = FUNCTION_CAST<F2>(code->entry());
+  auto f = GeneratedCode<F2>::FromCode(*code);
 
-  int32_t res = reinterpret_cast<int32_t>(
-      CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0));
+  int32_t res = reinterpret_cast<int32_t>(f.Call(0, 0, 0, 0, 0));
 
   return res;
 }
@@ -5166,7 +5360,8 @@
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
 
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
 
   Label continue_1, stop_execution;
   __ push(ra);
@@ -5208,10 +5403,9 @@
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
 
-  F2 f = FUNCTION_CAST<F2>(code->entry());
+  auto f = GeneratedCode<F2>::FromCode(*code);
 
-  int32_t res = reinterpret_cast<int32_t>(
-      CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0));
+  int32_t res = reinterpret_cast<int32_t>(f.Call(0, 0, 0, 0, 0));
 
   return res;
 }
@@ -5221,7 +5415,8 @@
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
 
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
 
   __ li(t0, rs);
   __ aui(v0, t0, offset);
@@ -5233,11 +5428,9 @@
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
 
-  F2 f = FUNCTION_CAST<F2>(code->entry());
+  auto f = GeneratedCode<F2>::FromCode(*code);
 
-  uint32_t res =
-    reinterpret_cast<uint32_t>
-        (CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0));
+  uint32_t res = reinterpret_cast<uint32_t>(f.Call(0, 0, 0, 0, 0));
 
   return res;
 }
@@ -5254,15 +5447,15 @@
     };
 
     struct TestCaseAui tc[] = {
-      // input, offset, result
-      {0xfffeffff, 1, 0xffffffff},
-      {0xffffffff, 0, 0xffffffff},
-      {0, 0xffff, 0xffff0000},
-      {0x0008ffff, 0xfff7, 0xffffffff},
-      {32767, 32767, 0x7fff7fff},
-      // overflow cases
-      {0xffffffff, 0x1, 0x0000ffff},
-      {0xffffffff, 0xffff, 0xfffeffff},
+        // input, offset, result
+        {0xFFFEFFFF, 1, 0xFFFFFFFF},
+        {0xFFFFFFFF, 0, 0xFFFFFFFF},
+        {0, 0xFFFF, 0xFFFF0000},
+        {0x0008FFFF, 0xFFF7, 0xFFFFFFFF},
+        {32767, 32767, 0x7FFF7FFF},
+        // overflow cases
+        {0xFFFFFFFF, 0x1, 0x0000FFFF},
+        {0xFFFFFFFF, 0xFFFF, 0xFFFEFFFF},
     };
 
     size_t nr_test_cases = sizeof(tc) / sizeof(TestCaseAui);
@@ -5305,7 +5498,8 @@
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
 
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
 
   __ mov(t0, ra);
   __ bal(offset);       // Equivalent for "BGEZAL zero_reg, offset".
@@ -5324,10 +5518,9 @@
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
 
-  F2 f = FUNCTION_CAST<F2>(code->entry());
+  auto f = GeneratedCode<F2>::FromCode(*code);
 
-  uint32_t res = reinterpret_cast<uint32_t>(
-      CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0));
+  uint32_t res = reinterpret_cast<uint32_t>(f.Call(0, 0, 0, 0, 0));
 
   return res;
 }
@@ -5377,10 +5570,9 @@
   assm.GetCode(isolate, &desc);
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
-  F2 f = FUNCTION_CAST<F2>(code->entry());
+  auto f = GeneratedCode<F2>::FromCode(*code);
 
-  int32_t res = reinterpret_cast<int32_t>(
-      CALL_GENERATED_CODE(isolate, f, 42, 42, 0, 0, 0));
+  int32_t res = reinterpret_cast<int32_t>(f.Call(42, 42, 0, 0, 0));
   CHECK_EQ(0, res);
 }
 
@@ -5394,7 +5586,8 @@
   CcTest::InitializeVM();
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
 
   T x = std::sqrt(static_cast<T>(2.0));
   T y = std::sqrt(static_cast<T>(3.0));
@@ -5444,7 +5637,7 @@
   assm.GetCode(isolate, &desc);
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
-  F3 f = FUNCTION_CAST<F3>(code->entry());
+  auto f = GeneratedCode<F3>::FromCode(*code);
 
   const size_t kTableLength = sizeof(test_cases) / sizeof(TestCaseMaddMsub<T>);
   TestCaseMaddMsub<T> tc;
@@ -5453,7 +5646,7 @@
     tc.fs = test_cases[i].fs;
     tc.ft = test_cases[i].ft;
 
-    (CALL_GENERATED_CODE(isolate, f, &tc, 0, 0, 0, 0));
+    (f.Call(&tc, 0, 0, 0, 0));
 
     T res_add = 0;
     T res_sub = 0;
@@ -5516,7 +5709,8 @@
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
 
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
 
   Label code_start;
   __ bind(&code_start);
@@ -5530,10 +5724,9 @@
   assm.GetCode(isolate, &desc);
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
-  F2 f = FUNCTION_CAST<F2>(code->entry());
+  auto f = GeneratedCode<F2>::FromCode(*code);
 
-  uint32_t res = reinterpret_cast<uint32_t>(
-      CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0));
+  uint32_t res = reinterpret_cast<uint32_t>(f.Call(0, 0, 0, 0, 0));
 
   return res;
 }
@@ -5554,28 +5747,28 @@
   // 0 - imm = expected_res
   struct TestCaseSubu tc[] = {
       //    imm, expected_res, num_instr
-      {0xffff8000, 0x8000, 2},  // min_int16
+      {0xFFFF8000, 0x8000, 2},  // min_int16
       // Generates ori + addu
       // We can't have just addiu because -min_int16 > max_int16 so use
       // register. We can load min_int16 to at register with addiu and then
       // subtract at with subu, but now we use ori + addu because -min_int16 can
       // be loaded using ori.
-      {0x8000, 0xffff8000, 1},  // max_int16 + 1
+      {0x8000, 0xFFFF8000, 1},  // max_int16 + 1
       // Generates addiu
       // max_int16 + 1 is not int16 but -(max_int16 + 1) is, just use addiu.
-      {0xffff7fff, 0x8001, 2},  // min_int16 - 1
+      {0xFFFF7FFF, 0x8001, 2},  // min_int16 - 1
       // Generates ori + addu
       // To load this value to at we need two instructions and another one to
       // subtract, lui + ori + subu. But we can load -value to at using just
       // ori and then add at register with addu.
-      {0x8001, 0xffff7fff, 2},  // max_int16 + 2
+      {0x8001, 0xFFFF7FFF, 2},  // max_int16 + 2
       // Generates ori + subu
       // Not int16 but is uint16, load value to at with ori and subtract with
       // subu.
-      {0x00010000, 0xffff0000, 2},
+      {0x00010000, 0xFFFF0000, 2},
       // Generates lui + subu
       // Load value using lui to at and subtract with subu.
-      {0x00010001, 0xfffeffff, 3},
+      {0x00010001, 0xFFFEFFFF, 3},
       // Generates lui + ori + subu
       // We have to generate three instructions in this case.
   };
@@ -5586,65 +5779,6 @@
   }
 }
 
-void load_uint64_elements_of_vector(MacroAssembler& assm,
-                                    const uint64_t elements[], MSARegister w,
-                                    Register t0, Register t1) {
-  __ li(t0, static_cast<uint32_t>(elements[0] & 0xffffffff));
-  __ li(t1, static_cast<uint32_t>((elements[0] >> 32) & 0xffffffff));
-  __ insert_w(w, 0, t0);
-  __ insert_w(w, 1, t1);
-  __ li(t0, static_cast<uint32_t>(elements[1] & 0xffffffff));
-  __ li(t1, static_cast<uint32_t>((elements[1] >> 32) & 0xffffffff));
-  __ insert_w(w, 2, t0);
-  __ insert_w(w, 3, t1);
-}
-
-void load_uint32_elements_of_vector(MacroAssembler& assm,
-                                    const uint64_t elements[], MSARegister w,
-                                    Register t0, Register t1) {
-  const uint32_t* const element = reinterpret_cast<const uint32_t*>(elements);
-  __ li(t0, element[0]);
-  __ li(t1, element[1]);
-  __ insert_w(w, 0, t0);
-  __ insert_w(w, 1, t1);
-  __ li(t0, element[2]);
-  __ li(t1, element[3]);
-  __ insert_w(w, 2, t0);
-  __ insert_w(w, 3, t1);
-}
-
-void load_uint16_elements_of_vector(MacroAssembler& assm,
-                                    const uint64_t elements[], MSARegister w,
-                                    Register t0, Register t1) {
-  const uint16_t* const element = reinterpret_cast<const uint16_t*>(elements);
-  __ li(t0, element[0]);
-  __ li(t1, element[1]);
-  __ insert_h(w, 0, t0);
-  __ insert_h(w, 1, t1);
-  __ li(t0, element[2]);
-  __ li(t1, element[3]);
-  __ insert_h(w, 2, t0);
-  __ insert_h(w, 3, t1);
-  __ li(t0, element[4]);
-  __ li(t1, element[5]);
-  __ insert_h(w, 4, t0);
-  __ insert_h(w, 5, t1);
-  __ li(t0, element[6]);
-  __ li(t1, element[7]);
-  __ insert_h(w, 6, t0);
-  __ insert_h(w, 7, t1);
-}
-
-inline void store_uint64_elements_of_vector(MacroAssembler& assm, MSARegister w,
-                                            Register a, Register t) {
-  __ st_d(w, MemOperand(a, 0));
-}
-
-inline void store_uint32_elements_of_vector(MacroAssembler& assm, MSARegister w,
-                                            Register a, Register t) {
-  __ st_w(w, MemOperand(a, 0));
-}
-
 TEST(MSA_fill_copy) {
   CcTest::InitializeVM();
   Isolate* isolate = CcTest::i_isolate();
@@ -5660,14 +5794,15 @@
   } T;
   T t;
 
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
   if (!IsMipsArchVariant(kMips32r6) || !CpuFeatures::IsSupported(MIPS_SIMD))
     return;
 
   {
     CpuFeatureScope fscope(&assm, MIPS_SIMD);
 
-    __ li(t0, 0xa512b683);
+    __ li(t0, 0xA512B683);
 
     __ fill_b(w0, t0);
     __ fill_h(w2, t0);
@@ -5697,17 +5832,16 @@
 #ifdef OBJECT_PRINT
   code->Print(std::cout);
 #endif
-  F3 f = FUNCTION_CAST<F3>(code->entry());
+  auto f = GeneratedCode<F3>::FromCode(*code);
 
-  Object* dummy = CALL_GENERATED_CODE(isolate, f, &t, 0, 0, 0, 0);
-  USE(dummy);
+  f.Call(&t, 0, 0, 0, 0);
 
   CHECK_EQ(0x83u, t.u8);
-  CHECK_EQ(0xb683u, t.u16);
-  CHECK_EQ(0xa512b683u, t.u32);
-  CHECK_EQ(0xffffff83u, t.s8);
-  CHECK_EQ(0xffffb683u, t.s16);
-  CHECK_EQ(0xa512b683u, t.s32);
+  CHECK_EQ(0xB683u, t.u16);
+  CHECK_EQ(0xA512B683u, t.u32);
+  CHECK_EQ(0xFFFFFF83u, t.s8);
+  CHECK_EQ(0xFFFFB683u, t.s16);
+  CHECK_EQ(0xA512B683u, t.s32);
 }
 
 TEST(MSA_fill_copy_2) {
@@ -5725,14 +5859,15 @@
   } T;
   T t[2];
 
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
   if (!IsMipsArchVariant(kMips32r6) || !CpuFeatures::IsSupported(MIPS_SIMD))
     return;
 
   {
     CpuFeatureScope fscope(&assm, MIPS_SIMD);
 
-    __ li(t0, 0xaaaaaaaa);
+    __ li(t0, 0xAAAAAAAA);
     __ li(t1, 0x55555555);
 
     __ fill_w(w0, t0);
@@ -5766,19 +5901,18 @@
 #ifdef OBJECT_PRINT
   code->Print(std::cout);
 #endif
-  F4 f = FUNCTION_CAST<F4>(code->entry());
+  auto f = GeneratedCode<F4>::FromCode(*code);
 
-  Object* dummy = CALL_GENERATED_CODE(isolate, f, &t[0], &t[1], 0, 0, 0);
-  USE(dummy);
+  f.Call(&t[0], &t[1], 0, 0, 0);
 
   CHECK_EQ(0x55555555, t[0].w0);
-  CHECK_EQ(0xaaaaaaaa, t[0].w1);
-  CHECK_EQ(0xaaaaaaaa, t[0].w2);
-  CHECK_EQ(0xaaaaaaaa, t[0].w3);
-  CHECK_EQ(0xaaaaaaaa, t[1].w0);
+  CHECK_EQ(0xAAAAAAAA, t[0].w1);
+  CHECK_EQ(0xAAAAAAAA, t[0].w2);
+  CHECK_EQ(0xAAAAAAAA, t[0].w3);
+  CHECK_EQ(0xAAAAAAAA, t[1].w0);
   CHECK_EQ(0x55555555, t[1].w1);
-  CHECK_EQ(0xaaaaaaaa, t[1].w2);
-  CHECK_EQ(0xaaaaaaaa, t[1].w3);
+  CHECK_EQ(0xAAAAAAAA, t[1].w2);
+  CHECK_EQ(0xAAAAAAAA, t[1].w3);
 }
 
 TEST(MSA_fill_copy_3) {
@@ -5794,14 +5928,15 @@
   } T;
   T t[2];
 
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
   if (!IsMipsArchVariant(kMips32r6) || !CpuFeatures::IsSupported(MIPS_SIMD))
     return;
 
   {
     CpuFeatureScope fscope(&assm, MIPS_SIMD);
 
-    __ li(t0, 0xaaaaaaaa);
+    __ li(t0, 0xAAAAAAAA);
     __ li(t1, 0x55555555);
 
     __ Move(f0, t0, t0);
@@ -5824,28 +5959,21 @@
 #ifdef OBJECT_PRINT
   code->Print(std::cout);
 #endif
-  F4 f = FUNCTION_CAST<F4>(code->entry());
+  auto f = GeneratedCode<F4>::FromCode(*code);
 
-  Object* dummy = CALL_GENERATED_CODE(isolate, f, &t[0], &t[1], 0, 0, 0);
-  USE(dummy);
+  f.Call(&t[0], &t[1], 0, 0, 0);
 
   CHECK_EQ(0x5555555555555555, t[0].d0);
   CHECK_EQ(0x5555555555555555, t[1].d0);
 }
 
-typedef union {
-  uint8_t b[16];
-  uint16_t h[8];
-  uint32_t w[4];
-  uint64_t d[2];
-} msa_reg_t;
-
 template <typename T>
 void run_msa_insert(int32_t rs_value, int n, msa_reg_t* w) {
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
 
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
   CpuFeatureScope fscope(&assm, MIPS_SIMD);
 
   __ li(t0, -1);
@@ -5853,19 +5981,19 @@
   __ fill_w(w0, t0);
 
   if (std::is_same<T, int8_t>::value) {
-    DCHECK(n < 16);
+    DCHECK_LT(n, 16);
     __ insert_b(w0, n, t1);
   } else if (std::is_same<T, int16_t>::value) {
-    DCHECK(n < 8);
+    DCHECK_LT(n, 8);
     __ insert_h(w0, n, t1);
   } else if (std::is_same<T, int32_t>::value) {
-    DCHECK(n < 4);
+    DCHECK_LT(n, 4);
     __ insert_w(w0, n, t1);
   } else {
     UNREACHABLE();
   }
 
-  store_uint64_elements_of_vector(assm, w0, a0, t2);
+  store_elements_of_vector(assm, w0, a0);
 
   __ jr(ra);
   __ nop();
@@ -5877,9 +6005,9 @@
 #ifdef OBJECT_PRINT
   code->Print(std::cout);
 #endif
-  F3 f = FUNCTION_CAST<F3>(code->entry());
+  auto f = GeneratedCode<F3>::FromCode(*code);
 
-  (CALL_GENERATED_CODE(isolate, f, w, 0, 0, 0, 0));
+  (f.Call(w, 0, 0, 0, 0));
 }
 
 TEST(MSA_insert) {
@@ -5897,10 +6025,10 @@
 
   struct TestCaseInsert tc_b[] = {
       // input, n,        exp_res_lo,          exp_res_hi
-      {0xa2, 13, 0xffffffffffffffffu, 0xffffa2ffffffffffu},
-      {0x73, 10, 0xffffffffffffffffu, 0xffffffffff73ffffu},
-      {0x3494, 5, 0xffff94ffffffffffu, 0xffffffffffffffffu},
-      {0xa6b8, 1, 0xffffffffffffb8ffu, 0xffffffffffffffffu}};
+      {0xA2, 13, 0xFFFFFFFFFFFFFFFFu, 0xFFFFA2FFFFFFFFFFu},
+      {0x73, 10, 0xFFFFFFFFFFFFFFFFu, 0xFFFFFFFFFF73FFFFu},
+      {0x3494, 5, 0xFFFF94FFFFFFFFFFu, 0xFFFFFFFFFFFFFFFFu},
+      {0xA6B8, 1, 0xFFFFFFFFFFFFB8FFu, 0xFFFFFFFFFFFFFFFFu}};
 
   for (size_t i = 0; i < sizeof(tc_b) / sizeof(TestCaseInsert); ++i) {
     msa_reg_t res;
@@ -5911,10 +6039,10 @@
 
   struct TestCaseInsert tc_h[] = {
       // input, n,         exp_res_lo,          exp_res_hi
-      {0x85a2, 7, 0xffffffffffffffffu, 0x85a2ffffffffffffu},
-      {0xe873, 5, 0xffffffffffffffffu, 0xffffffffe873ffffu},
-      {0x3494, 3, 0x3494ffffffffffffu, 0xffffffffffffffffu},
-      {0xa6b8, 1, 0xffffffffa6b8ffffu, 0xffffffffffffffffu}};
+      {0x85A2, 7, 0xFFFFFFFFFFFFFFFFu, 0x85A2FFFFFFFFFFFFu},
+      {0xE873, 5, 0xFFFFFFFFFFFFFFFFu, 0xFFFFFFFFE873FFFFu},
+      {0x3494, 3, 0x3494FFFFFFFFFFFFu, 0xFFFFFFFFFFFFFFFFu},
+      {0xA6B8, 1, 0xFFFFFFFFA6B8FFFFu, 0xFFFFFFFFFFFFFFFFu}};
 
   for (size_t i = 0; i < sizeof(tc_h) / sizeof(TestCaseInsert); ++i) {
     msa_reg_t res;
@@ -5925,10 +6053,10 @@
 
   struct TestCaseInsert tc_w[] = {
       // input,     n,          exp_res_lo,          exp_res_hi
-      {0xd2f085a2u, 3, 0xffffffffffffffffu, 0xd2f085a2ffffffffu},
-      {0x4567e873u, 2, 0xffffffffffffffffu, 0xffffffff4567e873u},
-      {0xacdb3494u, 1, 0xacdb3494ffffffffu, 0xffffffffffffffffu},
-      {0x89aba6b8u, 0, 0xffffffff89aba6b8u, 0xffffffffffffffffu}};
+      {0xD2F085A2u, 3, 0xFFFFFFFFFFFFFFFFu, 0xD2F085A2FFFFFFFFu},
+      {0x4567E873u, 2, 0xFFFFFFFFFFFFFFFFu, 0xFFFFFFFF4567E873u},
+      {0xACDB3494u, 1, 0xACDB3494FFFFFFFFu, 0xFFFFFFFFFFFFFFFFu},
+      {0x89ABA6B8u, 0, 0xFFFFFFFF89ABA6B8u, 0xFFFFFFFFFFFFFFFFu}};
 
   for (size_t i = 0; i < sizeof(tc_w) / sizeof(TestCaseInsert); ++i) {
     msa_reg_t res;
@@ -5938,11 +6066,158 @@
   }
 }
 
+TEST(MSA_move_v) {
+  if (!IsMipsArchVariant(kMips32r6) || !CpuFeatures::IsSupported(MIPS_SIMD))
+    return;
+  CcTest::InitializeVM();
+  Isolate* isolate = CcTest::i_isolate();
+  HandleScope scope(isolate);
+
+  typedef struct {
+    uint64_t ws_lo;
+    uint64_t ws_hi;
+    uint64_t wd_lo;
+    uint64_t wd_hi;
+  } T;
+  T t[] = {{0x20B9CC4F1A83E0C5, 0xA27E1B5F2F5BB18A, 0x1E86678B52F8E1FF,
+            0x706E51290AC76FB9},
+           {0x4414AED7883FFD18, 0x047D183A06B67016, 0x4EF258CF8D822870,
+            0x2686B73484C2E843},
+           {0xD38FF9D048884FFC, 0x6DC63A57C0943CA7, 0x8520CA2F3E97C426,
+            0xA9913868FB819C59}};
+
+  for (unsigned i = 0; i < arraysize(t); ++i) {
+    MacroAssembler assm(isolate, nullptr, 0,
+                        v8::internal::CodeObjectRequired::kYes);
+    CpuFeatureScope fscope(&assm, MIPS_SIMD);
+
+    load_elements_of_vector(assm, &t[i].ws_lo, w0, t0, t1);
+    load_elements_of_vector(assm, &t[i].wd_lo, w2, t0, t1);
+    __ move_v(w2, w0);
+    store_elements_of_vector(assm, w2, a0);
+
+    __ jr(ra);
+    __ nop();
+
+    CodeDesc desc;
+    assm.GetCode(isolate, &desc);
+    Handle<Code> code =
+        isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
+#ifdef OBJECT_PRINT
+    code->Print(std::cout);
+#endif
+    auto f = GeneratedCode<F3>::FromCode(*code);
+    (f.Call(&t[i].wd_lo, 0, 0, 0, 0));
+    CHECK_EQ(t[i].ws_lo, t[i].wd_lo);
+    CHECK_EQ(t[i].ws_hi, t[i].wd_hi);
+  }
+}
+
+template <typename ExpectFunc, typename OperFunc>
+void run_msa_sldi(OperFunc GenerateOperation,
+                  ExpectFunc GenerateExpectedResult) {
+  Isolate* isolate = CcTest::i_isolate();
+  HandleScope scope(isolate);
+
+  typedef struct {
+    uint64_t ws_lo;
+    uint64_t ws_hi;
+    uint64_t wd_lo;
+    uint64_t wd_hi;
+  } T;
+  T t[] = {{0x20B9CC4F1A83E0C5, 0xA27E1B5F2F5BB18A, 0x1E86678B52F8E1FF,
+            0x706E51290AC76FB9},
+           {0x4414AED7883FFD18, 0x047D183A06B67016, 0x4EF258CF8D822870,
+            0x2686B73484C2E843},
+           {0xD38FF9D048884FFC, 0x6DC63A57C0943CA7, 0x8520CA2F3E97C426,
+            0xA9913868FB819C59}};
+  uint64_t res[2];
+
+  for (unsigned i = 0; i < arraysize(t); ++i) {
+    MacroAssembler assm(isolate, nullptr, 0,
+                        v8::internal::CodeObjectRequired::kYes);
+    CpuFeatureScope fscope(&assm, MIPS_SIMD);
+    load_elements_of_vector(assm, &t[i].ws_lo, w0, t0, t1);
+    load_elements_of_vector(assm, &t[i].wd_lo, w2, t0, t1);
+    GenerateOperation(assm);
+    store_elements_of_vector(assm, w2, a0);
+
+    __ jr(ra);
+    __ nop();
+
+    CodeDesc desc;
+    assm.GetCode(isolate, &desc);
+    Handle<Code> code =
+        isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
+#ifdef OBJECT_PRINT
+    code->Print(std::cout);
+#endif
+    auto f = GeneratedCode<F3>::FromCode(*code);
+    (f.Call(&res[0], 0, 0, 0, 0));
+    GenerateExpectedResult(reinterpret_cast<uint8_t*>(&t[i].ws_lo),
+                           reinterpret_cast<uint8_t*>(&t[i].wd_lo));
+    CHECK_EQ(res[0], t[i].wd_lo);
+    CHECK_EQ(res[1], t[i].wd_hi);
+  }
+}
+
+TEST(MSA_sldi) {
+  if (!IsMipsArchVariant(kMips32r6) || !CpuFeatures::IsSupported(MIPS_SIMD))
+    return;
+  CcTest::InitializeVM();
+
+#define SLDI_DF(s, k)                \
+  uint8_t v[32];                     \
+  for (unsigned i = 0; i < s; i++) { \
+    v[i] = ws[s * k + i];            \
+    v[i + s] = wd[s * k + i];        \
+  }                                  \
+  for (unsigned i = 0; i < s; i++) { \
+    wd[s * k + i] = v[i + n];        \
+  }
+
+  for (int n = 0; n < 16; ++n) {
+    run_msa_sldi([n](MacroAssembler& assm) { __ sldi_b(w2, w0, n); },
+                 [n](uint8_t* ws, uint8_t* wd) {
+                   SLDI_DF(kMSARegSize / sizeof(int8_t) / kBitsPerByte, 0)
+                 });
+  }
+
+  for (int n = 0; n < 8; ++n) {
+    run_msa_sldi([n](MacroAssembler& assm) { __ sldi_h(w2, w0, n); },
+                 [n](uint8_t* ws, uint8_t* wd) {
+                   for (int k = 0; k < 2; ++k) {
+                     SLDI_DF(kMSARegSize / sizeof(int16_t) / kBitsPerByte, k)
+                   }
+                 });
+  }
+
+  for (int n = 0; n < 4; ++n) {
+    run_msa_sldi([n](MacroAssembler& assm) { __ sldi_w(w2, w0, n); },
+                 [n](uint8_t* ws, uint8_t* wd) {
+                   for (int k = 0; k < 4; ++k) {
+                     SLDI_DF(kMSARegSize / sizeof(int32_t) / kBitsPerByte, k)
+                   }
+                 });
+  }
+
+  for (int n = 0; n < 2; ++n) {
+    run_msa_sldi([n](MacroAssembler& assm) { __ sldi_d(w2, w0, n); },
+                 [n](uint8_t* ws, uint8_t* wd) {
+                   for (int k = 0; k < 8; ++k) {
+                     SLDI_DF(kMSARegSize / sizeof(int64_t) / kBitsPerByte, k)
+                   }
+                 });
+  }
+#undef SLDI_DF
+}
+
 void run_msa_ctc_cfc(uint32_t value) {
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
 
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
   CpuFeatureScope fscope(&assm, MIPS_SIMD);
 
   MSAControlRegister msareg = {kMSACSRRegister};
@@ -5963,12 +6238,12 @@
 #ifdef OBJECT_PRINT
   code->Print(std::cout);
 #endif
-  F3 f = FUNCTION_CAST<F3>(code->entry());
+  auto f = GeneratedCode<F3>::FromCode(*code);
 
   uint32_t res;
-  (CALL_GENERATED_CODE(isolate, f, &res, 0, 0, 0, 0));
+  (f.Call(&res, 0, 0, 0, 0));
 
-  CHECK_EQ(value & 0x0167ffff, res);
+  CHECK_EQ(value & 0x0167FFFF, res);
 }
 
 TEST(MSA_cfc_ctc) {
@@ -5977,12 +6252,12 @@
 
   CcTest::InitializeVM();
 
-  const uint32_t mask_without_cause = 0xff9c0fff;
-  const uint32_t mask_always_zero = 0x0167ffff;
-  const uint32_t mask_enables = 0x00000f80;
-  uint32_t test_case[] = {0x2d5ede31, 0x07955425, 0x15b7dbe3, 0x2bf8bc37,
-                          0xe6aae923, 0x24d0f68d, 0x41afa84c, 0x2d6bf64f,
-                          0x925014bd, 0x4dba7e61};
+  const uint32_t mask_without_cause = 0xFF9C0FFF;
+  const uint32_t mask_always_zero = 0x0167FFFF;
+  const uint32_t mask_enables = 0x00000F80;
+  uint32_t test_case[] = {0x2D5EDE31, 0x07955425, 0x15B7DBE3, 0x2BF8BC37,
+                          0xE6AAE923, 0x24D0F68D, 0x41AFA84C, 0x2D6BF64F,
+                          0x925014BD, 0x4DBA7E61};
   for (unsigned i = 0; i < arraysize(test_case); i++) {
     // Setting enable bits and corresponding cause bits could result in
     // exception raised and this prevents that from happening
@@ -6003,19 +6278,20 @@
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
 
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
   CpuFeatureScope fscope(&assm, MIPS_SIMD);
   msa_reg_t res;
-  uint64_t wd_lo = 0xf35862e13e38f8b0;
-  uint64_t wd_hi = 0x4f41ffdef2bfe636;
+  uint64_t wd_lo = 0xF35862E13E38F8B0;
+  uint64_t wd_hi = 0x4F41FFDEF2BFE636;
 
 #define LOAD_W_REG(lo, hi, w_reg)                            \
-  __ li(t0, static_cast<uint32_t>(lo & 0xffffffff));         \
-  __ li(t1, static_cast<uint32_t>((lo >> 32) & 0xffffffff)); \
+  __ li(t0, static_cast<uint32_t>(lo & 0xFFFFFFFF));         \
+  __ li(t1, static_cast<uint32_t>((lo >> 32) & 0xFFFFFFFF)); \
   __ insert_w(w_reg, 0, t0);                                 \
   __ insert_w(w_reg, 1, t1);                                 \
-  __ li(t0, static_cast<uint32_t>(hi & 0xffffffff));         \
-  __ li(t1, static_cast<uint32_t>((hi >> 32) & 0xffffffff)); \
+  __ li(t0, static_cast<uint32_t>(hi & 0xFFFFFFFF));         \
+  __ li(t1, static_cast<uint32_t>((hi >> 32) & 0xFFFFFFFF)); \
   __ insert_w(w_reg, 2, t0);                                 \
   __ insert_w(w_reg, 3, t1);
 
@@ -6059,7 +6335,7 @@
       UNREACHABLE();
   }
 
-  store_uint64_elements_of_vector(assm, w2, a0, t2);
+  store_elements_of_vector(assm, w2, a0);
 
   __ jr(ra);
   __ nop();
@@ -6073,9 +6349,9 @@
 #ifdef OBJECT_PRINT
   code->Print(std::cout);
 #endif
-  F3 f = FUNCTION_CAST<F3>(code->entry());
+  auto f = GeneratedCode<F3>::FromCode(*code);
 
-  (CALL_GENERATED_CODE(isolate, f, &res, 0, 0, 0, 0));
+  (f.Call(&res, 0, 0, 0, 0));
 
   uint64_t mask = i8 * 0x0101010101010101ull;
   switch (opcode) {
@@ -6110,13 +6386,13 @@
     case SHF_B: {
       struct ExpResShf exp_b[] = {
           // i8,              exp_lo,             exp_hi
-          {0xffu, 0x11111111b9b9b9b9, 0xf7f7f7f7c8c8c8c8},
-          {0x0u, 0x62626262dfdfdfdf, 0xd6d6d6d6c8c8c8c8},
-          {0xe4u, 0xf35862e13e38f8b0, 0x4f41ffdef2bfe636},
-          {0x1bu, 0x1b756911c3d9a7b9, 0xae94a5f79c8aefc8},
-          {0xb1u, 0x662b6253e8c4df12, 0x0d3ad6803f8bc88b},
-          {0x4eu, 0x62e1f358f8b03e38, 0xffde4f41e636f2bf},
-          {0x27u, 0x1b697511c3a7d9b9, 0xaea594f79cef8ac8}};
+          {0xFFu, 0x11111111B9B9B9B9, 0xF7F7F7F7C8C8C8C8},
+          {0x0u, 0x62626262DFDFDFDF, 0xD6D6D6D6C8C8C8C8},
+          {0xE4u, 0xF35862E13E38F8B0, 0x4F41FFDEF2BFE636},
+          {0x1Bu, 0x1B756911C3D9A7B9, 0xAE94A5F79C8AEFC8},
+          {0xB1u, 0x662B6253E8C4DF12, 0x0D3AD6803F8BC88B},
+          {0x4Eu, 0x62E1F358F8B03E38, 0xFFDE4F41E636F2BF},
+          {0x27u, 0x1B697511C3A7D9B9, 0xAEA594F79CEF8AC8}};
       for (size_t i = 0; i < sizeof(exp_b) / sizeof(ExpResShf); ++i) {
         if (exp_b[i].i8 == i8) {
           CHECK_EQ(exp_b[i].lo, res.d[0]);
@@ -6127,13 +6403,13 @@
     case SHF_H: {
       struct ExpResShf exp_h[] = {
           //  i8,             exp_lo,             exp_hi
-          {0xffu, 0x1169116911691169, 0xf7a5f7a5f7a5f7a5},
-          {0x0u, 0x12df12df12df12df, 0x8bc88bc88bc88bc8},
-          {0xe4u, 0xf35862e13e38f8b0, 0x4f41ffdef2bfe636},
-          {0x1bu, 0xd9c3b9a7751b1169, 0x8a9cc8ef94aef7a5},
-          {0xb1u, 0x53622b6612dfc4e8, 0x80d63a0d8bc88b3f},
-          {0x4eu, 0x3e38f8b0f35862e1, 0xf2bfe6364f41ffde},
-          {0x27u, 0xd9c3751bb9a71169, 0x8a9c94aec8eff7a5}};
+          {0xFFu, 0x1169116911691169, 0xF7A5F7A5F7A5F7A5},
+          {0x0u, 0x12DF12DF12DF12DF, 0x8BC88BC88BC88BC8},
+          {0xE4u, 0xF35862E13E38F8B0, 0x4F41FFDEF2BFE636},
+          {0x1Bu, 0xD9C3B9A7751B1169, 0x8A9CC8EF94AEF7A5},
+          {0xB1u, 0x53622B6612DFC4E8, 0x80D63A0D8BC88B3F},
+          {0x4Eu, 0x3E38F8B0F35862E1, 0xF2BFE6364F41FFDE},
+          {0x27u, 0xD9C3751BB9A71169, 0x8A9C94AEC8EFF7A5}};
       for (size_t i = 0; i < sizeof(exp_h) / sizeof(ExpResShf); ++i) {
         if (exp_h[i].i8 == i8) {
           CHECK_EQ(exp_h[i].lo, res.d[0]);
@@ -6144,13 +6420,13 @@
     case SHF_W: {
       struct ExpResShf exp_w[] = {
           //  i8,             exp_lo,             exp_hi
-          {0xffu, 0xf7a594aef7a594ae, 0xf7a594aef7a594ae},
-          {0x0u, 0xc4e812dfc4e812df, 0xc4e812dfc4e812df},
-          {0xe4u, 0xf35862e13e38f8b0, 0x4f41ffdef2bfe636},
-          {0x1bu, 0xc8ef8a9cf7a594ae, 0xb9a7d9c31169751b},
-          {0xb1u, 0xc4e812df2b665362, 0x8b3f8bc83a0d80d6},
-          {0x4eu, 0x4f41ffdef2bfe636, 0xf35862e13e38f8b0},
-          {0x27u, 0x1169751bf7a594ae, 0xb9a7d9c3c8ef8a9c}};
+          {0xFFu, 0xF7A594AEF7A594AE, 0xF7A594AEF7A594AE},
+          {0x0u, 0xC4E812DFC4E812DF, 0xC4E812DFC4E812DF},
+          {0xE4u, 0xF35862E13E38F8B0, 0x4F41FFDEF2BFE636},
+          {0x1Bu, 0xC8EF8A9CF7A594AE, 0xB9A7D9C31169751B},
+          {0xB1u, 0xC4E812DF2B665362, 0x8B3F8BC83A0D80D6},
+          {0x4Eu, 0x4F41FFDEF2BFE636, 0xF35862E13E38F8B0},
+          {0x27u, 0x1169751BF7A594AE, 0xB9A7D9C3C8EF8A9C}};
       for (size_t i = 0; i < sizeof(exp_w) / sizeof(ExpResShf); ++i) {
         if (exp_w[i].i8 == i8) {
           CHECK_EQ(exp_w[i].lo, res.d[0]);
@@ -6176,10 +6452,10 @@
   CcTest::InitializeVM();
 
   struct TestCaseMsaI8 tc[] = {// input_lo,         input_hi,           i8
-                               {0x1169751bb9a7d9c3, 0xf7a594aec8ef8a9c, 0xffu},
-                               {0x2b665362c4e812df, 0x3a0d80d68b3f8bc8, 0x0u},
-                               {0x1169751bb9a7d9c3, 0xf7a594aec8ef8a9c, 0x3bu},
-                               {0x2b665362c4e812df, 0x3a0d80d68b3f8bc8, 0xd9u}};
+                               {0x1169751BB9A7D9C3, 0xF7A594AEC8EF8A9C, 0xFFu},
+                               {0x2B665362C4E812DF, 0x3A0D80D68B3F8BC8, 0x0u},
+                               {0x1169751BB9A7D9C3, 0xF7A594AEC8EF8A9C, 0x3Bu},
+                               {0x2B665362C4E812DF, 0x3A0D80D68B3F8BC8, 0xD9u}};
 
   for (size_t i = 0; i < sizeof(tc) / sizeof(TestCaseMsaI8); ++i) {
     run_msa_i8(ANDI_B, tc[i].input_lo, tc[i].input_hi, tc[i].i8);
@@ -6196,10 +6472,10 @@
   CcTest::InitializeVM();
 
   struct TestCaseMsaI8 tc[] = {//          input_lo,          input_hi,    i8
-                               {0x1169751bb9a7d9c3, 0xf7a594aec8ef8a9c, 0xffu},
-                               {0x2b665362c4e812df, 0x3a0d80d68b3f8bc8, 0x0u},
-                               {0x1169751bb9a7d9c3, 0xf7a594aec8ef8a9c, 0x3bu},
-                               {0x2b665362c4e812df, 0x3a0d80d68b3f8bc8, 0xd9u}};
+                               {0x1169751BB9A7D9C3, 0xF7A594AEC8EF8A9C, 0xFFu},
+                               {0x2B665362C4E812DF, 0x3A0D80D68B3F8BC8, 0x0u},
+                               {0x1169751BB9A7D9C3, 0xF7A594AEC8EF8A9C, 0x3Bu},
+                               {0x2B665362C4E812DF, 0x3A0D80D68B3F8BC8, 0xD9u}};
 
   for (size_t i = 0; i < sizeof(tc) / sizeof(TestCaseMsaI8); ++i) {
     run_msa_i8(BMNZI_B, tc[i].input_lo, tc[i].input_hi, tc[i].i8);
@@ -6216,13 +6492,13 @@
 
   struct TestCaseMsaI8 tc[] = {
       //          input_lo,           input_hi,    i8
-      {0x1169751bb9a7d9c3, 0xf7a594aec8ef8a9c, 0xffu},  // 3333
-      {0x2b665362c4e812df, 0x3a0d80d68b3f8bc8, 0x0u},   // 0000
-      {0xf35862e13e38f8b0, 0x4f41ffdef2bfe636, 0xe4u},  // 3210
-      {0x1169751bb9a7d9c3, 0xf7a594aec8ef8a9c, 0x1bu},  // 0123
-      {0x2b665362c4e812df, 0x3a0d80d68b3f8bc8, 0xb1u},  // 2301
-      {0xf35862e13e38f8b0, 0x4f41ffdef2bfe636, 0x4eu},  // 1032
-      {0x1169751bb9a7d9c3, 0xf7a594aec8ef8a9c, 0x27u}   // 0213
+      {0x1169751BB9A7D9C3, 0xF7A594AEC8EF8A9C, 0xFFu},  // 3333
+      {0x2B665362C4E812DF, 0x3A0D80D68B3F8BC8, 0x0u},   // 0000
+      {0xF35862E13E38F8B0, 0x4F41FFDEF2BFE636, 0xE4u},  // 3210
+      {0x1169751BB9A7D9C3, 0xF7A594AEC8EF8A9C, 0x1Bu},  // 0123
+      {0x2B665362C4E812DF, 0x3A0D80D68B3F8BC8, 0xB1u},  // 2301
+      {0xF35862E13E38F8B0, 0x4F41FFDEF2BFE636, 0x4Eu},  // 1032
+      {0x1169751BB9A7D9C3, 0xF7A594AEC8EF8A9C, 0x27u}   // 0213
   };
 
   for (size_t i = 0; i < sizeof(tc) / sizeof(TestCaseMsaI8); ++i) {
@@ -6236,7 +6512,8 @@
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
 
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
 
   __ li(v0, imm);
   __ li(t0, source);
@@ -6248,10 +6525,9 @@
   assm.GetCode(isolate, &desc);
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
-  F2 f = FUNCTION_CAST<F2>(code->entry());
+  auto f = GeneratedCode<F2>::FromCode(*code);
 
-  uint32_t res = reinterpret_cast<uint32_t>(
-      CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0));
+  uint32_t res = reinterpret_cast<uint32_t>(f.Call(0, 0, 0, 0, 0));
 
   return res;
 }
@@ -6260,9 +6536,9 @@
   CcTest::InitializeVM();
 
   //       run_Ins(rt_value, rs_value, pos, size), expected_result
-  CHECK_EQ(run_Ins(0x55555555, 0xabcdef01, 31, 1), 0xd5555555);
-  CHECK_EQ(run_Ins(0x55555555, 0xabcdef02, 30, 2), 0x95555555);
-  CHECK_EQ(run_Ins(0x01234567, 0xfabcdeff, 0, 32), 0xfabcdeff);
+  CHECK_EQ(run_Ins(0x55555555, 0xABCDEF01, 31, 1), 0xD5555555);
+  CHECK_EQ(run_Ins(0x55555555, 0xABCDEF02, 30, 2), 0x95555555);
+  CHECK_EQ(run_Ins(0x01234567, 0xFABCDEFF, 0, 32), 0xFABCDEFF);
 
   // Results with positive sign.
   CHECK_EQ(run_Ins(0x55555550, 0x80000001, 0, 1), 0x55555551);
@@ -6280,16 +6556,17 @@
   CHECK_EQ(run_Ins(0x55555555, 0x80800001, 8, 24), 0x80000155);
   CHECK_EQ(run_Ins(0x55555555, 0x80008001, 16, 16), 0x80015555);
   CHECK_EQ(run_Ins(0x55555555, 0x80000081, 24, 8), 0x81555555);
-  CHECK_EQ(run_Ins(0x75555555, 0x00000001, 31, 1), 0xf5555555);
+  CHECK_EQ(run_Ins(0x75555555, 0x00000001, 31, 1), 0xF5555555);
 }
 
 uint32_t run_Ext(uint32_t source, uint16_t pos, uint16_t size) {
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
 
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
 
-  __ li(v0, 0xffffffff);
+  __ li(v0, 0xFFFFFFFF);
   __ li(t0, source);
   __ Ext(v0, t0, pos, size);
   __ jr(ra);
@@ -6299,10 +6576,9 @@
   assm.GetCode(isolate, &desc);
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
-  F2 f = FUNCTION_CAST<F2>(code->entry());
+  auto f = GeneratedCode<F2>::FromCode(*code);
 
-  uint32_t res = reinterpret_cast<uint32_t>(
-      CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0));
+  uint32_t res = reinterpret_cast<uint32_t>(f.Call(0, 0, 0, 0, 0));
 
   return res;
 }
@@ -6343,17 +6619,18 @@
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
 
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
   CpuFeatureScope fscope(&assm, MIPS_SIMD);
   msa_reg_t res;
   int32_t i5 =
       i5_sign_ext ? static_cast<int32_t>(input->i5 << 27) >> 27 : input->i5;
 
-  load_uint64_elements_of_vector(assm, &(input->ws_lo), w0, t0, t1);
+  load_elements_of_vector(assm, &(input->ws_lo), w0, t0, t1);
 
   GenerateI5InstructionFunc(assm, i5);
 
-  store_uint64_elements_of_vector(assm, w2, a0, t2);
+  store_elements_of_vector(assm, w2, a0);
 
   __ jr(ra);
   __ nop();
@@ -6365,9 +6642,9 @@
 #ifdef OBJECT_PRINT
   code->Print(std::cout);
 #endif
-  F3 f = FUNCTION_CAST<F3>(code->entry());
+  auto f = GeneratedCode<F3>::FromCode(*code);
 
-  (CALL_GENERATED_CODE(isolate, f, &res, 0, 0, 0, 0));
+  (f.Call(&res, 0, 0, 0, 0));
 
   CHECK_EQ(GenerateOperationFunc(input->ws_lo, input->i5), res.d[0]);
   CHECK_EQ(GenerateOperationFunc(input->ws_hi, input->i5), res.d[1]);
@@ -6381,12 +6658,12 @@
 
   struct TestCaseMsaI5 tc[] = {
       //             ws_lo,              ws_hi,         i5
-      {0x1169751bb9a7d9c3, 0xf7a594aec8ef8a9c, 0x0000001f},
-      {0x2b665362c4e812df, 0x3a0d80d68b3f8bc8, 0x0000000f},
-      {0x1169751bb9a7d9c3, 0xf7a594aec8ef8a9c, 0x00000005},
-      {0x2b665362c4e812df, 0x3a0d80d68b3f8bc8, 0x00000010},
-      {0xffab807f807fffcd, 0x7f23ff80ff567f80, 0x0000000f},
-      {0x80ffefff7f12807f, 0x807f80ff7fdeff78, 0x00000010}};
+      {0x1169751BB9A7D9C3, 0xF7A594AEC8EF8A9C, 0x0000001F},
+      {0x2B665362C4E812DF, 0x3A0D80D68B3F8BC8, 0x0000000F},
+      {0x1169751BB9A7D9C3, 0xF7A594AEC8EF8A9C, 0x00000005},
+      {0x2B665362C4E812DF, 0x3A0D80D68B3F8BC8, 0x00000010},
+      {0xFFAB807F807FFFCD, 0x7F23FF80FF567F80, 0x0000000F},
+      {0x80FFEFFF7F12807F, 0x807F80FF7FDEFF78, 0x00000010}};
 
 #define ADDVI_DF(lanes, mask)                               \
   uint64_t res = 0;                                         \
@@ -6457,21 +6734,21 @@
 
   struct TestCaseMsaI5 tc[] = {
       // ws_lo, ws_hi, i5
-      {0x7f80ff3480ff7f00, 0x8d7fff80ff7f6780, 0x0000001f},
-      {0x7f80ff3480ff7f00, 0x8d7fff80ff7f6780, 0x0000000f},
-      {0x7f80ff3480ff7f00, 0x8d7fff80ff7f6780, 0x00000010},
-      {0x80007fff91daffff, 0x7fff8000ffff5678, 0x0000001f},
-      {0x80007fff91daffff, 0x7fff8000ffff5678, 0x0000000f},
-      {0x80007fff91daffff, 0x7fff8000ffff5678, 0x00000010},
-      {0x7fffffff80000000, 0x12345678ffffffff, 0x0000001f},
-      {0x7fffffff80000000, 0x12345678ffffffff, 0x0000000f},
-      {0x7fffffff80000000, 0x12345678ffffffff, 0x00000010},
-      {0x1169751bb9a7d9c3, 0xf7a594aec8ef8a9c, 0x0000001f},
-      {0x2b665362c4e812df, 0x3a0d80d68b3f8bc8, 0x0000000f},
-      {0xf35862e13e38f8b0, 0x4f41ffdef2bfe636, 0x00000010},
-      {0x1169751bb9a7d9c3, 0xf7a594aec8ef8a9c, 0x00000015},
-      {0x2b665362c4e812df, 0x3a0d80d68b3f8bc8, 0x00000009},
-      {0xf35862e13e38f8b0, 0x4f41ffdef2bfe636, 0x00000003}};
+      {0x7F80FF3480FF7F00, 0x8D7FFF80FF7F6780, 0x0000001F},
+      {0x7F80FF3480FF7F00, 0x8D7FFF80FF7F6780, 0x0000000F},
+      {0x7F80FF3480FF7F00, 0x8D7FFF80FF7F6780, 0x00000010},
+      {0x80007FFF91DAFFFF, 0x7FFF8000FFFF5678, 0x0000001F},
+      {0x80007FFF91DAFFFF, 0x7FFF8000FFFF5678, 0x0000000F},
+      {0x80007FFF91DAFFFF, 0x7FFF8000FFFF5678, 0x00000010},
+      {0x7FFFFFFF80000000, 0x12345678FFFFFFFF, 0x0000001F},
+      {0x7FFFFFFF80000000, 0x12345678FFFFFFFF, 0x0000000F},
+      {0x7FFFFFFF80000000, 0x12345678FFFFFFFF, 0x00000010},
+      {0x1169751BB9A7D9C3, 0xF7A594AEC8EF8A9C, 0x0000001F},
+      {0x2B665362C4E812DF, 0x3A0D80D68B3F8BC8, 0x0000000F},
+      {0xF35862E13E38F8B0, 0x4F41FFDEF2BFE636, 0x00000010},
+      {0x1169751BB9A7D9C3, 0xF7A594AEC8EF8A9C, 0x00000015},
+      {0x2B665362C4E812DF, 0x3A0D80D68B3F8BC8, 0x00000009},
+      {0xF35862E13E38F8B0, 0x4F41FFDEF2BFE636, 0x00000003}};
 
 #define MAXI_MINI_S_DF(lanes, mask, func)                                     \
   [](uint64_t ws, uint32_t ui5) {                                             \
@@ -6592,18 +6869,18 @@
   CcTest::InitializeVM();
 
   struct TestCaseMsaI5 tc[] = {
-      {0xff69751bb9a7d9c3, 0xf7a594aec8ff8a9c, 0x0000001f},
-      {0xe669ffffb9a7d9c3, 0xf7a594aeffff8a9c, 0x0000001f},
-      {0xffffffffb9a7d9c3, 0xf7a594aeffffffff, 0x0000001f},
-      {0x2b0b5362c4e812df, 0x3a0d80d68b3f0bc8, 0x0000000b},
-      {0x2b66000bc4e812df, 0x3a0d000b8b3f8bc8, 0x0000000b},
-      {0x0000000bc4e812df, 0x3a0d80d60000000b, 0x0000000b},
-      {0xf38062e13e38f8b0, 0x8041ffdef2bfe636, 0x00000010},
-      {0xf35880003e38f8b0, 0x4f41ffdef2bf8000, 0x00000010},
-      {0xf35862e180000000, 0x80000000f2bfe636, 0x00000010},
-      {0x1169751bb9a7d9c3, 0xf7a594aec8ef8a9c, 0x00000015},
-      {0x2b665362c4e812df, 0x3a0d80d68b3f8bc8, 0x00000009},
-      {0xf30062e13e38f800, 0x4f00ffdef2bf0036, 0x00000000}};
+      {0xFF69751BB9A7D9C3, 0xF7A594AEC8FF8A9C, 0x0000001F},
+      {0xE669FFFFB9A7D9C3, 0xF7A594AEFFFF8A9C, 0x0000001F},
+      {0xFFFFFFFFB9A7D9C3, 0xF7A594AEFFFFFFFF, 0x0000001F},
+      {0x2B0B5362C4E812DF, 0x3A0D80D68B3F0BC8, 0x0000000B},
+      {0x2B66000BC4E812DF, 0x3A0D000B8B3F8BC8, 0x0000000B},
+      {0x0000000BC4E812DF, 0x3A0D80D60000000B, 0x0000000B},
+      {0xF38062E13E38F8B0, 0x8041FFDEF2BFE636, 0x00000010},
+      {0xF35880003E38F8B0, 0x4F41FFDEF2BF8000, 0x00000010},
+      {0xF35862E180000000, 0x80000000F2BFE636, 0x00000010},
+      {0x1169751BB9A7D9C3, 0xF7A594AEC8EF8A9C, 0x00000015},
+      {0x2B665362C4E812DF, 0x3A0D80D68B3F8BC8, 0x00000009},
+      {0xF30062E13E38F800, 0x4F00FFDEF2BF0036, 0x00000000}};
 
 #define CEQI_CLTI_CLEI_S_DF(lanes, mask, func)                                \
   [](uint64_t ws, uint32_t ui5) {                                             \
@@ -6760,22 +7037,21 @@
   uint64_t exp_res_hi;
 };
 
-template <typename Func, typename FuncLoad, typename FuncStore>
+template <typename Func>
 void run_msa_2r(const struct TestCaseMsa2R* input,
-                Func Generate2RInstructionFunc,
-                FuncLoad load_elements_of_vector,
-                FuncStore store_elements_of_vector) {
+                Func Generate2RInstructionFunc) {
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
 
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
   CpuFeatureScope fscope(&assm, MIPS_SIMD);
   msa_reg_t res;
 
   load_elements_of_vector(assm, reinterpret_cast<const uint64_t*>(input), w0,
                           t0, t1);
   Generate2RInstructionFunc(assm);
-  store_elements_of_vector(assm, w2, a0, t2);
+  store_elements_of_vector(assm, w2, a0);
 
   __ jr(ra);
   __ nop();
@@ -6787,21 +7063,12 @@
 #ifdef OBJECT_PRINT
   code->Print(std::cout);
 #endif
-  F3 f = FUNCTION_CAST<F3>(code->entry());
+  auto f = GeneratedCode<F3>::FromCode(*code);
 
-  (CALL_GENERATED_CODE(isolate, f, &res, 0, 0, 0, 0));
+  (f.Call(&res, 0, 0, 0, 0));
 
-  if (store_elements_of_vector == store_uint64_elements_of_vector) {
-    CHECK_EQ(input->exp_res_lo, res.d[0]);
-    CHECK_EQ(input->exp_res_hi, res.d[1]);
-  } else if (store_elements_of_vector == store_uint32_elements_of_vector) {
-    const uint32_t* exp_res =
-        reinterpret_cast<const uint32_t*>(&input->exp_res_lo);
-    CHECK_EQ(exp_res[0], res.w[0]);
-    CHECK_EQ(exp_res[1], res.w[1]);
-    CHECK_EQ(exp_res[2], res.w[2]);
-    CHECK_EQ(exp_res[3], res.w[3]);
-  }
+  CHECK_EQ(input->exp_res_lo, res.d[0]);
+  CHECK_EQ(input->exp_res_hi, res.d[1]);
 }
 
 TEST(MSA_pcnt) {
@@ -6812,54 +7079,50 @@
 
   struct TestCaseMsa2R tc_b[] = {// ws_lo, ws_hi, exp_res_lo, exp_res_hi
                                  {0x0000000000000000, 0x0000000000000000, 0, 0},
-                                 {0xffffffffffffffff, 0xffffffffffffffff,
+                                 {0xFFFFFFFFFFFFFFFF, 0xFFFFFFFFFFFFFFFF,
                                   0x0808080808080808, 0x0808080808080808},
-                                 {0x1169751bb9a7d9c3, 0xf7a594aec8ef8a9c,
+                                 {0x1169751BB9A7D9C3, 0xF7A594AEC8EF8A9C,
                                   0x0204050405050504, 0x0704030503070304},
-                                 {0x2b665362c4e812df, 0x3a0d80d68b3f8bc8,
+                                 {0x2B665362C4E812DF, 0x3A0D80D68B3F8BC8,
                                   0x0404040303040207, 0x0403010504060403},
-                                 {0xf35862e13e38f8b0, 0x4f41ffdef2bfe636,
+                                 {0xF35862E13E38F8B0, 0x4F41FFDEF2BFE636,
                                   0x0603030405030503, 0x0502080605070504}};
 
   struct TestCaseMsa2R tc_h[] = {// ws_lo, ws_hi, exp_res_lo, exp_res_hi
                                  {0x0000000000000000, 0x0000000000000000, 0, 0},
-                                 {0xffffffffffffffff, 0xffffffffffffffff,
+                                 {0xFFFFFFFFFFFFFFFF, 0xFFFFFFFFFFFFFFFF,
                                   0x0010001000100010, 0x0010001000100010},
-                                 {0x1169751bb9a7d9c3, 0xf7a594aec8ef8a9c,
-                                  0x00060009000a0009, 0x000b0008000a0007},
-                                 {0x2b665362c4e812df, 0x3a0d80d68b3f8bc8,
-                                  0x0008000700070009, 0x00070006000a0007},
-                                 {0xf35862e13e38f8b0, 0x4f41ffdef2bfe636,
-                                  0x0009000700080008, 0x0007000e000c0009}};
+                                 {0x1169751BB9A7D9C3, 0xF7A594AEC8EF8A9C,
+                                  0x00060009000A0009, 0x000B0008000A0007},
+                                 {0x2B665362C4E812DF, 0x3A0D80D68B3F8BC8,
+                                  0x0008000700070009, 0x00070006000A0007},
+                                 {0xF35862E13E38F8B0, 0x4F41FFDEF2BFE636,
+                                  0x0009000700080008, 0x0007000E000C0009}};
 
   struct TestCaseMsa2R tc_w[] = {// ws_lo, ws_hi, exp_res_lo, exp_res_hi
                                  {0x0000000000000000, 0x0000000000000000, 0, 0},
-                                 {0xffffffffffffffff, 0xffffffffffffffff,
+                                 {0xFFFFFFFFFFFFFFFF, 0xFFFFFFFFFFFFFFFF,
                                   0x0000002000000020, 0x0000002000000020},
-                                 {0x1169751bb9a7d9c3, 0xf7a594aec8ef8a9c,
-                                  0x0000000f00000013, 0x0000001300000011},
-                                 {0x2b665362c4e812df, 0x3a0d80d68b3f8bc8,
-                                  0x0000000f00000010, 0x0000000d00000011},
-                                 {0xf35862e13e38f8b0, 0x4f41ffdef2bfe636,
+                                 {0x1169751BB9A7D9C3, 0xF7A594AEC8EF8A9C,
+                                  0x0000000F00000013, 0x0000001300000011},
+                                 {0x2B665362C4E812DF, 0x3A0D80D68B3F8BC8,
+                                  0x0000000F00000010, 0x0000000D00000011},
+                                 {0xF35862E13E38F8B0, 0x4F41FFDEF2BFE636,
                                   0x0000001000000010, 0x0000001500000015}};
 
   struct TestCaseMsa2R tc_d[] = {
       // ws_lo, ws_hi, exp_res_lo, exp_res_hi
       {0x0000000000000000, 0x0000000000000000, 0, 0},
-      {0xffffffffffffffff, 0xffffffffffffffff, 0x40, 0x40},
-      {0x1169751bb9a7d9c3, 0xf7a594aec8ef8a9c, 0x22, 0x24},
-      {0x2b665362c4e812df, 0x3a0d80d68b3f8bc8, 0x1f, 0x1e},
-      {0xf35862e13e38f8b0, 0x4f41ffdef2bfe636, 0x20, 0x2a}};
+      {0xFFFFFFFFFFFFFFFF, 0xFFFFFFFFFFFFFFFF, 0x40, 0x40},
+      {0x1169751BB9A7D9C3, 0xF7A594AEC8EF8A9C, 0x22, 0x24},
+      {0x2B665362C4E812DF, 0x3A0D80D68B3F8BC8, 0x1F, 0x1E},
+      {0xF35862E13E38F8B0, 0x4F41FFDEF2BFE636, 0x20, 0x2A}};
 
   for (size_t i = 0; i < sizeof(tc_b) / sizeof(TestCaseMsa2R); ++i) {
-    run_msa_2r(&tc_b[i], [](MacroAssembler& assm) { __ pcnt_b(w2, w0); },
-               load_uint64_elements_of_vector, store_uint64_elements_of_vector);
-    run_msa_2r(&tc_h[i], [](MacroAssembler& assm) { __ pcnt_h(w2, w0); },
-               load_uint64_elements_of_vector, store_uint64_elements_of_vector);
-    run_msa_2r(&tc_w[i], [](MacroAssembler& assm) { __ pcnt_w(w2, w0); },
-               load_uint64_elements_of_vector, store_uint64_elements_of_vector);
-    run_msa_2r(&tc_d[i], [](MacroAssembler& assm) { __ pcnt_d(w2, w0); },
-               load_uint64_elements_of_vector, store_uint64_elements_of_vector);
+    run_msa_2r(&tc_b[i], [](MacroAssembler& assm) { __ pcnt_b(w2, w0); });
+    run_msa_2r(&tc_h[i], [](MacroAssembler& assm) { __ pcnt_h(w2, w0); });
+    run_msa_2r(&tc_w[i], [](MacroAssembler& assm) { __ pcnt_w(w2, w0); });
+    run_msa_2r(&tc_d[i], [](MacroAssembler& assm) { __ pcnt_d(w2, w0); });
   }
 }
 
@@ -6872,53 +7135,49 @@
   struct TestCaseMsa2R tc_b[] = {// ws_lo, ws_hi, exp_res_lo, exp_res_hi
                                  {0x0000000000000000, 0x0000000000000000,
                                   0x0808080808080808, 0x0808080808080808},
-                                 {0xffffffffffffffff, 0xffffffffffffffff, 0, 0},
-                                 {0x1169350b07030100, 0x7f011402381f0a6c,
+                                 {0xFFFFFFFFFFFFFFFF, 0xFFFFFFFFFFFFFFFF, 0, 0},
+                                 {0x1169350B07030100, 0x7F011402381F0A6C,
                                   0x0301020405060708, 0x0107030602030401},
-                                 {0x010806003478121f, 0x03013016073f7b08,
+                                 {0x010806003478121F, 0x03013016073F7B08,
                                   0x0704050802010303, 0x0607020305020104},
-                                 {0x0168321100083803, 0x07113f03013f1676,
+                                 {0x0168321100083803, 0x07113F03013F1676,
                                   0x0701020308040206, 0x0503020607020301}};
 
   struct TestCaseMsa2R tc_h[] = {// ws_lo, ws_hi, exp_res_lo, exp_res_hi
                                  {0x0000000000000000, 0x0000000000000000,
                                   0x0010001000100010, 0x0010001000100010},
-                                 {0xffffffffffffffff, 0xffffffffffffffff, 0, 0},
-                                 {0x00010007000a003c, 0x37a5001e00010002,
-                                  0x000f000d000c000a, 0x0002000b000f000e},
-                                 {0x0026066200780edf, 0x003d0003000f00c8,
-                                  0x000a000500090004, 0x000a000e000c0008},
-                                 {0x335807e100480030, 0x01410fde12bf5636,
-                                  0x000200050009000a, 0x0007000400030001}};
+                                 {0xFFFFFFFFFFFFFFFF, 0xFFFFFFFFFFFFFFFF, 0, 0},
+                                 {0x00010007000A003C, 0x37A5001E00010002,
+                                  0x000F000D000C000A, 0x0002000B000F000E},
+                                 {0x0026066200780EDF, 0x003D0003000F00C8,
+                                  0x000A000500090004, 0x000A000E000C0008},
+                                 {0x335807E100480030, 0x01410FDE12BF5636,
+                                  0x000200050009000A, 0x0007000400030001}};
 
   struct TestCaseMsa2R tc_w[] = {// ws_lo, ws_hi, exp_res_lo, exp_res_hi
                                  {0x0000000000000000, 0x0000000000000000,
                                   0x0000002000000020, 0x0000002000000020},
-                                 {0xffffffffffffffff, 0xffffffffffffffff, 0, 0},
-                                 {0x00000005000007c3, 0x000014ae00006a9c,
-                                  0x0000001d00000015, 0x0000001300000011},
-                                 {0x00009362000112df, 0x000380d6003f8bc8,
-                                  0x000000100000000f, 0x0000000e0000000a},
-                                 {0x135862e17e38f8b0, 0x0061ffde03bfe636,
+                                 {0xFFFFFFFFFFFFFFFF, 0xFFFFFFFFFFFFFFFF, 0, 0},
+                                 {0x00000005000007C3, 0x000014AE00006A9C,
+                                  0x0000001D00000015, 0x0000001300000011},
+                                 {0x00009362000112DF, 0x000380D6003F8BC8,
+                                  0x000000100000000F, 0x0000000E0000000A},
+                                 {0x135862E17E38F8B0, 0x0061FFDE03BFE636,
                                   0x0000000300000001, 0x0000000900000006}};
 
   struct TestCaseMsa2R tc_d[] = {
       // ws_lo, ws_hi, exp_res_lo, exp_res_hi
       {0x0000000000000000, 0x0000000000000000, 0x40, 0x40},
-      {0xffffffffffffffff, 0xffffffffffffffff, 0, 0},
-      {0x000000000000014e, 0x00000000000176da, 0x37, 0x2f},
-      {0x00000062c4e812df, 0x000065d68b3f8bc8, 0x19, 0x11},
-      {0x00000000e338f8b0, 0x0754534acab32654, 0x20, 0x5}};
+      {0xFFFFFFFFFFFFFFFF, 0xFFFFFFFFFFFFFFFF, 0, 0},
+      {0x000000000000014E, 0x00000000000176DA, 0x37, 0x2F},
+      {0x00000062C4E812DF, 0x000065D68B3F8BC8, 0x19, 0x11},
+      {0x00000000E338F8B0, 0x0754534ACAB32654, 0x20, 0x5}};
 
   for (size_t i = 0; i < sizeof(tc_b) / sizeof(TestCaseMsa2R); ++i) {
-    run_msa_2r(&tc_b[i], [](MacroAssembler& assm) { __ nlzc_b(w2, w0); },
-               load_uint64_elements_of_vector, store_uint64_elements_of_vector);
-    run_msa_2r(&tc_h[i], [](MacroAssembler& assm) { __ nlzc_h(w2, w0); },
-               load_uint64_elements_of_vector, store_uint64_elements_of_vector);
-    run_msa_2r(&tc_w[i], [](MacroAssembler& assm) { __ nlzc_w(w2, w0); },
-               load_uint64_elements_of_vector, store_uint64_elements_of_vector);
-    run_msa_2r(&tc_d[i], [](MacroAssembler& assm) { __ nlzc_d(w2, w0); },
-               load_uint64_elements_of_vector, store_uint64_elements_of_vector);
+    run_msa_2r(&tc_b[i], [](MacroAssembler& assm) { __ nlzc_b(w2, w0); });
+    run_msa_2r(&tc_h[i], [](MacroAssembler& assm) { __ nlzc_h(w2, w0); });
+    run_msa_2r(&tc_w[i], [](MacroAssembler& assm) { __ nlzc_w(w2, w0); });
+    run_msa_2r(&tc_d[i], [](MacroAssembler& assm) { __ nlzc_d(w2, w0); });
   }
 }
 
@@ -6929,7 +7188,7 @@
   CcTest::InitializeVM();
 
   struct TestCaseMsa2R tc_b[] = {// ws_lo, ws_hi, exp_res_lo, exp_res_hi
-                                 {0xffffffffffffffff, 0xffffffffffffffff,
+                                 {0xFFFFFFFFFFFFFFFF, 0xFFFFFFFFFFFFFFFF,
                                   0x0808080808080808, 0x0808080808080808},
                                  {0x0000000000000000, 0x0000000000000000, 0, 0},
                                  {0xEE96CAF4F8FCFEFF, 0x80FEEBFDC7E0F593,
@@ -6940,44 +7199,40 @@
                                   0x0701020308040206, 0x0503020607020301}};
 
   struct TestCaseMsa2R tc_h[] = {// ws_lo, ws_hi, exp_res_lo, exp_res_hi
-                                 {0xffffffffffffffff, 0xffffffffffffffff,
+                                 {0xFFFFFFFFFFFFFFFF, 0xFFFFFFFFFFFFFFFF,
                                   0x0010001000100010, 0x0010001000100010},
                                  {0x0000000000000000, 0x0000000000000000, 0, 0},
                                  {0xFFFEFFF8FFF5FFC3, 0xC85AFFE1FFFEFFFD,
-                                  0x000f000d000c000a, 0x0002000b000f000e},
+                                  0x000F000D000C000A, 0x0002000B000F000E},
                                  {0xFFD9F99DFF87F120, 0xFFC2FFFCFFF0FF37,
-                                  0x000a000500090004, 0x000a000e000c0008},
+                                  0x000A000500090004, 0x000A000E000C0008},
                                  {0xCCA7F81EFFB7FFCF, 0xFEBEF021ED40A9C9,
-                                  0x000200050009000a, 0x0007000400030001}};
+                                  0x000200050009000A, 0x0007000400030001}};
 
   struct TestCaseMsa2R tc_w[] = {// ws_lo, ws_hi, exp_res_lo, exp_res_hi
-                                 {0xffffffffffffffff, 0xffffffffffffffff,
+                                 {0xFFFFFFFFFFFFFFFF, 0xFFFFFFFFFFFFFFFF,
                                   0x0000002000000020, 0x0000002000000020},
                                  {0x0000000000000000, 0x0000000000000000, 0, 0},
                                  {0xFFFFFFFAFFFFF83C, 0xFFFFEB51FFFF9563,
-                                  0x0000001d00000015, 0x0000001300000011},
+                                  0x0000001D00000015, 0x0000001300000011},
                                  {0xFFFF6C9DFFFEED20, 0xFFFC7F29FFC07437,
-                                  0x000000100000000f, 0x0000000e0000000a},
+                                  0x000000100000000F, 0x0000000E0000000A},
                                  {0xECA79D1E81C7074F, 0xFF9E0021FC4019C9,
                                   0x0000000300000001, 0x0000000900000006}};
 
   struct TestCaseMsa2R tc_d[] = {
       // ws_lo, ws_hi, exp_res_lo, exp_res_hi
-      {0xffffffffffffffff, 0xffffffffffffffff, 0x40, 0x40},
+      {0xFFFFFFFFFFFFFFFF, 0xFFFFFFFFFFFFFFFF, 0x40, 0x40},
       {0x0000000000000000, 0x0000000000000000, 0, 0},
-      {0xFFFFFFFFFFFFFEB1, 0xFFFFFFFFFFFE8925, 0x37, 0x2f},
+      {0xFFFFFFFFFFFFFEB1, 0xFFFFFFFFFFFE8925, 0x37, 0x2F},
       {0xFFFFFF9D3B17ED20, 0xFFFF9A2974C07437, 0x19, 0x11},
       {0xFFFFFFFF1CC7074F, 0xF8ABACB5354CD9AB, 0x20, 0x5}};
 
   for (size_t i = 0; i < sizeof(tc_b) / sizeof(TestCaseMsa2R); ++i) {
-    run_msa_2r(&tc_b[i], [](MacroAssembler& assm) { __ nloc_b(w2, w0); },
-               load_uint64_elements_of_vector, store_uint64_elements_of_vector);
-    run_msa_2r(&tc_h[i], [](MacroAssembler& assm) { __ nloc_h(w2, w0); },
-               load_uint64_elements_of_vector, store_uint64_elements_of_vector);
-    run_msa_2r(&tc_w[i], [](MacroAssembler& assm) { __ nloc_w(w2, w0); },
-               load_uint64_elements_of_vector, store_uint64_elements_of_vector);
-    run_msa_2r(&tc_d[i], [](MacroAssembler& assm) { __ nloc_d(w2, w0); },
-               load_uint64_elements_of_vector, store_uint64_elements_of_vector);
+    run_msa_2r(&tc_b[i], [](MacroAssembler& assm) { __ nloc_b(w2, w0); });
+    run_msa_2r(&tc_h[i], [](MacroAssembler& assm) { __ nloc_h(w2, w0); });
+    run_msa_2r(&tc_w[i], [](MacroAssembler& assm) { __ nloc_w(w2, w0); });
+    run_msa_2r(&tc_d[i], [](MacroAssembler& assm) { __ nloc_d(w2, w0); });
   }
 }
 
@@ -7038,13 +7293,11 @@
 
   for (size_t i = 0; i < sizeof(tc_s) / sizeof(TestCaseMsa2RF_F_U); ++i) {
     run_msa_2r(reinterpret_cast<const TestCaseMsa2R*>(&tc_s[i]),
-               [](MacroAssembler& assm) { __ fclass_w(w2, w0); },
-               load_uint32_elements_of_vector, store_uint32_elements_of_vector);
+               [](MacroAssembler& assm) { __ fclass_w(w2, w0); });
   }
   for (size_t i = 0; i < sizeof(tc_d) / sizeof(TestCaseMsa2RF_D_U); ++i) {
     run_msa_2r(reinterpret_cast<const TestCaseMsa2R*>(&tc_d[i]),
-               [](MacroAssembler& assm) { __ fclass_d(w2, w0); },
-               load_uint64_elements_of_vector, store_uint64_elements_of_vector);
+               [](MacroAssembler& assm) { __ fclass_d(w2, w0); });
   }
 
 #undef BIT
@@ -7110,13 +7363,11 @@
 
   for (size_t i = 0; i < sizeof(tc_s) / sizeof(TestCaseMsa2RF_F_I); ++i) {
     run_msa_2r(reinterpret_cast<const TestCaseMsa2R*>(&tc_s[i]),
-               [](MacroAssembler& assm) { __ ftrunc_s_w(w2, w0); },
-               load_uint32_elements_of_vector, store_uint32_elements_of_vector);
+               [](MacroAssembler& assm) { __ ftrunc_s_w(w2, w0); });
   }
   for (size_t i = 0; i < sizeof(tc_d) / sizeof(TestCaseMsa2RF_D_I); ++i) {
     run_msa_2r(reinterpret_cast<const TestCaseMsa2R*>(&tc_d[i]),
-               [](MacroAssembler& assm) { __ ftrunc_s_d(w2, w0); },
-               load_uint64_elements_of_vector, store_uint64_elements_of_vector);
+               [](MacroAssembler& assm) { __ ftrunc_s_d(w2, w0); });
   }
 }
 
@@ -7149,13 +7400,11 @@
 
   for (size_t i = 0; i < sizeof(tc_s) / sizeof(TestCaseMsa2RF_F_U); ++i) {
     run_msa_2r(reinterpret_cast<const TestCaseMsa2R*>(&tc_s[i]),
-               [](MacroAssembler& assm) { __ ftrunc_u_w(w2, w0); },
-               load_uint32_elements_of_vector, store_uint32_elements_of_vector);
+               [](MacroAssembler& assm) { __ ftrunc_u_w(w2, w0); });
   }
   for (size_t i = 0; i < sizeof(tc_d) / sizeof(TestCaseMsa2RF_D_U); ++i) {
     run_msa_2r(reinterpret_cast<const TestCaseMsa2R*>(&tc_d[i]),
-               [](MacroAssembler& assm) { __ ftrunc_u_d(w2, w0); },
-               load_uint64_elements_of_vector, store_uint64_elements_of_vector);
+               [](MacroAssembler& assm) { __ ftrunc_u_d(w2, w0); });
   }
 }
 
@@ -7194,13 +7443,11 @@
 
   for (size_t i = 0; i < sizeof(tc_s) / sizeof(TestCaseMsa2RF_F_F); ++i) {
     run_msa_2r(reinterpret_cast<const TestCaseMsa2R*>(&tc_s[i]),
-               [](MacroAssembler& assm) { __ fsqrt_w(w2, w0); },
-               load_uint32_elements_of_vector, store_uint32_elements_of_vector);
+               [](MacroAssembler& assm) { __ fsqrt_w(w2, w0); });
   }
   for (size_t i = 0; i < sizeof(tc_d) / sizeof(TestCaseMsa2RF_D_D); ++i) {
     run_msa_2r(reinterpret_cast<const TestCaseMsa2R*>(&tc_d[i]),
-               [](MacroAssembler& assm) { __ fsqrt_d(w2, w0); },
-               load_uint64_elements_of_vector, store_uint64_elements_of_vector);
+               [](MacroAssembler& assm) { __ fsqrt_d(w2, w0); });
   }
 }
 
@@ -7224,13 +7471,11 @@
 
   for (size_t i = 0; i < sizeof(tc_s) / sizeof(TestCaseMsa2RF_F_F); ++i) {
     run_msa_2r(reinterpret_cast<const TestCaseMsa2R*>(&tc_s[i]),
-               [](MacroAssembler& assm) { __ frsqrt_w(w2, w0); },
-               load_uint32_elements_of_vector, store_uint32_elements_of_vector);
+               [](MacroAssembler& assm) { __ frsqrt_w(w2, w0); });
   }
   for (size_t i = 0; i < sizeof(tc_d) / sizeof(TestCaseMsa2RF_D_D); ++i) {
     run_msa_2r(reinterpret_cast<const TestCaseMsa2R*>(&tc_d[i]),
-               [](MacroAssembler& assm) { __ frsqrt_d(w2, w0); },
-               load_uint64_elements_of_vector, store_uint64_elements_of_vector);
+               [](MacroAssembler& assm) { __ frsqrt_d(w2, w0); });
   }
 }
 
@@ -7256,13 +7501,11 @@
 
   for (size_t i = 0; i < sizeof(tc_s) / sizeof(TestCaseMsa2RF_F_F); ++i) {
     run_msa_2r(reinterpret_cast<const TestCaseMsa2R*>(&tc_s[i]),
-               [](MacroAssembler& assm) { __ frcp_w(w2, w0); },
-               load_uint32_elements_of_vector, store_uint32_elements_of_vector);
+               [](MacroAssembler& assm) { __ frcp_w(w2, w0); });
   }
   for (size_t i = 0; i < sizeof(tc_d) / sizeof(TestCaseMsa2RF_D_D); ++i) {
     run_msa_2r(reinterpret_cast<const TestCaseMsa2R*>(&tc_d[i]),
-               [](MacroAssembler& assm) { __ frcp_d(w2, w0); },
-               load_uint64_elements_of_vector, store_uint64_elements_of_vector);
+               [](MacroAssembler& assm) { __ frcp_d(w2, w0); });
   }
 }
 
@@ -7277,8 +7520,7 @@
                  __ ctcmsa(msareg, t0);
                  __ frint_w(w2, w0);
                  __ ctcmsa(msareg, t1);
-               },
-               load_uint32_elements_of_vector, store_uint32_elements_of_vector);
+               });
   }
 }
 
@@ -7293,8 +7535,7 @@
                  __ ctcmsa(msareg, t0);
                  __ frint_d(w2, w0);
                  __ ctcmsa(msareg, t1);
-               },
-               load_uint64_elements_of_vector, store_uint64_elements_of_vector);
+               });
   }
 }
 
@@ -7376,14 +7617,12 @@
 
   for (size_t i = 0; i < sizeof(tc_s) / sizeof(TestCaseMsa2RF_F_F); ++i) {
     run_msa_2r(reinterpret_cast<const TestCaseMsa2R*>(&tc_s[i]),
-               [](MacroAssembler& assm) { __ flog2_w(w2, w0); },
-               load_uint32_elements_of_vector, store_uint32_elements_of_vector);
+               [](MacroAssembler& assm) { __ flog2_w(w2, w0); });
   }
 
   for (size_t i = 0; i < sizeof(tc_d) / sizeof(TestCaseMsa2RF_D_D); ++i) {
     run_msa_2r(reinterpret_cast<const TestCaseMsa2R*>(&tc_d[i]),
-               [](MacroAssembler& assm) { __ flog2_d(w2, w0); },
-               load_uint64_elements_of_vector, store_uint64_elements_of_vector);
+               [](MacroAssembler& assm) { __ flog2_d(w2, w0); });
   }
 }
 
@@ -7398,8 +7637,7 @@
                  __ ctcmsa(msareg, t0);
                  __ ftint_s_w(w2, w0);
                  __ ctcmsa(msareg, t1);
-               },
-               load_uint32_elements_of_vector, store_uint32_elements_of_vector);
+               });
   }
 }
 
@@ -7414,8 +7652,7 @@
                  __ ctcmsa(msareg, t0);
                  __ ftint_s_d(w2, w0);
                  __ ctcmsa(msareg, t1);
-               },
-               load_uint64_elements_of_vector, store_uint64_elements_of_vector);
+               });
   }
 }
 
@@ -7512,8 +7749,7 @@
                  __ ctcmsa(msareg, t0);
                  __ ftint_u_w(w2, w0);
                  __ ctcmsa(msareg, t1);
-               },
-               load_uint32_elements_of_vector, store_uint32_elements_of_vector);
+               });
   }
 }
 
@@ -7528,8 +7764,7 @@
                  __ ctcmsa(msareg, t0);
                  __ ftint_u_d(w2, w0);
                  __ ctcmsa(msareg, t1);
-               },
-               load_uint64_elements_of_vector, store_uint64_elements_of_vector);
+               });
   }
 }
 
@@ -7645,13 +7880,11 @@
 
   for (size_t i = 0; i < sizeof(tc_s) / sizeof(TestCaseMsa2RF_U_F); ++i) {
     run_msa_2r(reinterpret_cast<const TestCaseMsa2R*>(&tc_s[i]),
-               [](MacroAssembler& assm) { __ ffint_u_w(w2, w0); },
-               load_uint32_elements_of_vector, store_uint32_elements_of_vector);
+               [](MacroAssembler& assm) { __ ffint_u_w(w2, w0); });
   }
   for (size_t i = 0; i < sizeof(tc_d) / sizeof(TestCaseMsa2RF_U_D); ++i) {
     run_msa_2r(reinterpret_cast<const TestCaseMsa2R*>(&tc_d[i]),
-               [](MacroAssembler& assm) { __ ffint_u_d(w2, w0); },
-               load_uint64_elements_of_vector, store_uint64_elements_of_vector);
+               [](MacroAssembler& assm) { __ ffint_u_d(w2, w0); });
   }
 }
 
@@ -7687,13 +7920,11 @@
 
   for (size_t i = 0; i < sizeof(tc_s) / sizeof(TestCaseMsa2RF_I_F); ++i) {
     run_msa_2r(reinterpret_cast<const TestCaseMsa2R*>(&tc_s[i]),
-               [](MacroAssembler& assm) { __ ffint_s_w(w2, w0); },
-               load_uint32_elements_of_vector, store_uint32_elements_of_vector);
+               [](MacroAssembler& assm) { __ ffint_s_w(w2, w0); });
   }
   for (size_t i = 0; i < sizeof(tc_d) / sizeof(TestCaseMsa2RF_I_D); ++i) {
     run_msa_2r(reinterpret_cast<const TestCaseMsa2R*>(&tc_d[i]),
-               [](MacroAssembler& assm) { __ ffint_s_d(w2, w0); },
-               load_uint64_elements_of_vector, store_uint64_elements_of_vector);
+               [](MacroAssembler& assm) { __ ffint_s_d(w2, w0); });
   }
 }
 
@@ -7731,11 +7962,11 @@
   const double inf_double = std::numeric_limits<double>::infinity();
 
   struct TestCaseMsa2RF_U16_F tc_s[] = {
-      {1, 2, 0x7c00, 0x0c00, 0, 0x7c00, 0xfc00, 0x8000, 0.f, inf_float,
+      {1, 2, 0x7C00, 0x0C00, 0, 0x7C00, 0xFC00, 0x8000, 0.f, inf_float,
        -inf_float, -0.f},
-      {0xfc00, 0xffff, 0x00ff, 0x8000, 0x81fe, 0x8000, 0x0345, 0xaaaa,
+      {0xFC00, 0xFFFF, 0x00FF, 0x8000, 0x81FE, 0x8000, 0x0345, 0xAAAA,
        -3.0398368835e-5f, -0.f, 4.9889088e-5f, -5.2062988281e-2f},
-      {3, 4, 0x5555, 6, 0x2aaa, 0x8700, 0x7777, 0x6a8b, 5.2062988281e-2f,
+      {3, 4, 0x5555, 6, 0x2AAA, 0x8700, 0x7777, 0x6A8B, 5.2062988281e-2f,
        -1.06811523458e-4f, 3.0576e4f, 3.35e3f}};
 
   struct TestCaseMsa2RF_F_D tc_d[] = {
@@ -7746,13 +7977,11 @@
 
   for (size_t i = 0; i < sizeof(tc_s) / sizeof(TestCaseMsa2RF_U16_F); ++i) {
     run_msa_2r(reinterpret_cast<const TestCaseMsa2R*>(&tc_s[i]),
-               [](MacroAssembler& assm) { __ fexupl_w(w2, w0); },
-               load_uint16_elements_of_vector, store_uint32_elements_of_vector);
+               [](MacroAssembler& assm) { __ fexupl_w(w2, w0); });
   }
   for (size_t i = 0; i < sizeof(tc_d) / sizeof(TestCaseMsa2RF_F_D); ++i) {
     run_msa_2r(reinterpret_cast<const TestCaseMsa2R*>(&tc_d[i]),
-               [](MacroAssembler& assm) { __ fexupl_d(w2, w0); },
-               load_uint32_elements_of_vector, store_uint64_elements_of_vector);
+               [](MacroAssembler& assm) { __ fexupl_d(w2, w0); });
   }
 }
 
@@ -7766,11 +7995,11 @@
   const double inf_double = std::numeric_limits<double>::infinity();
 
   struct TestCaseMsa2RF_U16_F tc_s[] = {
-      {0, 0x7c00, 0xfc00, 0x8000, 1, 2, 0x7c00, 0x0c00, 0.f, inf_float,
+      {0, 0x7C00, 0xFC00, 0x8000, 1, 2, 0x7C00, 0x0C00, 0.f, inf_float,
        -inf_float, -0.f},
-      {0x81fe, 0x8000, 0x0345, 0xaaaa, 0xfc00, 0xffff, 0x00ff, 0x8000,
+      {0x81FE, 0x8000, 0x0345, 0xAAAA, 0xFC00, 0xFFFF, 0x00FF, 0x8000,
        -3.0398368835e-5f, -0.f, 4.9889088e-5f, -5.2062988281e-2f},
-      {0x2aaa, 0x8700, 0x7777, 0x6a8b, 3, 4, 0x5555, 6, 5.2062988281e-2f,
+      {0x2AAA, 0x8700, 0x7777, 0x6A8B, 3, 4, 0x5555, 6, 5.2062988281e-2f,
        -1.06811523458e-4f, 3.0576e4f, 3.35e3f}};
 
   struct TestCaseMsa2RF_F_D tc_d[] = {
@@ -7781,13 +8010,11 @@
 
   for (size_t i = 0; i < sizeof(tc_s) / sizeof(TestCaseMsa2RF_U16_F); ++i) {
     run_msa_2r(reinterpret_cast<const TestCaseMsa2R*>(&tc_s[i]),
-               [](MacroAssembler& assm) { __ fexupr_w(w2, w0); },
-               load_uint16_elements_of_vector, store_uint32_elements_of_vector);
+               [](MacroAssembler& assm) { __ fexupr_w(w2, w0); });
   }
   for (size_t i = 0; i < sizeof(tc_d) / sizeof(TestCaseMsa2RF_F_D); ++i) {
     run_msa_2r(reinterpret_cast<const TestCaseMsa2R*>(&tc_d[i]),
-               [](MacroAssembler& assm) { __ fexupr_d(w2, w0); },
-               load_uint32_elements_of_vector, store_uint64_elements_of_vector);
+               [](MacroAssembler& assm) { __ fexupr_d(w2, w0); });
   }
 }
 
@@ -7806,23 +8033,21 @@
 
   CcTest::InitializeVM();
 
-  struct TestCaseMsa2RF_U16_F tc_s[] = {{0, 3, 0xffff, 0x8000, 0x8000, 0xe000,
+  struct TestCaseMsa2RF_U16_F tc_s[] = {{0, 3, 0xFFFF, 0x8000, 0x8000, 0xE000,
                                          0x0FF0, 0, -1.f, -0.25f,
                                          0.12451171875f, 0.f}};
 
   struct TestCaseMsa2RF_U32_D tc_d[] = {
-      {0, 45, 0x80000000, 0xe0000000, -1., -0.25},
-      {0x28379, 0xaaaa5555, 0x024903d3, 0, 17.853239085525274277e-3, 0.}};
+      {0, 45, 0x80000000, 0xE0000000, -1., -0.25},
+      {0x28379, 0xAAAA5555, 0x024903D3, 0, 17.853239085525274277e-3, 0.}};
 
   for (size_t i = 0; i < sizeof(tc_s) / sizeof(TestCaseMsa2RF_U16_F); ++i) {
     run_msa_2r(reinterpret_cast<const TestCaseMsa2R*>(&tc_s[i]),
-               [](MacroAssembler& assm) { __ ffql_w(w2, w0); },
-               load_uint16_elements_of_vector, store_uint32_elements_of_vector);
+               [](MacroAssembler& assm) { __ ffql_w(w2, w0); });
   }
   for (size_t i = 0; i < sizeof(tc_d) / sizeof(TestCaseMsa2RF_U32_D); ++i) {
     run_msa_2r(reinterpret_cast<const TestCaseMsa2R*>(&tc_d[i]),
-               [](MacroAssembler& assm) { __ ffql_d(w2, w0); },
-               load_uint32_elements_of_vector, store_uint64_elements_of_vector);
+               [](MacroAssembler& assm) { __ ffql_d(w2, w0); });
   }
 }
 
@@ -7832,23 +8057,21 @@
 
   CcTest::InitializeVM();
 
-  struct TestCaseMsa2RF_U16_F tc_s[] = {{0x8000, 0xe000, 0x0FF0, 0, 0, 3,
-                                         0xffff, 0x8000, -1.f, -0.25f,
+  struct TestCaseMsa2RF_U16_F tc_s[] = {{0x8000, 0xE000, 0x0FF0, 0, 0, 3,
+                                         0xFFFF, 0x8000, -1.f, -0.25f,
                                          0.12451171875f, 0.f}};
 
   struct TestCaseMsa2RF_U32_D tc_d[] = {
-      {0x80000000, 0xe0000000, 0, 45, -1., -0.25},
-      {0x024903d3, 0, 0x28379, 0xaaaa5555, 17.853239085525274277e-3, 0.}};
+      {0x80000000, 0xE0000000, 0, 45, -1., -0.25},
+      {0x024903D3, 0, 0x28379, 0xAAAA5555, 17.853239085525274277e-3, 0.}};
 
   for (size_t i = 0; i < sizeof(tc_s) / sizeof(TestCaseMsa2RF_U16_F); ++i) {
     run_msa_2r(reinterpret_cast<const TestCaseMsa2R*>(&tc_s[i]),
-               [](MacroAssembler& assm) { __ ffqr_w(w2, w0); },
-               load_uint16_elements_of_vector, store_uint32_elements_of_vector);
+               [](MacroAssembler& assm) { __ ffqr_w(w2, w0); });
   }
   for (size_t i = 0; i < sizeof(tc_d) / sizeof(TestCaseMsa2RF_U32_D); ++i) {
     run_msa_2r(reinterpret_cast<const TestCaseMsa2R*>(&tc_d[i]),
-               [](MacroAssembler& assm) { __ ffqr_d(w2, w0); },
-               load_uint32_elements_of_vector, store_uint64_elements_of_vector);
+               [](MacroAssembler& assm) { __ ffqr_d(w2, w0); });
   }
 }
 
@@ -7868,17 +8091,18 @@
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
 
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
   CpuFeatureScope fscope(&assm, MIPS_SIMD);
   msa_reg_t res;
 
-  load_uint64_elements_of_vector(assm, &(input->ws_lo), w0, t0, t1);
-  load_uint64_elements_of_vector(assm, &(input->wt_lo), w2, t0, t1);
-  load_uint64_elements_of_vector(assm, &(input->wd_lo), w4, t0, t1);
+  load_elements_of_vector(assm, &(input->ws_lo), w0, t0, t1);
+  load_elements_of_vector(assm, &(input->wt_lo), w2, t0, t1);
+  load_elements_of_vector(assm, &(input->wd_lo), w4, t0, t1);
 
   GenerateVectorInstructionFunc(assm);
 
-  store_uint64_elements_of_vector(assm, w4, a0, t2);
+  store_elements_of_vector(assm, w4, a0);
 
   __ jr(ra);
   __ nop();
@@ -7890,9 +8114,9 @@
 #ifdef OBJECT_PRINT
   code->Print(std::cout);
 #endif
-  F3 f = FUNCTION_CAST<F3>(code->entry());
+  auto f = GeneratedCode<F3>::FromCode(*code);
 
-  (CALL_GENERATED_CODE(isolate, f, &res, 0, 0, 0, 0));
+  (f.Call(&res, 0, 0, 0, 0));
 
   CHECK_EQ(GenerateOperationFunc(input->wd_lo, input->ws_lo, input->wt_lo),
            res.d[0]);
@@ -7908,12 +8132,12 @@
 
   struct TestCaseMsaVector tc[] = {
       // wd_lo, wd_hi, ws_lo, ws_hi, wt_lo, wt_hi
-      {0xf35862e13e38f8b0, 0x4f41ffdef2bfe636, 0xdcd39d91f9057627,
-       0x64be4f6dbe9caa51, 0x6b23de1a687d9cb9, 0x49547aad691da4ca},
-      {0xf35862e13e38f8b0, 0x4f41ffdef2bfe636, 0x401614523d830549,
-       0xd7c46d613f50eddd, 0x52284cbc60a1562b, 0x1756ed510d8849cd},
-      {0xf35862e13e38f8b0, 0x4f41ffdef2bfe636, 0xd6e2d2ebcb40d72f,
-       0x13a619afce67b079, 0x36cce284343e40f9, 0xb4e8f44fd148bf7f}};
+      {0xF35862E13E38F8B0, 0x4F41FFDEF2BFE636, 0xDCD39D91F9057627,
+       0x64BE4F6DBE9CAA51, 0x6B23DE1A687D9CB9, 0x49547AAD691DA4CA},
+      {0xF35862E13E38F8B0, 0x4F41FFDEF2BFE636, 0x401614523D830549,
+       0xD7C46D613F50EDDD, 0x52284CBC60A1562B, 0x1756ED510D8849CD},
+      {0xF35862E13E38F8B0, 0x4F41FFDEF2BFE636, 0xD6E2D2EBCB40D72F,
+       0x13A619AFCE67B079, 0x36CCE284343E40F9, 0xB4E8F44FD148BF7F}};
 
   for (size_t i = 0; i < sizeof(tc) / sizeof(TestCaseMsaVector); ++i) {
     run_msa_vector(
@@ -7957,16 +8181,17 @@
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
 
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
   CpuFeatureScope fscope(&assm, MIPS_SIMD);
   msa_reg_t res;
 
-  load_uint64_elements_of_vector(assm, &(input->ws_lo), w0, t0, t1);
-  load_uint64_elements_of_vector(assm, &(input->wd_lo), w2, t0, t1);
+  load_elements_of_vector(assm, &(input->ws_lo), w0, t0, t1);
+  load_elements_of_vector(assm, &(input->wd_lo), w2, t0, t1);
 
   GenerateInstructionFunc(assm, input->m);
 
-  store_uint64_elements_of_vector(assm, w2, a0, t2);
+  store_elements_of_vector(assm, w2, a0);
 
   __ jr(ra);
   __ nop();
@@ -7978,9 +8203,9 @@
 #ifdef OBJECT_PRINT
   code->Print(std::cout);
 #endif
-  F3 f = FUNCTION_CAST<F3>(code->entry());
+  auto f = GeneratedCode<F3>::FromCode(*code);
 
-  (CALL_GENERATED_CODE(isolate, f, &res, 0, 0, 0, 0));
+  (f.Call(&res, 0, 0, 0, 0));
 
   CHECK_EQ(GenerateOperationFunc(input->wd_lo, input->ws_lo, input->m),
            res.d[0]);
@@ -7996,14 +8221,14 @@
 
   struct TestCaseMsaBit tc[] = {
       // wd_lo, wd_hi     ws_lo,              ws_hi, m
-      {0, 0, 0xf35862e13e38f8b0, 0x4f41ffdef2bfe636, 3},
-      {0, 0, 0x64be4f6dbe9caa51, 0x6b23de1a687d9cb9, 5},
-      {0, 0, 0x1169751bb9a7d9c3, 0xf7a594aec8ef8a9c, 9},
-      {0, 0, 0x2b665362c4e812df, 0x3a0d80d68b3f8bc8, 13},
-      {0, 0, 0x566be7ba4365b70a, 0x01ebbc1937d76cb4, 21},
-      {0, 0, 0x380e2deb9d3f8aae, 0x017e0de0bcc6ca42, 30},
-      {0, 0, 0xa46a3a9bcb43f4e5, 0x1c62c8473bdfcffb, 45},
-      {0, 0, 0xf6759d85f23b5a2b, 0x5c042ae42c6d12c1, 61}};
+      {0, 0, 0xF35862E13E38F8B0, 0x4F41FFDEF2BFE636, 3},
+      {0, 0, 0x64BE4F6DBE9CAA51, 0x6B23DE1A687D9CB9, 5},
+      {0, 0, 0x1169751BB9A7D9C3, 0xF7A594AEC8EF8A9C, 9},
+      {0, 0, 0x2B665362C4E812DF, 0x3A0D80D68B3F8BC8, 13},
+      {0, 0, 0x566BE7BA4365B70A, 0x01EBBC1937D76CB4, 21},
+      {0, 0, 0x380E2DEB9D3F8AAE, 0x017E0DE0BCC6CA42, 30},
+      {0, 0, 0xA46A3A9BCB43F4E5, 0x1C62C8473BDFCFFB, 45},
+      {0, 0, 0xF6759D85F23B5A2B, 0x5C042AE42C6D12C1, 61}};
 
 #define SLLI_SRLI_DF(lanes, mask, func)      \
   [](uint64_t wd, uint64_t ws, uint32_t m) { \
@@ -8149,14 +8374,14 @@
 
   struct TestCaseMsaBit tc[] = {
       // wd_lo, wd_hi,    ws_lo,              ws_hi, m
-      {0, 0, 0xf35862e13e38f8b0, 0x4f41ffdef2bfe636, 3},
-      {0, 0, 0x64be4f6dbe9caa51, 0x6b23de1a687d9cb9, 5},
-      {0, 0, 0x1169751bb9a7d9c3, 0xf7a594aec8ef8a9c, 9},
-      {0, 0, 0x2b665362c4e812df, 0x3a0d80d68b3f8bc8, 13},
-      {0, 0, 0x566be7ba4365b70a, 0x01ebbc1937d76cb4, 21},
-      {0, 0, 0x380e2deb9d3f8aae, 0x017e0de0bcc6ca42, 30},
-      {0, 0, 0xa46a3a9bcb43f4e5, 0x1c62c8473bdfcffb, 45},
-      {0, 0, 0xf6759d85f23b5a2b, 0x5c042ae42c6d12c1, 61}};
+      {0, 0, 0xF35862E13E38F8B0, 0x4F41FFDEF2BFE636, 3},
+      {0, 0, 0x64BE4F6DBE9CAA51, 0x6B23DE1A687D9CB9, 5},
+      {0, 0, 0x1169751BB9A7D9C3, 0xF7A594AEC8EF8A9C, 9},
+      {0, 0, 0x2B665362C4E812DF, 0x3A0D80D68B3F8BC8, 13},
+      {0, 0, 0x566BE7BA4365B70A, 0x01EBBC1937D76CB4, 21},
+      {0, 0, 0x380E2DEB9D3F8AAE, 0x017E0DE0BCC6CA42, 30},
+      {0, 0, 0xA46A3A9BCB43F4E5, 0x1C62C8473BDFCFFB, 45},
+      {0, 0, 0xF6759D85F23B5A2B, 0x5C042AE42C6D12C1, 61}};
 
 #define BCLRI_BSETI_BNEGI_DF(lanes, mask, func) \
   [](uint64_t wd, uint64_t ws, uint32_t m) {    \
@@ -8244,22 +8469,22 @@
   CcTest::InitializeVM();
 
   struct TestCaseMsaBit tc[] = {// wd_lo, wd_hi, ws_lo, ws_hi, m
-                                {0x53f4457553bbd5b4, 0x5fb8250eacc296b2,
-                                 0xf35862e13e38f8b0, 0x4f41ffdef2bfe636, 3},
-                                {0xf61bfdb0f312e6fc, 0xc9437568dd1ea925,
-                                 0x64be4f6dbe9caa51, 0x6b23de1a687d9cb9, 5},
-                                {0x53f4457553bbd5b4, 0x5fb8250eacc296b2,
-                                 0x1169751bb9a7d9c3, 0xf7a594aec8ef8a9c, 9},
-                                {0xf61bfdb0f312e6fc, 0xc9437568dd1ea925,
-                                 0x2b665362c4e812df, 0x3a0d80d68b3f8bc8, 13},
-                                {0x53f4457553bbd5b4, 0x5fb8250eacc296b2,
-                                 0x566be7ba4365b70a, 0x01ebbc1937d76cb4, 21},
-                                {0xf61bfdb0f312e6fc, 0xc9437568dd1ea925,
-                                 0x380e2deb9d3f8aae, 0x017e0de0bcc6ca42, 30},
-                                {0x53f4457553bbd5b4, 0x5fb8250eacc296b2,
-                                 0xa46a3a9bcb43f4e5, 0x1c62c8473bdfcffb, 45},
-                                {0xf61bfdb0f312e6fc, 0xc9437568dd1ea925,
-                                 0xf6759d85f23b5a2b, 0x5c042ae42c6d12c1, 61}};
+                                {0x53F4457553BBD5B4, 0x5FB8250EACC296B2,
+                                 0xF35862E13E38F8B0, 0x4F41FFDEF2BFE636, 3},
+                                {0xF61BFDB0F312E6FC, 0xC9437568DD1EA925,
+                                 0x64BE4F6DBE9CAA51, 0x6B23DE1A687D9CB9, 5},
+                                {0x53F4457553BBD5B4, 0x5FB8250EACC296B2,
+                                 0x1169751BB9A7D9C3, 0xF7A594AEC8EF8A9C, 9},
+                                {0xF61BFDB0F312E6FC, 0xC9437568DD1EA925,
+                                 0x2B665362C4E812DF, 0x3A0D80D68B3F8BC8, 13},
+                                {0x53F4457553BBD5B4, 0x5FB8250EACC296B2,
+                                 0x566BE7BA4365B70A, 0x01EBBC1937D76CB4, 21},
+                                {0xF61BFDB0F312E6FC, 0xC9437568DD1EA925,
+                                 0x380E2DEB9D3F8AAE, 0x017E0DE0BCC6CA42, 30},
+                                {0x53F4457553BBD5B4, 0x5FB8250EACC296B2,
+                                 0xA46A3A9BCB43F4E5, 0x1C62C8473BDFCFFB, 45},
+                                {0xF61BFDB0F312E6FC, 0xC9437568DD1EA925,
+                                 0xF6759D85F23B5A2B, 0x5C042AE42C6D12C1, 61}};
 
 #define BINSLI_BINSRI_DF(lanes, mask, func)             \
   [](uint64_t wd, uint64_t ws, uint32_t m) {            \
@@ -8336,14 +8561,14 @@
 
   struct TestCaseMsaBit tc[] = {
       // wd_lo, wd_hi,    ws_lo,              ws_hi, m
-      {0, 0, 0xf35862e13e3808b0, 0x4f41ffdef2bfe636, 3},
-      {0, 0, 0x64be4f6dbe9caa51, 0x6b23de1a687d9cb9, 5},
-      {0, 0, 0x1169751bb9a7d9c3, 0xf7a594aec8ef8a9c, 9},
-      {0, 0, 0x2b665362c4e812df, 0x3a0d80d68b3f8bc8, 13},
-      {0, 0, 0x566be7ba4365b70a, 0x01ebbc1937d76cb4, 21},
-      {0, 0, 0x380e2deb9d3f8aae, 0x017e0de0bcc6ca42, 30},
-      {0, 0, 0xa46a3a9bcb43f4e5, 0x1c62c8473bdfcffb, 45},
-      {0, 0, 0xf6759d85f23b5a2b, 0x5c042ae42c6d12c1, 61}};
+      {0, 0, 0xF35862E13E3808B0, 0x4F41FFDEF2BFE636, 3},
+      {0, 0, 0x64BE4F6DBE9CAA51, 0x6B23DE1A687D9CB9, 5},
+      {0, 0, 0x1169751BB9A7D9C3, 0xF7A594AEC8EF8A9C, 9},
+      {0, 0, 0x2B665362C4E812DF, 0x3A0D80D68B3F8BC8, 13},
+      {0, 0, 0x566BE7BA4365B70A, 0x01EBBC1937D76CB4, 21},
+      {0, 0, 0x380E2DEB9D3F8AAE, 0x017E0DE0BCC6CA42, 30},
+      {0, 0, 0xA46A3A9BCB43F4E5, 0x1C62C8473BDFCFFB, 45},
+      {0, 0, 0xF6759D85F23B5A2B, 0x5C042AE42C6D12C1, 61}};
 
 #define SAT_DF(lanes, mask, func)                                              \
   [](uint64_t wd, uint64_t ws, uint32_t m) {                                   \
@@ -8433,13 +8658,14 @@
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
 
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
   CpuFeatureScope fscope(&assm, MIPS_SIMD);
   msa_reg_t res;
 
   GenerateVectorInstructionFunc(assm, input);
 
-  store_uint64_elements_of_vector(assm, w0, a0, t2);
+  store_elements_of_vector(assm, w0, a0);
 
   __ jr(ra);
   __ nop();
@@ -8451,9 +8677,9 @@
 #ifdef OBJECT_PRINT
   code->Print(std::cout);
 #endif
-  F3 f = FUNCTION_CAST<F3>(code->entry());
+  auto f = GeneratedCode<F3>::FromCode(*code);
 
-  (CALL_GENERATED_CODE(isolate, f, &res, 0, 0, 0, 0));
+  (f.Call(&res, 0, 0, 0, 0));
 
   CHECK_EQ(GenerateOperationFunc(input), res.d[0]);
   CHECK_EQ(GenerateOperationFunc(input), res.d[1]);
@@ -8503,7 +8729,8 @@
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
 
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
   CpuFeatureScope fscope(&assm, MIPS_SIMD);
   T in_test_vector[1024];
   T out_test_vector[1024];
@@ -8529,9 +8756,9 @@
 #ifdef OBJECT_PRINT
   code->Print(std::cout);
 #endif
-  F4 f = FUNCTION_CAST<F4>(code->entry());
+  auto f = GeneratedCode<F4>::FromCode(*code);
 
-  (CALL_GENERATED_CODE(isolate, f, in_array_middle, out_array_middle, 0, 0, 0));
+  (f.Call(in_array_middle, out_array_middle, 0, 0, 0));
 
   CHECK_EQ(memcmp(in_test_vector, out_test_vector, arraysize(in_test_vector)),
            0);
@@ -8567,7 +8794,6 @@
       __ st_d(w0, MemOperand(a1, i));
     }
   });
-#undef LDI_DF
 }
 
 struct TestCaseMsa3R {
@@ -8587,18 +8813,18 @@
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
 
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
   CpuFeatureScope fscope(&assm, MIPS_SIMD);
   msa_reg_t res;
-  uint64_t expected;
 
-  load_uint64_elements_of_vector(assm, &(input->wt_lo), w0, t0, t1);
-  load_uint64_elements_of_vector(assm, &(input->ws_lo), w1, t0, t1);
-  load_uint64_elements_of_vector(assm, &(input->wd_lo), w2, t0, t1);
+  load_elements_of_vector(assm, &(input->wt_lo), w0, t0, t1);
+  load_elements_of_vector(assm, &(input->ws_lo), w1, t0, t1);
+  load_elements_of_vector(assm, &(input->wd_lo), w2, t0, t1);
 
   GenerateI5InstructionFunc(assm);
 
-  store_uint64_elements_of_vector(assm, w2, a0, t2);
+  store_elements_of_vector(assm, w2, a0);
 
   __ jr(ra);
   __ nop();
@@ -8610,18 +8836,16 @@
 #ifdef OBJECT_PRINT
   code->Print(std::cout);
 #endif
-  F3 f = FUNCTION_CAST<F3>(code->entry());
+  auto f = GeneratedCode<F3>::FromCode(*code);
 
-  (CALL_GENERATED_CODE(isolate, f, &res, 0, 0, 0, 0));
+  (f.Call(&res, 0, 0, 0, 0));
 
-  expected = GenerateOperationFunc(input->ws_lo, input->wt_lo, input->wd_lo);
-  if (expected != Unpredictable) {
-    CHECK_EQ(expected, res.d[0]);
+  GenerateOperationFunc(&input->ws_lo, &input->wt_lo, &input->wd_lo);
+  if (input->wd_lo != Unpredictable) {
+    CHECK_EQ(input->wd_lo, res.d[0]);
   }
-
-  expected = GenerateOperationFunc(input->ws_hi, input->wt_hi, input->wd_hi);
-  if (expected != Unpredictable) {
-    CHECK_EQ(expected, res.d[1]);
+  if (input->wd_hi != Unpredictable) {
+    CHECK_EQ(input->wd_hi, res.d[1]);
   }
 }
 
@@ -8632,506 +8856,657 @@
   CcTest::InitializeVM();
 
   struct TestCaseMsa3R tc[] = {
-      {0x1169751bb9a7d9c3, 0xf7a594aec8ef8a9c, 0x1169751bb9a7d9c3,
-       0xf7a594aec8ef8a9c, 0x1169751bb9a7d9c3, 0xf7a594aec8ef8a9c},
-      {0x2b665362c4e812df, 0x3a0d80d68b3f8bc8, 0x2b665362c4e812df,
-       0x3a0d80d68b3f8bc8, 0x2b665362c4e812df, 0x3a0d80d68b3f8bc8},
-      {0x1169751bb9a7d9c3, 0xf7a594aec8ef8a9c, 0x1169751bb9a7d9c3,
-       0xf7a594aec8ef8a9c, 0x1169751bb9a7d9c3, 0xf7a594aec8ef8a9c},
-      {0x2b665362c4e812df, 0x3a0d80d68b3f8bc8, 0x2b665362c4e812df,
-       0x3a0d80d68b3f8bc8, 0x2b665362c4e812df, 0x3a0d80d68b3f8bc8},
-      {0xffab807f807fffcd, 0x7f23ff80ff567f80, 0xffab807f807fffcd,
-       0x7f23ff80ff567f80, 0xffab807f807fffcd, 0x7f23ff80ff567f80},
-      {0x80ffefff7f12807f, 0x807f80ff7fdeff78, 0x80ffefff7f12807f,
-       0x807f80ff7fdeff78, 0x80ffefff7f12807f, 0x807f80ff7fdeff78},
-      {0xffffffffffffffff, 0xffffffffffffffff, 0xffffffffffffffff,
-       0xffffffffffffffff, 0xffffffffffffffff, 0xffffffffffffffff},
-      {0x0000000000000000, 0xffffffffffffffff, 0xffffffffffffffff,
-       0x0000000000000000, 0x0000000000000000, 0xffffffffffffffff},
-      {0xffff0000ffff0000, 0xffff0000ffff0000, 0xffff0000ffff0000,
-       0xffff0000ffff0000, 0xffff0000ffff0000, 0xffff0000ffff0000},
-      {0xff00ff00ff00ff00, 0xff00ff00ff00ff00, 0xff00ff00ff00ff00,
-       0xff00ff00ff00ff00, 0xff00ff00ff00ff00, 0xff00ff00ff00ff00},
-      {0xf0f0f0f0f0f0f0f0, 0xf0f0f0f0f0f0f0f0, 0xf0f0f0f0f0f0f0f0,
-       0xf0f0f0f0f0f0f0f0, 0xf0f0f0f0f0f0f0f0, 0xf0f0f0f0f0f0f0f0},
-      {0xff0000ffff0000ff, 0xff0000ffff0000ff, 0xff0000ffff0000ff,
-       0xff0000ffff0000ff, 0xff0000ffff0000ff, 0xff0000ffff0000ff},
-      {0xffff00000000ffff, 0xffff00000000ffff, 0xffff00000000ffff,
-       0xffff00000000ffff, 0xffff00000000ffff, 0xffff00000000ffff}};
+      {0x1169751BB9A7D9C3, 0xF7A594AEC8EF8A9C, 0x1169751BB9A7D9C3,
+       0xF7A594AEC8EF8A9C, 0x1169751BB9A7D9C3, 0xF7A594AEC8EF8A9C},
+      {0x2B665362C4E812DF, 0x3A0D80D68B3F8BC8, 0x2B665362C4E812DF,
+       0x3A0D80D68B3F8BC8, 0x2B665362C4E812DF, 0x3A0D80D68B3F8BC8},
+      {0x1169751BB9A7D9C3, 0xF7A594AEC8EF8A9C, 0x1169751BB9A7D9C3,
+       0xF7A594AEC8EF8A9C, 0x1169751BB9A7D9C3, 0xF7A594AEC8EF8A9C},
+      {0x2B665362C4E812DF, 0x3A0D80D68B3F8BC8, 0x2B665362C4E812DF,
+       0x3A0D80D68B3F8BC8, 0x2B665362C4E812DF, 0x3A0D80D68B3F8BC8},
+      {0xFFAB807F807FFFCD, 0x7F23FF80FF567F80, 0xFFAB807F807FFFCD,
+       0x7F23FF80FF567F80, 0xFFAB807F807FFFCD, 0x7F23FF80FF567F80},
+      {0x80FFEFFF7F12807F, 0x807F80FF7FDEFF78, 0x80FFEFFF7F12807F,
+       0x807F80FF7FDEFF78, 0x80FFEFFF7F12807F, 0x807F80FF7FDEFF78},
+      {0xFFFFFFFFFFFFFFFF, 0xFFFFFFFFFFFFFFFF, 0xFFFFFFFFFFFFFFFF,
+       0xFFFFFFFFFFFFFFFF, 0xFFFFFFFFFFFFFFFF, 0xFFFFFFFFFFFFFFFF},
+      {0x0000000000000000, 0xFFFFFFFFFFFFFFFF, 0xFFFFFFFFFFFFFFFF,
+       0x0000000000000000, 0x0000000000000000, 0xFFFFFFFFFFFFFFFF},
+      {0xFFFF0000FFFF0000, 0xFFFF0000FFFF0000, 0xFFFF0000FFFF0000,
+       0xFFFF0000FFFF0000, 0xFFFF0000FFFF0000, 0xFFFF0000FFFF0000},
+      {0xFF00FF00FF00FF00, 0xFF00FF00FF00FF00, 0xFF00FF00FF00FF00,
+       0xFF00FF00FF00FF00, 0xFF00FF00FF00FF00, 0xFF00FF00FF00FF00},
+      {0xF0F0F0F0F0F0F0F0, 0xF0F0F0F0F0F0F0F0, 0xF0F0F0F0F0F0F0F0,
+       0xF0F0F0F0F0F0F0F0, 0xF0F0F0F0F0F0F0F0, 0xF0F0F0F0F0F0F0F0},
+      {0xFF0000FFFF0000FF, 0xFF0000FFFF0000FF, 0xFF0000FFFF0000FF,
+       0xFF0000FFFF0000FF, 0xFF0000FFFF0000FF, 0xFF0000FFFF0000FF},
+      {0xFFFF00000000FFFF, 0xFFFF00000000FFFF, 0xFFFF00000000FFFF,
+       0xFFFF00000000FFFF, 0xFFFF00000000FFFF, 0xFFFF00000000FFFF}};
 
-#define SLL_DF(T, lanes, mask)                                          \
-  uint64_t res = 0;                                                     \
-  int size_in_bits = kMSARegSize / lanes;                               \
-  for (int i = 0; i < lanes / 2; ++i) {                                 \
-    uint64_t shift = size_in_bits * i;                                  \
-    T src_op = static_cast<T>((ws >> shift) & mask);                    \
-    T shift_op = static_cast<T>((wt >> shift) & mask) % size_in_bits;   \
-    res |= (static_cast<uint64_t>(src_op << shift_op) & mask) << shift; \
-  }                                                                     \
-  return res
+#define SLL_DF(T, lanes, mask)                                             \
+  int size_in_bits = kMSARegSize / lanes;                                  \
+  for (int i = 0; i < 2; i++) {                                            \
+    uint64_t res = 0;                                                      \
+    for (int j = 0; j < lanes / 2; ++j) {                                  \
+      uint64_t shift = size_in_bits * j;                                   \
+      T src_op = static_cast<T>((ws[i] >> shift) & mask);                  \
+      T shift_op = static_cast<T>((wt[i] >> shift) & mask) % size_in_bits; \
+      res |= (static_cast<uint64_t>(src_op << shift_op) & mask) << shift;  \
+    }                                                                      \
+    wd[i] = res;                                                           \
+  }
 
-#define SRA_DF(T, lanes, mask)                                                 \
-  uint64_t res = 0;                                                            \
-  int size_in_bits = kMSARegSize / lanes;                                      \
-  for (int i = 0; i < lanes / 2; ++i) {                                        \
-    uint64_t shift = size_in_bits * i;                                         \
-    T src_op = static_cast<T>((ws >> shift) & mask);                           \
-    T shift_op = ((wt >> shift) & mask) % size_in_bits;                        \
-    res |=                                                                     \
-        (static_cast<uint64_t>(ArithmeticShiftRight(src_op, shift_op) & mask)) \
-        << shift;                                                              \
-  }                                                                            \
-  return res
-
-#define SRL_DF(T, lanes, mask)                                          \
-  uint64_t res = 0;                                                     \
-  int size_in_bits = kMSARegSize / lanes;                               \
-  for (int i = 0; i < lanes / 2; ++i) {                                 \
-    uint64_t shift = size_in_bits * i;                                  \
-    T src_op = static_cast<T>((ws >> shift) & mask);                    \
-    T shift_op = static_cast<T>(((wt >> shift) & mask) % size_in_bits); \
-    res |= (static_cast<uint64_t>(src_op >> shift_op) & mask) << shift; \
-  }                                                                     \
-  return res
-
-#define BCRL_DF(T, lanes, mask)                                         \
-  uint64_t res = 0;                                                     \
-  int size_in_bits = kMSARegSize / lanes;                               \
-  for (int i = 0; i < lanes / 2; ++i) {                                 \
-    uint64_t shift = size_in_bits * i;                                  \
-    T src_op = static_cast<T>((ws >> shift) & mask);                    \
-    T shift_op = static_cast<T>(((wt >> shift) & mask) % size_in_bits); \
-    T r = (static_cast<T>(~(1ull << shift_op)) & src_op) & mask;        \
-    res |= static_cast<uint64_t>(r) << shift;                           \
-  }                                                                     \
-  return res
-
-#define BSET_DF(T, lanes, mask)                                         \
-  uint64_t res = 0;                                                     \
-  int size_in_bits = kMSARegSize / lanes;                               \
-  for (int i = 0; i < lanes / 2; ++i) {                                 \
-    uint64_t shift = size_in_bits * i;                                  \
-    T src_op = static_cast<T>((ws >> shift) & mask);                    \
-    T shift_op = static_cast<T>(((wt >> shift) & mask) % size_in_bits); \
-    T r = (static_cast<T>(1ull << shift_op) | src_op) & mask;           \
-    res |= static_cast<uint64_t>(r) << shift;                           \
-  }                                                                     \
-  return res
-
-#define BNEG_DF(T, lanes, mask)                                         \
-  uint64_t res = 0;                                                     \
-  int size_in_bits = kMSARegSize / lanes;                               \
-  for (int i = 0; i < lanes / 2; ++i) {                                 \
-    uint64_t shift = size_in_bits * i;                                  \
-    T src_op = static_cast<T>((ws >> shift) & mask);                    \
-    T shift_op = static_cast<T>(((wt >> shift) & mask) % size_in_bits); \
-    T r = (static_cast<T>(1ull << shift_op) ^ src_op) & mask;           \
-    res |= static_cast<uint64_t>(r) << shift;                           \
-  }                                                                     \
-  return res
-
-#define BINSL_DF(T, lanes, mask)                                        \
-  uint64_t res = 0;                                                     \
-  int size_in_bits = kMSARegSize / lanes;                               \
-  for (int i = 0; i < lanes / 2; ++i) {                                 \
-    uint64_t shift = size_in_bits * i;                                  \
-    T ws_op = static_cast<T>((ws >> shift) & mask);                     \
-    T wd_op = static_cast<T>((wd >> shift) & mask);                     \
-    T shift_op = static_cast<T>(((wt >> shift) & mask) % size_in_bits); \
-    int bits = shift_op + 1;                                            \
-    T r;                                                                \
-    if (bits == size_in_bits) {                                         \
-      r = static_cast<T>(ws_op);                                        \
-    } else {                                                            \
-      uint64_t mask2 = ((1ull << bits) - 1) << (size_in_bits - bits);   \
-      r = static_cast<T>((static_cast<T>(mask2) & ws_op) |              \
-                         (static_cast<T>(~mask2) & wd_op));             \
-    }                                                                   \
-    res |= static_cast<uint64_t>(r) << shift;                           \
-  }                                                                     \
-  return res
-
-#define BINSR_DF(T, lanes, mask)                                        \
-  uint64_t res = 0;                                                     \
-  int size_in_bits = kMSARegSize / lanes;                               \
-  for (int i = 0; i < lanes / 2; ++i) {                                 \
-    uint64_t shift = size_in_bits * i;                                  \
-    T ws_op = static_cast<T>((ws >> shift) & mask);                     \
-    T wd_op = static_cast<T>((wd >> shift) & mask);                     \
-    T shift_op = static_cast<T>(((wt >> shift) & mask) % size_in_bits); \
-    int bits = shift_op + 1;                                            \
-    T r;                                                                \
-    if (bits == size_in_bits) {                                         \
-      r = static_cast<T>(ws_op);                                        \
-    } else {                                                            \
-      uint64_t mask2 = (1ull << bits) - 1;                              \
-      r = static_cast<T>((static_cast<T>(mask2) & ws_op) |              \
-                         (static_cast<T>(~mask2) & wd_op));             \
-    }                                                                   \
-    res |= static_cast<uint64_t>(r) << shift;                           \
-  }                                                                     \
-  return res
-
-#define ADDV_DF(T, lanes, mask)                                    \
-  uint64_t res = 0;                                                \
-  int size_in_bits = kMSARegSize / lanes;                          \
-  for (int i = 0; i < lanes / 2; ++i) {                            \
-    uint64_t shift = size_in_bits * i;                             \
-    T ws_op = static_cast<T>((ws >> shift) & mask);                \
-    T wt_op = static_cast<T>((wt >> shift) & mask);                \
-    res |= (static_cast<uint64_t>(ws_op + wt_op) & mask) << shift; \
-  }                                                                \
-  return res
-
-#define SUBV_DF(T, lanes, mask)                                    \
-  uint64_t res = 0;                                                \
-  int size_in_bits = kMSARegSize / lanes;                          \
-  for (int i = 0; i < lanes / 2; ++i) {                            \
-    uint64_t shift = size_in_bits * i;                             \
-    T ws_op = static_cast<T>((ws >> shift) & mask);                \
-    T wt_op = static_cast<T>((wt >> shift) & mask);                \
-    res |= (static_cast<uint64_t>(ws_op - wt_op) & mask) << shift; \
-  }                                                                \
-  return res
-
-#define MAX_DF(T, lanes, mask)                                            \
-  uint64_t res = 0;                                                       \
-  int size_in_bits = kMSARegSize / lanes;                                 \
-  for (int i = 0; i < lanes / 2; ++i) {                                   \
-    uint64_t shift = size_in_bits * i;                                    \
-    T ws_op = static_cast<T>((ws >> shift) & mask);                       \
-    T wt_op = static_cast<T>((wt >> shift) & mask);                       \
-    res |= (static_cast<uint64_t>(Max<T>(ws_op, wt_op)) & mask) << shift; \
-  }                                                                       \
-  return res
-
-#define MIN_DF(T, lanes, mask)                                            \
-  uint64_t res = 0;                                                       \
-  int size_in_bits = kMSARegSize / lanes;                                 \
-  for (int i = 0; i < lanes / 2; ++i) {                                   \
-    uint64_t shift = size_in_bits * i;                                    \
-    T ws_op = static_cast<T>((ws >> shift) & mask);                       \
-    T wt_op = static_cast<T>((wt >> shift) & mask);                       \
-    res |= (static_cast<uint64_t>(Min<T>(ws_op, wt_op)) & mask) << shift; \
-  }                                                                       \
-  return res
-
-#define MAXA_DF(T, lanes, mask)                                                \
-  uint64_t res = 0;                                                            \
-  int size_in_bits = kMSARegSize / lanes;                                      \
-  for (int i = 0; i < lanes / 2; ++i) {                                        \
-    uint64_t shift = size_in_bits * i;                                         \
-    T ws_op = static_cast<T>((ws >> shift) & mask);                            \
-    T wt_op = static_cast<T>((wt >> shift) & mask);                            \
-    res |= (static_cast<uint64_t>(Nabs(ws_op) < Nabs(wt_op) ? ws_op : wt_op) & \
-            mask)                                                              \
-           << shift;                                                           \
-  }                                                                            \
-  return res
-
-#define MINA_DF(T, lanes, mask)                                                \
-  uint64_t res = 0;                                                            \
-  int size_in_bits = kMSARegSize / lanes;                                      \
-  for (int i = 0; i < lanes / 2; ++i) {                                        \
-    uint64_t shift = size_in_bits * i;                                         \
-    T ws_op = static_cast<T>((ws >> shift) & mask);                            \
-    T wt_op = static_cast<T>((wt >> shift) & mask);                            \
-    res |= (static_cast<uint64_t>(Nabs(ws_op) > Nabs(wt_op) ? ws_op : wt_op) & \
-            mask)                                                              \
-           << shift;                                                           \
-  }                                                                            \
-  return res
-
-#define CEQ_DF(T, lanes, mask)                                                \
-  uint64_t res = 0;                                                           \
-  int size_in_bits = kMSARegSize / lanes;                                     \
-  for (int i = 0; i < lanes / 2; ++i) {                                       \
-    uint64_t shift = size_in_bits * i;                                        \
-    T ws_op = static_cast<T>((ws >> shift) & mask);                           \
-    T wt_op = static_cast<T>((wt >> shift) & mask);                           \
-    res |=                                                                    \
-        (static_cast<uint64_t>(!Compare(ws_op, wt_op) ? -1ull : 0ull) & mask) \
-        << shift;                                                             \
-  }                                                                           \
-  return res
-
-#define CLT_DF(T, lanes, mask)                                                 \
-  uint64_t res = 0;                                                            \
-  int size_in_bits = kMSARegSize / lanes;                                      \
-  for (int i = 0; i < lanes / 2; ++i) {                                        \
-    uint64_t shift = size_in_bits * i;                                         \
-    T ws_op = static_cast<T>((ws >> shift) & mask);                            \
-    T wt_op = static_cast<T>((wt >> shift) & mask);                            \
-    res |=                                                                     \
-        (static_cast<uint64_t>((Compare(ws_op, wt_op) == -1) ? -1ull : 0ull) & \
-         mask)                                                                 \
-        << shift;                                                              \
-  }                                                                            \
-  return res
-
-#define CLE_DF(T, lanes, mask)                                                \
-  uint64_t res = 0;                                                           \
-  int size_in_bits = kMSARegSize / lanes;                                     \
-  for (int i = 0; i < lanes / 2; ++i) {                                       \
-    uint64_t shift = size_in_bits * i;                                        \
-    T ws_op = static_cast<T>((ws >> shift) & mask);                           \
-    T wt_op = static_cast<T>((wt >> shift) & mask);                           \
-    res |=                                                                    \
-        (static_cast<uint64_t>((Compare(ws_op, wt_op) != 1) ? -1ull : 0ull) & \
-         mask)                                                                \
-        << shift;                                                             \
-  }                                                                           \
-  return res
-
-#define ADD_A_DF(T, lanes, mask)                                             \
-  uint64_t res = 0;                                                          \
+#define SRA_DF(T, lanes, mask)                                               \
   int size_in_bits = kMSARegSize / lanes;                                    \
-  for (int i = 0; i < lanes / 2; ++i) {                                      \
-    uint64_t shift = size_in_bits * i;                                       \
-    T ws_op = static_cast<T>((ws >> shift) & mask);                          \
-    T wt_op = static_cast<T>((wt >> shift) & mask);                          \
-    res |= (static_cast<uint64_t>(Abs(ws_op) + Abs(wt_op)) & mask) << shift; \
-  }                                                                          \
-  return res
+  for (int i = 0; i < 2; i++) {                                              \
+    uint64_t res = 0;                                                        \
+    for (int j = 0; j < lanes / 2; ++j) {                                    \
+      uint64_t shift = size_in_bits * j;                                     \
+      T src_op = static_cast<T>((ws[i] >> shift) & mask);                    \
+      T shift_op = ((wt[i] >> shift) & mask) % size_in_bits;                 \
+      res |= (static_cast<uint64_t>(ArithmeticShiftRight(src_op, shift_op) & \
+                                    mask))                                   \
+             << shift;                                                       \
+    }                                                                        \
+    wd[i] = res;                                                             \
+  }
 
-#define ADDS_A_DF(T, lanes, mask)                         \
-  uint64_t res = 0;                                       \
-  int size_in_bits = kMSARegSize / lanes;                 \
-  for (int i = 0; i < lanes / 2; ++i) {                   \
-    uint64_t shift = size_in_bits * i;                    \
-    T ws_op = Nabs(static_cast<T>((ws >> shift) & mask)); \
-    T wt_op = Nabs(static_cast<T>((wt >> shift) & mask)); \
-    T r;                                                  \
-    if (ws_op < -std::numeric_limits<T>::max() - wt_op) { \
-      r = std::numeric_limits<T>::max();                  \
-    } else {                                              \
-      r = -(ws_op + wt_op);                               \
-    }                                                     \
-    res |= (static_cast<uint64_t>(r) & mask) << shift;    \
-  }                                                       \
-  return res
+#define SRL_DF(T, lanes, mask)                                               \
+  int size_in_bits = kMSARegSize / lanes;                                    \
+  for (int i = 0; i < 2; i++) {                                              \
+    uint64_t res = 0;                                                        \
+    for (int j = 0; j < lanes / 2; ++j) {                                    \
+      uint64_t shift = size_in_bits * j;                                     \
+      T src_op = static_cast<T>((ws[i] >> shift) & mask);                    \
+      T shift_op = static_cast<T>(((wt[i] >> shift) & mask) % size_in_bits); \
+      res |= (static_cast<uint64_t>(src_op >> shift_op) & mask) << shift;    \
+    }                                                                        \
+    wd[i] = res;                                                             \
+  }
 
-#define ADDS_DF(T, lanes, mask)                                                \
-  uint64_t res = 0;                                                            \
-  int size_in_bits = kMSARegSize / lanes;                                      \
-  for (int i = 0; i < lanes / 2; ++i) {                                        \
-    uint64_t shift = size_in_bits * i;                                         \
-    T ws_op = static_cast<T>((ws >> shift) & mask);                            \
-    T wt_op = static_cast<T>((wt >> shift) & mask);                            \
-    res |= (static_cast<uint64_t>(SaturateAdd(ws_op, wt_op)) & mask) << shift; \
-  }                                                                            \
-  return res
+#define BCRL_DF(T, lanes, mask)                                              \
+  int size_in_bits = kMSARegSize / lanes;                                    \
+  for (int i = 0; i < 2; i++) {                                              \
+    uint64_t res = 0;                                                        \
+    for (int j = 0; j < lanes / 2; ++j) {                                    \
+      uint64_t shift = size_in_bits * j;                                     \
+      T src_op = static_cast<T>((ws[i] >> shift) & mask);                    \
+      T shift_op = static_cast<T>(((wt[i] >> shift) & mask) % size_in_bits); \
+      T r = (static_cast<T>(~(1ull << shift_op)) & src_op) & mask;           \
+      res |= static_cast<uint64_t>(r) << shift;                              \
+    }                                                                        \
+    wd[i] = res;                                                             \
+  }
 
-#define AVE_DF(T, lanes, mask)                                                 \
-  uint64_t res = 0;                                                            \
-  int size_in_bits = kMSARegSize / lanes;                                      \
-  for (int i = 0; i < lanes / 2; ++i) {                                        \
-    uint64_t shift = size_in_bits * i;                                         \
-    T ws_op = static_cast<T>((ws >> shift) & mask);                            \
-    T wt_op = static_cast<T>((wt >> shift) & mask);                            \
-    res |= (static_cast<uint64_t>(((wt_op & ws_op) + ((ws_op ^ wt_op) >> 1)) & \
-                                  mask))                                       \
-           << shift;                                                           \
-  }                                                                            \
-  return res
+#define BSET_DF(T, lanes, mask)                                              \
+  int size_in_bits = kMSARegSize / lanes;                                    \
+  for (int i = 0; i < 2; i++) {                                              \
+    uint64_t res = 0;                                                        \
+    for (int j = 0; j < lanes / 2; ++j) {                                    \
+      uint64_t shift = size_in_bits * j;                                     \
+      T src_op = static_cast<T>((ws[i] >> shift) & mask);                    \
+      T shift_op = static_cast<T>(((wt[i] >> shift) & mask) % size_in_bits); \
+      T r = (static_cast<T>(1ull << shift_op) | src_op) & mask;              \
+      res |= static_cast<uint64_t>(r) << shift;                              \
+    }                                                                        \
+    wd[i] = res;                                                             \
+  }
 
-#define AVER_DF(T, lanes, mask)                                                \
-  uint64_t res = 0;                                                            \
-  int size_in_bits = kMSARegSize / lanes;                                      \
-  for (int i = 0; i < lanes / 2; ++i) {                                        \
-    uint64_t shift = size_in_bits * i;                                         \
-    T ws_op = static_cast<T>((ws >> shift) & mask);                            \
-    T wt_op = static_cast<T>((wt >> shift) & mask);                            \
-    res |= (static_cast<uint64_t>(((wt_op | ws_op) - ((ws_op ^ wt_op) >> 1)) & \
-                                  mask))                                       \
-           << shift;                                                           \
-  }                                                                            \
-  return res
+#define BNEG_DF(T, lanes, mask)                                              \
+  int size_in_bits = kMSARegSize / lanes;                                    \
+  for (int i = 0; i < 2; i++) {                                              \
+    uint64_t res = 0;                                                        \
+    for (int j = 0; j < lanes / 2; ++j) {                                    \
+      uint64_t shift = size_in_bits * j;                                     \
+      T src_op = static_cast<T>((ws[i] >> shift) & mask);                    \
+      T shift_op = static_cast<T>(((wt[i] >> shift) & mask) % size_in_bits); \
+      T r = (static_cast<T>(1ull << shift_op) ^ src_op) & mask;              \
+      res |= static_cast<uint64_t>(r) << shift;                              \
+    }                                                                        \
+    wd[i] = res;                                                             \
+  }
 
-#define SUBS_DF(T, lanes, mask)                                                \
-  uint64_t res = 0;                                                            \
-  int size_in_bits = kMSARegSize / lanes;                                      \
-  for (int i = 0; i < lanes / 2; ++i) {                                        \
-    uint64_t shift = size_in_bits * i;                                         \
-    T ws_op = static_cast<T>((ws >> shift) & mask);                            \
-    T wt_op = static_cast<T>((wt >> shift) & mask);                            \
-    res |= (static_cast<uint64_t>(SaturateSub(ws_op, wt_op)) & mask) << shift; \
-  }                                                                            \
-  return res
+#define BINSL_DF(T, lanes, mask)                                             \
+  int size_in_bits = kMSARegSize / lanes;                                    \
+  for (int i = 0; i < 2; i++) {                                              \
+    uint64_t res = 0;                                                        \
+    for (int j = 0; j < lanes / 2; ++j) {                                    \
+      uint64_t shift = size_in_bits * j;                                     \
+      T ws_op = static_cast<T>((ws[i] >> shift) & mask);                     \
+      T wd_op = static_cast<T>((wd[i] >> shift) & mask);                     \
+      T shift_op = static_cast<T>(((wt[i] >> shift) & mask) % size_in_bits); \
+      int bits = shift_op + 1;                                               \
+      T r;                                                                   \
+      if (bits == size_in_bits) {                                            \
+        r = static_cast<T>(ws_op);                                           \
+      } else {                                                               \
+        uint64_t mask2 = ((1ull << bits) - 1) << (size_in_bits - bits);      \
+        r = static_cast<T>((static_cast<T>(mask2) & ws_op) |                 \
+                           (static_cast<T>(~mask2) & wd_op));                \
+      }                                                                      \
+      res |= static_cast<uint64_t>(r) << shift;                              \
+    }                                                                        \
+    wd[i] = res;                                                             \
+  }
 
-#define SUBSUS_U_DF(T, lanes, mask)                         \
-  typedef typename std::make_unsigned<T>::type uT;          \
-  uint64_t res = 0;                                         \
-  int size_in_bits = kMSARegSize / lanes;                   \
-  for (int i = 0; i < lanes / 2; ++i) {                     \
-    uint64_t shift = size_in_bits * i;                      \
-    uT ws_op = static_cast<uT>((ws >> shift) & mask);       \
-    T wt_op = static_cast<T>((wt >> shift) & mask);         \
-    T r;                                                    \
-    if (wt_op > 0) {                                        \
-      uT wtu = static_cast<uT>(wt_op);                      \
-      if (wtu > ws_op) {                                    \
-        r = 0;                                              \
-      } else {                                              \
-        r = static_cast<T>(ws_op - wtu);                    \
-      }                                                     \
-    } else {                                                \
-      if (ws_op > std::numeric_limits<uT>::max() + wt_op) { \
-        r = static_cast<T>(std::numeric_limits<uT>::max()); \
-      } else {                                              \
-        r = static_cast<T>(ws_op - wt_op);                  \
-      }                                                     \
-    }                                                       \
-    res |= (static_cast<uint64_t>(r) & mask) << shift;      \
-  }                                                         \
-  return res
+#define BINSR_DF(T, lanes, mask)                                             \
+  int size_in_bits = kMSARegSize / lanes;                                    \
+  for (int i = 0; i < 2; i++) {                                              \
+    uint64_t res = 0;                                                        \
+    for (int j = 0; j < lanes / 2; ++j) {                                    \
+      uint64_t shift = size_in_bits * j;                                     \
+      T ws_op = static_cast<T>((ws[i] >> shift) & mask);                     \
+      T wd_op = static_cast<T>((wd[i] >> shift) & mask);                     \
+      T shift_op = static_cast<T>(((wt[i] >> shift) & mask) % size_in_bits); \
+      int bits = shift_op + 1;                                               \
+      T r;                                                                   \
+      if (bits == size_in_bits) {                                            \
+        r = static_cast<T>(ws_op);                                           \
+      } else {                                                               \
+        uint64_t mask2 = (1ull << bits) - 1;                                 \
+        r = static_cast<T>((static_cast<T>(mask2) & ws_op) |                 \
+                           (static_cast<T>(~mask2) & wd_op));                \
+      }                                                                      \
+      res |= static_cast<uint64_t>(r) << shift;                              \
+    }                                                                        \
+    wd[i] = res;                                                             \
+  }
 
-#define SUBSUU_S_DF(T, lanes, mask)                    \
-  typedef typename std::make_unsigned<T>::type uT;     \
-  uint64_t res = 0;                                    \
-  int size_in_bits = kMSARegSize / lanes;              \
-  for (int i = 0; i < lanes / 2; ++i) {                \
-    uint64_t shift = size_in_bits * i;                 \
-    uT ws_op = static_cast<uT>((ws >> shift) & mask);  \
-    uT wt_op = static_cast<uT>((wt >> shift) & mask);  \
-    uT wdu;                                            \
-    T r;                                               \
-    if (ws_op > wt_op) {                               \
-      wdu = ws_op - wt_op;                             \
-      if (wdu > std::numeric_limits<T>::max()) {       \
-        r = std::numeric_limits<T>::max();             \
-      } else {                                         \
-        r = static_cast<T>(wdu);                       \
-      }                                                \
-    } else {                                           \
-      wdu = wt_op - ws_op;                             \
-      CHECK(-std::numeric_limits<T>::max() ==          \
-            std::numeric_limits<T>::min() + 1);        \
-      if (wdu <= std::numeric_limits<T>::max()) {      \
-        r = -static_cast<T>(wdu);                      \
-      } else {                                         \
-        r = std::numeric_limits<T>::min();             \
-      }                                                \
-    }                                                  \
-    res |= (static_cast<uint64_t>(r) & mask) << shift; \
-  }                                                    \
-  return res
+#define ADDV_DF(T, lanes, mask)                                      \
+  int size_in_bits = kMSARegSize / lanes;                            \
+  for (int i = 0; i < 2; i++) {                                      \
+    uint64_t res = 0;                                                \
+    for (int j = 0; j < lanes / 2; ++j) {                            \
+      uint64_t shift = size_in_bits * j;                             \
+      T ws_op = static_cast<T>((ws[i] >> shift) & mask);             \
+      T wt_op = static_cast<T>((wt[i] >> shift) & mask);             \
+      res |= (static_cast<uint64_t>(ws_op + wt_op) & mask) << shift; \
+    }                                                                \
+    wd[i] = res;                                                     \
+  }
 
-#define ASUB_S_DF(T, lanes, mask)                                       \
-  uint64_t res = 0;                                                     \
-  int size_in_bits = kMSARegSize / lanes;                               \
-  for (int i = 0; i < lanes / 2; ++i) {                                 \
-    uint64_t shift = size_in_bits * i;                                  \
-    T ws_op = static_cast<T>((ws >> shift) & mask);                     \
-    T wt_op = static_cast<T>((wt >> shift) & mask);                     \
-    res |= (static_cast<uint64_t>(Abs(ws_op - wt_op)) & mask) << shift; \
-  }                                                                     \
-  return res
+#define SUBV_DF(T, lanes, mask)                                      \
+  int size_in_bits = kMSARegSize / lanes;                            \
+  for (int i = 0; i < 2; i++) {                                      \
+    uint64_t res = 0;                                                \
+    for (int j = 0; j < lanes / 2; ++j) {                            \
+      uint64_t shift = size_in_bits * j;                             \
+      T ws_op = static_cast<T>((ws[i] >> shift) & mask);             \
+      T wt_op = static_cast<T>((wt[i] >> shift) & mask);             \
+      res |= (static_cast<uint64_t>(ws_op - wt_op) & mask) << shift; \
+    }                                                                \
+    wd[i] = res;                                                     \
+  }
 
-#define ASUB_U_DF(T, lanes, mask)                                  \
-  uint64_t res = 0;                                                \
-  int size_in_bits = kMSARegSize / lanes;                          \
-  for (int i = 0; i < lanes / 2; ++i) {                            \
-    uint64_t shift = size_in_bits * i;                             \
-    T ws_op = static_cast<T>((ws >> shift) & mask);                \
-    T wt_op = static_cast<T>((wt >> shift) & mask);                \
-    res |= (static_cast<uint64_t>(ws_op > wt_op ? ws_op - wt_op    \
-                                                : wt_op - ws_op) & \
-            mask)                                                  \
-           << shift;                                               \
-  }                                                                \
-  return res
+#define MAX_DF(T, lanes, mask)                                              \
+  int size_in_bits = kMSARegSize / lanes;                                   \
+  for (int i = 0; i < 2; i++) {                                             \
+    uint64_t res = 0;                                                       \
+    for (int j = 0; j < lanes / 2; ++j) {                                   \
+      uint64_t shift = size_in_bits * j;                                    \
+      T ws_op = static_cast<T>((ws[i] >> shift) & mask);                    \
+      T wt_op = static_cast<T>((wt[i] >> shift) & mask);                    \
+      res |= (static_cast<uint64_t>(Max<T>(ws_op, wt_op)) & mask) << shift; \
+    }                                                                       \
+    wd[i] = res;                                                            \
+  }
 
-#define MULV_DF(T, lanes, mask)                                    \
-  uint64_t res = 0;                                                \
-  int size_in_bits = kMSARegSize / lanes;                          \
-  for (int i = 0; i < lanes / 2; ++i) {                            \
-    uint64_t shift = size_in_bits * i;                             \
-    T ws_op = static_cast<T>((ws >> shift) & mask);                \
-    T wt_op = static_cast<T>((wt >> shift) & mask);                \
-    res |= (static_cast<uint64_t>(ws_op * wt_op) & mask) << shift; \
-  }                                                                \
-  return res
+#define MIN_DF(T, lanes, mask)                                              \
+  int size_in_bits = kMSARegSize / lanes;                                   \
+  for (int i = 0; i < 2; i++) {                                             \
+    uint64_t res = 0;                                                       \
+    for (int j = 0; j < lanes / 2; ++j) {                                   \
+      uint64_t shift = size_in_bits * j;                                    \
+      T ws_op = static_cast<T>((ws[i] >> shift) & mask);                    \
+      T wt_op = static_cast<T>((wt[i] >> shift) & mask);                    \
+      res |= (static_cast<uint64_t>(Min<T>(ws_op, wt_op)) & mask) << shift; \
+    }                                                                       \
+    wd[i] = res;                                                            \
+  }
 
-#define MADDV_DF(T, lanes, mask)                                           \
-  uint64_t res = 0;                                                        \
+#define MAXA_DF(T, lanes, mask)                                               \
+  int size_in_bits = kMSARegSize / lanes;                                     \
+  for (int i = 0; i < 2; i++) {                                               \
+    uint64_t res = 0;                                                         \
+    for (int j = 0; j < lanes / 2; ++j) {                                     \
+      uint64_t shift = size_in_bits * j;                                      \
+      T ws_op = static_cast<T>((ws[i] >> shift) & mask);                      \
+      T wt_op = static_cast<T>((wt[i] >> shift) & mask);                      \
+      res |=                                                                  \
+          (static_cast<uint64_t>(Nabs(ws_op) < Nabs(wt_op) ? ws_op : wt_op) & \
+           mask)                                                              \
+          << shift;                                                           \
+    }                                                                         \
+    wd[i] = res;                                                              \
+  }
+
+#define MINA_DF(T, lanes, mask)                                               \
+  int size_in_bits = kMSARegSize / lanes;                                     \
+  for (int i = 0; i < 2; i++) {                                               \
+    uint64_t res = 0;                                                         \
+    for (int j = 0; j < lanes / 2; ++j) {                                     \
+      uint64_t shift = size_in_bits * j;                                      \
+      T ws_op = static_cast<T>((ws[i] >> shift) & mask);                      \
+      T wt_op = static_cast<T>((wt[i] >> shift) & mask);                      \
+      res |=                                                                  \
+          (static_cast<uint64_t>(Nabs(ws_op) > Nabs(wt_op) ? ws_op : wt_op) & \
+           mask)                                                              \
+          << shift;                                                           \
+    }                                                                         \
+    wd[i] = res;                                                              \
+  }
+
+#define CEQ_DF(T, lanes, mask)                                               \
+  int size_in_bits = kMSARegSize / lanes;                                    \
+  for (int i = 0; i < 2; i++) {                                              \
+    uint64_t res = 0;                                                        \
+    for (int j = 0; j < lanes / 2; ++j) {                                    \
+      uint64_t shift = size_in_bits * j;                                     \
+      T ws_op = static_cast<T>((ws[i] >> shift) & mask);                     \
+      T wt_op = static_cast<T>((wt[i] >> shift) & mask);                     \
+      res |= (static_cast<uint64_t>(!Compare(ws_op, wt_op) ? -1ull : 0ull) & \
+              mask)                                                          \
+             << shift;                                                       \
+    }                                                                        \
+    wd[i] = res;                                                             \
+  }
+
+#define CLT_DF(T, lanes, mask)                                              \
+  int size_in_bits = kMSARegSize / lanes;                                   \
+  for (int i = 0; i < 2; i++) {                                             \
+    uint64_t res = 0;                                                       \
+    for (int j = 0; j < lanes / 2; ++j) {                                   \
+      uint64_t shift = size_in_bits * j;                                    \
+      T ws_op = static_cast<T>((ws[i] >> shift) & mask);                    \
+      T wt_op = static_cast<T>((wt[i] >> shift) & mask);                    \
+      res |= (static_cast<uint64_t>((Compare(ws_op, wt_op) == -1) ? -1ull   \
+                                                                  : 0ull) & \
+              mask)                                                         \
+             << shift;                                                      \
+    }                                                                       \
+    wd[i] = res;                                                            \
+  }
+
+#define CLE_DF(T, lanes, mask)                                             \
   int size_in_bits = kMSARegSize / lanes;                                  \
-  for (int i = 0; i < lanes / 2; ++i) {                                    \
-    uint64_t shift = size_in_bits * i;                                     \
-    T ws_op = static_cast<T>((ws >> shift) & mask);                        \
-    T wt_op = static_cast<T>((wt >> shift) & mask);                        \
-    T wd_op = static_cast<T>((wd >> shift) & mask);                        \
-    res |= (static_cast<uint64_t>(wd_op + ws_op * wt_op) & mask) << shift; \
-  }                                                                        \
-  return res
+  for (int i = 0; i < 2; i++) {                                            \
+    uint64_t res = 0;                                                      \
+    for (int j = 0; j < lanes / 2; ++j) {                                  \
+      uint64_t shift = size_in_bits * j;                                   \
+      T ws_op = static_cast<T>((ws[i] >> shift) & mask);                   \
+      T wt_op = static_cast<T>((wt[i] >> shift) & mask);                   \
+      res |= (static_cast<uint64_t>((Compare(ws_op, wt_op) != 1) ? -1ull   \
+                                                                 : 0ull) & \
+              mask)                                                        \
+             << shift;                                                     \
+    }                                                                      \
+    wd[i] = res;                                                           \
+  }
 
-#define MSUBV_DF(T, lanes, mask)                                           \
-  uint64_t res = 0;                                                        \
-  int size_in_bits = kMSARegSize / lanes;                                  \
-  for (int i = 0; i < lanes / 2; ++i) {                                    \
-    uint64_t shift = size_in_bits * i;                                     \
-    T ws_op = static_cast<T>((ws >> shift) & mask);                        \
-    T wt_op = static_cast<T>((wt >> shift) & mask);                        \
-    T wd_op = static_cast<T>((wd >> shift) & mask);                        \
-    res |= (static_cast<uint64_t>(wd_op - ws_op * wt_op) & mask) << shift; \
-  }                                                                        \
-  return res
+#define ADD_A_DF(T, lanes, mask)                                               \
+  int size_in_bits = kMSARegSize / lanes;                                      \
+  for (int i = 0; i < 2; i++) {                                                \
+    uint64_t res = 0;                                                          \
+    for (int j = 0; j < lanes / 2; ++j) {                                      \
+      uint64_t shift = size_in_bits * j;                                       \
+      T ws_op = static_cast<T>((ws[i] >> shift) & mask);                       \
+      T wt_op = static_cast<T>((wt[i] >> shift) & mask);                       \
+      res |= (static_cast<uint64_t>(Abs(ws_op) + Abs(wt_op)) & mask) << shift; \
+    }                                                                          \
+    wd[i] = res;                                                               \
+  }
 
-#define DIV_DF(T, lanes, mask)                                     \
-  uint64_t res = 0;                                                \
-  int size_in_bits = kMSARegSize / lanes;                          \
-  for (int i = 0; i < lanes / 2; ++i) {                            \
-    uint64_t shift = size_in_bits * i;                             \
-    T ws_op = static_cast<T>((ws >> shift) & mask);                \
-    T wt_op = static_cast<T>((wt >> shift) & mask);                \
-    if (wt_op == 0) {                                              \
-      res = Unpredictable;                                         \
-      break;                                                       \
-    }                                                              \
-    res |= (static_cast<uint64_t>(ws_op / wt_op) & mask) << shift; \
-  }                                                                \
-  return res
+#define ADDS_A_DF(T, lanes, mask)                              \
+  int size_in_bits = kMSARegSize / lanes;                      \
+  for (int i = 0; i < 2; i++) {                                \
+    uint64_t res = 0;                                          \
+    for (int j = 0; j < lanes / 2; ++j) {                      \
+      uint64_t shift = size_in_bits * j;                       \
+      T ws_op = Nabs(static_cast<T>((ws[i] >> shift) & mask)); \
+      T wt_op = Nabs(static_cast<T>((wt[i] >> shift) & mask)); \
+      T r;                                                     \
+      if (ws_op < -std::numeric_limits<T>::max() - wt_op) {    \
+        r = std::numeric_limits<T>::max();                     \
+      } else {                                                 \
+        r = -(ws_op + wt_op);                                  \
+      }                                                        \
+      res |= (static_cast<uint64_t>(r) & mask) << shift;       \
+    }                                                          \
+    wd[i] = res;                                               \
+  }
 
-#define MOD_DF(T, lanes, mask)                                            \
-  uint64_t res = 0;                                                       \
+#define ADDS_DF(T, lanes, mask)                                        \
+  int size_in_bits = kMSARegSize / lanes;                              \
+  for (int i = 0; i < 2; i++) {                                        \
+    uint64_t res = 0;                                                  \
+    for (int j = 0; j < lanes / 2; ++j) {                              \
+      uint64_t shift = size_in_bits * j;                               \
+      T ws_op = static_cast<T>((ws[i] >> shift) & mask);               \
+      T wt_op = static_cast<T>((wt[i] >> shift) & mask);               \
+      res |= (static_cast<uint64_t>(SaturateAdd(ws_op, wt_op)) & mask) \
+             << shift;                                                 \
+    }                                                                  \
+    wd[i] = res;                                                       \
+  }
+
+#define AVE_DF(T, lanes, mask)                                       \
+  int size_in_bits = kMSARegSize / lanes;                            \
+  for (int i = 0; i < 2; i++) {                                      \
+    uint64_t res = 0;                                                \
+    for (int j = 0; j < lanes / 2; ++j) {                            \
+      uint64_t shift = size_in_bits * j;                             \
+      T ws_op = static_cast<T>((ws[i] >> shift) & mask);             \
+      T wt_op = static_cast<T>((wt[i] >> shift) & mask);             \
+      res |= (static_cast<uint64_t>(                                 \
+                 ((wt_op & ws_op) + ((ws_op ^ wt_op) >> 1)) & mask)) \
+             << shift;                                               \
+    }                                                                \
+    wd[i] = res;                                                     \
+  }
+
+#define AVER_DF(T, lanes, mask)                                      \
+  int size_in_bits = kMSARegSize / lanes;                            \
+  for (int i = 0; i < 2; i++) {                                      \
+    uint64_t res = 0;                                                \
+    for (int j = 0; j < lanes / 2; ++j) {                            \
+      uint64_t shift = size_in_bits * j;                             \
+      T ws_op = static_cast<T>((ws[i] >> shift) & mask);             \
+      T wt_op = static_cast<T>((wt[i] >> shift) & mask);             \
+      res |= (static_cast<uint64_t>(                                 \
+                 ((wt_op | ws_op) - ((ws_op ^ wt_op) >> 1)) & mask)) \
+             << shift;                                               \
+    }                                                                \
+    wd[i] = res;                                                     \
+  }
+
+#define SUBS_DF(T, lanes, mask)                                        \
+  int size_in_bits = kMSARegSize / lanes;                              \
+  for (int i = 0; i < 2; i++) {                                        \
+    uint64_t res = 0;                                                  \
+    for (int j = 0; j < lanes / 2; ++j) {                              \
+      uint64_t shift = size_in_bits * j;                               \
+      T ws_op = static_cast<T>((ws[i] >> shift) & mask);               \
+      T wt_op = static_cast<T>((wt[i] >> shift) & mask);               \
+      res |= (static_cast<uint64_t>(SaturateSub(ws_op, wt_op)) & mask) \
+             << shift;                                                 \
+    }                                                                  \
+    wd[i] = res;                                                       \
+  }
+
+#define SUBSUS_U_DF(T, lanes, mask)                           \
+  typedef typename std::make_unsigned<T>::type uT;            \
+  int size_in_bits = kMSARegSize / lanes;                     \
+  for (int i = 0; i < 2; i++) {                               \
+    uint64_t res = 0;                                         \
+    for (int j = 0; j < lanes / 2; ++j) {                     \
+      uint64_t shift = size_in_bits * j;                      \
+      uT ws_op = static_cast<uT>((ws[i] >> shift) & mask);    \
+      T wt_op = static_cast<T>((wt[i] >> shift) & mask);      \
+      T r;                                                    \
+      if (wt_op > 0) {                                        \
+        uT wtu = static_cast<uT>(wt_op);                      \
+        if (wtu > ws_op) {                                    \
+          r = 0;                                              \
+        } else {                                              \
+          r = static_cast<T>(ws_op - wtu);                    \
+        }                                                     \
+      } else {                                                \
+        if (ws_op > std::numeric_limits<uT>::max() + wt_op) { \
+          r = static_cast<T>(std::numeric_limits<uT>::max()); \
+        } else {                                              \
+          r = static_cast<T>(ws_op - wt_op);                  \
+        }                                                     \
+      }                                                       \
+      res |= (static_cast<uint64_t>(r) & mask) << shift;      \
+    }                                                         \
+    wd[i] = res;                                              \
+  }
+
+#define SUBSUU_S_DF(T, lanes, mask)                        \
+  typedef typename std::make_unsigned<T>::type uT;         \
+  int size_in_bits = kMSARegSize / lanes;                  \
+  for (int i = 0; i < 2; i++) {                            \
+    uint64_t res = 0;                                      \
+    for (int j = 0; j < lanes / 2; ++j) {                  \
+      uint64_t shift = size_in_bits * j;                   \
+      uT ws_op = static_cast<uT>((ws[i] >> shift) & mask); \
+      uT wt_op = static_cast<uT>((wt[i] >> shift) & mask); \
+      uT wdu;                                              \
+      T r;                                                 \
+      if (ws_op > wt_op) {                                 \
+        wdu = ws_op - wt_op;                               \
+        if (wdu > std::numeric_limits<T>::max()) {         \
+          r = std::numeric_limits<T>::max();               \
+        } else {                                           \
+          r = static_cast<T>(wdu);                         \
+        }                                                  \
+      } else {                                             \
+        wdu = wt_op - ws_op;                               \
+        CHECK(-std::numeric_limits<T>::max() ==            \
+              std::numeric_limits<T>::min() + 1);          \
+        if (wdu <= std::numeric_limits<T>::max()) {        \
+          r = -static_cast<T>(wdu);                        \
+        } else {                                           \
+          r = std::numeric_limits<T>::min();               \
+        }                                                  \
+      }                                                    \
+      res |= (static_cast<uint64_t>(r) & mask) << shift;   \
+    }                                                      \
+    wd[i] = res;                                           \
+  }
+
+#define ASUB_S_DF(T, lanes, mask)                                         \
   int size_in_bits = kMSARegSize / lanes;                                 \
-  for (int i = 0; i < lanes / 2; ++i) {                                   \
-    uint64_t shift = size_in_bits * i;                                    \
-    T ws_op = static_cast<T>((ws >> shift) & mask);                       \
-    T wt_op = static_cast<T>((wt >> shift) & mask);                       \
-    if (wt_op == 0) {                                                     \
-      res = Unpredictable;                                                \
-      break;                                                              \
+  for (int i = 0; i < 2; i++) {                                           \
+    uint64_t res = 0;                                                     \
+    for (int j = 0; j < lanes / 2; ++j) {                                 \
+      uint64_t shift = size_in_bits * j;                                  \
+      T ws_op = static_cast<T>((ws[i] >> shift) & mask);                  \
+      T wt_op = static_cast<T>((wt[i] >> shift) & mask);                  \
+      res |= (static_cast<uint64_t>(Abs(ws_op - wt_op)) & mask) << shift; \
     }                                                                     \
-    res |= (static_cast<uint64_t>(wt_op != 0 ? ws_op % wt_op : 0) & mask) \
-           << shift;                                                      \
-  }                                                                       \
-  return res
+    wd[i] = res;                                                          \
+  }
 
-#define SRAR_DF(T, lanes, mask)                                                \
-  uint64_t res = 0;                                                            \
-  int size_in_bits = kMSARegSize / lanes;                                      \
-  for (int i = 0; i < lanes / 2; ++i) {                                        \
-    uint64_t shift = size_in_bits * i;                                         \
-    T src_op = static_cast<T>((ws >> shift) & mask);                           \
-    T shift_op = ((wt >> shift) & mask) % size_in_bits;                        \
-    uint32_t bit = shift_op == 0 ? 0 : src_op >> (shift_op - 1) & 1;           \
-    res |=                                                                     \
-        (static_cast<uint64_t>(ArithmeticShiftRight(src_op, shift_op) + bit) & \
-         mask)                                                                 \
-        << shift;                                                              \
-  }                                                                            \
-  return res
+#define ASUB_U_DF(T, lanes, mask)                                    \
+  int size_in_bits = kMSARegSize / lanes;                            \
+  for (int i = 0; i < 2; i++) {                                      \
+    uint64_t res = 0;                                                \
+    for (int j = 0; j < lanes / 2; ++j) {                            \
+      uint64_t shift = size_in_bits * j;                             \
+      T ws_op = static_cast<T>((ws[i] >> shift) & mask);             \
+      T wt_op = static_cast<T>((wt[i] >> shift) & mask);             \
+      res |= (static_cast<uint64_t>(ws_op > wt_op ? ws_op - wt_op    \
+                                                  : wt_op - ws_op) & \
+              mask)                                                  \
+             << shift;                                               \
+    }                                                                \
+    wd[i] = res;                                                     \
+  }
+
+#define MULV_DF(T, lanes, mask)                                      \
+  int size_in_bits = kMSARegSize / lanes;                            \
+  for (int i = 0; i < 2; i++) {                                      \
+    uint64_t res = 0;                                                \
+    for (int j = 0; j < lanes / 2; ++j) {                            \
+      uint64_t shift = size_in_bits * j;                             \
+      T ws_op = static_cast<T>((ws[i] >> shift) & mask);             \
+      T wt_op = static_cast<T>((wt[i] >> shift) & mask);             \
+      res |= (static_cast<uint64_t>(ws_op * wt_op) & mask) << shift; \
+    }                                                                \
+    wd[i] = res;                                                     \
+  }
+
+#define MADDV_DF(T, lanes, mask)                                             \
+  int size_in_bits = kMSARegSize / lanes;                                    \
+  for (int i = 0; i < 2; i++) {                                              \
+    uint64_t res = 0;                                                        \
+    for (int j = 0; j < lanes / 2; ++j) {                                    \
+      uint64_t shift = size_in_bits * j;                                     \
+      T ws_op = static_cast<T>((ws[i] >> shift) & mask);                     \
+      T wt_op = static_cast<T>((wt[i] >> shift) & mask);                     \
+      T wd_op = static_cast<T>((wd[i] >> shift) & mask);                     \
+      res |= (static_cast<uint64_t>(wd_op + ws_op * wt_op) & mask) << shift; \
+    }                                                                        \
+    wd[i] = res;                                                             \
+  }
+
+#define MSUBV_DF(T, lanes, mask)                                             \
+  int size_in_bits = kMSARegSize / lanes;                                    \
+  for (int i = 0; i < 2; i++) {                                              \
+    uint64_t res = 0;                                                        \
+    for (int j = 0; j < lanes / 2; ++j) {                                    \
+      uint64_t shift = size_in_bits * j;                                     \
+      T ws_op = static_cast<T>((ws[i] >> shift) & mask);                     \
+      T wt_op = static_cast<T>((wt[i] >> shift) & mask);                     \
+      T wd_op = static_cast<T>((wd[i] >> shift) & mask);                     \
+      res |= (static_cast<uint64_t>(wd_op - ws_op * wt_op) & mask) << shift; \
+    }                                                                        \
+    wd[i] = res;                                                             \
+  }
+
+#define DIV_DF(T, lanes, mask)                                       \
+  int size_in_bits = kMSARegSize / lanes;                            \
+  for (int i = 0; i < 2; i++) {                                      \
+    uint64_t res = 0;                                                \
+    for (int j = 0; j < lanes / 2; ++j) {                            \
+      uint64_t shift = size_in_bits * j;                             \
+      T ws_op = static_cast<T>((ws[i] >> shift) & mask);             \
+      T wt_op = static_cast<T>((wt[i] >> shift) & mask);             \
+      if (wt_op == 0) {                                              \
+        res = Unpredictable;                                         \
+        break;                                                       \
+      }                                                              \
+      res |= (static_cast<uint64_t>(ws_op / wt_op) & mask) << shift; \
+    }                                                                \
+    wd[i] = res;                                                     \
+  }
+
+#define MOD_DF(T, lanes, mask)                                              \
+  int size_in_bits = kMSARegSize / lanes;                                   \
+  for (int i = 0; i < 2; i++) {                                             \
+    uint64_t res = 0;                                                       \
+    for (int j = 0; j < lanes / 2; ++j) {                                   \
+      uint64_t shift = size_in_bits * j;                                    \
+      T ws_op = static_cast<T>((ws[i] >> shift) & mask);                    \
+      T wt_op = static_cast<T>((wt[i] >> shift) & mask);                    \
+      if (wt_op == 0) {                                                     \
+        res = Unpredictable;                                                \
+        break;                                                              \
+      }                                                                     \
+      res |= (static_cast<uint64_t>(wt_op != 0 ? ws_op % wt_op : 0) & mask) \
+             << shift;                                                      \
+    }                                                                       \
+    wd[i] = res;                                                            \
+  }
+
+#define SRAR_DF(T, lanes, mask)                                              \
+  int size_in_bits = kMSARegSize / lanes;                                    \
+  for (int i = 0; i < 2; i++) {                                              \
+    uint64_t res = 0;                                                        \
+    for (int j = 0; j < lanes / 2; ++j) {                                    \
+      uint64_t shift = size_in_bits * j;                                     \
+      T src_op = static_cast<T>((ws[i] >> shift) & mask);                    \
+      T shift_op = ((wt[i] >> shift) & mask) % size_in_bits;                 \
+      uint32_t bit = shift_op == 0 ? 0 : src_op >> (shift_op - 1) & 1;       \
+      res |= (static_cast<uint64_t>(ArithmeticShiftRight(src_op, shift_op) + \
+                                    bit) &                                   \
+              mask)                                                          \
+             << shift;                                                       \
+    }                                                                        \
+    wd[i] = res;                                                             \
+  }
+
+#define PCKEV_DF(T, lanes, mask)        \
+  T* ws_p = reinterpret_cast<T*>(ws);   \
+  T* wt_p = reinterpret_cast<T*>(wt);   \
+  T* wd_p = reinterpret_cast<T*>(wd);   \
+  for (int i = 0; i < lanes / 2; ++i) { \
+    wd_p[i] = wt_p[2 * i];              \
+    wd_p[i + lanes / 2] = ws_p[2 * i];  \
+  }
+
+#define PCKOD_DF(T, lanes, mask)           \
+  T* ws_p = reinterpret_cast<T*>(ws);      \
+  T* wt_p = reinterpret_cast<T*>(wt);      \
+  T* wd_p = reinterpret_cast<T*>(wd);      \
+  for (int i = 0; i < lanes / 2; ++i) {    \
+    wd_p[i] = wt_p[2 * i + 1];             \
+    wd_p[i + lanes / 2] = ws_p[2 * i + 1]; \
+  }
+
+#define ILVL_DF(T, lanes, mask)            \
+  T* ws_p = reinterpret_cast<T*>(ws);      \
+  T* wt_p = reinterpret_cast<T*>(wt);      \
+  T* wd_p = reinterpret_cast<T*>(wd);      \
+  for (int i = 0; i < lanes / 2; ++i) {    \
+    wd_p[2 * i] = wt_p[i + lanes / 2];     \
+    wd_p[2 * i + 1] = ws_p[i + lanes / 2]; \
+  }
+
+#define ILVR_DF(T, lanes, mask)         \
+  T* ws_p = reinterpret_cast<T*>(ws);   \
+  T* wt_p = reinterpret_cast<T*>(wt);   \
+  T* wd_p = reinterpret_cast<T*>(wd);   \
+  for (int i = 0; i < lanes / 2; ++i) { \
+    wd_p[2 * i] = wt_p[i];              \
+    wd_p[2 * i + 1] = ws_p[i];          \
+  }
+
+#define ILVEV_DF(T, lanes, mask)        \
+  T* ws_p = reinterpret_cast<T*>(ws);   \
+  T* wt_p = reinterpret_cast<T*>(wt);   \
+  T* wd_p = reinterpret_cast<T*>(wd);   \
+  for (int i = 0; i < lanes / 2; ++i) { \
+    wd_p[2 * i] = wt_p[2 * i];          \
+    wd_p[2 * i + 1] = ws_p[2 * i];      \
+  }
+
+#define ILVOD_DF(T, lanes, mask)        \
+  T* ws_p = reinterpret_cast<T*>(ws);   \
+  T* wt_p = reinterpret_cast<T*>(wt);   \
+  T* wd_p = reinterpret_cast<T*>(wd);   \
+  for (int i = 0; i < lanes / 2; ++i) { \
+    wd_p[2 * i] = wt_p[2 * i + 1];      \
+    wd_p[2 * i + 1] = ws_p[2 * i + 1];  \
+  }
+
+#define VSHF_DF(T, lanes, mask)                        \
+  T* ws_p = reinterpret_cast<T*>(ws);                  \
+  T* wt_p = reinterpret_cast<T*>(wt);                  \
+  T* wd_p = reinterpret_cast<T*>(wd);                  \
+  const int mask_not_valid = 0xC0;                     \
+  const int mask_6bits = 0x3F;                         \
+  for (int i = 0; i < lanes; ++i) {                    \
+    if ((wd_p[i] & mask_not_valid)) {                  \
+      wd_p[i] = 0;                                     \
+    } else {                                           \
+      int k = (wd_p[i] & mask_6bits) % (lanes * 2);    \
+      wd_p[i] = k > lanes ? ws_p[k - lanes] : wt_p[k]; \
+    }                                                  \
+  }
+
+#define HADD_DF(T, T_small, lanes)                                           \
+  T_small* ws_p = reinterpret_cast<T_small*>(ws);                            \
+  T_small* wt_p = reinterpret_cast<T_small*>(wt);                            \
+  T* wd_p = reinterpret_cast<T*>(wd);                                        \
+  for (int i = 0; i < lanes; ++i) {                                          \
+    wd_p[i] = static_cast<T>(ws_p[2 * i + 1]) + static_cast<T>(wt_p[2 * i]); \
+  }
+
+#define HSUB_DF(T, T_small, lanes)                                           \
+  T_small* ws_p = reinterpret_cast<T_small*>(ws);                            \
+  T_small* wt_p = reinterpret_cast<T_small*>(wt);                            \
+  T* wd_p = reinterpret_cast<T*>(wd);                                        \
+  for (int i = 0; i < lanes; ++i) {                                          \
+    wd_p[i] = static_cast<T>(ws_p[2 * i + 1]) - static_cast<T>(wt_p[2 * i]); \
+  }
 
 #define TEST_CASE(V)                                              \
   V(sll_b, SLL_DF, uint8_t, kMSALanesByte, UINT8_MAX)             \
   V(sll_h, SLL_DF, uint16_t, kMSALanesHalf, UINT16_MAX)           \
   V(sll_w, SLL_DF, uint32_t, kMSALanesWord, UINT32_MAX)           \
   V(sll_d, SLL_DF, uint64_t, kMSALanesDword, UINT64_MAX)          \
-  V(sra_b, SRA_DF, int8_t, kMSALanesByte, UINT8_MAX)              \
-  V(sra_h, SRA_DF, int16_t, kMSALanesHalf, UINT16_MAX)            \
-  V(sra_w, SRA_DF, int32_t, kMSALanesWord, UINT32_MAX)            \
-  V(sra_d, SRA_DF, int64_t, kMSALanesDword, UINT64_MAX)           \
   V(srl_b, SRL_DF, uint8_t, kMSALanesByte, UINT8_MAX)             \
   V(srl_h, SRL_DF, uint16_t, kMSALanesHalf, UINT16_MAX)           \
   V(srl_w, SRL_DF, uint32_t, kMSALanesWord, UINT32_MAX)           \
@@ -9292,18 +9667,54 @@
   V(mod_u_h, MOD_DF, uint16_t, kMSALanesHalf, UINT16_MAX)         \
   V(mod_u_w, MOD_DF, uint32_t, kMSALanesWord, UINT32_MAX)         \
   V(mod_u_d, MOD_DF, uint64_t, kMSALanesDword, UINT64_MAX)        \
-  V(srar_b, SRAR_DF, int8_t, kMSALanesByte, UINT8_MAX)            \
-  V(srar_h, SRAR_DF, int16_t, kMSALanesHalf, UINT16_MAX)          \
-  V(srar_w, SRAR_DF, int32_t, kMSALanesWord, UINT32_MAX)          \
-  V(srar_d, SRAR_DF, int64_t, kMSALanesDword, UINT64_MAX)         \
   V(srlr_b, SRAR_DF, uint8_t, kMSALanesByte, UINT8_MAX)           \
   V(srlr_h, SRAR_DF, uint16_t, kMSALanesHalf, UINT16_MAX)         \
   V(srlr_w, SRAR_DF, uint32_t, kMSALanesWord, UINT32_MAX)         \
-  V(srlr_d, SRAR_DF, uint64_t, kMSALanesDword, UINT64_MAX)
+  V(srlr_d, SRAR_DF, uint64_t, kMSALanesDword, UINT64_MAX)        \
+  V(pckev_b, PCKEV_DF, uint8_t, kMSALanesByte, UINT8_MAX)         \
+  V(pckev_h, PCKEV_DF, uint16_t, kMSALanesHalf, UINT16_MAX)       \
+  V(pckev_w, PCKEV_DF, uint32_t, kMSALanesWord, UINT32_MAX)       \
+  V(pckev_d, PCKEV_DF, uint64_t, kMSALanesDword, UINT64_MAX)      \
+  V(pckod_b, PCKOD_DF, uint8_t, kMSALanesByte, UINT8_MAX)         \
+  V(pckod_h, PCKOD_DF, uint16_t, kMSALanesHalf, UINT16_MAX)       \
+  V(pckod_w, PCKOD_DF, uint32_t, kMSALanesWord, UINT32_MAX)       \
+  V(pckod_d, PCKOD_DF, uint64_t, kMSALanesDword, UINT64_MAX)      \
+  V(ilvl_b, ILVL_DF, uint8_t, kMSALanesByte, UINT8_MAX)           \
+  V(ilvl_h, ILVL_DF, uint16_t, kMSALanesHalf, UINT16_MAX)         \
+  V(ilvl_w, ILVL_DF, uint32_t, kMSALanesWord, UINT32_MAX)         \
+  V(ilvl_d, ILVL_DF, uint64_t, kMSALanesDword, UINT64_MAX)        \
+  V(ilvr_b, ILVR_DF, uint8_t, kMSALanesByte, UINT8_MAX)           \
+  V(ilvr_h, ILVR_DF, uint16_t, kMSALanesHalf, UINT16_MAX)         \
+  V(ilvr_w, ILVR_DF, uint32_t, kMSALanesWord, UINT32_MAX)         \
+  V(ilvr_d, ILVR_DF, uint64_t, kMSALanesDword, UINT64_MAX)        \
+  V(ilvev_b, ILVEV_DF, uint8_t, kMSALanesByte, UINT8_MAX)         \
+  V(ilvev_h, ILVEV_DF, uint16_t, kMSALanesHalf, UINT16_MAX)       \
+  V(ilvev_w, ILVEV_DF, uint32_t, kMSALanesWord, UINT32_MAX)       \
+  V(ilvev_d, ILVEV_DF, uint64_t, kMSALanesDword, UINT64_MAX)      \
+  V(ilvod_b, ILVOD_DF, uint8_t, kMSALanesByte, UINT8_MAX)         \
+  V(ilvod_h, ILVOD_DF, uint16_t, kMSALanesHalf, UINT16_MAX)       \
+  V(ilvod_w, ILVOD_DF, uint32_t, kMSALanesWord, UINT32_MAX)       \
+  V(ilvod_d, ILVOD_DF, uint64_t, kMSALanesDword, UINT64_MAX)      \
+  V(vshf_b, VSHF_DF, uint8_t, kMSALanesByte, UINT8_MAX)           \
+  V(vshf_h, VSHF_DF, uint16_t, kMSALanesHalf, UINT16_MAX)         \
+  V(vshf_w, VSHF_DF, uint32_t, kMSALanesWord, UINT32_MAX)         \
+  V(vshf_d, VSHF_DF, uint64_t, kMSALanesDword, UINT64_MAX)        \
+  V(hadd_s_h, HADD_DF, int16_t, int8_t, kMSALanesHalf)            \
+  V(hadd_s_w, HADD_DF, int32_t, int16_t, kMSALanesWord)           \
+  V(hadd_s_d, HADD_DF, int64_t, int32_t, kMSALanesDword)          \
+  V(hadd_u_h, HADD_DF, uint16_t, uint8_t, kMSALanesHalf)          \
+  V(hadd_u_w, HADD_DF, uint32_t, uint16_t, kMSALanesWord)         \
+  V(hadd_u_d, HADD_DF, uint64_t, uint32_t, kMSALanesDword)        \
+  V(hsub_s_h, HSUB_DF, int16_t, int8_t, kMSALanesHalf)            \
+  V(hsub_s_w, HSUB_DF, int32_t, int16_t, kMSALanesWord)           \
+  V(hsub_s_d, HSUB_DF, int64_t, int32_t, kMSALanesDword)          \
+  V(hsub_u_h, HSUB_DF, uint16_t, uint8_t, kMSALanesHalf)          \
+  V(hsub_u_w, HSUB_DF, uint32_t, uint16_t, kMSALanesWord)         \
+  V(hsub_u_d, HSUB_DF, uint64_t, uint32_t, kMSALanesDword)
 
 #define RUN_TEST(instr, verify, type, lanes, mask)                       \
   run_msa_3r(&tc[i], [](MacroAssembler& assm) { __ instr(w2, w1, w0); }, \
-             [](uint64_t ws, uint64_t wt, uint64_t wd) {                 \
+             [](uint64_t* ws, uint64_t* wt, uint64_t* wd) {              \
                verify(type, lanes, mask);                                \
              });
 
@@ -9311,9 +9722,41 @@
     TEST_CASE(RUN_TEST)
   }
 
+#define RUN_TEST2(instr, verify, type, lanes, mask)                      \
+  for (unsigned i = 0; i < arraysize(tc); i++) {                         \
+    for (unsigned j = 0; j < 3; j++) {                                   \
+      for (unsigned k = 0; k < lanes; k++) {                             \
+        type* element = reinterpret_cast<type*>(&tc[i]);                 \
+        element[k + j * lanes] &= std::numeric_limits<type>::max();      \
+      }                                                                  \
+    }                                                                    \
+  }                                                                      \
+  run_msa_3r(&tc[i], [](MacroAssembler& assm) { __ instr(w2, w1, w0); }, \
+             [](uint64_t* ws, uint64_t* wt, uint64_t* wd) {              \
+               verify(type, lanes, mask);                                \
+             });
+
+#define TEST_CASE2(V)                                    \
+  V(sra_b, SRA_DF, int8_t, kMSALanesByte, UINT8_MAX)     \
+  V(sra_h, SRA_DF, int16_t, kMSALanesHalf, UINT16_MAX)   \
+  V(sra_w, SRA_DF, int32_t, kMSALanesWord, UINT32_MAX)   \
+  V(sra_d, SRA_DF, int64_t, kMSALanesDword, UINT64_MAX)  \
+  V(srar_b, SRAR_DF, int8_t, kMSALanesByte, UINT8_MAX)   \
+  V(srar_h, SRAR_DF, int16_t, kMSALanesHalf, UINT16_MAX) \
+  V(srar_w, SRAR_DF, int32_t, kMSALanesWord, UINT32_MAX) \
+  V(srar_d, SRAR_DF, int64_t, kMSALanesDword, UINT64_MAX)
+
+  for (size_t i = 0; i < arraysize(tc); ++i) {
+    TEST_CASE2(RUN_TEST2)
+  }
+
+#undef TEST_CASE
+#undef TEST_CASE2
 #undef RUN_TEST
+#undef RUN_TEST2
 #undef SLL_DF
 #undef SRL_DF
+#undef SRA_DF
 #undef BCRL_DF
 #undef BSET_DF
 #undef BNEG_DF
@@ -9344,8 +9787,690 @@
 #undef DIV_DF
 #undef MOD_DF
 #undef SRAR_DF
+#undef PCKEV_DF
+#undef PCKOD_DF
+#undef ILVL_DF
+#undef ILVR_DF
+#undef ILVEV_DF
+#undef ILVOD_DF
+#undef VSHF_DF
+#undef HADD_DF
+#undef HSUB_DF
 }  // namespace internal
 
+struct TestCaseMsa3RF {
+  uint64_t ws_lo;
+  uint64_t ws_hi;
+  uint64_t wt_lo;
+  uint64_t wt_hi;
+  uint64_t wd_lo;
+  uint64_t wd_hi;
+};
+
+struct ExpectedResult_MSA3RF {
+  uint64_t exp_res_lo;
+  uint64_t exp_res_hi;
+};
+
+template <typename Func>
+void run_msa_3rf(const struct TestCaseMsa3RF* input,
+                 const struct ExpectedResult_MSA3RF* output,
+                 Func Generate2RInstructionFunc) {
+  Isolate* isolate = CcTest::i_isolate();
+  HandleScope scope(isolate);
+
+  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  CpuFeatureScope fscope(&assm, MIPS_SIMD);
+  msa_reg_t res;
+
+  load_elements_of_vector(
+      assm, reinterpret_cast<const uint64_t*>(&input->ws_lo), w0, t0, t1);
+  load_elements_of_vector(
+      assm, reinterpret_cast<const uint64_t*>(&input->wt_lo), w1, t0, t1);
+  load_elements_of_vector(
+      assm, reinterpret_cast<const uint64_t*>(&input->wd_lo), w2, t0, t1);
+  Generate2RInstructionFunc(assm);
+  store_elements_of_vector(assm, w2, a0);
+
+  __ jr(ra);
+  __ nop();
+
+  CodeDesc desc;
+  assm.GetCode(isolate, &desc);
+  Handle<Code> code =
+      isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
+#ifdef OBJECT_PRINT
+  code->Print(std::cout);
+#endif
+  auto f = GeneratedCode<F3>::FromCode(*code);
+
+  (f.Call(&res, 0, 0, 0, 0));
+
+  CHECK_EQ(output->exp_res_lo, res.d[0]);
+  CHECK_EQ(output->exp_res_hi, res.d[1]);
+}
+
+struct TestCaseMsa3RF_F {
+  float ws_1, ws_2, ws_3, ws_4;
+  float wt_1, wt_2, wt_3, wt_4;
+  float wd_1, wd_2, wd_3, wd_4;
+};
+struct ExpRes_32I {
+  int32_t exp_res_1;
+  int32_t exp_res_2;
+  int32_t exp_res_3;
+  int32_t exp_res_4;
+};
+
+struct TestCaseMsa3RF_D {
+  double ws_lo, ws_hi;
+  double wt_lo, wt_hi;
+  double wd_lo, wd_hi;
+};
+struct ExpRes_64I {
+  int64_t exp_res_lo;
+  int64_t exp_res_hi;
+};
+
+TEST(MSA_floating_point_quiet_compare) {
+  if (!IsMipsArchVariant(kMips32r6) || !CpuFeatures::IsSupported(MIPS_SIMD))
+    return;
+
+  CcTest::InitializeVM();
+
+  const float qnan_f = std::numeric_limits<float>::quiet_NaN();
+  const double qnan_d = std::numeric_limits<double>::quiet_NaN();
+  const float inf_f = std::numeric_limits<float>::infinity();
+  const double inf_d = std::numeric_limits<double>::infinity();
+  const int32_t ones = -1;
+
+  const struct TestCaseMsa3RF_F tc_w[]{
+      {qnan_f, -qnan_f, inf_f, 2.14e9f,  // ws
+       qnan_f, 0.f, qnan_f, -2.14e9f,    // wt
+       0, 0, 0, 0},                      // wd
+      {inf_f, -inf_f, -3.4e38f, 1.5e-45f, -inf_f, -inf_f, -inf_f, inf_f, 0, 0,
+       0, 0},
+      {0.f, 19.871e24f, -1.5e-45f, -1.5e-45f, -19.871e24f, 19.871e24f, 1.5e-45f,
+       -1.5e-45f, 0, 0, 0, 0}};
+
+  const struct TestCaseMsa3RF_D tc_d[]{
+      // ws_lo, ws_hi, wt_lo, wt_hi, wd_lo, wd_hi
+      {qnan_d, -qnan_d, qnan_f, 0., 0, 0},
+      {inf_d, 9.22e18, qnan_d, -9.22e18, 0, 0},
+      {inf_d, inf_d, -inf_d, inf_d, 0, 0},
+      {-2.3e-308, 5e-324, -inf_d, inf_d, 0, 0},
+      {0., 24.1e87, -1.6e308, 24.1e87, 0, 0},
+      {-5e-324, -5e-324, 5e-324, -5e-324, 0, 0}};
+
+  const struct ExpectedResult_MSA3RF exp_res_fcaf = {0, 0};
+  const struct ExpRes_32I exp_res_fcun_w[] = {
+      {ones, ones, ones, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}};
+  const struct ExpRes_64I exp_res_fcun_d[] = {{ones, ones}, {ones, 0}, {0, 0},
+                                              {0, 0},       {0, 0},    {0, 0}};
+  const struct ExpRes_32I exp_res_fceq_w[] = {
+      {0, 0, 0, 0}, {0, ones, 0, 0}, {0, ones, 0, ones}};
+  const struct ExpRes_64I exp_res_fceq_d[] = {{0, 0}, {0, 0},    {0, ones},
+                                              {0, 0}, {0, ones}, {0, ones}};
+  const struct ExpRes_32I exp_res_fcueq_w[] = {
+      {ones, ones, ones, 0}, {0, ones, 0, 0}, {0, ones, 0, ones}};
+  const struct ExpRes_64I exp_res_fcueq_d[] = {
+      {ones, ones}, {ones, 0}, {0, ones}, {0, 0}, {0, ones}, {0, ones}};
+  const struct ExpRes_32I exp_res_fclt_w[] = {
+      {0, 0, 0, 0}, {0, 0, 0, ones}, {0, 0, ones, 0}};
+  const struct ExpRes_64I exp_res_fclt_d[] = {{0, 0},    {0, 0}, {0, 0},
+                                              {0, ones}, {0, 0}, {ones, 0}};
+  const struct ExpRes_32I exp_res_fcult_w[] = {
+      {ones, ones, ones, 0}, {0, 0, 0, ones}, {0, 0, ones, 0}};
+  const struct ExpRes_64I exp_res_fcult_d[] = {
+      {ones, ones}, {ones, 0}, {0, 0}, {0, ones}, {0, 0}, {ones, 0}};
+  const struct ExpRes_32I exp_res_fcle_w[] = {
+      {0, 0, 0, 0}, {0, ones, 0, ones}, {0, ones, ones, ones}};
+  const struct ExpRes_64I exp_res_fcle_d[] = {
+      {0, 0}, {0, 0}, {0, ones}, {0, ones}, {0, ones}, {ones, ones}};
+  const struct ExpRes_32I exp_res_fcule_w[] = {
+      {ones, ones, ones, 0}, {0, ones, 0, ones}, {0, ones, ones, ones}};
+  const struct ExpRes_64I exp_res_fcule_d[] = {
+      {ones, ones}, {ones, 0}, {0, ones}, {0, ones}, {0, ones}, {ones, ones}};
+  const struct ExpRes_32I exp_res_fcor_w[] = {
+      {0, 0, 0, ones}, {ones, ones, ones, ones}, {ones, ones, ones, ones}};
+  const struct ExpRes_64I exp_res_fcor_d[] = {{0, 0},       {0, ones},
+                                              {ones, ones}, {ones, ones},
+                                              {ones, ones}, {ones, ones}};
+  const struct ExpRes_32I exp_res_fcune_w[] = {
+      {ones, ones, ones, ones}, {ones, 0, ones, ones}, {ones, 0, ones, 0}};
+  const struct ExpRes_64I exp_res_fcune_d[] = {{ones, ones}, {ones, ones},
+                                               {ones, 0},    {ones, ones},
+                                               {ones, 0},    {ones, 0}};
+  const struct ExpRes_32I exp_res_fcne_w[] = {
+      {0, 0, 0, ones}, {ones, 0, ones, ones}, {ones, 0, ones, 0}};
+  const struct ExpRes_64I exp_res_fcne_d[] = {
+      {0, 0}, {0, ones}, {ones, 0}, {ones, ones}, {ones, 0}, {ones, 0}};
+
+#define TEST_FP_QUIET_COMPARE_W(instruction, src, exp_res)                    \
+  run_msa_3rf(reinterpret_cast<const struct TestCaseMsa3RF*>(src),            \
+              reinterpret_cast<const struct ExpectedResult_MSA3RF*>(exp_res), \
+              [](MacroAssembler& assm) { __ instruction(w2, w0, w1); });
+#define TEST_FP_QUIET_COMPARE_D(instruction, src, exp_res)                    \
+  run_msa_3rf(reinterpret_cast<const struct TestCaseMsa3RF*>(src),            \
+              reinterpret_cast<const struct ExpectedResult_MSA3RF*>(exp_res), \
+              [](MacroAssembler& assm) { __ instruction(w2, w0, w1); });
+
+  for (uint64_t i = 0; i < arraysize(tc_w); i++) {
+    TEST_FP_QUIET_COMPARE_W(fcaf_w, &tc_w[i], &exp_res_fcaf)
+    TEST_FP_QUIET_COMPARE_W(fcun_w, &tc_w[i], &exp_res_fcun_w[i])
+    TEST_FP_QUIET_COMPARE_W(fceq_w, &tc_w[i], &exp_res_fceq_w[i])
+    TEST_FP_QUIET_COMPARE_W(fcueq_w, &tc_w[i], &exp_res_fcueq_w[i])
+    TEST_FP_QUIET_COMPARE_W(fclt_w, &tc_w[i], &exp_res_fclt_w[i])
+    TEST_FP_QUIET_COMPARE_W(fcult_w, &tc_w[i], &exp_res_fcult_w[i])
+    TEST_FP_QUIET_COMPARE_W(fcle_w, &tc_w[i], &exp_res_fcle_w[i])
+    TEST_FP_QUIET_COMPARE_W(fcule_w, &tc_w[i], &exp_res_fcule_w[i])
+    TEST_FP_QUIET_COMPARE_W(fcor_w, &tc_w[i], &exp_res_fcor_w[i])
+    TEST_FP_QUIET_COMPARE_W(fcune_w, &tc_w[i], &exp_res_fcune_w[i])
+    TEST_FP_QUIET_COMPARE_W(fcne_w, &tc_w[i], &exp_res_fcne_w[i])
+  }
+  for (uint64_t i = 0; i < arraysize(tc_d); i++) {
+    TEST_FP_QUIET_COMPARE_D(fcaf_d, &tc_d[i], &exp_res_fcaf)
+    TEST_FP_QUIET_COMPARE_D(fcun_d, &tc_d[i], &exp_res_fcun_d[i])
+    TEST_FP_QUIET_COMPARE_D(fceq_d, &tc_d[i], &exp_res_fceq_d[i])
+    TEST_FP_QUIET_COMPARE_D(fcueq_d, &tc_d[i], &exp_res_fcueq_d[i])
+    TEST_FP_QUIET_COMPARE_D(fclt_d, &tc_d[i], &exp_res_fclt_d[i])
+    TEST_FP_QUIET_COMPARE_D(fcult_d, &tc_d[i], &exp_res_fcult_d[i])
+    TEST_FP_QUIET_COMPARE_D(fcle_d, &tc_d[i], &exp_res_fcle_d[i])
+    TEST_FP_QUIET_COMPARE_D(fcule_d, &tc_d[i], &exp_res_fcule_d[i])
+    TEST_FP_QUIET_COMPARE_D(fcor_d, &tc_d[i], &exp_res_fcor_d[i])
+    TEST_FP_QUIET_COMPARE_D(fcune_d, &tc_d[i], &exp_res_fcune_d[i])
+    TEST_FP_QUIET_COMPARE_D(fcne_d, &tc_d[i], &exp_res_fcne_d[i])
+  }
+#undef TEST_FP_QUIET_COMPARE_W
+#undef TEST_FP_QUIET_COMPARE_D
+}
+
+template <typename T>
+inline const T* fadd_function(const T* src1, const T* src2, const T* src3,
+                              T* dst) {
+  for (uint64_t i = 0; i < kMSALanesByte / sizeof(T); i++) {
+    dst[i] = src1[i] + src2[i];
+  }
+  return dst;
+}
+template <typename T>
+inline const T* fsub_function(const T* src1, const T* src2, const T* src3,
+                              T* dst) {
+  for (uint64_t i = 0; i < kMSALanesByte / sizeof(T); i++) {
+    dst[i] = src1[i] - src2[i];
+  }
+  return dst;
+}
+template <typename T>
+inline const T* fmul_function(const T* src1, const T* src2, const T* src3,
+                              T* dst) {
+  for (uint64_t i = 0; i < kMSALanesByte / sizeof(T); i++) {
+    dst[i] = src1[i] * src2[i];
+  }
+  return dst;
+}
+template <typename T>
+inline const T* fdiv_function(const T* src1, const T* src2, const T* src3,
+                              T* dst) {
+  for (uint64_t i = 0; i < kMSALanesByte / sizeof(T); i++) {
+    dst[i] = src1[i] / src2[i];
+  }
+  return dst;
+}
+template <typename T>
+inline const T* fmadd_function(const T* src1, const T* src2, const T* src3,
+                               T* dst) {
+  for (uint64_t i = 0; i < kMSALanesByte / sizeof(T); i++) {
+    dst[i] = std::fma(src1[i], src2[i], src3[i]);
+  }
+  return dst;
+}
+template <typename T>
+inline const T* fmsub_function(const T* src1, const T* src2, const T* src3,
+                               T* dst) {
+  for (uint64_t i = 0; i < kMSALanesByte / sizeof(T); i++) {
+    dst[i] = std::fma(src1[i], -src2[i], src3[i]);
+  }
+  return dst;
+}
+
+TEST(MSA_floating_point_arithmetic) {
+  if (!IsMipsArchVariant(kMips32r6) || !CpuFeatures::IsSupported(MIPS_SIMD))
+    return;
+
+  CcTest::InitializeVM();
+
+  const float inf_f = std::numeric_limits<float>::infinity();
+  const double inf_d = std::numeric_limits<double>::infinity();
+
+  const struct TestCaseMsa3RF_F tc_w[] = {
+      {0.3, -2.14e13f, inf_f, 0.f,                     // ws
+       -inf_f, std::sqrt(8.e-26f), -23.e34, -2.14e9f,  // wt
+       -1e30f, 4.6e12f, 0, 2.14e9f},                   // wd
+      {3.4e38f, -1.2e-38f, 1e19f, -1e19f, 3.4e38f, 1.2e-38f, -1e19f, -1e-19f,
+       3.4e38f, 1.2e-38f * 3, 3.4e38f, -4e19f},
+      {-3e-31f, 3e10f, 1e25f, 123.f, 1e-14f, 1e-34f, 4e25f, 321.f, 3e-17f,
+       2e-24f, 2.f, -123456.f}};
+
+  const struct TestCaseMsa3RF_D tc_d[] = {
+      // ws_lo, ws_hi, wt_lo, wt_hi, wd_lo, wd_hi
+      {0.3, -2.14e103, -inf_d, std::sqrt(8.e-206), -1e30, 4.6e102},
+      {inf_d, 0., -23.e304, -2.104e9, 0, 2.104e9},
+      {3.4e307, -1.2e-307, 3.4e307, 1.2e-307, 3.4e307, 1.2e-307 * 3},
+      {1e154, -1e154, -1e154, -1e-154, 2.9e38, -4e19},
+      {-3e-301, 3e100, 1e-104, 1e-304, 3e-107, 2e-204},
+      {1e205, 123., 4e205, 321., 2., -123456.}};
+
+  struct ExpectedResult_MSA3RF dst_container;
+
+#define FP_ARITHMETIC_DF_W(instr, function, src1, src2, src3)           \
+  run_msa_3rf(                                                          \
+      reinterpret_cast<const struct TestCaseMsa3RF*>(src1),             \
+      reinterpret_cast<const struct ExpectedResult_MSA3RF*>(function(   \
+          src1, src2, src3, reinterpret_cast<float*>(&dst_container))), \
+      [](MacroAssembler& assm) { __ instr(w2, w0, w1); });
+
+#define FP_ARITHMETIC_DF_D(instr, function, src1, src2, src3)            \
+  run_msa_3rf(                                                           \
+      reinterpret_cast<const struct TestCaseMsa3RF*>(src1),              \
+      reinterpret_cast<const struct ExpectedResult_MSA3RF*>(function(    \
+          src1, src2, src3, reinterpret_cast<double*>(&dst_container))), \
+      [](MacroAssembler& assm) { __ instr(w2, w0, w1); });
+
+  for (uint64_t i = 0; i < arraysize(tc_w); i++) {
+    FP_ARITHMETIC_DF_W(fadd_w, fadd_function, &tc_w[i].ws_1, &tc_w[i].wt_1,
+                       &tc_w[i].wd_1)
+    FP_ARITHMETIC_DF_W(fsub_w, fsub_function, &tc_w[i].ws_1, &tc_w[i].wt_1,
+                       &tc_w[i].wd_1)
+    FP_ARITHMETIC_DF_W(fmul_w, fmul_function, &tc_w[i].ws_1, &tc_w[i].wt_1,
+                       &tc_w[i].wd_1)
+    FP_ARITHMETIC_DF_W(fdiv_w, fdiv_function, &tc_w[i].ws_1, &tc_w[i].wt_1,
+                       &tc_w[i].wd_1)
+    FP_ARITHMETIC_DF_W(fmadd_w, fmadd_function, &tc_w[i].ws_1, &tc_w[i].wt_1,
+                       &tc_w[i].wd_1)
+    FP_ARITHMETIC_DF_W(fmsub_w, fmsub_function, &tc_w[i].ws_1, &tc_w[i].wt_1,
+                       &tc_w[i].wd_1)
+  }
+  for (uint64_t i = 0; i < arraysize(tc_d); i++) {
+    FP_ARITHMETIC_DF_D(fadd_d, fadd_function, &tc_d[i].ws_lo, &tc_d[i].wt_lo,
+                       &tc_d[i].wd_lo)
+    FP_ARITHMETIC_DF_D(fsub_d, fsub_function, &tc_d[i].ws_lo, &tc_d[i].wt_lo,
+                       &tc_d[i].wd_lo)
+    FP_ARITHMETIC_DF_D(fmul_d, fmul_function, &tc_d[i].ws_lo, &tc_d[i].wt_lo,
+                       &tc_d[i].wd_lo)
+    FP_ARITHMETIC_DF_D(fdiv_d, fdiv_function, &tc_d[i].ws_lo, &tc_d[i].wt_lo,
+                       &tc_d[i].wd_lo)
+    FP_ARITHMETIC_DF_D(fmadd_d, fmadd_function, &tc_d[i].ws_lo, &tc_d[i].wt_lo,
+                       &tc_d[i].wd_lo)
+    FP_ARITHMETIC_DF_D(fmsub_d, fmsub_function, &tc_d[i].ws_lo, &tc_d[i].wt_lo,
+                       &tc_d[i].wd_lo)
+  }
+#undef FP_ARITHMETIC_DF_W
+#undef FP_ARITHMETIC_DF_D
+}
+
+struct ExpRes_F {
+  float exp_res_1;
+  float exp_res_2;
+  float exp_res_3;
+  float exp_res_4;
+};
+
+struct ExpRes_D {
+  double exp_res_1;
+  double exp_res_2;
+};
+
+TEST(MSA_fmin_fmin_a_fmax_fmax_a) {
+  if (!IsMipsArchVariant(kMips32r6) || !CpuFeatures::IsSupported(MIPS_SIMD))
+    return;
+
+  CcTest::InitializeVM();
+
+  const float inf_f = std::numeric_limits<float>::infinity();
+  const double inf_d = std::numeric_limits<double>::infinity();
+
+  const struct TestCaseMsa3RF_F tc_w[] = {
+      {0.3f, -2.14e13f, inf_f, -0.f,                    // ws
+       -inf_f, -std::sqrt(8.e26f), -23.e34f, -2.14e9f,  // wt
+       0, 0, 0, 0},                                     // wd
+      {3.4e38f, 1.2e-41f, 1e19f, 1e19f,                 // ws
+       3.4e38f, -1.1e-41f, -1e-42f, -1e29f,             // wt
+       0, 0, 0, 0}};                                    // wd
+
+  const struct TestCaseMsa3RF_D tc_d[] = {
+      // ws_lo, ws_hi, wt_lo, wt_hi, wd_lo, wd_hi
+      {0.3, -2.14e103, -inf_d, -std::sqrt(8e206), 0, 0},
+      {inf_d, -0., -23e304, -2.14e90, 0, 0},
+      {3.4e307, 1.2e-320, 3.4e307, -1.1e-320, 0, 0},
+      {1e154, 1e154, -1e-321, -1e174, 0, 0}};
+
+  const struct ExpRes_F exp_res_fmax_w[] = {{0.3f, -2.14e13f, inf_f, -0.f},
+                                            {3.4e38f, 1.2e-41f, 1e19f, 1e19f}};
+  const struct ExpRes_F exp_res_fmax_a_w[] = {
+      {-inf_f, -std::sqrt(8e26f), inf_f, -2.14e9f},
+      {3.4e38f, 1.2e-41f, 1e19f, -1e29f}};
+  const struct ExpRes_F exp_res_fmin_w[] = {
+      {-inf_f, -std::sqrt(8.e26f), -23e34f, -2.14e9f},
+      {3.4e38f, -1.1e-41f, -1e-42f, -1e29f}};
+  const struct ExpRes_F exp_res_fmin_a_w[] = {
+      {0.3, -2.14e13f, -23.e34f, -0.f}, {3.4e38f, -1.1e-41f, -1e-42f, 1e19f}};
+
+  const struct ExpRes_D exp_res_fmax_d[] = {
+      {0.3, -2.14e103}, {inf_d, -0.}, {3.4e307, 1.2e-320}, {1e154, 1e154}};
+  const struct ExpRes_D exp_res_fmax_a_d[] = {{-inf_d, -std::sqrt(8e206)},
+                                              {inf_d, -2.14e90},
+                                              {3.4e307, 1.2e-320},
+                                              {1e154, -1e174}};
+  const struct ExpRes_D exp_res_fmin_d[] = {{-inf_d, -std::sqrt(8e206)},
+                                            {-23e304, -2.14e90},
+                                            {3.4e307, -1.1e-320},
+                                            {-1e-321, -1e174}};
+  const struct ExpRes_D exp_res_fmin_a_d[] = {
+      {0.3, -2.14e103}, {-23e304, -0.}, {3.4e307, -1.1e-320}, {-1e-321, 1e154}};
+
+#define TEST_FP_MIN_MAX_W(instruction, src, exp_res)                          \
+  run_msa_3rf(reinterpret_cast<const struct TestCaseMsa3RF*>(src),            \
+              reinterpret_cast<const struct ExpectedResult_MSA3RF*>(exp_res), \
+              [](MacroAssembler& assm) { __ instruction(w2, w0, w1); });
+
+#define TEST_FP_MIN_MAX_D(instruction, src, exp_res)                          \
+  run_msa_3rf(reinterpret_cast<const struct TestCaseMsa3RF*>(src),            \
+              reinterpret_cast<const struct ExpectedResult_MSA3RF*>(exp_res), \
+              [](MacroAssembler& assm) { __ instruction(w2, w0, w1); });
+
+  for (uint64_t i = 0; i < arraysize(tc_w); i++) {
+    TEST_FP_MIN_MAX_W(fmax_w, &tc_w[i], &exp_res_fmax_w[i])
+    TEST_FP_MIN_MAX_W(fmax_a_w, &tc_w[i], &exp_res_fmax_a_w[i])
+    TEST_FP_MIN_MAX_W(fmin_w, &tc_w[i], &exp_res_fmin_w[i])
+    TEST_FP_MIN_MAX_W(fmin_a_w, &tc_w[i], &exp_res_fmin_a_w[i])
+  }
+
+  for (uint64_t i = 0; i < arraysize(tc_d); i++) {
+    TEST_FP_MIN_MAX_D(fmax_d, &tc_d[i], &exp_res_fmax_d[i])
+    TEST_FP_MIN_MAX_D(fmax_a_d, &tc_d[i], &exp_res_fmax_a_d[i])
+    TEST_FP_MIN_MAX_D(fmin_d, &tc_d[i], &exp_res_fmin_d[i])
+    TEST_FP_MIN_MAX_D(fmin_a_d, &tc_d[i], &exp_res_fmin_a_d[i])
+  }
+#undef TEST_FP_MIN_MAX_W
+#undef TEST_FP_MIN_MAX_D
+}
+
+struct TestCaseMsa3RF_16I {
+  int16_t ws_1, ws_2, ws_3, ws_4, ws_5, ws_6, ws_7, ws_8;
+  int16_t wt_1, wt_2, wt_3, wt_4, wt_5, wt_6, wt_7, wt_8;
+  int16_t wd_1, wd_2, wd_3, wd_4, wd_5, wd_6, wd_7, wd_8;
+};
+struct ExpRes_16I {
+  int16_t exp_res_1;
+  int16_t exp_res_2;
+  int16_t exp_res_3;
+  int16_t exp_res_4;
+  int16_t exp_res_5;
+  int16_t exp_res_6;
+  int16_t exp_res_7;
+  int16_t exp_res_8;
+};
+
+struct TestCaseMsa3RF_32I {
+  int32_t ws_1, ws_2, ws_3, ws_4;
+  int32_t wt_1, wt_2, wt_3, wt_4;
+  int32_t wd_1, wd_2, wd_3, wd_4;
+};
+
+TEST(MSA_fixed_point_arithmetic) {
+  if (!IsMipsArchVariant(kMips32r6) || !CpuFeatures::IsSupported(MIPS_SIMD))
+    return;
+
+  CcTest::InitializeVM();
+
+  const struct TestCaseMsa3RF tc_h[]{
+      {0x800080007FFF7FFF, 0xE1ED8000FAD3863A, 0x80007FFF00AF7FFF,
+       0x800015A77FFFA0EB, 0x7FFF800080007FFF, 0x80007FFF1F207364},
+      {0x800080007FFF006A, 0x002AFFC4329AD87B, 0x80007FFF7FFF00F3,
+       0xFFECFFB4D0D7F429, 0x80007FFF80007C33, 0x54AC6BBCE53B8C91}};
+
+  const struct TestCaseMsa3RF tc_w[]{
+      {0x8000000080000000, 0x7FFFFFFF7FFFFFFF, 0x800000007FFFFFFF,
+       0x00001FF37FFFFFFF, 0x7FFFFFFF80000000, 0x800000007FFFFFFF},
+      {0xE1ED035580000000, 0xFAD3863AED462C0B, 0x8000000015A70AEC,
+       0x7FFFFFFFA0EBD354, 0x800000007FFFFFFF, 0xD0D7F4291F207364},
+      {0x8000000080000000, 0x7FFFFFFF0000DA1F, 0x800000007FFFFFFF,
+       0x7FFFFFFF00F39C3B, 0x800000007FFFFFFF, 0x800000007C33F2FD},
+      {0x0000AC33FFFF329A, 0x54AC6BBCE53BD87B, 0xFFFFE2B4D0D7F429,
+       0x0355ED462C0B1FF3, 0xB5DEB625939DD3F9, 0xE642ADFA69519596}};
+
+  const struct ExpectedResult_MSA3RF exp_res_mul_q_h[] = {
+      {0x7FFF800100AE7FFE, 0x1E13EA59FAD35A74},
+      {0x7FFF80017FFE0000, 0xFFFF0000ED5B03A7}};
+  const struct ExpectedResult_MSA3RF exp_res_madd_q_h[] = {
+      {0x7FFF800080AE7FFF, 0x9E136A5819F37FFF},
+      {0x00000000FFFE7C33, 0x54AB6BBCD2969038}};
+  const struct ExpectedResult_MSA3RF exp_res_msub_q_h[] = {
+      {0xFFFFFFFF80000000, 0x80007FFF244C18EF},
+      {0x80007FFF80007C32, 0x54AC6BBBF7DF88E9}};
+  const struct ExpectedResult_MSA3RF exp_res_mulr_q_h[] = {
+      {0x7FFF800100AF7FFE, 0x1E13EA59FAD35A75},
+      {0x7FFF80017FFE0001, 0x00000000ED5B03A8}};
+  const struct ExpectedResult_MSA3RF exp_res_maddr_q_h[] = {
+      {0x7FFF800080AF7FFF, 0x9E136A5819F37FFF},
+      {0x00000000FFFE7C34, 0x54AC6BBCD2969039}};
+  const struct ExpectedResult_MSA3RF exp_res_msubr_q_h[] = {
+      {0xFFFFFFFF80000001, 0x80007FFF244D18EF},
+      {0x80007FFF80007C32, 0x54AC6BBCF7E088E9}};
+
+  const struct ExpectedResult_MSA3RF exp_res_mul_q_w[] = {
+      {0x7FFFFFFF80000001, 0x00001FF27FFFFFFE},
+      {0x1E12FCABEA58F514, 0xFAD3863A0DE8DEE1},
+      {0x7FFFFFFF80000001, 0x7FFFFFFE0000019F},
+      {0xFFFFFFFF00004BAB, 0x0234E1FBF6CA3EE0}};
+  const struct ExpectedResult_MSA3RF exp_res_madd_q_w[] = {
+      {0x7FFFFFFF80000000, 0x80001FF27FFFFFFF},
+      {0x9E12FCAB6A58F513, 0xCBAB7A632D095245},
+      {0x0000000000000000, 0xFFFFFFFE7C33F49C},
+      {0xB5DEB624939E1FA4, 0xE8778FF5601BD476}};
+  const struct ExpectedResult_MSA3RF exp_res_msub_q_w[] = {
+      {0xFFFFFFFFFFFFFFFF, 0x8000000000000000},
+      {0x800000007FFFFFFF, 0xD6046DEE11379482},
+      {0x800000007FFFFFFF, 0x800000007C33F15D},
+      {0xB5DEB625939D884D, 0xE40DCBFE728756B5}};
+  const struct ExpectedResult_MSA3RF exp_res_mulr_q_w[] = {
+      {0x7FFFFFFF80000001, 0x00001FF37FFFFFFE},
+      {0x1E12FCABEA58F514, 0xFAD3863A0DE8DEE2},
+      {0x7FFFFFFF80000001, 0x7FFFFFFE0000019F},
+      {0x0000000000004BAC, 0x0234E1FCF6CA3EE1}};
+  const struct ExpectedResult_MSA3RF exp_res_maddr_q_w[] = {
+      {0x7FFFFFFF80000000, 0x80001FF37FFFFFFF},
+      {0x9E12FCAB6A58F513, 0xCBAB7A632D095246},
+      {0x0000000000000000, 0xFFFFFFFE7C33F49C},
+      {0xB5DEB625939E1FA5, 0xE8778FF6601BD477}};
+  const struct ExpectedResult_MSA3RF exp_res_msubr_q_w[] = {
+      {0xFFFFFFFFFFFFFFFF, 0x8000000000000001},
+      {0x800000007FFFFFFF, 0xD6046DEF11379482},
+      {0x800000007FFFFFFF, 0x800000007C33F15E},
+      {0xB5DEB625939D884D, 0xE40DCBFE728756B5}};
+
+#define TEST_FIXED_POINT_DF_H(instruction, src, exp_res) \
+  run_msa_3rf((src), (exp_res),                          \
+              [](MacroAssembler& assm) { __ instruction(w2, w0, w1); });
+
+#define TEST_FIXED_POINT_DF_W(instruction, src, exp_res) \
+  run_msa_3rf((src), (exp_res),                          \
+              [](MacroAssembler& assm) { __ instruction(w2, w0, w1); });
+
+  for (uint64_t i = 0; i < arraysize(tc_h); i++) {
+    TEST_FIXED_POINT_DF_H(mul_q_h, &tc_h[i], &exp_res_mul_q_h[i])
+    TEST_FIXED_POINT_DF_H(madd_q_h, &tc_h[i], &exp_res_madd_q_h[i])
+    TEST_FIXED_POINT_DF_H(msub_q_h, &tc_h[i], &exp_res_msub_q_h[i])
+    TEST_FIXED_POINT_DF_H(mulr_q_h, &tc_h[i], &exp_res_mulr_q_h[i])
+    TEST_FIXED_POINT_DF_H(maddr_q_h, &tc_h[i], &exp_res_maddr_q_h[i])
+    TEST_FIXED_POINT_DF_H(msubr_q_h, &tc_h[i], &exp_res_msubr_q_h[i])
+  }
+
+  for (uint64_t i = 0; i < arraysize(tc_w); i++) {
+    TEST_FIXED_POINT_DF_W(mul_q_w, &tc_w[i], &exp_res_mul_q_w[i])
+    TEST_FIXED_POINT_DF_W(madd_q_w, &tc_w[i], &exp_res_madd_q_w[i])
+    TEST_FIXED_POINT_DF_W(msub_q_w, &tc_w[i], &exp_res_msub_q_w[i])
+    TEST_FIXED_POINT_DF_W(mulr_q_w, &tc_w[i], &exp_res_mulr_q_w[i])
+    TEST_FIXED_POINT_DF_W(maddr_q_w, &tc_w[i], &exp_res_maddr_q_w[i])
+    TEST_FIXED_POINT_DF_W(msubr_q_w, &tc_w[i], &exp_res_msubr_q_w[i])
+  }
+#undef TEST_FIXED_POINT_DF_H
+#undef TEST_FIXED_POINT_DF_W
+}
+
+TEST(MSA_fexdo) {
+  if (!IsMipsArchVariant(kMips32r6) || !CpuFeatures::IsSupported(MIPS_SIMD))
+    return;
+
+  CcTest::InitializeVM();
+
+  const float inf_float = std::numeric_limits<float>::infinity();
+  const float nan_float = std::numeric_limits<float>::quiet_NaN();
+  const double inf_double = std::numeric_limits<double>::infinity();
+
+  const struct TestCaseMsa3RF_F tc_w[] = {
+      // ws_1, ws_2, ws_3, ws_4, wt_1, wt_2, wt_3, wt_4, wd_1, wd_2, wd_3, wd_4
+      {inf_float, nan_float, 66505.f, 65504.f, 6.2e-5f, 5e-5f, -32.42f,
+       -inf_float, 0, 0, 0, 0},
+      {-0.f, 0.f, 123.567f, -765.321f, -6e-8f, 5.9e-8f, 1e-7f, -1e-20f, 0, 0, 0,
+       0},
+      {1e-36f, 1e20f, -1e20f, 2e-20f, 6e-8f, -2.9e-8f, -66505.f, -65504.f}};
+
+  const struct TestCaseMsa3RF_D tc_d[] = {
+      // ws_lo, ws_hi, wt_lo, wt_hi, wd_lo, wd_hi
+      {inf_double, -1234., 4e38, 3.4e38, 0, 0},
+      {1.2e-38, 1.1e-39, -38.92f, -inf_double, 0, 0},
+      {-0., 0., 123.567e31, -765.321e33, 0, 0},
+      {-1.5e-45, 1.3e-45, 1e-42, -1e-200, 0, 0},
+      {1e-202, 1e158, -1e159, 1e14, 0, 0},
+      {1.5e-42, 1.3e-46, -123.567e31, 765.321e33, 0, 0}};
+
+  const struct ExpRes_16I exp_res_fexdo_w[] = {
+      {static_cast<int16_t>(0x0410), static_cast<int16_t>(0x0347),
+       static_cast<int16_t>(0xD00D), static_cast<int16_t>(0xFC00),
+       static_cast<int16_t>(0x7C00), static_cast<int16_t>(0x7DFF),
+       static_cast<int16_t>(0x7C00), static_cast<int16_t>(0x7BFF)},
+      {static_cast<int16_t>(0x8001), static_cast<int16_t>(0x0001),
+       static_cast<int16_t>(0x0002), static_cast<int16_t>(0x8000),
+       static_cast<int16_t>(0x8000), static_cast<int16_t>(0x0000),
+       static_cast<int16_t>(0x57B9), static_cast<int16_t>(0xE1FB)},
+      {static_cast<int16_t>(0x0001), static_cast<int16_t>(0x8000),
+       static_cast<int16_t>(0xFC00), static_cast<int16_t>(0xFBFF),
+       static_cast<int16_t>(0x0000), static_cast<int16_t>(0x7C00),
+       static_cast<int16_t>(0xFC00), static_cast<int16_t>(0x0000)}};
+
+  const struct ExpRes_32I exp_res_fexdo_d[] = {
+      {bit_cast<int32_t>(0x7F800000), bit_cast<int32_t>(0x7F7FC99E),
+       bit_cast<int32_t>(0x7F800000), bit_cast<int32_t>(0xC49A4000)},
+      {bit_cast<int32_t>(0xC21BAE14), bit_cast<int32_t>(0xFF800000),
+       bit_cast<int32_t>(0x0082AB1E), bit_cast<int32_t>(0x000BFA5A)},
+      {bit_cast<int32_t>(0x7673B164), bit_cast<int32_t>(0xFB13653D),
+       bit_cast<int32_t>(0x80000000), bit_cast<int32_t>(0x00000000)},
+      {bit_cast<int32_t>(0x000002CA), bit_cast<int32_t>(0x80000000),
+       bit_cast<int32_t>(0x80000001), bit_cast<int32_t>(0x00000001)},
+      {bit_cast<int32_t>(0xFF800000), bit_cast<int32_t>(0x56B5E621),
+       bit_cast<int32_t>(0x00000000), bit_cast<int32_t>(0x7F800000)},
+      {bit_cast<int32_t>(0xF673B164), bit_cast<int32_t>(0x7B13653D),
+       bit_cast<int32_t>(0x0000042E), bit_cast<int32_t>(0x00000000)}};
+
+#define TEST_FEXDO_H(instruction, src, exp_res)                               \
+  run_msa_3rf(reinterpret_cast<const struct TestCaseMsa3RF*>(src),            \
+              reinterpret_cast<const struct ExpectedResult_MSA3RF*>(exp_res), \
+              [](MacroAssembler& assm) { __ instruction(w2, w0, w1); });
+
+#define TEST_FEXDO_W(instruction, src, exp_res)                               \
+  run_msa_3rf(reinterpret_cast<const struct TestCaseMsa3RF*>(src),            \
+              reinterpret_cast<const struct ExpectedResult_MSA3RF*>(exp_res), \
+              [](MacroAssembler& assm) { __ instruction(w2, w0, w1); });
+
+  for (uint64_t i = 0; i < arraysize(tc_w); i++) {
+    TEST_FEXDO_H(fexdo_h, &tc_w[i], &exp_res_fexdo_w[i])
+  }
+
+  for (uint64_t i = 0; i < arraysize(tc_d); i++) {
+    TEST_FEXDO_W(fexdo_w, &tc_d[i], &exp_res_fexdo_d[i])
+  }
+
+#undef TEST_FEXDO_H
+#undef TEST_FEXDO_W
+}
+
+TEST(MSA_ftq) {
+  if (!IsMipsArchVariant(kMips32r6) || !CpuFeatures::IsSupported(MIPS_SIMD))
+    return;
+
+  CcTest::InitializeVM();
+
+  const float nan_float = std::numeric_limits<float>::quiet_NaN();
+  const float inf_float = std::numeric_limits<float>::infinity();
+  const double nan_double = std::numeric_limits<double>::quiet_NaN();
+  const double inf_double = std::numeric_limits<double>::infinity();
+
+  const struct TestCaseMsa3RF_F tc_w[] = {
+      {1.f, -0.999f, 1.5f, -31e-6, 1e-7, -0.598, 0.0023, -0.f, 0, 0, 0, 0},
+      {100.f, -102.f, -1.1f, 1.3f, 0.f, -1.f, 0.9999f, -0.000322, 0, 0, 0, 0},
+      {nan_float, inf_float, -inf_float, -nan_float, -1e-40, 3e-44, 8.3e36,
+       -0.00003, 0, 0, 0, 0}};
+
+  const struct TestCaseMsa3RF_D tc_d[] = {
+      {1., -0.999, 1.5, -31e-6, 0, 0},
+      {1e-7, -0.598, 0.0023, -0.f, 0, 0},
+      {100.f, -102.f, -1.1f, 1.3f, 0, 0},
+      {0.f, -1.f, 0.9999f, -0.000322, 0, 0},
+      {nan_double, inf_double, -inf_double, -nan_double, 0, 0},
+      {-3e306, 2e-307, 9e307, 2e-307, 0, 0}};
+
+  const struct ExpRes_16I exp_res_ftq_w[] = {
+      {static_cast<int16_t>(0x0000), static_cast<int16_t>(0xB375),
+       static_cast<int16_t>(0x004B), static_cast<int16_t>(0x0000),
+       static_cast<int16_t>(0x7FFF), static_cast<int16_t>(0x8021),
+       static_cast<int16_t>(0x7FFF), static_cast<int16_t>(0xFFFF)},
+      {static_cast<int16_t>(0x0000), static_cast<int16_t>(0x8000),
+       static_cast<int16_t>(0x7FFD), static_cast<int16_t>(0xFFF5),
+       static_cast<int16_t>(0x7FFF), static_cast<int16_t>(0x8000),
+       static_cast<int16_t>(0x8000), static_cast<int16_t>(0x7FFF)},
+      {static_cast<int16_t>(0x0000), static_cast<int16_t>(0x0000),
+       static_cast<int16_t>(0x7FFF), static_cast<int16_t>(0xFFFF),
+       static_cast<int16_t>(0x0000), static_cast<int16_t>(0x7FFF),
+       static_cast<int16_t>(0x8000), static_cast<int16_t>(0x0000)}};
+
+  const struct ExpRes_32I exp_res_ftq_d[] = {
+      {bit_cast<int32_t>(0x7FFFFFFF), bit_cast<int32_t>(0xFFFEFBF4),
+       bit_cast<int32_t>(0x7FFFFFFF), bit_cast<int32_t>(0x8020C49C)},
+      {bit_cast<int32_t>(0x004B5DCC), bit_cast<int32_t>(0x00000000),
+       bit_cast<int32_t>(0x000000D7), bit_cast<int32_t>(0xB374BC6A)},
+      {bit_cast<int32_t>(0x80000000), bit_cast<int32_t>(0x7FFFFFFF),
+       bit_cast<int32_t>(0x7FFFFFFF), bit_cast<int32_t>(0x80000000)},
+      {bit_cast<int32_t>(0x7FFCB900), bit_cast<int32_t>(0xFFF572DE),
+       bit_cast<int32_t>(0x00000000), bit_cast<int32_t>(0x80000000)},
+      {bit_cast<int32_t>(0x80000000), bit_cast<int32_t>(0x00000000),
+       bit_cast<int32_t>(0x00000000), bit_cast<int32_t>(0x7FFFFFFF)},
+      {bit_cast<int32_t>(0x7FFFFFFF), bit_cast<int32_t>(0x00000000),
+       bit_cast<int32_t>(0x80000000), bit_cast<int32_t>(0x00000000)}};
+
+#define TEST_FTQ_H(instruction, src, exp_res)                                 \
+  run_msa_3rf(reinterpret_cast<const struct TestCaseMsa3RF*>(src),            \
+              reinterpret_cast<const struct ExpectedResult_MSA3RF*>(exp_res), \
+              [](MacroAssembler& assm) { __ instruction(w2, w0, w1); });
+
+#define TEST_FTQ_W(instruction, src, exp_res)                                 \
+  run_msa_3rf(reinterpret_cast<const struct TestCaseMsa3RF*>(src),            \
+              reinterpret_cast<const struct ExpectedResult_MSA3RF*>(exp_res), \
+              [](MacroAssembler& assm) { __ instruction(w2, w0, w1); });
+
+  for (uint64_t i = 0; i < arraysize(tc_w); i++) {
+    TEST_FTQ_H(ftq_h, &tc_w[i], &exp_res_ftq_w[i])
+  }
+
+  for (uint64_t i = 0; i < arraysize(tc_d); i++) {
+    TEST_FTQ_W(ftq_w, &tc_d[i], &exp_res_ftq_d[i])
+  }
+
+#undef TEST_FTQ_H
+#undef TEST_FTQ_W
+}
+
 #undef __
 
 }  // namespace internal
diff --git a/src/v8/test/cctest/test-assembler-mips64.cc b/src/v8/test/cctest/test-assembler-mips64.cc
index 976bd02..c59f2af 100644
--- a/src/v8/test/cctest/test-assembler-mips64.cc
+++ b/src/v8/test/cctest/test-assembler-mips64.cc
@@ -35,7 +35,7 @@
 #include "src/factory.h"
 #include "src/macro-assembler.h"
 #include "src/mips64/macro-assembler-mips64.h"
-#include "src/mips64/simulator-mips64.h"
+#include "src/simulator.h"
 
 #include "test/cctest/cctest.h"
 
@@ -43,11 +43,12 @@
 namespace internal {
 
 // Define these function prototypes to match JSEntryFunction in execution.cc.
-typedef Object* (*F1)(int x, int p1, int p2, int p3, int p4);
-typedef Object* (*F2)(int x, int y, int p2, int p3, int p4);
-typedef Object* (*F3)(void* p, int p1, int p2, int p3, int p4);
-typedef Object* (*F4)(int64_t x, int64_t y, int64_t p2, int64_t p3, int64_t p4);
-typedef Object* (*F5)(void* p0, void* p1, int p2, int p3, int p4);
+// TODO(mips64): Refine these signatures per test case.
+typedef Object*(F1)(int x, int p1, int p2, int p3, int p4);
+typedef Object*(F2)(int x, int y, int p2, int p3, int p4);
+typedef Object*(F3)(void* p, int p1, int p2, int p3, int p4);
+typedef Object*(F4)(int64_t x, int64_t y, int64_t p2, int64_t p3, int64_t p4);
+typedef Object*(F5)(void* p0, void* p1, int p2, int p3, int p4);
 
 #define __ assm.
 
@@ -56,7 +57,8 @@
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
 
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
 
   // Addition.
   __ addu(v0, a0, a1);
@@ -67,10 +69,9 @@
   assm.GetCode(isolate, &desc);
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
-  F2 f = FUNCTION_CAST<F2>(code->entry());
-  int64_t res = reinterpret_cast<int64_t>(
-      CALL_GENERATED_CODE(isolate, f, 0xab0, 0xc, 0, 0, 0));
-  CHECK_EQ(0xabcL, res);
+  auto f = GeneratedCode<F2>::FromCode(*code);
+  int64_t res = reinterpret_cast<int64_t>(f.Call(0xAB0, 0xC, 0, 0, 0));
+  CHECK_EQ(0xABCL, res);
 }
 
 
@@ -79,7 +80,8 @@
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
 
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
   Label L, C;
 
   __ mov(a1, a0);
@@ -103,9 +105,8 @@
   assm.GetCode(isolate, &desc);
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
-  F1 f = FUNCTION_CAST<F1>(code->entry());
-  int64_t res = reinterpret_cast<int64_t>(
-      CALL_GENERATED_CODE(isolate, f, 50, 0, 0, 0, 0));
+  auto f = GeneratedCode<F1>::FromCode(*code);
+  int64_t res = reinterpret_cast<int64_t>(f.Call(50, 0, 0, 0, 0));
   CHECK_EQ(1275L, res);
 }
 
@@ -115,7 +116,8 @@
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
 
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
 
   Label exit, error;
 
@@ -127,8 +129,8 @@
   __ ori(a4, zero_reg, 0);
   __ lui(a4, 0x1234);
   __ ori(a4, a4, 0);
-  __ ori(a4, a4, 0x0f0f);
-  __ ori(a4, a4, 0xf0f0);
+  __ ori(a4, a4, 0x0F0F);
+  __ ori(a4, a4, 0xF0F0);
   __ addiu(a5, a4, 1);
   __ addiu(a6, a5, -0x10);
 
@@ -136,20 +138,20 @@
   __ li(a4, 0x00000004);
   __ li(a5, 0x00001234);
   __ li(a6, 0x12345678);
-  __ li(a7, 0x7fffffff);
-  __ li(t0, 0xfffffffc);
-  __ li(t1, 0xffffedcc);
-  __ li(t2, 0xedcba988);
+  __ li(a7, 0x7FFFFFFF);
+  __ li(t0, 0xFFFFFFFC);
+  __ li(t1, 0xFFFFEDCC);
+  __ li(t2, 0xEDCBA988);
   __ li(t3, 0x80000000);
 
   // SPECIAL class.
   __ srl(v0, a6, 8);    // 0x00123456
-  __ sll(v0, v0, 11);   // 0x91a2b000
-  __ sra(v0, v0, 3);    // 0xf2345600
-  __ srav(v0, v0, a4);  // 0xff234560
-  __ sllv(v0, v0, a4);  // 0xf2345600
-  __ srlv(v0, v0, a4);  // 0x0f234560
-  __ Branch(&error, ne, v0, Operand(0x0f234560));
+  __ sll(v0, v0, 11);   // 0x91A2B000
+  __ sra(v0, v0, 3);    // 0xF2345600
+  __ srav(v0, v0, a4);  // 0xFF234560
+  __ sllv(v0, v0, a4);  // 0xF2345600
+  __ srlv(v0, v0, a4);  // 0x0F234560
+  __ Branch(&error, ne, v0, Operand(0x0F234560));
   __ nop();
 
   __ addu(v0, a4, a5);  // 0x00001238
@@ -157,17 +159,17 @@
   __ Branch(&error, ne, v0, Operand(0x00001234));
   __ nop();
   __ addu(v1, a7, a4);  // 32bit addu result is sign-extended into 64bit reg.
-  __ Branch(&error, ne, v1, Operand(0xffffffff80000003));
+  __ Branch(&error, ne, v1, Operand(0xFFFFFFFF80000003));
   __ nop();
-  __ subu(v1, t3, a4);  // 0x7ffffffc
-  __ Branch(&error, ne, v1, Operand(0x7ffffffc));
+  __ subu(v1, t3, a4);  // 0x7FFFFFFC
+  __ Branch(&error, ne, v1, Operand(0x7FFFFFFC));
   __ nop();
 
   __ and_(v0, a5, a6);  // 0x0000000000001230
   __ or_(v0, v0, a5);   // 0x0000000000001234
-  __ xor_(v0, v0, a6);  // 0x000000001234444c
-  __ nor(v0, v0, a6);   // 0xffffffffedcba987
-  __ Branch(&error, ne, v0, Operand(0xffffffffedcba983));
+  __ xor_(v0, v0, a6);  // 0x000000001234444C
+  __ nor(v0, v0, a6);   // 0xFFFFFFFFEDCBA987
+  __ Branch(&error, ne, v0, Operand(0xFFFFFFFFEDCBA983));
   __ nop();
 
   // Shift both 32bit number to left, to preserve meaning of next comparison.
@@ -192,11 +194,11 @@
   __ Branch(&error, ne, v0, Operand(0x00007400));
   __ nop();
   __ addiu(v1, a7, 0x1);  // 0x80000000 - result is sign-extended.
-  __ Branch(&error, ne, v1, Operand(0xffffffff80000000));
+  __ Branch(&error, ne, v1, Operand(0xFFFFFFFF80000000));
   __ nop();
 
   __ slti(v0, a5, 0x00002000);  // 0x1
-  __ slti(v0, v0, 0xffff8000);  // 0x0
+  __ slti(v0, v0, 0xFFFF8000);  // 0x0
   __ Branch(&error, ne, v0, Operand(zero_reg));
   __ nop();
   __ sltiu(v0, a5, 0x00002000);  // 0x1
@@ -204,13 +206,13 @@
   __ Branch(&error, ne, v0, Operand(0x1));
   __ nop();
 
-  __ andi(v0, a5, 0xf0f0);  // 0x00001030
-  __ ori(v0, v0, 0x8a00);   // 0x00009a30
-  __ xori(v0, v0, 0x83cc);  // 0x000019fc
-  __ Branch(&error, ne, v0, Operand(0x000019fc));
+  __ andi(v0, a5, 0xF0F0);  // 0x00001030
+  __ ori(v0, v0, 0x8A00);   // 0x00009A30
+  __ xori(v0, v0, 0x83CC);  // 0x000019FC
+  __ Branch(&error, ne, v0, Operand(0x000019FC));
   __ nop();
   __ lui(v1, 0x8123);  // Result is sign-extended into 64bit register.
-  __ Branch(&error, ne, v1, Operand(0xffffffff81230000));
+  __ Branch(&error, ne, v1, Operand(0xFFFFFFFF81230000));
   __ nop();
 
   // Bit twiddling instructions & conditional moves.
@@ -224,11 +226,11 @@
   __ addu(v0, v0, v1);  // 51
   __ Branch(&error, ne, v0, Operand(51));
   __ Movn(a0, a7, a4);  // Move a0<-a7 (a4 is NOT 0).
-  __ Ins(a0, a5, 12, 8);  // 0x7ff34fff
-  __ Branch(&error, ne, a0, Operand(0x7ff34fff));
+  __ Ins(a0, a5, 12, 8);  // 0x7FF34FFF
+  __ Branch(&error, ne, a0, Operand(0x7FF34FFF));
   __ Movz(a0, t2, t3);    // a0 not updated (t3 is NOT 0).
-  __ Ext(a1, a0, 8, 12);  // 0x34f
-  __ Branch(&error, ne, a1, Operand(0x34f));
+  __ Ext(a1, a0, 8, 12);  // 0x34F
+  __ Branch(&error, ne, a1, Operand(0x34F));
   __ Movz(a0, t2, v1);    // a0<-t2, v0 is 0, from 8 instr back.
   __ Branch(&error, ne, a0, Operand(t2));
 
@@ -249,9 +251,8 @@
   assm.GetCode(isolate, &desc);
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
-  F2 f = FUNCTION_CAST<F2>(code->entry());
-  int64_t res = reinterpret_cast<int64_t>(
-      CALL_GENERATED_CODE(isolate, f, 0xab0, 0xc, 0, 0, 0));
+  auto f = GeneratedCode<F2>::FromCode(*code);
+  int64_t res = reinterpret_cast<int64_t>(f.Call(0xAB0, 0xC, 0, 0, 0));
 
   CHECK_EQ(0x31415926L, res);
 }
@@ -285,7 +286,8 @@
 
   // Create a function that accepts &t, and loads, manipulates, and stores
   // the doubles t.a ... t.f.
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
   Label L, C;
 
   // Double precision floating point instructions.
@@ -352,7 +354,7 @@
   assm.GetCode(isolate, &desc);
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
-  F3 f = FUNCTION_CAST<F3>(code->entry());
+  auto f = GeneratedCode<F3>::FromCode(*code);
   // Double test values.
   t.a = 1.5e14;
   t.b = 2.75e11;
@@ -369,8 +371,7 @@
   t.fd = 0.0;
   t.fe = 0.0;
   t.ff = 0.0;
-  Object* dummy = CALL_GENERATED_CODE(isolate, f, &t, 0, 0, 0, 0);
-  USE(dummy);
+  f.Call(&t, 0, 0, 0, 0);
   // Expected double results.
   CHECK_EQ(1.5e14, t.a);
   CHECK_EQ(1.5e14, t.b);
@@ -409,7 +410,8 @@
   } T;
   T t;
 
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
   Label L, C;
 
   __ Ldc1(f4, MemOperand(a0, offsetof(T, a)));
@@ -446,19 +448,18 @@
   assm.GetCode(isolate, &desc);
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
-  F3 f = FUNCTION_CAST<F3>(code->entry());
+  auto f = GeneratedCode<F3>::FromCode(*code);
   t.a = 1.5e22;
   t.b = 2.75e11;
   t.c = 17.17;
   t.d = -2.75e11;
-  Object* dummy = CALL_GENERATED_CODE(isolate, f, &t, 0, 0, 0, 0);
-  USE(dummy);
+  f.Call(&t, 0, 0, 0, 0);
 
   CHECK_EQ(2.75e11, t.a);
   CHECK_EQ(2.75e11, t.b);
   CHECK_EQ(1.5e22, t.c);
-  CHECK_EQ(static_cast<int64_t>(0xffffffffc25001d1L), t.high);
-  CHECK_EQ(static_cast<int64_t>(0xffffffffbf800000L), t.low);
+  CHECK_EQ(static_cast<int64_t>(0xFFFFFFFFC25001D1L), t.high);
+  CHECK_EQ(static_cast<int64_t>(0xFFFFFFFFBF800000L), t.low);
 }
 
 
@@ -476,7 +477,8 @@
   } T;
   T t;
 
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
   Label L, C;
 
   // Load all structure elements to registers.
@@ -512,13 +514,12 @@
   assm.GetCode(isolate, &desc);
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
-  F3 f = FUNCTION_CAST<F3>(code->entry());
+  auto f = GeneratedCode<F3>::FromCode(*code);
   t.a = 1.5e4;
   t.b = 2.75e8;
   t.i = 12345678;
   t.j = -100000;
-  Object* dummy = CALL_GENERATED_CODE(isolate, f, &t, 0, 0, 0, 0);
-  USE(dummy);
+  f.Call(&t, 0, 0, 0, 0);
 
   CHECK_EQ(12345678.0, t.a);
   CHECK_EQ(-100000.0, t.b);
@@ -545,7 +546,8 @@
   } T;
   T t;
 
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
   Label L, C;
 
   // Basic word load/store.
@@ -582,25 +584,24 @@
   assm.GetCode(isolate, &desc);
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
-  F3 f = FUNCTION_CAST<F3>(code->entry());
+  auto f = GeneratedCode<F3>::FromCode(*code);
   t.ui = 0x11223344;
-  t.si = 0x99aabbcc;
-  Object* dummy = CALL_GENERATED_CODE(isolate, f, &t, 0, 0, 0, 0);
-  USE(dummy);
+  t.si = 0x99AABBCC;
+  f.Call(&t, 0, 0, 0, 0);
 
   CHECK_EQ(static_cast<int32_t>(0x11223344), t.r1);
   if (kArchEndian == kLittle)  {
     CHECK_EQ(static_cast<int32_t>(0x3344), t.r2);
-    CHECK_EQ(static_cast<int32_t>(0xffffbbcc), t.r3);
-    CHECK_EQ(static_cast<int32_t>(0x0000bbcc), t.r4);
-    CHECK_EQ(static_cast<int32_t>(0xffffffcc), t.r5);
-    CHECK_EQ(static_cast<int32_t>(0x3333bbcc), t.r6);
+    CHECK_EQ(static_cast<int32_t>(0xFFFFBBCC), t.r3);
+    CHECK_EQ(static_cast<int32_t>(0x0000BBCC), t.r4);
+    CHECK_EQ(static_cast<int32_t>(0xFFFFFFCC), t.r5);
+    CHECK_EQ(static_cast<int32_t>(0x3333BBCC), t.r6);
   } else {
     CHECK_EQ(static_cast<int32_t>(0x1122), t.r2);
-    CHECK_EQ(static_cast<int32_t>(0xffff99aa), t.r3);
-    CHECK_EQ(static_cast<int32_t>(0x000099aa), t.r4);
-    CHECK_EQ(static_cast<int32_t>(0xffffff99), t.r5);
-    CHECK_EQ(static_cast<int32_t>(0x99aa3333), t.r6);
+    CHECK_EQ(static_cast<int32_t>(0xFFFF99AA), t.r3);
+    CHECK_EQ(static_cast<int32_t>(0x000099AA), t.r4);
+    CHECK_EQ(static_cast<int32_t>(0xFFFFFF99), t.r5);
+    CHECK_EQ(static_cast<int32_t>(0x99AA3333), t.r6);
   }
 }
 
@@ -624,7 +625,8 @@
 
   // Create a function that accepts &t, and loads, manipulates, and stores
   // the doubles t.a ... t.f.
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
   Label neither_is_nan, less_than, outa_here;
 
   __ Ldc1(f4, MemOperand(a0, offsetof(T, a)));
@@ -669,7 +671,7 @@
   assm.GetCode(isolate, &desc);
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
-  F3 f = FUNCTION_CAST<F3>(code->entry());
+  auto f = GeneratedCode<F3>::FromCode(*code);
   t.a = 1.5e14;
   t.b = 2.75e11;
   t.c = 2.0;
@@ -677,8 +679,7 @@
   t.e = 0.0;
   t.f = 0.0;
   t.result = 0;
-  Object* dummy = CALL_GENERATED_CODE(isolate, f, &t, 0, 0, 0, 0);
-  USE(dummy);
+  f.Call(&t, 0, 0, 0, 0);
   CHECK_EQ(1.5e14, t.a);
   CHECK_EQ(2.75e11, t.b);
   CHECK_EQ(1, t.result);
@@ -711,7 +712,7 @@
     } T;
     T t;
 
-    MacroAssembler assm(isolate, NULL, 0,
+    MacroAssembler assm(isolate, nullptr, 0,
                         v8::internal::CodeObjectRequired::kYes);
 
     // Basic word load.
@@ -720,11 +721,11 @@
     // ROTR instruction (called through the Ror macro).
     __ Ror(a5, a4, 0x0004);
     __ Ror(a6, a4, 0x0008);
-    __ Ror(a7, a4, 0x000c);
+    __ Ror(a7, a4, 0x000C);
     __ Ror(t0, a4, 0x0010);
     __ Ror(t1, a4, 0x0014);
     __ Ror(t2, a4, 0x0018);
-    __ Ror(t3, a4, 0x001c);
+    __ Ror(t3, a4, 0x001C);
 
     // Basic word store.
     __ Sw(a5, MemOperand(a0, offsetof(T, result_rotr_4)));
@@ -767,10 +768,9 @@
     assm.GetCode(isolate, &desc);
     Handle<Code> code =
         isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
-    F3 f = FUNCTION_CAST<F3>(code->entry());
+    auto f = GeneratedCode<F3>::FromCode(*code);
     t.input = 0x12345678;
-    Object* dummy = CALL_GENERATED_CODE(isolate, f, &t, 0x0, 0, 0, 0);
-    USE(dummy);
+    f.Call(&t, 0x0, 0, 0, 0);
     CHECK_EQ(static_cast<int32_t>(0x81234567), t.result_rotr_4);
     CHECK_EQ(static_cast<int32_t>(0x78123456), t.result_rotr_8);
     CHECK_EQ(static_cast<int32_t>(0x67812345), t.result_rotr_12);
@@ -796,7 +796,8 @@
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
 
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
   Label exit, exit2, exit3;
 
   __ Branch(&exit, ge, a0, Operand(zero_reg));
@@ -837,7 +838,8 @@
   } T;
   T t;
 
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
   Label L, C;
 
   if (kArchVariant == kMips64r2) {
@@ -888,17 +890,16 @@
     assm.GetCode(isolate, &desc);
     Handle<Code> code =
         isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
-    F3 f = FUNCTION_CAST<F3>(code->entry());
-    t.a = 2.147483647e9;       // 0x7fffffff -> 0x41DFFFFFFFC00000 as double.
-    t.b_long_hi = 0x000000ff;  // 0xFF00FF00FF -> 0x426FE01FE01FE000 as double.
-    t.b_long_lo = 0x00ff00ff;
-    Object* dummy = CALL_GENERATED_CODE(isolate, f, &t, 0, 0, 0, 0);
-    USE(dummy);
+    auto f = GeneratedCode<F3>::FromCode(*code);
+    t.a = 2.147483647e9;       // 0x7FFFFFFF -> 0x41DFFFFFFFC00000 as double.
+    t.b_long_hi = 0x000000FF;  // 0xFF00FF00FF -> 0x426FE01FE01FE000 as double.
+    t.b_long_lo = 0x00FF00FF;
+    f.Call(&t, 0, 0, 0, 0);
 
     CHECK_EQ(static_cast<int32_t>(0x41DFFFFF), t.dbl_exp);
     CHECK_EQ(static_cast<int32_t>(0xFFC00000), t.dbl_mant);
     CHECK_EQ(0, t.long_hi);
-    CHECK_EQ(static_cast<int32_t>(0x7fffffff), t.long_lo);
+    CHECK_EQ(static_cast<int32_t>(0x7FFFFFFF), t.long_lo);
     CHECK_EQ(2.147483647e9, t.a_converted);
 
     // 0xFF00FF00FF -> 1.095233372415e12.
@@ -938,7 +939,7 @@
     } T;
     T t;
 
-    MacroAssembler assm(isolate, NULL, 0,
+    MacroAssembler assm(isolate, nullptr, 0,
                         v8::internal::CodeObjectRequired::kYes);
 
     // Test all combinations of LWL and vAddr.
@@ -1024,53 +1025,52 @@
     assm.GetCode(isolate, &desc);
     Handle<Code> code =
         isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
-    F3 f = FUNCTION_CAST<F3>(code->entry());
-    t.reg_init = 0xaabbccdd;
+    auto f = GeneratedCode<F3>::FromCode(*code);
+    t.reg_init = 0xAABBCCDD;
     t.mem_init = 0x11223344;
 
-    Object* dummy = CALL_GENERATED_CODE(isolate, f, &t, 0, 0, 0, 0);
-    USE(dummy);
+    f.Call(&t, 0, 0, 0, 0);
 
     if (kArchEndian == kLittle) {
-      CHECK_EQ(static_cast<int32_t>(0x44bbccdd), t.lwl_0);
-      CHECK_EQ(static_cast<int32_t>(0x3344ccdd), t.lwl_1);
-      CHECK_EQ(static_cast<int32_t>(0x223344dd), t.lwl_2);
+      CHECK_EQ(static_cast<int32_t>(0x44BBCCDD), t.lwl_0);
+      CHECK_EQ(static_cast<int32_t>(0x3344CCDD), t.lwl_1);
+      CHECK_EQ(static_cast<int32_t>(0x223344DD), t.lwl_2);
       CHECK_EQ(static_cast<int32_t>(0x11223344), t.lwl_3);
 
       CHECK_EQ(static_cast<int32_t>(0x11223344), t.lwr_0);
-      CHECK_EQ(static_cast<int32_t>(0xaa112233), t.lwr_1);
-      CHECK_EQ(static_cast<int32_t>(0xaabb1122), t.lwr_2);
-      CHECK_EQ(static_cast<int32_t>(0xaabbcc11), t.lwr_3);
+      CHECK_EQ(static_cast<int32_t>(0xAA112233), t.lwr_1);
+      CHECK_EQ(static_cast<int32_t>(0xAABB1122), t.lwr_2);
+      CHECK_EQ(static_cast<int32_t>(0xAABBCC11), t.lwr_3);
 
-      CHECK_EQ(static_cast<int32_t>(0x112233aa), t.swl_0);
-      CHECK_EQ(static_cast<int32_t>(0x1122aabb), t.swl_1);
-      CHECK_EQ(static_cast<int32_t>(0x11aabbcc), t.swl_2);
-      CHECK_EQ(static_cast<int32_t>(0xaabbccdd), t.swl_3);
+      CHECK_EQ(static_cast<int32_t>(0x112233AA), t.swl_0);
+      CHECK_EQ(static_cast<int32_t>(0x1122AABB), t.swl_1);
+      CHECK_EQ(static_cast<int32_t>(0x11AABBCC), t.swl_2);
+      CHECK_EQ(static_cast<int32_t>(0xAABBCCDD), t.swl_3);
 
-      CHECK_EQ(static_cast<int32_t>(0xaabbccdd), t.swr_0);
-      CHECK_EQ(static_cast<int32_t>(0xbbccdd44), t.swr_1);
-      CHECK_EQ(static_cast<int32_t>(0xccdd3344), t.swr_2);
-      CHECK_EQ(static_cast<int32_t>(0xdd223344), t.swr_3);
+      CHECK_EQ(static_cast<int32_t>(0xAABBCCDD), t.swr_0);
+      CHECK_EQ(static_cast<int32_t>(0xBBCCDD44), t.swr_1);
+      CHECK_EQ(static_cast<int32_t>(0xCCDD3344), t.swr_2);
+      CHECK_EQ(static_cast<int32_t>(0xDD223344), t.swr_3);
     } else {
       CHECK_EQ(static_cast<int32_t>(0x11223344), t.lwl_0);
-      CHECK_EQ(static_cast<int32_t>(0x223344dd), t.lwl_1);
-      CHECK_EQ(static_cast<int32_t>(0x3344ccdd), t.lwl_2);
-      CHECK_EQ(static_cast<int32_t>(0x44bbccdd), t.lwl_3);
+      CHECK_EQ(static_cast<int32_t>(0x223344DD), t.lwl_1);
+      CHECK_EQ(static_cast<int32_t>(0x3344CCDD), t.lwl_2);
+      CHECK_EQ(static_cast<int32_t>(0x44BBCCDD), t.lwl_3);
 
-      CHECK_EQ(static_cast<int32_t>(0xaabbcc11), t.lwr_0);
-      CHECK_EQ(static_cast<int32_t>(0xaabb1122), t.lwr_1);
-      CHECK_EQ(static_cast<int32_t>(0xaa112233), t.lwr_2);
+      CHECK_EQ(static_cast<int32_t>(0xAABBCC11), t.lwr_0);
+      CHECK_EQ(static_cast<int32_t>(0xAABB1122), t.lwr_1);
+      CHECK_EQ(static_cast<int32_t>(0xAA112233), t.lwr_2);
       CHECK_EQ(static_cast<int32_t>(0x11223344), t.lwr_3);
 
-      CHECK_EQ(static_cast<int32_t>(0xaabbccdd), t.swl_0);
-      CHECK_EQ(static_cast<int32_t>(0x11aabbcc), t.swl_1);
-      CHECK_EQ(static_cast<int32_t>(0x1122aabb), t.swl_2);
-      CHECK_EQ(static_cast<int32_t>(0x112233aa), t.swl_3);
+      CHECK_EQ(static_cast<int32_t>(0xAABBCCDD), t.swl_0);
+      CHECK_EQ(static_cast<int32_t>(0x11AABBCC), t.swl_1);
+      CHECK_EQ(static_cast<int32_t>(0x1122AABB), t.swl_2);
+      CHECK_EQ(static_cast<int32_t>(0x112233AA), t.swl_3);
 
-      CHECK_EQ(static_cast<int32_t>(0xdd223344), t.swr_0);
-      CHECK_EQ(static_cast<int32_t>(0xccdd3344), t.swr_1);
-      CHECK_EQ(static_cast<int32_t>(0xbbccdd44), t.swr_2);
-      CHECK_EQ(static_cast<int32_t>(0xaabbccdd), t.swr_3);
+      CHECK_EQ(static_cast<int32_t>(0xDD223344), t.swr_0);
+      CHECK_EQ(static_cast<int32_t>(0xCCDD3344), t.swr_1);
+      CHECK_EQ(static_cast<int32_t>(0xBBCCDD44), t.swr_2);
+      CHECK_EQ(static_cast<int32_t>(0xAABBCCDD), t.swr_3);
     }
   }
 }
@@ -1091,7 +1091,8 @@
   } T;
   T t;
 
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
 
   __ mov(t2, fp);  // Save frame pointer.
   __ mov(fp, a0);  // Access struct T by fp.
@@ -1149,7 +1150,7 @@
   assm.GetCode(isolate, &desc);
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
-  F3 f = FUNCTION_CAST<F3>(code->entry());
+  auto f = GeneratedCode<F3>::FromCode(*code);
   t.x = 1;
   t.y = 2;
   t.y1 = 3;
@@ -1157,8 +1158,7 @@
   t.y3 = 0XBABA;
   t.y4 = 0xDEDA;
 
-  Object* dummy = CALL_GENERATED_CODE(isolate, f, &t, 0, 0, 0, 0);
-  USE(dummy);
+  f.Call(&t, 0, 0, 0, 0);
 
   CHECK_EQ(3, t.y1);
 }
@@ -1180,7 +1180,8 @@
   } T;
   T t;
 
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
 
   __ Sw(a4, MemOperand(a0, offsetof(T, cvt_small_in)));
   __ Cvt_d_uw(f10, a4);
@@ -1203,13 +1204,12 @@
   assm.GetCode(isolate, &desc);
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
-  F3 f = FUNCTION_CAST<F3>(code->entry());
+  auto f = GeneratedCode<F3>::FromCode(*code);
 
   t.cvt_big_in = 0xFFFFFFFF;
   t.cvt_small_in  = 333;
 
-  Object* dummy = CALL_GENERATED_CODE(isolate, f, &t, 0, 0, 0, 0);
-  USE(dummy);
+  f.Call(&t, 0, 0, 0, 0);
 
   CHECK_EQ(t.cvt_big_out, static_cast<double>(t.cvt_big_in));
   CHECK_EQ(t.cvt_small_out, static_cast<double>(t.cvt_small_in));
@@ -1258,7 +1258,8 @@
 
 #undef ROUND_STRUCT_ELEMENT
 
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
 
   // Save FCSR.
   __ cfc1(a1, FCSR);
@@ -1324,7 +1325,7 @@
   assm.GetCode(isolate, &desc);
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
-  F3 f = FUNCTION_CAST<F3>(code->entry());
+  auto f = GeneratedCode<F3>::FromCode(*code);
 
   t.round_up_in = 123.51;
   t.round_down_in = 123.49;
@@ -1335,8 +1336,7 @@
   t.err3_in = static_cast<double>(1) + 0xFFFFFFFF;
   t.err4_in = NAN;
 
-  Object* dummy = CALL_GENERATED_CODE(isolate, f, &t, 0, 0, 0, 0);
-  USE(dummy);
+  f.Call(&t, 0, 0, 0, 0);
 
 #define GET_FPU_ERR(x) (static_cast<int>(x & kFCSRFlagMask))
 #define CHECK_NAN2008(x) (x & kFCSRNaN2008FlagMask)
@@ -1363,7 +1363,7 @@
   CcTest::InitializeVM();
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
-  Assembler assm(isolate, NULL, 0);
+  Assembler assm(isolate, nullptr, 0);
 
   Label target;
   __ beq(v0, v1, &target);
@@ -1401,7 +1401,8 @@
   };
   T t;
 
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
   Label L, C;
 
   // Basic 32-bit word load/store, with un-signed data.
@@ -1454,9 +1455,9 @@
   assm.GetCode(isolate, &desc);
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
-  F3 f = FUNCTION_CAST<F3>(code->entry());
+  auto f = GeneratedCode<F3>::FromCode(*code);
   t.ui = 0x44332211;
-  t.si = 0x99aabbcc;
+  t.si = 0x99AABBCC;
   t.r1 = 0x5555555555555555;
   t.r2 = 0x5555555555555555;
   t.r3 = 0x5555555555555555;
@@ -1470,8 +1471,7 @@
   t.r11 = 0x5555555555555555;
   t.r12 = 0x5555555555555555;
 
-  Object* dummy = CALL_GENERATED_CODE(isolate, f, &t, 0, 0, 0, 0);
-  USE(dummy);
+  f.Call(&t, 0, 0, 0, 0);
 
   if (kArchEndian == kLittle) {
     // Unsigned data, 32 & 64
@@ -1479,52 +1479,52 @@
     CHECK_EQ(static_cast<int64_t>(0x0000000044332211L), t.r2);  // sd.
 
     // Signed data, 32 & 64.
-    CHECK_EQ(static_cast<int64_t>(0x5555555599aabbccL), t.r3);  // lw, sw.
-    CHECK_EQ(static_cast<int64_t>(0xffffffff99aabbccL), t.r4);  // sd.
+    CHECK_EQ(static_cast<int64_t>(0x5555555599AABBCCL), t.r3);  // lw, sw.
+    CHECK_EQ(static_cast<int64_t>(0xFFFFFFFF99AABBCCL), t.r4);  // sd.
 
     // Signed data, 32 & 64.
-    CHECK_EQ(static_cast<int64_t>(0x5555555599aabbccL), t.r5);  // lwu, sw.
-    CHECK_EQ(static_cast<int64_t>(0x0000000099aabbccL), t.r6);  // sd.
+    CHECK_EQ(static_cast<int64_t>(0x5555555599AABBCCL), t.r5);  // lwu, sw.
+    CHECK_EQ(static_cast<int64_t>(0x0000000099AABBCCL), t.r6);  // sd.
 
     // lh with unsigned and signed data.
     CHECK_EQ(static_cast<int64_t>(0x5555555500002211L), t.r7);  // lh, sw.
-    CHECK_EQ(static_cast<int64_t>(0x55555555ffffbbccL), t.r8);  // lh, sw.
+    CHECK_EQ(static_cast<int64_t>(0x55555555FFFFBBCCL), t.r8);  // lh, sw.
 
     // lhu with signed data.
-    CHECK_EQ(static_cast<int64_t>(0x555555550000bbccL), t.r9);  // lhu, sw.
+    CHECK_EQ(static_cast<int64_t>(0x555555550000BBCCL), t.r9);  // lhu, sw.
 
     // lb with signed data.
-    CHECK_EQ(static_cast<int64_t>(0x55555555ffffffccL), t.r10);  // lb, sw.
+    CHECK_EQ(static_cast<int64_t>(0x55555555FFFFFFCCL), t.r10);  // lb, sw.
 
     // sh with unsigned and signed data.
     CHECK_EQ(static_cast<int64_t>(0x5555555555552211L), t.r11);  // lw, sh.
-    CHECK_EQ(static_cast<int64_t>(0x555555555555bbccL), t.r12);  // lw, sh.
+    CHECK_EQ(static_cast<int64_t>(0x555555555555BBCCL), t.r12);  // lw, sh.
   } else {
     // Unsigned data, 32 & 64
     CHECK_EQ(static_cast<int64_t>(0x4433221155555555L), t.r1);  // lw, sw.
     CHECK_EQ(static_cast<int64_t>(0x0000000044332211L), t.r2);  // sd.
 
     // Signed data, 32 & 64.
-    CHECK_EQ(static_cast<int64_t>(0x99aabbcc55555555L), t.r3);  // lw, sw.
-    CHECK_EQ(static_cast<int64_t>(0xffffffff99aabbccL), t.r4);  // sd.
+    CHECK_EQ(static_cast<int64_t>(0x99AABBCC55555555L), t.r3);  // lw, sw.
+    CHECK_EQ(static_cast<int64_t>(0xFFFFFFFF99AABBCCL), t.r4);  // sd.
 
     // Signed data, 32 & 64.
-    CHECK_EQ(static_cast<int64_t>(0x99aabbcc55555555L), t.r5);  // lwu, sw.
-    CHECK_EQ(static_cast<int64_t>(0x0000000099aabbccL), t.r6);  // sd.
+    CHECK_EQ(static_cast<int64_t>(0x99AABBCC55555555L), t.r5);  // lwu, sw.
+    CHECK_EQ(static_cast<int64_t>(0x0000000099AABBCCL), t.r6);  // sd.
 
     // lh with unsigned and signed data.
     CHECK_EQ(static_cast<int64_t>(0x0000443355555555L), t.r7);  // lh, sw.
-    CHECK_EQ(static_cast<int64_t>(0xffff99aa55555555L), t.r8);  // lh, sw.
+    CHECK_EQ(static_cast<int64_t>(0xFFFF99AA55555555L), t.r8);  // lh, sw.
 
     // lhu with signed data.
-    CHECK_EQ(static_cast<int64_t>(0x000099aa55555555L), t.r9);  // lhu, sw.
+    CHECK_EQ(static_cast<int64_t>(0x000099AA55555555L), t.r9);  // lhu, sw.
 
     // lb with signed data.
-    CHECK_EQ(static_cast<int64_t>(0xffffff9955555555L), t.r10);  // lb, sw.
+    CHECK_EQ(static_cast<int64_t>(0xFFFFFF9955555555L), t.r10);  // lb, sw.
 
     // sh with unsigned and signed data.
     CHECK_EQ(static_cast<int64_t>(0x2211555555555555L), t.r11);  // lw, sh.
-    CHECK_EQ(static_cast<int64_t>(0xbbcc555555555555L), t.r12);  // lw, sh.
+    CHECK_EQ(static_cast<int64_t>(0xBBCC555555555555L), t.r12);  // lw, sh.
   }
 }
 
@@ -1535,7 +1535,7 @@
     CcTest::InitializeVM();
     Isolate* isolate = CcTest::i_isolate();
     HandleScope scope(isolate);
-    MacroAssembler assm(isolate, NULL, 0,
+    MacroAssembler assm(isolate, nullptr, 0,
                         v8::internal::CodeObjectRequired::kYes);
 
     typedef struct test {
@@ -1583,9 +1583,9 @@
     assm.GetCode(isolate, &desc);
     Handle<Code> code =
         isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
-    F3 f = FUNCTION_CAST<F3>(code->entry());
+    auto f = GeneratedCode<F3>::FromCode(*code);
 
-    (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+    f.Call(&test, 0, 0, 0, 0);
 
     CHECK_EQ(1, test.a);
     CHECK_EQ(0, test.b);
@@ -1613,7 +1613,7 @@
         test.f = tests_D[j];
         test.i = inputs_S[i];
         test.j = tests_S[j];
-        (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+        f.Call(&test, 0, 0, 0, 0);
         CHECK_EQ(outputs_D[i], test.g);
         CHECK_EQ(0, test.h);
         CHECK_EQ(outputs_S[i], test.k);
@@ -1621,7 +1621,7 @@
 
         test.f = tests_D[j+1];
         test.j = tests_S[j+1];
-        (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+        f.Call(&test, 0, 0, 0, 0);
         CHECK_EQ(0, test.g);
         CHECK_EQ(outputs_D[i], test.h);
         CHECK_EQ(0, test.k);
@@ -1699,14 +1699,14 @@
     assm.GetCode(isolate, &desc);
     Handle<Code> code =
         isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
-    F3 f = FUNCTION_CAST<F3>(code->entry());
+    auto f = GeneratedCode<F3>::FromCode(*code);
     for (int i = 4; i < kTableLength; i++) {
       test.a = inputsa[i];
       test.b = inputsb[i];
       test.e = inputse[i];
       test.f = inputsf[i];
 
-      CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0);
+      f.Call(&test, 0, 0, 0, 0);
 
       CHECK_EQ(0, memcmp(&test.c, &outputsdmin[i], sizeof(test.c)));
       CHECK_EQ(0, memcmp(&test.d, &outputsdmax[i], sizeof(test.d)));
@@ -1723,7 +1723,7 @@
     CcTest::InitializeVM();
     Isolate* isolate = CcTest::i_isolate();
     HandleScope scope(isolate);
-    MacroAssembler assm(isolate, NULL, 0,
+    MacroAssembler assm(isolate, nullptr, 0,
                         v8::internal::CodeObjectRequired::kYes);
 
     typedef struct test_float {
@@ -1808,13 +1808,13 @@
     assm.GetCode(isolate, &desc);
     Handle<Code> code =
         isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
-    F3 f = FUNCTION_CAST<F3>(code->entry());
+    auto f = GeneratedCode<F3>::FromCode(*code);
 
     for (int j = 0; j < 4; j++) {
       test.fcsr = fcsr_inputs[j];
       for (int i = 0; i < kTableLength; i++) {
         test.a = inputs[i];
-        (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+        f.Call(&test, 0, 0, 0, 0);
         CHECK_EQ(test.b, outputs[j][i]);
       }
     }
@@ -1827,7 +1827,7 @@
     CcTest::InitializeVM();
     Isolate* isolate = CcTest::i_isolate();
     HandleScope scope(isolate);
-    MacroAssembler assm(isolate, NULL, 0,
+    MacroAssembler assm(isolate, nullptr, 0,
                         v8::internal::CodeObjectRequired::kYes);
 
     typedef struct test {
@@ -1856,7 +1856,7 @@
     assm.GetCode(isolate, &desc);
     Handle<Code> code =
         isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
-    F3 f = FUNCTION_CAST<F3>(code->entry());
+    auto f = GeneratedCode<F3>::FromCode(*code);
 
     const int test_size = 3;
     const int input_size = 5;
@@ -1881,13 +1881,13 @@
         test.ft = inputs_ft[i];
         test.fd = tests_S[j];
         test.fs = inputs_fs[i];
-        (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+        f.Call(&test, 0, 0, 0, 0);
         CHECK_EQ(test.dd, inputs_ds[i]);
         CHECK_EQ(test.fd, inputs_fs[i]);
 
         test.dd = tests_D[j+1];
         test.fd = tests_S[j+1];
-        (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+        f.Call(&test, 0, 0, 0, 0);
         CHECK_EQ(test.dd, inputs_dt[i]);
         CHECK_EQ(test.fd, inputs_ft[i]);
       }
@@ -1902,7 +1902,7 @@
     CcTest::InitializeVM();
     Isolate* isolate = CcTest::i_isolate();
     HandleScope scope(isolate);
-    MacroAssembler assm(isolate, NULL, 0,
+    MacroAssembler assm(isolate, nullptr, 0,
                         v8::internal::CodeObjectRequired::kYes);
 
     typedef struct test_float {
@@ -1989,13 +1989,13 @@
     assm.GetCode(isolate, &desc);
     Handle<Code> code =
         isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
-    F3 f = FUNCTION_CAST<F3>(code->entry());
+    auto f = GeneratedCode<F3>::FromCode(*code);
 
     for (int j = 0; j < 4; j++) {
       test.fcsr = fcsr_inputs[j];
       for (int i = 0; i < kTableLength; i++) {
         test.a = inputs[i];
-        (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+        f.Call(&test, 0, 0, 0, 0);
         CHECK_EQ(test.b, outputs[j][i]);
       }
     }
@@ -2075,13 +2075,13 @@
     assm.GetCode(isolate, &desc);
     Handle<Code> code =
         isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
-    F3 f = FUNCTION_CAST<F3>(code->entry());
+    auto f = GeneratedCode<F3>::FromCode(*code);
     for (int i = 0; i < kTableLength; i++) {
       test.a = inputsa[i];
       test.b = inputsb[i];
       test.c = inputsc[i];
       test.d = inputsd[i];
-      (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+      f.Call(&test, 0, 0, 0, 0);
 
       if (i < kTableLength - 1) {
         CHECK_EQ(test.resd, resd[i]);
@@ -2106,7 +2106,7 @@
     CcTest::InitializeVM();
     Isolate* isolate = CcTest::i_isolate();
     HandleScope scope(isolate);
-    MacroAssembler assm(isolate, NULL, 0,
+    MacroAssembler assm(isolate, nullptr, 0,
                         v8::internal::CodeObjectRequired::kYes);
     const double dFPU64InvalidResult = static_cast<double>(kFPU64InvalidResult);
     typedef struct test_float {
@@ -2157,11 +2157,11 @@
     assm.GetCode(isolate, &desc);
     Handle<Code> code =
         isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
-    F3 f = FUNCTION_CAST<F3>(code->entry());
+    auto f = GeneratedCode<F3>::FromCode(*code);
     for (int i = 0; i < kTableLength; i++) {
       test.a = inputs_D[i];
       test.b = inputs_S[i];
-      (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+      f.Call(&test, 0, 0, 0, 0);
       if ((test.isNaN2008 & kFCSRNaN2008FlagMask) &&
               kArchVariant == kMips64r6) {
         CHECK_EQ(test.c, outputsNaN2008[i]);
@@ -2180,7 +2180,7 @@
     CcTest::InitializeVM();
     Isolate* isolate = CcTest::i_isolate();
     HandleScope scope(isolate);
-    MacroAssembler assm(isolate, NULL, 0,
+    MacroAssembler assm(isolate, nullptr, 0,
                         v8::internal::CodeObjectRequired::kYes);
 
     typedef struct test_float {
@@ -2238,20 +2238,20 @@
     assm.GetCode(isolate, &desc);
     Handle<Code> code =
         isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
-    F3 f = FUNCTION_CAST<F3>(code->entry());
+    auto f = GeneratedCode<F3>::FromCode(*code);
     for (int i = 0; i < kTableLength; i++) {
       test.a = inputs_D[i];
       test.c = inputs_S[i];
 
       test.rt = 1;
-      (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+      f.Call(&test, 0, 0, 0, 0);
       CHECK_EQ(test.b, test.bold);
       CHECK_EQ(test.d, test.dold);
       CHECK_EQ(test.b1, outputs_D[i]);
       CHECK_EQ(test.d1, outputs_S[i]);
 
       test.rt = 0;
-      (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+      f.Call(&test, 0, 0, 0, 0);
       CHECK_EQ(test.b, outputs_D[i]);
       CHECK_EQ(test.d, outputs_S[i]);
       CHECK_EQ(test.b1, test.bold1);
@@ -2309,7 +2309,7 @@
           test.fcsr = 1 << (24+condition_flags[j]);
         }
         HandleScope scope(isolate);
-        MacroAssembler assm(isolate, NULL, 0,
+        MacroAssembler assm(isolate, nullptr, 0,
                             v8::internal::CodeObjectRequired::kYes);
         __ Ldc1(f2, MemOperand(a0, offsetof(TestFloat, srcd)));
         __ Lwc1(f4, MemOperand(a0, offsetof(TestFloat, srcf)));
@@ -2339,15 +2339,15 @@
         assm.GetCode(isolate, &desc);
         Handle<Code> code =
             isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
-        F3 f = FUNCTION_CAST<F3>(code->entry());
+        auto f = GeneratedCode<F3>::FromCode(*code);
 
-        (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+        f.Call(&test, 0, 0, 0, 0);
         CHECK_EQ(test.dstf, outputs_S[i]);
         CHECK_EQ(test.dstd, outputs_D[i]);
         CHECK_EQ(test.dstf1, test.dstfold1);
         CHECK_EQ(test.dstd1, test.dstdold1);
         test.fcsr = 0;
-        (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+        f.Call(&test, 0, 0, 0, 0);
         CHECK_EQ(test.dstf, test.dstfold);
         CHECK_EQ(test.dstd, test.dstdold);
         CHECK_EQ(test.dstf1, outputs_S[i]);
@@ -2364,7 +2364,8 @@
   CcTest::InitializeVM();
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
 
   typedef struct test_float {
     double a;
@@ -2425,12 +2426,12 @@
   assm.GetCode(isolate, &desc);
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
-  F3 f = FUNCTION_CAST<F3>(code->entry());
+  auto f = GeneratedCode<F3>::FromCode(*code);
   for (int j = 0; j < 4; j++) {
     test.fcsr = fcsr_inputs[j];
     for (int i = 0; i < kTableLength; i++) {
       test.a = inputs[i];
-      (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+      f.Call(&test, 0, 0, 0, 0);
       CHECK_EQ(test.b, outputs[j][i]);
     }
   }
@@ -2441,7 +2442,8 @@
   CcTest::InitializeVM();
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
 
   typedef struct test_float {
     uint32_t isNaN2008;
@@ -2492,11 +2494,11 @@
   assm.GetCode(isolate, &desc);
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
-  F3 f = FUNCTION_CAST<F3>(code->entry());
+  auto f = GeneratedCode<F3>::FromCode(*code);
   for (int i = 0; i < kTableLength; i++) {
     test.a = inputs_D[i];
     test.b = inputs_S[i];
-    (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+    f.Call(&test, 0, 0, 0, 0);
     if ((test.isNaN2008 & kFCSRNaN2008FlagMask) && kArchVariant == kMips64r6) {
       CHECK_EQ(test.c, outputsNaN2008[i]);
     } else {
@@ -2511,7 +2513,8 @@
   CcTest::InitializeVM();
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
 
   typedef struct test_float {
     uint32_t isNaN2008;
@@ -2561,11 +2564,11 @@
   assm.GetCode(isolate, &desc);
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
-  F3 f = FUNCTION_CAST<F3>(code->entry());
+  auto f = GeneratedCode<F3>::FromCode(*code);
   for (int i = 0; i < kTableLength; i++) {
     test.a = inputs_D[i];
     test.b = inputs_S[i];
-    (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+    f.Call(&test, 0, 0, 0, 0);
     if ((test.isNaN2008 & kFCSRNaN2008FlagMask) && kArchVariant == kMips64r6) {
       CHECK_EQ(test.c, outputsNaN2008[i]);
     } else {
@@ -2580,7 +2583,7 @@
     CcTest::InitializeVM();
     Isolate* isolate = CcTest::i_isolate();
     HandleScope scope(isolate);
-    MacroAssembler assm(isolate, NULL, 0,
+    MacroAssembler assm(isolate, nullptr, 0,
                         v8::internal::CodeObjectRequired::kYes);
     const double dFPU64InvalidResult = static_cast<double>(kFPU64InvalidResult);
     typedef struct test_float {
@@ -2632,11 +2635,11 @@
     assm.GetCode(isolate, &desc);
     Handle<Code> code =
         isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
-    F3 f = FUNCTION_CAST<F3>(code->entry());
+    auto f = GeneratedCode<F3>::FromCode(*code);
     for (int i = 0; i < kTableLength; i++) {
       test.a = inputs_D[i];
       test.b = inputs_S[i];
-      (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+      f.Call(&test, 0, 0, 0, 0);
       if ((test.isNaN2008 & kFCSRNaN2008FlagMask) &&
               kArchVariant == kMips64r6) {
         CHECK_EQ(test.c, outputsNaN2008[i]);
@@ -2653,7 +2656,8 @@
   CcTest::InitializeVM();
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
 
   typedef struct test_float {
     float a;
@@ -2704,13 +2708,13 @@
   assm.GetCode(isolate, &desc);
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
-  F3 f = FUNCTION_CAST<F3>(code->entry());
+  auto f = GeneratedCode<F3>::FromCode(*code);
   for (int i = 0; i < kTableLength; i++) {
     test.a = inputfs_S[i];
     test.b = inputft_S[i];
     test.c = inputfs_D[i];
     test.d = inputft_D[i];
-    (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+    f.Call(&test, 0, 0, 0, 0);
     CHECK_EQ(test.resultS, outputs_S[i]);
     CHECK_EQ(test.resultD, outputs_D[i]);
   }
@@ -2726,7 +2730,8 @@
   CcTest::InitializeVM();
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
 
   typedef struct test_float {
     float a;
@@ -2776,7 +2781,7 @@
   assm.GetCode(isolate, &desc);
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
-  F3 f = FUNCTION_CAST<F3>(code->entry());
+  auto f = GeneratedCode<F3>::FromCode(*code);
 
   for (int i = 0; i < kTableLength; i++) {
     float f1;
@@ -2784,7 +2789,7 @@
     test.a = inputs_S[i];
     test.c = inputs_D[i];
 
-    (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+    f.Call(&test, 0, 0, 0, 0);
 
     CHECK_EQ(test.resultS, outputs_S[i]);
     CHECK_EQ(test.resultD, outputs_D[i]);
@@ -2817,7 +2822,8 @@
   CcTest::InitializeVM();
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
 
   typedef struct test_float {
     float a;
@@ -2854,11 +2860,11 @@
   assm.GetCode(isolate, &desc);
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
-  F3 f = FUNCTION_CAST<F3>(code->entry());
+  auto f = GeneratedCode<F3>::FromCode(*code);
   for (int i = 0; i < kTableLength; i++) {
     test.a = inputs_S[i];
     test.c = inputs_D[i];
-    (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+    f.Call(&test, 0, 0, 0, 0);
     CHECK_EQ(test.resultS, outputs_S[i]);
     CHECK_EQ(test.resultD, outputs_D[i]);
   }
@@ -2871,7 +2877,8 @@
   CcTest::InitializeVM();
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
 
   typedef struct test_float {
     float a;
@@ -2912,13 +2919,13 @@
   assm.GetCode(isolate, &desc);
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
-  F3 f = FUNCTION_CAST<F3>(code->entry());
+  auto f = GeneratedCode<F3>::FromCode(*code);
   for (int i = 0; i < kTableLength; i++) {
     test.a = inputfs_S[i];
     test.b = inputft_S[i];
     test.c = inputfs_D[i];
     test.d = inputft_D[i];
-    (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+    f.Call(&test, 0, 0, 0, 0);
     CHECK_EQ(test.resultS, inputfs_S[i]*inputft_S[i]);
     CHECK_EQ(test.resultD, inputfs_D[i]*inputft_D[i]);
   }
@@ -2930,7 +2937,8 @@
   CcTest::InitializeVM();
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
 
   typedef struct test_float {
     double a;
@@ -2967,12 +2975,12 @@
   assm.GetCode(isolate, &desc);
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
-  F3 f = FUNCTION_CAST<F3>(code->entry());
+  auto f = GeneratedCode<F3>::FromCode(*code);
   for (int i = 0; i < kTableLength; i++) {
     test.a = inputs_D[i];
     test.c = inputs_S[i];
 
-    (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+    f.Call(&test, 0, 0, 0, 0);
     CHECK_EQ(test.b, outputs_D[i]);
     CHECK_EQ(test.d, outputs_S[i]);
   }
@@ -2983,7 +2991,8 @@
   CcTest::InitializeVM();
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
 
   typedef struct test_float {
     uint32_t isNaN2008;
@@ -3034,11 +3043,11 @@
   assm.GetCode(isolate, &desc);
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
-  F3 f = FUNCTION_CAST<F3>(code->entry());
+  auto f = GeneratedCode<F3>::FromCode(*code);
   for (int i = 0; i < kTableLength; i++) {
     test.a = inputs_D[i];
     test.b = inputs_S[i];
-    (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+    f.Call(&test, 0, 0, 0, 0);
     if ((test.isNaN2008 & kFCSRNaN2008FlagMask) && kArchVariant == kMips64r6) {
       CHECK_EQ(test.c, outputsNaN2008[i]);
     } else {
@@ -3053,7 +3062,7 @@
     CcTest::InitializeVM();
     Isolate* isolate = CcTest::i_isolate();
     HandleScope scope(isolate);
-    MacroAssembler assm(isolate, NULL, 0,
+    MacroAssembler assm(isolate, nullptr, 0,
                         v8::internal::CodeObjectRequired::kYes);
     const double dFPU64InvalidResult = static_cast<double>(kFPU64InvalidResult);
     typedef struct test_float {
@@ -3105,11 +3114,11 @@
     assm.GetCode(isolate, &desc);
     Handle<Code> code =
         isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
-    F3 f = FUNCTION_CAST<F3>(code->entry());
+    auto f = GeneratedCode<F3>::FromCode(*code);
     for (int i = 0; i < kTableLength; i++) {
       test.a = inputs_D[i];
       test.b = inputs_S[i];
-      (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+      f.Call(&test, 0, 0, 0, 0);
       if ((test.isNaN2008 & kFCSRNaN2008FlagMask) &&
               kArchVariant == kMips64r6) {
         CHECK_EQ(test.c, outputsNaN2008[i]);
@@ -3125,7 +3134,8 @@
   CcTest::InitializeVM();
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
 
   typedef struct test_float {
     uint32_t isNaN2008;
@@ -3176,11 +3186,11 @@
   assm.GetCode(isolate, &desc);
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
-  F3 f = FUNCTION_CAST<F3>(code->entry());
+  auto f = GeneratedCode<F3>::FromCode(*code);
   for (int i = 0; i < kTableLength; i++) {
     test.a = inputs_D[i];
     test.b = inputs_S[i];
-    (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+    f.Call(&test, 0, 0, 0, 0);
     if ((test.isNaN2008 & kFCSRNaN2008FlagMask) && kArchVariant == kMips64r6) {
       CHECK_EQ(test.c, outputsNaN2008[i]);
     } else {
@@ -3195,7 +3205,7 @@
     CcTest::InitializeVM();
     Isolate* isolate = CcTest::i_isolate();
     HandleScope scope(isolate);
-    MacroAssembler assm(isolate, NULL, 0,
+    MacroAssembler assm(isolate, nullptr, 0,
                         v8::internal::CodeObjectRequired::kYes);
     const double dFPU64InvalidResult = static_cast<double>(kFPU64InvalidResult);
     typedef struct test_float {
@@ -3247,11 +3257,11 @@
     assm.GetCode(isolate, &desc);
     Handle<Code> code =
         isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
-    F3 f = FUNCTION_CAST<F3>(code->entry());
+    auto f = GeneratedCode<F3>::FromCode(*code);
     for (int i = 0; i < kTableLength; i++) {
       test.a = inputs_D[i];
       test.b = inputs_S[i];
-      (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+      f.Call(&test, 0, 0, 0, 0);
       if ((test.isNaN2008 & kFCSRNaN2008FlagMask) &&
               kArchVariant == kMips64r6) {
         CHECK_EQ(test.c, outputsNaN2008[i]);
@@ -3268,7 +3278,8 @@
   CcTest::InitializeVM();
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
 
   const int kNumCases = 512;
   int values[kNumCases];
@@ -3300,8 +3311,8 @@
 
   for (int i = 0; i < kNumCases; ++i) {
     __ bind(&labels[i]);
-    __ lui(v0, (values[i] >> 16) & 0xffff);
-    __ ori(v0, v0, values[i] & 0xffff);
+    __ lui(v0, (values[i] >> 16) & 0xFFFF);
+    __ ori(v0, v0, values[i] & 0xFFFF);
     __ b(&done);
     __ nop();
   }
@@ -3321,10 +3332,9 @@
 #ifdef OBJECT_PRINT
   code->Print(std::cout);
 #endif
-  F1 f = FUNCTION_CAST<F1>(code->entry());
+  auto f = GeneratedCode<F1>::FromCode(*code);
   for (int i = 0; i < kNumCases; ++i) {
-    int64_t res = reinterpret_cast<int64_t>(
-        CALL_GENERATED_CODE(isolate, f, i, 0, 0, 0, 0));
+    int64_t res = reinterpret_cast<int64_t>(f.Call(i, 0, 0, 0, 0));
     ::printf("f(%d) = %" PRId64 "\n", i, res);
     CHECK_EQ(values[i], static_cast<int>(res));
   }
@@ -3336,7 +3346,8 @@
   CcTest::InitializeVM();
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
 
   const int kNumCases = 512;
   int values[kNumCases];
@@ -3352,8 +3363,8 @@
 
   for (int i = 0; i < kNumCases; ++i) {
     __ bind(&labels[i]);
-    __ lui(v0, (values[i] >> 16) & 0xffff);
-    __ ori(v0, v0, values[i] & 0xffff);
+    __ lui(v0, (values[i] >> 16) & 0xFFFF);
+    __ ori(v0, v0, values[i] & 0xFFFF);
     __ b(&done);
     __ nop();
   }
@@ -3391,10 +3402,9 @@
 #ifdef OBJECT_PRINT
   code->Print(std::cout);
 #endif
-  F1 f = FUNCTION_CAST<F1>(code->entry());
+  auto f = GeneratedCode<F1>::FromCode(*code);
   for (int i = 0; i < kNumCases; ++i) {
-    int64_t res = reinterpret_cast<int64_t>(
-        CALL_GENERATED_CODE(isolate, f, i, 0, 0, 0, 0));
+    int64_t res = reinterpret_cast<int64_t>(f.Call(i, 0, 0, 0, 0));
     ::printf("f(%d) = %" PRId64 "\n", i, res);
     CHECK_EQ(values[i], res);
   }
@@ -3406,7 +3416,8 @@
   CcTest::InitializeVM();
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
 
   const int kNumCases = 512;
   Handle<Object> values[kNumCases];
@@ -3471,10 +3482,9 @@
 #ifdef OBJECT_PRINT
   code->Print(std::cout);
 #endif
-  F1 f = FUNCTION_CAST<F1>(code->entry());
+  auto f = GeneratedCode<F1>::FromCode(*code);
   for (int i = 0; i < kNumCases; ++i) {
-    Handle<Object> result(
-        CALL_GENERATED_CODE(isolate, f, i, 0, 0, 0, 0), isolate);
+    Handle<Object> result(f.Call(i, 0, 0, 0, 0), isolate);
 #ifdef OBJECT_PRINT
     ::printf("f(%d) = ", i);
     result->Print(std::cout);
@@ -3502,7 +3512,7 @@
     } T;
     T t;
 
-    MacroAssembler assm(isolate, NULL, 0,
+    MacroAssembler assm(isolate, nullptr, 0,
                         v8::internal::CodeObjectRequired::kYes);
 
     __ Ld(a4, MemOperand(a0, offsetof(T, r1)));
@@ -3542,15 +3552,14 @@
     assm.GetCode(isolate, &desc);
     Handle<Code> code =
         isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
-    F3 f = FUNCTION_CAST<F3>(code->entry());
+    auto f = GeneratedCode<F3>::FromCode(*code);
     t.r1 = 0x00102100781A15C3;
     t.r2 = 0x001021008B71FCDE;
     t.r3 = 0xFF8017FF781A15C3;
     t.r4 = 0xFF8017FF8B71FCDE;
     t.r5 = 0x10C021098B71FCDE;
     t.r6 = 0xFB8017FF781A15C3;
-    Object* dummy = CALL_GENERATED_CODE(isolate, f, &t, 0, 0, 0, 0);
-    USE(dummy);
+    f.Call(&t, 0, 0, 0, 0);
 
     CHECK_EQ(static_cast<int64_t>(0x000000001E58A8C3L), t.r1);
     CHECK_EQ(static_cast<int64_t>(0xFFFFFFFFD18E3F7BL), t.r2);
@@ -3594,7 +3603,7 @@
 
     // Create a function that accepts &t, and loads, manipulates, and stores
     // the doubles t.a ... t.f.
-    MacroAssembler assm(isolate, NULL, 0,
+    MacroAssembler assm(isolate, nullptr, 0,
                         v8::internal::CodeObjectRequired::kYes);
 
     __ Ldc1(f4, MemOperand(a0, offsetof(T, dSignalingNan)));
@@ -3685,7 +3694,7 @@
     assm.GetCode(isolate, &desc);
     Handle<Code> code =
         isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
-    F3 f = FUNCTION_CAST<F3>(code->entry());
+    auto f = GeneratedCode<F3>::FromCode(*code);
 
     // Double test values.
     t.dSignalingNan =  std::numeric_limits<double>::signaling_NaN();
@@ -3711,8 +3720,7 @@
     t.fPosSubnorm   = FLT_MIN / 20.0;
     t.fPosZero      = +0.0;
 
-    Object* dummy = CALL_GENERATED_CODE(isolate, f, &t, 0, 0, 0, 0);
-    USE(dummy);
+    f.Call(&t, 0, 0, 0, 0);
     // Expected double results.
     CHECK_EQ(bit_cast<int64_t>(t.dSignalingNan), 0x001);
     CHECK_EQ(bit_cast<int64_t>(t.dQuietNan),     0x002);
@@ -3744,7 +3752,8 @@
   CcTest::InitializeVM();
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
 
   typedef struct test_float {
     int64_t fir;
@@ -3779,37 +3788,37 @@
   assm.GetCode(isolate, &desc);
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
-  F3 f = FUNCTION_CAST<F3>(code->entry());
+  auto f = GeneratedCode<F3>::FromCode(*code);
   test.a = -2.0;
   test.b = -2.0;
-  (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+  f.Call(&test, 0, 0, 0, 0);
   CHECK_EQ(test.a, 2.0);
   CHECK_EQ(test.b, 2.0);
 
   test.a = 2.0;
   test.b = 2.0;
-  (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+  f.Call(&test, 0, 0, 0, 0);
   CHECK_EQ(test.a, 2.0);
   CHECK_EQ(test.b, 2.0);
 
   // Testing biggest positive number
   test.a = std::numeric_limits<double>::max();
   test.b = std::numeric_limits<float>::max();
-  (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+  f.Call(&test, 0, 0, 0, 0);
   CHECK_EQ(test.a, std::numeric_limits<double>::max());
   CHECK_EQ(test.b, std::numeric_limits<float>::max());
 
   // Testing smallest negative number
   test.a = -std::numeric_limits<double>::max();  // lowest()
   test.b = -std::numeric_limits<float>::max();   // lowest()
-  (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+  f.Call(&test, 0, 0, 0, 0);
   CHECK_EQ(test.a, std::numeric_limits<double>::max());
   CHECK_EQ(test.b, std::numeric_limits<float>::max());
 
   // Testing smallest positive number
   test.a = -std::numeric_limits<double>::min();
   test.b = -std::numeric_limits<float>::min();
-  (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+  f.Call(&test, 0, 0, 0, 0);
   CHECK_EQ(test.a, std::numeric_limits<double>::min());
   CHECK_EQ(test.b, std::numeric_limits<float>::min());
 
@@ -3818,7 +3827,7 @@
           / std::numeric_limits<double>::min();
   test.b = -std::numeric_limits<float>::max()
           / std::numeric_limits<float>::min();
-  (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+  f.Call(&test, 0, 0, 0, 0);
   CHECK_EQ(test.a, std::numeric_limits<double>::max()
                  / std::numeric_limits<double>::min());
   CHECK_EQ(test.b, std::numeric_limits<float>::max()
@@ -3826,13 +3835,13 @@
 
   test.a = std::numeric_limits<double>::quiet_NaN();
   test.b = std::numeric_limits<float>::quiet_NaN();
-  (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+  f.Call(&test, 0, 0, 0, 0);
   CHECK(std::isnan(test.a));
   CHECK(std::isnan(test.b));
 
   test.a = std::numeric_limits<double>::signaling_NaN();
   test.b = std::numeric_limits<float>::signaling_NaN();
-  (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+  f.Call(&test, 0, 0, 0, 0);
   CHECK(std::isnan(test.a));
   CHECK(std::isnan(test.b));
 }
@@ -3842,7 +3851,8 @@
   CcTest::InitializeVM();
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
 
   typedef struct test_float {
     double a;
@@ -3872,12 +3882,12 @@
   assm.GetCode(isolate, &desc);
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
-  F3 f = FUNCTION_CAST<F3>(code->entry());
+  auto f = GeneratedCode<F3>::FromCode(*code);
   test.a = 2.0;
   test.b = 3.0;
   test.fa = 2.0;
   test.fb = 3.0;
-  (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+  f.Call(&test, 0, 0, 0, 0);
   CHECK_EQ(test.c, 5.0);
   CHECK_EQ(test.fc, 5.0);
 
@@ -3885,7 +3895,7 @@
   test.b = -std::numeric_limits<double>::max();  // lowest()
   test.fa = std::numeric_limits<float>::max();
   test.fb = -std::numeric_limits<float>::max();  // lowest()
-  (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+  f.Call(&test, 0, 0, 0, 0);
   CHECK_EQ(test.c, 0.0);
   CHECK_EQ(test.fc, 0.0);
 
@@ -3893,7 +3903,7 @@
   test.b = std::numeric_limits<double>::max();
   test.fa = std::numeric_limits<float>::max();
   test.fb = std::numeric_limits<float>::max();
-  (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+  f.Call(&test, 0, 0, 0, 0);
   CHECK(!std::isfinite(test.c));
   CHECK(!std::isfinite(test.fc));
 
@@ -3901,7 +3911,7 @@
   test.b = std::numeric_limits<double>::signaling_NaN();
   test.fa = 5.0;
   test.fb = std::numeric_limits<float>::signaling_NaN();
-  (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+  f.Call(&test, 0, 0, 0, 0);
   CHECK(std::isnan(test.c));
   CHECK(std::isnan(test.fc));
 }
@@ -3912,7 +3922,7 @@
     CcTest::InitializeVM();
     Isolate* isolate = CcTest::i_isolate();
     HandleScope scope(isolate);
-    MacroAssembler assm(isolate, NULL, 0,
+    MacroAssembler assm(isolate, nullptr, 0,
                         v8::internal::CodeObjectRequired::kYes);
 
     typedef struct test_float {
@@ -4027,12 +4037,12 @@
     assm.GetCode(isolate, &desc);
     Handle<Code> code =
         isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
-    F3 f = FUNCTION_CAST<F3>(code->entry());
+    auto f = GeneratedCode<F3>::FromCode(*code);
     test.dOp1 = 2.0;
     test.dOp2 = 3.0;
     test.fOp1 = 2.0;
     test.fOp2 = 3.0;
-    (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+    f.Call(&test, 0, 0, 0, 0);
     CHECK_EQ(test.dF, 0U);
     CHECK_EQ(test.dUn, 0U);
     CHECK_EQ(test.dEq, 0U);
@@ -4054,7 +4064,7 @@
     test.dOp2 = std::numeric_limits<double>::min();
     test.fOp1 = std::numeric_limits<float>::min();
     test.fOp2 = -std::numeric_limits<float>::max();  // lowest()
-    (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+    f.Call(&test, 0, 0, 0, 0);
     CHECK_EQ(test.dF, 0U);
     CHECK_EQ(test.dUn, 0U);
     CHECK_EQ(test.dEq, 0U);
@@ -4076,7 +4086,7 @@
     test.dOp2 = -std::numeric_limits<double>::max();  // lowest()
     test.fOp1 = std::numeric_limits<float>::max();
     test.fOp2 = std::numeric_limits<float>::max();
-    (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+    f.Call(&test, 0, 0, 0, 0);
     CHECK_EQ(test.dF, 0U);
     CHECK_EQ(test.dUn, 0U);
     CHECK_EQ(test.dEq, 1U);
@@ -4098,7 +4108,7 @@
     test.dOp2 = 0.0;
     test.fOp1 = std::numeric_limits<float>::quiet_NaN();
     test.fOp2 = 0.0;
-    (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+    f.Call(&test, 0, 0, 0, 0);
     CHECK_EQ(test.dF, 0U);
     CHECK_EQ(test.dUn, 1U);
     CHECK_EQ(test.dEq, 0U);
@@ -4124,7 +4134,7 @@
     CcTest::InitializeVM();
     Isolate* isolate = CcTest::i_isolate();
     HandleScope scope(isolate);
-    MacroAssembler assm(isolate, NULL, 0,
+    MacroAssembler assm(isolate, nullptr, 0,
                         v8::internal::CodeObjectRequired::kYes);
 
     typedef struct test_float {
@@ -4228,7 +4238,7 @@
     assm.GetCode(isolate, &desc);
     Handle<Code> code =
         isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
-    F3 f = FUNCTION_CAST<F3>(code->entry());
+    auto f = GeneratedCode<F3>::FromCode(*code);
     uint64_t dTrue  = 0xFFFFFFFFFFFFFFFF;
     uint64_t dFalse = 0x0000000000000000;
     uint32_t fTrue  = 0xFFFFFFFF;
@@ -4238,7 +4248,7 @@
     test.dOp2 = 3.0;
     test.fOp1 = 2.0;
     test.fOp2 = 3.0;
-    (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+    f.Call(&test, 0, 0, 0, 0);
     CHECK_EQ(bit_cast<uint64_t>(test.dF), dFalse);
     CHECK_EQ(bit_cast<uint64_t>(test.dUn), dFalse);
     CHECK_EQ(bit_cast<uint64_t>(test.dEq), dFalse);
@@ -4263,7 +4273,7 @@
     test.dOp2 = std::numeric_limits<double>::min();
     test.fOp1 = std::numeric_limits<float>::min();
     test.fOp2 = -std::numeric_limits<float>::max();  // lowest()
-    (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+    f.Call(&test, 0, 0, 0, 0);
     CHECK_EQ(bit_cast<uint64_t>(test.dF), dFalse);
     CHECK_EQ(bit_cast<uint64_t>(test.dUn), dFalse);
     CHECK_EQ(bit_cast<uint64_t>(test.dEq), dFalse);
@@ -4288,7 +4298,7 @@
     test.dOp2 = -std::numeric_limits<double>::max();  // lowest()
     test.fOp1 = std::numeric_limits<float>::max();
     test.fOp2 = std::numeric_limits<float>::max();
-    (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+    f.Call(&test, 0, 0, 0, 0);
     CHECK_EQ(bit_cast<uint64_t>(test.dF), dFalse);
     CHECK_EQ(bit_cast<uint64_t>(test.dUn), dFalse);
     CHECK_EQ(bit_cast<uint64_t>(test.dEq), dTrue);
@@ -4313,7 +4323,7 @@
     test.dOp2 = 0.0;
     test.fOp1 = std::numeric_limits<float>::quiet_NaN();
     test.fOp2 = 0.0;
-    (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+    f.Call(&test, 0, 0, 0, 0);
     CHECK_EQ(bit_cast<uint64_t>(test.dF), dFalse);
     CHECK_EQ(bit_cast<uint64_t>(test.dUn), dTrue);
     CHECK_EQ(bit_cast<uint64_t>(test.dEq), dFalse);
@@ -4341,7 +4351,8 @@
   CcTest::InitializeVM();
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
 
   typedef struct test_float {
     float    cvt_d_s_in;
@@ -4406,7 +4417,7 @@
   assm.GetCode(isolate, &desc);
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
-  F3 f = FUNCTION_CAST<F3>(code->entry());
+  auto f = GeneratedCode<F3>::FromCode(*code);
 
   test.cvt_d_s_in = -0.51;
   test.cvt_d_w_in = -1;
@@ -4419,7 +4430,7 @@
   test.cvt_w_s_in = -0.51;
   test.cvt_w_d_in = -0.51;
 
-  (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+  f.Call(&test, 0, 0, 0, 0);
   CHECK_EQ(test.cvt_d_s_out, static_cast<double>(test.cvt_d_s_in));
   CHECK_EQ(test.cvt_d_w_out, static_cast<double>(test.cvt_d_w_in));
   CHECK_EQ(test.cvt_d_l_out, static_cast<double>(test.cvt_d_l_in));
@@ -4442,7 +4453,7 @@
   test.cvt_w_s_in = 0.49;
   test.cvt_w_d_in = 0.49;
 
-  (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+  f.Call(&test, 0, 0, 0, 0);
   CHECK_EQ(test.cvt_d_s_out, static_cast<double>(test.cvt_d_s_in));
   CHECK_EQ(test.cvt_d_w_out, static_cast<double>(test.cvt_d_w_in));
   CHECK_EQ(test.cvt_d_l_out, static_cast<double>(test.cvt_d_l_in));
@@ -4465,7 +4476,7 @@
   test.cvt_w_s_in = std::numeric_limits<float>::max();
   test.cvt_w_d_in = std::numeric_limits<double>::max();
 
-  (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+  f.Call(&test, 0, 0, 0, 0);
   CHECK_EQ(test.cvt_d_s_out, static_cast<double>(test.cvt_d_s_in));
   CHECK_EQ(test.cvt_d_w_out, static_cast<double>(test.cvt_d_w_in));
   CHECK_EQ(test.cvt_d_l_out, static_cast<double>(test.cvt_d_l_in));
@@ -4489,7 +4500,7 @@
   test.cvt_w_s_in = -std::numeric_limits<float>::max();   // lowest()
   test.cvt_w_d_in = -std::numeric_limits<double>::max();  // lowest()
 
-  (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+  f.Call(&test, 0, 0, 0, 0);
   CHECK_EQ(test.cvt_d_s_out, static_cast<double>(test.cvt_d_s_in));
   CHECK_EQ(test.cvt_d_w_out, static_cast<double>(test.cvt_d_w_in));
   CHECK_EQ(test.cvt_d_l_out, static_cast<double>(test.cvt_d_l_in));
@@ -4520,7 +4531,7 @@
   test.cvt_w_s_in = std::numeric_limits<float>::min();
   test.cvt_w_d_in = std::numeric_limits<double>::min();
 
-  (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+  f.Call(&test, 0, 0, 0, 0);
   CHECK_EQ(test.cvt_d_s_out, static_cast<double>(test.cvt_d_s_in));
   CHECK_EQ(test.cvt_d_w_out, static_cast<double>(test.cvt_d_w_in));
   CHECK_EQ(test.cvt_d_l_out, static_cast<double>(test.cvt_d_l_in));
@@ -4538,7 +4549,8 @@
   CcTest::InitializeVM();
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
 
   typedef struct test {
     double dOp1;
@@ -4577,9 +4589,9 @@
   assm.GetCode(isolate, &desc);
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
-  F3 f = FUNCTION_CAST<F3>(code->entry());
+  auto f = GeneratedCode<F3>::FromCode(*code);
 
-  (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+  f.Call(&test, 0, 0, 0, 0);
 
   const int test_size = 3;
 
@@ -4620,7 +4632,7 @@
     test.fOp1 = fOp1[i];
     test.fOp2 = fOp2[i];
 
-    (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+    f.Call(&test, 0, 0, 0, 0);
     CHECK_EQ(test.dRes, dRes[i]);
     CHECK_EQ(test.fRes, fRes[i]);
   }
@@ -4630,7 +4642,7 @@
   test.fOp1 = FLT_MAX;
   test.fOp2 = -0.0;
 
-  (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+  f.Call(&test, 0, 0, 0, 0);
   CHECK(!std::isfinite(test.dRes));
   CHECK(!std::isfinite(test.fRes));
 
@@ -4639,7 +4651,7 @@
   test.fOp1 = 0.0;
   test.fOp2 = -0.0;
 
-  (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+  f.Call(&test, 0, 0, 0, 0);
   CHECK(std::isnan(test.dRes));
   CHECK(std::isnan(test.fRes));
 
@@ -4648,7 +4660,7 @@
   test.fOp1 = std::numeric_limits<float>::quiet_NaN();
   test.fOp2 = -5.0;
 
-  (CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0));
+  f.Call(&test, 0, 0, 0, 0);
   CHECK(std::isnan(test.dRes));
   CHECK(std::isnan(test.fRes));
 }
@@ -4658,7 +4670,8 @@
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
 
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
 
   __ align(v0, a0, a1, bp);
   __ jr(ra);
@@ -4669,10 +4682,10 @@
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
 
-  F4 f = FUNCTION_CAST<F4>(code->entry());
+  auto f = GeneratedCode<F4>::FromCode(*code);
 
-  uint64_t res = reinterpret_cast<uint64_t>(
-      CALL_GENERATED_CODE(isolate, f, rs_value, rt_value, 0, 0, 0));
+  uint64_t res =
+      reinterpret_cast<uint64_t>(f.Call(rs_value, rt_value, 0, 0, 0));
 
   return res;
 }
@@ -4689,13 +4702,15 @@
       uint64_t  expected_res;
     };
 
+    // clang-format off
     struct TestCaseAlign tc[] = {
       // rs_value,    rt_value,    bp, expected_res
-      {  0x11223344,  0xaabbccdd,   0, 0xffffffffaabbccdd },
-      {  0x11223344,  0xaabbccdd,   1, 0xffffffffbbccdd11 },
-      {  0x11223344,  0xaabbccdd,   2, 0xffffffffccdd1122 },
-      {  0x11223344,  0xaabbccdd,   3, 0xffffffffdd112233 },
+      {  0x11223344,  0xAABBCCDD,   0, 0xFFFFFFFFAABBCCDD },
+      {  0x11223344,  0xAABBCCDD,   1, 0xFFFFFFFFBBCCDD11 },
+      {  0x11223344,  0xAABBCCDD,   2, 0xFFFFFFFFCCDD1122 },
+      {  0x11223344,  0xAABBCCDD,   3, 0xFFFFFFFFDD112233 },
     };
+    // clang-format on
 
     size_t nr_test_cases = sizeof(tc) / sizeof(TestCaseAlign);
     for (size_t i = 0; i < nr_test_cases; ++i) {
@@ -4711,7 +4726,8 @@
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
 
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
 
   __ dalign(v0, a0, a1, bp);
   __ jr(ra);
@@ -4722,9 +4738,9 @@
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
 
-  F4 f = FUNCTION_CAST<F4>(code->entry());
-  uint64_t res = reinterpret_cast<uint64_t>(
-      CALL_GENERATED_CODE(isolate, f, rs_value, rt_value, 0, 0, 0));
+  auto f = GeneratedCode<F4>::FromCode(*code);
+  uint64_t res =
+      reinterpret_cast<uint64_t>(f.Call(rs_value, rt_value, 0, 0, 0));
 
   return res;
 }
@@ -4741,17 +4757,19 @@
       uint64_t  expected_res;
     };
 
+    // clang-format off
     struct TestCaseDalign tc[] = {
       // rs_value,           rt_value,            bp, expected_res
-      { 0x1122334455667700,  0xaabbccddeeff8899,   0, 0xaabbccddeeff8899 },
-      { 0x1122334455667700,  0xaabbccddeeff8899,   1, 0xbbccddeeff889911 },
-      { 0x1122334455667700,  0xaabbccddeeff8899,   2, 0xccddeeff88991122 },
-      { 0x1122334455667700,  0xaabbccddeeff8899,   3, 0xddeeff8899112233 },
-      { 0x1122334455667700,  0xaabbccddeeff8899,   4, 0xeeff889911223344 },
-      { 0x1122334455667700,  0xaabbccddeeff8899,   5, 0xff88991122334455 },
-      { 0x1122334455667700,  0xaabbccddeeff8899,   6, 0x8899112233445566 },
-      { 0x1122334455667700,  0xaabbccddeeff8899,   7, 0x9911223344556677 }
+      { 0x1122334455667700,  0xAABBCCDDEEFF8899,   0, 0xAABBCCDDEEFF8899 },
+      { 0x1122334455667700,  0xAABBCCDDEEFF8899,   1, 0xBBCCDDEEFF889911 },
+      { 0x1122334455667700,  0xAABBCCDDEEFF8899,   2, 0xCCDDEEFF88991122 },
+      { 0x1122334455667700,  0xAABBCCDDEEFF8899,   3, 0xDDEEFF8899112233 },
+      { 0x1122334455667700,  0xAABBCCDDEEFF8899,   4, 0xEEFF889911223344 },
+      { 0x1122334455667700,  0xAABBCCDDEEFF8899,   5, 0xFF88991122334455 },
+      { 0x1122334455667700,  0xAABBCCDDEEFF8899,   6, 0x8899112233445566 },
+      { 0x1122334455667700,  0xAABBCCDDEEFF8899,   7, 0x9911223344556677 }
     };
+    // clang-format on
 
     size_t nr_test_cases = sizeof(tc) / sizeof(TestCaseDalign);
     for (size_t i = 0; i < nr_test_cases; ++i) {
@@ -4769,7 +4787,8 @@
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
 
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
 
   __ aluipc(v0, offset);
   __ jr(ra);
@@ -4780,11 +4799,10 @@
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
 
-  F2 f = FUNCTION_CAST<F2>(code->entry());
-  PC = (uint64_t) f;  // Set the program counter.
+  auto f = GeneratedCode<F2>::FromCode(*code);
+  PC = (uint64_t)code->entry();  // Set the program counter.
 
-  uint64_t res = reinterpret_cast<uint64_t>(
-      CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0));
+  uint64_t res = reinterpret_cast<uint64_t>(f.Call(0, 0, 0, 0, 0));
 
   return res;
 }
@@ -4823,7 +4841,8 @@
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
 
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
 
   __ auipc(v0, offset);
   __ jr(ra);
@@ -4834,11 +4853,10 @@
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
 
-  F2 f = FUNCTION_CAST<F2>(code->entry());
-  PC = (uint64_t) f;  // Set the program counter.
+  auto f = GeneratedCode<F2>::FromCode(*code);
+  PC = (uint64_t)code->entry();  // Set the program counter.
 
-  uint64_t res = reinterpret_cast<uint64_t>(
-      CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0));
+  uint64_t res = reinterpret_cast<uint64_t>(f.Call(0, 0, 0, 0, 0));
 
   return res;
 }
@@ -4877,7 +4895,8 @@
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
 
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
 
   __ li(t0, rs);
   __ aui(v0, t0, offset);
@@ -4889,11 +4908,9 @@
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
 
-  F2 f = FUNCTION_CAST<F2>(code->entry());
+  auto f = GeneratedCode<F2>::FromCode(*code);
 
-  uint64_t res =
-    reinterpret_cast<uint64_t>
-    (CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0));
+  uint64_t res = reinterpret_cast<uint64_t>(f.Call(0, 0, 0, 0, 0));
 
   return res;
 }
@@ -4903,7 +4920,8 @@
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
 
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
 
   __ li(t0, rs);
   __ daui(v0, t0, offset);
@@ -4915,11 +4933,9 @@
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
 
-  F2 f = FUNCTION_CAST<F2>(code->entry());
+  auto f = GeneratedCode<F2>::FromCode(*code);
 
-  uint64_t res =
-    reinterpret_cast<uint64_t>
-    (CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0));
+  uint64_t res = reinterpret_cast<uint64_t>(f.Call(0, 0, 0, 0, 0));
 
   return res;
 }
@@ -4929,7 +4945,8 @@
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
 
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
 
   __ li(v0, rs);
   __ dahi(v0, offset);
@@ -4941,11 +4958,9 @@
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
 
-  F2 f = FUNCTION_CAST<F2>(code->entry());
+  auto f = GeneratedCode<F2>::FromCode(*code);
 
-  uint64_t res =
-    reinterpret_cast<uint64_t>
-    (CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0));
+  uint64_t res = reinterpret_cast<uint64_t>(f.Call(0, 0, 0, 0, 0));
 
   return res;
 }
@@ -4955,7 +4970,8 @@
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
 
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
 
   __ li(v0, rs);
   __ dati(v0, offset);
@@ -4967,11 +4983,9 @@
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
 
-  F2 f = FUNCTION_CAST<F2>(code->entry());
+  auto f = GeneratedCode<F2>::FromCode(*code);
 
-  uint64_t res =
-    reinterpret_cast<uint64_t>
-    (CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0));
+  uint64_t res = reinterpret_cast<uint64_t>(f.Call(0, 0, 0, 0, 0));
 
   return res;
 }
@@ -4989,13 +5003,13 @@
 
     // AUI test cases.
     struct TestCaseAui aui_tc[] = {
-      {0xfffeffff, 0x1, 0xffffffffffffffff},
-      {0xffffffff, 0x0, 0xffffffffffffffff},
-      {0, 0xffff, 0xffffffffffff0000},
-      {0x0008ffff, 0xfff7, 0xffffffffffffffff},
-      {32767, 32767, 0x000000007fff7fff},
-      {0x00000000ffffffff, 0x1, 0x000000000000ffff},
-      {0xffffffff, 0xffff, 0xfffffffffffeffff},
+        {0xFFFEFFFF, 0x1, 0xFFFFFFFFFFFFFFFF},
+        {0xFFFFFFFF, 0x0, 0xFFFFFFFFFFFFFFFF},
+        {0, 0xFFFF, 0xFFFFFFFFFFFF0000},
+        {0x0008FFFF, 0xFFF7, 0xFFFFFFFFFFFFFFFF},
+        {32767, 32767, 0x000000007FFF7FFF},
+        {0x00000000FFFFFFFF, 0x1, 0x000000000000FFFF},
+        {0xFFFFFFFF, 0xFFFF, 0xFFFFFFFFFFFEFFFF},
     };
 
     size_t nr_test_cases = sizeof(aui_tc) / sizeof(TestCaseAui);
@@ -5006,13 +5020,13 @@
 
     // DAUI test cases.
     struct TestCaseAui daui_tc[] = {
-      {0xfffffffffffeffff, 0x1, 0xffffffffffffffff},
-      {0xffffffffffffffff, 0x0, 0xffffffffffffffff},
-      {0, 0xffff, 0xffffffffffff0000},
-      {0x0008ffff, 0xfff7, 0xffffffffffffffff},
-      {32767, 32767, 0x000000007fff7fff},
-      {0x00000000ffffffff, 0x1, 0x000000010000ffff},
-      {0xffffffff, 0xffff, 0x00000000fffeffff},
+        {0xFFFFFFFFFFFEFFFF, 0x1, 0xFFFFFFFFFFFFFFFF},
+        {0xFFFFFFFFFFFFFFFF, 0x0, 0xFFFFFFFFFFFFFFFF},
+        {0, 0xFFFF, 0xFFFFFFFFFFFF0000},
+        {0x0008FFFF, 0xFFF7, 0xFFFFFFFFFFFFFFFF},
+        {32767, 32767, 0x000000007FFF7FFF},
+        {0x00000000FFFFFFFF, 0x1, 0x000000010000FFFF},
+        {0xFFFFFFFF, 0xFFFF, 0x00000000FFFEFFFF},
     };
 
     nr_test_cases = sizeof(daui_tc) / sizeof(TestCaseAui);
@@ -5023,13 +5037,13 @@
 
     // DATI test cases.
     struct TestCaseAui dati_tc[] = {
-      {0xfffffffffffeffff, 0x1, 0x0000fffffffeffff},
-      {0xffffffffffffffff, 0x0, 0xffffffffffffffff},
-      {0, 0xffff, 0xffff000000000000},
-      {0x0008ffff, 0xfff7, 0xfff700000008ffff},
-      {32767, 32767, 0x7fff000000007fff},
-      {0x00000000ffffffff, 0x1, 0x00010000ffffffff},
-      {0xffffffffffff, 0xffff, 0xffffffffffffffff},
+        {0xFFFFFFFFFFFEFFFF, 0x1, 0x0000FFFFFFFEFFFF},
+        {0xFFFFFFFFFFFFFFFF, 0x0, 0xFFFFFFFFFFFFFFFF},
+        {0, 0xFFFF, 0xFFFF000000000000},
+        {0x0008FFFF, 0xFFF7, 0xFFF700000008FFFF},
+        {32767, 32767, 0x7FFF000000007FFF},
+        {0x00000000FFFFFFFF, 0x1, 0x00010000FFFFFFFF},
+        {0xFFFFFFFFFFFF, 0xFFFF, 0xFFFFFFFFFFFFFFFF},
     };
 
     nr_test_cases = sizeof(dati_tc) / sizeof(TestCaseAui);
@@ -5040,9 +5054,9 @@
 
     // DAHI test cases.
     struct TestCaseAui dahi_tc[] = {
-      {0xfffffffeffffffff, 0x1, 0xffffffffffffffff},
-      {0xffffffffffffffff, 0x0, 0xffffffffffffffff},
-      {0, 0xffff, 0xffffffff00000000},
+        {0xFFFFFFFEFFFFFFFF, 0x1, 0xFFFFFFFFFFFFFFFF},
+        {0xFFFFFFFFFFFFFFFF, 0x0, 0xFFFFFFFFFFFFFFFF},
+        {0, 0xFFFF, 0xFFFFFFFF00000000},
     };
 
     nr_test_cases = sizeof(dahi_tc) / sizeof(TestCaseAui);
@@ -5056,7 +5070,8 @@
 uint64_t run_li_macro(uint64_t imm, LiFlags mode, int32_t num_instr = 0) {
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
 
   Label code_start;
   __ bind(&code_start);
@@ -5074,10 +5089,9 @@
 #ifdef OBJECT_PRINT
   code->Print(std::cout);
 #endif
-  F2 f = FUNCTION_CAST<F2>(code->entry());
+  auto f = GeneratedCode<F2>::FromCode(*code);
 
-  uint64_t res = reinterpret_cast<uint64_t>(
-      CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0));
+  uint64_t res = reinterpret_cast<uint64_t>(f.Call(0, 0, 0, 0, 0));
 
   return res;
 }
@@ -5097,13 +5111,13 @@
   // We call li(v0, imm) to test cases listed below.
   struct TestCase_li tc[] = {
       //              imm, r2_num_instr, r6_num_instr
-      {0xffffffffffff8000, 1, 1},  // min_int16
+      {0xFFFFFFFFFFFF8000, 1, 1},  // min_int16
       // The test case above generates daddiu instruction.
       // This is int16 value and we can load it using just daddiu.
       {0x8000, 1, 1},  // max_int16 + 1
       // Generates ori
       // max_int16 + 1 is not int16 but is uint16, just use ori.
-      {0xffffffffffff7fff, 2, 2},  // min_int16 - 1
+      {0xFFFFFFFFFFFF7FFF, 2, 2},  // min_int16 - 1
       // Generates lui + ori
       // We load int32 value using lui + ori.
       {0x8001, 1, 1},  // max_int16 + 2
@@ -5115,115 +5129,115 @@
       {0x00010001, 2, 2},  // max_uint16 + 2
       // Generates lui + ori
       // We have to generate two instructions in this case.
-      {0x00000000ffffffff, 2, 2},  // max_uint32
+      {0x00000000FFFFFFFF, 2, 2},  // max_uint32
       // r2 - daddiu + dsrl32
       // r6 - daddiu + dahi
-      {0x00000000fffffffe, 3, 2},  // max_uint32 - 1
+      {0x00000000FFFFFFFE, 3, 2},  // max_uint32 - 1
       // r2 - lui + ori + dsll
       // r6 - daddiu + dahi
-      {0x00ffff000000fffe, 3, 3},
+      {0x00FFFF000000FFFE, 3, 3},
       // ori + dsll32 + ori
-      {0x00000001fffffffe, 4, 2},  // max_uint32 << 1
+      {0x00000001FFFFFFFE, 4, 2},  // max_uint32 << 1
       // r2 - lui + ori + dsll + ori
       // r6 - daddiu + dahi
-      {0x0000fffffffffffe, 4, 2},  // max_uint48 - 1
+      {0x0000FFFFFFFFFFFE, 4, 2},  // max_uint48 - 1
       // r2 - daddiu + dsll32 + ori + dsubu
       // Loading imm directly would require ori + dsll + ori + dsll + ori.
       // Optimized by loading -imm and using dsubu to get imm.
       // r6 - daddiu + dati
-      {0xffffffff00000000, 2, 2},  // max_uint32 << 32
+      {0xFFFFFFFF00000000, 2, 2},  // max_uint32 << 32
       // r2 - daddiu + dsll32
       // r6 - ori + dahi
       // We need ori to clear register before loading value using dahi.
-      {0xffffffff80000000, 1, 1},  // min_int32
+      {0xFFFFFFFF80000000, 1, 1},  // min_int32
       // The test case above generates lui instruction.
       {0x0000000080000000, 2, 2},  // max_int32 + 1
       // r2 - ori + dsll
       // r6 - lui + dahi
       {0x0000800000000000, 2, 2},
       // ori + dsll32
-      {0xffff800000000000, 2, 2},
+      {0xFFFF800000000000, 2, 2},
       // r2 - daddiu + dsll32
       // r6 - ori + dahi
-      {0xffff80000000ffff, 3, 2},
+      {0xFFFF80000000FFFF, 3, 2},
       // r2 - daddiu + dsll32 + ori
       // r6 - ori + dahi
-      {0xffffff123000ffff, 3, 3},
+      {0xFFFFFF123000FFFF, 3, 3},
       // daddiu + dsll + ori
-      {0xffff00000000ffff, 3, 2},
+      {0xFFFF00000000FFFF, 3, 2},
       // r2 - daddiu + dsll32 + ori
       // r6 - ori + dati
-      {0xffff8000ffff0000, 3, 2},
+      {0xFFFF8000FFFF0000, 3, 2},
       // r2 - lui + ori + dsll
       // r6 - lui + dahi
-      {0x0000ffffffff0000, 4, 2},
+      {0x0000FFFFFFFF0000, 4, 2},
       // r2 - ori + dsll + ori + dsll
       // r6 - lui + dati
-      {0x1234ffff80000000, 3, 2},
+      {0x1234FFFF80000000, 3, 2},
       // r2 - lui + ori + dsll
       // r6 - lui + dati
-      {0x1234ffff80010000, 5, 2},
+      {0x1234FFFF80010000, 5, 2},
       // r2 - lui + ori + dsll + ori + dsll
       // r6 - lui + dati
-      {0xffff8000ffff8000, 2, 2},
+      {0xFFFF8000FFFF8000, 2, 2},
       // r2 - daddiu + dinsu
       // r6 - daddiu + dahi
-      {0xffff0000ffff8000, 4, 3},
+      {0xFFFF0000FFFF8000, 4, 3},
       // r2 - ori + dsll32 + ori + dsubu
       // Loading imm directly would require lui + dsll + ori + dsll + ori.
       // Optimized by loading -imm and using dsubu to get imm.
       // r6 - daddiu + dahi + dati
       {0x8000000080000000, 2, 2},
       // lui + dinsu
-      {0xabcd0000abcd0000, 2, 2},
+      {0xABCD0000ABCD0000, 2, 2},
       // lui + dinsu
       {0x8000800080008000, 3, 3},
       // lui + ori + dinsu
-      {0xabcd1234abcd1234, 3, 3},
+      {0xABCD1234ABCD1234, 3, 3},
       // The test case above generates lui + ori + dinsu instruction sequence.
-      {0xffff800080008000, 4, 3},
+      {0xFFFF800080008000, 4, 3},
       // r2 - lui + ori + dsll + ori
       // r6 - lui + ori + dahi
-      {0xffffabcd, 3, 2},
+      {0xFFFFABCD, 3, 2},
       // r2 - ori + dsll + ori
       // r6 - daddiu + dahi
-      {0x1ffffabcd, 4, 2},
+      {0x1FFFFABCD, 4, 2},
       // r2 - lui + ori + dsll + ori
       // r6 - daddiu + dahi
-      {0xffffffffabcd, 4, 2},
+      {0xFFFFFFFFABCD, 4, 2},
       // r2 - daddiu + dsll32 + ori + dsubu
       // Loading imm directly would require ori + dsll + ori + dsll + ori.
       // Optimized by loading -imm and using dsubu to get imm.
       // r6 - daddiu + dati
-      {0x1ffffffffabcd, 4, 2},
+      {0x1FFFFFFFFABCD, 4, 2},
       // r2 - daddiu + dsll32 + ori + dsubu
       // Loading imm directly would require lui + ori + dsll + ori + dsll + ori.
       // Optimized by loading -imm and using dsubu to get imm.
       // r6 - daddiu + dati
-      {0xffff7fff80010000, 5, 2},
+      {0xFFFF7FFF80010000, 5, 2},
       // r2 - lui + ori + dsll + ori + dsll
       // r6 - lui + dahi
       // Here lui sets high 32 bits to 1 so dahi can be used to get target
       // value.
-      {0x00007fff7fff0000, 3, 2},
+      {0x00007FFF7FFF0000, 3, 2},
       // r2 - lui + ori + dsll
       // r6 - lui + dahi
       // High 32 bits are not set so dahi can be used to get target value.
-      {0xffff7fff7fff0000, 5, 3},
+      {0xFFFF7FFF7FFF0000, 5, 3},
       // r2 - lui + ori + dsll + ori + dsll
       // r6 - lui + dahi + dati
       // High 32 bits are not set so just dahi can't be used to get target
       // value.
-      {0x00007fff80010000, 3, 3},
+      {0x00007FFF80010000, 3, 3},
       // r2 - lui + ori + dsll
       // r6 - lui + ori + dsll
       // High 32 bits are set so can't just use lui + dahi to get target value.
-      {0x1234abcd87654321, 6, 4},
+      {0x1234ABCD87654321, 6, 4},
       // The test case above generates:
       // r2 - lui + ori + dsll + ori + dsll + ori instruction sequence,
       // r6 - lui + ori + dahi + dati.
       // Load using full instruction sequence.
-      {0xffff0000ffffffff, 3, 3},
+      {0xFFFF0000FFFFFFFF, 3, 3},
       // r2 - ori + dsll32 + nor
       // Loading imm directly would require lui + dsll + ori + dsll + ori.
       // Optimized by loading ~imm and using nor to get imm. Loading -imm would
@@ -5252,27 +5266,28 @@
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
 
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
 
   // 256k instructions; 2^8k
-  // addiu t3, a4, 0xffff;  (0x250fffff)
+  // addiu t3, a4, 0xFFFF;  (0x250FFFFF)
   // ...
-  // addiu t0, a4, 0x0000;  (0x250c0000)
+  // addiu t0, a4, 0x0000;  (0x250C0000)
   uint32_t addiu_start_1 = 0x25000000;
-  for (int32_t i = 0xfffff; i >= 0xc0000; --i) {
+  for (int32_t i = 0xFFFFF; i >= 0xC0000; --i) {
     uint32_t addiu_new = addiu_start_1 + i;
     __ dd(addiu_new);
   }
 
-  __ lwpc(t8, offset);         // offset 0; 0xef080000 (t8 register)
+  __ lwpc(t8, offset);  // offset 0; 0xEF080000 (t8 register)
   __ mov(v0, t8);
 
   // 256k instructions; 2^8k
   // addiu a4, a4, 0x0000;  (0x25080000)
   // ...
-  // addiu a7, a4, 0xffff;  (0x250bffff)
+  // addiu a7, a4, 0xFFFF;  (0x250BFFFF)
   uint32_t addiu_start_2 = 0x25000000;
-  for (int32_t i = 0x80000; i <= 0xbffff; ++i) {
+  for (int32_t i = 0x80000; i <= 0xBFFFF; ++i) {
     uint32_t addiu_new = addiu_start_2 + i;
     __ dd(addiu_new);
   }
@@ -5285,10 +5300,9 @@
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
 
-  F2 f = FUNCTION_CAST<F2>(code->entry());
+  auto f = GeneratedCode<F2>::FromCode(*code);
 
-  uint64_t res = reinterpret_cast<uint64_t>(
-      CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0));
+  uint64_t res = reinterpret_cast<uint64_t>(f.Call(0, 0, 0, 0, 0));
 
   return res;
 }
@@ -5303,17 +5317,19 @@
       uint64_t  expected_res;
     };
 
+    // clang-format off
     struct TestCaseLwpc tc[] = {
       // offset,   expected_res
-      { -262144,   0x250fffff         },   // offset 0x40000
-      {      -4,   0x250c0003         },
-      {      -1,   0x250c0000         },
-      {       0,   0xffffffffef080000 },
+      { -262144,   0x250FFFFF         },   // offset 0x40000
+      {      -4,   0x250C0003         },
+      {      -1,   0x250C0000         },
+      {       0,   0xFFFFFFFFEF080000 },
       {       1,   0x03001025         },   // mov(v0, t8)
       {       2,   0x25080000         },
       {       4,   0x25080002         },
-      {  262143,   0x250bfffd         },   // offset 0x3ffff
+      {  262143,   0x250BFFFD         },   // offset 0x3FFFF
     };
+    // clang-format on
 
     size_t nr_test_cases = sizeof(tc) / sizeof(TestCaseLwpc);
     for (size_t i = 0; i < nr_test_cases; ++i) {
@@ -5328,27 +5344,28 @@
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
 
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
 
   // 256k instructions; 2^8k
-  // addiu t3, a4, 0xffff;  (0x250fffff)
+  // addiu t3, a4, 0xFFFF;  (0x250FFFFF)
   // ...
-  // addiu t0, a4, 0x0000;  (0x250c0000)
+  // addiu t0, a4, 0x0000;  (0x250C0000)
   uint32_t addiu_start_1 = 0x25000000;
-  for (int32_t i = 0xfffff; i >= 0xc0000; --i) {
+  for (int32_t i = 0xFFFFF; i >= 0xC0000; --i) {
     uint32_t addiu_new = addiu_start_1 + i;
     __ dd(addiu_new);
   }
 
-  __ lwupc(t8, offset);         // offset 0; 0xef080000 (t8 register)
+  __ lwupc(t8, offset);  // offset 0; 0xEF080000 (t8 register)
   __ mov(v0, t8);
 
   // 256k instructions; 2^8k
   // addiu a4, a4, 0x0000;  (0x25080000)
   // ...
-  // addiu a7, a4, 0xffff;  (0x250bffff)
+  // addiu a7, a4, 0xFFFF;  (0x250BFFFF)
   uint32_t addiu_start_2 = 0x25000000;
-  for (int32_t i = 0x80000; i <= 0xbffff; ++i) {
+  for (int32_t i = 0x80000; i <= 0xBFFFF; ++i) {
     uint32_t addiu_new = addiu_start_2 + i;
     __ dd(addiu_new);
   }
@@ -5361,10 +5378,9 @@
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
 
-  F2 f = FUNCTION_CAST<F2>(code->entry());
+  auto f = GeneratedCode<F2>::FromCode(*code);
 
-  uint64_t res = reinterpret_cast<uint64_t>(
-      CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0));
+  uint64_t res = reinterpret_cast<uint64_t>(f.Call(0, 0, 0, 0, 0));
 
   return res;
 }
@@ -5379,17 +5395,19 @@
       uint64_t  expected_res;
     };
 
+    // clang-format off
     struct TestCaseLwupc tc[] = {
       // offset,    expected_res
-      { -262144,    0x250fffff },   // offset 0x40000
-      {      -4,    0x250c0003 },
-      {      -1,    0x250c0000 },
-      {       0,    0xef100000 },
+      { -262144,    0x250FFFFF },   // offset 0x40000
+      {      -4,    0x250C0003 },
+      {      -1,    0x250C0000 },
+      {       0,    0xEF100000 },
       {       1,    0x03001025 },   // mov(v0, t8)
       {       2,    0x25080000 },
       {       4,    0x25080002 },
-      {  262143,    0x250bfffd },   // offset 0x3ffff
+      {  262143,    0x250BFFFD },   // offset 0x3FFFF
     };
+    // clang-format on
 
     size_t nr_test_cases = sizeof(tc) / sizeof(TestCaseLwupc);
     for (size_t i = 0; i < nr_test_cases; ++i) {
@@ -5404,7 +5422,8 @@
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
 
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
 
   Label get_program_counter, stop_execution;
   __ push(ra);
@@ -5445,10 +5464,9 @@
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
 
-  F2 f = FUNCTION_CAST<F2>(code->entry());
+  auto f = GeneratedCode<F2>::FromCode(*code);
 
-  uint64_t res = reinterpret_cast<uint64_t>(
-      CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0));
+  uint64_t res = reinterpret_cast<uint64_t>(f.Call(0, 0, 0, 0, 0));
 
   return res;
 }
@@ -5485,7 +5503,8 @@
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
 
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
 
   Label stop_execution;
   __ li(v0, 0);
@@ -5517,10 +5536,9 @@
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
 
-  F2 f = FUNCTION_CAST<F2>(code->entry());
+  auto f = GeneratedCode<F2>::FromCode(*code);
 
-  uint64_t res = reinterpret_cast<uint64_t>(
-      CALL_GENERATED_CODE(isolate, f, value, 0, 0, 0, 0));
+  uint64_t res = reinterpret_cast<uint64_t>(f.Call(value, 0, 0, 0, 0));
 
   return res;
 }
@@ -5536,14 +5554,16 @@
       uint32_t  expected_res;
     };
 
+    // clang-format off
     struct TestCaseBeqzc tc[] = {
       //    value,    offset,   expected_res
       {       0x0,        -8,           0x66 },
       {       0x0,         0,         0x3334 },
       {       0x0,         1,         0x3333 },
-      {     0xabc,         1,         0x3334 },
+      {     0xABC,         1,         0x3334 },
       {       0x0,         4,         0x2033 },
     };
+    // clang-format on
 
     size_t nr_test_cases = sizeof(tc) / sizeof(TestCaseBeqzc);
     for (size_t i = 0; i < nr_test_cases; ++i) {
@@ -5553,12 +5573,196 @@
   }
 }
 
+void load_elements_of_vector(MacroAssembler& assm, const uint64_t elements[],
+                             MSARegister w, Register t0, Register t1) {
+  __ li(t0, static_cast<uint32_t>(elements[0] & 0xFFFFFFFF));
+  __ li(t1, static_cast<uint32_t>((elements[0] >> 32) & 0xFFFFFFFF));
+  __ insert_w(w, 0, t0);
+  __ insert_w(w, 1, t1);
+  __ li(t0, static_cast<uint32_t>(elements[1] & 0xFFFFFFFF));
+  __ li(t1, static_cast<uint32_t>((elements[1] >> 32) & 0xFFFFFFFF));
+  __ insert_w(w, 2, t0);
+  __ insert_w(w, 3, t1);
+}
+
+inline void store_elements_of_vector(MacroAssembler& assm, MSARegister w,
+                                     Register a) {
+  __ st_d(w, MemOperand(a, 0));
+}
+
+typedef union {
+  uint8_t b[16];
+  uint16_t h[8];
+  uint32_t w[4];
+  uint64_t d[2];
+} msa_reg_t;
+
+struct TestCaseMsaBranch {
+  uint64_t wt_lo;
+  uint64_t wt_hi;
+};
+
+template <typename Branch>
+void run_bz_bnz(TestCaseMsaBranch* input, Branch GenerateBranch,
+                bool branched) {
+  Isolate* isolate = CcTest::i_isolate();
+  HandleScope scope(isolate);
+
+  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  CpuFeatureScope fscope(&assm, MIPS_SIMD);
+
+  typedef struct {
+    uint64_t ws_lo;
+    uint64_t ws_hi;
+    uint64_t wd_lo;
+    uint64_t wd_hi;
+  } T;
+  T t = {0x20B9CC4F1A83E0C5, 0xA27E1B5F2F5BB18A, 0x0000000000000000,
+         0x0000000000000000};
+  msa_reg_t res;
+  Label do_not_move_w0_to_w2;
+
+  load_elements_of_vector(assm, &t.ws_lo, w0, t0, t1);
+  load_elements_of_vector(assm, &t.wd_lo, w2, t0, t1);
+  load_elements_of_vector(assm, &input->wt_lo, w1, t0, t1);
+  GenerateBranch(assm, do_not_move_w0_to_w2);
+  __ nop();
+  __ move_v(w2, w0);
+
+  __ bind(&do_not_move_w0_to_w2);
+  store_elements_of_vector(assm, w2, a0);
+  __ jr(ra);
+  __ nop();
+
+  CodeDesc desc;
+  assm.GetCode(isolate, &desc);
+  Handle<Code> code =
+      isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
+#ifdef OBJECT_PRINT
+  code->Print(std::cout);
+#endif
+  auto f = GeneratedCode<F3>::FromCode(*code);
+
+  f.Call(&res, 0, 0, 0, 0);
+  if (branched) {
+    CHECK_EQ(t.wd_lo, res.d[0]);
+    CHECK_EQ(t.wd_hi, res.d[1]);
+  } else {
+    CHECK_EQ(t.ws_lo, res.d[0]);
+    CHECK_EQ(t.ws_hi, res.d[1]);
+  }
+}
+
+TEST(MSA_bz_bnz) {
+  if ((kArchVariant != kMips64r6) || !CpuFeatures::IsSupported(MIPS_SIMD))
+    return;
+
+  TestCaseMsaBranch tz_v[] = {
+      {0x0, 0x0}, {0xABC, 0x0}, {0x0, 0xABC}, {0xABC, 0xABC}};
+  for (unsigned i = 0; i < arraysize(tz_v); ++i) {
+    run_bz_bnz(
+        &tz_v[i],
+        [](MacroAssembler& assm, Label& br_target) { __ bz_v(w1, &br_target); },
+        tz_v[i].wt_lo == 0 && tz_v[i].wt_hi == 0);
+  }
+
+#define TEST_BZ_DF(input_array, lanes, instruction, int_type)         \
+  for (unsigned i = 0; i < arraysize(input_array); ++i) {             \
+    int j;                                                            \
+    int_type* element = reinterpret_cast<int_type*>(&input_array[i]); \
+    for (j = 0; j < lanes; ++j) {                                     \
+      if (element[j] == 0) {                                          \
+        break;                                                        \
+      }                                                               \
+    }                                                                 \
+    run_bz_bnz(&input_array[i],                                       \
+               [](MacroAssembler& assm, Label& br_target) {           \
+                 __ instruction(w1, &br_target);                      \
+               },                                                     \
+               j != lanes);                                           \
+  }
+  TestCaseMsaBranch tz_b[] = {{0x0, 0x0},
+                              {0xBC0000, 0x0},
+                              {0x0, 0xAB000000000000CD},
+                              {0x123456789ABCDEF0, 0xAAAAAAAAAAAAAAAA}};
+  TEST_BZ_DF(tz_b, kMSALanesByte, bz_b, int8_t)
+
+  TestCaseMsaBranch tz_h[] = {{0x0, 0x0},
+                              {0xBCDE0000, 0x0},
+                              {0x0, 0xABCD00000000ABCD},
+                              {0x123456789ABCDEF0, 0xAAAAAAAAAAAAAAAA}};
+  TEST_BZ_DF(tz_h, kMSALanesHalf, bz_h, int16_t)
+
+  TestCaseMsaBranch tz_w[] = {{0x0, 0x0},
+                              {0xBCDE123400000000, 0x0},
+                              {0x0, 0x000000001234ABCD},
+                              {0x123456789ABCDEF0, 0xAAAAAAAAAAAAAAAA}};
+  TEST_BZ_DF(tz_w, kMSALanesWord, bz_w, int32_t)
+
+  TestCaseMsaBranch tz_d[] = {{0x0, 0x0},
+                              {0xBCDE0000, 0x0},
+                              {0x0, 0xABCD00000000ABCD},
+                              {0x123456789ABCDEF0, 0xAAAAAAAAAAAAAAAA}};
+  TEST_BZ_DF(tz_d, kMSALanesDword, bz_d, int64_t)
+#undef TEST_BZ_DF
+
+  TestCaseMsaBranch tnz_v[] = {
+      {0x0, 0x0}, {0xABC, 0x0}, {0x0, 0xABC}, {0xABC, 0xABC}};
+  for (unsigned i = 0; i < arraysize(tnz_v); ++i) {
+    run_bz_bnz(&tnz_v[i],
+               [](MacroAssembler& assm, Label& br_target) {
+                 __ bnz_v(w1, &br_target);
+               },
+               tnz_v[i].wt_lo != 0 || tnz_v[i].wt_hi != 0);
+  }
+
+#define TEST_BNZ_DF(input_array, lanes, instruction, int_type)        \
+  for (unsigned i = 0; i < arraysize(input_array); ++i) {             \
+    int j;                                                            \
+    int_type* element = reinterpret_cast<int_type*>(&input_array[i]); \
+    for (j = 0; j < lanes; ++j) {                                     \
+      if (element[j] == 0) {                                          \
+        break;                                                        \
+      }                                                               \
+    }                                                                 \
+    run_bz_bnz(&input_array[i],                                       \
+               [](MacroAssembler& assm, Label& br_target) {           \
+                 __ instruction(w1, &br_target);                      \
+               },                                                     \
+               j == lanes);                                           \
+  }
+  TestCaseMsaBranch tnz_b[] = {{0x0, 0x0},
+                               {0xBC0000, 0x0},
+                               {0x0, 0xAB000000000000CD},
+                               {0x123456789ABCDEF0, 0xAAAAAAAAAAAAAAAA}};
+  TEST_BNZ_DF(tnz_b, 16, bnz_b, int8_t)
+
+  TestCaseMsaBranch tnz_h[] = {{0x0, 0x0},
+                               {0xBCDE0000, 0x0},
+                               {0x0, 0xABCD00000000ABCD},
+                               {0x123456789ABCDEF0, 0xAAAAAAAAAAAAAAAA}};
+  TEST_BNZ_DF(tnz_h, 8, bnz_h, int16_t)
+
+  TestCaseMsaBranch tnz_w[] = {{0x0, 0x0},
+                               {0xBCDE123400000000, 0x0},
+                               {0x0, 0x000000001234ABCD},
+                               {0x123456789ABCDEF0, 0xAAAAAAAAAAAAAAAA}};
+  TEST_BNZ_DF(tnz_w, 4, bnz_w, int32_t)
+
+  TestCaseMsaBranch tnz_d[] = {{0x0, 0x0},
+                               {0xBCDE0000, 0x0},
+                               {0x0, 0xABCD00000000ABCD},
+                               {0x123456789ABCDEF0, 0xAAAAAAAAAAAAAAAA}};
+  TEST_BNZ_DF(tnz_d, 2, bnz_d, int64_t)
+#undef TEST_BNZ_DF
+}
 
 uint64_t run_jialc(int16_t offset) {
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
 
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
 
   Label main_block, get_program_counter;
   __ push(ra);
@@ -5611,10 +5815,9 @@
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
 
-  F2 f = FUNCTION_CAST<F2>(code->entry());
+  auto f = GeneratedCode<F2>::FromCode(*code);
 
-  uint64_t res = reinterpret_cast<uint64_t>(
-      CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0));
+  uint64_t res = reinterpret_cast<uint64_t>(f.Call(0, 0, 0, 0, 0));
 
   return res;
 }
@@ -5652,7 +5855,8 @@
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
 
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
 
   __ addiupc(v0, imm19);
   __ jr(ra);
@@ -5663,11 +5867,10 @@
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
 
-  F2 f = FUNCTION_CAST<F2>(code->entry());
-  PC = (uint64_t) f;  // Set the program counter.
+  auto f = GeneratedCode<F2>::FromCode(*code);
+  PC = (uint64_t)code->entry();  // Set the program counter.
 
-  uint64_t res = reinterpret_cast<uint64_t>(
-      CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0));
+  uint64_t res = reinterpret_cast<uint64_t>(f.Call(0, 0, 0, 0, 0));
 
   return res;
 }
@@ -5706,27 +5909,28 @@
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
 
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
 
   // 256k instructions; 2 * 2^7k = 2^8k
-  // addiu t3, a4, 0xffff;  (0x250fffff)
+  // addiu t3, a4, 0xFFFF;  (0x250FFFFF)
   // ...
-  // addiu t0, a4, 0x0000;  (0x250c0000)
+  // addiu t0, a4, 0x0000;  (0x250C0000)
   uint32_t addiu_start_1 = 0x25000000;
-  for (int32_t i = 0xfffff; i >= 0xc0000; --i) {
+  for (int32_t i = 0xFFFFF; i >= 0xC0000; --i) {
     uint32_t addiu_new = addiu_start_1 + i;
     __ dd(addiu_new);
   }
 
-  __ ldpc(t8, offset);         // offset 0; 0xef080000 (t8 register)
+  __ ldpc(t8, offset);  // offset 0; 0xEF080000 (t8 register)
   __ mov(v0, t8);
 
   // 256k instructions; 2 * 2^7k = 2^8k
   // addiu a4, a4, 0x0000;  (0x25080000)
   // ...
-  // addiu a7, a4, 0xffff;  (0x250bffff)
+  // addiu a7, a4, 0xFFFF;  (0x250BFFFF)
   uint32_t addiu_start_2 = 0x25000000;
-  for (int32_t i = 0x80000; i <= 0xbffff; ++i) {
+  for (int32_t i = 0x80000; i <= 0xBFFFF; ++i) {
     uint32_t addiu_new = addiu_start_2 + i;
     __ dd(addiu_new);
   }
@@ -5739,10 +5943,9 @@
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
 
-  F2 f = FUNCTION_CAST<F2>(code->entry());
+  auto f = GeneratedCode<F2>::FromCode(*code);
 
-  uint64_t res = reinterpret_cast<uint64_t>(
-      CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0));
+  uint64_t res = reinterpret_cast<uint64_t>(f.Call(0, 0, 0, 0, 0));
 
   return res;
 }
@@ -5766,13 +5969,13 @@
 
     TestCaseLdpc tc[] = {
         // offset,  expected_res
-        {-131072, doubleword(0x250ffffe, 0x250fffff)},
-        {-4, doubleword(0x250c0006, 0x250c0007)},
-        {-1, doubleword(0x250c0000, 0x250c0001)},
-        {0, doubleword(0x03001025, 0xef180000)},
+        {-131072, doubleword(0x250FFFFE, 0x250FFFFF)},
+        {-4, doubleword(0x250C0006, 0x250C0007)},
+        {-1, doubleword(0x250C0000, 0x250C0001)},
+        {0, doubleword(0x03001025, 0xEF180000)},
         {1, doubleword(0x25080001, 0x25080000)},
         {4, doubleword(0x25080007, 0x25080006)},
-        {131071, doubleword(0x250bfffd, 0x250bfffc)},
+        {131071, doubleword(0x250BFFFD, 0x250BFFFC)},
     };
 
     size_t nr_test_cases = sizeof(tc) / sizeof(TestCaseLdpc);
@@ -5788,7 +5991,8 @@
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
 
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
 
   Label continue_1, stop_execution;
   __ push(ra);
@@ -5828,10 +6032,9 @@
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
 
-  F2 f = FUNCTION_CAST<F2>(code->entry());
+  auto f = GeneratedCode<F2>::FromCode(*code);
 
-  int64_t res = reinterpret_cast<int64_t>(
-      CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0));
+  int64_t res = reinterpret_cast<int64_t>(f.Call(0, 0, 0, 0, 0));
 
   return res;
 }
@@ -5868,7 +6071,8 @@
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
 
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
 
   Label continue_1, stop_execution;
   __ push(ra);
@@ -5910,10 +6114,9 @@
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
 
-  F2 f = FUNCTION_CAST<F2>(code->entry());
+  auto f = GeneratedCode<F2>::FromCode(*code);
 
-  int64_t res = reinterpret_cast<int64_t>(
-      CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0));
+  int64_t res = reinterpret_cast<int64_t>(f.Call(0, 0, 0, 0, 0));
 
   return res;
 }
@@ -5949,7 +6152,8 @@
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
 
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
 
   __ dsll(v0, a0, sa_value);
   __ jr(ra);
@@ -5960,10 +6164,9 @@
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
 
-  F4 f = FUNCTION_CAST<F4>(code->entry());
+  auto f = GeneratedCode<F4>::FromCode(*code);
 
-  uint64_t res = reinterpret_cast<uint64_t>(
-      CALL_GENERATED_CODE(isolate, f, rt_value, 0, 0, 0, 0));
+  uint64_t res = reinterpret_cast<uint64_t>(f.Call(rt_value, 0, 0, 0, 0));
 
   return res;
 }
@@ -5978,12 +6181,14 @@
     uint64_t  expected_res;
   };
 
+  // clang-format off
   struct TestCaseDsll tc[] = {
     // rt_value,           sa_value, expected_res
-    {  0xffffffffffffffff,    0,      0xffffffffffffffff },
-    {  0xffffffffffffffff,   16,      0xffffffffffff0000 },
-    {  0xffffffffffffffff,   31,      0xffffffff80000000 },
+    {  0xFFFFFFFFFFFFFFFF,    0,      0xFFFFFFFFFFFFFFFF },
+    {  0xFFFFFFFFFFFFFFFF,   16,      0xFFFFFFFFFFFF0000 },
+    {  0xFFFFFFFFFFFFFFFF,   31,      0xFFFFFFFF80000000 },
   };
+  // clang-format on
 
   size_t nr_test_cases = sizeof(tc) / sizeof(TestCaseDsll);
   for (size_t i = 0; i < nr_test_cases; ++i) {
@@ -5997,7 +6202,8 @@
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
 
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
 
   __ mov(t0, ra);
   __ bal(offset);       // Equivalent for "BGEZAL zero_reg, offset".
@@ -6016,10 +6222,9 @@
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
 
-  F2 f = FUNCTION_CAST<F2>(code->entry());
+  auto f = GeneratedCode<F2>::FromCode(*code);
 
-  uint64_t res = reinterpret_cast<uint64_t>(
-      CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0));
+  uint64_t res = reinterpret_cast<uint64_t>(f.Call(0, 0, 0, 0, 0));
 
   return res;
 }
@@ -6033,10 +6238,12 @@
     uint64_t  expected_res;
   };
 
+  // clang-format off
   struct TestCaseBal tc[] = {
     // offset, expected_res
-    {       4,      1 },
+    {       4,            1 },
   };
+  // clang-format on
 
   size_t nr_test_cases = sizeof(tc) / sizeof(TestCaseBal);
   for (size_t i = 0; i < nr_test_cases; ++i) {
@@ -6069,10 +6276,9 @@
   assm.GetCode(isolate, &desc);
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
-  F2 f = FUNCTION_CAST<F2>(code->entry());
+  auto f = GeneratedCode<F2>::FromCode(*code);
 
-  int64_t res = reinterpret_cast<int64_t>(
-      CALL_GENERATED_CODE(isolate, f, 42, 42, 0, 0, 0));
+  int64_t res = reinterpret_cast<int64_t>(f.Call(42, 42, 0, 0, 0));
   CHECK_EQ(0, res);
 }
 
@@ -6086,7 +6292,8 @@
   CcTest::InitializeVM();
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
 
   T x = std::sqrt(static_cast<T>(2.0));
   T y = std::sqrt(static_cast<T>(3.0));
@@ -6136,7 +6343,7 @@
   assm.GetCode(isolate, &desc);
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
-  F3 f = FUNCTION_CAST<F3>(code->entry());
+  auto f = GeneratedCode<F3>::FromCode(*code);
 
   const size_t kTableLength = sizeof(test_cases) / sizeof(TestCaseMaddMsub<T>);
   TestCaseMaddMsub<T> tc;
@@ -6145,7 +6352,7 @@
     tc.fs = test_cases[i].fs;
     tc.ft = test_cases[i].ft;
 
-    (CALL_GENERATED_CODE(isolate, f, &tc, 0, 0, 0, 0));
+    f.Call(&tc, 0, 0, 0, 0);
 
     T res_sub;
     T res_add;
@@ -6206,7 +6413,8 @@
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
 
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
 
   Label code_start;
   __ bind(&code_start);
@@ -6222,10 +6430,9 @@
 #ifdef OBJECT_PRINT
   code->Print(std::cout);
 #endif
-  F2 f = FUNCTION_CAST<F2>(code->entry());
+  auto f = GeneratedCode<F2>::FromCode(*code);
 
-  uint64_t res = reinterpret_cast<uint64_t>(
-      CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0));
+  uint64_t res = reinterpret_cast<uint64_t>(f.Call(0, 0, 0, 0, 0));
 
   return res;
 }
@@ -6244,39 +6451,41 @@
 
   // We call Subu(v0, zero_reg, imm) to test cases listed below.
   // 0 - imm = expected_res
+  // clang-format off
   struct TestCaseSubu tc[] = {
-      //        imm, expected_res, num_instr
-      {0xffffffffffff8000, 0x8000, 2},  // min_int16
+      //              imm, expected_res, num_instr
+      {0xFFFFFFFFFFFF8000,       0x8000,         2},  // min_int16
       // The test case above generates ori + addu instruction sequence.
       // We can't have just addiu because -min_int16 > max_int16 so use
       // register. We can load min_int16 to at register with addiu and then
       // subtract at with subu, but now we use ori + addu because -min_int16 can
       // be loaded using ori.
-      {0x8000, 0xffffffffffff8000, 1},  // max_int16 + 1
+      {0x8000,       0xFFFFFFFFFFFF8000,         1},  // max_int16 + 1
       // Generates addiu
       // max_int16 + 1 is not int16 but -(max_int16 + 1) is, just use addiu.
-      {0xffffffffffff7fff, 0x8001, 2},  // min_int16 - 1
+      {0xFFFFFFFFFFFF7FFF,       0x8001,         2},  // min_int16 - 1
       // Generates ori + addu
       // To load this value to at we need two instructions and another one to
       // subtract, lui + ori + subu. But we can load -value to at using just
       // ori and then add at register with addu.
-      {0x8001, 0xffffffffffff7fff, 2},  // max_int16 + 2
+      {0x8001,       0xFFFFFFFFFFFF7FFF,         2},  // max_int16 + 2
       // Generates ori + subu
       // Not int16 but is uint16, load value to at with ori and subtract with
       // subu.
-      {0x00010000, 0xffffffffffff0000, 2},
+      {0x00010000,   0xFFFFFFFFFFFF0000,         2},
       // Generates lui + subu
       // Load value using lui to at and subtract with subu.
-      {0x00010001, 0xfffffffffffeffff, 3},
+      {0x00010001,   0xFFFFFFFFFFFEFFFF,         3},
       // Generates lui + ori + subu
       // We have to generate three instructions in this case.
-      {0x7fffffff, 0xffffffff80000001, 3},  // max_int32
+      {0x7FFFFFFF,   0xFFFFFFFF80000001,         3},  // max_int32
       // Generates lui + ori + subu
-      {0xffffffff80000000, 0xffffffff80000000, 2},  // min_int32
+      {0xFFFFFFFF80000000, 0xFFFFFFFF80000000,   2},  // min_int32
       // The test case above generates lui + subu intruction sequence.
       // The result of 0 - min_int32 eqauls max_int32 + 1, which wraps around to
       // min_int32 again.
   };
+  // clang-format on
 
   size_t nr_test_cases = sizeof(tc) / sizeof(TestCaseSubu);
   for (size_t i = 0; i < nr_test_cases; ++i) {
@@ -6288,7 +6497,8 @@
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
 
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
 
   Label code_start;
   __ bind(&code_start);
@@ -6304,10 +6514,9 @@
 #ifdef OBJECT_PRINT
   code->Print(std::cout);
 #endif
-  F2 f = FUNCTION_CAST<F2>(code->entry());
+  auto f = GeneratedCode<F2>::FromCode(*code);
 
-  uint64_t res = reinterpret_cast<uint64_t>(
-      CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0));
+  uint64_t res = reinterpret_cast<uint64_t>(f.Call(0, 0, 0, 0, 0));
 
   return res;
 }
@@ -6326,38 +6535,39 @@
 
   // We call Dsubu(v0, zero_reg, imm) to test cases listed below.
   // 0 - imm = expected_res
+  // clang-format off
   struct TestCaseDsubu tc[] = {
       //        imm, expected_res, num_instr
-      {0xffffffffffff8000, 0x8000, 2},  // min_int16
+      {0xFFFFFFFFFFFF8000, 0x8000, 2},  // min_int16
       // The test case above generates daddiu + dsubu instruction sequence.
       // We can't have just daddiu because -min_int16 > max_int16 so use
       // register, but we can load min_int16 to at register with daddiu and then
       // subtract at with dsubu.
-      {0x8000, 0xffffffffffff8000, 1},  // max_int16 + 1
+      {0x8000, 0xFFFFFFFFFFFF8000, 1},  // max_int16 + 1
       // Generates daddiu
       // max_int16 + 1 is not int16 but -(max_int16 + 1) is, just use daddiu.
-      {0xffffffffffff7fff, 0x8001, 2},  // min_int16 - 1
+      {0xFFFFFFFFFFFF7FFF, 0x8001, 2},  // min_int16 - 1
       // Generates ori + daddu
       // To load this value to at we need two instructions and another one to
       // subtract, lui + ori + dsubu. But we can load -value to at using just
       // ori and then dadd at register with daddu.
-      {0x8001, 0xffffffffffff7fff, 2},  // max_int16 + 2
+      {0x8001, 0xFFFFFFFFFFFF7FFF, 2},  // max_int16 + 2
       // Generates ori + dsubu
       // Not int16 but is uint16, load value to at with ori and subtract with
       // dsubu.
-      {0x00010000, 0xffffffffffff0000, 2},
+      {0x00010000, 0xFFFFFFFFFFFF0000, 2},
       // Generates lui + dsubu
       // Load value using lui to at and subtract with dsubu.
-      {0x00010001, 0xfffffffffffeffff, 3},
+      {0x00010001, 0xFFFFFFFFFFFEFFFF, 3},
       // Generates lui + ori + dsubu
       // We have to generate three instructions in this case.
-      {0x7fffffff, 0xffffffff80000001, 3},  // max_int32
+      {0x7FFFFFFF, 0xFFFFFFFF80000001, 3},  // max_int32
       // Generates lui + ori + dsubu
-      {0xffffffff80000000, 0x0000000080000000, 2},  // min_int32
+      {0xFFFFFFFF80000000, 0x0000000080000000, 2},  // min_int32
       // Generates lui + dsubu
       // The result of 0 - min_int32 eqauls max_int32 + 1, which fits into a 64
       // bit register, Dsubu gives a different result here.
-      {0x7fffffffffffffff, 0x8000000000000001, 3},  // max_int64
+      {0x7FFFFFFFFFFFFFFF, 0x8000000000000001, 3},  // max_int64
       // r2 - Generates daddiu + dsrl + dsubu
       // r6 - Generates daddiu + dati + dsubu
       {0x8000000000000000, 0x8000000000000000, 3},  // min_int64
@@ -6366,13 +6576,14 @@
       // r6 - ori + dati + dsubu.
       // The result of 0 - min_int64 eqauls max_int64 + 1, which wraps around to
       // min_int64 again.
-      {0xffff0000ffffffff, 0x0000ffff00000001, 4},
+      {0xFFFF0000FFFFFFFF, 0x0000FFFF00000001, 4},
       // The test case above generates:
       // r2 - ori + dsll32 + ori + daddu instruction sequence,
       // r6 - daddiu + dahi + dati + dsubu.
       // For r2 loading imm would take more instructions than loading -imm so we
       // can load -imm and add with daddu.
   };
+  // clang-format on
 
   size_t nr_test_cases = sizeof(tc) / sizeof(TestCaseDsubu);
   for (size_t i = 0; i < nr_test_cases; ++i) {
@@ -6384,7 +6595,8 @@
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
 
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
 
   __ li(v0, imm);
   __ li(t0, source);
@@ -6396,10 +6608,9 @@
   assm.GetCode(isolate, &desc);
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
-  F2 f = FUNCTION_CAST<F2>(code->entry());
+  auto f = GeneratedCode<F2>::FromCode(*code);
 
-  uint64_t res = reinterpret_cast<uint64_t>(
-      CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0));
+  uint64_t res = reinterpret_cast<uint64_t>(f.Call(0, 0, 0, 0, 0));
 
   return res;
 }
@@ -6419,18 +6630,20 @@
 
   // We load imm to v0 and source to t0 and then call
   // Dins(v0, t0, pos, size) to test cases listed below.
+  // clang-format off
   struct TestCaseDins tc[] = {
       // imm, source, pos, size, expected_res
-      {0x5555555555555555, 0x1abcdef01, 31, 1, 0x55555555d5555555},
-      {0x5555555555555555, 0x1abcdef02, 30, 2, 0x5555555595555555},
-      {0x201234567, 0x1fabcdeff, 0, 32, 0x2fabcdeff},
-      {0x201234567, 0x7fabcdeff, 31, 2, 0x381234567},
-      {0x800000000, 0x7fabcdeff, 0, 33, 0x9fabcdeff},
-      {0x1234, 0xabcdabcdabcdabcd, 0, 64, 0xabcdabcdabcdabcd},
-      {0xabcd, 0xabceabcf, 32, 1, 0x10000abcd},
-      {0xabcd, 0xabceabcf, 63, 1, 0x800000000000abcd},
-      {0x10000abcd, 0xabc1abc2abc3abc4, 32, 32, 0xabc3abc40000abcd},
+      {0x5555555555555555, 0x1ABCDEF01, 31, 1, 0x55555555D5555555},
+      {0x5555555555555555, 0x1ABCDEF02, 30, 2, 0x5555555595555555},
+      {0x201234567, 0x1FABCDEFF, 0, 32, 0x2FABCDEFF},
+      {0x201234567, 0x7FABCDEFF, 31, 2, 0x381234567},
+      {0x800000000, 0x7FABCDEFF, 0, 33, 0x9FABCDEFF},
+      {0x1234, 0xABCDABCDABCDABCD, 0, 64, 0xABCDABCDABCDABCD},
+      {0xABCD, 0xABCEABCF, 32, 1, 0x10000ABCD},
+      {0xABCD, 0xABCEABCF, 63, 1, 0x800000000000ABCD},
+      {0x10000ABCD, 0xABC1ABC2ABC3ABC4, 32, 32, 0xABC3ABC40000ABCD},
   };
+  // clang-format on
 
   size_t nr_test_cases = sizeof(tc) / sizeof(TestCaseDins);
   for (size_t i = 0; i < nr_test_cases; ++i) {
@@ -6443,7 +6656,8 @@
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
 
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
 
   __ li(v0, imm);
   __ li(t0, source);
@@ -6455,10 +6669,9 @@
   assm.GetCode(isolate, &desc);
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
-  F2 f = FUNCTION_CAST<F2>(code->entry());
+  auto f = GeneratedCode<F2>::FromCode(*code);
 
-  uint64_t res = reinterpret_cast<uint64_t>(
-      CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0));
+  uint64_t res = reinterpret_cast<uint64_t>(f.Call(0, 0, 0, 0, 0));
 
   return res;
 }
@@ -6468,53 +6681,54 @@
 
   //       run_Ins(rt_value, rs_value, pos, size),
   //       expected_result
-  CHECK_EQ(run_Ins(0x0000000055555555, 0xffffffffabcdef01, 31, 1),
-           0xffffffffd5555555);
-  CHECK_EQ(run_Ins(0x0000000055555555, 0xffffffffabcdef02, 30, 2),
-           0xffffffff95555555);
-  CHECK_EQ(run_Ins(0x0000000001234567, 0xfffffffffabcdeff, 0, 32),
-           0xfffffffffabcdeff);
+  CHECK_EQ(run_Ins(0x0000000055555555, 0xFFFFFFFFABCDEF01, 31, 1),
+           0xFFFFFFFFD5555555);
+  CHECK_EQ(run_Ins(0x0000000055555555, 0xFFFFFFFFABCDEF02, 30, 2),
+           0xFFFFFFFF95555555);
+  CHECK_EQ(run_Ins(0x0000000001234567, 0xFFFFFFFFFABCDEFF, 0, 32),
+           0xFFFFFFFFFABCDEFF);
 
   // Results with positive sign.
-  CHECK_EQ(run_Ins(0x0000000055555550, 0xffffffff80000001, 0, 1),
+  CHECK_EQ(run_Ins(0x0000000055555550, 0xFFFFFFFF80000001, 0, 1),
            0x0000000055555551);
   CHECK_EQ(run_Ins(0x0000000055555555, 0x0000000040000001, 0, 32),
            0x0000000040000001);
   CHECK_EQ(run_Ins(0x0000000055555555, 0x0000000020000001, 1, 31),
            0x0000000040000003);
-  CHECK_EQ(run_Ins(0x0000000055555555, 0xffffffff80700001, 8, 24),
+  CHECK_EQ(run_Ins(0x0000000055555555, 0xFFFFFFFF80700001, 8, 24),
            0x0000000070000155);
-  CHECK_EQ(run_Ins(0x0000000055555555, 0xffffffff80007001, 16, 16),
+  CHECK_EQ(run_Ins(0x0000000055555555, 0xFFFFFFFF80007001, 16, 16),
            0x0000000070015555);
-  CHECK_EQ(run_Ins(0x0000000055555555, 0xffffffff80000071, 24, 8),
+  CHECK_EQ(run_Ins(0x0000000055555555, 0xFFFFFFFF80000071, 24, 8),
            0x0000000071555555);
   CHECK_EQ(run_Ins(0x0000000075555555, 0x0000000040000000, 31, 1),
            0x0000000075555555);
 
   // Results with negative sign.
-  CHECK_EQ(run_Ins(0xffffffff85555550, 0xffffffff80000001, 0, 1),
-           0xffffffff85555551);
-  CHECK_EQ(run_Ins(0x0000000055555555, 0xffffffff80000001, 0, 32),
-           0xffffffff80000001);
+  CHECK_EQ(run_Ins(0xFFFFFFFF85555550, 0xFFFFFFFF80000001, 0, 1),
+           0xFFFFFFFF85555551);
+  CHECK_EQ(run_Ins(0x0000000055555555, 0xFFFFFFFF80000001, 0, 32),
+           0xFFFFFFFF80000001);
   CHECK_EQ(run_Ins(0x0000000055555555, 0x0000000040000001, 1, 31),
-           0xffffffff80000003);
-  CHECK_EQ(run_Ins(0x0000000055555555, 0xffffffff80800001, 8, 24),
-           0xffffffff80000155);
-  CHECK_EQ(run_Ins(0x0000000055555555, 0xffffffff80008001, 16, 16),
-           0xffffffff80015555);
-  CHECK_EQ(run_Ins(0x0000000055555555, 0xffffffff80000081, 24, 8),
-           0xffffffff81555555);
+           0xFFFFFFFF80000003);
+  CHECK_EQ(run_Ins(0x0000000055555555, 0xFFFFFFFF80800001, 8, 24),
+           0xFFFFFFFF80000155);
+  CHECK_EQ(run_Ins(0x0000000055555555, 0xFFFFFFFF80008001, 16, 16),
+           0xFFFFFFFF80015555);
+  CHECK_EQ(run_Ins(0x0000000055555555, 0xFFFFFFFF80000081, 24, 8),
+           0xFFFFFFFF81555555);
   CHECK_EQ(run_Ins(0x0000000075555555, 0x0000000000000001, 31, 1),
-           0xfffffffff5555555);
+           0xFFFFFFFFF5555555);
 }
 
 uint64_t run_Ext(uint64_t source, uint16_t pos, uint16_t size) {
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
 
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
 
-  __ li(v0, 0xffffffffffffffff);
+  __ li(v0, 0xFFFFFFFFFFFFFFFF);
   __ li(t0, source);
   __ Ext(v0, t0, pos, size);
   __ jr(ra);
@@ -6524,10 +6738,9 @@
   assm.GetCode(isolate, &desc);
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
-  F2 f = FUNCTION_CAST<F2>(code->entry());
+  auto f = GeneratedCode<F2>::FromCode(*code);
 
-  uint64_t res = reinterpret_cast<uint64_t>(
-      CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0));
+  uint64_t res = reinterpret_cast<uint64_t>(f.Call(0, 0, 0, 0, 0));
 
   return res;
 }
@@ -6537,13 +6750,13 @@
 
   // Source values with negative sign.
   //       run_Ext(rs_value, pos, size), expected_result
-  CHECK_EQ(run_Ext(0xffffffff80000001, 0, 1), 0x0000000000000001);
-  CHECK_EQ(run_Ext(0xffffffff80000001, 0, 32), 0xffffffff80000001);
-  CHECK_EQ(run_Ext(0xffffffff80000002, 1, 31), 0x0000000040000001);
-  CHECK_EQ(run_Ext(0xffffffff80000100, 8, 24), 0x0000000000800001);
-  CHECK_EQ(run_Ext(0xffffffff80010000, 16, 16), 0x0000000000008001);
-  CHECK_EQ(run_Ext(0xffffffff81000000, 24, 8), 0x0000000000000081);
-  CHECK_EQ(run_Ext(0xffffffff80000000, 31, 1), 0x0000000000000001);
+  CHECK_EQ(run_Ext(0xFFFFFFFF80000001, 0, 1), 0x0000000000000001);
+  CHECK_EQ(run_Ext(0xFFFFFFFF80000001, 0, 32), 0xFFFFFFFF80000001);
+  CHECK_EQ(run_Ext(0xFFFFFFFF80000002, 1, 31), 0x0000000040000001);
+  CHECK_EQ(run_Ext(0xFFFFFFFF80000100, 8, 24), 0x0000000000800001);
+  CHECK_EQ(run_Ext(0xFFFFFFFF80010000, 16, 16), 0x0000000000008001);
+  CHECK_EQ(run_Ext(0xFFFFFFFF81000000, 24, 8), 0x0000000000000081);
+  CHECK_EQ(run_Ext(0xFFFFFFFF80000000, 31, 1), 0x0000000000000001);
 
   // Source values with positive sign.
   CHECK_EQ(run_Ext(0x0000000000000001, 0, 1), 0x0000000000000001);
@@ -6555,63 +6768,6 @@
   CHECK_EQ(run_Ext(0x0000000040000000, 31, 1), 0x0000000000000000);
 }
 
-// Load elements in w0 MSA vector register
-void load_uint64_elements_of_vector(MacroAssembler& assm,
-                                    const uint64_t elements[], MSARegister w,
-                                    Register t0, Register t1) {
-  __ li(t0, elements[0]);
-  __ li(t1, elements[1]);
-  __ insert_d(w, 0, t0);
-  __ insert_d(w, 1, t1);
-}
-
-void load_uint32_elements_of_vector(MacroAssembler& assm,
-                                    const uint64_t elements[], MSARegister w,
-                                    Register t0, Register t1) {
-  const uint32_t* const element = reinterpret_cast<const uint32_t*>(elements);
-  __ li(t0, element[0]);
-  __ li(t1, element[1]);
-  __ insert_w(w, 0, t0);
-  __ insert_w(w, 1, t1);
-  __ li(t0, element[2]);
-  __ li(t1, element[3]);
-  __ insert_w(w, 2, t0);
-  __ insert_w(w, 3, t1);
-}
-
-void load_uint16_elements_of_vector(MacroAssembler& assm,
-                                    const uint64_t elements[], MSARegister w,
-                                    Register t0, Register t1) {
-  const uint16_t* const element = reinterpret_cast<const uint16_t*>(elements);
-  __ li(t0, element[0]);
-  __ li(t1, element[1]);
-  __ insert_h(w, 0, t0);
-  __ insert_h(w, 1, t1);
-  __ li(t0, element[2]);
-  __ li(t1, element[3]);
-  __ insert_h(w, 2, t0);
-  __ insert_h(w, 3, t1);
-  __ li(t0, element[4]);
-  __ li(t1, element[5]);
-  __ insert_h(w, 4, t0);
-  __ insert_h(w, 5, t1);
-  __ li(t0, element[6]);
-  __ li(t1, element[7]);
-  __ insert_h(w, 6, t0);
-  __ insert_h(w, 7, t1);
-}
-
-// Store vector elements from w2 to the memory pointed by a0
-void store_uint64_elements_of_vector(MacroAssembler& assm, MSARegister w,
-                                     Register a) {
-  __ st_d(w, MemOperand(a, 0));
-}
-
-void store_uint32_elements_of_vector(MacroAssembler& assm, MSARegister w,
-                                     Register a) {
-  __ st_w(w, MemOperand(a, 0));
-}
-
 TEST(MSA_fill_copy) {
   CcTest::InitializeVM();
   Isolate* isolate = CcTest::i_isolate();
@@ -6628,14 +6784,15 @@
   } T;
   T t;
 
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
   if ((kArchVariant != kMips64r6) || !CpuFeatures::IsSupported(MIPS_SIMD))
     return;
 
   {
     CpuFeatureScope fscope(&assm, MIPS_SIMD);
 
-    __ li(t0, 0x9e7689aca512b683);
+    __ li(t0, 0x9E7689ACA512B683);
 
     __ fill_b(w0, t0);
     __ fill_h(w2, t0);
@@ -6668,18 +6825,17 @@
 #ifdef OBJECT_PRINT
   code->Print(std::cout);
 #endif
-  F3 f = FUNCTION_CAST<F3>(code->entry());
+  auto f = GeneratedCode<F3>::FromCode(*code);
 
-  Object* dummy = CALL_GENERATED_CODE(isolate, f, &t, 0, 0, 0, 0);
-  USE(dummy);
+  f.Call(&t, 0, 0, 0, 0);
 
   CHECK_EQ(0x83u, t.u8);
-  CHECK_EQ(0xb683u, t.u16);
-  CHECK_EQ(0xa512b683u, t.u32);
-  CHECK_EQ(0xffffffffffffff83u, t.s8);
-  CHECK_EQ(0xffffffffffffb683u, t.s16);
-  CHECK_EQ(0xffffffffa512b683u, t.s32);
-  CHECK_EQ(0x9e7689aca512b683u, t.s64);
+  CHECK_EQ(0xB683u, t.u16);
+  CHECK_EQ(0xA512B683u, t.u32);
+  CHECK_EQ(0xFFFFFFFFFFFFFF83u, t.s8);
+  CHECK_EQ(0xFFFFFFFFFFFFB683u, t.s16);
+  CHECK_EQ(0xFFFFFFFFA512B683u, t.s32);
+  CHECK_EQ(0x9E7689ACA512B683u, t.s64);
 }
 
 TEST(MSA_fill_copy_2) {
@@ -6695,14 +6851,15 @@
   } T;
   T t[2];
 
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
   if ((kArchVariant != kMips64r6) || !CpuFeatures::IsSupported(MIPS_SIMD))
     return;
 
   {
     CpuFeatureScope fscope(&assm, MIPS_SIMD);
 
-    __ li(t0, 0xaaaaaaaaaaaaaaaa);
+    __ li(t0, 0xAAAAAAAAAAAAAAAA);
     __ li(t1, 0x5555555555555555);
 
     __ fill_d(w0, t0);
@@ -6732,15 +6889,14 @@
 #ifdef OBJECT_PRINT
   code->Print(std::cout);
 #endif
-  F5 f = FUNCTION_CAST<F5>(code->entry());
+  auto f = GeneratedCode<F5>::FromCode(*code);
 
-  Object* dummy = CALL_GENERATED_CODE(isolate, f, &t[0], &t[1], 0, 0, 0);
-  USE(dummy);
+  f.Call(&t[0], &t[1], 0, 0, 0);
 
   CHECK_EQ(0x5555555555555555, t[0].d0);
-  CHECK_EQ(0xaaaaaaaaaaaaaaaa, t[0].d1);
+  CHECK_EQ(0xAAAAAAAAAAAAAAAA, t[0].d1);
   CHECK_EQ(0x5555555555555555, t[1].d0);
-  CHECK_EQ(0xaaaaaaaaaaaaaaaa, t[1].d1);
+  CHECK_EQ(0xAAAAAAAAAAAAAAAA, t[1].d1);
 }
 
 TEST(MSA_fill_copy_3) {
@@ -6756,14 +6912,15 @@
   } T;
   T t[2];
 
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
   if ((kArchVariant != kMips64r6) || !CpuFeatures::IsSupported(MIPS_SIMD))
     return;
 
   {
     CpuFeatureScope fscope(&assm, MIPS_SIMD);
 
-    __ li(t0, 0xaaaaaaaaaaaaaaaa);
+    __ li(t0, 0xAAAAAAAAAAAAAAAA);
     __ li(t1, 0x5555555555555555);
 
     __ Move(f0, t0);
@@ -6786,28 +6943,22 @@
 #ifdef OBJECT_PRINT
   code->Print(std::cout);
 #endif
-  F5 f = FUNCTION_CAST<F5>(code->entry());
+  auto f = GeneratedCode<F5>::FromCode(*code);
 
-  Object* dummy = CALL_GENERATED_CODE(isolate, f, &t[0], &t[1], 0, 0, 0);
-  USE(dummy);
+  f.Call(&t[0], &t[1], 0, 0, 0);
 
   CHECK_EQ(0x5555555555555555, t[0].d0);
   CHECK_EQ(0x5555555555555555, t[1].d0);
 }
 
-typedef union {
-  uint8_t b[16];
-  uint16_t h[8];
-  uint32_t w[4];
-  uint64_t d[2];
-} msa_reg_t;
 
 template <typename T>
 void run_msa_insert(int64_t rs_value, int n, msa_reg_t* w) {
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
 
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
   CpuFeatureScope fscope(&assm, MIPS_SIMD);
 
   __ li(t0, -1);
@@ -6815,22 +6966,22 @@
   __ fill_w(w0, t0);
 
   if (std::is_same<T, int8_t>::value) {
-    DCHECK(n < 16);
+    DCHECK_LT(n, 16);
     __ insert_b(w0, n, t1);
   } else if (std::is_same<T, int16_t>::value) {
-    DCHECK(n < 8);
+    DCHECK_LT(n, 8);
     __ insert_h(w0, n, t1);
   } else if (std::is_same<T, int32_t>::value) {
-    DCHECK(n < 4);
+    DCHECK_LT(n, 4);
     __ insert_w(w0, n, t1);
   } else if (std::is_same<T, int64_t>::value) {
-    DCHECK(n < 2);
+    DCHECK_LT(n, 2);
     __ insert_d(w0, n, t1);
   } else {
     UNREACHABLE();
   }
 
-  store_uint64_elements_of_vector(assm, w0, a0);
+  store_elements_of_vector(assm, w0, a0);
 
   __ jr(ra);
   __ nop();
@@ -6842,9 +6993,9 @@
 #ifdef OBJECT_PRINT
   code->Print(std::cout);
 #endif
-  F3 f = FUNCTION_CAST<F3>(code->entry());
+  auto f = GeneratedCode<F3>::FromCode(*code);
 
-  (CALL_GENERATED_CODE(isolate, f, w, 0, 0, 0, 0));
+  f.Call(w, 0, 0, 0, 0);
 }
 
 TEST(MSA_insert) {
@@ -6860,12 +7011,15 @@
     uint64_t exp_res_hi;
   };
 
+  // clang-format off
   struct TestCaseInsert tc_b[] = {
-      // input, n,        exp_res_lo,          exp_res_hi
-      {0xa2, 13, 0xffffffffffffffffu, 0xffffa2ffffffffffu},
-      {0x73, 10, 0xffffffffffffffffu, 0xffffffffff73ffffu},
-      {0x3494, 5, 0xffff94ffffffffffu, 0xffffffffffffffffu},
-      {0xa6b8, 1, 0xffffffffffffb8ffu, 0xffffffffffffffffu}};
+    // input, n,          exp_res_lo,          exp_res_hi
+    {  0xA2, 13, 0xFFFFFFFFFFFFFFFFu, 0xFFFFA2FFFFFFFFFFu},
+    {  0x73, 10, 0xFFFFFFFFFFFFFFFFu, 0xFFFFFFFFFF73FFFFu},
+    {0x3494,  5, 0xFFFF94FFFFFFFFFFu, 0xFFFFFFFFFFFFFFFFu},
+    {0xA6B8,  1, 0xFFFFFFFFFFFFB8FFu, 0xFFFFFFFFFFFFFFFFu}
+  };
+  // clang-format off
 
   for (size_t i = 0; i < sizeof(tc_b) / sizeof(TestCaseInsert); ++i) {
     msa_reg_t res;
@@ -6874,12 +7028,15 @@
     CHECK_EQ(tc_b[i].exp_res_hi, res.d[1]);
   }
 
+  // clang-format off
   struct TestCaseInsert tc_h[] = {
-      // input, n,         exp_res_lo,          exp_res_hi
-      {0x85a2, 7, 0xffffffffffffffffu, 0x85a2ffffffffffffu},
-      {0xe873, 5, 0xffffffffffffffffu, 0xffffffffe873ffffu},
-      {0x3494, 3, 0x3494ffffffffffffu, 0xffffffffffffffffu},
-      {0xa6b8, 1, 0xffffffffa6b8ffffu, 0xffffffffffffffffu}};
+    // input, n,          exp_res_lo,          exp_res_hi
+    {0x85A2,  7, 0xFFFFFFFFFFFFFFFFu, 0x85A2FFFFFFFFFFFFu},
+    {0xE873,  5, 0xFFFFFFFFFFFFFFFFu, 0xFFFFFFFFE873FFFFu},
+    {0x3494,  3, 0x3494FFFFFFFFFFFFu, 0xFFFFFFFFFFFFFFFFu},
+    {0xA6B8,  1, 0xFFFFFFFFA6B8FFFFu, 0xFFFFFFFFFFFFFFFFu}
+  };
+  // clang-format on
 
   for (size_t i = 0; i < sizeof(tc_h) / sizeof(TestCaseInsert); ++i) {
     msa_reg_t res;
@@ -6888,12 +7045,15 @@
     CHECK_EQ(tc_h[i].exp_res_hi, res.d[1]);
   }
 
+  // clang-format off
   struct TestCaseInsert tc_w[] = {
-      //     input, n,          exp_res_lo,          exp_res_hi
-      {0xd2f085a2u, 3, 0xffffffffffffffffu, 0xd2f085a2ffffffffu},
-      {0x4567e873u, 2, 0xffffffffffffffffu, 0xffffffff4567e873u},
-      {0xacdb3494u, 1, 0xacdb3494ffffffffu, 0xffffffffffffffffu},
-      {0x89aba6b8u, 0, 0xffffffff89aba6b8u, 0xffffffffffffffffu}};
+    //     input, n,          exp_res_lo,          exp_res_hi
+    {0xD2F085A2u, 3, 0xFFFFFFFFFFFFFFFFu, 0xD2F085A2FFFFFFFFu},
+    {0x4567E873u, 2, 0xFFFFFFFFFFFFFFFFu, 0xFFFFFFFF4567E873u},
+    {0xACDB3494u, 1, 0xACDB3494FFFFFFFFu, 0xFFFFFFFFFFFFFFFFu},
+    {0x89ABA6B8u, 0, 0xFFFFFFFF89ABA6B8u, 0xFFFFFFFFFFFFFFFFu}
+  };
+  // clang-format on
 
   for (size_t i = 0; i < sizeof(tc_w) / sizeof(TestCaseInsert); ++i) {
     msa_reg_t res;
@@ -6902,10 +7062,13 @@
     CHECK_EQ(tc_w[i].exp_res_hi, res.d[1]);
   }
 
+  // clang-format off
   struct TestCaseInsert tc_d[] = {
-      //            input, n,         exp_res_lo,          exp_res_hi
-      {0xf35862e13e38f8b0, 1, 0xffffffffffffffffu, 0xf35862e13e38f8b0},
-      {0x4f41ffdef2bfe636, 0, 0x4f41ffdef2bfe636, 0xffffffffffffffffu}};
+    //            input, n,          exp_res_lo,          exp_res_hi
+    {0xF35862E13E38F8B0, 1, 0xFFFFFFFFFFFFFFFFu, 0xF35862E13E38F8B0},
+    {0x4F41FFDEF2BFE636, 0,  0x4F41FFDEF2BFE636, 0xFFFFFFFFFFFFFFFFu}
+  };
+  // clang-format on
 
   for (size_t i = 0; i < sizeof(tc_d) / sizeof(TestCaseInsert); ++i) {
     msa_reg_t res;
@@ -6919,7 +7082,8 @@
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
 
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
   CpuFeatureScope fscope(&assm, MIPS_SIMD);
 
   MSAControlRegister msareg = {kMSACSRRegister};
@@ -6940,30 +7104,176 @@
 #ifdef OBJECT_PRINT
   code->Print(std::cout);
 #endif
-  F3 f = FUNCTION_CAST<F3>(code->entry());
+  auto f = GeneratedCode<F3>::FromCode(*code);
 
   uint64_t res;
-  (CALL_GENERATED_CODE(isolate, f, &res, 0, 0, 0, 0));
+  f.Call(&res, 0, 0, 0, 0);
 
   CHECK_EQ(bit_cast<uint64_t>(static_cast<int64_t>(
-               bit_cast<int32_t>(static_cast<uint32_t>(value & 0x0167ffff)))),
+               bit_cast<int32_t>(static_cast<uint32_t>(value & 0x0167FFFF)))),
            res);
 }
 
+TEST(MSA_move_v) {
+  if ((kArchVariant != kMips64r6) || !CpuFeatures::IsSupported(MIPS_SIMD))
+    return;
+  CcTest::InitializeVM();
+  Isolate* isolate = CcTest::i_isolate();
+  HandleScope scope(isolate);
+
+  typedef struct {
+    uint64_t ws_lo;
+    uint64_t ws_hi;
+    uint64_t wd_lo;
+    uint64_t wd_hi;
+  } T;
+  T t[] = {{0x20B9CC4F1A83E0C5, 0xA27E1B5F2F5BB18A, 0x1E86678B52F8E1FF,
+            0x706E51290AC76FB9},
+           {0x4414AED7883FFD18, 0x047D183A06B67016, 0x4EF258CF8D822870,
+            0x2686B73484C2E843},
+           {0xD38FF9D048884FFC, 0x6DC63A57C0943CA7, 0x8520CA2F3E97C426,
+            0xA9913868FB819C59}};
+
+  for (unsigned i = 0; i < arraysize(t); ++i) {
+    MacroAssembler assm(isolate, nullptr, 0,
+                        v8::internal::CodeObjectRequired::kYes);
+    CpuFeatureScope fscope(&assm, MIPS_SIMD);
+
+    load_elements_of_vector(assm, &t[i].ws_lo, w0, t0, t1);
+    load_elements_of_vector(assm, &t[i].wd_lo, w2, t0, t1);
+    __ move_v(w2, w0);
+    store_elements_of_vector(assm, w2, a0);
+
+    __ jr(ra);
+    __ nop();
+
+    CodeDesc desc;
+    assm.GetCode(isolate, &desc);
+    Handle<Code> code =
+        isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
+#ifdef OBJECT_PRINT
+    code->Print(std::cout);
+#endif
+    auto f = GeneratedCode<F3>::FromCode(*code);
+    f.Call(&t[i].wd_lo, 0, 0, 0, 0);
+    CHECK_EQ(t[i].ws_lo, t[i].wd_lo);
+    CHECK_EQ(t[i].ws_hi, t[i].wd_hi);
+  }
+}
+
+template <typename ExpectFunc, typename OperFunc>
+void run_msa_sldi(OperFunc GenerateOperation,
+                  ExpectFunc GenerateExpectedResult) {
+  Isolate* isolate = CcTest::i_isolate();
+  HandleScope scope(isolate);
+
+  typedef struct {
+    uint64_t ws_lo;
+    uint64_t ws_hi;
+    uint64_t wd_lo;
+    uint64_t wd_hi;
+  } T;
+  T t[] = {{0x20B9CC4F1A83E0C5, 0xA27E1B5F2F5BB18A, 0x1E86678B52F8E1FF,
+            0x706E51290AC76FB9},
+           {0x4414AED7883FFD18, 0x047D183A06B67016, 0x4EF258CF8D822870,
+            0x2686B73484C2E843},
+           {0xD38FF9D048884FFC, 0x6DC63A57C0943CA7, 0x8520CA2F3E97C426,
+            0xA9913868FB819C59}};
+  uint64_t res[2];
+
+  for (unsigned i = 0; i < arraysize(t); ++i) {
+    MacroAssembler assm(isolate, nullptr, 0,
+                        v8::internal::CodeObjectRequired::kYes);
+    CpuFeatureScope fscope(&assm, MIPS_SIMD);
+    load_elements_of_vector(assm, &t[i].ws_lo, w0, t0, t1);
+    load_elements_of_vector(assm, &t[i].wd_lo, w2, t0, t1);
+    GenerateOperation(assm);
+    store_elements_of_vector(assm, w2, a0);
+
+    __ jr(ra);
+    __ nop();
+
+    CodeDesc desc;
+    assm.GetCode(isolate, &desc);
+    Handle<Code> code =
+        isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
+#ifdef OBJECT_PRINT
+    code->Print(std::cout);
+#endif
+    auto f = GeneratedCode<F3>::FromCode(*code);
+    f.Call(&res[0], 0, 0, 0, 0);
+    GenerateExpectedResult(reinterpret_cast<uint8_t*>(&t[i].ws_lo),
+                           reinterpret_cast<uint8_t*>(&t[i].wd_lo));
+    CHECK_EQ(res[0], t[i].wd_lo);
+    CHECK_EQ(res[1], t[i].wd_hi);
+  }
+}
+
+TEST(MSA_sldi) {
+  if ((kArchVariant != kMips64r6) || !CpuFeatures::IsSupported(MIPS_SIMD))
+    return;
+  CcTest::InitializeVM();
+
+#define SLDI_DF(s, k)                \
+  uint8_t v[32];                     \
+  for (unsigned i = 0; i < s; i++) { \
+    v[i] = ws[s * k + i];            \
+    v[i + s] = wd[s * k + i];        \
+  }                                  \
+  for (unsigned i = 0; i < s; i++) { \
+    wd[s * k + i] = v[i + n];        \
+  }
+
+  for (int n = 0; n < 16; ++n) {
+    run_msa_sldi([n](MacroAssembler& assm) { __ sldi_b(w2, w0, n); },
+                 [n](uint8_t* ws, uint8_t* wd) {
+                   SLDI_DF(kMSARegSize / sizeof(int8_t) / kBitsPerByte, 0)
+                 });
+  }
+
+  for (int n = 0; n < 8; ++n) {
+    run_msa_sldi([n](MacroAssembler& assm) { __ sldi_h(w2, w0, n); },
+                 [n](uint8_t* ws, uint8_t* wd) {
+                   for (int k = 0; k < 2; ++k) {
+                     SLDI_DF(kMSARegSize / sizeof(int16_t) / kBitsPerByte, k)
+                   }
+                 });
+  }
+
+  for (int n = 0; n < 4; ++n) {
+    run_msa_sldi([n](MacroAssembler& assm) { __ sldi_w(w2, w0, n); },
+                 [n](uint8_t* ws, uint8_t* wd) {
+                   for (int k = 0; k < 4; ++k) {
+                     SLDI_DF(kMSARegSize / sizeof(int32_t) / kBitsPerByte, k)
+                   }
+                 });
+  }
+
+  for (int n = 0; n < 2; ++n) {
+    run_msa_sldi([n](MacroAssembler& assm) { __ sldi_d(w2, w0, n); },
+                 [n](uint8_t* ws, uint8_t* wd) {
+                   for (int k = 0; k < 8; ++k) {
+                     SLDI_DF(kMSARegSize / sizeof(int64_t) / kBitsPerByte, k)
+                   }
+                 });
+  }
+#undef SLDI_DF
+}
+
 TEST(MSA_cfc_ctc) {
   if ((kArchVariant != kMips64r6) || !CpuFeatures::IsSupported(MIPS_SIMD))
     return;
 
   CcTest::InitializeVM();
 
-  const uint64_t mask_without_cause = 0xffffffffff9c0fff;
-  const uint64_t mask_always_zero = 0x0167ffff;
-  const uint64_t mask_enables = 0x0000000000000f80;
-  uint64_t test_case[] = {0x30c6f6352d5ede31, 0xefc9fed507955425,
-                          0x64f2a3ff15b7dbe3, 0x6aa069352bf8bc37,
-                          0x7ea7ab2ae6aae923, 0xa10f5d4c24d0f68d,
-                          0x6dd14c9441afa84c, 0xc366373b2d6bf64f,
-                          0x6b35fb04925014bd, 0x9e3ea39a4dba7e61};
+  const uint64_t mask_without_cause = 0xFFFFFFFFFF9C0FFF;
+  const uint64_t mask_always_zero = 0x0167FFFF;
+  const uint64_t mask_enables = 0x0000000000000F80;
+  uint64_t test_case[] = {0x30C6F6352D5EDE31, 0xEFC9FED507955425,
+                          0x64F2A3FF15B7DBE3, 0x6AA069352BF8BC37,
+                          0x7EA7AB2AE6AAE923, 0xA10F5D4C24D0F68D,
+                          0x6DD14C9441AFA84C, 0xC366373B2D6BF64F,
+                          0x6B35FB04925014BD, 0x9E3EA39A4DBA7E61};
   for (unsigned i = 0; i < arraysize(test_case); i++) {
     // Setting enable bits and corresponding cause bits could result in
     // exception raised and this prevents that from happening
@@ -6984,11 +7294,12 @@
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
 
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
   CpuFeatureScope fscope(&assm, MIPS_SIMD);
   msa_reg_t res;
-  uint64_t wd_lo = 0xf35862e13e38f8b0;
-  uint64_t wd_hi = 0x4f41ffdef2bfe636;
+  uint64_t wd_lo = 0xF35862E13E38F8B0;
+  uint64_t wd_hi = 0x4F41FFDEF2BFE636;
 
 #define LOAD_W_REG(lo, hi, w_reg) \
   __ li(t0, lo);                  \
@@ -7036,7 +7347,7 @@
       UNREACHABLE();
   }
 
-  store_uint64_elements_of_vector(assm, w2, a0);
+  store_elements_of_vector(assm, w2, a0);
 
   __ jr(ra);
   __ nop();
@@ -7050,9 +7361,9 @@
 #ifdef OBJECT_PRINT
   code->Print(std::cout);
 #endif
-  F3 f = FUNCTION_CAST<F3>(code->entry());
+  auto f = GeneratedCode<F3>::FromCode(*code);
 
-  (CALL_GENERATED_CODE(isolate, f, &res, 0, 0, 0, 0));
+  f.Call(&res, 0, 0, 0, 0);
 
   uint64_t mask = i8 * 0x0101010101010101ull;
   switch (opcode) {
@@ -7087,13 +7398,13 @@
     case SHF_B: {
       struct ExpResShf exp_b[] = {
           //  i8,             exp_lo,             exp_hi
-          {0xffu, 0x11111111b9b9b9b9, 0xf7f7f7f7c8c8c8c8},
-          {0x0u, 0x62626262dfdfdfdf, 0xd6d6d6d6c8c8c8c8},
-          {0xe4u, 0xf35862e13e38f8b0, 0x4f41ffdef2bfe636},
-          {0x1bu, 0x1b756911c3d9a7b9, 0xae94a5f79c8aefc8},
-          {0xb1u, 0x662b6253e8c4df12, 0x0d3ad6803f8bc88b},
-          {0x4eu, 0x62e1f358f8b03e38, 0xffde4f41e636f2bf},
-          {0x27u, 0x1b697511c3a7d9b9, 0xaea594f79cef8ac8}};
+          {0xFFu, 0x11111111B9B9B9B9, 0xF7F7F7F7C8C8C8C8},
+          {0x0u, 0x62626262DFDFDFDF, 0xD6D6D6D6C8C8C8C8},
+          {0xE4u, 0xF35862E13E38F8B0, 0x4F41FFDEF2BFE636},
+          {0x1Bu, 0x1B756911C3D9A7B9, 0xAE94A5F79C8AEFC8},
+          {0xB1u, 0x662B6253E8C4DF12, 0x0D3AD6803F8BC88B},
+          {0x4Eu, 0x62E1F358F8B03E38, 0xFFDE4F41E636F2BF},
+          {0x27u, 0x1B697511C3A7D9B9, 0xAEA594F79CEF8AC8}};
       for (size_t i = 0; i < sizeof(exp_b) / sizeof(ExpResShf); ++i) {
         if (exp_b[i].i8 == i8) {
           CHECK_EQ(exp_b[i].lo, res.d[0]);
@@ -7104,13 +7415,13 @@
     case SHF_H: {
       struct ExpResShf exp_h[] = {
           //  i8,             exp_lo,             exp_hi
-          {0xffu, 0x1169116911691169, 0xf7a5f7a5f7a5f7a5},
-          {0x0u, 0x12df12df12df12df, 0x8bc88bc88bc88bc8},
-          {0xe4u, 0xf35862e13e38f8b0, 0x4f41ffdef2bfe636},
-          {0x1bu, 0xd9c3b9a7751b1169, 0x8a9cc8ef94aef7a5},
-          {0xb1u, 0x53622b6612dfc4e8, 0x80d63a0d8bc88b3f},
-          {0x4eu, 0x3e38f8b0f35862e1, 0xf2bfe6364f41ffde},
-          {0x27u, 0xd9c3751bb9a71169, 0x8a9c94aec8eff7a5}};
+          {0xFFu, 0x1169116911691169, 0xF7A5F7A5F7A5F7A5},
+          {0x0u, 0x12DF12DF12DF12DF, 0x8BC88BC88BC88BC8},
+          {0xE4u, 0xF35862E13E38F8B0, 0x4F41FFDEF2BFE636},
+          {0x1Bu, 0xD9C3B9A7751B1169, 0x8A9CC8EF94AEF7A5},
+          {0xB1u, 0x53622B6612DFC4E8, 0x80D63A0D8BC88B3F},
+          {0x4Eu, 0x3E38F8B0F35862E1, 0xF2BFE6364F41FFDE},
+          {0x27u, 0xD9C3751BB9A71169, 0x8A9C94AEC8EFF7A5}};
       for (size_t i = 0; i < sizeof(exp_h) / sizeof(ExpResShf); ++i) {
         if (exp_h[i].i8 == i8) {
           CHECK_EQ(exp_h[i].lo, res.d[0]);
@@ -7121,13 +7432,13 @@
     case SHF_W: {
       struct ExpResShf exp_w[] = {
           //  i8,             exp_lo,             exp_hi
-          {0xffu, 0xf7a594aef7a594ae, 0xf7a594aef7a594ae},
-          {0x0u, 0xc4e812dfc4e812df, 0xc4e812dfc4e812df},
-          {0xe4u, 0xf35862e13e38f8b0, 0x4f41ffdef2bfe636},
-          {0x1bu, 0xc8ef8a9cf7a594ae, 0xb9a7d9c31169751b},
-          {0xb1u, 0xc4e812df2b665362, 0x8b3f8bc83a0d80d6},
-          {0x4eu, 0x4f41ffdef2bfe636, 0xf35862e13e38f8b0},
-          {0x27u, 0x1169751bf7a594ae, 0xb9a7d9c3c8ef8a9c}};
+          {0xFFu, 0xF7A594AEF7A594AE, 0xF7A594AEF7A594AE},
+          {0x0u, 0xC4E812DFC4E812DF, 0xC4E812DFC4E812DF},
+          {0xE4u, 0xF35862E13E38F8B0, 0x4F41FFDEF2BFE636},
+          {0x1Bu, 0xC8EF8A9CF7A594AE, 0xB9A7D9C31169751B},
+          {0xB1u, 0xC4E812DF2B665362, 0x8B3F8BC83A0D80D6},
+          {0x4Eu, 0x4F41FFDEF2BFE636, 0xF35862E13E38F8B0},
+          {0x27u, 0x1169751BF7A594AE, 0xB9A7D9C3C8EF8A9C}};
       for (size_t i = 0; i < sizeof(exp_w) / sizeof(ExpResShf); ++i) {
         if (exp_w[i].i8 == i8) {
           CHECK_EQ(exp_w[i].lo, res.d[0]);
@@ -7152,11 +7463,15 @@
 
   CcTest::InitializeVM();
 
-  struct TestCaseMsaI8 tc[] = {//         input_lo,           input_hi,    i8
-                               {0x1169751bb9a7d9c3, 0xf7a594aec8ef8a9c, 0xffu},
-                               {0x2b665362c4e812df, 0x3a0d80d68b3f8bc8, 0x0u},
-                               {0x1169751bb9a7d9c3, 0xf7a594aec8ef8a9c, 0x3bu},
-                               {0x2b665362c4e812df, 0x3a0d80d68b3f8bc8, 0xd9u}};
+  // clang-format off
+  struct TestCaseMsaI8 tc[] = {
+    //         input_lo,           input_hi,    i8
+    {0x1169751BB9A7D9C3, 0xF7A594AEC8EF8A9C, 0xFFu},
+    {0x2B665362C4E812DF, 0x3A0D80D68B3F8BC8, 0x0u},
+    {0x1169751BB9A7D9C3, 0xF7A594AEC8EF8A9C, 0x3Bu},
+    {0x2B665362C4E812DF, 0x3A0D80D68B3F8BC8, 0xD9u}
+  };
+  // clang-format on
 
   for (size_t i = 0; i < sizeof(tc) / sizeof(TestCaseMsaI8); ++i) {
     run_msa_i8(ANDI_B, tc[i].input_lo, tc[i].input_hi, tc[i].i8);
@@ -7172,11 +7487,15 @@
 
   CcTest::InitializeVM();
 
-  struct TestCaseMsaI8 tc[] = {//         input_lo,           input_hi,    i8
-                               {0x1169751bb9a7d9c3, 0xf7a594aec8ef8a9c, 0xffu},
-                               {0x2b665362c4e812df, 0x3a0d80d68b3f8bc8, 0x0u},
-                               {0x1169751bb9a7d9c3, 0xf7a594aec8ef8a9c, 0x3bu},
-                               {0x2b665362c4e812df, 0x3a0d80d68b3f8bc8, 0xd9u}};
+  // clang-format off
+  struct TestCaseMsaI8 tc[] = {
+    //         input_lo,           input_hi,    i8
+    {0x1169751BB9A7D9C3, 0xF7A594AEC8EF8A9C, 0xFFu},
+    {0x2B665362C4E812DF, 0x3A0D80D68B3F8BC8, 0x0u},
+    {0x1169751BB9A7D9C3, 0xF7A594AEC8EF8A9C, 0x3Bu},
+    {0x2B665362C4E812DF, 0x3A0D80D68B3F8BC8, 0xD9u}
+  };
+  // clang-format on
 
   for (size_t i = 0; i < sizeof(tc) / sizeof(TestCaseMsaI8); ++i) {
     run_msa_i8(BMNZI_B, tc[i].input_lo, tc[i].input_hi, tc[i].i8);
@@ -7191,16 +7510,18 @@
 
   CcTest::InitializeVM();
 
+  // clang-format off
   struct TestCaseMsaI8 tc[] = {
       //          input_lo,           input_hi,    i8
-      {0x1169751bb9a7d9c3, 0xf7a594aec8ef8a9c, 0xffu},  // 3333
-      {0x2b665362c4e812df, 0x3a0d80d68b3f8bc8, 0x0u},   // 0000
-      {0xf35862e13e38f8b0, 0x4f41ffdef2bfe636, 0xe4u},  // 3210
-      {0x1169751bb9a7d9c3, 0xf7a594aec8ef8a9c, 0x1bu},  // 0123
-      {0x2b665362c4e812df, 0x3a0d80d68b3f8bc8, 0xb1u},  // 2301
-      {0xf35862e13e38f8b0, 0x4f41ffdef2bfe636, 0x4eu},  // 1032
-      {0x1169751bb9a7d9c3, 0xf7a594aec8ef8a9c, 0x27u}   // 0213
+      {0x1169751BB9A7D9C3, 0xF7A594AEC8EF8A9C, 0xFFu},  // 3333
+      {0x2B665362C4E812DF, 0x3A0D80D68B3F8BC8, 0x0u},   // 0000
+      {0xF35862E13E38F8B0, 0x4F41FFDEF2BFE636, 0xE4u},  // 3210
+      {0x1169751BB9A7D9C3, 0xF7A594AEC8EF8A9C, 0x1Bu},  // 0123
+      {0x2B665362C4E812DF, 0x3A0D80D68B3F8BC8, 0xB1u},  // 2301
+      {0xF35862E13E38F8B0, 0x4F41FFDEF2BFE636, 0x4Eu},  // 1032
+      {0x1169751BB9A7D9C3, 0xF7A594AEC8EF8A9C, 0x27u}   // 0213
   };
+  // clang-format on
 
   for (size_t i = 0; i < sizeof(tc) / sizeof(TestCaseMsaI8); ++i) {
     run_msa_i8(SHF_B, tc[i].input_lo, tc[i].input_hi, tc[i].i8);
@@ -7222,17 +7543,18 @@
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
 
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
   CpuFeatureScope fscope(&assm, MIPS_SIMD);
   msa_reg_t res;
   int32_t i5 =
       i5_sign_ext ? static_cast<int32_t>(input->i5 << 27) >> 27 : input->i5;
 
-  load_uint64_elements_of_vector(assm, &(input->ws_lo), w0, t0, t1);
+  load_elements_of_vector(assm, &(input->ws_lo), w0, t0, t1);
 
   GenerateI5InstructionFunc(assm, i5);
 
-  store_uint64_elements_of_vector(assm, w2, a0);
+  store_elements_of_vector(assm, w2, a0);
 
   __ jr(ra);
   __ nop();
@@ -7244,9 +7566,9 @@
 #ifdef OBJECT_PRINT
   code->Print(std::cout);
 #endif
-  F3 f = FUNCTION_CAST<F3>(code->entry());
+  auto f = GeneratedCode<F3>::FromCode(*code);
 
-  (CALL_GENERATED_CODE(isolate, f, &res, 0, 0, 0, 0));
+  f.Call(&res, 0, 0, 0, 0);
 
   CHECK_EQ(GenerateOperationFunc(input->ws_lo, input->i5), res.d[0]);
   CHECK_EQ(GenerateOperationFunc(input->ws_hi, input->i5), res.d[1]);
@@ -7258,14 +7580,17 @@
 
   CcTest::InitializeVM();
 
+  // clang-format off
   struct TestCaseMsaI5 tc[] = {
-      //             ws_lo,              ws_hi,         i5
-      {0x1169751bb9a7d9c3, 0xf7a594aec8ef8a9c, 0x0000001f},
-      {0x2b665362c4e812df, 0x3a0d80d68b3f8bc8, 0x0000000f},
-      {0x1169751bb9a7d9c3, 0xf7a594aec8ef8a9c, 0x00000005},
-      {0x2b665362c4e812df, 0x3a0d80d68b3f8bc8, 0x00000010},
-      {0xffab807f807fffcd, 0x7f23ff80ff567f80, 0x0000000f},
-      {0x80ffefff7f12807f, 0x807f80ff7fdeff78, 0x00000010}};
+    //            ws_lo,              ws_hi,         i5
+    {0x1169751BB9A7D9C3, 0xF7A594AEC8EF8A9C, 0x0000001F},
+    {0x2B665362C4E812DF, 0x3A0D80D68B3F8BC8, 0x0000000F},
+    {0x1169751BB9A7D9C3, 0xF7A594AEC8EF8A9C, 0x00000005},
+    {0x2B665362C4E812DF, 0x3A0D80D68B3F8BC8, 0x00000010},
+    {0xFFAB807F807FFFCD, 0x7F23FF80FF567F80, 0x0000000F},
+    {0x80FFEFFF7F12807F, 0x807F80FF7FDEFF78, 0x00000010}
+  };
+// clang-format on
 
 #define ADDVI_DF(lanes, mask)                               \
   uint64_t res = 0;                                         \
@@ -7334,23 +7659,26 @@
 
   CcTest::InitializeVM();
 
+  // clang-format off
   struct TestCaseMsaI5 tc[] = {
-      // ws_lo, ws_hi, i5
-      {0x7f80ff3480ff7f00, 0x8d7fff80ff7f6780, 0x0000001f},
-      {0x7f80ff3480ff7f00, 0x8d7fff80ff7f6780, 0x0000000f},
-      {0x7f80ff3480ff7f00, 0x8d7fff80ff7f6780, 0x00000010},
-      {0x80007fff91daffff, 0x7fff8000ffff5678, 0x0000001f},
-      {0x80007fff91daffff, 0x7fff8000ffff5678, 0x0000000f},
-      {0x80007fff91daffff, 0x7fff8000ffff5678, 0x00000010},
-      {0x7fffffff80000000, 0x12345678ffffffff, 0x0000001f},
-      {0x7fffffff80000000, 0x12345678ffffffff, 0x0000000f},
-      {0x7fffffff80000000, 0x12345678ffffffff, 0x00000010},
-      {0x1169751bb9a7d9c3, 0xf7a594aec8ef8a9c, 0x0000001f},
-      {0x2b665362c4e812df, 0x3a0d80d68b3f8bc8, 0x0000000f},
-      {0xf35862e13e38f8b0, 0x4f41ffdef2bfe636, 0x00000010},
-      {0x1169751bb9a7d9c3, 0xf7a594aec8ef8a9c, 0x00000015},
-      {0x2b665362c4e812df, 0x3a0d80d68b3f8bc8, 0x00000009},
-      {0xf35862e13e38f8b0, 0x4f41ffdef2bfe636, 0x00000003}};
+    //            ws_lo,              ws_hi,         i5
+    {0x7F80FF3480FF7F00, 0x8D7FFF80FF7F6780, 0x0000001F},
+    {0x7F80FF3480FF7F00, 0x8D7FFF80FF7F6780, 0x0000000F},
+    {0x7F80FF3480FF7F00, 0x8D7FFF80FF7F6780, 0x00000010},
+    {0x80007FFF91DAFFFF, 0x7FFF8000FFFF5678, 0x0000001F},
+    {0x80007FFF91DAFFFF, 0x7FFF8000FFFF5678, 0x0000000F},
+    {0x80007FFF91DAFFFF, 0x7FFF8000FFFF5678, 0x00000010},
+    {0x7FFFFFFF80000000, 0x12345678FFFFFFFF, 0x0000001F},
+    {0x7FFFFFFF80000000, 0x12345678FFFFFFFF, 0x0000000F},
+    {0x7FFFFFFF80000000, 0x12345678FFFFFFFF, 0x00000010},
+    {0x1169751BB9A7D9C3, 0xF7A594AEC8EF8A9C, 0x0000001F},
+    {0x2B665362C4E812DF, 0x3A0D80D68B3F8BC8, 0x0000000F},
+    {0xF35862E13E38F8B0, 0x4F41FFDEF2BFE636, 0x00000010},
+    {0x1169751BB9A7D9C3, 0xF7A594AEC8EF8A9C, 0x00000015},
+    {0x2B665362C4E812DF, 0x3A0D80D68B3F8BC8, 0x00000009},
+    {0xF35862E13E38F8B0, 0x4F41FFDEF2BFE636, 0x00000003}
+  };
+// clang-format on
 
 #define MAXI_MINI_S_DF(lanes, mask, func)                                     \
   [](uint64_t ws, uint32_t ui5) {                                             \
@@ -7471,18 +7799,18 @@
   CcTest::InitializeVM();
 
   struct TestCaseMsaI5 tc[] = {
-      {0xff69751bb9a7d9c3, 0xf7a594aec8ff8a9c, 0x0000001f},
-      {0xe669ffffb9a7d9c3, 0xf7a594aeffff8a9c, 0x0000001f},
-      {0xffffffffb9a7d9c3, 0xf7a594aeffffffff, 0x0000001f},
-      {0x2b0b5362c4e812df, 0x3a0d80d68b3f0bc8, 0x0000000b},
-      {0x2b66000bc4e812df, 0x3a0d000b8b3f8bc8, 0x0000000b},
-      {0x0000000bc4e812df, 0x3a0d80d60000000b, 0x0000000b},
-      {0xf38062e13e38f8b0, 0x8041ffdef2bfe636, 0x00000010},
-      {0xf35880003e38f8b0, 0x4f41ffdef2bf8000, 0x00000010},
-      {0xf35862e180000000, 0x80000000f2bfe636, 0x00000010},
-      {0x1169751bb9a7d9c3, 0xf7a594aec8ef8a9c, 0x00000015},
-      {0x2b665362c4e812df, 0x3a0d80d68b3f8bc8, 0x00000009},
-      {0xf30062e13e38f800, 0x4f00ffdef2bf0036, 0x00000000}};
+      {0xFF69751BB9A7D9C3, 0xF7A594AEC8FF8A9C, 0x0000001F},
+      {0xE669FFFFB9A7D9C3, 0xF7A594AEFFFF8A9C, 0x0000001F},
+      {0xFFFFFFFFB9A7D9C3, 0xF7A594AEFFFFFFFF, 0x0000001F},
+      {0x2B0B5362C4E812DF, 0x3A0D80D68B3F0BC8, 0x0000000B},
+      {0x2B66000BC4E812DF, 0x3A0D000B8B3F8BC8, 0x0000000B},
+      {0x0000000BC4E812DF, 0x3A0D80D60000000B, 0x0000000B},
+      {0xF38062E13E38F8B0, 0x8041FFDEF2BFE636, 0x00000010},
+      {0xF35880003E38F8B0, 0x4F41FFDEF2BF8000, 0x00000010},
+      {0xF35862E180000000, 0x80000000F2BFE636, 0x00000010},
+      {0x1169751BB9A7D9C3, 0xF7A594AEC8EF8A9C, 0x00000015},
+      {0x2B665362C4E812DF, 0x3A0D80D68B3F8BC8, 0x00000009},
+      {0xF30062E13E38F800, 0x4F00FFDEF2BF0036, 0x00000000}};
 
 #define CEQI_CLTI_CLEI_S_DF(lanes, mask, func)                                \
   [](uint64_t ws, uint32_t ui5) {                                             \
@@ -7639,15 +7967,14 @@
   uint64_t exp_res_hi;
 };
 
-template <typename Func, typename FuncLoad, typename FuncStore>
+template <typename Func>
 void run_msa_2r(const struct TestCaseMsa2R* input,
-                Func Generate2RInstructionFunc,
-                FuncLoad load_elements_of_vector,
-                FuncStore store_elements_of_vector) {
+                Func Generate2RInstructionFunc) {
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
 
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
   CpuFeatureScope fscope(&assm, MIPS_SIMD);
   msa_reg_t res;
 
@@ -7666,21 +7993,12 @@
 #ifdef OBJECT_PRINT
   code->Print(std::cout);
 #endif
-  F3 f = FUNCTION_CAST<F3>(code->entry());
+  auto f = GeneratedCode<F3>::FromCode(*code);
 
-  (CALL_GENERATED_CODE(isolate, f, &res, 0, 0, 0, 0));
+  f.Call(&res, 0, 0, 0, 0);
 
-  if (store_elements_of_vector == store_uint64_elements_of_vector) {
-    CHECK_EQ(input->exp_res_lo, res.d[0]);
-    CHECK_EQ(input->exp_res_hi, res.d[1]);
-  } else if (store_elements_of_vector == store_uint32_elements_of_vector) {
-    const uint32_t* exp_res =
-        reinterpret_cast<const uint32_t*>(&input->exp_res_lo);
-    CHECK_EQ(exp_res[0], res.w[0]);
-    CHECK_EQ(exp_res[1], res.w[1]);
-    CHECK_EQ(exp_res[2], res.w[2]);
-    CHECK_EQ(exp_res[3], res.w[3]);
-  }
+  CHECK_EQ(input->exp_res_lo, res.d[0]);
+  CHECK_EQ(input->exp_res_hi, res.d[1]);
 }
 
 TEST(MSA_pcnt) {
@@ -7691,54 +8009,50 @@
 
   struct TestCaseMsa2R tc_b[] = {// ws_lo, ws_hi, exp_res_lo, exp_res_hi
                                  {0x0000000000000000, 0x0000000000000000, 0, 0},
-                                 {0xffffffffffffffff, 0xffffffffffffffff,
+                                 {0xFFFFFFFFFFFFFFFF, 0xFFFFFFFFFFFFFFFF,
                                   0x0808080808080808, 0x0808080808080808},
-                                 {0x1169751bb9a7d9c3, 0xf7a594aec8ef8a9c,
+                                 {0x1169751BB9A7D9C3, 0xF7A594AEC8EF8A9C,
                                   0x0204050405050504, 0x0704030503070304},
-                                 {0x2b665362c4e812df, 0x3a0d80d68b3f8bc8,
+                                 {0x2B665362C4E812DF, 0x3A0D80D68B3F8BC8,
                                   0x0404040303040207, 0x0403010504060403},
-                                 {0xf35862e13e38f8b0, 0x4f41ffdef2bfe636,
+                                 {0xF35862E13E38F8B0, 0x4F41FFDEF2BFE636,
                                   0x0603030405030503, 0x0502080605070504}};
 
   struct TestCaseMsa2R tc_h[] = {// ws_lo, ws_hi, exp_res_lo, exp_res_hi
                                  {0x0000000000000000, 0x0000000000000000, 0, 0},
-                                 {0xffffffffffffffff, 0xffffffffffffffff,
+                                 {0xFFFFFFFFFFFFFFFF, 0xFFFFFFFFFFFFFFFF,
                                   0x0010001000100010, 0x0010001000100010},
-                                 {0x1169751bb9a7d9c3, 0xf7a594aec8ef8a9c,
-                                  0x00060009000a0009, 0x000b0008000a0007},
-                                 {0x2b665362c4e812df, 0x3a0d80d68b3f8bc8,
-                                  0x0008000700070009, 0x00070006000a0007},
-                                 {0xf35862e13e38f8b0, 0x4f41ffdef2bfe636,
-                                  0x0009000700080008, 0x0007000e000c0009}};
+                                 {0x1169751BB9A7D9C3, 0xF7A594AEC8EF8A9C,
+                                  0x00060009000A0009, 0x000B0008000A0007},
+                                 {0x2B665362C4E812DF, 0x3A0D80D68B3F8BC8,
+                                  0x0008000700070009, 0x00070006000A0007},
+                                 {0xF35862E13E38F8B0, 0x4F41FFDEF2BFE636,
+                                  0x0009000700080008, 0x0007000E000C0009}};
 
   struct TestCaseMsa2R tc_w[] = {// ws_lo, ws_hi, exp_res_lo, exp_res_hi
                                  {0x0000000000000000, 0x0000000000000000, 0, 0},
-                                 {0xffffffffffffffff, 0xffffffffffffffff,
+                                 {0xFFFFFFFFFFFFFFFF, 0xFFFFFFFFFFFFFFFF,
                                   0x0000002000000020, 0x0000002000000020},
-                                 {0x1169751bb9a7d9c3, 0xf7a594aec8ef8a9c,
-                                  0x0000000f00000013, 0x0000001300000011},
-                                 {0x2b665362c4e812df, 0x3a0d80d68b3f8bc8,
-                                  0x0000000f00000010, 0x0000000d00000011},
-                                 {0xf35862e13e38f8b0, 0x4f41ffdef2bfe636,
+                                 {0x1169751BB9A7D9C3, 0xF7A594AEC8EF8A9C,
+                                  0x0000000F00000013, 0x0000001300000011},
+                                 {0x2B665362C4E812DF, 0x3A0D80D68B3F8BC8,
+                                  0x0000000F00000010, 0x0000000D00000011},
+                                 {0xF35862E13E38F8B0, 0x4F41FFDEF2BFE636,
                                   0x0000001000000010, 0x0000001500000015}};
 
   struct TestCaseMsa2R tc_d[] = {
       // ws_lo, ws_hi, exp_res_lo, exp_res_hi
       {0x0000000000000000, 0x0000000000000000, 0, 0},
-      {0xffffffffffffffff, 0xffffffffffffffff, 0x40, 0x40},
-      {0x1169751bb9a7d9c3, 0xf7a594aec8ef8a9c, 0x22, 0x24},
-      {0x2b665362c4e812df, 0x3a0d80d68b3f8bc8, 0x1f, 0x1e},
-      {0xf35862e13e38f8b0, 0x4f41ffdef2bfe636, 0x20, 0x2a}};
+      {0xFFFFFFFFFFFFFFFF, 0xFFFFFFFFFFFFFFFF, 0x40, 0x40},
+      {0x1169751BB9A7D9C3, 0xF7A594AEC8EF8A9C, 0x22, 0x24},
+      {0x2B665362C4E812DF, 0x3A0D80D68B3F8BC8, 0x1F, 0x1E},
+      {0xF35862E13E38F8B0, 0x4F41FFDEF2BFE636, 0x20, 0x2A}};
 
   for (size_t i = 0; i < sizeof(tc_b) / sizeof(TestCaseMsa2R); ++i) {
-    run_msa_2r(&tc_b[i], [](MacroAssembler& assm) { __ pcnt_b(w2, w0); },
-               load_uint64_elements_of_vector, store_uint64_elements_of_vector);
-    run_msa_2r(&tc_h[i], [](MacroAssembler& assm) { __ pcnt_h(w2, w0); },
-               load_uint64_elements_of_vector, store_uint64_elements_of_vector);
-    run_msa_2r(&tc_w[i], [](MacroAssembler& assm) { __ pcnt_w(w2, w0); },
-               load_uint64_elements_of_vector, store_uint64_elements_of_vector);
-    run_msa_2r(&tc_d[i], [](MacroAssembler& assm) { __ pcnt_d(w2, w0); },
-               load_uint64_elements_of_vector, store_uint64_elements_of_vector);
+    run_msa_2r(&tc_b[i], [](MacroAssembler& assm) { __ pcnt_b(w2, w0); });
+    run_msa_2r(&tc_h[i], [](MacroAssembler& assm) { __ pcnt_h(w2, w0); });
+    run_msa_2r(&tc_w[i], [](MacroAssembler& assm) { __ pcnt_w(w2, w0); });
+    run_msa_2r(&tc_d[i], [](MacroAssembler& assm) { __ pcnt_d(w2, w0); });
   }
 }
 
@@ -7751,53 +8065,49 @@
   struct TestCaseMsa2R tc_b[] = {// ws_lo, ws_hi, exp_res_lo, exp_res_hi
                                  {0x0000000000000000, 0x0000000000000000,
                                   0x0808080808080808, 0x0808080808080808},
-                                 {0xffffffffffffffff, 0xffffffffffffffff, 0, 0},
-                                 {0x1169350b07030100, 0x7f011402381f0a6c,
+                                 {0xFFFFFFFFFFFFFFFF, 0xFFFFFFFFFFFFFFFF, 0, 0},
+                                 {0x1169350B07030100, 0x7F011402381F0A6C,
                                   0x0301020405060708, 0x0107030602030401},
-                                 {0x010806003478121f, 0x03013016073f7b08,
+                                 {0x010806003478121F, 0x03013016073F7B08,
                                   0x0704050802010303, 0x0607020305020104},
-                                 {0x0168321100083803, 0x07113f03013f1676,
+                                 {0x0168321100083803, 0x07113F03013F1676,
                                   0x0701020308040206, 0x0503020607020301}};
 
   struct TestCaseMsa2R tc_h[] = {// ws_lo, ws_hi, exp_res_lo, exp_res_hi
                                  {0x0000000000000000, 0x0000000000000000,
                                   0x0010001000100010, 0x0010001000100010},
-                                 {0xffffffffffffffff, 0xffffffffffffffff, 0, 0},
-                                 {0x00010007000a003c, 0x37a5001e00010002,
-                                  0x000f000d000c000a, 0x0002000b000f000e},
-                                 {0x0026066200780edf, 0x003d0003000f00c8,
-                                  0x000a000500090004, 0x000a000e000c0008},
-                                 {0x335807e100480030, 0x01410fde12bf5636,
-                                  0x000200050009000a, 0x0007000400030001}};
+                                 {0xFFFFFFFFFFFFFFFF, 0xFFFFFFFFFFFFFFFF, 0, 0},
+                                 {0x00010007000A003C, 0x37A5001E00010002,
+                                  0x000F000D000C000A, 0x0002000B000F000E},
+                                 {0x0026066200780EDF, 0x003D0003000F00C8,
+                                  0x000A000500090004, 0x000A000E000C0008},
+                                 {0x335807E100480030, 0x01410FDE12BF5636,
+                                  0x000200050009000A, 0x0007000400030001}};
 
   struct TestCaseMsa2R tc_w[] = {// ws_lo, ws_hi, exp_res_lo, exp_res_hi
                                  {0x0000000000000000, 0x0000000000000000,
                                   0x0000002000000020, 0x0000002000000020},
-                                 {0xffffffffffffffff, 0xffffffffffffffff, 0, 0},
-                                 {0x00000005000007c3, 0x000014ae00006a9c,
-                                  0x0000001d00000015, 0x0000001300000011},
-                                 {0x00009362000112df, 0x000380d6003f8bc8,
-                                  0x000000100000000f, 0x0000000e0000000a},
-                                 {0x135862e17e38f8b0, 0x0061ffde03bfe636,
+                                 {0xFFFFFFFFFFFFFFFF, 0xFFFFFFFFFFFFFFFF, 0, 0},
+                                 {0x00000005000007C3, 0x000014AE00006A9C,
+                                  0x0000001D00000015, 0x0000001300000011},
+                                 {0x00009362000112DF, 0x000380D6003F8BC8,
+                                  0x000000100000000F, 0x0000000E0000000A},
+                                 {0x135862E17E38F8B0, 0x0061FFDE03BFE636,
                                   0x0000000300000001, 0x0000000900000006}};
 
   struct TestCaseMsa2R tc_d[] = {
       // ws_lo, ws_hi, exp_res_lo, exp_res_hi
       {0x0000000000000000, 0x0000000000000000, 0x40, 0x40},
-      {0xffffffffffffffff, 0xffffffffffffffff, 0, 0},
-      {0x000000000000014e, 0x00000000000176da, 0x37, 0x2f},
-      {0x00000062c4e812df, 0x000065d68b3f8bc8, 0x19, 0x11},
-      {0x00000000e338f8b0, 0x0754534acab32654, 0x20, 0x5}};
+      {0xFFFFFFFFFFFFFFFF, 0xFFFFFFFFFFFFFFFF, 0, 0},
+      {0x000000000000014E, 0x00000000000176DA, 0x37, 0x2F},
+      {0x00000062C4E812DF, 0x000065D68B3F8BC8, 0x19, 0x11},
+      {0x00000000E338F8B0, 0x0754534ACAB32654, 0x20, 0x5}};
 
   for (size_t i = 0; i < sizeof(tc_b) / sizeof(TestCaseMsa2R); ++i) {
-    run_msa_2r(&tc_b[i], [](MacroAssembler& assm) { __ nlzc_b(w2, w0); },
-               load_uint64_elements_of_vector, store_uint64_elements_of_vector);
-    run_msa_2r(&tc_h[i], [](MacroAssembler& assm) { __ nlzc_h(w2, w0); },
-               load_uint64_elements_of_vector, store_uint64_elements_of_vector);
-    run_msa_2r(&tc_w[i], [](MacroAssembler& assm) { __ nlzc_w(w2, w0); },
-               load_uint64_elements_of_vector, store_uint64_elements_of_vector);
-    run_msa_2r(&tc_d[i], [](MacroAssembler& assm) { __ nlzc_d(w2, w0); },
-               load_uint64_elements_of_vector, store_uint64_elements_of_vector);
+    run_msa_2r(&tc_b[i], [](MacroAssembler& assm) { __ nlzc_b(w2, w0); });
+    run_msa_2r(&tc_h[i], [](MacroAssembler& assm) { __ nlzc_h(w2, w0); });
+    run_msa_2r(&tc_w[i], [](MacroAssembler& assm) { __ nlzc_w(w2, w0); });
+    run_msa_2r(&tc_d[i], [](MacroAssembler& assm) { __ nlzc_d(w2, w0); });
   }
 }
 
@@ -7808,7 +8118,7 @@
   CcTest::InitializeVM();
 
   struct TestCaseMsa2R tc_b[] = {// ws_lo, ws_hi, exp_res_lo, exp_res_hi
-                                 {0xffffffffffffffff, 0xffffffffffffffff,
+                                 {0xFFFFFFFFFFFFFFFF, 0xFFFFFFFFFFFFFFFF,
                                   0x0808080808080808, 0x0808080808080808},
                                  {0x0000000000000000, 0x0000000000000000, 0, 0},
                                  {0xEE96CAF4F8FCFEFF, 0x80FEEBFDC7E0F593,
@@ -7819,44 +8129,40 @@
                                   0x0701020308040206, 0x0503020607020301}};
 
   struct TestCaseMsa2R tc_h[] = {// ws_lo, ws_hi, exp_res_lo, exp_res_hi
-                                 {0xffffffffffffffff, 0xffffffffffffffff,
+                                 {0xFFFFFFFFFFFFFFFF, 0xFFFFFFFFFFFFFFFF,
                                   0x0010001000100010, 0x0010001000100010},
                                  {0x0000000000000000, 0x0000000000000000, 0, 0},
                                  {0xFFFEFFF8FFF5FFC3, 0xC85AFFE1FFFEFFFD,
-                                  0x000f000d000c000a, 0x0002000b000f000e},
+                                  0x000F000D000C000A, 0x0002000B000F000E},
                                  {0xFFD9F99DFF87F120, 0xFFC2FFFCFFF0FF37,
-                                  0x000a000500090004, 0x000a000e000c0008},
+                                  0x000A000500090004, 0x000A000E000C0008},
                                  {0xCCA7F81EFFB7FFCF, 0xFEBEF021ED40A9C9,
-                                  0x000200050009000a, 0x0007000400030001}};
+                                  0x000200050009000A, 0x0007000400030001}};
 
   struct TestCaseMsa2R tc_w[] = {// ws_lo, ws_hi, exp_res_lo, exp_res_hi
-                                 {0xffffffffffffffff, 0xffffffffffffffff,
+                                 {0xFFFFFFFFFFFFFFFF, 0xFFFFFFFFFFFFFFFF,
                                   0x0000002000000020, 0x0000002000000020},
                                  {0x0000000000000000, 0x0000000000000000, 0, 0},
                                  {0xFFFFFFFAFFFFF83C, 0xFFFFEB51FFFF9563,
-                                  0x0000001d00000015, 0x0000001300000011},
+                                  0x0000001D00000015, 0x0000001300000011},
                                  {0xFFFF6C9DFFFEED20, 0xFFFC7F29FFC07437,
-                                  0x000000100000000f, 0x0000000e0000000a},
+                                  0x000000100000000F, 0x0000000E0000000A},
                                  {0xECA79D1E81C7074F, 0xFF9E0021FC4019C9,
                                   0x0000000300000001, 0x0000000900000006}};
 
   struct TestCaseMsa2R tc_d[] = {
       // ws_lo, ws_hi, exp_res_lo, exp_res_hi
-      {0xffffffffffffffff, 0xffffffffffffffff, 0x40, 0x40},
+      {0xFFFFFFFFFFFFFFFF, 0xFFFFFFFFFFFFFFFF, 0x40, 0x40},
       {0x0000000000000000, 0x0000000000000000, 0, 0},
-      {0xFFFFFFFFFFFFFEB1, 0xFFFFFFFFFFFE8925, 0x37, 0x2f},
+      {0xFFFFFFFFFFFFFEB1, 0xFFFFFFFFFFFE8925, 0x37, 0x2F},
       {0xFFFFFF9D3B17ED20, 0xFFFF9A2974C07437, 0x19, 0x11},
       {0xFFFFFFFF1CC7074F, 0xF8ABACB5354CD9AB, 0x20, 0x5}};
 
   for (size_t i = 0; i < sizeof(tc_b) / sizeof(TestCaseMsa2R); ++i) {
-    run_msa_2r(&tc_b[i], [](MacroAssembler& assm) { __ nloc_b(w2, w0); },
-               load_uint64_elements_of_vector, store_uint64_elements_of_vector);
-    run_msa_2r(&tc_h[i], [](MacroAssembler& assm) { __ nloc_h(w2, w0); },
-               load_uint64_elements_of_vector, store_uint64_elements_of_vector);
-    run_msa_2r(&tc_w[i], [](MacroAssembler& assm) { __ nloc_w(w2, w0); },
-               load_uint64_elements_of_vector, store_uint64_elements_of_vector);
-    run_msa_2r(&tc_d[i], [](MacroAssembler& assm) { __ nloc_d(w2, w0); },
-               load_uint64_elements_of_vector, store_uint64_elements_of_vector);
+    run_msa_2r(&tc_b[i], [](MacroAssembler& assm) { __ nloc_b(w2, w0); });
+    run_msa_2r(&tc_h[i], [](MacroAssembler& assm) { __ nloc_h(w2, w0); });
+    run_msa_2r(&tc_w[i], [](MacroAssembler& assm) { __ nloc_w(w2, w0); });
+    run_msa_2r(&tc_d[i], [](MacroAssembler& assm) { __ nloc_d(w2, w0); });
   }
 }
 
@@ -7917,13 +8223,11 @@
 
   for (size_t i = 0; i < sizeof(tc_s) / sizeof(TestCaseMsa2RF_F_U); ++i) {
     run_msa_2r(reinterpret_cast<const TestCaseMsa2R*>(&tc_s[i]),
-               [](MacroAssembler& assm) { __ fclass_w(w2, w0); },
-               load_uint32_elements_of_vector, store_uint32_elements_of_vector);
+               [](MacroAssembler& assm) { __ fclass_w(w2, w0); });
   }
   for (size_t i = 0; i < sizeof(tc_d) / sizeof(TestCaseMsa2RF_D_U); ++i) {
     run_msa_2r(reinterpret_cast<const TestCaseMsa2R*>(&tc_d[i]),
-               [](MacroAssembler& assm) { __ fclass_d(w2, w0); },
-               load_uint64_elements_of_vector, store_uint64_elements_of_vector);
+               [](MacroAssembler& assm) { __ fclass_d(w2, w0); });
   }
 
 #undef BIT
@@ -7989,13 +8293,11 @@
 
   for (size_t i = 0; i < sizeof(tc_s) / sizeof(TestCaseMsa2RF_F_I); ++i) {
     run_msa_2r(reinterpret_cast<const TestCaseMsa2R*>(&tc_s[i]),
-               [](MacroAssembler& assm) { __ ftrunc_s_w(w2, w0); },
-               load_uint32_elements_of_vector, store_uint32_elements_of_vector);
+               [](MacroAssembler& assm) { __ ftrunc_s_w(w2, w0); });
   }
   for (size_t i = 0; i < sizeof(tc_d) / sizeof(TestCaseMsa2RF_D_I); ++i) {
     run_msa_2r(reinterpret_cast<const TestCaseMsa2R*>(&tc_d[i]),
-               [](MacroAssembler& assm) { __ ftrunc_s_d(w2, w0); },
-               load_uint64_elements_of_vector, store_uint64_elements_of_vector);
+               [](MacroAssembler& assm) { __ ftrunc_s_d(w2, w0); });
   }
 }
 
@@ -8028,13 +8330,11 @@
 
   for (size_t i = 0; i < sizeof(tc_s) / sizeof(TestCaseMsa2RF_F_U); ++i) {
     run_msa_2r(reinterpret_cast<const TestCaseMsa2R*>(&tc_s[i]),
-               [](MacroAssembler& assm) { __ ftrunc_u_w(w2, w0); },
-               load_uint32_elements_of_vector, store_uint32_elements_of_vector);
+               [](MacroAssembler& assm) { __ ftrunc_u_w(w2, w0); });
   }
   for (size_t i = 0; i < sizeof(tc_d) / sizeof(TestCaseMsa2RF_D_U); ++i) {
     run_msa_2r(reinterpret_cast<const TestCaseMsa2R*>(&tc_d[i]),
-               [](MacroAssembler& assm) { __ ftrunc_u_d(w2, w0); },
-               load_uint64_elements_of_vector, store_uint64_elements_of_vector);
+               [](MacroAssembler& assm) { __ ftrunc_u_d(w2, w0); });
   }
 }
 
@@ -8073,13 +8373,11 @@
 
   for (size_t i = 0; i < sizeof(tc_s) / sizeof(TestCaseMsa2RF_F_F); ++i) {
     run_msa_2r(reinterpret_cast<const TestCaseMsa2R*>(&tc_s[i]),
-               [](MacroAssembler& assm) { __ fsqrt_w(w2, w0); },
-               load_uint32_elements_of_vector, store_uint32_elements_of_vector);
+               [](MacroAssembler& assm) { __ fsqrt_w(w2, w0); });
   }
   for (size_t i = 0; i < sizeof(tc_d) / sizeof(TestCaseMsa2RF_D_D); ++i) {
     run_msa_2r(reinterpret_cast<const TestCaseMsa2R*>(&tc_d[i]),
-               [](MacroAssembler& assm) { __ fsqrt_d(w2, w0); },
-               load_uint64_elements_of_vector, store_uint64_elements_of_vector);
+               [](MacroAssembler& assm) { __ fsqrt_d(w2, w0); });
   }
 }
 
@@ -8103,13 +8401,11 @@
 
   for (size_t i = 0; i < sizeof(tc_s) / sizeof(TestCaseMsa2RF_F_F); ++i) {
     run_msa_2r(reinterpret_cast<const TestCaseMsa2R*>(&tc_s[i]),
-               [](MacroAssembler& assm) { __ frsqrt_w(w2, w0); },
-               load_uint32_elements_of_vector, store_uint32_elements_of_vector);
+               [](MacroAssembler& assm) { __ frsqrt_w(w2, w0); });
   }
   for (size_t i = 0; i < sizeof(tc_d) / sizeof(TestCaseMsa2RF_D_D); ++i) {
     run_msa_2r(reinterpret_cast<const TestCaseMsa2R*>(&tc_d[i]),
-               [](MacroAssembler& assm) { __ frsqrt_d(w2, w0); },
-               load_uint64_elements_of_vector, store_uint64_elements_of_vector);
+               [](MacroAssembler& assm) { __ frsqrt_d(w2, w0); });
   }
 }
 
@@ -8135,13 +8431,11 @@
 
   for (size_t i = 0; i < sizeof(tc_s) / sizeof(TestCaseMsa2RF_F_F); ++i) {
     run_msa_2r(reinterpret_cast<const TestCaseMsa2R*>(&tc_s[i]),
-               [](MacroAssembler& assm) { __ frcp_w(w2, w0); },
-               load_uint32_elements_of_vector, store_uint32_elements_of_vector);
+               [](MacroAssembler& assm) { __ frcp_w(w2, w0); });
   }
   for (size_t i = 0; i < sizeof(tc_d) / sizeof(TestCaseMsa2RF_D_D); ++i) {
     run_msa_2r(reinterpret_cast<const TestCaseMsa2R*>(&tc_d[i]),
-               [](MacroAssembler& assm) { __ frcp_d(w2, w0); },
-               load_uint64_elements_of_vector, store_uint64_elements_of_vector);
+               [](MacroAssembler& assm) { __ frcp_d(w2, w0); });
   }
 }
 
@@ -8156,8 +8450,7 @@
                  __ ctcmsa(msareg, t0);
                  __ frint_w(w2, w0);
                  __ ctcmsa(msareg, t1);
-               },
-               load_uint32_elements_of_vector, store_uint32_elements_of_vector);
+               });
   }
 }
 
@@ -8172,8 +8465,7 @@
                  __ ctcmsa(msareg, t0);
                  __ frint_d(w2, w0);
                  __ ctcmsa(msareg, t1);
-               },
-               load_uint64_elements_of_vector, store_uint64_elements_of_vector);
+               });
   }
 }
 
@@ -8255,14 +8547,12 @@
 
   for (size_t i = 0; i < sizeof(tc_s) / sizeof(TestCaseMsa2RF_F_F); ++i) {
     run_msa_2r(reinterpret_cast<const TestCaseMsa2R*>(&tc_s[i]),
-               [](MacroAssembler& assm) { __ flog2_w(w2, w0); },
-               load_uint32_elements_of_vector, store_uint32_elements_of_vector);
+               [](MacroAssembler& assm) { __ flog2_w(w2, w0); });
   }
 
   for (size_t i = 0; i < sizeof(tc_d) / sizeof(TestCaseMsa2RF_D_D); ++i) {
     run_msa_2r(reinterpret_cast<const TestCaseMsa2R*>(&tc_d[i]),
-               [](MacroAssembler& assm) { __ flog2_d(w2, w0); },
-               load_uint64_elements_of_vector, store_uint64_elements_of_vector);
+               [](MacroAssembler& assm) { __ flog2_d(w2, w0); });
   }
 }
 
@@ -8277,8 +8567,7 @@
                  __ ctcmsa(msareg, t0);
                  __ ftint_s_w(w2, w0);
                  __ ctcmsa(msareg, t1);
-               },
-               load_uint32_elements_of_vector, store_uint32_elements_of_vector);
+               });
   }
 }
 
@@ -8293,8 +8582,7 @@
                  __ ctcmsa(msareg, t0);
                  __ ftint_s_d(w2, w0);
                  __ ctcmsa(msareg, t1);
-               },
-               load_uint64_elements_of_vector, store_uint64_elements_of_vector);
+               });
   }
 }
 
@@ -8391,8 +8679,7 @@
                  __ ctcmsa(msareg, t0);
                  __ ftint_u_w(w2, w0);
                  __ ctcmsa(msareg, t1);
-               },
-               load_uint32_elements_of_vector, store_uint32_elements_of_vector);
+               });
   }
 }
 
@@ -8407,8 +8694,7 @@
                  __ ctcmsa(msareg, t0);
                  __ ftint_u_d(w2, w0);
                  __ ctcmsa(msareg, t1);
-               },
-               load_uint64_elements_of_vector, store_uint64_elements_of_vector);
+               });
   }
 }
 
@@ -8524,13 +8810,11 @@
 
   for (size_t i = 0; i < sizeof(tc_s) / sizeof(TestCaseMsa2RF_U_F); ++i) {
     run_msa_2r(reinterpret_cast<const TestCaseMsa2R*>(&tc_s[i]),
-               [](MacroAssembler& assm) { __ ffint_u_w(w2, w0); },
-               load_uint32_elements_of_vector, store_uint32_elements_of_vector);
+               [](MacroAssembler& assm) { __ ffint_u_w(w2, w0); });
   }
   for (size_t i = 0; i < sizeof(tc_d) / sizeof(TestCaseMsa2RF_U_D); ++i) {
     run_msa_2r(reinterpret_cast<const TestCaseMsa2R*>(&tc_d[i]),
-               [](MacroAssembler& assm) { __ ffint_u_d(w2, w0); },
-               load_uint64_elements_of_vector, store_uint64_elements_of_vector);
+               [](MacroAssembler& assm) { __ ffint_u_d(w2, w0); });
   }
 }
 
@@ -8566,13 +8850,11 @@
 
   for (size_t i = 0; i < sizeof(tc_s) / sizeof(TestCaseMsa2RF_I_F); ++i) {
     run_msa_2r(reinterpret_cast<const TestCaseMsa2R*>(&tc_s[i]),
-               [](MacroAssembler& assm) { __ ffint_s_w(w2, w0); },
-               load_uint32_elements_of_vector, store_uint32_elements_of_vector);
+               [](MacroAssembler& assm) { __ ffint_s_w(w2, w0); });
   }
   for (size_t i = 0; i < sizeof(tc_d) / sizeof(TestCaseMsa2RF_I_D); ++i) {
     run_msa_2r(reinterpret_cast<const TestCaseMsa2R*>(&tc_d[i]),
-               [](MacroAssembler& assm) { __ ffint_s_d(w2, w0); },
-               load_uint64_elements_of_vector, store_uint64_elements_of_vector);
+               [](MacroAssembler& assm) { __ ffint_s_d(w2, w0); });
   }
 }
 
@@ -8610,11 +8892,11 @@
   const double inf_double = std::numeric_limits<double>::infinity();
 
   struct TestCaseMsa2RF_U16_F tc_s[] = {
-      {1, 2, 0x7c00, 0x0c00, 0, 0x7c00, 0xfc00, 0x8000, 0.f, inf_float,
+      {1, 2, 0x7C00, 0x0C00, 0, 0x7C00, 0xFC00, 0x8000, 0.f, inf_float,
        -inf_float, -0.f},
-      {0xfc00, 0xffff, 0x00ff, 0x8000, 0x81fe, 0x8000, 0x0345, 0xaaaa,
+      {0xFC00, 0xFFFF, 0x00FF, 0x8000, 0x81FE, 0x8000, 0x0345, 0xAAAA,
        -3.0398368835e-5f, -0.f, 4.9889088e-5f, -5.2062988281e-2f},
-      {3, 4, 0x5555, 6, 0x2aaa, 0x8700, 0x7777, 0x6a8b, 5.2062988281e-2f,
+      {3, 4, 0x5555, 6, 0x2AAA, 0x8700, 0x7777, 0x6A8B, 5.2062988281e-2f,
        -1.06811523458e-4f, 3.0576e4f, 3.35e3f}};
 
   struct TestCaseMsa2RF_F_D tc_d[] = {
@@ -8625,13 +8907,11 @@
 
   for (size_t i = 0; i < sizeof(tc_s) / sizeof(TestCaseMsa2RF_U16_F); ++i) {
     run_msa_2r(reinterpret_cast<const TestCaseMsa2R*>(&tc_s[i]),
-               [](MacroAssembler& assm) { __ fexupl_w(w2, w0); },
-               load_uint16_elements_of_vector, store_uint32_elements_of_vector);
+               [](MacroAssembler& assm) { __ fexupl_w(w2, w0); });
   }
   for (size_t i = 0; i < sizeof(tc_d) / sizeof(TestCaseMsa2RF_F_D); ++i) {
     run_msa_2r(reinterpret_cast<const TestCaseMsa2R*>(&tc_d[i]),
-               [](MacroAssembler& assm) { __ fexupl_d(w2, w0); },
-               load_uint32_elements_of_vector, store_uint64_elements_of_vector);
+               [](MacroAssembler& assm) { __ fexupl_d(w2, w0); });
   }
 }
 
@@ -8645,11 +8925,11 @@
   const double inf_double = std::numeric_limits<double>::infinity();
 
   struct TestCaseMsa2RF_U16_F tc_s[] = {
-      {0, 0x7c00, 0xfc00, 0x8000, 1, 2, 0x7c00, 0x0c00, 0.f, inf_float,
+      {0, 0x7C00, 0xFC00, 0x8000, 1, 2, 0x7C00, 0x0C00, 0.f, inf_float,
        -inf_float, -0.f},
-      {0x81fe, 0x8000, 0x0345, 0xaaaa, 0xfc00, 0xffff, 0x00ff, 0x8000,
+      {0x81FE, 0x8000, 0x0345, 0xAAAA, 0xFC00, 0xFFFF, 0x00FF, 0x8000,
        -3.0398368835e-5f, -0.f, 4.9889088e-5f, -5.2062988281e-2f},
-      {0x2aaa, 0x8700, 0x7777, 0x6a8b, 3, 4, 0x5555, 6, 5.2062988281e-2f,
+      {0x2AAA, 0x8700, 0x7777, 0x6A8B, 3, 4, 0x5555, 6, 5.2062988281e-2f,
        -1.06811523458e-4f, 3.0576e4f, 3.35e3f}};
 
   struct TestCaseMsa2RF_F_D tc_d[] = {
@@ -8660,13 +8940,11 @@
 
   for (size_t i = 0; i < sizeof(tc_s) / sizeof(TestCaseMsa2RF_U16_F); ++i) {
     run_msa_2r(reinterpret_cast<const TestCaseMsa2R*>(&tc_s[i]),
-               [](MacroAssembler& assm) { __ fexupr_w(w2, w0); },
-               load_uint16_elements_of_vector, store_uint32_elements_of_vector);
+               [](MacroAssembler& assm) { __ fexupr_w(w2, w0); });
   }
   for (size_t i = 0; i < sizeof(tc_d) / sizeof(TestCaseMsa2RF_F_D); ++i) {
     run_msa_2r(reinterpret_cast<const TestCaseMsa2R*>(&tc_d[i]),
-               [](MacroAssembler& assm) { __ fexupr_d(w2, w0); },
-               load_uint32_elements_of_vector, store_uint64_elements_of_vector);
+               [](MacroAssembler& assm) { __ fexupr_d(w2, w0); });
   }
 }
 
@@ -8685,23 +8963,21 @@
 
   CcTest::InitializeVM();
 
-  struct TestCaseMsa2RF_U16_F tc_s[] = {{0, 3, 0xffff, 0x8000, 0x8000, 0xe000,
+  struct TestCaseMsa2RF_U16_F tc_s[] = {{0, 3, 0xFFFF, 0x8000, 0x8000, 0xE000,
                                          0x0FF0, 0, -1.f, -0.25f,
                                          0.12451171875f, 0.f}};
 
   struct TestCaseMsa2RF_U32_D tc_d[] = {
-      {0, 45, 0x80000000, 0xe0000000, -1., -0.25},
-      {0x28379, 0xaaaa5555, 0x024903d3, 0, 17.853239085525274277e-3, 0.}};
+      {0, 45, 0x80000000, 0xE0000000, -1., -0.25},
+      {0x28379, 0xAAAA5555, 0x024903D3, 0, 17.853239085525274277e-3, 0.}};
 
   for (size_t i = 0; i < sizeof(tc_s) / sizeof(TestCaseMsa2RF_U16_F); ++i) {
     run_msa_2r(reinterpret_cast<const TestCaseMsa2R*>(&tc_s[i]),
-               [](MacroAssembler& assm) { __ ffql_w(w2, w0); },
-               load_uint16_elements_of_vector, store_uint32_elements_of_vector);
+               [](MacroAssembler& assm) { __ ffql_w(w2, w0); });
   }
   for (size_t i = 0; i < sizeof(tc_d) / sizeof(TestCaseMsa2RF_U32_D); ++i) {
     run_msa_2r(reinterpret_cast<const TestCaseMsa2R*>(&tc_d[i]),
-               [](MacroAssembler& assm) { __ ffql_d(w2, w0); },
-               load_uint32_elements_of_vector, store_uint64_elements_of_vector);
+               [](MacroAssembler& assm) { __ ffql_d(w2, w0); });
   }
 }
 
@@ -8711,23 +8987,21 @@
 
   CcTest::InitializeVM();
 
-  struct TestCaseMsa2RF_U16_F tc_s[] = {{0x8000, 0xe000, 0x0FF0, 0, 0, 3,
-                                         0xffff, 0x8000, -1.f, -0.25f,
+  struct TestCaseMsa2RF_U16_F tc_s[] = {{0x8000, 0xE000, 0x0FF0, 0, 0, 3,
+                                         0xFFFF, 0x8000, -1.f, -0.25f,
                                          0.12451171875f, 0.f}};
 
   struct TestCaseMsa2RF_U32_D tc_d[] = {
-      {0x80000000, 0xe0000000, 0, 45, -1., -0.25},
-      {0x024903d3, 0, 0x28379, 0xaaaa5555, 17.853239085525274277e-3, 0.}};
+      {0x80000000, 0xE0000000, 0, 45, -1., -0.25},
+      {0x024903D3, 0, 0x28379, 0xAAAA5555, 17.853239085525274277e-3, 0.}};
 
   for (size_t i = 0; i < sizeof(tc_s) / sizeof(TestCaseMsa2RF_U16_F); ++i) {
     run_msa_2r(reinterpret_cast<const TestCaseMsa2R*>(&tc_s[i]),
-               [](MacroAssembler& assm) { __ ffqr_w(w2, w0); },
-               load_uint16_elements_of_vector, store_uint32_elements_of_vector);
+               [](MacroAssembler& assm) { __ ffqr_w(w2, w0); });
   }
   for (size_t i = 0; i < sizeof(tc_d) / sizeof(TestCaseMsa2RF_U32_D); ++i) {
     run_msa_2r(reinterpret_cast<const TestCaseMsa2R*>(&tc_d[i]),
-               [](MacroAssembler& assm) { __ ffqr_d(w2, w0); },
-               load_uint32_elements_of_vector, store_uint64_elements_of_vector);
+               [](MacroAssembler& assm) { __ ffqr_d(w2, w0); });
   }
 }
 
@@ -8747,17 +9021,18 @@
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
 
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
   CpuFeatureScope fscope(&assm, MIPS_SIMD);
   msa_reg_t res;
 
-  load_uint64_elements_of_vector(assm, &(input->ws_lo), w0, t0, t1);
-  load_uint64_elements_of_vector(assm, &(input->wt_lo), w2, t0, t1);
-  load_uint64_elements_of_vector(assm, &(input->wd_lo), w4, t0, t1);
+  load_elements_of_vector(assm, &(input->ws_lo), w0, t0, t1);
+  load_elements_of_vector(assm, &(input->wt_lo), w2, t0, t1);
+  load_elements_of_vector(assm, &(input->wd_lo), w4, t0, t1);
 
   GenerateVectorInstructionFunc(assm);
 
-  store_uint64_elements_of_vector(assm, w4, a0);
+  store_elements_of_vector(assm, w4, a0);
 
   __ jr(ra);
   __ nop();
@@ -8769,9 +9044,9 @@
 #ifdef OBJECT_PRINT
   code->Print(std::cout);
 #endif
-  F3 f = FUNCTION_CAST<F3>(code->entry());
+  auto f = GeneratedCode<F3>::FromCode(*code);
 
-  (CALL_GENERATED_CODE(isolate, f, &res, 0, 0, 0, 0));
+  f.Call(&res, 0, 0, 0, 0);
 
   CHECK_EQ(GenerateOperationFunc(input->wd_lo, input->ws_lo, input->wt_lo),
            res.d[0]);
@@ -8787,12 +9062,12 @@
 
   struct TestCaseMsaVector tc[] = {
       // wd_lo, wd_hi, ws_lo, ws_hi, wt_lo, wt_hi
-      {0xf35862e13e38f8b0, 0x4f41ffdef2bfe636, 0xdcd39d91f9057627,
-       0x64be4f6dbe9caa51, 0x6b23de1a687d9cb9, 0x49547aad691da4ca},
-      {0xf35862e13e38f8b0, 0x4f41ffdef2bfe636, 0x401614523d830549,
-       0xd7c46d613f50eddd, 0x52284cbc60a1562b, 0x1756ed510d8849cd},
-      {0xf35862e13e38f8b0, 0x4f41ffdef2bfe636, 0xd6e2d2ebcb40d72f,
-       0x13a619afce67b079, 0x36cce284343e40f9, 0xb4e8f44fd148bf7f}};
+      {0xF35862E13E38F8B0, 0x4F41FFDEF2BFE636, 0xDCD39D91F9057627,
+       0x64BE4F6DBE9CAA51, 0x6B23DE1A687D9CB9, 0x49547AAD691DA4CA},
+      {0xF35862E13E38F8B0, 0x4F41FFDEF2BFE636, 0x401614523D830549,
+       0xD7C46D613F50EDDD, 0x52284CBC60A1562B, 0x1756ED510D8849CD},
+      {0xF35862E13E38F8B0, 0x4F41FFDEF2BFE636, 0xD6E2D2EBCB40D72F,
+       0x13A619AFCE67B079, 0x36CCE284343E40F9, 0xB4E8F44FD148BF7F}};
 
   for (size_t i = 0; i < sizeof(tc) / sizeof(TestCaseMsaVector); ++i) {
     run_msa_vector(
@@ -8836,16 +9111,17 @@
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
 
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
   CpuFeatureScope fscope(&assm, MIPS_SIMD);
   msa_reg_t res;
 
-  load_uint64_elements_of_vector(assm, &(input->ws_lo), w0, t0, t1);
-  load_uint64_elements_of_vector(assm, &(input->wd_lo), w2, t0, t1);
+  load_elements_of_vector(assm, &(input->ws_lo), w0, t0, t1);
+  load_elements_of_vector(assm, &(input->wd_lo), w2, t0, t1);
 
   GenerateInstructionFunc(assm, input->m);
 
-  store_uint64_elements_of_vector(assm, w2, a0);
+  store_elements_of_vector(assm, w2, a0);
 
   __ jr(ra);
   __ nop();
@@ -8857,9 +9133,9 @@
 #ifdef OBJECT_PRINT
   code->Print(std::cout);
 #endif
-  F3 f = FUNCTION_CAST<F3>(code->entry());
+  auto f = GeneratedCode<F3>::FromCode(*code);
 
-  (CALL_GENERATED_CODE(isolate, f, &res, 0, 0, 0, 0));
+  f.Call(&res, 0, 0, 0, 0);
 
   CHECK_EQ(GenerateOperationFunc(input->wd_lo, input->ws_lo, input->m),
            res.d[0]);
@@ -8875,14 +9151,14 @@
 
   struct TestCaseMsaBit tc[] = {
       // wd_lo, wd_hi     ws_lo,              ws_hi, m
-      {0, 0, 0xf35862e13e38f8b0, 0x4f41ffdef2bfe636, 3},
-      {0, 0, 0x64be4f6dbe9caa51, 0x6b23de1a687d9cb9, 5},
-      {0, 0, 0x1169751bb9a7d9c3, 0xf7a594aec8ef8a9c, 9},
-      {0, 0, 0x2b665362c4e812df, 0x3a0d80d68b3f8bc8, 13},
-      {0, 0, 0x566be7ba4365b70a, 0x01ebbc1937d76cb4, 21},
-      {0, 0, 0x380e2deb9d3f8aae, 0x017e0de0bcc6ca42, 30},
-      {0, 0, 0xa46a3a9bcb43f4e5, 0x1c62c8473bdfcffb, 45},
-      {0, 0, 0xf6759d85f23b5a2b, 0x5c042ae42c6d12c1, 61}};
+      {0, 0, 0xF35862E13E38F8B0, 0x4F41FFDEF2BFE636, 3},
+      {0, 0, 0x64BE4F6DBE9CAA51, 0x6B23DE1A687D9CB9, 5},
+      {0, 0, 0x1169751BB9A7D9C3, 0xF7A594AEC8EF8A9C, 9},
+      {0, 0, 0x2B665362C4E812DF, 0x3A0D80D68B3F8BC8, 13},
+      {0, 0, 0x566BE7BA4365B70A, 0x01EBBC1937D76CB4, 21},
+      {0, 0, 0x380E2DEB9D3F8AAE, 0x017E0DE0BCC6CA42, 30},
+      {0, 0, 0xA46A3A9BCB43F4E5, 0x1C62C8473BDFCFFB, 45},
+      {0, 0, 0xF6759D85F23B5A2B, 0x5C042AE42C6D12C1, 61}};
 
 #define SLLI_SRLI_DF(lanes, mask, func)      \
   [](uint64_t wd, uint64_t ws, uint32_t m) { \
@@ -9028,14 +9304,14 @@
 
   struct TestCaseMsaBit tc[] = {
       // wd_lo, wd_hi,    ws_lo,              ws_hi, m
-      {0, 0, 0xf35862e13e38f8b0, 0x4f41ffdef2bfe636, 3},
-      {0, 0, 0x64be4f6dbe9caa51, 0x6b23de1a687d9cb9, 5},
-      {0, 0, 0x1169751bb9a7d9c3, 0xf7a594aec8ef8a9c, 9},
-      {0, 0, 0x2b665362c4e812df, 0x3a0d80d68b3f8bc8, 13},
-      {0, 0, 0x566be7ba4365b70a, 0x01ebbc1937d76cb4, 21},
-      {0, 0, 0x380e2deb9d3f8aae, 0x017e0de0bcc6ca42, 30},
-      {0, 0, 0xa46a3a9bcb43f4e5, 0x1c62c8473bdfcffb, 45},
-      {0, 0, 0xf6759d85f23b5a2b, 0x5c042ae42c6d12c1, 61}};
+      {0, 0, 0xF35862E13E38F8B0, 0x4F41FFDEF2BFE636, 3},
+      {0, 0, 0x64BE4F6DBE9CAA51, 0x6B23DE1A687D9CB9, 5},
+      {0, 0, 0x1169751BB9A7D9C3, 0xF7A594AEC8EF8A9C, 9},
+      {0, 0, 0x2B665362C4E812DF, 0x3A0D80D68B3F8BC8, 13},
+      {0, 0, 0x566BE7BA4365B70A, 0x01EBBC1937D76CB4, 21},
+      {0, 0, 0x380E2DEB9D3F8AAE, 0x017E0DE0BCC6CA42, 30},
+      {0, 0, 0xA46A3A9BCB43F4E5, 0x1C62C8473BDFCFFB, 45},
+      {0, 0, 0xF6759D85F23B5A2B, 0x5C042AE42C6D12C1, 61}};
 
 #define BCLRI_BSETI_BNEGI_DF(lanes, mask, func) \
   [](uint64_t wd, uint64_t ws, uint32_t m) {    \
@@ -9123,22 +9399,22 @@
   CcTest::InitializeVM();
 
   struct TestCaseMsaBit tc[] = {// wd_lo, wd_hi, ws_lo, ws_hi, m
-                                {0x53f4457553bbd5b4, 0x5fb8250eacc296b2,
-                                 0xf35862e13e38f8b0, 0x4f41ffdef2bfe636, 3},
-                                {0xf61bfdb0f312e6fc, 0xc9437568dd1ea925,
-                                 0x64be4f6dbe9caa51, 0x6b23de1a687d9cb9, 5},
-                                {0x53f4457553bbd5b4, 0x5fb8250eacc296b2,
-                                 0x1169751bb9a7d9c3, 0xf7a594aec8ef8a9c, 9},
-                                {0xf61bfdb0f312e6fc, 0xc9437568dd1ea925,
-                                 0x2b665362c4e812df, 0x3a0d80d68b3f8bc8, 13},
-                                {0x53f4457553bbd5b4, 0x5fb8250eacc296b2,
-                                 0x566be7ba4365b70a, 0x01ebbc1937d76cb4, 21},
-                                {0xf61bfdb0f312e6fc, 0xc9437568dd1ea925,
-                                 0x380e2deb9d3f8aae, 0x017e0de0bcc6ca42, 30},
-                                {0x53f4457553bbd5b4, 0x5fb8250eacc296b2,
-                                 0xa46a3a9bcb43f4e5, 0x1c62c8473bdfcffb, 45},
-                                {0xf61bfdb0f312e6fc, 0xc9437568dd1ea925,
-                                 0xf6759d85f23b5a2b, 0x5c042ae42c6d12c1, 61}};
+                                {0x53F4457553BBD5B4, 0x5FB8250EACC296B2,
+                                 0xF35862E13E38F8B0, 0x4F41FFDEF2BFE636, 3},
+                                {0xF61BFDB0F312E6FC, 0xC9437568DD1EA925,
+                                 0x64BE4F6DBE9CAA51, 0x6B23DE1A687D9CB9, 5},
+                                {0x53F4457553BBD5B4, 0x5FB8250EACC296B2,
+                                 0x1169751BB9A7D9C3, 0xF7A594AEC8EF8A9C, 9},
+                                {0xF61BFDB0F312E6FC, 0xC9437568DD1EA925,
+                                 0x2B665362C4E812DF, 0x3A0D80D68B3F8BC8, 13},
+                                {0x53F4457553BBD5B4, 0x5FB8250EACC296B2,
+                                 0x566BE7BA4365B70A, 0x01EBBC1937D76CB4, 21},
+                                {0xF61BFDB0F312E6FC, 0xC9437568DD1EA925,
+                                 0x380E2DEB9D3F8AAE, 0x017E0DE0BCC6CA42, 30},
+                                {0x53F4457553BBD5B4, 0x5FB8250EACC296B2,
+                                 0xA46A3A9BCB43F4E5, 0x1C62C8473BDFCFFB, 45},
+                                {0xF61BFDB0F312E6FC, 0xC9437568DD1EA925,
+                                 0xF6759D85F23B5A2B, 0x5C042AE42C6D12C1, 61}};
 
 #define BINSLI_BINSRI_DF(lanes, mask, func)             \
   [](uint64_t wd, uint64_t ws, uint32_t m) {            \
@@ -9215,14 +9491,14 @@
 
   struct TestCaseMsaBit tc[] = {
       // wd_lo, wd_hi,    ws_lo,              ws_hi, m
-      {0, 0, 0xf35862e13e3808b0, 0x4f41ffdef2bfe636, 3},
-      {0, 0, 0x64be4f6dbe9caa51, 0x6b23de1a687d9cb9, 5},
-      {0, 0, 0x1169751bb9a7d9c3, 0xf7a594aec8ef8a9c, 9},
-      {0, 0, 0x2b665362c4e812df, 0x3a0d80d68b3f8bc8, 13},
-      {0, 0, 0x566be7ba4365b70a, 0x01ebbc1937d76cb4, 21},
-      {0, 0, 0x380e2deb9d3f8aae, 0x017e0de0bcc6ca42, 30},
-      {0, 0, 0xa46a3a9bcb43f4e5, 0x1c62c8473bdfcffb, 45},
-      {0, 0, 0xf6759d85f23b5a2b, 0x5c042ae42c6d12c1, 61}};
+      {0, 0, 0xF35862E13E3808B0, 0x4F41FFDEF2BFE636, 3},
+      {0, 0, 0x64BE4F6DBE9CAA51, 0x6B23DE1A687D9CB9, 5},
+      {0, 0, 0x1169751BB9A7D9C3, 0xF7A594AEC8EF8A9C, 9},
+      {0, 0, 0x2B665362C4E812DF, 0x3A0D80D68B3F8BC8, 13},
+      {0, 0, 0x566BE7BA4365B70A, 0x01EBBC1937D76CB4, 21},
+      {0, 0, 0x380E2DEB9D3F8AAE, 0x017E0DE0BCC6CA42, 30},
+      {0, 0, 0xA46A3A9BCB43F4E5, 0x1C62C8473BDFCFFB, 45},
+      {0, 0, 0xF6759D85F23B5A2B, 0x5C042AE42C6D12C1, 61}};
 
 #define SAT_DF(lanes, mask, func)                                              \
   [](uint64_t wd, uint64_t ws, uint32_t m) {                                   \
@@ -9312,13 +9588,14 @@
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
 
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
   CpuFeatureScope fscope(&assm, MIPS_SIMD);
   msa_reg_t res;
 
   GenerateVectorInstructionFunc(assm, input);
 
-  store_uint64_elements_of_vector(assm, w0, a0);
+  store_elements_of_vector(assm, w0, a0);
 
   __ jr(ra);
   __ nop();
@@ -9330,9 +9607,9 @@
 #ifdef OBJECT_PRINT
   code->Print(std::cout);
 #endif
-  F3 f = FUNCTION_CAST<F3>(code->entry());
+  auto f = GeneratedCode<F3>::FromCode(*code);
 
-  (CALL_GENERATED_CODE(isolate, f, &res, 0, 0, 0, 0));
+  f.Call(&res, 0, 0, 0, 0);
 
   CHECK_EQ(GenerateOperationFunc(input), res.d[0]);
   CHECK_EQ(GenerateOperationFunc(input), res.d[1]);
@@ -9382,7 +9659,8 @@
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
 
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
   CpuFeatureScope fscope(&assm, MIPS_SIMD);
   T in_test_vector[1024];
   T out_test_vector[1024];
@@ -9408,9 +9686,9 @@
 #ifdef OBJECT_PRINT
   code->Print(std::cout);
 #endif
-  F5 f = FUNCTION_CAST<F5>(code->entry());
+  auto f = GeneratedCode<F5>::FromCode(*code);
 
-  (CALL_GENERATED_CODE(isolate, f, in_array_middle, out_array_middle, 0, 0, 0));
+  f.Call(in_array_middle, out_array_middle, 0, 0, 0);
 
   CHECK_EQ(memcmp(in_test_vector, out_test_vector, arraysize(in_test_vector)),
            0);
@@ -9446,7 +9724,6 @@
       __ st_d(w0, MemOperand(a1, i));
     }
   });
-#undef LDI_DF
 }
 
 struct TestCaseMsa3R {
@@ -9466,18 +9743,18 @@
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
 
-  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler assm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
   CpuFeatureScope fscope(&assm, MIPS_SIMD);
   msa_reg_t res;
-  uint64_t expected;
 
-  load_uint64_elements_of_vector(assm, &(input->wt_lo), w0, t0, t1);
-  load_uint64_elements_of_vector(assm, &(input->ws_lo), w1, t0, t1);
-  load_uint64_elements_of_vector(assm, &(input->wd_lo), w2, t0, t1);
+  load_elements_of_vector(assm, &(input->wt_lo), w0, t0, t1);
+  load_elements_of_vector(assm, &(input->ws_lo), w1, t0, t1);
+  load_elements_of_vector(assm, &(input->wd_lo), w2, t0, t1);
 
   GenerateI5InstructionFunc(assm);
 
-  store_uint64_elements_of_vector(assm, w2, a0);
+  store_elements_of_vector(assm, w2, a0);
 
   __ jr(ra);
   __ nop();
@@ -9489,18 +9766,16 @@
 #ifdef OBJECT_PRINT
   code->Print(std::cout);
 #endif
-  F3 f = FUNCTION_CAST<F3>(code->entry());
+  auto f = GeneratedCode<F3>::FromCode(*code);
 
-  (CALL_GENERATED_CODE(isolate, f, &res, 0, 0, 0, 0));
+  f.Call(&res, 0, 0, 0, 0);
 
-  expected = GenerateOperationFunc(input->ws_lo, input->wt_lo, input->wd_lo);
-  if (expected != Unpredictable) {
-    CHECK_EQ(expected, res.d[0]);
+  GenerateOperationFunc(&input->ws_lo, &input->wt_lo, &input->wd_lo);
+  if (input->wd_lo != Unpredictable) {
+    CHECK_EQ(input->wd_lo, res.d[0]);
   }
-
-  expected = GenerateOperationFunc(input->ws_hi, input->wt_hi, input->wd_hi);
-  if (expected != Unpredictable) {
-    CHECK_EQ(expected, res.d[1]);
+  if (input->wd_hi != Unpredictable) {
+    CHECK_EQ(input->wd_hi, res.d[1]);
   }
 }
 
@@ -9510,506 +9785,657 @@
   CcTest::InitializeVM();
 
   struct TestCaseMsa3R tc[] = {
-      {0x1169751bb9a7d9c3, 0xf7a594aec8ef8a9c, 0x1169751bb9a7d9c3,
-       0xf7a594aec8ef8a9c, 0x1169751bb9a7d9c3, 0xf7a594aec8ef8a9c},
-      {0x2b665362c4e812df, 0x3a0d80d68b3f8bc8, 0x2b665362c4e812df,
-       0x3a0d80d68b3f8bc8, 0x2b665362c4e812df, 0x3a0d80d68b3f8bc8},
-      {0x1169751bb9a7d9c3, 0xf7a594aec8ef8a9c, 0x1169751bb9a7d9c3,
-       0xf7a594aec8ef8a9c, 0x1169751bb9a7d9c3, 0xf7a594aec8ef8a9c},
-      {0x2b665362c4e812df, 0x3a0d80d68b3f8bc8, 0x2b665362c4e812df,
-       0x3a0d80d68b3f8bc8, 0x2b665362c4e812df, 0x3a0d80d68b3f8bc8},
-      {0xffab807f807fffcd, 0x7f23ff80ff567f80, 0xffab807f807fffcd,
-       0x7f23ff80ff567f80, 0xffab807f807fffcd, 0x7f23ff80ff567f80},
-      {0x80ffefff7f12807f, 0x807f80ff7fdeff78, 0x80ffefff7f12807f,
-       0x807f80ff7fdeff78, 0x80ffefff7f12807f, 0x807f80ff7fdeff78},
-      {0xffffffffffffffff, 0xffffffffffffffff, 0xffffffffffffffff,
-       0xffffffffffffffff, 0xffffffffffffffff, 0xffffffffffffffff},
-      {0x0000000000000000, 0xffffffffffffffff, 0xffffffffffffffff,
-       0x0000000000000000, 0x0000000000000000, 0xffffffffffffffff},
-      {0xffff0000ffff0000, 0xffff0000ffff0000, 0xffff0000ffff0000,
-       0xffff0000ffff0000, 0xffff0000ffff0000, 0xffff0000ffff0000},
-      {0xff00ff00ff00ff00, 0xff00ff00ff00ff00, 0xff00ff00ff00ff00,
-       0xff00ff00ff00ff00, 0xff00ff00ff00ff00, 0xff00ff00ff00ff00},
-      {0xf0f0f0f0f0f0f0f0, 0xf0f0f0f0f0f0f0f0, 0xf0f0f0f0f0f0f0f0,
-       0xf0f0f0f0f0f0f0f0, 0xf0f0f0f0f0f0f0f0, 0xf0f0f0f0f0f0f0f0},
-      {0xff0000ffff0000ff, 0xff0000ffff0000ff, 0xff0000ffff0000ff,
-       0xff0000ffff0000ff, 0xff0000ffff0000ff, 0xff0000ffff0000ff},
-      {0xffff00000000ffff, 0xffff00000000ffff, 0xffff00000000ffff,
-       0xffff00000000ffff, 0xffff00000000ffff, 0xffff00000000ffff}};
+      {0x1169751BB9A7D9C3, 0xF7A594AEC8EF8A9C, 0x1169751BB9A7D9C3,
+       0xF7A594AEC8EF8A9C, 0x1169751BB9A7D9C3, 0xF7A594AEC8EF8A9C},
+      {0x2B665362C4E812DF, 0x3A0D80D68B3F8BC8, 0x2B665362C4E812DF,
+       0x3A0D80D68B3F8BC8, 0x2B665362C4E812DF, 0x3A0D80D68B3F8BC8},
+      {0x1169751BB9A7D9C3, 0xF7A594AEC8EF8A9C, 0x1169751BB9A7D9C3,
+       0xF7A594AEC8EF8A9C, 0x1169751BB9A7D9C3, 0xF7A594AEC8EF8A9C},
+      {0x2B665362C4E812DF, 0x3A0D80D68B3F8BC8, 0x2B665362C4E812DF,
+       0x3A0D80D68B3F8BC8, 0x2B665362C4E812DF, 0x3A0D80D68B3F8BC8},
+      {0xFFAB807F807FFFCD, 0x7F23FF80FF567F80, 0xFFAB807F807FFFCD,
+       0x7F23FF80FF567F80, 0xFFAB807F807FFFCD, 0x7F23FF80FF567F80},
+      {0x80FFEFFF7F12807F, 0x807F80FF7FDEFF78, 0x80FFEFFF7F12807F,
+       0x807F80FF7FDEFF78, 0x80FFEFFF7F12807F, 0x807F80FF7FDEFF78},
+      {0xFFFFFFFFFFFFFFFF, 0xFFFFFFFFFFFFFFFF, 0xFFFFFFFFFFFFFFFF,
+       0xFFFFFFFFFFFFFFFF, 0xFFFFFFFFFFFFFFFF, 0xFFFFFFFFFFFFFFFF},
+      {0x0000000000000000, 0xFFFFFFFFFFFFFFFF, 0xFFFFFFFFFFFFFFFF,
+       0x0000000000000000, 0x0000000000000000, 0xFFFFFFFFFFFFFFFF},
+      {0xFFFF0000FFFF0000, 0xFFFF0000FFFF0000, 0xFFFF0000FFFF0000,
+       0xFFFF0000FFFF0000, 0xFFFF0000FFFF0000, 0xFFFF0000FFFF0000},
+      {0xFF00FF00FF00FF00, 0xFF00FF00FF00FF00, 0xFF00FF00FF00FF00,
+       0xFF00FF00FF00FF00, 0xFF00FF00FF00FF00, 0xFF00FF00FF00FF00},
+      {0xF0F0F0F0F0F0F0F0, 0xF0F0F0F0F0F0F0F0, 0xF0F0F0F0F0F0F0F0,
+       0xF0F0F0F0F0F0F0F0, 0xF0F0F0F0F0F0F0F0, 0xF0F0F0F0F0F0F0F0},
+      {0xFF0000FFFF0000FF, 0xFF0000FFFF0000FF, 0xFF0000FFFF0000FF,
+       0xFF0000FFFF0000FF, 0xFF0000FFFF0000FF, 0xFF0000FFFF0000FF},
+      {0xFFFF00000000FFFF, 0xFFFF00000000FFFF, 0xFFFF00000000FFFF,
+       0xFFFF00000000FFFF, 0xFFFF00000000FFFF, 0xFFFF00000000FFFF}};
 
-#define SLL_DF(T, lanes, mask)                                          \
-  uint64_t res = 0;                                                     \
-  int size_in_bits = kMSARegSize / lanes;                               \
-  for (int i = 0; i < lanes / 2; ++i) {                                 \
-    uint64_t shift = size_in_bits * i;                                  \
-    T src_op = static_cast<T>((ws >> shift) & mask);                    \
-    T shift_op = static_cast<T>((wt >> shift) & mask) % size_in_bits;   \
-    res |= (static_cast<uint64_t>(src_op << shift_op) & mask) << shift; \
-  }                                                                     \
-  return res
+#define SLL_DF(T, lanes, mask)                                             \
+  int size_in_bits = kMSARegSize / lanes;                                  \
+  for (int i = 0; i < 2; i++) {                                            \
+    uint64_t res = 0;                                                      \
+    for (int j = 0; j < lanes / 2; ++j) {                                  \
+      uint64_t shift = size_in_bits * j;                                   \
+      T src_op = static_cast<T>((ws[i] >> shift) & mask);                  \
+      T shift_op = static_cast<T>((wt[i] >> shift) & mask) % size_in_bits; \
+      res |= (static_cast<uint64_t>(src_op << shift_op) & mask) << shift;  \
+    }                                                                      \
+    wd[i] = res;                                                           \
+  }
 
-#define SRA_DF(T, lanes, mask)                                                 \
-  uint64_t res = 0;                                                            \
-  int size_in_bits = kMSARegSize / lanes;                                      \
-  for (int i = 0; i < lanes / 2; ++i) {                                        \
-    uint64_t shift = size_in_bits * i;                                         \
-    T src_op = static_cast<T>((ws >> shift) & mask);                           \
-    int shift_op = ((wt >> shift) & mask) % size_in_bits;                      \
-    res |=                                                                     \
-        (static_cast<uint64_t>(ArithmeticShiftRight(src_op, shift_op) & mask)) \
-        << shift;                                                              \
-  }                                                                            \
-  return res
-
-#define SRL_DF(T, lanes, mask)                                          \
-  uint64_t res = 0;                                                     \
-  int size_in_bits = kMSARegSize / lanes;                               \
-  for (int i = 0; i < lanes / 2; ++i) {                                 \
-    uint64_t shift = size_in_bits * i;                                  \
-    T src_op = static_cast<T>((ws >> shift) & mask);                    \
-    T shift_op = static_cast<T>(((wt >> shift) & mask) % size_in_bits); \
-    res |= (static_cast<uint64_t>(src_op >> shift_op) & mask) << shift; \
-  }                                                                     \
-  return res
-
-#define BCRL_DF(T, lanes, mask)                                         \
-  uint64_t res = 0;                                                     \
-  int size_in_bits = kMSARegSize / lanes;                               \
-  for (int i = 0; i < lanes / 2; ++i) {                                 \
-    uint64_t shift = size_in_bits * i;                                  \
-    T src_op = static_cast<T>((ws >> shift) & mask);                    \
-    T shift_op = static_cast<T>(((wt >> shift) & mask) % size_in_bits); \
-    T r = (static_cast<T>(~(1ull << shift_op)) & src_op) & mask;        \
-    res |= static_cast<uint64_t>(r) << shift;                           \
-  }                                                                     \
-  return res
-
-#define BSET_DF(T, lanes, mask)                                         \
-  uint64_t res = 0;                                                     \
-  int size_in_bits = kMSARegSize / lanes;                               \
-  for (int i = 0; i < lanes / 2; ++i) {                                 \
-    uint64_t shift = size_in_bits * i;                                  \
-    T src_op = static_cast<T>((ws >> shift) & mask);                    \
-    T shift_op = static_cast<T>(((wt >> shift) & mask) % size_in_bits); \
-    T r = (static_cast<T>(1ull << shift_op) | src_op) & mask;           \
-    res |= static_cast<uint64_t>(r) << shift;                           \
-  }                                                                     \
-  return res
-
-#define BNEG_DF(T, lanes, mask)                                         \
-  uint64_t res = 0;                                                     \
-  int size_in_bits = kMSARegSize / lanes;                               \
-  for (int i = 0; i < lanes / 2; ++i) {                                 \
-    uint64_t shift = size_in_bits * i;                                  \
-    T src_op = static_cast<T>((ws >> shift) & mask);                    \
-    T shift_op = static_cast<T>(((wt >> shift) & mask) % size_in_bits); \
-    T r = (static_cast<T>(1ull << shift_op) ^ src_op) & mask;           \
-    res |= static_cast<uint64_t>(r) << shift;                           \
-  }                                                                     \
-  return res
-
-#define BINSL_DF(T, lanes, mask)                                            \
-  uint64_t res = 0;                                                         \
-  int size_in_bits = kMSARegSize / lanes;                                   \
-  for (int i = 0; i < lanes / 2; ++i) {                                     \
-    uint64_t shift = size_in_bits * i;                                      \
-    T ws_op = static_cast<T>((ws >> shift) & mask);                         \
-    T wd_op = static_cast<T>((wd >> shift) & mask);                         \
-    int shift_op = static_cast<int>(((wt >> shift) & mask) % size_in_bits); \
-    int bits = shift_op + 1;                                                \
-    T r;                                                                    \
-    if (bits == size_in_bits) {                                             \
-      r = static_cast<T>(ws_op);                                            \
-    } else {                                                                \
-      uint64_t mask2 = ((1ull << bits) - 1) << (size_in_bits - bits);       \
-      r = static_cast<T>((static_cast<T>(mask2) & ws_op) |                  \
-                         (static_cast<T>(~mask2) & wd_op));                 \
-    }                                                                       \
-    res |= static_cast<uint64_t>(r) << shift;                               \
-  }                                                                         \
-  return res
-
-#define BINSR_DF(T, lanes, mask)                                            \
-  uint64_t res = 0;                                                         \
-  int size_in_bits = kMSARegSize / lanes;                                   \
-  for (int i = 0; i < lanes / 2; ++i) {                                     \
-    uint64_t shift = size_in_bits * i;                                      \
-    T ws_op = static_cast<T>((ws >> shift) & mask);                         \
-    T wd_op = static_cast<T>((wd >> shift) & mask);                         \
-    int shift_op = static_cast<int>(((wt >> shift) & mask) % size_in_bits); \
-    int bits = shift_op + 1;                                                \
-    T r;                                                                    \
-    if (bits == size_in_bits) {                                             \
-      r = static_cast<T>(ws_op);                                            \
-    } else {                                                                \
-      uint64_t mask2 = (1ull << bits) - 1;                                  \
-      r = static_cast<T>((static_cast<T>(mask2) & ws_op) |                  \
-                         (static_cast<T>(~mask2) & wd_op));                 \
-    }                                                                       \
-    res |= static_cast<uint64_t>(r) << shift;                               \
-  }                                                                         \
-  return res
-
-#define ADDV_DF(T, lanes, mask)                                    \
-  uint64_t res = 0;                                                \
-  int size_in_bits = kMSARegSize / lanes;                          \
-  for (int i = 0; i < lanes / 2; ++i) {                            \
-    uint64_t shift = size_in_bits * i;                             \
-    T ws_op = static_cast<T>((ws >> shift) & mask);                \
-    T wt_op = static_cast<T>((wt >> shift) & mask);                \
-    res |= (static_cast<uint64_t>(ws_op + wt_op) & mask) << shift; \
-  }                                                                \
-  return res
-
-#define SUBV_DF(T, lanes, mask)                                    \
-  uint64_t res = 0;                                                \
-  int size_in_bits = kMSARegSize / lanes;                          \
-  for (int i = 0; i < lanes / 2; ++i) {                            \
-    uint64_t shift = size_in_bits * i;                             \
-    T ws_op = static_cast<T>((ws >> shift) & mask);                \
-    T wt_op = static_cast<T>((wt >> shift) & mask);                \
-    res |= (static_cast<uint64_t>(ws_op - wt_op) & mask) << shift; \
-  }                                                                \
-  return res
-
-#define MAX_DF(T, lanes, mask)                                            \
-  uint64_t res = 0;                                                       \
-  int size_in_bits = kMSARegSize / lanes;                                 \
-  for (int i = 0; i < lanes / 2; ++i) {                                   \
-    uint64_t shift = size_in_bits * i;                                    \
-    T ws_op = static_cast<T>((ws >> shift) & mask);                       \
-    T wt_op = static_cast<T>((wt >> shift) & mask);                       \
-    res |= (static_cast<uint64_t>(Max<T>(ws_op, wt_op)) & mask) << shift; \
-  }                                                                       \
-  return res
-
-#define MIN_DF(T, lanes, mask)                                            \
-  uint64_t res = 0;                                                       \
-  int size_in_bits = kMSARegSize / lanes;                                 \
-  for (int i = 0; i < lanes / 2; ++i) {                                   \
-    uint64_t shift = size_in_bits * i;                                    \
-    T ws_op = static_cast<T>((ws >> shift) & mask);                       \
-    T wt_op = static_cast<T>((wt >> shift) & mask);                       \
-    res |= (static_cast<uint64_t>(Min<T>(ws_op, wt_op)) & mask) << shift; \
-  }                                                                       \
-  return res
-
-#define MAXA_DF(T, lanes, mask)                                                \
-  uint64_t res = 0;                                                            \
-  int size_in_bits = kMSARegSize / lanes;                                      \
-  for (int i = 0; i < lanes / 2; ++i) {                                        \
-    uint64_t shift = size_in_bits * i;                                         \
-    T ws_op = static_cast<T>((ws >> shift) & mask);                            \
-    T wt_op = static_cast<T>((wt >> shift) & mask);                            \
-    res |= (static_cast<uint64_t>(Nabs(ws_op) < Nabs(wt_op) ? ws_op : wt_op) & \
-            mask)                                                              \
-           << shift;                                                           \
-  }                                                                            \
-  return res
-
-#define MINA_DF(T, lanes, mask)                                                \
-  uint64_t res = 0;                                                            \
-  int size_in_bits = kMSARegSize / lanes;                                      \
-  for (int i = 0; i < lanes / 2; ++i) {                                        \
-    uint64_t shift = size_in_bits * i;                                         \
-    T ws_op = static_cast<T>((ws >> shift) & mask);                            \
-    T wt_op = static_cast<T>((wt >> shift) & mask);                            \
-    res |= (static_cast<uint64_t>(Nabs(ws_op) > Nabs(wt_op) ? ws_op : wt_op) & \
-            mask)                                                              \
-           << shift;                                                           \
-  }                                                                            \
-  return res
-
-#define CEQ_DF(T, lanes, mask)                                                \
-  uint64_t res = 0;                                                           \
-  int size_in_bits = kMSARegSize / lanes;                                     \
-  for (int i = 0; i < lanes / 2; ++i) {                                       \
-    uint64_t shift = size_in_bits * i;                                        \
-    T ws_op = static_cast<T>((ws >> shift) & mask);                           \
-    T wt_op = static_cast<T>((wt >> shift) & mask);                           \
-    res |=                                                                    \
-        (static_cast<uint64_t>(!Compare(ws_op, wt_op) ? -1ull : 0ull) & mask) \
-        << shift;                                                             \
-  }                                                                           \
-  return res
-
-#define CLT_DF(T, lanes, mask)                                                 \
-  uint64_t res = 0;                                                            \
-  int size_in_bits = kMSARegSize / lanes;                                      \
-  for (int i = 0; i < lanes / 2; ++i) {                                        \
-    uint64_t shift = size_in_bits * i;                                         \
-    T ws_op = static_cast<T>((ws >> shift) & mask);                            \
-    T wt_op = static_cast<T>((wt >> shift) & mask);                            \
-    res |=                                                                     \
-        (static_cast<uint64_t>((Compare(ws_op, wt_op) == -1) ? -1ull : 0ull) & \
-         mask)                                                                 \
-        << shift;                                                              \
-  }                                                                            \
-  return res
-
-#define CLE_DF(T, lanes, mask)                                                \
-  uint64_t res = 0;                                                           \
-  int size_in_bits = kMSARegSize / lanes;                                     \
-  for (int i = 0; i < lanes / 2; ++i) {                                       \
-    uint64_t shift = size_in_bits * i;                                        \
-    T ws_op = static_cast<T>((ws >> shift) & mask);                           \
-    T wt_op = static_cast<T>((wt >> shift) & mask);                           \
-    res |=                                                                    \
-        (static_cast<uint64_t>((Compare(ws_op, wt_op) != 1) ? -1ull : 0ull) & \
-         mask)                                                                \
-        << shift;                                                             \
-  }                                                                           \
-  return res
-
-#define ADD_A_DF(T, lanes, mask)                                             \
-  uint64_t res = 0;                                                          \
+#define SRA_DF(T, lanes, mask)                                               \
   int size_in_bits = kMSARegSize / lanes;                                    \
-  for (int i = 0; i < lanes / 2; ++i) {                                      \
-    uint64_t shift = size_in_bits * i;                                       \
-    T ws_op = static_cast<T>((ws >> shift) & mask);                          \
-    T wt_op = static_cast<T>((wt >> shift) & mask);                          \
-    res |= (static_cast<uint64_t>(Abs(ws_op) + Abs(wt_op)) & mask) << shift; \
-  }                                                                          \
-  return res
+  for (int i = 0; i < 2; i++) {                                              \
+    uint64_t res = 0;                                                        \
+    for (int j = 0; j < lanes / 2; ++j) {                                    \
+      uint64_t shift = size_in_bits * j;                                     \
+      T src_op = static_cast<T>((ws[i] >> shift) & mask);                    \
+      int shift_op = ((wt[i] >> shift) & mask) % size_in_bits;               \
+      res |= (static_cast<uint64_t>(ArithmeticShiftRight(src_op, shift_op) & \
+                                    mask))                                   \
+             << shift;                                                       \
+    }                                                                        \
+    wd[i] = res;                                                             \
+  }
 
-#define ADDS_A_DF(T, lanes, mask)                         \
-  uint64_t res = 0;                                       \
-  int size_in_bits = kMSARegSize / lanes;                 \
-  for (int i = 0; i < lanes / 2; ++i) {                   \
-    uint64_t shift = size_in_bits * i;                    \
-    T ws_op = Nabs(static_cast<T>((ws >> shift) & mask)); \
-    T wt_op = Nabs(static_cast<T>((wt >> shift) & mask)); \
-    T r;                                                  \
-    if (ws_op < -std::numeric_limits<T>::max() - wt_op) { \
-      r = std::numeric_limits<T>::max();                  \
-    } else {                                              \
-      r = -(ws_op + wt_op);                               \
-    }                                                     \
-    res |= (static_cast<uint64_t>(r) & mask) << shift;    \
-  }                                                       \
-  return res
+#define SRL_DF(T, lanes, mask)                                               \
+  int size_in_bits = kMSARegSize / lanes;                                    \
+  for (int i = 0; i < 2; i++) {                                              \
+    uint64_t res = 0;                                                        \
+    for (int j = 0; j < lanes / 2; ++j) {                                    \
+      uint64_t shift = size_in_bits * j;                                     \
+      T src_op = static_cast<T>((ws[i] >> shift) & mask);                    \
+      T shift_op = static_cast<T>(((wt[i] >> shift) & mask) % size_in_bits); \
+      res |= (static_cast<uint64_t>(src_op >> shift_op) & mask) << shift;    \
+    }                                                                        \
+    wd[i] = res;                                                             \
+  }
 
-#define ADDS_DF(T, lanes, mask)                                                \
-  uint64_t res = 0;                                                            \
-  int size_in_bits = kMSARegSize / lanes;                                      \
-  for (int i = 0; i < lanes / 2; ++i) {                                        \
-    uint64_t shift = size_in_bits * i;                                         \
-    T ws_op = static_cast<T>((ws >> shift) & mask);                            \
-    T wt_op = static_cast<T>((wt >> shift) & mask);                            \
-    res |= (static_cast<uint64_t>(SaturateAdd(ws_op, wt_op)) & mask) << shift; \
-  }                                                                            \
-  return res
+#define BCRL_DF(T, lanes, mask)                                              \
+  int size_in_bits = kMSARegSize / lanes;                                    \
+  for (int i = 0; i < 2; i++) {                                              \
+    uint64_t res = 0;                                                        \
+    for (int j = 0; j < lanes / 2; ++j) {                                    \
+      uint64_t shift = size_in_bits * j;                                     \
+      T src_op = static_cast<T>((ws[i] >> shift) & mask);                    \
+      T shift_op = static_cast<T>(((wt[i] >> shift) & mask) % size_in_bits); \
+      T r = (static_cast<T>(~(1ull << shift_op)) & src_op) & mask;           \
+      res |= static_cast<uint64_t>(r) << shift;                              \
+    }                                                                        \
+    wd[i] = res;                                                             \
+  }
 
-#define AVE_DF(T, lanes, mask)                                                 \
-  uint64_t res = 0;                                                            \
-  int size_in_bits = kMSARegSize / lanes;                                      \
-  for (int i = 0; i < lanes / 2; ++i) {                                        \
-    uint64_t shift = size_in_bits * i;                                         \
-    T ws_op = static_cast<T>((ws >> shift) & mask);                            \
-    T wt_op = static_cast<T>((wt >> shift) & mask);                            \
-    res |= (static_cast<uint64_t>(((wt_op & ws_op) + ((ws_op ^ wt_op) >> 1)) & \
-                                  mask))                                       \
-           << shift;                                                           \
-  }                                                                            \
-  return res
+#define BSET_DF(T, lanes, mask)                                              \
+  int size_in_bits = kMSARegSize / lanes;                                    \
+  for (int i = 0; i < 2; i++) {                                              \
+    uint64_t res = 0;                                                        \
+    for (int j = 0; j < lanes / 2; ++j) {                                    \
+      uint64_t shift = size_in_bits * j;                                     \
+      T src_op = static_cast<T>((ws[i] >> shift) & mask);                    \
+      T shift_op = static_cast<T>(((wt[i] >> shift) & mask) % size_in_bits); \
+      T r = (static_cast<T>(1ull << shift_op) | src_op) & mask;              \
+      res |= static_cast<uint64_t>(r) << shift;                              \
+    }                                                                        \
+    wd[i] = res;                                                             \
+  }
 
-#define AVER_DF(T, lanes, mask)                                                \
-  uint64_t res = 0;                                                            \
-  int size_in_bits = kMSARegSize / lanes;                                      \
-  for (int i = 0; i < lanes / 2; ++i) {                                        \
-    uint64_t shift = size_in_bits * i;                                         \
-    T ws_op = static_cast<T>((ws >> shift) & mask);                            \
-    T wt_op = static_cast<T>((wt >> shift) & mask);                            \
-    res |= (static_cast<uint64_t>(((wt_op | ws_op) - ((ws_op ^ wt_op) >> 1)) & \
-                                  mask))                                       \
-           << shift;                                                           \
-  }                                                                            \
-  return res
+#define BNEG_DF(T, lanes, mask)                                              \
+  int size_in_bits = kMSARegSize / lanes;                                    \
+  for (int i = 0; i < 2; i++) {                                              \
+    uint64_t res = 0;                                                        \
+    for (int j = 0; j < lanes / 2; ++j) {                                    \
+      uint64_t shift = size_in_bits * j;                                     \
+      T src_op = static_cast<T>((ws[i] >> shift) & mask);                    \
+      T shift_op = static_cast<T>(((wt[i] >> shift) & mask) % size_in_bits); \
+      T r = (static_cast<T>(1ull << shift_op) ^ src_op) & mask;              \
+      res |= static_cast<uint64_t>(r) << shift;                              \
+    }                                                                        \
+    wd[i] = res;                                                             \
+  }
 
-#define SUBS_DF(T, lanes, mask)                                                \
-  uint64_t res = 0;                                                            \
-  int size_in_bits = kMSARegSize / lanes;                                      \
-  for (int i = 0; i < lanes / 2; ++i) {                                        \
-    uint64_t shift = size_in_bits * i;                                         \
-    T ws_op = static_cast<T>((ws >> shift) & mask);                            \
-    T wt_op = static_cast<T>((wt >> shift) & mask);                            \
-    res |= (static_cast<uint64_t>(SaturateSub(ws_op, wt_op)) & mask) << shift; \
-  }                                                                            \
-  return res
+#define BINSL_DF(T, lanes, mask)                                             \
+  int size_in_bits = kMSARegSize / lanes;                                    \
+  for (int i = 0; i < 2; i++) {                                              \
+    uint64_t res = 0;                                                        \
+    for (int j = 0; j < lanes / 2; ++j) {                                    \
+      uint64_t shift = size_in_bits * j;                                     \
+      T ws_op = static_cast<T>((ws[i] >> shift) & mask);                     \
+      T wd_op = static_cast<T>((wd[i] >> shift) & mask);                     \
+      T shift_op = static_cast<T>(((wt[i] >> shift) & mask) % size_in_bits); \
+      int64_t bits = shift_op + 1;                                           \
+      T r;                                                                   \
+      if (bits == size_in_bits) {                                            \
+        r = static_cast<T>(ws_op);                                           \
+      } else {                                                               \
+        uint64_t mask2 = ((1ull << bits) - 1) << (size_in_bits - bits);      \
+        r = static_cast<T>((static_cast<T>(mask2) & ws_op) |                 \
+                           (static_cast<T>(~mask2) & wd_op));                \
+      }                                                                      \
+      res |= static_cast<uint64_t>(r) << shift;                              \
+    }                                                                        \
+    wd[i] = res;                                                             \
+  }
 
-#define SUBSUS_U_DF(T, lanes, mask)                         \
-  typedef typename std::make_unsigned<T>::type uT;          \
-  uint64_t res = 0;                                         \
-  int size_in_bits = kMSARegSize / lanes;                   \
-  for (int i = 0; i < lanes / 2; ++i) {                     \
-    uint64_t shift = size_in_bits * i;                      \
-    uT ws_op = static_cast<uT>((ws >> shift) & mask);       \
-    T wt_op = static_cast<T>((wt >> shift) & mask);         \
-    T r;                                                    \
-    if (wt_op > 0) {                                        \
-      uT wtu = static_cast<uT>(wt_op);                      \
-      if (wtu > ws_op) {                                    \
-        r = 0;                                              \
-      } else {                                              \
-        r = static_cast<T>(ws_op - wtu);                    \
-      }                                                     \
-    } else {                                                \
-      if (ws_op > std::numeric_limits<uT>::max() + wt_op) { \
-        r = static_cast<T>(std::numeric_limits<uT>::max()); \
-      } else {                                              \
-        r = static_cast<T>(ws_op - wt_op);                  \
-      }                                                     \
-    }                                                       \
-    res |= (static_cast<uint64_t>(r) & mask) << shift;      \
-  }                                                         \
-  return res
+#define BINSR_DF(T, lanes, mask)                                             \
+  int size_in_bits = kMSARegSize / lanes;                                    \
+  for (int i = 0; i < 2; i++) {                                              \
+    uint64_t res = 0;                                                        \
+    for (int j = 0; j < lanes / 2; ++j) {                                    \
+      uint64_t shift = size_in_bits * j;                                     \
+      T ws_op = static_cast<T>((ws[i] >> shift) & mask);                     \
+      T wd_op = static_cast<T>((wd[i] >> shift) & mask);                     \
+      T shift_op = static_cast<T>(((wt[i] >> shift) & mask) % size_in_bits); \
+      int64_t bits = shift_op + 1;                                           \
+      T r;                                                                   \
+      if (bits == size_in_bits) {                                            \
+        r = static_cast<T>(ws_op);                                           \
+      } else {                                                               \
+        uint64_t mask2 = (1ull << bits) - 1;                                 \
+        r = static_cast<T>((static_cast<T>(mask2) & ws_op) |                 \
+                           (static_cast<T>(~mask2) & wd_op));                \
+      }                                                                      \
+      res |= static_cast<uint64_t>(r) << shift;                              \
+    }                                                                        \
+    wd[i] = res;                                                             \
+  }
 
-#define SUBSUU_S_DF(T, lanes, mask)                    \
-  typedef typename std::make_unsigned<T>::type uT;     \
-  uint64_t res = 0;                                    \
-  int size_in_bits = kMSARegSize / lanes;              \
-  for (int i = 0; i < lanes / 2; ++i) {                \
-    uint64_t shift = size_in_bits * i;                 \
-    uT ws_op = static_cast<uT>((ws >> shift) & mask);  \
-    uT wt_op = static_cast<uT>((wt >> shift) & mask);  \
-    uT wdu;                                            \
-    T r;                                               \
-    if (ws_op > wt_op) {                               \
-      wdu = ws_op - wt_op;                             \
-      if (wdu > std::numeric_limits<T>::max()) {       \
-        r = std::numeric_limits<T>::max();             \
-      } else {                                         \
-        r = static_cast<T>(wdu);                       \
-      }                                                \
-    } else {                                           \
-      wdu = wt_op - ws_op;                             \
-      CHECK(-std::numeric_limits<T>::max() ==          \
-            std::numeric_limits<T>::min() + 1);        \
-      if (wdu <= std::numeric_limits<T>::max()) {      \
-        r = -static_cast<T>(wdu);                      \
-      } else {                                         \
-        r = std::numeric_limits<T>::min();             \
-      }                                                \
-    }                                                  \
-    res |= (static_cast<uint64_t>(r) & mask) << shift; \
-  }                                                    \
-  return res
+#define ADDV_DF(T, lanes, mask)                                      \
+  int size_in_bits = kMSARegSize / lanes;                            \
+  for (int i = 0; i < 2; i++) {                                      \
+    uint64_t res = 0;                                                \
+    for (int j = 0; j < lanes / 2; ++j) {                            \
+      uint64_t shift = size_in_bits * j;                             \
+      T ws_op = static_cast<T>((ws[i] >> shift) & mask);             \
+      T wt_op = static_cast<T>((wt[i] >> shift) & mask);             \
+      res |= (static_cast<uint64_t>(ws_op + wt_op) & mask) << shift; \
+    }                                                                \
+    wd[i] = res;                                                     \
+  }
 
-#define ASUB_S_DF(T, lanes, mask)                                       \
-  uint64_t res = 0;                                                     \
-  int size_in_bits = kMSARegSize / lanes;                               \
-  for (int i = 0; i < lanes / 2; ++i) {                                 \
-    uint64_t shift = size_in_bits * i;                                  \
-    T ws_op = static_cast<T>((ws >> shift) & mask);                     \
-    T wt_op = static_cast<T>((wt >> shift) & mask);                     \
-    res |= (static_cast<uint64_t>(Abs(ws_op - wt_op)) & mask) << shift; \
-  }                                                                     \
-  return res
+#define SUBV_DF(T, lanes, mask)                                      \
+  int size_in_bits = kMSARegSize / lanes;                            \
+  for (int i = 0; i < 2; i++) {                                      \
+    uint64_t res = 0;                                                \
+    for (int j = 0; j < lanes / 2; ++j) {                            \
+      uint64_t shift = size_in_bits * j;                             \
+      T ws_op = static_cast<T>((ws[i] >> shift) & mask);             \
+      T wt_op = static_cast<T>((wt[i] >> shift) & mask);             \
+      res |= (static_cast<uint64_t>(ws_op - wt_op) & mask) << shift; \
+    }                                                                \
+    wd[i] = res;                                                     \
+  }
 
-#define ASUB_U_DF(T, lanes, mask)                                  \
-  uint64_t res = 0;                                                \
-  int size_in_bits = kMSARegSize / lanes;                          \
-  for (int i = 0; i < lanes / 2; ++i) {                            \
-    uint64_t shift = size_in_bits * i;                             \
-    T ws_op = static_cast<T>((ws >> shift) & mask);                \
-    T wt_op = static_cast<T>((wt >> shift) & mask);                \
-    res |= (static_cast<uint64_t>(ws_op > wt_op ? ws_op - wt_op    \
-                                                : wt_op - ws_op) & \
-            mask)                                                  \
-           << shift;                                               \
-  }                                                                \
-  return res
+#define MAX_DF(T, lanes, mask)                                              \
+  int size_in_bits = kMSARegSize / lanes;                                   \
+  for (int i = 0; i < 2; i++) {                                             \
+    uint64_t res = 0;                                                       \
+    for (int j = 0; j < lanes / 2; ++j) {                                   \
+      uint64_t shift = size_in_bits * j;                                    \
+      T ws_op = static_cast<T>((ws[i] >> shift) & mask);                    \
+      T wt_op = static_cast<T>((wt[i] >> shift) & mask);                    \
+      res |= (static_cast<uint64_t>(Max<T>(ws_op, wt_op)) & mask) << shift; \
+    }                                                                       \
+    wd[i] = res;                                                            \
+  }
 
-#define MULV_DF(T, lanes, mask)                                    \
-  uint64_t res = 0;                                                \
-  int size_in_bits = kMSARegSize / lanes;                          \
-  for (int i = 0; i < lanes / 2; ++i) {                            \
-    uint64_t shift = size_in_bits * i;                             \
-    T ws_op = static_cast<T>((ws >> shift) & mask);                \
-    T wt_op = static_cast<T>((wt >> shift) & mask);                \
-    res |= (static_cast<uint64_t>(ws_op * wt_op) & mask) << shift; \
-  }                                                                \
-  return res
+#define MIN_DF(T, lanes, mask)                                              \
+  int size_in_bits = kMSARegSize / lanes;                                   \
+  for (int i = 0; i < 2; i++) {                                             \
+    uint64_t res = 0;                                                       \
+    for (int j = 0; j < lanes / 2; ++j) {                                   \
+      uint64_t shift = size_in_bits * j;                                    \
+      T ws_op = static_cast<T>((ws[i] >> shift) & mask);                    \
+      T wt_op = static_cast<T>((wt[i] >> shift) & mask);                    \
+      res |= (static_cast<uint64_t>(Min<T>(ws_op, wt_op)) & mask) << shift; \
+    }                                                                       \
+    wd[i] = res;                                                            \
+  }
 
-#define MADDV_DF(T, lanes, mask)                                           \
-  uint64_t res = 0;                                                        \
+#define MAXA_DF(T, lanes, mask)                                               \
+  int size_in_bits = kMSARegSize / lanes;                                     \
+  for (int i = 0; i < 2; i++) {                                               \
+    uint64_t res = 0;                                                         \
+    for (int j = 0; j < lanes / 2; ++j) {                                     \
+      uint64_t shift = size_in_bits * j;                                      \
+      T ws_op = static_cast<T>((ws[i] >> shift) & mask);                      \
+      T wt_op = static_cast<T>((wt[i] >> shift) & mask);                      \
+      res |=                                                                  \
+          (static_cast<uint64_t>(Nabs(ws_op) < Nabs(wt_op) ? ws_op : wt_op) & \
+           mask)                                                              \
+          << shift;                                                           \
+    }                                                                         \
+    wd[i] = res;                                                              \
+  }
+
+#define MINA_DF(T, lanes, mask)                                               \
+  int size_in_bits = kMSARegSize / lanes;                                     \
+  for (int i = 0; i < 2; i++) {                                               \
+    uint64_t res = 0;                                                         \
+    for (int j = 0; j < lanes / 2; ++j) {                                     \
+      uint64_t shift = size_in_bits * j;                                      \
+      T ws_op = static_cast<T>((ws[i] >> shift) & mask);                      \
+      T wt_op = static_cast<T>((wt[i] >> shift) & mask);                      \
+      res |=                                                                  \
+          (static_cast<uint64_t>(Nabs(ws_op) > Nabs(wt_op) ? ws_op : wt_op) & \
+           mask)                                                              \
+          << shift;                                                           \
+    }                                                                         \
+    wd[i] = res;                                                              \
+  }
+
+#define CEQ_DF(T, lanes, mask)                                               \
+  int size_in_bits = kMSARegSize / lanes;                                    \
+  for (int i = 0; i < 2; i++) {                                              \
+    uint64_t res = 0;                                                        \
+    for (int j = 0; j < lanes / 2; ++j) {                                    \
+      uint64_t shift = size_in_bits * j;                                     \
+      T ws_op = static_cast<T>((ws[i] >> shift) & mask);                     \
+      T wt_op = static_cast<T>((wt[i] >> shift) & mask);                     \
+      res |= (static_cast<uint64_t>(!Compare(ws_op, wt_op) ? -1ull : 0ull) & \
+              mask)                                                          \
+             << shift;                                                       \
+    }                                                                        \
+    wd[i] = res;                                                             \
+  }
+
+#define CLT_DF(T, lanes, mask)                                              \
+  int size_in_bits = kMSARegSize / lanes;                                   \
+  for (int i = 0; i < 2; i++) {                                             \
+    uint64_t res = 0;                                                       \
+    for (int j = 0; j < lanes / 2; ++j) {                                   \
+      uint64_t shift = size_in_bits * j;                                    \
+      T ws_op = static_cast<T>((ws[i] >> shift) & mask);                    \
+      T wt_op = static_cast<T>((wt[i] >> shift) & mask);                    \
+      res |= (static_cast<uint64_t>((Compare(ws_op, wt_op) == -1) ? -1ull   \
+                                                                  : 0ull) & \
+              mask)                                                         \
+             << shift;                                                      \
+    }                                                                       \
+    wd[i] = res;                                                            \
+  }
+
+#define CLE_DF(T, lanes, mask)                                             \
   int size_in_bits = kMSARegSize / lanes;                                  \
-  for (int i = 0; i < lanes / 2; ++i) {                                    \
-    uint64_t shift = size_in_bits * i;                                     \
-    T ws_op = static_cast<T>((ws >> shift) & mask);                        \
-    T wt_op = static_cast<T>((wt >> shift) & mask);                        \
-    T wd_op = static_cast<T>((wd >> shift) & mask);                        \
-    res |= (static_cast<uint64_t>(wd_op + ws_op * wt_op) & mask) << shift; \
-  }                                                                        \
-  return res
+  for (int i = 0; i < 2; i++) {                                            \
+    uint64_t res = 0;                                                      \
+    for (int j = 0; j < lanes / 2; ++j) {                                  \
+      uint64_t shift = size_in_bits * j;                                   \
+      T ws_op = static_cast<T>((ws[i] >> shift) & mask);                   \
+      T wt_op = static_cast<T>((wt[i] >> shift) & mask);                   \
+      res |= (static_cast<uint64_t>((Compare(ws_op, wt_op) != 1) ? -1ull   \
+                                                                 : 0ull) & \
+              mask)                                                        \
+             << shift;                                                     \
+    }                                                                      \
+    wd[i] = res;                                                           \
+  }
 
-#define MSUBV_DF(T, lanes, mask)                                           \
-  uint64_t res = 0;                                                        \
-  int size_in_bits = kMSARegSize / lanes;                                  \
-  for (int i = 0; i < lanes / 2; ++i) {                                    \
-    uint64_t shift = size_in_bits * i;                                     \
-    T ws_op = static_cast<T>((ws >> shift) & mask);                        \
-    T wt_op = static_cast<T>((wt >> shift) & mask);                        \
-    T wd_op = static_cast<T>((wd >> shift) & mask);                        \
-    res |= (static_cast<uint64_t>(wd_op - ws_op * wt_op) & mask) << shift; \
-  }                                                                        \
-  return res
+#define ADD_A_DF(T, lanes, mask)                                               \
+  int size_in_bits = kMSARegSize / lanes;                                      \
+  for (int i = 0; i < 2; i++) {                                                \
+    uint64_t res = 0;                                                          \
+    for (int j = 0; j < lanes / 2; ++j) {                                      \
+      uint64_t shift = size_in_bits * j;                                       \
+      T ws_op = static_cast<T>((ws[i] >> shift) & mask);                       \
+      T wt_op = static_cast<T>((wt[i] >> shift) & mask);                       \
+      res |= (static_cast<uint64_t>(Abs(ws_op) + Abs(wt_op)) & mask) << shift; \
+    }                                                                          \
+    wd[i] = res;                                                               \
+  }
 
-#define DIV_DF(T, lanes, mask)                                     \
-  uint64_t res = 0;                                                \
-  int size_in_bits = kMSARegSize / lanes;                          \
-  for (int i = 0; i < lanes / 2; ++i) {                            \
-    uint64_t shift = size_in_bits * i;                             \
-    T ws_op = static_cast<T>((ws >> shift) & mask);                \
-    T wt_op = static_cast<T>((wt >> shift) & mask);                \
-    if (wt_op == 0) {                                              \
-      res = Unpredictable;                                         \
-      break;                                                       \
-    }                                                              \
-    res |= (static_cast<uint64_t>(ws_op / wt_op) & mask) << shift; \
-  }                                                                \
-  return res
+#define ADDS_A_DF(T, lanes, mask)                              \
+  int size_in_bits = kMSARegSize / lanes;                      \
+  for (int i = 0; i < 2; i++) {                                \
+    uint64_t res = 0;                                          \
+    for (int j = 0; j < lanes / 2; ++j) {                      \
+      uint64_t shift = size_in_bits * j;                       \
+      T ws_op = Nabs(static_cast<T>((ws[i] >> shift) & mask)); \
+      T wt_op = Nabs(static_cast<T>((wt[i] >> shift) & mask)); \
+      T r;                                                     \
+      if (ws_op < -std::numeric_limits<T>::max() - wt_op) {    \
+        r = std::numeric_limits<T>::max();                     \
+      } else {                                                 \
+        r = -(ws_op + wt_op);                                  \
+      }                                                        \
+      res |= (static_cast<uint64_t>(r) & mask) << shift;       \
+    }                                                          \
+    wd[i] = res;                                               \
+  }
 
-#define MOD_DF(T, lanes, mask)                                            \
-  uint64_t res = 0;                                                       \
+#define ADDS_DF(T, lanes, mask)                                        \
+  int size_in_bits = kMSARegSize / lanes;                              \
+  for (int i = 0; i < 2; i++) {                                        \
+    uint64_t res = 0;                                                  \
+    for (int j = 0; j < lanes / 2; ++j) {                              \
+      uint64_t shift = size_in_bits * j;                               \
+      T ws_op = static_cast<T>((ws[i] >> shift) & mask);               \
+      T wt_op = static_cast<T>((wt[i] >> shift) & mask);               \
+      res |= (static_cast<uint64_t>(SaturateAdd(ws_op, wt_op)) & mask) \
+             << shift;                                                 \
+    }                                                                  \
+    wd[i] = res;                                                       \
+  }
+
+#define AVE_DF(T, lanes, mask)                                       \
+  int size_in_bits = kMSARegSize / lanes;                            \
+  for (int i = 0; i < 2; i++) {                                      \
+    uint64_t res = 0;                                                \
+    for (int j = 0; j < lanes / 2; ++j) {                            \
+      uint64_t shift = size_in_bits * j;                             \
+      T ws_op = static_cast<T>((ws[i] >> shift) & mask);             \
+      T wt_op = static_cast<T>((wt[i] >> shift) & mask);             \
+      res |= (static_cast<uint64_t>(                                 \
+                 ((wt_op & ws_op) + ((ws_op ^ wt_op) >> 1)) & mask)) \
+             << shift;                                               \
+    }                                                                \
+    wd[i] = res;                                                     \
+  }
+
+#define AVER_DF(T, lanes, mask)                                      \
+  int size_in_bits = kMSARegSize / lanes;                            \
+  for (int i = 0; i < 2; i++) {                                      \
+    uint64_t res = 0;                                                \
+    for (int j = 0; j < lanes / 2; ++j) {                            \
+      uint64_t shift = size_in_bits * j;                             \
+      T ws_op = static_cast<T>((ws[i] >> shift) & mask);             \
+      T wt_op = static_cast<T>((wt[i] >> shift) & mask);             \
+      res |= (static_cast<uint64_t>(                                 \
+                 ((wt_op | ws_op) - ((ws_op ^ wt_op) >> 1)) & mask)) \
+             << shift;                                               \
+    }                                                                \
+    wd[i] = res;                                                     \
+  }
+
+#define SUBS_DF(T, lanes, mask)                                        \
+  int size_in_bits = kMSARegSize / lanes;                              \
+  for (int i = 0; i < 2; i++) {                                        \
+    uint64_t res = 0;                                                  \
+    for (int j = 0; j < lanes / 2; ++j) {                              \
+      uint64_t shift = size_in_bits * j;                               \
+      T ws_op = static_cast<T>((ws[i] >> shift) & mask);               \
+      T wt_op = static_cast<T>((wt[i] >> shift) & mask);               \
+      res |= (static_cast<uint64_t>(SaturateSub(ws_op, wt_op)) & mask) \
+             << shift;                                                 \
+    }                                                                  \
+    wd[i] = res;                                                       \
+  }
+
+#define SUBSUS_U_DF(T, lanes, mask)                           \
+  typedef typename std::make_unsigned<T>::type uT;            \
+  int size_in_bits = kMSARegSize / lanes;                     \
+  for (int i = 0; i < 2; i++) {                               \
+    uint64_t res = 0;                                         \
+    for (int j = 0; j < lanes / 2; ++j) {                     \
+      uint64_t shift = size_in_bits * j;                      \
+      uT ws_op = static_cast<uT>((ws[i] >> shift) & mask);    \
+      T wt_op = static_cast<T>((wt[i] >> shift) & mask);      \
+      T r;                                                    \
+      if (wt_op > 0) {                                        \
+        uT wtu = static_cast<uT>(wt_op);                      \
+        if (wtu > ws_op) {                                    \
+          r = 0;                                              \
+        } else {                                              \
+          r = static_cast<T>(ws_op - wtu);                    \
+        }                                                     \
+      } else {                                                \
+        if (ws_op > std::numeric_limits<uT>::max() + wt_op) { \
+          r = static_cast<T>(std::numeric_limits<uT>::max()); \
+        } else {                                              \
+          r = static_cast<T>(ws_op - wt_op);                  \
+        }                                                     \
+      }                                                       \
+      res |= (static_cast<uint64_t>(r) & mask) << shift;      \
+    }                                                         \
+    wd[i] = res;                                              \
+  }
+
+#define SUBSUU_S_DF(T, lanes, mask)                        \
+  typedef typename std::make_unsigned<T>::type uT;         \
+  int size_in_bits = kMSARegSize / lanes;                  \
+  for (int i = 0; i < 2; i++) {                            \
+    uint64_t res = 0;                                      \
+    for (int j = 0; j < lanes / 2; ++j) {                  \
+      uint64_t shift = size_in_bits * j;                   \
+      uT ws_op = static_cast<uT>((ws[i] >> shift) & mask); \
+      uT wt_op = static_cast<uT>((wt[i] >> shift) & mask); \
+      uT wdu;                                              \
+      T r;                                                 \
+      if (ws_op > wt_op) {                                 \
+        wdu = ws_op - wt_op;                               \
+        if (wdu > std::numeric_limits<T>::max()) {         \
+          r = std::numeric_limits<T>::max();               \
+        } else {                                           \
+          r = static_cast<T>(wdu);                         \
+        }                                                  \
+      } else {                                             \
+        wdu = wt_op - ws_op;                               \
+        CHECK(-std::numeric_limits<T>::max() ==            \
+              std::numeric_limits<T>::min() + 1);          \
+        if (wdu <= std::numeric_limits<T>::max()) {        \
+          r = -static_cast<T>(wdu);                        \
+        } else {                                           \
+          r = std::numeric_limits<T>::min();               \
+        }                                                  \
+      }                                                    \
+      res |= (static_cast<uint64_t>(r) & mask) << shift;   \
+    }                                                      \
+    wd[i] = res;                                           \
+  }
+
+#define ASUB_S_DF(T, lanes, mask)                                         \
   int size_in_bits = kMSARegSize / lanes;                                 \
-  for (int i = 0; i < lanes / 2; ++i) {                                   \
-    uint64_t shift = size_in_bits * i;                                    \
-    T ws_op = static_cast<T>((ws >> shift) & mask);                       \
-    T wt_op = static_cast<T>((wt >> shift) & mask);                       \
-    if (wt_op == 0) {                                                     \
-      res = Unpredictable;                                                \
-      break;                                                              \
+  for (int i = 0; i < 2; i++) {                                           \
+    uint64_t res = 0;                                                     \
+    for (int j = 0; j < lanes / 2; ++j) {                                 \
+      uint64_t shift = size_in_bits * j;                                  \
+      T ws_op = static_cast<T>((ws[i] >> shift) & mask);                  \
+      T wt_op = static_cast<T>((wt[i] >> shift) & mask);                  \
+      res |= (static_cast<uint64_t>(Abs(ws_op - wt_op)) & mask) << shift; \
     }                                                                     \
-    res |= (static_cast<uint64_t>(wt_op != 0 ? ws_op % wt_op : 0) & mask) \
-           << shift;                                                      \
-  }                                                                       \
-  return res
+    wd[i] = res;                                                          \
+  }
 
-#define SRAR_DF(T, lanes, mask)                                                \
-  uint64_t res = 0;                                                            \
-  int size_in_bits = kMSARegSize / lanes;                                      \
-  for (int i = 0; i < lanes / 2; ++i) {                                        \
-    uint64_t shift = size_in_bits * i;                                         \
-    T src_op = static_cast<T>((ws >> shift) & mask);                           \
-    int shift_op = ((wt >> shift) & mask) % size_in_bits;                      \
-    uint32_t bit = shift_op == 0 ? 0 : src_op >> (shift_op - 1) & 1;           \
-    res |=                                                                     \
-        (static_cast<uint64_t>(ArithmeticShiftRight(src_op, shift_op) + bit) & \
-         mask)                                                                 \
-        << shift;                                                              \
-  }                                                                            \
-  return res
+#define ASUB_U_DF(T, lanes, mask)                                    \
+  int size_in_bits = kMSARegSize / lanes;                            \
+  for (int i = 0; i < 2; i++) {                                      \
+    uint64_t res = 0;                                                \
+    for (int j = 0; j < lanes / 2; ++j) {                            \
+      uint64_t shift = size_in_bits * j;                             \
+      T ws_op = static_cast<T>((ws[i] >> shift) & mask);             \
+      T wt_op = static_cast<T>((wt[i] >> shift) & mask);             \
+      res |= (static_cast<uint64_t>(ws_op > wt_op ? ws_op - wt_op    \
+                                                  : wt_op - ws_op) & \
+              mask)                                                  \
+             << shift;                                               \
+    }                                                                \
+    wd[i] = res;                                                     \
+  }
+
+#define MULV_DF(T, lanes, mask)                                      \
+  int size_in_bits = kMSARegSize / lanes;                            \
+  for (int i = 0; i < 2; i++) {                                      \
+    uint64_t res = 0;                                                \
+    for (int j = 0; j < lanes / 2; ++j) {                            \
+      uint64_t shift = size_in_bits * j;                             \
+      T ws_op = static_cast<T>((ws[i] >> shift) & mask);             \
+      T wt_op = static_cast<T>((wt[i] >> shift) & mask);             \
+      res |= (static_cast<uint64_t>(ws_op * wt_op) & mask) << shift; \
+    }                                                                \
+    wd[i] = res;                                                     \
+  }
+
+#define MADDV_DF(T, lanes, mask)                                             \
+  int size_in_bits = kMSARegSize / lanes;                                    \
+  for (int i = 0; i < 2; i++) {                                              \
+    uint64_t res = 0;                                                        \
+    for (int j = 0; j < lanes / 2; ++j) {                                    \
+      uint64_t shift = size_in_bits * j;                                     \
+      T ws_op = static_cast<T>((ws[i] >> shift) & mask);                     \
+      T wt_op = static_cast<T>((wt[i] >> shift) & mask);                     \
+      T wd_op = static_cast<T>((wd[i] >> shift) & mask);                     \
+      res |= (static_cast<uint64_t>(wd_op + ws_op * wt_op) & mask) << shift; \
+    }                                                                        \
+    wd[i] = res;                                                             \
+  }
+
+#define MSUBV_DF(T, lanes, mask)                                             \
+  int size_in_bits = kMSARegSize / lanes;                                    \
+  for (int i = 0; i < 2; i++) {                                              \
+    uint64_t res = 0;                                                        \
+    for (int j = 0; j < lanes / 2; ++j) {                                    \
+      uint64_t shift = size_in_bits * j;                                     \
+      T ws_op = static_cast<T>((ws[i] >> shift) & mask);                     \
+      T wt_op = static_cast<T>((wt[i] >> shift) & mask);                     \
+      T wd_op = static_cast<T>((wd[i] >> shift) & mask);                     \
+      res |= (static_cast<uint64_t>(wd_op - ws_op * wt_op) & mask) << shift; \
+    }                                                                        \
+    wd[i] = res;                                                             \
+  }
+
+#define DIV_DF(T, lanes, mask)                                       \
+  int size_in_bits = kMSARegSize / lanes;                            \
+  for (int i = 0; i < 2; i++) {                                      \
+    uint64_t res = 0;                                                \
+    for (int j = 0; j < lanes / 2; ++j) {                            \
+      uint64_t shift = size_in_bits * j;                             \
+      T ws_op = static_cast<T>((ws[i] >> shift) & mask);             \
+      T wt_op = static_cast<T>((wt[i] >> shift) & mask);             \
+      if (wt_op == 0) {                                              \
+        res = Unpredictable;                                         \
+        break;                                                       \
+      }                                                              \
+      res |= (static_cast<uint64_t>(ws_op / wt_op) & mask) << shift; \
+    }                                                                \
+    wd[i] = res;                                                     \
+  }
+
+#define MOD_DF(T, lanes, mask)                                              \
+  int size_in_bits = kMSARegSize / lanes;                                   \
+  for (int i = 0; i < 2; i++) {                                             \
+    uint64_t res = 0;                                                       \
+    for (int j = 0; j < lanes / 2; ++j) {                                   \
+      uint64_t shift = size_in_bits * j;                                    \
+      T ws_op = static_cast<T>((ws[i] >> shift) & mask);                    \
+      T wt_op = static_cast<T>((wt[i] >> shift) & mask);                    \
+      if (wt_op == 0) {                                                     \
+        res = Unpredictable;                                                \
+        break;                                                              \
+      }                                                                     \
+      res |= (static_cast<uint64_t>(wt_op != 0 ? ws_op % wt_op : 0) & mask) \
+             << shift;                                                      \
+    }                                                                       \
+    wd[i] = res;                                                            \
+  }
+
+#define SRAR_DF(T, lanes, mask)                                              \
+  int size_in_bits = kMSARegSize / lanes;                                    \
+  for (int i = 0; i < 2; i++) {                                              \
+    uint64_t res = 0;                                                        \
+    for (int j = 0; j < lanes / 2; ++j) {                                    \
+      uint64_t shift = size_in_bits * j;                                     \
+      T src_op = static_cast<T>((ws[i] >> shift) & mask);                    \
+      int shift_op = ((wt[i] >> shift) & mask) % size_in_bits;               \
+      uint32_t bit = shift_op == 0 ? 0 : src_op >> (shift_op - 1) & 1;       \
+      res |= (static_cast<uint64_t>(ArithmeticShiftRight(src_op, shift_op) + \
+                                    bit) &                                   \
+              mask)                                                          \
+             << shift;                                                       \
+    }                                                                        \
+    wd[i] = res;                                                             \
+  }
+
+#define PCKEV_DF(T, lanes, mask)        \
+  T* ws_p = reinterpret_cast<T*>(ws);   \
+  T* wt_p = reinterpret_cast<T*>(wt);   \
+  T* wd_p = reinterpret_cast<T*>(wd);   \
+  for (int i = 0; i < lanes / 2; ++i) { \
+    wd_p[i] = wt_p[2 * i];              \
+    wd_p[i + lanes / 2] = ws_p[2 * i];  \
+  }
+
+#define PCKOD_DF(T, lanes, mask)           \
+  T* ws_p = reinterpret_cast<T*>(ws);      \
+  T* wt_p = reinterpret_cast<T*>(wt);      \
+  T* wd_p = reinterpret_cast<T*>(wd);      \
+  for (int i = 0; i < lanes / 2; ++i) {    \
+    wd_p[i] = wt_p[2 * i + 1];             \
+    wd_p[i + lanes / 2] = ws_p[2 * i + 1]; \
+  }
+
+#define ILVL_DF(T, lanes, mask)            \
+  T* ws_p = reinterpret_cast<T*>(ws);      \
+  T* wt_p = reinterpret_cast<T*>(wt);      \
+  T* wd_p = reinterpret_cast<T*>(wd);      \
+  for (int i = 0; i < lanes / 2; ++i) {    \
+    wd_p[2 * i] = wt_p[i + lanes / 2];     \
+    wd_p[2 * i + 1] = ws_p[i + lanes / 2]; \
+  }
+
+#define ILVR_DF(T, lanes, mask)         \
+  T* ws_p = reinterpret_cast<T*>(ws);   \
+  T* wt_p = reinterpret_cast<T*>(wt);   \
+  T* wd_p = reinterpret_cast<T*>(wd);   \
+  for (int i = 0; i < lanes / 2; ++i) { \
+    wd_p[2 * i] = wt_p[i];              \
+    wd_p[2 * i + 1] = ws_p[i];          \
+  }
+
+#define ILVEV_DF(T, lanes, mask)        \
+  T* ws_p = reinterpret_cast<T*>(ws);   \
+  T* wt_p = reinterpret_cast<T*>(wt);   \
+  T* wd_p = reinterpret_cast<T*>(wd);   \
+  for (int i = 0; i < lanes / 2; ++i) { \
+    wd_p[2 * i] = wt_p[2 * i];          \
+    wd_p[2 * i + 1] = ws_p[2 * i];      \
+  }
+
+#define ILVOD_DF(T, lanes, mask)        \
+  T* ws_p = reinterpret_cast<T*>(ws);   \
+  T* wt_p = reinterpret_cast<T*>(wt);   \
+  T* wd_p = reinterpret_cast<T*>(wd);   \
+  for (int i = 0; i < lanes / 2; ++i) { \
+    wd_p[2 * i] = wt_p[2 * i + 1];      \
+    wd_p[2 * i + 1] = ws_p[2 * i + 1];  \
+  }
+
+#define VSHF_DF(T, lanes, mask)                        \
+  T* ws_p = reinterpret_cast<T*>(ws);                  \
+  T* wt_p = reinterpret_cast<T*>(wt);                  \
+  T* wd_p = reinterpret_cast<T*>(wd);                  \
+  const int mask_not_valid = 0xC0;                     \
+  const int mask_6bits = 0x3F;                         \
+  for (int i = 0; i < lanes; ++i) {                    \
+    if ((wd_p[i] & mask_not_valid)) {                  \
+      wd_p[i] = 0;                                     \
+    } else {                                           \
+      int k = (wd_p[i] & mask_6bits) % (lanes * 2);    \
+      wd_p[i] = k > lanes ? ws_p[k - lanes] : wt_p[k]; \
+    }                                                  \
+  }
+
+#define HADD_DF(T, T_small, lanes)                                           \
+  T_small* ws_p = reinterpret_cast<T_small*>(ws);                            \
+  T_small* wt_p = reinterpret_cast<T_small*>(wt);                            \
+  T* wd_p = reinterpret_cast<T*>(wd);                                        \
+  for (int i = 0; i < lanes; ++i) {                                          \
+    wd_p[i] = static_cast<T>(ws_p[2 * i + 1]) + static_cast<T>(wt_p[2 * i]); \
+  }
+
+#define HSUB_DF(T, T_small, lanes)                                           \
+  T_small* ws_p = reinterpret_cast<T_small*>(ws);                            \
+  T_small* wt_p = reinterpret_cast<T_small*>(wt);                            \
+  T* wd_p = reinterpret_cast<T*>(wd);                                        \
+  for (int i = 0; i < lanes; ++i) {                                          \
+    wd_p[i] = static_cast<T>(ws_p[2 * i + 1]) - static_cast<T>(wt_p[2 * i]); \
+  }
 
 #define TEST_CASE(V)                                              \
   V(sll_b, SLL_DF, uint8_t, kMSALanesByte, UINT8_MAX)             \
   V(sll_h, SLL_DF, uint16_t, kMSALanesHalf, UINT16_MAX)           \
   V(sll_w, SLL_DF, uint32_t, kMSALanesWord, UINT32_MAX)           \
   V(sll_d, SLL_DF, uint64_t, kMSALanesDword, UINT64_MAX)          \
-  V(sra_b, SRA_DF, int8_t, kMSALanesByte, UINT8_MAX)              \
-  V(sra_h, SRA_DF, int16_t, kMSALanesHalf, UINT16_MAX)            \
-  V(sra_w, SRA_DF, int32_t, kMSALanesWord, UINT32_MAX)            \
-  V(sra_d, SRA_DF, int64_t, kMSALanesDword, UINT64_MAX)           \
   V(srl_b, SRL_DF, uint8_t, kMSALanesByte, UINT8_MAX)             \
   V(srl_h, SRL_DF, uint16_t, kMSALanesHalf, UINT16_MAX)           \
   V(srl_w, SRL_DF, uint32_t, kMSALanesWord, UINT32_MAX)           \
@@ -10170,18 +10596,54 @@
   V(mod_u_h, MOD_DF, uint16_t, kMSALanesHalf, UINT16_MAX)         \
   V(mod_u_w, MOD_DF, uint32_t, kMSALanesWord, UINT32_MAX)         \
   V(mod_u_d, MOD_DF, uint64_t, kMSALanesDword, UINT64_MAX)        \
-  V(srar_b, SRAR_DF, int8_t, kMSALanesByte, UINT8_MAX)            \
-  V(srar_h, SRAR_DF, int16_t, kMSALanesHalf, UINT16_MAX)          \
-  V(srar_w, SRAR_DF, int32_t, kMSALanesWord, UINT32_MAX)          \
-  V(srar_d, SRAR_DF, int64_t, kMSALanesDword, UINT64_MAX)         \
   V(srlr_b, SRAR_DF, uint8_t, kMSALanesByte, UINT8_MAX)           \
   V(srlr_h, SRAR_DF, uint16_t, kMSALanesHalf, UINT16_MAX)         \
   V(srlr_w, SRAR_DF, uint32_t, kMSALanesWord, UINT32_MAX)         \
-  V(srlr_d, SRAR_DF, uint64_t, kMSALanesDword, UINT64_MAX)
+  V(srlr_d, SRAR_DF, uint64_t, kMSALanesDword, UINT64_MAX)        \
+  V(pckev_b, PCKEV_DF, uint8_t, kMSALanesByte, UINT8_MAX)         \
+  V(pckev_h, PCKEV_DF, uint16_t, kMSALanesHalf, UINT16_MAX)       \
+  V(pckev_w, PCKEV_DF, uint32_t, kMSALanesWord, UINT32_MAX)       \
+  V(pckev_d, PCKEV_DF, uint64_t, kMSALanesDword, UINT64_MAX)      \
+  V(pckod_b, PCKOD_DF, uint8_t, kMSALanesByte, UINT8_MAX)         \
+  V(pckod_h, PCKOD_DF, uint16_t, kMSALanesHalf, UINT16_MAX)       \
+  V(pckod_w, PCKOD_DF, uint32_t, kMSALanesWord, UINT32_MAX)       \
+  V(pckod_d, PCKOD_DF, uint64_t, kMSALanesDword, UINT64_MAX)      \
+  V(ilvl_b, ILVL_DF, uint8_t, kMSALanesByte, UINT8_MAX)           \
+  V(ilvl_h, ILVL_DF, uint16_t, kMSALanesHalf, UINT16_MAX)         \
+  V(ilvl_w, ILVL_DF, uint32_t, kMSALanesWord, UINT32_MAX)         \
+  V(ilvl_d, ILVL_DF, uint64_t, kMSALanesDword, UINT64_MAX)        \
+  V(ilvr_b, ILVR_DF, uint8_t, kMSALanesByte, UINT8_MAX)           \
+  V(ilvr_h, ILVR_DF, uint16_t, kMSALanesHalf, UINT16_MAX)         \
+  V(ilvr_w, ILVR_DF, uint32_t, kMSALanesWord, UINT32_MAX)         \
+  V(ilvr_d, ILVR_DF, uint64_t, kMSALanesDword, UINT64_MAX)        \
+  V(ilvev_b, ILVEV_DF, uint8_t, kMSALanesByte, UINT8_MAX)         \
+  V(ilvev_h, ILVEV_DF, uint16_t, kMSALanesHalf, UINT16_MAX)       \
+  V(ilvev_w, ILVEV_DF, uint32_t, kMSALanesWord, UINT32_MAX)       \
+  V(ilvev_d, ILVEV_DF, uint64_t, kMSALanesDword, UINT64_MAX)      \
+  V(ilvod_b, ILVOD_DF, uint8_t, kMSALanesByte, UINT8_MAX)         \
+  V(ilvod_h, ILVOD_DF, uint16_t, kMSALanesHalf, UINT16_MAX)       \
+  V(ilvod_w, ILVOD_DF, uint32_t, kMSALanesWord, UINT32_MAX)       \
+  V(ilvod_d, ILVOD_DF, uint64_t, kMSALanesDword, UINT64_MAX)      \
+  V(vshf_b, VSHF_DF, uint8_t, kMSALanesByte, UINT8_MAX)           \
+  V(vshf_h, VSHF_DF, uint16_t, kMSALanesHalf, UINT16_MAX)         \
+  V(vshf_w, VSHF_DF, uint32_t, kMSALanesWord, UINT32_MAX)         \
+  V(vshf_d, VSHF_DF, uint64_t, kMSALanesDword, UINT64_MAX)        \
+  V(hadd_s_h, HADD_DF, int16_t, int8_t, kMSALanesHalf)            \
+  V(hadd_s_w, HADD_DF, int32_t, int16_t, kMSALanesWord)           \
+  V(hadd_s_d, HADD_DF, int64_t, int32_t, kMSALanesDword)          \
+  V(hadd_u_h, HADD_DF, uint16_t, uint8_t, kMSALanesHalf)          \
+  V(hadd_u_w, HADD_DF, uint32_t, uint16_t, kMSALanesWord)         \
+  V(hadd_u_d, HADD_DF, uint64_t, uint32_t, kMSALanesDword)        \
+  V(hsub_s_h, HSUB_DF, int16_t, int8_t, kMSALanesHalf)            \
+  V(hsub_s_w, HSUB_DF, int32_t, int16_t, kMSALanesWord)           \
+  V(hsub_s_d, HSUB_DF, int64_t, int32_t, kMSALanesDword)          \
+  V(hsub_u_h, HSUB_DF, uint16_t, uint8_t, kMSALanesHalf)          \
+  V(hsub_u_w, HSUB_DF, uint32_t, uint16_t, kMSALanesWord)         \
+  V(hsub_u_d, HSUB_DF, uint64_t, uint32_t, kMSALanesDword)
 
 #define RUN_TEST(instr, verify, type, lanes, mask)                       \
   run_msa_3r(&tc[i], [](MacroAssembler& assm) { __ instr(w2, w1, w0); }, \
-             [](uint64_t ws, uint64_t wt, uint64_t wd) {                 \
+             [](uint64_t* ws, uint64_t* wt, uint64_t* wd) {              \
                verify(type, lanes, mask);                                \
              });
 
@@ -10189,9 +10651,41 @@
     TEST_CASE(RUN_TEST)
   }
 
+#define RUN_TEST2(instr, verify, type, lanes, mask)                      \
+  for (unsigned i = 0; i < arraysize(tc); i++) {                         \
+    for (unsigned j = 0; j < 3; j++) {                                   \
+      for (unsigned k = 0; k < lanes; k++) {                             \
+        type* element = reinterpret_cast<type*>(&tc[i]);                 \
+        element[k + j * lanes] &= std::numeric_limits<type>::max();      \
+      }                                                                  \
+    }                                                                    \
+  }                                                                      \
+  run_msa_3r(&tc[i], [](MacroAssembler& assm) { __ instr(w2, w1, w0); }, \
+             [](uint64_t* ws, uint64_t* wt, uint64_t* wd) {              \
+               verify(type, lanes, mask);                                \
+             });
+
+#define TEST_CASE2(V)                                    \
+  V(sra_b, SRA_DF, int8_t, kMSALanesByte, UINT8_MAX)     \
+  V(sra_h, SRA_DF, int16_t, kMSALanesHalf, UINT16_MAX)   \
+  V(sra_w, SRA_DF, int32_t, kMSALanesWord, UINT32_MAX)   \
+  V(sra_d, SRA_DF, int64_t, kMSALanesDword, UINT64_MAX)  \
+  V(srar_b, SRAR_DF, int8_t, kMSALanesByte, UINT8_MAX)   \
+  V(srar_h, SRAR_DF, int16_t, kMSALanesHalf, UINT16_MAX) \
+  V(srar_w, SRAR_DF, int32_t, kMSALanesWord, UINT32_MAX) \
+  V(srar_d, SRAR_DF, int64_t, kMSALanesDword, UINT64_MAX)
+
+  for (size_t i = 0; i < arraysize(tc); ++i) {
+    TEST_CASE2(RUN_TEST2)
+  }
+
+#undef TEST_CASE
+#undef TEST_CASE2
 #undef RUN_TEST
+#undef RUN_TEST2
 #undef SLL_DF
 #undef SRL_DF
+#undef SRA_DF
 #undef BCRL_DF
 #undef BSET_DF
 #undef BNEG_DF
@@ -10222,6 +10716,689 @@
 #undef DIV_DF
 #undef MOD_DF
 #undef SRAR_DF
+#undef PCKEV_DF
+#undef PCKOD_DF
+#undef ILVL_DF
+#undef ILVR_DF
+#undef ILVEV_DF
+#undef ILVOD_DF
+#undef VSHF_DF
+#undef HADD_DF
+#undef HSUB_DF
+}
+
+struct TestCaseMsa3RF {
+  uint64_t ws_lo;
+  uint64_t ws_hi;
+  uint64_t wt_lo;
+  uint64_t wt_hi;
+  uint64_t wd_lo;
+  uint64_t wd_hi;
+};
+
+struct ExpectedResult_MSA3RF {
+  uint64_t exp_res_lo;
+  uint64_t exp_res_hi;
+};
+
+template <typename Func>
+void run_msa_3rf(const struct TestCaseMsa3RF* input,
+                 const struct ExpectedResult_MSA3RF* output,
+                 Func Generate2RInstructionFunc) {
+  Isolate* isolate = CcTest::i_isolate();
+  HandleScope scope(isolate);
+
+  MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  CpuFeatureScope fscope(&assm, MIPS_SIMD);
+  msa_reg_t res;
+
+  load_elements_of_vector(
+      assm, reinterpret_cast<const uint64_t*>(&input->ws_lo), w0, t0, t1);
+  load_elements_of_vector(
+      assm, reinterpret_cast<const uint64_t*>(&input->wt_lo), w1, t0, t1);
+  load_elements_of_vector(
+      assm, reinterpret_cast<const uint64_t*>(&input->wd_lo), w2, t0, t1);
+  Generate2RInstructionFunc(assm);
+  store_elements_of_vector(assm, w2, a0);
+
+  __ jr(ra);
+  __ nop();
+
+  CodeDesc desc;
+  assm.GetCode(isolate, &desc);
+  Handle<Code> code =
+      isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
+#ifdef OBJECT_PRINT
+  code->Print(std::cout);
+#endif
+  auto f = GeneratedCode<F3>::FromCode(*code);
+
+  f.Call(&res, 0, 0, 0, 0);
+
+  CHECK_EQ(output->exp_res_lo, res.d[0]);
+  CHECK_EQ(output->exp_res_hi, res.d[1]);
+}
+
+struct TestCaseMsa3RF_F {
+  float ws_1, ws_2, ws_3, ws_4;
+  float wt_1, wt_2, wt_3, wt_4;
+  float wd_1, wd_2, wd_3, wd_4;
+};
+struct ExpRes_32I {
+  int32_t exp_res_1;
+  int32_t exp_res_2;
+  int32_t exp_res_3;
+  int32_t exp_res_4;
+};
+
+struct TestCaseMsa3RF_D {
+  double ws_lo, ws_hi;
+  double wt_lo, wt_hi;
+  double wd_lo, wd_hi;
+};
+struct ExpRes_64I {
+  int64_t exp_res_lo;
+  int64_t exp_res_hi;
+};
+
+TEST(MSA_floating_point_quiet_compare) {
+  if ((kArchVariant != kMips64r6) || !CpuFeatures::IsSupported(MIPS_SIMD))
+    return;
+
+  CcTest::InitializeVM();
+
+  const float qnan_f = std::numeric_limits<float>::quiet_NaN();
+  const double qnan_d = std::numeric_limits<double>::quiet_NaN();
+  const float inf_f = std::numeric_limits<float>::infinity();
+  const double inf_d = std::numeric_limits<double>::infinity();
+  const int32_t ones = -1;
+
+  const struct TestCaseMsa3RF_F tc_w[]{
+      {qnan_f, -qnan_f, inf_f, 2.14e9f,  // ws
+       qnan_f, 0.f, qnan_f, -2.14e9f,    // wt
+       0, 0, 0, 0},                      // wd
+      {inf_f, -inf_f, -3.4e38f, 1.5e-45f, -inf_f, -inf_f, -inf_f, inf_f, 0, 0,
+       0, 0},
+      {0.f, 19.871e24f, -1.5e-45f, -1.5e-45f, -19.871e24f, 19.871e24f, 1.5e-45f,
+       -1.5e-45f, 0, 0, 0, 0}};
+
+  const struct TestCaseMsa3RF_D tc_d[]{
+      // ws_lo, ws_hi, wt_lo, wt_hi, wd_lo, wd_hi
+      {qnan_d, -qnan_d, qnan_f, 0., 0, 0},
+      {inf_d, 9.22e18, qnan_d, -9.22e18, 0, 0},
+      {inf_d, inf_d, -inf_d, inf_d, 0, 0},
+      {-2.3e-308, 5e-324, -inf_d, inf_d, 0, 0},
+      {0., 24.1e87, -1.6e308, 24.1e87, 0, 0},
+      {-5e-324, -5e-324, 5e-324, -5e-324, 0, 0}};
+
+  const struct ExpectedResult_MSA3RF exp_res_fcaf = {0, 0};
+  const struct ExpRes_32I exp_res_fcun_w[] = {
+      {ones, ones, ones, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}};
+  const struct ExpRes_64I exp_res_fcun_d[] = {{ones, ones}, {ones, 0}, {0, 0},
+                                              {0, 0},       {0, 0},    {0, 0}};
+  const struct ExpRes_32I exp_res_fceq_w[] = {
+      {0, 0, 0, 0}, {0, ones, 0, 0}, {0, ones, 0, ones}};
+  const struct ExpRes_64I exp_res_fceq_d[] = {{0, 0}, {0, 0},    {0, ones},
+                                              {0, 0}, {0, ones}, {0, ones}};
+  const struct ExpRes_32I exp_res_fcueq_w[] = {
+      {ones, ones, ones, 0}, {0, ones, 0, 0}, {0, ones, 0, ones}};
+  const struct ExpRes_64I exp_res_fcueq_d[] = {
+      {ones, ones}, {ones, 0}, {0, ones}, {0, 0}, {0, ones}, {0, ones}};
+  const struct ExpRes_32I exp_res_fclt_w[] = {
+      {0, 0, 0, 0}, {0, 0, 0, ones}, {0, 0, ones, 0}};
+  const struct ExpRes_64I exp_res_fclt_d[] = {{0, 0},    {0, 0}, {0, 0},
+                                              {0, ones}, {0, 0}, {ones, 0}};
+  const struct ExpRes_32I exp_res_fcult_w[] = {
+      {ones, ones, ones, 0}, {0, 0, 0, ones}, {0, 0, ones, 0}};
+  const struct ExpRes_64I exp_res_fcult_d[] = {
+      {ones, ones}, {ones, 0}, {0, 0}, {0, ones}, {0, 0}, {ones, 0}};
+  const struct ExpRes_32I exp_res_fcle_w[] = {
+      {0, 0, 0, 0}, {0, ones, 0, ones}, {0, ones, ones, ones}};
+  const struct ExpRes_64I exp_res_fcle_d[] = {
+      {0, 0}, {0, 0}, {0, ones}, {0, ones}, {0, ones}, {ones, ones}};
+  const struct ExpRes_32I exp_res_fcule_w[] = {
+      {ones, ones, ones, 0}, {0, ones, 0, ones}, {0, ones, ones, ones}};
+  const struct ExpRes_64I exp_res_fcule_d[] = {
+      {ones, ones}, {ones, 0}, {0, ones}, {0, ones}, {0, ones}, {ones, ones}};
+  const struct ExpRes_32I exp_res_fcor_w[] = {
+      {0, 0, 0, ones}, {ones, ones, ones, ones}, {ones, ones, ones, ones}};
+  const struct ExpRes_64I exp_res_fcor_d[] = {{0, 0},       {0, ones},
+                                              {ones, ones}, {ones, ones},
+                                              {ones, ones}, {ones, ones}};
+  const struct ExpRes_32I exp_res_fcune_w[] = {
+      {ones, ones, ones, ones}, {ones, 0, ones, ones}, {ones, 0, ones, 0}};
+  const struct ExpRes_64I exp_res_fcune_d[] = {{ones, ones}, {ones, ones},
+                                               {ones, 0},    {ones, ones},
+                                               {ones, 0},    {ones, 0}};
+  const struct ExpRes_32I exp_res_fcne_w[] = {
+      {0, 0, 0, ones}, {ones, 0, ones, ones}, {ones, 0, ones, 0}};
+  const struct ExpRes_64I exp_res_fcne_d[] = {
+      {0, 0}, {0, ones}, {ones, 0}, {ones, ones}, {ones, 0}, {ones, 0}};
+
+#define TEST_FP_QUIET_COMPARE_W(instruction, src, exp_res)                    \
+  run_msa_3rf(reinterpret_cast<const struct TestCaseMsa3RF*>(src),            \
+              reinterpret_cast<const struct ExpectedResult_MSA3RF*>(exp_res), \
+              [](MacroAssembler& assm) { __ instruction(w2, w0, w1); });
+
+#define TEST_FP_QUIET_COMPARE_D(instruction, src, exp_res)                    \
+  run_msa_3rf(reinterpret_cast<const struct TestCaseMsa3RF*>(src),            \
+              reinterpret_cast<const struct ExpectedResult_MSA3RF*>(exp_res), \
+              [](MacroAssembler& assm) { __ instruction(w2, w0, w1); });
+
+  for (uint64_t i = 0; i < arraysize(tc_w); i++) {
+    TEST_FP_QUIET_COMPARE_W(fcaf_w, &tc_w[i], &exp_res_fcaf)
+    TEST_FP_QUIET_COMPARE_W(fcun_w, &tc_w[i], &exp_res_fcun_w[i])
+    TEST_FP_QUIET_COMPARE_W(fceq_w, &tc_w[i], &exp_res_fceq_w[i])
+    TEST_FP_QUIET_COMPARE_W(fcueq_w, &tc_w[i], &exp_res_fcueq_w[i])
+    TEST_FP_QUIET_COMPARE_W(fclt_w, &tc_w[i], &exp_res_fclt_w[i])
+    TEST_FP_QUIET_COMPARE_W(fcult_w, &tc_w[i], &exp_res_fcult_w[i])
+    TEST_FP_QUIET_COMPARE_W(fcle_w, &tc_w[i], &exp_res_fcle_w[i])
+    TEST_FP_QUIET_COMPARE_W(fcule_w, &tc_w[i], &exp_res_fcule_w[i])
+    TEST_FP_QUIET_COMPARE_W(fcor_w, &tc_w[i], &exp_res_fcor_w[i])
+    TEST_FP_QUIET_COMPARE_W(fcune_w, &tc_w[i], &exp_res_fcune_w[i])
+    TEST_FP_QUIET_COMPARE_W(fcne_w, &tc_w[i], &exp_res_fcne_w[i])
+  }
+  for (uint64_t i = 0; i < arraysize(tc_d); i++) {
+    TEST_FP_QUIET_COMPARE_D(fcaf_d, &tc_d[i], &exp_res_fcaf)
+    TEST_FP_QUIET_COMPARE_D(fcun_d, &tc_d[i], &exp_res_fcun_d[i])
+    TEST_FP_QUIET_COMPARE_D(fceq_d, &tc_d[i], &exp_res_fceq_d[i])
+    TEST_FP_QUIET_COMPARE_D(fcueq_d, &tc_d[i], &exp_res_fcueq_d[i])
+    TEST_FP_QUIET_COMPARE_D(fclt_d, &tc_d[i], &exp_res_fclt_d[i])
+    TEST_FP_QUIET_COMPARE_D(fcult_d, &tc_d[i], &exp_res_fcult_d[i])
+    TEST_FP_QUIET_COMPARE_D(fcle_d, &tc_d[i], &exp_res_fcle_d[i])
+    TEST_FP_QUIET_COMPARE_D(fcule_d, &tc_d[i], &exp_res_fcule_d[i])
+    TEST_FP_QUIET_COMPARE_D(fcor_d, &tc_d[i], &exp_res_fcor_d[i])
+    TEST_FP_QUIET_COMPARE_D(fcune_d, &tc_d[i], &exp_res_fcune_d[i])
+    TEST_FP_QUIET_COMPARE_D(fcne_d, &tc_d[i], &exp_res_fcne_d[i])
+  }
+#undef TEST_FP_QUIET_COMPARE_W
+#undef TEST_FP_QUIET_COMPARE_D
+}
+
+template <typename T>
+inline const T* fadd_function(const T* src1, const T* src2, const T* src3,
+                              T* dst) {
+  for (uint64_t i = 0; i < kMSALanesByte / sizeof(T); i++) {
+    dst[i] = src1[i] + src2[i];
+  }
+  return dst;
+}
+template <typename T>
+inline const T* fsub_function(const T* src1, const T* src2, const T* src3,
+                              T* dst) {
+  for (uint64_t i = 0; i < kMSALanesByte / sizeof(T); i++) {
+    dst[i] = src1[i] - src2[i];
+  }
+  return dst;
+}
+template <typename T>
+inline const T* fmul_function(const T* src1, const T* src2, const T* src3,
+                              T* dst) {
+  for (uint64_t i = 0; i < kMSALanesByte / sizeof(T); i++) {
+    dst[i] = src1[i] * src2[i];
+  }
+  return dst;
+}
+template <typename T>
+inline const T* fdiv_function(const T* src1, const T* src2, const T* src3,
+                              T* dst) {
+  for (uint64_t i = 0; i < kMSALanesByte / sizeof(T); i++) {
+    dst[i] = src1[i] / src2[i];
+  }
+  return dst;
+}
+template <typename T>
+inline const T* fmadd_function(const T* src1, const T* src2, const T* src3,
+                               T* dst) {
+  for (uint64_t i = 0; i < kMSALanesByte / sizeof(T); i++) {
+    dst[i] = std::fma(src1[i], src2[i], src3[i]);
+  }
+  return dst;
+}
+template <typename T>
+inline const T* fmsub_function(const T* src1, const T* src2, const T* src3,
+                               T* dst) {
+  for (uint64_t i = 0; i < kMSALanesByte / sizeof(T); i++) {
+    dst[i] = std::fma(src1[i], -src2[i], src3[i]);
+  }
+  return dst;
+}
+
+TEST(MSA_floating_point_arithmetic) {
+  if ((kArchVariant != kMips64r6) || !CpuFeatures::IsSupported(MIPS_SIMD))
+    return;
+
+  CcTest::InitializeVM();
+
+  const float inf_f = std::numeric_limits<float>::infinity();
+  const double inf_d = std::numeric_limits<double>::infinity();
+
+  const struct TestCaseMsa3RF_F tc_w[] = {
+      {0.3, -2.14e13f, inf_f, 0.f,                     // ws
+       -inf_f, std::sqrt(8.e-26f), -23.e34, -2.14e9f,  // wt
+       -1e30f, 4.6e12f, 0, 2.14e9f},                   // wd
+      {3.4e38f, -1.2e-38f, 1e19f, -1e19f, 3.4e38f, 1.2e-38f, -1e19f, -1e-19f,
+       3.4e38f, 1.2e-38f * 3, 3.4e38f, -4e19f},
+      {-3e-31f, 3e10f, 1e25f, 123.f, 1e-14f, 1e-34f, 4e25f, 321.f, 3e-17f,
+       2e-24f, 2.f, -123456.f}};
+
+  const struct TestCaseMsa3RF_D tc_d[] = {
+      // ws_lo, ws_hi, wt_lo, wt_hi, wd_lo, wd_hi
+      {0.3, -2.14e103, -inf_d, std::sqrt(8.e-206), -1e30, 4.6e102},
+      {inf_d, 0., -23.e304, -2.104e9, 0, 2.104e9},
+      {3.4e307, -1.2e-307, 3.4e307, 1.2e-307, 3.4e307, 1.2e-307 * 3},
+      {1e154, -1e154, -1e154, -1e-154, 2.9e38, -4e19},
+      {-3e-301, 3e100, 1e-104, 1e-304, 3e-107, 2e-204},
+      {1e205, 123., 4e205, 321., 2., -123456.}};
+
+  struct ExpectedResult_MSA3RF dst_container;
+
+#define FP_ARITHMETIC_DF_W(instr, function, src1, src2, src3)           \
+  run_msa_3rf(                                                          \
+      reinterpret_cast<const struct TestCaseMsa3RF*>(src1),             \
+      reinterpret_cast<const struct ExpectedResult_MSA3RF*>(function(   \
+          src1, src2, src3, reinterpret_cast<float*>(&dst_container))), \
+      [](MacroAssembler& assm) { __ instr(w2, w0, w1); });
+
+#define FP_ARITHMETIC_DF_D(instr, function, src1, src2, src3)            \
+  run_msa_3rf(                                                           \
+      reinterpret_cast<const struct TestCaseMsa3RF*>(src1),              \
+      reinterpret_cast<const struct ExpectedResult_MSA3RF*>(function(    \
+          src1, src2, src3, reinterpret_cast<double*>(&dst_container))), \
+      [](MacroAssembler& assm) { __ instr(w2, w0, w1); });
+
+  for (uint64_t i = 0; i < arraysize(tc_w); i++) {
+    FP_ARITHMETIC_DF_W(fadd_w, fadd_function, &tc_w[i].ws_1, &tc_w[i].wt_1,
+                       &tc_w[i].wd_1)
+    FP_ARITHMETIC_DF_W(fsub_w, fsub_function, &tc_w[i].ws_1, &tc_w[i].wt_1,
+                       &tc_w[i].wd_1)
+    FP_ARITHMETIC_DF_W(fmul_w, fmul_function, &tc_w[i].ws_1, &tc_w[i].wt_1,
+                       &tc_w[i].wd_1)
+    FP_ARITHMETIC_DF_W(fdiv_w, fdiv_function, &tc_w[i].ws_1, &tc_w[i].wt_1,
+                       &tc_w[i].wd_1)
+    FP_ARITHMETIC_DF_W(fmadd_w, fmadd_function, &tc_w[i].ws_1, &tc_w[i].wt_1,
+                       &tc_w[i].wd_1)
+    FP_ARITHMETIC_DF_W(fmsub_w, fmsub_function, &tc_w[i].ws_1, &tc_w[i].wt_1,
+                       &tc_w[i].wd_1)
+  }
+  for (uint64_t i = 0; i < arraysize(tc_d); i++) {
+    FP_ARITHMETIC_DF_D(fadd_d, fadd_function, &tc_d[i].ws_lo, &tc_d[i].wt_lo,
+                       &tc_d[i].wd_lo)
+    FP_ARITHMETIC_DF_D(fsub_d, fsub_function, &tc_d[i].ws_lo, &tc_d[i].wt_lo,
+                       &tc_d[i].wd_lo)
+    FP_ARITHMETIC_DF_D(fmul_d, fmul_function, &tc_d[i].ws_lo, &tc_d[i].wt_lo,
+                       &tc_d[i].wd_lo)
+    FP_ARITHMETIC_DF_D(fdiv_d, fdiv_function, &tc_d[i].ws_lo, &tc_d[i].wt_lo,
+                       &tc_d[i].wd_lo)
+    FP_ARITHMETIC_DF_D(fmadd_d, fmadd_function, &tc_d[i].ws_lo, &tc_d[i].wt_lo,
+                       &tc_d[i].wd_lo)
+    FP_ARITHMETIC_DF_D(fmsub_d, fmsub_function, &tc_d[i].ws_lo, &tc_d[i].wt_lo,
+                       &tc_d[i].wd_lo)
+  }
+#undef FP_ARITHMETIC_DF_W
+#undef FP_ARITHMETIC_DF_D
+}
+
+struct ExpRes_F {
+  float exp_res_1;
+  float exp_res_2;
+  float exp_res_3;
+  float exp_res_4;
+};
+
+struct ExpRes_D {
+  double exp_res_1;
+  double exp_res_2;
+};
+
+TEST(MSA_fmin_fmin_a_fmax_fmax_a) {
+  if ((kArchVariant != kMips64r6) || !CpuFeatures::IsSupported(MIPS_SIMD))
+    return;
+
+  CcTest::InitializeVM();
+
+  const float inf_f = std::numeric_limits<float>::infinity();
+  const double inf_d = std::numeric_limits<double>::infinity();
+
+  const struct TestCaseMsa3RF_F tc_w[] = {
+      {0.3f, -2.14e13f, inf_f, -0.f,                    // ws
+       -inf_f, -std::sqrt(8.e26f), -23.e34f, -2.14e9f,  // wt
+       0, 0, 0, 0},                                     // wd
+      {3.4e38f, 1.2e-41f, 1e19f, 1e19f,                 // ws
+       3.4e38f, -1.1e-41f, -1e-42f, -1e29f,             // wt
+       0, 0, 0, 0}};                                    // wd
+
+  const struct TestCaseMsa3RF_D tc_d[] = {
+      // ws_lo, ws_hi, wt_lo, wt_hi, wd_lo, wd_hi
+      {0.3, -2.14e103, -inf_d, -std::sqrt(8e206), 0, 0},
+      {inf_d, -0., -23e304, -2.14e90, 0, 0},
+      {3.4e307, 1.2e-320, 3.4e307, -1.1e-320, 0, 0},
+      {1e154, 1e154, -1e-321, -1e174, 0, 0}};
+
+  const struct ExpRes_F exp_res_fmax_w[] = {{0.3f, -2.14e13f, inf_f, -0.f},
+                                            {3.4e38f, 1.2e-41f, 1e19f, 1e19f}};
+  const struct ExpRes_F exp_res_fmax_a_w[] = {
+      {-inf_f, -std::sqrt(8e26f), inf_f, -2.14e9f},
+      {3.4e38f, 1.2e-41f, 1e19f, -1e29f}};
+  const struct ExpRes_F exp_res_fmin_w[] = {
+      {-inf_f, -std::sqrt(8.e26f), -23e34f, -2.14e9f},
+      {3.4e38f, -1.1e-41f, -1e-42f, -1e29f}};
+  const struct ExpRes_F exp_res_fmin_a_w[] = {
+      {0.3, -2.14e13f, -23.e34f, -0.f}, {3.4e38f, -1.1e-41f, -1e-42f, 1e19f}};
+
+  const struct ExpRes_D exp_res_fmax_d[] = {
+      {0.3, -2.14e103}, {inf_d, -0.}, {3.4e307, 1.2e-320}, {1e154, 1e154}};
+  const struct ExpRes_D exp_res_fmax_a_d[] = {{-inf_d, -std::sqrt(8e206)},
+                                              {inf_d, -2.14e90},
+                                              {3.4e307, 1.2e-320},
+                                              {1e154, -1e174}};
+  const struct ExpRes_D exp_res_fmin_d[] = {{-inf_d, -std::sqrt(8e206)},
+                                            {-23e304, -2.14e90},
+                                            {3.4e307, -1.1e-320},
+                                            {-1e-321, -1e174}};
+  const struct ExpRes_D exp_res_fmin_a_d[] = {
+      {0.3, -2.14e103}, {-23e304, -0.}, {3.4e307, -1.1e-320}, {-1e-321, 1e154}};
+
+#define TEST_FP_MIN_MAX_W(instruction, src, exp_res)                          \
+  run_msa_3rf(reinterpret_cast<const struct TestCaseMsa3RF*>(src),            \
+              reinterpret_cast<const struct ExpectedResult_MSA3RF*>(exp_res), \
+              [](MacroAssembler& assm) { __ instruction(w2, w0, w1); });
+
+#define TEST_FP_MIN_MAX_D(instruction, src, exp_res)                          \
+  run_msa_3rf(reinterpret_cast<const struct TestCaseMsa3RF*>(src),            \
+              reinterpret_cast<const struct ExpectedResult_MSA3RF*>(exp_res), \
+              [](MacroAssembler& assm) { __ instruction(w2, w0, w1); });
+
+  for (uint64_t i = 0; i < arraysize(tc_w); i++) {
+    TEST_FP_MIN_MAX_W(fmax_w, &tc_w[i], &exp_res_fmax_w[i])
+    TEST_FP_MIN_MAX_W(fmax_a_w, &tc_w[i], &exp_res_fmax_a_w[i])
+    TEST_FP_MIN_MAX_W(fmin_w, &tc_w[i], &exp_res_fmin_w[i])
+    TEST_FP_MIN_MAX_W(fmin_a_w, &tc_w[i], &exp_res_fmin_a_w[i])
+  }
+
+  for (uint64_t i = 0; i < arraysize(tc_d); i++) {
+    TEST_FP_MIN_MAX_D(fmax_d, &tc_d[i], &exp_res_fmax_d[i])
+    TEST_FP_MIN_MAX_D(fmax_a_d, &tc_d[i], &exp_res_fmax_a_d[i])
+    TEST_FP_MIN_MAX_D(fmin_d, &tc_d[i], &exp_res_fmin_d[i])
+    TEST_FP_MIN_MAX_D(fmin_a_d, &tc_d[i], &exp_res_fmin_a_d[i])
+  }
+#undef TEST_FP_MIN_MAX_W
+#undef TEST_FP_MIN_MAX_D
+}
+
+struct TestCaseMsa3RF_16I {
+  int16_t ws_1, ws_2, ws_3, ws_4, ws_5, ws_6, ws_7, ws_8;
+  int16_t wt_1, wt_2, wt_3, wt_4, wt_5, wt_6, wt_7, wt_8;
+  int16_t wd_1, wd_2, wd_3, wd_4, wd_5, wd_6, wd_7, wd_8;
+};
+struct ExpRes_16I {
+  int16_t exp_res_1;
+  int16_t exp_res_2;
+  int16_t exp_res_3;
+  int16_t exp_res_4;
+  int16_t exp_res_5;
+  int16_t exp_res_6;
+  int16_t exp_res_7;
+  int16_t exp_res_8;
+};
+
+struct TestCaseMsa3RF_32I {
+  int32_t ws_1, ws_2, ws_3, ws_4;
+  int32_t wt_1, wt_2, wt_3, wt_4;
+  int32_t wd_1, wd_2, wd_3, wd_4;
+};
+
+TEST(MSA_fixed_point_arithmetic) {
+  if ((kArchVariant != kMips64r6) || !CpuFeatures::IsSupported(MIPS_SIMD))
+    return;
+
+  CcTest::InitializeVM();
+
+  const struct TestCaseMsa3RF tc_h[]{
+      {0x800080007FFF7FFF, 0xE1ED8000FAD3863A, 0x80007FFF00AF7FFF,
+       0x800015A77FFFA0EB, 0x7FFF800080007FFF, 0x80007FFF1F207364},
+      {0x800080007FFF006A, 0x002AFFC4329AD87B, 0x80007FFF7FFF00F3,
+       0xFFECFFB4D0D7F429, 0x80007FFF80007C33, 0x54AC6BBCE53B8C91}};
+
+  const struct TestCaseMsa3RF tc_w[]{
+      {0x8000000080000000, 0x7FFFFFFF7FFFFFFF, 0x800000007FFFFFFF,
+       0x00001FF37FFFFFFF, 0x7FFFFFFF80000000, 0x800000007FFFFFFF},
+      {0xE1ED035580000000, 0xFAD3863AED462C0B, 0x8000000015A70AEC,
+       0x7FFFFFFFA0EBD354, 0x800000007FFFFFFF, 0xD0D7F4291F207364},
+      {0x8000000080000000, 0x7FFFFFFF0000DA1F, 0x800000007FFFFFFF,
+       0x7FFFFFFF00F39C3B, 0x800000007FFFFFFF, 0x800000007C33F2FD},
+      {0x0000AC33FFFF329A, 0x54AC6BBCE53BD87B, 0xFFFFE2B4D0D7F429,
+       0x0355ED462C0B1FF3, 0xB5DEB625939DD3F9, 0xE642ADFA69519596}};
+
+  const struct ExpectedResult_MSA3RF exp_res_mul_q_h[] = {
+      {0x7FFF800100AE7FFE, 0x1E13EA59FAD35A74},
+      {0x7FFF80017FFE0000, 0xFFFF0000ED5B03A7}};
+  const struct ExpectedResult_MSA3RF exp_res_madd_q_h[] = {
+      {0x7FFF800080AE7FFF, 0x9E136A5819F37FFF},
+      {0x00000000FFFE7C33, 0x54AB6BBCD2969038}};
+  const struct ExpectedResult_MSA3RF exp_res_msub_q_h[] = {
+      {0xFFFFFFFF80000000, 0x80007FFF244C18EF},
+      {0x80007FFF80007C32, 0x54AC6BBBF7DF88E9}};
+  const struct ExpectedResult_MSA3RF exp_res_mulr_q_h[] = {
+      {0x7FFF800100AF7FFE, 0x1E13EA59FAD35A75},
+      {0x7FFF80017FFE0001, 0x00000000ED5B03A8}};
+  const struct ExpectedResult_MSA3RF exp_res_maddr_q_h[] = {
+      {0x7FFF800080AF7FFF, 0x9E136A5819F37FFF},
+      {0x00000000FFFE7C34, 0x54AC6BBCD2969039}};
+  const struct ExpectedResult_MSA3RF exp_res_msubr_q_h[] = {
+      {0xFFFFFFFF80000001, 0x80007FFF244D18EF},
+      {0x80007FFF80007C32, 0x54AC6BBCF7E088E9}};
+
+  const struct ExpectedResult_MSA3RF exp_res_mul_q_w[] = {
+      {0x7FFFFFFF80000001, 0x00001FF27FFFFFFE},
+      {0x1E12FCABEA58F514, 0xFAD3863A0DE8DEE1},
+      {0x7FFFFFFF80000001, 0x7FFFFFFE0000019F},
+      {0xFFFFFFFF00004BAB, 0x0234E1FBF6CA3EE0}};
+  const struct ExpectedResult_MSA3RF exp_res_madd_q_w[] = {
+      {0x7FFFFFFF80000000, 0x80001FF27FFFFFFF},
+      {0x9E12FCAB6A58F513, 0xCBAB7A632D095245},
+      {0x0000000000000000, 0xFFFFFFFE7C33F49C},
+      {0xB5DEB624939E1FA4, 0xE8778FF5601BD476}};
+  const struct ExpectedResult_MSA3RF exp_res_msub_q_w[] = {
+      {0xFFFFFFFFFFFFFFFF, 0x8000000000000000},
+      {0x800000007FFFFFFF, 0xD6046DEE11379482},
+      {0x800000007FFFFFFF, 0x800000007C33F15D},
+      {0xB5DEB625939D884D, 0xE40DCBFE728756B5}};
+  const struct ExpectedResult_MSA3RF exp_res_mulr_q_w[] = {
+      {0x7FFFFFFF80000001, 0x00001FF37FFFFFFE},
+      {0x1E12FCABEA58F514, 0xFAD3863A0DE8DEE2},
+      {0x7FFFFFFF80000001, 0x7FFFFFFE0000019F},
+      {0x0000000000004BAC, 0x0234E1FCF6CA3EE1}};
+  const struct ExpectedResult_MSA3RF exp_res_maddr_q_w[] = {
+      {0x7FFFFFFF80000000, 0x80001FF37FFFFFFF},
+      {0x9E12FCAB6A58F513, 0xCBAB7A632D095246},
+      {0x0000000000000000, 0xFFFFFFFE7C33F49C},
+      {0xB5DEB625939E1FA5, 0xE8778FF6601BD477}};
+  const struct ExpectedResult_MSA3RF exp_res_msubr_q_w[] = {
+      {0xFFFFFFFFFFFFFFFF, 0x8000000000000001},
+      {0x800000007FFFFFFF, 0xD6046DEF11379482},
+      {0x800000007FFFFFFF, 0x800000007C33F15E},
+      {0xB5DEB625939D884D, 0xE40DCBFE728756B5}};
+
+#define TEST_FIXED_POINT_DF_H(instruction, src, exp_res) \
+  run_msa_3rf((src), (exp_res),                          \
+              [](MacroAssembler& assm) { __ instruction(w2, w0, w1); });
+
+#define TEST_FIXED_POINT_DF_W(instruction, src, exp_res) \
+  run_msa_3rf((src), (exp_res),                          \
+              [](MacroAssembler& assm) { __ instruction(w2, w0, w1); });
+
+  for (uint64_t i = 0; i < arraysize(tc_h); i++) {
+    TEST_FIXED_POINT_DF_H(mul_q_h, &tc_h[i], &exp_res_mul_q_h[i])
+    TEST_FIXED_POINT_DF_H(madd_q_h, &tc_h[i], &exp_res_madd_q_h[i])
+    TEST_FIXED_POINT_DF_H(msub_q_h, &tc_h[i], &exp_res_msub_q_h[i])
+    TEST_FIXED_POINT_DF_H(mulr_q_h, &tc_h[i], &exp_res_mulr_q_h[i])
+    TEST_FIXED_POINT_DF_H(maddr_q_h, &tc_h[i], &exp_res_maddr_q_h[i])
+    TEST_FIXED_POINT_DF_H(msubr_q_h, &tc_h[i], &exp_res_msubr_q_h[i])
+  }
+
+  for (uint64_t i = 0; i < arraysize(tc_w); i++) {
+    TEST_FIXED_POINT_DF_W(mul_q_w, &tc_w[i], &exp_res_mul_q_w[i])
+    TEST_FIXED_POINT_DF_W(madd_q_w, &tc_w[i], &exp_res_madd_q_w[i])
+    TEST_FIXED_POINT_DF_W(msub_q_w, &tc_w[i], &exp_res_msub_q_w[i])
+    TEST_FIXED_POINT_DF_W(mulr_q_w, &tc_w[i], &exp_res_mulr_q_w[i])
+    TEST_FIXED_POINT_DF_W(maddr_q_w, &tc_w[i], &exp_res_maddr_q_w[i])
+    TEST_FIXED_POINT_DF_W(msubr_q_w, &tc_w[i], &exp_res_msubr_q_w[i])
+  }
+#undef TEST_FIXED_POINT_DF_H
+#undef TEST_FIXED_POINT_DF_W
+}
+
+TEST(MSA_fexdo) {
+  if ((kArchVariant != kMips64r6) || !CpuFeatures::IsSupported(MIPS_SIMD))
+    return;
+
+  CcTest::InitializeVM();
+
+  const float inf_float = std::numeric_limits<float>::infinity();
+  const float nan_float = std::numeric_limits<float>::quiet_NaN();
+  const double inf_double = std::numeric_limits<double>::infinity();
+
+  const struct TestCaseMsa3RF_F tc_w[] = {
+      // ws_1, ws_2, ws_3, ws_4, wt_1, wt_2, wt_3, wt_4, wd_1, wd_2, wd_3, wd_4
+      {inf_float, nan_float, 66505.f, 65504.f, 6.2e-5f, 5e-5f, -32.42f,
+       -inf_float, 0, 0, 0, 0},
+      {-0.f, 0.f, 123.567f, -765.321f, -6e-8f, 5.9e-8f, 1e-7f, -1e-20f, 0, 0, 0,
+       0},
+      {1e-36f, 1e20f, -1e20f, 2e-20f, 6e-8f, -2.9e-8f, -66505.f, -65504.f}};
+
+  const struct TestCaseMsa3RF_D tc_d[] = {
+      // ws_lo, ws_hi, wt_lo, wt_hi, wd_lo, wd_hi
+      {inf_double, -1234., 4e38, 3.4e38, 0, 0},
+      {1.2e-38, 1.1e-39, -38.92f, -inf_double, 0, 0},
+      {-0., 0., 123.567e31, -765.321e33, 0, 0},
+      {-1.5e-45, 1.3e-45, 1e-42, -1e-200, 0, 0},
+      {1e-202, 1e158, -1e159, 1e14, 0, 0},
+      {1.5e-42, 1.3e-46, -123.567e31, 765.321e33, 0, 0}};
+
+  const struct ExpRes_16I exp_res_fexdo_w[] = {
+      {static_cast<int16_t>(0x0410), static_cast<int16_t>(0x0347),
+       static_cast<int16_t>(0xD00D), static_cast<int16_t>(0xFC00),
+       static_cast<int16_t>(0x7C00), static_cast<int16_t>(0x7DFF),
+       static_cast<int16_t>(0x7C00), static_cast<int16_t>(0x7BFF)},
+      {static_cast<int16_t>(0x8001), static_cast<int16_t>(0x0001),
+       static_cast<int16_t>(0x0002), static_cast<int16_t>(0x8000),
+       static_cast<int16_t>(0x8000), static_cast<int16_t>(0x0000),
+       static_cast<int16_t>(0x57B9), static_cast<int16_t>(0xE1FB)},
+      {static_cast<int16_t>(0x0001), static_cast<int16_t>(0x8000),
+       static_cast<int16_t>(0xFC00), static_cast<int16_t>(0xFBFF),
+       static_cast<int16_t>(0x0000), static_cast<int16_t>(0x7C00),
+       static_cast<int16_t>(0xFC00), static_cast<int16_t>(0x0000)}};
+
+  const struct ExpRes_32I exp_res_fexdo_d[] = {
+      {bit_cast<int32_t>(0x7F800000), bit_cast<int32_t>(0x7F7FC99E),
+       bit_cast<int32_t>(0x7F800000), bit_cast<int32_t>(0xC49A4000)},
+      {bit_cast<int32_t>(0xC21BAE14), bit_cast<int32_t>(0xFF800000),
+       bit_cast<int32_t>(0x0082AB1E), bit_cast<int32_t>(0x000BFA5A)},
+      {bit_cast<int32_t>(0x7673B164), bit_cast<int32_t>(0xFB13653D),
+       bit_cast<int32_t>(0x80000000), bit_cast<int32_t>(0x00000000)},
+      {bit_cast<int32_t>(0x000002CA), bit_cast<int32_t>(0x80000000),
+       bit_cast<int32_t>(0x80000001), bit_cast<int32_t>(0x00000001)},
+      {bit_cast<int32_t>(0xFF800000), bit_cast<int32_t>(0x56B5E621),
+       bit_cast<int32_t>(0x00000000), bit_cast<int32_t>(0x7F800000)},
+      {bit_cast<int32_t>(0xF673B164), bit_cast<int32_t>(0x7B13653D),
+       bit_cast<int32_t>(0x0000042E), bit_cast<int32_t>(0x00000000)}};
+
+#define TEST_FEXDO_H(instruction, src, exp_res)                               \
+  run_msa_3rf(reinterpret_cast<const struct TestCaseMsa3RF*>(src),            \
+              reinterpret_cast<const struct ExpectedResult_MSA3RF*>(exp_res), \
+              [](MacroAssembler& assm) { __ instruction(w2, w0, w1); });
+
+#define TEST_FEXDO_W(instruction, src, exp_res)                               \
+  run_msa_3rf(reinterpret_cast<const struct TestCaseMsa3RF*>(src),            \
+              reinterpret_cast<const struct ExpectedResult_MSA3RF*>(exp_res), \
+              [](MacroAssembler& assm) { __ instruction(w2, w0, w1); });
+
+  for (uint64_t i = 0; i < arraysize(tc_w); i++) {
+    TEST_FEXDO_H(fexdo_h, &tc_w[i], &exp_res_fexdo_w[i])
+  }
+
+  for (uint64_t i = 0; i < arraysize(tc_d); i++) {
+    TEST_FEXDO_W(fexdo_w, &tc_d[i], &exp_res_fexdo_d[i])
+  }
+
+#undef TEST_FEXDO_H
+#undef TEST_FEXDO_W
+}
+
+TEST(MSA_ftq) {
+  if ((kArchVariant != kMips64r6) || !CpuFeatures::IsSupported(MIPS_SIMD))
+    return;
+
+  CcTest::InitializeVM();
+
+  const float nan_float = std::numeric_limits<float>::quiet_NaN();
+  const float inf_float = std::numeric_limits<float>::infinity();
+  const double nan_double = std::numeric_limits<double>::quiet_NaN();
+  const double inf_double = std::numeric_limits<double>::infinity();
+
+  const struct TestCaseMsa3RF_F tc_w[] = {
+      {1.f, -0.999f, 1.5f, -31e-6, 1e-7, -0.598, 0.0023, -0.f, 0, 0, 0, 0},
+      {100.f, -102.f, -1.1f, 1.3f, 0.f, -1.f, 0.9999f, -0.000322, 0, 0, 0, 0},
+      {nan_float, inf_float, -inf_float, -nan_float, -1e-40, 3e-44, 8.3e36,
+       -0.00003, 0, 0, 0, 0}};
+
+  const struct TestCaseMsa3RF_D tc_d[] = {
+      {1., -0.999, 1.5, -31e-6, 0, 0},
+      {1e-7, -0.598, 0.0023, -0.f, 0, 0},
+      {100.f, -102.f, -1.1f, 1.3f, 0, 0},
+      {0.f, -1.f, 0.9999f, -0.000322, 0, 0},
+      {nan_double, inf_double, -inf_double, -nan_double, 0, 0},
+      {-3e306, 2e-307, 9e307, 2e-307, 0, 0}};
+
+  const struct ExpRes_16I exp_res_ftq_w[] = {
+      {static_cast<int16_t>(0x0000), static_cast<int16_t>(0xB375),
+       static_cast<int16_t>(0x004B), static_cast<int16_t>(0x0000),
+       static_cast<int16_t>(0x7FFF), static_cast<int16_t>(0x8021),
+       static_cast<int16_t>(0x7FFF), static_cast<int16_t>(0xFFFF)},
+      {static_cast<int16_t>(0x0000), static_cast<int16_t>(0x8000),
+       static_cast<int16_t>(0x7FFD), static_cast<int16_t>(0xFFF5),
+       static_cast<int16_t>(0x7FFF), static_cast<int16_t>(0x8000),
+       static_cast<int16_t>(0x8000), static_cast<int16_t>(0x7FFF)},
+      {static_cast<int16_t>(0x0000), static_cast<int16_t>(0x0000),
+       static_cast<int16_t>(0x7FFF), static_cast<int16_t>(0xFFFF),
+       static_cast<int16_t>(0x0000), static_cast<int16_t>(0x7FFF),
+       static_cast<int16_t>(0x8000), static_cast<int16_t>(0x0000)}};
+
+  const struct ExpRes_32I exp_res_ftq_d[] = {
+      {bit_cast<int32_t>(0x7FFFFFFF), bit_cast<int32_t>(0xFFFEFBF4),
+       bit_cast<int32_t>(0x7FFFFFFF), bit_cast<int32_t>(0x8020C49C)},
+      {bit_cast<int32_t>(0x004B5DCC), bit_cast<int32_t>(0x00000000),
+       bit_cast<int32_t>(0x000000D7), bit_cast<int32_t>(0xB374BC6A)},
+      {bit_cast<int32_t>(0x80000000), bit_cast<int32_t>(0x7FFFFFFF),
+       bit_cast<int32_t>(0x7FFFFFFF), bit_cast<int32_t>(0x80000000)},
+      {bit_cast<int32_t>(0x7FFCB900), bit_cast<int32_t>(0xFFF572DE),
+       bit_cast<int32_t>(0x00000000), bit_cast<int32_t>(0x80000000)},
+      {bit_cast<int32_t>(0x80000000), bit_cast<int32_t>(0x00000000),
+       bit_cast<int32_t>(0x00000000), bit_cast<int32_t>(0x7FFFFFFF)},
+      {bit_cast<int32_t>(0x7FFFFFFF), bit_cast<int32_t>(0x00000000),
+       bit_cast<int32_t>(0x80000000), bit_cast<int32_t>(0x00000000)}};
+
+#define TEST_FTQ_H(instruction, src, exp_res)                                 \
+  run_msa_3rf(reinterpret_cast<const struct TestCaseMsa3RF*>(src),            \
+              reinterpret_cast<const struct ExpectedResult_MSA3RF*>(exp_res), \
+              [](MacroAssembler& assm) { __ instruction(w2, w0, w1); });
+
+#define TEST_FTQ_W(instruction, src, exp_res)                                 \
+  run_msa_3rf(reinterpret_cast<const struct TestCaseMsa3RF*>(src),            \
+              reinterpret_cast<const struct ExpectedResult_MSA3RF*>(exp_res), \
+              [](MacroAssembler& assm) { __ instruction(w2, w0, w1); });
+
+  for (uint64_t i = 0; i < arraysize(tc_w); i++) {
+    TEST_FTQ_H(ftq_h, &tc_w[i], &exp_res_ftq_w[i])
+  }
+
+  for (uint64_t i = 0; i < arraysize(tc_d); i++) {
+    TEST_FTQ_W(ftq_w, &tc_d[i], &exp_res_ftq_d[i])
+  }
+
+#undef TEST_FTQ_H
+#undef TEST_FTQ_W
 }
 
 #undef __
diff --git a/src/v8/test/cctest/test-assembler-ppc.cc b/src/v8/test/cctest/test-assembler-ppc.cc
index 9a11523..f965975 100644
--- a/src/v8/test/cctest/test-assembler-ppc.cc
+++ b/src/v8/test/cctest/test-assembler-ppc.cc
@@ -30,18 +30,19 @@
 #include "src/disassembler.h"
 #include "src/factory.h"
 #include "src/ppc/assembler-ppc-inl.h"
-#include "src/ppc/simulator-ppc.h"
+#include "src/simulator.h"
 #include "test/cctest/cctest.h"
 
 namespace v8 {
 namespace internal {
 
-// Define these function prototypes to match JSEntryFunction in execution.cc.
-typedef Object* (*F1)(int x, int p1, int p2, int p3, int p4);
-typedef Object* (*F2)(int x, int y, int p2, int p3, int p4);
-typedef Object* (*F3)(void* p0, int p1, int p2, int p3, int p4);
-typedef Object* (*F4)(void* p0, void* p1, int p2, int p3, int p4);
-
+// TODO(ppc): Refine these signatures per test case, they can have arbitrary
+// return and argument types and arbitrary number of arguments.
+using F_iiiii = Object*(int x, int p1, int p2, int p3, int p4);
+using F_piiii = Object*(void* p0, int p1, int p2, int p3, int p4);
+using F_ppiii = Object*(void* p0, void* p1, int p2, int p3, int p4);
+using F_pppii = Object*(void* p0, void* p1, void* p2, int p3, int p4);
+using F_ippii = Object*(int p0, void* p1, void* p2, int p3, int p4);
 
 #define __ assm.
 
@@ -51,7 +52,7 @@
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
 
-  Assembler assm(isolate, NULL, 0);
+  Assembler assm(isolate, nullptr, 0);
 
   __ function_descriptor();
 
@@ -65,9 +66,8 @@
 #ifdef DEBUG
   code->Print();
 #endif
-  F2 f = FUNCTION_CAST<F2>(code->entry());
-  intptr_t res = reinterpret_cast<intptr_t>(
-      CALL_GENERATED_CODE(isolate, f, 3, 4, 0, 0, 0));
+  auto f = GeneratedCode<F_iiiii>::FromCode(*code);
+  intptr_t res = reinterpret_cast<intptr_t>(f.Call(3, 4, 0, 0, 0));
   ::printf("f() = %" V8PRIdPTR "\n", res);
   CHECK_EQ(7, static_cast<int>(res));
 }
@@ -79,7 +79,7 @@
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
 
-  Assembler assm(isolate, NULL, 0);
+  Assembler assm(isolate, nullptr, 0);
   Label L, C;
 
   __ function_descriptor();
@@ -104,9 +104,8 @@
 #ifdef DEBUG
   code->Print();
 #endif
-  F1 f = FUNCTION_CAST<F1>(code->entry());
-  intptr_t res = reinterpret_cast<intptr_t>(
-      CALL_GENERATED_CODE(isolate, f, 100, 0, 0, 0, 0));
+  auto f = GeneratedCode<F_iiiii>::FromCode(*code);
+  intptr_t res = reinterpret_cast<intptr_t>(f.Call(100, 0, 0, 0, 0));
   ::printf("f() = %" V8PRIdPTR "\n", res);
   CHECK_EQ(5050, static_cast<int>(res));
 }
@@ -117,7 +116,7 @@
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
 
-  Assembler assm(isolate, NULL, 0);
+  Assembler assm(isolate, nullptr, 0);
   Label L, C;
 
   __ function_descriptor();
@@ -155,9 +154,8 @@
 #ifdef DEBUG
   code->Print();
 #endif
-  F1 f = FUNCTION_CAST<F1>(code->entry());
-  intptr_t res = reinterpret_cast<intptr_t>(
-      CALL_GENERATED_CODE(isolate, f, 10, 0, 0, 0, 0));
+  auto f = GeneratedCode<F_iiiii>::FromCode(*code);
+  intptr_t res = reinterpret_cast<intptr_t>(f.Call(10, 0, 0, 0, 0));
   ::printf("f() = %" V8PRIdPTR "\n", res);
   CHECK_EQ(3628800, static_cast<int>(res));
 }
@@ -175,7 +173,7 @@
   } T;
   T t;
 
-  Assembler assm(CcTest::i_isolate(), NULL, 0);
+  Assembler assm(CcTest::i_isolate(), nullptr, 0);
   Label L, C;
 
   __ function_descriptor();
@@ -228,12 +226,11 @@
 #ifdef DEBUG
   code->Print();
 #endif
-  F3 f = FUNCTION_CAST<F3>(code->entry());
+  auto f = GeneratedCode<F_piiii>::FromCode(*code);
   t.i = 100000;
   t.c = 10;
   t.s = 1000;
-  intptr_t res = reinterpret_cast<intptr_t>(
-      CALL_GENERATED_CODE(isolate, f, &t, 0, 0, 0, 0));
+  intptr_t res = reinterpret_cast<intptr_t>(f.Call(&t, 0, 0, 0, 0));
   ::printf("f() = %" V8PRIdPTR "\n", res);
   CHECK_EQ(101010, static_cast<int>(res));
   CHECK_EQ(100000 / 2, t.i);
@@ -267,7 +264,7 @@
 
   // Create a function that accepts &t, and loads, manipulates, and stores
   // the doubles and floats.
-  Assembler assm(CcTest::i_isolate(), NULL, 0);
+  Assembler assm(CcTest::i_isolate(), nullptr, 0);
   Label L, C;
 
   if (CpuFeatures::IsSupported(VFP3)) {
@@ -301,7 +298,7 @@
     __ vstr(d4, r4, offsetof(T, e));
 
     // Move a literal into a register that requires 64 bits to encode.
-    // 0x3ff0000010000000 = 1.000000059604644775390625
+    // 0x3FF0000010000000 = 1.000000059604644775390625
     __ vmov(d4, 1.000000059604644775390625);
     __ vstr(d4, r4, offsetof(T, d));
 
@@ -344,7 +341,7 @@
 #ifdef DEBUG
     Code::cast(code)->Print();
 #endif
-    F3 f = FUNCTION_CAST<F3>(Code::cast(code)->entry());
+    auto f = GeneratedCode<F_piiii>::FromCode(*code);
     t.a = 1.5;
     t.b = 2.75;
     t.c = 17.17;
@@ -358,8 +355,7 @@
     t.n = 123.456;
     t.x = 4.5;
     t.y = 9.0;
-    Object* dummy = CALL_GENERATED_CODE(isolate, f, &t, 0, 0, 0, 0);
-    USE(dummy);
+    f.Call(&t, 0, 0, 0, 0);
     CHECK_EQ(4.5, t.y);
     CHECK_EQ(9.0, t.x);
     CHECK_EQ(-123.456, t.n);
@@ -383,7 +379,7 @@
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
 
-  Assembler assm(isolate, NULL, 0);
+  Assembler assm(isolate, nullptr, 0);
 
   if (CpuFeatures::IsSupported(ARMv7)) {
     CpuFeatures::Scope scope(ARMv7);
@@ -405,9 +401,8 @@
 #ifdef DEBUG
     Code::cast(code)->Print();
 #endif
-    F1 f = FUNCTION_CAST<F1>(Code::cast(code)->entry());
-    int res = reinterpret_cast<int>(
-                CALL_GENERATED_CODE(isolate, f, 0xAAAAAAAA, 0, 0, 0, 0));
+    auto f = GeneratedCode<F_iiiii>::FromCode(*code);
+    int res = reinterpret_cast<int>(f.Call(0xAAAAAAAA, 0, 0, 0, 0));
     ::printf("f() = %d\n", res);
     CHECK_EQ(-7, res);
   }
@@ -420,7 +415,7 @@
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
 
-  Assembler assm(isolate, NULL, 0);
+  Assembler assm(isolate, nullptr, 0);
 
   if (CpuFeatures::IsSupported(ARMv7)) {
     CpuFeatures::Scope scope(ARMv7);
@@ -441,9 +436,8 @@
 #ifdef DEBUG
     Code::cast(code)->Print();
 #endif
-    F1 f = FUNCTION_CAST<F1>(Code::cast(code)->entry());
-    int res = reinterpret_cast<int>(
-                CALL_GENERATED_CODE(isolate, f, 0xFFFF, 0, 0, 0, 0));
+    auto f = GeneratedCode<F_iiiii>::FromCode(*code);
+    int res = reinterpret_cast<int>(f.Call(0xFFFF, 0, 0, 0, 0));
     ::printf("f() = %d\n", res);
     CHECK_EQ(382, res);
   }
@@ -463,7 +457,7 @@
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
 
-  Assembler assm(isolate, NULL, 0);
+  Assembler assm(isolate, nullptr, 0);
 
   if (CpuFeatures::IsSupported(VFP3)) {
     CpuFeatures::Scope scope(VFP3);
@@ -517,9 +511,8 @@
 #ifdef DEBUG
     Code::cast(code)->Print();
 #endif
-    F1 f = FUNCTION_CAST<F1>(Code::cast(code)->entry());
-    int res = reinterpret_cast<int>(
-                CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0));
+    auto f = GeneratedCode<F_iiiii>::FromCode(*code);
+    int res = reinterpret_cast<int>(f.Call(0, 0, 0, 0, 0));
     ::printf("res = %d\n", res);
     CHECK_EQ(expected, res);
   }
@@ -597,8 +590,8 @@
   TestRoundingMode(u32_f64, RZ, kMinInt - 1.0, 0, true);
 
   // Positive values.
-  // kMaxInt is the maximum *signed* integer: 0x7fffffff.
-  static const uint32_t kMaxUInt = 0xffffffffu;
+  // kMaxInt is the maximum *signed* integer: 0x7FFFFFFF.
+  static const uint32_t kMaxUInt = 0xFFFFFFFFu;
   TestRoundingMode(u32_f64, RZ,  0, 0);
   TestRoundingMode(u32_f64, RZ,  0.5, 0);
   TestRoundingMode(u32_f64, RZ,  123.7,  123);
@@ -668,7 +661,7 @@
 
   // Create a function that uses vldm/vstm to move some double and
   // single precision values around in memory.
-  Assembler assm(isolate, NULL, 0);
+  Assembler assm(isolate, nullptr, 0);
 
   if (CpuFeatures::IsSupported(VFP2)) {
     CpuFeatures::Scope scope(VFP2);
@@ -705,7 +698,7 @@
 #ifdef DEBUG
     Code::cast(code)->Print();
 #endif
-    F4 fn = FUNCTION_CAST<F4>(Code::cast(code)->entry());
+    auto fn = GeneratedCode<F_ppiii>::FromCode(*code);
     d.a = 1.1;
     d.b = 2.2;
     d.c = 3.3;
@@ -724,8 +717,7 @@
     f.g = 7.0;
     f.h = 8.0;
 
-    Object* dummy = CALL_GENERATED_CODE(isolate, fn, &d, &f, 0, 0, 0);
-    USE(dummy);
+    fn.Call(&d, &f, 0, 0, 0);
 
     CHECK_EQ(7.7, d.a);
     CHECK_EQ(8.8, d.b);
@@ -780,7 +772,7 @@
 
   // Create a function that uses vldm/vstm to move some double and
   // single precision values around in memory.
-  Assembler assm(isolate, NULL, 0);
+  Assembler assm(isolate, nullptr, 0);
 
   if (CpuFeatures::IsSupported(VFP2)) {
     CpuFeatures::Scope scope(VFP2);
@@ -821,7 +813,7 @@
 #ifdef DEBUG
     Code::cast(code)->Print();
 #endif
-    F4 fn = FUNCTION_CAST<F4>(Code::cast(code)->entry());
+    auto fn = GeneratedCode<F_ppiii>::FromCode(*code);
     d.a = 1.1;
     d.b = 2.2;
     d.c = 3.3;
@@ -840,8 +832,7 @@
     f.g = 7.0;
     f.h = 8.0;
 
-    Object* dummy = CALL_GENERATED_CODE(isolate, fn, &d, &f, 0, 0, 0);
-    USE(dummy);
+    fn.Call(&d, &f, 0, 0, 0);
 
     CHECK_EQ(7.7, d.a);
     CHECK_EQ(8.8, d.b);
@@ -896,7 +887,7 @@
 
   // Create a function that uses vldm/vstm to move some double and
   // single precision values around in memory.
-  Assembler assm(isolate, NULL, 0);
+  Assembler assm(isolate, nullptr, 0);
 
   if (CpuFeatures::IsSupported(VFP2)) {
     CpuFeatures::Scope scope(VFP2);
@@ -933,7 +924,7 @@
 #ifdef DEBUG
     Code::cast(code)->Print();
 #endif
-    F4 fn = FUNCTION_CAST<F4>(Code::cast(code)->entry());
+    auto fn = GeneratedCode<F_ppiii>::FromCode(*code);
     d.a = 1.1;
     d.b = 2.2;
     d.c = 3.3;
@@ -952,8 +943,7 @@
     f.g = 7.0;
     f.h = 8.0;
 
-    Object* dummy = CALL_GENERATED_CODE(isolate, fn, &d, &f, 0, 0, 0);
-    USE(dummy);
+    fn.Call(&d, &f, 0, 0, 0);
 
     CHECK_EQ(7.7, d.a);
     CHECK_EQ(8.8, d.b);
@@ -990,10 +980,10 @@
   } I;
   I i;
 
-  i.a = 0xabcd0001;
-  i.b = 0xabcd0000;
+  i.a = 0xABCD0001;
+  i.b = 0xABCD0000;
 
-  Assembler assm(isolate, NULL, 0);
+  Assembler assm(isolate, nullptr, 0);
 
   // Test HeapObject untagging.
   __ ldr(r1, MemOperand(r0, offsetof(I, a)));
@@ -1007,13 +997,13 @@
   __ str(r2, MemOperand(r0, offsetof(I, b)));
 
   // Test corner cases.
-  __ mov(r1, Operand(0xffffffff));
+  __ mov(r1, Operand(0xFFFFFFFF));
   __ mov(r2, Operand::Zero());
   __ mov(r3, Operand(r1, ASR, 1), SetCC);  // Set the carry.
   __ adc(r3, r1, Operand(r2));
   __ str(r3, MemOperand(r0, offsetof(I, c)));
 
-  __ mov(r1, Operand(0xffffffff));
+  __ mov(r1, Operand(0xFFFFFFFF));
   __ mov(r2, Operand::Zero());
   __ mov(r3, Operand(r2, ASR, 1), SetCC);  // Unset the carry.
   __ adc(r3, r1, Operand(r2));
@@ -1031,14 +1021,13 @@
 #ifdef DEBUG
   Code::cast(code)->Print();
 #endif
-  F3 f = FUNCTION_CAST<F3>(Code::cast(code)->entry());
-  Object* dummy = CALL_GENERATED_CODE(isolate, f, &i, 0, 0, 0, 0);
-  USE(dummy);
+  auto f = GeneratedCode<F_piiii>::FromCode(*code);
+  f.Call(&i, 0, 0, 0, 0);
 
-  CHECK_EQ(0xabcd0001, i.a);
-  CHECK_EQ(static_cast<int32_t>(0xabcd0000) >> 1, i.b);
+  CHECK_EQ(0xABCD0001, i.a);
+  CHECK_EQ(static_cast<int32_t>(0xABCD0000) >> 1, i.b);
   CHECK_EQ(0x00000000, i.c);
-  CHECK_EQ(0xffffffff, i.d);
+  CHECK_EQ(0xFFFFFFFF, i.d);
 }
 
 
@@ -1048,7 +1037,7 @@
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
 
-  Assembler assm(isolate, NULL, 0);
+  Assembler assm(isolate, nullptr, 0);
   Label target;
   __ b(eq, &target);
   __ b(ne, &target);
diff --git a/src/v8/test/cctest/test-assembler-s390.cc b/src/v8/test/cctest/test-assembler-s390.cc
index da27274..d6bbe34 100644
--- a/src/v8/test/cctest/test-assembler-s390.cc
+++ b/src/v8/test/cctest/test-assembler-s390.cc
@@ -31,17 +31,18 @@
 #include "src/factory.h"
 #include "src/macro-assembler.h"
 #include "src/s390/assembler-s390-inl.h"
-#include "src/s390/simulator-s390.h"
+#include "src/simulator.h"
 #include "test/cctest/cctest.h"
 
 namespace v8 {
 namespace internal {
 
 // Define these function prototypes to match JSEntryFunction in execution.cc.
-typedef Object* (*F1)(int x, int p1, int p2, int p3, int p4);
-typedef Object* (*F2)(int x, int y, int p2, int p3, int p4);
-typedef Object* (*F3)(void* p0, int p1, int p2, int p3, int p4);
-typedef Object* (*F4)(void* p0, void* p1, int p2, int p3, int p4);
+// TODO(s390): Refine these signatures per test case.
+using F1 = Object*(int x, int p1, int p2, int p3, int p4);
+using F2 = Object*(int x, int y, int p2, int p3, int p4);
+using F3 = Object*(void* p0, int p1, int p2, int p3, int p4);
+using F4 = Object*(void* p0, void* p1, int p2, int p3, int p4);
 
 #define __ assm.
 
@@ -51,7 +52,7 @@
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
 
-  Assembler assm(isolate, NULL, 0);
+  Assembler assm(isolate, nullptr, 0);
 
   __ lhi(r1, Operand(3));    // test 4-byte instr
   __ llilf(r2, Operand(4));  // test 6-byte instr
@@ -66,9 +67,8 @@
 #ifdef DEBUG
   code->Print();
 #endif
-  F2 f = FUNCTION_CAST<F2>(code->entry());
-  intptr_t res = reinterpret_cast<intptr_t>(
-      CALL_GENERATED_CODE(isolate, f, 3, 4, 0, 0, 0));
+  auto f = GeneratedCode<F2>::FromCode(*code);
+  intptr_t res = reinterpret_cast<intptr_t>(f.Call(3, 4, 0, 0, 0));
   ::printf("f() = %" V8PRIxPTR "\n", res);
   CHECK_EQ(7, static_cast<int>(res));
 }
@@ -79,7 +79,7 @@
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
 
-  Assembler assm(isolate, NULL, 0);
+  Assembler assm(isolate, nullptr, 0);
   Label L, C;
 
 #if defined(_AIX)
@@ -106,9 +106,8 @@
 #ifdef DEBUG
   code->Print();
 #endif
-  F1 f = FUNCTION_CAST<F1>(code->entry());
-  intptr_t res = reinterpret_cast<intptr_t>(
-      CALL_GENERATED_CODE(isolate, f, 100, 0, 0, 0, 0));
+  auto f = GeneratedCode<F1>::FromCode(*code);
+  intptr_t res = reinterpret_cast<intptr_t>(f.Call(100, 0, 0, 0, 0));
   ::printf("f() = %" V8PRIxPTR "\n", res);
   CHECK_EQ(5050, static_cast<int>(res));
 }
@@ -120,7 +119,7 @@
 
   // Create a function that accepts &t, and loads, manipulates, and stores
   // the doubles and floats.
-  Assembler assm(CcTest::i_isolate(), NULL, 0);
+  Assembler assm(CcTest::i_isolate(), nullptr, 0);
   Label L, C;
 
 #if defined(_AIX)
@@ -158,9 +157,8 @@
 #ifdef DEBUG
   code->Print();
 #endif
-  F1 f = FUNCTION_CAST<F1>(code->entry());
-  intptr_t res = reinterpret_cast<intptr_t>(
-      CALL_GENERATED_CODE(isolate, f, 10, 0, 0, 0, 0));
+  auto f = GeneratedCode<F1>::FromCode(*code);
+  intptr_t res = reinterpret_cast<intptr_t>(f.Call(10, 0, 0, 0, 0));
   ::printf("f() = %" V8PRIxPTR "\n", res);
   CHECK_EQ(3628800, static_cast<int>(res));
 }
@@ -170,7 +168,7 @@
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
 
-  Assembler assm(isolate, NULL, 0);
+  Assembler assm(isolate, nullptr, 0);
 
   __ ar(r14, r13);
   __ sr(r14, r13);
@@ -224,7 +222,7 @@
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
 
-  Assembler assm(isolate, NULL, 0);
+  Assembler assm(isolate, nullptr, 0);
   Label L2, L3, L4;
 
   __ chi(r2, Operand(10));
@@ -255,9 +253,9 @@
 #ifdef DEBUG
   code->Print();
 #endif
-  F2 f = FUNCTION_CAST<F2>(code->entry());
+  auto f = GeneratedCode<F2>::FromCode(*code);
   intptr_t res = reinterpret_cast<intptr_t>(
-      CALL_GENERATED_CODE(isolate, f, 3, 4, 3, 0, 0));
+      f.Call(3, 4, 3, 0, 0));
   ::printf("f() = %" V8PRIdPTR "\n", res);
   CHECK_EQ(4, static_cast<int>(res));
 }
@@ -269,7 +267,7 @@
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
 
-  MacroAssembler assm(isolate, NULL, 0);
+  MacroAssembler assm(isolate, nullptr, 0);
 
   __ mov(r2, Operand(0x12345678));
   __ ExtractBitRange(r3, r2, 3, 2);
@@ -283,9 +281,9 @@
 #ifdef DEBUG
   code->Print();
 #endif
-  F2 f = FUNCTION_CAST<F2>(code->entry());
+  auto f = GeneratedCode<F2>::FromCode(*code);
   intptr_t res =
-    reinterpret_cast<intptr_t>(CALL_GENERATED_CODE(isolate, f, 3, 4, 3, 0, 0));
+    reinterpret_cast<intptr_t>(f.Call(3, 4, 3, 0, 0));
   ::printf("f() = %" V8PRIdPTR "\n", res);
   CHECK_EQ(2, static_cast<int>(res));
 }
@@ -297,7 +295,7 @@
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
 
-  MacroAssembler assm(isolate, NULL, 0);
+  MacroAssembler assm(isolate, nullptr, 0);
 
   Label yes;
 
@@ -317,9 +315,9 @@
 #ifdef DEBUG
   code->Print();
 #endif
-  F2 f = FUNCTION_CAST<F2>(code->entry());
+  auto f = GeneratedCode<F2>::FromCode(*code);
   intptr_t res =
-    reinterpret_cast<intptr_t>(CALL_GENERATED_CODE(isolate, f, 3, 4, 3, 0, 0));
+    reinterpret_cast<intptr_t>(f.Call(3, 4, 3, 0, 0));
   ::printf("f() = %" V8PRIdPTR "\n", res);
   CHECK_EQ(1, static_cast<int>(res));
 }
@@ -331,7 +329,7 @@
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
 
-  MacroAssembler assm(isolate, NULL, 0);
+  MacroAssembler assm(isolate, nullptr, 0);
 
   Label yes;
 
@@ -349,9 +347,9 @@
 #ifdef DEBUG
   code->Print();
 #endif
-  F2 f = FUNCTION_CAST<F2>(code->entry());
+  auto f = GeneratedCode<F2>::FromCode(*code);
   intptr_t res =
-    reinterpret_cast<intptr_t>(CALL_GENERATED_CODE(isolate, f, 3, 4, 3, 0, 0));
+    reinterpret_cast<intptr_t>(f.Call(3, 4, 3, 0, 0));
   ::printf("f() = %" V8PRIdPTR "\n", res);
   CHECK_EQ(0x2468, static_cast<int>(res));
 }
@@ -363,7 +361,7 @@
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
 
-  MacroAssembler assm(isolate, NULL, 0);
+  MacroAssembler assm(isolate, nullptr, 0);
 
   // Zero upper bits of r3/r4
   __ llihf(r3, Operand::Zero());
@@ -380,9 +378,9 @@
 #ifdef DEBUG
   code->Print();
 #endif
-  F1 f = FUNCTION_CAST<F1>(code->entry());
+  auto f = GeneratedCode<F1>::FromCode(*code);
   intptr_t res =
-    reinterpret_cast<intptr_t>(CALL_GENERATED_CODE(isolate, f, 100, 0,
+    reinterpret_cast<intptr_t>(f.Call(100, 0,
                                                    0, 0, 0));
   ::printf("f() = %" V8PRIdPTR  "\n", res);
   CHECK_EQ(0, static_cast<int>(res));
@@ -395,7 +393,7 @@
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
 
-  MacroAssembler assm(isolate, NULL, 0);
+  MacroAssembler assm(isolate, nullptr, 0);
 
   __ lzdr(d4);
   __ b(r14);
@@ -407,9 +405,9 @@
 #ifdef DEBUG
   code->Print();
 #endif
-  F1 f = FUNCTION_CAST<F1>(code->entry());
+  auto f = GeneratedCode<F1>::FromCode(*code);
   intptr_t res =
-    reinterpret_cast<intptr_t>(CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0));
+    reinterpret_cast<intptr_t>(f.Call(0, 0, 0, 0, 0));
   ::printf("f() = %" V8PRIdPTR  "\n", res);
 }
 #endif
@@ -426,7 +424,7 @@
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
 
-  Assembler assm(isolate, NULL, 0);
+  Assembler assm(isolate, nullptr, 0);
 
   Label ok, failed;
 
@@ -492,9 +490,8 @@
 #ifdef DEBUG
   code->Print();
 #endif
-  F2 f = FUNCTION_CAST<F2>(code->entry());
-  intptr_t res = reinterpret_cast<intptr_t>(
-      CALL_GENERATED_CODE(isolate, f, 3, 4, 0, 0, 0));
+  auto f = GeneratedCode<F2>::FromCode(*code);
+  intptr_t res = reinterpret_cast<intptr_t>(f.Call(3, 4, 0, 0, 0));
   ::printf("f() = %" V8PRIxPTR "\n", res);
   CHECK_EQ(0, static_cast<int>(res));
 }
diff --git a/src/v8/test/cctest/test-assembler-x64.cc b/src/v8/test/cctest/test-assembler-x64.cc
index 8e7af93..043743b 100644
--- a/src/v8/test/cctest/test-assembler-x64.cc
+++ b/src/v8/test/cctest/test-assembler-x64.cc
@@ -67,17 +67,13 @@
 static const Register arg2 = rsi;
 #endif
 
-#define __ assm.
-
+#define __ masm.
 
 TEST(AssemblerX64ReturnOperation) {
   CcTest::InitializeVM();
-  // Allocate an executable page of memory.
-  size_t actual_size;
-  byte* buffer = static_cast<byte*>(v8::base::OS::Allocate(
-      Assembler::kMinimalBufferSize, &actual_size, true));
-  CHECK(buffer);
-  Assembler assm(CcTest::i_isolate(), buffer, static_cast<int>(actual_size));
+  size_t allocated;
+  byte* buffer = AllocateAssemblerBuffer(&allocated);
+  Assembler masm(CcTest::i_isolate(), buffer, static_cast<int>(allocated));
 
   // Assemble a simple function that copies argument 2 and returns it.
   __ movq(rax, arg2);
@@ -85,7 +81,8 @@
   __ ret(0);
 
   CodeDesc desc;
-  assm.GetCode(CcTest::i_isolate(), &desc);
+  masm.GetCode(CcTest::i_isolate(), &desc);
+  MakeAssemblerBufferExecutable(buffer, allocated);
   // Call the function from C++.
   int result =  FUNCTION_CAST<F2>(buffer)(3, 2);
   CHECK_EQ(2, result);
@@ -94,12 +91,9 @@
 
 TEST(AssemblerX64StackOperations) {
   CcTest::InitializeVM();
-  // Allocate an executable page of memory.
-  size_t actual_size;
-  byte* buffer = static_cast<byte*>(v8::base::OS::Allocate(
-      Assembler::kMinimalBufferSize, &actual_size, true));
-  CHECK(buffer);
-  Assembler assm(CcTest::i_isolate(), buffer, static_cast<int>(actual_size));
+  size_t allocated;
+  byte* buffer = AllocateAssemblerBuffer(&allocated);
+  Assembler masm(CcTest::i_isolate(), buffer, static_cast<int>(allocated));
 
   // Assemble a simple function that copies argument 2 and returns it.
   // We compile without stack frame pointers, so the gdb debugger shows
@@ -117,7 +111,8 @@
   __ ret(0);
 
   CodeDesc desc;
-  assm.GetCode(CcTest::i_isolate(), &desc);
+  masm.GetCode(CcTest::i_isolate(), &desc);
+  MakeAssemblerBufferExecutable(buffer, allocated);
   // Call the function from C++.
   int result =  FUNCTION_CAST<F2>(buffer)(3, 2);
   CHECK_EQ(2, result);
@@ -126,12 +121,9 @@
 
 TEST(AssemblerX64ArithmeticOperations) {
   CcTest::InitializeVM();
-  // Allocate an executable page of memory.
-  size_t actual_size;
-  byte* buffer = static_cast<byte*>(v8::base::OS::Allocate(
-      Assembler::kMinimalBufferSize, &actual_size, true));
-  CHECK(buffer);
-  Assembler assm(CcTest::i_isolate(), buffer, static_cast<int>(actual_size));
+  size_t allocated;
+  byte* buffer = AllocateAssemblerBuffer(&allocated);
+  Assembler masm(CcTest::i_isolate(), buffer, static_cast<int>(allocated));
 
   // Assemble a simple function that adds arguments returning the sum.
   __ movq(rax, arg2);
@@ -139,7 +131,8 @@
   __ ret(0);
 
   CodeDesc desc;
-  assm.GetCode(CcTest::i_isolate(), &desc);
+  masm.GetCode(CcTest::i_isolate(), &desc);
+  MakeAssemblerBufferExecutable(buffer, allocated);
   // Call the function from C++.
   int result =  FUNCTION_CAST<F2>(buffer)(3, 2);
   CHECK_EQ(5, result);
@@ -148,12 +141,9 @@
 
 TEST(AssemblerX64CmpbOperation) {
   CcTest::InitializeVM();
-  // Allocate an executable page of memory.
-  size_t actual_size;
-  byte* buffer = static_cast<byte*>(v8::base::OS::Allocate(
-      Assembler::kMinimalBufferSize, &actual_size, true));
-  CHECK(buffer);
-  Assembler assm(CcTest::i_isolate(), buffer, static_cast<int>(actual_size));
+  size_t allocated;
+  byte* buffer = AllocateAssemblerBuffer(&allocated);
+  Assembler masm(CcTest::i_isolate(), buffer, static_cast<int>(allocated));
 
   // Assemble a function that compare argument byte returing 1 if equal else 0.
   // On Windows, it compares rcx with rdx which does not require REX prefix;
@@ -168,7 +158,8 @@
   __ ret(0);
 
   CodeDesc desc;
-  assm.GetCode(CcTest::i_isolate(), &desc);
+  masm.GetCode(CcTest::i_isolate(), &desc);
+  MakeAssemblerBufferExecutable(buffer, allocated);
   // Call the function from C++.
   int result =  FUNCTION_CAST<F2>(buffer)(0x1002, 0x2002);
   CHECK_EQ(1, result);
@@ -178,16 +169,14 @@
 
 TEST(Regression684407) {
   CcTest::InitializeVM();
-  // Allocate an executable page of memory.
-  size_t actual_size;
-  byte* buffer = static_cast<byte*>(v8::base::OS::Allocate(
-      Assembler::kMinimalBufferSize, &actual_size, true));
-  CHECK(buffer);
-  Assembler assm(CcTest::i_isolate(), buffer, static_cast<int>(actual_size));
-  Address before = assm.pc();
+  size_t allocated;
+  byte* buffer = AllocateAssemblerBuffer(&allocated);
+  Assembler masm(CcTest::i_isolate(), buffer, static_cast<int>(allocated));
+
+  Address before = masm.pc();
   __ cmpl(Operand(arg1, 0),
           Immediate(0, RelocInfo::WASM_FUNCTION_TABLE_SIZE_REFERENCE));
-  Address after = assm.pc();
+  Address after = masm.pc();
   size_t instruction_size = static_cast<size_t>(after - before);
   // Check that the immediate is not encoded as uint8.
   CHECK_LT(sizeof(uint32_t), instruction_size);
@@ -195,12 +184,9 @@
 
 TEST(AssemblerX64ImulOperation) {
   CcTest::InitializeVM();
-  // Allocate an executable page of memory.
-  size_t actual_size;
-  byte* buffer = static_cast<byte*>(v8::base::OS::Allocate(
-      Assembler::kMinimalBufferSize, &actual_size, true));
-  CHECK(buffer);
-  Assembler assm(CcTest::i_isolate(), buffer, static_cast<int>(actual_size));
+  size_t allocated;
+  byte* buffer = AllocateAssemblerBuffer(&allocated);
+  Assembler masm(CcTest::i_isolate(), buffer, static_cast<int>(allocated));
 
   // Assemble a simple function that multiplies arguments returning the high
   // word.
@@ -210,7 +196,8 @@
   __ ret(0);
 
   CodeDesc desc;
-  assm.GetCode(CcTest::i_isolate(), &desc);
+  masm.GetCode(CcTest::i_isolate(), &desc);
+  MakeAssemblerBufferExecutable(buffer, allocated);
   // Call the function from C++.
   int result =  FUNCTION_CAST<F2>(buffer)(3, 2);
   CHECK_EQ(0, result);
@@ -223,12 +210,9 @@
 TEST(AssemblerX64testbwqOperation) {
   CcTest::InitializeVM();
   v8::HandleScope scope(CcTest::isolate());
-  // Allocate an executable page of memory.
-  size_t actual_size;
-  byte* buffer = static_cast<byte*>(v8::base::OS::Allocate(
-      Assembler::kMinimalBufferSize, &actual_size, true));
-  CHECK(buffer);
-  Assembler assm(CcTest::i_isolate(), buffer, static_cast<int>(actual_size));
+  size_t allocated;
+  byte* buffer = AllocateAssemblerBuffer(&allocated);
+  Assembler masm(CcTest::i_isolate(), buffer, static_cast<int>(allocated));
 
   __ pushq(rbx);
   __ pushq(rdi);
@@ -382,7 +366,8 @@
   __ ret(0);
 
   CodeDesc desc;
-  assm.GetCode(CcTest::i_isolate(), &desc);
+  masm.GetCode(CcTest::i_isolate(), &desc);
+  MakeAssemblerBufferExecutable(buffer, allocated);
   // Call the function from C++.
   int result = FUNCTION_CAST<F2>(buffer)(0, 0);
   CHECK_EQ(1, result);
@@ -390,12 +375,9 @@
 
 TEST(AssemblerX64XchglOperations) {
   CcTest::InitializeVM();
-  // Allocate an executable page of memory.
-  size_t actual_size;
-  byte* buffer = static_cast<byte*>(v8::base::OS::Allocate(
-      Assembler::kMinimalBufferSize, &actual_size, true));
-  CHECK(buffer);
-  Assembler assm(CcTest::i_isolate(), buffer, static_cast<int>(actual_size));
+  size_t allocated;
+  byte* buffer = AllocateAssemblerBuffer(&allocated);
+  Assembler masm(CcTest::i_isolate(), buffer, static_cast<int>(allocated));
 
   __ movq(rax, Operand(arg1, 0));
   __ movq(r11, Operand(arg2, 0));
@@ -405,7 +387,8 @@
   __ ret(0);
 
   CodeDesc desc;
-  assm.GetCode(CcTest::i_isolate(), &desc);
+  masm.GetCode(CcTest::i_isolate(), &desc);
+  MakeAssemblerBufferExecutable(buffer, allocated);
   // Call the function from C++.
   uint64_t left = V8_2PART_UINT64_C(0x10000000, 20000000);
   uint64_t right = V8_2PART_UINT64_C(0x30000000, 40000000);
@@ -418,19 +401,17 @@
 
 TEST(AssemblerX64OrlOperations) {
   CcTest::InitializeVM();
-  // Allocate an executable page of memory.
-  size_t actual_size;
-  byte* buffer = static_cast<byte*>(v8::base::OS::Allocate(
-      Assembler::kMinimalBufferSize, &actual_size, true));
-  CHECK(buffer);
-  Assembler assm(CcTest::i_isolate(), buffer, static_cast<int>(actual_size));
+  size_t allocated;
+  byte* buffer = AllocateAssemblerBuffer(&allocated);
+  Assembler masm(CcTest::i_isolate(), buffer, static_cast<int>(allocated));
 
   __ movq(rax, Operand(arg2, 0));
   __ orl(Operand(arg1, 0), rax);
   __ ret(0);
 
   CodeDesc desc;
-  assm.GetCode(CcTest::i_isolate(), &desc);
+  masm.GetCode(CcTest::i_isolate(), &desc);
+  MakeAssemblerBufferExecutable(buffer, allocated);
   // Call the function from C++.
   uint64_t left = V8_2PART_UINT64_C(0x10000000, 20000000);
   uint64_t right = V8_2PART_UINT64_C(0x30000000, 40000000);
@@ -442,19 +423,17 @@
 
 TEST(AssemblerX64RollOperations) {
   CcTest::InitializeVM();
-  // Allocate an executable page of memory.
-  size_t actual_size;
-  byte* buffer = static_cast<byte*>(v8::base::OS::Allocate(
-      Assembler::kMinimalBufferSize, &actual_size, true));
-  CHECK(buffer);
-  Assembler assm(CcTest::i_isolate(), buffer, static_cast<int>(actual_size));
+  size_t allocated;
+  byte* buffer = AllocateAssemblerBuffer(&allocated);
+  Assembler masm(CcTest::i_isolate(), buffer, static_cast<int>(allocated));
 
   __ movq(rax, arg1);
   __ roll(rax, Immediate(1));
   __ ret(0);
 
   CodeDesc desc;
-  assm.GetCode(CcTest::i_isolate(), &desc);
+  masm.GetCode(CcTest::i_isolate(), &desc);
+  MakeAssemblerBufferExecutable(buffer, allocated);
   // Call the function from C++.
   uint64_t src = V8_2PART_UINT64_C(0x10000000, C0000000);
   uint64_t result = FUNCTION_CAST<F5>(buffer)(src);
@@ -464,36 +443,31 @@
 
 TEST(AssemblerX64SublOperations) {
   CcTest::InitializeVM();
-  // Allocate an executable page of memory.
-  size_t actual_size;
-  byte* buffer = static_cast<byte*>(v8::base::OS::Allocate(
-      Assembler::kMinimalBufferSize, &actual_size, true));
-  CHECK(buffer);
-  Assembler assm(CcTest::i_isolate(), buffer, static_cast<int>(actual_size));
+  size_t allocated;
+  byte* buffer = AllocateAssemblerBuffer(&allocated);
+  Assembler masm(CcTest::i_isolate(), buffer, static_cast<int>(allocated));
 
   __ movq(rax, Operand(arg2, 0));
   __ subl(Operand(arg1, 0), rax);
   __ ret(0);
 
   CodeDesc desc;
-  assm.GetCode(CcTest::i_isolate(), &desc);
+  masm.GetCode(CcTest::i_isolate(), &desc);
+  MakeAssemblerBufferExecutable(buffer, allocated);
   // Call the function from C++.
   uint64_t left = V8_2PART_UINT64_C(0x10000000, 20000000);
   uint64_t right = V8_2PART_UINT64_C(0x30000000, 40000000);
   uint64_t result = FUNCTION_CAST<F4>(buffer)(&left, &right);
-  CHECK_EQ(V8_2PART_UINT64_C(0x10000000, e0000000), left);
+  CHECK_EQ(V8_2PART_UINT64_C(0x10000000, E0000000), left);
   USE(result);
 }
 
 
 TEST(AssemblerX64TestlOperations) {
   CcTest::InitializeVM();
-  // Allocate an executable page of memory.
-  size_t actual_size;
-  byte* buffer = static_cast<byte*>(v8::base::OS::Allocate(
-      Assembler::kMinimalBufferSize, &actual_size, true));
-  CHECK(buffer);
-  Assembler assm(CcTest::i_isolate(), buffer, static_cast<int>(actual_size));
+  size_t allocated;
+  byte* buffer = AllocateAssemblerBuffer(&allocated);
+  Assembler masm(CcTest::i_isolate(), buffer, static_cast<int>(allocated));
 
   // Set rax with the ZF flag of the testl instruction.
   Label done;
@@ -506,7 +480,8 @@
   __ ret(0);
 
   CodeDesc desc;
-  assm.GetCode(CcTest::i_isolate(), &desc);
+  masm.GetCode(CcTest::i_isolate(), &desc);
+  MakeAssemblerBufferExecutable(buffer, allocated);
   // Call the function from C++.
   uint64_t left = V8_2PART_UINT64_C(0x10000000, 20000000);
   uint64_t right = V8_2PART_UINT64_C(0x30000000, 00000000);
@@ -517,24 +492,22 @@
 TEST(AssemblerX64TestwOperations) {
   typedef uint16_t (*F)(uint16_t * x);
   CcTest::InitializeVM();
-  // Allocate an executable page of memory.
-  size_t actual_size;
-  byte* buffer = static_cast<byte*>(v8::base::OS::Allocate(
-      Assembler::kMinimalBufferSize, &actual_size, true));
-  CHECK(buffer);
-  Assembler assm(CcTest::i_isolate(), buffer, static_cast<int>(actual_size));
+  size_t allocated;
+  byte* buffer = AllocateAssemblerBuffer(&allocated);
+  Assembler masm(CcTest::i_isolate(), buffer, static_cast<int>(allocated));
 
   // Set rax with the ZF flag of the testl instruction.
   Label done;
   __ movq(rax, Immediate(1));
-  __ testw(Operand(arg1, 0), Immediate(0xf0f0));
+  __ testw(Operand(arg1, 0), Immediate(0xF0F0));
   __ j(not_zero, &done, Label::kNear);
   __ movq(rax, Immediate(0));
   __ bind(&done);
   __ ret(0);
 
   CodeDesc desc;
-  assm.GetCode(CcTest::i_isolate(), &desc);
+  masm.GetCode(CcTest::i_isolate(), &desc);
+  MakeAssemblerBufferExecutable(buffer, allocated);
   // Call the function from C++.
   uint16_t operand = 0x8000;
   uint16_t result = FUNCTION_CAST<F>(buffer)(&operand);
@@ -543,19 +516,17 @@
 
 TEST(AssemblerX64XorlOperations) {
   CcTest::InitializeVM();
-  // Allocate an executable page of memory.
-  size_t actual_size;
-  byte* buffer = static_cast<byte*>(v8::base::OS::Allocate(
-      Assembler::kMinimalBufferSize, &actual_size, true));
-  CHECK(buffer);
-  Assembler assm(CcTest::i_isolate(), buffer, static_cast<int>(actual_size));
+  size_t allocated;
+  byte* buffer = AllocateAssemblerBuffer(&allocated);
+  Assembler masm(CcTest::i_isolate(), buffer, static_cast<int>(allocated));
 
   __ movq(rax, Operand(arg2, 0));
   __ xorl(Operand(arg1, 0), rax);
   __ ret(0);
 
   CodeDesc desc;
-  assm.GetCode(CcTest::i_isolate(), &desc);
+  masm.GetCode(CcTest::i_isolate(), &desc);
+  MakeAssemblerBufferExecutable(buffer, allocated);
   // Call the function from C++.
   uint64_t left = V8_2PART_UINT64_C(0x10000000, 20000000);
   uint64_t right = V8_2PART_UINT64_C(0x30000000, 60000000);
@@ -567,12 +538,9 @@
 
 TEST(AssemblerX64MemoryOperands) {
   CcTest::InitializeVM();
-  // Allocate an executable page of memory.
-  size_t actual_size;
-  byte* buffer = static_cast<byte*>(v8::base::OS::Allocate(
-      Assembler::kMinimalBufferSize, &actual_size, true));
-  CHECK(buffer);
-  Assembler assm(CcTest::i_isolate(), buffer, static_cast<int>(actual_size));
+  size_t allocated;
+  byte* buffer = AllocateAssemblerBuffer(&allocated);
+  Assembler masm(CcTest::i_isolate(), buffer, static_cast<int>(allocated));
 
   // Assemble a simple function that copies argument 2 and returns it.
   __ pushq(rbp);
@@ -592,7 +560,8 @@
   __ ret(0);
 
   CodeDesc desc;
-  assm.GetCode(CcTest::i_isolate(), &desc);
+  masm.GetCode(CcTest::i_isolate(), &desc);
+  MakeAssemblerBufferExecutable(buffer, allocated);
   // Call the function from C++.
   int result =  FUNCTION_CAST<F2>(buffer)(3, 2);
   CHECK_EQ(3, result);
@@ -601,12 +570,9 @@
 
 TEST(AssemblerX64ControlFlow) {
   CcTest::InitializeVM();
-  // Allocate an executable page of memory.
-  size_t actual_size;
-  byte* buffer = static_cast<byte*>(v8::base::OS::Allocate(
-      Assembler::kMinimalBufferSize, &actual_size, true));
-  CHECK(buffer);
-  Assembler assm(CcTest::i_isolate(), buffer, static_cast<int>(actual_size));
+  size_t allocated;
+  byte* buffer = AllocateAssemblerBuffer(&allocated);
+  Assembler masm(CcTest::i_isolate(), buffer, static_cast<int>(allocated));
 
   // Assemble a simple function that copies argument 1 and returns it.
   __ pushq(rbp);
@@ -621,7 +587,8 @@
   __ ret(0);
 
   CodeDesc desc;
-  assm.GetCode(CcTest::i_isolate(), &desc);
+  masm.GetCode(CcTest::i_isolate(), &desc);
+  MakeAssemblerBufferExecutable(buffer, allocated);
   // Call the function from C++.
   int result =  FUNCTION_CAST<F2>(buffer)(3, 2);
   CHECK_EQ(3, result);
@@ -630,12 +597,10 @@
 
 TEST(AssemblerX64LoopImmediates) {
   CcTest::InitializeVM();
-  // Allocate an executable page of memory.
-  size_t actual_size;
-  byte* buffer = static_cast<byte*>(v8::base::OS::Allocate(
-      Assembler::kMinimalBufferSize, &actual_size, true));
-  CHECK(buffer);
-  Assembler assm(CcTest::i_isolate(), buffer, static_cast<int>(actual_size));
+  size_t allocated;
+  byte* buffer = AllocateAssemblerBuffer(&allocated);
+  Assembler masm(CcTest::i_isolate(), buffer, static_cast<int>(allocated));
+
   // Assemble two loops using rax as counter, and verify the ending counts.
   Label Fail;
   __ movq(rax, Immediate(-3));
@@ -671,7 +636,8 @@
   __ ret(0);
 
   CodeDesc desc;
-  assm.GetCode(CcTest::i_isolate(), &desc);
+  masm.GetCode(CcTest::i_isolate(), &desc);
+  MakeAssemblerBufferExecutable(buffer, allocated);
   // Call the function from C++.
   int result =  FUNCTION_CAST<F0>(buffer)();
   CHECK_EQ(1, result);
@@ -679,7 +645,7 @@
 
 
 TEST(OperandRegisterDependency) {
-  int offsets[4] = {0, 1, 0xfed, 0xbeefcad};
+  int offsets[4] = {0, 1, 0xFED, 0xBEEFCAD};
   for (int i = 0; i < 4; i++) {
     int offset = offsets[i];
     CHECK(Operand(rax, offset).AddressUsesRegister(rax));
@@ -725,7 +691,7 @@
   // Test chaining of label usages within instructions (issue 1644).
   CcTest::InitializeVM();
   v8::HandleScope scope(CcTest::isolate());
-  Assembler assm(CcTest::i_isolate(), NULL, 0);
+  Assembler masm(CcTest::i_isolate(), nullptr, 0);
 
   Label target;
   __ j(equal, &target);
@@ -740,7 +706,7 @@
   v8::HandleScope scope(CcTest::isolate());
   byte buffer[1024];
   Isolate* isolate = CcTest::i_isolate();
-  Assembler assm(isolate, buffer, sizeof(buffer));
+  Assembler masm(isolate, buffer, sizeof(buffer));
   __ pushq(rbx);
   __ pushq(rcx);
   __ pushq(rdx);
@@ -753,9 +719,9 @@
   __ movq(rdi, Immediate(5));
   __ movq(rsi, Immediate(6));
   for (int i = 0; i < 16; i++) {
-    int before = assm.pc_offset();
+    int before = masm.pc_offset();
     __ Nop(i);
-    CHECK_EQ(assm.pc_offset() - before, i);
+    CHECK_EQ(masm.pc_offset() - before, i);
   }
 
   Label fail;
@@ -788,7 +754,7 @@
   __ ret(0);
 
   CodeDesc desc;
-  assm.GetCode(isolate, &desc);
+  masm.GetCode(isolate, &desc);
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
 
@@ -811,7 +777,7 @@
   CHECK_EQ(ELEMENT_COUNT, vec->Length());
 
   Isolate* isolate = CcTest::i_isolate();
-  Assembler assm(isolate, buffer, sizeof(buffer));
+  Assembler masm(isolate, buffer, sizeof(buffer));
 
   // Remove return address from the stack for fix stack frame alignment.
   __ popq(rcx);
@@ -844,7 +810,7 @@
   __ ret(0);
 
   CodeDesc desc;
-  assm.GetCode(isolate, &desc);
+  masm.GetCode(isolate, &desc);
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
 
@@ -865,7 +831,7 @@
   global_template->Set(v8_str("do_sse2"),
                        v8::FunctionTemplate::New(isolate, DoSSE2));
 
-  LocalContext env(NULL, global_template);
+  LocalContext env(nullptr, global_template);
   CompileRun(
       "function foo(vec) {"
       "  return do_sse2(vec);"
@@ -900,14 +866,15 @@
   v8::HandleScope scope(CcTest::isolate());
   byte buffer[256];
   Isolate* isolate = CcTest::i_isolate();
-  Assembler assm(isolate, buffer, sizeof(buffer));
-  { CpuFeatureScope fscope2(&assm, SSE4_1);
+  Assembler masm(isolate, buffer, sizeof(buffer));
+  {
+    CpuFeatureScope fscope2(&masm, SSE4_1);
     __ extractps(rax, xmm0, 0x1);
     __ ret(0);
   }
 
   CodeDesc desc;
-  assm.GetCode(isolate, &desc);
+  masm.GetCode(isolate, &desc);
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
 #ifdef OBJECT_PRINT
@@ -930,7 +897,7 @@
   Isolate* isolate = reinterpret_cast<Isolate*>(CcTest::isolate());
   HandleScope scope(isolate);
   v8::internal::byte buffer[256];
-  MacroAssembler assm(isolate, buffer, sizeof(buffer),
+  MacroAssembler masm(isolate, buffer, sizeof(buffer),
                       v8::internal::CodeObjectRequired::kYes);
   {
     __ shufps(xmm0, xmm0, 0x0);  // brocast first argument
@@ -941,11 +908,12 @@
     __ subps(xmm2, xmm0);
     __ divps(xmm2, xmm1);
     __ cvttss2si(rax, xmm2);
+    __ haddps(xmm1, xmm0);
     __ ret(0);
   }
 
   CodeDesc desc;
-  assm.GetCode(isolate, &desc);
+  masm.GetCode(isolate, &desc);
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
 #ifdef OBJECT_PRINT
@@ -966,10 +934,10 @@
   Isolate* isolate = reinterpret_cast<Isolate*>(CcTest::isolate());
   HandleScope scope(isolate);
   v8::internal::byte buffer[1024];
-  MacroAssembler assm(isolate, buffer, sizeof(buffer),
+  MacroAssembler masm(isolate, buffer, sizeof(buffer),
                       v8::internal::CodeObjectRequired::kYes);
   {
-    CpuFeatureScope fscope(&assm, FMA3);
+    CpuFeatureScope fscope(&masm, FMA3);
     Label exit;
     // argument in xmm0, xmm1 and xmm2
     // xmm0 * xmm1 + xmm2
@@ -1171,7 +1139,7 @@
   }
 
   CodeDesc desc;
-  assm.GetCode(isolate, &desc);
+  masm.GetCode(isolate, &desc);
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
 #ifdef OBJECT_PRINT
@@ -1192,10 +1160,10 @@
   Isolate* isolate = reinterpret_cast<Isolate*>(CcTest::isolate());
   HandleScope scope(isolate);
   v8::internal::byte buffer[1024];
-  MacroAssembler assm(isolate, buffer, sizeof(buffer),
+  MacroAssembler masm(isolate, buffer, sizeof(buffer),
                       v8::internal::CodeObjectRequired::kYes);
   {
-    CpuFeatureScope fscope(&assm, FMA3);
+    CpuFeatureScope fscope(&masm, FMA3);
     Label exit;
     // arguments in xmm0, xmm1 and xmm2
     // xmm0 * xmm1 + xmm2
@@ -1397,7 +1365,7 @@
   }
 
   CodeDesc desc;
-  assm.GetCode(isolate, &desc);
+  masm.GetCode(isolate, &desc);
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
 #ifdef OBJECT_PRINT
@@ -1416,7 +1384,7 @@
   Isolate* isolate = reinterpret_cast<Isolate*>(CcTest::isolate());
   HandleScope scope(isolate);
   v8::internal::byte buffer[1024];
-  Assembler assm(isolate, buffer, sizeof(buffer));
+  Assembler masm(isolate, buffer, sizeof(buffer));
   {
     Label exit;
     // arguments in xmm0, xmm1 and xmm2
@@ -1472,7 +1440,7 @@
   }
 
   CodeDesc desc;
-  assm.GetCode(isolate, &desc);
+  masm.GetCode(isolate, &desc);
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
 #ifdef OBJECT_PRINT
@@ -1494,14 +1462,14 @@
   Isolate* isolate = reinterpret_cast<Isolate*>(CcTest::isolate());
   HandleScope scope(isolate);
   v8::internal::byte buffer[1024];
-  Assembler assm(isolate, buffer, sizeof(buffer));
+  Assembler masm(isolate, buffer, sizeof(buffer));
   {
-    CpuFeatureScope avx_scope(&assm, AVX);
+    CpuFeatureScope avx_scope(&masm, AVX);
     Label exit;
     // arguments in xmm0, xmm1 and xmm2
     __ subq(rsp, Immediate(kDoubleSize * 2));  // For memory operand
 
-    __ movl(rdx, Immediate(0xc2f64000));  // -123.125
+    __ movl(rdx, Immediate(0xC2F64000));  // -123.125
     __ vmovd(xmm4, rdx);
     __ vmovss(Operand(rsp, 0), xmm4);
     __ vmovss(xmm5, Operand(rsp, 0));
@@ -1557,7 +1525,7 @@
   }
 
   CodeDesc desc;
-  assm.GetCode(isolate, &desc);
+  masm.GetCode(isolate, &desc);
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
 #ifdef OBJECT_PRINT
@@ -1579,9 +1547,9 @@
   Isolate* isolate = reinterpret_cast<Isolate*>(CcTest::isolate());
   HandleScope scope(isolate);
   v8::internal::byte buffer[1024];
-  Assembler assm(isolate, buffer, sizeof(buffer));
+  Assembler masm(isolate, buffer, sizeof(buffer));
   {
-    CpuFeatureScope avx_scope(&assm, AVX);
+    CpuFeatureScope avx_scope(&masm, AVX);
     Label exit;
     // arguments in xmm0, xmm1 and xmm2
     __ subq(rsp, Immediate(kDoubleSize * 2));  // For memory operand
@@ -1595,7 +1563,7 @@
 
     // Test vcvtss2sd & vcvtsd2ss
     __ movl(rax, Immediate(9));
-    __ movq(rdx, V8_INT64_C(0x426D1A0000000000));
+    __ movq(rdx, uint64_t{0x426D1A0000000000});
     __ movq(Operand(rsp, 0), rdx);
     __ vcvtsd2ss(xmm6, xmm6, Operand(rsp, 0));
     __ vcvtss2sd(xmm7, xmm6, xmm6);
@@ -1621,10 +1589,10 @@
 
     // Test vcvttsd2siq
     __ movl(rax, Immediate(11));
-    __ movq(rdx, V8_INT64_C(0x426D1A94A2000000));  // 1.0e12
+    __ movq(rdx, uint64_t{0x426D1A94A2000000});  // 1.0e12
     __ vmovq(xmm6, rdx);
     __ vcvttsd2siq(rcx, xmm6);
-    __ movq(rdx, V8_INT64_C(1000000000000));
+    __ movq(rdx, uint64_t{1000000000000});
     __ cmpq(rcx, rdx);
     __ j(not_equal, &exit);
     __ xorq(rcx, rcx);
@@ -1635,9 +1603,9 @@
 
     // Test vmovmskpd
     __ movl(rax, Immediate(12));
-    __ movq(rdx, V8_INT64_C(0x426D1A94A2000000));  // 1.0e12
+    __ movq(rdx, uint64_t{0x426D1A94A2000000});  // 1.0e12
     __ vmovq(xmm6, rdx);
-    __ movq(rdx, V8_INT64_C(0xC26D1A94A2000000));  // -1.0e12
+    __ movq(rdx, uint64_t{0xC26D1A94A2000000});  // -1.0e12
     __ vmovq(xmm7, rdx);
     __ shufps(xmm6, xmm7, 0x44);
     __ vmovmskpd(rdx, xmm6);
@@ -1645,54 +1613,54 @@
     __ j(not_equal, &exit);
 
     // Test vpcmpeqd
-    __ movq(rdx, V8_UINT64_C(0x0123456789abcdef));
-    __ movq(rcx, V8_UINT64_C(0x0123456788888888));
+    __ movq(rdx, uint64_t{0x0123456789ABCDEF});
+    __ movq(rcx, uint64_t{0x0123456788888888});
     __ vmovq(xmm6, rdx);
     __ vmovq(xmm7, rcx);
     __ vpcmpeqd(xmm8, xmm6, xmm7);
     __ vmovq(rdx, xmm8);
-    __ movq(rcx, V8_UINT64_C(0xffffffff00000000));
+    __ movq(rcx, uint64_t{0xFFFFFFFF00000000});
     __ cmpq(rcx, rdx);
     __ movl(rax, Immediate(13));
     __ j(not_equal, &exit);
 
     // Test vpsllq, vpsrlq
     __ movl(rax, Immediate(13));
-    __ movq(rdx, V8_UINT64_C(0x0123456789abcdef));
+    __ movq(rdx, uint64_t{0x0123456789ABCDEF});
     __ vmovq(xmm6, rdx);
     __ vpsrlq(xmm7, xmm6, 4);
     __ vmovq(rdx, xmm7);
-    __ movq(rcx, V8_UINT64_C(0x00123456789abcde));
+    __ movq(rcx, uint64_t{0x00123456789ABCDE});
     __ cmpq(rdx, rcx);
     __ j(not_equal, &exit);
     __ vpsllq(xmm7, xmm6, 12);
     __ vmovq(rdx, xmm7);
-    __ movq(rcx, V8_UINT64_C(0x3456789abcdef000));
+    __ movq(rcx, uint64_t{0x3456789ABCDEF000});
     __ cmpq(rdx, rcx);
     __ j(not_equal, &exit);
 
     // Test vandpd, vorpd, vxorpd
     __ movl(rax, Immediate(14));
-    __ movl(rdx, Immediate(0x00ff00ff));
-    __ movl(rcx, Immediate(0x0f0f0f0f));
+    __ movl(rdx, Immediate(0x00FF00FF));
+    __ movl(rcx, Immediate(0x0F0F0F0F));
     __ vmovd(xmm4, rdx);
     __ vmovd(xmm5, rcx);
     __ vandpd(xmm6, xmm4, xmm5);
     __ vmovd(rdx, xmm6);
-    __ cmpl(rdx, Immediate(0x000f000f));
+    __ cmpl(rdx, Immediate(0x000F000F));
     __ j(not_equal, &exit);
     __ vorpd(xmm6, xmm4, xmm5);
     __ vmovd(rdx, xmm6);
-    __ cmpl(rdx, Immediate(0x0fff0fff));
+    __ cmpl(rdx, Immediate(0x0FFF0FFF));
     __ j(not_equal, &exit);
     __ vxorpd(xmm6, xmm4, xmm5);
     __ vmovd(rdx, xmm6);
-    __ cmpl(rdx, Immediate(0x0ff00ff0));
+    __ cmpl(rdx, Immediate(0x0FF00FF0));
     __ j(not_equal, &exit);
 
     // Test vsqrtsd
     __ movl(rax, Immediate(15));
-    __ movq(rdx, V8_UINT64_C(0x4004000000000000));  // 2.5
+    __ movq(rdx, uint64_t{0x4004000000000000});  // 2.5
     __ vmovq(xmm4, rdx);
     __ vmulsd(xmm5, xmm4, xmm4);
     __ vmovsd(Operand(rsp, 0), xmm5);
@@ -1707,10 +1675,10 @@
 
     // Test vroundsd
     __ movl(rax, Immediate(16));
-    __ movq(rdx, V8_UINT64_C(0x4002000000000000));  // 2.25
+    __ movq(rdx, uint64_t{0x4002000000000000});  // 2.25
     __ vmovq(xmm4, rdx);
     __ vroundsd(xmm5, xmm4, xmm4, kRoundUp);
-    __ movq(rcx, V8_UINT64_C(0x4008000000000000));  // 3.0
+    __ movq(rcx, uint64_t{0x4008000000000000});  // 3.0
     __ vmovq(xmm6, rcx);
     __ vucomisd(xmm5, xmm6);
     __ j(not_equal, &exit);
@@ -1718,7 +1686,7 @@
     // Test vcvtlsi2sd
     __ movl(rax, Immediate(17));
     __ movl(rdx, Immediate(6));
-    __ movq(rcx, V8_UINT64_C(0x4018000000000000));  // 6.0
+    __ movq(rcx, uint64_t{0x4018000000000000});  // 6.0
     __ vmovq(xmm5, rcx);
     __ vcvtlsi2sd(xmm6, xmm6, rdx);
     __ vucomisd(xmm5, xmm6);
@@ -1730,8 +1698,8 @@
 
     // Test vcvtqsi2sd
     __ movl(rax, Immediate(18));
-    __ movq(rdx, V8_UINT64_C(0x2000000000000000));  // 2 << 0x3c
-    __ movq(rcx, V8_UINT64_C(0x43c0000000000000));
+    __ movq(rdx, uint64_t{0x2000000000000000});  // 2 << 0x3C
+    __ movq(rcx, uint64_t{0x43C0000000000000});
     __ vmovq(xmm5, rcx);
     __ vcvtqsi2sd(xmm6, xmm6, rdx);
     __ vucomisd(xmm5, xmm6);
@@ -1739,13 +1707,13 @@
 
     // Test vcvtsd2si
     __ movl(rax, Immediate(19));
-    __ movq(rdx, V8_UINT64_C(0x4018000000000000));  // 6.0
+    __ movq(rdx, uint64_t{0x4018000000000000});  // 6.0
     __ vmovq(xmm5, rdx);
     __ vcvtsd2si(rcx, xmm5);
     __ cmpl(rcx, Immediate(6));
     __ j(not_equal, &exit);
 
-    __ movq(rdx, V8_INT64_C(0x3ff0000000000000));  // 1.0
+    __ movq(rdx, uint64_t{0x3FF0000000000000});  // 1.0
     __ vmovq(xmm7, rdx);
     __ vmulsd(xmm1, xmm1, xmm7);
     __ movq(Operand(rsp, 0), rdx);
@@ -1796,7 +1764,7 @@
   }
 
   CodeDesc desc;
-  assm.GetCode(isolate, &desc);
+  masm.GetCode(isolate, &desc);
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
 #ifdef OBJECT_PRINT
@@ -1818,166 +1786,166 @@
   Isolate* isolate = reinterpret_cast<Isolate*>(CcTest::isolate());
   HandleScope scope(isolate);
   v8::internal::byte buffer[1024];
-  MacroAssembler assm(isolate, buffer, sizeof(buffer),
+  MacroAssembler masm(isolate, buffer, sizeof(buffer),
                       v8::internal::CodeObjectRequired::kYes);
   {
-    CpuFeatureScope fscope(&assm, BMI1);
+    CpuFeatureScope fscope(&masm, BMI1);
     Label exit;
 
-    __ movq(rcx, V8_UINT64_C(0x1122334455667788));  // source operand
+    __ movq(rcx, uint64_t{0x1122334455667788});     // source operand
     __ pushq(rcx);                                  // For memory operand
 
     // andn
-    __ movq(rdx, V8_UINT64_C(0x1000000020000000));
+    __ movq(rdx, uint64_t{0x1000000020000000});
 
     __ movl(rax, Immediate(1));  // Test number
     __ andnq(r8, rdx, rcx);
-    __ movq(r9, V8_UINT64_C(0x0122334455667788));  // expected result
+    __ movq(r9, uint64_t{0x0122334455667788});  // expected result
     __ cmpq(r8, r9);
     __ j(not_equal, &exit);
 
     __ incq(rax);
     __ andnq(r8, rdx, Operand(rsp, 0));
-    __ movq(r9, V8_UINT64_C(0x0122334455667788));  // expected result
+    __ movq(r9, uint64_t{0x0122334455667788});  // expected result
     __ cmpq(r8, r9);
     __ j(not_equal, &exit);
 
     __ incq(rax);
     __ andnl(r8, rdx, rcx);
-    __ movq(r9, V8_UINT64_C(0x0000000055667788));  // expected result
+    __ movq(r9, uint64_t{0x0000000055667788});  // expected result
     __ cmpq(r8, r9);
     __ j(not_equal, &exit);
 
     __ incq(rax);
     __ andnl(r8, rdx, Operand(rsp, 0));
-    __ movq(r9, V8_UINT64_C(0x0000000055667788));  // expected result
+    __ movq(r9, uint64_t{0x0000000055667788});  // expected result
     __ cmpq(r8, r9);
     __ j(not_equal, &exit);
 
     // bextr
-    __ movq(rdx, V8_UINT64_C(0x0000000000002808));
+    __ movq(rdx, uint64_t{0x0000000000002808});
 
     __ incq(rax);
     __ bextrq(r8, rcx, rdx);
-    __ movq(r9, V8_UINT64_C(0x0000003344556677));  // expected result
+    __ movq(r9, uint64_t{0x0000003344556677});  // expected result
     __ cmpq(r8, r9);
     __ j(not_equal, &exit);
 
     __ incq(rax);
     __ bextrq(r8, Operand(rsp, 0), rdx);
-    __ movq(r9, V8_UINT64_C(0x0000003344556677));  // expected result
+    __ movq(r9, uint64_t{0x0000003344556677});  // expected result
     __ cmpq(r8, r9);
     __ j(not_equal, &exit);
 
     __ incq(rax);
     __ bextrl(r8, rcx, rdx);
-    __ movq(r9, V8_UINT64_C(0x0000000000556677));  // expected result
+    __ movq(r9, uint64_t{0x0000000000556677});  // expected result
     __ cmpq(r8, r9);
     __ j(not_equal, &exit);
 
     __ incq(rax);
     __ bextrl(r8, Operand(rsp, 0), rdx);
-    __ movq(r9, V8_UINT64_C(0x0000000000556677));  // expected result
+    __ movq(r9, uint64_t{0x0000000000556677});  // expected result
     __ cmpq(r8, r9);
     __ j(not_equal, &exit);
 
     // blsi
     __ incq(rax);
     __ blsiq(r8, rcx);
-    __ movq(r9, V8_UINT64_C(0x0000000000000008));  // expected result
+    __ movq(r9, uint64_t{0x0000000000000008});  // expected result
     __ cmpq(r8, r9);
     __ j(not_equal, &exit);
 
     __ incq(rax);
     __ blsiq(r8, Operand(rsp, 0));
-    __ movq(r9, V8_UINT64_C(0x0000000000000008));  // expected result
+    __ movq(r9, uint64_t{0x0000000000000008});  // expected result
     __ cmpq(r8, r9);
     __ j(not_equal, &exit);
 
     __ incq(rax);
     __ blsil(r8, rcx);
-    __ movq(r9, V8_UINT64_C(0x0000000000000008));  // expected result
+    __ movq(r9, uint64_t{0x0000000000000008});  // expected result
     __ cmpq(r8, r9);
     __ j(not_equal, &exit);
 
     __ incq(rax);
     __ blsil(r8, Operand(rsp, 0));
-    __ movq(r9, V8_UINT64_C(0x0000000000000008));  // expected result
+    __ movq(r9, uint64_t{0x0000000000000008});  // expected result
     __ cmpq(r8, r9);
     __ j(not_equal, &exit);
 
     // blsmsk
     __ incq(rax);
     __ blsmskq(r8, rcx);
-    __ movq(r9, V8_UINT64_C(0x000000000000000f));  // expected result
+    __ movq(r9, uint64_t{0x000000000000000F});  // expected result
     __ cmpq(r8, r9);
     __ j(not_equal, &exit);
 
     __ incq(rax);
     __ blsmskq(r8, Operand(rsp, 0));
-    __ movq(r9, V8_UINT64_C(0x000000000000000f));  // expected result
+    __ movq(r9, uint64_t{0x000000000000000F});  // expected result
     __ cmpq(r8, r9);
     __ j(not_equal, &exit);
 
     __ incq(rax);
     __ blsmskl(r8, rcx);
-    __ movq(r9, V8_UINT64_C(0x000000000000000f));  // expected result
+    __ movq(r9, uint64_t{0x000000000000000F});  // expected result
     __ cmpq(r8, r9);
     __ j(not_equal, &exit);
 
     __ incq(rax);
     __ blsmskl(r8, Operand(rsp, 0));
-    __ movq(r9, V8_UINT64_C(0x000000000000000f));  // expected result
+    __ movq(r9, uint64_t{0x000000000000000F});  // expected result
     __ cmpq(r8, r9);
     __ j(not_equal, &exit);
 
     // blsr
     __ incq(rax);
     __ blsrq(r8, rcx);
-    __ movq(r9, V8_UINT64_C(0x1122334455667780));  // expected result
+    __ movq(r9, uint64_t{0x1122334455667780});  // expected result
     __ cmpq(r8, r9);
     __ j(not_equal, &exit);
 
     __ incq(rax);
     __ blsrq(r8, Operand(rsp, 0));
-    __ movq(r9, V8_UINT64_C(0x1122334455667780));  // expected result
+    __ movq(r9, uint64_t{0x1122334455667780});  // expected result
     __ cmpq(r8, r9);
     __ j(not_equal, &exit);
 
     __ incq(rax);
     __ blsrl(r8, rcx);
-    __ movq(r9, V8_UINT64_C(0x0000000055667780));  // expected result
+    __ movq(r9, uint64_t{0x0000000055667780});  // expected result
     __ cmpq(r8, r9);
     __ j(not_equal, &exit);
 
     __ incq(rax);
     __ blsrl(r8, Operand(rsp, 0));
-    __ movq(r9, V8_UINT64_C(0x0000000055667780));  // expected result
+    __ movq(r9, uint64_t{0x0000000055667780});  // expected result
     __ cmpq(r8, r9);
     __ j(not_equal, &exit);
 
     // tzcnt
     __ incq(rax);
     __ tzcntq(r8, rcx);
-    __ movq(r9, V8_UINT64_C(0x0000000000000003));  // expected result
+    __ movq(r9, uint64_t{0x0000000000000003});  // expected result
     __ cmpq(r8, r9);
     __ j(not_equal, &exit);
 
     __ incq(rax);
     __ tzcntq(r8, Operand(rsp, 0));
-    __ movq(r9, V8_UINT64_C(0x0000000000000003));  // expected result
+    __ movq(r9, uint64_t{0x0000000000000003});  // expected result
     __ cmpq(r8, r9);
     __ j(not_equal, &exit);
 
     __ incq(rax);
     __ tzcntl(r8, rcx);
-    __ movq(r9, V8_UINT64_C(0x0000000000000003));  // expected result
+    __ movq(r9, uint64_t{0x0000000000000003});  // expected result
     __ cmpq(r8, r9);
     __ j(not_equal, &exit);
 
     __ incq(rax);
     __ tzcntl(r8, Operand(rsp, 0));
-    __ movq(r9, V8_UINT64_C(0x0000000000000003));  // expected result
+    __ movq(r9, uint64_t{0x0000000000000003});  // expected result
     __ cmpq(r8, r9);
     __ j(not_equal, &exit);
 
@@ -1988,7 +1956,7 @@
   }
 
   CodeDesc desc;
-  assm.GetCode(isolate, &desc);
+  masm.GetCode(isolate, &desc);
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
 #ifdef OBJECT_PRINT
@@ -2008,36 +1976,36 @@
   Isolate* isolate = reinterpret_cast<Isolate*>(CcTest::isolate());
   HandleScope scope(isolate);
   v8::internal::byte buffer[256];
-  MacroAssembler assm(isolate, buffer, sizeof(buffer),
+  MacroAssembler masm(isolate, buffer, sizeof(buffer),
                       v8::internal::CodeObjectRequired::kYes);
   {
-    CpuFeatureScope fscope(&assm, LZCNT);
+    CpuFeatureScope fscope(&masm, LZCNT);
     Label exit;
 
-    __ movq(rcx, V8_UINT64_C(0x1122334455667788));  // source operand
+    __ movq(rcx, uint64_t{0x1122334455667788});     // source operand
     __ pushq(rcx);                                  // For memory operand
 
     __ movl(rax, Immediate(1));  // Test number
     __ lzcntq(r8, rcx);
-    __ movq(r9, V8_UINT64_C(0x0000000000000003));  // expected result
+    __ movq(r9, uint64_t{0x0000000000000003});  // expected result
     __ cmpq(r8, r9);
     __ j(not_equal, &exit);
 
     __ incq(rax);
     __ lzcntq(r8, Operand(rsp, 0));
-    __ movq(r9, V8_UINT64_C(0x0000000000000003));  // expected result
+    __ movq(r9, uint64_t{0x0000000000000003});  // expected result
     __ cmpq(r8, r9);
     __ j(not_equal, &exit);
 
     __ incq(rax);
     __ lzcntl(r8, rcx);
-    __ movq(r9, V8_UINT64_C(0x0000000000000001));  // expected result
+    __ movq(r9, uint64_t{0x0000000000000001});  // expected result
     __ cmpq(r8, r9);
     __ j(not_equal, &exit);
 
     __ incq(rax);
     __ lzcntl(r8, Operand(rsp, 0));
-    __ movq(r9, V8_UINT64_C(0x0000000000000001));  // expected result
+    __ movq(r9, uint64_t{0x0000000000000001});  // expected result
     __ cmpq(r8, r9);
     __ j(not_equal, &exit);
 
@@ -2048,7 +2016,7 @@
   }
 
   CodeDesc desc;
-  assm.GetCode(isolate, &desc);
+  masm.GetCode(isolate, &desc);
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
 #ifdef OBJECT_PRINT
@@ -2068,36 +2036,36 @@
   Isolate* isolate = reinterpret_cast<Isolate*>(CcTest::isolate());
   HandleScope scope(isolate);
   v8::internal::byte buffer[256];
-  MacroAssembler assm(isolate, buffer, sizeof(buffer),
+  MacroAssembler masm(isolate, buffer, sizeof(buffer),
                       v8::internal::CodeObjectRequired::kYes);
   {
-    CpuFeatureScope fscope(&assm, POPCNT);
+    CpuFeatureScope fscope(&masm, POPCNT);
     Label exit;
 
-    __ movq(rcx, V8_UINT64_C(0x1111111111111100));  // source operand
+    __ movq(rcx, uint64_t{0x1111111111111100});     // source operand
     __ pushq(rcx);                                  // For memory operand
 
     __ movl(rax, Immediate(1));  // Test number
     __ popcntq(r8, rcx);
-    __ movq(r9, V8_UINT64_C(0x000000000000000e));  // expected result
+    __ movq(r9, uint64_t{0x000000000000000E});  // expected result
     __ cmpq(r8, r9);
     __ j(not_equal, &exit);
 
     __ incq(rax);
     __ popcntq(r8, Operand(rsp, 0));
-    __ movq(r9, V8_UINT64_C(0x000000000000000e));  // expected result
+    __ movq(r9, uint64_t{0x000000000000000E});  // expected result
     __ cmpq(r8, r9);
     __ j(not_equal, &exit);
 
     __ incq(rax);
     __ popcntl(r8, rcx);
-    __ movq(r9, V8_UINT64_C(0x0000000000000006));  // expected result
+    __ movq(r9, uint64_t{0x0000000000000006});  // expected result
     __ cmpq(r8, r9);
     __ j(not_equal, &exit);
 
     __ incq(rax);
     __ popcntl(r8, Operand(rsp, 0));
-    __ movq(r9, V8_UINT64_C(0x0000000000000006));  // expected result
+    __ movq(r9, uint64_t{0x0000000000000006});  // expected result
     __ cmpq(r8, r9);
     __ j(not_equal, &exit);
 
@@ -2108,7 +2076,7 @@
   }
 
   CodeDesc desc;
-  assm.GetCode(isolate, &desc);
+  masm.GetCode(isolate, &desc);
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
 #ifdef OBJECT_PRINT
@@ -2128,238 +2096,238 @@
   Isolate* isolate = reinterpret_cast<Isolate*>(CcTest::isolate());
   HandleScope scope(isolate);
   v8::internal::byte buffer[2048];
-  MacroAssembler assm(isolate, buffer, sizeof(buffer),
+  MacroAssembler masm(isolate, buffer, sizeof(buffer),
                       v8::internal::CodeObjectRequired::kYes);
   {
-    CpuFeatureScope fscope(&assm, BMI2);
+    CpuFeatureScope fscope(&masm, BMI2);
     Label exit;
     __ pushq(rbx);                                  // save rbx
-    __ movq(rcx, V8_UINT64_C(0x1122334455667788));  // source operand
+    __ movq(rcx, uint64_t{0x1122334455667788});     // source operand
     __ pushq(rcx);                                  // For memory operand
 
     // bzhi
-    __ movq(rdx, V8_UINT64_C(0x0000000000000009));
+    __ movq(rdx, uint64_t{0x0000000000000009});
 
     __ movl(rax, Immediate(1));  // Test number
     __ bzhiq(r8, rcx, rdx);
-    __ movq(r9, V8_UINT64_C(0x0000000000000188));  // expected result
+    __ movq(r9, uint64_t{0x0000000000000188});  // expected result
     __ cmpq(r8, r9);
     __ j(not_equal, &exit);
 
     __ incq(rax);
     __ bzhiq(r8, Operand(rsp, 0), rdx);
-    __ movq(r9, V8_UINT64_C(0x0000000000000188));  // expected result
+    __ movq(r9, uint64_t{0x0000000000000188});  // expected result
     __ cmpq(r8, r9);
     __ j(not_equal, &exit);
 
     __ incq(rax);
     __ bzhil(r8, rcx, rdx);
-    __ movq(r9, V8_UINT64_C(0x0000000000000188));  // expected result
+    __ movq(r9, uint64_t{0x0000000000000188});  // expected result
     __ cmpq(r8, r9);
     __ j(not_equal, &exit);
 
     __ incq(rax);
     __ bzhil(r8, Operand(rsp, 0), rdx);
-    __ movq(r9, V8_UINT64_C(0x0000000000000188));  // expected result
+    __ movq(r9, uint64_t{0x0000000000000188});  // expected result
     __ cmpq(r8, r9);
     __ j(not_equal, &exit);
 
     // mulx
-    __ movq(rdx, V8_UINT64_C(0x0000000000001000));
+    __ movq(rdx, uint64_t{0x0000000000001000});
 
     __ incq(rax);
     __ mulxq(r8, r9, rcx);
-    __ movq(rbx, V8_UINT64_C(0x0000000000000112));  // expected result
+    __ movq(rbx, uint64_t{0x0000000000000112});  // expected result
     __ cmpq(r8, rbx);
     __ j(not_equal, &exit);
-    __ movq(rbx, V8_UINT64_C(0x2334455667788000));  // expected result
+    __ movq(rbx, uint64_t{0x2334455667788000});  // expected result
     __ cmpq(r9, rbx);
     __ j(not_equal, &exit);
 
     __ incq(rax);
     __ mulxq(r8, r9, Operand(rsp, 0));
-    __ movq(rbx, V8_UINT64_C(0x0000000000000112));  // expected result
+    __ movq(rbx, uint64_t{0x0000000000000112});  // expected result
     __ cmpq(r8, rbx);
     __ j(not_equal, &exit);
-    __ movq(rbx, V8_UINT64_C(0x2334455667788000));  // expected result
+    __ movq(rbx, uint64_t{0x2334455667788000});  // expected result
     __ cmpq(r9, rbx);
     __ j(not_equal, &exit);
 
     __ incq(rax);
     __ mulxl(r8, r9, rcx);
-    __ movq(rbx, V8_UINT64_C(0x0000000000000556));  // expected result
+    __ movq(rbx, uint64_t{0x0000000000000556});  // expected result
     __ cmpq(r8, rbx);
     __ j(not_equal, &exit);
-    __ movq(rbx, V8_UINT64_C(0x0000000067788000));  // expected result
+    __ movq(rbx, uint64_t{0x0000000067788000});  // expected result
     __ cmpq(r9, rbx);
     __ j(not_equal, &exit);
 
     __ incq(rax);
     __ mulxl(r8, r9, Operand(rsp, 0));
-    __ movq(rbx, V8_UINT64_C(0x0000000000000556));  // expected result
+    __ movq(rbx, uint64_t{0x0000000000000556});  // expected result
     __ cmpq(r8, rbx);
     __ j(not_equal, &exit);
-    __ movq(rbx, V8_UINT64_C(0x0000000067788000));  // expected result
+    __ movq(rbx, uint64_t{0x0000000067788000});  // expected result
     __ cmpq(r9, rbx);
     __ j(not_equal, &exit);
 
     // pdep
-    __ movq(rdx, V8_UINT64_C(0xfffffffffffffff0));
+    __ movq(rdx, uint64_t{0xFFFFFFFFFFFFFFF0});
 
     __ incq(rax);
     __ pdepq(r8, rdx, rcx);
-    __ movq(r9, V8_UINT64_C(0x1122334455667400));  // expected result
+    __ movq(r9, uint64_t{0x1122334455667400});  // expected result
     __ cmpq(r8, r9);
     __ j(not_equal, &exit);
 
     __ incq(rax);
     __ pdepq(r8, rdx, Operand(rsp, 0));
-    __ movq(r9, V8_UINT64_C(0x1122334455667400));  // expected result
+    __ movq(r9, uint64_t{0x1122334455667400});  // expected result
     __ cmpq(r8, r9);
     __ j(not_equal, &exit);
 
     __ incq(rax);
     __ pdepl(r8, rdx, rcx);
-    __ movq(r9, V8_UINT64_C(0x0000000055667400));  // expected result
+    __ movq(r9, uint64_t{0x0000000055667400});  // expected result
     __ cmpq(r8, r9);
     __ j(not_equal, &exit);
 
     __ incq(rax);
     __ pdepl(r8, rdx, Operand(rsp, 0));
-    __ movq(r9, V8_UINT64_C(0x0000000055667400));  // expected result
+    __ movq(r9, uint64_t{0x0000000055667400});  // expected result
     __ cmpq(r8, r9);
     __ j(not_equal, &exit);
 
     // pext
-    __ movq(rdx, V8_UINT64_C(0xfffffffffffffff0));
+    __ movq(rdx, uint64_t{0xFFFFFFFFFFFFFFF0});
 
     __ incq(rax);
     __ pextq(r8, rdx, rcx);
-    __ movq(r9, V8_UINT64_C(0x0000000003fffffe));  // expected result
+    __ movq(r9, uint64_t{0x0000000003FFFFFE});  // expected result
     __ cmpq(r8, r9);
     __ j(not_equal, &exit);
 
     __ incq(rax);
     __ pextq(r8, rdx, Operand(rsp, 0));
-    __ movq(r9, V8_UINT64_C(0x0000000003fffffe));  // expected result
+    __ movq(r9, uint64_t{0x0000000003FFFFFE});  // expected result
     __ cmpq(r8, r9);
     __ j(not_equal, &exit);
 
     __ incq(rax);
     __ pextl(r8, rdx, rcx);
-    __ movq(r9, V8_UINT64_C(0x000000000000fffe));  // expected result
+    __ movq(r9, uint64_t{0x000000000000FFFE});  // expected result
     __ cmpq(r8, r9);
     __ j(not_equal, &exit);
 
     __ incq(rax);
     __ pextl(r8, rdx, Operand(rsp, 0));
-    __ movq(r9, V8_UINT64_C(0x000000000000fffe));  // expected result
+    __ movq(r9, uint64_t{0x000000000000FFFE});  // expected result
     __ cmpq(r8, r9);
     __ j(not_equal, &exit);
 
     // sarx
-    __ movq(rdx, V8_UINT64_C(0x0000000000000004));
+    __ movq(rdx, uint64_t{0x0000000000000004});
 
     __ incq(rax);
     __ sarxq(r8, rcx, rdx);
-    __ movq(r9, V8_UINT64_C(0x0112233445566778));  // expected result
+    __ movq(r9, uint64_t{0x0112233445566778});  // expected result
     __ cmpq(r8, r9);
     __ j(not_equal, &exit);
 
     __ incq(rax);
     __ sarxq(r8, Operand(rsp, 0), rdx);
-    __ movq(r9, V8_UINT64_C(0x0112233445566778));  // expected result
+    __ movq(r9, uint64_t{0x0112233445566778});  // expected result
     __ cmpq(r8, r9);
     __ j(not_equal, &exit);
 
     __ incq(rax);
     __ sarxl(r8, rcx, rdx);
-    __ movq(r9, V8_UINT64_C(0x0000000005566778));  // expected result
+    __ movq(r9, uint64_t{0x0000000005566778});  // expected result
     __ cmpq(r8, r9);
     __ j(not_equal, &exit);
 
     __ incq(rax);
     __ sarxl(r8, Operand(rsp, 0), rdx);
-    __ movq(r9, V8_UINT64_C(0x0000000005566778));  // expected result
+    __ movq(r9, uint64_t{0x0000000005566778});  // expected result
     __ cmpq(r8, r9);
     __ j(not_equal, &exit);
 
     // shlx
-    __ movq(rdx, V8_UINT64_C(0x0000000000000004));
+    __ movq(rdx, uint64_t{0x0000000000000004});
 
     __ incq(rax);
     __ shlxq(r8, rcx, rdx);
-    __ movq(r9, V8_UINT64_C(0x1223344556677880));  // expected result
+    __ movq(r9, uint64_t{0x1223344556677880});  // expected result
     __ cmpq(r8, r9);
     __ j(not_equal, &exit);
 
     __ incq(rax);
     __ shlxq(r8, Operand(rsp, 0), rdx);
-    __ movq(r9, V8_UINT64_C(0x1223344556677880));  // expected result
+    __ movq(r9, uint64_t{0x1223344556677880});  // expected result
     __ cmpq(r8, r9);
     __ j(not_equal, &exit);
 
     __ incq(rax);
     __ shlxl(r8, rcx, rdx);
-    __ movq(r9, V8_UINT64_C(0x0000000056677880));  // expected result
+    __ movq(r9, uint64_t{0x0000000056677880});  // expected result
     __ cmpq(r8, r9);
     __ j(not_equal, &exit);
 
     __ incq(rax);
     __ shlxl(r8, Operand(rsp, 0), rdx);
-    __ movq(r9, V8_UINT64_C(0x0000000056677880));  // expected result
+    __ movq(r9, uint64_t{0x0000000056677880});  // expected result
     __ cmpq(r8, r9);
     __ j(not_equal, &exit);
 
     // shrx
-    __ movq(rdx, V8_UINT64_C(0x0000000000000004));
+    __ movq(rdx, uint64_t{0x0000000000000004});
 
     __ incq(rax);
     __ shrxq(r8, rcx, rdx);
-    __ movq(r9, V8_UINT64_C(0x0112233445566778));  // expected result
+    __ movq(r9, uint64_t{0x0112233445566778});  // expected result
     __ cmpq(r8, r9);
     __ j(not_equal, &exit);
 
     __ incq(rax);
     __ shrxq(r8, Operand(rsp, 0), rdx);
-    __ movq(r9, V8_UINT64_C(0x0112233445566778));  // expected result
+    __ movq(r9, uint64_t{0x0112233445566778});  // expected result
     __ cmpq(r8, r9);
     __ j(not_equal, &exit);
 
     __ incq(rax);
     __ shrxl(r8, rcx, rdx);
-    __ movq(r9, V8_UINT64_C(0x0000000005566778));  // expected result
+    __ movq(r9, uint64_t{0x0000000005566778});  // expected result
     __ cmpq(r8, r9);
     __ j(not_equal, &exit);
 
     __ incq(rax);
     __ shrxl(r8, Operand(rsp, 0), rdx);
-    __ movq(r9, V8_UINT64_C(0x0000000005566778));  // expected result
+    __ movq(r9, uint64_t{0x0000000005566778});  // expected result
     __ cmpq(r8, r9);
     __ j(not_equal, &exit);
 
     // rorx
     __ incq(rax);
     __ rorxq(r8, rcx, 0x4);
-    __ movq(r9, V8_UINT64_C(0x8112233445566778));  // expected result
+    __ movq(r9, uint64_t{0x8112233445566778});  // expected result
     __ cmpq(r8, r9);
     __ j(not_equal, &exit);
 
     __ incq(rax);
     __ rorxq(r8, Operand(rsp, 0), 0x4);
-    __ movq(r9, V8_UINT64_C(0x8112233445566778));  // expected result
+    __ movq(r9, uint64_t{0x8112233445566778});  // expected result
     __ cmpq(r8, r9);
     __ j(not_equal, &exit);
 
     __ incq(rax);
     __ rorxl(r8, rcx, 0x4);
-    __ movq(r9, V8_UINT64_C(0x0000000085566778));  // expected result
+    __ movq(r9, uint64_t{0x0000000085566778});  // expected result
     __ cmpq(r8, r9);
     __ j(not_equal, &exit);
 
     __ incq(rax);
     __ rorxl(r8, Operand(rsp, 0), 0x4);
-    __ movq(r9, V8_UINT64_C(0x0000000085566778));  // expected result
+    __ movq(r9, uint64_t{0x0000000085566778});  // expected result
     __ cmpq(r8, r9);
     __ j(not_equal, &exit);
 
@@ -2371,7 +2339,7 @@
   }
 
   CodeDesc desc;
-  assm.GetCode(isolate, &desc);
+  masm.GetCode(isolate, &desc);
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
 #ifdef OBJECT_PRINT
@@ -2389,7 +2357,7 @@
   CcTest::InitializeVM();
   Isolate* isolate = reinterpret_cast<Isolate*>(CcTest::isolate());
   HandleScope scope(isolate);
-  MacroAssembler assm(isolate, nullptr, 0,
+  MacroAssembler masm(isolate, nullptr, 0,
                       v8::internal::CodeObjectRequired::kYes);
 
   const int kNumCases = 512;
@@ -2416,7 +2384,7 @@
   __ ret(0);
 
   CodeDesc desc;
-  assm.GetCode(isolate, &desc);
+  masm.GetCode(isolate, &desc);
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
 #ifdef OBJECT_PRINT
@@ -2437,7 +2405,7 @@
   CcTest::InitializeVM();
   Isolate* isolate = reinterpret_cast<Isolate*>(CcTest::isolate());
   HandleScope scope(isolate);
-  MacroAssembler assm(isolate, nullptr, 0,
+  MacroAssembler masm(isolate, nullptr, 0,
                       v8::internal::CodeObjectRequired::kYes);
 
   const int kNumCases = 512;
@@ -2465,7 +2433,7 @@
   }
 
   CodeDesc desc;
-  assm.GetCode(isolate, &desc);
+  masm.GetCode(isolate, &desc);
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
 #ifdef OBJECT_PRINT
@@ -2482,12 +2450,9 @@
 
 TEST(AssemblerX64PslldWithXmm15) {
   CcTest::InitializeVM();
-  // Allocate an executable page of memory.
-  size_t actual_size;
-  byte* buffer = static_cast<byte*>(v8::base::OS::Allocate(
-      Assembler::kMinimalBufferSize, &actual_size, true));
-  CHECK(buffer);
-  Assembler assm(CcTest::i_isolate(), buffer, static_cast<int>(actual_size));
+  size_t allocated;
+  byte* buffer = AllocateAssemblerBuffer(&allocated);
+  Assembler masm(CcTest::i_isolate(), buffer, static_cast<int>(allocated));
 
   __ movq(xmm15, arg1);
   __ pslld(xmm15, 1);
@@ -2495,9 +2460,10 @@
   __ ret(0);
 
   CodeDesc desc;
-  assm.GetCode(CcTest::i_isolate(), &desc);
-  uint64_t result = FUNCTION_CAST<F5>(buffer)(V8_UINT64_C(0x1122334455667788));
-  CHECK_EQ(V8_UINT64_C(0x22446688aaccef10), result);
+  masm.GetCode(CcTest::i_isolate(), &desc);
+  MakeAssemblerBufferExecutable(buffer, allocated);
+  uint64_t result = FUNCTION_CAST<F5>(buffer)(uint64_t{0x1122334455667788});
+  CHECK_EQ(uint64_t{0x22446688AACCEF10}, result);
 }
 
 typedef float (*F9)(float x, float y);
@@ -2508,10 +2474,10 @@
   Isolate* isolate = reinterpret_cast<Isolate*>(CcTest::isolate());
   HandleScope scope(isolate);
   v8::internal::byte buffer[256];
-  MacroAssembler assm(isolate, buffer, sizeof(buffer),
+  MacroAssembler masm(isolate, buffer, sizeof(buffer),
                       v8::internal::CodeObjectRequired::kYes);
   {
-    CpuFeatureScope avx_scope(&assm, AVX);
+    CpuFeatureScope avx_scope(&masm, AVX);
     __ shufps(xmm0, xmm0, 0x0);  // brocast first argument
     __ shufps(xmm1, xmm1, 0x0);  // brocast second argument
     // copy xmm1 to xmm0 through the stack to test the "vmovups reg, mem".
@@ -2524,7 +2490,7 @@
   }
 
   CodeDesc desc;
-  assm.GetCode(isolate, &desc);
+  masm.GetCode(isolate, &desc);
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
 #ifdef OBJECT_PRINT
diff --git a/src/v8/test/cctest/test-atomicops.cc b/src/v8/test/cctest/test-atomicops.cc
index add819f..9242113 100644
--- a/src/v8/test/cctest/test-atomicops.cc
+++ b/src/v8/test/cctest/test-atomicops.cc
@@ -168,12 +168,11 @@
   CHECK_EQU(test_val - 1, value);
 }
 
-
-// Return an AtomicType with the value 0xa5a5a5..
+// Return an AtomicType with the value 0xA5A5A5..
 template <class AtomicType>
 static AtomicType TestFillValue() {
   AtomicType val = 0;
-  memset(&val, 0xa5, sizeof(AtomicType));
+  memset(&val, 0xA5, sizeof(AtomicType));
   return val;
 }
 
diff --git a/src/v8/test/cctest/test-bignum.cc b/src/v8/test/cctest/test-bignum.cc
index d9721b0..966ee5b 100644
--- a/src/v8/test/cctest/test-bignum.cc
+++ b/src/v8/test/cctest/test-bignum.cc
@@ -641,7 +641,7 @@
   CHECK_EQ(0, strcmp("FFFEFFFFFFFFFFFF00010000000000000000000000000", buffer));
 
   AssignDecimalString(&bignum, "15611230384529777");
-  bignum.MultiplyByUInt64(V8_2PART_UINT64_C(0x8ac72304, 89e80000));
+  bignum.MultiplyByUInt64(V8_2PART_UINT64_C(0x8AC72304, 89E80000));
   CHECK(bignum.ToHexString(buffer, kBufferSize));
   CHECK_EQ(0, strcmp("1E10EE4B11D15A7F3DE7F3C7680000", buffer));
 }
diff --git a/src/v8/test/cctest/test-code-layout.cc b/src/v8/test/cctest/test-code-layout.cc
index 6471df0..7f6fa58 100644
--- a/src/v8/test/cctest/test-code-layout.cc
+++ b/src/v8/test/cctest/test-code-layout.cc
@@ -4,14 +4,7 @@
 
 #include "src/factory.h"
 #include "src/isolate.h"
-#include "src/objects.h"
-// FIXME(mstarzinger, marja): This is weird, but required because of the missing
-// (disallowed) include: src/factory.h -> src/objects-inl.h
 #include "src/objects-inl.h"
-// FIXME(mstarzinger, marja): This is weird, but required because of the missing
-// (disallowed) include: src/feedback-vector.h ->
-// src/feedback-vector-inl.h
-#include "src/feedback-vector-inl.h"
 #include "test/cctest/cctest.h"
 
 namespace v8 {
@@ -22,8 +15,8 @@
   HandleScope handle_scope(CcTest::i_isolate());
 
   // "Hello, World!" in ASCII.
-  byte buffer_array[13] = {0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x2c, 0x20,
-                           0x57, 0x6f, 0x72, 0x6c, 0x64, 0x21};
+  byte buffer_array[13] = {0x48, 0x65, 0x6C, 0x6C, 0x6F, 0x2C, 0x20,
+                           0x57, 0x6F, 0x72, 0x6C, 0x64, 0x21};
 
   byte* buffer = &buffer_array[0];
   int buffer_size = sizeof(buffer_array);
@@ -53,11 +46,11 @@
   HandleScope handle_scope(CcTest::i_isolate());
 
   // "Hello, World!" in ASCII.
-  byte buffer_array[13] = {0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x2c, 0x20,
-                           0x57, 0x6f, 0x72, 0x6c, 0x64, 0x21};
+  byte buffer_array[13] = {0x48, 0x65, 0x6C, 0x6C, 0x6F, 0x2C, 0x20,
+                           0x57, 0x6F, 0x72, 0x6C, 0x64, 0x21};
 
   // "JavaScript" in ASCII.
-  byte unwinding_info_array[10] = {0x4a, 0x61, 0x76, 0x61, 0x53,
+  byte unwinding_info_array[10] = {0x4A, 0x61, 0x76, 0x61, 0x53,
                                    0x63, 0x72, 0x69, 0x70, 0x74};
 
   byte* buffer = &buffer_array[0];
diff --git a/src/v8/test/cctest/test-code-stub-assembler.cc b/src/v8/test/cctest/test-code-stub-assembler.cc
index 892a79c..7889a61 100644
--- a/src/v8/test/cctest/test-code-stub-assembler.cc
+++ b/src/v8/test/cctest/test-code-stub-assembler.cc
@@ -212,8 +212,8 @@
   CodeAssemblerTester asm_tester(isolate);
   CodeStubAssembler m(asm_tester.state());
   Handle<HeapNumber> number = isolate->factory()->NewHeapNumber(1234);
-  m.Return(m.SmiFromWord32(
-      m.ChangeFloat64ToUint32(m.LoadHeapNumberValue(m.HeapConstant(number)))));
+  m.Return(m.SmiFromWord32(m.Signed(
+      m.ChangeFloat64ToUint32(m.LoadHeapNumberValue(m.HeapConstant(number))))));
   FunctionTester ft(asm_tester.GenerateCode());
   MaybeHandle<Object> result = ft.Call();
   CHECK_EQ(1234, Handle<Smi>::cast(result.ToHandleChecked())->value());
@@ -237,8 +237,8 @@
   CodeStubAssembler m(asm_tester.state());
 
   class TestBitField : public BitField<unsigned, 3, 3> {};
-  m.Return(
-      m.SmiTag(m.DecodeWordFromWord32<TestBitField>(m.Int32Constant(0x2f))));
+  m.Return(m.SmiTag(
+      m.Signed(m.DecodeWordFromWord32<TestBitField>(m.Int32Constant(0x2F)))));
   FunctionTester ft(asm_tester.GenerateCode());
   MaybeHandle<Object> result = ft.Call();
   // value  = 00101111
@@ -657,10 +657,7 @@
 
 TEST(GlobalDictionaryLookup) { TestNameDictionaryLookup<GlobalDictionary>(); }
 
-namespace {
-
-template <typename Dictionary>
-void TestNumberDictionaryLookup() {
+TEST(NumberDictionaryLookup) {
   Isolate* isolate(CcTest::InitIsolateOnce());
 
   const int kNumParams = 4;
@@ -678,8 +675,8 @@
     Label if_found(&m), if_not_found(&m);
     Variable var_entry(&m, MachineType::PointerRepresentation());
 
-    m.NumberDictionaryLookup<Dictionary>(dictionary, key, &if_found, &var_entry,
-                                         &if_not_found);
+    m.NumberDictionaryLookup(dictionary, key, &if_found, &var_entry,
+                             &if_not_found);
     m.BIND(&if_found);
     m.GotoIfNot(
         m.WordEqual(expected_result, m.SmiConstant(Smi::FromInt(kFound))),
@@ -705,7 +702,8 @@
   Handle<Object> expect_not_found(Smi::FromInt(kNotFound), isolate);
 
   const int kKeysCount = 1000;
-  Handle<Dictionary> dictionary = Dictionary::New(isolate, kKeysCount);
+  Handle<NumberDictionary> dictionary =
+      NumberDictionary::New(isolate, kKeysCount);
   uint32_t keys[kKeysCount];
 
   Handle<Object> fake_value(Smi::FromInt(42), isolate);
@@ -716,15 +714,16 @@
   for (int i = 0; i < kKeysCount; i++) {
     int random_key = rand_gen.NextInt(Smi::kMaxValue);
     keys[i] = static_cast<uint32_t>(random_key);
-    if (dictionary->FindEntry(keys[i]) != Dictionary::kNotFound) continue;
+    if (dictionary->FindEntry(keys[i]) != NumberDictionary::kNotFound) continue;
 
-    dictionary = Dictionary::Add(dictionary, keys[i], fake_value, fake_details);
+    dictionary =
+        NumberDictionary::Add(dictionary, keys[i], fake_value, fake_details);
   }
 
   // Now try querying existing keys.
   for (int i = 0; i < kKeysCount; i++) {
     int entry = dictionary->FindEntry(keys[i]);
-    CHECK_NE(Dictionary::kNotFound, entry);
+    CHECK_NE(NumberDictionary::kNotFound, entry);
 
     Handle<Object> key(Smi::FromInt(keys[i]), isolate);
     Handle<Object> expected_entry(Smi::FromInt(entry), isolate);
@@ -735,7 +734,7 @@
   for (int i = 0; i < kKeysCount;) {
     int random_key = rand_gen.NextInt(Smi::kMaxValue);
     int entry = dictionary->FindEntry(random_key);
-    if (entry != Dictionary::kNotFound) continue;
+    if (entry != NumberDictionary::kNotFound) continue;
     i++;
 
     Handle<Object> key(Smi::FromInt(random_key), isolate);
@@ -743,16 +742,6 @@
   }
 }
 
-}  // namespace
-
-TEST(SeededNumberDictionaryLookup) {
-  TestNumberDictionaryLookup<SeededNumberDictionary>();
-}
-
-TEST(UnseededNumberDictionaryLookup) {
-  TestNumberDictionaryLookup<UnseededNumberDictionary>();
-}
-
 namespace {
 
 void AddProperties(Handle<JSObject> object, Handle<Name> names[],
@@ -902,13 +891,15 @@
 
   {
     // Dictionary mode object.
-    Handle<JSFunction> function = factory->NewFunction(factory->empty_string());
+    Handle<JSFunction> function =
+        factory->NewFunctionForTest(factory->empty_string());
     Handle<JSObject> object = factory->NewJSObject(function);
     AddProperties(object, names, arraysize(names));
     JSObject::NormalizeProperties(object, CLEAR_INOBJECT_PROPERTIES, 0, "test");
 
     JSObject::AddProperty(object, deleted_property_name, object, NONE);
-    CHECK(JSObject::DeleteProperty(object, deleted_property_name, SLOPPY)
+    CHECK(JSObject::DeleteProperty(object, deleted_property_name,
+                                   LanguageMode::kSloppy)
               .FromJust());
 
     CHECK_EQ(JS_OBJECT_TYPE, object->map()->instance_type());
@@ -918,17 +909,19 @@
 
   {
     // Global object.
-    Handle<JSFunction> function = factory->NewFunction(factory->empty_string());
+    Handle<JSFunction> function =
+        factory->NewFunctionForTest(factory->empty_string());
     JSFunction::EnsureHasInitialMap(function);
     function->initial_map()->set_instance_type(JS_GLOBAL_OBJECT_TYPE);
     function->initial_map()->set_is_prototype_map(true);
-    function->initial_map()->set_dictionary_map(true);
+    function->initial_map()->set_is_dictionary_map(true);
     function->initial_map()->set_may_have_interesting_symbols(true);
     Handle<JSObject> object = factory->NewJSGlobalObject(function);
     AddProperties(object, names, arraysize(names));
 
     JSObject::AddProperty(object, deleted_property_name, object, NONE);
-    CHECK(JSObject::DeleteProperty(object, deleted_property_name, SLOPPY)
+    CHECK(JSObject::DeleteProperty(object, deleted_property_name,
+                                   LanguageMode::kSloppy)
               .FromJust());
 
     CHECK_EQ(JS_GLOBAL_OBJECT_TYPE, object->map()->instance_type());
@@ -967,7 +960,8 @@
   }
 
   {
-    Handle<JSFunction> function = factory->NewFunction(factory->empty_string());
+    Handle<JSFunction> function =
+        factory->NewFunctionForTest(factory->empty_string());
     Handle<JSProxy> object = factory->NewJSProxy(function, objects[0]);
     CHECK_EQ(JS_PROXY_TYPE, object->map()->instance_type());
     ft.CheckTrue(object, names[0], expect_bailout);
@@ -1040,11 +1034,11 @@
       factory->NewPrivateSymbol(),
   };
   Handle<Object> values[] = {
-      factory->NewFunction(factory->empty_string()),
+      factory->NewFunctionForTest(factory->empty_string()),
       factory->NewSymbol(),
       factory->InternalizeUtf8String("a"),
       CreateAccessorPair(&ft, "() => 188;", "() => 199;"),
-      factory->NewFunction(factory->InternalizeUtf8String("bb")),
+      factory->NewFunctionForTest(factory->InternalizeUtf8String("bb")),
       factory->InternalizeUtf8String("ccc"),
       CreateAccessorPair(&ft, "() => 88;", nullptr),
       handle(Smi::FromInt(1), isolate),
@@ -1052,7 +1046,8 @@
       CreateAccessorPair(&ft, nullptr, "() => 99;"),
       factory->NewHeapNumber(4.2),
       handle(Smi::FromInt(153), isolate),
-      factory->NewJSObject(factory->NewFunction(factory->empty_string())),
+      factory->NewJSObject(
+          factory->NewFunctionForTest(factory->empty_string())),
       factory->NewPrivateSymbol(),
   };
   STATIC_ASSERT(arraysize(values) < arraysize(names));
@@ -1102,14 +1097,16 @@
 
   {
     // Dictionary mode object.
-    Handle<JSFunction> function = factory->NewFunction(factory->empty_string());
+    Handle<JSFunction> function =
+        factory->NewFunctionForTest(factory->empty_string());
     Handle<JSObject> object = factory->NewJSObject(function);
     AddProperties(object, names, arraysize(names), values, arraysize(values),
                   rand_gen.NextInt());
     JSObject::NormalizeProperties(object, CLEAR_INOBJECT_PROPERTIES, 0, "test");
 
     JSObject::AddProperty(object, deleted_property_name, object, NONE);
-    CHECK(JSObject::DeleteProperty(object, deleted_property_name, SLOPPY)
+    CHECK(JSObject::DeleteProperty(object, deleted_property_name,
+                                   LanguageMode::kSloppy)
               .FromJust());
 
     CHECK_EQ(JS_OBJECT_TYPE, object->map()->instance_type());
@@ -1124,7 +1121,8 @@
                   rand_gen.NextInt());
 
     JSObject::AddProperty(object, deleted_property_name, object, NONE);
-    CHECK(JSObject::DeleteProperty(object, deleted_property_name, SLOPPY)
+    CHECK(JSObject::DeleteProperty(object, deleted_property_name,
+                                   LanguageMode::kSloppy)
               .FromJust());
 
     CHECK_EQ(JS_GLOBAL_OBJECT_TYPE, object->map()->instance_type());
@@ -1170,7 +1168,8 @@
   }
 
   {
-    Handle<JSFunction> function = factory->NewFunction(factory->empty_string());
+    Handle<JSFunction> function =
+        factory->NewFunctionForTest(factory->empty_string());
     Handle<JSProxy> object = factory->NewJSProxy(function, objects[0]);
     CHECK_EQ(JS_PROXY_TYPE, object->map()->instance_type());
     Handle<Object> value = ft.Call(object, names[0]).ToHandleChecked();
@@ -1402,7 +1401,8 @@
 
   {
     Handle<JSArray> handler = factory->NewJSArray(0);
-    Handle<JSFunction> function = factory->NewFunction(factory->empty_string());
+    Handle<JSFunction> function =
+        factory->NewFunctionForTest(factory->empty_string());
     Handle<JSProxy> object = factory->NewJSProxy(function, handler);
     CHECK_EQ(JS_PROXY_TYPE, object->map()->instance_type());
     ft.CheckTrue(object, smi0, expect_bailout);
@@ -1573,11 +1573,9 @@
   CodeAssemblerTester asm_tester(isolate, kNumParams);
   CodeStubAssembler m(asm_tester.state());
 
-  m.CopyStringCharacters(
-      m.Parameter(0), m.Parameter(1), m.SmiConstant(Smi::FromInt(0)),
-      m.SmiConstant(Smi::FromInt(0)), m.SmiConstant(Smi::FromInt(5)),
-      String::ONE_BYTE_ENCODING, String::TWO_BYTE_ENCODING,
-      CodeStubAssembler::SMI_PARAMETERS);
+  m.CopyStringCharacters(m.Parameter(0), m.Parameter(1), m.IntPtrConstant(0),
+                         m.IntPtrConstant(0), m.IntPtrConstant(5),
+                         String::ONE_BYTE_ENCODING, String::TWO_BYTE_ENCODING);
   m.Return(m.SmiConstant(Smi::FromInt(0)));
 
   Handle<String> string1 = isolate->factory()->InternalizeUtf8String("abcde");
@@ -1606,11 +1604,9 @@
   CodeAssemblerTester asm_tester(isolate, kNumParams);
   CodeStubAssembler m(asm_tester.state());
 
-  m.CopyStringCharacters(
-      m.Parameter(0), m.Parameter(1), m.SmiConstant(Smi::FromInt(0)),
-      m.SmiConstant(Smi::FromInt(0)), m.SmiConstant(Smi::FromInt(5)),
-      String::ONE_BYTE_ENCODING, String::ONE_BYTE_ENCODING,
-      CodeStubAssembler::SMI_PARAMETERS);
+  m.CopyStringCharacters(m.Parameter(0), m.Parameter(1), m.IntPtrConstant(0),
+                         m.IntPtrConstant(0), m.IntPtrConstant(5),
+                         String::ONE_BYTE_ENCODING, String::ONE_BYTE_ENCODING);
   m.Return(m.SmiConstant(Smi::FromInt(0)));
 
   Handle<String> string1 = isolate->factory()->InternalizeUtf8String("abcde");
@@ -1639,11 +1635,9 @@
   CodeAssemblerTester asm_tester(isolate, kNumParams);
   CodeStubAssembler m(asm_tester.state());
 
-  m.CopyStringCharacters(
-      m.Parameter(0), m.Parameter(1), m.SmiConstant(Smi::FromInt(0)),
-      m.SmiConstant(Smi::FromInt(3)), m.SmiConstant(Smi::FromInt(2)),
-      String::ONE_BYTE_ENCODING, String::ONE_BYTE_ENCODING,
-      CodeStubAssembler::SMI_PARAMETERS);
+  m.CopyStringCharacters(m.Parameter(0), m.Parameter(1), m.IntPtrConstant(0),
+                         m.IntPtrConstant(3), m.IntPtrConstant(2),
+                         String::ONE_BYTE_ENCODING, String::ONE_BYTE_ENCODING);
   m.Return(m.SmiConstant(Smi::FromInt(0)));
 
   Handle<String> string1 = isolate->factory()->InternalizeUtf8String("abcde");
@@ -1669,11 +1663,9 @@
   CodeAssemblerTester asm_tester(isolate, kNumParams);
   CodeStubAssembler m(asm_tester.state());
 
-  m.CopyStringCharacters(
-      m.Parameter(0), m.Parameter(1), m.SmiConstant(Smi::FromInt(0)),
-      m.SmiConstant(Smi::FromInt(0)), m.SmiConstant(Smi::FromInt(5)),
-      String::TWO_BYTE_ENCODING, String::TWO_BYTE_ENCODING,
-      CodeStubAssembler::SMI_PARAMETERS);
+  m.CopyStringCharacters(m.Parameter(0), m.Parameter(1), m.IntPtrConstant(0),
+                         m.IntPtrConstant(0), m.IntPtrConstant(5),
+                         String::TWO_BYTE_ENCODING, String::TWO_BYTE_ENCODING);
   m.Return(m.SmiConstant(Smi::FromInt(0)));
 
   uc16 array1[] = {2000, 2001, 2002, 2003, 2004};
@@ -1714,7 +1706,94 @@
   CSA_ASSERT(
       &m, m.WordEqual(arguments.AtIndex(2), m.SmiConstant(Smi::FromInt(14))));
 
-  m.Return(arguments.GetReceiver());
+  arguments.PopAndReturn(arguments.GetReceiver());
+
+  FunctionTester ft(asm_tester.GenerateCode(), kNumParams);
+  Handle<Object> result = ft.Call(isolate->factory()->undefined_value(),
+                                  Handle<Smi>(Smi::FromInt(12), isolate),
+                                  Handle<Smi>(Smi::FromInt(13), isolate),
+                                  Handle<Smi>(Smi::FromInt(14), isolate))
+                              .ToHandleChecked();
+  CHECK_EQ(*isolate->factory()->undefined_value(), *result);
+}
+
+TEST(ArgumentsWithSmiConstantIndices) {
+  Isolate* isolate(CcTest::InitIsolateOnce());
+
+  const int kNumParams = 4;
+  CodeAssemblerTester asm_tester(isolate, kNumParams);
+  CodeStubAssembler m(asm_tester.state());
+
+  CodeStubArguments arguments(&m, m.SmiConstant(3), nullptr,
+                              CodeStubAssembler::SMI_PARAMETERS);
+
+  CSA_ASSERT(&m,
+             m.WordEqual(arguments.AtIndex(m.SmiConstant(0),
+                                           CodeStubAssembler::SMI_PARAMETERS),
+                         m.SmiConstant(Smi::FromInt(12))));
+  CSA_ASSERT(&m,
+             m.WordEqual(arguments.AtIndex(m.SmiConstant(1),
+                                           CodeStubAssembler::SMI_PARAMETERS),
+                         m.SmiConstant(Smi::FromInt(13))));
+  CSA_ASSERT(&m,
+             m.WordEqual(arguments.AtIndex(m.SmiConstant(2),
+                                           CodeStubAssembler::SMI_PARAMETERS),
+                         m.SmiConstant(Smi::FromInt(14))));
+
+  arguments.PopAndReturn(arguments.GetReceiver());
+
+  FunctionTester ft(asm_tester.GenerateCode(), kNumParams);
+  Handle<Object> result = ft.Call(isolate->factory()->undefined_value(),
+                                  Handle<Smi>(Smi::FromInt(12), isolate),
+                                  Handle<Smi>(Smi::FromInt(13), isolate),
+                                  Handle<Smi>(Smi::FromInt(14), isolate))
+                              .ToHandleChecked();
+  CHECK_EQ(*isolate->factory()->undefined_value(), *result);
+}
+
+TNode<Smi> NonConstantSmi(CodeStubAssembler* m, int value) {
+  // Generate a SMI with the given value and feed it through a Phi so it can't
+  // be inferred to be constant.
+  Variable var(m, MachineRepresentation::kTagged, m->SmiConstant(value));
+  Label dummy_done(m);
+  // Even though the Goto always executes, it will taint the variable and thus
+  // make it appear non-constant when used later.
+  m->GotoIf(m->Int32Constant(1), &dummy_done);
+  var.Bind(m->SmiConstant(value));
+  m->Goto(&dummy_done);
+  m->BIND(&dummy_done);
+
+  // Ensure that the above hackery actually created a non-constant SMI.
+  Smi* smi_constant;
+  CHECK(!m->ToSmiConstant(var.value(), smi_constant));
+
+  return m->UncheckedCast<Smi>(var.value());
+}
+
+TEST(ArgumentsWithSmiIndices) {
+  Isolate* isolate(CcTest::InitIsolateOnce());
+
+  const int kNumParams = 4;
+  CodeAssemblerTester asm_tester(isolate, kNumParams);
+  CodeStubAssembler m(asm_tester.state());
+
+  CodeStubArguments arguments(&m, m.SmiConstant(3), nullptr,
+                              CodeStubAssembler::SMI_PARAMETERS);
+
+  CSA_ASSERT(&m,
+             m.WordEqual(arguments.AtIndex(NonConstantSmi(&m, 0),
+                                           CodeStubAssembler::SMI_PARAMETERS),
+                         m.SmiConstant(Smi::FromInt(12))));
+  CSA_ASSERT(&m,
+             m.WordEqual(arguments.AtIndex(NonConstantSmi(&m, 1),
+                                           CodeStubAssembler::SMI_PARAMETERS),
+                         m.SmiConstant(Smi::FromInt(13))));
+  CSA_ASSERT(&m,
+             m.WordEqual(arguments.AtIndex(NonConstantSmi(&m, 2),
+                                           CodeStubAssembler::SMI_PARAMETERS),
+                         m.SmiConstant(Smi::FromInt(14))));
+
+  arguments.PopAndReturn(arguments.GetReceiver());
 
   FunctionTester ft(asm_tester.GenerateCode(), kNumParams);
   Handle<Object> result = ft.Call(isolate->factory()->undefined_value(),
@@ -1742,7 +1821,7 @@
   arguments.ForEach(
       list, [&m, &sum](Node* arg) { sum.Bind(m.SmiAdd(sum.value(), arg)); });
 
-  m.Return(sum.value());
+  arguments.PopAndReturn(sum.value());
 
   FunctionTester ft(asm_tester.GenerateCode(), kNumParams);
   Handle<Object> result = ft.Call(isolate->factory()->undefined_value(),
@@ -1799,10 +1878,12 @@
     Handle<JSArray> array = isolate->factory()->NewJSArray(
         kind_, 2, initial_size, INITIALIZE_ARRAY_ELEMENTS_WITH_HOLE);
     JSObject::SetElement(isolate, array, 0,
-                         Handle<Smi>(Smi::FromInt(1), isolate), SLOPPY)
+                         Handle<Smi>(Smi::FromInt(1), isolate),
+                         LanguageMode::kSloppy)
         .Check();
     JSObject::SetElement(isolate, array, 1,
-                         Handle<Smi>(Smi::FromInt(2), isolate), SLOPPY)
+                         Handle<Smi>(Smi::FromInt(2), isolate),
+                         LanguageMode::kSloppy)
         .Check();
     CodeStubArguments args(this, IntPtrConstant(kNumParams));
     TVariable<IntPtrT> arg_index(this);
@@ -2138,8 +2219,6 @@
   CHECK_EQ(isolate->native_context()->closure(), context_js->closure());
   CHECK_EQ(isolate->heap()->the_hole_value(), context_js->extension());
   CHECK_EQ(*isolate->native_context(), context_js->native_context());
-  CHECK_EQ(Smi::FromInt(0),
-           context_js->get(PromiseBuiltinsAssembler::kAlreadyVisitedSlot));
   CHECK(context_js->get(PromiseBuiltinsAssembler::kPromiseSlot)->IsJSPromise());
   CHECK_EQ(isolate->heap()->false_value(),
            context_js->get(PromiseBuiltinsAssembler::kDebugEventSlot));
@@ -2263,7 +2342,7 @@
   CHECK_EQ(isolate->heap()->empty_property_array(), fun->property_array());
   CHECK_EQ(isolate->heap()->empty_fixed_array(), fun->elements());
   CHECK_EQ(isolate->heap()->undefined_cell(), fun->feedback_vector_cell());
-  CHECK_EQ(isolate->heap()->the_hole_value(), fun->prototype_or_initial_map());
+  CHECK(!fun->has_prototype_slot());
   CHECK_EQ(*isolate->promise_resolve_shared_fun(), fun->shared());
   CHECK_EQ(isolate->promise_resolve_shared_fun()->code(), fun->code());
 }
@@ -2278,7 +2357,7 @@
   Node* const context = m.Parameter(kNumParams + 2);
   Node* const native_context = m.LoadNativeContext(context);
 
-  Node* const map = m.LoadRoot(Heap::kPromiseCapabilityMapRootIndex);
+  Node* const map = m.LoadRoot(Heap::kTuple3MapRootIndex);
   Node* const capability = m.AllocateStruct(map);
   m.StoreObjectFieldNoWriteBarrier(
       capability, PromiseCapability::kPromiseOffset, m.UndefinedConstant());
@@ -2625,7 +2704,7 @@
   FunctionTester ft(asm_tester.GenerateCode(), kNumParams);
 
   Handle<Map> maps[] = {
-      handle(isolate->heap()->promise_capability_map(), isolate),
+      handle(isolate->heap()->tuple3_map(), isolate),
       handle(isolate->heap()->tuple2_map(), isolate),
   };
 
@@ -2671,7 +2750,7 @@
   }
 }
 
-TEST(BranchIfNumericRelationalComparison) {
+TEST(BranchIfNumberRelationalComparison) {
   Isolate* isolate(CcTest::InitIsolateOnce());
   Factory* f = isolate->factory();
   const int kNumParams = 2;
@@ -2679,9 +2758,9 @@
   {
     CodeStubAssembler m(asm_tester.state());
     Label return_true(&m), return_false(&m);
-    m.BranchIfNumericRelationalComparison(
-        CodeStubAssembler::kGreaterThanOrEqual, m.Parameter(0), m.Parameter(1),
-        &return_true, &return_false);
+    m.BranchIfNumberRelationalComparison(Operation::kGreaterThanOrEqual,
+                                         m.Parameter(0), m.Parameter(1),
+                                         &return_true, &return_false);
     m.BIND(&return_true);
     m.Return(m.BooleanConstant(true));
     m.BIND(&return_false);
@@ -2748,6 +2827,328 @@
   }
 }
 
+TEST(NumberMinMax) {
+  Isolate* isolate(CcTest::InitIsolateOnce());
+  const int kNumParams = 2;
+  CodeAssemblerTester asm_tester_min(isolate, kNumParams);
+  {
+    CodeStubAssembler m(asm_tester_min.state());
+    m.Return(m.NumberMin(m.Parameter(0), m.Parameter(1)));
+  }
+  FunctionTester ft_min(asm_tester_min.GenerateCode(), kNumParams);
+
+  CodeAssemblerTester asm_tester_max(isolate, kNumParams);
+  {
+    CodeStubAssembler m(asm_tester_max.state());
+    m.Return(m.NumberMax(m.Parameter(0), m.Parameter(1)));
+  }
+  FunctionTester ft_max(asm_tester_max.GenerateCode(), kNumParams);
+
+  // Test smi values.
+  Handle<Smi> smi_1(Smi::FromInt(1), isolate);
+  Handle<Smi> smi_2(Smi::FromInt(2), isolate);
+  Handle<Smi> smi_5(Smi::FromInt(5), isolate);
+  CHECK_EQ(ft_min.CallChecked<Smi>(smi_1, smi_2)->value(), 1);
+  CHECK_EQ(ft_min.CallChecked<Smi>(smi_2, smi_1)->value(), 1);
+  CHECK_EQ(ft_max.CallChecked<Smi>(smi_1, smi_2)->value(), 2);
+  CHECK_EQ(ft_max.CallChecked<Smi>(smi_2, smi_1)->value(), 2);
+
+  // Test double values.
+  Handle<Object> double_a = isolate->factory()->NewNumber(2.5);
+  Handle<Object> double_b = isolate->factory()->NewNumber(3.5);
+  Handle<Object> nan =
+      isolate->factory()->NewNumber(std::numeric_limits<double>::quiet_NaN());
+  Handle<Object> infinity = isolate->factory()->NewNumber(V8_INFINITY);
+
+  CHECK_EQ(ft_min.CallChecked<HeapNumber>(double_a, double_b)->value(), 2.5);
+  CHECK_EQ(ft_min.CallChecked<HeapNumber>(double_b, double_a)->value(), 2.5);
+  CHECK_EQ(ft_min.CallChecked<HeapNumber>(infinity, double_a)->value(), 2.5);
+  CHECK_EQ(ft_min.CallChecked<HeapNumber>(double_a, infinity)->value(), 2.5);
+  CHECK(std::isnan(ft_min.CallChecked<HeapNumber>(nan, double_a)->value()));
+  CHECK(std::isnan(ft_min.CallChecked<HeapNumber>(double_a, nan)->value()));
+
+  CHECK_EQ(ft_max.CallChecked<HeapNumber>(double_a, double_b)->value(), 3.5);
+  CHECK_EQ(ft_max.CallChecked<HeapNumber>(double_b, double_a)->value(), 3.5);
+  CHECK_EQ(ft_max.CallChecked<HeapNumber>(infinity, double_a)->value(),
+           V8_INFINITY);
+  CHECK_EQ(ft_max.CallChecked<HeapNumber>(double_a, infinity)->value(),
+           V8_INFINITY);
+  CHECK(std::isnan(ft_max.CallChecked<HeapNumber>(nan, double_a)->value()));
+  CHECK(std::isnan(ft_max.CallChecked<HeapNumber>(double_a, nan)->value()));
+
+  // Mixed smi/double values.
+  CHECK_EQ(ft_max.CallChecked<HeapNumber>(smi_1, double_b)->value(), 3.5);
+  CHECK_EQ(ft_max.CallChecked<HeapNumber>(double_b, smi_1)->value(), 3.5);
+  CHECK_EQ(ft_min.CallChecked<HeapNumber>(smi_5, double_b)->value(), 3.5);
+  CHECK_EQ(ft_min.CallChecked<HeapNumber>(double_b, smi_5)->value(), 3.5);
+}
+
+TEST(NumberAddSub) {
+  Isolate* isolate(CcTest::InitIsolateOnce());
+  const int kNumParams = 2;
+  CodeAssemblerTester asm_tester_add(isolate, kNumParams);
+  {
+    CodeStubAssembler m(asm_tester_add.state());
+    m.Return(m.NumberAdd(m.Parameter(0), m.Parameter(1)));
+  }
+  FunctionTester ft_add(asm_tester_add.GenerateCode(), kNumParams);
+
+  CodeAssemblerTester asm_tester_sub(isolate, kNumParams);
+  {
+    CodeStubAssembler m(asm_tester_sub.state());
+    m.Return(m.NumberSub(m.Parameter(0), m.Parameter(1)));
+  }
+  FunctionTester ft_sub(asm_tester_sub.GenerateCode(), kNumParams);
+
+  // Test smi values.
+  Handle<Smi> smi_1(Smi::FromInt(1), isolate);
+  Handle<Smi> smi_2(Smi::FromInt(2), isolate);
+  CHECK_EQ(ft_add.CallChecked<Smi>(smi_1, smi_2)->value(), 3);
+  CHECK_EQ(ft_sub.CallChecked<Smi>(smi_2, smi_1)->value(), 1);
+
+  // Test double values.
+  Handle<Object> double_a = isolate->factory()->NewNumber(2.5);
+  Handle<Object> double_b = isolate->factory()->NewNumber(3.0);
+  CHECK_EQ(ft_add.CallChecked<HeapNumber>(double_a, double_b)->value(), 5.5);
+  CHECK_EQ(ft_sub.CallChecked<HeapNumber>(double_a, double_b)->value(), -.5);
+
+  // Test overflow.
+  Handle<Smi> smi_max(Smi::FromInt(Smi::kMaxValue), isolate);
+  Handle<Smi> smi_min(Smi::FromInt(Smi::kMinValue), isolate);
+  CHECK_EQ(ft_add.CallChecked<HeapNumber>(smi_max, smi_1)->value(),
+           static_cast<double>(Smi::kMaxValue) + 1);
+  CHECK_EQ(ft_sub.CallChecked<HeapNumber>(smi_min, smi_1)->value(),
+           static_cast<double>(Smi::kMinValue) - 1);
+
+  // Test mixed smi/double values.
+  CHECK_EQ(ft_add.CallChecked<HeapNumber>(smi_1, double_a)->value(), 3.5);
+  CHECK_EQ(ft_add.CallChecked<HeapNumber>(double_a, smi_1)->value(), 3.5);
+  CHECK_EQ(ft_sub.CallChecked<HeapNumber>(smi_1, double_a)->value(), -1.5);
+  CHECK_EQ(ft_sub.CallChecked<HeapNumber>(double_a, smi_1)->value(), 1.5);
+}
+
+TEST(CloneEmptyFixedArray) {
+  Isolate* isolate(CcTest::InitIsolateOnce());
+  const int kNumParams = 1;
+  CodeAssemblerTester asm_tester(isolate, kNumParams);
+  {
+    CodeStubAssembler m(asm_tester.state());
+    m.Return(m.CloneFixedArray(m.Parameter(0)));
+  }
+  FunctionTester ft(asm_tester.GenerateCode(), kNumParams);
+
+  Handle<FixedArray> source(isolate->factory()->empty_fixed_array());
+  Handle<Object> result_raw = ft.Call(source).ToHandleChecked();
+  FixedArray* result(FixedArray::cast(*result_raw));
+  CHECK_EQ(0, result->length());
+  CHECK_EQ(*(isolate->factory()->empty_fixed_array()), result);
+}
+
+TEST(CloneFixedArray) {
+  Isolate* isolate(CcTest::InitIsolateOnce());
+  const int kNumParams = 1;
+  CodeAssemblerTester asm_tester(isolate, kNumParams);
+  {
+    CodeStubAssembler m(asm_tester.state());
+    m.Return(m.CloneFixedArray(m.Parameter(0)));
+  }
+  FunctionTester ft(asm_tester.GenerateCode(), kNumParams);
+
+  Handle<FixedArray> source(isolate->factory()->NewFixedArrayWithHoles(5));
+  source->set(1, Smi::FromInt(1234));
+  Handle<Object> result_raw = ft.Call(source).ToHandleChecked();
+  FixedArray* result(FixedArray::cast(*result_raw));
+  CHECK_EQ(5, result->length());
+  CHECK(result->get(0)->IsTheHole(isolate));
+  CHECK_EQ(Smi::cast(result->get(1))->value(), 1234);
+  CHECK(result->get(2)->IsTheHole(isolate));
+  CHECK(result->get(3)->IsTheHole(isolate));
+  CHECK(result->get(4)->IsTheHole(isolate));
+}
+
+TEST(CloneFixedArrayCOW) {
+  Isolate* isolate(CcTest::InitIsolateOnce());
+  const int kNumParams = 1;
+  CodeAssemblerTester asm_tester(isolate, kNumParams);
+  {
+    CodeStubAssembler m(asm_tester.state());
+    m.Return(m.CloneFixedArray(m.Parameter(0)));
+  }
+  FunctionTester ft(asm_tester.GenerateCode(), kNumParams);
+
+  Handle<FixedArray> source(isolate->factory()->NewFixedArrayWithHoles(5));
+  source->set(1, Smi::FromInt(1234));
+  source->set_map(isolate->heap()->fixed_cow_array_map());
+  Handle<Object> result_raw = ft.Call(source).ToHandleChecked();
+  FixedArray* result(FixedArray::cast(*result_raw));
+  CHECK_EQ(*source, result);
+}
+
+TEST(ExtractFixedArrayCOWForceCopy) {
+  Isolate* isolate(CcTest::InitIsolateOnce());
+  const int kNumParams = 1;
+  CodeAssemblerTester asm_tester(isolate, kNumParams);
+  {
+    CodeStubAssembler m(asm_tester.state());
+    CodeStubAssembler::ExtractFixedArrayFlags flags;
+    flags |= CodeStubAssembler::ExtractFixedArrayFlag::kAllFixedArrays;
+    m.Return(m.ExtractFixedArray(m.Parameter(0), m.SmiConstant(0), nullptr,
+                                 nullptr, flags,
+                                 CodeStubAssembler::SMI_PARAMETERS));
+  }
+  FunctionTester ft(asm_tester.GenerateCode(), kNumParams);
+
+  Handle<FixedArray> source(isolate->factory()->NewFixedArrayWithHoles(5));
+  source->set(1, Smi::FromInt(1234));
+  source->set_map(isolate->heap()->fixed_cow_array_map());
+  Handle<Object> result_raw = ft.Call(source).ToHandleChecked();
+  FixedArray* result(FixedArray::cast(*result_raw));
+  CHECK_NE(*source, result);
+  CHECK_EQ(5, result->length());
+  CHECK(result->get(0)->IsTheHole(isolate));
+  CHECK_EQ(Smi::cast(result->get(1))->value(), 1234);
+  CHECK(result->get(2)->IsTheHole(isolate));
+  CHECK(result->get(3)->IsTheHole(isolate));
+  CHECK(result->get(4)->IsTheHole(isolate));
+}
+
+TEST(ExtractFixedArraySimple) {
+  Isolate* isolate(CcTest::InitIsolateOnce());
+  const int kNumParams = 3;
+  CodeAssemblerTester asm_tester(isolate, kNumParams);
+  {
+    CodeStubAssembler m(asm_tester.state());
+    CodeStubAssembler::ExtractFixedArrayFlags flags;
+    flags |= CodeStubAssembler::ExtractFixedArrayFlag::kAllFixedArrays;
+    flags |= CodeStubAssembler::ExtractFixedArrayFlag::kDontCopyCOW;
+    m.Return(m.ExtractFixedArray(m.Parameter(0), m.Parameter(1), m.Parameter(2),
+                                 nullptr, flags,
+                                 CodeStubAssembler::SMI_PARAMETERS));
+  }
+  FunctionTester ft(asm_tester.GenerateCode(), kNumParams);
+
+  Handle<FixedArray> source(isolate->factory()->NewFixedArrayWithHoles(5));
+  source->set(1, Smi::FromInt(1234));
+  Handle<Object> result_raw =
+      ft.Call(source, Handle<Smi>(Smi::FromInt(1), isolate),
+              Handle<Smi>(Smi::FromInt(2), isolate))
+          .ToHandleChecked();
+  FixedArray* result(FixedArray::cast(*result_raw));
+  CHECK_EQ(2, result->length());
+  CHECK_EQ(Smi::cast(result->get(0))->value(), 1234);
+  CHECK(result->get(1)->IsTheHole(isolate));
+}
+
+TEST(ExtractFixedArraySimpleSmiConstant) {
+  Isolate* isolate(CcTest::InitIsolateOnce());
+  const int kNumParams = 1;
+  CodeAssemblerTester asm_tester(isolate, kNumParams);
+  {
+    CodeStubAssembler m(asm_tester.state());
+    CodeStubAssembler::ExtractFixedArrayFlags flags;
+    flags |= CodeStubAssembler::ExtractFixedArrayFlag::kAllFixedArrays;
+    flags |= CodeStubAssembler::ExtractFixedArrayFlag::kDontCopyCOW;
+    m.Return(m.ExtractFixedArray(m.Parameter(0), m.SmiConstant(1),
+                                 m.SmiConstant(2), nullptr, flags,
+                                 CodeStubAssembler::SMI_PARAMETERS));
+  }
+  FunctionTester ft(asm_tester.GenerateCode(), kNumParams);
+
+  Handle<FixedArray> source(isolate->factory()->NewFixedArrayWithHoles(5));
+  source->set(1, Smi::FromInt(1234));
+  Handle<Object> result_raw = ft.Call(source).ToHandleChecked();
+  FixedArray* result(FixedArray::cast(*result_raw));
+  CHECK_EQ(2, result->length());
+  CHECK_EQ(Smi::cast(result->get(0))->value(), 1234);
+  CHECK(result->get(1)->IsTheHole(isolate));
+}
+
+TEST(ExtractFixedArraySimpleIntPtrConstant) {
+  Isolate* isolate(CcTest::InitIsolateOnce());
+  const int kNumParams = 1;
+  CodeAssemblerTester asm_tester(isolate, kNumParams);
+  {
+    CodeStubAssembler m(asm_tester.state());
+    CodeStubAssembler::ExtractFixedArrayFlags flags;
+    flags |= CodeStubAssembler::ExtractFixedArrayFlag::kAllFixedArrays;
+    flags |= CodeStubAssembler::ExtractFixedArrayFlag::kDontCopyCOW;
+    m.Return(m.ExtractFixedArray(m.Parameter(0), m.IntPtrConstant(1),
+                                 m.IntPtrConstant(2), nullptr, flags,
+                                 CodeStubAssembler::INTPTR_PARAMETERS));
+  }
+  FunctionTester ft(asm_tester.GenerateCode(), kNumParams);
+
+  Handle<FixedArray> source(isolate->factory()->NewFixedArrayWithHoles(5));
+  source->set(1, Smi::FromInt(1234));
+  Handle<Object> result_raw = ft.Call(source).ToHandleChecked();
+  FixedArray* result(FixedArray::cast(*result_raw));
+  CHECK_EQ(2, result->length());
+  CHECK_EQ(Smi::cast(result->get(0))->value(), 1234);
+  CHECK(result->get(1)->IsTheHole(isolate));
+}
+
+TEST(ExtractFixedArraySimpleIntPtrConstantNoDoubles) {
+  Isolate* isolate(CcTest::InitIsolateOnce());
+  const int kNumParams = 1;
+  CodeAssemblerTester asm_tester(isolate, kNumParams);
+  {
+    CodeStubAssembler m(asm_tester.state());
+    m.Return(m.ExtractFixedArray(
+        m.Parameter(0), m.IntPtrConstant(1), m.IntPtrConstant(2), nullptr,
+        CodeStubAssembler::ExtractFixedArrayFlag::kFixedArrays,
+        CodeStubAssembler::INTPTR_PARAMETERS));
+  }
+  FunctionTester ft(asm_tester.GenerateCode(), kNumParams);
+
+  Handle<FixedArray> source(isolate->factory()->NewFixedArrayWithHoles(5));
+  source->set(1, Smi::FromInt(1234));
+  Handle<Object> result_raw = ft.Call(source).ToHandleChecked();
+  FixedArray* result(FixedArray::cast(*result_raw));
+  CHECK_EQ(2, result->length());
+  CHECK_EQ(Smi::cast(result->get(0))->value(), 1234);
+  CHECK(result->get(1)->IsTheHole(isolate));
+}
+
+TEST(ExtractFixedArraySimpleIntPtrParameters) {
+  Isolate* isolate(CcTest::InitIsolateOnce());
+  const int kNumParams = 3;
+  CodeAssemblerTester asm_tester(isolate, kNumParams);
+  {
+    CodeStubAssembler m(asm_tester.state());
+    Node* p1_untagged = m.SmiUntag(m.Parameter(1));
+    Node* p2_untagged = m.SmiUntag(m.Parameter(2));
+    m.Return(m.ExtractFixedArray(m.Parameter(0), p1_untagged, p2_untagged));
+  }
+  FunctionTester ft(asm_tester.GenerateCode(), kNumParams);
+
+  Handle<FixedArray> source(isolate->factory()->NewFixedArrayWithHoles(5));
+  source->set(1, Smi::FromInt(1234));
+  Handle<Object> result_raw =
+      ft.Call(source, Handle<Smi>(Smi::FromInt(1), isolate),
+              Handle<Smi>(Smi::FromInt(2), isolate))
+          .ToHandleChecked();
+  FixedArray* result(FixedArray::cast(*result_raw));
+  CHECK_EQ(2, result->length());
+  CHECK_EQ(Smi::cast(result->get(0))->value(), 1234);
+  CHECK(result->get(1)->IsTheHole(isolate));
+
+  Handle<FixedDoubleArray> source_double(Handle<FixedDoubleArray>::cast(
+      isolate->factory()->NewFixedDoubleArray(5)));
+  source_double->set(0, 10);
+  source_double->set(1, 11);
+  source_double->set(2, 12);
+  source_double->set(3, 13);
+  source_double->set(4, 14);
+  Handle<Object> double_result_raw =
+      ft.Call(source_double, Handle<Smi>(Smi::FromInt(1), isolate),
+              Handle<Smi>(Smi::FromInt(2), isolate))
+          .ToHandleChecked();
+  FixedDoubleArray* double_result(FixedDoubleArray::cast(*double_result_raw));
+  CHECK_EQ(2, double_result->length());
+  CHECK_EQ(double_result->get_scalar(0), 11);
+  CHECK_EQ(double_result->get_scalar(1), 12);
+}
+
 }  // namespace compiler
 }  // namespace internal
 }  // namespace v8
diff --git a/src/v8/test/cctest/test-code-stubs-arm.cc b/src/v8/test/cctest/test-code-stubs-arm.cc
index cb80382..d042ea6 100644
--- a/src/v8/test/cctest/test-code-stubs-arm.cc
+++ b/src/v8/test/cctest/test-code-stubs-arm.cc
@@ -44,22 +44,17 @@
 #define __ masm.
 
 ConvertDToIFunc MakeConvertDToIFuncTrampoline(Isolate* isolate,
-                                              Register source_reg,
-                                              Register destination_reg,
-                                              bool inline_fastpath) {
-  // Allocate an executable page of memory.
-  size_t actual_size;
-  byte* buffer = static_cast<byte*>(v8::base::OS::Allocate(
-      Assembler::kMinimalBufferSize, &actual_size, true));
-  CHECK(buffer);
+                                              Register destination_reg) {
   HandleScope handles(isolate);
-  MacroAssembler masm(isolate, buffer, static_cast<int>(actual_size),
+
+  size_t allocated;
+  byte* buffer = AllocateAssemblerBuffer(&allocated);
+  MacroAssembler masm(isolate, buffer, static_cast<int>(allocated),
                       v8::internal::CodeObjectRequired::kYes);
-  DoubleToIStub stub(isolate, source_reg, destination_reg, 0, true,
-                     inline_fastpath);
+
+  DoubleToIStub stub(isolate, destination_reg);
 
   byte* start = stub.GetCode()->instruction_start();
-  Label done;
 
   // Save callee save registers.
   __ Push(r7, r6, r5, r4);
@@ -72,9 +67,6 @@
   // Push the double argument.
   __ sub(sp, sp, Operand(kDoubleSize));
   __ vstr(d0, sp, 0);
-  if (source_reg != sp) {
-    __ mov(source_reg, sp);
-  }
 
   // Save registers make sure they don't get clobbered.
   int source_reg_offset = kDoubleSize;
@@ -94,16 +86,7 @@
   __ vstr(d0, sp, 0);
 
   // Call through to the actual stub
-  if (inline_fastpath) {
-    __ vldr(d0, MemOperand(source_reg));
-    __ TryInlineTruncateDoubleToI(destination_reg, d0, &done);
-    if (destination_reg == source_reg && source_reg != sp) {
-      // Restore clobbered source_reg.
-      __ add(source_reg, sp, Operand(source_reg_offset));
-    }
-  }
   __ Call(start, RelocInfo::EXTERNAL_REFERENCE);
-  __ bind(&done);
 
   __ add(sp, sp, Operand(kDoubleSize));
 
@@ -114,7 +97,7 @@
       if (reg != destination_reg) {
         __ ldr(ip, MemOperand(sp, 0));
         __ cmp(reg, ip);
-        __ Assert(eq, kRegisterWasClobbered);
+        __ Assert(eq, AbortReason::kRegisterWasClobbered);
         __ add(sp, sp, Operand(kPointerSize));
       }
     }
@@ -132,7 +115,8 @@
 
   CodeDesc desc;
   masm.GetCode(isolate, &desc);
-  Assembler::FlushICache(isolate, buffer, actual_size);
+  MakeAssemblerBufferExecutable(buffer, allocated);
+  Assembler::FlushICache(isolate, buffer, allocated);
   return (reinterpret_cast<ConvertDToIFunc>(
       reinterpret_cast<intptr_t>(buffer)));
 }
@@ -148,7 +132,8 @@
 int32_t RunGeneratedCodeCallWrapper(ConvertDToIFunc func,
                                     double from) {
 #ifdef USE_SIMULATOR
-  return CALL_GENERATED_FP_INT(CcTest::i_isolate(), func, from, 0);
+  return Simulator::current(CcTest::i_isolate())
+      ->CallFP<int32_t>(FUNCTION_ADDR(func), from, 0);
 #else
   return (*func)(from);
 #endif
@@ -168,24 +153,12 @@
   RunAllTruncationTests(&ConvertDToICVersion);
 #endif
 
-  Register source_registers[] = {sp, r0, r1, r2, r3, r4, r5, r6, r7};
   Register dest_registers[] = {r0, r1, r2, r3, r4, r5, r6, r7};
 
-  for (size_t s = 0; s < sizeof(source_registers) / sizeof(Register); s++) {
-    for (size_t d = 0; d < sizeof(dest_registers) / sizeof(Register); d++) {
-      RunAllTruncationTests(
-          RunGeneratedCodeCallWrapper,
-          MakeConvertDToIFuncTrampoline(isolate,
-                                        source_registers[s],
-                                        dest_registers[d],
-                                        false));
-      RunAllTruncationTests(
-          RunGeneratedCodeCallWrapper,
-          MakeConvertDToIFuncTrampoline(isolate,
-                                        source_registers[s],
-                                        dest_registers[d],
-                                        true));
-    }
+  for (size_t d = 0; d < sizeof(dest_registers) / sizeof(Register); d++) {
+    RunAllTruncationTests(
+        RunGeneratedCodeCallWrapper,
+        MakeConvertDToIFuncTrampoline(isolate, dest_registers[d]));
   }
 }
 
diff --git a/src/v8/test/cctest/test-code-stubs-arm64.cc b/src/v8/test/cctest/test-code-stubs-arm64.cc
index 6443570..1086bea 100644
--- a/src/v8/test/cctest/test-code-stubs-arm64.cc
+++ b/src/v8/test/cctest/test-code-stubs-arm64.cc
@@ -44,92 +44,92 @@
 #define __ masm.
 
 ConvertDToIFunc MakeConvertDToIFuncTrampoline(Isolate* isolate,
-                                              Register source_reg,
-                                              Register destination_reg,
-                                              bool inline_fastpath) {
-  // Allocate an executable page of memory.
-  size_t actual_size = 4 * Assembler::kMinimalBufferSize;
-  byte* buffer = static_cast<byte*>(
-      v8::base::OS::Allocate(actual_size, &actual_size, true));
-  CHECK(buffer);
+                                              Register destination_reg) {
   HandleScope handles(isolate);
-  MacroAssembler masm(isolate, buffer, static_cast<int>(actual_size),
+
+  size_t allocated;
+  byte* buffer =
+      AllocateAssemblerBuffer(&allocated, 4 * Assembler::kMinimalBufferSize);
+  MacroAssembler masm(isolate, buffer, static_cast<int>(allocated),
                       v8::internal::CodeObjectRequired::kYes);
-  DoubleToIStub stub(isolate, source_reg, destination_reg, 0, true,
-                     inline_fastpath);
+
+  DoubleToIStub stub(isolate, destination_reg);
 
   byte* start = stub.GetCode()->instruction_start();
-  Label done;
 
-  __ SetStackPointer(csp);
   __ PushCalleeSavedRegisters();
-  __ Mov(jssp, csp);
-  __ SetStackPointer(jssp);
-
-  // Push the double argument.
-  __ Push(d0);
-  __ Mov(source_reg, jssp);
 
   MacroAssembler::PushPopQueue queue(&masm);
 
   // Save registers make sure they don't get clobbered.
   int source_reg_offset = kDoubleSize;
   int reg_num = 0;
+  queue.Queue(xzr);  // Push xzr to maintain sp alignment.
   for (; reg_num < Register::kNumRegisters; ++reg_num) {
     if (RegisterConfiguration::Default()->IsAllocatableGeneralCode(reg_num)) {
       Register reg = Register::from_code(reg_num);
-      if (!reg.is(destination_reg)) {
-        queue.Queue(reg);
-        source_reg_offset += kPointerSize;
-      }
+      queue.Queue(reg);
+      source_reg_offset += kPointerSize;
     }
   }
-  // Re-push the double argument.
+  // Push the double argument. We push a second copy to maintain sp alignment.
+  queue.Queue(d0);
   queue.Queue(d0);
 
   queue.PushQueued();
 
-  // Call through to the actual stub
-  if (inline_fastpath) {
-    __ Ldr(d0, MemOperand(source_reg));
-    __ TryConvertDoubleToInt64(destination_reg, d0, &done);
-    if (destination_reg.is(source_reg)) {
-      // Restore clobbered source_reg.
-      __ add(source_reg, jssp, Operand(source_reg_offset));
-    }
-  }
+  // Call through to the actual stub.
   __ Call(start, RelocInfo::EXTERNAL_REFERENCE);
-  __ bind(&done);
 
-  __ Drop(1, kDoubleSize);
+  __ Drop(2, kDoubleSize);
 
-  // // Make sure no registers have been unexpectedly clobbered
-  for (--reg_num; reg_num >= 0; --reg_num) {
-    if (RegisterConfiguration::Default()->IsAllocatableGeneralCode(reg_num)) {
-      Register reg = Register::from_code(reg_num);
+  // Make sure no registers have been unexpectedly clobbered.
+  {
+    const RegisterConfiguration* config(RegisterConfiguration::Default());
+    int allocatable_register_count =
+        config->num_allocatable_general_registers();
+    UseScratchRegisterScope temps(&masm);
+    Register temp0 = temps.AcquireX();
+    Register temp1 = temps.AcquireX();
+    for (int i = allocatable_register_count - 1; i > 0; i -= 2) {
+      int code0 = config->GetAllocatableGeneralCode(i);
+      int code1 = config->GetAllocatableGeneralCode(i - 1);
+      Register reg0 = Register::from_code(code0);
+      Register reg1 = Register::from_code(code1);
+      __ Pop(temp0, temp1);
+      if (!reg0.is(destination_reg)) {
+        __ Cmp(reg0, temp0);
+        __ Assert(eq, AbortReason::kRegisterWasClobbered);
+      }
+      if (!reg1.is(destination_reg)) {
+        __ Cmp(reg1, temp1);
+        __ Assert(eq, AbortReason::kRegisterWasClobbered);
+      }
+    }
+
+    if (allocatable_register_count % 2 != 0) {
+      int code = config->GetAllocatableGeneralCode(0);
+      Register reg = Register::from_code(code);
+      __ Pop(temp0, xzr);
       if (!reg.is(destination_reg)) {
-        __ Pop(ip0);
-        __ cmp(reg, ip0);
-        __ Assert(eq, kRegisterWasClobbered);
+        __ Cmp(reg, temp0);
+        __ Assert(eq, AbortReason::kRegisterWasClobbered);
       }
     }
   }
 
-  __ Drop(1, kDoubleSize);
-
   if (!destination_reg.is(x0))
     __ Mov(x0, destination_reg);
 
   // Restore callee save registers.
-  __ Mov(csp, jssp);
-  __ SetStackPointer(csp);
   __ PopCalleeSavedRegisters();
 
   __ Ret();
 
   CodeDesc desc;
   masm.GetCode(isolate, &desc);
-  Assembler::FlushICache(isolate, buffer, actual_size);
+  MakeAssemblerBufferExecutable(buffer, allocated);
+  Assembler::FlushICache(isolate, buffer, allocated);
   return (reinterpret_cast<ConvertDToIFunc>(
       reinterpret_cast<intptr_t>(buffer)));
 }
@@ -145,12 +145,8 @@
 int32_t RunGeneratedCodeCallWrapper(ConvertDToIFunc func,
                                     double from) {
 #ifdef USE_SIMULATOR
-  Simulator::CallArgument args[] = {
-      Simulator::CallArgument(from),
-      Simulator::CallArgument::End()
-  };
-  return static_cast<int32_t>(Simulator::current(CcTest::i_isolate())
-                                  ->CallInt64(FUNCTION_ADDR(func), args));
+  return Simulator::current(CcTest::i_isolate())
+      ->Call<int32_t>(FUNCTION_ADDR(func), from);
 #else
   return (*func)(from);
 #endif
@@ -170,28 +166,14 @@
   RunAllTruncationTests(&ConvertDToICVersion);
 #endif
 
-  Register source_registers[] = {jssp, x0, x1, x2, x3, x4, x5, x6, x7, x8, x9,
-                                 x10, x11, x12, x13, x14, x15, x18, x19, x20,
-                                 x21, x22, x23, x24};
   Register dest_registers[] = {x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11,
                                x12, x13, x14, x15, x18, x19, x20, x21, x22, x23,
                                x24};
 
-  for (size_t s = 0; s < sizeof(source_registers) / sizeof(Register); s++) {
-    for (size_t d = 0; d < sizeof(dest_registers) / sizeof(Register); d++) {
-      RunAllTruncationTests(
-          RunGeneratedCodeCallWrapper,
-          MakeConvertDToIFuncTrampoline(isolate,
-                                        source_registers[s],
-                                        dest_registers[d],
-                                        false));
-      RunAllTruncationTests(
-          RunGeneratedCodeCallWrapper,
-          MakeConvertDToIFuncTrampoline(isolate,
-                                        source_registers[s],
-                                        dest_registers[d],
-                                        true));
-    }
+  for (size_t d = 0; d < sizeof(dest_registers) / sizeof(Register); d++) {
+    RunAllTruncationTests(
+        RunGeneratedCodeCallWrapper,
+        MakeConvertDToIFuncTrampoline(isolate, dest_registers[d]));
   }
 }
 
diff --git a/src/v8/test/cctest/test-code-stubs-ia32.cc b/src/v8/test/cctest/test-code-stubs-ia32.cc
index 3ddf732..7e62ab8 100644
--- a/src/v8/test/cctest/test-code-stubs-ia32.cc
+++ b/src/v8/test/cctest/test-code-stubs-ia32.cc
@@ -42,21 +42,18 @@
 namespace v8 {
 namespace internal {
 
-#define __ assm.
+#define __ masm.
 
 ConvertDToIFunc MakeConvertDToIFuncTrampoline(Isolate* isolate,
-                                              Register source_reg,
                                               Register destination_reg) {
-  // Allocate an executable page of memory.
-  size_t actual_size;
-  byte* buffer = static_cast<byte*>(v8::base::OS::Allocate(
-      Assembler::kMinimalBufferSize, &actual_size, true));
-  CHECK(buffer);
   HandleScope handles(isolate);
-  MacroAssembler assm(isolate, buffer, static_cast<int>(actual_size),
+
+  size_t allocated;
+  byte* buffer = AllocateAssemblerBuffer(&allocated);
+  MacroAssembler masm(isolate, buffer, static_cast<int>(allocated),
                       v8::internal::CodeObjectRequired::kYes);
-  int offset = source_reg == esp ? 0 : (HeapNumber::kValueOffset - kSmiTagSize);
-  DoubleToIStub stub(isolate, source_reg, destination_reg, offset, true);
+
+  DoubleToIStub stub(isolate, destination_reg);
   byte* start = stub.GetCode()->instruction_start();
 
   __ push(ebx);
@@ -65,10 +62,6 @@
   __ push(esi);
   __ push(edi);
 
-  if (source_reg != esp) {
-    __ lea(source_reg, MemOperand(esp, 6 * kPointerSize - offset));
-  }
-
   int param_offset = 7 * kPointerSize;
   // Save registers make sure they don't get clobbered.
   int reg_num = 0;
@@ -97,7 +90,7 @@
       Register reg = Register::from_code(reg_num);
       if (reg != esp && reg != ebp && reg != destination_reg) {
         __ cmp(reg, MemOperand(esp, 0));
-        __ Assert(equal, kRegisterWasClobbered);
+        __ Assert(equal, AbortReason::kRegisterWasClobbered);
         __ add(esp, Immediate(kPointerSize));
       }
     }
@@ -114,7 +107,8 @@
   __ ret(kDoubleSize);
 
   CodeDesc desc;
-  assm.GetCode(isolate, &desc);
+  masm.GetCode(isolate, &desc);
+  MakeAssemblerBufferExecutable(buffer, allocated);
   return reinterpret_cast<ConvertDToIFunc>(
       reinterpret_cast<intptr_t>(buffer));
 }
@@ -140,16 +134,11 @@
   RunAllTruncationTests(&ConvertDToICVersion);
 #endif
 
-  Register source_registers[] = {esp, eax, ebx, ecx, edx, edi, esi};
   Register dest_registers[] = {eax, ebx, ecx, edx, edi, esi};
 
-  for (size_t s = 0; s < sizeof(source_registers) / sizeof(Register); s++) {
-    for (size_t d = 0; d < sizeof(dest_registers) / sizeof(Register); d++) {
-      RunAllTruncationTests(
-          MakeConvertDToIFuncTrampoline(isolate,
-                                        source_registers[s],
-                                        dest_registers[d]));
-    }
+  for (size_t d = 0; d < sizeof(dest_registers) / sizeof(Register); d++) {
+    RunAllTruncationTests(
+        MakeConvertDToIFuncTrampoline(isolate, dest_registers[d]));
   }
 }
 
diff --git a/src/v8/test/cctest/test-code-stubs-mips.cc b/src/v8/test/cctest/test-code-stubs-mips.cc
index 39aa88b..b1df94f 100644
--- a/src/v8/test/cctest/test-code-stubs-mips.cc
+++ b/src/v8/test/cctest/test-code-stubs-mips.cc
@@ -46,22 +46,17 @@
 #define __ masm.
 
 ConvertDToIFunc MakeConvertDToIFuncTrampoline(Isolate* isolate,
-                                              Register source_reg,
-                                              Register destination_reg,
-                                              bool inline_fastpath) {
-  // Allocate an executable page of memory.
-  size_t actual_size;
-  byte* buffer = static_cast<byte*>(v8::base::OS::Allocate(
-      Assembler::kMinimalBufferSize, &actual_size, true));
-  CHECK(buffer);
+                                              Register destination_reg) {
   HandleScope handles(isolate);
-  MacroAssembler masm(isolate, buffer, static_cast<int>(actual_size),
+
+  size_t allocated;
+  byte* buffer = AllocateAssemblerBuffer(&allocated);
+  MacroAssembler masm(isolate, buffer, static_cast<int>(allocated),
                       v8::internal::CodeObjectRequired::kYes);
-  DoubleToIStub stub(isolate, source_reg, destination_reg, 0, true,
-                     inline_fastpath);
+
+  DoubleToIStub stub(isolate, destination_reg);
 
   byte* start = stub.GetCode()->instruction_start();
-  Label done;
 
   // Save callee save registers.
   __ MultiPush(kCalleeSaved | ra.bit());
@@ -78,7 +73,6 @@
   // Push the double argument.
   __ Subu(sp, sp, Operand(kDoubleSize));
   __ Sdc1(f12, MemOperand(sp));
-  __ Move(source_reg, sp);
 
   // Save registers make sure they don't get clobbered.
   int source_reg_offset = kDoubleSize;
@@ -98,16 +92,7 @@
   __ Sdc1(f12, MemOperand(sp));
 
   // Call through to the actual stub
-  if (inline_fastpath) {
-    __ Ldc1(f12, MemOperand(source_reg));
-    __ TryInlineTruncateDoubleToI(destination_reg, f12, &done);
-    if (destination_reg == source_reg && source_reg != sp) {
-      // Restore clobbered source_reg.
-      __ Addu(source_reg, sp, Operand(source_reg_offset));
-    }
-  }
   __ Call(start, RelocInfo::EXTERNAL_REFERENCE);
-  __ bind(&done);
 
   __ Addu(sp, sp, Operand(kDoubleSize));
 
@@ -117,7 +102,7 @@
       Register reg = Register::from_code(reg_num);
       if (reg != destination_reg) {
         __ lw(at, MemOperand(sp, 0));
-        __ Assert(eq, kRegisterWasClobbered, reg, Operand(at));
+        __ Assert(eq, AbortReason::kRegisterWasClobbered, reg, Operand(at));
         __ Addu(sp, sp, Operand(kPointerSize));
       }
     }
@@ -143,7 +128,8 @@
 
   CodeDesc desc;
   masm.GetCode(isolate, &desc);
-  Assembler::FlushICache(isolate, buffer, actual_size);
+  MakeAssemblerBufferExecutable(buffer, allocated);
+  Assembler::FlushICache(isolate, buffer, allocated);
   return (reinterpret_cast<ConvertDToIFunc>(
       reinterpret_cast<intptr_t>(buffer)));
 }
@@ -181,26 +167,13 @@
   RunAllTruncationTests(&ConvertDToICVersion);
 #endif
 
-  Register source_registers[] = {
-      sp, v0, v1, a0, a1, a2, a3, t0, t1, t2, t3, t4, t5};
   Register dest_registers[] = {
       v0, v1, a0, a1, a2, a3, t0, t1, t2, t3, t4, t5};
 
-  for (size_t s = 0; s < sizeof(source_registers) / sizeof(Register); s++) {
-    for (size_t d = 0; d < sizeof(dest_registers) / sizeof(Register); d++) {
-      RunAllTruncationTests(
-          RunGeneratedCodeCallWrapper,
-          MakeConvertDToIFuncTrampoline(isolate,
-                                        source_registers[s],
-                                        dest_registers[d],
-                                        false));
-      RunAllTruncationTests(
-          RunGeneratedCodeCallWrapper,
-          MakeConvertDToIFuncTrampoline(isolate,
-                                        source_registers[s],
-                                        dest_registers[d],
-                                        true));
-    }
+  for (size_t d = 0; d < sizeof(dest_registers) / sizeof(Register); d++) {
+    RunAllTruncationTests(
+        RunGeneratedCodeCallWrapper,
+        MakeConvertDToIFuncTrampoline(isolate, dest_registers[d]));
   }
 }
 
diff --git a/src/v8/test/cctest/test-code-stubs-mips64.cc b/src/v8/test/cctest/test-code-stubs-mips64.cc
index ee6388e..c09dac2 100644
--- a/src/v8/test/cctest/test-code-stubs-mips64.cc
+++ b/src/v8/test/cctest/test-code-stubs-mips64.cc
@@ -46,22 +46,17 @@
 #define __ masm.
 
 ConvertDToIFunc MakeConvertDToIFuncTrampoline(Isolate* isolate,
-                                              Register source_reg,
-                                              Register destination_reg,
-                                              bool inline_fastpath) {
-  // Allocate an executable page of memory.
-  size_t actual_size;
-  byte* buffer = static_cast<byte*>(v8::base::OS::Allocate(
-      Assembler::kMinimalBufferSize, &actual_size, true));
-  CHECK(buffer);
+                                              Register destination_reg) {
   HandleScope handles(isolate);
-  MacroAssembler masm(isolate, buffer, static_cast<int>(actual_size),
+
+  size_t allocated;
+  byte* buffer = AllocateAssemblerBuffer(&allocated);
+  MacroAssembler masm(isolate, buffer, static_cast<int>(allocated),
                       v8::internal::CodeObjectRequired::kYes);
-  DoubleToIStub stub(isolate, source_reg, destination_reg, 0, true,
-                     inline_fastpath);
+
+  DoubleToIStub stub(isolate, destination_reg);
 
   byte* start = stub.GetCode()->instruction_start();
-  Label done;
 
   // Save callee save registers.
   __ MultiPush(kCalleeSaved | ra.bit());
@@ -78,7 +73,6 @@
   // Push the double argument.
   __ Dsubu(sp, sp, Operand(kDoubleSize));
   __ Sdc1(f12, MemOperand(sp));
-  __ Move(source_reg, sp);
 
   // Save registers make sure they don't get clobbered.
   int source_reg_offset = kDoubleSize;
@@ -97,16 +91,7 @@
   __ Sdc1(f12, MemOperand(sp));
 
   // Call through to the actual stub
-  if (inline_fastpath) {
-    __ Ldc1(f12, MemOperand(source_reg));
-    __ TryInlineTruncateDoubleToI(destination_reg, f12, &done);
-    if (destination_reg == source_reg && source_reg != sp) {
-      // Restore clobbered source_reg.
-      __ Daddu(source_reg, sp, Operand(source_reg_offset));
-    }
-  }
   __ Call(start, RelocInfo::EXTERNAL_REFERENCE);
-  __ bind(&done);
 
   __ Daddu(sp, sp, Operand(kDoubleSize));
 
@@ -115,7 +100,7 @@
     Register reg = Register::from_code(reg_num);
     if (reg != destination_reg) {
       __ Ld(at, MemOperand(sp, 0));
-      __ Assert(eq, kRegisterWasClobbered, reg, Operand(at));
+      __ Assert(eq, AbortReason::kRegisterWasClobbered, reg, Operand(at));
       __ Daddu(sp, sp, Operand(kPointerSize));
     }
   }
@@ -140,7 +125,8 @@
 
   CodeDesc desc;
   masm.GetCode(isolate, &desc);
-  Assembler::FlushICache(isolate, buffer, actual_size);
+  MakeAssemblerBufferExecutable(buffer, allocated);
+  Assembler::FlushICache(isolate, buffer, allocated);
   return (reinterpret_cast<ConvertDToIFunc>(
       reinterpret_cast<intptr_t>(buffer)));
 }
@@ -179,26 +165,13 @@
   RunAllTruncationTests(&ConvertDToICVersion);
 #endif
 
-  Register source_registers[] = {
-      sp, v0, v1, a0, a1, a2, a3, a4, a5, a6, a7, t0, t1};
   Register dest_registers[] = {
       v0, v1, a0, a1, a2, a3, a4, a5, a6, a7, t0, t1};
 
-  for (size_t s = 0; s < sizeof(source_registers) / sizeof(Register); s++) {
-    for (size_t d = 0; d < sizeof(dest_registers) / sizeof(Register); d++) {
-      RunAllTruncationTests(
-          RunGeneratedCodeCallWrapper,
-          MakeConvertDToIFuncTrampoline(isolate,
-                                        source_registers[s],
-                                        dest_registers[d],
-                                        false));
-      RunAllTruncationTests(
-          RunGeneratedCodeCallWrapper,
-          MakeConvertDToIFuncTrampoline(isolate,
-                                        source_registers[s],
-                                        dest_registers[d],
-                                        true));
-    }
+  for (size_t d = 0; d < sizeof(dest_registers) / sizeof(Register); d++) {
+    RunAllTruncationTests(
+        RunGeneratedCodeCallWrapper,
+        MakeConvertDToIFuncTrampoline(isolate, dest_registers[d]));
   }
 }
 
diff --git a/src/v8/test/cctest/test-code-stubs-x64.cc b/src/v8/test/cctest/test-code-stubs-x64.cc
index bd29e7a..a03cb4b 100644
--- a/src/v8/test/cctest/test-code-stubs-x64.cc
+++ b/src/v8/test/cctest/test-code-stubs-x64.cc
@@ -42,21 +42,18 @@
 namespace internal {
 namespace test_code_stubs_x64 {
 
-#define __ assm.
+#define __ masm.
 
 ConvertDToIFunc MakeConvertDToIFuncTrampoline(Isolate* isolate,
-                                              Register source_reg,
                                               Register destination_reg) {
-  // Allocate an executable page of memory.
-  size_t actual_size;
-  byte* buffer = static_cast<byte*>(v8::base::OS::Allocate(
-      Assembler::kMinimalBufferSize, &actual_size, true));
-  CHECK(buffer);
   HandleScope handles(isolate);
-  MacroAssembler assm(isolate, buffer, static_cast<int>(actual_size),
+
+  size_t allocated;
+  byte* buffer = AllocateAssemblerBuffer(&allocated);
+  MacroAssembler masm(isolate, buffer, static_cast<int>(allocated),
                       v8::internal::CodeObjectRequired::kYes);
-  int offset = source_reg == rsp ? 0 : (HeapNumber::kValueOffset - kSmiTagSize);
-  DoubleToIStub stub(isolate, source_reg, destination_reg, offset, true);
+
+  DoubleToIStub stub(isolate, destination_reg);
   byte* start = stub.GetCode()->instruction_start();
 
   __ pushq(rbx);
@@ -66,16 +63,6 @@
   __ pushq(rdi);
 
   const RegisterConfiguration* config = RegisterConfiguration::Default();
-  if (source_reg != rsp) {
-    // The argument we pass to the stub is not a heap number, but instead
-    // stack-allocated and offset-wise made to look like a heap number for
-    // the stub.  We create that "heap number" after pushing all allocatable
-    // registers.
-    int double_argument_slot =
-        (config->num_allocatable_general_registers() - 1) * kPointerSize +
-        kDoubleSize;
-    __ leaq(source_reg, MemOperand(rsp, -double_argument_slot - offset));
-  }
 
   // Save registers make sure they don't get clobbered.
   int reg_num = 0;
@@ -102,7 +89,7 @@
         Register::from_code(config->GetAllocatableGeneralCode(reg_num));
     if (reg != rsp && reg != rbp && reg != destination_reg) {
       __ cmpq(reg, MemOperand(rsp, 0));
-      __ Assert(equal, kRegisterWasClobbered);
+      __ Assert(equal, AbortReason::kRegisterWasClobbered);
       __ addq(rsp, Immediate(kPointerSize));
     }
   }
@@ -118,7 +105,8 @@
   __ ret(0);
 
   CodeDesc desc;
-  assm.GetCode(isolate, &desc);
+  masm.GetCode(isolate, &desc);
+  MakeAssemblerBufferExecutable(buffer, allocated);
   return reinterpret_cast<ConvertDToIFunc>(
       reinterpret_cast<intptr_t>(buffer));
 }
@@ -144,16 +132,11 @@
   RunAllTruncationTests(&ConvertDToICVersion);
 #endif
 
-  Register source_registers[] = {rsp, rax, rbx, rcx, rdx, rsi, rdi, r8, r9};
   Register dest_registers[] = {rax, rbx, rcx, rdx, rsi, rdi, r8, r9};
 
-  for (size_t s = 0; s < sizeof(source_registers) / sizeof(Register); s++) {
-    for (size_t d = 0; d < sizeof(dest_registers) / sizeof(Register); d++) {
-      RunAllTruncationTests(
-          MakeConvertDToIFuncTrampoline(isolate,
-                                        source_registers[s],
-                                        dest_registers[d]));
-    }
+  for (size_t d = 0; d < sizeof(dest_registers) / sizeof(Register); d++) {
+    RunAllTruncationTests(
+        MakeConvertDToIFuncTrampoline(isolate, dest_registers[d]));
   }
 }
 
diff --git a/src/v8/test/cctest/test-code-stubs.cc b/src/v8/test/cctest/test-code-stubs.cc
index 27f411c..61d3a81 100644
--- a/src/v8/test/cctest/test-code-stubs.cc
+++ b/src/v8/test/cctest/test-code-stubs.cc
@@ -193,7 +193,7 @@
 #define CHECK_STUB(NAME)                        \
   {                                             \
     HandleScope scope(isolate);                 \
-    NAME##Stub stub_impl(0xabcd, isolate);      \
+    NAME##Stub stub_impl(0xABCD, isolate);      \
     CodeStub* stub = &stub_impl;                \
     CHECK_EQ(stub->MajorKey(), CodeStub::NAME); \
   }
diff --git a/src/v8/test/cctest/test-compiler.cc b/src/v8/test/cctest/test-compiler.cc
index eaed0e0..f9195c5 100644
--- a/src/v8/test/cctest/test-compiler.cc
+++ b/src/v8/test/cctest/test-compiler.cc
@@ -55,7 +55,8 @@
       isolate->factory()->InternalizeUtf8String(name);
   Handle<JSObject> global(isolate->context()->global_object());
   Runtime::SetObjectProperty(isolate, global, internalized_name, object,
-                             SLOPPY).Check();
+                             LanguageMode::kSloppy)
+      .Check();
 }
 
 
@@ -63,11 +64,14 @@
   Isolate* isolate = CcTest::i_isolate();
   Handle<String> source_code = isolate->factory()->NewStringFromUtf8(
       CStrVector(source)).ToHandleChecked();
-  Handle<SharedFunctionInfo> shared = Compiler::GetSharedFunctionInfoForScript(
-      source_code, Handle<String>(), 0, 0, v8::ScriptOriginOptions(),
-      Handle<Object>(), Handle<Context>(isolate->native_context()), NULL, NULL,
-      v8::ScriptCompiler::kNoCompileOptions, NOT_NATIVES_CODE,
-      Handle<FixedArray>());
+  Handle<SharedFunctionInfo> shared =
+      Compiler::GetSharedFunctionInfoForScript(
+          source_code, MaybeHandle<String>(), 0, 0, v8::ScriptOriginOptions(),
+          MaybeHandle<Object>(), Handle<Context>(isolate->native_context()),
+          nullptr, nullptr, v8::ScriptCompiler::kNoCompileOptions,
+          ScriptCompiler::kNoCacheNoReason, NOT_NATIVES_CODE,
+          MaybeHandle<FixedArray>())
+          .ToHandleChecked();
   return isolate->factory()->NewFunctionFromSharedFunctionInfo(
       shared, isolate->native_context());
 }
@@ -82,7 +86,7 @@
   if (fun.is_null()) return -1;
 
   Handle<JSObject> global(isolate->context()->global_object());
-  Execution::Call(isolate, fun, global, 0, NULL).Check();
+  Execution::Call(isolate, fun, global, 0, nullptr).Check();
   return GetGlobalProperty("result")->Number();
 }
 
@@ -101,7 +105,7 @@
   SetGlobalProperty("x", Smi::FromInt(x));
   SetGlobalProperty("y", Smi::FromInt(y));
   Handle<JSObject> global(isolate->context()->global_object());
-  Execution::Call(isolate, fun, global, 0, NULL).Check();
+  Execution::Call(isolate, fun, global, 0, nullptr).Check();
   return GetGlobalProperty("result")->Number();
 }
 
@@ -119,7 +123,7 @@
 
   SetGlobalProperty("x", Smi::FromInt(x));
   Handle<JSObject> global(isolate->context()->global_object());
-  Execution::Call(isolate, fun, global, 0, NULL).Check();
+  Execution::Call(isolate, fun, global, 0, nullptr).Check();
   return GetGlobalProperty("result")->Number();
 }
 
@@ -138,7 +142,7 @@
 
   SetGlobalProperty("n", Smi::FromInt(n));
   Handle<JSObject> global(isolate->context()->global_object());
-  Execution::Call(isolate, fun, global, 0, NULL).Check();
+  Execution::Call(isolate, fun, global, 0, nullptr).Check();
   return GetGlobalProperty("result")->Number();
 }
 
@@ -158,7 +162,7 @@
   Handle<JSFunction> fun = Compile(source);
   if (fun.is_null()) return;
   Handle<JSObject> global(CcTest::i_isolate()->context()->global_object());
-  Execution::Call(CcTest::i_isolate(), fun, global, 0, NULL).Check();
+  Execution::Call(CcTest::i_isolate(), fun, global, 0, nullptr).Check();
 }
 
 
@@ -189,8 +193,7 @@
   Handle<JSFunction> fun = Compile(source);
   CHECK(!fun.is_null());
   Handle<JSObject> global(CcTest::i_isolate()->context()->global_object());
-  Execution::Call(
-      CcTest::i_isolate(), fun, global, 0, NULL).Check();
+  Execution::Call(CcTest::i_isolate(), fun, global, 0, nullptr).Check();
   CHECK_EQ(511.0, GetGlobalProperty("r")->Number());
 }
 
@@ -204,7 +207,7 @@
   CHECK(!fun.is_null());
   Isolate* isolate = fun->GetIsolate();
   Handle<JSObject> global(isolate->context()->global_object());
-  CHECK(Execution::Call(isolate, fun, global, 0, NULL).is_null());
+  CHECK(Execution::Call(isolate, fun, global, 0, nullptr).is_null());
   CHECK_EQ(42.0, isolate->pending_exception()->Number());
 }
 
@@ -230,7 +233,7 @@
 
   // Run the generated code to populate the global object with 'foo'.
   Handle<JSObject> global(isolate->context()->global_object());
-  Execution::Call(isolate, fun0, global, 0, NULL).Check();
+  Execution::Call(isolate, fun0, global, 0, nullptr).Check();
 
   Handle<Object> fun1 =
       JSReceiver::GetProperty(isolate, isolate->global_object(), "foo")
@@ -402,6 +405,7 @@
 }
 
 TEST(CompileFunctionInContext) {
+  if (i::FLAG_always_opt) return;
   CcTest::InitializeVM();
   v8::HandleScope scope(CcTest::isolate());
   LocalContext env;
@@ -414,10 +418,12 @@
       "y = r * sin(PI / 2);"));
   v8::Local<v8::Function> fun =
       v8::ScriptCompiler::CompileFunctionInContext(env.local(), &script_source,
-                                                   0, NULL, 1, &math)
+                                                   0, nullptr, 1, &math)
           .ToLocalChecked();
   CHECK(!fun.IsEmpty());
-  fun->Call(env.local(), env->Global(), 0, NULL).ToLocalChecked();
+
+  i::DisallowCompilation no_compile(CcTest::i_isolate());
+  fun->Call(env.local(), env->Global(), 0, nullptr).ToLocalChecked();
   CHECK(env->Global()->Has(env.local(), v8_str("a")).FromJust());
   v8::Local<v8::Value> a =
       env->Global()->Get(env.local(), v8_str("a")).ToLocalChecked();
@@ -454,10 +460,10 @@
   v8::ScriptCompiler::Source script_source(v8_str("result = x + y + z"));
   v8::Local<v8::Function> fun =
       v8::ScriptCompiler::CompileFunctionInContext(env.local(), &script_source,
-                                                   0, NULL, 2, ext)
+                                                   0, nullptr, 2, ext)
           .ToLocalChecked();
   CHECK(!fun.IsEmpty());
-  fun->Call(env.local(), env->Global(), 0, NULL).ToLocalChecked();
+  fun->Call(env.local(), env->Global(), 0, nullptr).ToLocalChecked();
   CHECK(env->Global()->Has(env.local(), v8_str("result")).FromJust());
   v8::Local<v8::Value> result =
       env->Global()->Get(env.local(), v8_str("result")).ToLocalChecked();
@@ -480,7 +486,11 @@
       v8::ScriptCompiler::CompileFunctionInContext(env.local(), &script_source,
                                                    1, &arg, 1, ext)
           .ToLocalChecked();
-  CHECK(!fun.IsEmpty());
+  CHECK_EQ(1, fun->Get(env.local(), v8_str("length"))
+                  .ToLocalChecked()
+                  ->ToInt32(env.local())
+                  .ToLocalChecked()
+                  ->Value());
   v8::Local<v8::Value> b_value = v8::Number::New(CcTest::isolate(), 42.0);
   fun->Call(env.local(), env->Global(), 1, &b_value).ToLocalChecked();
   CHECK(env->Global()->Has(env.local(), v8_str("result")).FromJust());
@@ -524,10 +534,101 @@
   v8::ScriptCompiler::Source script_source(v8_str("result = 1"));
   v8::Local<v8::String> arg = v8_str("b }");
   CHECK(v8::ScriptCompiler::CompileFunctionInContext(
-            env.local(), &script_source, 1, &arg, 0, NULL)
+            env.local(), &script_source, 1, &arg, 0, nullptr)
             .IsEmpty());
 }
 
+TEST(CompileFunctionInContextRenderCallSite) {
+  CcTest::InitializeVM();
+  v8::HandleScope scope(CcTest::isolate());
+  LocalContext env;
+  static const char* source1 =
+      "try {"
+      "  var a = [];"
+      "  a[0]();"
+      "} catch (e) {"
+      "  return e.toString();"
+      "}";
+  static const char* expect1 = "TypeError: a[0] is not a function";
+  static const char* source2 =
+      "try {"
+      "  (function() {"
+      "    var a = [];"
+      "    a[0]();"
+      "  })()"
+      "} catch (e) {"
+      "  return e.toString();"
+      "}";
+  static const char* expect2 = "TypeError: a[0] is not a function";
+  {
+    v8::ScriptCompiler::Source script_source(v8_str(source1));
+    v8::Local<v8::Function> fun =
+        v8::ScriptCompiler::CompileFunctionInContext(
+            env.local(), &script_source, 0, nullptr, 0, nullptr)
+            .ToLocalChecked();
+    CHECK(!fun.IsEmpty());
+    v8::Local<v8::Value> result =
+        fun->Call(env.local(), env->Global(), 0, nullptr).ToLocalChecked();
+    CHECK(result->IsString());
+    CHECK(v8::Local<v8::String>::Cast(result)
+              ->Equals(env.local(), v8_str(expect1))
+              .FromJust());
+  }
+  {
+    v8::ScriptCompiler::Source script_source(v8_str(source2));
+    v8::Local<v8::Function> fun =
+        v8::ScriptCompiler::CompileFunctionInContext(
+            env.local(), &script_source, 0, nullptr, 0, nullptr)
+            .ToLocalChecked();
+    v8::Local<v8::Value> result =
+        fun->Call(env.local(), env->Global(), 0, nullptr).ToLocalChecked();
+    CHECK(result->IsString());
+    CHECK(v8::Local<v8::String>::Cast(result)
+              ->Equals(env.local(), v8_str(expect2))
+              .FromJust());
+  }
+}
+
+TEST(CompileFunctionInContextQuirks) {
+  CcTest::InitializeVM();
+  v8::HandleScope scope(CcTest::isolate());
+  LocalContext env;
+  {
+    static const char* source =
+        "[x, y] = ['ab', 'cd'];"
+        "return x + y";
+    static const char* expect = "abcd";
+    v8::ScriptCompiler::Source script_source(v8_str(source));
+    v8::Local<v8::Function> fun =
+        v8::ScriptCompiler::CompileFunctionInContext(
+            env.local(), &script_source, 0, nullptr, 0, nullptr)
+            .ToLocalChecked();
+    v8::Local<v8::Value> result =
+        fun->Call(env.local(), env->Global(), 0, nullptr).ToLocalChecked();
+    CHECK(result->IsString());
+    CHECK(v8::Local<v8::String>::Cast(result)
+              ->Equals(env.local(), v8_str(expect))
+              .FromJust());
+  }
+  {
+    static const char* source = "'use strict'; var a = 077";
+    v8::ScriptCompiler::Source script_source(v8_str(source));
+    v8::TryCatch try_catch(CcTest::isolate());
+    CHECK(v8::ScriptCompiler::CompileFunctionInContext(
+              env.local(), &script_source, 0, nullptr, 0, nullptr)
+              .IsEmpty());
+    CHECK(try_catch.HasCaught());
+  }
+  {
+    static const char* source = "{ let x; { var x } }";
+    v8::ScriptCompiler::Source script_source(v8_str(source));
+    v8::TryCatch try_catch(CcTest::isolate());
+    CHECK(v8::ScriptCompiler::CompileFunctionInContext(
+              env.local(), &script_source, 0, nullptr, 0, nullptr)
+              .IsEmpty());
+    CHECK(try_catch.HasCaught());
+  }
+}
 
 TEST(CompileFunctionInContextScriptOrigin) {
   CcTest::InitializeVM();
@@ -539,24 +640,24 @@
   v8::ScriptCompiler::Source script_source(v8_str("throw new Error()"), origin);
   v8::Local<v8::Function> fun =
       v8::ScriptCompiler::CompileFunctionInContext(env.local(), &script_source,
-                                                   0, NULL, 0, NULL)
+                                                   0, nullptr, 0, nullptr)
           .ToLocalChecked();
   CHECK(!fun.IsEmpty());
   v8::TryCatch try_catch(CcTest::isolate());
   CcTest::isolate()->SetCaptureStackTraceForUncaughtExceptions(true);
-  CHECK(fun->Call(env.local(), env->Global(), 0, NULL).IsEmpty());
+  CHECK(fun->Call(env.local(), env->Global(), 0, nullptr).IsEmpty());
   CHECK(try_catch.HasCaught());
   CHECK(!try_catch.Exception().IsEmpty());
   v8::Local<v8::StackTrace> stack =
       v8::Exception::GetStackTrace(try_catch.Exception());
   CHECK(!stack.IsEmpty());
-  CHECK(stack->GetFrameCount() > 0);
+  CHECK_GT(stack->GetFrameCount(), 0);
   v8::Local<v8::StackFrame> frame = stack->GetFrame(0);
   CHECK_EQ(23, frame->GetLineNumber());
   CHECK_EQ(42 + strlen("throw "), static_cast<unsigned>(frame->GetColumn()));
 }
 
-TEST(CompileFunctionInContextHarmonyFunctionToString) {
+void TestCompileFunctionInContextToStringImpl() {
 #define CHECK_NOT_CAUGHT(__local_context__, try_catch, __op__)                \
   do {                                                                        \
     const char* op = (__op__);                                                \
@@ -570,9 +671,7 @@
     }                                                                         \
   } while (0)
 
-  auto previous_flag = v8::internal::FLAG_harmony_function_tostring;
-  v8::internal::FLAG_harmony_function_tostring = true;
-  {
+  {  // NOLINT
     CcTest::InitializeVM();
     v8::HandleScope scope(CcTest::isolate());
     LocalContext env;
@@ -598,7 +697,8 @@
       v8::Local<v8::String> result =
           fun->ToString(env.local()).ToLocalChecked();
       v8::Local<v8::String> expected = v8_str(
-          "function(event){return event\n"
+          "function (event) {\n"
+          "return event\n"
           "}");
       CHECK(expected->Equals(env.local(), result).FromJust());
     }
@@ -622,16 +722,52 @@
       v8::Local<v8::String> result =
           fun->ToString(env.local()).ToLocalChecked();
       v8::Local<v8::String> expected = v8_str(
-          "function(){return 0\n"
+          "function () {\n"
+          "return 0\n"
+          "}");
+      CHECK(expected->Equals(env.local(), result).FromJust());
+    }
+
+    // With a name:
+    {
+      v8::ScriptOrigin origin(v8_str("test"), v8_int(17), v8_int(31));
+      v8::ScriptCompiler::Source script_source(v8_str("return 0"), origin);
+
+      v8::TryCatch try_catch(CcTest::isolate());
+      v8::MaybeLocal<v8::Function> maybe_fun =
+          v8::ScriptCompiler::CompileFunctionInContext(
+              env.local(), &script_source, 0, nullptr, 0, nullptr);
+
+      CHECK_NOT_CAUGHT(env.local(), try_catch,
+                       "v8::ScriptCompiler::CompileFunctionInContext");
+
+      v8::Local<v8::Function> fun = maybe_fun.ToLocalChecked();
+      CHECK(!fun.IsEmpty());
+      CHECK(!try_catch.HasCaught());
+
+      fun->SetName(v8_str("onclick"));
+
+      v8::Local<v8::String> result =
+          fun->ToString(env.local()).ToLocalChecked();
+      v8::Local<v8::String> expected = v8_str(
+          "function onclick() {\n"
+          "return 0\n"
           "}");
       CHECK(expected->Equals(env.local(), result).FromJust());
     }
   }
-  v8::internal::FLAG_harmony_function_tostring = previous_flag;
-
 #undef CHECK_NOT_CAUGHT
 }
 
+TEST(CompileFunctionInContextHarmonyFunctionToString) {
+  v8::internal::FLAG_harmony_function_tostring = true;
+  TestCompileFunctionInContextToStringImpl();
+}
+
+TEST(CompileFunctionInContextFunctionToString) {
+  TestCompileFunctionInContextToStringImpl();
+}
+
 TEST(InvocationCount) {
   FLAG_allow_natives_syntax = true;
   FLAG_always_opt = false;
diff --git a/src/v8/test/cctest/test-conversions.cc b/src/v8/test/cctest/test-conversions.cc
index db080d2..e306eb9 100644
--- a/src/v8/test/cctest/test-conversions.cc
+++ b/src/v8/test/cctest/test-conversions.cc
@@ -29,16 +29,9 @@
 
 #include "src/base/platform/platform.h"
 #include "src/conversions.h"
-#include "src/factory.h"
+#include "src/factory-inl.h"
 #include "src/isolate.h"
-// FIXME(mstarzinger, marja): This is weird, but required because of the missing
-// (disallowed) include: src/factory.h -> src/objects-inl.h
-#include "src/objects-inl.h"
 #include "src/objects.h"
-// FIXME(mstarzinger, marja): This is weird, but required because of the missing
-// (disallowed) include: src/feedback-vector.h ->
-// src/feedback-vector-inl.h
-#include "src/feedback-vector-inl.h"
 #include "src/unicode-cache.h"
 #include "src/v8.h"
 #include "test/cctest/cctest.h"
@@ -52,8 +45,8 @@
   CHECK_EQ(0.0, StringToDouble(&uc, "0X0", ALLOW_HEX | ALLOW_IMPLICIT_OCTAL));
   CHECK_EQ(1.0, StringToDouble(&uc, "0x1", ALLOW_HEX | ALLOW_IMPLICIT_OCTAL));
   CHECK_EQ(16.0, StringToDouble(&uc, "0x10", ALLOW_HEX | ALLOW_IMPLICIT_OCTAL));
-  CHECK_EQ(255.0, StringToDouble(&uc, "0xff",
-                                 ALLOW_HEX | ALLOW_IMPLICIT_OCTAL));
+  CHECK_EQ(255.0,
+           StringToDouble(&uc, "0xFF", ALLOW_HEX | ALLOW_IMPLICIT_OCTAL));
   CHECK_EQ(175.0, StringToDouble(&uc, "0xAF",
                                  ALLOW_HEX | ALLOW_IMPLICIT_OCTAL));
 
@@ -61,7 +54,7 @@
   CHECK_EQ(0.0, StringToDouble(&uc, "0X0", ALLOW_HEX));
   CHECK_EQ(1.0, StringToDouble(&uc, "0x1", ALLOW_HEX));
   CHECK_EQ(16.0, StringToDouble(&uc, "0x10", ALLOW_HEX));
-  CHECK_EQ(255.0, StringToDouble(&uc, "0xff", ALLOW_HEX));
+  CHECK_EQ(255.0, StringToDouble(&uc, "0xFF", ALLOW_HEX));
   CHECK_EQ(175.0, StringToDouble(&uc, "0xAF", ALLOW_HEX));
 }
 
diff --git a/src/v8/test/cctest/test-cpu-profiler.cc b/src/v8/test/cctest/test-cpu-profiler.cc
index 2db377b..cd84789 100644
--- a/src/v8/test/cctest/test-cpu-profiler.cc
+++ b/src/v8/test/cctest/test-cpu-profiler.cc
@@ -83,17 +83,17 @@
 
 static void EnqueueTickSampleEvent(ProfilerEventsProcessor* proc,
                                    i::Address frame1,
-                                   i::Address frame2 = NULL,
-                                   i::Address frame3 = NULL) {
+                                   i::Address frame2 = nullptr,
+                                   i::Address frame3 = nullptr) {
   v8::TickSample* sample = proc->StartTickSample();
   sample->pc = frame1;
   sample->tos = frame1;
   sample->frames_count = 0;
-  if (frame2 != NULL) {
+  if (frame2 != nullptr) {
     sample->stack[0] = frame2;
     sample->frames_count = 1;
   }
-  if (frame3 != NULL) {
+  if (frame3 != nullptr) {
     sample->stack[1] = frame3;
     sample->frames_count = 2;
   }
@@ -151,11 +151,8 @@
 
   i::AbstractCode* aaa_code = CreateCode(&env);
   i::AbstractCode* comment_code = CreateCode(&env);
-  i::AbstractCode* args5_code = CreateCode(&env);
   i::AbstractCode* comment2_code = CreateCode(&env);
   i::AbstractCode* moved_code = CreateCode(&env);
-  i::AbstractCode* args3_code = CreateCode(&env);
-  i::AbstractCode* args4_code = CreateCode(&env);
 
   CpuProfilesCollection* profiles = new CpuProfilesCollection(isolate);
   ProfileGenerator* generator = new ProfileGenerator(profiles);
@@ -175,12 +172,9 @@
                                     *aaa_name);
   profiler_listener.CodeCreateEvent(i::Logger::BUILTIN_TAG, comment_code,
                                     "comment");
-  profiler_listener.CodeCreateEvent(i::Logger::STUB_TAG, args5_code, 5);
   profiler_listener.CodeCreateEvent(i::Logger::BUILTIN_TAG, comment2_code,
                                     "comment2");
   profiler_listener.CodeMoveEvent(comment2_code, moved_code->address());
-  profiler_listener.CodeCreateEvent(i::Logger::STUB_TAG, args3_code, 3);
-  profiler_listener.CodeCreateEvent(i::Logger::STUB_TAG, args4_code, 4);
 
   // Enqueue a tick event to enable code events processing.
   EnqueueTickSampleEvent(processor, aaa_code->address());
@@ -199,10 +193,6 @@
   CHECK(comment);
   CHECK_EQ(0, strcmp("comment", comment->name()));
 
-  CodeEntry* args5 = generator->code_map()->FindEntry(args5_code->address());
-  CHECK(args5);
-  CHECK_EQ(0, strcmp("5", args5->name()));
-
   CHECK(!generator->code_map()->FindEntry(comment2_code->address()));
 
   CodeEntry* comment2 = generator->code_map()->FindEntry(moved_code->address());
@@ -238,7 +228,7 @@
   profiler_listener.AddObserver(&profiler);
 
   profiler_listener.CodeCreateEvent(i::Logger::BUILTIN_TAG, frame1_code, "bbb");
-  profiler_listener.CodeCreateEvent(i::Logger::STUB_TAG, frame2_code, 5);
+  profiler_listener.CodeCreateEvent(i::Logger::STUB_TAG, frame2_code, "ccc");
   profiler_listener.CodeCreateEvent(i::Logger::BUILTIN_TAG, frame3_code, "ddd");
 
   EnqueueTickSampleEvent(processor, frame1_code->instruction_start());
@@ -264,7 +254,7 @@
   const std::vector<ProfileNode*>* top_down_bbb_children =
       top_down_root_children->back()->children();
   CHECK_EQ(1, top_down_bbb_children->size());
-  CHECK_EQ(0, strcmp("5", top_down_bbb_children->back()->entry()->name()));
+  CHECK_EQ(0, strcmp("ccc", top_down_bbb_children->back()->entry()->name()));
   const std::vector<ProfileNode*>* top_down_stub_children =
       top_down_bbb_children->back()->children();
   CHECK_EQ(1, top_down_stub_children->size());
@@ -486,6 +476,13 @@
   return profile;
 }
 
+static unsigned TotalHitCount(const v8::CpuProfileNode* node) {
+  unsigned hit_count = node->GetHitCount();
+  for (int i = 0, count = node->GetChildrenCount(); i < count; ++i)
+    hit_count += TotalHitCount(node->GetChild(i));
+  return hit_count;
+}
+
 static const v8::CpuProfileNode* FindChild(v8::Local<v8::Context> context,
                                            const v8::CpuProfileNode* node,
                                            const char* name) {
@@ -497,19 +494,25 @@
       return child;
     }
   }
-  return NULL;
+  return nullptr;
 }
 
+static const v8::CpuProfileNode* FindChild(const v8::CpuProfileNode* node,
+                                           const char* name) {
+  for (int i = 0, count = node->GetChildrenCount(); i < count; ++i) {
+    const v8::CpuProfileNode* child = node->GetChild(i);
+    if (strcmp(child->GetFunctionNameStr(), name) == 0) {
+      return child;
+    }
+  }
+  return nullptr;
+}
 
 static const v8::CpuProfileNode* GetChild(v8::Local<v8::Context> context,
                                           const v8::CpuProfileNode* node,
                                           const char* name) {
   const v8::CpuProfileNode* result = FindChild(context, node, name);
-  if (!result) {
-    char buffer[100];
-    i::SNPrintF(i::ArrayVector(buffer), "Failed to GetChild: %s", name);
-    FATAL(buffer);
-  }
+  if (!result) FATAL("Failed to GetChild: %s", name);
   return result;
 }
 
@@ -1282,7 +1285,7 @@
   v8::Local<v8::Function> function = GetFunction(env, "start");
 
   v8::Local<v8::String> profile_name = v8_str("my_profile");
-  function->Call(env, env->Global(), 0, NULL).ToLocalChecked();
+  function->Call(env, env->Global(), 0, nullptr).ToLocalChecked();
   v8::CpuProfile* profile = helper.profiler()->StopProfiling(profile_name);
   CHECK(profile);
   // Dump collected profile to have a better diagnostic in case of failure.
@@ -1483,7 +1486,7 @@
     "}";
 
 static void CallCollectSample(const v8::FunctionCallbackInfo<v8::Value>& info) {
-  i::ProfilerExtension::profiler()->CollectSample();
+  v8::CpuProfiler::CollectSample(info.GetIsolate());
 }
 
 TEST(CollectSampleAPI) {
@@ -1615,7 +1618,7 @@
   v8::Local<v8::Function> function = GetFunction(env, "start");
 
   v8::Local<v8::String> profile_name = v8_str("my_profile");
-  function->Call(env, env->Global(), 0, NULL).ToLocalChecked();
+  function->Call(env, env->Global(), 0, nullptr).ToLocalChecked();
   v8::CpuProfile* profile = helper.profiler()->StopProfiling(profile_name);
   CHECK(profile);
   // Dump collected profile to have a better diagnostic in case of failure.
@@ -1738,6 +1741,85 @@
                        script_a->GetUnboundScript()->GetId(), 5, 14);
 }
 
+TEST(FunctionDetailsInlining) {
+  if (!CcTest::i_isolate()->use_optimizer() || i::FLAG_always_opt) return;
+  i::FLAG_allow_natives_syntax = true;
+  v8::HandleScope scope(CcTest::isolate());
+  v8::Local<v8::Context> env = CcTest::NewContext(PROFILER_EXTENSION);
+  v8::Context::Scope context_scope(env);
+  ProfilerHelper helper(env);
+
+  // alpha is in a_script, beta in b_script. beta is
+  // inlined in alpha, but it should be attributed to b_script.
+
+  v8::Local<v8::Script> script_b = CompileWithOrigin(
+      "function beta(k) {\n"
+      "  let sum = 2;\n"
+      "  for(let i = 0; i < k; i ++) {\n"
+      "    sum += i;\n"
+      "    sum = sum + 'a';\n"
+      "  }\n"
+      "  return sum;\n"
+      "}\n"
+      "\n",
+      "script_b");
+
+  v8::Local<v8::Script> script_a = CompileWithOrigin(
+      "function alpha(p) {\n"
+      "  let res = beta(p);\n"
+      "  res = res + res;\n"
+      "  return res;\n"
+      "}\n"
+      "let p = 2;\n"
+      "\n"
+      "\n"
+      "// Warm up before profiling or the inlining doesn't happen.\n"
+      "p = alpha(p);\n"
+      "p = alpha(p);\n"
+      "%OptimizeFunctionOnNextCall(alpha);\n"
+      "p = alpha(p);\n"
+      "\n"
+      "\n"
+      "startProfiling();\n"
+      "for(let i = 0; i < 10000; i++) {\n"
+      "  p = alpha(p);\n"
+      "}\n"
+      "stopProfiling();\n"
+      "\n"
+      "\n",
+      "script_a");
+
+  script_b->Run(env).ToLocalChecked();
+  script_a->Run(env).ToLocalChecked();
+
+  const v8::CpuProfile* profile = i::ProfilerExtension::last_profile;
+  const v8::CpuProfileNode* current = profile->GetTopDownRoot();
+  reinterpret_cast<ProfileNode*>(const_cast<v8::CpuProfileNode*>(current))
+      ->Print(0);
+  //   The tree should look like this:
+  //  0  (root) 0 #1
+  //  5    (program) 0 #6
+  //  2     14 #2 script_a:1
+  //    ;;; deopted at script_id: 14 position: 299 with reason 'Insufficient
+  //    type feedback for call'.
+  //  1      alpha 14 #4 script_a:1
+  //  9        beta 13 #5 script_b:0
+  //  0      startProfiling 0 #3
+
+  const v8::CpuProfileNode* root = profile->GetTopDownRoot();
+  const v8::CpuProfileNode* script = GetChild(env, root, "");
+  CheckFunctionDetails(env->GetIsolate(), script, "", "script_a",
+                       script_a->GetUnboundScript()->GetId(), 1, 1);
+  const v8::CpuProfileNode* alpha = FindChild(env, script, "alpha");
+  // Return early if profiling didn't sample alpha.
+  if (!alpha) return;
+  CheckFunctionDetails(env->GetIsolate(), alpha, "alpha", "script_a",
+                       script_a->GetUnboundScript()->GetId(), 1, 15);
+  const v8::CpuProfileNode* beta = FindChild(env, alpha, "beta");
+  if (!beta) return;
+  CheckFunctionDetails(env->GetIsolate(), beta, "beta", "script_b",
+                       script_b->GetUnboundScript()->GetId(), 0, 0);
+}
 
 TEST(DontStopOnFinishedProfileDelete) {
   v8::HandleScope scope(CcTest::isolate());
@@ -1760,14 +1842,14 @@
   CHECK(inner_profile);
   CHECK_EQ(1, iprofiler->GetProfilesCount());
   inner_profile->Delete();
-  inner_profile = NULL;
+  inner_profile = nullptr;
   CHECK_EQ(0, iprofiler->GetProfilesCount());
 
   v8::CpuProfile* outer_profile = profiler->StopProfiling(outer);
   CHECK(outer_profile);
   CHECK_EQ(1, iprofiler->GetProfilesCount());
   outer_profile->Delete();
-  outer_profile = NULL;
+  outer_profile = nullptr;
   CHECK_EQ(0, iprofiler->GetProfilesCount());
   profiler->Dispose();
 }
@@ -1777,7 +1859,7 @@
                                  i::CpuProfile* iprofile, const char* branch[],
                                  int length) {
   v8::CpuProfile* profile = reinterpret_cast<v8::CpuProfile*>(iprofile);
-  const ProfileNode* iopt_function = NULL;
+  const ProfileNode* iopt_function = nullptr;
   iopt_function = GetSimpleBranch(context, profile, branch, length);
   CHECK_EQ(1U, iopt_function->deopt_infos().size());
   return iopt_function->deopt_infos()[0].deopt_reason;
@@ -1872,7 +1954,7 @@
         GetBranchDeoptReason(env, iprofile, branch, arraysize(branch));
     if (deopt_reason != reason(i::DeoptimizeReason::kNotAHeapNumber) &&
         deopt_reason != reason(i::DeoptimizeReason::kNotASmi)) {
-      FATAL(deopt_reason);
+      FATAL("%s", deopt_reason);
     }
   }
   {
@@ -1882,7 +1964,7 @@
     if (deopt_reason != reason(i::DeoptimizeReason::kNaN) &&
         deopt_reason != reason(i::DeoptimizeReason::kLostPrecisionOrNaN) &&
         deopt_reason != reason(i::DeoptimizeReason::kNotASmi)) {
-      FATAL(deopt_reason);
+      FATAL("%s", deopt_reason);
     }
   }
   {
@@ -2141,17 +2223,19 @@
 
 TEST(TracingCpuProfiler) {
   v8::Platform* old_platform = i::V8::GetCurrentPlatform();
-  v8::Platform* default_platform = v8::platform::CreateDefaultPlatform();
-  i::V8::SetPlatformForTesting(default_platform);
+  std::unique_ptr<v8::Platform> default_platform =
+      v8::platform::NewDefaultPlatform();
+  i::V8::SetPlatformForTesting(default_platform.get());
 
-  v8::platform::tracing::TracingController tracing_controller;
-  static_cast<v8::platform::DefaultPlatform*>(default_platform)
-      ->SetTracingController(&tracing_controller);
+  auto tracing = base::make_unique<v8::platform::tracing::TracingController>();
+  v8::platform::tracing::TracingController* tracing_controller = tracing.get();
+  static_cast<v8::platform::DefaultPlatform*>(default_platform.get())
+      ->SetTracingController(std::move(tracing));
 
   CpuProfileEventChecker* event_checker = new CpuProfileEventChecker();
   TraceBuffer* ring_buffer =
       TraceBuffer::CreateTraceBufferRingBuffer(1, event_checker);
-  tracing_controller.Initialize(ring_buffer);
+  tracing_controller->Initialize(ring_buffer);
   TraceConfig* trace_config = new TraceConfig();
   trace_config->AddIncludedCategory(
       TRACE_DISABLED_BY_DEFAULT("v8.cpu_profiler"));
@@ -2159,10 +2243,10 @@
   LocalContext env;
   v8::HandleScope scope(env->GetIsolate());
   {
-    tracing_controller.StartTracing(trace_config);
+    tracing_controller->StartTracing(trace_config);
     auto profiler = v8::TracingCpuProfiler::Create(env->GetIsolate());
     CompileRun("function foo() { } foo();");
-    tracing_controller.StopTracing();
+    tracing_controller->StopTracing();
     CompileRun("function bar() { } bar();");
   }
 
@@ -2185,6 +2269,171 @@
   i::V8::SetPlatformForTesting(old_platform);
 }
 
+TEST(Issue763073) {
+  class AllowNativesSyntax {
+   public:
+    AllowNativesSyntax()
+        : allow_natives_syntax_(i::FLAG_allow_natives_syntax),
+          trace_deopt_(i::FLAG_trace_deopt) {
+      i::FLAG_allow_natives_syntax = true;
+      i::FLAG_trace_deopt = true;
+    }
+
+    ~AllowNativesSyntax() {
+      i::FLAG_allow_natives_syntax = allow_natives_syntax_;
+      i::FLAG_trace_deopt = trace_deopt_;
+    }
+
+   private:
+    bool allow_natives_syntax_;
+    bool trace_deopt_;
+  };
+
+  AllowNativesSyntax allow_natives_syntax_scope;
+  LocalContext env;
+  v8::HandleScope scope(env->GetIsolate());
+
+  CompileRun(
+      "function f() { return function g(x) { }; }"
+      // Create first closure, optimize it, and deoptimize it.
+      "var g = f();"
+      "g(1);"
+      "%OptimizeFunctionOnNextCall(g);"
+      "g(1);"
+      "%DeoptimizeFunction(g);"
+      // Create second closure, and optimize it. This will create another
+      // optimized code object and put in the (shared) type feedback vector.
+      "var h = f();"
+      "h(1);"
+      "%OptimizeFunctionOnNextCall(h);"
+      "h(1);");
+
+  // Start profiling.
+  v8::CpuProfiler* cpu_profiler = v8::CpuProfiler::New(env->GetIsolate());
+  v8::Local<v8::String> profile_name = v8_str("test");
+
+  // Here we test that the heap iteration upon profiling start is not
+  // confused by having a deoptimized code object for a closure while
+  // having a different optimized code object in the type feedback vector.
+  cpu_profiler->StartProfiling(profile_name);
+  v8::CpuProfile* p = cpu_profiler->StopProfiling(profile_name);
+  p->Delete();
+  cpu_profiler->Dispose();
+}
+
+static const char* js_collect_sample_api_source =
+    "%NeverOptimizeFunction(start);\n"
+    "function start() {\n"
+    "  CallStaticCollectSample();\n"
+    "}";
+
+static void CallStaticCollectSample(
+    const v8::FunctionCallbackInfo<v8::Value>& info) {
+  v8::CpuProfiler::CollectSample(info.GetIsolate());
+}
+
+TEST(StaticCollectSampleAPI) {
+  i::FLAG_allow_natives_syntax = true;
+  LocalContext env;
+  v8::HandleScope scope(env->GetIsolate());
+
+  v8::Local<v8::FunctionTemplate> func_template =
+      v8::FunctionTemplate::New(env->GetIsolate(), CallStaticCollectSample);
+  v8::Local<v8::Function> func =
+      func_template->GetFunction(env.local()).ToLocalChecked();
+  func->SetName(v8_str("CallStaticCollectSample"));
+  env->Global()
+      ->Set(env.local(), v8_str("CallStaticCollectSample"), func)
+      .FromJust();
+
+  CompileRun(js_collect_sample_api_source);
+  v8::Local<v8::Function> function = GetFunction(env.local(), "start");
+
+  ProfilerHelper helper(env.local());
+  v8::CpuProfile* profile = helper.Run(function, nullptr, 0, 100);
+
+  const v8::CpuProfileNode* root = profile->GetTopDownRoot();
+  const v8::CpuProfileNode* start_node = GetChild(env.local(), root, "start");
+  GetChild(env.local(), start_node, "CallStaticCollectSample");
+
+  profile->Delete();
+}
+
+TEST(CodeEntriesMemoryLeak) {
+  v8::HandleScope scope(CcTest::isolate());
+  v8::Local<v8::Context> env = CcTest::NewContext(PROFILER_EXTENSION);
+  v8::Context::Scope context_scope(env);
+
+  std::string source = "function start() {}\n";
+  for (int i = 0; i < 1000; ++i) {
+    source += "function foo" + std::to_string(i) + "() { return " +
+              std::to_string(i) +
+              "; }\n"
+              "foo" +
+              std::to_string(i) + "();\n";
+  }
+  CompileRun(source.c_str());
+  v8::Local<v8::Function> function = GetFunction(env, "start");
+
+  ProfilerHelper helper(env);
+
+  for (int j = 0; j < 100; ++j) {
+    v8::CpuProfile* profile = helper.Run(function, nullptr, 0);
+    profile->Delete();
+  }
+  ProfilerListener* profiler_listener =
+      CcTest::i_isolate()->logger()->profiler_listener();
+
+  CHECK_GE(10000ul, profiler_listener->entries_count_for_test());
+}
+
+TEST(NativeFrameStackTrace) {
+  // A test for issue https://crbug.com/768540
+  // When a sample lands in a native function which has not EXIT frame
+  // stack frame iterator used to bail out and produce an empty stack trace.
+  // The source code below makes v8 call the
+  // v8::internal::StringTable::LookupStringIfExists_NoAllocate native function
+  // without producing an EXIT frame.
+  v8::HandleScope scope(CcTest::isolate());
+  v8::Local<v8::Context> env = CcTest::NewContext(PROFILER_EXTENSION);
+  v8::Context::Scope context_scope(env);
+
+  const char* source = R"(
+      function jsFunction() {
+        var s = {};
+        for (var i = 0; i < 1e4; ++i) {
+          for (var j = 0; j < 100; j++) {
+            s['item' + j] = 'alph';
+          }
+        }
+      })";
+
+  CompileRun(source);
+  v8::Local<v8::Function> function = GetFunction(env, "jsFunction");
+
+  ProfilerHelper helper(env);
+
+  v8::CpuProfile* profile = helper.Run(function, nullptr, 0, 100, 0, true);
+
+  // Count the fraction of samples landing in 'jsFunction' (valid stack)
+  // vs '(program)' (no stack captured).
+  const v8::CpuProfileNode* root = profile->GetTopDownRoot();
+  const v8::CpuProfileNode* js_function = FindChild(root, "jsFunction");
+  const v8::CpuProfileNode* program = FindChild(root, "(program)");
+  if (program) {
+    unsigned js_function_samples = TotalHitCount(js_function);
+    unsigned program_samples = TotalHitCount(program);
+    double valid_samples_ratio =
+        1. * js_function_samples / (js_function_samples + program_samples);
+    i::PrintF("Ratio: %f\n", valid_samples_ratio);
+    // TODO(alph): Investigate other causes of dropped frames. The ratio
+    // should be close to 99%.
+    CHECK_GE(valid_samples_ratio, 0.3);
+  }
+
+  profile->Delete();
+}
+
 }  // namespace test_cpu_profiler
 }  // namespace internal
 }  // namespace v8
diff --git a/src/v8/test/cctest/test-date.cc b/src/v8/test/cctest/test-date.cc
index c67d201..444d5a7 100644
--- a/src/v8/test/cctest/test-date.cc
+++ b/src/v8/test/cctest/test-date.cc
@@ -50,7 +50,7 @@
     int year, month, day;
     YearMonthDayFromDays(days, &year, &month, &day);
     Rule* rule = FindRuleFor(year, month, day, time_in_day_sec);
-    return rule == NULL ? 0 : rule->offset_sec * 1000;
+    return rule == nullptr ? 0 : rule->offset_sec * 1000;
   }
 
 
@@ -60,7 +60,7 @@
 
  private:
   Rule* FindRuleFor(int year, int month, int day, int time_in_day_sec) {
-    Rule* result = NULL;
+    Rule* result = nullptr;
     for (int i = 0; i < rules_count_; i++)
       if (Match(&rules_[i], year, month, day, time_in_day_sec)) {
         result = &rules_[i];
diff --git a/src/v8/test/cctest/test-debug.cc b/src/v8/test/cctest/test-debug.cc
index 794bc9c..dd93a7e 100644
--- a/src/v8/test/cctest/test-debug.cc
+++ b/src/v8/test/cctest/test-debug.cc
@@ -37,6 +37,7 @@
 #include "src/deoptimizer.h"
 #include "src/frames.h"
 #include "src/objects-inl.h"
+#include "src/snapshot/snapshot.h"
 #include "src/utils.h"
 #include "test/cctest/cctest.h"
 
@@ -389,7 +390,8 @@
 
   // Iterate the heap and check that there are no debugger related objects left.
   HeapIterator iterator(CcTest::heap());
-  for (HeapObject* obj = iterator.next(); obj != NULL; obj = iterator.next()) {
+  for (HeapObject* obj = iterator.next(); obj != nullptr;
+       obj = iterator.next()) {
     CHECK(!obj->IsDebugInfo());
   }
 }
@@ -615,7 +617,7 @@
     v8::Local<v8::Function> fun = v8::Local<v8::Function>::Cast(
         event_data->Get(context, fun_name).ToLocalChecked());
     v8::Local<v8::Value> result =
-        fun->Call(context, event_data, 0, NULL).ToLocalChecked();
+        fun->Call(context, event_data, 0, nullptr).ToLocalChecked();
     if (result->IsTrue()) {
       uncaught_exception_hit_count++;
     }
@@ -635,7 +637,7 @@
   // Run callback from DebugEventListener and check the result.
   if (!debug_event_listener_callback.IsEmpty()) {
     v8::Local<v8::Value> result =
-        debug_event_listener_callback->Call(context, event_data, 0, NULL)
+        debug_event_listener_callback->Call(context, event_data, 0, nullptr)
             .ToLocalChecked();
     CHECK(!result.IsEmpty());
     CHECK_EQ(debug_event_listener_callback_result,
@@ -659,7 +661,7 @@
 
 
 // Array of checks to do.
-struct EvaluateCheck* checks = NULL;
+struct EvaluateCheck* checks = nullptr;
 // Source for The JavaScript function which can do the evaluation when a break
 // point is hit.
 const char* evaluate_check_source =
@@ -681,7 +683,7 @@
 
   if (event == v8::Break) {
     break_point_hit_count++;
-    for (int i = 0; checks[i].expr != NULL; i++) {
+    for (int i = 0; checks[i].expr != nullptr; i++) {
       const int argc = 3;
       v8::Local<v8::String> string = v8_str(isolate, checks[i].expr);
       v8::Local<v8::Value> argv[argc] = {exec_state, string,
@@ -742,7 +744,7 @@
 
 // String containing the expected function call sequence. Note: this only works
 // if functions have name length of one.
-const char* expected_step_sequence = NULL;
+const char* expected_step_sequence = nullptr;
 
 // The actual debug event described by the longer comment above.
 static void DebugEventStepSequence(
@@ -928,19 +930,19 @@
       CompileFunction(&env, "function foo(){bar=0;}", "foo");
 
   // Run without breakpoints.
-  foo->Call(env.context(), env->Global(), 0, NULL).ToLocalChecked();
+  foo->Call(env.context(), env->Global(), 0, nullptr).ToLocalChecked();
   CHECK_EQ(0, break_point_hit_count);
 
   // Run with breakpoint
   int bp = SetBreakPoint(foo, 0);
-  foo->Call(env.context(), env->Global(), 0, NULL).ToLocalChecked();
+  foo->Call(env.context(), env->Global(), 0, nullptr).ToLocalChecked();
   CHECK_EQ(1, break_point_hit_count);
-  foo->Call(env.context(), env->Global(), 0, NULL).ToLocalChecked();
+  foo->Call(env.context(), env->Global(), 0, nullptr).ToLocalChecked();
   CHECK_EQ(2, break_point_hit_count);
 
   // Run without breakpoints.
   ClearBreakPoint(bp);
-  foo->Call(env.context(), env->Global(), 0, NULL).ToLocalChecked();
+  foo->Call(env.context(), env->Global(), 0, nullptr).ToLocalChecked();
   CHECK_EQ(2, break_point_hit_count);
 
   SetDebugEventListener(env->GetIsolate(), nullptr);
@@ -960,19 +962,19 @@
       CompileFunction(&env, "function foo(){var x=bar;}", "foo");
 
   // Run without breakpoints.
-  foo->Call(env.context(), env->Global(), 0, NULL).ToLocalChecked();
+  foo->Call(env.context(), env->Global(), 0, nullptr).ToLocalChecked();
   CHECK_EQ(0, break_point_hit_count);
 
   // Run with breakpoint.
   int bp = SetBreakPoint(foo, 0);
-  foo->Call(env.context(), env->Global(), 0, NULL).ToLocalChecked();
+  foo->Call(env.context(), env->Global(), 0, nullptr).ToLocalChecked();
   CHECK_EQ(1, break_point_hit_count);
-  foo->Call(env.context(), env->Global(), 0, NULL).ToLocalChecked();
+  foo->Call(env.context(), env->Global(), 0, nullptr).ToLocalChecked();
   CHECK_EQ(2, break_point_hit_count);
 
   // Run without breakpoints.
   ClearBreakPoint(bp);
-  foo->Call(env.context(), env->Global(), 0, NULL).ToLocalChecked();
+  foo->Call(env.context(), env->Global(), 0, nullptr).ToLocalChecked();
   CHECK_EQ(2, break_point_hit_count);
 
   SetDebugEventListener(env->GetIsolate(), nullptr);
@@ -991,19 +993,19 @@
       CompileFunction(&env, "function foo(){bar();}", "foo");
 
   // Run without breakpoints.
-  foo->Call(env.context(), env->Global(), 0, NULL).ToLocalChecked();
+  foo->Call(env.context(), env->Global(), 0, nullptr).ToLocalChecked();
   CHECK_EQ(0, break_point_hit_count);
 
   // Run with breakpoint
   int bp = SetBreakPoint(foo, 0);
-  foo->Call(env.context(), env->Global(), 0, NULL).ToLocalChecked();
+  foo->Call(env.context(), env->Global(), 0, nullptr).ToLocalChecked();
   CHECK_EQ(1, break_point_hit_count);
-  foo->Call(env.context(), env->Global(), 0, NULL).ToLocalChecked();
+  foo->Call(env.context(), env->Global(), 0, nullptr).ToLocalChecked();
   CHECK_EQ(2, break_point_hit_count);
 
   // Run without breakpoints.
   ClearBreakPoint(bp);
-  foo->Call(env.context(), env->Global(), 0, NULL).ToLocalChecked();
+  foo->Call(env.context(), env->Global(), 0, nullptr).ToLocalChecked();
   CHECK_EQ(2, break_point_hit_count);
 
   SetDebugEventListener(env->GetIsolate(), nullptr);
@@ -1023,7 +1025,7 @@
   v8::Local<v8::Context> context = env.context();
 
   // Run without breakpoints.
-  CHECK_EQ(1, foo->Call(context, env->Global(), 0, NULL)
+  CHECK_EQ(1, foo->Call(context, env->Global(), 0, nullptr)
                   .ToLocalChecked()
                   ->Int32Value(context)
                   .FromJust());
@@ -1031,12 +1033,12 @@
 
   // Run with breakpoint.
   int bp = SetBreakPoint(foo, 0);
-  CHECK_EQ(1, foo->Call(context, env->Global(), 0, NULL)
+  CHECK_EQ(1, foo->Call(context, env->Global(), 0, nullptr)
                   .ToLocalChecked()
                   ->Int32Value(context)
                   .FromJust());
   CHECK_EQ(1, break_point_hit_count);
-  CHECK_EQ(1, foo->Call(context, env->Global(), 0, NULL)
+  CHECK_EQ(1, foo->Call(context, env->Global(), 0, nullptr)
                   .ToLocalChecked()
                   ->Int32Value(context)
                   .FromJust());
@@ -1044,7 +1046,7 @@
 
   // Run without breakpoints.
   ClearBreakPoint(bp);
-  foo->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  foo->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
   CHECK_EQ(2, break_point_hit_count);
 
   SetDebugEventListener(env->GetIsolate(), nullptr);
@@ -1064,7 +1066,7 @@
   v8::Local<v8::Context> context = env.context();
 
   // Run without breakpoints.
-  CHECK_EQ(1, foo->Call(context, env->Global(), 0, NULL)
+  CHECK_EQ(1, foo->Call(context, env->Global(), 0, nullptr)
                   .ToLocalChecked()
                   ->Int32Value(context)
                   .FromJust());
@@ -1072,12 +1074,12 @@
 
   // Run with breakpoint.
   int bp = SetBreakPoint(foo, 0);
-  CHECK_EQ(1, foo->Call(context, env->Global(), 0, NULL)
+  CHECK_EQ(1, foo->Call(context, env->Global(), 0, nullptr)
                   .ToLocalChecked()
                   ->Int32Value(context)
                   .FromJust());
   CHECK_EQ(1, break_point_hit_count);
-  CHECK_EQ(1, foo->Call(context, env->Global(), 0, NULL)
+  CHECK_EQ(1, foo->Call(context, env->Global(), 0, nullptr)
                   .ToLocalChecked()
                   ->Int32Value(context)
                   .FromJust());
@@ -1085,7 +1087,7 @@
 
   // Run without breakpoints.
   ClearBreakPoint(bp);
-  foo->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  foo->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
   CHECK_EQ(2, break_point_hit_count);
 
   SetDebugEventListener(env->GetIsolate(), nullptr);
@@ -1114,23 +1116,23 @@
   v8::Local<v8::Context> context = env.context();
 
   // Run without breakpoints.
-  foo->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  foo->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
   CHECK_EQ(0, break_point_hit_count);
 
   // Run with breakpoint
   int bp = SetBreakPoint(foo, 0);
-  foo->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  foo->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
   CHECK_EQ(1, break_point_hit_count);
   CHECK_EQ(0, last_source_line);
   CHECK_EQ(15, last_source_column);
-  foo->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  foo->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
   CHECK_EQ(2, break_point_hit_count);
   CHECK_EQ(0, last_source_line);
   CHECK_EQ(15, last_source_column);
 
   // Run without breakpoints.
   ClearBreakPoint(bp);
-  foo->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  foo->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
   CHECK_EQ(2, break_point_hit_count);
 
   SetDebugEventListener(env->GetIsolate(), nullptr);
@@ -1144,7 +1146,7 @@
                                 int break_point_count, int call_count) {
   break_point_hit_count = 0;
   for (int i = 0; i < call_count; i++) {
-    f->Call(context, recv, 0, NULL).ToLocalChecked();
+    f->Call(context, recv, 0, nullptr).ToLocalChecked();
     CHECK_EQ((i + 1) * break_point_count, break_point_hit_count);
   }
 }
@@ -1198,17 +1200,17 @@
 
   for (int i = 0; i < 3; i++) {
     // Call function.
-    f->Call(context, recv, 0, NULL).ToLocalChecked();
+    f->Call(context, recv, 0, nullptr).ToLocalChecked();
     CHECK_EQ(1 + i * 3, break_point_hit_count);
 
     // Scavenge and call function.
     CcTest::CollectGarbage(v8::internal::NEW_SPACE);
-    f->Call(context, recv, 0, NULL).ToLocalChecked();
+    f->Call(context, recv, 0, nullptr).ToLocalChecked();
     CHECK_EQ(2 + i * 3, break_point_hit_count);
 
     // Mark sweep (and perhaps compact) and call function.
     CcTest::CollectAllGarbage();
-    f->Call(context, recv, 0, NULL).ToLocalChecked();
+    f->Call(context, recv, 0, nullptr).ToLocalChecked();
     CHECK_EQ(3 + i * 3, break_point_hit_count);
   }
 }
@@ -1371,33 +1373,33 @@
 
   // Call f and g without break points.
   break_point_hit_count = 0;
-  f->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  f->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
   CHECK_EQ(0, break_point_hit_count);
-  g->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  g->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
   CHECK_EQ(0, break_point_hit_count);
 
   // Call f and g with break point on line 12.
   int sbp1 = SetScriptBreakPointByNameFromJS(isolate, "test", 12, 0);
   break_point_hit_count = 0;
-  f->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  f->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
   CHECK_EQ(0, break_point_hit_count);
-  g->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  g->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
   CHECK_EQ(1, break_point_hit_count);
 
   // Remove the break point again.
   break_point_hit_count = 0;
   ClearBreakPointFromJS(env->GetIsolate(), sbp1);
-  f->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  f->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
   CHECK_EQ(0, break_point_hit_count);
-  g->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  g->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
   CHECK_EQ(0, break_point_hit_count);
 
   // Call f and g with break point on line 2.
   int sbp2 = SetScriptBreakPointByNameFromJS(env->GetIsolate(), "test", 2, 0);
   break_point_hit_count = 0;
-  f->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  f->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
   CHECK_EQ(1, break_point_hit_count);
-  g->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  g->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
   CHECK_EQ(2, break_point_hit_count);
 
   // Call f and g with break point on line 2, 4, 12, 14 and 15.
@@ -1406,9 +1408,9 @@
   int sbp5 = SetScriptBreakPointByNameFromJS(isolate, "test", 14, 0);
   int sbp6 = SetScriptBreakPointByNameFromJS(isolate, "test", 15, 0);
   break_point_hit_count = 0;
-  f->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  f->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
   CHECK_EQ(2, break_point_hit_count);
-  g->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  g->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
   CHECK_EQ(7, break_point_hit_count);
 
   // Remove all the break points again.
@@ -1418,9 +1420,9 @@
   ClearBreakPointFromJS(isolate, sbp4);
   ClearBreakPointFromJS(isolate, sbp5);
   ClearBreakPointFromJS(isolate, sbp6);
-  f->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  f->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
   CHECK_EQ(0, break_point_hit_count);
-  g->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  g->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
   CHECK_EQ(0, break_point_hit_count);
 
   SetDebugEventListener(isolate, nullptr);
@@ -1480,33 +1482,33 @@
 
   // Call f and g without break points.
   break_point_hit_count = 0;
-  f->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  f->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
   CHECK_EQ(0, break_point_hit_count);
-  g->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  g->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
   CHECK_EQ(0, break_point_hit_count);
 
   // Call f and g with break point on line 12.
   int sbp1 = SetScriptBreakPointByIdFromJS(env->GetIsolate(), script_id, 12, 0);
   break_point_hit_count = 0;
-  f->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  f->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
   CHECK_EQ(0, break_point_hit_count);
-  g->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  g->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
   CHECK_EQ(1, break_point_hit_count);
 
   // Remove the break point again.
   break_point_hit_count = 0;
   ClearBreakPointFromJS(env->GetIsolate(), sbp1);
-  f->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  f->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
   CHECK_EQ(0, break_point_hit_count);
-  g->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  g->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
   CHECK_EQ(0, break_point_hit_count);
 
   // Call f and g with break point on line 2.
   int sbp2 = SetScriptBreakPointByIdFromJS(env->GetIsolate(), script_id, 2, 0);
   break_point_hit_count = 0;
-  f->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  f->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
   CHECK_EQ(1, break_point_hit_count);
-  g->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  g->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
   CHECK_EQ(2, break_point_hit_count);
 
   // Call f and g with break point on line 2, 4, 12, 14 and 15.
@@ -1515,9 +1517,9 @@
   int sbp5 = SetScriptBreakPointByIdFromJS(env->GetIsolate(), script_id, 14, 0);
   int sbp6 = SetScriptBreakPointByIdFromJS(env->GetIsolate(), script_id, 15, 0);
   break_point_hit_count = 0;
-  f->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  f->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
   CHECK_EQ(2, break_point_hit_count);
-  g->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  g->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
   CHECK_EQ(7, break_point_hit_count);
 
   // Remove all the break points again.
@@ -1527,9 +1529,9 @@
   ClearBreakPointFromJS(env->GetIsolate(), sbp4);
   ClearBreakPointFromJS(env->GetIsolate(), sbp5);
   ClearBreakPointFromJS(env->GetIsolate(), sbp6);
-  f->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  f->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
   CHECK_EQ(0, break_point_hit_count);
-  g->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  g->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
   CHECK_EQ(0, break_point_hit_count);
 
   SetDebugEventListener(isolate, nullptr);
@@ -1575,19 +1577,19 @@
 
   // Call f while enabeling and disabling the script break point.
   break_point_hit_count = 0;
-  f->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  f->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
   CHECK_EQ(1, break_point_hit_count);
 
   DisableScriptBreakPointFromJS(isolate, sbp);
-  f->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  f->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
   CHECK_EQ(1, break_point_hit_count);
 
   EnableScriptBreakPointFromJS(isolate, sbp);
-  f->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  f->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
   CHECK_EQ(2, break_point_hit_count);
 
   DisableScriptBreakPointFromJS(isolate, sbp);
-  f->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  f->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
   CHECK_EQ(2, break_point_hit_count);
 
   SetDebugEventListener(isolate, nullptr);
@@ -1631,18 +1633,18 @@
   // Call f with different conditions on the script break point.
   break_point_hit_count = 0;
   ChangeScriptBreakPointConditionFromJS(env->GetIsolate(), sbp1, "false");
-  f->Call(env.context(), env->Global(), 0, NULL).ToLocalChecked();
+  f->Call(env.context(), env->Global(), 0, nullptr).ToLocalChecked();
   CHECK_EQ(0, break_point_hit_count);
 
   ChangeScriptBreakPointConditionFromJS(env->GetIsolate(), sbp1, "true");
   break_point_hit_count = 0;
-  f->Call(env.context(), env->Global(), 0, NULL).ToLocalChecked();
+  f->Call(env.context(), env->Global(), 0, nullptr).ToLocalChecked();
   CHECK_EQ(1, break_point_hit_count);
 
   ChangeScriptBreakPointConditionFromJS(env->GetIsolate(), sbp1, "x % 2 == 0");
   break_point_hit_count = 0;
   for (int i = 0; i < 10; i++) {
-    f->Call(env.context(), env->Global(), 0, NULL).ToLocalChecked();
+    f->Call(env.context(), env->Global(), 0, nullptr).ToLocalChecked();
   }
   CHECK_EQ(5, break_point_hit_count);
 
@@ -1697,9 +1699,9 @@
 
   // Call f and g and check that the script break point is active.
   break_point_hit_count = 0;
-  f->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  f->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
   CHECK_EQ(1, break_point_hit_count);
-  g->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  g->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
   CHECK_EQ(2, break_point_hit_count);
 
   // Clear the script break point.
@@ -1707,9 +1709,9 @@
 
   // Call f and g and check that the script break point is no longer active.
   break_point_hit_count = 0;
-  f->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  f->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
   CHECK_EQ(0, break_point_hit_count);
-  g->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  g->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
   CHECK_EQ(0, break_point_hit_count);
 
   // Set script break point with the scripts loaded.
@@ -1717,9 +1719,9 @@
 
   // Call f and g and check that the script break point is active.
   break_point_hit_count = 0;
-  f->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  f->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
   CHECK_EQ(1, break_point_hit_count);
-  g->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  g->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
   CHECK_EQ(2, break_point_hit_count);
 
   SetDebugEventListener(env->GetIsolate(), nullptr);
@@ -1767,7 +1769,7 @@
 
   // Call f and check that the script break point is active.
   break_point_hit_count = 0;
-  f->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  f->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
   CHECK_EQ(2, break_point_hit_count);
 
   // Clear the script break points.
@@ -1776,7 +1778,7 @@
 
   // Call f and check that no script break points are active.
   break_point_hit_count = 0;
-  f->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  f->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
   CHECK_EQ(0, break_point_hit_count);
 
   // Set a script break point with the script loaded.
@@ -1784,7 +1786,7 @@
 
   // Call f and check that the script break point is active.
   break_point_hit_count = 0;
-  f->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  f->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
   CHECK_EQ(1, break_point_hit_count);
 
   SetDebugEventListener(env->GetIsolate(), nullptr);
@@ -1854,12 +1856,12 @@
   CHECK_EQ(0, StrLength(last_function_hit));
 
   // Call f and check that the script break point.
-  f->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  f->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
   CHECK_EQ(2, break_point_hit_count);
   CHECK_EQ(0, strcmp("f", last_function_hit));
 
   // Call g and check that the script break point.
-  g->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  g->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
   CHECK_EQ(3, break_point_hit_count);
   CHECK_EQ(0, strcmp("g", last_function_hit));
 
@@ -1869,7 +1871,7 @@
       SetScriptBreakPointByNameFromJS(env->GetIsolate(), "test.html", 6, -1);
 
   // Call g and check that the script break point in h is hit.
-  g->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  g->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
   CHECK_EQ(4, break_point_hit_count);
   CHECK_EQ(0, strcmp("h", last_function_hit));
 
@@ -1881,8 +1883,8 @@
   int sbp5 =
       SetScriptBreakPointByNameFromJS(env->GetIsolate(), "test.html", 4, -1);
   break_point_hit_count = 0;
-  f->Call(context, env->Global(), 0, NULL).ToLocalChecked();
-  g->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  f->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
+  g->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
   CHECK_EQ(0, break_point_hit_count);
 
   // Set a break point in the code after the last function decleration.
@@ -1937,7 +1939,7 @@
 
   // Call f and check that there was no break points.
   break_point_hit_count = 0;
-  f->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  f->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
   CHECK_EQ(0, break_point_hit_count);
 
   // Recompile and run script and check that break point was not reapplied.
@@ -1998,11 +2000,11 @@
   debug_event_remove_break_point = SetBreakPoint(foo, 0);
 
   break_point_hit_count = 0;
-  foo->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  foo->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
   CHECK_EQ(1, break_point_hit_count);
 
   break_point_hit_count = 0;
-  foo->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  foo->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
   CHECK_EQ(0, break_point_hit_count);
 
   SetDebugEventListener(env->GetIsolate(), nullptr);
@@ -2037,11 +2039,11 @@
           .ToLocalChecked());
 
   // Run function with debugger statement
-  bar->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  bar->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
   CHECK_EQ(1, break_point_hit_count);
 
   // Run function with two debugger statement
-  foo->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  foo->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
   CHECK_EQ(3, break_point_hit_count);
 
   SetDebugEventListener(env->GetIsolate(), nullptr);
@@ -2067,13 +2069,13 @@
             .ToLocalChecked());
 
     // The debugger statement triggers breakpoint hit
-    foo->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+    foo->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
     CHECK_EQ(1, break_point_hit_count);
 
     int bp = SetBreakPoint(foo, 0);
 
     // Set breakpoint does not duplicate hits
-    foo->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+    foo->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
     CHECK_EQ(2, break_point_hit_count);
 
     ClearBreakPoint(bp);
@@ -2101,15 +2103,15 @@
   // d = Hello, world!).
   struct EvaluateCheck checks_uu[] = {{"x", v8::Undefined(isolate)},
                                       {"a", v8::Undefined(isolate)},
-                                      {NULL, v8::Local<v8::Value>()}};
+                                      {nullptr, v8::Local<v8::Value>()}};
   struct EvaluateCheck checks_hu[] = {
       {"x", v8_str(env->GetIsolate(), "Hello, world!")},
       {"a", v8::Undefined(isolate)},
-      {NULL, v8::Local<v8::Value>()}};
+      {nullptr, v8::Local<v8::Value>()}};
   struct EvaluateCheck checks_hh[] = {
       {"x", v8_str(env->GetIsolate(), "Hello, world!")},
       {"a", v8_str(env->GetIsolate(), "Hello, world!")},
-      {NULL, v8::Local<v8::Value>()}};
+      {nullptr, v8::Local<v8::Value>()}};
 
   // Simple test function. The "y=0" is in the function foo to provide a break
   // location. For "y=0" the "y" is at position 15 in the foo function
@@ -2134,7 +2136,7 @@
   // Call foo with breakpoint set before a=x and undefined as parameter.
   int bp = SetBreakPoint(foo, foo_break_position_1);
   checks = checks_uu;
-  foo->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  foo->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
 
   // Call foo with breakpoint set before a=x and parameter "Hello, world!".
   checks = checks_hu;
@@ -2250,7 +2252,7 @@
 
   debugEventCount = 0;
   env->AllowCodeGenerationFromStrings(false);
-  foo->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  foo->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
   CHECK_EQ(1, debugEventCount);
 
   SetDebugEventListener(env->GetIsolate(), nullptr);
@@ -2314,7 +2316,7 @@
     "checkFrameEval");
   debugEventCount = 0;
   env->AllowCodeGenerationFromStrings(false);
-  foo->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  foo->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
   CHECK_EQ(1, debugEventCount);
 
   checkGlobalEvalFunction.Clear();
@@ -2345,7 +2347,7 @@
   step_action = StepIn;
   break_point_hit_count = 0;
   v8::Local<v8::Context> context = env.context();
-  foo->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  foo->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
 
   // With stepping all break locations are hit.
   CHECK_EQ(4, break_point_hit_count);
@@ -2358,7 +2360,7 @@
 
   SetBreakPoint(foo, 3);
   break_point_hit_count = 0;
-  foo->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  foo->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
 
   // Without stepping only active break points are hit.
   CHECK_EQ(1, break_point_hit_count);
@@ -2498,13 +2500,13 @@
           "foo");
 
   // Call function without any break points to ensure inlining is in place.
-  foo->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  foo->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
 
   // Set up break point and step through the function.
   SetBreakPoint(foo, 4);
   step_action = StepNext;
   break_point_hit_count = 0;
-  foo->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  foo->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
 
   // With stepping all break locations are hit.
   CHECK_EQ(65, break_point_hit_count);
@@ -2534,13 +2536,13 @@
           "foo");
 
   // Call function without any break points to ensure inlining is in place.
-  foo->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  foo->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
 
   // Set up break point and step through the function.
   SetBreakPoint(foo, 3);
   step_action = StepNext;
   break_point_hit_count = 0;
-  foo->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  foo->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
 
   // With stepping all expected break locations are hit.
   CHECK_EQ(expected, break_point_hit_count);
@@ -2578,7 +2580,7 @@
 
   step_action = StepIn;
   break_point_hit_count = 0;
-  foo->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  foo->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
 
   // With stepping all break locations are hit.
   CHECK_EQ(10, break_point_hit_count);
@@ -2591,7 +2593,7 @@
 
   SetBreakPoint(foo, 0);
   break_point_hit_count = 0;
-  foo->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  foo->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
 
   // Without stepping only active break points are hit.
   CHECK_EQ(1, break_point_hit_count);
@@ -2626,7 +2628,7 @@
   // Stepping through the declarations.
   step_action = StepIn;
   break_point_hit_count = 0;
-  foo->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  foo->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
   CHECK_EQ(5, break_point_hit_count);
 
   // Get rid of the debug event listener.
@@ -2660,7 +2662,7 @@
   // Stepping through the declarations.
   step_action = StepIn;
   break_point_hit_count = 0;
-  foo->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  foo->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
   CHECK_EQ(5, break_point_hit_count);
 
   // Get rid of the debug event listener.
@@ -3050,7 +3052,7 @@
 
   step_action = StepIn;
   break_point_hit_count = 0;
-  foo->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  foo->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
   CHECK_EQ(8, break_point_hit_count);
 
   // Create a function for testing stepping. Run it to allow it to get
@@ -3067,7 +3069,7 @@
 
   step_action = StepIn;
   break_point_hit_count = 0;
-  foo->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  foo->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
   CHECK_EQ(10, break_point_hit_count);
 
   // Get rid of the debug event listener.
@@ -3102,7 +3104,7 @@
 
   step_action = StepIn;
   break_point_hit_count = 0;
-  foo->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  foo->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
   CHECK_EQ(4, break_point_hit_count);
 
   // Get rid of the debug event listener.
@@ -3132,7 +3134,7 @@
 
   step_action = StepIn;
   break_point_hit_count = 0;
-  foo->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  foo->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
   CHECK_EQ(2, break_point_hit_count);
 
   step_action = StepIn;
@@ -3174,7 +3176,7 @@
   step_action = StepIn;
   break_point_hit_count = 0;
   expected_step_sequence = "abcbaca";
-  a->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  a->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
   CHECK_EQ(StrLength(expected_step_sequence),
            break_point_hit_count);
 
@@ -3182,7 +3184,7 @@
   step_action = StepNext;
   break_point_hit_count = 0;
   expected_step_sequence = "aaa";
-  a->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  a->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
   CHECK_EQ(StrLength(expected_step_sequence),
            break_point_hit_count);
 
@@ -3190,7 +3192,7 @@
   step_action = StepOut;
   break_point_hit_count = 0;
   expected_step_sequence = "a";
-  a->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  a->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
   CHECK_EQ(StrLength(expected_step_sequence),
            break_point_hit_count);
 
@@ -3227,7 +3229,7 @@
   step_action = StepIn;
   break_point_hit_count = 0;
   expected_step_sequence = "adacadabcbadacada";
-  a->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  a->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
   CHECK_EQ(StrLength(expected_step_sequence),
            break_point_hit_count);
 
@@ -3235,7 +3237,7 @@
   step_action = StepNext;
   break_point_hit_count = 0;
   expected_step_sequence = "aaaa";
-  a->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  a->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
   CHECK_EQ(StrLength(expected_step_sequence),
            break_point_hit_count);
 
@@ -3243,7 +3245,7 @@
   step_action = StepOut;
   break_point_hit_count = 0;
   expected_step_sequence = "a";
-  a->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  a->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
   CHECK_EQ(StrLength(expected_step_sequence),
            break_point_hit_count);
 
@@ -3279,7 +3281,7 @@
   step_action = StepIn;
   break_point_hit_count = 0;
   expected_step_sequence = "abbaca";
-  a->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  a->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
   CHECK_EQ(StrLength(expected_step_sequence),
            break_point_hit_count);
 
@@ -3306,7 +3308,7 @@
   v8::Local<v8::Context> context = env.context();
   step_action = StepIn;
   break_point_hit_count = 0;
-  foo->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  foo->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
 
   // With stepping all break locations are hit.
   CHECK_EQ(3, break_point_hit_count);
@@ -3318,7 +3320,7 @@
   SetDebugEventListener(env->GetIsolate(), DebugEventBreakPointHitCount);
 
   break_point_hit_count = 0;
-  foo->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  foo->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
 
   // Without stepping only active break points are hit.
   CHECK_EQ(1, break_point_hit_count);
@@ -3346,7 +3348,7 @@
   v8::Local<v8::Context> context = env.context();
   step_action = StepIn;
   break_point_hit_count = 0;
-  foo->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  foo->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
 
   // With stepping all break locations are hit.
   CHECK_EQ(7, break_point_hit_count);
@@ -3358,7 +3360,7 @@
   SetDebugEventListener(env->GetIsolate(), DebugEventBreakPointHitCount);
 
   break_point_hit_count = 0;
-  foo->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  foo->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
 
   // Without stepping only the debugger statement is hit.
   CHECK_EQ(1, break_point_hit_count);
@@ -3394,7 +3396,7 @@
 
   // Check stepping where the if condition in bar is false.
   break_point_hit_count = 0;
-  foo->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  foo->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
   CHECK_EQ(6, break_point_hit_count);
 
   // Check stepping where the if condition in bar is true.
@@ -3411,7 +3413,7 @@
   SetDebugEventListener(isolate, DebugEventBreakPointHitCount);
 
   break_point_hit_count = 0;
-  foo->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  foo->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
 
   // Without stepping only the debugger statement is hit.
   CHECK_EQ(1, break_point_hit_count);
@@ -3444,7 +3446,7 @@
   step_action = StepIn;
 
   break_point_hit_count = 0;
-  foo->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  foo->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
   CHECK_EQ(6, break_point_hit_count);
 
   SetDebugEventListener(isolate, nullptr);
@@ -3454,7 +3456,7 @@
   SetDebugEventListener(isolate, DebugEventBreakPointHitCount);
 
   break_point_hit_count = 0;
-  foo->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  foo->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
 
   // Without stepping only the debugger statement is hit.
   CHECK_EQ(1, break_point_hit_count);
@@ -3542,117 +3544,117 @@
   // Initial state should be no break on exceptions.
   DebugEventCounterClear();
   MessageCallbackCountClear();
-  caught->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  caught->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
   DebugEventCounterCheck(0, 0, 0);
-  CHECK(notCaught->Call(context, env->Global(), 0, NULL).IsEmpty());
+  CHECK(notCaught->Call(context, env->Global(), 0, nullptr).IsEmpty());
   DebugEventCounterCheck(0, 0, 1);
-  CHECK(notCaughtFinally->Call(context, env->Global(), 0, NULL).IsEmpty());
+  CHECK(notCaughtFinally->Call(context, env->Global(), 0, nullptr).IsEmpty());
   DebugEventCounterCheck(0, 0, 2);
-  edgeCaseFinally->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  edgeCaseFinally->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
   DebugEventCounterCheck(0, 0, 2);
 
   // No break on exception
   DebugEventCounterClear();
   MessageCallbackCountClear();
   ChangeBreakOnException(false, false);
-  caught->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  caught->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
   DebugEventCounterCheck(0, 0, 0);
-  CHECK(notCaught->Call(context, env->Global(), 0, NULL).IsEmpty());
+  CHECK(notCaught->Call(context, env->Global(), 0, nullptr).IsEmpty());
   DebugEventCounterCheck(0, 0, 1);
-  CHECK(notCaughtFinally->Call(context, env->Global(), 0, NULL).IsEmpty());
+  CHECK(notCaughtFinally->Call(context, env->Global(), 0, nullptr).IsEmpty());
   DebugEventCounterCheck(0, 0, 2);
-  edgeCaseFinally->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  edgeCaseFinally->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
   DebugEventCounterCheck(0, 0, 2);
 
   // Break on uncaught exception
   DebugEventCounterClear();
   MessageCallbackCountClear();
   ChangeBreakOnException(false, true);
-  caught->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  caught->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
   DebugEventCounterCheck(0, 0, 0);
-  CHECK(notCaught->Call(context, env->Global(), 0, NULL).IsEmpty());
+  CHECK(notCaught->Call(context, env->Global(), 0, nullptr).IsEmpty());
   DebugEventCounterCheck(1, 1, 1);
-  CHECK(notCaughtFinally->Call(context, env->Global(), 0, NULL).IsEmpty());
+  CHECK(notCaughtFinally->Call(context, env->Global(), 0, nullptr).IsEmpty());
   DebugEventCounterCheck(2, 2, 2);
-  edgeCaseFinally->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  edgeCaseFinally->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
   DebugEventCounterCheck(3, 3, 2);
 
   // Break on exception and uncaught exception
   DebugEventCounterClear();
   MessageCallbackCountClear();
   ChangeBreakOnException(true, true);
-  caught->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  caught->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
   DebugEventCounterCheck(1, 0, 0);
-  CHECK(notCaught->Call(context, env->Global(), 0, NULL).IsEmpty());
+  CHECK(notCaught->Call(context, env->Global(), 0, nullptr).IsEmpty());
   DebugEventCounterCheck(2, 1, 1);
-  CHECK(notCaughtFinally->Call(context, env->Global(), 0, NULL).IsEmpty());
+  CHECK(notCaughtFinally->Call(context, env->Global(), 0, nullptr).IsEmpty());
   DebugEventCounterCheck(3, 2, 2);
-  edgeCaseFinally->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  edgeCaseFinally->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
   DebugEventCounterCheck(4, 3, 2);
 
   // Break on exception
   DebugEventCounterClear();
   MessageCallbackCountClear();
   ChangeBreakOnException(true, false);
-  caught->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  caught->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
   DebugEventCounterCheck(1, 0, 0);
-  CHECK(notCaught->Call(context, env->Global(), 0, NULL).IsEmpty());
+  CHECK(notCaught->Call(context, env->Global(), 0, nullptr).IsEmpty());
   DebugEventCounterCheck(2, 1, 1);
-  CHECK(notCaughtFinally->Call(context, env->Global(), 0, NULL).IsEmpty());
+  CHECK(notCaughtFinally->Call(context, env->Global(), 0, nullptr).IsEmpty());
   DebugEventCounterCheck(3, 2, 2);
-  edgeCaseFinally->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  edgeCaseFinally->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
   DebugEventCounterCheck(4, 3, 2);
 
   // No break on exception using JavaScript
   DebugEventCounterClear();
   MessageCallbackCountClear();
   ChangeBreakOnExceptionFromJS(env->GetIsolate(), false, false);
-  caught->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  caught->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
   DebugEventCounterCheck(0, 0, 0);
-  CHECK(notCaught->Call(context, env->Global(), 0, NULL).IsEmpty());
+  CHECK(notCaught->Call(context, env->Global(), 0, nullptr).IsEmpty());
   DebugEventCounterCheck(0, 0, 1);
-  CHECK(notCaughtFinally->Call(context, env->Global(), 0, NULL).IsEmpty());
+  CHECK(notCaughtFinally->Call(context, env->Global(), 0, nullptr).IsEmpty());
   DebugEventCounterCheck(0, 0, 2);
-  edgeCaseFinally->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  edgeCaseFinally->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
   DebugEventCounterCheck(0, 0, 2);
 
   // Break on uncaught exception using JavaScript
   DebugEventCounterClear();
   MessageCallbackCountClear();
   ChangeBreakOnExceptionFromJS(env->GetIsolate(), false, true);
-  caught->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  caught->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
   DebugEventCounterCheck(0, 0, 0);
-  CHECK(notCaught->Call(context, env->Global(), 0, NULL).IsEmpty());
+  CHECK(notCaught->Call(context, env->Global(), 0, nullptr).IsEmpty());
   DebugEventCounterCheck(1, 1, 1);
-  CHECK(notCaughtFinally->Call(context, env->Global(), 0, NULL).IsEmpty());
+  CHECK(notCaughtFinally->Call(context, env->Global(), 0, nullptr).IsEmpty());
   DebugEventCounterCheck(2, 2, 2);
-  edgeCaseFinally->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  edgeCaseFinally->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
   DebugEventCounterCheck(3, 3, 2);
 
   // Break on exception and uncaught exception using JavaScript
   DebugEventCounterClear();
   MessageCallbackCountClear();
   ChangeBreakOnExceptionFromJS(env->GetIsolate(), true, true);
-  caught->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  caught->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
   DebugEventCounterCheck(1, 0, 0);
-  CHECK(notCaught->Call(context, env->Global(), 0, NULL).IsEmpty());
+  CHECK(notCaught->Call(context, env->Global(), 0, nullptr).IsEmpty());
   DebugEventCounterCheck(2, 1, 1);
-  CHECK(notCaughtFinally->Call(context, env->Global(), 0, NULL).IsEmpty());
+  CHECK(notCaughtFinally->Call(context, env->Global(), 0, nullptr).IsEmpty());
   DebugEventCounterCheck(3, 2, 2);
-  edgeCaseFinally->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  edgeCaseFinally->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
   DebugEventCounterCheck(4, 3, 2);
 
   // Break on exception using JavaScript
   DebugEventCounterClear();
   MessageCallbackCountClear();
   ChangeBreakOnExceptionFromJS(env->GetIsolate(), true, false);
-  caught->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  caught->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
   DebugEventCounterCheck(1, 0, 0);
-  CHECK(notCaught->Call(context, env->Global(), 0, NULL).IsEmpty());
+  CHECK(notCaught->Call(context, env->Global(), 0, nullptr).IsEmpty());
   DebugEventCounterCheck(2, 1, 1);
-  CHECK(notCaughtFinally->Call(context, env->Global(), 0, NULL).IsEmpty());
+  CHECK(notCaughtFinally->Call(context, env->Global(), 0, nullptr).IsEmpty());
   DebugEventCounterCheck(3, 2, 2);
-  edgeCaseFinally->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  edgeCaseFinally->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
   DebugEventCounterCheck(4, 3, 2);
 
   // No break on exception using native API
@@ -3660,13 +3662,13 @@
   MessageCallbackCountClear();
   ChangeBreakOnExceptionFromAPI(env->GetIsolate(),
                                 v8::debug::NoBreakOnException);
-  caught->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  caught->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
   DebugEventCounterCheck(0, 0, 0);
-  CHECK(notCaught->Call(context, env->Global(), 0, NULL).IsEmpty());
+  CHECK(notCaught->Call(context, env->Global(), 0, nullptr).IsEmpty());
   DebugEventCounterCheck(0, 0, 1);
-  CHECK(notCaughtFinally->Call(context, env->Global(), 0, NULL).IsEmpty());
+  CHECK(notCaughtFinally->Call(context, env->Global(), 0, nullptr).IsEmpty());
   DebugEventCounterCheck(0, 0, 2);
-  edgeCaseFinally->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  edgeCaseFinally->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
   DebugEventCounterCheck(0, 0, 2);
 
   // // Break on uncaught exception using native API
@@ -3674,13 +3676,13 @@
   MessageCallbackCountClear();
   ChangeBreakOnExceptionFromAPI(env->GetIsolate(),
                                 v8::debug::BreakOnUncaughtException);
-  caught->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  caught->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
   DebugEventCounterCheck(0, 0, 0);
-  CHECK(notCaught->Call(context, env->Global(), 0, NULL).IsEmpty());
+  CHECK(notCaught->Call(context, env->Global(), 0, nullptr).IsEmpty());
   DebugEventCounterCheck(1, 1, 1);
-  CHECK(notCaughtFinally->Call(context, env->Global(), 0, NULL).IsEmpty());
+  CHECK(notCaughtFinally->Call(context, env->Global(), 0, nullptr).IsEmpty());
   DebugEventCounterCheck(2, 2, 2);
-  edgeCaseFinally->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  edgeCaseFinally->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
   DebugEventCounterCheck(3, 3, 2);
 
   // // Break on exception and uncaught exception using native API
@@ -3688,13 +3690,13 @@
   MessageCallbackCountClear();
   ChangeBreakOnExceptionFromAPI(env->GetIsolate(),
                                 v8::debug::BreakOnAnyException);
-  caught->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  caught->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
   DebugEventCounterCheck(1, 0, 0);
-  CHECK(notCaught->Call(context, env->Global(), 0, NULL).IsEmpty());
+  CHECK(notCaught->Call(context, env->Global(), 0, nullptr).IsEmpty());
   DebugEventCounterCheck(2, 1, 1);
-  CHECK(notCaughtFinally->Call(context, env->Global(), 0, NULL).IsEmpty());
+  CHECK(notCaughtFinally->Call(context, env->Global(), 0, nullptr).IsEmpty());
   DebugEventCounterCheck(3, 2, 2);
-  edgeCaseFinally->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  edgeCaseFinally->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
   DebugEventCounterCheck(4, 3, 2);
 
   SetDebugEventListener(env->GetIsolate(), nullptr);
@@ -3832,7 +3834,7 @@
   step_action = StepIn;
   break_point_hit_count = 0;
   expected_step_sequence = "aa";
-  CHECK(a->Call(context, env->Global(), 0, NULL).IsEmpty());
+  CHECK(a->Call(context, env->Global(), 0, nullptr).IsEmpty());
   CHECK_EQ(StrLength(expected_step_sequence),
            break_point_hit_count);
 
@@ -3843,7 +3845,7 @@
   step_action = StepIn;
   break_point_hit_count = 0;
   expected_step_sequence = "bcc";
-  CHECK(b->Call(context, env->Global(), 0, NULL).IsEmpty());
+  CHECK(b->Call(context, env->Global(), 0, nullptr).IsEmpty());
   CHECK_EQ(StrLength(expected_step_sequence),
            break_point_hit_count);
 
@@ -3855,7 +3857,7 @@
   step_action = StepIn;
   break_point_hit_count = 0;
   expected_step_sequence = "ddedd";
-  d->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  d->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
   CHECK_EQ(StrLength(expected_step_sequence),
            break_point_hit_count);
 
@@ -3864,7 +3866,7 @@
   step_action = StepIn;
   break_point_hit_count = 0;
   expected_step_sequence = "ddeedd";
-  d->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  d->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
   CHECK_EQ(StrLength(expected_step_sequence),
            break_point_hit_count);
 
@@ -3876,7 +3878,7 @@
   step_action = StepIn;
   break_point_hit_count = 0;
   expected_step_sequence = "ffghhff";
-  f->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  f->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
   CHECK_EQ(StrLength(expected_step_sequence),
            break_point_hit_count);
 
@@ -3885,7 +3887,7 @@
   step_action = StepIn;
   break_point_hit_count = 0;
   expected_step_sequence = "ffghhhff";
-  f->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  f->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
   CHECK_EQ(StrLength(expected_step_sequence),
            break_point_hit_count);
 
@@ -3924,10 +3926,10 @@
       v8::Number::New(isolate, 1), v8::Number::New(isolate, 1)};
 
   // Call all functions to make sure that they are compiled.
-  f0->Call(context, env->Global(), 0, NULL).ToLocalChecked();
-  f1->Call(context, env->Global(), 0, NULL).ToLocalChecked();
-  f2->Call(context, env->Global(), 0, NULL).ToLocalChecked();
-  f3->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  f0->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
+  f1->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
+  f2->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
+  f3->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
 
   // Set the debug break flag.
   v8::debug::DebugBreak(env->GetIsolate());
@@ -3942,13 +3944,109 @@
   }
 
   // One break for each function called.
-  CHECK(4 * arraysize(argv) == break_point_hit_count);
+  CHECK_EQ(4 * arraysize(argv), break_point_hit_count);
 
   // Get rid of the debug event listener.
   SetDebugEventListener(isolate, nullptr);
   CheckDebuggerUnloaded();
 }
 
+static void DebugScopingListener(const v8::Debug::EventDetails& event_details) {
+  v8::DebugEvent event = event_details.GetEvent();
+  if (event != v8::Exception) return;
+
+  auto stack_traces = v8::debug::StackTraceIterator::Create(CcTest::isolate());
+  v8::debug::Location location = stack_traces->GetSourceLocation();
+  CHECK_EQ(26, location.GetColumnNumber());
+  CHECK_EQ(0, location.GetLineNumber());
+
+  auto scopes = stack_traces->GetScopeIterator();
+  CHECK_EQ(v8::debug::ScopeIterator::ScopeTypeWith, scopes->GetType());
+  CHECK_EQ(20, scopes->GetStartLocation().GetColumnNumber());
+  CHECK_EQ(31, scopes->GetEndLocation().GetColumnNumber());
+
+  scopes->Advance();
+  CHECK_EQ(v8::debug::ScopeIterator::ScopeTypeLocal, scopes->GetType());
+  CHECK_EQ(0, scopes->GetStartLocation().GetColumnNumber());
+  CHECK_EQ(68, scopes->GetEndLocation().GetColumnNumber());
+
+  scopes->Advance();
+  CHECK_EQ(v8::debug::ScopeIterator::ScopeTypeGlobal, scopes->GetType());
+  CHECK(scopes->GetFunction().IsEmpty());
+
+  scopes->Advance();
+  CHECK(scopes->Done());
+}
+
+TEST(DebugBreakInWrappedScript) {
+  i::FLAG_stress_compaction = false;
+#ifdef VERIFY_HEAP
+  i::FLAG_verify_heap = true;
+#endif
+  DebugLocalContext env;
+  v8::Isolate* isolate = env->GetIsolate();
+  v8::HandleScope scope(isolate);
+
+  // Register a debug event listener which sets the break flag and counts.
+  SetDebugEventListener(isolate, DebugScopingListener);
+
+  static const char* source =
+      //   0         1         2         3         4         5         6 7
+      "try { with({o : []}){ o[0](); } } catch (e) { return e.toString(); }";
+  static const char* expect = "TypeError: o[0] is not a function";
+
+  // For this test, we want to break on uncaught exceptions:
+  ChangeBreakOnException(true, true);
+
+  {
+    v8::ScriptCompiler::Source script_source(v8_str(source));
+    v8::Local<v8::Function> fun =
+        v8::ScriptCompiler::CompileFunctionInContext(
+            env.context(), &script_source, 0, nullptr, 0, nullptr)
+            .ToLocalChecked();
+    v8::Local<v8::Value> result =
+        fun->Call(env.context(), env->Global(), 0, nullptr).ToLocalChecked();
+    CHECK(result->IsString());
+    CHECK(v8::Local<v8::String>::Cast(result)
+              ->Equals(env.context(), v8_str(expect))
+              .FromJust());
+  }
+
+  // Get rid of the debug event listener.
+  SetDebugEventListener(isolate, nullptr);
+  CheckDebuggerUnloaded();
+}
+
+TEST(DebugBreakWithoutJS) {
+  i::FLAG_stress_compaction = false;
+#ifdef VERIFY_HEAP
+  i::FLAG_verify_heap = true;
+#endif
+  DebugLocalContext env;
+  v8::Isolate* isolate = env->GetIsolate();
+  v8::Local<v8::Context> context = env.context();
+  v8::HandleScope scope(isolate);
+
+  // Register a debug event listener which sets the break flag and counts.
+  SetDebugEventListener(isolate, DebugEventBreak);
+
+  // Set the debug break flag.
+  v8::debug::DebugBreak(env->GetIsolate());
+
+  v8::Local<v8::String> json = v8_str("[1]");
+  v8::Local<v8::Value> parsed = v8::JSON::Parse(context, json).ToLocalChecked();
+  CHECK(v8::JSON::Stringify(context, parsed)
+            .ToLocalChecked()
+            ->Equals(context, json)
+            .FromJust());
+  CHECK_EQ(0, break_point_hit_count);
+  CompileRun("");
+  CHECK_EQ(1, break_point_hit_count);
+
+  // Get rid of the debug event listener.
+  SetDebugEventListener(isolate, nullptr);
+  CheckDebuggerUnloaded();
+}
 
 // Test to ensure that JavaScript code keeps running while the debug break
 // through the stack limit flag is set but breaks are disabled.
@@ -3973,18 +4071,18 @@
 
   // Call all functions with different argument count.
   break_point_hit_count = 0;
-  f->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  f->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
   CHECK_EQ(1, break_point_hit_count);
 
   {
     v8::debug::DebugBreak(env->GetIsolate());
     i::Isolate* isolate = reinterpret_cast<i::Isolate*>(env->GetIsolate());
     v8::internal::DisableBreak disable_break(isolate->debug());
-    f->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+    f->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
     CHECK_EQ(1, break_point_hit_count);
   }
 
-  f->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  f->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
   CHECK_EQ(2, break_point_hit_count);
 
   // Get rid of the debug event listener.
@@ -4091,7 +4189,6 @@
     info.GetReturnValue().SetUndefined();
     return;
   }
-  info.GetReturnValue().Set(name);
 }
 
 
@@ -4112,7 +4209,7 @@
   // Create object with named interceptor.
   v8::Local<v8::ObjectTemplate> named = v8::ObjectTemplate::New(isolate);
   named->SetHandler(v8::NamedPropertyHandlerConfiguration(
-      NamedGetter, NULL, NULL, NULL, NamedEnum));
+      NamedGetter, nullptr, nullptr, nullptr, NamedEnum));
   CHECK(env->Global()
             ->Set(context, v8_str(isolate, "intercepted_named"),
                   named->NewInstance(context).ToLocalChecked())
@@ -4121,7 +4218,7 @@
   // Create object with indexed interceptor.
   v8::Local<v8::ObjectTemplate> indexed = v8::ObjectTemplate::New(isolate);
   indexed->SetHandler(v8::IndexedPropertyHandlerConfiguration(
-      IndexedGetter, NULL, NULL, NULL, IndexedEnum));
+      IndexedGetter, nullptr, nullptr, nullptr, IndexedEnum));
   CHECK(env->Global()
             ->Set(context, v8_str(isolate, "intercepted_indexed"),
                   indexed->NewInstance(context).ToLocalChecked())
@@ -4130,9 +4227,9 @@
   // Create object with both named and indexed interceptor.
   v8::Local<v8::ObjectTemplate> both = v8::ObjectTemplate::New(isolate);
   both->SetHandler(v8::NamedPropertyHandlerConfiguration(
-      NamedGetter, NULL, NULL, NULL, NamedEnum));
+      NamedGetter, nullptr, nullptr, nullptr, NamedEnum));
   both->SetHandler(v8::IndexedPropertyHandlerConfiguration(
-      IndexedGetter, NULL, NULL, NULL, IndexedEnum));
+      IndexedGetter, nullptr, nullptr, nullptr, IndexedEnum));
   CHECK(env->Global()
             ->Set(context, v8_str(isolate, "intercepted_both"),
                   both->NewInstance(context).ToLocalChecked())
@@ -4388,8 +4485,8 @@
   v8::Local<v8::String> name = v8_str(isolate, "x");
   // Create object with named accessor.
   v8::Local<v8::ObjectTemplate> named = v8::ObjectTemplate::New(isolate);
-  named->SetAccessor(name, &ProtperyXNativeGetter, NULL, v8::Local<v8::Value>(),
-                     v8::DEFAULT, v8::None);
+  named->SetAccessor(name, &ProtperyXNativeGetter, nullptr,
+                     v8::Local<v8::Value>(), v8::DEFAULT, v8::None);
 
   // Create object with named property getter.
   CHECK(env->Global()
@@ -4434,7 +4531,7 @@
   v8::Local<v8::String> name = v8_str(isolate, "x");
   // Create object with named accessor.
   v8::Local<v8::ObjectTemplate> named = v8::ObjectTemplate::New(isolate);
-  named->SetAccessor(name, &ProtperyXNativeGetterThrowingError, NULL,
+  named->SetAccessor(name, &ProtperyXNativeGetterThrowingError, nullptr,
                      v8::Local<v8::Value>(), v8::DEFAULT, v8::None);
 
   // Create object with named property getter.
@@ -4672,7 +4769,7 @@
   global_template->Set(v8_str(isolate, "CheckClosure"),
                        v8::FunctionTemplate::New(isolate, CheckClosure));
   v8::Local<v8::Context> context =
-      v8::Context::New(isolate, NULL, global_template);
+      v8::Context::New(isolate, nullptr, global_template);
   v8::Context::Scope context_scope(context);
 
   // Compile a function for checking the number of JavaScript frames.
@@ -4808,9 +4905,9 @@
 
     // Make sure that the break points are there.
     break_point_hit_count = 0;
-    foo->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+    foo->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
     CHECK_EQ(2, break_point_hit_count);
-    bar->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+    bar->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
     CHECK_EQ(4, break_point_hit_count);
   }
 
@@ -4942,7 +5039,7 @@
           ->Get(context, v8_str(env->GetIsolate(), "f"))
           .ToLocalChecked());
 
-  f->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  f->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
   CHECK_EQ(1, break_point_hit_count);
   CHECK_EQ(0, strcmp("name", last_script_name_hit));
 
@@ -4956,7 +5053,7 @@
       env->Global()
           ->Get(context, v8_str(env->GetIsolate(), "f"))
           .ToLocalChecked());
-  f->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  f->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
   CHECK_EQ(2, break_point_hit_count);
   CHECK_EQ(0, strcmp("name", last_script_name_hit));
 
@@ -4979,7 +5076,7 @@
       env->Global()
           ->Get(context, v8_str(env->GetIsolate(), "f"))
           .ToLocalChecked());
-  f->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  f->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
   CHECK_EQ(3, break_point_hit_count);
   CHECK_EQ(0, strcmp("new name", last_script_name_hit));
 
@@ -4990,7 +5087,7 @@
       env->Global()
           ->Get(context, v8_str(env->GetIsolate(), "f"))
           .ToLocalChecked());
-  f->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  f->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
   CHECK_EQ(4, break_point_hit_count);
 }
 
@@ -5022,8 +5119,10 @@
   v8::Local<v8::ObjectTemplate> global_template =
       v8::Local<v8::ObjectTemplate>();
   v8::Local<v8::Value> global_object = v8::Local<v8::Value>();
-  context_1 = v8::Context::New(isolate, NULL, global_template, global_object);
-  context_2 = v8::Context::New(isolate, NULL, global_template, global_object);
+  context_1 =
+      v8::Context::New(isolate, nullptr, global_template, global_object);
+  context_2 =
+      v8::Context::New(isolate, nullptr, global_template, global_object);
 
   SetDebugEventListener(isolate, ContextCheckEventListener);
 
@@ -5048,7 +5147,7 @@
     expected_context = context_1;
     expected_context_data = data_1;
     v8::Local<v8::Function> f = CompileFunction(isolate, source, "f");
-    f->Call(context_1, context_1->Global(), 0, NULL).ToLocalChecked();
+    f->Call(context_1, context_1->Global(), 0, nullptr).ToLocalChecked();
   }
 
 
@@ -5058,7 +5157,7 @@
     expected_context = context_2;
     expected_context_data = data_2;
     v8::Local<v8::Function> f = CompileFunction(isolate, source, "f");
-    f->Call(context_2, context_2->Global(), 0, NULL).ToLocalChecked();
+    f->Call(context_2, context_2->Global(), 0, nullptr).ToLocalChecked();
   }
 
   // Two times compile event and two times break event.
@@ -5103,10 +5202,10 @@
 
   // Call f then g. The debugger statement in f will cause a break which will
   // cause another break.
-  f->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  f->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
   CHECK_EQ(2, event_listener_break_hit_count);
   // Calling g will not cause any additional breaks.
-  g->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  g->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
   CHECK_EQ(2, event_listener_break_hit_count);
 }
 
@@ -5194,8 +5293,7 @@
   v8::Local<v8::Context> context_1;
   v8::Local<v8::ObjectTemplate> global_template =
       v8::Local<v8::ObjectTemplate>();
-  context_1 =
-      v8::Context::New(CcTest::isolate(), NULL, global_template);
+  context_1 = v8::Context::New(CcTest::isolate(), nullptr, global_template);
 
   SetDebugEventListener(CcTest::isolate(), ContextCheckEventListener);
 
@@ -5216,7 +5314,7 @@
     expected_context = context_1;
     expected_context_data = data_1;
     v8::Local<v8::Function> f = CompileFunction(CcTest::isolate(), source, "f");
-    f->Call(context_1, context_1->Global(), 0, NULL).ToLocalChecked();
+    f->Call(context_1, context_1->Global(), 0, nullptr).ToLocalChecked();
   }
 
   SetDebugEventListener(CcTest::isolate(), nullptr);
@@ -5259,7 +5357,7 @@
       ->Run(context)
       .ToLocalChecked();
 
-  // Setting listener to NULL should cause debugger unload.
+  // Setting listener to nullptr should cause debugger unload.
   SetDebugEventListener(env->GetIsolate(), nullptr);
   CheckDebuggerUnloaded();
 
@@ -5349,9 +5447,9 @@
       env->Global()
           ->Get(context, v8_str(env->GetIsolate(), "f"))
           .ToLocalChecked());
-  f->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  f->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
 
-  // Setting event listener to NULL should cause debugger unload.
+  // Setting event listener to nullptr should cause debugger unload.
   SetDebugEventListener(env->GetIsolate(), nullptr);
   CheckDebuggerUnloaded();
 
@@ -5389,9 +5487,9 @@
       env->Global()
           ->Get(context, v8_str(env->GetIsolate(), "f"))
           .ToLocalChecked());
-  CHECK(f->Call(context, env->Global(), 0, NULL).IsEmpty());
+  CHECK(f->Call(context, env->Global(), 0, nullptr).IsEmpty());
 
-  // Setting event listener to NULL should cause debugger unload.
+  // Setting event listener to nullptr should cause debugger unload.
   SetDebugEventListener(env->GetIsolate(), nullptr);
   CheckDebuggerUnloaded();
 
@@ -5468,7 +5566,7 @@
 
   // Set the debug break flag again.
   v8::debug::DebugBreak(env->GetIsolate());
-  f->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  f->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
   // There should be one more break event when the script is evaluated in 'f'.
   CHECK_EQ(2, break_point_hit_count);
 
@@ -5502,7 +5600,7 @@
   // where this test would enter an infinite loop.
   break_point_hit_count = 0;
   max_break_point_hit_count = 10000;  // 10000 => infinite loop.
-  foo->Call(context, env->Global(), 0, NULL).ToLocalChecked();
+  foo->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
 
   // When keeping the debug break several break will happen.
   CHECK_GT(break_point_hit_count, 1);
@@ -5585,7 +5683,7 @@
       "foo");
 
   break_point_hit_count = 0;
-  foo->Call(debugee_context, env->Global(), 0, NULL).ToLocalChecked();
+  foo->Call(debugee_context, env->Global(), 0, nullptr).ToLocalChecked();
   CHECK_EQ(1, break_point_hit_count);
 
   SetDebugEventListener(isolate, nullptr);
@@ -5681,11 +5779,13 @@
 
   // Compile and run function bar which will optimize it for some flag settings.
   v8::Local<v8::Function> f = CompileFunction(&env, "function bar(){}", "bar");
-  f->Call(context, v8::Undefined(env->GetIsolate()), 0, NULL).ToLocalChecked();
+  f->Call(context, v8::Undefined(env->GetIsolate()), 0, nullptr)
+      .ToLocalChecked();
 
   // Set debug break and call bar again.
   v8::debug::DebugBreak(env->GetIsolate());
-  f->Call(context, v8::Undefined(env->GetIsolate()), 0, NULL).ToLocalChecked();
+  f->Call(context, v8::Undefined(env->GetIsolate()), 0, nullptr)
+      .ToLocalChecked();
 
   CHECK(debug_event_break_deoptimize_done);
 
@@ -5806,7 +5906,7 @@
   // Receive 10 breaks for each test and then terminate JavaScript execution.
   static const int kBreaksPerTest = 10;
 
-  for (int i = 0; loop_bodies[i] != NULL; i++) {
+  for (int i = 0; loop_bodies[i] != nullptr; i++) {
     // Perform a lazy deoptimization after various numbers of breaks
     // have been hit.
 
@@ -5841,15 +5941,13 @@
   }
 }
 
-
 static const char* loop_bodies_1[] = {"",
                                       "g()",
                                       "if (a == 0) { g() }",
                                       "if (a == 1) { g() }",
                                       "if (a == 0) { g() } else { h() }",
                                       "if (a == 0) { continue }",
-                                      NULL};
-
+                                      nullptr};
 
 static const char* loop_bodies_2[] = {
     "if (a == 1) { continue }",
@@ -5857,8 +5955,7 @@
     "switch (a) { case 1: continue; }",
     "switch (a) { case 1: g(); break; default: h() }",
     "switch (a) { case 1: continue; break; default: h() }",
-    NULL};
-
+    nullptr};
 
 void DebugBreakLoop(const char* loop_header, const char** loop_bodies,
                     const char* loop_footer) {
@@ -6354,7 +6451,7 @@
   if (event_details.GetEvent() != v8::AfterCompile) return;
   ++after_compile_handler_depth;
   // Do not allow nested AfterCompile events.
-  CHECK(after_compile_handler_depth <= 1);
+  CHECK_LE(after_compile_handler_depth, 1);
   v8::Isolate* isolate = event_details.GetEventContext()->GetIsolate();
   v8::Isolate::AllowJavascriptExecutionScope allow_script(isolate);
   isolate->RequestInterrupt(&HandleInterrupt, nullptr);
@@ -6618,15 +6715,20 @@
 
 TEST(BuiltinsExceptionPrediction) {
   v8::Isolate* isolate = CcTest::isolate();
+  i::Isolate* iisolate = CcTest::i_isolate();
   v8::HandleScope handle_scope(isolate);
   v8::Context::New(isolate);
 
-  i::Builtins* builtins = CcTest::i_isolate()->builtins();
+  i::Builtins* builtins = iisolate->builtins();
   bool fail = false;
   for (int i = 0; i < i::Builtins::builtin_count; i++) {
     Code* builtin = builtins->builtin(i);
 
     if (builtin->kind() != Code::BUILTIN) continue;
+    if (builtin->builtin_index() == i::Builtins::kDeserializeLazy &&
+        i::Builtins::IsLazy(i)) {
+      builtin = i::Snapshot::DeserializeBuiltin(iisolate, i);
+    }
 
     auto prediction = builtin->GetBuiltinCatchPrediction();
     USE(prediction);
@@ -6648,7 +6750,7 @@
   CompileRun(source);
   v8::PersistentValueVector<v8::debug::Script> scripts(isolate);
   v8::debug::GetLoadedScripts(isolate, scripts);
-  CHECK(scripts.Size() == 1);
+  CHECK_EQ(scripts.Size(), 1);
   std::vector<v8::debug::BreakLocation> locations;
   CHECK(scripts.Get(0)->GetPossibleBreakpoints(
       v8::debug::Location(0, 17), v8::debug::Location(), true, &locations));
@@ -6660,7 +6762,7 @@
   }
   // With Ignition we generate one return location per return statement,
   // each has line = 5, column = 0 as statement position.
-  CHECK(returns_count == 4);
+  CHECK_EQ(returns_count, 4);
 }
 
 TEST(DebugEvaluateNoSideEffect) {
diff --git a/src/v8/test/cctest/test-decls.cc b/src/v8/test/cctest/test-decls.cc
index 88d0ee3..f0e8080 100644
--- a/src/v8/test/cctest/test-decls.cc
+++ b/src/v8/test/cctest/test-decls.cc
@@ -595,15 +595,17 @@
   HandleScope scope(isolate);
 
   // Check that simple cross-script global scope access works.
-  const char* decs[] = {
-    "'use strict'; var x = 1; x", "x",
-    "'use strict'; function x() { return 1 }; x()", "x()",
-    "'use strict'; let x = 1; x", "x",
-    "'use strict'; const x = 1; x", "x",
-    NULL
-  };
+  const char* decs[] = {"'use strict'; var x = 1; x",
+                        "x",
+                        "'use strict'; function x() { return 1 }; x()",
+                        "x()",
+                        "'use strict'; let x = 1; x",
+                        "x",
+                        "'use strict'; const x = 1; x",
+                        "x",
+                        nullptr};
 
-  for (int i = 0; decs[i] != NULL; i += 2) {
+  for (int i = 0; decs[i] != nullptr; i += 2) {
     SimpleContext context;
     context.Check(decs[i], EXPECT_RESULT, Number::New(isolate, 1));
     context.Check(decs[i+1], EXPECT_RESULT, Number::New(isolate, 1));
@@ -779,23 +781,13 @@
 
   HandleScope scope(CcTest::isolate());
 
-  const char* firsts[] = {
-    "var x = 1; x",
-    "function x() { return 1 }; x()",
-    "let x = 1; x",
-    "const x = 1; x",
-    NULL
-  };
-  const char* seconds[] = {
-    "var x = 2; x",
-    "function x() { return 2 }; x()",
-    "let x = 2; x",
-    "const x = 2; x",
-    NULL
-  };
+  const char* firsts[] = {"var x = 1; x", "function x() { return 1 }; x()",
+                          "let x = 1; x", "const x = 1; x", nullptr};
+  const char* seconds[] = {"var x = 2; x", "function x() { return 2 }; x()",
+                           "let x = 2; x", "const x = 2; x", nullptr};
 
-  for (int i = 0; firsts[i] != NULL; ++i) {
-    for (int j = 0; seconds[j] != NULL; ++j) {
+  for (int i = 0; firsts[i] != nullptr; ++i) {
+    for (int j = 0; seconds[j] != nullptr; ++j) {
       SimpleContext context;
       context.Check(firsts[i], EXPECT_RESULT,
                     Number::New(CcTest::isolate(), 1));
diff --git a/src/v8/test/cctest/test-disasm-arm.cc b/src/v8/test/cctest/test-disasm-arm.cc
index c8c9daa..3003092 100644
--- a/src/v8/test/cctest/test-disasm-arm.cc
+++ b/src/v8/test/cctest/test-disasm-arm.cc
@@ -73,6 +73,12 @@
     }
   }
 
+  // Fail after printing expected disassembly if we expected a different number
+  // of instructions.
+  if (disassembly.size() != expected_disassembly.size()) {
+    return false;
+  }
+
   return test_passed;
 }
 
@@ -268,7 +274,7 @@
           "e3e03000       mvn r3, #0");
   COMPARE(mov(r4, Operand(-2), SetCC, al),
           "e3f04001       mvns r4, #1");
-  COMPARE(mov(r5, Operand(0x0ffffff0), SetCC, ne),
+  COMPARE(mov(r5, Operand(0x0FFFFFF0), SetCC, ne),
           "13f052ff       mvnnes r5, #-268435441");
   COMPARE(mov(r6, Operand(-1), LeaveCC, ne),
           "13e06000       mvnne r6, #0");
@@ -278,7 +284,7 @@
           "e3a03000       mov r3, #0");
   COMPARE(mvn(r4, Operand(-2), SetCC, al),
           "e3b04001       movs r4, #1");
-  COMPARE(mvn(r5, Operand(0x0ffffff0), SetCC, ne),
+  COMPARE(mvn(r5, Operand(0x0FFFFFF0), SetCC, ne),
           "13b052ff       movnes r5, #-268435441");
   COMPARE(mvn(r6, Operand(-1), LeaveCC, ne),
           "13a06000       movne r6, #0");
@@ -306,20 +312,20 @@
 
     COMPARE(movt(r5, 0x4321, ne),
             "13445321       movtne r5, #17185");
-    COMPARE(movw(r5, 0xabcd, eq),
+    COMPARE(movw(r5, 0xABCD, eq),
             "030a5bcd       movweq r5, #43981");
   }
 
   // Eor doesn't have an eor-negative variant, but we can do an mvn followed by
   // an eor to get the same effect.
-  COMPARE(eor(r5, r4, Operand(0xffffff34), SetCC, ne),
+  COMPARE(eor(r5, r4, Operand(0xFFFFFF34), SetCC, ne),
           "13e050cb       mvnne r5, #203",
           "10345005       eornes r5, r4, r5");
 
   // and <-> bic.
-  COMPARE(and_(r3, r5, Operand(0xfc03ffff)),
+  COMPARE(and_(r3, r5, Operand(0xFC03FFFF)),
           "e3c537ff       bic r3, r5, #66846720");
-  COMPARE(bic(r3, r5, Operand(0xfc03ffff)),
+  COMPARE(bic(r3, r5, Operand(0xFC03FFFF)),
           "e20537ff       and r3, r5, #66846720");
 
   // sub <-> add.
@@ -339,7 +345,7 @@
           "e12fff3c       blx ip");
   COMPARE(bkpt(0),
           "e1200070       bkpt 0");
-  COMPARE(bkpt(0xffff),
+  COMPARE(bkpt(0xFFFF),
           "e12fff7f       bkpt 65535");
   COMPARE(clz(r6, r7),
           "e16f6f17       clz r6, r7");
@@ -510,7 +516,7 @@
           "e169f007       msr SPSR_fc, r7");
   // MSR with no mask is UNPREDICTABLE, and checked by the assembler, but check
   // that the disassembler does something sensible.
-  COMPARE(dd(0xe120f008), "e120f008       msr CPSR_(none), r8");
+  COMPARE(dd(0xE120F008), "e120f008       msr CPSR_(none), r8");
 
   COMPARE(mrs(r0, CPSR),     "e10f0000       mrs r0, CPSR");
   COMPARE(mrs(r1, SPSR),     "e14f1000       mrs r1, SPSR");
@@ -1472,7 +1478,7 @@
                             int offset) {
   int pc_offset = assm->pc_offset();
   byte *progcounter = &buffer[pc_offset];
-  assm->ldr(r0, MemOperand(pc, offset));
+  assm->ldr_pcrel(r0, offset);
 
   const char *expected_string_template =
     (offset >= 0) ?
@@ -1579,5 +1585,35 @@
   VERIFY_RUN();
 }
 
+TEST(SplitAddImmediate) {
+  SET_UP();
+
+  // Re-use the destination as a scratch.
+  COMPARE(add(r0, r1, Operand(0x12345678)),
+          "e3050678       movw r0, #22136",
+          "e3410234       movt r0, #4660",
+          "e0810000       add r0, r1, r0");
+
+  // Use ip as a scratch.
+  COMPARE(add(r0, r0, Operand(0x12345678)),
+          "e305c678       movw ip, #22136",
+          "e341c234       movt ip, #4660",
+          "e080000c       add r0, r0, ip");
+
+  // If ip is not available, split the operation into multiple additions.
+  {
+    UseScratchRegisterScope temps(&assm);
+    Register reserved = temps.Acquire();
+    USE(reserved);
+    COMPARE(add(r2, r2, Operand(0x12345678)),
+            "e2822f9e       add r2, r2, #632",
+            "e2822b15       add r2, r2, #21504",
+            "e282278d       add r2, r2, #36962304",
+            "e2822201       add r2, r2, #268435456");
+  }
+
+  VERIFY_RUN();
+}
+
 }  // namespace internal
 }  // namespace v8
diff --git a/src/v8/test/cctest/test-disasm-arm64.cc b/src/v8/test/cctest/test-disasm-arm64.cc
index efebac2..13deeb5 100644
--- a/src/v8/test/cctest/test-disasm-arm64.cc
+++ b/src/v8/test/cctest/test-disasm-arm64.cc
@@ -77,7 +77,7 @@
 #define COMPARE(ASM, EXP)                                                \
   assm->Reset();                                                         \
   assm->ASM;                                                             \
-  assm->GetCode(isolate, NULL);                                          \
+  assm->GetCode(isolate, nullptr);                                       \
   decoder->Decode(reinterpret_cast<Instruction*>(buf));                  \
   encoding = *reinterpret_cast<uint32_t*>(buf);                          \
   if (strcmp(disasm->GetOutput(), EXP) != 0) {                           \
@@ -89,7 +89,7 @@
 #define COMPARE_PREFIX(ASM, EXP)                                         \
   assm->Reset();                                                         \
   assm->ASM;                                                             \
-  assm->GetCode(isolate, NULL);                                          \
+  assm->GetCode(isolate, nullptr);                                       \
   decoder->Decode(reinterpret_cast<Instruction*>(buf));                  \
   encoding = *reinterpret_cast<uint32_t*>(buf);                          \
   if (strncmp(disasm->GetOutput(), EXP, strlen(EXP)) != 0) {             \
@@ -399,7 +399,7 @@
   COMPARE(add(x18, x19, Operand(x20, SXTB, 3)), "add x18, x19, w20, sxtb #3");
   COMPARE(adds(w21, w22, Operand(w23, SXTH, 2)), "adds w21, w22, w23, sxth #2");
   COMPARE(add(x24, x25, Operand(x26, SXTW, 1)), "add x24, x25, w26, sxtw #1");
-  COMPARE(adds(cp, jssp, Operand(fp, SXTX)), "adds cp, jssp, fp, sxtx");
+  COMPARE(adds(cp, x28, Operand(fp, SXTX)), "adds cp, x28, fp, sxtx");
   COMPARE(cmn(w0, Operand(w1, UXTB, 2)), "cmn w0, w1, uxtb #2");
   COMPARE(cmn(x2, Operand(x3, SXTH, 4)), "cmn x2, w3, sxth #4");
 
@@ -425,7 +425,7 @@
   COMPARE(sub(x18, x19, Operand(x20, SXTB, 3)), "sub x18, x19, w20, sxtb #3");
   COMPARE(subs(w21, w22, Operand(w23, SXTH, 2)), "subs w21, w22, w23, sxth #2");
   COMPARE(sub(x24, x25, Operand(x26, SXTW, 1)), "sub x24, x25, w26, sxtw #1");
-  COMPARE(subs(cp, jssp, Operand(fp, SXTX)), "subs cp, jssp, fp, sxtx");
+  COMPARE(subs(cp, x28, Operand(fp, SXTX)), "subs cp, x28, fp, sxtx");
   COMPARE(cmp(w0, Operand(w1, SXTB, 1)), "cmp w0, w1, sxtb #1");
   COMPARE(cmp(x2, Operand(x3, UXTH, 3)), "cmp x2, w3, uxth #3");
 
@@ -891,11 +891,10 @@
   COMPARE(str(x20, MemOperand(x21, 255, PostIndex)), "str x20, [x21], #255");
   COMPARE(str(x22, MemOperand(x23, -256, PostIndex)), "str x22, [x23], #-256");
 
-  // TODO(all): Fix this for jssp.
-  COMPARE(ldr(w24, MemOperand(jssp)), "ldr w24, [jssp]");
-  COMPARE(ldr(x25, MemOperand(jssp, 8)), "ldr x25, [jssp, #8]");
-  COMPARE(str(w26, MemOperand(jssp, 4, PreIndex)), "str w26, [jssp, #4]!");
-  COMPARE(str(cp, MemOperand(jssp, -8, PostIndex)), "str cp, [jssp], #-8");
+  COMPARE(ldr(w24, MemOperand(x28)), "ldr w24, [x28]");
+  COMPARE(ldr(x25, MemOperand(x28, 8)), "ldr x25, [x28, #8]");
+  COMPARE(str(w26, MemOperand(x28, 4, PreIndex)), "str w26, [x28, #4]!");
+  COMPARE(str(cp, MemOperand(x28, -8, PostIndex)), "str cp, [x28], #-8");
 
   COMPARE(ldrsw(x0, MemOperand(x1)), "ldrsw x0, [x1]");
   COMPARE(ldrsw(x2, MemOperand(x3, 8)), "ldrsw x2, [x3, #8]");
@@ -983,9 +982,8 @@
   COMPARE(strh(w21, MemOperand(x22, x23, SXTX, 1)),
           "strh w21, [x22, x23, sxtx #1]");
 
-  // TODO(all): Fix this for jssp.
-  COMPARE(ldr(x0, MemOperand(jssp, wzr, SXTW)), "ldr x0, [jssp, wzr, sxtw]");
-  COMPARE(str(x1, MemOperand(jssp, xzr)), "str x1, [jssp, xzr]");
+  COMPARE(ldr(x0, MemOperand(x28, wzr, SXTW)), "ldr x0, [x28, wzr, sxtw]");
+  COMPARE(str(x1, MemOperand(x28, xzr)), "str x1, [x28, xzr]");
 
   CLEANUP();
 }
@@ -1011,9 +1009,8 @@
   COMPARE(strb(w24, MemOperand(x25, 255, PostIndex)), "strb w24, [x25], #255");
   COMPARE(strb(w26, MemOperand(cp, -256, PostIndex)),
           "strb w26, [cp], #-256");
-  // TODO(all): Fix this for jssp.
-  COMPARE(ldrb(w28, MemOperand(jssp, 3, PostIndex)), "ldrb w28, [jssp], #3");
-  COMPARE(strb(fp, MemOperand(jssp, -42, PreIndex)), "strb w29, [jssp, #-42]!");
+  COMPARE(ldrb(w28, MemOperand(x28, 3, PostIndex)), "ldrb w28, [x28], #3");
+  COMPARE(strb(fp, MemOperand(x28, -42, PreIndex)), "strb w29, [x28, #-42]!");
   COMPARE(ldrsb(w0, MemOperand(x1)), "ldrsb w0, [x1]");
   COMPARE(ldrsb(x2, MemOperand(x3, 8)), "ldrsb x2, [x3, #8]");
   COMPARE(ldrsb(w4, MemOperand(x5, 42, PreIndex)), "ldrsb w4, [x5, #42]!");
@@ -1043,9 +1040,8 @@
   COMPARE(strh(w24, MemOperand(x25, 255, PostIndex)), "strh w24, [x25], #255");
   COMPARE(strh(w26, MemOperand(cp, -256, PostIndex)),
           "strh w26, [cp], #-256");
-  // TODO(all): Fix this for jssp.
-  COMPARE(ldrh(w28, MemOperand(jssp, 3, PostIndex)), "ldrh w28, [jssp], #3");
-  COMPARE(strh(fp, MemOperand(jssp, -42, PreIndex)), "strh w29, [jssp, #-42]!");
+  COMPARE(ldrh(w28, MemOperand(x28, 3, PostIndex)), "ldrh w28, [x28], #3");
+  COMPARE(strh(fp, MemOperand(x28, -42, PreIndex)), "strh w29, [x28, #-42]!");
   COMPARE(ldrh(w30, MemOperand(x0, 255)), "ldurh w30, [x0, #255]");
   COMPARE(ldrh(x1, MemOperand(x2, -256)), "ldurh w1, [x2, #-256]");
   COMPARE(strh(w3, MemOperand(x4, 255)), "sturh w3, [x4, #255]");
@@ -1306,7 +1302,7 @@
   COMPARE(str(w22, MemOperand(x23, -256)), "stur w22, [x23, #-256]");
   COMPARE(str(x24, MemOperand(x25, 1)), "stur x24, [x25, #1]");
   COMPARE(str(x26, MemOperand(x27, -1)), "stur x26, [cp, #-1]");
-  COMPARE(str(x28, MemOperand(x29, 255)), "stur jssp, [fp, #255]");
+  COMPARE(str(x28, MemOperand(x29, 255)), "stur x28, [fp, #255]");
   COMPARE(str(x30, MemOperand(x0, -256)), "stur lr, [x0, #-256]");
   COMPARE(ldr(w0, MemOperand(csp, 1)), "ldur w0, [csp, #1]");
   COMPARE(str(x1, MemOperand(csp, -1)), "stur x1, [csp, #-1]");
@@ -1346,8 +1342,8 @@
   COMPARE(ldp(x21, x22, MemOperand(x23, -512)), "ldp x21, x22, [x23, #-512]");
   COMPARE(ldp(w24, w25, MemOperand(x26, 252, PreIndex)),
           "ldp w24, w25, [x26, #252]!");
-  COMPARE(ldp(cp, jssp, MemOperand(fp, 504, PreIndex)),
-          "ldp cp, jssp, [fp, #504]!");
+  COMPARE(ldp(cp, x28, MemOperand(fp, 504, PreIndex)),
+          "ldp cp, x28, [fp, #504]!");
   COMPARE(ldp(w30, w0, MemOperand(x1, -256, PreIndex)),
           "ldp w30, w0, [x1, #-256]!");
   COMPARE(ldp(x2, x3, MemOperand(x4, -512, PreIndex)),
@@ -1364,8 +1360,8 @@
   COMPARE(ldp(s17, s18, MemOperand(x19)), "ldp s17, s18, [x19]");
   COMPARE(ldp(s20, s21, MemOperand(x22, 252)), "ldp s20, s21, [x22, #252]");
   COMPARE(ldp(s23, s24, MemOperand(x25, -256)), "ldp s23, s24, [x25, #-256]");
-  COMPARE(ldp(s26, s27, MemOperand(jssp, 252, PreIndex)),
-          "ldp s26, s27, [jssp, #252]!");
+  COMPARE(ldp(s26, s27, MemOperand(x28, 252, PreIndex)),
+          "ldp s26, s27, [x28, #252]!");
   COMPARE(ldp(s29, s30, MemOperand(fp, -256, PreIndex)),
           "ldp s29, s30, [fp, #-256]!");
   COMPARE(ldp(s31, s0, MemOperand(x1, 252, PostIndex)),
@@ -1375,8 +1371,8 @@
   COMPARE(ldp(d17, d18, MemOperand(x19)), "ldp d17, d18, [x19]");
   COMPARE(ldp(d20, d21, MemOperand(x22, 504)), "ldp d20, d21, [x22, #504]");
   COMPARE(ldp(d23, d24, MemOperand(x25, -512)), "ldp d23, d24, [x25, #-512]");
-  COMPARE(ldp(d26, d27, MemOperand(jssp, 504, PreIndex)),
-          "ldp d26, d27, [jssp, #504]!");
+  COMPARE(ldp(d26, d27, MemOperand(x28, 504, PreIndex)),
+          "ldp d26, d27, [x28, #504]!");
   COMPARE(ldp(d29, d30, MemOperand(fp, -512, PreIndex)),
           "ldp d29, d30, [fp, #-512]!");
   COMPARE(ldp(d31, d0, MemOperand(x1, 504, PostIndex)),
@@ -1394,8 +1390,8 @@
   COMPARE(stp(x21, x22, MemOperand(x23, -512)), "stp x21, x22, [x23, #-512]");
   COMPARE(stp(w24, w25, MemOperand(x26, 252, PreIndex)),
           "stp w24, w25, [x26, #252]!");
-  COMPARE(stp(cp, jssp, MemOperand(fp, 504, PreIndex)),
-          "stp cp, jssp, [fp, #504]!");
+  COMPARE(stp(cp, x28, MemOperand(fp, 504, PreIndex)),
+          "stp cp, x28, [fp, #504]!");
   COMPARE(stp(w30, w0, MemOperand(x1, -256, PreIndex)),
           "stp w30, w0, [x1, #-256]!");
   COMPARE(stp(x2, x3, MemOperand(x4, -512, PreIndex)),
@@ -1412,8 +1408,8 @@
   COMPARE(stp(s17, s18, MemOperand(x19)), "stp s17, s18, [x19]");
   COMPARE(stp(s20, s21, MemOperand(x22, 252)), "stp s20, s21, [x22, #252]");
   COMPARE(stp(s23, s24, MemOperand(x25, -256)), "stp s23, s24, [x25, #-256]");
-  COMPARE(stp(s26, s27, MemOperand(jssp, 252, PreIndex)),
-          "stp s26, s27, [jssp, #252]!");
+  COMPARE(stp(s26, s27, MemOperand(x28, 252, PreIndex)),
+          "stp s26, s27, [x28, #252]!");
   COMPARE(stp(s29, s30, MemOperand(fp, -256, PreIndex)),
           "stp s29, s30, [fp, #-256]!");
   COMPARE(stp(s31, s0, MemOperand(x1, 252, PostIndex)),
@@ -1423,8 +1419,8 @@
   COMPARE(stp(d17, d18, MemOperand(x19)), "stp d17, d18, [x19]");
   COMPARE(stp(d20, d21, MemOperand(x22, 504)), "stp d20, d21, [x22, #504]");
   COMPARE(stp(d23, d24, MemOperand(x25, -512)), "stp d23, d24, [x25, #-512]");
-  COMPARE(stp(d26, d27, MemOperand(jssp, 504, PreIndex)),
-          "stp d26, d27, [jssp, #504]!");
+  COMPARE(stp(d26, d27, MemOperand(x28, 504, PreIndex)),
+          "stp d26, d27, [x28, #504]!");
   COMPARE(stp(d29, d30, MemOperand(fp, -512, PreIndex)),
           "stp d29, d30, [fp, #-512]!");
   COMPARE(stp(d31, d0, MemOperand(x1, 504, PostIndex)),
@@ -1444,16 +1440,15 @@
   COMPARE(stp(q23, q24, MemOperand(x25, -1024, PostIndex)),
           "stp q23, q24, [x25], #-1024");
 
-  COMPARE(ldp(w16, w17, MemOperand(jssp, 4, PostIndex)),
-          "ldp w16, w17, [jssp], #4");
-  COMPARE(stp(x18, x19, MemOperand(jssp, -8, PreIndex)),
-          "stp x18, x19, [jssp, #-8]!");
-  COMPARE(ldp(s30, s31, MemOperand(jssp, 12, PostIndex)),
-          "ldp s30, s31, [jssp], #12");
-  COMPARE(stp(d30, d31, MemOperand(jssp, -16)),
-          "stp d30, d31, [jssp, #-16]");
-  COMPARE(ldp(q30, q31, MemOperand(jssp, 32, PostIndex)),
-          "ldp q30, q31, [jssp], #32");
+  COMPARE(ldp(w16, w17, MemOperand(x28, 4, PostIndex)),
+          "ldp w16, w17, [x28], #4");
+  COMPARE(stp(x18, x19, MemOperand(x28, -8, PreIndex)),
+          "stp x18, x19, [x28, #-8]!");
+  COMPARE(ldp(s30, s31, MemOperand(x28, 12, PostIndex)),
+          "ldp s30, s31, [x28], #12");
+  COMPARE(stp(d30, d31, MemOperand(x28, -16)), "stp d30, d31, [x28, #-16]");
+  COMPARE(ldp(q30, q31, MemOperand(x28, 32, PostIndex)),
+          "ldp q30, q31, [x28], #32");
 
   COMPARE(ldpsw(x0, x1, MemOperand(x2)), "ldpsw x0, x1, [x2]");
   COMPARE(ldpsw(x3, x4, MemOperand(x5, 16)), "ldpsw x3, x4, [x5, #16]");
@@ -1490,9 +1485,9 @@
   COMPARE(ldaxrb(wzr, csp), "ldaxrb wzr, [csp]");
   COMPARE(ldaxrh(wzr, csp), "ldaxrh wzr, [csp]");
   COMPARE(ldaxr(wzr, csp), "ldaxr wzr, [csp]");
-  COMPARE(stlxrb(wzr, wzr, csp), "stlxrb wzr, wzr, [csp]");
-  COMPARE(stlxrh(wzr, wzr, csp), "stlxrh wzr, wzr, [csp]");
-  COMPARE(stlxr(wzr, wzr, csp), "stlxr wzr, wzr, [csp]");
+  COMPARE(stlxrb(w0, wzr, csp), "stlxrb w0, wzr, [csp]");
+  COMPARE(stlxrh(wzr, w1, csp), "stlxrh wzr, w1, [csp]");
+  COMPARE(stlxr(w2, wzr, csp), "stlxr w2, wzr, [csp]");
 
   CLEANUP();
 }
@@ -1804,7 +1799,7 @@
   COMPARE(fcvtzu(w6, s5, 32), "fcvtzu w6, s5, #32");
   COMPARE(fcvtpu(x24, d25), "fcvtpu x24, d25");
   COMPARE(fcvtpu(w26, d27), "fcvtpu w26, d27");
-  COMPARE(fcvtps(x28, d29), "fcvtps jssp, d29");
+  COMPARE(fcvtps(x28, d29), "fcvtps x28, d29");
   COMPARE(fcvtps(w30, d31), "fcvtps w30, d31");
   COMPARE(fcvtpu(x0, s1), "fcvtpu x0, s1");
   COMPARE(fcvtpu(w2, s3), "fcvtpu w2, s3");
@@ -1879,7 +1874,7 @@
 TEST_(debug) {
   SET_UP_ASM();
 
-  CHECK(kImmExceptionIsDebug == 0xdeb0);
+  CHECK_EQ(kImmExceptionIsDebug, 0xdeb0);
 
   // All debug codes should produce the same instruction, and the debug code
   // can be any uint32_t.
diff --git a/src/v8/test/cctest/test-disasm-ia32.cc b/src/v8/test/cctest/test-disasm-ia32.cc
index 84940c5..35638c7 100644
--- a/src/v8/test/cctest/test-disasm-ia32.cc
+++ b/src/v8/test/cctest/test-disasm-ia32.cc
@@ -53,7 +53,7 @@
   HandleScope scope(isolate);
   v8::internal::byte buffer[8192];
   Assembler assm(isolate, buffer, sizeof buffer);
-  DummyStaticFunction(NULL);  // just bloody use it (DELETE; debugging)
+  DummyStaticFunction(nullptr);  // just bloody use it (DELETE; debugging)
   // Short immediate instructions
   __ adc(eax, 12345678);
   __ add(eax, Immediate(12345678));
@@ -481,6 +481,8 @@
     __ maxsd(xmm1, Operand(ebx, ecx, times_4, 10000));
     __ ucomisd(xmm0, xmm1);
     __ cmpltsd(xmm0, xmm1);
+    __ haddps(xmm1, xmm0);
+    __ haddps(xmm1, Operand(ebx, ecx, times_4, 10000));
 
     __ andpd(xmm0, xmm1);
 
@@ -550,6 +552,8 @@
       __ pextrw(Operand(edx, 4), xmm0, 1);
       __ pextrd(eax, xmm0, 1);
       __ pextrd(Operand(edx, 4), xmm0, 1);
+      __ insertps(xmm1, xmm2, 0);
+      __ insertps(xmm1, Operand(edx, 4), 0);
       __ pinsrb(xmm1, eax, 0);
       __ pinsrb(xmm1, Operand(edx, 4), 0);
       __ pinsrd(xmm1, eax, 0);
@@ -611,6 +615,9 @@
       __ vrcpps(xmm1, Operand(ebx, ecx, times_4, 10000));
       __ vrsqrtps(xmm1, xmm0);
       __ vrsqrtps(xmm1, Operand(ebx, ecx, times_4, 10000));
+      __ vmovaps(xmm0, xmm1);
+      __ vshufps(xmm0, xmm1, xmm2, 3);
+      __ vshufps(xmm0, xmm1, Operand(edx, 4), 3);
 
       __ vcmpeqps(xmm5, xmm4, xmm1);
       __ vcmpeqps(xmm5, xmm4, Operand(ebx, ecx, times_4, 10000));
@@ -655,6 +662,8 @@
       __ vpextrw(Operand(edx, 4), xmm0, 1);
       __ vpextrd(eax, xmm0, 1);
       __ vpextrd(Operand(edx, 4), xmm0, 1);
+      __ vinsertps(xmm0, xmm1, xmm2, 0);
+      __ vinsertps(xmm0, xmm1, Operand(edx, 4), 0);
       __ vpinsrb(xmm0, xmm1, eax, 0);
       __ vpinsrb(xmm0, xmm1, Operand(edx, 4), 0);
       __ vpinsrw(xmm0, xmm1, eax, 0);
@@ -667,6 +676,8 @@
       __ vcvttps2dq(xmm1, xmm0);
       __ vcvttps2dq(xmm1, Operand(ebx, ecx, times_4, 10000));
 
+      __ vmovdqu(xmm0, Operand(ebx, ecx, times_4, 10000));
+      __ vmovdqu(Operand(ebx, ecx, times_4, 10000), xmm0);
       __ vmovd(xmm0, edi);
       __ vmovd(xmm0, Operand(ebx, ecx, times_4, 10000));
       __ vmovd(eax, xmm1);
diff --git a/src/v8/test/cctest/test-disasm-mips.cc b/src/v8/test/cctest/test-disasm-mips.cc
index 04f007f..e394f94 100644
--- a/src/v8/test/cctest/test-disasm-mips.cc
+++ b/src/v8/test/cctest/test-disasm-mips.cc
@@ -144,14 +144,14 @@
 #define COMPARE_PC_JUMP(asm_, compare_string, target)                          \
   {                                                                            \
     int pc_offset = assm.pc_offset();                                          \
-    byte *progcounter = &buffer[pc_offset];                                    \
+    byte* progcounter = &buffer[pc_offset];                                    \
     char str_with_address[100];                                                \
     int instr_index = (target >> 2) & kImm26Mask;                              \
     snprintf(                                                                  \
         str_with_address, sizeof(str_with_address), "%s %p -> %p",             \
-        compare_string, reinterpret_cast<void *>(target),                      \
-        reinterpret_cast<void *>(((uint32_t)(progcounter + 4) & ~0xfffffff) |  \
-                                 (instr_index << 2)));                         \
+        compare_string, reinterpret_cast<void*>(target),                       \
+        reinterpret_cast<void*>(((uint32_t)(progcounter + 4) & ~0xFFFFFFF) |   \
+                                (instr_index << 2)));                          \
     assm.asm_;                                                                 \
     if (!DisassembleAndCompare(progcounter, str_with_address)) failure = true; \
   }
@@ -159,11 +159,10 @@
 #define GET_PC_REGION(pc_region)                                         \
   {                                                                      \
     int pc_offset = assm.pc_offset();                                    \
-    byte *progcounter = &buffer[pc_offset];                              \
-    pc_region = reinterpret_cast<int32_t>(progcounter + 4) & ~0xfffffff; \
+    byte* progcounter = &buffer[pc_offset];                              \
+    pc_region = reinterpret_cast<int32_t>(progcounter + 4) & ~0xFFFFFFF; \
   }
 
-
 TEST(Type0) {
   SET_UP();
 
@@ -504,12 +503,12 @@
 
   int32_t target = pc_region | 0x4;
   COMPARE_PC_JUMP(j(target), "08000001       j      ", target);
-  target = pc_region | 0xffffffc;
+  target = pc_region | 0xFFFFFFC;
   COMPARE_PC_JUMP(j(target), "0bffffff       j      ", target);
 
   target = pc_region | 0x4;
   COMPARE_PC_JUMP(jal(target), "0c000001       jal    ", target);
-  target = pc_region | 0xffffffc;
+  target = pc_region | 0xFFFFFFC;
   COMPARE_PC_JUMP(jal(target), "0fffffff       jal    ", target);
 
   COMPARE(addiu(a0, a1, 0x0),
diff --git a/src/v8/test/cctest/test-disasm-mips64.cc b/src/v8/test/cctest/test-disasm-mips64.cc
index 0405a82..0a16e86 100644
--- a/src/v8/test/cctest/test-disasm-mips64.cc
+++ b/src/v8/test/cctest/test-disasm-mips64.cc
@@ -144,14 +144,14 @@
 #define COMPARE_PC_JUMP(asm_, compare_string, target)                          \
   {                                                                            \
     int pc_offset = assm.pc_offset();                                          \
-    byte *progcounter = &buffer[pc_offset];                                    \
+    byte* progcounter = &buffer[pc_offset];                                    \
     char str_with_address[100];                                                \
     int instr_index = (target >> 2) & kImm26Mask;                              \
     snprintf(                                                                  \
         str_with_address, sizeof(str_with_address), "%s %p -> %p",             \
-        compare_string, reinterpret_cast<void *>(target),                      \
-        reinterpret_cast<void *>(((uint64_t)(progcounter + 1) & ~0xfffffff) |  \
-                                 (instr_index << 2)));                         \
+        compare_string, reinterpret_cast<void*>(target),                       \
+        reinterpret_cast<void*>(((uint64_t)(progcounter + 1) & ~0xFFFFFFF) |   \
+                                (instr_index << 2)));                          \
     assm.asm_;                                                                 \
     if (!DisassembleAndCompare(progcounter, str_with_address)) failure = true; \
   }
@@ -159,11 +159,10 @@
 #define GET_PC_REGION(pc_region)                                         \
   {                                                                      \
     int pc_offset = assm.pc_offset();                                    \
-    byte *progcounter = &buffer[pc_offset];                              \
-    pc_region = reinterpret_cast<int64_t>(progcounter + 4) & ~0xfffffff; \
+    byte* progcounter = &buffer[pc_offset];                              \
+    pc_region = reinterpret_cast<int64_t>(progcounter + 4) & ~0xFFFFFFF; \
   }
 
-
 TEST(Type0) {
   SET_UP();
 
@@ -972,7 +971,7 @@
                            "60a48000       bnvc  a1, a0, -32768", -32768);
 
     COMPARE_PC_REL_COMPACT(beqzc(a0, 0), "d8800000       beqzc   a0, 0", 0);
-    COMPARE_PC_REL_COMPACT(beqzc(a0, 1048575),  // 0x0fffff ==  1048575.
+    COMPARE_PC_REL_COMPACT(beqzc(a0, 1048575),  // 0x0FFFFF ==  1048575.
                            "d88fffff       beqzc   a0, 1048575", 1048575);
     COMPARE_PC_REL_COMPACT(beqzc(a0, -1048576),  // 0x100000 == -1048576.
                            "d8900000       beqzc   a0, -1048576", -1048576);
@@ -1184,12 +1183,12 @@
 
   int64_t target = pc_region | 0x4;
   COMPARE_PC_JUMP(j(target), "08000001       j      ", target);
-  target = pc_region | 0xffffffc;
+  target = pc_region | 0xFFFFFFC;
   COMPARE_PC_JUMP(j(target), "0bffffff       j      ", target);
 
   target = pc_region | 0x4;
   COMPARE_PC_JUMP(jal(target), "0c000001       jal    ", target);
-  target = pc_region | 0xffffffc;
+  target = pc_region | 0xFFFFFFC;
   COMPARE_PC_JUMP(jal(target), "0fffffff       jal    ", target);
 
   VERIFY_RUN();
diff --git a/src/v8/test/cctest/test-disasm-x64.cc b/src/v8/test/cctest/test-disasm-x64.cc
index 0c7ebbc..bbc1f89 100644
--- a/src/v8/test/cctest/test-disasm-x64.cc
+++ b/src/v8/test/cctest/test-disasm-x64.cc
@@ -54,7 +54,7 @@
   HandleScope scope(isolate);
   v8::internal::byte buffer[8192];
   Assembler assm(isolate, buffer, sizeof buffer);
-  DummyStaticFunction(NULL);  // just bloody use it (DELETE; debugging)
+  DummyStaticFunction(nullptr);  // just bloody use it (DELETE; debugging)
 
   // Short immediate instructions
   __ addq(rax, Immediate(12345678));
@@ -386,6 +386,10 @@
     __ cvtsd2ss(xmm0, xmm1);
     __ cvtsd2ss(xmm0, Operand(rbx, rcx, times_4, 10000));
     __ movaps(xmm0, xmm1);
+    __ movdqa(xmm0, Operand(rsp, 12));
+    __ movdqa(Operand(rsp, 12), xmm0);
+    __ movdqu(xmm0, Operand(rsp, 12));
+    __ movdqu(Operand(rsp, 12), xmm0);
     __ shufps(xmm0, xmm9, 0x0);
 
     // logic operation
@@ -451,6 +455,8 @@
     __ maxsd(xmm1, xmm0);
     __ maxsd(xmm1, Operand(rbx, rcx, times_4, 10000));
     __ ucomisd(xmm0, xmm1);
+    __ haddps(xmm1, xmm0);
+    __ haddps(xmm1, Operand(rbx, rcx, times_4, 10000));
 
     __ andpd(xmm0, xmm1);
     __ andpd(xmm0, Operand(rbx, rcx, times_4, 10000));
diff --git a/src/v8/test/cctest/test-diy-fp.cc b/src/v8/test/cctest/test-diy-fp.cc
index 50c2621..d46d051 100644
--- a/src/v8/test/cctest/test-diy-fp.cc
+++ b/src/v8/test/cctest/test-diy-fp.cc
@@ -41,10 +41,10 @@
   DiyFp diy_fp2 = DiyFp(1, 0);
   DiyFp diff = DiyFp::Minus(diy_fp1, diy_fp2);
 
-  CHECK(2 == diff.f());  // NOLINT
+  CHECK_EQ(2, diff.f());
   CHECK_EQ(0, diff.e());
   diy_fp1.Subtract(diy_fp2);
-  CHECK(2 == diy_fp1.f());  // NOLINT
+  CHECK_EQ(2, diy_fp1.f());
   CHECK_EQ(0, diy_fp1.e());
 }
 
@@ -54,29 +54,29 @@
   DiyFp diy_fp2 = DiyFp(2, 0);
   DiyFp product = DiyFp::Times(diy_fp1, diy_fp2);
 
-  CHECK(0 == product.f());  // NOLINT
+  CHECK_EQ(0, product.f());
   CHECK_EQ(64, product.e());
   diy_fp1.Multiply(diy_fp2);
-  CHECK(0 == diy_fp1.f());  // NOLINT
+  CHECK_EQ(0, diy_fp1.f());
   CHECK_EQ(64, diy_fp1.e());
 
   diy_fp1 = DiyFp(V8_2PART_UINT64_C(0x80000000, 00000000), 11);
   diy_fp2 = DiyFp(2, 13);
   product = DiyFp::Times(diy_fp1, diy_fp2);
-  CHECK(1 == product.f());  // NOLINT
+  CHECK_EQ(1, product.f());
   CHECK_EQ(11 + 13 + 64, product.e());
 
   // Test rounding.
   diy_fp1 = DiyFp(V8_2PART_UINT64_C(0x80000000, 00000001), 11);
   diy_fp2 = DiyFp(1, 13);
   product = DiyFp::Times(diy_fp1, diy_fp2);
-  CHECK(1 == product.f());  // NOLINT
+  CHECK_EQ(1, product.f());
   CHECK_EQ(11 + 13 + 64, product.e());
 
-  diy_fp1 = DiyFp(V8_2PART_UINT64_C(0x7fffffff, ffffffff), 11);
+  diy_fp1 = DiyFp(V8_2PART_UINT64_C(0x7FFFFFFF, FFFFFFFF), 11);
   diy_fp2 = DiyFp(1, 13);
   product = DiyFp::Times(diy_fp1, diy_fp2);
-  CHECK(0 == product.f());  // NOLINT
+  CHECK_EQ(0, product.f());
   CHECK_EQ(11 + 13 + 64, product.e());
 
   // Halfway cases are allowed to round either way. So don't check for it.
@@ -84,9 +84,9 @@
   // Big numbers.
   diy_fp1 = DiyFp(V8_2PART_UINT64_C(0xFFFFFFFF, FFFFFFFF), 11);
   diy_fp2 = DiyFp(V8_2PART_UINT64_C(0xFFFFFFFF, FFFFFFFF), 13);
-  // 128bit result: 0xfffffffffffffffe0000000000000001
+  // 128bit result: 0xFFFFFFFFFFFFFFFE0000000000000001
   product = DiyFp::Times(diy_fp1, diy_fp2);
-  CHECK(V8_2PART_UINT64_C(0xFFFFFFFF, FFFFFFFe) == product.f());
+  CHECK(V8_2PART_UINT64_C(0xFFFFFFFF, FFFFFFFE) == product.f());
   CHECK_EQ(11 + 13 + 64, product.e());
 }
 
diff --git a/src/v8/test/cctest/test-double.cc b/src/v8/test/cctest/test-double.cc
index d0d8bf1..46d6d55 100644
--- a/src/v8/test/cctest/test-double.cc
+++ b/src/v8/test/cctest/test-double.cc
@@ -45,7 +45,7 @@
   uint64_t min_double64 = V8_2PART_UINT64_C(0x00000000, 00000001);
   CHECK_EQ(5e-324, Double(min_double64).value());
 
-  uint64_t max_double64 = V8_2PART_UINT64_C(0x7fefffff, ffffffff);
+  uint64_t max_double64 = V8_2PART_UINT64_C(0x7FEFFFFF, FFFFFFFF);
   CHECK_EQ(1.7976931348623157e308, Double(max_double64).value());
 }
 
@@ -61,12 +61,12 @@
   diy_fp = Double(min_double64).AsDiyFp();
   CHECK_EQ(-0x3FF - 52 + 1, diy_fp.e());
   // This is a denormal; so no hidden bit.
-  CHECK(1 == diy_fp.f());  // NOLINT
+  CHECK_EQ(1, diy_fp.f());
 
-  uint64_t max_double64 = V8_2PART_UINT64_C(0x7fefffff, ffffffff);
+  uint64_t max_double64 = V8_2PART_UINT64_C(0x7FEFFFFF, FFFFFFFF);
   diy_fp = Double(max_double64).AsDiyFp();
   CHECK_EQ(0x7FE - 0x3FF - 52, diy_fp.e());
-  CHECK(V8_2PART_UINT64_C(0x001fffff, ffffffff) == diy_fp.f());  // NOLINT
+  CHECK(V8_2PART_UINT64_C(0x001FFFFF, FFFFFFFF) == diy_fp.f());  // NOLINT
 }
 
 
@@ -83,10 +83,10 @@
   // This is a denormal; so no hidden bit.
   CHECK(V8_2PART_UINT64_C(0x80000000, 00000000) == diy_fp.f());  // NOLINT
 
-  uint64_t max_double64 = V8_2PART_UINT64_C(0x7fefffff, ffffffff);
+  uint64_t max_double64 = V8_2PART_UINT64_C(0x7FEFFFFF, FFFFFFFF);
   diy_fp = Double(max_double64).AsNormalizedDiyFp();
   CHECK_EQ(0x7FE - 0x3FF - 52 - 11, diy_fp.e());
-  CHECK((V8_2PART_UINT64_C(0x001fffff, ffffffff) << 11) ==
+  CHECK((V8_2PART_UINT64_C(0x001FFFFF, FFFFFFFF) << 11) ==
         diy_fp.f());  // NOLINT
 }
 
@@ -202,7 +202,7 @@
   CHECK(diy_fp.f() - boundary_minus.f() == boundary_plus.f() - diy_fp.f());
   CHECK((1 << 11) == diy_fp.f() - boundary_minus.f());  // NOLINT
 
-  uint64_t max_double64 = V8_2PART_UINT64_C(0x7fefffff, ffffffff);
+  uint64_t max_double64 = V8_2PART_UINT64_C(0x7FEFFFFF, FFFFFFFF);
   diy_fp = Double(max_double64).AsNormalizedDiyFp();
   Double(max_double64).NormalizedBoundaries(&boundary_minus, &boundary_plus);
   CHECK_EQ(diy_fp.e(), boundary_minus.e());
@@ -226,7 +226,7 @@
   CHECK_EQ(4e-324, d2.NextDouble());
   CHECK_EQ(-1.7976931348623157e308, Double(-V8_INFINITY).NextDouble());
   CHECK_EQ(V8_INFINITY,
-           Double(V8_2PART_UINT64_C(0x7fefffff, ffffffff)).NextDouble());
+           Double(V8_2PART_UINT64_C(0x7FEFFFFF, FFFFFFFF)).NextDouble());
 }
 
 }  // namespace internal
diff --git a/src/v8/test/cctest/test-elements-kind.cc b/src/v8/test/cctest/test-elements-kind.cc
index b1d86e6..ae06f6d 100644
--- a/src/v8/test/cctest/test-elements-kind.cc
+++ b/src/v8/test/cctest/test-elements-kind.cc
@@ -75,7 +75,8 @@
 
   Handle<FixedArray> empty_fixed_array(factory->empty_fixed_array());
   Handle<PropertyArray> empty_property_array(factory->empty_property_array());
-  Handle<JSFunction> function = factory->NewFunction(factory->empty_string());
+  Handle<JSFunction> function =
+      factory->NewFunctionForTest(factory->empty_string());
   Handle<Object> value(Smi::FromInt(42), isolate);
 
   Handle<JSObject> object = factory->NewJSObject(function);
@@ -104,7 +105,8 @@
 
   Handle<FixedArray> empty_fixed_array(factory->empty_fixed_array());
   Handle<PropertyArray> empty_property_array(factory->empty_property_array());
-  Handle<JSFunction> function = factory->NewFunction(factory->empty_string());
+  Handle<JSFunction> function =
+      factory->NewFunctionForTest(factory->empty_string());
   int nof_inobject_properties = 10;
   // force in object properties by changing the expected_nof_properties
   function->shared()->set_expected_nof_properties(nof_inobject_properties);
@@ -151,7 +153,8 @@
   Handle<String> name;
   Handle<FixedArray> empty_fixed_array(factory->empty_fixed_array());
   Handle<PropertyArray> empty_property_array(factory->empty_property_array());
-  Handle<JSFunction> function = factory->NewFunction(factory->empty_string());
+  Handle<JSFunction> function =
+      factory->NewFunctionForTest(factory->empty_string());
   Handle<Object> value(Smi::FromInt(42), isolate);
 
   Handle<JSObject> object = factory->NewJSObject(function);
diff --git a/src/v8/test/cctest/test-feedback-vector.cc b/src/v8/test/cctest/test-feedback-vector.cc
index 119ca4c..e590b60 100644
--- a/src/v8/test/cctest/test-feedback-vector.cc
+++ b/src/v8/test/cctest/test-feedback-vector.cc
@@ -257,12 +257,12 @@
 
   CompileRun("f(foo); f(foo);");
   CHECK_EQ(MONOMORPHIC, nexus.StateFromFeedback());
-  CHECK_EQ(3, nexus.ExtractCallCount());
+  CHECK_EQ(3, nexus.GetCallCount());
 
   // Send the IC megamorphic, but we should still have incrementing counts.
   CompileRun("f(function() { return 12; });");
   CHECK_EQ(GENERIC, nexus.StateFromFeedback());
-  CHECK_EQ(4, nexus.ExtractCallCount());
+  CHECK_EQ(4, nexus.GetCallCount());
 }
 
 TEST(VectorConstructCounts) {
@@ -288,12 +288,42 @@
 
   CompileRun("f(Foo); f(Foo);");
   CHECK_EQ(MONOMORPHIC, nexus.StateFromFeedback());
-  CHECK_EQ(3, nexus.ExtractCallCount());
+  CHECK_EQ(3, nexus.GetCallCount());
 
   // Send the IC megamorphic, but we should still have incrementing counts.
   CompileRun("f(function() {});");
   CHECK_EQ(GENERIC, nexus.StateFromFeedback());
-  CHECK_EQ(4, nexus.ExtractCallCount());
+  CHECK_EQ(4, nexus.GetCallCount());
+}
+
+TEST(VectorSpeculationMode) {
+  if (i::FLAG_always_opt) return;
+  CcTest::InitializeVM();
+  LocalContext context;
+  v8::HandleScope scope(context->GetIsolate());
+  Isolate* isolate = CcTest::i_isolate();
+
+  // Make sure function f has a call that uses a type feedback slot.
+  CompileRun(
+      "function Foo() {}"
+      "function f(a) { new a(); } f(Foo);");
+  Handle<JSFunction> f = GetFunction("f");
+  Handle<FeedbackVector> feedback_vector =
+      Handle<FeedbackVector>(f->feedback_vector(), isolate);
+
+  FeedbackSlot slot(0);
+  CallICNexus nexus(feedback_vector, slot);
+  CHECK_EQ(SpeculationMode::kAllowSpeculation, nexus.GetSpeculationMode());
+
+  CompileRun("f(Foo); f(Foo);");
+  CHECK_EQ(3, nexus.GetCallCount());
+  CHECK_EQ(SpeculationMode::kAllowSpeculation, nexus.GetSpeculationMode());
+
+  nexus.SetSpeculationMode(SpeculationMode::kAllowSpeculation);
+  nexus.SetSpeculationMode(SpeculationMode::kDisallowSpeculation);
+  CHECK_EQ(SpeculationMode::kDisallowSpeculation, nexus.GetSpeculationMode());
+  nexus.SetSpeculationMode(SpeculationMode::kAllowSpeculation);
+  CHECK_EQ(SpeculationMode::kAllowSpeculation, nexus.GetSpeculationMode());
 }
 
 TEST(VectorLoadICStates) {
@@ -574,9 +604,9 @@
     CHECK_SLOT_KIND(helper, 1, FeedbackSlotKind::kStoreNamedStrict);
     CHECK_SLOT_KIND(helper, 2, FeedbackSlotKind::kStoreNamedStrict);
     CHECK_SLOT_KIND(helper, 3, FeedbackSlotKind::kStoreNamedStrict);
-    CHECK_SLOT_KIND(helper, 4, FeedbackSlotKind::kLoadProperty);
+    CHECK_SLOT_KIND(helper, 4, FeedbackSlotKind::kBinaryOp);
     CHECK_SLOT_KIND(helper, 5, FeedbackSlotKind::kLoadProperty);
-    CHECK_SLOT_KIND(helper, 6, FeedbackSlotKind::kBinaryOp);
+    CHECK_SLOT_KIND(helper, 6, FeedbackSlotKind::kLoadProperty);
   }
 }
 
diff --git a/src/v8/test/cctest/test-field-type-tracking.cc b/src/v8/test/cctest/test-field-type-tracking.cc
index 6a390f7..8736c9c 100644
--- a/src/v8/test/cctest/test-field-type-tracking.cc
+++ b/src/v8/test/cctest/test-field-type-tracking.cc
@@ -66,11 +66,11 @@
   Handle<AccessorPair> pair = factory->NewAccessorPair();
   Handle<String> empty_string = factory->empty_string();
   if (with_getter) {
-    Handle<JSFunction> func = factory->NewFunction(empty_string);
+    Handle<JSFunction> func = factory->NewFunctionForTest(empty_string);
     pair->set_getter(*func);
   }
   if (with_setter) {
-    Handle<JSFunction> func = factory->NewFunction(empty_string);
+    Handle<JSFunction> func = factory->NewFunctionForTest(empty_string);
     pair->set_setter(*func);
   }
   return pair;
@@ -110,6 +110,20 @@
     CHECK(index < MAX_PROPERTIES);
     kinds_[index] = kind;
     locations_[index] = location;
+    if (kind == kData && location == kField &&
+        IsTransitionableFastElementsKind(elements_kind_) &&
+        Map::IsInplaceGeneralizableField(constness, representation,
+                                         FieldType::cast(*value))) {
+      // Maps with transitionable elements kinds must have non in-place
+      // generalizable fields.
+      if (FLAG_track_constant_fields && FLAG_modify_map_inplace &&
+          constness == kConst) {
+        constness = kMutable;
+      }
+      if (representation.IsHeapObject() && !FieldType::cast(*value)->IsAny()) {
+        value = FieldType::Any(isolate_);
+      }
+    }
     constnesses_[index] = constness;
     attributes_[index] = attributes;
     representations_[index] = representation;
@@ -318,27 +332,14 @@
   Handle<Map> AddDataField(Handle<Map> map, PropertyAttributes attributes,
                            PropertyConstness constness,
                            Representation representation,
-                           Handle<FieldType> heap_type) {
+                           Handle<FieldType> field_type) {
     CHECK_EQ(number_of_properties_, map->NumberOfOwnDescriptors());
     int property_index = number_of_properties_++;
-    PropertyConstness expected_constness = constness;
-    Representation expected_representation = representation;
-    Handle<FieldType> expected_heap_type = heap_type;
-    if (IsTransitionableFastElementsKind(map->elements_kind())) {
-      // Maps with transitionable elements kinds must have non in-place
-      // generalizable fields.
-      if (FLAG_track_constant_fields && FLAG_modify_map_inplace) {
-        expected_constness = kMutable;
-      }
-      if (representation.IsHeapObject() && heap_type->IsClass()) {
-        expected_heap_type = FieldType::Any(isolate_);
-      }
-    }
-    SetDataField(property_index, attributes, expected_constness,
-                 expected_representation, expected_heap_type);
+    SetDataField(property_index, attributes, constness, representation,
+                 field_type);
 
     Handle<String> name = MakeName("prop", property_index);
-    return Map::CopyWithField(map, name, heap_type, attributes, constness,
+    return Map::CopyWithField(map, name, field_type, attributes, constness,
                               representation, INSERT_TRANSITION)
         .ToHandleChecked();
   }
@@ -400,7 +401,7 @@
     Handle<String> name = MakeName("prop", property_index);
     Map* target =
         TransitionsAccessor(map).SearchTransition(*name, kData, attributes);
-    CHECK(target != NULL);
+    CHECK_NOT_NULL(target);
     return handle(target);
   }
 
@@ -608,7 +609,7 @@
 
   CHECK(detach_property_at_index >= -1 &&
         detach_property_at_index < kPropCount);
-  CHECK(property_index < kPropCount);
+  CHECK_LT(property_index, kPropCount);
   CHECK_NE(detach_property_at_index, property_index);
 
   const bool is_detached_map = detach_property_at_index >= 0;
@@ -1404,7 +1405,7 @@
   Expectations expectations(isolate);
 
   const int kSplitProp = 2;
-  CHECK(kSplitProp < kCustomPropIndex);
+  CHECK_LT(kSplitProp, kCustomPropIndex);
 
   const PropertyConstness constness = kMutable;
   const Representation representation = Representation::Smi();
@@ -1483,7 +1484,7 @@
     TestConfig() {
       Isolate* isolate = CcTest::i_isolate();
       Factory* factory = isolate->factory();
-      js_func_ = factory->NewFunction(factory->empty_string());
+      js_func_ = factory->NewFunctionForTest(factory->empty_string());
     }
 
     Handle<Map> AddPropertyAtBranch(int branch_id, Expectations& expectations,
@@ -1569,7 +1570,7 @@
     TestConfig() {
       Isolate* isolate = CcTest::i_isolate();
       Factory* factory = isolate->factory();
-      js_func_ = factory->NewFunction(factory->empty_string());
+      js_func_ = factory->NewFunctionForTest(factory->empty_string());
       pair_ = CreateAccessorPair(true, true);
     }
 
@@ -1716,6 +1717,7 @@
 
   // Create a map, add required properties to it and initialize expectations.
   Handle<Map> initial_map = Map::Create(isolate, 0);
+  initial_map->set_instance_type(JS_ARRAY_TYPE);
   initial_map->set_elements_kind(PACKED_SMI_ELEMENTS);
 
   Handle<Map> map = initial_map;
@@ -1809,6 +1811,7 @@
 
   // Create a map, add required properties to it and initialize expectations.
   Handle<Map> initial_map = Map::Create(isolate, 0);
+  initial_map->set_instance_type(JS_ARRAY_TYPE);
   initial_map->set_elements_kind(PACKED_SMI_ELEMENTS);
 
   Handle<Map> map = initial_map;
@@ -1991,7 +1994,6 @@
         {kConst, Representation::HeapObject(), current_type},
         {kConst, Representation::HeapObject(), new_type},
         {kConst, Representation::HeapObject(), expected_type});
-
     if (FLAG_modify_map_inplace) {
       // kConst to kMutable migration does not create a new map, therefore
       // trivial generalization.
@@ -2119,7 +2121,7 @@
       Handle<String> name = MakeName("prop", i);
       Map* target =
           TransitionsAccessor(map2).SearchTransition(*name, kData, NONE);
-      CHECK(target != NULL);
+      CHECK_NOT_NULL(target);
       map2 = handle(target);
     }
 
@@ -2641,7 +2643,8 @@
   Isolate* isolate = CcTest::i_isolate();
   Factory* factory = isolate->factory();
 
-  Handle<JSFunction> js_func = factory->NewFunction(factory->empty_string());
+  Handle<JSFunction> js_func =
+      factory->NewFunctionForTest(factory->empty_string());
   TransitionToDataConstantOperator transition_op(js_func);
 
   SameMapChecker checker;
@@ -2688,7 +2691,8 @@
   Factory* factory = isolate->factory();
   Handle<FieldType> any_type = FieldType::Any(isolate);
 
-  Handle<JSFunction> js_func1 = factory->NewFunction(factory->empty_string());
+  Handle<JSFunction> js_func1 =
+      factory->NewFunctionForTest(factory->empty_string());
   TransitionToDataConstantOperator transition_op1(js_func1);
 
   Handle<Object> value2 = isolate->factory()->NewHeapNumber(0);
@@ -2724,7 +2728,7 @@
   CHECK_EQ(kHoleNanInt64, mhn->value_as_bits());
 
   mhn = isolate->factory()->NewHeapNumber(0.0, MUTABLE);
-  CHECK_EQ(V8_UINT64_C(0), mhn->value_as_bits());
+  CHECK_EQ(uint64_t{0}, mhn->value_as_bits());
 
   mhn->set_value_as_bits(kHoleNanInt64);
   CHECK_EQ(kHoleNanInt64, mhn->value_as_bits());
diff --git a/src/v8/test/cctest/test-func-name-inference.cc b/src/v8/test/cctest/test-func-name-inference.cc
index e5ccbc3..783ab3d 100644
--- a/src/v8/test/cctest/test-func-name-inference.cc
+++ b/src/v8/test/cctest/test-func-name-inference.cc
@@ -555,3 +555,31 @@
   script->Run(CcTest::isolate()->GetCurrentContext()).ToLocalChecked();
   CheckFunctionName(script, "return 2012", "");
 }
+
+TEST(IgnoreExtendsClause) {
+  CcTest::InitializeVM();
+  v8::HandleScope scope(CcTest::isolate());
+
+  v8::Local<v8::Script> script =
+      Compile(CcTest::isolate(),
+              "(function() {\n"
+              "  var foo = {};\n"
+              "  foo.C = class {}\n"
+              "  class D extends foo.C {}\n"
+              "  foo.bar = function() { return 1; };\n"
+              "})()");
+  script->Run(CcTest::isolate()->GetCurrentContext()).ToLocalChecked();
+  CheckFunctionName(script, "return 1", "foo.bar");
+}
+
+TEST(ParameterAndArrow) {
+  CcTest::InitializeVM();
+  v8::HandleScope scope(CcTest::isolate());
+
+  v8::Local<v8::Script> script = Compile(CcTest::isolate(),
+                                         "(function(param) {\n"
+                                         "  (() => { return 2017 })();\n"
+                                         "})()");
+  script->Run(CcTest::isolate()->GetCurrentContext()).ToLocalChecked();
+  CheckFunctionName(script, "return 2017", "");
+}
diff --git a/src/v8/test/cctest/test-global-handles.cc b/src/v8/test/cctest/test-global-handles.cc
index 4550618..f4a3072 100644
--- a/src/v8/test/cctest/test-global-handles.cc
+++ b/src/v8/test/cctest/test-global-handles.cc
@@ -36,6 +36,102 @@
 namespace v8 {
 namespace internal {
 
+namespace {
+
+void SimpleCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+  info.GetReturnValue().Set(v8_num(0));
+}
+
+struct FlagAndPersistent {
+  bool flag;
+  v8::Global<v8::Object> handle;
+};
+
+void ResetHandleAndSetFlag(
+    const v8::WeakCallbackInfo<FlagAndPersistent>& data) {
+  data.GetParameter()->handle.Reset();
+  data.GetParameter()->flag = true;
+}
+
+using ConstructFunction = void (*)(v8::Isolate* isolate,
+                                   v8::Local<v8::Context> context,
+                                   FlagAndPersistent* flag_and_persistent);
+
+void ConstructJSObject(v8::Isolate* isolate, v8::Local<v8::Context> context,
+                       FlagAndPersistent* flag_and_persistent) {
+  v8::HandleScope handle_scope(isolate);
+  v8::Local<v8::Object> object(v8::Object::New(isolate));
+  CHECK(!object.IsEmpty());
+  flag_and_persistent->handle.Reset(isolate, object);
+  CHECK(!flag_and_persistent->handle.IsEmpty());
+}
+
+void ConstructJSApiObject(v8::Isolate* isolate, v8::Local<v8::Context> context,
+                          FlagAndPersistent* flag_and_persistent) {
+  v8::HandleScope handle_scope(isolate);
+  v8::Local<v8::FunctionTemplate> fun =
+      v8::FunctionTemplate::New(isolate, SimpleCallback);
+  v8::Local<v8::Object> object = fun->GetFunction(context)
+                                     .ToLocalChecked()
+                                     ->NewInstance(context)
+                                     .ToLocalChecked();
+  CHECK(!object.IsEmpty());
+  flag_and_persistent->handle.Reset(isolate, object);
+  CHECK(!flag_and_persistent->handle.IsEmpty());
+}
+
+enum class SurvivalMode { kSurvives, kDies };
+
+template <typename ModifierFunction, typename GCFunction>
+void WeakHandleTest(v8::Isolate* isolate, ConstructFunction construct_function,
+                    ModifierFunction modifier_function, GCFunction gc_function,
+                    SurvivalMode survives) {
+  v8::HandleScope scope(isolate);
+  v8::Local<v8::Context> context = v8::Context::New(isolate);
+  v8::Context::Scope context_scope(context);
+
+  FlagAndPersistent fp;
+  construct_function(isolate, context, &fp);
+  {
+    v8::HandleScope scope(isolate);
+    v8::Local<v8::Object> tmp = v8::Local<v8::Object>::New(isolate, fp.handle);
+    CHECK(
+        CcTest::i_isolate()->heap()->InNewSpace(*v8::Utils::OpenHandle(*tmp)));
+  }
+
+  fp.handle.SetWeak(&fp, &ResetHandleAndSetFlag,
+                    v8::WeakCallbackType::kParameter);
+  fp.flag = false;
+  modifier_function(&fp);
+  gc_function();
+  CHECK_IMPLIES(survives == SurvivalMode::kSurvives, !fp.flag);
+  CHECK_IMPLIES(survives == SurvivalMode::kDies, fp.flag);
+}
+
+void ResurrectingFinalizer(
+    const v8::WeakCallbackInfo<v8::Global<v8::Object>>& data) {
+  data.GetParameter()->ClearWeak();
+}
+
+void ResettingFinalizer(
+    const v8::WeakCallbackInfo<v8::Global<v8::Object>>& data) {
+  data.GetParameter()->Reset();
+}
+
+void EmptyWeakCallback(const v8::WeakCallbackInfo<void>& data) {}
+
+void ResurrectingFinalizerSettingProperty(
+    const v8::WeakCallbackInfo<v8::Global<v8::Object>>& data) {
+  data.GetParameter()->ClearWeak();
+  v8::Local<v8::Object> o =
+      v8::Local<v8::Object>::New(data.GetIsolate(), *data.GetParameter());
+  o->Set(data.GetIsolate()->GetCurrentContext(), v8_str("finalizer"),
+         v8_str("was here"))
+      .FromJust();
+}
+
+}  // namespace
+
 TEST(EternalHandles) {
   CcTest::InitializeVM();
   Isolate* isolate = CcTest::i_isolate();
@@ -117,10 +213,6 @@
   CHECK(v8::Local<v8::Object>::New(isolate, g) == g.Get(isolate));
 }
 
-
-void WeakCallback(const v8::WeakCallbackInfo<void>& data) {}
-
-
 TEST(WeakPersistentSmi) {
   CcTest::InitializeVM();
   v8::Isolate* isolate = CcTest::isolate();
@@ -130,16 +222,8 @@
   v8::Global<v8::Number> g(isolate, n);
 
   // Should not crash.
-  g.SetWeak<void>(nullptr, &WeakCallback, v8::WeakCallbackType::kParameter);
-}
-
-void finalizer(const v8::WeakCallbackInfo<v8::Global<v8::Object>>& data) {
-  data.GetParameter()->ClearWeak();
-  v8::Local<v8::Object> o =
-      v8::Local<v8::Object>::New(data.GetIsolate(), *data.GetParameter());
-  o->Set(data.GetIsolate()->GetCurrentContext(), v8_str("finalizer"),
-         v8_str("was here"))
-      .FromJust();
+  g.SetWeak<void>(nullptr, &EmptyWeakCallback,
+                  v8::WeakCallbackType::kParameter);
 }
 
 TEST(FinalizerWeakness) {
@@ -154,7 +238,8 @@
     v8::Local<v8::Object> o = v8::Object::New(isolate);
     identity = o->GetIdentityHash();
     g.Reset(isolate, o);
-    g.SetWeak(&g, finalizer, v8::WeakCallbackType::kFinalizer);
+    g.SetWeak(&g, &ResurrectingFinalizerSettingProperty,
+              v8::WeakCallbackType::kFinalizer);
   }
 
   CcTest::CollectAllAvailableGarbage();
@@ -185,5 +270,219 @@
   CHECK_EQ(0u, isolate->NumberOfPhantomHandleResetsSinceLastCall());
 }
 
+TEST(WeakHandleToUnmodifiedJSObjectSurvivesScavenge) {
+  CcTest::InitializeVM();
+  WeakHandleTest(
+      CcTest::isolate(), &ConstructJSObject, [](FlagAndPersistent* fp) {},
+      []() { CcTest::CollectGarbage(i::NEW_SPACE); }, SurvivalMode::kSurvives);
+}
+
+TEST(WeakHandleToUnmodifiedJSObjectDiesOnMarkCompact) {
+  CcTest::InitializeVM();
+  WeakHandleTest(
+      CcTest::isolate(), &ConstructJSObject, [](FlagAndPersistent* fp) {},
+      []() { CcTest::CollectGarbage(i::OLD_SPACE); }, SurvivalMode::kDies);
+}
+
+TEST(WeakHandleToUnmodifiedJSObjectSurvivesMarkCompactWhenInHandle) {
+  CcTest::InitializeVM();
+  WeakHandleTest(
+      CcTest::isolate(), &ConstructJSObject,
+      [](FlagAndPersistent* fp) {
+        v8::Local<v8::Object> handle =
+            v8::Local<v8::Object>::New(CcTest::isolate(), fp->handle);
+        USE(handle);
+      },
+      []() { CcTest::CollectGarbage(i::OLD_SPACE); }, SurvivalMode::kSurvives);
+}
+
+TEST(WeakHandleToUnmodifiedJSApiObjectDiesOnScavenge) {
+  CcTest::InitializeVM();
+  WeakHandleTest(
+      CcTest::isolate(), &ConstructJSApiObject, [](FlagAndPersistent* fp) {},
+      []() { CcTest::CollectGarbage(i::NEW_SPACE); }, SurvivalMode::kDies);
+}
+
+TEST(WeakHandleToUnmodifiedJSApiObjectSurvivesScavengeWhenInHandle) {
+  CcTest::InitializeVM();
+  WeakHandleTest(
+      CcTest::isolate(), &ConstructJSApiObject,
+      [](FlagAndPersistent* fp) {
+        v8::Local<v8::Object> handle =
+            v8::Local<v8::Object>::New(CcTest::isolate(), fp->handle);
+        USE(handle);
+      },
+      []() { CcTest::CollectGarbage(i::NEW_SPACE); }, SurvivalMode::kSurvives);
+}
+
+TEST(WeakHandleToUnmodifiedJSApiObjectDiesOnMarkCompact) {
+  CcTest::InitializeVM();
+  WeakHandleTest(
+      CcTest::isolate(), &ConstructJSApiObject, [](FlagAndPersistent* fp) {},
+      []() { CcTest::CollectGarbage(i::OLD_SPACE); }, SurvivalMode::kDies);
+}
+
+TEST(WeakHandleToUnmodifiedJSApiObjectSurvivesMarkCompactWhenInHandle) {
+  CcTest::InitializeVM();
+  WeakHandleTest(
+      CcTest::isolate(), &ConstructJSApiObject,
+      [](FlagAndPersistent* fp) {
+        v8::Local<v8::Object> handle =
+            v8::Local<v8::Object>::New(CcTest::isolate(), fp->handle);
+        USE(handle);
+      },
+      []() { CcTest::CollectGarbage(i::OLD_SPACE); }, SurvivalMode::kSurvives);
+}
+
+TEST(WeakHandleToActiveUnmodifiedJSApiObjectSurvivesScavenge) {
+  CcTest::InitializeVM();
+  WeakHandleTest(CcTest::isolate(), &ConstructJSApiObject,
+                 [](FlagAndPersistent* fp) { fp->handle.MarkActive(); },
+                 []() { CcTest::CollectGarbage(i::NEW_SPACE); },
+                 SurvivalMode::kSurvives);
+}
+
+TEST(WeakHandleToActiveUnmodifiedJSApiObjectDiesOnMarkCompact) {
+  CcTest::InitializeVM();
+  WeakHandleTest(CcTest::isolate(), &ConstructJSApiObject,
+                 [](FlagAndPersistent* fp) { fp->handle.MarkActive(); },
+                 []() { CcTest::CollectGarbage(i::OLD_SPACE); },
+                 SurvivalMode::kDies);
+}
+
+TEST(WeakHandleToActiveUnmodifiedJSApiObjectSurvivesMarkCompactWhenInHandle) {
+  CcTest::InitializeVM();
+  WeakHandleTest(
+      CcTest::isolate(), &ConstructJSApiObject,
+      [](FlagAndPersistent* fp) {
+        fp->handle.MarkActive();
+        v8::Local<v8::Object> handle =
+            v8::Local<v8::Object>::New(CcTest::isolate(), fp->handle);
+        USE(handle);
+      },
+      []() { CcTest::CollectGarbage(i::OLD_SPACE); }, SurvivalMode::kSurvives);
+}
+
+namespace {
+
+void ConstructFinalizerPointingPhantomHandle(
+    v8::Isolate* isolate, v8::Global<v8::Object>* g1,
+    v8::Global<v8::Object>* g2,
+    typename v8::WeakCallbackInfo<v8::Global<v8::Object>>::Callback
+        finalizer_for_g1) {
+  v8::HandleScope scope(isolate);
+  v8::Local<v8::Object> o1 =
+      v8::Local<v8::Object>::New(isolate, v8::Object::New(isolate));
+  v8::Local<v8::Object> o2 =
+      v8::Local<v8::Object>::New(isolate, v8::Object::New(isolate));
+  o1->Set(isolate->GetCurrentContext(), v8_str("link"), o2).FromJust();
+  g1->Reset(isolate, o1);
+  g2->Reset(isolate, o2);
+  // g1 will be finalized but resurrected.
+  g1->SetWeak(g1, finalizer_for_g1, v8::WeakCallbackType::kFinalizer);
+  // g2 will be a phantom handle that is dependent on the finalizer handle
+  // g1 as it is in its subgraph.
+  g2->SetWeak();
+}
+
+}  // namespace
+
+TEST(FinalizerResurrectsAndKeepsPhantomAliveOnMarkCompact) {
+  // See crbug.com/772299.
+  CcTest::InitializeVM();
+  v8::Global<v8::Object> g1, g2;
+  ConstructFinalizerPointingPhantomHandle(CcTest::isolate(), &g1, &g2,
+                                          ResurrectingFinalizer);
+  CcTest::CollectGarbage(i::OLD_SPACE);
+  // Both, g1 and g2, should stay alive as the finalizer resurrects the root
+  // object that transitively keeps the other one alive.
+  CHECK(!g1.IsEmpty());
+  CHECK(!g2.IsEmpty());
+  CcTest::CollectGarbage(i::OLD_SPACE);
+  // The finalizer handle is now strong, so it should keep the objects alive.
+  CHECK(!g1.IsEmpty());
+  CHECK(!g2.IsEmpty());
+}
+
+TEST(FinalizerDiesAndKeepsPhantomAliveOnMarkCompact) {
+  CcTest::InitializeVM();
+  v8::Global<v8::Object> g1, g2;
+  ConstructFinalizerPointingPhantomHandle(CcTest::isolate(), &g1, &g2,
+                                          ResettingFinalizer);
+  CcTest::CollectGarbage(i::OLD_SPACE);
+  // Finalizer (g1) dies but the phantom handle (g2) is kept alive for one
+  // more round as the underlying object only dies on the next GC.
+  CHECK(g1.IsEmpty());
+  CHECK(!g2.IsEmpty());
+  CcTest::CollectGarbage(i::OLD_SPACE);
+  // Phantom handle dies after one more round.
+  CHECK(g1.IsEmpty());
+  CHECK(g2.IsEmpty());
+}
+
+namespace {
+
+void InvokeScavenge() { CcTest::CollectGarbage(i::NEW_SPACE); }
+
+void InvokeMarkSweep() { CcTest::CollectAllGarbage(); }
+
+void ForceScavenge2(const v8::WeakCallbackInfo<FlagAndPersistent>& data) {
+  data.GetParameter()->flag = true;
+  InvokeScavenge();
+}
+
+void ForceScavenge1(const v8::WeakCallbackInfo<FlagAndPersistent>& data) {
+  data.GetParameter()->handle.Reset();
+  data.SetSecondPassCallback(ForceScavenge2);
+}
+
+void ForceMarkSweep2(const v8::WeakCallbackInfo<FlagAndPersistent>& data) {
+  data.GetParameter()->flag = true;
+  InvokeMarkSweep();
+}
+
+void ForceMarkSweep1(const v8::WeakCallbackInfo<FlagAndPersistent>& data) {
+  data.GetParameter()->handle.Reset();
+  data.SetSecondPassCallback(ForceMarkSweep2);
+}
+
+}  // namespace
+
+TEST(GCFromWeakCallbacks) {
+  v8::Isolate* isolate = CcTest::isolate();
+  v8::Locker locker(CcTest::isolate());
+  v8::HandleScope scope(isolate);
+  v8::Local<v8::Context> context = v8::Context::New(isolate);
+  v8::Context::Scope context_scope(context);
+
+  static const int kNumberOfGCTypes = 2;
+  typedef v8::WeakCallbackInfo<FlagAndPersistent>::Callback Callback;
+  Callback gc_forcing_callback[kNumberOfGCTypes] = {&ForceScavenge1,
+                                                    &ForceMarkSweep1};
+
+  typedef void (*GCInvoker)();
+  GCInvoker invoke_gc[kNumberOfGCTypes] = {&InvokeScavenge, &InvokeMarkSweep};
+
+  for (int outer_gc = 0; outer_gc < kNumberOfGCTypes; outer_gc++) {
+    for (int inner_gc = 0; inner_gc < kNumberOfGCTypes; inner_gc++) {
+      FlagAndPersistent fp;
+      ConstructJSApiObject(isolate, context, &fp);
+      {
+        v8::HandleScope scope(isolate);
+        v8::Local<v8::Object> tmp =
+            v8::Local<v8::Object>::New(isolate, fp.handle);
+        CHECK(CcTest::i_isolate()->heap()->InNewSpace(
+            *v8::Utils::OpenHandle(*tmp)));
+      }
+      fp.flag = false;
+      fp.handle.SetWeak(&fp, gc_forcing_callback[inner_gc],
+                        v8::WeakCallbackType::kParameter);
+      invoke_gc[outer_gc]();
+      EmptyMessageQueues(isolate);
+      CHECK(fp.flag);
+    }
+  }
+}
+
 }  // namespace internal
 }  // namespace v8
diff --git a/src/v8/test/cctest/test-hashmap.cc b/src/v8/test/cctest/test-hashmap.cc
index 163bc09..1d72cfa 100644
--- a/src/v8/test/cctest/test-hashmap.cc
+++ b/src/v8/test/cctest/test-hashmap.cc
@@ -43,26 +43,26 @@
   explicit IntSet(IntKeyHash hash) : hash_(hash) {}
 
   void Insert(int x) {
-    CHECK_NE(0, x);  // 0 corresponds to (void*)NULL - illegal key value
+    CHECK_NE(0, x);  // 0 corresponds to (void*)nullptr - illegal key value
     v8::base::HashMap::Entry* p =
         map_.LookupOrInsert(reinterpret_cast<void*>(x), hash_(x));
-    CHECK(p != NULL);  // insert is set!
+    CHECK_NOT_NULL(p);  // insert is set!
     CHECK_EQ(reinterpret_cast<void*>(x), p->key);
     // we don't care about p->value
   }
 
   void Remove(int x) {
-    CHECK_NE(0, x);  // 0 corresponds to (void*)NULL - illegal key value
+    CHECK_NE(0, x);  // 0 corresponds to (void*)nullptr - illegal key value
     map_.Remove(reinterpret_cast<void*>(x), hash_(x));
   }
 
   bool Present(int x) {
     v8::base::HashMap::Entry* p =
         map_.Lookup(reinterpret_cast<void*>(x), hash_(x));
-    if (p != NULL) {
+    if (p != nullptr) {
       CHECK_EQ(reinterpret_cast<void*>(x), p->key);
     }
-    return p != NULL;
+    return p != nullptr;
   }
 
   void Clear() {
@@ -71,7 +71,7 @@
 
   uint32_t occupancy() const {
     uint32_t count = 0;
-    for (v8::base::HashMap::Entry* p = map_.Start(); p != NULL;
+    for (v8::base::HashMap::Entry* p = map_.Start(); p != nullptr;
          p = map_.Next(p)) {
       count++;
     }
diff --git a/src/v8/test/cctest/test-heap-profiler.cc b/src/v8/test/cctest/test-heap-profiler.cc
index b089fa8..d9f919f 100644
--- a/src/v8/test/cctest/test-heap-profiler.cc
+++ b/src/v8/test/cctest/test-heap-profiler.cc
@@ -117,7 +117,7 @@
     if (prop->GetType() == type && strcmp(name, *prop_name) == 0)
       return prop->GetToNode();
   }
-  return NULL;
+  return nullptr;
 }
 
 static bool HasString(v8::Isolate* isolate, const v8::HeapGraphNode* node,
@@ -402,6 +402,7 @@
 
 
 TEST(HeapSnapshotSlicedString) {
+  if (!i::FLAG_string_slices) return;
   LocalContext env;
   v8::HandleScope scope(env->GetIsolate());
   v8::HeapProfiler* heap_profiler = env->GetIsolate()->GetHeapProfiler();
@@ -438,7 +439,7 @@
   v8::Local<v8::ObjectTemplate> global_template =
       v8::ObjectTemplate::New(isolate);
   global_template->SetInternalFieldCount(1);
-  LocalContext env(NULL, global_template);
+  LocalContext env(nullptr, global_template);
   v8::Local<v8::Object> global_proxy = env->Global();
   v8::Local<v8::Object> global = global_proxy->GetPrototype().As<v8::Object>();
   CHECK_EQ(1, global->InternalFieldCount());
@@ -558,7 +559,7 @@
       ++weak_entries;
     }
   }
-  CHECK_EQ(2, weak_entries);
+  CHECK_EQ(1, weak_entries);  // Key is the only weak.
   const v8::HeapGraphNode* wm_s =
       GetProperty(env->GetIsolate(), wm, v8::HeapGraphEdge::kProperty, "str");
   CHECK(wm_s);
@@ -674,7 +675,7 @@
   v8::Local<v8::ObjectTemplate> global_template =
       v8::ObjectTemplate::New(isolate);
   global_template->SetInternalFieldCount(2);
-  LocalContext env(NULL, global_template);
+  LocalContext env(nullptr, global_template);
   v8::Local<v8::Object> global_proxy = env->Global();
   v8::Local<v8::Object> global = global_proxy->GetPrototype().As<v8::Object>();
   CHECK_EQ(2, global->InternalFieldCount());
@@ -874,8 +875,7 @@
     return kContinue;
   }
   virtual WriteResult WriteUint32Chunk(uint32_t* buffer, int chars_written) {
-    CHECK(false);
-    return kAbort;
+    UNREACHABLE();
   }
   void WriteTo(i::Vector<char> dest) { buffer_.WriteTo(dest); }
   int eos_signaled() { return eos_signaled_; }
@@ -1063,8 +1063,7 @@
   virtual ~TestStatsStream() {}
   virtual void EndOfStream() { ++eos_signaled_; }
   virtual WriteResult WriteAsciiChunk(char* buffer, int chars_written) {
-    CHECK(false);
-    return kAbort;
+    UNREACHABLE();
   }
   virtual WriteResult WriteHeapStatsChunk(v8::HeapStatsUpdate* buffer,
                                           int updates_written) {
@@ -1101,7 +1100,7 @@
 
 static TestStatsStream GetHeapStatsUpdate(
     v8::HeapProfiler* heap_profiler,
-    v8::SnapshotObjectId* object_id = NULL) {
+    v8::SnapshotObjectId* object_id = nullptr) {
   TestStatsStream stream;
   int64_t timestamp = -1;
   v8::SnapshotObjectId last_seen_id =
@@ -1459,8 +1458,7 @@
           return new TestRetainedObjectInfo(2, "ccc-group", "ccc");
       }
     }
-    CHECK(false);
-    return NULL;
+    UNREACHABLE();
   }
 
   static std::vector<TestRetainedObjectInfo*> instances;
@@ -1490,7 +1488,7 @@
       return node;
     }
   }
-  return NULL;
+  return nullptr;
 }
 
 
@@ -1635,7 +1633,7 @@
 
   NameResolver name_resolver;
   const v8::HeapSnapshot* snapshot =
-      heap_profiler->TakeHeapSnapshot(NULL, &name_resolver);
+      heap_profiler->TakeHeapSnapshot(nullptr, &name_resolver);
   CHECK(ValidateSnapshot(snapshot));
   const v8::HeapGraphNode* global = GetGlobalObject(snapshot);
   CHECK(global);
@@ -2346,7 +2344,7 @@
         break;
       }
     }
-    if (i == count) return NULL;
+    if (i == count) return nullptr;
   }
   return node;
 }
@@ -2431,10 +2429,10 @@
 static AllocationTraceNode* FindNode(
     AllocationTracker* tracker, const Vector<const char*>& names) {
   AllocationTraceNode* node = tracker->trace_tree()->root();
-  for (int i = 0; node != NULL && i < names.length(); i++) {
+  for (int i = 0; node != nullptr && i < names.length(); i++) {
     const char* name = names[i];
     const std::vector<AllocationTraceNode*>& children = node->children();
-    node = NULL;
+    node = nullptr;
     for (AllocationTraceNode* child : children) {
       unsigned index = child->function_info_index();
       AllocationTracker::FunctionInfo* info =
@@ -2687,7 +2685,7 @@
 
   CHECK_EQ(1024, static_cast<int>(ab_contents.ByteLength()));
   void* data = ab_contents.Data();
-  CHECK(data != NULL);
+  CHECK_NOT_NULL(data);
   v8::Local<v8::ArrayBuffer> ab2 =
       v8::ArrayBuffer::New(isolate, data, ab_contents.ByteLength());
   CHECK(ab2->IsExternal());
@@ -2815,7 +2813,7 @@
 
   // [0x100, 0x200) -> 1, [0x200, 0x300) -> 2
   map.AddRange(ToAddress(0x200), 0x100, 2U);
-  CHECK_EQ(2u, map.GetTraceNodeId(ToAddress(0x2a0)));
+  CHECK_EQ(2u, map.GetTraceNodeId(ToAddress(0x2A0)));
   CHECK_EQ(2u, map.size());
 
   // [0x100, 0x180) -> 1, [0x180, 0x280) -> 3, [0x280, 0x300) -> 2
@@ -2907,7 +2905,7 @@
   // Sample should be empty if requested before sampling has started.
   {
     v8::AllocationProfile* profile = heap_profiler->GetAllocationProfile();
-    CHECK(profile == nullptr);
+    CHECK_NULL(profile);
   }
 
   int count_1024 = 0;
@@ -2935,7 +2933,7 @@
   // Samples should get cleared once sampling is stopped.
   {
     v8::AllocationProfile* profile = heap_profiler->GetAllocationProfile();
-    CHECK(profile == nullptr);
+    CHECK_NULL(profile);
   }
 
   // Sampling at a higher rate should give us similar numbers of objects.
@@ -3082,7 +3080,7 @@
   // Suppress randomness to avoid flakiness in tests.
   v8::internal::FLAG_sampling_heap_profiler_suppress_randomness = true;
 
-  // Grow new space unitl maximum capacity reached.
+  // Grow new space until maximum capacity reached.
   while (!CcTest::heap()->new_space()->IsAtMaximumCapacity()) {
     CcTest::heap()->new_space()->Grow();
   }
@@ -3108,7 +3106,7 @@
       v8::Local<v8::Function>::Cast(CompileRun(source.start()));
 
   // Make sure the function is producing pre-tenured objects.
-  auto res = f->Call(env.local(), env->Global(), 0, NULL).ToLocalChecked();
+  auto res = f->Call(env.local(), env->Global(), 0, nullptr).ToLocalChecked();
   i::Handle<i::JSObject> o = i::Handle<i::JSObject>::cast(
       v8::Utils::OpenHandle(*v8::Local<v8::Object>::Cast(res)));
   CHECK(CcTest::heap()->InOldSpace(o->elements()));
@@ -3116,8 +3114,8 @@
 
   // Call the function and profile it.
   heap_profiler->StartSamplingHeapProfiler(64);
-  for (int i = 0; i < 100; ++i) {
-    f->Call(env.local(), env->Global(), 0, NULL).ToLocalChecked();
+  for (int i = 0; i < 80; ++i) {
+    f->Call(env.local(), env->Global(), 0, nullptr).ToLocalChecked();
   }
 
   std::unique_ptr<v8::AllocationProfile> profile(
@@ -3135,5 +3133,87 @@
     count += allocation.count;
   }
 
-  CHECK_GE(count, 9000);
+  CHECK_GE(count, 8000);
+}
+
+TEST(SamplingHeapProfilerLargeInterval) {
+  v8::HandleScope scope(v8::Isolate::GetCurrent());
+  LocalContext env;
+  v8::HeapProfiler* heap_profiler = env->GetIsolate()->GetHeapProfiler();
+
+  // Suppress randomness to avoid flakiness in tests.
+  v8::internal::FLAG_sampling_heap_profiler_suppress_randomness = true;
+
+  heap_profiler->StartSamplingHeapProfiler(512 * 1024);
+
+  for (int i = 0; i < 8 * 1024; ++i) {
+    CcTest::i_isolate()->factory()->NewFixedArray(1024);
+  }
+
+  std::unique_ptr<v8::AllocationProfile> profile(
+      heap_profiler->GetAllocationProfile());
+  CHECK(profile);
+  const char* names[] = {"(EXTERNAL)"};
+  auto node = FindAllocationProfileNode(env->GetIsolate(), *profile,
+                                        ArrayVector(names));
+  CHECK(node);
+
+  heap_profiler->StopSamplingHeapProfiler();
+}
+
+TEST(SamplingHeapProfilerSampleDuringDeopt) {
+  i::FLAG_allow_natives_syntax = true;
+
+  v8::HandleScope scope(v8::Isolate::GetCurrent());
+  LocalContext env;
+  v8::HeapProfiler* heap_profiler = env->GetIsolate()->GetHeapProfiler();
+
+  // Suppress randomness to avoid flakiness in tests.
+  v8::internal::FLAG_sampling_heap_profiler_suppress_randomness = true;
+
+  // Small sample interval to force each object to be sampled.
+  heap_profiler->StartSamplingHeapProfiler(i::kPointerSize);
+
+  // Lazy deopt from runtime call from inlined callback function.
+  const char* source =
+      "var b = "
+      "  [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25];"
+      "(function f() {"
+      "  var result = 0;"
+      "  var lazyDeopt = function(deopt) {"
+      "    var callback = function(v,i,o) {"
+      "      result += i;"
+      "      if (i == 13 && deopt) {"
+      "          %DeoptimizeNow();"
+      "      }"
+      "      return v;"
+      "    };"
+      "    b.map(callback);"
+      "  };"
+      "  lazyDeopt();"
+      "  lazyDeopt();"
+      "  %OptimizeFunctionOnNextCall(lazyDeopt);"
+      "  lazyDeopt();"
+      "  lazyDeopt(true);"
+      "  lazyDeopt();"
+      "})();";
+
+  CompileRun(source);
+  // Should not crash.
+
+  std::unique_ptr<v8::AllocationProfile> profile(
+      heap_profiler->GetAllocationProfile());
+  CHECK(profile);
+  heap_profiler->StopSamplingHeapProfiler();
+}
+
+TEST(HeapSnapshotPrototypeNotJSReceiver) {
+  LocalContext env;
+  v8::HandleScope scope(env->GetIsolate());
+  v8::HeapProfiler* heap_profiler = env->GetIsolate()->GetHeapProfiler();
+  CompileRun(
+      "function object() {}"
+      "object.prototype = 42;");
+  const v8::HeapSnapshot* snapshot = heap_profiler->TakeHeapSnapshot();
+  CHECK(ValidateSnapshot(snapshot));
 }
diff --git a/src/v8/test/cctest/test-identity-map.cc b/src/v8/test/cctest/test-identity-map.cc
index f7d1c31..8a0d99d 100644
--- a/src/v8/test/cctest/test-identity-map.cc
+++ b/src/v8/test/cctest/test-identity-map.cc
@@ -4,19 +4,11 @@
 
 #include <set>
 
-#include "src/factory.h"
+#include "src/factory-inl.h"
 #include "src/identity-map.h"
 #include "src/isolate.h"
 #include "src/objects.h"
 #include "src/zone/zone.h"
-// FIXME(mstarzinger, marja): This is weird, but required because of the missing
-// (disallowed) include: src/factory.h -> src/objects-inl.h
-#include "src/objects-inl.h"
-// FIXME(mstarzinger, marja): This is weird, but required because of the missing
-// (disallowed) include: src/feedback-vector.h ->
-// src/feedback-vector-inl.h
-#include "src/feedback-vector-inl.h"
-#include "src/v8.h"
 #include "test/cctest/cctest.h"
 
 namespace v8 {
@@ -773,6 +765,7 @@
 }
 
 TEST(GCShortCutting) {
+  ManualGCScope manual_gc_scope;
   IdentityMapTester t;
   Isolate* isolate = CcTest::i_isolate();
   Factory* factory = isolate->factory();
diff --git a/src/v8/test/cctest/test-inobject-slack-tracking.cc b/src/v8/test/cctest/test-inobject-slack-tracking.cc
index 9586d72..be6a71b 100644
--- a/src/v8/test/cctest/test-inobject-slack-tracking.cc
+++ b/src/v8/test/cctest/test-inobject-slack-tracking.cc
@@ -102,7 +102,7 @@
       CcTest::i_isolate()->factory()->one_pointer_filler_map();
 
   int inobject_properties = obj->map()->GetInObjectProperties();
-  int unused = obj->map()->unused_property_fields();
+  int unused = obj->map()->UnusedPropertyFields();
   if (unused == 0) return false;
 
   for (int i = inobject_properties - unused; i < inobject_properties; i++) {
@@ -227,13 +227,13 @@
   CHECK(!IsObjectShrinkable(*obj5));
 
   CHECK_EQ(5, obj1->map()->GetInObjectProperties());
-  CHECK_EQ(4, obj1->map()->unused_property_fields());
+  CHECK_EQ(4, obj1->map()->UnusedPropertyFields());
 
   CHECK_EQ(5, obj3->map()->GetInObjectProperties());
-  CHECK_EQ(2, obj3->map()->unused_property_fields());
+  CHECK_EQ(2, obj3->map()->UnusedPropertyFields());
 
   CHECK_EQ(5, obj5->map()->GetInObjectProperties());
-  CHECK_EQ(0, obj5->map()->unused_property_fields());
+  CHECK_EQ(0, obj5->map()->UnusedPropertyFields());
 
   // Since slack tracking is complete, the new objects should not be shrinkable.
   obj1 = CompileRunI<JSObject>("new A(1);");
@@ -596,6 +596,10 @@
       Handle<JSObject> tmp = RunI<JSObject>(new_script);
       CHECK_EQ(initial_map->IsInobjectSlackTrackingInProgress(),
                IsObjectShrinkable(*tmp));
+      if (!initial_map->IsInobjectSlackTrackingInProgress()) {
+        // Turbofan can force completion of in-object slack tracking.
+        break;
+      }
       CHECK_EQ(Map::kSlackTrackingCounterStart - i - 1,
                initial_map->construction_counter());
     }
@@ -618,6 +622,12 @@
   TestClassHierarchy(hierarchy_desc, static_cast<int>(hierarchy_desc.size()));
 }
 
+TEST(Subclasses) {
+  std::vector<int> hierarchy_desc;
+  hierarchy_desc.push_back(50);
+  hierarchy_desc.push_back(128);
+  TestSubclassChain(hierarchy_desc);
+}
 
 TEST(LongSubclassChain1) {
   std::vector<int> hierarchy_desc;
diff --git a/src/v8/test/cctest/test-liveedit.cc b/src/v8/test/cctest/test-liveedit.cc
index ff4dae3..809ef81 100644
--- a/src/v8/test/cctest/test-liveedit.cc
+++ b/src/v8/test/cctest/test-liveedit.cc
@@ -61,10 +61,13 @@
 
 class DiffChunkStruct : public ZoneObject {
  public:
-  DiffChunkStruct(int pos1_param, int pos2_param,
-                  int len1_param, int len2_param)
-      : pos1(pos1_param), pos2(pos2_param),
-        len1(len1_param), len2(len2_param), next(NULL) {}
+  DiffChunkStruct(int pos1_param, int pos2_param, int len1_param,
+                  int len2_param)
+      : pos1(pos1_param),
+        pos2(pos2_param),
+        len1(len1_param),
+        len2(len2_param),
+        next(nullptr) {}
   int pos1;
   int pos2;
   int len1;
@@ -78,7 +81,7 @@
   explicit ListDiffOutputWriter(DiffChunkStruct** next_chunk_pointer,
                                 Zone* zone)
       : next_chunk_pointer_(next_chunk_pointer), zone_(zone) {
-    (*next_chunk_pointer_) = NULL;
+    (*next_chunk_pointer_) = nullptr;
   }
   void AddChunk(int pos1, int pos2, int len1, int len2) {
     current_chunk_ = new(zone_) DiffChunkStruct(pos1, pos2, len1, len2);
@@ -112,9 +115,8 @@
 
   int diff_parameter = 0;
 
-  for (DiffChunkStruct* chunk = first_chunk;
-      chunk != NULL;
-      chunk = chunk->next) {
+  for (DiffChunkStruct* chunk = first_chunk; chunk != nullptr;
+       chunk = chunk->next) {
     int diff_pos1 = chunk->pos1;
     int similar_part_length = diff_pos1 - pos1;
     int diff_pos2 = pos2 + similar_part_length;
diff --git a/src/v8/test/cctest/test-log-stack-tracer.cc b/src/v8/test/cctest/test-log-stack-tracer.cc
index 2362249..24d6d9c 100644
--- a/src/v8/test/cctest/test-log-stack-tracer.cc
+++ b/src/v8/test/cctest/test-log-stack-tracer.cc
@@ -31,7 +31,7 @@
 
 #include "include/v8-profiler.h"
 #include "src/api.h"
-#include "src/codegen.h"
+#include "src/code-stubs.h"
 #include "src/disassembler.h"
 #include "src/isolate.h"
 #include "src/log.h"
@@ -86,7 +86,7 @@
       .FromJust();
 #elif defined(V8_HOST_ARCH_64_BIT)
   uint64_t fp = reinterpret_cast<uint64_t>(calling_frame->fp());
-  int32_t low_bits = static_cast<int32_t>(fp & 0xffffffff);
+  int32_t low_bits = static_cast<int32_t>(fp & 0xFFFFFFFF);
   int32_t high_bits = static_cast<int32_t>(fp >> 32);
   args.This()->Set(context, v8_str("low_bits"), v8_num(low_bits)).FromJust();
   args.This()->Set(context, v8_str("high_bits"), v8_num(high_bits)).FromJust();
diff --git a/src/v8/test/cctest/test-log.cc b/src/v8/test/cctest/test-log.cc
index 03d90b5..0579010 100644
--- a/src/v8/test/cctest/test-log.cc
+++ b/src/v8/test/cctest/test-log.cc
@@ -34,6 +34,7 @@
 #include <cmath>
 #endif  // __linux__
 
+#include <unordered_set>
 #include "src/api.h"
 #include "src/log-utils.h"
 #include "src/log.h"
@@ -63,13 +64,43 @@
   i::FLAG_logfile = i::Log::kLogToTemporaryFile; \
   i::FLAG_logfile_per_isolate = false
 
+static const char* StrNStr(const char* s1, const char* s2, size_t n) {
+  CHECK_EQ(s1[n], '\0');
+  return strstr(s1, s2);
+}
+
+// Look for a log line which starts with {prefix} and ends with {suffix}.
+static const char* FindLogLine(const char* start, const char* end,
+                               const char* prefix,
+                               const char* suffix = nullptr) {
+  CHECK_LT(start, end);
+  CHECK_EQ(end[0], '\0');
+  size_t prefixLength = strlen(prefix);
+  // Loop through the input until we find /{prefix}[^\n]+{suffix}/.
+  while (start < end) {
+    const char* prefixResult = strstr(start, prefix);
+    if (!prefixResult) return NULL;
+    if (suffix == nullptr) return prefixResult;
+    const char* suffixResult =
+        StrNStr(prefixResult, suffix, (end - prefixResult));
+    if (!suffixResult) return NULL;
+    // Check that there are no newlines in between the {prefix} and the {suffix}
+    // results.
+    const char* newlineResult =
+        StrNStr(prefixResult, "\n", (end - prefixResult));
+    if (!newlineResult) return prefixResult;
+    if (newlineResult > suffixResult) return prefixResult;
+    start = prefixResult + prefixLength;
+  }
+  return NULL;
+}
 
 class ScopedLoggerInitializer {
  public:
   ScopedLoggerInitializer(bool saved_log, bool saved_prof, v8::Isolate* isolate)
       : saved_log_(saved_log),
         saved_prof_(saved_prof),
-        temp_file_(NULL),
+        temp_file_(nullptr),
         isolate_(isolate),
         isolate_scope_(isolate),
         scope_(isolate),
@@ -81,9 +112,10 @@
   ~ScopedLoggerInitializer() {
     env_->Exit();
     logger_->TearDown();
-    if (temp_file_ != NULL) fclose(temp_file_);
+    if (temp_file_ != nullptr) fclose(temp_file_);
     i::FLAG_prof = saved_prof_;
     i::FLAG_log = saved_log_;
+    log_.Dispose();
   }
 
   v8::Local<v8::Context>& env() { return env_; }
@@ -92,6 +124,112 @@
 
   Logger* logger() { return logger_; }
 
+  void PrintLog(int nofLines = 0) {
+    if (nofLines <= 0) {
+      printf("%s", log_.start());
+      return;
+    }
+    // Try to print the last {nofLines} of the log.
+    const char* start = log_.start();
+    const char* current = log_.end();
+    while (current > start && nofLines > 0) {
+      current--;
+      if (*current == '\n') nofLines--;
+    }
+    printf(
+        "======================================================\n"
+        "Last log lines:\n...%s\n"
+        "======================================================\n",
+        current);
+  }
+
+  v8::Local<v8::String> GetLogString() {
+    return v8::String::NewFromUtf8(isolate_, log_.start(),
+                                   v8::NewStringType::kNormal, log_.length())
+        .ToLocalChecked();
+  }
+
+  void StopLogging() {
+    bool exists = false;
+    log_ = i::ReadFile(StopLoggingGetTempFile(), &exists, true);
+    CHECK(exists);
+  }
+
+  const char* FindLine(const char* prefix, const char* suffix = nullptr,
+                       const char* start = nullptr) {
+    // Make sure that StopLogging() has been called before.
+    CHECK(log_.size());
+    if (start == nullptr) start = log_.start();
+    const char* end = log_.start() + log_.length();
+    return FindLogLine(start, end, prefix, suffix);
+  }
+
+  // Find all log lines specified by the {prefix, suffix} pairs and ensure they
+  // occurr in the specified order.
+  void FindLogLines(const char* pairs[][2], size_t limit,
+                    const char* start = nullptr) {
+    const char* prefix = pairs[0][0];
+    const char* suffix = pairs[0][1];
+    const char* last_position = FindLine(prefix, suffix, start);
+    if (last_position == nullptr) {
+      PrintLog(50);
+      V8_Fatal(__FILE__, __LINE__, "Could not find log line: %s ... %s", prefix,
+               suffix);
+    }
+    CHECK(last_position);
+    for (size_t i = 1; i < limit; i++) {
+      prefix = pairs[i][0];
+      suffix = pairs[i][1];
+      const char* position = FindLine(prefix, suffix, start);
+      if (position == nullptr) {
+        PrintLog(50);
+        V8_Fatal(__FILE__, __LINE__, "Could not find log line: %s ... %s",
+                 prefix, suffix);
+      }
+      // Check that all string positions are in order.
+      if (position <= last_position) {
+        PrintLog(50);
+        V8_Fatal(__FILE__, __LINE__,
+                 "Log statements not in expected order (prev=%p, current=%p): "
+                 "%s ... %s",
+                 reinterpret_cast<const void*>(last_position),
+                 reinterpret_cast<const void*>(position), prefix, suffix);
+      }
+      last_position = position;
+    }
+  }
+
+  void LogCompiledFunctions() { logger_->LogCompiledFunctions(); }
+
+  void StringEvent(const char* name, const char* value) {
+    logger_->StringEvent(name, value);
+  }
+
+  void ExtractAllAddresses(std::unordered_set<uintptr_t>* map,
+                           const char* prefix, int field_index) {
+    // Make sure that StopLogging() has been called before.
+    CHECK(log_.size());
+    const char* current = log_.start();
+    while (current != nullptr) {
+      current = FindLine(prefix, nullptr, current);
+      if (current == nullptr) return;
+      // Find token number {index}.
+      const char* previous;
+      for (int i = 0; i <= field_index; i++) {
+        previous = current;
+        current = strchr(current + 1, ',');
+        if (current == nullptr) break;
+        // Skip the comma.
+        current++;
+      }
+      if (current == nullptr) break;
+      uintptr_t address = strtoll(previous, nullptr, 16);
+      CHECK_LT(0, address);
+      map->insert(address);
+    }
+  }
+
+ private:
   FILE* StopLoggingGetTempFile() {
     temp_file_ = logger_->TearDown();
     CHECK(temp_file_);
@@ -100,7 +238,6 @@
     return temp_file_;
   }
 
- private:
   const bool saved_log_;
   const bool saved_prof_;
   FILE* temp_file_;
@@ -109,23 +246,37 @@
   v8::HandleScope scope_;
   v8::Local<v8::Context> env_;
   Logger* logger_;
+  i::Vector<const char> log_;
 
   DISALLOW_COPY_AND_ASSIGN(ScopedLoggerInitializer);
 };
 
 }  // namespace
 
-
-static const char* StrNStr(const char* s1, const char* s2, int n) {
-  if (s1[n] == '\0') return strstr(s1, s2);
-  i::ScopedVector<char> str(n + 1);
-  i::StrNCpy(str, s1, static_cast<size_t>(n));
-  str[n] = '\0';
-  char* found = strstr(str.start(), s2);
-  return found != NULL ? s1 + (found - str.start()) : NULL;
+TEST(FindLogLine) {
+  const char* string =
+      "prefix1, stuff,   suffix1\n"
+      "prefix2, stuff\n, suffix2\n"
+      "prefix3suffix3\n"
+      "prefix4 suffix4";
+  const char* end = string + strlen(string);
+  // Make sure the vector contains the terminating \0 character.
+  CHECK(FindLogLine(string, end, "prefix1, stuff,   suffix1"));
+  CHECK(FindLogLine(string, end, "prefix1, stuff"));
+  CHECK(FindLogLine(string, end, "prefix1"));
+  CHECK(FindLogLine(string, end, "prefix1", "suffix1"));
+  CHECK(FindLogLine(string, end, "prefix1", "suffix1"));
+  CHECK(!FindLogLine(string, end, "prefix2", "suffix2"));
+  CHECK(!FindLogLine(string, end, "prefix1", "suffix2"));
+  CHECK(!FindLogLine(string, end, "prefix1", "suffix3"));
+  CHECK(FindLogLine(string, end, "prefix3", "suffix3"));
+  CHECK(FindLogLine(string, end, "prefix4", "suffix4"));
+  CHECK(!FindLogLine(string, end, "prefix4", "suffix4XXXXXXXXXXXX"));
+  CHECK(
+      !FindLogLine(string, end, "prefix4XXXXXXXXXXXXXXXXXXXXXXxxx", "suffix4"));
+  CHECK(!FindLogLine(string, end, "suffix", "suffix5XXXXXXXXXXXXXXXXXXXX"));
 }
 
-
 // BUG(913). Need to implement support for profiling multiple VM threads.
 #if 0
 
@@ -177,7 +328,7 @@
       : LoopingThread(isolate) { }
   void RunLoop() {
     v8::Locker locker;
-    CHECK(CcTest::i_isolate() != NULL);
+    CHECK_NOT_NULL(CcTest::i_isolate());
     CHECK_GT(CcTest::i_isolate()->thread_manager()->CurrentId(), 0);
     SetV8ThreadId();
     while (IsRunning()) {
@@ -205,7 +356,7 @@
     v8::Locker locker;
     v8::Unlocker unlocker;
     // Now thread has V8's id, but will not run VM code.
-    CHECK(CcTest::i_isolate() != NULL);
+    CHECK_NOT_NULL(CcTest::i_isolate());
     CHECK_GT(CcTest::i_isolate()->thread_manager()->CurrentId(), 0);
     double i = 10;
     SignalRunning();
@@ -248,7 +399,7 @@
 }  // namespace
 
 TEST(ProfMultipleThreads) {
-  TestSampler* sampler = NULL;
+  TestSampler* sampler = nullptr;
   {
     v8::Locker locker;
     sampler = new TestSampler(CcTest::i_isolate());
@@ -327,7 +478,7 @@
       i::ExternalTwoByteString::cast(*v8::Utils::OpenHandle(*source)));
   // This situation can happen if source was an external string disposed
   // by its owner.
-  i_source->set_resource(NULL);
+  i_source->set_resource(nullptr);
 
   // Must not crash.
   CcTest::i_isolate()->logger()->LogCompiledFunctions();
@@ -344,8 +495,7 @@
   create_params.array_buffer_allocator = CcTest::array_buffer_allocator();
   v8::Isolate* isolate = v8::Isolate::New(create_params);
   {
-    ScopedLoggerInitializer initialize_logger(saved_log, saved_prof, isolate);
-    Logger* logger = initialize_logger.logger();
+    ScopedLoggerInitializer logger(saved_log, saved_prof, isolate);
 
     v8::Local<v8::FunctionTemplate> obj = v8::Local<v8::FunctionTemplate>::New(
         isolate, v8::FunctionTemplate::New(isolate));
@@ -357,31 +507,25 @@
                                          v8::Local<v8::Value>(), signature),
                static_cast<v8::PropertyAttribute>(v8::DontDelete));
 
-    initialize_logger.env()
+    logger.env()
         ->Global()
-        ->Set(initialize_logger.env(), v8_str("Obj"),
-              obj->GetFunction(initialize_logger.env()).ToLocalChecked())
+        ->Set(logger.env(), v8_str("Obj"),
+              obj->GetFunction(logger.env()).ToLocalChecked())
         .FromJust();
     CompileRun("Obj.prototype.method1.toString();");
 
-    logger->LogCompiledFunctions();
+    logger.LogCompiledFunctions();
 
-    bool exists = false;
-    i::Vector<const char> log(
-        i::ReadFile(initialize_logger.StopLoggingGetTempFile(), &exists, true));
-    CHECK(exists);
+    logger.StopLogging();
 
     Address ObjMethod1_entry = reinterpret_cast<Address>(ObjMethod1);
 #if USES_FUNCTION_DESCRIPTORS
     ObjMethod1_entry = *FUNCTION_ENTRYPOINT_ADDRESS(ObjMethod1_entry);
 #endif
     i::EmbeddedVector<char, 100> ref_data;
-    i::SNPrintF(ref_data,
-                "code-creation,Callback,-2,-1,0x%" V8PRIxPTR ",1,\"method1\"",
+    i::SNPrintF(ref_data, ",0x%" V8PRIxPTR ",1,method1",
                 reinterpret_cast<intptr_t>(ObjMethod1_entry));
-
-    CHECK(StrNStr(log.start(), ref_data.start(), log.length()));
-    log.Dispose();
+    CHECK(logger.FindLine("code-creation,Callback,-2,", ref_data.start()));
   }
   isolate->Dispose();
 }
@@ -407,8 +551,7 @@
   create_params.array_buffer_allocator = CcTest::array_buffer_allocator();
   v8::Isolate* isolate = v8::Isolate::New(create_params);
   {
-    ScopedLoggerInitializer initialize_logger(saved_log, saved_prof, isolate);
-    Logger* logger = initialize_logger.logger();
+    ScopedLoggerInitializer logger(saved_log, saved_prof, isolate);
 
     v8::Local<v8::FunctionTemplate> obj = v8::Local<v8::FunctionTemplate>::New(
         isolate, v8::FunctionTemplate::New(isolate));
@@ -417,51 +560,43 @@
     inst->SetAccessor(v8_str("prop1"), Prop1Getter, Prop1Setter);
     inst->SetAccessor(v8_str("prop2"), Prop2Getter);
 
-    logger->LogAccessorCallbacks();
+    logger.logger()->LogAccessorCallbacks();
 
-    bool exists = false;
-    i::Vector<const char> log(
-        i::ReadFile(initialize_logger.StopLoggingGetTempFile(), &exists, true));
-    CHECK(exists);
+    logger.StopLogging();
 
     Address Prop1Getter_entry = reinterpret_cast<Address>(Prop1Getter);
 #if USES_FUNCTION_DESCRIPTORS
     Prop1Getter_entry = *FUNCTION_ENTRYPOINT_ADDRESS(Prop1Getter_entry);
 #endif
     EmbeddedVector<char, 100> prop1_getter_record;
-    i::SNPrintF(prop1_getter_record,
-                "code-creation,Callback,-2,-1,0x%" V8PRIxPTR ",1,\"get prop1\"",
+    i::SNPrintF(prop1_getter_record, ",0x%" V8PRIxPTR ",1,get prop1",
                 reinterpret_cast<intptr_t>(Prop1Getter_entry));
-    CHECK(StrNStr(log.start(), prop1_getter_record.start(), log.length()));
+    CHECK(logger.FindLine("code-creation,Callback,-2,",
+                          prop1_getter_record.start()));
 
     Address Prop1Setter_entry = reinterpret_cast<Address>(Prop1Setter);
 #if USES_FUNCTION_DESCRIPTORS
     Prop1Setter_entry = *FUNCTION_ENTRYPOINT_ADDRESS(Prop1Setter_entry);
 #endif
     EmbeddedVector<char, 100> prop1_setter_record;
-    i::SNPrintF(prop1_setter_record,
-                "code-creation,Callback,-2,-1,0x%" V8PRIxPTR ",1,\"set prop1\"",
+    i::SNPrintF(prop1_setter_record, ",0x%" V8PRIxPTR ",1,set prop1",
                 reinterpret_cast<intptr_t>(Prop1Setter_entry));
-    CHECK(StrNStr(log.start(), prop1_setter_record.start(), log.length()));
+    CHECK(logger.FindLine("code-creation,Callback,-2,",
+                          prop1_setter_record.start()));
 
     Address Prop2Getter_entry = reinterpret_cast<Address>(Prop2Getter);
 #if USES_FUNCTION_DESCRIPTORS
     Prop2Getter_entry = *FUNCTION_ENTRYPOINT_ADDRESS(Prop2Getter_entry);
 #endif
     EmbeddedVector<char, 100> prop2_getter_record;
-    i::SNPrintF(prop2_getter_record,
-                "code-creation,Callback,-2,-1,0x%" V8PRIxPTR ",1,\"get prop2\"",
+    i::SNPrintF(prop2_getter_record, ",0x%" V8PRIxPTR ",1,get prop2",
                 reinterpret_cast<intptr_t>(Prop2Getter_entry));
-    CHECK(StrNStr(log.start(), prop2_getter_record.start(), log.length()));
-    log.Dispose();
+    CHECK(logger.FindLine("code-creation,Callback,-2,",
+                          prop2_getter_record.start()));
   }
   isolate->Dispose();
 }
 
-
-typedef i::NativesCollection<i::TEST> TestSources;
-
-
 // Test that logging of code create / move events is equivalent to traversal of
 // a resulting heap.
 TEST(EquivalenceOfLoggingAndTraversal) {
@@ -477,8 +612,7 @@
   create_params.array_buffer_allocator = CcTest::array_buffer_allocator();
   v8::Isolate* isolate = v8::Isolate::New(create_params);
   {
-    ScopedLoggerInitializer initialize_logger(saved_log, saved_prof, isolate);
-    Logger* logger = initialize_logger.logger();
+    ScopedLoggerInitializer logger(saved_log, saved_prof, isolate);
 
     // Compile and run a function that creates other functions.
     CompileRun(
@@ -486,29 +620,26 @@
         "  obj.test =\n"
         "    (function a(j) { return function b() { return j; } })(100);\n"
         "})(this);");
-    logger->StopProfiler();
+    logger.logger()->StopProfiler();
     reinterpret_cast<i::Isolate*>(isolate)->heap()->CollectAllGarbage(
         i::Heap::kMakeHeapIterableMask, i::GarbageCollectionReason::kTesting);
-    logger->StringEvent("test-logging-done", "");
+    logger.StringEvent("test-logging-done", "");
 
     // Iterate heap to find compiled functions, will write to log.
-    logger->LogCompiledFunctions();
-    logger->StringEvent("test-traversal-done", "");
+    logger.LogCompiledFunctions();
+    logger.StringEvent("test-traversal-done", "");
 
-    bool exists = false;
-    i::Vector<const char> log(
-        i::ReadFile(initialize_logger.StopLoggingGetTempFile(), &exists, true));
-    CHECK(exists);
-    v8::Local<v8::String> log_str =
-        v8::String::NewFromUtf8(isolate, log.start(),
-                                v8::NewStringType::kNormal, log.length())
-            .ToLocalChecked();
-    initialize_logger.env()
+    logger.StopLogging();
+
+    v8::Local<v8::String> log_str = logger.GetLogString();
+    logger.env()
         ->Global()
-        ->Set(initialize_logger.env(), v8_str("_log"), log_str)
+        ->Set(logger.env(), v8_str("_log"), log_str)
         .FromJust();
 
-    i::Vector<const char> source = TestSources::GetScriptsSource();
+    // Load the Test snapshot's sources, see log-eq-of-logging-and-traversal.js
+    i::Vector<const char> source =
+        i::NativesCollection<i::TEST>::GetScriptsSource();
     v8::Local<v8::String> source_str =
         v8::String::NewFromUtf8(isolate, source.start(),
                                 v8::NewStringType::kNormal, source.length())
@@ -517,26 +648,20 @@
     v8::Local<v8::Script> script = CompileWithOrigin(source_str, "");
     if (script.IsEmpty()) {
       v8::String::Utf8Value exception(isolate, try_catch.Exception());
-      printf("compile: %s\n", *exception);
-      CHECK(false);
+      FATAL("compile: %s\n", *exception);
     }
     v8::Local<v8::Value> result;
-    if (!script->Run(initialize_logger.env()).ToLocal(&result)) {
+    if (!script->Run(logger.env()).ToLocal(&result)) {
       v8::String::Utf8Value exception(isolate, try_catch.Exception());
-      printf("run: %s\n", *exception);
-      CHECK(false);
+      FATAL("run: %s\n", *exception);
     }
-    // The result either be a "true" literal or problem description.
+    // The result either be the "true" literal or problem description.
     if (!result->IsTrue()) {
-      v8::Local<v8::String> s =
-          result->ToString(initialize_logger.env()).ToLocalChecked();
+      v8::Local<v8::String> s = result->ToString(logger.env()).ToLocalChecked();
       i::ScopedVector<char> data(s->Utf8Length() + 1);
       CHECK(data.start());
       s->WriteUtf8(data.start());
-      printf("%s\n", data.start());
-      // Make sure that our output is written prior crash due to CHECK failure.
-      fflush(stdout);
-      CHECK(false);
+      FATAL("%s\n", data.start());
     }
   }
   isolate->Dispose();
@@ -549,17 +674,14 @@
   create_params.array_buffer_allocator = CcTest::array_buffer_allocator();
   v8::Isolate* isolate = v8::Isolate::New(create_params);
   {
-    ScopedLoggerInitializer initialize_logger(saved_log, saved_prof, isolate);
-    bool exists = false;
-    i::Vector<const char> log(
-        i::ReadFile(initialize_logger.StopLoggingGetTempFile(), &exists, true));
-    CHECK(exists);
+    ScopedLoggerInitializer logger(saved_log, saved_prof, isolate);
+    logger.StopLogging();
+
     i::EmbeddedVector<char, 100> ref_data;
-    i::SNPrintF(ref_data, "v8-version,%d,%d,%d,%d,%d", i::Version::GetMajor(),
+    i::SNPrintF(ref_data, "%d,%d,%d,%d,%d", i::Version::GetMajor(),
                 i::Version::GetMinor(), i::Version::GetBuild(),
                 i::Version::GetPatch(), i::Version::IsCandidate());
-    CHECK(StrNStr(log.start(), ref_data.start(), log.length()));
-    log.Dispose();
+    CHECK(logger.FindLine("v8-version,", ref_data.start()));
   }
   isolate->Dispose();
 }
@@ -584,9 +706,8 @@
   v8::Isolate* isolate = v8::Isolate::New(create_params);
 
   {
-    ScopedLoggerInitializer initialize_logger(saved_log, saved_prof, isolate);
-    Logger* logger = initialize_logger.logger();
-    logger->addCodeEventListener(&code_event_logger);
+    ScopedLoggerInitializer logger(saved_log, saved_prof, isolate);
+    logger.logger()->addCodeEventListener(&code_event_logger);
 
     // Function with a really large name.
     const char* source_text =
@@ -613,7 +734,224 @@
     CompileRun(source_text);
 
     // Must not crash.
-    logger->LogCompiledFunctions();
+    logger.LogCompiledFunctions();
   }
   isolate->Dispose();
 }
+
+TEST(LogAll) {
+  SETUP_FLAGS();
+  i::FLAG_log_all = true;
+  v8::Isolate::CreateParams create_params;
+  create_params.array_buffer_allocator = CcTest::array_buffer_allocator();
+  v8::Isolate* isolate = v8::Isolate::New(create_params);
+
+  {
+    ScopedLoggerInitializer logger(saved_log, saved_prof, isolate);
+
+    // Function that will
+    const char* source_text =
+        "function testAddFn(a,b) { return a + b };"
+        "let result;"
+        "for (let i = 0; i < 100000; i++) { result = testAddFn(i, i); };"
+        "testAddFn('1', 1);"
+        "for (let i = 0; i < 100000; i++) { result = testAddFn('1', i); }";
+    CompileRun(source_text);
+
+    logger.StopLogging();
+
+    // We should find at least one code-creation even for testAddFn();
+    CHECK(logger.FindLine("api,v8::Context::New"));
+    CHECK(logger.FindLine("timer-event-start", "V8.CompileCode"));
+    CHECK(logger.FindLine("timer-event-end", "V8.CompileCode"));
+    CHECK(logger.FindLine("code-creation,Script", ":1:1"));
+    CHECK(logger.FindLine("api,v8::Script::Run"));
+    CHECK(logger.FindLine("code-creation,LazyCompile,", "testAddFn"));
+    if (i::FLAG_opt && !i::FLAG_always_opt) {
+      CHECK(logger.FindLine("code-deopt,", "soft"));
+      CHECK(logger.FindLine("timer-event-start", "V8.DeoptimizeCode"));
+      CHECK(logger.FindLine("timer-event-end", "V8.DeoptimizeCode"));
+    }
+  }
+  isolate->Dispose();
+}
+
+TEST(TraceMaps) {
+  SETUP_FLAGS();
+  i::FLAG_trace_maps = true;
+  v8::Isolate::CreateParams create_params;
+  create_params.array_buffer_allocator = CcTest::array_buffer_allocator();
+  v8::Isolate* isolate = v8::Isolate::New(create_params);
+  {
+    ScopedLoggerInitializer logger(saved_log, saved_prof, isolate);
+    // Try to create many different kind of maps to make sure the logging won't
+    // crash. More detailed tests are implemented separately.
+    const char* source_text =
+        "let a = {};"
+        "for (let i = 0; i < 500; i++) { a['p'+i] = i };"
+        "class Test { constructor(i) { this.a = 1; this['p'+i] = 1; }};"
+        "let t = new Test();"
+        "t.b = 1; t.c = 1; t.d = 3;"
+        "for (let i = 0; i < 100; i++) { t = new Test(i) };"
+        "t.b = {};";
+    CompileRun(source_text);
+
+    logger.StopLogging();
+
+    // Mostly superficial checks.
+    CHECK(logger.FindLine("map,InitialMap", ",0x"));
+    CHECK(logger.FindLine("map,Transition", ",0x"));
+    CHECK(logger.FindLine("map-details", ",0x"));
+  }
+  i::FLAG_trace_maps = false;
+  isolate->Dispose();
+}
+
+TEST(LogMaps) {
+  // Test that all Map details from Maps in the snapshot are logged properly.
+  SETUP_FLAGS();
+  i::FLAG_trace_maps = true;
+  v8::Isolate::CreateParams create_params;
+  create_params.array_buffer_allocator = CcTest::array_buffer_allocator();
+  v8::Isolate* isolate = v8::Isolate::New(create_params);
+  {
+    ScopedLoggerInitializer logger(saved_log, saved_prof, isolate);
+    logger.StopLogging();
+    // Extract all the map-detail entry addresses from the log.
+    std::unordered_set<uintptr_t> map_addresses;
+    logger.ExtractAllAddresses(&map_addresses, "map-details", 2);
+    i::Heap* heap = reinterpret_cast<i::Isolate*>(isolate)->heap();
+    i::HeapIterator iterator(heap);
+    i::DisallowHeapAllocation no_gc;
+
+    // Iterate over all maps on the heap.
+    size_t i = 0;
+    for (i::HeapObject* obj = iterator.next(); obj != nullptr;
+         obj = iterator.next()) {
+      i++;
+      if (!obj->IsMap()) continue;
+      uintptr_t address = reinterpret_cast<uintptr_t>(obj);
+      if (map_addresses.find(address) != map_addresses.end()) continue;
+      logger.PrintLog(200);
+      i::Map::cast(obj)->Print();
+      V8_Fatal(__FILE__, __LINE__,
+               "Map (%p, #%zu) was not logged during startup with --trace-maps!"
+               "\n# Expected Log Line: map_details, ... %p"
+               "\n# Use logger::PrintLog() for more details.",
+               reinterpret_cast<void*>(obj), i, reinterpret_cast<void*>(obj));
+    }
+    logger.PrintLog(200);
+  }
+  i::FLAG_log_function_events = false;
+  isolate->Dispose();
+}
+
+TEST(ConsoleTimeEvents) {
+  SETUP_FLAGS();
+  v8::Isolate::CreateParams create_params;
+  create_params.array_buffer_allocator = CcTest::array_buffer_allocator();
+  v8::Isolate* isolate = v8::Isolate::New(create_params);
+  {
+    ScopedLoggerInitializer logger(saved_log, saved_prof, isolate);
+    // Test that console time events are properly logged
+    const char* source_text =
+        "console.time();"
+        "console.timeEnd();"
+        "console.timeStamp();"
+        "console.time('timerEvent1');"
+        "console.timeEnd('timerEvent1');"
+        "console.timeStamp('timerEvent2');"
+        "console.timeStamp('timerEvent3');";
+    CompileRun(source_text);
+
+    logger.StopLogging();
+
+    const char* pairs[][2] = {{"timer-event-start,default,", nullptr},
+                              {"timer-event-end,default,", nullptr},
+                              {"timer-event,default,", nullptr},
+                              {"timer-event-start,timerEvent1,", nullptr},
+                              {"timer-event-end,timerEvent1,", nullptr},
+                              {"timer-event,timerEvent2,", nullptr},
+                              {"timer-event,timerEvent3,", nullptr}};
+    logger.FindLogLines(pairs, arraysize(pairs));
+  }
+
+  isolate->Dispose();
+}
+
+TEST(LogFunctionEvents) {
+  // Always opt and stress opt will break the fine-grained log order.
+  if (i::FLAG_always_opt) return;
+
+  SETUP_FLAGS();
+  i::FLAG_log_function_events = true;
+  v8::Isolate::CreateParams create_params;
+  create_params.array_buffer_allocator = CcTest::array_buffer_allocator();
+  v8::Isolate* isolate = v8::Isolate::New(create_params);
+  {
+    ScopedLoggerInitializer logger(saved_log, saved_prof, isolate);
+    const char* source_text =
+        "function lazyNotExecutedFunction() { return 'lazy' };"
+        "function lazyFunction() { "
+        "  function lazyInnerFunction() { return 'lazy' };"
+        "  return lazyInnerFunction;"
+        "};"
+        "let innerFn = lazyFunction();"
+        "innerFn();"
+        "(function eagerFunction(){ return 'eager' })();"
+        "function Foo() { this.foo = function(){}; };"
+        "let i = new Foo(); i.foo();";
+    CompileRun(source_text);
+
+    logger.StopLogging();
+
+    // TODO(cbruni): Extend with first-execution log statements.
+    CHECK_NULL(
+        logger.FindLine("function,compile-lazy,", ",lazyNotExecutedFunction"));
+    // Only consider the log starting from the first preparse statement on.
+    const char* start =
+        logger.FindLine("function,preparse-", ",lazyNotExecutedFunction");
+    const char* pairs[][2] = {
+        // Step 1: parsing top-level script, preparsing functions
+        {"function,preparse-", ",lazyNotExecutedFunction"},
+        // Missing name for preparsing lazyInnerFunction
+        // {"function,preparse-", nullptr},
+        {"function,preparse-", ",lazyFunction"},
+        {"function,full-parse,", ",eagerFunction"},
+        {"function,preparse-", ",Foo"},
+        // Missing name for inner preparsing of Foo.foo
+        // {"function,preparse-", nullptr},
+        // Missing name for top-level script.
+        {"function,parse-script,", nullptr},
+
+        // Step 2: compiling top-level script and eager functions
+        // - Compiling script without name.
+        {"function,compile,,", nullptr},
+        {"function,compile,", ",eagerFunction"},
+
+        // Step 3: start executing script
+        // Step 4. - lazy parse, lazy compiling and execute skipped functions
+        //         - execute eager functions.
+        {"function,parse-function,", ",lazyFunction"},
+        {"function,compile-lazy,", ",lazyFunction"},
+        {"function,first-execution,", ",lazyFunction"},
+
+        {"function,parse-function,", ",lazyInnerFunction"},
+        {"function,compile-lazy,", ",lazyInnerFunction"},
+        {"function,first-execution,", ",lazyInnerFunction"},
+
+        {"function,first-execution,", ",eagerFunction"},
+
+        {"function,parse-function,", ",Foo"},
+        {"function,compile-lazy,", ",Foo"},
+        {"function,first-execution,", ",Foo"},
+
+        {"function,parse-function,", ",Foo.foo"},
+        {"function,compile-lazy,", ",Foo.foo"},
+        {"function,first-execution,", ",Foo.foo"},
+    };
+    logger.FindLogLines(pairs, arraysize(pairs), start);
+  }
+  i::FLAG_log_function_events = false;
+  isolate->Dispose();
+}
diff --git a/src/v8/test/cctest/test-macro-assembler-arm.cc b/src/v8/test/cctest/test-macro-assembler-arm.cc
index 9757967..acef273 100644
--- a/src/v8/test/cctest/test-macro-assembler-arm.cc
+++ b/src/v8/test/cctest/test-macro-assembler-arm.cc
@@ -27,10 +27,10 @@
 
 #include <stdlib.h>
 
-#include "src/arm/simulator-arm.h"
 #include "src/assembler-inl.h"
 #include "src/macro-assembler.h"
 #include "src/objects-inl.h"
+#include "src/simulator.h"
 #include "src/v8.h"
 #include "test/cctest/cctest.h"
 
@@ -38,25 +38,23 @@
 namespace internal {
 namespace test_macro_assembler_arm {
 
-typedef void* (*F)(int x, int y, int p2, int p3, int p4);
+using F = void*(int x, int y, int p2, int p3, int p4);
 
 #define __ masm->
 
-typedef Object* (*F3)(void* p0, int p1, int p2, int p3, int p4);
-typedef int (*F5)(void*, void*, void*, void*, void*);
-
+using F3 = Object*(void* p0, int p1, int p2, int p3, int p4);
+using F5 = int(void*, void*, void*, void*, void*);
 
 TEST(LoadAndStoreWithRepresentation) {
-  // Allocate an executable page of memory.
-  size_t actual_size;
-  byte* buffer = static_cast<byte*>(v8::base::OS::Allocate(
-      Assembler::kMinimalBufferSize, &actual_size, true));
-  CHECK(buffer);
   Isolate* isolate = CcTest::i_isolate();
   HandleScope handles(isolate);
-  MacroAssembler assembler(isolate, buffer, static_cast<int>(actual_size),
+
+  size_t allocated;
+  byte* buffer = AllocateAssemblerBuffer(&allocated);
+  MacroAssembler assembler(isolate, buffer, static_cast<int>(allocated),
                            v8::internal::CodeObjectRequired::kYes);
   MacroAssembler* masm = &assembler;  // Create a pointer for the __ macro.
+
   __ sub(sp, sp, Operand(1 * kPointerSize));
   Label exit;
 
@@ -131,21 +129,19 @@
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
 
   // Call the function from C++.
-  F5 f = FUNCTION_CAST<F5>(code->entry());
-  CHECK(!CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0));
+  auto f = GeneratedCode<F5>::FromCode(*code);
+  CHECK(!f.Call(0, 0, 0, 0, 0));
 }
 
 TEST(ExtractLane) {
   if (!CpuFeatures::IsSupported(NEON)) return;
 
-  // Allocate an executable page of memory.
-  size_t actual_size;
-  byte* buffer = static_cast<byte*>(v8::base::OS::Allocate(
-      Assembler::kMinimalBufferSize, &actual_size, true));
-  CHECK(buffer);
   Isolate* isolate = CcTest::i_isolate();
   HandleScope handles(isolate);
-  MacroAssembler assembler(isolate, buffer, static_cast<int>(actual_size),
+
+  size_t allocated;
+  byte* buffer = AllocateAssemblerBuffer(&allocated);
+  MacroAssembler assembler(isolate, buffer, static_cast<int>(allocated),
                            v8::internal::CodeObjectRequired::kYes);
   MacroAssembler* masm = &assembler;  // Create a pointer for the __ macro.
 
@@ -243,9 +239,8 @@
   OFStream os(stdout);
   code->Print(os);
 #endif
-  F3 f = FUNCTION_CAST<F3>(code->entry());
-  Object* dummy = CALL_GENERATED_CODE(isolate, f, &t, 0, 0, 0, 0);
-  USE(dummy);
+  auto f = GeneratedCode<F3>::FromCode(*code);
+  f.Call(&t, 0, 0, 0, 0);
   for (int i = 0; i < 4; i++) {
     CHECK_EQ(i, t.i32x4_low[i]);
     CHECK_EQ(i, t.f32x4_low[i]);
@@ -281,14 +276,12 @@
 TEST(ReplaceLane) {
   if (!CpuFeatures::IsSupported(NEON)) return;
 
-  // Allocate an executable page of memory.
-  size_t actual_size;
-  byte* buffer = static_cast<byte*>(v8::base::OS::Allocate(
-      Assembler::kMinimalBufferSize, &actual_size, true));
-  CHECK(buffer);
   Isolate* isolate = CcTest::i_isolate();
   HandleScope handles(isolate);
-  MacroAssembler assembler(isolate, buffer, static_cast<int>(actual_size),
+
+  size_t allocated;
+  byte* buffer = AllocateAssemblerBuffer(&allocated);
+  MacroAssembler assembler(isolate, buffer, static_cast<int>(allocated),
                            v8::internal::CodeObjectRequired::kYes);
   MacroAssembler* masm = &assembler;  // Create a pointer for the __ macro.
 
@@ -378,9 +371,8 @@
   OFStream os(stdout);
   code->Print(os);
 #endif
-  F3 f = FUNCTION_CAST<F3>(code->entry());
-  Object* dummy = CALL_GENERATED_CODE(isolate, f, &t, 0, 0, 0, 0);
-  USE(dummy);
+  auto f = GeneratedCode<F3>::FromCode(*code);
+  f.Call(&t, 0, 0, 0, 0);
   for (int i = 0; i < 4; i++) {
     CHECK_EQ(i, t.i32x4_low[i]);
     CHECK_EQ(i, t.f32x4_low[i]);
diff --git a/src/v8/test/cctest/test-macro-assembler-mips.cc b/src/v8/test/cctest/test-macro-assembler-mips.cc
index f1a0b2a..66d6c4b 100644
--- a/src/v8/test/cctest/test-macro-assembler-mips.cc
+++ b/src/v8/test/cctest/test-macro-assembler-mips.cc
@@ -32,17 +32,18 @@
 #include "src/base/utils/random-number-generator.h"
 #include "src/macro-assembler.h"
 #include "src/mips/macro-assembler-mips.h"
-#include "src/mips/simulator-mips.h"
 #include "src/objects-inl.h"
+#include "src/simulator.h"
 #include "src/v8.h"
 #include "test/cctest/cctest.h"
 
 namespace v8 {
 namespace internal {
 
-typedef Object* (*F1)(int x, int p1, int p2, int p3, int p4);
-typedef Object* (*F3)(void* p, int p1, int p2, int p3, int p4);
-typedef Object* (*F4)(void* p0, void* p1, int p2, int p3, int p4);
+// TODO(mips): Refine these signatures per test case.
+using F1 = Object*(int x, int p1, int p2, int p3, int p4);
+using F3 = Object*(void* p, int p1, int p2, int p3, int p4);
+using F4 = Object*(void* p0, void* p1, int p2, int p3, int p4);
 
 #define __ masm->
 
@@ -60,7 +61,7 @@
   };
   T t;
 
-  MacroAssembler assembler(isolate, NULL, 0,
+  MacroAssembler assembler(isolate, nullptr, 0,
                            v8::internal::CodeObjectRequired::kYes);
   MacroAssembler* masm = &assembler;
 
@@ -96,14 +97,13 @@
   masm->GetCode(isolate, &desc);
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
-  F3 f = FUNCTION_CAST<F3>(code->entry());
+  auto f = GeneratedCode<F3>::FromCode(*code);
   t.r1 = 0x781A15C3;
   t.r2 = 0x2CDE;
   t.r3 = 0x9F;
   t.r4 = 0x9F;
   t.r5 = 0x2CDE;
-  Object* dummy = CALL_GENERATED_CODE(isolate, f, &t, 0, 0, 0, 0);
-  USE(dummy);
+  f.Call(&t, 0, 0, 0, 0);
 
   CHECK_EQ(static_cast<int32_t>(0xC3151A78), t.r1);
   CHECK_EQ(static_cast<int32_t>(0xDE2C0000), t.r2);
@@ -208,10 +208,9 @@
 #ifdef OBJECT_PRINT
   code->Print(std::cout);
 #endif
-  F1 f = FUNCTION_CAST<F1>(code->entry());
+  auto f = GeneratedCode<F1>::FromCode(*code);
   for (int i = 0; i < kNumCases; ++i) {
-    int res =
-        reinterpret_cast<int>(CALL_GENERATED_CODE(isolate, f, i, 0, 0, 0, 0));
+    int res = reinterpret_cast<int>(f.Call(i, 0, 0, 0, 0));
     ::printf("f(%d) = %d\n", i, res);
     CHECK_EQ(values[i], res);
   }
@@ -275,10 +274,9 @@
 #ifdef OBJECT_PRINT
   code->Print(std::cout);
 #endif
-  F1 f = FUNCTION_CAST<F1>(code->entry());
+  auto f = GeneratedCode<F1>::FromCode(*code);
   for (int i = 0; i < kNumCases; ++i) {
-    int32_t res = reinterpret_cast<int32_t>(
-        CALL_GENERATED_CODE(isolate, f, i, 0, 0, 0, 0));
+    int32_t res = reinterpret_cast<int32_t>(f.Call(i, 0, 0, 0, 0));
     ::printf("f(%d) = %d\n", i, res);
     CHECK_EQ(values[i], res);
   }
@@ -366,10 +364,9 @@
 #ifdef OBJECT_PRINT
   code->Print(std::cout);
 #endif
-  F1 f = FUNCTION_CAST<F1>(code->entry());
+  auto f = GeneratedCode<F1>::FromCode(*code);
   for (int i = 0; i < kSwitchTableCases; ++i) {
-    int res =
-        reinterpret_cast<int>(CALL_GENERATED_CODE(isolate, f, i, 0, 0, 0, 0));
+    int res = reinterpret_cast<int>(f.Call(i, 0, 0, 0, 0));
     ::printf("f(%d) = %d\n", i, res);
     CHECK_EQ(values[i], res);
   }
@@ -391,10 +388,9 @@
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
 
-  F1 f = FUNCTION_CAST<F1>(code->entry());
+  auto f = GeneratedCode<F1>::FromCode(*code);
 
-  uint32_t res = reinterpret_cast<uint32_t>(
-      CALL_GENERATED_CODE(isolate, f, rt, rs, 0, 0, 0));
+  uint32_t res = reinterpret_cast<uint32_t>(f.Call(rt, rs, 0, 0, 0));
 
   return res;
 }
@@ -412,7 +408,7 @@
   struct TestCaseLsa tc[] = {// rt, rs, sa, expected_res
                              {0x4, 0x1, 1, 0x6},
                              {0x4, 0x1, 2, 0x8},
-                             {0x4, 0x1, 3, 0xc},
+                             {0x4, 0x1, 3, 0xC},
                              {0x4, 0x1, 4, 0x14},
                              {0x4, 0x1, 5, 0x24},
                              {0x0, 0x1, 1, 0x2},
@@ -429,9 +425,9 @@
                              // Shift overflow.
                              {0x4, INT32_MAX, 1, 0x2},
                              {0x4, INT32_MAX >> 1, 2, 0x0},
-                             {0x4, INT32_MAX >> 2, 3, 0xfffffffc},
-                             {0x4, INT32_MAX >> 3, 4, 0xfffffff4},
-                             {0x4, INT32_MAX >> 4, 5, 0xffffffe4},
+                             {0x4, INT32_MAX >> 2, 3, 0xFFFFFFFC},
+                             {0x4, INT32_MAX >> 3, 4, 0xFFFFFFF4},
+                             {0x4, INT32_MAX >> 4, 5, 0xFFFFFFE4},
 
                              // Signed addition overflow.
                              {INT32_MAX - 1, 0x1, 1, 0x80000000},
@@ -457,19 +453,19 @@
 }
 
 static const std::vector<uint32_t> cvt_trunc_uint32_test_values() {
-  static const uint32_t kValues[] = {0x00000000, 0x00000001, 0x00ffff00,
-                                     0x7fffffff, 0x80000000, 0x80000001,
-                                     0x80ffff00, 0x8fffffff, 0xffffffff};
+  static const uint32_t kValues[] = {0x00000000, 0x00000001, 0x00FFFF00,
+                                     0x7FFFFFFF, 0x80000000, 0x80000001,
+                                     0x80FFFF00, 0x8FFFFFFF, 0xFFFFFFFF};
   return std::vector<uint32_t>(&kValues[0], &kValues[arraysize(kValues)]);
 }
 
 static const std::vector<int32_t> cvt_trunc_int32_test_values() {
   static const int32_t kValues[] = {
       static_cast<int32_t>(0x00000000), static_cast<int32_t>(0x00000001),
-      static_cast<int32_t>(0x00ffff00), static_cast<int32_t>(0x7fffffff),
+      static_cast<int32_t>(0x00FFFF00), static_cast<int32_t>(0x7FFFFFFF),
       static_cast<int32_t>(0x80000000), static_cast<int32_t>(0x80000001),
-      static_cast<int32_t>(0x80ffff00), static_cast<int32_t>(0x8fffffff),
-      static_cast<int32_t>(0xffffffff)};
+      static_cast<int32_t>(0x80FFFF00), static_cast<int32_t>(0x8FFFFFFF),
+      static_cast<int32_t>(0xFFFFFFFF)};
   return std::vector<int32_t>(&kValues[0], &kValues[arraysize(kValues)]);
 }
 
@@ -502,7 +498,7 @@
 
 template <typename RET_TYPE, typename IN_TYPE, typename Func>
 RET_TYPE run_Cvt(IN_TYPE x, Func GenerateConvertInstructionFunc) {
-  typedef RET_TYPE (*F_CVT)(IN_TYPE x0, int x1, int x2, int x3, int x4);
+  typedef RET_TYPE(F_CVT)(IN_TYPE x0, int x1, int x2, int x3, int x4);
 
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
@@ -521,10 +517,9 @@
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
 
-  F_CVT f = FUNCTION_CAST<F_CVT>(code->entry());
+  auto f = GeneratedCode<F_CVT>::FromCode(*code);
 
-  return reinterpret_cast<RET_TYPE>(
-      CALL_GENERATED_CODE(isolate, f, x, 0, 0, 0, 0));
+  return reinterpret_cast<RET_TYPE>(f.Call(x, 0, 0, 0, 0));
 }
 
 TEST(cvt_s_w_Trunc_uw_s) {
@@ -553,11 +548,11 @@
 
 static const std::vector<int32_t> overflow_int32_test_values() {
   static const int32_t kValues[] = {
-      static_cast<int32_t>(0xf0000000), static_cast<int32_t>(0x00000001),
-      static_cast<int32_t>(0xff000000), static_cast<int32_t>(0x0000f000),
-      static_cast<int32_t>(0x0f000000), static_cast<int32_t>(0x991234ab),
-      static_cast<int32_t>(0xb0ffff01), static_cast<int32_t>(0x00006fff),
-      static_cast<int32_t>(0xffffffff)};
+      static_cast<int32_t>(0xF0000000), static_cast<int32_t>(0x00000001),
+      static_cast<int32_t>(0xFF000000), static_cast<int32_t>(0x0000F000),
+      static_cast<int32_t>(0x0F000000), static_cast<int32_t>(0x991234AB),
+      static_cast<int32_t>(0xB0FFFF01), static_cast<int32_t>(0x00006FFF),
+      static_cast<int32_t>(0xFFFFFFFF)};
   return std::vector<int32_t>(&kValues[0], &kValues[arraysize(kValues)]);
 }
 
@@ -609,7 +604,7 @@
 template <typename IN_TYPE, typename Func>
 static bool runOverflow(IN_TYPE valLeft, IN_TYPE valRight,
                         Func GenerateOverflowInstructions) {
-  typedef int32_t (*F_CVT)(char* x0, int x1, int x2, int x3, int x4);
+  typedef int32_t(F_CVT)(char* x0, int x1, int x2, int x3, int x4);
 
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
@@ -626,10 +621,9 @@
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
 
-  F_CVT f = FUNCTION_CAST<F_CVT>(code->entry());
+  auto f = GeneratedCode<F_CVT>::FromCode(*code);
 
-  int32_t r =
-      reinterpret_cast<int32_t>(CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0));
+  int32_t r = reinterpret_cast<int32_t>(f.Call(0, 0, 0, 0, 0));
 
   DCHECK(r == 0 || r == 1);
   return r;
@@ -823,12 +817,12 @@
                 __ li(rc.right, valRight);
                 switch (branchType) {
                   case kAddBranchOverflow:
-                    __ AddBranchOvf(rc.dst, rc.left, rc.right, &overflow, NULL,
-                                    rc.scratch);
+                    __ AddBranchOvf(rc.dst, rc.left, rc.right, &overflow,
+                                    nullptr, rc.scratch);
                     break;
                   case kSubBranchOverflow:
-                    __ SubBranchOvf(rc.dst, rc.left, rc.right, &overflow, NULL,
-                                    rc.scratch);
+                    __ SubBranchOvf(rc.dst, rc.left, rc.right, &overflow,
+                                    nullptr, rc.scratch);
                     break;
                 }
                 __ li(v0, 0);
@@ -846,11 +840,11 @@
                 switch (branchType) {
                   case kAddBranchOverflow:
                     __ AddBranchOvf(rc.dst, rc.left, Operand(valRight),
-                                    &overflow, NULL, rc.scratch);
+                                    &overflow, nullptr, rc.scratch);
                     break;
                   case kSubBranchOverflow:
                     __ SubBranchOvf(rc.dst, rc.left, Operand(valRight),
-                                    &overflow, NULL, rc.scratch);
+                                    &overflow, nullptr, rc.scratch);
                     break;
                 }
                 __ li(v0, 0);
@@ -905,11 +899,11 @@
                 __ li(rc.right, valRight);
                 switch (branchType) {
                   case kAddBranchOverflow:
-                    __ AddBranchOvf(rc.dst, rc.left, rc.right, NULL,
+                    __ AddBranchOvf(rc.dst, rc.left, rc.right, nullptr,
                                     &no_overflow, rc.scratch);
                     break;
                   case kSubBranchOverflow:
-                    __ SubBranchOvf(rc.dst, rc.left, rc.right, NULL,
+                    __ SubBranchOvf(rc.dst, rc.left, rc.right, nullptr,
                                     &no_overflow, rc.scratch);
                     break;
                 }
@@ -927,11 +921,11 @@
                 __ li(rc.left, valLeft);
                 switch (branchType) {
                   case kAddBranchOverflow:
-                    __ AddBranchOvf(rc.dst, rc.left, Operand(valRight), NULL,
+                    __ AddBranchOvf(rc.dst, rc.left, Operand(valRight), nullptr,
                                     &no_overflow, rc.scratch);
                     break;
                   case kSubBranchOverflow:
-                    __ SubBranchOvf(rc.dst, rc.left, Operand(valRight), NULL,
+                    __ SubBranchOvf(rc.dst, rc.left, Operand(valRight), nullptr,
                                     &no_overflow, rc.scratch);
                     break;
                 }
@@ -1054,14 +1048,14 @@
   masm->GetCode(isolate, &desc);
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
-  F3 f = FUNCTION_CAST<F3>(code->entry());
+  auto f = GeneratedCode<F3>::FromCode(*code);
   for (int i = 0; i < kTableLength; i++) {
     test.a = inputsa[i];
     test.b = inputsb[i];
     test.e = inputse[i];
     test.f = inputsf[i];
 
-    CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0);
+    f.Call(&test, 0, 0, 0, 0);
 
     CHECK_EQ(0, memcmp(&test.c, &outputsdmin[i], sizeof(test.c)));
     CHECK_EQ(0, memcmp(&test.d, &outputsdmax[i], sizeof(test.d)));
@@ -1073,7 +1067,7 @@
 template <typename IN_TYPE, typename Func>
 bool run_Unaligned(char* memory_buffer, int32_t in_offset, int32_t out_offset,
                    IN_TYPE value, Func GenerateUnalignedInstructionFunc) {
-  typedef int32_t (*F_CVT)(char* x0, int x1, int x2, int x3, int x4);
+  typedef int32_t(F_CVT)(char* x0, int x1, int x2, int x3, int x4);
 
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
@@ -1091,10 +1085,10 @@
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
 
-  F_CVT f = FUNCTION_CAST<F_CVT>(code->entry());
+  auto f = GeneratedCode<F_CVT>::FromCode(*code);
 
   MemCopy(memory_buffer + in_offset, &value, sizeof(IN_TYPE));
-  CALL_GENERATED_CODE(isolate, f, memory_buffer, 0, 0, 0, 0);
+  f.Call(memory_buffer, 0, 0, 0, 0);
   MemCopy(&res, memory_buffer + out_offset, sizeof(IN_TYPE));
 
   return res == value;
@@ -1102,8 +1096,8 @@
 
 static const std::vector<uint64_t> unsigned_test_values() {
   static const uint64_t kValues[] = {
-      0x2180f18a06384414, 0x000a714532102277, 0xbc1acccf180649f0,
-      0x8000000080008000, 0x0000000000000001, 0xffffffffffffffff,
+      0x2180F18A06384414, 0x000A714532102277, 0xBC1ACCCF180649F0,
+      0x8000000080008000, 0x0000000000000001, 0xFFFFFFFFFFFFFFFF,
   };
   return std::vector<uint64_t>(&kValues[0], &kValues[arraysize(kValues)]);
 }
@@ -1313,16 +1307,16 @@
 
 static const std::vector<uint32_t> sltu_test_values() {
   static const uint32_t kValues[] = {
-      0,          1,          0x7ffe,     0x7fff,     0x8000,
-      0x8001,     0xfffe,     0xffff,     0xffff7ffe, 0xffff7fff,
-      0xffff8000, 0xffff8001, 0xfffffffe, 0xffffffff,
+      0,          1,          0x7FFE,     0x7FFF,     0x8000,
+      0x8001,     0xFFFE,     0xFFFF,     0xFFFF7FFE, 0xFFFF7FFF,
+      0xFFFF8000, 0xFFFF8001, 0xFFFFFFFE, 0xFFFFFFFF,
   };
   return std::vector<uint32_t>(&kValues[0], &kValues[arraysize(kValues)]);
 }
 
 template <typename Func>
 bool run_Sltu(uint32_t rs, uint32_t rd, Func GenerateSltuInstructionFunc) {
-  typedef int32_t (*F_CVT)(uint32_t x0, uint32_t x1, int x2, int x3, int x4);
+  typedef int32_t(F_CVT)(uint32_t x0, uint32_t x1, int x2, int x3, int x4);
 
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
@@ -1339,9 +1333,8 @@
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
 
-  F_CVT f = FUNCTION_CAST<F_CVT>(code->entry());
-  int32_t res = reinterpret_cast<int32_t>(
-      CALL_GENERATED_CODE(isolate, f, rs, rd, 0, 0, 0));
+  auto f = GeneratedCode<F_CVT>::FromCode(*code);
+  int32_t res = reinterpret_cast<int32_t>(f.Call(rs, rd, 0, 0, 0));
   return res == 1;
 }
 
@@ -1367,7 +1360,7 @@
 }
 
 template <typename T, typename Inputs, typename Results>
-static F4 GenerateMacroFloat32MinMax(MacroAssembler* masm) {
+static GeneratedCode<F4> GenerateMacroFloat32MinMax(MacroAssembler* masm) {
   T a = T::from_code(4);  // f4
   T b = T::from_code(6);  // f6
   T c = T::from_code(8);  // f8
@@ -1437,7 +1430,7 @@
   OFStream os(stdout);
   code->Print(os);
 #endif
-  return FUNCTION_CAST<F4>(code->entry());
+  return GeneratedCode<F4>::FromCode(*code);
 }
 
 TEST(macro_float_minmax_f32) {
@@ -1446,7 +1439,7 @@
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
 
-  MacroAssembler assembler(isolate, NULL, 0,
+  MacroAssembler assembler(isolate, nullptr, 0,
                            v8::internal::CodeObjectRequired::kYes);
   MacroAssembler* masm = &assembler;
 
@@ -1466,15 +1459,14 @@
     float max_aba_;
   };
 
-  F4 f = GenerateMacroFloat32MinMax<FPURegister, Inputs, Results>(masm);
-  Object* dummy = nullptr;
-  USE(dummy);
+  GeneratedCode<F4> f =
+      GenerateMacroFloat32MinMax<FPURegister, Inputs, Results>(masm);
 
 #define CHECK_MINMAX(src1, src2, min, max)                                   \
   do {                                                                       \
     Inputs inputs = {src1, src2};                                            \
     Results results;                                                         \
-    dummy = CALL_GENERATED_CODE(isolate, f, &inputs, &results, 0, 0, 0);     \
+    f.Call(&inputs, &results, 0, 0, 0);                                      \
     CHECK_EQ(bit_cast<uint32_t>(min), bit_cast<uint32_t>(results.min_abc_)); \
     CHECK_EQ(bit_cast<uint32_t>(min), bit_cast<uint32_t>(results.min_aab_)); \
     CHECK_EQ(bit_cast<uint32_t>(min), bit_cast<uint32_t>(results.min_aba_)); \
@@ -1510,7 +1502,7 @@
 }
 
 template <typename T, typename Inputs, typename Results>
-static F4 GenerateMacroFloat64MinMax(MacroAssembler* masm) {
+static GeneratedCode<F4> GenerateMacroFloat64MinMax(MacroAssembler* masm) {
   T a = T::from_code(4);  // f4
   T b = T::from_code(6);  // f6
   T c = T::from_code(8);  // f8
@@ -1580,7 +1572,7 @@
   OFStream os(stdout);
   code->Print(os);
 #endif
-  return FUNCTION_CAST<F4>(code->entry());
+  return GeneratedCode<F4>::FromCode(*code);
 }
 
 TEST(macro_float_minmax_f64) {
@@ -1589,7 +1581,7 @@
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
 
-  MacroAssembler assembler(isolate, NULL, 0,
+  MacroAssembler assembler(isolate, nullptr, 0,
                            v8::internal::CodeObjectRequired::kYes);
   MacroAssembler* masm = &assembler;
 
@@ -1609,15 +1601,14 @@
     double max_aba_;
   };
 
-  F4 f = GenerateMacroFloat64MinMax<DoubleRegister, Inputs, Results>(masm);
-  Object* dummy = nullptr;
-  USE(dummy);
+  GeneratedCode<F4> f =
+      GenerateMacroFloat64MinMax<DoubleRegister, Inputs, Results>(masm);
 
 #define CHECK_MINMAX(src1, src2, min, max)                                   \
   do {                                                                       \
     Inputs inputs = {src1, src2};                                            \
     Results results;                                                         \
-    dummy = CALL_GENERATED_CODE(isolate, f, &inputs, &results, 0, 0, 0);     \
+    f.Call(&inputs, &results, 0, 0, 0);                                      \
     CHECK_EQ(bit_cast<uint64_t>(min), bit_cast<uint64_t>(results.min_abc_)); \
     CHECK_EQ(bit_cast<uint64_t>(min), bit_cast<uint64_t>(results.min_aab_)); \
     CHECK_EQ(bit_cast<uint64_t>(min), bit_cast<uint64_t>(results.min_aba_)); \
diff --git a/src/v8/test/cctest/test-macro-assembler-mips64.cc b/src/v8/test/cctest/test-macro-assembler-mips64.cc
index 58e5b32..2b199cb 100644
--- a/src/v8/test/cctest/test-macro-assembler-mips64.cc
+++ b/src/v8/test/cctest/test-macro-assembler-mips64.cc
@@ -34,16 +34,17 @@
 #include "src/base/utils/random-number-generator.h"
 #include "src/macro-assembler.h"
 #include "src/mips64/macro-assembler-mips64.h"
-#include "src/mips64/simulator-mips64.h"
 #include "src/objects-inl.h"
+#include "src/simulator.h"
 
 namespace v8 {
 namespace internal {
 
-typedef void* (*FV)(int64_t x, int64_t y, int p2, int p3, int p4);
-typedef Object* (*F1)(int x, int p1, int p2, int p3, int p4);
-typedef Object* (*F3)(void* p, int p1, int p2, int p3, int p4);
-typedef Object* (*F4)(void* p0, void* p1, int p2, int p3, int p4);
+// TODO(mips64): Refine these signatures per test case.
+using FV = void*(int64_t x, int64_t y, int p2, int p3, int p4);
+using F1 = Object*(int x, int p1, int p2, int p3, int p4);
+using F3 = Object*(void* p, int p1, int p2, int p3, int p4);
+using F4 = Object*(void* p0, void* p1, int p2, int p3, int p4);
 
 #define __ masm->
 
@@ -64,7 +65,7 @@
   };
   T t;
 
-  MacroAssembler assembler(isolate, NULL, 0,
+  MacroAssembler assembler(isolate, nullptr, 0,
                            v8::internal::CodeObjectRequired::kYes);
 
   MacroAssembler* masm = &assembler;
@@ -111,7 +112,7 @@
   masm->GetCode(isolate, &desc);
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
-  F3 f = FUNCTION_CAST<F3>(code->entry());
+  auto f = GeneratedCode<F3>::FromCode(*code);
   t.r1 = 0x5612FFCD9D327ACC;
   t.r2 = 0x781A15C3;
   t.r3 = 0xFCDE;
@@ -119,8 +120,7 @@
   t.r5 = 0x9F;
   t.r6 = 0xFCDE;
   t.r7 = 0xC81A15C3;
-  Object* dummy = CALL_GENERATED_CODE(isolate, f, &t, 0, 0, 0, 0);
-  USE(dummy);
+  f.Call(&t, 0, 0, 0, 0);
 
   CHECK_EQ(static_cast<int64_t>(0xCC7A329DCDFF1256), t.r1);
   CHECK_EQ(static_cast<int64_t>(0xC3151A7800000000), t.r2);
@@ -144,7 +144,7 @@
     refConstants[i] = ~(mask << i);
   }
 
-  MacroAssembler assembler(isolate, NULL, 0,
+  MacroAssembler assembler(isolate, nullptr, 0,
                            v8::internal::CodeObjectRequired::kYes);
   MacroAssembler* masm = &assembler;
 
@@ -164,9 +164,8 @@
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
 
-  FV f = FUNCTION_CAST<FV>(code->entry());
-  (void)CALL_GENERATED_CODE(isolate, f, reinterpret_cast<int64_t>(result), 0, 0,
-                            0, 0);
+  auto f = GeneratedCode<FV>::FromCode(*code);
+  (void)f.Call(reinterpret_cast<int64_t>(result), 0, 0, 0, 0);
   // Check results.
   for (int i = 0; i < 64; i++) {
     CHECK(refConstants[i] == result[i]);
@@ -179,7 +178,7 @@
   Isolate* isolate = CcTest::i_isolate();
   HandleScope handles(isolate);
 
-  MacroAssembler assembler(isolate, NULL, 0,
+  MacroAssembler assembler(isolate, nullptr, 0,
                            v8::internal::CodeObjectRequired::kYes);
   MacroAssembler* masm = &assembler;
   Label to_jump, skip;
@@ -209,8 +208,8 @@
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
 
-  FV f = FUNCTION_CAST<FV>(code->entry());
-  (void)CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0);
+  auto f = GeneratedCode<FV>::FromCode(*code);
+  (void)f.Call(0, 0, 0, 0, 0);
   // Check results.
 }
 
@@ -269,10 +268,9 @@
 #ifdef OBJECT_PRINT
   code->Print(std::cout);
 #endif
-  F1 f = FUNCTION_CAST<F1>(code->entry());
+  auto f = GeneratedCode<F1>::FromCode(*code);
   for (int i = 0; i < kNumCases; ++i) {
-    int64_t res = reinterpret_cast<int64_t>(
-        CALL_GENERATED_CODE(isolate, f, i, 0, 0, 0, 0));
+    int64_t res = reinterpret_cast<int64_t>(f.Call(i, 0, 0, 0, 0));
     ::printf("f(%d) = %" PRId64 "\n", i, res);
     CHECK_EQ(values[i], res);
   }
@@ -343,10 +341,9 @@
 #ifdef OBJECT_PRINT
   code->Print(std::cout);
 #endif
-  F1 f = FUNCTION_CAST<F1>(code->entry());
+  auto f = GeneratedCode<F1>::FromCode(*code);
   for (int i = 0; i < kNumCases; ++i) {
-    int64_t res = reinterpret_cast<int64_t>(
-        CALL_GENERATED_CODE(isolate, f, i, 0, 0, 0, 0));
+    int64_t res = reinterpret_cast<int64_t>(f.Call(i, 0, 0, 0, 0));
     ::printf("f(%d) = %" PRId64 "\n", i, res);
     CHECK_EQ(values[i], res);
   }
@@ -435,10 +432,9 @@
 #ifdef OBJECT_PRINT
   code->Print(std::cout);
 #endif
-  F1 f = FUNCTION_CAST<F1>(code->entry());
+  auto f = GeneratedCode<F1>::FromCode(*code);
   for (int i = 0; i < kSwitchTableCases; ++i) {
-    int64_t res = reinterpret_cast<int64_t>(
-        CALL_GENERATED_CODE(isolate, f, i, 0, 0, 0, 0));
+    int64_t res = reinterpret_cast<int64_t>(f.Call(i, 0, 0, 0, 0));
     ::printf("f(%d) = %" PRId64 "\n", i, res);
     CHECK_EQ(values[i], res);
   }
@@ -460,10 +456,9 @@
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
 
-  F1 f = FUNCTION_CAST<F1>(code->entry());
+  auto f = GeneratedCode<F1>::FromCode(*code);
 
-  uint64_t res = reinterpret_cast<uint64_t>(
-      CALL_GENERATED_CODE(isolate, f, rt, rs, 0, 0, 0));
+  uint64_t res = reinterpret_cast<uint64_t>(f.Call(rt, rs, 0, 0, 0));
 
   return res;
 }
@@ -481,7 +476,7 @@
   struct TestCaseLsa tc[] = {// rt, rs, sa, expected_res
                              {0x4, 0x1, 1, 0x6},
                              {0x4, 0x1, 2, 0x8},
-                             {0x4, 0x1, 3, 0xc},
+                             {0x4, 0x1, 3, 0xC},
                              {0x4, 0x1, 4, 0x14},
                              {0x4, 0x1, 5, 0x24},
                              {0x0, 0x1, 1, 0x2},
@@ -498,16 +493,16 @@
                              // Shift overflow.
                              {0x4, INT32_MAX, 1, 0x2},
                              {0x4, INT32_MAX >> 1, 2, 0x0},
-                             {0x4, INT32_MAX >> 2, 3, 0xfffffffffffffffc},
-                             {0x4, INT32_MAX >> 3, 4, 0xfffffffffffffff4},
-                             {0x4, INT32_MAX >> 4, 5, 0xffffffffffffffe4},
+                             {0x4, INT32_MAX >> 2, 3, 0xFFFFFFFFFFFFFFFC},
+                             {0x4, INT32_MAX >> 3, 4, 0xFFFFFFFFFFFFFFF4},
+                             {0x4, INT32_MAX >> 4, 5, 0xFFFFFFFFFFFFFFE4},
 
                              // Signed addition overflow.
-                             {INT32_MAX - 1, 0x1, 1, 0xffffffff80000000},
-                             {INT32_MAX - 3, 0x1, 2, 0xffffffff80000000},
-                             {INT32_MAX - 7, 0x1, 3, 0xffffffff80000000},
-                             {INT32_MAX - 15, 0x1, 4, 0xffffffff80000000},
-                             {INT32_MAX - 31, 0x1, 5, 0xffffffff80000000},
+                             {INT32_MAX - 1, 0x1, 1, 0xFFFFFFFF80000000},
+                             {INT32_MAX - 3, 0x1, 2, 0xFFFFFFFF80000000},
+                             {INT32_MAX - 7, 0x1, 3, 0xFFFFFFFF80000000},
+                             {INT32_MAX - 15, 0x1, 4, 0xFFFFFFFF80000000},
+                             {INT32_MAX - 31, 0x1, 5, 0xFFFFFFFF80000000},
 
                              // Addition overflow.
                              {-2, 0x1, 1, 0x0},
@@ -542,10 +537,9 @@
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
 
-  FV f = FUNCTION_CAST<FV>(code->entry());
+  auto f = GeneratedCode<FV>::FromCode(*code);
 
-  uint64_t res = reinterpret_cast<uint64_t>(
-      CALL_GENERATED_CODE(isolate, f, rt, rs, 0, 0, 0));
+  uint64_t res = reinterpret_cast<uint64_t>(f.Call(rt, rs, 0, 0, 0));
 
   return res;
 }
@@ -563,7 +557,7 @@
   struct TestCaseLsa tc[] = {// rt, rs, sa, expected_res
                              {0x4, 0x1, 1, 0x6},
                              {0x4, 0x1, 2, 0x8},
-                             {0x4, 0x1, 3, 0xc},
+                             {0x4, 0x1, 3, 0xC},
                              {0x4, 0x1, 4, 0x14},
                              {0x4, 0x1, 5, 0x24},
                              {0x0, 0x1, 1, 0x2},
@@ -580,9 +574,9 @@
                              // Shift overflow.
                              {0x4, INT64_MAX, 1, 0x2},
                              {0x4, INT64_MAX >> 1, 2, 0x0},
-                             {0x4, INT64_MAX >> 2, 3, 0xfffffffffffffffc},
-                             {0x4, INT64_MAX >> 3, 4, 0xfffffffffffffff4},
-                             {0x4, INT64_MAX >> 4, 5, 0xffffffffffffffe4},
+                             {0x4, INT64_MAX >> 2, 3, 0xFFFFFFFFFFFFFFFC},
+                             {0x4, INT64_MAX >> 3, 4, 0xFFFFFFFFFFFFFFF4},
+                             {0x4, INT64_MAX >> 4, 5, 0xFFFFFFFFFFFFFFE4},
 
                              // Signed addition overflow.
                              {INT64_MAX - 1, 0x1, 1, 0x8000000000000000},
@@ -609,40 +603,40 @@
 }
 
 static const std::vector<uint32_t> cvt_trunc_uint32_test_values() {
-  static const uint32_t kValues[] = {0x00000000, 0x00000001, 0x00ffff00,
-                                     0x7fffffff, 0x80000000, 0x80000001,
-                                     0x80ffff00, 0x8fffffff, 0xffffffff};
+  static const uint32_t kValues[] = {0x00000000, 0x00000001, 0x00FFFF00,
+                                     0x7FFFFFFF, 0x80000000, 0x80000001,
+                                     0x80FFFF00, 0x8FFFFFFF, 0xFFFFFFFF};
   return std::vector<uint32_t>(&kValues[0], &kValues[arraysize(kValues)]);
 }
 
 static const std::vector<int32_t> cvt_trunc_int32_test_values() {
   static const int32_t kValues[] = {
       static_cast<int32_t>(0x00000000), static_cast<int32_t>(0x00000001),
-      static_cast<int32_t>(0x00ffff00), static_cast<int32_t>(0x7fffffff),
+      static_cast<int32_t>(0x00FFFF00), static_cast<int32_t>(0x7FFFFFFF),
       static_cast<int32_t>(0x80000000), static_cast<int32_t>(0x80000001),
-      static_cast<int32_t>(0x80ffff00), static_cast<int32_t>(0x8fffffff),
-      static_cast<int32_t>(0xffffffff)};
+      static_cast<int32_t>(0x80FFFF00), static_cast<int32_t>(0x8FFFFFFF),
+      static_cast<int32_t>(0xFFFFFFFF)};
   return std::vector<int32_t>(&kValues[0], &kValues[arraysize(kValues)]);
 }
 
 static const std::vector<uint64_t> cvt_trunc_uint64_test_values() {
   static const uint64_t kValues[] = {
-      0x0000000000000000, 0x0000000000000001, 0x0000ffffffff0000,
-      0x7fffffffffffffff, 0x8000000000000000, 0x8000000000000001,
-      0x8000ffffffff0000, 0x8fffffffffffffff, 0xffffffffffffffff};
+      0x0000000000000000, 0x0000000000000001, 0x0000FFFFFFFF0000,
+      0x7FFFFFFFFFFFFFFF, 0x8000000000000000, 0x8000000000000001,
+      0x8000FFFFFFFF0000, 0x8FFFFFFFFFFFFFFF, 0xFFFFFFFFFFFFFFFF};
   return std::vector<uint64_t>(&kValues[0], &kValues[arraysize(kValues)]);
 }
 
 static const std::vector<int64_t> cvt_trunc_int64_test_values() {
   static const int64_t kValues[] = {static_cast<int64_t>(0x0000000000000000),
                                     static_cast<int64_t>(0x0000000000000001),
-                                    static_cast<int64_t>(0x0000ffffffff0000),
-                                    static_cast<int64_t>(0x7fffffffffffffff),
+                                    static_cast<int64_t>(0x0000FFFFFFFF0000),
+                                    static_cast<int64_t>(0x7FFFFFFFFFFFFFFF),
                                     static_cast<int64_t>(0x8000000000000000),
                                     static_cast<int64_t>(0x8000000000000001),
-                                    static_cast<int64_t>(0x8000ffffffff0000),
-                                    static_cast<int64_t>(0x8fffffffffffffff),
-                                    static_cast<int64_t>(0xffffffffffffffff)};
+                                    static_cast<int64_t>(0x8000FFFFFFFF0000),
+                                    static_cast<int64_t>(0x8FFFFFFFFFFFFFFF),
+                                    static_cast<int64_t>(0xFFFFFFFFFFFFFFFF)};
   return std::vector<int64_t>(&kValues[0], &kValues[arraysize(kValues)]);
 }
 
@@ -676,7 +670,7 @@
 
 template <typename RET_TYPE, typename IN_TYPE, typename Func>
 RET_TYPE run_Cvt(IN_TYPE x, Func GenerateConvertInstructionFunc) {
-  typedef RET_TYPE (*F_CVT)(IN_TYPE x0, int x1, int x2, int x3, int x4);
+  typedef RET_TYPE(F_CVT)(IN_TYPE x0, int x1, int x2, int x3, int x4);
 
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
@@ -694,10 +688,9 @@
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
 
-  F_CVT f = FUNCTION_CAST<F_CVT>(code->entry());
+  auto f = GeneratedCode<F_CVT>::FromCode(*code);
 
-  return reinterpret_cast<RET_TYPE>(
-      CALL_GENERATED_CODE(isolate, f, x, 0, 0, 0, 0));
+  return reinterpret_cast<RET_TYPE>(f.Call(x, 0, 0, 0, 0));
 }
 
 TEST(Cvt_s_uw_Trunc_uw_s) {
@@ -780,15 +773,15 @@
 }
 
 static const std::vector<int64_t> overflow_int64_test_values() {
-  static const int64_t kValues[] = {static_cast<int64_t>(0xf000000000000000),
+  static const int64_t kValues[] = {static_cast<int64_t>(0xF000000000000000),
                                     static_cast<int64_t>(0x0000000000000001),
-                                    static_cast<int64_t>(0xff00000000000000),
-                                    static_cast<int64_t>(0x0000f00111111110),
-                                    static_cast<int64_t>(0x0f00001000000000),
-                                    static_cast<int64_t>(0x991234ab12a96731),
-                                    static_cast<int64_t>(0xb0ffff0f0f0f0f01),
-                                    static_cast<int64_t>(0x00006fffffffffff),
-                                    static_cast<int64_t>(0xffffffffffffffff)};
+                                    static_cast<int64_t>(0xFF00000000000000),
+                                    static_cast<int64_t>(0x0000F00111111110),
+                                    static_cast<int64_t>(0x0F00001000000000),
+                                    static_cast<int64_t>(0x991234AB12A96731),
+                                    static_cast<int64_t>(0xB0FFFF0F0F0F0F01),
+                                    static_cast<int64_t>(0x00006FFFFFFFFFFF),
+                                    static_cast<int64_t>(0xFFFFFFFFFFFFFFFF)};
   return std::vector<int64_t>(&kValues[0], &kValues[arraysize(kValues)]);
 }
 
@@ -840,7 +833,7 @@
 template <typename IN_TYPE, typename Func>
 static bool runOverflow(IN_TYPE valLeft, IN_TYPE valRight,
                         Func GenerateOverflowInstructions) {
-  typedef int64_t (*F_CVT)(char* x0, int x1, int x2, int x3, int x4);
+  typedef int64_t(F_CVT)(char* x0, int x1, int x2, int x3, int x4);
 
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
@@ -857,10 +850,9 @@
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
 
-  F_CVT f = FUNCTION_CAST<F_CVT>(code->entry());
+  auto f = GeneratedCode<F_CVT>::FromCode(*code);
 
-  int64_t r =
-      reinterpret_cast<int64_t>(CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0));
+  int64_t r = reinterpret_cast<int64_t>(f.Call(0, 0, 0, 0, 0));
 
   DCHECK(r == 0 || r == 1);
   return r;
@@ -981,12 +973,12 @@
                 __ li(rc.right, valRight);
                 switch (branchType) {
                   case kAddBranchOverflow:
-                    __ DaddBranchOvf(rc.dst, rc.left, rc.right, &overflow, NULL,
-                                     rc.scratch);
+                    __ DaddBranchOvf(rc.dst, rc.left, rc.right, &overflow,
+                                     nullptr, rc.scratch);
                     break;
                   case kSubBranchOverflow:
-                    __ DsubBranchOvf(rc.dst, rc.left, rc.right, &overflow, NULL,
-                                     rc.scratch);
+                    __ DsubBranchOvf(rc.dst, rc.left, rc.right, &overflow,
+                                     nullptr, rc.scratch);
                     break;
                 }
                 __ li(v0, 0);
@@ -1004,11 +996,11 @@
                 switch (branchType) {
                   case kAddBranchOverflow:
                     __ DaddBranchOvf(rc.dst, rc.left, Operand(valRight),
-                                     &overflow, NULL, rc.scratch);
+                                     &overflow, nullptr, rc.scratch);
                     break;
                   case kSubBranchOverflow:
                     __ DsubBranchOvf(rc.dst, rc.left, Operand(valRight),
-                                     &overflow, NULL, rc.scratch);
+                                     &overflow, nullptr, rc.scratch);
                     break;
                 }
                 __ li(v0, 0);
@@ -1063,11 +1055,11 @@
                 __ li(rc.right, valRight);
                 switch (branchType) {
                   case kAddBranchOverflow:
-                    __ DaddBranchOvf(rc.dst, rc.left, rc.right, NULL,
+                    __ DaddBranchOvf(rc.dst, rc.left, rc.right, nullptr,
                                      &no_overflow, rc.scratch);
                     break;
                   case kSubBranchOverflow:
-                    __ DsubBranchOvf(rc.dst, rc.left, rc.right, NULL,
+                    __ DsubBranchOvf(rc.dst, rc.left, rc.right, nullptr,
                                      &no_overflow, rc.scratch);
                     break;
                 }
@@ -1085,12 +1077,12 @@
                 __ li(rc.left, valLeft);
                 switch (branchType) {
                   case kAddBranchOverflow:
-                    __ DaddBranchOvf(rc.dst, rc.left, Operand(valRight), NULL,
-                                     &no_overflow, rc.scratch);
+                    __ DaddBranchOvf(rc.dst, rc.left, Operand(valRight),
+                                     nullptr, &no_overflow, rc.scratch);
                     break;
                   case kSubBranchOverflow:
-                    __ DsubBranchOvf(rc.dst, rc.left, Operand(valRight), NULL,
-                                     &no_overflow, rc.scratch);
+                    __ DsubBranchOvf(rc.dst, rc.left, Operand(valRight),
+                                     nullptr, &no_overflow, rc.scratch);
                     break;
                 }
                 __ li(v0, 1);
@@ -1212,14 +1204,14 @@
   masm->GetCode(isolate, &desc);
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
-  F3 f = FUNCTION_CAST<F3>(code->entry());
+  auto f = GeneratedCode<F3>::FromCode(*code);
   for (int i = 0; i < kTableLength; i++) {
     test.a = inputsa[i];
     test.b = inputsb[i];
     test.e = inputse[i];
     test.f = inputsf[i];
 
-    CALL_GENERATED_CODE(isolate, f, &test, 0, 0, 0, 0);
+    f.Call(&test, 0, 0, 0, 0);
 
     CHECK_EQ(0, memcmp(&test.c, &outputsdmin[i], sizeof(test.c)));
     CHECK_EQ(0, memcmp(&test.d, &outputsdmax[i], sizeof(test.d)));
@@ -1231,7 +1223,7 @@
 template <typename IN_TYPE, typename Func>
 bool run_Unaligned(char* memory_buffer, int32_t in_offset, int32_t out_offset,
                    IN_TYPE value, Func GenerateUnalignedInstructionFunc) {
-  typedef int32_t (*F_CVT)(char* x0, int x1, int x2, int x3, int x4);
+  typedef int32_t(F_CVT)(char* x0, int x1, int x2, int x3, int x4);
 
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
@@ -1249,10 +1241,10 @@
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
 
-  F_CVT f = FUNCTION_CAST<F_CVT>(code->entry());
+  auto f = GeneratedCode<F_CVT>::FromCode(*code);
 
   MemCopy(memory_buffer + in_offset, &value, sizeof(IN_TYPE));
-  CALL_GENERATED_CODE(isolate, f, memory_buffer, 0, 0, 0, 0);
+  f.Call(memory_buffer, 0, 0, 0, 0);
   MemCopy(&res, memory_buffer + out_offset, sizeof(IN_TYPE));
 
   return res == value;
@@ -1260,8 +1252,8 @@
 
 static const std::vector<uint64_t> unsigned_test_values() {
   static const uint64_t kValues[] = {
-      0x2180f18a06384414, 0x000a714532102277, 0xbc1acccf180649f0,
-      0x8000000080008000, 0x0000000000000001, 0xffffffffffffffff,
+      0x2180F18A06384414, 0x000A714532102277, 0xBC1ACCCF180649F0,
+      0x8000000080008000, 0x0000000000000001, 0xFFFFFFFFFFFFFFFF,
   };
   return std::vector<uint64_t>(&kValues[0], &kValues[arraysize(kValues)]);
 }
@@ -1579,25 +1571,25 @@
   static const uint64_t kValues[] = {
       0,
       1,
-      0x7ffe,
-      0x7fff,
+      0x7FFE,
+      0x7FFF,
       0x8000,
       0x8001,
-      0xfffe,
-      0xffff,
-      0xffffffffffff7ffe,
-      0xffffffffffff7fff,
-      0xffffffffffff8000,
-      0xffffffffffff8001,
-      0xfffffffffffffffe,
-      0xffffffffffffffff,
+      0xFFFE,
+      0xFFFF,
+      0xFFFFFFFFFFFF7FFE,
+      0xFFFFFFFFFFFF7FFF,
+      0xFFFFFFFFFFFF8000,
+      0xFFFFFFFFFFFF8001,
+      0xFFFFFFFFFFFFFFFE,
+      0xFFFFFFFFFFFFFFFF,
   };
   return std::vector<uint64_t>(&kValues[0], &kValues[arraysize(kValues)]);
 }
 
 template <typename Func>
 bool run_Sltu(uint64_t rs, uint64_t rd, Func GenerateSltuInstructionFunc) {
-  typedef int64_t (*F_CVT)(uint64_t x0, uint64_t x1, int x2, int x3, int x4);
+  typedef int64_t(F_CVT)(uint64_t x0, uint64_t x1, int x2, int x3, int x4);
 
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
@@ -1614,9 +1606,8 @@
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
 
-  F_CVT f = FUNCTION_CAST<F_CVT>(code->entry());
-  int64_t res = reinterpret_cast<int64_t>(
-      CALL_GENERATED_CODE(isolate, f, rs, rd, 0, 0, 0));
+  auto f = GeneratedCode<F_CVT>::FromCode(*code);
+  int64_t res = reinterpret_cast<int64_t>(f.Call(rs, rd, 0, 0, 0));
   return res == 1;
 }
 
@@ -1642,7 +1633,7 @@
 }
 
 template <typename T, typename Inputs, typename Results>
-static F4 GenerateMacroFloat32MinMax(MacroAssembler* masm) {
+static GeneratedCode<F4> GenerateMacroFloat32MinMax(MacroAssembler* masm) {
   T a = T::from_code(4);  // f4
   T b = T::from_code(6);  // f6
   T c = T::from_code(8);  // f8
@@ -1712,7 +1703,7 @@
   OFStream os(stdout);
   code->Print(os);
 #endif
-  return FUNCTION_CAST<F4>(code->entry());
+  return GeneratedCode<F4>::FromCode(*code);
 }
 
 TEST(macro_float_minmax_f32) {
@@ -1721,7 +1712,7 @@
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
 
-  MacroAssembler assembler(isolate, NULL, 0,
+  MacroAssembler assembler(isolate, nullptr, 0,
                            v8::internal::CodeObjectRequired::kYes);
   MacroAssembler* masm = &assembler;
 
@@ -1741,15 +1732,14 @@
     float max_aba_;
   };
 
-  F4 f = GenerateMacroFloat32MinMax<FPURegister, Inputs, Results>(masm);
-  Object* dummy = nullptr;
-  USE(dummy);
+  GeneratedCode<F4> f =
+      GenerateMacroFloat32MinMax<FPURegister, Inputs, Results>(masm);
 
 #define CHECK_MINMAX(src1, src2, min, max)                                   \
   do {                                                                       \
     Inputs inputs = {src1, src2};                                            \
     Results results;                                                         \
-    dummy = CALL_GENERATED_CODE(isolate, f, &inputs, &results, 0, 0, 0);     \
+    f.Call(&inputs, &results, 0, 0, 0);                                      \
     CHECK_EQ(bit_cast<uint32_t>(min), bit_cast<uint32_t>(results.min_abc_)); \
     CHECK_EQ(bit_cast<uint32_t>(min), bit_cast<uint32_t>(results.min_aab_)); \
     CHECK_EQ(bit_cast<uint32_t>(min), bit_cast<uint32_t>(results.min_aba_)); \
@@ -1785,7 +1775,7 @@
 }
 
 template <typename T, typename Inputs, typename Results>
-static F4 GenerateMacroFloat64MinMax(MacroAssembler* masm) {
+static GeneratedCode<F4> GenerateMacroFloat64MinMax(MacroAssembler* masm) {
   T a = T::from_code(4);  // f4
   T b = T::from_code(6);  // f6
   T c = T::from_code(8);  // f8
@@ -1855,7 +1845,7 @@
   OFStream os(stdout);
   code->Print(os);
 #endif
-  return FUNCTION_CAST<F4>(code->entry());
+  return GeneratedCode<F4>::FromCode(*code);
 }
 
 TEST(macro_float_minmax_f64) {
@@ -1864,7 +1854,7 @@
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
 
-  MacroAssembler assembler(isolate, NULL, 0,
+  MacroAssembler assembler(isolate, nullptr, 0,
                            v8::internal::CodeObjectRequired::kYes);
   MacroAssembler* masm = &assembler;
 
@@ -1884,15 +1874,14 @@
     double max_aba_;
   };
 
-  F4 f = GenerateMacroFloat64MinMax<DoubleRegister, Inputs, Results>(masm);
-  Object* dummy = nullptr;
-  USE(dummy);
+  GeneratedCode<F4> f =
+      GenerateMacroFloat64MinMax<DoubleRegister, Inputs, Results>(masm);
 
 #define CHECK_MINMAX(src1, src2, min, max)                                   \
   do {                                                                       \
     Inputs inputs = {src1, src2};                                            \
     Results results;                                                         \
-    dummy = CALL_GENERATED_CODE(isolate, f, &inputs, &results, 0, 0, 0);     \
+    f.Call(&inputs, &results, 0, 0, 0);                                      \
     CHECK_EQ(bit_cast<uint64_t>(min), bit_cast<uint64_t>(results.min_abc_)); \
     CHECK_EQ(bit_cast<uint64_t>(min), bit_cast<uint64_t>(results.min_aab_)); \
     CHECK_EQ(bit_cast<uint64_t>(min), bit_cast<uint64_t>(results.min_aba_)); \
diff --git a/src/v8/test/cctest/test-macro-assembler-x64.cc b/src/v8/test/cctest/test-macro-assembler-x64.cc
index d52419d..6ace37c 100644
--- a/src/v8/test/cctest/test-macro-assembler-x64.cc
+++ b/src/v8/test/cctest/test-macro-assembler-x64.cc
@@ -52,7 +52,6 @@
 
 #define __ masm->
 
-
 static void EntryCode(MacroAssembler* masm) {
   // Smi constant register is callee save.
   __ pushq(kRootRegister);
@@ -98,14 +97,11 @@
 
 // Test that we can move a Smi value literally into a register.
 TEST(SmiMove) {
-  // Allocate an executable page of memory.
-  size_t actual_size;
-  byte* buffer = static_cast<byte*>(v8::base::OS::Allocate(
-      Assembler::kMinimalBufferSize, &actual_size, true));
-  CHECK(buffer);
   Isolate* isolate = CcTest::i_isolate();
   HandleScope handles(isolate);
-  MacroAssembler assembler(isolate, buffer, static_cast<int>(actual_size),
+  size_t allocated;
+  byte* buffer = AllocateAssemblerBuffer(&allocated);
+  MacroAssembler assembler(isolate, buffer, static_cast<int>(allocated),
                            v8::internal::CodeObjectRequired::kYes);
   MacroAssembler* masm = &assembler;  // Create a pointer for the __ macro.
   EntryCode(masm);
@@ -131,6 +127,7 @@
 
   CodeDesc desc;
   masm->GetCode(isolate, &desc);
+  MakeAssemblerBufferExecutable(buffer, allocated);
   // Call the function from C++.
   int result = FUNCTION_CAST<F0>(buffer)();
   CHECK_EQ(0, result);
@@ -184,14 +181,11 @@
 
 // Test that we can compare smis for equality (and more).
 TEST(SmiCompare) {
-  // Allocate an executable page of memory.
-  size_t actual_size;
-  byte* buffer = static_cast<byte*>(v8::base::OS::Allocate(
-      Assembler::kMinimalBufferSize * 2, &actual_size, true));
-  CHECK(buffer);
   Isolate* isolate = CcTest::i_isolate();
   HandleScope handles(isolate);
-  MacroAssembler assembler(isolate, buffer, static_cast<int>(actual_size),
+  size_t allocated;
+  byte* buffer = AllocateAssemblerBuffer(&allocated);
+  MacroAssembler assembler(isolate, buffer, static_cast<int>(allocated),
                            v8::internal::CodeObjectRequired::kYes);
 
   MacroAssembler* masm = &assembler;
@@ -225,6 +219,7 @@
 
   CodeDesc desc;
   masm->GetCode(isolate, &desc);
+  MakeAssemblerBufferExecutable(buffer, allocated);
   // Call the function from C++.
   int result = FUNCTION_CAST<F0>(buffer)();
   CHECK_EQ(0, result);
@@ -233,14 +228,11 @@
 
 
 TEST(Integer32ToSmi) {
-  // Allocate an executable page of memory.
-  size_t actual_size;
-  byte* buffer = static_cast<byte*>(v8::base::OS::Allocate(
-      Assembler::kMinimalBufferSize, &actual_size, true));
-  CHECK(buffer);
   Isolate* isolate = CcTest::i_isolate();
   HandleScope handles(isolate);
-  MacroAssembler assembler(isolate, buffer, static_cast<int>(actual_size),
+  size_t allocated;
+  byte* buffer = AllocateAssemblerBuffer(&allocated);
+  MacroAssembler assembler(isolate, buffer, static_cast<int>(allocated),
                            v8::internal::CodeObjectRequired::kYes);
 
   MacroAssembler* masm = &assembler;
@@ -327,20 +319,18 @@
 
   CodeDesc desc;
   masm->GetCode(isolate, &desc);
+  MakeAssemblerBufferExecutable(buffer, allocated);
   // Call the function from C++.
   int result = FUNCTION_CAST<F0>(buffer)();
   CHECK_EQ(0, result);
 }
 
 TEST(SmiCheck) {
-  // Allocate an executable page of memory.
-  size_t actual_size;
-  byte* buffer = static_cast<byte*>(v8::base::OS::Allocate(
-      Assembler::kMinimalBufferSize, &actual_size, true));
-  CHECK(buffer);
   Isolate* isolate = CcTest::i_isolate();
   HandleScope handles(isolate);
-  MacroAssembler assembler(isolate, buffer, static_cast<int>(actual_size),
+  size_t allocated;
+  byte* buffer = AllocateAssemblerBuffer(&allocated);
+  MacroAssembler assembler(isolate, buffer, static_cast<int>(allocated),
                            v8::internal::CodeObjectRequired::kYes);
 
   MacroAssembler* masm = &assembler;
@@ -395,39 +385,6 @@
   cond = masm->CheckSmi(rcx);
   __ j(cond, &exit);
 
-  // CheckBothSmi
-
-  __ incq(rax);
-  __ movq(rcx, Immediate(Smi::kMaxValue));
-  __ Integer32ToSmi(rcx, rcx);
-  __ movq(rdx, Immediate(Smi::kMinValue));
-  __ Integer32ToSmi(rdx, rdx);
-  cond = masm->CheckBothSmi(rcx, rdx);
-  __ j(NegateCondition(cond), &exit);
-
-  __ incq(rax);
-  __ xorq(rcx, Immediate(kSmiTagMask));
-  cond = masm->CheckBothSmi(rcx, rdx);
-  __ j(cond, &exit);
-
-  __ incq(rax);
-  __ xorq(rdx, Immediate(kSmiTagMask));
-  cond = masm->CheckBothSmi(rcx, rdx);
-  __ j(cond, &exit);
-
-  __ incq(rax);
-  __ xorq(rcx, Immediate(kSmiTagMask));
-  cond = masm->CheckBothSmi(rcx, rdx);
-  __ j(cond, &exit);
-
-  __ incq(rax);
-  cond = masm->CheckBothSmi(rcx, rcx);
-  __ j(NegateCondition(cond), &exit);
-
-  __ incq(rax);
-  cond = masm->CheckBothSmi(rdx, rdx);
-  __ j(cond, &exit);
-
   // Success
   __ xorq(rax, rax);
 
@@ -437,443 +394,7 @@
 
   CodeDesc desc;
   masm->GetCode(isolate, &desc);
-  // Call the function from C++.
-  int result = FUNCTION_CAST<F0>(buffer)();
-  CHECK_EQ(0, result);
-}
-
-static void SmiAddTest(MacroAssembler* masm,
-                       Label* exit,
-                       int id,
-                       int first,
-                       int second) {
-  __ movl(rcx, Immediate(first));
-  __ Integer32ToSmi(rcx, rcx);
-  __ movl(rdx, Immediate(second));
-  __ Integer32ToSmi(rdx, rdx);
-  __ movl(r8, Immediate(first + second));
-  __ Integer32ToSmi(r8, r8);
-
-  __ movl(rax, Immediate(id));  // Test number.
-  __ SmiAdd(r9, rcx, rdx, exit);
-  __ cmpq(r9, r8);
-  __ j(not_equal, exit);
-
-  __ incq(rax);
-  __ SmiAdd(rcx, rcx, rdx, exit);
-  __ cmpq(rcx, r8);
-  __ j(not_equal, exit);
-
-  __ movl(rcx, Immediate(first));
-  __ Integer32ToSmi(rcx, rcx);
-
-  __ incq(rax);
-  __ SmiAddConstant(r9, rcx, Smi::FromInt(second));
-  __ cmpq(r9, r8);
-  __ j(not_equal, exit);
-
-  __ SmiAddConstant(rcx, rcx, Smi::FromInt(second));
-  __ cmpq(rcx, r8);
-  __ j(not_equal, exit);
-
-  __ movl(rcx, Immediate(first));
-  __ Integer32ToSmi(rcx, rcx);
-
-  SmiOperationConstraints constraints =
-      SmiOperationConstraint::kPreserveSourceRegister |
-      SmiOperationConstraint::kBailoutOnOverflow;
-  __ incq(rax);
-  __ SmiAddConstant(r9, rcx, Smi::FromInt(second), constraints, exit);
-  __ cmpq(r9, r8);
-  __ j(not_equal, exit);
-
-  __ incq(rax);
-  __ SmiAddConstant(rcx, rcx, Smi::FromInt(second), constraints, exit);
-  __ cmpq(rcx, r8);
-  __ j(not_equal, exit);
-
-  __ movl(rcx, Immediate(first));
-  __ Integer32ToSmi(rcx, rcx);
-
-  constraints = SmiOperationConstraint::kPreserveSourceRegister |
-                SmiOperationConstraint::kBailoutOnNoOverflow;
-  Label done;
-  __ incq(rax);
-  __ SmiAddConstant(rcx, rcx, Smi::FromInt(second), constraints, &done);
-  __ jmp(exit);
-  __ bind(&done);
-  __ cmpq(rcx, r8);
-  __ j(not_equal, exit);
-}
-
-
-static void SmiAddOverflowTest(MacroAssembler* masm,
-                               Label* exit,
-                               int id,
-                               int x) {
-  // Adds a Smi to x so that the addition overflows.
-  CHECK(x != 0);  // Can't overflow by adding a Smi.
-  int y_max = (x > 0) ? (Smi::kMaxValue + 0) : (Smi::kMinValue - x - 1);
-  int y_min = (x > 0) ? (Smi::kMaxValue - x + 1) : (Smi::kMinValue + 0);
-
-  __ movl(rax, Immediate(id));
-  __ Move(rcx, Smi::FromInt(x));
-  __ movq(r11, rcx);  // Store original Smi value of x in r11.
-  __ Move(rdx, Smi::FromInt(y_min));
-  {
-    Label overflow_ok;
-    __ SmiAdd(r9, rcx, rdx, &overflow_ok);
-    __ jmp(exit);
-    __ bind(&overflow_ok);
-    __ incq(rax);
-    __ cmpq(rcx, r11);
-    __ j(not_equal, exit);
-  }
-
-  {
-    Label overflow_ok;
-    __ incq(rax);
-    __ SmiAdd(rcx, rcx, rdx, &overflow_ok);
-    __ jmp(exit);
-    __ bind(&overflow_ok);
-    __ incq(rax);
-    __ cmpq(rcx, r11);
-    __ j(not_equal, exit);
-  }
-
-  SmiOperationConstraints constraints =
-      SmiOperationConstraint::kPreserveSourceRegister |
-      SmiOperationConstraint::kBailoutOnOverflow;
-  __ movq(rcx, r11);
-  {
-    Label overflow_ok;
-    __ incq(rax);
-    __ SmiAddConstant(r9, rcx, Smi::FromInt(y_min), constraints, &overflow_ok);
-    __ jmp(exit);
-    __ bind(&overflow_ok);
-    __ incq(rax);
-    __ cmpq(rcx, r11);
-    __ j(not_equal, exit);
-  }
-
-  {
-    Label overflow_ok;
-    __ incq(rax);
-    __ SmiAddConstant(rcx, rcx, Smi::FromInt(y_min), constraints, &overflow_ok);
-    __ jmp(exit);
-    __ bind(&overflow_ok);
-    __ incq(rax);
-    __ cmpq(rcx, r11);
-    __ j(not_equal, exit);
-  }
-
-  __ Move(rdx, Smi::FromInt(y_max));
-
-  {
-    Label overflow_ok;
-    __ incq(rax);
-    __ SmiAdd(r9, rcx, rdx, &overflow_ok);
-    __ jmp(exit);
-    __ bind(&overflow_ok);
-    __ incq(rax);
-    __ cmpq(rcx, r11);
-    __ j(not_equal, exit);
-  }
-
-  {
-    Label overflow_ok;
-    __ incq(rax);
-    __ SmiAdd(rcx, rcx, rdx, &overflow_ok);
-    __ jmp(exit);
-    __ bind(&overflow_ok);
-    __ incq(rax);
-    __ cmpq(rcx, r11);
-    __ j(not_equal, exit);
-  }
-
-  __ movq(rcx, r11);
-  {
-    Label overflow_ok;
-    __ incq(rax);
-    __ SmiAddConstant(r9, rcx, Smi::FromInt(y_max), constraints, &overflow_ok);
-    __ jmp(exit);
-    __ bind(&overflow_ok);
-    __ incq(rax);
-    __ cmpq(rcx, r11);
-    __ j(not_equal, exit);
-  }
-
-  constraints = SmiOperationConstraint::kBailoutOnOverflow;
-  {
-    Label overflow_ok;
-    __ incq(rax);
-    __ SmiAddConstant(rcx, rcx, Smi::FromInt(y_max), constraints, &overflow_ok);
-    __ jmp(exit);
-    __ bind(&overflow_ok);
-    __ incq(rax);
-    __ cmpq(rcx, r11);
-    __ j(equal, exit);
-  }
-}
-
-
-TEST(SmiAdd) {
-  // Allocate an executable page of memory.
-  size_t actual_size;
-  byte* buffer = static_cast<byte*>(v8::base::OS::Allocate(
-      Assembler::kMinimalBufferSize * 3, &actual_size, true));
-  CHECK(buffer);
-  Isolate* isolate = CcTest::i_isolate();
-  HandleScope handles(isolate);
-  MacroAssembler assembler(isolate, buffer, static_cast<int>(actual_size),
-                           v8::internal::CodeObjectRequired::kYes);
-
-  MacroAssembler* masm = &assembler;
-  EntryCode(masm);
-  Label exit;
-
-  // No-overflow tests.
-  SmiAddTest(masm, &exit, 0x10, 1, 2);
-  SmiAddTest(masm, &exit, 0x20, 1, -2);
-  SmiAddTest(masm, &exit, 0x30, -1, 2);
-  SmiAddTest(masm, &exit, 0x40, -1, -2);
-  SmiAddTest(masm, &exit, 0x50, 0x1000, 0x2000);
-  SmiAddTest(masm, &exit, 0x60, Smi::kMinValue, 5);
-  SmiAddTest(masm, &exit, 0x70, Smi::kMaxValue, -5);
-  SmiAddTest(masm, &exit, 0x80, Smi::kMaxValue, Smi::kMinValue);
-
-  SmiAddOverflowTest(masm, &exit, 0x90, -1);
-  SmiAddOverflowTest(masm, &exit, 0xA0, 1);
-  SmiAddOverflowTest(masm, &exit, 0xB0, 1024);
-  SmiAddOverflowTest(masm, &exit, 0xC0, Smi::kMaxValue);
-  SmiAddOverflowTest(masm, &exit, 0xD0, -2);
-  SmiAddOverflowTest(masm, &exit, 0xE0, -42000);
-  SmiAddOverflowTest(masm, &exit, 0xF0, Smi::kMinValue);
-
-  __ xorq(rax, rax);  // Success.
-  __ bind(&exit);
-  ExitCode(masm);
-  __ ret(0);
-
-  CodeDesc desc;
-  masm->GetCode(isolate, &desc);
-  // Call the function from C++.
-  int result = FUNCTION_CAST<F0>(buffer)();
-  CHECK_EQ(0, result);
-}
-
-
-static void SmiSubTest(MacroAssembler* masm,
-                      Label* exit,
-                      int id,
-                      int first,
-                      int second) {
-  __ Move(rcx, Smi::FromInt(first));
-  __ Move(rdx, Smi::FromInt(second));
-  __ Move(r8, Smi::FromInt(first - second));
-
-  __ movl(rax, Immediate(id));  // Test 0.
-  __ SmiSub(r9, rcx, rdx, exit);
-  __ cmpq(r9, r8);
-  __ j(not_equal, exit);
-
-  __ incq(rax);  // Test 1.
-  __ SmiSub(rcx, rcx, rdx, exit);
-  __ cmpq(rcx, r8);
-  __ j(not_equal, exit);
-
-  __ Move(rcx, Smi::FromInt(first));
-
-  __ incq(rax);  // Test 2.
-  __ SmiSubConstant(r9, rcx, Smi::FromInt(second));
-  __ cmpq(r9, r8);
-  __ j(not_equal, exit);
-
-  __ incq(rax);  // Test 3.
-  __ SmiSubConstant(rcx, rcx, Smi::FromInt(second));
-  __ cmpq(rcx, r8);
-  __ j(not_equal, exit);
-
-  SmiOperationConstraints constraints =
-      SmiOperationConstraint::kPreserveSourceRegister |
-      SmiOperationConstraint::kBailoutOnOverflow;
-  __ Move(rcx, Smi::FromInt(first));
-  __ incq(rax);  // Test 4.
-  __ SmiSubConstant(rcx, rcx, Smi::FromInt(second), constraints, exit);
-  __ cmpq(rcx, r8);
-  __ j(not_equal, exit);
-
-  __ Move(rcx, Smi::FromInt(first));
-  __ incq(rax);  // Test 5.
-  __ SmiSubConstant(r9, rcx, Smi::FromInt(second), constraints, exit);
-  __ cmpq(r9, r8);
-  __ j(not_equal, exit);
-
-  constraints = SmiOperationConstraint::kPreserveSourceRegister |
-                SmiOperationConstraint::kBailoutOnNoOverflow;
-  __ Move(rcx, Smi::FromInt(first));
-  Label done;
-  __ incq(rax);  // Test 6.
-  __ SmiSubConstant(rcx, rcx, Smi::FromInt(second), constraints, &done);
-  __ jmp(exit);
-  __ bind(&done);
-  __ cmpq(rcx, r8);
-  __ j(not_equal, exit);
-}
-
-
-static void SmiSubOverflowTest(MacroAssembler* masm,
-                               Label* exit,
-                               int id,
-                               int x) {
-  // Subtracts a Smi from x so that the subtraction overflows.
-  CHECK(x != -1);  // Can't overflow by subtracting a Smi.
-  int y_max = (x < 0) ? (Smi::kMaxValue + 0) : (Smi::kMinValue + 0);
-  int y_min = (x < 0) ? (Smi::kMaxValue + x + 2) : (Smi::kMinValue + x);
-
-  __ movl(rax, Immediate(id));
-  __ Move(rcx, Smi::FromInt(x));
-  __ movq(r11, rcx);  // Store original Smi value of x in r11.
-  __ Move(rdx, Smi::FromInt(y_min));
-  {
-    Label overflow_ok;
-    __ SmiSub(r9, rcx, rdx, &overflow_ok);
-    __ jmp(exit);
-    __ bind(&overflow_ok);
-    __ incq(rax);
-    __ cmpq(rcx, r11);
-    __ j(not_equal, exit);
-  }
-
-  {
-    Label overflow_ok;
-    __ incq(rax);
-    __ SmiSub(rcx, rcx, rdx, &overflow_ok);
-    __ jmp(exit);
-    __ bind(&overflow_ok);
-    __ incq(rax);
-    __ cmpq(rcx, r11);
-    __ j(not_equal, exit);
-  }
-
-  SmiOperationConstraints constraints =
-      SmiOperationConstraint::kPreserveSourceRegister |
-      SmiOperationConstraint::kBailoutOnOverflow;
-
-  __ movq(rcx, r11);
-  {
-    Label overflow_ok;
-    __ incq(rax);
-    __ SmiSubConstant(r9, rcx, Smi::FromInt(y_min), constraints, &overflow_ok);
-    __ jmp(exit);
-    __ bind(&overflow_ok);
-    __ incq(rax);
-    __ cmpq(rcx, r11);
-    __ j(not_equal, exit);
-  }
-
-  {
-    Label overflow_ok;
-    __ incq(rax);
-    __ SmiSubConstant(rcx, rcx, Smi::FromInt(y_min), constraints, &overflow_ok);
-    __ jmp(exit);
-    __ bind(&overflow_ok);
-    __ incq(rax);
-    __ cmpq(rcx, r11);
-    __ j(not_equal, exit);
-  }
-
-  __ Move(rdx, Smi::FromInt(y_max));
-
-  {
-    Label overflow_ok;
-    __ incq(rax);
-    __ SmiSub(r9, rcx, rdx, &overflow_ok);
-    __ jmp(exit);
-    __ bind(&overflow_ok);
-    __ incq(rax);
-    __ cmpq(rcx, r11);
-    __ j(not_equal, exit);
-  }
-
-  {
-    Label overflow_ok;
-    __ incq(rax);
-    __ SmiSub(rcx, rcx, rdx, &overflow_ok);
-    __ jmp(exit);
-    __ bind(&overflow_ok);
-    __ incq(rax);
-    __ cmpq(rcx, r11);
-    __ j(not_equal, exit);
-  }
-
-  __ movq(rcx, r11);
-  {
-    Label overflow_ok;
-    __ incq(rax);
-    __ SmiSubConstant(rcx, rcx, Smi::FromInt(y_max), constraints, &overflow_ok);
-    __ jmp(exit);
-    __ bind(&overflow_ok);
-    __ incq(rax);
-    __ cmpq(rcx, r11);
-    __ j(not_equal, exit);
-  }
-
-  constraints = SmiOperationConstraint::kBailoutOnOverflow;
-  __ movq(rcx, r11);
-  {
-    Label overflow_ok;
-    __ incq(rax);
-    __ SmiSubConstant(rcx, rcx, Smi::FromInt(y_max), constraints, &overflow_ok);
-    __ jmp(exit);
-    __ bind(&overflow_ok);
-    __ incq(rax);
-    __ cmpq(rcx, r11);
-    __ j(equal, exit);
-  }
-}
-
-
-TEST(SmiSub) {
-  // Allocate an executable page of memory.
-  size_t actual_size;
-  byte* buffer = static_cast<byte*>(v8::base::OS::Allocate(
-      Assembler::kMinimalBufferSize * 4, &actual_size, true));
-  CHECK(buffer);
-  Isolate* isolate = CcTest::i_isolate();
-  HandleScope handles(isolate);
-  MacroAssembler assembler(isolate, buffer, static_cast<int>(actual_size),
-                           v8::internal::CodeObjectRequired::kYes);
-
-  MacroAssembler* masm = &assembler;
-  EntryCode(masm);
-  Label exit;
-
-  SmiSubTest(masm, &exit, 0x10, 1, 2);
-  SmiSubTest(masm, &exit, 0x20, 1, -2);
-  SmiSubTest(masm, &exit, 0x30, -1, 2);
-  SmiSubTest(masm, &exit, 0x40, -1, -2);
-  SmiSubTest(masm, &exit, 0x50, 0x1000, 0x2000);
-  SmiSubTest(masm, &exit, 0x60, Smi::kMinValue, -5);
-  SmiSubTest(masm, &exit, 0x70, Smi::kMaxValue, 5);
-  SmiSubTest(masm, &exit, 0x80, -Smi::kMaxValue, Smi::kMinValue);
-  SmiSubTest(masm, &exit, 0x90, 0, Smi::kMaxValue);
-
-  SmiSubOverflowTest(masm, &exit, 0xA0, 1);
-  SmiSubOverflowTest(masm, &exit, 0xB0, 1024);
-  SmiSubOverflowTest(masm, &exit, 0xC0, Smi::kMaxValue);
-  SmiSubOverflowTest(masm, &exit, 0xD0, -2);
-  SmiSubOverflowTest(masm, &exit, 0xE0, -42000);
-  SmiSubOverflowTest(masm, &exit, 0xF0, Smi::kMinValue);
-  SmiSubOverflowTest(masm, &exit, 0x100, 0);
-
-  __ xorq(rax, rax);  // Success.
-  __ bind(&exit);
-  ExitCode(masm);
-  __ ret(0);
-
-  CodeDesc desc;
-  masm->GetCode(isolate, &desc);
+  MakeAssemblerBufferExecutable(buffer, allocated);
   // Call the function from C++.
   int result = FUNCTION_CAST<F0>(buffer)();
   CHECK_EQ(0, result);
@@ -903,14 +424,11 @@
 }
 
 TEST(SmiIndex) {
-  // Allocate an executable page of memory.
-  size_t actual_size;
-  byte* buffer = static_cast<byte*>(v8::base::OS::Allocate(
-      Assembler::kMinimalBufferSize * 5, &actual_size, true));
-  CHECK(buffer);
   Isolate* isolate = CcTest::i_isolate();
   HandleScope handles(isolate);
-  MacroAssembler assembler(isolate, buffer, static_cast<int>(actual_size),
+  size_t allocated;
+  byte* buffer = AllocateAssemblerBuffer(&allocated);
+  MacroAssembler assembler(isolate, buffer, static_cast<int>(allocated),
                            v8::internal::CodeObjectRequired::kYes);
 
   MacroAssembler* masm = &assembler;
@@ -930,156 +448,21 @@
 
   CodeDesc desc;
   masm->GetCode(isolate, &desc);
+  MakeAssemblerBufferExecutable(buffer, allocated);
   // Call the function from C++.
   int result = FUNCTION_CAST<F0>(buffer)();
   CHECK_EQ(0, result);
 }
 
-void TestSelectNonSmi(MacroAssembler* masm, Label* exit, int id, int x, int y) {
-  __ movl(rax, Immediate(id));
-  __ Move(rcx, Smi::FromInt(x));
-  __ Move(rdx, Smi::FromInt(y));
-  __ xorq(rdx, Immediate(kSmiTagMask));
-  __ SelectNonSmi(r9, rcx, rdx, exit);
-
-  __ incq(rax);
-  __ cmpq(r9, rdx);
-  __ j(not_equal, exit);
-
-  __ incq(rax);
-  __ Move(rcx, Smi::FromInt(x));
-  __ Move(rdx, Smi::FromInt(y));
-  __ xorq(rcx, Immediate(kSmiTagMask));
-  __ SelectNonSmi(r9, rcx, rdx, exit);
-
-  __ incq(rax);
-  __ cmpq(r9, rcx);
-  __ j(not_equal, exit);
-
-  __ incq(rax);
-  Label fail_ok;
-  __ Move(rcx, Smi::FromInt(x));
-  __ Move(rdx, Smi::FromInt(y));
-  __ xorq(rcx, Immediate(kSmiTagMask));
-  __ xorq(rdx, Immediate(kSmiTagMask));
-  __ SelectNonSmi(r9, rcx, rdx, &fail_ok);
-  __ jmp(exit);
-  __ bind(&fail_ok);
-}
-
-TEST(SmiSelectNonSmi) {
-  // Allocate an executable page of memory.
-  size_t actual_size;
-  byte* buffer = static_cast<byte*>(v8::base::OS::Allocate(
-      Assembler::kMinimalBufferSize * 2, &actual_size, true));
-  CHECK(buffer);
-  Isolate* isolate = CcTest::i_isolate();
-  HandleScope handles(isolate);
-  MacroAssembler assembler(isolate, buffer, static_cast<int>(actual_size),
-                           v8::internal::CodeObjectRequired::kYes);
-
-  MacroAssembler* masm = &assembler;
-  EntryCode(masm);
-  Label exit;
-
-  TestSelectNonSmi(masm, &exit, 0x10, 0, 0);
-  TestSelectNonSmi(masm, &exit, 0x20, 0, 1);
-  TestSelectNonSmi(masm, &exit, 0x30, 1, 0);
-  TestSelectNonSmi(masm, &exit, 0x40, 0, -1);
-  TestSelectNonSmi(masm, &exit, 0x50, -1, 0);
-  TestSelectNonSmi(masm, &exit, 0x60, -1, -1);
-  TestSelectNonSmi(masm, &exit, 0x70, 1, 1);
-  TestSelectNonSmi(masm, &exit, 0x80, Smi::kMinValue, Smi::kMaxValue);
-  TestSelectNonSmi(masm, &exit, 0x90, Smi::kMinValue, Smi::kMinValue);
-
-  __ xorq(rax, rax);  // Success.
-  __ bind(&exit);
-  ExitCode(masm);
-  __ ret(0);
-
-  CodeDesc desc;
-  masm->GetCode(isolate, &desc);
-  // Call the function from C++.
-  int result = FUNCTION_CAST<F0>(buffer)();
-  CHECK_EQ(0, result);
-}
-
-void TestPositiveSmiPowerUp(MacroAssembler* masm, Label* exit, int id, int x) {
-  CHECK(x >= 0);
-  int powers[] = { 0, 1, 2, 3, 8, 16, 24, 31 };
-  int power_count = 8;
-  __ movl(rax, Immediate(id));
-  for (int i = 0; i  < power_count; i++) {
-    int power = powers[i];
-    intptr_t result = static_cast<intptr_t>(x) << power;
-    __ Set(r8, result);
-    __ Move(rcx, Smi::FromInt(x));
-    __ movq(r11, rcx);
-    __ PositiveSmiTimesPowerOfTwoToInteger64(rdx, rcx, power);
-    __ cmpq(rdx, r8);
-    __ j(not_equal, exit);
-    __ incq(rax);
-    __ cmpq(r11, rcx);  // rcx unchanged.
-    __ j(not_equal, exit);
-    __ incq(rax);
-    __ PositiveSmiTimesPowerOfTwoToInteger64(rcx, rcx, power);
-    __ cmpq(rdx, r8);
-    __ j(not_equal, exit);
-    __ incq(rax);
-  }
-}
-
-
-TEST(PositiveSmiTimesPowerOfTwoToInteger64) {
-  // Allocate an executable page of memory.
-  size_t actual_size;
-  byte* buffer = static_cast<byte*>(v8::base::OS::Allocate(
-      Assembler::kMinimalBufferSize * 4, &actual_size, true));
-  CHECK(buffer);
-  Isolate* isolate = CcTest::i_isolate();
-  HandleScope handles(isolate);
-  MacroAssembler assembler(isolate, buffer, static_cast<int>(actual_size),
-                           v8::internal::CodeObjectRequired::kYes);
-
-  MacroAssembler* masm = &assembler;
-  EntryCode(masm);
-  Label exit;
-
-  TestPositiveSmiPowerUp(masm, &exit, 0x20, 0);
-  TestPositiveSmiPowerUp(masm, &exit, 0x40, 1);
-  TestPositiveSmiPowerUp(masm, &exit, 0x60, 127);
-  TestPositiveSmiPowerUp(masm, &exit, 0x80, 128);
-  TestPositiveSmiPowerUp(masm, &exit, 0xA0, 255);
-  TestPositiveSmiPowerUp(masm, &exit, 0xC0, 256);
-  TestPositiveSmiPowerUp(masm, &exit, 0x100, 65535);
-  TestPositiveSmiPowerUp(masm, &exit, 0x120, 65536);
-  TestPositiveSmiPowerUp(masm, &exit, 0x140, Smi::kMaxValue);
-
-  __ xorq(rax, rax);  // Success.
-  __ bind(&exit);
-  ExitCode(masm);
-  __ ret(0);
-
-  CodeDesc desc;
-  masm->GetCode(isolate, &desc);
-  // Call the function from C++.
-  int result = FUNCTION_CAST<F0>(buffer)();
-  CHECK_EQ(0, result);
-}
-
-
 TEST(OperandOffset) {
   uint32_t data[256];
   for (uint32_t i = 0; i < 256; i++) { data[i] = i * 0x01010101; }
 
-  // Allocate an executable page of memory.
-  size_t actual_size;
-  byte* buffer = static_cast<byte*>(v8::base::OS::Allocate(
-      Assembler::kMinimalBufferSize * 2, &actual_size, true));
-  CHECK(buffer);
   Isolate* isolate = CcTest::i_isolate();
   HandleScope handles(isolate);
-  MacroAssembler assembler(isolate, buffer, static_cast<int>(actual_size),
+  size_t allocated;
+  byte* buffer = AllocateAssemblerBuffer(&allocated);
+  MacroAssembler assembler(isolate, buffer, static_cast<int>(allocated),
                            v8::internal::CodeObjectRequired::kYes);
 
   MacroAssembler* masm = &assembler;
@@ -1416,6 +799,7 @@
 
   CodeDesc desc;
   masm->GetCode(isolate, &desc);
+  MakeAssemblerBufferExecutable(buffer, allocated);
   // Call the function from C++.
   int result = FUNCTION_CAST<F0>(buffer)();
   CHECK_EQ(0, result);
@@ -1423,15 +807,13 @@
 
 
 TEST(LoadAndStoreWithRepresentation) {
-  // Allocate an executable page of memory.
-  size_t actual_size;
-  byte* buffer = static_cast<byte*>(v8::base::OS::Allocate(
-      Assembler::kMinimalBufferSize, &actual_size, true));
-  CHECK(buffer);
   Isolate* isolate = CcTest::i_isolate();
   HandleScope handles(isolate);
-  MacroAssembler assembler(isolate, buffer, static_cast<int>(actual_size),
+  size_t allocated;
+  byte* buffer = AllocateAssemblerBuffer(&allocated);
+  MacroAssembler assembler(isolate, buffer, static_cast<int>(allocated),
                            v8::internal::CodeObjectRequired::kYes);
+
   MacroAssembler* masm = &assembler;  // Create a pointer for the __ macro.
   EntryCode(masm);
   __ subq(rsp, Immediate(1 * kPointerSize));
@@ -1453,10 +835,10 @@
   // Test 2.
   __ movq(rax, Immediate(2));  // Test number.
   __ movq(Operand(rsp, 0 * kPointerSize), Immediate(0));
-  __ Set(rcx, V8_2PART_UINT64_C(0xdeadbeaf, 12345678));
+  __ Set(rcx, V8_2PART_UINT64_C(0xDEADBEAF, 12345678));
   __ Store(Operand(rsp, 0 * kPointerSize), rcx, Representation::Smi());
   __ movq(rcx, Operand(rsp, 0 * kPointerSize));
-  __ Set(rdx, V8_2PART_UINT64_C(0xdeadbeaf, 12345678));
+  __ Set(rdx, V8_2PART_UINT64_C(0xDEADBEAF, 12345678));
   __ cmpq(rcx, rdx);
   __ j(not_equal, &exit);
   __ Load(rdx, Operand(rsp, 0 * kPointerSize), Representation::Smi());
@@ -1492,10 +874,10 @@
   // Test 5.
   __ movq(rax, Immediate(5));  // Test number.
   __ movq(Operand(rsp, 0 * kPointerSize), Immediate(0));
-  __ Set(rcx, V8_2PART_UINT64_C(0x12345678, deadbeaf));
+  __ Set(rcx, V8_2PART_UINT64_C(0x12345678, DEADBEAF));
   __ Store(Operand(rsp, 0 * kPointerSize), rcx, Representation::Tagged());
   __ movq(rcx, Operand(rsp, 0 * kPointerSize));
-  __ Set(rdx, V8_2PART_UINT64_C(0x12345678, deadbeaf));
+  __ Set(rdx, V8_2PART_UINT64_C(0x12345678, DEADBEAF));
   __ cmpq(rcx, rdx);
   __ j(not_equal, &exit);
   __ Load(rdx, Operand(rsp, 0 * kPointerSize), Representation::Tagged());
@@ -1564,6 +946,7 @@
 
   CodeDesc desc;
   masm->GetCode(isolate, &desc);
+  MakeAssemblerBufferExecutable(buffer, allocated);
   // Call the function from C++.
   int result = FUNCTION_CAST<F0>(buffer)();
   CHECK_EQ(0, result);
@@ -1692,14 +1075,11 @@
 }
 
 TEST(SIMDMacros) {
-  // Allocate an executable page of memory.
-  size_t actual_size;
-  byte* buffer = static_cast<byte*>(v8::base::OS::Allocate(
-      Assembler::kMinimalBufferSize * 2, &actual_size, true));
-  CHECK(buffer);
   Isolate* isolate = CcTest::i_isolate();
   HandleScope handles(isolate);
-  MacroAssembler assembler(isolate, buffer, static_cast<int>(actual_size),
+  size_t allocated;
+  byte* buffer = AllocateAssemblerBuffer(&allocated);
+  MacroAssembler assembler(isolate, buffer, static_cast<int>(allocated),
                            v8::internal::CodeObjectRequired::kYes);
 
   MacroAssembler* masm = &assembler;
@@ -1719,6 +1099,7 @@
 
   CodeDesc desc;
   masm->GetCode(isolate, &desc);
+  MakeAssemblerBufferExecutable(buffer, allocated);
   // Call the function from C++.
   int result = FUNCTION_CAST<F0>(buffer)();
   CHECK_EQ(0, result);
diff --git a/src/v8/test/cctest/test-mementos.cc b/src/v8/test/cctest/test-mementos.cc
index d60dc23..d5a9a9c 100644
--- a/src/v8/test/cctest/test-mementos.cc
+++ b/src/v8/test/cctest/test-mementos.cc
@@ -28,13 +28,7 @@
 #include "src/factory.h"
 #include "src/heap/heap.h"
 #include "src/isolate.h"
-// FIXME(mstarzinger, marja): This is weird, but required because of the missing
-// (disallowed) include: src/factory.h -> src/objects-inl.h
 #include "src/objects-inl.h"
-// FIXME(mstarzinger, marja): This is weird, but required because of the missing
-// (disallowed) include: src/feedback-vector.h ->
-// src/feedback-vector-inl.h
-#include "src/feedback-vector-inl.h"
 #include "test/cctest/cctest.h"
 
 namespace v8 {
diff --git a/src/v8/test/cctest/test-modules.cc b/src/v8/test/cctest/test-modules.cc
index 6de2efc..2523b83 100644
--- a/src/v8/test/cctest/test-modules.cc
+++ b/src/v8/test/cctest/test-modules.cc
@@ -27,87 +27,166 @@
   return origin;
 }
 
-MaybeLocal<Module> FailAlwaysResolveCallback(Local<Context> context,
-                                             Local<String> specifier,
-                                             Local<Module> referrer) {
-  Isolate* isolate = context->GetIsolate();
-  isolate->ThrowException(v8_str("boom"));
-  return MaybeLocal<Module>();
-}
-
-static int g_count = 0;
-MaybeLocal<Module> FailOnSecondCallResolveCallback(Local<Context> context,
-                                                   Local<String> specifier,
-                                                   Local<Module> referrer) {
+static Local<Module> dep1;
+static Local<Module> dep2;
+MaybeLocal<Module> ResolveCallback(Local<Context> context,
+                                   Local<String> specifier,
+                                   Local<Module> referrer) {
   Isolate* isolate = CcTest::isolate();
-  if (g_count++ > 0) {
-    isolate->ThrowException(v8_str("booom"));
+  if (specifier->StrictEquals(v8_str("./dep1.js"))) {
+    return dep1;
+  } else if (specifier->StrictEquals(v8_str("./dep2.js"))) {
+    return dep2;
+  } else {
+    isolate->ThrowException(v8_str("boom"));
     return MaybeLocal<Module>();
   }
-  Local<String> source_text = v8_str("");
-  ScriptOrigin origin = ModuleOrigin(v8_str("module.js"), isolate);
-  ScriptCompiler::Source source(source_text, origin);
-  return ScriptCompiler::CompileModule(isolate, &source).ToLocalChecked();
 }
 
-TEST(ModuleInstantiationFailures) {
+TEST(ModuleInstantiationFailures1) {
   Isolate* isolate = CcTest::isolate();
   HandleScope scope(isolate);
   LocalContext env;
   v8::TryCatch try_catch(isolate);
 
-  Local<String> source_text = v8_str(
-      "import './foo.js';\n"
-      "export {} from './bar.js';");
-  ScriptOrigin origin = ModuleOrigin(v8_str("file.js"), CcTest::isolate());
-  ScriptCompiler::Source source(source_text, origin);
-  Local<Module> module =
-      ScriptCompiler::CompileModule(isolate, &source).ToLocalChecked();
-  CHECK_EQ(Module::kUninstantiated, module->GetStatus());
-  CHECK_EQ(2, module->GetModuleRequestsLength());
-  CHECK(v8_str("./foo.js")->StrictEquals(module->GetModuleRequest(0)));
-  v8::Location loc = module->GetModuleRequestLocation(0);
-  CHECK_EQ(0, loc.GetLineNumber());
-  CHECK_EQ(7, loc.GetColumnNumber());
-
-  CHECK(v8_str("./bar.js")->StrictEquals(module->GetModuleRequest(1)));
-  loc = module->GetModuleRequestLocation(1);
-  CHECK_EQ(1, loc.GetLineNumber());
-  CHECK_EQ(15, loc.GetColumnNumber());
+  Local<Module> module;
+  {
+    Local<String> source_text = v8_str(
+        "import './foo.js';\n"
+        "export {} from './bar.js';");
+    ScriptOrigin origin = ModuleOrigin(v8_str("file.js"), CcTest::isolate());
+    ScriptCompiler::Source source(source_text, origin);
+    module = ScriptCompiler::CompileModule(isolate, &source).ToLocalChecked();
+    CHECK_EQ(Module::kUninstantiated, module->GetStatus());
+    CHECK_EQ(2, module->GetModuleRequestsLength());
+    CHECK(v8_str("./foo.js")->StrictEquals(module->GetModuleRequest(0)));
+    v8::Location loc = module->GetModuleRequestLocation(0);
+    CHECK_EQ(0, loc.GetLineNumber());
+    CHECK_EQ(7, loc.GetColumnNumber());
+    CHECK(v8_str("./bar.js")->StrictEquals(module->GetModuleRequest(1)));
+    loc = module->GetModuleRequestLocation(1);
+    CHECK_EQ(1, loc.GetLineNumber());
+    CHECK_EQ(15, loc.GetColumnNumber());
+  }
 
   // Instantiation should fail.
   {
     v8::TryCatch inner_try_catch(isolate);
-    CHECK(module->InstantiateModule(env.local(), FailAlwaysResolveCallback)
-              .IsNothing());
+    CHECK(module->InstantiateModule(env.local(), ResolveCallback).IsNothing());
     CHECK(inner_try_catch.HasCaught());
     CHECK(inner_try_catch.Exception()->StrictEquals(v8_str("boom")));
-    CHECK_EQ(Module::kErrored, module->GetStatus());
-    Local<Value> exception = module->GetException();
-    CHECK(exception->StrictEquals(v8_str("boom")));
-    // TODO(neis): Check object identity.
+    CHECK_EQ(Module::kUninstantiated, module->GetStatus());
   }
 
   // Start over again...
-  module = ScriptCompiler::CompileModule(isolate, &source).ToLocalChecked();
+  {
+    Local<String> source_text = v8_str(
+        "import './dep1.js';\n"
+        "export {} from './bar.js';");
+    ScriptOrigin origin = ModuleOrigin(v8_str("file.js"), CcTest::isolate());
+    ScriptCompiler::Source source(source_text, origin);
+    module = ScriptCompiler::CompileModule(isolate, &source).ToLocalChecked();
+  }
 
-  // Instantiation should fail if a sub-module fails to resolve.
-  g_count = 0;
+  // dep1.js
+  {
+    Local<String> source_text = v8_str("");
+    ScriptOrigin origin = ModuleOrigin(v8_str("dep1.js"), CcTest::isolate());
+    ScriptCompiler::Source source(source_text, origin);
+    dep1 = ScriptCompiler::CompileModule(isolate, &source).ToLocalChecked();
+  }
+
+  // Instantiation should fail because a sub-module fails to resolve.
   {
     v8::TryCatch inner_try_catch(isolate);
-    CHECK(
-        module->InstantiateModule(env.local(), FailOnSecondCallResolveCallback)
-            .IsNothing());
+    CHECK(module->InstantiateModule(env.local(), ResolveCallback).IsNothing());
     CHECK(inner_try_catch.HasCaught());
-    CHECK(inner_try_catch.Exception()->StrictEquals(v8_str("booom")));
-    CHECK_EQ(Module::kErrored, module->GetStatus());
-    Local<Value> exception = module->GetException();
-    CHECK(exception->StrictEquals(v8_str("booom")));
+    CHECK(inner_try_catch.Exception()->StrictEquals(v8_str("boom")));
+    CHECK_EQ(Module::kUninstantiated, module->GetStatus());
   }
 
   CHECK(!try_catch.HasCaught());
 }
 
+TEST(ModuleInstantiationFailures2) {
+  Isolate* isolate = CcTest::isolate();
+  HandleScope scope(isolate);
+  LocalContext env;
+  v8::TryCatch try_catch(isolate);
+
+  // root1.js
+  Local<Module> root;
+  {
+    Local<String> source_text =
+        v8_str("import './dep1.js'; import './dep2.js'");
+    ScriptOrigin origin = ModuleOrigin(v8_str("root1.js"), CcTest::isolate());
+    ScriptCompiler::Source source(source_text, origin);
+    root = ScriptCompiler::CompileModule(isolate, &source).ToLocalChecked();
+  }
+
+  // dep1.js
+  {
+    Local<String> source_text = v8_str("export let x = 42");
+    ScriptOrigin origin = ModuleOrigin(v8_str("dep1.js"), CcTest::isolate());
+    ScriptCompiler::Source source(source_text, origin);
+    dep1 = ScriptCompiler::CompileModule(isolate, &source).ToLocalChecked();
+  }
+
+  // dep2.js
+  {
+    Local<String> source_text = v8_str("import {foo} from './dep3.js'");
+    ScriptOrigin origin = ModuleOrigin(v8_str("dep2.js"), CcTest::isolate());
+    ScriptCompiler::Source source(source_text, origin);
+    dep2 = ScriptCompiler::CompileModule(isolate, &source).ToLocalChecked();
+  }
+
+  {
+    v8::TryCatch inner_try_catch(isolate);
+    CHECK(root->InstantiateModule(env.local(), ResolveCallback).IsNothing());
+    CHECK(inner_try_catch.HasCaught());
+    CHECK(inner_try_catch.Exception()->StrictEquals(v8_str("boom")));
+    CHECK_EQ(Module::kUninstantiated, root->GetStatus());
+    CHECK_EQ(Module::kUninstantiated, dep1->GetStatus());
+    CHECK_EQ(Module::kUninstantiated, dep2->GetStatus());
+  }
+
+  // Change dep2.js
+  {
+    Local<String> source_text = v8_str("import {foo} from './dep2.js'");
+    ScriptOrigin origin = ModuleOrigin(v8_str("dep2.js"), CcTest::isolate());
+    ScriptCompiler::Source source(source_text, origin);
+    dep2 = ScriptCompiler::CompileModule(isolate, &source).ToLocalChecked();
+  }
+
+  {
+    v8::TryCatch inner_try_catch(isolate);
+    CHECK(root->InstantiateModule(env.local(), ResolveCallback).IsNothing());
+    CHECK(inner_try_catch.HasCaught());
+    CHECK(!inner_try_catch.Exception()->StrictEquals(v8_str("boom")));
+    CHECK_EQ(Module::kUninstantiated, root->GetStatus());
+    CHECK_EQ(Module::kInstantiated, dep1->GetStatus());
+    CHECK_EQ(Module::kUninstantiated, dep2->GetStatus());
+  }
+
+  // Change dep2.js again
+  {
+    Local<String> source_text = v8_str("import {foo} from './dep3.js'");
+    ScriptOrigin origin = ModuleOrigin(v8_str("dep2.js"), CcTest::isolate());
+    ScriptCompiler::Source source(source_text, origin);
+    dep2 = ScriptCompiler::CompileModule(isolate, &source).ToLocalChecked();
+  }
+
+  {
+    v8::TryCatch inner_try_catch(isolate);
+    CHECK(root->InstantiateModule(env.local(), ResolveCallback).IsNothing());
+    CHECK(inner_try_catch.HasCaught());
+    CHECK(inner_try_catch.Exception()->StrictEquals(v8_str("boom")));
+    CHECK_EQ(Module::kUninstantiated, root->GetStatus());
+    CHECK_EQ(Module::kInstantiated, dep1->GetStatus());
+    CHECK_EQ(Module::kUninstantiated, dep2->GetStatus());
+  }
+}
+
 static MaybeLocal<Module> CompileSpecifierAsModuleResolveCallback(
     Local<Context> context, Local<String> specifier, Local<Module> referrer) {
   ScriptOrigin origin = ModuleOrigin(v8_str("module.js"), CcTest::isolate());
@@ -281,4 +360,115 @@
   CHECK(!try_catch.HasCaught());
 }
 
+TEST(ModuleNamespace) {
+  Isolate* isolate = CcTest::isolate();
+  HandleScope scope(isolate);
+  LocalContext env;
+  v8::TryCatch try_catch(isolate);
+
+  Local<v8::Object> ReferenceError =
+      CompileRun("ReferenceError")->ToObject(env.local()).ToLocalChecked();
+
+  Local<String> source_text = v8_str(
+      "import {a, b} from 'export var a = 1; export let b = 2';"
+      "export function geta() {return a};"
+      "export function getb() {return b};"
+      "export let radio = 3;"
+      "export var gaga = 4;");
+  ScriptOrigin origin = ModuleOrigin(v8_str("file.js"), CcTest::isolate());
+  ScriptCompiler::Source source(source_text, origin);
+  Local<Module> module =
+      ScriptCompiler::CompileModule(isolate, &source).ToLocalChecked();
+  CHECK_EQ(Module::kUninstantiated, module->GetStatus());
+  CHECK(module
+            ->InstantiateModule(env.local(),
+                                CompileSpecifierAsModuleResolveCallback)
+            .FromJust());
+  CHECK_EQ(Module::kInstantiated, module->GetStatus());
+  Local<Value> ns = module->GetModuleNamespace();
+  CHECK_EQ(Module::kInstantiated, module->GetStatus());
+  Local<v8::Object> nsobj = ns->ToObject(env.local()).ToLocalChecked();
+
+  // a, b
+  CHECK(nsobj->Get(env.local(), v8_str("a")).ToLocalChecked()->IsUndefined());
+  CHECK(nsobj->Get(env.local(), v8_str("b")).ToLocalChecked()->IsUndefined());
+
+  // geta
+  {
+    auto geta = nsobj->Get(env.local(), v8_str("geta")).ToLocalChecked();
+    auto a = geta.As<v8::Function>()
+                 ->Call(env.local(), geta, 0, nullptr)
+                 .ToLocalChecked();
+    CHECK(a->IsUndefined());
+  }
+
+  // getb
+  {
+    v8::TryCatch inner_try_catch(isolate);
+    auto getb = nsobj->Get(env.local(), v8_str("getb")).ToLocalChecked();
+    CHECK(
+        getb.As<v8::Function>()->Call(env.local(), getb, 0, nullptr).IsEmpty());
+    CHECK(inner_try_catch.HasCaught());
+    CHECK(inner_try_catch.Exception()
+              ->InstanceOf(env.local(), ReferenceError)
+              .FromJust());
+  }
+
+  // radio
+  {
+    v8::TryCatch inner_try_catch(isolate);
+    // https://bugs.chromium.org/p/v8/issues/detail?id=7235
+    // CHECK(nsobj->Get(env.local(), v8_str("radio")).IsEmpty());
+    CHECK(nsobj->Get(env.local(), v8_str("radio"))
+              .ToLocalChecked()
+              ->IsUndefined());
+    CHECK(inner_try_catch.HasCaught());
+    CHECK(inner_try_catch.Exception()
+              ->InstanceOf(env.local(), ReferenceError)
+              .FromJust());
+  }
+
+  // gaga
+  {
+    auto gaga = nsobj->Get(env.local(), v8_str("gaga")).ToLocalChecked();
+    CHECK(gaga->IsUndefined());
+  }
+
+  CHECK(!try_catch.HasCaught());
+  CHECK_EQ(Module::kInstantiated, module->GetStatus());
+  module->Evaluate(env.local()).ToLocalChecked();
+  CHECK_EQ(Module::kEvaluated, module->GetStatus());
+
+  // geta
+  {
+    auto geta = nsobj->Get(env.local(), v8_str("geta")).ToLocalChecked();
+    auto a = geta.As<v8::Function>()
+                 ->Call(env.local(), geta, 0, nullptr)
+                 .ToLocalChecked();
+    CHECK_EQ(1, a->Int32Value(env.local()).FromJust());
+  }
+
+  // getb
+  {
+    auto getb = nsobj->Get(env.local(), v8_str("getb")).ToLocalChecked();
+    auto b = getb.As<v8::Function>()
+                 ->Call(env.local(), getb, 0, nullptr)
+                 .ToLocalChecked();
+    CHECK_EQ(2, b->Int32Value(env.local()).FromJust());
+  }
+
+  // radio
+  {
+    auto radio = nsobj->Get(env.local(), v8_str("radio")).ToLocalChecked();
+    CHECK_EQ(3, radio->Int32Value(env.local()).FromJust());
+  }
+
+  // gaga
+  {
+    auto gaga = nsobj->Get(env.local(), v8_str("gaga")).ToLocalChecked();
+    CHECK_EQ(4, gaga->Int32Value(env.local()).FromJust());
+  }
+
+  CHECK(!try_catch.HasCaught());
+}
 }  // anonymous namespace
diff --git a/src/v8/test/cctest/test-object.cc b/src/v8/test/cctest/test-object.cc
index 088803e..42c0691 100644
--- a/src/v8/test/cctest/test-object.cc
+++ b/src/v8/test/cctest/test-object.cc
@@ -57,6 +57,9 @@
   CheckBoolean(isolate, true, "true");
   CheckBoolean(isolate, false, "false");
   CheckBoolean(isolate, false, "false");
+  Handle<Object> smi_42 = handle(Smi::FromInt(42), isolate);
+  CheckObject(isolate, BigInt::FromNumber(isolate, smi_42).ToHandleChecked(),
+              "42");
   CheckObject(isolate, factory->undefined_value(), "undefined");
   CheckObject(isolate, factory->null_value(), "null");
 
diff --git a/src/v8/test/cctest/test-parsing.cc b/src/v8/test/cctest/test-parsing.cc
index 1e0378e..52a7d3f 100644
--- a/src/v8/test/cctest/test-parsing.cc
+++ b/src/v8/test/cctest/test-parsing.cc
@@ -63,7 +63,7 @@
 
 namespace {
 
-int* global_use_counts = NULL;
+int* global_use_counts = nullptr;
 
 void MockUseCounterCallback(v8::Isolate* isolate,
                             v8::Isolate::UseCounterFeature feature) {
@@ -82,18 +82,18 @@
 #define KEYWORD(t, s, d) { s, i::Token::t },
       TOKEN_LIST(IGNORE_TOKEN, KEYWORD, IGNORE_TOKEN)
 #undef KEYWORD
-          {NULL, i::Token::IDENTIFIER}};
+          {nullptr, i::Token::IDENTIFIER}};
 
   KeywordToken key_token;
   i::UnicodeCache unicode_cache;
   char buffer[32];
-  for (int i = 0; (key_token = keywords[i]).keyword != NULL; i++) {
+  for (int i = 0; (key_token = keywords[i]).keyword != nullptr; i++) {
     const char* keyword = key_token.keyword;
     size_t length = strlen(key_token.keyword);
     CHECK(static_cast<int>(sizeof(buffer)) >= length);
     {
       auto stream = i::ScannerStream::ForTesting(keyword, length);
-      i::Scanner scanner(&unicode_cache, global_use_counts);
+      i::Scanner scanner(&unicode_cache);
       scanner.Initialize(stream.get(), false);
       CHECK_EQ(key_token.token, scanner.Next());
       CHECK_EQ(i::Token::EOS, scanner.Next());
@@ -101,7 +101,7 @@
     // Removing characters will make keyword matching fail.
     {
       auto stream = i::ScannerStream::ForTesting(keyword, length - 1);
-      i::Scanner scanner(&unicode_cache, global_use_counts);
+      i::Scanner scanner(&unicode_cache);
       scanner.Initialize(stream.get(), false);
       CHECK_EQ(i::Token::IDENTIFIER, scanner.Next());
       CHECK_EQ(i::Token::EOS, scanner.Next());
@@ -112,7 +112,7 @@
       i::MemMove(buffer, keyword, length);
       buffer[length] = chars_to_append[j];
       auto stream = i::ScannerStream::ForTesting(buffer, length + 1);
-      i::Scanner scanner(&unicode_cache, global_use_counts);
+      i::Scanner scanner(&unicode_cache);
       scanner.Initialize(stream.get(), false);
       CHECK_EQ(i::Token::IDENTIFIER, scanner.Next());
       CHECK_EQ(i::Token::EOS, scanner.Next());
@@ -122,7 +122,7 @@
       i::MemMove(buffer, keyword, length);
       buffer[length - 1] = '_';
       auto stream = i::ScannerStream::ForTesting(buffer, length);
-      i::Scanner scanner(&unicode_cache, global_use_counts);
+      i::Scanner scanner(&unicode_cache);
       scanner.Initialize(stream.get(), false);
       CHECK_EQ(i::Token::IDENTIFIER, scanner.Next());
       CHECK_EQ(i::Token::EOS, scanner.Next());
@@ -134,6 +134,7 @@
 TEST(ScanHTMLEndComments) {
   v8::V8::Initialize();
   v8::Isolate* isolate = CcTest::isolate();
+  i::Isolate* i_isolate = CcTest::i_isolate();
   v8::HandleScope handles(isolate);
 
   // Regression test. See:
@@ -169,7 +170,7 @@
       "/* SLDC */ /* MLC \n */ --> is eol-comment\nvar y = 37;\n",
       "/* MLC1 \n */ /* SLDC1 */ /* MLC2 \n */ /* SLDC2 */ --> is eol-comment\n"
           "var y = 37;\n",
-      NULL
+      nullptr
   };
 
   const char* fail_tests[] = {
@@ -177,28 +178,28 @@
       "\"\\n\" --> is eol-comment\nvar y = 37;\n",
       "x/* precomment */ --> is eol-comment\nvar y = 37;\n",
       "var x = 42; --> is eol-comment\nvar y = 37;\n",
-      NULL
+      nullptr
   };
   // clang-format on
 
   // Parser/Scanner needs a stack limit.
-  CcTest::i_isolate()->stack_guard()->SetStackLimit(
-      i::GetCurrentStackPosition() - 128 * 1024);
-  uintptr_t stack_limit = CcTest::i_isolate()->stack_guard()->real_climit();
+  i_isolate->stack_guard()->SetStackLimit(i::GetCurrentStackPosition() -
+                                          128 * 1024);
+  uintptr_t stack_limit = i_isolate->stack_guard()->real_climit();
   for (int i = 0; tests[i]; i++) {
     const char* source = tests[i];
     auto stream = i::ScannerStream::ForTesting(source);
-    i::Scanner scanner(CcTest::i_isolate()->unicode_cache(), global_use_counts);
+    i::Scanner scanner(i_isolate->unicode_cache());
     scanner.Initialize(stream.get(), false);
-    i::Zone zone(CcTest::i_isolate()->allocator(), ZONE_NAME);
-    i::AstValueFactory ast_value_factory(
-        &zone, CcTest::i_isolate()->ast_string_constants(),
-        CcTest::i_isolate()->heap()->HashSeed());
+    i::Zone zone(i_isolate->allocator(), ZONE_NAME);
+    i::AstValueFactory ast_value_factory(&zone,
+                                         i_isolate->ast_string_constants(),
+                                         i_isolate->heap()->HashSeed());
     i::PendingCompilationErrorHandler pending_error_handler;
-    i::PreParser preparser(
-        &zone, &scanner, stack_limit, &ast_value_factory,
-        &pending_error_handler,
-        CcTest::i_isolate()->counters()->runtime_call_stats());
+    i::PreParser preparser(&zone, &scanner, stack_limit, &ast_value_factory,
+                           &pending_error_handler,
+                           i_isolate->counters()->runtime_call_stats(),
+                           i_isolate->logger());
     i::PreParser::PreParseResult result = preparser.PreParseProgram();
     CHECK_EQ(i::PreParser::kPreParseSuccess, result);
     CHECK(!pending_error_handler.has_pending_error());
@@ -207,17 +208,17 @@
   for (int i = 0; fail_tests[i]; i++) {
     const char* source = fail_tests[i];
     auto stream = i::ScannerStream::ForTesting(source);
-    i::Scanner scanner(CcTest::i_isolate()->unicode_cache(), global_use_counts);
+    i::Scanner scanner(i_isolate->unicode_cache());
     scanner.Initialize(stream.get(), false);
-    i::Zone zone(CcTest::i_isolate()->allocator(), ZONE_NAME);
-    i::AstValueFactory ast_value_factory(
-        &zone, CcTest::i_isolate()->ast_string_constants(),
-        CcTest::i_isolate()->heap()->HashSeed());
+    i::Zone zone(i_isolate->allocator(), ZONE_NAME);
+    i::AstValueFactory ast_value_factory(&zone,
+                                         i_isolate->ast_string_constants(),
+                                         i_isolate->heap()->HashSeed());
     i::PendingCompilationErrorHandler pending_error_handler;
-    i::PreParser preparser(
-        &zone, &scanner, stack_limit, &ast_value_factory,
-        &pending_error_handler,
-        CcTest::i_isolate()->counters()->runtime_call_stats());
+    i::PreParser preparser(&zone, &scanner, stack_limit, &ast_value_factory,
+                           &pending_error_handler,
+                           i_isolate->counters()->runtime_call_stats(),
+                           i_isolate->logger());
     i::PreParser::PreParseResult result = preparser.PreParseProgram();
     // Even in the case of a syntax error, kPreParseSuccess is returned.
     CHECK_EQ(i::PreParser::kPreParseSuccess, result);
@@ -232,7 +233,7 @@
   // Disallow HTML comments.
   {
     auto stream = i::ScannerStream::ForTesting(src);
-    i::Scanner scanner(&unicode_cache, global_use_counts);
+    i::Scanner scanner(&unicode_cache);
     scanner.Initialize(stream.get(), true);
     CHECK_EQ(i::Token::IDENTIFIER, scanner.Next());
     CHECK_EQ(i::Token::ILLEGAL, scanner.Next());
@@ -241,7 +242,7 @@
   // Skip HTML comments:
   {
     auto stream = i::ScannerStream::ForTesting(src);
-    i::Scanner scanner(&unicode_cache, global_use_counts);
+    i::Scanner scanner(&unicode_cache);
     scanner.Initialize(stream.get(), false);
     CHECK_EQ(i::Token::IDENTIFIER, scanner.Next());
     CHECK_EQ(i::Token::EOS, scanner.Next());
@@ -363,7 +364,7 @@
 
     const v8::ScriptCompiler::CachedData* cached_data =
         good_source.GetCachedData();
-    CHECK(cached_data->data != NULL);
+    CHECK_NOT_NULL(cached_data->data);
     CHECK_GT(cached_data->length, 0);
 
     // Now compile the erroneous code with the good preparse data. If the
@@ -383,35 +384,34 @@
 
 TEST(StandAlonePreParser) {
   v8::V8::Initialize();
+  i::Isolate* i_isolate = CcTest::i_isolate();
 
-  CcTest::i_isolate()->stack_guard()->SetStackLimit(
-      i::GetCurrentStackPosition() - 128 * 1024);
+  i_isolate->stack_guard()->SetStackLimit(i::GetCurrentStackPosition() -
+                                          128 * 1024);
 
-  const char* programs[] = {
-      "{label: 42}",
-      "var x = 42;",
-      "function foo(x, y) { return x + y; }",
-      "%ArgleBargle(glop);",
-      "var x = new new Function('this.x = 42');",
-      "var f = (x, y) => x + y;",
-      NULL
-  };
+  const char* programs[] = {"{label: 42}",
+                            "var x = 42;",
+                            "function foo(x, y) { return x + y; }",
+                            "%ArgleBargle(glop);",
+                            "var x = new new Function('this.x = 42');",
+                            "var f = (x, y) => x + y;",
+                            nullptr};
 
-  uintptr_t stack_limit = CcTest::i_isolate()->stack_guard()->real_climit();
+  uintptr_t stack_limit = i_isolate->stack_guard()->real_climit();
   for (int i = 0; programs[i]; i++) {
     auto stream = i::ScannerStream::ForTesting(programs[i]);
-    i::Scanner scanner(CcTest::i_isolate()->unicode_cache(), global_use_counts);
+    i::Scanner scanner(i_isolate->unicode_cache());
     scanner.Initialize(stream.get(), false);
 
-    i::Zone zone(CcTest::i_isolate()->allocator(), ZONE_NAME);
-    i::AstValueFactory ast_value_factory(
-        &zone, CcTest::i_isolate()->ast_string_constants(),
-        CcTest::i_isolate()->heap()->HashSeed());
+    i::Zone zone(i_isolate->allocator(), ZONE_NAME);
+    i::AstValueFactory ast_value_factory(&zone,
+                                         i_isolate->ast_string_constants(),
+                                         i_isolate->heap()->HashSeed());
     i::PendingCompilationErrorHandler pending_error_handler;
-    i::PreParser preparser(
-        &zone, &scanner, stack_limit, &ast_value_factory,
-        &pending_error_handler,
-        CcTest::i_isolate()->counters()->runtime_call_stats());
+    i::PreParser preparser(&zone, &scanner, stack_limit, &ast_value_factory,
+                           &pending_error_handler,
+                           i_isolate->counters()->runtime_call_stats(),
+                           i_isolate->logger());
     preparser.set_allow_natives(true);
     i::PreParser::PreParseResult result = preparser.PreParseProgram();
     CHECK_EQ(i::PreParser::kPreParseSuccess, result);
@@ -427,16 +427,13 @@
   CcTest::i_isolate()->stack_guard()->SetStackLimit(
       i::GetCurrentStackPosition() - 128 * 1024);
 
-  const char* programs[] = {
-      "%ArgleBargle(glop);",
-      "var x = %_IsSmi(42);",
-      NULL
-  };
+  const char* programs[] = {"%ArgleBargle(glop);", "var x = %_IsSmi(42);",
+                            nullptr};
 
   uintptr_t stack_limit = isolate->stack_guard()->real_climit();
   for (int i = 0; programs[i]; i++) {
     auto stream = i::ScannerStream::ForTesting(programs[i]);
-    i::Scanner scanner(isolate->unicode_cache(), global_use_counts);
+    i::Scanner scanner(isolate->unicode_cache());
     scanner.Initialize(stream.get(), false);
 
     // Preparser defaults to disallowing natives syntax.
@@ -447,7 +444,8 @@
     i::PendingCompilationErrorHandler pending_error_handler;
     i::PreParser preparser(&zone, &scanner, stack_limit, &ast_value_factory,
                            &pending_error_handler,
-                           isolate->counters()->runtime_call_stats());
+                           isolate->counters()->runtime_call_stats(),
+                           isolate->logger());
     i::PreParser::PreParseResult result = preparser.PreParseProgram();
     CHECK_EQ(i::PreParser::kPreParseSuccess, result);
     CHECK(pending_error_handler.has_pending_error());
@@ -506,17 +504,17 @@
   // failed in debug mode, and sometimes crashed in release mode.
 
   auto stream = i::ScannerStream::ForTesting(program);
-  i::Scanner scanner(CcTest::i_isolate()->unicode_cache(), global_use_counts);
+  i::Scanner scanner(CcTest::i_isolate()->unicode_cache());
   scanner.Initialize(stream.get(), false);
   i::Zone zone(CcTest::i_isolate()->allocator(), ZONE_NAME);
   i::AstValueFactory ast_value_factory(
       &zone, CcTest::i_isolate()->ast_string_constants(),
       CcTest::i_isolate()->heap()->HashSeed());
   i::PendingCompilationErrorHandler pending_error_handler;
-  i::PreParser preparser(&zone, &scanner,
-                         CcTest::i_isolate()->stack_guard()->real_climit(),
-                         &ast_value_factory, &pending_error_handler,
-                         isolate->counters()->runtime_call_stats());
+  i::PreParser preparser(
+      &zone, &scanner, CcTest::i_isolate()->stack_guard()->real_climit(),
+      &ast_value_factory, &pending_error_handler,
+      isolate->counters()->runtime_call_stats(), isolate->logger());
   i::PreParser::PreParseResult result = preparser.PreParseProgram();
   // Even in the case of a syntax error, kPreParseSuccess is returned.
   CHECK_EQ(i::PreParser::kPreParseSuccess, result);
@@ -581,7 +579,7 @@
   uintptr_t stack_limit = isolate->stack_guard()->real_climit();
 
   auto stream = i::ScannerStream::ForTesting(program.get(), kProgramSize);
-  i::Scanner scanner(isolate->unicode_cache(), global_use_counts);
+  i::Scanner scanner(isolate->unicode_cache());
   scanner.Initialize(stream.get(), false);
 
   i::Zone zone(CcTest::i_isolate()->allocator(), ZONE_NAME);
@@ -589,9 +587,9 @@
       &zone, CcTest::i_isolate()->ast_string_constants(),
       CcTest::i_isolate()->heap()->HashSeed());
   i::PendingCompilationErrorHandler pending_error_handler;
-  i::PreParser preparser(&zone, &scanner, stack_limit, &ast_value_factory,
-                         &pending_error_handler,
-                         isolate->counters()->runtime_call_stats());
+  i::PreParser preparser(
+      &zone, &scanner, stack_limit, &ast_value_factory, &pending_error_handler,
+      isolate->counters()->runtime_call_stats(), isolate->logger());
   i::PreParser::PreParseResult result = preparser.PreParseProgram();
   CHECK_EQ(i::PreParser::kPreParseStackOverflow, result);
 }
@@ -601,7 +599,7 @@
                        i::Token::Value* expected_tokens,
                        int skip_pos = 0,  // Zero means not skipping.
                        int skip_to = 0) {
-  i::Scanner scanner(CcTest::i_isolate()->unicode_cache(), global_use_counts);
+  i::Scanner scanner(CcTest::i_isolate()->unicode_cache());
   scanner.Initialize(stream, false);
 
   int i = 0;
@@ -679,7 +677,7 @@
 void TestScanRegExp(const char* re_source, const char* expected) {
   auto stream = i::ScannerStream::ForTesting(re_source);
   i::HandleScope scope(CcTest::i_isolate());
-  i::Scanner scanner(CcTest::i_isolate()->unicode_cache(), global_use_counts);
+  i::Scanner scanner(CcTest::i_isolate()->unicode_cache());
   scanner.Initialize(stream.get(), false);
 
   i::Token::Value start = scanner.peek();
@@ -850,7 +848,7 @@
       i::DeclarationScope::Analyze(&info);
       i::DeclarationScope::AllocateScopeInfos(&info, isolate,
                                               i::AnalyzeMode::kRegular);
-      CHECK(info.literal() != NULL);
+      CHECK_NOT_NULL(info.literal());
 
       i::DeclarationScope* script_scope = info.literal()->scope();
       CHECK(script_scope->is_script_scope());
@@ -869,8 +867,14 @@
           !scope->AsDeclarationScope()->is_arrow_scope()) {
         CHECK_NOT_NULL(scope->AsDeclarationScope()->arguments());
       }
-      CHECK_EQ((source_data[i].expected & SUPER_PROPERTY) != 0,
-               scope->AsDeclarationScope()->uses_super_property());
+      if (IsClassConstructor(scope->AsDeclarationScope()->function_kind())) {
+        CHECK_EQ((source_data[i].expected & SUPER_PROPERTY) != 0 ||
+                     (source_data[i].expected & EVAL) != 0,
+                 scope->AsDeclarationScope()->NeedsHomeObject());
+      } else {
+        CHECK_EQ((source_data[i].expected & SUPER_PROPERTY) != 0,
+                 scope->AsDeclarationScope()->NeedsHomeObject());
+      }
       if ((source_data[i].expected & THIS) != 0) {
         // Currently the is_used() flag is conservative; all variables in a
         // script scope are marked as used.
@@ -911,7 +915,7 @@
   CHECK_EQ(1, info.scope()->declarations()->LengthForTest());
   i::Declaration* decl = info.scope()->declarations()->AtForTest(0);
   i::FunctionLiteral* fun = decl->AsFunctionDeclaration()->fun();
-  CHECK(fun->body()->length() == 1);
+  CHECK_EQ(fun->body()->length(), 1);
   CHECK(fun->body()->at(0)->IsReturnStatement());
   i::ReturnStatement* ret = fun->body()->at(0)->AsReturnStatement();
   i::Literal* lit = ret->expression()->AsLiteral();
@@ -955,45 +959,48 @@
   };
 
   const SourceData source_data[] = {
-      {"  with ({}) ", "{ block; }", " more;", i::WITH_SCOPE, i::SLOPPY},
-      {"  with ({}) ", "{ block; }", "; more;", i::WITH_SCOPE, i::SLOPPY},
+      {"  with ({}) ", "{ block; }", " more;", i::WITH_SCOPE,
+       i::LanguageMode::kSloppy},
+      {"  with ({}) ", "{ block; }", "; more;", i::WITH_SCOPE,
+       i::LanguageMode::kSloppy},
       {"  with ({}) ",
        "{\n"
        "    block;\n"
        "  }",
        "\n"
        "  more;",
-       i::WITH_SCOPE, i::SLOPPY},
-      {"  with ({}) ", "statement;", " more;", i::WITH_SCOPE, i::SLOPPY},
+       i::WITH_SCOPE, i::LanguageMode::kSloppy},
+      {"  with ({}) ", "statement;", " more;", i::WITH_SCOPE,
+       i::LanguageMode::kSloppy},
       {"  with ({}) ", "statement",
        "\n"
        "  more;",
-       i::WITH_SCOPE, i::SLOPPY},
+       i::WITH_SCOPE, i::LanguageMode::kSloppy},
       {"  with ({})\n"
        "    ",
        "statement;",
        "\n"
        "  more;",
-       i::WITH_SCOPE, i::SLOPPY},
+       i::WITH_SCOPE, i::LanguageMode::kSloppy},
       {"  try {} catch ", "(e) { block; }", " more;", i::CATCH_SCOPE,
-       i::SLOPPY},
+       i::LanguageMode::kSloppy},
       {"  try {} catch ", "(e) { block; }", "; more;", i::CATCH_SCOPE,
-       i::SLOPPY},
+       i::LanguageMode::kSloppy},
       {"  try {} catch ",
        "(e) {\n"
        "    block;\n"
        "  }",
        "\n"
        "  more;",
-       i::CATCH_SCOPE, i::SLOPPY},
+       i::CATCH_SCOPE, i::LanguageMode::kSloppy},
       {"  try {} catch ", "(e) { block; }", " finally { block; } more;",
-       i::CATCH_SCOPE, i::SLOPPY},
+       i::CATCH_SCOPE, i::LanguageMode::kSloppy},
       {"  start;\n"
        "  ",
-       "{ let block; }", " more;", i::BLOCK_SCOPE, i::STRICT},
+       "{ let block; }", " more;", i::BLOCK_SCOPE, i::LanguageMode::kStrict},
       {"  start;\n"
        "  ",
-       "{ let block; }", "; more;", i::BLOCK_SCOPE, i::STRICT},
+       "{ let block; }", "; more;", i::BLOCK_SCOPE, i::LanguageMode::kStrict},
       {"  start;\n"
        "  ",
        "{\n"
@@ -1001,10 +1008,11 @@
        "  }",
        "\n"
        "  more;",
-       i::BLOCK_SCOPE, i::STRICT},
+       i::BLOCK_SCOPE, i::LanguageMode::kStrict},
       {"  start;\n"
        "  function fun",
-       "(a,b) { infunction; }", " more;", i::FUNCTION_SCOPE, i::SLOPPY},
+       "(a,b) { infunction; }", " more;", i::FUNCTION_SCOPE,
+       i::LanguageMode::kSloppy},
       {"  start;\n"
        "  function fun",
        "(a,b) {\n"
@@ -1012,149 +1020,170 @@
        "  }",
        "\n"
        "  more;",
-       i::FUNCTION_SCOPE, i::SLOPPY},
-      {"  start;\n", "(a,b) => a + b", "; more;", i::FUNCTION_SCOPE, i::SLOPPY},
+       i::FUNCTION_SCOPE, i::LanguageMode::kSloppy},
+      {"  start;\n", "(a,b) => a + b", "; more;", i::FUNCTION_SCOPE,
+       i::LanguageMode::kSloppy},
       {"  start;\n", "(a,b) => { return a+b; }", "\nmore;", i::FUNCTION_SCOPE,
-       i::SLOPPY},
+       i::LanguageMode::kSloppy},
       {"  start;\n"
        "  (function fun",
-       "(a,b) { infunction; }", ")();", i::FUNCTION_SCOPE, i::SLOPPY},
+       "(a,b) { infunction; }", ")();", i::FUNCTION_SCOPE,
+       i::LanguageMode::kSloppy},
       {"  for ", "(let x = 1 ; x < 10; ++ x) { block; }", " more;",
-       i::BLOCK_SCOPE, i::STRICT},
+       i::BLOCK_SCOPE, i::LanguageMode::kStrict},
       {"  for ", "(let x = 1 ; x < 10; ++ x) { block; }", "; more;",
-       i::BLOCK_SCOPE, i::STRICT},
+       i::BLOCK_SCOPE, i::LanguageMode::kStrict},
       {"  for ",
        "(let x = 1 ; x < 10; ++ x) {\n"
        "    block;\n"
        "  }",
        "\n"
        "  more;",
-       i::BLOCK_SCOPE, i::STRICT},
+       i::BLOCK_SCOPE, i::LanguageMode::kStrict},
       {"  for ", "(let x = 1 ; x < 10; ++ x) statement;", " more;",
-       i::BLOCK_SCOPE, i::STRICT},
+       i::BLOCK_SCOPE, i::LanguageMode::kStrict},
       {"  for ", "(let x = 1 ; x < 10; ++ x) statement",
        "\n"
        "  more;",
-       i::BLOCK_SCOPE, i::STRICT},
+       i::BLOCK_SCOPE, i::LanguageMode::kStrict},
       {"  for ",
        "(let x = 1 ; x < 10; ++ x)\n"
        "    statement;",
        "\n"
        "  more;",
-       i::BLOCK_SCOPE, i::STRICT},
+       i::BLOCK_SCOPE, i::LanguageMode::kStrict},
       {"  for ", "(let x in {}) { block; }", " more;", i::BLOCK_SCOPE,
-       i::STRICT},
+       i::LanguageMode::kStrict},
       {"  for ", "(let x in {}) { block; }", "; more;", i::BLOCK_SCOPE,
-       i::STRICT},
+       i::LanguageMode::kStrict},
       {"  for ",
        "(let x in {}) {\n"
        "    block;\n"
        "  }",
        "\n"
        "  more;",
-       i::BLOCK_SCOPE, i::STRICT},
+       i::BLOCK_SCOPE, i::LanguageMode::kStrict},
       {"  for ", "(let x in {}) statement;", " more;", i::BLOCK_SCOPE,
-       i::STRICT},
+       i::LanguageMode::kStrict},
       {"  for ", "(let x in {}) statement",
        "\n"
        "  more;",
-       i::BLOCK_SCOPE, i::STRICT},
+       i::BLOCK_SCOPE, i::LanguageMode::kStrict},
       {"  for ",
        "(let x in {})\n"
        "    statement;",
        "\n"
        "  more;",
-       i::BLOCK_SCOPE, i::STRICT},
+       i::BLOCK_SCOPE, i::LanguageMode::kStrict},
       // Check that 6-byte and 4-byte encodings of UTF-8 strings do not throw
       // the preparser off in terms of byte offsets.
       // 2 surrogates, encode a character that doesn't need a surrogate.
-      {"  'foo\355\240\201\355\260\211';\n"
+      {"  'foo\xED\xA0\x81\xED\xB0\x89';\n"
        "  (function fun",
-       "(a,b) { infunction; }", ")();", i::FUNCTION_SCOPE, i::SLOPPY},
-      // 4 byte encoding.
-      {"  'foo\360\220\220\212';\n"
+       "(a,b) { infunction; }", ")();", i::FUNCTION_SCOPE,
+       i::LanguageMode::kSloppy},
+      // 4-byte encoding.
+      {"  'foo\xF0\x90\x90\x8A';\n"
        "  (function fun",
-       "(a,b) { infunction; }", ")();", i::FUNCTION_SCOPE, i::SLOPPY},
-      // 3 byte encoding of \u0fff.
-      {"  'foo\340\277\277';\n"
+       "(a,b) { infunction; }", ")();", i::FUNCTION_SCOPE,
+       i::LanguageMode::kSloppy},
+      // 3-byte encoding of \u0FFF.
+      {"  'foo\xE0\xBF\xBF';\n"
        "  (function fun",
-       "(a,b) { infunction; }", ")();", i::FUNCTION_SCOPE, i::SLOPPY},
-      // 3 byte surrogate, followed by broken 2-byte surrogate w/ impossible 2nd
+       "(a,b) { infunction; }", ")();", i::FUNCTION_SCOPE,
+       i::LanguageMode::kSloppy},
+      // 3-byte surrogate, followed by broken 2-byte surrogate w/ impossible 2nd
       // byte and last byte missing.
-      {"  'foo\355\240\201\355\211';\n"
+      {"  'foo\xED\xA0\x81\xED\x89';\n"
        "  (function fun",
-       "(a,b) { infunction; }", ")();", i::FUNCTION_SCOPE, i::SLOPPY},
-      // Broken 3 byte encoding of \u0fff with missing last byte.
-      {"  'foo\340\277';\n"
+       "(a,b) { infunction; }", ")();", i::FUNCTION_SCOPE,
+       i::LanguageMode::kSloppy},
+      // Broken 3-byte encoding of \u0FFF with missing last byte.
+      {"  'foo\xE0\xBF';\n"
        "  (function fun",
-       "(a,b) { infunction; }", ")();", i::FUNCTION_SCOPE, i::SLOPPY},
-      // Broken 3 byte encoding of \u0fff with missing 2 last bytes.
-      {"  'foo\340';\n"
+       "(a,b) { infunction; }", ")();", i::FUNCTION_SCOPE,
+       i::LanguageMode::kSloppy},
+      // Broken 3-byte encoding of \u0FFF with missing 2 last bytes.
+      {"  'foo\xE0';\n"
        "  (function fun",
-       "(a,b) { infunction; }", ")();", i::FUNCTION_SCOPE, i::SLOPPY},
-      // Broken 3 byte encoding of \u00ff should be a 2 byte encoding.
-      {"  'foo\340\203\277';\n"
+       "(a,b) { infunction; }", ")();", i::FUNCTION_SCOPE,
+       i::LanguageMode::kSloppy},
+      // Broken 3-byte encoding of \u00FF should be a 2-byte encoding.
+      {"  'foo\xE0\x83\xBF';\n"
        "  (function fun",
-       "(a,b) { infunction; }", ")();", i::FUNCTION_SCOPE, i::SLOPPY},
-      // Broken 3 byte encoding of \u007f should be a 2 byte encoding.
-      {"  'foo\340\201\277';\n"
+       "(a,b) { infunction; }", ")();", i::FUNCTION_SCOPE,
+       i::LanguageMode::kSloppy},
+      // Broken 3-byte encoding of \u007F should be a 2-byte encoding.
+      {"  'foo\xE0\x81\xBF';\n"
        "  (function fun",
-       "(a,b) { infunction; }", ")();", i::FUNCTION_SCOPE, i::SLOPPY},
+       "(a,b) { infunction; }", ")();", i::FUNCTION_SCOPE,
+       i::LanguageMode::kSloppy},
       // Unpaired lead surrogate.
-      {"  'foo\355\240\201';\n"
+      {"  'foo\xED\xA0\x81';\n"
        "  (function fun",
-       "(a,b) { infunction; }", ")();", i::FUNCTION_SCOPE, i::SLOPPY},
-      // Unpaired lead surrogate where following code point is a 3 byte
+       "(a,b) { infunction; }", ")();", i::FUNCTION_SCOPE,
+       i::LanguageMode::kSloppy},
+      // Unpaired lead surrogate where the following code point is a 3-byte
       // sequence.
-      {"  'foo\355\240\201\340\277\277';\n"
+      {"  'foo\xED\xA0\x81\xE0\xBF\xBF';\n"
        "  (function fun",
-       "(a,b) { infunction; }", ")();", i::FUNCTION_SCOPE, i::SLOPPY},
-      // Unpaired lead surrogate where following code point is a 4 byte encoding
-      // of a trail surrogate.
-      {"  'foo\355\240\201\360\215\260\211';\n"
+       "(a,b) { infunction; }", ")();", i::FUNCTION_SCOPE,
+       i::LanguageMode::kSloppy},
+      // Unpaired lead surrogate where the following code point is a 4-byte
+      // encoding of a trail surrogate.
+      {"  'foo\xED\xA0\x81\xF0\x8D\xB0\x89';\n"
        "  (function fun",
-       "(a,b) { infunction; }", ")();", i::FUNCTION_SCOPE, i::SLOPPY},
+       "(a,b) { infunction; }", ")();", i::FUNCTION_SCOPE,
+       i::LanguageMode::kSloppy},
       // Unpaired trail surrogate.
-      {"  'foo\355\260\211';\n"
+      {"  'foo\xED\xB0\x89';\n"
        "  (function fun",
-       "(a,b) { infunction; }", ")();", i::FUNCTION_SCOPE, i::SLOPPY},
-      // 2 byte encoding of \u00ff.
-      {"  'foo\303\277';\n"
+       "(a,b) { infunction; }", ")();", i::FUNCTION_SCOPE,
+       i::LanguageMode::kSloppy},
+      // 2-byte encoding of \u00FF.
+      {"  'foo\xC3\xBF';\n"
        "  (function fun",
-       "(a,b) { infunction; }", ")();", i::FUNCTION_SCOPE, i::SLOPPY},
-      // Broken 2 byte encoding of \u00ff with missing last byte.
-      {"  'foo\303';\n"
+       "(a,b) { infunction; }", ")();", i::FUNCTION_SCOPE,
+       i::LanguageMode::kSloppy},
+      // Broken 2-byte encoding of \u00FF with missing last byte.
+      {"  'foo\xC3';\n"
        "  (function fun",
-       "(a,b) { infunction; }", ")();", i::FUNCTION_SCOPE, i::SLOPPY},
-      // Broken 2 byte encoding of \u007f should be a 1 byte encoding.
-      {"  'foo\301\277';\n"
+       "(a,b) { infunction; }", ")();", i::FUNCTION_SCOPE,
+       i::LanguageMode::kSloppy},
+      // Broken 2-byte encoding of \u007F should be a 1-byte encoding.
+      {"  'foo\xC1\xBF';\n"
        "  (function fun",
-       "(a,b) { infunction; }", ")();", i::FUNCTION_SCOPE, i::SLOPPY},
-      // Illegal 5 byte encoding.
-      {"  'foo\370\277\277\277\277';\n"
+       "(a,b) { infunction; }", ")();", i::FUNCTION_SCOPE,
+       i::LanguageMode::kSloppy},
+      // Illegal 5-byte encoding.
+      {"  'foo\xF8\xBF\xBF\xBF\xBF';\n"
        "  (function fun",
-       "(a,b) { infunction; }", ")();", i::FUNCTION_SCOPE, i::SLOPPY},
-      // Illegal 6 byte encoding.
-      {"  'foo\374\277\277\277\277\277';\n"
+       "(a,b) { infunction; }", ")();", i::FUNCTION_SCOPE,
+       i::LanguageMode::kSloppy},
+      // Illegal 6-byte encoding.
+      {"  'foo\xFC\xBF\xBF\xBF\xBF\xBF';\n"
        "  (function fun",
-       "(a,b) { infunction; }", ")();", i::FUNCTION_SCOPE, i::SLOPPY},
-      // Illegal 0xfe byte
-      {"  'foo\376\277\277\277\277\277\277';\n"
+       "(a,b) { infunction; }", ")();", i::FUNCTION_SCOPE,
+       i::LanguageMode::kSloppy},
+      // Illegal 0xFE byte
+      {"  'foo\xFE\xBF\xBF\xBF\xBF\xBF\xBF';\n"
        "  (function fun",
-       "(a,b) { infunction; }", ")();", i::FUNCTION_SCOPE, i::SLOPPY},
-      // Illegal 0xff byte
-      {"  'foo\377\277\277\277\277\277\277\277';\n"
+       "(a,b) { infunction; }", ")();", i::FUNCTION_SCOPE,
+       i::LanguageMode::kSloppy},
+      // Illegal 0xFF byte
+      {"  'foo\xFF\xBF\xBF\xBF\xBF\xBF\xBF\xBF';\n"
        "  (function fun",
-       "(a,b) { infunction; }", ")();", i::FUNCTION_SCOPE, i::SLOPPY},
+       "(a,b) { infunction; }", ")();", i::FUNCTION_SCOPE,
+       i::LanguageMode::kSloppy},
       {"  'foo';\n"
        "  (function fun",
-       "(a,b) { 'bar\355\240\201\355\260\213'; }", ")();", i::FUNCTION_SCOPE,
-       i::SLOPPY},
+       "(a,b) { 'bar\xED\xA0\x81\xED\xB0\x8B'; }", ")();", i::FUNCTION_SCOPE,
+       i::LanguageMode::kSloppy},
       {"  'foo';\n"
        "  (function fun",
-       "(a,b) { 'bar\360\220\220\214'; }", ")();", i::FUNCTION_SCOPE,
-       i::SLOPPY},
-      {NULL, NULL, NULL, i::EVAL_SCOPE, i::SLOPPY}};
+       "(a,b) { 'bar\xF0\x90\x90\x8C'; }", ")();", i::FUNCTION_SCOPE,
+       i::LanguageMode::kSloppy},
+      {nullptr, nullptr, nullptr, i::EVAL_SCOPE, i::LanguageMode::kSloppy}};
 
   i::Isolate* isolate = CcTest::i_isolate();
   i::Factory* factory = isolate->factory();
@@ -1220,7 +1249,7 @@
       "(function f() { 0, function g() { var a; } })();",
       "(function f() { 0, { g() { var a; } } })();",
       "(function f() { 0, class c { g() { var a; } } })();", */
-      NULL};
+      nullptr};
 
   i::Isolate* isolate = CcTest::i_isolate();
   i::Factory* factory = isolate->factory();
@@ -1285,12 +1314,13 @@
   kAllowLazy,
   kAllowNatives,
   kAllowHarmonyFunctionSent,
-  kAllowHarmonyRestrictiveGenerators,
-  kAllowHarmonyClassFields,
-  kAllowHarmonyObjectRestSpread,
+  kAllowHarmonyPublicFields,
+  kAllowHarmonyPrivateFields,
+  kAllowHarmonyStaticFields,
   kAllowHarmonyDynamicImport,
-  kAllowHarmonyAsyncIteration,
-  kAllowHarmonyTemplateEscapes,
+  kAllowHarmonyImportMeta,
+  kAllowHarmonyDoExpressions,
+  kAllowHarmonyOptionalCatchBinding,
 };
 
 enum ParserSyncTestResult {
@@ -1302,33 +1332,34 @@
 void SetGlobalFlags(i::EnumSet<ParserFlag> flags) {
   i::FLAG_allow_natives_syntax = flags.Contains(kAllowNatives);
   i::FLAG_harmony_function_sent = flags.Contains(kAllowHarmonyFunctionSent);
-  i::FLAG_harmony_restrictive_generators =
-      flags.Contains(kAllowHarmonyRestrictiveGenerators);
-  i::FLAG_harmony_class_fields = flags.Contains(kAllowHarmonyClassFields);
-  i::FLAG_harmony_object_rest_spread =
-      flags.Contains(kAllowHarmonyObjectRestSpread);
+  i::FLAG_harmony_public_fields = flags.Contains(kAllowHarmonyPublicFields);
+  i::FLAG_harmony_private_fields = flags.Contains(kAllowHarmonyPrivateFields);
+  i::FLAG_harmony_static_fields = flags.Contains(kAllowHarmonyStaticFields);
   i::FLAG_harmony_dynamic_import = flags.Contains(kAllowHarmonyDynamicImport);
-  i::FLAG_harmony_async_iteration = flags.Contains(kAllowHarmonyAsyncIteration);
-  i::FLAG_harmony_template_escapes =
-      flags.Contains(kAllowHarmonyTemplateEscapes);
+  i::FLAG_harmony_import_meta = flags.Contains(kAllowHarmonyImportMeta);
+  i::FLAG_harmony_do_expressions = flags.Contains(kAllowHarmonyDoExpressions);
+  i::FLAG_harmony_optional_catch_binding =
+      flags.Contains(kAllowHarmonyOptionalCatchBinding);
 }
 
 void SetParserFlags(i::PreParser* parser, i::EnumSet<ParserFlag> flags) {
   parser->set_allow_natives(flags.Contains(kAllowNatives));
   parser->set_allow_harmony_function_sent(
       flags.Contains(kAllowHarmonyFunctionSent));
-  parser->set_allow_harmony_restrictive_generators(
-      flags.Contains(kAllowHarmonyRestrictiveGenerators));
-  parser->set_allow_harmony_class_fields(
-      flags.Contains(kAllowHarmonyClassFields));
-  parser->set_allow_harmony_object_rest_spread(
-      flags.Contains(kAllowHarmonyObjectRestSpread));
+  parser->set_allow_harmony_public_fields(
+      flags.Contains(kAllowHarmonyPublicFields));
+  parser->set_allow_harmony_private_fields(
+      flags.Contains(kAllowHarmonyPrivateFields));
+  parser->set_allow_harmony_static_fields(
+      flags.Contains(kAllowHarmonyStaticFields));
   parser->set_allow_harmony_dynamic_import(
       flags.Contains(kAllowHarmonyDynamicImport));
-  parser->set_allow_harmony_async_iteration(
-      flags.Contains(kAllowHarmonyAsyncIteration));
-  parser->set_allow_harmony_template_escapes(
-      flags.Contains(kAllowHarmonyTemplateEscapes));
+  parser->set_allow_harmony_import_meta(
+      flags.Contains(kAllowHarmonyImportMeta));
+  parser->set_allow_harmony_do_expressions(
+      flags.Contains(kAllowHarmonyDoExpressions));
+  parser->set_allow_harmony_optional_catch_binding(
+      flags.Contains(kAllowHarmonyOptionalCatchBinding));
 }
 
 void TestParserSyncWithFlags(i::Handle<i::String> source,
@@ -1344,7 +1375,7 @@
   // Preparse the data.
   i::PendingCompilationErrorHandler pending_error_handler;
   if (test_preparser) {
-    i::Scanner scanner(isolate->unicode_cache(), global_use_counts);
+    i::Scanner scanner(isolate->unicode_cache());
     std::unique_ptr<i::Utf16CharacterStream> stream(
         i::ScannerStream::For(source));
     i::Zone zone(CcTest::i_isolate()->allocator(), ZONE_NAME);
@@ -1353,10 +1384,11 @@
         CcTest::i_isolate()->heap()->HashSeed());
     i::PreParser preparser(&zone, &scanner, stack_limit, &ast_value_factory,
                            &pending_error_handler,
-                           isolate->counters()->runtime_call_stats());
+                           isolate->counters()->runtime_call_stats(),
+                           isolate->logger(), -1, is_module);
     SetParserFlags(&preparser, flags);
     scanner.Initialize(stream.get(), is_module);
-    i::PreParser::PreParseResult result = preparser.PreParseProgram(is_module);
+    i::PreParser::PreParseResult result = preparser.PreParseProgram();
     CHECK_EQ(i::PreParser::kPreParseSuccess, result);
   }
 
@@ -1373,7 +1405,7 @@
   }
 
   // Check that preparsing fails iff parsing fails.
-  if (function == NULL) {
+  if (function == nullptr) {
     // Extract exception from the parser.
     CHECK(isolate->has_pending_exception());
     i::Handle<i::JSObject> exception_handle(
@@ -1384,32 +1416,30 @@
     isolate->clear_pending_exception();
 
     if (result == kSuccess) {
-      v8::base::OS::Print(
+      FATAL(
           "Parser failed on:\n"
           "\t%s\n"
           "with error:\n"
           "\t%s\n"
           "However, we expected no error.",
           source->ToCString().get(), message_string->ToCString().get());
-      CHECK(false);
     }
 
     if (test_preparser && !pending_error_handler.has_pending_error()) {
-      v8::base::OS::Print(
+      FATAL(
           "Parser failed on:\n"
           "\t%s\n"
           "with error:\n"
           "\t%s\n"
           "However, the preparser succeeded",
           source->ToCString().get(), message_string->ToCString().get());
-      CHECK(false);
     }
     // Check that preparser and parser produce the same error.
     if (test_preparser && !ignore_error_msg) {
       i::Handle<i::String> preparser_message =
-          pending_error_handler.FormatMessage(CcTest::i_isolate());
+          pending_error_handler.FormatErrorMessageForTest(CcTest::i_isolate());
       if (!i::String::Equals(message_string, preparser_message)) {
-        v8::base::OS::Print(
+        FATAL(
             "Expected parser and preparser to produce the same error on:\n"
             "\t%s\n"
             "However, found the following error messages\n"
@@ -1417,37 +1447,34 @@
             "\tpreparser: %s\n",
             source->ToCString().get(), message_string->ToCString().get(),
             preparser_message->ToCString().get());
-        CHECK(false);
       }
     }
   } else if (test_preparser && pending_error_handler.has_pending_error()) {
-    v8::base::OS::Print(
+    FATAL(
         "Preparser failed on:\n"
         "\t%s\n"
         "with error:\n"
         "\t%s\n"
         "However, the parser succeeded",
         source->ToCString().get(),
-        pending_error_handler.FormatMessage(CcTest::i_isolate())
+        pending_error_handler.FormatErrorMessageForTest(CcTest::i_isolate())
             ->ToCString()
             .get());
-    CHECK(false);
   } else if (result == kError) {
-    v8::base::OS::Print(
+    FATAL(
         "Expected error on:\n"
         "\t%s\n"
         "However, parser and preparser succeeded",
         source->ToCString().get());
-    CHECK(false);
   }
 }
 
 void TestParserSync(const char* source, const ParserFlag* varying_flags,
                     size_t varying_flags_length,
                     ParserSyncTestResult result = kSuccessOrError,
-                    const ParserFlag* always_true_flags = NULL,
+                    const ParserFlag* always_true_flags = nullptr,
                     size_t always_true_flags_length = 0,
-                    const ParserFlag* always_false_flags = NULL,
+                    const ParserFlag* always_false_flags = nullptr,
                     size_t always_false_flags_length = 0,
                     bool is_module = false, bool test_preparser = true,
                     bool ignore_error_msg = false) {
@@ -1474,74 +1501,37 @@
 
 
 TEST(ParserSync) {
-  const char* context_data[][2] = {
-    { "", "" },
-    { "{", "}" },
-    { "if (true) ", " else {}" },
-    { "if (true) {} else ", "" },
-    { "if (true) ", "" },
-    { "do ", " while (false)" },
-    { "while (false) ", "" },
-    { "for (;;) ", "" },
-    { "with ({})", "" },
-    { "switch (12) { case 12: ", "}" },
-    { "switch (12) { default: ", "}" },
-    { "switch (12) { ", "case 12: }" },
-    { "label2: ", "" },
-    { NULL, NULL }
-  };
+  const char* context_data[][2] = {{"", ""},
+                                   {"{", "}"},
+                                   {"if (true) ", " else {}"},
+                                   {"if (true) {} else ", ""},
+                                   {"if (true) ", ""},
+                                   {"do ", " while (false)"},
+                                   {"while (false) ", ""},
+                                   {"for (;;) ", ""},
+                                   {"with ({})", ""},
+                                   {"switch (12) { case 12: ", "}"},
+                                   {"switch (12) { default: ", "}"},
+                                   {"switch (12) { ", "case 12: }"},
+                                   {"label2: ", ""},
+                                   {nullptr, nullptr}};
 
   const char* statement_data[] = {
-    "{}",
-    "var x",
-    "var x = 1",
-    "const x",
-    "const x = 1",
-    ";",
-    "12",
-    "if (false) {} else ;",
-    "if (false) {} else {}",
-    "if (false) {} else 12",
-    "if (false) ;",
-    "if (false) {}",
-    "if (false) 12",
-    "do {} while (false)",
-    "for (;;) ;",
-    "for (;;) {}",
-    "for (;;) 12",
-    "continue",
-    "continue label",
-    "continue\nlabel",
-    "break",
-    "break label",
-    "break\nlabel",
-    // TODO(marja): activate once parsing 'return' is merged into ParserBase.
-    // "return",
-    // "return  12",
-    // "return\n12",
-    "with ({}) ;",
-    "with ({}) {}",
-    "with ({}) 12",
-    "switch ({}) { default: }",
-    "label3: ",
-    "throw",
-    "throw  12",
-    "throw\n12",
-    "try {} catch(e) {}",
-    "try {} finally {}",
-    "try {} catch(e) {} finally {}",
-    "debugger",
-    NULL
-  };
+      "{}", "var x", "var x = 1", "const x", "const x = 1", ";", "12",
+      "if (false) {} else ;", "if (false) {} else {}", "if (false) {} else 12",
+      "if (false) ;", "if (false) {}", "if (false) 12", "do {} while (false)",
+      "for (;;) ;", "for (;;) {}", "for (;;) 12", "continue", "continue label",
+      "continue\nlabel", "break", "break label", "break\nlabel",
+      // TODO(marja): activate once parsing 'return' is merged into ParserBase.
+      // "return",
+      // "return  12",
+      // "return\n12",
+      "with ({}) ;", "with ({}) {}", "with ({}) 12", "switch ({}) { default: }",
+      "label3: ", "throw", "throw  12", "throw\n12", "try {} catch(e) {}",
+      "try {} finally {}", "try {} catch(e) {} finally {}", "debugger",
+      nullptr};
 
-  const char* termination_data[] = {
-    "",
-    ";",
-    "\n",
-    ";\n",
-    "\n;",
-    NULL
-  };
+  const char* termination_data[] = {"", ";", "\n", ";\n", "\n;", nullptr};
 
   v8::HandleScope handles(CcTest::isolate());
   v8::Local<v8::Context> context = v8::Context::New(CcTest::isolate());
@@ -1550,9 +1540,9 @@
   CcTest::i_isolate()->stack_guard()->SetStackLimit(
       i::GetCurrentStackPosition() - 128 * 1024);
 
-  for (int i = 0; context_data[i][0] != NULL; ++i) {
-    for (int j = 0; statement_data[j] != NULL; ++j) {
-      for (int k = 0; termination_data[k] != NULL; ++k) {
+  for (int i = 0; context_data[i][0] != nullptr; ++i) {
+    for (int j = 0; statement_data[j] != nullptr; ++j) {
+      for (int k = 0; termination_data[k] != nullptr; ++k) {
         int kPrefixLen = i::StrLength(context_data[i][0]);
         int kStatementLen = i::StrLength(statement_data[j]);
         int kTerminationLen = i::StrLength(termination_data[k]);
@@ -1568,8 +1558,8 @@
             statement_data[j],
             termination_data[k],
             context_data[i][1]);
-        CHECK(length == kProgramSize);
-        TestParserSync(program.start(), NULL, 0);
+        CHECK_EQ(length, kProgramSize);
+        TestParserSync(program.start(), nullptr, 0);
       }
     }
   }
@@ -1577,8 +1567,8 @@
   // Neither Harmony numeric literals nor our natives syntax have any
   // interaction with the flags above, so test these separately to reduce
   // the combinatorial explosion.
-  TestParserSync("0o1234", NULL, 0);
-  TestParserSync("0b1011", NULL, 0);
+  TestParserSync("0o1234", nullptr, 0);
+  TestParserSync("0b1011", nullptr, 0);
 
   static const ParserFlag flags3[] = { kAllowNatives };
   TestParserSync("%DebugPrint(123)", flags3, arraysize(flags3));
@@ -1611,9 +1601,9 @@
 
 void RunParserSyncTest(
     const char* context_data[][2], const char* statement_data[],
-    ParserSyncTestResult result, const ParserFlag* flags = NULL,
-    int flags_len = 0, const ParserFlag* always_true_flags = NULL,
-    int always_true_len = 0, const ParserFlag* always_false_flags = NULL,
+    ParserSyncTestResult result, const ParserFlag* flags = nullptr,
+    int flags_len = 0, const ParserFlag* always_true_flags = nullptr,
+    int always_true_len = 0, const ParserFlag* always_false_flags = nullptr,
     int always_false_len = 0, bool is_module = false,
     bool test_preparser = true, bool ignore_error_msg = false) {
   v8::HandleScope handles(CcTest::isolate());
@@ -1629,14 +1619,14 @@
     kAllowLazy,
     kAllowNatives,
   };
-  ParserFlag* generated_flags = NULL;
-  if (flags == NULL) {
+  ParserFlag* generated_flags = nullptr;
+  if (flags == nullptr) {
     flags = default_flags;
     flags_len = arraysize(default_flags);
-    if (always_true_flags != NULL || always_false_flags != NULL) {
+    if (always_true_flags != nullptr || always_false_flags != nullptr) {
       // Remove always_true/false_flags from default_flags (if present).
-      CHECK((always_true_flags != NULL) == (always_true_len > 0));
-      CHECK((always_false_flags != NULL) == (always_false_len > 0));
+      CHECK((always_true_flags != nullptr) == (always_true_len > 0));
+      CHECK((always_false_flags != nullptr) == (always_false_len > 0));
       generated_flags = new ParserFlag[flags_len + always_true_len];
       int flag_index = 0;
       for (int i = 0; i < flags_len; ++i) {
@@ -1653,8 +1643,8 @@
       flags = generated_flags;
     }
   }
-  for (int i = 0; context_data[i][0] != NULL; ++i) {
-    for (int j = 0; statement_data[j] != NULL; ++j) {
+  for (int i = 0; context_data[i][0] != nullptr; ++i) {
+    for (int j = 0; statement_data[j] != nullptr; ++j) {
       int kPrefixLen = i::StrLength(context_data[i][0]);
       int kStatementLen = i::StrLength(statement_data[j]);
       int kSuffixLen = i::StrLength(context_data[i][1]);
@@ -1667,7 +1657,7 @@
                                context_data[i][0],
                                statement_data[j],
                                context_data[i][1]);
-      CHECK(length == kProgramSize);
+      CHECK_EQ(length, kProgramSize);
       TestParserSync(program.start(), flags, flags_len, result,
                      always_true_flags, always_true_len, always_false_flags,
                      always_false_len, is_module, test_preparser,
@@ -1679,9 +1669,9 @@
 
 void RunModuleParserSyncTest(
     const char* context_data[][2], const char* statement_data[],
-    ParserSyncTestResult result, const ParserFlag* flags = NULL,
-    int flags_len = 0, const ParserFlag* always_true_flags = NULL,
-    int always_true_len = 0, const ParserFlag* always_false_flags = NULL,
+    ParserSyncTestResult result, const ParserFlag* flags = nullptr,
+    int flags_len = 0, const ParserFlag* always_true_flags = nullptr,
+    int always_true_len = 0, const ParserFlag* always_false_flags = nullptr,
     int always_false_len = 0, bool test_preparser = true,
     bool ignore_error_msg = false) {
   RunParserSyncTest(context_data, statement_data, result, flags, flags_len,
@@ -1698,35 +1688,33 @@
   const char* context_data[][2] = {
       {"\"use strict\";", ""},
       {"var eval; function test_func() {\"use strict\"; ", "}"},
-      {NULL, NULL}};
+      {nullptr, nullptr}};
 
-  const char* statement_data[] = {
-    "var eval;",
-    "var arguments",
-    "var foo, eval;",
-    "var foo, arguments;",
-    "try { } catch (eval) { }",
-    "try { } catch (arguments) { }",
-    "function eval() { }",
-    "function arguments() { }",
-    "function foo(eval) { }",
-    "function foo(arguments) { }",
-    "function foo(bar, eval) { }",
-    "function foo(bar, arguments) { }",
-    "(eval) => { }",
-    "(arguments) => { }",
-    "(foo, eval) => { }",
-    "(foo, arguments) => { }",
-    "eval = 1;",
-    "arguments = 1;",
-    "var foo = eval = 1;",
-    "var foo = arguments = 1;",
-    "++eval;",
-    "++arguments;",
-    "eval++;",
-    "arguments++;",
-    NULL
-  };
+  const char* statement_data[] = {"var eval;",
+                                  "var arguments",
+                                  "var foo, eval;",
+                                  "var foo, arguments;",
+                                  "try { } catch (eval) { }",
+                                  "try { } catch (arguments) { }",
+                                  "function eval() { }",
+                                  "function arguments() { }",
+                                  "function foo(eval) { }",
+                                  "function foo(arguments) { }",
+                                  "function foo(bar, eval) { }",
+                                  "function foo(bar, arguments) { }",
+                                  "(eval) => { }",
+                                  "(arguments) => { }",
+                                  "(foo, eval) => { }",
+                                  "(foo, arguments) => { }",
+                                  "eval = 1;",
+                                  "arguments = 1;",
+                                  "var foo = eval = 1;",
+                                  "var foo = arguments = 1;",
+                                  "++eval;",
+                                  "++arguments;",
+                                  "eval++;",
+                                  "arguments++;",
+                                  nullptr};
 
   RunParserSyncTest(context_data, statement_data, kError);
 }
@@ -1736,34 +1724,29 @@
   // Tests that both preparsing and parsing accept "eval" and "arguments" as
   // identifiers when needed.
   const char* context_data[][2] = {
-    { "", "" },
-    { "function test_func() {", "}"},
-    { NULL, NULL }
-  };
+      {"", ""}, {"function test_func() {", "}"}, {nullptr, nullptr}};
 
-  const char* statement_data[] = {
-    "var eval;",
-    "var arguments",
-    "var foo, eval;",
-    "var foo, arguments;",
-    "try { } catch (eval) { }",
-    "try { } catch (arguments) { }",
-    "function eval() { }",
-    "function arguments() { }",
-    "function foo(eval) { }",
-    "function foo(arguments) { }",
-    "function foo(bar, eval) { }",
-    "function foo(bar, arguments) { }",
-    "eval = 1;",
-    "arguments = 1;",
-    "var foo = eval = 1;",
-    "var foo = arguments = 1;",
-    "++eval;",
-    "++arguments;",
-    "eval++;",
-    "arguments++;",
-    NULL
-  };
+  const char* statement_data[] = {"var eval;",
+                                  "var arguments",
+                                  "var foo, eval;",
+                                  "var foo, arguments;",
+                                  "try { } catch (eval) { }",
+                                  "try { } catch (arguments) { }",
+                                  "function eval() { }",
+                                  "function arguments() { }",
+                                  "function foo(eval) { }",
+                                  "function foo(arguments) { }",
+                                  "function foo(bar, eval) { }",
+                                  "function foo(bar, arguments) { }",
+                                  "eval = 1;",
+                                  "arguments = 1;",
+                                  "var foo = eval = 1;",
+                                  "var foo = arguments = 1;",
+                                  "++eval;",
+                                  "++arguments;",
+                                  "eval++;",
+                                  "arguments++;",
+                                  nullptr};
 
   RunParserSyncTest(context_data, statement_data, kSuccess);
 }
@@ -1771,23 +1754,20 @@
 
 TEST(NoErrorsEvalAndArgumentsStrict) {
   const char* context_data[][2] = {
-    { "\"use strict\";", "" },
-    { "function test_func() { \"use strict\";", "}" },
-    { "() => { \"use strict\"; ", "}" },
-    { NULL, NULL }
-  };
+      {"\"use strict\";", ""},
+      {"function test_func() { \"use strict\";", "}"},
+      {"() => { \"use strict\"; ", "}"},
+      {nullptr, nullptr}};
 
-  const char* statement_data[] = {
-    "eval;",
-    "arguments;",
-    "var foo = eval;",
-    "var foo = arguments;",
-    "var foo = { eval: 1 };",
-    "var foo = { arguments: 1 };",
-    "var foo = { }; foo.eval = {};",
-    "var foo = { }; foo.arguments = {};",
-    NULL
-  };
+  const char* statement_data[] = {"eval;",
+                                  "arguments;",
+                                  "var foo = eval;",
+                                  "var foo = arguments;",
+                                  "var foo = { eval: 1 };",
+                                  "var foo = { arguments: 1 };",
+                                  "var foo = { }; foo.eval = {};",
+                                  "var foo = { }; foo.arguments = {};",
+                                  nullptr};
 
   RunParserSyncTest(context_data, statement_data, kSuccess);
 }
@@ -1849,13 +1829,13 @@
   const char* strict_contexts[][2] = {
       {"function test_func() {\"use strict\"; ", "}"},
       {"() => { \"use strict\"; ", "}"},
-      {NULL, NULL}};
+      {nullptr, nullptr}};
 
   // clang-format off
   const char* statement_data[] {
     LIMITED_FUTURE_STRICT_RESERVED_WORDS(FUTURE_STRICT_RESERVED_STATEMENTS)
     LIMITED_FUTURE_STRICT_RESERVED_WORDS(FUTURE_STRICT_RESERVED_LEX_BINDINGS)
-    NULL
+    nullptr
   };
   // clang-format on
 
@@ -1869,9 +1849,9 @@
   const char* non_strict_contexts[][2] = {{"", ""},
                                           {"function test_func() {", "}"},
                                           {"() => {", "}"},
-                                          {NULL, NULL}};
-  const char* invalid_statements[] = {FUTURE_STRICT_RESERVED_LEX_BINDINGS("let")
-                                          NULL};
+                                          {nullptr, nullptr}};
+  const char* invalid_statements[] = {
+      FUTURE_STRICT_RESERVED_LEX_BINDINGS("let") nullptr};
 
   RunParserSyncTest(non_strict_contexts, invalid_statements, kError);
 }
@@ -1880,18 +1860,16 @@
 
 
 TEST(NoErrorsFutureStrictReservedWords) {
-  const char* context_data[][2] = {
-    { "", "" },
-    { "function test_func() {", "}"},
-    { "() => {", "}" },
-    { NULL, NULL }
-  };
+  const char* context_data[][2] = {{"", ""},
+                                   {"function test_func() {", "}"},
+                                   {"() => {", "}"},
+                                   {nullptr, nullptr}};
 
   // clang-format off
   const char* statement_data[] = {
     FUTURE_STRICT_RESERVED_WORDS(FUTURE_STRICT_RESERVED_STATEMENTS)
     FUTURE_STRICT_RESERVED_WORDS_NO_LET(FUTURE_STRICT_RESERVED_LEX_BINDINGS)
-    NULL
+    nullptr
   };
   // clang-format on
 
@@ -1904,31 +1882,28 @@
   // using future reserved words as identifiers. These tests don't depend on the
   // strict mode.
   const char* context_data[][2] = {
-    { "", "" },
-    { "\"use strict\";", "" },
-    { "var eval; function test_func() {", "}"},
-    { "var eval; function test_func() {\"use strict\"; ", "}"},
-    { "var eval; () => {", "}"},
-    { "var eval; () => {\"use strict\"; ", "}"},
-    { NULL, NULL }
-  };
+      {"", ""},
+      {"\"use strict\";", ""},
+      {"var eval; function test_func() {", "}"},
+      {"var eval; function test_func() {\"use strict\"; ", "}"},
+      {"var eval; () => {", "}"},
+      {"var eval; () => {\"use strict\"; ", "}"},
+      {nullptr, nullptr}};
 
-  const char* statement_data[] = {
-    "var super;",
-    "var foo, super;",
-    "try { } catch (super) { }",
-    "function super() { }",
-    "function foo(super) { }",
-    "function foo(bar, super) { }",
-    "(super) => { }",
-    "(bar, super) => { }",
-    "super = 1;",
-    "var foo = super = 1;",
-    "++super;",
-    "super++;",
-    "function foo super",
-    NULL
-  };
+  const char* statement_data[] = {"var super;",
+                                  "var foo, super;",
+                                  "try { } catch (super) { }",
+                                  "function super() { }",
+                                  "function foo(super) { }",
+                                  "function foo(bar, super) { }",
+                                  "(super) => { }",
+                                  "(bar, super) => { }",
+                                  "super = 1;",
+                                  "var foo = super = 1;",
+                                  "++super;",
+                                  "super++;",
+                                  "function foo super",
+                                  nullptr};
 
   RunParserSyncTest(context_data, statement_data, kError);
 }
@@ -1936,12 +1911,10 @@
 
 TEST(NoErrorsLetSloppyAllModes) {
   // In sloppy mode, it's okay to use "let" as identifier.
-  const char* context_data[][2] = {
-    { "", "" },
-    { "function f() {", "}" },
-    { "(function f() {", "})" },
-    { NULL, NULL }
-  };
+  const char* context_data[][2] = {{"", ""},
+                                   {"function f() {", "}"},
+                                   {"(function f() {", "})"},
+                                   {nullptr, nullptr}};
 
   const char* statement_data[] = {
       "var let;",
@@ -1963,7 +1936,7 @@
       "let(100)",
       "L: let\nx",
       "L: let\n{x}",
-      NULL};
+      nullptr};
 
   RunParserSyncTest(context_data, statement_data, kSuccess);
 }
@@ -1972,34 +1945,31 @@
 TEST(NoErrorsYieldSloppyAllModes) {
   // In sloppy mode, it's okay to use "yield" as identifier, *except* inside a
   // generator (see other test).
-  const char* context_data[][2] = {
-    { "", "" },
-    { "function not_gen() {", "}" },
-    { "(function not_gen() {", "})" },
-    { NULL, NULL }
-  };
+  const char* context_data[][2] = {{"", ""},
+                                   {"function not_gen() {", "}"},
+                                   {"(function not_gen() {", "})"},
+                                   {nullptr, nullptr}};
 
   const char* statement_data[] = {
-    "var yield;",
-    "var foo, yield;",
-    "try { } catch (yield) { }",
-    "function yield() { }",
-    "(function yield() { })",
-    "function foo(yield) { }",
-    "function foo(bar, yield) { }",
-    "yield = 1;",
-    "var foo = yield = 1;",
-    "yield * 2;",
-    "++yield;",
-    "yield++;",
-    "yield: 34",
-    "function yield(yield) { yield: yield (yield + yield(0)); }",
-    "({ yield: 1 })",
-    "({ get yield() { 1 } })",
-    "yield(100)",
-    "yield[100]",
-    NULL
-  };
+      "var yield;",
+      "var foo, yield;",
+      "try { } catch (yield) { }",
+      "function yield() { }",
+      "(function yield() { })",
+      "function foo(yield) { }",
+      "function foo(bar, yield) { }",
+      "yield = 1;",
+      "var foo = yield = 1;",
+      "yield * 2;",
+      "++yield;",
+      "yield++;",
+      "yield: 34",
+      "function yield(yield) { yield: yield (yield + yield(0)); }",
+      "({ yield: 1 })",
+      "({ get yield() { 1 } })",
+      "yield(100)",
+      "yield[100]",
+      nullptr};
 
   RunParserSyncTest(context_data, statement_data, kSuccess);
 }
@@ -2009,36 +1979,34 @@
   // In sloppy mode, it's okay to use "yield" as identifier, *except* inside a
   // generator (see next test).
   const char* context_data[][2] = {
-    { "", "" },
-    { "function not_gen() {", "}" },
-    { "function * gen() { function not_gen() {", "} }" },
-    { "(function not_gen() {", "})" },
-    { "(function * gen() { (function not_gen() {", "}) })" },
-    { NULL, NULL }
-  };
+      {"", ""},
+      {"function not_gen() {", "}"},
+      {"function * gen() { function not_gen() {", "} }"},
+      {"(function not_gen() {", "})"},
+      {"(function * gen() { (function not_gen() {", "}) })"},
+      {nullptr, nullptr}};
 
   const char* statement_data[] = {
-    "var yield;",
-    "var foo, yield;",
-    "try { } catch (yield) { }",
-    "function yield() { }",
-    "(function yield() { })",
-    "function foo(yield) { }",
-    "function foo(bar, yield) { }",
-    "function * yield() { }",
-    "yield = 1;",
-    "var foo = yield = 1;",
-    "yield * 2;",
-    "++yield;",
-    "yield++;",
-    "yield: 34",
-    "function yield(yield) { yield: yield (yield + yield(0)); }",
-    "({ yield: 1 })",
-    "({ get yield() { 1 } })",
-    "yield(100)",
-    "yield[100]",
-    NULL
-  };
+      "var yield;",
+      "var foo, yield;",
+      "try { } catch (yield) { }",
+      "function yield() { }",
+      "(function yield() { })",
+      "function foo(yield) { }",
+      "function foo(bar, yield) { }",
+      "function * yield() { }",
+      "yield = 1;",
+      "var foo = yield = 1;",
+      "yield * 2;",
+      "++yield;",
+      "yield++;",
+      "yield: 34",
+      "function yield(yield) { yield: yield (yield + yield(0)); }",
+      "({ yield: 1 })",
+      "({ get yield() { 1 } })",
+      "yield(100)",
+      "yield[100]",
+      nullptr};
 
   RunParserSyncTest(context_data, statement_data, kSuccess);
 }
@@ -2053,42 +2021,35 @@
       {"\"use strict\"; (function not_gen() {", "})"},
       {"\"use strict\"; (function * gen() { (function not_gen() {", "}) })"},
       {"() => {\"use strict\"; ", "}"},
-      {NULL, NULL}};
+      {nullptr, nullptr}};
 
-  const char* statement_data[] = {
-    "var yield;",
-    "var foo, yield;",
-    "try { } catch (yield) { }",
-    "function yield() { }",
-    "(function yield() { })",
-    "function foo(yield) { }",
-    "function foo(bar, yield) { }",
-    "function * yield() { }",
-    "(function * yield() { })",
-    "yield = 1;",
-    "var foo = yield = 1;",
-    "++yield;",
-    "yield++;",
-    "yield: 34;",
-    NULL
-  };
+  const char* statement_data[] = {"var yield;",
+                                  "var foo, yield;",
+                                  "try { } catch (yield) { }",
+                                  "function yield() { }",
+                                  "(function yield() { })",
+                                  "function foo(yield) { }",
+                                  "function foo(bar, yield) { }",
+                                  "function * yield() { }",
+                                  "(function * yield() { })",
+                                  "yield = 1;",
+                                  "var foo = yield = 1;",
+                                  "++yield;",
+                                  "yield++;",
+                                  "yield: 34;",
+                                  nullptr};
 
   RunParserSyncTest(context_data, statement_data, kError);
 }
 
 
 TEST(ErrorsYieldSloppy) {
-  const char* context_data[][2] = {
-    { "", "" },
-    { "function not_gen() {", "}" },
-    { "(function not_gen() {", "})" },
-    { NULL, NULL }
-  };
+  const char* context_data[][2] = {{"", ""},
+                                   {"function not_gen() {", "}"},
+                                   {"(function not_gen() {", "})"},
+                                   {nullptr, nullptr}};
 
-  const char* statement_data[] = {
-    "(function * yield() { })",
-    NULL
-  };
+  const char* statement_data[] = {"(function * yield() { })", nullptr};
 
   RunParserSyncTest(context_data, statement_data, kError);
 }
@@ -2100,7 +2061,7 @@
     { "function * gen() {", "}" },
     { "(function * gen() {", "})" },
     { "(function * () {", "})" },
-    { NULL, NULL }
+    { nullptr, nullptr }
   };
 
   const char* statement_data[] = {
@@ -2154,7 +2115,7 @@
     "x = class extends f(yield) {}",
     "x = class extends (null, yield) { }",
     "x = class extends (a ? null : yield) { }",
-    NULL
+    nullptr
   };
   // clang-format on
 
@@ -2167,7 +2128,7 @@
   const char* context_data[][2] = {
     { "function * gen() {", "}" },
     { "\"use strict\"; function * gen() {", "}" },
-    { NULL, NULL }
+    { nullptr, nullptr }
   };
 
   const char* statement_data[] = {
@@ -2219,7 +2180,7 @@
     "for (yield 'x' in {} in {});",
     "for (yield 'x' in {} of {});",
     "class C extends yield { }",
-    NULL
+    nullptr
   };
   // clang-format on
 
@@ -2230,60 +2191,37 @@
 TEST(ErrorsNameOfStrictFunction) {
   // Tests that illegal tokens as names of a strict function produce the correct
   // errors.
-  const char* context_data[][2] = {
-    { "function ", ""},
-    { "\"use strict\"; function", ""},
-    { "function * ", ""},
-    { "\"use strict\"; function * ", ""},
-    { NULL, NULL }
-  };
+  const char* context_data[][2] = {{"function ", ""},
+                                   {"\"use strict\"; function", ""},
+                                   {"function * ", ""},
+                                   {"\"use strict\"; function * ", ""},
+                                   {nullptr, nullptr}};
 
   const char* statement_data[] = {
-    "eval() {\"use strict\";}",
-    "arguments() {\"use strict\";}",
-    "interface() {\"use strict\";}",
-    "yield() {\"use strict\";}",
-    // Future reserved words are always illegal
-    "super() { }",
-    "super() {\"use strict\";}",
-    NULL
-  };
+      "eval() {\"use strict\";}", "arguments() {\"use strict\";}",
+      "interface() {\"use strict\";}", "yield() {\"use strict\";}",
+      // Future reserved words are always illegal
+      "super() { }", "super() {\"use strict\";}", nullptr};
 
   RunParserSyncTest(context_data, statement_data, kError);
 }
 
 
 TEST(NoErrorsNameOfStrictFunction) {
-  const char* context_data[][2] = {
-    { "function ", ""},
-    { NULL, NULL }
-  };
+  const char* context_data[][2] = {{"function ", ""}, {nullptr, nullptr}};
 
-  const char* statement_data[] = {
-    "eval() { }",
-    "arguments() { }",
-    "interface() { }",
-    "yield() { }",
-    NULL
-  };
+  const char* statement_data[] = {"eval() { }", "arguments() { }",
+                                  "interface() { }", "yield() { }", nullptr};
 
   RunParserSyncTest(context_data, statement_data, kSuccess);
 }
 
 
 TEST(NoErrorsNameOfStrictGenerator) {
-  const char* context_data[][2] = {
-    { "function * ", ""},
-    { NULL, NULL }
-  };
+  const char* context_data[][2] = {{"function * ", ""}, {nullptr, nullptr}};
 
-  const char* statement_data[] = {
-    "eval() { }",
-    "arguments() { }",
-    "interface() { }",
-    "yield() { }",
-    NULL
-  };
+  const char* statement_data[] = {"eval() { }", "arguments() { }",
+                                  "interface() { }", "yield() { }", nullptr};
 
   RunParserSyncTest(context_data, statement_data, kSuccess);
 }
@@ -2291,17 +2229,13 @@
 
 TEST(ErrorsIllegalWordsAsLabelsSloppy) {
   // Using future reserved words as labels is always an error.
-  const char* context_data[][2] = {
-    { "", ""},
-    { "function test_func() {", "}" },
-    { "() => {", "}" },
-    { NULL, NULL }
-  };
+  const char* context_data[][2] = {{"", ""},
+                                   {"function test_func() {", "}"},
+                                   {"() => {", "}"},
+                                   {nullptr, nullptr}};
 
-  const char* statement_data[] = {
-    "super: while(true) { break super; }",
-    NULL
-  };
+  const char* statement_data[] = {"super: while(true) { break super; }",
+                                  nullptr};
 
   RunParserSyncTest(context_data, statement_data, kError);
 }
@@ -2313,14 +2247,12 @@
       {"\"use strict\";", ""},
       {"function test_func() {\"use strict\"; ", "}"},
       {"() => {\"use strict\"; ", "}"},
-      {NULL, NULL}};
+      {nullptr, nullptr}};
 
 #define LABELLED_WHILE(NAME) #NAME ": while (true) { break " #NAME "; }",
   const char* statement_data[] = {
-    "super: while(true) { break super; }",
-    FUTURE_STRICT_RESERVED_WORDS(LABELLED_WHILE)
-    NULL
-  };
+      "super: while(true) { break super; }",
+      FUTURE_STRICT_RESERVED_WORDS(LABELLED_WHILE) nullptr};
 #undef LABELLED_WHILE
 
   RunParserSyncTest(context_data, statement_data, kError);
@@ -2330,39 +2262,32 @@
 TEST(NoErrorsIllegalWordsAsLabels) {
   // Using eval and arguments as labels is legal even in strict mode.
   const char* context_data[][2] = {
-    { "", ""},
-    { "function test_func() {", "}" },
-    { "() => {", "}" },
-    { "\"use strict\";", "" },
-    { "\"use strict\"; function test_func() {", "}" },
-    { "\"use strict\"; () => {", "}" },
-    { NULL, NULL }
-  };
+      {"", ""},
+      {"function test_func() {", "}"},
+      {"() => {", "}"},
+      {"\"use strict\";", ""},
+      {"\"use strict\"; function test_func() {", "}"},
+      {"\"use strict\"; () => {", "}"},
+      {nullptr, nullptr}};
 
-  const char* statement_data[] = {
-    "mylabel: while(true) { break mylabel; }",
-    "eval: while(true) { break eval; }",
-    "arguments: while(true) { break arguments; }",
-    NULL
-  };
+  const char* statement_data[] = {"mylabel: while(true) { break mylabel; }",
+                                  "eval: while(true) { break eval; }",
+                                  "arguments: while(true) { break arguments; }",
+                                  nullptr};
 
   RunParserSyncTest(context_data, statement_data, kSuccess);
 }
 
 
 TEST(NoErrorsFutureStrictReservedAsLabelsSloppy) {
-  const char* context_data[][2] = {
-    { "", ""},
-    { "function test_func() {", "}" },
-    { "() => {", "}" },
-    { NULL, NULL }
-  };
+  const char* context_data[][2] = {{"", ""},
+                                   {"function test_func() {", "}"},
+                                   {"() => {", "}"},
+                                   {nullptr, nullptr}};
 
 #define LABELLED_WHILE(NAME) #NAME ": while (true) { break " #NAME "; }",
-  const char* statement_data[] {
-    FUTURE_STRICT_RESERVED_WORDS(LABELLED_WHILE)
-    NULL
-  };
+  const char* statement_data[]{
+      FUTURE_STRICT_RESERVED_WORDS(LABELLED_WHILE) nullptr};
 #undef LABELLED_WHILE
 
   RunParserSyncTest(context_data, statement_data, kSuccess);
@@ -2371,17 +2296,13 @@
 
 TEST(ErrorsParenthesizedLabels) {
   // Parenthesized identifiers shouldn't be recognized as labels.
-  const char* context_data[][2] = {
-    { "", ""},
-    { "function test_func() {", "}" },
-    { "() => {", "}" },
-    { NULL, NULL }
-  };
+  const char* context_data[][2] = {{"", ""},
+                                   {"function test_func() {", "}"},
+                                   {"() => {", "}"},
+                                   {nullptr, nullptr}};
 
-  const char* statement_data[] = {
-    "(mylabel): while(true) { break mylabel; }",
-    NULL
-  };
+  const char* statement_data[] = {"(mylabel): while(true) { break mylabel; }",
+                                  nullptr};
 
   RunParserSyncTest(context_data, statement_data, kError);
 }
@@ -2389,15 +2310,9 @@
 
 TEST(NoErrorsParenthesizedDirectivePrologue) {
   // Parenthesized directive prologue shouldn't be recognized.
-  const char* context_data[][2] = {
-    { "", ""},
-    { NULL, NULL }
-  };
+  const char* context_data[][2] = {{"", ""}, {nullptr, nullptr}};
 
-  const char* statement_data[] = {
-    "(\"use strict\"); var eval;",
-    NULL
-  };
+  const char* statement_data[] = {"(\"use strict\"); var eval;", nullptr};
 
   RunParserSyncTest(context_data, statement_data, kSuccess);
 }
@@ -2405,20 +2320,15 @@
 
 TEST(ErrorsNotAnIdentifierName) {
   const char* context_data[][2] = {
-    { "", ""},
-    { "\"use strict\";", ""},
-    { NULL, NULL }
-  };
+      {"", ""}, {"\"use strict\";", ""}, {nullptr, nullptr}};
 
-  const char* statement_data[] = {
-    "var foo = {}; foo.{;",
-    "var foo = {}; foo.};",
-    "var foo = {}; foo.=;",
-    "var foo = {}; foo.888;",
-    "var foo = {}; foo.-;",
-    "var foo = {}; foo.--;",
-    NULL
-  };
+  const char* statement_data[] = {"var foo = {}; foo.{;",
+                                  "var foo = {}; foo.};",
+                                  "var foo = {}; foo.=;",
+                                  "var foo = {}; foo.888;",
+                                  "var foo = {}; foo.-;",
+                                  "var foo = {}; foo.--;",
+                                  nullptr};
 
   RunParserSyncTest(context_data, statement_data, kError);
 }
@@ -2427,20 +2337,15 @@
 TEST(NoErrorsIdentifierNames) {
   // Keywords etc. are valid as property names.
   const char* context_data[][2] = {
-    { "", ""},
-    { "\"use strict\";", ""},
-    { NULL, NULL }
-  };
+      {"", ""}, {"\"use strict\";", ""}, {nullptr, nullptr}};
 
-  const char* statement_data[] = {
-    "var foo = {}; foo.if;",
-    "var foo = {}; foo.yield;",
-    "var foo = {}; foo.super;",
-    "var foo = {}; foo.interface;",
-    "var foo = {}; foo.eval;",
-    "var foo = {}; foo.arguments;",
-    NULL
-  };
+  const char* statement_data[] = {"var foo = {}; foo.if;",
+                                  "var foo = {}; foo.yield;",
+                                  "var foo = {}; foo.super;",
+                                  "var foo = {}; foo.interface;",
+                                  "var foo = {}; foo.eval;",
+                                  "var foo = {}; foo.arguments;",
+                                  nullptr};
 
   RunParserSyncTest(context_data, statement_data, kSuccess);
 }
@@ -2461,19 +2366,20 @@
     const char* program;
     int functions;
   } test_cases[] = {
-    // No functions.
-    {"var x = 42;", 0},
-    // Functions.
-    {"function foo() {}", 1},
-    {"function foo() {} function bar() {}", 2},
-    // Getter / setter functions are recorded as functions if they're on the top
-    // level.
-    {"var x = {get foo(){} };", 1},
-    // Functions insize lazy functions are not recorded.
-    {"function lazy() { function a() {} function b() {} function c() {} }", 1},
-    {"function lazy() { var x = {get foo(){} } }", 1},
-    {NULL, 0}
-  };
+      // No functions.
+      {"var x = 42;", 0},
+      // Functions.
+      {"function foo() {}", 1},
+      {"function foo() {} function bar() {}", 2},
+      // Getter / setter functions are recorded as functions if they're on the
+      // top
+      // level.
+      {"var x = {get foo(){} };", 1},
+      // Functions insize lazy functions are not recorded.
+      {"function lazy() { function a() {} function b() {} function c() {} }",
+       1},
+      {"function lazy() { var x = {get foo(){} } }", 1},
+      {nullptr, 0}};
 
   for (int i = 0; test_cases[i].program; i++) {
     const char* program = test_cases[i].program;
@@ -2482,19 +2388,18 @@
         factory->NewStringFromUtf8(i::CStrVector(program)).ToHandleChecked();
     i::Handle<i::Script> script = factory->NewScript(source);
     i::ParseInfo info(script);
-    i::ScriptData* sd = NULL;
+    i::ScriptData* sd = nullptr;
     info.set_cached_data(&sd);
     info.set_compile_options(v8::ScriptCompiler::kProduceParserCache);
     i::parsing::ParseProgram(&info, CcTest::i_isolate());
     i::ParseData* pd = i::ParseData::FromCachedData(sd);
 
     if (pd->FunctionCount() != test_cases[i].functions) {
-      v8::base::OS::Print(
+      FATAL(
           "Expected preparse data for program:\n"
           "\t%s\n"
           "to contain %d functions, however, received %d functions.\n",
           program, test_cases[i].functions, pd->FunctionCount());
-      CHECK(false);
     }
     delete sd;
     delete pd;
@@ -2507,32 +2412,24 @@
   // itself strict (we cannot produce there errors as soon as we see the
   // offending identifiers, because we don't know at that point whether the
   // function is strict or not).
-  const char* context_data[][2] = {
-    {"function eval() {", "}"},
-    {"function arguments() {", "}"},
-    {"function yield() {", "}"},
-    {"function interface() {", "}"},
-    {"function foo(eval) {", "}"},
-    {"function foo(arguments) {", "}"},
-    {"function foo(yield) {", "}"},
-    {"function foo(interface) {", "}"},
-    {"function foo(bar, eval) {", "}"},
-    {"function foo(bar, arguments) {", "}"},
-    {"function foo(bar, yield) {", "}"},
-    {"function foo(bar, interface) {", "}"},
-    {"function foo(bar, bar) {", "}"},
-    { NULL, NULL }
-  };
+  const char* context_data[][2] = {{"function eval() {", "}"},
+                                   {"function arguments() {", "}"},
+                                   {"function yield() {", "}"},
+                                   {"function interface() {", "}"},
+                                   {"function foo(eval) {", "}"},
+                                   {"function foo(arguments) {", "}"},
+                                   {"function foo(yield) {", "}"},
+                                   {"function foo(interface) {", "}"},
+                                   {"function foo(bar, eval) {", "}"},
+                                   {"function foo(bar, arguments) {", "}"},
+                                   {"function foo(bar, yield) {", "}"},
+                                   {"function foo(bar, interface) {", "}"},
+                                   {"function foo(bar, bar) {", "}"},
+                                   {nullptr, nullptr}};
 
-  const char* strict_statement_data[] = {
-    "\"use strict\";",
-    NULL
-  };
+  const char* strict_statement_data[] = {"\"use strict\";", nullptr};
 
-  const char* non_strict_statement_data[] = {
-    ";",
-    NULL
-  };
+  const char* non_strict_statement_data[] = {";", nullptr};
 
   RunParserSyncTest(context_data, strict_statement_data, kError);
   RunParserSyncTest(context_data, non_strict_statement_data, kSuccess);
@@ -2540,67 +2437,100 @@
 
 
 TEST(ErrorsTryWithoutCatchOrFinally) {
-  const char* context_data[][2] = {
-    {"", ""},
-    { NULL, NULL }
-  };
+  const char* context_data[][2] = {{"", ""}, {nullptr, nullptr}};
 
   const char* statement_data[] = {
-    "try { }",
-    "try { } foo();",
-    "try { } catch (e) foo();",
-    "try { } catch { }",
-    "try { } finally foo();",
-    NULL
-  };
+      "try { }",           "try { } foo();",         "try { } catch (e) foo();",
+      "try { } catch { }", "try { } finally foo();", nullptr};
 
   RunParserSyncTest(context_data, statement_data, kError);
 }
 
 
 TEST(NoErrorsTryCatchFinally) {
-  const char* context_data[][2] = {
-    {"", ""},
-    { NULL, NULL }
-  };
+  const char* context_data[][2] = {{"", ""}, {nullptr, nullptr}};
 
-  const char* statement_data[] = {
-    "try { } catch (e) { }",
-    "try { } catch (e) { } finally { }",
-    "try { } finally { }",
-    NULL
-  };
+  const char* statement_data[] = {"try { } catch (e) { }",
+                                  "try { } catch (e) { } finally { }",
+                                  "try { } finally { }", nullptr};
 
   RunParserSyncTest(context_data, statement_data, kSuccess);
 }
 
-
-TEST(ErrorsRegexpLiteral) {
+TEST(OptionalCatchBinding) {
+  // clang-format off
   const char* context_data[][2] = {
-    {"var r = ", ""},
+    {"", ""},
+    {"'use strict';", ""},
+    {"try {", "} catch (e) { }"},
+    {"try {} catch (e) {", "}"},
+    {"try {", "} catch ({e}) { }"},
+    {"try {} catch ({e}) {", "}"},
+    {"function f() {", "}"},
     { NULL, NULL }
   };
 
   const char* statement_data[] = {
-    "/unterminated",
+    "try { } catch { }",
+    "try { } catch { } finally { }",
+    "try { let e; } catch { let e; }",
+    "try { let e; } catch { let e; } finally { let e; }",
     NULL
   };
+  // clang-format on
+
+  // No error with flag
+  static const ParserFlag flags[] = {kAllowHarmonyOptionalCatchBinding};
+  RunParserSyncTest(context_data, statement_data, kSuccess, NULL, 0, flags,
+                    arraysize(flags));
+
+  // Still an error without flag
+  RunParserSyncTest(context_data, statement_data, kError);
+}
+
+TEST(OptionalCatchBindingInDoExpression) {
+  // This is an edge case no otherwise hit: a catch scope in a parameter
+  // expression which needs its own scope.
+  // clang-format off
+  const char* context_data[][2] = {
+    {"((x = (eval(''), do {", "}))=>{})()"},
+    { NULL, NULL }
+  };
+
+  const char* statement_data[] = {
+    "try { } catch { }",
+    "try { } catch { } finally { }",
+    "try { let e; } catch { let e; }",
+    "try { let e; } catch { let e; } finally { let e; }",
+    NULL
+  };
+  // clang-format on
+
+  // No error with flag
+  static const ParserFlag do_and_catch_flags[] = {
+      kAllowHarmonyDoExpressions, kAllowHarmonyOptionalCatchBinding};
+  RunParserSyncTest(context_data, statement_data, kSuccess, NULL, 0,
+                    do_and_catch_flags, arraysize(do_and_catch_flags));
+
+  // Still an error without flag
+  static const ParserFlag do_flag[] = {kAllowHarmonyDoExpressions};
+  RunParserSyncTest(context_data, statement_data, kError, NULL, 0, do_flag,
+                    arraysize(do_flag));
+}
+
+TEST(ErrorsRegexpLiteral) {
+  const char* context_data[][2] = {{"var r = ", ""}, {nullptr, nullptr}};
+
+  const char* statement_data[] = {"/unterminated", nullptr};
 
   RunParserSyncTest(context_data, statement_data, kError);
 }
 
 
 TEST(NoErrorsRegexpLiteral) {
-  const char* context_data[][2] = {
-    {"var r = ", ""},
-    { NULL, NULL }
-  };
+  const char* context_data[][2] = {{"var r = ", ""}, {nullptr, nullptr}};
 
-  const char* statement_data[] = {
-    "/foo/",
-    "/foo/g",
-    NULL
-  };
+  const char* statement_data[] = {"/foo/", "/foo/g", nullptr};
 
   RunParserSyncTest(context_data, statement_data, kSuccess);
 }
@@ -2608,38 +2538,24 @@
 
 TEST(NoErrorsNewExpression) {
   const char* context_data[][2] = {
-    {"", ""},
-    {"var f =", ""},
-    { NULL, NULL }
-  };
+      {"", ""}, {"var f =", ""}, {nullptr, nullptr}};
 
   const char* statement_data[] = {
-    "new foo",
-    "new foo();",
-    "new foo(1);",
-    "new foo(1, 2);",
-    // The first () will be processed as a part of the NewExpression and the
-    // second () will be processed as part of LeftHandSideExpression.
-    "new foo()();",
-    // The first () will be processed as a part of the inner NewExpression and
-    // the second () will be processed as a part of the outer NewExpression.
-    "new new foo()();",
-    "new foo.bar;",
-    "new foo.bar();",
-    "new foo.bar.baz;",
-    "new foo.bar().baz;",
-    "new foo[bar];",
-    "new foo[bar]();",
-    "new foo[bar][baz];",
-    "new foo[bar]()[baz];",
-    "new foo[bar].baz(baz)()[bar].baz;",
-    "new \"foo\"",  // Runtime error
-    "new 1",  // Runtime error
-    // This even runs:
-    "(new new Function(\"this.x = 1\")).x;",
-    "new new Test_Two(String, 2).v(0123).length;",
-    NULL
-  };
+      "new foo", "new foo();", "new foo(1);", "new foo(1, 2);",
+      // The first () will be processed as a part of the NewExpression and the
+      // second () will be processed as part of LeftHandSideExpression.
+      "new foo()();",
+      // The first () will be processed as a part of the inner NewExpression and
+      // the second () will be processed as a part of the outer NewExpression.
+      "new new foo()();", "new foo.bar;", "new foo.bar();", "new foo.bar.baz;",
+      "new foo.bar().baz;", "new foo[bar];", "new foo[bar]();",
+      "new foo[bar][baz];", "new foo[bar]()[baz];",
+      "new foo[bar].baz(baz)()[bar].baz;",
+      "new \"foo\"",  // Runtime error
+      "new 1",        // Runtime error
+      // This even runs:
+      "(new new Function(\"this.x = 1\")).x;",
+      "new new Test_Two(String, 2).v(0123).length;", nullptr};
 
   RunParserSyncTest(context_data, statement_data, kSuccess);
 }
@@ -2647,43 +2563,29 @@
 
 TEST(ErrorsNewExpression) {
   const char* context_data[][2] = {
-    {"", ""},
-    {"var f =", ""},
-    { NULL, NULL }
-  };
+      {"", ""}, {"var f =", ""}, {nullptr, nullptr}};
 
-  const char* statement_data[] = {
-    "new foo bar",
-    "new ) foo",
-    "new ++foo",
-    "new foo ++",
-    NULL
-  };
+  const char* statement_data[] = {"new foo bar", "new ) foo", "new ++foo",
+                                  "new foo ++", nullptr};
 
   RunParserSyncTest(context_data, statement_data, kError);
 }
 
 
 TEST(StrictObjectLiteralChecking) {
-  const char* context_data[][2] = {
-    {"\"use strict\"; var myobject = {", "};"},
-    {"\"use strict\"; var myobject = {", ",};"},
-    {"var myobject = {", "};"},
-    {"var myobject = {", ",};"},
-    { NULL, NULL }
-  };
+  const char* context_data[][2] = {{"\"use strict\"; var myobject = {", "};"},
+                                   {"\"use strict\"; var myobject = {", ",};"},
+                                   {"var myobject = {", "};"},
+                                   {"var myobject = {", ",};"},
+                                   {nullptr, nullptr}};
 
   // These are only errors in strict mode.
   const char* statement_data[] = {
-    "foo: 1, foo: 2",
-    "\"foo\": 1, \"foo\": 2",
-    "foo: 1, \"foo\": 2",
-    "1: 1, 1: 2",
-    "1: 1, \"1\": 2",
-    "get: 1, get: 2",  // Not a getter for real, just a property called get.
-    "set: 1, set: 2",  // Not a setter for real, just a property called set.
-    NULL
-  };
+      "foo: 1, foo: 2", "\"foo\": 1, \"foo\": 2", "foo: 1, \"foo\": 2",
+      "1: 1, 1: 2",     "1: 1, \"1\": 2",
+      "get: 1, get: 2",  // Not a getter for real, just a property called get.
+      "set: 1, set: 2",  // Not a setter for real, just a property called set.
+      nullptr};
 
   RunParserSyncTest(context_data, statement_data, kSuccess);
 }
@@ -2694,7 +2596,7 @@
   const char* context_data[][2] = {
     {"\"use strict\"; var myobject = {", "};"},
     {"var myobject = {", "};"},
-    { NULL, NULL }
+    { nullptr, nullptr }
   };
 
   const char* statement_data[] = {
@@ -2731,7 +2633,6 @@
     "static async get x : 0",
     "async static x(){}",
     "*async x(){}",
-    "async *x(){}",
     "async x*(){}",
     "async x : 0",
     "async 0 : 0",
@@ -2739,7 +2640,7 @@
     "async get *x(){}",
     "async set x(y){}",
     "async get : 0",
-    NULL
+    nullptr
   };
   // clang-format on
 
@@ -2754,7 +2655,7 @@
     {"var myobject = {", ",};"},
     {"\"use strict\"; var myobject = {", "};"},
     {"\"use strict\"; var myobject = {", ",};"},
-    { NULL, NULL }
+    { nullptr, nullptr }
   };
 
   const char* statement_data[] = {
@@ -2826,7 +2727,7 @@
     "async : 0",
     "async(){}",
     "*async(){}",
-    NULL
+    nullptr
   };
   // clang-format on
 
@@ -2835,10 +2736,7 @@
 
 
 TEST(TooManyArguments) {
-  const char* context_data[][2] = {
-    {"foo(", "0)"},
-    { NULL, NULL }
-  };
+  const char* context_data[][2] = {{"foo(", "0)"}, {nullptr, nullptr}};
 
   using v8::internal::Code;
   char statement[Code::kMaxArguments * 2 + 1];
@@ -2848,10 +2746,7 @@
   }
   statement[Code::kMaxArguments * 2] = 0;
 
-  const char* statement_data[] = {
-    statement,
-    NULL
-  };
+  const char* statement_data[] = {statement, nullptr};
 
   // The test is quite slow, so run it with a reduced set of flags.
   static const ParserFlag empty_flags[] = {kAllowLazy};
@@ -2861,46 +2756,31 @@
 
 TEST(StrictDelete) {
   // "delete <Identifier>" is not allowed in strict mode.
-  const char* strict_context_data[][2] = {
-    {"\"use strict\"; ", ""},
-    { NULL, NULL }
-  };
+  const char* strict_context_data[][2] = {{"\"use strict\"; ", ""},
+                                          {nullptr, nullptr}};
 
-  const char* sloppy_context_data[][2] = {
-    {"", ""},
-    { NULL, NULL }
-  };
+  const char* sloppy_context_data[][2] = {{"", ""}, {nullptr, nullptr}};
 
   // These are errors in the strict mode.
-  const char* sloppy_statement_data[] = {
-    "delete foo;",
-    "delete foo + 1;",
-    "delete (foo);",
-    "delete eval;",
-    "delete interface;",
-    NULL
-  };
+  const char* sloppy_statement_data[] = {"delete foo;",       "delete foo + 1;",
+                                         "delete (foo);",     "delete eval;",
+                                         "delete interface;", nullptr};
 
   // These are always OK
-  const char* good_statement_data[] = {
-    "delete this;",
-    "delete 1;",
-    "delete 1 + 2;",
-    "delete foo();",
-    "delete foo.bar;",
-    "delete foo[bar];",
-    "delete foo--;",
-    "delete --foo;",
-    "delete new foo();",
-    "delete new foo(bar);",
-    NULL
-  };
+  const char* good_statement_data[] = {"delete this;",
+                                       "delete 1;",
+                                       "delete 1 + 2;",
+                                       "delete foo();",
+                                       "delete foo.bar;",
+                                       "delete foo[bar];",
+                                       "delete foo--;",
+                                       "delete --foo;",
+                                       "delete new foo();",
+                                       "delete new foo(bar);",
+                                       nullptr};
 
   // These are always errors
-  const char* bad_statement_data[] = {
-    "delete if;",
-    NULL
-  };
+  const char* bad_statement_data[] = {"delete if;", nullptr};
 
   RunParserSyncTest(strict_context_data, sloppy_statement_data, kError);
   RunParserSyncTest(sloppy_context_data, sloppy_statement_data, kSuccess);
@@ -2942,68 +2822,53 @@
 
 TEST(InvalidLeftHandSide) {
   const char* assignment_context_data[][2] = {
-    {"", " = 1;"},
-    {"\"use strict\"; ", " = 1;"},
-    { NULL, NULL }
-  };
+      {"", " = 1;"}, {"\"use strict\"; ", " = 1;"}, {nullptr, nullptr}};
 
   const char* prefix_context_data[][2] = {
-    {"++", ";"},
-    {"\"use strict\"; ++", ";"},
-    {NULL, NULL},
+      {"++", ";"}, {"\"use strict\"; ++", ";"}, {nullptr, nullptr},
   };
 
   const char* postfix_context_data[][2] = {
-    {"", "++;"},
-    {"\"use strict\"; ", "++;"},
-    { NULL, NULL }
-  };
+      {"", "++;"}, {"\"use strict\"; ", "++;"}, {nullptr, nullptr}};
 
   // Good left hand sides for assigment or prefix / postfix operations.
-  const char* good_statement_data[] = {
-    "foo",
-    "foo.bar",
-    "foo[bar]",
-    "foo()[bar]",
-    "foo().bar",
-    "this.foo",
-    "this[foo]",
-    "new foo()[bar]",
-    "new foo().bar",
-    "foo()",
-    "foo(bar)",
-    "foo[bar]()",
-    "foo.bar()",
-    "this()",
-    "this.foo()",
-    "this[foo].bar()",
-    "this.foo[foo].bar(this)(bar)[foo]()",
-    NULL
-  };
+  const char* good_statement_data[] = {"foo",
+                                       "foo.bar",
+                                       "foo[bar]",
+                                       "foo()[bar]",
+                                       "foo().bar",
+                                       "this.foo",
+                                       "this[foo]",
+                                       "new foo()[bar]",
+                                       "new foo().bar",
+                                       "foo()",
+                                       "foo(bar)",
+                                       "foo[bar]()",
+                                       "foo.bar()",
+                                       "this()",
+                                       "this.foo()",
+                                       "this[foo].bar()",
+                                       "this.foo[foo].bar(this)(bar)[foo]()",
+                                       nullptr};
 
   // Bad left hand sides for assigment or prefix / postfix operations.
   const char* bad_statement_data_common[] = {
-    "2",
-    "new foo",
-    "new foo()",
-    "null",
-    "if",  // Unexpected token
-    "{x: 1}",  // Unexpected token
-    "this",
-    "\"bar\"",
-    "(foo + bar)",
-    "new new foo()[bar]",  // means: new (new foo()[bar])
-    "new new foo().bar",  // means: new (new foo()[bar])
-    NULL
-  };
+      "2",
+      "new foo",
+      "new foo()",
+      "null",
+      "if",      // Unexpected token
+      "{x: 1}",  // Unexpected token
+      "this",
+      "\"bar\"",
+      "(foo + bar)",
+      "new new foo()[bar]",  // means: new (new foo()[bar])
+      "new new foo().bar",   // means: new (new foo()[bar])
+      nullptr};
 
   // These are not okay for assignment, but okay for prefix / postix.
-  const char* bad_statement_data_for_assignment[] = {
-    "++foo",
-    "foo++",
-    "foo + bar",
-    NULL
-  };
+  const char* bad_statement_data_for_assignment[] = {"++foo", "foo++",
+                                                     "foo + bar", nullptr};
 
   RunParserSyncTest(assignment_context_data, good_statement_data, kSuccess);
   RunParserSyncTest(assignment_context_data, bad_statement_data_common, kError);
@@ -3070,7 +2935,7 @@
       "%FunctionGetInferredName(obj1.oXj2.foo1)");
   uint16_t* two_byte_name = AsciiToTwoByteString("obj1.oXj2.foo1");
   // Make it really non-Latin1 (replace the Xs with a non-Latin1 character).
-  two_byte_source[14] = two_byte_source[78] = two_byte_name[6] = 0x010d;
+  two_byte_source[14] = two_byte_source[78] = two_byte_name[6] = 0x010D;
   v8::Local<v8::String> source =
       v8::String::NewFromTwoByte(isolate, two_byte_source,
                                  v8::NewStringType::kNormal)
@@ -3089,7 +2954,7 @@
 
 TEST(FuncNameInferrerEscaped) {
   // The same as FuncNameInferrerTwoByte, except that we express the two-byte
-  // character as a unicode escape.
+  // character as a Unicode escape.
   i::FLAG_allow_natives_syntax = true;
   v8::Isolate* isolate = CcTest::isolate();
   v8::HandleScope scope(isolate);
@@ -3099,7 +2964,7 @@
       "%FunctionGetInferredName(obj1.o\\u010dj2.foo1)");
   uint16_t* two_byte_name = AsciiToTwoByteString("obj1.oXj2.foo1");
   // Fix to correspond to the non-ASCII name in two_byte_source.
-  two_byte_name[6] = 0x010d;
+  two_byte_name[6] = 0x010D;
   v8::Local<v8::String> source =
       v8::String::NewFromTwoByte(isolate, two_byte_source,
                                  v8::NewStringType::kNormal)
@@ -3179,14 +3044,14 @@
       &zone, context->scope_info(), script_scope, &avf,
       i::Scope::DeserializationMode::kIncludingVariables);
   CHECK(s != script_scope);
-  CHECK(name != NULL);
+  CHECK_NOT_NULL(name);
 
   // Get result from h's function context (that is f's context)
   i::Variable* var = s->Lookup(name);
 
-  CHECK(var != NULL);
+  CHECK_NOT_NULL(var);
   // Maybe assigned should survive deserialization
-  CHECK(var->maybe_assigned() == i::kMaybeAssigned);
+  CHECK_EQ(var->maybe_assigned(), i::kMaybeAssigned);
   // TODO(sigurds) Figure out if is_used should survive context serialization.
 }
 
@@ -3231,8 +3096,8 @@
 
   // Get result from f's function context (that is g's outer context)
   i::Variable* var_x = s->Lookup(name_x);
-  CHECK(var_x != NULL);
-  CHECK(var_x->maybe_assigned() == i::kMaybeAssigned);
+  CHECK_NOT_NULL(var_x);
+  CHECK_EQ(var_x->maybe_assigned(), i::kMaybeAssigned);
 }
 
 
@@ -3388,7 +3253,7 @@
           CHECK(i::parsing::ParseProgram(info.get(), isolate));
         }
         CHECK(i::Compiler::Analyze(info.get()));
-        CHECK(info->literal() != NULL);
+        CHECK_NOT_NULL(info->literal());
 
         i::Scope* scope = info->literal()->scope();
         if (!lazy) {
@@ -3401,7 +3266,7 @@
             info->ast_value_factory()->GetOneByteString("x");
         i::Variable* var = scope->Lookup(var_name);
         bool expected = outers[i].assigned || inners[j].assigned;
-        CHECK(var != NULL);
+        CHECK_NOT_NULL(var);
         CHECK(var->is_used() || !expected);
         bool is_maybe_assigned = var->maybe_assigned() == i::kMaybeAssigned;
         if (i::FLAG_lazy_inner_functions) {
@@ -3636,81 +3501,81 @@
       {1, "for (j of x) { [foo] = [j] }", top},
       {1, "for (j of x) { var foo = j }", top},
       {1, "for (j of x) { var [foo] = [j] }", top},
-      {0, "for (j of x) { let foo = j }", {2}},
-      {0, "for (j of x) { let [foo] = [j] }", {2}},
-      {0, "for (j of x) { const foo = j }", {2}},
-      {0, "for (j of x) { const [foo] = [j] }", {2}},
-      {0, "for (j of x) { function foo() {return j} }", {2}},
+      {0, "for (j of x) { let foo = j }", {1}},
+      {0, "for (j of x) { let [foo] = [j] }", {1}},
+      {0, "for (j of x) { const foo = j }", {1}},
+      {0, "for (j of x) { const [foo] = [j] }", {1}},
+      {0, "for (j of x) { function foo() {return j} }", {1}},
 
       {1, "for ({j} of x) { foo = j }", top},
       {1, "for ({j} of x) { [foo] = [j] }", top},
       {1, "for ({j} of x) { var foo = j }", top},
       {1, "for ({j} of x) { var [foo] = [j] }", top},
-      {0, "for ({j} of x) { let foo = j }", {2}},
-      {0, "for ({j} of x) { let [foo] = [j] }", {2}},
-      {0, "for ({j} of x) { const foo = j }", {2}},
-      {0, "for ({j} of x) { const [foo] = [j] }", {2}},
-      {0, "for ({j} of x) { function foo() {return j} }", {2}},
+      {0, "for ({j} of x) { let foo = j }", {1}},
+      {0, "for ({j} of x) { let [foo] = [j] }", {1}},
+      {0, "for ({j} of x) { const foo = j }", {1}},
+      {0, "for ({j} of x) { const [foo] = [j] }", {1}},
+      {0, "for ({j} of x) { function foo() {return j} }", {1}},
 
       {1, "for (var j of x) { foo = j }", top},
       {1, "for (var j of x) { [foo] = [j] }", top},
       {1, "for (var j of x) { var foo = j }", top},
       {1, "for (var j of x) { var [foo] = [j] }", top},
-      {0, "for (var j of x) { let foo = j }", {2}},
-      {0, "for (var j of x) { let [foo] = [j] }", {2}},
-      {0, "for (var j of x) { const foo = j }", {2}},
-      {0, "for (var j of x) { const [foo] = [j] }", {2}},
-      {0, "for (var j of x) { function foo() {return j} }", {2}},
+      {0, "for (var j of x) { let foo = j }", {1}},
+      {0, "for (var j of x) { let [foo] = [j] }", {1}},
+      {0, "for (var j of x) { const foo = j }", {1}},
+      {0, "for (var j of x) { const [foo] = [j] }", {1}},
+      {0, "for (var j of x) { function foo() {return j} }", {1}},
 
       {1, "for (var {j} of x) { foo = j }", top},
       {1, "for (var {j} of x) { [foo] = [j] }", top},
       {1, "for (var {j} of x) { var foo = j }", top},
       {1, "for (var {j} of x) { var [foo] = [j] }", top},
-      {0, "for (var {j} of x) { let foo = j }", {2}},
-      {0, "for (var {j} of x) { let [foo] = [j] }", {2}},
-      {0, "for (var {j} of x) { const foo = j }", {2}},
-      {0, "for (var {j} of x) { const [foo] = [j] }", {2}},
-      {0, "for (var {j} of x) { function foo() {return j} }", {2}},
+      {0, "for (var {j} of x) { let foo = j }", {1}},
+      {0, "for (var {j} of x) { let [foo] = [j] }", {1}},
+      {0, "for (var {j} of x) { const foo = j }", {1}},
+      {0, "for (var {j} of x) { const [foo] = [j] }", {1}},
+      {0, "for (var {j} of x) { function foo() {return j} }", {1}},
 
       {1, "for (let j of x) { foo = j }", top},
       {1, "for (let j of x) { [foo] = [j] }", top},
       {1, "for (let j of x) { var foo = j }", top},
       {1, "for (let j of x) { var [foo] = [j] }", top},
-      {0, "for (let j of x) { let foo = j }", {0, 2, 0}},
-      {0, "for (let j of x) { let [foo] = [j] }", {0, 2, 0}},
-      {0, "for (let j of x) { const foo = j }", {0, 2, 0}},
-      {0, "for (let j of x) { const [foo] = [j] }", {0, 2, 0}},
-      {0, "for (let j of x) { function foo() {return j} }", {0, 2, 0}},
+      {0, "for (let j of x) { let foo = j }", {0, 1, 0}},
+      {0, "for (let j of x) { let [foo] = [j] }", {0, 1, 0}},
+      {0, "for (let j of x) { const foo = j }", {0, 1, 0}},
+      {0, "for (let j of x) { const [foo] = [j] }", {0, 1, 0}},
+      {0, "for (let j of x) { function foo() {return j} }", {0, 1, 0}},
 
       {1, "for (let {j} of x) { foo = j }", top},
       {1, "for (let {j} of x) { [foo] = [j] }", top},
       {1, "for (let {j} of x) { var foo = j }", top},
       {1, "for (let {j} of x) { var [foo] = [j] }", top},
-      {0, "for (let {j} of x) { let foo = j }", {0, 2, 0}},
-      {0, "for (let {j} of x) { let [foo] = [j] }", {0, 2, 0}},
-      {0, "for (let {j} of x) { const foo = j }", {0, 2, 0}},
-      {0, "for (let {j} of x) { const [foo] = [j] }", {0, 2, 0}},
-      {0, "for (let {j} of x) { function foo() {return j} }", {0, 2, 0}},
+      {0, "for (let {j} of x) { let foo = j }", {0, 1, 0}},
+      {0, "for (let {j} of x) { let [foo] = [j] }", {0, 1, 0}},
+      {0, "for (let {j} of x) { const foo = j }", {0, 1, 0}},
+      {0, "for (let {j} of x) { const [foo] = [j] }", {0, 1, 0}},
+      {0, "for (let {j} of x) { function foo() {return j} }", {0, 1, 0}},
 
       {1, "for (const j of x) { foo = j }", top},
       {1, "for (const j of x) { [foo] = [j] }", top},
       {1, "for (const j of x) { var foo = j }", top},
       {1, "for (const j of x) { var [foo] = [j] }", top},
-      {0, "for (const j of x) { let foo = j }", {0, 2, 0}},
-      {0, "for (const j of x) { let [foo] = [j] }", {0, 2, 0}},
-      {0, "for (const j of x) { const foo = j }", {0, 2, 0}},
-      {0, "for (const j of x) { const [foo] = [j] }", {0, 2, 0}},
-      {0, "for (const j of x) { function foo() {return j} }", {0, 2, 0}},
+      {0, "for (const j of x) { let foo = j }", {0, 1, 0}},
+      {0, "for (const j of x) { let [foo] = [j] }", {0, 1, 0}},
+      {0, "for (const j of x) { const foo = j }", {0, 1, 0}},
+      {0, "for (const j of x) { const [foo] = [j] }", {0, 1, 0}},
+      {0, "for (const j of x) { function foo() {return j} }", {0, 1, 0}},
 
       {1, "for (const {j} of x) { foo = j }", top},
       {1, "for (const {j} of x) { [foo] = [j] }", top},
       {1, "for (const {j} of x) { var foo = j }", top},
       {1, "for (const {j} of x) { var [foo] = [j] }", top},
-      {0, "for (const {j} of x) { let foo = j }", {0, 2, 0}},
-      {0, "for (const {j} of x) { let [foo] = [j] }", {0, 2, 0}},
-      {0, "for (const {j} of x) { const foo = j }", {0, 2, 0}},
-      {0, "for (const {j} of x) { const [foo] = [j] }", {0, 2, 0}},
-      {0, "for (const {j} of x) { function foo() {return j} }", {0, 2, 0}},
+      {0, "for (const {j} of x) { let foo = j }", {0, 1, 0}},
+      {0, "for (const {j} of x) { let [foo] = [j] }", {0, 1, 0}},
+      {0, "for (const {j} of x) { const foo = j }", {0, 1, 0}},
+      {0, "for (const {j} of x) { const [foo] = [j] }", {0, 1, 0}},
+      {0, "for (const {j} of x) { function foo() {return j} }", {0, 1, 0}},
 
       {1, "for (j in x) { foo = j }", top},
       {1, "for (j in x) { [foo] = [j] }", top},
@@ -4044,24 +3909,6 @@
   RunParserSyncTest(context_data, statement_data, kError);
 }
 
-TEST(LineOrParagraphSeparatorAsLineTerminatorUseCount) {
-  i::Isolate* isolate = CcTest::i_isolate();
-  i::HandleScope scope(isolate);
-  LocalContext env;
-  int use_counts[v8::Isolate::kUseCounterFeatureCount] = {};
-  global_use_counts = use_counts;
-  CcTest::isolate()->SetUseCounterCallback(MockUseCounterCallback);
-  CompileRun("");
-  CHECK_EQ(0, use_counts[v8::Isolate::UseCounterFeature::
-                             kLineOrParagraphSeparatorAsLineTerminator]);
-  CompileRun("// Foo\xE2\x80\xA8");  // "// Foo<U+2028>"
-  CHECK_LT(0, use_counts[v8::Isolate::UseCounterFeature::
-                             kLineOrParagraphSeparatorAsLineTerminator]);
-  CompileRun("// Foo\xE2\x80\xA9");  // "// Foo<U+2029>"
-  CHECK_LT(1, use_counts[v8::Isolate::UseCounterFeature::
-                             kLineOrParagraphSeparatorAsLineTerminator]);
-}
-
 TEST(ErrorsArrowFormalParameters) {
   const char* context_data[][2] = {
     { "()", "=>{}" },
@@ -4133,7 +3980,7 @@
     {"bar[", "];"},
     {"bar, ", ";"},
     {"", ", bar;"},
-    {NULL, NULL}
+    {nullptr, nullptr}
   };
 
   const char* statement_data[] = {
@@ -4222,7 +4069,7 @@
     "(...rest - a) => b",
     "(a, ...b - 10) => b",
 
-    NULL
+    nullptr
   };
   // clang-format on
 
@@ -4250,7 +4097,7 @@
     {"bar ? baz : (", ");"},
     {"bar, ", ";"},
     {"", ", bar;"},
-    {NULL, NULL}
+    {nullptr, nullptr}
   };
 
   const char* statement_data[] = {
@@ -4313,7 +4160,7 @@
     "([x] = []) => {}",
     "({a = 42}) => {}",
     "([x = 0]) => {}",
-    NULL
+    nullptr
   };
   // clang-format on
 
@@ -4331,44 +4178,35 @@
 
 
 TEST(ArrowFunctionsSloppyParameterNames) {
-  const char* strict_context_data[][2] = {
-    {"'use strict'; ", ";"},
-    {"'use strict'; bar ? (", ") : baz;"},
-    {"'use strict'; bar ? baz : (", ");"},
-    {"'use strict'; bar, ", ";"},
-    {"'use strict'; ", ", bar;"},
-    {NULL, NULL}
-  };
+  const char* strict_context_data[][2] = {{"'use strict'; ", ";"},
+                                          {"'use strict'; bar ? (", ") : baz;"},
+                                          {"'use strict'; bar ? baz : (", ");"},
+                                          {"'use strict'; bar, ", ";"},
+                                          {"'use strict'; ", ", bar;"},
+                                          {nullptr, nullptr}};
 
   const char* sloppy_context_data[][2] = {
-    {"", ";"},
-    {"bar ? (", ") : baz;"},
-    {"bar ? baz : (", ");"},
-    {"bar, ", ";"},
-    {"", ", bar;"},
-    {NULL, NULL}
-  };
+      {"", ";"},      {"bar ? (", ") : baz;"}, {"bar ? baz : (", ");"},
+      {"bar, ", ";"}, {"", ", bar;"},          {nullptr, nullptr}};
 
-  const char* statement_data[] = {
-    "eval => {}",
-    "arguments => {}",
-    "yield => {}",
-    "interface => {}",
-    "(eval) => {}",
-    "(arguments) => {}",
-    "(yield) => {}",
-    "(interface) => {}",
-    "(eval, bar) => {}",
-    "(bar, eval) => {}",
-    "(bar, arguments) => {}",
-    "(bar, yield) => {}",
-    "(bar, interface) => {}",
-    "(interface, eval) => {}",
-    "(interface, arguments) => {}",
-    "(eval, interface) => {}",
-    "(arguments, interface) => {}",
-    NULL
-  };
+  const char* statement_data[] = {"eval => {}",
+                                  "arguments => {}",
+                                  "yield => {}",
+                                  "interface => {}",
+                                  "(eval) => {}",
+                                  "(arguments) => {}",
+                                  "(yield) => {}",
+                                  "(interface) => {}",
+                                  "(eval, bar) => {}",
+                                  "(bar, eval) => {}",
+                                  "(bar, arguments) => {}",
+                                  "(bar, yield) => {}",
+                                  "(bar, interface) => {}",
+                                  "(interface, eval) => {}",
+                                  "(interface, arguments) => {}",
+                                  "(eval, interface) => {}",
+                                  "(arguments, interface) => {}",
+                                  nullptr};
 
   RunParserSyncTest(strict_context_data, statement_data, kError);
   RunParserSyncTest(sloppy_context_data, statement_data, kSuccess);
@@ -4377,32 +4215,20 @@
 
 TEST(ArrowFunctionsYieldParameterNameInGenerator) {
   const char* sloppy_function_context_data[][2] = {
-    {"(function f() { (", "); });"},
-    {NULL, NULL}
-  };
+      {"(function f() { (", "); });"}, {nullptr, nullptr}};
 
   const char* strict_function_context_data[][2] = {
-    {"(function f() {'use strict'; (", "); });"},
-    {NULL, NULL}
-  };
+      {"(function f() {'use strict'; (", "); });"}, {nullptr, nullptr}};
 
   const char* generator_context_data[][2] = {
-    {"(function *g() {'use strict'; (", "); });"},
-    {"(function *g() { (", "); });"},
-    {NULL, NULL}
-  };
+      {"(function *g() {'use strict'; (", "); });"},
+      {"(function *g() { (", "); });"},
+      {nullptr, nullptr}};
 
   const char* arrow_data[] = {
-    "yield => {}",
-    "(yield) => {}",
-    "(a, yield) => {}",
-    "(yield, a) => {}",
-    "(yield, ...a) => {}",
-    "(a, ...yield) => {}",
-    "({yield}) => {}",
-    "([yield]) => {}",
-    NULL
-  };
+      "yield => {}",      "(yield) => {}",       "(a, yield) => {}",
+      "(yield, a) => {}", "(yield, ...a) => {}", "(a, ...yield) => {}",
+      "({yield}) => {}",  "([yield]) => {}",     nullptr};
 
   RunParserSyncTest(sloppy_function_context_data, arrow_data, kSuccess);
   RunParserSyncTest(strict_function_context_data, arrow_data, kError);
@@ -4412,51 +4238,40 @@
 
 TEST(SuperNoErrors) {
   // Tests that parser and preparser accept 'super' keyword in right places.
-  const char* context_data[][2] = {
-    {"class C { m() { ", "; } }"},
-    {"class C { m() { k = ", "; } }"},
-    {"class C { m() { foo(", "); } }"},
-    {"class C { m() { () => ", "; } }"},
-    {NULL, NULL}
-  };
+  const char* context_data[][2] = {{"class C { m() { ", "; } }"},
+                                   {"class C { m() { k = ", "; } }"},
+                                   {"class C { m() { foo(", "); } }"},
+                                   {"class C { m() { () => ", "; } }"},
+                                   {nullptr, nullptr}};
 
-  const char* statement_data[] = {
-    "super.x",
-    "super[27]",
-    "new super.x",
-    "new super.x()",
-    "new super[27]",
-    "new super[27]()",
-    "z.super",  // Ok, property lookup.
-    NULL
-  };
+  const char* statement_data[] = {"super.x",       "super[27]",
+                                  "new super.x",   "new super.x()",
+                                  "new super[27]", "new super[27]()",
+                                  "z.super",  // Ok, property lookup.
+                                  nullptr};
 
   RunParserSyncTest(context_data, statement_data, kSuccess);
 }
 
 
 TEST(SuperErrors) {
-  const char* context_data[][2] = {
-    {"class C { m() { ", "; } }"},
-    {"class C { m() { k = ", "; } }"},
-    {"class C { m() { foo(", "); } }"},
-    {"class C { m() { () => ", "; } }"},
-    {NULL, NULL}
-  };
+  const char* context_data[][2] = {{"class C { m() { ", "; } }"},
+                                   {"class C { m() { k = ", "; } }"},
+                                   {"class C { m() { foo(", "); } }"},
+                                   {"class C { m() { () => ", "; } }"},
+                                   {nullptr, nullptr}};
 
-  const char* expression_data[] = {
-    "super",
-    "super = x",
-    "y = super",
-    "f(super)",
-    "new super",
-    "new super()",
-    "new super(12, 45)",
-    "new new super",
-    "new new super()",
-    "new new super()()",
-    NULL
-  };
+  const char* expression_data[] = {"super",
+                                   "super = x",
+                                   "y = super",
+                                   "f(super)",
+                                   "new super",
+                                   "new super()",
+                                   "new super(12, 45)",
+                                   "new new super",
+                                   "new new super()",
+                                   "new new super()()",
+                                   nullptr};
 
   RunParserSyncTest(context_data, expression_data, kError);
 }
@@ -4465,7 +4280,7 @@
   // clang-format off
   const char* context_data[][2] = {
     {"", ""},
-    {NULL, NULL}
+    {nullptr, nullptr}
   };
 
   const char* data[] = {
@@ -4485,7 +4300,7 @@
     "let x = import(x)",
     "for(x of import(x)) {}",
     "import(x).then()",
-    NULL
+    nullptr
   };
 
   // clang-format on
@@ -4500,12 +4315,12 @@
   // run without kAllowHarmonyDynamicImport flag), so this results in
   // an "Unexpected token import" error.
   RunParserSyncTest(context_data, data, kError);
-  RunModuleParserSyncTest(context_data, data, kError, NULL, 0, NULL, 0, NULL, 0,
-                          true, true);
+  RunModuleParserSyncTest(context_data, data, kError, nullptr, 0, nullptr, 0,
+                          nullptr, 0, true, true);
   static const ParserFlag flags[] = {kAllowHarmonyDynamicImport};
-  RunParserSyncTest(context_data, data, kSuccess, NULL, 0, flags,
+  RunParserSyncTest(context_data, data, kSuccess, nullptr, 0, flags,
                     arraysize(flags));
-  RunModuleParserSyncTest(context_data, data, kSuccess, NULL, 0, flags,
+  RunModuleParserSyncTest(context_data, data, kSuccess, nullptr, 0, flags,
                           arraysize(flags));
 }
 
@@ -4517,7 +4332,7 @@
       {"var ", ""},
       {"let ", ""},
       {"new ", ""},
-      {NULL, NULL}
+      {nullptr, nullptr}
     };
 
     const char* data[] = {
@@ -4547,17 +4362,17 @@
       "import = 1",
       "import.wat",
       "new import(x)",
-      NULL
+      nullptr
     };
 
     // clang-format on
     RunParserSyncTest(context_data, data, kError);
     // We ignore the error messages for the reason explained in the
     // ImportExpressionSuccess test.
-    RunModuleParserSyncTest(context_data, data, kError, NULL, 0, NULL, 0, NULL,
-                            0, true, true);
+    RunModuleParserSyncTest(context_data, data, kError, nullptr, 0, nullptr, 0,
+                            nullptr, 0, true, true);
     static const ParserFlag flags[] = {kAllowHarmonyDynamicImport};
-    RunParserSyncTest(context_data, data, kError, NULL, 0, flags,
+    RunParserSyncTest(context_data, data, kError, nullptr, 0, flags,
                       arraysize(flags));
 
     // We ignore test error messages because the error message from
@@ -4567,8 +4382,8 @@
     // correctly and then shows an "Unexpected end of input" error
     // message because of the '{'. The preparser shows an "Unexpected
     // token {" because it's not a valid token in a CallExpression.
-    RunModuleParserSyncTest(context_data, data, kError, NULL, 0, flags,
-                            arraysize(flags), NULL, 0, true, true);
+    RunModuleParserSyncTest(context_data, data, kError, nullptr, 0, flags,
+                            arraysize(flags), nullptr, 0, true, true);
   }
 
   {
@@ -4576,12 +4391,12 @@
     const char* context_data[][2] = {
       {"var ", ""},
       {"let ", ""},
-      {NULL, NULL}
+      {nullptr, nullptr}
     };
 
     const char* data[] = {
       "import('x')",
-      NULL
+      nullptr
     };
 
     // clang-format on
@@ -4589,100 +4404,83 @@
     RunModuleParserSyncTest(context_data, data, kError);
 
     static const ParserFlag flags[] = {kAllowHarmonyDynamicImport};
-    RunParserSyncTest(context_data, data, kError, NULL, 0, flags,
+    RunParserSyncTest(context_data, data, kError, nullptr, 0, flags,
                       arraysize(flags));
-    RunModuleParserSyncTest(context_data, data, kError, NULL, 0, flags,
+    RunModuleParserSyncTest(context_data, data, kError, nullptr, 0, flags,
                             arraysize(flags));
   }
 }
 
 TEST(SuperCall) {
-  const char* context_data[][2] = {{"", ""},
-                                   {NULL, NULL}};
+  const char* context_data[][2] = {{"", ""}, {nullptr, nullptr}};
 
   const char* success_data[] = {
-    "class C extends B { constructor() { super(); } }",
-    "class C extends B { constructor() { () => super(); } }",
-    NULL
-  };
+      "class C extends B { constructor() { super(); } }",
+      "class C extends B { constructor() { () => super(); } }", nullptr};
 
   RunParserSyncTest(context_data, success_data, kSuccess);
 
-  const char* error_data[] = {
-    "class C { constructor() { super(); } }",
-    "class C { method() { super(); } }",
-    "class C { method() { () => super(); } }",
-    "class C { *method() { super(); } }",
-    "class C { get x() { super(); } }",
-    "class C { set x(_) { super(); } }",
-    "({ method() { super(); } })",
-    "({ *method() { super(); } })",
-    "({ get x() { super(); } })",
-    "({ set x(_) { super(); } })",
-    "({ f: function() { super(); } })",
-    "(function() { super(); })",
-    "var f = function() { super(); }",
-    "({ f: function*() { super(); } })",
-    "(function*() { super(); })",
-    "var f = function*() { super(); }",
-    NULL
-  };
+  const char* error_data[] = {"class C { constructor() { super(); } }",
+                              "class C { method() { super(); } }",
+                              "class C { method() { () => super(); } }",
+                              "class C { *method() { super(); } }",
+                              "class C { get x() { super(); } }",
+                              "class C { set x(_) { super(); } }",
+                              "({ method() { super(); } })",
+                              "({ *method() { super(); } })",
+                              "({ get x() { super(); } })",
+                              "({ set x(_) { super(); } })",
+                              "({ f: function() { super(); } })",
+                              "(function() { super(); })",
+                              "var f = function() { super(); }",
+                              "({ f: function*() { super(); } })",
+                              "(function*() { super(); })",
+                              "var f = function*() { super(); }",
+                              nullptr};
 
   RunParserSyncTest(context_data, error_data, kError);
 }
 
 
 TEST(SuperNewNoErrors) {
-  const char* context_data[][2] = {
-    {"class C { constructor() { ", " } }"},
-    {"class C { *method() { ", " } }"},
-    {"class C { get x() { ", " } }"},
-    {"class C { set x(_) { ", " } }"},
-    {"({ method() { ", " } })"},
-    {"({ *method() { ", " } })"},
-    {"({ get x() { ", " } })"},
-    {"({ set x(_) { ", " } })"},
-    {NULL, NULL}
-  };
+  const char* context_data[][2] = {{"class C { constructor() { ", " } }"},
+                                   {"class C { *method() { ", " } }"},
+                                   {"class C { get x() { ", " } }"},
+                                   {"class C { set x(_) { ", " } }"},
+                                   {"({ method() { ", " } })"},
+                                   {"({ *method() { ", " } })"},
+                                   {"({ get x() { ", " } })"},
+                                   {"({ set x(_) { ", " } })"},
+                                   {nullptr, nullptr}};
 
-  const char* expression_data[] = {
-    "new super.x;",
-    "new super.x();",
-    "() => new super.x;",
-    "() => new super.x();",
-    NULL
-  };
+  const char* expression_data[] = {"new super.x;", "new super.x();",
+                                   "() => new super.x;", "() => new super.x();",
+                                   nullptr};
 
   RunParserSyncTest(context_data, expression_data, kSuccess);
 }
 
 
 TEST(SuperNewErrors) {
-  const char* context_data[][2] = {
-    {"class C { method() { ", " } }"},
-    {"class C { *method() { ", " } }"},
-    {"class C { get x() { ", " } }"},
-    {"class C { set x(_) { ", " } }"},
-    {"({ method() { ", " } })"},
-    {"({ *method() { ", " } })"},
-    {"({ get x() { ", " } })"},
-    {"({ set x(_) { ", " } })"},
-    {"({ f: function() { ", " } })"},
-    {"(function() { ", " })"},
-    {"var f = function() { ", " }"},
-    {"({ f: function*() { ", " } })"},
-    {"(function*() { ", " })"},
-    {"var f = function*() { ", " }"},
-    {NULL, NULL}
-  };
+  const char* context_data[][2] = {{"class C { method() { ", " } }"},
+                                   {"class C { *method() { ", " } }"},
+                                   {"class C { get x() { ", " } }"},
+                                   {"class C { set x(_) { ", " } }"},
+                                   {"({ method() { ", " } })"},
+                                   {"({ *method() { ", " } })"},
+                                   {"({ get x() { ", " } })"},
+                                   {"({ set x(_) { ", " } })"},
+                                   {"({ f: function() { ", " } })"},
+                                   {"(function() { ", " })"},
+                                   {"var f = function() { ", " }"},
+                                   {"({ f: function*() { ", " } })"},
+                                   {"(function*() { ", " })"},
+                                   {"var f = function*() { ", " }"},
+                                   {nullptr, nullptr}};
 
-  const char* statement_data[] = {
-    "new super;",
-    "new super();",
-    "() => new super;",
-    "() => new super();",
-    NULL
-  };
+  const char* statement_data[] = {"new super;", "new super();",
+                                  "() => new super;", "() => new super();",
+                                  nullptr};
 
   RunParserSyncTest(context_data, statement_data, kError);
 }
@@ -4690,37 +4488,24 @@
 
 TEST(SuperErrorsNonMethods) {
   // super is only allowed in methods, accessors and constructors.
-  const char* context_data[][2] = {
-    {"", ";"},
-    {"k = ", ";"},
-    {"foo(", ");"},
-    {"if (", ") {}"},
-    {"if (true) {", "}"},
-    {"if (false) {} else {", "}"},
-    {"while (true) {", "}"},
-    {"function f() {", "}"},
-    {"class C extends (", ") {}"},
-    {"class C { m() { function f() {", "} } }"},
-    {"({ m() { function f() {", "} } })"},
-    {NULL, NULL}
-  };
+  const char* context_data[][2] = {{"", ";"},
+                                   {"k = ", ";"},
+                                   {"foo(", ");"},
+                                   {"if (", ") {}"},
+                                   {"if (true) {", "}"},
+                                   {"if (false) {} else {", "}"},
+                                   {"while (true) {", "}"},
+                                   {"function f() {", "}"},
+                                   {"class C extends (", ") {}"},
+                                   {"class C { m() { function f() {", "} } }"},
+                                   {"({ m() { function f() {", "} } })"},
+                                   {nullptr, nullptr}};
 
   const char* statement_data[] = {
-    "super",
-    "super = x",
-    "y = super",
-    "f(super)",
-    "super.x",
-    "super[27]",
-    "super.x()",
-    "super[27]()",
-    "super()",
-    "new super.x",
-    "new super.x()",
-    "new super[27]",
-    "new super[27]()",
-    NULL
-  };
+      "super",           "super = x",   "y = super",     "f(super)",
+      "super.x",         "super[27]",   "super.x()",     "super[27]()",
+      "super()",         "new super.x", "new super.x()", "new super[27]",
+      "new super[27]()", nullptr};
 
   RunParserSyncTest(context_data, statement_data, kError);
 }
@@ -4731,16 +4516,11 @@
                                    {"'use strict'; ({", "});"},
                                    {"({*", "});"},
                                    {"'use strict'; ({*", "});"},
-                                   {NULL, NULL}};
+                                   {nullptr, nullptr}};
 
   const char* object_literal_body_data[] = {
-    "m() {}",
-    "m(x) { return x; }",
-    "m(x, y) {}, n() {}",
-    "set(x, y) {}",
-    "get(x, y) {}",
-    NULL
-  };
+      "m() {}",       "m(x) { return x; }", "m(x, y) {}, n() {}",
+      "set(x, y) {}", "get(x, y) {}",       nullptr};
 
   RunParserSyncTest(context_data, object_literal_body_data, kSuccess);
 }
@@ -4751,70 +4531,20 @@
                                    {"'use strict'; ({", "(x, y) {}});"},
                                    {"({*", "(x, y) {}});"},
                                    {"'use strict'; ({*", "(x, y) {}});"},
-                                   {NULL, NULL}};
+                                   {nullptr, nullptr}};
 
   const char* name_data[] = {
-    "m",
-    "'m'",
-    "\"m\"",
-    "\"m n\"",
-    "true",
-    "false",
-    "null",
-    "0",
-    "1.2",
-    "1e1",
-    "1E1",
-    "1e+1",
-    "1e-1",
+      "m", "'m'", "\"m\"", "\"m n\"", "true", "false", "null", "0", "1.2",
+      "1e1", "1E1", "1e+1", "1e-1",
 
-    // Keywords
-    "async",
-    "await",
-    "break",
-    "case",
-    "catch",
-    "class",
-    "const",
-    "continue",
-    "debugger",
-    "default",
-    "delete",
-    "do",
-    "else",
-    "enum",
-    "export",
-    "extends",
-    "finally",
-    "for",
-    "function",
-    "if",
-    "implements",
-    "import",
-    "in",
-    "instanceof",
-    "interface",
-    "let",
-    "new",
-    "package",
-    "private",
-    "protected",
-    "public",
-    "return",
-    "static",
-    "super",
-    "switch",
-    "this",
-    "throw",
-    "try",
-    "typeof",
-    "var",
-    "void",
-    "while",
-    "with",
-    "yield",
-    NULL
-  };
+      // Keywords
+      "async", "await", "break", "case", "catch", "class", "const", "continue",
+      "debugger", "default", "delete", "do", "else", "enum", "export",
+      "extends", "finally", "for", "function", "if", "implements", "import",
+      "in", "instanceof", "interface", "let", "new", "package", "private",
+      "protected", "public", "return", "static", "super", "switch", "this",
+      "throw", "try", "typeof", "var", "void", "while", "with", "yield",
+      nullptr};
 
   RunParserSyncTest(context_data, name_data, kSuccess);
 }
@@ -4825,34 +4555,23 @@
                                    {"'use strict'; ({method(", "){}});"},
                                    {"({*method(", "){}});"},
                                    {"'use strict'; ({*method(", "){}});"},
-                                   {NULL, NULL}};
+                                   {nullptr, nullptr}};
 
-  const char* params_data[] = {
-    "x, x",
-    "x, y, x",
-    "var",
-    "const",
-    NULL
-  };
+  const char* params_data[] = {"x, x", "x, y, x", "var", "const", nullptr};
 
   RunParserSyncTest(context_data, params_data, kError);
 }
 
 
 TEST(MethodDefinitionEvalArguments) {
-  const char* strict_context_data[][2] =
-      {{"'use strict'; ({method(", "){}});"},
-       {"'use strict'; ({*method(", "){}});"},
-       {NULL, NULL}};
-  const char* sloppy_context_data[][2] =
-      {{"({method(", "){}});"},
-       {"({*method(", "){}});"},
-       {NULL, NULL}};
+  const char* strict_context_data[][2] = {
+      {"'use strict'; ({method(", "){}});"},
+      {"'use strict'; ({*method(", "){}});"},
+      {nullptr, nullptr}};
+  const char* sloppy_context_data[][2] = {
+      {"({method(", "){}});"}, {"({*method(", "){}});"}, {nullptr, nullptr}};
 
-  const char* data[] = {
-      "eval",
-      "arguments",
-      NULL};
+  const char* data[] = {"eval", "arguments", nullptr};
 
   // Fail in strict mode
   RunParserSyncTest(strict_context_data, data, kError);
@@ -4863,19 +4582,14 @@
 
 
 TEST(MethodDefinitionDuplicateEvalArguments) {
-  const char* context_data[][2] =
-      {{"'use strict'; ({method(", "){}});"},
-       {"'use strict'; ({*method(", "){}});"},
-       {"({method(", "){}});"},
-       {"({*method(", "){}});"},
-       {NULL, NULL}};
+  const char* context_data[][2] = {{"'use strict'; ({method(", "){}});"},
+                                   {"'use strict'; ({*method(", "){}});"},
+                                   {"({method(", "){}});"},
+                                   {"({*method(", "){}});"},
+                                   {nullptr, nullptr}};
 
-  const char* data[] = {
-      "eval, eval",
-      "eval, a, eval",
-      "arguments, arguments",
-      "arguments, a, arguments",
-      NULL};
+  const char* data[] = {"eval, eval", "eval, a, eval", "arguments, arguments",
+                        "arguments, a, arguments", nullptr};
 
   // In strict mode, the error is using "eval" or "arguments" as parameter names
   // In sloppy mode, the error is that eval / arguments are duplicated
@@ -4885,55 +4599,50 @@
 
 TEST(MethodDefinitionDuplicateProperty) {
   const char* context_data[][2] = {{"'use strict'; ({", "});"},
-                                   {NULL, NULL}};
+                                   {nullptr, nullptr}};
 
-  const char* params_data[] = {
-    "x: 1, x() {}",
-    "x() {}, x: 1",
-    "x() {}, get x() {}",
-    "x() {}, set x(_) {}",
-    "x() {}, x() {}",
-    "x() {}, y() {}, x() {}",
-    "x() {}, \"x\"() {}",
-    "x() {}, 'x'() {}",
-    "0() {}, '0'() {}",
-    "1.0() {}, 1: 1",
+  const char* params_data[] = {"x: 1, x() {}",
+                               "x() {}, x: 1",
+                               "x() {}, get x() {}",
+                               "x() {}, set x(_) {}",
+                               "x() {}, x() {}",
+                               "x() {}, y() {}, x() {}",
+                               "x() {}, \"x\"() {}",
+                               "x() {}, 'x'() {}",
+                               "0() {}, '0'() {}",
+                               "1.0() {}, 1: 1",
 
-    "x: 1, *x() {}",
-    "*x() {}, x: 1",
-    "*x() {}, get x() {}",
-    "*x() {}, set x(_) {}",
-    "*x() {}, *x() {}",
-    "*x() {}, y() {}, *x() {}",
-    "*x() {}, *\"x\"() {}",
-    "*x() {}, *'x'() {}",
-    "*0() {}, *'0'() {}",
-    "*1.0() {}, 1: 1",
+                               "x: 1, *x() {}",
+                               "*x() {}, x: 1",
+                               "*x() {}, get x() {}",
+                               "*x() {}, set x(_) {}",
+                               "*x() {}, *x() {}",
+                               "*x() {}, y() {}, *x() {}",
+                               "*x() {}, *\"x\"() {}",
+                               "*x() {}, *'x'() {}",
+                               "*0() {}, *'0'() {}",
+                               "*1.0() {}, 1: 1",
 
-    NULL
-  };
+                               nullptr};
 
   RunParserSyncTest(context_data, params_data, kSuccess);
 }
 
 
 TEST(ClassExpressionNoErrors) {
-  const char* context_data[][2] = {{"(", ");"},
-                                   {"var C = ", ";"},
-                                   {"bar, ", ";"},
-                                   {NULL, NULL}};
-  const char* class_data[] = {
-    "class {}",
-    "class name {}",
-    "class extends F {}",
-    "class name extends F {}",
-    "class extends (F, G) {}",
-    "class name extends (F, G) {}",
-    "class extends class {} {}",
-    "class name extends class {} {}",
-    "class extends class base {} {}",
-    "class name extends class base {} {}",
-    NULL};
+  const char* context_data[][2] = {
+      {"(", ");"}, {"var C = ", ";"}, {"bar, ", ";"}, {nullptr, nullptr}};
+  const char* class_data[] = {"class {}",
+                              "class name {}",
+                              "class extends F {}",
+                              "class name extends F {}",
+                              "class extends (F, G) {}",
+                              "class name extends (F, G) {}",
+                              "class extends class {} {}",
+                              "class name extends class {} {}",
+                              "class extends class base {} {}",
+                              "class name extends class base {} {}",
+                              nullptr};
 
   RunParserSyncTest(context_data, class_data, kSuccess);
 }
@@ -4943,14 +4652,13 @@
   const char* context_data[][2] = {{"'use strict'; ", ""},
                                    {"'use strict'; {", "}"},
                                    {"'use strict'; if (true) {", "}"},
-                                   {NULL, NULL}};
-  const char* statement_data[] = {
-    "class name {}",
-    "class name extends F {}",
-    "class name extends (F, G) {}",
-    "class name extends class {} {}",
-    "class name extends class base {} {}",
-    NULL};
+                                   {nullptr, nullptr}};
+  const char* statement_data[] = {"class name {}",
+                                  "class name extends F {}",
+                                  "class name extends (F, G) {}",
+                                  "class name extends class {} {}",
+                                  "class name extends class base {} {}",
+                                  nullptr};
 
   RunParserSyncTest(context_data, statement_data, kSuccess);
 }
@@ -4963,7 +4671,7 @@
                                    {"(class extends Base {", "});"},
                                    {"class C {", "}"},
                                    {"class C extends Base {", "}"},
-                                   {NULL, NULL}};
+                                   {nullptr, nullptr}};
   const char* class_body_data[] = {
     ";",
     ";;",
@@ -4979,6 +4687,7 @@
     "*g() {};",
     "; *g() {}",
     "*g() {}; *h(x) {}",
+    "async *x(){}",
     "static() {}",
     "get static() {}",
     "set static(v) {}",
@@ -4999,6 +4708,7 @@
     "*async(){}",
     "static async(){}",
     "static *async(){}",
+    "static async *x(){}",
 
     // Escaped 'static' should be allowed anywhere
     // static-as-PropertyName is.
@@ -5022,7 +4732,7 @@
     "async async(){}",
     "async(){}",
     "*async(){}",
-    NULL};
+    nullptr};
   // clang-format on
 
   RunParserSyncTest(context_data, class_body_data, kSuccess);
@@ -5046,41 +4756,107 @@
                                    {"class C { static set ", "(v) {}}"},
                                    {"class C { *", "() {}}"},
                                    {"class C { static *", "() {}}"},
-                                   {NULL, NULL}};
+                                   {nullptr, nullptr}};
   const char* name_data[] = {
-    "42",
-    "42.5",
-    "42e2",
-    "42e+2",
-    "42e-2",
-    "null",
-    "false",
-    "true",
-    "'str'",
-    "\"str\"",
-    "static",
-    "get",
-    "set",
-    "var",
-    "const",
-    "let",
-    "this",
-    "class",
-    "function",
-    "yield",
-    "if",
-    "else",
-    "for",
-    "while",
-    "do",
-    "try",
-    "catch",
-    "finally",
-    NULL};
+      "42",       "42.5",  "42e2",  "42e+2",   "42e-2",  "null",
+      "false",    "true",  "'str'", "\"str\"", "static", "get",
+      "set",      "var",   "const", "let",     "this",   "class",
+      "function", "yield", "if",    "else",    "for",    "while",
+      "do",       "try",   "catch", "finally", nullptr};
 
   RunParserSyncTest(context_data, name_data, kSuccess);
 }
 
+TEST(StaticClassFieldsNoErrors) {
+  // clang-format off
+  // Tests proposed class fields syntax.
+  const char* context_data[][2] = {{"(class {", "});"},
+                                   {"(class extends Base {", "});"},
+                                   {"class C {", "}"},
+                                   {"class C extends Base {", "}"},
+                                   {nullptr, nullptr}};
+  const char* class_body_data[] = {
+    // Basic syntax
+    "static a = 0;",
+    "static a = 0; b",
+    "static a = 0; b(){}",
+    "static a = 0; *b(){}",
+    "static a = 0; ['b'](){}",
+    "static a;",
+    "static a; b;",
+    "static a; b(){}",
+    "static a; *b(){}",
+    "static a; ['b'](){}",
+    "static ['a'] = 0;",
+    "static ['a'] = 0; b",
+    "static ['a'] = 0; b(){}",
+    "static ['a'] = 0; *b(){}",
+    "static ['a'] = 0; ['b'](){}",
+    "static ['a'];",
+    "static ['a']; b;",
+    "static ['a']; b(){}",
+    "static ['a']; *b(){}",
+    "static ['a']; ['b'](){}",
+
+    "static 0 = 0;",
+    "static 0;",
+    "static 'a' = 0;",
+    "static 'a';",
+
+    // ASI
+    "static a = 0\n",
+    "static a = 0\n b",
+    "static a = 0\n b(){}",
+    "static a\n",
+    "static a\n b\n",
+    "static a\n b(){}",
+    "static a\n *b(){}",
+    "static a\n ['b'](){}",
+    "static ['a'] = 0\n",
+    "static ['a'] = 0\n b",
+    "static ['a'] = 0\n b(){}",
+    "static ['a']\n",
+    "static ['a']\n b\n",
+    "static ['a']\n b(){}",
+    "static ['a']\n *b(){}",
+    "static ['a']\n ['b'](){}",
+
+    "static a = function t() { arguments; }",
+    "static a = () => function t() { arguments; }",
+
+    // ASI edge cases
+    "static a\n get",
+    "static get\n *a(){}",
+    "static a\n static",
+
+    // Misc edge cases
+    "static yield",
+    "static yield = 0",
+    "static yield\n a",
+    "static async;",
+    "static async = 0;",
+    "static async",
+    "static async = 0",
+    "static async\n a(){}",  // a field named async, and a method named a.
+    "static async\n a",
+    "static await;",
+    "static await = 0;",
+    "static await\n a",
+    nullptr
+  };
+  // clang-format on
+
+  static const ParserFlag always_flags[] = {kAllowHarmonyPublicFields,
+                                            kAllowHarmonyStaticFields};
+  RunParserSyncTest(context_data, class_body_data, kSuccess, nullptr, 0,
+                    always_flags, arraysize(always_flags));
+
+  // Without the static flag, all of these are errors
+  static const ParserFlag no_static_flags[] = {kAllowHarmonyPublicFields};
+  RunParserSyncTest(context_data, class_body_data, kError, nullptr, 0,
+                    no_static_flags, arraysize(no_static_flags));
+}
+
 TEST(ClassFieldsNoErrors) {
   // clang-format off
   // Tests proposed class fields syntax.
@@ -5088,7 +4864,7 @@
                                    {"(class extends Base {", "});"},
                                    {"class C {", "}"},
                                    {"class C extends Base {", "}"},
-                                   {NULL, NULL}};
+                                   {nullptr, nullptr}};
   const char* class_body_data[] = {
     // Basic syntax
     "a = 0;",
@@ -5117,15 +4893,6 @@
     "'a' = 0;",
     "'a';",
 
-    "static a = 0;",
-    "static a;",
-    "static ['a'] = 0",
-    "static ['a']",
-    "static 0 = 0;",
-    "static 0;",
-    "static 'a' = 0;",
-    "static 'a';",
-
     // ASI
     "a = 0\n",
     "a = 0\n b",
@@ -5149,27 +4916,150 @@
     "get\n *a(){}",
     "a\n static",
 
+    "a = function t() { arguments; }",
+    "a = () => function() { arguments; }",
+
     // Misc edge cases
     "yield",
     "yield = 0",
     "yield\n a",
     "async;",
     "async = 0;",
-    "static async;"
     "async",
     "async = 0",
-    "static async",
     "async\n a(){}",  // a field named async, and a method named a.
     "async\n a",
     "await;",
     "await = 0;",
     "await\n a",
-    NULL
+    nullptr
   };
   // clang-format on
 
-  static const ParserFlag always_flags[] = {kAllowHarmonyClassFields};
-  RunParserSyncTest(context_data, class_body_data, kSuccess, NULL, 0,
+  static const ParserFlag always_flags[] = {kAllowHarmonyPublicFields};
+  RunParserSyncTest(context_data, class_body_data, kSuccess, nullptr, 0,
+                    always_flags, arraysize(always_flags));
+
+  static const ParserFlag static_flags[] = {kAllowHarmonyPublicFields,
+                                            kAllowHarmonyStaticFields};
+  RunParserSyncTest(context_data, class_body_data, kSuccess, nullptr, 0,
+                    static_flags, arraysize(static_flags));
+}
+
+TEST(PrivateClassFieldsNoErrors) {
+  // clang-format off
+  // Tests proposed class fields syntax.
+  const char* context_data[][2] = {{"(class {", "});"},
+                                   {"(class extends Base {", "});"},
+                                   {"class C {", "}"},
+                                   {"class C extends Base {", "}"},
+                                   {nullptr, nullptr}};
+  const char* class_body_data[] = {
+    // Basic syntax
+    "#a = 0;",
+    "#a = 0; #b",
+    "#a = 0; b",
+    "#a = 0; b(){}",
+    "#a = 0; *b(){}",
+    "#a = 0; ['b'](){}",
+    "#a;",
+    "#a; #b;",
+    "#a; b;",
+    "#a; b(){}",
+    "#a; *b(){}",
+    "#a; ['b'](){}",
+
+    // ASI
+    "#a = 0\n",
+    "#a = 0\n #b",
+    "#a = 0\n b",
+    "#a = 0\n b(){}",
+    "#a\n",
+    "#a\n #b\n",
+    "#a\n b\n",
+    "#a\n b(){}",
+    "#a\n *b(){}",
+    "#a\n ['b'](){}",
+
+    // ASI edge cases
+    "#a\n get",
+    "#get\n *a(){}",
+    "#a\n static",
+
+    "#a = function t() { arguments; }",
+    "#a = () => function() { arguments; }",
+
+    // Misc edge cases
+    "#yield",
+    "#yield = 0",
+    "#yield\n a",
+    "#async;",
+    "#async = 0;",
+    "#async",
+    "#async = 0",
+    "#async\n a(){}",  // a field named async, and a method named a.
+    "#async\n a",
+    "#await;",
+    "#await = 0;",
+    "#await\n a",
+    nullptr
+  };
+  // clang-format on
+
+  RunParserSyncTest(context_data, class_body_data, kError);
+
+  static const ParserFlag private_fields[] = {kAllowHarmonyPrivateFields};
+  RunParserSyncTest(context_data, class_body_data, kSuccess, nullptr, 0,
+                    private_fields, arraysize(private_fields));
+}
+
+TEST(StaticClassFieldsErrors) {
+  // clang-format off
+  // Tests proposed class fields syntax.
+  const char* context_data[][2] = {{"(class {", "});"},
+                                   {"(class extends Base {", "});"},
+                                   {"class C {", "}"},
+                                   {"class C extends Base {", "}"},
+                                   {nullptr, nullptr}};
+  const char* class_body_data[] = {
+    "static a : 0",
+    "static a =",
+    "static constructor",
+    "static prototype",
+    "static *a = 0",
+    "static *a",
+    "static get a",
+    "static get\n a",
+    "static yield a",
+    "static async a = 0",
+    "static async a",
+
+    "static a = arguments",
+    "static a = () => arguments",
+    "static a = () => { arguments }",
+    "static a = arguments[0]",
+    "static a = delete arguments[0]",
+    "static a = f(arguments)",
+    "static a = () => () => arguments",
+
+    // ASI requires a linebreak
+    "static a b",
+    "static a = 0 b",
+
+    // ASI requires that the next token is not part of any legal production
+    "static a = 0\n *b(){}",
+    "static a = 0\n ['b'](){}",
+    nullptr
+  };
+  // clang-format on
+
+  static const ParserFlag no_static_flags[] = {kAllowHarmonyPublicFields};
+  RunParserSyncTest(context_data, class_body_data, kError, nullptr, 0,
+                    no_static_flags, arraysize(no_static_flags));
+
+  static const ParserFlag always_flags[] = {kAllowHarmonyPublicFields,
+                                            kAllowHarmonyStaticFields};
+  RunParserSyncTest(context_data, class_body_data, kError, nullptr, 0,
                     always_flags, arraysize(always_flags));
 }
 
@@ -5180,23 +5070,26 @@
                                    {"(class extends Base {", "});"},
                                    {"class C {", "}"},
                                    {"class C extends Base {", "}"},
-                                   {NULL, NULL}};
+                                   {nullptr, nullptr}};
   const char* class_body_data[] = {
     "a : 0",
     "a =",
+    "constructor",
     "*a = 0",
     "*a",
     "get a",
     "yield a",
-    "a : 0;",
-    "a =;",
-    "*a = 0;",
-    "*a;",
-    "get a;",
-    "yield a;",
     "async a = 0",
     "async a",
 
+    "a = arguments",
+    "a = () => arguments",
+    "a = () => { arguments }",
+    "a = arguments[0]",
+    "a = delete arguments[0]",
+    "a = f(arguments)",
+    "a = () => () => arguments",
+
     // ASI requires a linebreak
     "a b",
     "a = 0 b",
@@ -5205,68 +5098,337 @@
     "a = 0\n *b(){}",
     "a = 0\n ['b'](){}",
     "get\n a",
-    NULL
+    nullptr
   };
   // clang-format on
 
-  static const ParserFlag always_flags[] = {kAllowHarmonyClassFields};
-  RunParserSyncTest(context_data, class_body_data, kError, NULL, 0,
+  static const ParserFlag always_flags[] = {kAllowHarmonyPublicFields};
+  RunParserSyncTest(context_data, class_body_data, kError, nullptr, 0,
                     always_flags, arraysize(always_flags));
+
+  static const ParserFlag static_flags[] = {kAllowHarmonyPublicFields,
+                                            kAllowHarmonyStaticFields};
+  RunParserSyncTest(context_data, class_body_data, kError, nullptr, 0,
+                    static_flags, arraysize(static_flags));
+}
+
+TEST(PrivateClassFieldsErrors) {
+  // clang-format off
+  // Tests proposed class fields syntax.
+  const char* context_data[][2] = {{"(class {", "});"},
+                                   {"(class extends Base {", "});"},
+                                   {"class C {", "}"},
+                                   {"class C extends Base {", "}"},
+                                   {nullptr, nullptr}};
+  const char* class_body_data[] = {
+    "#a : 0",
+    "#a =",
+    "#*a = 0",
+    "#*a",
+    "#get a",
+    "#yield a",
+    "#async a = 0",
+    "#async a",
+
+    "# a = 0",
+    "#a() { }",
+    "get #a() { }",
+    "#get a() { }",
+    "set #a() { }",
+    "#set a() { }",
+    "*#a() { }",
+    "#*a() { }",
+    "async #a() { }",
+    "async *#a() { }",
+    "async #*a() { }",
+
+    "#0 = 0;",
+    "#0;",
+    "#'a' = 0;",
+    "#'a';",
+
+    "#['a']",
+    "#['a'] = 1",
+    "#[a]",
+    "#[a] = 1",
+
+    "#a = arguments",
+    "#a = () => arguments",
+    "#a = () => { arguments }",
+    "#a = arguments[0]",
+    "#a = delete arguments[0]",
+    "#a = f(arguments)",
+    "#a = () => () => arguments",
+
+    // ASI requires a linebreak
+    "#a b",
+    "#a = 0 b",
+
+    // ASI requires that the next token is not part of any legal production
+    "#a = 0\n *b(){}",
+    "#a = 0\n ['b'](){}",
+    nullptr
+  };
+  // clang-format on
+
+  RunParserSyncTest(context_data, class_body_data, kError);
+
+  static const ParserFlag private_fields[] = {kAllowHarmonyPrivateFields};
+  RunParserSyncTest(context_data, class_body_data, kError, nullptr, 0,
+                    private_fields, arraysize(private_fields));
+}
+
+TEST(PrivateStaticClassFieldsErrors) {
+  // clang-format off
+  // Tests proposed class fields syntax.
+  const char* context_data[][2] = {{"(class {", "});"},
+                                   {"(class extends Base {", "});"},
+                                   {"class C {", "}"},
+                                   {"class C extends Base {", "}"},
+                                   {nullptr, nullptr}};
+  const char* class_body_data[] = {
+    // Basic syntax
+    "static #a = 0;",
+    "static #a = 0; b",
+    "static #a = 0; #b",
+    "static #a = 0; b(){}",
+    "static #a = 0; *b(){}",
+    "static #a = 0; ['b'](){}",
+    "static #a;",
+    "static #a; b;",
+    "static #a; b(){}",
+    "static #a; *b(){}",
+    "static #a; ['b'](){}",
+    "static #['a'] = 0;",
+    "static #['a'] = 0; b",
+    "static #['a'] = 0; #b",
+    "static #['a'] = 0; b(){}",
+    "static #['a'] = 0; *b(){}",
+    "static #['a'] = 0; ['b'](){}",
+    "static #['a'];",
+    "static #['a']; b;",
+    "static #['a']; #b;",
+    "static #['a']; b(){}",
+    "static #['a']; *b(){}",
+    "static #['a']; ['b'](){}",
+
+    "static #0 = 0;",
+    "static #0;",
+    "static #'a' = 0;",
+    "static #'a';",
+
+    "static # a = 0",
+    "static #a() { }",
+    "static get #a() { }",
+    "static #get a() { }",
+    "static set #a() { }",
+    "static #set a() { }",
+    "static *#a() { }",
+    "static #*a() { }",
+    "static async #a() { }",
+    "static async *#a() { }",
+    "static async #*a() { }",
+
+    // ASI
+    "static #a = 0\n",
+    "static #a = 0\n b",
+    "static #a = 0\n #b",
+    "static #a = 0\n b(){}",
+    "static #a\n",
+    "static #a\n b\n",
+    "static #a\n #b\n",
+    "static #a\n b(){}",
+    "static #a\n *b(){}",
+    "static #a\n ['b'](){}",
+    "static #['a'] = 0\n",
+    "static #['a'] = 0\n b",
+    "static #['a'] = 0\n #b",
+    "static #['a'] = 0\n b(){}",
+    "static #['a']\n",
+    "static #['a']\n b\n",
+    "static #['a']\n #b\n",
+    "static #['a']\n b(){}",
+    "static #['a']\n *b(){}",
+    "static #['a']\n ['b'](){}",
+
+    "static #a = function t() { arguments; }",
+    "static #a = () => function t() { arguments; }",
+
+    // ASI edge cases
+    "static #a\n get",
+    "static #get\n *a(){}",
+    "static #a\n static",
+
+    // Misc edge cases
+    "static #yield",
+    "static #yield = 0",
+    "static #yield\n a",
+    "static #async;",
+    "static #async = 0;",
+    "static #async",
+    "static #async = 0",
+    "static #async\n a(){}",  // a field named async, and a method named a.
+    "static #async\n a",
+    "static #await;",
+    "static #await = 0;",
+    "static #await\n a",
+    nullptr
+  };
+  // clang-format on
+
+  RunParserSyncTest(context_data, class_body_data, kError);
+
+  static const ParserFlag public_static_fields[] = {kAllowHarmonyPublicFields,
+                                                    kAllowHarmonyStaticFields};
+  RunParserSyncTest(context_data, class_body_data, kError, nullptr, 0,
+                    public_static_fields, arraysize(public_static_fields));
+
+  static const ParserFlag private_static_fields[] = {
+      kAllowHarmonyPublicFields, kAllowHarmonyStaticFields,
+      kAllowHarmonyPrivateFields};
+  RunParserSyncTest(context_data, class_body_data, kError, nullptr, 0,
+                    private_static_fields, arraysize(private_static_fields));
+}
+
+TEST(PrivateNameNoErrors) {
+  // clang-format off
+  const char* context_data[][2] = {
+      {"", ""},
+      {"\"use strict\";", ""},
+      {nullptr, nullptr}
+  };
+
+  const char* statement_data[] = {
+    "this.#a",
+    "this.#a()",
+    "this.#b.#a",
+    "this.#b.#a()",
+
+    "foo.#a",
+    "foo.#a()",
+    "foo.#b.#a",
+    "foo.#b.#a()",
+
+    "new foo.#a",
+    "new foo.#b.#a",
+    "new foo.#b.#a()",
+
+    "foo.#if;",
+    "foo.#yield;",
+    "foo.#super;",
+    "foo.#interface;",
+    "foo.#eval;",
+    "foo.#arguments;",
+
+    nullptr
+  };
+
+  // clang-format on
+  RunParserSyncTest(context_data, statement_data, kError);
+
+  static const ParserFlag private_fields[] = {kAllowHarmonyPrivateFields};
+  RunParserSyncTest(context_data, statement_data, kSuccess, nullptr, 0,
+                    private_fields, arraysize(private_fields));
+}
+
+TEST(PrivateNameErrors) {
+  // clang-format off
+  const char* context_data[][2] = {
+      {"", ""},
+      {"\"use strict\";", ""},
+      {nullptr, nullptr}
+  };
+
+  const char* statement_data[] = {
+    "#foo",
+    "#foo = 1",
+
+    "# a;",
+    "#\n a;",
+    "a, # b",
+    "a, #, b;",
+
+    "foo.#[a];",
+    "foo.#['a'];",
+
+    "foo()#a",
+    "foo()#[a]",
+    "foo()#['a']",
+
+    "super.#a;",
+    "super.#a = 1;",
+    "super.#['a']",
+    "super.#[a]",
+
+    "new.#a",
+    "new.#[a]",
+
+    "foo.#{;",
+    "foo.#};",
+    "foo.#=;",
+    "foo.#888;",
+    "foo.#-;",
+    "foo.#--;",
+    nullptr
+  };
+
+  // clang-format on
+  RunParserSyncTest(context_data, statement_data, kError);
+
+  static const ParserFlag private_fields[] = {kAllowHarmonyPrivateFields};
+  RunParserSyncTest(context_data, statement_data, kError, nullptr, 0,
+                    private_fields, arraysize(private_fields));
 }
 
 TEST(ClassExpressionErrors) {
-  const char* context_data[][2] = {{"(", ");"},
-                                   {"var C = ", ";"},
-                                   {"bar, ", ";"},
-                                   {NULL, NULL}};
+  const char* context_data[][2] = {
+      {"(", ");"}, {"var C = ", ";"}, {"bar, ", ";"}, {nullptr, nullptr}};
   const char* class_data[] = {
-    "class",
-    "class name",
-    "class name extends",
-    "class extends",
-    "class {",
-    "class { m }",
-    "class { m; n }",
-    "class { m: 1 }",
-    "class { m(); n() }",
-    "class { get m }",
-    "class { get m() }",
-    "class { get m() { }",
-    "class { set m() {} }",  // Missing required parameter.
-    "class { m() {}, n() {} }",  // No commas allowed.
-    NULL};
+      "class",
+      "class name",
+      "class name extends",
+      "class extends",
+      "class {",
+      "class { m }",
+      "class { m; n }",
+      "class { m: 1 }",
+      "class { m(); n() }",
+      "class { get m }",
+      "class { get m() }",
+      "class { get m() { }",
+      "class { set m() {} }",      // Missing required parameter.
+      "class { m() {}, n() {} }",  // No commas allowed.
+      nullptr};
 
   RunParserSyncTest(context_data, class_data, kError);
 }
 
 
 TEST(ClassDeclarationErrors) {
-  const char* context_data[][2] = {{"", ""},
-                                   {"{", "}"},
-                                   {"if (true) {", "}"},
-                                   {NULL, NULL}};
+  const char* context_data[][2] = {
+      {"", ""}, {"{", "}"}, {"if (true) {", "}"}, {nullptr, nullptr}};
   const char* class_data[] = {
-    "class",
-    "class name",
-    "class name extends",
-    "class extends",
-    "class name {",
-    "class name { m }",
-    "class name { m; n }",
-    "class name { m: 1 }",
-    "class name { m(); n() }",
-    "class name { get x }",
-    "class name { get x() }",
-    "class name { set x() {) }",  // missing required param
-    "class {}",  // Name is required for declaration
-    "class extends base {}",
-    "class name { *",
-    "class name { * }",
-    "class name { *; }",
-    "class name { *get x() {} }",
-    "class name { *set x(_) {} }",
-    "class name { *static m() {} }",
-    NULL};
+      "class",
+      "class name",
+      "class name extends",
+      "class extends",
+      "class name {",
+      "class name { m }",
+      "class name { m; n }",
+      "class name { m: 1 }",
+      "class name { m(); n() }",
+      "class name { get x }",
+      "class name { get x() }",
+      "class name { set x() {) }",  // missing required param
+      "class {}",                   // Name is required for declaration
+      "class extends base {}",
+      "class name { *",
+      "class name { * }",
+      "class name { *; }",
+      "class name { *get x() {} }",
+      "class name { *set x(_) {} }",
+      "class name { *static m() {} }",
+      nullptr};
 
   RunParserSyncTest(context_data, class_data, kError);
 }
@@ -5277,11 +5439,10 @@
                                    {"(class extends Base {", "});"},
                                    {"class C {", "}"},
                                    {"class C extends Base {", "}"},
-                                   {NULL, NULL}};
+                                   {nullptr, nullptr}};
   const char* async_data[] = {
     "*async x(){}",
     "async *(){}",
-    "async *x(){}",
     "async get x(){}",
     "async set x(y){}",
     "async x : 0",
@@ -5291,12 +5452,11 @@
 
     "static *async x(){}",
     "static async *(){}",
-    "static async *x(){}",
     "static async get x(){}",
     "static async set x(y){}",
     "static async x : 0",
     "static async : 0",
-    NULL
+    nullptr
   };
   // clang-format on
 
@@ -5308,21 +5468,11 @@
                                    {"(class ", "{});"},
                                    {"'use strict'; class ", "{}"},
                                    {"'use strict'; (class ", "{});"},
-                                   {NULL, NULL}};
-  const char* class_name[] = {
-    "arguments",
-    "eval",
-    "implements",
-    "interface",
-    "let",
-    "package",
-    "private",
-    "protected",
-    "public",
-    "static",
-    "var",
-    "yield",
-    NULL};
+                                   {nullptr, nullptr}};
+  const char* class_name[] = {"arguments", "eval",    "implements", "interface",
+                              "let",       "package", "private",    "protected",
+                              "public",    "static",  "var",        "yield",
+                              nullptr};
 
   RunParserSyncTest(context_data, class_name, kError);
 }
@@ -5330,243 +5480,163 @@
 
 TEST(ClassGetterParamNameErrors) {
   const char* context_data[][2] = {
-    {"class C { get name(", ") {} }"},
-    {"(class { get name(", ") {} });"},
-    {"'use strict'; class C { get name(", ") {} }"},
-    {"'use strict'; (class { get name(", ") {} })"},
-    {NULL, NULL}
-  };
+      {"class C { get name(", ") {} }"},
+      {"(class { get name(", ") {} });"},
+      {"'use strict'; class C { get name(", ") {} }"},
+      {"'use strict'; (class { get name(", ") {} })"},
+      {nullptr, nullptr}};
 
-  const char* class_name[] = {
-    "arguments",
-    "eval",
-    "implements",
-    "interface",
-    "let",
-    "package",
-    "private",
-    "protected",
-    "public",
-    "static",
-    "var",
-    "yield",
-    NULL};
+  const char* class_name[] = {"arguments", "eval",    "implements", "interface",
+                              "let",       "package", "private",    "protected",
+                              "public",    "static",  "var",        "yield",
+                              nullptr};
 
   RunParserSyncTest(context_data, class_name, kError);
 }
 
 
 TEST(ClassStaticPrototypeErrors) {
-  const char* context_data[][2] = {{"class C {", "}"},
-                                   {"(class {", "});"},
-                                   {NULL, NULL}};
+  const char* context_data[][2] = {
+      {"class C {", "}"}, {"(class {", "});"}, {nullptr, nullptr}};
 
-  const char* class_body_data[] = {
-    "static prototype() {}",
-    "static get prototype() {}",
-    "static set prototype(_) {}",
-    "static *prototype() {}",
-    "static 'prototype'() {}",
-    "static *'prototype'() {}",
-    "static prot\\u006ftype() {}",
-    "static 'prot\\u006ftype'() {}",
-    "static get 'prot\\u006ftype'() {}",
-    "static set 'prot\\u006ftype'(_) {}",
-    "static *'prot\\u006ftype'() {}",
-    NULL};
+  const char* class_body_data[] = {"static prototype() {}",
+                                   "static get prototype() {}",
+                                   "static set prototype(_) {}",
+                                   "static *prototype() {}",
+                                   "static 'prototype'() {}",
+                                   "static *'prototype'() {}",
+                                   "static prot\\u006ftype() {}",
+                                   "static 'prot\\u006ftype'() {}",
+                                   "static get 'prot\\u006ftype'() {}",
+                                   "static set 'prot\\u006ftype'(_) {}",
+                                   "static *'prot\\u006ftype'() {}",
+                                   nullptr};
 
   RunParserSyncTest(context_data, class_body_data, kError);
 }
 
 
 TEST(ClassSpecialConstructorErrors) {
-  const char* context_data[][2] = {{"class C {", "}"},
-                                   {"(class {", "});"},
-                                   {NULL, NULL}};
+  const char* context_data[][2] = {
+      {"class C {", "}"}, {"(class {", "});"}, {nullptr, nullptr}};
 
-  const char* class_body_data[] = {
-    "get constructor() {}",
-    "get constructor(_) {}",
-    "*constructor() {}",
-    "get 'constructor'() {}",
-    "*'constructor'() {}",
-    "get c\\u006fnstructor() {}",
-    "*c\\u006fnstructor() {}",
-    "get 'c\\u006fnstructor'() {}",
-    "get 'c\\u006fnstructor'(_) {}",
-    "*'c\\u006fnstructor'() {}",
-    NULL};
+  const char* class_body_data[] = {"get constructor() {}",
+                                   "get constructor(_) {}",
+                                   "*constructor() {}",
+                                   "get 'constructor'() {}",
+                                   "*'constructor'() {}",
+                                   "get c\\u006fnstructor() {}",
+                                   "*c\\u006fnstructor() {}",
+                                   "get 'c\\u006fnstructor'() {}",
+                                   "get 'c\\u006fnstructor'(_) {}",
+                                   "*'c\\u006fnstructor'() {}",
+                                   nullptr};
 
   RunParserSyncTest(context_data, class_body_data, kError);
 }
 
 
 TEST(ClassConstructorNoErrors) {
-  const char* context_data[][2] = {{"class C {", "}"},
-                                   {"(class {", "});"},
-                                   {NULL, NULL}};
+  const char* context_data[][2] = {
+      {"class C {", "}"}, {"(class {", "});"}, {nullptr, nullptr}};
 
-  const char* class_body_data[] = {
-    "constructor() {}",
-    "static constructor() {}",
-    "static get constructor() {}",
-    "static set constructor(_) {}",
-    "static *constructor() {}",
-    NULL};
+  const char* class_body_data[] = {"constructor() {}",
+                                   "static constructor() {}",
+                                   "static get constructor() {}",
+                                   "static set constructor(_) {}",
+                                   "static *constructor() {}",
+                                   nullptr};
 
   RunParserSyncTest(context_data, class_body_data, kSuccess);
 }
 
 
 TEST(ClassMultipleConstructorErrors) {
-  const char* context_data[][2] = {{"class C {", "}"},
-                                   {"(class {", "});"},
-                                   {NULL, NULL}};
+  const char* context_data[][2] = {
+      {"class C {", "}"}, {"(class {", "});"}, {nullptr, nullptr}};
 
-  const char* class_body_data[] = {
-    "constructor() {}; constructor() {}",
-    NULL};
+  const char* class_body_data[] = {"constructor() {}; constructor() {}",
+                                   nullptr};
 
   RunParserSyncTest(context_data, class_body_data, kError);
 }
 
 
 TEST(ClassMultiplePropertyNamesNoErrors) {
-  const char* context_data[][2] = {{"class C {", "}"},
-                                   {"(class {", "});"},
-                                   {NULL, NULL}};
+  const char* context_data[][2] = {
+      {"class C {", "}"}, {"(class {", "});"}, {nullptr, nullptr}};
 
   const char* class_body_data[] = {
-    "constructor() {}; static constructor() {}",
-    "m() {}; static m() {}",
-    "m() {}; m() {}",
-    "static m() {}; static m() {}",
-    "get m() {}; set m(_) {}; get m() {}; set m(_) {};",
-    NULL};
+      "constructor() {}; static constructor() {}",
+      "m() {}; static m() {}",
+      "m() {}; m() {}",
+      "static m() {}; static m() {}",
+      "get m() {}; set m(_) {}; get m() {}; set m(_) {};",
+      nullptr};
 
   RunParserSyncTest(context_data, class_body_data, kSuccess);
 }
 
 
 TEST(ClassesAreStrictErrors) {
-  const char* context_data[][2] = {{"", ""},
-                                   {"(", ");"},
-                                   {NULL, NULL}};
+  const char* context_data[][2] = {{"", ""}, {"(", ");"}, {nullptr, nullptr}};
 
   const char* class_body_data[] = {
-    "class C { method() { with ({}) {} } }",
-    "class C extends function() { with ({}) {} } {}",
-    "class C { *method() { with ({}) {} } }",
-    NULL};
+      "class C { method() { with ({}) {} } }",
+      "class C extends function() { with ({}) {} } {}",
+      "class C { *method() { with ({}) {} } }", nullptr};
 
   RunParserSyncTest(context_data, class_body_data, kError);
 }
 
 
 TEST(ObjectLiteralPropertyShorthandKeywordsError) {
-  const char* context_data[][2] = {{"({", "});"},
-                                   {"'use strict'; ({", "});"},
-                                   {NULL, NULL}};
+  const char* context_data[][2] = {
+      {"({", "});"}, {"'use strict'; ({", "});"}, {nullptr, nullptr}};
 
   const char* name_data[] = {
-    "break",
-    "case",
-    "catch",
-    "class",
-    "const",
-    "continue",
-    "debugger",
-    "default",
-    "delete",
-    "do",
-    "else",
-    "enum",
-    "export",
-    "extends",
-    "false",
-    "finally",
-    "for",
-    "function",
-    "if",
-    "import",
-    "in",
-    "instanceof",
-    "new",
-    "null",
-    "return",
-    "super",
-    "switch",
-    "this",
-    "throw",
-    "true",
-    "try",
-    "typeof",
-    "var",
-    "void",
-    "while",
-    "with",
-    NULL
-  };
+      "break",    "case",    "catch",  "class",      "const", "continue",
+      "debugger", "default", "delete", "do",         "else",  "enum",
+      "export",   "extends", "false",  "finally",    "for",   "function",
+      "if",       "import",  "in",     "instanceof", "new",   "null",
+      "return",   "super",   "switch", "this",       "throw", "true",
+      "try",      "typeof",  "var",    "void",       "while", "with",
+      nullptr};
 
   RunParserSyncTest(context_data, name_data, kError);
 }
 
 
 TEST(ObjectLiteralPropertyShorthandStrictKeywords) {
-  const char* context_data[][2] = {{"({", "});"},
-                                   {NULL, NULL}};
+  const char* context_data[][2] = {{"({", "});"}, {nullptr, nullptr}};
 
-  const char* name_data[] = {
-    "implements",
-    "interface",
-    "let",
-    "package",
-    "private",
-    "protected",
-    "public",
-    "static",
-    "yield",
-    NULL
-  };
+  const char* name_data[] = {"implements", "interface", "let",    "package",
+                             "private",    "protected", "public", "static",
+                             "yield",      nullptr};
 
   RunParserSyncTest(context_data, name_data, kSuccess);
 
   const char* context_strict_data[][2] = {{"'use strict'; ({", "});"},
-                                          {NULL, NULL}};
+                                          {nullptr, nullptr}};
   RunParserSyncTest(context_strict_data, name_data, kError);
 }
 
 
 TEST(ObjectLiteralPropertyShorthandError) {
-  const char* context_data[][2] = {{"({", "});"},
-                                   {"'use strict'; ({", "});"},
-                                   {NULL, NULL}};
+  const char* context_data[][2] = {
+      {"({", "});"}, {"'use strict'; ({", "});"}, {nullptr, nullptr}};
 
-  const char* name_data[] = {
-    "1",
-    "1.2",
-    "0",
-    "0.1",
-    "1.0",
-    "1e1",
-    "0x1",
-    "\"s\"",
-    "'s'",
-    NULL
-  };
+  const char* name_data[] = {"1",   "1.2", "0",     "0.1", "1.0",
+                             "1e1", "0x1", "\"s\"", "'s'", nullptr};
 
   RunParserSyncTest(context_data, name_data, kError);
 }
 
 
 TEST(ObjectLiteralPropertyShorthandYieldInGeneratorError) {
-  const char* context_data[][2] = {{"", ""},
-                                   {NULL, NULL}};
+  const char* context_data[][2] = {{"", ""}, {nullptr, nullptr}};
 
-  const char* name_data[] = {
-    "function* g() { ({yield}); }",
-    NULL
-  };
+  const char* name_data[] = {"function* g() { ({yield}); }", nullptr};
 
   RunParserSyncTest(context_data, name_data, kError);
 }
@@ -5575,14 +5645,11 @@
 TEST(ConstParsingInForIn) {
   const char* context_data[][2] = {{"'use strict';", ""},
                                    {"function foo(){ 'use strict';", "}"},
-                                   {NULL, NULL}};
+                                   {nullptr, nullptr}};
 
   const char* data[] = {
-      "for(const x = 1; ; ) {}",
-      "for(const x = 1, y = 2;;){}",
-      "for(const x in [1,2,3]) {}",
-      "for(const x of [1,2,3]) {}",
-      NULL};
+      "for(const x = 1; ; ) {}", "for(const x = 1, y = 2;;){}",
+      "for(const x in [1,2,3]) {}", "for(const x of [1,2,3]) {}", nullptr};
   RunParserSyncTest(context_data, data, kSuccess, nullptr, 0, nullptr, 0);
 }
 
@@ -5591,11 +5658,11 @@
   const char* context_data[][2] = {{"", ""},
                                    {"'use strict';", ""},
                                    {"function foo(){ 'use strict';", "}"},
-                                   {NULL, NULL}};
+                                   {nullptr, nullptr}};
 
   const char* data[] = {"for(x in {}, {}) {}", "for(var x in {}, {}) {}",
                         "for(let x in {}, {}) {}", "for(const x in {}, {}) {}",
-                        NULL};
+                        nullptr};
 
   RunParserSyncTest(context_data, data, kSuccess);
 }
@@ -5604,19 +5671,14 @@
 TEST(ConstParsingInForInError) {
   const char* context_data[][2] = {{"'use strict';", ""},
                                    {"function foo(){ 'use strict';", "}"},
-                                   {NULL, NULL}};
+                                   {nullptr, nullptr}};
 
   const char* data[] = {
-      "for(const x,y = 1; ; ) {}",
-      "for(const x = 4 in [1,2,3]) {}",
-      "for(const x = 4, y in [1,2,3]) {}",
-      "for(const x = 4 of [1,2,3]) {}",
-      "for(const x = 4, y of [1,2,3]) {}",
-      "for(const x = 1, y = 2 in []) {}",
-      "for(const x,y in []) {}",
-      "for(const x = 1, y = 2 of []) {}",
-      "for(const x,y of []) {}",
-      NULL};
+      "for(const x,y = 1; ; ) {}",         "for(const x = 4 in [1,2,3]) {}",
+      "for(const x = 4, y in [1,2,3]) {}", "for(const x = 4 of [1,2,3]) {}",
+      "for(const x = 4, y of [1,2,3]) {}", "for(const x = 1, y = 2 in []) {}",
+      "for(const x,y in []) {}",           "for(const x = 1, y = 2 of []) {}",
+      "for(const x,y of []) {}",           nullptr};
   RunParserSyncTest(context_data, data, kError, nullptr, 0, nullptr, 0);
 }
 
@@ -5680,24 +5742,23 @@
                                    {"function foo(){", "}"},
                                    {"'use strict';", ""},
                                    {"function foo(){ 'use strict';", "}"},
-                                   {NULL, NULL}};
+                                   {nullptr, nullptr}};
 
-  const char* data[] = {
-      "for (var i, j in {}) {}",
-      "for (var i, j in [1, 2, 3]) {}",
-      "for (var i, j = 1 in {}) {}",
-      "for (var i, j = void 0 in [1, 2, 3]) {}",
+  const char* data[] = {"for (var i, j in {}) {}",
+                        "for (var i, j in [1, 2, 3]) {}",
+                        "for (var i, j = 1 in {}) {}",
+                        "for (var i, j = void 0 in [1, 2, 3]) {}",
 
-      "for (let i, j in {}) {}",
-      "for (let i, j in [1, 2, 3]) {}",
-      "for (let i, j = 1 in {}) {}",
-      "for (let i, j = void 0 in [1, 2, 3]) {}",
+                        "for (let i, j in {}) {}",
+                        "for (let i, j in [1, 2, 3]) {}",
+                        "for (let i, j = 1 in {}) {}",
+                        "for (let i, j = void 0 in [1, 2, 3]) {}",
 
-      "for (const i, j in {}) {}",
-      "for (const i, j in [1, 2, 3]) {}",
-      "for (const i, j = 1 in {}) {}",
-      "for (const i, j = void 0 in [1, 2, 3]) {}",
-      NULL};
+                        "for (const i, j in {}) {}",
+                        "for (const i, j in [1, 2, 3]) {}",
+                        "for (const i, j = 1 in {}) {}",
+                        "for (const i, j = void 0 in [1, 2, 3]) {}",
+                        nullptr};
   RunParserSyncTest(context_data, data, kError);
 }
 
@@ -5707,24 +5768,23 @@
                                    {"function foo(){", "}"},
                                    {"'use strict';", ""},
                                    {"function foo(){ 'use strict';", "}"},
-                                   {NULL, NULL}};
+                                   {nullptr, nullptr}};
 
-  const char* data[] = {
-      "for (var i, j of {}) {}",
-      "for (var i, j of [1, 2, 3]) {}",
-      "for (var i, j = 1 of {}) {}",
-      "for (var i, j = void 0 of [1, 2, 3]) {}",
+  const char* data[] = {"for (var i, j of {}) {}",
+                        "for (var i, j of [1, 2, 3]) {}",
+                        "for (var i, j = 1 of {}) {}",
+                        "for (var i, j = void 0 of [1, 2, 3]) {}",
 
-      "for (let i, j of {}) {}",
-      "for (let i, j of [1, 2, 3]) {}",
-      "for (let i, j = 1 of {}) {}",
-      "for (let i, j = void 0 of [1, 2, 3]) {}",
+                        "for (let i, j of {}) {}",
+                        "for (let i, j of [1, 2, 3]) {}",
+                        "for (let i, j = 1 of {}) {}",
+                        "for (let i, j = void 0 of [1, 2, 3]) {}",
 
-      "for (const i, j of {}) {}",
-      "for (const i, j of [1, 2, 3]) {}",
-      "for (const i, j = 1 of {}) {}",
-      "for (const i, j = void 0 of [1, 2, 3]) {}",
-      NULL};
+                        "for (const i, j of {}) {}",
+                        "for (const i, j of [1, 2, 3]) {}",
+                        "for (const i, j = 1 of {}) {}",
+                        "for (const i, j = void 0 of [1, 2, 3]) {}",
+                        nullptr};
   RunParserSyncTest(context_data, data, kError);
 }
 
@@ -5734,12 +5794,9 @@
                                    {"function foo(){", "}"},
                                    {"'use strict';", ""},
                                    {"function foo(){ 'use strict';", "}"},
-                                   {NULL, NULL}};
+                                   {nullptr, nullptr}};
 
-  const char* data[] = {
-      "for (var in {}) {}",
-      "for (const in {}) {}",
-      NULL};
+  const char* data[] = {"for (var in {}) {}", "for (const in {}) {}", nullptr};
   RunParserSyncTest(context_data, data, kError);
 }
 
@@ -5749,12 +5806,10 @@
                                    {"function foo(){", "}"},
                                    {"'use strict';", ""},
                                    {"function foo(){ 'use strict';", "}"},
-                                   {NULL, NULL}};
+                                   {nullptr, nullptr}};
 
-  const char* data[] = {
-      "for (var of [1, 2, 3]) {}",
-      "for (const of [1, 2, 3]) {}",
-      NULL};
+  const char* data[] = {"for (var of [1, 2, 3]) {}",
+                        "for (const of [1, 2, 3]) {}", nullptr};
   RunParserSyncTest(context_data, data, kError);
 }
 
@@ -5763,22 +5818,23 @@
   const char* context_data[][2] = {{"", ""},
                                    {"'use strict';", ""},
                                    {"function foo(){ 'use strict';", "}"},
-                                   {NULL, NULL}};
+                                   {nullptr, nullptr}};
 
-  const char* data[] = {
-      "for(x of 'foo' in {}) {}", "for(var x of 'foo' in {}) {}",
-      "for(let x of 'foo' in {}) {}", "for(const x of 'foo' in {}) {}", NULL};
+  const char* data[] = {"for(x of 'foo' in {}) {}",
+                        "for(var x of 'foo' in {}) {}",
+                        "for(let x of 'foo' in {}) {}",
+                        "for(const x of 'foo' in {}) {}", nullptr};
 
   RunParserSyncTest(context_data, data, kSuccess);
 }
 
 
 TEST(ForOfYieldIdentifier) {
-  const char* context_data[][2] = {{"", ""}, {NULL, NULL}};
+  const char* context_data[][2] = {{"", ""}, {nullptr, nullptr}};
 
   const char* data[] = {"for(x of yield) {}", "for(var x of yield) {}",
                         "for(let x of yield) {}", "for(const x of yield) {}",
-                        NULL};
+                        nullptr};
 
   RunParserSyncTest(context_data, data, kSuccess);
 }
@@ -5788,12 +5844,12 @@
   const char* context_data[][2] = {{"", ""},
                                    {"'use strict';", ""},
                                    {"function foo(){ 'use strict';", "}"},
-                                   {NULL, NULL}};
+                                   {nullptr, nullptr}};
 
   const char* data[] = {"function* g() { for(x of yield) {} }",
                         "function* g() { for(var x of yield) {} }",
                         "function* g() { for(let x of yield) {} }",
-                        "function* g() { for(const x of yield) {} }", NULL};
+                        "function* g() { for(const x of yield) {} }", nullptr};
 
   RunParserSyncTest(context_data, data, kSuccess);
 }
@@ -5803,7 +5859,7 @@
   const char* context_data[][2] = {{"", ""},
                                    {"'use strict';", ""},
                                    {"function foo(){ 'use strict';", "}"},
-                                   {NULL, NULL}};
+                                   {nullptr, nullptr}};
 
   const char* data[] = {
       "for(x of [], []) {}", "for(var x of [], []) {}",
@@ -5811,77 +5867,60 @@
 
       // AssignmentExpression should be validated statically:
       "for(x of { y = 23 }) {}", "for(var x of { y = 23 }) {}",
-      "for(let x of { y = 23 }) {}", "for(const x of { y = 23 }) {}", NULL};
+      "for(let x of { y = 23 }) {}", "for(const x of { y = 23 }) {}", nullptr};
 
   RunParserSyncTest(context_data, data, kError);
 }
 
 
 TEST(InvalidUnicodeEscapes) {
-  const char* context_data[][2] = {{"", ""},
-                                   {"'use strict';", ""},
-                                   {NULL, NULL}};
+  const char* context_data[][2] = {
+      {"", ""}, {"'use strict';", ""}, {nullptr, nullptr}};
   const char* data[] = {
-    "var foob\\u123r = 0;",
-    "var \\u123roo = 0;",
-    "\"foob\\u123rr\"",
-    // No escapes allowed in regexp flags
-    "/regex/\\u0069g",
-    "/regex/\\u006g",
-    // Braces gone wrong
-    "var foob\\u{c481r = 0;",
-    "var foob\\uc481}r = 0;",
-    "var \\u{0052oo = 0;",
-    "var \\u0052}oo = 0;",
-    "\"foob\\u{c481r\"",
-    "var foob\\u{}ar = 0;",
-    // Too high value for the unicode escape
-    "\"\\u{110000}\"",
-    // Not an unicode escape
-    "var foob\\v1234r = 0;",
-    "var foob\\U1234r = 0;",
-    "var foob\\v{1234}r = 0;",
-    "var foob\\U{1234}r = 0;",
-    NULL};
+      "var foob\\u123r = 0;", "var \\u123roo = 0;", "\"foob\\u123rr\"",
+      // No escapes allowed in regexp flags
+      "/regex/\\u0069g", "/regex/\\u006g",
+      // Braces gone wrong
+      "var foob\\u{c481r = 0;", "var foob\\uc481}r = 0;", "var \\u{0052oo = 0;",
+      "var \\u0052}oo = 0;", "\"foob\\u{c481r\"", "var foob\\u{}ar = 0;",
+      // Too high value for the Unicode code point escape
+      "\"\\u{110000}\"",
+      // Not a Unicode code point escape
+      "var foob\\v1234r = 0;", "var foob\\U1234r = 0;",
+      "var foob\\v{1234}r = 0;", "var foob\\U{1234}r = 0;", nullptr};
   RunParserSyncTest(context_data, data, kError);
 }
 
 
 TEST(UnicodeEscapes) {
-  const char* context_data[][2] = {{"", ""},
-                                   {"'use strict';", ""},
-                                   {NULL, NULL}};
+  const char* context_data[][2] = {
+      {"", ""}, {"'use strict';", ""}, {nullptr, nullptr}};
   const char* data[] = {
-    // Identifier starting with escape
-    "var \\u0052oo = 0;",
-    "var \\u{0052}oo = 0;",
-    "var \\u{52}oo = 0;",
-    "var \\u{00000000052}oo = 0;",
-    // Identifier with an escape but not starting with an escape
-    "var foob\\uc481r = 0;",
-    "var foob\\u{c481}r = 0;",
-    // String with an escape
-    "\"foob\\uc481r\"",
-    "\"foob\\{uc481}r\"",
-    // This character is a valid unicode character, representable as a surrogate
-    // pair, not representable as 4 hex digits.
-    "\"foo\\u{10e6d}\"",
-    // Max value for the unicode escape
-    "\"\\u{10ffff}\"",
-    NULL};
+      // Identifier starting with escape
+      "var \\u0052oo = 0;", "var \\u{0052}oo = 0;", "var \\u{52}oo = 0;",
+      "var \\u{00000000052}oo = 0;",
+      // Identifier with an escape but not starting with an escape
+      "var foob\\uc481r = 0;", "var foob\\u{c481}r = 0;",
+      // String with an escape
+      "\"foob\\uc481r\"", "\"foob\\{uc481}r\"",
+      // This character is a valid Unicode character, representable as a
+      // surrogate pair, not representable as 4 hex digits.
+      "\"foo\\u{10e6d}\"",
+      // Max value for the Unicode code point escape
+      "\"\\u{10ffff}\"", nullptr};
   RunParserSyncTest(context_data, data, kSuccess);
 }
 
 TEST(OctalEscapes) {
   const char* sloppy_context_data[][2] = {{"", ""},    // as a directive
                                           {"0;", ""},  // as a string literal
-                                          {NULL, NULL}};
+                                          {nullptr, nullptr}};
 
   const char* strict_context_data[][2] = {
       {"'use strict';", ""},     // as a directive before 'use strict'
       {"", ";'use strict';"},    // as a directive after 'use strict'
       {"'use strict'; 0;", ""},  // as a string literal
-      {NULL, NULL}};
+      {nullptr, nullptr}};
 
   // clang-format off
   const char* data[] = {
@@ -5890,7 +5929,7 @@
     "'\\001'",
     "'\\08'",
     "'\\09'",
-    NULL};
+    nullptr};
   // clang-format on
 
   // Permitted in sloppy mode
@@ -5903,33 +5942,33 @@
 TEST(ScanTemplateLiterals) {
   const char* context_data[][2] = {{"'use strict';", ""},
                                    {"function foo(){ 'use strict';"
-                                    "  var a, b, c; return ", "}"},
-                                   {NULL, NULL}};
+                                    "  var a, b, c; return ",
+                                    "}"},
+                                   {nullptr, nullptr}};
 
-  const char* data[] = {
-      "``",
-      "`no-subst-template`",
-      "`template-head${a}`",
-      "`${a}`",
-      "`${a}template-tail`",
-      "`template-head${a}template-tail`",
-      "`${a}${b}${c}`",
-      "`a${a}b${b}c${c}`",
-      "`${a}a${b}b${c}c`",
-      "`foo\n\nbar\r\nbaz`",
-      "`foo\n\n${  bar  }\r\nbaz`",
-      "`foo${a /* comment */}`",
-      "`foo${a // comment\n}`",
-      "`foo${a \n}`",
-      "`foo${a \r\n}`",
-      "`foo${a \r}`",
-      "`foo${/* comment */ a}`",
-      "`foo${// comment\na}`",
-      "`foo${\n a}`",
-      "`foo${\r\n a}`",
-      "`foo${\r a}`",
-      "`foo${'a' in a}`",
-      NULL};
+  const char* data[] = {"``",
+                        "`no-subst-template`",
+                        "`template-head${a}`",
+                        "`${a}`",
+                        "`${a}template-tail`",
+                        "`template-head${a}template-tail`",
+                        "`${a}${b}${c}`",
+                        "`a${a}b${b}c${c}`",
+                        "`${a}a${b}b${c}c`",
+                        "`foo\n\nbar\r\nbaz`",
+                        "`foo\n\n${  bar  }\r\nbaz`",
+                        "`foo${a /* comment */}`",
+                        "`foo${a // comment\n}`",
+                        "`foo${a \n}`",
+                        "`foo${a \r\n}`",
+                        "`foo${a \r}`",
+                        "`foo${/* comment */ a}`",
+                        "`foo${// comment\na}`",
+                        "`foo${\n a}`",
+                        "`foo${\r\n a}`",
+                        "`foo${\r a}`",
+                        "`foo${'a' in a}`",
+                        nullptr};
   RunParserSyncTest(context_data, data, kSuccess);
 }
 
@@ -5938,59 +5977,48 @@
   const char* context_data[][2] = {{"'use strict';", ""},
                                    {"function foo(){ 'use strict';"
                                     "  function tag() {}"
-                                    "  var a, b, c; return ", "}"},
-                                   {NULL, NULL}};
+                                    "  var a, b, c; return ",
+                                    "}"},
+                                   {nullptr, nullptr}};
 
-  const char* data[] = {
-      "tag ``",
-      "tag `no-subst-template`",
-      "tag`template-head${a}`",
-      "tag `${a}`",
-      "tag `${a}template-tail`",
-      "tag   `template-head${a}template-tail`",
-      "tag\n`${a}${b}${c}`",
-      "tag\r\n`a${a}b${b}c${c}`",
-      "tag    `${a}a${b}b${c}c`",
-      "tag\t`foo\n\nbar\r\nbaz`",
-      "tag\r`foo\n\n${  bar  }\r\nbaz`",
-      "tag`foo${a /* comment */}`",
-      "tag`foo${a // comment\n}`",
-      "tag`foo${a \n}`",
-      "tag`foo${a \r\n}`",
-      "tag`foo${a \r}`",
-      "tag`foo${/* comment */ a}`",
-      "tag`foo${// comment\na}`",
-      "tag`foo${\n a}`",
-      "tag`foo${\r\n a}`",
-      "tag`foo${\r a}`",
-      "tag`foo${'a' in a}`",
-      NULL};
+  const char* data[] = {"tag ``",
+                        "tag `no-subst-template`",
+                        "tag`template-head${a}`",
+                        "tag `${a}`",
+                        "tag `${a}template-tail`",
+                        "tag   `template-head${a}template-tail`",
+                        "tag\n`${a}${b}${c}`",
+                        "tag\r\n`a${a}b${b}c${c}`",
+                        "tag    `${a}a${b}b${c}c`",
+                        "tag\t`foo\n\nbar\r\nbaz`",
+                        "tag\r`foo\n\n${  bar  }\r\nbaz`",
+                        "tag`foo${a /* comment */}`",
+                        "tag`foo${a // comment\n}`",
+                        "tag`foo${a \n}`",
+                        "tag`foo${a \r\n}`",
+                        "tag`foo${a \r}`",
+                        "tag`foo${/* comment */ a}`",
+                        "tag`foo${// comment\na}`",
+                        "tag`foo${\n a}`",
+                        "tag`foo${\r\n a}`",
+                        "tag`foo${\r a}`",
+                        "tag`foo${'a' in a}`",
+                        nullptr};
   RunParserSyncTest(context_data, data, kSuccess);
 }
 
 
 TEST(TemplateMaterializedLiterals) {
-  const char* context_data[][2] = {
-    {
-      "'use strict';\n"
-      "function tag() {}\n"
-      "var a, b, c;\n"
-      "(", ")"
-    },
-    {NULL, NULL}
-  };
+  const char* context_data[][2] = {{"'use strict';\n"
+                                    "function tag() {}\n"
+                                    "var a, b, c;\n"
+                                    "(",
+                                    ")"},
+                                   {nullptr, nullptr}};
 
-  const char* data[] = {
-    "tag``",
-    "tag`a`",
-    "tag`a${1}b`",
-    "tag`a${1}b${2}c`",
-    "``",
-    "`a`",
-    "`a${1}b`",
-    "`a${1}b${2}c`",
-    NULL
-  };
+  const char* data[] = {"tag``", "tag`a`", "tag`a${1}b`", "tag`a${1}b${2}c`",
+                        "``",    "`a`",    "`a${1}b`",    "`a${1}b${2}c`",
+                        nullptr};
 
   RunParserSyncTest(context_data, data, kSuccess);
 }
@@ -5999,33 +6027,33 @@
 TEST(ScanUnterminatedTemplateLiterals) {
   const char* context_data[][2] = {{"'use strict';", ""},
                                    {"function foo(){ 'use strict';"
-                                    "  var a, b, c; return ", "}"},
-                                   {NULL, NULL}};
+                                    "  var a, b, c; return ",
+                                    "}"},
+                                   {nullptr, nullptr}};
 
-  const char* data[] = {
-      "`no-subst-template",
-      "`template-head${a}",
-      "`${a}template-tail",
-      "`template-head${a}template-tail",
-      "`${a}${b}${c}",
-      "`a${a}b${b}c${c}",
-      "`${a}a${b}b${c}c",
-      "`foo\n\nbar\r\nbaz",
-      "`foo\n\n${  bar  }\r\nbaz",
-      "`foo${a /* comment } */`",
-      "`foo${a /* comment } `*/",
-      "`foo${a // comment}`",
-      "`foo${a \n`",
-      "`foo${a \r\n`",
-      "`foo${a \r`",
-      "`foo${/* comment */ a`",
-      "`foo${// commenta}`",
-      "`foo${\n a`",
-      "`foo${\r\n a`",
-      "`foo${\r a`",
-      "`foo${fn(}`",
-      "`foo${1 if}`",
-      NULL};
+  const char* data[] = {"`no-subst-template",
+                        "`template-head${a}",
+                        "`${a}template-tail",
+                        "`template-head${a}template-tail",
+                        "`${a}${b}${c}",
+                        "`a${a}b${b}c${c}",
+                        "`${a}a${b}b${c}c",
+                        "`foo\n\nbar\r\nbaz",
+                        "`foo\n\n${  bar  }\r\nbaz",
+                        "`foo${a /* comment } */`",
+                        "`foo${a /* comment } `*/",
+                        "`foo${a // comment}`",
+                        "`foo${a \n`",
+                        "`foo${a \r\n`",
+                        "`foo${a \r`",
+                        "`foo${/* comment */ a`",
+                        "`foo${// commenta}`",
+                        "`foo${\n a`",
+                        "`foo${\r\n a`",
+                        "`foo${\r a`",
+                        "`foo${fn(}`",
+                        "`foo${1 if}`",
+                        nullptr};
   RunParserSyncTest(context_data, data, kError);
 }
 
@@ -6033,18 +6061,13 @@
 TEST(TemplateLiteralsIllegalTokens) {
   const char* context_data[][2] = {{"'use strict';", ""},
                                    {"function foo(){ 'use strict';"
-                                    "  var a, b, c; return ", "}"},
-                                   {NULL, NULL}};
+                                    "  var a, b, c; return ",
+                                    "}"},
+                                   {nullptr, nullptr}};
   const char* data[] = {
-      "`hello\\x`",
-      "`hello\\x${1}`",
-      "`hello${1}\\x`",
-      "`hello${1}\\x${2}`",
-      "`hello\\x\n`",
-      "`hello\\x\n${1}`",
-      "`hello${1}\\x\n`",
-      "`hello${1}\\x\n${2}`",
-      NULL};
+      "`hello\\x`",         "`hello\\x${1}`",       "`hello${1}\\x`",
+      "`hello${1}\\x${2}`", "`hello\\x\n`",         "`hello\\x\n${1}`",
+      "`hello${1}\\x\n`",   "`hello${1}\\x\n${2}`", nullptr};
 
   RunParserSyncTest(context_data, data, kError);
 }
@@ -6054,9 +6077,10 @@
   const char* context_data[][2] = {{"'use strict';(function(",
                                     "){ return args;})(1, [], /regexp/, 'str',"
                                     "function(){});"},
-                                   {"(function(", "){ return args;})(1, [],"
+                                   {"(function(",
+                                    "){ return args;})(1, [],"
                                     "/regexp/, 'str', function(){});"},
-                                  {NULL, NULL}};
+                                   {nullptr, nullptr}};
 
   const char* data[] = {"...args",
                         "a, ...args",
@@ -6075,7 +6099,7 @@
                         "...[a, b]",
                         "...[]",
                         "...[...[a, b, ...c]]",
-                        NULL};
+                        nullptr};
   RunParserSyncTest(context_data, data, kSuccess);
 }
 
@@ -6084,28 +6108,28 @@
   const char* context_data[][2] = {{"'use strict';(function(",
                                     "){ return args;}(1, [], /regexp/, 'str',"
                                     "function(){});"},
-                                   {"(function(", "){ return args;}(1, [],"
+                                   {"(function(",
+                                    "){ return args;}(1, [],"
                                     "/regexp/, 'str', function(){});"},
-                                   {NULL, NULL}};
+                                   {nullptr, nullptr}};
 
-  const char* data[] = {
-      "...args, b",
-      "a, ...args, b",
-      "...args,   b",
-      "a, ...args,   b",
-      "...args,\tb",
-      "a,...args\t,b",
-      "...args\r\n, b",
-      "a, ... args,\r\nb",
-      "...args\r,b",
-      "a, ... args,\rb",
-      "...args\t\n\t\t\n,  b",
-      "a, ... args,  \n  \n  b",
-      "a, a, ...args",
-      "a,\ta, ...args",
-      "a,\ra, ...args",
-      "a,\na, ...args",
-      NULL};
+  const char* data[] = {"...args, b",
+                        "a, ...args, b",
+                        "...args,   b",
+                        "a, ...args,   b",
+                        "...args,\tb",
+                        "a,...args\t,b",
+                        "...args\r\n, b",
+                        "a, ... args,\r\nb",
+                        "...args\r,b",
+                        "a, ... args,\rb",
+                        "...args\t\n\t\t\n,  b",
+                        "a, ... args,  \n  \n  b",
+                        "a, a, ...args",
+                        "a,\ta, ...args",
+                        "a,\ra, ...args",
+                        "a,\na, ...args",
+                        nullptr};
   RunParserSyncTest(context_data, data, kError);
 }
 
@@ -6130,11 +6154,11 @@
   const char* strict_context_data[][2] =
       {{"'use strict';(function(",
         "){ return;})(1, [], /regexp/, 'str',function(){});"},
-       {NULL, NULL}};
+       {nullptr, nullptr}};
   const char* sloppy_context_data[][2] =
       {{"(function(",
         "){ return;})(1, [],/regexp/, 'str', function(){});"},
-       {NULL, NULL}};
+       {nullptr, nullptr}};
 
   const char* data[] = {
       "...eval",
@@ -6142,7 +6166,7 @@
       "...arguments",
       // See https://bugs.chromium.org/p/v8/issues/detail?id=4577
       // "arguments, ...args",
-      NULL};
+      nullptr};
   // clang-format on
 
   // Fail in strict mode
@@ -6154,19 +6178,15 @@
 
 
 TEST(RestParametersDuplicateEvalArguments) {
-  const char* context_data[][2] =
-      {{"'use strict';(function(",
-        "){ return;})(1, [], /regexp/, 'str',function(){});"},
-       {"(function(",
-        "){ return;})(1, [],/regexp/, 'str', function(){});"},
-       {NULL, NULL}};
+  const char* context_data[][2] = {
+      {"'use strict';(function(",
+       "){ return;})(1, [], /regexp/, 'str',function(){});"},
+      {"(function(", "){ return;})(1, [],/regexp/, 'str', function(){});"},
+      {nullptr, nullptr}};
 
-  const char* data[] = {
-      "eval, ...eval",
-      "eval, eval, ...args",
-      "arguments, ...arguments",
-      "arguments, arguments, ...args",
-      NULL};
+  const char* data[] = {"eval, ...eval", "eval, eval, ...args",
+                        "arguments, ...arguments",
+                        "arguments, arguments, ...args", nullptr};
 
   // In strict mode, the error is using "eval" or "arguments" as parameter names
   // In sloppy mode, the error is that eval / arguments are duplicated
@@ -6177,15 +6197,19 @@
 TEST(SpreadCall) {
   const char* context_data[][2] = {{"function fn() { 'use strict';} fn(", ");"},
                                    {"function fn() {} fn(", ");"},
-                                   {NULL, NULL}};
+                                   {nullptr, nullptr}};
 
-  const char* data[] = {
-      "...([1, 2, 3])", "...'123', ...'456'", "...new Set([1, 2, 3]), 4",
-      "1, ...[2, 3], 4", "...Array(...[1,2,3,4])", "...NaN",
-      "0, 1, ...[2, 3, 4], 5, 6, 7, ...'89'",
-      "0, 1, ...[2, 3, 4], 5, 6, 7, ...'89', 10",
-      "...[0, 1, 2], 3, 4, 5, 6, ...'7', 8, 9",
-      "...[0, 1, 2], 3, 4, 5, 6, ...'7', 8, 9, ...[10]", NULL};
+  const char* data[] = {"...([1, 2, 3])",
+                        "...'123', ...'456'",
+                        "...new Set([1, 2, 3]), 4",
+                        "1, ...[2, 3], 4",
+                        "...Array(...[1,2,3,4])",
+                        "...NaN",
+                        "0, 1, ...[2, 3, 4], 5, 6, 7, ...'89'",
+                        "0, 1, ...[2, 3, 4], 5, 6, 7, ...'89', 10",
+                        "...[0, 1, 2], 3, 4, 5, 6, ...'7', 8, 9",
+                        "...[0, 1, 2], 3, 4, 5, 6, ...'7', 8, 9, ...[10]",
+                        nullptr};
 
   RunParserSyncTest(context_data, data, kSuccess);
 }
@@ -6194,9 +6218,9 @@
 TEST(SpreadCallErrors) {
   const char* context_data[][2] = {{"function fn() { 'use strict';} fn(", ");"},
                                    {"function fn() {} fn(", ");"},
-                                   {NULL, NULL}};
+                                   {nullptr, nullptr}};
 
-  const char* data[] = {"(...[1, 2, 3])", "......[1,2,3]", NULL};
+  const char* data[] = {"(...[1, 2, 3])", "......[1,2,3]", nullptr};
 
   RunParserSyncTest(context_data, data, kError);
 }
@@ -6205,26 +6229,22 @@
 TEST(BadRestSpread) {
   const char* context_data[][2] = {{"function fn() { 'use strict';", "} fn();"},
                                    {"function fn() { ", "} fn();"},
-                                   {NULL, NULL}};
-  const char* data[] = {"return ...[1,2,3];",     "var ...x = [1,2,3];",
-                        "var [...x,] = [1,2,3];", "var [...x, y] = [1,2,3];",
-                        "var {...x} = [1,2,3];",  "var { x } = {x: ...[1,2,3]}",
-                        NULL};
+                                   {nullptr, nullptr}};
+  const char* data[] = {"return ...[1,2,3];",
+                        "var ...x = [1,2,3];",
+                        "var [...x,] = [1,2,3];",
+                        "var [...x, y] = [1,2,3];",
+                        "var { x } = {x: ...[1,2,3]}",
+                        nullptr};
   RunParserSyncTest(context_data, data, kError);
 }
 
 
 TEST(LexicalScopingSloppyMode) {
   const char* context_data[][2] = {
-      {"", ""},
-      {"function f() {", "}"},
-      {"{", "}"},
-      {NULL, NULL}};
+      {"", ""}, {"function f() {", "}"}, {"{", "}"}, {nullptr, nullptr}};
 
-  const char* good_data[] = {
-    "let = 1;",
-    "for(let = 1;;){}",
-    NULL};
+  const char* good_data[] = {"let = 1;", "for(let = 1;;){}", nullptr};
   RunParserSyncTest(context_data, good_data, kSuccess);
 }
 
@@ -6239,34 +6259,21 @@
                                    {"(class {set [", "](_) {}});"},
                                    {"(class {[", "]() {}});"},
                                    {"(class {*[", "]() {}});"},
-                                   {NULL, NULL}};
-  const char* error_data[] = {
-    "1, 2",
-    "var name",
-    NULL};
+                                   {nullptr, nullptr}};
+  const char* error_data[] = {"1, 2", "var name", nullptr};
 
   RunParserSyncTest(context_data, error_data, kError);
 
-  const char* name_data[] = {
-    "1",
-    "1 + 2",
-    "'name'",
-    "\"name\"",
-    "[]",
-    "{}",
-    NULL};
+  const char* name_data[] = {"1",  "1 + 2", "'name'", "\"name\"",
+                             "[]", "{}",    nullptr};
 
   RunParserSyncTest(context_data, name_data, kSuccess);
 }
 
 
 TEST(ComputedPropertyNameShorthandError) {
-  const char* context_data[][2] = {{"({", "});"},
-                                   {NULL, NULL}};
-  const char* error_data[] = {
-    "a: 1, [2]",
-    "[1], a: 1",
-    NULL};
+  const char* context_data[][2] = {{"({", "});"}, {nullptr, nullptr}};
+  const char* error_data[] = {"a: 1, [2]", "[1], a: 1", nullptr};
 
   RunParserSyncTest(context_data, error_data, kError);
 }
@@ -6354,14 +6361,13 @@
                 .ToHandleChecked());
         isolate->clear_pending_exception();
 
-        v8::base::OS::Print(
+        FATAL(
             "Parser failed on:\n"
             "\t%s\n"
             "with error:\n"
             "\t%s\n"
             "However, we expected no error.",
             source->ToCString().get(), message_string->ToCString().get());
-        CHECK(false);
       }
     }
 
@@ -6548,17 +6554,17 @@
       "({ set p(await) {} });",
       "try {} catch (await) {}",
       "try {} catch (await) {} finally {}",
-      NULL
+      nullptr
   };
   // clang-format on
-  const char* context_data[][2] = {{"", ""}, {NULL, NULL}};
+  const char* context_data[][2] = {{"", ""}, {nullptr, nullptr}};
 
   RunModuleParserSyncTest(context_data, kErrorSources, kError);
 }
 
 TEST(ModuleAwaitReservedPreParse) {
-  const char* context_data[][2] = {{"", ""}, {NULL, NULL}};
-  const char* error_data[] = {"function f() { var await = 0; }", NULL};
+  const char* context_data[][2] = {{"", ""}, {nullptr, nullptr}};
+  const char* error_data[] = {"function f() { var await = 0; }", nullptr};
 
   RunModuleParserSyncTest(context_data, error_data, kError);
 }
@@ -6575,10 +6581,10 @@
     "(class { static await() {} });",
     "(class { *await() {} });",
     "(class { static *await() {} });",
-    NULL
+    nullptr
   };
   // clang-format on
-  const char* context_data[][2] = {{"", ""}, {NULL, NULL}};
+  const char* context_data[][2] = {{"", ""}, {nullptr, nullptr}};
 
   RunModuleParserSyncTest(context_data, kValidSources, kSuccess);
 }
@@ -6630,10 +6636,10 @@
       "({ set p(enum) {} });",
       "try {} catch (enum) {}",
       "try {} catch (enum) {} finally {}",
-      NULL
+      nullptr
   };
   // clang-format on
-  const char* context_data[][2] = {{"", ""}, {NULL, NULL}};
+  const char* context_data[][2] = {{"", ""}, {nullptr, nullptr}};
 
   RunModuleParserSyncTest(context_data, kErrorSources, kError);
 }
@@ -6760,9 +6766,9 @@
 
   CHECK(declarations->AtForTest(8)->proxy()->raw_name()->IsOneByteEqualTo(
       "nonexport"));
-  CHECK(declarations->AtForTest(8)->proxy()->var()->binding_needs_init());
-  CHECK(declarations->AtForTest(8)->proxy()->var()->location() !=
-        i::VariableLocation::MODULE);
+  CHECK(!declarations->AtForTest(8)->proxy()->var()->binding_needs_init());
+  CHECK(declarations->AtForTest(8)->proxy()->var()->location() ==
+        i::VariableLocation::LOCAL);
 
   CHECK(
       declarations->AtForTest(9)->proxy()->raw_name()->IsOneByteEqualTo("mm"));
@@ -6813,11 +6819,11 @@
       CHECK_EQ(4, elem.second.index);
       CHECK_EQ(370, elem.second.position);
     } else {
-      CHECK(false);
+      UNREACHABLE();
     }
   }
 
-  CHECK_EQ(3, descriptor->special_exports().length());
+  CHECK_EQ(3, descriptor->special_exports().size());
   CheckEntry(descriptor->special_exports().at(0), "b", nullptr, "a", 0);
   CheckEntry(descriptor->special_exports().at(1), nullptr, nullptr, nullptr, 2);
   CheckEntry(descriptor->special_exports().at(2), "bb", nullptr, "aa",
@@ -6863,7 +6869,7 @@
     CheckEntry(entry, "y", "x", nullptr, -1);
   }
 
-  CHECK_EQ(2, descriptor->namespace_imports().length());
+  CHECK_EQ(2, descriptor->namespace_imports().size());
   CheckEntry(descriptor->namespace_imports().at(0), nullptr, "loo", nullptr, 4);
   CheckEntry(descriptor->namespace_imports().at(1), nullptr, "foob", nullptr,
              4);
@@ -6890,17 +6896,11 @@
 
 TEST(DuplicateProtoError) {
   const char* context_data[][2] = {
-    {"({", "});"},
-    {"'use strict'; ({", "});"},
-    {NULL, NULL}
-  };
-  const char* error_data[] = {
-    "__proto__: {}, __proto__: {}",
-    "__proto__: {}, \"__proto__\": {}",
-    "__proto__: {}, \"__\x70roto__\": {}",
-    "__proto__: {}, a: 1, __proto__: {}",
-    NULL
-  };
+      {"({", "});"}, {"'use strict'; ({", "});"}, {nullptr, nullptr}};
+  const char* error_data[] = {"__proto__: {}, __proto__: {}",
+                              "__proto__: {}, \"__proto__\": {}",
+                              "__proto__: {}, \"__\x70roto__\": {}",
+                              "__proto__: {}, a: 1, __proto__: {}", nullptr};
 
   RunParserSyncTest(context_data, error_data, kError);
 }
@@ -6908,18 +6908,11 @@
 
 TEST(DuplicateProtoNoError) {
   const char* context_data[][2] = {
-    {"({", "});"},
-    {"'use strict'; ({", "});"},
-    {NULL, NULL}
-  };
+      {"({", "});"}, {"'use strict'; ({", "});"}, {nullptr, nullptr}};
   const char* error_data[] = {
-    "__proto__: {}, ['__proto__']: {}",
-    "__proto__: {}, __proto__() {}",
-    "__proto__: {}, get __proto__() {}",
-    "__proto__: {}, set __proto__(v) {}",
-    "__proto__: {}, __proto__",
-    NULL
-  };
+      "__proto__: {}, ['__proto__']: {}",  "__proto__: {}, __proto__() {}",
+      "__proto__: {}, get __proto__() {}", "__proto__: {}, set __proto__(v) {}",
+      "__proto__: {}, __proto__",          nullptr};
 
   RunParserSyncTest(context_data, error_data, kSuccess);
 }
@@ -6932,13 +6925,10 @@
                                    {"'use strict'; for (;;)", ""},
                                    {"'use strict'; for (x in y)", ""},
                                    {"'use strict'; do ", " while (false)"},
-                                   {NULL, NULL}};
+                                   {nullptr, nullptr}};
 
-  const char* statement_data[] = {
-    "let x = 1;",
-    "const x = 1;",
-    "class C {}",
-    NULL};
+  const char* statement_data[] = {"let x = 1;", "const x = 1;", "class C {}",
+                                  nullptr};
 
   RunParserSyncTest(context_data, statement_data, kError);
 }
@@ -6958,75 +6948,73 @@
       factory->NewScript(factory->NewStringFromAsciiChecked(source));
   i::ParseInfo info(script);
   i::parsing::ParseProgram(&info, isolate);
-  CHECK(info.literal() != NULL);
+  CHECK_NOT_NULL(info.literal());
   CHECK_EQ(expected_language_mode, info.literal()->language_mode());
 }
 
 
 TEST(LanguageModeDirectives) {
-  TestLanguageMode("\"use nothing\"", i::SLOPPY);
-  TestLanguageMode("\"use strict\"", i::STRICT);
+  TestLanguageMode("\"use nothing\"", i::LanguageMode::kSloppy);
+  TestLanguageMode("\"use strict\"", i::LanguageMode::kStrict);
 
-  TestLanguageMode("var x = 1; \"use strict\"", i::SLOPPY);
+  TestLanguageMode("var x = 1; \"use strict\"", i::LanguageMode::kSloppy);
 
-  TestLanguageMode("\"use some future directive\"; \"use strict\";", i::STRICT);
+  TestLanguageMode("\"use some future directive\"; \"use strict\";",
+                   i::LanguageMode::kStrict);
 }
 
 
 TEST(PropertyNameEvalArguments) {
-  const char* context_data[][2] = {{"'use strict';", ""},
-                                   {NULL, NULL}};
+  const char* context_data[][2] = {{"'use strict';", ""}, {nullptr, nullptr}};
 
-  const char* statement_data[] = {
-      "({eval: 1})",
-      "({arguments: 1})",
-      "({eval() {}})",
-      "({arguments() {}})",
-      "({*eval() {}})",
-      "({*arguments() {}})",
-      "({get eval() {}})",
-      "({get arguments() {}})",
-      "({set eval(_) {}})",
-      "({set arguments(_) {}})",
+  const char* statement_data[] = {"({eval: 1})",
+                                  "({arguments: 1})",
+                                  "({eval() {}})",
+                                  "({arguments() {}})",
+                                  "({*eval() {}})",
+                                  "({*arguments() {}})",
+                                  "({get eval() {}})",
+                                  "({get arguments() {}})",
+                                  "({set eval(_) {}})",
+                                  "({set arguments(_) {}})",
 
-      "class C {eval() {}}",
-      "class C {arguments() {}}",
-      "class C {*eval() {}}",
-      "class C {*arguments() {}}",
-      "class C {get eval() {}}",
-      "class C {get arguments() {}}",
-      "class C {set eval(_) {}}",
-      "class C {set arguments(_) {}}",
+                                  "class C {eval() {}}",
+                                  "class C {arguments() {}}",
+                                  "class C {*eval() {}}",
+                                  "class C {*arguments() {}}",
+                                  "class C {get eval() {}}",
+                                  "class C {get arguments() {}}",
+                                  "class C {set eval(_) {}}",
+                                  "class C {set arguments(_) {}}",
 
-      "class C {static eval() {}}",
-      "class C {static arguments() {}}",
-      "class C {static *eval() {}}",
-      "class C {static *arguments() {}}",
-      "class C {static get eval() {}}",
-      "class C {static get arguments() {}}",
-      "class C {static set eval(_) {}}",
-      "class C {static set arguments(_) {}}",
+                                  "class C {static eval() {}}",
+                                  "class C {static arguments() {}}",
+                                  "class C {static *eval() {}}",
+                                  "class C {static *arguments() {}}",
+                                  "class C {static get eval() {}}",
+                                  "class C {static get arguments() {}}",
+                                  "class C {static set eval(_) {}}",
+                                  "class C {static set arguments(_) {}}",
 
-      NULL};
+                                  nullptr};
 
   RunParserSyncTest(context_data, statement_data, kSuccess);
 }
 
 
 TEST(FunctionLiteralDuplicateParameters) {
-  const char* strict_context_data[][2] =
-      {{"'use strict';(function(", "){})();"},
-       {"(function(", ") { 'use strict'; })();"},
-       {"'use strict'; function fn(", ") {}; fn();"},
-       {"function fn(", ") { 'use strict'; }; fn();"},
-       {NULL, NULL}};
+  const char* strict_context_data[][2] = {
+      {"'use strict';(function(", "){})();"},
+      {"(function(", ") { 'use strict'; })();"},
+      {"'use strict'; function fn(", ") {}; fn();"},
+      {"function fn(", ") { 'use strict'; }; fn();"},
+      {nullptr, nullptr}};
 
-  const char* sloppy_context_data[][2] =
-      {{"(function(", "){})();"},
-       {"(function(", ") {})();"},
-       {"function fn(", ") {}; fn();"},
-       {"function fn(", ") {}; fn();"},
-       {NULL, NULL}};
+  const char* sloppy_context_data[][2] = {{"(function(", "){})();"},
+                                          {"(function(", ") {})();"},
+                                          {"function fn(", ") {}; fn();"},
+                                          {"function fn(", ") {}; fn();"},
+                                          {nullptr, nullptr}};
 
   const char* data[] = {
       "a, a",
@@ -7034,7 +7022,7 @@
       "b, a, a",
       "a, b, c, c",
       "a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, w",
-      NULL};
+      nullptr};
 
   RunParserSyncTest(strict_context_data, data, kError);
   RunParserSyncTest(sloppy_context_data, data, kSuccess);
@@ -7042,17 +7030,16 @@
 
 
 TEST(ArrowFunctionASIErrors) {
-  const char* context_data[][2] = {{"'use strict';", ""}, {"", ""},
-                                   {NULL, NULL}};
+  const char* context_data[][2] = {
+      {"'use strict';", ""}, {"", ""}, {nullptr, nullptr}};
 
-  const char* data[] = {
-      "(a\n=> a)(1)",
-      "(a/*\n*/=> a)(1)",
-      "((a)\n=> a)(1)",
-      "((a)/*\n*/=> a)(1)",
-      "((a, b)\n=> a + b)(1, 2)",
-      "((a, b)/*\n*/=> a + b)(1, 2)",
-      NULL};
+  const char* data[] = {"(a\n=> a)(1)",
+                        "(a/*\n*/=> a)(1)",
+                        "((a)\n=> a)(1)",
+                        "((a)/*\n*/=> a)(1)",
+                        "((a, b)\n=> a + b)(1, 2)",
+                        "((a, b)/*\n*/=> a + b)(1, 2)",
+                        nullptr};
   RunParserSyncTest(context_data, data, kError);
 }
 
@@ -7061,7 +7048,7 @@
   const char* context_data[][2] = {
     {"x = ", ""},
     {"'use strict'; x = ", ""},
-    {NULL, NULL}};
+    {nullptr, nullptr}};
 
   // clang-format off
   const char* data[] = {
@@ -7082,18 +7069,15 @@
     "{ ...async function() { }}",
     "{ ...async () => { }}",
     "{ ...new Foo()}",
-    NULL};
+    nullptr};
   // clang-format on
 
-  static const ParserFlag flags[] = {kAllowHarmonyObjectRestSpread};
-  RunParserSyncTest(context_data, data, kSuccess, NULL, 0, flags,
-                    arraysize(flags));
+  RunParserSyncTest(context_data, data, kSuccess);
 }
 
 TEST(ObjectSpreadNegativeTests) {
-  const char* context_data[][2] = {{"x = ", ""},
-                                   {"'use strict'; x = ", ""},
-                                   {NULL, NULL}};
+  const char* context_data[][2] = {
+      {"x = ", ""}, {"'use strict'; x = ", ""}, {nullptr, nullptr}};
 
   // clang-format off
   const char* data[] = {
@@ -7104,11 +7088,9 @@
     "{get ...foo}",
     "{set ...foo}",
     "{async ...foo}",
-    NULL};
+    nullptr};
 
-  static const ParserFlag flags[] = {kAllowHarmonyObjectRestSpread};
-  RunParserSyncTest(context_data, data, kError, NULL, 0, flags,
-                    arraysize(flags));
+  RunParserSyncTest(context_data, data, kError);
 }
 
 TEST(TemplateEscapesPositiveTests) {
@@ -7116,7 +7098,7 @@
   const char* context_data[][2] = {
     {"", ""},
     {"'use strict';", ""},
-    {NULL, NULL}};
+    {nullptr, nullptr}};
 
   // clang-format off
   const char* data[] = {
@@ -7183,16 +7165,10 @@
     "tag`\\u``\\u`",
     "` ${tag`\\u`}`",
     "` ``\\u`",
-    NULL};
+    nullptr};
   // clang-format on
 
-  // No error with flag
-  static const ParserFlag flags[] = {kAllowHarmonyTemplateEscapes};
-  RunParserSyncTest(context_data, data, kSuccess, NULL, 0, flags,
-                    arraysize(flags));
-
-  // Still an error without flag
-  RunParserSyncTest(context_data, data, kError);
+  RunParserSyncTest(context_data, data, kSuccess);
 }
 
 TEST(TemplateEscapesNegativeTests) {
@@ -7200,7 +7176,7 @@
   const char* context_data[][2] = {
     {"", ""},
     {"'use strict';", ""},
-    {NULL, NULL}};
+    {nullptr, nullptr}};
 
   // clang-format off
   const char* data[] = {
@@ -7264,15 +7240,9 @@
     "`\\1``\\2`",
     "tag` ${`\\u`}`",
     "`\\u```",
-    NULL};
+    nullptr};
   // clang-format on
 
-  // Error with flag
-  static const ParserFlag flags[] = {kAllowHarmonyTemplateEscapes};
-  RunParserSyncTest(context_data, data, kError, NULL, 0, flags,
-                    arraysize(flags));
-
-  // Still an error without flag
   RunParserSyncTest(context_data, data, kError);
 }
 
@@ -7285,7 +7255,7 @@
                                    {"var f = (", ") => {};"},
                                    {"var f = (argument1,", ") => {};"},
                                    {"try {} catch(", ") {}"},
-                                   {NULL, NULL}};
+                                   {nullptr, nullptr}};
 
   // clang-format off
   const char* data[] = {
@@ -7328,9 +7298,6 @@
     "{ __proto__: x, __proto__: y}",
     "{arguments: x}",
     "{eval: x}",
-    NULL};
-
-  const char* rest_data[] =  {
     "{ x : y, ...z }",
     "{ x : y = 1, ...z }",
     "{ x : x, y : y, ...z }",
@@ -7349,17 +7316,11 @@
     "{[1+1] : z, ...x}",
     "{arguments: x, ...z}",
     "{ __proto__: x, __proto__: y, ...z}",
-    NULL};
+    nullptr
+  };
 
   // clang-format on
   RunParserSyncTest(context_data, data, kSuccess);
-  RunParserSyncTest(context_data, rest_data, kError);
-
-  static const ParserFlag flags[] = {kAllowHarmonyObjectRestSpread};
-  RunParserSyncTest(context_data, data, kSuccess, NULL, 0, flags,
-                    arraysize(flags));
-  RunParserSyncTest(context_data, rest_data, kSuccess, NULL, 0, flags,
-                    arraysize(flags));
 
   // v8:5201
   {
@@ -7371,13 +7332,7 @@
       {"var f = (", ") => {};"},
       {"var f = (argument1,", ") => {};"},
       {"try {} catch(", ") {}"},
-      {NULL, NULL}
-    };
-
-    const char* rest_data[] = {
-      "{...arguments}",
-      "{...eval}",
-      NULL
+      {nullptr, nullptr}
     };
 
     const char* data[] = {
@@ -7387,16 +7342,12 @@
       "{x: eval}",
       "{arguments = false}",
       "{eval = false}",
-      NULL
+      "{...arguments}",
+      "{...eval}",
+      nullptr
     };
     // clang-format on
     RunParserSyncTest(sloppy_context_data, data, kSuccess);
-    RunParserSyncTest(sloppy_context_data, rest_data, kError);
-    static const ParserFlag flags[] = {kAllowHarmonyObjectRestSpread};
-    RunParserSyncTest(sloppy_context_data, data, kSuccess, NULL, 0, flags,
-                      arraysize(flags));
-    RunParserSyncTest(sloppy_context_data, rest_data, kSuccess, NULL, 0, flags,
-                      arraysize(flags));
   }
 }
 
@@ -7412,7 +7363,7 @@
                                      {"var f = ", " => {};"},
                                      {"var f = (argument1,", ") => {};"},
                                      {"try {} catch(", ") {}"},
-                                     {NULL, NULL}};
+                                     {nullptr, nullptr}};
 
     // clang-format off
     const char* data[] = {
@@ -7489,70 +7440,51 @@
         "{ set a() {} }",
         "{ method() {} }",
         "{ *method() {} }",
-        NULL};
-
-    const char* rest_data[] = {
-      "...a++",
-      "...++a",
-      "...typeof a",
-      "...[a++]",
-      "...(x => y)",
-      "{ ...x, }",
-      "{ ...x, y }",
-      "{ y, ...x, y }",
-      "{ ...x, ...y }",
-      "{ ...x, ...x }",
-      "{ ...x, ...x = {} }",
-      "{ ...x, ...x = ...x }",
-      "{ ...x, ...x = ...{ x } }",
-      "{ ,, ...x }",
-      "{ ...get a() {} }",
-      "{ ...set a() {} }",
-      "{ ...method() {} }",
-      "{ ...function() {} }",
-      "{ ...*method() {} }",
-      "{...{x} }",
-      "{...[x] }",
-      "{...{ x = 5 } }",
-      "{...[ x = 5 ] }",
-      "{...x.f }",
-      "{...x[0] }",
-      NULL
-    };
-
-    const char* async_gen_data[] = {
-      "async function* a() {}",
-      NULL
+        "...a++",
+        "...++a",
+        "...typeof a",
+        "...[a++]",
+        "...(x => y)",
+        "{ ...x, }",
+        "{ ...x, y }",
+        "{ y, ...x, y }",
+        "{ ...x, ...y }",
+        "{ ...x, ...x }",
+        "{ ...x, ...x = {} }",
+        "{ ...x, ...x = ...x }",
+        "{ ...x, ...x = ...{ x } }",
+        "{ ,, ...x }",
+        "{ ...get a() {} }",
+        "{ ...set a() {} }",
+        "{ ...method() {} }",
+        "{ ...function() {} }",
+        "{ ...*method() {} }",
+        "{...{x} }",
+        "{...[x] }",
+        "{...{ x = 5 } }",
+        "{...[ x = 5 ] }",
+        "{...x.f }",
+        "{...x[0] }",
+        "async function* a() {}",
+        nullptr
     };
 
     // clang-format on
     RunParserSyncTest(context_data, data, kError);
-    RunParserSyncTest(context_data, rest_data, kError);
-    static const ParserFlag flags[] = {kAllowHarmonyObjectRestSpread};
-    RunParserSyncTest(context_data, data, kError, NULL, 0, flags,
-                      arraysize(flags));
-    RunParserSyncTest(context_data, rest_data, kError, NULL, 0, flags,
-                      arraysize(flags));
-    static const ParserFlag async_gen_flags[] = {kAllowHarmonyAsyncIteration};
-    RunParserSyncTest(context_data, async_gen_data, kError, NULL, 0,
-                      async_gen_flags, arraysize(async_gen_flags));
   }
 
   {  // All modes.
-    const char* context_data[][2] = {{"'use strict'; let ", " = {};"},
-                                     {"var ", " = {};"},
-                                     {"'use strict'; const ", " = {};"},
-                                     {"function f(", ") {}"},
-                                     {"function f(argument1, ", ") {}"},
-                                     {"var f = (", ") => {};"},
-                                     {"var f = (argument1,", ") => {};"},
-                                     {NULL, NULL}};
+    const char* context_data[][2] = {
+        {"'use strict'; let ", " = {};"},    {"var ", " = {};"},
+        {"'use strict'; const ", " = {};"},  {"function f(", ") {}"},
+        {"function f(argument1, ", ") {}"},  {"var f = (", ") => {};"},
+        {"var f = (argument1,", ") => {};"}, {nullptr, nullptr}};
 
     // clang-format off
     const char* data[] = {
         "x => x",
         "() => x",
-        NULL};
+        nullptr};
     // clang-format on
     RunParserSyncTest(context_data, data, kError);
   }
@@ -7564,7 +7496,7 @@
         {"'use strict'; const ", " = {};"},
         {"'use strict'; function f(", ") {}"},
         {"'use strict'; function f(argument1, ", ") {}"},
-        {NULL, NULL}};
+        {nullptr, nullptr}};
 
     // clang-format off
     const char* data[] = {
@@ -7580,21 +7512,12 @@
       "{ eval }",
       "{ arguments = false }"
       "{ eval = false }",
-      NULL};
-
-    const char* rest_data[] = {
       "{ ...eval }",
       "{ ...arguments }",
-      NULL};
+      nullptr};
 
     // clang-format on
     RunParserSyncTest(context_data, data, kError);
-    RunParserSyncTest(context_data, rest_data, kError);
-    static const ParserFlag flags[] = {kAllowHarmonyObjectRestSpread};
-    RunParserSyncTest(context_data, data, kError, NULL, 0, flags,
-                      arraysize(flags));
-    RunParserSyncTest(context_data, rest_data, kError, NULL, 0, flags,
-                      arraysize(flags));
   }
 
   {  // 'yield' in generators.
@@ -7602,14 +7525,14 @@
         {"function*() { var ", " = {};"},
         {"function*() { 'use strict'; let ", " = {};"},
         {"function*() { 'use strict'; const ", " = {};"},
-        {NULL, NULL}};
+        {nullptr, nullptr}};
 
     // clang-format off
     const char* data[] = {
       "yield",
       "[yield]",
       "{ x : yield }",
-      NULL};
+      nullptr};
     // clang-format on
     RunParserSyncTest(context_data, data, kError);
   }
@@ -7627,24 +7550,17 @@
                                      {"for (var ", ";;) {}"},
                                      {"for (let ", ";;) {}"},
                                      {"for (const ", ";;) {}"},
-                                     {NULL, NULL}};
+                                     {nullptr, nullptr}};
 
     // clang-format off
     const char* data[] = {
       "{ a }",
       "[ a ]",
-      NULL};
-    const char* rest_data[] = {
       "{ ...a }",
-      NULL};
+      nullptr
+    };
     // clang-format on
     RunParserSyncTest(context_data, data, kError);
-    RunParserSyncTest(context_data, rest_data, kError);
-    static const ParserFlag flags[] = {kAllowHarmonyObjectRestSpread};
-    RunParserSyncTest(context_data, data, kError, NULL, 0, flags,
-                      arraysize(flags));
-    RunParserSyncTest(context_data, rest_data, kError, NULL, 0, flags,
-                      arraysize(flags));
   }
 }
 
@@ -7652,7 +7568,7 @@
   // clang-format off
   const char* context_data[][2] = {
     {"var { ", " } = { a: 1};"},
-    { NULL, NULL }
+    { nullptr, nullptr }
   };
 
   using v8::internal::Code;
@@ -7664,13 +7580,13 @@
 
   const char* statement_data[] = {
     statement.c_str(),
-    NULL
+    nullptr
   };
 
   // clang-format on
   // The test is quite slow, so run it with a reduced set of flags.
-  static const ParserFlag flags[] = {kAllowLazy, kAllowHarmonyObjectRestSpread};
-  RunParserSyncTest(context_data, statement_data, kError, NULL, 0, flags,
+  static const ParserFlag flags[] = {kAllowLazy};
+  RunParserSyncTest(context_data, statement_data, kError, nullptr, 0, flags,
                     arraysize(flags));
 }
 
@@ -7690,7 +7606,7 @@
       {"var x, y, z; m(['b']) ? lhs : ", " = {}"},
       {"'use strict'; var x, y, z; m(['a']) ? ", " = {} : rhs"},
       {"'use strict'; var x, y, z; m(['b']) ? lhs : ", " = {}"},
-      {NULL, NULL}};
+      {nullptr, nullptr}};
 
   const char* mixed_assignments_context_data[][2] = {
       {"'use strict'; let x, y, z; (", " = z = {});"},
@@ -7705,7 +7621,7 @@
       {"var x, y, z; for (x in x = ", " = z = {});"},
       {"var x, y, z; for (x of ", " = z = {});"},
       {"var x, y, z; for (x of x = ", " = z = {});"},
-      {NULL, NULL}};
+      {nullptr, nullptr}};
 
   // clang-format off
   const char* data[] = {
@@ -7846,17 +7762,14 @@
     "[ (foo.bar) ]",
     "[ (foo['bar']) ]",
 
-    NULL};
+    nullptr};
   // clang-format on
-  static const ParserFlag flags[] = {kAllowHarmonyObjectRestSpread};
-  RunParserSyncTest(context_data, data, kSuccess, NULL, 0, flags,
-                    arraysize(flags));
+  RunParserSyncTest(context_data, data, kSuccess);
 
-  RunParserSyncTest(mixed_assignments_context_data, data, kSuccess, NULL, 0,
-                    flags, arraysize(flags));
+  RunParserSyncTest(mixed_assignments_context_data, data, kSuccess);
 
   const char* empty_context_data[][2] = {
-      {"'use strict';", ""}, {"", ""}, {NULL, NULL}};
+      {"'use strict';", ""}, {"", ""}, {nullptr, nullptr}};
 
   // CoverInitializedName ambiguity handling in various contexts
   const char* ambiguity_data[] = {
@@ -7874,7 +7787,7 @@
       "({ __proto__: x, __proto__: y } = {})",
       "var { x = 10 } = (o = { x = 20 } = {});",
       "var x; (({ x = 10 } = { x = 20 } = {}) => x)({})",
-      NULL,
+      nullptr,
   };
   RunParserSyncTest(empty_context_data, ambiguity_data, kSuccess);
 }
@@ -7888,13 +7801,12 @@
       {"'use strict'; let x, y, z; for (x of ", " = {});"},
       {"var x, y, z; for (x in ", " = {});"},
       {"var x, y, z; for (x of ", " = {});"},
-      {NULL, NULL}};
+      {nullptr, nullptr}};
 
   // clang-format off
   const char* data[] = {
     "{ x : ++y }",
     "{ x : y * 2 }",
-    "{ ...x }",
     "{ get x() {} }",
     "{ set x() {} }",
     "{ x: y() }",
@@ -7907,6 +7819,9 @@
     "{ new.target }",
     "{ x: new.target }",
     "{ x: new.target = 1 }",
+    "{ import.meta }",
+    "{ x: import.meta }",
+    "{ x: import.meta = 1 }",
     "[x--]",
     "[--x = 1]",
     "[x()]",
@@ -7914,6 +7829,8 @@
     "[this = 1]",
     "[new.target]",
     "[new.target = 1]",
+    "[import.meta]",
+    "[import.meta = 1]",
     "[super]",
     "[super = 1]",
     "[function f() {}]",
@@ -7992,32 +7909,27 @@
     "[ x += x ]",
     "{ foo: x += x }",
 
-    NULL};
+    nullptr};
   // clang-format on
   RunParserSyncTest(context_data, data, kError);
 
   const char* empty_context_data[][2] = {
-      {"'use strict';", ""}, {"", ""}, {NULL, NULL}};
+      {"'use strict';", ""}, {"", ""}, {nullptr, nullptr}};
 
   // CoverInitializedName ambiguity handling in various contexts
   const char* ambiguity_data[] = {
-      "var foo = { x = 10 };",
-      "var foo = { q } = { x = 10 };",
-      "var foo; foo = { x = 10 };",
-      "var foo; foo = { q } = { x = 10 };",
-      "var x; ({ x = 10 });",
-      "var q, x; ({ q } = { x = 10 });",
-      "var x; [{ x = 10 }]",
-      "var x; (true ? { x = true } : { x = false })",
-      "var q, x; (q, { x = 10 });",
-      "var { x = 10 } = { x = 20 };",
+      "var foo = { x = 10 };", "var foo = { q } = { x = 10 };",
+      "var foo; foo = { x = 10 };", "var foo; foo = { q } = { x = 10 };",
+      "var x; ({ x = 10 });", "var q, x; ({ q } = { x = 10 });",
+      "var x; [{ x = 10 }]", "var x; (true ? { x = true } : { x = false })",
+      "var q, x; (q, { x = 10 });", "var { x = 10 } = { x = 20 };",
       "var { x = 10 } = (o = { x = 20 });",
       "var x; (({ x = 10 } = { x = 20 }) => x)({})",
 
       // Not ambiguous, but uses same context data
       "switch([window %= []] = []) { default: }",
 
-      NULL,
+      nullptr,
   };
   RunParserSyncTest(empty_context_data, ambiguity_data, kError);
 
@@ -8025,60 +7937,41 @@
   const char* strict_context_data[][2] = {{"'use strict'; (", " = {})"},
                                           {"'use strict'; for (", " of {}) {}"},
                                           {"'use strict'; for (", " in {}) {}"},
-                                          {NULL, NULL}};
-  const char* strict_data[] = {"{ eval }",
-                               "{ arguments }",
-                               "{ foo: eval }",
-                               "{ foo: arguments }",
-                               "{ eval = 0 }",
-                               "{ arguments = 0 }",
-                               "{ foo: eval = 0 }",
-                               "{ foo: arguments = 0 }",
-                               "[ eval ]",
-                               "[ arguments ]",
-                               "[ eval = 0 ]",
-                               "[ arguments = 0 ]",
+                                          {nullptr, nullptr}};
+  const char* strict_data[] = {
+      "{ eval }", "{ arguments }", "{ foo: eval }", "{ foo: arguments }",
+      "{ eval = 0 }", "{ arguments = 0 }", "{ foo: eval = 0 }",
+      "{ foo: arguments = 0 }", "[ eval ]", "[ arguments ]", "[ eval = 0 ]",
+      "[ arguments = 0 ]",
 
-                               // v8:4662
-                               "{ x: (eval) }",
-                               "{ x: (arguments) }",
-                               "{ x: (eval = 0) }",
-                               "{ x: (arguments = 0) }",
-                               "{ x: (eval) = 0 }",
-                               "{ x: (arguments) = 0 }",
-                               "[ (eval) ]",
-                               "[ (arguments) ]",
-                               "[ (eval = 0) ]",
-                               "[ (arguments = 0) ]",
-                               "[ (eval) = 0 ]",
-                               "[ (arguments) = 0 ]",
-                               "[ ...(eval) ]",
-                               "[ ...(arguments) ]",
-                               "[ ...(eval = 0) ]",
-                               "[ ...(arguments = 0) ]",
-                               "[ ...(eval) = 0 ]",
-                               "[ ...(arguments) = 0 ]",
+      // v8:4662
+      "{ x: (eval) }", "{ x: (arguments) }", "{ x: (eval = 0) }",
+      "{ x: (arguments = 0) }", "{ x: (eval) = 0 }", "{ x: (arguments) = 0 }",
+      "[ (eval) ]", "[ (arguments) ]", "[ (eval = 0) ]", "[ (arguments = 0) ]",
+      "[ (eval) = 0 ]", "[ (arguments) = 0 ]", "[ ...(eval) ]",
+      "[ ...(arguments) ]", "[ ...(eval = 0) ]", "[ ...(arguments = 0) ]",
+      "[ ...(eval) = 0 ]", "[ ...(arguments) = 0 ]",
 
-                               NULL};
+      nullptr};
   RunParserSyncTest(strict_context_data, strict_data, kError);
 }
 
 
 TEST(DestructuringDisallowPatternsInForVarIn) {
   const char* context_data[][2] = {
-      {"", ""}, {"function f() {", "}"}, {NULL, NULL}};
+      {"", ""}, {"function f() {", "}"}, {nullptr, nullptr}};
   // clang-format off
   const char* error_data[] = {
     "for (let x = {} in null);",
     "for (let x = {} of null);",
-    NULL};
+    nullptr};
   // clang-format on
   RunParserSyncTest(context_data, error_data, kError);
 
   // clang-format off
   const char* success_data[] = {
     "for (var x = {} in null);",
-    NULL};
+    nullptr};
   // clang-format on
   RunParserSyncTest(context_data, success_data, kSuccess);
 }
@@ -8146,22 +8039,22 @@
   // clang-format off
   const char* sloppy_function_context_data[][2] = {
     {"(function f(", ") { });"},
-    {NULL, NULL}
+    {nullptr, nullptr}
   };
 
   const char* strict_function_context_data[][2] = {
     {"'use strict'; (function f(", ") { });"},
-    {NULL, NULL}
+    {nullptr, nullptr}
   };
 
   const char* sloppy_arrow_context_data[][2] = {
     {"((", ")=>{});"},
-    {NULL, NULL}
+    {nullptr, nullptr}
   };
 
   const char* strict_arrow_context_data[][2] = {
     {"'use strict'; ((", ")=>{});"},
-    {NULL, NULL}
+    {nullptr, nullptr}
   };
 
   const char* generator_context_data[][2] = {
@@ -8173,7 +8066,7 @@
     // And similarly for arrow functions in the parameter list.
     {"'use strict'; (function *g(z = (", ") => {}) { });"},
     {"(function *g(z = (", ") => {}) { });"},
-    {NULL, NULL}
+    {nullptr, nullptr}
   };
 
   const char* parameter_data[] = {
@@ -8200,7 +8093,7 @@
 
     "{x}=f(yield)",
     "[x]=f(yield)",
-    NULL
+    nullptr
   };
 
   // Because classes are always in strict mode, these are always errors.
@@ -8216,7 +8109,7 @@
     "x = class { static [yield]() { } }",
     "x = class { [(yield, 1)]() { } }",
     "x = class { [y = (yield, 1)]() { } }",
-    NULL
+    nullptr
   };
   // clang-format on
 
@@ -8232,7 +8125,7 @@
 
 TEST(SpreadArray) {
   const char* context_data[][2] = {
-      {"'use strict';", ""}, {"", ""}, {NULL, NULL}};
+      {"'use strict';", ""}, {"", ""}, {nullptr, nullptr}};
 
   // clang-format off
   const char* data[] = {
@@ -8246,7 +8139,7 @@
     "[...[...a]]",
     "[, ...a]",
     "[, , ...a]",
-    NULL};
+    nullptr};
   // clang-format on
   RunParserSyncTest(context_data, data, kSuccess);
 }
@@ -8254,7 +8147,7 @@
 
 TEST(SpreadArrayError) {
   const char* context_data[][2] = {
-      {"'use strict';", ""}, {"", ""}, {NULL, NULL}};
+      {"'use strict';", ""}, {"", ""}, {nullptr, nullptr}};
 
   // clang-format off
   const char* data[] = {
@@ -8263,7 +8156,7 @@
     "[..., ]",
     "[..., ...]",
     "[ (...a)]",
-    NULL};
+    nullptr};
   // clang-format on
   RunParserSyncTest(context_data, data, kError);
 }
@@ -8287,13 +8180,13 @@
     {"class C {m() {", "}}"},
     {"class C {get x() {", "}}"},
     {"class C {set x(_) {", "}}"},
-    {NULL}
+    {nullptr}
   };
 
   const char* bad_context_data[][2] = {
     {"", ""},
     {"'use strict';", ""},
-    {NULL}
+    {nullptr}
   };
 
   const char* data[] = {
@@ -8305,7 +8198,7 @@
     "if (1) {} else { new.target }",
     "while (0) { new.target }",
     "do { new.target } while (0)",
-    NULL
+    nullptr
   };
 
   // clang-format on
@@ -8314,13 +8207,111 @@
   RunParserSyncTest(bad_context_data, data, kError);
 }
 
+TEST(ImportMetaSuccess) {
+  // clang-format off
+  const char* context_data[][2] = {
+    {"", ""},
+    {"'use strict';", ""},
+    {"function f() {", "}"},
+    {"'use strict'; function f() {", "}"},
+    {"var f = function() {", "}"},
+    {"'use strict'; var f = function() {", "}"},
+    {"({m: function() {", "}})"},
+    {"'use strict'; ({m: function() {", "}})"},
+    {"({m() {", "}})"},
+    {"'use strict'; ({m() {", "}})"},
+    {"({get x() {", "}})"},
+    {"'use strict'; ({get x() {", "}})"},
+    {"({set x(_) {", "}})"},
+    {"'use strict'; ({set x(_) {", "}})"},
+    {"class C {m() {", "}}"},
+    {"class C {get x() {", "}}"},
+    {"class C {set x(_) {", "}}"},
+    {nullptr}
+  };
+
+  const char* data[] = {
+    "import.meta",
+    "() => { import.meta }",
+    "() => import.meta",
+    "if (1) { import.meta }",
+    "if (1) {} else { import.meta }",
+    "while (0) { import.meta }",
+    "do { import.meta } while (0)",
+    "import.meta.url",
+    "import.meta[0]",
+    "import.meta.couldBeMutable = true",
+    "import.meta()",
+    "new import.meta.MagicClass",
+    "new import.meta",
+    "t = [...import.meta]",
+    "f = {...import.meta}",
+    "delete import.meta",
+    nullptr
+  };
+
+  // clang-format on
+
+  // Making sure the same *wouldn't* parse without the flags
+  RunModuleParserSyncTest(context_data, data, kError, nullptr, 0, nullptr, 0,
+                          nullptr, 0, true, true);
+
+  static const ParserFlag flags[] = {
+      kAllowHarmonyImportMeta, kAllowHarmonyDynamicImport,
+  };
+  // 2.1.1 Static Semantics: Early Errors
+  // ImportMeta
+  // * It is an early Syntax Error if Module is not the syntactic goal symbol.
+  RunParserSyncTest(context_data, data, kError, nullptr, 0, flags,
+                    arraysize(flags));
+  // Making sure the same wouldn't parse without the flags either
+  RunParserSyncTest(context_data, data, kError);
+
+  RunModuleParserSyncTest(context_data, data, kSuccess, nullptr, 0, flags,
+                          arraysize(flags));
+}
+
+TEST(ImportMetaFailure) {
+  // clang-format off
+  const char* context_data[][2] = {
+    {"var ", ""},
+    {"let ", ""},
+    {"const ", ""},
+    {"var [", "] = [1]"},
+    {"([", "] = [1])"},
+    {"({", "} = {1})"},
+    {"var {", " = 1} = 1"},
+    {"for (var ", " of [1]) {}"},
+    {nullptr}
+  };
+
+  const char* data[] = {
+    "import.meta",
+    nullptr
+  };
+
+  // clang-format on
+
+  static const ParserFlag flags[] = {
+      kAllowHarmonyImportMeta, kAllowHarmonyDynamicImport,
+  };
+
+  RunParserSyncTest(context_data, data, kError, nullptr, 0, flags,
+                    arraysize(flags));
+  RunModuleParserSyncTest(context_data, data, kError, nullptr, 0, flags,
+                          arraysize(flags));
+
+  RunModuleParserSyncTest(context_data, data, kError, nullptr, 0, nullptr, 0,
+                          nullptr, 0, true, true);
+  RunParserSyncTest(context_data, data, kError);
+}
 
 TEST(ConstSloppy) {
   // clang-format off
   const char* context_data[][2] = {
     {"", ""},
     {"{", "}"},
-    {NULL, NULL}
+    {nullptr, nullptr}
   };
 
   const char* data[] = {
@@ -8328,7 +8319,7 @@
     "for (const x = 1; x < 1; x++) {}",
     "for (const x in {}) {}",
     "for (const x of []) {}",
-    NULL
+    nullptr
   };
   // clang-format on
   RunParserSyncTest(context_data, data, kSuccess);
@@ -8341,7 +8332,7 @@
     {"", ""},
     {"'use strict';", ""},
     {"{", "}"},
-    {NULL, NULL}
+    {nullptr, nullptr}
   };
 
   const char* data[] = {
@@ -8350,7 +8341,7 @@
     "for (let x = 1; x < 1; x++) {}",
     "for (let x in {}) {}",
     "for (let x of []) {}",
-    NULL
+    nullptr
   };
   // clang-format on
 
@@ -8381,7 +8372,7 @@
       {"'use strict'; var c = { m(", ") { 'use strict'; }"},
       {"'use strict'; var c = { *gm(", ") { 'use strict'; }"},
 
-      {NULL, NULL}};
+      {nullptr, nullptr}};
 
   const char* data[] = {
       // TODO(@caitp): support formal parameter initializers
@@ -8398,7 +8389,7 @@
       "[a, b, ...rest]",
       "{ bindingPattern = {} }",
       "{ initializedBindingPattern } = { initializedBindingPattern: true }",
-      NULL};
+      nullptr};
 
   RunParserSyncTest(context_data, data, kError);
 }
@@ -8410,7 +8401,7 @@
     {"", ""},
     {"{", "}"},
     {"(function() {", "})()"},
-    {NULL, NULL}
+    {nullptr, nullptr}
   };
 
   const char* data[] = {
@@ -8424,7 +8415,7 @@
     "for (var [let] in {}) {}",
     "var let",
     "var [let] = []",
-    NULL
+    nullptr
   };
   // clang-format on
 
@@ -8458,7 +8449,7 @@
     "let [l\\u0065t] = 1",
     "const [l\\u0065t] = 1",
     "for (let l\\u0065t in {}) {}",
-    NULL
+    nullptr
   };
   // clang-format on
 
@@ -8470,12 +8461,12 @@
   // clang-format off
   const char* sloppy_context_data[][2] = {
     {"", ""},
-    {NULL, NULL}
+    {nullptr, nullptr}
   };
 
   const char* strict_context_data[][2] = {
     {"'use strict';", ""},
-    {NULL, NULL}
+    {nullptr, nullptr}
   };
 
   const char* fail_data[] = {
@@ -8558,7 +8549,7 @@
     "(y\\u0069eld);",
     "var y\\u0069eld = 1;",
     "var { y\\u0069eld } = {};",
-    NULL
+    nullptr
   };
   // clang-format on
 
@@ -8571,7 +8562,7 @@
     "var l\\u0065t = 1;",
     "l\\u0065t = 1;",
     "(l\\u0065t === 1);",
-    NULL
+    nullptr
   };
   // clang-format on
 
@@ -8600,7 +8591,7 @@
                               "(st\\u0061tic);",
                               "var st\\u0061tic = 1;",
                               "var { st\\u0061tic } = {};",
-                              NULL};
+                              nullptr};
   RunParserSyncTest(sloppy_context_data, valid_data, kSuccess);
   RunParserSyncTest(strict_context_data, valid_data, kError);
   RunModuleParserSyncTest(strict_context_data, valid_data, kError);
@@ -8612,14 +8603,14 @@
   const char* context_data[][2] = {
     { "'use strict'", "" },
     { "", "" },
-    { NULL, NULL }
+    { nullptr, nullptr }
   };
   const char* error_data[] = {
     "for (();;) {}",
 
     // crbug.com/582626
     "{ NaN ,chA((evarA=new t ( l = !.0[((... co -a0([1]))=> greturnkf",
-    NULL
+    nullptr
   };
   // clang-format on
 
@@ -8636,8 +8627,7 @@
     { "`${'", "'}`" },
     { "`${\"", "\"}`" },
     { "`${`", "`}`" },
-    { "f(tag`", "`);" },
-    { NULL, NULL }
+    { nullptr, nullptr }
   };
   const char* error_data[] = {
     "\\uABCG",
@@ -8648,7 +8638,7 @@
     "\\u{110000",
     "\\u{FFFD }",
     "\\xZF",
-    NULL
+    nullptr
   };
   // clang-format on
 
@@ -8661,12 +8651,12 @@
   const char* context_data[][2] = {
     { "'use strict'", "" },
     { "", "" },
-    { NULL, NULL }
+    { nullptr, nullptr }
   };
   const char* error_data[] = {
     "var x = function.sent",
     "function* g() { yield function.s\\u0065nt; }",
-    NULL
+    nullptr
   };
   // clang-format on
 
@@ -8680,12 +8670,12 @@
   const char* context_data[][2] = {
     { "'use strict'", "" },
     { "", "" },
-    { NULL, NULL }
+    { nullptr, nullptr }
   };
   const char* error_data[] = {
     "var x = new.target",
     "function f() { return new.t\\u0061rget; }",
-    NULL
+    nullptr
   };
   // clang-format on
   RunParserSyncTest(context_data, error_data, kError);
@@ -8698,14 +8688,14 @@
     { "'use strict'; { ", "}" },
     {"(function() { 'use strict';", "})()"},
     {"(function() { 'use strict'; {", "} })()"},
-    { NULL, NULL }
+    { nullptr, nullptr }
   };
   const char* sloppy_context[][2] = {
     { "", "" },
     { "{", "}" },
     {"(function() {", "})()"},
     {"(function() { {", "} })()"},
-    { NULL, NULL }
+    { nullptr, nullptr }
   };
   // Invalid in all contexts
   const char* error_data[] = {
@@ -8736,7 +8726,9 @@
     "label: function* f() { }",
     "if (true) async function f() { }",
     "label: async function f() { }",
-    NULL
+    "if (true) async function* f() { }",
+    "label: async function* f() { }",
+    nullptr
   };
   // Valid only in sloppy mode.
   const char* sloppy_data[] = {
@@ -8746,7 +8738,7 @@
     "label: if (true) function f() { }",
     "label: if (true) {} else function f() { }",
     "label: label2: function f() { }",
-    NULL
+    nullptr
   };
   // clang-format on
 
@@ -8757,20 +8749,6 @@
   // In sloppy mode, sloppy_data is successful
   RunParserSyncTest(sloppy_context, error_data, kError);
   RunParserSyncTest(sloppy_context, sloppy_data, kSuccess);
-
-  // No single statement async iterators
-  // clang-format off
-  const char* async_iterator_data[] = {
-    "if (true) async function* f() { }",
-    "label: async function* f() { }",
-    NULL,
-  };
-  // clang-format on
-  static const ParserFlag flags[] = {kAllowHarmonyAsyncIteration};
-  RunParserSyncTest(sloppy_context, async_iterator_data, kError, NULL, 0, flags,
-                    arraysize(flags));
-  RunParserSyncTest(strict_context, async_iterator_data, kError, NULL, 0, flags,
-                    arraysize(flags));
 }
 
 TEST(ExponentiationOperator) {
@@ -8779,7 +8757,7 @@
     { "var O = { p: 1 }, x = 10; ; if (", ") { foo(); }" },
     { "var O = { p: 1 }, x = 10; ; (", ")" },
     { "var O = { p: 1 }, x = 10; foo(", ")" },
-    { NULL, NULL }
+    { nullptr, nullptr }
   };
   const char* data[] = {
     "(delete O.p) ** 10",
@@ -8805,7 +8783,7 @@
     "x++ ** 10",
     "O.p-- ** 10",
     "x-- ** 10",
-    NULL
+    nullptr
   };
   // clang-format on
 
@@ -8818,7 +8796,7 @@
     { "var O = { p: 1 }, x = 10; ; if (", ") { foo(); }" },
     { "var O = { p: 1 }, x = 10; ; (", ")" },
     { "var O = { p: 1 }, x = 10; foo(", ")" },
-    { NULL, NULL }
+    { nullptr, nullptr }
   };
   const char* error_data[] = {
     "delete O.p ** 10",
@@ -8852,7 +8830,7 @@
     "{ x: x **= 2 ] = { x: 2 }",
     // TODO(caitp): a Call expression as LHS should be an early ReferenceError!
     // "Array() **= 10",
-    NULL
+    nullptr
   };
   // clang-format on
 
@@ -8864,7 +8842,7 @@
   const char* context_data[][2] = {
     { "'use strict';", "" },
     { "", "" },
-    { NULL, NULL }
+    { nullptr, nullptr }
   };
 
   const char* data[] = {
@@ -8884,7 +8862,7 @@
 
     "function* g() { var f = async(yield); }",
     "function* g() { var f = async(x = yield); }",
-    NULL
+    nullptr
   };
   // clang-format on
 
@@ -8900,7 +8878,7 @@
     { "'use strict'; var f = async function() {", "}" },
     { "'use strict'; var f = async() => {", "}" },
     { "'use strict'; var O = { async method() {", "} }" },
-    { NULL, NULL }
+    { nullptr, nullptr }
   };
 
   const char* body_context_data[][2] = {
@@ -8918,7 +8896,7 @@
     { "'use strict'; var O = { method() {", "} }" },
     { "'use strict'; var O = { *method() {", "} }" },
     { "'use strict'; var f = () => {", "}" },
-    { NULL, NULL }
+    { nullptr, nullptr }
   };
 
   const char* body_data[] = {
@@ -8936,9 +8914,12 @@
     "var O = { method(await) { return await; } };",
     "var O = { *method() { var await = 1; return await; } };",
     "var O = { *method(await) { return await; } };",
+    "var asyncFn = async function*() {}",
+    "async function* f() {}",
+    "var O = { async *method() {} };",
 
     "(function await() {})",
-    NULL
+    nullptr
   };
   // clang-format on
 
@@ -8951,12 +8932,12 @@
   const char* context_data[][2] = {
     { "'use strict';", "" },
     { "", "" },
-    { NULL, NULL }
+    { nullptr, nullptr }
   };
 
   const char* strict_context_data[][2] = {
     { "'use strict';", "" },
-    { NULL, NULL }
+    { nullptr, nullptr }
   };
 
   const char* error_data[] = {
@@ -8974,10 +8955,7 @@
 
     "var f = async() => await;",
 
-    "var asyncFn = async function*() {}",
-    "async function* f() {}",
     "var O = { *async method() {} };",
-    "var O = { async *method() {} };",
     "var O = { async method*() {} };",
 
     "var asyncFn = async function(x = await 1) { return x; }",
@@ -9030,7 +9008,7 @@
     "async(...a = b) => b",
     "async(...a,) => b",
     "async(...a, b) => b",
-    NULL
+    nullptr
   };
 
   const char* strict_error_data[] = {
@@ -9049,7 +9027,7 @@
     // TODO(caitp): preparser needs to report duplicate parameter errors, too.
     // "var f = async(dupe, dupe) => {}",
 
-    NULL
+    nullptr
   };
 
   RunParserSyncTest(context_data, error_data, kError);
@@ -9065,7 +9043,7 @@
     { "'use strict'; var f = async function() {", "}" },
     { "'use strict'; var f = async() => {", "}" },
     { "'use strict'; var O = { async method() {", "} }" },
-    { NULL, NULL }
+    { nullptr, nullptr }
   };
 
   const char* async_body_error_data[] = {
@@ -9090,13 +9068,71 @@
     "var e = [await];",
     "var e = {await};",
 
-    NULL
+    nullptr
   };
   // clang-format on
 
   RunParserSyncTest(async_body_context_data, async_body_error_data, kError);
 }
 
+TEST(Regress7173) {
+  // Await expression is an invalid destructuring target, and should not crash
+
+  // clang-format off
+  const char* error_context_data[][2] = {
+    { "'use strict'; async function f() {", "}" },
+    { "async function f() {", "}" },
+    { "'use strict'; function f() {", "}" },
+    { "function f() {", "}" },
+    { "let f = async() => {", "}" },
+    { "let f = () => {", "}" },
+    { "'use strict'; async function* f() {", "}" },
+    { "async function* f() {", "}" },
+    { "'use strict'; function* f() {", "}" },
+    { "function* f() {", "}" },
+    { nullptr, nullptr }
+  };
+
+  const char* error_data[] = {
+    "var [await f] = [];",
+    "let [await f] = [];",
+    "const [await f] = [];",
+
+    "var [...await f] = [];",
+    "let [...await f] = [];",
+    "const [...await f] = [];",
+
+    "var { await f } = {};",
+    "let { await f } = {};",
+    "const { await f } = {};",
+
+    "var { ...await f } = {};",
+    "let { ...await f } = {};",
+    "const { ...await f } = {};",
+
+    "var { f: await f } = {};",
+    "let { f: await f } = {};",
+    "const { f: await f } = {};"
+
+    "var { f: ...await f } = {};",
+    "let { f: ...await f } = {};",
+    "const { f: ...await f } = {};"
+
+    "var { [f]: await f } = {};",
+    "let { [f]: await f } = {};",
+    "const { [f]: await f } = {};",
+
+    "var { [f]: ...await f } = {};",
+    "let { [f]: ...await f } = {};",
+    "const { [f]: ...await f } = {};",
+
+    nullptr
+  };
+  // clang-format on
+
+  RunParserSyncTest(error_context_data, error_data, kError);
+}
+
 TEST(AsyncAwaitFormalParameters) {
   // clang-format off
   const char* context_for_formal_parameters[][2] = {
@@ -9149,6 +9185,11 @@
     "x = class await {}",
     "x = 1 ? class await {} : 0",
     "x = async function await() {}",
+
+    "x = y[await]",
+    "x = `${await}`",
+    "x = y()[await]",
+
     nullptr
   };
   // clang-format on
@@ -9164,26 +9205,26 @@
   // clang-format off
   const char* context_data[][2] = {
     { "", "" },
-    { NULL, NULL }
+    { nullptr, nullptr }
   };
 
   const char* data[] = {
     "export default async function() { await 1; }",
     "export default async function async() { await 1; }",
     "export async function async() { await 1; }",
-    NULL
+    nullptr
   };
   // clang-format on
 
-  RunModuleParserSyncTest(context_data, data, kSuccess, NULL, 0, NULL, 0, NULL,
-                          0, false);
+  RunModuleParserSyncTest(context_data, data, kSuccess, nullptr, 0, nullptr, 0,
+                          nullptr, 0, false);
 }
 
 TEST(AsyncAwaitModuleErrors) {
   // clang-format off
   const char* context_data[][2] = {
     { "", "" },
-    { NULL, NULL }
+    { nullptr, nullptr }
   };
 
   const char* error_data[] = {
@@ -9193,32 +9234,32 @@
     "export async function() {}",
     "export async",
     "export async\nfunction async() { await 1; }",
-    NULL
+    nullptr
   };
   // clang-format on
 
-  RunModuleParserSyncTest(context_data, error_data, kError, NULL, 0, NULL, 0,
-                          NULL, 0, false);
+  RunModuleParserSyncTest(context_data, error_data, kError, nullptr, 0, nullptr,
+                          0, nullptr, 0, false);
 }
 
 TEST(RestrictiveForInErrors) {
   // clang-format off
   const char* strict_context_data[][2] = {
     { "'use strict'", "" },
-    { NULL, NULL }
+    { nullptr, nullptr }
   };
   const char* sloppy_context_data[][2] = {
     { "", "" },
-    { NULL, NULL }
+    { nullptr, nullptr }
   };
   const char* error_data[] = {
     "for (const x = 0 in {});",
     "for (let x = 0 in {});",
-    NULL
+    nullptr
   };
   const char* sloppy_data[] = {
     "for (var x = 0 in {});",
-    NULL
+    nullptr
   };
   // clang-format on
 
@@ -9234,24 +9275,21 @@
       {"{", "}"},
       {"(function() { {", "} })()"},
       {"(function() {'use strict'; {", "} })()"},
-      {NULL, NULL}};
+      {nullptr, nullptr}};
   const char* top_level_context_data[][2] = {
       {"'use strict';", ""},
       {"", ""},
       {"(function() {", "})()"},
       {"(function() {'use strict';", "})()"},
-      {NULL, NULL}};
+      {nullptr, nullptr}};
   const char* error_data[] = {"function* x() {} function* x() {}",
                               "function x() {} function* x() {}",
-                              "function* x() {} function x() {}", NULL};
-  static const ParserFlag always_flags[] = {kAllowHarmonyRestrictiveGenerators};
+                              "function* x() {} function x() {}", nullptr};
   // The preparser doesn't enforce the restriction, so turn it off.
   bool test_preparser = false;
-  RunParserSyncTest(block_context_data, error_data, kError, NULL, 0,
-                    always_flags, arraysize(always_flags), NULL, 0, false,
-                    test_preparser);
-  RunParserSyncTest(top_level_context_data, error_data, kSuccess, NULL, 0,
-                    always_flags, arraysize(always_flags));
+  RunParserSyncTest(block_context_data, error_data, kError, nullptr, 0, nullptr,
+                    0, nullptr, 0, false, test_preparser);
+  RunParserSyncTest(top_level_context_data, error_data, kSuccess);
 }
 
 TEST(NoDuplicateAsyncFunctionInBlock) {
@@ -9260,13 +9298,13 @@
       {"{", "}"},
       {"(function() { {", "} })()"},
       {"(function() {'use strict'; {", "} })()"},
-      {NULL, NULL}};
+      {nullptr, nullptr}};
   const char* top_level_context_data[][2] = {
       {"'use strict';", ""},
       {"", ""},
       {"(function() {", "})()"},
       {"(function() {'use strict';", "})()"},
-      {NULL, NULL}};
+      {nullptr, nullptr}};
   const char* error_data[] = {"async function x() {} async function x() {}",
                               "function x() {} async function x() {}",
                               "async function x() {} function x() {}",
@@ -9274,11 +9312,11 @@
                               "function* x() {} async function x() {}",
                               "async function x() {} function* x() {}",
                               "function* x() {} async function x() {}",
-                              NULL};
+                              nullptr};
   // The preparser doesn't enforce the restriction, so turn it off.
   bool test_preparser = false;
-  RunParserSyncTest(block_context_data, error_data, kError, NULL, 0, NULL, 0,
-                    NULL, 0, false, test_preparser);
+  RunParserSyncTest(block_context_data, error_data, kError, nullptr, 0, nullptr,
+                    0, nullptr, 0, false, test_preparser);
   RunParserSyncTest(top_level_context_data, error_data, kSuccess);
 }
 
@@ -9289,7 +9327,7 @@
     { "'use strict';", "" },
     { "function foo() {", "}" },
     { "function foo() {'use strict';", "}" },
-    { NULL, NULL }
+    { nullptr, nullptr }
   };
 
   const char* data[] = {
@@ -9312,7 +9350,7 @@
     "a(...[],);",
     "a(1, 2, ...[],);",
     "a(...[], 2, ...[],);",
-    NULL
+    nullptr
   };
   // clang-format on
 
@@ -9326,7 +9364,7 @@
     { "'use strict';", "" },
     { "function foo() {", "}" },
     { "function foo() {'use strict';", "}" },
-    { NULL, NULL }
+    { nullptr, nullptr }
   };
 
   const char* data[] = {
@@ -9375,7 +9413,7 @@
     "(,);",
     "(a,);",
     "(a,b,c,);",
-    NULL
+    nullptr
   };
   // clang-format on
 
@@ -9387,14 +9425,14 @@
     // clang-format off
     const char* context_data[][2] = {
       { "function f(", ") {}" },
-      { NULL, NULL }
+      { nullptr, nullptr }
     };
     const char* success_data[] = {
       "{arguments}",
       "{arguments = false}",
       "arg1, arguments",
       "arg1, ...arguments",
-      NULL
+      nullptr
     };
     // clang-format on
     RunParserSyncTest(context_data, success_data, kSuccess);
@@ -9404,13 +9442,13 @@
     // clang-format off
     const char* context_data[][2] = {
       { "function f() {", "}" },
-      { NULL, NULL }
+      { nullptr, nullptr }
     };
     const char* data[] = {
       "const arguments = 1",
       "let arguments",
       "var arguments",
-      NULL
+      nullptr
     };
     // clang-format on
     RunParserSyncTest(context_data, data, kSuccess);
@@ -9694,7 +9732,7 @@
 
       CHECK(i::parsing::ParseProgram(&info, isolate));
       CHECK(i::Compiler::Analyze(&info));
-      CHECK(info.literal() != NULL);
+      CHECK_NOT_NULL(info.literal());
 
       i::Scope* scope = info.literal()->scope()->inner_scope();
       DCHECK_NOT_NULL(scope);
@@ -9712,7 +9750,7 @@
 TEST(EscapedStrictReservedWord) {
   // Test that identifiers which are both escaped and only reserved in the
   // strict mode are accepted in non-strict mode.
-  const char* context_data[][2] = {{"", ""}, {NULL, NULL}};
+  const char* context_data[][2] = {{"", ""}, {nullptr, nullptr}};
 
   const char* statement_data[] = {"if (true) l\\u0065t: ;",
                                   "function l\\u0065t() { }",
@@ -9724,7 +9762,7 @@
                                   "function packag\\u0065() {}",
                                   "function impl\\u0065ments() {}",
                                   "function privat\\u0065() {}",
-                                  NULL};
+                                  nullptr};
 
   RunParserSyncTest(context_data, statement_data, kSuccess);
 }
@@ -9750,7 +9788,7 @@
     { "async function f() { 'use strict'; for await\n", " ; }" },
     { "async function f() { 'use strict'; for await\n", " { } }" },
     { "async function * f() { 'use strict'; for await\n", " { } }" },
-    { NULL, NULL }
+    { nullptr, nullptr }
   };
 
   const char* context_data2[][2] = {
@@ -9772,7 +9810,7 @@
     { "async function f() { 'use strict'; let a; for await\n", " ; }" },
     { "async function f() { 'use strict'; let a; for await\n", " { } }" },
     { "async function * f() { 'use strict'; let a; for await\n", " { } }" },
-    { NULL, NULL }
+    { nullptr, nullptr }
   };
 
   const char* expr_data[] = {
@@ -9794,7 +9832,7 @@
     "({\"a\": a = 1} of [])",
     "({[Symbol.iterator]: a = 1} of [])",
     "({0: a = 1} of [])",
-    NULL
+    nullptr
   };
 
   const char* var_data[] = {
@@ -9815,7 +9853,7 @@
     "(var {\"a\": a = 1} of [])",
     "(var {[Symbol.iterator]: a = 1} of [])",
     "(var {0: a = 1} of [])",
-    NULL
+    nullptr
   };
 
   const char* lexical_data[] = {
@@ -9853,26 +9891,21 @@
     "(const {\"a\": a = 1} of [])",
     "(const {[Symbol.iterator]: a = 1} of [])",
     "(const {0: a = 1} of [])",
-    NULL
+    nullptr
   };
   // clang-format on
-  static const ParserFlag always_flags[] = {kAllowHarmonyAsyncIteration};
-  RunParserSyncTest(context_data, expr_data, kSuccess, NULL, 0, always_flags,
-                    arraysize(always_flags));
-  RunParserSyncTest(context_data2, expr_data, kSuccess, NULL, 0, always_flags,
-                    arraysize(always_flags));
+  RunParserSyncTest(context_data, expr_data, kSuccess);
+  RunParserSyncTest(context_data2, expr_data, kSuccess);
 
-  RunParserSyncTest(context_data, var_data, kSuccess, NULL, 0, always_flags,
-                    arraysize(always_flags));
+  RunParserSyncTest(context_data, var_data, kSuccess);
   // TODO(marja): PreParser doesn't report early errors.
   //              (https://bugs.chromium.org/p/v8/issues/detail?id=2728)
-  // RunParserSyncTest(context_data2, var_data, kError, NULL, 0, always_flags,
+  // RunParserSyncTest(context_data2, var_data, kError, nullptr, 0,
+  // always_flags,
   //                   arraysize(always_flags));
 
-  RunParserSyncTest(context_data, lexical_data, kSuccess, NULL, 0, always_flags,
-                    arraysize(always_flags));
-  RunParserSyncTest(context_data2, lexical_data, kSuccess, NULL, 0,
-                    always_flags, arraysize(always_flags));
+  RunParserSyncTest(context_data, lexical_data, kSuccess);
+  RunParserSyncTest(context_data2, lexical_data, kSuccess);
 }
 
 TEST(ForAwaitOfErrors) {
@@ -9886,7 +9919,7 @@
     { "async function * f() { for await ", " { } }" },
     { "async function * f() { 'use strict'; for await ", " ; }" },
     { "async function * f() { 'use strict'; for await ", "  { } }" },
-    { NULL, NULL }
+    { nullptr, nullptr }
   };
 
   const char* data[] = {
@@ -10030,12 +10063,10 @@
     "(const {0: a = 1} = 1 of [])",
     "(const {0: a = 1}, b of [])",
 
-    NULL
+    nullptr
   };
   // clang-format on
-  static const ParserFlag always_flags[] = {kAllowHarmonyAsyncIteration};
-  RunParserSyncTest(context_data, data, kError, NULL, 0, always_flags,
-                    arraysize(always_flags));
+  RunParserSyncTest(context_data, data, kError);
 }
 
 TEST(ForAwaitOfFunctionDeclaration) {
@@ -10043,7 +10074,7 @@
   const char* context_data[][2] = {
     { "async function f() {", "}" },
     { "async function f() { 'use strict'; ", "}" },
-    { NULL, NULL }
+    { nullptr, nullptr }
   };
 
   const char* data[] = {
@@ -10054,13 +10085,11 @@
     // TODO(caitp): handle async function declarations in ParseScopedStatement.
     // "for await (x of []) async function a() {};",
     // "for await (x of []) async function a() {}; return a;",
-    NULL
+    nullptr
   };
 
   // clang-format on
-  static const ParserFlag always_flags[] = {kAllowHarmonyAsyncIteration};
-  RunParserSyncTest(context_data, data, kError, NULL, 0, always_flags,
-                    arraysize(always_flags));
+  RunParserSyncTest(context_data, data, kError);
 }
 
 TEST(AsyncGenerator) {
@@ -10070,7 +10099,7 @@
     { "(async function * gen() {", "})" },
     { "(async function * () {", "})" },
     { "({ async * gen () {", "} })" },
-    { NULL, NULL }
+    { nullptr, nullptr }
   };
 
   const char* statement_data[] = {
@@ -10153,13 +10182,11 @@
     "yield await // comment\n 10",
     "await (yield /* comment */)",
     "await (yield // comment\n)",
-    NULL
+    nullptr
   };
   // clang-format on
 
-  static const ParserFlag always_flags[] = {kAllowHarmonyAsyncIteration};
-  RunParserSyncTest(context_data, statement_data, kSuccess, NULL, 0,
-                    always_flags, arraysize(always_flags));
+  RunParserSyncTest(context_data, statement_data, kSuccess);
 }
 
 TEST(AsyncGeneratorErrors) {
@@ -10167,7 +10194,7 @@
   const char* context_data[][2] = {
     { "async function * gen() {", "}" },
     { "\"use strict\"; async function * gen() {", "}" },
-    { NULL, NULL }
+    { nullptr, nullptr }
   };
 
   const char* statement_data[] = {
@@ -10243,13 +10270,11 @@
     "for (await 'x' in {} of {});",
     "class C extends yield { }",
     "class C extends await { }",
-    NULL
+    nullptr
   };
   // clang-format on
 
-  static const ParserFlag always_flags[] = {kAllowHarmonyAsyncIteration};
-  RunParserSyncTest(context_data, statement_data, kError, NULL, 0, always_flags,
-                    arraysize(always_flags));
+  RunParserSyncTest(context_data, statement_data, kError);
 }
 
 TEST(LexicalLoopVariable) {
@@ -10271,7 +10296,7 @@
     i::DeclarationScope::Analyze(&info);
     i::DeclarationScope::AllocateScopeInfos(&info, isolate,
                                             i::AnalyzeMode::kRegular);
-    CHECK(info.literal() != NULL);
+    CHECK_NOT_NULL(info.literal());
 
     i::DeclarationScope* script_scope = info.literal()->scope();
     CHECK(script_scope->is_script_scope());
diff --git a/src/v8/test/cctest/test-platform-linux.cc b/src/v8/test/cctest/test-platform-linux.cc
deleted file mode 100644
index d41222e..0000000
--- a/src/v8/test/cctest/test-platform-linux.cc
+++ /dev/null
@@ -1,53 +0,0 @@
-// Copyright 2006-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.
-//
-
-#include "src/base/platform/platform.h"
-#include "test/cctest/cctest.h"
-
-using OS = v8::base::OS;
-
-namespace v8 {
-namespace internal {
-
-TEST(OSReserveMemory) {
-  size_t mem_size = 0;
-  void* mem_addr = OS::ReserveAlignedRegion(1 * MB, OS::AllocateAlignment(),
-                                            GetRandomMmapAddr(), &mem_size);
-  CHECK_NE(0, mem_size);
-  CHECK_NOT_NULL(mem_addr);
-  size_t block_size = 4 * KB;
-  CHECK(OS::CommitRegion(mem_addr, block_size, false));
-  // Check whether we can write to memory.
-  int* addr = static_cast<int*>(mem_addr);
-  addr[KB - 1] = 2;
-  CHECK(OS::UncommitRegion(mem_addr, block_size));
-  OS::ReleaseRegion(mem_addr, mem_size);
-}
-
-}  // namespace internal
-}  // namespace v8
diff --git a/src/v8/test/cctest/test-platform-win32.cc b/src/v8/test/cctest/test-platform-win32.cc
deleted file mode 100644
index d41222e..0000000
--- a/src/v8/test/cctest/test-platform-win32.cc
+++ /dev/null
@@ -1,53 +0,0 @@
-// Copyright 2006-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.
-//
-
-#include "src/base/platform/platform.h"
-#include "test/cctest/cctest.h"
-
-using OS = v8::base::OS;
-
-namespace v8 {
-namespace internal {
-
-TEST(OSReserveMemory) {
-  size_t mem_size = 0;
-  void* mem_addr = OS::ReserveAlignedRegion(1 * MB, OS::AllocateAlignment(),
-                                            GetRandomMmapAddr(), &mem_size);
-  CHECK_NE(0, mem_size);
-  CHECK_NOT_NULL(mem_addr);
-  size_t block_size = 4 * KB;
-  CHECK(OS::CommitRegion(mem_addr, block_size, false));
-  // Check whether we can write to memory.
-  int* addr = static_cast<int*>(mem_addr);
-  addr[KB - 1] = 2;
-  CHECK(OS::UncommitRegion(mem_addr, block_size));
-  OS::ReleaseRegion(mem_addr, mem_size);
-}
-
-}  // namespace internal
-}  // namespace v8
diff --git a/src/v8/test/cctest/test-platform.cc b/src/v8/test/cctest/test-platform.cc
index a0fbc21..e7ad2d8 100644
--- a/src/v8/test/cctest/test-platform.cc
+++ b/src/v8/test/cctest/test-platform.cc
@@ -7,8 +7,12 @@
 #include "src/base/platform/platform.h"
 #include "test/cctest/cctest.h"
 
-#ifdef V8_CC_GNU
+using OS = v8::base::OS;
 
+namespace v8 {
+namespace internal {
+
+#ifdef V8_CC_GNU
 static uintptr_t sp_addr = 0;
 
 void GetStackPointer(const v8::FunctionCallbackInfo<v8::Value>& args) {
@@ -40,7 +44,6 @@
       args.GetIsolate(), static_cast<uint32_t>(sp_addr)));
 }
 
-
 TEST(StackAlignment) {
   v8::Isolate* isolate = CcTest::isolate();
   v8::HandleScope handle_scope(isolate);
@@ -49,7 +52,7 @@
   global_template->Set(v8_str("get_stack_pointer"),
                        v8::FunctionTemplate::New(isolate, GetStackPointer));
 
-  LocalContext env(NULL, global_template);
+  LocalContext env(nullptr, global_template);
   CompileRun(
       "function foo() {"
       "  return get_stack_pointer();"
@@ -61,10 +64,12 @@
           .ToLocalChecked());
 
   v8::Local<v8::Value> result =
-      foo->Call(isolate->GetCurrentContext(), global_object, 0, NULL)
+      foo->Call(isolate->GetCurrentContext(), global_object, 0, nullptr)
           .ToLocalChecked();
   CHECK_EQ(0u, result->Uint32Value(isolate->GetCurrentContext()).FromJust() %
-                   v8::base::OS::ActivationFrameAlignment());
+                   OS::ActivationFrameAlignment());
 }
-
 #endif  // V8_CC_GNU
+
+}  // namespace internal
+}  // namespace v8
diff --git a/src/v8/test/cctest/test-profile-generator.cc b/src/v8/test/cctest/test-profile-generator.cc
index 6a16cca..9dda53a 100644
--- a/src/v8/test/cctest/test-profile-generator.cc
+++ b/src/v8/test/cctest/test-profile-generator.cc
@@ -90,17 +90,16 @@
   explicit ProfileTreeTestHelper(const ProfileTree* tree)
       : tree_(tree) { }
 
-  ProfileNode* Walk(CodeEntry* entry1,
-                    CodeEntry* entry2 = NULL,
-                    CodeEntry* entry3 = NULL) {
+  ProfileNode* Walk(CodeEntry* entry1, CodeEntry* entry2 = nullptr,
+                    CodeEntry* entry3 = nullptr) {
     ProfileNode* node = tree_->root();
     node = node->FindChild(entry1);
-    if (node == NULL) return NULL;
-    if (entry2 != NULL) {
+    if (node == nullptr) return nullptr;
+    if (entry2 != nullptr) {
       node = node->FindChild(entry2);
-      if (node == NULL) return NULL;
+      if (node == nullptr) return nullptr;
     }
-    if (entry3 != NULL) {
+    if (entry3 != nullptr) {
       node = node->FindChild(entry3);
     }
     return node;
@@ -124,7 +123,8 @@
   CHECK(!helper.Walk(&entry2));
   CHECK(!helper.Walk(&entry3));
 
-  CodeEntry* path[] = {NULL, &entry3, NULL, &entry2, NULL, NULL, &entry1, NULL};
+  CodeEntry* path[] = {nullptr, &entry3, nullptr, &entry2,
+                       nullptr, nullptr, &entry1, nullptr};
   std::vector<CodeEntry*> path_vec(path, path + arraysize(path));
   tree.AddPathFromEnd(path_vec);
   CHECK(!helper.Walk(&entry2));
@@ -500,7 +500,7 @@
   for (const ProfileNode* child : *parent->children()) {
     if (strcmp(child->entry()->name(), name) == 0) return child;
   }
-  return NULL;
+  return nullptr;
 }
 
 
@@ -578,7 +578,7 @@
                                         child->GetFunctionName());
     if (strcmp(*function_name, name) == 0) return child;
   }
-  return NULL;
+  return nullptr;
 }
 
 
@@ -649,8 +649,7 @@
       v8::Utils::OpenHandle(*v8::Local<v8::Function>::Cast(
           env->Global()->Get(env.local(), v8_str(name)).ToLocalChecked())));
   CodeEntry* func_entry = code_map->FindEntry(func->abstract_code()->address());
-  if (!func_entry)
-    FATAL(name);
+  if (!func_entry) FATAL("%s", name);
   return func_entry->line_number();
 }
 
diff --git a/src/v8/test/cctest/test-random-number-generator.cc b/src/v8/test/cctest/test-random-number-generator.cc
index 4fff8e9..5b13bda 100644
--- a/src/v8/test/cctest/test-random-number-generator.cc
+++ b/src/v8/test/cctest/test-random-number-generator.cc
@@ -126,7 +126,7 @@
 
       // For 1 degree of freedom this corresponds to 1 in a million.  We are
       // running ~8000 tests, so that would be surprising.
-      CHECK(chi_squared <= 24);
+      CHECK_LE(chi_squared, 24);
 
       // If the predictor bit is a fixed 0 or 1 then it makes no sense to
       // repeat the test with a different age.
diff --git a/src/v8/test/cctest/test-regexp.cc b/src/v8/test/cctest/test-regexp.cc
index 5d28a57..5b4e42c 100644
--- a/src/v8/test/cctest/test-regexp.cc
+++ b/src/v8/test/cctest/test-regexp.cc
@@ -116,7 +116,7 @@
   if (unicode) flags |= JSRegExp::kUnicode;
   CHECK(v8::internal::RegExpParser::ParseRegExp(CcTest::i_isolate(), &zone,
                                                 &reader, flags, &result));
-  CHECK(result.tree != NULL);
+  CHECK_NOT_NULL(result.tree);
   CHECK(result.error.is_null());
   std::ostringstream os;
   result.tree->Print(os, &zone);
@@ -134,7 +134,7 @@
   RegExpCompileData result;
   CHECK(v8::internal::RegExpParser::ParseRegExp(
       CcTest::i_isolate(), &zone, &reader, JSRegExp::kNone, &result));
-  CHECK(result.tree != NULL);
+  CHECK_NOT_NULL(result.tree);
   CHECK(result.error.is_null());
   return result.simple;
 }
@@ -152,7 +152,7 @@
   RegExpCompileData result;
   CHECK(v8::internal::RegExpParser::ParseRegExp(
       CcTest::i_isolate(), &zone, &reader, JSRegExp::kNone, &result));
-  CHECK(result.tree != NULL);
+  CHECK_NOT_NULL(result.tree);
   CHECK(result.error.is_null());
   int min_match = result.tree->min_match();
   int max_match = result.tree->max_match();
@@ -169,10 +169,7 @@
     CHECK_EQ(max, min_max.max_match);                                          \
   }
 
-
-void TestRegExpParser(bool lookbehind) {
-  FLAG_harmony_regexp_lookbehind = lookbehind;
-
+TEST(RegExpParser) {
   CHECK_PARSE_ERROR("?");
 
   CheckParseEq("abc", "'abc'");
@@ -204,13 +201,8 @@
   CheckParseEq("foo|(bar|baz)|quux", "(| 'foo' (^ (| 'bar' 'baz')) 'quux')");
   CheckParseEq("foo(?=bar)baz", "(: 'foo' (-> + 'bar') 'baz')");
   CheckParseEq("foo(?!bar)baz", "(: 'foo' (-> - 'bar') 'baz')");
-  if (lookbehind) {
-    CheckParseEq("foo(?<=bar)baz", "(: 'foo' (<- + 'bar') 'baz')");
-    CheckParseEq("foo(?<!bar)baz", "(: 'foo' (<- - 'bar') 'baz')");
-  } else {
-    CHECK_PARSE_ERROR("foo(?<=bar)baz");
-    CHECK_PARSE_ERROR("foo(?<!bar)baz");
-  }
+  CheckParseEq("foo(?<=bar)baz", "(: 'foo' (<- + 'bar') 'baz')");
+  CheckParseEq("foo(?<!bar)baz", "(: 'foo' (<- - 'bar') 'baz')");
   CheckParseEq("()", "(^ %)");
   CheckParseEq("(?=)", "(-> + %)");
   CheckParseEq("[]", "^[\\x00-\\u{10ffff}]");  // Doesn't compile on windows
@@ -294,10 +286,8 @@
                "(: (-> - (: (<- 1) (^ 'a') (<- 1))) (<- 1))");
   CheckParseEq("\\1\\2(a(?:\\1(b\\1\\2))\\2)\\1",
                "(: (<- 1) (<- 2) (^ (: 'a' (?: (^ 'b')) (<- 2))) (<- 1))");
-  if (lookbehind) {
-    CheckParseEq("\\1\\2(a(?<=\\1(b\\1\\2))\\2)\\1",
-                 "(: (<- 1) (<- 2) (^ (: 'a' (<- + (^ 'b')) (<- 2))) (<- 1))");
-  }
+  CheckParseEq("\\1\\2(a(?<=\\1(b\\1\\2))\\2)\\1",
+               "(: (<- 1) (<- 2) (^ (: 'a' (<- + (^ 'b')) (<- 2))) (<- 1))");
   CheckParseEq("[\\0]", "[\\x00]");
   CheckParseEq("[\\11]", "[\\x09]");
   CheckParseEq("[\\11a]", "[\\x09 a]");
@@ -460,16 +450,6 @@
   FLAG_harmony_regexp_named_captures = false;
 }
 
-
-TEST(ParserWithLookbehind) {
-  TestRegExpParser(true);  // Lookbehind enabled.
-}
-
-
-TEST(ParserWithoutLookbehind) {
-  TestRegExpParser(true);  // Lookbehind enabled.
-}
-
 TEST(ParserRegression) {
   CheckParseEq("[A-Z$-][x]", "(! [A-Z $ -] [x])");
   CheckParseEq("a{3,4*}", "(: 'a{3,' (# 0 - g '4') '}')");
@@ -487,7 +467,7 @@
   if (unicode) flags |= JSRegExp::kUnicode;
   CHECK(!v8::internal::RegExpParser::ParseRegExp(CcTest::i_isolate(), &zone,
                                                  &reader, flags, &result));
-  CHECK(result.tree == NULL);
+  CHECK_NULL(result.tree);
   CHECK(!result.error.is_null());
   std::unique_ptr<char[]> str = result.error->ToCString(ALLOW_NULLS);
   CHECK_EQ(0, strcmp(expected, str.get()));
@@ -604,7 +584,7 @@
   if (unicode) flags = JSRegExp::kUnicode;
   if (!v8::internal::RegExpParser::ParseRegExp(CcTest::i_isolate(), zone,
                                                &reader, flags, &compile_data))
-    return NULL;
+    return nullptr;
   Handle<String> pattern = isolate->factory()
                                ->NewStringFromUtf8(CStrVector(input))
                                .ToHandleChecked();
@@ -883,13 +863,13 @@
 
   Label fail, backtrack;
   m.PushBacktrack(&fail);
-  m.CheckNotAtStart(0, NULL);
-  m.LoadCurrentCharacter(2, NULL);
-  m.CheckNotCharacter('o', NULL);
-  m.LoadCurrentCharacter(1, NULL, false);
-  m.CheckNotCharacter('o', NULL);
-  m.LoadCurrentCharacter(0, NULL, false);
-  m.CheckNotCharacter('f', NULL);
+  m.CheckNotAtStart(0, nullptr);
+  m.LoadCurrentCharacter(2, nullptr);
+  m.CheckNotCharacter('o', nullptr);
+  m.LoadCurrentCharacter(1, nullptr, false);
+  m.CheckNotCharacter('o', nullptr);
+  m.LoadCurrentCharacter(0, nullptr, false);
+  m.CheckNotCharacter('f', nullptr);
   m.WriteCurrentPositionToRegister(0, 0);
   m.WriteCurrentPositionToRegister(1, 3);
   m.AdvanceCurrentPosition(3);
@@ -950,13 +930,13 @@
 
   Label fail, backtrack;
   m.PushBacktrack(&fail);
-  m.CheckNotAtStart(0, NULL);
-  m.LoadCurrentCharacter(2, NULL);
-  m.CheckNotCharacter('o', NULL);
-  m.LoadCurrentCharacter(1, NULL, false);
-  m.CheckNotCharacter('o', NULL);
-  m.LoadCurrentCharacter(0, NULL, false);
-  m.CheckNotCharacter('f', NULL);
+  m.CheckNotAtStart(0, nullptr);
+  m.LoadCurrentCharacter(2, nullptr);
+  m.CheckNotCharacter('o', nullptr);
+  m.LoadCurrentCharacter(1, nullptr, false);
+  m.CheckNotCharacter('o', nullptr);
+  m.LoadCurrentCharacter(0, nullptr, false);
+  m.CheckNotCharacter('f', nullptr);
   m.WriteCurrentPositionToRegister(0, 0);
   m.WriteCurrentPositionToRegister(1, 3);
   m.AdvanceCurrentPosition(3);
@@ -1027,7 +1007,7 @@
   m.Succeed();
   m.Bind(&fail);
   m.PushBacktrack(&backtrack);
-  m.LoadCurrentCharacter(10, NULL);
+  m.LoadCurrentCharacter(10, nullptr);
   m.Succeed();
   m.Bind(&backtrack);
   m.Fail();
@@ -1040,13 +1020,8 @@
   Handle<SeqOneByteString> seq_input = Handle<SeqOneByteString>::cast(input);
   Address start_adr = seq_input->GetCharsAddress();
 
-  NativeRegExpMacroAssembler::Result result =
-      Execute(*code,
-              *input,
-              0,
-              start_adr,
-              start_adr + input->length(),
-              NULL);
+  NativeRegExpMacroAssembler::Result result = Execute(
+      *code, *input, 0, start_adr, start_adr + input->length(), nullptr);
 
   CHECK_EQ(NativeRegExpMacroAssembler::FAILURE, result);
 }
@@ -1194,22 +1169,13 @@
   Handle<SeqOneByteString> seq_input = Handle<SeqOneByteString>::cast(input);
   Address start_adr = seq_input->GetCharsAddress();
 
-  NativeRegExpMacroAssembler::Result result =
-      Execute(*code,
-              *input,
-              0,
-              start_adr,
-              start_adr + input->length(),
-              NULL);
+  NativeRegExpMacroAssembler::Result result = Execute(
+      *code, *input, 0, start_adr, start_adr + input->length(), nullptr);
 
   CHECK_EQ(NativeRegExpMacroAssembler::SUCCESS, result);
 
-  result = Execute(*code,
-                   *input,
-                   3,
-                   start_adr + 3,
-                   start_adr + input->length(),
-                   NULL);
+  result = Execute(*code, *input, 3, start_adr + 3, start_adr + input->length(),
+                   nullptr);
 
   CHECK_EQ(NativeRegExpMacroAssembler::SUCCESS, result);
 }
@@ -1401,13 +1367,8 @@
   Handle<SeqOneByteString> seq_input = Handle<SeqOneByteString>::cast(input);
   Address start_adr = seq_input->GetCharsAddress();
 
-  NativeRegExpMacroAssembler::Result result =
-      Execute(*code,
-              *input,
-              0,
-              start_adr,
-              start_adr + input->length(),
-              NULL);
+  NativeRegExpMacroAssembler::Result result = Execute(
+      *code, *input, 0, start_adr, start_adr + input->length(), nullptr);
 
   CHECK_EQ(NativeRegExpMacroAssembler::EXCEPTION, result);
   CHECK(isolate->has_pending_exception());
@@ -1481,13 +1442,13 @@
   m.Fail();
   m.Bind(&start);
   m.PushBacktrack(&fail);
-  m.CheckNotAtStart(0, NULL);
-  m.LoadCurrentCharacter(0, NULL);
-  m.CheckNotCharacter('f', NULL);
-  m.LoadCurrentCharacter(1, NULL);
-  m.CheckNotCharacter('o', NULL);
-  m.LoadCurrentCharacter(2, NULL);
-  m.CheckNotCharacter('o', NULL);
+  m.CheckNotAtStart(0, nullptr);
+  m.LoadCurrentCharacter(0, nullptr);
+  m.CheckNotCharacter('f', nullptr);
+  m.LoadCurrentCharacter(1, nullptr);
+  m.CheckNotCharacter('o', nullptr);
+  m.LoadCurrentCharacter(2, nullptr);
+  m.CheckNotCharacter('o', nullptr);
   m.WriteCurrentPositionToRegister(0, 0);
   m.WriteCurrentPositionToRegister(1, 3);
   m.WriteCurrentPositionToRegister(2, 1);
@@ -1572,7 +1533,7 @@
 
 static uc32 canonicalize(uc32 c) {
   unibrow::uchar canon[unibrow::Ecma262Canonicalize::kMaxWidth];
-  int count = unibrow::Ecma262Canonicalize::Convert(c, '\0', canon, NULL);
+  int count = unibrow::Ecma262Canonicalize::Convert(c, '\0', canon, nullptr);
   if (count == 0) {
     return c;
   } else {
@@ -1616,7 +1577,7 @@
 
 static uc32 CanonRangeEnd(uc32 c) {
   unibrow::uchar canon[unibrow::CanonicalizationRange::kMaxWidth];
-  int count = unibrow::CanonicalizationRange::Convert(c, '\0', canon, NULL);
+  int count = unibrow::CanonicalizationRange::Convert(c, '\0', canon, nullptr);
   if (count == 0) {
     return c;
   } else {
@@ -1729,8 +1690,7 @@
 
 
 static bool InClass(uc32 c, ZoneList<CharacterRange>* ranges) {
-  if (ranges == NULL)
-    return false;
+  if (ranges == nullptr) return false;
   for (int i = 0; i < ranges->length(); i++) {
     CharacterRange range = ranges->at(i);
     if (range.from() <= c && c <= range.to())
@@ -1747,35 +1707,35 @@
   base->Add(CharacterRange::Everything(), &zone);
   UnicodeRangeSplitter splitter(&zone, base);
   // BMP
-  for (uc32 c = 0; c < 0xd800; c++) {
+  for (uc32 c = 0; c < 0xD800; c++) {
     CHECK(InClass(c, splitter.bmp()));
     CHECK(!InClass(c, splitter.lead_surrogates()));
     CHECK(!InClass(c, splitter.trail_surrogates()));
     CHECK(!InClass(c, splitter.non_bmp()));
   }
   // Lead surrogates
-  for (uc32 c = 0xd800; c < 0xdbff; c++) {
+  for (uc32 c = 0xD800; c < 0xDBFF; c++) {
     CHECK(!InClass(c, splitter.bmp()));
     CHECK(InClass(c, splitter.lead_surrogates()));
     CHECK(!InClass(c, splitter.trail_surrogates()));
     CHECK(!InClass(c, splitter.non_bmp()));
   }
   // Trail surrogates
-  for (uc32 c = 0xdc00; c < 0xdfff; c++) {
+  for (uc32 c = 0xDC00; c < 0xDFFF; c++) {
     CHECK(!InClass(c, splitter.bmp()));
     CHECK(!InClass(c, splitter.lead_surrogates()));
     CHECK(InClass(c, splitter.trail_surrogates()));
     CHECK(!InClass(c, splitter.non_bmp()));
   }
   // BMP
-  for (uc32 c = 0xe000; c < 0xffff; c++) {
+  for (uc32 c = 0xE000; c < 0xFFFF; c++) {
     CHECK(InClass(c, splitter.bmp()));
     CHECK(!InClass(c, splitter.lead_surrogates()));
     CHECK(!InClass(c, splitter.trail_surrogates()));
     CHECK(!InClass(c, splitter.non_bmp()));
   }
   // Non-BMP
-  for (uc32 c = 0x10000; c < 0x10ffff; c++) {
+  for (uc32 c = 0x10000; c < 0x10FFFF; c++) {
     CHECK(!InClass(c, splitter.bmp()));
     CHECK(!InClass(c, splitter.lead_surrogates()));
     CHECK(!InClass(c, splitter.trail_surrogates()));
@@ -1939,7 +1899,7 @@
 
 namespace {
 
-int* global_use_counts = NULL;
+int* global_use_counts = nullptr;
 
 void MockUseCounterCallback(v8::Isolate* isolate,
                             v8::Isolate::UseCounterFeature feature) {
diff --git a/src/v8/test/cctest/test-run-wasm-relocation-arm.cc b/src/v8/test/cctest/test-run-wasm-relocation-arm.cc
index fe01199..000cf34 100644
--- a/src/v8/test/cctest/test-run-wasm-relocation-arm.cc
+++ b/src/v8/test/cctest/test-run-wasm-relocation-arm.cc
@@ -27,7 +27,7 @@
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
   v8::internal::byte buffer[4096];
-  DummyStaticFunction(NULL);
+  DummyStaticFunction(nullptr);
   int32_t imm = 1234567;
 
   Assembler assm(isolate, buffer, sizeof buffer);
@@ -40,7 +40,7 @@
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
 
-  compiler::CSignature0<int32_t> csig;
+  compiler::CSignatureOf<int32_t> csig;
   compiler::CodeRunner<int32_t> runnable(isolate, code, &csig);
   int32_t ret_value = runnable.Call();
   CHECK_EQ(ret_value, imm);
@@ -55,6 +55,8 @@
   // Relocating references by offset
   int mode_mask = (1 << RelocInfo::WASM_CONTEXT_REFERENCE);
   for (RelocIterator it(*code, mode_mask); !it.done(); it.next()) {
+    // TODO(6792): No longer needed once WebAssembly code is off heap.
+    CodeSpaceMemoryModificationScope modification_scope(isolate->heap());
     DCHECK(RelocInfo::IsWasmContextReference(it.rinfo()->rmode()));
     it.rinfo()->set_wasm_context_reference(
         isolate, it.rinfo()->wasm_context_reference() + offset,
diff --git a/src/v8/test/cctest/test-run-wasm-relocation-arm64.cc b/src/v8/test/cctest/test-run-wasm-relocation-arm64.cc
index 7448250..59f38e1 100644
--- a/src/v8/test/cctest/test-run-wasm-relocation-arm64.cc
+++ b/src/v8/test/cctest/test-run-wasm-relocation-arm64.cc
@@ -31,7 +31,7 @@
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
   v8::internal::byte buffer[4096];
-  DummyStaticFunction(NULL);
+  DummyStaticFunction(nullptr);
   int64_t imm = 1234567;
 
   MacroAssembler masm(isolate, buffer, sizeof buffer,
@@ -45,7 +45,7 @@
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
 
-  compiler::CSignature0<int64_t> csig;
+  compiler::CSignatureOf<int64_t> csig;
   compiler::CodeRunner<int64_t> runnable(isolate, code, &csig);
   int64_t ret_value = runnable.Call();
   CHECK_EQ(ret_value, imm);
@@ -60,6 +60,8 @@
   // Relocating reference by offset
   int mode_mask = (1 << RelocInfo::WASM_CONTEXT_REFERENCE);
   for (RelocIterator it(*code, mode_mask); !it.done(); it.next()) {
+    // TODO(6792): No longer needed once WebAssembly code is off heap.
+    CodeSpaceMemoryModificationScope modification_scope(isolate->heap());
     DCHECK(RelocInfo::IsWasmContextReference(it.rinfo()->rmode()));
     it.rinfo()->set_wasm_context_reference(
         isolate, it.rinfo()->wasm_context_reference() + offset,
diff --git a/src/v8/test/cctest/test-run-wasm-relocation-ia32.cc b/src/v8/test/cctest/test-run-wasm-relocation-ia32.cc
index a59dbfe..080da36 100644
--- a/src/v8/test/cctest/test-run-wasm-relocation-ia32.cc
+++ b/src/v8/test/cctest/test-run-wasm-relocation-ia32.cc
@@ -32,7 +32,7 @@
   HandleScope scope(isolate);
   v8::internal::byte buffer[4096];
   Assembler assm(isolate, buffer, sizeof buffer);
-  DummyStaticFunction(NULL);
+  DummyStaticFunction(nullptr);
   int32_t imm = 1234567;
 
   __ mov(eax, Immediate(reinterpret_cast<Address>(imm),
@@ -40,7 +40,7 @@
   __ nop();
   __ ret(0);
 
-  compiler::CSignature0<int32_t> csig;
+  compiler::CSignatureOf<int32_t> csig;
   CodeDesc desc;
   assm.GetCode(isolate, &desc);
   Handle<Code> code =
@@ -64,6 +64,8 @@
   // Relocating references by offset
   int mode_mask = (1 << RelocInfo::WASM_CONTEXT_REFERENCE);
   for (RelocIterator it(*code, mode_mask); !it.done(); it.next()) {
+    // TODO(6792): No longer needed once WebAssembly code is off heap.
+    CodeSpaceMemoryModificationScope modification_scope(isolate->heap());
     DCHECK(RelocInfo::IsWasmContextReference(it.rinfo()->rmode()));
     it.rinfo()->set_wasm_context_reference(
         isolate, it.rinfo()->wasm_context_reference() + offset,
diff --git a/src/v8/test/cctest/test-run-wasm-relocation-x64.cc b/src/v8/test/cctest/test-run-wasm-relocation-x64.cc
index b886c6f..0526ce2 100644
--- a/src/v8/test/cctest/test-run-wasm-relocation-x64.cc
+++ b/src/v8/test/cctest/test-run-wasm-relocation-x64.cc
@@ -30,7 +30,7 @@
   HandleScope scope(isolate);
   v8::internal::byte buffer[4096];
   Assembler assm(isolate, buffer, sizeof buffer);
-  DummyStaticFunction(NULL);
+  DummyStaticFunction(nullptr);
   int64_t imm = 1234567;
 
   __ movq(rax, imm, RelocInfo::WASM_CONTEXT_REFERENCE);
@@ -43,7 +43,7 @@
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
   USE(code);
 
-  CSignature0<int64_t> csig;
+  CSignatureOf<int64_t> csig;
   CodeRunner<int64_t> runnable(isolate, code, &csig);
   int64_t ret_value = runnable.Call();
   CHECK_EQ(ret_value, imm);
@@ -60,6 +60,8 @@
   // Relocating references by offset
   int mode_mask = (1 << RelocInfo::WASM_CONTEXT_REFERENCE);
   for (RelocIterator it(*code, mode_mask); !it.done(); it.next()) {
+    // TODO(6792): No longer needed once WebAssembly code is off heap.
+    CodeSpaceMemoryModificationScope modification_scope(isolate->heap());
     DCHECK(RelocInfo::IsWasmContextReference(it.rinfo()->rmode()));
     it.rinfo()->set_wasm_context_reference(
         isolate, it.rinfo()->wasm_context_reference() + offset,
diff --git a/src/v8/test/cctest/test-sampler-api.cc b/src/v8/test/cctest/test-sampler-api.cc
index 9d17e8b..a73c976 100644
--- a/src/v8/test/cctest/test-sampler-api.cc
+++ b/src/v8/test/cctest/test-sampler-api.cc
@@ -39,7 +39,7 @@
                      ->thread_local_top()
                      ->simulator_;
     // Check if there is active simulator.
-    return simulator_ != NULL;
+    return simulator_ != nullptr;
   }
 
   inline void FillRegisters(v8::RegisterState* state) {
@@ -104,26 +104,26 @@
     v8::Local<v8::ObjectTemplate> global = v8::ObjectTemplate::New(isolate_);
     global->Set(v8_str("CollectSample"),
                 v8::FunctionTemplate::New(isolate_, CollectSample));
-    LocalContext env(isolate_, NULL, global);
+    LocalContext env(isolate_, nullptr, global);
     isolate_->SetJitCodeEventHandler(v8::kJitCodeEventDefault,
                                      JitCodeEventHandler);
     CompileRun(v8_str(test_function.c_str()));
   }
 
   ~SamplingTestHelper() {
-    isolate_->SetJitCodeEventHandler(v8::kJitCodeEventDefault, NULL);
-    instance_ = NULL;
+    isolate_->SetJitCodeEventHandler(v8::kJitCodeEventDefault, nullptr);
+    instance_ = nullptr;
   }
 
   Sample& sample() { return sample_; }
 
   const CodeEventEntry* FindEventEntry(const void* address) {
     CodeEntries::const_iterator it = code_entries_.upper_bound(address);
-    if (it == code_entries_.begin()) return NULL;
+    if (it == code_entries_.begin()) return nullptr;
     const CodeEventEntry& entry = (--it)->second;
     const void* code_end =
         static_cast<const uint8_t*>(entry.code_start) + entry.code_len;
-    return address < code_end ? &entry : NULL;
+    return address < code_end ? &entry : nullptr;
   }
 
  private:
@@ -143,7 +143,7 @@
     if (!simulator_helper.Init(isolate_)) return;
     simulator_helper.FillRegisters(&state);
 #else
-    state.pc = NULL;
+    state.pc = nullptr;
     state.fp = &state;
     state.sp = &state;
 #endif
diff --git a/src/v8/test/cctest/test-serialize.cc b/src/v8/test/cctest/test-serialize.cc
index e1530a5..70fc858 100644
--- a/src/v8/test/cctest/test-serialize.cc
+++ b/src/v8/test/cctest/test-serialize.cc
@@ -57,10 +57,11 @@
 namespace v8 {
 namespace internal {
 
+enum CodeCacheType { kLazy, kEager, kAfterExecute };
+
 void DisableLazyDeserialization() {
   // UNINITIALIZED tests do not set up the isolate sufficiently for lazy
   // deserialization to work.
-  // TODO(jgruber): Fix this. It may just be enough to set the snapshot_blob.
   FLAG_lazy_deserialization = false;
 }
 
@@ -79,7 +80,7 @@
     isolate->setup_delegate_ = new SetupIsolateDelegateForTests(true);
     v8::Isolate* v8_isolate = reinterpret_cast<v8::Isolate*>(isolate);
     v8::Isolate::Scope isolate_scope(v8_isolate);
-    isolate->Init(NULL);
+    isolate->Init(nullptr);
     return v8_isolate;
   }
   // Wraps v8::Isolate::New, but with a TestIsolate under the hood.
@@ -121,9 +122,10 @@
 
 static StartupBlobs Serialize(v8::Isolate* isolate) {
   // We have to create one context.  One reason for this is so that the builtins
-  // can be loaded from v8natives.js and their addresses can be processed.  This
-  // will clear the pending fixups array, which would otherwise contain GC roots
-  // that would confuse the serialization/deserialization process.
+  // can be loaded from self hosted JS builtins and their addresses can be
+  // processed.  This will clear the pending fixups array, which would otherwise
+  // contain GC roots that would confuse the serialization/deserialization
+  // process.
   v8::Isolate::Scope isolate_scope(isolate);
   {
     v8::HandleScope scope(isolate);
@@ -138,7 +140,7 @@
   ser.SerializeStrongReferences();
 
   i::BuiltinSerializer builtin_serializer(internal_isolate, &ser);
-  builtin_serializer.SerializeBuiltins();
+  builtin_serializer.SerializeBuiltinsAndHandlers();
 
   ser.SerializeWeakReferencesAndDeferred();
   SnapshotData startup_snapshot(&ser);
@@ -165,7 +167,7 @@
 }
 
 v8::Isolate* InitializeFromBlob(StartupBlobs& blobs) {
-  v8::Isolate* v8_isolate = NULL;
+  v8::Isolate* v8_isolate = nullptr;
   {
     SnapshotData startup_snapshot(blobs.startup);
     BuiltinSnapshotData builtin_snapshot(blobs.builtin);
@@ -194,7 +196,6 @@
 #endif
   CHECK(isolate->global_object()->IsJSObject());
   CHECK(isolate->native_context()->IsContext());
-  CHECK(isolate->heap()->string_table()->IsStringTable());
   isolate->factory()->InternalizeOneByteString(STATIC_CHAR_VECTOR("Empty"));
 }
 
@@ -203,8 +204,8 @@
   DisableAlwaysOpt();
   v8::Isolate* isolate = TestIsolate::NewInitialized(true);
   StartupBlobs blobs = Serialize(isolate);
+  isolate->Dispose();
   isolate = Deserialize(blobs);
-  blobs.Dispose();
   {
     v8::HandleScope handle_scope(isolate);
     v8::Isolate::Scope isolate_scope(isolate);
@@ -215,6 +216,7 @@
     SanityCheck(isolate);
   }
   isolate->Dispose();
+  blobs.Dispose();
 }
 
 UNINITIALIZED_TEST(StartupSerializerRootMapDependencies) {
@@ -271,9 +273,9 @@
   v8::Isolate* isolate = TestIsolate::NewInitialized(true);
   StartupBlobs blobs1 = Serialize(isolate);
   StartupBlobs blobs2 = Serialize(isolate);
+  isolate->Dispose();
   blobs1.Dispose();
   isolate = Deserialize(blobs2);
-  blobs2.Dispose();
   {
     v8::Isolate::Scope isolate_scope(isolate);
     v8::HandleScope handle_scope(isolate);
@@ -284,6 +286,7 @@
     SanityCheck(isolate);
   }
   isolate->Dispose();
+  blobs2.Dispose();
 }
 
 UNINITIALIZED_TEST(StartupSerializerOnceRunScript) {
@@ -291,8 +294,8 @@
   DisableAlwaysOpt();
   v8::Isolate* isolate = TestIsolate::NewInitialized(true);
   StartupBlobs blobs = Serialize(isolate);
+  isolate->Dispose();
   isolate = Deserialize(blobs);
-  blobs.Dispose();
   {
     v8::Isolate::Scope isolate_scope(isolate);
     v8::HandleScope handle_scope(isolate);
@@ -309,6 +312,7 @@
     CHECK_EQ(4, result.FromJust());
   }
   isolate->Dispose();
+  blobs.Dispose();
 }
 
 UNINITIALIZED_TEST(StartupSerializerTwiceRunScript) {
@@ -317,9 +321,9 @@
   v8::Isolate* isolate = TestIsolate::NewInitialized(true);
   StartupBlobs blobs1 = Serialize(isolate);
   StartupBlobs blobs2 = Serialize(isolate);
+  isolate->Dispose();
   blobs1.Dispose();
   isolate = Deserialize(blobs2);
-  blobs2.Dispose();
   {
     v8::Isolate::Scope isolate_scope(isolate);
     v8::HandleScope handle_scope(isolate);
@@ -335,6 +339,7 @@
     CHECK_EQ(4, result.FromJust());
   }
   isolate->Dispose();
+  blobs2.Dispose();
 }
 
 static void PartiallySerializeContext(Vector<const byte>* startup_blob_out,
@@ -366,7 +371,7 @@
       v8::Local<v8::Context>::New(v8_isolate, env)->Exit();
     }
 
-    i::Object* raw_context = *v8::Utils::OpenPersistent(env);
+    i::Context* raw_context = i::Context::cast(*v8::Utils::OpenPersistent(env));
 
     env.Reset();
 
@@ -381,7 +386,7 @@
     partial_serializer.Serialize(&raw_context, false);
 
     i::BuiltinSerializer builtin_serializer(isolate, &startup_serializer);
-    builtin_serializer.SerializeBuiltins();
+    builtin_serializer.SerializeBuiltinsAndHandlers();
 
     startup_serializer.SerializeWeakReferencesAndDeferred();
 
@@ -407,7 +412,6 @@
   StartupBlobs blobs = {startup_blob, builtin_blob};
   v8::Isolate* v8_isolate = InitializeFromBlob(blobs);
   CHECK(v8_isolate);
-  blobs.Dispose();
   {
     v8::Isolate::Scope isolate_scope(v8_isolate);
 
@@ -440,6 +444,7 @@
     partial_blob.Dispose();
   }
   v8_isolate->Dispose();
+  blobs.Dispose();
 }
 
 static void PartiallySerializeCustomContext(
@@ -491,7 +496,7 @@
       v8::Local<v8::Context>::New(v8_isolate, env)->Exit();
     }
 
-    i::Object* raw_context = *v8::Utils::OpenPersistent(env);
+    i::Context* raw_context = i::Context::cast(*v8::Utils::OpenPersistent(env));
 
     env.Reset();
 
@@ -506,7 +511,7 @@
     partial_serializer.Serialize(&raw_context, false);
 
     i::BuiltinSerializer builtin_serializer(isolate, &startup_serializer);
-    builtin_serializer.SerializeBuiltins();
+    builtin_serializer.SerializeBuiltinsAndHandlers();
 
     startup_serializer.SerializeWeakReferencesAndDeferred();
 
@@ -532,7 +537,6 @@
   StartupBlobs blobs = {startup_blob, builtin_blob};
   v8::Isolate* v8_isolate = InitializeFromBlob(blobs);
   CHECK(v8_isolate);
-  blobs.Dispose();
   {
     v8::Isolate::Scope isolate_scope(v8_isolate);
 
@@ -614,6 +618,7 @@
     partial_blob.Dispose();
   }
   v8_isolate->Dispose();
+  blobs.Dispose();
 }
 
 TEST(CustomSnapshotDataBlob1) {
@@ -632,7 +637,6 @@
     v8::Isolate::Scope i_scope(isolate1);
     v8::HandleScope h_scope(isolate1);
     v8::Local<v8::Context> context = v8::Context::New(isolate1);
-    delete[] data1.data;  // We can dispose of the snapshot blob now.
     v8::Context::Scope c_scope(context);
     v8::Maybe<int32_t> result =
         CompileRun("f()")->Int32Value(isolate1->GetCurrentContext());
@@ -640,6 +644,7 @@
     CHECK(CompileRun("this.g")->IsUndefined());
   }
   isolate1->Dispose();
+  delete[] data1.data;  // We can dispose of the snapshot blob now.
 }
 
 struct InternalFieldData {
@@ -682,8 +687,10 @@
   }
 }
 
-void TypedArrayTestHelper(const char* code,
-                          const Int32Expectations& expectations) {
+void TypedArrayTestHelper(
+    const char* code, const Int32Expectations& expectations,
+    const char* code_to_run_after_restore = nullptr,
+    const Int32Expectations& after_restore_expectations = Int32Expectations()) {
   DisableAlwaysOpt();
   i::FLAG_allow_natives_syntax = true;
   v8::StartupData blob;
@@ -713,16 +720,20 @@
     v8::Isolate::Scope i_scope(isolate);
     v8::HandleScope h_scope(isolate);
     v8::Local<v8::Context> context = v8::Context::New(
-        isolate, NULL, v8::MaybeLocal<v8::ObjectTemplate>(),
+        isolate, nullptr, v8::MaybeLocal<v8::ObjectTemplate>(),
         v8::MaybeLocal<v8::Value>(),
         v8::DeserializeInternalFieldsCallback(DeserializeInternalFields,
                                               reinterpret_cast<void*>(2017)));
-    delete[] blob.data;  // We can dispose of the snapshot blob now.
     CHECK(deserialized_data.empty());  // We do not expect any embedder data.
     v8::Context::Scope c_scope(context);
     TestInt32Expectations(expectations);
+    if (code_to_run_after_restore) {
+      CompileRun(code_to_run_after_restore);
+    }
+    TestInt32Expectations(after_restore_expectations);
   }
   isolate->Dispose();
+  delete[] blob.data;  // We can dispose of the snapshot blob now.
 }
 
 TEST(CustomSnapshotDataBlobWithOffHeapTypedArray) {
@@ -767,6 +778,25 @@
   TypedArrayTestHelper(code, expectations);
 }
 
+TEST(CustomSnapshotDataBlobArrayBufferWithOffset) {
+  const char* code =
+      "var x = new Int32Array([12, 24, 48, 96]);"
+      "var y = new Int32Array(x.buffer, 4, 2)";
+  Int32Expectations expectations = {
+      std::make_tuple("x[1]", 24), std::make_tuple("x[2]", 48),
+      std::make_tuple("y[0]", 24), std::make_tuple("y[1]", 48),
+  };
+
+  // Verify that the typed arrays use the same buffer (not independent copies).
+  const char* code_to_run_after_restore = "x[2] = 57; y[0] = 42;";
+  Int32Expectations after_restore_expectations = {
+      std::make_tuple("x[1]", 42), std::make_tuple("y[1]", 57),
+  };
+
+  TypedArrayTestHelper(code, expectations, code_to_run_after_restore,
+                       after_restore_expectations);
+}
+
 TEST(CustomSnapshotDataBlobDataView) {
   const char* code =
       "var x = new Int8Array([1, 2, 3, 4]);"
@@ -786,7 +816,6 @@
   Int32Expectations expectations = {std::make_tuple("x.buffer.byteLength", 0),
                                     std::make_tuple("x.length", 0)};
 
-  DisableLazyDeserialization();
   DisableAlwaysOpt();
   i::FLAG_allow_natives_syntax = true;
   v8::StartupData blob;
@@ -816,11 +845,10 @@
     v8::Isolate::Scope i_scope(isolate);
     v8::HandleScope h_scope(isolate);
     v8::Local<v8::Context> context = v8::Context::New(
-        isolate, NULL, v8::MaybeLocal<v8::ObjectTemplate>(),
+        isolate, nullptr, v8::MaybeLocal<v8::ObjectTemplate>(),
         v8::MaybeLocal<v8::Value>(),
         v8::DeserializeInternalFieldsCallback(DeserializeInternalFields,
                                               reinterpret_cast<void*>(2017)));
-    delete[] blob.data;  // We can dispose of the snapshot blob now.
     v8::Context::Scope c_scope(context);
     TestInt32Expectations(expectations);
 
@@ -833,6 +861,7 @@
         FixedTypedArrayBase::cast(array->elements())->external_pointer());
   }
   isolate->Dispose();
+  delete[] blob.data;  // We can dispose of the snapshot blob now.
 }
 
 i::Handle<i::JSArrayBuffer> GetBufferFromTypedArray(
@@ -886,11 +915,10 @@
     v8::Isolate::Scope i_scope(isolate);
     v8::HandleScope h_scope(isolate);
     v8::Local<v8::Context> context = v8::Context::New(
-        isolate, NULL, v8::MaybeLocal<v8::ObjectTemplate>(),
+        isolate, nullptr, v8::MaybeLocal<v8::ObjectTemplate>(),
         v8::MaybeLocal<v8::Value>(),
         v8::DeserializeInternalFieldsCallback(DeserializeInternalFields,
                                               reinterpret_cast<void*>(2017)));
-    delete[] blob.data;  // We can dispose of the snapshot blob now.
     v8::Context::Scope c_scope(context);
     TestInt32Expectations(expectations);
 
@@ -907,6 +935,7 @@
     CHECK_NOT_NULL(buffer->backing_store());
   }
   isolate->Dispose();
+  delete[] blob.data;  // We can dispose of the snapshot blob now.
 }
 
 TEST(CustomSnapshotDataBlob2) {
@@ -927,7 +956,6 @@
     v8::Isolate::Scope i_scope(isolate2);
     v8::HandleScope h_scope(isolate2);
     v8::Local<v8::Context> context = v8::Context::New(isolate2);
-    delete[] data2.data;  // We can dispose of the snapshot blob now.
     v8::Context::Scope c_scope(context);
     v8::Maybe<int32_t> result =
         CompileRun("f()")->Int32Value(isolate2->GetCurrentContext());
@@ -936,6 +964,7 @@
     CHECK_EQ(43, result.FromJust());
   }
   isolate2->Dispose();
+  delete[] data2.data;  // We can dispose of the snapshot blob now.
 }
 
 static void SerializationFunctionTemplate(
@@ -978,8 +1007,7 @@
     property->Set(isolate, "bar", function);
     global->Set(isolate, "foo", property);
 
-    v8::Local<v8::Context> context = v8::Context::New(isolate, NULL, global);
-    delete[] data.data;  // We can dispose of the snapshot blob now.
+    v8::Local<v8::Context> context = v8::Context::New(isolate, nullptr, global);
     v8::Context::Scope c_scope(context);
     v8::Local<v8::Value> result = CompileRun(source2);
     v8::Maybe<bool> compare = v8_str("42")->Equals(
@@ -987,6 +1015,7 @@
     CHECK(compare.FromJust());
   }
   isolate->Dispose();
+  delete[] data.data;  // We can dispose of the snapshot blob now.
 }
 
 TEST(CustomSnapshotDataBlobWithLocker) {
@@ -1020,12 +1049,12 @@
     v8::Isolate::Scope i_scope(isolate1);
     v8::HandleScope h_scope(isolate1);
     v8::Local<v8::Context> context = v8::Context::New(isolate1);
-    delete[] data1.data;  // We can dispose of the snapshot blob now.
     v8::Context::Scope c_scope(context);
     v8::Maybe<int32_t> result = CompileRun("f()")->Int32Value(context);
     CHECK_EQ(42, result.FromJust());
   }
   isolate1->Dispose();
+  delete[] data1.data;  // We can dispose of the snapshot blob now.
 }
 
 TEST(CustomSnapshotDataBlobStackOverflow) {
@@ -1052,7 +1081,6 @@
     v8::Isolate::Scope i_scope(isolate);
     v8::HandleScope h_scope(isolate);
     v8::Local<v8::Context> context = v8::Context::New(isolate);
-    delete[] data.data;  // We can dispose of the snapshot blob now.
     v8::Context::Scope c_scope(context);
     const char* test =
         "var sum = 0;"
@@ -1066,6 +1094,7 @@
     CHECK_EQ(9999 * 5000, result.FromJust());
   }
   isolate->Dispose();
+  delete[] data.data;  // We can dispose of the snapshot blob now.
 }
 
 bool IsCompiled(const char* name) {
@@ -1076,7 +1105,6 @@
 }
 
 TEST(SnapshotDataBlobWithWarmup) {
-  DisableLazyDeserialization();
   DisableAlwaysOpt();
   const char* warmup = "Math.abs(1); Math.random = 1;";
 
@@ -1094,19 +1122,18 @@
     v8::Isolate::Scope i_scope(isolate);
     v8::HandleScope h_scope(isolate);
     v8::Local<v8::Context> context = v8::Context::New(isolate);
-    delete[] warm.data;
     v8::Context::Scope c_scope(context);
     // Running the warmup script has effect on whether functions are
     // pre-compiled, but does not pollute the context.
     CHECK(IsCompiled("Math.abs"));
-    CHECK(!IsCompiled("String.raw"));
+    CHECK(IsCompiled("String.raw"));
     CHECK(CompileRun("Math.random")->IsFunction());
   }
   isolate->Dispose();
+  delete[] warm.data;
 }
 
 TEST(CustomSnapshotDataBlobWithWarmup) {
-  DisableLazyDeserialization();
   DisableAlwaysOpt();
   const char* source =
       "function f() { return Math.abs(1); }\n"
@@ -1129,18 +1156,18 @@
     v8::Isolate::Scope i_scope(isolate);
     v8::HandleScope h_scope(isolate);
     v8::Local<v8::Context> context = v8::Context::New(isolate);
-    delete[] warm.data;
     v8::Context::Scope c_scope(context);
     // Running the warmup script has effect on whether functions are
     // pre-compiled, but does not pollute the context.
     CHECK(IsCompiled("f"));
     CHECK(IsCompiled("Math.abs"));
     CHECK(!IsCompiled("g"));
-    CHECK(!IsCompiled("String.raw"));
+    CHECK(IsCompiled("String.raw"));
     CHECK(!IsCompiled("Array.prototype.sort"));
     CHECK_EQ(5, CompileRun("a")->Int32Value(context).FromJust());
   }
   isolate->Dispose();
+  delete[] warm.data;
 }
 
 TEST(CustomSnapshotDataBlobImmortalImmovableRoots) {
@@ -1166,12 +1193,12 @@
     v8::Isolate::Scope i_scope(isolate);
     v8::HandleScope h_scope(isolate);
     v8::Local<v8::Context> context = v8::Context::New(isolate);
-    delete[] data.data;  // We can dispose of the snapshot blob now.
     v8::Context::Scope c_scope(context);
     CHECK_EQ(7, CompileRun("a[0]()")->Int32Value(context).FromJust());
   }
   isolate->Dispose();
   source.Dispose();
+  delete[] data.data;  // We can dispose of the snapshot blob now.
 }
 
 TEST(TestThatAlwaysSucceeds) {
@@ -1189,7 +1216,8 @@
   HeapIterator iterator(CcTest::heap());
   DisallowHeapAllocation no_allocation;
   int counter = 0;
-  for (HeapObject* obj = iterator.next(); obj != NULL; obj = iterator.next()) {
+  for (HeapObject* obj = iterator.next(); obj != nullptr;
+       obj = iterator.next()) {
     if (obj->IsCode() && Code::cast(obj)->kind() == Code::BUILTIN) counter++;
   }
   return counter;
@@ -1200,9 +1228,11 @@
     Isolate* isolate, Handle<String> source, Handle<String> name,
     ScriptData** cached_data, v8::ScriptCompiler::CompileOptions options) {
   return Compiler::GetSharedFunctionInfoForScript(
-      source, name, 0, 0, v8::ScriptOriginOptions(), Handle<Object>(),
-      Handle<Context>(isolate->native_context()), NULL, cached_data, options,
-      NOT_NATIVES_CODE, Handle<FixedArray>());
+             source, name, 0, 0, v8::ScriptOriginOptions(), Handle<Object>(),
+             Handle<Context>(isolate->native_context()), nullptr, cached_data,
+             options, ScriptCompiler::kNoCacheNoReason, NOT_NATIVES_CODE,
+             Handle<FixedArray>())
+      .ToHandleChecked();
 }
 
 TEST(CodeSerializerOnePlusOne) {
@@ -1223,7 +1253,7 @@
   CHECK(!orig_source.is_identical_to(copy_source));
   CHECK(orig_source->Equals(*copy_source));
 
-  ScriptData* cache = NULL;
+  ScriptData* cache = nullptr;
 
   Handle<SharedFunctionInfo> orig =
       CompileScript(isolate, orig_source, Handle<String>(), &cache,
@@ -1246,7 +1276,7 @@
           copy, isolate->native_context());
   Handle<JSObject> global(isolate->context()->global_object());
   Handle<Object> copy_result =
-      Execution::Call(isolate, copy_fun, global, 0, NULL).ToHandleChecked();
+      Execution::Call(isolate, copy_fun, global, 0, nullptr).ToHandleChecked();
   CHECK_EQ(2, Handle<Smi>::cast(copy_result)->value());
 
   CHECK_EQ(builtins_count, CountBuiltins());
@@ -1265,7 +1295,7 @@
   Handle<String> src = isolate->factory()
                            ->NewStringFromUtf8(CStrVector(source))
                            .ToHandleChecked();
-  ScriptData* cache = NULL;
+  ScriptData* cache = nullptr;
 
   CompileScript(isolate, src, src, &cache,
                 v8::ScriptCompiler::kProduceCodeCache);
@@ -1276,7 +1306,7 @@
 
   InfoVectorPair pair = isolate->compilation_cache()->LookupScript(
       src, src, 0, 0, v8::ScriptOriginOptions(), isolate->native_context(),
-      SLOPPY);
+      LanguageMode::kSloppy);
 
   CHECK(pair.shared() == *copy);
 
@@ -1302,7 +1332,7 @@
   CHECK(orig_source->Equals(*copy_source));
 
   Handle<JSObject> global(isolate->context()->global_object());
-  ScriptData* cache = NULL;
+  ScriptData* cache = nullptr;
 
   Handle<SharedFunctionInfo> orig =
       CompileScript(isolate, orig_source, Handle<String>(), &cache,
@@ -1311,7 +1341,7 @@
       isolate->factory()->NewFunctionFromSharedFunctionInfo(
           orig, isolate->native_context());
   Handle<Object> orig_result =
-      Execution::Call(isolate, orig_fun, global, 0, NULL).ToHandleChecked();
+      Execution::Call(isolate, orig_fun, global, 0, nullptr).ToHandleChecked();
   CHECK(orig_result->IsInternalizedString());
 
   int builtins_count = CountBuiltins();
@@ -1330,7 +1360,7 @@
           copy, isolate->native_context());
   CHECK_NE(*orig_fun, *copy_fun);
   Handle<Object> copy_result =
-      Execution::Call(isolate, copy_fun, global, 0, NULL).ToHandleChecked();
+      Execution::Call(isolate, copy_fun, global, 0, nullptr).ToHandleChecked();
   CHECK(orig_result.is_identical_to(copy_result));
   Handle<String> expected =
       isolate->factory()->NewStringFromAsciiChecked("string1");
@@ -1352,15 +1382,16 @@
   // code. Don't even bother generating optimized code to avoid timeouts.
   FLAG_always_opt = false;
 
-  Vector<const uint8_t> source =
-      ConstructSource(STATIC_CHAR_VECTOR("var j=1; if (j == 0) {"),
-                      STATIC_CHAR_VECTOR("for (let i of Object.prototype);"),
-                      STATIC_CHAR_VECTOR("} j=7; j"), 1100);
+  Vector<const uint8_t> source = ConstructSource(
+      STATIC_CHAR_VECTOR("var j=1; if (j == 0) {"),
+      STATIC_CHAR_VECTOR(
+          "for (let i of Object.prototype) for (let k = 0; k < 0; ++k);"),
+      STATIC_CHAR_VECTOR("} j=7; j"), 1100);
   Handle<String> source_str =
       isolate->factory()->NewStringFromOneByte(source).ToHandleChecked();
 
   Handle<JSObject> global(isolate->context()->global_object());
-  ScriptData* cache = NULL;
+  ScriptData* cache = nullptr;
 
   Handle<SharedFunctionInfo> orig =
       CompileScript(isolate, source_str, Handle<String>(), &cache,
@@ -1381,7 +1412,7 @@
           copy, isolate->native_context());
 
   Handle<Object> copy_result =
-      Execution::Call(isolate, copy_fun, global, 0, NULL).ToHandleChecked();
+      Execution::Call(isolate, copy_fun, global, 0, nullptr).ToHandleChecked();
 
   int result_int;
   CHECK(copy_result->ToInt32(&result_int));
@@ -1426,7 +1457,7 @@
   }
 
   Handle<JSObject> global(isolate->context()->global_object());
-  ScriptData* cache = NULL;
+  ScriptData* cache = nullptr;
 
   Handle<SharedFunctionInfo> orig =
       CompileScript(isolate, source_str, Handle<String>(), &cache,
@@ -1460,7 +1491,7 @@
           copy, isolate->native_context());
 
   Handle<Object> copy_result =
-      Execution::Call(isolate, copy_fun, global, 0, NULL).ToHandleChecked();
+      Execution::Call(isolate, copy_fun, global, 0, nullptr).ToHandleChecked();
 
   int result_int;
   CHECK(copy_result->ToInt32(&result_int));
@@ -1489,7 +1520,7 @@
           .ToHandleChecked();
 
   Handle<JSObject> global(isolate->context()->global_object());
-  ScriptData* cache = NULL;
+  ScriptData* cache = nullptr;
 
   Handle<SharedFunctionInfo> orig =
       CompileScript(isolate, source_str, Handle<String>(), &cache,
@@ -1508,7 +1539,7 @@
           copy, isolate->native_context());
 
   Handle<Object> copy_result =
-      Execution::Call(isolate, copy_fun, global, 0, NULL).ToHandleChecked();
+      Execution::Call(isolate, copy_fun, global, 0, nullptr).ToHandleChecked();
 
   CHECK_EQ(6 * 1999999, Handle<String>::cast(copy_result)->length());
   Handle<Object> property = JSReceiver::GetDataProperty(
@@ -1557,7 +1588,7 @@
              source_c_str).ToHandleChecked();
 
   Handle<JSObject> global(isolate->context()->global_object());
-  ScriptData* cache = NULL;
+  ScriptData* cache = nullptr;
 
   Handle<SharedFunctionInfo> orig =
       CompileScript(isolate, source_str, Handle<String>(), &cache,
@@ -1575,7 +1606,7 @@
       isolate->factory()->NewFunctionFromSharedFunctionInfo(
           copy, isolate->native_context());
 
-  USE(Execution::Call(isolate, copy_fun, global, 0, NULL));
+  USE(Execution::Call(isolate, copy_fun, global, 0, nullptr));
 
   v8::Maybe<int32_t> result =
       CompileRun("(a + b).length")
@@ -1610,28 +1641,34 @@
     : public v8::String::ExternalOneByteStringResource {
  public:
   SerializerOneByteResource(const char* data, size_t length)
-      : data_(data), length_(length) {}
+      : data_(data), length_(length), dispose_count_(0) {}
   virtual const char* data() const { return data_; }
   virtual size_t length() const { return length_; }
+  virtual void Dispose() { dispose_count_++; }
+  int dispose_count() { return dispose_count_; }
 
  private:
   const char* data_;
   size_t length_;
+  int dispose_count_;
 };
 
 
 class SerializerTwoByteResource : public v8::String::ExternalStringResource {
  public:
   SerializerTwoByteResource(const char* data, size_t length)
-      : data_(AsciiToTwoByteString(data)), length_(length) {}
+      : data_(AsciiToTwoByteString(data)), length_(length), dispose_count_(0) {}
   ~SerializerTwoByteResource() { DeleteArray<const uint16_t>(data_); }
 
   virtual const uint16_t* data() const { return data_; }
   virtual size_t length() const { return length_; }
+  virtual void Dispose() { dispose_count_++; }
+  int dispose_count() { return dispose_count_; }
 
  private:
   const uint16_t* data_;
   size_t length_;
+  int dispose_count_;
 };
 
 TEST(CodeSerializerExternalString) {
@@ -1669,7 +1706,7 @@
                                      .ToHandleChecked();
 
   Handle<JSObject> global(isolate->context()->global_object());
-  ScriptData* cache = NULL;
+  ScriptData* cache = nullptr;
 
   Handle<SharedFunctionInfo> orig =
       CompileScript(isolate, source_string, Handle<String>(), &cache,
@@ -1688,7 +1725,7 @@
           copy, isolate->native_context());
 
   Handle<Object> copy_result =
-      Execution::Call(isolate, copy_fun, global, 0, NULL).ToHandleChecked();
+      Execution::Call(isolate, copy_fun, global, 0, nullptr).ToHandleChecked();
 
   CHECK_EQ(15.0, copy_result->Number());
 
@@ -1726,7 +1763,7 @@
                  .ToHandleChecked()).ToHandleChecked();
 
   Handle<JSObject> global(isolate->context()->global_object());
-  ScriptData* cache = NULL;
+  ScriptData* cache = nullptr;
 
   Handle<SharedFunctionInfo> orig =
       CompileScript(isolate, source_str, Handle<String>(), &cache,
@@ -1744,7 +1781,7 @@
       f->NewFunctionFromSharedFunctionInfo(copy, isolate->native_context());
 
   Handle<Object> copy_result =
-      Execution::Call(isolate, copy_fun, global, 0, NULL).ToHandleChecked();
+      Execution::Call(isolate, copy_fun, global, 0, nullptr).ToHandleChecked();
 
   CHECK_EQ(42.0, copy_result->Number());
 
@@ -1775,7 +1812,7 @@
   CHECK(!name->IsInternalizedString());
 
   Handle<JSObject> global(isolate->context()->global_object());
-  ScriptData* cache = NULL;
+  ScriptData* cache = nullptr;
 
   Handle<SharedFunctionInfo> orig =
       CompileScript(isolate, source_string, name, &cache,
@@ -1793,7 +1830,7 @@
       f->NewFunctionFromSharedFunctionInfo(copy, isolate->native_context());
 
   Handle<Object> copy_result =
-      Execution::Call(isolate, copy_fun, global, 0, NULL).ToHandleChecked();
+      Execution::Call(isolate, copy_fun, global, 0, nullptr).ToHandleChecked();
 
   CHECK_EQ(10.0, copy_result->Number());
 
@@ -1811,8 +1848,8 @@
   }
 }
 
-v8::ScriptCompiler::CachedData* ProduceCache(const char* source,
-                                             bool eager = false) {
+v8::ScriptCompiler::CachedData* ProduceCache(
+    const char* source, CodeCacheType cacheType = CodeCacheType::kLazy) {
   v8::ScriptCompiler::CachedData* cache;
   v8::Isolate::CreateParams create_params;
   create_params.array_buffer_allocator = CcTest::array_buffer_allocator();
@@ -1826,19 +1863,23 @@
     v8::Local<v8::String> source_str = v8_str(source);
     v8::ScriptOrigin origin(v8_str("test"));
     v8::ScriptCompiler::Source source(source_str, origin);
-    v8::ScriptCompiler::CompileOptions options =
-        eager ? v8::ScriptCompiler::kProduceFullCodeCache
-              : v8::ScriptCompiler::kProduceCodeCache;
+    v8::ScriptCompiler::CompileOptions options;
+    switch (cacheType) {
+      case CodeCacheType::kLazy:
+        options = v8::ScriptCompiler::kProduceCodeCache;
+        break;
+      case CodeCacheType::kEager:
+        options = v8::ScriptCompiler::kProduceFullCodeCache;
+        break;
+      case CodeCacheType::kAfterExecute:
+        options = v8::ScriptCompiler::kNoCompileOptions;
+        break;
+      default:
+        UNREACHABLE();
+    }
     v8::Local<v8::UnboundScript> script =
         v8::ScriptCompiler::CompileUnboundScript(isolate1, &source, options)
             .ToLocalChecked();
-    const v8::ScriptCompiler::CachedData* data = source.GetCachedData();
-    CHECK(data);
-    // Persist cached data.
-    uint8_t* buffer = NewArray<uint8_t>(data->length);
-    MemCopy(buffer, data->data, data->length);
-    cache = new v8::ScriptCompiler::CachedData(
-        buffer, data->length, v8::ScriptCompiler::CachedData::BufferOwned);
 
     v8::Local<v8::Value> result = script->BindToCurrentContext()
                                       ->Run(isolate1->GetCurrentContext())
@@ -1847,6 +1888,18 @@
         result->ToString(isolate1->GetCurrentContext()).ToLocalChecked();
     CHECK(result_string->Equals(isolate1->GetCurrentContext(), v8_str("abcdef"))
               .FromJust());
+
+    if (cacheType == CodeCacheType::kAfterExecute) {
+      cache = ScriptCompiler::CreateCodeCache(script, source_str);
+    } else {
+      const ScriptCompiler::CachedData* data = source.GetCachedData();
+      CHECK(data);
+      uint8_t* buffer = NewArray<uint8_t>(data->length);
+      MemCopy(buffer, data->data, data->length);
+      cache = new v8::ScriptCompiler::CachedData(
+          buffer, data->length, v8::ScriptCompiler::CachedData::BufferOwned);
+    }
+    CHECK(cache);
   }
   isolate1->Dispose();
   return cache;
@@ -1909,7 +1962,8 @@
       "  }"
       "}"
       "f()() + 'def'";
-  v8::ScriptCompiler::CachedData* cache = ProduceCache(source, true);
+  v8::ScriptCompiler::CachedData* cache =
+      ProduceCache(source, CodeCacheType::kEager);
 
   v8::Isolate::CreateParams create_params;
   create_params.array_buffer_allocator = CcTest::array_buffer_allocator();
@@ -1947,6 +2001,68 @@
   isolate2->Dispose();
 }
 
+TEST(CodeSerializerAfterExecute) {
+  // We test that no compilations happen when running this code. Forcing
+  // to always optimize breaks this test.
+  bool prev_opt_value = FLAG_opt;
+  bool prev_always_opt_value = FLAG_always_opt;
+  FLAG_always_opt = false;
+  FLAG_opt = false;
+  const char* source = "function f() { return 'abc'; }; f() + 'def'";
+  v8::ScriptCompiler::CachedData* cache =
+      ProduceCache(source, CodeCacheType::kAfterExecute);
+
+  v8::Isolate::CreateParams create_params;
+  create_params.array_buffer_allocator = CcTest::array_buffer_allocator();
+  v8::Isolate* isolate2 = v8::Isolate::New(create_params);
+
+  {
+    v8::Isolate::Scope iscope(isolate2);
+    v8::HandleScope scope(isolate2);
+    v8::Local<v8::Context> context = v8::Context::New(isolate2);
+    v8::Context::Scope context_scope(context);
+
+    v8::Local<v8::String> source_str = v8_str(source);
+    v8::ScriptOrigin origin(v8_str("test"));
+    v8::ScriptCompiler::Source source(source_str, origin, cache);
+    v8::Local<v8::UnboundScript> script;
+    {
+      DisallowCompilation no_compile_expected(
+          reinterpret_cast<Isolate*>(isolate2));
+      script = v8::ScriptCompiler::CompileUnboundScript(
+                   isolate2, &source, v8::ScriptCompiler::kConsumeCodeCache)
+                   .ToLocalChecked();
+    }
+    CHECK(!cache->rejected);
+    CheckDeserializedFlag(script);
+
+    Handle<SharedFunctionInfo> sfi = v8::Utils::OpenHandle(*script);
+    CHECK(sfi->HasBytecodeArray());
+    BytecodeArray* bytecode = sfi->bytecode_array();
+    CHECK_EQ(bytecode->interrupt_budget(),
+             interpreter::Interpreter::kInterruptBudget);
+    CHECK_EQ(bytecode->osr_loop_nesting_level(), 0);
+
+    {
+      DisallowCompilation no_compile_expected(
+          reinterpret_cast<Isolate*>(isolate2));
+      v8::Local<v8::Value> result = script->BindToCurrentContext()
+                                        ->Run(isolate2->GetCurrentContext())
+                                        .ToLocalChecked();
+      v8::Local<v8::String> result_string =
+          result->ToString(isolate2->GetCurrentContext()).ToLocalChecked();
+      CHECK(
+          result_string->Equals(isolate2->GetCurrentContext(), v8_str("abcdef"))
+              .FromJust());
+    }
+  }
+  isolate2->Dispose();
+
+  // Restore the flags.
+  FLAG_always_opt = prev_always_opt_value;
+  FLAG_opt = prev_opt_value;
+}
+
 TEST(CodeSerializerFlagChange) {
   const char* source = "function f() { return 'abc'; }; f() + 'def'";
   v8::ScriptCompiler::CachedData* cache = ProduceCache(source);
@@ -2088,12 +2204,15 @@
   HandleScope scope(isolate);
   Handle<String> source = isolate->factory()->NewStringFromAsciiChecked(
       "function f() {} function g() {}");
-  ScriptData* script_data = NULL;
-  Handle<SharedFunctionInfo> shared = Compiler::GetSharedFunctionInfoForScript(
-      source, Handle<String>(), 0, 0, v8::ScriptOriginOptions(),
-      Handle<Object>(), Handle<Context>(isolate->native_context()), NULL,
-      &script_data, v8::ScriptCompiler::kProduceCodeCache, NOT_NATIVES_CODE,
-      Handle<FixedArray>());
+  ScriptData* script_data = nullptr;
+  Handle<SharedFunctionInfo> shared =
+      Compiler::GetSharedFunctionInfoForScript(
+          source, MaybeHandle<String>(), 0, 0, v8::ScriptOriginOptions(),
+          MaybeHandle<Object>(), Handle<Context>(isolate->native_context()),
+          nullptr, &script_data, v8::ScriptCompiler::kProduceCodeCache,
+          ScriptCompiler::kNoCacheNoReason, NOT_NATIVES_CODE,
+          MaybeHandle<FixedArray>())
+          .ToHandleChecked();
   delete script_data;
 
   heap::SimulateIncrementalMarking(isolate->heap());
@@ -2211,6 +2330,9 @@
   }
 };
 
+static SerializerOneByteResource serializable_one_byte_resource("one_byte", 8);
+static SerializerTwoByteResource serializable_two_byte_resource("two_byte", 8);
+
 intptr_t original_external_references[] = {
     reinterpret_cast<intptr_t>(SerializedCallback),
     reinterpret_cast<intptr_t>(&serialized_static_field),
@@ -2218,6 +2340,8 @@
     reinterpret_cast<intptr_t>(&AccessorForSerialization),
     reinterpret_cast<intptr_t>(&SerializedExtension::FunctionCallback),
     reinterpret_cast<intptr_t>(&serialized_static_field),  // duplicate entry
+    reinterpret_cast<intptr_t>(&serializable_one_byte_resource),
+    reinterpret_cast<intptr_t>(&serializable_two_byte_resource),
     0};
 
 intptr_t replaced_external_references[] = {
@@ -2227,6 +2351,8 @@
     reinterpret_cast<intptr_t>(&AccessorForSerialization),
     reinterpret_cast<intptr_t>(&SerializedExtension::FunctionCallback),
     reinterpret_cast<intptr_t>(&serialized_static_field),
+    reinterpret_cast<intptr_t>(&serializable_one_byte_resource),
+    reinterpret_cast<intptr_t>(&serializable_two_byte_resource),
     0};
 
 intptr_t short_external_references[] = {
@@ -2247,13 +2373,32 @@
       v8::Local<v8::Value> function =
           callback->GetFunction(context).ToLocalChecked();
       CHECK(context->Global()->Set(context, v8_str("f"), function).FromJust());
+
+      CHECK(context->Global()
+                ->Set(context, v8_str("one_byte"),
+                      v8::String::NewExternalOneByte(
+                          isolate, &serializable_one_byte_resource)
+                          .ToLocalChecked())
+                .FromJust());
+      CHECK(context->Global()
+                ->Set(context, v8_str("two_byte"),
+                      v8::String::NewExternalTwoByte(
+                          isolate, &serializable_two_byte_resource)
+                          .ToLocalChecked())
+                .FromJust());
+
       ExpectInt32("f()", 42);
+      ExpectString("one_byte", "one_byte");
+      ExpectString("two_byte", "two_byte");
       creator.SetDefaultContext(context);
     }
     blob =
         creator.CreateBlob(v8::SnapshotCreator::FunctionCodeHandling::kClear);
   }
 
+  CHECK_EQ(1, serializable_one_byte_resource.dispose_count());
+  CHECK_EQ(1, serializable_two_byte_resource.dispose_count());
+
   // Deserialize with the original external reference.
   {
     v8::Isolate::CreateParams params;
@@ -2268,10 +2413,17 @@
       v8::Local<v8::Context> context = v8::Context::New(isolate);
       v8::Context::Scope context_scope(context);
       ExpectInt32("f()", 42);
+      ExpectString("one_byte", "one_byte");
+      ExpectString("two_byte", "two_byte");
+      CHECK(CompileRun("one_byte").As<v8::String>()->IsExternalOneByte());
+      CHECK(CompileRun("two_byte").As<v8::String>()->IsExternal());
     }
     isolate->Dispose();
   }
 
+  CHECK_EQ(2, serializable_one_byte_resource.dispose_count());
+  CHECK_EQ(2, serializable_two_byte_resource.dispose_count());
+
   // Deserialize with some other external reference.
   {
     v8::Isolate::CreateParams params;
@@ -2289,6 +2441,10 @@
     }
     isolate->Dispose();
   }
+
+  CHECK_EQ(3, serializable_one_byte_resource.dispose_count());
+  CHECK_EQ(3, serializable_two_byte_resource.dispose_count());
+
   delete[] blob.data;
 }
 
@@ -2334,6 +2490,114 @@
   delete[] blob.data;
 }
 
+v8::StartupData CreateSnapshotWithDefaultAndCustom() {
+  v8::SnapshotCreator creator(original_external_references);
+  v8::Isolate* isolate = creator.GetIsolate();
+  {
+    v8::HandleScope handle_scope(isolate);
+    {
+      v8::Local<v8::Context> context = v8::Context::New(isolate);
+      v8::Context::Scope context_scope(context);
+      CompileRun("function f() { return 41; }");
+      creator.SetDefaultContext(context);
+      ExpectInt32("f()", 41);
+    }
+    {
+      v8::Local<v8::Context> context = v8::Context::New(isolate);
+      v8::Context::Scope context_scope(context);
+      v8::Local<v8::FunctionTemplate> function_template =
+          v8::FunctionTemplate::New(isolate, SerializedCallback);
+      v8::Local<v8::Value> function =
+          function_template->GetFunction(context).ToLocalChecked();
+      CHECK(context->Global()->Set(context, v8_str("f"), function).FromJust());
+      v8::Local<v8::ObjectTemplate> object_template =
+          v8::ObjectTemplate::New(isolate);
+      object_template->SetAccessor(v8_str("x"), AccessorForSerialization);
+      v8::Local<v8::Object> object =
+          object_template->NewInstance(context).ToLocalChecked();
+      CHECK(context->Global()->Set(context, v8_str("o"), object).FromJust());
+      ExpectInt32("f()", 42);
+      ExpectInt32("o.x", 2017);
+      creator.AddContext(context);
+    }
+  }
+  return creator.CreateBlob(v8::SnapshotCreator::FunctionCodeHandling::kClear);
+}
+
+TEST(SnapshotCreatorNoExternalReferencesDefault) {
+  DisableAlwaysOpt();
+  v8::StartupData blob = CreateSnapshotWithDefaultAndCustom();
+
+  // Deserialize with an incomplete list of external references.
+  {
+    v8::Isolate::CreateParams params;
+    params.snapshot_blob = &blob;
+    params.array_buffer_allocator = CcTest::array_buffer_allocator();
+    params.external_references = nullptr;
+    // Test-appropriate equivalent of v8::Isolate::New.
+    v8::Isolate* isolate = TestIsolate::New(params);
+    {
+      v8::Isolate::Scope isolate_scope(isolate);
+      v8::HandleScope handle_scope(isolate);
+      v8::Local<v8::Context> context = v8::Context::New(isolate);
+      v8::Context::Scope context_scope(context);
+      ExpectInt32("f()", 41);
+    }
+    isolate->Dispose();
+  }
+  delete[] blob.data;
+}
+
+TEST(SnapshotCreatorNoExternalReferencesCustomFail1) {
+  DisableAlwaysOpt();
+  v8::StartupData blob = CreateSnapshotWithDefaultAndCustom();
+
+  // Deserialize with an incomplete list of external references.
+  {
+    v8::Isolate::CreateParams params;
+    params.snapshot_blob = &blob;
+    params.array_buffer_allocator = CcTest::array_buffer_allocator();
+    params.external_references = nullptr;
+    // Test-appropriate equivalent of v8::Isolate::New.
+    v8::Isolate* isolate = TestIsolate::New(params);
+    {
+      v8::Isolate::Scope isolate_scope(isolate);
+      v8::HandleScope handle_scope(isolate);
+      v8::Local<v8::Context> context =
+          v8::Context::FromSnapshot(isolate, 0).ToLocalChecked();
+      v8::Context::Scope context_scope(context);
+      ExpectInt32("f()", 42);
+    }
+    isolate->Dispose();
+  }
+  delete[] blob.data;
+}
+
+TEST(SnapshotCreatorNoExternalReferencesCustomFail2) {
+  DisableAlwaysOpt();
+  v8::StartupData blob = CreateSnapshotWithDefaultAndCustom();
+
+  // Deserialize with an incomplete list of external references.
+  {
+    v8::Isolate::CreateParams params;
+    params.snapshot_blob = &blob;
+    params.array_buffer_allocator = CcTest::array_buffer_allocator();
+    params.external_references = nullptr;
+    // Test-appropriate equivalent of v8::Isolate::New.
+    v8::Isolate* isolate = TestIsolate::New(params);
+    {
+      v8::Isolate::Scope isolate_scope(isolate);
+      v8::HandleScope handle_scope(isolate);
+      v8::Local<v8::Context> context =
+          v8::Context::FromSnapshot(isolate, 0).ToLocalChecked();
+      v8::Context::Scope context_scope(context);
+      ExpectInt32("o.x", 2017);
+    }
+    isolate->Dispose();
+  }
+  delete[] blob.data;
+}
+
 TEST(SnapshotCreatorUnknownExternalReferences) {
   DisableAlwaysOpt();
   v8::SnapshotCreator creator;
@@ -2512,6 +2776,231 @@
   delete[] blob.data;
 }
 
+TEST(SnapshotCreatorAddData) {
+  DisableAlwaysOpt();
+  v8::StartupData blob;
+
+  {
+    v8::SnapshotCreator creator;
+    v8::Isolate* isolate = creator.GetIsolate();
+    v8::Eternal<v8::Value> eternal_number;
+    v8::Persistent<v8::Value> persistent_number_1;
+    v8::Persistent<v8::Value> persistent_number_2;
+    v8::Persistent<v8::Context> persistent_context;
+    {
+      v8::HandleScope handle_scope(isolate);
+
+      eternal_number.Set(isolate, v8_num(2017));
+      persistent_number_1.Reset(isolate, v8_num(2018));
+      persistent_number_2.Reset(isolate, v8_num(2019));
+
+      v8::Local<v8::Context> context = v8::Context::New(isolate);
+      CHECK_EQ(0u, creator.AddData(context, persistent_number_2.Get(isolate)));
+      creator.SetDefaultContext(context);
+      context = v8::Context::New(isolate);
+      persistent_context.Reset(isolate, context);
+
+      v8::Context::Scope context_scope(context);
+
+      v8::Local<v8::Object> object = CompileRun("({ p: 12 })").As<v8::Object>();
+
+      v8::Local<v8::ObjectTemplate> object_template =
+          v8::ObjectTemplate::New(isolate);
+      object_template->SetInternalFieldCount(3);
+
+      v8::Local<v8::Private> private_symbol =
+          v8::Private::ForApi(isolate, v8_str("private_symbol"));
+
+      v8::Local<v8::Signature> signature =
+        v8::Signature::New(isolate, v8::FunctionTemplate::New(isolate));
+
+      v8::Local<v8::AccessorSignature> accessor_signature =
+           v8::AccessorSignature::New(isolate,
+                                      v8::FunctionTemplate::New(isolate));
+
+      CHECK_EQ(0u, creator.AddData(context, object));
+      CHECK_EQ(1u, creator.AddData(context, v8_str("context-dependent")));
+      CHECK_EQ(2u, creator.AddData(context, persistent_number_1.Get(isolate)));
+      CHECK_EQ(3u, creator.AddData(context, object_template));
+      CHECK_EQ(4u, creator.AddData(context, persistent_context.Get(isolate)));
+      creator.AddContext(context);
+
+      CHECK_EQ(0u, creator.AddData(v8_str("context-independent")));
+      CHECK_EQ(1u, creator.AddData(eternal_number.Get(isolate)));
+      CHECK_EQ(2u, creator.AddData(object_template));
+      CHECK_EQ(3u, creator.AddData(v8::FunctionTemplate::New(isolate)));
+      CHECK_EQ(4u, creator.AddData(private_symbol));
+      CHECK_EQ(5u, creator.AddData(signature));
+      CHECK_EQ(6u, creator.AddData(accessor_signature));
+    }
+
+    blob =
+        creator.CreateBlob(v8::SnapshotCreator::FunctionCodeHandling::kClear);
+  }
+
+  {
+    v8::Isolate::CreateParams params;
+    params.snapshot_blob = &blob;
+    params.array_buffer_allocator = CcTest::array_buffer_allocator();
+    // Test-appropriate equivalent of v8::Isolate::New.
+    v8::Isolate* isolate = TestIsolate::New(params);
+    {
+      v8::Isolate::Scope isolate_scope(isolate);
+      v8::HandleScope handle_scope(isolate);
+      v8::Local<v8::Context> context =
+          v8::Context::FromSnapshot(isolate, 0).ToLocalChecked();
+
+      // Check serialized data on the context.
+      v8::Local<v8::Object> object =
+          context->GetDataFromSnapshotOnce<v8::Object>(0).ToLocalChecked();
+      CHECK(context->GetDataFromSnapshotOnce<v8::Object>(0).IsEmpty());
+      CHECK_EQ(12, object->Get(context, v8_str("p"))
+                       .ToLocalChecked()
+                       ->Int32Value(context)
+                       .FromJust());
+
+      v8::Local<v8::String> string =
+          context->GetDataFromSnapshotOnce<v8::String>(1).ToLocalChecked();
+      CHECK(context->GetDataFromSnapshotOnce<v8::String>(1).IsEmpty());
+      CHECK(string->Equals(context, v8_str("context-dependent")).FromJust());
+
+      v8::Local<v8::Number> number =
+          context->GetDataFromSnapshotOnce<v8::Number>(2).ToLocalChecked();
+      CHECK(context->GetDataFromSnapshotOnce<v8::Number>(2).IsEmpty());
+      CHECK_EQ(2018, number->Int32Value(context).FromJust());
+
+      v8::Local<v8::ObjectTemplate> templ =
+          context->GetDataFromSnapshotOnce<v8::ObjectTemplate>(3)
+              .ToLocalChecked();
+      CHECK(context->GetDataFromSnapshotOnce<v8::ObjectTemplate>(3).IsEmpty());
+      CHECK_EQ(3, templ->InternalFieldCount());
+
+      v8::Local<v8::Context> serialized_context =
+          context->GetDataFromSnapshotOnce<v8::Context>(4).ToLocalChecked();
+      CHECK(context->GetDataFromSnapshotOnce<v8::Context>(4).IsEmpty());
+      CHECK_EQ(*v8::Utils::OpenHandle(*serialized_context),
+               *v8::Utils::OpenHandle(*context));
+
+      CHECK(context->GetDataFromSnapshotOnce<v8::Value>(5).IsEmpty());
+
+      // Check serialized data on the isolate.
+      string = isolate->GetDataFromSnapshotOnce<v8::String>(0).ToLocalChecked();
+      CHECK(context->GetDataFromSnapshotOnce<v8::String>(0).IsEmpty());
+      CHECK(string->Equals(context, v8_str("context-independent")).FromJust());
+
+      number = isolate->GetDataFromSnapshotOnce<v8::Number>(1).ToLocalChecked();
+      CHECK(isolate->GetDataFromSnapshotOnce<v8::Number>(1).IsEmpty());
+      CHECK_EQ(2017, number->Int32Value(context).FromJust());
+
+      templ = isolate->GetDataFromSnapshotOnce<v8::ObjectTemplate>(2)
+                  .ToLocalChecked();
+      CHECK(isolate->GetDataFromSnapshotOnce<v8::ObjectTemplate>(2).IsEmpty());
+      CHECK_EQ(3, templ->InternalFieldCount());
+
+      isolate->GetDataFromSnapshotOnce<v8::FunctionTemplate>(3)
+          .ToLocalChecked();
+      CHECK(
+          isolate->GetDataFromSnapshotOnce<v8::FunctionTemplate>(3).IsEmpty());
+
+      isolate->GetDataFromSnapshotOnce<v8::Private>(4).ToLocalChecked();
+      CHECK(
+          isolate->GetDataFromSnapshotOnce<v8::Private>(4).IsEmpty());
+
+      isolate->GetDataFromSnapshotOnce<v8::Signature>(5).ToLocalChecked();
+      CHECK(isolate->GetDataFromSnapshotOnce<v8::Signature>(5).IsEmpty());
+
+      isolate->GetDataFromSnapshotOnce<v8::AccessorSignature>(6)
+          .ToLocalChecked();
+      CHECK(
+          isolate->GetDataFromSnapshotOnce<v8::AccessorSignature>(6).IsEmpty());
+
+      CHECK(isolate->GetDataFromSnapshotOnce<v8::Value>(7).IsEmpty());
+    }
+    isolate->Dispose();
+  }
+  {
+    SnapshotCreator creator(nullptr, &blob);
+    v8::Isolate* isolate = creator.GetIsolate();
+    {
+      // Adding data to a snapshot replaces the list of existing data.
+      v8::HandleScope hscope(isolate);
+      v8::Local<v8::Context> context = v8::Context::New(isolate);
+      creator.SetDefaultContext(context);
+      context = v8::Context::FromSnapshot(isolate, 0).ToLocalChecked();
+      v8::Local<v8::String> string =
+          context->GetDataFromSnapshotOnce<v8::String>(1).ToLocalChecked();
+      CHECK(context->GetDataFromSnapshotOnce<v8::String>(1).IsEmpty());
+      CHECK(string->Equals(context, v8_str("context-dependent")).FromJust());
+      v8::Local<v8::Number> number =
+          isolate->GetDataFromSnapshotOnce<v8::Number>(1).ToLocalChecked();
+      CHECK(isolate->GetDataFromSnapshotOnce<v8::Number>(1).IsEmpty());
+      CHECK_EQ(2017, number->Int32Value(context).FromJust());
+
+      CHECK_EQ(0u, creator.AddData(context, v8_num(2016)));
+      CHECK_EQ(0u, creator.AddContext(context));
+      CHECK_EQ(0u, creator.AddData(v8_str("stuff")));
+    }
+    delete[] blob.data;
+    blob =
+        creator.CreateBlob(v8::SnapshotCreator::FunctionCodeHandling::kClear);
+  }
+  {
+    v8::Isolate::CreateParams params;
+    params.snapshot_blob = &blob;
+    params.array_buffer_allocator = CcTest::array_buffer_allocator();
+    // Test-appropriate equivalent of v8::Isolate::New.
+    v8::Isolate* isolate = TestIsolate::New(params);
+    {
+      v8::Isolate::Scope isolate_scope(isolate);
+      v8::HandleScope handle_scope(isolate);
+
+      // Context where we did not re-add data no longer has data.
+      v8::Local<v8::Context> context = v8::Context::New(isolate);
+      CHECK(context->GetDataFromSnapshotOnce<v8::Object>(0).IsEmpty());
+
+      // Context where we re-added data has completely new ones.
+      context = v8::Context::FromSnapshot(isolate, 0).ToLocalChecked();
+      v8::Local<v8::Value> value =
+          context->GetDataFromSnapshotOnce<v8::Value>(0).ToLocalChecked();
+      CHECK_EQ(2016, value->Int32Value(context).FromJust());
+      CHECK(context->GetDataFromSnapshotOnce<v8::Value>(1).IsEmpty());
+
+      // Ditto for the isolate.
+      v8::Local<v8::String> string =
+          isolate->GetDataFromSnapshotOnce<v8::String>(0).ToLocalChecked();
+      CHECK(string->Equals(context, v8_str("stuff")).FromJust());
+      CHECK(context->GetDataFromSnapshotOnce<v8::String>(1).IsEmpty());
+    }
+    isolate->Dispose();
+  }
+  delete[] blob.data;
+}
+
+TEST(SnapshotCreatorUnknownHandles) {
+  DisableAlwaysOpt();
+  v8::StartupData blob;
+
+  {
+    v8::SnapshotCreator creator;
+    v8::Isolate* isolate = creator.GetIsolate();
+    v8::Eternal<v8::Value> eternal_number;
+    v8::Persistent<v8::Value> persistent_number;
+    {
+      v8::HandleScope handle_scope(isolate);
+
+      eternal_number.Set(isolate, v8_num(2017));
+      persistent_number.Reset(isolate, v8_num(2018));
+
+      v8::Local<v8::Context> context = v8::Context::New(isolate);
+      creator.SetDefaultContext(context);
+    }
+
+    blob =
+        creator.CreateBlob(v8::SnapshotCreator::FunctionCodeHandling::kClear);
+  }
+  delete[] blob.data;
+}
+
 TEST(SnapshotCreatorIncludeGlobalProxy) {
   DisableAlwaysOpt();
   v8::StartupData blob;
@@ -2711,7 +3200,7 @@
   delete[] blob.data;
 }
 
-UNINITIALIZED_TEST(ReinitializeStringHashSeedNotRehashable) {
+UNINITIALIZED_TEST(ReinitializeHashSeedNotRehashable) {
   DisableAlwaysOpt();
   i::FLAG_rehash_snapshot = true;
   i::FLAG_hash_seed = 42;
@@ -2724,13 +3213,12 @@
       v8::HandleScope handle_scope(isolate);
       v8::Local<v8::Context> context = v8::Context::New(isolate);
       v8::Context::Scope context_scope(context);
-      // Create dictionary mode object.
+      // Create an object with an ordered hash table.
       CompileRun(
-          "var a = {};"
-          "a.b = 1;"
-          "a.c = 2;"
-          "delete a.b;");
-      ExpectInt32("a.c", 2);
+          "var m = new Map();"
+          "m.set('a', 1);"
+          "m.set('b', 2);");
+      ExpectInt32("m.get('b')", 2);
       creator.SetDefaultContext(context);
     }
     blob =
@@ -2750,7 +3238,76 @@
     v8::Local<v8::Context> context = v8::Context::New(isolate);
     CHECK(!context.IsEmpty());
     v8::Context::Scope context_scope(context);
-    ExpectInt32("a.c", 2);
+    ExpectInt32("m.get('b')", 2);
+  }
+  isolate->Dispose();
+  delete[] blob.data;
+}
+
+UNINITIALIZED_TEST(ReinitializeHashSeedRehashable) {
+  DisableAlwaysOpt();
+  i::FLAG_rehash_snapshot = true;
+  i::FLAG_hash_seed = 42;
+  i::FLAG_allow_natives_syntax = true;
+  v8::StartupData blob;
+  {
+    v8::SnapshotCreator creator;
+    v8::Isolate* isolate = creator.GetIsolate();
+    {
+      v8::HandleScope handle_scope(isolate);
+      v8::Local<v8::Context> context = v8::Context::New(isolate);
+      v8::Context::Scope context_scope(context);
+      // Create dictionary mode object.
+      CompileRun(
+          "var a = new Array(10000);"
+          "%NormalizeElements(a);"
+          "a[133] = 1;"
+          "a[177] = 2;"
+          "a[971] = 3;"
+          "a[7997] = 4;"
+          "a[2111] = 5;"
+          "var o = {};"
+          "%OptimizeObjectForAddingMultipleProperties(o, 3);"
+          "o.a = 1;"
+          "o.b = 2;"
+          "o.c = 3;"
+          "var p = { foo: 1 };"  // Test rehashing of transition arrays.
+          "p = JSON.parse('{\"foo\": {\"x\": 1}}');");
+      i::Handle<i::Object> i_a = v8::Utils::OpenHandle(*CompileRun("a"));
+      i::Handle<i::Object> i_o = v8::Utils::OpenHandle(*CompileRun("o"));
+      CHECK(i_a->IsJSArray());
+      CHECK(i_a->IsJSObject());
+      CHECK(!i::Handle<i::JSArray>::cast(i_a)->HasFastElements());
+      CHECK(!i::Handle<i::JSObject>::cast(i_o)->HasFastProperties());
+      ExpectInt32("a[2111]", 5);
+      ExpectInt32("o.c", 3);
+      creator.SetDefaultContext(context);
+    }
+    blob =
+        creator.CreateBlob(v8::SnapshotCreator::FunctionCodeHandling::kClear);
+  }
+
+  i::FLAG_hash_seed = 1337;
+  v8::Isolate::CreateParams create_params;
+  create_params.array_buffer_allocator = CcTest::array_buffer_allocator();
+  create_params.snapshot_blob = &blob;
+  v8::Isolate* isolate = v8::Isolate::New(create_params);
+  {
+    // Check that rehashing has been performed.
+    CHECK_EQ(1337, reinterpret_cast<i::Isolate*>(isolate)->heap()->HashSeed());
+    v8::Isolate::Scope isolate_scope(isolate);
+    v8::HandleScope handle_scope(isolate);
+    v8::Local<v8::Context> context = v8::Context::New(isolate);
+    CHECK(!context.IsEmpty());
+    v8::Context::Scope context_scope(context);
+    i::Handle<i::Object> i_a = v8::Utils::OpenHandle(*CompileRun("a"));
+    i::Handle<i::Object> i_o = v8::Utils::OpenHandle(*CompileRun("o"));
+    CHECK(i_a->IsJSArray());
+    CHECK(i_a->IsJSObject());
+    CHECK(!i::Handle<i::JSArray>::cast(i_a)->HasFastElements());
+    CHECK(!i::Handle<i::JSObject>::cast(i_o)->HasFastProperties());
+    ExpectInt32("a[2111]", 5);
+    ExpectInt32("o.c", 3);
   }
   isolate->Dispose();
   delete[] blob.data;
diff --git a/src/v8/test/cctest/test-strings.cc b/src/v8/test/cctest/test-strings.cc
index ec6b659..ba61868 100644
--- a/src/v8/test/cctest/test-strings.cc
+++ b/src/v8/test/cctest/test-strings.cc
@@ -50,8 +50,8 @@
     init();
   }
 
-  void init(uint32_t seed = 0x5688c73e) {
-    static const uint32_t phi = 0x9e3779b9;
+  void init(uint32_t seed = 0x5688C73E) {
+    static const uint32_t phi = 0x9E3779B9;
     c = 362436;
     i = kQSize-1;
     Q[0] = seed;
@@ -64,7 +64,7 @@
 
   uint32_t next() {
     uint64_t a = 18782;
-    uint32_t r = 0xfffffffe;
+    uint32_t r = 0xFFFFFFFE;
     i = (i + 1) & (kQSize-1);
     uint64_t t = a * Q[i] + c;
     c = (t >> 32);
@@ -364,7 +364,7 @@
   ConsStringIterator iter(cons_string);
   String* string;
   int offset;
-  while (NULL != (string = iter.Next(&offset))) {
+  while (nullptr != (string = iter.Next(&offset))) {
     // Accumulate stats.
     CHECK_EQ(0, offset);
     stats->leaves_++;
@@ -1070,6 +1070,7 @@
 
 
 TEST(JSONStringifySliceMadeExternal) {
+  if (!FLAG_string_slices) return;
   CcTest::InitializeVM();
   // Create a sliced string from a one-byte string.  The latter is turned
   // into a two-byte external string.  Check that JSON.stringify works.
@@ -1155,6 +1156,7 @@
 
 
 TEST(SliceFromCons) {
+  if (!FLAG_string_slices) return;
   CcTest::InitializeVM();
   Factory* factory = CcTest::i_isolate()->factory();
   v8::HandleScope scope(CcTest::isolate());
@@ -1221,6 +1223,7 @@
 }
 
 TEST(SliceFromExternal) {
+  if (!FLAG_string_slices) return;
   CcTest::InitializeVM();
   Factory* factory = CcTest::i_isolate()->factory();
   v8::HandleScope scope(CcTest::isolate());
@@ -1241,6 +1244,7 @@
 TEST(TrivialSlice) {
   // This tests whether a slice that contains the entire parent string
   // actually creates a new string (it should not).
+  if (!FLAG_string_slices) return;
   CcTest::InitializeVM();
   Factory* factory = CcTest::i_isolate()->factory();
   v8::HandleScope scope(CcTest::isolate());
@@ -1270,6 +1274,7 @@
 TEST(SliceFromSlice) {
   // This tests whether a slice that contains the entire parent string
   // actually creates a new string (it should not).
+  if (!FLAG_string_slices) return;
   CcTest::InitializeVM();
   v8::HandleScope scope(CcTest::isolate());
   v8::Local<v8::Value> result;
@@ -1299,7 +1304,11 @@
   v8::Isolate::CreateParams create_params;
   // Set heap limits.
   create_params.constraints.set_max_semi_space_size_in_kb(1024);
+#ifdef DEBUG
+  create_params.constraints.set_max_old_space_size(20);
+#else
   create_params.constraints.set_max_old_space_size(7);
+#endif
   create_params.array_buffer_allocator = CcTest::array_buffer_allocator();
   v8::Isolate* isolate = v8::Isolate::New(create_params);
   isolate->Enter();
@@ -1421,7 +1430,7 @@
 
 namespace {
 
-int* global_use_counts = NULL;
+int* global_use_counts = nullptr;
 
 void MockUseCounterCallback(v8::Isolate* isolate,
                             v8::Isolate::UseCounterFeature feature) {
@@ -1466,7 +1475,7 @@
       "subject.replace(/~/g, replace);  ");
   CHECK(result->IsString());
   Handle<String> string = v8::Utils::OpenHandle(v8::String::Cast(*result));
-  CHECK(string->IsSeqTwoByteString());
+  CHECK(string->IsTwoByteRepresentation());
 
   v8::Local<v8::String> expected = v8_str("one_byte\x80only\x80string\x80");
   CHECK(expected->Equals(context.local(), result).FromJust());
@@ -1474,8 +1483,8 @@
 
 
 TEST(IsAscii) {
-  CHECK(String::IsAscii(static_cast<char*>(NULL), 0));
-  CHECK(String::IsOneByte(static_cast<uc16*>(NULL), 0));
+  CHECK(String::IsAscii(static_cast<char*>(nullptr), 0));
+  CHECK(String::IsOneByte(static_cast<uc16*>(nullptr), 0));
 }
 
 
@@ -1484,7 +1493,7 @@
 static uint16_t ConvertLatin1(uint16_t c) {
   uint32_t result[Op::kMaxWidth];
   int chars;
-  chars = Op::Convert(c, 0, result, NULL);
+  chars = Op::Convert(c, 0, result, nullptr);
   if (chars == 0) return 0;
   CHECK_LE(chars, static_cast<int>(sizeof(result)));
   if (!return_first && chars > 1) {
@@ -1538,14 +1547,14 @@
 
 class DummyResource: public v8::String::ExternalStringResource {
  public:
-  virtual const uint16_t* data() const { return NULL; }
+  virtual const uint16_t* data() const { return nullptr; }
   virtual size_t length() const { return 1 << 30; }
 };
 
 
 class DummyOneByteResource: public v8::String::ExternalOneByteStringResource {
  public:
-  virtual const char* data() const { return NULL; }
+  virtual const char* data() const { return nullptr; }
   virtual size_t length() const { return 1 << 30; }
 };
 
diff --git a/src/v8/test/cctest/test-strtod.cc b/src/v8/test/cctest/test-strtod.cc
index 2a9bf99..68cf978 100644
--- a/src/v8/test/cctest/test-strtod.cc
+++ b/src/v8/test/cctest/test-strtod.cc
@@ -436,8 +436,8 @@
 
   // Initialization values don't have any special meaning. (They are the result
   // of two calls to rand().)
-  if (hi == 0) hi = 0xbfe166e7;
-  if (lo == 0) lo = 0x64d1c3c9;
+  if (hi == 0) hi = 0xBFE166E7;
+  if (lo == 0) lo = 0x64D1C3C9;
 
   // Mix the bits.
   hi = 36969 * (hi & 0xFFFF) + (hi >> 16);
diff --git a/src/v8/test/cctest/test-symbols.cc b/src/v8/test/cctest/test-symbols.cc
index be37c20..750ab3c 100644
--- a/src/v8/test/cctest/test-symbols.cc
+++ b/src/v8/test/cctest/test-symbols.cc
@@ -33,15 +33,8 @@
 #include "src/factory.h"
 #include "src/isolate.h"
 #include "src/objects.h"
+#include "src/objects/name-inl.h"
 #include "src/ostreams.h"
-// FIXME(mstarzinger, marja): This is weird, but required because of the missing
-// (disallowed) include: src/factory.h -> src/objects-inl.h
-#include "src/objects-inl.h"
-// FIXME(mstarzinger, marja): This is weird, but required because of the missing
-// (disallowed) include: src/feedback-vector.h ->
-// src/feedback-vector-inl.h
-#include "src/feedback-vector-inl.h"
-#include "src/v8.h"
 #include "test/cctest/cctest.h"
 
 namespace v8 {
diff --git a/src/v8/test/cctest/test-simulator-arm.cc b/src/v8/test/cctest/test-sync-primitives-arm.cc
similarity index 76%
rename from src/v8/test/cctest/test-simulator-arm.cc
rename to src/v8/test/cctest/test-sync-primitives-arm.cc
index 39ea666..c99b462 100644
--- a/src/v8/test/cctest/test-simulator-arm.cc
+++ b/src/v8/test/cctest/test-sync-primitives-arm.cc
@@ -26,29 +26,41 @@
 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 #include "src/v8.h"
+#include "test/cctest/assembler-helper-arm.h"
 #include "test/cctest/cctest.h"
 
-#include "src/arm/simulator-arm.h"
 #include "src/assembler-inl.h"
 #include "src/disassembler.h"
 #include "src/factory.h"
 #include "src/macro-assembler.h"
+#include "src/simulator.h"
 
 namespace v8 {
 namespace internal {
 
+// These tests rely on the behaviour specific to the simulator so we cannot
+// expect the same results on real hardware. The reason for this is that our
+// simulation of synchronisation primitives is more conservative than the
+// reality.
+// For example:
+//   ldrex r1, [r2] ; Load acquire at address r2; r2 is now marked as exclusive.
+//   ldr r0, [r4]   ; This is a normal load, and at a different address.
+//                  ; However, any memory accesses can potentially clear the
+//                  ; exclusivity (See ARM DDI 0406C.c A3.4.5). This is unlikely
+//                  ; on real hardware but to be conservative, the simulator
+//                  ; always does it.
+//   strex r3, r1, [r2] ; As a result, this will always fail in the simulator
+//                      ; but will likely succeed on hardware.
 #if defined(USE_SIMULATOR)
 
 #ifndef V8_TARGET_LITTLE_ENDIAN
 #error Expected ARM to be little-endian
 #endif
 
-// Define these function prototypes to match JSEntryFunction in execution.cc.
-typedef Object* (*F1)(int x, int p1, int p2, int p3, int p4);
-typedef Object* (*F3)(void* p0, int p1, int p2, int p3, int p4);
-
 #define __ assm.
 
+namespace {
+
 struct MemoryAccess {
   enum class Kind {
     None,
@@ -85,9 +97,9 @@
   int dummy;
 };
 
-static void AssembleMemoryAccess(Assembler* assembler, MemoryAccess access,
-                                 Register dest_reg, Register value_reg,
-                                 Register addr_reg) {
+void AssembleMemoryAccess(Assembler* assembler, MemoryAccess access,
+                          Register dest_reg, Register value_reg,
+                          Register addr_reg) {
   Assembler& assm = *assembler;
   __ add(addr_reg, r0, Operand(access.offset));
 
@@ -167,42 +179,34 @@
   }
 }
 
-static void AssembleLoadExcl(Assembler* assembler, MemoryAccess access,
-                             Register value_reg, Register addr_reg) {
+void AssembleLoadExcl(Assembler* assembler, MemoryAccess access,
+                      Register value_reg, Register addr_reg) {
   DCHECK(access.kind == MemoryAccess::Kind::LoadExcl);
   AssembleMemoryAccess(assembler, access, no_reg, value_reg, addr_reg);
 }
 
-static void AssembleStoreExcl(Assembler* assembler, MemoryAccess access,
-                              Register dest_reg, Register value_reg,
-                              Register addr_reg) {
+void AssembleStoreExcl(Assembler* assembler, MemoryAccess access,
+                       Register dest_reg, Register value_reg,
+                       Register addr_reg) {
   DCHECK(access.kind == MemoryAccess::Kind::StoreExcl);
   AssembleMemoryAccess(assembler, access, dest_reg, value_reg, addr_reg);
 }
 
-static void TestInvalidateExclusiveAccess(
-    TestData initial_data, MemoryAccess access1, MemoryAccess access2,
-    MemoryAccess access3, int expected_res, TestData expected_data) {
+void TestInvalidateExclusiveAccess(TestData initial_data, MemoryAccess access1,
+                                   MemoryAccess access2, MemoryAccess access3,
+                                   int expected_res, TestData expected_data) {
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
 
-  Assembler assm(isolate, NULL, 0);
+  auto f = AssembleCode<int(TestData*, int, int, int)>([&](Assembler& assm) {
+    AssembleLoadExcl(&assm, access1, r1, r1);
+    AssembleMemoryAccess(&assm, access2, r3, r2, r1);
+    AssembleStoreExcl(&assm, access3, r0, r3, r1);
+  });
 
-  AssembleLoadExcl(&assm, access1, r1, r1);
-  AssembleMemoryAccess(&assm, access2, r3, r2, r1);
-  AssembleStoreExcl(&assm, access3, r0, r3, r1);
-
-  __ mov(pc, Operand(lr));
-
-  CodeDesc desc;
-  assm.GetCode(isolate, &desc);
-  Handle<Code> code =
-      isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
-  F3 f = FUNCTION_CAST<F3>(code->entry());
   TestData t = initial_data;
 
-  int res =
-      reinterpret_cast<int>(CALL_GENERATED_CODE(isolate, f, &t, 0, 0, 0, 0));
+  int res = f.Call(&t, 0, 0, 0);
   CHECK_EQ(expected_res, res);
   switch (access3.size) {
     case MemoryAccess::Size::Byte:
@@ -219,6 +223,8 @@
   }
 }
 
+}  // namespace
+
 TEST(simulator_invalidate_exclusive_access) {
   using Kind = MemoryAccess::Kind;
   using Size = MemoryAccess::Size;
@@ -255,54 +261,54 @@
                                 0, TestData(7));
 }
 
-static int ExecuteMemoryAccess(Isolate* isolate, TestData* test_data,
-                               MemoryAccess access) {
+namespace {
+
+int ExecuteMemoryAccess(Isolate* isolate, TestData* test_data,
+                        MemoryAccess access) {
   HandleScope scope(isolate);
-  Assembler assm(isolate, NULL, 0);
-  AssembleMemoryAccess(&assm, access, r0, r2, r1);
-  __ bx(lr);
+  auto f = AssembleCode<int(TestData*, int, int)>([&](Assembler& assm) {
+    AssembleMemoryAccess(&assm, access, r0, r2, r1);
+  });
 
-  CodeDesc desc;
-  assm.GetCode(isolate, &desc);
-  Handle<Code> code =
-      isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
-  F3 f = FUNCTION_CAST<F3>(code->entry());
-
-  return reinterpret_cast<int>(
-      CALL_GENERATED_CODE(isolate, f, test_data, 0, 0, 0, 0));
+  return f.Call(test_data, 0, 0);
 }
 
+}  // namespace
+
 class MemoryAccessThread : public v8::base::Thread {
  public:
   MemoryAccessThread()
       : Thread(Options("MemoryAccessThread")),
-        test_data_(NULL),
+        test_data_(nullptr),
         is_finished_(false),
         has_request_(false),
-        did_request_(false) {}
+        did_request_(false),
+        isolate_(nullptr) {}
 
   virtual void Run() {
     v8::Isolate::CreateParams create_params;
     create_params.array_buffer_allocator = CcTest::array_buffer_allocator();
-    v8::Isolate* isolate = v8::Isolate::New(create_params);
-    Isolate* i_isolate = reinterpret_cast<Isolate*>(isolate);
-    v8::Isolate::Scope scope(isolate);
+    isolate_ = v8::Isolate::New(create_params);
+    Isolate* i_isolate = reinterpret_cast<Isolate*>(isolate_);
+    {
+      v8::Isolate::Scope scope(isolate_);
+      v8::base::LockGuard<v8::base::Mutex> lock_guard(&mutex_);
+      while (!is_finished_) {
+        while (!(has_request_ || is_finished_)) {
+          has_request_cv_.Wait(&mutex_);
+        }
 
-    v8::base::LockGuard<v8::base::Mutex> lock_guard(&mutex_);
-    while (!is_finished_) {
-      while (!(has_request_ || is_finished_)) {
-        has_request_cv_.Wait(&mutex_);
+        if (is_finished_) {
+          break;
+        }
+
+        ExecuteMemoryAccess(i_isolate, test_data_, access_);
+        has_request_ = false;
+        did_request_ = true;
+        did_request_cv_.NotifyOne();
       }
-
-      if (is_finished_) {
-        break;
-      }
-
-      ExecuteMemoryAccess(i_isolate, test_data_, access_);
-      has_request_ = false;
-      did_request_ = true;
-      did_request_cv_.NotifyOne();
     }
+    isolate_->Dispose();
   }
 
   void NextAndWait(TestData* test_data, MemoryAccess access) {
@@ -333,6 +339,7 @@
   v8::base::Mutex mutex_;
   v8::base::ConditionVariable has_request_cv_;
   v8::base::ConditionVariable did_request_cv_;
+  v8::Isolate* isolate_;
 };
 
 TEST(simulator_invalidate_exclusive_access_threaded) {
@@ -385,7 +392,7 @@
 
 #undef __
 
-#endif  // USE_SIMULATOR
+#endif  // defined(USE_SIMULATOR)
 
 }  // namespace internal
 }  // namespace v8
diff --git a/src/v8/test/cctest/test-simulator-arm64.cc b/src/v8/test/cctest/test-sync-primitives-arm64.cc
similarity index 78%
rename from src/v8/test/cctest/test-simulator-arm64.cc
rename to src/v8/test/cctest/test-sync-primitives-arm64.cc
index bf7d6da..348faf8 100644
--- a/src/v8/test/cctest/test-simulator-arm64.cc
+++ b/src/v8/test/cctest/test-sync-primitives-arm64.cc
@@ -36,6 +36,19 @@
 namespace v8 {
 namespace internal {
 
+// These tests rely on the behaviour specific to the simulator so we cannot
+// expect the same results on real hardware. The reason for this is that our
+// simulation of synchronisation primitives is more conservative than the
+// reality.
+// For example:
+//   ldxr x1, [x2] ; Load acquire at address x2; x2 is now marked as exclusive.
+//   ldr x0, [x4]  ; This is a normal load, and at a different address.
+//                 ; However, any memory accesses can potentially clear the
+//                 ; exclusivity (See ARM DDI 0487B.a B2.9.5). This is unlikely
+//                 ; on real hardware but to be conservative, the simulator
+//                 ; always does it.
+//   stxr w3, x1, [x2] ; As a result, this will always fail in the simulator but
+//                     ; will likely succeed on hardware.
 #if defined(USE_SIMULATOR)
 
 #ifndef V8_TARGET_LITTLE_ENDIAN
@@ -80,9 +93,11 @@
   int dummy;
 };
 
-static void AssembleMemoryAccess(MacroAssembler* assembler, MemoryAccess access,
-                                 Register dest_reg, Register value_reg,
-                                 Register addr_reg) {
+namespace {
+
+void AssembleMemoryAccess(MacroAssembler* assembler, MemoryAccess access,
+                          Register dest_reg, Register value_reg,
+                          Register addr_reg) {
   MacroAssembler& masm = *assembler;
   __ Add(addr_reg, x0, Operand(access.offset));
 
@@ -162,25 +177,26 @@
   }
 }
 
-static void AssembleLoadExcl(MacroAssembler* assembler, MemoryAccess access,
-                             Register value_reg, Register addr_reg) {
+void AssembleLoadExcl(MacroAssembler* assembler, MemoryAccess access,
+                      Register value_reg, Register addr_reg) {
   DCHECK(access.kind == MemoryAccess::Kind::LoadExcl);
   AssembleMemoryAccess(assembler, access, no_reg, value_reg, addr_reg);
 }
 
-static void AssembleStoreExcl(MacroAssembler* assembler, MemoryAccess access,
-                              Register dest_reg, Register value_reg,
-                              Register addr_reg) {
+void AssembleStoreExcl(MacroAssembler* assembler, MemoryAccess access,
+                       Register dest_reg, Register value_reg,
+                       Register addr_reg) {
   DCHECK(access.kind == MemoryAccess::Kind::StoreExcl);
   AssembleMemoryAccess(assembler, access, dest_reg, value_reg, addr_reg);
 }
 
-static void TestInvalidateExclusiveAccess(
-    TestData initial_data, MemoryAccess access1, MemoryAccess access2,
-    MemoryAccess access3, int expected_res, TestData expected_data) {
+void TestInvalidateExclusiveAccess(TestData initial_data, MemoryAccess access1,
+                                   MemoryAccess access2, MemoryAccess access3,
+                                   int expected_res, TestData expected_data) {
   Isolate* isolate = CcTest::i_isolate();
   HandleScope scope(isolate);
-  MacroAssembler masm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler masm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
 
   AssembleLoadExcl(&masm, access1, w1, x1);
   AssembleMemoryAccess(&masm, access2, w3, w2, x1);
@@ -191,11 +207,9 @@
   masm.GetCode(isolate, &desc);
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
+
   TestData t = initial_data;
-  Simulator::CallArgument args[] = {
-      Simulator::CallArgument(reinterpret_cast<uintptr_t>(&t)),
-      Simulator::CallArgument::End()};
-  Simulator::current(isolate)->CallVoid(code->entry(), args);
+  Simulator::current(isolate)->Call<void>(code->entry(), &t);
   int res = Simulator::current(isolate)->wreg(0);
 
   CHECK_EQ(expected_res, res);
@@ -214,6 +228,8 @@
   }
 }
 
+}  // namespace
+
 TEST(simulator_invalidate_exclusive_access) {
   using Kind = MemoryAccess::Kind;
   using Size = MemoryAccess::Size;
@@ -250,10 +266,13 @@
                                 0, TestData(7));
 }
 
-static int ExecuteMemoryAccess(Isolate* isolate, TestData* test_data,
-                               MemoryAccess access) {
+namespace {
+
+int ExecuteMemoryAccess(Isolate* isolate, TestData* test_data,
+                        MemoryAccess access) {
   HandleScope scope(isolate);
-  MacroAssembler masm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+  MacroAssembler masm(isolate, nullptr, 0,
+                      v8::internal::CodeObjectRequired::kYes);
   AssembleMemoryAccess(&masm, access, w0, w2, x1);
   __ br(lr);
 
@@ -261,44 +280,46 @@
   masm.GetCode(isolate, &desc);
   Handle<Code> code =
       isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
-  Simulator::CallArgument args[] = {
-      Simulator::CallArgument(reinterpret_cast<uintptr_t>(test_data)),
-      Simulator::CallArgument::End()};
-  Simulator::current(isolate)->CallVoid(code->entry(), args);
+  Simulator::current(isolate)->Call<void>(code->entry(), test_data);
   return Simulator::current(isolate)->wreg(0);
 }
 
+}  // namespace
+
 class MemoryAccessThread : public v8::base::Thread {
  public:
   MemoryAccessThread()
       : Thread(Options("MemoryAccessThread")),
-        test_data_(NULL),
+        test_data_(nullptr),
         is_finished_(false),
         has_request_(false),
-        did_request_(false) {}
+        did_request_(false),
+        isolate_(nullptr) {}
 
   virtual void Run() {
     v8::Isolate::CreateParams create_params;
     create_params.array_buffer_allocator = CcTest::array_buffer_allocator();
-    v8::Isolate* isolate = v8::Isolate::New(create_params);
-    Isolate* i_isolate = reinterpret_cast<Isolate*>(isolate);
-    v8::Isolate::Scope scope(isolate);
+    isolate_ = v8::Isolate::New(create_params);
+    Isolate* i_isolate = reinterpret_cast<Isolate*>(isolate_);
+    {
+      v8::Isolate::Scope scope(isolate_);
+      v8::base::LockGuard<v8::base::Mutex> lock_guard(&mutex_);
+      while (!is_finished_) {
+        while (!(has_request_ || is_finished_)) {
+          has_request_cv_.Wait(&mutex_);
+        }
 
-    v8::base::LockGuard<v8::base::Mutex> lock_guard(&mutex_);
-    while (!is_finished_) {
-      while (!(has_request_ || is_finished_)) {
-        has_request_cv_.Wait(&mutex_);
+        if (is_finished_) {
+          break;
+        }
+
+        ExecuteMemoryAccess(i_isolate, test_data_, access_);
+        has_request_ = false;
+        did_request_ = true;
+        did_request_cv_.NotifyOne();
       }
-
-      if (is_finished_) {
-        break;
-      }
-
-      ExecuteMemoryAccess(i_isolate, test_data_, access_);
-      has_request_ = false;
-      did_request_ = true;
-      did_request_cv_.NotifyOne();
     }
+    isolate_->Dispose();
   }
 
   void NextAndWait(TestData* test_data, MemoryAccess access) {
@@ -329,6 +350,7 @@
   v8::base::Mutex mutex_;
   v8::base::ConditionVariable has_request_cv_;
   v8::base::ConditionVariable did_request_cv_;
+  v8::Isolate* isolate_;
 };
 
 TEST(simulator_invalidate_exclusive_access_threaded) {
diff --git a/src/v8/test/cctest/test-thread-termination.cc b/src/v8/test/cctest/test-thread-termination.cc
index 0c6c0b6..21bdb64 100644
--- a/src/v8/test/cctest/test-thread-termination.cc
+++ b/src/v8/test/cctest/test-thread-termination.cc
@@ -33,9 +33,7 @@
 
 #include "src/base/platform/platform.h"
 
-
-v8::base::Semaphore* semaphore = NULL;
-
+v8::base::Semaphore* semaphore = nullptr;
 
 void Signal(const v8::FunctionCallbackInfo<v8::Value>& args) {
   semaphore->Signal();
@@ -47,11 +45,7 @@
   args.GetIsolate()->TerminateExecution();
 }
 
-
-void Fail(const v8::FunctionCallbackInfo<v8::Value>& args) {
-  CHECK(false);
-}
-
+void Fail(const v8::FunctionCallbackInfo<v8::Value>& args) { UNREACHABLE(); }
 
 void Loop(const v8::FunctionCallbackInfo<v8::Value>& args) {
   CHECK(!args.GetIsolate()->IsExecutionTerminating());
@@ -129,7 +123,7 @@
   v8::Local<v8::ObjectTemplate> global =
       CreateGlobalTemplate(CcTest::isolate(), TerminateCurrentThread, DoLoop);
   v8::Local<v8::Context> context =
-      v8::Context::New(CcTest::isolate(), NULL, global);
+      v8::Context::New(CcTest::isolate(), nullptr, global);
   v8::Context::Scope context_scope(context);
   CHECK(!CcTest::isolate()->IsExecutionTerminating());
   // Run a loop that will be infinite if thread termination does not work.
@@ -152,7 +146,7 @@
   v8::Local<v8::ObjectTemplate> global = CreateGlobalTemplate(
       CcTest::isolate(), TerminateCurrentThread, DoLoopNoCall);
   v8::Local<v8::Context> context =
-      v8::Context::New(CcTest::isolate(), NULL, global);
+      v8::Context::New(CcTest::isolate(), nullptr, global);
   v8::Context::Scope context_scope(context);
   CHECK(!CcTest::isolate()->IsExecutionTerminating());
   // Run a loop that will be infinite if thread termination does not work.
@@ -194,7 +188,7 @@
   v8::Local<v8::ObjectTemplate> global =
       CreateGlobalTemplate(CcTest::isolate(), Signal, DoLoop);
   v8::Local<v8::Context> context =
-      v8::Context::New(CcTest::isolate(), NULL, global);
+      v8::Context::New(CcTest::isolate(), nullptr, global);
   v8::Context::Scope context_scope(context);
   CHECK(!CcTest::isolate()->IsExecutionTerminating());
   // Run a loop that will be infinite if thread termination does not work.
@@ -204,7 +198,7 @@
   CHECK(result.IsEmpty());
   thread.Join();
   delete semaphore;
-  semaphore = NULL;
+  semaphore = nullptr;
 }
 
 // Test that execution can be terminated from within JSON.stringify.
@@ -217,7 +211,7 @@
   v8::Local<v8::ObjectTemplate> global =
       CreateGlobalTemplate(CcTest::isolate(), Signal, DoLoop);
   v8::Local<v8::Context> context =
-      v8::Context::New(CcTest::isolate(), NULL, global);
+      v8::Context::New(CcTest::isolate(), nullptr, global);
   v8::Context::Scope context_scope(context);
   CHECK(!CcTest::isolate()->IsExecutionTerminating());
   v8::MaybeLocal<v8::Value> result =
@@ -230,7 +224,7 @@
   CHECK(result.IsEmpty());
   thread.Join();
   delete semaphore;
-  semaphore = NULL;
+  semaphore = nullptr;
 }
 
 int call_count = 0;
@@ -289,7 +283,7 @@
   global->Set(v8_str("loop"),
               v8::FunctionTemplate::New(isolate, LoopGetProperty));
 
-  v8::Local<v8::Context> context = v8::Context::New(isolate, NULL, global);
+  v8::Local<v8::Context> context = v8::Context::New(isolate, nullptr, global);
   v8::Context::Scope context_scope(context);
   CHECK(!isolate->IsExecutionTerminating());
   // Run a loop that will be infinite if thread termination does not work.
@@ -336,7 +330,7 @@
   v8::HandleScope scope(isolate);
   v8::Local<v8::ObjectTemplate> global = CreateGlobalTemplate(
       isolate, TerminateCurrentThread, ReenterAfterTermination);
-  v8::Local<v8::Context> context = v8::Context::New(isolate, NULL, global);
+  v8::Local<v8::Context> context = v8::Context::New(isolate, nullptr, global);
   v8::Context::Scope context_scope(context);
   CHECK(!v8::Isolate::GetCurrent()->IsExecutionTerminating());
   // Create script strings upfront as it won't work when terminating.
@@ -394,7 +388,7 @@
   v8::HandleScope scope(isolate);
   v8::Local<v8::ObjectTemplate> global = CreateGlobalTemplate(
       isolate, TerminateCurrentThread, DoLoopCancelTerminate);
-  v8::Local<v8::Context> context = v8::Context::New(isolate, NULL, global);
+  v8::Local<v8::Context> context = v8::Context::New(isolate, nullptr, global);
   v8::Context::Scope context_scope(context);
   CHECK(!CcTest::isolate()->IsExecutionTerminating());
   // Check that execution completed with correct return value.
@@ -408,7 +402,7 @@
 
 
 void MicrotaskShouldNotRun(const v8::FunctionCallbackInfo<v8::Value>& info) {
-  CHECK(false);
+  UNREACHABLE();
 }
 
 
@@ -436,7 +430,7 @@
   v8::Local<v8::ObjectTemplate> global =
       CreateGlobalTemplate(CcTest::isolate(), Signal, DoLoop);
   v8::Local<v8::Context> context =
-      v8::Context::New(CcTest::isolate(), NULL, global);
+      v8::Context::New(CcTest::isolate(), nullptr, global);
   v8::Context::Scope context_scope(context);
   isolate->EnqueueMicrotask(
       v8::Function::New(isolate->GetCurrentContext(), MicrotaskLoopForever)
@@ -453,7 +447,7 @@
 
   thread.Join();
   delete semaphore;
-  semaphore = NULL;
+  semaphore = nullptr;
 }
 
 
@@ -471,7 +465,7 @@
   v8::Local<v8::ObjectTemplate> global =
       CreateGlobalTemplate(CcTest::isolate(), TerminateCurrentThread, DoLoop);
   v8::Local<v8::Context> context =
-      v8::Context::New(CcTest::isolate(), NULL, global);
+      v8::Context::New(CcTest::isolate(), nullptr, global);
   v8::Context::Scope context_scope(context);
 
   v8::TryCatch try_catch(isolate);
@@ -483,7 +477,7 @@
                                   i::StackGuard::TERMINATE_EXECUTION);
 
     // API interrupts should still be triggered.
-    CcTest::isolate()->RequestInterrupt(&CounterCallback, NULL);
+    CcTest::isolate()->RequestInterrupt(&CounterCallback, nullptr);
     CHECK_EQ(0, callback_counter);
     CompileRun(terminate_and_loop);
     CHECK(!try_catch.HasTerminated());
@@ -494,7 +488,7 @@
                                     i::StackGuard::API_INTERRUPT);
 
       // None of the two interrupts should trigger.
-      CcTest::isolate()->RequestInterrupt(&CounterCallback, NULL);
+      CcTest::isolate()->RequestInterrupt(&CounterCallback, nullptr);
       CompileRun(terminate_and_loop);
       CHECK(!try_catch.HasTerminated());
       CHECK_EQ(1, callback_counter);
@@ -551,7 +545,7 @@
       v8_str("inner_try_call_terminate"),
       v8::FunctionTemplate::New(isolate, InnerTryCallTerminate));
   v8::Local<v8::Context> context =
-      v8::Context::New(CcTest::isolate(), NULL, global_template);
+      v8::Context::New(CcTest::isolate(), nullptr, global_template);
   v8::Context::Scope context_scope(context);
   {
     v8::TryCatch try_catch(isolate);
@@ -571,7 +565,7 @@
   v8::HandleScope scope(isolate);
   v8::Local<v8::ObjectTemplate> global = CreateGlobalTemplate(
       isolate, TerminateCurrentThread, DoLoopCancelTerminate);
-  v8::Local<v8::Context> context = v8::Context::New(isolate, NULL, global);
+  v8::Local<v8::Context> context = v8::Context::New(isolate, nullptr, global);
   v8::Context::Scope context_scope(context);
   CHECK(!isolate->IsExecutionTerminating());
   v8::TryCatch try_catch(isolate);
@@ -612,7 +606,7 @@
   v8::HandleScope scope(isolate);
   v8::Local<v8::ObjectTemplate> global = CreateGlobalTemplate(
       isolate, TerminateCurrentThread, DoLoopCancelTerminate);
-  v8::Local<v8::Context> context = v8::Context::New(isolate, NULL, global);
+  v8::Local<v8::Context> context = v8::Context::New(isolate, nullptr, global);
   v8::Context::Scope context_scope(context);
   CHECK(!isolate->IsExecutionTerminating());
   v8::TryCatch try_catch(isolate);
diff --git a/src/v8/test/cctest/test-threads.cc b/src/v8/test/cctest/test-threads.cc
index 5b4630c..d5c94ef 100644
--- a/src/v8/test/cctest/test-threads.cc
+++ b/src/v8/test/cctest/test-threads.cc
@@ -50,7 +50,7 @@
     }
     CHECK(thread_id.IsValid());
     (*refs_)[thread_no_] = thread_id;
-    if (thread_to_start_ != NULL) {
+    if (thread_to_start_ != nullptr) {
       thread_to_start_->Start();
     }
     semaphore_->Signal();
@@ -71,7 +71,7 @@
   threads.reserve(kNThreads);
   refs.reserve(kNThreads);
   v8::base::Semaphore semaphore(0);
-  ThreadIdValidationThread* prev = NULL;
+  ThreadIdValidationThread* prev = nullptr;
   for (int i = kNThreads - 1; i >= 0; i--) {
     ThreadIdValidationThread* newThread =
         new ThreadIdValidationThread(prev, &refs, i, &semaphore);
diff --git a/src/v8/test/cctest/test-trace-event.cc b/src/v8/test/cctest/test-trace-event.cc
index 9705afb..4716190 100644
--- a/src/v8/test/cctest/test-trace-event.cc
+++ b/src/v8/test/cctest/test-trace-event.cc
@@ -22,14 +22,16 @@
   uint64_t bind_id;
   int num_args;
   unsigned int flags;
+  int64_t timestamp;
   MockTraceObject(char phase, std::string name, uint64_t id, uint64_t bind_id,
-                  int num_args, int flags)
+                  int num_args, int flags, int64_t timestamp)
       : phase(phase),
         name(name),
         id(id),
         bind_id(bind_id),
         num_args(num_args),
-        flags(flags) {}
+        flags(flags),
+        timestamp(timestamp) {}
 };
 
 typedef std::vector<MockTraceObject*> MockTraceObjectList;
@@ -51,8 +53,20 @@
       const uint64_t* arg_values,
       std::unique_ptr<v8::ConvertableToTraceFormat>* arg_convertables,
       unsigned int flags) override {
-    MockTraceObject* to = new MockTraceObject(phase, std::string(name), id,
-                                              bind_id, num_args, flags);
+    return AddTraceEventWithTimestamp(
+        phase, category_enabled_flag, name, scope, id, bind_id, num_args,
+        arg_names, arg_types, arg_values, arg_convertables, flags, 0);
+  }
+
+  uint64_t AddTraceEventWithTimestamp(
+      char phase, const uint8_t* category_enabled_flag, const char* name,
+      const char* scope, uint64_t id, uint64_t bind_id, int num_args,
+      const char** arg_names, const uint8_t* arg_types,
+      const uint64_t* arg_values,
+      std::unique_ptr<v8::ConvertableToTraceFormat>* arg_convertables,
+      unsigned int flags, int64_t timestamp) override {
+    MockTraceObject* to = new MockTraceObject(
+        phase, std::string(name), id, bind_id, num_args, flags, timestamp);
     trace_object_list_.push_back(to);
     return 0;
   }
@@ -239,3 +253,24 @@
   CHECK_EQ("Isolate", GET_TRACE_OBJECT(2)->name);
   CHECK_EQ(isolate_id, GET_TRACE_OBJECT(2)->id);
 }
+
+TEST(TestEventWithTimestamp) {
+  MockTracingPlatform platform;
+
+  TRACE_EVENT_INSTANT_WITH_TIMESTAMP0("v8-cat", "0arg",
+                                      TRACE_EVENT_SCOPE_GLOBAL, 1729);
+  TRACE_EVENT_INSTANT_WITH_TIMESTAMP1("v8-cat", "1arg",
+                                      TRACE_EVENT_SCOPE_GLOBAL, 4104, "val", 1);
+  TRACE_EVENT_MARK_WITH_TIMESTAMP2("v8-cat", "mark", 13832, "a", 1, "b", 2);
+
+  CHECK_EQ(3, GET_TRACE_OBJECTS_LIST->size());
+
+  CHECK_EQ(1729, GET_TRACE_OBJECT(0)->timestamp);
+  CHECK_EQ(0, GET_TRACE_OBJECT(0)->num_args);
+
+  CHECK_EQ(4104, GET_TRACE_OBJECT(1)->timestamp);
+  CHECK_EQ(1, GET_TRACE_OBJECT(1)->num_args);
+
+  CHECK_EQ(13832, GET_TRACE_OBJECT(2)->timestamp);
+  CHECK_EQ(2, GET_TRACE_OBJECT(2)->num_args);
+}
diff --git a/src/v8/test/cctest/test-traced-value.cc b/src/v8/test/cctest/test-traced-value.cc
index 1c3e7ac..3a33389 100644
--- a/src/v8/test/cctest/test-traced-value.cc
+++ b/src/v8/test/cctest/test-traced-value.cc
@@ -114,13 +114,13 @@
   std::string json;
   value->AppendAsTraceFormat(&json);
   // Cannot use the expected value literal directly in CHECK_EQ
-  // as it fails to process # character on Windows.
+  // as it fails to process the # character on Windows.
   const char* expected =
       "{\"a\":\"abc\\\"\'\\\\\\\\x\\\"y\'z\\n\\t\\u0017\",\"b\":"
       "\"\\u0001\\u0002\\u0003\\u0004\\u0005\\u0006\\u0007\\u0008\\t\\n\\u000B"
       "\\u000C\\u000D\\u000E\\u000F\\u0010\\u0011\\u0012\\u0013\\u0014\\u0015\\"
       "u0016\\u0017\\u0018\\u0019\\u001A\\u001B\\u001C\\u001D\\u001E\\u001F "
       "!\\\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_`"
-      "abcdefghijklmnopqrstuvwxyz{|}~\177\"}";
+      "abcdefghijklmnopqrstuvwxyz{|}~\x7F\"}";
   CHECK_EQ(expected, json);
 }
diff --git a/src/v8/test/cctest/test-transitions.cc b/src/v8/test/cctest/test-transitions.cc
index 2abab39..0c49094 100644
--- a/src/v8/test/cctest/test-transitions.cc
+++ b/src/v8/test/cctest/test-transitions.cc
@@ -12,8 +12,6 @@
 #include "src/factory.h"
 #include "src/field-type.h"
 #include "src/global-handles.h"
-// FIXME(mstarzinger, marja): This is weird, but required because of the missing
-// (disallowed) include: src/field-type.h -> src/objects-inl.h
 #include "src/objects-inl.h"
 #include "src/transitions.h"
 #include "test/cctest/cctest.h"
diff --git a/src/v8/test/cctest/test-typedarrays.cc b/src/v8/test/cctest/test-typedarrays.cc
index 723a6f0..c785b45 100644
--- a/src/v8/test/cctest/test-typedarrays.cc
+++ b/src/v8/test/cctest/test-typedarrays.cc
@@ -85,5 +85,79 @@
   CHECK_EQ(memory, buffer->GetContents().Data());
 }
 
+void TestSpeciesProtector(char* code,
+                          bool invalidates_species_protector = true) {
+  v8::Isolate::CreateParams create_params;
+  create_params.array_buffer_allocator = CcTest::array_buffer_allocator();
+  std::string typed_array_constructors[] = {
+#define TYPED_ARRAY_CTOR(Type, type, TYPE, ctype, size) #Type "Array",
+
+      TYPED_ARRAYS(TYPED_ARRAY_CTOR)
+#undef TYPED_ARRAY_CTOR
+  };
+
+  for (auto& constructor : typed_array_constructors) {
+    v8::Isolate* isolate = v8::Isolate::New(create_params);
+    isolate->Enter();
+    {
+      LocalContext context(isolate);
+      v8::HandleScope scope(isolate);
+      v8::TryCatch try_catch(isolate);
+
+      CompileRun(("let x = new " + constructor + "();").c_str());
+      CompileRun(("let constructor = " + constructor + ";").c_str());
+      v8::Local<v8::Value> constructor_obj = CompileRun(constructor.c_str());
+      CHECK_EQ(constructor_obj, CompileRun("x.slice().constructor"));
+      CHECK_EQ(constructor_obj, CompileRun("x.map(()=>{}).constructor"));
+      std::string decl = "class MyTypedArray extends " + constructor + " { }";
+      CompileRun(decl.c_str());
+
+      v8::internal::Isolate* i_isolate =
+          reinterpret_cast<v8::internal::Isolate*>(isolate);
+      CHECK(i_isolate->IsArraySpeciesLookupChainIntact());
+      CompileRun(code);
+      if (invalidates_species_protector) {
+        CHECK(!i_isolate->IsArraySpeciesLookupChainIntact());
+      } else {
+        CHECK(i_isolate->IsArraySpeciesLookupChainIntact());
+      }
+
+      v8::Local<v8::Value> my_typed_array = CompileRun("MyTypedArray");
+      CHECK_EQ(my_typed_array, CompileRun("x.slice().constructor"));
+      CHECK_EQ(my_typed_array, CompileRun("x.map(()=>{}).constructor"));
+    }
+    isolate->Exit();
+    isolate->Dispose();
+  }
+}
+
+UNINITIALIZED_TEST(SpeciesConstructor) {
+  char code[] = "x.constructor = MyTypedArray";
+  TestSpeciesProtector(code);
+}
+
+UNINITIALIZED_TEST(SpeciesConstructorAccessor) {
+  char code[] =
+      "Object.defineProperty(x, 'constructor',{get() {return MyTypedArray;}})";
+  TestSpeciesProtector(code);
+}
+
+UNINITIALIZED_TEST(SpeciesModified) {
+  char code[] =
+      "Object.defineProperty(constructor, Symbol.species, "
+      "{value:MyTypedArray})";
+  TestSpeciesProtector(code);
+}
+
+UNINITIALIZED_TEST(SpeciesParentConstructor) {
+  char code[] = "constructor.prototype.constructor = MyTypedArray";
+  TestSpeciesProtector(code);
+}
+
+UNINITIALIZED_TEST(SpeciesProto) {
+  char code[] = "x.__proto__ = MyTypedArray.prototype";
+  TestSpeciesProtector(code, false);
+}
+
 }  // namespace internal
 }  // namespace v8
diff --git a/src/v8/test/cctest/test-types.cc b/src/v8/test/cctest/test-types.cc
index 46b7858..126e64c 100644
--- a/src/v8/test/cctest/test-types.cc
+++ b/src/v8/test/cctest/test-types.cc
@@ -5,16 +5,10 @@
 #include <vector>
 
 #include "src/compiler/types.h"
-#include "src/factory.h"
+#include "src/factory-inl.h"
 #include "src/heap/heap.h"
 #include "src/isolate.h"
-// FIXME(mstarzinger, marja): This is weird, but required because of the missing
-// (disallowed) include: src/factory.h -> src/objects-inl.h
-#include "src/objects-inl.h"
-// FIXME(mstarzinger, marja): This is weird, but required because of the missing
-// (disallowed) include: src/feedback-vector.h ->
-// src/feedback-vector-inl.h
-#include "src/feedback-vector-inl.h"
+#include "src/objects.h"
 #include "test/cctest/cctest.h"
 #include "test/cctest/types-fuzz.h"
 
@@ -106,9 +100,8 @@
   void IsSomeType() {
     for (TypeIterator it = T.types.begin(); it != T.types.end(); ++it) {
       Type* t = *it;
-      CHECK(1 ==
-            this->IsBitset(t) + t->IsHeapConstant() + t->IsRange() +
-                t->IsOtherNumberConstant() + this->IsUnion(t));
+      CHECK_EQ(1, this->IsBitset(t) + t->IsHeapConstant() + t->IsRange() +
+                      t->IsOtherNumberConstant() + this->IsUnion(t));
     }
   }
 
@@ -118,7 +111,7 @@
     CHECK(this->IsBitset(T.Any));
 
     CHECK(bitset(0) == this->AsBitset(T.None));
-    CHECK(bitset(0xfffffffeu) == this->AsBitset(T.Any));
+    CHECK(bitset(0xFFFFFFFEu) == this->AsBitset(T.Any));
 
     // Union(T1, T2) is bitset for bitsets T1,T2
     for (TypeIterator it1 = T.types.begin(); it1 != T.types.end(); ++it1) {
@@ -231,38 +224,38 @@
     Factory* fac = isolate->factory();
     CHECK(T.NewConstant(fac->NewNumber(0))->Is(T.UnsignedSmall));
     CHECK(T.NewConstant(fac->NewNumber(1))->Is(T.UnsignedSmall));
-    CHECK(T.NewConstant(fac->NewNumber(0x3fffffff))->Is(T.UnsignedSmall));
+    CHECK(T.NewConstant(fac->NewNumber(0x3FFFFFFF))->Is(T.UnsignedSmall));
     CHECK(T.NewConstant(fac->NewNumber(-1))->Is(T.Negative31));
-    CHECK(T.NewConstant(fac->NewNumber(-0x3fffffff))->Is(T.Negative31));
+    CHECK(T.NewConstant(fac->NewNumber(-0x3FFFFFFF))->Is(T.Negative31));
     CHECK(T.NewConstant(fac->NewNumber(-0x40000000))->Is(T.Negative31));
     CHECK(T.NewConstant(fac->NewNumber(0x40000000))->Is(T.Unsigned31));
     CHECK(!T.NewConstant(fac->NewNumber(0x40000000))->Is(T.Unsigned30));
-    CHECK(T.NewConstant(fac->NewNumber(0x7fffffff))->Is(T.Unsigned31));
-    CHECK(!T.NewConstant(fac->NewNumber(0x7fffffff))->Is(T.Unsigned30));
+    CHECK(T.NewConstant(fac->NewNumber(0x7FFFFFFF))->Is(T.Unsigned31));
+    CHECK(!T.NewConstant(fac->NewNumber(0x7FFFFFFF))->Is(T.Unsigned30));
     CHECK(T.NewConstant(fac->NewNumber(-0x40000001))->Is(T.Negative32));
     CHECK(!T.NewConstant(fac->NewNumber(-0x40000001))->Is(T.Negative31));
-    CHECK(T.NewConstant(fac->NewNumber(-0x7fffffff))->Is(T.Negative32));
-    CHECK(!T.NewConstant(fac->NewNumber(-0x7fffffff - 1))->Is(T.Negative31));
+    CHECK(T.NewConstant(fac->NewNumber(-0x7FFFFFFF))->Is(T.Negative32));
+    CHECK(!T.NewConstant(fac->NewNumber(-0x7FFFFFFF - 1))->Is(T.Negative31));
     if (SmiValuesAre31Bits()) {
       CHECK(!T.NewConstant(fac->NewNumber(0x40000000))->Is(T.UnsignedSmall));
-      CHECK(!T.NewConstant(fac->NewNumber(0x7fffffff))->Is(T.UnsignedSmall));
+      CHECK(!T.NewConstant(fac->NewNumber(0x7FFFFFFF))->Is(T.UnsignedSmall));
       CHECK(!T.NewConstant(fac->NewNumber(-0x40000001))->Is(T.SignedSmall));
-      CHECK(!T.NewConstant(fac->NewNumber(-0x7fffffff - 1))->Is(T.SignedSmall));
+      CHECK(!T.NewConstant(fac->NewNumber(-0x7FFFFFFF - 1))->Is(T.SignedSmall));
     } else {
       CHECK(SmiValuesAre32Bits());
       CHECK(T.NewConstant(fac->NewNumber(0x40000000))->Is(T.UnsignedSmall));
-      CHECK(T.NewConstant(fac->NewNumber(0x7fffffff))->Is(T.UnsignedSmall));
+      CHECK(T.NewConstant(fac->NewNumber(0x7FFFFFFF))->Is(T.UnsignedSmall));
       CHECK(T.NewConstant(fac->NewNumber(-0x40000001))->Is(T.SignedSmall));
-      CHECK(T.NewConstant(fac->NewNumber(-0x7fffffff - 1))->Is(T.SignedSmall));
+      CHECK(T.NewConstant(fac->NewNumber(-0x7FFFFFFF - 1))->Is(T.SignedSmall));
     }
     CHECK(T.NewConstant(fac->NewNumber(0x80000000u))->Is(T.Unsigned32));
     CHECK(!T.NewConstant(fac->NewNumber(0x80000000u))->Is(T.Unsigned31));
-    CHECK(T.NewConstant(fac->NewNumber(0xffffffffu))->Is(T.Unsigned32));
-    CHECK(!T.NewConstant(fac->NewNumber(0xffffffffu))->Is(T.Unsigned31));
-    CHECK(T.NewConstant(fac->NewNumber(0xffffffffu + 1.0))->Is(T.PlainNumber));
-    CHECK(!T.NewConstant(fac->NewNumber(0xffffffffu + 1.0))->Is(T.Integral32));
-    CHECK(T.NewConstant(fac->NewNumber(-0x7fffffff - 2.0))->Is(T.PlainNumber));
-    CHECK(!T.NewConstant(fac->NewNumber(-0x7fffffff - 2.0))->Is(T.Integral32));
+    CHECK(T.NewConstant(fac->NewNumber(0xFFFFFFFFu))->Is(T.Unsigned32));
+    CHECK(!T.NewConstant(fac->NewNumber(0xFFFFFFFFu))->Is(T.Unsigned31));
+    CHECK(T.NewConstant(fac->NewNumber(0xFFFFFFFFu + 1.0))->Is(T.PlainNumber));
+    CHECK(!T.NewConstant(fac->NewNumber(0xFFFFFFFFu + 1.0))->Is(T.Integral32));
+    CHECK(T.NewConstant(fac->NewNumber(-0x7FFFFFFF - 2.0))->Is(T.PlainNumber));
+    CHECK(!T.NewConstant(fac->NewNumber(-0x7FFFFFFF - 2.0))->Is(T.Integral32));
     CHECK(T.NewConstant(fac->NewNumber(0.1))->Is(T.PlainNumber));
     CHECK(!T.NewConstant(fac->NewNumber(0.1))->Is(T.Integral32));
     CHECK(T.NewConstant(fac->NewNumber(-10.1))->Is(T.PlainNumber));
@@ -420,7 +413,7 @@
     // T->Is(Range(T->Min(), T->Max())).
     for (TypeIterator it = T.types.begin(); it != T.types.end(); ++it) {
       Type* type = *it;
-      CHECK(!type->Is(T.Integer) || !type->IsInhabited() ||
+      CHECK(!type->Is(T.Integer) || type->IsNone() ||
             type->Is(T.Range(type->Min(), type->Max())));
     }
   }
@@ -549,7 +542,7 @@
               (type1->IsRange() && type2->IsRange()) ||
               (type1->IsOtherNumberConstant() &&
                type2->IsOtherNumberConstant()) ||
-              !type1->IsInhabited());
+              type1->IsNone());
       }
     }
   }
@@ -673,7 +666,7 @@
     // T->Maybe(Any) iff T inhabited
     for (TypeIterator it = T.types.begin(); it != T.types.end(); ++it) {
       Type* type = *it;
-      CHECK(type->Maybe(T.Any) == type->IsInhabited());
+      CHECK(type->Maybe(T.Any) == !type->IsNone());
     }
 
     // T->Maybe(None) never
@@ -685,7 +678,7 @@
     // Reflexivity upto Inhabitation: T->Maybe(T) iff T inhabited
     for (TypeIterator it = T.types.begin(); it != T.types.end(); ++it) {
       Type* type = *it;
-      CHECK(type->Maybe(type) == type->IsInhabited());
+      CHECK(type->Maybe(type) == !type->IsNone());
     }
 
     // Symmetry: T1->Maybe(T2) iff T2->Maybe(T1)
@@ -702,8 +695,7 @@
       for (TypeIterator it2 = T.types.begin(); it2 != T.types.end(); ++it2) {
         Type* type1 = *it1;
         Type* type2 = *it2;
-        CHECK(!type1->Maybe(type2) ||
-              (type1->IsInhabited() && type2->IsInhabited()));
+        CHECK(!type1->Maybe(type2) || (!type1->IsNone() && !type2->IsNone()));
       }
     }
 
@@ -713,7 +705,7 @@
         Type* type1 = *it1;
         Type* type2 = *it2;
         Type* intersect12 = T.Intersect(type1, type2);
-        CHECK(!type1->Maybe(type2) || intersect12->IsInhabited());
+        CHECK(!type1->Maybe(type2) || !intersect12->IsNone());
       }
     }
 
@@ -722,8 +714,7 @@
       for (TypeIterator it2 = T.types.begin(); it2 != T.types.end(); ++it2) {
         Type* type1 = *it1;
         Type* type2 = *it2;
-        CHECK(!(type1->Is(type2) && type1->IsInhabited()) ||
-              type1->Maybe(type2));
+        CHECK(!(type1->Is(type2) && !type1->IsNone()) || type1->Maybe(type2));
       }
     }
 
diff --git a/src/v8/test/cctest/test-unboxed-doubles.cc b/src/v8/test/cctest/test-unboxed-doubles.cc
index 42b3e35..0245bf9 100644
--- a/src/v8/test/cctest/test-unboxed-doubles.cc
+++ b/src/v8/test/cctest/test-unboxed-doubles.cc
@@ -118,7 +118,7 @@
     Descriptor d;
     if (kind == PROP_ACCESSOR_INFO) {
       Handle<AccessorInfo> info =
-          Accessors::MakeAccessor(isolate, name, nullptr, nullptr, NONE);
+          Accessors::MakeAccessor(isolate, name, nullptr, nullptr);
       d = Descriptor::AccessorConstant(name, info, NONE);
 
     } else {
@@ -227,7 +227,7 @@
     CHECK_NE(LayoutDescriptor::FastPointerLayout(), *layout_descriptor);
     CHECK(layout_descriptor->IsSlowLayout());
     CHECK(!layout_descriptor->IsFastPointerLayout());
-    CHECK(layout_descriptor->capacity() > kSmiValueSize);
+    CHECK_GT(layout_descriptor->capacity(), kSmiValueSize);
 
     CHECK(!layout_descriptor->IsTagged(0));
     CHECK(!layout_descriptor->IsTagged(kPropsCount - 1));
@@ -307,7 +307,7 @@
       int sequence_length;
       CHECK_EQ(tagged,
                layout_desc->IsTagged(i, max_sequence_length, &sequence_length));
-      CHECK(sequence_length > 0);
+      CHECK_GT(sequence_length, 0);
 
       CHECK_EQ(expected_sequence_length, sequence_length);
     }
@@ -328,7 +328,7 @@
     for (int i = 0; i < kNumberOfBits; i++) {
       CHECK_EQ(true,
                layout_desc->IsTagged(i, max_sequence_length, &sequence_length));
-      CHECK(sequence_length > 0);
+      CHECK_GT(sequence_length, 0);
       CHECK_EQ(max_sequence_length, sequence_length);
     }
   }
@@ -437,7 +437,7 @@
       bit_flip_positions[i] = cur;
       cur = (cur + 1) * 2;
     }
-    CHECK(cur < 10000);
+    CHECK_LT(cur, 10000);
     bit_flip_positions[kMaxNumberOfDescriptors] = 10000;
     TestLayoutDescriptorQueries(kMaxNumberOfDescriptors, bit_flip_positions,
                                 max_sequence_length);
@@ -450,7 +450,7 @@
       bit_flip_positions[i] = cur;
       cur = (cur + 1) * 2;
     }
-    CHECK(cur < 10000);
+    CHECK_LT(cur, 10000);
     bit_flip_positions[kMaxNumberOfDescriptors] = 10000;
     TestLayoutDescriptorQueries(kMaxNumberOfDescriptors, bit_flip_positions,
                                 max_sequence_length);
@@ -642,7 +642,7 @@
     Descriptor d;
     if (kind == PROP_ACCESSOR_INFO) {
       Handle<AccessorInfo> info =
-          Accessors::MakeAccessor(isolate, name, nullptr, nullptr, NONE);
+          Accessors::MakeAccessor(isolate, name, nullptr, nullptr);
       d = Descriptor::AccessorConstant(name, info, NONE);
 
     } else {
@@ -1235,8 +1235,8 @@
     CHECK_EQ(expected_tagged, helper.IsTagged(index.offset()));
     CHECK_EQ(expected_tagged, helper.IsTagged(index.offset(), instance_size,
                                               &end_of_region_offset));
-    CHECK(end_of_region_offset > 0);
-    CHECK(end_of_region_offset % kPointerSize == 0);
+    CHECK_GT(end_of_region_offset, 0);
+    CHECK_EQ(end_of_region_offset % kPointerSize, 0);
     CHECK(end_of_region_offset <= instance_size);
 
     for (int offset = index.offset(); offset < end_of_region_offset;
@@ -1519,7 +1519,7 @@
   // barrier.
   JSObject::MigrateToMap(obj, new_map);
 
-  uint64_t boom_value = UINT64_C(0xbaad0176a37c28e1);
+  uint64_t boom_value = UINT64_C(0xBAAD0176A37C28E1);
 
   FieldIndex double_field_index =
       FieldIndex::ForDescriptor(*new_map, double_descriptor);
diff --git a/src/v8/test/cctest/test-usecounters.cc b/src/v8/test/cctest/test-usecounters.cc
index c300361..5e37991 100644
--- a/src/v8/test/cctest/test-usecounters.cc
+++ b/src/v8/test/cctest/test-usecounters.cc
@@ -10,70 +10,13 @@
 namespace internal {
 namespace test_usecounters {
 
-int* global_use_counts = NULL;
+int* global_use_counts = nullptr;
 
 void MockUseCounterCallback(v8::Isolate* isolate,
                             v8::Isolate::UseCounterFeature feature) {
   ++global_use_counts[feature];
 }
 
-TEST(DefineGetterSetterThrowUseCount) {
-  i::FLAG_harmony_strict_legacy_accessor_builtins = false;
-  v8::Isolate* isolate = CcTest::isolate();
-  v8::HandleScope scope(isolate);
-  LocalContext env;
-  int use_counts[v8::Isolate::kUseCounterFeatureCount] = {};
-  global_use_counts = use_counts;
-  CcTest::isolate()->SetUseCounterCallback(MockUseCounterCallback);
-
-  // __defineGetter__ and __defineSetter__ do not increment
-  // kDefineGetterOrSetterWouldThrow on success
-  CompileRun(
-      "var a = {};"
-      "Object.defineProperty(a, 'b', { value: 0, configurable: true });"
-      "a.__defineGetter__('b', ()=>{});");
-  CHECK_EQ(0, use_counts[v8::Isolate::kDefineGetterOrSetterWouldThrow]);
-  CompileRun(
-      "var a = {};"
-      "Object.defineProperty(a, 'b', { value: 0, configurable: true });"
-      "a.__defineSetter__('b', ()=>{});");
-  CHECK_EQ(0, use_counts[v8::Isolate::kDefineGetterOrSetterWouldThrow]);
-
-  // __defineGetter__ and __defineSetter__ do not increment
-  // kDefineGetterOrSetterWouldThrow on other errors
-  v8::Local<v8::Value> resultProxyThrow = CompileRun(
-      "var exception;"
-      "try {"
-      "var a = new Proxy({}, { defineProperty: ()=>{throw new Error;} });"
-      "a.__defineGetter__('b', ()=>{});"
-      "} catch (e) { exception = e; }"
-      "exception");
-  CHECK_EQ(0, use_counts[v8::Isolate::kDefineGetterOrSetterWouldThrow]);
-  CHECK(resultProxyThrow->IsObject());
-  resultProxyThrow = CompileRun(
-      "var exception;"
-      "try {"
-      "var a = new Proxy({}, { defineProperty: ()=>{throw new Error;} });"
-      "a.__defineSetter__('b', ()=>{});"
-      "} catch (e) { exception = e; }"
-      "exception");
-  CHECK_EQ(0, use_counts[v8::Isolate::kDefineGetterOrSetterWouldThrow]);
-  CHECK(resultProxyThrow->IsObject());
-
-  // __defineGetter__ and __defineSetter__ increment
-  // kDefineGetterOrSetterWouldThrow when they would throw per spec (B.2.2.2)
-  CompileRun(
-      "var a = {};"
-      "Object.defineProperty(a, 'b', { value: 0, configurable: false });"
-      "a.__defineGetter__('b', ()=>{});");
-  CHECK_EQ(1, use_counts[v8::Isolate::kDefineGetterOrSetterWouldThrow]);
-  CompileRun(
-      "var a = {};"
-      "Object.defineProperty(a, 'b', { value: 0, configurable: false });"
-      "a.__defineSetter__('b', ()=>{});");
-  CHECK_EQ(2, use_counts[v8::Isolate::kDefineGetterOrSetterWouldThrow]);
-}
-
 TEST(AssigmentExpressionLHSIsCall) {
   v8::Isolate* isolate = CcTest::isolate();
   v8::HandleScope scope(isolate);
@@ -117,31 +60,6 @@
   use_counts[v8::Isolate::kAssigmentExpressionLHSIsCallInStrict] = 0;
 }
 
-TEST(LabeledExpressionStatement) {
-  v8::Isolate* isolate = CcTest::isolate();
-  v8::HandleScope scope(isolate);
-  LocalContext env;
-  int use_counts[v8::Isolate::kUseCounterFeatureCount] = {};
-  global_use_counts = use_counts;
-  CcTest::isolate()->SetUseCounterCallback(MockUseCounterCallback);
-
-  CompileRun("typeof a");
-  CHECK_EQ(0, use_counts[v8::Isolate::kLabeledExpressionStatement]);
-
-  CompileRun("foo: null");
-  CHECK_EQ(1, use_counts[v8::Isolate::kLabeledExpressionStatement]);
-
-  CompileRun("foo: bar: baz: undefined");
-  CHECK_EQ(2, use_counts[v8::Isolate::kLabeledExpressionStatement]);
-
-  CompileRun(
-      "foo: if (false);"
-      "bar: { }"
-      "baz: switch (false) { }"
-      "bat: do { } while (false);");
-  CHECK_EQ(2, use_counts[v8::Isolate::kLabeledExpressionStatement]);
-}
-
 }  // namespace test_usecounters
 }  // namespace internal
 }  // namespace v8
diff --git a/src/v8/test/cctest/test-utils-arm64.cc b/src/v8/test/cctest/test-utils-arm64.cc
index 5abe0e4..e8bc58f 100644
--- a/src/v8/test/cctest/test-utils-arm64.cc
+++ b/src/v8/test/cctest/test-utils-arm64.cc
@@ -114,7 +114,7 @@
   // Retrieve the corresponding X register so we can check that the upper part
   // was properly cleared.
   int64_t result_x = core->xreg(reg.code());
-  if ((result_x & 0xffffffff00000000L) != 0) {
+  if ((result_x & 0xFFFFFFFF00000000L) != 0) {
     printf("Expected 0x%08" PRIx32 "\t Found 0x%016" PRIx64 "\n",
            expected, result_x);
     return false;
@@ -146,7 +146,7 @@
   // Retrieve the corresponding D register so we can check that the upper part
   // was properly cleared.
   uint64_t result_64 = core->dreg_bits(fpreg.code());
-  if ((result_64 & 0xffffffff00000000L) != 0) {
+  if ((result_64 & 0xFFFFFFFF00000000L) != 0) {
     printf("Expected 0x%08" PRIx32 " (%f)\t Found 0x%016" PRIx64 "\n",
            bit_cast<uint32_t>(expected), expected, result_64);
     return false;
@@ -193,8 +193,8 @@
 
 
 bool EqualNzcv(uint32_t expected, uint32_t result) {
-  CHECK((expected & ~NZCVFlag) == 0);
-  CHECK((result & ~NZCVFlag) == 0);
+  CHECK_EQ(expected & ~NZCVFlag, 0);
+  CHECK_EQ(result & ~NZCVFlag, 0);
   if (result != expected) {
     printf("Expected: %c%c%c%c\t Found: %c%c%c%c\n",
         FlagN(expected), FlagZ(expected), FlagC(expected), FlagV(expected),
@@ -451,3 +451,5 @@
 
 }  // namespace internal
 }  // namespace v8
+
+#undef __
diff --git a/src/v8/test/cctest/test-utils-arm64.h b/src/v8/test/cctest/test-utils-arm64.h
index f629a17..78b266c 100644
--- a/src/v8/test/cctest/test-utils-arm64.h
+++ b/src/v8/test/cctest/test-utils-arm64.h
@@ -112,7 +112,7 @@
   // Flags accessors.
   inline uint32_t flags_nzcv() const {
     CHECK(IsComplete());
-    CHECK((dump_.flags_ & ~Flags_mask) == 0);
+    CHECK_EQ(dump_.flags_ & ~Flags_mask, 0);
     return dump_.flags_ & Flags_mask;
   }
 
@@ -129,7 +129,7 @@
   // ::Dump method, or a failure in the simulator.
   bool RegAliasesMatch(unsigned code) const {
     CHECK(IsComplete());
-    CHECK(code < kNumberOfRegisters);
+    CHECK_LT(code, kNumberOfRegisters);
     return ((dump_.x_[code] & kWRegMask) == dump_.w_[code]);
   }
 
@@ -142,7 +142,7 @@
   // As RegAliasesMatch, but for floating-point registers.
   bool FPRegAliasesMatch(unsigned code) const {
     CHECK(IsComplete());
-    CHECK(code < kNumberOfVRegisters);
+    CHECK_LT(code, kNumberOfVRegisters);
     return (dump_.d_[code] & kSRegMask) == dump_.s_[code];
   }
 
@@ -225,7 +225,7 @@
 // (such as the push and pop tests), but where certain registers must be
 // avoided as they are used for other purposes.
 //
-// Any of w, x, or r can be NULL if they are not required.
+// Any of w, x, or r can be nullptr if they are not required.
 //
 // The return value is a RegList indicating which registers were allocated.
 RegList PopulateRegisterArray(Register* w, Register* x, Register* r,
@@ -244,7 +244,7 @@
 // top word anyway, so clobbering the full X registers should make tests more
 // rigorous.
 void Clobber(MacroAssembler* masm, RegList reg_list,
-             uint64_t const value = 0xfedcba9876543210UL);
+             uint64_t const value = 0xFEDCBA9876543210UL);
 
 // As Clobber, but for FP registers.
 void ClobberFP(MacroAssembler* masm, RegList reg_list,
diff --git a/src/v8/test/cctest/test-utils.cc b/src/v8/test/cctest/test-utils.cc
index de2b162..c1c1587 100644
--- a/src/v8/test/cctest/test-utils.cc
+++ b/src/v8/test/cctest/test-utils.cc
@@ -164,7 +164,7 @@
       printf("diff at offset %d (%p): is %d, should be %d\n", i,
              reinterpret_cast<void*>(area1 + i), area1[i], area2[i]);
     }
-    CHECK(false);
+    FATAL("memmove error");
   }
 }
 
@@ -197,7 +197,7 @@
   const int kSequentialSize = 1000;
   const int kBlockSize = 7;
   for (int loop = 0; loop < kLoops; loop++) {
-    Vector<int> block = collector.AddBlock(7, 0xbadcafe);
+    Vector<int> block = collector.AddBlock(7, 0xBADCAFE);
     for (int i = 0; i < kSequentialSize; i++) {
       collector.Add(i);
     }
@@ -212,7 +212,7 @@
     for (int j = 0; j < kBlockSize - 1; j++) {
       CHECK_EQ(j * 7, result[offset + j]);
     }
-    CHECK_EQ(0xbadcafe, result[offset + kBlockSize - 1]);
+    CHECK_EQ(0xBADCAFE, result[offset + kBlockSize - 1]);
     for (int j = 0; j < kSequentialSize; j++) {
       CHECK_EQ(j, result[offset + kBlockSize + j]);
     }
diff --git a/src/v8/test/cctest/test-version.cc b/src/v8/test/cctest/test-version.cc
index 3816620..301fe58 100644
--- a/src/v8/test/cctest/test-version.cc
+++ b/src/v8/test/cctest/test-version.cc
@@ -35,24 +35,25 @@
 namespace internal {
 
 void SetVersion(int major, int minor, int build, int patch,
-                bool candidate, const char* soname) {
+                const char* embedder, bool candidate, const char* soname) {
   Version::major_ = major;
   Version::minor_ = minor;
   Version::build_ = build;
   Version::patch_ = patch;
+  Version::embedder_ = embedder;
   Version::candidate_ = candidate;
   Version::soname_ = soname;
 }
 
-static void CheckVersion(int major, int minor, int build,
-                         int patch, bool candidate,
+static void CheckVersion(int major, int minor, int build, int patch,
+                         const char* embedder, bool candidate,
                          const char* expected_version_string,
                          const char* expected_generic_soname) {
   static v8::internal::EmbeddedVector<char, 128> version_str;
   static v8::internal::EmbeddedVector<char, 128> soname_str;
 
   // Test version without specific SONAME.
-  SetVersion(major, minor, build, patch, candidate, "");
+  SetVersion(major, minor, build, patch, embedder, candidate, "");
   Version::GetString(version_str);
   CHECK_EQ(0, strcmp(expected_version_string, version_str.start()));
   Version::GetSONAME(soname_str);
@@ -60,7 +61,7 @@
 
   // Test version with specific SONAME.
   const char* soname = "libv8.so.1";
-  SetVersion(major, minor, build, patch, candidate, soname);
+  SetVersion(major, minor, build, patch, embedder, candidate, soname);
   Version::GetString(version_str);
   CHECK_EQ(0, strcmp(expected_version_string, version_str.start()));
   Version::GetSONAME(soname_str);
@@ -69,18 +70,26 @@
 
 
 TEST(VersionString) {
-  CheckVersion(0, 0, 0, 0, false, "0.0.0", "libv8-0.0.0.so");
-  CheckVersion(0, 0, 0, 0, true,
-               "0.0.0 (candidate)", "libv8-0.0.0-candidate.so");
-  CheckVersion(1, 0, 0, 0, false, "1.0.0", "libv8-1.0.0.so");
-  CheckVersion(1, 0, 0, 0, true,
-               "1.0.0 (candidate)", "libv8-1.0.0-candidate.so");
-  CheckVersion(1, 0, 0, 1, false, "1.0.0.1", "libv8-1.0.0.1.so");
-  CheckVersion(1, 0, 0, 1, true,
-               "1.0.0.1 (candidate)", "libv8-1.0.0.1-candidate.so");
-  CheckVersion(2, 5, 10, 7, false, "2.5.10.7", "libv8-2.5.10.7.so");
-  CheckVersion(2, 5, 10, 7, true,
-               "2.5.10.7 (candidate)", "libv8-2.5.10.7-candidate.so");
+  CheckVersion(0, 0, 0, 0, "", false, "0.0.0", "libv8-0.0.0.so");
+  CheckVersion(0, 0, 0, 0, "", true, "0.0.0 (candidate)",
+               "libv8-0.0.0-candidate.so");
+  CheckVersion(1, 0, 0, 0, "", false, "1.0.0", "libv8-1.0.0.so");
+  CheckVersion(1, 0, 0, 0, "", true, "1.0.0 (candidate)",
+               "libv8-1.0.0-candidate.so");
+  CheckVersion(1, 0, 0, 1, "", false, "1.0.0.1", "libv8-1.0.0.1.so");
+  CheckVersion(1, 0, 0, 1, "", true, "1.0.0.1 (candidate)",
+               "libv8-1.0.0.1-candidate.so");
+  CheckVersion(2, 5, 10, 7, "", false, "2.5.10.7", "libv8-2.5.10.7.so");
+  CheckVersion(2, 5, 10, 7, "", true, "2.5.10.7 (candidate)",
+               "libv8-2.5.10.7-candidate.so");
+  CheckVersion(6, 0, 287, 0, "-emb.1", false, "6.0.287-emb.1",
+               "libv8-6.0.287-emb.1.so");
+  CheckVersion(6, 0, 287, 0, "-emb.1", true, "6.0.287-emb.1 (candidate)",
+               "libv8-6.0.287-emb.1-candidate.so");
+  CheckVersion(6, 0, 287, 53, "-emb.1", false, "6.0.287.53-emb.1",
+               "libv8-6.0.287.53-emb.1.so");
+  CheckVersion(6, 0, 287, 53, "-emb.1", true, "6.0.287.53-emb.1 (candidate)",
+               "libv8-6.0.287.53-emb.1-candidate.so");
 }
 
 }  // namespace internal
diff --git a/src/v8/test/cctest/test-weakmaps.cc b/src/v8/test/cctest/test-weakmaps.cc
index 7467372..546db6a 100644
--- a/src/v8/test/cctest/test-weakmaps.cc
+++ b/src/v8/test/cctest/test-weakmaps.cc
@@ -27,18 +27,10 @@
 
 #include <utility>
 
-#include "src/v8.h"
-
 #include "src/factory.h"
 #include "src/global-handles.h"
 #include "src/isolate.h"
-// FIXME(mstarzinger, marja): This is weird, but required because of the missing
-// (disallowed) include: src/factory.h -> src/objects-inl.h
 #include "src/objects-inl.h"
-// FIXME(mstarzinger, marja): This is weird, but required because of the missing
-// (disallowed) include: src/feedback-vector.h ->
-// src/feedback-vector-inl.h
-#include "src/feedback-vector-inl.h"
 #include "test/cctest/cctest.h"
 #include "test/cctest/heap/heap-utils.h"
 
@@ -50,18 +42,6 @@
   return reinterpret_cast<Isolate*>((*context)->GetIsolate());
 }
 
-
-static Handle<JSWeakMap> AllocateJSWeakMap(Isolate* isolate) {
-  Handle<JSWeakMap> weakmap = isolate->factory()->NewJSWeakMap();
-  // Do not leak handles for the hash table, it would make entries strong.
-  {
-    HandleScope scope(isolate);
-    Handle<ObjectHashTable> table = ObjectHashTable::New(isolate, 1);
-    weakmap->set_table(*table);
-  }
-  return weakmap;
-}
-
 static int NumberOfWeakCalls = 0;
 static void WeakPointerCallback(const v8::WeakCallbackInfo<void>& data) {
   std::pair<v8::Persistent<v8::Value>*, int>* p =
@@ -79,7 +59,7 @@
   Isolate* isolate = GetIsolateFrom(&context);
   Factory* factory = isolate->factory();
   HandleScope scope(isolate);
-  Handle<JSWeakMap> weakmap = AllocateJSWeakMap(isolate);
+  Handle<JSWeakMap> weakmap = isolate->factory()->NewJSWeakMap();
   GlobalHandles* global_handles = isolate->global_handles();
 
   // Keep global reference to the key.
@@ -132,7 +112,7 @@
   Isolate* isolate = GetIsolateFrom(&context);
   Factory* factory = isolate->factory();
   HandleScope scope(isolate);
-  Handle<JSWeakMap> weakmap = AllocateJSWeakMap(isolate);
+  Handle<JSWeakMap> weakmap = isolate->factory()->NewJSWeakMap();
 
   // Check initial capacity.
   CHECK_EQ(32, ObjectHashTable::cast(weakmap->table())->Capacity());
@@ -176,10 +156,10 @@
   Factory* factory = isolate->factory();
   Heap* heap = isolate->heap();
   HandleScope scope(isolate);
-  Handle<JSFunction> function = factory->NewFunction(
-      factory->function_string());
+  Handle<JSFunction> function =
+      factory->NewFunctionForTest(factory->function_string());
   Handle<JSObject> key = factory->NewJSObject(function);
-  Handle<JSWeakMap> weakmap = AllocateJSWeakMap(isolate);
+  Handle<JSWeakMap> weakmap = isolate->factory()->NewJSWeakMap();
 
   // Start second old-space page so that values land on evacuation candidate.
   Page* first_page = heap->old_space()->anchor()->next_page();
@@ -192,7 +172,7 @@
       Handle<JSObject> object = factory->NewJSObject(function, TENURED);
       CHECK(!heap->InNewSpace(*object));
       CHECK(!first_page->Contains(object->address()));
-      int32_t hash = object->GetOrCreateHash(isolate)->value();
+      int32_t hash = key->GetOrCreateHash(isolate)->value();
       JSWeakCollection::Set(weakmap, key, object, hash);
     }
   }
@@ -217,8 +197,8 @@
   Factory* factory = isolate->factory();
   Heap* heap = isolate->heap();
   HandleScope scope(isolate);
-  Handle<JSFunction> function = factory->NewFunction(
-      factory->function_string());
+  Handle<JSFunction> function =
+      factory->NewFunctionForTest(factory->function_string());
 
   // Start second old-space page so that keys land on evacuation candidate.
   Page* first_page = heap->old_space()->anchor()->next_page();
@@ -231,7 +211,7 @@
     CHECK(!heap->InNewSpace(*keys[i]));
     CHECK(!first_page->Contains(keys[i]->address()));
   }
-  Handle<JSWeakMap> weakmap = AllocateJSWeakMap(isolate);
+  Handle<JSWeakMap> weakmap = isolate->factory()->NewJSWeakMap();
   for (int i = 0; i < 32; i++) {
     Handle<Smi> smi(Smi::FromInt(i), isolate);
     int32_t hash = keys[i]->GetOrCreateHash(isolate)->value();
@@ -255,7 +235,7 @@
   Heap* heap = isolate->heap();
   {
     HandleScope scope(isolate);
-    AllocateJSWeakMap(isolate);
+    isolate->factory()->NewJSWeakMap();
     heap::SimulateIncrementalMarking(heap);
   }
   // The weak map is marked black here but leaving the handle scope will make
diff --git a/src/v8/test/cctest/test-weaksets.cc b/src/v8/test/cctest/test-weaksets.cc
index 1168213..a2d4ff4 100644
--- a/src/v8/test/cctest/test-weaksets.cc
+++ b/src/v8/test/cctest/test-weaksets.cc
@@ -27,18 +27,10 @@
 
 #include <utility>
 
-#include "src/v8.h"
-
 #include "src/factory.h"
 #include "src/global-handles.h"
 #include "src/isolate.h"
-// FIXME(mstarzinger, marja): This is weird, but required because of the missing
-// (disallowed) include: src/factory.h -> src/objects-inl.h
 #include "src/objects-inl.h"
-// FIXME(mstarzinger, marja): This is weird, but required because of the missing
-// (disallowed) include: src/feedback-vector.h ->
-// src/feedback-vector-inl.h
-#include "src/feedback-vector-inl.h"
 #include "test/cctest/cctest.h"
 #include "test/cctest/heap/heap-utils.h"
 
@@ -175,8 +167,8 @@
   Factory* factory = isolate->factory();
   Heap* heap = isolate->heap();
   HandleScope scope(isolate);
-  Handle<JSFunction> function = factory->NewFunction(
-      factory->function_string());
+  Handle<JSFunction> function =
+      factory->NewFunctionForTest(factory->function_string());
   Handle<JSObject> key = factory->NewJSObject(function);
   Handle<JSWeakSet> weakset = AllocateJSWeakSet(isolate);
 
@@ -216,8 +208,8 @@
   Factory* factory = isolate->factory();
   Heap* heap = isolate->heap();
   HandleScope scope(isolate);
-  Handle<JSFunction> function = factory->NewFunction(
-      factory->function_string());
+  Handle<JSFunction> function =
+      factory->NewFunctionForTest(factory->function_string());
 
   // Start second old-space page so that keys land on evacuation candidate.
   Page* first_page = heap->old_space()->anchor()->next_page();
diff --git a/src/v8/test/cctest/testcfg.py b/src/v8/test/cctest/testcfg.py
index 36db837..28d1ab2 100644
--- a/src/v8/test/cctest/testcfg.py
+++ b/src/v8/test/cctest/testcfg.py
@@ -28,46 +28,44 @@
 import os
 import shutil
 
-from testrunner.local import commands
+from testrunner.local import command
 from testrunner.local import testsuite
 from testrunner.local import utils
 from testrunner.objects import testcase
 
+SHELL = 'cctest'
 
-class CcTestSuite(testsuite.TestSuite):
 
-  def __init__(self, name, root):
-    super(CcTestSuite, self).__init__(name, root)
-    if utils.IsWindows():
-      build_dir = "build"
-    else:
-      build_dir = "out"
-
+class TestSuite(testsuite.TestSuite):
   def ListTests(self, context):
-    shell = os.path.abspath(os.path.join(context.shell_dir, self.shell()))
+    shell = os.path.abspath(os.path.join(context.shell_dir, SHELL))
     if utils.IsWindows():
       shell += ".exe"
-    output = commands.Execute(context.command_prefix +
-                              [shell, "--list"] +
-                              context.extra_flags)
+    cmd = command.Command(
+        cmd_prefix=context.command_prefix,
+        shell=shell,
+        args=["--list"] + context.extra_flags)
+    output = cmd.execute()
     if output.exit_code != 0:
+      print cmd
       print output.stdout
       print output.stderr
       return []
-    tests = []
-    for test_desc in output.stdout.strip().split():
-      test = testcase.TestCase(self, test_desc)
-      tests.append(test)
+    tests = map(self._create_test, output.stdout.strip().split())
     tests.sort(key=lambda t: t.path)
     return tests
 
-  def GetFlagsForTestCase(self, testcase, context):
-    testname = testcase.path.split(os.path.sep)[-1]
-    return (testcase.flags + [testcase.path] + context.mode_flags)
+  def _test_class(self):
+    return TestCase
 
-  def shell(self):
-    return "cctest"
+
+class TestCase(testcase.TestCase):
+  def get_shell(self):
+    return SHELL
+
+  def _get_files_params(self, ctx):
+    return [self.path]
 
 
 def GetSuite(name, root):
-  return CcTestSuite(name, root)
+  return TestSuite(name, root)
diff --git a/src/v8/test/cctest/trace-extension.cc b/src/v8/test/cctest/trace-extension.cc
index f0cc3cc..00f9946 100644
--- a/src/v8/test/cctest/trace-extension.cc
+++ b/src/v8/test/cctest/trace-extension.cc
@@ -67,10 +67,8 @@
                               .ToLocalChecked())
                  .FromJust()) {
     return v8::FunctionTemplate::New(isolate, TraceExtension::JSEntrySPLevel2);
-  } else {
-    CHECK(false);
-    return v8::Local<v8::FunctionTemplate>();
   }
+  UNREACHABLE();
 }
 
 
diff --git a/src/v8/test/cctest/unicode-helpers.h b/src/v8/test/cctest/unicode-helpers.h
index a09a8cb..ca75fb6 100644
--- a/src/v8/test/cctest/unicode-helpers.h
+++ b/src/v8/test/cctest/unicode-helpers.h
@@ -10,7 +10,7 @@
 static int Ucs2CharLength(unibrow::uchar c) {
   if (c == unibrow::Utf8::kIncomplete || c == unibrow::Utf8::kBufferEmpty) {
     return 0;
-  } else if (c < 0xffff) {
+  } else if (c < 0xFFFF) {
     return 1;
   } else {
     return 2;
@@ -19,12 +19,16 @@
 
 static int Utf8LengthHelper(const char* s) {
   unibrow::Utf8::Utf8IncrementalBuffer buffer(unibrow::Utf8::kBufferEmpty);
+  unibrow::Utf8::State state = unibrow::Utf8::State::kAccept;
+
   int length = 0;
-  for (; *s != '\0'; s++) {
-    unibrow::uchar tmp = unibrow::Utf8::ValueOfIncremental(*s, &buffer);
+  size_t i = 0;
+  while (s[i] != '\0') {
+    unibrow::uchar tmp =
+        unibrow::Utf8::ValueOfIncremental(s[i], &i, &state, &buffer);
     length += Ucs2CharLength(tmp);
   }
-  unibrow::uchar tmp = unibrow::Utf8::ValueOfIncrementalFinish(&buffer);
+  unibrow::uchar tmp = unibrow::Utf8::ValueOfIncrementalFinish(&state);
   length += Ucs2CharLength(tmp);
   return length;
 }
diff --git a/src/v8/test/cctest/wasm/test-c-wasm-entry.cc b/src/v8/test/cctest/wasm/test-c-wasm-entry.cc
index 4224e51..f5c09b5 100644
--- a/src/v8/test/cctest/wasm/test-c-wasm-entry.cc
+++ b/src/v8/test/cctest/wasm/test-c-wasm-entry.cc
@@ -30,7 +30,7 @@
  public:
   CWasmEntryArgTester(std::initializer_list<uint8_t> wasm_function_bytes,
                       std::function<ReturnType(Args...)> expected_fn)
-      : runner_(kExecuteCompiled),
+      : runner_(kExecuteTurbofan),
         isolate_(runner_.main_isolate()),
         expected_fn_(expected_fn),
         sig_(runner_.template CreateSig<ReturnType, Args...>()) {
@@ -62,10 +62,18 @@
     Handle<Object> buffer_obj(reinterpret_cast<Object*>(arg_buffer.data()),
                               isolate_);
     CHECK(!buffer_obj->IsHeapObject());
-    Handle<Object> call_args[]{wasm_code_, buffer_obj};
+    Handle<Object> call_args[]{
+        (FLAG_wasm_jit_to_native
+             ? Handle<Object>::cast(isolate_->factory()->NewForeign(
+                   wasm_code_.GetWasmCode()->instructions().start(), TENURED))
+             : Handle<Object>::cast(wasm_code_.GetCode())),
+        buffer_obj};
     static_assert(
         arraysize(call_args) == compiler::CWasmEntryParameters::kNumParameters,
         "adapt this test");
+    if (FLAG_wasm_jit_to_native) {
+      wasm_code_.GetWasmCode()->owner()->SetExecutable(true);
+    }
     MaybeHandle<Object> return_obj = Execution::Call(
         isolate_, c_wasm_entry_fn_, receiver, arraysize(call_args), call_args);
     CHECK(!return_obj.is_null());
@@ -88,7 +96,7 @@
   std::function<ReturnType(Args...)> expected_fn_;
   FunctionSig* sig_;
   Handle<JSFunction> c_wasm_entry_fn_;
-  Handle<Code> wasm_code_;
+  WasmCodeWrapper wasm_code_;
 };
 
 }  // namespace
@@ -100,8 +108,7 @@
        WASM_I32_ADD(WASM_I32_MUL(WASM_I32V_1(2), WASM_GET_LOCAL(0)), WASM_ONE)},
       [](int32_t a) { return 2 * a + 1; });
 
-  std::vector<int32_t> test_values = compiler::ValueHelper::int32_vector();
-  for (int32_t v : test_values) tester.CheckCall(v);
+  FOR_INT32_INPUTS(v) { tester.CheckCall(*v); }
 }
 
 // Pass int64_t, return double.
@@ -111,10 +118,7 @@
        WASM_F64_SCONVERT_I64(WASM_GET_LOCAL(0))},
       [](int64_t a) { return static_cast<double>(a); });
 
-  std::vector<int64_t> test_values_i64 = compiler::ValueHelper::int64_vector();
-  for (int64_t v : test_values_i64) {
-    tester.CheckCall(v);
-  }
+  FOR_INT64_INPUTS(v) { tester.CheckCall(*v); }
 }
 
 // Pass double, return int64_t.
@@ -124,9 +128,7 @@
        WASM_I64_SCONVERT_F64(WASM_GET_LOCAL(0))},
       [](double d) { return static_cast<int64_t>(d); });
 
-  for (int64_t i : compiler::ValueHelper::int64_vector()) {
-    tester.CheckCall(i);
-  }
+  FOR_INT64_INPUTS(i) { tester.CheckCall(*i); }
 }
 
 // Pass float, return double.
@@ -138,8 +140,7 @@
            WASM_F64(1))},
       [](float f) { return 2. * static_cast<double>(f) + 1.; });
 
-  std::vector<float> test_values = compiler::ValueHelper::float32_vector();
-  for (float f : test_values) tester.CheckCall(f);
+  FOR_FLOAT32_INPUTS(f) { tester.CheckCall(*f); }
 }
 
 // Pass two doubles, return double.
@@ -149,11 +150,8 @@
        WASM_F64_ADD(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1))},
       [](double a, double b) { return a + b; });
 
-  std::vector<double> test_values = compiler::ValueHelper::float64_vector();
-  for (double d1 : test_values) {
-    for (double d2 : test_values) {
-      tester.CheckCall(d1, d2);
-    }
+  FOR_FLOAT64_INPUTS(d1) {
+    FOR_FLOAT64_INPUTS(d2) { tester.CheckCall(*d1, *d2); }
   }
 }
 
@@ -176,10 +174,11 @@
         return 0. + a + b + c + d;
       });
 
-  std::vector<int32_t> test_values_i32 = compiler::ValueHelper::int32_vector();
-  std::vector<int64_t> test_values_i64 = compiler::ValueHelper::int64_vector();
-  std::vector<float> test_values_f32 = compiler::ValueHelper::float32_vector();
-  std::vector<double> test_values_f64 = compiler::ValueHelper::float64_vector();
+  Vector<const int32_t> test_values_i32 = compiler::ValueHelper::int32_vector();
+  Vector<const int64_t> test_values_i64 = compiler::ValueHelper::int64_vector();
+  Vector<const float> test_values_f32 = compiler::ValueHelper::float32_vector();
+  Vector<const double> test_values_f64 =
+      compiler::ValueHelper::float64_vector();
   size_t max_len =
       std::max(std::max(test_values_i32.size(), test_values_i64.size()),
                std::max(test_values_f32.size(), test_values_f64.size()));
diff --git a/src/v8/test/cctest/wasm/test-run-wasm-64.cc b/src/v8/test/cctest/wasm/test-run-wasm-64.cc
index c7bb737..3ded637 100644
--- a/src/v8/test/cctest/wasm/test-run-wasm-64.cc
+++ b/src/v8/test/cctest/wasm/test-run-wasm-64.cc
@@ -214,7 +214,7 @@
                WASM_I64_SHL(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1))));
   FOR_INT64_INPUTS(i) {
     FOR_INT64_INPUTS(j) {
-      int32_t expected = static_cast<int32_t>((*i) << (*j & 0x3f));
+      int32_t expected = static_cast<int32_t>((*i) << (*j & 0x3F));
       CHECK_EQ(expected, r.Call(*i, *j));
     }
   }
@@ -228,7 +228,7 @@
                WASM_I64_SHR(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1))));
   FOR_UINT64_INPUTS(i) {
     FOR_UINT64_INPUTS(j) {
-      int32_t expected = static_cast<int32_t>((*i) >> (*j & 0x3f));
+      int32_t expected = static_cast<int32_t>((*i) >> (*j & 0x3F));
       CHECK_EQ(expected, r.Call(*i, *j));
     }
   }
@@ -242,7 +242,7 @@
                WASM_I64_SAR(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1))));
   FOR_INT64_INPUTS(i) {
     FOR_INT64_INPUTS(j) {
-      int32_t expected = static_cast<int32_t>((*i) >> (*j & 0x3f));
+      int32_t expected = static_cast<int32_t>((*i) >> (*j & 0x3F));
       CHECK_EQ(expected, r.Call(*i, *j));
     }
   }
@@ -318,11 +318,11 @@
 
 WASM_EXEC_TEST(I64DivU_Byzero_Const) {
   REQUIRE(I64DivU);
-  for (uint64_t denom = 0xfffffffffffffffe; denom < 8; denom++) {
+  for (uint64_t denom = 0xFFFFFFFFFFFFFFFE; denom < 8; denom++) {
     WasmRunner<uint64_t, uint64_t> r(execution_mode);
     BUILD(r, WASM_I64_DIVU(WASM_GET_LOCAL(0), WASM_I64V_1(denom)));
 
-    for (uint64_t val = 0xfffffffffffffff0; val < 8; val++) {
+    for (uint64_t val = 0xFFFFFFFFFFFFFFF0; val < 8; val++) {
       if (denom == 0) {
         CHECK_TRAP64(r.Call(val));
       } else {
@@ -418,7 +418,7 @@
 
     FOR_UINT64_INPUTS(i) {
       FOR_UINT64_INPUTS(j) {
-        uint64_t expected = (*i) << (*j & 0x3f);
+        uint64_t expected = (*i) << (*j & 0x3F);
         CHECK_EQ(expected, r.Call(*i, *j));
       }
     }
@@ -453,7 +453,7 @@
 
     FOR_UINT64_INPUTS(i) {
       FOR_UINT64_INPUTS(j) {
-        uint64_t expected = (*i) >> (*j & 0x3f);
+        uint64_t expected = (*i) >> (*j & 0x3F);
         CHECK_EQ(expected, r.Call(*i, *j));
       }
     }
@@ -488,7 +488,7 @@
 
     FOR_INT64_INPUTS(i) {
       FOR_INT64_INPUTS(j) {
-        int64_t expected = (*i) >> (*j & 0x3f);
+        int64_t expected = (*i) >> (*j & 0x3F);
         CHECK_EQ(expected, r.Call(*i, *j));
       }
     }
@@ -632,11 +632,11 @@
   struct {
     int64_t expected;
     uint64_t input;
-  } values[] = {{64, 0xffffffffffffffff},
+  } values[] = {{64, 0xFFFFFFFFFFFFFFFF},
                 {0, 0x0000000000000000},
                 {2, 0x0000080000008000},
                 {26, 0x1123456782345678},
-                {38, 0xffedcba09edcba09}};
+                {38, 0xFFEDCBA09EDCBA09}};
 
   WasmRunner<int64_t, uint64_t> r(execution_mode);
   BUILD(r, WASM_I64_POPCNT(WASM_GET_LOCAL(0)));
@@ -658,81 +658,81 @@
     uint64_t input;
     uint32_t expected;
   } values[] = {{0x0, 0x0},
-                {0x1, 0x3f800000},
-                {0xffffffff, 0x4f800000},
-                {0x1b09788b, 0x4dd84bc4},
-                {0x4c5fce8, 0x4c98bf9d},
-                {0xcc0de5bf, 0x4f4c0de6},
+                {0x1, 0x3F800000},
+                {0xFFFFFFFF, 0x4F800000},
+                {0x1B09788B, 0x4DD84BC4},
+                {0x4C5FCE8, 0x4C98BF9D},
+                {0xCC0DE5BF, 0x4F4C0DE6},
                 {0x2, 0x40000000},
                 {0x3, 0x40400000},
                 {0x4, 0x40800000},
-                {0x5, 0x40a00000},
+                {0x5, 0x40A00000},
                 {0x8, 0x41000000},
                 {0x9, 0x41100000},
-                {0xffffffffffffffff, 0x5f800000},
-                {0xfffffffffffffffe, 0x5f800000},
-                {0xfffffffffffffffd, 0x5f800000},
+                {0xFFFFFFFFFFFFFFFF, 0x5F800000},
+                {0xFFFFFFFFFFFFFFFE, 0x5F800000},
+                {0xFFFFFFFFFFFFFFFD, 0x5F800000},
                 {0x0, 0x0},
-                {0x100000000, 0x4f800000},
-                {0xffffffff00000000, 0x5f800000},
-                {0x1b09788b00000000, 0x5dd84bc4},
-                {0x4c5fce800000000, 0x5c98bf9d},
-                {0xcc0de5bf00000000, 0x5f4c0de6},
+                {0x100000000, 0x4F800000},
+                {0xFFFFFFFF00000000, 0x5F800000},
+                {0x1B09788B00000000, 0x5DD84BC4},
+                {0x4C5FCE800000000, 0x5C98BF9D},
+                {0xCC0DE5BF00000000, 0x5F4C0DE6},
                 {0x200000000, 0x50000000},
                 {0x300000000, 0x50400000},
                 {0x400000000, 0x50800000},
-                {0x500000000, 0x50a00000},
+                {0x500000000, 0x50A00000},
                 {0x800000000, 0x51000000},
                 {0x900000000, 0x51100000},
-                {0x273a798e187937a3, 0x5e1ce9e6},
-                {0xece3af835495a16b, 0x5f6ce3b0},
-                {0xb668ecc11223344, 0x5d3668ed},
-                {0x9e, 0x431e0000},
+                {0x273A798E187937A3, 0x5E1CE9E6},
+                {0xECE3AF835495A16B, 0x5F6CE3B0},
+                {0xB668ECC11223344, 0x5D3668ED},
+                {0x9E, 0x431E0000},
                 {0x43, 0x42860000},
-                {0xaf73, 0x472f7300},
-                {0x116b, 0x458b5800},
-                {0x658ecc, 0x4acb1d98},
-                {0x2b3b4c, 0x4a2ced30},
-                {0x88776655, 0x4f087766},
-                {0x70000000, 0x4ee00000},
-                {0x7200000, 0x4ce40000},
-                {0x7fffffff, 0x4f000000},
-                {0x56123761, 0x4eac246f},
-                {0x7fffff00, 0x4efffffe},
-                {0x761c4761eeeeeeee, 0x5eec388f},
-                {0x80000000eeeeeeee, 0x5f000000},
-                {0x88888888dddddddd, 0x5f088889},
-                {0xa0000000dddddddd, 0x5f200000},
-                {0xddddddddaaaaaaaa, 0x5f5dddde},
-                {0xe0000000aaaaaaaa, 0x5f600000},
-                {0xeeeeeeeeeeeeeeee, 0x5f6eeeef},
-                {0xfffffffdeeeeeeee, 0x5f800000},
-                {0xf0000000dddddddd, 0x5f700000},
-                {0x7fffffdddddddd, 0x5b000000},
-                {0x3fffffaaaaaaaa, 0x5a7fffff},
-                {0x1fffffaaaaaaaa, 0x59fffffd},
-                {0xfffff, 0x497ffff0},
-                {0x7ffff, 0x48ffffe0},
-                {0x3ffff, 0x487fffc0},
-                {0x1ffff, 0x47ffff80},
-                {0xffff, 0x477fff00},
-                {0x7fff, 0x46fffe00},
-                {0x3fff, 0x467ffc00},
-                {0x1fff, 0x45fff800},
-                {0xfff, 0x457ff000},
-                {0x7ff, 0x44ffe000},
-                {0x3ff, 0x447fc000},
-                {0x1ff, 0x43ff8000},
-                {0x3fffffffffff, 0x56800000},
-                {0x1fffffffffff, 0x56000000},
-                {0xfffffffffff, 0x55800000},
-                {0x7ffffffffff, 0x55000000},
-                {0x3ffffffffff, 0x54800000},
-                {0x1ffffffffff, 0x54000000},
-                {0x8000008000000000, 0x5f000000},
-                {0x8000008000000001, 0x5f000001},
-                {0x8000000000000400, 0x5f000000},
-                {0x8000000000000401, 0x5f000000}};
+                {0xAF73, 0x472F7300},
+                {0x116B, 0x458B5800},
+                {0x658ECC, 0x4ACB1D98},
+                {0x2B3B4C, 0x4A2CED30},
+                {0x88776655, 0x4F087766},
+                {0x70000000, 0x4EE00000},
+                {0x7200000, 0x4CE40000},
+                {0x7FFFFFFF, 0x4F000000},
+                {0x56123761, 0x4EAC246F},
+                {0x7FFFFF00, 0x4EFFFFFE},
+                {0x761C4761EEEEEEEE, 0x5EEC388F},
+                {0x80000000EEEEEEEE, 0x5F000000},
+                {0x88888888DDDDDDDD, 0x5F088889},
+                {0xA0000000DDDDDDDD, 0x5F200000},
+                {0xDDDDDDDDAAAAAAAA, 0x5F5DDDDE},
+                {0xE0000000AAAAAAAA, 0x5F600000},
+                {0xEEEEEEEEEEEEEEEE, 0x5F6EEEEF},
+                {0xFFFFFFFDEEEEEEEE, 0x5F800000},
+                {0xF0000000DDDDDDDD, 0x5F700000},
+                {0x7FFFFFDDDDDDDD, 0x5B000000},
+                {0x3FFFFFAAAAAAAA, 0x5A7FFFFF},
+                {0x1FFFFFAAAAAAAA, 0x59FFFFFD},
+                {0xFFFFF, 0x497FFFF0},
+                {0x7FFFF, 0x48FFFFE0},
+                {0x3FFFF, 0x487FFFC0},
+                {0x1FFFF, 0x47FFFF80},
+                {0xFFFF, 0x477FFF00},
+                {0x7FFF, 0x46FFFE00},
+                {0x3FFF, 0x467FFC00},
+                {0x1FFF, 0x45FFF800},
+                {0xFFF, 0x457FF000},
+                {0x7FF, 0x44FFE000},
+                {0x3FF, 0x447FC000},
+                {0x1FF, 0x43FF8000},
+                {0x3FFFFFFFFFFF, 0x56800000},
+                {0x1FFFFFFFFFFF, 0x56000000},
+                {0xFFFFFFFFFFF, 0x55800000},
+                {0x7FFFFFFFFFF, 0x55000000},
+                {0x3FFFFFFFFFF, 0x54800000},
+                {0x1FFFFFFFFFF, 0x54000000},
+                {0x8000008000000000, 0x5F000000},
+                {0x8000008000000001, 0x5F000001},
+                {0x8000000000000400, 0x5F000000},
+                {0x8000000000000401, 0x5F000000}};
   WasmRunner<float, uint64_t> r(execution_mode);
   BUILD(r, WASM_F32_UCONVERT_I64(WASM_GET_LOCAL(0)));
   for (size_t i = 0; i < arraysize(values); i++) {
@@ -753,80 +753,80 @@
     uint64_t input;
     uint64_t expected;
   } values[] = {{0x0, 0x0},
-                {0x1, 0x3ff0000000000000},
-                {0xffffffff, 0x41efffffffe00000},
-                {0x1b09788b, 0x41bb09788b000000},
-                {0x4c5fce8, 0x419317f3a0000000},
-                {0xcc0de5bf, 0x41e981bcb7e00000},
+                {0x1, 0x3FF0000000000000},
+                {0xFFFFFFFF, 0x41EFFFFFFFE00000},
+                {0x1B09788B, 0x41BB09788B000000},
+                {0x4C5FCE8, 0x419317F3A0000000},
+                {0xCC0DE5BF, 0x41E981BCB7E00000},
                 {0x2, 0x4000000000000000},
                 {0x3, 0x4008000000000000},
                 {0x4, 0x4010000000000000},
                 {0x5, 0x4014000000000000},
                 {0x8, 0x4020000000000000},
                 {0x9, 0x4022000000000000},
-                {0xffffffffffffffff, 0x43f0000000000000},
-                {0xfffffffffffffffe, 0x43f0000000000000},
-                {0xfffffffffffffffd, 0x43f0000000000000},
-                {0x100000000, 0x41f0000000000000},
-                {0xffffffff00000000, 0x43efffffffe00000},
-                {0x1b09788b00000000, 0x43bb09788b000000},
-                {0x4c5fce800000000, 0x439317f3a0000000},
-                {0xcc0de5bf00000000, 0x43e981bcb7e00000},
+                {0xFFFFFFFFFFFFFFFF, 0x43F0000000000000},
+                {0xFFFFFFFFFFFFFFFE, 0x43F0000000000000},
+                {0xFFFFFFFFFFFFFFFD, 0x43F0000000000000},
+                {0x100000000, 0x41F0000000000000},
+                {0xFFFFFFFF00000000, 0x43EFFFFFFFE00000},
+                {0x1B09788B00000000, 0x43BB09788B000000},
+                {0x4C5FCE800000000, 0x439317F3A0000000},
+                {0xCC0DE5BF00000000, 0x43E981BCB7E00000},
                 {0x200000000, 0x4200000000000000},
                 {0x300000000, 0x4208000000000000},
                 {0x400000000, 0x4210000000000000},
                 {0x500000000, 0x4214000000000000},
                 {0x800000000, 0x4220000000000000},
                 {0x900000000, 0x4222000000000000},
-                {0x273a798e187937a3, 0x43c39d3cc70c3c9c},
-                {0xece3af835495a16b, 0x43ed9c75f06a92b4},
-                {0xb668ecc11223344, 0x43a6cd1d98224467},
-                {0x9e, 0x4063c00000000000},
-                {0x43, 0x4050c00000000000},
-                {0xaf73, 0x40e5ee6000000000},
-                {0x116b, 0x40b16b0000000000},
-                {0x658ecc, 0x415963b300000000},
-                {0x2b3b4c, 0x41459da600000000},
-                {0x88776655, 0x41e10eeccaa00000},
-                {0x70000000, 0x41dc000000000000},
-                {0x7200000, 0x419c800000000000},
-                {0x7fffffff, 0x41dfffffffc00000},
-                {0x56123761, 0x41d5848dd8400000},
-                {0x7fffff00, 0x41dfffffc0000000},
-                {0x761c4761eeeeeeee, 0x43dd8711d87bbbbc},
-                {0x80000000eeeeeeee, 0x43e00000001dddde},
-                {0x88888888dddddddd, 0x43e11111111bbbbc},
-                {0xa0000000dddddddd, 0x43e40000001bbbbc},
-                {0xddddddddaaaaaaaa, 0x43ebbbbbbbb55555},
-                {0xe0000000aaaaaaaa, 0x43ec000000155555},
-                {0xeeeeeeeeeeeeeeee, 0x43edddddddddddde},
-                {0xfffffffdeeeeeeee, 0x43efffffffbdddde},
-                {0xf0000000dddddddd, 0x43ee0000001bbbbc},
-                {0x7fffffdddddddd, 0x435ffffff7777777},
-                {0x3fffffaaaaaaaa, 0x434fffffd5555555},
-                {0x1fffffaaaaaaaa, 0x433fffffaaaaaaaa},
-                {0xfffff, 0x412ffffe00000000},
-                {0x7ffff, 0x411ffffc00000000},
-                {0x3ffff, 0x410ffff800000000},
-                {0x1ffff, 0x40fffff000000000},
-                {0xffff, 0x40efffe000000000},
-                {0x7fff, 0x40dfffc000000000},
-                {0x3fff, 0x40cfff8000000000},
-                {0x1fff, 0x40bfff0000000000},
-                {0xfff, 0x40affe0000000000},
-                {0x7ff, 0x409ffc0000000000},
-                {0x3ff, 0x408ff80000000000},
-                {0x1ff, 0x407ff00000000000},
-                {0x3fffffffffff, 0x42cfffffffffff80},
-                {0x1fffffffffff, 0x42bfffffffffff00},
-                {0xfffffffffff, 0x42affffffffffe00},
-                {0x7ffffffffff, 0x429ffffffffffc00},
-                {0x3ffffffffff, 0x428ffffffffff800},
-                {0x1ffffffffff, 0x427ffffffffff000},
-                {0x8000008000000000, 0x43e0000010000000},
-                {0x8000008000000001, 0x43e0000010000000},
-                {0x8000000000000400, 0x43e0000000000000},
-                {0x8000000000000401, 0x43e0000000000001}};
+                {0x273A798E187937A3, 0x43C39D3CC70C3C9C},
+                {0xECE3AF835495A16B, 0x43ED9C75F06A92B4},
+                {0xB668ECC11223344, 0x43A6CD1D98224467},
+                {0x9E, 0x4063C00000000000},
+                {0x43, 0x4050C00000000000},
+                {0xAF73, 0x40E5EE6000000000},
+                {0x116B, 0x40B16B0000000000},
+                {0x658ECC, 0x415963B300000000},
+                {0x2B3B4C, 0x41459DA600000000},
+                {0x88776655, 0x41E10EECCAA00000},
+                {0x70000000, 0x41DC000000000000},
+                {0x7200000, 0x419C800000000000},
+                {0x7FFFFFFF, 0x41DFFFFFFFC00000},
+                {0x56123761, 0x41D5848DD8400000},
+                {0x7FFFFF00, 0x41DFFFFFC0000000},
+                {0x761C4761EEEEEEEE, 0x43DD8711D87BBBBC},
+                {0x80000000EEEEEEEE, 0x43E00000001DDDDE},
+                {0x88888888DDDDDDDD, 0x43E11111111BBBBC},
+                {0xA0000000DDDDDDDD, 0x43E40000001BBBBC},
+                {0xDDDDDDDDAAAAAAAA, 0x43EBBBBBBBB55555},
+                {0xE0000000AAAAAAAA, 0x43EC000000155555},
+                {0xEEEEEEEEEEEEEEEE, 0x43EDDDDDDDDDDDDE},
+                {0xFFFFFFFDEEEEEEEE, 0x43EFFFFFFFBDDDDE},
+                {0xF0000000DDDDDDDD, 0x43EE0000001BBBBC},
+                {0x7FFFFFDDDDDDDD, 0x435FFFFFF7777777},
+                {0x3FFFFFAAAAAAAA, 0x434FFFFFD5555555},
+                {0x1FFFFFAAAAAAAA, 0x433FFFFFAAAAAAAA},
+                {0xFFFFF, 0x412FFFFE00000000},
+                {0x7FFFF, 0x411FFFFC00000000},
+                {0x3FFFF, 0x410FFFF800000000},
+                {0x1FFFF, 0x40FFFFF000000000},
+                {0xFFFF, 0x40EFFFE000000000},
+                {0x7FFF, 0x40DFFFC000000000},
+                {0x3FFF, 0x40CFFF8000000000},
+                {0x1FFF, 0x40BFFF0000000000},
+                {0xFFF, 0x40AFFE0000000000},
+                {0x7FF, 0x409FFC0000000000},
+                {0x3FF, 0x408FF80000000000},
+                {0x1FF, 0x407FF00000000000},
+                {0x3FFFFFFFFFFF, 0x42CFFFFFFFFFFF80},
+                {0x1FFFFFFFFFFF, 0x42BFFFFFFFFFFF00},
+                {0xFFFFFFFFFFF, 0x42AFFFFFFFFFFE00},
+                {0x7FFFFFFFFFF, 0x429FFFFFFFFFFC00},
+                {0x3FFFFFFFFFF, 0x428FFFFFFFFFF800},
+                {0x1FFFFFFFFFF, 0x427FFFFFFFFFF000},
+                {0x8000008000000000, 0x43E0000010000000},
+                {0x8000008000000001, 0x43E0000010000000},
+                {0x8000000000000400, 0x43E0000000000000},
+                {0x8000000000000401, 0x43E0000000000001}};
   WasmRunner<double, uint64_t> r(execution_mode);
   BUILD(r, WASM_F64_UCONVERT_I64(WASM_GET_LOCAL(0)));
   for (size_t i = 0; i < arraysize(values); i++) {
@@ -907,22 +907,40 @@
     BUILD(
         r,
         WASM_I32_CONVERT_I64(WASM_CALL_FUNCTION(
-            t.function_index(), WASM_I64V_9(0xbcd12340000000b),
-            WASM_I64V_9(0xbcd12340000000c), WASM_I32V_1(0xd),
-            WASM_I32_CONVERT_I64(WASM_I64V_9(0xbcd12340000000e)),
-            WASM_I64V_9(0xbcd12340000000f), WASM_I64V_10(0xbcd1234000000010),
-            WASM_I64V_10(0xbcd1234000000011), WASM_I64V_10(0xbcd1234000000012),
-            WASM_I64V_10(0xbcd1234000000013), WASM_I64V_10(0xbcd1234000000014),
-            WASM_I64V_10(0xbcd1234000000015), WASM_I64V_10(0xbcd1234000000016),
-            WASM_I64V_10(0xbcd1234000000017), WASM_I64V_10(0xbcd1234000000018),
-            WASM_I64V_10(0xbcd1234000000019), WASM_I64V_10(0xbcd123400000001a),
-            WASM_I64V_10(0xbcd123400000001b), WASM_I64V_10(0xbcd123400000001c),
-            WASM_I64V_10(0xbcd123400000001d))));
+            t.function_index(), WASM_I64V_9(0xBCD12340000000B),
+            WASM_I64V_9(0xBCD12340000000C), WASM_I32V_1(0xD),
+            WASM_I32_CONVERT_I64(WASM_I64V_9(0xBCD12340000000E)),
+            WASM_I64V_9(0xBCD12340000000F), WASM_I64V_10(0xBCD1234000000010),
+            WASM_I64V_10(0xBCD1234000000011), WASM_I64V_10(0xBCD1234000000012),
+            WASM_I64V_10(0xBCD1234000000013), WASM_I64V_10(0xBCD1234000000014),
+            WASM_I64V_10(0xBCD1234000000015), WASM_I64V_10(0xBCD1234000000016),
+            WASM_I64V_10(0xBCD1234000000017), WASM_I64V_10(0xBCD1234000000018),
+            WASM_I64V_10(0xBCD1234000000019), WASM_I64V_10(0xBCD123400000001A),
+            WASM_I64V_10(0xBCD123400000001B), WASM_I64V_10(0xBCD123400000001C),
+            WASM_I64V_10(0xBCD123400000001D))));
 
-    CHECK_EQ(i + 0xb, r.Call());
+    CHECK_EQ(i + 0xB, r.Call());
   }
 }
 
+WASM_EXEC_TEST(CallI64Return) {
+  ValueType return_types[3];  // TODO(rossberg): support more in the future
+  for (int i = 0; i < 3; i++) return_types[i] = kWasmI64;
+  return_types[1] = kWasmI32;
+  FunctionSig sig(2, 1, return_types);
+
+  WasmRunner<int64_t> r(execution_mode);
+  // Build the target function.
+  WasmFunctionCompiler& t = r.NewFunction(&sig);
+  BUILD(t, WASM_GET_LOCAL(0), WASM_I32V(7));
+
+  // Build the first calling function.
+  BUILD(r, WASM_CALL_FUNCTION(t.function_index(), WASM_I64V(0xBCD12340000000B)),
+        WASM_DROP);
+
+  CHECK_EQ(0xBCD12340000000B, r.Call());
+}
+
 void TestI64Binop(WasmExecutionMode execution_mode, WasmOpcode opcode,
                   int64_t expected, int64_t a, int64_t b) {
   {
@@ -962,35 +980,35 @@
   } while (false)
 
 WASM_EXEC_TEST(I64Binops) {
-  TEST_I64_BINOP(I64Add, -5586332274295447011, 0x501b72ebabc26847,
-                 0x625de9793d8f79d6);
-  TEST_I64_BINOP(I64Sub, 9001903251710731490, 0xf24fe6474640002e,
-                 0x7562b6f711991b4c);
-  TEST_I64_BINOP(I64Mul, -4569547818546064176, 0x231a263c2cbc6451,
-                 0xead44de6bd3e23d0);
-  TEST_I64_BINOP(I64Mul, -25963122347507043, 0x4da1fa47c9352b73,
-                 0x91fe82317aa035af);
-  TEST_I64_BINOP(I64Mul, 7640290486138131960, 0x185731abe8eea47c,
-                 0x714ec59f1380d4c2);
-  TEST_I64_BINOP(I64DivS, -91517, 0x93b1190a34de56a0, 0x00004d8f68863948);
-  TEST_I64_BINOP(I64DivU, 149016, 0xe15b3727e8a2080a, 0x0000631bfa72db8b);
-  TEST_I64_BINOP(I64RemS, -664128064149968, 0x9a78b4e4fe708692,
-                 0x0003e0b6b3be7609);
-  TEST_I64_BINOP(I64RemU, 1742040017332765, 0x0ce84708c6258c81,
-                 0x000a6fde82016697);
-  TEST_I64_BINOP(I64And, 2531040582801836054, 0xaf257d1602644a16,
-                 0x33b290a91a10d997);
-  TEST_I64_BINOP(I64Ior, 8556201506536114940, 0x169d9be7bd3f0a5c,
-                 0x66bca28d77af40e8);
-  TEST_I64_BINOP(I64Xor, -4605655183785456377, 0xb6ea20a5d48e85b8,
-                 0x76ff4da6c80688bf);
-  TEST_I64_BINOP(I64Shl, -7240704056088331264, 0xef4dc1ed030e8ffe, 9);
-  TEST_I64_BINOP(I64ShrU, 12500673744059159, 0xb1a52fa7deec5d14, 10);
-  TEST_I64_BINOP(I64ShrS, 1725103446999874, 0x3107c791461a112b, 11);
-  TEST_I64_BINOP(I64Ror, -8960135652432576946, 0x73418d1717e4e83a, 12);
-  TEST_I64_BINOP(I64Ror, 7617662827409989779, 0xebff67cf0c126d36, 13);
-  TEST_I64_BINOP(I64Rol, -2097714064174346012, 0x43938b8db0b0f230, 14);
-  TEST_I64_BINOP(I64Rol, 8728493013947314237, 0xe07af243ac4d219d, 15);
+  TEST_I64_BINOP(I64Add, -5586332274295447011, 0x501B72EBABC26847,
+                 0x625DE9793D8F79D6);
+  TEST_I64_BINOP(I64Sub, 9001903251710731490, 0xF24FE6474640002E,
+                 0x7562B6F711991B4C);
+  TEST_I64_BINOP(I64Mul, -4569547818546064176, 0x231A263C2CBC6451,
+                 0xEAD44DE6BD3E23D0);
+  TEST_I64_BINOP(I64Mul, -25963122347507043, 0x4DA1FA47C9352B73,
+                 0x91FE82317AA035AF);
+  TEST_I64_BINOP(I64Mul, 7640290486138131960, 0x185731ABE8EEA47C,
+                 0x714EC59F1380D4C2);
+  TEST_I64_BINOP(I64DivS, -91517, 0x93B1190A34DE56A0, 0x00004D8F68863948);
+  TEST_I64_BINOP(I64DivU, 149016, 0xE15B3727E8A2080A, 0x0000631BFA72DB8B);
+  TEST_I64_BINOP(I64RemS, -664128064149968, 0x9A78B4E4FE708692,
+                 0x0003E0B6B3BE7609);
+  TEST_I64_BINOP(I64RemU, 1742040017332765, 0x0CE84708C6258C81,
+                 0x000A6FDE82016697);
+  TEST_I64_BINOP(I64And, 2531040582801836054, 0xAF257D1602644A16,
+                 0x33B290A91A10D997);
+  TEST_I64_BINOP(I64Ior, 8556201506536114940, 0x169D9BE7BD3F0A5C,
+                 0x66BCA28D77AF40E8);
+  TEST_I64_BINOP(I64Xor, -4605655183785456377, 0xB6EA20A5D48E85B8,
+                 0x76FF4DA6C80688BF);
+  TEST_I64_BINOP(I64Shl, -7240704056088331264, 0xEF4DC1ED030E8FFE, 9);
+  TEST_I64_BINOP(I64ShrU, 12500673744059159, 0xB1A52FA7DEEC5D14, 10);
+  TEST_I64_BINOP(I64ShrS, 1725103446999874, 0x3107C791461A112B, 11);
+  TEST_I64_BINOP(I64Ror, -8960135652432576946, 0x73418D1717E4E83A, 12);
+  TEST_I64_BINOP(I64Ror, 7617662827409989779, 0xEBFF67CF0C126D36, 13);
+  TEST_I64_BINOP(I64Rol, -2097714064174346012, 0x43938B8DB0B0F230, 14);
+  TEST_I64_BINOP(I64Rol, 8728493013947314237, 0xE07AF243AC4D219D, 15);
 }
 
 #undef TEST_I64_BINOP
@@ -1024,9 +1042,9 @@
   } values[] = {{0, 0x8000100000000000},  {1, 0x4000050000000000},
                 {2, 0x2000030000000000},  {3, 0x1000000300000000},
                 {4, 0x0805000000000000},  {5, 0x0400600000000000},
-                {6, 0x0200000000000000},  {7, 0x010000a000000000},
-                {8, 0x00800c0000000000},  {9, 0x0040000000000000},
-                {10, 0x0020000d00000000}, {11, 0x00100f0000000000},
+                {6, 0x0200000000000000},  {7, 0x010000A000000000},
+                {8, 0x00800C0000000000},  {9, 0x0040000000000000},
+                {10, 0x0020000D00000000}, {11, 0x00100F0000000000},
                 {12, 0x0008000000000000}, {13, 0x0004100000000000},
                 {14, 0x0002002000000000}, {15, 0x0001030000000000},
                 {16, 0x0000804000000000}, {17, 0x0000400500000000},
@@ -1040,9 +1058,9 @@
                 {32, 0x0000000080001000}, {33, 0x0000000040000500},
                 {34, 0x0000000020000300}, {35, 0x0000000010000003},
                 {36, 0x0000000008050000}, {37, 0x0000000004006000},
-                {38, 0x0000000002000000}, {39, 0x00000000010000a0},
-                {40, 0x0000000000800c00}, {41, 0x0000000000400000},
-                {42, 0x000000000020000d}, {43, 0x0000000000100f00},
+                {38, 0x0000000002000000}, {39, 0x00000000010000A0},
+                {40, 0x0000000000800C00}, {41, 0x0000000000400000},
+                {42, 0x000000000020000D}, {43, 0x0000000000100F00},
                 {44, 0x0000000000080000}, {45, 0x0000000000041000},
                 {46, 0x0000000000020020}, {47, 0x0000000000010300},
                 {48, 0x0000000000008040}, {49, 0x0000000000004005},
@@ -1069,37 +1087,37 @@
     uint64_t input;
   } values[] = {{64, 0x0000000000000000}, {63, 0x8000000000000000},
                 {62, 0x4000000000000000}, {61, 0x2000000000000000},
-                {60, 0x1000000000000000}, {59, 0xa800000000000000},
-                {58, 0xf400000000000000}, {57, 0x6200000000000000},
-                {56, 0x9100000000000000}, {55, 0xcd80000000000000},
-                {54, 0x0940000000000000}, {53, 0xaf20000000000000},
-                {52, 0xac10000000000000}, {51, 0xe0b8000000000000},
-                {50, 0x9ce4000000000000}, {49, 0xc792000000000000},
-                {48, 0xb8f1000000000000}, {47, 0x3b9f800000000000},
-                {46, 0xdb4c400000000000}, {45, 0xe9a3200000000000},
-                {44, 0xfca6100000000000}, {43, 0x6c8a780000000000},
-                {42, 0x8ce5a40000000000}, {41, 0xcb7d020000000000},
-                {40, 0xcb4dc10000000000}, {39, 0xdfbec58000000000},
-                {38, 0x27a9db4000000000}, {37, 0xde3bcb2000000000},
-                {36, 0xd7e8a61000000000}, {35, 0x9afdbc8800000000},
-                {34, 0x9afdbc8400000000}, {33, 0x9afdbc8200000000},
-                {32, 0x9afdbc8100000000}, {31, 0x0000000080000000},
+                {60, 0x1000000000000000}, {59, 0xA800000000000000},
+                {58, 0xF400000000000000}, {57, 0x6200000000000000},
+                {56, 0x9100000000000000}, {55, 0xCD80000000000000},
+                {54, 0x0940000000000000}, {53, 0xAF20000000000000},
+                {52, 0xAC10000000000000}, {51, 0xE0B8000000000000},
+                {50, 0x9CE4000000000000}, {49, 0xC792000000000000},
+                {48, 0xB8F1000000000000}, {47, 0x3B9F800000000000},
+                {46, 0xDB4C400000000000}, {45, 0xE9A3200000000000},
+                {44, 0xFCA6100000000000}, {43, 0x6C8A780000000000},
+                {42, 0x8CE5A40000000000}, {41, 0xCB7D020000000000},
+                {40, 0xCB4DC10000000000}, {39, 0xDFBEC58000000000},
+                {38, 0x27A9DB4000000000}, {37, 0xDE3BCB2000000000},
+                {36, 0xD7E8A61000000000}, {35, 0x9AFDBC8800000000},
+                {34, 0x9AFDBC8400000000}, {33, 0x9AFDBC8200000000},
+                {32, 0x9AFDBC8100000000}, {31, 0x0000000080000000},
                 {30, 0x0000000040000000}, {29, 0x0000000020000000},
-                {28, 0x0000000010000000}, {27, 0x00000000a8000000},
-                {26, 0x00000000f4000000}, {25, 0x0000000062000000},
-                {24, 0x0000000091000000}, {23, 0x00000000cd800000},
-                {22, 0x0000000009400000}, {21, 0x00000000af200000},
-                {20, 0x00000000ac100000}, {19, 0x00000000e0b80000},
-                {18, 0x000000009ce40000}, {17, 0x00000000c7920000},
-                {16, 0x00000000b8f10000}, {15, 0x000000003b9f8000},
-                {14, 0x00000000db4c4000}, {13, 0x00000000e9a32000},
-                {12, 0x00000000fca61000}, {11, 0x000000006c8a7800},
-                {10, 0x000000008ce5a400}, {9, 0x00000000cb7d0200},
-                {8, 0x00000000cb4dc100},  {7, 0x00000000dfbec580},
-                {6, 0x0000000027a9db40},  {5, 0x00000000de3bcb20},
-                {4, 0x00000000d7e8a610},  {3, 0x000000009afdbc88},
-                {2, 0x000000009afdbc84},  {1, 0x000000009afdbc82},
-                {0, 0x000000009afdbc81}};
+                {28, 0x0000000010000000}, {27, 0x00000000A8000000},
+                {26, 0x00000000F4000000}, {25, 0x0000000062000000},
+                {24, 0x0000000091000000}, {23, 0x00000000CD800000},
+                {22, 0x0000000009400000}, {21, 0x00000000AF200000},
+                {20, 0x00000000AC100000}, {19, 0x00000000E0B80000},
+                {18, 0x000000009CE40000}, {17, 0x00000000C7920000},
+                {16, 0x00000000B8F10000}, {15, 0x000000003B9F8000},
+                {14, 0x00000000DB4C4000}, {13, 0x00000000E9A32000},
+                {12, 0x00000000FCA61000}, {11, 0x000000006C8A7800},
+                {10, 0x000000008CE5A400}, {9, 0x00000000CB7D0200},
+                {8, 0x00000000CB4DC100},  {7, 0x00000000DFBEC580},
+                {6, 0x0000000027A9DB40},  {5, 0x00000000DE3BCB20},
+                {4, 0x00000000D7E8A610},  {3, 0x000000009AFDBC88},
+                {2, 0x000000009AFDBC84},  {1, 0x000000009AFDBC82},
+                {0, 0x000000009AFDBC81}};
 
   WasmRunner<int64_t, uint64_t> r(execution_mode);
   BUILD(r, WASM_I64_CTZ(WASM_GET_LOCAL(0)));
@@ -1113,11 +1131,11 @@
   struct {
     int64_t expected;
     uint64_t input;
-  } values[] = {{64, 0xffffffffffffffff},
+  } values[] = {{64, 0xFFFFFFFFFFFFFFFF},
                 {0, 0x0000000000000000},
                 {2, 0x0000080000008000},
                 {26, 0x1123456782345678},
-                {38, 0xffedcba09edcba09}};
+                {38, 0xFFEDCBA09EDCBA09}};
 
   WasmRunner<int64_t, uint64_t> r(execution_mode);
   BUILD(r, WASM_I64_POPCNT(WASM_GET_LOCAL(0)));
@@ -1324,10 +1342,10 @@
   REQUIRE(I64ReinterpretF64);
   WasmRunner<int64_t> r(execution_mode);
   BUILD(r, WASM_I64_REINTERPRET_F64(WASM_SEQ(kExprF64Const, 0x00, 0x00, 0x00,
-                                             0x00, 0x00, 0x00, 0xf4, 0x7f)));
+                                             0x00, 0x00, 0x00, 0xF4, 0x7F)));
 
   // This is a signalling nan.
-  CHECK_EQ(0x7ff4000000000000, r.Call());
+  CHECK_EQ(0x7FF4000000000000, r.Call());
 }
 
 WASM_EXEC_TEST(F64ReinterpretI64) {
@@ -1354,11 +1372,11 @@
 
   BUILD(r, WASM_LOAD_MEM(MachineType::Int64(), WASM_ZERO));
 
-  r.builder().WriteMemory<int64_t>(&memory[0], 0x1abbccdd00112233LL);
-  CHECK_EQ(0x1abbccdd00112233LL, r.Call());
+  r.builder().WriteMemory<int64_t>(&memory[0], 0x1ABBCCDD00112233LL);
+  CHECK_EQ(0x1ABBCCDD00112233LL, r.Call());
 
-  r.builder().WriteMemory<int64_t>(&memory[0], 0x33aabbccdd001122LL);
-  CHECK_EQ(0x33aabbccdd001122LL, r.Call());
+  r.builder().WriteMemory<int64_t>(&memory[0], 0x33AABBCCDD001122LL);
+  CHECK_EQ(0x33AABBCCDD001122LL, r.Call());
 
   r.builder().WriteMemory<int64_t>(&memory[0], 77777777);
   CHECK_EQ(77777777, r.Call());
@@ -1374,11 +1392,11 @@
     BUILD(r,
           WASM_LOAD_MEM_ALIGNMENT(MachineType::Int64(), WASM_ZERO, alignment));
 
-    r.builder().WriteMemory<int64_t>(&memory[0], 0x1abbccdd00112233LL);
-    CHECK_EQ(0x1abbccdd00112233LL, r.Call());
+    r.builder().WriteMemory<int64_t>(&memory[0], 0x1ABBCCDD00112233LL);
+    CHECK_EQ(0x1ABBCCDD00112233LL, r.Call());
 
-    r.builder().WriteMemory<int64_t>(&memory[0], 0x33aabbccdd001122LL);
-    CHECK_EQ(0x33aabbccdd001122LL, r.Call());
+    r.builder().WriteMemory<int64_t>(&memory[0], 0x33AABBCCDD001122LL);
+    CHECK_EQ(0x33AABBCCDD001122LL, r.Call());
 
     r.builder().WriteMemory<int64_t>(&memory[0], 77777777);
     CHECK_EQ(77777777, r.Call());
@@ -1419,7 +1437,7 @@
 }
 
 WASM_EXEC_TEST(StoreMemI64_alignment) {
-  const int64_t kWritten = 0x12345678abcd0011ll;
+  const int64_t kWritten = 0x12345678ABCD0011ll;
 
   for (byte i = 0; i <= 3; i++) {
     WasmRunner<int64_t, int64_t> r(execution_mode);
@@ -1475,7 +1493,7 @@
 
   FOR_UINT64_INPUTS(i) {
     FOR_UINT64_INPUTS(j) {
-      int64_t expected = base::bits::RotateRight64(*i, *j & 0x3f);
+      int64_t expected = base::bits::RotateRight64(*i, *j & 0x3F);
       CHECK_EQ(expected, r.Call(*i, *j));
     }
   }
@@ -1488,7 +1506,7 @@
 
   FOR_UINT64_INPUTS(i) {
     FOR_UINT64_INPUTS(j) {
-      int64_t expected = base::bits::RotateLeft64(*i, *j & 0x3f);
+      int64_t expected = base::bits::RotateLeft64(*i, *j & 0x3F);
       CHECK_EQ(expected, r.Call(*i, *j));
     }
   }
@@ -1496,7 +1514,7 @@
 
 WASM_EXEC_TEST(StoreMem_offset_oob_i64) {
   // TODO(eholk): Fix this test for the trap handler.
-  if (trap_handler::UseTrapHandler()) return;
+  if (trap_handler::IsTrapHandlerEnabled()) return;
   static const MachineType machineTypes[] = {
       MachineType::Int8(),   MachineType::Uint8(),  MachineType::Int16(),
       MachineType::Uint16(), MachineType::Int32(),  MachineType::Uint32(),
@@ -1523,6 +1541,36 @@
   }
 }
 
+WASM_EXEC_TEST(Store_i64_narrowed) {
+  constexpr byte kOpcodes[] = {kExprI64StoreMem8, kExprI64StoreMem16,
+                               kExprI64StoreMem32, kExprI64StoreMem};
+  int stored_size_in_bytes = 0;
+  for (auto opcode : kOpcodes) {
+    stored_size_in_bytes = std::max(1, stored_size_in_bytes * 2);
+    constexpr int kBytes = 24;
+    uint8_t expected_memory[kBytes] = {0};
+    WasmRunner<int32_t, int32_t, int64_t> r(execution_mode);
+    uint8_t* memory = r.builder().AddMemoryElems<uint8_t>(kBytes);
+    constexpr uint64_t kPattern = 0x0123456789abcdef;
+
+    BUILD(r, WASM_GET_LOCAL(0),                 // index
+          WASM_GET_LOCAL(1),                    // value
+          opcode, ZERO_ALIGNMENT, ZERO_OFFSET,  // store
+          WASM_ZERO);                           // return value
+
+    for (int i = 0; i <= kBytes - stored_size_in_bytes; ++i) {
+      uint64_t pattern = base::bits::RotateLeft64(kPattern, i % 64);
+      r.Call(i, pattern);
+      for (int b = 0; b < stored_size_in_bytes; ++b) {
+        expected_memory[i + b] = static_cast<uint8_t>(pattern >> (b * 8));
+      }
+      for (int w = 0; w < kBytes; ++w) {
+        CHECK_EQ(expected_memory[w], memory[w]);
+      }
+    }
+  }
+}
+
 WASM_EXEC_TEST(UnalignedInt64Load) {
   WasmRunner<uint64_t> r(execution_mode);
   r.builder().AddMemoryElems<int64_t>(8);
@@ -1545,12 +1593,12 @@
     for (size_t i = 0; i < sizeof(__buf); i++) vec.push_back(__buf[i]); \
   } while (false)
 
-static void CompileCallIndirectMany(ValueType param) {
+static void CompileCallIndirectMany(WasmExecutionMode mode, ValueType param) {
   // Make sure we don't run out of registers when compiling indirect calls
   // with many many parameters.
   TestSignatures sigs;
   for (byte num_params = 0; num_params < 40; num_params++) {
-    WasmRunner<void> r(kExecuteCompiled);
+    WasmRunner<void> r(mode);
     FunctionSig* sig = sigs.many(r.zone(), kWasmStmt, param, num_params);
 
     r.builder().AddSignature(sig);
@@ -1570,7 +1618,9 @@
   }
 }
 
-TEST(Compile_Wasm_CallIndirect_Many_i64) { CompileCallIndirectMany(kWasmI64); }
+WASM_EXEC_TEST(Compile_Wasm_CallIndirect_Many_i64) {
+  CompileCallIndirectMany(execution_mode, kWasmI64);
+}
 
 static void Run_WasmMixedCall_N(WasmExecutionMode execution_mode, int start) {
   const int kExpected = 6333;
diff --git a/src/v8/test/cctest/wasm/test-run-wasm-atomics.cc b/src/v8/test/cctest/wasm/test-run-wasm-atomics.cc
index e182b20..3b0e319 100644
--- a/src/v8/test/cctest/wasm/test-run-wasm-atomics.cc
+++ b/src/v8/test/cctest/wasm/test-run-wasm-atomics.cc
@@ -12,20 +12,6 @@
 namespace internal {
 namespace wasm {
 
-#define WASM_ATOMICS_OP(op) kAtomicPrefix, static_cast<byte>(op)
-#define WASM_ATOMICS_BINOP(op, x, y, representation) \
-  x, y, WASM_ATOMICS_OP(op),                         \
-      static_cast<byte>(ElementSizeLog2Of(representation)), ZERO_OFFSET
-#define WASM_ATOMICS_TERNARY_OP(op, x, y, z, representation) \
-  x, y, z, WASM_ATOMICS_OP(op),                              \
-      static_cast<byte>(ElementSizeLog2Of(representation)), ZERO_OFFSET
-#define WASM_ATOMICS_LOAD_OP(op, x, representation) \
-  x, WASM_ATOMICS_OP(op),                           \
-      static_cast<byte>(ElementSizeLog2Of(representation)), ZERO_OFFSET
-#define WASM_ATOMICS_STORE_OP(op, x, y, representation) \
-  x, y, WASM_ATOMICS_OP(op),                            \
-      static_cast<byte>(ElementSizeLog2Of(representation)), ZERO_OFFSET
-
 typedef uint32_t (*Uint32BinOp)(uint32_t, uint32_t);
 typedef uint16_t (*Uint16BinOp)(uint16_t, uint16_t);
 typedef uint8_t (*Uint8BinOp)(uint8_t, uint8_t);
@@ -66,9 +52,10 @@
   return a;
 }
 
-void RunU32BinOp(WasmOpcode wasm_op, Uint32BinOp expected_op) {
+void RunU32BinOp(WasmExecutionMode execution_mode, WasmOpcode wasm_op,
+                 Uint32BinOp expected_op) {
   EXPERIMENTAL_FLAG_SCOPE(threads);
-  WasmRunner<uint32_t, uint32_t> r(kExecuteCompiled);
+  WasmRunner<uint32_t, uint32_t> r(execution_mode);
   uint32_t* memory = r.builder().AddMemoryElems<uint32_t>(8);
   r.builder().SetHasSharedMemory();
 
@@ -86,16 +73,29 @@
   }
 }
 
-TEST(I32AtomicAdd) { RunU32BinOp(kExprI32AtomicAdd, Add); }
-TEST(I32AtomicSub) { RunU32BinOp(kExprI32AtomicSub, Sub); }
-TEST(I32AtomicAnd) { RunU32BinOp(kExprI32AtomicAnd, And); }
-TEST(I32AtomicOr) { RunU32BinOp(kExprI32AtomicOr, Or); }
-TEST(I32AtomicXor) { RunU32BinOp(kExprI32AtomicXor, Xor); }
-TEST(I32AtomicExchange) { RunU32BinOp(kExprI32AtomicExchange, Exchange); }
+WASM_EXEC_TEST(I32AtomicAdd) {
+  RunU32BinOp(execution_mode, kExprI32AtomicAdd, Add);
+}
+WASM_EXEC_TEST(I32AtomicSub) {
+  RunU32BinOp(execution_mode, kExprI32AtomicSub, Sub);
+}
+WASM_EXEC_TEST(I32AtomicAnd) {
+  RunU32BinOp(execution_mode, kExprI32AtomicAnd, And);
+}
+WASM_EXEC_TEST(I32AtomicOr) {
+  RunU32BinOp(execution_mode, kExprI32AtomicOr, Or);
+}
+WASM_EXEC_TEST(I32AtomicXor) {
+  RunU32BinOp(execution_mode, kExprI32AtomicXor, Xor);
+}
+WASM_EXEC_TEST(I32AtomicExchange) {
+  RunU32BinOp(execution_mode, kExprI32AtomicExchange, Exchange);
+}
 
-void RunU16BinOp(WasmOpcode wasm_op, Uint16BinOp expected_op) {
+void RunU16BinOp(WasmExecutionMode mode, WasmOpcode wasm_op,
+                 Uint16BinOp expected_op) {
   EXPERIMENTAL_FLAG_SCOPE(threads);
-  WasmRunner<uint32_t, uint32_t> r(kExecuteCompiled);
+  WasmRunner<uint32_t, uint32_t> r(mode);
   r.builder().SetHasSharedMemory();
   uint16_t* memory = r.builder().AddMemoryElems<uint16_t>(8);
 
@@ -113,16 +113,29 @@
   }
 }
 
-TEST(I32AtomicAdd16U) { RunU16BinOp(kExprI32AtomicAdd16U, Add); }
-TEST(I32AtomicSub16U) { RunU16BinOp(kExprI32AtomicSub16U, Sub); }
-TEST(I32AtomicAnd16U) { RunU16BinOp(kExprI32AtomicAnd16U, And); }
-TEST(I32AtomicOr16U) { RunU16BinOp(kExprI32AtomicOr16U, Or); }
-TEST(I32AtomicXor16U) { RunU16BinOp(kExprI32AtomicXor16U, Xor); }
-TEST(I32AtomicExchange16U) { RunU16BinOp(kExprI32AtomicExchange16U, Exchange); }
+WASM_EXEC_TEST(I32AtomicAdd16U) {
+  RunU16BinOp(execution_mode, kExprI32AtomicAdd16U, Add);
+}
+WASM_EXEC_TEST(I32AtomicSub16U) {
+  RunU16BinOp(execution_mode, kExprI32AtomicSub16U, Sub);
+}
+WASM_EXEC_TEST(I32AtomicAnd16U) {
+  RunU16BinOp(execution_mode, kExprI32AtomicAnd16U, And);
+}
+WASM_EXEC_TEST(I32AtomicOr16U) {
+  RunU16BinOp(execution_mode, kExprI32AtomicOr16U, Or);
+}
+WASM_EXEC_TEST(I32AtomicXor16U) {
+  RunU16BinOp(execution_mode, kExprI32AtomicXor16U, Xor);
+}
+WASM_EXEC_TEST(I32AtomicExchange16U) {
+  RunU16BinOp(execution_mode, kExprI32AtomicExchange16U, Exchange);
+}
 
-void RunU8BinOp(WasmOpcode wasm_op, Uint8BinOp expected_op) {
+void RunU8BinOp(WasmExecutionMode execution_mode, WasmOpcode wasm_op,
+                Uint8BinOp expected_op) {
   EXPERIMENTAL_FLAG_SCOPE(threads);
-  WasmRunner<uint32_t, uint32_t> r(kExecuteCompiled);
+  WasmRunner<uint32_t, uint32_t> r(execution_mode);
   r.builder().SetHasSharedMemory();
   uint8_t* memory = r.builder().AddMemoryElems<uint8_t>(8);
 
@@ -140,16 +153,28 @@
   }
 }
 
-TEST(I32AtomicAdd8U) { RunU8BinOp(kExprI32AtomicAdd8U, Add); }
-TEST(I32AtomicSub8U) { RunU8BinOp(kExprI32AtomicSub8U, Sub); }
-TEST(I32AtomicAnd8U) { RunU8BinOp(kExprI32AtomicAnd8U, And); }
-TEST(I32AtomicOr8U) { RunU8BinOp(kExprI32AtomicOr8U, Or); }
-TEST(I32AtomicXor8U) { RunU8BinOp(kExprI32AtomicXor8U, Xor); }
-TEST(I32AtomicExchange8U) { RunU8BinOp(kExprI32AtomicExchange8U, Exchange); }
+WASM_EXEC_TEST(I32AtomicAdd8U) {
+  RunU8BinOp(execution_mode, kExprI32AtomicAdd8U, Add);
+}
+WASM_EXEC_TEST(I32AtomicSub8U) {
+  RunU8BinOp(execution_mode, kExprI32AtomicSub8U, Sub);
+}
+WASM_EXEC_TEST(I32AtomicAnd8U) {
+  RunU8BinOp(execution_mode, kExprI32AtomicAnd8U, And);
+}
+WASM_EXEC_TEST(I32AtomicOr8U) {
+  RunU8BinOp(execution_mode, kExprI32AtomicOr8U, Or);
+}
+WASM_EXEC_TEST(I32AtomicXor8U) {
+  RunU8BinOp(execution_mode, kExprI32AtomicXor8U, Xor);
+}
+WASM_EXEC_TEST(I32AtomicExchange8U) {
+  RunU8BinOp(execution_mode, kExprI32AtomicExchange8U, Exchange);
+}
 
-TEST(I32AtomicCompareExchange) {
+WASM_COMPILED_EXEC_TEST(I32AtomicCompareExchange) {
   EXPERIMENTAL_FLAG_SCOPE(threads);
-  WasmRunner<uint32_t, uint32_t, uint32_t> r(kExecuteCompiled);
+  WasmRunner<uint32_t, uint32_t, uint32_t> r(execution_mode);
   r.builder().SetHasSharedMemory();
   uint32_t* memory = r.builder().AddMemoryElems<uint32_t>(8);
   BUILD(r, WASM_ATOMICS_TERNARY_OP(
@@ -167,9 +192,9 @@
   }
 }
 
-TEST(I32AtomicCompareExchange16U) {
+WASM_COMPILED_EXEC_TEST(I32AtomicCompareExchange16U) {
   EXPERIMENTAL_FLAG_SCOPE(threads);
-  WasmRunner<uint32_t, uint32_t, uint32_t> r(kExecuteCompiled);
+  WasmRunner<uint32_t, uint32_t, uint32_t> r(execution_mode);
   r.builder().SetHasSharedMemory();
   uint16_t* memory = r.builder().AddMemoryElems<uint16_t>(8);
   BUILD(r, WASM_ATOMICS_TERNARY_OP(kExprI32AtomicCompareExchange16U,
@@ -188,9 +213,9 @@
   }
 }
 
-TEST(I32AtomicCompareExchange8U) {
+WASM_COMPILED_EXEC_TEST(I32AtomicCompareExchange8U) {
   EXPERIMENTAL_FLAG_SCOPE(threads);
-  WasmRunner<uint32_t, uint32_t, uint32_t> r(kExecuteCompiled);
+  WasmRunner<uint32_t, uint32_t, uint32_t> r(execution_mode);
   r.builder().SetHasSharedMemory();
   uint8_t* memory = r.builder().AddMemoryElems<uint8_t>(8);
   BUILD(r,
@@ -209,9 +234,9 @@
   }
 }
 
-TEST(I32AtomicLoad) {
+WASM_EXEC_TEST(I32AtomicLoad) {
   EXPERIMENTAL_FLAG_SCOPE(threads);
-  WasmRunner<uint32_t> r(kExecuteCompiled);
+  WasmRunner<uint32_t> r(execution_mode);
   r.builder().SetHasSharedMemory();
   uint32_t* memory = r.builder().AddMemoryElems<uint32_t>(8);
   BUILD(r, WASM_ATOMICS_LOAD_OP(kExprI32AtomicLoad, WASM_ZERO,
@@ -224,9 +249,9 @@
   }
 }
 
-TEST(I32AtomicLoad16U) {
+WASM_EXEC_TEST(I32AtomicLoad16U) {
   EXPERIMENTAL_FLAG_SCOPE(threads);
-  WasmRunner<uint32_t> r(kExecuteCompiled);
+  WasmRunner<uint32_t> r(execution_mode);
   r.builder().SetHasSharedMemory();
   uint16_t* memory = r.builder().AddMemoryElems<uint16_t>(8);
   BUILD(r, WASM_ATOMICS_LOAD_OP(kExprI32AtomicLoad16U, WASM_ZERO,
@@ -239,9 +264,9 @@
   }
 }
 
-TEST(I32AtomicLoad8U) {
+WASM_EXEC_TEST(I32AtomicLoad8U) {
   EXPERIMENTAL_FLAG_SCOPE(threads);
-  WasmRunner<uint32_t> r(kExecuteCompiled);
+  WasmRunner<uint32_t> r(execution_mode);
   r.builder().SetHasSharedMemory();
   uint8_t* memory = r.builder().AddMemoryElems<uint8_t>(8);
   BUILD(r, WASM_ATOMICS_LOAD_OP(kExprI32AtomicLoad8U, WASM_ZERO,
@@ -254,9 +279,9 @@
   }
 }
 
-TEST(I32AtomicStoreLoad) {
+WASM_EXEC_TEST(I32AtomicStoreLoad) {
   EXPERIMENTAL_FLAG_SCOPE(threads);
-  WasmRunner<uint32_t, uint32_t> r(kExecuteCompiled);
+  WasmRunner<uint32_t, uint32_t> r(execution_mode);
   r.builder().SetHasSharedMemory();
   uint32_t* memory = r.builder().AddMemoryElems<uint32_t>(8);
 
@@ -273,9 +298,9 @@
   }
 }
 
-TEST(I32AtomicStoreLoad16U) {
+WASM_EXEC_TEST(I32AtomicStoreLoad16U) {
   EXPERIMENTAL_FLAG_SCOPE(threads);
-  WasmRunner<uint32_t, uint32_t> r(kExecuteCompiled);
+  WasmRunner<uint32_t, uint32_t> r(execution_mode);
   r.builder().SetHasSharedMemory();
   uint16_t* memory = r.builder().AddMemoryElems<uint16_t>(8);
 
@@ -293,9 +318,9 @@
   }
 }
 
-TEST(I32AtomicStoreLoad8U) {
+WASM_EXEC_TEST(I32AtomicStoreLoad8U) {
   EXPERIMENTAL_FLAG_SCOPE(threads);
-  WasmRunner<uint32_t, uint32_t> r(kExecuteCompiled);
+  WasmRunner<uint32_t, uint32_t> r(execution_mode);
   r.builder().SetHasSharedMemory();
   uint8_t* memory = r.builder().AddMemoryElems<uint8_t>(8);
 
@@ -311,11 +336,6 @@
     CHECK_EQ(*i, r.builder().ReadMemory(&memory[0]));
   }
 }
-#undef WASM_ATOMICS_OP
-#undef WASM_ATOMICS_BINOP
-#undef WASM_ATOMICS_TERNARY_OP
-#undef WASM_ATOMICS_LOAD_OP
-#undef WASM_ATOMICS_STORE_OP
 
 }  // namespace wasm
 }  // namespace internal
diff --git a/src/v8/test/cctest/wasm/test-run-wasm-interpreter.cc b/src/v8/test/cctest/wasm/test-run-wasm-interpreter.cc
index 10ba64c..76ca00c 100644
--- a/src/v8/test/cctest/wasm/test-run-wasm-interpreter.cc
+++ b/src/v8/test/cctest/wasm/test-run-wasm-interpreter.cc
@@ -22,7 +22,7 @@
 namespace test_run_wasm_interpreter {
 
 TEST(Run_WasmInt8Const_i) {
-  WasmRunner<int32_t> r(kExecuteInterpreted);
+  WasmRunner<int32_t> r(kExecuteInterpreter);
   const byte kExpectedValue = 109;
   // return(kExpectedValue)
   BUILD(r, WASM_I32V_2(kExpectedValue));
@@ -30,14 +30,14 @@
 }
 
 TEST(Run_WasmIfElse) {
-  WasmRunner<int32_t, int32_t> r(kExecuteInterpreted);
+  WasmRunner<int32_t, int32_t> r(kExecuteInterpreter);
   BUILD(r, WASM_IF_ELSE_I(WASM_GET_LOCAL(0), WASM_I32V_1(9), WASM_I32V_1(10)));
   CHECK_EQ(10, r.Call(0));
   CHECK_EQ(9, r.Call(1));
 }
 
 TEST(Run_WasmIfReturn) {
-  WasmRunner<int32_t, int32_t> r(kExecuteInterpreted);
+  WasmRunner<int32_t, int32_t> r(kExecuteInterpreter);
   BUILD(r, WASM_IF(WASM_GET_LOCAL(0), WASM_RETURN1(WASM_I32V_2(77))),
         WASM_I32V_2(65));
   CHECK_EQ(65, r.Call(0));
@@ -53,7 +53,7 @@
     code[nops] = kExprI32Const;
     code[nops + 1] = expected;
 
-    WasmRunner<int32_t> r(kExecuteInterpreted);
+    WasmRunner<int32_t> r(kExecuteInterpreter);
     r.Build(code, code + nops + 2);
     CHECK_EQ(expected, r.Call());
   }
@@ -76,7 +76,7 @@
       }
     }
 
-    WasmRunner<int32_t> r(kExecuteInterpreted);
+    WasmRunner<int32_t> r(kExecuteInterpreter);
     r.Build(code, code + (count * 3));
     CHECK_EQ(expected, r.Call());
   }
@@ -95,7 +95,7 @@
     code[2 + nops + 1] = expected;
     code[2 + nops + 2] = kExprEnd;
 
-    WasmRunner<int32_t> r(kExecuteInterpreted);
+    WasmRunner<int32_t> r(kExecuteInterpreter);
     r.Build(code, code + nops + kExtra);
     CHECK_EQ(expected, r.Call());
   }
@@ -120,7 +120,7 @@
       code[2 + index + 2] = kExprBr;
       code[2 + index + 3] = 0;
 
-      WasmRunner<int32_t> r(kExecuteInterpreted);
+      WasmRunner<int32_t> r(kExecuteInterpreter);
       r.Build(code, code + kMaxNops + kExtra);
       CHECK_EQ(expected, r.Call());
     }
@@ -128,7 +128,7 @@
 }
 
 TEST(Run_Wasm_nested_ifs_i) {
-  WasmRunner<int32_t, int32_t, int32_t> r(kExecuteInterpreted);
+  WasmRunner<int32_t, int32_t, int32_t> r(kExecuteInterpreter);
 
   BUILD(
       r,
@@ -178,7 +178,7 @@
       Find(code, sizeof(code), kNumBreakpoints, kExprGetLocal, kExprGetLocal,
            kExprI32Add);
 
-  WasmRunner<int32_t, uint32_t, uint32_t> r(kExecuteInterpreted);
+  WasmRunner<int32_t, uint32_t, uint32_t> r(kExecuteInterpreter);
 
   r.Build(code, code + arraysize(code));
 
@@ -217,7 +217,7 @@
   static const int kTraceLength = 4;
   byte code[] = {WASM_I32_MUL(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1))};
 
-  WasmRunner<int32_t, uint32_t, uint32_t> r(kExecuteInterpreted);
+  WasmRunner<int32_t, uint32_t, uint32_t> r(kExecuteInterpreter);
 
   r.Build(code, code + arraysize(code));
 
@@ -255,7 +255,7 @@
   std::unique_ptr<int[]> offsets =
       Find(code, sizeof(code), kNumBreakpoints, kExprI32And);
 
-  WasmRunner<int32_t, uint32_t, uint32_t> r(kExecuteInterpreted);
+  WasmRunner<int32_t, uint32_t, uint32_t> r(kExecuteInterpreter);
 
   r.Build(code, code + arraysize(code));
 
@@ -293,15 +293,15 @@
 
 TEST(GrowMemory) {
   {
-    WasmRunner<int32_t, uint32_t> r(kExecuteInterpreted);
-    r.builder().AddMemory(WasmModule::kPageSize);
+    WasmRunner<int32_t, uint32_t> r(kExecuteInterpreter);
+    r.builder().AddMemory(kWasmPageSize);
     r.builder().SetMaxMemPages(10);
     BUILD(r, WASM_GROW_MEMORY(WASM_GET_LOCAL(0)));
     CHECK_EQ(1, r.Call(1));
   }
   {
-    WasmRunner<int32_t, uint32_t> r(kExecuteInterpreted);
-    r.builder().AddMemory(WasmModule::kPageSize);
+    WasmRunner<int32_t, uint32_t> r(kExecuteInterpreter);
+    r.builder().AddMemory(kWasmPageSize);
     r.builder().SetMaxMemPages(10);
     BUILD(r, WASM_GROW_MEMORY(WASM_GET_LOCAL(0)));
     CHECK_EQ(-1, r.Call(11));
@@ -311,8 +311,8 @@
 TEST(GrowMemoryPreservesData) {
   int32_t index = 16;
   int32_t value = 2335;
-  WasmRunner<int32_t, uint32_t> r(kExecuteInterpreted);
-  r.builder().AddMemory(WasmModule::kPageSize);
+  WasmRunner<int32_t, uint32_t> r(kExecuteInterpreter);
+  r.builder().AddMemory(kWasmPageSize);
   BUILD(r, WASM_STORE_MEM(MachineType::Int32(), WASM_I32V(index),
                           WASM_I32V(value)),
         WASM_GROW_MEMORY(WASM_GET_LOCAL(0)), WASM_DROP,
@@ -322,73 +322,121 @@
 
 TEST(GrowMemoryInvalidSize) {
   // Grow memory by an invalid amount without initial memory.
-  WasmRunner<int32_t, uint32_t> r(kExecuteInterpreted);
-  r.builder().AddMemory(WasmModule::kPageSize);
+  WasmRunner<int32_t, uint32_t> r(kExecuteInterpreter);
+  r.builder().AddMemory(kWasmPageSize);
   BUILD(r, WASM_GROW_MEMORY(WASM_GET_LOCAL(0)));
   CHECK_EQ(-1, r.Call(1048575));
 }
 
 TEST(TestPossibleNondeterminism) {
   {
-    WasmRunner<int32_t, float> r(kExecuteInterpreted);
+    WasmRunner<int32_t, float> r(kExecuteInterpreter);
     BUILD(r, WASM_I32_REINTERPRET_F32(WASM_GET_LOCAL(0)));
     r.Call(1048575.5f);
     CHECK(!r.possible_nondeterminism());
     r.Call(std::numeric_limits<float>::quiet_NaN());
-    CHECK(r.possible_nondeterminism());
+    CHECK(!r.possible_nondeterminism());
   }
   {
-    WasmRunner<int64_t, double> r(kExecuteInterpreted);
+    WasmRunner<int64_t, double> r(kExecuteInterpreter);
     BUILD(r, WASM_I64_REINTERPRET_F64(WASM_GET_LOCAL(0)));
     r.Call(16.0);
     CHECK(!r.possible_nondeterminism());
     r.Call(std::numeric_limits<double>::quiet_NaN());
-    CHECK(r.possible_nondeterminism());
+    CHECK(!r.possible_nondeterminism());
   }
   {
-    WasmRunner<float, float> r(kExecuteInterpreted);
+    WasmRunner<float, float> r(kExecuteInterpreter);
     BUILD(r, WASM_F32_COPYSIGN(WASM_F32(42.0f), WASM_GET_LOCAL(0)));
     r.Call(16.0f);
     CHECK(!r.possible_nondeterminism());
     r.Call(std::numeric_limits<double>::quiet_NaN());
-    CHECK(r.possible_nondeterminism());
+    CHECK(!r.possible_nondeterminism());
   }
   {
-    WasmRunner<double, double> r(kExecuteInterpreted);
+    WasmRunner<double, double> r(kExecuteInterpreter);
     BUILD(r, WASM_F64_COPYSIGN(WASM_F64(42.0), WASM_GET_LOCAL(0)));
     r.Call(16.0);
     CHECK(!r.possible_nondeterminism());
     r.Call(std::numeric_limits<double>::quiet_NaN());
-    CHECK(r.possible_nondeterminism());
+    CHECK(!r.possible_nondeterminism());
   }
   {
     int32_t index = 16;
-    WasmRunner<int32_t, float> r(kExecuteInterpreted);
-    r.builder().AddMemory(WasmModule::kPageSize);
+    WasmRunner<int32_t, float> r(kExecuteInterpreter);
+    r.builder().AddMemory(kWasmPageSize);
     BUILD(r, WASM_STORE_MEM(MachineType::Float32(), WASM_I32V(index),
                             WASM_GET_LOCAL(0)),
           WASM_I32V(index));
     r.Call(1345.3456f);
     CHECK(!r.possible_nondeterminism());
     r.Call(std::numeric_limits<float>::quiet_NaN());
-    CHECK(r.possible_nondeterminism());
+    CHECK(!r.possible_nondeterminism());
   }
   {
     int32_t index = 16;
-    WasmRunner<int32_t, double> r(kExecuteInterpreted);
-    r.builder().AddMemory(WasmModule::kPageSize);
+    WasmRunner<int32_t, double> r(kExecuteInterpreter);
+    r.builder().AddMemory(kWasmPageSize);
     BUILD(r, WASM_STORE_MEM(MachineType::Float64(), WASM_I32V(index),
                             WASM_GET_LOCAL(0)),
           WASM_I32V(index));
     r.Call(1345.3456);
     CHECK(!r.possible_nondeterminism());
     r.Call(std::numeric_limits<double>::quiet_NaN());
+    CHECK(!r.possible_nondeterminism());
+  }
+  {
+    WasmRunner<float, float> r(kExecuteInterpreter);
+    BUILD(r, WASM_F32_ADD(WASM_GET_LOCAL(0), WASM_GET_LOCAL(0)));
+    r.Call(1048575.5f);
+    CHECK(!r.possible_nondeterminism());
+    r.Call(std::numeric_limits<float>::quiet_NaN());
+    CHECK(r.possible_nondeterminism());
+  }
+  {
+    WasmRunner<double, double> r(kExecuteInterpreter);
+    BUILD(r, WASM_F64_ADD(WASM_GET_LOCAL(0), WASM_GET_LOCAL(0)));
+    r.Call(16.0);
+    CHECK(!r.possible_nondeterminism());
+    r.Call(std::numeric_limits<double>::quiet_NaN());
+    CHECK(r.possible_nondeterminism());
+  }
+  {
+    WasmRunner<int32_t, float> r(kExecuteInterpreter);
+    BUILD(r, WASM_F32_EQ(WASM_GET_LOCAL(0), WASM_GET_LOCAL(0)));
+    r.Call(16.0);
+    CHECK(!r.possible_nondeterminism());
+    r.Call(std::numeric_limits<float>::quiet_NaN());
+    CHECK(!r.possible_nondeterminism());
+  }
+  {
+    WasmRunner<int32_t, double> r(kExecuteInterpreter);
+    BUILD(r, WASM_F64_EQ(WASM_GET_LOCAL(0), WASM_GET_LOCAL(0)));
+    r.Call(16.0);
+    CHECK(!r.possible_nondeterminism());
+    r.Call(std::numeric_limits<double>::quiet_NaN());
+    CHECK(!r.possible_nondeterminism());
+  }
+  {
+    WasmRunner<float, float> r(kExecuteInterpreter);
+    BUILD(r, WASM_F32_MIN(WASM_GET_LOCAL(0), WASM_GET_LOCAL(0)));
+    r.Call(1048575.5f);
+    CHECK(!r.possible_nondeterminism());
+    r.Call(std::numeric_limits<float>::quiet_NaN());
+    CHECK(r.possible_nondeterminism());
+  }
+  {
+    WasmRunner<double, double> r(kExecuteInterpreter);
+    BUILD(r, WASM_F64_MAX(WASM_GET_LOCAL(0), WASM_GET_LOCAL(0)));
+    r.Call(16.0);
+    CHECK(!r.possible_nondeterminism());
+    r.Call(std::numeric_limits<double>::quiet_NaN());
     CHECK(r.possible_nondeterminism());
   }
 }
 
 TEST(WasmInterpreterActivations) {
-  WasmRunner<void> r(kExecuteInterpreted);
+  WasmRunner<void> r(kExecuteInterpreter);
   Isolate* isolate = r.main_isolate();
   BUILD(r, WASM_NOP);
 
@@ -418,7 +466,7 @@
 }
 
 TEST(InterpreterLoadWithoutMemory) {
-  WasmRunner<int32_t, int32_t> r(kExecuteInterpreted);
+  WasmRunner<int32_t, int32_t> r(kExecuteInterpreter);
   r.builder().AddMemory(0);
   BUILD(r, WASM_LOAD_MEM(MachineType::Int32(), WASM_GET_LOCAL(0)));
   CHECK_TRAP32(r.Call(0));
diff --git a/src/v8/test/cctest/wasm/test-run-wasm-module.cc b/src/v8/test/cctest/wasm/test-run-wasm-module.cc
index 7ea9e39..ab40a63 100644
--- a/src/v8/test/cctest/wasm/test-run-wasm-module.cc
+++ b/src/v8/test/cctest/wasm/test-run-wasm-module.cc
@@ -18,6 +18,7 @@
 #include "src/wasm/wasm-opcodes.h"
 
 #include "test/cctest/cctest.h"
+#include "test/common/wasm/flag-utils.h"
 #include "test/common/wasm/test-signatures.h"
 #include "test/common/wasm/wasm-macro-gen.h"
 #include "test/common/wasm/wasm-module-runner.h"
@@ -132,9 +133,9 @@
     byte code[] = {
         WASM_LOAD_MEM(MachineType::Int32(), WASM_I32V_1(kDataSegmentDest0))};
     EMIT_CODE_WITH_END(f, code);
-    byte data[] = {0xaa, 0xbb, 0xcc, 0xdd};
+    byte data[] = {0xAA, 0xBB, 0xCC, 0xDD};
     builder->AddDataSegment(data, sizeof(data), kDataSegmentDest0);
-    TestModule(&zone, builder, 0xddccbbaa);
+    TestModule(&zone, builder, 0xDDCCBBAA);
   }
   Cleanup();
 }
@@ -255,7 +256,7 @@
     uint32_t* slot = reinterpret_cast<uint32_t*>(
         const_cast<uint8_t*>(serialized_bytes_.first) +
         SerializedCodeData::kPayloadLengthOffset);
-    *slot = 0xfefefefeu;
+    *slot = FLAG_wasm_jit_to_native ? 0u : 0xFEFEFEFEu;
   }
 
   v8::MaybeLocal<v8::WasmCompiledModule> Deserialize() {
@@ -276,11 +277,12 @@
       DisallowHeapAllocation assume_no_gc;
       Handle<WasmCompiledModule> compiled_part(module_object->compiled_module(),
                                                current_isolate());
-      CHECK_EQ(memcmp(compiled_part->module_bytes()->GetCharsAddress(),
-                      wire_bytes().first, wire_bytes().second),
-               0);
+      CHECK_EQ(
+          memcmp(compiled_part->shared()->module_bytes()->GetCharsAddress(),
+                 wire_bytes().first, wire_bytes().second),
+          0);
     }
-    Handle<JSObject> instance =
+    Handle<WasmInstanceObject> instance =
         SyncInstantiate(current_isolate(), &thrower, module_object,
                         Handle<JSReceiver>::null(),
                         MaybeHandle<JSArrayBuffer>())
@@ -503,23 +505,6 @@
   return false;
 }
 
-TEST(BlockWasmCodeGen) {
-  v8::internal::AccountingAllocator allocator;
-  Zone zone(&allocator, ZONE_NAME);
-  ZoneBuffer buffer(&zone);
-  WasmSerializationTest::BuildWireBytes(&zone, &buffer);
-  Isolate* isolate = CcTest::InitIsolateOnce();
-  HandleScope scope(isolate);
-  testing::SetupIsolateForWasmModule(isolate);
-  CcTest::isolate()->SetAllowCodeGenerationFromStringsCallback(False);
-
-  ErrorThrower thrower(isolate, "block codegen");
-  MaybeHandle<WasmModuleObject> ret = wasm::SyncCompile(
-      isolate, &thrower, ModuleWireBytes(buffer.begin(), buffer.end()));
-  CHECK(ret.is_null());
-  CHECK(thrower.error());
-}
-
 TEST(BlockWasmCodeGenAtDeserialization) {
   WasmSerializationTest test;
   {
@@ -559,13 +544,16 @@
     create_params.array_buffer_allocator =
         from_isolate->array_buffer_allocator();
     v8::Isolate* to_isolate = v8::Isolate::New(create_params);
-    v8::HandleScope new_scope(to_isolate);
-    v8::Local<v8::Context> deserialization_context =
-        v8::Context::New(to_isolate);
-    deserialization_context->Enter();
-    v8::MaybeLocal<v8::WasmCompiledModule> mod =
-        v8::WasmCompiledModule::FromTransferrableModule(to_isolate, store[0]);
-    CHECK(!mod.IsEmpty());
+    {
+      v8::HandleScope new_scope(to_isolate);
+      v8::Local<v8::Context> deserialization_context =
+          v8::Context::New(to_isolate);
+      deserialization_context->Enter();
+      v8::MaybeLocal<v8::WasmCompiledModule> mod =
+          v8::WasmCompiledModule::FromTransferrableModule(to_isolate, store[0]);
+      CHECK(!mod.IsEmpty());
+    }
+    to_isolate->Dispose();
   }
 }
 
@@ -702,7 +690,8 @@
                                   {}, {})
             .ToHandleChecked();
 
-    Handle<JSArrayBuffer> memory(instance->memory_buffer(), isolate);
+    Handle<JSArrayBuffer> memory(instance->memory_object()->array_buffer(),
+                                 isolate);
     int32_t* memory_array = reinterpret_cast<int32_t*>(memory->backing_store());
 
     InterruptThread thread(isolate, memory_array);
@@ -736,7 +725,7 @@
     static const int kPageSize = 0x10000;
     // Initial memory size = 16 + GrowMemory(10)
     static const int index = kPageSize * 17 + 4;
-    int value = 0xaced;
+    int value = 0xACED;
     TestSignatures sigs;
     v8::internal::AccountingAllocator allocator;
     Zone zone(&allocator, ZONE_NAME);
@@ -758,7 +747,7 @@
     static const int kPageSize = 0x10000;
     // Initial memory size = 16 + GrowMemory(10)
     static const int index = kPageSize * 26 + 4;
-    int value = 0xaced;
+    int value = 0xACED;
     TestSignatures sigs;
     Isolate* isolate = CcTest::InitIsolateOnce();
     Zone zone(isolate->allocator(), ZONE_NAME);
@@ -797,7 +786,7 @@
     Handle<Object> params[1] = {Handle<Object>(Smi::FromInt(1), isolate)};
     int32_t result =
         testing::RunWasmModuleForTesting(isolate, instance, 1, params);
-    CHECK_EQ(0xaced, result);
+    CHECK_EQ(0xACED, result);
   }
   Cleanup();
 }
@@ -805,7 +794,7 @@
 TEST(Run_WasmModule_GrowMemOobVariableIndex) {
   {
     static const int kPageSize = 0x10000;
-    int value = 0xaced;
+    int value = 0xACED;
     TestSignatures sigs;
     Isolate* isolate = CcTest::InitIsolateOnce();
     v8::internal::AccountingAllocator allocator;
@@ -848,7 +837,7 @@
           Handle<Object>(Smi::FromInt((20 + i) * kPageSize - 4), isolate)};
       int32_t result =
           testing::RunWasmModuleForTesting(isolate, instance, 1, params);
-      CHECK_EQ(0xaced, result);
+      CHECK_EQ(0xACED, result);
     }
 
     v8::TryCatch try_catch(reinterpret_cast<v8::Isolate*>(isolate));
@@ -939,18 +928,18 @@
     ErrorThrower thrower(isolate, "Run_WasmModule_InitDataAtTheUpperLimit");
 
     const byte data[] = {
-        WASM_MODULE_HEADER,     // --
-        kMemorySectionCode,     // --
-        U32V_1(4),              // section size
-        ENTRY_COUNT(1),         // --
-        kResizableMaximumFlag,  // --
-        1,                      // initial size
-        2,                      // maximum size
-        kDataSectionCode,       // --
-        U32V_1(9),              // section size
-        ENTRY_COUNT(1),         // --
-        0,                      // linear memory index
-        WASM_I32V_3(0xffff),    // destination offset
+        WASM_MODULE_HEADER,   // --
+        kMemorySectionCode,   // --
+        U32V_1(4),            // section size
+        ENTRY_COUNT(1),       // --
+        kHasMaximumFlag,      // --
+        1,                    // initial size
+        2,                    // maximum size
+        kDataSectionCode,     // --
+        U32V_1(9),            // section size
+        ENTRY_COUNT(1),       // --
+        0,                    // linear memory index
+        WASM_I32V_3(0xFFFF),  // destination offset
         kExprEnd,
         U32V_1(1),  // source size
         'c'         // data bytes
@@ -961,7 +950,7 @@
                               {});
     if (thrower.error()) {
       thrower.Reify()->Print();
-      CHECK(false);
+      FATAL("compile or instantiate error");
     }
   }
   Cleanup();
@@ -976,18 +965,18 @@
     ErrorThrower thrower(isolate, "Run_WasmModule_InitDataAtTheUpperLimit");
 
     const byte data[] = {
-        WASM_MODULE_HEADER,     // --
-        kMemorySectionCode,     // --
-        U32V_1(4),              // section size
-        ENTRY_COUNT(1),         // --
-        kResizableMaximumFlag,  // --
-        0,                      // initial size
-        0,                      // maximum size
-        kDataSectionCode,       // --
-        U32V_1(7),              // section size
-        ENTRY_COUNT(1),         // --
-        0,                      // linear memory index
-        WASM_I32V_1(8),         // destination offset
+        WASM_MODULE_HEADER,  // --
+        kMemorySectionCode,  // --
+        U32V_1(4),           // section size
+        ENTRY_COUNT(1),      // --
+        kHasMaximumFlag,     // --
+        0,                   // initial size
+        0,                   // maximum size
+        kDataSectionCode,    // --
+        U32V_1(7),           // section size
+        ENTRY_COUNT(1),      // --
+        0,                   // linear memory index
+        WASM_I32V_1(8),      // destination offset
         kExprEnd,
         U32V_1(1),  // source size
         'c'         // data bytes
@@ -1011,18 +1000,18 @@
     ErrorThrower thrower(isolate, "Run_WasmModule_InitDataAtTheUpperLimit");
 
     const byte data[] = {
-        WASM_MODULE_HEADER,     // --
-        kMemorySectionCode,     // --
-        U32V_1(4),              // section size
-        ENTRY_COUNT(1),         // --
-        kResizableMaximumFlag,  // --
-        0,                      // initial size
-        0,                      // maximum size
-        kDataSectionCode,       // --
-        U32V_1(6),              // section size
-        ENTRY_COUNT(1),         // --
-        0,                      // linear memory index
-        WASM_I32V_1(0),         // destination offset
+        WASM_MODULE_HEADER,  // --
+        kMemorySectionCode,  // --
+        U32V_1(4),           // section size
+        ENTRY_COUNT(1),      // --
+        kHasMaximumFlag,     // --
+        0,                   // initial size
+        0,                   // maximum size
+        kDataSectionCode,    // --
+        U32V_1(6),           // section size
+        ENTRY_COUNT(1),      // --
+        0,                   // linear memory index
+        WASM_I32V_1(0),      // destination offset
         kExprEnd,
         U32V_1(0),  // source size
     };
@@ -1049,14 +1038,14 @@
         kMemorySectionCode,      // --
         U32V_1(4),               // section size
         ENTRY_COUNT(1),          // --
-        kResizableMaximumFlag,   // --
+        kHasMaximumFlag,         // --
         1,                       // initial size
         1,                       // maximum size
         kDataSectionCode,        // --
         U32V_1(9),               // section size
         ENTRY_COUNT(1),          // --
         0,                       // linear memory index
-        WASM_I32V_4(0x2468ace),  // destination offset
+        WASM_I32V_4(0x2468ACE),  // destination offset
         kExprEnd,
         U32V_1(0),  // source size
     };
@@ -1070,12 +1059,35 @@
   Cleanup();
 }
 
+// Utility to free the allocated memory for a buffer that is manually
+// externalized in a test.
+struct ManuallyExternalizedBuffer {
+  Isolate* isolate_;
+  Handle<JSArrayBuffer> buffer_;
+  void* allocation_base_;
+  size_t allocation_length_;
+
+  ManuallyExternalizedBuffer(JSArrayBuffer* buffer, Isolate* isolate)
+      : isolate_(isolate),
+        buffer_(buffer, isolate),
+        allocation_base_(buffer->allocation_base()),
+        allocation_length_(buffer->allocation_length()) {
+    if (!buffer->has_guard_region()) {
+      v8::Utils::ToLocal(buffer_)->Externalize();
+    }
+  }
+  ~ManuallyExternalizedBuffer() {
+    if (!buffer_->has_guard_region()) {
+      isolate_->array_buffer_allocator()->Free(
+          allocation_base_, allocation_length_, buffer_->allocation_mode());
+    }
+  }
+};
+
 TEST(Run_WasmModule_Buffer_Externalized_GrowMem) {
   {
     Isolate* isolate = CcTest::InitIsolateOnce();
     HandleScope scope(isolate);
-    // Initial memory size = 16 + GrowWebAssemblyMemory(4) + GrowMemory(6)
-    static const int kExpectedValue = 26;
     TestSignatures sigs;
     v8::internal::AccountingAllocator allocator;
     Zone zone(&allocator, ZONE_NAME);
@@ -1096,46 +1108,28 @@
                                   ModuleWireBytes(buffer.begin(), buffer.end()),
                                   {}, {})
             .ToHandleChecked();
-    Handle<JSArrayBuffer> memory(instance->memory_buffer(), isolate);
-    Handle<WasmMemoryObject> mem_obj(instance->memory_object(), isolate);
-    void* const old_allocation_base = memory->allocation_base();
-    size_t const old_allocation_length = memory->allocation_length();
+    Handle<WasmMemoryObject> memory_object(instance->memory_object(), isolate);
 
-    // Fake the Embedder flow by externalizing the memory object, and grow.
-    v8::Utils::ToLocal(memory)->Externalize();
+    // Fake the Embedder flow by externalizing the array buffer.
+    ManuallyExternalizedBuffer buffer1(memory_object->array_buffer(), isolate);
 
-    uint32_t result = WasmMemoryObject::Grow(isolate, mem_obj, 4);
-    bool free_memory = !memory->has_guard_region();
-    if (!free_memory) {
-      // current_pages = Initial memory size(16) + GrowWebAssemblyMemory(4)
-      const uint32_t current_pages = 20;
-      i::WasmMemoryObject::SetupNewBufferWithSameBackingStore(isolate, mem_obj,
-                                                              current_pages);
-    }
-    wasm::DetachMemoryBuffer(isolate, memory, free_memory);
+    // Grow using the API.
+    uint32_t result = WasmMemoryObject::Grow(isolate, memory_object, 4);
     CHECK_EQ(16, result);
-    memory = handle(mem_obj->array_buffer());
-    instance->set_memory_buffer(*memory);
-    // Externalize should make no difference without the JS API as in this case
-    // the buffer is not detached.
-    v8::Utils::ToLocal(memory)->Externalize();
+    CHECK(buffer1.buffer_->was_neutered());  // growing always neuters
+    CHECK_EQ(0, buffer1.buffer_->byte_length()->Number());
+
+    CHECK_NE(*buffer1.buffer_, memory_object->array_buffer());
+
+    // Fake the Embedder flow by externalizing the array buffer.
+    ManuallyExternalizedBuffer buffer2(memory_object->array_buffer(), isolate);
+
+    // Grow using an internal WASM bytecode.
     result = testing::RunWasmModuleForTesting(isolate, instance, 0, nullptr);
-    CHECK_EQ(kExpectedValue, result);
-    // Free the buffer as the tracker does not know about it.
-    const v8::ArrayBuffer::Allocator::AllocationMode allocation_mode =
-        memory->allocation_mode();
-    CHECK_NOT_NULL(memory->allocation_base());
-    isolate->array_buffer_allocator()->Free(memory->allocation_base(),
-                                            memory->allocation_length(),
-                                            allocation_mode);
-    if (free_memory) {
-      // GrowMemory without guard pages enabled allocates an extra buffer,
-      // that needs to be freed as well
-      isolate->array_buffer_allocator()->Free(
-          old_allocation_base, old_allocation_length, allocation_mode);
-    }
-    memory->set_allocation_base(nullptr);
-    memory->set_allocation_length(0);
+    CHECK_EQ(26, result);
+    CHECK(buffer2.buffer_->was_neutered());  // growing always neuters
+    CHECK_EQ(0, buffer2.buffer_->byte_length()->Number());
+    CHECK_NE(*buffer2.buffer_, memory_object->array_buffer());
   }
   Cleanup();
 }
@@ -1145,19 +1139,17 @@
     Isolate* isolate = CcTest::InitIsolateOnce();
     HandleScope scope(isolate);
     void* backing_store =
-        isolate->array_buffer_allocator()->Allocate(16 * WasmModule::kPageSize);
-    Handle<JSArrayBuffer> buffer = wasm::SetupArrayBuffer(
-        isolate, backing_store, 16 * WasmModule::kPageSize, backing_store,
-        16 * WasmModule::kPageSize, false, false);
+        isolate->array_buffer_allocator()->Allocate(16 * kWasmPageSize);
+    Handle<JSArrayBuffer> buffer =
+        wasm::SetupArrayBuffer(isolate, backing_store, 16 * kWasmPageSize,
+                               backing_store, 16 * kWasmPageSize, false, false);
     Handle<WasmMemoryObject> mem_obj =
         WasmMemoryObject::New(isolate, buffer, 100);
     v8::Utils::ToLocal(buffer)->Externalize();
     int32_t result = WasmMemoryObject::Grow(isolate, mem_obj, 0);
-    wasm::DetachMemoryBuffer(isolate, buffer, false);
     CHECK_EQ(16, result);
 
-    isolate->array_buffer_allocator()->Free(backing_store,
-                                            16 * WasmModule::kPageSize);
+    isolate->array_buffer_allocator()->Free(backing_store, 16 * kWasmPageSize);
   }
   Cleanup();
 }
@@ -1169,14 +1161,49 @@
     Isolate* isolate = CcTest::InitIsolateOnce();
     HandleScope scope(isolate);
     void* backing_store =
-        isolate->array_buffer_allocator()->Allocate(16 * WasmModule::kPageSize);
-    Handle<JSArrayBuffer> buffer = wasm::SetupArrayBuffer(
-        isolate, backing_store, 16 * WasmModule::kPageSize, backing_store,
-        16 * WasmModule::kPageSize, false, false);
+        isolate->array_buffer_allocator()->Allocate(16 * kWasmPageSize);
+    Handle<JSArrayBuffer> buffer =
+        wasm::SetupArrayBuffer(isolate, backing_store, 16 * kWasmPageSize,
+                               backing_store, 16 * kWasmPageSize, false, false);
     v8::Utils::ToLocal(buffer)->Externalize();
     wasm::DetachMemoryBuffer(isolate, buffer, true);
-    isolate->array_buffer_allocator()->Free(backing_store,
-                                            16 * WasmModule::kPageSize);
+    isolate->array_buffer_allocator()->Free(backing_store, 16 * kWasmPageSize);
+  }
+  Cleanup();
+}
+
+TEST(AtomicOpDisassembly) {
+  {
+    EXPERIMENTAL_FLAG_SCOPE(threads);
+    TestSignatures sigs;
+    Isolate* isolate = CcTest::InitIsolateOnce();
+    v8::internal::AccountingAllocator allocator;
+    Zone zone(&allocator, ZONE_NAME);
+
+    WasmModuleBuilder* builder = new (&zone) WasmModuleBuilder(&zone);
+    builder->SetHasSharedMemory();
+    builder->SetMaxMemorySize(16);
+    WasmFunctionBuilder* f = builder->AddFunction(sigs.i_i());
+    ExportAsMain(f);
+    byte code[] = {
+        WASM_ATOMICS_STORE_OP(kExprI32AtomicStore, WASM_ZERO, WASM_GET_LOCAL(0),
+                              MachineRepresentation::kWord32),
+        WASM_ATOMICS_LOAD_OP(kExprI32AtomicLoad, WASM_ZERO,
+                             MachineRepresentation::kWord32)};
+    EMIT_CODE_WITH_END(f, code);
+
+    HandleScope scope(isolate);
+    ZoneBuffer buffer(&zone);
+    builder->WriteTo(buffer);
+    testing::SetupIsolateForWasmModule(isolate);
+
+    ErrorThrower thrower(isolate, "Test");
+    MaybeHandle<WasmModuleObject> module_object = SyncCompile(
+        isolate, &thrower, ModuleWireBytes(buffer.begin(), buffer.end()));
+
+    Handle<WasmCompiledModule> compiled_module(
+        module_object.ToHandleChecked()->compiled_module(), isolate);
+    compiled_module->shared()->DisassembleFunction(0);
   }
   Cleanup();
 }
diff --git a/src/v8/test/cctest/wasm/test-run-wasm-relocation.cc b/src/v8/test/cctest/wasm/test-run-wasm-relocation.cc
index 030b7a4..482ab9e 100644
--- a/src/v8/test/cctest/wasm/test-run-wasm-relocation.cc
+++ b/src/v8/test/cctest/wasm/test-run-wasm-relocation.cc
@@ -17,54 +17,51 @@
 namespace wasm {
 namespace test_run_wasm_relocation {
 
-#define FOREACH_TYPE(TEST_BODY)    \
-  TEST_BODY(int32_t, WASM_I32_ADD) \
-  TEST_BODY(int64_t, WASM_I64_ADD) \
-  TEST_BODY(float, WASM_F32_ADD)   \
-  TEST_BODY(double, WASM_F64_ADD)
+WASM_COMPILED_EXEC_TEST(RunPatchWasmContext) {
+  WasmRunner<uint32_t, uint32_t> r(execution_mode);
+  Isolate* isolate = CcTest::i_isolate();
 
-#define LOAD_SET_GLOBAL_TEST_BODY(C_TYPE, ADD)                                 \
-  WASM_EXEC_TEST(WasmRelocateGlobal_##C_TYPE) {                                \
-    WasmRunner<C_TYPE, C_TYPE> r(execution_mode);                              \
-    Isolate* isolate = CcTest::i_isolate();                                    \
-                                                                               \
-    r.builder().AddGlobal<C_TYPE>();                                           \
-    r.builder().AddGlobal<C_TYPE>();                                           \
-                                                                               \
-    /* global = global + p0 */                                                 \
-    BUILD(r, WASM_SET_GLOBAL(1, ADD(WASM_GET_GLOBAL(0), WASM_GET_LOCAL(0))),   \
-          WASM_GET_GLOBAL(0));                                                 \
-    CHECK_EQ(1, r.builder().CodeTableLength());                                \
-                                                                               \
-    int filter = 1 << RelocInfo::WASM_GLOBAL_REFERENCE;                        \
-                                                                               \
-    Handle<Code> code = r.builder().GetFunctionCode(0);                        \
-                                                                               \
-    Address old_start = r.builder().globals_start();                           \
-    Address new_start = old_start + 1;                                         \
-                                                                               \
-    Address old_addresses[4];                                                  \
-    uint32_t address_index = 0U;                                               \
-    for (RelocIterator it(*code, filter); !it.done(); it.next()) {             \
-      old_addresses[address_index] = it.rinfo()->wasm_global_reference();      \
-      it.rinfo()->update_wasm_global_reference(isolate, old_start, new_start); \
-      ++address_index;                                                         \
-    }                                                                          \
-    CHECK_LE(address_index, 4U);                                               \
-                                                                               \
-    address_index = 0U;                                                        \
-    for (RelocIterator it(*code, filter); !it.done(); it.next()) {             \
-      CHECK_EQ(old_addresses[address_index] + 1,                               \
-               it.rinfo()->wasm_global_reference());                           \
-      ++address_index;                                                         \
-    }                                                                          \
-    CHECK_LE(address_index, 4U);                                               \
+  r.builder().AddGlobal<uint32_t>();
+  r.builder().AddGlobal<uint32_t>();
+
+  BUILD(r, WASM_SET_GLOBAL(0, WASM_GET_LOCAL(0)), WASM_GET_GLOBAL(0));
+  CHECK_EQ(1, r.builder().CodeTableLength());
+
+  // Run with the old global data.
+  CHECK_EQ(113, r.Call(113));
+
+  WasmContext* old_wasm_context =
+      r.builder().instance_object()->wasm_context()->get();
+  Address old_wasm_context_address =
+      reinterpret_cast<Address>(old_wasm_context);
+
+  uint32_t new_global_data[3] = {0, 0, 0};
+  WasmContext new_wasm_context;
+  new_wasm_context.globals_start = reinterpret_cast<byte*>(new_global_data);
+
+  {
+    // TODO(6792): No longer needed once WebAssembly code is off heap.
+    CodeSpaceMemoryModificationScope modification_scope(isolate->heap());
+
+    // Patch in a new WasmContext that points to the new global data.
+    int filter = 1 << RelocInfo::WASM_CONTEXT_REFERENCE;
+    bool patched = false;
+    Handle<Code> code = r.GetWrapperCode();
+    for (RelocIterator it(*code, filter); !it.done(); it.next()) {
+      CHECK_EQ(old_wasm_context_address, it.rinfo()->wasm_context_reference());
+      it.rinfo()->set_wasm_context_reference(
+          isolate, reinterpret_cast<Address>(&new_wasm_context));
+      patched = true;
+    }
+    CHECK(patched);
+    Assembler::FlushICache(isolate, code->instruction_start(),
+                           code->instruction_size());
   }
 
-FOREACH_TYPE(LOAD_SET_GLOBAL_TEST_BODY)
-
-#undef FOREACH_TYPE
-#undef LOAD_SET_GLOBAL_TEST_BODY
+  // Run with the new global data.
+  CHECK_EQ(115, r.Call(115));
+  CHECK_EQ(115, new_global_data[0]);
+}
 
 }  // namespace test_run_wasm_relocation
 }  // namespace wasm
diff --git a/src/v8/test/cctest/wasm/test-run-wasm-simd.cc b/src/v8/test/cctest/wasm/test-run-wasm-simd.cc
index 7346732..1a97cdc 100644
--- a/src/v8/test/cctest/wasm/test-run-wasm-simd.cc
+++ b/src/v8/test/cctest/wasm/test-run-wasm-simd.cc
@@ -31,20 +31,25 @@
 typedef int (*Int8CompareOp)(int8_t, int8_t);
 typedef int8_t (*Int8ShiftOp)(int8_t, int);
 
-#if !V8_TARGET_ARCH_ARM && !V8_TARGET_ARCH_ARM64 && !V8_TARGET_ARCH_X64 && \
-    !V8_TARGET_ARCH_IA32 && !V8_TARGET_ARCH_MIPS && !V8_TARGET_ARCH_MIPS64
-#define SIMD_LOWERING_TARGET 1
-#else
-#define SIMD_LOWERING_TARGET 0
-#endif
+#define WASM_SIMD_TEST(name)                        \
+  void RunWasm_##name##_Impl(LowerSimd lower_simd); \
+  TEST(RunWasm_##name##_compiled) {                 \
+    EXPERIMENTAL_FLAG_SCOPE(simd);                  \
+    RunWasm_##name##_Impl(kNoLowerSimd);            \
+  }                                                 \
+  TEST(RunWasm_##name##_simd_lowered) {             \
+    EXPERIMENTAL_FLAG_SCOPE(simd);                  \
+    RunWasm_##name##_Impl(kLowerSimd);              \
+  }                                                 \
+  void RunWasm_##name##_Impl(LowerSimd lower_simd)
 
-#define WASM_SIMD_TEST(name)       \
-  void RunWasm_##name##_Impl();    \
-  TEST(RunWasm_##name) {           \
-    EXPERIMENTAL_FLAG_SCOPE(simd); \
-    RunWasm_##name##_Impl();       \
-  }                                \
-  void RunWasm_##name##_Impl()
+#define WASM_SIMD_COMPILED_TEST(name)               \
+  void RunWasm_##name##_Impl(LowerSimd lower_simd); \
+  TEST(RunWasm_##name##_compiled) {                 \
+    EXPERIMENTAL_FLAG_SCOPE(simd);                  \
+    RunWasm_##name##_Impl(kNoLowerSimd);            \
+  }                                                 \
+  void RunWasm_##name##_Impl(LowerSimd lower_simd)
 
 // Generic expected value functions.
 template <typename T>
@@ -82,25 +87,6 @@
   return a >= b ? a : b;
 }
 
-// For float operands, Min and Max must return NaN if either operand is NaN.
-#if V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_ARM64 || SIMD_LOWERING_TARGET || \
-    V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_MIPS64
-template <>
-float Minimum(float a, float b) {
-  if (std::isnan(a) || std::isnan(b))
-    return std::numeric_limits<float>::quiet_NaN();
-  return a <= b ? a : b;
-}
-
-template <>
-float Maximum(float a, float b) {
-  if (std::isnan(a) || std::isnan(b))
-    return std::numeric_limits<float>::quiet_NaN();
-  return a >= b ? a : b;
-}
-#endif  // V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_ARM64 || SIMD_LOWERING_TARGET ||
-        // V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_MIPS64
-
 template <typename T>
 T UnsignedMinimum(T a, T b) {
   using UnsignedT = typename std::make_unsigned<T>::type;
@@ -209,7 +195,7 @@
 T UnsignedNarrow(int64_t value) {
   static_assert(sizeof(int64_t) > sizeof(T), "T must be int32_t or smaller");
   using UnsignedT = typename std::make_unsigned<T>::type;
-  return static_cast<T>(Clamp<UnsignedT>(value & 0xffffffffu));
+  return static_cast<T>(Clamp<UnsignedT>(value & 0xFFFFFFFFu));
 }
 
 template <typename T>
@@ -419,10 +405,8 @@
 // doesn't handle NaNs. Also skip extreme values.
 bool SkipFPExpectedValue(float x) { return std::isnan(x) || SkipFPValue(x); }
 
-#if V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_ARM64 || SIMD_LOWERING_TARGET || \
-    V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_MIPS64
 WASM_SIMD_TEST(F32x4Splat) {
-  WasmRunner<int32_t, float> r(kExecuteCompiled);
+  WasmRunner<int32_t, float> r(kExecuteTurbofan, lower_simd);
   byte lane_val = 0;
   byte simd = r.AllocateLocal(kWasmS128);
   BUILD(r,
@@ -436,7 +420,7 @@
 }
 
 WASM_SIMD_TEST(F32x4ReplaceLane) {
-  WasmRunner<int32_t, float, float> r(kExecuteCompiled);
+  WasmRunner<int32_t, float, float> r(kExecuteTurbofan, lower_simd);
   byte old_val = 0;
   byte new_val = 1;
   byte simd = r.AllocateLocal(kWasmS128);
@@ -461,9 +445,11 @@
   CHECK_EQ(1, r.Call(3.14159f, -1.5f));
 }
 
+#if V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_ARM64 || V8_TARGET_ARCH_MIPS || \
+    V8_TARGET_ARCH_MIPS64
 // Tests both signed and unsigned conversion.
 WASM_SIMD_TEST(F32x4ConvertI32x4) {
-  WasmRunner<int32_t, int32_t, float, float> r(kExecuteCompiled);
+  WasmRunner<int32_t, int32_t, float, float> r(kExecuteTurbofan, lower_simd);
   byte a = 0;
   byte expected_signed = 1;
   byte expected_unsigned = 2;
@@ -484,14 +470,12 @@
                        static_cast<float>(static_cast<uint32_t>(*i))));
   }
 }
-#endif  // V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_ARM64 || SIMD_LOWERING_TARGET ||
-        // V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_MIPS64
+#endif  // V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_ARM64 || V8_TARGET_ARCH_MIPS ||
+        // V8_TARGET_ARCH_MIPS64
 
-#if V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_ARM64 || SIMD_LOWERING_TARGET || \
-    V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_MIPS64
-void RunF32x4UnOpTest(WasmOpcode simd_op, FloatUnOp expected_op,
-                      float error = 0.0f) {
-  WasmRunner<int32_t, float, float, float> r(kExecuteCompiled);
+void RunF32x4UnOpTest(LowerSimd lower_simd, WasmOpcode simd_op,
+                      FloatUnOp expected_op, float error = 0.0f) {
+  WasmRunner<int32_t, float, float, float> r(kExecuteTurbofan, lower_simd);
   byte a = 0;
   byte low = 1;
   byte high = 2;
@@ -510,29 +494,35 @@
   }
 }
 
-WASM_SIMD_TEST(F32x4Abs) { RunF32x4UnOpTest(kExprF32x4Abs, std::abs); }
-WASM_SIMD_TEST(F32x4Neg) { RunF32x4UnOpTest(kExprF32x4Neg, Negate); }
-#endif  // V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_ARM64 || SIMD_LOWERING_TARGET ||
-        // V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_MIPS64
-
 #if V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_ARM64 || V8_TARGET_ARCH_MIPS || \
-    V8_TARGET_ARCH_MIPS64
-static const float kApproxError = 0.01f;
-
-WASM_SIMD_TEST(F32x4RecipApprox) {
-  RunF32x4UnOpTest(kExprF32x4RecipApprox, Recip, kApproxError);
+    V8_TARGET_ARCH_MIPS64 || V8_TARGET_ARCH_IA32
+WASM_SIMD_TEST(F32x4Abs) {
+  RunF32x4UnOpTest(lower_simd, kExprF32x4Abs, std::abs);
 }
-
-WASM_SIMD_TEST(F32x4RecipSqrtApprox) {
-  RunF32x4UnOpTest(kExprF32x4RecipSqrtApprox, RecipSqrt, kApproxError);
+WASM_SIMD_TEST(F32x4Neg) {
+  RunF32x4UnOpTest(lower_simd, kExprF32x4Neg, Negate);
 }
 #endif  // V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_ARM64 || V8_TARGET_ARCH_MIPS ||
-        // V8_TARGET_ARCH_MIPS64
+        // V8_TARGET_ARCH_MIPS64 || V8_TARGET_ARCH_IA32
 
-#if V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_ARM64 || SIMD_LOWERING_TARGET || \
-    V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_MIPS64
-void RunF32x4BinOpTest(WasmOpcode simd_op, FloatBinOp expected_op) {
-  WasmRunner<int32_t, float, float, float> r(kExecuteCompiled);
+#if V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_ARM64 || V8_TARGET_ARCH_MIPS || \
+    V8_TARGET_ARCH_MIPS64 || V8_TARGET_ARCH_X64
+static const float kApproxError = 0.01f;
+
+WASM_SIMD_COMPILED_TEST(F32x4RecipApprox) {
+  RunF32x4UnOpTest(lower_simd, kExprF32x4RecipApprox, Recip, kApproxError);
+}
+
+WASM_SIMD_COMPILED_TEST(F32x4RecipSqrtApprox) {
+  RunF32x4UnOpTest(lower_simd, kExprF32x4RecipSqrtApprox, RecipSqrt,
+                   kApproxError);
+}
+#endif  // V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_ARM64 || V8_TARGET_ARCH_MIPS ||
+        // V8_TARGET_ARCH_MIPS64 || V8_TARGET_ARCH_X64
+
+void RunF32x4BinOpTest(LowerSimd lower_simd, WasmOpcode simd_op,
+                       FloatBinOp expected_op) {
+  WasmRunner<int32_t, float, float, float> r(kExecuteTurbofan, lower_simd);
   byte a = 0;
   byte b = 1;
   byte expected = 2;
@@ -555,18 +545,19 @@
   }
 }
 
-WASM_SIMD_TEST(F32x4Add) { RunF32x4BinOpTest(kExprF32x4Add, Add); }
-WASM_SIMD_TEST(F32x4Sub) { RunF32x4BinOpTest(kExprF32x4Sub, Sub); }
-WASM_SIMD_TEST(F32x4Mul) { RunF32x4BinOpTest(kExprF32x4Mul, Mul); }
-WASM_SIMD_TEST(F32x4_Min) { RunF32x4BinOpTest(kExprF32x4Min, Minimum); }
-WASM_SIMD_TEST(F32x4_Max) { RunF32x4BinOpTest(kExprF32x4Max, Maximum); }
-#endif  // V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_ARM64 || SIMD_LOWERING_TARGET ||
-        // V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_MIPS64
+WASM_SIMD_TEST(F32x4Add) { RunF32x4BinOpTest(lower_simd, kExprF32x4Add, Add); }
+WASM_SIMD_TEST(F32x4Sub) { RunF32x4BinOpTest(lower_simd, kExprF32x4Sub, Sub); }
+WASM_SIMD_TEST(F32x4Mul) { RunF32x4BinOpTest(lower_simd, kExprF32x4Mul, Mul); }
+WASM_SIMD_TEST(F32x4_Min) {
+  RunF32x4BinOpTest(lower_simd, kExprF32x4Min, JSMin);
+}
+WASM_SIMD_TEST(F32x4_Max) {
+  RunF32x4BinOpTest(lower_simd, kExprF32x4Max, JSMax);
+}
 
-#if V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_ARM64 || SIMD_LOWERING_TARGET || \
-    V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_MIPS64
-void RunF32x4CompareOpTest(WasmOpcode simd_op, FloatCompareOp expected_op) {
-  WasmRunner<int32_t, float, float, int32_t> r(kExecuteCompiled);
+void RunF32x4CompareOpTest(LowerSimd lower_simd, WasmOpcode simd_op,
+                           FloatCompareOp expected_op) {
+  WasmRunner<int32_t, float, float, int32_t> r(kExecuteTurbofan, lower_simd);
   byte a = 0;
   byte b = 1;
   byte expected = 2;
@@ -589,19 +580,29 @@
   }
 }
 
-WASM_SIMD_TEST(F32x4Eq) { RunF32x4CompareOpTest(kExprF32x4Eq, Equal); }
+WASM_SIMD_TEST(F32x4Eq) {
+  RunF32x4CompareOpTest(lower_simd, kExprF32x4Eq, Equal);
+}
 
-WASM_SIMD_TEST(F32x4Ne) { RunF32x4CompareOpTest(kExprF32x4Ne, NotEqual); }
+WASM_SIMD_TEST(F32x4Ne) {
+  RunF32x4CompareOpTest(lower_simd, kExprF32x4Ne, NotEqual);
+}
 
-WASM_SIMD_TEST(F32x4Gt) { RunF32x4CompareOpTest(kExprF32x4Gt, Greater); }
+WASM_SIMD_TEST(F32x4Gt) {
+  RunF32x4CompareOpTest(lower_simd, kExprF32x4Gt, Greater);
+}
 
-WASM_SIMD_TEST(F32x4Ge) { RunF32x4CompareOpTest(kExprF32x4Ge, GreaterEqual); }
+WASM_SIMD_TEST(F32x4Ge) {
+  RunF32x4CompareOpTest(lower_simd, kExprF32x4Ge, GreaterEqual);
+}
 
-WASM_SIMD_TEST(F32x4Lt) { RunF32x4CompareOpTest(kExprF32x4Lt, Less); }
+WASM_SIMD_TEST(F32x4Lt) {
+  RunF32x4CompareOpTest(lower_simd, kExprF32x4Lt, Less);
+}
 
-WASM_SIMD_TEST(F32x4Le) { RunF32x4CompareOpTest(kExprF32x4Le, LessEqual); }
-#endif  // V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_ARM64 || SIMD_LOWERING_TARGET ||
-        // V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_MIPS64
+WASM_SIMD_TEST(F32x4Le) {
+  RunF32x4CompareOpTest(lower_simd, kExprF32x4Le, LessEqual);
+}
 
 WASM_SIMD_TEST(I32x4Splat) {
   // Store SIMD value in a local variable, use extract lane to check lane values
@@ -614,7 +615,7 @@
   //   return 0
   //
   // return 1
-  WasmRunner<int32_t, int32_t> r(kExecuteCompiled);
+  WasmRunner<int32_t, int32_t> r(kExecuteTurbofan, lower_simd);
   byte lane_val = 0;
   byte simd = r.AllocateLocal(kWasmS128);
   BUILD(r,
@@ -625,7 +626,7 @@
 }
 
 WASM_SIMD_TEST(I32x4ReplaceLane) {
-  WasmRunner<int32_t, int32_t, int32_t> r(kExecuteCompiled);
+  WasmRunner<int32_t, int32_t, int32_t> r(kExecuteTurbofan, lower_simd);
   byte old_val = 0;
   byte new_val = 1;
   byte simd = r.AllocateLocal(kWasmS128);
@@ -651,7 +652,7 @@
 }
 
 WASM_SIMD_TEST(I16x8Splat) {
-  WasmRunner<int32_t, int32_t> r(kExecuteCompiled);
+  WasmRunner<int32_t, int32_t> r(kExecuteTurbofan, lower_simd);
   byte lane_val = 0;
   byte simd = r.AllocateLocal(kWasmS128);
   BUILD(r,
@@ -662,7 +663,7 @@
 }
 
 WASM_SIMD_TEST(I16x8ReplaceLane) {
-  WasmRunner<int32_t, int32_t, int32_t> r(kExecuteCompiled);
+  WasmRunner<int32_t, int32_t, int32_t> r(kExecuteTurbofan, lower_simd);
   byte old_val = 0;
   byte new_val = 1;
   byte simd = r.AllocateLocal(kWasmS128);
@@ -711,7 +712,7 @@
 }
 
 WASM_SIMD_TEST(I8x16Splat) {
-  WasmRunner<int32_t, int32_t> r(kExecuteCompiled);
+  WasmRunner<int32_t, int32_t> r(kExecuteTurbofan, lower_simd);
   byte lane_val = 0;
   byte simd = r.AllocateLocal(kWasmS128);
   BUILD(r,
@@ -722,7 +723,7 @@
 }
 
 WASM_SIMD_TEST(I8x16ReplaceLane) {
-  WasmRunner<int32_t, int32_t, int32_t> r(kExecuteCompiled);
+  WasmRunner<int32_t, int32_t, int32_t> r(kExecuteTurbofan, lower_simd);
   byte old_val = 0;
   byte new_val = 1;
   byte simd = r.AllocateLocal(kWasmS128);
@@ -825,11 +826,11 @@
   CHECK_EQ(1, r.Call(1, 2));
 }
 
-#if V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_ARM64 || SIMD_LOWERING_TARGET || \
-    V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_MIPS64
+#if V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_ARM64 || V8_TARGET_ARCH_MIPS || \
+    V8_TARGET_ARCH_MIPS64
 // Determines if conversion from float to int will be valid.
 bool CanRoundToZeroAndConvert(double val, bool unsigned_integer) {
-  const double max_uint = static_cast<double>(0xffffffffu);
+  const double max_uint = static_cast<double>(0xFFFFFFFFu);
   const double max_int = static_cast<double>(kMaxInt);
   const double min_int = static_cast<double>(kMinInt);
 
@@ -850,7 +851,7 @@
     return 0;
   } else {
     if (unsigned_integer) {
-      return (val < 0) ? 0 : 0xffffffffu;
+      return (val < 0) ? 0 : 0xFFFFFFFFu;
     } else {
       return (val < 0) ? kMinInt : kMaxInt;
     }
@@ -869,7 +870,7 @@
 
 // Tests both signed and unsigned conversion.
 WASM_SIMD_TEST(I32x4ConvertF32x4) {
-  WasmRunner<int32_t, float, int32_t, int32_t> r(kExecuteCompiled);
+  WasmRunner<int32_t, float, int32_t, int32_t> r(kExecuteTurbofan, lower_simd);
   byte a = 0;
   byte expected_signed = 1;
   byte expected_unsigned = 2;
@@ -891,14 +892,11 @@
     CHECK_EQ(1, r.Call(*i, signed_value, unsigned_value));
   }
 }
-#endif  // V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_ARM64 || SIMD_LOWERING_TARGET ||
-        // V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_MIPS64
 
-#if V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_ARM64 || V8_TARGET_ARCH_MIPS || \
-    V8_TARGET_ARCH_MIPS64
 // Tests both signed and unsigned conversion from I16x8 (unpacking).
-WASM_SIMD_TEST(I32x4ConvertI16x8) {
-  WasmRunner<int32_t, int32_t, int32_t, int32_t> r(kExecuteCompiled);
+WASM_SIMD_COMPILED_TEST(I32x4ConvertI16x8) {
+  WasmRunner<int32_t, int32_t, int32_t, int32_t> r(kExecuteTurbofan,
+                                                   lower_simd);
   byte a = 0;
   byte unpacked_signed = 1;
   byte unpacked_unsigned = 2;
@@ -923,8 +921,9 @@
 #endif  // V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_ARM64 || V8_TARGET_ARCH_MIPS ||
         // V8_TARGET_ARCH_MIPS64
 
-void RunI32x4UnOpTest(WasmOpcode simd_op, Int32UnOp expected_op) {
-  WasmRunner<int32_t, int32_t, int32_t> r(kExecuteCompiled);
+void RunI32x4UnOpTest(LowerSimd lower_simd, WasmOpcode simd_op,
+                      Int32UnOp expected_op) {
+  WasmRunner<int32_t, int32_t, int32_t> r(kExecuteTurbofan, lower_simd);
   byte a = 0;
   byte expected = 1;
   byte simd = r.AllocateLocal(kWasmS128);
@@ -935,62 +934,20 @@
   FOR_INT32_INPUTS(i) { CHECK_EQ(1, r.Call(*i, expected_op(*i))); }
 }
 
-WASM_SIMD_TEST(I32x4Neg) { RunI32x4UnOpTest(kExprI32x4Neg, Negate); }
-
-#if V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_ARM64 || SIMD_LOWERING_TARGET || \
-    V8_TARGET_ARCH_X64
-WASM_SIMD_TEST(S128Not) { RunI32x4UnOpTest(kExprS128Not, Not); }
-#endif  // V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_ARM64 || SIMD_LOWERING_TARGET
-        // V8_TARGET_ARCH_X64
-
-void RunI32x4BinOpTest(WasmOpcode simd_op, Int32BinOp expected_op) {
-  WasmRunner<int32_t, int32_t, int32_t, int32_t> r(kExecuteCompiled);
-  byte a = 0;
-  byte b = 1;
-  byte expected = 2;
-  byte simd0 = r.AllocateLocal(kWasmS128);
-  byte simd1 = r.AllocateLocal(kWasmS128);
-  BUILD(r, WASM_SET_LOCAL(simd0, WASM_SIMD_I32x4_SPLAT(WASM_GET_LOCAL(a))),
-        WASM_SET_LOCAL(simd1, WASM_SIMD_I32x4_SPLAT(WASM_GET_LOCAL(b))),
-        WASM_SET_LOCAL(simd1, WASM_SIMD_BINOP(simd_op, WASM_GET_LOCAL(simd0),
-                                              WASM_GET_LOCAL(simd1))),
-        WASM_SIMD_CHECK_SPLAT4(I32x4, simd1, I32, expected), WASM_ONE);
-
-  FOR_INT32_INPUTS(i) {
-    FOR_INT32_INPUTS(j) { CHECK_EQ(1, r.Call(*i, *j, expected_op(*i, *j))); }
-  }
-}
-
-WASM_SIMD_TEST(I32x4Add) { RunI32x4BinOpTest(kExprI32x4Add, Add); }
-
-WASM_SIMD_TEST(I32x4Sub) { RunI32x4BinOpTest(kExprI32x4Sub, Sub); }
-
-WASM_SIMD_TEST(I32x4Mul) { RunI32x4BinOpTest(kExprI32x4Mul, Mul); }
-
-WASM_SIMD_TEST(I32x4MinS) { RunI32x4BinOpTest(kExprI32x4MinS, Minimum); }
-
-WASM_SIMD_TEST(I32x4MaxS) { RunI32x4BinOpTest(kExprI32x4MaxS, Maximum); }
-
-WASM_SIMD_TEST(I32x4MinU) {
-  RunI32x4BinOpTest(kExprI32x4MinU, UnsignedMinimum);
-}
-
-WASM_SIMD_TEST(I32x4MaxU) {
-  RunI32x4BinOpTest(kExprI32x4MaxU, UnsignedMaximum);
+WASM_SIMD_TEST(I32x4Neg) {
+  RunI32x4UnOpTest(lower_simd, kExprI32x4Neg, Negate);
 }
 
 #if V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_ARM64 || V8_TARGET_ARCH_X64 || \
-    SIMD_LOWERING_TARGET || V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_MIPS64
-WASM_SIMD_TEST(S128And) { RunI32x4BinOpTest(kExprS128And, And); }
-
-WASM_SIMD_TEST(S128Or) { RunI32x4BinOpTest(kExprS128Or, Or); }
-
-WASM_SIMD_TEST(S128Xor) { RunI32x4BinOpTest(kExprS128Xor, Xor); }
+    V8_TARGET_ARCH_IA32
+WASM_SIMD_TEST(S128Not) { RunI32x4UnOpTest(lower_simd, kExprS128Not, Not); }
 #endif  // V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_ARM64 || V8_TARGET_ARCH_X64 ||
-        // SIMD_LOWERING_TARGET || V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_MIPS64
+        // V8_TARGET_ARCH_IA32
 
-void RunI32x4CompareOpTest(WasmOpcode simd_op, Int32CompareOp expected_op) {
-  WasmRunner<int32_t, int32_t, int32_t, int32_t> r(kExecuteCompiled);
+void RunI32x4BinOpTest(LowerSimd lower_simd, WasmOpcode simd_op,
+                       Int32BinOp expected_op) {
+  WasmRunner<int32_t, int32_t, int32_t, int32_t> r(kExecuteTurbofan,
+                                                   lower_simd);
   byte a = 0;
   byte b = 1;
   byte expected = 2;
@@ -1007,35 +964,97 @@
   }
 }
 
-WASM_SIMD_TEST(I32x4Eq) { RunI32x4CompareOpTest(kExprI32x4Eq, Equal); }
+WASM_SIMD_TEST(I32x4Add) { RunI32x4BinOpTest(lower_simd, kExprI32x4Add, Add); }
 
-WASM_SIMD_TEST(I32x4Ne) { RunI32x4CompareOpTest(kExprI32x4Ne, NotEqual); }
+WASM_SIMD_TEST(I32x4Sub) { RunI32x4BinOpTest(lower_simd, kExprI32x4Sub, Sub); }
 
-WASM_SIMD_TEST(I32x4LtS) { RunI32x4CompareOpTest(kExprI32x4LtS, Less); }
+WASM_SIMD_TEST(I32x4Mul) { RunI32x4BinOpTest(lower_simd, kExprI32x4Mul, Mul); }
 
-WASM_SIMD_TEST(I32x4LeS) { RunI32x4CompareOpTest(kExprI32x4LeS, LessEqual); }
+WASM_SIMD_TEST(I32x4MinS) {
+  RunI32x4BinOpTest(lower_simd, kExprI32x4MinS, Minimum);
+}
 
-WASM_SIMD_TEST(I32x4GtS) { RunI32x4CompareOpTest(kExprI32x4GtS, Greater); }
+WASM_SIMD_TEST(I32x4MaxS) {
+  RunI32x4BinOpTest(lower_simd, kExprI32x4MaxS, Maximum);
+}
 
-WASM_SIMD_TEST(I32x4GeS) { RunI32x4CompareOpTest(kExprI32x4GeS, GreaterEqual); }
+WASM_SIMD_TEST(I32x4MinU) {
+  RunI32x4BinOpTest(lower_simd, kExprI32x4MinU, UnsignedMinimum);
+}
 
-WASM_SIMD_TEST(I32x4LtU) { RunI32x4CompareOpTest(kExprI32x4LtU, UnsignedLess); }
+WASM_SIMD_TEST(I32x4MaxU) {
+  RunI32x4BinOpTest(lower_simd, kExprI32x4MaxU, UnsignedMaximum);
+}
+
+WASM_SIMD_TEST(S128And) { RunI32x4BinOpTest(lower_simd, kExprS128And, And); }
+
+WASM_SIMD_TEST(S128Or) { RunI32x4BinOpTest(lower_simd, kExprS128Or, Or); }
+
+WASM_SIMD_TEST(S128Xor) { RunI32x4BinOpTest(lower_simd, kExprS128Xor, Xor); }
+
+void RunI32x4CompareOpTest(LowerSimd lower_simd, WasmOpcode simd_op,
+                           Int32CompareOp expected_op) {
+  WasmRunner<int32_t, int32_t, int32_t, int32_t> r(kExecuteTurbofan,
+                                                   lower_simd);
+  byte a = 0;
+  byte b = 1;
+  byte expected = 2;
+  byte simd0 = r.AllocateLocal(kWasmS128);
+  byte simd1 = r.AllocateLocal(kWasmS128);
+  BUILD(r, WASM_SET_LOCAL(simd0, WASM_SIMD_I32x4_SPLAT(WASM_GET_LOCAL(a))),
+        WASM_SET_LOCAL(simd1, WASM_SIMD_I32x4_SPLAT(WASM_GET_LOCAL(b))),
+        WASM_SET_LOCAL(simd1, WASM_SIMD_BINOP(simd_op, WASM_GET_LOCAL(simd0),
+                                              WASM_GET_LOCAL(simd1))),
+        WASM_SIMD_CHECK_SPLAT4(I32x4, simd1, I32, expected), WASM_ONE);
+
+  FOR_INT32_INPUTS(i) {
+    FOR_INT32_INPUTS(j) { CHECK_EQ(1, r.Call(*i, *j, expected_op(*i, *j))); }
+  }
+}
+
+WASM_SIMD_TEST(I32x4Eq) {
+  RunI32x4CompareOpTest(lower_simd, kExprI32x4Eq, Equal);
+}
+
+WASM_SIMD_TEST(I32x4Ne) {
+  RunI32x4CompareOpTest(lower_simd, kExprI32x4Ne, NotEqual);
+}
+
+WASM_SIMD_TEST(I32x4LtS) {
+  RunI32x4CompareOpTest(lower_simd, kExprI32x4LtS, Less);
+}
+
+WASM_SIMD_TEST(I32x4LeS) {
+  RunI32x4CompareOpTest(lower_simd, kExprI32x4LeS, LessEqual);
+}
+
+WASM_SIMD_TEST(I32x4GtS) {
+  RunI32x4CompareOpTest(lower_simd, kExprI32x4GtS, Greater);
+}
+
+WASM_SIMD_TEST(I32x4GeS) {
+  RunI32x4CompareOpTest(lower_simd, kExprI32x4GeS, GreaterEqual);
+}
+
+WASM_SIMD_TEST(I32x4LtU) {
+  RunI32x4CompareOpTest(lower_simd, kExprI32x4LtU, UnsignedLess);
+}
 
 WASM_SIMD_TEST(I32x4LeU) {
-  RunI32x4CompareOpTest(kExprI32x4LeU, UnsignedLessEqual);
+  RunI32x4CompareOpTest(lower_simd, kExprI32x4LeU, UnsignedLessEqual);
 }
 
 WASM_SIMD_TEST(I32x4GtU) {
-  RunI32x4CompareOpTest(kExprI32x4GtU, UnsignedGreater);
+  RunI32x4CompareOpTest(lower_simd, kExprI32x4GtU, UnsignedGreater);
 }
 
 WASM_SIMD_TEST(I32x4GeU) {
-  RunI32x4CompareOpTest(kExprI32x4GeU, UnsignedGreaterEqual);
+  RunI32x4CompareOpTest(lower_simd, kExprI32x4GeU, UnsignedGreaterEqual);
 }
 
-void RunI32x4ShiftOpTest(WasmOpcode simd_op, Int32ShiftOp expected_op,
-                         int shift) {
-  WasmRunner<int32_t, int32_t, int32_t> r(kExecuteCompiled);
+void RunI32x4ShiftOpTest(LowerSimd lower_simd, WasmOpcode simd_op,
+                         Int32ShiftOp expected_op, int shift) {
+  WasmRunner<int32_t, int32_t, int32_t> r(kExecuteTurbofan, lower_simd);
   byte a = 0;
   byte expected = 1;
   byte simd = r.AllocateLocal(kWasmS128);
@@ -1048,22 +1067,23 @@
 }
 
 WASM_SIMD_TEST(I32x4Shl) {
-  RunI32x4ShiftOpTest(kExprI32x4Shl, LogicalShiftLeft, 1);
+  RunI32x4ShiftOpTest(lower_simd, kExprI32x4Shl, LogicalShiftLeft, 1);
 }
 
 WASM_SIMD_TEST(I32x4ShrS) {
-  RunI32x4ShiftOpTest(kExprI32x4ShrS, ArithmeticShiftRight, 1);
+  RunI32x4ShiftOpTest(lower_simd, kExprI32x4ShrS, ArithmeticShiftRight, 1);
 }
 
 WASM_SIMD_TEST(I32x4ShrU) {
-  RunI32x4ShiftOpTest(kExprI32x4ShrU, LogicalShiftRight, 1);
+  RunI32x4ShiftOpTest(lower_simd, kExprI32x4ShrU, LogicalShiftRight, 1);
 }
 
 #if V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_ARM64 || V8_TARGET_ARCH_MIPS || \
     V8_TARGET_ARCH_MIPS64
 // Tests both signed and unsigned conversion from I8x16 (unpacking).
-WASM_SIMD_TEST(I16x8ConvertI8x16) {
-  WasmRunner<int32_t, int32_t, int32_t, int32_t> r(kExecuteCompiled);
+WASM_SIMD_COMPILED_TEST(I16x8ConvertI8x16) {
+  WasmRunner<int32_t, int32_t, int32_t, int32_t> r(kExecuteTurbofan,
+                                                   lower_simd);
   byte a = 0;
   byte unpacked_signed = 1;
   byte unpacked_unsigned = 2;
@@ -1087,10 +1107,9 @@
 #endif  // V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_ARM64 || V8_TARGET_ARCH_MIPS ||
         // V8_TARGET_ARCH_MIPS64
 
-#if SIMD_LOWERING_TARGET || V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_ARM64 || \
-    V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_MIPS64 || V8_TARGET_ARCH_X64
-void RunI16x8UnOpTest(WasmOpcode simd_op, Int16UnOp expected_op) {
-  WasmRunner<int32_t, int32_t, int32_t> r(kExecuteCompiled);
+void RunI16x8UnOpTest(LowerSimd lower_simd, WasmOpcode simd_op,
+                      Int16UnOp expected_op) {
+  WasmRunner<int32_t, int32_t, int32_t> r(kExecuteTurbofan, lower_simd);
   byte a = 0;
   byte expected = 1;
   byte simd = r.AllocateLocal(kWasmS128);
@@ -1101,15 +1120,16 @@
   FOR_INT16_INPUTS(i) { CHECK_EQ(1, r.Call(*i, expected_op(*i))); }
 }
 
-WASM_SIMD_TEST(I16x8Neg) { RunI16x8UnOpTest(kExprI16x8Neg, Negate); }
-#endif  // SIMD_LOWERING_TARGET || V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_ARM64 ||
-        // V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_MIPS64 || V8_TARGET_ARCH_X64
+WASM_SIMD_TEST(I16x8Neg) {
+  RunI16x8UnOpTest(lower_simd, kExprI16x8Neg, Negate);
+}
 
 #if V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_ARM64 || V8_TARGET_ARCH_MIPS || \
     V8_TARGET_ARCH_MIPS64
 // Tests both signed and unsigned conversion from I32x4 (packing).
-WASM_SIMD_TEST(I16x8ConvertI32x4) {
-  WasmRunner<int32_t, int32_t, int32_t, int32_t> r(kExecuteCompiled);
+WASM_SIMD_COMPILED_TEST(I16x8ConvertI32x4) {
+  WasmRunner<int32_t, int32_t, int32_t, int32_t> r(kExecuteTurbofan,
+                                                   lower_simd);
   byte a = 0;
   byte packed_signed = 1;
   byte packed_unsigned = 2;
@@ -1130,17 +1150,17 @@
     int32_t packed_signed = Narrow<int16_t>(*i);
     int32_t packed_unsigned = UnsignedNarrow<int16_t>(*i);
     // Sign-extend here, since ExtractLane sign extends.
-    if (packed_unsigned & 0x8000) packed_unsigned |= 0xffff0000;
+    if (packed_unsigned & 0x8000) packed_unsigned |= 0xFFFF0000;
     CHECK_EQ(1, r.Call(*i, packed_signed, packed_unsigned));
   }
 }
 #endif  // V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_ARM64 || V8_TARGET_ARCH_MIPS ||
         // V8_TARGET_ARCH_MIPS64
 
-#if V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_ARM64 || V8_TARGET_ARCH_X64 || \
-    SIMD_LOWERING_TARGET || V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_MIPS64
-void RunI16x8BinOpTest(WasmOpcode simd_op, Int16BinOp expected_op) {
-  WasmRunner<int32_t, int32_t, int32_t, int32_t> r(kExecuteCompiled);
+void RunI16x8BinOpTest(LowerSimd lower_simd, WasmOpcode simd_op,
+                       Int16BinOp expected_op) {
+  WasmRunner<int32_t, int32_t, int32_t, int32_t> r(kExecuteTurbofan,
+                                                   lower_simd);
   byte a = 0;
   byte b = 1;
   byte expected = 2;
@@ -1157,42 +1177,48 @@
   }
 }
 
-WASM_SIMD_TEST(I16x8Add) { RunI16x8BinOpTest(kExprI16x8Add, Add); }
+WASM_SIMD_TEST(I16x8Add) { RunI16x8BinOpTest(lower_simd, kExprI16x8Add, Add); }
 
 WASM_SIMD_TEST(I16x8AddSaturateS) {
-  RunI16x8BinOpTest(kExprI16x8AddSaturateS, AddSaturate);
+  RunI16x8BinOpTest(lower_simd, kExprI16x8AddSaturateS, AddSaturate);
 }
 
-WASM_SIMD_TEST(I16x8Sub) { RunI16x8BinOpTest(kExprI16x8Sub, Sub); }
+WASM_SIMD_TEST(I16x8Sub) { RunI16x8BinOpTest(lower_simd, kExprI16x8Sub, Sub); }
 
 WASM_SIMD_TEST(I16x8SubSaturateS) {
-  RunI16x8BinOpTest(kExprI16x8SubSaturateS, SubSaturate);
+  RunI16x8BinOpTest(lower_simd, kExprI16x8SubSaturateS, SubSaturate);
 }
 
-WASM_SIMD_TEST(I16x8Mul) { RunI16x8BinOpTest(kExprI16x8Mul, Mul); }
+WASM_SIMD_TEST(I16x8Mul) { RunI16x8BinOpTest(lower_simd, kExprI16x8Mul, Mul); }
 
-WASM_SIMD_TEST(I16x8MinS) { RunI16x8BinOpTest(kExprI16x8MinS, Minimum); }
+WASM_SIMD_TEST(I16x8MinS) {
+  RunI16x8BinOpTest(lower_simd, kExprI16x8MinS, Minimum);
+}
 
-WASM_SIMD_TEST(I16x8MaxS) { RunI16x8BinOpTest(kExprI16x8MaxS, Maximum); }
+WASM_SIMD_TEST(I16x8MaxS) {
+  RunI16x8BinOpTest(lower_simd, kExprI16x8MaxS, Maximum);
+}
 
 WASM_SIMD_TEST(I16x8AddSaturateU) {
-  RunI16x8BinOpTest(kExprI16x8AddSaturateU, UnsignedAddSaturate);
+  RunI16x8BinOpTest(lower_simd, kExprI16x8AddSaturateU, UnsignedAddSaturate);
 }
 
 WASM_SIMD_TEST(I16x8SubSaturateU) {
-  RunI16x8BinOpTest(kExprI16x8SubSaturateU, UnsignedSubSaturate);
+  RunI16x8BinOpTest(lower_simd, kExprI16x8SubSaturateU, UnsignedSubSaturate);
 }
 
 WASM_SIMD_TEST(I16x8MinU) {
-  RunI16x8BinOpTest(kExprI16x8MinU, UnsignedMinimum);
+  RunI16x8BinOpTest(lower_simd, kExprI16x8MinU, UnsignedMinimum);
 }
 
 WASM_SIMD_TEST(I16x8MaxU) {
-  RunI16x8BinOpTest(kExprI16x8MaxU, UnsignedMaximum);
+  RunI16x8BinOpTest(lower_simd, kExprI16x8MaxU, UnsignedMaximum);
 }
 
-void RunI16x8CompareOpTest(WasmOpcode simd_op, Int16CompareOp expected_op) {
-  WasmRunner<int32_t, int32_t, int32_t, int32_t> r(kExecuteCompiled);
+void RunI16x8CompareOpTest(LowerSimd lower_simd, WasmOpcode simd_op,
+                           Int16CompareOp expected_op) {
+  WasmRunner<int32_t, int32_t, int32_t, int32_t> r(kExecuteTurbofan,
+                                                   lower_simd);
   byte a = 0;
   byte b = 1;
   byte expected = 2;
@@ -1209,35 +1235,49 @@
   }
 }
 
-WASM_SIMD_TEST(I16x8Eq) { RunI16x8CompareOpTest(kExprI16x8Eq, Equal); }
+WASM_SIMD_TEST(I16x8Eq) {
+  RunI16x8CompareOpTest(lower_simd, kExprI16x8Eq, Equal);
+}
 
-WASM_SIMD_TEST(I16x8Ne) { RunI16x8CompareOpTest(kExprI16x8Ne, NotEqual); }
+WASM_SIMD_TEST(I16x8Ne) {
+  RunI16x8CompareOpTest(lower_simd, kExprI16x8Ne, NotEqual);
+}
 
-WASM_SIMD_TEST(I16x8LtS) { RunI16x8CompareOpTest(kExprI16x8LtS, Less); }
+WASM_SIMD_TEST(I16x8LtS) {
+  RunI16x8CompareOpTest(lower_simd, kExprI16x8LtS, Less);
+}
 
-WASM_SIMD_TEST(I16x8LeS) { RunI16x8CompareOpTest(kExprI16x8LeS, LessEqual); }
+WASM_SIMD_TEST(I16x8LeS) {
+  RunI16x8CompareOpTest(lower_simd, kExprI16x8LeS, LessEqual);
+}
 
-WASM_SIMD_TEST(I16x8GtS) { RunI16x8CompareOpTest(kExprI16x8GtS, Greater); }
+WASM_SIMD_TEST(I16x8GtS) {
+  RunI16x8CompareOpTest(lower_simd, kExprI16x8GtS, Greater);
+}
 
-WASM_SIMD_TEST(I16x8GeS) { RunI16x8CompareOpTest(kExprI16x8GeS, GreaterEqual); }
+WASM_SIMD_TEST(I16x8GeS) {
+  RunI16x8CompareOpTest(lower_simd, kExprI16x8GeS, GreaterEqual);
+}
 
 WASM_SIMD_TEST(I16x8GtU) {
-  RunI16x8CompareOpTest(kExprI16x8GtU, UnsignedGreater);
+  RunI16x8CompareOpTest(lower_simd, kExprI16x8GtU, UnsignedGreater);
 }
 
 WASM_SIMD_TEST(I16x8GeU) {
-  RunI16x8CompareOpTest(kExprI16x8GeU, UnsignedGreaterEqual);
+  RunI16x8CompareOpTest(lower_simd, kExprI16x8GeU, UnsignedGreaterEqual);
 }
 
-WASM_SIMD_TEST(I16x8LtU) { RunI16x8CompareOpTest(kExprI16x8LtU, UnsignedLess); }
+WASM_SIMD_TEST(I16x8LtU) {
+  RunI16x8CompareOpTest(lower_simd, kExprI16x8LtU, UnsignedLess);
+}
 
 WASM_SIMD_TEST(I16x8LeU) {
-  RunI16x8CompareOpTest(kExprI16x8LeU, UnsignedLessEqual);
+  RunI16x8CompareOpTest(lower_simd, kExprI16x8LeU, UnsignedLessEqual);
 }
 
-void RunI16x8ShiftOpTest(WasmOpcode simd_op, Int16ShiftOp expected_op,
-                         int shift) {
-  WasmRunner<int32_t, int32_t, int32_t> r(kExecuteCompiled);
+void RunI16x8ShiftOpTest(LowerSimd lower_simd, WasmOpcode simd_op,
+                         Int16ShiftOp expected_op, int shift) {
+  WasmRunner<int32_t, int32_t, int32_t> r(kExecuteTurbofan, lower_simd);
   byte a = 0;
   byte expected = 1;
   byte simd = r.AllocateLocal(kWasmS128);
@@ -1250,19 +1290,20 @@
 }
 
 WASM_SIMD_TEST(I16x8Shl) {
-  RunI16x8ShiftOpTest(kExprI16x8Shl, LogicalShiftLeft, 1);
+  RunI16x8ShiftOpTest(lower_simd, kExprI16x8Shl, LogicalShiftLeft, 1);
 }
 
 WASM_SIMD_TEST(I16x8ShrS) {
-  RunI16x8ShiftOpTest(kExprI16x8ShrS, ArithmeticShiftRight, 1);
+  RunI16x8ShiftOpTest(lower_simd, kExprI16x8ShrS, ArithmeticShiftRight, 1);
 }
 
 WASM_SIMD_TEST(I16x8ShrU) {
-  RunI16x8ShiftOpTest(kExprI16x8ShrU, LogicalShiftRight, 1);
+  RunI16x8ShiftOpTest(lower_simd, kExprI16x8ShrU, LogicalShiftRight, 1);
 }
 
-void RunI8x16UnOpTest(WasmOpcode simd_op, Int8UnOp expected_op) {
-  WasmRunner<int32_t, int32_t, int32_t> r(kExecuteCompiled);
+void RunI8x16UnOpTest(LowerSimd lower_simd, WasmOpcode simd_op,
+                      Int8UnOp expected_op) {
+  WasmRunner<int32_t, int32_t, int32_t> r(kExecuteTurbofan, lower_simd);
   byte a = 0;
   byte expected = 1;
   byte simd = r.AllocateLocal(kWasmS128);
@@ -1273,15 +1314,16 @@
   FOR_INT8_INPUTS(i) { CHECK_EQ(1, r.Call(*i, expected_op(*i))); }
 }
 
-WASM_SIMD_TEST(I8x16Neg) { RunI8x16UnOpTest(kExprI8x16Neg, Negate); }
-#endif  // V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_ARM64 || V8_TARGET_ARCH_X64 ||
-        // SIMD_LOWERING_TARGET || V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_MIPS64
+WASM_SIMD_TEST(I8x16Neg) {
+  RunI8x16UnOpTest(lower_simd, kExprI8x16Neg, Negate);
+}
 
 #if V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_ARM64 || V8_TARGET_ARCH_MIPS || \
     V8_TARGET_ARCH_MIPS64
 // Tests both signed and unsigned conversion from I16x8 (packing).
-WASM_SIMD_TEST(I8x16ConvertI16x8) {
-  WasmRunner<int32_t, int32_t, int32_t, int32_t> r(kExecuteCompiled);
+WASM_SIMD_COMPILED_TEST(I8x16ConvertI16x8) {
+  WasmRunner<int32_t, int32_t, int32_t, int32_t> r(kExecuteTurbofan,
+                                                   lower_simd);
   byte a = 0;
   byte packed_signed = 1;
   byte packed_unsigned = 2;
@@ -1302,17 +1344,17 @@
     int32_t packed_signed = Narrow<int8_t>(*i);
     int32_t packed_unsigned = UnsignedNarrow<int8_t>(*i);
     // Sign-extend here, since ExtractLane sign extends.
-    if (packed_unsigned & 0x80) packed_unsigned |= 0xffffff00;
+    if (packed_unsigned & 0x80) packed_unsigned |= 0xFFFFFF00;
     CHECK_EQ(1, r.Call(*i, packed_signed, packed_unsigned));
   }
 }
 #endif  // V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_ARM64 || V8_TARGET_ARCH_MIPS ||
         // V8_TARGET_ARCH_MIPS64
 
-#if V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_ARM64 || V8_TARGET_ARCH_X64 || \
-    SIMD_LOWERING_TARGET || V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_MIPS64
-void RunI8x16BinOpTest(WasmOpcode simd_op, Int8BinOp expected_op) {
-  WasmRunner<int32_t, int32_t, int32_t, int32_t> r(kExecuteCompiled);
+void RunI8x16BinOpTest(LowerSimd lower_simd, WasmOpcode simd_op,
+                       Int8BinOp expected_op) {
+  WasmRunner<int32_t, int32_t, int32_t, int32_t> r(kExecuteTurbofan,
+                                                   lower_simd);
   byte a = 0;
   byte b = 1;
   byte expected = 2;
@@ -1329,40 +1371,46 @@
   }
 }
 
-WASM_SIMD_TEST(I8x16Add) { RunI8x16BinOpTest(kExprI8x16Add, Add); }
+WASM_SIMD_TEST(I8x16Add) { RunI8x16BinOpTest(lower_simd, kExprI8x16Add, Add); }
 
 WASM_SIMD_TEST(I8x16AddSaturateS) {
-  RunI8x16BinOpTest(kExprI8x16AddSaturateS, AddSaturate);
+  RunI8x16BinOpTest(lower_simd, kExprI8x16AddSaturateS, AddSaturate);
 }
 
-WASM_SIMD_TEST(I8x16Sub) { RunI8x16BinOpTest(kExprI8x16Sub, Sub); }
+WASM_SIMD_TEST(I8x16Sub) { RunI8x16BinOpTest(lower_simd, kExprI8x16Sub, Sub); }
 
 WASM_SIMD_TEST(I8x16SubSaturateS) {
-  RunI8x16BinOpTest(kExprI8x16SubSaturateS, SubSaturate);
+  RunI8x16BinOpTest(lower_simd, kExprI8x16SubSaturateS, SubSaturate);
 }
 
-WASM_SIMD_TEST(I8x16MinS) { RunI8x16BinOpTest(kExprI8x16MinS, Minimum); }
+WASM_SIMD_TEST(I8x16MinS) {
+  RunI8x16BinOpTest(lower_simd, kExprI8x16MinS, Minimum);
+}
 
-WASM_SIMD_TEST(I8x16MaxS) { RunI8x16BinOpTest(kExprI8x16MaxS, Maximum); }
+WASM_SIMD_TEST(I8x16MaxS) {
+  RunI8x16BinOpTest(lower_simd, kExprI8x16MaxS, Maximum);
+}
 
 WASM_SIMD_TEST(I8x16AddSaturateU) {
-  RunI8x16BinOpTest(kExprI8x16AddSaturateU, UnsignedAddSaturate);
+  RunI8x16BinOpTest(lower_simd, kExprI8x16AddSaturateU, UnsignedAddSaturate);
 }
 
 WASM_SIMD_TEST(I8x16SubSaturateU) {
-  RunI8x16BinOpTest(kExprI8x16SubSaturateU, UnsignedSubSaturate);
+  RunI8x16BinOpTest(lower_simd, kExprI8x16SubSaturateU, UnsignedSubSaturate);
 }
 
 WASM_SIMD_TEST(I8x16MinU) {
-  RunI8x16BinOpTest(kExprI8x16MinU, UnsignedMinimum);
+  RunI8x16BinOpTest(lower_simd, kExprI8x16MinU, UnsignedMinimum);
 }
 
 WASM_SIMD_TEST(I8x16MaxU) {
-  RunI8x16BinOpTest(kExprI8x16MaxU, UnsignedMaximum);
+  RunI8x16BinOpTest(lower_simd, kExprI8x16MaxU, UnsignedMaximum);
 }
 
-void RunI8x16CompareOpTest(WasmOpcode simd_op, Int8CompareOp expected_op) {
-  WasmRunner<int32_t, int32_t, int32_t, int32_t> r(kExecuteCompiled);
+void RunI8x16CompareOpTest(LowerSimd lower_simd, WasmOpcode simd_op,
+                           Int8CompareOp expected_op) {
+  WasmRunner<int32_t, int32_t, int32_t, int32_t> r(kExecuteTurbofan,
+                                                   lower_simd);
   byte a = 0;
   byte b = 1;
   byte expected = 2;
@@ -1379,43 +1427,55 @@
   }
 }
 
-WASM_SIMD_TEST(I8x16Eq) { RunI8x16CompareOpTest(kExprI8x16Eq, Equal); }
+WASM_SIMD_TEST(I8x16Eq) {
+  RunI8x16CompareOpTest(lower_simd, kExprI8x16Eq, Equal);
+}
 
-WASM_SIMD_TEST(I8x16Ne) { RunI8x16CompareOpTest(kExprI8x16Ne, NotEqual); }
+WASM_SIMD_TEST(I8x16Ne) {
+  RunI8x16CompareOpTest(lower_simd, kExprI8x16Ne, NotEqual);
+}
 
-WASM_SIMD_TEST(I8x16GtS) { RunI8x16CompareOpTest(kExprI8x16GtS, Greater); }
+WASM_SIMD_TEST(I8x16GtS) {
+  RunI8x16CompareOpTest(lower_simd, kExprI8x16GtS, Greater);
+}
 
-WASM_SIMD_TEST(I8x16GeS) { RunI8x16CompareOpTest(kExprI8x16GeS, GreaterEqual); }
+WASM_SIMD_TEST(I8x16GeS) {
+  RunI8x16CompareOpTest(lower_simd, kExprI8x16GeS, GreaterEqual);
+}
 
-WASM_SIMD_TEST(I8x16LtS) { RunI8x16CompareOpTest(kExprI8x16LtS, Less); }
+WASM_SIMD_TEST(I8x16LtS) {
+  RunI8x16CompareOpTest(lower_simd, kExprI8x16LtS, Less);
+}
 
-WASM_SIMD_TEST(I8x16LeS) { RunI8x16CompareOpTest(kExprI8x16LeS, LessEqual); }
+WASM_SIMD_TEST(I8x16LeS) {
+  RunI8x16CompareOpTest(lower_simd, kExprI8x16LeS, LessEqual);
+}
 
 WASM_SIMD_TEST(I8x16GtU) {
-  RunI8x16CompareOpTest(kExprI8x16GtU, UnsignedGreater);
+  RunI8x16CompareOpTest(lower_simd, kExprI8x16GtU, UnsignedGreater);
 }
 
 WASM_SIMD_TEST(I8x16GeU) {
-  RunI8x16CompareOpTest(kExprI8x16GeU, UnsignedGreaterEqual);
+  RunI8x16CompareOpTest(lower_simd, kExprI8x16GeU, UnsignedGreaterEqual);
 }
 
-WASM_SIMD_TEST(I8x16LtU) { RunI8x16CompareOpTest(kExprI8x16LtU, UnsignedLess); }
+WASM_SIMD_TEST(I8x16LtU) {
+  RunI8x16CompareOpTest(lower_simd, kExprI8x16LtU, UnsignedLess);
+}
 
 WASM_SIMD_TEST(I8x16LeU) {
-  RunI8x16CompareOpTest(kExprI8x16LeU, UnsignedLessEqual);
+  RunI8x16CompareOpTest(lower_simd, kExprI8x16LeU, UnsignedLessEqual);
 }
-#endif  // V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_ARM64 || V8_TARGET_ARCH_X64 ||
-        // SIMD_LOWERING_TARGET || V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_MIPS64
 
-#if V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_ARM64 || SIMD_LOWERING_TARGET || \
-    V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_MIPS64
-WASM_SIMD_TEST(I8x16Mul) { RunI8x16BinOpTest(kExprI8x16Mul, Mul); }
-#endif  // V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_ARM64 || V8_TARGET_ARCH_X64 ||
-        // V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_MIPS64
+#if V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_ARM64 || V8_TARGET_ARCH_MIPS || \
+    V8_TARGET_ARCH_MIPS64
+WASM_SIMD_TEST(I8x16Mul) { RunI8x16BinOpTest(lower_simd, kExprI8x16Mul, Mul); }
+#endif  // V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_ARM64 || V8_TARGET_ARCH_MIPS ||
+        // V8_TARGET_ARCH_MIPS64
 
-void RunI8x16ShiftOpTest(WasmOpcode simd_op, Int8ShiftOp expected_op,
-                         int shift) {
-  WasmRunner<int32_t, int32_t, int32_t> r(kExecuteCompiled);
+void RunI8x16ShiftOpTest(LowerSimd lower_simd, WasmOpcode simd_op,
+                         Int8ShiftOp expected_op, int shift) {
+  WasmRunner<int32_t, int32_t, int32_t> r(kExecuteTurbofan, lower_simd);
   byte a = 0;
   byte expected = 1;
   byte simd = r.AllocateLocal(kWasmS128);
@@ -1428,20 +1488,20 @@
 }
 
 #if V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_ARM64 || V8_TARGET_ARCH_MIPS || \
-    V8_TARGET_ARCH_MIPS64 || SIMD_LOWERING_TARGET
+    V8_TARGET_ARCH_MIPS64
 WASM_SIMD_TEST(I8x16Shl) {
-  RunI8x16ShiftOpTest(kExprI8x16Shl, LogicalShiftLeft, 1);
+  RunI8x16ShiftOpTest(lower_simd, kExprI8x16Shl, LogicalShiftLeft, 1);
 }
 
 WASM_SIMD_TEST(I8x16ShrS) {
-  RunI8x16ShiftOpTest(kExprI8x16ShrS, ArithmeticShiftRight, 1);
+  RunI8x16ShiftOpTest(lower_simd, kExprI8x16ShrS, ArithmeticShiftRight, 1);
 }
 
 WASM_SIMD_TEST(I8x16ShrU) {
-  RunI8x16ShiftOpTest(kExprI8x16ShrU, LogicalShiftRight, 1);
+  RunI8x16ShiftOpTest(lower_simd, kExprI8x16ShrU, LogicalShiftRight, 1);
 }
 #endif  // V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_ARM64 || V8_TARGET_ARCH_MIPS ||
-        // V8_TARGET_ARCH_MIPS64 || SIMD_LOWERING_TARGET
+        // V8_TARGET_ARCH_MIPS64
 
 #if V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_ARM64 || V8_TARGET_ARCH_X64 || \
     V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_MIPS64
@@ -1449,8 +1509,8 @@
 // rest false, and comparing for non-equality with zero to convert to a boolean
 // vector.
 #define WASM_SIMD_SELECT_TEST(format)                                        \
-  WASM_SIMD_TEST(S##format##Select) {                                        \
-    WasmRunner<int32_t, int32_t, int32_t> r(kExecuteCompiled);               \
+  WASM_SIMD_COMPILED_TEST(S##format##Select) {                               \
+    WasmRunner<int32_t, int32_t, int32_t> r(kExecuteTurbofan, lower_simd);   \
     byte val1 = 0;                                                           \
     byte val2 = 1;                                                           \
     byte src1 = r.AllocateLocal(kWasmS128);                                  \
@@ -1489,8 +1549,9 @@
 // Test Select by making a mask where the 0th and 3rd lanes are non-zero and the
 // rest 0. The mask is not the result of a comparison op.
 #define WASM_SIMD_NON_CANONICAL_SELECT_TEST(format)                           \
-  WASM_SIMD_TEST(S##format##NonCanonicalSelect) {                             \
-    WasmRunner<int32_t, int32_t, int32_t, int32_t> r(kExecuteCompiled);       \
+  WASM_SIMD_COMPILED_TEST(S##format##NonCanonicalSelect) {                    \
+    WasmRunner<int32_t, int32_t, int32_t, int32_t> r(kExecuteTurbofan,        \
+                                                     lower_simd);             \
     byte val1 = 0;                                                            \
     byte val2 = 1;                                                            \
     byte combined = 2;                                                        \
@@ -1522,17 +1583,13 @@
 WASM_SIMD_NON_CANONICAL_SELECT_TEST(32x4)
 WASM_SIMD_NON_CANONICAL_SELECT_TEST(16x8)
 WASM_SIMD_NON_CANONICAL_SELECT_TEST(8x16)
-#endif  // V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_ARM64 || V8_TARGET_ARCH_X64 ||
-        // V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_MIPS64
 
-#if V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_ARM64 || V8_TARGET_ARCH_X64 || \
-    V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_MIPS64
 // Test binary ops with two lane test patterns, all lanes distinct.
 template <typename T>
 void RunBinaryLaneOpTest(
-    WasmOpcode simd_op,
+    LowerSimd lower_simd, WasmOpcode simd_op,
     const std::array<T, kSimd128Size / sizeof(T)>& expected) {
-  WasmRunner<int32_t> r(kExecuteCompiled);
+  WasmRunner<int32_t> r(kExecuteTurbofan, lower_simd);
   // Set up two test patterns as globals, e.g. [0, 1, 2, 3] and [4, 5, 6, 7].
   T* src0 = r.builder().AddGlobal<T>(kWasmS128);
   T* src1 = r.builder().AddGlobal<T>(kWasmS128);
@@ -1559,17 +1616,13 @@
     CHECK_EQ(src0[i], expected[i]);
   }
 }
-#endif  // V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_X64 || V8_TARGET_ARCH_MIPS ||
-        // V8_TARGET_ARCH_MIPS64
 
-#if V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_ARM64 || V8_TARGET_ARCH_X64 || \
-    V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_MIPS64
-WASM_SIMD_TEST(I32x4AddHoriz) {
-  RunBinaryLaneOpTest<int32_t>(kExprI32x4AddHoriz, {{1, 5, 9, 13}});
+WASM_SIMD_COMPILED_TEST(I32x4AddHoriz) {
+  RunBinaryLaneOpTest<int32_t>(lower_simd, kExprI32x4AddHoriz, {{1, 5, 9, 13}});
 }
 
-WASM_SIMD_TEST(I16x8AddHoriz) {
-  RunBinaryLaneOpTest<int16_t>(kExprI16x8AddHoriz,
+WASM_SIMD_COMPILED_TEST(I16x8AddHoriz) {
+  RunBinaryLaneOpTest<int16_t>(lower_simd, kExprI16x8AddHoriz,
                                {{1, 5, 9, 13, 17, 21, 25, 29}});
 }
 #endif  // V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_ARM64 || V8_TARGET_ARCH_X64 ||
@@ -1577,251 +1630,270 @@
 
 #if V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_ARM64 || V8_TARGET_ARCH_MIPS || \
     V8_TARGET_ARCH_MIPS64
-WASM_SIMD_TEST(F32x4AddHoriz) {
-  RunBinaryLaneOpTest<float>(kExprF32x4AddHoriz, {{1.0f, 5.0f, 9.0f, 13.0f}});
+WASM_SIMD_COMPILED_TEST(F32x4AddHoriz) {
+  RunBinaryLaneOpTest<float>(lower_simd, kExprF32x4AddHoriz,
+                             {{1.0f, 5.0f, 9.0f, 13.0f}});
 }
-#endif  // V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_ARM64 || V8_TARGET_ARCH_MIPS ||
-        // V8_TARGET_ARCH_MIPS64
 
-#if V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_ARM64 || V8_TARGET_ARCH_MIPS || \
-    V8_TARGET_ARCH_MIPS64
 // Test some regular shuffles that may have special handling on some targets.
 // Test a normal and unary versions (where second operand isn't used).
-WASM_SIMD_TEST(S32x4Dup) {
+WASM_SIMD_COMPILED_TEST(S32x4Dup) {
   RunBinaryLaneOpTest<int8_t>(
-      kExprS8x16Shuffle,
+      lower_simd, kExprS8x16Shuffle,
       {{16, 17, 18, 19, 16, 17, 18, 19, 16, 17, 18, 19, 16, 17, 18, 19}});
   RunBinaryLaneOpTest<int8_t>(
-      kExprS8x16Shuffle, {{4, 5, 6, 7, 4, 5, 6, 7, 4, 5, 6, 7, 4, 5, 6, 7}});
+      lower_simd, kExprS8x16Shuffle,
+      {{4, 5, 6, 7, 4, 5, 6, 7, 4, 5, 6, 7, 4, 5, 6, 7}});
 }
 
-WASM_SIMD_TEST(S32x4ZipLeft) {
+WASM_SIMD_COMPILED_TEST(S32x4ZipLeft) {
   RunBinaryLaneOpTest<int8_t>(
-      kExprS8x16Shuffle,
+      lower_simd, kExprS8x16Shuffle,
       {{0, 1, 2, 3, 16, 17, 18, 19, 4, 5, 6, 7, 20, 21, 22, 23}});
   RunBinaryLaneOpTest<int8_t>(
-      kExprS8x16Shuffle, {{0, 1, 2, 3, 0, 1, 2, 3, 4, 5, 6, 7, 4, 5, 6, 7}});
+      lower_simd, kExprS8x16Shuffle,
+      {{0, 1, 2, 3, 0, 1, 2, 3, 4, 5, 6, 7, 4, 5, 6, 7}});
 }
 
-WASM_SIMD_TEST(S32x4ZipRight) {
+WASM_SIMD_COMPILED_TEST(S32x4ZipRight) {
   RunBinaryLaneOpTest<int8_t>(
-      kExprS8x16Shuffle,
+      lower_simd, kExprS8x16Shuffle,
       {{8, 9, 10, 11, 24, 25, 26, 27, 12, 13, 14, 15, 28, 29, 30, 31}});
   RunBinaryLaneOpTest<int8_t>(
-      kExprS8x16Shuffle,
+      lower_simd, kExprS8x16Shuffle,
       {{8, 9, 10, 11, 8, 9, 10, 11, 12, 13, 14, 15, 12, 13, 14, 15}});
 }
 
-WASM_SIMD_TEST(S32x4UnzipLeft) {
+WASM_SIMD_COMPILED_TEST(S32x4UnzipLeft) {
   RunBinaryLaneOpTest<int8_t>(
-      kExprS8x16Shuffle,
+      lower_simd, kExprS8x16Shuffle,
       {{0, 1, 2, 3, 8, 9, 10, 11, 16, 17, 18, 19, 24, 25, 26, 27}});
-  RunBinaryLaneOpTest<int8_t>(kExprS8x16Shuffle, {{0, 1, 2, 3, 8, 9, 10, 11, 0,
-                                                   1, 2, 3, 8, 9, 10, 11}});
+  RunBinaryLaneOpTest<int8_t>(
+      lower_simd, kExprS8x16Shuffle,
+      {{0, 1, 2, 3, 8, 9, 10, 11, 0, 1, 2, 3, 8, 9, 10, 11}});
 }
 
-WASM_SIMD_TEST(S32x4UnzipRight) {
+WASM_SIMD_COMPILED_TEST(S32x4UnzipRight) {
   RunBinaryLaneOpTest<int8_t>(
-      kExprS8x16Shuffle,
+      lower_simd, kExprS8x16Shuffle,
       {{4, 5, 6, 7, 12, 13, 14, 15, 20, 21, 22, 23, 28, 29, 30, 31}});
   RunBinaryLaneOpTest<int8_t>(
-      kExprS8x16Shuffle,
+      lower_simd, kExprS8x16Shuffle,
       {{4, 5, 6, 7, 12, 13, 14, 15, 4, 5, 6, 7, 12, 13, 14, 15}});
 }
 
-WASM_SIMD_TEST(S32x4TransposeLeft) {
+WASM_SIMD_COMPILED_TEST(S32x4TransposeLeft) {
   RunBinaryLaneOpTest<int8_t>(
-      kExprS8x16Shuffle,
+      lower_simd, kExprS8x16Shuffle,
       {{0, 1, 2, 3, 16, 17, 18, 19, 8, 9, 10, 11, 24, 25, 26, 27}});
-  RunBinaryLaneOpTest<int8_t>(kExprS8x16Shuffle, {{0, 1, 2, 3, 0, 1, 2, 3, 8, 9,
-                                                   10, 11, 8, 9, 10, 11}});
+  RunBinaryLaneOpTest<int8_t>(
+      lower_simd, kExprS8x16Shuffle,
+      {{0, 1, 2, 3, 0, 1, 2, 3, 8, 9, 10, 11, 8, 9, 10, 11}});
 }
 
-WASM_SIMD_TEST(S32x4TransposeRight) {
+WASM_SIMD_COMPILED_TEST(S32x4TransposeRight) {
   RunBinaryLaneOpTest<int8_t>(
-      kExprS8x16Shuffle,
+      lower_simd, kExprS8x16Shuffle,
       {{4, 5, 6, 7, 20, 21, 22, 23, 12, 13, 14, 15, 28, 29, 30, 31}});
   RunBinaryLaneOpTest<int8_t>(
-      kExprS8x16Shuffle,
+      lower_simd, kExprS8x16Shuffle,
       {{4, 5, 6, 7, 4, 5, 6, 7, 12, 13, 14, 15, 12, 13, 14, 15}});
 }
 
 // Reverses are only unary.
-WASM_SIMD_TEST(S32x2Reverse) {
-  RunBinaryLaneOpTest<int8_t>(kExprS8x16Shuffle, {{4, 5, 6, 7, 0, 1, 2, 3, 12,
-                                                   13, 14, 15, 8, 9, 10, 11}});
+WASM_SIMD_COMPILED_TEST(S32x2Reverse) {
+  RunBinaryLaneOpTest<int8_t>(
+      lower_simd, kExprS8x16Shuffle,
+      {{4, 5, 6, 7, 0, 1, 2, 3, 12, 13, 14, 15, 8, 9, 10, 11}});
 }
 
 // Test irregular shuffle.
-WASM_SIMD_TEST(S32x4Irregular) {
+WASM_SIMD_COMPILED_TEST(S32x4Irregular) {
   RunBinaryLaneOpTest<int8_t>(
-      kExprS8x16Shuffle,
+      lower_simd, kExprS8x16Shuffle,
       {{0, 1, 2, 3, 16, 17, 18, 19, 16, 17, 18, 19, 20, 21, 22, 23}});
   RunBinaryLaneOpTest<int8_t>(
-      kExprS8x16Shuffle, {{0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 4, 5, 6, 7}});
+      lower_simd, kExprS8x16Shuffle,
+      {{0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 4, 5, 6, 7}});
 }
 
-WASM_SIMD_TEST(S16x8Dup) {
+WASM_SIMD_COMPILED_TEST(S16x8Dup) {
   RunBinaryLaneOpTest<int8_t>(
-      kExprS8x16Shuffle,
+      lower_simd, kExprS8x16Shuffle,
       {{18, 19, 18, 19, 18, 19, 18, 19, 18, 19, 18, 19, 18, 19, 18, 19}});
   RunBinaryLaneOpTest<int8_t>(
-      kExprS8x16Shuffle, {{6, 7, 6, 7, 6, 7, 6, 7, 6, 7, 6, 7, 6, 7, 6, 7}});
+      lower_simd, kExprS8x16Shuffle,
+      {{6, 7, 6, 7, 6, 7, 6, 7, 6, 7, 6, 7, 6, 7, 6, 7}});
 }
 
-WASM_SIMD_TEST(S16x8ZipLeft) {
+WASM_SIMD_COMPILED_TEST(S16x8ZipLeft) {
   RunBinaryLaneOpTest<int8_t>(
-      kExprS8x16Shuffle,
+      lower_simd, kExprS8x16Shuffle,
       {{0, 1, 16, 17, 2, 3, 18, 19, 4, 5, 20, 21, 6, 7, 22, 23}});
   RunBinaryLaneOpTest<int8_t>(
-      kExprS8x16Shuffle, {{0, 1, 0, 1, 2, 3, 2, 3, 4, 5, 4, 5, 6, 7, 6, 7}});
+      lower_simd, kExprS8x16Shuffle,
+      {{0, 1, 0, 1, 2, 3, 2, 3, 4, 5, 4, 5, 6, 7, 6, 7}});
 }
 
-WASM_SIMD_TEST(S16x8ZipRight) {
+WASM_SIMD_COMPILED_TEST(S16x8ZipRight) {
   RunBinaryLaneOpTest<int8_t>(
-      kExprS8x16Shuffle,
+      lower_simd, kExprS8x16Shuffle,
       {{8, 9, 24, 25, 10, 11, 26, 27, 12, 13, 28, 29, 14, 15, 30, 31}});
   RunBinaryLaneOpTest<int8_t>(
-      kExprS8x16Shuffle,
+      lower_simd, kExprS8x16Shuffle,
       {{8, 9, 8, 9, 10, 11, 10, 11, 12, 13, 12, 13, 14, 15, 14, 15}});
 }
 
-WASM_SIMD_TEST(S16x8UnzipLeft) {
+WASM_SIMD_COMPILED_TEST(S16x8UnzipLeft) {
   RunBinaryLaneOpTest<int8_t>(
-      kExprS8x16Shuffle,
+      lower_simd, kExprS8x16Shuffle,
       {{0, 1, 4, 5, 8, 9, 12, 13, 16, 17, 20, 21, 24, 25, 28, 29}});
-  RunBinaryLaneOpTest<int8_t>(kExprS8x16Shuffle, {{0, 1, 4, 5, 8, 9, 12, 13, 0,
-                                                   1, 4, 5, 8, 9, 12, 13}});
+  RunBinaryLaneOpTest<int8_t>(
+      lower_simd, kExprS8x16Shuffle,
+      {{0, 1, 4, 5, 8, 9, 12, 13, 0, 1, 4, 5, 8, 9, 12, 13}});
 }
 
-WASM_SIMD_TEST(S16x8UnzipRight) {
+WASM_SIMD_COMPILED_TEST(S16x8UnzipRight) {
   RunBinaryLaneOpTest<int8_t>(
-      kExprS8x16Shuffle,
+      lower_simd, kExprS8x16Shuffle,
       {{2, 3, 6, 7, 10, 11, 14, 15, 18, 19, 22, 23, 26, 27, 30, 31}});
   RunBinaryLaneOpTest<int8_t>(
-      kExprS8x16Shuffle,
+      lower_simd, kExprS8x16Shuffle,
       {{2, 3, 6, 7, 10, 11, 14, 15, 2, 3, 6, 7, 10, 11, 14, 15}});
 }
 
-WASM_SIMD_TEST(S16x8TransposeLeft) {
+WASM_SIMD_COMPILED_TEST(S16x8TransposeLeft) {
   RunBinaryLaneOpTest<int8_t>(
-      kExprS8x16Shuffle,
+      lower_simd, kExprS8x16Shuffle,
       {{0, 1, 16, 17, 4, 5, 20, 21, 8, 9, 24, 25, 12, 13, 28, 29}});
-  RunBinaryLaneOpTest<int8_t>(kExprS8x16Shuffle, {{0, 1, 0, 1, 4, 5, 4, 5, 8, 9,
-                                                   8, 9, 12, 13, 12, 13}});
+  RunBinaryLaneOpTest<int8_t>(
+      lower_simd, kExprS8x16Shuffle,
+      {{0, 1, 0, 1, 4, 5, 4, 5, 8, 9, 8, 9, 12, 13, 12, 13}});
 }
 
-WASM_SIMD_TEST(S16x8TransposeRight) {
+WASM_SIMD_COMPILED_TEST(S16x8TransposeRight) {
   RunBinaryLaneOpTest<int8_t>(
-      kExprS8x16Shuffle,
+      lower_simd, kExprS8x16Shuffle,
       {{2, 3, 18, 19, 6, 7, 22, 23, 10, 11, 26, 27, 14, 15, 30, 31}});
   RunBinaryLaneOpTest<int8_t>(
-      kExprS8x16Shuffle,
+      lower_simd, kExprS8x16Shuffle,
       {{2, 3, 2, 3, 6, 7, 6, 7, 10, 11, 10, 11, 14, 15, 14, 15}});
 }
 
-WASM_SIMD_TEST(S16x4Reverse) {
-  RunBinaryLaneOpTest<int8_t>(kExprS8x16Shuffle, {{6, 7, 4, 5, 2, 3, 0, 1, 14,
-                                                   15, 12, 13, 10, 11, 8, 9}});
-}
-
-WASM_SIMD_TEST(S16x2Reverse) {
-  RunBinaryLaneOpTest<int8_t>(kExprS8x16Shuffle, {{2, 3, 0, 1, 6, 7, 4, 5, 10,
-                                                   11, 8, 9, 14, 15, 12, 13}});
-}
-
-WASM_SIMD_TEST(S16x8Irregular) {
+WASM_SIMD_COMPILED_TEST(S16x4Reverse) {
   RunBinaryLaneOpTest<int8_t>(
-      kExprS8x16Shuffle,
+      lower_simd, kExprS8x16Shuffle,
+      {{6, 7, 4, 5, 2, 3, 0, 1, 14, 15, 12, 13, 10, 11, 8, 9}});
+}
+
+WASM_SIMD_COMPILED_TEST(S16x2Reverse) {
+  RunBinaryLaneOpTest<int8_t>(
+      lower_simd, kExprS8x16Shuffle,
+      {{2, 3, 0, 1, 6, 7, 4, 5, 10, 11, 8, 9, 14, 15, 12, 13}});
+}
+
+WASM_SIMD_COMPILED_TEST(S16x8Irregular) {
+  RunBinaryLaneOpTest<int8_t>(
+      lower_simd, kExprS8x16Shuffle,
       {{0, 1, 16, 17, 16, 17, 0, 1, 4, 5, 20, 21, 6, 7, 22, 23}});
   RunBinaryLaneOpTest<int8_t>(
-      kExprS8x16Shuffle, {{0, 1, 0, 1, 0, 1, 0, 1, 4, 5, 4, 5, 6, 7, 6, 7}});
+      lower_simd, kExprS8x16Shuffle,
+      {{0, 1, 0, 1, 0, 1, 0, 1, 4, 5, 4, 5, 6, 7, 6, 7}});
 }
 
-WASM_SIMD_TEST(S8x16Dup) {
+WASM_SIMD_COMPILED_TEST(S8x16Dup) {
   RunBinaryLaneOpTest<int8_t>(
-      kExprS8x16Shuffle,
+      lower_simd, kExprS8x16Shuffle,
       {{19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19}});
   RunBinaryLaneOpTest<int8_t>(
-      kExprS8x16Shuffle, {{7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7}});
+      lower_simd, kExprS8x16Shuffle,
+      {{7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7}});
 }
 
-WASM_SIMD_TEST(S8x16ZipLeft) {
+WASM_SIMD_COMPILED_TEST(S8x16ZipLeft) {
   RunBinaryLaneOpTest<int8_t>(
-      kExprS8x16Shuffle,
+      lower_simd, kExprS8x16Shuffle,
       {{0, 16, 1, 17, 2, 18, 3, 19, 4, 20, 5, 21, 6, 22, 7, 23}});
   RunBinaryLaneOpTest<int8_t>(
-      kExprS8x16Shuffle, {{0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7}});
+      lower_simd, kExprS8x16Shuffle,
+      {{0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7}});
 }
 
-WASM_SIMD_TEST(S8x16ZipRight) {
+WASM_SIMD_COMPILED_TEST(S8x16ZipRight) {
   RunBinaryLaneOpTest<int8_t>(
-      kExprS8x16Shuffle,
+      lower_simd, kExprS8x16Shuffle,
       {{8, 24, 9, 25, 10, 26, 11, 27, 12, 28, 13, 29, 14, 30, 15, 31}});
   RunBinaryLaneOpTest<int8_t>(
-      kExprS8x16Shuffle,
+      lower_simd, kExprS8x16Shuffle,
       {{8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15}});
 }
 
-WASM_SIMD_TEST(S8x16UnzipLeft) {
+WASM_SIMD_COMPILED_TEST(S8x16UnzipLeft) {
   RunBinaryLaneOpTest<int8_t>(
-      kExprS8x16Shuffle,
+      lower_simd, kExprS8x16Shuffle,
       {{0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30}});
-  RunBinaryLaneOpTest<int8_t>(kExprS8x16Shuffle, {{0, 2, 4, 6, 8, 10, 12, 14, 0,
-                                                   2, 4, 6, 8, 10, 12, 14}});
+  RunBinaryLaneOpTest<int8_t>(
+      lower_simd, kExprS8x16Shuffle,
+      {{0, 2, 4, 6, 8, 10, 12, 14, 0, 2, 4, 6, 8, 10, 12, 14}});
 }
 
-WASM_SIMD_TEST(S8x16UnzipRight) {
+WASM_SIMD_COMPILED_TEST(S8x16UnzipRight) {
   RunBinaryLaneOpTest<int8_t>(
-      kExprS8x16Shuffle,
+      lower_simd, kExprS8x16Shuffle,
       {{1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31}});
-  RunBinaryLaneOpTest<int8_t>(kExprS8x16Shuffle, {{1, 3, 5, 7, 9, 11, 13, 15, 1,
-                                                   3, 5, 7, 9, 11, 13, 15}});
+  RunBinaryLaneOpTest<int8_t>(
+      lower_simd, kExprS8x16Shuffle,
+      {{1, 3, 5, 7, 9, 11, 13, 15, 1, 3, 5, 7, 9, 11, 13, 15}});
 }
 
-WASM_SIMD_TEST(S8x16TransposeLeft) {
+WASM_SIMD_COMPILED_TEST(S8x16TransposeLeft) {
   RunBinaryLaneOpTest<int8_t>(
-      kExprS8x16Shuffle,
+      lower_simd, kExprS8x16Shuffle,
       {{0, 16, 2, 18, 4, 20, 6, 22, 8, 24, 10, 26, 12, 28, 14, 30}});
-  RunBinaryLaneOpTest<int8_t>(kExprS8x16Shuffle, {{0, 0, 2, 2, 4, 4, 6, 6, 8, 8,
-                                                   10, 10, 12, 12, 14, 14}});
+  RunBinaryLaneOpTest<int8_t>(
+      lower_simd, kExprS8x16Shuffle,
+      {{0, 0, 2, 2, 4, 4, 6, 6, 8, 8, 10, 10, 12, 12, 14, 14}});
 }
 
-WASM_SIMD_TEST(S8x16TransposeRight) {
+WASM_SIMD_COMPILED_TEST(S8x16TransposeRight) {
   RunBinaryLaneOpTest<int8_t>(
-      kExprS8x16Shuffle,
+      lower_simd, kExprS8x16Shuffle,
       {{1, 17, 3, 19, 5, 21, 7, 23, 9, 25, 11, 27, 13, 29, 15, 31}});
-  RunBinaryLaneOpTest<int8_t>(kExprS8x16Shuffle, {{1, 1, 3, 3, 5, 5, 7, 7, 9, 9,
-                                                   11, 11, 13, 13, 15, 15}});
-}
-
-WASM_SIMD_TEST(S8x8Reverse) {
-  RunBinaryLaneOpTest<int8_t>(kExprS8x16Shuffle, {{7, 6, 5, 4, 3, 2, 1, 0, 15,
-                                                   14, 13, 12, 11, 10, 9, 8}});
-}
-
-WASM_SIMD_TEST(S8x4Reverse) {
-  RunBinaryLaneOpTest<int8_t>(kExprS8x16Shuffle, {{3, 2, 1, 0, 7, 6, 5, 4, 11,
-                                                   10, 9, 8, 15, 14, 13, 12}});
-}
-
-WASM_SIMD_TEST(S8x2Reverse) {
-  RunBinaryLaneOpTest<int8_t>(kExprS8x16Shuffle, {{1, 0, 3, 2, 5, 4, 7, 6, 9, 8,
-                                                   11, 10, 13, 12, 15, 14}});
-}
-
-WASM_SIMD_TEST(S8x16Irregular) {
   RunBinaryLaneOpTest<int8_t>(
-      kExprS8x16Shuffle,
+      lower_simd, kExprS8x16Shuffle,
+      {{1, 1, 3, 3, 5, 5, 7, 7, 9, 9, 11, 11, 13, 13, 15, 15}});
+}
+
+WASM_SIMD_COMPILED_TEST(S8x8Reverse) {
+  RunBinaryLaneOpTest<int8_t>(
+      lower_simd, kExprS8x16Shuffle,
+      {{7, 6, 5, 4, 3, 2, 1, 0, 15, 14, 13, 12, 11, 10, 9, 8}});
+}
+
+WASM_SIMD_COMPILED_TEST(S8x4Reverse) {
+  RunBinaryLaneOpTest<int8_t>(
+      lower_simd, kExprS8x16Shuffle,
+      {{3, 2, 1, 0, 7, 6, 5, 4, 11, 10, 9, 8, 15, 14, 13, 12}});
+}
+
+WASM_SIMD_COMPILED_TEST(S8x2Reverse) {
+  RunBinaryLaneOpTest<int8_t>(
+      lower_simd, kExprS8x16Shuffle,
+      {{1, 0, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10, 13, 12, 15, 14}});
+}
+
+WASM_SIMD_COMPILED_TEST(S8x16Irregular) {
+  RunBinaryLaneOpTest<int8_t>(
+      lower_simd, kExprS8x16Shuffle,
       {{0, 16, 0, 16, 2, 18, 3, 19, 4, 20, 5, 21, 6, 22, 7, 23}});
   RunBinaryLaneOpTest<int8_t>(
-      kExprS8x16Shuffle, {{0, 0, 0, 0, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7}});
+      lower_simd, kExprS8x16Shuffle,
+      {{0, 0, 0, 0, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7}});
 }
 
 // Test shuffles that concatenate the two vectors.
-void RunConcatOpTest() {}
 
-WASM_SIMD_TEST(S8x16Concat) {
+WASM_SIMD_COMPILED_TEST(S8x16Concat) {
   static const int kLanes = 16;
   std::array<uint8_t, kLanes> expected;
   for (int bias = 1; bias < kLanes; bias++) {
@@ -1834,20 +1906,16 @@
     for (int j = 0; j < bias; j++) {
       expected[i++] = j + kLanes;
     }
-    RunBinaryLaneOpTest(kExprS8x16Shuffle, expected);
+    RunBinaryLaneOpTest(lower_simd, kExprS8x16Shuffle, expected);
   }
 }
-#endif  // V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_ARM64 || V8_TARGET_ARCH_MIPS ||
-        // V8_TARGET_ARCH_MIPS64
 
-#if V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_ARM64 || V8_TARGET_ARCH_MIPS || \
-    V8_TARGET_ARCH_MIPS64
 // Boolean unary operations are 'AllTrue' and 'AnyTrue', which return an integer
 // result. Use relational ops on numeric vectors to create the boolean vector
 // test inputs. Test inputs with all true, all false, one true, and one false.
 #define WASM_SIMD_BOOL_REDUCTION_TEST(format, lanes)                           \
-  WASM_SIMD_TEST(ReductionTest##lanes) {                                       \
-    WasmRunner<int32_t> r(kExecuteCompiled);                                   \
+  WASM_SIMD_COMPILED_TEST(ReductionTest##lanes) {                              \
+    WasmRunner<int32_t> r(kExecuteTurbofan, lower_simd);                       \
     byte zero = r.AllocateLocal(kWasmS128);                                    \
     byte one_one = r.AllocateLocal(kWasmS128);                                 \
     byte reduced = r.AllocateLocal(kWasmI32);                                  \
@@ -1919,13 +1987,8 @@
 WASM_SIMD_BOOL_REDUCTION_TEST(16x8, 8)
 WASM_SIMD_BOOL_REDUCTION_TEST(8x16, 16)
 
-#endif  // !V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_ARM64 || V8_TARGET_ARCH_MIPS ||
-        // V8_TARGET_ARCH_MIPS64
-
-#if V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_ARM64 || SIMD_LOWERING_TARGET || \
-    V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_MIPS64
 WASM_SIMD_TEST(SimdI32x4ExtractWithF32x4) {
-  WasmRunner<int32_t> r(kExecuteCompiled);
+  WasmRunner<int32_t> r(kExecuteTurbofan, lower_simd);
   BUILD(r, WASM_IF_ELSE_I(
                WASM_I32_EQ(WASM_SIMD_I32x4_EXTRACT_LANE(
                                0, WASM_SIMD_F32x4_SPLAT(WASM_F32(30.5))),
@@ -1935,7 +1998,7 @@
 }
 
 WASM_SIMD_TEST(SimdF32x4ExtractWithI32x4) {
-  WasmRunner<int32_t> r(kExecuteCompiled);
+  WasmRunner<int32_t> r(kExecuteTurbofan, lower_simd);
   BUILD(r,
         WASM_IF_ELSE_I(WASM_F32_EQ(WASM_SIMD_F32x4_EXTRACT_LANE(
                                        0, WASM_SIMD_I32x4_SPLAT(WASM_I32V(15))),
@@ -1947,9 +2010,9 @@
 WASM_SIMD_TEST(SimdF32x4AddWithI32x4) {
   // Choose two floating point values whose sum is normal and exactly
   // representable as a float.
-  const int kOne = 0x3f800000;
+  const int kOne = 0x3F800000;
   const int kTwo = 0x40000000;
-  WasmRunner<int32_t> r(kExecuteCompiled);
+  WasmRunner<int32_t> r(kExecuteTurbofan, lower_simd);
   BUILD(r,
         WASM_IF_ELSE_I(
             WASM_F32_EQ(
@@ -1964,7 +2027,7 @@
 }
 
 WASM_SIMD_TEST(SimdI32x4AddWithF32x4) {
-  WasmRunner<int32_t> r(kExecuteCompiled);
+  WasmRunner<int32_t> r(kExecuteTurbofan, lower_simd);
   BUILD(r,
         WASM_IF_ELSE_I(
             WASM_I32_EQ(
@@ -1977,13 +2040,11 @@
             WASM_I32V(1), WASM_I32V(0)));
   CHECK_EQ(1, r.Call());
 }
-#endif  // V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_ARM64 || SIMD_LOWERING_TARGET ||
-        // V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_MIPS64
+#endif  // V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_ARM64 || V8_TARGET_ARCH_MIPS ||
+        // V8_TARGET_ARCH_MIPS64
 
-#if V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_ARM64 || SIMD_LOWERING_TARGET || \
-    V8_TARGET_ARCH_X64 || V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_MIPS64
 WASM_SIMD_TEST(SimdI32x4Local) {
-  WasmRunner<int32_t> r(kExecuteCompiled);
+  WasmRunner<int32_t> r(kExecuteTurbofan, lower_simd);
   r.AllocateLocal(kWasmS128);
   BUILD(r, WASM_SET_LOCAL(0, WASM_SIMD_I32x4_SPLAT(WASM_I32V(31))),
 
@@ -1992,7 +2053,7 @@
 }
 
 WASM_SIMD_TEST(SimdI32x4SplatFromExtract) {
-  WasmRunner<int32_t> r(kExecuteCompiled);
+  WasmRunner<int32_t> r(kExecuteTurbofan, lower_simd);
   r.AllocateLocal(kWasmI32);
   r.AllocateLocal(kWasmS128);
   BUILD(r, WASM_SET_LOCAL(0, WASM_SIMD_I32x4_EXTRACT_LANE(
@@ -2003,7 +2064,7 @@
 }
 
 WASM_SIMD_TEST(SimdI32x4For) {
-  WasmRunner<int32_t> r(kExecuteCompiled);
+  WasmRunner<int32_t> r(kExecuteTurbofan, lower_simd);
   r.AllocateLocal(kWasmI32);
   r.AllocateLocal(kWasmS128);
   BUILD(r,
@@ -2035,13 +2096,11 @@
         WASM_GET_LOCAL(0));
   CHECK_EQ(1, r.Call());
 }
-#endif  // V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_ARM64 || SIMD_LOWERING_TARGET ||
-        // V8_TARGET_ARCH_X64 || V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_MIPS64
 
-#if V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_ARM64 || SIMD_LOWERING_TARGET || \
-    V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_MIPS64
+#if V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_ARM64 || V8_TARGET_ARCH_MIPS || \
+    V8_TARGET_ARCH_MIPS64
 WASM_SIMD_TEST(SimdF32x4For) {
-  WasmRunner<int32_t> r(kExecuteCompiled);
+  WasmRunner<int32_t> r(kExecuteTurbofan, lower_simd);
   r.AllocateLocal(kWasmI32);
   r.AllocateLocal(kWasmS128);
   BUILD(r, WASM_SET_LOCAL(1, WASM_SIMD_F32x4_SPLAT(WASM_F32(21.25))),
@@ -2063,11 +2122,8 @@
         WASM_GET_LOCAL(0));
   CHECK_EQ(1, r.Call());
 }
-#endif  // V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_ARM64 || SIMD_LOWERING_TARGET ||
-        // V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_MIPS64
-
-#if V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_ARM64 || SIMD_LOWERING_TARGET || \
-    V8_TARGET_ARCH_X64 || V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_MIPS64
+#endif  // V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_ARM64 || V8_TARGET_ARCH_MIPS ||
+        // V8_TARGET_ARCH_MIPS64
 
 template <typename T, int numLanes = 4>
 void SetVectorByLanes(T* v, const std::array<T, numLanes>& arr) {
@@ -2095,37 +2151,47 @@
 }
 
 WASM_SIMD_TEST(SimdI32x4GetGlobal) {
-  WasmRunner<int32_t, int32_t> r(kExecuteCompiled);
+  WasmRunner<int32_t, int32_t> r(kExecuteTurbofan, lower_simd);
+  // Pad the globals with a few unused slots to get a non-zero offset.
+  r.builder().AddGlobal<int32_t>(kWasmI32);  // purposefully unused
+  r.builder().AddGlobal<int32_t>(kWasmI32);  // purposefully unused
+  r.builder().AddGlobal<int32_t>(kWasmI32);  // purposefully unused
+  r.builder().AddGlobal<int32_t>(kWasmI32);  // purposefully unused
   int32_t* global = r.builder().AddGlobal<int32_t>(kWasmS128);
   SetVectorByLanes(global, {{0, 1, 2, 3}});
   r.AllocateLocal(kWasmI32);
   BUILD(
       r, WASM_SET_LOCAL(1, WASM_I32V(1)),
       WASM_IF(WASM_I32_NE(WASM_I32V(0),
-                          WASM_SIMD_I32x4_EXTRACT_LANE(0, WASM_GET_GLOBAL(0))),
+                          WASM_SIMD_I32x4_EXTRACT_LANE(0, WASM_GET_GLOBAL(4))),
               WASM_SET_LOCAL(1, WASM_I32V(0))),
       WASM_IF(WASM_I32_NE(WASM_I32V(1),
-                          WASM_SIMD_I32x4_EXTRACT_LANE(1, WASM_GET_GLOBAL(0))),
+                          WASM_SIMD_I32x4_EXTRACT_LANE(1, WASM_GET_GLOBAL(4))),
               WASM_SET_LOCAL(1, WASM_I32V(0))),
       WASM_IF(WASM_I32_NE(WASM_I32V(2),
-                          WASM_SIMD_I32x4_EXTRACT_LANE(2, WASM_GET_GLOBAL(0))),
+                          WASM_SIMD_I32x4_EXTRACT_LANE(2, WASM_GET_GLOBAL(4))),
               WASM_SET_LOCAL(1, WASM_I32V(0))),
       WASM_IF(WASM_I32_NE(WASM_I32V(3),
-                          WASM_SIMD_I32x4_EXTRACT_LANE(3, WASM_GET_GLOBAL(0))),
+                          WASM_SIMD_I32x4_EXTRACT_LANE(3, WASM_GET_GLOBAL(4))),
               WASM_SET_LOCAL(1, WASM_I32V(0))),
       WASM_GET_LOCAL(1));
   CHECK_EQ(1, r.Call(0));
 }
 
 WASM_SIMD_TEST(SimdI32x4SetGlobal) {
-  WasmRunner<int32_t, int32_t> r(kExecuteCompiled);
+  WasmRunner<int32_t, int32_t> r(kExecuteTurbofan, lower_simd);
+  // Pad the globals with a few unused slots to get a non-zero offset.
+  r.builder().AddGlobal<int32_t>(kWasmI32);  // purposefully unused
+  r.builder().AddGlobal<int32_t>(kWasmI32);  // purposefully unused
+  r.builder().AddGlobal<int32_t>(kWasmI32);  // purposefully unused
+  r.builder().AddGlobal<int32_t>(kWasmI32);  // purposefully unused
   int32_t* global = r.builder().AddGlobal<int32_t>(kWasmS128);
-  BUILD(r, WASM_SET_GLOBAL(0, WASM_SIMD_I32x4_SPLAT(WASM_I32V(23))),
-        WASM_SET_GLOBAL(0, WASM_SIMD_I32x4_REPLACE_LANE(1, WASM_GET_GLOBAL(0),
+  BUILD(r, WASM_SET_GLOBAL(4, WASM_SIMD_I32x4_SPLAT(WASM_I32V(23))),
+        WASM_SET_GLOBAL(4, WASM_SIMD_I32x4_REPLACE_LANE(1, WASM_GET_GLOBAL(4),
                                                         WASM_I32V(34))),
-        WASM_SET_GLOBAL(0, WASM_SIMD_I32x4_REPLACE_LANE(2, WASM_GET_GLOBAL(0),
+        WASM_SET_GLOBAL(4, WASM_SIMD_I32x4_REPLACE_LANE(2, WASM_GET_GLOBAL(4),
                                                         WASM_I32V(45))),
-        WASM_SET_GLOBAL(0, WASM_SIMD_I32x4_REPLACE_LANE(3, WASM_GET_GLOBAL(0),
+        WASM_SET_GLOBAL(4, WASM_SIMD_I32x4_REPLACE_LANE(3, WASM_GET_GLOBAL(4),
                                                         WASM_I32V(56))),
         WASM_I32V(1));
   CHECK_EQ(1, r.Call(0));
@@ -2134,13 +2200,11 @@
   CHECK_EQ(GetScalar(global, 2), 45);
   CHECK_EQ(GetScalar(global, 3), 56);
 }
-#endif  // V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_ARM64 || SIMD_LOWERING_TARGET ||
-        // V8_TARGET_ARCH_X64 || V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_MIPS64
 
-#if V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_ARM64 || SIMD_LOWERING_TARGET || \
-    V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_MIPS64
+#if V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_ARM64 || V8_TARGET_ARCH_MIPS || \
+    V8_TARGET_ARCH_MIPS64 || V8_TARGET_ARCH_IA32
 WASM_SIMD_TEST(SimdF32x4GetGlobal) {
-  WasmRunner<int32_t, int32_t> r(kExecuteCompiled);
+  WasmRunner<int32_t, int32_t> r(kExecuteTurbofan, lower_simd);
   float* global = r.builder().AddGlobal<float>(kWasmS128);
   SetVectorByLanes<float>(global, {{0.0, 1.5, 2.25, 3.5}});
   r.AllocateLocal(kWasmI32);
@@ -2163,7 +2227,7 @@
 }
 
 WASM_SIMD_TEST(SimdF32x4SetGlobal) {
-  WasmRunner<int32_t, int32_t> r(kExecuteCompiled);
+  WasmRunner<int32_t, int32_t> r(kExecuteTurbofan, lower_simd);
   float* global = r.builder().AddGlobal<float>(kWasmS128);
   BUILD(r, WASM_SET_GLOBAL(0, WASM_SIMD_F32x4_SPLAT(WASM_F32(13.5))),
         WASM_SET_GLOBAL(0, WASM_SIMD_F32x4_REPLACE_LANE(1, WASM_GET_GLOBAL(0),
@@ -2179,29 +2243,26 @@
   CHECK_EQ(GetScalar(global, 2), 32.25f);
   CHECK_EQ(GetScalar(global, 3), 65.0f);
 }
-#endif  // V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_ARM64 || SIMD_LOWERING_TARGET ||
-        // V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_MIPS64
+#endif  // V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_ARM64 || V8_TARGET_ARCH_MIPS ||
+        // V8_TARGET_ARCH_MIPS64 || V8_TARGET_ARCH_IA32
 
-#if V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_ARM64 || SIMD_LOWERING_TARGET || \
-    V8_TARGET_ARCH_X64 || V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_MIPS64
-WASM_SIMD_TEST(SimdLoadStoreLoad) {
-  WasmRunner<int32_t> r(kExecuteCompiled);
-  int32_t* memory = r.builder().AddMemoryElems<int32_t>(4);
-
-  BUILD(r, WASM_SIMD_STORE_MEM(WASM_ZERO, WASM_SIMD_LOAD_MEM(WASM_ZERO)),
-        WASM_SIMD_I32x4_EXTRACT_LANE(0, WASM_SIMD_LOAD_MEM(WASM_ZERO)));
+WASM_SIMD_COMPILED_TEST(SimdLoadStoreLoad) {
+  WasmRunner<int32_t> r(kExecuteTurbofan, lower_simd);
+  int32_t* memory = r.builder().AddMemoryElems<int32_t>(8);
+  // Load memory, store it, then reload it and extract the first lane. Use a
+  // non-zero offset into the memory of 1 lane (4 bytes) to test indexing.
+  BUILD(r, WASM_SIMD_STORE_MEM(WASM_I32V(4), WASM_SIMD_LOAD_MEM(WASM_I32V(4))),
+        WASM_SIMD_I32x4_EXTRACT_LANE(0, WASM_SIMD_LOAD_MEM(WASM_I32V(4))));
 
   FOR_INT32_INPUTS(i) {
     int32_t expected = *i;
-    r.builder().WriteMemory(&memory[0], expected);
+    r.builder().WriteMemory(&memory[1], expected);
     CHECK_EQ(expected, r.Call());
   }
 }
-#endif  // V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_ARM64 || SIMD_LOWERING_TARGET ||
-        // V8_TARGET_ARCH_X64 || V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_MIPS64
 
-#undef SIMD_LOWERING_TARGET
 #undef WASM_SIMD_TEST
+#undef WASM_SIMD_COMPILED_TEST
 #undef WASM_SIMD_CHECK_LANE
 #undef WASM_SIMD_CHECK4
 #undef WASM_SIMD_CHECK_SPLAT4
diff --git a/src/v8/test/cctest/wasm/test-run-wasm.cc b/src/v8/test/cctest/wasm/test-run-wasm.cc
index 3b27c78..6a7fde6 100644
--- a/src/v8/test/cctest/wasm/test-run-wasm.cc
+++ b/src/v8/test/cctest/wasm/test-run-wasm.cc
@@ -96,7 +96,10 @@
 
 static void RunInt32AddTest(WasmExecutionMode execution_mode, const byte* code,
                             size_t size) {
+  TestSignatures sigs;
   WasmRunner<int32_t, int32_t, int32_t> r(execution_mode);
+  r.builder().AddSignature(sigs.ii_v());
+  r.builder().AddSignature(sigs.iii_v());
   r.Build(code, code + size);
   FOR_INT32_INPUTS(i) {
     FOR_INT32_INPUTS(j) {
@@ -117,7 +120,7 @@
 WASM_EXEC_TEST(Int32Add_block1) {
   EXPERIMENTAL_FLAG_SCOPE(mv);
   static const byte code[] = {
-      WASM_BLOCK_TT(kWasmI32, kWasmI32, WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)),
+      WASM_BLOCK_X(0, WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)),
       kExprI32Add};
   RunInt32AddTest(execution_mode, code, sizeof(code));
 }
@@ -125,8 +128,7 @@
 WASM_EXEC_TEST(Int32Add_block2) {
   EXPERIMENTAL_FLAG_SCOPE(mv);
   static const byte code[] = {
-      WASM_BLOCK_TT(kWasmI32, kWasmI32, WASM_GET_LOCAL(0), WASM_GET_LOCAL(1),
-                    kExprBr, DEPTH_0),
+      WASM_BLOCK_X(0, WASM_GET_LOCAL(0), WASM_GET_LOCAL(1), kExprBr, DEPTH_0),
       kExprI32Add};
   RunInt32AddTest(execution_mode, code, sizeof(code));
 }
@@ -134,9 +136,9 @@
 WASM_EXEC_TEST(Int32Add_multi_if) {
   EXPERIMENTAL_FLAG_SCOPE(mv);
   static const byte code[] = {
-      WASM_IF_ELSE_TT(kWasmI32, kWasmI32, WASM_GET_LOCAL(0),
-                      WASM_SEQ(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)),
-                      WASM_SEQ(WASM_GET_LOCAL(1), WASM_GET_LOCAL(0))),
+      WASM_IF_ELSE_X(0, WASM_GET_LOCAL(0),
+                     WASM_SEQ(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)),
+                     WASM_SEQ(WASM_GET_LOCAL(1), WASM_GET_LOCAL(0))),
       kExprI32Add};
   RunInt32AddTest(execution_mode, code, sizeof(code));
 }
@@ -156,54 +158,68 @@
   CHECK_EQ(57, r.Call());
 }
 
-void TestInt32Binop(WasmExecutionMode execution_mode, WasmOpcode opcode,
-                    int32_t expected, int32_t a, int32_t b) {
-  {
-    WasmRunner<int32_t> r(execution_mode);
-    // K op K
-    BUILD(r, WASM_BINOP(opcode, WASM_I32V(a), WASM_I32V(b)));
-    CHECK_EQ(expected, r.Call());
+// clang-format messes up the FOR_INT32_INPUTS macros.
+// clang-format off
+template<typename ctype>
+static void TestInt32Binop(WasmExecutionMode execution_mode, WasmOpcode opcode,
+                           ctype(*expected)(ctype, ctype)) {
+  FOR_INT32_INPUTS(i) {
+    FOR_INT32_INPUTS(j) {
+      WasmRunner<ctype> r(execution_mode);
+      // Apply {opcode} on two constants.
+      BUILD(r, WASM_BINOP(opcode, WASM_I32V(*i), WASM_I32V(*j)));
+      CHECK_EQ(expected(*i, *j), r.Call());
+    }
   }
   {
-    WasmRunner<int32_t, int32_t, int32_t> r(execution_mode);
-    // a op b
+    WasmRunner<ctype, ctype, ctype> r(execution_mode);
+    // Apply {opcode} on two parameters.
     BUILD(r, WASM_BINOP(opcode, WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)));
-    CHECK_EQ(expected, r.Call(a, b));
+    FOR_INT32_INPUTS(i) {
+      FOR_INT32_INPUTS(j) {
+        CHECK_EQ(expected(*i, *j), r.Call(*i, *j));
+      }
+    }
   }
 }
+// clang-format on
 
-WASM_EXEC_TEST(Int32Binops) {
-  TestInt32Binop(execution_mode, kExprI32Add, 88888888, 33333333, 55555555);
-  TestInt32Binop(execution_mode, kExprI32Sub, -1111111, 7777777, 8888888);
-  TestInt32Binop(execution_mode, kExprI32Mul, 65130756, 88734, 734);
-  TestInt32Binop(execution_mode, kExprI32DivS, -66, -4777344, 72384);
-  TestInt32Binop(execution_mode, kExprI32DivU, 805306368, 0xF0000000, 5);
-  TestInt32Binop(execution_mode, kExprI32RemS, -3, -3003, 1000);
-  TestInt32Binop(execution_mode, kExprI32RemU, 4, 4004, 1000);
-  TestInt32Binop(execution_mode, kExprI32And, 0xEE, 0xFFEE, 0xFF0000FF);
-  TestInt32Binop(execution_mode, kExprI32Ior, 0xF0FF00FF, 0xF0F000EE,
-                 0x000F0011);
-  TestInt32Binop(execution_mode, kExprI32Xor, 0xABCDEF01, 0xABCDEFFF, 0xFE);
-  TestInt32Binop(execution_mode, kExprI32Shl, 0xA0000000, 0xA, 28);
-  TestInt32Binop(execution_mode, kExprI32ShrU, 0x07000010, 0x70000100, 4);
-  TestInt32Binop(execution_mode, kExprI32ShrS, 0xFF000000, 0x80000000, 7);
-  TestInt32Binop(execution_mode, kExprI32Ror, 0x01000000, 0x80000000, 7);
-  TestInt32Binop(execution_mode, kExprI32Ror, 0x01000000, 0x80000000, 39);
-  TestInt32Binop(execution_mode, kExprI32Rol, 0x00000040, 0x80000000, 7);
-  TestInt32Binop(execution_mode, kExprI32Rol, 0x00000040, 0x80000000, 39);
-  TestInt32Binop(execution_mode, kExprI32Eq, 1, -99, -99);
-  TestInt32Binop(execution_mode, kExprI32Ne, 0, -97, -97);
+#define WASM_I32_BINOP_TEST(expr, ctype, expected)                             \
+  WASM_EXEC_TEST(I32Binop_##expr) {                                            \
+    TestInt32Binop<ctype>(execution_mode, kExprI32##expr,                      \
+                          [](ctype a, ctype b) -> ctype { return expected; }); \
+  }
 
-  TestInt32Binop(execution_mode, kExprI32LtS, 1, -4, 4);
-  TestInt32Binop(execution_mode, kExprI32LeS, 0, -2, -3);
-  TestInt32Binop(execution_mode, kExprI32LtU, 1, 0, -6);
-  TestInt32Binop(execution_mode, kExprI32LeU, 1, 98978, 0xF0000000);
+WASM_I32_BINOP_TEST(Add, int32_t, a + b)
+WASM_I32_BINOP_TEST(Sub, int32_t, a - b)
+WASM_I32_BINOP_TEST(Mul, int32_t, a* b)
+WASM_I32_BINOP_TEST(DivS, int32_t,
+                    (a == kMinInt && b == -1) || b == 0
+                        ? static_cast<int32_t>(0xDEADBEEF)
+                        : a / b)
+WASM_I32_BINOP_TEST(DivU, uint32_t, b == 0 ? 0xDEADBEEF : a / b)
+WASM_I32_BINOP_TEST(RemS, int32_t, b == 0 ? 0xDEADBEEF : b == -1 ? 0 : a % b)
+WASM_I32_BINOP_TEST(RemU, uint32_t, b == 0 ? 0xDEADBEEF : a % b)
+WASM_I32_BINOP_TEST(And, int32_t, a& b)
+WASM_I32_BINOP_TEST(Ior, int32_t, a | b)
+WASM_I32_BINOP_TEST(Xor, int32_t, a ^ b)
+WASM_I32_BINOP_TEST(Shl, int32_t, a << (b & 0x1F))
+WASM_I32_BINOP_TEST(ShrU, uint32_t, a >> (b & 0x1F))
+WASM_I32_BINOP_TEST(ShrS, int32_t, a >> (b & 0x1F))
+WASM_I32_BINOP_TEST(Ror, uint32_t, (a >> (b & 0x1F)) | (a << (32 - (b & 0x1F))))
+WASM_I32_BINOP_TEST(Rol, uint32_t, (a << (b & 0x1F)) | (a >> (32 - (b & 0x1F))))
+WASM_I32_BINOP_TEST(Eq, int32_t, a == b)
+WASM_I32_BINOP_TEST(Ne, int32_t, a != b)
+WASM_I32_BINOP_TEST(LtS, int32_t, a < b)
+WASM_I32_BINOP_TEST(LeS, int32_t, a <= b)
+WASM_I32_BINOP_TEST(LtU, uint32_t, a < b)
+WASM_I32_BINOP_TEST(LeU, uint32_t, a <= b)
+WASM_I32_BINOP_TEST(GtS, int32_t, a > b)
+WASM_I32_BINOP_TEST(GeS, int32_t, a >= b)
+WASM_I32_BINOP_TEST(GtU, uint32_t, a > b)
+WASM_I32_BINOP_TEST(GeU, uint32_t, a >= b)
 
-  TestInt32Binop(execution_mode, kExprI32GtS, 1, 4, -4);
-  TestInt32Binop(execution_mode, kExprI32GeS, 0, -3, -2);
-  TestInt32Binop(execution_mode, kExprI32GtU, 1, -6, 0);
-  TestInt32Binop(execution_mode, kExprI32GeU, 1, 0xF0000000, 98978);
-}
+#undef WASM_I32_BINOP_TEST
 
 void TestInt32Unop(WasmExecutionMode execution_mode, WasmOpcode opcode,
                    int32_t expected, int32_t a) {
@@ -229,11 +245,11 @@
   TestInt32Unop(execution_mode, kExprI32Clz, 4, 0x08050000);
   TestInt32Unop(execution_mode, kExprI32Clz, 5, 0x04006000);
   TestInt32Unop(execution_mode, kExprI32Clz, 6, 0x02000000);
-  TestInt32Unop(execution_mode, kExprI32Clz, 7, 0x010000a0);
-  TestInt32Unop(execution_mode, kExprI32Clz, 8, 0x00800c00);
+  TestInt32Unop(execution_mode, kExprI32Clz, 7, 0x010000A0);
+  TestInt32Unop(execution_mode, kExprI32Clz, 8, 0x00800C00);
   TestInt32Unop(execution_mode, kExprI32Clz, 9, 0x00400000);
-  TestInt32Unop(execution_mode, kExprI32Clz, 10, 0x0020000d);
-  TestInt32Unop(execution_mode, kExprI32Clz, 11, 0x00100f00);
+  TestInt32Unop(execution_mode, kExprI32Clz, 10, 0x0020000D);
+  TestInt32Unop(execution_mode, kExprI32Clz, 11, 0x00100F00);
   TestInt32Unop(execution_mode, kExprI32Clz, 12, 0x00080000);
   TestInt32Unop(execution_mode, kExprI32Clz, 13, 0x00041000);
   TestInt32Unop(execution_mode, kExprI32Clz, 14, 0x00020020);
@@ -263,42 +279,42 @@
   TestInt32Unop(execution_mode, kExprI32Ctz, 30, 0x40000000);
   TestInt32Unop(execution_mode, kExprI32Ctz, 29, 0x20000000);
   TestInt32Unop(execution_mode, kExprI32Ctz, 28, 0x10000000);
-  TestInt32Unop(execution_mode, kExprI32Ctz, 27, 0xa8000000);
-  TestInt32Unop(execution_mode, kExprI32Ctz, 26, 0xf4000000);
+  TestInt32Unop(execution_mode, kExprI32Ctz, 27, 0xA8000000);
+  TestInt32Unop(execution_mode, kExprI32Ctz, 26, 0xF4000000);
   TestInt32Unop(execution_mode, kExprI32Ctz, 25, 0x62000000);
   TestInt32Unop(execution_mode, kExprI32Ctz, 24, 0x91000000);
-  TestInt32Unop(execution_mode, kExprI32Ctz, 23, 0xcd800000);
+  TestInt32Unop(execution_mode, kExprI32Ctz, 23, 0xCD800000);
   TestInt32Unop(execution_mode, kExprI32Ctz, 22, 0x09400000);
-  TestInt32Unop(execution_mode, kExprI32Ctz, 21, 0xaf200000);
-  TestInt32Unop(execution_mode, kExprI32Ctz, 20, 0xac100000);
-  TestInt32Unop(execution_mode, kExprI32Ctz, 19, 0xe0b80000);
-  TestInt32Unop(execution_mode, kExprI32Ctz, 18, 0x9ce40000);
-  TestInt32Unop(execution_mode, kExprI32Ctz, 17, 0xc7920000);
-  TestInt32Unop(execution_mode, kExprI32Ctz, 16, 0xb8f10000);
-  TestInt32Unop(execution_mode, kExprI32Ctz, 15, 0x3b9f8000);
-  TestInt32Unop(execution_mode, kExprI32Ctz, 14, 0xdb4c4000);
-  TestInt32Unop(execution_mode, kExprI32Ctz, 13, 0xe9a32000);
-  TestInt32Unop(execution_mode, kExprI32Ctz, 12, 0xfca61000);
-  TestInt32Unop(execution_mode, kExprI32Ctz, 11, 0x6c8a7800);
-  TestInt32Unop(execution_mode, kExprI32Ctz, 10, 0x8ce5a400);
-  TestInt32Unop(execution_mode, kExprI32Ctz, 9, 0xcb7d0200);
-  TestInt32Unop(execution_mode, kExprI32Ctz, 8, 0xcb4dc100);
-  TestInt32Unop(execution_mode, kExprI32Ctz, 7, 0xdfbec580);
-  TestInt32Unop(execution_mode, kExprI32Ctz, 6, 0x27a9db40);
-  TestInt32Unop(execution_mode, kExprI32Ctz, 5, 0xde3bcb20);
-  TestInt32Unop(execution_mode, kExprI32Ctz, 4, 0xd7e8a610);
-  TestInt32Unop(execution_mode, kExprI32Ctz, 3, 0x9afdbc88);
-  TestInt32Unop(execution_mode, kExprI32Ctz, 2, 0x9afdbc84);
-  TestInt32Unop(execution_mode, kExprI32Ctz, 1, 0x9afdbc82);
-  TestInt32Unop(execution_mode, kExprI32Ctz, 0, 0x9afdbc81);
+  TestInt32Unop(execution_mode, kExprI32Ctz, 21, 0xAF200000);
+  TestInt32Unop(execution_mode, kExprI32Ctz, 20, 0xAC100000);
+  TestInt32Unop(execution_mode, kExprI32Ctz, 19, 0xE0B80000);
+  TestInt32Unop(execution_mode, kExprI32Ctz, 18, 0x9CE40000);
+  TestInt32Unop(execution_mode, kExprI32Ctz, 17, 0xC7920000);
+  TestInt32Unop(execution_mode, kExprI32Ctz, 16, 0xB8F10000);
+  TestInt32Unop(execution_mode, kExprI32Ctz, 15, 0x3B9F8000);
+  TestInt32Unop(execution_mode, kExprI32Ctz, 14, 0xDB4C4000);
+  TestInt32Unop(execution_mode, kExprI32Ctz, 13, 0xE9A32000);
+  TestInt32Unop(execution_mode, kExprI32Ctz, 12, 0xFCA61000);
+  TestInt32Unop(execution_mode, kExprI32Ctz, 11, 0x6C8A7800);
+  TestInt32Unop(execution_mode, kExprI32Ctz, 10, 0x8CE5A400);
+  TestInt32Unop(execution_mode, kExprI32Ctz, 9, 0xCB7D0200);
+  TestInt32Unop(execution_mode, kExprI32Ctz, 8, 0xCB4DC100);
+  TestInt32Unop(execution_mode, kExprI32Ctz, 7, 0xDFBEC580);
+  TestInt32Unop(execution_mode, kExprI32Ctz, 6, 0x27A9DB40);
+  TestInt32Unop(execution_mode, kExprI32Ctz, 5, 0xDE3BCB20);
+  TestInt32Unop(execution_mode, kExprI32Ctz, 4, 0xD7E8A610);
+  TestInt32Unop(execution_mode, kExprI32Ctz, 3, 0x9AFDBC88);
+  TestInt32Unop(execution_mode, kExprI32Ctz, 2, 0x9AFDBC84);
+  TestInt32Unop(execution_mode, kExprI32Ctz, 1, 0x9AFDBC82);
+  TestInt32Unop(execution_mode, kExprI32Ctz, 0, 0x9AFDBC81);
 }
 
 WASM_EXEC_TEST(Int32Popcnt) {
-  TestInt32Unop(execution_mode, kExprI32Popcnt, 32, 0xffffffff);
+  TestInt32Unop(execution_mode, kExprI32Popcnt, 32, 0xFFFFFFFF);
   TestInt32Unop(execution_mode, kExprI32Popcnt, 0, 0x00000000);
   TestInt32Unop(execution_mode, kExprI32Popcnt, 1, 0x00008000);
   TestInt32Unop(execution_mode, kExprI32Popcnt, 13, 0x12345678);
-  TestInt32Unop(execution_mode, kExprI32Popcnt, 19, 0xfedcba09);
+  TestInt32Unop(execution_mode, kExprI32Popcnt, 19, 0xFEDCBA09);
 }
 
 WASM_EXEC_TEST(I32Eqz) {
@@ -309,41 +325,6 @@
   TestInt32Unop(execution_mode, kExprI32Eqz, 1, 0);
 }
 
-WASM_EXEC_TEST(I32Shl) {
-  WasmRunner<uint32_t, uint32_t, uint32_t> r(execution_mode);
-  BUILD(r, WASM_I32_SHL(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)));
-
-  FOR_UINT32_INPUTS(i) {
-    FOR_UINT32_INPUTS(j) {
-      uint32_t expected = (*i) << (*j & 0x1f);
-      CHECK_EQ(expected, r.Call(*i, *j));
-    }
-  }
-}
-
-WASM_EXEC_TEST(I32Shr) {
-  WasmRunner<uint32_t, uint32_t, uint32_t> r(execution_mode);
-  BUILD(r, WASM_I32_SHR(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)));
-
-  FOR_UINT32_INPUTS(i) {
-    FOR_UINT32_INPUTS(j) {
-      uint32_t expected = (*i) >> (*j & 0x1f);
-      CHECK_EQ(expected, r.Call(*i, *j));
-    }
-  }
-}
-
-WASM_EXEC_TEST(I32Sar) {
-  WasmRunner<int32_t, int32_t, int32_t> r(execution_mode);
-  BUILD(r, WASM_I32_SAR(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)));
-
-  FOR_INT32_INPUTS(i) {
-    FOR_INT32_INPUTS(j) {
-      int32_t expected = (*i) >> (*j & 0x1f);
-      CHECK_EQ(expected, r.Call(*i, *j));
-    }
-  }
-}
 
 WASM_EXEC_TEST(Int32DivS_trap) {
   WasmRunner<int32_t, int32_t, int32_t> r(execution_mode);
@@ -438,11 +419,11 @@
 }
 
 WASM_EXEC_TEST(Int32DivU_byzero_const) {
-  for (uint32_t denom = 0xfffffffe; denom < 8; ++denom) {
+  for (uint32_t denom = 0xFFFFFFFE; denom < 8; ++denom) {
     WasmRunner<uint32_t, uint32_t> r(execution_mode);
     BUILD(r, WASM_I32_DIVU(WASM_GET_LOCAL(0), WASM_I32V_1(denom)));
 
-    for (uint32_t val = 0xfffffff0; val < 8; ++val) {
+    for (uint32_t val = 0xFFFFFFF0; val < 8; ++val) {
       if (denom == 0) {
         CHECK_TRAP(r.Call(val));
       } else {
@@ -849,7 +830,7 @@
   WasmRunner<int32_t> r(execution_mode);
   r.builder().AddMemoryElems<int32_t>(8);
   BUILD(r, kExprI32Const, 0x00, kExprI32Const, 0x00, kExprI32LoadMem, 0x00,
-        0x0f, kExprBrTable, 0x00, 0x80, 0x00);  // entries=0
+        0x0F, kExprBrTable, 0x00, 0x80, 0x00);  // entries=0
   r.Call();
 }
 
@@ -1066,22 +1047,22 @@
   WasmRunner<int32_t> r(execution_mode);
 
   BUILD(r, WASM_I32_REINTERPRET_F32(
-               WASM_SEQ(kExprF32Const, 0x00, 0x00, 0xa0, 0x7f)));
+               WASM_SEQ(kExprF32Const, 0x00, 0x00, 0xA0, 0x7F)));
 
   // This is a signalling nan.
-  CHECK_EQ(0x7fa00000, r.Call());
+  CHECK_EQ(0x7FA00000, r.Call());
 }
 
 #endif
 
 WASM_EXEC_TEST(LoadMaxUint32Offset) {
   // TODO(eholk): Fix this test for the trap handler.
-  if (trap_handler::UseTrapHandler()) return;
+  if (trap_handler::IsTrapHandlerEnabled()) return;
   WasmRunner<int32_t> r(execution_mode);
   r.builder().AddMemoryElems<int32_t>(8);
 
   BUILD(r, WASM_LOAD_MEM_OFFSET(MachineType::Int32(),  // type
-                                U32V_5(0xffffffff),    // offset
+                                U32V_5(0xFFFFFFFF),    // offset
                                 WASM_ZERO));           // index
 
   CHECK_TRAP32(r.Call());
@@ -1504,20 +1485,20 @@
     BUILD(r,
           WASM_LOAD_MEM_ALIGNMENT(MachineType::Int32(), WASM_ZERO, alignment));
 
-    r.builder().WriteMemory(&memory[0], 0x1a2b3c4d);
-    CHECK_EQ(0x1a2b3c4d, r.Call(0));
+    r.builder().WriteMemory(&memory[0], 0x1A2B3C4D);
+    CHECK_EQ(0x1A2B3C4D, r.Call(0));
 
-    r.builder().WriteMemory(&memory[0], 0x5e6f7a8b);
-    CHECK_EQ(0x5e6f7a8b, r.Call(0));
+    r.builder().WriteMemory(&memory[0], 0x5E6F7A8B);
+    CHECK_EQ(0x5E6F7A8B, r.Call(0));
 
-    r.builder().WriteMemory(&memory[0], 0x7ca0b1c2);
-    CHECK_EQ(0x7ca0b1c2, r.Call(0));
+    r.builder().WriteMemory(&memory[0], 0x7CA0B1C2);
+    CHECK_EQ(0x7CA0B1C2, r.Call(0));
   }
 }
 
 WASM_EXEC_TEST(LoadMemI32_oob) {
   // TODO(eholk): Fix this test for the trap handler.
-  if (trap_handler::UseTrapHandler()) return;
+  if (trap_handler::IsTrapHandlerEnabled()) return;
   WasmRunner<int32_t, uint32_t> r(execution_mode);
   int32_t* memory = r.builder().AddMemoryElems<int32_t>(8);
   r.builder().RandomizeMemory(1111);
@@ -1537,7 +1518,7 @@
 
 WASM_EXEC_TEST(LoadMem_offset_oob) {
   // TODO(eholk): Fix this test for the trap handler.
-  if (trap_handler::UseTrapHandler()) return;
+  if (trap_handler::IsTrapHandlerEnabled()) return;
   static const MachineType machineTypes[] = {
       MachineType::Int8(),   MachineType::Uint8(),  MachineType::Int16(),
       MachineType::Uint16(), MachineType::Int32(),  MachineType::Uint32(),
@@ -1588,7 +1569,7 @@
 
 WASM_EXEC_TEST(LoadMemI32_const_oob_misaligned) {
   // TODO(eholk): Fix this test for the trap handler.
-  if (trap_handler::UseTrapHandler()) return;
+  if (trap_handler::IsTrapHandlerEnabled()) return;
   constexpr byte kMemSize = 12;
   // TODO(titzer): Fix misaligned accesses on MIPS and re-enable.
   for (byte offset = 0; offset < kMemSize + 5; ++offset) {
@@ -1611,7 +1592,7 @@
 
 WASM_EXEC_TEST(LoadMemI32_const_oob) {
   // TODO(eholk): Fix this test for the trap handler.
-  if (trap_handler::UseTrapHandler()) return;
+  if (trap_handler::IsTrapHandlerEnabled()) return;
   constexpr byte kMemSize = 24;
   for (byte offset = 0; offset < kMemSize + 5; offset += 4) {
     for (byte index = 0; index < kMemSize + 5; index += 4) {
@@ -1651,7 +1632,7 @@
 WASM_EXEC_TEST(StoreMemI32_offset) {
   WasmRunner<int32_t, int32_t> r(execution_mode);
   int32_t* memory = r.builder().AddMemoryElems<int32_t>(4);
-  const int32_t kWritten = 0xaabbccdd;
+  const int32_t kWritten = 0xAABBCCDD;
 
   BUILD(r, WASM_STORE_MEM_OFFSET(MachineType::Int32(), 4, WASM_GET_LOCAL(0),
                                  WASM_I32V_5(kWritten)),
@@ -1673,7 +1654,7 @@
 
 WASM_EXEC_TEST(StoreMem_offset_oob) {
   // TODO(eholk): Fix this test for the trap handler.
-  if (trap_handler::UseTrapHandler()) return;
+  if (trap_handler::IsTrapHandlerEnabled()) return;
   // 64-bit cases are handled in test-run-wasm-64.cc
   static const MachineType machineTypes[] = {
       MachineType::Int8(),    MachineType::Uint8(),  MachineType::Int16(),
@@ -1701,6 +1682,36 @@
   }
 }
 
+WASM_EXEC_TEST(Store_i32_narrowed) {
+  constexpr byte kOpcodes[] = {kExprI32StoreMem8, kExprI32StoreMem16,
+                               kExprI32StoreMem};
+  int stored_size_in_bytes = 0;
+  for (auto opcode : kOpcodes) {
+    stored_size_in_bytes = std::max(1, stored_size_in_bytes * 2);
+    constexpr int kBytes = 24;
+    uint8_t expected_memory[kBytes] = {0};
+    WasmRunner<int32_t, int32_t, int32_t> r(execution_mode);
+    uint8_t* memory = r.builder().AddMemoryElems<uint8_t>(kBytes);
+    constexpr uint32_t kPattern = 0x12345678;
+
+    BUILD(r, WASM_GET_LOCAL(0),                 // index
+          WASM_GET_LOCAL(1),                    // value
+          opcode, ZERO_ALIGNMENT, ZERO_OFFSET,  // store
+          WASM_ZERO);                           // return value
+
+    for (int i = 0; i <= kBytes - stored_size_in_bytes; ++i) {
+      uint32_t pattern = base::bits::RotateLeft32(kPattern, i % 32);
+      r.Call(i, pattern);
+      for (int b = 0; b < stored_size_in_bytes; ++b) {
+        expected_memory[i + b] = static_cast<uint8_t>(pattern >> (b * 8));
+      }
+      for (int w = 0; w < kBytes; ++w) {
+        CHECK_EQ(expected_memory[w], memory[w]);
+      }
+    }
+  }
+}
+
 WASM_EXEC_TEST(LoadMemI32_P) {
   const int kNumElems = 8;
   WasmRunner<int32_t, int32_t> r(execution_mode);
@@ -1865,30 +1876,30 @@
   CHECK_EQ(7, r.Call(1));
 }
 
-TEST(Build_Wasm_Unreachable1) {
-  WasmRunner<int32_t, int32_t> r(kExecuteCompiled);
+WASM_COMPILED_EXEC_TEST(Build_Wasm_Unreachable1) {
+  WasmRunner<int32_t, int32_t> r(execution_mode);
   BUILD(r, WASM_UNREACHABLE);
 }
 
-TEST(Build_Wasm_Unreachable2) {
-  WasmRunner<int32_t, int32_t> r(kExecuteCompiled);
+WASM_COMPILED_EXEC_TEST(Build_Wasm_Unreachable2) {
+  WasmRunner<int32_t, int32_t> r(execution_mode);
   BUILD(r, WASM_UNREACHABLE, WASM_UNREACHABLE);
 }
 
-TEST(Build_Wasm_Unreachable3) {
-  WasmRunner<int32_t, int32_t> r(kExecuteCompiled);
+WASM_COMPILED_EXEC_TEST(Build_Wasm_Unreachable3) {
+  WasmRunner<int32_t, int32_t> r(execution_mode);
   BUILD(r, WASM_UNREACHABLE, WASM_UNREACHABLE, WASM_UNREACHABLE);
 }
 
-TEST(Build_Wasm_UnreachableIf1) {
-  WasmRunner<int32_t, int32_t> r(kExecuteCompiled);
+WASM_COMPILED_EXEC_TEST(Build_Wasm_UnreachableIf1) {
+  WasmRunner<int32_t, int32_t> r(execution_mode);
   BUILD(r, WASM_UNREACHABLE,
         WASM_IF(WASM_GET_LOCAL(0), WASM_SEQ(WASM_GET_LOCAL(0), WASM_DROP)),
         WASM_ZERO);
 }
 
-TEST(Build_Wasm_UnreachableIf2) {
-  WasmRunner<int32_t, int32_t> r(kExecuteCompiled);
+WASM_COMPILED_EXEC_TEST(Build_Wasm_UnreachableIf2) {
+  WasmRunner<int32_t, int32_t> r(execution_mode);
   BUILD(r, WASM_UNREACHABLE,
         WASM_IF_ELSE_I(WASM_GET_LOCAL(0), WASM_GET_LOCAL(0), WASM_UNREACHABLE));
 }
@@ -2129,20 +2140,20 @@
         WASM_SET_GLOBAL(4, WASM_LOAD_MEM(MachineType::Float64(), WASM_ZERO)),
         WASM_ZERO);
 
-  memory[0] = 0xaa;
-  memory[1] = 0xcc;
+  memory[0] = 0xAA;
+  memory[1] = 0xCC;
   memory[2] = 0x55;
-  memory[3] = 0xee;
+  memory[3] = 0xEE;
   memory[4] = 0x33;
   memory[5] = 0x22;
   memory[6] = 0x11;
   memory[7] = 0x99;
   r.Call(1);
 
-  CHECK(static_cast<int32_t>(0xee55ccaa) == *var_int32);
-  CHECK(static_cast<uint32_t>(0xee55ccaa) == *var_uint32);
-  CHECK(bit_cast<float>(0xee55ccaa) == *var_float);
-  CHECK(bit_cast<double>(0x99112233ee55ccaaULL) == *var_double);
+  CHECK(static_cast<int32_t>(0xEE55CCAA) == *var_int32);
+  CHECK(static_cast<uint32_t>(0xEE55CCAA) == *var_uint32);
+  CHECK(bit_cast<float>(0xEE55CCAA) == *var_float);
+  CHECK(bit_cast<double>(0x99112233EE55CCAAULL) == *var_double);
 
   USE(unused);
 }
@@ -2389,10 +2400,11 @@
 
   byte local = r.AllocateLocal(kWasmI32);
   BUILD(r, WASM_SET_LOCAL(local, WASM_I32V_2(99)),
-        WASM_I32_ADD(WASM_CALL_FUNCTION(t1.function_index(), WASM_GET_LOCAL(0),
-                                        WASM_GET_LOCAL(0)),
-                     WASM_CALL_FUNCTION(t1.function_index(), WASM_GET_LOCAL(1),
-                                        WASM_GET_LOCAL(local))));
+        WASM_I32_ADD(
+            WASM_CALL_FUNCTION(t1.function_index(), WASM_GET_LOCAL(0),
+                               WASM_GET_LOCAL(0)),
+            WASM_CALL_FUNCTION(t1.function_index(), WASM_GET_LOCAL(local),
+                               WASM_GET_LOCAL(local))));
 
   CHECK_EQ(198, r.Call(0));
   CHECK_EQ(200, r.Call(1));
@@ -2842,15 +2854,8 @@
   WasmRunner<int32_t, float> r(execution_mode);
   BUILD(r, WASM_I32_SCONVERT_F32(WASM_GET_LOCAL(0)));
 
-  // The upper bound is (INT32_MAX + 1), which is the lowest float-representable
-  // number above INT32_MAX which cannot be represented as int32.
-  float upper_bound = 2147483648.0f;
-  // We use INT32_MIN as a lower bound because (INT32_MIN - 1) is not
-  // representable as float, and no number between (INT32_MIN - 1) and INT32_MIN
-  // is.
-  float lower_bound = static_cast<float>(INT32_MIN);
   FOR_FLOAT32_INPUTS(i) {
-    if (*i < upper_bound && *i >= lower_bound) {
+    if (is_inbounds<int32_t>(*i)) {
       CHECK_EQ(static_cast<int32_t>(*i), r.Call(*i));
     } else {
       CHECK_TRAP32(r.Call(*i));
@@ -2858,18 +2863,29 @@
   }
 }
 
+WASM_EXEC_TEST(I32SConvertSatF32) {
+  EXPERIMENTAL_FLAG_SCOPE(sat_f2i_conversions);
+  WasmRunner<int32_t, float> r(execution_mode);
+  BUILD(r, WASM_I32_SCONVERT_SAT_F32(WASM_GET_LOCAL(0)));
+
+  FOR_FLOAT32_INPUTS(i) {
+    int32_t expected =
+        is_inbounds<int32_t>(*i)
+            ? static_cast<int32_t>(*i)
+            : std::isnan(*i) ? 0
+                             : *i < 0.0 ? std::numeric_limits<int32_t>::min()
+                                        : std::numeric_limits<int32_t>::max();
+    int32_t found = r.Call(*i);
+    CHECK_EQ(expected, found);
+  }
+}
+
 WASM_EXEC_TEST(I32SConvertF64) {
   WasmRunner<int32_t, double> r(execution_mode);
   BUILD(r, WASM_I32_SCONVERT_F64(WASM_GET_LOCAL(0)));
 
-  // The upper bound is (INT32_MAX + 1), which is the lowest double-
-  // representable number above INT32_MAX which cannot be represented as int32.
-  double upper_bound = 2147483648.0;
-  // The lower bound is (INT32_MIN - 1), which is the greatest double-
-  // representable number below INT32_MIN which cannot be represented as int32.
-  double lower_bound = -2147483649.0;
   FOR_FLOAT64_INPUTS(i) {
-    if (*i<upper_bound&& * i> lower_bound) {
+    if (is_inbounds<int32_t>(*i)) {
       CHECK_EQ(static_cast<int32_t>(*i), r.Call(*i));
     } else {
       CHECK_TRAP32(r.Call(*i));
@@ -2877,16 +2893,27 @@
   }
 }
 
+WASM_EXEC_TEST(I32SConvertSatF64) {
+  EXPERIMENTAL_FLAG_SCOPE(sat_f2i_conversions);
+  WasmRunner<int32_t, double> r(execution_mode);
+  BUILD(r, WASM_I32_SCONVERT_SAT_F64(WASM_GET_LOCAL(0)));
+  FOR_FLOAT64_INPUTS(i) {
+    int32_t expected =
+        is_inbounds<int32_t>(*i)
+            ? static_cast<int32_t>(*i)
+            : std::isnan(*i) ? 0
+                             : *i < 0.0 ? std::numeric_limits<int32_t>::min()
+                                        : std::numeric_limits<int32_t>::max();
+    int32_t found = r.Call(*i);
+    CHECK_EQ(expected, found);
+  }
+}
+
 WASM_EXEC_TEST(I32UConvertF32) {
   WasmRunner<uint32_t, float> r(execution_mode);
   BUILD(r, WASM_I32_UCONVERT_F32(WASM_GET_LOCAL(0)));
-  // The upper bound is (UINT32_MAX + 1), which is the lowest
-  // float-representable number above UINT32_MAX which cannot be represented as
-  // uint32.
-  double upper_bound = 4294967296.0f;
-  double lower_bound = -1.0f;
   FOR_FLOAT32_INPUTS(i) {
-    if (*i<upper_bound&& * i> lower_bound) {
+    if (is_inbounds<uint32_t>(*i)) {
       CHECK_EQ(static_cast<uint32_t>(*i), r.Call(*i));
     } else {
       CHECK_TRAP32(r.Call(*i));
@@ -2894,16 +2921,27 @@
   }
 }
 
+WASM_EXEC_TEST(I32UConvertSatF32) {
+  EXPERIMENTAL_FLAG_SCOPE(sat_f2i_conversions);
+  WasmRunner<uint32_t, float> r(execution_mode);
+  BUILD(r, WASM_I32_UCONVERT_SAT_F32(WASM_GET_LOCAL(0)));
+  FOR_FLOAT32_INPUTS(i) {
+    int32_t expected =
+        is_inbounds<uint32_t>(*i)
+            ? static_cast<uint32_t>(*i)
+            : std::isnan(*i) ? 0
+                             : *i < 0.0 ? std::numeric_limits<uint32_t>::min()
+                                        : std::numeric_limits<uint32_t>::max();
+    int32_t found = r.Call(*i);
+    CHECK_EQ(expected, found);
+  }
+}
+
 WASM_EXEC_TEST(I32UConvertF64) {
   WasmRunner<uint32_t, double> r(execution_mode);
   BUILD(r, WASM_I32_UCONVERT_F64(WASM_GET_LOCAL(0)));
-  // The upper bound is (UINT32_MAX + 1), which is the lowest
-  // double-representable number above UINT32_MAX which cannot be represented as
-  // uint32.
-  double upper_bound = 4294967296.0;
-  double lower_bound = -1.0;
   FOR_FLOAT64_INPUTS(i) {
-    if (*i<upper_bound&& * i> lower_bound) {
+    if (is_inbounds<uint32_t>(*i)) {
       CHECK_EQ(static_cast<uint32_t>(*i), r.Call(*i));
     } else {
       CHECK_TRAP32(r.Call(*i));
@@ -2911,6 +2949,22 @@
   }
 }
 
+WASM_EXEC_TEST(I32UConvertSatF64) {
+  EXPERIMENTAL_FLAG_SCOPE(sat_f2i_conversions);
+  WasmRunner<uint32_t, double> r(execution_mode);
+  BUILD(r, WASM_I32_UCONVERT_SAT_F64(WASM_GET_LOCAL(0)));
+  FOR_FLOAT64_INPUTS(i) {
+    int32_t expected =
+        is_inbounds<uint32_t>(*i)
+            ? static_cast<uint32_t>(*i)
+            : std::isnan(*i) ? 0
+                             : *i < 0.0 ? std::numeric_limits<uint32_t>::min()
+                                        : std::numeric_limits<uint32_t>::max();
+    int32_t found = r.Call(*i);
+    CHECK_EQ(expected, found);
+  }
+}
+
 WASM_EXEC_TEST(F64CopySign) {
   WasmRunner<double, double, double> r(execution_mode);
   BUILD(r, WASM_F64_COPYSIGN(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)));
@@ -2929,12 +2983,12 @@
   }
 }
 
-static void CompileCallIndirectMany(ValueType param) {
+static void CompileCallIndirectMany(WasmExecutionMode mode, ValueType param) {
   // Make sure we don't run out of registers when compiling indirect calls
   // with many many parameters.
   TestSignatures sigs;
   for (byte num_params = 0; num_params < 40; ++num_params) {
-    WasmRunner<void> r(kExecuteCompiled);
+    WasmRunner<void> r(mode);
     FunctionSig* sig = sigs.many(r.zone(), kWasmStmt, param, num_params);
 
     r.builder().AddSignature(sig);
@@ -2954,11 +3008,17 @@
   }
 }
 
-TEST(Compile_Wasm_CallIndirect_Many_i32) { CompileCallIndirectMany(kWasmI32); }
+WASM_COMPILED_EXEC_TEST(Compile_Wasm_CallIndirect_Many_i32) {
+  CompileCallIndirectMany(execution_mode, kWasmI32);
+}
 
-TEST(Compile_Wasm_CallIndirect_Many_f32) { CompileCallIndirectMany(kWasmF32); }
+WASM_COMPILED_EXEC_TEST(Compile_Wasm_CallIndirect_Many_f32) {
+  CompileCallIndirectMany(execution_mode, kWasmF32);
+}
 
-TEST(Compile_Wasm_CallIndirect_Many_f64) { CompileCallIndirectMany(kWasmF64); }
+WASM_COMPILED_EXEC_TEST(Compile_Wasm_CallIndirect_Many_f64) {
+  CompileCallIndirectMany(execution_mode, kWasmF64);
+}
 
 WASM_EXEC_TEST(Int32RemS_dead) {
   WasmRunner<int32_t, int32_t, int32_t> r(execution_mode);
diff --git a/src/v8/test/cctest/wasm/test-streaming-compilation.cc b/src/v8/test/cctest/wasm/test-streaming-compilation.cc
index 3ff6536..ef77708 100644
--- a/src/v8/test/cctest/wasm/test-streaming-compilation.cc
+++ b/src/v8/test/cctest/wasm/test-streaming-compilation.cc
@@ -10,6 +10,7 @@
 #include "src/wasm/compilation-manager.h"
 #include "src/wasm/module-decoder.h"
 #include "src/wasm/streaming-decoder.h"
+#include "src/wasm/wasm-engine.h"
 #include "src/wasm/wasm-module-builder.h"
 #include "src/wasm/wasm-module.h"
 
@@ -24,42 +25,66 @@
 
 class MockPlatform final : public TestPlatform {
  public:
-  MockPlatform() {
+  MockPlatform() : task_runner_(std::make_shared<MockTaskRunner>()) {
     // Now that it's completely constructed, make this the current platform.
     i::V8::SetPlatformForTesting(this);
   }
-  virtual ~MockPlatform() {
-    // Delete all remaining tasks in the queue.
-    while (!tasks_.empty()) {
-      Task* task = tasks_.back();
-      tasks_.pop_back();
-      delete task;
-    }
+
+  std::shared_ptr<TaskRunner> GetForegroundTaskRunner(
+      v8::Isolate* isolate) override {
+    return task_runner_;
+  }
+
+  std::shared_ptr<TaskRunner> GetBackgroundTaskRunner(
+      v8::Isolate* isolate) override {
+    return task_runner_;
   }
 
   void CallOnForegroundThread(v8::Isolate* isolate, Task* task) override {
-    tasks_.push_back(task);
+    task_runner_->PostTask(std::unique_ptr<Task>(task));
   }
 
   void CallOnBackgroundThread(v8::Task* task,
                               ExpectedRuntime expected_runtime) override {
-    tasks_.push_back(task);
+    task_runner_->PostTask(std::unique_ptr<Task>(task));
   }
 
   bool IdleTasksEnabled(v8::Isolate* isolate) override { return false; }
 
-  void ExecuteTasks() {
-    while (!tasks_.empty()) {
-      Task* task = tasks_.back();
-      tasks_.pop_back();
-      task->Run();
-      delete task;
-    }
-  }
+  void ExecuteTasks() { task_runner_->ExecuteTasks(); }
 
  private:
-  // We do not execute tasks concurrently, so we only need one list of tasks.
-  std::vector<Task*> tasks_;
+  class MockTaskRunner final : public TaskRunner {
+   public:
+    void PostTask(std::unique_ptr<v8::Task> task) override {
+      tasks_.push_back(std::move(task));
+    }
+
+    void PostDelayedTask(std::unique_ptr<Task> task,
+                         double delay_in_seconds) override {
+      UNREACHABLE();
+    };
+
+    void PostIdleTask(std::unique_ptr<IdleTask> task) override {
+      UNREACHABLE();
+    }
+
+    bool IdleTasksEnabled() override { return false; };
+
+    void ExecuteTasks() {
+      while (!tasks_.empty()) {
+        std::unique_ptr<Task> task = std::move(tasks_.back());
+        tasks_.pop_back();
+        task->Run();
+      }
+    }
+
+   private:
+    // We do not execute tasks concurrently, so we only need one list of tasks.
+    std::vector<std::unique_ptr<v8::Task>> tasks_;
+  };
+
+  std::shared_ptr<MockTaskRunner> task_runner_;
 };
 
 namespace {
@@ -79,14 +104,18 @@
 
     i::Handle<i::JSPromise> i_promise = v8::Utils::OpenHandle(*promise_);
 
-    stream_ = i_isolate->wasm_compilation_manager()->StartStreamingCompilation(
-        i_isolate, v8::Utils::OpenHandle(*context), i_promise);
+    stream_ = i_isolate->wasm_engine()
+                  ->compilation_manager()
+                  ->StartStreamingCompilation(
+                      i_isolate, v8::Utils::OpenHandle(*context), i_promise);
   }
 
   std::shared_ptr<StreamingDecoder> stream() { return stream_; }
 
   // Run all compiler tasks, both foreground and background tasks.
-  void RunCompilerTasks() { platform_.ExecuteTasks(); }
+  void RunCompilerTasks() {
+    static_cast<MockPlatform*>(i::V8::GetCurrentPlatform())->ExecuteTasks();
+  }
 
   bool IsPromiseFulfilled() {
     return promise_->State() == v8::Promise::kFulfilled;
@@ -109,7 +138,6 @@
  private:
   AccountingAllocator allocator_;
   Zone zone_;
-  MockPlatform platform_;
   v8::Local<v8::Promise> promise_;
   std::shared_ptr<StreamingDecoder> stream_;
 };
@@ -118,6 +146,7 @@
 #define STREAM_TEST(name)                               \
   void RunStream_##name();                              \
   TEST(name) {                                          \
+    MockPlatform platform;                              \
     CcTest::InitializeVM();                             \
     v8::HandleScope handle_scope(CcTest::isolate());    \
     i::HandleScope internal_scope(CcTest::i_isolate()); \
@@ -301,12 +330,12 @@
   ZoneBuffer buffer = GetValidModuleBytes(zone);
   // 9 == 4 (wasm magic) + 4 (version) + 1 (section code)
   uint8_t* section_size_address = const_cast<uint8_t*>(buffer.begin()) + 9;
-  // 0x808080800f is an invalid module size in leb encoding.
+  // 0x808080800F is an invalid module size in leb encoding.
   section_size_address[0] = 0x80;
   section_size_address[1] = 0x80;
   section_size_address[2] = 0x80;
   section_size_address[3] = 0x80;
-  section_size_address[4] = 0x0f;
+  section_size_address[4] = 0x0F;
   return buffer;
 }
 
@@ -809,6 +838,176 @@
   tester.RunCompilerTasks();
 }
 
+STREAM_TEST(TestOnlyModuleHeader) {
+  StreamTester tester;
+
+  const uint8_t bytes[] = {
+      WASM_MODULE_HEADER,  // module header
+  };
+
+  tester.OnBytesReceived(bytes, arraysize(bytes));
+  tester.FinishStream();
+  tester.RunCompilerTasks();
+
+  CHECK(tester.IsPromiseFulfilled());
+}
+
+STREAM_TEST(TestModuleWithZeroFunctions) {
+  StreamTester tester;
+
+  const uint8_t bytes[] = {
+      WASM_MODULE_HEADER,    // module header
+      kTypeSectionCode,      // section code
+      U32V_1(1),             // section size
+      U32V_1(0),             // type count
+      kFunctionSectionCode,  // section code
+      U32V_1(1),             // section size
+      U32V_1(0),             // functions count
+      kCodeSectionCode,      // section code
+      U32V_1(1),             // section size
+      U32V_1(0),             // functions count
+  };
+
+  tester.OnBytesReceived(bytes, arraysize(bytes));
+  tester.FinishStream();
+  tester.RunCompilerTasks();
+  CHECK(tester.IsPromiseFulfilled());
+}
+
+STREAM_TEST(TestModuleWithMultipleFunctions) {
+  StreamTester tester;
+
+  uint8_t code[] = {
+      U32V_1(4),                  // body size
+      U32V_1(0),                  // locals count
+      kExprGetLocal, 0, kExprEnd  // body
+  };
+
+  const uint8_t bytes[] = {
+      WASM_MODULE_HEADER,                   // module header
+      kTypeSectionCode,                     // section code
+      U32V_1(1 + SIZEOF_SIG_ENTRY_x_x),     // section size
+      U32V_1(1),                            // type count
+      SIG_ENTRY_x_x(kLocalI32, kLocalI32),  // signature entry
+      kFunctionSectionCode,                 // section code
+      U32V_1(1 + 3),                        // section size
+      U32V_1(3),                            // functions count
+      0,                                    // signature index
+      0,                                    // signature index
+      0,                                    // signature index
+      kCodeSectionCode,                     // section code
+      U32V_1(1 + arraysize(code) * 3),      // section size
+      U32V_1(3),                            // functions count
+  };
+
+  tester.OnBytesReceived(bytes, arraysize(bytes));
+  tester.OnBytesReceived(code, arraysize(code));
+  tester.OnBytesReceived(code, arraysize(code));
+  tester.RunCompilerTasks();
+  tester.OnBytesReceived(code, arraysize(code));
+  tester.FinishStream();
+  tester.RunCompilerTasks();
+  CHECK(tester.IsPromiseFulfilled());
+}
+
+STREAM_TEST(TestModuleWithDataSection) {
+  StreamTester tester;
+
+  uint8_t code[] = {
+      U32V_1(4),                  // body size
+      U32V_1(0),                  // locals count
+      kExprGetLocal, 0, kExprEnd  // body
+  };
+
+  const uint8_t bytes[] = {
+      WASM_MODULE_HEADER,                   // module header
+      kTypeSectionCode,                     // section code
+      U32V_1(1 + SIZEOF_SIG_ENTRY_x_x),     // section size
+      U32V_1(1),                            // type count
+      SIG_ENTRY_x_x(kLocalI32, kLocalI32),  // signature entry
+      kFunctionSectionCode,                 // section code
+      U32V_1(1 + 3),                        // section size
+      U32V_1(3),                            // functions count
+      0,                                    // signature index
+      0,                                    // signature index
+      0,                                    // signature index
+      kCodeSectionCode,                     // section code
+      U32V_1(1 + arraysize(code) * 3),      // section size
+      U32V_1(3),                            // functions count
+  };
+
+  const uint8_t data_section[] = {
+      kDataSectionCode,  // section code
+      U32V_1(1),         // section size
+      U32V_1(0),         // data segment count
+  };
+  tester.OnBytesReceived(bytes, arraysize(bytes));
+  tester.OnBytesReceived(code, arraysize(code));
+  tester.OnBytesReceived(code, arraysize(code));
+  tester.OnBytesReceived(code, arraysize(code));
+  tester.RunCompilerTasks();
+  tester.OnBytesReceived(data_section, arraysize(data_section));
+  tester.RunCompilerTasks();
+  tester.FinishStream();
+  tester.RunCompilerTasks();
+  CHECK(tester.IsPromiseFulfilled());
+}
+// Test that all bytes arrive before doing any compilation. FinishStream is
+// called immediately.
+STREAM_TEST(TestModuleWithImportedFunction) {
+  StreamTester tester;
+  ZoneBuffer buffer(tester.zone());
+  TestSignatures sigs;
+  WasmModuleBuilder builder(tester.zone());
+  builder.AddImport(ArrayVector("Test"), sigs.i_iii());
+  {
+    WasmFunctionBuilder* f = builder.AddFunction(sigs.i_iii());
+    uint8_t code[] = {kExprGetLocal, 0, kExprEnd};
+    f->EmitCode(code, arraysize(code));
+  }
+  builder.WriteTo(buffer);
+
+  tester.OnBytesReceived(buffer.begin(), buffer.end() - buffer.begin());
+  tester.FinishStream();
+
+  tester.RunCompilerTasks();
+
+  CHECK(tester.IsPromiseFulfilled());
+}
+
+STREAM_TEST(TestModuleWithErrorAfterDataSection) {
+  StreamTester tester;
+
+  const uint8_t bytes[] = {
+      WASM_MODULE_HEADER,                   // module header
+      kTypeSectionCode,                     // section code
+      U32V_1(1 + SIZEOF_SIG_ENTRY_x_x),     // section size
+      U32V_1(1),                            // type count
+      SIG_ENTRY_x_x(kLocalI32, kLocalI32),  // signature entry
+      kFunctionSectionCode,                 // section code
+      U32V_1(1 + 1),                        // section size
+      U32V_1(1),                            // functions count
+      0,                                    // signature index
+      kCodeSectionCode,                     // section code
+      U32V_1(6),                            // section size
+      U32V_1(1),                            // functions count
+      U32V_1(4),                            // body size
+      U32V_1(0),                            // locals count
+      kExprGetLocal,                        // some code
+      0,                                    // some code
+      kExprEnd,                             // some code
+      kDataSectionCode,                     // section code
+      U32V_1(1),                            // section size
+      U32V_1(0),                            // data segment count
+      kUnknownSectionCode,                  // section code
+      U32V_1(1),                            // invalid section size
+  };
+
+  tester.OnBytesReceived(bytes, arraysize(bytes));
+  tester.FinishStream();
+  tester.RunCompilerTasks();
+  CHECK(tester.IsPromiseRejected());
+}
 #undef STREAM_TEST
 
 }  // namespace wasm
diff --git a/src/v8/test/cctest/wasm/test-wasm-breakpoints.cc b/src/v8/test/cctest/wasm/test-wasm-breakpoints.cc
index 492ec46..48640ef 100644
--- a/src/v8/test/cctest/wasm/test-wasm-breakpoints.cc
+++ b/src/v8/test/cctest/wasm/test-wasm-breakpoints.cc
@@ -22,12 +22,10 @@
 namespace {
 
 void CheckLocations(
-    WasmCompiledModule *compiled_module, debug::Location start,
-    debug::Location end,
+    WasmSharedModuleData* shared, debug::Location start, debug::Location end,
     std::initializer_list<debug::Location> expected_locations_init) {
   std::vector<debug::BreakLocation> locations;
-  bool success =
-      compiled_module->GetPossibleBreakpoints(start, end, &locations);
+  bool success = shared->GetPossibleBreakpoints(start, end, &locations);
   CHECK(success);
 
   printf("got %d locations: ", static_cast<int>(locations.size()));
@@ -46,11 +44,11 @@
              locations[i].GetColumnNumber());
   }
 }
-void CheckLocationsFail(WasmCompiledModule *compiled_module,
-                        debug::Location start, debug::Location end) {
+
+void CheckLocationsFail(WasmSharedModuleData* shared, debug::Location start,
+                        debug::Location end) {
   std::vector<debug::BreakLocation> locations;
-  bool success =
-      compiled_module->GetPossibleBreakpoints(start, end, &locations);
+  bool success = shared->GetPossibleBreakpoints(start, end, &locations);
   CHECK(!success);
 }
 
@@ -132,9 +130,8 @@
   desc.set_value(triggered_fun);
   Handle<String> name =
       isolate->factory()->InternalizeUtf8String(CStrVector("isTriggered"));
-  CHECK(
-      JSObject::DefineOwnProperty(isolate, obj, name, &desc, Object::DONT_THROW)
-          .FromMaybe(false));
+  CHECK(JSObject::DefineOwnProperty(isolate, obj, name, &desc, kDontThrow)
+            .FromMaybe(false));
   return obj;
 }
 
@@ -265,33 +262,35 @@
 
 }  // namespace
 
-TEST(WasmCollectPossibleBreakpoints) {
-  WasmRunner<int> runner(kExecuteCompiled);
+WASM_COMPILED_EXEC_TEST(WasmCollectPossibleBreakpoints) {
+  WasmRunner<int> runner(execution_mode);
 
   BUILD(runner, WASM_NOP, WASM_I32_ADD(WASM_ZERO, WASM_ONE));
 
-  Handle<WasmInstanceObject> instance = runner.builder().instance_object();
+  WasmInstanceObject* instance = *runner.builder().instance_object();
+  WasmSharedModuleData* shared = instance->compiled_module()->shared();
+
   std::vector<debug::Location> locations;
   // Check all locations for function 0.
-  CheckLocations(instance->compiled_module(), {0, 0}, {1, 0},
+  CheckLocations(shared, {0, 0}, {1, 0},
                  {{0, 1}, {0, 2}, {0, 4}, {0, 6}, {0, 7}});
   // Check a range ending at an instruction.
-  CheckLocations(instance->compiled_module(), {0, 2}, {0, 4}, {{0, 2}});
+  CheckLocations(shared, {0, 2}, {0, 4}, {{0, 2}});
   // Check a range ending one behind an instruction.
-  CheckLocations(instance->compiled_module(), {0, 2}, {0, 5}, {{0, 2}, {0, 4}});
+  CheckLocations(shared, {0, 2}, {0, 5}, {{0, 2}, {0, 4}});
   // Check a range starting at an instruction.
-  CheckLocations(instance->compiled_module(), {0, 7}, {0, 8}, {{0, 7}});
+  CheckLocations(shared, {0, 7}, {0, 8}, {{0, 7}});
   // Check from an instruction to beginning of next function.
-  CheckLocations(instance->compiled_module(), {0, 7}, {1, 0}, {{0, 7}});
+  CheckLocations(shared, {0, 7}, {1, 0}, {{0, 7}});
   // Check from end of one function (no valid instruction position) to beginning
   // of next function. Must be empty, but not fail.
-  CheckLocations(instance->compiled_module(), {0, 8}, {1, 0}, {});
+  CheckLocations(shared, {0, 8}, {1, 0}, {});
   // Check from one after the end of the function. Must fail.
-  CheckLocationsFail(instance->compiled_module(), {0, 9}, {1, 0});
+  CheckLocationsFail(shared, {0, 9}, {1, 0});
 }
 
-TEST(WasmSimpleBreak) {
-  WasmRunner<int> runner(kExecuteCompiled);
+WASM_COMPILED_EXEC_TEST(WasmSimpleBreak) {
+  WasmRunner<int> runner(execution_mode);
   Isolate* isolate = runner.main_isolate();
 
   BUILD(runner, WASM_NOP, WASM_I32_ADD(WASM_I32V_1(11), WASM_I32V_1(3)));
@@ -311,8 +310,8 @@
   CHECK_EQ(14, result);
 }
 
-TEST(WasmSimpleStepping) {
-  WasmRunner<int> runner(kExecuteCompiled);
+WASM_COMPILED_EXEC_TEST(WasmSimpleStepping) {
+  WasmRunner<int> runner(execution_mode);
   BUILD(runner, WASM_I32_ADD(WASM_I32V_1(11), WASM_I32V_1(3)));
 
   Isolate* isolate = runner.main_isolate();
@@ -338,8 +337,8 @@
   CHECK_EQ(14, result);
 }
 
-TEST(WasmStepInAndOut) {
-  WasmRunner<int, int> runner(kExecuteCompiled);
+WASM_COMPILED_EXEC_TEST(WasmStepInAndOut) {
+  WasmRunner<int, int> runner(execution_mode);
   WasmFunctionCompiler& f2 = runner.NewFunction<void>();
   f2.AllocateLocal(ValueType::kWord32);
 
@@ -378,8 +377,8 @@
              .is_null());
 }
 
-TEST(WasmGetLocalsAndStack) {
-  WasmRunner<void, int> runner(kExecuteCompiled);
+WASM_COMPILED_EXEC_TEST(WasmGetLocalsAndStack) {
+  WasmRunner<void, int> runner(execution_mode);
   runner.AllocateLocal(ValueType::kWord64);
   runner.AllocateLocal(ValueType::kFloat32);
   runner.AllocateLocal(ValueType::kFloat64);
diff --git a/src/v8/test/cctest/wasm/test-wasm-codegen.cc b/src/v8/test/cctest/wasm/test-wasm-codegen.cc
new file mode 100644
index 0000000..189ef46
--- /dev/null
+++ b/src/v8/test/cctest/wasm/test-wasm-codegen.cc
@@ -0,0 +1,101 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Tests effects of (CSP) "unsafe-eval" and "wasm-eval" callback functions.
+//
+// Note: These tests are in a separate test file because the tests dynamically
+// change the isolate in terms of callbacks allow_code_gen_callback and
+// allow_wasm_code_gen_callback.
+
+#include "src/wasm/wasm-module-builder.h"
+#include "src/wasm/wasm-objects-inl.h"
+#include "src/wasm/wasm-objects.h"
+
+#include "test/cctest/cctest.h"
+#include "test/common/wasm/wasm-module-runner.h"
+
+namespace v8 {
+namespace internal {
+namespace wasm {
+
+namespace {
+
+// Possible values for callback pointers.
+enum TestValue {
+  kTestUsingNull,   // no callback.
+  kTestUsingFalse,  // callback returning false.
+  kTestUsingTrue,   // callbacl returning true.
+};
+
+constexpr int kNumTestValues = 3;
+
+const char* TestValueName[kNumTestValues] = {"null", "false", "true"};
+
+// Defined to simplify iterating over TestValues;
+const TestValue AllTestValues[kNumTestValues] = {
+    kTestUsingNull, kTestUsingFalse, kTestUsingTrue};
+
+// This matrix holds the results of setting allow_code_gen_callback
+// (first index) and allow_wasm_code_gen_callback (second index) using
+// TestValue's. The value in the matrix is true if compilation is
+// allowed, and false otherwise.
+const bool ExpectedResults[kNumTestValues][kNumTestValues] = {
+    {true, false, true}, {false, false, true}, {true, false, true}};
+
+bool TrueCallback(Local<v8::Context>, Local<v8::String>) { return true; }
+
+bool FalseCallback(Local<v8::Context>, Local<v8::String>) { return false; }
+
+typedef bool (*CallbackFn)(Local<v8::Context>, Local<v8::String>);
+
+// Defines the Callback to use for the corresponding TestValue.
+CallbackFn Callback[kNumTestValues] = {nullptr, FalseCallback, TrueCallback};
+
+void BuildTrivialModule(Zone* zone, ZoneBuffer* buffer) {
+  WasmModuleBuilder* builder = new (zone) WasmModuleBuilder(zone);
+  builder->WriteTo(*buffer);
+}
+
+bool TestModule(Isolate* isolate,
+                v8::WasmCompiledModule::CallerOwnedBuffer wire_bytes) {
+  HandleScope scope(isolate);
+
+  v8::WasmCompiledModule::CallerOwnedBuffer serialized_module(nullptr, 0);
+  MaybeLocal<v8::WasmCompiledModule> module =
+      v8::WasmCompiledModule::DeserializeOrCompile(
+          reinterpret_cast<v8::Isolate*>(isolate), serialized_module,
+          wire_bytes);
+  return !module.IsEmpty();
+}
+
+}  // namespace
+
+TEST(PropertiesOfCodegenCallbacks) {
+  v8::internal::AccountingAllocator allocator;
+  Zone zone(&allocator, ZONE_NAME);
+  ZoneBuffer buffer(&zone);
+  BuildTrivialModule(&zone, &buffer);
+  v8::WasmCompiledModule::CallerOwnedBuffer wire_bytes = {buffer.begin(),
+                                                          buffer.size()};
+  Isolate* isolate = CcTest::InitIsolateOnce();
+  HandleScope scope(isolate);
+  testing::SetupIsolateForWasmModule(isolate);
+
+  for (TestValue codegen : AllTestValues) {
+    for (TestValue wasm_codegen : AllTestValues) {
+      fprintf(stderr, "Test codegen = %s, wasm_codegen = %s\n",
+              TestValueName[codegen], TestValueName[wasm_codegen]);
+      isolate->set_allow_code_gen_callback(Callback[codegen]);
+      isolate->set_allow_wasm_code_gen_callback(Callback[wasm_codegen]);
+      bool found = TestModule(isolate, wire_bytes);
+      bool expected = ExpectedResults[codegen][wasm_codegen];
+      CHECK_EQ(expected, found);
+      CcTest::CollectAllAvailableGarbage();
+    }
+  }
+}
+
+}  // namespace wasm
+}  // namespace internal
+}  // namespace v8
diff --git a/src/v8/test/cctest/wasm/test-wasm-interpreter-entry.cc b/src/v8/test/cctest/wasm/test-wasm-interpreter-entry.cc
index 4f7b66e..16c5259 100644
--- a/src/v8/test/cctest/wasm/test-wasm-interpreter-entry.cc
+++ b/src/v8/test/cctest/wasm/test-wasm-interpreter-entry.cc
@@ -47,6 +47,7 @@
     runner.Build(outer_code.data(), outer_code.data() + outer_code.size());
 
     int funcs_to_redict[] = {static_cast<int>(inner_compiler.function_index())};
+    runner.builder().Link();
     WasmDebugInfo::RedirectToInterpreter(debug_info_,
                                          ArrayVector(funcs_to_redict));
     main_fun_wrapper_ = runner.builder().WrapCode(runner.function_index());
@@ -90,7 +91,7 @@
 
 // Pass int32_t, return int32_t.
 TEST(TestArgumentPassing_int32) {
-  WasmRunner<int32_t, int32_t> runner(kExecuteCompiled);
+  WasmRunner<int32_t, int32_t> runner(kExecuteTurbofan);
   WasmFunctionCompiler& f2 = runner.NewFunction<int32_t, int32_t>();
 
   auto helper = GetHelper(
@@ -101,13 +102,12 @@
        WASM_GET_LOCAL(0), WASM_CALL_FUNCTION0(f2.function_index())},
       [](int32_t a) { return 2 * a + 1; });
 
-  std::vector<int32_t> test_values = compiler::ValueHelper::int32_vector();
-  for (int32_t v : test_values) helper.CheckCall(v);
+  FOR_INT32_INPUTS(v) { helper.CheckCall(*v); }
 }
 
 // Pass int64_t, return double.
 TEST(TestArgumentPassing_double_int64) {
-  WasmRunner<double, int32_t, int32_t> runner(kExecuteCompiled);
+  WasmRunner<double, int32_t, int32_t> runner(kExecuteTurbofan);
   WasmFunctionCompiler& f2 = runner.NewFunction<double, int64_t>();
 
   auto helper = GetHelper(
@@ -120,22 +120,18 @@
                                  WASM_I64V_1(32))),
        WASM_CALL_FUNCTION0(f2.function_index())},
       [](int32_t a, int32_t b) {
-        int64_t a64 = static_cast<int64_t>(a) & 0xffffffff;
+        int64_t a64 = static_cast<int64_t>(a) & 0xFFFFFFFF;
         int64_t b64 = static_cast<int64_t>(b) << 32;
         return static_cast<double>(a64 | b64);
       });
 
-  std::vector<int32_t> test_values_i32 = compiler::ValueHelper::int32_vector();
-  for (int32_t v1 : test_values_i32) {
-    for (int32_t v2 : test_values_i32) {
-      helper.CheckCall(v1, v2);
-    }
+  FOR_INT32_INPUTS(v1) {
+    FOR_INT32_INPUTS(v2) { helper.CheckCall(*v1, *v2); }
   }
 
-  std::vector<int64_t> test_values_i64 = compiler::ValueHelper::int64_vector();
-  for (int64_t v : test_values_i64) {
-    int32_t v1 = static_cast<int32_t>(v);
-    int32_t v2 = static_cast<int32_t>(v >> 32);
+  FOR_INT64_INPUTS(v) {
+    int32_t v1 = static_cast<int32_t>(*v);
+    int32_t v2 = static_cast<int32_t>(*v >> 32);
     helper.CheckCall(v1, v2);
     helper.CheckCall(v2, v1);
   }
@@ -144,7 +140,7 @@
 // Pass double, return int64_t.
 TEST(TestArgumentPassing_int64_double) {
   // Outer function still returns double.
-  WasmRunner<double, double> runner(kExecuteCompiled);
+  WasmRunner<double, double> runner(kExecuteTurbofan);
   WasmFunctionCompiler& f2 = runner.NewFunction<int64_t, double>();
 
   auto helper = GetHelper(
@@ -163,7 +159,7 @@
 
 // Pass float, return double.
 TEST(TestArgumentPassing_float_double) {
-  WasmRunner<double, float> runner(kExecuteCompiled);
+  WasmRunner<double, float> runner(kExecuteTurbofan);
   WasmFunctionCompiler& f2 = runner.NewFunction<double, float>();
 
   auto helper = GetHelper(
@@ -176,13 +172,12 @@
        WASM_GET_LOCAL(0), WASM_CALL_FUNCTION0(f2.function_index())},
       [](float f) { return 2. * static_cast<double>(f) + 1.; });
 
-  std::vector<float> test_values = compiler::ValueHelper::float32_vector();
-  for (float f : test_values) helper.CheckCall(f);
+  FOR_FLOAT32_INPUTS(f) { helper.CheckCall(*f); }
 }
 
 // Pass two doubles, return double.
 TEST(TestArgumentPassing_double_double) {
-  WasmRunner<double, double, double> runner(kExecuteCompiled);
+  WasmRunner<double, double, double> runner(kExecuteTurbofan);
   WasmFunctionCompiler& f2 = runner.NewFunction<double, double, double>();
 
   auto helper = GetHelper(runner, f2,
@@ -193,11 +188,8 @@
                            WASM_CALL_FUNCTION0(f2.function_index())},
                           [](double a, double b) { return a + b; });
 
-  std::vector<double> test_values = compiler::ValueHelper::float64_vector();
-  for (double d1 : test_values) {
-    for (double d2 : test_values) {
-      helper.CheckCall(d1, d2);
-    }
+  FOR_FLOAT64_INPUTS(d1) {
+    FOR_FLOAT64_INPUTS(d2) { helper.CheckCall(*d1, *d2); }
   }
 }
 
@@ -205,7 +197,7 @@
 TEST(TestArgumentPassing_AllTypes) {
   // The second and third argument will be combined to an i64.
   WasmRunner<double, int32_t, int32_t, int32_t, float, double> runner(
-      kExecuteCompiled);
+      kExecuteTurbofan);
   WasmFunctionCompiler& f2 =
       runner.NewFunction<double, int32_t, int64_t, float, double>();
 
@@ -231,8 +223,8 @@
        WASM_GET_LOCAL(4),  // fourth arg
        WASM_CALL_FUNCTION0(f2.function_index())},
       [](int32_t a, int32_t b, int32_t c, float d, double e) {
-        return 0. + a + (static_cast<int64_t>(b) & 0xffffffff) +
-               ((static_cast<int64_t>(c) & 0xffffffff) << 32) + d + e;
+        return 0. + a + (static_cast<int64_t>(b) & 0xFFFFFFFF) +
+               ((static_cast<int64_t>(c) & 0xFFFFFFFF) << 32) + d + e;
       });
 
   auto CheckCall = [&](int32_t a, int64_t b, float c, double d) {
@@ -242,10 +234,11 @@
     helper.CheckCall(a, b1, b0, c, d);
   };
 
-  std::vector<int32_t> test_values_i32 = compiler::ValueHelper::int32_vector();
-  std::vector<int64_t> test_values_i64 = compiler::ValueHelper::int64_vector();
-  std::vector<float> test_values_f32 = compiler::ValueHelper::float32_vector();
-  std::vector<double> test_values_f64 = compiler::ValueHelper::float64_vector();
+  Vector<const int32_t> test_values_i32 = compiler::ValueHelper::int32_vector();
+  Vector<const int64_t> test_values_i64 = compiler::ValueHelper::int64_vector();
+  Vector<const float> test_values_f32 = compiler::ValueHelper::float32_vector();
+  Vector<const double> test_values_f64 =
+      compiler::ValueHelper::float64_vector();
   size_t max_len =
       std::max(std::max(test_values_i32.size(), test_values_i64.size()),
                std::max(test_values_f32.size(), test_values_f64.size()));
diff --git a/src/v8/test/cctest/wasm/test-wasm-stack.cc b/src/v8/test/cctest/wasm/test-wasm-stack.cc
index 2a489b5..b775e94 100644
--- a/src/v8/test/cctest/wasm/test-wasm-stack.cc
+++ b/src/v8/test/cctest/wasm/test-wasm-stack.cc
@@ -101,8 +101,8 @@
 }  // namespace
 
 // Call from JS to wasm to JS and throw an Error from JS.
-TEST(CollectDetailedWasmStack_ExplicitThrowFromJs) {
-  WasmRunner<void> r(kExecuteCompiled);
+WASM_EXEC_TEST(CollectDetailedWasmStack_ExplicitThrowFromJs) {
+  WasmRunner<void> r(execution_mode);
   TestSignatures sigs;
 
   Handle<FixedArray> js_imports_table =
@@ -150,13 +150,13 @@
 }
 
 // Trigger a trap in wasm, stack should be JS -> wasm -> wasm.
-TEST(CollectDetailedWasmStack_WasmError) {
+WASM_EXEC_TEST(CollectDetailedWasmStack_WasmError) {
   for (int pos_shift = 0; pos_shift < 3; ++pos_shift) {
     // Test a position with 1, 2 or 3 bytes needed to represent it.
     int unreachable_pos = 1 << (8 * pos_shift);
     TestSignatures sigs;
     // Create a WasmRunner with stack checks and traps enabled.
-    WasmRunner<int> r(kExecuteCompiled, "main",
+    WasmRunner<int> r(execution_mode, "main",
                       compiler::kRuntimeExceptionSupport);
 
     std::vector<byte> code(unreachable_pos + 1, kExprNop);
diff --git a/src/v8/test/cctest/wasm/wasm-run-utils.cc b/src/v8/test/cctest/wasm/wasm-run-utils.cc
index a9530ab..4fa1fb1 100644
--- a/src/v8/test/cctest/wasm/wasm-run-utils.cc
+++ b/src/v8/test/cctest/wasm/wasm-run-utils.cc
@@ -15,19 +15,21 @@
 
 TestingModuleBuilder::TestingModuleBuilder(
     Zone* zone, WasmExecutionMode mode,
-    compiler::RuntimeExceptionSupport exception_support)
+    compiler::RuntimeExceptionSupport exception_support, LowerSimd lower_simd)
     : test_module_ptr_(&test_module_),
       isolate_(CcTest::InitIsolateOnce()),
       global_offset(0),
       mem_start_(nullptr),
       mem_size_(0),
       interpreter_(nullptr),
-      runtime_exception_support_(exception_support) {
+      execution_mode_(mode),
+      runtime_exception_support_(exception_support),
+      lower_simd_(lower_simd) {
   WasmJs::Install(isolate_, true);
   test_module_.globals_size = kMaxGlobalsSize;
   memset(globals_data_, 0, sizeof(globals_data_));
   instance_object_ = InitInstanceObject();
-  if (mode == kExecuteInterpreted) {
+  if (mode == kExecuteInterpreter) {
     interpreter_ = WasmDebugInfo::SetupForTesting(instance_object_);
   }
 }
@@ -36,24 +38,20 @@
   CHECK(!test_module_.has_memory);
   CHECK_NULL(mem_start_);
   CHECK_EQ(0, mem_size_);
-  DCHECK(!instance_object_->has_memory_buffer());
   DCHECK(!instance_object_->has_memory_object());
   test_module_.has_memory = true;
-  bool enable_guard_regions = EnableGuardRegions() && test_module_.is_wasm();
+  const bool enable_guard_regions =
+      trap_handler::IsTrapHandlerEnabled() && test_module_.is_wasm();
   uint32_t alloc_size =
-      enable_guard_regions ? RoundUp(size, base::OS::CommitPageSize()) : size;
+      enable_guard_regions ? RoundUp(size, CommitPageSize()) : size;
   Handle<JSArrayBuffer> new_buffer =
       wasm::NewArrayBuffer(isolate_, alloc_size, enable_guard_regions);
   CHECK(!new_buffer.is_null());
-  instance_object_->set_memory_buffer(*new_buffer);
   mem_start_ = reinterpret_cast<byte*>(new_buffer->backing_store());
   mem_size_ = size;
   CHECK(size == 0 || mem_start_);
   memset(mem_start_, 0, size);
 
-  if (interpreter_) {
-    interpreter_->UpdateMemory(mem_start_, mem_size_);
-  }
   // Create the WasmMemoryObject.
   Handle<WasmMemoryObject> memory_object = WasmMemoryObject::New(
       isolate_, new_buffer,
@@ -63,19 +61,20 @@
   // TODO(wasm): Delete the following two lines when test-run-wasm will use a
   // multiple of kPageSize as memory size. At the moment, the effect of these
   // two lines is used to shrink the memory for testing purposes.
-  instance_object_->wasm_context()->mem_start = mem_start_;
-  instance_object_->wasm_context()->mem_size = mem_size_;
+  instance_object_->wasm_context()->get()->SetRawMemory(mem_start_, mem_size_);
   return mem_start_;
 }
 
-uint32_t TestingModuleBuilder::AddFunction(FunctionSig* sig, Handle<Code> code,
-                                           const char* name) {
+uint32_t TestingModuleBuilder::AddFunction(FunctionSig* sig, const char* name) {
   if (test_module_.functions.size() == 0) {
     // TODO(titzer): Reserving space here to avoid the underlying WasmFunction
     // structs from moving.
     test_module_.functions.reserve(kMaxFunctions);
   }
   uint32_t index = static_cast<uint32_t>(test_module_.functions.size());
+  if (FLAG_wasm_jit_to_native) {
+    native_module_->ResizeCodeTableForTest(index);
+  }
   test_module_.functions.push_back(
       {sig, index, 0, {0, 0}, {0, 0}, false, false});
   if (name) {
@@ -83,7 +82,7 @@
     test_module_.functions.back().name = {
         AddBytes(name_vec), static_cast<uint32_t>(name_vec.length())};
   }
-  function_code_.push_back(code);
+  function_code_.push_back(Handle<Code>::null());
   if (interpreter_) {
     interpreter_->AddFunctionForTesting(&test_module_.functions.back());
   }
@@ -95,23 +94,35 @@
     FunctionSig* sig, const char* source, Handle<FixedArray> js_imports_table) {
   Handle<JSFunction> jsfunc = Handle<JSFunction>::cast(v8::Utils::OpenHandle(
       *v8::Local<v8::Function>::Cast(CompileRun(source))));
-  uint32_t index = AddFunction(sig, Handle<Code>::null(), nullptr);
+  uint32_t index = AddFunction(sig, nullptr);
   js_imports_table->set(0, *isolate_->native_context());
+  // TODO(6792): No longer needed once WebAssembly code is off heap.
+  CodeSpaceMemoryModificationScope modification_scope(isolate_->heap());
   Handle<Code> code = compiler::CompileWasmToJSWrapper(
-      isolate_, jsfunc, sig, index, test_module_.origin(), js_imports_table);
-  function_code_[index] = code;
+      isolate_, jsfunc, sig, index, test_module_.origin(),
+      trap_handler::IsTrapHandlerEnabled(), js_imports_table);
+  if (FLAG_wasm_jit_to_native) {
+    native_module_->ResizeCodeTableForTest(index);
+    native_module_->AddCodeCopy(code, wasm::WasmCode::kWasmToJsWrapper, index);
+  } else {
+    function_code_[index] = code;
+  }
   return index;
 }
 
 Handle<JSFunction> TestingModuleBuilder::WrapCode(uint32_t index) {
   // Wrap the code so it can be called as a JS function.
-  Handle<Code> code = function_code_[index];
+  Link();
+  WasmCodeWrapper code = FLAG_wasm_jit_to_native
+                             ? WasmCodeWrapper(native_module_->GetCode(index))
+                             : WasmCodeWrapper(function_code_[index]);
   byte* context_address =
       test_module_.has_memory
-          ? reinterpret_cast<byte*>(instance_object_->wasm_context())
+          ? reinterpret_cast<byte*>(instance_object_->wasm_context()->get())
           : nullptr;
   Handle<Code> ret_code = compiler::CompileJSToWasmWrapper(
-      isolate_, &test_module_, code, index, context_address);
+      isolate_, &test_module_, code, index, context_address,
+      trap_handler::IsTrapHandlerEnabled());
   Handle<JSFunction> ret = WasmExportedFunction::New(
       isolate_, instance_object(), MaybeHandle<String>(),
       static_cast<int>(index),
@@ -121,19 +132,20 @@
   // Add weak reference to exported functions.
   Handle<WasmCompiledModule> compiled_module(
       instance_object()->compiled_module(), isolate_);
-  Handle<FixedArray> old_arr = compiled_module->weak_exported_functions();
+  Handle<FixedArray> old_arr(compiled_module->weak_exported_functions(),
+                             isolate_);
   Handle<FixedArray> new_arr =
       isolate_->factory()->NewFixedArray(old_arr->length() + 1);
   old_arr->CopyTo(0, *new_arr, 0, old_arr->length());
   Handle<WeakCell> weak_fn = isolate_->factory()->NewWeakCell(ret);
   new_arr->set(old_arr->length(), *weak_fn);
-  compiled_module->set_weak_exported_functions(new_arr);
+  compiled_module->set_weak_exported_functions(*new_arr);
 
   return ret;
 }
 
-void TestingModuleBuilder::AddIndirectFunctionTable(uint16_t* function_indexes,
-                                                    uint32_t table_size) {
+void TestingModuleBuilder::AddIndirectFunctionTable(
+    const uint16_t* function_indexes, uint32_t table_size) {
   test_module_.function_tables.emplace_back();
   WasmIndirectFunctionTable& table = test_module_.function_tables.back();
   table.initial_size = table_size;
@@ -141,17 +153,12 @@
   table.has_maximum_size = true;
   for (uint32_t i = 0; i < table_size; ++i) {
     table.values.push_back(function_indexes[i]);
-    table.map.FindOrInsert(test_module_.functions[function_indexes[i]].sig);
   }
 
+  FixedArray* func_table = *isolate_->factory()->NewFixedArray(
+      table_size * compiler::kFunctionTableEntrySize);
   function_tables_.push_back(
-      isolate_->global_handles()
-          ->Create(*isolate_->factory()->NewFixedArray(table_size))
-          .address());
-  signature_tables_.push_back(
-      isolate_->global_handles()
-          ->Create(*isolate_->factory()->NewFixedArray(table_size))
-          .address());
+      isolate_->global_handles()->Create(func_table).address());
 }
 
 void TestingModuleBuilder::PopulateIndirectFunctionTable() {
@@ -161,20 +168,32 @@
     WasmIndirectFunctionTable& table = test_module_.function_tables[i];
     Handle<FixedArray> function_table(
         reinterpret_cast<FixedArray**>(function_tables_[i]));
-    Handle<FixedArray> signature_table(
-        reinterpret_cast<FixedArray**>(signature_tables_[i]));
     int table_size = static_cast<int>(table.values.size());
     for (int j = 0; j < table_size; j++) {
       WasmFunction& function = test_module_.functions[table.values[j]];
-      signature_table->set(j, Smi::FromInt(table.map.Find(function.sig)));
-      function_table->set(j, *function_code_[function.func_index]);
+      function_table->set(
+          compiler::FunctionTableSigOffset(j),
+          Smi::FromInt(test_module_.signature_map.Find(function.sig)));
+      if (FLAG_wasm_jit_to_native) {
+        Handle<Foreign> foreign_holder = isolate_->factory()->NewForeign(
+            native_module_->GetCode(function.func_index)
+                ->instructions()
+                .start(),
+            TENURED);
+        function_table->set(compiler::FunctionTableCodeOffset(j),
+                            *foreign_holder);
+      } else {
+        function_table->set(compiler::FunctionTableCodeOffset(j),
+                            *function_code_[function.func_index]);
+      }
     }
   }
 }
 
 uint32_t TestingModuleBuilder::AddBytes(Vector<const byte> bytes) {
-  Handle<SeqOneByteString> old_bytes(
-      instance_object_->compiled_module()->module_bytes(), isolate_);
+  Handle<WasmSharedModuleData> shared(
+      instance_object_->compiled_module()->shared(), isolate_);
+  Handle<SeqOneByteString> old_bytes(shared->module_bytes(), isolate_);
   uint32_t old_size = static_cast<uint32_t>(old_bytes->length());
   // Avoid placing strings at offset 0, this might be interpreted as "not
   // set", e.g. for function names.
@@ -184,26 +203,13 @@
   memcpy(new_bytes.start() + bytes_offset, bytes.start(), bytes.length());
   Handle<SeqOneByteString> new_bytes_str = Handle<SeqOneByteString>::cast(
       isolate_->factory()->NewStringFromOneByte(new_bytes).ToHandleChecked());
-  instance_object_->compiled_module()->shared()->set_module_bytes(
-      *new_bytes_str);
+  shared->set_module_bytes(*new_bytes_str);
   return bytes_offset;
 }
 
 compiler::ModuleEnv TestingModuleBuilder::CreateModuleEnv() {
-  std::vector<SignatureMap*> signature_maps;
-  for (size_t i = 0; i < test_module_.function_tables.size(); i++) {
-    auto& function_table = test_module_.function_tables[i];
-    signature_maps.push_back(&function_table.map);
-  }
-  return {
-      &test_module_,
-      function_tables_,
-      signature_tables_,
-      signature_maps,
-      function_code_,
-      Handle<Code>::null(),
-      reinterpret_cast<uintptr_t>(globals_data_),
-  };
+  return {&test_module_, function_tables_, function_code_, Handle<Code>::null(),
+          trap_handler::IsTrapHandlerEnabled()};
 }
 
 const WasmGlobal* TestingModuleBuilder::AddGlobal(ValueType type) {
@@ -233,19 +239,47 @@
   Handle<FixedArray> code_table = isolate_->factory()->NewFixedArray(0);
   Handle<FixedArray> export_wrappers = isolate_->factory()->NewFixedArray(0);
   Handle<WasmCompiledModule> compiled_module = WasmCompiledModule::New(
-      isolate_, shared_module_data, code_table, export_wrappers,
-      function_tables_, signature_tables_);
+      isolate_, test_module_ptr_, code_table, export_wrappers, function_tables_,
+      trap_handler::IsTrapHandlerEnabled());
+  compiled_module->OnWasmModuleDecodingComplete(shared_module_data);
   // This method is called when we initialize TestEnvironment. We don't
   // have a memory yet, so we won't create it here. We'll update the
   // interpreter when we get a memory. We do have globals, though.
-  WasmCompiledModule::recreate_globals_start(
-      compiled_module, isolate_->factory(),
-      reinterpret_cast<size_t>(globals_data_));
+  native_module_ = compiled_module->GetNativeModule();
+
   Handle<FixedArray> weak_exported = isolate_->factory()->NewFixedArray(0);
-  compiled_module->set_weak_exported_functions(weak_exported);
+  compiled_module->set_weak_exported_functions(*weak_exported);
   DCHECK(WasmCompiledModule::IsWasmCompiledModule(*compiled_module));
   script->set_wasm_compiled_module(*compiled_module);
-  return WasmInstanceObject::New(isolate_, compiled_module);
+  auto instance = WasmInstanceObject::New(isolate_, compiled_module);
+  instance->wasm_context()->get()->globals_start = globals_data_;
+  Handle<WeakCell> weak_instance = isolate()->factory()->NewWeakCell(instance);
+  compiled_module->set_weak_owning_instance(*weak_instance);
+  return instance;
+}
+
+void TestBuildingGraphWithBuilder(compiler::WasmGraphBuilder* builder,
+                                  Zone* zone, FunctionSig* sig,
+                                  const byte* start, const byte* end) {
+  DecodeResult result =
+      BuildTFGraph(zone->allocator(), builder, sig, start, end);
+  if (result.failed()) {
+#ifdef DEBUG
+    if (!FLAG_trace_wasm_decoder) {
+      // Retry the compilation with the tracing flag on, to help in debugging.
+      FLAG_trace_wasm_decoder = true;
+      result = BuildTFGraph(zone->allocator(), builder, sig, start, end);
+    }
+#endif
+
+    uint32_t pc = result.error_offset();
+    FATAL("Verification failed; pc = +%x, msg = %s", pc,
+          result.error_msg().c_str());
+  }
+  builder->LowerInt64();
+  if (!CpuFeatures::SupportsWasmSimd128()) {
+    builder->SimdScalarLoweringForTesting();
+  }
 }
 
 void TestBuildingGraph(
@@ -253,28 +287,16 @@
     FunctionSig* sig, compiler::SourcePositionTable* source_position_table,
     const byte* start, const byte* end,
     compiler::RuntimeExceptionSupport runtime_exception_support) {
-  compiler::WasmGraphBuilder builder(
-      module, zone, jsgraph, CEntryStub(jsgraph->isolate(), 1).GetCode(), sig,
-      source_position_table, runtime_exception_support);
-
-  DecodeResult result =
-      BuildTFGraph(zone->allocator(), &builder, sig, start, end);
-  if (result.failed()) {
-    if (!FLAG_trace_wasm_decoder) {
-      // Retry the compilation with the tracing flag on, to help in debugging.
-      FLAG_trace_wasm_decoder = true;
-      result = BuildTFGraph(zone->allocator(), &builder, sig, start, end);
-    }
-
-    uint32_t pc = result.error_offset();
-    std::ostringstream str;
-    str << "Verification failed; pc = +" << pc
-        << ", msg = " << result.error_msg().c_str();
-    FATAL(str.str().c_str());
-  }
-  builder.LowerInt64();
-  if (!CpuFeatures::SupportsWasmSimd128()) {
-    builder.SimdScalarLoweringForTesting();
+  if (module) {
+    compiler::WasmGraphBuilder builder(
+        module, zone, jsgraph, CEntryStub(jsgraph->isolate(), 1).GetCode(), sig,
+        source_position_table, runtime_exception_support);
+    TestBuildingGraphWithBuilder(&builder, zone, sig, start, end);
+  } else {
+    compiler::WasmGraphBuilder builder(
+        nullptr, zone, jsgraph, CEntryStub(jsgraph->isolate(), 1).GetCode(),
+        sig, source_position_table, runtime_exception_support);
+    TestBuildingGraphWithBuilder(&builder, zone, sig, start, end);
   }
 }
 
@@ -369,10 +391,10 @@
       r.LowerGraph();
     }
 
-    CompilationInfo info(ArrayVector("testing"), isolate, graph()->zone(),
-                         Code::STUB);
-    code_ = compiler::Pipeline::GenerateCodeForTesting(&info, descriptor,
-                                                       graph(), nullptr);
+    CompilationInfo info(ArrayVector("testing"), graph()->zone(),
+                         Code::C_WASM_ENTRY);
+    code_ = compiler::Pipeline::GenerateCodeForTesting(
+        &info, isolate, descriptor, graph(), nullptr);
     CHECK(!code_.is_null());
 #ifdef ENABLE_DISASSEMBLER
     if (FLAG_print_opt_code) {
@@ -411,7 +433,11 @@
 
   Handle<WasmCompiledModule> compiled_module(
       builder_->instance_object()->compiled_module(), isolate());
-  Handle<SeqOneByteString> wire_bytes(compiled_module->module_bytes(),
+  NativeModule* native_module = compiled_module->GetNativeModule();
+  if (FLAG_wasm_jit_to_native) {
+    native_module->ResizeCodeTableForTest(function_->func_index);
+  }
+  Handle<SeqOneByteString> wire_bytes(compiled_module->shared()->module_bytes(),
                                       isolate());
 
   compiler::ModuleEnv module_env = builder_->CreateModuleEnv();
@@ -426,43 +452,57 @@
 
   FunctionBody func_body{function_->sig, function_->code.offset(),
                          func_wire_bytes.start(), func_wire_bytes.end()};
+  compiler::WasmCompilationUnit::CompilationMode comp_mode =
+      builder_->execution_mode() == WasmExecutionMode::kExecuteLiftoff
+          ? compiler::WasmCompilationUnit::CompilationMode::kLiftoff
+          : compiler::WasmCompilationUnit::CompilationMode::kTurbofan;
   compiler::WasmCompilationUnit unit(
-      isolate(), &module_env, func_body, func_name, function_->func_index,
-      CEntryStub(isolate(), 1).GetCode(), isolate()->counters(),
-      builder_->runtime_exception_support());
+      isolate(), &module_env, native_module, func_body, func_name,
+      function_->func_index, CEntryStub(isolate(), 1).GetCode(), comp_mode,
+      isolate()->counters(), builder_->runtime_exception_support(),
+      builder_->lower_simd());
   unit.ExecuteCompilation();
-  Handle<Code> code = unit.FinishCompilation(&thrower).ToHandleChecked();
+  WasmCodeWrapper code_wrapper = unit.FinishCompilation(&thrower);
   CHECK(!thrower.error());
+  if (!FLAG_wasm_jit_to_native) {
+    Handle<Code> code = code_wrapper.GetCode();
+    // TODO(6792): No longer needed once WebAssembly code is off heap.
+    CodeSpaceMemoryModificationScope modification_scope(isolate()->heap());
 
-  // Manually add the deoptimization info that would otherwise be added
-  // during instantiation. Deopt data holds <WeakCell<wasm_instance>,
-  // func_index>.
-  DCHECK_EQ(0, code->deoptimization_data()->length());
-  Handle<FixedArray> deopt_data =
-      isolate()->factory()->NewFixedArray(2, TENURED);
-  Handle<Object> weak_instance =
-      isolate()->factory()->NewWeakCell(builder_->instance_object());
-  deopt_data->set(0, *weak_instance);
-  deopt_data->set(1, Smi::FromInt(static_cast<int>(function_index())));
-  code->set_deoptimization_data(*deopt_data);
+    // Manually add the deoptimization info that would otherwise be added
+    // during instantiation. Deopt data holds <WeakCell<wasm_instance>,
+    // func_index>.
+    DCHECK_EQ(0, code->deoptimization_data()->length());
+    Handle<FixedArray> deopt_data =
+        isolate()->factory()->NewFixedArray(2, TENURED);
+    Handle<Object> weak_instance =
+        isolate()->factory()->NewWeakCell(builder_->instance_object());
+    deopt_data->set(0, *weak_instance);
+    deopt_data->set(1, Smi::FromInt(static_cast<int>(function_index())));
+    code->set_deoptimization_data(*deopt_data);
 
-  // Build the TurboFan graph.
-  builder_->SetFunctionCode(function_index(), code);
+    // Build the TurboFan graph.
+    builder_->SetFunctionCode(function_index(), code);
 
-  // Add to code table.
-  Handle<FixedArray> code_table = compiled_module->code_table();
-  if (static_cast<int>(function_index()) >= code_table->length()) {
-    Handle<FixedArray> new_arr = isolate()->factory()->NewFixedArray(
-        static_cast<int>(function_index()) + 1);
-    code_table->CopyTo(0, *new_arr, 0, code_table->length());
-    code_table = new_arr;
-    compiled_module->ReplaceCodeTableForTesting(code_table);
-  }
-  DCHECK(code_table->get(static_cast<int>(function_index()))
-             ->IsUndefined(isolate()));
-  code_table->set(static_cast<int>(function_index()), *code);
-  if (trap_handler::UseTrapHandler()) {
-    UnpackAndRegisterProtectedInstructions(isolate(), code_table);
+    // Add to code table.
+    Handle<FixedArray> code_table(compiled_module->code_table(), isolate());
+    if (static_cast<int>(function_index()) >= code_table->length()) {
+      Handle<FixedArray> new_arr = isolate()->factory()->NewFixedArray(
+          static_cast<int>(function_index()) + 1);
+      code_table->CopyTo(0, *new_arr, 0, code_table->length());
+      code_table = new_arr;
+      compiled_module->ReplaceCodeTableForTesting(code_table);
+    }
+    DCHECK(code_table->get(static_cast<int>(function_index()))
+               ->IsUndefined(isolate()));
+    code_table->set(static_cast<int>(function_index()), *code);
+    if (trap_handler::IsTrapHandlerEnabled()) {
+      UnpackAndRegisterProtectedInstructionsGC(isolate(), code_table);
+    }
+  } else {
+    if (trap_handler::IsTrapHandlerEnabled()) {
+      UnpackAndRegisterProtectedInstructions(isolate(), native_module);
+    }
   }
 }
 
@@ -479,17 +519,20 @@
       source_position_table_(this->graph()),
       interpreter_(builder->interpreter()) {
   // Get a new function from the testing module.
-  int index = builder->AddFunction(sig, Handle<Code>::null(), name);
+  int index = builder->AddFunction(sig, name);
   function_ = builder_->GetFunctionAt(index);
 }
 
 WasmFunctionCompiler::~WasmFunctionCompiler() {
-  if (trap_handler::UseTrapHandler() &&
-      !builder_->GetFunctionCode(function_index()).is_null()) {
-    const int handler_index = builder_->GetFunctionCode(function_index())
-                                  ->trap_handler_index()
-                                  ->value();
-    trap_handler::ReleaseHandlerData(handler_index);
+  if (!FLAG_wasm_jit_to_native) {
+    if (trap_handler::IsTrapHandlerEnabled() &&
+        !builder_->GetFunctionCode(function_index()).is_null()) {
+      const int handler_index = builder_->GetFunctionCode(function_index())
+                                    .GetCode()
+                                    ->trap_handler_index()
+                                    ->value();
+      trap_handler::ReleaseHandlerData(handler_index);
+    }
   }
 }
 
diff --git a/src/v8/test/cctest/wasm/wasm-run-utils.h b/src/v8/test/cctest/wasm/wasm-run-utils.h
index 8e4786b..c0ce215 100644
--- a/src/v8/test/cctest/wasm/wasm-run-utils.h
+++ b/src/v8/test/cctest/wasm/wasm-run-utils.h
@@ -25,6 +25,7 @@
 #include "src/trap-handler/trap-handler.h"
 #include "src/wasm/function-body-decoder.h"
 #include "src/wasm/local-decl-encoder.h"
+#include "src/wasm/wasm-code-manager.h"
 #include "src/wasm/wasm-external-refs.h"
 #include "src/wasm/wasm-interpreter.h"
 #include "src/wasm/wasm-js.h"
@@ -47,20 +48,26 @@
 constexpr uint32_t kMaxFunctions = 10;
 constexpr uint32_t kMaxGlobalsSize = 128;
 
-enum WasmExecutionMode { kExecuteInterpreted, kExecuteCompiled };
+enum WasmExecutionMode {
+  kExecuteInterpreter,
+  kExecuteTurbofan,
+  kExecuteLiftoff
+};
+
+enum LowerSimd : bool { kLowerSimd = true, kNoLowerSimd = false };
 
 using compiler::CallDescriptor;
 using compiler::MachineTypeForC;
 using compiler::Node;
 
 // TODO(titzer): check traps more robustly in tests.
-// Currently, in tests, we just return 0xdeadbeef from the function in which
+// Currently, in tests, we just return 0xDEADBEEF from the function in which
 // the trap occurs if the runtime context is not available to throw a JavaScript
 // exception.
 #define CHECK_TRAP32(x) \
-  CHECK_EQ(0xdeadbeef, (bit_cast<uint32_t>(x)) & 0xFFFFFFFF)
+  CHECK_EQ(0xDEADBEEF, (bit_cast<uint32_t>(x)) & 0xFFFFFFFF)
 #define CHECK_TRAP64(x) \
-  CHECK_EQ(0xdeadbeefdeadbeef, (bit_cast<uint64_t>(x)) & 0xFFFFFFFFFFFFFFFF)
+  CHECK_EQ(0xDEADBEEFDEADBEEF, (bit_cast<uint64_t>(x)) & 0xFFFFFFFFFFFFFFFF)
 #define CHECK_TRAP(x) CHECK_TRAP32(x)
 
 #define WASM_WRAPPER_RETURN_VALUE 8754
@@ -71,20 +78,26 @@
     r.Build(code, code + arraysize(code)); \
   } while (false)
 
-// A buildable ModuleEnv. Globals are pre-set, however, memory and code may be
+// A  Wasm module builder. Globals are pre-set, however, memory and code may be
 // progressively added by a test. In turn, we piecemeal update the runtime
 // objects, i.e. {WasmInstanceObject}, {WasmCompiledModule} and, if necessary,
 // the interpreter.
 class TestingModuleBuilder {
  public:
   TestingModuleBuilder(Zone*, WasmExecutionMode,
-                       compiler::RuntimeExceptionSupport);
+                       compiler::RuntimeExceptionSupport, LowerSimd);
 
   void ChangeOriginToAsmjs() { test_module_.set_origin(kAsmJsOrigin); }
 
   byte* AddMemory(uint32_t size);
 
-  size_t CodeTableLength() const { return function_code_.size(); }
+  size_t CodeTableLength() const {
+    if (FLAG_wasm_jit_to_native) {
+      return native_module_->FunctionCount();
+    } else {
+      return function_code_.size();
+    }
+  }
 
   template <typename T>
   T* AddMemoryElems(uint32_t count) {
@@ -100,7 +113,11 @@
   }
 
   byte AddSignature(FunctionSig* sig) {
+    DCHECK_EQ(test_module_.signatures.size(),
+              test_module_.signature_ids.size());
     test_module_.signatures.push_back(sig);
+    auto canonical_sig_num = test_module_.signature_map.FindOrInsert(sig);
+    test_module_.signature_ids.push_back(canonical_sig_num);
     size_t size = test_module_.signatures.size();
     CHECK_GT(127, size);
     return static_cast<byte>(size - 1);
@@ -163,7 +180,7 @@
 
   void SetHasSharedMemory() { test_module_.has_shared_memory = true; }
 
-  uint32_t AddFunction(FunctionSig* sig, Handle<Code> code, const char* name);
+  uint32_t AddFunction(FunctionSig* sig, const char* name);
 
   uint32_t AddJsFunction(FunctionSig* sig, const char* source,
                          Handle<FixedArray> js_imports_table);
@@ -174,7 +191,7 @@
     function_code_[index] = code;
   }
 
-  void AddIndirectFunctionTable(uint16_t* function_indexes,
+  void AddIndirectFunctionTable(const uint16_t* function_indexes,
                                 uint32_t table_size);
 
   void PopulateIndirectFunctionTable();
@@ -187,16 +204,33 @@
 
   WasmInterpreter* interpreter() { return interpreter_; }
   bool interpret() { return interpreter_ != nullptr; }
+  LowerSimd lower_simd() { return lower_simd_; }
   Isolate* isolate() { return isolate_; }
   Handle<WasmInstanceObject> instance_object() { return instance_object_; }
-  Handle<Code> GetFunctionCode(int index) { return function_code_[index]; }
+  WasmCodeWrapper GetFunctionCode(uint32_t index) {
+    if (FLAG_wasm_jit_to_native) {
+      return WasmCodeWrapper(native_module_->GetCode(index));
+    } else {
+      return WasmCodeWrapper(function_code_[index]);
+    }
+  }
   void SetFunctionCode(int index, Handle<Code> code) {
     function_code_[index] = code;
   }
   Address globals_start() { return reinterpret_cast<Address>(globals_data_); }
+  void Link() {
+    if (!FLAG_wasm_jit_to_native) return;
+    if (!linked_) {
+      native_module_->LinkAll();
+      linked_ = true;
+      native_module_->SetExecutable(true);
+    }
+  }
 
   compiler::ModuleEnv CreateModuleEnv();
 
+  WasmExecutionMode execution_mode() const { return execution_mode_; }
+
   compiler::RuntimeExceptionSupport runtime_exception_support() const {
     return runtime_exception_support_;
   }
@@ -210,11 +244,14 @@
   uint32_t mem_size_;
   std::vector<Handle<Code>> function_code_;
   std::vector<GlobalHandleAddress> function_tables_;
-  std::vector<GlobalHandleAddress> signature_tables_;
-  V8_ALIGNED(8) byte globals_data_[kMaxGlobalsSize];
+  V8_ALIGNED(16) byte globals_data_[kMaxGlobalsSize];
   WasmInterpreter* interpreter_;
+  WasmExecutionMode execution_mode_;
   Handle<WasmInstanceObject> instance_object_;
+  NativeModule* native_module_;
+  bool linked_ = false;
   compiler::RuntimeExceptionSupport runtime_exception_support_;
+  LowerSimd lower_simd_;
 
   const WasmGlobal* AddGlobal(ValueType type);
 
@@ -243,9 +280,21 @@
     Init(descriptor, MachineTypeForC<ReturnType>(), param_vec);
   }
 
-  void SetInnerCode(Handle<Code> code_handle) {
-    compiler::NodeProperties::ChangeOp(inner_code_node_,
-                                       common()->HeapConstant(code_handle));
+  void SetInnerCode(WasmCodeWrapper code) {
+    if (FLAG_wasm_jit_to_native) {
+      intptr_t address = reinterpret_cast<intptr_t>(
+          code.GetWasmCode()->instructions().start());
+      compiler::NodeProperties::ChangeOp(
+          inner_code_node_,
+          kPointerSize == 8
+              ? common()->RelocatableInt64Constant(address,
+                                                   RelocInfo::WASM_CALL)
+              : common()->RelocatableInt32Constant(static_cast<int>(address),
+                                                   RelocInfo::WASM_CALL));
+    } else {
+      compiler::NodeProperties::ChangeOp(
+          inner_code_node_, common()->HeapConstant(code.GetCode()));
+    }
   }
 
   const compiler::Operator* IntPtrConstant(intptr_t value) {
@@ -254,9 +303,13 @@
                : common()->Int64Constant(static_cast<int64_t>(value));
   }
 
-  void SetContextAddress(Address value) {
-    compiler::NodeProperties::ChangeOp(
-        context_address_, IntPtrConstant(reinterpret_cast<uintptr_t>(value)));
+  void SetContextAddress(uintptr_t value) {
+    auto rmode = RelocInfo::WASM_CONTEXT_REFERENCE;
+    auto op = kPointerSize == 8 ? common()->RelocatableInt64Constant(
+                                      static_cast<int64_t>(value), rmode)
+                                : common()->RelocatableInt32Constant(
+                                      static_cast<int32_t>(value), rmode);
+    compiler::NodeProperties::ChangeOp(context_address_, op);
   }
 
   Handle<Code> GetWrapperCode();
@@ -319,9 +372,10 @@
 class WasmRunnerBase : public HandleAndZoneScope {
  public:
   WasmRunnerBase(WasmExecutionMode execution_mode, int num_params,
-                 compiler::RuntimeExceptionSupport runtime_exception_support)
+                 compiler::RuntimeExceptionSupport runtime_exception_support,
+                 LowerSimd lower_simd)
       : zone_(&allocator_, ZONE_NAME),
-        builder_(&zone_, execution_mode, runtime_exception_support),
+        builder_(&zone_, execution_mode, runtime_exception_support, lower_simd),
         wrapper_(&zone_, num_params) {}
 
   // Builds a graph from the given Wasm code and generates the machine
@@ -400,20 +454,25 @@
   WasmRunner(WasmExecutionMode execution_mode,
              const char* main_fn_name = "main",
              compiler::RuntimeExceptionSupport runtime_exception_support =
-                 compiler::kNoRuntimeExceptionSupport)
+                 compiler::kNoRuntimeExceptionSupport,
+             LowerSimd lower_simd = kNoLowerSimd)
       : WasmRunnerBase(execution_mode, sizeof...(ParamTypes),
-                       runtime_exception_support) {
+                       runtime_exception_support, lower_simd) {
     NewFunction<ReturnType, ParamTypes...>(main_fn_name);
     if (!interpret()) {
       wrapper_.Init<ReturnType, ParamTypes...>(functions_[0]->descriptor());
     }
   }
 
+  WasmRunner(WasmExecutionMode execution_mode, LowerSimd lower_simd)
+      : WasmRunner(execution_mode, "main", compiler::kNoRuntimeExceptionSupport,
+                   lower_simd) {}
+
   ReturnType Call(ParamTypes... p) {
     DCHECK(compiled_);
     if (interpret()) return CallInterpreter(p...);
 
-    ReturnType return_value = static_cast<ReturnType>(0xdeadbeefdeadbeef);
+    ReturnType return_value = static_cast<ReturnType>(0xDEADBEEFDEADBEEF);
     WasmRunnerBase::trap_happened = false;
     auto trap_callback = []() -> void {
       WasmRunnerBase::trap_happened = true;
@@ -422,18 +481,18 @@
     set_trap_callback_for_testing(trap_callback);
 
     wrapper_.SetInnerCode(builder_.GetFunctionCode(0));
-    if (builder().instance_object()->has_memory_object()) {
-      wrapper_.SetContextAddress(reinterpret_cast<Address>(
-          builder().instance_object()->wasm_context()));
-    }
+    WasmContext* wasm_context =
+        builder().instance_object()->wasm_context()->get();
+    wrapper_.SetContextAddress(reinterpret_cast<uintptr_t>(wasm_context));
+    builder().Link();
+    Handle<Code> wrapper_code = wrapper_.GetWrapperCode();
     compiler::CodeRunner<int32_t> runner(CcTest::InitIsolateOnce(),
-                                         wrapper_.GetWrapperCode(),
-                                         wrapper_.signature());
+                                         wrapper_code, wrapper_.signature());
     int32_t result = runner.Call(static_cast<void*>(&p)...,
                                  static_cast<void*>(&return_value));
     CHECK_EQ(WASM_WRAPPER_RETURN_VALUE, result);
     return WasmRunnerBase::trap_happened
-               ? static_cast<ReturnType>(0xdeadbeefdeadbeef)
+               ? static_cast<ReturnType>(0xDEADBEEFDEADBEEF)
                : return_value;
   }
 
@@ -450,35 +509,44 @@
       return val.to<ReturnType>();
     } else if (thread->state() == WasmInterpreter::TRAPPED) {
       // TODO(titzer): return the correct trap code
-      int64_t result = 0xdeadbeefdeadbeef;
+      int64_t result = 0xDEADBEEFDEADBEEF;
       return static_cast<ReturnType>(result);
     } else {
       // TODO(titzer): falling off end
       return ReturnType{0};
     }
   }
+
+  Handle<Code> GetWrapperCode() { return wrapper_.GetWrapperCode(); }
 };
 
 // A macro to define tests that run in different engine configurations.
 #define WASM_EXEC_TEST(name)                                               \
   void RunWasm_##name(WasmExecutionMode execution_mode);                   \
-  TEST(RunWasmCompiled_##name) { RunWasm_##name(kExecuteCompiled); }       \
-  TEST(RunWasmInterpreted_##name) { RunWasm_##name(kExecuteInterpreted); } \
+  TEST(RunWasmTurbofan_##name) { RunWasm_##name(kExecuteTurbofan); }       \
+  TEST(RunWasmLiftoff_##name) { RunWasm_##name(kExecuteLiftoff); }         \
+  TEST(RunWasmInterpreter_##name) { RunWasm_##name(kExecuteInterpreter); } \
+  void RunWasm_##name(WasmExecutionMode execution_mode)
+
+#define WASM_COMPILED_EXEC_TEST(name)                                \
+  void RunWasm_##name(WasmExecutionMode execution_mode);             \
+  TEST(RunWasmTurbofan_##name) { RunWasm_##name(kExecuteTurbofan); } \
+  TEST(RunWasmLiftoff_##name) { RunWasm_##name(kExecuteLiftoff); }   \
   void RunWasm_##name(WasmExecutionMode execution_mode)
 
 #define WASM_EXEC_TEST_WITH_TRAP(name)                   \
   void RunWasm_##name(WasmExecutionMode execution_mode); \
-  TEST(RunWasmCompiled_##name) {                         \
-    if (trap_handler::UseTrapHandler()) {                \
-      return;                                            \
-    }                                                    \
-    RunWasm_##name(kExecuteCompiled);                    \
+  TEST(RunWasmTurbofan_##name) {                         \
+    if (trap_handler::UseTrapHandler()) return;          \
+    RunWasm_##name(kExecuteTurbofan);                    \
   }                                                      \
-  TEST(RunWasmInterpreted_##name) {                      \
-    if (trap_handler::UseTrapHandler()) {                \
-      return;                                            \
-    }                                                    \
-    RunWasm_##name(kExecuteInterpreted);                 \
+  TEST(RunWasmLiftoff_##name) {                          \
+    if (trap_handler::UseTrapHandler()) return;          \
+    RunWasm_##name(kExecuteLiftoff);                     \
+  }                                                      \
+  TEST(RunWasmInterpreter_##name) {                      \
+    if (trap_handler::UseTrapHandler()) return;          \
+    RunWasm_##name(kExecuteInterpreter);                 \
   }                                                      \
   void RunWasm_##name(WasmExecutionMode execution_mode)
 
diff --git a/src/v8/test/common/wasm/test-signatures.h b/src/v8/test/common/wasm/test-signatures.h
index c0bc7a9..9a0a3ea 100644
--- a/src/v8/test/common/wasm/test-signatures.h
+++ b/src/v8/test/common/wasm/test-signatures.h
@@ -38,7 +38,9 @@
         sig_v_i(0, 1, kIntTypes4),
         sig_v_ii(0, 2, kIntTypes4),
         sig_v_iii(0, 3, kIntTypes4),
-        sig_s_i(1, 1, kSimd128IntTypes4) {
+        sig_s_i(1, 1, kSimd128IntTypes4),
+        sig_ii_v(2, 0, kIntTypes4),
+        sig_iii_v(3, 0, kIntTypes4) {
     // I used C++ and you won't believe what happened next....
     for (int i = 0; i < 4; i++) kIntTypes4[i] = kWasmI32;
     for (int i = 0; i < 4; i++) kLongTypes4[i] = kWasmI64;
@@ -80,6 +82,9 @@
   FunctionSig* v_iii() { return &sig_v_iii; }
   FunctionSig* s_i() { return &sig_s_i; }
 
+  FunctionSig* ii_v() { return &sig_ii_v; }
+  FunctionSig* iii_v() { return &sig_iii_v; }
+
   FunctionSig* many(Zone* zone, ValueType ret, ValueType param, int count) {
     FunctionSig::Builder builder(zone, ret == kWasmStmt ? 0 : 1, count);
     if (ret != kWasmStmt) builder.AddReturn(ret);
@@ -124,6 +129,9 @@
   FunctionSig sig_v_ii;
   FunctionSig sig_v_iii;
   FunctionSig sig_s_i;
+
+  FunctionSig sig_ii_v;
+  FunctionSig sig_iii_v;
 };
 }  // namespace wasm
 }  // namespace internal
diff --git a/src/v8/test/common/wasm/wasm-macro-gen.h b/src/v8/test/common/wasm/wasm-macro-gen.h
index 0586d07..83ddaa6 100644
--- a/src/v8/test/common/wasm/wasm-macro-gen.h
+++ b/src/v8/test/common/wasm/wasm-macro-gen.h
@@ -70,21 +70,17 @@
 #define ARITY_2 2
 
 #define WASM_BLOCK(...) kExprBlock, kLocalVoid, __VA_ARGS__, kExprEnd
+#define WASM_BLOCK_I(...) kExprBlock, kLocalI32, __VA_ARGS__, kExprEnd
+#define WASM_BLOCK_L(...) kExprBlock, kLocalI64, __VA_ARGS__, kExprEnd
+#define WASM_BLOCK_F(...) kExprBlock, kLocalF32, __VA_ARGS__, kExprEnd
+#define WASM_BLOCK_D(...) kExprBlock, kLocalF64, __VA_ARGS__, kExprEnd
 
 #define WASM_BLOCK_T(t, ...)                                       \
   kExprBlock, static_cast<byte>(WasmOpcodes::ValueTypeCodeFor(t)), \
       __VA_ARGS__, kExprEnd
 
-#define WASM_BLOCK_TT(t1, t2, ...)                                       \
-  kExprBlock, kMultivalBlock, 0,                                         \
-      static_cast<byte>(WasmOpcodes::ValueTypeCodeFor(t1)),              \
-      static_cast<byte>(WasmOpcodes::ValueTypeCodeFor(t2)), __VA_ARGS__, \
-      kExprEnd
-
-#define WASM_BLOCK_I(...) kExprBlock, kLocalI32, __VA_ARGS__, kExprEnd
-#define WASM_BLOCK_L(...) kExprBlock, kLocalI64, __VA_ARGS__, kExprEnd
-#define WASM_BLOCK_F(...) kExprBlock, kLocalF32, __VA_ARGS__, kExprEnd
-#define WASM_BLOCK_D(...) kExprBlock, kLocalF64, __VA_ARGS__, kExprEnd
+#define WASM_BLOCK_X(index, ...)                                  \
+  kExprBlock, static_cast<byte>(index), __VA_ARGS__, kExprEnd
 
 #define WASM_INFINITE_LOOP kExprLoop, kLocalVoid, kExprBr, DEPTH_0, kExprEnd
 
@@ -94,21 +90,25 @@
 #define WASM_LOOP_F(...) kExprLoop, kLocalF32, __VA_ARGS__, kExprEnd
 #define WASM_LOOP_D(...) kExprLoop, kLocalF64, __VA_ARGS__, kExprEnd
 
-#define WASM_IF(cond, tstmt) cond, kExprIf, kLocalVoid, tstmt, kExprEnd
+#define WASM_LOOP_T(t, ...)                                       \
+  kExprLoop, static_cast<byte>(WasmOpcodes::ValueTypeCodeFor(t)), \
+      __VA_ARGS__, kExprEnd
+
+#define WASM_LOOP_X(index, ...)                                   \
+  kExprLoop, static_cast<byte>(index), __VA_ARGS__, kExprEnd
+
+#define WASM_IF(cond, ...) cond, kExprIf, kLocalVoid, __VA_ARGS__, kExprEnd
+
+#define WASM_IF_T(t, cond, ...)                                       \
+  cond, kExprIf, static_cast<byte>(WasmOpcodes::ValueTypeCodeFor(t)), \
+      __VA_ARGS__, kExprEnd
+
+#define WASM_IF_X(index, cond, ...)                                   \
+  cond, kExprIf, static_cast<byte>(index), __VA_ARGS__, kExprEnd
 
 #define WASM_IF_ELSE(cond, tstmt, fstmt) \
   cond, kExprIf, kLocalVoid, tstmt, kExprElse, fstmt, kExprEnd
 
-#define WASM_IF_ELSE_T(t, cond, tstmt, fstmt)                                \
-  cond, kExprIf, static_cast<byte>(WasmOpcodes::ValueTypeCodeFor(t)), tstmt, \
-      kExprElse, fstmt, kExprEnd
-
-#define WASM_IF_ELSE_TT(t1, t2, cond, tstmt, fstmt)                           \
-  cond, kExprIf, kMultivalBlock, 0,                                           \
-      static_cast<byte>(WasmOpcodes::ValueTypeCodeFor(t1)),                   \
-      static_cast<byte>(WasmOpcodes::ValueTypeCodeFor(t2)), tstmt, kExprElse, \
-      fstmt, kExprEnd
-
 #define WASM_IF_ELSE_I(cond, tstmt, fstmt) \
   cond, kExprIf, kLocalI32, tstmt, kExprElse, fstmt, kExprEnd
 #define WASM_IF_ELSE_L(cond, tstmt, fstmt) \
@@ -118,6 +118,13 @@
 #define WASM_IF_ELSE_D(cond, tstmt, fstmt) \
   cond, kExprIf, kLocalF64, tstmt, kExprElse, fstmt, kExprEnd
 
+#define WASM_IF_ELSE_T(t, cond, tstmt, fstmt)                                \
+  cond, kExprIf, static_cast<byte>(WasmOpcodes::ValueTypeCodeFor(t)), tstmt, \
+      kExprElse, fstmt, kExprEnd
+
+#define WASM_IF_ELSE_X(index, cond, tstmt, fstmt)                            \
+  cond, kExprIf, static_cast<byte>(index), tstmt, kExprElse, fstmt, kExprEnd
+
 #define WASM_SELECT(tval, fval, cond) tval, fval, cond, kExprSelect
 
 #define WASM_RETURN0 kExprReturn
@@ -550,31 +557,40 @@
 #define WASM_I64_REINTERPRET_F64(x) x, kExprI64ReinterpretF64
 
 //------------------------------------------------------------------------------
+// Numeric operations
+//------------------------------------------------------------------------------
+#define WASM_NUMERIC_OP(op) kNumericPrefix, static_cast<byte>(op)
+#define WASM_I32_SCONVERT_SAT_F32(x) x, WASM_NUMERIC_OP(kExprI32SConvertSatF32)
+#define WASM_I32_UCONVERT_SAT_F32(x) x, WASM_NUMERIC_OP(kExprI32UConvertSatF32)
+#define WASM_I32_SCONVERT_SAT_F64(x) x, WASM_NUMERIC_OP(kExprI32SConvertSatF64)
+#define WASM_I32_UCONVERT_SAT_F64(x) x, WASM_NUMERIC_OP(kExprI32UConvertSatF64)
+
+//------------------------------------------------------------------------------
 // Memory Operations.
 //------------------------------------------------------------------------------
 #define WASM_GROW_MEMORY(x) x, kExprGrowMemory, 0
 #define WASM_MEMORY_SIZE kExprMemorySize, 0
 
-#define SIG_ENTRY_v_v kWasmFunctionTypeForm, 0, 0
+#define SIG_ENTRY_v_v kWasmFunctionTypeCode, 0, 0
 #define SIZEOF_SIG_ENTRY_v_v 3
 
-#define SIG_ENTRY_v_x(a) kWasmFunctionTypeForm, 1, a, 0
-#define SIG_ENTRY_v_xx(a, b) kWasmFunctionTypeForm, 2, a, b, 0
-#define SIG_ENTRY_v_xxx(a, b, c) kWasmFunctionTypeForm, 3, a, b, c, 0
+#define SIG_ENTRY_v_x(a) kWasmFunctionTypeCode, 1, a, 0
+#define SIG_ENTRY_v_xx(a, b) kWasmFunctionTypeCode, 2, a, b, 0
+#define SIG_ENTRY_v_xxx(a, b, c) kWasmFunctionTypeCode, 3, a, b, c, 0
 #define SIZEOF_SIG_ENTRY_v_x 4
 #define SIZEOF_SIG_ENTRY_v_xx 5
 #define SIZEOF_SIG_ENTRY_v_xxx 6
 
-#define SIG_ENTRY_x(r) kWasmFunctionTypeForm, 0, 1, r
-#define SIG_ENTRY_x_x(r, a) kWasmFunctionTypeForm, 1, a, 1, r
-#define SIG_ENTRY_x_xx(r, a, b) kWasmFunctionTypeForm, 2, a, b, 1, r
-#define SIG_ENTRY_x_xxx(r, a, b, c) kWasmFunctionTypeForm, 3, a, b, c, 1, r
+#define SIG_ENTRY_x(r) kWasmFunctionTypeCode, 0, 1, r
+#define SIG_ENTRY_x_x(r, a) kWasmFunctionTypeCode, 1, a, 1, r
+#define SIG_ENTRY_x_xx(r, a, b) kWasmFunctionTypeCode, 2, a, b, 1, r
+#define SIG_ENTRY_x_xxx(r, a, b, c) kWasmFunctionTypeCode, 3, a, b, c, 1, r
 #define SIZEOF_SIG_ENTRY_x 4
 #define SIZEOF_SIG_ENTRY_x_x 5
 #define SIZEOF_SIG_ENTRY_x_xx 6
 #define SIZEOF_SIG_ENTRY_x_xxx 7
 
-#define WASM_BRV(depth, val) val, kExprBr, static_cast<byte>(depth)
+#define WASM_BRV(depth, ...) __VA_ARGS__, kExprBr, static_cast<byte>(depth)
 #define WASM_BRV_IF(depth, val, cond) \
   val, cond, kExprBrIf, static_cast<byte>(depth)
 #define WASM_BRV_IFD(depth, val, cond) \
@@ -583,4 +599,21 @@
 #define WASM_BR_TABLEV(val, key, count, ...) \
   val, key, kExprBrTable, U32V_1(count), __VA_ARGS__
 
+//------------------------------------------------------------------------------
+// Atomic Operations.
+//------------------------------------------------------------------------------
+#define WASM_ATOMICS_OP(op) kAtomicPrefix, static_cast<byte>(op)
+#define WASM_ATOMICS_BINOP(op, x, y, representation) \
+  x, y, WASM_ATOMICS_OP(op),                         \
+      static_cast<byte>(ElementSizeLog2Of(representation)), ZERO_OFFSET
+#define WASM_ATOMICS_TERNARY_OP(op, x, y, z, representation) \
+  x, y, z, WASM_ATOMICS_OP(op),                              \
+      static_cast<byte>(ElementSizeLog2Of(representation)), ZERO_OFFSET
+#define WASM_ATOMICS_LOAD_OP(op, x, representation) \
+  x, WASM_ATOMICS_OP(op),                           \
+      static_cast<byte>(ElementSizeLog2Of(representation)), ZERO_OFFSET
+#define WASM_ATOMICS_STORE_OP(op, x, y, representation) \
+  x, y, WASM_ATOMICS_OP(op),                            \
+      static_cast<byte>(ElementSizeLog2Of(representation)), ZERO_OFFSET
+
 #endif  // V8_WASM_MACRO_GEN_H_
diff --git a/src/v8/test/common/wasm/wasm-module-runner.cc b/src/v8/test/common/wasm/wasm-module-runner.cc
index d2f5e68..d89d870 100644
--- a/src/v8/test/common/wasm/wasm-module-runner.cc
+++ b/src/v8/test/common/wasm/wasm-module-runner.cc
@@ -23,7 +23,7 @@
 namespace testing {
 
 uint32_t GetInitialMemSize(const WasmModule* module) {
-  return WasmModule::kPageSize * module->initial_pages;
+  return kWasmPageSize * module->initial_pages;
 }
 
 std::unique_ptr<WasmModule> DecodeWasmModuleForTesting(
@@ -89,15 +89,25 @@
   WasmInterpreter::HeapObjectsScope heap_objects_scope(interpreter, instance);
   WasmInterpreter::Thread* thread = interpreter->GetThread(0);
   thread->Reset();
+
+  // Start an activation so that we can deal with stack overflows. We do not
+  // finish the activation. An activation is just part of the state of the
+  // interpreter, and we do not reuse the interpreter anyways. In addition,
+  // finishing the activation is not correct in all cases, e.g. when the
+  // execution of the interpreter did not finish after kMaxNumSteps.
+  thread->StartActivation();
   thread->InitFrame(&instance->module()->functions[function_index],
                     arguments.get());
   WasmInterpreter::State interpreter_result = thread->Run(kMaxNumSteps);
 
+  isolate->clear_pending_exception();
+
   return interpreter_result != WasmInterpreter::PAUSED;
 }
 
-int32_t RunWasmModuleForTesting(Isolate* isolate, Handle<JSObject> instance,
-                                int argc, Handle<Object> argv[]) {
+int32_t RunWasmModuleForTesting(Isolate* isolate,
+                                Handle<WasmInstanceObject> instance, int argc,
+                                Handle<Object> argv[]) {
   ErrorThrower thrower(isolate, "RunWasmModule");
   return CallWasmFunctionForTesting(isolate, instance, &thrower, "main", argc,
                                     argv);
@@ -149,25 +159,34 @@
   WasmInterpreter::HeapObjectsScope heap_objects_scope(interpreter, instance);
   WasmInterpreter::Thread* thread = interpreter->GetThread(0);
   thread->Reset();
+
+  // Start an activation so that we can deal with stack overflows. We do not
+  // finish the activation. An activation is just part of the state of the
+  // interpreter, and we do not reuse the interpreter anyways. In addition,
+  // finishing the activation is not correct in all cases, e.g. when the
+  // execution of the interpreter did not finish after kMaxNumSteps.
+  thread->StartActivation();
   thread->InitFrame(&(instance->module()->functions[function_index]), args);
   WasmInterpreter::State interpreter_result = thread->Run(kMaxNumSteps);
 
+  bool stack_overflow = isolate->has_pending_exception();
+  isolate->clear_pending_exception();
+
   *possible_nondeterminism = thread->PossibleNondeterminism();
-  if (interpreter_result == WasmInterpreter::FINISHED) {
-    WasmValue val = thread->GetReturnValue();
-    return val.to<int32_t>();
-  } else if (thread->state() == WasmInterpreter::TRAPPED) {
-    return 0xdeadbeef;
-  } else {
-    thrower->RangeError(
-        "Interpreter did not finish execution within its step bound");
-    return -1;
-  }
+  if (stack_overflow) return 0xDEADBEEF;
+
+  if (thread->state() == WasmInterpreter::TRAPPED) return 0xDEADBEEF;
+
+  if (interpreter_result == WasmInterpreter::FINISHED)
+    return thread->GetReturnValue().to<int32_t>();
+
+  thrower->RangeError(
+      "Interpreter did not finish execution within its step bound");
+  return -1;
 }
 
-MaybeHandle<WasmExportedFunction> GetExportedFunction(Isolate* isolate,
-                                                      Handle<JSObject> instance,
-                                                      const char* name) {
+MaybeHandle<WasmExportedFunction> GetExportedFunction(
+    Isolate* isolate, Handle<WasmInstanceObject> instance, const char* name) {
   Handle<JSObject> exports_object;
   Handle<Name> exports = isolate->factory()->InternalizeUtf8String("exports");
   exports_object = Handle<JSObject>::cast(
@@ -183,7 +202,8 @@
   return Handle<WasmExportedFunction>::cast(desc.value());
 }
 
-int32_t CallWasmFunctionForTesting(Isolate* isolate, Handle<JSObject> instance,
+int32_t CallWasmFunctionForTesting(Isolate* isolate,
+                                   Handle<WasmInstanceObject> instance,
                                    ErrorThrower* thrower, const char* name,
                                    int argc, Handle<Object> argv[]) {
   MaybeHandle<WasmExportedFunction> maybe_export =
diff --git a/src/v8/test/common/wasm/wasm-module-runner.h b/src/v8/test/common/wasm/wasm-module-runner.h
index 4fa2ca6..cf85822 100644
--- a/src/v8/test/common/wasm/wasm-module-runner.h
+++ b/src/v8/test/common/wasm/wasm-module-runner.h
@@ -29,14 +29,14 @@
 
 // Returns a MaybeHandle to the JsToWasm wrapper of the wasm function exported
 // with the given name by the provided instance.
-MaybeHandle<WasmExportedFunction> GetExportedFunction(Isolate* isolate,
-                                                      Handle<JSObject> instance,
-                                                      const char* name);
+MaybeHandle<WasmExportedFunction> GetExportedFunction(
+    Isolate* isolate, Handle<WasmInstanceObject> instance, const char* name);
 
 // Call an exported wasm function by name. Returns -1 if the export does not
 // exist or throws an error. Errors are cleared from the isolate before
 // returning.
-int32_t CallWasmFunctionForTesting(Isolate* isolate, Handle<JSObject> instance,
+int32_t CallWasmFunctionForTesting(Isolate* isolate,
+                                   Handle<WasmInstanceObject> instance,
                                    ErrorThrower* thrower, const char* name,
                                    int argc, Handle<Object> argv[]);
 
@@ -63,8 +63,9 @@
                             WasmValue* args, bool* possible_nondeterminism);
 
 // Runs the module instance with arguments.
-int32_t RunWasmModuleForTesting(Isolate* isolate, Handle<JSObject> instance,
-                                int argc, Handle<Object> argv[]);
+int32_t RunWasmModuleForTesting(Isolate* isolate,
+                                Handle<WasmInstanceObject> instance, int argc,
+                                Handle<Object> argv[]);
 
 // Install function map, module symbol for testing
 void SetupIsolateForWasmModule(Isolate* isolate);
diff --git a/src/v8/test/d8_default.gyp b/src/v8/test/d8_default.gyp
new file mode 100644
index 0000000..399623d
--- /dev/null
+++ b/src/v8/test/d8_default.gyp
@@ -0,0 +1,31 @@
+# Copyright 2018 the V8 project authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+{
+  'conditions': [
+    ['test_isolation_mode != "noop"', {
+      'targets': [
+        {
+          'target_name': 'd8_default_run',
+          'type': 'none',
+          'dependencies': [
+            'debugger/debugger.gyp:debugger_run',
+            'intl/intl.gyp:intl_run',
+            'message/message.gyp:message_run',
+            'mjsunit/mjsunit.gyp:mjsunit_run',
+            'preparser/preparser.gyp:preparser_run',
+            'webkit/webkit.gyp:webkit_run',
+          ],
+          'includes': [
+            '../gypfiles/features.gypi',
+            '../gypfiles/isolate.gypi',
+          ],
+          'sources': [
+            'd8_default.isolate',
+          ],
+        },
+      ],
+    }],
+  ],
+}
diff --git a/src/v8/test/d8_default.isolate b/src/v8/test/d8_default.isolate
new file mode 100644
index 0000000..efeae64
--- /dev/null
+++ b/src/v8/test/d8_default.isolate
@@ -0,0 +1,18 @@
+# Copyright 2018 the V8 project authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+{
+  'variables': {
+    'command': [
+      '../tools/run-tests.py',
+    ],
+  },
+  'includes': [
+    'debugger/debugger.isolate',
+    'intl/intl.isolate',
+    'message/message.isolate',
+    'mjsunit/mjsunit.isolate',
+    'preparser/preparser.isolate',
+    'webkit/webkit.isolate',
+  ],
+}
diff --git a/src/v8/test/debugger/debug/debug-evaluate-arguments.js b/src/v8/test/debugger/debug/debug-evaluate-arguments.js
new file mode 100644
index 0000000..8cf18d7
--- /dev/null
+++ b/src/v8/test/debugger/debug/debug-evaluate-arguments.js
@@ -0,0 +1,60 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+Debug = debug.Debug;
+var listened = false;
+
+function listener(event, exec_state, event_data, data) {
+  if (event != Debug.DebugEvent.Break) return;
+  try {
+    var foo_arguments = exec_state.frame(1).evaluate("arguments").value();
+    var bar_arguments = exec_state.frame(0).evaluate("arguments").value();
+    assertArrayEquals(foo_expected, foo_arguments);
+    assertArrayEquals(bar_expected, bar_arguments);
+    listened = true;
+  } catch (e) {
+    print(e);
+    print(e.stack);
+  }
+}
+
+Debug.setListener(listener);
+
+function foo(a) {
+  function bar(a,b,c) {
+    debugger;
+    return a + b + c;
+  }
+  return bar(1,2,a);
+}
+
+listened = false;
+foo_expected = [3];
+bar_expected = [1,2,3];
+assertEquals(6, foo(3));
+assertTrue(listened);
+
+listened = false;
+foo_expected = [3];
+bar_expected = [1,2,3];
+assertEquals(6, foo(3));
+assertTrue(listened);
+
+listened = false;
+foo_expected = [3];
+bar_expected = [1,2,3];
+%OptimizeFunctionOnNextCall(foo);
+assertEquals(6, foo(3));
+assertTrue(listened);
+
+listened = false;
+foo_expected = [3,4,5];
+bar_expected = [1,2,3];
+%OptimizeFunctionOnNextCall(foo);
+assertEquals(6, foo(3,4,5));
+assertTrue(listened);
+
+Debug.setListener(null);
diff --git a/src/v8/test/debugger/debug/debug-modules-set-variable-value.js b/src/v8/test/debugger/debug/debug-modules-set-variable-value.js
index 61c032f..1d1c6d5 100644
--- a/src/v8/test/debugger/debug/debug-modules-set-variable-value.js
+++ b/src/v8/test/debugger/debug/debug-modules-set-variable-value.js
@@ -271,7 +271,7 @@
   function listener(event, exec_state) {
     if (event == Debug.DebugEvent.Break) {
       let scope_count = exec_state.frame().scopeCount();
-      let module_scope = exec_state.frame().scope(2);
+      let module_scope = exec_state.frame().scope(1);
       assertEquals(debug.ScopeType.Module, module_scope.scopeType());
       module_scope.setVariableValue('salad', 42);
     }
@@ -311,7 +311,7 @@
   function listener(event, exec_state) {
     if (event == Debug.DebugEvent.Break) {
       let scope_count = exec_state.frame().scopeCount();
-      let module_scope = exec_state.frame().scope(2);
+      let module_scope = exec_state.frame().scope(1);
       assertEquals(debug.ScopeType.Module, module_scope.scopeType());
       module_scope.setVariableValue('ham', 2);
     }
diff --git a/src/v8/test/debugger/debug/debug-script.js b/src/v8/test/debugger/debug/debug-script.js
index 98aa555..342f619 100644
--- a/src/v8/test/debugger/debug/debug-script.js
+++ b/src/v8/test/debugger/debug/debug-script.js
@@ -28,10 +28,11 @@
 // Flags: --expose-gc --send-idle-notification
 // Flags: --expose-natives-as natives
 // Flags: --noharmony-shipping
-// Flags: --nostress-opt
+// Flags: --nostress-opt --nostress-background-compile
 
-// --nostress-opt is specified because in stress mode the compilation cache
-// may hold on to old copies of scripts (see bug 1641).
+// --nostress-opt and --nostress-background-compilation is specified because in
+// stress mode the compilation cache may hold on to old copies of scripts (see
+// bug 1641).
 
 // Note: this test checks that that the number of scripts reported as native
 // by Debug.scripts() is the same as a number of core native scripts.
diff --git a/src/v8/test/debugger/debug/harmony/modules-debug-scopes2.js b/src/v8/test/debugger/debug/harmony/modules-debug-scopes2.js
index 8b9b9e8..cc1091e 100644
--- a/src/v8/test/debugger/debug/harmony/modules-debug-scopes2.js
+++ b/src/v8/test/debugger/debug/harmony/modules-debug-scopes2.js
@@ -139,10 +139,10 @@
                    debug.ScopeType.Script,
                    debug.ScopeType.Global], exec_state);
   CheckScopeContent(
-      {local_var: undefined, exported_var: undefined, imported_var: undefined},
+      {exported_var: undefined, imported_var: undefined},
       0, exec_state);
   CheckScopeDoesNotHave(
-      ["doesnotexist", "local_let", "exported_let", "imported_let"],
+      ["local_var", "doesntexist", "local_let", "exported_let", "imported_let"],
       0, exec_state);
 };
 debugger;
@@ -161,8 +161,9 @@
                    debug.ScopeType.Script,
                    debug.ScopeType.Global], exec_state);
   CheckScopeContent(
-      {local_let: 1, local_var: 2, exported_let: 3, exported_var: 4,
+      {exported_let: 3, exported_var: 4,
        imported_let: 3, imported_var: 4}, 0, exec_state);
+  CheckScopeDoesNotHave(["local_var", "local_let"], 0, exec_state);
 };
 debugger;
 EndTest();
@@ -178,8 +179,9 @@
                    debug.ScopeType.Script,
                    debug.ScopeType.Global], exec_state);
   CheckScopeContent(
-      {local_let: 11, local_var: 12, exported_let: 13, exported_var: 14,
+      {exported_let: 13, exported_var: 14,
        imported_let: 13, imported_var: 14}, 0, exec_state);
+  CheckScopeDoesNotHave(["local_var", "local_let"], 0, exec_state);
 };
 debugger;
 EndTest();
diff --git a/src/v8/test/debugger/debug/regress/regress-1853.js b/src/v8/test/debugger/debug/regress/regress-1853.js
index 8c6e940..4cd069f 100644
--- a/src/v8/test/debugger/debug/regress/regress-1853.js
+++ b/src/v8/test/debugger/debug/regress/regress-1853.js
@@ -25,10 +25,11 @@
 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
-
+// Flags: --expose-gc
 // Test whether scripts compiled after setting the break point are
 // updated correctly.
 
+gc();
 Debug = debug.Debug;
 
 var break_count = 0;
diff --git a/src/v8/test/debugger/debug/regress/regress-crbug-481896.js b/src/v8/test/debugger/debug/regress/regress-crbug-481896.js
index d123980..751b62a 100644
--- a/src/v8/test/debugger/debug/regress/regress-crbug-481896.js
+++ b/src/v8/test/debugger/debug/regress/regress-crbug-481896.js
@@ -1,8 +1,8 @@
 // Copyright 2015 the V8 project authors. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
-
-
+// Flags: --expose-gc
+gc();
 function static() {
   print("> static");  // Break
 }
diff --git a/src/v8/test/debugger/debug/regress/regress-crbug-517592.js b/src/v8/test/debugger/debug/regress/regress-crbug-517592.js
index e4a905d..57e96a2 100644
--- a/src/v8/test/debugger/debug/regress/regress-crbug-517592.js
+++ b/src/v8/test/debugger/debug/regress/regress-crbug-517592.js
@@ -4,7 +4,7 @@
 
 var source =
   "var foo = function foo() {\n" +
-  "  return 1;\n" +
+  "  var a = 1;\n" +
   "}\n" +
   "//@ sourceURL=test";
 
diff --git a/src/v8/test/debugger/debugger.status b/src/v8/test/debugger/debugger.status
index bbb4507..98a95eb 100644
--- a/src/v8/test/debugger/debugger.status
+++ b/src/v8/test/debugger/debugger.status
@@ -44,6 +44,12 @@
 }],  # variant == stress
 
 ##############################################################################
+['variant == stress_incremental_marking', {
+  # BUG(chromium:772010).
+  'debug/debug-*': [PASS, ['system == windows', SKIP]],
+}],  # variant == stress_incremental_marking
+
+##############################################################################
 ['gc_stress == True', {
   # Skip tests not suitable for GC stress.
   # Tests taking too long
diff --git a/src/v8/test/debugger/testcfg.py b/src/v8/test/debugger/testcfg.py
index a07acbc..e287077 100644
--- a/src/v8/test/debugger/testcfg.py
+++ b/src/v8/test/debugger/testcfg.py
@@ -9,14 +9,9 @@
 from testrunner.objects import testcase
 
 FILES_PATTERN = re.compile(r"//\s+Files:(.*)")
-FLAGS_PATTERN = re.compile(r"//\s+Flags:(.*)")
 MODULE_PATTERN = re.compile(r"^// MODULE$", flags=re.MULTILINE)
 
-class DebuggerTestSuite(testsuite.TestSuite):
-
-  def __init__(self, name, root):
-    super(DebuggerTestSuite, self).__init__(name, root)
-
+class TestSuite(testsuite.TestSuite):
   def ListTests(self, context):
     tests = []
     for dirname, dirs, files in os.walk(self.root):
@@ -29,17 +24,23 @@
           fullpath = os.path.join(dirname, filename)
           relpath = fullpath[len(self.root) + 1 : -3]
           testname = relpath.replace(os.path.sep, "/")
-          test = testcase.TestCase(self, testname)
+          test = self._create_test(testname)
           tests.append(test)
     return tests
 
-  def GetFlagsForTestCase(self, testcase, context):
-    source = self.GetSourceForTest(testcase)
-    flags = ["--enable-inspector", "--allow-natives-syntax"] + context.mode_flags
-    flags_match = re.findall(FLAGS_PATTERN, source)
-    for match in flags_match:
-      flags += match.strip().split()
+  def _test_class(self):
+    return TestCase
 
+
+class TestCase(testcase.TestCase):
+  def __init__(self, *args, **kwargs):
+    super(TestCase, self).__init__(*args, **kwargs)
+
+    source = self.get_source()
+    self._source_files = self._parse_source_files(source)
+    self._source_flags = self._parse_source_flags(source)
+
+  def _parse_source_files(self, source):
     files_list = []  # List of file names to append to command arguments.
     files_match = FILES_PATTERN.search(source);
     # Accept several lines of 'Files:'.
@@ -51,25 +52,31 @@
         break
 
     files = []
-    files.append(os.path.normpath(os.path.join(self.root, "..", "mjsunit", "mjsunit.js")))
-    files.append(os.path.join(self.root, "test-api.js"))
-    files.extend([ os.path.normpath(os.path.join(self.root, '..', '..', f))
-                  for f in files_list ])
+    files.append(os.path.normpath(os.path.join(
+        self.suite.root, "..", "mjsunit", "mjsunit.js")))
+    files.append(os.path.join(self.suite.root, "test-api.js"))
+    files.extend([os.path.normpath(os.path.join(self.suite.root, '..', '..', f))
+                  for f in files_list])
     if MODULE_PATTERN.search(source):
       files.append("--module")
-    files.append(os.path.join(self.root, testcase.path + self.suffix()))
+    files.append(os.path.join(self.suite.root, self.path + self._get_suffix()))
+    return files
 
-    flags += files
-    if context.isolates:
-      flags.append("--isolate")
-      flags += files
+  def _get_files_params(self, ctx):
+    files = self._source_files
+    if ctx.isolates:
+      files = files + ['--isolate'] + files
+    return files
 
-    return testcase.flags + flags
+  def _get_source_flags(self):
+    return self._source_flags
 
-  def GetSourceForTest(self, testcase):
-    filename = os.path.join(self.root, testcase.path + self.suffix())
-    with open(filename) as f:
-      return f.read()
+  def _get_suite_flags(self, ctx):
+    return ['--enable-inspector', '--allow-natives-syntax']
+
+  def _get_source_path(self):
+    return os.path.join(self.suite.root, self.path + self._get_suffix())
+
 
 def GetSuite(name, root):
-  return DebuggerTestSuite(name, root)
+  return TestSuite(name, root)
diff --git a/src/v8/test/default.gyp b/src/v8/test/default.gyp
index 2c6429b..d1007b8 100644
--- a/src/v8/test/default.gyp
+++ b/src/v8/test/default.gyp
@@ -11,6 +11,7 @@
           'type': 'none',
           'dependencies': [
             'cctest/cctest.gyp:cctest_run',
+            'debugger/debugger.gyp:debugger_run',
             'fuzzer/fuzzer.gyp:fuzzer_run',
             'inspector/inspector.gyp:inspector-test_run',
             'intl/intl.gyp:intl_run',
diff --git a/src/v8/test/fuzzer/README.md b/src/v8/test/fuzzer/README.md
index ed0ce1f..5f10d47 100644
--- a/src/v8/test/fuzzer/README.md
+++ b/src/v8/test/fuzzer/README.md
@@ -79,7 +79,7 @@
    for more information.
 
 2. Compile the fuzzer in chromium (for different configurations see:
-   https://chromium.googlesource.com/chromium/src/+/master/testing/libfuzzer/reproducing.md):
+   https://chromium.googlesource.com/chromium/src/+/master/testing/libfuzzer/reference.md):
 
    * `gn gen out/libfuzzer '--args=use_libfuzzer=true is_asan=true is_debug=false enable_nacl=false'`
 
diff --git a/src/v8/test/fuzzer/fuzzer-support.cc b/src/v8/test/fuzzer/fuzzer-support.cc
index f800f49..d6cff11 100644
--- a/src/v8/test/fuzzer/fuzzer-support.cc
+++ b/src/v8/test/fuzzer/fuzzer-support.cc
@@ -14,26 +14,13 @@
 
 namespace v8_fuzzer {
 
-namespace {
-
-FuzzerSupport* g_fuzzer_support = nullptr;
-
-void DeleteFuzzerSupport() {
-  if (g_fuzzer_support) {
-    delete g_fuzzer_support;
-    g_fuzzer_support = nullptr;
-  }
-}
-
-}  // namespace
-
 FuzzerSupport::FuzzerSupport(int* argc, char*** argv) {
   v8::internal::FLAG_expose_gc = true;
   v8::V8::SetFlagsFromCommandLine(argc, *argv, true);
   v8::V8::InitializeICUDefaultLocation((*argv)[0]);
   v8::V8::InitializeExternalStartupData((*argv)[0]);
-  platform_ = v8::platform::CreateDefaultPlatform();
-  v8::V8::InitializePlatform(platform_);
+  platform_ = v8::platform::NewDefaultPlatform();
+  v8::V8::InitializePlatform(platform_.get());
   v8::V8::Initialize();
 
   allocator_ = v8::ArrayBuffer::Allocator::NewDefaultAllocator();
@@ -47,7 +34,7 @@
     context_.Reset(isolate_, v8::Context::New(isolate_));
   }
 
-  v8::platform::EnsureEventLoopInitialized(platform_, isolate_);
+  v8::platform::EnsureEventLoopInitialized(platform_.get(), isolate_);
 }
 
 FuzzerSupport::~FuzzerSupport() {
@@ -70,15 +57,22 @@
 
   v8::V8::Dispose();
   v8::V8::ShutdownPlatform();
+}
 
-  delete platform_;
-  platform_ = nullptr;
+std::unique_ptr<FuzzerSupport> FuzzerSupport::fuzzer_support_;
+
+// static
+void FuzzerSupport::InitializeFuzzerSupport(int* argc, char*** argv) {
+  DCHECK_NULL(FuzzerSupport::fuzzer_support_);
+  FuzzerSupport::fuzzer_support_ =
+      v8::base::make_unique<v8_fuzzer::FuzzerSupport>(argc, argv);
 }
 
 // static
-FuzzerSupport* FuzzerSupport::Get() { return g_fuzzer_support; }
-
-v8::Isolate* FuzzerSupport::GetIsolate() const { return isolate_; }
+FuzzerSupport* FuzzerSupport::Get() {
+  DCHECK_NOT_NULL(FuzzerSupport::fuzzer_support_);
+  return FuzzerSupport::fuzzer_support_.get();
+}
 
 v8::Local<v8::Context> FuzzerSupport::GetContext() {
   v8::Isolate::Scope isolate_scope(isolate_);
@@ -90,13 +84,19 @@
 
 bool FuzzerSupport::PumpMessageLoop(
     v8::platform::MessageLoopBehavior behavior) {
-  return v8::platform::PumpMessageLoop(platform_, isolate_, behavior);
+  return v8::platform::PumpMessageLoop(platform_.get(), isolate_, behavior);
 }
 
 }  // namespace v8_fuzzer
 
-extern "C" int LLVMFuzzerInitialize(int* argc, char*** argv) {
-  v8_fuzzer::g_fuzzer_support = new v8_fuzzer::FuzzerSupport(argc, argv);
-  atexit(&v8_fuzzer::DeleteFuzzerSupport);
+// Explicitly specify some attributes to avoid issues with the linker dead-
+// stripping the following function on macOS, as it is not called directly
+// by fuzz target. LibFuzzer runtime uses dlsym() to resolve that function.
+#if V8_OS_MACOSX
+__attribute__((used)) __attribute__((visibility("default")))
+#endif  // V8_OS_MACOSX
+extern "C" int
+LLVMFuzzerInitialize(int* argc, char*** argv) {
+  v8_fuzzer::FuzzerSupport::InitializeFuzzerSupport(argc, argv);
   return 0;
 }
diff --git a/src/v8/test/fuzzer/fuzzer-support.h b/src/v8/test/fuzzer/fuzzer-support.h
index e72dcc3..229c8c6 100644
--- a/src/v8/test/fuzzer/fuzzer-support.h
+++ b/src/v8/test/fuzzer/fuzzer-support.h
@@ -13,12 +13,17 @@
 class FuzzerSupport {
  public:
   FuzzerSupport(int* argc, char*** argv);
+
   ~FuzzerSupport();
 
+  static void InitializeFuzzerSupport(int* argc, char*** argv);
+
   static FuzzerSupport* Get();
 
-  v8::Isolate* GetIsolate() const;
+  v8::Isolate* GetIsolate() const { return isolate_; }
+
   v8::Local<v8::Context> GetContext();
+
   bool PumpMessageLoop(v8::platform::MessageLoopBehavior =
                            v8::platform::MessageLoopBehavior::kDoNotWait);
 
@@ -27,8 +32,8 @@
   FuzzerSupport(const FuzzerSupport&);
   FuzzerSupport& operator=(const FuzzerSupport&);
 
-
-  v8::Platform* platform_;
+  static std::unique_ptr<FuzzerSupport> fuzzer_support_;
+  std::unique_ptr<v8::Platform> platform_;
   v8::ArrayBuffer::Allocator* allocator_;
   v8::Isolate* isolate_;
   v8::Global<v8::Context> context_;
diff --git a/src/v8/test/fuzzer/fuzzer.gyp b/src/v8/test/fuzzer/fuzzer.gyp
index 3d76018..0c54211 100644
--- a/src/v8/test/fuzzer/fuzzer.gyp
+++ b/src/v8/test/fuzzer/fuzzer.gyp
@@ -90,6 +90,36 @@
       ],
     },
     {
+      'target_name': 'v8_simple_multi_return_fuzzer',
+      'type': 'executable',
+      'dependencies': [
+        'multi_return_fuzzer_lib',
+      ],
+      'include_dirs': [
+        '../..',
+      ],
+      'sources': [
+        'fuzzer.cc',
+      ],
+    },
+    {
+      'target_name': 'multi_return_fuzzer_lib',
+      'type': 'static_library',
+      'dependencies': [
+        '../../src/v8.gyp:v8_libplatform',
+        'fuzzer_support',
+      ],
+      'include_dirs': [
+        '../..',
+      ],
+      'sources': [  ### gcmole(all) ###
+        '../compiler/c-signature.h',
+        '../compiler/call-helper.h',
+        '../compiler/raw-machine-assembler-tester.h',
+        'multi-return.cc',
+      ],
+    },
+    {
       'target_name': 'v8_simple_wasm_fuzzer',
       'type': 'executable',
       'dependencies': [
diff --git a/src/v8/test/fuzzer/fuzzer.isolate b/src/v8/test/fuzzer/fuzzer.isolate
index 097d558..9391dcc 100644
--- a/src/v8/test/fuzzer/fuzzer.isolate
+++ b/src/v8/test/fuzzer/fuzzer.isolate
@@ -8,6 +8,7 @@
       '<(PRODUCT_DIR)/v8_simple_json_fuzzer<(EXECUTABLE_SUFFIX)',
       '<(PRODUCT_DIR)/v8_simple_parser_fuzzer<(EXECUTABLE_SUFFIX)',
       '<(PRODUCT_DIR)/v8_simple_regexp_fuzzer<(EXECUTABLE_SUFFIX)',
+      '<(PRODUCT_DIR)/v8_simple_multi_return_fuzzer<(EXECUTABLE_SUFFIX)',
       '<(PRODUCT_DIR)/v8_simple_wasm_fuzzer<(EXECUTABLE_SUFFIX)',
       '<(PRODUCT_DIR)/v8_simple_wasm_async_fuzzer<(EXECUTABLE_SUFFIX)',
       '<(PRODUCT_DIR)/v8_simple_wasm_call_fuzzer<(EXECUTABLE_SUFFIX)',
@@ -25,6 +26,7 @@
       './json/',
       './parser/',
       './regexp/',
+      './multi_return/',
       './wasm/',
       './wasm_async/',
       './wasm_call/',
diff --git a/src/v8/test/fuzzer/multi-return.cc b/src/v8/test/fuzzer/multi-return.cc
new file mode 100644
index 0000000..4766774
--- /dev/null
+++ b/src/v8/test/fuzzer/multi-return.cc
@@ -0,0 +1,346 @@
+// Copyright 2018 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include <cstddef>
+#include <cstdint>
+
+#include "src/compilation-info.h"
+#include "src/compiler/graph.h"
+#include "src/compiler/instruction-selector.h"
+#include "src/compiler/linkage.h"
+#include "src/compiler/node.h"
+#include "src/compiler/operator.h"
+#include "src/compiler/pipeline.h"
+#include "src/compiler/raw-machine-assembler.h"
+#include "src/machine-type.h"
+#include "src/objects-inl.h"
+#include "src/objects.h"
+#include "src/simulator.h"
+#include "src/zone/accounting-allocator.h"
+#include "src/zone/zone.h"
+#include "test/fuzzer/fuzzer-support.h"
+
+namespace v8 {
+namespace internal {
+namespace compiler {
+namespace fuzzer {
+
+constexpr MachineType kTypes[] = {
+    // The first entry is just a placeholder, because '0' is a separator.
+    MachineType(),
+#if !V8_TARGET_ARCH_32_BIT
+    MachineType::Int64(),
+#endif
+    MachineType::Int32(), MachineType::Float32(), MachineType::Float64()};
+
+static constexpr int kNumTypes = arraysize(kTypes);
+
+class InputProvider {
+ public:
+  InputProvider(const uint8_t* data, size_t size)
+      : current_(data), end_(data + size) {}
+
+  size_t NumNonZeroBytes(size_t offset, int limit) {
+    DCHECK_LE(limit, std::numeric_limits<uint8_t>::max());
+    DCHECK_GE(current_ + offset, current_);
+    const uint8_t* p;
+    for (p = current_ + offset; p < end_; ++p) {
+      if (*p % limit == 0) break;
+    }
+    return p - current_ - offset;
+  }
+
+  int NextInt8(int limit) {
+    DCHECK_LE(limit, std::numeric_limits<uint8_t>::max());
+    if (current_ == end_) return 0;
+    uint8_t result = *current_;
+    current_++;
+    return static_cast<int>(result) % limit;
+  }
+
+  int NextInt32(int limit) {
+    if (current_ + sizeof(uint32_t) > end_) return 0;
+    int result = ReadLittleEndianValue<int>(current_);
+    current_ += sizeof(uint32_t);
+    return result % limit;
+  }
+
+ private:
+  const uint8_t* current_;
+  const uint8_t* end_;
+};
+
+MachineType RandomType(InputProvider* input) {
+  return kTypes[input->NextInt8(kNumTypes)];
+}
+
+int num_registers(MachineType type) {
+  const RegisterConfiguration* config = RegisterConfiguration::Default();
+  switch (type.representation()) {
+    case MachineRepresentation::kWord32:
+    case MachineRepresentation::kWord64:
+      return config->num_allocatable_general_registers();
+    case MachineRepresentation::kFloat32:
+      return config->num_allocatable_float_registers();
+    case MachineRepresentation::kFloat64:
+      return config->num_allocatable_double_registers();
+    default:
+      UNREACHABLE();
+  }
+}
+
+int size(MachineType type) {
+  return 1 << ElementSizeLog2Of(type.representation());
+}
+
+int index(MachineType type) { return static_cast<int>(type.representation()); }
+
+const int* codes(MachineType type) {
+  const RegisterConfiguration* config = RegisterConfiguration::Default();
+  switch (type.representation()) {
+    case MachineRepresentation::kWord32:
+    case MachineRepresentation::kWord64:
+      return config->allocatable_general_codes();
+    case MachineRepresentation::kFloat32:
+      return config->allocatable_float_codes();
+    case MachineRepresentation::kFloat64:
+      return config->allocatable_double_codes();
+    default:
+      UNREACHABLE();
+  }
+}
+
+LinkageLocation AllocateLocation(MachineType type, int* int_count,
+                                 int* float_count, int* stack_slots) {
+  int* count = IsFloatingPoint(type.representation()) ? float_count : int_count;
+  int reg_code = *count;
+#if V8_TARGET_ARCH_ARM
+  // Allocate floats using a double register, but modify the code to
+  // reflect how ARM FP registers alias.
+  if (type == MachineType::Float32()) {
+    reg_code *= 2;
+  }
+#endif
+  LinkageLocation location = LinkageLocation::ForAnyRegister();  // Dummy.
+  if (reg_code < num_registers(type)) {
+    location = LinkageLocation::ForRegister(codes(type)[reg_code], type);
+  } else {
+    location = LinkageLocation::ForCallerFrameSlot(-*stack_slots - 1, type);
+    *stack_slots += std::max(1, size(type) / kPointerSize);
+  }
+  ++*count;
+  return location;
+}
+
+Node* Constant(RawMachineAssembler& m, MachineType type, int value) {
+  switch (type.representation()) {
+    case MachineRepresentation::kWord32:
+      return m.Int32Constant(static_cast<int32_t>(value));
+    case MachineRepresentation::kWord64:
+      return m.Int64Constant(static_cast<int64_t>(value));
+    case MachineRepresentation::kFloat32:
+      return m.Float32Constant(static_cast<float>(value));
+    case MachineRepresentation::kFloat64:
+      return m.Float64Constant(static_cast<double>(value));
+    default:
+      UNREACHABLE();
+  }
+}
+
+Node* ToInt32(RawMachineAssembler& m, MachineType type, Node* a) {
+  switch (type.representation()) {
+    case MachineRepresentation::kWord32:
+      return a;
+    case MachineRepresentation::kWord64:
+      return m.TruncateInt64ToInt32(a);
+    case MachineRepresentation::kFloat32:
+      return m.TruncateFloat32ToInt32(a);
+    case MachineRepresentation::kFloat64:
+      return m.RoundFloat64ToInt32(a);
+    default:
+      UNREACHABLE();
+  }
+}
+
+CallDescriptor* CreateRandomCallDescriptor(Zone* zone, size_t return_count,
+                                           size_t param_count,
+                                           InputProvider* input) {
+  LocationSignature::Builder locations(zone, return_count, param_count);
+
+  int stack_slots = 0;
+  int int_params = 0;
+  int float_params = 0;
+  for (size_t i = 0; i < param_count; i++) {
+    MachineType type = RandomType(input);
+    LinkageLocation location =
+        AllocateLocation(type, &int_params, &float_params, &stack_slots);
+    locations.AddParam(location);
+  }
+  // Read the end byte of the parameters.
+  input->NextInt8(1);
+
+  int stack_params = stack_slots;
+#if V8_TARGET_ARCH_ARM64
+  // Align the stack slots.
+  stack_slots = stack_slots + (stack_slots % 2);
+#endif
+  int aligned_stack_params = stack_slots;
+  int int_returns = 0;
+  int float_returns = 0;
+  for (size_t i = 0; i < return_count; i++) {
+    MachineType type = RandomType(input);
+    LinkageLocation location =
+        AllocateLocation(type, &int_returns, &float_returns, &stack_slots);
+    locations.AddReturn(location);
+  }
+  int stack_returns = stack_slots - aligned_stack_params;
+
+  MachineType target_type = MachineType::AnyTagged();
+  LinkageLocation target_loc = LinkageLocation::ForAnyRegister(target_type);
+  return new (zone) CallDescriptor(       // --
+      CallDescriptor::kCallCodeObject,    // kind
+      target_type,                        // target MachineType
+      target_loc,                         // target location
+      locations.Build(),                  // location_sig
+      stack_params,                       // on-stack parameter count
+      compiler::Operator::kNoProperties,  // properties
+      0,                                  // callee-saved registers
+      0,                                  // callee-saved fp regs
+      CallDescriptor::kNoFlags,           // flags
+      "c-call",                           // debug name
+      0,                                  // allocatable registers
+      stack_returns);                     // on-stack return count
+}
+
+extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
+  v8_fuzzer::FuzzerSupport* support = v8_fuzzer::FuzzerSupport::Get();
+  v8::Isolate* isolate = support->GetIsolate();
+  i::Isolate* i_isolate = reinterpret_cast<Isolate*>(isolate);
+  v8::Isolate::Scope isolate_scope(isolate);
+  v8::HandleScope handle_scope(isolate);
+  v8::Context::Scope context_scope(support->GetContext());
+  v8::TryCatch try_catch(isolate);
+  v8::internal::AccountingAllocator allocator;
+  Zone zone(&allocator, ZONE_NAME);
+
+  InputProvider input(data, size);
+  // Create randomized descriptor.
+  size_t param_count = input.NumNonZeroBytes(0, kNumTypes);
+  size_t return_count = input.NumNonZeroBytes(param_count + 1, kNumTypes);
+  CallDescriptor* desc =
+      CreateRandomCallDescriptor(&zone, return_count, param_count, &input);
+
+  if (FLAG_wasm_fuzzer_gen_test) {
+    // Print some debugging output which describes the produced signature.
+    printf("[");
+    for (size_t j = 0; j < desc->ParameterCount(); ++j) {
+      printf(" %s",
+             MachineReprToString(desc->GetParameterType(j).representation()));
+    }
+    printf(" ] -> [");
+    for (size_t j = 0; j < desc->ReturnCount(); ++j) {
+      printf(" %s",
+             MachineReprToString(desc->GetReturnType(j).representation()));
+    }
+    printf(" ]\n\n");
+  }
+
+  // Count parameters of each type.
+  constexpr size_t kNumMachineRepresentations =
+      static_cast<size_t>(MachineRepresentation::kLastRepresentation) + 1;
+
+  // Trivial hash table for the number of occurrences of parameter types. The
+  // MachineRepresentation of the parameter types is used as hash code.
+  int counts[kNumMachineRepresentations] = {0};
+  for (size_t i = 0; i < desc->ParameterCount(); ++i) {
+    ++counts[index(desc->GetParameterType(i))];
+  }
+
+  // Generate random inputs.
+  std::unique_ptr<int[]> inputs(new int[desc->ParameterCount()]);
+  std::unique_ptr<int[]> outputs(new int[desc->ReturnCount()]);
+  for (size_t i = 0; i < desc->ParameterCount(); ++i) {
+    inputs[i] = input.NextInt32(10000);
+  }
+
+  RawMachineAssembler callee(
+      i_isolate, new (&zone) Graph(&zone), desc,
+      MachineType::PointerRepresentation(),
+      InstructionSelector::SupportedMachineOperatorFlags());
+
+  // Generate callee, returning random picks of its parameters.
+  std::unique_ptr<Node* []> params(new Node*[desc->ParameterCount() + 1]);
+  std::unique_ptr<Node* []> returns(new Node*[desc->ReturnCount()]);
+  for (size_t i = 0; i < desc->ParameterCount(); ++i) {
+    params[i] = callee.Parameter(i);
+  }
+  for (size_t i = 0; i < desc->ReturnCount(); ++i) {
+    MachineType type = desc->GetReturnType(i);
+    // Find a random same-type parameter to return. Use a constant if none.
+    if (counts[index(type)] == 0) {
+      returns[i] = Constant(callee, type, 42);
+      outputs[i] = 42;
+    } else {
+      int n = input.NextInt8(counts[index(type)]);
+      int k = 0;
+      while (desc->GetParameterType(k) != desc->GetReturnType(i) || --n > 0) {
+        ++k;
+      }
+      returns[i] = params[k];
+      outputs[i] = inputs[k];
+    }
+  }
+  callee.Return(static_cast<int>(desc->ReturnCount()), returns.get());
+
+  CompilationInfo info(ArrayVector("testing"), &zone, Code::STUB);
+  Handle<Code> code = Pipeline::GenerateCodeForTesting(
+      &info, i_isolate, desc, callee.graph(), callee.Export());
+
+  // Generate wrapper.
+  int expect = 0;
+
+  MachineSignature::Builder sig_builder(&zone, 1, 0);
+  sig_builder.AddReturn(MachineType::Int32());
+
+  CallDescriptor* wrapper_desc =
+      Linkage::GetSimplifiedCDescriptor(&zone, sig_builder.Build());
+  RawMachineAssembler caller(
+      i_isolate, new (&zone) Graph(&zone), wrapper_desc,
+      MachineType::PointerRepresentation(),
+      InstructionSelector::SupportedMachineOperatorFlags());
+
+  params[0] = caller.HeapConstant(code);
+  for (size_t i = 0; i < desc->ParameterCount(); ++i) {
+    params[i + 1] = Constant(caller, desc->GetParameterType(i), inputs[i]);
+  }
+  Node* call = caller.AddNode(caller.common()->Call(desc),
+                              static_cast<int>(desc->ParameterCount() + 1),
+                              params.get());
+  Node* ret = Constant(caller, MachineType::Int32(), 0);
+  for (size_t i = 0; i < desc->ReturnCount(); ++i) {
+    // Skip roughly one third of the outputs.
+    if (input.NextInt8(3) == 0) continue;
+    Node* ret_i = (desc->ReturnCount() == 1)
+                      ? call
+                      : caller.AddNode(caller.common()->Projection(i), call);
+    ret = caller.Int32Add(ret, ToInt32(caller, desc->GetReturnType(i), ret_i));
+    expect += outputs[i];
+  }
+  caller.Return(ret);
+
+  // Call the wrapper.
+  CompilationInfo wrapper_info(ArrayVector("wrapper"), &zone, Code::STUB);
+  Handle<Code> wrapper_code = Pipeline::GenerateCodeForTesting(
+      &wrapper_info, i_isolate, wrapper_desc, caller.graph(), caller.Export());
+  auto fn = GeneratedCode<int32_t>::FromCode(*wrapper_code);
+  int result = fn.Call();
+
+  CHECK_EQ(expect, result);
+  return 0;
+}
+
+}  // namespace fuzzer
+}  // namespace compiler
+}  // namespace internal
+}  // namespace v8
diff --git a/src/v8/test/fuzzer/multi_return/README.md b/src/v8/test/fuzzer/multi_return/README.md
new file mode 100644
index 0000000..a3764e8
--- /dev/null
+++ b/src/v8/test/fuzzer/multi_return/README.md
@@ -0,0 +1,4 @@
+All files in this directory are used by the trybots to check that the fuzzer
+executes correctly, see
+https://github.com/v8/v8/blob/master/test/fuzzer/README.md. There should be at
+least one file in this directory, e.g. this README file.
diff --git a/src/v8/test/fuzzer/regexp.cc b/src/v8/test/fuzzer/regexp.cc
index 2c96000..b652bd7 100644
--- a/src/v8/test/fuzzer/regexp.cc
+++ b/src/v8/test/fuzzer/regexp.cc
@@ -34,8 +34,6 @@
   v8::Context::Scope context_scope(support->GetContext());
   v8::TryCatch try_catch(isolate);
 
-  i::FLAG_harmony_regexp_lookbehind = true;
-
   i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate);
   i::Factory* factory = i_isolate->factory();
 
@@ -51,7 +49,7 @@
 
   static const int kAllFlags = i::JSRegExp::kGlobal | i::JSRegExp::kIgnoreCase |
                                i::JSRegExp::kMultiline | i::JSRegExp::kSticky |
-                               i::JSRegExp::kUnicode;
+                               i::JSRegExp::kUnicode | i::JSRegExp::kDotAll;
 
   const uint8_t one_byte_array[6] = {'f', 'o', 'o', 'b', 'a', 'r'};
   const i::uc16 two_byte_array[6] = {'f', 0xD83D, 0xDCA9, 'b', 'a', 0x2603};
diff --git a/src/v8/test/fuzzer/testcfg.py b/src/v8/test/fuzzer/testcfg.py
index 905d8b0..b3fe174 100644
--- a/src/v8/test/fuzzer/testcfg.py
+++ b/src/v8/test/fuzzer/testcfg.py
@@ -8,45 +8,57 @@
 from testrunner.objects import testcase
 
 
-class FuzzerVariantGenerator(testsuite.VariantGenerator):
-  # Only run the fuzzer with standard variant.
-  def FilterVariantsByTest(self, testcase):
-    return self.standard_variant
-
-  def GetFlagSets(self, testcase, variant):
-    return testsuite.FAST_VARIANT_FLAGS[variant]
+class VariantsGenerator(testsuite.VariantsGenerator):
+  def _get_variants(self, test):
+    return self._standard_variant
 
 
-class FuzzerTestSuite(testsuite.TestSuite):
-  SUB_TESTS = ( 'json', 'parser', 'regexp', 'wasm', 'wasm_async',
-          'wasm_call', 'wasm_code', 'wasm_compile', 'wasm_data_section',
-          'wasm_function_sigs_section', 'wasm_globals_section',
-          'wasm_imports_section', 'wasm_memory_section', 'wasm_names_section',
-          'wasm_types_section' )
-
-  def __init__(self, name, root):
-    super(FuzzerTestSuite, self).__init__(name, root)
+class TestSuite(testsuite.TestSuite):
+  SUB_TESTS = ( 'json', 'parser', 'regexp', 'multi_return', 'wasm',
+          'wasm_async', 'wasm_call', 'wasm_code', 'wasm_compile',
+          'wasm_data_section', 'wasm_function_sigs_section',
+          'wasm_globals_section', 'wasm_imports_section', 'wasm_memory_section',
+          'wasm_names_section', 'wasm_types_section' )
 
   def ListTests(self, context):
     tests = []
-    for subtest in FuzzerTestSuite.SUB_TESTS:
-      shell = 'v8_simple_%s_fuzzer' % subtest
+    for subtest in TestSuite.SUB_TESTS:
       for fname in os.listdir(os.path.join(self.root, subtest)):
         if not os.path.isfile(os.path.join(self.root, subtest, fname)):
           continue
-        test = testcase.TestCase(self, '%s/%s' % (subtest, fname),
-                                 override_shell=shell)
+        test = self._create_test('%s/%s' % (subtest, fname))
         tests.append(test)
     tests.sort()
     return tests
 
-  def GetFlagsForTestCase(self, testcase, context):
-    suite, name = testcase.path.split('/')
-    return [os.path.join(self.root, suite, name)]
+  def _test_class(self):
+    return TestCase
 
-  def _VariantGeneratorFactory(self):
-    return FuzzerVariantGenerator
+  def _variants_gen_class(self):
+    return VariantsGenerator
+
+  def _LegacyVariantsGeneratorFactory(self):
+    return testsuite.StandardLegacyVariantsGenerator
+
+
+class TestCase(testcase.TestCase):
+  def _get_files_params(self, ctx):
+    suite, name = self.path.split('/')
+    return [os.path.join(self.suite.root, suite, name)]
+
+  def _get_variant_flags(self):
+    return []
+
+  def _get_statusfile_flags(self):
+    return []
+
+  def _get_mode_flags(self, ctx):
+    return []
+
+  def get_shell(self):
+    group, _ = self.path.split('/', 1)
+    return 'v8_simple_%s_fuzzer' % group
 
 
 def GetSuite(name, root):
-  return FuzzerTestSuite(name, root)
+  return TestSuite(name, root)
diff --git a/src/v8/test/fuzzer/wasm-async.cc b/src/v8/test/fuzzer/wasm-async.cc
index 13b15a9..4718601 100644
--- a/src/v8/test/fuzzer/wasm-async.cc
+++ b/src/v8/test/fuzzer/wasm-async.cc
@@ -94,7 +94,7 @@
   Local<Promise> promise = resolver->GetPromise();
 
   AsyncCompile(i_isolate, Utils::OpenHandle(*promise),
-               ModuleWireBytes(data, data + size));
+               ModuleWireBytes(data, data + size), false);
 
   ASSIGN(Function, instantiate_impl,
          Function::New(support->GetContext(), &InstantiateCallback,
diff --git a/src/v8/test/fuzzer/wasm-compile.cc b/src/v8/test/fuzzer/wasm-compile.cc
index 5b59a63..4192a93 100644
--- a/src/v8/test/fuzzer/wasm-compile.cc
+++ b/src/v8/test/fuzzer/wasm-compile.cc
@@ -30,6 +30,8 @@
 
 namespace {
 
+constexpr int kMaxFunctions = 4;
+
 class DataRange {
   const uint8_t* data_;
   size_t size_;
@@ -37,254 +39,583 @@
  public:
   DataRange(const uint8_t* data, size_t size) : data_(data), size_(size) {}
 
-  size_t size() const { return size_; }
-
-  std::pair<DataRange, DataRange> split(uint32_t index) const {
-    return std::make_pair(DataRange(data_, index),
-                          DataRange(data_ + index, size() - index));
+  // Don't accidentally pass DataRange by value. This will reuse bytes and might
+  // lead to OOM because the end might not be reached.
+  // Define move constructor and move assignment, disallow copy constructor and
+  // copy assignment (below).
+  DataRange(DataRange&& other) : DataRange(other.data_, other.size_) {
+    other.data_ = nullptr;
+    other.size_ = 0;
+  }
+  DataRange& operator=(DataRange&& other) {
+    data_ = other.data_;
+    size_ = other.size_;
+    other.data_ = nullptr;
+    other.size_ = 0;
+    return *this;
   }
 
-  std::pair<DataRange, DataRange> split() {
-    uint16_t index = get<uint16_t>();
-    if (size() > 0) {
-      index = index % size();
-    } else {
-      index = 0;
-    }
-    return split(index);
+  size_t size() const { return size_; }
+
+  DataRange split() {
+    uint16_t num_bytes = get<uint16_t>() % std::max(size_t{1}, size_);
+    DataRange split(data_, num_bytes);
+    data_ += num_bytes;
+    size_ -= num_bytes;
+    return split;
   }
 
   template <typename T>
   T get() {
-    if (size() == 0) {
-      return T();
-    } else {
-      // We want to support the case where we have less than sizeof(T) bytes
-      // remaining in the slice. For example, if we emit an i32 constant, it's
-      // okay if we don't have a full four bytes available, we'll just use what
-      // we have. We aren't concerned about endianness because we are generating
-      // arbitrary expressions.
-      const size_t num_bytes = std::min(sizeof(T), size());
-      T result = T();
-      memcpy(&result, data_, num_bytes);
-      data_ += num_bytes;
-      size_ -= num_bytes;
-      return result;
-    }
+    // We want to support the case where we have less than sizeof(T) bytes
+    // remaining in the slice. For example, if we emit an i32 constant, it's
+    // okay if we don't have a full four bytes available, we'll just use what
+    // we have. We aren't concerned about endianness because we are generating
+    // arbitrary expressions.
+    const size_t num_bytes = std::min(sizeof(T), size_);
+    T result = T();
+    memcpy(&result, data_, num_bytes);
+    data_ += num_bytes;
+    size_ -= num_bytes;
+    return result;
   }
+
+  DISALLOW_COPY_AND_ASSIGN(DataRange);
 };
 
+ValueType GetValueType(DataRange& data) {
+  switch (data.get<uint8_t>() % 4) {
+    case 0:
+      return kWasmI32;
+    case 1:
+      return kWasmI64;
+    case 2:
+      return kWasmF32;
+    case 3:
+      return kWasmF64;
+  }
+  UNREACHABLE();
+}
+
 class WasmGenerator {
   template <WasmOpcode Op, ValueType... Args>
-  std::function<void(DataRange)> op() {
-    return [this](DataRange data) {
-      Generate<Args...>(data);
-      builder_->Emit(Op);
-    };
+  void op(DataRange& data) {
+    Generate<Args...>(data);
+    builder_->Emit(Op);
+  }
+
+  class BlockScope {
+   public:
+    BlockScope(WasmGenerator* gen, WasmOpcode block_type, ValueType result_type,
+               ValueType br_type)
+        : gen_(gen) {
+      gen->blocks_.push_back(br_type);
+      gen->builder_->EmitWithU8(block_type,
+                                WasmOpcodes::ValueTypeCodeFor(result_type));
+    }
+
+    ~BlockScope() {
+      gen_->builder_->Emit(kExprEnd);
+      gen_->blocks_.pop_back();
+    }
+
+   private:
+    WasmGenerator* const gen_;
+  };
+
+  template <ValueType T>
+  void block(DataRange& data) {
+    BlockScope block_scope(this, kExprBlock, T, T);
+    Generate<T>(data);
   }
 
   template <ValueType T>
-  std::function<void(DataRange)> block() {
-    return [this](DataRange data) {
-      blocks_.push_back(T);
-      builder_->EmitWithU8(
-          kExprBlock, static_cast<uint8_t>(WasmOpcodes::ValueTypeCodeFor(T)));
-      Generate<T>(data);
-      builder_->Emit(kExprEnd);
-      blocks_.pop_back();
-    };
+  void loop(DataRange& data) {
+    // When breaking to a loop header, don't provide any input value (hence
+    // kWasmStmt).
+    BlockScope block_scope(this, kExprLoop, T, kWasmStmt);
+    Generate<T>(data);
   }
 
-  template <ValueType T>
-  std::function<void(DataRange)> block_br() {
-    return [this](DataRange data) {
-      blocks_.push_back(T);
-      builder_->EmitWithU8(
-          kExprBlock, static_cast<uint8_t>(WasmOpcodes::ValueTypeCodeFor(T)));
+  void br(DataRange& data) {
+    // There is always at least the block representing the function body.
+    DCHECK(!blocks_.empty());
+    const uint32_t target_block = data.get<uint32_t>() % blocks_.size();
+    const ValueType break_type = blocks_[target_block];
 
-      const uint32_t target_block = data.get<uint32_t>() % blocks_.size();
-      const ValueType break_type = blocks_[target_block];
-
-      Generate(break_type, data);
-      builder_->EmitWithI32V(kExprBr, target_block);
-      builder_->Emit(kExprEnd);
-      blocks_.pop_back();
-    };
+    Generate(break_type, data);
+    builder_->EmitWithI32V(
+        kExprBr, static_cast<uint32_t>(blocks_.size()) - 1 - target_block);
   }
 
+  // TODO(eholk): make this function constexpr once gcc supports it
+  static uint8_t max_alignment(WasmOpcode memop) {
+    switch (memop) {
+      case kExprI64LoadMem:
+      case kExprF64LoadMem:
+      case kExprI64StoreMem:
+      case kExprF64StoreMem:
+        return 3;
+      case kExprI32LoadMem:
+      case kExprI64LoadMem32S:
+      case kExprI64LoadMem32U:
+      case kExprF32LoadMem:
+      case kExprI32StoreMem:
+      case kExprI64StoreMem32:
+      case kExprF32StoreMem:
+        return 2;
+      case kExprI32LoadMem16S:
+      case kExprI32LoadMem16U:
+      case kExprI64LoadMem16S:
+      case kExprI64LoadMem16U:
+      case kExprI32StoreMem16:
+      case kExprI64StoreMem16:
+        return 1;
+      case kExprI32LoadMem8S:
+      case kExprI32LoadMem8U:
+      case kExprI64LoadMem8S:
+      case kExprI64LoadMem8U:
+      case kExprI32StoreMem8:
+      case kExprI64StoreMem8:
+        return 0;
+      default:
+        return 0;
+    }
+  }
+
+  template <WasmOpcode memory_op, ValueType... arg_types>
+  void memop(DataRange& data) {
+    const uint8_t align = data.get<uint8_t>() % (max_alignment(memory_op) + 1);
+    const uint32_t offset = data.get<uint32_t>();
+
+    // Generate the index and the arguments, if any.
+    Generate<kWasmI32, arg_types...>(data);
+
+    builder_->Emit(memory_op);
+    builder_->EmitU32V(align);
+    builder_->EmitU32V(offset);
+  }
+
+  void drop(DataRange& data) {
+    Generate(GetValueType(data), data);
+    builder_->Emit(kExprDrop);
+  }
+
+  template <ValueType wanted_type>
+  void call(DataRange& data) {
+    call(data, wanted_type);
+  }
+
+  void Convert(ValueType src, ValueType dst) {
+    auto idx = [](ValueType t) -> int {
+      switch (t) {
+        case kWasmI32:
+          return 0;
+        case kWasmI64:
+          return 1;
+        case kWasmF32:
+          return 2;
+        case kWasmF64:
+          return 3;
+        default:
+          UNREACHABLE();
+      }
+    };
+    static constexpr WasmOpcode kConvertOpcodes[] = {
+        // {i32, i64, f32, f64} -> i32
+        kExprNop, kExprI32ConvertI64, kExprI32SConvertF32, kExprI32SConvertF64,
+        // {i32, i64, f32, f64} -> i64
+        kExprI64SConvertI32, kExprNop, kExprI64SConvertF32, kExprI64SConvertF64,
+        // {i32, i64, f32, f64} -> f32
+        kExprF32SConvertI32, kExprF32SConvertI64, kExprNop, kExprF32ConvertF64,
+        // {i32, i64, f32, f64} -> f64
+        kExprF64SConvertI32, kExprF64SConvertI64, kExprF64ConvertF32, kExprNop};
+    int arr_idx = idx(dst) << 2 | idx(src);
+    builder_->Emit(kConvertOpcodes[arr_idx]);
+  }
+
+  void call(DataRange& data, ValueType wanted_type) {
+    int func_index = data.get<uint8_t>() % functions_.size();
+    FunctionSig* sig = functions_[func_index];
+    // Generate arguments.
+    for (size_t i = 0; i < sig->parameter_count(); ++i) {
+      Generate(sig->GetParam(i), data);
+    }
+    // Emit call.
+    builder_->EmitWithU32V(kExprCallFunction, func_index);
+    // Convert the return value to the wanted type.
+    ValueType return_type =
+        sig->return_count() == 0 ? kWasmStmt : sig->GetReturn(0);
+    if (return_type == kWasmStmt && wanted_type != kWasmStmt) {
+      // The call did not generate a value. Thus just generate it here.
+      Generate(wanted_type, data);
+    } else if (return_type != kWasmStmt && wanted_type == kWasmStmt) {
+      // The call did generate a value, but we did not want one.
+      builder_->Emit(kExprDrop);
+    } else if (return_type != wanted_type) {
+      // If the returned type does not match the wanted type, convert it.
+      Convert(return_type, wanted_type);
+    }
+  }
+
+  struct Local {
+    uint32_t index;
+    ValueType type = kWasmStmt;
+    Local() = default;
+    Local(uint32_t index, ValueType type) : index(index), type(type) {}
+    bool is_valid() const { return type != kWasmStmt; }
+  };
+
+  Local GetRandomLocal(DataRange& data) {
+    uint32_t num_params =
+        static_cast<uint32_t>(builder_->signature()->parameter_count());
+    uint32_t num_locals = static_cast<uint32_t>(locals_.size());
+    if (num_params + num_locals == 0) return {};
+    uint32_t index = data.get<uint8_t>() % (num_params + num_locals);
+    ValueType type = index < num_params ? builder_->signature()->GetParam(index)
+                                        : locals_[index - num_params];
+    return {index, type};
+  }
+
+  template <ValueType wanted_type>
+  void local_op(DataRange& data, WasmOpcode opcode) {
+    Local local = GetRandomLocal(data);
+    // If there are no locals and no parameters, just generate any value (if a
+    // value is needed), or do nothing.
+    if (!local.is_valid()) {
+      if (wanted_type == kWasmStmt) return;
+      return Generate<wanted_type>(data);
+    }
+
+    if (opcode != kExprGetLocal) Generate(local.type, data);
+    builder_->EmitWithU32V(opcode, local.index);
+    if (wanted_type != kWasmStmt && local.type != wanted_type) {
+      Convert(local.type, wanted_type);
+    }
+  }
+
+  template <ValueType wanted_type>
+  void get_local(DataRange& data) {
+    local_op<wanted_type>(data, kExprGetLocal);
+  }
+
+  void set_local(DataRange& data) { local_op<kWasmStmt>(data, kExprSetLocal); }
+
+  template <ValueType wanted_type>
+  void tee_local(DataRange& data) {
+    local_op<wanted_type>(data, kExprTeeLocal);
+  }
+
+  template <ValueType T1, ValueType T2>
+  void sequence(DataRange& data) {
+    Generate<T1, T2>(data);
+  }
+
+  void current_memory(DataRange& data) {
+    builder_->EmitWithU8(kExprMemorySize, 0);
+  }
+
+  void grow_memory(DataRange& data);
+
+  using generate_fn = void (WasmGenerator::*const)(DataRange&);
+
+  template <size_t N>
+  void GenerateOneOf(generate_fn (&alternates)[N], DataRange& data) {
+    static_assert(N < std::numeric_limits<uint8_t>::max(),
+                  "Too many alternates. Replace with a bigger type if needed.");
+    const auto which = data.get<uint8_t>();
+
+    generate_fn alternate = alternates[which % N];
+    (this->*alternate)(data);
+  }
+
+  struct GeneratorRecursionScope {
+    explicit GeneratorRecursionScope(WasmGenerator* gen) : gen(gen) {
+      ++gen->recursion_depth;
+      DCHECK_LE(gen->recursion_depth, kMaxRecursionDepth);
+    }
+    ~GeneratorRecursionScope() {
+      DCHECK_GT(gen->recursion_depth, 0);
+      --gen->recursion_depth;
+    }
+    WasmGenerator* gen;
+  };
+
  public:
-  explicit WasmGenerator(WasmFunctionBuilder* fn) : builder_(fn) {}
+  WasmGenerator(WasmFunctionBuilder* fn,
+                const std::vector<FunctionSig*>& functions, DataRange& data)
+      : builder_(fn), functions_(functions) {
+    FunctionSig* sig = fn->signature();
+    DCHECK_GE(1, sig->return_count());
+    blocks_.push_back(sig->return_count() == 0 ? kWasmStmt : sig->GetReturn(0));
 
-  void Generate(ValueType type, DataRange data);
+    constexpr uint32_t kMaxLocals = 32;
+    locals_.resize(data.get<uint8_t>() % kMaxLocals);
+    for (ValueType& local : locals_) {
+      local = GetValueType(data);
+      fn->AddLocal(local);
+    }
+  }
+
+  void Generate(ValueType type, DataRange& data);
 
   template <ValueType T>
-  void Generate(DataRange data);
+  void Generate(DataRange& data);
 
   template <ValueType T1, ValueType T2, ValueType... Ts>
-  void Generate(DataRange data) {
-    const auto parts = data.split();
-    Generate<T1>(parts.first);
-    Generate<T2, Ts...>(parts.second);
+  void Generate(DataRange& data) {
+    // TODO(clemensh): Implement a more even split.
+    auto first_data = data.split();
+    Generate<T1>(first_data);
+    Generate<T2, Ts...>(data);
   }
 
  private:
   WasmFunctionBuilder* builder_;
   std::vector<ValueType> blocks_;
+  const std::vector<FunctionSig*>& functions_;
+  std::vector<ValueType> locals_;
+  uint32_t recursion_depth = 0;
+
+  static constexpr uint32_t kMaxRecursionDepth = 64;
+
+  bool recursion_limit_reached() {
+    return recursion_depth >= kMaxRecursionDepth;
+  }
 };
 
 template <>
-void WasmGenerator::Generate<kWasmI32>(DataRange data) {
-  if (data.size() <= sizeof(uint32_t)) {
+void WasmGenerator::Generate<kWasmStmt>(DataRange& data) {
+  GeneratorRecursionScope rec_scope(this);
+  if (recursion_limit_reached() || data.size() == 0) return;
+
+  constexpr generate_fn alternates[] = {
+      &WasmGenerator::block<kWasmStmt>,
+      &WasmGenerator::loop<kWasmStmt>,
+      &WasmGenerator::br,
+
+      &WasmGenerator::memop<kExprI32StoreMem, kWasmI32>,
+      &WasmGenerator::memop<kExprI32StoreMem8, kWasmI32>,
+      &WasmGenerator::memop<kExprI32StoreMem16, kWasmI32>,
+      &WasmGenerator::memop<kExprI64StoreMem, kWasmI64>,
+      &WasmGenerator::memop<kExprI64StoreMem8, kWasmI64>,
+      &WasmGenerator::memop<kExprI64StoreMem16, kWasmI64>,
+      &WasmGenerator::memop<kExprI64StoreMem32, kWasmI64>,
+      &WasmGenerator::memop<kExprF32StoreMem, kWasmF32>,
+      &WasmGenerator::memop<kExprF64StoreMem, kWasmF64>,
+
+      &WasmGenerator::drop,
+
+      &WasmGenerator::call<kWasmStmt>,
+
+      &WasmGenerator::set_local};
+
+  GenerateOneOf(alternates, data);
+}
+
+template <>
+void WasmGenerator::Generate<kWasmI32>(DataRange& data) {
+  GeneratorRecursionScope rec_scope(this);
+  if (recursion_limit_reached() || data.size() <= sizeof(uint32_t)) {
     builder_->EmitI32Const(data.get<uint32_t>());
-  } else {
-    const std::function<void(DataRange)> alternates[] = {
-        op<kExprI32Eqz, kWasmI32>(),  //
-        op<kExprI32Eq, kWasmI32, kWasmI32>(),
-        op<kExprI32Ne, kWasmI32, kWasmI32>(),
-        op<kExprI32LtS, kWasmI32, kWasmI32>(),
-        op<kExprI32LtU, kWasmI32, kWasmI32>(),
-        op<kExprI32GeS, kWasmI32, kWasmI32>(),
-        op<kExprI32GeU, kWasmI32, kWasmI32>(),
-
-        op<kExprI64Eqz, kWasmI64>(),  //
-        op<kExprI64Eq, kWasmI64, kWasmI64>(),
-        op<kExprI64Ne, kWasmI64, kWasmI64>(),
-        op<kExprI64LtS, kWasmI64, kWasmI64>(),
-        op<kExprI64LtU, kWasmI64, kWasmI64>(),
-        op<kExprI64GeS, kWasmI64, kWasmI64>(),
-        op<kExprI64GeU, kWasmI64, kWasmI64>(),
-
-        op<kExprF32Eq, kWasmF32, kWasmF32>(),
-        op<kExprF32Ne, kWasmF32, kWasmF32>(),
-        op<kExprF32Lt, kWasmF32, kWasmF32>(),
-        op<kExprF32Ge, kWasmF32, kWasmF32>(),
-
-        op<kExprF64Eq, kWasmF64, kWasmF64>(),
-        op<kExprF64Ne, kWasmF64, kWasmF64>(),
-        op<kExprF64Lt, kWasmF64, kWasmF64>(),
-        op<kExprF64Ge, kWasmF64, kWasmF64>(),
-
-        op<kExprI32Add, kWasmI32, kWasmI32>(),
-        op<kExprI32Sub, kWasmI32, kWasmI32>(),
-        op<kExprI32Mul, kWasmI32, kWasmI32>(),
-
-        op<kExprI32DivS, kWasmI32, kWasmI32>(),
-        op<kExprI32DivU, kWasmI32, kWasmI32>(),
-        op<kExprI32RemS, kWasmI32, kWasmI32>(),
-        op<kExprI32RemU, kWasmI32, kWasmI32>(),
-
-        op<kExprI32And, kWasmI32, kWasmI32>(),
-        op<kExprI32Ior, kWasmI32, kWasmI32>(),
-        op<kExprI32Xor, kWasmI32, kWasmI32>(),
-        op<kExprI32Shl, kWasmI32, kWasmI32>(),
-        op<kExprI32ShrU, kWasmI32, kWasmI32>(),
-        op<kExprI32ShrS, kWasmI32, kWasmI32>(),
-        op<kExprI32Ror, kWasmI32, kWasmI32>(),
-        op<kExprI32Rol, kWasmI32, kWasmI32>(),
-
-        op<kExprI32Clz, kWasmI32>(),  //
-        op<kExprI32Ctz, kWasmI32>(),  //
-        op<kExprI32Popcnt, kWasmI32>(),
-
-        op<kExprI32ConvertI64, kWasmI64>(),  //
-        op<kExprI32SConvertF32, kWasmF32>(),
-        op<kExprI32UConvertF32, kWasmF32>(),
-        op<kExprI32SConvertF64, kWasmF64>(),
-        op<kExprI32UConvertF64, kWasmF64>(),
-        op<kExprI32ReinterpretF32, kWasmF32>(),
-
-        block<kWasmI32>(),
-        block_br<kWasmI32>()};
-
-    static_assert(arraysize(alternates) < std::numeric_limits<uint8_t>::max(),
-                  "Too many alternates. Replace with a bigger type if needed.");
-    const auto which = data.get<uint8_t>();
-
-    alternates[which % arraysize(alternates)](data);
+    return;
   }
+
+  constexpr generate_fn alternates[] = {
+      &WasmGenerator::sequence<kWasmStmt, kWasmI32>,
+
+      &WasmGenerator::op<kExprI32Eqz, kWasmI32>,
+      &WasmGenerator::op<kExprI32Eq, kWasmI32, kWasmI32>,
+      &WasmGenerator::op<kExprI32Ne, kWasmI32, kWasmI32>,
+      &WasmGenerator::op<kExprI32LtS, kWasmI32, kWasmI32>,
+      &WasmGenerator::op<kExprI32LtU, kWasmI32, kWasmI32>,
+      &WasmGenerator::op<kExprI32GeS, kWasmI32, kWasmI32>,
+      &WasmGenerator::op<kExprI32GeU, kWasmI32, kWasmI32>,
+
+      &WasmGenerator::op<kExprI64Eqz, kWasmI64>,
+      &WasmGenerator::op<kExprI64Eq, kWasmI64, kWasmI64>,
+      &WasmGenerator::op<kExprI64Ne, kWasmI64, kWasmI64>,
+      &WasmGenerator::op<kExprI64LtS, kWasmI64, kWasmI64>,
+      &WasmGenerator::op<kExprI64LtU, kWasmI64, kWasmI64>,
+      &WasmGenerator::op<kExprI64GeS, kWasmI64, kWasmI64>,
+      &WasmGenerator::op<kExprI64GeU, kWasmI64, kWasmI64>,
+
+      &WasmGenerator::op<kExprF32Eq, kWasmF32, kWasmF32>,
+      &WasmGenerator::op<kExprF32Ne, kWasmF32, kWasmF32>,
+      &WasmGenerator::op<kExprF32Lt, kWasmF32, kWasmF32>,
+      &WasmGenerator::op<kExprF32Ge, kWasmF32, kWasmF32>,
+
+      &WasmGenerator::op<kExprF64Eq, kWasmF64, kWasmF64>,
+      &WasmGenerator::op<kExprF64Ne, kWasmF64, kWasmF64>,
+      &WasmGenerator::op<kExprF64Lt, kWasmF64, kWasmF64>,
+      &WasmGenerator::op<kExprF64Ge, kWasmF64, kWasmF64>,
+
+      &WasmGenerator::op<kExprI32Add, kWasmI32, kWasmI32>,
+      &WasmGenerator::op<kExprI32Sub, kWasmI32, kWasmI32>,
+      &WasmGenerator::op<kExprI32Mul, kWasmI32, kWasmI32>,
+
+      &WasmGenerator::op<kExprI32DivS, kWasmI32, kWasmI32>,
+      &WasmGenerator::op<kExprI32DivU, kWasmI32, kWasmI32>,
+      &WasmGenerator::op<kExprI32RemS, kWasmI32, kWasmI32>,
+      &WasmGenerator::op<kExprI32RemU, kWasmI32, kWasmI32>,
+
+      &WasmGenerator::op<kExprI32And, kWasmI32, kWasmI32>,
+      &WasmGenerator::op<kExprI32Ior, kWasmI32, kWasmI32>,
+      &WasmGenerator::op<kExprI32Xor, kWasmI32, kWasmI32>,
+      &WasmGenerator::op<kExprI32Shl, kWasmI32, kWasmI32>,
+      &WasmGenerator::op<kExprI32ShrU, kWasmI32, kWasmI32>,
+      &WasmGenerator::op<kExprI32ShrS, kWasmI32, kWasmI32>,
+      &WasmGenerator::op<kExprI32Ror, kWasmI32, kWasmI32>,
+      &WasmGenerator::op<kExprI32Rol, kWasmI32, kWasmI32>,
+
+      &WasmGenerator::op<kExprI32Clz, kWasmI32>,
+      &WasmGenerator::op<kExprI32Ctz, kWasmI32>,
+      &WasmGenerator::op<kExprI32Popcnt, kWasmI32>,
+
+      &WasmGenerator::op<kExprI32ConvertI64, kWasmI64>,
+      &WasmGenerator::op<kExprI32SConvertF32, kWasmF32>,
+      &WasmGenerator::op<kExprI32UConvertF32, kWasmF32>,
+      &WasmGenerator::op<kExprI32SConvertF64, kWasmF64>,
+      &WasmGenerator::op<kExprI32UConvertF64, kWasmF64>,
+      &WasmGenerator::op<kExprI32ReinterpretF32, kWasmF32>,
+
+      &WasmGenerator::block<kWasmI32>,
+      &WasmGenerator::loop<kWasmI32>,
+
+      &WasmGenerator::memop<kExprI32LoadMem>,
+      &WasmGenerator::memop<kExprI32LoadMem8S>,
+      &WasmGenerator::memop<kExprI32LoadMem8U>,
+      &WasmGenerator::memop<kExprI32LoadMem16S>,
+      &WasmGenerator::memop<kExprI32LoadMem16U>,
+
+      &WasmGenerator::current_memory,
+      &WasmGenerator::grow_memory,
+
+      &WasmGenerator::get_local<kWasmI32>,
+      &WasmGenerator::tee_local<kWasmI32>,
+
+      &WasmGenerator::call<kWasmI32>};
+
+  GenerateOneOf(alternates, data);
 }
 
 template <>
-void WasmGenerator::Generate<kWasmI64>(DataRange data) {
-  if (data.size() <= sizeof(uint64_t)) {
+void WasmGenerator::Generate<kWasmI64>(DataRange& data) {
+  GeneratorRecursionScope rec_scope(this);
+  if (recursion_limit_reached() || data.size() <= sizeof(uint64_t)) {
     builder_->EmitI64Const(data.get<int64_t>());
-  } else {
-    const std::function<void(DataRange)> alternates[] = {
-        op<kExprI64Add, kWasmI64, kWasmI64>(),
-        op<kExprI64Sub, kWasmI64, kWasmI64>(),
-        op<kExprI64Mul, kWasmI64, kWasmI64>(),
-
-        op<kExprI64DivS, kWasmI64, kWasmI64>(),
-        op<kExprI64DivU, kWasmI64, kWasmI64>(),
-        op<kExprI64RemS, kWasmI64, kWasmI64>(),
-        op<kExprI64RemU, kWasmI64, kWasmI64>(),
-
-        op<kExprI64And, kWasmI64, kWasmI64>(),
-        op<kExprI64Ior, kWasmI64, kWasmI64>(),
-        op<kExprI64Xor, kWasmI64, kWasmI64>(),
-        op<kExprI64Shl, kWasmI64, kWasmI64>(),
-        op<kExprI64ShrU, kWasmI64, kWasmI64>(),
-        op<kExprI64ShrS, kWasmI64, kWasmI64>(),
-        op<kExprI64Ror, kWasmI64, kWasmI64>(),
-        op<kExprI64Rol, kWasmI64, kWasmI64>(),
-
-        op<kExprI64Clz, kWasmI64>(),
-        op<kExprI64Ctz, kWasmI64>(),
-        op<kExprI64Popcnt, kWasmI64>(),
-
-        block<kWasmI64>(),
-        block_br<kWasmI64>()};
-
-    static_assert(arraysize(alternates) < std::numeric_limits<uint8_t>::max(),
-                  "Too many alternates. Replace with a bigger type if needed.");
-    const auto which = data.get<uint8_t>();
-
-    alternates[which % arraysize(alternates)](data);
+    return;
   }
+
+  constexpr generate_fn alternates[] = {
+      &WasmGenerator::sequence<kWasmStmt, kWasmI64>,
+
+      &WasmGenerator::op<kExprI64Add, kWasmI64, kWasmI64>,
+      &WasmGenerator::op<kExprI64Sub, kWasmI64, kWasmI64>,
+      &WasmGenerator::op<kExprI64Mul, kWasmI64, kWasmI64>,
+
+      &WasmGenerator::op<kExprI64DivS, kWasmI64, kWasmI64>,
+      &WasmGenerator::op<kExprI64DivU, kWasmI64, kWasmI64>,
+      &WasmGenerator::op<kExprI64RemS, kWasmI64, kWasmI64>,
+      &WasmGenerator::op<kExprI64RemU, kWasmI64, kWasmI64>,
+
+      &WasmGenerator::op<kExprI64And, kWasmI64, kWasmI64>,
+      &WasmGenerator::op<kExprI64Ior, kWasmI64, kWasmI64>,
+      &WasmGenerator::op<kExprI64Xor, kWasmI64, kWasmI64>,
+      &WasmGenerator::op<kExprI64Shl, kWasmI64, kWasmI64>,
+      &WasmGenerator::op<kExprI64ShrU, kWasmI64, kWasmI64>,
+      &WasmGenerator::op<kExprI64ShrS, kWasmI64, kWasmI64>,
+      &WasmGenerator::op<kExprI64Ror, kWasmI64, kWasmI64>,
+      &WasmGenerator::op<kExprI64Rol, kWasmI64, kWasmI64>,
+
+      &WasmGenerator::op<kExprI64Clz, kWasmI64>,
+      &WasmGenerator::op<kExprI64Ctz, kWasmI64>,
+      &WasmGenerator::op<kExprI64Popcnt, kWasmI64>,
+
+      &WasmGenerator::block<kWasmI64>,
+      &WasmGenerator::loop<kWasmI64>,
+
+      &WasmGenerator::memop<kExprI64LoadMem>,
+      &WasmGenerator::memop<kExprI64LoadMem8S>,
+      &WasmGenerator::memop<kExprI64LoadMem8U>,
+      &WasmGenerator::memop<kExprI64LoadMem16S>,
+      &WasmGenerator::memop<kExprI64LoadMem16U>,
+      &WasmGenerator::memop<kExprI64LoadMem32S>,
+      &WasmGenerator::memop<kExprI64LoadMem32U>,
+
+      &WasmGenerator::get_local<kWasmI64>,
+      &WasmGenerator::tee_local<kWasmI64>,
+
+      &WasmGenerator::call<kWasmI64>};
+
+  GenerateOneOf(alternates, data);
 }
 
 template <>
-void WasmGenerator::Generate<kWasmF32>(DataRange data) {
-  if (data.size() <= sizeof(float)) {
+void WasmGenerator::Generate<kWasmF32>(DataRange& data) {
+  GeneratorRecursionScope rec_scope(this);
+  if (recursion_limit_reached() || data.size() <= sizeof(float)) {
     builder_->EmitF32Const(data.get<float>());
-  } else {
-    const std::function<void(DataRange)> alternates[] = {
-        op<kExprF32Add, kWasmF32, kWasmF32>(),
-        op<kExprF32Sub, kWasmF32, kWasmF32>(),
-        op<kExprF32Mul, kWasmF32, kWasmF32>(),
-
-        block<kWasmF32>(), block_br<kWasmF32>()};
-
-    static_assert(arraysize(alternates) < std::numeric_limits<uint8_t>::max(),
-                  "Too many alternates. Replace with a bigger type if needed.");
-    const auto which = data.get<uint8_t>();
-
-    alternates[which % arraysize(alternates)](data);
+    return;
   }
+
+  constexpr generate_fn alternates[] = {
+      &WasmGenerator::sequence<kWasmStmt, kWasmF32>,
+
+      &WasmGenerator::op<kExprF32Add, kWasmF32, kWasmF32>,
+      &WasmGenerator::op<kExprF32Sub, kWasmF32, kWasmF32>,
+      &WasmGenerator::op<kExprF32Mul, kWasmF32, kWasmF32>,
+
+      &WasmGenerator::block<kWasmF32>,
+      &WasmGenerator::loop<kWasmF32>,
+
+      &WasmGenerator::memop<kExprF32LoadMem>,
+
+      &WasmGenerator::get_local<kWasmF32>,
+      &WasmGenerator::tee_local<kWasmF32>,
+
+      &WasmGenerator::call<kWasmF32>};
+
+  GenerateOneOf(alternates, data);
 }
 
 template <>
-void WasmGenerator::Generate<kWasmF64>(DataRange data) {
-  if (data.size() <= sizeof(double)) {
+void WasmGenerator::Generate<kWasmF64>(DataRange& data) {
+  GeneratorRecursionScope rec_scope(this);
+  if (recursion_limit_reached() || data.size() <= sizeof(double)) {
     builder_->EmitF64Const(data.get<double>());
-  } else {
-    const std::function<void(DataRange)> alternates[] = {
-        op<kExprF64Add, kWasmF64, kWasmF64>(),
-        op<kExprF64Sub, kWasmF64, kWasmF64>(),
-        op<kExprF64Mul, kWasmF64, kWasmF64>(),
-
-        block<kWasmF64>(), block_br<kWasmF64>()};
-
-    static_assert(arraysize(alternates) < std::numeric_limits<uint8_t>::max(),
-                  "Too many alternates. Replace with a bigger type if needed.");
-    const auto which = data.get<uint8_t>();
-
-    alternates[which % arraysize(alternates)](data);
+    return;
   }
+
+  constexpr generate_fn alternates[] = {
+      &WasmGenerator::sequence<kWasmStmt, kWasmF64>,
+
+      &WasmGenerator::op<kExprF64Add, kWasmF64, kWasmF64>,
+      &WasmGenerator::op<kExprF64Sub, kWasmF64, kWasmF64>,
+      &WasmGenerator::op<kExprF64Mul, kWasmF64, kWasmF64>,
+
+      &WasmGenerator::block<kWasmF64>,
+      &WasmGenerator::loop<kWasmF64>,
+
+      &WasmGenerator::memop<kExprF64LoadMem>,
+
+      &WasmGenerator::get_local<kWasmF64>,
+      &WasmGenerator::tee_local<kWasmF64>,
+
+      &WasmGenerator::call<kWasmF64>};
+
+  GenerateOneOf(alternates, data);
 }
 
-void WasmGenerator::Generate(ValueType type, DataRange data) {
+void WasmGenerator::grow_memory(DataRange& data) {
+  Generate<kWasmI32>(data);
+  builder_->EmitWithU8(kExprGrowMemory, 0);
+}
+
+void WasmGenerator::Generate(ValueType type, DataRange& data) {
   switch (type) {
+    case kWasmStmt:
+      return Generate<kWasmStmt>(data);
     case kWasmI32:
       return Generate<kWasmI32>(data);
     case kWasmI64:
@@ -297,6 +628,19 @@
       UNREACHABLE();
   }
 }
+
+FunctionSig* GenerateSig(Zone* zone, DataRange& data) {
+  // Generate enough parameters to spill some to the stack.
+  constexpr int kMaxParameters = 15;
+  int num_params = int{data.get<uint8_t>()} % (kMaxParameters + 1);
+  bool has_return = data.get<bool>();
+
+  FunctionSig::Builder builder(zone, has_return ? 1 : 0, num_params);
+  if (has_return) builder.AddReturn(GetValueType(data));
+  for (int i = 0; i < num_params; ++i) builder.AddParam(GetValueType(data));
+  return builder.Build();
+}
+
 }  // namespace
 
 class WasmCompileFuzzer : public WasmExecutionFuzzer {
@@ -309,14 +653,32 @@
 
     WasmModuleBuilder builder(zone);
 
-    WasmFunctionBuilder* f = builder.AddFunction(sigs.i_iii());
+    DataRange range(data, static_cast<uint32_t>(size));
+    std::vector<FunctionSig*> function_signatures;
+    function_signatures.push_back(sigs.i_iii());
 
-    WasmGenerator gen(f);
-    gen.Generate<kWasmI32>(DataRange(data, static_cast<uint32_t>(size)));
+    static_assert(kMaxFunctions >= 1, "need min. 1 function");
+    int num_functions = 1 + (range.get<uint8_t>() % kMaxFunctions);
 
-    uint8_t end_opcode = kExprEnd;
-    f->EmitCode(&end_opcode, 1);
-    builder.AddExport(CStrVector("main"), f);
+    for (int i = 1; i < num_functions; ++i) {
+      function_signatures.push_back(GenerateSig(zone, range));
+    }
+
+    for (int i = 0; i < num_functions; ++i) {
+      DataRange function_range =
+          i == num_functions - 1 ? std::move(range) : range.split();
+
+      FunctionSig* sig = function_signatures[i];
+      WasmFunctionBuilder* f = builder.AddFunction(sig);
+
+      WasmGenerator gen(f, function_signatures, function_range);
+      ValueType return_type =
+          sig->return_count() == 0 ? kWasmStmt : sig->GetReturn(0);
+      gen.Generate(return_type, function_range);
+
+      f->Emit(kExprEnd);
+      if (i == 0) builder.AddExport(CStrVector("main"), f);
+    }
 
     builder.SetMaxMemorySize(32);
     builder.WriteTo(buffer);
@@ -326,14 +688,15 @@
         new WasmValue[3]{WasmValue(1), WasmValue(2), WasmValue(3)});
 
     compiler_args.reset(new Handle<Object>[3]{
-        handle(Smi::FromInt(1), isolate), handle(Smi::FromInt(1), isolate),
-        handle(Smi::FromInt(1), isolate)});
+        handle(Smi::FromInt(1), isolate), handle(Smi::FromInt(2), isolate),
+        handle(Smi::FromInt(3), isolate)});
     return true;
   }
 };
 
 extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
-  return WasmCompileFuzzer().FuzzWasmModule(data, size);
+  constexpr bool require_valid = true;
+  return WasmCompileFuzzer().FuzzWasmModule(data, size, require_valid);
 }
 
 }  // namespace fuzzer
diff --git a/src/v8/test/fuzzer/wasm-fuzzer-common.cc b/src/v8/test/fuzzer/wasm-fuzzer-common.cc
index f02d2b9..46f5133 100644
--- a/src/v8/test/fuzzer/wasm-fuzzer-common.cc
+++ b/src/v8/test/fuzzer/wasm-fuzzer-common.cc
@@ -9,10 +9,12 @@
 #include "src/objects-inl.h"
 #include "src/wasm/module-compiler.h"
 #include "src/wasm/wasm-api.h"
+#include "src/wasm/wasm-engine.h"
 #include "src/wasm/wasm-module-builder.h"
 #include "src/wasm/wasm-module.h"
 #include "src/zone/accounting-allocator.h"
 #include "src/zone/zone.h"
+#include "test/common/wasm/flag-utils.h"
 #include "test/common/wasm/wasm-module-runner.h"
 #include "test/fuzzer/fuzzer-support.h"
 
@@ -21,8 +23,6 @@
 namespace wasm {
 namespace fuzzer {
 
-static constexpr uint32_t kWasmCodeFuzzerHashSeed = 83;
-
 static constexpr const char* kNameString = "name";
 static constexpr size_t kNameStringLength = 4;
 
@@ -32,9 +32,7 @@
   i::Isolate* i_isolate = reinterpret_cast<Isolate*>(isolate);
 
   // Clear any pending exceptions from a prior run.
-  if (i_isolate->has_pending_exception()) {
-    i_isolate->clear_pending_exception();
-  }
+  i_isolate->clear_pending_exception();
 
   v8::Isolate::Scope isolate_scope(isolate);
   v8::HandleScope handle_scope(isolate);
@@ -92,37 +90,129 @@
   testing::RunWasmModuleForTesting(isolate, instance, 0, nullptr);
 }
 
-int WasmExecutionFuzzer::FuzzWasmModule(
-    const uint8_t* data, size_t size) {
-  // Save the flag so that we can change it and restore it later.
-  bool generate_test = FLAG_wasm_code_fuzzer_gen_test;
-  if (generate_test) {
-    OFStream os(stdout);
-
-    os << "// Copyright 2017 the V8 project authors. All rights reserved."
-       << std::endl;
-    os << "// Use of this source code is governed by a BSD-style license that "
-          "can be"
-       << std::endl;
-    os << "// found in the LICENSE file." << std::endl;
-    os << std::endl;
-    os << "load(\"test/mjsunit/wasm/wasm-constants.js\");" << std::endl;
-    os << "load(\"test/mjsunit/wasm/wasm-module-builder.js\");" << std::endl;
-    os << std::endl;
-    os << "(function() {" << std::endl;
-    os << "  var builder = new WasmModuleBuilder();" << std::endl;
-    os << "  builder.addMemory(16, 32, false);" << std::endl;
-    os << "  builder.addFunction(\"test\", kSig_i_iii)" << std::endl;
-    os << "    .addBodyWithEnd([" << std::endl;
+namespace {
+struct PrintSig {
+  const size_t num;
+  const std::function<ValueType(size_t)> getter;
+};
+PrintSig PrintParameters(const FunctionSig* sig) {
+  return {sig->parameter_count(), [=](size_t i) { return sig->GetParam(i); }};
+}
+PrintSig PrintReturns(const FunctionSig* sig) {
+  return {sig->return_count(), [=](size_t i) { return sig->GetReturn(i); }};
+}
+const char* ValueTypeToConstantName(ValueType type) {
+  switch (type) {
+    case kWasmI32:
+      return "kWasmI32";
+    case kWasmI64:
+      return "kWasmI64";
+    case kWasmF32:
+      return "kWasmF32";
+    case kWasmF64:
+      return "kWasmF64";
+    default:
+      UNREACHABLE();
   }
+}
+std::ostream& operator<<(std::ostream& os, const PrintSig& print) {
+  os << "[";
+  for (size_t i = 0; i < print.num; ++i) {
+    os << (i == 0 ? "" : ", ") << ValueTypeToConstantName(print.getter(i));
+  }
+  return os << "]";
+}
+
+void GenerateTestCase(Isolate* isolate, ModuleWireBytes wire_bytes,
+                      bool compiles) {
+  constexpr bool kVerifyFunctions = false;
+  ModuleResult module_res =
+      SyncDecodeWasmModule(isolate, wire_bytes.start(), wire_bytes.end(),
+                           kVerifyFunctions, ModuleOrigin::kWasmOrigin);
+  CHECK(module_res.ok());
+  WasmModule* module = module_res.val.get();
+  CHECK_NOT_NULL(module);
+
+  OFStream os(stdout);
+
+  os << "// Copyright 2018 the V8 project authors. All rights reserved.\n"
+        "// Use of this source code is governed by a BSD-style license that "
+        "can be\n"
+        "// found in the LICENSE file.\n"
+        "\n"
+        "load('test/mjsunit/wasm/wasm-constants.js');\n"
+        "load('test/mjsunit/wasm/wasm-module-builder.js');\n"
+        "\n"
+        "(function() {\n"
+        "  var builder = new WasmModuleBuilder();\n";
+
+  if (module->has_memory) {
+    os << "  builder.addMemory(" << module->initial_pages;
+    if (module->has_maximum_pages) {
+      os << ", " << module->maximum_pages << ");\n";
+    } else {
+      os << ");\n";
+    }
+  }
+
+  Zone tmp_zone(isolate->allocator(), ZONE_NAME);
+
+  for (const WasmFunction& func : module->functions) {
+    Vector<const uint8_t> func_code = wire_bytes.GetFunctionBytes(&func);
+    os << "  // Generate function " << func.func_index + 1 << " of "
+       << module->functions.size() << ".\n";
+    // Generate signature.
+    os << "  sig" << func.func_index << " = makeSig("
+       << PrintParameters(func.sig) << ", " << PrintReturns(func.sig) << ");\n";
+
+    // Add function.
+    os << "  builder.addFunction(undefined, sig" << func.func_index << ")\n";
+
+    // Add locals.
+    BodyLocalDecls decls(&tmp_zone);
+    DecodeLocalDecls(&decls, func_code.start(), func_code.end());
+    if (!decls.type_list.empty()) {
+      os << "    ";
+      for (size_t pos = 0, count = 1, locals = decls.type_list.size();
+           pos < locals; pos += count, count = 1) {
+        ValueType type = decls.type_list[pos];
+        while (pos + count < locals && decls.type_list[pos + count] == type)
+          ++count;
+        os << ".addLocals({" << WasmOpcodes::TypeName(type)
+           << "_count: " << count << "})";
+      }
+      os << "\n";
+    }
+
+    // Add body.
+    os << "    .addBodyWithEnd([\n";
+
+    FunctionBody func_body(func.sig, func.code.offset(), func_code.start(),
+                           func_code.end());
+    PrintRawWasmCode(isolate->allocator(), func_body, module, kOmitLocals);
+    os << "            ])";
+    if (func.func_index == 0) os << "\n            .exportAs('main')";
+    os << ";\n ";
+  }
+
+  if (compiles) {
+    os << "  var module = builder.instantiate();\n"
+          "  module.exports.main(1, 2, 3);\n";
+  } else {
+    os << "  assertThrows(function() { builder.instantiate(); });\n";
+  }
+  os << "})();\n";
+}
+}  // namespace
+
+int WasmExecutionFuzzer::FuzzWasmModule(const uint8_t* data, size_t size,
+                                        bool require_valid) {
   v8_fuzzer::FuzzerSupport* support = v8_fuzzer::FuzzerSupport::Get();
   v8::Isolate* isolate = support->GetIsolate();
   i::Isolate* i_isolate = reinterpret_cast<Isolate*>(isolate);
 
   // Clear any pending exceptions from a prior run.
-  if (i_isolate->has_pending_exception()) {
-    i_isolate->clear_pending_exception();
-  }
+  i_isolate->clear_pending_exception();
 
   v8::Isolate::Scope isolate_scope(isolate);
   v8::HandleScope handle_scope(isolate);
@@ -147,50 +237,39 @@
   ErrorThrower interpreter_thrower(i_isolate, "Interpreter");
   ModuleWireBytes wire_bytes(buffer.begin(), buffer.end());
 
-  MaybeHandle<WasmModuleObject> compiled_module =
-      SyncCompile(i_isolate, &interpreter_thrower, wire_bytes);
-  // Clear the flag so that the WebAssembly code is not printed twice.
-  FLAG_wasm_code_fuzzer_gen_test = false;
+  // Compile with Turbofan here. Liftoff will be tested later.
+  MaybeHandle<WasmModuleObject> compiled_module;
+  {
+    FlagScope<bool> no_liftoff(&FLAG_liftoff, false);
+    compiled_module = SyncCompile(i_isolate, &interpreter_thrower, wire_bytes);
+  }
   bool compiles = !compiled_module.is_null();
 
-  if (generate_test) {
-    OFStream os(stdout);
-    os << "            ])" << std::endl
-       << "            .exportFunc();" << std::endl;
-    if (compiles) {
-      os << "  var module = builder.instantiate();" << std::endl
-         << "  module.exports.test(1, 2, 3);" << std::endl;
-    } else {
-      OFStream os(stdout);
-      os << "  assertThrows(function() { builder.instantiate(); });"
-         << std::endl;
-    }
-    os << "})();" << std::endl;
+  if (FLAG_wasm_fuzzer_gen_test) {
+    GenerateTestCase(i_isolate, wire_bytes, compiles);
   }
 
-  bool validates = SyncValidate(i_isolate, wire_bytes);
+  bool validates =
+      i_isolate->wasm_engine()->SyncValidate(i_isolate, wire_bytes);
 
-  if (compiles != validates) {
-    uint32_t hash = StringHasher::HashSequentialString(
-        data, static_cast<int>(size), kWasmCodeFuzzerHashSeed);
-    V8_Fatal(__FILE__, __LINE__,
-             "compiles != validates (%d vs %d); WasmCodeFuzzerHash=%x",
-             compiles, validates, hash);
-  }
+  CHECK_EQ(compiles, validates);
+  CHECK_IMPLIES(require_valid, validates);
 
   if (!compiles) return 0;
 
-  int32_t result_interpreted;
+  int32_t result_interpreter;
   bool possible_nondeterminism = false;
   {
     MaybeHandle<WasmInstanceObject> interpreter_instance = SyncInstantiate(
         i_isolate, &interpreter_thrower, compiled_module.ToHandleChecked(),
         MaybeHandle<JSReceiver>(), MaybeHandle<JSArrayBuffer>());
 
+    // Ignore instantiation failure.
     if (interpreter_thrower.error()) {
       return 0;
     }
-    result_interpreted = testing::InterpretWasmModule(
+
+    result_interpreter = testing::InterpretWasmModule(
         i_isolate, interpreter_instance.ToHandleChecked(), &interpreter_thrower,
         0, interpreter_args.get(), &possible_nondeterminism);
   }
@@ -201,36 +280,57 @@
     return 0;
   }
 
-  int32_t result_compiled;
+  bool expect_exception =
+      result_interpreter == static_cast<int32_t>(0xDEADBEEF);
+
+  int32_t result_turbofan;
   {
-    ErrorThrower compiler_thrower(i_isolate, "Compiler");
+    ErrorThrower compiler_thrower(i_isolate, "Turbofan");
     MaybeHandle<WasmInstanceObject> compiled_instance = SyncInstantiate(
         i_isolate, &compiler_thrower, compiled_module.ToHandleChecked(),
         MaybeHandle<JSReceiver>(), MaybeHandle<JSArrayBuffer>());
 
     DCHECK(!compiler_thrower.error());
-    result_compiled = testing::CallWasmFunctionForTesting(
+    result_turbofan = testing::CallWasmFunctionForTesting(
         i_isolate, compiled_instance.ToHandleChecked(), &compiler_thrower,
         "main", num_args, compiler_args.get());
   }
 
   // The WebAssembly spec allows the sign bit of NaN to be non-deterministic.
-  // This sign bit may cause result_interpreted to be different than
-  // result_compiled. Therefore we do not check the equality of the results
+  // This sign bit may cause result_interpreter to be different than
+  // result_turbofan. Therefore we do not check the equality of the results
   // if the execution may have produced a NaN at some point.
-  if (possible_nondeterminism) return 0;
+  if (!possible_nondeterminism) {
+    CHECK_EQ(expect_exception, i_isolate->has_pending_exception());
 
-  if (result_interpreted == bit_cast<int32_t>(0xdeadbeef)) {
-    CHECK(i_isolate->has_pending_exception());
-    i_isolate->clear_pending_exception();
-  } else {
-    CHECK(!i_isolate->has_pending_exception());
-    if (result_interpreted != result_compiled) {
-      V8_Fatal(__FILE__, __LINE__, "WasmCodeFuzzerHash=%x",
-               StringHasher::HashSequentialString(data, static_cast<int>(size),
-                                                  kWasmCodeFuzzerHashSeed));
-    }
+    if (!expect_exception) CHECK_EQ(result_interpreter, result_turbofan);
   }
+
+  // Clear any pending exceptions for the next run.
+  i_isolate->clear_pending_exception();
+
+  int32_t result_liftoff;
+  {
+    FlagScope<bool> liftoff(&FLAG_liftoff, true);
+    ErrorThrower compiler_thrower(i_isolate, "Liftoff");
+    // Re-compile with Liftoff.
+    MaybeHandle<WasmInstanceObject> compiled_instance =
+        SyncCompileAndInstantiate(i_isolate, &compiler_thrower, wire_bytes,
+                                  MaybeHandle<JSReceiver>(),
+                                  MaybeHandle<JSArrayBuffer>());
+    DCHECK(!compiler_thrower.error());
+    result_liftoff = testing::CallWasmFunctionForTesting(
+        i_isolate, compiled_instance.ToHandleChecked(), &compiler_thrower,
+        "main", num_args, compiler_args.get());
+  }
+  if (!possible_nondeterminism) {
+    CHECK_EQ(expect_exception, i_isolate->has_pending_exception());
+
+    if (!expect_exception) CHECK_EQ(result_interpreter, result_liftoff);
+  }
+
+  // Cleanup any pending exception.
+  i_isolate->clear_pending_exception();
   return 0;
 }
 
diff --git a/src/v8/test/fuzzer/wasm-fuzzer-common.h b/src/v8/test/fuzzer/wasm-fuzzer-common.h
index 8830d71..ac40a5e 100644
--- a/src/v8/test/fuzzer/wasm-fuzzer-common.h
+++ b/src/v8/test/fuzzer/wasm-fuzzer-common.h
@@ -2,8 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#ifndef WASM_SECTION_FUZZERS_H_
-#define WASM_SECTION_FUZZERS_H_
+#ifndef WASM_FUZZER_COMMON_H_
+#define WASM_FUZZER_COMMON_H_
 
 #include <stddef.h>
 #include <stdint.h>
@@ -29,7 +29,8 @@
 class WasmExecutionFuzzer {
  public:
   virtual ~WasmExecutionFuzzer() {}
-  int FuzzWasmModule(const uint8_t* data, size_t size);
+  int FuzzWasmModule(const uint8_t* data, size_t size,
+                     bool require_valid = false);
 
  protected:
   virtual bool GenerateModule(
@@ -43,4 +44,4 @@
 }  // namespace wasm
 }  // namespace internal
 }  // namespace v8
-#endif  // WASM_SECTION_FUZZERS_H_
+#endif  // WASM_FUZZER_COMMON_H_
diff --git a/src/v8/test/inspector/cpu-profiler/coverage-block-expected.txt b/src/v8/test/inspector/cpu-profiler/coverage-block-expected.txt
index 32281e5..a631e72 100644
--- a/src/v8/test/inspector/cpu-profiler/coverage-block-expected.txt
+++ b/src/v8/test/inspector/cpu-profiler/coverage-block-expected.txt
@@ -289,7 +289,7 @@
                             [1] : {
                                 count : 0
                                 endOffset : 156
-                                startOffset : 145
+                                startOffset : 143
                             }
                             [2] : {
                                 count : 0
diff --git a/src/v8/test/inspector/debugger/async-chains-expected.txt b/src/v8/test/inspector/debugger/async-chains-expected.txt
new file mode 100644
index 0000000..e5a57fd
--- /dev/null
+++ b/src/v8/test/inspector/debugger/async-chains-expected.txt
@@ -0,0 +1,152 @@
+Tests different combinations of async stacks in chains.
+Regular
+userFunction (test.js:1:36)
+-- inner async --
+runWithRegular (utils.js:2:12)
+inner (test.js:2:28)
+runWithNone (utils.js:27:2)
+(anonymous) (test.js:3:10)
+
+Regular - Regular
+userFunction (test.js:1:36)
+-- inner async --
+runWithRegular (utils.js:2:12)
+inner (test.js:2:28)
+-- outer async --
+runWithRegular (utils.js:2:12)
+(anonymous) (test.js:3:10)
+
+Regular - EmptyName
+userFunction (test.js:1:36)
+-- inner async --
+runWithRegular (utils.js:2:12)
+inner (test.js:2:28)
+-- <empty> --
+runWithEmptyName (utils.js:6:12)
+(anonymous) (test.js:3:10)
+
+Regular - EmptyStack
+userFunction (test.js:1:36)
+-- inner async --
+runWithRegular (utils.js:2:12)
+inner (test.js:2:28)
+
+Regular - EmptyNameEmptyStack
+userFunction (test.js:1:36)
+-- inner async --
+runWithRegular (utils.js:2:12)
+inner (test.js:2:28)
+
+Regular - External
+userFunction (test.js:1:36)
+-- inner async --
+runWithRegular (utils.js:2:12)
+inner (test.js:2:28)
+runWithRegular (utils.js:21:4)
+  <external stack>
+
+EmptyName
+userFunction (test.js:1:36)
+-- <empty> --
+runWithEmptyName (utils.js:6:12)
+inner (test.js:2:28)
+runWithNone (utils.js:27:2)
+(anonymous) (test.js:3:10)
+
+EmptyName - Regular
+userFunction (test.js:1:36)
+-- <empty> --
+runWithEmptyName (utils.js:6:12)
+inner (test.js:2:28)
+-- outer async --
+runWithRegular (utils.js:2:12)
+(anonymous) (test.js:3:10)
+
+EmptyName - EmptyName
+userFunction (test.js:1:36)
+-- <empty> --
+runWithEmptyName (utils.js:6:12)
+inner (test.js:2:28)
+-- <empty> --
+runWithEmptyName (utils.js:6:12)
+(anonymous) (test.js:3:10)
+
+EmptyName - EmptyStack
+userFunction (test.js:1:36)
+-- <empty> --
+runWithEmptyName (utils.js:6:12)
+inner (test.js:2:28)
+
+EmptyName - EmptyNameEmptyStack
+userFunction (test.js:1:36)
+-- <empty> --
+runWithEmptyName (utils.js:6:12)
+inner (test.js:2:28)
+
+EmptyName - External
+userFunction (test.js:1:36)
+-- <empty> --
+runWithEmptyName (utils.js:6:12)
+inner (test.js:2:28)
+runWithRegular (utils.js:21:4)
+  <external stack>
+
+EmptyStack
+userFunction (test.js:1:36)
+
+EmptyStack - Regular
+userFunction (test.js:1:36)
+-- inner async --
+-- outer async --
+runWithRegular (utils.js:2:12)
+(anonymous) (test.js:3:10)
+
+EmptyStack - EmptyName
+userFunction (test.js:1:36)
+-- inner async --
+-- <empty> --
+runWithEmptyName (utils.js:6:12)
+(anonymous) (test.js:3:10)
+
+EmptyStack - EmptyStack
+userFunction (test.js:1:36)
+
+EmptyStack - EmptyNameEmptyStack
+userFunction (test.js:1:36)
+
+EmptyStack - External
+userFunction (test.js:1:36)
+-- inner async --
+  <external stack>
+
+EmptyNameEmptyStack
+userFunction (test.js:1:36)
+
+EmptyNameEmptyStack - Regular
+userFunction (test.js:1:36)
+-- outer async --
+runWithRegular (utils.js:2:12)
+(anonymous) (test.js:3:10)
+
+EmptyNameEmptyStack - EmptyName
+userFunction (test.js:1:36)
+-- <empty> --
+runWithEmptyName (utils.js:6:12)
+(anonymous) (test.js:3:10)
+
+EmptyNameEmptyStack - EmptyStack
+userFunction (test.js:1:36)
+
+EmptyNameEmptyStack - EmptyNameEmptyStack
+userFunction (test.js:1:36)
+
+EmptyNameEmptyStack - External
+userFunction (test.js:1:36)
+-- <empty> --
+  <external stack>
+
+External
+userFunction (test.js:1:36)
+runWithRegular (utils.js:21:4)
+  <external stack>
+
diff --git a/src/v8/test/inspector/debugger/async-chains.js b/src/v8/test/inspector/debugger/async-chains.js
new file mode 100644
index 0000000..7660037
--- /dev/null
+++ b/src/v8/test/inspector/debugger/async-chains.js
@@ -0,0 +1,77 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+let {session, contextGroup, Protocol} = InspectorTest.start(
+  'Tests different combinations of async stacks in chains.');
+
+contextGroup.addScript(`
+function runWithRegular(f, name) {
+  inspector.scheduleWithAsyncStack(f, name, false);
+}
+
+function runWithEmptyName(f) {
+  inspector.scheduleWithAsyncStack(f, '', false);
+}
+
+function runWithEmptyStack(f, name) {
+  inspector.scheduleWithAsyncStack(f, name, true);
+}
+
+function runWithEmptyNameEmptyStack(f) {
+  inspector.scheduleWithAsyncStack(f, '', true);
+}
+
+function runWithExternal(f) {
+  const id = inspector.storeCurrentStackTrace('external');
+  runWithRegular(() => {
+    inspector.externalAsyncTaskStarted(id);
+    f();
+    inspector.externalAsyncTaskFinished(id);
+  }, 'not-used-async');
+}
+
+function runWithNone(f) {
+  f();
+}
+//# sourceURL=utils.js`);
+
+session.setupScriptMap();
+(async function test() {
+  Protocol.Debugger.enable();
+  Protocol.Debugger.setAsyncCallStackDepth({maxDepth: 128});
+
+  const first = ['Regular', 'EmptyName', 'EmptyStack', 'EmptyNameEmptyStack', 'External']
+  const second = ['None', 'Regular', 'EmptyName', 'EmptyStack', 'EmptyNameEmptyStack', 'External']
+
+  for (const stack1 of first) {
+    for (const stack2 of second) {
+      if (stack1 === 'External' && stack2 !== 'None') continue;
+
+      InspectorTest.log(stack2 === 'None' ? stack1 : `${stack1} - ${stack2}`);
+      Protocol.Runtime.evaluate({
+        expression: `
+          var userFunction = () => {debugger};
+          var inner = () => runWith${stack1}(userFunction, 'inner async');
+          runWith${stack2}(inner, 'outer async');
+          //# sourceURL=test.js`
+      });
+      await pauseAndDumpStack();
+    }
+  }
+
+  await Protocol.Debugger.disable();
+  InspectorTest.completeTest();
+})();
+
+async function pauseAndDumpStack() {
+  const {params:{callFrames, asyncStackTrace, asyncStackTraceId}}
+      = await Protocol.Debugger.oncePaused();
+  session.logCallFrames(callFrames);
+  if (asyncStackTrace)
+    session.logAsyncStackTrace(asyncStackTrace);
+  if (asyncStackTraceId)
+    InspectorTest.log('  <external stack>');
+  InspectorTest.log('');
+  return Protocol.Debugger.resume();
+}
diff --git a/src/v8/test/inspector/debugger/async-for-await-of-promise-stack.js b/src/v8/test/inspector/debugger/async-for-await-of-promise-stack.js
index 6a2f4ce..c9df677 100644
--- a/src/v8/test/inspector/debugger/async-for-await-of-promise-stack.js
+++ b/src/v8/test/inspector/debugger/async-for-await-of-promise-stack.js
@@ -2,8 +2,6 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-// Flags: --harmony-async-iteration
-
 let {session, contextGroup, Protocol} = InspectorTest.start('Checks that async chains for for-await-of are correct.');
 
 contextGroup.addScript(`
diff --git a/src/v8/test/inspector/debugger/async-instrumentation-expected.txt b/src/v8/test/inspector/debugger/async-instrumentation-expected.txt
index 3b9f58a..001f393 100644
--- a/src/v8/test/inspector/debugger/async-instrumentation-expected.txt
+++ b/src/v8/test/inspector/debugger/async-instrumentation-expected.txt
@@ -8,12 +8,12 @@
 (anonymous) (expr1.js:0:0)
 
 foo (test.js:10:2)
--- Promise.resolve --
+-- Promise.then --
 test (test.js:19:14)
 (anonymous) (expr1.js:0:0)
 
 foo (test.js:12:2)
--- Promise.resolve --
+-- Promise.then --
 test (test.js:19:14)
 (anonymous) (expr1.js:0:0)
 
diff --git a/src/v8/test/inspector/debugger/async-promise-late-then-expected.txt b/src/v8/test/inspector/debugger/async-promise-late-then-expected.txt
index dfdf81f..ab08d3d 100644
--- a/src/v8/test/inspector/debugger/async-promise-late-then-expected.txt
+++ b/src/v8/test/inspector/debugger/async-promise-late-then-expected.txt
@@ -1,16 +1,16 @@
 Checks async stack for late .then handlers with gc
 foo1 (test.js:11:2)
--- Promise.resolve --
+-- Promise.then --
 test (test.js:18:14)
 (anonymous) (expr.js:0:0)
 
 foo1 (test.js:11:2)
--- Promise.resolve --
+-- Promise.then --
 test (test.js:22:14)
 (anonymous) (expr.js:0:0)
 
 foo1 (test.js:11:2)
--- Promise.resolve --
+-- Promise.then --
 test (test.js:24:14)
 (anonymous) (expr.js:0:0)
 
diff --git a/src/v8/test/inspector/debugger/async-stack-await-expected.txt b/src/v8/test/inspector/debugger/async-stack-await-expected.txt
index 4ebcefa..64d5051 100644
--- a/src/v8/test/inspector/debugger/async-stack-await-expected.txt
+++ b/src/v8/test/inspector/debugger/async-stack-await-expected.txt
@@ -19,7 +19,7 @@
 (anonymous) (expr.js:0:0)
 
 foo1 (test.js:9:2)
--- Promise.resolve --
+-- Promise.then --
 foo2 (test.js:19:43)
 -- async function --
 foo2 (test.js:13:19)
diff --git a/src/v8/test/inspector/debugger/async-stack-created-frame-expected.txt b/src/v8/test/inspector/debugger/async-stack-created-frame-expected.txt
index f5197a1..d555fb8 100644
--- a/src/v8/test/inspector/debugger/async-stack-created-frame-expected.txt
+++ b/src/v8/test/inspector/debugger/async-stack-created-frame-expected.txt
@@ -2,78 +2,78 @@
 
 Running test: testPromise
 foo1 (test.js:10:2)
--- Promise.resolve --
+-- Promise.then --
 promise (test.js:20:14)
 (anonymous) (expr.js:0:0)
 
 
 Running test: testPromiseThen
 foo1 (test.js:10:2)
--- Promise.resolve --
+-- Promise.then --
 promiseThen (test.js:28:14)
 (anonymous) (expr.js:0:0)
 
 foo2 (test.js:14:2)
--- Promise.resolve --
+-- Promise.then --
 promiseThen (test.js:29:14)
 (anonymous) (expr.js:0:0)
 
 
 Running test: testPromiseThenThen
 foo1 (test.js:10:2)
--- Promise.resolve --
+-- Promise.then --
 promiseThenThen (test.js:37:14)
 (anonymous) (expr.js:0:0)
 
 foo1 (test.js:10:2)
--- Promise.resolve --
+-- Promise.then --
 promiseThenThen (test.js:38:14)
 (anonymous) (expr.js:0:0)
 
 foo2 (test.js:14:2)
--- Promise.resolve --
+-- Promise.then --
 promiseThenThen (test.js:37:25)
 (anonymous) (expr.js:0:0)
 
 
 Running test: testPromiseResolve
 foo1 (test.js:10:2)
--- Promise.resolve --
+-- Promise.then --
 promiseResolve (test.js:44:27)
 (anonymous) (expr.js:0:0)
 
 
 Running test: testPromiseReject
 foo1 (test.js:10:2)
--- Promise.reject --
+-- Promise.catch --
 promiseReject (test.js:48:31)
 (anonymous) (expr.js:0:0)
 
 
 Running test: testPromiseAll
 foo1 (test.js:10:2)
--- Promise.resolve --
+-- Promise.then --
 promiseAll (test.js:52:44)
 (anonymous) (expr.js:0:0)
 
 
 Running test: testPromiseRace
 foo1 (test.js:10:2)
--- Promise.resolve --
+-- Promise.then --
 promiseRace (test.js:56:45)
 (anonymous) (expr.js:0:0)
 
 
 Running test: testThenableJob1
 foo1 (test.js:10:2)
--- Promise.resolve --
+-- Promise.then --
 thenableJob1 (test.js:60:72)
 (anonymous) (expr.js:0:0)
 
 
 Running test: testThenableJob2
 foo1 (test.js:10:2)
--- Promise.resolve --
+-- Promise.then --
 thenableJob2 (test.js:64:57)
 (anonymous) (expr.js:0:0)
 
diff --git a/src/v8/test/inspector/debugger/async-stack-for-promise-expected.txt b/src/v8/test/inspector/debugger/async-stack-for-promise-expected.txt
index 8164084..14a3576 100644
--- a/src/v8/test/inspector/debugger/async-stack-for-promise-expected.txt
+++ b/src/v8/test/inspector/debugger/async-stack-for-promise-expected.txt
@@ -2,94 +2,94 @@
 
 Running test: testPromise
 foo1 (test.js:9:2)
--- Promise.resolve --
+-- Promise.then --
 promise (test.js:19:14)
 (anonymous) (testPromise.js:0:0)
 
 
 Running test: testPromiseResolvedBySetTimeout
 foo1 (test.js:9:2)
--- Promise.resolve --
+-- Promise.then --
 promiseResolvedBySetTimeout (test.js:27:14)
 (anonymous) (testPromiseResolvedBySetTimeout.js:0:0)
 
 
 Running test: testPromiseAll
 foo1 (test.js:9:2)
--- Promise.resolve --
+-- Promise.then --
 promiseAll (test.js:37:35)
 (anonymous) (testPromiseAll.js:0:0)
 
 
 Running test: testPromiseAllReverseOrder
 foo1 (test.js:9:2)
--- Promise.resolve --
+-- Promise.then --
 promiseAllReverseOrder (test.js:48:35)
 (anonymous) (testPromiseAllReverseOrder.js:0:0)
 
 
 Running test: testPromiseRace
 foo1 (test.js:9:2)
--- Promise.resolve --
+-- Promise.then --
 promiseRace (test.js:59:36)
 (anonymous) (testPromiseRace.js:0:0)
 
 
 Running test: testTwoChainedCallbacks
 foo1 (test.js:9:2)
--- Promise.resolve --
+-- Promise.then --
 twoChainedCallbacks (test.js:68:14)
 (anonymous) (testTwoChainedCallbacks.js:0:0)
 
 foo2 (test.js:13:2)
--- Promise.resolve --
+-- Promise.then --
 twoChainedCallbacks (test.js:68:25)
 (anonymous) (testTwoChainedCallbacks.js:0:0)
 
 
 Running test: testPromiseResolve
 foo1 (test.js:9:2)
--- Promise.resolve --
+-- Promise.then --
 promiseResolve (test.js:74:27)
 (anonymous) (testPromiseResolve.js:0:0)
 
 foo2 (test.js:13:2)
--- Promise.resolve --
+-- Promise.then --
 promiseResolve (test.js:74:38)
 (anonymous) (testPromiseResolve.js:0:0)
 
 
 Running test: testThenableJobResolvedInSetTimeout
 foo1 (test.js:9:2)
--- Promise.resolve --
+-- Promise.then --
 thenableJobResolvedInSetTimeout (test.js:86:40)
 (anonymous) (testThenableJobResolvedInSetTimeout.js:0:0)
 
 
 Running test: testThenableJobResolvedInSetTimeoutWithStack
 foo1 (test.js:9:2)
--- Promise.resolve --
+-- Promise.then --
 thenableJobResolvedInSetTimeoutWithStack (test.js:104:40)
 (anonymous) (testThenableJobResolvedInSetTimeoutWithStack.js:0:0)
 
 
 Running test: testThenableJobResolvedByPromise
 foo1 (test.js:9:2)
--- Promise.resolve --
+-- Promise.then --
 thenableJobResolvedByPromise (test.js:118:40)
 (anonymous) (testThenableJobResolvedByPromise.js:0:0)
 
 
 Running test: testThenableJobResolvedByPromiseWithStack
 foo1 (test.js:9:2)
--- Promise.resolve --
+-- Promise.then --
 thenableJobResolvedByPromiseWithStack (test.js:136:40)
 (anonymous) (testThenableJobResolvedByPromiseWithStack.js:0:0)
 
 
 Running test: testLateThenCallback
 foo1 (test.js:9:2)
--- Promise.resolve --
+-- Promise.then --
 lateThenCallback (test.js:145:12)
 (anonymous) (testLateThenCallback.js:0:0)
 
@@ -97,14 +97,14 @@
 Running test: testComplex
 inner1 (test.js:154:6)
 foo1 (test.js:156:4)
--- Promise.resolve --
+-- Promise.then --
 complex (test.js:202:5)
 (anonymous) (testComplex.js:0:0)
 
 p.then (test.js:207:8)
--- Promise.resolve --
+-- Promise.then --
 p.then (test.js:206:8)
--- Promise.resolve --
+-- Promise.then --
 setTimeout (test.js:205:6)
 -- setTimeout --
 complex (test.js:204:2)
@@ -113,7 +113,21 @@
 
 Running test: testReject
 foo1 (test.js:9:2)
--- Promise.reject --
+-- Promise.catch --
 reject (test.js:217:31)
 (anonymous) (testReject.js:0:0)
 
+
+Running test: testFinally1
+foo1 (test.js:9:2)
+-- Promise.finally --
+finally1 (test.js:221:33)
+(anonymous) (testFinally1.js:0:0)
+
+
+Running test: testFinally2
+foo1 (test.js:9:2)
+-- Promise.finally --
+finally2 (test.js:225:34)
+(anonymous) (testFinally2.js:0:0)
+
diff --git a/src/v8/test/inspector/debugger/async-stack-for-promise.js b/src/v8/test/inspector/debugger/async-stack-for-promise.js
index 198c971..79c3261 100644
--- a/src/v8/test/inspector/debugger/async-stack-for-promise.js
+++ b/src/v8/test/inspector/debugger/async-stack-for-promise.js
@@ -217,6 +217,13 @@
   return Promise.reject().catch(foo1);
 }
 
+function finally1() {
+  return Promise.reject().finally(foo1);
+}
+
+function finally2() {
+  return Promise.resolve().finally(foo1);
+}
 //# sourceURL=test.js`, 7, 26);
 
 session.setupScriptMap();
@@ -230,20 +237,12 @@
 Protocol.Debugger.enable();
 Protocol.Debugger.setAsyncCallStackDepth({ maxDepth: 128 });
 var testList = [
-  'promise',
-  'promiseResolvedBySetTimeout',
-  'promiseAll',
-  'promiseAllReverseOrder',
-  'promiseRace',
-  'twoChainedCallbacks',
-  'promiseResolve',
-  'thenableJobResolvedInSetTimeout',
-  'thenableJobResolvedInSetTimeoutWithStack',
-  'thenableJobResolvedByPromise',
-  'thenableJobResolvedByPromiseWithStack',
-  'lateThenCallback',
-  'complex',
-  'reject',
+  'promise', 'promiseResolvedBySetTimeout', 'promiseAll',
+  'promiseAllReverseOrder', 'promiseRace', 'twoChainedCallbacks',
+  'promiseResolve', 'thenableJobResolvedInSetTimeout',
+  'thenableJobResolvedInSetTimeoutWithStack', 'thenableJobResolvedByPromise',
+  'thenableJobResolvedByPromiseWithStack', 'lateThenCallback', 'complex',
+  'reject', 'finally1', 'finally2'
 ]
 InspectorTest.runTestSuite(testList.map(name => {
   return eval(`
diff --git a/src/v8/test/inspector/debugger/async-stack-load-more-expected.txt b/src/v8/test/inspector/debugger/async-stack-load-more-expected.txt
new file mode 100644
index 0000000..3213c69
--- /dev/null
+++ b/src/v8/test/inspector/debugger/async-stack-load-more-expected.txt
@@ -0,0 +1,42 @@
+Tests super long async stacks.
+callWithAsyncStack (expr.js:0:26)
+callWithAsyncStack (utils.js:3:4)
+call1 (wrapper.js:0:20)
+--Promise.then--
+callWithAsyncStack (utils.js:7:20)
+call2 (wrapper.js:0:20)
+--Promise.then--
+callWithAsyncStack (utils.js:7:20)
+call3 (wrapper.js:0:20)
+--Promise.then--
+callWithAsyncStack (utils.js:7:20)
+call4 (wrapper.js:0:20)
+--Promise.then--
+callWithAsyncStack (utils.js:7:20)
+call5 (wrapper.js:0:20)
+(fetch parent..)
+--Promise.then--
+callWithAsyncStack (utils.js:7:20)
+call6 (wrapper.js:0:20)
+--Promise.then--
+callWithAsyncStack (utils.js:7:20)
+call7 (wrapper.js:0:20)
+--Promise.then--
+callWithAsyncStack (utils.js:7:20)
+call8 (wrapper.js:0:20)
+--Promise.then--
+callWithAsyncStack (utils.js:7:20)
+call9 (wrapper.js:0:20)
+--Promise.then--
+callWithAsyncStack (utils.js:7:20)
+call10 (wrapper.js:0:21)
+(fetch parent..)
+--Promise.then--
+callWithAsyncStack (utils.js:7:20)
+call11 (wrapper.js:0:21)
+--Promise.then--
+callWithAsyncStack (utils.js:7:20)
+call12 (wrapper.js:0:21)
+--Promise.then--
+callWithAsyncStack (utils.js:7:20)
+(anonymous) (expr.js:0:0)
diff --git a/src/v8/test/inspector/debugger/async-stack-load-more.js b/src/v8/test/inspector/debugger/async-stack-load-more.js
new file mode 100644
index 0000000..3aaaa13
--- /dev/null
+++ b/src/v8/test/inspector/debugger/async-stack-load-more.js
@@ -0,0 +1,44 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+let {session, contextGroup, Protocol} = InspectorTest.start('Tests super long async stacks.');
+
+contextGroup.addScript(`
+function callWithAsyncStack(f, depth) {
+  if (depth === 0) {
+    f();
+    return;
+  }
+  wrapper = eval('(function call' + depth + '() { callWithAsyncStack(f, depth - 1) }) //# sourceURL=wrapper.js');
+  Promise.resolve().then(wrapper);
+}
+//# sourceURL=utils.js`);
+
+(async function test() {
+  Protocol.Debugger.enable();
+  Protocol.Debugger.setAsyncCallStackDepth({maxDepth: 4});
+  Protocol.Runtime.evaluate({
+    expression: 'callWithAsyncStack(() => {debugger}, 12)//# sourceURL=expr.js'
+  });
+  let {params} = await Protocol.Debugger.oncePaused();
+  let {callFrames, asyncStackTrace, externalAsyncStackTrace} = params;
+  while (true) {
+    session.logCallFrames(callFrames);
+    if (externalAsyncStackTrace) {
+      InspectorTest.log('(fetch parent..)');
+      asyncStackTrace = (await Protocol.Debugger.getStackTrace({
+        stackTraceId: externalAsyncStackTrace
+      })).result.stackTrace;
+    }
+    if (asyncStackTrace) {
+      InspectorTest.log('--' + asyncStackTrace.description + '--');
+      callFrames = asyncStackTrace.callFrames;
+      externalAsyncStackTrace = asyncStackTrace.parentId;
+      asyncStackTrace = asyncStackTrace.parent;
+    } else {
+      break;
+    }
+  }
+  InspectorTest.completeTest();
+})()
diff --git a/src/v8/test/inspector/debugger/breakpoints-expected.txt b/src/v8/test/inspector/debugger/breakpoints-expected.txt
new file mode 100644
index 0000000..9d0bae5
--- /dev/null
+++ b/src/v8/test/inspector/debugger/breakpoints-expected.txt
@@ -0,0 +1,66 @@
+Checks breakpoints.
+
+Running test: testRemoveBreakpoint
+Debugger.removeBreakpoint when agent is disabled:
+{
+    error : {
+        code : -32000
+        message : Debugger agent is not enabled
+    }
+    id : <messageId>
+}
+Remove breakpoint with invalid breakpoint id:
+{
+    id : <messageId>
+    result : {
+    }
+}
+{
+    id : <messageId>
+    result : {
+    }
+}
+
+Running test: testSetBreakpointByUrl
+Adding conditional (arg === 1) breakpoint
+evaluating foo1(0):
+  not paused
+evaluating foo1(1):
+  hit expected breakpoint
+
+Evaluating another script with the same url
+evaluating foo2(0):
+  not paused
+evaluating foo2(1):
+  hit expected breakpoint
+
+Removing breakpoint
+evaluating foo1(1):
+  not paused
+evaluating foo2(1):
+  not paused
+
+Adding breakpoint back
+evaluating foo1(0):
+  not paused
+evaluating foo1(1):
+  hit expected breakpoint
+
+Disabling debugger agent
+evaluating foo1(1):
+  not paused
+evaluating foo2(1):
+  not paused
+
+Enabling debugger agent
+evaluating foo1(1):
+  not paused
+evaluating foo2(1):
+  not paused
+
+Running test: testSetBreakpointInScriptsWithDifferentOffsets
+Adding breakpoint
+evaluating foo1(0):
+  hit expected breakpoint
+evaluating foo2(0):
+  not paused
diff --git a/src/v8/test/inspector/debugger/breakpoints.js b/src/v8/test/inspector/debugger/breakpoints.js
new file mode 100644
index 0000000..ce9ab47
--- /dev/null
+++ b/src/v8/test/inspector/debugger/breakpoints.js
@@ -0,0 +1,117 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+let {session, contextGroup, Protocol} = InspectorTest.start('Checks breakpoints.');
+
+session.setupScriptMap();
+InspectorTest.runAsyncTestSuite([
+  async function testRemoveBreakpoint() {
+    InspectorTest.log('Debugger.removeBreakpoint when agent is disabled:');
+    InspectorTest.logMessage(await Protocol.Debugger.removeBreakpoint({
+      breakpointId: '1:test.js:0:0'
+    }));
+    Protocol.Debugger.enable();
+    InspectorTest.log('Remove breakpoint with invalid breakpoint id:')
+    InspectorTest.logMessage(await Protocol.Debugger.removeBreakpoint({
+      breakpointId: ''
+    }));
+    InspectorTest.logMessage(await Protocol.Debugger.removeBreakpoint({
+      breakpointId: ':::'
+    }));
+    await Protocol.Debugger.disable();
+  },
+
+  async function testSetBreakpointByUrl() {
+    await Protocol.Debugger.enable();
+    Protocol.Runtime.evaluate({expression: `
+function foo1(arg) {
+  return arg;
+}
+//# sourceURL=testSetBreakpointByUrl.js`});
+    InspectorTest.log('Adding conditional (arg === 1) breakpoint');
+    let {result:{breakpointId}} = await Protocol.Debugger.setBreakpointByUrl({
+      lineNumber: 2,
+      url: 'testSetBreakpointByUrl.js',
+      columnNumber: 2,
+      condition: 'arg === 1'
+    });
+    await evaluate('foo1(0)');
+    await evaluate('foo1(1)', breakpointId);
+
+    InspectorTest.log('\nEvaluating another script with the same url')
+    Protocol.Runtime.evaluate({expression: `
+function foo2(arg) {
+  return arg;
+}
+//# sourceURL=testSetBreakpointByUrl.js`});
+    await evaluate('foo2(0)');
+    await evaluate('foo2(1)', breakpointId);
+
+    InspectorTest.log('\nRemoving breakpoint');
+    await Protocol.Debugger.removeBreakpoint({breakpointId});
+    await evaluate('foo1(1)');
+    await evaluate('foo2(1)');
+
+    InspectorTest.log('\nAdding breakpoint back');
+    ({result:{breakpointId}} = await Protocol.Debugger.setBreakpointByUrl({
+      lineNumber: 2,
+      url: 'testSetBreakpointByUrl.js',
+      columnNumber: 2,
+      condition: 'arg === 1'
+    }));
+    await evaluate('foo1(0)');
+    await evaluate('foo1(1)', breakpointId);
+
+    InspectorTest.log('\nDisabling debugger agent');
+    await Protocol.Debugger.disable();
+    await evaluate('foo1(1)');
+    await evaluate('foo2(1)');
+
+    InspectorTest.log('\nEnabling debugger agent');
+    await Protocol.Debugger.enable();
+    await evaluate('foo1(1)');
+    await evaluate('foo2(1)');
+  },
+
+  async function testSetBreakpointInScriptsWithDifferentOffsets() {
+    await Protocol.Debugger.enable();
+    InspectorTest.log('Adding breakpoint');
+    let {result:{breakpointId}} = await Protocol.Debugger.setBreakpointByUrl({
+      lineNumber: 2,
+      url: 'test2.js',
+      columnNumber: 2,
+    });
+    contextGroup.addScript(`
+function foo1(arg) {
+  return arg;
+}
+//# sourceURL=test2.js`);
+    contextGroup.addScript(`
+function foo2(arg) {
+  return arg;
+}
+//# sourceURL=test2.js`, 5);
+    await evaluate('foo1(0)', breakpointId);
+    await evaluate('foo2(0)');
+}
+]);
+
+async function evaluate(expression, expectedBreakpoint) {
+  InspectorTest.log('evaluating ' + expression + ':');
+  let paused = Protocol.Debugger.oncePaused();
+  let evaluate = Protocol.Runtime.evaluate({expression});
+  let result = await Promise.race([paused, evaluate]);
+  if (result.method === 'Debugger.paused') {
+    if (result.params.hitBreakpoints) {
+      if (result.params.hitBreakpoints.find(b => b === expectedBreakpoint)) {
+        InspectorTest.log('  hit expected breakpoint')
+      } else {
+        InspectorTest.log('  hit unexpected breakpoint');
+      }
+    }
+    await Protocol.Debugger.resume();
+  } else {
+    InspectorTest.log('  not paused');
+  }
+}
diff --git a/src/v8/test/inspector/debugger/caught-uncaught-exceptions-expected.txt b/src/v8/test/inspector/debugger/caught-uncaught-exceptions-expected.txt
index b784fa5..9c40b1c 100644
--- a/src/v8/test/inspector/debugger/caught-uncaught-exceptions-expected.txt
+++ b/src/v8/test/inspector/debugger/caught-uncaught-exceptions-expected.txt
@@ -3,3 +3,11 @@
 uncaught: false
 paused in throwUncaught
 uncaught: true
+paused in throwInPromiseCaught
+uncaught: false
+paused in promiseUncaught
+uncaught: true
+paused in throwInMapConstructor
+uncaught: true
+paused in throwInAsyncIterator
+uncaught: true
\ No newline at end of file
diff --git a/src/v8/test/inspector/debugger/caught-uncaught-exceptions.js b/src/v8/test/inspector/debugger/caught-uncaught-exceptions.js
index 38b622d..b7c4bd4 100644
--- a/src/v8/test/inspector/debugger/caught-uncaught-exceptions.js
+++ b/src/v8/test/inspector/debugger/caught-uncaught-exceptions.js
@@ -7,6 +7,19 @@
 contextGroup.addScript(
 `function throwCaught() { try { throw new Error(); } catch (_) {} }
  function throwUncaught() { throw new Error(); }
+ function throwInPromiseCaught() {
+   var reject;
+   new Promise(function(res, rej) { reject = rej; }).catch(() => {});
+   reject();
+ }
+ function throwInPromiseUncaught() {
+   new Promise(function promiseUncaught() { throw new Error(); });
+ }
+ function throwInMapConstructor() { new Map('a'); }
+ function throwInAsyncIterator() {
+   let it = (async function*() {})();
+   it.next.call({});
+ }
  function schedule(f) { setTimeout(f, 0); }
 `);
 
@@ -22,4 +35,12 @@
 Protocol.Runtime.evaluate({ "expression": "schedule(throwCaught);" })
   .then(() => Protocol.Runtime.evaluate(
       { "expression": "schedule(throwUncaught);" }))
-  .then(() => InspectorTest.completeTest());
+  .then(() => Protocol.Runtime.evaluate(
+      { "expression": "schedule(throwInPromiseCaught);"}))
+  .then(() => Protocol.Runtime.evaluate(
+      { "expression": "schedule(throwInPromiseUncaught);"}))
+  .then(() => Protocol.Runtime.evaluate(
+      { "expression": "schedule(throwInMapConstructor);"}))
+  .then(() => Protocol.Runtime.evaluate(
+      { "expression": "schedule(throwInAsyncIterator);"}))
+ .then(() => InspectorTest.completeTest());
diff --git a/src/v8/test/inspector/debugger/change-return-value-expected.txt b/src/v8/test/inspector/debugger/change-return-value-expected.txt
new file mode 100644
index 0000000..6e91e6e
--- /dev/null
+++ b/src/v8/test/inspector/debugger/change-return-value-expected.txt
@@ -0,0 +1,35 @@
+Checks that we can update return value on pause
+
+Running test: testError
+Set return value not at return position
+{
+    error : {
+        code : -32000
+        message : Could not update return value at non-return position
+    }
+    id : <messageId>
+}
+
+Running test: testUndefined
+Break at return position..
+Update return value to 42..
+Dump actual return value
+{
+    result : {
+        description : 42
+        type : number
+        value : 42
+    }
+}
+
+Running test: testArrow
+Break at return position..
+Update return value to 239..
+Dump actual return value
+{
+    result : {
+        description : 239
+        type : number
+        value : 239
+    }
+}
diff --git a/src/v8/test/inspector/debugger/change-return-value.js b/src/v8/test/inspector/debugger/change-return-value.js
new file mode 100644
index 0000000..6f5f43f
--- /dev/null
+++ b/src/v8/test/inspector/debugger/change-return-value.js
@@ -0,0 +1,68 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+let {session, contextGroup, Protocol} =
+    InspectorTest.start('Checks that we can update return value on pause');
+
+InspectorTest.runAsyncTestSuite([
+  async function testError() {
+    Protocol.Debugger.enable();
+    let evaluation = Protocol.Runtime.evaluate({
+      expression: 'function foo() { debugger; } foo()',
+      returnByValue: true
+    });
+    let {params:{callFrames}} = await Protocol.Debugger.oncePaused();
+    InspectorTest.log('Set return value not at return position');
+    let result = await Protocol.Debugger.setReturnValue({
+      newValue: { value: 42 },
+    });
+    InspectorTest.logMessage(result);
+    await Protocol.Debugger.disable();
+  },
+
+  async function testUndefined() {
+    Protocol.Debugger.enable();
+    let evaluation = Protocol.Runtime.evaluate({
+      expression: 'function foo() { debugger; } foo()',
+      returnByValue: true
+    });
+    InspectorTest.log('Break at return position..');
+    await Protocol.Debugger.oncePaused();
+    Protocol.Debugger.stepInto();
+    let {params:{callFrames}} = await Protocol.Debugger.oncePaused();
+    InspectorTest.log('Update return value to 42..');
+    Protocol.Debugger.setReturnValue({
+      newValue: { value: 42 },
+    });
+    Protocol.Debugger.resume();
+    let {result} = await evaluation;
+    InspectorTest.log('Dump actual return value');
+    InspectorTest.logMessage(result);
+    await Protocol.Debugger.disable();
+  },
+
+  async function testArrow() {
+    Protocol.Debugger.enable();
+    Protocol.Debugger.pause();
+    let evaluation = Protocol.Runtime.evaluate({
+      expression: '(() => 42)()',
+      returnByValue: true
+    });
+    InspectorTest.log('Break at return position..');
+    await Protocol.Debugger.oncePaused();
+    Protocol.Debugger.stepInto();
+    await Protocol.Debugger.oncePaused();
+    Protocol.Debugger.stepInto();
+    let {params:{callFrames}} = await Protocol.Debugger.oncePaused();
+    InspectorTest.log('Update return value to 239..');
+    Protocol.Debugger.setReturnValue({
+      newValue: { value: 239 },
+    });
+    Protocol.Debugger.resume();
+    let {result} = await evaluation;
+    InspectorTest.log('Dump actual return value');
+    InspectorTest.logMessage(result);
+    await Protocol.Debugger.disable();
+  }
+]);
diff --git a/src/v8/test/inspector/debugger/collect-obsolete-async-tasks-expected.txt b/src/v8/test/inspector/debugger/collect-obsolete-async-tasks-expected.txt
index c114e34..82599eb 100644
--- a/src/v8/test/inspector/debugger/collect-obsolete-async-tasks-expected.txt
+++ b/src/v8/test/inspector/debugger/collect-obsolete-async-tasks-expected.txt
@@ -1,37 +1,25 @@
 Checks that we collect obsolete async tasks with async stacks.
-Async stacks count: 2
+Async stacks count: 1
 Scheduled async tasks: 1
-Created async tasks: 1
-Async tasks with parent: 0
-Recurring async tasks: 1
+Recurring async tasks: 0
 
 Async stacks count: 0
 Scheduled async tasks: 0
-Created async tasks: 0
-Async tasks with parent: 0
 Recurring async tasks: 0
 
 Async stacks count: 2
-Scheduled async tasks: 0
-Created async tasks: 2
-Async tasks with parent: 2
+Scheduled async tasks: 2
 Recurring async tasks: 0
 
 Async stacks count: 0
 Scheduled async tasks: 0
-Created async tasks: 0
-Async tasks with parent: 0
 Recurring async tasks: 0
 
 Async stacks count: 1
 Scheduled async tasks: 1
-Created async tasks: 0
-Async tasks with parent: 0
 Recurring async tasks: 0
 
 Async stacks count: 0
 Scheduled async tasks: 0
-Created async tasks: 0
-Async tasks with parent: 0
 Recurring async tasks: 0
 
diff --git a/src/v8/test/inspector/debugger/collect-obsolete-async-tasks.js b/src/v8/test/inspector/debugger/collect-obsolete-async-tasks.js
index cfef345..0d13c27 100644
--- a/src/v8/test/inspector/debugger/collect-obsolete-async-tasks.js
+++ b/src/v8/test/inspector/debugger/collect-obsolete-async-tasks.js
@@ -7,7 +7,7 @@
 contextGroup.addScript(`
 function test() {
   inspector.setMaxAsyncTaskStacks(128);
-  var p = Promise.resolve();
+  var p = Promise.resolve().then(() => 42);
 
   inspector.dumpAsyncTaskStacksStateForTest();
   inspector.setMaxAsyncTaskStacks(128);
diff --git a/src/v8/test/inspector/debugger/collect-old-async-call-chains-expected.txt b/src/v8/test/inspector/debugger/collect-old-async-call-chains-expected.txt
index 64fef4a..1f66c2f 100644
--- a/src/v8/test/inspector/debugger/collect-old-async-call-chains-expected.txt
+++ b/src/v8/test/inspector/debugger/collect-old-async-call-chains-expected.txt
@@ -7,11 +7,11 @@
 
 inspector.setMaxAsyncTaskStacks(1024)
 Run expression 'console.trace(42)' with async chain len: 2
-actual async chain len: 1
+actual async chain len: 2
 
 inspector.setMaxAsyncTaskStacks(1024)
 Run expression 'console.trace(42)' with async chain len: 5
-actual async chain len: 1
+actual async chain len: 5
 
 inspector.setMaxAsyncTaskStacks(1024)
 Run expression 'console.trace(42)' with async chain len: 1
@@ -69,7 +69,7 @@
 
 inspector.setMaxAsyncTaskStacks(2)
 Run expression 'console.trace(42)' with async chain len: 2
-actual async chain len: 0
+actual async chain len: 2
 
 inspector.setMaxAsyncTaskStacks(2)
 Run expression 'console.trace(42)' with async chain len: 3
@@ -95,11 +95,11 @@
 
 inspector.setMaxAsyncTaskStacks(3)
 Run expression 'console.trace(42)' with async chain len: 2
-actual async chain len: 1
+actual async chain len: 2
 
 inspector.setMaxAsyncTaskStacks(3)
 Run expression 'console.trace(42)' with async chain len: 3
-actual async chain len: 1
+actual async chain len: 3
 
 inspector.setMaxAsyncTaskStacks(3)
 Run expression 'console.trace(42)' with async chain len: 1
@@ -119,11 +119,11 @@
 
 inspector.setMaxAsyncTaskStacks(4)
 Run expression 'console.trace(42)' with async chain len: 2
-actual async chain len: 1
+actual async chain len: 2
 
 inspector.setMaxAsyncTaskStacks(4)
 Run expression 'console.trace(42)' with async chain len: 3
-actual async chain len: 1
+actual async chain len: 3
 
 inspector.setMaxAsyncTaskStacks(4)
 Run expression 'console.trace(42)' with async chain len: 1
@@ -143,11 +143,11 @@
 
 inspector.setMaxAsyncTaskStacks(5)
 Run expression 'console.trace(42)' with async chain len: 2
-actual async chain len: 1
+actual async chain len: 2
 
 inspector.setMaxAsyncTaskStacks(5)
 Run expression 'console.trace(42)' with async chain len: 3
-actual async chain len: 1
+actual async chain len: 3
 
 inspector.setMaxAsyncTaskStacks(5)
 Run expression 'console.trace(42)' with async chain len: 1
@@ -167,11 +167,11 @@
 
 inspector.setMaxAsyncTaskStacks(6)
 Run expression 'console.trace(42)' with async chain len: 2
-actual async chain len: 1
+actual async chain len: 2
 
 inspector.setMaxAsyncTaskStacks(6)
 Run expression 'console.trace(42)' with async chain len: 3
-actual async chain len: 1
+actual async chain len: 3
 
 inspector.setMaxAsyncTaskStacks(6)
 Run expression 'console.trace(42)' with async chain len: 1
@@ -191,11 +191,11 @@
 
 inspector.setMaxAsyncTaskStacks(7)
 Run expression 'console.trace(42)' with async chain len: 2
-actual async chain len: 1
+actual async chain len: 2
 
 inspector.setMaxAsyncTaskStacks(7)
 Run expression 'console.trace(42)' with async chain len: 3
-actual async chain len: 1
+actual async chain len: 3
 
 inspector.setMaxAsyncTaskStacks(7)
 Run expression 'console.trace(42)' with async chain len: 1
diff --git a/src/v8/test/inspector/debugger/collect-old-async-call-chains.js b/src/v8/test/inspector/debugger/collect-old-async-call-chains.js
index 7ac8225..072cfd8 100644
--- a/src/v8/test/inspector/debugger/collect-old-async-call-chains.js
+++ b/src/v8/test/inspector/debugger/collect-old-async-call-chains.js
@@ -138,11 +138,14 @@
 
 function runWithAsyncChainPromise(len, source) {
   InspectorTest.log(`Run expression '${source}' with async chain len: ${len}`);
-  let then = '.then(() => 1)';
-  let pause = `.then(() => { ${source} })`;
-  Protocol.Runtime.evaluate({
-    expression: `Promise.resolve()${then.repeat(len - 1)}${pause}`
-  });
+  let asyncCall = `(function asyncCall(num) {
+    if (num === 0) {
+      ${source};
+      return;
+    }
+    Promise.resolve().then(() => asyncCall(num - 1));
+  })(${len})`;
+  Protocol.Runtime.evaluate({expression: asyncCall});
 }
 
 function runWithAsyncChainSetTimeout(len, source) {
diff --git a/src/v8/test/inspector/debugger/evaluate-on-call-frame-in-module-expected.txt b/src/v8/test/inspector/debugger/evaluate-on-call-frame-in-module-expected.txt
index e4819bd..d2b36e3 100644
--- a/src/v8/test/inspector/debugger/evaluate-on-call-frame-in-module-expected.txt
+++ b/src/v8/test/inspector/debugger/evaluate-on-call-frame-in-module-expected.txt
@@ -12,9 +12,8 @@
 module
 [
     [0] : a1 = 10
-    [1] : g1 = 1
-    [2] : b1 = 11
-    [3] : foo1 = function foo1() {   let c1 = 12;   let g1 = 2;   debugger;   return a1 + b1 + c1 + g1; }
+    [1] : b1 = 11
+    [2] : foo1 = function foo1() {   let c1 = 12;   let g1 = 2;   debugger;   return a1 + b1 + c1 + g1; }
 ]
 global
 [
@@ -180,9 +179,8 @@
 }
 module
 [
-    [0] : a3 = 30
-    [1] : foo2 = function foo2() {   let c2 = 22;   return foo1() + a2 + b2 + c2; }
-    [2] : b3 = 31
+    [0] : foo2 = function foo2() {   let c2 = 22;   return foo1() + a2 + b2 + c2; }
+    [1] : b3 = 31
 ]
 global
 [
@@ -200,20 +198,6 @@
     objectId : <objectId>
     type : function
 }
-a3 = 
-{
-    description : 30
-    type : number
-    value : 30
-}
-Evaluating: ++a3
-updated a3 = 
-{
-    description : 31
-    type : number
-    value : 31
-}
-Evaluating: --a3
 foo2 = 
 {
     className : Function
@@ -247,12 +231,6 @@
 [
     [0] : a = 0
 ]
-module
-[
-    [0] : a = 1
-    [1] : b = 2
-    [2] : bar = function bar() {   let a = 0;   (() => {a; debugger;})(); }
-]
 global
 [
   ...
@@ -283,37 +261,10 @@
     value : 1
 }
 Evaluating: --a
-b = 
-{
-    description : 2
-    type : number
-    value : 2
-}
-Evaluating: ++b
-updated b = 
-{
-    description : 3
-    type : number
-    value : 3
-}
-Evaluating: --b
-bar = 
-{
-    className : Function
-    description : function bar() {   let a = 0;   (() => {a; debugger;})(); }
-    objectId : <objectId>
-    type : function
-}
 local:bar
 [
     [0] : a = 0
 ]
-module
-[
-    [0] : a = 1
-    [1] : b = 2
-    [2] : bar = function bar() {   let a = 0;   (() => {a; debugger;})(); }
-]
 global
 [
   ...
@@ -344,33 +295,6 @@
     value : 1
 }
 Evaluating: --a
-b = 
-{
-    description : 2
-    type : number
-    value : 2
-}
-Evaluating: ++b
-updated b = 
-{
-    description : 3
-    type : number
-    value : 3
-}
-Evaluating: --b
-bar = 
-{
-    className : Function
-    description : function bar() {   let a = 0;   (() => {a; debugger;})(); }
-    objectId : <objectId>
-    type : function
-}
-module
-[
-    [0] : a = 1
-    [1] : b = 2
-    [2] : bar = function bar() {   let a = 0;   (() => {a; debugger;})(); }
-]
 global
 [
   ...
@@ -386,41 +310,6 @@
     objectId : <objectId>
     type : function
 }
-a = 
-{
-    description : 1
-    type : number
-    value : 1
-}
-Evaluating: ++a
-updated a = 
-{
-    description : 2
-    type : number
-    value : 2
-}
-Evaluating: --a
-b = 
-{
-    description : 2
-    type : number
-    value : 2
-}
-Evaluating: ++b
-updated b = 
-{
-    description : 3
-    type : number
-    value : 3
-}
-Evaluating: --b
-bar = 
-{
-    className : Function
-    description : function bar() {   let a = 0;   (() => {a; debugger;})(); }
-    objectId : <objectId>
-    type : function
-}
 
 Running test: testDifferentModuleVariables
 (anonymous) (module5:5:0)
@@ -503,3 +392,112 @@
     value : 1
 }
 Evaluating: --c
+
+Running test: testCapturedLocalVariable
+(anonymous) (module6:2:25)
+(anonymous) (module6:2:37)
+local
+[
+    [0] : y = 5
+]
+module
+[
+    [0] : x = 5
+]
+global
+[
+  ...
+]
+Check variables in frame#0
+let x = 5;
+(function() { let y = x; #debugger; })()
+
+
+Array = 
+{
+    className : Function
+    description : function Array() { [native code] }
+    objectId : <objectId>
+    type : function
+}
+y = 
+{
+    description : 5
+    type : number
+    value : 5
+}
+Evaluating: ++y
+updated y = 
+{
+    description : 6
+    type : number
+    value : 6
+}
+Evaluating: --y
+x = 
+{
+    description : 5
+    type : number
+    value : 5
+}
+Evaluating: ++x
+updated x = 
+{
+    description : 6
+    type : number
+    value : 6
+}
+Evaluating: --x
+module
+[
+    [0] : x = 5
+]
+global
+[
+  ...
+]
+Check variables in frame#1
+let x = 5;
+(function() { let y = x; debugger; })#()
+
+
+Array = 
+{
+    className : Function
+    description : function Array() { [native code] }
+    objectId : <objectId>
+    type : function
+}
+x = 
+{
+    description : 5
+    type : number
+    value : 5
+}
+Evaluating: ++x
+updated x = 
+{
+    description : 6
+    type : number
+    value : 6
+}
+Evaluating: --x
+
+Running test: testLocalVariableToplevel
+(anonymous) (module7:2:0)
+global
+[
+  ...
+]
+Check variables in frame#0
+let x = 5;
+#debugger;
+
+
+Array = 
+{
+    className : Function
+    description : function Array() { [native code] }
+    objectId : <objectId>
+    type : function
+}
diff --git a/src/v8/test/inspector/debugger/evaluate-on-call-frame-in-module.js b/src/v8/test/inspector/debugger/evaluate-on-call-frame-in-module.js
index ef9050e..e656646 100644
--- a/src/v8/test/inspector/debugger/evaluate-on-call-frame-in-module.js
+++ b/src/v8/test/inspector/debugger/evaluate-on-call-frame-in-module.js
@@ -49,6 +49,16 @@
 debugger;
 `;
 
+var module6 = `
+let x = 5;
+(function() { let y = x; debugger; })()
+`;
+
+var module7 = `
+let x = 5;
+debugger;
+`;
+
 InspectorTest.runAsyncTestSuite([
   async function testTotal() {
     session.setupScriptMap();
@@ -82,6 +92,26 @@
       await checkFrame(callFrames[i], i);
     }
     await Protocol.Debugger.resume();
+  },
+
+  async function testCapturedLocalVariable() {
+    contextGroup.addModule(module6, 'module6');
+    let {params:{callFrames}} = (await Protocol.Debugger.oncePaused());
+    session.logCallFrames(callFrames);
+    for (let i = 0; i < callFrames.length; ++i) {
+      await checkFrame(callFrames[i], i);
+    }
+    await Protocol.Debugger.resume();
+  },
+
+  async function testLocalVariableToplevel() {
+    contextGroup.addModule(module7, 'module7');
+    let {params:{callFrames}} = (await Protocol.Debugger.oncePaused());
+    session.logCallFrames(callFrames);
+    for (let i = 0; i < callFrames.length; ++i) {
+      await checkFrame(callFrames[i], i);
+    }
+    await Protocol.Debugger.resume();
   }
 ]);
 
diff --git a/src/v8/test/inspector/debugger/external-stack-trace-expected.txt b/src/v8/test/inspector/debugger/external-stack-trace-expected.txt
new file mode 100644
index 0000000..fef370e
--- /dev/null
+++ b/src/v8/test/inspector/debugger/external-stack-trace-expected.txt
@@ -0,0 +1,42 @@
+Tests external stack traces
+
+Running test: testDebuggerId
+Enabling debugger first time..
+Enabling debugger again..
+> second Debugger.enable returns the same debugger id
+Enabling debugger in another context group..
+> Debugger.enable in another context group returns own debugger id
+
+Running test: testInstrumentation
+{
+    id : <messageId>
+    result : {
+        stackTrace : {
+            callFrames : [
+                [0] : {
+                    columnNumber : 15
+                    functionName : 
+                    lineNumber : 0
+                    scriptId : <scriptId>
+                    url : 
+                }
+            ]
+            description : stack
+        }
+    }
+}
+
+Running test: testDisableStacksAfterStored
+> external async stack trace is empty
+
+Running test: testDisableStacksAfterStarted
+> external async stack trace is empty
+
+Running test: testExternalStacks
+(anonymous) (expr1-2.js:1:6)
+-- stack2 --
+store (utils.js:2:25)
+(anonymous) (expr2.js:1:11)
+-- stack --
+store (utils.js:2:25)
+(anonymous) (expr1-1.js:0:0)
diff --git a/src/v8/test/inspector/debugger/external-stack-trace.js b/src/v8/test/inspector/debugger/external-stack-trace.js
new file mode 100644
index 0000000..0b5c084
--- /dev/null
+++ b/src/v8/test/inspector/debugger/external-stack-trace.js
@@ -0,0 +1,169 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+InspectorTest.log('Tests external stack traces');
+
+let contextGroup1 = new InspectorTest.ContextGroup();
+let session1 = contextGroup1.connect();
+let Protocol1 = session1.Protocol;
+let contextGroup2 = new InspectorTest.ContextGroup();
+let session2 = contextGroup2.connect();
+let Protocol2 = session2.Protocol;
+
+let utilsScript = `
+function store(description) {
+  let buffer = inspector.storeCurrentStackTrace(description);
+  return '[' + new Int32Array(buffer).join(',') + ']';
+}
+
+function started(id) {
+  inspector.externalAsyncTaskStarted(Int32Array.from(JSON.parse(id)).buffer);
+}
+
+function finished(id) {
+  inspector.externalAsyncTaskFinished(Int32Array.from(JSON.parse(id)).buffer);
+}
+//# sourceURL=utils.js`;
+
+contextGroup1.addScript(utilsScript);
+contextGroup2.addScript(utilsScript);
+
+InspectorTest.runAsyncTestSuite([
+  async function testDebuggerId() {
+    InspectorTest.log('Enabling debugger first time..');
+    let {result: {debuggerId}} = await Protocol1.Debugger.enable();
+    let firstDebuggerId = debuggerId;
+    InspectorTest.log('Enabling debugger again..');
+    ({result: {debuggerId}} = await Protocol1.Debugger.enable());
+    if (firstDebuggerId !== debuggerId) {
+      InspectorTest.log(
+          'FAIL: second Debugger.enable returns different debugger id');
+    } else {
+      InspectorTest.log(
+          '> second Debugger.enable returns the same debugger id');
+    }
+    InspectorTest.log('Enabling debugger in another context group..');
+    ({result: {debuggerId}} = await Protocol2.Debugger.enable());
+    if (firstDebuggerId === debuggerId) {
+      InspectorTest.log(
+          'FAIL: Debugger.enable in another context group returns the same debugger id');
+    } else {
+      InspectorTest.log(
+          '> Debugger.enable in another context group returns own debugger id');
+    }
+  },
+
+  async function testInstrumentation() {
+    Protocol1.Debugger.enable();
+    Protocol1.Debugger.setAsyncCallStackDepth({maxDepth: 32});
+    let result = await Protocol1.Runtime.evaluate(
+        {expression: 'id = inspector.storeCurrentStackTrace(\'stack\')'});
+    let stackTraceId = result.result.result.objectId;
+    Protocol1.Runtime.evaluate({
+      expression: `inspector.externalAsyncTaskStarted(id);
+      debugger;
+      inspector.externalAsyncTaskFinished(id);`
+    });
+    let {params: {callFrames, asyncStackTraceId}} =
+        await Protocol1.Debugger.oncePaused();
+    result = await Protocol1.Debugger.getStackTrace(
+        {stackTraceId: asyncStackTraceId});
+    InspectorTest.logMessage(result);
+    await Protocol1.Debugger.disable();
+  },
+
+  async function testDisableStacksAfterStored() {
+    Protocol1.Debugger.enable();
+    Protocol1.Debugger.setAsyncCallStackDepth({maxDepth: 32});
+    let result = await Protocol1.Runtime.evaluate(
+        {expression: 'id = inspector.storeCurrentStackTrace(\'stack\')'});
+    let stackTraceId = result.result.result.objectId;
+    Protocol1.Debugger.setAsyncCallStackDepth({maxDepth: 0});
+    Protocol1.Runtime.evaluate({
+      expression: `inspector.externalAsyncTaskStarted(id);
+      debugger;
+      inspector.externalAsyncTaskFinished(id);`
+    });
+    let {params: {callFrames, asyncStackTraceId}} =
+        await Protocol1.Debugger.oncePaused();
+    if (!asyncStackTraceId) {
+      InspectorTest.log('> external async stack trace is empty');
+    } else {
+      InspectorTest.log('FAIL: external async stack trace is reported');
+    }
+    await Protocol1.Debugger.disable();
+  },
+
+  async function testDisableStacksAfterStarted() {
+    Protocol1.Debugger.enable();
+    Protocol1.Debugger.setAsyncCallStackDepth({maxDepth: 32});
+    let result = await Protocol1.Runtime.evaluate(
+        {expression: 'id = inspector.storeCurrentStackTrace(\'stack\')'});
+    let stackTraceId = result.result.result.objectId;
+    Protocol1.Runtime.evaluate(
+        {expression: 'inspector.externalAsyncTaskStarted(id);'});
+    Protocol1.Debugger.setAsyncCallStackDepth({maxDepth: 0});
+    Protocol1.Runtime.evaluate({
+      expression: `debugger;
+      inspector.externalAsyncTaskFinished(id);`
+    });
+    let {params: {callFrames, asyncStackTraceId}} =
+        await Protocol1.Debugger.oncePaused();
+    if (!asyncStackTraceId) {
+      InspectorTest.log('> external async stack trace is empty');
+    } else {
+      InspectorTest.log('FAIL: external async stack trace is reported');
+    }
+    await Protocol1.Debugger.disable();
+  },
+
+  async function testExternalStacks() {
+    let debuggerId1 = (await Protocol1.Debugger.enable()).result.debuggerId;
+    let debuggerId2 = (await Protocol2.Debugger.enable()).result.debuggerId;
+    Protocol1.Debugger.setAsyncCallStackDepth({maxDepth: 32});
+    Protocol2.Debugger.setAsyncCallStackDepth({maxDepth: 32});
+    let stackTraceId1 = (await Protocol1.Runtime.evaluate({
+                          expression: 'store(\'stack\')//# sourceURL=expr1-1.js'
+                        })).result.result.value;
+    let stackTraceId2 = (await Protocol2.Runtime.evaluate({
+                          expression: `started('${stackTraceId1}');
+      id = store('stack2');
+      finished('${stackTraceId1}');
+      id
+      //# sourceURL=expr2.js`
+                        })).result.result.value;
+    Protocol1.Runtime.evaluate({
+      expression: `started('${stackTraceId2}');
+      debugger;
+      finished('${stackTraceId2}');
+      id
+      //# sourceURL=expr1-2.js`
+    });
+
+    let {params: {callFrames, asyncStackTraceId}} =
+        await Protocol1.Debugger.oncePaused();
+    let debuggers = new Map(
+        [[debuggerId1, Protocol1.Debugger], [debuggerId2, Protocol2.Debugger]]);
+    let sessions = new Map([[debuggerId1, session1], [debuggerId2, session2]]);
+    let currentDebuggerId = debuggerId1;
+    while (true) {
+      sessions.get(currentDebuggerId).logCallFrames(callFrames);
+      if (asyncStackTraceId) {
+        currentDebuggerId = asyncStackTraceId.debuggerId;
+        let {result: {stackTrace}} =
+            await debuggers.get(currentDebuggerId).getStackTrace({
+              stackTraceId: asyncStackTraceId
+            });
+        InspectorTest.log(`-- ${stackTrace.description} --`);
+        callFrames = stackTrace.callFrames;
+        asyncStackTraceId = stackTrace.parentId;
+      } else {
+        break;
+      }
+    }
+
+    Protocol1.Debugger.disable();
+    await Protocol2.Debugger.disable();
+  }
+]);
diff --git a/src/v8/test/inspector/debugger/for-of-loops-expected.txt b/src/v8/test/inspector/debugger/for-of-loops-expected.txt
index 6d23c94..bc1bc5a 100644
--- a/src/v8/test/inspector/debugger/for-of-loops-expected.txt
+++ b/src/v8/test/inspector/debugger/for-of-loops-expected.txt
@@ -9,10 +9,10 @@
   var arr = |_|[1];
   var all = |_|[];
   for (var |_|k in |_|arr) { all.|C|push(k); }
-  for (var |_|k of |_|arr) { all.|C|push(k); }
+  for (var |C|k of |_|arr) { all.|C|push(k); }
   for (var |_|k in |_|obj) { all.|C|push(k); }
   for (let |_|k in |_|arr) { all.|C|push(k); }
-  for (let |_|k of |_|arr) { all.|C|push(k); }
+  for (let |C|k of |_|arr) { all.|C|push(k); }
   for (let |_|k in |_|obj) { all.|C|push(k); }
 
   var iterable = |_|{
@@ -28,9 +28,9 @@
       };|R|
     }
   };
-  for (var |_|k of |_|iterable) { all.|C|push(k); }
+  for (var |C|k of |_|iterable) { all.|C|push(k); }
   |_|iterable.i = 0;
-  for (let |_|k of |_|iterable) { all.|C|push(k); }
+  for (let |C|k of |_|iterable) { all.|C|push(k); }
 |R|}
 
 (anonymous) (expr.js:0:0)
diff --git a/src/v8/test/inspector/debugger/get-possible-breakpoints-master-expected.txt b/src/v8/test/inspector/debugger/get-possible-breakpoints-master-expected.txt
index 7ea0920..c304fe6 100644
--- a/src/v8/test/inspector/debugger/get-possible-breakpoints-master-expected.txt
+++ b/src/v8/test/inspector/debugger/get-possible-breakpoints-master-expected.txt
@@ -95,10 +95,10 @@
 |R|}
 
 function testForOfLoop() {
-  for (var |_|k of |_|[]) {}
-  for (var |_|k of |_|[1]) |_|k;
+  for (var |C|k of |_|[]) {}
+  for (var |C|k of |_|[1]) |_|k;
   var a = |_|[];
-  for (var |_|k of |_|a) {}
+  for (var |C|k of |_|a) {}
 |R|}
 
 function testForInLoop() {
@@ -116,7 +116,7 @@
   |_|a--;
 |R|}
 
-Object.defineProperty(this, 'getterFoo', {
+|_|Object.|C|defineProperty(this, 'getterFoo', {
   get: () => |_|return42|R|
 });
 
@@ -124,7 +124,7 @@
   |C|getterFoo();
 |R|}
 
-var obj = {
+var obj = |_|{
   foo: () => (|_|{
     boo: () => |_|return42|R|
   })|R|
@@ -260,7 +260,7 @@
 |R|}
 
 function twiceDefined() {
-  return a + b;
+  |_|return a + b;|R|
 }
 
 function twiceDefined() {
diff --git a/src/v8/test/inspector/debugger/max-async-call-chain-depth-expected.txt b/src/v8/test/inspector/debugger/max-async-call-chain-depth-expected.txt
index 0c421da..0d60dbb 100644
--- a/src/v8/test/inspector/debugger/max-async-call-chain-depth-expected.txt
+++ b/src/v8/test/inspector/debugger/max-async-call-chain-depth-expected.txt
@@ -62,7 +62,7 @@
                 url : 
             }
         ]
-        description : Promise.resolve
+        description : Promise.then
     }
 }
 
diff --git a/src/v8/test/inspector/debugger/max-async-call-stack-depth-changed-expected.txt b/src/v8/test/inspector/debugger/max-async-call-stack-depth-changed-expected.txt
new file mode 100644
index 0000000..0f94b59
--- /dev/null
+++ b/src/v8/test/inspector/debugger/max-async-call-stack-depth-changed-expected.txt
@@ -0,0 +1,5 @@
+Tests for max async call stack depth changed.
+maxAsyncCallStackDepthChanged: 8
+maxAsyncCallStackDepthChanged: 0
+maxAsyncCallStackDepthChanged: 8
+maxAsyncCallStackDepthChanged: 0
diff --git a/src/v8/test/inspector/debugger/max-async-call-stack-depth-changed.js b/src/v8/test/inspector/debugger/max-async-call-stack-depth-changed.js
new file mode 100644
index 0000000..2d58539
--- /dev/null
+++ b/src/v8/test/inspector/debugger/max-async-call-stack-depth-changed.js
@@ -0,0 +1,16 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+let {session, contextGroup, Protocol} =
+    InspectorTest.start('Tests for max async call stack depth changed.');
+
+(async function test(){
+  utils.setLogMaxAsyncCallStackDepthChanged(true);
+  await Protocol.Debugger.enable();
+  await Protocol.Debugger.setAsyncCallStackDepth({maxDepth: 8});
+  await Protocol.Debugger.setAsyncCallStackDepth({maxDepth: 0});
+  await Protocol.Debugger.setAsyncCallStackDepth({maxDepth: 8});
+  await Protocol.Debugger.disable();
+  InspectorTest.completeTest();
+})();
diff --git a/src/v8/test/inspector/debugger/pause-on-async-call-expected.txt b/src/v8/test/inspector/debugger/pause-on-async-call-expected.txt
new file mode 100644
index 0000000..709eea8
--- /dev/null
+++ b/src/v8/test/inspector/debugger/pause-on-async-call-expected.txt
@@ -0,0 +1,286 @@
+Checks Debugger.scheduleStepIntoAsync.
+
+Running test: testScheduleErrors
+paused at:
+function testNoScheduledTask() {
+  #debugger;
+  return 42;
+
+paused at:
+  debugger;
+  #return 42;
+}
+
+paused at:
+  debugger;
+  return 42;#
+}
+
+
+Running test: testSimple
+paused at:
+function testSimple() {
+  #debugger;
+  Promise.resolve().then(v => v * 2);
+
+paused at:
+  debugger;
+  #Promise.resolve().then(v => v * 2);
+}
+
+paused at:
+  debugger;
+  Promise.resolve().#then(v => v * 2);
+}
+
+asyncCallStackTraceId is set
+
+paused at:
+  debugger;
+  Promise.resolve().then(#v => v * 2);
+}
+
+
+Running test: testNotResolvedPromise
+paused at:
+  var p = new Promise(resolve => resolveCallback = resolve);
+  #debugger;
+  p.then(v => v * 2);
+
+paused at:
+  debugger;
+  p.#then(v => v * 2);
+  resolveCallback();
+
+paused at:
+  debugger;
+  p.#then(v => v * 2);
+  resolveCallback();
+
+asyncCallStackTraceId is set
+
+paused at:
+  debugger;
+  p.then(#v => v * 2);
+  resolveCallback();
+
+
+Running test: testTwoAsyncTasks
+paused at:
+function testTwoAsyncTasks() {
+  #debugger;
+  Promise.resolve().then(v => v * 2);
+
+paused at:
+  debugger;
+  #Promise.resolve().then(v => v * 2);
+  Promise.resolve().then(v => v * 4);
+
+paused at:
+  debugger;
+  Promise.resolve().#then(v => v * 2);
+  Promise.resolve().then(v => v * 4);
+
+asyncCallStackTraceId is set
+
+paused at:
+  debugger;
+  Promise.resolve().then(#v => v * 2);
+  Promise.resolve().then(v => v * 4);
+
+
+Running test: testTwoTasksAndGoToSecond
+paused at:
+function testTwoAsyncTasks() {
+  #debugger;
+  Promise.resolve().then(v => v * 2);
+
+paused at:
+  debugger;
+  #Promise.resolve().then(v => v * 2);
+  Promise.resolve().then(v => v * 4);
+
+paused at:
+  Promise.resolve().then(v => v * 2);
+  #Promise.resolve().then(v => v * 4);
+}
+
+paused at:
+  Promise.resolve().then(v => v * 2);
+  Promise.resolve().#then(v => v * 4);
+}
+
+asyncCallStackTraceId is set
+
+paused at:
+  Promise.resolve().then(v => v * 2);
+  Promise.resolve().then(#v => v * 4);
+}
+
+
+Running test: testTwoAsyncTasksWithBreak
+paused at:
+function testTwoAsyncTasksWithBreak() {
+  #debugger;
+  Promise.resolve().then(v => v * 2);
+
+paused at:
+  debugger;
+  #Promise.resolve().then(v => v * 2);
+  debugger;
+
+paused at:
+  debugger;
+  Promise.resolve().#then(v => v * 2);
+  debugger;
+
+asyncCallStackTraceId is set
+
+paused at:
+  Promise.resolve().then(v => v * 2);
+  #debugger;
+  Promise.resolve().then(v => v * 4);
+
+paused at:
+  debugger;
+  #Promise.resolve().then(v => v * 4);
+}
+
+paused at:
+  debugger;
+  Promise.resolve().#then(v => v * 4);
+}
+
+asyncCallStackTraceId is set
+
+paused at:
+  debugger;
+  Promise.resolve().then(#v => v * 4);
+}
+
+
+Running test: testPromiseAll
+paused at:
+function testPromiseAll() {
+  #debugger;
+  Promise.all([ Promise.resolve(), Promise.resolve() ]).then(v => v * 2);
+
+paused at:
+  debugger;
+  #Promise.all([ Promise.resolve(), Promise.resolve() ]).then(v => v * 2);
+}
+
+paused at:
+  debugger;
+  Promise.all([ Promise.resolve(), Promise.resolve() ]).#then(v => v * 2);
+}
+
+asyncCallStackTraceId is set
+
+paused at:
+  debugger;
+  Promise.all([ Promise.resolve(), Promise.resolve() ]).then(#v => v * 2);
+}
+
+
+Running test: testWithBlackboxedCode
+paused at:
+function testBlackboxedCreatePromise() {
+  #debugger;
+  createPromise().then(v => v * 2);
+
+paused at:
+  debugger;
+  #createPromise().then(v => v * 2);
+}
+
+paused at:
+  debugger;
+  createPromise().#then(v => v * 2);
+}
+
+asyncCallStackTraceId is set
+
+paused at:
+  debugger;
+  createPromise().then(#v => v * 2);
+}
+
+
+Running test: testWithBlackboxedCode
+paused at:
+function testBlackboxedCreatePromise() {
+  #debugger;
+  createPromise().then(v => v * 2);
+
+paused at:
+  debugger;
+  #createPromise().then(v => v * 2);
+}
+
+paused at:
+  debugger;
+  createPromise().#then(v => v * 2);
+}
+
+asyncCallStackTraceId is set
+
+paused at:
+  debugger;
+  createPromise().then(#v => v * 2);
+}
+
+
+Running test: testAsyncFunction
+paused at:
+async function testAsyncFunction() {
+  #debugger;
+  foo();
+
+paused at:
+  debugger;
+  #foo();
+  await foo();
+
+paused at:
+  async function foo() {
+    #return 42;
+  }
+
+paused at:
+  foo();
+  await #foo();
+  foo().then(boo);
+
+paused at:
+  async function foo() {
+    #return 42;
+  }
+
+paused at:
+  await foo();
+  #foo().then(boo);
+
+
+paused at:
+  async function foo() {
+    #return 42;
+  }
+
+paused at:
+  await foo();
+  foo().#then(boo);
+
+
+paused at:
+  await foo();
+  foo().#then(boo);
+
+
+asyncCallStackTraceId is set
+
+paused at:
+
+  function boo#() {
+  }
+
diff --git a/src/v8/test/inspector/debugger/pause-on-async-call.js b/src/v8/test/inspector/debugger/pause-on-async-call.js
new file mode 100644
index 0000000..7245824
--- /dev/null
+++ b/src/v8/test/inspector/debugger/pause-on-async-call.js
@@ -0,0 +1,243 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+let {session, contextGroup, Protocol} = InspectorTest.start('Checks Debugger.scheduleStepIntoAsync.');
+
+contextGroup.addScript(`
+function testNoScheduledTask() {
+  debugger;
+  return 42;
+}
+
+function testSimple() {
+  debugger;
+  Promise.resolve().then(v => v * 2);
+}
+
+function testNotResolvedPromise() {
+  var resolveCallback;
+  var p = new Promise(resolve => resolveCallback = resolve);
+  debugger;
+  p.then(v => v * 2);
+  resolveCallback();
+}
+
+function testTwoAsyncTasks() {
+  debugger;
+  Promise.resolve().then(v => v * 2);
+  Promise.resolve().then(v => v * 4);
+}
+
+function testTwoAsyncTasksWithBreak() {
+  debugger;
+  Promise.resolve().then(v => v * 2);
+  debugger;
+  Promise.resolve().then(v => v * 4);
+}
+
+function testPromiseAll() {
+  debugger;
+  Promise.all([ Promise.resolve(), Promise.resolve() ]).then(v => v * 2);
+}
+
+function testBlackboxedCreatePromise() {
+  debugger;
+  createPromise().then(v => v * 2);
+}
+
+async function testAsyncFunction() {
+  debugger;
+  foo();
+  await foo();
+  foo().then(boo);
+
+  async function foo() {
+    return 42;
+  }
+
+  function boo() {
+  }
+}
+//# sourceURL=test.js`);
+
+contextGroup.addScript(`
+
+function createPromise() {
+  return Promise.resolve().then(v => v * 3).then(v => v * 4);
+}
+
+//# sourceURL=framework.js`)
+
+session.setupScriptMap();
+
+Protocol.Debugger.enable();
+InspectorTest.runAsyncTestSuite([
+  async function testScheduleErrors() {
+    Protocol.Runtime.evaluate({ expression: 'testNoScheduledTask()' });
+    await waitPauseAndDumpLocation();
+    Protocol.Debugger.stepInto({breakOnAsyncCall: true});
+    await waitPauseAndDumpLocation();
+    Protocol.Debugger.stepInto({breakOnAsyncCall: true});
+    await waitPauseAndDumpLocation();
+    await Protocol.Debugger.resume();
+  },
+
+  async function testSimple() {
+    Protocol.Runtime.evaluate({ expression: 'testSimple()' });
+    await waitPauseAndDumpLocation();
+    Protocol.Debugger.stepOver();
+    await waitPauseAndDumpLocation();
+    Protocol.Debugger.stepInto({breakOnAsyncCall: true});
+    let parentStackTraceId = await waitPauseAndDumpLocation();
+    Protocol.Debugger.pauseOnAsyncCall({parentStackTraceId});
+    Protocol.Debugger.resume();
+    await waitPauseAndDumpLocation();
+    await Protocol.Debugger.resume();
+  },
+
+  async function testNotResolvedPromise() {
+    Protocol.Runtime.evaluate({ expression: 'testNotResolvedPromise()' });
+    await waitPauseAndDumpLocation();
+    Protocol.Debugger.stepOver();
+    await waitPauseAndDumpLocation();
+    Protocol.Debugger.stepInto({breakOnAsyncCall: true});
+    let parentStackTraceId = await waitPauseAndDumpLocation();
+    Protocol.Debugger.pauseOnAsyncCall({parentStackTraceId});
+    Protocol.Debugger.resume();
+    await waitPauseAndDumpLocation();
+    await Protocol.Debugger.resume();
+  },
+
+  async function testTwoAsyncTasks() {
+    Protocol.Runtime.evaluate({ expression: 'testTwoAsyncTasks()' });
+    await waitPauseAndDumpLocation();
+    Protocol.Debugger.stepInto();
+    await waitPauseAndDumpLocation();
+    Protocol.Debugger.stepInto({breakOnAsyncCall: true});
+    let parentStackTraceId = await waitPauseAndDumpLocation();
+    Protocol.Debugger.pauseOnAsyncCall({parentStackTraceId});
+    Protocol.Debugger.resume();
+    await waitPauseAndDumpLocation();
+    await Protocol.Debugger.resume();
+  },
+
+  async function testTwoTasksAndGoToSecond() {
+    Protocol.Runtime.evaluate({ expression: 'testTwoAsyncTasks()' });
+    await waitPauseAndDumpLocation();
+    Protocol.Debugger.stepOver();
+    await waitPauseAndDumpLocation();
+    Protocol.Debugger.stepOver();
+    await waitPauseAndDumpLocation();
+    Protocol.Debugger.stepInto({breakOnAsyncCall: true});
+    let parentStackTraceId = await waitPauseAndDumpLocation();
+    Protocol.Debugger.pauseOnAsyncCall({parentStackTraceId});
+    Protocol.Debugger.resume();
+    await waitPauseAndDumpLocation();
+    await Protocol.Debugger.resume();
+  },
+
+  async function testTwoAsyncTasksWithBreak() {
+    Protocol.Runtime.evaluate({ expression: 'testTwoAsyncTasksWithBreak()' });
+    await waitPauseAndDumpLocation();
+    Protocol.Debugger.stepOver();
+    await waitPauseAndDumpLocation();
+    Protocol.Debugger.stepInto({breakOnAsyncCall: true});
+    let parentStackTraceId = await waitPauseAndDumpLocation();
+    Protocol.Debugger.pauseOnAsyncCall({parentStackTraceId});
+    Protocol.Debugger.resume();
+    await waitPauseAndDumpLocation();
+    Protocol.Debugger.stepOver();
+    await waitPauseAndDumpLocation();
+    Protocol.Debugger.stepInto({breakOnAsyncCall: true});
+    parentStackTraceId = await waitPauseAndDumpLocation();
+    Protocol.Debugger.pauseOnAsyncCall({parentStackTraceId});
+    Protocol.Debugger.resume();
+    await waitPauseAndDumpLocation();
+    await Protocol.Debugger.resume();
+  },
+
+  async function testPromiseAll() {
+    Protocol.Runtime.evaluate({ expression: 'testPromiseAll()' });
+    await waitPauseAndDumpLocation();
+    Protocol.Debugger.stepOver();
+    await waitPauseAndDumpLocation();
+    Protocol.Debugger.stepInto({breakOnAsyncCall: true});
+    let parentStackTraceId = await waitPauseAndDumpLocation();
+    Protocol.Debugger.pauseOnAsyncCall({parentStackTraceId});
+    Protocol.Debugger.resume();
+    await waitPauseAndDumpLocation();
+    await Protocol.Debugger.resume();
+  },
+
+  async function testWithBlackboxedCode() {
+    Protocol.Runtime.evaluate({ expression: 'testBlackboxedCreatePromise()' });
+    await waitPauseAndDumpLocation();
+    Protocol.Debugger.stepOver();
+    await waitPauseAndDumpLocation();
+    await Protocol.Debugger.setBlackboxPatterns({patterns: ['framework\.js'] });
+    Protocol.Debugger.stepInto({breakOnAsyncCall: true});
+    let parentStackTraceId = await waitPauseAndDumpLocation();
+    Protocol.Debugger.pauseOnAsyncCall({parentStackTraceId});
+    Protocol.Debugger.resume();
+    await waitPauseAndDumpLocation();
+    await Protocol.Debugger.resume();
+  },
+
+  async function testWithBlackboxedCode() {
+    Protocol.Runtime.evaluate({expression: 'testBlackboxedCreatePromise()'});
+    await waitPauseAndDumpLocation();
+    Protocol.Debugger.stepOver();
+    await waitPauseAndDumpLocation();
+    await Protocol.Debugger.setBlackboxPatterns({patterns: ['framework\.js']});
+    Protocol.Debugger.stepInto({breakOnAsyncCall: true});
+    let parentStackTraceId = await waitPauseAndDumpLocation();
+    Protocol.Debugger.pauseOnAsyncCall({parentStackTraceId});
+    Protocol.Debugger.resume();
+    await waitPauseAndDumpLocation();
+    await Protocol.Debugger.resume();
+  },
+
+  async function testAsyncFunction() {
+    Protocol.Runtime.evaluate({expression: 'testAsyncFunction()'});
+    await waitPauseAndDumpLocation();
+    Protocol.Debugger.stepOver();
+    await waitPauseAndDumpLocation();
+    Protocol.Debugger.stepInto({breakOnAsyncCall: true});
+    let parentStackTraceId = await waitPauseAndDumpLocation();
+    if (parentStackTraceId)
+      InspectorTest.log(
+          'ERROR: we should not report parent stack trace id on async call');
+    Protocol.Debugger.stepOut();
+    await waitPauseAndDumpLocation();
+    Protocol.Debugger.stepInto({breakOnAsyncCall: true});
+    parentStackTraceId = await waitPauseAndDumpLocation();
+    if (parentStackTraceId)
+      InspectorTest.log(
+          'ERROR: we should not report parent stack trace id on async call');
+    Protocol.Debugger.stepOut();
+    await waitPauseAndDumpLocation();
+    Protocol.Debugger.stepInto({breakOnAsyncCall: true});
+    await waitPauseAndDumpLocation();
+    Protocol.Debugger.stepOut();
+    await waitPauseAndDumpLocation();
+    Protocol.Debugger.stepInto({breakOnAsyncCall: true});
+    parentStackTraceId = await waitPauseAndDumpLocation();
+    Protocol.Debugger.pauseOnAsyncCall({parentStackTraceId});
+    Protocol.Debugger.resume();
+    await waitPauseAndDumpLocation();
+
+    await Protocol.Debugger.resume();
+  }
+]);
+
+async function waitPauseAndDumpLocation() {
+  var {params: {callFrames, asyncCallStackTraceId}} =
+      await Protocol.Debugger.oncePaused();
+  InspectorTest.log('paused at:');
+  await session.logSourceLocation(callFrames[0].location);
+  if (asyncCallStackTraceId) {
+    InspectorTest.log('asyncCallStackTraceId is set\n');
+  }
+  return asyncCallStackTraceId;
+}
diff --git a/src/v8/test/inspector/debugger/promise-chain-when-limit-hit-expected.txt b/src/v8/test/inspector/debugger/promise-chain-when-limit-hit-expected.txt
index 57357ab..549b1a3 100644
--- a/src/v8/test/inspector/debugger/promise-chain-when-limit-hit-expected.txt
+++ b/src/v8/test/inspector/debugger/promise-chain-when-limit-hit-expected.txt
@@ -15,9 +15,16 @@
         stackTrace : {
             callFrames : [
                 [0] : {
-                    columnNumber : 67
-                    functionName : Promise.resolve.then.then.then
-                    lineNumber : 0
+                    columnNumber : 14
+                    functionName : asyncCall
+                    lineNumber : 2
+                    scriptId : <scriptId>
+                    url : 
+                }
+                [1] : {
+                    columnNumber : 33
+                    functionName : Promise.resolve.then
+                    lineNumber : 5
                     scriptId : <scriptId>
                     url : 
                 }
@@ -25,13 +32,59 @@
             parent : {
                 callFrames : [
                     [0] : {
-                        columnNumber : 46
-                        functionName : 
-                        lineNumber : 0
+                        columnNumber : 22
+                        functionName : asyncCall
+                        lineNumber : 5
+                        scriptId : <scriptId>
+                        url : 
+                    }
+                    [1] : {
+                        columnNumber : 33
+                        functionName : Promise.resolve.then
+                        lineNumber : 5
                         scriptId : <scriptId>
                         url : 
                     }
                 ]
+                description : Promise.then
+                parent : {
+                    callFrames : [
+                        [0] : {
+                            columnNumber : 22
+                            functionName : asyncCall
+                            lineNumber : 5
+                            scriptId : <scriptId>
+                            url : 
+                        }
+                        [1] : {
+                            columnNumber : 33
+                            functionName : Promise.resolve.then
+                            lineNumber : 5
+                            scriptId : <scriptId>
+                            url : 
+                        }
+                    ]
+                    description : Promise.then
+                    parent : {
+                        callFrames : [
+                            [0] : {
+                                columnNumber : 22
+                                functionName : asyncCall
+                                lineNumber : 5
+                                scriptId : <scriptId>
+                                url : 
+                            }
+                            [1] : {
+                                columnNumber : 4
+                                functionName : 
+                                lineNumber : 6
+                                scriptId : <scriptId>
+                                url : 
+                            }
+                        ]
+                        description : Promise.then
+                    }
+                }
             }
         }
         timestamp : <timestamp>
@@ -53,9 +106,16 @@
         stackTrace : {
             callFrames : [
                 [0] : {
-                    columnNumber : 67
-                    functionName : Promise.resolve.then.then.then
-                    lineNumber : 0
+                    columnNumber : 14
+                    functionName : asyncCall
+                    lineNumber : 2
+                    scriptId : <scriptId>
+                    url : 
+                }
+                [1] : {
+                    columnNumber : 33
+                    functionName : Promise.resolve.then
+                    lineNumber : 5
                     scriptId : <scriptId>
                     url : 
                 }
@@ -63,14 +123,59 @@
             parent : {
                 callFrames : [
                     [0] : {
-                        columnNumber : 46
-                        functionName : 
-                        lineNumber : 0
+                        columnNumber : 22
+                        functionName : asyncCall
+                        lineNumber : 5
+                        scriptId : <scriptId>
+                        url : 
+                    }
+                    [1] : {
+                        columnNumber : 33
+                        functionName : Promise.resolve.then
+                        lineNumber : 5
                         scriptId : <scriptId>
                         url : 
                     }
                 ]
-                description : Promise.resolve
+                description : Promise.then
+                parent : {
+                    callFrames : [
+                        [0] : {
+                            columnNumber : 22
+                            functionName : asyncCall
+                            lineNumber : 5
+                            scriptId : <scriptId>
+                            url : 
+                        }
+                        [1] : {
+                            columnNumber : 33
+                            functionName : Promise.resolve.then
+                            lineNumber : 5
+                            scriptId : <scriptId>
+                            url : 
+                        }
+                    ]
+                    description : Promise.then
+                    parent : {
+                        callFrames : [
+                            [0] : {
+                                columnNumber : 22
+                                functionName : asyncCall
+                                lineNumber : 5
+                                scriptId : <scriptId>
+                                url : 
+                            }
+                            [1] : {
+                                columnNumber : 4
+                                functionName : 
+                                lineNumber : 6
+                                scriptId : <scriptId>
+                                url : 
+                            }
+                        ]
+                        description : Promise.then
+                    }
+                }
             }
         }
         timestamp : <timestamp>
@@ -92,9 +197,16 @@
         stackTrace : {
             callFrames : [
                 [0] : {
-                    columnNumber : 67
-                    functionName : Promise.resolve.then.then.then
-                    lineNumber : 0
+                    columnNumber : 14
+                    functionName : asyncCall
+                    lineNumber : 2
+                    scriptId : <scriptId>
+                    url : 
+                }
+                [1] : {
+                    columnNumber : 33
+                    functionName : Promise.resolve.then
+                    lineNumber : 5
                     scriptId : <scriptId>
                     url : 
                 }
@@ -102,14 +214,59 @@
             parent : {
                 callFrames : [
                     [0] : {
-                        columnNumber : 46
-                        functionName : 
-                        lineNumber : 0
+                        columnNumber : 22
+                        functionName : asyncCall
+                        lineNumber : 5
+                        scriptId : <scriptId>
+                        url : 
+                    }
+                    [1] : {
+                        columnNumber : 33
+                        functionName : Promise.resolve.then
+                        lineNumber : 5
                         scriptId : <scriptId>
                         url : 
                     }
                 ]
-                description : Promise.resolve
+                description : Promise.then
+                parent : {
+                    callFrames : [
+                        [0] : {
+                            columnNumber : 22
+                            functionName : asyncCall
+                            lineNumber : 5
+                            scriptId : <scriptId>
+                            url : 
+                        }
+                        [1] : {
+                            columnNumber : 33
+                            functionName : Promise.resolve.then
+                            lineNumber : 5
+                            scriptId : <scriptId>
+                            url : 
+                        }
+                    ]
+                    description : Promise.then
+                    parent : {
+                        callFrames : [
+                            [0] : {
+                                columnNumber : 22
+                                functionName : asyncCall
+                                lineNumber : 5
+                                scriptId : <scriptId>
+                                url : 
+                            }
+                            [1] : {
+                                columnNumber : 4
+                                functionName : 
+                                lineNumber : 6
+                                scriptId : <scriptId>
+                                url : 
+                            }
+                        ]
+                        description : Promise.then
+                    }
+                }
             }
         }
         timestamp : <timestamp>
@@ -131,9 +288,16 @@
         stackTrace : {
             callFrames : [
                 [0] : {
-                    columnNumber : 67
-                    functionName : Promise.resolve.then.then.then
-                    lineNumber : 0
+                    columnNumber : 14
+                    functionName : asyncCall
+                    lineNumber : 2
+                    scriptId : <scriptId>
+                    url : 
+                }
+                [1] : {
+                    columnNumber : 33
+                    functionName : Promise.resolve.then
+                    lineNumber : 5
                     scriptId : <scriptId>
                     url : 
                 }
@@ -141,14 +305,59 @@
             parent : {
                 callFrames : [
                     [0] : {
-                        columnNumber : 46
-                        functionName : 
-                        lineNumber : 0
+                        columnNumber : 22
+                        functionName : asyncCall
+                        lineNumber : 5
+                        scriptId : <scriptId>
+                        url : 
+                    }
+                    [1] : {
+                        columnNumber : 33
+                        functionName : Promise.resolve.then
+                        lineNumber : 5
                         scriptId : <scriptId>
                         url : 
                     }
                 ]
-                description : Promise.resolve
+                description : Promise.then
+                parent : {
+                    callFrames : [
+                        [0] : {
+                            columnNumber : 22
+                            functionName : asyncCall
+                            lineNumber : 5
+                            scriptId : <scriptId>
+                            url : 
+                        }
+                        [1] : {
+                            columnNumber : 33
+                            functionName : Promise.resolve.then
+                            lineNumber : 5
+                            scriptId : <scriptId>
+                            url : 
+                        }
+                    ]
+                    description : Promise.then
+                    parent : {
+                        callFrames : [
+                            [0] : {
+                                columnNumber : 22
+                                functionName : asyncCall
+                                lineNumber : 5
+                                scriptId : <scriptId>
+                                url : 
+                            }
+                            [1] : {
+                                columnNumber : 4
+                                functionName : 
+                                lineNumber : 6
+                                scriptId : <scriptId>
+                                url : 
+                            }
+                        ]
+                        description : Promise.then
+                    }
+                }
             }
         }
         timestamp : <timestamp>
@@ -170,9 +379,16 @@
         stackTrace : {
             callFrames : [
                 [0] : {
-                    columnNumber : 67
-                    functionName : Promise.resolve.then.then.then
-                    lineNumber : 0
+                    columnNumber : 14
+                    functionName : asyncCall
+                    lineNumber : 2
+                    scriptId : <scriptId>
+                    url : 
+                }
+                [1] : {
+                    columnNumber : 33
+                    functionName : Promise.resolve.then
+                    lineNumber : 5
                     scriptId : <scriptId>
                     url : 
                 }
@@ -180,14 +396,59 @@
             parent : {
                 callFrames : [
                     [0] : {
-                        columnNumber : 46
-                        functionName : 
-                        lineNumber : 0
+                        columnNumber : 22
+                        functionName : asyncCall
+                        lineNumber : 5
+                        scriptId : <scriptId>
+                        url : 
+                    }
+                    [1] : {
+                        columnNumber : 33
+                        functionName : Promise.resolve.then
+                        lineNumber : 5
                         scriptId : <scriptId>
                         url : 
                     }
                 ]
-                description : Promise.resolve
+                description : Promise.then
+                parent : {
+                    callFrames : [
+                        [0] : {
+                            columnNumber : 22
+                            functionName : asyncCall
+                            lineNumber : 5
+                            scriptId : <scriptId>
+                            url : 
+                        }
+                        [1] : {
+                            columnNumber : 33
+                            functionName : Promise.resolve.then
+                            lineNumber : 5
+                            scriptId : <scriptId>
+                            url : 
+                        }
+                    ]
+                    description : Promise.then
+                    parent : {
+                        callFrames : [
+                            [0] : {
+                                columnNumber : 22
+                                functionName : asyncCall
+                                lineNumber : 5
+                                scriptId : <scriptId>
+                                url : 
+                            }
+                            [1] : {
+                                columnNumber : 4
+                                functionName : 
+                                lineNumber : 6
+                                scriptId : <scriptId>
+                                url : 
+                            }
+                        ]
+                        description : Promise.then
+                    }
+                }
             }
         }
         timestamp : <timestamp>
@@ -209,9 +470,16 @@
         stackTrace : {
             callFrames : [
                 [0] : {
-                    columnNumber : 67
-                    functionName : Promise.resolve.then.then.then
-                    lineNumber : 0
+                    columnNumber : 14
+                    functionName : asyncCall
+                    lineNumber : 2
+                    scriptId : <scriptId>
+                    url : 
+                }
+                [1] : {
+                    columnNumber : 33
+                    functionName : Promise.resolve.then
+                    lineNumber : 5
                     scriptId : <scriptId>
                     url : 
                 }
@@ -219,14 +487,59 @@
             parent : {
                 callFrames : [
                     [0] : {
-                        columnNumber : 46
-                        functionName : 
-                        lineNumber : 0
+                        columnNumber : 22
+                        functionName : asyncCall
+                        lineNumber : 5
+                        scriptId : <scriptId>
+                        url : 
+                    }
+                    [1] : {
+                        columnNumber : 33
+                        functionName : Promise.resolve.then
+                        lineNumber : 5
                         scriptId : <scriptId>
                         url : 
                     }
                 ]
-                description : Promise.resolve
+                description : Promise.then
+                parent : {
+                    callFrames : [
+                        [0] : {
+                            columnNumber : 22
+                            functionName : asyncCall
+                            lineNumber : 5
+                            scriptId : <scriptId>
+                            url : 
+                        }
+                        [1] : {
+                            columnNumber : 33
+                            functionName : Promise.resolve.then
+                            lineNumber : 5
+                            scriptId : <scriptId>
+                            url : 
+                        }
+                    ]
+                    description : Promise.then
+                    parent : {
+                        callFrames : [
+                            [0] : {
+                                columnNumber : 22
+                                functionName : asyncCall
+                                lineNumber : 5
+                                scriptId : <scriptId>
+                                url : 
+                            }
+                            [1] : {
+                                columnNumber : 4
+                                functionName : 
+                                lineNumber : 6
+                                scriptId : <scriptId>
+                                url : 
+                            }
+                        ]
+                        description : Promise.then
+                    }
+                }
             }
         }
         timestamp : <timestamp>
diff --git a/src/v8/test/inspector/debugger/promise-chain-when-limit-hit.js b/src/v8/test/inspector/debugger/promise-chain-when-limit-hit.js
index 072af73..3718312 100644
--- a/src/v8/test/inspector/debugger/promise-chain-when-limit-hit.js
+++ b/src/v8/test/inspector/debugger/promise-chain-when-limit-hit.js
@@ -40,11 +40,14 @@
 
 function runWithAsyncChainPromise(len, source) {
   InspectorTest.log(`Run expression '${source}' with async chain len: ${len}`);
-  let then = '.then(() => 1)';
-  let pause = `.then(() => { ${source} })`;
-  Protocol.Runtime.evaluate({
-    expression: `Promise.resolve()${then.repeat(len - 1)}${pause}`
-  });
+  let asyncCall = `(function asyncCall(num) {
+    if (num === 0) {
+      ${source};
+      return;
+    }
+    Promise.resolve().then(() => asyncCall(num - 1));
+  })(${len})`;
+  Protocol.Runtime.evaluate({expression: asyncCall});
 }
 
 async function setMaxAsyncTaskStacks(max) {
diff --git a/src/v8/test/inspector/debugger/provisional-breakpoint-for-anonymous-script-expected.txt b/src/v8/test/inspector/debugger/provisional-breakpoint-for-anonymous-script-expected.txt
new file mode 100644
index 0000000..43fdca6
--- /dev/null
+++ b/src/v8/test/inspector/debugger/provisional-breakpoint-for-anonymous-script-expected.txt
@@ -0,0 +1,11 @@
+Checks provisional breakpoints by hash in anonymous scripts
+
+Running test: testNextScriptParsed
+function foo(){#}
+
+
+Running test: testPreviousScriptParsed
+var list = list ? list.concat(foo) : [foo]; function foo(){#}
+
+var list = list ? list.concat(foo) : [foo]; function foo(){#}
+
diff --git a/src/v8/test/inspector/debugger/provisional-breakpoint-for-anonymous-script.js b/src/v8/test/inspector/debugger/provisional-breakpoint-for-anonymous-script.js
new file mode 100644
index 0000000..7d97753
--- /dev/null
+++ b/src/v8/test/inspector/debugger/provisional-breakpoint-for-anonymous-script.js
@@ -0,0 +1,69 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+let {session, contextGroup, Protocol} =
+  InspectorTest.start('Checks provisional breakpoints by hash in anonymous scripts');
+session.setupScriptMap();
+
+InspectorTest.runAsyncTestSuite([
+  async function testNextScriptParsed() {
+    await Protocol.Debugger.enable();
+    // set breakpoint in anonymous script..
+    Protocol.Runtime.evaluate({expression: 'function foo(){}'});
+    let {params:{hash}} = await Protocol.Debugger.onceScriptParsed();
+    let {result:{breakpointId}} = await Protocol.Debugger.setBreakpointByUrl({
+      scriptHash: hash,
+      lineNumber: 0,
+      columnNumber: 15
+    });
+    // evaluate the same anonymous script again..
+    Protocol.Runtime.evaluate({expression: 'function foo(){}'});
+    // run function and check Debugger.paused event..
+    let evaluation = Protocol.Runtime.evaluate({expression: 'foo()'});
+    let result = await Promise.race([evaluation, Protocol.Debugger.oncePaused()]);
+    if (result.method !== 'Debugger.paused') {
+      InspectorTest.log('FAIL: breakpoint was ignored');
+    } else {
+      await session.logSourceLocation(result.params.callFrames[0].location);
+    }
+    // remove breakpoint and run again..
+    await Protocol.Debugger.removeBreakpoint({breakpointId});
+    evaluation = Protocol.Runtime.evaluate({expression: 'foo()'});
+    result = await Promise.race([evaluation, Protocol.Debugger.oncePaused()]);
+    if (result.method === 'Debugger.paused') {
+      InspectorTest.log('FAIL: breakpoint was not removed');
+    }
+    await Protocol.Debugger.disable();
+  },
+  async function testPreviousScriptParsed() {
+    await Protocol.Debugger.enable();
+    // run script and store function to global list..
+    await Protocol.Runtime.evaluate({expression: 'var list = list ? list.concat(foo) : [foo]; function foo(){}'});
+    // run same script again..
+    Protocol.Runtime.evaluate({expression: 'var list = list ? list.concat(foo) : [foo]; function foo(){}'});
+    let {params:{hash}} = await Protocol.Debugger.onceScriptParsed();
+    // set breakpoint by hash of latest script..
+    let {result:{breakpointId}} = await Protocol.Debugger.setBreakpointByUrl({
+      scriptHash: hash,
+      lineNumber: 0,
+      columnNumber: 49
+    });
+    // call each function in global list and wait for Debugger.paused events..
+    let evaluation = Protocol.Runtime.evaluate({expression: 'list.forEach(x => x())'});
+    let result = await Promise.race([evaluation, Protocol.Debugger.oncePaused()]);
+    while (result.method === 'Debugger.paused') {
+      await session.logSourceLocation(result.params.callFrames[0].location);
+      Protocol.Debugger.resume();
+      result = await Promise.race([evaluation, Protocol.Debugger.oncePaused()]);
+    }
+    // remove breakpoint and call functions again..
+    await Protocol.Debugger.removeBreakpoint({breakpointId});
+    evaluation = Protocol.Runtime.evaluate({expression: 'foo()'});
+    result = await Promise.race([evaluation, Protocol.Debugger.oncePaused()]);
+    if (result.method === 'Debugger.paused') {
+      InspectorTest.log('FAIL: breakpoint was not removed');
+    }
+    await Protocol.Debugger.disable();
+  }
+]);
diff --git a/src/v8/test/inspector/debugger/restore-breakpoint.js b/src/v8/test/inspector/debugger/restore-breakpoint.js
index e0d2b84..020143f 100644
--- a/src/v8/test/inspector/debugger/restore-breakpoint.js
+++ b/src/v8/test/inspector/debugger/restore-breakpoint.js
@@ -5,6 +5,7 @@
 let {session, contextGroup, Protocol} = InspectorTest.start('Checks that debugger agent uses source content to restore breakpoints.');
 
 Protocol.Debugger.enable();
+var finishedTests = 0;
 InspectorTest.runTestSuite([
   function testSameSource(next) {
     var source = 'function foo() {\nboo();\n}';
@@ -43,27 +44,28 @@
   }
 ]);
 
-var finishedTests = 0;
 async function test(source, newSource, location, next) {
-  var firstBreakpoint = true;
-  Protocol.Debugger.onBreakpointResolved(message => {
-    var lineNumber = message.params.location.lineNumber;
-    var columnNumber = message.params.location.columnNumber;
-    var currentSource = firstBreakpoint ? source : newSource;
-    var lines = currentSource.split('\n');
+  function dumpSourceWithBreakpoint(source, location) {
+    var lineNumber = location.lineNumber;
+    var columnNumber = location.columnNumber;
+    var lines = source.split('\n');
     lines = lines.map(line => line.length > 80 ? line.substring(0, 77) + '...' : line);
     lines[lineNumber] = lines[lineNumber].slice(0, columnNumber) + '#' + lines[lineNumber].slice(columnNumber);
     InspectorTest.log(lines.join('\n'));
-    firstBreakpoint = false;
-  });
+  }
+
+  Protocol.Debugger.onBreakpointResolved(message => {
+    dumpSourceWithBreakpoint(newSource, message.params.location);
+  })
 
   var sourceURL = `test${++finishedTests}.js`;
-  await Protocol.Debugger.setBreakpointByUrl({
+  await Protocol.Runtime.evaluate({ expression: `${source}\n//# sourceURL=${sourceURL}` });
+  let {result:{locations}} = await Protocol.Debugger.setBreakpointByUrl({
     url: sourceURL,
     lineNumber: location.lineNumber,
     columnNumber: location.columnNumber
   });
-  await Protocol.Runtime.evaluate({ expression: `${source}\n//# sourceURL=${sourceURL}` });
+  dumpSourceWithBreakpoint(source, locations[0]);
   await Protocol.Runtime.evaluate({ expression: `${newSource}\n//# sourceURL=${sourceURL}` });
   next();
 }
diff --git a/src/v8/test/inspector/debugger/return-break-locations-expected.txt b/src/v8/test/inspector/debugger/return-break-locations-expected.txt
index 688faf8..4b7d487 100644
--- a/src/v8/test/inspector/debugger/return-break-locations-expected.txt
+++ b/src/v8/test/inspector/debugger/return-break-locations-expected.txt
@@ -26,4 +26,10 @@
         scriptId : <scriptId>
         type : return
     }
+    [4] : {
+        columnNumber : 1
+        lineNumber : 6
+        scriptId : <scriptId>
+        type : return
+    }
 ]
diff --git a/src/v8/test/inspector/debugger/schedule-step-into-async-set-timeout-expected.txt b/src/v8/test/inspector/debugger/schedule-step-into-async-set-timeout-expected.txt
index afcc5e3..28f3a19 100644
--- a/src/v8/test/inspector/debugger/schedule-step-into-async-set-timeout-expected.txt
+++ b/src/v8/test/inspector/debugger/schedule-step-into-async-set-timeout-expected.txt
@@ -21,7 +21,8 @@
 
 Running test: testDebuggerStmtBeforeCallback2
 paused at:
-debugger; setTimeout(() => 1#, 0);debugger;
+setTimeout('debugger//should-break-here', 0);
+#setTimeout(() => 1, 0);
 
 paused at:
 #debugger//should-break-here
diff --git a/src/v8/test/inspector/debugger/set-breakpoint-at-last-line-expected.txt b/src/v8/test/inspector/debugger/set-breakpoint-at-last-line-expected.txt
new file mode 100644
index 0000000..d8b7d70
--- /dev/null
+++ b/src/v8/test/inspector/debugger/set-breakpoint-at-last-line-expected.txt
@@ -0,0 +1,16 @@
+Tests breakpoint at last line.
+{
+    breakpointId : <breakpointId>
+    locations : [
+        [0] : {
+            columnNumber : 12
+            lineNumber : 3
+            scriptId : <scriptId>
+        }
+    ]
+}
+{
+    breakpointId : <breakpointId>
+    locations : [
+    ]
+}
diff --git a/src/v8/test/inspector/debugger/set-breakpoint-at-last-line.js b/src/v8/test/inspector/debugger/set-breakpoint-at-last-line.js
new file mode 100644
index 0000000..0be590e
--- /dev/null
+++ b/src/v8/test/inspector/debugger/set-breakpoint-at-last-line.js
@@ -0,0 +1,28 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+let {session, contextGroup, Protocol} = InspectorTest.start('Tests breakpoint at last line.');
+
+let source = `
+  let a = 1;
+  //# sourceURL=foo.js
+  let b = 2;
+`;
+
+(async function test() {
+  Protocol.Debugger.enable();
+  Protocol.Runtime.evaluate({expression: source});
+  let {result} = await Protocol.Debugger.setBreakpointByUrl({
+    url: 'foo.js',
+    lineNumber: 3,
+    columnNumber: 12
+  });
+  InspectorTest.logMessage(result);
+  ({result} = await Protocol.Debugger.setBreakpointByUrl({
+    url: 'foo.js',
+    lineNumber: 4
+  }));
+  InspectorTest.logMessage(result);
+  InspectorTest.completeTest();
+})();
diff --git a/src/v8/test/inspector/debugger/set-breakpoint-ignore-hint-when-no-location-expected.txt b/src/v8/test/inspector/debugger/set-breakpoint-ignore-hint-when-no-location-expected.txt
new file mode 100644
index 0000000..ad51391
--- /dev/null
+++ b/src/v8/test/inspector/debugger/set-breakpoint-ignore-hint-when-no-location-expected.txt
@@ -0,0 +1,11 @@
+Tests breakpoint when two scripts have the same url.
+{
+    breakpointId : <breakpointId>
+    locations : [
+        [0] : {
+            columnNumber : 2
+            lineNumber : 2
+            scriptId : <scriptId>
+        }
+    ]
+}
diff --git a/src/v8/test/inspector/debugger/set-breakpoint-ignore-hint-when-no-location.js b/src/v8/test/inspector/debugger/set-breakpoint-ignore-hint-when-no-location.js
new file mode 100644
index 0000000..d72d31b
--- /dev/null
+++ b/src/v8/test/inspector/debugger/set-breakpoint-ignore-hint-when-no-location.js
@@ -0,0 +1,27 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+let {session, contextGroup, Protocol} = InspectorTest.start(
+  'Tests breakpoint when two scripts have the same url.');
+
+// Order of addScript is important!
+contextGroup.addScript(`
+function boo() {
+  return 42;
+}
+function foo() {}
+`, 0, 0, 'test.js');
+
+contextGroup.addScript(`function foo() {}`, 15, 0, 'test.js');
+
+(async function test() {
+  await Protocol.Debugger.enable();
+  let {result} = await Protocol.Debugger.setBreakpointByUrl({
+    url: 'test.js',
+    lineNumber: 2,
+    columnNumber: 2
+  });
+  InspectorTest.logMessage(result);
+  InspectorTest.completeTest();
+})();
diff --git a/src/v8/test/inspector/debugger/step-into-break-on-async-call-expected.txt b/src/v8/test/inspector/debugger/step-into-break-on-async-call-expected.txt
new file mode 100644
index 0000000..26975c1
--- /dev/null
+++ b/src/v8/test/inspector/debugger/step-into-break-on-async-call-expected.txt
@@ -0,0 +1,13 @@
+Test for Debugger.stepInto with breakOnAsyncCall.
+
+Running test: testSetTimeout
+(anonymous) (test.js:0:0)
+asyncCallStackTraceId is set
+setTimeout (test.js:0:11)
+asyncCallStackTraceId is empty
+
+Running test: testPromiseThen
+(anonymous) (test.js:0:2)
+asyncCallStackTraceId is set
+p.then (test.js:0:7)
+asyncCallStackTraceId is empty
diff --git a/src/v8/test/inspector/debugger/step-into-break-on-async-call.js b/src/v8/test/inspector/debugger/step-into-break-on-async-call.js
new file mode 100644
index 0000000..6a185c0
--- /dev/null
+++ b/src/v8/test/inspector/debugger/step-into-break-on-async-call.js
@@ -0,0 +1,61 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+let {session, contextGroup, Protocol} =
+    InspectorTest.start('Test for Debugger.stepInto with breakOnAsyncCall.');
+
+InspectorTest.runAsyncTestSuite([
+  async function testSetTimeout() {
+    Protocol.Debugger.enable();
+    Protocol.Debugger.pause();
+    let pausedPromise = Protocol.Debugger.oncePaused();
+    Protocol.Runtime.evaluate({
+      expression: 'setTimeout(() => 42, 0)//# sourceURL=test.js'
+    });
+    await pausedPromise;
+    Protocol.Debugger.stepInto({breakOnAsyncCall: true});
+    let {params: {callFrames, asyncCallStackTraceId}} =
+        await Protocol.Debugger.oncePaused();
+    session.logCallFrames(callFrames);
+    if (asyncCallStackTraceId) {
+      InspectorTest.log('asyncCallStackTraceId is set');
+    }
+    Protocol.Debugger.pauseOnAsyncCall(
+        {parentStackTraceId: asyncCallStackTraceId});
+    pausedPromise = Protocol.Debugger.oncePaused();
+    Protocol.Debugger.resume();
+    ({params: {callFrames, asyncCallStackTraceId}} = await pausedPromise);
+    session.logCallFrames(callFrames);
+    if (!asyncCallStackTraceId) {
+      InspectorTest.log('asyncCallStackTraceId is empty');
+    }
+    await Protocol.Debugger.disable();
+  },
+
+  async function testPromiseThen() {
+    Protocol.Debugger.enable();
+    Protocol.Runtime.evaluate({expression: 'var p = Promise.resolve()'});
+    Protocol.Debugger.pause();
+    let pausedPromise = Protocol.Debugger.oncePaused();
+    Protocol.Runtime.evaluate({expression: 'p.then(() => 42)//# sourceURL=test.js'});
+    await pausedPromise;
+    Protocol.Debugger.stepInto({breakOnAsyncCall: true});
+    let {params: {callFrames, asyncCallStackTraceId}} =
+        await Protocol.Debugger.oncePaused();
+    session.logCallFrames(callFrames);
+    if (asyncCallStackTraceId) {
+      InspectorTest.log('asyncCallStackTraceId is set');
+    }
+    Protocol.Debugger.pauseOnAsyncCall(
+        {parentStackTraceId: asyncCallStackTraceId});
+    pausedPromise = Protocol.Debugger.oncePaused();
+    Protocol.Debugger.resume();
+    ({params: {callFrames, asyncCallStackTraceId}} = await pausedPromise);
+    session.logCallFrames(callFrames);
+    if (!asyncCallStackTraceId) {
+      InspectorTest.log('asyncCallStackTraceId is empty');
+    }
+    await Protocol.Debugger.disable();
+  }
+]);
diff --git a/src/v8/test/inspector/debugger/step-into-external-async-task-expected.txt b/src/v8/test/inspector/debugger/step-into-external-async-task-expected.txt
new file mode 100644
index 0000000..fcc5f9a
--- /dev/null
+++ b/src/v8/test/inspector/debugger/step-into-external-async-task-expected.txt
@@ -0,0 +1,14 @@
+Test for step-into remote async task
+Setup debugger agents..
+Pause before stack trace is captured..
+Run stepInto with breakOnAsyncCall flag
+Call pauseOnAsyncCall
+Trigger external async task on another context group
+Dump stack trace
+boo (target.js:1:18)
+call (framework.js:3:2)
+(anonymous) (target.js:0:0)
+-- remote-task --
+store (utils.js:2:25)
+foo (source.js:1:13)
+(anonymous) (source.js:2:6)
diff --git a/src/v8/test/inspector/debugger/step-into-external-async-task-same-context-expected.txt b/src/v8/test/inspector/debugger/step-into-external-async-task-same-context-expected.txt
new file mode 100644
index 0000000..e6ab816
--- /dev/null
+++ b/src/v8/test/inspector/debugger/step-into-external-async-task-same-context-expected.txt
@@ -0,0 +1,14 @@
+Test for step-into remote async task.
+Setup debugger agents..
+Pause before stack trace is captured..
+Run stepInto with breakOnAsyncCall flag
+Call pauseOnAsyncCall
+Trigger external async task on another context group
+Dump stack trace
+boo (target.js:1:18)
+call (framework.js:3:2)
+(anonymous) (target.js:0:0)
+-- remote-task --
+store (utils.js:2:25)
+foo (source.js:1:13)
+(anonymous) (source.js:2:6)
diff --git a/src/v8/test/inspector/debugger/step-into-external-async-task-same-context.js b/src/v8/test/inspector/debugger/step-into-external-async-task-same-context.js
new file mode 100644
index 0000000..fec7864
--- /dev/null
+++ b/src/v8/test/inspector/debugger/step-into-external-async-task-same-context.js
@@ -0,0 +1,81 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+let {session, contextGroup, Protocol} =
+    InspectorTest.start('Test for step-into remote async task.');
+
+contextGroup.addScript(`
+function store(description) {
+  let buffer = inspector.storeCurrentStackTrace(description);
+  return '[' + new Int32Array(buffer).join(',') + ']';
+}
+//# sourceURL=utils.js`);
+
+contextGroup.addScript(`
+function call(id, f) {
+  inspector.externalAsyncTaskStarted(Int32Array.from(JSON.parse(id)).buffer);
+  f();
+  inspector.externalAsyncTaskFinished(Int32Array.from(JSON.parse(id)).buffer);
+}
+//# sourceURL=framework.js`);
+
+session.setupScriptMap();
+
+(async function test() {
+  InspectorTest.log('Setup debugger agents..');
+  let debuggerId = (await Protocol.Debugger.enable()).result.debuggerId;
+
+  Protocol.Debugger.setAsyncCallStackDepth({maxDepth: 128});
+  Protocol.Debugger.setBlackboxPatterns({patterns: ['framework\.js']});
+
+  InspectorTest.log('Pause before stack trace is captured..');
+  Protocol.Debugger.setBreakpointByUrl(
+      {lineNumber: 2, columnNumber: 25, url: 'utils.js'});
+  let evaluatePromise = Protocol.Runtime.evaluate({
+    expression: `(function foo() {
+      return store('remote-task');
+    })()
+    //# sourceURL=source.js`
+  });
+  await Protocol.Debugger.oncePaused();
+
+  InspectorTest.log('Run stepInto with breakOnAsyncCall flag');
+  Protocol.Debugger.stepInto({breakOnAsyncCall: true});
+  let {params: {asyncCallStackTraceId}} = await Protocol.Debugger.oncePaused();
+
+  InspectorTest.log('Call pauseOnAsyncCall');
+  Protocol.Debugger.pauseOnAsyncCall({
+    parentStackTraceId: asyncCallStackTraceId,
+  });
+  Protocol.Debugger.resume();
+
+  InspectorTest.log('Trigger external async task on another context group');
+  let stackTraceId = (await evaluatePromise).result.result.value;
+  Protocol.Runtime.evaluate({
+    expression: `call('${stackTraceId}',
+      function boo() {})
+    //# sourceURL=target.js`
+  });
+
+  InspectorTest.log('Dump stack trace');
+  let {params: {callFrames, asyncStackTraceId}} =
+      await Protocol.Debugger.oncePaused();
+  while (true) {
+    session.logCallFrames(callFrames);
+    if (asyncStackTraceId) {
+      let {result: {stackTrace}} = await Protocol.Debugger.getStackTrace(
+          {stackTraceId: asyncStackTraceId});
+      InspectorTest.log(`-- ${stackTrace.description} --`);
+      callFrames = stackTrace.callFrames;
+      asyncStackTraceId = stackTrace.parentId;
+    } else {
+      break;
+    }
+  }
+
+  Protocol.Debugger.setAsyncCallStackDepth({maxDepth: 0});
+  await Protocol.Debugger.disable();
+
+  InspectorTest.completeTest();
+})()
diff --git a/src/v8/test/inspector/debugger/step-into-external-async-task.js b/src/v8/test/inspector/debugger/step-into-external-async-task.js
new file mode 100644
index 0000000..7c7c238
--- /dev/null
+++ b/src/v8/test/inspector/debugger/step-into-external-async-task.js
@@ -0,0 +1,107 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+InspectorTest.log('Test for step-into remote async task');
+
+let contextGroup1 = new InspectorTest.ContextGroup();
+let session1 = contextGroup1.connect();
+let Protocol1 = session1.Protocol;
+let contextGroup2 = new InspectorTest.ContextGroup();
+let session2 = contextGroup2.connect();
+let Protocol2 = session2.Protocol;
+
+let utilsScript = `
+function store(description) {
+  let buffer = inspector.storeCurrentStackTrace(description);
+  return '[' + new Int32Array(buffer).join(',') + ']';
+}
+//# sourceURL=utils.js`;
+
+contextGroup1.addScript(utilsScript);
+contextGroup2.addScript(utilsScript);
+
+let frameworkScript = `
+function call(id, f) {
+  inspector.externalAsyncTaskStarted(Int32Array.from(JSON.parse(id)).buffer);
+  f();
+  inspector.externalAsyncTaskFinished(Int32Array.from(JSON.parse(id)).buffer);
+}
+//# sourceURL=framework.js`;
+
+contextGroup1.addScript(frameworkScript);
+contextGroup2.addScript(frameworkScript);
+
+session1.setupScriptMap();
+session2.setupScriptMap();
+
+(async function test() {
+  InspectorTest.log('Setup debugger agents..');
+  let debuggerId1 = (await Protocol1.Debugger.enable()).result.debuggerId;
+  let debuggerId2 = (await Protocol2.Debugger.enable()).result.debuggerId;
+
+  Protocol1.Debugger.setAsyncCallStackDepth({maxDepth: 128});
+  Protocol2.Debugger.setAsyncCallStackDepth({maxDepth: 128});
+
+  Protocol1.Debugger.setBlackboxPatterns({patterns: ['framework\.js']});
+  Protocol2.Debugger.setBlackboxPatterns({patterns: ['framework\.js']});
+
+  InspectorTest.log('Pause before stack trace is captured..');
+  Protocol1.Debugger.setBreakpointByUrl(
+      {lineNumber: 2, columnNumber: 25, url: 'utils.js'});
+  let evaluatePromise = Protocol1.Runtime.evaluate({
+    expression: `(function foo() {
+      return store('remote-task');
+    })()
+    //# sourceURL=source.js`
+  });
+  await Protocol1.Debugger.oncePaused();
+
+  InspectorTest.log('Run stepInto with breakOnAsyncCall flag');
+  Protocol1.Debugger.stepInto({breakOnAsyncCall: true});
+  let {params: {asyncCallStackTraceId}} = await Protocol1.Debugger.oncePaused();
+
+  InspectorTest.log('Call pauseOnAsyncCall');
+  Protocol2.Debugger.pauseOnAsyncCall({
+    parentStackTraceId: asyncCallStackTraceId,
+  });
+  Protocol1.Debugger.resume();
+
+  InspectorTest.log('Trigger external async task on another context group');
+  let stackTraceId = (await evaluatePromise).result.result.value;
+  Protocol2.Runtime.evaluate({
+    expression: `call('${stackTraceId}',
+      function boo() {})
+    //# sourceURL=target.js`
+  });
+
+  InspectorTest.log('Dump stack trace');
+  let {params: {callFrames, asyncStackTraceId}} =
+      await Protocol2.Debugger.oncePaused();
+  let debuggers = new Map(
+      [[debuggerId1, Protocol1.Debugger], [debuggerId2, Protocol2.Debugger]]);
+  let sessions = new Map([[debuggerId1, session1], [debuggerId2, session2]]);
+  let currentDebuggerId = debuggerId1;
+  while (true) {
+    sessions.get(currentDebuggerId).logCallFrames(callFrames);
+    if (asyncStackTraceId) {
+      currentDebuggerId = asyncStackTraceId.debuggerId;
+      let {result: {stackTrace}} =
+          await debuggers.get(currentDebuggerId).getStackTrace({
+            stackTraceId: asyncStackTraceId
+          });
+      InspectorTest.log(`-- ${stackTrace.description} --`);
+      callFrames = stackTrace.callFrames;
+      asyncStackTraceId = stackTrace.parentId;
+    } else {
+      break;
+    }
+  }
+
+  Protocol1.Debugger.setAsyncCallStackDepth({maxDepth: 0});
+  Protocol2.Debugger.setAsyncCallStackDepth({maxDepth: 0});
+  await Protocol1.Debugger.disable();
+  await Protocol2.Debugger.disable();
+
+  InspectorTest.completeTest();
+})()
diff --git a/src/v8/test/inspector/debugger/this-in-arrow-function-expected.txt b/src/v8/test/inspector/debugger/this-in-arrow-function-expected.txt
new file mode 100644
index 0000000..3532183
--- /dev/null
+++ b/src/v8/test/inspector/debugger/this-in-arrow-function-expected.txt
@@ -0,0 +1,107 @@
+Checks this in arrow function scope
+    (function() {
+      let f = () => { #debugger; };
+      f();
+
+This on callFrame:
+{
+    type : undefined
+}
+This in evaluateOnCallFrame:
+{
+    type : undefined
+}
+Values equal: true
+
+      let f = () => { debugger; };
+      #f();
+    }).call('a');
+
+This on callFrame:
+{
+    className : String
+    description : String
+    objectId : <objectId>
+    type : object
+}
+This in evaluateOnCallFrame:
+{
+    className : String
+    description : String
+    objectId : <objectId>
+    type : object
+}
+Values equal: true
+
+      f();
+    }).#call('a');
+    return a;
+
+This on callFrame:
+{
+    className : Number
+    description : Number
+    objectId : <objectId>
+    type : object
+}
+This in evaluateOnCallFrame:
+{
+    className : Number
+    description : Number
+    objectId : <objectId>
+    type : object
+}
+Values equal: true
+
+function boo() {
+  foo.call(1)#();
+}
+
+This on callFrame:
+{
+    className : Object
+    description : Object
+    objectId : <objectId>
+    type : object
+}
+This in evaluateOnCallFrame:
+{
+    className : Object
+    description : Object
+    objectId : <objectId>
+    type : object
+}
+Values equal: true
+
+}
+(() => boo.#call({}))();
+
+This on callFrame:
+{
+    type : undefined
+}
+This in evaluateOnCallFrame:
+{
+    type : undefined
+}
+Values equal: true
+
+}
+(() => boo.call({}))#();
+
+This on callFrame:
+{
+    className : global
+    description : global
+    objectId : <objectId>
+    type : object
+}
+This in evaluateOnCallFrame:
+{
+    className : Object
+    description : Object
+    objectId : <objectId>
+    type : object
+}
+Values equal: false
+
diff --git a/src/v8/test/inspector/debugger/this-in-arrow-function.js b/src/v8/test/inspector/debugger/this-in-arrow-function.js
new file mode 100644
index 0000000..37c2962
--- /dev/null
+++ b/src/v8/test/inspector/debugger/this-in-arrow-function.js
@@ -0,0 +1,54 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+let {session, contextGroup, Protocol} =
+    InspectorTest.start('Checks this in arrow function scope');
+
+(async function test() {
+  session.setupScriptMap();
+  Protocol.Debugger.enable();
+  Protocol.Runtime.evaluate({expression: `
+function foo() {
+  return () => {
+    let a = this;
+    (function() {
+      let f = () => { debugger; };
+      f();
+    }).call('a');
+    return a;
+  };
+}
+function boo() {
+  foo.call(1)();
+}
+(() => boo.call({}))();`
+  });
+  let {params:{callFrames}} = await Protocol.Debugger.oncePaused();
+  for (let callFrame of callFrames) {
+    await session.logSourceLocation(callFrame.location);
+
+    InspectorTest.log('This on callFrame:');
+    InspectorTest.logMessage(callFrame.this);
+    let {result:{result}} = await Protocol.Debugger.evaluateOnCallFrame({
+      callFrameId: callFrame.callFrameId,
+      expression: 'this'
+    });
+    InspectorTest.log('This in evaluateOnCallFrame:');
+    InspectorTest.logMessage(result);
+
+    if (callFrame.this.type === 'undefined' || result.type === 'undefined') {
+      InspectorTest.log('Values equal: ' + (callFrame.this.type === result.type) + '\n');
+      continue;
+    }
+
+    let {result:{result:{value}}} = await Protocol.Runtime.callFunctionOn({
+      functionDeclaration: 'function equal(a) { return this === a; }',
+      objectId: callFrame.this.objectId,
+      arguments: [ result.value ? {value: result.value} : {objectId: result.objectId}],
+      returnByValue: true
+    });
+    InspectorTest.log('Values equal: ' + value + '\n');
+  }
+  InspectorTest.completeTest();
+})();
diff --git a/src/v8/test/inspector/debugger/wasm-scripts-expected.txt b/src/v8/test/inspector/debugger/wasm-scripts-expected.txt
index 5d23605..0afcc86 100644
--- a/src/v8/test/inspector/debugger/wasm-scripts-expected.txt
+++ b/src/v8/test/inspector/debugger/wasm-scripts-expected.txt
@@ -1,9 +1,10 @@
 Tests how wasm scripts are reported
 Check that inspector gets two wasm scripts at module creation time.
 Script #0 parsed. URL: v8://test/testFunction
-Script #1 parsed. URL: v8://test/runTestRunction
-Script #2 parsed. URL: wasm://wasm/wasm-7b04570e/wasm-7b04570e-0
-Script #3 parsed. URL: wasm://wasm/wasm-7b04570e/wasm-7b04570e-1
+Script #1 parsed. URL: 
+Script #2 parsed. URL: v8://test/runTestRunction
+Script #3 parsed. URL: wasm://wasm/wasm-7b04570e/wasm-7b04570e-0
+Script #4 parsed. URL: wasm://wasm/wasm-7b04570e/wasm-7b04570e-1
 Source for wasm://wasm/wasm-7b04570e/wasm-7b04570e-0:
 func $nopFunction
   nop
diff --git a/src/v8/test/inspector/heap-profiler/sampling-heap-profiler-expected.txt b/src/v8/test/inspector/heap-profiler/sampling-heap-profiler-expected.txt
new file mode 100644
index 0000000..2b14f90
--- /dev/null
+++ b/src/v8/test/inspector/heap-profiler/sampling-heap-profiler-expected.txt
@@ -0,0 +1,7 @@
+Checks sampling heap profiler methods.
+Expected error: V8 sampling heap profiler was not started.
+Allocated size is zero in the beginning: true
+Allocated size is more than 100KB after a chunk is allocated: true
+Allocated size increased after one more chunk is allocated: true
+Allocated size did not change after stopping: true
+Successfully finished
diff --git a/src/v8/test/inspector/heap-profiler/sampling-heap-profiler.js b/src/v8/test/inspector/heap-profiler/sampling-heap-profiler.js
new file mode 100644
index 0000000..1b82a46
--- /dev/null
+++ b/src/v8/test/inspector/heap-profiler/sampling-heap-profiler.js
@@ -0,0 +1,48 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --sampling-heap-profiler-suppress-randomness
+
+(async function() {
+  let {contextGroup, Protocol} = InspectorTest.start('Checks sampling heap profiler methods.');
+
+  contextGroup.addScript(`
+    var holder = [];
+    function allocateChunk() {
+      holder.push(new Array(100000).fill(42));
+    }
+    //# sourceURL=test.js`);
+
+  Protocol.HeapProfiler.enable();
+
+  const profile0 = await Protocol.HeapProfiler.getSamplingProfile();
+  InspectorTest.log('Expected error: ' + profile0.error.message);
+
+  await Protocol.HeapProfiler.startSampling();
+  const profile1 = await Protocol.HeapProfiler.getSamplingProfile();
+  const size1 = nodeSize(profile1.result.profile.head);
+  InspectorTest.log('Allocated size is zero in the beginning:', size1 === 0);
+
+  await Protocol.Runtime.evaluate({ expression: 'allocateChunk()' });
+  const profile2 = await Protocol.HeapProfiler.getSamplingProfile();
+  const size2 = nodeSize(profile2.result.profile.head);
+  InspectorTest.log('Allocated size is more than 100KB after a chunk is allocated:', size2 > 100000);
+
+  await Protocol.Runtime.evaluate({ expression: 'allocateChunk()' });
+  const profile3 = await Protocol.HeapProfiler.getSamplingProfile();
+  const size3 = nodeSize(profile3.result.profile.head);
+  InspectorTest.log('Allocated size increased after one more chunk is allocated:', size3 > size2);
+
+  const profile4 = await Protocol.HeapProfiler.stopSampling();
+  const size4 = nodeSize(profile4.result.profile.head);
+  InspectorTest.log('Allocated size did not change after stopping:', size4 === size3);
+
+  InspectorTest.log('Successfully finished');
+  InspectorTest.completeTest();
+
+  function nodeSize(node) {
+    return node.children.reduce((res, child) => res + nodeSize(child),
+                                node.callFrame.functionName === 'allocateChunk' ? node.selfSize : 0);
+  }
+})();
diff --git a/src/v8/test/inspector/inspector-test.cc b/src/v8/test/inspector/inspector-test.cc
index dcaf582..04a23df 100644
--- a/src/v8/test/inspector/inspector-test.cc
+++ b/src/v8/test/inspector/inspector-test.cc
@@ -175,7 +175,8 @@
   v8::internal::Vector<uint16_t> message_;
 };
 
-void RunAsyncTask(TaskRunner* task_runner, const char* task_name,
+void RunAsyncTask(TaskRunner* task_runner,
+                  const v8_inspector::StringView& task_name,
                   TaskRunner::Task* task) {
   class AsyncTask : public TaskRunner::Task {
    public:
@@ -193,10 +194,7 @@
     DISALLOW_COPY_AND_ASSIGN(AsyncTask);
   };
 
-  task_runner->data()->AsyncTaskScheduled(
-      v8_inspector::StringView(reinterpret_cast<const uint8_t*>(task_name),
-                               strlen(task_name)),
-      task, false);
+  task_runner->data()->AsyncTaskScheduled(task_name, task, false);
   task_runner->Append(new AsyncTask(task));
 }
 
@@ -299,6 +297,10 @@
     utils->Set(ToV8String(isolate, "setLogConsoleApiMessageCalls"),
                v8::FunctionTemplate::New(
                    isolate, &UtilsExtension::SetLogConsoleApiMessageCalls));
+    utils->Set(
+        ToV8String(isolate, "setLogMaxAsyncCallStackDepthChanged"),
+        v8::FunctionTemplate::New(
+            isolate, &UtilsExtension::SetLogMaxAsyncCallStackDepthChanged));
     utils->Set(ToV8String(isolate, "createContextGroup"),
                v8::FunctionTemplate::New(isolate,
                                          &UtilsExtension::CreateContextGroup));
@@ -318,6 +320,8 @@
     backend_runner_ = runner;
   }
 
+  static void ClearAllSessions() { channels_.clear(); }
+
  private:
   static TaskRunner* backend_runner_;
 
@@ -486,6 +490,17 @@
         args[0].As<v8::Boolean>()->Value());
   }
 
+  static void SetLogMaxAsyncCallStackDepthChanged(
+      const v8::FunctionCallbackInfo<v8::Value>& args) {
+    if (args.Length() != 1 || !args[0]->IsBoolean()) {
+      fprintf(stderr,
+              "Internal error: setLogMaxAsyncCallStackDepthChanged(bool).");
+      Exit();
+    }
+    backend_runner_->data()->SetLogMaxAsyncCallStackDepthChanged(
+        args[0].As<v8::Boolean>()->Value());
+  }
+
   static void CreateContextGroup(
       const v8::FunctionCallbackInfo<v8::Value>& args) {
     if (args.Length() != 0) {
@@ -609,13 +624,16 @@
     v8::Local<v8::Context> context = isolate->GetCurrentContext();
     IsolateData* data = IsolateData::FromContext(context);
     int context_group_id = data->GetContextGroupId(context);
+    const char* task_name = "setTimeout";
+    v8_inspector::StringView task_name_view(
+        reinterpret_cast<const uint8_t*>(task_name), strlen(task_name));
     if (args[0]->IsFunction()) {
-      RunAsyncTask(data->task_runner(), "setTimeout",
+      RunAsyncTask(data->task_runner(), task_name_view,
                    new SetTimeoutTask(context_group_id, isolate,
                                       v8::Local<v8::Function>::Cast(args[0])));
     } else {
       RunAsyncTask(
-          data->task_runner(), "setTimeout",
+          data->task_runner(), task_name_view,
           new ExecuteStringTask(
               context_group_id, ToVector(args[0].As<v8::String>()),
               v8::String::Empty(isolate), v8::Integer::New(isolate, 0),
@@ -673,6 +691,22 @@
         ToV8String(isolate, "markObjectAsNotInspectable"),
         v8::FunctionTemplate::New(
             isolate, &InspectorExtension::MarkObjectAsNotInspectable));
+    inspector->Set(ToV8String(isolate, "createObjectWithAccessor"),
+                   v8::FunctionTemplate::New(
+                       isolate, &InspectorExtension::CreateObjectWithAccessor));
+    inspector->Set(ToV8String(isolate, "storeCurrentStackTrace"),
+                   v8::FunctionTemplate::New(
+                       isolate, &InspectorExtension::StoreCurrentStackTrace));
+    inspector->Set(ToV8String(isolate, "externalAsyncTaskStarted"),
+                   v8::FunctionTemplate::New(
+                       isolate, &InspectorExtension::ExternalAsyncTaskStarted));
+    inspector->Set(
+        ToV8String(isolate, "externalAsyncTaskFinished"),
+        v8::FunctionTemplate::New(
+            isolate, &InspectorExtension::ExternalAsyncTaskFinished));
+    inspector->Set(ToV8String(isolate, "scheduleWithAsyncStack"),
+                   v8::FunctionTemplate::New(
+                       isolate, &InspectorExtension::ScheduleWithAsyncStack));
     global->Set(ToV8String(isolate, "inspector"), inspector);
   }
 
@@ -812,14 +846,125 @@
                      v8::True(isolate))
         .ToChecked();
   }
+
+  static void CreateObjectWithAccessor(
+      const v8::FunctionCallbackInfo<v8::Value>& args) {
+    if (args.Length() != 2 || !args[0]->IsString() || !args[1]->IsBoolean()) {
+      fprintf(stderr,
+              "Internal error: createObjectWithAccessor('accessor name', "
+              "hasSetter)\n");
+      Exit();
+    }
+    v8::Isolate* isolate = args.GetIsolate();
+    v8::Local<v8::ObjectTemplate> templ = v8::ObjectTemplate::New(isolate);
+    if (args[1].As<v8::Boolean>()->Value()) {
+      templ->SetAccessor(v8::Local<v8::String>::Cast(args[0]), AccessorGetter,
+                         AccessorSetter);
+    } else {
+      templ->SetAccessor(v8::Local<v8::String>::Cast(args[0]), AccessorGetter);
+    }
+    args.GetReturnValue().Set(
+        templ->NewInstance(isolate->GetCurrentContext()).ToLocalChecked());
+  }
+
+  static void AccessorGetter(v8::Local<v8::String> property,
+                             const v8::PropertyCallbackInfo<v8::Value>& info) {
+    v8::Isolate* isolate = info.GetIsolate();
+    isolate->ThrowException(ToV8String(isolate, "Getter is called"));
+  }
+
+  static void AccessorSetter(v8::Local<v8::String> property,
+                             v8::Local<v8::Value> value,
+                             const v8::PropertyCallbackInfo<void>& info) {
+    v8::Isolate* isolate = info.GetIsolate();
+    isolate->ThrowException(ToV8String(isolate, "Setter is called"));
+  }
+
+  static void StoreCurrentStackTrace(
+      const v8::FunctionCallbackInfo<v8::Value>& args) {
+    if (args.Length() != 1 || !args[0]->IsString()) {
+      fprintf(stderr,
+              "Internal error: storeCurrentStackTrace('description')\n");
+      Exit();
+    }
+    v8::Isolate* isolate = args.GetIsolate();
+    v8::Local<v8::Context> context = isolate->GetCurrentContext();
+    IsolateData* data = IsolateData::FromContext(context);
+    v8::internal::Vector<uint16_t> description =
+        ToVector(args[0].As<v8::String>());
+    v8_inspector::StringView description_view(description.start(),
+                                              description.length());
+    v8_inspector::V8StackTraceId id =
+        data->StoreCurrentStackTrace(description_view);
+    v8::Local<v8::ArrayBuffer> buffer =
+        v8::ArrayBuffer::New(isolate, sizeof(id));
+    *static_cast<v8_inspector::V8StackTraceId*>(buffer->GetContents().Data()) =
+        id;
+    args.GetReturnValue().Set(buffer);
+  }
+
+  static void ExternalAsyncTaskStarted(
+      const v8::FunctionCallbackInfo<v8::Value>& args) {
+    if (args.Length() != 1 || !args[0]->IsArrayBuffer()) {
+      fprintf(stderr, "Internal error: externalAsyncTaskStarted(id)\n");
+      Exit();
+    }
+    v8::Local<v8::Context> context = args.GetIsolate()->GetCurrentContext();
+    IsolateData* data = IsolateData::FromContext(context);
+    v8_inspector::V8StackTraceId* id =
+        static_cast<v8_inspector::V8StackTraceId*>(
+            args[0].As<v8::ArrayBuffer>()->GetContents().Data());
+    data->ExternalAsyncTaskStarted(*id);
+  }
+
+  static void ExternalAsyncTaskFinished(
+      const v8::FunctionCallbackInfo<v8::Value>& args) {
+    if (args.Length() != 1 || !args[0]->IsArrayBuffer()) {
+      fprintf(stderr, "Internal error: externalAsyncTaskFinished(id)\n");
+      Exit();
+    }
+    v8::Local<v8::Context> context = args.GetIsolate()->GetCurrentContext();
+    IsolateData* data = IsolateData::FromContext(context);
+    v8_inspector::V8StackTraceId* id =
+        static_cast<v8_inspector::V8StackTraceId*>(
+            args[0].As<v8::ArrayBuffer>()->GetContents().Data());
+    data->ExternalAsyncTaskFinished(*id);
+  }
+
+  static void ScheduleWithAsyncStack(
+      const v8::FunctionCallbackInfo<v8::Value>& args) {
+    if (args.Length() != 3 || !args[0]->IsFunction() || !args[1]->IsString() ||
+        !args[2]->IsBoolean()) {
+      fprintf(stderr,
+              "Internal error: scheduleWithAsyncStack(function, "
+              "'task-name', with_empty_stack).");
+      Exit();
+    }
+    v8::Isolate* isolate = args.GetIsolate();
+    v8::Local<v8::Context> context = isolate->GetCurrentContext();
+    IsolateData* data = IsolateData::FromContext(context);
+    int context_group_id = data->GetContextGroupId(context);
+    bool with_empty_stack = args[2].As<v8::Boolean>()->Value();
+    if (with_empty_stack) context->Exit();
+
+    v8::internal::Vector<uint16_t> task_name =
+        ToVector(args[1].As<v8::String>());
+    v8_inspector::StringView task_name_view(task_name.start(),
+                                            task_name.length());
+
+    RunAsyncTask(data->task_runner(), task_name_view,
+                 new SetTimeoutTask(context_group_id, isolate,
+                                    v8::Local<v8::Function>::Cast(args[0])));
+    if (with_empty_stack) context->Enter();
+  }
 };
 
 }  //  namespace
 
 int main(int argc, char* argv[]) {
   v8::V8::InitializeICUDefaultLocation(argv[0]);
-  v8::Platform* platform = v8::platform::CreateDefaultPlatform();
-  v8::V8::InitializePlatform(platform);
+  std::unique_ptr<v8::Platform> platform(v8::platform::NewDefaultPlatform());
+  v8::V8::InitializePlatform(platform.get());
   v8::V8::SetFlagsFromCommandLine(&argc, argv, true);
   v8::V8::InitializeExternalStartupData(argv[0]);
   v8::V8::Initialize();
@@ -880,5 +1025,6 @@
   backend_runner.Join();
 
   delete startup_data.data;
+  UtilsExtension::ClearAllSessions();
   return 0;
 }
diff --git a/src/v8/test/inspector/isolate-data.cc b/src/v8/test/inspector/isolate-data.cc
index e43dd21..a18ef90 100644
--- a/src/v8/test/inspector/isolate-data.cc
+++ b/src/v8/test/inspector/isolate-data.cc
@@ -63,19 +63,20 @@
   params.array_buffer_allocator =
       v8::ArrayBuffer::Allocator::NewDefaultAllocator();
   params.snapshot_blob = startup_data;
-  isolate_ = v8::Isolate::New(params);
+  isolate_.reset(v8::Isolate::New(params));
   isolate_->SetMicrotasksPolicy(v8::MicrotasksPolicy::kScoped);
   if (with_inspector) {
     isolate_->AddMessageListener(&IsolateData::MessageHandler);
     isolate_->SetPromiseRejectCallback(&IsolateData::PromiseRejectHandler);
-    inspector_ = v8_inspector::V8Inspector::create(isolate_, this);
+    inspector_ = v8_inspector::V8Inspector::create(isolate_.get(), this);
   }
-  v8::HandleScope handle_scope(isolate_);
+  v8::HandleScope handle_scope(isolate_.get());
   not_inspectable_private_.Reset(
-      isolate_, v8::Private::ForApi(isolate_, v8::String::NewFromUtf8(
-                                                  isolate_, "notInspectable",
-                                                  v8::NewStringType::kNormal)
-                                                  .ToLocalChecked()));
+      isolate_.get(),
+      v8::Private::ForApi(isolate_.get(), v8::String::NewFromUtf8(
+                                              isolate_.get(), "notInspectable",
+                                              v8::NewStringType::kNormal)
+                                              .ToLocalChecked()));
 }
 
 IsolateData* IsolateData::FromContext(v8::Local<v8::Context> context) {
@@ -84,27 +85,27 @@
 }
 
 int IsolateData::CreateContextGroup() {
-  v8::HandleScope handle_scope(isolate_);
+  v8::HandleScope handle_scope(isolate_.get());
   v8::Local<v8::ObjectTemplate> global_template =
-      v8::ObjectTemplate::New(isolate_);
+      v8::ObjectTemplate::New(isolate_.get());
   for (auto it = setup_global_tasks_.begin(); it != setup_global_tasks_.end();
        ++it) {
-    (*it)->Run(isolate_, global_template);
+    (*it)->Run(isolate_.get(), global_template);
   }
   v8::Local<v8::Context> context =
-      v8::Context::New(isolate_, nullptr, global_template);
+      v8::Context::New(isolate_.get(), nullptr, global_template);
   context->SetAlignedPointerInEmbedderData(kIsolateDataIndex, this);
   int context_group_id = ++last_context_group_id_;
   // Should be 2-byte aligned.
   context->SetAlignedPointerInEmbedderData(
       kContextGroupIdIndex, reinterpret_cast<void*>(context_group_id * 2));
-  contexts_[context_group_id].Reset(isolate_, context);
+  contexts_[context_group_id].Reset(isolate_.get(), context);
   if (inspector_) FireContextCreated(context, context_group_id);
   return context_group_id;
 }
 
 v8::Local<v8::Context> IsolateData::GetContext(int context_group_id) {
-  return contexts_[context_group_id].Get(isolate_);
+  return contexts_[context_group_id].Get(isolate_.get());
 }
 
 int IsolateData::GetContextGroupId(v8::Local<v8::Context> context) {
@@ -126,7 +127,7 @@
   }
   v8::Local<v8::Value> result;
   if (!module->Evaluate(context).ToLocal(&result)) return;
-  modules_[name] = v8::Global<v8::Module>(isolate_, module);
+  modules_[name] = v8::Global<v8::Module>(isolate_.get(), module);
 }
 
 // static
@@ -134,8 +135,8 @@
     v8::Local<v8::Context> context, v8::Local<v8::String> specifier,
     v8::Local<v8::Module> referrer) {
   IsolateData* data = IsolateData::FromContext(context);
-  std::string str = *v8::String::Utf8Value(data->isolate_, specifier);
-  return data->modules_[ToVector(specifier)].Get(data->isolate_);
+  std::string str = *v8::String::Utf8Value(data->isolate(), specifier);
+  return data->modules_[ToVector(specifier)].Get(data->isolate());
 }
 
 int IsolateData::ConnectSession(int context_group_id,
@@ -202,11 +203,27 @@
   inspector_->asyncTaskFinished(task);
 }
 
+v8_inspector::V8StackTraceId IsolateData::StoreCurrentStackTrace(
+    const v8_inspector::StringView& description) {
+  return inspector_->storeCurrentStackTrace(description);
+}
+
+void IsolateData::ExternalAsyncTaskStarted(
+    const v8_inspector::V8StackTraceId& parent) {
+  inspector_->externalAsyncTaskStarted(parent);
+}
+
+void IsolateData::ExternalAsyncTaskFinished(
+    const v8_inspector::V8StackTraceId& parent) {
+  inspector_->externalAsyncTaskFinished(parent);
+}
+
 void IsolateData::AddInspectedObject(int session_id,
                                      v8::Local<v8::Value> object) {
   auto it = sessions_.find(session_id);
   if (it == sessions_.end()) return;
-  std::unique_ptr<Inspectable> inspectable(new Inspectable(isolate_, object));
+  std::unique_ptr<Inspectable> inspectable(
+      new Inspectable(isolate_.get(), object));
   it->second->addInspectedObject(std::move(inspectable));
 }
 
@@ -363,13 +380,17 @@
 }
 
 void IsolateData::SetMemoryInfo(v8::Local<v8::Value> memory_info) {
-  memory_info_.Reset(isolate_, memory_info);
+  memory_info_.Reset(isolate_.get(), memory_info);
 }
 
 void IsolateData::SetLogConsoleApiMessageCalls(bool log) {
   log_console_api_message_calls_ = log;
 }
 
+void IsolateData::SetLogMaxAsyncCallStackDepthChanged(bool log) {
+  log_max_async_call_stack_depth_changed_ = log;
+}
+
 v8::MaybeLocal<v8::Value> IsolateData::memoryInfo(v8::Isolate* isolate,
                                                   v8::Local<v8::Context>) {
   if (memory_info_.IsEmpty()) return v8::MaybeLocal<v8::Value>();
@@ -389,10 +410,15 @@
                                     unsigned lineNumber, unsigned columnNumber,
                                     v8_inspector::V8StackTrace* stack) {
   if (!log_console_api_message_calls_) return;
-  Print(isolate_, message);
+  Print(isolate_.get(), message);
   fprintf(stdout, " (");
-  Print(isolate_, url);
+  Print(isolate_.get(), url);
   fprintf(stdout, ":%d:%d)", lineNumber, columnNumber);
-  Print(isolate_, stack->toString()->string());
+  Print(isolate_.get(), stack->toString()->string());
   fprintf(stdout, "\n");
 }
+
+void IsolateData::maxAsyncCallStackDepthChanged(int depth) {
+  if (!log_max_async_call_stack_depth_changed_) return;
+  fprintf(stdout, "maxAsyncCallStackDepthChanged: %d\n", depth);
+}
diff --git a/src/v8/test/inspector/isolate-data.h b/src/v8/test/inspector/isolate-data.h
index b8f3b9e..5eb9803 100644
--- a/src/v8/test/inspector/isolate-data.h
+++ b/src/v8/test/inspector/isolate-data.h
@@ -30,7 +30,7 @@
               v8::StartupData* startup_data, bool with_inspector);
   static IsolateData* FromContext(v8::Local<v8::Context> context);
 
-  v8::Isolate* isolate() const { return isolate_; }
+  v8::Isolate* isolate() const { return isolate_.get(); }
   TaskRunner* task_runner() const { return task_runner_; }
 
   // Setting things up.
@@ -58,12 +58,19 @@
                           bool recurring);
   void AsyncTaskStarted(void* task);
   void AsyncTaskFinished(void* task);
+
+  v8_inspector::V8StackTraceId StoreCurrentStackTrace(
+      const v8_inspector::StringView& description);
+  void ExternalAsyncTaskStarted(const v8_inspector::V8StackTraceId& parent);
+  void ExternalAsyncTaskFinished(const v8_inspector::V8StackTraceId& parent);
+
   void AddInspectedObject(int session_id, v8::Local<v8::Value> object);
 
   // Test utilities.
   void SetCurrentTimeMS(double time);
   void SetMemoryInfo(v8::Local<v8::Value> memory_info);
   void SetLogConsoleApiMessageCalls(bool log);
+  void SetLogMaxAsyncCallStackDepthChanged(bool log);
   void SetMaxAsyncTaskStacksForTest(int limit);
   void DumpAsyncTaskStacksStateForTest();
   void FireContextCreated(v8::Local<v8::Context> context, int context_group_id);
@@ -106,10 +113,19 @@
                          unsigned lineNumber, unsigned columnNumber,
                          v8_inspector::V8StackTrace*) override;
   bool isInspectableHeapObject(v8::Local<v8::Object>) override;
+  void maxAsyncCallStackDepthChanged(int depth) override;
+
+  // The isolate gets deleted by its {Dispose} method, not by the default
+  // deleter. Therefore we have to define a custom deleter for the unique_ptr to
+  // call {Dispose}. We have to use the unique_ptr so that the isolate get
+  // disposed in the right order, relative to other member variables.
+  struct IsolateDeleter {
+    void operator()(v8::Isolate* isolate) const { isolate->Dispose(); }
+  };
 
   TaskRunner* task_runner_;
   SetupGlobalTasks setup_global_tasks_;
-  v8::Isolate* isolate_;
+  std::unique_ptr<v8::Isolate, IsolateDeleter> isolate_;
   std::unique_ptr<v8_inspector::V8Inspector> inspector_;
   int last_context_group_id_ = 0;
   std::map<int, v8::Global<v8::Context>> contexts_;
@@ -123,6 +139,7 @@
   bool current_time_set_ = false;
   double current_time_ = 0.0;
   bool log_console_api_message_calls_ = false;
+  bool log_max_async_call_stack_depth_changed_ = false;
   v8::Global<v8::Private> not_inspectable_private_;
 
   DISALLOW_COPY_AND_ASSIGN(IsolateData);
diff --git a/src/v8/test/inspector/protocol-test.js b/src/v8/test/inspector/protocol-test.js
index be7314b..91f55e4 100644
--- a/src/v8/test/inspector/protocol-test.js
+++ b/src/v8/test/inspector/protocol-test.js
@@ -37,16 +37,19 @@
   if (message.id)
     message.id = "<messageId>";
 
-  const nonStableFields = new Set(["objectId", "scriptId", "exceptionId", "timestamp",
-    "executionContextId", "callFrameId", "breakpointId", "bindRemoteObjectFunctionId", "formatterObjectId" ]);
+  const nonStableFields = new Set([
+    'objectId', 'scriptId', 'exceptionId', 'timestamp', 'executionContextId',
+    'callFrameId', 'breakpointId', 'bindRemoteObjectFunctionId',
+    'formatterObjectId', 'debuggerId'
+  ]);
   var objects = [ message ];
   while (objects.length) {
     var object = objects.shift();
     for (var key in object) {
       if (nonStableFields.has(key))
         object[key] = `<${key}>`;
-      else if (typeof object[key] === "string" && object[key].match(/\d+:\d+:\d+:debug/))
-        object[key] = object[key].replace(/\d+/, '<scriptId>');
+      else if (typeof object[key] === "string" && object[key].match(/\d+:\d+:\d+:\d+/))
+        object[key] = object[key].substring(0, object[key].lastIndexOf(':')) + ":<scriptId>";
       else if (typeof object[key] === "object")
         objects.push(object[key]);
     }
@@ -298,13 +301,9 @@
 
   logAsyncStackTrace(asyncStackTrace) {
     while (asyncStackTrace) {
-      if (asyncStackTrace.promiseCreationFrame) {
-        var frame = asyncStackTrace.promiseCreationFrame;
-        InspectorTest.log(`-- ${asyncStackTrace.description} (${frame.url}:${frame.lineNumber}:${frame.columnNumber})--`);
-      } else {
-        InspectorTest.log(`-- ${asyncStackTrace.description} --`);
-      }
+      InspectorTest.log(`-- ${asyncStackTrace.description || '<empty>'} --`);
       this.logCallFrames(asyncStackTrace.callFrames);
+      if (asyncStackTrace.parentId) InspectorTest.log('  <external stack>');
       asyncStackTrace = asyncStackTrace.parent;
     }
   }
diff --git a/src/v8/test/inspector/runtime/await-promise-expected.txt b/src/v8/test/inspector/runtime/await-promise-expected.txt
index 3e23a71..2b906dd 100644
--- a/src/v8/test/inspector/runtime/await-promise-expected.txt
+++ b/src/v8/test/inspector/runtime/await-promise-expected.txt
@@ -26,22 +26,6 @@
             }
             exceptionId : <exceptionId>
             lineNumber : 0
-            stackTrace : {
-                callFrames : [
-                ]
-                parent : {
-                    callFrames : [
-                        [0] : {
-                            columnNumber : 8
-                            functionName : 
-                            lineNumber : 0
-                            scriptId : <scriptId>
-                            url : 
-                        }
-                    ]
-                    description : Promise.reject
-                }
-            }
             text : Uncaught (in promise)
         }
         result : {
@@ -66,29 +50,6 @@
             }
             exceptionId : <exceptionId>
             lineNumber : 0
-            stackTrace : {
-                callFrames : [
-                ]
-                parent : {
-                    callFrames : [
-                        [0] : {
-                            columnNumber : 4
-                            functionName : rejectPromise
-                            lineNumber : 17
-                            scriptId : <scriptId>
-                            url : test.js
-                        }
-                        [1] : {
-                            columnNumber : 0
-                            functionName : 
-                            lineNumber : 0
-                            scriptId : <scriptId>
-                            url : 
-                        }
-                    ]
-                    description : Promise.reject
-                }
-            }
             text : Uncaught (in promise)
         }
         result : {
@@ -114,29 +75,6 @@
             }
             exceptionId : <exceptionId>
             lineNumber : 0
-            stackTrace : {
-                callFrames : [
-                ]
-                parent : {
-                    callFrames : [
-                        [0] : {
-                            columnNumber : 4
-                            functionName : rejectPromiseWithAnError
-                            lineNumber : 24
-                            scriptId : <scriptId>
-                            url : test.js
-                        }
-                        [1] : {
-                            columnNumber : 0
-                            functionName : 
-                            lineNumber : 0
-                            scriptId : <scriptId>
-                            url : 
-                        }
-                    ]
-                    description : Promise.reject
-                }
-            }
             text : Uncaught (in promise) Error: MyError
         }
         result : {
diff --git a/src/v8/test/inspector/runtime/command-line-api-expected.txt b/src/v8/test/inspector/runtime/command-line-api-expected.txt
index f655e7b..11e60d9 100644
--- a/src/v8/test/inspector/runtime/command-line-api-expected.txt
+++ b/src/v8/test/inspector/runtime/command-line-api-expected.txt
@@ -255,12 +255,12 @@
 foo (:0:16)
 (anonymous) (:0:0)
 [
-    [0] : <scriptId>:0:12:debug
+    [0] : 5:0:12:<scriptId>
 ]
 foo (:0:16)
 (anonymous) (:0:0)
 [
-    [0] : <scriptId>:0:12:debug
+    [0] : 5:0:12:<scriptId>
 ]
 
 Running test: testMonitor
diff --git a/src/v8/test/inspector/runtime/console-methods-expected.txt b/src/v8/test/inspector/runtime/console-methods-expected.txt
index 81c3c76..fea4ca6 100644
--- a/src/v8/test/inspector/runtime/console-methods-expected.txt
+++ b/src/v8/test/inspector/runtime/console-methods-expected.txt
@@ -653,7 +653,7 @@
         args : [
             [0] : {
                 type : string
-                value : 1
+                value : default: 1
             }
         ]
         executionContextId : <executionContextId>
@@ -692,7 +692,7 @@
         args : [
             [0] : {
                 type : string
-                value : 2
+                value : default: 2
             }
         ]
         executionContextId : <executionContextId>
@@ -725,3 +725,99 @@
         type : count
     }
 }
+{
+    method : Runtime.consoleAPICalled
+    params : {
+        args : [
+            [0] : {
+                type : string
+                value : default: 3
+            }
+        ]
+        executionContextId : <executionContextId>
+        stackTrace : {
+            callFrames : [
+                [0] : {
+                    columnNumber : 10
+                    functionName : testFunction
+                    lineNumber : 31
+                    scriptId : <scriptId>
+                    url : test.js
+                }
+                [1] : {
+                    columnNumber : 0
+                    functionName : 
+                    lineNumber : 0
+                    scriptId : <scriptId>
+                    url : 
+                }
+            ]
+        }
+        timestamp : <timestamp>
+        type : count
+    }
+}
+{
+    method : Runtime.consoleAPICalled
+    params : {
+        args : [
+            [0] : {
+                type : string
+                value : default: 4
+            }
+        ]
+        executionContextId : <executionContextId>
+        stackTrace : {
+            callFrames : [
+                [0] : {
+                    columnNumber : 10
+                    functionName : testFunction
+                    lineNumber : 32
+                    scriptId : <scriptId>
+                    url : test.js
+                }
+                [1] : {
+                    columnNumber : 0
+                    functionName : 
+                    lineNumber : 0
+                    scriptId : <scriptId>
+                    url : 
+                }
+            ]
+        }
+        timestamp : <timestamp>
+        type : count
+    }
+}
+{
+    method : Runtime.consoleAPICalled
+    params : {
+        args : [
+            [0] : {
+                type : string
+                value : default: 5
+            }
+        ]
+        executionContextId : <executionContextId>
+        stackTrace : {
+            callFrames : [
+                [0] : {
+                    columnNumber : 10
+                    functionName : testFunction
+                    lineNumber : 33
+                    scriptId : <scriptId>
+                    url : test.js
+                }
+                [1] : {
+                    columnNumber : 0
+                    functionName : 
+                    lineNumber : 0
+                    scriptId : <scriptId>
+                    url : 
+                }
+            ]
+        }
+        timestamp : <timestamp>
+        type : count
+    }
+}
diff --git a/src/v8/test/inspector/runtime/console-methods.js b/src/v8/test/inspector/runtime/console-methods.js
index c9e0e1d..f2919a6 100644
--- a/src/v8/test/inspector/runtime/console-methods.js
+++ b/src/v8/test/inspector/runtime/console-methods.js
@@ -29,6 +29,9 @@
   }
   foo();
   foo();
+  console.count();
+  console.count(undefined);
+  console.count('default');
 }
 //# sourceURL=test.js`, 7, 26);
 
diff --git a/src/v8/test/inspector/runtime/console-time-end-format-expected.txt b/src/v8/test/inspector/runtime/console-time-end-format-expected.txt
index 92fa158..d09dc41 100644
--- a/src/v8/test/inspector/runtime/console-time-end-format-expected.txt
+++ b/src/v8/test/inspector/runtime/console-time-end-format-expected.txt
@@ -27,3 +27,11 @@
 Running test: huge
 js: 1e+42ms
 timeEnd: 1e+42ms
+
+Running test: undefinedAsLabel
+js: 1ms
+default: 1ms
+
+Running test: emptyAsLabel
+js: 1ms
+default: 1ms
diff --git a/src/v8/test/inspector/runtime/console-time-end-format.js b/src/v8/test/inspector/runtime/console-time-end-format.js
index 7e4ff78..4b28f67 100644
--- a/src/v8/test/inspector/runtime/console-time-end-format.js
+++ b/src/v8/test/inspector/runtime/console-time-end-format.js
@@ -9,37 +9,43 @@
   InspectorTest.log(message.params.args[0].value);
 });
 
-InspectorTest.runTestSuite([
-  function zero(next) {
-    checkInterval(0.0).then(next);
+InspectorTest.runAsyncTestSuite([
+  function zero() {
+    return checkInterval(0.0);
   },
-  function verySmall(next) {
-    checkInterval(1e-15).then(next);
+  function verySmall() {
+    return checkInterval(1e-15);
   },
-  function small(next) {
-    checkInterval(0.001).then(next);
+  function small() {
+    return checkInterval(0.001);
   },
-  function regular(next) {
-    checkInterval(1.2345).then(next);
+  function regular() {
+    return checkInterval(1.2345);
   },
-  function big(next) {
-    checkInterval(10000.2345).then(next);
+  function big() {
+    return checkInterval(10000.2345);
   },
-  function veryBig(next) {
-    checkInterval(1e+15 + 0.2345).then(next);
+  function veryBig() {
+    return checkInterval(1e+15 + 0.2345);
   },
-  function huge(next) {
-    checkInterval(1e+42).then(next);
+  function huge() {
+    return checkInterval(1e+42);
+  },
+  function undefinedAsLabel() {
+    return checkInterval(1.0, 'undefined');
+  },
+  function emptyAsLabel() {
+    return checkInterval(1.0, '');
   }
 ]);
 
-function checkInterval(time) {
+async function checkInterval(time, label) {
+  label = label === undefined ? '\'timeEnd\'' : label;
   utils.setCurrentTimeMSForTest(0.0);
-  return Protocol.Runtime.evaluate({
-    expression: `console.log('js: ' + ${time} + 'ms')`})
-    .then(() => Protocol.Runtime.evaluate({
-      expression: 'console.time(\'timeEnd\')'}))
-    .then(() => utils.setCurrentTimeMSForTest(time))
-    .then(() => Protocol.Runtime.evaluate({
-      expression: 'console.timeEnd(\'timeEnd\')'}));
+  Protocol.Runtime.evaluate({
+    expression: `console.log('js: ' + ${time} + 'ms')`
+  });
+  await Protocol.Runtime.evaluate({expression: `console.time(${label})`});
+  utils.setCurrentTimeMSForTest(time);
+  await Protocol.Runtime.evaluate({expression: `console.timeEnd(${label})`});
 }
diff --git a/src/v8/test/inspector/runtime/console-time-repeat-expected.txt b/src/v8/test/inspector/runtime/console-time-repeat-expected.txt
new file mode 100644
index 0000000..b675532
--- /dev/null
+++ b/src/v8/test/inspector/runtime/console-time-repeat-expected.txt
@@ -0,0 +1,76 @@
+Checks that repeated console.time do not reset
+{
+    method : Runtime.consoleAPICalled
+    params : {
+        args : [
+            [0] : {
+                type : string
+                value : Timer 'a' already exists
+            }
+        ]
+        executionContextId : <executionContextId>
+        stackTrace : {
+            callFrames : [
+                [0] : {
+                    columnNumber : 8
+                    functionName : 
+                    lineNumber : 0
+                    scriptId : <scriptId>
+                    url : 
+                }
+            ]
+        }
+        timestamp : <timestamp>
+        type : warning
+    }
+}
+{
+    method : Runtime.consoleAPICalled
+    params : {
+        args : [
+            [0] : {
+                type : string
+                value : a: 2ms
+            }
+        ]
+        executionContextId : <executionContextId>
+        stackTrace : {
+            callFrames : [
+                [0] : {
+                    columnNumber : 8
+                    functionName : 
+                    lineNumber : 0
+                    scriptId : <scriptId>
+                    url : 
+                }
+            ]
+        }
+        timestamp : <timestamp>
+        type : timeEnd
+    }
+}
+{
+    method : Runtime.consoleAPICalled
+    params : {
+        args : [
+            [0] : {
+                type : string
+                value : Timer 'a' does not exist
+            }
+        ]
+        executionContextId : <executionContextId>
+        stackTrace : {
+            callFrames : [
+                [0] : {
+                    columnNumber : 8
+                    functionName : 
+                    lineNumber : 0
+                    scriptId : <scriptId>
+                    url : 
+                }
+            ]
+        }
+        timestamp : <timestamp>
+        type : warning
+    }
+}
diff --git a/src/v8/test/inspector/runtime/console-time-repeat.js b/src/v8/test/inspector/runtime/console-time-repeat.js
new file mode 100644
index 0000000..f9a5f6d
--- /dev/null
+++ b/src/v8/test/inspector/runtime/console-time-repeat.js
@@ -0,0 +1,20 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+let {session, contextGroup, Protocol} = InspectorTest.start('Checks that repeated console.time do not reset');
+
+Protocol.Runtime.onConsoleAPICalled(InspectorTest.logMessage);
+Protocol.Runtime.enable();
+(async function() {
+  utils.setCurrentTimeMSForTest(0.0);
+  await Protocol.Runtime.evaluate({expression: `console.time('a')`});
+  utils.setCurrentTimeMSForTest(1.0);
+  await Protocol.Runtime.evaluate({expression: `console.time('a')`});
+  utils.setCurrentTimeMSForTest(2.0);
+  await Protocol.Runtime.evaluate({expression: `console.timeEnd('a')`});
+  utils.setCurrentTimeMSForTest(5.0);
+  await Protocol.Runtime.evaluate({expression: `console.timeEnd('a')`});
+
+  InspectorTest.completeTest();
+})();
diff --git a/src/v8/test/inspector/runtime/create-context-expected.txt b/src/v8/test/inspector/runtime/create-context-expected.txt
index e64f75b..770d2e3 100644
--- a/src/v8/test/inspector/runtime/create-context-expected.txt
+++ b/src/v8/test/inspector/runtime/create-context-expected.txt
@@ -22,6 +22,7 @@
 {
     id : <messageId>
     result : {
+        debuggerId : <debuggerId>
     }
 }
 #debugger;
diff --git a/src/v8/test/inspector/runtime/evaluate-async-expected.txt b/src/v8/test/inspector/runtime/evaluate-async-expected.txt
index 763b429..ea47520 100644
--- a/src/v8/test/inspector/runtime/evaluate-async-expected.txt
+++ b/src/v8/test/inspector/runtime/evaluate-async-expected.txt
@@ -43,7 +43,7 @@
             columnNumber : 11
             exception : {
                 className : Error
-                description : Error: MyError     at foo (<anonymous>:13:11)     at throwError (<anonymous>:15:3)     at <anonymous>
+                description : Error: MyError     at foo (<anonymous>:13:11)     at throwError (<anonymous>:15:3)
                 objectId : <objectId>
                 subtype : error
                 type : object
@@ -58,14 +58,14 @@
                         functionName : foo
                         lineNumber : 12
                         scriptId : <scriptId>
-                        url : 
+                        url :
                     }
                     [1] : {
                         columnNumber : 2
                         functionName : throwError
                         lineNumber : 14
                         scriptId : <scriptId>
-                        url : 
+                        url :
                     }
                 ]
             }
@@ -73,7 +73,7 @@
         }
         result : {
             className : Error
-            description : Error: MyError     at foo (<anonymous>:13:11)     at throwError (<anonymous>:15:3)     at <anonymous>
+            description : Error: MyError     at foo (<anonymous>:13:11)     at throwError (<anonymous>:15:3)
             objectId : <objectId>
             subtype : error
             type : object
@@ -89,7 +89,7 @@
             columnNumber : 5
             exception : {
                 className : SyntaxError
-                description : SyntaxError: Unexpected token }     at foo (<anonymous>:21:5)     at throwSyntaxError (<anonymous>:23:3)     at <anonymous>
+                description : SyntaxError: Unexpected token }     at foo (<anonymous>:21:5)     at throwSyntaxError (<anonymous>:23:3)
                 objectId : <objectId>
                 subtype : error
                 type : object
@@ -104,14 +104,14 @@
                         functionName : foo
                         lineNumber : 20
                         scriptId : <scriptId>
-                        url : 
+                        url :
                     }
                     [1] : {
                         columnNumber : 2
                         functionName : throwSyntaxError
                         lineNumber : 22
                         scriptId : <scriptId>
-                        url : 
+                        url :
                     }
                 ]
             }
@@ -119,7 +119,7 @@
         }
         result : {
             className : SyntaxError
-            description : SyntaxError: Unexpected token }     at foo (<anonymous>:21:5)     at throwSyntaxError (<anonymous>:23:3)     at <anonymous>
+            description : SyntaxError: Unexpected token }     at foo (<anonymous>:21:5)     at throwSyntaxError (<anonymous>:23:3)
             objectId : <objectId>
             subtype : error
             type : object
diff --git a/src/v8/test/inspector/runtime/get-properties-expected.txt b/src/v8/test/inspector/runtime/get-properties-expected.txt
index 1f7aa50..340a51c 100644
--- a/src/v8/test/inspector/runtime/get-properties-expected.txt
+++ b/src/v8/test/inspector/runtime/get-properties-expected.txt
@@ -50,3 +50,40 @@
 
 Running test: testTypedArrayWithoutLength
   __proto__ own object undefined
+
+Running test: testArrayBuffer
+[[Int8Array]]
+  0 own number 1
+  1 own number 2
+  2 own number 3
+  3 own number 4
+  4 own number 5
+  5 own number 6
+  6 own number 7
+  7 own number 8
+  __proto__ own object undefined
+[[Uint8Array]]
+  0 own number 1
+  1 own number 2
+  2 own number 3
+  3 own number 4
+  4 own number 5
+  5 own number 6
+  6 own number 7
+  7 own number 8
+  __proto__ own object undefined
+[[Int16Array]]
+  0 own number 513
+  1 own number 1027
+  2 own number 1541
+  3 own number 2055
+  __proto__ own object undefined
+[[Int32Array]]
+  0 own number 67305985
+  1 own number 134678021
+  __proto__ own object undefined
+
+Running test: testArrayBufferWithBrokenUintCtor
+  [[Int8Array]] own object undefined
+  [[Uint8Array]] own object undefined
+  __proto__ own object undefined
diff --git a/src/v8/test/inspector/runtime/get-properties-on-proxy-expected.txt b/src/v8/test/inspector/runtime/get-properties-on-proxy-expected.txt
index 3395956..a0437f4 100644
--- a/src/v8/test/inspector/runtime/get-properties-on-proxy-expected.txt
+++ b/src/v8/test/inspector/runtime/get-properties-on-proxy-expected.txt
@@ -1,4 +1,177 @@
 Check that while Runtime.getProperties call on proxy object no user defined trap will be executed.
+Testing regular Proxy
+{
+    id : <messageId>
+    result : {
+        result : {
+            className : Object
+            description : Proxy
+            objectId : <objectId>
+            preview : {
+                description : Proxy
+                overflow : false
+                properties : [
+                    [0] : {
+                        name : a
+                        type : number
+                        value : 1
+                    }
+                ]
+                subtype : proxy
+                type : object
+            }
+            subtype : proxy
+            type : object
+        }
+    }
+}
+{
+    id : <messageId>
+    result : {
+        internalProperties : [
+            [0] : {
+                name : [[Handler]]
+                value : {
+                    className : Object
+                    description : Object
+                    objectId : <objectId>
+                    type : object
+                }
+            }
+            [1] : {
+                name : [[Target]]
+                value : {
+                    className : Object
+                    description : Object
+                    objectId : <objectId>
+                    type : object
+                }
+            }
+            [2] : {
+                name : [[IsRevoked]]
+                value : {
+                    type : boolean
+                    value : false
+                }
+            }
+        ]
+        result : [
+        ]
+    }
+}
+Testing revocable Proxy
+{
+    id : <messageId>
+    result : {
+        result : {
+            className : Object
+            description : Proxy
+            objectId : <objectId>
+            preview : {
+                description : Proxy
+                overflow : false
+                properties : [
+                    [0] : {
+                        name : a
+                        type : number
+                        value : 1
+                    }
+                ]
+                subtype : proxy
+                type : object
+            }
+            subtype : proxy
+            type : object
+        }
+    }
+}
+{
+    id : <messageId>
+    result : {
+        internalProperties : [
+            [0] : {
+                name : [[Handler]]
+                value : {
+                    className : Object
+                    description : Object
+                    objectId : <objectId>
+                    type : object
+                }
+            }
+            [1] : {
+                name : [[Target]]
+                value : {
+                    className : Object
+                    description : Object
+                    objectId : <objectId>
+                    type : object
+                }
+            }
+            [2] : {
+                name : [[IsRevoked]]
+                value : {
+                    type : boolean
+                    value : false
+                }
+            }
+        ]
+        result : [
+        ]
+    }
+}
+{
+    id : <messageId>
+    result : {
+        result : {
+            className : Object
+            description : Proxy
+            objectId : <objectId>
+            preview : {
+                description : Proxy
+                overflow : false
+                properties : [
+                ]
+                subtype : proxy
+                type : object
+            }
+            subtype : proxy
+            type : object
+        }
+    }
+}
+{
+    id : <messageId>
+    result : {
+        internalProperties : [
+            [0] : {
+                name : [[Handler]]
+                value : {
+                    subtype : null
+                    type : object
+                    value : null
+                }
+            }
+            [1] : {
+                name : [[Target]]
+                value : {
+                    subtype : null
+                    type : object
+                    value : null
+                }
+            }
+            [2] : {
+                name : [[IsRevoked]]
+                value : {
+                    type : boolean
+                    value : true
+                }
+            }
+        ]
+        result : [
+        ]
+    }
+}
+Checking counter
 {
     id : <messageId>
     result : {
diff --git a/src/v8/test/inspector/runtime/get-properties-on-proxy.js b/src/v8/test/inspector/runtime/get-properties-on-proxy.js
index b2981df..0c96a98 100644
--- a/src/v8/test/inspector/runtime/get-properties-on-proxy.js
+++ b/src/v8/test/inspector/runtime/get-properties-on-proxy.js
@@ -6,96 +6,139 @@
 
 contextGroup.addScript(`
 var self = this;
-function testFunction()
+function testFunction(revocable)
 {
-    self.counter = 0;
-    var handler = {
-        get: function(target, name){
-            self.counter++;
-            return Reflect.get.apply(this, arguments);
-        },
-        set: function(target, name){
-            self.counter++;
-            return Reflect.set.apply(this, arguments);
-        },
-        getPrototypeOf: function(target) {
-            self.counter++;
-            return Reflect.getPrototypeOf.apply(this, arguments);
-        },
-        setPrototypeOf: function(target) {
-            self.counter++;
-            return Reflect.setPrototypeOf.apply(this, arguments);
-        },
-        isExtensible: function(target) {
-            self.counter++;
-            return Reflect.isExtensible.apply(this, arguments);
-        },
-        isExtensible: function(target) {
-            self.counter++;
-            return Reflect.isExtensible.apply(this, arguments);
-        },
-        isExtensible: function(target) {
-            self.counter++;
-            return Reflect.isExtensible.apply(this, arguments);
-        },
-        preventExtensions: function() {
-            self.counter++;
-            return Reflect.preventExtensions.apply(this, arguments);
-        },
-        getOwnPropertyDescriptor: function() {
-            self.counter++;
-            return Reflect.getOwnPropertyDescriptor.apply(this, arguments);
-        },
-        defineProperty: function() {
-            self.counter++;
-            return Reflect.defineProperty.apply(this, arguments);
-        },
-        has: function() {
-            self.counter++;
-            return Reflect.has.apply(this, arguments);
-        },
-        get: function() {
-            self.counter++;
-            return Reflect.get.apply(this, arguments);
-        },
-        set: function() {
-            self.counter++;
-            return Reflect.set.apply(this, arguments);
-        },
-        deleteProperty: function() {
-            self.counter++;
-            return Reflect.deleteProperty.apply(this, arguments);
-        },
-        ownKeys: function() {
-            self.counter++;
-            return Reflect.ownKeys.apply(this, arguments);
-        },
-        apply: function() {
-            self.counter++;
-            return Reflect.apply.apply(this, arguments);
-        },
-        construct: function() {
-            self.counter++;
-            return Reflect.construct.apply(this, arguments);
-        }
-    };
-    return new Proxy({ a : 1}, handler);
+  self.counter = 0;
+  var handler = {
+    get: function(target, name){
+      self.counter++;
+      return Reflect.get.apply(this, arguments);
+    },
+    set: function(target, name){
+      self.counter++;
+      return Reflect.set.apply(this, arguments);
+    },
+    getPrototypeOf: function(target) {
+      self.counter++;
+      return Reflect.getPrototypeOf.apply(this, arguments);
+    },
+    setPrototypeOf: function(target) {
+      self.counter++;
+      return Reflect.setPrototypeOf.apply(this, arguments);
+    },
+    isExtensible: function(target) {
+      self.counter++;
+      return Reflect.isExtensible.apply(this, arguments);
+    },
+    isExtensible: function(target) {
+      self.counter++;
+      return Reflect.isExtensible.apply(this, arguments);
+    },
+    isExtensible: function(target) {
+      self.counter++;
+      return Reflect.isExtensible.apply(this, arguments);
+    },
+    preventExtensions: function() {
+      self.counter++;
+      return Reflect.preventExtensions.apply(this, arguments);
+    },
+    getOwnPropertyDescriptor: function() {
+      self.counter++;
+      return Reflect.getOwnPropertyDescriptor.apply(this, arguments);
+    },
+    defineProperty: function() {
+      self.counter++;
+      return Reflect.defineProperty.apply(this, arguments);
+    },
+    has: function() {
+      self.counter++;
+      return Reflect.has.apply(this, arguments);
+    },
+    get: function() {
+      self.counter++;
+      return Reflect.get.apply(this, arguments);
+    },
+    set: function() {
+      self.counter++;
+      return Reflect.set.apply(this, arguments);
+    },
+    deleteProperty: function() {
+      self.counter++;
+      return Reflect.deleteProperty.apply(this, arguments);
+    },
+    ownKeys: function() {
+      self.counter++;
+      return Reflect.ownKeys.apply(this, arguments);
+    },
+    apply: function() {
+      self.counter++;
+      return Reflect.apply.apply(this, arguments);
+    },
+    construct: function() {
+      self.counter++;
+      return Reflect.construct.apply(this, arguments);
+    }
+  };
+  var obj = { a : 1 };
+  if (revocable) {
+    var revocableProxy = Proxy.revocable(obj, handler);
+    return [revocableProxy.proxy, revocableProxy.revoke]
+  } else {
+    return new Proxy(obj, handler);
+  }
 }`);
 
-Protocol.Runtime.evaluate({ expression: "testFunction()"}).then(requestProperties);
-
-function requestProperties(result)
-{
-  Protocol.Runtime.getProperties({ objectId: result.result.objectId, generatePreview: true }).then(checkCounter);
+function getArrayElement(arrayObjectId, idx) {
+  return Protocol.Runtime.callFunctionOn({
+    functionDeclaration: `function() { return this[${idx}]; }`,
+    objectId: arrayObjectId
+  });
 }
 
-function checkCounter(result)
-{
-  Protocol.Runtime.evaluate({ expression: "self.counter" }).then(dumpCounter);
-}
+async function testRegular() {
+  InspectorTest.logMessage("Testing regular Proxy");
 
-function dumpCounter(result)
-{
+  var result = await Protocol.Runtime.evaluate({ expression: "testFunction(false)", generatePreview: true });
   InspectorTest.logMessage(result);
-  InspectorTest.completeTest();
+  var proxyId = result.result.result.objectId;
+  InspectorTest.logMessage(await Protocol.Runtime.getProperties({ objectId: proxyId, generatePreview: true }));
 }
+
+async function testRevocable() {
+  InspectorTest.logMessage("Testing revocable Proxy");
+
+  var result = await Protocol.Runtime.evaluate({ expression: "testFunction(true)" });
+  var proxyInfo = await getArrayElement(result.result.result.objectId, 0);
+  var revokeInfo = await getArrayElement(result.result.result.objectId, 1);
+  var proxyId = proxyInfo.result.result.objectId;
+  InspectorTest.logMessage(await Protocol.Runtime.callFunctionOn({
+    functionDeclaration: `function() { return this; }`,
+    objectId: proxyId,
+    generatePreview: true
+  }))
+  InspectorTest.logMessage(await Protocol.Runtime.getProperties({ objectId: proxyId, generatePreview: true }));
+  await Protocol.Runtime.callFunctionOn({
+    functionDeclaration: `function() { this(); }`,
+    objectId: revokeInfo.result.result.objectId
+  });
+  InspectorTest.logMessage(await Protocol.Runtime.callFunctionOn({
+    functionDeclaration: `function() { return this; }`,
+    objectId: proxyId,
+    generatePreview: true
+  }))
+  InspectorTest.logMessage(await Protocol.Runtime.getProperties({ objectId: proxyId, generatePreview: true }));
+}
+
+async function checkCounter() {
+  InspectorTest.logMessage("Checking counter");
+
+  var result = await Protocol.Runtime.evaluate({ expression: "self.counter" });
+  InspectorTest.logMessage(result);
+}
+
+(async function test() {
+  await testRegular();
+  await testRevocable();
+  await checkCounter();
+  InspectorTest.completeTest();
+})();
diff --git a/src/v8/test/inspector/runtime/get-properties.js b/src/v8/test/inspector/runtime/get-properties.js
index 56a4c4b..d8132bb 100644
--- a/src/v8/test/inspector/runtime/get-properties.js
+++ b/src/v8/test/inspector/runtime/get-properties.js
@@ -5,71 +5,77 @@
 let {session, contextGroup, Protocol} = InspectorTest.start('Checks Runtime.getProperties method');
 
 InspectorTest.runAsyncTestSuite([
-  async function testObject5() {
-    let objectId = (await Protocol.Runtime.evaluate({
-      expression: '(function(){var r = Object(5); r.foo = \'cat\';return r;})()'
-    })).result.result.objectId;
+  function testObject5() {
+    return logExpressionProperties('(function(){var r = Object(5); r.foo = \'cat\';return r;})()');
+  },
+
+  function testNotOwn() {
+    return logExpressionProperties('({ a: 2, set b(_) {}, get b() {return 5;}, __proto__: { a: 3, c: 4, get d() {return 6;} }})', { ownProperties: false });
+  },
+
+  function testAccessorsOnly() {
+    return logExpressionProperties('({ a: 2, set b(_) {}, get b() {return 5;}, c: \'c\', set d(_){} })', { ownProperties: true, accessorPropertiesOnly: true});
+  },
+
+  function testArray() {
+    return logExpressionProperties('[\'red\', \'green\', \'blue\']');
+  },
+
+  function testBound() {
+    return logExpressionProperties('Number.bind({}, 5)');
+  },
+
+  function testObjectThrowsLength() {
+    return logExpressionProperties('({get length() { throw \'Length called\'; }})');
+  },
+
+  function testTypedArrayWithoutLength() {
+    return logExpressionProperties('({__proto__: Uint8Array.prototype})');
+  },
+
+  async function testArrayBuffer() {
+    let objectId = await evaluateToObjectId('new Uint8Array([1, 2, 3, 4, 5, 6, 7, 8]).buffer');
     let props = await Protocol.Runtime.getProperties({ objectId, ownProperties: true });
-    logGetPropertiesResult(props.result);
+    for (let prop of props.result.result) {
+      if (prop.name === '__proto__')
+        continue;
+      InspectorTest.log(prop.name);
+      await logGetPropertiesResult(prop.value.objectId);
+    }
   },
 
-  async function testNotOwn() {
-    let objectId = (await Protocol.Runtime.evaluate({
-      expression: '({ a: 2, set b(_) {}, get b() {return 5;}, __proto__: { a: 3, c: 4, get d() {return 6;} }})'
-    })).result.result.objectId;
-    let props = await Protocol.Runtime.getProperties({ objectId, ownProperties: false });
-    logGetPropertiesResult(props.result);
-  },
-
-  async function testAccessorsOnly() {
-    let objectId = (await Protocol.Runtime.evaluate({
-      expression: '({ a: 2, set b(_) {}, get b() {return 5;}, c: \'c\', set d(_){} })'
-    })).result.result.objectId;
-    let props = await Protocol.Runtime.getProperties({ objectId, ownProperties: true, accessorPropertiesOnly: true });
-    logGetPropertiesResult(props.result);
-  },
-
-  async function testArray() {
-    let objectId = (await Protocol.Runtime.evaluate({
-      expression: '[\'red\', \'green\', \'blue\']'
-    })).result.result.objectId;
-    let props = await Protocol.Runtime.getProperties({ objectId, ownProperties: true });
-    logGetPropertiesResult(props.result);
-  },
-
-  async function testBound() {
-    let objectId = (await Protocol.Runtime.evaluate({
-      expression: 'Number.bind({}, 5)'
-    })).result.result.objectId;
-    let props = await Protocol.Runtime.getProperties({ objectId, ownProperties: true });
-    logGetPropertiesResult(props.result);
-  },
-
-  async function testObjectThrowsLength() {
-    let objectId = (await Protocol.Runtime.evaluate({
-      expression: '({get length() { throw \'Length called\'; }})'
-    })).result.result.objectId;
-    let props = await Protocol.Runtime.getProperties({ objectId, ownProperties: true });
-    logGetPropertiesResult(props.result);
-  },
-
-  async function testTypedArrayWithoutLength() {
-    let objectId = (await Protocol.Runtime.evaluate({
-      expression: '({__proto__: Uint8Array.prototype})'
-    })).result.result.objectId;
-    let props = await Protocol.Runtime.getProperties({ objectId, ownProperties: true });
-    logGetPropertiesResult(props.result);
-  },
+  async function testArrayBufferWithBrokenUintCtor() {
+    await evaluateToObjectId(`(function() {
+      this.uint8array_old = this.Uint8Array;
+      this.Uint8Array = 42;
+    })()`);
+    await logExpressionProperties('new Int8Array([1, 2, 3, 4, 5, 6, 7]).buffer');
+    await evaluateToObjectId(`(function() {
+      this.Uint8Array = this.uint8array_old;
+      delete this.uint8array_old;
+    })()`);
+  }
 ]);
 
-function logGetPropertiesResult(protocolResult) {
+async function logExpressionProperties(expression, flags) {
+  const objectId = await evaluateToObjectId(expression);
+  return await logGetPropertiesResult(objectId, flags);
+}
+
+async function evaluateToObjectId(expression) {
+  return (await Protocol.Runtime.evaluate({ expression })).result.result.objectId;
+}
+
+async function logGetPropertiesResult(objectId, flags = { ownProperties: true }) {
   function hasGetterSetter(property, fieldName) {
     var v = property[fieldName];
     if (!v) return false;
     return v.type !== "undefined"
   }
 
-  var propertyArray = protocolResult.result;
+  flags.objectId = objectId;
+  let props = await Protocol.Runtime.getProperties(flags);
+  var propertyArray = props.result.result;
   propertyArray.sort(NamedThingComparator);
   for (var i = 0; i < propertyArray.length; i++) {
     var p = propertyArray[i];
@@ -81,7 +87,7 @@
       InspectorTest.log("  " + p.name + " " + own + " no value" +
         (hasGetterSetter(p, "get") ? ", getter" : "") + (hasGetterSetter(p, "set") ? ", setter" : ""));
   }
-  var internalPropertyArray = protocolResult.internalProperties;
+  var internalPropertyArray = props.result.internalProperties;
   if (internalPropertyArray) {
     InspectorTest.log("Internal properties");
     internalPropertyArray.sort(NamedThingComparator);
diff --git a/src/v8/test/inspector/runtime/regression-736302-expected.txt b/src/v8/test/inspector/runtime/regression-736302-expected.txt
index 17243f2..2174bc5 100644
--- a/src/v8/test/inspector/runtime/regression-736302-expected.txt
+++ b/src/v8/test/inspector/runtime/regression-736302-expected.txt
@@ -7,7 +7,7 @@
         args : [
             [0] : {
                 type : string
-                value : 1
+                value : default: 1
             }
         ]
         executionContextId : <executionContextId>
diff --git a/src/v8/test/inspector/runtime/runtime-evaluate-null-property-expected.txt b/src/v8/test/inspector/runtime/runtime-evaluate-null-property-expected.txt
new file mode 100644
index 0000000..a001cb8
--- /dev/null
+++ b/src/v8/test/inspector/runtime/runtime-evaluate-null-property-expected.txt
@@ -0,0 +1,18 @@
+Tests Runtime.evaluate returns object with undefined property.
+{
+    id : <messageId>
+    result : {
+        result : {
+            type : object
+            value : {
+                b : null
+                c : [
+                    [0] : 1
+                    [1] : null
+                    [2] : null
+                    [3] : 4
+                ]
+            }
+        }
+    }
+}
diff --git a/src/v8/test/inspector/runtime/runtime-evaluate-null-property.js b/src/v8/test/inspector/runtime/runtime-evaluate-null-property.js
new file mode 100644
index 0000000..665eed8
--- /dev/null
+++ b/src/v8/test/inspector/runtime/runtime-evaluate-null-property.js
@@ -0,0 +1,14 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+let {session, contextGroup, Protocol} = InspectorTest.start(
+    'Tests Runtime.evaluate returns object with undefined property.');
+
+(async function test() {
+  InspectorTest.logMessage(await Protocol.Runtime.evaluate({
+    expression: '({a:undefined,b:null,c:[1, null, undefined, 4]})',
+    returnByValue: true
+  }));
+  InspectorTest.completeTest();
+})();
diff --git a/src/v8/test/inspector/runtime/runtime-get-properties-and-accessor-expected.txt b/src/v8/test/inspector/runtime/runtime-get-properties-and-accessor-expected.txt
new file mode 100644
index 0000000..648187c
--- /dev/null
+++ b/src/v8/test/inspector/runtime/runtime-get-properties-and-accessor-expected.txt
@@ -0,0 +1,33 @@
+Runtime.getProperties for objects with accessor
+title property with getter and setter:
+{
+    configurable : false
+    enumerable : false
+    get : {
+        className : Function
+        description : function nativeGetter() { [native code] }
+        objectId : <objectId>
+        type : function
+    }
+    isOwn : true
+    name : title
+    set : {
+        className : Function
+        description : function nativeSetter() { [native code] }
+        objectId : <objectId>
+        type : function
+    }
+}
+title property with getter only:
+{
+    configurable : false
+    enumerable : false
+    get : {
+        className : Function
+        description : function nativeGetter() { [native code] }
+        objectId : <objectId>
+        type : function
+    }
+    isOwn : true
+    name : title
+}
diff --git a/src/v8/test/inspector/runtime/runtime-get-properties-and-accessor.js b/src/v8/test/inspector/runtime/runtime-get-properties-and-accessor.js
new file mode 100644
index 0000000..e621008
--- /dev/null
+++ b/src/v8/test/inspector/runtime/runtime-get-properties-and-accessor.js
@@ -0,0 +1,29 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+let {session, contextGroup, Protocol} =
+  InspectorTest.start('Runtime.getProperties for objects with accessor');
+
+(async function test() {
+  let {result:{result:{objectId}}} = await Protocol.Runtime.evaluate({
+    expression: 'inspector.createObjectWithAccessor(\'title\', true)'
+  });
+  let {result:{result}} = await Protocol.Runtime.getProperties({
+    objectId,
+    ownProperties: true
+  });
+  InspectorTest.log('title property with getter and setter:');
+  InspectorTest.logMessage(result.find(property => property.name === 'title'));
+
+  ({result:{result:{objectId}}} = await Protocol.Runtime.evaluate({
+    expression: 'inspector.createObjectWithAccessor(\'title\', false)'
+  }));
+  ({result:{result}} = await Protocol.Runtime.getProperties({
+    objectId,
+    ownProperties: true
+  }));
+  InspectorTest.log('title property with getter only:');
+  InspectorTest.logMessage(result.find(property => property.name === 'title'));
+  InspectorTest.completeTest();
+})()
diff --git a/src/v8/test/inspector/runtime/runtime-global-lexical-scope-names-expected.txt b/src/v8/test/inspector/runtime/runtime-global-lexical-scope-names-expected.txt
new file mode 100644
index 0000000..f24ac49
--- /dev/null
+++ b/src/v8/test/inspector/runtime/runtime-global-lexical-scope-names-expected.txt
@@ -0,0 +1,64 @@
+Test for Runtime.globalLexicalScopeVariablesNames
+Running 'let a = 1'
+Values:
+a = 1
+
+Running 'let b = 2'
+Values:
+a = 1
+b = 2
+
+Running 'let b = 3'
+Values:
+a = 1
+b = 2
+
+Running 'const c = 4'
+Values:
+a = 1
+b = 2
+c = 4
+
+Running 'var d = 5'
+(should not be in list of scoped variables)
+Values:
+a = 1
+b = 2
+c = 4
+
+Running 'class Foo{}'
+Values:
+a = 1
+b = 2
+c = 4
+Foo =
+{
+    className : Function
+    description : class Foo{}
+    objectId : <objectId>
+    type : function
+}
+
+Adding script with scope variables
+Values:
+a = 1
+b = 2
+c = 4
+Foo =
+{
+    className : Function
+    description : class Foo{}
+    objectId : <objectId>
+    type : function
+}
+e = 1
+f = 2
+g = 3
+Boo =
+{
+    className : Function
+    description : class Boo {}
+    objectId : <objectId>
+    type : function
+}
+
diff --git a/src/v8/test/inspector/runtime/runtime-global-lexical-scope-names.js b/src/v8/test/inspector/runtime/runtime-global-lexical-scope-names.js
new file mode 100644
index 0000000..7e41f6a
--- /dev/null
+++ b/src/v8/test/inspector/runtime/runtime-global-lexical-scope-names.js
@@ -0,0 +1,59 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+let {session, contextGroup, Protocol} =
+    InspectorTest.start('Test for Runtime.globalLexicalScopeVariablesNames');
+
+(async function test() {
+  InspectorTest.log('Running \'let a = 1\'');
+  Protocol.Runtime.evaluate({expression: 'let a = 1'});
+  await dumpGlobalScopeVariables();
+
+  InspectorTest.log('Running \'let b = 2\'');
+  Protocol.Runtime.evaluate({expression: 'let b = 2'});
+  await dumpGlobalScopeVariables();
+
+  InspectorTest.log('Running \'let b = 3\'');
+  Protocol.Runtime.evaluate({expression: 'let b = 3'});
+  await dumpGlobalScopeVariables();
+
+  InspectorTest.log('Running \'const c = 4\'');
+  Protocol.Runtime.evaluate({expression: 'const c = 4'});
+  await dumpGlobalScopeVariables();
+
+  InspectorTest.log('Running \'var d = 5\'');
+  InspectorTest.log('(should not be in list of scoped variables)');
+  Protocol.Runtime.evaluate({expression: 'var d = 5'});
+  await dumpGlobalScopeVariables();
+
+  InspectorTest.log('Running \'class Foo{}\'');
+  Protocol.Runtime.evaluate({expression: 'class Foo{}'});
+  await dumpGlobalScopeVariables();
+
+  InspectorTest.log('Adding script with scope variables');
+  contextGroup.addScript(`
+  let e = 1;
+  const f = 2;
+  const g = 3;
+  class Boo {};
+  `);
+  await dumpGlobalScopeVariables();
+  InspectorTest.completeTest();
+})();
+
+async function dumpGlobalScopeVariables() {
+  let {result:{names}} =
+      await Protocol.Runtime.globalLexicalScopeNames();
+  InspectorTest.log('Values:');
+  for (let name of names) {
+    let {result:{result}} = await Protocol.Runtime.evaluate({expression: name});
+    if (result.value) {
+      InspectorTest.log(`${name} = ${result.value}`);
+    } else {
+      InspectorTest.log(`${name} =`);
+      InspectorTest.logMessage(result);
+    }
+  }
+  InspectorTest.log('');
+}
diff --git a/src/v8/test/inspector/runtime/runtime-restore.js b/src/v8/test/inspector/runtime/runtime-restore.js
index 09e4467..77fa823 100644
--- a/src/v8/test/inspector/runtime/runtime-restore.js
+++ b/src/v8/test/inspector/runtime/runtime-restore.js
@@ -1,6 +1,6 @@
 // Copyright 2017 the V8 project authors. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.v8
+// found in the LICENSE file.
 
 let {session, contextGroup, Protocol} = InspectorTest.start('Checks that Runtime agent correctly restore its state.');
 
diff --git a/src/v8/test/inspector/sessions/debugger-stepping-and-breakpoints-expected.txt b/src/v8/test/inspector/sessions/debugger-stepping-and-breakpoints-expected.txt
index 2b7cc16..b81fde9 100644
--- a/src/v8/test/inspector/sessions/debugger-stepping-and-breakpoints-expected.txt
+++ b/src/v8/test/inspector/sessions/debugger-stepping-and-breakpoints-expected.txt
@@ -20,12 +20,12 @@
 Evaluating common breakpoint in 1
 Paused in 1:
   reason: other
-  hit breakpoints: test.js:11:0
+  hit breakpoints: 1:11:0:test.js
   location: foo@11
   data: null
 Paused in 2:
   reason: other
-  hit breakpoints: test.js:11:0
+  hit breakpoints: 1:11:0:test.js
   location: foo@11
   data: null
 Resuming in 1
@@ -48,7 +48,7 @@
 Evaluating exclusive breakpoint in 1
 Paused in 1:
   reason: other
-  hit breakpoints: test.js:14:0
+  hit breakpoints: 1:14:0:test.js
   location: baz@14
   data: null
 Paused in 2:
@@ -62,12 +62,12 @@
 Evaluating common breakpoint in 2
 Paused in 1:
   reason: other
-  hit breakpoints: test.js:11:0
+  hit breakpoints: 1:11:0:test.js
   location: foo@11
   data: null
 Paused in 2:
   reason: other
-  hit breakpoints: test.js:11:0
+  hit breakpoints: 1:11:0:test.js
   location: foo@11
   data: null
 Resuming in 2
@@ -90,7 +90,7 @@
 Evaluating exclusive breakpoint in 2
 Paused in 1:
   reason: other
-  hit breakpoints: test.js:14:0
+  hit breakpoints: 1:14:0:test.js
   location: baz@14
   data: null
 Paused in 2:
@@ -197,7 +197,7 @@
 Evaluating common breakpoint in 1
 Paused in 2:
   reason: other
-  hit breakpoints: test.js:11:0
+  hit breakpoints: 1:11:0:test.js
   location: foo@11
   data: null
 Resuming in 2
@@ -210,7 +210,7 @@
 Evaluating common breakpoint in 1
 Paused in 2:
   reason: other
-  hit breakpoints: test.js:11:0
+  hit breakpoints: 1:11:0:test.js
   location: foo@11
   data: null
 Resuming in 2
diff --git a/src/v8/test/inspector/testcfg.py b/src/v8/test/inspector/testcfg.py
index 9c943d9..64fa163 100644
--- a/src/v8/test/inspector/testcfg.py
+++ b/src/v8/test/inspector/testcfg.py
@@ -2,28 +2,22 @@
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
 
-import itertools
 import os
-import re
-import shlex
 
 from testrunner.local import testsuite
 from testrunner.local import utils
 from testrunner.objects import testcase
+from testrunner.outproc import base as outproc
 
-FLAGS_PATTERN = re.compile(r"//\s+Flags:(.*)")
 PROTOCOL_TEST_JS = "protocol-test.js"
 EXPECTED_SUFFIX = "-expected.txt"
 RESOURCES_FOLDER = "resources"
 
-class InspectorProtocolTestSuite(testsuite.TestSuite):
-
-  def __init__(self, name, root):
-    super(InspectorProtocolTestSuite, self).__init__(name, root)
-
+class TestSuite(testsuite.TestSuite):
   def ListTests(self, context):
     tests = []
-    for dirname, dirs, files in os.walk(os.path.join(self.root), followlinks=True):
+    for dirname, dirs, files in os.walk(
+        os.path.join(self.root), followlinks=True):
       for dotted in [x for x in dirs if x.startswith('.')]:
         dirs.remove(dotted)
       if dirname.endswith(os.path.sep + RESOURCES_FOLDER):
@@ -35,79 +29,41 @@
           fullpath = os.path.join(dirname, filename)
           relpath = fullpath[len(self.root) + 1 : -3]
           testname = relpath.replace(os.path.sep, "/")
-          test = testcase.TestCase(self, testname)
+          test = self._create_test(testname)
           tests.append(test)
     return tests
 
-  def GetFlagsForTestCase(self, testcase, context):
-    source = self.GetSourceForTest(testcase)
-    flags = [] + context.mode_flags
-    flags_match = re.findall(FLAGS_PATTERN, source)
-    for match in flags_match:
-      flags += shlex.split(match.strip())
-    testname = testcase.path.split(os.path.sep)[-1]
-    testfilename = os.path.join(self.root, testcase.path + self.suffix())
-    protocoltestfilename = os.path.join(self.root, PROTOCOL_TEST_JS)
-    return testcase.flags + flags + [ protocoltestfilename, testfilename ]
+  def _test_class(self):
+    return TestCase
 
-  def GetSourceForTest(self, testcase):
-    filename = os.path.join(self.root, testcase.path + self.suffix())
-    with open(filename) as f:
-      return f.read()
 
-  def shell(self):
-    return "inspector-test"
+class TestCase(testcase.TestCase):
+  def __init__(self, *args, **kwargs):
+    super(TestCase, self).__init__(*args, **kwargs)
 
-  def _IgnoreLine(self, string):
-    """Ignore empty lines, valgrind output and Android output."""
-    if not string: return True
-    return (string.startswith("==") or string.startswith("**") or
-            string.startswith("ANDROID") or
-            # FIXME(machenbach): The test driver shouldn't try to use slow
-            # asserts if they weren't compiled. This fails in optdebug=2.
-            string == "Warning: unknown flag --enable-slow-asserts." or
-            string == "Try --help for options")
+    self._source_flags = self._parse_source_flags()
 
-  def IsFailureOutput(self, testcase):
-    file_name = os.path.join(self.root, testcase.path) + EXPECTED_SUFFIX
-    with file(file_name, "r") as expected:
-      expected_lines = expected.readlines()
+  def _get_files_params(self, ctx):
+    return [
+      os.path.join(self.suite.root, PROTOCOL_TEST_JS),
+      os.path.join(self.suite.root, self.path + self._get_suffix()),
+    ]
 
-    def ExpIterator():
-      for line in expected_lines:
-        if not line.strip(): continue
-        yield line.strip()
+  def _get_source_flags(self):
+    return self._source_flags
 
-    def ActIterator(lines):
-      for line in lines:
-        if self._IgnoreLine(line.strip()): continue
-        yield line.strip()
+  def _get_source_path(self):
+    return os.path.join(self.suite.root, self.path + self._get_suffix())
 
-    def ActBlockIterator():
-      """Iterates over blocks of actual output lines."""
-      lines = testcase.output.stdout.splitlines()
-      start_index = 0
-      found_eqeq = False
-      for index, line in enumerate(lines):
-        # If a stress test separator is found:
-        if line.startswith("=="):
-          # Iterate over all lines before a separator except the first.
-          if not found_eqeq:
-            found_eqeq = True
-          else:
-            yield ActIterator(lines[start_index:index])
-          # The next block of output lines starts after the separator.
-          start_index = index + 1
-      # Iterate over complete output if no separator was found.
-      if not found_eqeq:
-        yield ActIterator(lines)
+  def get_shell(self):
+    return 'inspector-test'
 
-    for act_iterator in ActBlockIterator():
-      for (expected, actual) in itertools.izip_longest(
-          ExpIterator(), act_iterator, fillvalue=''):
-        if expected != actual:
-          return True
-      return False
+  @property
+  def output_proc(self):
+    return outproc.ExpectedOutProc(
+        self.expected_outcomes,
+        os.path.join(self.suite.root, self.path) + EXPECTED_SUFFIX)
+
 
 def GetSuite(name, root):
-  return InspectorProtocolTestSuite(name, root)
+  return TestSuite(name, root)
diff --git a/src/v8/test/inspector/type-profiler/type-profile-start-stop-expected.txt b/src/v8/test/inspector/type-profiler/type-profile-start-stop-expected.txt
index 0db7882..e04a4ec 100644
--- a/src/v8/test/inspector/type-profiler/type-profile-start-stop-expected.txt
+++ b/src/v8/test/inspector/type-profiler/type-profile-start-stop-expected.txt
@@ -47,3 +47,5 @@
   return 'second';
 /*string*/};
 f(null);
+
+Running test: testStopTwice
diff --git a/src/v8/test/inspector/type-profiler/type-profile-start-stop.js b/src/v8/test/inspector/type-profiler/type-profile-start-stop.js
index dad9874..be4e0bd 100644
--- a/src/v8/test/inspector/type-profiler/type-profile-start-stop.js
+++ b/src/v8/test/inspector/type-profiler/type-profile-start-stop.js
@@ -166,5 +166,13 @@
     Protocol.Profiler.stopTypeProfile();
     Protocol.Profiler.disable();
     await Protocol.Runtime.disable();
-  }
+  },
+  async function testStopTwice() {
+    Protocol.Runtime.enable();
+    await Protocol.Profiler.enable();
+    await Protocol.Profiler.stopTypeProfile();
+    await Protocol.Profiler.stopTypeProfile();
+    Protocol.Profiler.disable();
+    await Protocol.Runtime.disable();
+  },
 ]);
diff --git a/src/v8/test/intl/date-format/invalid-time.js b/src/v8/test/intl/date-format/invalid-time.js
new file mode 100644
index 0000000..ef62545
--- /dev/null
+++ b/src/v8/test/intl/date-format/invalid-time.js
@@ -0,0 +1,20 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+var df = new Intl.DateTimeFormat();
+
+assertThrows("df.format(Infinity)", RangeError);
+assertThrows("df.formatToParts(Infinity)", RangeError);
+assertThrows("df.format(-Infinity)", RangeError);
+assertThrows("df.formatToParts(-Infinity)", RangeError);
+assertThrows("df.format(NaN)", RangeError);
+assertThrows("df.formatToParts(NaN)", RangeError);
+
+// https://crbug.com/774833
+var df2 = new Intl.DateTimeFormat('en', {'hour': 'numeric'});
+Date.prototype.valueOf = "ponies";
+assertEquals(df.format(Date.now()), df.format());
+assertEquals(df2.format(Date.now()), df2.format());
+assertEquals(df.formatToParts(Date.now()), df.formatToParts());
+assertEquals(df2.formatToParts(Date.now()), df2.formatToParts());
diff --git a/src/v8/test/intl/general/invalid-locale.js b/src/v8/test/intl/general/invalid-locale.js
new file mode 100644
index 0000000..c85ed83
--- /dev/null
+++ b/src/v8/test/intl/general/invalid-locale.js
@@ -0,0 +1,39 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Make sure that invalid locales throw RangeError
+
+var invalid_locales = ["arcdefghl-Latn", "fil-Latn-kxx", "fr-Latn-CAK",
+                       "en-Latin-US", "en-a-foo-9charlong", "en-a-b",
+                      ];
+
+for (let locale  of invalid_locales) {
+  assertThrows("var nf = new Intl.NumberFormat('" + locale + "')", RangeError);
+}
+
+var not_so_long_locales = [
+  "bs-u-nu-bzcu-cab-cabs-avnlubs-avnihu-zcu-cab-cbs-avnllubs-avnihq-zcu-cab-cbs-ubs-avnihu-cabs-flus-xxd-vnluy",
+  "bs-u-nu-bzcu-cab-cabs-avnlubs-avnihu-zcu-cab-cbs-avnllubs-avnihq-zcu-cab-cbs-ubs-avnihu-cabs-flus-xxd",
+  "bs-u-nu-bzcu-cab-cabs-avnlubs-avnihu-zcu",
+];
+
+for (let locale  of not_so_long_locales) {
+  assertEquals((new Intl.NumberFormat(locale)).resolvedOptions().numberingSystem,
+      "latn");
+}
+
+// The point of this test is to make sure that there's no ill-effect with too
+// long a locale name. Because, thhere's no provision in the Ecma 402 on the
+// length limit of a locale ID and BCP 47 (RFC 5646 section 2.1). So, it's
+// a spec violation to treat this as invalid. See TODO(jshin) comment
+// in Runtime_CanonicalizeLanguageTag in runtime-intl.cc .
+var overlong_locales = [
+   "he-up-a-caiaup-araup-ai-pdu-sp-bs-up-arscna-zeieiaup-araup-arscia-rews-us-up-arscna-zeieiaup-araup-arsciap-arscna-zeieiaup-araup-arscie-u-sp-bs-uaup-arscia",
+   "he-up-a-caiaup-araup-ai-pdu-sp-bs-up-arscna-zeieiaup-araup-arscia-rews-us-up-arscna-zeieiaup-araup-arsciap-arscna-zeieiaup-araup-arscie-u-sp-bs-uaup-arscia-xyza",
+   "bs-u-nu-bzcu-cab-cabs-avnlubs-avnihu-zcu-cab-cbs-avnllubs-avnihq-zcu-cab-cbs-ubs-avnihu-cabs-flus-xxd-vnluy-abcd",
+];
+
+for (let locale  of overlong_locales) {
+  assertThrows("var nf = new Intl.NumberFormat('" + locale + "')", RangeError)
+}
diff --git a/src/v8/test/intl/number-format/format-currency.js b/src/v8/test/intl/number-format/format-currency.js
index 004c566..97e49f9 100755
--- a/src/v8/test/intl/number-format/format-currency.js
+++ b/src/v8/test/intl/number-format/format-currency.js
@@ -16,4 +16,4 @@
 
 var nf_EUR = new Intl.NumberFormat(['pt'], {style: 'currency', currency: 'EUR'});
 
-assertEquals("€1.000,00", nf_EUR.format(1000.00));
+assertEquals("€\u00a01.000,00", nf_EUR.format(1000.00));
diff --git a/src/v8/test/intl/testcfg.py b/src/v8/test/intl/testcfg.py
index c7f17bb..87aece3 100644
--- a/src/v8/test/intl/testcfg.py
+++ b/src/v8/test/intl/testcfg.py
@@ -26,18 +26,11 @@
 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 import os
-import re
 
 from testrunner.local import testsuite
 from testrunner.objects import testcase
 
-FLAGS_PATTERN = re.compile(r"//\s+Flags:(.*)")
-
-class IntlTestSuite(testsuite.TestSuite):
-
-  def __init__(self, name, root):
-    super(IntlTestSuite, self).__init__(name, root)
-
+class TestSuite(testsuite.TestSuite):
   def ListTests(self, context):
     tests = []
     for dirname, dirs, files in os.walk(self.root):
@@ -52,35 +45,42 @@
           fullpath = os.path.join(dirname, filename)
           relpath = fullpath[len(self.root) + 1 : -3]
           testname = relpath.replace(os.path.sep, "/")
-          test = testcase.TestCase(self, testname)
+          test = self._create_test(testname)
           tests.append(test)
     return tests
 
-  def GetFlagsForTestCase(self, testcase, context):
-    source = self.GetSourceForTest(testcase)
-    flags = ["--allow-natives-syntax"] + context.mode_flags
-    flags_match = re.findall(FLAGS_PATTERN, source)
-    for match in flags_match:
-      flags += match.strip().split()
+  def _test_class(self):
+    return TestCase
 
-    files = []
-    files.append(os.path.join(self.root, "assert.js"))
-    files.append(os.path.join(self.root, "utils.js"))
-    files.append(os.path.join(self.root, "regexp-prepare.js"))
-    files.append(os.path.join(self.root, testcase.path + self.suffix()))
-    files.append(os.path.join(self.root, "regexp-assert.js"))
 
-    flags += files
-    if context.isolates:
-      flags.append("--isolate")
-      flags += files
+class TestCase(testcase.TestCase):
+  def __init__(self, *args, **kwargs):
+    super(TestCase, self).__init__(*args, **kwargs)
 
-    return testcase.flags + flags
+    self._source_flags = self._parse_source_flags()
 
-  def GetSourceForTest(self, testcase):
-    filename = os.path.join(self.root, testcase.path + self.suffix())
-    with open(filename) as f:
-      return f.read()
+  def _get_files_params(self, ctx):
+    files = map(lambda f: os.path.join(self.suite.root, f), [
+        'assert.js',
+        'utils.js',
+        'regexp-prepare.js',
+        self.path + self._get_suffix(),
+        'regexp-assert.js',
+    ])
+
+    if ctx.isolates:
+      files += ['--isolate'] + files
+    return files
+
+  def _get_source_flags(self):
+    return self._source_flags
+
+  def _get_suite_flags(self, ctx):
+    return ['--allow-natives-syntax']
+
+  def _get_source_path(self):
+    return os.path.join(self.suite.root, self.path + self._get_suffix())
+
 
 def GetSuite(name, root):
-  return IntlTestSuite(name, root)
+  return TestSuite(name, root)
diff --git a/src/v8/test/js-perf-test/Array/every.js b/src/v8/test/js-perf-test/Array/every.js
index 76b68b7..5a29f44 100644
--- a/src/v8/test/js-perf-test/Array/every.js
+++ b/src/v8/test/js-perf-test/Array/every.js
@@ -1,38 +1,7 @@
 // Copyright 2017 the V8 project authors. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
-
-function benchy(name, test, testSetup) {
-  new BenchmarkSuite(name, [1000],
-      [
-        new Benchmark(name, false, false, 0, test, testSetup, ()=>{})
-      ]);
-}
-
-benchy('DoubleEvery', DoubleEvery, DoubleEverySetup);
-benchy('SmiEvery', SmiEvery, SmiEverySetup);
-benchy('FastEvery', FastEvery, FastEverySetup);
-benchy('OptFastEvery', OptFastEvery, FastEverySetup);
-
-var array;
-// Initialize func variable to ensure the first test doesn't benefit from
-// global object property tracking.
-var func = 0;
-var this_arg;
-var result;
-var array_size = 100;
-
-// Although these functions have the same code, they are separated for
-// clean IC feedback.
-function DoubleEvery() {
-  result = array.every(func, this_arg);
-}
-function SmiEvery() {
-  result = array.every(func, this_arg);
-}
-function FastEvery() {
-  result = array.every(func, this_arg);
-}
+(() => {
 
 // Make sure we inline the callback, pick up all possible TurboFan
 // optimizations.
@@ -50,20 +19,19 @@
 %NeverOptimizeFunction(OptFastEvery);
 function OptFastEvery() { RunOptFastEvery(3); }
 
-function SmiEverySetup() {
-  array = new Array();
-  for (var i = 0; i < array_size; i++) array[i] = i;
-  func = (value, index, object) => { return value != 34343; };
+function side_effect(a) { return a; }
+%NeverOptimizeFunction(side_effect);
+function OptUnreliableEvery() {
+  result = array.every(func, side_effect(array));
 }
 
-function DoubleEverySetup() {
-  array = new Array();
-  for (var i = 0; i < array_size; i++) array[i] = (i + 0.5);
-  func = (value, index, object) => { return value > 0.0; };
-}
+DefineHigherOrderTests([
+  // name, test function, setup function, user callback
+  "DoubleEvery", mc("every"), DoubleSetup, v => v > 0.0,
+  "SmiEvery", mc("every"), SmiSetup, v => v != 34343,
+  "FastEvery", mc("every"), FastSetup, v => v !== 'hi',
+  "OptFastEvery", OptFastEvery, FastSetup, v => true,
+  "OptUnreliableEvery", OptUnreliableEvery, FastSetup, v => true
+]);
 
-function FastEverySetup() {
-  array = new Array();
-  for (var i = 0; i < array_size; i++) array[i] = 'value ' + i;
-  func = (value, index, object) => { return value !== 'hi'; };
-}
+})();
diff --git a/src/v8/test/js-perf-test/Array/filter.js b/src/v8/test/js-perf-test/Array/filter.js
index 94ba265..e0d4327 100644
--- a/src/v8/test/js-perf-test/Array/filter.js
+++ b/src/v8/test/js-perf-test/Array/filter.js
@@ -1,61 +1,7 @@
 // Copyright 2017 the V8 project authors. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
-
-function benchy(name, test, testSetup) {
-  new BenchmarkSuite(name, [1000],
-      [
-        new Benchmark(name, false, false, 0, test, testSetup, ()=>{})
-      ]);
-}
-
-benchy('NaiveFilterReplacement', NaiveFilter, NaiveFilterSetup);
-benchy('DoubleFilter', DoubleFilter, DoubleFilterSetup);
-benchy('SmiFilter', SmiFilter, SmiFilterSetup);
-benchy('FastFilter', FastFilter, FastFilterSetup);
-benchy('GenericFilter', GenericFilter, ObjectFilterSetup);
-benchy('OptFastFilter', OptFastFilter, FastFilterSetup);
-
-var array;
-// Initialize func variable to ensure the first test doesn't benefit from
-// global object property tracking.
-var func = 0;
-var this_arg;
-var result;
-var array_size = 100;
-
-// Although these functions have the same code, they are separated for
-// clean IC feedback.
-function DoubleFilter() {
-  result = array.filter(func, this_arg);
-}
-function SmiFilter() {
-  result = array.filter(func, this_arg);
-}
-function FastFilter() {
-  result = array.filter(func, this_arg);
-}
-
-// Make sure we inline the callback, pick up all possible TurboFan
-// optimizations.
-function RunOptFastFilter(multiple) {
-  // Use of variable multiple in the callback function forces
-  // context creation without escape analysis.
-  //
-  // Also, the arrow function requires inlining based on
-  // SharedFunctionInfo.
-  result = array.filter((v, i, a) => multiple === 3);
-}
-
-// Don't optimize because I want to optimize RunOptFastMap with a parameter
-// to be used in the callback.
-%NeverOptimizeFunction(OptFastFilter);
-function OptFastFilter() { RunOptFastFilter(3); }
-
-
-function GenericFilter() {
-  result = Array.prototype.filter.call(array, func, this_arg);
-}
+(() => {
 
 // From the lodash implementation.
 function NaiveFilter() {
@@ -76,37 +22,45 @@
 function NaiveFilterSetup() {
   // Prime NaiveFilter with polymorphic cases.
   array = [1, 2, 3];
-  func = ()=>true;
   NaiveFilter();
   NaiveFilter();
   array = [3.4]; NaiveFilter();
   array = new Array(10); array[0] = 'hello'; NaiveFilter();
-  SmiFilterSetup();
+  SmiSetup();
   delete array[1];
 }
 
-function SmiFilterSetup() {
-  array = new Array();
-  for (var i = 0; i < array_size; i++) array[i] = i;
-  func = (value, index, object) => { return value % 2 === 0; };
+// Make sure we inline the callback, pick up all possible TurboFan
+// optimizations.
+function RunOptFastFilter(multiple) {
+  // Use of variable multiple in the callback function forces
+  // context creation without escape analysis.
+  //
+  // Also, the arrow function requires inlining based on
+  // SharedFunctionInfo.
+  result = array.filter((v, i, a) => multiple === 3);
 }
 
-function DoubleFilterSetup() {
-  array = new Array();
-  for (var i = 0; i < array_size; i++) array[i] = (i + 0.5);
-  func = (value, index, object) => { return Math.floor(value) % 2 === 0; };
+// Don't optimize because I want to optimize RunOptFastMap with a parameter
+// to be used in the callback.
+%NeverOptimizeFunction(OptFastFilter);
+function OptFastFilter() { RunOptFastFilter(3); }
+
+function side_effect(a) { return a; }
+%NeverOptimizeFunction(side_effect);
+function OptUnreliableFilter() {
+  result = array.filter(func, side_effect(array));
 }
 
-function FastFilterSetup() {
-  array = new Array();
-  for (var i = 0; i < array_size; i++) array[i] = 'value ' + i;
-  func = (value, index, object) => { return index % 2 === 0; };
-}
+DefineHigherOrderTests([
+  // name, test function, setup function, user callback
+  "NaiveFilterReplacement", NaiveFilter, NaiveFilterSetup, v => true,
+  "DoubleFilter", mc("filter"), DoubleSetup, v => Math.floor(v) % 2 === 0,
+  "SmiFilter", mc("filter"), SmiSetup, v => v % 2 === 0,
+  "FastFilter", mc("filter"), FastSetup, (_, i) => i % 2 === 0,
+  "GenericFilter", mc("filter", true), ObjectSetup, (_, i) => i % 2 === 0,
+  "OptFastFilter", OptFastFilter, FastSetup, undefined,
+  "OptUnreliableFilter", OptUnreliableFilter, FastSetup, v => true
+]);
 
-function ObjectFilterSetup() {
-  array = { length: array_size };
-  for (var i = 0; i < array_size; i++) {
-    array[i] = i;
-  }
-  func = (value, index, object) => { return index % 2 === 0; };
-}
+})();
diff --git a/src/v8/test/js-perf-test/Array/find-index.js b/src/v8/test/js-perf-test/Array/find-index.js
new file mode 100644
index 0000000..716aa71
--- /dev/null
+++ b/src/v8/test/js-perf-test/Array/find-index.js
@@ -0,0 +1,63 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+(() => {
+
+// Make sure we inline the callback, pick up all possible TurboFan
+// optimizations.
+function RunOptFast(multiple) {
+  // Use of variable multiple in the callback function forces
+  // context creation without escape analysis.
+  //
+  // Also, the arrow function requires inlining based on
+  // SharedFunctionInfo.
+  result = array.findIndex((v, i, a) => v === `value ${multiple}`);
+}
+
+// Don't optimize because I want to optimize RunOptFast with a parameter
+// to be used in the callback.
+%NeverOptimizeFunction(OptFast);
+function OptFast() { RunOptFast(max_index); }
+
+function side_effect(a) { return a; }
+%NeverOptimizeFunction(side_effect);
+function OptUnreliable() {
+  result = array.findIndex(func, side_effect(array));
+}
+
+function Naive() {
+  let index = -1;
+  const length = array == null ? 0 : array.length;
+
+  for (let index = 0; index < length; index++) {
+    const value = array[index];
+    if (func(value, index, array)) {
+      result = value;
+      break;
+    }
+  }
+}
+
+function NaiveSetup() {
+  // Prime Naive with polymorphic cases.
+  array = [1, 2, 3];
+  Naive();
+  Naive();
+  array = [3.4]; Naive();
+  array = new Array(10); array[0] = 'hello'; Naive();
+  SmiSetup();
+  delete array[1];
+}
+
+DefineHigherOrderTests([
+  // name, test function, setup function, user callback
+  "NaiveFindIndexReplacement", Naive, NaiveSetup, v => v === max_index,
+  "DoubleFindIndex", mc("findIndex"), DoubleSetup, v => v === max_index + 0.5,
+  "SmiFindIndex", mc("findIndex"), SmiSetup, v => v === max_index,
+  "FastFindIndex", mc("findIndex"), FastSetup, v => v === `value ${max_index}`,
+  "GenericFindIndex", mc("findIndex", true), ObjectSetup, v => v === max_index,
+  "OptFastFindIndex", OptFast, FastSetup, undefined,
+  "OptUnreliableFindIndex", OptUnreliable, FastSetup, v => v === max_index
+]);
+
+})();
diff --git a/src/v8/test/js-perf-test/Array/find.js b/src/v8/test/js-perf-test/Array/find.js
new file mode 100644
index 0000000..9b9a19f
--- /dev/null
+++ b/src/v8/test/js-perf-test/Array/find.js
@@ -0,0 +1,63 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+(() => {
+
+// Make sure we inline the callback, pick up all possible TurboFan
+// optimizations.
+function RunOptFast(multiple) {
+  // Use of variable multiple in the callback function forces
+  // context creation without escape analysis.
+  //
+  // Also, the arrow function requires inlining based on
+  // SharedFunctionInfo.
+  result = array.find((v, i, a) => v === `value ${multiple}`);
+}
+
+// Don't optimize because I want to optimize RunOptFast with a parameter
+// to be used in the callback.
+%NeverOptimizeFunction(OptFast);
+function OptFast() { RunOptFast(max_index); }
+
+function side_effect(a) { return a; }
+%NeverOptimizeFunction(side_effect);
+function OptUnreliable() {
+  result = array.find(func, side_effect(array));
+}
+
+function Naive() {
+  let index = -1;
+  const length = array == null ? 0 : array.length;
+
+  for (let index = 0; index < length; index++) {
+    const value = array[index];
+    if (func(value, index, array)) {
+      result = value;
+      break;
+    }
+  }
+}
+
+function NaiveSetup() {
+  // Prime Naive with polymorphic cases.
+  array = [1, 2, 3];
+  Naive();
+  Naive();
+  array = [3.4]; Naive();
+  array = new Array(10); array[0] = 'hello'; Naive();
+  SmiSetup();
+  delete array[1];
+}
+
+DefineHigherOrderTests([
+  // name, test function, setup function, user callback
+  "NaiveFindReplacement", Naive, NaiveSetup, v => v === max_index,
+  "DoubleFind", mc("find"), DoubleSetup, v => v === max_index + 0.5,
+  "SmiFind", mc("find"), SmiSetup, v => v === max_index,
+  "FastFind", mc("find"), FastSetup, v => v === `value ${max_index}`,
+  "GenericFind", mc("find", true), ObjectSetup, v => v === max_index,
+  "OptFastFind", OptFast, FastSetup, undefined,
+  "OptUnreliableFind", OptUnreliable, FastSetup, v => v === max_index
+]);
+
+})();
diff --git a/src/v8/test/js-perf-test/Array/for-each.js b/src/v8/test/js-perf-test/Array/for-each.js
new file mode 100644
index 0000000..79d2798
--- /dev/null
+++ b/src/v8/test/js-perf-test/Array/for-each.js
@@ -0,0 +1,62 @@
+// Copyright 2018 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+(() => {
+
+function Naive() {
+  let index = -1;
+  const length = array == null ? 0 : array.length;
+
+  for (let index = 0; index < length; index++) {
+    const value = array[index];
+    if (func(value, index, array)) {
+      result = value;
+      break;
+    }
+  }
+}
+
+function NaiveSetup() {
+  // Prime Naive with polymorphic cases.
+  array = [1, 2, 3];
+  Naive();
+  Naive();
+  array = [3.4]; Naive();
+  array = new Array(10); array[0] = 'hello'; Naive();
+  SmiSetup();
+  delete array[1];
+}
+
+// Make sure we inline the callback, pick up all possible TurboFan
+// optimizations.
+function RunOptFast(multiple) {
+  // Use of variable multiple in the callback function forces
+  // context creation without escape analysis.
+  //
+  // Also, the arrow function requires inlining based on
+  // SharedFunctionInfo.
+  result = array.forEach((v, i, a) => v === `value ${multiple}`);
+}
+
+// Don't optimize because I want to optimize RunOptFast with a parameter
+// to be used in the callback.
+%NeverOptimizeFunction(OptFast);
+function OptFast() { RunOptFast(max_index); }
+
+function side_effect(a) { return a; }
+%NeverOptimizeFunction(side_effect);
+function OptUnreliable() {
+  result = array.forEach(func, side_effect(array));
+}
+
+DefineHigherOrderTests([
+  "NaiveForEachReplacement", Naive, NaiveSetup, v => v === max_index,
+  "DoubleForEach", mc("forEach"), DoubleSetup, v => v === max_index + 0.5,
+  "SmiForEach", mc("forEach"), SmiSetup, v => v === max_index,
+  "FastForEach", mc("forEach"), FastSetup, v => v === `value ${max_index}`,
+  "GenericForEach", mc("forEach", true), ObjectSetup, v => v === max_index,
+  "OptFastForEach", OptFast, FastSetup, undefined,
+  "OptUnreliableForEach", OptUnreliable, FastSetup, v => v === `value ${max_index}`
+]);
+
+})();
diff --git a/src/v8/test/js-perf-test/Array/join.js b/src/v8/test/js-perf-test/Array/join.js
index 7330ae0..ef9d298 100644
--- a/src/v8/test/js-perf-test/Array/join.js
+++ b/src/v8/test/js-perf-test/Array/join.js
@@ -1,38 +1,20 @@
 // Copyright 2017 the V8 project authors. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
-
-function benchy(name, test, testSetup) {
-  new BenchmarkSuite(name, [1000],
-      [
-        new Benchmark(name, false, false, 0, test, testSetup, ()=>{})
-      ]);
-}
-
-benchy('SmiJoin', SmiJoin, SmiJoinSetup);
-benchy('StringJoin', StringJoin, StringJoinSetup);
-benchy('SparseSmiJoin', SparseSmiJoin, SparseSmiJoinSetup);
-benchy('SparseStringJoin', SparseStringJoin, SparseStringJoinSetup);
+(() => {
 
 var array;
 var result;
 var array_size = 1000;
 
+function make_join() {
+  return new Function('result = array.join();');
+}
 
-// Although these functions have the same code, they are separated for
-// clean IC feedback.
-function SmiJoin() {
-  result = array.join();
-}
-function StringJoin() {
-  result = array.join();
-}
-function SparseSmiJoin() {
-  result = array.join();
-}
-function SparseStringJoin() {
-  result = array.join();
-}
+benchy('SmiJoin', make_join(), SmiJoinSetup);
+benchy('StringJoin', make_join(), StringJoinSetup);
+benchy('SparseSmiJoin', make_join(), SparseSmiJoinSetup);
+benchy('SparseStringJoin', make_join(), SparseStringJoinSetup);
 
 function SmiJoinSetup() {
   array = new Array();
@@ -50,3 +32,5 @@
   StringJoinSetup();
   array.length = array.length * 2;
 }
+
+})();
diff --git a/src/v8/test/js-perf-test/Array/map.js b/src/v8/test/js-perf-test/Array/map.js
index f4ab95b..9179aa3 100644
--- a/src/v8/test/js-perf-test/Array/map.js
+++ b/src/v8/test/js-perf-test/Array/map.js
@@ -1,41 +1,28 @@
 // Copyright 2017 the V8 project authors. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
+(() => {
 
-function benchy(name, test, testSetup) {
-  new BenchmarkSuite(name, [1000],
-      [
-        new Benchmark(name, false, false, 0, test, testSetup, ()=>{})
-      ]);
+function NaiveMap() {
+  let index = -1
+  const length = array == null ? 0 : array.length
+  const result = new Array(length)
+
+  while (++index < length) {
+    result[index] = func(array[index], index, array)
+  }
+  return result
 }
 
-benchy('NaiveMapReplacement', NaiveMap, NaiveMapSetup);
-benchy('DoubleMap', DoubleMap, DoubleMapSetup);
-benchy('SmallSmiToDoubleMap', SmiMap, SmiToDoubleMapSetup);
-benchy('SmallSmiToFastMap', SmiMap, SmiToFastMapSetup);
-benchy('SmiMap', SmiMap, SmiMapSetup);
-benchy('FastMap', FastMap, FastMapSetup);
-benchy('GenericMap', GenericMap, ObjectMapSetup);
-benchy('OptFastMap', OptFastMap, FastMapSetup);
-
-var array;
-// Initialize func variable to ensure the first test doesn't benefit from
-// global object property tracking.
-var func = 0;
-var this_arg;
-var result;
-var array_size = 100;
-
-// Although these functions have the same code, they are separated for
-// clean IC feedback.
-function DoubleMap() {
-  result = array.map(func, this_arg);
-}
-function SmiMap() {
-  result = array.map(func, this_arg);
-}
-function FastMap() {
-  result = array.map(func, this_arg);
+function NaiveMapSetup() {
+  // Prime NaiveMap with polymorphic cases.
+  array = [1, 2, 3];
+  NaiveMap();
+  NaiveMap();
+  array = [3.4]; NaiveMap();
+  array = new Array(10); array[0] = 'hello'; NaiveMap();
+  SmiSetup();
+  delete array[1];
 }
 
 // Make sure we inline the callback, pick up all possible TurboFan
@@ -54,68 +41,23 @@
 %NeverOptimizeFunction(OptFastMap);
 function OptFastMap() { RunOptFastMap(3); }
 
-function NaiveMap() {
-  let index = -1
-  const length = array == null ? 0 : array.length
-  const result = new Array(length)
-
-  while (++index < length) {
-    result[index] = func(array[index], index, array)
-  }
-  return result
+function side_effect(a) { return a; }
+%NeverOptimizeFunction(side_effect);
+function OptUnreliableMap() {
+  result = array.map(func, side_effect(array));
 }
 
+DefineHigherOrderTests([
+  // name, test function, setup function, user callback
+  "NaiveMapReplacement", NaiveMap, NaiveMapSetup, v => v,
+  "SmiMap", mc("map"), SmiSetup, v => v,
+  "DoubleMap", mc("map"), DoubleSetup, v => v,
+  "FastMap", mc("map"), FastSetup, v => v,
+  "SmallSmiToDoubleMap", mc("map"), SmiSetup, v => v + 0.5,
+  "SmallSmiToFastMap", mc("map"), SmiSetup, v => "hi" + v,
+  "GenericMap", mc("map", true), ObjectSetup, v => v,
+  "OptFastMap", OptFastMap, FastSetup, undefined,
+  "OptUnreliableMap", OptUnreliableMap, FastSetup, v => v
+]);
 
-function GenericMap() {
-  result = Array.prototype.map.call(array, func, this_arg);
-}
-
-function NaiveMapSetup() {
-  // Prime NaiveMap with polymorphic cases.
-  array = [1, 2, 3];
-  func = (v, i, a) => v;
-  NaiveMap();
-  NaiveMap();
-  array = [3.4]; NaiveMap();
-  array = new Array(10); array[0] = 'hello'; NaiveMap();
-  SmiMapSetup();
-  delete array[1];
-}
-
-function SmiMapSetup() {
-  array = new Array();
-  for (var i = 0; i < array_size; i++) array[i] = i;
-  func = (value, index, object) => { return value; };
-}
-
-function SmiToDoubleMapSetup() {
-  array = new Array();
-  for (var i = 0; i < 1; i++) array[i] = i;
-  func = (value, index, object) => { return value + 0.5; };
-}
-
-function SmiToFastMapSetup() {
-  array = new Array();
-  for (var i = 0; i < 1; i++) array[i] = i;
-  func = (value, index, object) => { return "hi" + value; };
-}
-
-function DoubleMapSetup() {
-  array = new Array();
-  for (var i = 0; i < array_size; i++) array[i] = (i + 0.5);
-  func = (value, index, object) => { return value; };
-}
-
-function FastMapSetup() {
-  array = new Array();
-  for (var i = 0; i < array_size; i++) array[i] = 'value ' + i;
-  func = (value, index, object) => { return value; };
-}
-
-function ObjectMapSetup() {
-  array = { length: array_size };
-  for (var i = 0; i < array_size; i++) {
-    array[i] = i;
-  }
-  func = (value, index, object) => { return value; };
-}
+})();
diff --git a/src/v8/test/js-perf-test/Array/of.js b/src/v8/test/js-perf-test/Array/of.js
new file mode 100644
index 0000000..bfd4712
--- /dev/null
+++ b/src/v8/test/js-perf-test/Array/of.js
@@ -0,0 +1,117 @@
+// Copyright 2018 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+(() => {
+
+benchy('EmptyArrayOf', EmptyArrayOf, EmptyArrayOfSetup);
+benchy('SmallTransplantedArrayOf', SmallTransplantedArrayOf,
+    SmallTransplantedArrayOfSetup);
+benchy('SmallSmiArrayOf', SmallSmiArrayOf, SmallSmiArrayOfSetup);
+benchy('LargeSmiArrayOf', LargeSmiArrayOf, LargeSmiArrayOfSetup);
+benchy('SmallDoubleArrayOf', SmallDoubleArrayOf, SmallDoubleArrayOfSetup);
+benchy('SmallStringArrayOf', SmallStringArrayOf, SmallStringArrayOfSetup);
+benchy('SmallMixedArrayOf', SmallMixedArrayOf, SmallMixedArrayOfSetup);
+
+function ArrayLike() {}
+ArrayLike.of = Array.of;
+
+var arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10
+var arg11, arg12, arg13, arg14, arg15, arg16, arg17, arg18, arg19, arg20
+var result;
+
+function EmptyArrayOf() {
+  result = Array.of();
+}
+
+function BaselineArray() {
+  result = [arg1, arg2, arg3];
+}
+
+function SmallSmiArrayOf() {
+  result = Array.of(arg1, arg2, arg3);
+}
+
+function LargeSmiArrayOf() {
+  result = Array.of(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10,
+      arg11, arg12, arg13, arg14, arg15, arg16, arg17, arg18, arg19, arg20);
+}
+
+function SmallTransplantedArrayOf() {
+  result = ArrayLike.of(arg1, arg2, arg3);
+}
+
+function SmallDoubleArrayOf() {
+  result = Array.of(arg1, arg2, arg3);
+}
+
+function SmallStringArrayOf() {
+  result = Array.of(arg1, arg2, arg3);
+}
+
+function SmallMixedArrayOf() {
+  result = Array.of(arg1, arg2, arg3);
+}
+
+function EmptyArrayOfSetup() {
+}
+
+function BaselineArraySetup() {
+  arg1 = 1;
+  arg2 = 2;
+  arg3 = 3;
+}
+
+function SmallSmiArrayOfSetup() {
+  arg1 = 1;
+  arg2 = 2;
+  arg3 = 3;
+}
+
+function SmallTransplantedArrayOfSetup() {
+  arg1 = 1;
+  arg2 = 2;
+  arg3 = 3;
+}
+
+function SmallDoubleArrayOfSetup() {
+  arg1 = 1.5;
+  arg2 = 2.5;
+  arg3 = 3.5;
+}
+
+function SmallStringArrayOfSetup() {
+  arg1 = "cat";
+  arg2 = "dog";
+  arg3 = "giraffe";
+}
+
+function SmallMixedArrayOfSetup() {
+  arg1 = 1;
+  arg2 = 2.5;
+  arg3 = "giraffe";
+}
+
+function LargeSmiArrayOfSetup() {
+  arg1 = 1;
+  arg2 = 2;
+  arg3 = 3;
+  arg4 = 4;
+  arg5 = 5;
+  arg6 = 6;
+  arg7 = 7;
+  arg8 = 8;
+  arg9 = 9;
+  arg10 = 10;
+  arg11 = 11;
+  arg12 = 12;
+  arg13 = 13;
+  arg14 = 14;
+  arg15 = 15;
+  arg16 = 16;
+  arg17 = 17;
+  arg18 = 18;
+  arg19 = 19;
+  arg20 = 20;
+}
+
+})();
diff --git a/src/v8/test/js-perf-test/Array/reduce-right.js b/src/v8/test/js-perf-test/Array/reduce-right.js
index 29cb67c..ed00f5a 100644
--- a/src/v8/test/js-perf-test/Array/reduce-right.js
+++ b/src/v8/test/js-perf-test/Array/reduce-right.js
@@ -1,38 +1,7 @@
 // Copyright 2017 the V8 project authors. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
-
-function benchy(name, test, testSetup) {
-  new BenchmarkSuite(name, [1000],
-      [
-        new Benchmark(name, false, false, 0, test, testSetup, ()=>{})
-      ]);
-}
-
-benchy('DoubleReduceRight', DoubleReduceRight, DoubleReduceRightSetup);
-benchy('SmiReduceRight', SmiReduceRight, SmiReduceRightSetup);
-benchy('FastReduceRight', FastReduceRight, FastReduceRightSetup);
-benchy('OptFastReduceRight', OptFastReduceRight, FastReduceRightSetup);
-
-var array;
-// Initialize func variable to ensure the first test doesn't benefit from
-// global object property tracking.
-var func = 0;
-var this_arg;
-var result;
-var array_size = 100;
-
-// Although these functions have the same code, they are separated for
-// clean IC feedback.
-function DoubleReduceRight() {
-  result = array.reduceRight(func, this_arg);
-}
-function SmiReduceRight() {
-  result = array.reduceRight(func, this_arg);
-}
-function FastReduceRight() {
-  result = array.reduceRight(func, this_arg);
-}
+(() => {
 
 // Make sure we inline the callback, pick up all possible TurboFan
 // optimizations.
@@ -50,20 +19,20 @@
 %NeverOptimizeFunction(OptFastReduceRight);
 function OptFastReduceRight() { RunOptFastReduceRight(3); }
 
-function SmiReduceRightSetup() {
-  array = new Array();
-  for (var i = 0; i < array_size; i++) array[i] = i;
-  func = (prev, value, index, object) => { return prev + 1; };
+function side_effect(a) { return a; }
+%NeverOptimizeFunction(side_effect);
+function OptUnreliableReduceRight() {
+  result = array.reduceRight(func, side_effect(array));
 }
 
-function DoubleReduceRightSetup() {
-  array = new Array();
-  for (var i = 0; i < array_size; i++) array[i] = (i + 0.5);
-  func = (prev, value, index, object) => { return prev + value; };
-}
+DefineHigherOrderTests([
+  // name, test function, setup function, user callback
+  "DoubleReduceRight", mc("reduceRight"), DoubleSetup, (p, v, i, o) => p + v,
+  "SmiReduceRight", mc("reduceRight"), SmiSetup, (p, v, i, a) => p + 1,
+  "FastReduceRight", mc("reduceRight"), FastSetup, (p, v, i, a) => p + v,
+  "OptFastReduceRight", OptFastReduceRight, FastSetup, undefined,
+  "OptUnreliableReduceRight", OptUnreliableReduceRight, FastSetup,
+      (p, v, i, a) => p + v
+]);
 
-function FastReduceRightSetup() {
-  array = new Array();
-  for (var i = 0; i < array_size; i++) array[i] = 'value ' + i;
-  func = (prev, value, index, object) => { return prev + value; };
-}
+})();
diff --git a/src/v8/test/js-perf-test/Array/reduce.js b/src/v8/test/js-perf-test/Array/reduce.js
index 8790c0a..02d689f 100644
--- a/src/v8/test/js-perf-test/Array/reduce.js
+++ b/src/v8/test/js-perf-test/Array/reduce.js
@@ -1,38 +1,7 @@
 // Copyright 2017 the V8 project authors. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
-
-function benchy(name, test, testSetup) {
-  new BenchmarkSuite(name, [1000],
-      [
-        new Benchmark(name, false, false, 0, test, testSetup, ()=>{})
-      ]);
-}
-
-benchy('DoubleReduce', DoubleReduce, DoubleReduceSetup);
-benchy('SmiReduce', SmiReduce, SmiReduceSetup);
-benchy('FastReduce', FastReduce, FastReduceSetup);
-benchy('OptFastReduce', OptFastReduce, FastReduceSetup);
-
-var array;
-// Initialize func variable to ensure the first test doesn't benefit from
-// global object property tracking.
-var func = 0;
-var this_arg;
-var result;
-var array_size = 100;
-
-// Although these functions have the same code, they are separated for
-// clean IC feedback.
-function DoubleReduce() {
-  result = array.reduce(func, this_arg);
-}
-function SmiReduce() {
-  result = array.reduce(func, this_arg);
-}
-function FastReduce() {
-  result = array.reduce(func, this_arg);
-}
+(() => {
 
 // Make sure we inline the callback, pick up all possible TurboFan
 // optimizations.
@@ -50,20 +19,20 @@
 %NeverOptimizeFunction(OptFastReduce);
 function OptFastReduce() { RunOptFastReduce(3); }
 
-function SmiReduceSetup() {
-  array = new Array();
-  for (var i = 0; i < array_size; i++) array[i] = i;
-  func = (prev, value, index, object) => { return prev + 1; };
+function side_effect(a) { return a; }
+%NeverOptimizeFunction(side_effect);
+function OptUnreliableReduce() {
+  result = array.reduce(func, side_effect(array));
 }
 
-function DoubleReduceSetup() {
-  array = new Array();
-  for (var i = 0; i < array_size; i++) array[i] = (i + 0.5);
-  func = (prev, value, index, object) => { return prev + value; };
-}
+DefineHigherOrderTests([
+  // name, test function, setup function, user callback
+  "DoubleReduce", mc("reduce"), DoubleSetup, (p, v, i, o) => p + v,
+  "SmiReduce", mc("reduce"), SmiSetup, (p, v, i, a) => p + 1,
+  "FastReduce", mc("reduce"), FastSetup, (p, v, i, a) => p + v,
+  "OptFastReduce", OptFastReduce, FastSetup, undefined,
+  "OptUnreliableReduce", OptUnreliableReduce, FastSetup,
+      (p, v, i, a) => p = v
+]);
 
-function FastReduceSetup() {
-  array = new Array();
-  for (var i = 0; i < array_size; i++) array[i] = 'value ' + i;
-  func = (prev, value, index, object) => { return prev + value; };
-}
+})();
diff --git a/src/v8/test/js-perf-test/Array/run.js b/src/v8/test/js-perf-test/Array/run.js
index baf2553..15b4da9 100644
--- a/src/v8/test/js-perf-test/Array/run.js
+++ b/src/v8/test/js-perf-test/Array/run.js
@@ -2,16 +2,85 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-
 load('../base.js');
 
+let array;
+// Initialize func variable to ensure the first test doesn't benefit from
+// global object property tracking.
+let func = 0;
+let this_arg;
+let result;
+const array_size = 100;
+const max_index = array_size - 1;
+
+// mc stands for "Make Closure," it's a handy function to get a fresh
+// closure unpolluted by IC feedback for a 2nd-order array builtin
+// test.
+function mc(name, generic = false) {
+  if (generic) {
+    return new Function(
+      `result = Array.prototype.${name}.call(array, func, this_arg);`);
+  }
+  return new Function(`result = array.${name}(func, this_arg);`);
+}
+
+function benchy(name, test, testSetup) {
+  new BenchmarkSuite(name, [1000],
+      [
+        new Benchmark(name, false, false, 0, test, testSetup, ()=>{})
+      ]);
+}
+
+function SmiSetup() {
+  array = Array.from({ length: array_size }, (_, i) => i);
+}
+
+function DoubleSetup() {
+  array = Array.from({ length: array_size }, (_, i) => i + 0.5);
+}
+
+function FastSetup() {
+  array = Array.from({ length: array_size }, (_, i) => `value ${i}`);
+}
+
+function ObjectSetup() {
+  array = { length: array_size };
+  for (var i = 0; i < array_size; i++) {
+    array[i] = i;
+  }
+}
+
+function DefineHigherOrderTests(tests) {
+  let i = 0;
+  while (i < tests.length) {
+     const name = tests[i++];
+     const testFunc = tests[i++];
+     const setupFunc = tests[i++];
+     const callback = tests[i++];
+
+     let setupFuncWrapper = () => {
+       func = callback;
+       this_arg = undefined;
+       setupFunc();
+     };
+     benchy(name, testFunc, setupFuncWrapper);
+  }
+}
+
+// Higher-order Array builtins.
 load('filter.js');
 load('map.js');
 load('every.js');
-load('join.js');
 load('some.js');
+load('for-each.js');
 load('reduce.js');
 load('reduce-right.js');
+load('find.js');
+load('find-index.js');
+load('of.js');
+
+// Other Array builtins.
+load('join.js');
 load('to-string.js');
 
 var success = true;
diff --git a/src/v8/test/js-perf-test/Array/some.js b/src/v8/test/js-perf-test/Array/some.js
index 246ea95..ea820e9 100644
--- a/src/v8/test/js-perf-test/Array/some.js
+++ b/src/v8/test/js-perf-test/Array/some.js
@@ -1,38 +1,7 @@
 // Copyright 2017 the V8 project authors. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
-
-function benchy(name, test, testSetup) {
-  new BenchmarkSuite(name, [1000],
-      [
-        new Benchmark(name, false, false, 0, test, testSetup, ()=>{})
-      ]);
-}
-
-benchy('DoubleSome', DoubleSome, DoubleSomeSetup);
-benchy('SmiSome', SmiSome, SmiSomeSetup);
-benchy('FastSome', FastSome, FastSomeSetup);
-benchy('OptFastSome', OptFastSome, FastSomeSetup);
-
-var array;
-// Initialize func variable to ensure the first test doesn't benefit from
-// global object property tracking.
-var func = 0;
-var this_arg;
-var result;
-var array_size = 100;
-
-// Although these functions have the same code, they are separated for
-// clean IC feedback.
-function DoubleSome() {
-  result = array.some(func, this_arg);
-}
-function SmiSome() {
-  result = array.some(func, this_arg);
-}
-function FastSome() {
-  result = array.some(func, this_arg);
-}
+(() => {
 
 // Make sure we inline the callback, pick up all possible TurboFan
 // optimizations.
@@ -50,20 +19,19 @@
 %NeverOptimizeFunction(OptFastSome);
 function OptFastSome() { RunOptFastSome(3); }
 
-function SmiSomeSetup() {
-  array = new Array();
-  for (var i = 0; i < array_size; i++) array[i] = i;
-  func = (value, index, object) => { return value === 34343; };
+function side_effect(a) { return a; }
+%NeverOptimizeFunction(side_effect);
+function OptUnreliableSome() {
+  result = array.some(func, side_effect(array));
 }
 
-function DoubleSomeSetup() {
-  array = new Array();
-  for (var i = 0; i < array_size; i++) array[i] = (i + 0.5);
-  func = (value, index, object) => { return value < 0.0; };
-}
+DefineHigherOrderTests([
+  // name, test function, setup function, user callback
+  "DoubleSome", mc("some"), DoubleSetup, v => v < 0.0,
+  "SmiSome", mc("some"), SmiSetup, v => v === 34343,
+  "FastSome", mc("some"), FastSetup, v => v === 'hi',
+  "OptFastSome", OptFastSome, FastSetup, undefined,
+  "OptUnreliableSome", OptUnreliableSome, FastSetup, v => v === 'hi'
+]);
 
-function FastSomeSetup() {
-  array = new Array();
-  for (var i = 0; i < array_size; i++) array[i] = 'value ' + i;
-  func = (value, index, object) => { return value === 'hi'; };
-}
+})();
diff --git a/src/v8/test/js-perf-test/Array/to-string.js b/src/v8/test/js-perf-test/Array/to-string.js
index c6a66d7..1b6dd36 100644
--- a/src/v8/test/js-perf-test/Array/to-string.js
+++ b/src/v8/test/js-perf-test/Array/to-string.js
@@ -1,52 +1,39 @@
 // Copyright 2017 the V8 project authors. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
+(() => {
 
-function benchy(name, test, testSetup) {
-  new BenchmarkSuite(name, [1000],
-      [
-        new Benchmark(name, false, false, 0, test, testSetup, ()=>{})
-      ]);
+function make_tostring() {
+  return new Function("result = array.toString();");
 }
 
-benchy('SmiToString', SmiToString, SmiToStringSetup);
-benchy('StringToString', StringToString, StringToStringSetup);
-benchy('SparseSmiToString', SparseSmiToString, SparseSmiToStringSetup);
-benchy('SparseStringToString', SparseStringToString, SparseStringToStringSetup);
+benchy('SmiToString', make_tostring(), SmiToStringSetup);
+benchy('StringToString', make_tostring(), StringToStringSetup);
+benchy('SparseSmiToString', make_tostring(), SparseSmiToStringSetup);
+benchy('SparseStringToString', make_tostring(), SparseStringToStringSetup);
 
 var array;
 var result;
 var array_size = 1000;
 
-
-// Although these functions have the same code, they are separated for
-// clean IC feedback.
-function SmiToString() {
-  result = array.toString();
-}
-function StringToString() {
-  result = array.toString();
-}
-function SparseSmiToString() {
-  result = array.toString();
-}
-function SparseStringToString() {
-  result = array.toString();
-}
-
 function SmiToStringSetup() {
   array = new Array();
   for (var i = 0; i < array_size; ++i) array[i] = i;
 }
+
 function StringToStringSetup() {
   array = new Array();
   for (var i = 0; i < array_size; ++i) array[i] = `Item no. ${i}`;
 }
+
 function SparseSmiToStringSetup() {
   SmiToStringSetup();
   array.length = array.length * 2;
 }
+
 function SparseStringToStringSetup() {
   StringToStringSetup();
   array.length = array.length * 2;
 }
+
+})();
diff --git a/src/v8/test/js-perf-test/Collections/common.js b/src/v8/test/js-perf-test/Collections/common.js
index 3ea3933..7ae835f 100644
--- a/src/v8/test/js-perf-test/Collections/common.js
+++ b/src/v8/test/js-perf-test/Collections/common.js
@@ -2,30 +2,47 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-
 var N = 10;
+var LargeN = 1e4;
 var keys;
+var keyValuePairs;
 
-
-function SetupSmiKeys() {
-  keys = new Array(N * 2);
-  for (var i = 0; i < N * 2; i++) {
-    keys[i] = i;
-  }
+function SetupKeyValuePairsFromKeys() {
+  keyValuePairs = keys.map((v) => [v, v]);
 }
 
-
-function SetupStringKeys() {
-  keys = new Array(N * 2);
-  for (var i = 0; i < N * 2; i++) {
-    keys[i] = 's' + i;
-  }
+function SetupSmiKeys(count = 2 * N) {
+  keys = Array.from({ length : count }, (v, i) => i);
 }
 
+function SetupSmiKeyValuePairs(count = 2 * N) {
+  SetupSmiKeys(count);
+  SetupKeyValuePairsFromKeys();
+}
 
-function SetupObjectKeys() {
-  keys = new Array(N * 2);
-  for (var i = 0; i < N * 2; i++) {
-    keys[i] = {};
-  }
+function SetupStringKeys(count = 2 * N) {
+  keys = Array.from({ length : count }, (v, i) => 's' + i);
+}
+
+function SetupStringKeyValuePairs(count = 2 * N) {
+  SetupStringKeys(count);
+  SetupKeyValuePairsFromKeys();
+}
+
+function SetupObjectKeys(count = 2 * N) {
+  keys = Array.from({ length : count }, (v, i) => ({}));
+}
+
+function SetupObjectKeyValuePairs(count = 2 * N) {
+  SetupObjectKeys(count);
+  SetupKeyValuePairsFromKeys();
+}
+
+function SetupDoubleKeys(count = 2 * N) {
+  keys = Array.from({ length : count }, (v, i) => i + 0.234);
+}
+
+function SetupDoubleKeyValuePairs(count = 2 * N) {
+  SetupDoubleKeys(count);
+  SetupKeyValuePairsFromKeys();
 }
diff --git a/src/v8/test/js-perf-test/Collections/map.js b/src/v8/test/js-perf-test/Collections/map.js
index ee08991..39e9755 100644
--- a/src/v8/test/js-perf-test/Collections/map.js
+++ b/src/v8/test/js-perf-test/Collections/map.js
@@ -10,7 +10,6 @@
   new Benchmark('Delete', false, false, 0, MapDeleteSmi, MapSetupSmi, MapTearDown),
 ]);
 
-
 var MapStringBenchmark = new BenchmarkSuite('Map-String', [1000], [
   new Benchmark('Set', false, false, 0, MapSetString, MapSetupStringBase, MapTearDown),
   new Benchmark('Has', false, false, 0, MapHasString, MapSetupString, MapTearDown),
@@ -18,7 +17,6 @@
   new Benchmark('Delete', false, false, 0, MapDeleteString, MapSetupString, MapTearDown),
 ]);
 
-
 var MapObjectBenchmark = new BenchmarkSuite('Map-Object', [1000], [
   new Benchmark('Set', false, false, 0, MapSetObject, MapSetupObjectBase, MapTearDown),
   new Benchmark('Has', false, false, 0, MapHasObject, MapSetupObject, MapTearDown),
@@ -26,60 +24,87 @@
   new Benchmark('Delete', false, false, 0, MapDeleteObject, MapSetupObject, MapTearDown),
 ]);
 
+var MapDoubleBenchmark = new BenchmarkSuite('Map-Double', [1000], [
+  new Benchmark('Set', false, false, 0, MapSetDouble, MapSetupDoubleBase, MapTearDown),
+  new Benchmark('Has', false, false, 0, MapHasDouble, MapSetupDouble, MapTearDown),
+  new Benchmark('Get', false, false, 0, MapGetDouble, MapSetupDouble, MapTearDown),
+  new Benchmark('Delete', false, false, 0, MapDeleteDouble, MapSetupDouble, MapTearDown),
+]);
+
+var MapObjectLargeBenchmark = new BenchmarkSuite('Map-Object-Set-Get-Large', [1e7], [
+  new Benchmark('Set-Get', false, false, 0, MapSetGetObjectLarge,
+                MapSetupObjectBaseLarge, MapTearDown),
+]);
 
 var MapIterationBenchmark = new BenchmarkSuite('Map-Iteration', [1000], [
   new Benchmark('ForEach', false, false, 0, MapForEach, MapSetupSmi, MapTearDown),
 ]);
 
-
 var MapIterationBenchmark = new BenchmarkSuite('Map-Iterator', [1000], [
   new Benchmark('Iterator', false, false, 0, MapIterator, MapSetupSmi, MapTearDown),
 ]);
 
+var MapConstructorBenchmark = new BenchmarkSuite('Map-Constructor', [1000], [
+  new Benchmark('Smi', false, false, 0, MapConstructorSmi, SetupSmiKeyValuePairs, MapTearDown),
+  new Benchmark('String', false, false, 0, MapConstructorString, SetupStringKeyValuePairs, MapTearDown),
+  new Benchmark('Object', false, false, 0, MapConstructorObject, SetupObjectKeyValuePairs, MapTearDown),
+  new Benchmark('Double', false, false, 0, MapConstructorDouble, SetupDoubleKeyValuePairs, MapTearDown),
+]);
 
 var map;
 
-
 function MapSetupSmiBase() {
   SetupSmiKeys();
   map = new Map;
 }
 
-
 function MapSetupSmi() {
   MapSetupSmiBase();
   MapSetSmi();
 }
 
-
 function MapSetupStringBase() {
   SetupStringKeys();
   map = new Map;
 }
 
-
 function MapSetupString() {
   MapSetupStringBase();
   MapSetString();
 }
 
-
 function MapSetupObjectBase() {
   SetupObjectKeys();
   map = new Map;
 }
 
+function MapSetupObjectBaseLarge() {
+  SetupObjectKeys(2 * LargeN);
+  map = new Map;
+}
 
 function MapSetupObject() {
   MapSetupObjectBase();
   MapSetObject();
 }
 
+function MapSetupDoubleBase() {
+  SetupDoubleKeys();
+  map = new Map;
+}
+
+function MapSetupDouble() {
+  MapSetupDoubleBase();
+  MapSetDouble();
+}
 
 function MapTearDown() {
   map = null;
 }
 
+function MapConstructorSmi() {
+  map = new Map(keyValuePairs);
+}
 
 function MapSetSmi() {
   for (var i = 0; i < N; i++) {
@@ -87,7 +112,6 @@
   }
 }
 
-
 function MapHasSmi() {
   for (var i = 0; i < N; i++) {
     if (!map.has(keys[i])) {
@@ -101,7 +125,6 @@
   }
 }
 
-
 function MapGetSmi() {
   for (var i = 0; i < N; i++) {
     if (map.get(keys[i]) !== i) {
@@ -125,13 +148,16 @@
 }
 
 
+function MapConstructorString() {
+  map = new Map(keyValuePairs);
+}
+
 function MapSetString() {
   for (var i = 0; i < N; i++) {
     map.set(keys[i], i);
   }
 }
 
-
 function MapHasString() {
   for (var i = 0; i < N; i++) {
     if (!map.has(keys[i])) {
@@ -159,7 +185,6 @@
   }
 }
 
-
 function MapDeleteString() {
   // This is run more than once per setup so we will end up deleting items
   // more than once. Therefore, we do not the return value of delete.
@@ -169,13 +194,16 @@
 }
 
 
+function MapConstructorObject() {
+  map = new Map(keyValuePairs);
+}
+
 function MapSetObject() {
   for (var i = 0; i < N; i++) {
     map.set(keys[i], i);
   }
 }
 
-
 function MapHasObject() {
   for (var i = 0; i < N; i++) {
     if (!map.has(keys[i])) {
@@ -189,7 +217,6 @@
   }
 }
 
-
 function MapGetObject() {
   for (var i = 0; i < N; i++) {
     if (map.get(keys[i]) !== i) {
@@ -203,6 +230,21 @@
   }
 }
 
+function MapSetGetObjectLarge() {
+  for (var i = 0; i < LargeN; i++) {
+    map.set(keys[i * 2], i);
+  }
+  for (var i = 0; i < LargeN; i++) {
+    if (map.get(keys[i * 2]) !== i) {
+      throw new Error();
+    }
+  }
+  for (var i = N; i < 2 * LargeN; i++) {
+    if (map.get(keys[i * 2 + 1]) !== undefined) {
+      throw new Error();
+    }
+  }
+}
 
 function MapDeleteObject() {
   // This is run more than once per setup so we will end up deleting items
@@ -213,6 +255,51 @@
 }
 
 
+function MapConstructorDouble() {
+  map = new Map(keyValuePairs);
+}
+
+function MapSetDouble() {
+  for (var i = 0; i < N; i++) {
+    map.set(keys[i], i);
+  }
+}
+
+function MapHasDouble() {
+  for (var i = 0; i < N; i++) {
+    if (!map.has(keys[i])) {
+      throw new Error();
+    }
+  }
+  for (var i = N; i < 2 * N; i++) {
+    if (map.has(keys[i])) {
+      throw new Error();
+    }
+  }
+}
+
+function MapGetDouble() {
+  for (var i = 0; i < N; i++) {
+    if (map.get(keys[i]) !== i) {
+      throw new Error();
+    }
+  }
+  for (var i = N; i < 2 * N; i++) {
+    if (map.get(keys[i]) !== undefined) {
+      throw new Error();
+    }
+  }
+}
+
+function MapDeleteDouble() {
+  // This is run more than once per setup so we will end up deleting items
+  // more than once. Therefore, we do not the return value of delete.
+  for (var i = 0; i < N; i++) {
+    map.delete(keys[i]);
+  }
+}
+
+
 function MapForEach() {
   map.forEach(function(v, k) {
     if (v !== k) {
@@ -221,7 +308,6 @@
   });
 }
 
-
 function MapIterator() {
   var result = 0;
   for (const v of map.values()) result += v;
diff --git a/src/v8/test/js-perf-test/Collections/run.js b/src/v8/test/js-perf-test/Collections/run.js
index 50f1ee1..6fcdd83 100644
--- a/src/v8/test/js-perf-test/Collections/run.js
+++ b/src/v8/test/js-perf-test/Collections/run.js
@@ -2,6 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+"use strict";
 
 load('../base.js');
 load('common.js');
diff --git a/src/v8/test/js-perf-test/Collections/set.js b/src/v8/test/js-perf-test/Collections/set.js
index dd40925..bcf9840 100644
--- a/src/v8/test/js-perf-test/Collections/set.js
+++ b/src/v8/test/js-perf-test/Collections/set.js
@@ -24,6 +24,13 @@
 ]);
 
 
+var SetDoubleBenchmark = new BenchmarkSuite('Set-Double', [1000], [
+  new Benchmark('Set', false, false, 0, SetAddDouble, SetSetupDoubleBase, SetTearDown),
+  new Benchmark('Has', false, false, 0, SetHasDouble, SetSetupDouble, SetTearDown),
+  new Benchmark('Delete', false, false, 0, SetDeleteDouble, SetSetupDouble, SetTearDown),
+]);
+
+
 var SetIterationBenchmark = new BenchmarkSuite('Set-Iteration', [1000], [
   new Benchmark('ForEach', false, false, 0, SetForEach, SetSetupSmi, SetTearDown),
 ]);
@@ -34,6 +41,13 @@
 ]);
 
 
+var SetConstructorBenchmark = new BenchmarkSuite('Set-Constructor', [1000], [
+  new Benchmark('Smi', false, false, 0, SetConstructorSmi, SetupSmiKeys, SetTearDown),
+  new Benchmark('String', false, false, 0, SetConstructorString, SetupStringKeys, SetTearDown),
+  new Benchmark('Object', false, false, 0, SetConstructorObject, SetupObjectKeys, SetTearDown),
+  new Benchmark('Double', false, false, 0, SetConstructorDouble, SetupDoubleKeys, SetTearDown),
+]);
+
 var set;
 
 
@@ -73,11 +87,28 @@
 }
 
 
+function SetSetupDoubleBase() {
+  SetupDoubleKeys();
+  set = new Set;
+}
+
+
+function SetSetupDouble() {
+  SetSetupDoubleBase();
+  SetAddDouble();
+}
+
+
 function SetTearDown() {
   set = null;
 }
 
 
+function SetConstructorSmi() {
+  set = new Set(keys);
+}
+
+
 function SetAddSmi() {
   for (var i = 0; i < N; i++) {
     set.add(keys[i], i);
@@ -108,6 +139,11 @@
 }
 
 
+function SetConstructorString() {
+  set = new Set(keys);
+}
+
+
 function SetAddString() {
   for (var i = 0; i < N; i++) {
     set.add(keys[i], i);
@@ -138,6 +174,11 @@
 }
 
 
+function SetConstructorObject() {
+  set = new Set(keys);
+}
+
+
 function SetAddObject() {
   for (var i = 0; i < N; i++) {
     set.add(keys[i], i);
@@ -168,6 +209,41 @@
 }
 
 
+function SetConstructorDouble() {
+  set = new Set(keys);
+}
+
+
+function SetAddDouble() {
+  for (var i = 0; i < N; i++) {
+    set.add(keys[i], i);
+  }
+}
+
+
+function SetHasDouble() {
+  for (var i = 0; i < N; i++) {
+    if (!set.has(keys[i])) {
+      throw new Error();
+    }
+  }
+  for (var i = N; i < 2 * N; i++) {
+    if (set.has(keys[i])) {
+      throw new Error();
+    }
+  }
+}
+
+
+function SetDeleteDouble() {
+  // This is run more than once per setup so we will end up deleting items
+  // more than once. Therefore, we do not the return value of delete.
+  for (var i = 0; i < N; i++) {
+    set.delete(keys[i]);
+  }
+}
+
+
 function SetForEach() {
   set.forEach(function(v, k) {
     if (v !== k) {
diff --git a/src/v8/test/js-perf-test/Collections/weakmap.js b/src/v8/test/js-perf-test/Collections/weakmap.js
index 9aa265f..e13d1b3 100644
--- a/src/v8/test/js-perf-test/Collections/weakmap.js
+++ b/src/v8/test/js-perf-test/Collections/weakmap.js
@@ -14,6 +14,16 @@
       WeakMapTearDown),
 ]);
 
+var MapBenchmark = new BenchmarkSuite('WeakMapSetGet-Large', [1e7], [
+  new Benchmark('Set-Get', false, false, 0, WeakMapSetGetLarge,
+                WeakMapSetupBaseLarge, WeakMapTearDown),
+]);
+
+var MapBenchmark = new BenchmarkSuite('WeakMap-Constructor', [1000], [
+  new Benchmark('Constructor', false, false, 0, WeakMapConstructor, SetupObjectKeyValuePairs,
+      WeakMapTearDown),
+]);
+
 
 var wm;
 
@@ -24,6 +34,12 @@
 }
 
 
+function WeakMapSetupBaseLarge() {
+  SetupObjectKeys(2 * LargeN);
+  wm = new WeakMap;
+}
+
+
 function WeakMapSetup() {
   WeakMapSetupBase();
   WeakMapSet();
@@ -35,6 +51,10 @@
 }
 
 
+function WeakMapConstructor() {
+  wm = new WeakMap(keyValuePairs);
+}
+
 function WeakMapSet() {
   for (var i = 0; i < N; i++) {
     wm.set(keys[i], i);
@@ -77,3 +97,19 @@
     wm.delete(keys[i]);
   }
 }
+
+function WeakMapSetGetLarge() {
+  for (var i = 0; i < LargeN; i++) {
+    wm.set(keys[i * 2], i);
+  }
+  for (var i = 0; i < LargeN; i++) {
+    if (wm.get(keys[i * 2]) !== i) {
+      throw new Error();
+    }
+  }
+  for (var i = N; i < 2 * LargeN; i++) {
+    if (wm.get(keys[i * 2 + 1]) !== undefined) {
+      throw new Error();
+    }
+  }
+}
diff --git a/src/v8/test/js-perf-test/Collections/weakset.js b/src/v8/test/js-perf-test/Collections/weakset.js
index 2936477..1dca043 100644
--- a/src/v8/test/js-perf-test/Collections/weakset.js
+++ b/src/v8/test/js-perf-test/Collections/weakset.js
@@ -12,6 +12,10 @@
       WeakSetTearDown),
 ]);
 
+var SetBenchmark = new BenchmarkSuite('WeakSet-Constructor', [1000], [
+  new Benchmark('Constructor', false, false, 0, WeakSetConstructor, SetupObjectKeys,
+      WeakSetTearDown),
+]);
 
 var ws;
 
@@ -33,6 +37,11 @@
 }
 
 
+function WeakSetConstructor() {
+  ws = new WeakSet(keys);
+}
+
+
 function WeakSetAdd() {
   for (var i = 0; i < N; i++) {
     ws.add(keys[i]);
diff --git a/src/v8/test/js-perf-test/ExpressionDepth/run.js b/src/v8/test/js-perf-test/ExpressionDepth/run.js
index 9e3075a..1b3bd83 100644
--- a/src/v8/test/js-perf-test/ExpressionDepth/run.js
+++ b/src/v8/test/js-perf-test/ExpressionDepth/run.js
@@ -24,6 +24,7 @@
 AddTest('Sub', '-');
 AddTest('BitwiseOr', '|');
 AddTestCustomPrologue('StringConcat', '+', '"string" +');
+AddTestCustomPrologue('TemplateString', '} ${', '`${', '}`');
 
 function TestExpressionDepth(depth, expression, prologue, epilogue) {
   var func = '(function f(a) {\n' + prologue;
@@ -35,18 +36,43 @@
 }
 
 function RunTest(name, expression, prologue, epilogue) {
-  var depth;
+  var low_depth = 0;
+  var high_depth = 1;
+
+  // Find the upper limit where depth breaks down.
   try {
-    for (depth = 0; depth < 20000; depth += 100) {
-      TestExpressionDepth(depth, expression, prologue, epilogue);
+    while (high_depth <= 65536) {
+      TestExpressionDepth(high_depth, expression, prologue, epilogue);
+      low_depth = high_depth;
+      high_depth *= 4;
     }
+    // Looks like we can't get the depth to break down, just report
+    // the maximum depth tested.
+    print(name +  '-ExpressionDepth(Score): ' + low_depth);
+    return;
   } catch (e) {
     if (!e instanceof RangeError) {
       print(name +  '-ExpressionDepth(Score): ERROR');
       return;
     }
   }
-  print(name + '-ExpressionDepth(Score): ' + depth);
+
+  // Binary search the actual limit.
+  while (low_depth + 1 < high_depth) {
+    var mid_depth = Math.round((low_depth + high_depth) / 2);
+    try {
+      TestExpressionDepth(mid_depth, expression, prologue, epilogue);
+      low_depth = mid_depth;
+    } catch (e) {
+      if (!e instanceof RangeError) {
+        print(name +  '-ExpressionDepth(Score): ERROR');
+        return;
+      }
+      high_depth = mid_depth;
+    }
+  }
+
+  print(name + '-ExpressionDepth(Score): ' + low_depth);
 }
 
 function AddTest(name, expression, in_test) {
@@ -59,6 +85,6 @@
   RunTest(name, expression, prologue, epilogue);
 }
 
-function AddTestCustomPrologue(name, expression, prologue) {
-  RunTest(name, expression, prologue, '');
+function AddTestCustomPrologue(name, expression, prologue, epilogue='') {
+  RunTest(name, expression, prologue, epilogue);
 }
diff --git a/src/v8/test/js-perf-test/Inspector/debugger.js b/src/v8/test/js-perf-test/Inspector/debugger.js
index 506d2a3..c2ec6d9 100644
--- a/src/v8/test/js-perf-test/Inspector/debugger.js
+++ b/src/v8/test/js-perf-test/Inspector/debugger.js
@@ -13,6 +13,9 @@
   benchy('Debugger.getPossibleBreakpoints',
     DebuggerGetPossibleBreakpoints,
     SetupGetPossibleBreakpoints);
+  benchy('AsyncStacksInstrumentation',
+    AsyncStacksInstrumentation,
+    SetupAsyncStacksInstrumentation);
 
   function Setup() {
     SendMessage('Debugger.enable');
@@ -57,4 +60,20 @@
       start: {lineNumber: 0, columnNumber: 0, scriptId: scriptId}
     });
   }
+
+  function SetupAsyncStacksInstrumentation() {
+    Setup();
+    SendMessage('Debugger.setAsyncCallStackDepth', {maxDepth: 1024});
+  }
+
+  function AsyncStacksInstrumentation() {
+    var p = Promise.resolve();
+    var nopCallback = () => undefined;
+    var done = false;
+    for (let i = 0; i < 1000; ++i) {
+      p = p.then(nopCallback);
+    }
+    p = p.then(() => done = true);
+    while (!done) %RunMicrotasks();
+  }
 })();
diff --git a/src/v8/test/js-perf-test/JSTests.json b/src/v8/test/js-perf-test/JSTests.json
index 4204210..a1a19f5 100644
--- a/src/v8/test/js-perf-test/JSTests.json
+++ b/src/v8/test/js-perf-test/JSTests.json
@@ -150,15 +150,20 @@
         {"name": "Map-Smi"},
         {"name": "Map-String"},
         {"name": "Map-Object"},
+        {"name": "Map-Object-Set-Get-Large"},
+        {"name": "Map-Double"},
         {"name": "Map-Iteration"},
         {"name": "Map-Iterator"},
         {"name": "Set-Smi"},
         {"name": "Set-String"},
         {"name": "Set-Object"},
+        {"name": "Set-Double"},
         {"name": "Set-Iteration"},
         {"name": "Set-Iterator"},
         {"name": "WeakMap"},
-        {"name": "WeakSet"}
+        {"name": "WeakMap-Constructor"},
+        {"name": "WeakSet"},
+        {"name": "WeakSet-Constructor"}
       ]
     },
     {
@@ -175,13 +180,17 @@
       "name": "Strings",
       "path": ["Strings"],
       "main": "run.js",
-      "resources": ["harmony-string.js"],
+      "resources": ["harmony-string.js", "string-indexof.js"],
       "results_regexp": "^%s\\-Strings\\(Score\\): (.+)$",
       "run_count": 1,
       "timeout": 240,
       "timeout_arm": 420,
       "tests": [
-        {"name": "StringFunctions"}
+        {"name": "StringFunctions"},
+        {"name": "StringIndexOfConstant"},
+        {"name": "StringIndexOfNonConstant"},
+        {"name": "StringCharCodeAtConstant"},
+        {"name": "StringCharCodeAtNonConstant"}
       ]
     },
     {
@@ -362,10 +371,22 @@
           "test_flags": ["set-from-same-type"]
         },
         {
+          "name": "SliceNoSpecies",
+          "main": "run.js",
+          "resources": ["slice-nospecies.js"],
+          "test_flags": ["slice-nospecies"]
+        },
+        {
           "name": "Sort",
           "main": "run.js",
           "resources": ["sort.js"],
           "test_flags": ["sort"]
+        },
+        {
+          "name": "SubarrayNoSpecies",
+          "main": "run.js",
+          "resources": ["subarray-nospecies.js"],
+          "test_flags": ["subarray-nospecies"]
         }
       ]
     },
@@ -375,29 +396,40 @@
       "main": "run.js",
       "resources": [
         "filter.js", "map.js", "every.js", "join.js", "some.js",
-        "reduce.js", "reduce-right.js", "to-string.js"
+        "reduce.js", "reduce-right.js", "to-string.js", "find.js",
+        "find-index.js", "of.js"
       ],
       "flags": [
         "--allow-natives-syntax"
       ],
       "results_regexp": "^%s\\-Array\\(Score\\): (.+)$",
       "tests": [
+        {"name": "NaiveForEachReplacement"},
+        {"name": "DoubleForEach"},
+        {"name": "SmiForEach"},
+        {"name": "FastForEach"},
+        {"name": "GenericForEach"},
+        {"name": "OptFastForEach"},
+        {"name": "OptUnreliableForEach"},
         {"name": "NaiveFilterReplacement"},
         {"name": "DoubleFilter"},
         {"name": "SmiFilter"},
         {"name": "FastFilter"},
         {"name": "GenericFilter"},
         {"name": "OptFastFilter"},
+        {"name": "OptUnreliableFilter"},
         {"name": "NaiveMapReplacement"},
         {"name": "DoubleMap"},
         {"name": "SmiMap"},
         {"name": "FastMap"},
         {"name": "GenericMap"},
         {"name": "OptFastMap"},
+        {"name": "OptUnreliableMap"},
         {"name": "DoubleEvery"},
         {"name": "SmiEvery"},
         {"name": "FastEvery"},
         {"name": "OptFastEvery"},
+        {"name": "OptUnreliableEvery"},
         {"name": "SmiJoin"},
         {"name": "StringJoin"},
         {"name": "SparseSmiJoin"},
@@ -406,18 +438,42 @@
         {"name": "SmiSome"},
         {"name": "FastSome"},
         {"name": "OptFastSome"},
+        {"name": "OptUnreliableSome"},
         {"name": "DoubleReduce"},
         {"name": "SmiReduce"},
         {"name": "FastReduce"},
         {"name": "OptFastReduce"},
+        {"name": "OptUnreliableReduce"},
         {"name": "DoubleReduceRight"},
         {"name": "SmiReduceRight"},
         {"name": "FastReduceRight"},
         {"name": "OptFastReduceRight"},
+        {"name": "OptUnreliableReduceRight"},
         {"name": "SmiToString"},
         {"name": "StringToString"},
         {"name": "SparseSmiToString"},
-        {"name": "SparseStringToString"}
+        {"name": "SparseStringToString"},
+        {"name": "NaiveFindReplacement"},
+        {"name": "DoubleFind"},
+        {"name": "SmiFind"},
+        {"name": "FastFind"},
+        {"name": "GenericFind"},
+        {"name": "OptFastFind"},
+        {"name": "OptUnreliableFind"},
+        {"name": "NaiveFindIndexReplacement"},
+        {"name": "DoubleFindIndex"},
+        {"name": "SmiFindIndex"},
+        {"name": "FastFindIndex"},
+        {"name": "GenericFindIndex"},
+        {"name": "OptFastFindIndex"},
+        {"name": "OptUnreliableFindIndex"},
+        {"name": "EmptyArrayOf"},
+        {"name": "SmallSmiArrayOf"},
+        {"name": "LargeSmiArrayOf"},
+        {"name": "SmallTransplantedArrayOf"},
+        {"name": "SmallDoubleArrayOf"},
+        {"name": "SmallStringArrayOf"},
+        {"name": "SmallMixedArrayOf"}
       ]
     },
     {
@@ -509,6 +565,7 @@
           "resources": [ "arithmetic.js" ],
           "test_flags": [ "arithmetic" ],
           "results_regexp": "^%s\\-BytecodeHandler\\(Score\\): (.+)$",
+          "timeout": 240,
           "tests": [
             {"name": "Smi-Add"},
             {"name": "Number-Add"},
@@ -602,12 +659,13 @@
       "path": ["Inspector"],
       "main": "run.js",
       "resources": [ "debugger.js", "runtime.js" ],
-      "flags": ["--enable-inspector"],
+      "flags": ["--enable-inspector","--allow-natives-syntax"],
       "results_regexp": "^%s\\-Inspector\\(Score\\): (.+)$",
       "tests": [
         {"name": "Debugger.paused"},
         {"name": "Runtime.evaluate(String16Cstor)"},
-        {"name": "Debugger.getPossibleBreakpoints"}
+        {"name": "Debugger.getPossibleBreakpoints"},
+        {"name": "AsyncStacksInstrumentation"}
       ]
     },
     {
diff --git a/src/v8/test/js-perf-test/SixSpeed.json b/src/v8/test/js-perf-test/SixSpeed.json
index 15a2792..a2fb560 100644
--- a/src/v8/test/js-perf-test/SixSpeed.json
+++ b/src/v8/test/js-perf-test/SixSpeed.json
@@ -258,14 +258,14 @@
         {
           "name": "ES5",
           "main": "run.js",
-          "resources": ["map_set_add/es5.js"],
-          "test_flags": ["map_set_add/es5"]
+          "resources": ["map_string/es5.js"],
+          "test_flags": ["map_string/es5"]
         },
         {
           "name": "ES6",
           "main": "run.js",
-          "resources": ["map_set_add/es6.js"],
-          "test_flags": ["map_set_add/es6"]
+          "resources": ["map_string/es6.js"],
+          "test_flags": ["map_string/es6"]
         }
       ]
     }
diff --git a/src/v8/test/js-perf-test/Strings/run.js b/src/v8/test/js-perf-test/Strings/run.js
index 79ca26e..66dd9b2 100644
--- a/src/v8/test/js-perf-test/Strings/run.js
+++ b/src/v8/test/js-perf-test/Strings/run.js
@@ -5,6 +5,7 @@
 
 load('../base.js');
 load('harmony-string.js');
+load('string-indexof.js');
 
 
 var success = true;
diff --git a/src/v8/test/js-perf-test/Strings/string-indexof.js b/src/v8/test/js-perf-test/Strings/string-indexof.js
new file mode 100644
index 0000000..a2049e0
--- /dev/null
+++ b/src/v8/test/js-perf-test/Strings/string-indexof.js
@@ -0,0 +1,69 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+new BenchmarkSuite('StringIndexOfConstant', [5], [
+  new Benchmark('StringIndexOfConstant', true, false, 0,
+  StringIndexOfConstant),
+]);
+
+new BenchmarkSuite('StringIndexOfNonConstant', [5], [
+  new Benchmark('StringIndexOfNonConstant', true, false, 0,
+  StringIndexOfNonConstant),
+]);
+
+const subject = "aaaaaaaaaaaaaaaab";
+const searches = ['a', 'b', 'c'];
+
+function StringIndexOfConstant() {
+  var sum = 0;
+
+  for (var j = 0; j < searches.length; ++j) {
+    sum += subject.indexOf("" + searches[j]);
+  }
+
+  return sum;
+}
+
+function StringIndexOfNonConstant() {
+  var sum = 0;
+
+  for (var j = 0; j < searches.length; ++j) {
+    sum += subject.indexOf(searches[j]);
+  }
+
+  return sum;
+}
+
+new BenchmarkSuite('StringCharCodeAtConstant', [3], [
+  new Benchmark('StringIndexOfConstant', true, false, 0,
+  StringCharCodeAtConstant),
+]);
+
+new BenchmarkSuite('StringCharCodeAtNonConstant', [3], [
+  new Benchmark('StringIndexOfNonConstant', true, false, 0,
+  StringCharCodeAtNonConstant),
+]);
+
+const string = "qweruiplkjhgfdsazxccvbnm";
+const indices = [1, 13, 32, 100, "xx"];
+
+function StringCharCodeAtConstant() {
+  var sum = 0;
+
+  for (var j = 0; j < indices.length - 1; ++j) {
+    sum += string.charCodeAt(indices[j] | 0);
+  }
+
+  return sum;
+}
+
+function StringCharCodeAtNonConstant() {
+  var sum = 0;
+
+  for (var j = 0; j < indices.length - 1; ++j) {
+    sum += string.charCodeAt(indices[j]);
+  }
+
+  return sum;
+}
diff --git a/src/v8/test/js-perf-test/TypedArrays/slice-nospecies.js b/src/v8/test/js-perf-test/TypedArrays/slice-nospecies.js
new file mode 100644
index 0000000..4195d71
--- /dev/null
+++ b/src/v8/test/js-perf-test/TypedArrays/slice-nospecies.js
@@ -0,0 +1,34 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+new BenchmarkSuite('SliceNoSpecies', [1000], [
+  new Benchmark('SliceNoSpecies', false, false, 0,
+                slice, sliceSetup, sliceTearDown),
+]);
+
+var size = 1000;
+var initialFloat64Array = new Float64Array(size);
+for (var i = 0; i < size; ++i) {
+  initialFloat64Array[i] = Math.random();
+}
+var arr;
+var new_arr;
+
+function slice() {
+  new_arr = arr.slice(1, -1);
+}
+
+function sliceSetup() {
+  arr = new Float64Array(initialFloat64Array);
+}
+
+function sliceTearDown() {
+  for (var i = 1; i < size - 1; ++i) {
+    if (arr[i] != new_arr[i - 1]) {
+      throw new TypeError("Unexpected result!\n" + new_arr);
+    }
+  }
+  arr = void 0;
+  new_arr = void 0;
+}
diff --git a/src/v8/test/js-perf-test/TypedArrays/subarray-nospecies.js b/src/v8/test/js-perf-test/TypedArrays/subarray-nospecies.js
new file mode 100644
index 0000000..732dbff
--- /dev/null
+++ b/src/v8/test/js-perf-test/TypedArrays/subarray-nospecies.js
@@ -0,0 +1,34 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+new BenchmarkSuite('SubarrayNoSpecies', [1000], [
+  new Benchmark('SubarrayNoSpecies', false, false, 0,
+                subarray, subarraySetup, subarrayTearDown),
+]);
+
+var size = 1000;
+var initialFloat64Array = new Float64Array(size);
+for (var i = 0; i < size; ++i) {
+  initialFloat64Array[i] = Math.random();
+}
+var arr;
+var new_arr;
+
+function subarray() {
+  new_arr = arr.subarray(1, -1);
+}
+
+function subarraySetup() {
+  arr = new Float64Array(initialFloat64Array);
+}
+
+function subarrayTearDown() {
+  for (var i = 1; i < size - 1; ++i) {
+    if (arr[i] != new_arr[i - 1]) {
+      throw new TypeError("Unexpected result!\n" + new_arr);
+    }
+  }
+  arr = void 0;
+  new_arr = void 0;
+}
diff --git a/src/v8/test/message/console.out b/src/v8/test/message/console.out
deleted file mode 100644
index 7813ccd..0000000
--- a/src/v8/test/message/console.out
+++ /dev/null
@@ -1,15 +0,0 @@
-default: {NUMBER}
-abcd: {NUMBER}
-b: 0.000000
-a: {NUMBER}
-log more
-warn 2
-debug
-info
-*%(basename)s:25: Error: exception
-console.info({ toString: () => {throw new Error("exception");} })
-                                ^
-Error: exception
-    at Object.toString (*%(basename)s:25:39)
-    at console.info (<anonymous>)
-    at *%(basename)s:25:9
diff --git a/src/v8/test/mjsunit/regress/wasm/regression-694433.js b/src/v8/test/message/fail/array-binding-pattern-await1.js
similarity index 62%
copy from src/v8/test/mjsunit/regress/wasm/regression-694433.js
copy to src/v8/test/message/fail/array-binding-pattern-await1.js
index a260e20..09afccc 100644
--- a/src/v8/test/mjsunit/regress/wasm/regression-694433.js
+++ b/src/v8/test/message/fail/array-binding-pattern-await1.js
@@ -2,5 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-var size = 0x40000000;
-assertThrows(() => WebAssembly.validate(new Uint16Array(size)), RangeError);
+async function f() {
+  let [await b] = [];
+  return b;
+}
+f();
diff --git a/src/v8/test/message/fail/array-binding-pattern-await1.out b/src/v8/test/message/fail/array-binding-pattern-await1.out
new file mode 100644
index 0000000..9ebe243
--- /dev/null
+++ b/src/v8/test/message/fail/array-binding-pattern-await1.out
@@ -0,0 +1,4 @@
+*%(basename)s:6: SyntaxError: Invalid destructuring assignment target
+  let [await b] = [];
+       ^^^^^^^
+SyntaxError: Invalid destructuring assignment target
diff --git a/src/v8/test/message/arrow-bare-rest-param.js b/src/v8/test/message/fail/arrow-bare-rest-param.js
similarity index 100%
rename from src/v8/test/message/arrow-bare-rest-param.js
rename to src/v8/test/message/fail/arrow-bare-rest-param.js
diff --git a/src/v8/test/message/arrow-bare-rest-param.out b/src/v8/test/message/fail/arrow-bare-rest-param.out
similarity index 100%
rename from src/v8/test/message/arrow-bare-rest-param.out
rename to src/v8/test/message/fail/arrow-bare-rest-param.out
diff --git a/src/v8/test/message/arrow-formal-parameters.js b/src/v8/test/message/fail/arrow-formal-parameters.js
similarity index 100%
rename from src/v8/test/message/arrow-formal-parameters.js
rename to src/v8/test/message/fail/arrow-formal-parameters.js
diff --git a/src/v8/test/message/arrow-formal-parameters.out b/src/v8/test/message/fail/arrow-formal-parameters.out
similarity index 100%
rename from src/v8/test/message/arrow-formal-parameters.out
rename to src/v8/test/message/fail/arrow-formal-parameters.out
diff --git a/src/v8/test/message/arrow-invalid-rest-2.js b/src/v8/test/message/fail/arrow-invalid-rest-2.js
similarity index 100%
rename from src/v8/test/message/arrow-invalid-rest-2.js
rename to src/v8/test/message/fail/arrow-invalid-rest-2.js
diff --git a/src/v8/test/message/arrow-invalid-rest-2.out b/src/v8/test/message/fail/arrow-invalid-rest-2.out
similarity index 100%
rename from src/v8/test/message/arrow-invalid-rest-2.out
rename to src/v8/test/message/fail/arrow-invalid-rest-2.out
diff --git a/src/v8/test/message/arrow-invalid-rest.js b/src/v8/test/message/fail/arrow-invalid-rest.js
similarity index 100%
rename from src/v8/test/message/arrow-invalid-rest.js
rename to src/v8/test/message/fail/arrow-invalid-rest.js
diff --git a/src/v8/test/message/arrow-invalid-rest.out b/src/v8/test/message/fail/arrow-invalid-rest.out
similarity index 100%
rename from src/v8/test/message/arrow-invalid-rest.out
rename to src/v8/test/message/fail/arrow-invalid-rest.out
diff --git a/src/v8/test/message/arrow-missing.js b/src/v8/test/message/fail/arrow-missing.js
similarity index 100%
rename from src/v8/test/message/arrow-missing.js
rename to src/v8/test/message/fail/arrow-missing.js
diff --git a/src/v8/test/message/arrow-missing.out b/src/v8/test/message/fail/arrow-missing.out
similarity index 100%
rename from src/v8/test/message/arrow-missing.out
rename to src/v8/test/message/fail/arrow-missing.out
diff --git a/src/v8/test/message/arrow-param-after-rest-2.js b/src/v8/test/message/fail/arrow-param-after-rest-2.js
similarity index 100%
rename from src/v8/test/message/arrow-param-after-rest-2.js
rename to src/v8/test/message/fail/arrow-param-after-rest-2.js
diff --git a/src/v8/test/message/arrow-param-after-rest-2.out b/src/v8/test/message/fail/arrow-param-after-rest-2.out
similarity index 100%
rename from src/v8/test/message/arrow-param-after-rest-2.out
rename to src/v8/test/message/fail/arrow-param-after-rest-2.out
diff --git a/src/v8/test/message/arrow-param-after-rest.js b/src/v8/test/message/fail/arrow-param-after-rest.js
similarity index 100%
rename from src/v8/test/message/arrow-param-after-rest.js
rename to src/v8/test/message/fail/arrow-param-after-rest.js
diff --git a/src/v8/test/message/arrow-param-after-rest.out b/src/v8/test/message/fail/arrow-param-after-rest.out
similarity index 100%
rename from src/v8/test/message/arrow-param-after-rest.out
rename to src/v8/test/message/fail/arrow-param-after-rest.out
diff --git a/src/v8/test/message/arrow-strict-eval-bare-parameter.js b/src/v8/test/message/fail/arrow-strict-eval-bare-parameter.js
similarity index 100%
rename from src/v8/test/message/arrow-strict-eval-bare-parameter.js
rename to src/v8/test/message/fail/arrow-strict-eval-bare-parameter.js
diff --git a/src/v8/test/message/arrow-strict-eval-bare-parameter.out b/src/v8/test/message/fail/arrow-strict-eval-bare-parameter.out
similarity index 100%
rename from src/v8/test/message/arrow-strict-eval-bare-parameter.out
rename to src/v8/test/message/fail/arrow-strict-eval-bare-parameter.out
diff --git a/src/v8/test/message/arrow-two-rest-params.js b/src/v8/test/message/fail/arrow-two-rest-params.js
similarity index 100%
rename from src/v8/test/message/arrow-two-rest-params.js
rename to src/v8/test/message/fail/arrow-two-rest-params.js
diff --git a/src/v8/test/message/arrow-two-rest-params.out b/src/v8/test/message/fail/arrow-two-rest-params.out
similarity index 100%
rename from src/v8/test/message/arrow-two-rest-params.out
rename to src/v8/test/message/fail/arrow-two-rest-params.out
diff --git a/src/v8/test/message/async-arrow-invalid-rest-2.js b/src/v8/test/message/fail/async-arrow-invalid-rest-2.js
similarity index 100%
rename from src/v8/test/message/async-arrow-invalid-rest-2.js
rename to src/v8/test/message/fail/async-arrow-invalid-rest-2.js
diff --git a/src/v8/test/message/async-arrow-invalid-rest-2.out b/src/v8/test/message/fail/async-arrow-invalid-rest-2.out
similarity index 100%
rename from src/v8/test/message/async-arrow-invalid-rest-2.out
rename to src/v8/test/message/fail/async-arrow-invalid-rest-2.out
diff --git a/src/v8/test/message/async-arrow-invalid-rest.js b/src/v8/test/message/fail/async-arrow-invalid-rest.js
similarity index 100%
rename from src/v8/test/message/async-arrow-invalid-rest.js
rename to src/v8/test/message/fail/async-arrow-invalid-rest.js
diff --git a/src/v8/test/message/async-arrow-invalid-rest.out b/src/v8/test/message/fail/async-arrow-invalid-rest.out
similarity index 100%
rename from src/v8/test/message/async-arrow-invalid-rest.out
rename to src/v8/test/message/fail/async-arrow-invalid-rest.out
diff --git a/src/v8/test/message/async-arrow-param-after-rest.js b/src/v8/test/message/fail/async-arrow-param-after-rest.js
similarity index 100%
rename from src/v8/test/message/async-arrow-param-after-rest.js
rename to src/v8/test/message/fail/async-arrow-param-after-rest.js
diff --git a/src/v8/test/message/async-arrow-param-after-rest.out b/src/v8/test/message/fail/async-arrow-param-after-rest.out
similarity index 100%
rename from src/v8/test/message/async-arrow-param-after-rest.out
rename to src/v8/test/message/fail/async-arrow-param-after-rest.out
diff --git a/src/v8/test/message/await-non-async.js b/src/v8/test/message/fail/await-non-async.js
similarity index 100%
rename from src/v8/test/message/await-non-async.js
rename to src/v8/test/message/fail/await-non-async.js
diff --git a/src/v8/test/message/await-non-async.out b/src/v8/test/message/fail/await-non-async.out
similarity index 100%
rename from src/v8/test/message/await-non-async.out
rename to src/v8/test/message/fail/await-non-async.out
diff --git a/src/v8/test/message/call-non-constructable.js b/src/v8/test/message/fail/call-non-constructable.js
similarity index 100%
rename from src/v8/test/message/call-non-constructable.js
rename to src/v8/test/message/fail/call-non-constructable.js
diff --git a/src/v8/test/message/call-non-constructable.out b/src/v8/test/message/fail/call-non-constructable.out
similarity index 100%
rename from src/v8/test/message/call-non-constructable.out
rename to src/v8/test/message/fail/call-non-constructable.out
diff --git a/src/v8/test/message/call-primitive-constructor.js b/src/v8/test/message/fail/call-primitive-constructor.js
similarity index 100%
rename from src/v8/test/message/call-primitive-constructor.js
rename to src/v8/test/message/fail/call-primitive-constructor.js
diff --git a/src/v8/test/message/call-primitive-constructor.out b/src/v8/test/message/fail/call-primitive-constructor.out
similarity index 100%
rename from src/v8/test/message/call-primitive-constructor.out
rename to src/v8/test/message/fail/call-primitive-constructor.out
diff --git a/src/v8/test/message/call-primitive-function.js b/src/v8/test/message/fail/call-primitive-function.js
similarity index 100%
rename from src/v8/test/message/call-primitive-function.js
rename to src/v8/test/message/fail/call-primitive-function.js
diff --git a/src/v8/test/message/call-primitive-function.out b/src/v8/test/message/fail/call-primitive-function.out
similarity index 100%
rename from src/v8/test/message/call-primitive-function.out
rename to src/v8/test/message/fail/call-primitive-function.out
diff --git a/src/v8/test/message/call-undeclared-constructor.js b/src/v8/test/message/fail/call-undeclared-constructor.js
similarity index 100%
rename from src/v8/test/message/call-undeclared-constructor.js
rename to src/v8/test/message/fail/call-undeclared-constructor.js
diff --git a/src/v8/test/message/call-undeclared-constructor.out b/src/v8/test/message/fail/call-undeclared-constructor.out
similarity index 100%
rename from src/v8/test/message/call-undeclared-constructor.out
rename to src/v8/test/message/fail/call-undeclared-constructor.out
diff --git a/src/v8/test/message/call-undeclared-function.js b/src/v8/test/message/fail/call-undeclared-function.js
similarity index 100%
rename from src/v8/test/message/call-undeclared-function.js
rename to src/v8/test/message/fail/call-undeclared-function.js
diff --git a/src/v8/test/message/call-undeclared-function.out b/src/v8/test/message/fail/call-undeclared-function.out
similarity index 100%
rename from src/v8/test/message/call-undeclared-function.out
rename to src/v8/test/message/fail/call-undeclared-function.out
diff --git a/src/v8/test/message/class-constructor-accessor.js b/src/v8/test/message/fail/class-constructor-accessor.js
similarity index 100%
rename from src/v8/test/message/class-constructor-accessor.js
rename to src/v8/test/message/fail/class-constructor-accessor.js
diff --git a/src/v8/test/message/class-constructor-accessor.out b/src/v8/test/message/fail/class-constructor-accessor.out
similarity index 100%
rename from src/v8/test/message/class-constructor-accessor.out
rename to src/v8/test/message/fail/class-constructor-accessor.out
diff --git a/src/v8/test/message/class-constructor-generator.js b/src/v8/test/message/fail/class-constructor-generator.js
similarity index 100%
rename from src/v8/test/message/class-constructor-generator.js
rename to src/v8/test/message/fail/class-constructor-generator.js
diff --git a/src/v8/test/message/class-constructor-generator.out b/src/v8/test/message/fail/class-constructor-generator.out
similarity index 100%
rename from src/v8/test/message/class-constructor-generator.out
rename to src/v8/test/message/fail/class-constructor-generator.out
diff --git a/src/v8/test/message/fail/class-field-constructor.js b/src/v8/test/message/fail/class-field-constructor.js
new file mode 100644
index 0000000..baeb04e
--- /dev/null
+++ b/src/v8/test/message/fail/class-field-constructor.js
@@ -0,0 +1,9 @@
+// Copyright 2015 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+// Flags: --harmony-public-fields
+
+class X {
+  constructor = function() {};
+}
diff --git a/src/v8/test/message/fail/class-field-constructor.out b/src/v8/test/message/fail/class-field-constructor.out
new file mode 100644
index 0000000..51f2695
--- /dev/null
+++ b/src/v8/test/message/fail/class-field-constructor.out
@@ -0,0 +1,4 @@
+*%(basename)s:8: SyntaxError: Classes may not have a field named 'constructor'
+  constructor = function() {};
+  ^^^^^^^^^^^
+SyntaxError: Classes may not have a field named 'constructor'
\ No newline at end of file
diff --git a/src/v8/test/message/fail/class-field-static-constructor.js b/src/v8/test/message/fail/class-field-static-constructor.js
new file mode 100644
index 0000000..63ce1c0
--- /dev/null
+++ b/src/v8/test/message/fail/class-field-static-constructor.js
@@ -0,0 +1,9 @@
+// Copyright 2015 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+// Flags: --harmony-public-fields --harmony-static-fields
+
+class X {
+  static constructor = function() {};
+}
diff --git a/src/v8/test/message/fail/class-field-static-constructor.out b/src/v8/test/message/fail/class-field-static-constructor.out
new file mode 100644
index 0000000..6831d83
--- /dev/null
+++ b/src/v8/test/message/fail/class-field-static-constructor.out
@@ -0,0 +1,4 @@
+*%(basename)s:8: SyntaxError: Classes may not have a field named 'constructor'
+  static constructor = function() {};
+         ^^^^^^^^^^^
+SyntaxError: Classes may not have a field named 'constructor'
\ No newline at end of file
diff --git a/src/v8/test/message/fail/class-field-static-prototype.js b/src/v8/test/message/fail/class-field-static-prototype.js
new file mode 100644
index 0000000..6565188
--- /dev/null
+++ b/src/v8/test/message/fail/class-field-static-prototype.js
@@ -0,0 +1,9 @@
+// Copyright 2015 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+// Flags: --harmony-public-fields --harmony-static-fields
+
+class X {
+  static prototype = function() {};
+}
diff --git a/src/v8/test/message/fail/class-field-static-prototype.out b/src/v8/test/message/fail/class-field-static-prototype.out
new file mode 100644
index 0000000..06d6a75
--- /dev/null
+++ b/src/v8/test/message/fail/class-field-static-prototype.out
@@ -0,0 +1,4 @@
+*%(basename)s:8: SyntaxError: Classes may not have a static property named 'prototype'
+  static prototype = function() {};
+         ^^^^^^^^^
+SyntaxError: Classes may not have a static property named 'prototype'
\ No newline at end of file
diff --git a/src/v8/test/message/class-spread-property.js b/src/v8/test/message/fail/class-spread-property.js
similarity index 100%
rename from src/v8/test/message/class-spread-property.js
rename to src/v8/test/message/fail/class-spread-property.js
diff --git a/src/v8/test/message/class-spread-property.out b/src/v8/test/message/fail/class-spread-property.out
similarity index 100%
rename from src/v8/test/message/class-spread-property.out
rename to src/v8/test/message/fail/class-spread-property.out
diff --git a/src/v8/test/message/console.js b/src/v8/test/message/fail/console.js
similarity index 95%
rename from src/v8/test/message/console.js
rename to src/v8/test/message/fail/console.js
index f49ce4c..d8cbfa2 100644
--- a/src/v8/test/message/console.js
+++ b/src/v8/test/message/fail/console.js
@@ -18,7 +18,6 @@
 
 console.log("log", "more");
 console.warn("warn", { toString: () => 2 });
-console.error("error");
 console.debug("debug");
 console.info("info");
 
diff --git a/src/v8/test/message/fail/console.out b/src/v8/test/message/fail/console.out
new file mode 100644
index 0000000..ab1e412
--- /dev/null
+++ b/src/v8/test/message/fail/console.out
@@ -0,0 +1,16 @@
+console.timeEnd: default, {NUMBER}
+console.timeEnd: abcd, {NUMBER}
+console.timeEnd: b, {NUMBER}
+console.timeEnd: a, {NUMBER}
+log more
+console.warn: warn 2
+console.debug: debug
+console.info: info
+console.info: *%(basename)s:24: Error: exception
+console.info({ toString: () => {throw new Error("exception");} })
+                                ^
+Error: exception
+    at Object.toString (*%(basename)s:24:39)
+    at console.info (<anonymous>)
+    at *%(basename)s:24:9
+
diff --git a/src/v8/test/message/const-decl-no-init-sloppy.out b/src/v8/test/message/fail/const-decl-no-init-sloppy.out
similarity index 100%
rename from src/v8/test/message/const-decl-no-init-sloppy.out
rename to src/v8/test/message/fail/const-decl-no-init-sloppy.out
diff --git a/src/v8/test/message/const-decl-no-init.js b/src/v8/test/message/fail/const-decl-no-init.js
similarity index 100%
rename from src/v8/test/message/const-decl-no-init.js
rename to src/v8/test/message/fail/const-decl-no-init.js
diff --git a/src/v8/test/message/const-decl-no-init.out b/src/v8/test/message/fail/const-decl-no-init.out
similarity index 100%
rename from src/v8/test/message/const-decl-no-init.out
rename to src/v8/test/message/fail/const-decl-no-init.out
diff --git a/src/v8/test/message/const-decl-no-init2.js b/src/v8/test/message/fail/const-decl-no-init2.js
similarity index 100%
rename from src/v8/test/message/const-decl-no-init2.js
rename to src/v8/test/message/fail/const-decl-no-init2.js
diff --git a/src/v8/test/message/const-decl-no-init2.out b/src/v8/test/message/fail/const-decl-no-init2.out
similarity index 100%
rename from src/v8/test/message/const-decl-no-init2.out
rename to src/v8/test/message/fail/const-decl-no-init2.out
diff --git a/src/v8/test/message/default-parameter-tdz-arrow.js b/src/v8/test/message/fail/default-parameter-tdz-arrow.js
similarity index 100%
rename from src/v8/test/message/default-parameter-tdz-arrow.js
rename to src/v8/test/message/fail/default-parameter-tdz-arrow.js
diff --git a/src/v8/test/message/default-parameter-tdz-arrow.out b/src/v8/test/message/fail/default-parameter-tdz-arrow.out
similarity index 100%
rename from src/v8/test/message/default-parameter-tdz-arrow.out
rename to src/v8/test/message/fail/default-parameter-tdz-arrow.out
diff --git a/src/v8/test/message/default-parameter-tdz.js b/src/v8/test/message/fail/default-parameter-tdz.js
similarity index 100%
rename from src/v8/test/message/default-parameter-tdz.js
rename to src/v8/test/message/fail/default-parameter-tdz.js
diff --git a/src/v8/test/message/default-parameter-tdz.out b/src/v8/test/message/fail/default-parameter-tdz.out
similarity index 100%
rename from src/v8/test/message/default-parameter-tdz.out
rename to src/v8/test/message/fail/default-parameter-tdz.out
diff --git a/src/v8/test/message/destructuring-array-non-iterable-number.js b/src/v8/test/message/fail/destructuring-array-non-iterable-number.js
similarity index 100%
rename from src/v8/test/message/destructuring-array-non-iterable-number.js
rename to src/v8/test/message/fail/destructuring-array-non-iterable-number.js
diff --git a/src/v8/test/message/destructuring-array-non-iterable-number.out b/src/v8/test/message/fail/destructuring-array-non-iterable-number.out
similarity index 100%
rename from src/v8/test/message/destructuring-array-non-iterable-number.out
rename to src/v8/test/message/fail/destructuring-array-non-iterable-number.out
diff --git a/src/v8/test/message/destructuring-array-non-iterable-object-literal-complex.js b/src/v8/test/message/fail/destructuring-array-non-iterable-object-literal-complex.js
similarity index 100%
rename from src/v8/test/message/destructuring-array-non-iterable-object-literal-complex.js
rename to src/v8/test/message/fail/destructuring-array-non-iterable-object-literal-complex.js
diff --git a/src/v8/test/message/destructuring-array-non-iterable-object-literal-complex.out b/src/v8/test/message/fail/destructuring-array-non-iterable-object-literal-complex.out
similarity index 100%
rename from src/v8/test/message/destructuring-array-non-iterable-object-literal-complex.out
rename to src/v8/test/message/fail/destructuring-array-non-iterable-object-literal-complex.out
diff --git a/src/v8/test/message/destructuring-array-non-iterable-object-literal.js b/src/v8/test/message/fail/destructuring-array-non-iterable-object-literal.js
similarity index 100%
rename from src/v8/test/message/destructuring-array-non-iterable-object-literal.js
rename to src/v8/test/message/fail/destructuring-array-non-iterable-object-literal.js
diff --git a/src/v8/test/message/destructuring-array-non-iterable-object-literal.out b/src/v8/test/message/fail/destructuring-array-non-iterable-object-literal.out
similarity index 100%
rename from src/v8/test/message/destructuring-array-non-iterable-object-literal.out
rename to src/v8/test/message/fail/destructuring-array-non-iterable-object-literal.out
diff --git a/src/v8/test/message/destructuring-array-non-iterable-object.js b/src/v8/test/message/fail/destructuring-array-non-iterable-object.js
similarity index 100%
rename from src/v8/test/message/destructuring-array-non-iterable-object.js
rename to src/v8/test/message/fail/destructuring-array-non-iterable-object.js
diff --git a/src/v8/test/message/destructuring-array-non-iterable-object.out b/src/v8/test/message/fail/destructuring-array-non-iterable-object.out
similarity index 100%
rename from src/v8/test/message/destructuring-array-non-iterable-object.out
rename to src/v8/test/message/fail/destructuring-array-non-iterable-object.out
diff --git a/src/v8/test/message/destructuring-array-non-iterable-undefined.js b/src/v8/test/message/fail/destructuring-array-non-iterable-undefined.js
similarity index 100%
rename from src/v8/test/message/destructuring-array-non-iterable-undefined.js
rename to src/v8/test/message/fail/destructuring-array-non-iterable-undefined.js
diff --git a/src/v8/test/message/destructuring-array-non-iterable-undefined.out b/src/v8/test/message/fail/destructuring-array-non-iterable-undefined.out
similarity index 100%
rename from src/v8/test/message/destructuring-array-non-iterable-undefined.out
rename to src/v8/test/message/fail/destructuring-array-non-iterable-undefined.out
diff --git a/src/v8/test/message/destructuring-decl-no-init-array.js b/src/v8/test/message/fail/destructuring-decl-no-init-array.js
similarity index 100%
rename from src/v8/test/message/destructuring-decl-no-init-array.js
rename to src/v8/test/message/fail/destructuring-decl-no-init-array.js
diff --git a/src/v8/test/message/destructuring-decl-no-init-array.out b/src/v8/test/message/fail/destructuring-decl-no-init-array.out
similarity index 100%
rename from src/v8/test/message/destructuring-decl-no-init-array.out
rename to src/v8/test/message/fail/destructuring-decl-no-init-array.out
diff --git a/src/v8/test/message/destructuring-decl-no-init-array2.js b/src/v8/test/message/fail/destructuring-decl-no-init-array2.js
similarity index 100%
rename from src/v8/test/message/destructuring-decl-no-init-array2.js
rename to src/v8/test/message/fail/destructuring-decl-no-init-array2.js
diff --git a/src/v8/test/message/destructuring-decl-no-init-array2.out b/src/v8/test/message/fail/destructuring-decl-no-init-array2.out
similarity index 100%
rename from src/v8/test/message/destructuring-decl-no-init-array2.out
rename to src/v8/test/message/fail/destructuring-decl-no-init-array2.out
diff --git a/src/v8/test/message/destructuring-decl-no-init-obj.js b/src/v8/test/message/fail/destructuring-decl-no-init-obj.js
similarity index 100%
rename from src/v8/test/message/destructuring-decl-no-init-obj.js
rename to src/v8/test/message/fail/destructuring-decl-no-init-obj.js
diff --git a/src/v8/test/message/destructuring-decl-no-init-obj.out b/src/v8/test/message/fail/destructuring-decl-no-init-obj.out
similarity index 100%
rename from src/v8/test/message/destructuring-decl-no-init-obj.out
rename to src/v8/test/message/fail/destructuring-decl-no-init-obj.out
diff --git a/src/v8/test/message/destructuring-decl-no-init-obj2.js b/src/v8/test/message/fail/destructuring-decl-no-init-obj2.js
similarity index 100%
rename from src/v8/test/message/destructuring-decl-no-init-obj2.js
rename to src/v8/test/message/fail/destructuring-decl-no-init-obj2.js
diff --git a/src/v8/test/message/destructuring-decl-no-init-obj2.out b/src/v8/test/message/fail/destructuring-decl-no-init-obj2.out
similarity index 100%
rename from src/v8/test/message/destructuring-decl-no-init-obj2.out
rename to src/v8/test/message/fail/destructuring-decl-no-init-obj2.out
diff --git a/src/v8/test/message/destructuring-function-non-iterable.js b/src/v8/test/message/fail/destructuring-function-non-iterable.js
similarity index 100%
rename from src/v8/test/message/destructuring-function-non-iterable.js
rename to src/v8/test/message/fail/destructuring-function-non-iterable.js
diff --git a/src/v8/test/message/destructuring-function-non-iterable.out b/src/v8/test/message/fail/destructuring-function-non-iterable.out
similarity index 100%
rename from src/v8/test/message/destructuring-function-non-iterable.out
rename to src/v8/test/message/fail/destructuring-function-non-iterable.out
diff --git a/src/v8/test/message/destructuring-modify-const.js b/src/v8/test/message/fail/destructuring-modify-const.js
similarity index 100%
rename from src/v8/test/message/destructuring-modify-const.js
rename to src/v8/test/message/fail/destructuring-modify-const.js
diff --git a/src/v8/test/message/destructuring-modify-const.out b/src/v8/test/message/fail/destructuring-modify-const.out
similarity index 100%
rename from src/v8/test/message/destructuring-modify-const.out
rename to src/v8/test/message/fail/destructuring-modify-const.out
diff --git a/src/v8/test/message/destructuring-new-callable-non-iterable.js b/src/v8/test/message/fail/destructuring-new-callable-non-iterable.js
similarity index 100%
rename from src/v8/test/message/destructuring-new-callable-non-iterable.js
rename to src/v8/test/message/fail/destructuring-new-callable-non-iterable.js
diff --git a/src/v8/test/message/destructuring-new-callable-non-iterable.out b/src/v8/test/message/fail/destructuring-new-callable-non-iterable.out
similarity index 100%
rename from src/v8/test/message/destructuring-new-callable-non-iterable.out
rename to src/v8/test/message/fail/destructuring-new-callable-non-iterable.out
diff --git a/src/v8/test/message/destructuring-non-function-non-iterable.js b/src/v8/test/message/fail/destructuring-non-function-non-iterable.js
similarity index 100%
rename from src/v8/test/message/destructuring-non-function-non-iterable.js
rename to src/v8/test/message/fail/destructuring-non-function-non-iterable.js
diff --git a/src/v8/test/message/destructuring-non-function-non-iterable.out b/src/v8/test/message/fail/destructuring-non-function-non-iterable.out
similarity index 100%
rename from src/v8/test/message/destructuring-non-function-non-iterable.out
rename to src/v8/test/message/fail/destructuring-non-function-non-iterable.out
diff --git a/src/v8/test/message/destructuring-undefined-computed-property.js b/src/v8/test/message/fail/destructuring-undefined-computed-property.js
similarity index 100%
rename from src/v8/test/message/destructuring-undefined-computed-property.js
rename to src/v8/test/message/fail/destructuring-undefined-computed-property.js
diff --git a/src/v8/test/message/destructuring-undefined-computed-property.out b/src/v8/test/message/fail/destructuring-undefined-computed-property.out
similarity index 100%
rename from src/v8/test/message/destructuring-undefined-computed-property.out
rename to src/v8/test/message/fail/destructuring-undefined-computed-property.out
diff --git a/src/v8/test/message/destructuring-undefined-number-property.js b/src/v8/test/message/fail/destructuring-undefined-number-property.js
similarity index 100%
rename from src/v8/test/message/destructuring-undefined-number-property.js
rename to src/v8/test/message/fail/destructuring-undefined-number-property.js
diff --git a/src/v8/test/message/destructuring-undefined-number-property.out b/src/v8/test/message/fail/destructuring-undefined-number-property.out
similarity index 100%
rename from src/v8/test/message/destructuring-undefined-number-property.out
rename to src/v8/test/message/fail/destructuring-undefined-number-property.out
diff --git a/src/v8/test/message/destructuring-undefined-string-property.js b/src/v8/test/message/fail/destructuring-undefined-string-property.js
similarity index 100%
rename from src/v8/test/message/destructuring-undefined-string-property.js
rename to src/v8/test/message/fail/destructuring-undefined-string-property.js
diff --git a/src/v8/test/message/destructuring-undefined-string-property.out b/src/v8/test/message/fail/destructuring-undefined-string-property.out
similarity index 100%
rename from src/v8/test/message/destructuring-undefined-string-property.out
rename to src/v8/test/message/fail/destructuring-undefined-string-property.out
diff --git a/src/v8/test/message/modules-star-conflict1.js b/src/v8/test/message/fail/dynamic-import-missing-specifier.js
similarity index 74%
copy from src/v8/test/message/modules-star-conflict1.js
copy to src/v8/test/message/fail/dynamic-import-missing-specifier.js
index 1bf3473..c2af815 100644
--- a/src/v8/test/message/modules-star-conflict1.js
+++ b/src/v8/test/message/fail/dynamic-import-missing-specifier.js
@@ -2,6 +2,6 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 //
-// MODULE
+// Flags: --harmony-dynamic-import
 
-import {a} from "../mjsunit/modules-skip-7.js";
+import();
diff --git a/src/v8/test/message/fail/dynamic-import-missing-specifier.out b/src/v8/test/message/fail/dynamic-import-missing-specifier.out
new file mode 100644
index 0000000..2f8c1cf
--- /dev/null
+++ b/src/v8/test/message/fail/dynamic-import-missing-specifier.out
@@ -0,0 +1,4 @@
+*%(basename)s:7: SyntaxError: import() requires a specifier
+import();
+      ^
+SyntaxError: import() requires a specifier
diff --git a/src/v8/test/message/export-duplicate-as.js b/src/v8/test/message/fail/export-duplicate-as.js
similarity index 100%
rename from src/v8/test/message/export-duplicate-as.js
rename to src/v8/test/message/fail/export-duplicate-as.js
diff --git a/src/v8/test/message/export-duplicate-as.out b/src/v8/test/message/fail/export-duplicate-as.out
similarity index 100%
rename from src/v8/test/message/export-duplicate-as.out
rename to src/v8/test/message/fail/export-duplicate-as.out
diff --git a/src/v8/test/message/export-duplicate-default.js b/src/v8/test/message/fail/export-duplicate-default.js
similarity index 100%
rename from src/v8/test/message/export-duplicate-default.js
rename to src/v8/test/message/fail/export-duplicate-default.js
diff --git a/src/v8/test/message/export-duplicate-default.out b/src/v8/test/message/fail/export-duplicate-default.out
similarity index 100%
rename from src/v8/test/message/export-duplicate-default.out
rename to src/v8/test/message/fail/export-duplicate-default.out
diff --git a/src/v8/test/message/export-duplicate.js b/src/v8/test/message/fail/export-duplicate.js
similarity index 100%
rename from src/v8/test/message/export-duplicate.js
rename to src/v8/test/message/fail/export-duplicate.js
diff --git a/src/v8/test/message/export-duplicate.out b/src/v8/test/message/fail/export-duplicate.out
similarity index 100%
rename from src/v8/test/message/export-duplicate.out
rename to src/v8/test/message/fail/export-duplicate.out
diff --git a/src/v8/test/message/for-in-let-loop-initializers-strict.js b/src/v8/test/message/fail/for-in-let-loop-initializers-strict.js
similarity index 100%
rename from src/v8/test/message/for-in-let-loop-initializers-strict.js
rename to src/v8/test/message/fail/for-in-let-loop-initializers-strict.js
diff --git a/src/v8/test/message/for-in-let-loop-initializers-strict.out b/src/v8/test/message/fail/for-in-let-loop-initializers-strict.out
similarity index 100%
rename from src/v8/test/message/for-in-let-loop-initializers-strict.out
rename to src/v8/test/message/fail/for-in-let-loop-initializers-strict.out
diff --git a/src/v8/test/message/for-in-loop-initializers-destructuring.js b/src/v8/test/message/fail/for-in-loop-initializers-destructuring.js
similarity index 100%
rename from src/v8/test/message/for-in-loop-initializers-destructuring.js
rename to src/v8/test/message/fail/for-in-loop-initializers-destructuring.js
diff --git a/src/v8/test/message/for-in-loop-initializers-destructuring.out b/src/v8/test/message/fail/for-in-loop-initializers-destructuring.out
similarity index 100%
rename from src/v8/test/message/for-in-loop-initializers-destructuring.out
rename to src/v8/test/message/fail/for-in-loop-initializers-destructuring.out
diff --git a/src/v8/test/message/for-in-loop-initializers-strict.js b/src/v8/test/message/fail/for-in-loop-initializers-strict.js
similarity index 100%
rename from src/v8/test/message/for-in-loop-initializers-strict.js
rename to src/v8/test/message/fail/for-in-loop-initializers-strict.js
diff --git a/src/v8/test/message/for-in-loop-initializers-strict.out b/src/v8/test/message/fail/for-in-loop-initializers-strict.out
similarity index 100%
rename from src/v8/test/message/for-in-loop-initializers-strict.out
rename to src/v8/test/message/fail/for-in-loop-initializers-strict.out
diff --git a/src/v8/test/message/for-loop-invalid-lhs.js b/src/v8/test/message/fail/for-loop-invalid-lhs.js
similarity index 100%
rename from src/v8/test/message/for-loop-invalid-lhs.js
rename to src/v8/test/message/fail/for-loop-invalid-lhs.js
diff --git a/src/v8/test/message/for-loop-invalid-lhs.out b/src/v8/test/message/fail/for-loop-invalid-lhs.out
similarity index 100%
rename from src/v8/test/message/for-loop-invalid-lhs.out
rename to src/v8/test/message/fail/for-loop-invalid-lhs.out
diff --git a/src/v8/test/message/for-of-let-loop-initializers.js b/src/v8/test/message/fail/for-of-let-loop-initializers.js
similarity index 100%
rename from src/v8/test/message/for-of-let-loop-initializers.js
rename to src/v8/test/message/fail/for-of-let-loop-initializers.js
diff --git a/src/v8/test/message/for-of-let-loop-initializers.out b/src/v8/test/message/fail/for-of-let-loop-initializers.out
similarity index 100%
rename from src/v8/test/message/for-of-let-loop-initializers.out
rename to src/v8/test/message/fail/for-of-let-loop-initializers.out
diff --git a/src/v8/test/message/for-of-loop-initializers-sloppy.js b/src/v8/test/message/fail/for-of-loop-initializers-sloppy.js
similarity index 100%
rename from src/v8/test/message/for-of-loop-initializers-sloppy.js
rename to src/v8/test/message/fail/for-of-loop-initializers-sloppy.js
diff --git a/src/v8/test/message/for-of-loop-initializers-sloppy.out b/src/v8/test/message/fail/for-of-loop-initializers-sloppy.out
similarity index 100%
rename from src/v8/test/message/for-of-loop-initializers-sloppy.out
rename to src/v8/test/message/fail/for-of-loop-initializers-sloppy.out
diff --git a/src/v8/test/message/for-of-loop-initializers-strict.js b/src/v8/test/message/fail/for-of-loop-initializers-strict.js
similarity index 100%
rename from src/v8/test/message/for-of-loop-initializers-strict.js
rename to src/v8/test/message/fail/for-of-loop-initializers-strict.js
diff --git a/src/v8/test/message/for-of-loop-initializers-strict.out b/src/v8/test/message/fail/for-of-loop-initializers-strict.out
similarity index 100%
rename from src/v8/test/message/for-of-loop-initializers-strict.out
rename to src/v8/test/message/fail/for-of-loop-initializers-strict.out
diff --git a/src/v8/test/message/for-of-non-iterable.js b/src/v8/test/message/fail/for-of-non-iterable.js
similarity index 100%
rename from src/v8/test/message/for-of-non-iterable.js
rename to src/v8/test/message/fail/for-of-non-iterable.js
diff --git a/src/v8/test/message/for-of-non-iterable.out b/src/v8/test/message/fail/for-of-non-iterable.out
similarity index 100%
rename from src/v8/test/message/for-of-non-iterable.out
rename to src/v8/test/message/fail/for-of-non-iterable.out
diff --git a/src/v8/test/message/for-of-throw-in-body.js b/src/v8/test/message/fail/for-of-throw-in-body.js
similarity index 100%
rename from src/v8/test/message/for-of-throw-in-body.js
rename to src/v8/test/message/fail/for-of-throw-in-body.js
diff --git a/src/v8/test/message/for-of-throw-in-body.out b/src/v8/test/message/fail/for-of-throw-in-body.out
similarity index 100%
rename from src/v8/test/message/for-of-throw-in-body.out
rename to src/v8/test/message/fail/for-of-throw-in-body.out
diff --git a/src/v8/test/message/formal-parameters-bad-rest.js b/src/v8/test/message/fail/formal-parameters-bad-rest.js
similarity index 100%
rename from src/v8/test/message/formal-parameters-bad-rest.js
rename to src/v8/test/message/fail/formal-parameters-bad-rest.js
diff --git a/src/v8/test/message/formal-parameters-bad-rest.out b/src/v8/test/message/fail/formal-parameters-bad-rest.out
similarity index 100%
rename from src/v8/test/message/formal-parameters-bad-rest.out
rename to src/v8/test/message/fail/formal-parameters-bad-rest.out
diff --git a/src/v8/test/message/formal-parameters-strict-body.js b/src/v8/test/message/fail/formal-parameters-strict-body.js
similarity index 100%
rename from src/v8/test/message/formal-parameters-strict-body.js
rename to src/v8/test/message/fail/formal-parameters-strict-body.js
diff --git a/src/v8/test/message/formal-parameters-strict-body.out b/src/v8/test/message/fail/formal-parameters-strict-body.out
similarity index 100%
rename from src/v8/test/message/formal-parameters-strict-body.out
rename to src/v8/test/message/fail/formal-parameters-strict-body.out
diff --git a/src/v8/test/message/formal-parameters-trailing-comma.js b/src/v8/test/message/fail/formal-parameters-trailing-comma.js
similarity index 100%
rename from src/v8/test/message/formal-parameters-trailing-comma.js
rename to src/v8/test/message/fail/formal-parameters-trailing-comma.js
diff --git a/src/v8/test/message/formal-parameters-trailing-comma.out b/src/v8/test/message/fail/formal-parameters-trailing-comma.out
similarity index 100%
rename from src/v8/test/message/formal-parameters-trailing-comma.out
rename to src/v8/test/message/fail/formal-parameters-trailing-comma.out
diff --git a/src/v8/test/mjsunit/regress/wasm/regression-694433.js b/src/v8/test/message/fail/func-name-inferrer-arg-1.js
similarity index 62%
copy from src/v8/test/mjsunit/regress/wasm/regression-694433.js
copy to src/v8/test/message/fail/func-name-inferrer-arg-1.js
index a260e20..6c28367 100644
--- a/src/v8/test/mjsunit/regress/wasm/regression-694433.js
+++ b/src/v8/test/message/fail/func-name-inferrer-arg-1.js
@@ -2,5 +2,9 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-var size = 0x40000000;
-assertThrows(() => WebAssembly.validate(new Uint16Array(size)), RangeError);
+(function (param = function() { throw new Error('boom') }) {
+  (() => {
+    param();
+  })();
+
+})();
diff --git a/src/v8/test/message/fail/func-name-inferrer-arg-1.out b/src/v8/test/message/fail/func-name-inferrer-arg-1.out
new file mode 100644
index 0000000..3c19121
--- /dev/null
+++ b/src/v8/test/message/fail/func-name-inferrer-arg-1.out
@@ -0,0 +1,8 @@
+*%(basename)s:5: Error: boom
+(function (param = function() { throw new Error('boom') }) {
+                                ^
+Error: boom
+    at param (*%(basename)s:5:39)
+    at *%(basename)s:7:5
+    at *%(basename)s:8:5
+    at *%(basename)s:10:3
\ No newline at end of file
diff --git a/src/v8/test/mjsunit/regress/wasm/regression-694433.js b/src/v8/test/message/fail/func-name-inferrer-arg.js
similarity index 62%
copy from src/v8/test/mjsunit/regress/wasm/regression-694433.js
copy to src/v8/test/message/fail/func-name-inferrer-arg.js
index a260e20..3fcd044 100644
--- a/src/v8/test/mjsunit/regress/wasm/regression-694433.js
+++ b/src/v8/test/message/fail/func-name-inferrer-arg.js
@@ -2,5 +2,9 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-var size = 0x40000000;
-assertThrows(() => WebAssembly.validate(new Uint16Array(size)), RangeError);
+(function (param) {
+  (() => {
+    throw new Error('boom');
+  })();
+
+})();
diff --git a/src/v8/test/message/fail/func-name-inferrer-arg.out b/src/v8/test/message/fail/func-name-inferrer-arg.out
new file mode 100644
index 0000000..06e001d
--- /dev/null
+++ b/src/v8/test/message/fail/func-name-inferrer-arg.out
@@ -0,0 +1,7 @@
+*%(basename)s:7: Error: boom
+    throw new Error('boom');
+    ^
+Error: boom
+    at *%(basename)s:7:11
+    at *%(basename)s:8:5
+    at *%(basename)s:10:3
\ No newline at end of file
diff --git a/src/v8/test/message/function-param-after-rest.js b/src/v8/test/message/fail/function-param-after-rest.js
similarity index 100%
rename from src/v8/test/message/function-param-after-rest.js
rename to src/v8/test/message/fail/function-param-after-rest.js
diff --git a/src/v8/test/message/function-param-after-rest.out b/src/v8/test/message/fail/function-param-after-rest.out
similarity index 100%
rename from src/v8/test/message/function-param-after-rest.out
rename to src/v8/test/message/fail/function-param-after-rest.out
diff --git a/src/v8/test/message/function-sent-escaped.js b/src/v8/test/message/fail/function-sent-escaped.js
similarity index 100%
rename from src/v8/test/message/function-sent-escaped.js
rename to src/v8/test/message/fail/function-sent-escaped.js
diff --git a/src/v8/test/message/function-sent-escaped.out b/src/v8/test/message/fail/function-sent-escaped.out
similarity index 100%
rename from src/v8/test/message/function-sent-escaped.out
rename to src/v8/test/message/fail/function-sent-escaped.out
diff --git a/src/v8/test/message/generators-throw1.js b/src/v8/test/message/fail/generators-throw1.js
similarity index 100%
rename from src/v8/test/message/generators-throw1.js
rename to src/v8/test/message/fail/generators-throw1.js
diff --git a/src/v8/test/message/generators-throw1.out b/src/v8/test/message/fail/generators-throw1.out
similarity index 100%
rename from src/v8/test/message/generators-throw1.out
rename to src/v8/test/message/fail/generators-throw1.out
diff --git a/src/v8/test/message/generators-throw2.js b/src/v8/test/message/fail/generators-throw2.js
similarity index 100%
rename from src/v8/test/message/generators-throw2.js
rename to src/v8/test/message/fail/generators-throw2.js
diff --git a/src/v8/test/message/generators-throw2.out b/src/v8/test/message/fail/generators-throw2.out
similarity index 100%
rename from src/v8/test/message/generators-throw2.out
rename to src/v8/test/message/fail/generators-throw2.out
diff --git a/src/v8/test/message/get-iterator-return-non-receiver.js b/src/v8/test/message/fail/get-iterator-return-non-receiver.js
similarity index 100%
rename from src/v8/test/message/get-iterator-return-non-receiver.js
rename to src/v8/test/message/fail/get-iterator-return-non-receiver.js
diff --git a/src/v8/test/message/get-iterator-return-non-receiver.out b/src/v8/test/message/fail/get-iterator-return-non-receiver.out
similarity index 100%
rename from src/v8/test/message/get-iterator-return-non-receiver.out
rename to src/v8/test/message/fail/get-iterator-return-non-receiver.out
diff --git a/src/v8/test/message/get-iterator1.js b/src/v8/test/message/fail/get-iterator1.js
similarity index 100%
rename from src/v8/test/message/get-iterator1.js
rename to src/v8/test/message/fail/get-iterator1.js
diff --git a/src/v8/test/message/get-iterator1.out b/src/v8/test/message/fail/get-iterator1.out
similarity index 100%
rename from src/v8/test/message/get-iterator1.out
rename to src/v8/test/message/fail/get-iterator1.out
diff --git a/src/v8/test/message/import-as-eval.js b/src/v8/test/message/fail/import-as-eval.js
similarity index 100%
rename from src/v8/test/message/import-as-eval.js
rename to src/v8/test/message/fail/import-as-eval.js
diff --git a/src/v8/test/message/import-as-eval.out b/src/v8/test/message/fail/import-as-eval.out
similarity index 100%
rename from src/v8/test/message/import-as-eval.out
rename to src/v8/test/message/fail/import-as-eval.out
diff --git a/src/v8/test/message/import-as-redeclaration.js b/src/v8/test/message/fail/import-as-redeclaration.js
similarity index 100%
rename from src/v8/test/message/import-as-redeclaration.js
rename to src/v8/test/message/fail/import-as-redeclaration.js
diff --git a/src/v8/test/message/import-as-redeclaration.out b/src/v8/test/message/fail/import-as-redeclaration.out
similarity index 100%
rename from src/v8/test/message/import-as-redeclaration.out
rename to src/v8/test/message/fail/import-as-redeclaration.out
diff --git a/src/v8/test/message/import-as-reserved-word.js b/src/v8/test/message/fail/import-as-reserved-word.js
similarity index 100%
rename from src/v8/test/message/import-as-reserved-word.js
rename to src/v8/test/message/fail/import-as-reserved-word.js
diff --git a/src/v8/test/message/import-as-reserved-word.out b/src/v8/test/message/fail/import-as-reserved-word.out
similarity index 100%
rename from src/v8/test/message/import-as-reserved-word.out
rename to src/v8/test/message/fail/import-as-reserved-word.out
diff --git a/src/v8/test/message/import-eval.js b/src/v8/test/message/fail/import-eval.js
similarity index 100%
rename from src/v8/test/message/import-eval.js
rename to src/v8/test/message/fail/import-eval.js
diff --git a/src/v8/test/message/import-eval.out b/src/v8/test/message/fail/import-eval.out
similarity index 100%
rename from src/v8/test/message/import-eval.out
rename to src/v8/test/message/fail/import-eval.out
diff --git a/src/v8/test/message/import-redeclaration.js b/src/v8/test/message/fail/import-redeclaration.js
similarity index 100%
rename from src/v8/test/message/import-redeclaration.js
rename to src/v8/test/message/fail/import-redeclaration.js
diff --git a/src/v8/test/message/import-redeclaration.out b/src/v8/test/message/fail/import-redeclaration.out
similarity index 100%
rename from src/v8/test/message/import-redeclaration.out
rename to src/v8/test/message/fail/import-redeclaration.out
diff --git a/src/v8/test/message/import-reserved-word.js b/src/v8/test/message/fail/import-reserved-word.js
similarity index 100%
rename from src/v8/test/message/import-reserved-word.js
rename to src/v8/test/message/fail/import-reserved-word.js
diff --git a/src/v8/test/message/import-reserved-word.out b/src/v8/test/message/fail/import-reserved-word.out
similarity index 100%
rename from src/v8/test/message/import-reserved-word.out
rename to src/v8/test/message/fail/import-reserved-word.out
diff --git a/src/v8/test/message/instanceof-noncallable.js b/src/v8/test/message/fail/instanceof-noncallable.js
similarity index 100%
rename from src/v8/test/message/instanceof-noncallable.js
rename to src/v8/test/message/fail/instanceof-noncallable.js
diff --git a/src/v8/test/message/instanceof-noncallable.out b/src/v8/test/message/fail/instanceof-noncallable.out
similarity index 100%
rename from src/v8/test/message/instanceof-noncallable.out
rename to src/v8/test/message/fail/instanceof-noncallable.out
diff --git a/src/v8/test/message/instanceof-nonobject.js b/src/v8/test/message/fail/instanceof-nonobject.js
similarity index 100%
rename from src/v8/test/message/instanceof-nonobject.js
rename to src/v8/test/message/fail/instanceof-nonobject.js
diff --git a/src/v8/test/message/instanceof-nonobject.out b/src/v8/test/message/fail/instanceof-nonobject.out
similarity index 100%
rename from src/v8/test/message/instanceof-nonobject.out
rename to src/v8/test/message/fail/instanceof-nonobject.out
diff --git a/src/v8/test/message/invalid-spread-2.js b/src/v8/test/message/fail/invalid-spread-2.js
similarity index 100%
rename from src/v8/test/message/invalid-spread-2.js
rename to src/v8/test/message/fail/invalid-spread-2.js
diff --git a/src/v8/test/message/invalid-spread-2.out b/src/v8/test/message/fail/invalid-spread-2.out
similarity index 100%
rename from src/v8/test/message/invalid-spread-2.out
rename to src/v8/test/message/fail/invalid-spread-2.out
diff --git a/src/v8/test/message/invalid-spread.js b/src/v8/test/message/fail/invalid-spread.js
similarity index 100%
rename from src/v8/test/message/invalid-spread.js
rename to src/v8/test/message/fail/invalid-spread.js
diff --git a/src/v8/test/message/invalid-spread.out b/src/v8/test/message/fail/invalid-spread.out
similarity index 100%
rename from src/v8/test/message/invalid-spread.out
rename to src/v8/test/message/fail/invalid-spread.out
diff --git a/src/v8/test/message/isvar.js b/src/v8/test/message/fail/isvar.js
similarity index 100%
rename from src/v8/test/message/isvar.js
rename to src/v8/test/message/fail/isvar.js
diff --git a/src/v8/test/message/isvar.out b/src/v8/test/message/fail/isvar.out
similarity index 100%
rename from src/v8/test/message/isvar.out
rename to src/v8/test/message/fail/isvar.out
diff --git a/src/v8/test/message/let-lexical-declaration-destructuring-brace-in-single-statement.js b/src/v8/test/message/fail/let-lexical-declaration-destructuring-brace-in-single-statement.js
similarity index 100%
rename from src/v8/test/message/let-lexical-declaration-destructuring-brace-in-single-statement.js
rename to src/v8/test/message/fail/let-lexical-declaration-destructuring-brace-in-single-statement.js
diff --git a/src/v8/test/message/let-lexical-declaration-destructuring-brace-in-single-statement.out b/src/v8/test/message/fail/let-lexical-declaration-destructuring-brace-in-single-statement.out
similarity index 100%
rename from src/v8/test/message/let-lexical-declaration-destructuring-brace-in-single-statement.out
rename to src/v8/test/message/fail/let-lexical-declaration-destructuring-brace-in-single-statement.out
diff --git a/src/v8/test/message/let-lexical-declaration-destructuring-in-single-statement.js b/src/v8/test/message/fail/let-lexical-declaration-destructuring-in-single-statement.js
similarity index 100%
rename from src/v8/test/message/let-lexical-declaration-destructuring-in-single-statement.js
rename to src/v8/test/message/fail/let-lexical-declaration-destructuring-in-single-statement.js
diff --git a/src/v8/test/message/let-lexical-declaration-destructuring-in-single-statement.out b/src/v8/test/message/fail/let-lexical-declaration-destructuring-in-single-statement.out
similarity index 100%
rename from src/v8/test/message/let-lexical-declaration-destructuring-in-single-statement.out
rename to src/v8/test/message/fail/let-lexical-declaration-destructuring-in-single-statement.out
diff --git a/src/v8/test/message/let-lexical-declaration-in-single-statement.js b/src/v8/test/message/fail/let-lexical-declaration-in-single-statement.js
similarity index 100%
rename from src/v8/test/message/let-lexical-declaration-in-single-statement.js
rename to src/v8/test/message/fail/let-lexical-declaration-in-single-statement.js
diff --git a/src/v8/test/message/let-lexical-declaration-in-single-statement.out b/src/v8/test/message/fail/let-lexical-declaration-in-single-statement.out
similarity index 100%
rename from src/v8/test/message/let-lexical-declaration-in-single-statement.out
rename to src/v8/test/message/fail/let-lexical-declaration-in-single-statement.out
diff --git a/src/v8/test/message/let-lexical-name-in-array-prohibited.js b/src/v8/test/message/fail/let-lexical-name-in-array-prohibited.js
similarity index 100%
rename from src/v8/test/message/let-lexical-name-in-array-prohibited.js
rename to src/v8/test/message/fail/let-lexical-name-in-array-prohibited.js
diff --git a/src/v8/test/message/let-lexical-name-in-array-prohibited.out b/src/v8/test/message/fail/let-lexical-name-in-array-prohibited.out
similarity index 100%
rename from src/v8/test/message/let-lexical-name-in-array-prohibited.out
rename to src/v8/test/message/fail/let-lexical-name-in-array-prohibited.out
diff --git a/src/v8/test/message/let-lexical-name-in-object-prohibited.js b/src/v8/test/message/fail/let-lexical-name-in-object-prohibited.js
similarity index 100%
rename from src/v8/test/message/let-lexical-name-in-object-prohibited.js
rename to src/v8/test/message/fail/let-lexical-name-in-object-prohibited.js
diff --git a/src/v8/test/message/let-lexical-name-in-object-prohibited.out b/src/v8/test/message/fail/let-lexical-name-in-object-prohibited.out
similarity index 100%
rename from src/v8/test/message/let-lexical-name-in-object-prohibited.out
rename to src/v8/test/message/fail/let-lexical-name-in-object-prohibited.out
diff --git a/src/v8/test/message/let-lexical-name-prohibited.js b/src/v8/test/message/fail/let-lexical-name-prohibited.js
similarity index 100%
rename from src/v8/test/message/let-lexical-name-prohibited.js
rename to src/v8/test/message/fail/let-lexical-name-prohibited.js
diff --git a/src/v8/test/message/let-lexical-name-prohibited.out b/src/v8/test/message/fail/let-lexical-name-prohibited.out
similarity index 100%
rename from src/v8/test/message/let-lexical-name-prohibited.out
rename to src/v8/test/message/fail/let-lexical-name-prohibited.out
diff --git a/src/v8/test/message/modules-cycle1.js b/src/v8/test/message/fail/modules-cycle1.js
similarity index 100%
rename from src/v8/test/message/modules-cycle1.js
rename to src/v8/test/message/fail/modules-cycle1.js
diff --git a/src/v8/test/message/fail/modules-cycle1.out b/src/v8/test/message/fail/modules-cycle1.out
new file mode 100644
index 0000000..ef6b57f
--- /dev/null
+++ b/src/v8/test/message/fail/modules-cycle1.out
@@ -0,0 +1,5 @@
+*%(basename)s:7: SyntaxError: Detected cycle while resolving name 'a' in 'modules-cycle1.js'
+import {a} from "modules-cycle1.js";
+        ^
+SyntaxError: Detected cycle while resolving name 'a' in 'modules-cycle1.js'
+
diff --git a/src/v8/test/message/modules-cycle2.js b/src/v8/test/message/fail/modules-cycle2.js
similarity index 100%
rename from src/v8/test/message/modules-cycle2.js
rename to src/v8/test/message/fail/modules-cycle2.js
diff --git a/src/v8/test/message/fail/modules-cycle2.out b/src/v8/test/message/fail/modules-cycle2.out
new file mode 100644
index 0000000..c0d785f
--- /dev/null
+++ b/src/v8/test/message/fail/modules-cycle2.out
@@ -0,0 +1,5 @@
+*%(basename)s:7: SyntaxError: Detected cycle while resolving name 'a' in 'modules-skip-cycle2.js'
+import {a} from "modules-skip-cycle2.js";
+        ^
+SyntaxError: Detected cycle while resolving name 'a' in 'modules-skip-cycle2.js'
+
diff --git a/src/v8/test/message/modules-cycle3.js b/src/v8/test/message/fail/modules-cycle3.js
similarity index 100%
rename from src/v8/test/message/modules-cycle3.js
rename to src/v8/test/message/fail/modules-cycle3.js
diff --git a/src/v8/test/message/fail/modules-cycle3.out b/src/v8/test/message/fail/modules-cycle3.out
new file mode 100644
index 0000000..51bf907
--- /dev/null
+++ b/src/v8/test/message/fail/modules-cycle3.out
@@ -0,0 +1,5 @@
+*%(basename)s:7: SyntaxError: Detected cycle while resolving name 'a' in 'modules-skip-cycle3.js'
+export {a as x} from "modules-skip-cycle3.js";
+        ^^^^^^
+SyntaxError: Detected cycle while resolving name 'a' in 'modules-skip-cycle3.js'
+
diff --git a/src/v8/test/message/modules-cycle4.js b/src/v8/test/message/fail/modules-cycle4.js
similarity index 100%
rename from src/v8/test/message/modules-cycle4.js
rename to src/v8/test/message/fail/modules-cycle4.js
diff --git a/src/v8/test/message/fail/modules-cycle4.out b/src/v8/test/message/fail/modules-cycle4.out
new file mode 100644
index 0000000..6e27ced
--- /dev/null
+++ b/src/v8/test/message/fail/modules-cycle4.out
@@ -0,0 +1,5 @@
+*modules-cycle3.js:7: SyntaxError: Detected cycle while resolving name 'a' in 'modules-skip-cycle3.js'
+export {a as x} from "modules-skip-cycle3.js";
+        ^^^^^^
+SyntaxError: Detected cycle while resolving name 'a' in 'modules-skip-cycle3.js'
+
diff --git a/src/v8/test/message/modules-cycle5.js b/src/v8/test/message/fail/modules-cycle5.js
similarity index 100%
rename from src/v8/test/message/modules-cycle5.js
rename to src/v8/test/message/fail/modules-cycle5.js
diff --git a/src/v8/test/message/fail/modules-cycle5.out b/src/v8/test/message/fail/modules-cycle5.out
new file mode 100644
index 0000000..c97cc8d
--- /dev/null
+++ b/src/v8/test/message/fail/modules-cycle5.out
@@ -0,0 +1,5 @@
+*%(basename)s:8: SyntaxError: Detected cycle while resolving name 'foo' in 'modules-cycle5.js'
+export {foo} from "modules-cycle5.js";
+        ^^^
+SyntaxError: Detected cycle while resolving name 'foo' in 'modules-cycle5.js'
+
diff --git a/src/v8/test/message/modules-cycle6.js b/src/v8/test/message/fail/modules-cycle6.js
similarity index 100%
rename from src/v8/test/message/modules-cycle6.js
rename to src/v8/test/message/fail/modules-cycle6.js
diff --git a/src/v8/test/message/fail/modules-cycle6.out b/src/v8/test/message/fail/modules-cycle6.out
new file mode 100644
index 0000000..ed0e409
--- /dev/null
+++ b/src/v8/test/message/fail/modules-cycle6.out
@@ -0,0 +1,5 @@
+*modules-skip-cycle6.js:5: SyntaxError: The requested module 'modules-cycle6.js' does not provide an export named 'foo'
+export {foo} from "modules-cycle6.js";
+        ^^^
+SyntaxError: The requested module 'modules-cycle6.js' does not provide an export named 'foo'
+
diff --git a/src/v8/test/message/modules-duplicate-export1.js b/src/v8/test/message/fail/modules-duplicate-export1.js
similarity index 100%
rename from src/v8/test/message/modules-duplicate-export1.js
rename to src/v8/test/message/fail/modules-duplicate-export1.js
diff --git a/src/v8/test/message/modules-duplicate-export1.out b/src/v8/test/message/fail/modules-duplicate-export1.out
similarity index 100%
rename from src/v8/test/message/modules-duplicate-export1.out
rename to src/v8/test/message/fail/modules-duplicate-export1.out
diff --git a/src/v8/test/message/modules-duplicate-export2.js b/src/v8/test/message/fail/modules-duplicate-export2.js
similarity index 100%
rename from src/v8/test/message/modules-duplicate-export2.js
rename to src/v8/test/message/fail/modules-duplicate-export2.js
diff --git a/src/v8/test/message/modules-duplicate-export2.out b/src/v8/test/message/fail/modules-duplicate-export2.out
similarity index 100%
rename from src/v8/test/message/modules-duplicate-export2.out
rename to src/v8/test/message/fail/modules-duplicate-export2.out
diff --git a/src/v8/test/message/modules-duplicate-export3.js b/src/v8/test/message/fail/modules-duplicate-export3.js
similarity index 100%
rename from src/v8/test/message/modules-duplicate-export3.js
rename to src/v8/test/message/fail/modules-duplicate-export3.js
diff --git a/src/v8/test/message/modules-duplicate-export3.out b/src/v8/test/message/fail/modules-duplicate-export3.out
similarity index 100%
rename from src/v8/test/message/modules-duplicate-export3.out
rename to src/v8/test/message/fail/modules-duplicate-export3.out
diff --git a/src/v8/test/message/modules-duplicate-export4.js b/src/v8/test/message/fail/modules-duplicate-export4.js
similarity index 100%
rename from src/v8/test/message/modules-duplicate-export4.js
rename to src/v8/test/message/fail/modules-duplicate-export4.js
diff --git a/src/v8/test/message/modules-duplicate-export4.out b/src/v8/test/message/fail/modules-duplicate-export4.out
similarity index 100%
rename from src/v8/test/message/modules-duplicate-export4.out
rename to src/v8/test/message/fail/modules-duplicate-export4.out
diff --git a/src/v8/test/message/modules-import-redeclare1.js b/src/v8/test/message/fail/modules-import-redeclare1.js
similarity index 100%
rename from src/v8/test/message/modules-import-redeclare1.js
rename to src/v8/test/message/fail/modules-import-redeclare1.js
diff --git a/src/v8/test/message/modules-import-redeclare1.out b/src/v8/test/message/fail/modules-import-redeclare1.out
similarity index 100%
rename from src/v8/test/message/modules-import-redeclare1.out
rename to src/v8/test/message/fail/modules-import-redeclare1.out
diff --git a/src/v8/test/message/modules-import-redeclare2.js b/src/v8/test/message/fail/modules-import-redeclare2.js
similarity index 100%
rename from src/v8/test/message/modules-import-redeclare2.js
rename to src/v8/test/message/fail/modules-import-redeclare2.js
diff --git a/src/v8/test/message/modules-import-redeclare2.out b/src/v8/test/message/fail/modules-import-redeclare2.out
similarity index 100%
rename from src/v8/test/message/modules-import-redeclare2.out
rename to src/v8/test/message/fail/modules-import-redeclare2.out
diff --git a/src/v8/test/message/modules-import-redeclare3.js b/src/v8/test/message/fail/modules-import-redeclare3.js
similarity index 100%
rename from src/v8/test/message/modules-import-redeclare3.js
rename to src/v8/test/message/fail/modules-import-redeclare3.js
diff --git a/src/v8/test/message/modules-import-redeclare3.out b/src/v8/test/message/fail/modules-import-redeclare3.out
similarity index 100%
rename from src/v8/test/message/modules-import-redeclare3.out
rename to src/v8/test/message/fail/modules-import-redeclare3.out
diff --git a/src/v8/test/message/modules-import1.js b/src/v8/test/message/fail/modules-import1.js
similarity index 100%
rename from src/v8/test/message/modules-import1.js
rename to src/v8/test/message/fail/modules-import1.js
diff --git a/src/v8/test/message/fail/modules-import1.out b/src/v8/test/message/fail/modules-import1.out
new file mode 100644
index 0000000..ce02369
--- /dev/null
+++ b/src/v8/test/message/fail/modules-import1.out
@@ -0,0 +1,5 @@
+*%(basename)s:7: SyntaxError: The requested module 'modules-import1.js' does not provide an export named 'a'
+import {a} from "modules-import1.js";
+        ^
+SyntaxError: The requested module 'modules-import1.js' does not provide an export named 'a'
+
diff --git a/src/v8/test/message/modules-import2.js b/src/v8/test/message/fail/modules-import2.js
similarity index 100%
rename from src/v8/test/message/modules-import2.js
rename to src/v8/test/message/fail/modules-import2.js
diff --git a/src/v8/test/message/fail/modules-import2.out b/src/v8/test/message/fail/modules-import2.out
new file mode 100644
index 0000000..4854197
--- /dev/null
+++ b/src/v8/test/message/fail/modules-import2.out
@@ -0,0 +1,5 @@
+*%(basename)s:7: SyntaxError: The requested module 'modules-import2.js' does not provide an export named 'a'
+import {a as b} from "modules-import2.js";
+        ^
+SyntaxError: The requested module 'modules-import2.js' does not provide an export named 'a'
+
diff --git a/src/v8/test/message/modules-import3.js b/src/v8/test/message/fail/modules-import3.js
similarity index 100%
rename from src/v8/test/message/modules-import3.js
rename to src/v8/test/message/fail/modules-import3.js
diff --git a/src/v8/test/message/fail/modules-import3.out b/src/v8/test/message/fail/modules-import3.out
new file mode 100644
index 0000000..fd6904d
--- /dev/null
+++ b/src/v8/test/message/fail/modules-import3.out
@@ -0,0 +1,5 @@
+*%(basename)s:7: SyntaxError: The requested module 'modules-import3.js' does not provide an export named 'default'
+import foo from "modules-import3.js";
+       ^^^
+SyntaxError: The requested module 'modules-import3.js' does not provide an export named 'default'
+
diff --git a/src/v8/test/message/modules-import4.js b/src/v8/test/message/fail/modules-import4.js
similarity index 100%
rename from src/v8/test/message/modules-import4.js
rename to src/v8/test/message/fail/modules-import4.js
diff --git a/src/v8/test/message/fail/modules-import4.out b/src/v8/test/message/fail/modules-import4.out
new file mode 100644
index 0000000..8193d9e
--- /dev/null
+++ b/src/v8/test/message/fail/modules-import4.out
@@ -0,0 +1,5 @@
+*%(basename)s:8: SyntaxError: The requested module 'modules-import4.js' does not provide an export named 'c'
+export {c as a} from "modules-import4.js";
+        ^^^^^^
+SyntaxError: The requested module 'modules-import4.js' does not provide an export named 'c'
+
diff --git a/src/v8/test/message/modules-import5.js b/src/v8/test/message/fail/modules-import5.js
similarity index 100%
rename from src/v8/test/message/modules-import5.js
rename to src/v8/test/message/fail/modules-import5.js
diff --git a/src/v8/test/message/fail/modules-import5.out b/src/v8/test/message/fail/modules-import5.out
new file mode 100644
index 0000000..3efb692
--- /dev/null
+++ b/src/v8/test/message/fail/modules-import5.out
@@ -0,0 +1,5 @@
+*%(basename)s:8: SyntaxError: The requested module 'modules-import5.js' does not provide an export named 'c'
+export {c as a} from "modules-import5.js";
+        ^^^^^^
+SyntaxError: The requested module 'modules-import5.js' does not provide an export named 'c'
+
diff --git a/src/v8/test/message/modules-import6.js b/src/v8/test/message/fail/modules-import6.js
similarity index 100%
rename from src/v8/test/message/modules-import6.js
rename to src/v8/test/message/fail/modules-import6.js
diff --git a/src/v8/test/message/fail/modules-import6.out b/src/v8/test/message/fail/modules-import6.out
new file mode 100644
index 0000000..43e8113
--- /dev/null
+++ b/src/v8/test/message/fail/modules-import6.out
@@ -0,0 +1,5 @@
+*%(basename)s:9: SyntaxError: The requested module 'modules-import6.js' does not provide an export named 'c'
+import {c} from "modules-import6.js";
+        ^
+SyntaxError: The requested module 'modules-import6.js' does not provide an export named 'c'
+
diff --git a/src/v8/test/message/modules-skip-cycle2.js b/src/v8/test/message/fail/modules-skip-cycle2.js
similarity index 100%
rename from src/v8/test/message/modules-skip-cycle2.js
rename to src/v8/test/message/fail/modules-skip-cycle2.js
diff --git a/src/v8/test/message/modules-skip-cycle3.js b/src/v8/test/message/fail/modules-skip-cycle3.js
similarity index 100%
rename from src/v8/test/message/modules-skip-cycle3.js
rename to src/v8/test/message/fail/modules-skip-cycle3.js
diff --git a/src/v8/test/message/modules-skip-cycle5.js b/src/v8/test/message/fail/modules-skip-cycle5.js
similarity index 100%
rename from src/v8/test/message/modules-skip-cycle5.js
rename to src/v8/test/message/fail/modules-skip-cycle5.js
diff --git a/src/v8/test/message/modules-skip-cycle6.js b/src/v8/test/message/fail/modules-skip-cycle6.js
similarity index 100%
rename from src/v8/test/message/modules-skip-cycle6.js
rename to src/v8/test/message/fail/modules-skip-cycle6.js
diff --git a/src/v8/test/message/modules-star-conflict1.js b/src/v8/test/message/fail/modules-star-conflict1.js
similarity index 77%
rename from src/v8/test/message/modules-star-conflict1.js
rename to src/v8/test/message/fail/modules-star-conflict1.js
index 1bf3473..4281f7c 100644
--- a/src/v8/test/message/modules-star-conflict1.js
+++ b/src/v8/test/message/fail/modules-star-conflict1.js
@@ -4,4 +4,4 @@
 //
 // MODULE
 
-import {a} from "../mjsunit/modules-skip-7.js";
+import {a} from "../../mjsunit/modules-skip-7.js";
diff --git a/src/v8/test/message/fail/modules-star-conflict1.out b/src/v8/test/message/fail/modules-star-conflict1.out
new file mode 100644
index 0000000..db86711
--- /dev/null
+++ b/src/v8/test/message/fail/modules-star-conflict1.out
@@ -0,0 +1,5 @@
+*%(basename)s:7: SyntaxError: The requested module '../../mjsunit/modules-skip-7.js' contains conflicting star exports for name 'a'
+import {a} from "../../mjsunit/modules-skip-7.js";
+        ^
+SyntaxError: The requested module '../../mjsunit/modules-skip-7.js' contains conflicting star exports for name 'a'
+
diff --git a/src/v8/test/message/modules-star-conflict2.js b/src/v8/test/message/fail/modules-star-conflict2.js
similarity index 65%
rename from src/v8/test/message/modules-star-conflict2.js
rename to src/v8/test/message/fail/modules-star-conflict2.js
index 84d23d8..6235851 100644
--- a/src/v8/test/message/modules-star-conflict2.js
+++ b/src/v8/test/message/fail/modules-star-conflict2.js
@@ -4,7 +4,7 @@
 //
 // MODULE
 
-export * from "../mjsunit/modules-skip-star-exports-conflict.js";
-export * from "../mjsunit/modules-skip-6.js";
+export * from "../../mjsunit/modules-skip-star-exports-conflict.js";
+export * from "../../mjsunit/modules-skip-6.js";
 
 import {a} from "modules-star-conflict2.js";
diff --git a/src/v8/test/message/fail/modules-star-conflict2.out b/src/v8/test/message/fail/modules-star-conflict2.out
new file mode 100644
index 0000000..d6decf7
--- /dev/null
+++ b/src/v8/test/message/fail/modules-star-conflict2.out
@@ -0,0 +1,5 @@
+*%(basename)s:7: SyntaxError: The requested module '../../mjsunit/modules-skip-star-exports-conflict.js' contains conflicting star exports for name 'a'
+export * from "../../mjsunit/modules-skip-star-exports-conflict.js";
+       ^
+SyntaxError: The requested module '../../mjsunit/modules-skip-star-exports-conflict.js' contains conflicting star exports for name 'a'
+
diff --git a/src/v8/test/message/modules-star-default.js b/src/v8/test/message/fail/modules-star-default.js
similarity index 100%
rename from src/v8/test/message/modules-star-default.js
rename to src/v8/test/message/fail/modules-star-default.js
diff --git a/src/v8/test/message/fail/modules-star-default.out b/src/v8/test/message/fail/modules-star-default.out
new file mode 100644
index 0000000..1524a7c
--- /dev/null
+++ b/src/v8/test/message/fail/modules-star-default.out
@@ -0,0 +1,5 @@
+*modules-import4.js:8: SyntaxError: The requested module 'modules-import4.js' does not provide an export named 'c'
+export {c as a} from "modules-import4.js";
+        ^^^^^^
+SyntaxError: The requested module 'modules-import4.js' does not provide an export named 'c'
+
diff --git a/src/v8/test/message/modules-undefined-export1.js b/src/v8/test/message/fail/modules-undefined-export1.js
similarity index 100%
rename from src/v8/test/message/modules-undefined-export1.js
rename to src/v8/test/message/fail/modules-undefined-export1.js
diff --git a/src/v8/test/message/modules-undefined-export1.out b/src/v8/test/message/fail/modules-undefined-export1.out
similarity index 100%
rename from src/v8/test/message/modules-undefined-export1.out
rename to src/v8/test/message/fail/modules-undefined-export1.out
diff --git a/src/v8/test/message/modules-undefined-export2.js b/src/v8/test/message/fail/modules-undefined-export2.js
similarity index 100%
rename from src/v8/test/message/modules-undefined-export2.js
rename to src/v8/test/message/fail/modules-undefined-export2.js
diff --git a/src/v8/test/message/modules-undefined-export2.out b/src/v8/test/message/fail/modules-undefined-export2.out
similarity index 100%
rename from src/v8/test/message/modules-undefined-export2.out
rename to src/v8/test/message/fail/modules-undefined-export2.out
diff --git a/src/v8/test/message/new-target-assignment.js b/src/v8/test/message/fail/new-target-assignment.js
similarity index 100%
rename from src/v8/test/message/new-target-assignment.js
rename to src/v8/test/message/fail/new-target-assignment.js
diff --git a/src/v8/test/message/new-target-assignment.out b/src/v8/test/message/fail/new-target-assignment.out
similarity index 100%
rename from src/v8/test/message/new-target-assignment.out
rename to src/v8/test/message/fail/new-target-assignment.out
diff --git a/src/v8/test/message/new-target-escaped.js b/src/v8/test/message/fail/new-target-escaped.js
similarity index 100%
rename from src/v8/test/message/new-target-escaped.js
rename to src/v8/test/message/fail/new-target-escaped.js
diff --git a/src/v8/test/message/new-target-escaped.out b/src/v8/test/message/fail/new-target-escaped.out
similarity index 100%
rename from src/v8/test/message/new-target-escaped.out
rename to src/v8/test/message/fail/new-target-escaped.out
diff --git a/src/v8/test/message/new-target-for-loop.js b/src/v8/test/message/fail/new-target-for-loop.js
similarity index 100%
rename from src/v8/test/message/new-target-for-loop.js
rename to src/v8/test/message/fail/new-target-for-loop.js
diff --git a/src/v8/test/message/new-target-for-loop.out b/src/v8/test/message/fail/new-target-for-loop.out
similarity index 100%
rename from src/v8/test/message/new-target-for-loop.out
rename to src/v8/test/message/fail/new-target-for-loop.out
diff --git a/src/v8/test/message/new-target-postfix-op.js b/src/v8/test/message/fail/new-target-postfix-op.js
similarity index 100%
rename from src/v8/test/message/new-target-postfix-op.js
rename to src/v8/test/message/fail/new-target-postfix-op.js
diff --git a/src/v8/test/message/new-target-postfix-op.out b/src/v8/test/message/fail/new-target-postfix-op.out
similarity index 100%
rename from src/v8/test/message/new-target-postfix-op.out
rename to src/v8/test/message/fail/new-target-postfix-op.out
diff --git a/src/v8/test/message/new-target-prefix-op.js b/src/v8/test/message/fail/new-target-prefix-op.js
similarity index 100%
rename from src/v8/test/message/new-target-prefix-op.js
rename to src/v8/test/message/fail/new-target-prefix-op.js
diff --git a/src/v8/test/message/new-target-prefix-op.out b/src/v8/test/message/fail/new-target-prefix-op.out
similarity index 100%
rename from src/v8/test/message/new-target-prefix-op.out
rename to src/v8/test/message/fail/new-target-prefix-op.out
diff --git a/src/v8/test/message/nf-yield-in-generator.js b/src/v8/test/message/fail/nf-yield-in-generator.js
similarity index 100%
rename from src/v8/test/message/nf-yield-in-generator.js
rename to src/v8/test/message/fail/nf-yield-in-generator.js
diff --git a/src/v8/test/message/nf-yield-in-generator.out b/src/v8/test/message/fail/nf-yield-in-generator.out
similarity index 100%
rename from src/v8/test/message/nf-yield-in-generator.out
rename to src/v8/test/message/fail/nf-yield-in-generator.out
diff --git a/src/v8/test/message/nf-yield-strict-in-generator.js b/src/v8/test/message/fail/nf-yield-strict-in-generator.js
similarity index 100%
rename from src/v8/test/message/nf-yield-strict-in-generator.js
rename to src/v8/test/message/fail/nf-yield-strict-in-generator.js
diff --git a/src/v8/test/message/nf-yield-strict-in-generator.out b/src/v8/test/message/fail/nf-yield-strict-in-generator.out
similarity index 100%
rename from src/v8/test/message/nf-yield-strict-in-generator.out
rename to src/v8/test/message/fail/nf-yield-strict-in-generator.out
diff --git a/src/v8/test/message/nf-yield-strict.js b/src/v8/test/message/fail/nf-yield-strict.js
similarity index 100%
rename from src/v8/test/message/nf-yield-strict.js
rename to src/v8/test/message/fail/nf-yield-strict.js
diff --git a/src/v8/test/message/nf-yield-strict.out b/src/v8/test/message/fail/nf-yield-strict.out
similarity index 100%
rename from src/v8/test/message/nf-yield-strict.out
rename to src/v8/test/message/fail/nf-yield-strict.out
diff --git a/src/v8/test/message/nfe-yield-generator.js b/src/v8/test/message/fail/nfe-yield-generator.js
similarity index 100%
rename from src/v8/test/message/nfe-yield-generator.js
rename to src/v8/test/message/fail/nfe-yield-generator.js
diff --git a/src/v8/test/message/nfe-yield-generator.out b/src/v8/test/message/fail/nfe-yield-generator.out
similarity index 100%
rename from src/v8/test/message/nfe-yield-generator.out
rename to src/v8/test/message/fail/nfe-yield-generator.out
diff --git a/src/v8/test/message/nfe-yield-strict.js b/src/v8/test/message/fail/nfe-yield-strict.js
similarity index 100%
rename from src/v8/test/message/nfe-yield-strict.js
rename to src/v8/test/message/fail/nfe-yield-strict.js
diff --git a/src/v8/test/message/nfe-yield-strict.out b/src/v8/test/message/fail/nfe-yield-strict.out
similarity index 100%
rename from src/v8/test/message/nfe-yield-strict.out
rename to src/v8/test/message/fail/nfe-yield-strict.out
diff --git a/src/v8/test/message/non-alphanum.js b/src/v8/test/message/fail/non-alphanum.js
similarity index 100%
rename from src/v8/test/message/non-alphanum.js
rename to src/v8/test/message/fail/non-alphanum.js
diff --git a/src/v8/test/message/non-alphanum.out b/src/v8/test/message/fail/non-alphanum.out
similarity index 97%
rename from src/v8/test/message/non-alphanum.out
rename to src/v8/test/message/fail/non-alphanum.out
index dc15a61..34464ef 100644
--- a/src/v8/test/message/non-alphanum.out
+++ b/src/v8/test/message/fail/non-alphanum.out
@@ -1,6 +1,6 @@
-*%(basename)s:34: TypeError: Array.prototype.sort called on null or undefined
+*%(basename)s:34: TypeError: Cannot convert undefined or null to object
 ([][(![]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]+(!![]+[])[+[]]][([][(![]+[])[+[]]+(![]+[]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[!+[]+!+[]]]()[(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]+(!![]+[])[+[]]])([][(![]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]+(!![]+[])[+[]]][([][(![]+[])[+[]]+(![]+[]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[!+[]+!+[]]]()[([][(![]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]+(!![]+[])[+[]]][([][(![]+[])[+[]]+(![]+[]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[!+[]+!+[]]]()+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(![]+[])[+!+[]]]((![]+[])[+!+[]])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+[]]+(+[![]]+[][(![]+[])[+[]]+(![]+[]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+!+[]]]+[][(![]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]+(!![]+[])[+[]]][([][(![]+[])[+[]]+(![]+[]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[!+[]+!+[]]]()[(![]+[])[+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][(![]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]+(!![]+[])[+[]]][([][(![]+[])[+[]]+(![]+[]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[!+[]+!+[]]]()+[])[!+[]+!+[]]]((![]+[])[+!+[]]+(+[![]]+[])[+[]])[+[]]+(![]+[])[+!+[]]+(+[]+[][(![]+[])[+[]]+(![]+[]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[!+[]+!+[]+!+[]+[+[]]]+(!![]+[])[!+[]+!+[]+!+[]]+(+[![]]+[][(![]+[])[+[]]+(![]+[]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+!+[]]]+([][(![]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]+(!![]+[])[+[]]][([][(![]+[])[+[]]+(![]+[]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[!+[]+!+[]]]()+[])[!+[]+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+([][[]]+[])[+!+[]]+(+[![]]+[][(![]+[])[+[]]+(![]+[]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+!+[]]]+([]+([]+[])[([][(![]+[])[+[]]+(![]+[]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[!+[]+!+[]+!+[]+!+[]]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+[][(![]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]+(!![]+[])[+[]]][([][(![]+[])[+[]]+(![]+[]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[!+[]+!+[]]]()[(![]+[])[+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][(![]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]+(!![]+[])[+[]]][([][(![]+[])[+[]]+(![]+[]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[!+[]+!+[]]]()+[])[!+[]+!+[]]]((![]+[])[+!+[]]+[+[]])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+([][[]]+[])[!+[]+!+[]]+[][(![]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]+(!![]+[])[+[]]][([][(![]+[])[+[]]+(![]+[]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[!+[]+!+[]]]()[(![]+[])[+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][(![]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]+(!![]+[])[+[]]][([][(![]+[])[+[]]+(![]+[]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[!+[]+!+[]]]()+[])[!+[]+!+[]]]((+(+!+[]+(!+[]+[])[!+[]+!+[]+!+[]]+[+!+[]]+[+[]]+[+[]]+[+[]])+[])[+[]]+(![]+[])[+[]])[+[]])
                                                                                                                                                                                                                                                                                                                                                                                                                          ^
-TypeError: Array.prototype.sort called on null or undefined
+TypeError: Cannot convert undefined or null to object
     at sort (native)
     at *%(basename)s:34:410
diff --git a/src/v8/test/mjsunit/regress/wasm/regression-694433.js b/src/v8/test/message/fail/object-binding-pattern-await1.js
similarity index 62%
copy from src/v8/test/mjsunit/regress/wasm/regression-694433.js
copy to src/v8/test/message/fail/object-binding-pattern-await1.js
index a260e20..8ef7b25 100644
--- a/src/v8/test/mjsunit/regress/wasm/regression-694433.js
+++ b/src/v8/test/message/fail/object-binding-pattern-await1.js
@@ -2,5 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-var size = 0x40000000;
-assertThrows(() => WebAssembly.validate(new Uint16Array(size)), RangeError);
+async function f() {
+  let { a: await b } = { a: 1 };
+  return b;
+}
+f();
diff --git a/src/v8/test/message/fail/object-binding-pattern-await1.out b/src/v8/test/message/fail/object-binding-pattern-await1.out
new file mode 100644
index 0000000..ee7a3ea
--- /dev/null
+++ b/src/v8/test/message/fail/object-binding-pattern-await1.out
@@ -0,0 +1,4 @@
+*%(basename)s:6: SyntaxError: Invalid destructuring assignment target
+  let { a: await b } = { a: 1 };
+           ^^^^^^^
+SyntaxError: Invalid destructuring assignment target
diff --git a/src/v8/test/message/object-rest-assignment-pattern.js b/src/v8/test/message/fail/object-rest-assignment-pattern.js
similarity index 100%
rename from src/v8/test/message/object-rest-assignment-pattern.js
rename to src/v8/test/message/fail/object-rest-assignment-pattern.js
diff --git a/src/v8/test/message/object-rest-assignment-pattern.out b/src/v8/test/message/fail/object-rest-assignment-pattern.out
similarity index 100%
rename from src/v8/test/message/object-rest-assignment-pattern.out
rename to src/v8/test/message/fail/object-rest-assignment-pattern.out
diff --git a/src/v8/test/message/object-rest-binding-pattern.js b/src/v8/test/message/fail/object-rest-binding-pattern.js
similarity index 100%
rename from src/v8/test/message/object-rest-binding-pattern.js
rename to src/v8/test/message/fail/object-rest-binding-pattern.js
diff --git a/src/v8/test/message/object-rest-binding-pattern.out b/src/v8/test/message/fail/object-rest-binding-pattern.out
similarity index 100%
rename from src/v8/test/message/object-rest-binding-pattern.out
rename to src/v8/test/message/fail/object-rest-binding-pattern.out
diff --git a/src/v8/test/message/overwritten-builtins.js b/src/v8/test/message/fail/overwritten-builtins.js
similarity index 100%
rename from src/v8/test/message/overwritten-builtins.js
rename to src/v8/test/message/fail/overwritten-builtins.js
diff --git a/src/v8/test/message/overwritten-builtins.out b/src/v8/test/message/fail/overwritten-builtins.out
similarity index 100%
rename from src/v8/test/message/overwritten-builtins.out
rename to src/v8/test/message/fail/overwritten-builtins.out
diff --git a/src/v8/test/message/paren_in_arg_string.js b/src/v8/test/message/fail/paren_in_arg_string.js
similarity index 100%
rename from src/v8/test/message/paren_in_arg_string.js
rename to src/v8/test/message/fail/paren_in_arg_string.js
diff --git a/src/v8/test/message/paren_in_arg_string.out b/src/v8/test/message/fail/paren_in_arg_string.out
similarity index 100%
rename from src/v8/test/message/paren_in_arg_string.out
rename to src/v8/test/message/fail/paren_in_arg_string.out
diff --git a/src/v8/test/message/redeclaration1.js b/src/v8/test/message/fail/redeclaration1.js
similarity index 100%
rename from src/v8/test/message/redeclaration1.js
rename to src/v8/test/message/fail/redeclaration1.js
diff --git a/src/v8/test/message/redeclaration1.out b/src/v8/test/message/fail/redeclaration1.out
similarity index 100%
rename from src/v8/test/message/redeclaration1.out
rename to src/v8/test/message/fail/redeclaration1.out
diff --git a/src/v8/test/message/redeclaration2.js b/src/v8/test/message/fail/redeclaration2.js
similarity index 100%
rename from src/v8/test/message/redeclaration2.js
rename to src/v8/test/message/fail/redeclaration2.js
diff --git a/src/v8/test/message/redeclaration2.out b/src/v8/test/message/fail/redeclaration2.out
similarity index 100%
rename from src/v8/test/message/redeclaration2.out
rename to src/v8/test/message/fail/redeclaration2.out
diff --git a/src/v8/test/message/redeclaration3.js b/src/v8/test/message/fail/redeclaration3.js
similarity index 100%
rename from src/v8/test/message/redeclaration3.js
rename to src/v8/test/message/fail/redeclaration3.js
diff --git a/src/v8/test/message/redeclaration3.out b/src/v8/test/message/fail/redeclaration3.out
similarity index 100%
rename from src/v8/test/message/redeclaration3.out
rename to src/v8/test/message/fail/redeclaration3.out
diff --git a/src/v8/test/message/replacement-marker-as-argument.js b/src/v8/test/message/fail/replacement-marker-as-argument.js
similarity index 100%
rename from src/v8/test/message/replacement-marker-as-argument.js
rename to src/v8/test/message/fail/replacement-marker-as-argument.js
diff --git a/src/v8/test/message/replacement-marker-as-argument.out b/src/v8/test/message/fail/replacement-marker-as-argument.out
similarity index 100%
rename from src/v8/test/message/replacement-marker-as-argument.out
rename to src/v8/test/message/fail/replacement-marker-as-argument.out
diff --git a/src/v8/test/message/rest-param-class-setter-strict.js b/src/v8/test/message/fail/rest-param-class-setter-strict.js
similarity index 100%
rename from src/v8/test/message/rest-param-class-setter-strict.js
rename to src/v8/test/message/fail/rest-param-class-setter-strict.js
diff --git a/src/v8/test/message/rest-param-class-setter-strict.out b/src/v8/test/message/fail/rest-param-class-setter-strict.out
similarity index 100%
rename from src/v8/test/message/rest-param-class-setter-strict.out
rename to src/v8/test/message/fail/rest-param-class-setter-strict.out
diff --git a/src/v8/test/message/rest-param-object-setter-sloppy.js b/src/v8/test/message/fail/rest-param-object-setter-sloppy.js
similarity index 100%
rename from src/v8/test/message/rest-param-object-setter-sloppy.js
rename to src/v8/test/message/fail/rest-param-object-setter-sloppy.js
diff --git a/src/v8/test/message/rest-param-object-setter-sloppy.out b/src/v8/test/message/fail/rest-param-object-setter-sloppy.out
similarity index 100%
rename from src/v8/test/message/rest-param-object-setter-sloppy.out
rename to src/v8/test/message/fail/rest-param-object-setter-sloppy.out
diff --git a/src/v8/test/message/rest-param-object-setter-strict.js b/src/v8/test/message/fail/rest-param-object-setter-strict.js
similarity index 100%
rename from src/v8/test/message/rest-param-object-setter-strict.js
rename to src/v8/test/message/fail/rest-param-object-setter-strict.js
diff --git a/src/v8/test/message/rest-param-object-setter-strict.out b/src/v8/test/message/fail/rest-param-object-setter-strict.out
similarity index 100%
rename from src/v8/test/message/rest-param-object-setter-strict.out
rename to src/v8/test/message/fail/rest-param-object-setter-strict.out
diff --git a/src/v8/test/message/settimeout.js b/src/v8/test/message/fail/settimeout.js
similarity index 100%
rename from src/v8/test/message/settimeout.js
rename to src/v8/test/message/fail/settimeout.js
diff --git a/src/v8/test/message/settimeout.out b/src/v8/test/message/fail/settimeout.out
similarity index 100%
rename from src/v8/test/message/settimeout.out
rename to src/v8/test/message/fail/settimeout.out
diff --git a/src/v8/test/message/simple-throw.js b/src/v8/test/message/fail/simple-throw.js
similarity index 100%
rename from src/v8/test/message/simple-throw.js
rename to src/v8/test/message/fail/simple-throw.js
diff --git a/src/v8/test/message/simple-throw.out b/src/v8/test/message/fail/simple-throw.out
similarity index 100%
rename from src/v8/test/message/simple-throw.out
rename to src/v8/test/message/fail/simple-throw.out
diff --git a/src/v8/test/message/strict-formal-parameters.js b/src/v8/test/message/fail/strict-formal-parameters.js
similarity index 100%
rename from src/v8/test/message/strict-formal-parameters.js
rename to src/v8/test/message/fail/strict-formal-parameters.js
diff --git a/src/v8/test/message/strict-formal-parameters.out b/src/v8/test/message/fail/strict-formal-parameters.out
similarity index 100%
rename from src/v8/test/message/strict-formal-parameters.out
rename to src/v8/test/message/fail/strict-formal-parameters.out
diff --git a/src/v8/test/message/strict-octal-number.js b/src/v8/test/message/fail/strict-octal-number.js
similarity index 100%
rename from src/v8/test/message/strict-octal-number.js
rename to src/v8/test/message/fail/strict-octal-number.js
diff --git a/src/v8/test/message/strict-octal-number.out b/src/v8/test/message/fail/strict-octal-number.out
similarity index 100%
rename from src/v8/test/message/strict-octal-number.out
rename to src/v8/test/message/fail/strict-octal-number.out
diff --git a/src/v8/test/message/strict-octal-string.js b/src/v8/test/message/fail/strict-octal-string.js
similarity index 100%
rename from src/v8/test/message/strict-octal-string.js
rename to src/v8/test/message/fail/strict-octal-string.js
diff --git a/src/v8/test/message/strict-octal-string.out b/src/v8/test/message/fail/strict-octal-string.out
similarity index 100%
rename from src/v8/test/message/strict-octal-string.out
rename to src/v8/test/message/fail/strict-octal-string.out
diff --git a/src/v8/test/message/strict-octal-use-strict-after.js b/src/v8/test/message/fail/strict-octal-use-strict-after.js
similarity index 100%
rename from src/v8/test/message/strict-octal-use-strict-after.js
rename to src/v8/test/message/fail/strict-octal-use-strict-after.js
diff --git a/src/v8/test/message/strict-octal-use-strict-after.out b/src/v8/test/message/fail/strict-octal-use-strict-after.out
similarity index 100%
rename from src/v8/test/message/strict-octal-use-strict-after.out
rename to src/v8/test/message/fail/strict-octal-use-strict-after.out
diff --git a/src/v8/test/message/strict-octal-use-strict-before.js b/src/v8/test/message/fail/strict-octal-use-strict-before.js
similarity index 100%
rename from src/v8/test/message/strict-octal-use-strict-before.js
rename to src/v8/test/message/fail/strict-octal-use-strict-before.js
diff --git a/src/v8/test/message/strict-octal-use-strict-before.out b/src/v8/test/message/fail/strict-octal-use-strict-before.out
similarity index 100%
rename from src/v8/test/message/strict-octal-use-strict-before.out
rename to src/v8/test/message/fail/strict-octal-use-strict-before.out
diff --git a/src/v8/test/message/strict-with.js b/src/v8/test/message/fail/strict-with.js
similarity index 100%
rename from src/v8/test/message/strict-with.js
rename to src/v8/test/message/fail/strict-with.js
diff --git a/src/v8/test/message/strict-with.out b/src/v8/test/message/fail/strict-with.out
similarity index 100%
rename from src/v8/test/message/strict-with.out
rename to src/v8/test/message/fail/strict-with.out
diff --git a/src/v8/test/message/super-constructor-extra-statement.js b/src/v8/test/message/fail/super-constructor-extra-statement.js
similarity index 100%
rename from src/v8/test/message/super-constructor-extra-statement.js
rename to src/v8/test/message/fail/super-constructor-extra-statement.js
diff --git a/src/v8/test/message/super-constructor-extra-statement.out b/src/v8/test/message/fail/super-constructor-extra-statement.out
similarity index 100%
rename from src/v8/test/message/super-constructor-extra-statement.out
rename to src/v8/test/message/fail/super-constructor-extra-statement.out
diff --git a/src/v8/test/message/super-constructor.js b/src/v8/test/message/fail/super-constructor.js
similarity index 100%
rename from src/v8/test/message/super-constructor.js
rename to src/v8/test/message/fail/super-constructor.js
diff --git a/src/v8/test/message/super-constructor.out b/src/v8/test/message/fail/super-constructor.out
similarity index 100%
rename from src/v8/test/message/super-constructor.out
rename to src/v8/test/message/fail/super-constructor.out
diff --git a/src/v8/test/message/super-in-function.js b/src/v8/test/message/fail/super-in-function.js
similarity index 100%
rename from src/v8/test/message/super-in-function.js
rename to src/v8/test/message/fail/super-in-function.js
diff --git a/src/v8/test/message/super-in-function.out b/src/v8/test/message/fail/super-in-function.out
similarity index 100%
rename from src/v8/test/message/super-in-function.out
rename to src/v8/test/message/fail/super-in-function.out
diff --git a/src/v8/test/message/tonumber-symbol.js b/src/v8/test/message/fail/tonumber-symbol.js
similarity index 100%
rename from src/v8/test/message/tonumber-symbol.js
rename to src/v8/test/message/fail/tonumber-symbol.js
diff --git a/src/v8/test/message/tonumber-symbol.out b/src/v8/test/message/fail/tonumber-symbol.out
similarity index 100%
rename from src/v8/test/message/tonumber-symbol.out
rename to src/v8/test/message/fail/tonumber-symbol.out
diff --git a/src/v8/test/message/try-catch-finally-throw-in-catch-and-finally.js b/src/v8/test/message/fail/try-catch-finally-throw-in-catch-and-finally.js
similarity index 100%
rename from src/v8/test/message/try-catch-finally-throw-in-catch-and-finally.js
rename to src/v8/test/message/fail/try-catch-finally-throw-in-catch-and-finally.js
diff --git a/src/v8/test/message/try-catch-finally-throw-in-catch-and-finally.out b/src/v8/test/message/fail/try-catch-finally-throw-in-catch-and-finally.out
similarity index 100%
rename from src/v8/test/message/try-catch-finally-throw-in-catch-and-finally.out
rename to src/v8/test/message/fail/try-catch-finally-throw-in-catch-and-finally.out
diff --git a/src/v8/test/message/try-catch-finally-throw-in-catch.js b/src/v8/test/message/fail/try-catch-finally-throw-in-catch.js
similarity index 100%
rename from src/v8/test/message/try-catch-finally-throw-in-catch.js
rename to src/v8/test/message/fail/try-catch-finally-throw-in-catch.js
diff --git a/src/v8/test/message/try-catch-finally-throw-in-catch.out b/src/v8/test/message/fail/try-catch-finally-throw-in-catch.out
similarity index 100%
rename from src/v8/test/message/try-catch-finally-throw-in-catch.out
rename to src/v8/test/message/fail/try-catch-finally-throw-in-catch.out
diff --git a/src/v8/test/message/try-catch-finally-throw-in-finally.js b/src/v8/test/message/fail/try-catch-finally-throw-in-finally.js
similarity index 100%
rename from src/v8/test/message/try-catch-finally-throw-in-finally.js
rename to src/v8/test/message/fail/try-catch-finally-throw-in-finally.js
diff --git a/src/v8/test/message/try-catch-finally-throw-in-finally.out b/src/v8/test/message/fail/try-catch-finally-throw-in-finally.out
similarity index 100%
rename from src/v8/test/message/try-catch-finally-throw-in-finally.out
rename to src/v8/test/message/fail/try-catch-finally-throw-in-finally.out
diff --git a/src/v8/test/message/try-catch-lexical-conflict.js b/src/v8/test/message/fail/try-catch-lexical-conflict.js
similarity index 100%
rename from src/v8/test/message/try-catch-lexical-conflict.js
rename to src/v8/test/message/fail/try-catch-lexical-conflict.js
diff --git a/src/v8/test/message/try-catch-lexical-conflict.out b/src/v8/test/message/fail/try-catch-lexical-conflict.out
similarity index 100%
rename from src/v8/test/message/try-catch-lexical-conflict.out
rename to src/v8/test/message/fail/try-catch-lexical-conflict.out
diff --git a/src/v8/test/message/try-catch-variable-conflict.js b/src/v8/test/message/fail/try-catch-variable-conflict.js
similarity index 100%
rename from src/v8/test/message/try-catch-variable-conflict.js
rename to src/v8/test/message/fail/try-catch-variable-conflict.js
diff --git a/src/v8/test/message/try-catch-variable-conflict.out b/src/v8/test/message/fail/try-catch-variable-conflict.out
similarity index 100%
rename from src/v8/test/message/try-catch-variable-conflict.out
rename to src/v8/test/message/fail/try-catch-variable-conflict.out
diff --git a/src/v8/test/message/try-finally-throw-in-finally.js b/src/v8/test/message/fail/try-finally-throw-in-finally.js
similarity index 100%
rename from src/v8/test/message/try-finally-throw-in-finally.js
rename to src/v8/test/message/fail/try-finally-throw-in-finally.js
diff --git a/src/v8/test/message/try-finally-throw-in-finally.out b/src/v8/test/message/fail/try-finally-throw-in-finally.out
similarity index 100%
rename from src/v8/test/message/try-finally-throw-in-finally.out
rename to src/v8/test/message/fail/try-finally-throw-in-finally.out
diff --git a/src/v8/test/message/try-finally-throw-in-try-and-finally.js b/src/v8/test/message/fail/try-finally-throw-in-try-and-finally.js
similarity index 100%
rename from src/v8/test/message/try-finally-throw-in-try-and-finally.js
rename to src/v8/test/message/fail/try-finally-throw-in-try-and-finally.js
diff --git a/src/v8/test/message/try-finally-throw-in-try-and-finally.out b/src/v8/test/message/fail/try-finally-throw-in-try-and-finally.out
similarity index 100%
rename from src/v8/test/message/try-finally-throw-in-try-and-finally.out
rename to src/v8/test/message/fail/try-finally-throw-in-try-and-finally.out
diff --git a/src/v8/test/message/try-finally-throw-in-try.js b/src/v8/test/message/fail/try-finally-throw-in-try.js
similarity index 100%
rename from src/v8/test/message/try-finally-throw-in-try.js
rename to src/v8/test/message/fail/try-finally-throw-in-try.js
diff --git a/src/v8/test/message/try-finally-throw-in-try.out b/src/v8/test/message/fail/try-finally-throw-in-try.out
similarity index 100%
rename from src/v8/test/message/try-finally-throw-in-try.out
rename to src/v8/test/message/fail/try-finally-throw-in-try.out
diff --git a/src/v8/test/message/typedarray.js b/src/v8/test/message/fail/typedarray.js
similarity index 100%
rename from src/v8/test/message/typedarray.js
rename to src/v8/test/message/fail/typedarray.js
diff --git a/src/v8/test/message/typedarray.out b/src/v8/test/message/fail/typedarray.out
similarity index 72%
rename from src/v8/test/message/typedarray.out
rename to src/v8/test/message/fail/typedarray.out
index b306e80..908dd7f 100644
--- a/src/v8/test/message/typedarray.out
+++ b/src/v8/test/message/fail/typedarray.out
@@ -1,9 +1,9 @@
 # Copyright 2017 the V8 project authors. All rights reserved.
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
-*%(basename)s:6: RangeError: Start offset is negative
+*%(basename)s:6: RangeError: offset is out of bounds
 a.set([2], -1);
   ^
-RangeError: Start offset is negative
+RangeError: offset is out of bounds
     at Uint8Array.set (<anonymous>)
     at *%(basename)s:6:3
\ No newline at end of file
diff --git a/src/v8/test/message/undefined-keyed-property.js b/src/v8/test/message/fail/undefined-keyed-property.js
similarity index 100%
rename from src/v8/test/message/undefined-keyed-property.js
rename to src/v8/test/message/fail/undefined-keyed-property.js
diff --git a/src/v8/test/message/undefined-keyed-property.out b/src/v8/test/message/fail/undefined-keyed-property.out
similarity index 100%
rename from src/v8/test/message/undefined-keyed-property.out
rename to src/v8/test/message/fail/undefined-keyed-property.out
diff --git a/src/v8/test/message/unicode-escape-invalid-2.js b/src/v8/test/message/fail/unicode-escape-invalid-2.js
similarity index 100%
rename from src/v8/test/message/unicode-escape-invalid-2.js
rename to src/v8/test/message/fail/unicode-escape-invalid-2.js
diff --git a/src/v8/test/message/unicode-escape-invalid-2.out b/src/v8/test/message/fail/unicode-escape-invalid-2.out
similarity index 100%
rename from src/v8/test/message/unicode-escape-invalid-2.out
rename to src/v8/test/message/fail/unicode-escape-invalid-2.out
diff --git a/src/v8/test/message/unicode-escape-invalid.js b/src/v8/test/message/fail/unicode-escape-invalid.js
similarity index 100%
rename from src/v8/test/message/unicode-escape-invalid.js
rename to src/v8/test/message/fail/unicode-escape-invalid.js
diff --git a/src/v8/test/message/unicode-escape-invalid.out b/src/v8/test/message/fail/unicode-escape-invalid.out
similarity index 100%
rename from src/v8/test/message/unicode-escape-invalid.out
rename to src/v8/test/message/fail/unicode-escape-invalid.out
diff --git a/src/v8/test/message/unicode-escape-undefined.js b/src/v8/test/message/fail/unicode-escape-undefined.js
similarity index 100%
rename from src/v8/test/message/unicode-escape-undefined.js
rename to src/v8/test/message/fail/unicode-escape-undefined.js
diff --git a/src/v8/test/message/unicode-escape-undefined.out b/src/v8/test/message/fail/unicode-escape-undefined.out
similarity index 100%
rename from src/v8/test/message/unicode-escape-undefined.out
rename to src/v8/test/message/fail/unicode-escape-undefined.out
diff --git a/src/v8/test/message/unterminated-arg-list.js b/src/v8/test/message/fail/unterminated-arg-list.js
similarity index 100%
rename from src/v8/test/message/unterminated-arg-list.js
rename to src/v8/test/message/fail/unterminated-arg-list.js
diff --git a/src/v8/test/message/unterminated-arg-list.out b/src/v8/test/message/fail/unterminated-arg-list.out
similarity index 100%
rename from src/v8/test/message/unterminated-arg-list.out
rename to src/v8/test/message/fail/unterminated-arg-list.out
diff --git a/src/v8/test/message/var-conflict-in-with.js b/src/v8/test/message/fail/var-conflict-in-with.js
similarity index 100%
rename from src/v8/test/message/var-conflict-in-with.js
rename to src/v8/test/message/fail/var-conflict-in-with.js
diff --git a/src/v8/test/message/var-conflict-in-with.out b/src/v8/test/message/fail/var-conflict-in-with.out
similarity index 100%
rename from src/v8/test/message/var-conflict-in-with.out
rename to src/v8/test/message/fail/var-conflict-in-with.out
diff --git a/src/v8/test/message/wasm-function-name.js b/src/v8/test/message/fail/wasm-function-name.js
similarity index 100%
rename from src/v8/test/message/wasm-function-name.js
rename to src/v8/test/message/fail/wasm-function-name.js
diff --git a/src/v8/test/message/wasm-function-name.out b/src/v8/test/message/fail/wasm-function-name.out
similarity index 100%
rename from src/v8/test/message/wasm-function-name.out
rename to src/v8/test/message/fail/wasm-function-name.out
diff --git a/src/v8/test/message/wasm-module-and-function-name.js b/src/v8/test/message/fail/wasm-module-and-function-name.js
similarity index 100%
rename from src/v8/test/message/wasm-module-and-function-name.js
rename to src/v8/test/message/fail/wasm-module-and-function-name.js
diff --git a/src/v8/test/message/wasm-module-and-function-name.out b/src/v8/test/message/fail/wasm-module-and-function-name.out
similarity index 100%
rename from src/v8/test/message/wasm-module-and-function-name.out
rename to src/v8/test/message/fail/wasm-module-and-function-name.out
diff --git a/src/v8/test/message/wasm-module-name.js b/src/v8/test/message/fail/wasm-module-name.js
similarity index 100%
rename from src/v8/test/message/wasm-module-name.js
rename to src/v8/test/message/fail/wasm-module-name.js
diff --git a/src/v8/test/message/wasm-module-name.out b/src/v8/test/message/fail/wasm-module-name.out
similarity index 100%
rename from src/v8/test/message/wasm-module-name.out
rename to src/v8/test/message/fail/wasm-module-name.out
diff --git a/src/v8/test/message/wasm-no-name.js b/src/v8/test/message/fail/wasm-no-name.js
similarity index 100%
rename from src/v8/test/message/wasm-no-name.js
rename to src/v8/test/message/fail/wasm-no-name.js
diff --git a/src/v8/test/message/wasm-no-name.out b/src/v8/test/message/fail/wasm-no-name.out
similarity index 100%
rename from src/v8/test/message/wasm-no-name.out
rename to src/v8/test/message/fail/wasm-no-name.out
diff --git a/src/v8/test/message/wasm-trap.js b/src/v8/test/message/fail/wasm-trap.js
similarity index 100%
rename from src/v8/test/message/wasm-trap.js
rename to src/v8/test/message/fail/wasm-trap.js
diff --git a/src/v8/test/message/wasm-trap.out b/src/v8/test/message/fail/wasm-trap.out
similarity index 100%
rename from src/v8/test/message/wasm-trap.out
rename to src/v8/test/message/fail/wasm-trap.out
diff --git a/src/v8/test/message/yield-in-arrow-param.js b/src/v8/test/message/fail/yield-in-arrow-param.js
similarity index 100%
rename from src/v8/test/message/yield-in-arrow-param.js
rename to src/v8/test/message/fail/yield-in-arrow-param.js
diff --git a/src/v8/test/message/yield-in-arrow-param.out b/src/v8/test/message/fail/yield-in-arrow-param.out
similarity index 100%
rename from src/v8/test/message/yield-in-arrow-param.out
rename to src/v8/test/message/fail/yield-in-arrow-param.out
diff --git a/src/v8/test/message/yield-in-generator-param.js b/src/v8/test/message/fail/yield-in-generator-param.js
similarity index 100%
rename from src/v8/test/message/yield-in-generator-param.js
rename to src/v8/test/message/fail/yield-in-generator-param.js
diff --git a/src/v8/test/message/yield-in-generator-param.out b/src/v8/test/message/fail/yield-in-generator-param.out
similarity index 100%
rename from src/v8/test/message/yield-in-generator-param.out
rename to src/v8/test/message/fail/yield-in-generator-param.out
diff --git a/src/v8/test/message/message.status b/src/v8/test/message/message.status
index ebdf76e..6aba054 100644
--- a/src/v8/test/message/message.status
+++ b/src/v8/test/message/message.status
@@ -34,6 +34,13 @@
 
   # Modules which are only meant to be imported from by other tests, not to be
   # tested standalone.
-  'modules-skip*': [SKIP],
+  'fail/modules-skip*': [SKIP],
 }],  # ALWAYS
+
+# Liftoff is currently only sufficiently implemented on x64 and ia32.
+# TODO(clemensh): Implement on all other platforms (crbug.com/v8/6600).
+['arch != x64 and arch != ia32', {
+  'wasm-trace-memory-liftoff': [SKIP],
+}], # arch != x64 and arch != ia32
+
 ]
diff --git a/src/v8/test/message/modules-cycle1.out b/src/v8/test/message/modules-cycle1.out
deleted file mode 100644
index 3e6f31b..0000000
--- a/src/v8/test/message/modules-cycle1.out
+++ /dev/null
@@ -1,5 +0,0 @@
-*%(basename)s:7: SyntaxError: Detected cycle while resolving name 'a'
-import {a} from "modules-cycle1.js";
-        ^
-SyntaxError: Detected cycle while resolving name 'a'
-
diff --git a/src/v8/test/message/modules-cycle2.out b/src/v8/test/message/modules-cycle2.out
deleted file mode 100644
index f3c19d2..0000000
--- a/src/v8/test/message/modules-cycle2.out
+++ /dev/null
@@ -1,5 +0,0 @@
-*%(basename)s:7: SyntaxError: Detected cycle while resolving name 'a'
-import {a} from "modules-skip-cycle2.js";
-        ^
-SyntaxError: Detected cycle while resolving name 'a'
-
diff --git a/src/v8/test/message/modules-cycle3.out b/src/v8/test/message/modules-cycle3.out
deleted file mode 100644
index a5b1014..0000000
--- a/src/v8/test/message/modules-cycle3.out
+++ /dev/null
@@ -1,5 +0,0 @@
-*%(basename)s:7: SyntaxError: Detected cycle while resolving name 'a'
-export {a as x} from "modules-skip-cycle3.js";
-        ^^^^^^
-SyntaxError: Detected cycle while resolving name 'a'
-
diff --git a/src/v8/test/message/modules-cycle4.out b/src/v8/test/message/modules-cycle4.out
deleted file mode 100644
index 74789e0..0000000
--- a/src/v8/test/message/modules-cycle4.out
+++ /dev/null
@@ -1,5 +0,0 @@
-*modules-cycle3.js:7: SyntaxError: Detected cycle while resolving name 'a'
-export {a as x} from "modules-skip-cycle3.js";
-        ^^^^^^
-SyntaxError: Detected cycle while resolving name 'a'
-
diff --git a/src/v8/test/message/modules-cycle5.out b/src/v8/test/message/modules-cycle5.out
deleted file mode 100644
index 8eb3e60..0000000
--- a/src/v8/test/message/modules-cycle5.out
+++ /dev/null
@@ -1,5 +0,0 @@
-*%(basename)s:8: SyntaxError: Detected cycle while resolving name 'foo'
-export {foo} from "modules-cycle5.js";
-        ^^^
-SyntaxError: Detected cycle while resolving name 'foo'
-
diff --git a/src/v8/test/message/modules-cycle6.out b/src/v8/test/message/modules-cycle6.out
deleted file mode 100644
index d91e1ab..0000000
--- a/src/v8/test/message/modules-cycle6.out
+++ /dev/null
@@ -1,5 +0,0 @@
-*modules-skip-cycle6.js:5: SyntaxError: The requested module does not provide an export named 'foo'
-export {foo} from "modules-cycle6.js";
-        ^^^
-SyntaxError: The requested module does not provide an export named 'foo'
-
diff --git a/src/v8/test/message/modules-import1.out b/src/v8/test/message/modules-import1.out
deleted file mode 100644
index 6facd0f..0000000
--- a/src/v8/test/message/modules-import1.out
+++ /dev/null
@@ -1,5 +0,0 @@
-*%(basename)s:7: SyntaxError: The requested module does not provide an export named 'a'
-import {a} from "modules-import1.js";
-        ^
-SyntaxError: The requested module does not provide an export named 'a'
-
diff --git a/src/v8/test/message/modules-import2.out b/src/v8/test/message/modules-import2.out
deleted file mode 100644
index 317399a..0000000
--- a/src/v8/test/message/modules-import2.out
+++ /dev/null
@@ -1,5 +0,0 @@
-*%(basename)s:7: SyntaxError: The requested module does not provide an export named 'a'
-import {a as b} from "modules-import2.js";
-        ^
-SyntaxError: The requested module does not provide an export named 'a'
-
diff --git a/src/v8/test/message/modules-import3.out b/src/v8/test/message/modules-import3.out
deleted file mode 100644
index 75abc74..0000000
--- a/src/v8/test/message/modules-import3.out
+++ /dev/null
@@ -1,5 +0,0 @@
-*%(basename)s:7: SyntaxError: The requested module does not provide an export named 'default'
-import foo from "modules-import3.js";
-       ^^^
-SyntaxError: The requested module does not provide an export named 'default'
-
diff --git a/src/v8/test/message/modules-import4.out b/src/v8/test/message/modules-import4.out
deleted file mode 100644
index bd406e4..0000000
--- a/src/v8/test/message/modules-import4.out
+++ /dev/null
@@ -1,5 +0,0 @@
-*%(basename)s:8: SyntaxError: The requested module does not provide an export named 'c'
-export {c as a} from "modules-import4.js";
-        ^^^^^^
-SyntaxError: The requested module does not provide an export named 'c'
-
diff --git a/src/v8/test/message/modules-import5.out b/src/v8/test/message/modules-import5.out
deleted file mode 100644
index 8828774..0000000
--- a/src/v8/test/message/modules-import5.out
+++ /dev/null
@@ -1,5 +0,0 @@
-*%(basename)s:8: SyntaxError: The requested module does not provide an export named 'c'
-export {c as a} from "modules-import5.js";
-        ^^^^^^
-SyntaxError: The requested module does not provide an export named 'c'
-
diff --git a/src/v8/test/message/modules-import6.out b/src/v8/test/message/modules-import6.out
deleted file mode 100644
index 9d7eeeb..0000000
--- a/src/v8/test/message/modules-import6.out
+++ /dev/null
@@ -1,5 +0,0 @@
-*%(basename)s:9: SyntaxError: The requested module does not provide an export named 'c'
-import {c} from "modules-import6.js";
-        ^
-SyntaxError: The requested module does not provide an export named 'c'
-
diff --git a/src/v8/test/message/modules-star-conflict1.out b/src/v8/test/message/modules-star-conflict1.out
deleted file mode 100644
index 1a4986a..0000000
--- a/src/v8/test/message/modules-star-conflict1.out
+++ /dev/null
@@ -1,5 +0,0 @@
-*%(basename)s:7: SyntaxError: The requested module contains conflicting star exports for name 'a'
-import {a} from "../mjsunit/modules-skip-7.js";
-        ^
-SyntaxError: The requested module contains conflicting star exports for name 'a'
-
diff --git a/src/v8/test/message/modules-star-conflict2.out b/src/v8/test/message/modules-star-conflict2.out
deleted file mode 100644
index 9cbbfc4..0000000
--- a/src/v8/test/message/modules-star-conflict2.out
+++ /dev/null
@@ -1,5 +0,0 @@
-*%(basename)s:7: SyntaxError: The requested module contains conflicting star exports for name 'a'
-export * from "../mjsunit/modules-skip-star-exports-conflict.js";
-       ^
-SyntaxError: The requested module contains conflicting star exports for name 'a'
-
diff --git a/src/v8/test/message/modules-star-default.out b/src/v8/test/message/modules-star-default.out
deleted file mode 100644
index a3cd5a6..0000000
--- a/src/v8/test/message/modules-star-default.out
+++ /dev/null
@@ -1,5 +0,0 @@
-*modules-import4.js:8: SyntaxError: The requested module does not provide an export named 'c'
-export {c as a} from "modules-import4.js";
-        ^^^^^^
-SyntaxError: The requested module does not provide an export named 'c'
-
diff --git a/src/v8/test/mjsunit/regress/wasm/regression-694433.js b/src/v8/test/message/object-binding-pattern-await-computed-name.js
similarity index 62%
copy from src/v8/test/mjsunit/regress/wasm/regression-694433.js
copy to src/v8/test/message/object-binding-pattern-await-computed-name.js
index a260e20..1b40d0d 100644
--- a/src/v8/test/mjsunit/regress/wasm/regression-694433.js
+++ b/src/v8/test/message/object-binding-pattern-await-computed-name.js
@@ -2,5 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-var size = 0x40000000;
-assertThrows(() => WebAssembly.validate(new Uint16Array(size)), RangeError);
+async function f() {
+  let { [await "a"]: a } = { a: 1 };
+  return a;
+}
+f();
diff --git a/src/v8/test/message/object-binding-pattern-await-computed-name.out b/src/v8/test/message/object-binding-pattern-await-computed-name.out
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/src/v8/test/message/object-binding-pattern-await-computed-name.out
diff --git a/src/v8/test/message/regress/regress-1527.js b/src/v8/test/message/regress/fail/regress-1527.js
similarity index 100%
rename from src/v8/test/message/regress/regress-1527.js
rename to src/v8/test/message/regress/fail/regress-1527.js
diff --git a/src/v8/test/message/regress/regress-1527.out b/src/v8/test/message/regress/fail/regress-1527.out
similarity index 100%
rename from src/v8/test/message/regress/regress-1527.out
rename to src/v8/test/message/regress/fail/regress-1527.out
diff --git a/src/v8/test/message/regress/regress-3995.js b/src/v8/test/message/regress/fail/regress-3995.js
similarity index 100%
rename from src/v8/test/message/regress/regress-3995.js
rename to src/v8/test/message/regress/fail/regress-3995.js
diff --git a/src/v8/test/message/regress/regress-3995.out b/src/v8/test/message/regress/fail/regress-3995.out
similarity index 100%
rename from src/v8/test/message/regress/regress-3995.out
rename to src/v8/test/message/regress/fail/regress-3995.out
diff --git a/src/v8/test/message/regress/regress-4266.js b/src/v8/test/message/regress/fail/regress-4266.js
similarity index 100%
rename from src/v8/test/message/regress/regress-4266.js
rename to src/v8/test/message/regress/fail/regress-4266.js
diff --git a/src/v8/test/message/regress/regress-4266.out b/src/v8/test/message/regress/fail/regress-4266.out
similarity index 100%
rename from src/v8/test/message/regress/regress-4266.out
rename to src/v8/test/message/regress/fail/regress-4266.out
diff --git a/src/v8/test/message/regress/regress-5727.js b/src/v8/test/message/regress/fail/regress-5727.js
similarity index 100%
rename from src/v8/test/message/regress/regress-5727.js
rename to src/v8/test/message/regress/fail/regress-5727.js
diff --git a/src/v8/test/message/regress/regress-5727.out b/src/v8/test/message/regress/fail/regress-5727.out
similarity index 100%
rename from src/v8/test/message/regress/regress-5727.out
rename to src/v8/test/message/regress/fail/regress-5727.out
diff --git a/src/v8/test/message/regress/regress-73.js b/src/v8/test/message/regress/fail/regress-73.js
similarity index 100%
rename from src/v8/test/message/regress/regress-73.js
rename to src/v8/test/message/regress/fail/regress-73.js
diff --git a/src/v8/test/message/regress/regress-73.out b/src/v8/test/message/regress/fail/regress-73.out
similarity index 100%
rename from src/v8/test/message/regress/regress-73.out
rename to src/v8/test/message/regress/fail/regress-73.out
diff --git a/src/v8/test/message/regress/regress-75.js b/src/v8/test/message/regress/fail/regress-75.js
similarity index 100%
rename from src/v8/test/message/regress/regress-75.js
rename to src/v8/test/message/regress/fail/regress-75.js
diff --git a/src/v8/test/message/regress/regress-75.out b/src/v8/test/message/regress/fail/regress-75.out
similarity index 100%
rename from src/v8/test/message/regress/regress-75.out
rename to src/v8/test/message/regress/fail/regress-75.out
diff --git a/src/v8/test/message/regress/regress-crbug-661579.js b/src/v8/test/message/regress/fail/regress-crbug-661579.js
similarity index 100%
rename from src/v8/test/message/regress/regress-crbug-661579.js
rename to src/v8/test/message/regress/fail/regress-crbug-661579.js
diff --git a/src/v8/test/message/regress/regress-crbug-661579.out b/src/v8/test/message/regress/fail/regress-crbug-661579.out
similarity index 100%
rename from src/v8/test/message/regress/regress-crbug-661579.out
rename to src/v8/test/message/regress/fail/regress-crbug-661579.out
diff --git a/src/v8/test/message/regress/regress-crbug-669017.js b/src/v8/test/message/regress/fail/regress-crbug-669017.js
similarity index 100%
rename from src/v8/test/message/regress/regress-crbug-669017.js
rename to src/v8/test/message/regress/fail/regress-crbug-669017.js
diff --git a/src/v8/test/message/regress/regress-crbug-669017.out b/src/v8/test/message/regress/fail/regress-crbug-669017.out
similarity index 100%
rename from src/v8/test/message/regress/regress-crbug-669017.out
rename to src/v8/test/message/regress/fail/regress-crbug-669017.out
diff --git a/src/v8/test/message/regress/regress-crbug-691194.js b/src/v8/test/message/regress/fail/regress-crbug-691194.js
similarity index 100%
rename from src/v8/test/message/regress/regress-crbug-691194.js
rename to src/v8/test/message/regress/fail/regress-crbug-691194.js
diff --git a/src/v8/test/message/regress/regress-crbug-691194.out b/src/v8/test/message/regress/fail/regress-crbug-691194.out
similarity index 100%
rename from src/v8/test/message/regress/regress-crbug-691194.out
rename to src/v8/test/message/regress/fail/regress-crbug-691194.out
diff --git a/src/v8/test/message/regress/regress-4829-1.js b/src/v8/test/message/regress/regress-4829-1.js
deleted file mode 100644
index 78277df..0000000
--- a/src/v8/test/message/regress/regress-4829-1.js
+++ /dev/null
@@ -1,9 +0,0 @@
-// Copyright 2016 the V8 project authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// Flags: --no-harmony-template-escapes
-
-function tag() {}
-
-tag(tag`\xyy`);
diff --git a/src/v8/test/message/regress/regress-4829-1.out b/src/v8/test/message/regress/regress-4829-1.out
deleted file mode 100644
index dc0f566..0000000
--- a/src/v8/test/message/regress/regress-4829-1.out
+++ /dev/null
@@ -1,8 +0,0 @@
-# Copyright 2016 the V8 project authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-*%(basename)s:9: SyntaxError: Invalid hexadecimal escape sequence
-tag(tag`\xyy`);
-        ^^^^
-SyntaxError: Invalid hexadecimal escape sequence
diff --git a/src/v8/test/message/regress/regress-4829-2.js b/src/v8/test/message/regress/regress-4829-2.js
deleted file mode 100644
index 2f507e3..0000000
--- a/src/v8/test/message/regress/regress-4829-2.js
+++ /dev/null
@@ -1,9 +0,0 @@
-// Copyright 2016 the V8 project authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// Flags: --no-harmony-template-escapes
-
-function tag() {}
-
-`${tag`\xyy`}`;
diff --git a/src/v8/test/message/regress/regress-4829-2.out b/src/v8/test/message/regress/regress-4829-2.out
deleted file mode 100644
index 7278424..0000000
--- a/src/v8/test/message/regress/regress-4829-2.out
+++ /dev/null
@@ -1,8 +0,0 @@
-# Copyright 2016 the V8 project authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-*%(basename)s:9: SyntaxError: Invalid hexadecimal escape sequence
-`${tag`\xyy`}`;
-       ^^^^
-SyntaxError: Invalid hexadecimal escape sequence
diff --git a/src/v8/test/message/testcfg.py b/src/v8/test/message/testcfg.py
index 0576458..cd1495f 100644
--- a/src/v8/test/message/testcfg.py
+++ b/src/v8/test/message/testcfg.py
@@ -25,24 +25,20 @@
 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
-import itertools
 import os
 import re
 
 from testrunner.local import testsuite
 from testrunner.local import utils
 from testrunner.objects import testcase
+from testrunner.outproc import message
 
 
-FLAGS_PATTERN = re.compile(r"//\s+Flags:(.*)")
 INVALID_FLAGS = ["--enable-slow-asserts"]
 MODULE_PATTERN = re.compile(r"^// MODULE$", flags=re.MULTILINE)
 
 
-class MessageTestSuite(testsuite.TestSuite):
-  def __init__(self, name, root):
-    super(MessageTestSuite, self).__init__(name, root)
-
+class TestSuite(testsuite.TestSuite):
   def ListTests(self, context):
     tests = []
     for dirname, dirs, files in os.walk(self.root):
@@ -55,67 +51,64 @@
           fullpath = os.path.join(dirname, filename)
           relpath = fullpath[len(self.root) + 1 : -3]
           testname = relpath.replace(os.path.sep, "/")
-          test = testcase.TestCase(self, testname)
+          test = self._create_test(testname)
           tests.append(test)
     return tests
 
-  def CreateVariantGenerator(self, variants):
-    return super(MessageTestSuite, self).CreateVariantGenerator(
+  def _test_class(self):
+    return TestCase
+
+  def CreateLegacyVariantsGenerator(self, variants):
+    return super(TestSuite, self).CreateLegacyVariantsGenerator(
         variants + ["preparser"])
 
-  def GetFlagsForTestCase(self, testcase, context):
-    source = self.GetSourceForTest(testcase)
-    result = []
-    flags_match = re.findall(FLAGS_PATTERN, source)
-    for match in flags_match:
-      result += match.strip().split()
-    result += context.mode_flags
+  def create_variant_proc(self, variants):
+    return super(TestSuite, self).create_variant_proc(variants + ['preparser'])
+
+
+class TestCase(testcase.TestCase):
+  def __init__(self, *args, **kwargs):
+    super(TestCase, self).__init__(*args, **kwargs)
+
+    source = self.get_source()
+    self._source_files = self._parse_source_files(source)
+    self._source_flags = self._parse_source_flags(source)
+
+  def _parse_source_files(self, source):
+    files = []
     if MODULE_PATTERN.search(source):
-      result.append("--module")
-    result = [x for x in result if x not in INVALID_FLAGS]
-    result.append(os.path.join(self.root, testcase.path + ".js"))
-    return testcase.flags + result
+      files.append("--module")
+    files.append(os.path.join(self.suite.root, self.path + ".js"))
+    return files
 
-  def GetSourceForTest(self, testcase):
-    filename = os.path.join(self.root, testcase.path + self.suffix())
-    with open(filename) as f:
-      return f.read()
-
-  def _IgnoreLine(self, string):
-    """Ignore empty lines, valgrind output, Android output."""
-    if not string: return True
-    if not string.strip(): return True
-    return (string.startswith("==") or string.startswith("**") or
-            string.startswith("ANDROID"))
-
-  def IsFailureOutput(self, testcase):
-    output = testcase.output
-    testpath = testcase.path
-    expected_path = os.path.join(self.root, testpath + ".out")
-    expected_lines = []
-    # Can't use utils.ReadLinesFrom() here because it strips whitespace.
-    with open(expected_path) as f:
-      for line in f:
-        if line.startswith("#") or not line.strip(): continue
-        expected_lines.append(line)
-    raw_lines = output.stdout.splitlines()
-    actual_lines = [ s for s in raw_lines if not self._IgnoreLine(s) ]
-    env = { "basename": os.path.basename(testpath + ".js") }
-    if len(expected_lines) != len(actual_lines):
-      return True
-    for (expected, actual) in itertools.izip_longest(
-        expected_lines, actual_lines, fillvalue=''):
-      pattern = re.escape(expected.rstrip() % env)
-      pattern = pattern.replace("\\*", ".*")
-      pattern = pattern.replace("\\{NUMBER\\}", "\d(?:\.\d*)?")
-      pattern = "^%s$" % pattern
-      if not re.match(pattern, actual):
+  def _expected_fail(self):
+    path = self.path
+    while path:
+      head, tail = os.path.split(path)
+      if tail == 'fail':
         return True
+      path = head
     return False
 
-  def StripOutputForTransmit(self, testcase):
-    pass
+  def _get_cmd_params(self, ctx):
+    params = super(TestCase, self)._get_cmd_params(ctx)
+    return [p for p in params if p not in INVALID_FLAGS]
+
+  def _get_files_params(self, ctx):
+    return self._source_files
+
+  def _get_source_flags(self):
+    return self._source_flags
+
+  def _get_source_path(self):
+    return os.path.join(self.suite.root, self.path + self._get_suffix())
+
+  @property
+  def output_proc(self):
+    return message.OutProc(self.expected_outcomes,
+                           os.path.join(self.suite.root, self.path),
+                           self._expected_fail())
 
 
 def GetSuite(name, root):
-  return MessageTestSuite(name, root)
+  return TestSuite(name, root)
diff --git a/src/v8/test/message/wasm-trace-memory-interpreted.out b/src/v8/test/message/wasm-trace-memory-interpreted.out
index 6854727..7865195 100644
--- a/src/v8/test/message/wasm-trace-memory-interpreted.out
+++ b/src/v8/test/message/wasm-trace-memory-interpreted.out
@@ -1,9 +1,9 @@
-I        0+0x3      read  @00000004 i32:0 / 00000000
-I        1+0x3      read  @00000001  i8:0 / 00
+I        0+0x3      load  @00000004 i32:0 / 00000000
+I        1+0x3      load  @00000001  i8:0 / 00
 I        3+0x5      store @00000004 i32:305419896 / 12345678
-I        0+0x3      read  @00000002 i32:1450704896 / 56780000
-I        1+0x3      read  @00000006  i8:52 / 34
-I        2+0x3      read  @00000002 f32:68169720922112.000000 / 56780000
+I        0+0x3      load  @00000002 i32:1450704896 / 56780000
+I        1+0x3      load  @00000006  i8:52 / 34
+I        2+0x3      load  @00000002 f32:68169720922112.000000 / 56780000
 I        4+0x5      store @00000004  i8:171 / ab
-I        0+0x3      read  @00000002 i32:1454047232 / 56ab0000
-I        2+0x3      read  @00000002 f32:94008244174848.000000 / 56ab0000
+I        0+0x3      load  @00000002 i32:1454047232 / 56ab0000
+I        2+0x3      load  @00000002 f32:94008244174848.000000 / 56ab0000
diff --git a/src/v8/test/message/wasm-trace-memory-liftoff.js b/src/v8/test/message/wasm-trace-memory-liftoff.js
new file mode 100644
index 0000000..00b6421
--- /dev/null
+++ b/src/v8/test/message/wasm-trace-memory-liftoff.js
@@ -0,0 +1,7 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --no-stress-opt --expose-wasm --wasm-trace-memory --liftoff
+
+load("test/message/wasm-trace-memory.js");
diff --git a/src/v8/test/message/wasm-trace-memory-liftoff.out b/src/v8/test/message/wasm-trace-memory-liftoff.out
new file mode 100644
index 0000000..26f22a5
--- /dev/null
+++ b/src/v8/test/message/wasm-trace-memory-liftoff.out
@@ -0,0 +1,9 @@
+L        0+0x3      load  @00000004 i32:0 / 00000000
+L        1+0x3      load  @00000001  i8:0 / 00
+L        3+0x5      store @00000004 i32:305419896 / 12345678
+L        0+0x3      load  @00000002 i32:1450704896 / 56780000
+L        1+0x3      load  @00000006  i8:52 / 34
+L        2+0x3      load  @00000002 f32:68169720922112.000000 / 56780000
+L        4+0x5      store @00000004  i8:171 / ab
+L        0+0x3      load  @00000002 i32:1454047232 / 56ab0000
+L        2+0x3      load  @00000002 f32:94008244174848.000000 / 56ab0000
diff --git a/src/v8/test/message/wasm-trace-memory.js b/src/v8/test/message/wasm-trace-memory.js
index 6c33b90..1beb76a 100644
--- a/src/v8/test/message/wasm-trace-memory.js
+++ b/src/v8/test/message/wasm-trace-memory.js
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-// Flags: --no-stress-opt --expose-wasm --wasm-trace-memory
+// Flags: --no-stress-opt --expose-wasm --wasm-trace-memory --no-liftoff
 
 load("test/mjsunit/wasm/wasm-constants.js");
 load("test/mjsunit/wasm/wasm-module-builder.js");
diff --git a/src/v8/test/message/wasm-trace-memory.out b/src/v8/test/message/wasm-trace-memory.out
index 12cbd18..37faa6a 100644
--- a/src/v8/test/message/wasm-trace-memory.out
+++ b/src/v8/test/message/wasm-trace-memory.out
@@ -1,9 +1,9 @@
-C        0+0x3      read  @00000004 i32:0 / 00000000
-C        1+0x3      read  @00000001  i8:0 / 00
-C        3+0x5      store @00000004 i32:305419896 / 12345678
-C        0+0x3      read  @00000002 i32:1450704896 / 56780000
-C        1+0x3      read  @00000006  i8:52 / 34
-C        2+0x3      read  @00000002 f32:68169720922112.000000 / 56780000
-C        4+0x5      store @00000004  i8:171 / ab
-C        0+0x3      read  @00000002 i32:1454047232 / 56ab0000
-C        2+0x3      read  @00000002 f32:94008244174848.000000 / 56ab0000
+T        0+0x3      load  @00000004 i32:0 / 00000000
+T        1+0x3      load  @00000001  i8:0 / 00
+T        3+0x5      store @00000004 i32:305419896 / 12345678
+T        0+0x3      load  @00000002 i32:1450704896 / 56780000
+T        1+0x3      load  @00000006  i8:52 / 34
+T        2+0x3      load  @00000002 f32:68169720922112.000000 / 56780000
+T        4+0x5      store @00000004  i8:171 / ab
+T        0+0x3      load  @00000002 i32:1454047232 / 56ab0000
+T        2+0x3      load  @00000002 f32:94008244174848.000000 / 56ab0000
diff --git a/src/v8/test/mjsunit/array-constructor-feedback.js b/src/v8/test/mjsunit/array-constructor-feedback.js
index c1f386d..fb4ad5a 100644
--- a/src/v8/test/mjsunit/array-constructor-feedback.js
+++ b/src/v8/test/mjsunit/array-constructor-feedback.js
@@ -106,14 +106,9 @@
   a = bar(10);
   assertKind(elements_kind.fast, a);
   assertOptimized(bar);
-  bar(100000);
+  bar(10000);
   assertOptimized(bar);
 
-  // If the argument isn't a smi, things should still work.
-  a = bar("oops");
-  assertOptimized(bar);
-  assertKind(elements_kind.fast, a);
-
   function barn(one, two, three) {
     return new Array(one, two, three);
   }
diff --git a/src/v8/test/mjsunit/array-iteration.js b/src/v8/test/mjsunit/array-iteration.js
index 9d03ed1..4de5820 100644
--- a/src/v8/test/mjsunit/array-iteration.js
+++ b/src/v8/test/mjsunit/array-iteration.js
@@ -73,6 +73,31 @@
   assertEquals(3, count);
   for (var i in a) assertEquals(2, a[i]);
 
+  // Skip over missing properties.
+  a = {
+    "0": 0,
+    "2": 2,
+    length: 3
+  };
+  var received = [];
+  assertArrayEquals([2],
+      Array.prototype.filter.call(a, function(n) {
+        received.push(n);
+        return n == 2;
+      }));
+  assertArrayEquals([0, 2], received);
+
+  // Modify array prototype
+  a = [0, , 2];
+  received = [];
+  assertArrayEquals([2],
+      Array.prototype.filter.call(a, function(n) {
+        a.__proto__ = null;
+        received.push(n);
+        return n == 2;
+      }));
+  assertArrayEquals([0, 2], received);
+
   // Create a new object in each function call when receiver is a
   // primitive value. See ECMA-262, Annex C.
   a = [];
@@ -131,6 +156,26 @@
   a.forEach(function(n) { count++; });
   assertEquals(1, count);
 
+  // Skip over missing properties.
+  a = {
+    "0": 0,
+    "2": 2,
+    length: 3
+  };
+  var received = [];
+  Array.prototype.forEach.call(a, function(n) { received.push(n); });
+  assertArrayEquals([0, 2], received);
+
+  // Modify array prototype
+  a = [0, , 2];
+  received = [];
+  Array.prototype.forEach.call(a, function(n) {
+    a.__proto__ = null;
+    received.push(n);
+    return n == 2;
+  });
+  assertArrayEquals([0, 2], received);
+
   // Create a new object in each function call when receiver is a
   // primitive value. See ECMA-262, Annex C.
   a = [];
@@ -194,6 +239,31 @@
   assertTrue(a.every(function(n) { count++; return n == 2; }));
   assertEquals(2, count);
 
+  // Skip over missing properties.
+  a = {
+    "0": 2,
+    "2": 2,
+    length: 3
+  };
+  var received = [];
+  assertTrue(
+      Array.prototype.every.call(a, function(n) {
+        received.push(n);
+        return n == 2;
+      }));
+  assertArrayEquals([2, 2], received);
+
+  // Modify array prototype
+  a = [2, , 2];
+  received = [];
+  assertTrue(
+      Array.prototype.every.call(a, function(n) {
+        a.__proto__ = null;
+        received.push(n);
+        return n == 2;
+      }));
+  assertArrayEquals([2, 2], received);
+
   // Create a new object in each function call when receiver is a
   // primitive value. See ECMA-262, Annex C.
   a = [];
@@ -252,6 +322,31 @@
   a = a.map(function(n) { return 2*n; });
   for (var i in a) assertEquals(4, a[i]);
 
+  // Skip over missing properties.
+  a = {
+    "0": 1,
+    "2": 2,
+    length: 3
+  };
+  var received = [];
+  assertArrayEquals([2, , 4],
+      Array.prototype.map.call(a, function(n) {
+        received.push(n);
+        return n * 2;
+      }));
+  assertArrayEquals([1, 2], received);
+
+  // Modify array prototype
+  a = [1, , 2];
+  received = [];
+  assertArrayEquals([2, , 4],
+      Array.prototype.map.call(a, function(n) {
+        a.__proto__ = null;
+        received.push(n);
+        return n * 2;
+      }));
+  assertArrayEquals([1, 2], received);
+
   // Create a new object in each function call when receiver is a
   // primitive value. See ECMA-262, Annex C.
   a = [];
diff --git a/src/v8/test/mjsunit/array-lastindexof.js b/src/v8/test/mjsunit/array-lastindexof.js
new file mode 100644
index 0000000..785bd64
--- /dev/null
+++ b/src/v8/test/mjsunit/array-lastindexof.js
@@ -0,0 +1,10 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+assertThrows(() => {
+  Array.prototype.lastIndexOf.call(null, 42);
+}, TypeError);
+assertThrows(() => {
+  Array.prototype.lastIndexOf.call(undefined, 42);
+}, TypeError);
diff --git a/src/v8/test/mjsunit/array-reduce.js b/src/v8/test/mjsunit/array-reduce.js
index 4a4494a..171a40f 100644
--- a/src/v8/test/mjsunit/array-reduce.js
+++ b/src/v8/test/mjsunit/array-reduce.js
@@ -25,6 +25,8 @@
 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
+// Flags: --allow-natives-syntax
+
 /**
  * @fileoverview Test reduce and reduceRight
  */
@@ -557,3 +559,685 @@
       }, 'initial')
   }, 'do not continue');
 })();
+
+(function OptimizedReduce() {
+  let f = (a,current) => a + current;
+  let g = function(a) {
+    return a.reduce(f);
+  }
+  let a = [1,2,3,4,5,6,7,8,9,10];
+  g(a); g(a);
+  let total = g(a);
+  %OptimizeFunctionOnNextCall(g);
+  assertEquals(total, g(a));
+})();
+
+(function OptimizedReduceEmpty() {
+  let f = (a,current) => a + current;
+  let g = function(a) {
+    return a.reduce(f);
+  }
+  let a = [1,2,3,4,5,6,7,8,9,10];
+  g(a); g(a); g(a);
+  %OptimizeFunctionOnNextCall(g);
+  g(a);
+  assertThrows(() => g([]));
+})();
+
+(function OptimizedReduceLazyDeopt() {
+  let deopt = false;
+  let f = (a,current) => { if (deopt) %DeoptimizeNow(); return a + current; };
+  let g = function(a) {
+    return a.reduce(f);
+  }
+  let a = [1,2,3,4,5,6,7,8,9,10];
+  g(a); g(a);
+  let total = g(a);
+  %OptimizeFunctionOnNextCall(g);
+  g(a);
+  deopt = true;
+  assertEquals(total, g(a));
+})();
+
+(function OptimizedReduceLazyDeoptMiddleOfIteration() {
+  let deopt = false;
+  let f = (a,current) => {
+    if (current == 6 && deopt) %DeoptimizeNow();
+    return a + current;
+  };
+  let g = function(a) {
+    return a.reduce(f);
+  }
+  let a = [11,22,33,45,56,6,77,84,93,101];
+  g(a); g(a);
+  let total = g(a);
+  %OptimizeFunctionOnNextCall(g);
+  g(a);
+  deopt = true;
+  assertEquals(total, g(a));
+})();
+
+(function OptimizedReduceEagerDeoptMiddleOfIteration() {
+  let deopt = false;
+  let array = [11,22,33,45,56,6,77,84,93,101];
+  let f = (a,current) => {
+    if (current == 6 && deopt) {array[0] = 1.5; }
+    return a + current;
+  };
+  let g = function() {
+    return array.reduce(f);
+  }
+  g(); g();
+  let total = g();
+  %OptimizeFunctionOnNextCall(g);
+  g();
+  deopt = true;
+  g();
+  deopt = false;
+  array = [11,22,33,45,56,6,77,84,93,101];
+  %OptimizeFunctionOnNextCall(g);
+  g();
+  deopt = true;
+  assertEquals(total, g());
+})();
+
+(function ReduceCatch() {
+  let f = (a,current) => {
+    return a + current;
+  };
+  let g = function() {
+    try {
+      return array.reduce(f);
+    } catch (e) {
+    }
+  }
+  g(); g();
+  let total = g();
+  %OptimizeFunctionOnNextCall(g);
+  g();
+  g();
+  assertEquals(total, g());
+})();
+
+(function ReduceThrow() {
+  let done = false;
+  let f = (a, current) => {
+    if (done) throw "x";
+    return a + current;
+  };
+  let array = [1,2,3];
+  let g = function() {
+    try {
+      return array.reduce(f);
+    } catch (e) {
+      return null;
+    }
+  }
+  g(); g();
+  let total = g();
+  %OptimizeFunctionOnNextCall(g);
+  g();
+  assertEquals(6, g());
+  done = true;
+  assertEquals(null, g());
+  done = false;
+  g(); g();
+  %OptimizeFunctionOnNextCall(g);
+  g();
+  assertEquals(6, g());
+  done = true;
+  assertEquals(null, g());
+})();
+
+(function ReduceThrow() {
+  let done = false;
+  let f = (a, current) => {
+    if (done) throw "x";
+    return a + current;
+  };
+  %NeverOptimizeFunction(f);
+  let array = [1,2,3];
+  let g = function() {
+    try {
+      return array.reduce(f);
+    } catch (e) {
+      return null;
+    }
+  }
+  g(); g();
+  let total = g();
+  %OptimizeFunctionOnNextCall(g);
+  g();
+  assertEquals(6, g());
+  done = true;
+  assertEquals(null, g());
+  done = false;
+  g(); g();
+  %OptimizeFunctionOnNextCall(g);
+  g();
+  assertEquals(6, g());
+  done = true;
+  assertEquals(null, g());
+})();
+
+(function ReduceFinally() {
+  let done = false;
+  let f = (a, current) => {
+    if (done) throw "x";
+    return a + current;
+  };
+  let array = [1,2,3];
+  let g = function() {
+    try {
+      return array.reduce(f);
+    } catch (e) {
+    } finally {
+      if (done) return null;
+    }
+  }
+  g(); g();
+  let total = g();
+  %OptimizeFunctionOnNextCall(g);
+  g();
+  assertEquals(6, g());
+  done = true;
+  assertEquals(null, g());
+  done = false;
+  g(); g();
+  %OptimizeFunctionOnNextCall(g);
+  g();
+  assertEquals(6, g());
+  done = true;
+  assertEquals(null, g());
+})();
+
+(function ReduceFinallyNoInline() {
+  let done = false;
+  let f = (a, current) => {
+    if (done) throw "x";
+    return a + current;
+  };
+  %NeverOptimizeFunction(f);
+  let array = [1,2,3];
+  let g = function() {
+    try {
+      return array.reduce(f);
+    } catch (e) {
+    } finally {
+      if (done) return null;
+    }
+  }
+  g(); g();
+  let total = g();
+  %OptimizeFunctionOnNextCall(g);
+  g();
+  assertEquals(6, g());
+  done = true;
+  assertEquals(null, g());
+  done = false;
+  g(); g();
+  %OptimizeFunctionOnNextCall(g);
+  g();
+  assertEquals(6, g());
+  done = true;
+  assertEquals(null, g());
+})();
+
+(function ReduceNonCallableOpt() {
+  let done = false;
+  let f = (a, current) => {
+    return a + current;
+  };
+  let array = [1,2,3];
+  let g = function() {
+    return array.reduce(f);
+  }
+  g(); g();
+  let total = g();
+  %OptimizeFunctionOnNextCall(g);
+  g(); g();
+  assertEquals(6, g());
+  f = null;
+  assertThrows(() => g());
+})();
+
+(function ReduceCatchInlineDeopt() {
+  let done = false;
+  let f = (a, current) => {
+    if (done) {
+      %DeoptimizeNow();
+      throw "x";
+    }
+    return a + current;
+  };
+  let array = [1,2,3];
+  let g = function() {
+    try {
+      return array.reduce(f);
+    } catch (e) {
+      if (done) return null;
+    }
+  }
+  g(); g();
+  let total = g();
+  %OptimizeFunctionOnNextCall(g);
+  g();
+  assertEquals(6, g());
+  done = true;
+  assertEquals(null, g());
+  done = false;
+  g(); g();
+  %OptimizeFunctionOnNextCall(g);
+  g();
+  assertEquals(6, g());
+  done = true;
+  assertEquals(null, g());
+})();
+
+(function ReduceFinallyInlineDeopt() {
+  let done = false;
+  let f = (a, current) => {
+    if (done) {
+      %DeoptimizeNow();
+      throw "x";
+    }
+    return a + current;
+  };
+  let array = [1,2,3];
+  let g = function() {
+    try {
+      return array.reduce(f);
+    } catch (e) {
+    } finally {
+      if (done) return null;
+    }
+  }
+  g(); g();
+  let total = g();
+  %OptimizeFunctionOnNextCall(g);
+  g();
+  assertEquals(6, g());
+  done = true;
+  assertEquals(null, g());
+  done = false;
+  g(); g();
+  %OptimizeFunctionOnNextCall(g);
+  g();
+  assertEquals(6, g());
+  done = true;
+  assertEquals(null, g());
+})();
+
+(function OptimizedReduceRight() {
+  let count = 0;
+  let f = (a,current,i) => a + current * ++count;
+  let g = function(a) {
+    count = 0;
+    return a.reduceRight(f);
+  }
+  let a = [1,2,3,4,5,6,7,8,9,10];
+  g(a); g(a);
+  let total = g(a);
+  %OptimizeFunctionOnNextCall(g);
+  assertEquals(total, g(a));
+})();
+
+(function OptimizedReduceEmpty() {
+  let count = 0;
+  let f = (a,current,i) => a + current * ++count;
+  let g = function(a) {
+    count = 0;
+    return a.reduceRight(f);
+  }
+  let a = [1,2,3,4,5,6,7,8,9,10];
+  g(a); g(a); g(a);
+  %OptimizeFunctionOnNextCall(g);
+  g(a);
+  assertThrows(() => g([]));
+})();
+
+(function OptimizedReduceLazyDeopt() {
+  let deopt = false;
+  let f = (a,current) => { if (deopt) %DeoptimizeNow(); return a + current; };
+  let g = function(a) {
+    return a.reduceRight(f);
+  }
+  let a = [1,2,3,4,5,6,7,8,9,10];
+  g(a); g(a);
+  let total = g(a);
+  %OptimizeFunctionOnNextCall(g);
+  g(a);
+  deopt = true;
+  assertEquals(total, g(a));
+})();
+
+(function OptimizedReduceLazyDeoptMiddleOfIteration() {
+  let deopt = false;
+  let f = (a,current) => {
+    if (current == 6 && deopt) %DeoptimizeNow();
+    return a + current;
+  };
+  let g = function(a) {
+    return a.reduceRight(f);
+  }
+  let a = [11,22,33,45,56,6,77,84,93,101];
+  g(a); g(a);
+  let total = g(a);
+  %OptimizeFunctionOnNextCall(g);
+  g(a);
+  deopt = true;
+  assertEquals(total, g(a));
+})();
+
+(function OptimizedReduceEagerDeoptMiddleOfIteration() {
+  let deopt = false;
+  let array = [11,22,33,45,56,6,77,84,93,101];
+  let f = (a,current) => {
+    if (current == 6 && deopt) {array[9] = 1.5; }
+    return a + current;
+  };
+  let g = function() {
+    return array.reduceRight(f);
+  }
+  g(); g();
+  let total = g();
+  %OptimizeFunctionOnNextCall(g);
+  g();
+  deopt = true;
+  g();
+  deopt = false;
+  array = [11,22,33,45,56,6,77,84,93,101];
+  %OptimizeFunctionOnNextCall(g);
+  g();
+  deopt = true;
+  assertEquals(total, g());
+})();
+
+(function ReduceCatch() {
+  let f = (a,current) => {
+    return a + current;
+  };
+  let g = function() {
+    try {
+      return array.reduceRight(f);
+    } catch (e) {
+    }
+  }
+  g(); g();
+  let total = g();
+  %OptimizeFunctionOnNextCall(g);
+  g();
+  g();
+  assertEquals(total, g());
+})();
+
+(function ReduceThrow() {
+  let done = false;
+  let f = (a, current) => {
+    if (done) throw "x";
+    return a + current;
+  };
+  let array = [1,2,3];
+  let g = function() {
+    try {
+      return array.reduceRight(f);
+    } catch (e) {
+      return null;
+    }
+  }
+  g(); g();
+  let total = g();
+  %OptimizeFunctionOnNextCall(g);
+  g();
+  assertEquals(6, g());
+  done = true;
+  assertEquals(null, g());
+  done = false;
+  g(); g();
+  %OptimizeFunctionOnNextCall(g);
+  g();
+  assertEquals(6, g());
+  done = true;
+  assertEquals(null, g());
+})();
+
+(function ReduceThrow() {
+  let done = false;
+  let f = (a, current) => {
+    if (done) throw "x";
+    return a + current;
+  };
+  %NeverOptimizeFunction(f);
+  let array = [1,2,3];
+  let g = function() {
+    try {
+      return array.reduceRight(f);
+    } catch (e) {
+      return null;
+    }
+  }
+  g(); g();
+  let total = g();
+  %OptimizeFunctionOnNextCall(g);
+  g();
+  assertEquals(6, g());
+  done = true;
+  assertEquals(null, g());
+  done = false;
+  g(); g();
+  %OptimizeFunctionOnNextCall(g);
+  g();
+  assertEquals(6, g());
+  done = true;
+  assertEquals(null, g());
+})();
+
+(function ReduceFinally() {
+  let done = false;
+  let f = (a, current) => {
+    if (done) throw "x";
+    return a + current;
+  };
+  let array = [1,2,3];
+  let g = function() {
+    try {
+      return array.reduceRight(f);
+    } catch (e) {
+    } finally {
+      if (done) return null;
+    }
+  }
+  g(); g();
+  let total = g();
+  %OptimizeFunctionOnNextCall(g);
+  g();
+  assertEquals(6, g());
+  done = true;
+  assertEquals(null, g());
+  done = false;
+  g(); g();
+  %OptimizeFunctionOnNextCall(g);
+  g();
+  assertEquals(6, g());
+  done = true;
+  assertEquals(null, g());
+})();
+
+(function ReduceFinallyNoInline() {
+  let done = false;
+  let f = (a, current) => {
+    if (done) throw "x";
+    return a + current;
+  };
+  %NeverOptimizeFunction(f);
+  let array = [1,2,3];
+  let g = function() {
+    try {
+      return array.reduceRight(f);
+    } catch (e) {
+    } finally {
+      if (done) return null;
+    }
+  }
+  g(); g();
+  let total = g();
+  %OptimizeFunctionOnNextCall(g);
+  g();
+  assertEquals(6, g());
+  done = true;
+  assertEquals(null, g());
+  done = false;
+  g(); g();
+  %OptimizeFunctionOnNextCall(g);
+  g();
+  assertEquals(6, g());
+  done = true;
+  assertEquals(null, g());
+})();
+
+(function ReduceNonCallableOpt() {
+  let done = false;
+  let f = (a, current) => {
+    return a + current;
+  };
+  let array = [1,2,3];
+  let g = function() {
+    return array.reduceRight(f);
+  }
+  g(); g();
+  let total = g();
+  %OptimizeFunctionOnNextCall(g);
+  g(); g();
+  assertEquals(6, g());
+  f = null;
+  assertThrows(() => g());
+})();
+
+(function ReduceCatchInlineDeopt() {
+  let done = false;
+  let f = (a, current) => {
+    if (done) {
+      %DeoptimizeNow();
+      throw "x";
+    }
+    return a + current;
+  };
+  let array = [1,2,3];
+  let g = function() {
+    try {
+      return array.reduceRight(f);
+    } catch (e) {
+      if (done) return null;
+    }
+  }
+  g(); g();
+  let total = g();
+  %OptimizeFunctionOnNextCall(g);
+  g();
+  assertEquals(6, g());
+  done = true;
+  assertEquals(null, g());
+  done = false;
+  g(); g();
+  %OptimizeFunctionOnNextCall(g);
+  g();
+  assertEquals(6, g());
+  done = true;
+  assertEquals(null, g());
+})();
+
+(function ReduceFinallyInlineDeopt() {
+  let done = false;
+  let f = (a, current) => {
+    if (done) {
+      %DeoptimizeNow();
+      throw "x";
+    }
+    return a + current;
+  };
+  let array = [1,2,3];
+  let g = function() {
+    try {
+      return array.reduceRight(f);
+    } catch (e) {
+    } finally {
+      if (done) return null;
+    }
+  }
+  g(); g();
+  let total = g();
+  %OptimizeFunctionOnNextCall(g);
+  g();
+  assertEquals(6, g());
+  done = true;
+  assertEquals(null, g());
+  done = false;
+  g(); g();
+  %OptimizeFunctionOnNextCall(g);
+  g();
+  assertEquals(6, g());
+  done = true;
+  assertEquals(null, g());
+})();
+
+(function ReduceHoleyArrayWithDefaultAccumulator() {
+  var __v_12258 = new Array(10);
+  function __f_3253(a) {
+    let __f_3252 = function(accumulator, currentValue) {
+      return currentValue;
+    }
+    return a.reduce(__f_3252, 13);
+  }
+  assertEquals(13, __f_3253(__v_12258));
+  assertEquals(13, __f_3253(__v_12258));
+  assertEquals(13, __f_3253(__v_12258));
+    %OptimizeFunctionOnNextCall(__f_3253);
+  assertEquals(13, __f_3253(__v_12258));
+})();
+
+(function ReduceRightHoleyArrayWithDefaultAccumulator() {
+  var __v_12258 = new Array(10);
+  function __f_3253(a) {
+    let __f_3252 = function(accumulator, currentValue) {
+      return currentValue;
+    }
+    return a.reduceRight(__f_3252, 13);
+  }
+  assertEquals(13, __f_3253(__v_12258));
+  assertEquals(13, __f_3253(__v_12258));
+  assertEquals(13, __f_3253(__v_12258));
+  %OptimizeFunctionOnNextCall(__f_3253);
+  assertEquals(13, __f_3253(__v_12258));
+})();
+
+(function ReduceHoleyArrayOneElementWithDefaultAccumulator() {
+  var __v_12258 = new Array(10);
+  __v_12258[1] = 5;
+  function __f_3253(a) {
+    let __f_3252 = function(accumulator, currentValue) {
+      return currentValue + accumulator;
+    }
+    return a.reduce(__f_3252, 13);
+  }
+  assertEquals(18, __f_3253(__v_12258));
+  assertEquals(18, __f_3253(__v_12258));
+  assertEquals(18, __f_3253(__v_12258));
+  %OptimizeFunctionOnNextCall(__f_3253);
+  assertEquals(18, __f_3253(__v_12258));
+})();
+
+(function ReduceRightHoleyArrayOneElementWithDefaultAccumulator() {
+  var __v_12258 = new Array(10);
+  __v_12258[1] = 5;
+  function __f_3253(a) {
+    let __f_3252 = function(accumulator, currentValue) {
+      return currentValue + accumulator;
+    }
+    return a.reduceRight(__f_3252, 13);
+  }
+  assertEquals(18, __f_3253(__v_12258));
+  assertEquals(18, __f_3253(__v_12258));
+  assertEquals(18, __f_3253(__v_12258));
+  %OptimizeFunctionOnNextCall(__f_3253);
+  assertEquals(18, __f_3253(__v_12258));
+})();
diff --git a/src/v8/test/mjsunit/array-sort.js b/src/v8/test/mjsunit/array-sort.js
index ddfeffe..acc9611 100644
--- a/src/v8/test/mjsunit/array-sort.js
+++ b/src/v8/test/mjsunit/array-sort.js
@@ -567,3 +567,7 @@
   })()
 
 })();
+
+assertThrows(() => {
+  Array.prototype.sort.call(undefined);
+}, TypeError);
diff --git a/src/v8/test/mjsunit/code-coverage-block-noopt.js b/src/v8/test/mjsunit/code-coverage-block-noopt.js
index 727acea..ef68e03 100644
--- a/src/v8/test/mjsunit/code-coverage-block-noopt.js
+++ b/src/v8/test/mjsunit/code-coverage-block-noopt.js
@@ -2,8 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-// Flags: --allow-natives-syntax --no-always-opt --block-coverage
-// Flags: --harmony-async-iteration --no-opt
+// Flags: --allow-natives-syntax --no-always-opt
+// Flags: --no-opt
 // Files: test/mjsunit/code-coverage-utils.js
 
 %DebugToggleBlockCoverage(true);
diff --git a/src/v8/test/mjsunit/code-coverage-block-opt.js b/src/v8/test/mjsunit/code-coverage-block-opt.js
index 488af8c..e02775b 100644
--- a/src/v8/test/mjsunit/code-coverage-block-opt.js
+++ b/src/v8/test/mjsunit/code-coverage-block-opt.js
@@ -2,8 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-// Flags: --allow-natives-syntax --no-always-opt --block-coverage
-// Flags: --harmony-async-iteration --opt
+// Flags: --allow-natives-syntax --no-always-opt --opt
 // Files: test/mjsunit/code-coverage-utils.js
 
 %DebugToggleBlockCoverage(true);
@@ -40,7 +39,7 @@
 }();                                      // 0400
 `,
 [{"start":52,"end":153,"count":0},
- {"start":127,"end":152,"count":1}]
+ {"start":121,"end":152,"count":1}]
 );
 
 %DebugToggleBlockCoverage(false);
diff --git a/src/v8/test/mjsunit/code-coverage-block.js b/src/v8/test/mjsunit/code-coverage-block.js
index c5e7455..b9d00bc 100644
--- a/src/v8/test/mjsunit/code-coverage-block.js
+++ b/src/v8/test/mjsunit/code-coverage-block.js
@@ -2,8 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-// Flags: --allow-natives-syntax --no-always-opt --block-coverage
-// Flags: --harmony-async-iteration
+// Flags: --allow-natives-syntax --no-always-opt
 // Files: test/mjsunit/code-coverage-utils.js
 
 %DebugToggleBlockCoverage(true);
@@ -39,20 +38,23 @@
 }                                         // 0550
 f(42);                                    // 0600
 f(43);                                    // 0650
+if (true) {                               // 0700
+  const foo = 'bar';                      // 0750
+} else {                                  // 0800
+  const bar = 'foo';                      // 0850
+}                                         // 0900
 `,
-[{"start":0,"end":699,"count":1},
+[{"start":0,"end":949,"count":1},
+ {"start":801,"end":901,"count":0},
  {"start":0,"end":15,"count":11},
  {"start":50,"end":551,"count":2},
  {"start":115,"end":203,"count":1},
  {"start":167,"end":171,"count":0},
- {"start":265,"end":273,"count":1},
- {"start":279,"end":287,"count":1},
- {"start":315,"end":319,"count":1},
- {"start":325,"end":329,"count":1},
+ {"start":265,"end":287,"count":1},
+ {"start":315,"end":329,"count":1},
  {"start":363,"end":367,"count":0},
  {"start":413,"end":417,"count":0},
- {"start":472,"end":476,"count":0}]
-
+ {"start":466,"end":476,"count":0}]
 );
 
 TestCoverage(
@@ -83,7 +85,7 @@
 `,
 [{"start":0,"end":249,"count":1},
  {"start":1,"end":201,"count":1},
- {"start":124,"end":129,"count":0}]
+ {"start":118,"end":129,"count":0}]
 );
 
 TestCoverage(
@@ -110,7 +112,7 @@
  {"start":330,"end":334,"count":0},
  {"start":431,"end":503,"count":12},
  {"start":470,"end":474,"count":4},
- {"start":480,"end":484,"count":8}]
+ {"start":474,"end":484,"count":8}]
 );
 
 TestCoverage(
@@ -524,15 +526,15 @@
 `,
 [{"start":0,"end":849,"count":1},
  {"start":101,"end":801,"count":1},
- {"start":167,"end":172,"count":0},
- {"start":217,"end":222,"count":0},
- {"start":260,"end":265,"count":0},
- {"start":310,"end":372,"count":0},
- {"start":467,"end":472,"count":0},
- {"start":559,"end":564,"count":0},
- {"start":617,"end":680,"count":0},
- {"start":710,"end":715,"count":0},
- {"start":775,"end":780,"count":0}]
+ {"start":165,"end":172,"count":0},
+ {"start":215,"end":222,"count":0},
+ {"start":258,"end":265,"count":0},
+ {"start":308,"end":372,"count":0},
+ {"start":465,"end":472,"count":0},
+ {"start":557,"end":564,"count":0},
+ {"start":615,"end":680,"count":0},
+ {"start":708,"end":715,"count":0},
+ {"start":773,"end":780,"count":0}]
 );
 
 TestCoverage(
@@ -547,9 +549,9 @@
 `,
 [{"start":0,"end":299,"count":1},
  {"start":11,"end":201,"count":3},
- {"start":64,"end":116,"count":1},
- {"start":116,"end":121,"count":0},
- {"start":124,"end":129,"count":1},
+ {"start":64,"end":114,"count":1},
+ {"start":114,"end":121,"count":0},
+ {"start":122,"end":129,"count":1},
  {"start":129,"end":200,"count":0}]
 );
 
@@ -625,9 +627,9 @@
 `,
 [{"start":0,"end":349,"count":1},
  {"start":11,"end":201,"count":7},
- {"start":65,"end":117,"count":1},
- {"start":117,"end":122,"count":0},
- {"start":125,"end":130,"count":1},
+ {"start":65,"end":115,"count":1},
+ {"start":115,"end":122,"count":0},
+ {"start":123,"end":130,"count":1},
  {"start":130,"end":200,"count":0}]
 );
 
@@ -667,4 +669,166 @@
  {"start":61,"end":150,"count":1}]
 );
 
+TestCoverage(
+"LogicalOrExpression assignment",
+`
+const a = true || 99                      // 0000
+function b () {                           // 0050
+  const b = a || 2                        // 0100
+}                                         // 0150
+b()                                       // 0200
+b()                                       // 0250
+`,
+[{"start":0,"end":299,"count":1},
+ {"start":15,"end":20,"count":0},
+ {"start":50,"end":151,"count":2},
+ {"start":114,"end":118,"count":0}]);
+
+TestCoverage(
+"LogicalOrExpression IsTest()",
+`
+true || false                             // 0000
+const a = 99                              // 0050
+a || 50                                   // 0100
+const b = false                           // 0150
+if (b || true) {}                         // 0200
+`,
+[{"start":0,"end":249,"count":1},
+ {"start":5,"end":13,"count":0},
+ {"start":102,"end":107,"count":0}]);
+
+TestCoverage(
+"LogicalAndExpression assignment",
+`
+const a = false && 99                     // 0000
+function b () {                           // 0050
+  const b = a && 2                        // 0100
+}                                         // 0150
+b()                                       // 0200
+b()                                       // 0250
+const c = true && 50                      // 0300
+`,
+[{"start":0,"end":349,"count":1},
+ {"start":16,"end":21,"count":0},
+ {"start":50,"end":151,"count":2},
+ {"start":114,"end":118,"count":0}]);
+
+TestCoverage(
+"LogicalAndExpression IsTest()",
+`
+false && true                             // 0000
+const a = 0                               // 0050
+a && 50                                   // 0100
+const b = true                            // 0150
+if (b && true) {}                         // 0200
+true && true                              // 0250
+`,
+[{"start":0,"end":299,"count":1},
+ {"start":6,"end":13,"count":0},
+ {"start":102,"end":107,"count":0}]);
+
+TestCoverage(
+"NaryLogicalOr assignment",
+`
+const a = true                            // 0000
+const b = false                           // 0050
+const c = false || false || 99            // 0100
+const d = false || true || 99             // 0150
+const e = true || true || 99              // 0200
+const f = b || b || 99                    // 0250
+const g = b || a || 99                    // 0300
+const h = a || a || 99                    // 0350
+const i = a || (b || c) || d              // 0400
+`,
+[{"start":0,"end":449,"count":1},
+ {"start":174,"end":179,"count":0},
+ {"start":215,"end":222,"count":0},
+ {"start":223,"end":228,"count":0},
+ {"start":317,"end":322,"count":0},
+ {"start":362,"end":366,"count":0},
+ {"start":367,"end":372,"count":0},
+ {"start":412,"end":423,"count":0},
+ {"start":424,"end":428,"count":0}]);
+
+TestCoverage(
+"NaryLogicalOr IsTest()",
+`
+const a = true                            // 0000
+const b = false                           // 0050
+false || false || 99                      // 0100
+false || true || 99                       // 0150
+true || true || 99                        // 0200
+b || b || 99                              // 0250
+b || a || 99                              // 0300
+a || a || 99                              // 0350
+`,
+[{"start":0,"end":399,"count":1},
+ {"start":164,"end":169,"count":0},
+ {"start":205,"end":212,"count":0},
+ {"start":213,"end":218,"count":0},
+ {"start":307,"end":312,"count":0},
+ {"start":352,"end":356,"count":0},
+ {"start":357,"end":362,"count":0}]);
+
+TestCoverage(
+"NaryLogicalAnd assignment",
+`
+const a = true                            // 0000
+const b = false                           // 0050
+const c = false && false && 99            // 0100
+const d = false && true && 99             // 0150
+const e = true && true && 99              // 0200
+const f = true && false || true           // 0250
+const g = true || false && true           // 0300
+`,
+[{"start":0,"end":349,"count":1},
+ {"start":116,"end":124,"count":0},
+ {"start":125,"end":130,"count":0},
+ {"start":166,"end":173,"count":0},
+ {"start":174,"end":179,"count":0},
+ {"start":315,"end":331,"count":0}
+]);
+
+TestCoverage(
+"NaryLogicalAnd IsTest()",
+`
+const a = true                            // 0000
+const b = false                           // 0050
+false && false && 99                      // 0100
+false && true && 99                       // 0150
+true && true && 99                        // 0200
+true && false || true                     // 0250
+true || false && true                     // 0300
+false || false || 99 || 55                // 0350
+`,
+[{"start":0,"end":399,"count":1},
+ {"start":106,"end":114,"count":0},
+ {"start":115,"end":120,"count":0},
+ {"start":156,"end":163,"count":0},
+ {"start":164,"end":169,"count":0},
+ {"start":305,"end":321,"count":0},
+ {"start":371,"end":376,"count":0}]);
+
+// see regression: https://bugs.chromium.org/p/chromium/issues/detail?id=785778
+TestCoverage(
+"logical expressions + conditional expressions",
+`
+const a = true                            // 0000
+const b = 99                              // 0050
+const c = false                           // 0100
+const d = ''                              // 0150
+const e = a && (b ? 'left' : 'right')     // 0200
+const f = a || (b ? 'left' : 'right')     // 0250
+const g = c || d ? 'left' : 'right'       // 0300
+const h = a && b && (b ? 'left' : 'right')// 0350
+const i = d || c || (c ? 'left' : 'right')// 0400
+`,
+[{"start":0,"end":449,"count":1},
+ {"start":227,"end":236,"count":0},
+ {"start":262,"end":287,"count":0},
+ {"start":317,"end":325,"count":0},
+ {"start":382,"end":391,"count":0},
+ {"start":423,"end":431,"count":0}
+]);
+
 %DebugToggleBlockCoverage(false);
diff --git a/src/v8/test/mjsunit/code-coverage-precise.js b/src/v8/test/mjsunit/code-coverage-precise.js
index 3d5d5ba..c5569cf 100644
--- a/src/v8/test/mjsunit/code-coverage-precise.js
+++ b/src/v8/test/mjsunit/code-coverage-precise.js
@@ -3,6 +3,7 @@
 // found in the LICENSE file.
 
 // Flags: --allow-natives-syntax --no-always-opt
+// Flags: --no-stress-incremental-marking
 // Files: test/mjsunit/code-coverage-utils.js
 
 // Test precise code coverage.
diff --git a/src/v8/test/mjsunit/compiler-regress-787301.js b/src/v8/test/mjsunit/compiler-regress-787301.js
new file mode 100644
index 0000000..851e22a
--- /dev/null
+++ b/src/v8/test/mjsunit/compiler-regress-787301.js
@@ -0,0 +1,26 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+function opt(b) {
+    let iterator = new Set().values();
+    iterator.x = 0;
+
+    let arr = [iterator, iterator];
+    if (b)
+        return arr.slice();
+}
+
+opt(false);
+opt(false);
+%OptimizeFunctionOnNextCall(opt);
+
+let res = opt(true);
+let a = res[0];
+let b = res[1];
+
+assertTrue(a === b);
+a.x = 7;
+assertEquals(7, b.x);
diff --git a/src/v8/test/mjsunit/compiler/array-multiple-receiver-maps.js b/src/v8/test/mjsunit/compiler/array-multiple-receiver-maps.js
new file mode 100644
index 0000000..2ef0cc3
--- /dev/null
+++ b/src/v8/test/mjsunit/compiler/array-multiple-receiver-maps.js
@@ -0,0 +1,122 @@
+// Copyright 2018 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax --opt --no-always-opt
+
+function runTest(f, message, mkICTraining, deoptArg) {
+  function test(f, message, ictraining, deoptArg) {
+    // Train the call ic to the maps.
+    let t = ictraining;
+
+    // We put the training data into local variables
+    // to ensure their maps are kepts alive. If the
+    // maps die, gc *may* deoptimize {f}, which makes
+    // the test flaky.
+    let t1 = t();
+    let t2 = t();
+    let t3 = t();
+
+    for (let a of t1) {
+      f(a.arr, () => a.el);
+    }
+    for (let a of t2) {
+      f(a.arr, () => a.el);
+    }
+    %OptimizeFunctionOnNextCall(f);
+    message += " trained with" + JSON.stringify(t());
+    if (deoptArg == undefined) {
+      // Make sure the optimized function can handle
+      // all trained maps without deopt.
+      for (let a of t3) {
+        f(a.arr, () => a.el);
+        message += " for args " + JSON.stringify(a);
+        assertOptimized(f, undefined, message + " should have been optimized");
+      }
+    } else {
+      // Trigger deopt, causing no-speculation bit to be set.
+      let a1 = deoptArg;
+      let a2 = deoptArg;
+      message += " for args " + JSON.stringify(a1);
+      f(a1.arr, () => a1.el);
+      assertUnoptimized(f, undefined, message + " should have been unoptimized");
+      %OptimizeFunctionOnNextCall(f);
+      // No speculation should protect against further deopts.
+      f(a2.arr, () => a2.el);
+      assertOptimized(f, undefined,  message + " should have been optimized");
+    }
+  }
+
+  // Get function as a string.
+  var testString = test.toString();
+  // Remove the function header..
+  testString = testString.replace(new RegExp("[^\n]*"), "let f = " + f.toString() + ";");
+  // ..and trailing '}'.
+  testString = testString.replace(new RegExp("[^\n]*$"), "");
+  // Substitute parameters.
+  testString = testString.replace(new RegExp("ictraining", 'g'), mkICTraining.toString());
+  testString = testString.replace(new RegExp("deoptArg", 'g'),
+    deoptArg ? JSON.stringify(deoptArg) : "undefined");
+
+  var modTest = new Function("message", testString);
+  //print(modTest);
+  modTest(message);
+}
+
+let checks = {
+  smiReceiver:
+    { mkTrainingArguments : () => [{arr:[1], el:3}],
+      deoptingArguments   : [{arr:[0.1], el:1}, {arr:[{}], el:1}]
+    },
+  objectReceiver:
+    { mkTrainingArguments : () => [{arr:[{}], el:0.1}],
+      deoptingArguments : []
+    },
+  multipleSmiReceivers:
+    { mkTrainingArguments : () => { let b = [1]; b.x=3; return [{arr:[1], el:3}, {arr:b, el:3}] },
+      deoptingArguments : [{arr:[0.1], el:1}, {arr:[{}], el:1}]
+    },
+  multipleSmiReceiversPackedUnpacked:
+    { mkTrainingArguments : () => { let b = [1]; b[100] = 3; return [{arr:[1], el:3}, {arr:b, el:3}] },
+      deoptingArguments : [{arr:[0.1], el:1}, {arr:[{}], el:1}]
+    },
+  multipleDoubleReceivers:
+    { mkTrainingArguments : () => { let b = [0.1]; b.x=0.3; return [{arr:[0.1], el:0.3}, {arr:b, el:0.3}] },
+      deoptingArguments : [{arr:[{}], el:true}, {arr:[1], el:true}]
+    },
+  multipleDoubleReceiversPackedUnpacked:
+    { mkTrainingArguments : () => { let b = [0.1]; b[100] = 0.3; return [{arr:[0.1], el:0.3}, {arr:b, el:0.3}] },
+      deoptingArguments : [{arr:[{}], el:true}, {arr:[1], el:true}]
+    },
+  multipleMixedReceivers:
+    { mkTrainingArguments : () => { let b = [0.1]; b.x=0.3; return [{arr:[1], el:0.3}, {arr:[{}], el:true}, {arr:b, el:0.3}] },
+      deoptingArguments : []
+    },
+  multipleMixedReceiversPackedUnpacked:
+    { mkTrainingArguments : () => { let b = [0.1]; b[100] = 0.3; return [{arr:[1], el:0.3}, {arr:[{}], el:true}, {arr:b, el:0.3}] },
+      deoptingArguments : []
+    },
+};
+
+const functions = {
+  push_reliable: (a,g) => { let b = g(); return a.push(2, b); },
+  push_unreliable: (a,g) => { return a.push(2, g()); },
+  pop_reliable: (a,g) => { let b = g(); return a.pop(2, b); },
+  pop_unreliable: (a,g) => { return a.pop(2, g()); },
+  shift_reliable: (a,g) => { let b = g(); return a.shift(2, b); },
+  shift_unreliable: (a,g) => { return a.shift(2, g()); }
+}
+
+Object.keys(checks).forEach(
+  key => {
+    let check = checks[key];
+
+    for (fnc in functions) {
+      runTest(functions[fnc], "test-reliable-" + key, check.mkTrainingArguments);
+      // Test each deopting arg separately.
+      for (let deoptArg of check.deoptingArguments) {
+        runTest(functions[fnc], "testDeopt-reliable-" + key, check.mkTrainingArguments, deoptArg);
+      }
+    }
+  }
+);
diff --git a/src/v8/test/mjsunit/compiler/array-subclass.js b/src/v8/test/mjsunit/compiler/array-subclass.js
new file mode 100644
index 0000000..d20b669
--- /dev/null
+++ b/src/v8/test/mjsunit/compiler/array-subclass.js
@@ -0,0 +1,396 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+// Test Array subclass default constructor with no parameters.
+(function() {
+  const A = class A extends Array { };
+
+  function foo() { return new A; }
+
+  assertInstanceof(foo(), A);
+  assertEquals(0, foo().length);
+  assertInstanceof(foo(), A);
+  assertEquals(0, foo().length);
+  %OptimizeFunctionOnNextCall(foo);
+  assertInstanceof(foo(), A);
+  assertEquals(0, foo().length);
+})();
+
+// Test Array subclass default constructor with small constant length.
+(function() {
+  const A = class A extends Array { };
+  const L = 4;
+
+  function foo() { return new A(L); }
+
+  assertInstanceof(foo(), A);
+  assertEquals(L, foo().length);
+  assertInstanceof(foo(), A);
+  assertEquals(L, foo().length);
+  %OptimizeFunctionOnNextCall(foo);
+  assertInstanceof(foo(), A);
+  assertEquals(L, foo().length);
+})();
+
+// Test Array subclass default constructor with large constant length.
+(function() {
+  const A = class A extends Array { };
+  const L = 1024 * 1024;
+
+  function foo() { return new A(L); }
+
+  assertInstanceof(foo(), A);
+  assertEquals(L, foo().length);
+  assertInstanceof(foo(), A);
+  assertEquals(L, foo().length);
+  %OptimizeFunctionOnNextCall(foo);
+  assertInstanceof(foo(), A);
+  assertEquals(L, foo().length);
+})();
+
+// Test Array subclass default constructor with known boolean.
+(function() {
+  const A = class A extends Array { };
+
+  function foo() { return new A(true); }
+
+  assertInstanceof(foo(), A);
+  assertEquals(1, foo().length);
+  assertEquals(true, foo()[0]);
+  assertInstanceof(foo(), A);
+  assertEquals(1, foo().length);
+  assertEquals(true, foo()[0]);
+  %OptimizeFunctionOnNextCall(foo);
+  assertInstanceof(foo(), A);
+  assertEquals(1, foo().length);
+  assertEquals(true, foo()[0]);
+})();
+
+// Test Array subclass default constructor with known string.
+(function() {
+  const A = class A extends Array { };
+
+  function foo() { return new A(""); }
+
+  assertInstanceof(foo(), A);
+  assertEquals(1, foo().length);
+  assertEquals("", foo()[0]);
+  assertInstanceof(foo(), A);
+  assertEquals(1, foo().length);
+  assertEquals("", foo()[0]);
+  %OptimizeFunctionOnNextCall(foo);
+  assertInstanceof(foo(), A);
+  assertEquals(1, foo().length);
+  assertEquals("", foo()[0]);
+})();
+
+// Test Array subclass default constructor with known object.
+(function() {
+  const A = class A extends Array { };
+  const O = {foo: "foo"};
+
+  function foo() { return new A(O); }
+
+  assertInstanceof(foo(), A);
+  assertEquals(1, foo().length);
+  assertSame(O, foo()[0]);
+  assertInstanceof(foo(), A);
+  assertEquals(1, foo().length);
+  assertSame(O, foo()[0]);
+  %OptimizeFunctionOnNextCall(foo);
+  assertInstanceof(foo(), A);
+  assertEquals(1, foo().length);
+  assertSame(O, foo()[0]);
+})();
+
+// Test Array subclass default constructor with known small integers.
+(function() {
+  const A = class A extends Array { };
+
+  function foo() { return new A(1, 2, 3); }
+
+  assertInstanceof(foo(), A);
+  assertEquals(3, foo().length);
+  assertEquals(1, foo()[0]);
+  assertEquals(2, foo()[1]);
+  assertEquals(3, foo()[2]);
+  %OptimizeFunctionOnNextCall(foo);
+  assertInstanceof(foo(), A);
+  assertEquals(3, foo().length);
+  assertEquals(1, foo()[0]);
+  assertEquals(2, foo()[1]);
+  assertEquals(3, foo()[2]);
+})();
+
+// Test Array subclass default constructor with known numbers.
+(function() {
+  const A = class A extends Array { };
+
+  function foo() { return new A(1.1, 2.2, 3.3); }
+
+  assertInstanceof(foo(), A);
+  assertEquals(3, foo().length);
+  assertEquals(1.1, foo()[0]);
+  assertEquals(2.2, foo()[1]);
+  assertEquals(3.3, foo()[2]);
+  %OptimizeFunctionOnNextCall(foo);
+  assertInstanceof(foo(), A);
+  assertEquals(3, foo().length);
+  assertEquals(1.1, foo()[0]);
+  assertEquals(2.2, foo()[1]);
+  assertEquals(3.3, foo()[2]);
+})();
+
+// Test Array subclass default constructor with known strings.
+(function() {
+  const A = class A extends Array { };
+
+  function foo() { return new A("a", "b", "c", "d"); }
+
+  assertInstanceof(foo(), A);
+  assertEquals(4, foo().length);
+  assertEquals("a", foo()[0]);
+  assertEquals("b", foo()[1]);
+  assertEquals("c", foo()[2]);
+  assertEquals("d", foo()[3]);
+  %OptimizeFunctionOnNextCall(foo);
+  assertInstanceof(foo(), A);
+  assertEquals(4, foo().length);
+  assertEquals("a", foo()[0]);
+  assertEquals("b", foo()[1]);
+  assertEquals("c", foo()[2]);
+  assertEquals("d", foo()[3]);
+})();
+
+// Test Array subclass constructor with no parameters.
+(function() {
+  const A = class A extends Array {
+    constructor() {
+      super();
+      this.bar = 1;
+    }
+  };
+
+  function foo() { return new A; }
+
+  assertInstanceof(foo(), A);
+  assertEquals(0, foo().length);
+  assertEquals(1, foo().bar);
+  assertInstanceof(foo(), A);
+  assertEquals(0, foo().length);
+  assertEquals(1, foo().bar);
+  %OptimizeFunctionOnNextCall(foo);
+  assertInstanceof(foo(), A);
+  assertEquals(0, foo().length);
+  assertEquals(1, foo().bar);
+})();
+
+// Test Array subclass constructor with small constant length.
+(function() {
+  const A = class A extends Array {
+    constructor(n) {
+      super(n);
+      this.bar = 1;
+    }
+  };
+  const L = 4;
+
+  function foo() { return new A(L); }
+
+  assertInstanceof(foo(), A);
+  assertEquals(L, foo().length);
+  assertEquals(1, foo().bar);
+  assertInstanceof(foo(), A);
+  assertEquals(L, foo().length);
+  assertEquals(1, foo().bar);
+  %OptimizeFunctionOnNextCall(foo);
+  assertInstanceof(foo(), A);
+  assertEquals(L, foo().length);
+  assertEquals(1, foo().bar);
+})();
+
+// Test Array subclass constructor with large constant length.
+(function() {
+  const A = class A extends Array {
+    constructor(n) {
+      super(n);
+      this.bar = 1;
+    }
+  };
+  const L = 1024 * 1024;
+
+  function foo() { return new A(L); }
+
+  assertInstanceof(foo(), A);
+  assertEquals(L, foo().length);
+  assertEquals(1, foo().bar);
+  assertInstanceof(foo(), A);
+  assertEquals(L, foo().length);
+  assertEquals(1, foo().bar);
+  %OptimizeFunctionOnNextCall(foo);
+  assertInstanceof(foo(), A);
+  assertEquals(L, foo().length);
+  assertEquals(1, foo().bar);
+})();
+
+// Test Array subclass constructor with known boolean.
+(function() {
+  const A = class A extends Array {
+    constructor(n) {
+      super(n);
+      this.bar = 1;
+    }
+  };
+
+  function foo() { return new A(true); }
+
+  assertInstanceof(foo(), A);
+  assertEquals(1, foo().length);
+  assertEquals(true, foo()[0]);
+  assertEquals(1, foo().bar);
+  assertInstanceof(foo(), A);
+  assertEquals(1, foo().length);
+  assertEquals(true, foo()[0]);
+  assertEquals(1, foo().bar);
+  %OptimizeFunctionOnNextCall(foo);
+  assertInstanceof(foo(), A);
+  assertEquals(1, foo().length);
+  assertEquals(true, foo()[0]);
+  assertEquals(1, foo().bar);
+})();
+
+// Test Array subclass constructor with known string.
+(function() {
+  const A = class A extends Array {
+    constructor(n) {
+      super(n);
+      this.bar = 1;
+    }
+  };
+
+  function foo() { return new A(""); }
+
+  assertInstanceof(foo(), A);
+  assertEquals(1, foo().length);
+  assertEquals("", foo()[0]);
+  assertEquals(1, foo().bar);
+  assertInstanceof(foo(), A);
+  assertEquals(1, foo().length);
+  assertEquals("", foo()[0]);
+  assertEquals(1, foo().bar);
+  %OptimizeFunctionOnNextCall(foo);
+  assertInstanceof(foo(), A);
+  assertEquals(1, foo().length);
+  assertEquals("", foo()[0]);
+  assertEquals(1, foo().bar);
+})();
+
+// Test Array subclass constructor with known object.
+(function() {
+  const A = class A extends Array {
+    constructor(n) {
+      super(n);
+      this.bar = 1;
+    }
+  };
+  const O = {foo: "foo"};
+
+  function foo() { return new A(O); }
+
+  assertInstanceof(foo(), A);
+  assertEquals(1, foo().length);
+  assertSame(O, foo()[0]);
+  assertEquals(1, foo().bar);
+  assertInstanceof(foo(), A);
+  assertEquals(1, foo().length);
+  assertSame(O, foo()[0]);
+  assertEquals(1, foo().bar);
+  %OptimizeFunctionOnNextCall(foo);
+  assertInstanceof(foo(), A);
+  assertEquals(1, foo().length);
+  assertSame(O, foo()[0]);
+  assertEquals(1, foo().bar);
+})();
+
+// Test Array subclass constructor with known small integers.
+(function() {
+  const A = class A extends Array {
+    constructor(x, y, z) {
+      super(x, y, z);
+      this.bar = 1;
+    }
+  };
+
+  function foo() { return new A(1, 2, 3); }
+
+  assertInstanceof(foo(), A);
+  assertEquals(3, foo().length);
+  assertEquals(1, foo()[0]);
+  assertEquals(2, foo()[1]);
+  assertEquals(3, foo()[2]);
+  assertEquals(1, foo().bar);
+  %OptimizeFunctionOnNextCall(foo);
+  assertInstanceof(foo(), A);
+  assertEquals(3, foo().length);
+  assertEquals(1, foo()[0]);
+  assertEquals(2, foo()[1]);
+  assertEquals(3, foo()[2]);
+  assertEquals(1, foo().bar);
+})();
+
+// Test Array subclass constructor with known numbers.
+(function() {
+  const A = class A extends Array {
+    constructor(x, y, z) {
+      super(x, y, z);
+      this.bar = 1;
+    }
+  };
+
+  function foo() { return new A(1.1, 2.2, 3.3); }
+
+  assertInstanceof(foo(), A);
+  assertEquals(3, foo().length);
+  assertEquals(1.1, foo()[0]);
+  assertEquals(2.2, foo()[1]);
+  assertEquals(3.3, foo()[2]);
+  assertEquals(1, foo().bar);
+  %OptimizeFunctionOnNextCall(foo);
+  assertInstanceof(foo(), A);
+  assertEquals(3, foo().length);
+  assertEquals(1.1, foo()[0]);
+  assertEquals(2.2, foo()[1]);
+  assertEquals(3.3, foo()[2]);
+  assertEquals(1, foo().bar);
+})();
+
+// Test Array subclass constructor with known strings.
+(function() {
+  const A = class A extends Array {
+    constructor(a, b, c, d) {
+      super(a, b, c, d);
+      this.bar = 1;
+    }
+  };
+
+  function foo() { return new A("a", "b", "c", "d"); }
+
+  assertInstanceof(foo(), A);
+  assertEquals(4, foo().length);
+  assertEquals("a", foo()[0]);
+  assertEquals("b", foo()[1]);
+  assertEquals("c", foo()[2]);
+  assertEquals("d", foo()[3]);
+  assertEquals(1, foo().bar);
+  %OptimizeFunctionOnNextCall(foo);
+  assertInstanceof(foo(), A);
+  assertEquals(4, foo().length);
+  assertEquals("a", foo()[0]);
+  assertEquals("b", foo()[1]);
+  assertEquals("c", foo()[2]);
+  assertEquals("d", foo()[3]);
+  assertEquals(1, foo().bar);
+})();
diff --git a/src/v8/test/mjsunit/compiler/deopt-array-builtins.js b/src/v8/test/mjsunit/compiler/deopt-array-builtins.js
new file mode 100644
index 0000000..b737b17
--- /dev/null
+++ b/src/v8/test/mjsunit/compiler/deopt-array-builtins.js
@@ -0,0 +1,148 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax --opt
+
+/* Test MapCheck behavior */
+
+(function testForEachMapCheck() {
+    function f(v,n,o) {
+        Object.freeze(o);
+    }
+    function g() {
+        [1,2,3].forEach(f);
+    }
+    g();
+    g();
+    %OptimizeFunctionOnNextCall(g);
+    g();
+    %OptimizeFunctionOnNextCall(g);
+    g();
+    assertOptimized(g);
+})();
+
+
+(function testFindMapCheck() {
+    function f(v,n,o) {
+        Object.freeze(o);
+        return false;
+    }
+    function g() {
+        [1,2,3].find(f);
+    }
+    g();
+    g();
+    %OptimizeFunctionOnNextCall(g);
+    g();
+    %OptimizeFunctionOnNextCall(g);
+    g();
+    assertOptimized(g);
+})();
+
+(function testMapMapCheck() {
+    function f(v,n,o) {
+        Object.freeze(o);
+        return false;
+    }
+    function g() {
+        [1,2,3].map(f);
+    }
+    g();
+    g();
+    %OptimizeFunctionOnNextCall(g);
+    g();
+    %OptimizeFunctionOnNextCall(g);
+    g();
+    assertOptimized(g);
+})();
+
+(function testFilterMapCheck() {
+    function f(v,n,o) {
+        Object.freeze(o);
+        return true;
+    }
+    function g() {
+        [1,2,3].filter(f);
+    }
+    g();
+    g();
+    %OptimizeFunctionOnNextCall(g);
+    g();
+    %OptimizeFunctionOnNextCall(g);
+    g();
+    assertOptimized(g);
+})();
+
+
+/* Test CheckBounds behavior */
+
+(function testForEachCheckBounds() {
+    function f(v,n,o) {
+        o.length=2;
+    }
+    function g() {
+        [1,2,3].forEach(f);
+    }
+    g();
+    g();
+    %OptimizeFunctionOnNextCall(g);
+    g();
+    %OptimizeFunctionOnNextCall(g);
+    g();
+    assertOptimized(g);
+})();
+
+
+(function testFindCheckBounds() {
+    function f(v,n,o) {
+        o.length=2;
+        return false;
+    }
+    function g() {
+        [1,2,3].find(f);
+    }
+    g();
+    g();
+    %OptimizeFunctionOnNextCall(g);
+    g();
+    %OptimizeFunctionOnNextCall(g);
+    g();
+    assertOptimized(g);
+})();
+
+(function testMapCheckBounds() {
+    function f(v,n,o) {
+        o.length=2;
+        return false;
+    }
+    function g() {
+        [1,2,3].map(f);
+    }
+    g();
+    g();
+    %OptimizeFunctionOnNextCall(g);
+    g();
+    %OptimizeFunctionOnNextCall(g);
+    g();
+    assertOptimized(g);
+})();
+
+(function testFilterCheckBounds() {
+    function f(v,n,o) {
+        o.length = 2;
+        return true;
+    }
+    function g() {
+        [1,2,3].filter(f);
+    }
+    g();
+    g();
+    %OptimizeFunctionOnNextCall(g);
+    g();
+    g();
+    %OptimizeFunctionOnNextCall(g);
+    g();
+    g();
+    assertOptimized(g);
+})();
diff --git a/src/v8/test/mjsunit/compiler/deopt-array-push.js b/src/v8/test/mjsunit/compiler/deopt-array-push.js
new file mode 100644
index 0000000..e34d99a
--- /dev/null
+++ b/src/v8/test/mjsunit/compiler/deopt-array-push.js
@@ -0,0 +1,97 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax --opt
+
+(function test() {
+  function foo(a) { a.push(a.length = 2); }
+
+  foo([1]);
+  foo([1]);
+  %OptimizeFunctionOnNextCall(foo);
+  foo([1]);
+  %OptimizeFunctionOnNextCall(foo);
+  foo([1]);
+  assertOptimized(foo);
+})();
+
+(function testElementTypeCheckSmi() {
+  function foo(a) { a.push('a'); }
+
+  foo([1]);
+  foo([1]);
+  %OptimizeFunctionOnNextCall(foo);
+  foo([1]);
+  %OptimizeFunctionOnNextCall(foo);
+  foo([1]);
+  assertOptimized(foo);
+})();
+
+(function testElementTypeCheckDouble() {
+  function foo(a) { a.push('a'); }
+
+  foo([0.3413312]);
+  foo([0.3413312]);
+  %OptimizeFunctionOnNextCall(foo);
+  foo([0.3413312]);
+  %OptimizeFunctionOnNextCall(foo);
+  foo([0.3413312]);
+  assertOptimized(foo);
+})();
+(function test() {
+  function bar(a) { a.x = 2 };
+  %NeverOptimizeFunction(bar);
+  function foo(a) { a.push(bar(a)); }
+
+  foo(["1"]);
+  foo(["1"]);
+  %OptimizeFunctionOnNextCall(foo);
+  foo(["1"]);
+  %OptimizeFunctionOnNextCall(foo);
+  foo(["1"]);
+  assertOptimized(foo);
+})();
+
+(function test() {
+  function foo(a) { a.push(a.length = 2); }
+
+  foo([0.34234]);
+  foo([0.34234]);
+  %OptimizeFunctionOnNextCall(foo);
+  foo([0.34234]);
+  %OptimizeFunctionOnNextCall(foo);
+  foo([0.34234]);
+  assertOptimized(foo);
+})();
+
+(function test() {
+  const N = 128 * 1024;
+
+  function foo(a) { a.push(1); }
+
+  foo(new Array(N));
+  foo(new Array(N));
+  %OptimizeFunctionOnNextCall(foo);
+  foo(new Array(N));
+  %OptimizeFunctionOnNextCall(foo);
+  foo(new Array(N));
+  assertOptimized(foo);
+})();
+
+(function test() {
+  function mkArray() {
+    const N = 128 * 1024;
+    let a = [0.1];
+    a.length = N;
+    return a;
+  }
+  function foo(a) { a.push(0.23441233123); }
+  foo(mkArray());
+  foo(mkArray());
+  %OptimizeFunctionOnNextCall(foo);
+  foo(mkArray());
+  %OptimizeFunctionOnNextCall(foo);
+  foo(mkArray());
+  assertOptimized(foo);
+})();
diff --git a/src/v8/test/mjsunit/compiler/deopt-string-outofbounds.js b/src/v8/test/mjsunit/compiler/deopt-string-outofbounds.js
index ebdcc6c..e5ec075 100644
--- a/src/v8/test/mjsunit/compiler/deopt-string-outofbounds.js
+++ b/src/v8/test/mjsunit/compiler/deopt-string-outofbounds.js
@@ -29,3 +29,27 @@
   foo(5);
   assertOptimized(foo);
 })();
+
+(function() {
+  function foo(s) { return s[5]; }
+
+  foo(s);
+  foo(s);
+  %OptimizeFunctionOnNextCall(foo);
+  foo(s);
+  %OptimizeFunctionOnNextCall(foo);
+  foo(s);
+  assertOptimized(foo);
+})();
+
+(function() {
+  function foo(s, i) { return s[i]; }
+
+  foo(s, 0);
+  foo(s, 1);
+  %OptimizeFunctionOnNextCall(foo);
+  foo(s, 5);
+  %OptimizeFunctionOnNextCall(foo);
+  foo(s, 5);
+  assertOptimized(foo);
+})();
diff --git a/src/v8/test/mjsunit/compiler/escape-analysis-13.js b/src/v8/test/mjsunit/compiler/escape-analysis-13.js
index fca4da6..5f281aa 100644
--- a/src/v8/test/mjsunit/compiler/escape-analysis-13.js
+++ b/src/v8/test/mjsunit/compiler/escape-analysis-13.js
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-// Flags: --allow-natives-syntax --turbo-escape --turbo-experimental
+// Flags: --allow-natives-syntax --turbo-escape
 
 function f() {
   var x = {};
diff --git a/src/v8/test/mjsunit/compiler/escape-analysis-15.js b/src/v8/test/mjsunit/compiler/escape-analysis-15.js
index 4f9a40a..1960d74 100644
--- a/src/v8/test/mjsunit/compiler/escape-analysis-15.js
+++ b/src/v8/test/mjsunit/compiler/escape-analysis-15.js
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-// Flags: --allow-natives-syntax --turbo-escape --turbo-experimental --no-turbo-load-elimination
+// Flags: --allow-natives-syntax --turbo-escape --no-turbo-load-elimination
 
 function f(i) {
   var o1 = {a: 1, b: 2};
diff --git a/src/v8/test/mjsunit/compiler/escape-analysis-phi-type.js b/src/v8/test/mjsunit/compiler/escape-analysis-phi-type.js
index 806b09b..9d033b9 100644
--- a/src/v8/test/mjsunit/compiler/escape-analysis-phi-type.js
+++ b/src/v8/test/mjsunit/compiler/escape-analysis-phi-type.js
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-// Flags: --allow-natives-syntax --turbo-escape --turbo-experimental --no-turbo-loop-peeling
+// Flags: --allow-natives-syntax --turbo-escape --no-turbo-loop-peeling
 
 function f(x) {
   var o = {a : 0};
diff --git a/src/v8/test/mjsunit/compiler/function-bind.js b/src/v8/test/mjsunit/compiler/function-bind.js
index 11337b4..cc9451e 100644
--- a/src/v8/test/mjsunit/compiler/function-bind.js
+++ b/src/v8/test/mjsunit/compiler/function-bind.js
@@ -75,3 +75,212 @@
   assertEquals(0, foo(0, 1).length);
   assertEquals("bound bar", foo(1, 2).name)
 })();
+
+(function() {
+  function bar(f) { return f(1); }
+
+  function foo(g) { return bar(g.bind(null, 2)); }
+
+  assertEquals(3, foo((x, y) => x + y));
+  assertEquals(1, foo((x, y) => x - y));
+  %OptimizeFunctionOnNextCall(foo);
+  assertEquals(3, foo((x, y) => x + y));
+  assertEquals(1, foo((x, y) => x - y));
+})();
+
+(function() {
+  function add(x, y) { return x + y; }
+
+  function foo(a) { return a.map(add.bind(null, 1)); }
+
+  assertEquals([1, 2, 3], foo([0, 1, 2]));
+  assertEquals([2, 3, 4], foo([1, 2, 3]));
+  %OptimizeFunctionOnNextCall(foo);
+  assertEquals([1, 2, 3], foo([0, 1, 2]));
+  assertEquals([2, 3, 4], foo([1, 2, 3]));
+})();
+
+(function() {
+  const add = (x, y) => x + y;
+  const inc = add.bind(null, 1);
+
+  function foo(inc) { return inc(1); }
+
+  assertEquals(2, foo(inc));
+  assertEquals(2, foo(inc));
+  %OptimizeFunctionOnNextCall(foo);
+  assertEquals(2, foo(inc));
+})();
+
+(function() {
+  const A = class A {};
+  const B = A.bind();
+
+  function foo() { return new B; }
+
+  assertInstanceof(foo(), A);
+  assertInstanceof(foo(), B);
+  %OptimizeFunctionOnNextCall(foo);
+  assertInstanceof(foo(), A);
+  assertInstanceof(foo(), B);
+})();
+
+(function() {
+  const A = class A {
+    constructor(x, y, z) {
+      this.x = x;
+      this.y = y;
+      this.z = z;
+    }
+  };
+  const B = A.bind(null, 1, 2);
+
+  function foo(z) { return new B(z); }
+
+  assertEquals(1, foo(3).x);
+  assertEquals(2, foo(3).y);
+  assertEquals(3, foo(3).z);
+  %OptimizeFunctionOnNextCall(foo);
+  assertEquals(1, foo(3).x);
+  assertEquals(2, foo(3).y);
+  assertEquals(3, foo(3).z);
+})();
+
+(function() {
+  const A = class A {};
+
+  function foo() {
+    const B = A.bind();
+    return new B;
+  }
+
+  assertInstanceof(foo(), A);
+  assertInstanceof(foo(), A);
+  %OptimizeFunctionOnNextCall(foo);
+  assertInstanceof(foo(), A);
+})();
+
+(function() {
+  const A = class A {
+    constructor(x, y, z) {
+      this.x = x;
+      this.y = y;
+      this.z = z;
+    }
+  };
+
+  function foo(z) {
+    const B = A.bind(null, 1, 2);
+    return new B(z);
+  }
+
+  assertEquals(1, foo(3).x);
+  assertEquals(2, foo(3).y);
+  assertEquals(3, foo(3).z);
+  %OptimizeFunctionOnNextCall(foo);
+  assertEquals(1, foo(3).x);
+  assertEquals(2, foo(3).y);
+  assertEquals(3, foo(3).z);
+})();
+
+(function() {
+  const A = class A {};
+  const B = A.bind();
+
+  function foo(B) {
+    return new B;
+  }
+
+  assertInstanceof(foo(B), A);
+  assertInstanceof(foo(B), A);
+  %OptimizeFunctionOnNextCall(foo);
+  assertInstanceof(foo(B), A);
+})();
+
+(function() {
+  const A = class A {
+    constructor(x, y, z) {
+      this.x = x;
+      this.y = y;
+      this.z = z;
+    }
+  };
+  const B = A.bind(null, 1, 2);
+
+  function foo(B, z) {
+    return new B(z);
+  }
+
+  assertEquals(1, foo(B, 3).x);
+  assertEquals(2, foo(B, 3).y);
+  assertEquals(3, foo(B, 3).z);
+  %OptimizeFunctionOnNextCall(foo);
+  assertEquals(1, foo(B, 3).x);
+  assertEquals(2, foo(B, 3).y);
+  assertEquals(3, foo(B, 3).z);
+})();
+
+(function() {
+  const A = class A {
+    constructor(value) {
+      this.value = value;
+    }
+  };
+  const C = class C extends A {
+    constructor() { super(1); }
+  };
+  const B = C.__proto__ = A.bind(null, 1);
+
+  assertInstanceof(new C(), A);
+  assertInstanceof(new C(), B);
+  assertInstanceof(new C(), C);
+  assertEquals(1, new C().value);
+  %OptimizeFunctionOnNextCall(C);
+  assertInstanceof(new C(), A);
+  assertInstanceof(new C(), B);
+  assertInstanceof(new C(), C);
+  assertEquals(1, new C().value);
+})();
+
+(function() {
+  const A = class A {};
+  const B = A.bind();
+
+  function bar(B, ...args) {
+    return new B(...args);
+  }
+  function foo(B) {
+    return bar(B)
+  }
+
+  assertInstanceof(foo(B), A);
+  assertInstanceof(foo(B), A);
+  %OptimizeFunctionOnNextCall(foo);
+  assertInstanceof(foo(B), A);
+})();
+
+(function() {
+  const A = class A {
+    constructor(x, y, z) {
+      this.x = x;
+      this.y = y;
+      this.z = z;
+    }
+  };
+  const B = A.bind(null, 1, 2);
+
+  function bar(B, ...args) {
+    return new B(...args);
+  }
+  function foo(B, z) {
+    return bar(B, z);
+  }
+
+  assertEquals(1, foo(B, 3).x);
+  assertEquals(2, foo(B, 3).y);
+  assertEquals(3, foo(B, 3).z);
+  %OptimizeFunctionOnNextCall(foo);
+  assertEquals(1, foo(B, 3).x);
+  assertEquals(2, foo(B, 3).y);
+  assertEquals(3, foo(B, 3).z);
+})();
diff --git a/src/v8/test/mjsunit/compiler/instanceof.js b/src/v8/test/mjsunit/compiler/instanceof.js
index f6a364e..67127cf 100644
--- a/src/v8/test/mjsunit/compiler/instanceof.js
+++ b/src/v8/test/mjsunit/compiler/instanceof.js
@@ -143,3 +143,21 @@
   %OptimizeFunctionOnNextCall(foo);
   assertTrue(foo());
 })();
+
+(function() {
+  class B extends A {};
+
+  function makeFoo() {
+    return function foo(b) {
+      return b instanceof B;
+    }
+  }
+  makeFoo();
+  const foo = makeFoo();
+
+  assertTrue(foo(new B));
+  assertFalse(foo(new A));
+  %OptimizeFunctionOnNextCall(foo);
+  assertTrue(foo(new B));
+  assertFalse(foo(new A));
+})();
diff --git a/src/v8/test/mjsunit/compiler/materialize-dictionary-properties.js b/src/v8/test/mjsunit/compiler/materialize-dictionary-properties.js
new file mode 100644
index 0000000..5838a83
--- /dev/null
+++ b/src/v8/test/mjsunit/compiler/materialize-dictionary-properties.js
@@ -0,0 +1,18 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+function f() {
+  // Create a non-escaping object.
+  var o = Object.create(null);
+  %DeoptimizeNow();
+  // Keep it alive.
+  return o ? 1 : 0;
+}
+
+f();
+f();
+%OptimizeFunctionOnNextCall(f);
+assertEquals(1, f());
diff --git a/src/v8/test/mjsunit/compiler/materialize-mutable-heap-number.js b/src/v8/test/mjsunit/compiler/materialize-mutable-heap-number.js
new file mode 100644
index 0000000..b6b99af
--- /dev/null
+++ b/src/v8/test/mjsunit/compiler/materialize-mutable-heap-number.js
@@ -0,0 +1,22 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+function C() {}
+%CompleteInobjectSlackTracking(new C());
+
+function f() {
+  // Create a non-escaping object.
+  var o = new C();
+  // Add an out-of-object double property.
+  o.x = 0.5;
+  %DeoptimizeNow();
+  return o.x + 0.25;
+}
+
+f();
+f();
+%OptimizeFunctionOnNextCall(f);
+assertEquals(0.75, f());
diff --git a/src/v8/test/mjsunit/compiler/math-ceil.js b/src/v8/test/mjsunit/compiler/math-ceil.js
new file mode 100644
index 0000000..f91348b
--- /dev/null
+++ b/src/v8/test/mjsunit/compiler/math-ceil.js
@@ -0,0 +1,39 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+// Ensure that the typing rule for Math.ceil deals correctly with
+// inputs in the range (-1.0,0.0), which are mapped to -0.
+(function() {
+  function foo(x) {
+    // Arrange x such that TurboFan infers type PlainNumber \/ NaN.
+    x = +x;
+    x = Math.abs(x) - 1.0;
+    return Object.is(-0, Math.ceil(x));
+  }
+
+  assertFalse(foo(1.5));
+  assertTrue(foo(0.5));
+  %OptimizeFunctionOnNextCall(foo);
+  assertFalse(foo(1.5));
+  assertTrue(foo(0.5));
+})();
+
+// Ensure that the typing rule for Math.ceil deals correctly with
+// NaN inputs, which are mapped to NaN.
+(function() {
+  function foo(x) {
+    // Arrange x such that TurboFan infers type PlainNumber \/ NaN.
+    x = +x;
+    x = Math.abs(x) - 1.0;
+    return Object.is(NaN, Math.ceil(x));
+  }
+
+  assertFalse(foo(1.5));
+  assertTrue(foo(NaN));
+  %OptimizeFunctionOnNextCall(foo);
+  assertFalse(foo(1.5));
+  assertTrue(foo(NaN));
+})();
diff --git a/src/v8/test/mjsunit/compiler/math-round.js b/src/v8/test/mjsunit/compiler/math-round.js
new file mode 100644
index 0000000..c42bf8f
--- /dev/null
+++ b/src/v8/test/mjsunit/compiler/math-round.js
@@ -0,0 +1,39 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+// Ensure that the typing rule for Math.round deals correctly with
+// inputs in the range [-0.5,0.0), which are mapped to -0.
+(function() {
+  function foo(x) {
+    // Arrange x such that TurboFan infers type PlainNumber \/ NaN.
+    x = +x;
+    x = Math.abs(x) - 1.0;
+    return Object.is(-0, Math.round(x));
+  }
+
+  assertFalse(foo(1.5));
+  assertTrue(foo(0.5));
+  %OptimizeFunctionOnNextCall(foo);
+  assertFalse(foo(1.5));
+  assertTrue(foo(0.5));
+})();
+
+// Ensure that the typing rule for Math.round deals correctly with
+// NaN inputs, which are mapped to NaN.
+(function() {
+  function foo(x) {
+    // Arrange x such that TurboFan infers type PlainNumber \/ NaN.
+    x = +x;
+    x = Math.abs(x) - 1.0;
+    return Object.is(NaN, Math.round(x));
+  }
+
+  assertFalse(foo(1.5));
+  assertTrue(foo(NaN));
+  %OptimizeFunctionOnNextCall(foo);
+  assertFalse(foo(1.5));
+  assertTrue(foo(NaN));
+})();
diff --git a/src/v8/test/mjsunit/compiler/math-trunc.js b/src/v8/test/mjsunit/compiler/math-trunc.js
new file mode 100644
index 0000000..e5cc523
--- /dev/null
+++ b/src/v8/test/mjsunit/compiler/math-trunc.js
@@ -0,0 +1,39 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+// Ensure that the typing rule for Math.trunc deals correctly with
+// inputs in the range (-1.0,0.0), which are mapped to -0.
+(function() {
+  function foo(x) {
+    // Arrange x such that TurboFan infers type PlainNumber \/ NaN.
+    x = +x;
+    x = Math.abs(x) - 1.0;
+    return Object.is(-0, Math.trunc(x));
+  }
+
+  assertFalse(foo(1.5));
+  assertTrue(foo(0.5));
+  %OptimizeFunctionOnNextCall(foo);
+  assertFalse(foo(1.5));
+  assertTrue(foo(0.5));
+})();
+
+// Ensure that the typing rule for Math.trunc deals correctly with
+// NaN inputs, which are mapped to NaN.
+(function() {
+  function foo(x) {
+    // Arrange x such that TurboFan infers type PlainNumber \/ NaN.
+    x = +x;
+    x = Math.abs(x) - 1.0;
+    return Object.is(NaN, Math.trunc(x));
+  }
+
+  assertFalse(foo(1.5));
+  assertTrue(foo(NaN));
+  %OptimizeFunctionOnNextCall(foo);
+  assertFalse(foo(1.5));
+  assertTrue(foo(NaN));
+})();
diff --git a/src/v8/test/mjsunit/compiler/nary-binary-ops.js b/src/v8/test/mjsunit/compiler/nary-binary-ops.js
new file mode 100644
index 0000000..b200b66
--- /dev/null
+++ b/src/v8/test/mjsunit/compiler/nary-binary-ops.js
@@ -0,0 +1,150 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Test that n-ary chains of binary ops give an equal result to individual
+// binary op calls. Also test binop chains inside an if condition return
+// the same branch.
+
+// Generate a function of the form
+//
+// function(init,a0,...,aN) {
+//   return init + a0 + ... + aN;
+// }
+//
+// where + can be any binary operation.
+function generate_chained_op(op, num_ops) {
+    let str = "(function(init";
+    for (let i = 0; i < num_ops; i++) {
+        str += ",a"+i;
+    }
+    str += "){return (init";
+    for (let i = 0; i < num_ops; i++) {
+        str += op+"a"+i;
+    }
+    str += ");})";
+    return eval(str);
+}
+
+// Generate a function of the form
+//
+// function(init,a0,...,aN) {
+//   var tmp = init;
+//   tmp = tmp + a0;
+//   ...
+//   tmp = tmp + aN;
+//   return tmp;
+// }
+//
+// where + can be any binary operation.
+function generate_nonchained_op(op, num_ops) {
+    let str = "(function(init";
+    for (let i = 0; i < num_ops; i++) {
+        str += ",a"+i;
+    }
+    str += "){ var tmp=init; ";
+    for (let i = 0; i < num_ops; i++) {
+        str += "tmp=(tmp"+op+"a"+i+");";
+    }
+    str += "return tmp;})";
+    return eval(str);
+}
+
+// Generate a function of the form
+//
+// function(init,a0,...,aN) {
+//   if(init + a0 + ... + aN) return 1;
+//   else return 0;
+// }
+//
+// where + can be any binary operation.
+function generate_chained_op_test(op, num_ops) {
+    let str = "(function(init";
+    for (let i = 0; i < num_ops; i++) {
+        str += ",a"+i;
+    }
+    str += "){ if(init";
+    for (let i = 0; i < num_ops; i++) {
+        str += op+"a"+i;
+    }
+    str += ")return 1;else return 0;})";
+    return eval(str);
+}
+
+// Generate a function of the form
+//
+// function(init,a0,...,aN) {
+//   var tmp = init;
+//   tmp = tmp + a0;
+//   ...
+//   tmp = tmp + aN;
+//   if(tmp) return 1
+//  else return 0;
+// }
+//
+// where + can be any binary operation.
+function generate_nonchained_op_test(op, num_ops) {
+    let str = "(function(init";
+    for (let i = 0; i < num_ops; i++) {
+        str += ",a"+i;
+    }
+    str += "){ var tmp=init; ";
+    for (let i = 0; i < num_ops; i++) {
+        str += "tmp=(tmp"+op+"a"+i+");";
+    }
+    str += "if(tmp)return 1;else return 0;})";
+    return eval(str);
+}
+
+const BINOPS = [
+    ",",
+    "||",
+    "&&",
+    "|",
+    "^",
+    "&",
+    "<<",
+    ">>",
+    ">>>",
+    "+",
+    "-",
+    "*",
+    "/",
+    "%",
+];
+
+// Test each binop to see if the chained version is equivalent to the non-
+// chained one.
+for (let op of BINOPS) {
+    let chained = generate_chained_op(op, 4);
+    let nonchained = generate_nonchained_op(op, 4);
+    let chained_test = generate_chained_op_test(op, 4);
+    let nonchained_test = generate_nonchained_op_test(op, 4);
+
+    // With numbers.
+    assertEquals(
+        nonchained(1,2,3,4,5),
+        chained(1,2,3,4,5),
+        "numeric " + op);
+
+    // With numbers and strings.
+    assertEquals(
+        nonchained(1,"2",3,"4",5),
+        chained(1,"2",3,"4",5),
+        "numeric and string " + op);
+
+    // Iterate over all possible combinations of 5 numbers that evaluate
+    // to boolean true or false (for testing logical ops).
+    for (var i = 0; i < 32; i++) {
+        var booleanArray = [i & 1, i & 2, i & 4, i & 8, i & 16];
+        assertEquals(
+            nonchained.apply(this, booleanArray),
+            chained.apply(this, booleanArray),
+            booleanArray.join(" " + op + " "));
+
+        assertEquals(
+            nonchained_test.apply(this, booleanArray),
+            chained_test.apply(this, booleanArray),
+            "if (" + booleanArray.join(" " + op + " ") + ")");
+    }
+}
diff --git a/src/v8/test/mjsunit/compiler/new-cons-string.js b/src/v8/test/mjsunit/compiler/new-cons-string.js
new file mode 100644
index 0000000..7f6da72
--- /dev/null
+++ b/src/v8/test/mjsunit/compiler/new-cons-string.js
@@ -0,0 +1,71 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax --expose-externalize-string
+
+(function() {
+  function foo(s) {
+    return "abcdefghijklm" + s;
+  }
+
+  assertTrue(isOneByteString(foo("0")));
+  assertTrue(isOneByteString(foo("0")));
+  %OptimizeFunctionOnNextCall(foo);
+  assertTrue(isOneByteString(foo("0")));
+})();
+
+(function() {
+  function foo(s) {
+    return s + "abcdefghijklm";
+  }
+
+  assertTrue(isOneByteString(foo("0")));
+  assertTrue(isOneByteString(foo("0")));
+  %OptimizeFunctionOnNextCall(foo);
+  assertTrue(isOneByteString(foo("0")));
+})();
+
+(function() {
+  function foo(s) {
+    return "abcdefghijklm" + s;
+  }
+
+  assertFalse(isOneByteString(foo("\u1234")));
+  assertFalse(isOneByteString(foo("\u1234")));
+  %OptimizeFunctionOnNextCall(foo);
+  assertFalse(isOneByteString(foo("\u1234")));
+})();
+
+(function() {
+  function foo(s) {
+    return s + "abcdefghijklm";
+  }
+
+  assertFalse(isOneByteString(foo("\u1234")));
+  assertFalse(isOneByteString(foo("\u1234")));
+  %OptimizeFunctionOnNextCall(foo);
+  assertFalse(isOneByteString(foo("\u1234")));
+})();
+
+(function() {
+  function foo(s) {
+    return "abcdefghijkl\u1234" + s;
+  }
+
+  assertFalse(isOneByteString(foo("0")));
+  assertFalse(isOneByteString(foo("0")));
+  %OptimizeFunctionOnNextCall(foo);
+  assertFalse(isOneByteString(foo("0")));
+})();
+
+(function() {
+  function foo(s) {
+    return s + "abcdefghijkl\u1234";
+  }
+
+  assertFalse(isOneByteString(foo("0")));
+  assertFalse(isOneByteString(foo("0")));
+  %OptimizeFunctionOnNextCall(foo);
+  assertFalse(isOneByteString(foo("0")));
+})();
diff --git a/src/v8/test/mjsunit/compiler/object-is.js b/src/v8/test/mjsunit/compiler/object-is.js
new file mode 100644
index 0000000..f89b73e
--- /dev/null
+++ b/src/v8/test/mjsunit/compiler/object-is.js
@@ -0,0 +1,174 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+(function() {
+  function foo(o) { return Object.is(o, -0); }
+  assertTrue(foo(-0));
+  assertFalse(foo(0));
+  assertFalse(foo(NaN));
+  assertFalse(foo(''));
+  assertFalse(foo([]));
+  assertFalse(foo({}));
+  %OptimizeFunctionOnNextCall(foo);
+  assertTrue(foo(-0));
+  assertFalse(foo(0));
+  assertFalse(foo(NaN));
+  assertFalse(foo(''));
+  assertFalse(foo([]));
+  assertFalse(foo({}));
+})();
+
+(function() {
+  function foo(o) { return Object.is(-0, o); }
+  assertTrue(foo(-0));
+  assertFalse(foo(0));
+  assertFalse(foo(NaN));
+  assertFalse(foo(''));
+  assertFalse(foo([]));
+  assertFalse(foo({}));
+  %OptimizeFunctionOnNextCall(foo);
+  assertTrue(foo(-0));
+  assertFalse(foo(0));
+  assertFalse(foo(NaN));
+  assertFalse(foo(''));
+  assertFalse(foo([]));
+  assertFalse(foo({}));
+})();
+
+(function() {
+  function foo(o) { return Object.is(+o, -0); }
+  assertTrue(foo(-0));
+  assertFalse(foo(0));
+  assertFalse(foo(NaN));
+  %OptimizeFunctionOnNextCall(foo);
+  assertTrue(foo(-0));
+  assertFalse(foo(0));
+  assertFalse(foo(NaN));
+})();
+
+(function() {
+  function foo(o) { return Object.is(-0, +o); }
+  assertTrue(foo(-0));
+  assertFalse(foo(0));
+  assertFalse(foo(NaN));
+  %OptimizeFunctionOnNextCall(foo);
+  assertTrue(foo(-0));
+  assertFalse(foo(0));
+  assertFalse(foo(NaN));
+})();
+
+(function() {
+  function foo(o) { return Object.is(o, NaN); }
+  assertFalse(foo(-0));
+  assertFalse(foo(0));
+  assertTrue(foo(NaN));
+  assertFalse(foo(''));
+  assertFalse(foo([]));
+  assertFalse(foo({}));
+  %OptimizeFunctionOnNextCall(foo);
+  assertFalse(foo(-0));
+  assertFalse(foo(0));
+  assertTrue(foo(NaN));
+  assertFalse(foo(''));
+  assertFalse(foo([]));
+  assertFalse(foo({}));
+})();
+
+(function() {
+  function foo(o) { return Object.is(NaN, o); }
+  assertFalse(foo(-0));
+  assertFalse(foo(0));
+  assertTrue(foo(NaN));
+  assertFalse(foo(''));
+  assertFalse(foo([]));
+  assertFalse(foo({}));
+  %OptimizeFunctionOnNextCall(foo);
+  assertFalse(foo(-0));
+  assertFalse(foo(0));
+  assertTrue(foo(NaN));
+  assertFalse(foo(''));
+  assertFalse(foo([]));
+  assertFalse(foo({}));
+})();
+
+(function() {
+  function foo(o) { return Object.is(+o, NaN); }
+  assertFalse(foo(-0));
+  assertFalse(foo(0));
+  assertTrue(foo(NaN));
+  %OptimizeFunctionOnNextCall(foo);
+  assertFalse(foo(-0));
+  assertFalse(foo(0));
+  assertTrue(foo(NaN));
+})();
+
+(function() {
+  function foo(o) { return Object.is(NaN, +o); }
+  assertFalse(foo(-0));
+  assertFalse(foo(0));
+  assertTrue(foo(NaN));
+  %OptimizeFunctionOnNextCall(foo);
+  assertFalse(foo(-0));
+  assertFalse(foo(0));
+  assertTrue(foo(NaN));
+})();
+
+(function() {
+  function foo(o) { return Object.is(`${o}`, "foo"); }
+  assertFalse(foo("bar"));
+  assertTrue(foo("foo"));
+  %OptimizeFunctionOnNextCall(foo);
+  assertFalse(foo("bar"));
+  assertTrue(foo("foo"));
+})();
+
+(function() {
+  function foo(o) { return Object.is(String(o), "foo"); }
+  assertFalse(foo("bar"));
+  assertTrue(foo("foo"));
+  %OptimizeFunctionOnNextCall(foo);
+  assertFalse(foo("bar"));
+  assertTrue(foo("foo"));
+})();
+
+(function() {
+  function foo(o) { return Object.is(o, o); }
+  assertTrue(foo(-0));
+  assertTrue(foo(0));
+  assertTrue(foo(NaN));
+  assertTrue(foo(''));
+  assertTrue(foo([]));
+  assertTrue(foo({}));
+  %OptimizeFunctionOnNextCall(foo);
+  assertTrue(foo(-0));
+  assertTrue(foo(0));
+  assertTrue(foo(NaN));
+  assertTrue(foo(''));
+  assertTrue(foo([]));
+  assertTrue(foo({}));
+})();
+
+(function() {
+  function foo(o) { return Object.is(o|0, 0); }
+  assertTrue(foo(0));
+  assertTrue(foo(-0));
+  assertTrue(foo(NaN));
+  assertFalse(foo(1));
+  %OptimizeFunctionOnNextCall(foo);
+  assertTrue(foo(0));
+  assertTrue(foo(-0));
+  assertTrue(foo(NaN));
+  assertFalse(foo(1));
+})();
+
+(function() {
+  const s = Symbol();
+  function foo() { return Object.is(s, Symbol()); }
+  assertFalse(foo());
+  assertFalse(foo());
+  %OptimizeFunctionOnNextCall(foo);
+  assertFalse(foo());
+})();
diff --git a/src/v8/test/mjsunit/compiler/osr-arguments.js b/src/v8/test/mjsunit/compiler/osr-arguments.js
new file mode 100644
index 0000000..14a769f
--- /dev/null
+++ b/src/v8/test/mjsunit/compiler/osr-arguments.js
@@ -0,0 +1,17 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+function f1() {
+  var sum = 0;
+  for (var i = 0; i < 1000; i++) {
+    sum += arguments[0] + arguments[1] + arguments[2] + arguments[3];
+    if (i == 18) %OptimizeOsr();
+  }
+  return sum;
+}
+
+let result = f1(1, 1, 2, 3);
+assertEquals(7000, result);
diff --git a/src/v8/test/mjsunit/compiler/reflect-get.js b/src/v8/test/mjsunit/compiler/reflect-get.js
new file mode 100644
index 0000000..0c329e4
--- /dev/null
+++ b/src/v8/test/mjsunit/compiler/reflect-get.js
@@ -0,0 +1,68 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+// Test Reflect.get with wrong (number of) arguments.
+(function() {
+  "use strict";
+  function foo() { return Reflect.get(); }
+
+  assertThrows(foo);
+  assertThrows(foo);
+  %OptimizeFunctionOnNextCall(foo);
+  assertThrows(foo);
+})();
+(function() {
+  "use strict";
+  function foo(o) { return Reflect.get(o); }
+
+  assertEquals(undefined, foo({}));
+  assertEquals(undefined, foo({}));
+  %OptimizeFunctionOnNextCall(foo);
+  assertEquals(undefined, foo({}));
+})();
+(function() {
+  "use strict";
+  function foo(o) { return Reflect.get(o); }
+
+  assertThrows(foo.bind(undefined, 1));
+  assertThrows(foo.bind(undefined, undefined));
+  %OptimizeFunctionOnNextCall(foo);
+  assertThrows(foo.bind(undefined, 'o'));
+})();
+
+// Test Reflect.get within try/catch.
+(function() {
+  const o = {x: 10};
+  "use strict";
+  function foo() {
+    try {
+      return Reflect.get(o, "x");
+    } catch (e) {
+      return 1;
+    }
+  }
+
+  assertEquals(10, foo());
+  assertEquals(10, foo());
+  %OptimizeFunctionOnNextCall(foo);
+  assertEquals(10, foo());
+})();
+(function() {
+  "use strict";
+  const o = {};
+  function foo(n) {
+    try {
+      return Reflect.get(o, n);
+    } catch (e) {
+      return 1;
+    }
+  }
+
+  assertEquals(1, foo({[Symbol.toPrimitive]() { throw new Error(); }}));
+  assertEquals(1, foo({[Symbol.toPrimitive]() { throw new Error(); }}));
+  %OptimizeFunctionOnNextCall(foo);
+  assertEquals(1, foo({[Symbol.toPrimitive]() { throw new Error(); }}));
+})();
diff --git a/src/v8/test/mjsunit/compiler/reflect-has.js b/src/v8/test/mjsunit/compiler/reflect-has.js
new file mode 100644
index 0000000..2f9ee1b
--- /dev/null
+++ b/src/v8/test/mjsunit/compiler/reflect-has.js
@@ -0,0 +1,67 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+// Test Reflect.has with wrong (number of) arguments.
+(function() {
+  "use strict";
+  function foo() { return Reflect.has(); }
+
+  assertThrows(foo);
+  assertThrows(foo);
+  %OptimizeFunctionOnNextCall(foo);
+  assertThrows(foo);
+})();
+(function() {
+  "use strict";
+  function foo(o) { return Reflect.has(o); }
+
+  assertFalse(foo({}));
+  assertFalse(foo({}));
+  %OptimizeFunctionOnNextCall(foo);
+  assertFalse(foo({}));
+})();
+(function() {
+  "use strict";
+  function foo(o) { return Reflect.has(o); }
+
+  assertThrows(foo.bind(undefined, 1));
+  assertThrows(foo.bind(undefined, undefined));
+  %OptimizeFunctionOnNextCall(foo);
+  assertThrows(foo.bind(undefined, 'o'));
+})();
+
+// Test Reflect.has within try/catch.
+(function() {
+  "use strict";
+  function foo() {
+    try {
+      return Reflect.has();
+    } catch (e) {
+      return 1;
+    }
+  }
+
+  assertEquals(1, foo());
+  assertEquals(1, foo());
+  %OptimizeFunctionOnNextCall(foo);
+  assertEquals(1, foo());
+})();
+(function() {
+  "use strict";
+  const o = {};
+  function foo(n) {
+    try {
+      return Reflect.has(o, n);
+    } catch (e) {
+      return 1;
+    }
+  }
+
+  assertEquals(1, foo({[Symbol.toPrimitive]() { throw new Error(); }}));
+  assertEquals(1, foo({[Symbol.toPrimitive]() { throw new Error(); }}));
+  %OptimizeFunctionOnNextCall(foo);
+  assertEquals(1, foo({[Symbol.toPrimitive]() { throw new Error(); }}));
+})();
diff --git a/src/v8/test/mjsunit/compiler/regress-7121.js b/src/v8/test/mjsunit/compiler/regress-7121.js
new file mode 100644
index 0000000..98c1a1a
--- /dev/null
+++ b/src/v8/test/mjsunit/compiler/regress-7121.js
@@ -0,0 +1,10 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax --harmony-bigint
+
+function foo() { %_ToLength(42n) }
+assertThrows(foo, TypeError);
+%OptimizeFunctionOnNextCall(foo);
+assertThrows(foo, TypeError);
diff --git a/src/v8/test/mjsunit/compiler/regress-772420.js b/src/v8/test/mjsunit/compiler/regress-772420.js
new file mode 100644
index 0000000..4b58b10
--- /dev/null
+++ b/src/v8/test/mjsunit/compiler/regress-772420.js
@@ -0,0 +1,28 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+function foo(arg) {
+  var value;
+  // None of the branches of this switch are ever taken, but
+  // the sequence means value could be the hole.
+  switch (arg) {
+    case 1:
+      let let_var = 1;
+    case 2:
+      value = let_var;
+  }
+  // Speculative number binop with NumberOrOddball feedback.
+  // Shouldn't be optimized to pure operator since value's phi
+  // could theoretically be the hole (we would have already thrown a
+  // reference error in case 2 above if so, but TF typing still
+  // thinks it could be the hole).
+  return value * undefined;
+}
+
+foo(3);
+foo(3);
+%OptimizeFunctionOnNextCall(foo);
+foo(3);
diff --git a/src/v8/test/mjsunit/compiler/regress-772872.js b/src/v8/test/mjsunit/compiler/regress-772872.js
new file mode 100644
index 0000000..345ace8
--- /dev/null
+++ b/src/v8/test/mjsunit/compiler/regress-772872.js
@@ -0,0 +1,13 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+function f() {
+  for (var x = 10; x > 5; x -= 16) {}
+}
+f();
+f();
+%OptimizeFunctionOnNextCall(f);
+f();
diff --git a/src/v8/test/mjsunit/compiler/regress-773954.js b/src/v8/test/mjsunit/compiler/regress-773954.js
new file mode 100644
index 0000000..b78a499
--- /dev/null
+++ b/src/v8/test/mjsunit/compiler/regress-773954.js
@@ -0,0 +1,21 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+'use strict';
+var a = { x:0 };
+var b = {};
+Object.defineProperty(b, "x", {get: function () {}});
+
+function f(o) {
+  return 5 + o.x++;
+}
+
+try {
+  f(a);
+  f(b);
+} catch (e) {}
+%OptimizeFunctionOnNextCall(f);
+f(a);
diff --git a/src/v8/test/mjsunit/compiler/regress-780658.js b/src/v8/test/mjsunit/compiler/regress-780658.js
new file mode 100644
index 0000000..57fdbba
--- /dev/null
+++ b/src/v8/test/mjsunit/compiler/regress-780658.js
@@ -0,0 +1,29 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax --turbo-escape
+
+function get1(l, b) {
+    return l[1];
+}
+
+function with_double(x) {
+    var o = {a: [x,x,x]};
+    o.a.some_property = 1;
+    return get1(o.a);
+}
+
+function with_tagged(x) {
+    var l = [{}, x,x];
+    return get1(l);
+}
+
+with_double(.5);
+with_tagged({});
+with_double(.6);
+with_tagged(null);
+with_double(.5);
+with_tagged({});
+%OptimizeFunctionOnNextCall(with_double);
+with_double(.7);
diff --git a/src/v8/test/mjsunit/compiler/regress-786521.js b/src/v8/test/mjsunit/compiler/regress-786521.js
new file mode 100644
index 0000000..2b16127
--- /dev/null
+++ b/src/v8/test/mjsunit/compiler/regress-786521.js
@@ -0,0 +1,23 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+// Provoke type None as result of a SpeculativeNumberMultiply to
+// ensure that Turbofan can handle this.
+
+function inlined(b, x) {
+  if (b) {
+    x * 2 * 2
+  }
+}
+
+inlined(true, 1);
+inlined(true, 2);
+inlined(false, 1);
+
+function foo(b) { inlined(b, "") }
+foo(false); foo(false);
+%OptimizeFunctionOnNextCall(foo);
+foo(true);
diff --git a/src/v8/test/mjsunit/compiler/regress-788539.js b/src/v8/test/mjsunit/compiler/regress-788539.js
new file mode 100644
index 0000000..889090c
--- /dev/null
+++ b/src/v8/test/mjsunit/compiler/regress-788539.js
@@ -0,0 +1,37 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax --turbo-verify
+
+// This test creates a FrameState node with a DeadValue parent framestate.
+// Ensure that deadness is propagated along FrameState edges.
+
+function f1() {
+  return this;
+}
+
+function f2(x, value, type) {
+  x instanceof type
+}
+
+function f3(a) {
+  a.x = 0;
+  if (a.x === 0) {
+    a[1] = 0.1;
+  }
+  class B {
+  }
+  class C extends B {
+    bar() {
+      return super.foo()
+    }
+  }
+  B.prototype.foo = f1;
+  f2(new C().bar.call(), Object(), String);
+}
+
+f3(new Array(1));
+f3(new Array(1));
+%OptimizeFunctionOnNextCall(f3);
+f3(new Array(1));
diff --git a/src/v8/test/mjsunit/compiler/regress-791245.js b/src/v8/test/mjsunit/compiler/regress-791245.js
new file mode 100644
index 0000000..9018fb7
--- /dev/null
+++ b/src/v8/test/mjsunit/compiler/regress-791245.js
@@ -0,0 +1,17 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --expose-gc
+
+var a, b;  // Global variables that will end up with number map.
+
+for (var i = 0; i < 100000; i++) {
+  b = 1;
+  a = i + -0;  // -0 is a number, so this will make "a" a heap object.
+  b = a;
+}
+
+assertTrue(a === b);
+gc();
+assertTrue(a === b);
diff --git a/src/v8/test/mjsunit/compiler/regress-793863.js b/src/v8/test/mjsunit/compiler/regress-793863.js
new file mode 100644
index 0000000..883805d
--- /dev/null
+++ b/src/v8/test/mjsunit/compiler/regress-793863.js
@@ -0,0 +1,12 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+function f(a) {
+  return arguments[0];
+}
+
+%OptimizeFunctionOnNextCall(f);
+assertEquals(undefined, f());
diff --git a/src/v8/test/mjsunit/compiler/regress-796041.js b/src/v8/test/mjsunit/compiler/regress-796041.js
new file mode 100644
index 0000000..e2c2e11
--- /dev/null
+++ b/src/v8/test/mjsunit/compiler/regress-796041.js
@@ -0,0 +1,35 @@
+// Copyright 2018 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+'use strict';
+
+function f(abort, n, a, b) {
+  if (abort) return;
+  var x = a ? true : "" + a;
+  if (!a) {
+    var dead = n + 1 + 1;
+    if(!b) {
+      x = dead;
+    }
+    if (x) {
+      x = false;
+    }
+    if (b) {
+      x = false;
+    }
+  }
+  return x + 1;
+}
+f(false, 5); f(false, 6); f(false, 7); f(false, 8);
+
+function g(abort, a, b) {
+  return f(abort, "abc", a, b);
+}
+
+g(true); g(true); g(true); g(true);
+
+%OptimizeFunctionOnNextCall(g);
+g(false);
diff --git a/src/v8/test/mjsunit/compiler/regress-797596.js b/src/v8/test/mjsunit/compiler/regress-797596.js
new file mode 100644
index 0000000..4e3594b
--- /dev/null
+++ b/src/v8/test/mjsunit/compiler/regress-797596.js
@@ -0,0 +1,30 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --expose-gc --allow-natives-syntax
+var notCallable;
+function inferReceiverMapsInDeadCode() {
+  var obj = { func() {} };
+  gc();
+  function wrappedCode() { try { code(); } catch (e) {} }
+  function code() {
+    obj.a;
+    try {
+      Object.defineProperty(obj, "func", { get() {} });
+    } catch (neverCaught) {}
+    for (var i = 0; i < 1; i++) {
+      try {
+        notCallable(arguments[i]);
+      } catch (alwaysCaught) {}
+    }
+  }
+  wrappedCode();
+  try {
+    %OptimizeFunctionOnNextCall(wrappedCode);
+    wrappedCode();
+  } catch (e) {}
+}
+inferReceiverMapsInDeadCode();
+inferReceiverMapsInDeadCode();
+inferReceiverMapsInDeadCode();
diff --git a/src/v8/test/mjsunit/compiler/regress-799263.js b/src/v8/test/mjsunit/compiler/regress-799263.js
new file mode 100644
index 0000000..b6b1165
--- /dev/null
+++ b/src/v8/test/mjsunit/compiler/regress-799263.js
@@ -0,0 +1,29 @@
+// Copyright 2018 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+function opt(a, b) {
+  b[0] = 0;
+
+  a.length;
+
+  // TransitionElementsKind
+  for (let i = 0; i < 1; i++)
+      a[0] = 0;
+
+  b[0] = 9.431092e-317;
+}
+
+let arr1 = new Array(1);
+arr1[0] = 'a';
+opt(arr1, [0]);
+
+let arr2 = [0.1];
+opt(arr2, arr2);
+
+%OptimizeFunctionOnNextCall(opt);
+
+opt(arr2, arr2);
+assertEquals(9.431092e-317, arr2[0]);
diff --git a/src/v8/test/mjsunit/compiler/regress-801097.js b/src/v8/test/mjsunit/compiler/regress-801097.js
new file mode 100644
index 0000000..d488ce4
--- /dev/null
+++ b/src/v8/test/mjsunit/compiler/regress-801097.js
@@ -0,0 +1,19 @@
+// Copyright 2018 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+function GetFunction() {
+  var source = "return ((dividend | 0) / ((";
+  for (var i = 0; i < 0x8000; i++) {
+    source += "a,"
+  }
+  source += "a) | 0)) | 0";
+  return Function("dividend", source);
+}
+
+var func = GetFunction();
+assertThrows("func();");
+%OptimizeFunctionOnNextCall(func);
+assertThrows("func()");
diff --git a/src/v8/test/mjsunit/compiler/stress-deopt-count-1.js b/src/v8/test/mjsunit/compiler/stress-deopt-count-1.js
new file mode 100644
index 0000000..834a873
--- /dev/null
+++ b/src/v8/test/mjsunit/compiler/stress-deopt-count-1.js
@@ -0,0 +1,20 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax --deopt-every-n-times=0 --opt --no-always-opt
+
+// Check that --deopt-every-n-times 0 doesn't deopt
+
+function f(x) {
+  return x + 1;
+}
+
+f(0);
+%OptimizeFunctionOnNextCall(f);
+
+f(1);
+assertOptimized(f, undefined, undefined, false);
+
+f(1);
+assertOptimized(f, undefined, undefined, false);
diff --git a/src/v8/test/mjsunit/compiler/stress-deopt-count-2.js b/src/v8/test/mjsunit/compiler/stress-deopt-count-2.js
new file mode 100644
index 0000000..641a9e8
--- /dev/null
+++ b/src/v8/test/mjsunit/compiler/stress-deopt-count-2.js
@@ -0,0 +1,48 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax --opt --no-always-opt --deopt-every-n-times=6
+
+// Check that stress deopt count resets correctly
+
+// Function with two deopt points
+function f(x) {
+  return x + 1;
+}
+
+f(1);
+%OptimizeFunctionOnNextCall(f);
+
+// stress_deopt_count == 6
+
+f(1);
+assertOptimized(f, undefined, undefined, false);
+
+// stress_deopt_count == 4
+
+f(1);
+assertOptimized(f, undefined, undefined, false);
+
+// stress_deopt_count == 2
+
+f(1);
+// deopt & counter reset
+assertUnoptimized(f, undefined, undefined, false);
+
+// stress_deopt_count == 6
+
+%OptimizeFunctionOnNextCall(f);
+f(1);
+assertOptimized(f, undefined, undefined, false);
+
+// stress_deopt_count == 4
+
+f(1);
+assertOptimized(f, undefined, undefined, false);
+
+// stress_deopt_count == 2
+
+f(1);
+// deopt & counter reset
+assertUnoptimized(f, undefined, undefined, false);
diff --git a/src/v8/test/mjsunit/compiler/string-slice.js b/src/v8/test/mjsunit/compiler/string-slice.js
new file mode 100644
index 0000000..6c32747
--- /dev/null
+++ b/src/v8/test/mjsunit/compiler/string-slice.js
@@ -0,0 +1,33 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+(function() {
+  function foo(s) { return s.slice(-1); }
+
+  assertEquals('', foo(''));
+  assertEquals('a', foo('a'));
+  assertEquals('b', foo('ab'));
+  assertEquals('c', foo('abc'));
+  %OptimizeFunctionOnNextCall(foo);
+  assertEquals('', foo(''));
+  assertEquals('a', foo('a'));
+  assertEquals('b', foo('ab'));
+  assertEquals('c', foo('abc'));
+})();
+
+(function() {
+  function foo(s) { return s.slice(-1, undefined); }
+
+  assertEquals('', foo(''));
+  assertEquals('a', foo('a'));
+  assertEquals('b', foo('ab'));
+  assertEquals('c', foo('abc'));
+  %OptimizeFunctionOnNextCall(foo);
+  assertEquals('', foo(''));
+  assertEquals('a', foo('a'));
+  assertEquals('b', foo('ab'));
+  assertEquals('c', foo('abc'));
+})();
diff --git a/src/v8/test/mjsunit/compiler/type-speculative-safe-integer-add.js b/src/v8/test/mjsunit/compiler/type-speculative-safe-integer-add.js
new file mode 100644
index 0000000..459e2b4
--- /dev/null
+++ b/src/v8/test/mjsunit/compiler/type-speculative-safe-integer-add.js
@@ -0,0 +1,51 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+(function(){
+    function f(x){
+        return 1/(x+x);
+    }
+
+    function forgetAboutMinus0(i) {
+        var x = 0;
+        var y;
+        for(; i > 0; --i) {
+            y = f(x);
+            x = -0;
+        }
+        return y;
+    }
+
+    forgetAboutMinus0(1);
+    assertEquals(Infinity, forgetAboutMinus0(1));
+    %OptimizeFunctionOnNextCall(forgetAboutMinus0);
+    assertEquals(Infinity, forgetAboutMinus0(1));
+    assertEquals(-Infinity, forgetAboutMinus0(2));
+})();
+
+(function(){
+    function f(x){
+        return x+x;
+    }
+
+    function NumberAdd(x,y) {
+        return x + y;
+    }
+    NumberAdd(1,0.5);
+    NumberAdd(0.5, 1);
+    NumberAdd(NaN, Infinity);
+
+    function forgetAboutNaN(b) {
+        var x = b ? NaN : 1;
+        return NumberAdd(f(x), 0);
+    }
+
+    forgetAboutNaN(false);
+    assertEquals(2, forgetAboutNaN(false));
+    %OptimizeFunctionOnNextCall(forgetAboutNaN);
+    assertEquals(2, forgetAboutNaN(false));
+    assertEquals(NaN, forgetAboutNaN(true));
+})();
diff --git a/src/v8/test/mjsunit/compiler/varargs.js b/src/v8/test/mjsunit/compiler/varargs.js
new file mode 100644
index 0000000..ae636dc
--- /dev/null
+++ b/src/v8/test/mjsunit/compiler/varargs.js
@@ -0,0 +1,49 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+x = "a";
+
+function test_varargs(...args) {
+  var sum = this.x;
+  for (i in args) {
+    sum += "," + args[i];
+  }
+  return sum;
+}
+
+assertEquals("a", test_varargs());
+assertEquals("a,b", test_varargs("b"));
+assertEquals("a,b,c", test_varargs("b", "c"));
+assertEquals("a,b,c,d", test_varargs("b", "c", "d"));
+assertEquals("a,b,c,d,e", test_varargs("b", "c", "d", "e"));
+
+function forward_varargs(...args) {
+  return test_varargs(...args);
+}
+
+assertEquals("a", forward_varargs());
+assertEquals("a,b", forward_varargs("b"));
+assertEquals("a,b,c", forward_varargs("b", "c"));
+assertEquals("a,b,c,d", forward_varargs("b", "c", "d"));
+assertEquals("a,b,c,d,e", forward_varargs("b", "c", "d", "e"));
+
+function forward_varargs_one_arg(x, ...args) {
+  return test_varargs(x, ...args);
+}
+
+assertEquals("a,undefined", forward_varargs_one_arg());
+assertEquals("a,b", forward_varargs_one_arg("b"));
+assertEquals("a,b,c", forward_varargs_one_arg("b", "c"));
+assertEquals("a,b,c,d", forward_varargs_one_arg("b", "c", "d"));
+assertEquals("a,b,c,d,e", forward_varargs_one_arg("b", "c", "d", "e"));
+
+function forward_varargs_two_args(x, y, ...args) {
+  return test_varargs(x, y, ...args);
+}
+
+assertEquals("a,undefined,undefined", forward_varargs_two_args());
+assertEquals("a,b,undefined", forward_varargs_two_args("b"));
+assertEquals("a,b,c", forward_varargs_two_args("b", "c"));
+assertEquals("a,b,c,d", forward_varargs_two_args("b", "c", "d"));
+assertEquals("a,b,c,d,e", forward_varargs_two_args("b", "c", "d", "e"));
diff --git a/src/v8/test/mjsunit/console.js b/src/v8/test/mjsunit/console.js
new file mode 100644
index 0000000..f78afc6
--- /dev/null
+++ b/src/v8/test/mjsunit/console.js
@@ -0,0 +1,28 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+console.assert(true);
+console.assert("yes");
+assertThrows(() => console.assert(false), Error);
+assertThrows(() => console.assert(""), Error);
+assertThrows(() => console.assert(0), Error);
+
+let args = ["", {}, [], this, Array, 1, 1.4, true, false];
+
+console.log(...args);
+console.error(...args);
+console.warn(...args);
+console.info(...args);
+console.debug(...args);
+
+console.time();
+console.timeEnd();
+
+console.time("a");
+console.timeEnd("a");
+
+console.timeStamp();
+args.forEach(each => console.timeStamp(each));
+
+console.trace();
diff --git a/src/v8/test/mjsunit/constant-folding-2.js b/src/v8/test/mjsunit/constant-folding-2.js
index da9e5d5..7586261 100644
--- a/src/v8/test/mjsunit/constant-folding-2.js
+++ b/src/v8/test/mjsunit/constant-folding-2.js
@@ -33,8 +33,6 @@
   f();
   %OptimizeFunctionOnNextCall(f);
   f();
-  // Assert that there has been no deopt.
-  assertOptimized(f);
 }
 
 test(function add() {
@@ -234,6 +232,7 @@
   assertEquals("NaN", String("abc".charCodeAt(4)));
   assertEquals(98, "abc".charCodeAt(1.1));
   assertEquals("NaN", String("abc".charCodeAt(4.1)));
+  assertEquals("NaN", String("abc".charCodeAt(1 + 4294967295)));
 });
 
 test(function stringCharAt() {
@@ -242,6 +241,7 @@
   assertEquals("", "abc".charAt(4));
   assertEquals("b", "abc".charAt(1.1));
   assertEquals("", "abc".charAt(4.1));
+  assertEquals("", String("abc".charAt(1 + 4294967295)));
 });
 
 
diff --git a/src/v8/test/mjsunit/d8-os.js b/src/v8/test/mjsunit/d8/d8-os.js
similarity index 100%
rename from src/v8/test/mjsunit/d8-os.js
rename to src/v8/test/mjsunit/d8/d8-os.js
diff --git a/src/v8/test/mjsunit/d8-performance-now.js b/src/v8/test/mjsunit/d8/d8-performance-now.js
similarity index 100%
rename from src/v8/test/mjsunit/d8-performance-now.js
rename to src/v8/test/mjsunit/d8/d8-performance-now.js
diff --git a/src/v8/test/mjsunit/d8-worker-sharedarraybuffer.js b/src/v8/test/mjsunit/d8/d8-worker-sharedarraybuffer.js
similarity index 100%
rename from src/v8/test/mjsunit/d8-worker-sharedarraybuffer.js
rename to src/v8/test/mjsunit/d8/d8-worker-sharedarraybuffer.js
diff --git a/src/v8/test/mjsunit/d8-worker-spawn-worker.js b/src/v8/test/mjsunit/d8/d8-worker-spawn-worker.js
similarity index 100%
rename from src/v8/test/mjsunit/d8-worker-spawn-worker.js
rename to src/v8/test/mjsunit/d8/d8-worker-spawn-worker.js
diff --git a/src/v8/test/mjsunit/d8-worker.js b/src/v8/test/mjsunit/d8/d8-worker.js
similarity index 100%
rename from src/v8/test/mjsunit/d8-worker.js
rename to src/v8/test/mjsunit/d8/d8-worker.js
diff --git a/src/v8/test/mjsunit/d8/enable-tracing.js b/src/v8/test/mjsunit/d8/enable-tracing.js
new file mode 100644
index 0000000..5174b41
--- /dev/null
+++ b/src/v8/test/mjsunit/d8/enable-tracing.js
@@ -0,0 +1,8 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --enable-tracing --trace-path=test/mjsunit/d8/v8_trace.json
+
+// Just test that running d8 with --enable-tracing does not crash in a normal
+// execution without exceptions or calls to natives.
diff --git a/src/v8/test/mjsunit/deserialize-reference.js b/src/v8/test/mjsunit/deserialize-reference.js
index b032013..ac4979b 100644
--- a/src/v8/test/mjsunit/deserialize-reference.js
+++ b/src/v8/test/mjsunit/deserialize-reference.js
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-// Flags: --cache=code --serialize-toplevel
+// Flags: --cache=code
 
 var a = "123";
 assertEquals(a, "123");
diff --git a/src/v8/test/mjsunit/dictionary-prototypes.js b/src/v8/test/mjsunit/dictionary-prototypes.js
new file mode 100644
index 0000000..109f8d4
--- /dev/null
+++ b/src/v8/test/mjsunit/dictionary-prototypes.js
@@ -0,0 +1,409 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+function EnsureDictionaryMode(obj, properties=1500) {
+  for (let i = 0; i < properties; i++) {
+    obj["x" + i] = 0;
+  }
+  assertFalse(%HasFastProperties(obj));
+}
+
+function EnsureAlmostDictionaryMode(obj) {
+  for (let i = 0; i < 1020; i++) {
+    obj["x" + i] = 0;
+  }
+}
+
+function TestAddingPropertyToDictionaryPrototype() {
+  let foo_func_called = 0;
+  let bar_func_called = 0;
+
+  function Foo() {}
+  Foo.prototype.func = function() { ++foo_func_called; }
+
+  function Bar() {}
+  Bar.prototype = Object.create(Foo.prototype);
+  EnsureDictionaryMode(Bar.prototype);
+
+  let o = new Bar();
+
+  for (let i = 0; i < 11; ++i) {
+    // First, the property is looked up from Foo.
+    o.func();
+
+    // Add the property to Bar which is a dictionary-mode prototype between o
+    // and Foo. In the next iteration, it's looked up from Bar.
+    if (i == 9) {
+      // The UNINITIALIZED -> PREMONOMORPHIC transition of StoreIC should
+      // properly invalidate prototype chains.
+      Bar.prototype.func = function() { ++bar_func_called; }
+    }
+  }
+
+  assertEquals(10, foo_func_called);
+  assertEquals(1, bar_func_called);
+}
+
+TestAddingPropertyToDictionaryPrototype();
+
+// Same as TestAddingPropertyToDictionaryPrototype, but using o["foo"] access
+// instead of o.foo.
+function TestAddingPropertyToDictionaryPrototype2() {
+  let foo_func_called = 0;
+  let bar_func_called = 0;
+  let name = "func";
+
+  function Foo() {}
+  Foo.prototype[name] = function() { ++foo_func_called; }
+
+  function Bar() {}
+  Bar.prototype = Object.create(Foo.prototype);
+  EnsureDictionaryMode(Bar.prototype);
+
+  let o = new Bar();
+
+  for (let i = 0; i < 11; ++i) {
+    // First, the property is looked up from Foo.
+    o[name]();
+
+    // Add the property to Bar which is a dictionary-mode prototype between o
+    // and Foo. In the next iteration, it's looked up from Bar.
+    if (i == 9) {
+      // The UNINITIALIZED -> PREMONOMORPHIC transition of KeyedStoreIC should
+      // properly invalidate prototype chains.
+      Bar.prototype[name] = function() { ++bar_func_called; }
+    }
+  }
+
+  assertEquals(10, foo_func_called);
+  assertEquals(1, bar_func_called);
+}
+
+TestAddingPropertyToDictionaryPrototype2();
+
+function TestAddingPropertyToDictionaryPrototype_DefineProperty() {
+  let foo_func_called = 0;
+  let bar_func_called = 0;
+
+  function Foo() {}
+  Foo.prototype.func = function() { ++foo_func_called; }
+
+  function Bar() {}
+  Bar.prototype = Object.create(Foo.prototype);
+  EnsureDictionaryMode(Bar.prototype);
+
+  let o = new Bar();
+
+  for (let i = 0; i < 11; ++i) {
+    // First, the property is looked up from Foo.
+    o.func();
+
+    // Add the property to Bar which is a dictionary-mode prototype between o
+    // and Foo. In the next iteration, it's looked up from Bar.
+    if (i == 9) {
+      // The runtime should properly invalidate prototype chains.
+      Object.defineProperty(Bar.prototype, "func", {value: function() { ++bar_func_called; }});
+    }
+  }
+
+  assertEquals(10, foo_func_called);
+  assertEquals(1, bar_func_called);
+}
+
+TestAddingPropertyToDictionaryPrototype_DefineProperty();
+
+function TestAddingPropertyToDictionaryPrototype_DictionaryAddSlowPath() {
+  let foo_func_called = 0;
+  let bar_func_called = 0;
+
+  function Foo() {}
+  Foo.prototype.func = function() { ++foo_func_called; }
+
+  function Bar() {}
+  Bar.prototype = Object.create(Foo.prototype);
+  // The magic number ensures that the next addition to the dictionary will
+  // trigger the slow path.
+  EnsureDictionaryMode(Bar.prototype, 2731);
+
+  let o = new Bar();
+
+  for (let i = 0; i < 11; ++i) {
+    // First, the property is looked up from Foo.
+    o.func();
+
+    // Add the property to Bar which is a dictionary-mode prototype between o
+    // and Foo. In the next iteration, it's looked up from Bar.
+    if (i == 9) {
+      // -> slow path for dictionary add
+      Bar.prototype.func = function() { ++bar_func_called; }
+    }
+  }
+
+  assertEquals(10, foo_func_called);
+  assertEquals(1, bar_func_called);
+}
+
+TestAddingPropertyToDictionaryPrototype_DictionaryAddSlowPath();
+
+function TestAddingAccessorPropertyToDictionaryPrototype() {
+  let foo_func_called = 0;
+  let bar_func_called = 0;
+
+  function Foo() {}
+  Foo.prototype.func = function() { ++foo_func_called; }
+
+  function Bar() {}
+  Bar.prototype = Object.create(Foo.prototype);
+  EnsureDictionaryMode(Bar.prototype);
+
+  let o = new Bar();
+
+  for (let i = 0; i < 11; ++i) {
+    // First, the property is looked up from Foo.
+    o.func();
+
+    // Add the property to Bar which is a dictionary-mode prototype between o
+    // and Foo. In the next iteration, it's looked up from Bar.
+    if (i == 9) {
+      Object.defineProperty(Bar.prototype, "func",
+                            {get: function() { return function() { ++bar_func_called; }}});
+    }
+  }
+
+  assertEquals(10, foo_func_called);
+  assertEquals(1, bar_func_called);
+}
+
+TestAddingAccessorPropertyToDictionaryPrototype();
+
+function TestRemovingPropertyFromDictionaryPrototype() {
+  let foo_func_called = 0;
+  let bar_func_called = 0;
+
+  function Foo() {}
+  Foo.prototype.func = function() { ++foo_func_called; }
+
+  function Bar() {}
+  Bar.prototype = Object.create(Foo.prototype);
+  EnsureDictionaryMode(Bar.prototype);
+  Bar.prototype.func = function() { ++bar_func_called; }
+
+  let o = new Bar();
+
+  for (let i = 0; i < 11; ++i) {
+    // First, the property is looked up from Bar.
+    o.func();
+
+    // Remove the property from Bar which is a dictionary-mode prototype between
+    // o and Foo. In the next iteration, it's looked up from Foo.
+    if (i == 9) {
+      delete Bar.prototype.func;
+    }
+  }
+
+  assertEquals(1, foo_func_called);
+  assertEquals(10, bar_func_called);
+}
+
+TestRemovingPropertyFromDictionaryPrototype();
+
+// Same as TestRemovingPropertyFromDictionaryPrototype, but using o["foo"] access
+// instead of o.foo.
+function TestRemovingPropertyFromDictionaryPrototype2() {
+  let foo_func_called = 0;
+  let bar_func_called = 0;
+  let name = "func";
+
+  function Foo() {}
+  Foo.prototype[name] = function() { ++foo_func_called; }
+
+  function Bar() {}
+  Bar.prototype = Object.create(Foo.prototype);
+  EnsureDictionaryMode(Bar.prototype);
+  Bar.prototype[name] = function() { ++bar_func_called; }
+
+  let o = new Bar();
+
+  for (let i = 0; i < 11; ++i) {
+    // First, the property is looked up from Bar.
+    o[name]();
+
+    // Remove the property from Bar which is a dictionary-mode prototype between
+    // o and Foo. In the next iteration, it's looked up from Foo.
+    if (i == 9) {
+      delete Bar.prototype[name];
+    }
+  }
+
+  assertEquals(1, foo_func_called);
+  assertEquals(10, bar_func_called);
+}
+
+TestRemovingPropertyFromDictionaryPrototype2();
+
+function TestAddingPropertyToDictionaryPrototype_Monomorphic() {
+  function DoMonomorphicStoreToPrototype(p, f, do_delete=true) {
+    p.func = f;
+    if (do_delete) {
+      delete p.func;
+    }
+  }
+
+  let foo_func_called = 0;
+  let bar_func_called = 0;
+
+  function Foo() {}
+  Foo.prototype.func = function() { ++foo_func_called; }
+
+  function Bar() {}
+  Bar.prototype = Object.create(Foo.prototype);
+  EnsureDictionaryMode(Bar.prototype);
+
+  function bar_func() {
+    ++bar_func_called;
+  }
+  DoMonomorphicStoreToPrototype(Bar.prototype, bar_func);
+  DoMonomorphicStoreToPrototype(Bar.prototype, bar_func);
+  DoMonomorphicStoreToPrototype(Bar.prototype, bar_func);
+
+  let o = new Bar();
+
+  for (let i = 0; i < 11; ++i) {
+    // First, the property is looked up from Foo.
+    o.func();
+
+    // Add the property to Bar which is a dictionary-mode prototype between o
+    // and Foo. In the next iteration, it's looked up from Bar.
+    if (i == 9) {
+      DoMonomorphicStoreToPrototype(Bar.prototype, bar_func, false);
+    }
+  }
+
+  assertEquals(10, foo_func_called);
+  assertEquals(1, bar_func_called);
+}
+
+TestAddingPropertyToDictionaryPrototype_Monomorphic();
+
+function TestAddingKeyedPropertyToDictionaryPrototype_Monomorphic() {
+  function DoMonomorphicKeyedStoreToPrototype(p, name, f, do_delete=true) {
+    p[name] = f;
+    if (do_delete) {
+      delete p[name];
+    }
+  }
+
+  let foo_func_called = 0;
+  let bar_func_called = 0;
+  let name = "func";
+
+  function Foo() {}
+  Foo.prototype[name] = function() { ++foo_func_called; }
+
+  function Bar() {}
+  Bar.prototype = Object.create(Foo.prototype);
+  EnsureDictionaryMode(Bar.prototype);
+
+  function bar_func() {
+    ++bar_func_called;
+  }
+  DoMonomorphicKeyedStoreToPrototype(Bar.prototype, name, bar_func);
+  DoMonomorphicKeyedStoreToPrototype(Bar.prototype, name, bar_func);
+  DoMonomorphicKeyedStoreToPrototype(Bar.prototype, name, bar_func);
+
+  let o = new Bar();
+
+  for (let i = 0; i < 11; ++i) {
+    // First, the property is looked up from Foo.
+    o.func();
+
+    // Add the property to Bar which is a dictionary-mode prototype between o
+    // and Foo. In the next iteration, it's looked up from Bar.
+    if (i == 9) {
+      DoMonomorphicKeyedStoreToPrototype(Bar.prototype, name, bar_func, false);
+    }
+  }
+
+  assertEquals(10, foo_func_called);
+  assertEquals(1, bar_func_called);
+}
+
+TestAddingKeyedPropertyToDictionaryPrototype_Monomorphic();
+
+// Like TestAddingPropertyToDictionaryPrototype, except that the prototype isn't
+// in dictionary mode yet, but turns to dictionary mode after the interesting
+// property is added.
+function TestAddingPropertyToAlmostDictionaryPrototype() {
+  let foo_func_called = 0;
+  let bar_func_called = 0;
+
+  function Foo() {}
+  Foo.prototype.func = function() { ++foo_func_called; }
+
+  function Bar() {}
+  Bar.prototype = Object.create(Foo.prototype);
+  EnsureAlmostDictionaryMode(Bar.prototype);
+
+  let o = new Bar();
+  for (let i = 0; i < 2; ++i) {
+    o.x0;
+  }
+  assertTrue(%HasFastProperties(Bar.prototype));
+
+  for (let i = 0; i < 11; ++i) {
+    // First, the property is looked up from Foo.
+    o.func();
+
+    // Add the property to Bar which will now turn permanently into dictionary
+    // mode. In the next iteration, it's looked up from Bar.
+    if (i == 9) {
+      Bar.prototype.func = function() { ++bar_func_called; }
+      assertFalse(%HasFastProperties(Bar.prototype));
+    }
+  }
+
+  assertEquals(10, foo_func_called);
+  assertEquals(1, bar_func_called);
+}
+
+TestAddingPropertyToAlmostDictionaryPrototype();
+
+function TestReconfiguringDataToAccessor() {
+  let setter_called = 0;
+
+  function Bar() {}
+  EnsureDictionaryMode(Bar.prototype);
+  let name = "prop";
+  Object.defineProperty(Bar.prototype, name,
+                        {value: 1000, writable: true, configurable: true});
+
+  for (let i = 0; i < 11; ++i) {
+    let obj1 = new Bar();
+    if (i < 10) {
+      assertEquals(1000, obj1.prop);
+    } else {
+      assertEquals(3000, obj1.prop);
+    }
+
+    // Add the property into the object.
+    obj1.prop = 2000;
+    if (i < 10) {
+      assertEquals(2000, obj1.prop);
+    } else {
+      assertEquals(3000, obj1.prop);
+    }
+
+    // Make "prop" an accessor property in the prototype.
+    if (i == 9) {
+      Object.defineProperty(Bar.prototype, name,
+                            {get: () => 3000,
+                             set: function(val) { ++setter_called; }});
+    }
+  }
+  assertEquals(1, setter_called);
+}
+
+TestReconfiguringDataToAccessor();
diff --git a/src/v8/test/mjsunit/disallow-codegen-from-strings.js b/src/v8/test/mjsunit/disallow-codegen-from-strings.js
new file mode 100644
index 0000000..30d1b96
--- /dev/null
+++ b/src/v8/test/mjsunit/disallow-codegen-from-strings.js
@@ -0,0 +1,9 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --disallow-code-generation-from-strings
+
+assertThrows("1 + 1", EvalError);
+assertThrows(() => eval("1 + 1"), EvalError);
+assertThrows(() => Function("x", "return x + 1"), EvalError);
diff --git a/src/v8/test/mjsunit/es6/array-find.js b/src/v8/test/mjsunit/es6/array-find.js
index 5f6ba42..9fed027 100644
--- a/src/v8/test/mjsunit/es6/array-find.js
+++ b/src/v8/test/mjsunit/es6/array-find.js
@@ -234,6 +234,40 @@
 
 
 //
+// Test predicate is called for missing properties
+//
+(function() {
+  const obj = {
+    "0": 0,
+    "2": 2,
+    length: 3
+  };
+  const received = [];
+  const predicate = (v) => { received.push(v); return false; };
+  const found = Array.prototype.find.call(obj, predicate);
+  assertEquals(undefined, found);
+  assertArrayEquals([0, undefined, 2], received);
+})();
+
+
+//
+// Test predicate modifying array prototype
+//
+(function() {
+  const a = [0, , 2];
+  const received = [];
+  const predicate = (v) => {
+    a.__proto__ = null;
+    received.push(v);
+    return false;
+  };
+  const found = Array.prototype.find.call(a, predicate);
+  assertEquals(undefined, found);
+  assertArrayEquals([0, undefined, 2], received);
+})();
+
+
+//
 // Test thisArg
 //
 (function() {
diff --git a/src/v8/test/mjsunit/es6/array-findindex.js b/src/v8/test/mjsunit/es6/array-findindex.js
index 716eb4e..d335c15 100644
--- a/src/v8/test/mjsunit/es6/array-findindex.js
+++ b/src/v8/test/mjsunit/es6/array-findindex.js
@@ -234,6 +234,40 @@
 
 
 //
+// Test predicate is called for missing properties
+//
+(function() {
+  const obj = {
+    "0": 0,
+    "2": 2,
+    length: 3
+  };
+  const received = [];
+  const predicate = (v) => { received.push(v); return false; };
+  const found = Array.prototype.findIndex.call(obj, predicate);
+  assertEquals(-1, found);
+  assertArrayEquals([0, undefined, 2], received);
+})();
+
+
+//
+// Test predicate modifying array prototype
+//
+(function() {
+  const a = [0, , 2];
+  const received = [];
+  const predicate = (v) => {
+    a.__proto__ = null;
+    received.push(v);
+    return false;
+  };
+  const found = Array.prototype.findIndex.call(a, predicate);
+  assertEquals(-1, found);
+  assertArrayEquals([0, undefined, 2], received);
+})();
+
+
+//
 // Test thisArg
 //
 (function() {
diff --git a/src/v8/test/mjsunit/es6/array-iterator-turbo.js b/src/v8/test/mjsunit/es6/array-iterator-turbo.js
index 3a159b6..489a53d 100644
--- a/src/v8/test/mjsunit/es6/array-iterator-turbo.js
+++ b/src/v8/test/mjsunit/es6/array-iterator-turbo.js
@@ -3,7 +3,7 @@
 // found in the LICENSE file.
 
 // Flags: --turbo-escape --allow-natives-syntax --no-always-opt
-// Flags: --opt --turbo-filter=*
+// Flags: --opt --turbo-filter=* --no-force-slow-path
 
 "use strict";
 
diff --git a/src/v8/test/mjsunit/es6/call-with-spread-modify-next.js b/src/v8/test/mjsunit/es6/call-with-spread-modify-next.js
index d22a1ea..3cae94f 100644
--- a/src/v8/test/mjsunit/es6/call-with-spread-modify-next.js
+++ b/src/v8/test/mjsunit/es6/call-with-spread-modify-next.js
@@ -37,6 +37,8 @@
 
   var r2 = testMax(1, 2);
 
-  assertEquals(3, called);
+  // .next() is only loaded once during the iteration prologue (see
+  // https://github.com/tc39/ecma262/pull/988/ and v8:6861)
+  assertEquals(1, called);
   assertEquals(2, r2);
 })();
diff --git a/src/v8/test/mjsunit/es6/class-computed-property-names-super.js b/src/v8/test/mjsunit/es6/class-computed-property-names-super.js
index b5a2ac9..4aa816f 100644
--- a/src/v8/test/mjsunit/es6/class-computed-property-names-super.js
+++ b/src/v8/test/mjsunit/es6/class-computed-property-names-super.js
@@ -9,6 +9,52 @@
   return x;
 }
 
+function assertMethodDescriptor(object, name) {
+  var descr = Object.getOwnPropertyDescriptor(object, name);
+  assertTrue(descr.configurable);
+  assertFalse(descr.enumerable);
+  assertTrue(descr.writable);
+  assertEquals('function', typeof descr.value);
+  assertFalse('prototype' in descr.value);
+  assertEquals("" + name, descr.value.name);
+}
+
+
+function assertGetterDescriptor(object, name) {
+  var descr = Object.getOwnPropertyDescriptor(object, name);
+  assertTrue(descr.configurable);
+  assertFalse(descr.enumerable);
+  assertEquals('function', typeof descr.get);
+  assertFalse('prototype' in descr.get);
+  assertEquals(undefined, descr.set);
+  assertEquals("get " + name, descr.get.name);
+}
+
+
+function assertSetterDescriptor(object, name) {
+  var descr = Object.getOwnPropertyDescriptor(object, name);
+  assertTrue(descr.configurable);
+  assertFalse(descr.enumerable);
+  assertEquals(undefined, descr.get);
+  assertEquals('function', typeof descr.set);
+  assertFalse('prototype' in descr.set);
+  assertEquals("set " + name, descr.set.name);
+}
+
+
+function assertAccessorDescriptor(object, name) {
+  var descr = Object.getOwnPropertyDescriptor(object, name);
+  assertTrue(descr.configurable);
+  assertFalse(descr.enumerable);
+  assertEquals('function', typeof descr.get);
+  assertEquals('function', typeof descr.set);
+  assertFalse('prototype' in descr.get);
+  assertFalse('prototype' in descr.set);
+  assertEquals("get " + name, descr.get.name);
+  assertEquals("set " + name, descr.set.name);
+}
+
+
 
 (function TestComputedMethodSuper() {
   class Base {
@@ -21,14 +67,28 @@
     [ID('b')]() { return 'b' + super.m(); }
     [0]() { return '0' + super.m(); }
     [ID(1)]() { return '1' + super.m(); }
+    [ID(2147483649)]() { return '2147483649' + super.m(); }
+    [ID(4294967294)]() { return '4294967294' + super.m(); }
+    [ID(4294967295)]() { return '4294967295' + super.m(); }
   }
 
   assertSame(Derived.prototype, Derived.prototype.a[%HomeObjectSymbol()]);
 
+  assertMethodDescriptor(Derived.prototype, "a");
+  assertMethodDescriptor(Derived.prototype, "b");
+  assertMethodDescriptor(Derived.prototype, 0);
+  assertMethodDescriptor(Derived.prototype, 1);
+  assertMethodDescriptor(Derived.prototype, 2147483649);
+  assertMethodDescriptor(Derived.prototype, 4294967294);
+  assertMethodDescriptor(Derived.prototype, 4294967295);
+
   assertEquals('a base m', new Derived().a());
   assertEquals('b base m', new Derived().b());
   assertEquals('0 base m', new Derived()[0]());
   assertEquals('1 base m', new Derived()[1]());
+  assertEquals('2147483649 base m', new Derived()[2147483649]());
+  assertEquals('4294967294 base m', new Derived()[4294967294]());
+  assertEquals('4294967295 base m', new Derived()[4294967295]());
 })();
 
 
@@ -43,11 +103,26 @@
     get [ID('b')]() { return 'b' + super.m(); }
     get [0]() { return '0' + super.m(); }
     get [ID(1)]() { return '1' + super.m(); }
+    get [ID(2147483649)]() { return '2147483649' + super.m(); }
+    get [ID(4294967294)]() { return '4294967294' + super.m(); }
+    get [ID(4294967295)]() { return '4294967295' + super.m(); }
   }
+
+  assertGetterDescriptor(Derived.prototype, "a");
+  assertGetterDescriptor(Derived.prototype, "b");
+  assertGetterDescriptor(Derived.prototype, 0);
+  assertGetterDescriptor(Derived.prototype, 1);
+  assertGetterDescriptor(Derived.prototype, 2147483649);
+  assertGetterDescriptor(Derived.prototype, 4294967294);
+  assertGetterDescriptor(Derived.prototype, 4294967295);
+
   assertEquals('a base m', new Derived().a);
   assertEquals('b base m', new Derived().b);
   assertEquals('0 base m', new Derived()[0]);
   assertEquals('1 base m', new Derived()[1]);
+  assertEquals('2147483649 base m', new Derived()[2147483649]);
+  assertEquals('4294967294 base m', new Derived()[4294967294]);
+  assertEquals('4294967295 base m', new Derived()[4294967295]);
 })();
 
 
@@ -63,7 +138,18 @@
     set [ID('b')](v) { super.m('b', v); }
     set [0](v) { super.m('0', v); }
     set [ID(1)](v) { super.m('1', v); }
+    set [ID(2147483649)](v) { super.m('2147483649', v); }
+    set [ID(4294967294)](v) { super.m('4294967294', v); }
+    set [ID(4294967295)](v) { super.m('4294967295', v); }
   }
+  assertSetterDescriptor(Derived.prototype, "a");
+  assertSetterDescriptor(Derived.prototype, "b");
+  assertSetterDescriptor(Derived.prototype, 0);
+  assertSetterDescriptor(Derived.prototype, 1);
+  assertSetterDescriptor(Derived.prototype, 2147483649);
+  assertSetterDescriptor(Derived.prototype, 4294967294);
+  assertSetterDescriptor(Derived.prototype, 4294967295);
+
   new Derived().a = 2;
   assertEquals('a 2', value);
   new Derived().b = 3;
@@ -72,4 +158,10 @@
   assertEquals('0 4', value);
   new Derived()[1] = 5;
   assertEquals('1 5', value);
+  new Derived()[2147483649] = 6;
+  assertEquals('2147483649 6', value);
+  new Derived()[4294967294] = 7;
+  assertEquals('4294967294 7', value);
+  new Derived()[4294967295] = 8;
+  assertEquals('4294967295 8', value);
 })();
diff --git a/src/v8/test/mjsunit/es6/classes.js b/src/v8/test/mjsunit/es6/classes.js
index f8a1499..a123dad 100644
--- a/src/v8/test/mjsunit/es6/classes.js
+++ b/src/v8/test/mjsunit/es6/classes.js
@@ -195,6 +195,7 @@
   assertTrue(descr.writable);
   assertEquals('function', typeof descr.value);
   assertFalse('prototype' in descr.value);
+  assertEquals(name, descr.value.name);
 }
 
 
@@ -205,6 +206,7 @@
   assertEquals('function', typeof descr.get);
   assertFalse('prototype' in descr.get);
   assertEquals(undefined, descr.set);
+  assertEquals("get " + name, descr.get.name);
 }
 
 
@@ -215,6 +217,7 @@
   assertEquals(undefined, descr.get);
   assertEquals('function', typeof descr.set);
   assertFalse('prototype' in descr.set);
+  assertEquals("set " + name, descr.set.name);
 }
 
 
@@ -226,6 +229,8 @@
   assertEquals('function', typeof descr.set);
   assertFalse('prototype' in descr.get);
   assertFalse('prototype' in descr.set);
+  assertEquals("get " + name, descr.get.name);
+  assertEquals("set " + name, descr.set.name);
 }
 
 
@@ -590,15 +595,38 @@
     static 4() { return 4; }
     static get 5() { return 5; }
     static set 6(_) {}
+
+    2147483649() { return 2147483649; }
+    get 2147483650() { return 2147483650; }
+    set 2147483651(_) {}
+
+    static 2147483652() { return 2147483652; }
+    static get 2147483653() { return 2147483653; }
+    static set 2147483654(_) {}
+
+    4294967294() { return 4294967294; }
+    4294967295() { return 4294967295; }
+    static 4294967294() { return 4294967294; }
+    static 4294967295() { return 4294967295; }
   }
 
   assertMethodDescriptor(B.prototype, '1');
   assertGetterDescriptor(B.prototype, '2');
   assertSetterDescriptor(B.prototype, '3');
+  assertMethodDescriptor(B.prototype, '2147483649');
+  assertGetterDescriptor(B.prototype, '2147483650');
+  assertSetterDescriptor(B.prototype, '2147483651');
+  assertMethodDescriptor(B.prototype, '4294967294');
+  assertMethodDescriptor(B.prototype, '4294967295');
 
   assertMethodDescriptor(B, '4');
   assertGetterDescriptor(B, '5');
   assertSetterDescriptor(B, '6');
+  assertMethodDescriptor(B, '2147483652');
+  assertGetterDescriptor(B, '2147483653');
+  assertSetterDescriptor(B, '2147483654');
+  assertMethodDescriptor(B, '4294967294');
+  assertMethodDescriptor(B, '4294967295');
 
   class C extends B {
     1() { return super[1](); }
@@ -606,12 +634,23 @@
 
     static 4() { return super[4](); }
     static get 5() { return super[5]; }
+
+    2147483649() { return super[2147483649](); }
+    get 2147483650() { return super[2147483650]; }
+
+    static 2147483652() { return super[2147483652](); }
+    static get 2147483653() { return super[2147483653]; }
+
   }
 
   assertEquals(1, new C()[1]());
   assertEquals(2, new C()[2]);
+  assertEquals(2147483649, new C()[2147483649]());
+  assertEquals(2147483650, new C()[2147483650]);
   assertEquals(4, C[4]());
   assertEquals(5, C[5]);
+  assertEquals(2147483652, C[2147483652]());
+  assertEquals(2147483653, C[2147483653]);
 })();
 
 
@@ -1047,3 +1086,103 @@
   assertEquals(42, usingYieldInExtends());
 
 })();
+
+
+(function testLargeClassesMethods() {
+  const kLimit = 2000;
+  let evalString = "(function(i) { " +
+      "let clazz = class { " +
+      "   constructor(i) { this.value = i; } ";
+  for (let i = 0; i < 2000; i++) {
+    evalString  += "property"+i+"() { return "+i+"; }; "
+  }
+  evalString += "};" +
+      " return new clazz(i); })";
+
+  let fn = eval(evalString);
+  assertEquals(fn(1).value, 1);
+  assertEquals(fn(2).value, 2);
+  assertEquals(fn(3).value, 3);
+  %OptimizeFunctionOnNextCall(fn);
+  assertEquals(fn(4).value, 4);
+
+  let instance = fn(1);
+  assertEquals(Object.getOwnPropertyNames(instance).length, 1);
+  assertEquals(Object.getOwnPropertyNames(instance.__proto__).length,
+      kLimit + 1);
+
+  // Call all instance functions.
+  for (let i = 0; i < kLimit; i++) {
+    const key = "property" + i;
+    assertEquals(instance[key](), i);
+  }
+})();
+
+
+(function testLargeClassesStaticMethods() {
+  const kLimit = 2000;
+  let evalString = "(function(i) { " +
+      "let clazz = class { " +
+      "   constructor(i) { this.value = i; } ";
+  for (let i = 0; i < kLimit; i++) {
+    evalString  += "static property"+i+"() { return "+i+" }; "
+  }
+  evalString += "};" +
+      " return new clazz(i); })";
+
+  let fn = eval(evalString);
+
+  assertEquals(fn(1).value, 1);
+  assertEquals(fn(2).value, 2);
+  assertEquals(fn(3).value, 3);
+  %OptimizeFunctionOnNextCall(fn);
+  assertEquals(fn(4).value, 4);
+
+  let instance = fn(1);
+  assertEquals(Object.getOwnPropertyNames(instance).length, 1);
+  assertEquals(instance.value, 1);
+  instance.value = 10;
+  assertEquals(instance.value, 10);
+
+  // kLimit + nof default properties (length, prototype, name).
+  assertEquals(Object.getOwnPropertyNames(instance.constructor).length,
+      kLimit + 3);
+
+  // Call all static properties.
+  for (let i = 0; i < kLimit; i++) {
+    const key = "property" + i;
+    assertEquals(instance.constructor[key](), i);
+  }
+})();
+
+
+(function testLargeClassesProperties(){
+  const kLimit = 2000;
+  let evalString = "(function(i) { " +
+      "let clazz = class { " +
+      "   constructor(i) { this.value = i;";
+  for (let i = 0; i < kLimit ; i++) {
+    evalString  += "this.property"+i +" = "+i+"; "
+  }
+  evalString += "}};" +
+      " return (new clazz(i)); })";
+
+  let fn = eval(evalString);
+  assertEquals(fn(1).value, 1);
+  assertEquals(fn(2).value, 2);
+  assertEquals(fn(3).value, 3);
+  %OptimizeFunctionOnNextCall(fn);
+  assertEquals(fn(4).value, 4);
+
+  let instance = fn(1);
+  assertEquals(Object.getOwnPropertyNames(instance).length, kLimit+1);
+
+  // Get and set all properties.
+  for (let i = 0; i < kLimit; i++) {
+    const key = "property" + i;
+    assertEquals(instance[key], i);
+    const value = "value"+i;
+    instance[key] = value;
+    assertEquals(instance[key], value);
+  }
+})();
diff --git a/src/v8/test/mjsunit/es6/completion.js b/src/v8/test/mjsunit/es6/completion.js
index b9d93f4..d88fcd0 100644
--- a/src/v8/test/mjsunit/es6/completion.js
+++ b/src/v8/test/mjsunit/es6/completion.js
@@ -169,3 +169,10 @@
 assertUndef(eval("1; try{2; throwOnReturn();} catch(e){}"));
 assertUndef(eval("1; twoFunc();"));
 assertEquals(2, eval("1; with ( { a: 0 } ) { 2; }"));
+
+// https://bugs.chromium.org/p/chromium/issues/detail?id=787698
+assertEquals(42, eval("try {42} catch (_) {} finally {}"));
+assertEquals(42, eval("try {42} catch (_) {} finally {43}"));
+assertEquals(42, eval("foo: try {42} catch (_) {} finally {}"));
+assertEquals(42, eval("foo: try {42} catch (_) {} finally {43}"));
+assertEquals(43, eval("foo: try {42} catch (_) {} finally {43; break foo}"));
diff --git a/src/v8/test/mjsunit/es6/computed-property-names-object-literals-methods.js b/src/v8/test/mjsunit/es6/computed-property-names-object-literals-methods.js
index 36afbe2..24a3572 100644
--- a/src/v8/test/mjsunit/es6/computed-property-names-object-literals-methods.js
+++ b/src/v8/test/mjsunit/es6/computed-property-names-object-literals-methods.js
@@ -2,8 +2,6 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-// Flags: --harmony-async-iteration
-
 function ID(x) {
   return x;
 }
diff --git a/src/v8/test/mjsunit/es6/destructuring-assignment.js b/src/v8/test/mjsunit/es6/destructuring-assignment.js
index 579c877..dee7a0b 100644
--- a/src/v8/test/mjsunit/es6/destructuring-assignment.js
+++ b/src/v8/test/mjsunit/es6/destructuring-assignment.js
@@ -513,25 +513,31 @@
   }
 
   function FakeNewTarget() {}
-  assertEquals(undefined, ReturnNewTarget1());
-  assertEquals(ReturnNewTarget1, new ReturnNewTarget1());
-  assertEquals(FakeNewTarget,
-               Reflect.construct(ReturnNewTarget1, [], FakeNewTarget));
 
-  assertEquals(undefined, ReturnNewTarget2());
-  assertEquals(ReturnNewTarget2, new ReturnNewTarget2());
-  assertEquals(FakeNewTarget,
-               Reflect.construct(ReturnNewTarget2, [], FakeNewTarget));
+  function construct() {
+    assertEquals(undefined, ReturnNewTarget1());
+    assertEquals(ReturnNewTarget1, new ReturnNewTarget1());
+    assertEquals(FakeNewTarget,
+                 Reflect.construct(ReturnNewTarget1, [], FakeNewTarget));
 
-  assertEquals(undefined, ReturnNewTarget3());
-  assertEquals(ReturnNewTarget3, new ReturnNewTarget3());
-  assertEquals(FakeNewTarget,
-               Reflect.construct(ReturnNewTarget3, [], FakeNewTarget));
+    assertEquals(undefined, ReturnNewTarget2());
+    assertEquals(ReturnNewTarget2, new ReturnNewTarget2());
+    assertEquals(FakeNewTarget,
+                 Reflect.construct(ReturnNewTarget2, [], FakeNewTarget));
 
-  assertEquals(undefined, ReturnNewTarget4());
-  assertEquals(ReturnNewTarget4, new ReturnNewTarget4());
-  assertEquals(FakeNewTarget,
-               Reflect.construct(ReturnNewTarget4, [], FakeNewTarget));
+    assertEquals(undefined, ReturnNewTarget3());
+    assertEquals(ReturnNewTarget3, new ReturnNewTarget3());
+    assertEquals(FakeNewTarget,
+                 Reflect.construct(ReturnNewTarget3, [], FakeNewTarget));
+
+    assertEquals(undefined, ReturnNewTarget4());
+    assertEquals(ReturnNewTarget4, new ReturnNewTarget4());
+    assertEquals(FakeNewTarget,
+                 Reflect.construct(ReturnNewTarget4, [], FakeNewTarget));
+  }
+  construct();
+  FakeNewTarget.prototype = 1;
+  construct();
 })();
 
 (function testSuperCall() {
diff --git a/src/v8/test/mjsunit/es6/iteration-semantics.js b/src/v8/test/mjsunit/es6/iteration-semantics.js
index 558fb83..40037be 100644
--- a/src/v8/test/mjsunit/es6/iteration-semantics.js
+++ b/src/v8/test/mjsunit/es6/iteration-semantics.js
@@ -220,13 +220,11 @@
 assertThrows('fold(sum, 0, unreachable(false))', TypeError);
 assertThrows('fold(sum, 0, unreachable(37))', TypeError);
 
-// "next" is looked up each time.
-assertThrows('fold(sum, 0, remove_next_after(integers_until(10), 5))',
-             TypeError);
-// It is not called at any other time.
+// "next" is looked up only once during the iteration prologue (see
+// https://github.com/tc39/ecma262/pull/988)
+assertEquals(45, fold(sum, 0, remove_next_after(integers_until(10), 5)));
 assertEquals(45,
              fold(sum, 0, remove_next_after(integers_until(10), 10)));
-// It is not looked up too many times.
 assertEquals(45,
              fold(sum, 0, poison_next_after(integers_until(10), 10)));
 
diff --git a/src/v8/test/mjsunit/es6/new-target.js b/src/v8/test/mjsunit/es6/new-target.js
index 14446fc..c77c153 100644
--- a/src/v8/test/mjsunit/es6/new-target.js
+++ b/src/v8/test/mjsunit/es6/new-target.js
@@ -472,3 +472,12 @@
   tagNewTargetProp.Prop = C;
   assertEquals(new tagNewTargetProp, ["tagNewTargetProp"]);
 })();
+
+(function testDeleteSloppy() {
+  assertTrue(delete new.target);
+})();
+
+(function testDeleteStrict() {
+  "use strict";
+  assertTrue(delete new.target);
+})();
diff --git a/src/v8/test/mjsunit/es6/proxies.js b/src/v8/test/mjsunit/es6/proxies.js
index 3b9a4c5..75a80a1 100644
--- a/src/v8/test/mjsunit/es6/proxies.js
+++ b/src/v8/test/mjsunit/es6/proxies.js
@@ -50,6 +50,19 @@
 }
 
 // ---------------------------------------------------------------------------
+// Test Proxy constructor properties
+
+(function TestProxyProperties() {
+  assertEquals(2, Proxy.length);
+  assertEquals(Function.__proto__, Proxy.__proto__);
+  assertEquals(null, Proxy.prototype);
+  assertEquals(undefined, Object.getOwnPropertyDescriptor(Proxy, "arguments"));
+  assertThrows(() => Proxy.arguments, TypeError);
+  assertEquals(undefined, Object.getOwnPropertyDescriptor(Proxy, "caller"));
+  assertThrows(() => Proxy.caller, TypeError);
+})();
+
+// ---------------------------------------------------------------------------
 // Getting property descriptors (Object.getOwnPropertyDescriptor).
 
 var key
diff --git a/src/v8/test/mjsunit/es6/reflect-construct.js b/src/v8/test/mjsunit/es6/reflect-construct.js
index 03e8397..34b6f27 100644
--- a/src/v8/test/mjsunit/es6/reflect-construct.js
+++ b/src/v8/test/mjsunit/es6/reflect-construct.js
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 //
-// Flags: --allow-unsafe-function-constructor --harmony-async-iteration
+// Flags: --allow-unsafe-function-constructor
 
 
 (function testReflectConstructArity() {
diff --git a/src/v8/test/mjsunit/es6/regexp-sticky.js b/src/v8/test/mjsunit/es6/regexp-sticky.js
index df39763..46006fb 100644
--- a/src/v8/test/mjsunit/es6/regexp-sticky.js
+++ b/src/v8/test/mjsunit/es6/regexp-sticky.js
@@ -43,9 +43,11 @@
 
 var stickyplain = /foobar/y;
 
-assertTrue(!!"foobar".match(stickyplain));
+assertTrue(!!"foobarfoobar".match(stickyplain));
 assertEquals(6, stickyplain.lastIndex);
-assertFalse(!!"..foobar".match(stickyplain));
+assertTrue(!!"foobarfoobar".match(stickyplain));
+assertEquals(12, stickyplain.lastIndex);
+assertFalse(!!"..foobarfoobar".match(stickyplain));
 
 var global = /foo.bar/g;
 
diff --git a/src/v8/test/mjsunit/es6/regress/regress-777182.js b/src/v8/test/mjsunit/es6/regress/regress-777182.js
new file mode 100644
index 0000000..6d6eb55
--- /dev/null
+++ b/src/v8/test/mjsunit/es6/regress/regress-777182.js
@@ -0,0 +1,9 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --enable-slow-asserts
+
+var __v_65159 = [1.3];
+__v_65159.length = 0;
+new Int8Array(10).set(__v_65159);
diff --git a/src/v8/test/mjsunit/harmony/sloppy-no-duplicate-generators.js b/src/v8/test/mjsunit/es6/sloppy-no-duplicate-generators.js
similarity index 93%
rename from src/v8/test/mjsunit/harmony/sloppy-no-duplicate-generators.js
rename to src/v8/test/mjsunit/es6/sloppy-no-duplicate-generators.js
index de2e461..a10f3f5 100644
--- a/src/v8/test/mjsunit/harmony/sloppy-no-duplicate-generators.js
+++ b/src/v8/test/mjsunit/es6/sloppy-no-duplicate-generators.js
@@ -2,8 +2,6 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-// Flags: --harmony-restrictive-generators
-
 // Generators don't get sloppy-mode block-scoped function hoisting
 
 // No hoisting to the global scope
diff --git a/src/v8/test/mjsunit/es6/spread-call.js b/src/v8/test/mjsunit/es6/spread-call.js
index cdedd99..7403e07 100644
--- a/src/v8/test/mjsunit/es6/spread-call.js
+++ b/src/v8/test/mjsunit/es6/spread-call.js
@@ -376,6 +376,11 @@
   a[3] = 4;
   var called = 0;
 
+  // .next method is only accessed during iteration prologue (see
+  // https://github.com/tc39/ecma262/pull/988)
+  let ArrayIteratorPrototype = Array.prototype[Symbol.iterator]().__proto__;
+  let ArrayIteratorPrototypeNextDescriptor =
+      Object.getOwnPropertyDescriptor(ArrayIteratorPrototype, 'next');
   Object.defineProperty(Array.prototype, 2, {
     get: function() {
       var ai = a[Symbol.iterator]();
@@ -384,7 +389,8 @@
         get: function() {
           called++;
           return original_next;
-        }
+        },
+        configurable: true
       });
       return 3;
     },
@@ -392,8 +398,10 @@
   });
 
   assertEquals(10, sum(...a));
-  assertEquals(2, called);
+  assertEquals(0, called);
 
+  Object.defineProperty(ArrayIteratorPrototype, 'next',
+                        ArrayIteratorPrototypeNextDescriptor);
   Object.defineProperty(Array.prototype, 2, {});
 })();
 
@@ -430,9 +438,9 @@
 
   countArgs(...a);
 
-  // should be called 4 times; 3 for the values, 1 for the final
-  // {value: undefined, done: true} pair
-  assertEquals(4, called);
+  // .next method is only accessed during iteration prologue (see
+  // https://github.com/tc39/ecma262/pull/988)
+  assertEquals(1, called);
 })();
 
 (function testArrayIteratorPrototypeModified() {
diff --git a/src/v8/test/mjsunit/es6/string-match.js b/src/v8/test/mjsunit/es6/string-match.js
index 2c7affe..6fb6a1d 100644
--- a/src/v8/test/mjsunit/es6/string-match.js
+++ b/src/v8/test/mjsunit/es6/string-match.js
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-var pattern = {};
+const pattern = {};
 pattern[Symbol.match] = function(string) {
   return string.length;
 };
@@ -11,6 +11,9 @@
              TypeError);
 // Override is called.
 assertEquals(5, "abcde".match(pattern));
+// Receiver is not converted to string if pattern has Symbol.match
+const receiver = { toString(){ throw new Error(); }, length: 6 };
+assertEquals(6, String.prototype.match.call(receiver, pattern));
 // Non-callable override.
 pattern[Symbol.match] = "dumdidum";
 assertThrows(() => "abcde".match(pattern), TypeError);
diff --git a/src/v8/test/mjsunit/es6/string-search.js b/src/v8/test/mjsunit/es6/string-search.js
index cbdf33d..aa71057 100644
--- a/src/v8/test/mjsunit/es6/string-search.js
+++ b/src/v8/test/mjsunit/es6/string-search.js
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-var pattern = {};
+const pattern = {};
 pattern[Symbol.search] = function(string) {
   return string.length;
 };
@@ -11,6 +11,9 @@
              TypeError);
 // Override is called.
 assertEquals(5, "abcde".search(pattern));
+// Receiver is not converted to string if pattern has Symbol.match
+const receiver = { toString(){ throw new Error(); }, length: 6 };
+assertEquals(6, String.prototype.search.call(receiver, pattern));
 // Non-callable override.
 pattern[Symbol.search] = "dumdidum";
 assertThrows(() => "abcde".search(pattern), TypeError);
diff --git a/src/v8/test/mjsunit/es6/super-with-spread-modify-next.js b/src/v8/test/mjsunit/es6/super-with-spread-modify-next.js
index 299917d..cd7798b 100644
--- a/src/v8/test/mjsunit/es6/super-with-spread-modify-next.js
+++ b/src/v8/test/mjsunit/es6/super-with-spread-modify-next.js
@@ -48,7 +48,9 @@
 
   var r2 = testArgumentsPoint(1, 2);
 
-  assertEquals(3, called);
+  // .next() is only loaded once during the iteration prologue (see
+  // https://github.com/tc39/ecma262/pull/988/ and v8:6861)
+  assertEquals(1, called);
   assertInstanceof(r2, ArgumentsPoint);
   assertInstanceof(r2, Point);
   assertEquals(r2.x, 1);
diff --git a/src/v8/test/mjsunit/es6/templates.js b/src/v8/test/mjsunit/es6/templates.js
index a5157b8..3eb73e4 100644
--- a/src/v8/test/mjsunit/es6/templates.js
+++ b/src/v8/test/mjsunit/es6/templates.js
@@ -2,8 +2,6 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-// Flags: --no-harmony-template-escapes
-
 var num = 5;
 var str = "str";
 function fn() { return "result"; }
@@ -481,8 +479,9 @@
   for (var i = 0; i < 10; i++) {
     var code = "`\\0" + i + "`";
     assertThrows(code, SyntaxError);
+    // Not an error if tagged.
     code = "(function(){})" + code;
-    assertThrows(code, SyntaxError);
+    assertDoesNotThrow(code, SyntaxError);
   }
 
   assertEquals('\\0', String.raw`\0`);
@@ -495,8 +494,9 @@
   for (var i = 1; i < 8; i++) {
     var code = "`\\" + i + "`";
     assertThrows(code, SyntaxError);
+    // Not an error if tagged.
     code = "(function(){})" + code;
-    assertThrows(code, SyntaxError);
+    assertDoesNotThrow(code, SyntaxError);
   }
 })();
 
@@ -716,3 +716,22 @@
   assertEquals(["a", "b"], result);
   assertSame(result, f());
 })();
+
+(function testTaggedTemplateInvalidAssignmentTargetStrict() {
+  "use strict";
+  function f() {}
+  assertThrows(() => Function("++f`foo`"), ReferenceError);
+  assertThrows(() => Function("f`foo`++"), ReferenceError);
+  assertThrows(() => Function("--f`foo`"), ReferenceError);
+  assertThrows(() => Function("f`foo`--"), ReferenceError);
+  assertThrows(() => Function("f`foo` = 1"), ReferenceError);
+})();
+
+(function testTaggedTemplateInvalidAssignmentTargetSloppy() {
+  function f() {}
+  assertThrows(() => Function("++f`foo`"), ReferenceError);
+  assertThrows(() => Function("f`foo`++"), ReferenceError);
+  assertThrows(() => Function("--f`foo`"), ReferenceError);
+  assertThrows(() => Function("f`foo`--"), ReferenceError);
+  assertThrows(() => Function("f`foo` = 1"), ReferenceError);
+})();
diff --git a/src/v8/test/mjsunit/es6/typedarray-set-bytelength-not-smi.js b/src/v8/test/mjsunit/es6/typedarray-set-bytelength-not-smi.js
new file mode 100644
index 0000000..1f84287
--- /dev/null
+++ b/src/v8/test/mjsunit/es6/typedarray-set-bytelength-not-smi.js
@@ -0,0 +1,21 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax --mock-arraybuffer-allocator
+
+(function TestBufferByteLengthNonSmi() {
+  const source_buffer_length = %_MaxSmi() + 1;
+  const source_buffer = new ArrayBuffer(source_buffer_length);
+  const source = new Uint16Array(source_buffer);
+  assertEquals(source_buffer_length, source_buffer.byteLength);
+  assertEquals(source_buffer_length / 2, source.length);
+
+  const target_buffer_length = %_MaxSmi() - 1;
+  const target_buffer = new ArrayBuffer(target_buffer_length);
+  const target = new Uint16Array(target_buffer);
+  assertEquals(target_buffer_length, target_buffer.byteLength);
+  assertEquals(target_buffer_length / 2, target.length);
+
+  assertThrows(() => target.set(source), RangeError);
+})();
diff --git a/src/v8/test/mjsunit/es6/typedarray.js b/src/v8/test/mjsunit/es6/typedarray.js
index 4aa81ca..02bd91c 100644
--- a/src/v8/test/mjsunit/es6/typedarray.js
+++ b/src/v8/test/mjsunit/es6/typedarray.js
@@ -25,6 +25,8 @@
 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
+// Flags: --allow-natives-syntax
+
 // ArrayBuffer
 
 function TestByteLength(param, expectedByteLength) {
@@ -339,16 +341,30 @@
 
   // Modified %ArrayIteratorPrototype%.next() method is honoured (v8:5699)
   const ArrayIteratorPrototype = Object.getPrototypeOf([][Symbol.iterator]());
+  const ArrayIteratorPrototypeNextDescriptor =
+      Object.getOwnPropertyDescriptor(ArrayIteratorPrototype, 'next');
   const ArrayIteratorPrototypeNext = ArrayIteratorPrototype.next;
   ArrayIteratorPrototype.next = function() {
     return { done: true };
   };
   genArr = new constr([1, 2, 3]);
   assertEquals(0, genArr.length);
+
   ArrayIteratorPrototype.next = ArrayIteratorPrototypeNext;
 
-  // Modified %ArrayIteratorPrototype%.next() during iteration is honoured as
-  // well.
+  // Modified %ArrayIteratorPrototype%.next() is only loaded during the iterator
+  // prologue.
+  let nextMethod = ArrayIteratorPrototypeNext;
+  let getNextCount = 0;
+  Object.defineProperty(ArrayIteratorPrototype, 'next', {
+    get() {
+      getNextCount++;
+      return nextMethod;
+    },
+    set(v) { nextMethod = v; },
+    configurable: true
+  });
+
   genArr = new constr(Object.defineProperty([1, , 3], 1, {
     get() {
       ArrayIteratorPrototype.next = function() {
@@ -357,9 +373,13 @@
       return 2;
     }
   }));
-  assertEquals(2, genArr.length);
+  Object.defineProperty(ArrayIteratorPrototype, 'next',
+                        ArrayIteratorPrototypeNextDescriptor);
+  assertEquals(1, getNextCount);
+  assertEquals(3, genArr.length);
   assertEquals(1, genArr[0]);
   assertEquals(2, genArr[1]);
+  assertEquals(3, genArr[2]);
   ArrayIteratorPrototype.next = ArrayIteratorPrototypeNext;
 }
 
@@ -609,6 +629,114 @@
   a101[0] = 42;
   b101.set(a101);
   assertArrayPrefix([42], b101);
+
+  // Detached array buffer when accessing a source element
+  var a111 = new Int8Array(100);
+  var evilarr = new Array(100);
+  var detached = false;
+  evilarr[1] = {
+    [Symbol.toPrimitive]() {
+      %ArrayBufferNeuter(a111.buffer);
+      detached = true;
+      return 1;
+    }
+  };
+  assertThrows(() => a111.set(evilarr), TypeError);
+  assertEquals(true, detached);
+
+  // Check if the target is a typed array before converting offset to integer
+  var tmp = {
+    [Symbol.toPrimitive]() {
+      assertUnreachable("Parameter should not be processed when " +
+                        "array.[[ViewedArrayBuffer]] is neutered.");
+      return 1;
+    }
+  };
+  assertThrows(() => Int8Array.prototype.set.call(1, tmp), TypeError);
+  assertThrows(() => Int8Array.prototype.set.call([], tmp), TypeError);
+
+  // Detached array buffer when converting offset.
+  {
+    for (const klass of typedArrayConstructors) {
+      const xs = new klass(10);
+      let detached = false;
+      const offset = {
+        [Symbol.toPrimitive]() {
+          %ArrayBufferNeuter(xs.buffer);
+          detached = true;
+          return 0;
+        }
+      };
+      assertThrows(() => xs.set(xs, offset), TypeError);
+      assertEquals(true, detached);
+    }
+  }
+
+  // Detached JSTypedArray source argument.
+  {
+    for (const klass of typedArrayConstructors) {
+      const a = new klass(2);
+      for (let i = 0; i < a.length; i++) a[i] = i;
+      %ArrayBufferNeuter(a.buffer);
+
+      const b = new klass(2);
+      assertThrows(() => b.set(a), TypeError);
+    }
+  }
+
+  // Various offset edge cases.
+  {
+    for (const klass of typedArrayConstructors) {
+      const xs = new klass(10);
+      assertThrows(() => xs.set(xs, -1), RangeError);
+      assertThrows(() => xs.set(xs, -1 * 2**64), RangeError);
+      xs.set(xs, -0.0);
+      xs.set(xs, 0.0);
+      xs.set(xs, 0.5);
+      assertThrows(() => xs.set(xs, 2**64), RangeError);
+    }
+  }
+
+  // Exhaustively test elements kind combinations with JSArray source arg.
+  {
+    const kSize = 3;
+    const targets = typedArrayConstructors.map(klass => new klass(kSize));
+    const sources = [ [0,1,2]        // PACKED_SMI
+                    , [0,,2]         // HOLEY_SMI
+                    , [0.1,0.2,0.3]  // PACKED_DOUBLE
+                    , [0.1,,0.3]     // HOLEY_DOUBLE
+                    , [{},{},{}]     // PACKED
+                    , [{},,{}]       // HOLEY
+                    , []             // DICTIONARY (patched later)
+                    ];
+
+    // Migrate to DICTIONARY_ELEMENTS.
+    Object.defineProperty(sources[6], 0, {});
+
+    assertTrue(%HasSmiElements(sources[0]));
+    assertTrue(%HasFastElements(sources[0]) && !%HasHoleyElements(sources[0]));
+    assertTrue(%HasSmiElements(sources[1]));
+    assertTrue(%HasFastElements(sources[1]) && %HasHoleyElements(sources[1]));
+    assertTrue(%HasDoubleElements(sources[2]));
+    assertTrue(%HasFastElements(sources[2]) && !%HasHoleyElements(sources[2]));
+    assertTrue(%HasDoubleElements(sources[3]));
+    assertTrue(%HasFastElements(sources[3]) && %HasHoleyElements(sources[3]));
+    assertTrue(%HasObjectElements(sources[4]));
+    assertTrue(%HasFastElements(sources[4]) && !%HasHoleyElements(sources[4]));
+    assertTrue(%HasObjectElements(sources[4]));
+    assertTrue(%HasFastElements(sources[4]) && !%HasHoleyElements(sources[4]));
+    assertTrue(%HasObjectElements(sources[5]));
+    assertTrue(%HasFastElements(sources[5]) && %HasHoleyElements(sources[5]));
+    assertTrue(%HasDictionaryElements(sources[6]));
+
+    for (const target of targets) {
+      for (const source of sources) {
+        target.set(source);
+        %HeapObjectVerify(target);
+        %HeapObjectVerify(source);
+      }
+    }
+  }
 }
 
 TestTypedArraySet();
diff --git a/src/v8/test/mjsunit/es6/unicode-character-ranges.js b/src/v8/test/mjsunit/es6/unicode-character-ranges.js
index f39004f..770d5a5 100644
--- a/src/v8/test/mjsunit/es6/unicode-character-ranges.js
+++ b/src/v8/test/mjsunit/es6/unicode-character-ranges.js
@@ -2,8 +2,6 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-// Flags: --harmony-regexp-lookbehind
-
 function execl(expectation, regexp, subject) {
   if (regexp instanceof String) regexp = new RegExp(regexp, "u");
   assertEquals(expectation, regexp.exec(subject));
diff --git a/src/v8/test/mjsunit/es6/unicode-regexp-backrefs.js b/src/v8/test/mjsunit/es6/unicode-regexp-backrefs.js
index 56b9c5e..0a0b951 100644
--- a/src/v8/test/mjsunit/es6/unicode-regexp-backrefs.js
+++ b/src/v8/test/mjsunit/es6/unicode-regexp-backrefs.js
@@ -2,8 +2,6 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-// Flags: --harmony-regexp-lookbehind
-
 // Back reference does not end in the middle of a surrogate pair.
 function replace(string) {
   return string.replace(/L/g, "\ud800")
diff --git a/src/v8/test/mjsunit/es6/unicode-regexp-last-index.js b/src/v8/test/mjsunit/es6/unicode-regexp-last-index.js
index 67fbac7..714d3d1 100644
--- a/src/v8/test/mjsunit/es6/unicode-regexp-last-index.js
+++ b/src/v8/test/mjsunit/es6/unicode-regexp-last-index.js
@@ -2,8 +2,6 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-// Flags: --harmony-regexp-lookbehind
-
 var r = /./ug;
 assertEquals(["\ud800\udc00"], r.exec("\ud800\udc00\ud801\udc01"));
 assertEquals(2, r.lastIndex);
diff --git a/src/v8/test/mjsunit/es8/object-entries.js b/src/v8/test/mjsunit/es8/object-entries.js
index c59d81c..5c7e74e 100644
--- a/src/v8/test/mjsunit/es8/object-entries.js
+++ b/src/v8/test/mjsunit/es8/object-entries.js
@@ -284,8 +284,8 @@
     HOLEY_DOUBLE_ELEMENTS: [ [, , NaN], [ ["2", NaN] ] ],
 
     DICTIONARY_ELEMENTS: [ Object.defineProperties({ 10000: "world" }, {
-        100: { enumerable: true, value: "hello" },
-        99: { enumerable: false, value: "nope" }
+       100: { enumerable: true, value: "hello", configurable: true},
+        99: { enumerable: false, value: "nope", configurable: true}
       }), [ ["100", "hello"], ["10000", "world" ] ] ],
     FAST_SLOPPY_ARGUMENTS_ELEMENTS: [
         fastSloppyArguments("a", "b", "c"),
@@ -298,17 +298,42 @@
         [ ["0", "s"], ["1", "t"], ["2", "r"]] ],
     SLOW_STRING_WRAPPER_ELEMENTS: [
         Object.defineProperties(new String("str"), {
-          10000: { enumerable: false, value: "X" },
-          9999: { enumerable: true, value: "Y" }
+          10000: { enumerable: false, value: "X", configurable: true},
+          9999: { enumerable: true, value: "Y", configurable: true}
         }), [["0", "s"], ["1", "t"], ["2", "r"], ["9999", "Y"]] ],
   };
 
   for (let [kind, [object, expected]] of Object.entries(element_kinds)) {
     let result1 = Object.entries(object);
+    %HeapObjectVerify(object);
+    %HeapObjectVerify(result1);
     assertEquals(expected, result1, `fast Object.entries() with ${kind}`);
 
     let proxy = new Proxy(object, {});
     let result2 = Object.entries(proxy);
+    %HeapObjectVerify(result2);
     assertEquals(result1, result2, `slow Object.entries() with ${kind}`);
   }
+
+  function makeFastElements(array) {
+    // Remove all possible getters.
+    for (let k of Object.getOwnPropertyNames(this)) {
+      if (k == "length") continue;
+      delete this[k];
+    }
+    // Make the array large enough to trigger re-checking for compaction.
+    this[1000] = 1;
+    // Make the elements fast again.
+    Array.prototype.unshift.call(this, 1.1);
+  }
+
+  // Test that changing the elements kind is supported.
+  for (let [kind, [object, expected]] of Object.entries(element_kinds)) {
+    if (kind == "FAST_STRING_WRAPPER_ELEMENTS") break;
+    object.__defineGetter__(1, makeFastElements);
+    let result1 = Object.entries(object).toString();
+    %HeapObjectVerify(object);
+    %HeapObjectVerify(result1);
+  }
+
 })();
diff --git a/src/v8/test/mjsunit/es8/regress/regress-794744.js b/src/v8/test/mjsunit/es8/regress/regress-794744.js
new file mode 100644
index 0000000..a4dcb5d
--- /dev/null
+++ b/src/v8/test/mjsunit/es8/regress/regress-794744.js
@@ -0,0 +1,8 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Object.getOwnPropertyDescriptors loads %FunctionPrototype%.caller, an
+// accessor property which inspects the current callstack. Verify that this
+// callstack iteration doesn't crash when there are no JS frames on the stack.
+Promise.resolve(function () {}).then(Object.getOwnPropertyDescriptors);
diff --git a/src/v8/test/mjsunit/harmony/object-rest-basic.js b/src/v8/test/mjsunit/es9/object-rest-basic.js
similarity index 98%
rename from src/v8/test/mjsunit/harmony/object-rest-basic.js
rename to src/v8/test/mjsunit/es9/object-rest-basic.js
index e539ccb..caaee6f 100644
--- a/src/v8/test/mjsunit/harmony/object-rest-basic.js
+++ b/src/v8/test/mjsunit/es9/object-rest-basic.js
@@ -2,7 +2,6 @@
 // // Use of this source code is governed by a BSD-style license that can be
 // // found in the LICENSE file.
 
-// Flags: --harmony-object-rest-spread
 var { ...x } = { a: 1 };
 assertEquals({ a: 1 }, x);
 
diff --git a/src/v8/test/mjsunit/harmony/object-spread-basic.js b/src/v8/test/mjsunit/es9/object-spread-basic.js
similarity index 98%
rename from src/v8/test/mjsunit/harmony/object-spread-basic.js
rename to src/v8/test/mjsunit/es9/object-spread-basic.js
index 8724b1a..8264da4 100644
--- a/src/v8/test/mjsunit/harmony/object-spread-basic.js
+++ b/src/v8/test/mjsunit/es9/object-spread-basic.js
@@ -2,8 +2,6 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-// Flags: --harmony-object-rest-spread
-
 var x = {a: 1};
 var y = { ...x};
 assertEquals(x, y);
diff --git a/src/v8/test/mjsunit/harmony/regexp-lookbehind.js b/src/v8/test/mjsunit/es9/regexp-lookbehind.js
similarity index 99%
rename from src/v8/test/mjsunit/harmony/regexp-lookbehind.js
rename to src/v8/test/mjsunit/es9/regexp-lookbehind.js
index 5148068..54c975c 100644
--- a/src/v8/test/mjsunit/harmony/regexp-lookbehind.js
+++ b/src/v8/test/mjsunit/es9/regexp-lookbehind.js
@@ -2,8 +2,6 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-// Flags: --harmony-regexp-lookbehind
-
 // Simple fixed-length matches.
 assertEquals(["a"], "a".match(/^.(?<=a)/));
 assertNull("b".match(/^.(?<=a)/));
diff --git a/src/v8/test/mjsunit/harmony/template-escapes.js b/src/v8/test/mjsunit/es9/template-escapes.js
similarity index 99%
rename from src/v8/test/mjsunit/harmony/template-escapes.js
rename to src/v8/test/mjsunit/es9/template-escapes.js
index ea01985..d7af8ba 100644
--- a/src/v8/test/mjsunit/harmony/template-escapes.js
+++ b/src/v8/test/mjsunit/es9/template-escapes.js
@@ -2,8 +2,6 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-// Flags: --harmony-template-escapes
-
 function check({cooked, raw, exprs}) {
   return function(strs, ...args) {
     assertArrayEquals(cooked, strs);
diff --git a/src/v8/test/mjsunit/filter-element-kinds.js b/src/v8/test/mjsunit/filter-element-kinds.js
new file mode 100644
index 0000000..7853a33
--- /dev/null
+++ b/src/v8/test/mjsunit/filter-element-kinds.js
@@ -0,0 +1,144 @@
+// Copyright 2012 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.
+
+// Flags: --allow-natives-syntax --expose-gc --opt --no-always-opt
+
+var elements_kind = {
+  fast_smi_only            :  'fast smi only elements',
+  fast                     :  'fast elements',
+  fast_double              :  'fast double elements',
+  dictionary               :  'dictionary elements',
+  external_byte            :  'external byte elements',
+  external_unsigned_byte   :  'external unsigned byte elements',
+  external_short           :  'external short elements',
+  external_unsigned_short  :  'external unsigned short elements',
+  external_int             :  'external int elements',
+  external_unsigned_int    :  'external unsigned int elements',
+  external_float           :  'external float elements',
+  external_double          :  'external double elements',
+  external_pixel           :  'external pixel elements'
+}
+
+function getKind(obj) {
+  if (%HasSmiElements(obj)) return elements_kind.fast_smi_only;
+  if (%HasObjectElements(obj)) return elements_kind.fast;
+  if (%HasDoubleElements(obj)) return elements_kind.fast_double;
+  if (%HasDictionaryElements(obj)) return elements_kind.dictionary;
+}
+
+function isHoley(obj) {
+  if (%HasHoleyElements(obj)) return true;
+  return false;
+}
+
+function assertKind(expected, obj, name_opt) {
+  assertEquals(expected, getKind(obj), name_opt);
+}
+
+function assertHoley(obj, name_opt) {
+  assertEquals(true, isHoley(obj), name_opt);
+}
+
+function assertNotHoley(obj, name_opt) {
+  assertEquals(false, isHoley(obj), name_opt);
+}
+
+// Create a new closure that inlines Array.prototype.filter().
+function create(a) {
+  return function() {
+    return a.filter(x => false);
+  }
+}
+
+function runTest(test, kind, holey_predicate) {
+
+  // Verify built-in implementation produces correct results.
+  let a = test();
+  assertKind(kind, a);
+  holey_predicate(a);
+  test();
+  test();
+  %OptimizeFunctionOnNextCall(test);
+
+  // Now for optimized code.
+  a = test();
+  assertKind(kind, a);
+  holey_predicate(a);
+}
+
+function chooseHoleyPredicate(a) {
+  return isHoley(a) ? assertHoley : assertNotHoley;
+}
+
+(function() {
+  let data = [];
+
+  // Packed literal arrays.
+  data.push(() => [1, 2, 3]);
+  data.push(() => [true, true, false]);
+  data.push(() => [1.0, 1.5, 3.5]);
+  // Holey literal arrays.
+  data.push(() => { let obj = [1,, 3]; obj[1] = 2; return obj; });
+  data.push(() => { let obj = [true,, false]; obj[1] = true; return obj; });
+  data.push(() => { let obj = [1.0,, 3.5]; obj[1] = 1.5; return obj; });
+  // Packed constructed arrays.
+  data.push(() => new Array(1, 2, 3));
+  data.push(() => new Array(true, true, false));
+  data.push(() => new Array(1.0, 1.5, 3.5));
+
+  // Holey constructed arrays.
+  data.push(() => {
+    let obj = new Array(3);
+    obj[0] = 1;
+    obj[1] = 2;
+    obj[2] = 3;
+    return obj;
+  });
+
+  data.push(() => {
+    let obj = new Array(3);
+    obj[0] = true;
+    obj[1] = true;
+    obj[2] = false;
+    return obj;
+  });
+
+  data.push(() => {
+    let obj = new Array(3);
+    obj[0] = 1.0;
+    obj[1] = 1.5;
+    obj[2] = 3.5;
+    return obj;
+  });
+
+  for (datum of data) {
+    let a = datum();
+    // runTest(create(a), getKind(a), chooseHoleyPredicate(a));
+    let f = function() { return a.filter(x => false); }
+    runTest(f, getKind(a), chooseHoleyPredicate(a));
+   }
+})();
diff --git a/src/v8/test/mjsunit/function-bind.js b/src/v8/test/mjsunit/function-bind.js
index 8269869..7d37da5 100644
--- a/src/v8/test/mjsunit/function-bind.js
+++ b/src/v8/test/mjsunit/function-bind.js
@@ -41,21 +41,25 @@
 assertEquals([foo, 3, 1], f(1, 2, 3));
 assertEquals(3, f.length);
 assertEquals("function () { [native code] }", f.toString());
+%HeapObjectVerify(f);
 
 f = foo.bind(foo, 1);
 assertEquals([foo, 3, 1], f(2, 3));
 assertEquals(2, f.length);
 assertEquals("function () { [native code] }", f.toString());
+%HeapObjectVerify(f);
 
 f = foo.bind(foo, 1, 2);
 assertEquals([foo, 3, 1], f(3));
 assertEquals(1, f.length);
 assertEquals("function () { [native code] }", f.toString());
+%HeapObjectVerify(f);
 
 f = foo.bind(foo, 1, 2, 3);
 assertEquals([foo, 3, 1], f());
 assertEquals(0, f.length);
 assertEquals("function () { [native code] }", f.toString());
+%HeapObjectVerify(f);
 
 // Test that length works correctly even if more than the actual number
 // of arguments are given when binding.
@@ -63,6 +67,7 @@
 assertEquals([foo, 9, 1], f());
 assertEquals(0, f.length);
 assertEquals("function () { [native code] }", f.toString());
+%HeapObjectVerify(f);
 
 // Use a different bound object.
 var obj = {x: 42, y: 43};
@@ -78,11 +83,13 @@
 f = f_bound_this.bind(obj);
 assertEquals(2, f(1));
 assertEquals(1, f.length);
+%HeapObjectVerify(f);
 
 f = f_bound_this.bind(obj, 2);
 assertEquals(3, f());
 assertEquals(0, f.length);
 assertEquals('[object Function]', Object.prototype.toString.call(f));
+%HeapObjectVerify(f);
 
 // Test chained binds.
 
@@ -90,65 +97,80 @@
 // the same effect.
 f = foo.bind(foo);
 assertEquals([foo, 3, 1], f(1, 2, 3));
+%HeapObjectVerify(f);
 
 var not_foo = {};
 f = foo.bind(foo).bind(not_foo).bind(not_foo).bind(not_foo);
 assertEquals([foo, 3, 1], f(1, 2, 3));
 assertEquals(3, f.length);
+%HeapObjectVerify(f);
 
 // Giving bound parameters should work at any place in the chain.
 f = foo.bind(foo, 1).bind(not_foo).bind(not_foo).bind(not_foo);
 assertEquals([foo, 3, 1], f(2, 3));
 assertEquals(2, f.length);
+%HeapObjectVerify(f);
 
 f = foo.bind(foo).bind(not_foo, 1).bind(not_foo).bind(not_foo);
 assertEquals([foo, 3, 1], f(2, 3));
 assertEquals(2, f.length);
+%HeapObjectVerify(f);
 
 f = foo.bind(foo).bind(not_foo).bind(not_foo,1 ).bind(not_foo);
 assertEquals([foo, 3, 1], f(2, 3));
 assertEquals(2, f.length);
+%HeapObjectVerify(f);
 
 f = foo.bind(foo).bind(not_foo).bind(not_foo).bind(not_foo, 1);
 assertEquals([foo, 3, 1], f(2, 3));
 assertEquals(2, f.length);
+%HeapObjectVerify(f);
 
 // Several parameters can be given, and given in different bind invocations.
 f = foo.bind(foo, 1, 2).bind(not_foo).bind(not_foo).bind(not_foo);
 assertEquals([foo, 3, 1], f(3));
 assertEquals(1, f.length);
+%HeapObjectVerify(f);
 
 f = foo.bind(foo).bind(not_foo, 1, 2).bind(not_foo).bind(not_foo);
 assertEquals([foo, 3, 1], f(1));
 assertEquals(1, f.length);
+%HeapObjectVerify(f);
 
 f = foo.bind(foo).bind(not_foo, 1, 2).bind(not_foo).bind(not_foo);
 assertEquals([foo, 3, 1], f(3));
 assertEquals(1, f.length);
+%HeapObjectVerify(f);
 
 f = foo.bind(foo).bind(not_foo).bind(not_foo, 1, 2).bind(not_foo);
 assertEquals([foo, 3, 1], f(1));
 assertEquals(1, f.length);
+%HeapObjectVerify(f);
 
 f = foo.bind(foo).bind(not_foo).bind(not_foo).bind(not_foo, 1, 2);
 assertEquals([foo, 3, 1], f(3));
 assertEquals(1, f.length);
+%HeapObjectVerify(f);
 
 f = foo.bind(foo, 1).bind(not_foo, 2).bind(not_foo).bind(not_foo);
 assertEquals([foo, 3, 1], f(3));
 assertEquals(1, f.length);
+%HeapObjectVerify(f);
 
 f = foo.bind(foo, 1).bind(not_foo).bind(not_foo, 2).bind(not_foo);
 assertEquals([foo, 3, 1], f(3));
 assertEquals(1, f.length);
+%HeapObjectVerify(f);
 
 f = foo.bind(foo, 1).bind(not_foo).bind(not_foo).bind(not_foo, 2);
 assertEquals([foo, 3, 1], f(3));
 assertEquals(1, f.length);
+%HeapObjectVerify(f);
 
 f = foo.bind(foo).bind(not_foo, 1).bind(not_foo).bind(not_foo, 2);
 assertEquals([foo, 3, 1], f(3));
 assertEquals(1, f.length);
+%HeapObjectVerify(f);
 
 // The wrong number of arguments can be given to bound functions too.
 f = foo.bind(foo);
@@ -158,6 +180,7 @@
 assertEquals([foo, 2, 1], f(1, 2));
 assertEquals([foo, 3, 1], f(1, 2, 3));
 assertEquals([foo, 4, 1], f(1, 2, 3, 4));
+%HeapObjectVerify(f);
 
 f = foo.bind(foo, 1);
 assertEquals(2, f.length);
@@ -165,21 +188,25 @@
 assertEquals([foo, 2, 1], f(2));
 assertEquals([foo, 3, 1], f(2, 3));
 assertEquals([foo, 4, 1], f(2, 3, 4));
+%HeapObjectVerify(f);
 
 f = foo.bind(foo, 1, 2);
 assertEquals(1, f.length);
 assertEquals([foo, 2, 1], f());
 assertEquals([foo, 3, 1], f(3));
 assertEquals([foo, 4, 1], f(3, 4));
+%HeapObjectVerify(f);
 
 f = foo.bind(foo, 1, 2, 3);
 assertEquals(0, f.length);
 assertEquals([foo, 3, 1], f());
 assertEquals([foo, 4, 1], f(4));
+%HeapObjectVerify(f);
 
 f = foo.bind(foo, 1, 2, 3, 4);
 assertEquals(0, f.length);
 assertEquals([foo, 4, 1], f());
+%HeapObjectVerify(f);
 
 // Test constructor calls.
 
@@ -194,24 +221,32 @@
 assertEquals(1, obj2.x);
 assertEquals(2, obj2.y);
 assertEquals(3, obj2.z);
+%HeapObjectVerify(f);
+%HeapObjectVerify(obj2);
 
 f = bar.bind(bar, 1);
 obj2 = new f(2,3);
 assertEquals(1, obj2.x);
 assertEquals(2, obj2.y);
 assertEquals(3, obj2.z);
+%HeapObjectVerify(f);
+%HeapObjectVerify(obj2);
 
 f = bar.bind(bar, 1, 2);
 obj2 = new f(3);
 assertEquals(1, obj2.x);
 assertEquals(2, obj2.y);
 assertEquals(3, obj2.z);
+%HeapObjectVerify(f);
+%HeapObjectVerify(obj2);
 
 f = bar.bind(bar, 1, 2, 3);
 obj2 = new f();
 assertEquals(1, obj2.x);
 assertEquals(2, obj2.y);
 assertEquals(3, obj2.z);
+%HeapObjectVerify(f);
+%HeapObjectVerify(obj2);
 
 
 // Test bind chains when used as a constructor.
@@ -220,6 +255,8 @@
 assertEquals(1, obj2.x);
 assertEquals(2, obj2.y);
 assertEquals(3, obj2.z);
+%HeapObjectVerify(f);
+%HeapObjectVerify(obj2);
 
 // Test obj2 is instanceof both bar and f.
 assertTrue(obj2 instanceof bar);
@@ -235,22 +272,29 @@
 assertFalse(obj3 instanceof foo);
 assertFalse(obj3 instanceof Function);
 assertFalse(obj3 instanceof String);
+%HeapObjectVerify(f);
+%HeapObjectVerify(obj3);
 
 // thisArg is converted to object.
 f = foo.bind(undefined);
 assertEquals([this, 0, undefined], f());
+%HeapObjectVerify(f);
 
 f = foo.bind(null);
 assertEquals([this, 0, undefined], f());
+%HeapObjectVerify(f);
 
 f = foo.bind(42);
 assertEquals([Object(42), 0, undefined], f());
+%HeapObjectVerify(f);
 
 f = foo.bind("foo");
 assertEquals([Object("foo"), 0, undefined], f());
+%HeapObjectVerify(f);
 
 f = foo.bind(true);
 assertEquals([Object(true), 0, undefined], f());
+%HeapObjectVerify(f);
 
 // Strict functions don't convert thisArg.
 function soo(x, y, z) {
@@ -260,18 +304,23 @@
 
 var s = soo.bind(undefined);
 assertEquals([undefined, 0, undefined], s());
+%HeapObjectVerify(s);
 
 s = soo.bind(null);
 assertEquals([null, 0, undefined], s());
+%HeapObjectVerify(s);
 
 s = soo.bind(42);
 assertEquals([42, 0, undefined], s());
+%HeapObjectVerify(s);
 
 s = soo.bind("foo");
 assertEquals(["foo", 0, undefined], s());
+%HeapObjectVerify(s);
 
 s = soo.bind(true);
 assertEquals([true, 0, undefined], s());
+%HeapObjectVerify(s);
 
 // Test that .arguments and .caller are poisoned according to the ES5 spec.
 
@@ -316,11 +365,14 @@
   Object.setPrototypeOf(fun, proto);
   var bound = fun.bind({});
   assertEquals(proto, Object.getPrototypeOf(bound));
+  %HeapObjectVerify(bound);
 
   var bound2 = fun.bind({});
   assertTrue(%HaveSameMap(new bound, new bound2));
+  %HeapObjectVerify(bound2);
 
   Object.setPrototypeOf(fun, null);
   bound = Function.prototype.bind.call(fun, {});
   assertEquals(null, Object.getPrototypeOf(bound));
+  %HeapObjectVerify(bound);
 })();
diff --git a/src/v8/test/mjsunit/function-call.js b/src/v8/test/mjsunit/function-call.js
index fb91dcd..711acce 100644
--- a/src/v8/test/mjsunit/function-call.js
+++ b/src/v8/test/mjsunit/function-call.js
@@ -26,7 +26,7 @@
 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
-var should_throw_on_null_and_undefined =
+const should_throw_on_null_and_undefined =
     [Object.prototype.toLocaleString,
      Object.prototype.valueOf,
      Object.prototype.hasOwnProperty,
@@ -39,7 +39,6 @@
      Array.prototype.reverse,
      Array.prototype.shift,
      Array.prototype.slice,
-     Array.prototype.sort,
      Array.prototype.splice,
      Array.prototype.unshift,
      Array.prototype.indexOf,
@@ -72,7 +71,7 @@
 // Non generic natives do not work on any input other than the specific
 // type, but since this change will allow call to be invoked with undefined
 // or null as this we still explicitly test that we throw on these here.
-var non_generic =
+const non_generic =
     [Array.prototype.toString,
      Array.prototype.toLocaleString,
      Function.prototype.toString,
@@ -137,7 +136,7 @@
 
 
 // Mapping functions.
-var mapping_functions =
+const mapping_functions =
     [Array.prototype.every,
      Array.prototype.some,
      Array.prototype.forEach,
@@ -145,27 +144,27 @@
      Array.prototype.filter];
 
 // Reduce functions.
-var reducing_functions =
+const reducing_functions =
     [Array.prototype.reduce,
      Array.prototype.reduceRight];
 
 function checkExpectedMessage(e) {
-  assertTrue(e.message.indexOf("called on null or undefined") >= 0 ||
-      e.message.indexOf("invoked on undefined or null value") >= 0 ||
-      e.message.indexOf("Cannot convert undefined or null to object") >= 0);
+  assertTrue(e.message.includes("called on null or undefined") ||
+      e.message.includes("invoked on undefined or null value") ||
+      e.message.includes("Cannot convert undefined or null to object"));
 }
 
 // Test that all natives using the ToObject call throw the right exception.
-for (var i = 0; i < should_throw_on_null_and_undefined.length; i++) {
+for (const fn of should_throw_on_null_and_undefined) {
   // Sanity check that all functions are correct
-  assertEquals(typeof(should_throw_on_null_and_undefined[i]), "function");
+  assertEquals(typeof fn, "function");
 
-  var exception = false;
+  let exception = false;
   try {
     // We need to pass a dummy object argument ({}) to these functions because
     // of Object.prototype.isPrototypeOf's special behavior, see issue 3483
     // for more details.
-    should_throw_on_null_and_undefined[i].call(null, {});
+    fn.call(null, {});
   } catch (e) {
     exception = true;
     checkExpectedMessage(e);
@@ -174,7 +173,7 @@
 
   exception = false;
   try {
-    should_throw_on_null_and_undefined[i].call(undefined, {});
+    fn.call(undefined, {});
   } catch (e) {
     exception = true;
     checkExpectedMessage(e);
@@ -183,7 +182,7 @@
 
   exception = false;
   try {
-    should_throw_on_null_and_undefined[i].apply(null, [{}]);
+    fn.apply(null, [{}]);
   } catch (e) {
     exception = true;
     checkExpectedMessage(e);
@@ -192,7 +191,7 @@
 
   exception = false;
   try {
-    should_throw_on_null_and_undefined[i].apply(undefined, [{}]);
+    fn.apply(undefined, [{}]);
   } catch (e) {
     exception = true;
     checkExpectedMessage(e);
@@ -201,13 +200,13 @@
 }
 
 // Test that all natives that are non generic throw on null and undefined.
-for (var i = 0; i < non_generic.length; i++) {
+for (const fn of non_generic) {
   // Sanity check that all functions are correct
-  assertEquals(typeof(non_generic[i]), "function");
+  assertEquals(typeof fn, "function");
 
   exception = false;
   try {
-    non_generic[i].call(null);
+    fn.call(null);
   } catch (e) {
     exception = true;
     assertTrue(e instanceof TypeError);
@@ -216,7 +215,7 @@
 
   exception = false;
   try {
-    non_generic[i].call(null);
+    fn.call(null);
   } catch (e) {
     exception = true;
     assertTrue(e instanceof TypeError);
@@ -225,7 +224,7 @@
 
   exception = false;
   try {
-    non_generic[i].apply(null);
+    fn.apply(null);
   } catch (e) {
     exception = true;
     assertTrue(e instanceof TypeError);
@@ -234,7 +233,7 @@
 
   exception = false;
   try {
-    non_generic[i].apply(null);
+    fn.apply(null);
   } catch (e) {
     exception = true;
     assertTrue(e instanceof TypeError);
@@ -247,14 +246,14 @@
 // through an array mapping function.
 // We need to make sure that the elements of `array` are all object values,
 // see issue 3483 for more details.
-var array = [{}, [], new Number, new Map, new WeakSet];
-for (var j = 0; j < mapping_functions.length; j++) {
-  for (var i = 0; i < should_throw_on_null_and_undefined.length; i++) {
+const array = [{}, [], new Number, new Map, new WeakSet];
+for (const mapping_function of mapping_functions) {
+  for (const fn of should_throw_on_null_and_undefined) {
     exception = false;
     try {
-      mapping_functions[j].call(array,
-                                should_throw_on_null_and_undefined[i],
-                                null);
+      mapping_function.call(array,
+                            fn,
+                            null);
     } catch (e) {
       exception = true;
       checkExpectedMessage(e);
@@ -263,9 +262,9 @@
 
     exception = false;
     try {
-      mapping_functions[j].call(array,
-                                should_throw_on_null_and_undefined[i],
-                                undefined);
+      mapping_function.call(array,
+                            fn,
+                            undefined);
     } catch (e) {
       exception = true;
       checkExpectedMessage(e);
@@ -274,13 +273,13 @@
   }
 }
 
-for (var j = 0; j < mapping_functions.length; j++) {
-  for (var i = 0; i < non_generic.length; i++) {
+for (const mapping_function of mapping_functions) {
+  for (const fn of non_generic) {
     exception = false;
     try {
-      mapping_functions[j].call(array,
-                                non_generic[i],
-                                null);
+      mapping_function.call(array,
+                            fn,
+                            null);
     } catch (e) {
       exception = true;
       assertTrue(e instanceof TypeError);
@@ -289,9 +288,9 @@
 
     exception = false;
     try {
-      mapping_functions[j].call(array,
-                                non_generic[i],
-                                undefined);
+      mapping_function.call(array,
+                            fn,
+                            undefined);
     } catch (e) {
       exception = true;
       assertTrue(e instanceof TypeError);
@@ -302,11 +301,11 @@
 
 
 // Reduce functions do a call with null as this argument.
-for (var j = 0; j < reducing_functions.length; j++) {
-  for (var i = 0; i < should_throw_on_null_and_undefined.length; i++) {
+for (const reducing_function of reducing_functions) {
+  for (const fn of should_throw_on_null_and_undefined) {
     exception = false;
     try {
-      reducing_functions[j].call(array, should_throw_on_null_and_undefined[i]);
+      reducing_function.call(array, fn);
     } catch (e) {
       exception = true;
       checkExpectedMessage(e);
@@ -315,7 +314,7 @@
 
     exception = false;
     try {
-      reducing_functions[j].call(array, should_throw_on_null_and_undefined[i]);
+      reducing_function.call(array, fn);
     } catch (e) {
       exception = true;
       checkExpectedMessage(e);
@@ -324,11 +323,11 @@
   }
 }
 
-for (var j = 0; j < reducing_functions.length; j++) {
-  for (var i = 0; i < non_generic.length; i++) {
+for (const reducing_function of reducing_functions) {
+  for (const fn of non_generic) {
     exception = false;
     try {
-      reducing_functions[j].call(array, non_generic[i]);
+      reducing_function.call(array, fn);
     } catch (e) {
       exception = true;
       assertTrue(e instanceof TypeError);
@@ -337,7 +336,7 @@
 
     exception = false;
     try {
-      reducing_functions[j].call(array, non_generic[i]);
+      reducing_function.call(array, fn);
     } catch (e) {
       exception = true;
       assertTrue(e instanceof TypeError);
diff --git a/src/v8/test/mjsunit/global-accessors.js b/src/v8/test/mjsunit/global-accessors.js
index 00658f4..a375f96 100644
--- a/src/v8/test/mjsunit/global-accessors.js
+++ b/src/v8/test/mjsunit/global-accessors.js
@@ -26,16 +26,14 @@
 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 // Test accessors on the global object.
-//
-// Flags: --no-harmony-strict-legacy-accessor-builtins
 
 var x_ = 0;
 
-__defineSetter__('x', function(x) { x_ = x; });
-__defineGetter__('x', function() { return x_; });
+this.__defineSetter__('x', function(x) { x_ = x; });
+this.__defineGetter__('x', function() { return x_; });
 
-__defineSetter__('y', function(x) { });
-__defineGetter__('y', function() { return 7; });
+this.__defineSetter__('y', function(x) { });
+this.__defineGetter__('y', function() { return 7; });
 
 function f(a) {
   x = x + a;
diff --git a/src/v8/test/mjsunit/global-prototypes.js b/src/v8/test/mjsunit/global-prototypes.js
new file mode 100644
index 0000000..98232c2
--- /dev/null
+++ b/src/v8/test/mjsunit/global-prototypes.js
@@ -0,0 +1,354 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+
+assertEquals(this.__proto__, Object.prototype);
+
+function TestAddingPropertyToGlobalPrototype() {
+  let foo_func_called = 0;
+  let bar_func_called = 0;
+
+  function Foo() {}
+  Foo.prototype.func = function() { ++foo_func_called; }
+
+  delete this.func;
+  this.__proto__ = Foo.prototype;
+
+  function Bar() {}
+  Bar.prototype = this;
+
+  let o = new Bar();
+
+  for (let i = 0; i < 11; ++i) {
+    // First, the property is looked up from Foo.
+    o.func();
+
+    // Add the property to Bar which is a Global-mode prototype between o
+    // and Foo. In the next iteration, it's looked up from Bar.
+    if (i == 9) {
+      Bar.prototype.func = function() { ++bar_func_called; }
+    }
+  }
+
+  assertEquals(10, foo_func_called);
+  assertEquals(1, bar_func_called);
+}
+
+TestAddingPropertyToGlobalPrototype();
+
+
+// Same as TestAddingPropertyToGlobalPrototype, but using o["foo"] access
+// instead of o.foo.
+function TestAddingPropertyToGlobalPrototype2() {
+  let foo_func_called = 0;
+  let bar_func_called = 0;
+  let name = "func";
+
+  function Foo() {}
+  Foo.prototype[name] = function() { ++foo_func_called; }
+
+  delete this[name];
+  this.__proto__ = Foo.prototype;
+
+  function Bar() {}
+  Bar.prototype = this;
+
+  let o = new Bar();
+
+  for (let i = 0; i < 11; ++i) {
+    // First, the property is looked up from Foo.
+    o[name]();
+
+    // Add the property to Bar which is a Global-mode prototype between o
+    // and Foo. In the next iteration, it's looked up from Bar.
+    if (i == 9) {
+      Bar.prototype[name] = function() { ++bar_func_called; }
+    }
+  }
+
+  assertEquals(10, foo_func_called);
+  assertEquals(1, bar_func_called);
+}
+
+TestAddingPropertyToGlobalPrototype2();
+
+
+function TestAddingPropertyToGlobalPrototype_DefineProperty() {
+  let foo_func_called = 0;
+  let bar_func_called = 0;
+
+  function Foo() {}
+  Foo.prototype.func = function() { ++foo_func_called; }
+
+  delete this.func;
+  this.__proto__ = Foo.prototype;
+
+  function Bar() {}
+  Bar.prototype = this;
+
+  let o = new Bar();
+
+  for (let i = 0; i < 11; ++i) {
+    // First, the property is looked up from Foo.
+    o.func();
+
+    // Add the property to Bar which is a Global-mode prototype between o
+    // and Foo. In the next iteration, it's looked up from Bar.
+    if (i == 9) {
+      Object.defineProperty(Bar.prototype, "func",
+                            {
+                              value: function() { ++bar_func_called; },
+                              configurable:true
+                            });
+    }
+  }
+
+  assertEquals(10, foo_func_called);
+  assertEquals(1, bar_func_called);
+}
+
+TestAddingPropertyToGlobalPrototype_DefineProperty();
+
+
+function TestAddingAccessorPropertyToGlobalPrototype() {
+  let foo_func_called = 0;
+  let bar_func_called = 0;
+
+  function Foo() {}
+  Foo.prototype.func = function() { ++foo_func_called; }
+
+  delete this.func;
+  this.__proto__ = Foo.prototype;
+
+  function Bar() {}
+  Bar.prototype = this;
+
+  let o = new Bar();
+
+  for (let i = 0; i < 11; ++i) {
+    // First, the property is looked up from Foo.
+    o.func();
+
+    // Add the property to Bar which is a Global-mode prototype between o
+    // and Foo. In the next iteration, it's looked up from Bar.
+    if (i == 9) {
+      Object.defineProperty(Bar.prototype, "func",
+                            {
+                              get: function() { return function() { ++bar_func_called; }},
+                              configurable: true
+                            });
+    }
+  }
+
+  assertEquals(10, foo_func_called);
+  assertEquals(1, bar_func_called);
+}
+
+TestAddingAccessorPropertyToGlobalPrototype();
+
+
+function TestRemovingPropertyFromGlobalPrototype() {
+  let foo_func_called = 0;
+  let bar_func_called = 0;
+
+  function Foo() {}
+  Foo.prototype.func = function() { ++foo_func_called; }
+
+  delete this.func;
+  this.__proto__ = Foo.prototype;
+
+  function Bar() {}
+  Bar.prototype = this;
+  Bar.prototype.func = function() { ++bar_func_called; }
+
+  let o = new Bar();
+
+  for (let i = 0; i < 11; ++i) {
+    // First, the property is looked up from Bar.
+    o.func();
+
+    // Remove the property from Bar which is a Global-mode prototype between
+    // o and Foo. In the next iteration, it's looked up from Foo.
+    if (i == 9) {
+      delete Bar.prototype.func;
+    }
+  }
+
+  assertEquals(1, foo_func_called);
+  assertEquals(10, bar_func_called);
+}
+
+TestRemovingPropertyFromGlobalPrototype();
+
+
+// Same as TestRemovingPropertyFromGlobalPrototype, but using o["foo"] access
+// instead of o.foo.
+function TestRemovingPropertyFromGlobalPrototype2() {
+  let foo_func_called = 0;
+  let bar_func_called = 0;
+  let name = "func";
+
+  function Foo() {}
+  Foo.prototype[name] = function() { ++foo_func_called; }
+
+  this.__proto__ = Foo.prototype;
+
+  function Bar() {}
+  Bar.prototype = this;
+  Bar.prototype[name] = function() { ++bar_func_called; }
+
+  let o = new Bar();
+
+  for (let i = 0; i < 11; ++i) {
+    // First, the property is looked up from Bar.
+    o[name]();
+
+    // Remove the property from Bar which is a Global-mode prototype between
+    // o and Foo. In the next iteration, it's looked up from Foo.
+    if (i == 9) {
+      delete Bar.prototype[name];
+    }
+  }
+
+  assertEquals(1, foo_func_called);
+  assertEquals(10, bar_func_called);
+}
+
+TestRemovingPropertyFromGlobalPrototype2();
+
+
+function TestAddingPropertyToGlobalPrototype_MonomorphicDot() {
+  function DoMonomorphicStoreToPrototypeDot(p, f, do_delete=true) {
+    p.func = f;
+    if (do_delete) {
+      delete p.func;
+    }
+  }
+  let foo_func_called = 0;
+  let bar_func_called = 0;
+
+  function Foo() {}
+  Foo.prototype.func = function() { ++foo_func_called; }
+
+  delete this.func;
+  this.__proto__ = Foo.prototype;
+
+  function Bar() {}
+  Bar.prototype = this;
+
+  function bar_func() {
+    ++bar_func_called;
+  }
+  DoMonomorphicStoreToPrototypeDot(Bar.prototype, bar_func);
+  DoMonomorphicStoreToPrototypeDot(Bar.prototype, bar_func);
+  DoMonomorphicStoreToPrototypeDot(Bar.prototype, bar_func);
+
+  let o = new Bar();
+
+  for (let i = 0; i < 11; ++i) {
+    // First, the property is looked up from Foo.
+    o.func();
+
+    // Add the property to Bar which is a Global-mode prototype between o
+    // and Foo. In the next iteration, it's looked up from Bar.
+    if (i == 9) {
+      DoMonomorphicStoreToPrototypeDot(Bar.prototype, bar_func, false);
+    }
+  }
+
+  assertEquals(10, foo_func_called);
+  assertEquals(1, bar_func_called);
+}
+
+TestAddingPropertyToGlobalPrototype_MonomorphicDot();
+
+
+function TestAddingPropertyToGlobalPrototype_MonomorphicBrackets() {
+  function DoMonomorphicStoreToPrototypeBrackets(p, name, f, do_delete=true) {
+    p[name] = f;
+    if (do_delete) {
+      delete p[name];
+    }
+  }
+  let foo_func_called = 0;
+  let bar_func_called = 0;
+  let name = "func";
+
+  function Foo() {}
+  Foo.prototype[name] = function() { ++foo_func_called; }
+
+  delete this[name];
+  this.__proto__ = Foo.prototype;
+
+  function Bar() {}
+  Bar.prototype = this;
+
+  function bar_func() {
+    ++bar_func_called;
+  }
+  DoMonomorphicStoreToPrototypeBrackets(Bar.prototype, name, bar_func);
+  DoMonomorphicStoreToPrototypeBrackets(Bar.prototype, name, bar_func);
+  DoMonomorphicStoreToPrototypeBrackets(Bar.prototype, name, bar_func);
+
+  let o = new Bar();
+
+  for (let i = 0; i < 11; ++i) {
+    // First, the property is looked up from Foo.
+    o.func();
+
+    // Add the property to Bar which is a Global-mode prototype between o
+    // and Foo. In the next iteration, it's looked up from Bar.
+    if (i == 9) {
+      DoMonomorphicStoreToPrototypeBrackets(Bar.prototype, name, bar_func, false);
+    }
+  }
+
+  assertEquals(10, foo_func_called);
+  assertEquals(1, bar_func_called);
+}
+
+TestAddingPropertyToGlobalPrototype_MonomorphicBrackets();
+
+
+function TestReconfiguringDataToAccessor() {
+  let setter_called = 0;
+  let name = "prop";
+
+  delete this[name];
+  this.__proto__ = Object.prototype;
+
+  function Bar() {}
+  Bar.prototype = this;
+
+  Object.defineProperty(Bar.prototype, name, {value: 1000, writable: true, configurable: true});
+
+  for (let i = 0; i < 11; ++i) {
+    let obj1 = new Bar();
+    if (i < 10) {
+      assertEquals(1000, obj1.prop);
+    } else {
+      assertEquals(3000, obj1.prop);
+    }
+
+    // Add the property into the object.
+    obj1.prop = 2000;
+    if (i < 10) {
+      assertEquals(2000, obj1.prop);
+    } else {
+      assertEquals(3000, obj1.prop);
+    }
+
+    // Make "prop" an accessor property in the prototype.
+    if (i == 9) {
+      Object.defineProperty(Bar.prototype, name,
+                            {get: () => 3000,
+                             set: function(val) { ++setter_called; }});
+    }
+  }
+  assertEquals(1, setter_called);
+}
+
+TestReconfiguringDataToAccessor();
diff --git a/src/v8/test/mjsunit/harmony/array-sort-comparefn.js b/src/v8/test/mjsunit/harmony/array-sort-comparefn.js
index 1ae470a..9858c1c 100644
--- a/src/v8/test/mjsunit/harmony/array-sort-comparefn.js
+++ b/src/v8/test/mjsunit/harmony/array-sort-comparefn.js
@@ -36,3 +36,13 @@
   assertThrows(() => { array.sort({});       }, TypeError);
   assertThrows(() => { array.sort(Symbol()); }, TypeError);
 }
+
+assertThrows(() => { Array.prototype.sort.call(null, 42); }, TypeError);
+try {
+  Array.prototype.sort.call(null, 42);
+} catch (exception) {
+  assertEquals(
+    'The comparison function must be either a function or undefined',
+    exception.message
+  );
+}
diff --git a/src/v8/test/mjsunit/harmony/async-for-of-non-iterable.js b/src/v8/test/mjsunit/harmony/async-for-of-non-iterable.js
index c84c9c6..3394ed3 100644
--- a/src/v8/test/mjsunit/harmony/async-for-of-non-iterable.js
+++ b/src/v8/test/mjsunit/harmony/async-for-of-non-iterable.js
@@ -2,7 +2,6 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-// Flags: --harmony-async-iteration
 var done = false;
 
 async function f() {
diff --git a/src/v8/test/mjsunit/harmony/async-from-sync-iterator.js b/src/v8/test/mjsunit/harmony/async-from-sync-iterator.js
index d965bd0..a7b0d1b 100644
--- a/src/v8/test/mjsunit/harmony/async-from-sync-iterator.js
+++ b/src/v8/test/mjsunit/harmony/async-from-sync-iterator.js
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-// Flags: --harmony-async-iteration --allow-natives-syntax
+// Flags: --allow-natives-syntax
 
 let testFailed = false;
 let testFailure;
diff --git a/src/v8/test/mjsunit/harmony/async-generators-basic.js b/src/v8/test/mjsunit/harmony/async-generators-basic.js
index 29441b1..d7af183 100644
--- a/src/v8/test/mjsunit/harmony/async-generators-basic.js
+++ b/src/v8/test/mjsunit/harmony/async-generators-basic.js
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-// Flags: --harmony-async-iteration --allow-natives-syntax
+// Flags: --allow-natives-syntax
 
 function assertThrowsAsync(run, errorType, message) {
   var actual;
diff --git a/src/v8/test/mjsunit/harmony/async-generators-resume-return.js b/src/v8/test/mjsunit/harmony/async-generators-resume-return.js
index 7a7efe7..715c81f 100644
--- a/src/v8/test/mjsunit/harmony/async-generators-resume-return.js
+++ b/src/v8/test/mjsunit/harmony/async-generators-resume-return.js
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-// Flags: --harmony-async-iteration --allow-natives-syntax
+// Flags: --allow-natives-syntax
 
 // .return() from state suspendedStart with undefined
 testAsync(test => {
diff --git a/src/v8/test/mjsunit/harmony/async-generators-return.js b/src/v8/test/mjsunit/harmony/async-generators-return.js
index b0c7feb..27cbd43 100644
--- a/src/v8/test/mjsunit/harmony/async-generators-return.js
+++ b/src/v8/test/mjsunit/harmony/async-generators-return.js
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-// Flags: --harmony-async-iteration --allow-natives-syntax
+// Flags: --allow-natives-syntax
 
 testAsync(test => {
   test.plan(2);
diff --git a/src/v8/test/mjsunit/harmony/async-generators-yield.js b/src/v8/test/mjsunit/harmony/async-generators-yield.js
index c999c70..feb6339 100644
--- a/src/v8/test/mjsunit/harmony/async-generators-yield.js
+++ b/src/v8/test/mjsunit/harmony/async-generators-yield.js
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-// Flags: --harmony-async-iteration --allow-natives-syntax
+// Flags: --allow-natives-syntax
 
 // Yield a thenable which is never settled
 testAsync(test => {
diff --git a/src/v8/test/mjsunit/harmony/bigint.js b/src/v8/test/mjsunit/harmony/bigint.js
deleted file mode 100644
index ac89721..0000000
--- a/src/v8/test/mjsunit/harmony/bigint.js
+++ /dev/null
@@ -1,205 +0,0 @@
-// Copyright 2017 the V8 project authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// Flags: --allow-natives-syntax --harmony-bigint --no-opt
-
-'use strict'
-
-const zero = BigInt(0);
-const another_zero = BigInt(0);
-const one = BigInt(1);
-const another_one = BigInt(1);
-const two = BigInt(2);
-const three = BigInt(3);
-const six = BigInt(6);
-
-// BigInt
-{
-  assertSame(BigInt, BigInt.prototype.constructor)
-}
-
-// typeof
-{
-  assertEquals(typeof zero, "bigint");
-  assertEquals(typeof one, "bigint");
-}
-{
-  // TODO(neis): Enable once --no-opt can be removed.
-  //
-  // function Typeof(x) { return typeof x }
-  // assertEquals(Typeof(zero), "bigint");
-  // assertEquals(Typeof(zero), "bigint");
-  // %OptimizeFunctionOnNextCall(Typeof);
-  // assertEquals(Typeof(zero), "bigint");
-}
-
-// ToString
-{
-  assertEquals(String(zero), "0");
-  assertEquals(String(one), "1");
-}
-
-// .toString(radix)
-{
-  // assertEquals(expected, BigInt(input).toString(n)) is generated by:
-  // input = $(python -c "print(int('expected', n))")
-  assertEquals("hello", BigInt(18306744).toString(32));
-  assertEquals("-hello", BigInt(-18306744).toString(32));
-  assertEquals("abcde", BigInt(0xabcde).toString(16));
-  assertEquals("-abcde", BigInt(-0xabcde).toString(16));
-  assertEquals("1234567", BigInt(342391).toString(8));
-  assertEquals("-1234567", BigInt(-342391).toString(8));
-  assertEquals("1230123", BigInt(6939).toString(4));
-  assertEquals("-1230123", BigInt(-6939).toString(4));
-  assertEquals("1011001110001", BigInt(5745).toString(2));
-  assertEquals("-1011001110001", BigInt(-5745).toString(2));
-}
-
-// .parseInt
-{
-  assertEquals("hellobigint", BigInt.parseInt("hellobigint", 32).toString(32));
-  assertEquals("abc", BigInt.parseInt("101010111100", 2).toString(16));
-  // Detect "0x" prefix.
-  assertEquals("f00dcafe", BigInt.parseInt("0xf00dcafe").toString(16));
-  // Default base is 10, trailing junk is skipped.
-  assertEquals("abc", BigInt.parseInt("2748junk").toString(16));
-  // Objects are converted to string.
-  let obj = {toString: () => "0x12345"};
-  assertEquals("12345", BigInt.parseInt(obj).toString(16));
-  // Empty and invalid strings throw.
-  assertThrows("BigInt.parseInt('')", SyntaxError);
-  assertThrows("BigInt.parseInt('nope', 2)", SyntaxError);
-}
-
-// .valueOf
-{
-  assertEquals(Object(zero).valueOf(), another_zero);
-  assertThrows(() => { return BigInt.prototype.valueOf.call("string"); },
-               TypeError);
-  // TODO(jkummerow): Add tests for (new BigInt(...)).valueOf() when we
-  // can construct BigInt wrappers.
-}
-
-// ToBoolean
-{
-  assertTrue(!zero);
-  assertFalse(!!zero);
-  assertTrue(!!!zero);
-
-  assertFalse(!one);
-  assertTrue(!!one);
-  assertFalse(!!!one);
-}
-
-// Strict equality
-{
-  assertTrue(zero === zero);
-  assertFalse(zero !== zero);
-
-  assertTrue(zero === another_zero);
-  assertFalse(zero !== another_zero);
-
-  assertFalse(zero === one);
-  assertTrue(zero !== one);
-  assertTrue(one !== zero);
-  assertFalse(one === zero);
-
-  assertFalse(zero === 0);
-  assertTrue(zero !== 0);
-  assertFalse(0 === zero);
-  assertTrue(0 !== zero);
-}
-
-// SameValue
-{
-  const obj = Object.defineProperty({}, 'foo',
-      {value: zero, writable: false, configurable: false});
-
-  assertTrue(Reflect.defineProperty(obj, 'foo', {value: zero}));
-  assertTrue(Reflect.defineProperty(obj, 'foo', {value: another_zero}));
-  assertFalse(Reflect.defineProperty(obj, 'foo', {value: one}));
-}
-
-// SameValueZero
-{
-  assertTrue([zero].includes(zero));
-  assertTrue([zero].includes(another_zero));
-
-  assertFalse([zero].includes(+0));
-  assertFalse([zero].includes(-0));
-
-  assertFalse([+0].includes(zero));
-  assertFalse([-0].includes(zero));
-
-  assertTrue([one].includes(one));
-  assertTrue([one].includes(another_one));
-
-  assertFalse([one].includes(1));
-  assertFalse([1].includes(one));
-}{
-  assertTrue(new Set([zero]).has(zero));
-  assertTrue(new Set([zero]).has(another_zero));
-
-  assertFalse(new Set([zero]).has(+0));
-  assertFalse(new Set([zero]).has(-0));
-
-  assertFalse(new Set([+0]).has(zero));
-  assertFalse(new Set([-0]).has(zero));
-
-  assertTrue(new Set([one]).has(one));
-  assertTrue(new Set([one]).has(another_one));
-}{
-  assertTrue(new Map([[zero, 42]]).has(zero));
-  assertTrue(new Map([[zero, 42]]).has(another_zero));
-
-  assertFalse(new Map([[zero, 42]]).has(+0));
-  assertFalse(new Map([[zero, 42]]).has(-0));
-
-  assertFalse(new Map([[+0, 42]]).has(zero));
-  assertFalse(new Map([[-0, 42]]).has(zero));
-
-  assertTrue(new Map([[one, 42]]).has(one));
-  assertTrue(new Map([[one, 42]]).has(another_one));
-}
-
-// Binary ops.
-{
-  assertTrue(one + two === three);
-  assertEquals("hello1", "hello" + one);
-  assertEquals("2hello", two + "hello");
-  assertThrows("one + 2", TypeError);
-  assertThrows("2 + one", TypeError);
-  assertThrows("one + 0.5", TypeError);
-  assertThrows("0.5 + one", TypeError);
-  assertThrows("one + null", TypeError);
-  assertThrows("null + one", TypeError);
-
-  assertTrue(three - two === one);
-  assertThrows("two - 1", TypeError);
-  assertThrows("2 - one", TypeError);
-  assertThrows("two - 0.5", TypeError);
-  assertThrows("2.5 - one", TypeError);
-
-  assertTrue(two * three === six);
-  assertThrows("two * 1", TypeError);
-  assertThrows("1 * two", TypeError);
-  assertThrows("two * 1.5", TypeError);
-  assertThrows("1.5 * two", TypeError);
-
-  assertTrue(six / three === two);
-  assertThrows("six / 3", TypeError);
-  assertThrows("3 / three", TypeError);
-  assertThrows("six / 0.5", TypeError);
-  assertThrows("0.5 / six", TypeError);
-  assertThrows("zero / zero", RangeError);
-  assertThrows("zero / 0", TypeError);
-
-  assertTrue(three % two === one);
-  assertThrows("three % 2", TypeError);
-  assertThrows("3 % two", TypeError);
-  assertThrows("three % 2.5", TypeError);
-  assertThrows("3.5 % two", TypeError);
-  assertThrows("three % zero", RangeError);
-  assertThrows("three % 0", TypeError);
-}
diff --git a/src/v8/test/mjsunit/harmony/bigint/add.js b/src/v8/test/mjsunit/harmony/bigint/add.js
new file mode 100644
index 0000000..b57846e
--- /dev/null
+++ b/src/v8/test/mjsunit/harmony/bigint/add.js
@@ -0,0 +1,109 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Generated by tools/bigint-tester.py.
+
+// Flags: --harmony-bigint
+
+var data = [{
+  a: "a2102214b151421124f462d37f843",
+  b: "90f3fa0f2fb9b1481b1a4737586ad6bdf71cb2ae51e06fdcb00fb779163e94ae4237",
+  r: "90f3fa0f2fb9b1481b1a4737586ad6bdf71cb2b872e29127c523d88b6584c1e63a7a"
+}, {
+  a: "35ca28bdd383c1b9ffdb851cc7f385ad370eef3d",
+  b: "-ca2d4dd677f23e005f44ec121303c3c304940eb2fd15e9e88772a3c5ba8515",
+  r: "-ca2d4dd677f23e005f44ebdc48db05ef80d254b32190cd2093ecf68eab95d8"
+}, {
+  a: "-8abb4b6ca534b584fad2f5898dd22ae6",
+  b: "0",
+  r: "-8abb4b6ca534b584fad2f5898dd22ae6"
+}, {
+  a: "b3",
+  b: "4180a0a",
+  r: "4180abd"
+}, {
+  a: "-8de89",
+  b: "c329fbab24d762a9453f90b134fcf5da9777aa1fdb26b74f27583a92a43f0f2c450",
+  r: "c329fbab24d762a9453f90b134fcf5da9777aa1fdb26b74f27583a92a43f0e9e5c7"
+}, {
+  a: "-49af5f350d64c75047dfb107550dae478c983dd520e86c9807b1f5",
+  b: "60a62691669b8c323a29db2eb9cb75ba5811",
+  r: "-49af5f350d64c750477f0ae0c3a712bb5a5e13f9f22ea1224d59e4"
+}, {
+  a: "80bf614aaa1140792099375f7fac9c7046303a8d13086755d505795f38761",
+  b: "-949dc945",
+  r: "80bf614aaa1140792099375f7fac9c7046303a8d13086755d50570155be1c"
+}, {
+  a: "4241d736e6a40",
+  b: "-78e88f5eaeae4ff8b",
+  r: "-78e84d1cd7776954b"
+}, {
+  a: "-8033927bf52210827b99e712fb220631503adfaa4e0045c872b9b",
+  b: "-2f",
+  r: "-8033927bf52210827b99e712fb220631503adfaa4e0045c872bca"
+}, {
+  a: "-3ad8b67efe9",
+  b: "-35586bf43788fd8e313da33c62d9a5",
+  r: "-35586bf43788fd8e314150c7cac98e"
+}, {
+  a: "-a43d8c9af54e8ea545e1af4674613932650c833669c7adc9273b77",
+  b: "-6a4",
+  r: "-a43d8c9af54e8ea545e1af4674613932650c833669c7adc927421b"
+}, {
+  a: "26c178e22dd42280a59b",
+  b: "fba77d85ba082981ce4a1ca21ac8b805b389297dc",
+  r: "fba77d85ba082981ce4a1f0e3256dae2f5b133d77"
+}, {
+  a: "-c9bc2ac82920efc63fa48f63fae105ec432672b50269fad72ee8b44a1",
+  b: "8967d49deeff878f40fa1bf408400b8085820d47b",
+  r: "-c9bc2ac82920efc5b63cbac60be17e5d022c56c0fa29ef56a966a7026"
+}, {
+  a: "815a18c9a2d8c6e5f3fffa958430851c4ea3",
+  b: "59d451c6efad276d3cc393907dda0eca463488958f397bb09",
+  r: "59d451c6efad2f82de502dbe0a486e0a45dde0d8978b409ac"
+}, {
+  a: "8cfc360e8d215045cb5c289a50e5c7fa9da34c0b9d9be9597e6e476efdb121",
+  b: "-482747619f0edd06",
+  r: "8cfc360e8d215045cb5c289a50e5c7fa9da34c0b9d9be9115726e5cfeed41b"
+}, {
+  a: "346337dbb9bbfc08cb815434c50315d32d",
+  b: "-ac569f54f5ea8852463c7542e876a9953",
+  r: "299dcde66a5d5383a71d8ce0967bab39da"
+}, {
+  a: "8bb7c3e56",
+  b: "-c334d52ed6eb903256253e01fc0c5118fe9bc",
+  r: "-c334d52ed6eb903256253e01fc0bc5613ab66"
+}, {
+  a: "b1f444a7a95e6d1d293ff0182e3dd5e945234484a5b47516b5b42627ed54fa8cf1221e",
+  b: "-93b77e906778b7e0a85c07e08babe730edd93ed37adef19da9e76de2add3",
+  r: "b1f444a7a8cab59e98d877604d9579e16497989d74c69bd7e23947364fab131f0e744b"
+}, {
+  a: "9a156524b9",
+  b: "-bce28d1561fc0153b836c6e0969d2674fcb960331cdb55df24e34e4b65136fcb59",
+  r: "-bce28d1561fc0153b836c6e0969d2674fcb960331cdb55df24e34e4acafe0aa6a0"
+}, {
+  a: "5eaf418fbccefb4f53abc413c02cee60eb3880b615c615c2005b3d11c8ee4aaf3b4ded8",
+  b: "-eb8aa4a72cf44f06208",
+  r: "5eaf418fbccefb4f53abc413c02cee60eb3880b615c615c2005a518724471dbaec47cd0"
+}];
+
+var error_count = 0;
+for (var i = 0; i < data.length; i++) {
+  var d = data[i];
+  var a = BigInt.parseInt(d.a, 16);
+  var b = BigInt.parseInt(d.b, 16);
+  var r = a + b;
+  if (d.r !== r.toString(16)) {
+    print("Input A:  " + a.toString(16));
+    print("Input B:  " + b.toString(16));
+    print("Result:   " + r.toString(16));
+    print("Expected: " + d.r);
+    print("Op: +");
+    error_count++;
+  }
+}
+if (error_count !== 0) {
+  print("Finished with " + error_count + " errors.")
+  quit(1);
+}
diff --git a/src/v8/test/mjsunit/harmony/bigint/and.js b/src/v8/test/mjsunit/harmony/bigint/and.js
new file mode 100644
index 0000000..e5c3b14
--- /dev/null
+++ b/src/v8/test/mjsunit/harmony/bigint/and.js
@@ -0,0 +1,109 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Generated by tools/bigint-tester.py.
+
+// Flags: --harmony-bigint
+
+var data = [{
+  a: "-193b47d0d9a8688b329e80de92195f311825",
+  b: "-2fabed9434bff933e23ea21af0f21a43",
+  r: "-193b6ffbfdbc7cbffbbfe2feb21bfff31a67"
+}, {
+  a: "35979ec99b7ff03f81817ebc9ddd50025d1ccf41565b502f0fc85ec54f630",
+  b: "be96016cc031653c9b1eceb1dd",
+  r: "8c9401648000603c810c44b010"
+}, {
+  a: "-f594f8199c11594681a9c38fd985a03d8c79ce6c8d342809924c89b385af43116ec3a21",
+  b: "-53e7b9738caaecc58fde1b5a4aa9f782f28a04e2bb29d207ccd5d45",
+  r: "-f594f8199c115946d3effbffddafecfd8fffdf7ecfbdff8bf2ce8df3bfafd317eed7f65"
+}, {
+  a: "dd7245d3ca5b360296082e6ca91915179b257f36e45e6e44cf892db875fdcfb19522b3",
+  b: "-dcc83137df3bb234e1144390f6c5bc0772a07f2a4540865554d20ebd37be",
+  r: "dd7245d3ca0336028000044c891801140b013a02e00c4e00c5882d3820a90db1000002"
+}, {
+  a: "-28",
+  b: "eaec4017147fd9741ff3b98f1b6f71d8f3d6869c18b39c6237a6b2d4d2fc3c81e9",
+  r: "eaec4017147fd9741ff3b98f1b6f71d8f3d6869c18b39c6237a6b2d4d2fc3c81c8"
+}, {
+  a: "-223909fc585f36f995d6f72dd9f169df1fad8",
+  b: "b13e919ce59c18c7c0517eecdb2519155cc",
+  r: "80360184a0880042000052240a040000508"
+}, {
+  a: "-fcb4ac9fdc7ee85d03585f944a79b28efffb461e17df2d",
+  b: "13cd27fb49c92d53c567688ab6b9",
+  r: "38023b100492100042160882091"
+}, {
+  a: "-1a16ca8c3725cec0c8a61ce81",
+  b: "-dbf3e",
+  r: "-1a16ca8c3725cec0c8a6dffbe"
+}, {
+  a: "-834db45b67472062091e",
+  b: "5aff66623af6b6cd042a361d5a22aea03152b764a056c71",
+  r: "5aff66623af6b6cd042a361d5a228a2030408304a056460"
+}, {
+  a: "1a8c37cff2e02f5272bc61d60b8301e443c38172446f75d75e01c41f60",
+  b: "e15d12bee18edaca77ad15ff0a567e132bb1b046623858",
+  r: "215012bc61860a8201a401c30052440321911000401840"
+}, {
+  a: "-f463",
+  b: "bb02038e2ff03fa",
+  r: "bb02038e2ff0398"
+}, {
+  a: "3178f92d2eeee1aebc33f085aa96c9046f1133ad6afbd666664ab79625639e001",
+  b: "124d8bd8ea20d8e510ba30d9",
+  r: "20d02406020586010382001"
+}, {
+  a: "fc7aaaa7a52f3604e1e700f01ea6f266912f583bffa78aee08939401056cde",
+  b: "-50e3611d6ada075f432319f10c8192f1de56ead628972",
+  r: "fc7aaaa7a52f3604e0e100e008025202010d4820ef2782c00012900005648e"
+}, {
+  a: "7dea10c67bdf023c00d94643e9f2d38295635b0b2b55a0e40818",
+  b: "8defe4741785c6c2d2ecaf7752a903ed",
+  r: "443e0701380844252082b5500a00008"
+}, {
+  a: "6f837e0ec2d00abb60051299bfd36b58c803f6445f91bb8dded858c6c1c476142",
+  b: "-26746eda5ca5095ab8f315c88b201cfa2affbbb700fc3bba8626b5bfd0a",
+  r: "6f837e08829000a3400400010cc22350c80304440000088d02c04040c14040042"
+}, {
+  a: "ab69c286138358dea4308b60f12f212fcd1e0",
+  b: "-c8735b6ce5513cc661fdae7941055028a2ea768dc13b9c83a79b9bf84e62cdf",
+  r: "aa29c2041181501e84200840602401218d120"
+}, {
+  a: "6c9ec2e7cdb2c1fb630a8e16323138db939c2a21e3576b777d",
+  b: "-51cf93f77a711c00",
+  r: "6c9ec2e7cdb2c1fb630a8e16323138db938c202000050a6400"
+}, {
+  a: "edee34cd0c29ad27fed12e77a42aedbf8b53161716c90d516394b9038a2f125c95",
+  b: "-18a515e3705a582d82f14bd42075b3b",
+  r: "edee34cd0c29ad27fed12e77a42aedbf8b52140600c8085061049003022d100485"
+}, {
+  a: "466fee7dabecbaea71c19892f045d7d196a80c6f",
+  b: "-5c93c7afd552be",
+  r: "466fee7dabecbaea71c19892f001441010280c42"
+}, {
+  a: "-657c587f67a70177797befb96f116c2843",
+  b: "-c3b8e2",
+  r: "-657c587f67a70177797befb96f11efb8e4"
+}];
+
+var error_count = 0;
+for (var i = 0; i < data.length; i++) {
+  var d = data[i];
+  var a = BigInt.parseInt(d.a, 16);
+  var b = BigInt.parseInt(d.b, 16);
+  var r = a & b;
+  if (d.r !== r.toString(16)) {
+    print("Input A:  " + a.toString(16));
+    print("Input B:  " + b.toString(16));
+    print("Result:   " + r.toString(16));
+    print("Expected: " + d.r);
+    print("Op: &");
+    error_count++;
+  }
+}
+if (error_count !== 0) {
+  print("Finished with " + error_count + " errors.")
+  quit(1);
+}
diff --git a/src/v8/test/mjsunit/harmony/bigint/as-int-n.js b/src/v8/test/mjsunit/harmony/bigint/as-int-n.js
new file mode 100644
index 0000000..faa7dba
--- /dev/null
+++ b/src/v8/test/mjsunit/harmony/bigint/as-int-n.js
@@ -0,0 +1,300 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --harmony-bigint
+
+// BigInt.asIntN
+{
+  assertEquals(2, BigInt.asIntN.length);
+}{
+  assertEquals(-1n, BigInt.asIntN(3, 15n));
+  assertEquals(-2n, BigInt.asIntN(3, 14n));
+  assertEquals(-3n, BigInt.asIntN(3, 13n));
+  assertEquals(-4n, BigInt.asIntN(3, 12n));
+  assertEquals(3n, BigInt.asIntN(3, 11n));
+  assertEquals(2n, BigInt.asIntN(3, 10n));
+  assertEquals(1n, BigInt.asIntN(3, 9n));
+  assertEquals(0n, BigInt.asIntN(3, 8n));
+  assertEquals(-1n, BigInt.asIntN(3, 7n));
+  assertEquals(-2n, BigInt.asIntN(3, 6n));
+  assertEquals(-3n, BigInt.asIntN(3, 5n));
+  assertEquals(-4n, BigInt.asIntN(3, 4n));
+  assertEquals(3n, BigInt.asIntN(3, 3n));
+  assertEquals(2n, BigInt.asIntN(3, 2n));
+  assertEquals(1n, BigInt.asIntN(3, 1n));
+  assertEquals(0n, BigInt.asIntN(3, 0n));
+  assertEquals(-1n, BigInt.asIntN(3, -1n));
+  assertEquals(-2n, BigInt.asIntN(3, -2n));
+  assertEquals(-3n, BigInt.asIntN(3, -3n));
+  assertEquals(-4n, BigInt.asIntN(3, -4n));
+  assertEquals(3n, BigInt.asIntN(3, -5n));
+  assertEquals(2n, BigInt.asIntN(3, -6n));
+  assertEquals(1n, BigInt.asIntN(3, -7n));
+  assertEquals(0n, BigInt.asIntN(3, -8n));
+  assertEquals(-1n, BigInt.asIntN(3, -9n));
+  assertEquals(-2n, BigInt.asIntN(3, -10n));
+  assertEquals(-3n, BigInt.asIntN(3, -11n));
+  assertEquals(-4n, BigInt.asIntN(3, -12n));
+  assertEquals(3n, BigInt.asIntN(3, -13n));
+  assertEquals(2n, BigInt.asIntN(3, -14n));
+  assertEquals(1n, BigInt.asIntN(3, -15n));
+}{
+  assertEquals(254n, BigInt.asIntN(10, 254n));
+  assertEquals(255n, BigInt.asIntN(10, 255n));
+  assertEquals(256n, BigInt.asIntN(10, 256n));
+  assertEquals(257n, BigInt.asIntN(10, 257n));
+  assertEquals(510n, BigInt.asIntN(10, 510n));
+  assertEquals(511n, BigInt.asIntN(10, 511n));
+  assertEquals(-512n, BigInt.asIntN(10, 512n));
+  assertEquals(-511n, BigInt.asIntN(10, 513n));
+  assertEquals(-2n, BigInt.asIntN(10, 1022n));
+  assertEquals(-1n, BigInt.asIntN(10, 1023n));
+  assertEquals(0n, BigInt.asIntN(10, 1024n));
+  assertEquals(1n, BigInt.asIntN(10, 1025n));
+}{
+  assertEquals(-254n, BigInt.asIntN(10, -254n));
+  assertEquals(-255n, BigInt.asIntN(10, -255n));
+  assertEquals(-256n, BigInt.asIntN(10, -256n));
+  assertEquals(-257n, BigInt.asIntN(10, -257n));
+  assertEquals(-510n, BigInt.asIntN(10, -510n));
+  assertEquals(-511n, BigInt.asIntN(10, -511n));
+  assertEquals(-512n, BigInt.asIntN(10, -512n));
+  assertEquals(511n, BigInt.asIntN(10, -513n));
+  assertEquals(2n, BigInt.asIntN(10, -1022n));
+  assertEquals(1n, BigInt.asIntN(10, -1023n));
+  assertEquals(0n, BigInt.asIntN(10, -1024n));
+  assertEquals(-1n, BigInt.asIntN(10, -1025n));
+}{
+  assertEquals(0n, BigInt.asIntN(0, 0n));
+  assertEquals(0n, BigInt.asIntN(1, 0n));
+  assertEquals(0n, BigInt.asIntN(16, 0n));
+  assertEquals(0n, BigInt.asIntN(31, 0n));
+  assertEquals(0n, BigInt.asIntN(32, 0n));
+  assertEquals(0n, BigInt.asIntN(33, 0n));
+  assertEquals(0n, BigInt.asIntN(63, 0n));
+  assertEquals(0n, BigInt.asIntN(64, 0n));
+  assertEquals(0n, BigInt.asIntN(65, 0n));
+  assertEquals(0n, BigInt.asIntN(127, 0n));
+  assertEquals(0n, BigInt.asIntN(128, 0n));
+  assertEquals(0n, BigInt.asIntN(129, 0n));
+}{
+  assertEquals(0n, BigInt.asIntN(0, 42n));
+  assertEquals(0n, BigInt.asIntN(1, 42n));
+  assertEquals(42n, BigInt.asIntN(16, 42n));
+  assertEquals(42n, BigInt.asIntN(31, 42n));
+  assertEquals(42n, BigInt.asIntN(32, 42n));
+  assertEquals(42n, BigInt.asIntN(33, 42n));
+  assertEquals(42n, BigInt.asIntN(63, 42n));
+  assertEquals(42n, BigInt.asIntN(64, 42n));
+  assertEquals(42n, BigInt.asIntN(65, 42n));
+  assertEquals(42n, BigInt.asIntN(127, 42n));
+  assertEquals(42n, BigInt.asIntN(128, 42n));
+  assertEquals(42n, BigInt.asIntN(129, 42n));
+}{
+  assertEquals(0n, BigInt.asIntN(0, -42n));
+  assertEquals(0n, BigInt.asIntN(1, -42n));
+  assertEquals(-42n, BigInt.asIntN(16, -42n));
+  assertEquals(-42n, BigInt.asIntN(31, -42n));
+  assertEquals(-42n, BigInt.asIntN(32, -42n));
+  assertEquals(-42n, BigInt.asIntN(33, -42n));
+  assertEquals(-42n, BigInt.asIntN(63, -42n));
+  assertEquals(-42n, BigInt.asIntN(64, -42n));
+  assertEquals(-42n, BigInt.asIntN(65, -42n));
+  assertEquals(-42n, BigInt.asIntN(127, -42n));
+  assertEquals(-42n, BigInt.asIntN(128, -42n));
+  assertEquals(-42n, BigInt.asIntN(129, -42n));
+}{
+  assertEquals(0n, BigInt.asIntN(0, 4294967295n));
+  assertEquals(-1n, BigInt.asIntN(1, 4294967295n));
+  assertEquals(-1n, BigInt.asIntN(16, 4294967295n));
+  assertEquals(-1n, BigInt.asIntN(31, 4294967295n));
+  assertEquals(-1n, BigInt.asIntN(32, 4294967295n));
+  assertEquals(4294967295n, BigInt.asIntN(33, 4294967295n));
+  assertEquals(4294967295n, BigInt.asIntN(63, 4294967295n));
+  assertEquals(4294967295n, BigInt.asIntN(64, 4294967295n));
+  assertEquals(4294967295n, BigInt.asIntN(65, 4294967295n));
+  assertEquals(4294967295n, BigInt.asIntN(127, 4294967295n));
+  assertEquals(4294967295n, BigInt.asIntN(128, 4294967295n));
+  assertEquals(4294967295n, BigInt.asIntN(129, 4294967295n));
+}{
+  assertEquals(0n, BigInt.asIntN(0, -4294967295n));
+  assertEquals(-1n, BigInt.asIntN(1, -4294967295n));
+  assertEquals(1n, BigInt.asIntN(16, -4294967295n));
+  assertEquals(1n, BigInt.asIntN(31, -4294967295n));
+  assertEquals(1n, BigInt.asIntN(32, -4294967295n));
+  assertEquals(-4294967295n, BigInt.asIntN(33, -4294967295n));
+  assertEquals(-4294967295n, BigInt.asIntN(63, -4294967295n));
+  assertEquals(-4294967295n, BigInt.asIntN(64,-4294967295n));
+  assertEquals(-4294967295n, BigInt.asIntN(65, -4294967295n));
+  assertEquals(-4294967295n, BigInt.asIntN(127, -4294967295n));
+  assertEquals(-4294967295n, BigInt.asIntN(128, -4294967295n));
+  assertEquals(-4294967295n, BigInt.asIntN(129, -4294967295n));
+}{
+  assertEquals(42n, BigInt.asIntN(2**32, 42n));
+  assertEquals(4294967295n, BigInt.asIntN(2**32, 4294967295n));
+  assertEquals(4294967296n, BigInt.asIntN(2**32, 4294967296n));
+  assertEquals(4294967297n, BigInt.asIntN(2**32, 4294967297n));
+}{
+  assertThrows(() => BigInt.asIntN(2n, 12n), TypeError);
+  assertThrows(() => BigInt.asIntN(-1, 0n), RangeError);
+  assertThrows(() => BigInt.asIntN(2**53, 0n), RangeError);
+  assertEquals(0n, BigInt.asIntN({}, 12n));
+  assertEquals(0n, BigInt.asIntN(2.9999, 12n));
+  assertEquals(-4n, BigInt.asIntN(3.1234, 12n));
+}{
+  assertThrows(() => BigInt.asIntN(3, 12), TypeError);
+  assertEquals(-4n, BigInt.asIntN(3, "12"));
+  assertEquals(0x123456789abcdefn,
+               BigInt.asIntN(64, 0xabcdef0123456789abcdefn));
+}
+
+// BigInt.asUintN
+{
+  assertEquals(2, BigInt.asUintN.length);
+}{
+  assertEquals(7n, BigInt.asUintN(3, 15n));
+  assertEquals(6n, BigInt.asUintN(3, 14n));
+  assertEquals(5n, BigInt.asUintN(3, 13n));
+  assertEquals(4n, BigInt.asUintN(3, 12n));
+  assertEquals(3n, BigInt.asUintN(3, 11n));
+  assertEquals(2n, BigInt.asUintN(3, 10n));
+  assertEquals(1n, BigInt.asUintN(3, 9n));
+  assertEquals(0n, BigInt.asUintN(3, 8n));
+  assertEquals(7n, BigInt.asUintN(3, 7n));
+  assertEquals(6n, BigInt.asUintN(3, 6n));
+  assertEquals(5n, BigInt.asUintN(3, 5n));
+  assertEquals(4n, BigInt.asUintN(3, 4n));
+  assertEquals(3n, BigInt.asUintN(3, 3n));
+  assertEquals(2n, BigInt.asUintN(3, 2n));
+  assertEquals(1n, BigInt.asUintN(3, 1n));
+  assertEquals(0n, BigInt.asUintN(3, 0n));
+  assertEquals(7n, BigInt.asUintN(3, -1n));
+  assertEquals(6n, BigInt.asUintN(3, -2n));
+  assertEquals(5n, BigInt.asUintN(3, -3n));
+  assertEquals(4n, BigInt.asUintN(3, -4n));
+  assertEquals(3n, BigInt.asUintN(3, -5n));
+  assertEquals(2n, BigInt.asUintN(3, -6n));
+  assertEquals(1n, BigInt.asUintN(3, -7n));
+  assertEquals(0n, BigInt.asUintN(3, -8n));
+  assertEquals(7n, BigInt.asUintN(3, -9n));
+  assertEquals(6n, BigInt.asUintN(3, -10n));
+  assertEquals(5n, BigInt.asUintN(3, -11n));
+  assertEquals(4n, BigInt.asUintN(3, -12n));
+  assertEquals(3n, BigInt.asUintN(3, -13n));
+  assertEquals(2n, BigInt.asUintN(3, -14n));
+  assertEquals(1n, BigInt.asUintN(3, -15n));
+}{
+  assertEquals(254n, BigInt.asUintN(10, 254n));
+  assertEquals(255n, BigInt.asUintN(10, 255n));
+  assertEquals(256n, BigInt.asUintN(10, 256n));
+  assertEquals(257n, BigInt.asUintN(10, 257n));
+  assertEquals(510n, BigInt.asUintN(10, 510n));
+  assertEquals(511n, BigInt.asUintN(10, 511n));
+  assertEquals(512n, BigInt.asUintN(10, 512n));
+  assertEquals(513n, BigInt.asUintN(10, 513n));
+  assertEquals(1022n, BigInt.asUintN(10, 1022n));
+  assertEquals(1023n, BigInt.asUintN(10, 1023n));
+  assertEquals(0n, BigInt.asUintN(10, 1024n));
+  assertEquals(1n, BigInt.asUintN(10, 1025n));
+}{
+  assertEquals(1024n - 254n, BigInt.asUintN(10, -254n));
+  assertEquals(1024n - 255n, BigInt.asUintN(10, -255n));
+  assertEquals(1024n - 256n, BigInt.asUintN(10, -256n));
+  assertEquals(1024n - 257n, BigInt.asUintN(10, -257n));
+  assertEquals(1024n - 510n, BigInt.asUintN(10, -510n));
+  assertEquals(1024n - 511n, BigInt.asUintN(10, -511n));
+  assertEquals(1024n - 512n, BigInt.asUintN(10, -512n));
+  assertEquals(1024n - 513n, BigInt.asUintN(10, -513n));
+  assertEquals(1024n - 1022n, BigInt.asUintN(10, -1022n));
+  assertEquals(1024n - 1023n, BigInt.asUintN(10, -1023n));
+  assertEquals(0n, BigInt.asUintN(10, -1024n));
+  assertEquals(1023n, BigInt.asUintN(10, -1025n));
+}{
+  assertEquals(0n, BigInt.asUintN(0, 0n));
+  assertEquals(0n, BigInt.asUintN(1, 0n));
+  assertEquals(0n, BigInt.asUintN(16, 0n));
+  assertEquals(0n, BigInt.asUintN(31, 0n));
+  assertEquals(0n, BigInt.asUintN(32, 0n));
+  assertEquals(0n, BigInt.asUintN(33, 0n));
+  assertEquals(0n, BigInt.asUintN(63, 0n));
+  assertEquals(0n, BigInt.asUintN(64, 0n));
+  assertEquals(0n, BigInt.asUintN(65, 0n));
+  assertEquals(0n, BigInt.asUintN(127, 0n));
+  assertEquals(0n, BigInt.asUintN(128, 0n));
+  assertEquals(0n, BigInt.asUintN(129, 0n));
+}{
+  assertEquals(0n, BigInt.asUintN(0, 42n));
+  assertEquals(0n, BigInt.asUintN(1, 42n));
+  assertEquals(42n, BigInt.asUintN(16, 42n));
+  assertEquals(42n, BigInt.asUintN(31, 42n));
+  assertEquals(42n, BigInt.asUintN(32, 42n));
+  assertEquals(42n, BigInt.asUintN(33, 42n));
+  assertEquals(42n, BigInt.asUintN(63, 42n));
+  assertEquals(42n, BigInt.asUintN(64, 42n));
+  assertEquals(42n, BigInt.asUintN(65, 42n));
+  assertEquals(42n, BigInt.asUintN(127, 42n));
+  assertEquals(42n, BigInt.asUintN(128, 42n));
+  assertEquals(42n, BigInt.asUintN(129, 42n));
+}{
+  assertEquals(0n, BigInt.asUintN(0, -42n));
+  assertEquals(0n, BigInt.asUintN(1, -42n));
+  assertEquals(65536n - 42n, BigInt.asUintN(16, -42n));
+  assertEquals(2147483648n - 42n, BigInt.asUintN(31, -42n));
+  assertEquals(4294967296n - 42n, BigInt.asUintN(32, -42n));
+  assertEquals(8589934592n - 42n, BigInt.asUintN(33, -42n));
+  assertEquals(9223372036854775808n - 42n, BigInt.asUintN(63, -42n));
+  assertEquals(18446744073709551616n - 42n, BigInt.asUintN(64, -42n));
+  assertEquals(36893488147419103232n - 42n, BigInt.asUintN(65, -42n));
+  assertEquals(2n**127n - 42n, BigInt.asUintN(127, -42n));
+  assertEquals(2n**128n - 42n, BigInt.asUintN(128, -42n));
+  assertEquals(2n**129n - 42n, BigInt.asUintN(129, -42n));
+}{
+  assertEquals(0n, BigInt.asUintN(0, 4294967295n));
+  assertEquals(1n, BigInt.asUintN(1, 4294967295n));
+  assertEquals(65535n, BigInt.asUintN(16, 4294967295n));
+  assertEquals(2147483647n, BigInt.asUintN(31, 4294967295n));
+  assertEquals(4294967295n, BigInt.asUintN(32, 4294967295n));
+  assertEquals(4294967295n, BigInt.asUintN(33, 4294967295n));
+  assertEquals(4294967295n, BigInt.asUintN(63, 4294967295n));
+  assertEquals(4294967295n, BigInt.asUintN(64, 4294967295n));
+  assertEquals(4294967295n, BigInt.asUintN(65, 4294967295n));
+  assertEquals(4294967295n, BigInt.asUintN(127, 4294967295n));
+  assertEquals(4294967295n, BigInt.asUintN(128, 4294967295n));
+  assertEquals(4294967295n, BigInt.asUintN(129, 4294967295n));
+}{
+  assertEquals(0n, BigInt.asUintN(0, -4294967295n));
+  assertEquals(1n, BigInt.asUintN(1, -4294967295n));
+  assertEquals(1n, BigInt.asUintN(16, -4294967295n));
+  assertEquals(1n, BigInt.asUintN(31, -4294967295n));
+  assertEquals(1n, BigInt.asUintN(32, -4294967295n));
+  assertEquals(8589934592n - 4294967295n, BigInt.asUintN(33, -4294967295n));
+  assertEquals(9223372036854775808n - 4294967295n,
+      BigInt.asUintN(63, -4294967295n));
+  assertEquals(18446744073709551616n - 4294967295n,
+      BigInt.asUintN(64,-4294967295n));
+  assertEquals(36893488147419103232n - 4294967295n,
+      BigInt.asUintN(65, -4294967295n));
+  assertEquals(2n**127n - 4294967295n, BigInt.asUintN(127, -4294967295n));
+  assertEquals(2n**128n - 4294967295n, BigInt.asUintN(128, -4294967295n));
+  assertEquals(2n**129n - 4294967295n, BigInt.asUintN(129, -4294967295n));
+}{
+  assertEquals(42n, BigInt.asUintN(2**32, 42n));
+  assertEquals(4294967295n, BigInt.asUintN(2**32, 4294967295n));
+  assertEquals(4294967296n, BigInt.asUintN(2**32, 4294967296n));
+  assertEquals(4294967297n, BigInt.asUintN(2**32, 4294967297n));
+}{
+  assertEquals(
+      BigInt.parseInt("0x7234567812345678"),
+      BigInt.asUintN(63, BigInt.parseInt("0xf234567812345678")));
+}{
+  assertThrows(() => BigInt.asUintN(2n, 12n), TypeError);
+  assertThrows(() => BigInt.asUintN(-1, 0n), RangeError);
+  assertThrows(() => BigInt.asUintN(2**53, 0n), RangeError);
+  assertEquals(0n, BigInt.asUintN({}, 12n));
+  assertEquals(0n, BigInt.asUintN(2.9999, 12n));
+  assertEquals(4n, BigInt.asUintN(3.1234, 12n));
+}{
+  assertThrows(() => BigInt.asUintN(3, 12), TypeError);
+  assertEquals(4n, BigInt.asUintN(3, "12"));
+}
diff --git a/src/v8/test/mjsunit/harmony/bigint/basics.js b/src/v8/test/mjsunit/harmony/bigint/basics.js
new file mode 100644
index 0000000..398d670
--- /dev/null
+++ b/src/v8/test/mjsunit/harmony/bigint/basics.js
@@ -0,0 +1,587 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax --harmony-bigint
+
+'use strict'
+
+const minus_one = BigInt(-1);
+const zero = BigInt(0);
+const another_zero = BigInt(0);
+const one = BigInt(1);
+const another_one = BigInt(1);
+const two = BigInt(2);
+const three = BigInt(3);
+const six = BigInt(6);
+
+// BigInt
+{
+  assertSame(BigInt, BigInt.prototype.constructor)
+}{
+  assertThrows(() => new BigInt, TypeError);
+  assertThrows(() => new BigInt(), TypeError);
+  assertThrows(() => new BigInt(0), TypeError);
+  assertThrows(() => new BigInt(0n), TypeError);
+  assertThrows(() => new BigInt("0"), TypeError);
+}{
+  class C extends BigInt { constructor() { throw 42 } };
+  assertThrowsEquals(() => new C, 42);
+}
+
+// ToBigInt, NumberToBigInt, BigInt
+{
+  assertThrows(() => BigInt(undefined), TypeError);
+  assertThrows(() => BigInt(null), TypeError);
+  assertThrows(() => BigInt({}), SyntaxError);
+  assertThrows(() => BigInt("foo"), SyntaxError);
+
+  assertThrows(() => BigInt("1j"), SyntaxError);
+  assertThrows(() => BigInt("0b1ju"), SyntaxError);
+  assertThrows(() => BigInt("0o1jun"), SyntaxError);
+  assertThrows(() => BigInt("0x1junk"), SyntaxError);
+}{
+  assertSame(BigInt(true), 1n);
+  assertSame(BigInt(false), 0n);
+  assertSame(BigInt(""), 0n);
+  assertSame(BigInt(" 42"), 42n);
+  assertSame(BigInt("0b101010"), 42n);
+  assertSame(BigInt("  0b101011"), 43n);
+  assertSame(BigInt("0x2a  "), 42n);
+  assertSame(BigInt("    0x2b"), 43n);
+  assertSame(BigInt("0o52"), 42n);
+  assertSame(BigInt("     0o53\n"), 43n);
+  assertSame(BigInt(-0), 0n);
+  assertSame(BigInt(42), 42n);
+  assertSame(BigInt(42n), 42n);
+  assertSame(BigInt(Object(42n)), 42n);
+  assertSame(BigInt(2**53 - 1), 9007199254740991n);
+  assertSame(BigInt(Object(2**53 - 1)), 9007199254740991n);
+  assertSame(BigInt([]), 0n);
+}{
+  assertThrows(() => BigInt(NaN), RangeError);
+  assertThrows(() => BigInt(-Infinity), RangeError);
+  assertThrows(() => BigInt(+Infinity), RangeError);
+  assertThrows(() => BigInt(4.00000001), RangeError);
+  assertThrows(() => BigInt(Object(4.00000001)), RangeError);
+  assertThrows(() => BigInt(2**53), RangeError);
+  assertThrows(() => BigInt(2**1000), RangeError);
+}
+
+// BigInt.prototype[Symbol.toStringTag]
+{
+  const toStringTag = Object.getOwnPropertyDescriptor(
+      BigInt.prototype, Symbol.toStringTag);
+  assertTrue(toStringTag.configurable);
+  assertFalse(toStringTag.enumerable);
+  assertFalse(toStringTag.writable);
+  assertEquals("BigInt", toStringTag.value);
+}
+
+// Object.prototype.toString
+{
+  const toString = Object.prototype.toString;
+
+  assertEquals("[object BigInt]", toString.call(42n));
+  assertEquals("[object BigInt]", toString.call(Object(42n)));
+
+  delete BigInt.prototype[Symbol.toStringTag];
+  assertEquals("[object Object]", toString.call(42n));
+  assertEquals("[object Object]", toString.call(Object(42n)));
+
+  BigInt.prototype[Symbol.toStringTag] = "foo";
+  assertEquals("[object foo]", toString.call(42n));
+  assertEquals("[object foo]", toString.call(Object(42n)));
+}
+
+// typeof
+{
+  assertEquals(typeof zero, "bigint");
+  assertEquals(typeof one, "bigint");
+}{
+  assertEquals(%Typeof(zero), "bigint");
+  assertEquals(%Typeof(one), "bigint");
+}{
+  assertTrue(typeof 1n === "bigint");
+  assertFalse(typeof 1n === "BigInt");
+  assertFalse(typeof 1 === "bigint");
+}
+
+// ToString
+{
+  assertEquals(String(zero), "0");
+  assertEquals(String(one), "1");
+}
+
+// .toString(radix)
+{
+  // Single-digit BigInts: random-generated inputs close to kMaxInt.
+  // Expectations computed with the following Python program:
+  //   def Format(x, base):
+  //     s = ""
+  //     while x > 0:
+  //       s = "0123456789abcdefghijklmnopqrstuvwxyz"[x % base] + s
+  //       x = x / base
+  //     return s
+  assertEquals("10100110000100101000011100101", BigInt(0x14c250e5).toString(2));
+  assertEquals("-110110100010011111001011111", BigInt(-0x6d13e5f).toString(2));
+  assertEquals("1001222020000100000", BigInt(0x18c72873).toString(3));
+  assertEquals("-1212101122110102020", BigInt(-0x2b19aebe).toString(3));
+  assertEquals("120303133110120", BigInt(0x18cdf518).toString(4));
+  assertEquals("-113203101020122", BigInt(-0x178d121a).toString(4));
+  assertEquals("1323302233400", BigInt(0x18de6256).toString(5));
+  assertEquals("-2301033210212", BigInt(-0x25f7f454).toString(5));
+  assertEquals("131050115130", BigInt(0x211f0d5e).toString(6));
+  assertEquals("-104353333321", BigInt(-0x186bbe91).toString(6));
+  assertEquals("25466260221", BigInt(0x2f69f47e).toString(7));
+  assertEquals("-31051540346", BigInt(-0x352c7efa).toString(7));
+  assertEquals("5004630525", BigInt(0x28133155).toString(8));
+  assertEquals("-7633240703", BigInt(-0x3e6d41c3).toString(8));
+  assertEquals("705082365", BigInt(0x121f4264).toString(9));
+  assertEquals("-780654431", BigInt(-0x1443b36e).toString(9));
+  assertEquals("297019028", BigInt(0x11b42694).toString(10));
+  assertEquals("-721151126", BigInt(-0x2afbe496).toString(10));
+  assertEquals("312914074", BigInt(0x27ca6879).toString(11));
+  assertEquals("-198025592", BigInt(-0x1813d3a7).toString(11));
+  assertEquals("191370997", BigInt(0x2d14f083).toString(12));
+  assertEquals("-1b8aab4a2", BigInt(-0x32b52efa).toString(12));
+  assertEquals("7818062c", BigInt(0x1c84a48c).toString(13));
+  assertEquals("-7529695b", BigInt(-0x1badffee).toString(13));
+  assertEquals("6bc929c4", BigInt(0x2b0a91d0).toString(14));
+  assertEquals("-63042008", BigInt(-0x270dff78).toString(14));
+  assertEquals("5e8b8dec", BigInt(0x3cd27d7f).toString(15));
+  assertEquals("-4005433d", BigInt(-0x28c0821a).toString(15));
+  assertEquals("10b35ca3", BigInt(0x10b35ca3).toString(16));
+  assertEquals("-23d4d9d6", BigInt(-0x23d4d9d6).toString(16));
+  assertEquals("28c3d5e3", BigInt(0x3d75d48c).toString(17));
+  assertEquals("-10c06328", BigInt(-0x1979b7f0).toString(17));
+  assertEquals("eb8d349", BigInt(0x1dacf0a5).toString(18));
+  assertEquals("-1217015h", BigInt(-0x28b3c23f).toString(18));
+  assertEquals("1018520b", BigInt(0x357da01a).toString(19));
+  assertEquals("-9c64e33", BigInt(-0x1b0e9571).toString(19));
+  assertEquals("d7bf9ab", BigInt(0x3309daa3).toString(20));
+  assertEquals("-58h0h9h", BigInt(-0x14c30c55).toString(20));
+  assertEquals("64igi9h", BigInt(0x1fdd329c).toString(21));
+  assertEquals("-45cbc4a", BigInt(-0x15cf9682).toString(21));
+  assertEquals("7bi7d1h", BigInt(0x32f0dfe3).toString(22));
+  assertEquals("-61j743l", BigInt(-0x291ff61f).toString(22));
+  assertEquals("5g5gg25", BigInt(0x325a10bd).toString(23));
+  assertEquals("-3359flb", BigInt(-0x1bb653c9).toString(23));
+  assertEquals("392f5ec", BigInt(0x267ed69c).toString(24));
+  assertEquals("-2ab3icb", BigInt(-0x1bbf7bab).toString(24));
+  assertEquals("3jb2afo", BigInt(0x36f93c24).toString(25));
+  assertEquals("-30bcheh", BigInt(-0x2bec76fa).toString(25));
+  assertEquals("3845agk", BigInt(0x3d04bf64).toString(26));
+  assertEquals("-1gpjl3g", BigInt(-0x1e720b1a).toString(26));
+  assertEquals("20bpaf0", BigInt(0x2e8ff627).toString(27));
+  assertEquals("-292i3c2", BigInt(-0x35f751fe).toString(27));
+  assertEquals("266113k", BigInt(0x3fd26738).toString(28));
+  assertEquals("-1eh16bo", BigInt(-0x2bb5726c).toString(28));
+  assertEquals("19gj7qa", BigInt(0x2f28e8d8).toString(29));
+  assertEquals("-13a0apf", BigInt(-0x278b4588).toString(29));
+  assertEquals("iasrb8", BigInt(0x1a99b3be).toString(30));
+  assertEquals("-frlhoc", BigInt(-0x17106f48).toString(30));
+  assertEquals("bfe4p2", BigInt(0x139f1ea3).toString(31));
+  assertEquals("-ioal1a", BigInt(-0x200e49fa).toString(31));
+  assertEquals("m0v0kf", BigInt(0x2c0f828f).toString(32));
+  assertEquals("-g4bab5", BigInt(-0x2045a965).toString(32));
+  assertEquals("9i1kit", BigInt(0x16450a9f).toString(33));
+  assertEquals("-fqb0e7", BigInt(-0x24d9e889).toString(33));
+  assertEquals("gb9r6m", BigInt(0x2c3acf46).toString(34));
+  assertEquals("-jcaemv", BigInt(-0x346f72b3).toString(34));
+  assertEquals("cw4mbk", BigInt(0x2870cdcb).toString(35));
+  assertEquals("-hw4eki", BigInt(-0x3817c29b).toString(35));
+  assertEquals("alzwgj", BigInt(0x263e2c13).toString(36));
+  assertEquals("-bo4ukz", BigInt(-0x2a0f97d3).toString(36));
+
+  // Multi-digit BigInts.
+  // Test parseInt/toString round trip on a list of randomly generated
+  // string representations of numbers in various bases.
+  var positive = [0, 0,  // Skip base 0 and 1.
+    "1100110001100010110011110110010010001011100111100101111000111101100001000",
+    "1001200022210010220101120212021002011002201122200002211102120120021011020",
+    "1111113020012203332320220022231110130001001320122012131311333110012023232",
+    "4214313040222110434114402342013144321401424143322013320403411012033300312",
+    "5025302003542512450341430541203424555035430434034243510233043041501130015",
+    "6231052230016515343200525230300322104013130605414211331345043144525012021",
+    "1146340505617030644211355340006353546230356336306352536433054143503442135",
+    "7262360724624787621528668212168232276348417717770383567066203032200270570",
+    "7573792356581293501680046955899735043496925151216904903504319328753434194",
+    "4a627927557579898720a42647639128174a8689889766a219342133671449069a2235011",
+    "1a574a5848289924996342a32893380690322330393633b587ba5a15b7b82080222400464",
+    "5163304c74c387b7a443c92466688595b671a3329b42083b1499b0c10a74a9298a06c3a5a",
+    "4b63c834356a03c80946133284a709cbbc2a75022757207dc31c14abd4c160dc122327c17",
+    "d8d59cbb4ca2860de7c002eee4ab3c215b90069200d20dbdc0111cb1e1bab97e8c7609670",
+    "22d4b69398a7f848e6ae36798811cd1a63d90f340d8607f3ce5566c97c18468787eb2b9fd",
+    "1176gf69afd32cc105fa70c705927a384dbdb1g8d952f28028g31ebdc9e32a89f16e825ee",
+    "5d64b74f4d70632h4ee07h7c1e2da9125c42g2727f4b6d95e5cec6ga49566hh731ab5f544",
+    "7ff8cg7f05dd72916a09a4761ii7b0ibcg68ba39b10436f14efg76ge817317badcbi4gffc",
+    "6d7c4hci6cd72e4ja26j354i12i71gb0cbj12gi145j91h02hde3b72c65geb7ff9bi9d0c2b",
+    "c96997f50abe425d13a53kk4af631kg7db208ka5j5bfg8ca5f9c0bjf69j5kgg4jb5h7hi86",
+    "3g5fd800d9ib9j0i8all5jgb23dh9483ab6le5ad9g4kja8a0b3j5jbjfge7k5fffg2kbheee",
+    "9j1119d1cd61kmdm7kma105cki313f678fc3h25f4664281bbmg3fk97kfbh7d48j89j178ch",
+    "d2933cdc9jfe4hl3794kb3e13dg2lihad968ib9jg19dgf1fi482b27ji0d10c6kfkdge5764",
+    "bf6o0njkm1ij5in5nh7h94584bd80el02b07el5ojk9k9g0gn906do70gbbnckl048c0kdmao",
+    "8gb7jnge9p9cdgigo394oa33gfaenc3gnb53eceg4b8511gkkm88b0dod85e5bggpc861d7d5",
+    "qbbnqhkpleb4o8ndaddpc34h5b2iljn3jgnjdn5k57bi3n9i09hjle9hqgqdpgbnk499mak56",
+    "akg7e2976arn8i2m53gif0dp59bmfd7mk9erlg2qm3fc76da9glf397eh4ooij9il0nfl9gac",
+    "mehpbfrj5ah2ef3p2hl637gjp1pm5grqn4037pm1qfgfpr9cfljfc145hljehjjb48bb1n6en",
+    "rg6ik3agnb3p6t2rtja9h4il76i8fkqlt6gplap3fq6pfr7bbcfcp5ffncf3nm4kamap39hse",
+    "bk8rp9r9r8pltdqpb7euc6s9rcm33969pcq6uk3mtfoktt86di8589oacbam5tn29b9b6dq3j",
+    "npth8juld44rss3e57iigjg65po3d1h02heo4r103jmg3ocv89buqtgiov35k39rdf8j9t4ca",
+    "vrmqlwrrrd0uml1womae49jpa9tadh44fw7mucgk06l0uk4uqwuo37t6kwn7wwrm3a6oq081s",
+    "n5cft6gvufqd8iksquu2amghokk17gbtpguidc290af634p7k7rhmfu7bf1s62ej4megoa1j4",
+    "3v3gcrmlfc2tl0tefgkiogj41f6y2tmj9w5bxke8y03xqf49ox8gh9wbrhycrkluicqajtnur",
+    "z2m7b0sy2tzergtkqts5yj0dkrlfkxls81ijgxgfequizpntcwggv2d4rdzcncd0kj9mrmnrb",
+  ];
+  var negative = [0, 0,  // Skip base 0 and 1.
+    "-100010011110111010111111110001100100111010101000001011010010101100101000",
+    "-110012122000122102021210112200001000122011010120101201001122000002022102",
+    "-203210320111001002200122200001312300221100221321010300023323201113122333",
+    "-133042441230110320040323303341320302144241224443231311022240124413104131",
+    "-311325230504055004330150145105331121322231155401110315251422505233103112",
+    "-643153641664240231336166403516403454646560261062114326443664602606315326",
+    "-200057252627665476551635525303641543165622340301637556323453513664337277",
+    "-826688166214270516331644053744613530235020517172322840763172114078364165",
+    "-743042397390679269240157150971957535458122650450558451124173993544604852",
+    "-73528688500003573942a56a504a2996a1384129563098512a63196697975038692aaa63",
+    "-616576a2948a9029316290168b71137b027851639a0283150b125b664b74b767a3597805",
+    "-b875467540719b371b7a36047a7886872a5399c4c630c37149bc3182917a7a7c124475bb",
+    "-3860411b61d35977721bc81bd715c386c9b70a752940913d265505d8c7c5dd2624b591d7",
+    "-bad5dd79b083ee0da9a6296664e72c246d827762357116ae7076a22bb369acbc3a201d03",
+    "-f9b37352aff265124303942a463917a252ff1a2ff4a33777f490b4c103bdcd1a655dbe2c",
+    "-805fg8c74125214g383a8d8g573c49fa7c4035fbc6db61g5gb5g6beb8f90dae4a9a5g7cc",
+    "-70aae113459d3h5084b1gg209g3695d20e78d01gcbb71bh1bd4gdge31haf5hc02dghf14e",
+    "-c55a57haf47b7ih2gh6ea93098ig02b42icga6ead254e0aeeic7g53h5fd6637ge03b2e20",
+    "-e32f7204624ie596j731g72136cejc25ebbgb0140i4997fcdf477f021d86ci4e10db543a",
+    "-i7f32c817i3cac1c24c7786k6ig185f47cj1471ki6bb7agiae838027gjge9g59if9f88g6",
+    "-i30aha2030a9605c270h92e1ca3i02j996hl918gh52fbhb7i16ik1i919ieak3cj384kb61",
+    "-58jmem8e59li67aellid2083dabh4kh51ci1jg7c6a3k4l1hdgfkdha0fglfm4805kida5b9",
+    "-cl9iecjg9ak087cad4151lll44296heae2349g70fbjj37998m2ddn6427fgcl2aknhgn1a1",
+    "-alfjfhho4gf8bi4j2bi3743mhg2aache4c6jcinkmf5ddm7kf9gg350hlja16ealbdlk201j",
+    "-bhh1146ho3o2m3b839c565hbgjnhjh96oofbmdl7gn8h4f94kli94hkk180o79pc4d2l0721",
+    "-p00gknh7e05k6a3apg6i9lb46f4a9qeeiq1778ak8il5dcponk5gl2fiednb4pmo1agmoqph",
+    "-4j8lo4d4p508fnd2hkfb76e8ri81k6hq0op3pr14ca0cn96pccplk7rbahc9cdkdce1q16dn",
+    "-ednlo3ogf2i8annrel9rm323bpf00meed3oi47n0qrdgnd2n3il4bnsc9s2jd7loh44im8ra",
+    "-bjjg6fsbpcc2tc1o09m9r6fd6eoq5480har62a5offn9thcfahbno9kf9magl2akl0jgncj9",
+    "-sonuhat2h60glpbpej9jjado2s5l86122d26tudoc1d6aic2oitu793gk0mlac3dk1dufp1q",
+    "-i9pbvm53ubh8jqifuarauch8cbgk9cjsl6rlioka1phs1lskg1oosll23hjoli2subgr1rto",
+    "-w1ncn5t60b5dv669ekwnvk8n2g7djrsl8cdkwun8o3m5divc3jhnkp2381rhj70gc71a6wff",
+    "-buiq8v33p5ex44ps4s45enj6lrluivm19lcowkvntu72u0xguw13bxgxxe7mdlwt1a4qksae",
+    "-woiycfmea6i12r2yai49mf4lbd7w2jdoebiogfhnh1i4rwgox57obci8qbsfpb4w07nu19m5",
+    "-tbttuip1r6ioca6g6dw354o4m78qep9yh03nojx47yq29fqime6zstwllb74501qct8eskxn",
+  ];
+  for (var base = 2; base <= 36; base++) {
+    var input = positive[base];
+    assertEquals(input, BigInt.parseInt(input, base).toString(base));
+    input = negative[base];
+    assertEquals(input, BigInt.parseInt(input, base).toString(base));
+  }
+}
+
+// .parseInt
+{
+  assertEquals("hellobigint", BigInt.parseInt("hellobigint", 32).toString(32));
+  assertEquals("abc", BigInt.parseInt("101010111100", 2).toString(16));
+  // Detect "0x" prefix.
+  assertEquals("f00dcafe", BigInt.parseInt("0xf00dcafe").toString(16));
+  // Default base is 10, trailing junk is skipped.
+  assertEquals("abc", BigInt.parseInt("2748junk").toString(16));
+  // Objects are converted to string.
+  let obj = {toString: () => "0x12345"};
+  assertEquals("12345", BigInt.parseInt(obj).toString(16));
+  // Empty and invalid strings throw.
+  assertThrows("BigInt.parseInt('')", SyntaxError);
+  assertThrows("BigInt.parseInt('nope', 2)", SyntaxError);
+}
+
+// .valueOf
+{
+  assertEquals(Object(zero).valueOf(), another_zero);
+  assertThrows(() => { return BigInt.prototype.valueOf.call("string"); },
+               TypeError);
+  assertEquals(-42n, Object(-42n).valueOf());
+}
+
+// ToBoolean
+{
+  assertTrue(!zero);
+  assertFalse(!!zero);
+  assertTrue(!!!zero);
+
+  assertFalse(!one);
+  assertTrue(!!one);
+  assertFalse(!!!one);
+
+  // This is a hack to test Object::BooleanValue.
+  assertTrue(%CreateIterResultObject(42, one).done);
+  assertFalse(%CreateIterResultObject(42, zero).done);
+}
+
+// ToNumber
+{
+  assertThrows(() => isNaN(zero), TypeError);
+  assertThrows(() => isNaN(one), TypeError);
+
+  assertThrows(() => +zero, TypeError);
+  assertThrows(() => +one, TypeError);
+}
+{
+  let Zero = {valueOf() { return zero }};
+  let One = {valueOf() { return one }};
+
+  assertThrows(() => isNaN(Zero), TypeError);
+  assertThrows(() => isNaN(One), TypeError);
+
+  assertThrows(() => +Zero, TypeError);
+  assertThrows(() => +One, TypeError);
+}{
+  let Zero = {valueOf() { return Object(NaN) }, toString() { return zero }};
+  let One = {valueOf() { return one }, toString() { return NaN }};
+
+  assertThrows(() => isNaN(Zero), TypeError);
+  assertThrows(() => isNaN(One), TypeError);
+
+  assertThrows(() => +Zero, TypeError);
+  assertThrows(() => +One, TypeError);
+}
+
+// ToObject
+{
+  const ToObject = x => (new Function("", "return this")).call(x);
+
+  function test(x) {
+    const X = ToObject(x);
+    assertEquals(typeof x, "bigint");
+    assertEquals(typeof X, 'object');
+    assertEquals(X.constructor, BigInt);
+    assertTrue(X == x);
+  }
+
+  test(0n);
+  test(-1n);
+  test(1n);
+  test(2343423423423423423424234234234235234524353453452345324523452345234534n);
+}{
+  function test(x) {
+    const X = Object(x);
+    assertEquals(typeof x, "bigint");
+    assertEquals(typeof X, 'object');
+    assertEquals(X.constructor, BigInt);
+    assertTrue(X == x);
+  }
+
+  test(0n);
+  test(-1n);
+  test(1n);
+  test(2343423423423423423424234234234235234524353453452345324523452345234534n);
+}
+
+// Literals
+{
+  // Invalid literals.
+  assertThrows("00n", SyntaxError);
+  assertThrows("01n", SyntaxError);
+  assertThrows("0bn", SyntaxError);
+  assertThrows("0on", SyntaxError);
+  assertThrows("0xn", SyntaxError);
+  assertThrows("1.n", SyntaxError);
+  assertThrows("1.0n", SyntaxError);
+  assertThrows("1e25n", SyntaxError);
+
+  // Various radixes.
+  assertTrue(12345n === BigInt(12345));
+  assertTrue(0xabcden === BigInt(0xabcde));
+  assertTrue(0xAbCdEn === BigInt(0xabcde));
+  assertTrue(0o54321n === BigInt(0o54321));
+  assertTrue(0b1010101n === BigInt(0b1010101));
+}
+
+// Binary ops.
+{
+  let One = {valueOf() { return one }};
+  assertTrue(one + two === three);
+  assertTrue(One + two === three);
+  assertTrue(two + One === three);
+  assertEquals("hello1", "hello" + one);
+  assertEquals("2hello", two + "hello");
+  assertThrows("one + 2", TypeError);
+  assertThrows("2 + one", TypeError);
+  assertThrows("one + 0.5", TypeError);
+  assertThrows("0.5 + one", TypeError);
+  assertThrows("one + null", TypeError);
+  assertThrows("null + one", TypeError);
+
+  assertTrue(three - two === one);
+  assertThrows("two - 1", TypeError);
+  assertThrows("2 - one", TypeError);
+  assertThrows("two - 0.5", TypeError);
+  assertThrows("2.5 - one", TypeError);
+
+  assertTrue(two * three === six);
+  assertTrue(two * One === two);
+  assertTrue(One * two === two);
+  assertThrows("two * 1", TypeError);
+  assertThrows("1 * two", TypeError);
+  assertThrows("two * 1.5", TypeError);
+  assertThrows("1.5 * two", TypeError);
+
+  assertTrue(six / three === two);
+  assertThrows("six / 3", TypeError);
+  assertThrows("3 / three", TypeError);
+  assertThrows("six / 0.5", TypeError);
+  assertThrows("0.5 / six", TypeError);
+  assertThrows("zero / zero", RangeError);
+  assertThrows("zero / 0", TypeError);
+
+  assertTrue(three % two === one);
+  assertThrows("three % 2", TypeError);
+  assertThrows("3 % two", TypeError);
+  assertThrows("three % 2.5", TypeError);
+  assertThrows("3.5 % two", TypeError);
+  assertThrows("three % zero", RangeError);
+  assertThrows("three % 0", TypeError);
+}
+
+// Bitwise binary ops.
+{
+  let One = {valueOf() { return one }};
+  assertTrue((three & one) === one);
+  assertTrue((BigInt(-2) & zero) === zero);
+  assertTrue((three & One) === one);
+  assertTrue((One & three) === one);
+  assertThrows("three & 1", TypeError);
+  assertThrows("1 & three", TypeError);
+  assertThrows("three & true", TypeError);
+  assertThrows("true & three", TypeError);
+  assertThrows("three & {valueOf: function() { return 1; }}", TypeError);
+  assertThrows("({valueOf: function() { return 1; }}) & three", TypeError);
+
+  assertTrue((two | one) === three);
+  assertThrows("two | 0", TypeError);
+  assertThrows("0 | two", TypeError);
+  assertThrows("two | undefined", TypeError);
+  assertThrows("undefined | two", TypeError);
+
+  assertTrue((three ^ one) === two);
+  assertThrows("three ^ 1", TypeError);
+  assertThrows("1 ^ three", TypeError);
+  assertThrows("three ^ 2.5", TypeError);
+  assertThrows("2.5 ^ three", TypeError);
+}
+
+// Shift ops.
+{
+  assertTrue(one << one === two);
+  assertThrows("one << 1", TypeError);
+  assertThrows("1 << one", TypeError);
+  assertThrows("one << true", TypeError);
+  assertThrows("true << one", TypeError);
+
+  assertTrue(three >> one === one);
+  assertThrows("three >> 1", TypeError);
+  assertThrows("0xbeef >> one", TypeError);
+  assertThrows("three >> 1.5", TypeError);
+  assertThrows("23.45 >> three", TypeError);
+
+  assertThrows("three >>> one", TypeError);
+  assertThrows("three >>> 1", TypeError);
+  assertThrows("0xbeef >>> one", TypeError);
+  assertThrows("three >>> {valueOf: function() { return 1; }}", TypeError);
+  assertThrows("({valueOf: function() { return 1; }}) >>> one", TypeError);
+}
+
+// Unary ops.
+{
+  let One = {valueOf() { return one }};
+  assertTrue(~minus_one === zero);
+  assertTrue(-minus_one === one);
+  assertTrue(-One === minus_one);
+  assertTrue(~~two === two);
+  assertTrue(-(-two) === two);
+  assertTrue(~One === BigInt(-2));
+
+  let a = minus_one;
+  assertTrue(a++ === minus_one);
+  assertTrue(a === zero);
+  assertTrue(a++ === zero);
+  assertTrue(a === one);
+  assertTrue(++a === two);
+  assertTrue(a === two);
+  assertTrue(--a === one);
+  assertTrue(a === one);
+  assertTrue(a-- === one);
+  assertTrue(a === zero);
+  assertTrue(a-- === zero);
+  assertTrue(a === minus_one);
+
+  a = {valueOf() { return minus_one }};
+  assertTrue(a++ === minus_one);
+  assertTrue(a++ === zero);
+  assertTrue(a === one);
+
+  a = {valueOf() { return one }};
+  assertTrue(a-- === one);
+  assertTrue(a-- === zero);
+  assertTrue(a === minus_one);
+}
+
+// ToPropertyKey
+{
+  let obj = {};
+  assertEquals(obj[0n], undefined);
+  assertEquals(obj[0n] = 42, 42);
+  assertEquals(obj[0n], 42);
+  assertEquals(obj[0], 42);
+  obj[0]++;
+  assertEquals(obj[1n - 1n], 43);
+  assertEquals(Reflect.get(obj, -0n), 43);
+  assertEquals(obj[{toString() {return 0n}}], 43);
+  assertEquals(Reflect.ownKeys(obj), ["0"]);
+}{
+  let obj = {};
+  const unsafe = 9007199254740993n;
+  assertEquals(obj[unsafe] = 23, 23);
+  assertEquals(obj[unsafe], 23);
+  assertEquals(Reflect.ownKeys(obj), ["9007199254740993"]);
+  assertEquals(obj[9007199254740993], undefined);
+  delete obj[unsafe];
+  assertEquals(Reflect.ownKeys(obj), []);
+}{
+  let arr = [];
+  assertFalse(4n in arr);
+  arr[4n] = 42;
+  assertTrue(4n in arr);
+  let enumkeys = 0;
+  for (const key in arr) {
+    enumkeys++;
+    assertSame(key, "4");
+  }
+  assertEquals(enumkeys, 1);
+}{
+  let str = "blubb";
+  assertEquals(str[2n], "u");
+  assertThrows(() => str.slice(2n), TypeError);
+}{
+  let obj = {};
+  let key = 0;
+
+  function set_key(x) { obj[key] = x }
+  set_key("aaa");
+  set_key("bbb");
+  key = 0n;
+  set_key("ccc");
+  assertEquals(obj[key], "ccc");
+
+  function get_key() { return obj[key] }
+  assertEquals(get_key(), "ccc");
+  assertEquals(get_key(), "ccc");
+  key = 0;
+  assertEquals(get_key(), "ccc");
+}{
+  assertSame(%ToName(0n), "0");
+  assertSame(%ToName(-0n), "0");
+
+  const unsafe = 9007199254740993n;
+  assertSame(%ToName(unsafe), "9007199254740993");
+}
diff --git a/src/v8/test/mjsunit/harmony/bigint/comparisons.js b/src/v8/test/mjsunit/harmony/bigint/comparisons.js
new file mode 100644
index 0000000..513ff37
--- /dev/null
+++ b/src/v8/test/mjsunit/harmony/bigint/comparisons.js
@@ -0,0 +1,525 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax --harmony-bigint
+
+'use strict'
+
+const minus_one = BigInt(-1);
+const zero = BigInt(0);
+const another_zero = BigInt(0);
+const one = BigInt(1);
+const another_one = BigInt(1);
+const two = BigInt(2);
+const three = BigInt(3);
+const six = BigInt(6);
+
+
+// Strict equality
+{
+  assertTrue(zero === zero);
+  assertFalse(zero !== zero);
+
+  assertTrue(zero === another_zero);
+  assertFalse(zero !== another_zero);
+
+  assertFalse(zero === one);
+  assertTrue(zero !== one);
+  assertTrue(one !== zero);
+  assertFalse(one === zero);
+
+  assertFalse(zero === 0);
+  assertTrue(zero !== 0);
+  assertFalse(0 === zero);
+  assertTrue(0 !== zero);
+}{
+  assertTrue(%StrictEqual(zero, zero));
+  assertFalse(%StrictNotEqual(zero, zero));
+
+  assertTrue(%StrictEqual(zero, another_zero));
+  assertFalse(%StrictNotEqual(zero, another_zero));
+
+  assertFalse(%StrictEqual(zero, one));
+  assertTrue(%StrictNotEqual(zero, one));
+  assertTrue(%StrictNotEqual(one, zero));
+  assertFalse(%StrictEqual(one, zero));
+
+  assertFalse(%StrictEqual(zero, 0));
+  assertTrue(%StrictNotEqual(zero, 0));
+  assertFalse(%StrictEqual(0, zero));
+  assertTrue(%StrictNotEqual(0, zero));
+}
+
+// Abstract equality
+{
+  assertTrue(%Equal(zero, zero));
+  assertTrue(%Equal(zero, another_zero));
+  assertFalse(%Equal(zero, one));
+  assertFalse(%Equal(one, zero));
+
+  assertTrue(%Equal(zero, +0));
+  assertTrue(%Equal(zero, -0));
+  assertTrue(%Equal(+0, zero));
+  assertTrue(%Equal(-0, zero));
+
+  assertTrue(%Equal(zero, false));
+  assertTrue(%Equal(one, true));
+  assertFalse(%Equal(zero, true));
+  assertFalse(%Equal(one, false));
+  assertTrue(%Equal(false, zero));
+  assertTrue(%Equal(true, one));
+  assertFalse(%Equal(true, zero));
+  assertFalse(%Equal(false, one));
+
+  assertTrue(%Equal(one, 1));
+  assertTrue(%Equal(one, Number(1)));
+  assertTrue(%Equal(1, one));
+  assertTrue(%Equal(Number(1), one));
+
+  assertTrue(%Equal(minus_one, -1));
+  assertTrue(%Equal(minus_one, Number(-1)));
+  assertTrue(%Equal(-1, minus_one));
+  assertTrue(%Equal(Number(-1), minus_one));
+
+  assertFalse(%Equal(one, -1));
+  assertFalse(%Equal(one, Number(-1)));
+  assertFalse(%Equal(-1, one));
+  assertFalse(%Equal(Number(-1), one));
+
+  assertFalse(%Equal(one, 1.0000000000001));
+  assertFalse(%Equal(1.0000000000001, one));
+
+  assertTrue(%Equal(zero, ""));
+  assertTrue(%Equal("", zero));
+  assertTrue(%Equal(one, "1"));
+  assertTrue(%Equal("1", one));
+  assertFalse(%Equal(one, "a"));
+  assertFalse(%Equal("a", one));
+
+  assertTrue(%Equal(one, {valueOf() { return true }}));
+  assertTrue(%Equal({valueOf() { return true }}, one));
+  assertFalse(%Equal(two, {valueOf() { return true }}));
+  assertFalse(%Equal({valueOf() { return true }}, two));
+
+  assertFalse(%Equal(Symbol(), zero));
+  assertFalse(%Equal(zero, Symbol()));
+}{
+  assertTrue(zero == zero);
+  assertTrue(zero == another_zero);
+  assertFalse(zero == one);
+  assertFalse(one == zero);
+
+  assertTrue(zero == +0);
+  assertTrue(zero == -0);
+  assertTrue(+0 == zero);
+  assertTrue(-0 == zero);
+
+  assertTrue(zero == false);
+  assertTrue(one == true);
+  assertFalse(zero == true);
+  assertFalse(one == false);
+  assertTrue(false == zero);
+  assertTrue(true == one);
+  assertFalse(true == zero);
+  assertFalse(false == one);
+
+  assertTrue(one == 1);
+  assertTrue(one == Number(1));
+  assertTrue(1 == one);
+  assertTrue(Number(1) == one);
+
+  assertTrue(minus_one == -1);
+  assertTrue(minus_one == Number(-1));
+  assertTrue(-1 == minus_one);
+  assertTrue(Number(-1) == minus_one);
+
+  assertFalse(one == -1);
+  assertFalse(one == Number(-1));
+  assertFalse(-1 == one);
+  assertFalse(Number(-1) == one);
+
+  assertFalse(one == 1.0000000000001);
+  assertFalse(1.0000000000001 == one);
+
+  assertTrue(zero == "");
+  assertTrue("" == zero);
+  assertTrue(zero == " \t\r\n");
+  assertTrue(one == "1");
+  assertTrue("1" == one);
+  assertFalse(" \t\r\n" == one);
+  assertFalse(one == "a");
+  assertFalse("a" == one);
+
+  assertTrue(zero == "00000000000000" + "0");
+
+  assertTrue(one == {valueOf() { return true }});
+  assertTrue({valueOf() { return true }} == one);
+  assertFalse(two == {valueOf() { return true }});
+  assertFalse({valueOf() { return true }} == two);
+
+  assertFalse(Symbol() == zero);
+  assertFalse(zero == Symbol());
+
+  assertTrue(one == "0b1");
+  assertTrue(" 0b1" == one);
+  assertTrue(one == "0o1");
+  assertTrue("0o1 " == one);
+  assertTrue(one == "\n0x1");
+  assertTrue("0x1" == one);
+
+  assertFalse(one == "1j");
+  assertFalse(one == "0b1ju");
+  assertFalse(one == "0o1jun");
+  assertFalse(one == "0x1junk");
+}{
+  assertFalse(%NotEqual(zero, zero));
+  assertFalse(%NotEqual(zero, another_zero));
+  assertTrue(%NotEqual(zero, one));
+  assertTrue(%NotEqual(one, zero));
+
+  assertFalse(%NotEqual(zero, +0));
+  assertFalse(%NotEqual(zero, -0));
+  assertFalse(%NotEqual(+0, zero));
+  assertFalse(%NotEqual(-0, zero));
+
+  assertFalse(%NotEqual(zero, false));
+  assertFalse(%NotEqual(one, true));
+  assertTrue(%NotEqual(zero, true));
+  assertTrue(%NotEqual(one, false));
+  assertFalse(%NotEqual(false, zero));
+  assertFalse(%NotEqual(true, one));
+  assertTrue(%NotEqual(true, zero));
+  assertTrue(%NotEqual(false, one));
+
+  assertFalse(%NotEqual(one, 1));
+  assertFalse(%NotEqual(one, Number(1)));
+  assertFalse(%NotEqual(1, one));
+  assertFalse(%NotEqual(Number(1), one));
+
+  assertFalse(%NotEqual(minus_one, -1));
+  assertFalse(%NotEqual(minus_one, Number(-1)));
+  assertFalse(%NotEqual(-1, minus_one));
+  assertFalse(%NotEqual(Number(-1), minus_one));
+
+  assertTrue(%NotEqual(one, -1));
+  assertTrue(%NotEqual(one, Number(-1)));
+  assertTrue(%NotEqual(-1, one));
+  assertTrue(%NotEqual(Number(-1), one));
+
+  assertTrue(%NotEqual(one, 1.0000000000001));
+  assertTrue(%NotEqual(1.0000000000001, one));
+
+  assertFalse(%NotEqual(zero, ""));
+  assertFalse(%NotEqual("", zero));
+  assertFalse(%NotEqual(one, "1"));
+  assertFalse(%NotEqual("1", one));
+  assertTrue(%NotEqual(one, "a"));
+  assertTrue(%NotEqual("a", one));
+
+  assertFalse(%NotEqual(one, {valueOf() { return true }}));
+  assertFalse(%NotEqual({valueOf() { return true }}, one));
+  assertTrue(%NotEqual(two, {valueOf() { return true }}));
+  assertTrue(%NotEqual({valueOf() { return true }}, two));
+
+  assertTrue(%NotEqual(Symbol(), zero));
+  assertTrue(%NotEqual(zero, Symbol()));
+}{
+  assertFalse(zero != zero);
+  assertFalse(zero != another_zero);
+  assertTrue(zero != one);
+  assertTrue(one != zero);
+
+  assertFalse(zero != +0);
+  assertFalse(zero != -0);
+  assertFalse(+0 != zero);
+  assertFalse(-0 != zero);
+
+  assertFalse(zero != false);
+  assertFalse(one != true);
+  assertTrue(zero != true);
+  assertTrue(one != false);
+  assertFalse(false != zero);
+  assertFalse(true != one);
+  assertTrue(true != zero);
+  assertTrue(false != one);
+
+  assertFalse(one != 1);
+  assertFalse(one != Number(1));
+  assertFalse(1 != one);
+  assertFalse(Number(1) != one);
+
+  assertFalse(minus_one != -1);
+  assertFalse(minus_one != Number(-1));
+  assertFalse(-1 != minus_one);
+  assertFalse(Number(-1) != minus_one);
+
+  assertTrue(one != -1);
+  assertTrue(one != Number(-1));
+  assertTrue(-1 != one);
+  assertTrue(Number(-1) != one);
+
+  assertTrue(one != 1.0000000000001);
+  assertTrue(1.0000000000001 != one);
+
+  assertFalse(zero != "");
+  assertFalse("" != zero);
+  assertFalse(one != "1");
+  assertFalse("1" != one);
+  assertTrue(one != "a");
+  assertTrue("a" != one);
+
+  assertFalse(one != {valueOf() { return true }});
+  assertFalse({valueOf() { return true }} != one);
+  assertTrue(two != {valueOf() { return true }});
+  assertTrue({valueOf() { return true }} != two);
+
+  assertTrue(Symbol() != zero);
+  assertTrue(zero != Symbol());
+}
+
+// SameValue
+{
+  assertTrue(Object.is(zero, zero));
+  assertTrue(Object.is(zero, another_zero));
+  assertTrue(Object.is(one, one));
+  assertTrue(Object.is(one, another_one));
+  assertFalse(Object.is(zero, +0));
+  assertFalse(Object.is(zero, -0));
+  assertFalse(Object.is(+0, zero));
+  assertFalse(Object.is(-0, zero));
+  assertFalse(Object.is(zero, one));
+  assertFalse(Object.is(one, minus_one));
+}{
+  const obj = Object.defineProperty({}, 'foo',
+      {value: zero, writable: false, configurable: false});
+
+  assertTrue(Reflect.defineProperty(obj, 'foo', {value: zero}));
+  assertTrue(Reflect.defineProperty(obj, 'foo', {value: another_zero}));
+  assertFalse(Reflect.defineProperty(obj, 'foo', {value: one}));
+}{
+  assertTrue(%SameValue(zero, zero));
+  assertTrue(%SameValue(zero, another_zero));
+
+  assertFalse(%SameValue(zero, +0));
+  assertFalse(%SameValue(zero, -0));
+
+  assertFalse(%SameValue(+0, zero));
+  assertFalse(%SameValue(-0, zero));
+
+  assertTrue(%SameValue(one, one));
+  assertTrue(%SameValue(one, another_one));
+}
+
+// SameValueZero
+{
+  assertTrue([zero].includes(zero));
+  assertTrue([zero].includes(another_zero));
+
+  assertFalse([zero].includes(+0));
+  assertFalse([zero].includes(-0));
+
+  assertFalse([+0].includes(zero));
+  assertFalse([-0].includes(zero));
+
+  assertTrue([one].includes(one));
+  assertTrue([one].includes(another_one));
+
+  assertFalse([one].includes(1));
+  assertFalse([1].includes(one));
+}{
+  assertTrue(new Set([zero]).has(zero));
+  assertTrue(new Set([zero]).has(another_zero));
+
+  assertFalse(new Set([zero]).has(+0));
+  assertFalse(new Set([zero]).has(-0));
+
+  assertFalse(new Set([+0]).has(zero));
+  assertFalse(new Set([-0]).has(zero));
+
+  assertTrue(new Set([one]).has(one));
+  assertTrue(new Set([one]).has(another_one));
+}{
+  assertTrue(new Map([[zero, 42]]).has(zero));
+  assertTrue(new Map([[zero, 42]]).has(another_zero));
+
+  assertFalse(new Map([[zero, 42]]).has(+0));
+  assertFalse(new Map([[zero, 42]]).has(-0));
+
+  assertFalse(new Map([[+0, 42]]).has(zero));
+  assertFalse(new Map([[-0, 42]]).has(zero));
+
+  assertTrue(new Map([[one, 42]]).has(one));
+  assertTrue(new Map([[one, 42]]).has(another_one));
+}{
+  assertTrue(%SameValueZero(zero, zero));
+  assertTrue(%SameValueZero(zero, another_zero));
+
+  assertFalse(%SameValueZero(zero, +0));
+  assertFalse(%SameValueZero(zero, -0));
+
+  assertFalse(%SameValueZero(+0, zero));
+  assertFalse(%SameValueZero(-0, zero));
+
+  assertTrue(%SameValueZero(one, one));
+  assertTrue(%SameValueZero(one, another_one));
+}
+
+// Abstract comparison
+{
+  let undef = Symbol();
+
+  assertTrue(%Equal(zero, zero));
+  assertTrue(%GreaterThanOrEqual(zero, zero));
+
+  assertTrue(%LessThan(zero, one));
+  assertTrue(%GreaterThan(one, zero));
+
+  assertTrue(%LessThan(minus_one, one));
+  assertTrue(%GreaterThan(one, minus_one));
+
+  assertTrue(%Equal(zero, -0));
+  assertTrue(%LessThanOrEqual(zero, -0));
+  assertTrue(%GreaterThanOrEqual(zero, -0));
+  assertTrue(%Equal(-0, zero));
+  assertTrue(%LessThanOrEqual(-0, zero));
+  assertTrue(%GreaterThanOrEqual(-0, zero));
+
+  assertTrue(%Equal(zero, 0));
+  assertTrue(%Equal(0, zero));
+
+  assertTrue(%LessThan(minus_one, 1));
+  assertTrue(%GreaterThan(1, minus_one));
+
+  assertFalse(%LessThan(six, NaN));
+  assertFalse(%GreaterThan(six, NaN));
+  assertFalse(%Equal(six, NaN));
+  assertFalse(%LessThan(NaN, six));
+  assertFalse(%GreaterThan(NaN, six));
+  assertFalse(%Equal(NaN, six));
+
+  assertTrue(%LessThan(six, Infinity));
+  assertTrue(%GreaterThan(Infinity, six));
+
+  assertTrue(%GreaterThan(six, -Infinity));
+  assertTrue(%LessThan(-Infinity, six));
+
+  assertTrue(%GreaterThan(six, 5.99999999));
+  assertTrue(%LessThan(5.99999999, six));
+
+  assertTrue(%Equal(zero, ""));
+  assertTrue(%LessThanOrEqual(zero, ""));
+  assertTrue(%GreaterThanOrEqual(zero, ""));
+  assertTrue(%Equal("", zero));
+  assertTrue(%LessThanOrEqual("", zero));
+  assertTrue(%GreaterThanOrEqual("", zero));
+
+  assertTrue(%Equal(minus_one, "\t-1 "));
+  assertTrue(%LessThanOrEqual(minus_one, "\t-1 "));
+  assertTrue(%GreaterThanOrEqual(minus_one, "\t-1 "));
+  assertTrue(%Equal("\t-1 ", minus_one));
+  assertTrue(%LessThanOrEqual("\t-1 ", minus_one));
+  assertTrue(%GreaterThanOrEqual("\t-1 ", minus_one));
+
+  assertFalse(%LessThan(minus_one, "-0x1"));
+  assertFalse(%GreaterThan(minus_one, "-0x1"));
+  assertFalse(%Equal(minus_one, "-0x1"));
+  assertFalse(%LessThan("-0x1", minus_one));
+  assertFalse(%GreaterThan("-0x1", minus_one));
+  assertFalse(%Equal("-0x1", minus_one));
+
+  const unsafe = "9007199254740993";  // 2**53 + 1
+  assertTrue(%GreaterThan(BigInt.parseInt(unsafe), unsafe));
+  assertTrue(%LessThan(unsafe, BigInt.parseInt(unsafe)));
+
+  assertThrows(() => %LessThan(six, Symbol(6)), TypeError);
+  assertThrows(() => %LessThan(Symbol(6), six), TypeError);
+
+  var value_five_string_six = {
+      valueOf() { return Object(5); },
+      toString() { return 6; }
+  };
+  assertTrue(%LessThanOrEqual(six, value_five_string_six));
+  assertTrue(%GreaterThanOrEqual(six, value_five_string_six));
+  assertTrue(%LessThanOrEqual(value_five_string_six, six));
+  assertTrue(%GreaterThanOrEqual(value_five_string_six, six));
+}{
+  assertFalse(zero < zero);
+  assertTrue(zero <= zero);
+
+  assertTrue(zero < one);
+  assertTrue(zero <= one);
+  assertFalse(one < zero);
+  assertFalse(one <= zero);
+
+  assertTrue(minus_one < one);
+  assertTrue(minus_one <= one);
+  assertFalse(one < minus_one);
+  assertFalse(one <= minus_one);
+
+  assertFalse(zero < -0);
+  assertTrue(zero <= -0);
+  assertFalse(-0 < zero);
+  assertTrue(-0 <= zero);
+
+  assertFalse(zero < 0);
+  assertTrue(zero <= 0);
+  assertFalse(0 < zero);
+  assertTrue(0 <= zero);
+
+  assertTrue(minus_one < 1);
+  assertTrue(minus_one <= 1);
+  assertFalse(1 < minus_one);
+  assertFalse(1 <= minus_one);
+
+  assertFalse(six < NaN);
+  assertFalse(six <= NaN);
+  assertFalse(NaN < six);
+  assertFalse(NaN <= six);
+
+  assertTrue(six < Infinity);
+  assertTrue(six <= Infinity);
+  assertFalse(Infinity < six);
+  assertFalse(Infinity <= six);
+
+  assertFalse(six < -Infinity);
+  assertFalse(six <= -Infinity);
+  assertTrue(-Infinity < six);
+  assertTrue(-Infinity <= six);
+
+  assertFalse(six < 5.99999999);
+  assertFalse(six <= 5.99999999);
+  assertTrue(5.99999999 < six);
+  assertTrue(5.99999999 <= six);
+
+  assertFalse(zero < "");
+  assertTrue(zero <= "");
+  assertFalse("" < zero);
+  assertTrue("" <= zero);
+
+  assertFalse(minus_one < "\t-1 ");
+  assertTrue(minus_one <= "\t-1 ");
+  assertFalse("\t-1 " < minus_one);
+  assertTrue("\t-1 " <= minus_one);
+
+  assertFalse(minus_one < "-0x1");
+  assertFalse(minus_one <= "-0x1");
+  assertFalse("-0x1" < minus_one);
+  assertFalse("-0x1" <= minus_one);
+
+  const unsafe = "9007199254740993";  // 2**53 + 1
+  assertFalse(BigInt.parseInt(unsafe) < unsafe);
+  assertFalse(BigInt.parseInt(unsafe) <= unsafe);
+  assertTrue(unsafe < BigInt.parseInt(unsafe));
+  assertTrue(unsafe <= BigInt.parseInt(unsafe));
+
+  assertThrows(() => six < Symbol(6), TypeError);
+  assertThrows(() => six <= Symbol(6), TypeError);
+  assertThrows(() => Symbol(6) < six, TypeError);
+  assertThrows(() => Symbol(6) <= six, TypeError);
+
+  assertFalse(six < {valueOf() {return Object(5)}, toString() {return 6}});
+  assertTrue(six <= {valueOf() {return Object(5)}, toString() {return 6}});
+  assertFalse({valueOf() {return Object(5)}, toString() {return 6}} < six);
+  assertTrue({valueOf() {return Object(5)}, toString() {return 6}} <= six);
+}
diff --git a/src/v8/test/mjsunit/harmony/bigint/dec.js b/src/v8/test/mjsunit/harmony/bigint/dec.js
new file mode 100644
index 0000000..5e1f40b
--- /dev/null
+++ b/src/v8/test/mjsunit/harmony/bigint/dec.js
@@ -0,0 +1,86 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Generated by tools/bigint-tester.py.
+
+// Flags: --harmony-bigint
+
+var data = [{
+  a: "-609648ccf253976b12f6b6c8e20790c17ef6b89ea9f536267783607cf465b1ca",
+  r: "-609648ccf253976b12f6b6c8e20790c17ef6b89ea9f536267783607cf465b1cb"
+}, {
+  a: "-6e4c39cdd2c666e32cf2fd3c53a20eeb725e7578af97d42",
+  r: "-6e4c39cdd2c666e32cf2fd3c53a20eeb725e7578af97d43"
+}, {
+  a: "34c93e1c",
+  r: "34c93e1b"
+}, {
+  a: "-db3032",
+  r: "-db3033"
+}, {
+  a: "8e658ffacbefbdec5",
+  r: "8e658ffacbefbdec4"
+}, {
+  a: "-d321033ec94d6a75f",
+  r: "-d321033ec94d6a760"
+}, {
+  a: "-286017f718d6118b581ec4357e456ce6d12c01aed9a32ff0cc048d",
+  r: "-286017f718d6118b581ec4357e456ce6d12c01aed9a32ff0cc048e"
+}, {
+  a: "c0",
+  r: "bf"
+}, {
+  a: "9f9577e008a6f46f7709f71362176ebe23d19eb9e58a41de6f2631b18f2ca",
+  r: "9f9577e008a6f46f7709f71362176ebe23d19eb9e58a41de6f2631b18f2c9"
+}, {
+  a: "-9d4294590df0aa8ea46a5c2a3d186a6afcc00c6ebb072752",
+  r: "-9d4294590df0aa8ea46a5c2a3d186a6afcc00c6ebb072753"
+}, {
+  a: "-4bc2aed1641151db908c0eb21aa46d8b406803dc0f71d66671322d59babf10c2",
+  r: "-4bc2aed1641151db908c0eb21aa46d8b406803dc0f71d66671322d59babf10c3"
+}, {
+  a: "-1dfb3929632fbba39f60cabdc27",
+  r: "-1dfb3929632fbba39f60cabdc28"
+}, {
+  a: "c0d409943c093aec43ba99a33ef2bb54574ecdc7cccf6547ab44eafb27",
+  r: "c0d409943c093aec43ba99a33ef2bb54574ecdc7cccf6547ab44eafb26"
+}, {
+  a: "3d148dcffe94f859c80b38c4",
+  r: "3d148dcffe94f859c80b38c3"
+}, {
+  a: "0",
+  r: "-1"
+}, {
+  a: "d659f6507e0ac2e653bdb7c3fb38c1514dd33619a9a0c87fcb69b22",
+  r: "d659f6507e0ac2e653bdb7c3fb38c1514dd33619a9a0c87fcb69b21"
+}, {
+  a: "14efe",
+  r: "14efd"
+}, {
+  a: "-f2df301948cd17ff391a6589a67551c00679687ba5",
+  r: "-f2df301948cd17ff391a6589a67551c00679687ba6"
+}, {
+  a: "-e",
+  r: "-f"
+}, {
+  a: "-a09cf77fea7af1767695c978af13fdb62f4f040b6fb803625fb124cc99139cddadd",
+  r: "-a09cf77fea7af1767695c978af13fdb62f4f040b6fb803625fb124cc99139cddade"
+}];
+
+var error_count = 0;
+for (var i = 0; i < data.length; i++) {
+  var d = data[i];
+  var a = BigInt.parseInt(d.a, 16);
+  var r = --a;
+  if (d.r !== r.toString(16)) {
+    print("Input:    " + a.toString(16));
+    print("Result:   " + r.toString(16));
+    print("Expected: " + d.r);
+    error_count++;
+  }
+}
+if (error_count !== 0) {
+  print("Finished with " + error_count + " errors.")
+  quit(1);
+}
diff --git a/src/v8/test/mjsunit/harmony/bigint/div.js b/src/v8/test/mjsunit/harmony/bigint/div.js
new file mode 100644
index 0000000..771a0c7
--- /dev/null
+++ b/src/v8/test/mjsunit/harmony/bigint/div.js
@@ -0,0 +1,109 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Generated by tools/bigint-tester.py.
+
+// Flags: --harmony-bigint
+
+var data = [{
+  a: "c0bb18527ab19a800932cc14c553c69688372809dde38f095fdb99478a7eba",
+  b: "8137ebc482f361a3e43fb80fe2ba509caa3f0acc62be0d2",
+  r: "17dd3b8ecbdd71a4"
+}, {
+  a: "10c5163e874c786fcfcb48bbb0ccf8d6c66f480b76332194",
+  b: "4e462b2",
+  r: "36d8ca96869a7226d456bff9b5ed3effdcaaf6f83"
+}, {
+  a: "-677f8c8668fcc826129f2724a5b88a6225dd19959810b5254afbc0",
+  b: "-2bf8ff1c49636",
+  r: "25a8bd406d721554f45ad37cc691d58821ad163f3a"
+}, {
+  a: "e80276ba7d416f4f7e5f8917529eb204cc7ed08413261e73aa23f169eb46e7162",
+  b: "-c884f07a",
+  r: "-12834073e7cbc44804a99cb2778fb82b098645946d5e4f5e6c47c49267"
+}, {
+  a: "-f9a51f64ce995e0a1c7f8369a573dae2533bc3df801edbb79235d41502e1ce",
+  b: "-f33bf",
+  r: "106bf522569501704f9700d6bfcd203a606e63725e339e92ff931f568f"
+}, {
+  a: "-6c9ae08dfa5b11c29ae30e53c108d915e0e87f1a8ca82f42d23a53b08895",
+  b: "-43fd79afe1ae6a4994ee7dfc2c89453d6b6",
+  r: "198ecd667e8cca17c2839b38fe"
+}, {
+  a: "-d20a2f7074ecbc776b64c2e04ff007e194b8cdd106b2be2e78d752f2d16e9",
+  b: "43eb8ae7d7f9be6d77e3be696ffef",
+  r: "-317ab1a09014950e1c53b9e3e8f44873c"
+}, {
+  a: "-999e0f75f2f652d403840cea3536b1a522433a331dace7c39d7990b993908fdd6",
+  b: "cea1de74020232c6c4bedca49d63f140c",
+  r: "-be51ac62c073e7d7cb9e43fc12436bfe"
+}, {
+  a: "1b49ac0c323436294f1471a3f00feb197b9b42549c3",
+  b: "5a7e30888a22fbbcecfe2a0b2e5eca30",
+  r: "4d321e8fe1c"
+}, {
+  a: "-689adf0d332ed26c63f8f361d5cb66056321b683ce87c60567df7305396f20d6ab8",
+  b: "82f3b92f5bb57811fdb66f519",
+  r: "-cc7e64b9ef239ac4c31b6ae3687aa181bda7657222"
+}, {
+  a: "-6fecb457f9e05c15b7fe038494c25053938d4747a01577cf2dc939a21e",
+  b: "b7cb6ce62c1d7483d0b675109f5782a1ad19",
+  r: "-9be52d2e94716bb441dbcd"
+}, {
+  a: "f96f8276f314d37657ce7774bc539198ee84fcec8a53cbb3d36ad81040b715",
+  b: "-891c9a0dd99b02",
+  r: "-1d1b803e3484173c0d2e8add5042117eaa27c853c222f5fdd"
+}, {
+  a: "-d2c9a9068d57f2ebc9ad432b48b4135f2a911519d4b791",
+  b: "-a34d124b5b4825d314683098d0",
+  r: "14a715b96671307438926"
+}, {
+  a: "-59593d55f61c1c739601e15624fe2e61592fe6abf1ecb238c9f8e1a7bded9c1bd1c",
+  b: "f067a5a155fc894b0f7f0a939f1772c4d135a",
+  r: "-5f250867331e7eff64dafcd58e9922"
+}, {
+  a: "2c0a3172494623013ba14d01433ad38167f365765b1c0ca610",
+  b: "ffe8",
+  r: "2c0e52ca0c37483000215020c64d6ac36a455bf6fa4382"
+}, {
+  a: "-a9cde7cdfe56eb8bd6777543ae714fadac2d97a394d8e9e8",
+  b: "104b0d7135d3d2",
+  r: "-a6bfb9031e60b5bc4b20e814cabfd80bd27"
+}, {
+  a: "6216ceed0d221476bfba7701f8297af56a4e66d003f8165b",
+  b: "bfcaaf8676ad6a",
+  r: "82ed6efc83669b0bc476bdd717dcfb6f10"
+}, {
+  a: "-707752a899efbe8989d205293535a404a6afb39cf21ce1274",
+  b: "-3a24848be1024a6ea901f",
+  r: "1ef2f2a8c0ad85ff4e6e6afdd3966"
+}, {
+  a: "-e662fb8c46f979ff3b3f576fffd5c51cf70071ab61168b2eafee4708af",
+  b: "964c4dd019b9a543df0cd1830a90428ec84ec04f8165283",
+  r: "-18869d87ce54"
+}, {
+  a: "b4403dee3a192009a5aae85c74efdb52b66dee1be6befa66f708ca9bf6b7",
+  b: "-36db9f9f6e",
+  r: "-34928ce65c2b71a6b6ce351838d4263d91ff2bceecec7a91441"
+}];
+
+var error_count = 0;
+for (var i = 0; i < data.length; i++) {
+  var d = data[i];
+  var a = BigInt.parseInt(d.a, 16);
+  var b = BigInt.parseInt(d.b, 16);
+  var r = a / b;
+  if (d.r !== r.toString(16)) {
+    print("Input A:  " + a.toString(16));
+    print("Input B:  " + b.toString(16));
+    print("Result:   " + r.toString(16));
+    print("Expected: " + d.r);
+    print("Op: /");
+    error_count++;
+  }
+}
+if (error_count !== 0) {
+  print("Finished with " + error_count + " errors.")
+  quit(1);
+}
diff --git a/src/v8/test/mjsunit/harmony/bigint/exp.js b/src/v8/test/mjsunit/harmony/bigint/exp.js
new file mode 100644
index 0000000..5a46011
--- /dev/null
+++ b/src/v8/test/mjsunit/harmony/bigint/exp.js
@@ -0,0 +1,43 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax --harmony-bigint
+
+assertEquals(1n, 0n ** 0n);
+assertEquals(0n, 0n ** 1n);
+assertEquals(0n, 0n ** 23n);
+
+assertEquals(1n, 1n ** 0n);
+assertEquals(1n, 1n ** 1n);
+assertEquals(1n, 99n ** 0n);
+
+assertEquals(2n, 2n ** 1n);
+assertEquals(4n, 2n ** 2n);
+assertEquals(8n, 2n ** 3n);
+assertEquals(16n, 2n ** 4n);
+assertEquals(151115727451828646838272n, 2n ** 77n);
+
+assertEquals(3n, 3n ** 1n);
+assertEquals(9n, 3n ** 2n);
+assertEquals(27n, 3n ** 3n);
+assertEquals(81n, 3n ** 4n);
+assertEquals(243n, 3n ** 5n);
+assertEquals(30903154382632612361920641803529n, 3n ** 66n);
+
+assertEquals(1n, (-2n) ** 0n);
+assertEquals(-2n, (-2n) ** 1n);
+assertEquals(4n, (-2n) ** 2n);
+assertEquals(-8n, (-2n) ** 3n);
+assertEquals(16n, (-2n) ** 4n);
+assertEquals(-32n, (-2n) ** 5n);
+
+assertEquals(1n, (-3n) ** 0n);
+assertEquals(-3n, (-3n) ** 1n);
+assertEquals(9n, (-3n) ** 2n);
+assertEquals(-27n, (-3n) ** 3n);
+assertEquals(81n, (-3n) ** 4n);
+assertEquals(-243n, (-3n) ** 5n);
+
+assertThrows(() => 3n ** -2n, RangeError);  // Negative exponent.
+assertThrows(() => 2n ** (1024n ** 4n), RangeError);  // Too big.
diff --git a/src/v8/test/mjsunit/harmony/bigint/inc.js b/src/v8/test/mjsunit/harmony/bigint/inc.js
new file mode 100644
index 0000000..64865a2
--- /dev/null
+++ b/src/v8/test/mjsunit/harmony/bigint/inc.js
@@ -0,0 +1,86 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Generated by tools/bigint-tester.py.
+
+// Flags: --harmony-bigint
+
+var data = [{
+  a: "-989c298c6fc3",
+  r: "-989c298c6fc2"
+}, {
+  a: "bff2c86c449a56",
+  r: "bff2c86c449a57"
+}, {
+  a: "-6fb15264369b63e3b92d6f74458140d4b62a56ecbfca000492b6b8a0c56c651ebaecdd1",
+  r: "-6fb15264369b63e3b92d6f74458140d4b62a56ecbfca000492b6b8a0c56c651ebaecdd0"
+}, {
+  a: "e161f6284b91fa2646dc0f162c575bb8a0d0f5bfee26748b7181413567",
+  r: "e161f6284b91fa2646dc0f162c575bb8a0d0f5bfee26748b7181413568"
+}, {
+  a: "-4d073653cc812",
+  r: "-4d073653cc811"
+}, {
+  a: "-ce31549364717dea9d1bf30baed642f",
+  r: "-ce31549364717dea9d1bf30baed642e"
+}, {
+  a: "2ae123a62361f1de2cc5ca9cfd9658f47d",
+  r: "2ae123a62361f1de2cc5ca9cfd9658f47e"
+}, {
+  a: "-4820298153b7bbd86337ad72e0d1ac7448de99bc6ce4c43c2",
+  r: "-4820298153b7bbd86337ad72e0d1ac7448de99bc6ce4c43c1"
+}, {
+  a: "2e",
+  r: "2f"
+}, {
+  a: "-8f3b598ac2ab8a78a2d3e1f7ab1124b05a830aa1261bf57d8de2a",
+  r: "-8f3b598ac2ab8a78a2d3e1f7ab1124b05a830aa1261bf57d8de29"
+}, {
+  a: "-5c070fdee0d3f4a9adc63",
+  r: "-5c070fdee0d3f4a9adc62"
+}, {
+  a: "-3700cd6a6d1e68de1",
+  r: "-3700cd6a6d1e68de0"
+}, {
+  a: "56c68c",
+  r: "56c68d"
+}, {
+  a: "-1ab894376fcf0dab9c",
+  r: "-1ab894376fcf0dab9b"
+}, {
+  a: "-937dcf37c57588e55260c3eea20318",
+  r: "-937dcf37c57588e55260c3eea20317"
+}, {
+  a: "-f8ee63b438580a8915baf84edcfd0688247905e593e153644a88761bab0",
+  r: "-f8ee63b438580a8915baf84edcfd0688247905e593e153644a88761baaf"
+}, {
+  a: "-c63d4353ddf575bf02",
+  r: "-c63d4353ddf575bf01"
+}, {
+  a: "-bef439cc990a8b1d69b80fa7b3c703ba2",
+  r: "-bef439cc990a8b1d69b80fa7b3c703ba1"
+}, {
+  a: "6007edbd20b0ba90d86cf80e871e898c8907bb37",
+  r: "6007edbd20b0ba90d86cf80e871e898c8907bb38"
+}, {
+  a: "-692b36b5e874a448415678ac2b4d0a61c75bdc1674ae14d753cad7d46846",
+  r: "-692b36b5e874a448415678ac2b4d0a61c75bdc1674ae14d753cad7d46845"
+}];
+
+var error_count = 0;
+for (var i = 0; i < data.length; i++) {
+  var d = data[i];
+  var a = BigInt.parseInt(d.a, 16);
+  var r = ++a;
+  if (d.r !== r.toString(16)) {
+    print("Input:    " + a.toString(16));
+    print("Result:   " + r.toString(16));
+    print("Expected: " + d.r);
+    error_count++;
+  }
+}
+if (error_count !== 0) {
+  print("Finished with " + error_count + " errors.")
+  quit(1);
+}
diff --git a/src/v8/test/mjsunit/harmony/bigint/json.js b/src/v8/test/mjsunit/harmony/bigint/json.js
new file mode 100644
index 0000000..eb0eefc
--- /dev/null
+++ b/src/v8/test/mjsunit/harmony/bigint/json.js
@@ -0,0 +1,81 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax --harmony-bigint
+
+'use strict'
+
+
+// Without .toJSON method.
+
+assertEquals(undefined, BigInt.prototype.toJSON);
+assertThrows(() => JSON.stringify(42n), TypeError);
+assertThrows(() => JSON.stringify(Object(42n)), TypeError);
+
+
+// With .toJSON method that returns a string.
+
+BigInt.prototype.toJSON = function() {
+  assertEquals("bigint", typeof this);
+  return String(this);
+}
+assertEquals("\"42\"", JSON.stringify(42n));
+
+BigInt.prototype.toJSON = function() {
+  assertEquals("object", typeof this);
+  return String(this);
+}
+assertEquals("\"42\"", JSON.stringify(Object(42n)));
+
+
+// With .toJSON method that returns a BigInt primitive.
+
+BigInt.prototype.toJSON = function() {return this};
+assertThrows(() => JSON.stringify(42n), TypeError);
+assertThrows(() => JSON.stringify(Object(42n)), TypeError);
+
+
+// With .toJSON method that returns a BigInt object.
+
+BigInt.prototype.toJSON = function() {return Object(this)};
+assertThrows(() => JSON.stringify(42n), TypeError);
+assertThrows(() => JSON.stringify(Object(42n)), TypeError);
+
+
+// Without .toJSON method but with a replacer returning a string.
+
+delete BigInt.prototype.toJSON;
+let replacer;
+
+replacer = function(k, v) {
+  assertEquals("bigint", typeof v);
+  assertTrue(42n == v);
+  return "43";
+}
+assertEquals("\"43\"", JSON.stringify(42n, replacer));
+
+replacer = function(k, v) {
+  assertEquals("object", typeof v);
+  assertTrue(42n == v);
+  return "43";
+}
+assertEquals("\"43\"", JSON.stringify(Object(42n), replacer));
+
+
+// Without .toJSON method but with a replacer returning a BigInt primitive.
+
+assertEquals(undefined, BigInt.prototype.toJSON);
+
+replacer = () => 43n;
+assertThrows(() => JSON.stringify(42n, replacer), TypeError);
+assertThrows(() => JSON.stringify(Object(42n), replacer), TypeError);
+
+
+// Without .toJSON method but with a replacer returning a BigInt object.
+
+assertEquals(undefined, BigInt.prototype.toJSON);
+
+replacer = () => Object(43n);
+assertThrows(() => JSON.stringify(42n, replacer), TypeError);
+assertThrows(() => JSON.stringify(Object(42n), replacer), TypeError);
diff --git a/src/v8/test/mjsunit/harmony/bigint/mod.js b/src/v8/test/mjsunit/harmony/bigint/mod.js
new file mode 100644
index 0000000..c310e2d
--- /dev/null
+++ b/src/v8/test/mjsunit/harmony/bigint/mod.js
@@ -0,0 +1,109 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Generated by tools/bigint-tester.py.
+
+// Flags: --harmony-bigint
+
+var data = [{
+  a: "-67c2a5ba4221c048b64ecca6dd979391c44296b8b87ce97584ebab03be18",
+  b: "-bebdbd9b278d05704416fd87d09aece9b69f98843",
+  r: "-8794ba5d9204eb8adfb5e44c11a65fe5af057e6a4"
+}, {
+  a: "-843cfbe576106b8e7c0aabec2cde402e7f76a711dbbf6ae79d6d932e22cf",
+  b: "553d800ffcf69f80026",
+  r: "-272250d344908c21525"
+}, {
+  a: "-b5fc9e8e21fbad798bcd3571ab169dd5e2059d1a9aa4d1bf44fe18da725b",
+  b: "-da5d287414fbb2b4b",
+  r: "-2610eb2277e01a758"
+}, {
+  a: "a9c92d42b53a6fbf0824f5b7bd9ed1cab1f9419d7ec2b50f192abfa6d620d53",
+  b: "9de30592e1fe27d26afe06bbb4781c77ef58418",
+  r: "9a67af5868a619a48883aed4c0d0a876e2ce143"
+}, {
+  a: "ffa271b138163a779c89f17aa720490854520120b1307ef",
+  b: "ab27ef49f3a00085981a5bc1c13530aec35e29c",
+  r: "4c49a63b98d2dd7a33a843f98ba82b54909e337"
+}, {
+  a: "d43f739464bcc8643dfaa807cbbe1157189e33368dd19b800db3682bb0dcb73",
+  b: "bf66b1dc93054920039f9b3eba688d9",
+  r: "bb2f3000959d66b3962d755d141c3ac"
+}, {
+  a: "111ae5ba62ec37fd157ef531195363c5c8ace4427ff58811746af94ab8",
+  b: "58112d0d88f3c8722d1e28942e8949c433c4619b451",
+  r: "283276aa2b6316ca2146b1e6bcc8aa8de4b5446847a"
+}, {
+  a: "-4609a1c7d563bbdb49fd01e05031395e6e06b78407e440",
+  b: "-75ee71f85344163bae2ba0e438",
+  r: "-68b517938971cb261babea1cf8"
+}, {
+  a: "292cd2c5eb3e80942066c5af8bfdaf8d1d091f61f3005d226318",
+  b: "5",
+  r: "3"
+}, {
+  a: "-a9f8c03f06200b54959a2ced325090be25417f0bf1274d",
+  b: "13eb3a0c772fc98e537883a3ef72e1ee37b249ee17c0510",
+  r: "-a9f8c03f06200b54959a2ced325090be25417f0bf1274d"
+}, {
+  a: "c4ddadae9abee150068fe6536c6b2fe229070410da61a09abe1a7270b",
+  b: "5f4d55e3345e37fe8887f3ca5e",
+  r: "42eea65dd545aacdcd250b505b"
+}, {
+  a: "-7a73d61e639dacedd207dfe1edc630b1dfda9078489a7f0cf79dcdfcbf3992efc13861f",
+  b: "-c0f2b9045bb3865d89cc0c9920c3ccfae382c250",
+  r: "-6bdc3d5943d7a35e4ecbc5c8deb335ca2c3bbc0f"
+}, {
+  a: "-a9ac4a2e055f22c8ba7956ffca5457a71412eb74d3a180555bb25ce5096e23d6c619",
+  b: "-f3c",
+  r: "-a5d"
+}, {
+  a: "-b16cfd7fbbf820afc77be1590fd9802ecd12059238b98bb96d9d215af4808",
+  b: "2c288a9de167",
+  r: "-2b3901c1b8d1"
+}, {
+  a: "-df12dd3e56dc3c3dd769ad964f8356a5860177f1b4a3b95acc75",
+  b: "4ec6f5474b18",
+  r: "-17bf0980582d"
+}, {
+  a: "1d197bf4aa09a02760cb004e9edf25e6591ae14d92b6cbf1349ea1c040d66",
+  b: "-23ebacc5f380e5649a1234c3ed050472569cbcd056",
+  r: "20e5e588b4861be3ec7b4005a6a50566e60a3a4364"
+}, {
+  a: "fab19b7e774bf33bb42a7af90d8dc75cbc927e3225003610c05b117c25c90944d",
+  b: "-3b433469282a54d46cac",
+  r: "10eda9e98b721b4a2505"
+}, {
+  a: "5b19514660782d3a2429d7791659868abb9d8fc96077247",
+  b: "-59188be60",
+  r: "2340c3607"
+}, {
+  a: "-2884ed1401b5e976be7dc1faf7bffb632c808649fa75ab458cc66ef4e75",
+  b: "bf",
+  r: "-40"
+}, {
+  a: "-4c9cdf26be1797e54480ab20797e35d04941c11ff78b040c00099422cec",
+  b: "ee20f34835529f4a73",
+  r: "-e24db40426d47f968b"
+}];
+
+var error_count = 0;
+for (var i = 0; i < data.length; i++) {
+  var d = data[i];
+  var a = BigInt.parseInt(d.a, 16);
+  var b = BigInt.parseInt(d.b, 16);
+  var r = a % b;
+  if (d.r !== r.toString(16)) {
+    print("Input A:  " + a.toString(16));
+    print("Input B:  " + b.toString(16));
+    print("Result:   " + r.toString(16));
+    print("Expected: " + d.r);
+    print("Op: %");
+    error_count++;
+  }
+}
+if (error_count !== 0) {
+  print("Finished with " + error_count + " errors.")
+  quit(1);
+}
diff --git a/src/v8/test/mjsunit/harmony/bigint/mul.js b/src/v8/test/mjsunit/harmony/bigint/mul.js
new file mode 100644
index 0000000..83a6700
--- /dev/null
+++ b/src/v8/test/mjsunit/harmony/bigint/mul.js
@@ -0,0 +1,109 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Generated by tools/bigint-tester.py.
+
+// Flags: --harmony-bigint
+
+var data = [{
+  a: "-be5e349bf5ad48e7a5d",
+  b: "a47a19a48667620a82973579739e08c64651b3ede2c578ff975e",
+  r: "-7a4f25aa8725368922062fc91a110352a660657ffb3a489126ded10ccd29d929120c926"
+}, {
+  a: "912d5d85aec5ec6caf90514f0ec005f711caac82960c0ee911ef30f145107ae236783e6",
+  b: "0",
+  r: "0"
+}, {
+  a: "-87c17f6930bdef7e7c7ae7dab8be3baa2e7d67",
+  b: "285af6503c42d077a0d59558deb170bad",
+  r: "-1566788db7747e33ddb6540190617b57856e5f3924447f9f400f34a9aa75aa7d20f2b9b"
+}, {
+  a: "-3d0fd72abc5fb82d5cf45679812b71",
+  b: "-3c537c742e17c5fac136e33f5e7edf256ef52b6df",
+  r: "e63a0402966391e13e600371183f223379b66912ee706a2b369668b3e33e9a15992d6f"
+}, {
+  a: "dfd77cf4b0d071df2487c9b77959ee027380a159b0",
+  b: "-56300fb05cba28d5150892ff66e77",
+  r: "-4b5c6a1976d3a318cb9f93e154dc362da4e740fa31d82baefead60c355bfea99eaa50d0"
+}, {
+  a: "-bea52261387bb2aaf8c61b5ee7bbf85b3bbbedfe60773ed9873cbceba078d3fecbb",
+  b: "-2ad7",
+  r: "1fe73453d2eabb331a676ede8eb9759c8c6bffe09c76947578e08b0152379841d867f0d"
+}, {
+  a: "5b5a3a047d8f7e1519d6d92d3241c0f32c4d789",
+  b: "-4bd3e8c09b0ba71bc25416877a4c7135",
+  r: "-1b0f0d6ba20fe60049c4a172e8b1fb9824c1e85e21f1ebe08556b7074d8d4f4ac90185d"
+}, {
+  a: "1b2c8263d4bac8cc825657f81fca6196799aff00fa960d5c04",
+  b: "-6b140fca30c8037b18d88",
+  r: "-b5dbba6fba700592408e2ebbba2d4c6557d61d1201e24314f690e77c0b59c68d8b1620"
+}, {
+  a: "dd74f1f92ab5b9e0b447b7fe9076f7",
+  b: "-9dbb0acb24e6336fe4f37f8e942d1d5c22dfe4f34",
+  r: "-88728628dd4ed79514e720448e4f9ad422ba6ca62cd61bf779cfb3cb12afb5bbe20632c"
+}, {
+  a: "-e97d2712832aa20a",
+  b: "-cb98c0fa9b4b35fc7a4ebed6d3d106bb758c244eb756c75587300ad",
+  r: "b9b1904d502a19d20cc7bd8e05670f667db817bb9104ef8acc747f3df6541eede4d80c2"
+}, {
+  a: "828ca2d8981f347f4bec14ba",
+  b: "-8ce5b6b1c329477a0a728ed81331af1f03e3eaa1ccb2cb3",
+  r: "-47da0e06c179e58b3e5d8abc4a2b274ede3a7d73c0b5fcb3690f0b544ed6c0b7120760e"
+}, {
+  a: "aade382f2483a571e12cb1796bd124e21c6014261cef5d733a1b35fb01db7232c5b",
+  b: "-d34a",
+  r: "-8d068c8b18b90f6aaf82ed3260f68bdb06bf64613cdda736fc33395b7d16688edb9d34e"
+}, {
+  a: "34188043594e64ac10b37923ad29b4b536a4098ce76c9133155820b7843de95af",
+  b: "106952",
+  r: "356f6c0aa4a1a0d27dd2e8867420eddcd9fb5614450d6bb85cba0071e03e4563a0b90e"
+}, {
+  a: "96b2a125fc041fe36aebe7dfd02a4f56b90",
+  b: "-a9f9c57a732002abf0764868f297442f61d1",
+  r: "-640ef4605c38f6643d60526833e7a3b7b71a72b7042434abc0ca600e7f79b3aa98e6090"
+}, {
+  a: "-ae8327a77a340d2c90c93bb0ebe02d7a77d7c2a4e8d21a21d0",
+  b: "268a49068f2769f949d95",
+  r: "-1a45bc5e1b636b28bf716dfeaf0599cd932270796233adf7d58b8d72d06ac580c323e10"
+}, {
+  a: "-a0adcb953540a4f25fc97a40a2c9285bfba7e70e4ffc",
+  b: "fff2302a069e8f69d00e529a81b",
+  r: "-a0a5204f09eeb3ecd9fe2c6de34d0e0ed70c6d1589d95fd83de33d921a3152dfe5bcf94"
+}, {
+  a: "-83771467194c5b612539be7228f366a8",
+  b: "9412ce8f98510486287bc15c35883fff04d126e",
+  r: "-4c0a803e9a079742969e01dbb7990566b2f5ac9658653c967b5d295f6a996ba1655ec30"
+}, {
+  a: "12c3327d3d7ed4b3180cc301f98d351804451be431137fa48aa67627db867a2cd",
+  b: "-ee0af6",
+  r: "-11724697fa94a9caafbee6e7b778ecae17ed7ebba5575296b1fc4995a12fe5c9a8872fe"
+}, {
+  a: "-5",
+  b: "-a00c8e774e3d4a6fc2fa384382720700e49e3e4b882bb5c4c0dbe4cdcd92126731128b",
+  r: "3203ec8548732742ecee319518c3a230477173779a8da8cd7c44b780503da5c03f55cb7"
+}, {
+  a: "a0a4dc9610ada50dfa633ad910a02aa20c85",
+  b: "-4d7aa1dc1cc1d1767b4e25a839e7c177652",
+  r: "-309e8a7c10fbc6b50f6ad012099765a35395b9d51112d50e0a8f3ac076942a9e5a0509a"
+}];
+
+var error_count = 0;
+for (var i = 0; i < data.length; i++) {
+  var d = data[i];
+  var a = BigInt.parseInt(d.a, 16);
+  var b = BigInt.parseInt(d.b, 16);
+  var r = a * b;
+  if (d.r !== r.toString(16)) {
+    print("Input A:  " + a.toString(16));
+    print("Input B:  " + b.toString(16));
+    print("Result:   " + r.toString(16));
+    print("Expected: " + d.r);
+    print("Op: *");
+    error_count++;
+  }
+}
+if (error_count !== 0) {
+  print("Finished with " + error_count + " errors.")
+  quit(1);
+}
diff --git a/src/v8/test/mjsunit/harmony/bigint/neg.js b/src/v8/test/mjsunit/harmony/bigint/neg.js
new file mode 100644
index 0000000..8cec9cc
--- /dev/null
+++ b/src/v8/test/mjsunit/harmony/bigint/neg.js
@@ -0,0 +1,86 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Generated by tools/bigint-tester.py.
+
+// Flags: --harmony-bigint
+
+var data = [{
+  a: "58ad59aa3aa9d04d4c12493966e204ef0500d5f92ecb31",
+  r: "-58ad59aa3aa9d04d4c12493966e204ef0500d5f92ecb31"
+}, {
+  a: "6dbd19e4b781a8f113ae95738dda4b70ba027755052126c198d20ade97869ff",
+  r: "-6dbd19e4b781a8f113ae95738dda4b70ba027755052126c198d20ade97869ff"
+}, {
+  a: "d02befb1c96364a984664f85",
+  r: "-d02befb1c96364a984664f85"
+}, {
+  a: "86",
+  r: "-86"
+}, {
+  a: "0",
+  r: "0"
+}, {
+  a: "-f8da",
+  r: "f8da"
+}, {
+  a: "2b0f358b54a82fbaddc5a6e61a5d",
+  r: "-2b0f358b54a82fbaddc5a6e61a5d"
+}, {
+  a: "-3d32065b9bbb36ee521ff82da",
+  r: "3d32065b9bbb36ee521ff82da"
+}, {
+  a: "ca3da934e8081c457933c90",
+  r: "-ca3da934e8081c457933c90"
+}, {
+  a: "-e4d2bbdf90affad1d2a",
+  r: "e4d2bbdf90affad1d2a"
+}, {
+  a: "-290845e8f55d467e3",
+  r: "290845e8f55d467e3"
+}, {
+  a: "-771c77d2dd2227c30cf44f1bf3230",
+  r: "771c77d2dd2227c30cf44f1bf3230"
+}, {
+  a: "-77aa11",
+  r: "77aa11"
+}, {
+  a: "d220c8af9c97516bf5ec295585f711e020480d08ac11689726a285930",
+  r: "-d220c8af9c97516bf5ec295585f711e020480d08ac11689726a285930"
+}, {
+  a: "53841e699f994e1a43f7f848f34d418792191de15b78e1a852c430b2f8af6e7",
+  r: "-53841e699f994e1a43f7f848f34d418792191de15b78e1a852c430b2f8af6e7"
+}, {
+  a: "7c30187b8901bd748adc4bc243",
+  r: "-7c30187b8901bd748adc4bc243"
+}, {
+  a: "-e07ac5649eb741a023b0f9928d5982032f6766a479c7fbf26",
+  r: "e07ac5649eb741a023b0f9928d5982032f6766a479c7fbf26"
+}, {
+  a: "5ab3237bb32234bcaf8",
+  r: "-5ab3237bb32234bcaf8"
+}, {
+  a: "7df7",
+  r: "-7df7"
+}, {
+  a: "-518b7b",
+  r: "518b7b"
+}];
+
+var error_count = 0;
+for (var i = 0; i < data.length; i++) {
+  var d = data[i];
+  var a = BigInt.parseInt(d.a, 16);
+  var r = -a;
+  if (d.r !== r.toString(16)) {
+    print("Input:    " + a.toString(16));
+    print("Result:   " + r.toString(16));
+    print("Expected: " + d.r);
+    error_count++;
+  }
+}
+if (error_count !== 0) {
+  print("Finished with " + error_count + " errors.")
+  quit(1);
+}
diff --git a/src/v8/test/mjsunit/harmony/bigint/not.js b/src/v8/test/mjsunit/harmony/bigint/not.js
new file mode 100644
index 0000000..7ceaa01
--- /dev/null
+++ b/src/v8/test/mjsunit/harmony/bigint/not.js
@@ -0,0 +1,86 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Generated by tools/bigint-tester.py.
+
+// Flags: --harmony-bigint
+
+var data = [{
+  a: "3d02c87edc77722299f6559ecca038911f864a4e78c20af80f4a6d9",
+  r: "-3d02c87edc77722299f6559ecca038911f864a4e78c20af80f4a6da"
+}, {
+  a: "ac01894aeaf77255ede209897561ec1e3c7e916b9",
+  r: "-ac01894aeaf77255ede209897561ec1e3c7e916ba"
+}, {
+  a: "-7aaab657ab197f26eb6b98fe4c2c79b199a8156129ca04",
+  r: "7aaab657ab197f26eb6b98fe4c2c79b199a8156129ca03"
+}, {
+  a: "9718579cc52befdaff1ec035b5ed03cec5c1d1678c28712cf0c9bec2c807897b74f0",
+  r: "-9718579cc52befdaff1ec035b5ed03cec5c1d1678c28712cf0c9bec2c807897b74f1"
+}, {
+  a: "e614366bc4e67509843254c52e13da5380b00a35aa1d233e70821f7d649ad1957db",
+  r: "-e614366bc4e67509843254c52e13da5380b00a35aa1d233e70821f7d649ad1957dc"
+}, {
+  a: "fb815f78e6952b500226c",
+  r: "-fb815f78e6952b500226d"
+}, {
+  a: "94404df802649cff2ea6c0996f55ec60c14f00ab29b287092389951f6227c4ec7",
+  r: "-94404df802649cff2ea6c0996f55ec60c14f00ab29b287092389951f6227c4ec8"
+}, {
+  a: "-74b42cd7bccd",
+  r: "74b42cd7bccc"
+}, {
+  a: "da",
+  r: "-db"
+}, {
+  a: "3a9ade198",
+  r: "-3a9ade199"
+}, {
+  a: "56e766d24fd18c2241f244dedc426c0b1ae59e7ed4f06def0a75e0a5c8651e2ce87928",
+  r: "-56e766d24fd18c2241f244dedc426c0b1ae59e7ed4f06def0a75e0a5c8651e2ce87929"
+}, {
+  a: "cc430c91347b22ecb1a6f1a2ceea168ffa4a9b80065bd1ec5d",
+  r: "-cc430c91347b22ecb1a6f1a2ceea168ffa4a9b80065bd1ec5e"
+}, {
+  a: "32e4b7f82d8c037d0f562296e21b1e58a",
+  r: "-32e4b7f82d8c037d0f562296e21b1e58b"
+}, {
+  a: "-526d3f1a904561f0cde1f0a2a4",
+  r: "526d3f1a904561f0cde1f0a2a3"
+}, {
+  a: "3de5a9635a40539831c9665577e5eedbf680755e2065a0caa346759e17225",
+  r: "-3de5a9635a40539831c9665577e5eedbf680755e2065a0caa346759e17226"
+}, {
+  a: "-d912828b8d6419900",
+  r: "d912828b8d64198ff"
+}, {
+  a: "-17968ddf93",
+  r: "17968ddf92"
+}, {
+  a: "-c2bfd766e34923d549bbaedb4d9b7bb35a61908e6144462a",
+  r: "c2bfd766e34923d549bbaedb4d9b7bb35a61908e61444629"
+}, {
+  a: "af426ec83aaafc84a94930e51a2899696a3d",
+  r: "-af426ec83aaafc84a94930e51a2899696a3e"
+}, {
+  a: "-283de5b9379a45f065d3b8662ac38faa6492bc0eea6b7e3b51591a5cc27669e",
+  r: "283de5b9379a45f065d3b8662ac38faa6492bc0eea6b7e3b51591a5cc27669d"
+}];
+
+var error_count = 0;
+for (var i = 0; i < data.length; i++) {
+  var d = data[i];
+  var a = BigInt.parseInt(d.a, 16);
+  var r = ~a;
+  if (d.r !== r.toString(16)) {
+    print("Input:    " + a.toString(16));
+    print("Result:   " + r.toString(16));
+    print("Expected: " + d.r);
+    error_count++;
+  }
+}
+if (error_count !== 0) {
+  print("Finished with " + error_count + " errors.")
+  quit(1);
+}
diff --git a/src/v8/test/mjsunit/harmony/bigint/or.js b/src/v8/test/mjsunit/harmony/bigint/or.js
new file mode 100644
index 0000000..4ee3265
--- /dev/null
+++ b/src/v8/test/mjsunit/harmony/bigint/or.js
@@ -0,0 +1,109 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Generated by tools/bigint-tester.py.
+
+// Flags: --harmony-bigint
+
+var data = [{
+  a: "a66",
+  b: "d0671cd6e4ebd7baf6e48b2529348cfa89fc9513ba30ef3f99aee07f267df163cf8",
+  r: "d0671cd6e4ebd7baf6e48b2529348cfa89fc9513ba30ef3f99aee07f267df163efe"
+}, {
+  a: "a9950e5fc429f0f93d5fa8f306f4e5da88a8c9f9",
+  b: "d1fc1ac3db7ff5547462800923e616727120f74f0a6cb7bf1886dd4f4ac",
+  r: "d1fc1ac3db7ff554746a9959e7fe56ff7fb3f7ff8f7cffff5daedfcfdfd"
+}, {
+  a: "5e277a64b6515ad69ed8935ae8dcdb6dc66f98fcbb462b10bea0db15ad6010d",
+  b: "7df3",
+  r: "5e277a64b6515ad69ed8935ae8dcdb6dc66f98fcbb462b10bea0db15ad67dff"
+}, {
+  a: "3b8368196588e684403965902763d66aa",
+  b: "-edf58c5ab418f49cf9fdb7f3b1c416a03c1dfbe90ba7ea6373c",
+  r: "-edf58c5ab418f49cf9c43493a0801600381dc2880b808821112"
+}, {
+  a: "-5587f5e86137f8ea4d7259acdd0b77a26ea069385501c9985df6a5fcd3c",
+  b: "9878871628ea5cb66",
+  r: "-5587f5e86137f8ea4d7259acdd0b77a26ea069385501811849d605a041a"
+}, {
+  a: "-dc65679b1ea7c86c10890e6d6be3bd069b4c7",
+  b: "83ea9",
+  r: "-dc65679b1ea7c86c10890e6d6be3bd0618047"
+}, {
+  a: "-755f422bfb614b7ed2c8e05cd1e0e0a",
+  b: "-d3185fac5454a495d7b149e67df4436339e060d924d",
+  r: "-24154221496049744240204040c0209"
+}, {
+  a: "-1dfdf84b41ddd069053",
+  b: "f9b2bc80b580311773e9a5d57e8f24ace46bd2a0fce24404db684efa8692638b5d604e6",
+  r: "-1105784900548009011"
+}, {
+  a: "18d1b78380aa9016029417c2ebe77a",
+  b: "-b63b35e6711dcbf00dc02cd936",
+  r: "-3835446109c9600800041806"
+}, {
+  a: "-9981f",
+  b: "-5d876576146a2d5dc8d52d26ea3304287af0922685f8e1a46875e80f24a470",
+  r: "-800f"
+}, {
+  a: "-20f8052991bc5a8f2631c9e4b34aa9073a69913185a539d719",
+  b: "a59fdaa025b42",
+  r: "-20f8052991bc5a8f2631c9e4b34aa9073a6991200005398419"
+}, {
+  a: "-d02620570",
+  b: "-3b14d75fb9d9b95d13f884a82c9f16",
+  r: "-400200506"
+}, {
+  a: "-8",
+  b: "-4",
+  r: "-4"
+}, {
+  a: "e0e8ab319d1f051560e1155ae5789dd4d9b638e07e5a57c3432e6cb9239d",
+  b: "85c9cd1f09436dc45ac783f31a21a1ff4e11ceca00cc164",
+  r: "e0e8ab319d1f0d5dfcf1f5def7fcddfcf9bf39e27e5ff7e35feeecbde3fd"
+}, {
+  a: "8131173cb5597e2ae560cae6d0907f004792b1b1c7",
+  b: "-2ac290724a7c86",
+  r: "-c290604a4c01"
+}, {
+  a: "bdb24fd4d78b01d77e41d95f2c3eedeb2bf919",
+  b: "-97f6ccbd94d64ada501e0f288568",
+  r: "-14f60881940600d2401204000467"
+}, {
+  a: "-d5ad86f9a4808394f6e7dcd2a67bd3e6a9",
+  b: "1a80309934942e4e55fbf2ba4d1d2f8cc4697338097e2c1b7ce013da8a79965974286",
+  r: "-408c066804000010f6c25450261a40a429"
+}, {
+  a: "c7a0086120a1613a28456",
+  b: "b8",
+  r: "c7a0086120a1613a284fe"
+}, {
+  a: "c8480c",
+  b: "0",
+  r: "c8480c"
+}, {
+  a: "ec8913fc89aa7a47672bc0f5269e8629cabf2dba88836cb3a9",
+  b: "-52594e7",
+  r: "-4010447"
+}];
+
+var error_count = 0;
+for (var i = 0; i < data.length; i++) {
+  var d = data[i];
+  var a = BigInt.parseInt(d.a, 16);
+  var b = BigInt.parseInt(d.b, 16);
+  var r = a | b;
+  if (d.r !== r.toString(16)) {
+    print("Input A:  " + a.toString(16));
+    print("Input B:  " + b.toString(16));
+    print("Result:   " + r.toString(16));
+    print("Expected: " + d.r);
+    print("Op: |");
+    error_count++;
+  }
+}
+if (error_count !== 0) {
+  print("Finished with " + error_count + " errors.")
+  quit(1);
+}
diff --git a/src/v8/test/mjsunit/harmony/bigint/regressions.js b/src/v8/test/mjsunit/harmony/bigint/regressions.js
new file mode 100644
index 0000000..3057fe1
--- /dev/null
+++ b/src/v8/test/mjsunit/harmony/bigint/regressions.js
@@ -0,0 +1,20 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --harmony-bigint
+
+var a = 5n;
+var b = a / -1n;
+assertEquals(5n, a);
+assertEquals(-5n, b);
+assertEquals(5n, 5n / 1n);
+assertEquals(5n, -5n / -1n);
+assertEquals(-5n, -5n / 1n);
+
+assertEquals(0n, 5n % 1n);
+assertEquals(0n, -5n % 1n);
+assertEquals(0n, 5n % -1n);
+assertEquals(0n, -5n % -1n);
+
+assertTrue(0n === 0n);
diff --git a/src/v8/test/mjsunit/harmony/bigint/sar.js b/src/v8/test/mjsunit/harmony/bigint/sar.js
new file mode 100644
index 0000000..7feb8ae
--- /dev/null
+++ b/src/v8/test/mjsunit/harmony/bigint/sar.js
@@ -0,0 +1,113 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Generated by tools/bigint-tester.py.
+
+// Flags: --harmony-bigint
+
+var data = [{
+  a: "-4efa0d1f8a127",
+  b: "-66",
+  r: "-13be8347e2849c0000000000000000000000000"
+}, {
+  a: "-100000001",
+  b: "20",
+  r: "-2"
+}, {
+  a: "853cd87b0bd5c046aecbf4b3d",
+  b: "-96",
+  r: "214f361ec2f57011abb2fd2cf40000000000000000000000000000000000000"
+}, {
+  a: "-4bc82dba903fedec0a079f7ae4fa6bd6befa",
+  b: "0",
+  r: "-4bc82dba903fedec0a079f7ae4fa6bd6befa"
+}, {
+  a: "43969b4db0d921d9f0ca68f74e4e4b9073732a7955a5b4571",
+  b: "-91",
+  r: "872d369b61b243b3e194d1ee9c9c9720e6e654f2ab4b68ae2000000000000000000000000000000000000"
+}, {
+  a: "495f57",
+  b: "-a5",
+  r: "92beae00000000000000000000000000000000000000000"
+}, {
+  a: "-22109b99d3025aaef5c3fbd27420a72",
+  b: "45d",
+  r: "-1"
+}, {
+  a: "b3f6b156f4afcf259efd3cd1",
+  b: "c7",
+  r: "0"
+}, {
+  a: "137aeeadc8d1395042e80393cc1b6a1c7b6e526ab1b6fc2f2859fd70e0c29df2802",
+  b: "f49",
+  r: "0"
+}, {
+  a: "70f51026476e43bd7e911d37a4553701",
+  b: "33",
+  r: "e1ea204c8edc877afd2"
+}, {
+  a: "-3f935a89481c85d666498cf64fdc2a57028f7b295621dc665c0442229563",
+  b: "-2",
+  r: "-fe4d6a2520721759992633d93f70a95c0a3deca5588771997011088a558c"
+}, {
+  a: "-c3",
+  b: "-87",
+  r: "-618000000000000000000000000000000000"
+}, {
+  a: "aae225520f630c0dfbb815f121836612d75a1f65a301461cd05ad0a741496",
+  b: "-4",
+  r: "aae225520f630c0dfbb815f121836612d75a1f65a301461cd05ad0a7414960"
+}, {
+  a: "a5348f9af939041cc6ed386c060619a42f30c4aa8",
+  b: "95",
+  r: "529a"
+}, {
+  a: "-4c27fc7e3892a6a5b517",
+  b: "-6c",
+  r: "-4c27fc7e3892a6a5b517000000000000000000000000000"
+}, {
+  a: "98efd35f2239f7efde9aef42ad0acd835e68ad868a2cd8fac260f1c7496e3fd2ada76",
+  b: "0",
+  r: "98efd35f2239f7efde9aef42ad0acd835e68ad868a2cd8fac260f1c7496e3fd2ada76"
+}, {
+  a: "-92f0264c863bdf66d4c83e8bf812123d759b4",
+  b: "-96",
+  r: "-24bc0993218ef7d9b5320fa2fe04848f5d66d00000000000000000000000000000000000000"
+}, {
+  a: "ec6341ff2b0e9cf8721e2eb4ec9c9",
+  b: "74",
+  r: "0"
+}, {
+  a: "-32de8dced947fa55cd0b91332a81f70",
+  b: "-5b",
+  r: "-196f46e76ca3fd2ae685c8999540fb800000000000000000000000"
+}, {
+  a: "-3ef43bf8610f6533526ba734e85eafa04cd50a3",
+  b: "-25",
+  r: "-7de877f0c21eca66a4d74e69d0bd5f4099aa146000000000"
+}, {
+  a: "-9979591a367a32ae0039c54fd0f3d9e0ccc80be52b7e517fc94d9f3587dc54d933bb",
+  b: "0",
+  r: "-9979591a367a32ae0039c54fd0f3d9e0ccc80be52b7e517fc94d9f3587dc54d933bb"
+}];
+
+var error_count = 0;
+for (var i = 0; i < data.length; i++) {
+  var d = data[i];
+  var a = BigInt.parseInt(d.a, 16);
+  var b = BigInt.parseInt(d.b, 16);
+  var r = a >> b;
+  if (d.r !== r.toString(16)) {
+    print("Input A:  " + a.toString(16));
+    print("Input B:  " + b.toString(16));
+    print("Result:   " + r.toString(16));
+    print("Expected: " + d.r);
+    print("Op: >>");
+    error_count++;
+  }
+}
+if (error_count !== 0) {
+  print("Finished with " + error_count + " errors.")
+  quit(1);
+}
diff --git a/src/v8/test/mjsunit/harmony/bigint/shl.js b/src/v8/test/mjsunit/harmony/bigint/shl.js
new file mode 100644
index 0000000..1b0f309
--- /dev/null
+++ b/src/v8/test/mjsunit/harmony/bigint/shl.js
@@ -0,0 +1,109 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Generated by tools/bigint-tester.py.
+
+// Flags: --harmony-bigint
+
+var data = [{
+  a: "-9a6d035348727045f6abf7d59056d30e9ce885e87f5f8438347bfcda0a1f9b",
+  b: "-2",
+  r: "-269b40d4d21c9c117daafdf56415b4c3a73a217a1fd7e10e0d1eff368287e7"
+}, {
+  a: "615f9676062ea7a1b89396ce4208712f279475490829",
+  b: "ff",
+  r: "30afcb3b031753d0dc49cb672104389793ca3aa484148000000000000000000000000000000000000000000000000000000000000000"
+}, {
+  a: "-9b6131d8b806543fce32b4c2ca2038ffa956929848a61b5eb7f",
+  b: "-e7",
+  r: "-1"
+}, {
+  a: "-331d9e",
+  b: "0",
+  r: "-331d9e"
+}, {
+  a: "cb79696d3a6f5d5d034e9d2",
+  b: "-d33",
+  r: "0"
+}, {
+  a: "ca99",
+  b: "10",
+  r: "ca990000"
+}, {
+  a: "6f97833d5",
+  b: "0",
+  r: "6f97833d5"
+}, {
+  a: "67d36e7948d18af35f0823c0d58ba47ca0846cdfaa7a7407f09d44747275532681b343",
+  b: "f",
+  r: "33e9b73ca468c579af8411e06ac5d23e5042366fd53d3a03f84ea23a393aa99340d9a18000"
+}, {
+  a: "f4896",
+  b: "-7",
+  r: "1e91"
+}, {
+  a: "996ce2a9e0f7d65e0523204c9c469bfd14821efe571ac59cdc01",
+  b: "1d",
+  r: "132d9c553c1efacbc0a464099388d37fa29043dfcae358b39b8020000000"
+}, {
+  a: "-f8f",
+  b: "f1",
+  r: "-1f1e000000000000000000000000000000000000000000000000000000000000"
+}, {
+  a: "-b685bbcd953ba9c5973ae523dc81d7b35e0cf2b9b51026d4ba1ac21bd5c3c18f9c13",
+  b: "0",
+  r: "-b685bbcd953ba9c5973ae523dc81d7b35e0cf2b9b51026d4ba1ac21bd5c3c18f9c13"
+}, {
+  a: "e2295b362b7048fb163d1272178ed441517fc689e5ec5ea40f29",
+  b: "-30",
+  r: "e2295b362b7048fb163d1272178ed441517fc689"
+}, {
+  a: "-b322e816b014448f44e60b418582390d2a3ad95",
+  b: "0",
+  r: "-b322e816b014448f44e60b418582390d2a3ad95"
+}, {
+  a: "4c135e4d7",
+  b: "0",
+  r: "4c135e4d7"
+}, {
+  a: "-d5b694",
+  b: "f1",
+  r: "-1ab6d28000000000000000000000000000000000000000000000000000000000000"
+}, {
+  a: "-7994be7",
+  b: "-d",
+  r: "-3ccb"
+}, {
+  a: "a6443add555ea15af90092e8",
+  b: "42",
+  r: "29910eb75557a856be4024ba00000000000000000"
+}, {
+  a: "9385ed",
+  b: "e5",
+  r: "1270bda000000000000000000000000000000000000000000000000000000000"
+}, {
+  a: "-531",
+  b: "7d",
+  r: "-a620000000000000000000000000000000"
+}];
+
+var error_count = 0;
+for (var i = 0; i < data.length; i++) {
+  var d = data[i];
+  var a = BigInt.parseInt(d.a, 16);
+  var b = BigInt.parseInt(d.b, 16);
+  var r = a << b;
+  if (d.r !== r.toString(16)) {
+    print("Input A:  " + a.toString(16));
+    print("Input B:  " + b.toString(16));
+    print("Result:   " + r.toString(16));
+    print("Expected: " + d.r);
+    print("Op: <<");
+    error_count++;
+  }
+}
+if (error_count !== 0) {
+  print("Finished with " + error_count + " errors.")
+  quit(1);
+}
diff --git a/src/v8/test/mjsunit/harmony/bigint/sub.js b/src/v8/test/mjsunit/harmony/bigint/sub.js
new file mode 100644
index 0000000..f0af2ca
--- /dev/null
+++ b/src/v8/test/mjsunit/harmony/bigint/sub.js
@@ -0,0 +1,109 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Generated by tools/bigint-tester.py.
+
+// Flags: --harmony-bigint
+
+var data = [{
+  a: "e5e5071838eb1314",
+  b: "3b7f55dce703a25ea14fdea6186156f775dec5d29f6edb3a014",
+  r: "-3b7f55dce703a25ea14fdea6186156f775d067822deb4c88d00"
+}, {
+  a: "-f",
+  b: "22d6805c7201a8ad4b9e6c2a7e8b5ab3bac",
+  r: "-22d6805c7201a8ad4b9e6c2a7e8b5ab3bbb"
+}, {
+  a: "-22",
+  b: "-11a0adfaedd5adb92297af1c3794ef5461dd8bc146db3",
+  r: "11a0adfaedd5adb92297af1c3794ef5461dd8bc146d91"
+}, {
+  a: "-d20c39d0",
+  b: "-46faa9d3eabcbd8b6d07adc2d0ff289d2",
+  r: "46faa9d3eabcbd8b6d07adc2c3de65002"
+}, {
+  a: "-e5b56109a11",
+  b: "211e1dcdf52f020ab0f16e18cc4e46027d05bfa3155b88973e630ae9a75bf2c7fbad269",
+  r: "-211e1dcdf52f020ab0f16e18cc4e46027d05bfa3155b88973e630ae9a75cd87d5cb6c7a"
+}, {
+  a: "-b682aa",
+  b: "-5fa59a6a80d39c0c885c030e9c8c84ec7",
+  r: "5fa59a6a80d39c0c885c030e9c811cc1d"
+}, {
+  a: "-c1325b8ab9fea966f093bbfbc2e611b0e5bf0b13ce047c7133056d4eea",
+  b: "f97d5c4014c5cc87923c344a",
+  r: "-c1325b8ab9fea966f093bbfbc2e611b0e6b888700e19423dba97a98334"
+}, {
+  a: "-1872900ab729911a3c021db53672eda07a9ad623",
+  b: "152d13997090c43551edfc89d4c7ea5e9ffee4a114085858892e67e82edea6384aaaba7",
+  r: "-152d13997090c43551edfc89d4c7ea602727e54c86a169fc4950433b960d803ff4581ca"
+}, {
+  a: "5440388fc10de9",
+  b: "-4b",
+  r: "5440388fc10e34"
+}, {
+  a: "-198dc54795a81722f70acc9cc20505492172c7819ba168e57d",
+  b: "-48f3b40bf850f771d44e423eb266846801d9e4e920c",
+  r: "-198dc543066cd66371fb557f7d20e15dfb0a81017e031a5371"
+}, {
+  a: "c78082429b3163ce243c778",
+  b: "-97afe29",
+  r: "c78082429b3163cebbec5a1"
+}, {
+  a: "-50df",
+  b: "-d5352ec9c1b0e62b97ea1363ce8b72",
+  r: "d5352ec9c1b0e62b97ea1363ce3a93"
+}, {
+  a: "-5c9777f93d64636ff8bcda39125625aa58a49e9a4f29ece2b7afa5d",
+  b: "894bb7aa90b8687e6290c3218a4258dac9400d556caafe02cf8c312c053f2fc73",
+  r: "-894bb7aa9114fff65bce2784fa3b15b50252637b1703a2a169db5b18e7f6df6d0"
+}, {
+  a: "-e15c51f0627e460c477",
+  b: "-dfd13bac43ebe2f8e77f5b31314843",
+  r: "dfd13bac43ddcd33c879334cd083cc"
+}, {
+  a: "0",
+  b: "adbd3e4b06b92771ae25eb52fca5fc86391303ebf7962",
+  r: "-adbd3e4b06b92771ae25eb52fca5fc86391303ebf7962"
+}, {
+  a: "960a8aa627a1c48721f4e0",
+  b: "-9e8742ae61615481cdd12f0728f0b61",
+  r: "9e8742ae6ac1fd2c304b4b4f9b10041"
+}, {
+  a: "-abf5cf9ff3c15b0645009",
+  b: "-e805773176aaa712d144e172db033c64aeaddf3380b2",
+  r: "e805773176aaa712d144e1681ba6426572982ecf30a9"
+}, {
+  a: "349ebb89b13a7149ec1a4e067574c3825f90ec4e4413948b808c6a",
+  b: "-44cdc0e3efa11513525f68163033a59d7b0610070",
+  r: "349ebb89b13a7596c8288d0086c5f8a856124f517e6d6c3be18cda"
+}, {
+  a: "a86c53e8c49b20cff057882c4345c40f5c34a8cb8",
+  b: "-76453703c781511b52e663",
+  r: "a86c53e8c49b20cff05eec7fb3823c246de9d731b"
+}, {
+  a: "-2647d3c",
+  b: "776e5b3a57bd5196be1b9c99ae899d949cb2b94310c53be8910db71b",
+  r: "-776e5b3a57bd5196be1b9c99ae899d949cb2b94310c53be893723457"
+}];
+
+var error_count = 0;
+for (var i = 0; i < data.length; i++) {
+  var d = data[i];
+  var a = BigInt.parseInt(d.a, 16);
+  var b = BigInt.parseInt(d.b, 16);
+  var r = a - b;
+  if (d.r !== r.toString(16)) {
+    print("Input A:  " + a.toString(16));
+    print("Input B:  " + b.toString(16));
+    print("Result:   " + r.toString(16));
+    print("Expected: " + d.r);
+    print("Op: -");
+    error_count++;
+  }
+}
+if (error_count !== 0) {
+  print("Finished with " + error_count + " errors.")
+  quit(1);
+}
diff --git a/src/v8/test/mjsunit/harmony/bigint/tonumber.js b/src/v8/test/mjsunit/harmony/bigint/tonumber.js
new file mode 100644
index 0000000..d2802a7
--- /dev/null
+++ b/src/v8/test/mjsunit/harmony/bigint/tonumber.js
@@ -0,0 +1,39 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --harmony-bigint
+
+function Check(bigint, number_string) {
+  var number = Number(number_string);
+  if (number_string.substring(0, 2) === "0x") {
+    assertEquals(number_string.substring(2), number.toString(16));
+  } else {
+    assertEquals(number_string, number.toString());
+  }
+}
+
+// Values in Smi range.
+Check(0n, "0");
+Check(1n, "1");
+Check(-1n, "-1");
+
+// Values in double range.
+Check(12345678912n, "12345678912");
+Check(-12345678912345n, "-12345678912345");
+Check(0xfffffffffffffn, "0xfffffffffffff");    // 52 bits.
+Check(0x1fffffffffffffn, "0x1fffffffffffff");  // 53 bits.
+Check(0x3fffffffffffffn, "0x40000000000000");  // 54 bits, rounding up.
+Check(0x3ffffffffffffen, "0x3ffffffffffffe");  // 54 bits, rounding down.
+Check(0x7ffffffffffffdn, "0x7ffffffffffffc");  // 55 bits, rounding down.
+Check(0x7ffffffffffffen, "0x80000000000000");  // 55 bits, tie to even.
+Check(0x7fffffffffffffn, "0x80000000000000");  // 55 bits, rounding up.
+Check(0x1ffff0000ffff0000n, "0x1ffff0000ffff0000");  // 65 bits.
+
+// Values near infinity.
+Check(1n << 1024n, "Infinity");
+Check(-1n << 1024n, "-Infinity");
+Check(1n << 1023n, "8.98846567431158e+307");
+Check((1n << 1024n) - (1n << 972n), "1.7976931348623155e+308");
+Check((1n << 1024n) - (1n << 971n), "1.7976931348623157e+308");
+Check((1n << 1024n) - (1n << 970n), "Infinity");  // Rounding up overflows.
diff --git a/src/v8/test/mjsunit/harmony/bigint/turbo.js b/src/v8/test/mjsunit/harmony/bigint/turbo.js
new file mode 100644
index 0000000..87130ea
--- /dev/null
+++ b/src/v8/test/mjsunit/harmony/bigint/turbo.js
@@ -0,0 +1,193 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax --harmony-bigint
+
+'use strict'
+
+
+function test(f, {input, check}) {
+  let result;
+  try {
+    result = { value: f(input), exception: false }
+  } catch(e) {
+    result = { value: e, exception: true }
+  }
+  check(result);
+}
+
+function Test(f, ...cases) {
+  for (let i = 0; i < cases.length; ++i) {
+    test(f, cases[i]);
+    %OptimizeFunctionOnNextCall(f);
+    for (let j = 0; j < cases.length; ++j) {
+      test(f, cases[j]);
+    }
+    %DeoptimizeFunction(f);
+  }
+}
+
+
+function V(input, expected_value) {
+  function check(result) {
+    assertFalse(result.exception, input);
+    assertEquals(expected_value, result.value);
+  }
+  return {input, check};
+}
+
+function E(input, expected_exception) {
+  function check(result) {
+    assertTrue(result.exception, input);
+    assertInstanceof(result.value, expected_exception);
+  }
+  return {input, check};
+}
+
+
+const six = {[Symbol.toPrimitive]() {return 6n}};
+
+
+////////////////////////////////////////////////////////////////////////////////
+// The first argument to {Test} is the function to test. The other arguments are
+// the test cases, basically pairs of input and expected output. {Test} runs the
+// function first unoptimized on one of the inputs, and then optimized on all
+// inputs.
+////////////////////////////////////////////////////////////////////////////////
+
+
+Test(x => Number(x),
+    V(1n, 1), V(1, 1), V("", 0), V(1.4, 1.4), V(null, 0), V(six, 6));
+
+Test(x => String(x),
+    V(1n, "1"), V(1, "1"), V(1.4, "1.4"), V(null, "null"), V(six, "6"));
+
+Test(x => BigInt(x),
+    V(true, 1n), V(false, 0n), V(42n, 42n), E(NaN, RangeError), V(six, 6n));
+
+Test(x => typeof x,
+    V(1n, "bigint"), V(1, "number"), V(six, "object"));
+Test(x => typeof x == "bigint",
+    V(1n, true), V(1, false), V(six, false));
+
+Test(x => !x,
+    V(0n, true), V(42n, false), V(0x10000000000000000n, false), V(1, false),
+    V(undefined, true), V(six, false));
+Test(x => !!x,
+    V(0n, false), V(42n, true), V(0x10000000000000000n, true), V(1, true),
+    V(undefined, false), V(six, true));
+
+Test(x => +x,
+    E(-3n, TypeError), V(-4, -4), V(1.4, 1.4), V(null, 0), V("5", 5),
+    E(six, TypeError));
+
+Test(x => -x,
+    V(-3n, 3n), V(-4, 4), V(1.4, -1.4), V(null, -0), V("5", -5), V(six, -6n));
+
+Test(x => ~x,
+    V(-3n, 2n), V(-4, 3), V(1.5, -2), V(null, -1), V("5", -6), V(six, -7n));
+
+Test(x => ++x,
+    V(-3n, -2n), V(-4, -3), V(1.5, 2.5), V(null, 1), V("5", 6), V(six, 7n));
+
+Test(x => --x,
+    V(-3n, -4n), V(-4, -5), V(1.5, 0.5), V(null, -1), V("5", 4), V(six, 5n));
+
+Test(x => x++,
+    V(-3n, -3n), V(-4, -4), V(1.5, 1.5), V(null, 0), V("5", 5), V(six, 6n));
+
+Test(x => x--,
+    V(-3n, -3n), V(-4, -4), V(1.5, 1.5), V(null, 0), V("5", 5), V(six, 6n));
+
+Test(x => x + 42,
+    E(1n, TypeError), V(2, 44), V(null, 42), V("a", "a42"), E(six, TypeError));
+Test(x => x + 42n,
+    V(1n, 43n), E(2, TypeError), E(null, TypeError), V("a", "a42"), V(six,48n));
+
+Test(x => x - 4,
+    E(1n, TypeError), V(3, -1), V(null, -4), V("a", NaN), E(six, TypeError));
+Test(x => x - 4n,
+    V(1n, -3n), E(3, TypeError), E(null, TypeError), E("a", TypeError),
+    V(six, 2n));
+
+Test(x => x * 42,
+    E(2n, TypeError), V(3, 126), V("a", NaN), V(null, 0), E(six, TypeError));
+Test(x => x * 42n,
+    V(2n, 84n), E(3, TypeError), E("a", TypeError), E(null, TypeError),
+    V(six, 252n));
+
+Test(x => x / 2,
+    E(2n, TypeError), V(6, 3), V("a", NaN), V(null, 0), E(six, TypeError));
+Test(x => x / 2n,
+    V(2n, 1n), E(6, TypeError), E("a", TypeError), E(null, TypeError),
+    V(six, 3n));
+
+Test(x => x % 2,
+    E(2n, TypeError), V(3, 1), V("a", NaN), V(null, 0), E(six, TypeError));
+Test(x => x % 2n,
+    V(2n, 0n), E(3, TypeError), E("a", TypeError), E(null, TypeError),
+    V(six, 0n));
+
+Test(x => x | 5,
+    E(2n, TypeError), V(3, 7), V("a", 5), V(null, 5), E(six, TypeError));
+Test(x => x | 5n,
+    V(2n, 7n), E(3, TypeError), E("a", TypeError), E(null, TypeError),
+    V(six, 7n));
+
+Test(x => x & 5,
+    E(2n, TypeError), V(3, 1), V("a", 0), V(null, 0), E(six, TypeError));
+Test(x => x & 5n,
+    V(2n, 0n), E(3, TypeError), E("a", TypeError), E(null, TypeError),
+    V(six, 4n));
+
+Test(x => x ^ 5,
+    E(2n, TypeError), V(3, 6), V("a", 5), V(null, 5), E(six, TypeError));
+Test(x => x ^ 5n,
+    V(2n, 7n), E(3, TypeError), E("a", TypeError), E(null, TypeError),
+    V(six, 3n));
+
+Test(x => x << 3,
+    E(2n, TypeError), V(3, 24), V("a", 0), V(null, 0), E(six, TypeError));
+Test(x => x << 3n,
+    V(2n, 16n), E(3, TypeError), E("a", TypeError), E(null, TypeError),
+    V(six, 48n));
+
+Test(x => x >> 1,
+    E(2n, TypeError), V(3, 1), V("a", 0), V(null, 0), E(six, TypeError));
+Test(x => x >> 1n,
+    V(2n, 1n), E(3, TypeError), E("a", TypeError), E(null, TypeError),
+    V(six, 3n));
+
+Test(x => x >>> 1,
+    E(2n, TypeError), V(3, 1), V("a", 0), V(null, 0), E(six, TypeError));
+Test(x => x >>> 1n,
+    E(2n, TypeError), E(3, TypeError), E("a", TypeError), E(null, TypeError),
+    E(six, TypeError));
+
+Test(x => x === 42,
+    V(1n, false), V(2, false), V(null, false), V("a", false), V(six, false));
+Test(x => x === 42,
+    V(42n, false), V(42, true), V(null, false), V("42", false), V(six, false));
+Test(x => x === 42n,
+    V(1n, false), V(2, false), V(null, false), V("a", false), V(six, false));
+Test(x => x === 42n,
+    V(42n, true), V(42, false), V(null, false), V("42", false), V(six, false));
+
+Test(x => x == 42,
+    V(1n, false), V(2, false), V(null, false), V("a", false), V(six, false));
+Test(x => x == 42,
+    V(42n, true), V(42, true), V(null, false), V("42", true), V(six, false));
+Test(x => x == 42n,
+    V(1n, false), V(2, false), V(null, false), V("a", false), V(six, false));
+Test(x => x == 42n,
+    V(42n, true), V(42, true), V(null, false), V("42", true), V(six, false));
+
+Test(x => x < 42,
+    V(1n, true), V(2, true), V(null, true), V("41", true), V(six, true));
+Test(x => x < 42,
+    V(42n, false), V(42, false), V(null, true), V("42", false), V(six, true));
+Test(x => x < 42n,
+    V(1n, true), V(2, true), V(null, true), V("41", true), V(six, true));
+Test(x => x < 42n,
+    V(42n, false), V(42, false), V(null, true), V("42", false), V(six, true));
diff --git a/src/v8/test/mjsunit/harmony/bigint/xor.js b/src/v8/test/mjsunit/harmony/bigint/xor.js
new file mode 100644
index 0000000..d8c9012
--- /dev/null
+++ b/src/v8/test/mjsunit/harmony/bigint/xor.js
@@ -0,0 +1,109 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Generated by tools/bigint-tester.py.
+
+// Flags: --harmony-bigint
+
+var data = [{
+  a: "abde23cae3113c95ec7f444c7277658",
+  b: "-65e40fb1",
+  r: "-abde23cae3113c95ec7f444a2c379e9"
+}, {
+  a: "2d0bbdc05059c78b7e9f43689b2f7a9afaefd679212c2a9b990",
+  b: "29fcdb109b54650f9762b494916bc1cf14853430697febe7acf4327983ce0c6c4c183",
+  r: "29fcdb109b54650f974fbf29513b98089ffbab7301e4c49d360eddaffaef2046d7813"
+}, {
+  a: "b958dc77068d01811e031d6320df5e53823697be94f7654340b",
+  b: "-c1f5ca609a658e24fc33fec10a84b18fb745cb7c6",
+  r: "-b958dc77064cf44b7e9978ed04236dad433c130f1b4020883cf"
+}, {
+  a: "cf7319e3fe16912370c830906f88b",
+  b: "98d972f3c",
+  r: "cf7319e3fe16912370c8a8491d7b7"
+}, {
+  a: "aea6d9e7cec74bca19",
+  b: "5abbcd0c5aa1f96fef9db32b3618de782db64b8f6b4",
+  r: "5abbcd0c5aa1f96fef9db32b3cf2b3e6515a3f33cad"
+}, {
+  a: "-b522a022e90fa094f3b729a7a0a914349f5e1fd778829d7576ad36711",
+  b: "-aa00d2fd6a7636",
+  r: "b522a022e90fa094f3b729a7a0a914349f5e1fd778883d78597b91125"
+}, {
+  a: "9c2bc822ec4a590eb8a77ee630009713090",
+  b: "30b13459c1434",
+  r: "9c2bc822ec4a590eb8a77ed68134ced24a4"
+}, {
+  a: "-f14873e1f6121d584d5541073c7ce162873e156b72fb3c943ffd5f212c0d6",
+  b: "f449f0a292048546924d2973626f5441c045d4adbfd00d301791f0db965f",
+  r: "-fe0cecebdf32550c247193900a5a14269b3a4821a9063c473e84402c9568b"
+}, {
+  a: "83d5552fba4213d8dd1ed9bc6c2",
+  b: "4f7ccc10ba9b6880b862f8d5e1c9",
+  r: "47419942413f49bd35b3154e270b"
+}, {
+  a: "9fdb44741177921c8338b70fc7fa362295bfc92f6275fa16492",
+  b: "93676e5ef972",
+  r: "9fdb44741177921c8338b70fc7fa362295bfc92654031ff9de0"
+}, {
+  a: "4355637ed",
+  b: "-7aeb3013cc5eb39d56eed8104407a3e68039944f7673a0c75bd3",
+  r: "-7aeb3013cc5eb39d56eed8104407a3e68039944f767795916c40"
+}, {
+  a: "7fdf50188f716c13feced67a1c33ecf422",
+  b: "-7106cd7b9",
+  r: "-7fdf50188f716c13feced67a1b2380239b"
+}, {
+  a: "368cf8d0f5790a03774b9a1e116f82281ebd9e18de7f54a7d91f50",
+  b: "8bc4e4f24ce2a7d037079552e6c7db2795f15c92a01f4e0d9",
+  r: "368cf06cbb362ecd5d36996e683aac44630fe747cbb67ea62dff89"
+}, {
+  a: "-7466a596078a20cc4eca96953e3",
+  b: "-666328e5437b1475dcfe2f44f1c6a82af82ce7ee7cf229c8398836d2d834f9014",
+  r: "666328e5437b1475dcfe2f44f1c6a82af82ce79a1a57bfcfb3a8fa9c12a26c3f1"
+}, {
+  a: "ad284b70a22d96bdefba53f134c65a1e4958013bb9a31f091fde6fc89",
+  b: "-c89374df2",
+  r: "-ad284b70a22d96bdefba53f134c65a1e4958013bb9a31f09d74d1b179"
+}, {
+  a: "-47df52354db5",
+  b: "-aa7f61aba9ad859e803e964418af30",
+  r: "aa7f61aba9ad859e807949162de29b"
+}, {
+  a: "-f03ea80f22a3dc03f036b13f85faf5fb1",
+  b: "86e9110772d369fdd52b45a8fb22cea26cb73e908408f8a3cdf637f0042c8efdc11",
+  r: "-86e9110772d369fdd52b45a8fb22cea26c4700388b2a5b7fce0601413ba974083a2"
+}, {
+  a: "3603d29c8",
+  b: "f4849ec3ec3c352b",
+  r: "f4849ec08c011ce3"
+}, {
+  a: "e6668ed8eae8b4bb7bdf522d44e9f1bcf66",
+  b: "361cab4f5be1",
+  r: "e6668ed8eae8b4bb7bdf522e25234549487"
+}, {
+  a: "-d0395d",
+  b: "-4a8ee89d006d22a124070241caf5f4343bdfd30d12",
+  r: "4a8ee89d006d22a124070241caf5f4343bdf03344d"
+}];
+
+var error_count = 0;
+for (var i = 0; i < data.length; i++) {
+  var d = data[i];
+  var a = BigInt.parseInt(d.a, 16);
+  var b = BigInt.parseInt(d.b, 16);
+  var r = a ^ b;
+  if (d.r !== r.toString(16)) {
+    print("Input A:  " + a.toString(16));
+    print("Input B:  " + b.toString(16));
+    print("Result:   " + r.toString(16));
+    print("Expected: " + d.r);
+    print("Op: ^");
+    error_count++;
+  }
+}
+if (error_count !== 0) {
+  print("Finished with " + error_count + " errors.")
+  quit(1);
+}
diff --git a/src/v8/test/mjsunit/harmony/for-await-of.js b/src/v8/test/mjsunit/harmony/for-await-of.js
index efcfdab..e23758a 100644
--- a/src/v8/test/mjsunit/harmony/for-await-of.js
+++ b/src/v8/test/mjsunit/harmony/for-await-of.js
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-// Flags: --harmony-async-iteration --allow-natives-syntax
+// Flags: --allow-natives-syntax
 
 let testFailed = false;
 let testFailure;
diff --git a/src/v8/test/mjsunit/harmony/harmony-string-pad-end.js b/src/v8/test/mjsunit/harmony/harmony-string-pad-end.js
index a218a8a..3c96031 100644
--- a/src/v8/test/mjsunit/harmony/harmony-string-pad-end.js
+++ b/src/v8/test/mjsunit/harmony/harmony-string-pad-end.js
@@ -94,3 +94,14 @@
 (function TestTruncation() {
   assertEquals("ab", "a".padEnd(2, "bc"));
 })();
+
+
+(function TestMaxLength() {
+  assertThrows(() => "123".padEnd(Math.pow(2, 40)), RangeError);
+  assertThrows(() => "123".padEnd(1 << 30), RangeError);
+})();
+
+
+(function TestNoArguments() {
+  assertEquals("abc", "abc".padEnd());
+})();
diff --git a/src/v8/test/mjsunit/harmony/harmony-string-pad-start.js b/src/v8/test/mjsunit/harmony/harmony-string-pad-start.js
index 5e1c36b..d27ad54 100644
--- a/src/v8/test/mjsunit/harmony/harmony-string-pad-start.js
+++ b/src/v8/test/mjsunit/harmony/harmony-string-pad-start.js
@@ -94,3 +94,14 @@
 (function TestTruncation() {
   assertEquals("ba", "a".padStart(2, "bc"));
 })();
+
+
+(function TestMaxLength() {
+  assertThrows(() => "123".padStart(Math.pow(2, 40)), RangeError);
+  assertThrows(() => "123".padStart(1 << 30), RangeError);
+})();
+
+
+(function TestNoArguments() {
+  assertEquals("abc", "abc".padStart());
+})();
diff --git a/src/v8/test/mjsunit/harmony/modules-import-15.js b/src/v8/test/mjsunit/harmony/modules-import-15.js
index ac33cd5..32255ce 100644
--- a/src/v8/test/mjsunit/harmony/modules-import-15.js
+++ b/src/v8/test/mjsunit/harmony/modules-import-15.js
@@ -29,7 +29,8 @@
   } catch(e) {
     assertInstanceof(e, SyntaxError);
     assertEquals(
-      "The requested module does not provide an export named 'default'",
+      "The requested module 'modules-skip-empty.js' does not provide an " +
+      "export named 'default'",
       e.message);
     ran = true;
   }
diff --git a/src/v8/test/mjsunit/harmony/modules-import-meta.js b/src/v8/test/mjsunit/harmony/modules-import-meta.js
new file mode 100644
index 0000000..5ea8a68
--- /dev/null
+++ b/src/v8/test/mjsunit/harmony/modules-import-meta.js
@@ -0,0 +1,44 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// MODULE
+// Flags: --harmony-import-meta
+
+import foreign, { url as otherUrl } from './modules-skip-export-import-meta.js';
+
+assertEquals("object", typeof import.meta);
+assertEquals(null, Object.getPrototypeOf(import.meta));
+assertSame(import.meta, import.meta);
+
+const loadImportMetaArrow = () => import.meta;
+assertSame(loadImportMetaArrow(), import.meta);
+function loadImportMetaFn() {
+  try {
+    throw new Error('force catch code path for nested context');
+  } catch (e) {
+    return import.meta;
+  }
+}
+loadImportMetaFn();
+assertSame(loadImportMetaFn(), import.meta);
+
+// This property isn't part of the spec itself but is mentioned as an example
+assertMatches(/\/modules-import-meta\.js$/, import.meta.url);
+
+import.meta.x = 42;
+assertEquals(42, import.meta.x);
+Object.assign(import.meta, { foo: "bar" })
+assertEquals("bar", import.meta.foo);
+
+// PerformEval parses its argument for the goal symbol Script. So the following
+// should fail just as it does for every other Script context.
+//
+// See:
+// https://github.com/tc39/proposal-import-meta/issues/7#issuecomment-329363083
+assertThrows(() => eval('import.meta'), SyntaxError);
+assertThrows(() => new Function('return import.meta;'), SyntaxError);
+
+assertNotEquals(foreign, import.meta);
+assertMatches(/\/modules-skip-export-import-meta\.js$/, foreign.url);
+assertEquals(foreign.url, otherUrl);
diff --git a/src/v8/test/mjsunit/regress/wasm/regression-694433.js b/src/v8/test/mjsunit/harmony/modules-skip-export-import-meta.js
similarity index 62%
copy from src/v8/test/mjsunit/regress/wasm/regression-694433.js
copy to src/v8/test/mjsunit/harmony/modules-skip-export-import-meta.js
index a260e20..e58e501 100644
--- a/src/v8/test/mjsunit/regress/wasm/regression-694433.js
+++ b/src/v8/test/mjsunit/harmony/modules-skip-export-import-meta.js
@@ -2,5 +2,6 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-var size = 0x40000000;
-assertThrows(() => WebAssembly.validate(new Uint16Array(size)), RangeError);
+export default import.meta;
+const { url } = import.meta;
+export { url };
diff --git a/src/v8/test/mjsunit/harmony/optional-catch-binding-breaks.js b/src/v8/test/mjsunit/harmony/optional-catch-binding-breaks.js
new file mode 100644
index 0000000..82be60c
--- /dev/null
+++ b/src/v8/test/mjsunit/harmony/optional-catch-binding-breaks.js
@@ -0,0 +1,65 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --harmony-optional-catch-binding
+
+let state = 'initial';
+x: try {
+  throw new Error('caught');
+  state = 'unreachable';
+} catch {
+  assertEquals(state, 'initial');
+  state = 'caught';
+  break x;
+  state = 'unreachable';
+}
+assertEquals(state, 'caught');
+
+
+state = 'initial';
+x: try {
+  throw new Error('caught');
+  state = 'unreachable';
+} catch {
+  assertEquals(state, 'initial');
+  state = 'caught';
+  break x;
+  state = 'unreachable';
+} finally {
+  assertEquals(state, 'caught');
+  state = 'finally';
+}
+assertEquals(state, 'finally');
+
+
+state = 'initial';
+x: {
+  y: try {
+    throw new Error('caught');
+    state = 'unreachable';
+  } catch {
+    assertEquals(state, 'initial');
+    state = 'caught';
+    break x;
+    state = 'unreachable';
+  } finally {
+    assertEquals(state, 'caught');
+    state = 'finally';
+    break y;
+    state = 'unreachable';
+  }
+  assertEquals(state, 'finally');
+  state = 'after block';
+}
+assertEquals(state, 'after block');
+
+
+do {
+  try {
+    throw new Error();
+  } catch {
+    break;
+  }
+  assertUnreachable();
+} while(false);
diff --git a/src/v8/test/mjsunit/harmony/optional-catch-binding.js b/src/v8/test/mjsunit/harmony/optional-catch-binding.js
new file mode 100644
index 0000000..093288c
--- /dev/null
+++ b/src/v8/test/mjsunit/harmony/optional-catch-binding.js
@@ -0,0 +1,39 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --harmony-optional-catch-binding
+
+let state = 'initial';
+try {
+  throw new Error('caught');
+  state = 'unreachable';
+} catch { // Note the lack of a binding
+  assertEquals(state, 'initial');
+  state = 'caught';
+}
+assertEquals(state, 'caught');
+
+
+let sigil1 = {};
+try {
+  throw sigil1;
+} catch (e) {
+  assertEquals(e, sigil1);
+}
+
+
+let sigil2 = {};
+let reached = false;
+try {
+  try {
+    throw sigil1;
+  } catch {
+    reached = true;
+  } finally {
+    throw sigil2;
+  }
+} catch (e) {
+  assertEquals(e, sigil2);
+}
+assertTrue(reached);
diff --git a/src/v8/test/mjsunit/harmony/promise-prototype-finally.js b/src/v8/test/mjsunit/harmony/promise-prototype-finally.js
index 3668ab5..4e91f2e 100644
--- a/src/v8/test/mjsunit/harmony/promise-prototype-finally.js
+++ b/src/v8/test/mjsunit/harmony/promise-prototype-finally.js
@@ -605,3 +605,13 @@
     .then(() => assert.equals(1, value));
 
 }, "PromiseResolve-ordering");
+
+(function testIsObject() {
+  var called = false;
+  var p = new Proxy(Promise.resolve(), {});
+  var oldThen = Promise.prototype.then;
+  Promise.prototype.then = () => called = true;
+  Promise.prototype.finally.call(p);
+  assertTrue(called);
+  Promise.prototype.then = oldThen;
+})();
diff --git a/src/v8/test/mjsunit/harmony/public-instance-class-fields.js b/src/v8/test/mjsunit/harmony/public-instance-class-fields.js
new file mode 100644
index 0000000..a82a0ac
--- /dev/null
+++ b/src/v8/test/mjsunit/harmony/public-instance-class-fields.js
@@ -0,0 +1,698 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --harmony-public-fields
+"use strict";
+
+{
+  class C {
+    a;
+  }
+
+  assertEquals(undefined, C.a);
+
+  let c = new C;
+  let descriptor = Object.getOwnPropertyDescriptor(c, 'a');
+  assertTrue(c.hasOwnProperty('a'));
+  assertTrue(descriptor.writable);
+  assertTrue(descriptor.enumerable);
+  assertTrue(descriptor.configurable);
+  assertEquals(undefined, c.a);
+}
+
+{
+  class C {
+    x = 1;
+    constructor() {}
+  }
+
+  let c = new C;
+  assertEquals(1, c.x);
+}
+
+{
+  function t() {
+    class X {
+      x = 1;
+      constructor() {}
+    }
+
+    var x = new X;
+    return x.x;
+  }
+
+  assertEquals(1, t());
+}
+
+{
+  let x = 'a';
+  class C {
+    a;
+    b = x;
+    c = 1;
+    hasOwnProperty() { return 1;}
+  }
+
+  let c = new C;
+  assertEquals(undefined, c.a);
+  assertEquals('a', c.b);
+  assertEquals(1, c.c);
+  assertEquals(undefined, c.d);
+  assertEquals(1, c.hasOwnProperty());
+}
+
+{
+  class C {
+    x = Object.freeze(this);
+    c = 42;
+  }
+  assertThrows(() => { new C; }, TypeError);
+}
+
+{
+  class C {
+    c = this;
+    d = () => this;
+  }
+
+  let c = new C;
+  assertEquals(c, c.c);
+  assertEquals(c, c.d());
+
+  assertEquals(undefined, C.c);
+  assertEquals(undefined, C.d);
+}
+
+{
+  class C {
+    c = 1;
+    d = this.c;
+  }
+
+  let c = new C;
+  assertEquals(1, c.c);
+  assertEquals(1, c.d);
+
+  assertEquals(undefined, C.c);
+  assertEquals(undefined, C.d);
+}
+
+{
+  class C {
+    b = 1;
+    c = () => this.b;
+  }
+
+  let c = new C;
+  assertEquals(1, c.b);
+  assertEquals(1, c.c());
+
+  assertEquals(undefined, C.c);
+  assertEquals(undefined, C.b);
+}
+
+{
+  let x = 'a';
+  class C {
+    b = 1;
+    c = () => this.b;
+    e = () => x;
+  }
+
+  let c = new C;
+  assertEquals(1, c.b);
+  assertEquals('a', c.e());
+
+  let a = {b : 2 };
+  assertEquals(1, c.c.call(a));
+
+  assertEquals(undefined, C.b);
+  assertEquals(undefined, C.c);
+}
+
+{
+  let x = 'a';
+  class C {
+    c = 1;
+    d = function() { return this.c; };
+    e = function() { return x; };
+  }
+
+  let c = new C;
+  assertEquals(1, c.c);
+  assertEquals(1, c.d());
+  assertEquals('a', c.e());
+
+  c.c = 2;
+  assertEquals(2, c.d());
+
+  let a = {c : 3 };
+  assertEquals(3, c.d.call(a));
+
+  assertThrows(c.d.bind(undefined));
+
+  assertEquals(undefined, C.c);
+  assertEquals(undefined, C.d);
+  assertEquals(undefined, C.e);
+}
+
+{
+  class C {
+    c = function() { return 1 };
+  }
+
+  let c = new C;
+  assertEquals('c', c.c.name);
+}
+
+{
+  let d = function() { return new.target; }
+  class C {
+    c = d;
+  }
+
+  let c = new C;
+  assertEquals(undefined, c.c());
+  assertEquals(new d, new c.c());
+}
+
+{
+  class C {
+    c = () => new.target;
+  }
+
+  let c = new C;
+  assertEquals(undefined, c.c());
+}
+
+{
+  let run = false;
+  class C {
+    c = () => {
+      let b;
+      class A {
+        constructor() {
+          b = new.target;
+        }
+      };
+      new A;
+      run = true;
+      assertEquals(A, b);
+    }
+  }
+
+  let c = new C;
+  c.c();
+  assertTrue(run);
+}
+
+{
+  class C {
+    c = new.target;
+  }
+
+  let c = new C;
+  assertEquals(undefined, c.c);
+}
+
+{
+  class B {
+    c = 1;
+  }
+
+  class C extends B {}
+
+  let c = new C;
+  assertEquals(1, c.c);
+}
+
+{
+  assertThrows(() => {
+    class C {
+      c = new C;
+    }
+    let c = new C;
+  });
+}
+
+(function test() {
+  function makeC() {
+    var x = 1;
+
+    return class {
+      a = () => () => x;
+    }
+  }
+
+  let C = makeC();
+  let c = new C;
+  let f = c.a();
+  assertEquals(1, f());
+})()
+
+{
+  let c1 = "c";
+  class C {
+    ["a"] = 1;
+    ["b"];
+    [c1];
+  }
+
+  let c = new C;
+  assertEquals(1, c.a);
+  assertEquals(undefined, c.b);
+  assertEquals(undefined, c[c1]);
+}
+
+{
+  let log = [];
+  function run(i) {
+    log.push(i);
+    return i;
+  }
+
+  class C {
+    [run(1)] = run(6);
+    [run(2)] = run(7);
+    [run(3)]() { run(9);}
+    [run(4)] = run(8);
+    [run(5)]() { throw new Error('should not execute');};
+  }
+
+  let c = new C;
+  c[3]();
+  assertEquals([1, 2, 3, 4, 5, 6, 7, 8, 9], log);
+}
+
+function x() {
+  // This tests lazy parsing.
+  return function() {
+    let log = [];
+    function run(i) {
+      log.push(i);
+      return i;
+    }
+
+    class C {
+      [run(1)] = run(6);
+      [run(2)] = run(7);
+      [run(3)]() { run(9);}
+      [run(4)] = run(8);
+      [run(5)]() { throw new Error('should not execute');};
+    }
+
+    let c = new C;
+    c[3]();
+    assertEquals([1, 2, 3, 4, 5, 6, 7, 8, 9], log);
+  }
+}
+x()();
+
+{
+  class C {}
+  class D {
+    [C];
+  }
+
+  let d = new D;
+  assertThrows(() => { class X { [X] } let x = new X;});
+  assertEquals(undefined, d[C]);
+}
+
+{
+  class B {
+    a = 1;
+  }
+
+  class C extends B {
+    b = 2;
+    constructor() {
+      super();
+    }
+  }
+
+  let c = new C;
+  assertEquals(1, c.a);
+  assertEquals(2, c.b);
+}
+
+{
+  var log = [];
+  function addToLog(item) { log.push(item); }
+
+  class B {
+    a = 1;
+    constructor() {
+      addToLog("base constructor");
+    }
+  }
+
+  function initF() {
+    addToLog("init f");
+    return 1;
+  }
+
+  class C extends B {
+    f = initF();
+
+    constructor() {
+      addToLog("derived constructor");
+      var t = () => {
+        addToLog("t");
+        if (1==-1) {
+          super();
+        } else {
+          super();
+        }
+      }
+      (() => {
+        addToLog("anon");
+        t();
+      })();
+    }
+  }
+
+  let c = new  C;
+  assertEquals(1, c.f);
+  assertEquals(1, c.a);
+  assertEquals(["derived constructor","anon","t","base constructor","init f"],
+               log);
+}
+
+{
+  class B {
+    a = 1;
+    returnA = () => this.a;
+  }
+
+  class C extends B {
+    c = this.a;
+    d = 2;
+    returnC = () => this.c;
+    returnD = () => this.d;
+  }
+
+  let c = new C;
+  assertEquals(1, c.a);
+  assertEquals(1, c.returnA());
+  assertEquals(1, c.c);
+  assertEquals(1, c.returnA());
+  assertEquals(1, c.returnC());
+  assertEquals(2, c.d);
+  assertEquals(2, c.returnD());
+
+  let c2 = new C;
+  assertNotEquals(c2.returnA, c.returnA);
+  assertNotEquals(c2.returnC, c.returnC);
+  assertNotEquals(c2.returnD, c.returnD);
+}
+
+{
+  let foo = undefined;
+  class B {
+    set d(x) {
+      foo = x;
+    }
+  }
+
+  class C extends B {
+    d = 2;
+  }
+
+  let c = new C;
+  assertEquals(undefined, foo);
+  assertEquals(2, c.d);
+}
+
+{
+  class B {}
+  class C extends B {
+    constructor() {
+      super();
+    }
+
+    c = 1;
+  }
+
+  let c = new C;
+  assertEquals(1, c.c);
+}
+
+{
+  class B {}
+  class C extends B {
+    constructor() {
+      let t = () => {
+          super();
+      }
+      t();
+    }
+
+    c = 1;
+  }
+
+  let c = new C;
+  assertEquals(1, c.c);
+}
+
+{
+  let log = [];
+
+  class B {}
+
+  class C extends B {
+
+    x = (log.push(1), 1);
+
+    constructor() {
+      let t = () => {
+        class D extends B {
+
+          x = (log.push(2), 2);
+
+          constructor() {
+            let p = () => {
+              super();
+            }
+
+            p();
+          }
+        }
+
+        let d = new D();
+        assertEquals(2, d.x);
+        super();
+      }
+
+      t();
+    }
+  }
+
+
+  let c = new C;
+  assertEquals(1, c.x);
+  assertEquals([2, 1], log);
+}
+
+{
+  let log = [];
+  class C1 extends class {} {
+    x = log.push(1);
+    constructor() {
+      var t = () => super();
+      super();
+      t();
+    }
+  }
+
+  assertThrows(() => new C1, ReferenceError);
+  assertEquals([1,1], log);
+
+  log = [];
+  class C2 extends class {} {
+    x = log.push(1);
+    constructor() {
+      var t = () => super();
+      t();
+      super();
+    }
+  }
+
+  assertThrows(() => new C2, ReferenceError);
+  assertEquals([1,1], log);
+}
+
+{
+  class C1 extends class {} {
+    x = 1
+    constructor() {
+      eval("super()");
+    }
+  }
+
+  let c = new C1;
+  assertEquals(1, c.x);
+
+  class C2 extends class {} {
+    x = 1
+    constructor() {
+      var t = () => {
+        eval("super()");
+      }
+      t();
+    }
+  }
+
+  c = new C2;
+  assertEquals(1, c.x);
+}
+
+{
+  class C {
+    ['x'] = 1;
+    ['y'] = 2;
+  }
+
+  class C1 extends C {
+    ['x'] = 3;
+    ['z'] = 4;
+  }
+
+  let c = new C1;
+  assertEquals(3, c.x);
+  assertEquals(2, c.y);
+  assertEquals(4, c.z);
+}
+
+{
+  class X extends class {} {
+    c = 1;
+
+    constructor() {
+      let t = () => {
+
+        class P extends class {} {
+          constructor() {
+            let t = () => { super(); };
+            t();
+          }
+        }
+
+        let p = new P;
+        assertEquals(undefined, p.c);
+        super();
+      }
+
+      t();
+    }
+  }
+
+  let x = new X;
+  assertEquals(1, x.c);
+}
+
+{
+  class A {
+    a() { return 1; }
+  }
+
+  class C extends A {
+    b = super.a();
+    c = () => super.a;
+    d = () => super.a();
+    e = super.a;
+    f = super.b;
+  }
+
+  let c = new C;
+  assertEquals(1, c.a());
+  assertEquals(1, c.b);
+  assertEquals(1, c.c()());
+  assertEquals(1, c.d());
+  assertEquals(1, c.e());
+  assertFalse(Object.hasOwnProperty(c, 'a'));
+  assertEquals(c.a, c.e);
+  assertEquals(undefined, c.f);
+}
+
+{
+  function t() {
+    return class {
+      ['x'] = 1;
+    }
+  }
+
+  let klass = t();
+  let obj = new klass;
+  assertEquals(1, obj.x);
+}
+
+{
+  new class {
+    t = 1;
+    constructor(t = this.t) {
+      assertEquals(1, t);
+    }
+  }
+
+  new class extends class {} {
+    t = 1;
+    constructor(t = (super(), this.t)) {
+      assertEquals(1, t);
+    }
+  }
+
+  assertThrows(() => {
+    new class extends class {} {
+      t = 1;
+      constructor(t = this.t) {
+        super();
+      }
+    }
+  }, ReferenceError);
+}
+
+{
+  class X {
+    p = function() { return arguments[0]; }
+  }
+
+  let x = new X;
+  assertEquals(1, x.p(1));
+}
+
+{
+  class X {
+    t = () => {
+      function p() { return arguments[0]; };
+      return p;
+    }
+  }
+
+  let x = new X;
+  let p = x.t();
+  assertEquals(1, p(1));
+}
+
+{
+  class X {
+    t = () => {
+      function p() { return eval("arguments[0]"); };
+      return p;
+    }
+  }
+
+  let x = new X;
+  let p = x.t();
+  assertEquals(1, p(1));
+}
+
+{
+  class X {
+    p = eval("(function() { return arguments[0]; })(1)");
+  }
+
+  let x = new X;
+  assertEquals(1, x.p);
+}
diff --git a/src/v8/test/mjsunit/harmony/public-static-class-fields.js b/src/v8/test/mjsunit/harmony/public-static-class-fields.js
new file mode 100644
index 0000000..3de3e2d
--- /dev/null
+++ b/src/v8/test/mjsunit/harmony/public-static-class-fields.js
@@ -0,0 +1,459 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --harmony-public-fields --harmony-static-fields
+
+"use strict";
+
+{
+  class C {
+    static a;
+  }
+
+  assertEquals(undefined, C.a);
+  let descriptor = Object.getOwnPropertyDescriptor(C, 'a');
+  assertTrue(C.hasOwnProperty('a'));
+  assertTrue(descriptor.writable);
+  assertTrue(descriptor.enumerable);
+  assertTrue(descriptor.configurable);
+
+  let c = new C;
+  assertEquals(undefined, c.a);
+}
+
+{
+  let x = 'a';
+  class C {
+    static a;
+    static hasOwnProperty = function() { return 1; }
+    static b = x;
+    static c = 1;
+  }
+
+  assertEquals(undefined, C.a);
+  assertEquals('a', C.b);
+  assertEquals(1, C.c);
+  assertEquals(1, C.hasOwnProperty());
+
+  let c = new C;
+  assertEquals(undefined, c.a);
+  assertEquals(undefined, c.b);
+  assertEquals(undefined, c.c);
+}
+
+{
+  assertThrows(() => {
+    class C {
+      static x = Object.freeze(this);
+      static c = 42;
+    }
+  }, TypeError);
+}
+
+{
+  class C {
+    static c = this;
+    static d = () => this;
+  }
+
+  assertEquals(C, C.c);
+  assertEquals(C, C.d());
+
+  let c = new C;
+  assertEquals(undefined, c.c);
+  assertEquals(undefined, c.d);
+}
+
+{
+  class C {
+    static c = 1;
+    static d = this.c;
+  }
+
+  assertEquals(1, C.c);
+  assertEquals(1, C.d);
+
+  let c = new C;
+  assertEquals(undefined, c.c);
+  assertEquals(undefined, c.d);
+}
+
+{
+  class C {
+    static b = 1;
+    static c = () => this.b;
+  }
+
+  assertEquals(1, C.b);
+  assertEquals(1, C.c());
+
+  let c = new C;
+  assertEquals(undefined, c.c);
+}
+
+{
+  let x = 'a';
+  class C {
+    static b = 1;
+    static c = () => this.b;
+    static e = () => x;
+  }
+
+  assertEquals(1, C.b);
+  assertEquals('a', C.e());
+
+  let a = {b : 2 };
+  assertEquals(1, C.c.call(a));
+
+  let c = new C;
+  assertEquals(undefined, c.b);
+  assertEquals(undefined, c.c);
+}
+
+{
+  let x = 'a';
+  class C {
+    static c = 1;
+    static d = function() { return this.c; };
+    static e = function() { return x; };
+  }
+
+  assertEquals(1, C.c);
+  assertEquals(1, C.d());
+  assertEquals('a', C.e());
+
+  C.c = 2;
+  assertEquals(2, C.d());
+
+  let a = {c : 3 };
+  assertEquals(3, C.d.call(a));
+
+  assertThrows(C.d.bind(undefined));
+
+  let c = new C;
+  assertEquals(undefined, c.c);
+  assertEquals(undefined, c.d);
+  assertEquals(undefined, c.e);
+}
+
+{
+  class C {
+    static c = function() { return 1 };
+  }
+
+  assertEquals('c', C.c.name);
+}
+
+{
+  let d = function() { return new.target; }
+  class C {
+    static c = d;
+  }
+
+  assertEquals(undefined, C.c());
+  assertEquals(new d, new C.c());
+}
+
+{
+  class C {
+    static c = () => new.target;
+  }
+
+  assertEquals(undefined, C.c());
+}
+
+{
+   class C {
+     static c = () => {
+       let b;
+       class A {
+         constructor() {
+           b = new.target;
+         }
+       };
+       new A;
+       assertEquals(A, b);
+     }
+  }
+
+  C.c();
+}
+
+{
+  class C {
+    static c = new.target;
+  }
+
+  assertEquals(undefined, C.c);
+}
+
+{
+  class B {
+    static d = 1;
+    static b = () => this.d;
+  }
+
+  class C extends B {
+    static c = super.d;
+    static d = () => super.d;
+    static e = () => super.b();
+  }
+
+  assertEquals(1, C.c);
+  assertEquals(1, C.d());
+  assertEquals(1, C.e());
+}
+
+{
+  let foo = undefined;
+  class B {
+    static set d(x) {
+      foo = x;
+    }
+  }
+
+  class C extends B {
+    static d = 2;
+  }
+
+  assertEquals(undefined, foo);
+  assertEquals(2, C.d);
+}
+
+
+{
+  let C  = class {
+    static c;
+  };
+
+  assertEquals("C", C.name);
+}
+
+{
+  class C {
+    static c = new C;
+  }
+
+  assertTrue(C.c instanceof C);
+}
+
+(function test() {
+  function makeC() {
+    var x = 1;
+
+    return class {
+      static a = () => () => x;
+    }
+  }
+
+  let C = makeC();
+  let f = C.a();
+  assertEquals(1, f());
+})()
+
+{
+  let c = "c";
+  class C {
+    static ["a"] = 1;
+    static ["b"];
+    static [c];
+  }
+
+  assertEquals(1, C.a);
+  assertEquals(undefined, C.b);
+  assertEquals(undefined, C[c]);
+}
+
+{
+  let log = [];
+  function run(i) {
+    log.push(i);
+    return i;
+  }
+
+  class C {
+    static [run(1)] = run(6);
+    static [run(2)] = run(7);
+    [run(3)]() { run(9);}
+    static [run(4)] = run(8);
+    static [run(5)]() { throw new Error('should not execute');};
+  }
+
+  let c = new C;
+  c[3]();
+  assertEquals([1, 2, 3, 4, 5, 6, 7, 8, 9], log);
+}
+
+
+
+function x() {
+
+  // This tests lazy parsing.
+  return function() {
+    let log = [];
+    function run(i) {
+      log.push(i);
+      return i;
+    }
+
+    class C {
+      static [run(1)] = run(6);
+      static [run(2)] = run(7);
+      [run(3)]() { run(9);}
+      static [run(4)] = run(8);
+      static [run(5)]() { throw new Error('should not execute');};
+    }
+
+    let c = new C;
+    c[3]();
+    assertEquals([1, 2, 3, 4, 5, 6, 7, 8, 9], log);
+  }
+}
+x()();
+
+{
+  let log = [];
+  function run(i) {
+    log.push(i);
+    return i;
+  }
+
+  class C {
+    [run(1)] = run(7);
+    [run(2)] = run(8);
+    [run(3)]() { run(9);}
+    static [run(4)] = run(6);
+    [run(5)]() { throw new Error('should not execute');};
+  }
+
+  let c = new C;
+  c[3]();
+  assertEquals([1, 2, 3, 4, 5, 6, 7, 8, 9], log);
+}
+
+function y() {
+  // This tests lazy parsing.
+  return function() {
+    let log = [];
+    function run(i) {
+      log.push(i);
+      return i;
+    }
+
+    class C {
+      [run(1)] = run(7);
+      [run(2)] = run(8);
+      [run(3)]() { run(9);}
+      static [run(4)] = run(6);
+      [run(5)]() { throw new Error('should not execute');};
+    }
+
+    let c = new C;
+    c[3]();
+    assertEquals([1, 2, 3, 4, 5, 6, 7, 8, 9], log);
+  }
+}
+y()();
+
+{
+  class C {}
+  class D {
+    static [C];
+  }
+
+  assertThrows(() => { class X { static [X] } });
+  assertEquals(undefined, D[C]);
+}
+
+{
+  function t() {
+    return class {
+      static ['x'] = 2;
+    }
+  }
+
+  let klass = t();
+  let obj = new klass;
+  assertEquals(2, klass.x);
+}
+
+{
+  let x = 'a';
+  class C {
+    a;
+    b = x;
+    c = 1;
+    hasOwnProperty() { return 1;}
+    static [x] = 2;
+    static b = 3;
+    static d;
+  }
+
+  assertEquals(2, C.a);
+  assertEquals(3, C.b);
+  assertEquals(undefined, C.d);
+  assertEquals(undefined, C.c);
+
+  let c = new C;
+  assertEquals(undefined, c.a);
+  assertEquals('a', c.b);
+  assertEquals(1, c.c);
+  assertEquals(undefined, c.d);
+  assertEquals(1, c.hasOwnProperty());
+}
+
+{
+  function t() {
+    return class {
+      ['x'] = 1;
+      static ['x'] = 2;
+    }
+  }
+
+  let klass = t();
+  let obj = new klass;
+  assertEquals(1, obj.x);
+  assertEquals(2, klass.x);
+}
+
+
+{
+  class X {
+    static p = function() { return arguments[0]; }
+  }
+
+  assertEquals(1, X.p(1));
+}
+
+{
+  class X {
+    static t = () => {
+      function p() { return arguments[0]; };
+      return p;
+    }
+  }
+
+  let p = X.t();
+  assertEquals(1, p(1));
+}
+
+{
+  class X {
+    static t = () => {
+      function p() { return eval("arguments[0]"); };
+      return p;
+    }
+  }
+
+  let p = X.t();
+  assertEquals(1, p(1));
+}
+
+{
+  class X {
+    static p = eval("(function() { return arguments[0]; })(1)");
+  }
+
+  assertEquals(1, X.p);
+}
diff --git a/src/v8/test/mjsunit/harmony/regexp-named-captures.js b/src/v8/test/mjsunit/harmony/regexp-named-captures.js
index be90427..72041b9 100644
--- a/src/v8/test/mjsunit/harmony/regexp-named-captures.js
+++ b/src/v8/test/mjsunit/harmony/regexp-named-captures.js
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-// Flags: --harmony-regexp-named-captures --harmony-regexp-lookbehind
+// Flags: --harmony-regexp-named-captures --allow-natives-syntax
 
 // Malformed named captures.
 assertThrows("/(?<>a)/u", SyntaxError);  // Empty name.
@@ -360,6 +360,7 @@
   assertEquals("bacd", "abcd".replace(re, "$2$1"));
   assertEquals("cd", "abcd".replace(re, "$3"));
   assertEquals("$<sndcd", "abcd".replace(re, "$<snd"));
+  assertEquals("$<sndacd", "abcd".replace(re, "$<snd$1"));
   assertEquals("$<42a>cd", "abcd".replace(re, "$<42$1>"));
   assertEquals("$<fth>cd", "abcd".replace(re, "$<fth>"));
   assertEquals("$<a>cd", "abcd".replace(re, "$<$1>"));
@@ -371,10 +372,11 @@
   assertEquals("badc", "abcd".replace(re, "$<snd>$<fst>"));
   assertEquals("badc", "abcd".replace(re, "$2$1"));
   assertEquals("", "abcd".replace(re, "$<thd>"));
-  assertThrows(() => "abcd".replace(re, "$<snd"), SyntaxError);
-  assertThrows(() => "abcd".replace(re, "$<42$1>"), SyntaxError);
-  assertThrows(() => "abcd".replace(re, "$<fth>"), SyntaxError);
-  assertThrows(() => "abcd".replace(re, "$<$1>"), SyntaxError);
+  assertEquals("$<snd$<snd", "abcd".replace(re, "$<snd"));
+  assertEquals("$<snda$<sndc", "abcd".replace(re, "$<snd$1"));
+  assertEquals("", "abcd".replace(re, "$<42$1>"));
+  assertEquals("", "abcd".replace(re, "$<fth>"));
+  assertEquals("", "abcd".replace(re, "$<$1>"));
 }
 
 // @@replace with a string replacement argument (non-global, named captures).
@@ -383,10 +385,11 @@
   assertEquals("bacd", "abcd".replace(re, "$<snd>$<fst>"));
   assertEquals("bacd", "abcd".replace(re, "$2$1"));
   assertEquals("cd", "abcd".replace(re, "$<thd>"));
-  assertThrows(() => "abcd".replace(re, "$<snd"), SyntaxError);
-  assertThrows(() => "abcd".replace(re, "$<42$1>"), SyntaxError);
-  assertThrows(() => "abcd".replace(re, "$<fth>"), SyntaxError);
-  assertThrows(() => "abcd".replace(re, "$<$1>"), SyntaxError);
+  assertEquals("$<sndcd", "abcd".replace(re, "$<snd"));
+  assertEquals("$<sndacd", "abcd".replace(re, "$<snd$1"));
+  assertEquals("cd", "abcd".replace(re, "$<42$1>"));
+  assertEquals("cd", "abcd".replace(re, "$<fth>"));
+  assertEquals("cd", "abcd".replace(re, "$<$1>"));
 }
 
 // @@replace with a string replacement argument (slow, global, named captures).
@@ -395,10 +398,11 @@
   assertEquals("badc", "abcd".replace(re, "$<snd>$<fst>"));
   assertEquals("badc", "abcd".replace(re, "$2$1"));
   assertEquals("", "abcd".replace(re, "$<thd>"));
-  assertThrows(() => "abcd".replace(re, "$<snd"), SyntaxError);
-  assertThrows(() => "abcd".replace(re, "$<42$1>"), SyntaxError);
-  assertThrows(() => "abcd".replace(re, "$<fth>"), SyntaxError);
-  assertThrows(() => "abcd".replace(re, "$<$1>"), SyntaxError);
+  assertEquals("$<snd$<snd", "abcd".replace(re, "$<snd"));
+  assertEquals("$<snda$<sndc", "abcd".replace(re, "$<snd$1"));
+  assertEquals("", "abcd".replace(re, "$<42$1>"));
+  assertEquals("", "abcd".replace(re, "$<fth>"));
+  assertEquals("", "abcd".replace(re, "$<$1>"));
 }
 
 // @@replace with a string replacement argument (slow, non-global,
@@ -408,8 +412,130 @@
   assertEquals("bacd", "abcd".replace(re, "$<snd>$<fst>"));
   assertEquals("bacd", "abcd".replace(re, "$2$1"));
   assertEquals("cd", "abcd".replace(re, "$<thd>"));
-  assertThrows(() => "abcd".replace(re, "$<snd"), SyntaxError);
-  assertThrows(() => "abcd".replace(re, "$<42$1>"), SyntaxError);
-  assertThrows(() => "abcd".replace(re, "$<fth>"), SyntaxError);
-  assertThrows(() => "abcd".replace(re, "$<$1>"), SyntaxError);
+  assertEquals("$<sndcd", "abcd".replace(re, "$<snd"));
+  assertEquals("$<sndacd", "abcd".replace(re, "$<snd$1"));
+  assertEquals("cd", "abcd".replace(re, "$<42$1>"));
+  assertEquals("cd", "abcd".replace(re, "$<fth>"));
+  assertEquals("cd", "abcd".replace(re, "$<$1>"));
+}
+
+// Tests for 'groups' semantics on the regexp result object.
+// https://crbug.com/v8/7192
+
+{
+  const re = /./;
+  const result = re.exec("a");
+  assertTrue(%SpeciesProtector());
+  assertEquals(result.__proto__, Array.prototype);
+  assertTrue(result.hasOwnProperty('groups'));
+  assertArrayEquals(["a"], result);
+  assertEquals(0, result.index);
+  assertEquals(undefined, result.groups);
+
+  Array.prototype.groups = { a: "b" };
+  assertTrue(%SpeciesProtector());
+  assertEquals("$<a>", "a".replace(re, "$<a>"));
+  Array.prototype.groups = undefined;
+}
+
+{
+  const re = toSlowMode(/./);
+  const result = re.exec("a");
+  assertTrue(%SpeciesProtector());
+  assertEquals(result.__proto__, Array.prototype);
+  assertTrue(result.hasOwnProperty('groups'));
+  assertArrayEquals(["a"], result);
+  assertEquals(0, result.index);
+  assertEquals(undefined, result.groups);
+
+  Array.prototype.groups = { a: "b" };
+  assertTrue(%SpeciesProtector());
+  assertEquals("$<a>", "a".replace(re, "$<a>"));
+  Array.prototype.groups = undefined;
+}
+
+{
+  const re = /(?<a>a).|(?<x>x)/;
+  const result = re.exec("ab");
+  assertTrue(%SpeciesProtector());
+  assertEquals(result.__proto__, Array.prototype);
+  assertTrue(result.hasOwnProperty('groups'));
+  assertArrayEquals(["ab", "a", undefined], result);
+  assertEquals(0, result.index);
+  assertEquals({a: "a", x: undefined}, result.groups);
+
+  // a is a matched named capture, b is an unmatched named capture, and z
+  // is not a named capture.
+  Array.prototype.groups = { a: "b", x: "y", z: "z" };
+  assertTrue(%SpeciesProtector());
+  assertEquals("a", "ab".replace(re, "$<a>"));
+  assertEquals("", "ab".replace(re, "$<x>"));
+  assertEquals("", "ab".replace(re, "$<z>"));
+  Array.prototype.groups = undefined;
+}
+
+{
+  const re = toSlowMode(/(?<a>a).|(?<x>x)/);
+  const result = re.exec("ab");
+  assertTrue(%SpeciesProtector());
+  assertEquals(result.__proto__, Array.prototype);
+  assertTrue(result.hasOwnProperty('groups'));
+  assertArrayEquals(["ab", "a", undefined], result);
+  assertEquals(0, result.index);
+  assertEquals({a: "a", x: undefined}, result.groups);
+
+  // a is a matched named capture, b is an unmatched named capture, and z
+  // is not a named capture.
+  Array.prototype.groups = { a: "b", x: "y", z: "z" };
+  assertTrue(%SpeciesProtector());
+  assertEquals("a", "ab".replace(re, "$<a>"));
+  assertEquals("", "ab".replace(re, "$<x>"));
+  assertEquals("", "ab".replace(re, "$<z>"));
+  Array.prototype.groups = undefined;
+}
+
+{
+  class FakeRegExp extends RegExp {
+    exec(subject) {
+      const fake_result = [ "ab", "a" ];
+      fake_result.index = 0;
+      // groups is not set, triggering prototype lookup.
+      return fake_result;
+    }
+  };
+
+  const re = new FakeRegExp();
+  const result = re.exec("ab");
+  assertTrue(%SpeciesProtector());
+  assertEquals(result.__proto__, Array.prototype);
+  assertFalse(result.hasOwnProperty('groups'));
+
+  Array.prototype.groups = { a: "b" };
+  Array.prototype.groups.__proto__.b = "c";
+  assertTrue(%SpeciesProtector());
+  assertEquals("b", "ab".replace(re, "$<a>"));
+  assertEquals("c", "ab".replace(re, "$<b>"));
+  Array.prototype.groups = undefined;
+}
+
+{
+  class FakeRegExp extends RegExp {
+    exec(subject) {
+      const fake_result = [ "ab", "a" ];
+      fake_result.index = 0;
+      fake_result.groups = { a: "b" };
+      fake_result.groups.__proto__.b = "c";
+      return fake_result;
+    }
+  };
+
+  const re = new FakeRegExp();
+  const result = re.exec("ab");
+  assertTrue(%SpeciesProtector());
+  assertEquals(result.__proto__, Array.prototype);
+  assertTrue(result.hasOwnProperty('groups'));
+  assertEquals({ a: "b" }, result.groups);
+
+  assertEquals("b", "ab".replace(re, "$<a>"));
+  assertEquals("c", "ab".replace(re, "$<b>"));
 }
diff --git a/src/v8/test/mjsunit/harmony/regexp-property-binary.js b/src/v8/test/mjsunit/harmony/regexp-property-binary.js
index 8ab3f19..d0c4dc5 100644
--- a/src/v8/test/mjsunit/harmony/regexp-property-binary.js
+++ b/src/v8/test/mjsunit/harmony/regexp-property-binary.js
@@ -71,8 +71,8 @@
 t(/\p{Emoji}/u, "\u2603");
 f(/\p{Emoji}/u, "x");
 
-// t(/\p{Emoji_Component}/u, "\u2603");
-// f(/\p{Emoji_Component}/u, "x");
+t(/\p{Emoji_Component}/u, "\u{1F1E6}");
+f(/\p{Emoji_Component}/u, "x");
 
 t(/\p{Emoji_Modifier_Base}/u, "\u{1F6CC}");
 f(/\p{Emoji_Modifier_Base}/u, "x");
@@ -137,6 +137,9 @@
 t(/\p{Radical}/u, "\u2FAD");
 f(/\p{Radical}/u, "A");
 
+t(/\p{Regional_Indicator}/u, "\u{1F1E6}");
+f(/\p{Regional_Indicator}/u, "A");
+
 t(/\p{Sentence_Terminal}/u, "!");
 f(/\p{STerm}/u, "A");
 
diff --git a/src/v8/test/mjsunit/harmony/regexp-property-lu-ui.js b/src/v8/test/mjsunit/harmony/regexp-property-lu-ui.js
index 115e064..ae559ba 100644
--- a/src/v8/test/mjsunit/harmony/regexp-property-lu-ui.js
+++ b/src/v8/test/mjsunit/harmony/regexp-property-lu-ui.js
@@ -2,12 +2,26 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-// Flags: --harmony-regexp-property
-
 const regexp = /\P{Lu}/ui;
 const regexpu = /[\0-@\[-\xBF\xD7\xDF-\xFF\u0101\u0103\u0105\u0107\u0109\u010B\u010D\u010F\u0111\u0113\u0115\u0117\u0119\u011B\u011D\u011F\u0121\u0123\u0125\u0127\u0129\u012B\u012D\u012F\u0131\u0133\u0135\u0137\u0138\u013A\u013C\u013E\u0140\u0142\u0144\u0146\u0148\u0149\u014B\u014D\u014F\u0151\u0153\u0155\u0157\u0159\u015B\u015D\u015F\u0161\u0163\u0165\u0167\u0169\u016B\u016D\u016F\u0171\u0173\u0175\u0177\u017A\u017C\u017E-\u0180\u0183\u0185\u0188\u018C\u018D\u0192\u0195\u0199-\u019B\u019E\u01A1\u01A3\u01A5\u01A8\u01AA\u01AB\u01AD\u01B0\u01B4\u01B6\u01B9-\u01BB\u01BD-\u01C3\u01C5\u01C6\u01C8\u01C9\u01CB\u01CC\u01CE\u01D0\u01D2\u01D4\u01D6\u01D8\u01DA\u01DC\u01DD\u01DF\u01E1\u01E3\u01E5\u01E7\u01E9\u01EB\u01ED\u01EF\u01F0\u01F2\u01F3\u01F5\u01F9\u01FB\u01FD\u01FF\u0201\u0203\u0205\u0207\u0209\u020B\u020D\u020F\u0211\u0213\u0215\u0217\u0219\u021B\u021D\u021F\u0221\u0223\u0225\u0227\u0229\u022B\u022D\u022F\u0231\u0233-\u0239\u023C\u023F\u0240\u0242\u0247\u0249\u024B\u024D\u024F-\u036F\u0371\u0373-\u0375\u0377-\u037E\u0380-\u0385\u0387\u038B\u038D\u0390\u03A2\u03AC-\u03CE\u03D0\u03D1\u03D5-\u03D7\u03D9\u03DB\u03DD\u03DF\u03E1\u03E3\u03E5\u03E7\u03E9\u03EB\u03ED\u03EF-\u03F3\u03F5\u03F6\u03F8\u03FB\u03FC\u0430-\u045F\u0461\u0463\u0465\u0467\u0469\u046B\u046D\u046F\u0471\u0473\u0475\u0477\u0479\u047B\u047D\u047F\u0481-\u0489\u048B\u048D\u048F\u0491\u0493\u0495\u0497\u0499\u049B\u049D\u049F\u04A1\u04A3\u04A5\u04A7\u04A9\u04AB\u04AD\u04AF\u04B1\u04B3\u04B5\u04B7\u04B9\u04BB\u04BD\u04BF\u04C2\u04C4\u04C6\u04C8\u04CA\u04CC\u04CE\u04CF\u04D1\u04D3\u04D5\u04D7\u04D9\u04DB\u04DD\u04DF\u04E1\u04E3\u04E5\u04E7\u04E9\u04EB\u04ED\u04EF\u04F1\u04F3\u04F5\u04F7\u04F9\u04FB\u04FD\u04FF\u0501\u0503\u0505\u0507\u0509\u050B\u050D\u050F\u0511\u0513\u0515\u0517\u0519\u051B\u051D\u051F\u0521\u0523\u0525\u0527\u0529\u052B\u052D\u052F\u0530\u0557-\u109F\u10C6\u10C8-\u10CC\u10CE-\u139F\u13F6-\u1DFF\u1E01\u1E03\u1E05\u1E07\u1E09\u1E0B\u1E0D\u1E0F\u1E11\u1E13\u1E15\u1E17\u1E19\u1E1B\u1E1D\u1E1F\u1E21\u1E23\u1E25\u1E27\u1E29\u1E2B\u1E2D\u1E2F\u1E31\u1E33\u1E35\u1E37\u1E39\u1E3B\u1E3D\u1E3F\u1E41\u1E43\u1E45\u1E47\u1E49\u1E4B\u1E4D\u1E4F\u1E51\u1E53\u1E55\u1E57\u1E59\u1E5B\u1E5D\u1E5F\u1E61\u1E63\u1E65\u1E67\u1E69\u1E6B\u1E6D\u1E6F\u1E71\u1E73\u1E75\u1E77\u1E79\u1E7B\u1E7D\u1E7F\u1E81\u1E83\u1E85\u1E87\u1E89\u1E8B\u1E8D\u1E8F\u1E91\u1E93\u1E95-\u1E9D\u1E9F\u1EA1\u1EA3\u1EA5\u1EA7\u1EA9\u1EAB\u1EAD\u1EAF\u1EB1\u1EB3\u1EB5\u1EB7\u1EB9\u1EBB\u1EBD\u1EBF\u1EC1\u1EC3\u1EC5\u1EC7\u1EC9\u1ECB\u1ECD\u1ECF\u1ED1\u1ED3\u1ED5\u1ED7\u1ED9\u1EDB\u1EDD\u1EDF\u1EE1\u1EE3\u1EE5\u1EE7\u1EE9\u1EEB\u1EED\u1EEF\u1EF1\u1EF3\u1EF5\u1EF7\u1EF9\u1EFB\u1EFD\u1EFF-\u1F07\u1F10-\u1F17\u1F1E-\u1F27\u1F30-\u1F37\u1F40-\u1F47\u1F4E-\u1F58\u1F5A\u1F5C\u1F5E\u1F60-\u1F67\u1F70-\u1FB7\u1FBC-\u1FC7\u1FCC-\u1FD7\u1FDC-\u1FE7\u1FED-\u1FF7\u1FFC-\u2101\u2103-\u2106\u2108-\u210A\u210E\u210F\u2113\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u212F\u2134-\u213D\u2140-\u2144\u2146-\u2182\u2184-\u2BFF\u2C2F-\u2C5F\u2C61\u2C65\u2C66\u2C68\u2C6A\u2C6C\u2C71\u2C73\u2C74\u2C76-\u2C7D\u2C81\u2C83\u2C85\u2C87\u2C89\u2C8B\u2C8D\u2C8F\u2C91\u2C93\u2C95\u2C97\u2C99\u2C9B\u2C9D\u2C9F\u2CA1\u2CA3\u2CA5\u2CA7\u2CA9\u2CAB\u2CAD\u2CAF\u2CB1\u2CB3\u2CB5\u2CB7\u2CB9\u2CBB\u2CBD\u2CBF\u2CC1\u2CC3\u2CC5\u2CC7\u2CC9\u2CCB\u2CCD\u2CCF\u2CD1\u2CD3\u2CD5\u2CD7\u2CD9\u2CDB\u2CDD\u2CDF\u2CE1\u2CE3-\u2CEA\u2CEC\u2CEE-\u2CF1\u2CF3-\uA63F\uA641\uA643\uA645\uA647\uA649\uA64B\uA64D\uA64F\uA651\uA653\uA655\uA657\uA659\uA65B\uA65D\uA65F\uA661\uA663\uA665\uA667\uA669\uA66B\uA66D-\uA67F\uA681\uA683\uA685\uA687\uA689\uA68B\uA68D\uA68F\uA691\uA693\uA695\uA697\uA699\uA69B-\uA721\uA723\uA725\uA727\uA729\uA72B\uA72D\uA72F-\uA731\uA733\uA735\uA737\uA739\uA73B\uA73D\uA73F\uA741\uA743\uA745\uA747\uA749\uA74B\uA74D\uA74F\uA751\uA753\uA755\uA757\uA759\uA75B\uA75D\uA75F\uA761\uA763\uA765\uA767\uA769\uA76B\uA76D\uA76F-\uA778\uA77A\uA77C\uA77F\uA781\uA783\uA785\uA787-\uA78A\uA78C\uA78E\uA78F\uA791\uA793-\uA795\uA797\uA799\uA79B\uA79D\uA79F\uA7A1\uA7A3\uA7A5\uA7A7\uA7A9\uA7AE\uA7AF\uA7B5\uA7B7-\uFF20\uFF3B-\u{103FF}\u{10428}-\u{10C7F}\u{10CB3}-\u{1189F}\u{118C0}-\u{1D3FF}\u{1D41A}-\u{1D433}\u{1D44E}-\u{1D467}\u{1D482}-\u{1D49B}\u{1D49D}\u{1D4A0}\u{1D4A1}\u{1D4A3}\u{1D4A4}\u{1D4A7}\u{1D4A8}\u{1D4AD}\u{1D4B6}-\u{1D4CF}\u{1D4EA}-\u{1D503}\u{1D506}\u{1D50B}\u{1D50C}\u{1D515}\u{1D51D}-\u{1D537}\u{1D53A}\u{1D53F}\u{1D545}\u{1D547}-\u{1D549}\u{1D551}-\u{1D56B}\u{1D586}-\u{1D59F}\u{1D5BA}-\u{1D5D3}\u{1D5EE}-\u{1D607}\u{1D622}-\u{1D63B}\u{1D656}-\u{1D66F}\u{1D68A}-\u{1D6A7}\u{1D6C1}-\u{1D6E1}\u{1D6FB}-\u{1D71B}\u{1D735}-\u{1D755}\u{1D76F}-\u{1D78F}\u{1D7A9}-\u{1D7C9}\u{1D7CB}-\u{10FFFF}]/ui;
 
-for (let codePoint = 0; codePoint <= 0x10FFFF; codePoint++) {
-  const string = String.fromCodePoint(codePoint);
-  assertEquals(regexp.test(string), regexpu.test(string));
+// Test is split into parts to increase parallelism.
+const number_of_tests = 10;
+const max_codepoint = 0x10FFFF;
+
+function firstCodePointOfRange(i) {
+  return Math.floor(i * (max_codepoint / number_of_tests));
+}
+
+function testCodePointRange(i) {
+  assertTrue(i >= 0 && i < number_of_tests);
+
+  const from = firstCodePointOfRange(i);
+  const to = (i == number_of_tests - 1)
+      ? max_codepoint + 1 : firstCodePointOfRange(i + 1);
+
+  for (let codePoint = from; codePoint < to; codePoint++) {
+    const string = String.fromCodePoint(codePoint);
+    assertEquals(regexp.test(string), regexpu.test(string));
+  }
 }
diff --git a/src/v8/test/mjsunit/harmony/regexp-property-lu-ui0.js b/src/v8/test/mjsunit/harmony/regexp-property-lu-ui0.js
new file mode 100644
index 0000000..27911e7
--- /dev/null
+++ b/src/v8/test/mjsunit/harmony/regexp-property-lu-ui0.js
@@ -0,0 +1,8 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --harmony-regexp-property
+// Files: test/mjsunit/harmony/regexp-property-lu-ui.js
+
+testCodePointRange(0);
diff --git a/src/v8/test/mjsunit/harmony/regexp-property-lu-ui1.js b/src/v8/test/mjsunit/harmony/regexp-property-lu-ui1.js
new file mode 100644
index 0000000..e0177b8
--- /dev/null
+++ b/src/v8/test/mjsunit/harmony/regexp-property-lu-ui1.js
@@ -0,0 +1,8 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --harmony-regexp-property
+// Files: test/mjsunit/harmony/regexp-property-lu-ui.js
+
+testCodePointRange(1);
diff --git a/src/v8/test/mjsunit/harmony/regexp-property-lu-ui2.js b/src/v8/test/mjsunit/harmony/regexp-property-lu-ui2.js
new file mode 100644
index 0000000..7a916b0
--- /dev/null
+++ b/src/v8/test/mjsunit/harmony/regexp-property-lu-ui2.js
@@ -0,0 +1,8 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --harmony-regexp-property
+// Files: test/mjsunit/harmony/regexp-property-lu-ui.js
+
+testCodePointRange(2);
diff --git a/src/v8/test/mjsunit/harmony/regexp-property-lu-ui3.js b/src/v8/test/mjsunit/harmony/regexp-property-lu-ui3.js
new file mode 100644
index 0000000..51cf522
--- /dev/null
+++ b/src/v8/test/mjsunit/harmony/regexp-property-lu-ui3.js
@@ -0,0 +1,8 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --harmony-regexp-property
+// Files: test/mjsunit/harmony/regexp-property-lu-ui.js
+
+testCodePointRange(3);
diff --git a/src/v8/test/mjsunit/harmony/regexp-property-lu-ui4.js b/src/v8/test/mjsunit/harmony/regexp-property-lu-ui4.js
new file mode 100644
index 0000000..ab22e7f
--- /dev/null
+++ b/src/v8/test/mjsunit/harmony/regexp-property-lu-ui4.js
@@ -0,0 +1,8 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --harmony-regexp-property
+// Files: test/mjsunit/harmony/regexp-property-lu-ui.js
+
+testCodePointRange(4);
diff --git a/src/v8/test/mjsunit/harmony/regexp-property-lu-ui5.js b/src/v8/test/mjsunit/harmony/regexp-property-lu-ui5.js
new file mode 100644
index 0000000..668ddbf
--- /dev/null
+++ b/src/v8/test/mjsunit/harmony/regexp-property-lu-ui5.js
@@ -0,0 +1,8 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --harmony-regexp-property
+// Files: test/mjsunit/harmony/regexp-property-lu-ui.js
+
+testCodePointRange(5);
diff --git a/src/v8/test/mjsunit/harmony/regexp-property-lu-ui6.js b/src/v8/test/mjsunit/harmony/regexp-property-lu-ui6.js
new file mode 100644
index 0000000..51669e1
--- /dev/null
+++ b/src/v8/test/mjsunit/harmony/regexp-property-lu-ui6.js
@@ -0,0 +1,8 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --harmony-regexp-property
+// Files: test/mjsunit/harmony/regexp-property-lu-ui.js
+
+testCodePointRange(6);
diff --git a/src/v8/test/mjsunit/harmony/regexp-property-lu-ui7.js b/src/v8/test/mjsunit/harmony/regexp-property-lu-ui7.js
new file mode 100644
index 0000000..68f3e0f
--- /dev/null
+++ b/src/v8/test/mjsunit/harmony/regexp-property-lu-ui7.js
@@ -0,0 +1,8 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --harmony-regexp-property
+// Files: test/mjsunit/harmony/regexp-property-lu-ui.js
+
+testCodePointRange(7);
diff --git a/src/v8/test/mjsunit/harmony/regexp-property-lu-ui8.js b/src/v8/test/mjsunit/harmony/regexp-property-lu-ui8.js
new file mode 100644
index 0000000..b38abe2
--- /dev/null
+++ b/src/v8/test/mjsunit/harmony/regexp-property-lu-ui8.js
@@ -0,0 +1,8 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --harmony-regexp-property
+// Files: test/mjsunit/harmony/regexp-property-lu-ui.js
+
+testCodePointRange(8);
diff --git a/src/v8/test/mjsunit/harmony/regexp-property-lu-ui9.js b/src/v8/test/mjsunit/harmony/regexp-property-lu-ui9.js
new file mode 100644
index 0000000..5c9ca06
--- /dev/null
+++ b/src/v8/test/mjsunit/harmony/regexp-property-lu-ui9.js
@@ -0,0 +1,8 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --harmony-regexp-property
+// Files: test/mjsunit/harmony/regexp-property-lu-ui.js
+
+testCodePointRange(9);
diff --git a/src/v8/test/mjsunit/harmony/regress/regress-6100.js b/src/v8/test/mjsunit/harmony/regress/regress-6100.js
index 16f9ed4..f301094 100644
--- a/src/v8/test/mjsunit/harmony/regress/regress-6100.js
+++ b/src/v8/test/mjsunit/harmony/regress/regress-6100.js
@@ -2,8 +2,6 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-// Flags: --harmony-template-escapes
-
 // This test is added because harmony-template-escapes were not properly
 // handled in the preparser.
 
diff --git a/src/v8/test/mjsunit/harmony/regress/regress-6322.js b/src/v8/test/mjsunit/harmony/regress/regress-6322.js
index 9c312a3..927b56e 100644
--- a/src/v8/test/mjsunit/harmony/regress/regress-6322.js
+++ b/src/v8/test/mjsunit/harmony/regress/regress-6322.js
@@ -2,8 +2,6 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-// Flags: --harmony-async-iteration
-
 // Crash with --verify-heap
 (async function() { for await (let { a = class b { } } of [{}]) { } })();
 (async function() { var a; for await ({ a = class b { } } of [{}]) { } })();
diff --git a/src/v8/test/mjsunit/regress/wasm/regression-694433.js b/src/v8/test/mjsunit/harmony/regress/regress-771470.js
similarity index 62%
rename from src/v8/test/mjsunit/regress/wasm/regression-694433.js
rename to src/v8/test/mjsunit/harmony/regress/regress-771470.js
index a260e20..9776fb0 100644
--- a/src/v8/test/mjsunit/regress/wasm/regression-694433.js
+++ b/src/v8/test/mjsunit/harmony/regress/regress-771470.js
@@ -2,5 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-var size = 0x40000000;
-assertThrows(() => WebAssembly.validate(new Uint16Array(size)), RangeError);
+// Flags: --enable-slow-asserts
+
+async function* gen() { };
+gen.prototype = 1;
diff --git a/src/v8/test/mjsunit/harmony/regress/regress-772649.js b/src/v8/test/mjsunit/harmony/regress/regress-772649.js
new file mode 100644
index 0000000..2ff2767
--- /dev/null
+++ b/src/v8/test/mjsunit/harmony/regress/regress-772649.js
@@ -0,0 +1,11 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+async function* gen([[notIterable]] = [null]) {}
+assertThrows(() => gen(), TypeError);
+assertThrows(() => gen(), TypeError);
+%OptimizeFunctionOnNextCall(gen);
+assertThrows(() => gen(), TypeError);
diff --git a/src/v8/test/mjsunit/harmony/sharedarraybuffer.js b/src/v8/test/mjsunit/harmony/sharedarraybuffer.js
index 12e8c95..a79574d 100644
--- a/src/v8/test/mjsunit/harmony/sharedarraybuffer.js
+++ b/src/v8/test/mjsunit/harmony/sharedarraybuffer.js
@@ -89,9 +89,6 @@
   assertEquals("[object " + constr.name + "]",
       Object.prototype.toString.call(a0));
 
-  // TODO(binji): Should this return false here? It is a view, but it doesn't
-  // view a SharedArrayBuffer...
-  assertTrue(SharedArrayBuffer.isView(a0));
   assertSame(elementSize, a0.BYTES_PER_ELEMENT);
   assertSame(30, a0.length);
   assertSame(30*elementSize, a0.byteLength);
diff --git a/src/v8/test/mjsunit/harmony/sloppy-legacy-duplicate-generators.js b/src/v8/test/mjsunit/harmony/sloppy-legacy-duplicate-generators.js
deleted file mode 100644
index 1fde475..0000000
--- a/src/v8/test/mjsunit/harmony/sloppy-legacy-duplicate-generators.js
+++ /dev/null
@@ -1,60 +0,0 @@
-// Copyright 2016 the V8 project authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// Flags: --no-harmony-restrictive-generators
-
-// In legacy mode, generators get sloppy-mode block-scoped function hoisting
-
-// Hoisting to the global scope
-
-{
-  function* foo() {}
-  assertEquals('function', typeof foo);
-}
-//assertEquals('function', typeof foo);
-
-// Hoisting within a function scope
-(function() {
-  { function* bar() {} }
-  assertEquals('function', typeof bar);
-})();
-
-// Lexical shadowing allowed; hoisting happens
-(function() {
-  function* x() { yield 1; }
-  { function* x() { yield 2 } }
-  assertEquals(2, x().next().value);
-})();
-
-// Duplicates allowed
-(function() {
-  function* y() { yield 1; }
-  function* y() { yield 2 }
-  assertEquals(2, y().next().value);
-})();
-
-// Functions and generators may duplicate each other
-(function() {
-  function* z() { yield 1; }
-  function z() { return 2 }
-  assertEquals(2, z());
-
-  function a() { return 1; }
-  function* a() { yield 2 }
-  assertEquals(2, a().next().value);
-})();
-
-// In strict mode, none of this happens
-
-(function() {
-  'use strict';
-
-  { function* bar() {} }
-  assertEquals('undefined', typeof bar);
-
-  // Lexical shadowing allowed; hoisting happens
-  function* x() { yield 1; }
-  { function* x() { yield 2 } }
-  assertEquals(1, x().next().value);
-})();
diff --git a/src/v8/test/mjsunit/harmony/symbol-async-iterator.js b/src/v8/test/mjsunit/harmony/symbol-async-iterator.js
index 8a92add..5b7e6b5 100644
--- a/src/v8/test/mjsunit/harmony/symbol-async-iterator.js
+++ b/src/v8/test/mjsunit/harmony/symbol-async-iterator.js
@@ -2,8 +2,6 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-// Flags: --harmony-async-iteration
-
 assertTrue(Symbol.hasOwnProperty('asyncIterator'));
 assertEquals('symbol', typeof Symbol.asyncIterator);
 assertInstanceof(Object(Symbol.asyncIterator), Symbol);
diff --git a/src/v8/test/mjsunit/ic-lookup-on-receiver.js b/src/v8/test/mjsunit/ic-lookup-on-receiver.js
new file mode 100644
index 0000000..8be3779
--- /dev/null
+++ b/src/v8/test/mjsunit/ic-lookup-on-receiver.js
@@ -0,0 +1,44 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+(function TestLookupOnReceiver() {
+  let log = [];
+
+  function f(o, v) {
+    o.x = v;
+    return o.x;
+  }
+
+  let p = {};
+  Object.defineProperty(
+      p, "x",
+      {
+        get: function() { return 153; },
+        set: function(v) { log.push("set"); },
+        configurable: true
+      });
+
+  let o = Object.create(p);
+  // Turn o to dictionary mode.
+  for (let i = 0; i < 2048; i++) {
+    o["p"+i] = 0;
+  }
+  assertFalse(%HasFastProperties(o));
+
+  for (let i = 0; i < 5; i++) {
+    log.push(f(o, i));
+  }
+
+  Object.defineProperty(o, "x", { value: 0, configurable: true, writable: true});
+
+  for (let i = 0; i < 5; i++) {
+    log.push(f(o, 42 + i));
+  }
+
+  assertEquals(log,
+               ["set", 153, "set", 153, "set", 153, "set", 153, "set", 153,
+                42, 43, 44, 45, 46]);
+})();
diff --git a/src/v8/test/mjsunit/ignition/dynamic-global-inside-block.js b/src/v8/test/mjsunit/ignition/dynamic-global-inside-block.js
new file mode 100644
index 0000000..028ad49
--- /dev/null
+++ b/src/v8/test/mjsunit/ignition/dynamic-global-inside-block.js
@@ -0,0 +1,11 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Verifies that DYNAMIC_GLOBAL variables walk the correct context-chain length
+// to reach the sloppy-eval calling function context, including block contexts.
+function test() {
+  return eval('var x = 100; { function z() {z}; x }')
+}
+
+test();
diff --git a/src/v8/test/mjsunit/ignition/print-ast.js b/src/v8/test/mjsunit/ignition/print-ast.js
index 4a77e9a..e3e1133 100644
--- a/src/v8/test/mjsunit/ignition/print-ast.js
+++ b/src/v8/test/mjsunit/ignition/print-ast.js
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-// Flags: --print-ast
+// Flags: --print-ast --no-stress-background-compile
 
 // Ensures that the --print-ast flag doesn't crash.
 function foo(a) {
diff --git a/src/v8/test/mjsunit/messages.js b/src/v8/test/mjsunit/messages.js
index 934a731..39d7b02 100644
--- a/src/v8/test/mjsunit/messages.js
+++ b/src/v8/test/mjsunit/messages.js
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-// Flags: --stack-size=100 --harmony
+// Flags: --allow-natives-syntax --stack-size=100 --harmony
 
 function test(f, expected, type) {
   try {
@@ -15,6 +15,18 @@
   assertUnreachable("Exception expected");
 }
 
+const typedArrayConstructors = [
+  Uint8Array,
+  Int8Array,
+  Uint16Array,
+  Int16Array,
+  Uint32Array,
+  Int32Array,
+  Float32Array,
+  Float64Array,
+  Uint8ClampedArray
+];
+
 // === Error ===
 
 // kCyclicProto
@@ -74,8 +86,16 @@
 }, "String.prototype.includes called on null or undefined", TypeError);
 
 test(function() {
+  String.prototype.match.call(null);
+}, "String.prototype.match called on null or undefined", TypeError);
+
+test(function() {
+  String.prototype.search.call(null);
+}, "String.prototype.search called on null or undefined", TypeError);
+
+test(function() {
   Array.prototype.shift.call(null);
-}, "Array.prototype.shift called on null or undefined", TypeError);
+}, "Cannot convert undefined or null to object", TypeError);
 
 test(function() {
   String.prototype.trim.call(null);
@@ -116,9 +136,25 @@
 
 // kConstructorNotFunction
 test(function() {
+  Map();
+}, "Constructor Map requires 'new'", TypeError);
+
+test(function() {
+  Set();
+}, "Constructor Set requires 'new'", TypeError);
+
+test(function() {
   Uint16Array(1);
 }, "Constructor Uint16Array requires 'new'", TypeError);
 
+test(function() {
+  WeakSet();
+}, "Constructor WeakSet requires 'new'", TypeError);
+
+test(function() {
+  WeakMap();
+}, "Constructor WeakMap requires 'new'", TypeError);
+
 // kDataViewNotArrayBuffer
 test(function() {
   new DataView(1);
@@ -132,6 +168,21 @@
   Object.defineProperty(o, "x", { value: 1 });
 }, "Cannot define property x, object is not extensible", TypeError);
 
+// kDetachedOperation
+for (constructor of typedArrayConstructors) {
+  test(() => {
+    const ta = new constructor([1]);
+    %ArrayBufferNeuter(ta.buffer);
+    ta.find(() => {});
+  }, "Cannot perform %TypedArray%.prototype.find on a detached ArrayBuffer", TypeError);
+
+  test(() => {
+    const ta = new constructor([1]);
+    %ArrayBufferNeuter(ta.buffer);
+    ta.findIndex(() => {});
+  }, "Cannot perform %TypedArray%.prototype.findIndex on a detached ArrayBuffer", TypeError);
+}
+
 // kFirstArgumentNotRegExp
 test(function() {
   "a".startsWith(/a/);
@@ -167,6 +218,26 @@
 }, "Method Set.prototype.add called on incompatible receiver [object Array]",
 TypeError);
 
+test(function() {
+  WeakSet.prototype.add.call([]);
+}, "Method WeakSet.prototype.add called on incompatible receiver [object Array]",
+TypeError);
+
+test(function() {
+  WeakSet.prototype.delete.call([]);
+}, "Method WeakSet.prototype.delete called on incompatible receiver [object Array]",
+TypeError);
+
+test(function() {
+  WeakMap.prototype.set.call([]);
+}, "Method WeakMap.prototype.set called on incompatible receiver [object Array]",
+TypeError);
+
+test(function() {
+  WeakMap.prototype.delete.call([]);
+}, "Method WeakMap.prototype.delete called on incompatible receiver [object Array]",
+TypeError);
+
 // kNonCallableInInstanceOfCheck
 test(function() {
   1 instanceof {};
@@ -190,6 +261,24 @@
   1 in 1;
 }, "Cannot use 'in' operator to search for '1' in 1", TypeError);
 
+// kInvalidWeakMapKey
+test(function() {
+  new WeakMap([[1, 1]]);
+}, "Invalid value used as weak map key", TypeError);
+
+test(function() {
+  new WeakMap().set(1, 1);
+}, "Invalid value used as weak map key", TypeError);
+
+// kInvalidWeakSetValue
+test(function() {
+  new WeakSet([1]);
+}, "Invalid value used in weak set", TypeError);
+
+test(function() {
+  new WeakSet().add(1);
+}, "Invalid value used in weak set", TypeError);
+
 // kIteratorResultNotAnObject
 test(function() {
   var obj = {};
@@ -281,10 +370,25 @@
 
 // kPropertyNotFunction
 test(function() {
+  Map.prototype.set = 0;
+  new Map([[1, 2]]);
+}, "'0' returned for property 'set' of object '#<Map>' is not a function", TypeError);
+
+test(function() {
   Set.prototype.add = 0;
-  new Set(1);
+  new Set([1]);
 }, "'0' returned for property 'add' of object '#<Set>' is not a function", TypeError);
 
+test(function() {
+  WeakMap.prototype.set = 0;
+  new WeakMap([[{}, 1]]);
+}, "'0' returned for property 'set' of object '#<WeakMap>' is not a function", TypeError);
+
+test(function() {
+  WeakSet.prototype.add = 0;
+  new WeakSet([{}]);
+}, "'0' returned for property 'add' of object '#<WeakSet>' is not a function", TypeError);
+
 // kProtoObjectOrNull
 test(function() {
   Object.setPrototypeOf({}, 1);
@@ -442,6 +546,14 @@
 
 // kThrowInvalidStringLength
 test(function() {
+  "a".padEnd(1 << 30);
+}, "Invalid string length", RangeError);
+
+test(function() {
+  "a".padStart(1 << 30);
+}, "Invalid string length", RangeError);
+
+test(function() {
   "a".repeat(1 << 30);
 }, "Invalid string length", RangeError);
 
diff --git a/src/v8/test/mjsunit/migrations.js b/src/v8/test/mjsunit/migrations.js
index 1828a61..cc5bf99 100644
--- a/src/v8/test/mjsunit/migrations.js
+++ b/src/v8/test/mjsunit/migrations.js
@@ -244,10 +244,6 @@
     migr: function(o, i) { o.__proto__ = {}; },
   },
   {
-    name: "%FunctionSetPrototype",
-    migr: function(o, i) { %FunctionSetPrototype(o, null); },
-  },
-  {
     name: "modify prototype",
     migr: function(o, i) { if (i == 0) o.__proto__.__proto1__ = [,,,5,,,]; },
   },
diff --git a/src/v8/test/mjsunit/mjsunit.isolate b/src/v8/test/mjsunit/mjsunit.isolate
index 2474d65..a7d151a 100644
--- a/src/v8/test/mjsunit/mjsunit.isolate
+++ b/src/v8/test/mjsunit/mjsunit.isolate
@@ -9,6 +9,7 @@
       '../../tools/consarray.js',
       '../../tools/csvparser.js',
       '../../tools/logreader.js',
+      '../../tools/arguments.js',
       '../../tools/profile.js',
       '../../tools/profile_view.js',
       '../../tools/profviz/composer.js',
diff --git a/src/v8/test/mjsunit/mjsunit.js b/src/v8/test/mjsunit/mjsunit.js
index 77f8b76..10cf527 100644
--- a/src/v8/test/mjsunit/mjsunit.js
+++ b/src/v8/test/mjsunit/mjsunit.js
@@ -192,6 +192,12 @@
   var ArrayPrototypeMap = Array.prototype.map;
   var ArrayPrototypePush = Array.prototype.push;
 
+  var BigIntPrototypeValueOf;
+  // TODO(neis): Remove try-catch once BigInts are enabled by default.
+  try {
+    BigIntPrototypeValueOf = BigInt.prototype.valueOf;
+  } catch(e) {}
+
   function classOf(object) {
     // Argument must not be null or undefined.
     var string = ObjectPrototypeToString.call(object);
@@ -204,6 +210,8 @@
     switch (classOf(value)) {
       case "Number":
         return NumberPrototypeValueOf.call(value);
+      case "BigInt":
+        return BigIntPrototypeValueOf.call(value);
       case "String":
         return StringPrototypeValueOf.call(value);
       case "Boolean":
@@ -220,6 +228,8 @@
     switch (typeof value) {
       case "string":
         return JSON.stringify(value);
+      case "bigint":
+        return String(value) + "n";
       case "number":
         if (value === 0 && (1 / value) < 0) return "-0";
         // FALLTHROUGH.
@@ -233,6 +243,7 @@
         var objectClass = classOf(value);
         switch (objectClass) {
           case "Number":
+          case "BigInt":
           case "String":
           case "Boolean":
           case "Date":
@@ -346,7 +357,8 @@
       return true;
     }
     if (objectClass === "String" || objectClass === "Number" ||
-      objectClass === "Boolean" || objectClass === "Date") {
+      objectClass === "BigInt" || objectClass === "Boolean" ||
+      objectClass === "Date") {
       if (ValueOf(a) !== ValueOf(b)) return false;
     }
     return deepObjectEquals(a, b);
@@ -550,7 +562,7 @@
             try {
               success(result);
             } catch (e) {
-              failWithMessage(e);
+              failWithMessage(String(e));
             }
           },
           result => {
@@ -582,7 +594,8 @@
     return OptimizationStatusImpl(fun, sync_opt);
   }
 
-  assertUnoptimized = function assertUnoptimized(fun, sync_opt, name_opt) {
+  assertUnoptimized = function assertUnoptimized(
+      fun, sync_opt, name_opt, skip_if_maybe_deopted = true) {
     if (sync_opt === undefined) sync_opt = "";
     var opt_status = OptimizationStatus(fun, sync_opt);
     // Tests that use assertUnoptimized() do not make sense if --always-opt
@@ -590,7 +603,8 @@
     assertFalse((opt_status & V8OptimizationStatus.kAlwaysOptimize) !== 0,
                 "test does not make sense with --always-opt");
     assertTrue((opt_status & V8OptimizationStatus.kIsFunction) !== 0, name_opt);
-    if ((opt_status & V8OptimizationStatus.kMaybeDeopted) !== 0) {
+    if (skip_if_maybe_deopted &&
+        (opt_status & V8OptimizationStatus.kMaybeDeopted) !== 0) {
       // When --deopt-every-n-times flag is specified it's no longer guaranteed
       // that particular function is still deoptimized, so keep running the test
       // to stress test the deoptimizer.
@@ -599,7 +613,8 @@
     assertFalse((opt_status & V8OptimizationStatus.kOptimized) !== 0, name_opt);
   }
 
-  assertOptimized = function assertOptimized(fun, sync_opt, name_opt) {
+  assertOptimized = function assertOptimized(
+      fun, sync_opt, name_opt, skip_if_maybe_deopted = true) {
     if (sync_opt === undefined) sync_opt = "";
     var opt_status = OptimizationStatus(fun, sync_opt);
     // Tests that use assertOptimized() do not make sense if --no-opt
@@ -607,7 +622,8 @@
     assertFalse((opt_status & V8OptimizationStatus.kNeverOptimize) !== 0,
                 "test does not make sense with --no-opt");
     assertTrue((opt_status & V8OptimizationStatus.kIsFunction) !== 0, name_opt);
-    if ((opt_status & V8OptimizationStatus.kMaybeDeopted) !== 0) {
+    if (skip_if_maybe_deopted &&
+        (opt_status & V8OptimizationStatus.kMaybeDeopted) !== 0) {
       // When --deopt-every-n-times flag is specified it's no longer guaranteed
       // that particular function is still optimized, so keep running the test
       // to stress test the deoptimizer.
diff --git a/src/v8/test/mjsunit/mjsunit.status b/src/v8/test/mjsunit/mjsunit.status
index 1699d23..d91ff6f 100644
--- a/src/v8/test/mjsunit/mjsunit.status
+++ b/src/v8/test/mjsunit/mjsunit.status
@@ -31,6 +31,7 @@
   # tested standalone.
   'modules-skip*': [SKIP],
   'harmony/modules-skip*': [SKIP],
+  'regress/modules-skip*': [SKIP],
 
   # All tests in the bug directory are expected to fail.
   'bugs/*': [FAIL],
@@ -78,13 +79,16 @@
 
   ##############################################################################
   # No need to waste time for this test.
-  'd8-performance-now': [PASS, NO_VARIANTS],
+  'd8/d8-performance-now': [PASS, NO_VARIANTS],
   'regress/regress-crbug-491062': [PASS, NO_VARIANTS],
 
   # Issue 488: this test sometimes times out.
   # TODO(arm): This seems to flush out a bug on arm with simulator.
   'array-constructor': [PASS, SLOW, ['arch == arm and simulator == True', SKIP]],
 
+  # Very slow test
+  'regress/regress-crbug-808192' : [PASS, NO_VARIANTS, ['arch == arm or arch == arm64 or arch == android_arm or arch == android_arm64 or arch == mipsel or arch == mips64el or arch == mips64 or arch == mips', SKIP]],
+
   # Very slow on ARM and MIPS, contains no architecture dependent code.
   'unicode-case-overoptimization': [PASS, NO_VARIANTS, ['arch == arm or arch == arm64 or arch == android_arm or arch == android_arm64 or arch == mipsel or arch == mips64el or arch == mips64 or arch == mips', SKIP]],
   'regress/regress-3976': [PASS, NO_VARIANTS, ['arch == arm or arch == arm64 or arch == android_arm or arch == android_arm64 or arch == mipsel or arch == mips64el or arch == mips64 or arch == mips', SKIP]],
@@ -109,11 +113,17 @@
   # we cannot run several variants of d8-os simultaneously, since all of them
   # get the same random seed and would generate the same directory name. Besides
   # that, it doesn't make sense to run several variants of d8-os anyways.
-  'd8-os': [PASS, NO_VARIANTS, ['isolates or arch == android_arm or arch == android_arm64 or arch == android_ia32', SKIP]],
+  'd8/d8-os': [PASS, NO_VARIANTS, ['isolates or arch == android_arm or arch == android_arm64 or arch == android_ia32', SKIP]],
   'tools/tickprocessor': [PASS, NO_VARIANTS, ['arch == android_arm or arch == android_arm64 or arch == android_ia32', SKIP]],
   'tools/dumpcpp': [PASS, NO_VARIANTS, ['arch == android_arm or arch == android_arm64 or arch == android_ia32', SKIP]],
 
   ##############################################################################
+  # This test generates a file in the test directory, so we cannot run several
+  # variants of the test simultaneously. Additionally the test should not be
+  # affected by variants.
+  'd8/enable-tracing': [PASS, NO_VARIANTS],
+
+  ##############################################################################
   # Long running test that reproduces memory leak and should be run manually.
   'regress/regress-2073': [SKIP],
 
@@ -135,9 +145,9 @@
   'math-floor-of-div-nosudiv': [PASS, SLOW, ['arch not in [arm, arm64, android_arm, android_arm64]', SKIP]],
 
   # Too slow for slow variants.
-  'asm/embenchen/*': [PASS, SLOW, FAST_VARIANTS],
-  'asm/poppler/*': [PASS, SLOW, FAST_VARIANTS],
-  'asm/sqlite3/*': [PASS, SLOW, FAST_VARIANTS],
+  'asm/embenchen/*': [PASS, SLOW, NO_VARIANTS],
+  'asm/poppler/*': [PASS, SLOW, NO_VARIANTS],
+  'asm/sqlite3/*': [PASS, SLOW, NO_VARIANTS],
 
   # Slow tests.
   'copy-on-write-assert': [PASS, SLOW],
@@ -158,8 +168,11 @@
   'es6/unicode-regexp-ignore-case-noi18n': [FAIL, ['no_i18n == True', PASS]],
   'regress/regress-5036': [PASS, ['no_i18n == True', FAIL]],
   'es7/regexp-ui-word': [PASS, ['no_i18n == True', FAIL]],
+  'regexp-modifiers-i18n': [PASS, ['no_i18n == True', FAIL]],
+  'regexp-modifiers-autogenerated-i18n': [PASS, ['no_i18n == True', FAIL]],
   # desugaring regexp property class relies on ICU.
   'harmony/regexp-property-*': [PASS, ['no_i18n == True', FAIL]],
+  'regress/regress-793588': [PASS, ['no_i18n == True', FAIL]],
 
   # noi18n build cannot parse characters in supplementary plane.
   'harmony/regexp-named-captures': [PASS, ['no_i18n == True', FAIL]],
@@ -168,9 +181,6 @@
   'icu-date-to-string': [PASS, ['no_i18n == True', SKIP]],
   'icu-date-lord-howe': [PASS, ['no_i18n == True', SKIP]],
 
-  # Allocates a large array buffer, which TSAN sometimes cannot handle.
-  'regress/regress-599717': [PASS, ['tsan', SKIP]],
-
   # TODO(bmeurer): Flaky timeouts (sometimes <1s, sometimes >3m).
   'unicodelctest': [PASS, NO_VARIANTS],
   'unicodelctest-no-optimization': [PASS, NO_VARIANTS],
@@ -194,13 +204,19 @@
 }],  # novfp3 == True
 
 ##############################################################################
+# TODO(ahaas): Port multiple return values to ARM, MIPS, S390 and PPC
+['arch == arm or arch == arm64 or arch == mips or arch == mips64 or arch == mipsel or arch == mips64el or arch == s390 or arch == s390x or arch == ppc or arch == ppc64', {
+  'wasm/multi-value': [SKIP],
+}],
+
+##############################################################################
 ['gc_stress == True', {
   # Skip tests not suitable for GC stress.
   'allocation-site-info': [SKIP],
   'array-constructor-feedback': [SKIP],
   'array-feedback': [SKIP],
   'array-literal-feedback': [SKIP],
-  'd8-performance-now': [SKIP],
+  'd8/d8-performance-now': [SKIP],
   'elements-kind': [SKIP],
   'elements-transition-hoisting': [SKIP],
   'fast-prototype': [SKIP],
@@ -251,10 +267,14 @@
   'regress/regress-inline-getter-near-stack-limit': [PASS, SLOW],
 
   # BUG(v8:4779): Crashes flakily with stress mode on arm64.
-  'array-splice': [PASS, SLOW, ['arch == arm64', FAST_VARIANTS]],
+  'array-splice': [PASS, SLOW, ['arch == arm64', NO_VARIANTS]],
 
   # BUG(chromium:751825): Crashes flakily.
   'wasm/js-api': [SKIP],
+
+  # BUG(chromium:773631): Crashes flakily.
+  'wasm/streaming-trap-location': [SKIP],
+
 }],  # 'gc_stress == True'
 
 ##############################################################################
@@ -330,6 +350,9 @@
   'unicode-test': [PASS, SLOW],
   'wasm/atomics': [PASS, SLOW],
   'whitespaces': [PASS, SLOW],
+
+  # BUG(v8:7247).
+  'regress/regress-779407': [PASS, SLOW, NO_VARIANTS],
 }],  # 'arch == arm64'
 
 ['arch == arm64 and mode == debug and simulator_run', {
@@ -365,6 +388,13 @@
   # Flaky on ASAN builds: https://bugs.chromium.org/p/v8/issues/detail?id=6305
   'regress/regress-430201': [SKIP],
   'regress/regress-430201b': [SKIP],
+
+  # Stack overflow on windows.
+  'es8/regress/regress-624300': [PASS, ['system == windows', SKIP]],
+
+  # https://bugs.chromium.org/p/v8/issues/detail?id=7102
+  # Flaky due to huge string allocation.
+  'regress/regress-748069': [SKIP],
 }],  # 'asan == True'
 
 ##############################################################################
@@ -387,9 +417,33 @@
   'compiler/osr-one': [PASS, SLOW],
   'compiler/osr-two': [PASS, SLOW],
   'wasm/grow-memory': [PASS, SLOW],
+
+  # https://bugs.chromium.org/p/v8/issues/detail?id=7102
+  # Flaky due to huge string allocation.
+  'regress/regress-748069': [SKIP],
+  # Slow test.
+  'regress/regress-779407': [PASS, SLOW],
 }],  # 'msan == True'
 
 ##############################################################################
+['tsan == True', {
+  # https://bugs.chromium.org/p/v8/issues/detail?id=7102
+  # Flaky due to huge string allocation.
+  'regress/regress-748069': [SKIP],
+
+  # Allocates a large array buffer, which TSAN sometimes cannot handle.
+  'regress/regress-599717': [SKIP],
+
+  # BUG(v8:7042). Uses a lot of memory.
+  'regress/regress-678917': [SKIP],
+
+  # BUG(v8:6924). The test uses a lot of memory.
+  'regress/wasm/regress-694433': [SKIP],
+  'es6/typedarray': [PASS, NO_VARIANTS],
+  'regress/regress-752764': [PASS, NO_VARIANTS],
+}],  # 'tsan == True'
+
+##############################################################################
 ['arch == arm or arch == android_arm', {
 
   # Slow tests which times out in debug mode.
@@ -478,6 +532,10 @@
 
   # Currently always deopt on minus zero
   'math-floor-of-div-minus-zero': [SKIP],
+
+  # Requires too much memory on MIPS.
+  'regress/regress-752764': [SKIP],
+  'regress/regress-779407': [SKIP],
 }],  # 'arch == mipsel or arch == mips'
 
 ##############################################################################
@@ -526,6 +584,10 @@
 
   # Currently always deopt on minus zero
   'math-floor-of-div-minus-zero': [SKIP],
+
+  # Requires too much memory on MIPS.
+  'regress/regress-752764': [SKIP],
+  'regress/regress-779407': [SKIP],
 }],  # 'arch == mips64el or arch == mips64'
 
 ##############################################################################
@@ -536,9 +598,6 @@
   'math-floor-of-div-nosudiv': [PASS, ['mode == debug', SKIP]],
   'unicodelctest': [PASS, ['mode == debug', SKIP]],
 
-  # BUG(v8:4495).
-  'es6/collections': [PASS, ['arch == ia32', FAST_VARIANTS]],
-
   # Setting the timezone and locale with environment variables unavailable
   'icu-date-to-string': [SKIP],
   'icu-date-lord-howe': [SKIP],
@@ -559,6 +618,10 @@
   'regress/regress-2185-2': [SKIP],
   'readonly': [SKIP],
   'array-feedback': [SKIP],
+  'deopt-recursive-eager-once': [SKIP],
+  'deopt-recursive-lazy-once': [SKIP],
+  'deopt-recursive-soft-once': [SKIP],
+  'code-coverage-block-opt': [SKIP],
 
   # Bounds check triggers forced deopt for array constructors.
   'array-constructor-feedback': [SKIP],
@@ -574,11 +637,23 @@
 }],  # 'deopt_fuzzer == True'
 
 ##############################################################################
+['gc_fuzzer == True', {
+  'regress/regress-336820': [SKIP],
+  'regress/regress-748069': [SKIP],
+  'regress/regress-778668': [SKIP],
+  'ignition/regress-672027': [PASS, ['tsan', SKIP]],
+}],  # 'gc_fuzzer == True'
+
+##############################################################################
 ['predictable == True', {
 
   # Skip tests that are known to be non-deterministic.
-  'd8-worker-sharedarraybuffer': [SKIP],
-  'd8-os': [SKIP],
+  'd8/d8-worker-sharedarraybuffer': [SKIP],
+  'd8/d8-os': [SKIP],
+  'harmony/futex': [SKIP],
+
+  # BUG(v8:7166).
+  'd8/enable-tracing': [SKIP],
 }],  # 'predictable == True'
 
 ##############################################################################
@@ -586,7 +661,12 @@
 
   # take too long with the simulator.
   'regress/regress-1132': [SKIP],
-  'regress/regress-740784': [PASS, SLOW],
+  'regress/regress-740784': [SKIP],
+  'regress/regress-crbug-482998': [PASS, SLOW],
+  'regress/regress-91008': [PASS, SLOW],
+  'harmony/regexp-property-lu-ui': [PASS, SLOW],
+  'whitespaces': [PASS, SLOW],
+  'wasm/grow-memory': [PASS, SLOW],
 }],  # 'arch == ppc and simulator_run'
 
 ##############################################################################
@@ -650,6 +730,12 @@
   'whitespaces': [SKIP],
 }],  # variant == wasm_traps
 
+['variant == wasm_traps and gc_stress == True', {
+  # TODO(eholk): these tests are disabled due to address space exhaustion.
+  # Re-enable them once Wasm address space limits are in place.
+  '*': [SKIP],
+}],  # variant == wasm_traps and gc_stress == True
+
 ##############################################################################
 ['no_harness', {
     # skip assertion tests since the stack trace is broken if mjsunit is
@@ -657,4 +743,31 @@
     'mjsunit-assertion-error' : [SKIP],
 }], # no_harness
 
+##############################################################################
+['arch != x64 or deopt_fuzzer', {
+    # Skip stress-deopt-count tests since it's in x64 only
+    'compiler/stress-deopt-count-*': [SKIP],
+}], # arch != x64 or deopt_fuzzer
+
+##############################################################################
+# Liftoff is currently only sufficiently implemented on x64 and ia32.
+# TODO(clemensh): Implement on all other platforms (crbug.com/v8/6600).
+['arch != x64 and arch != ia32', {
+  'wasm/liftoff': [SKIP],
+}], # arch != x64 and arch != ia32
+
+##############################################################################
+['variant == liftoff', {
+  # In the liftoff variant, liftoff compilation happens even though the test
+  # does not explicitly enable it.
+  'wasm/default-liftoff-setting': [SKIP],
+}], # variant == liftoff
+
+##############################################################################
+['variant == slow_path and gc_stress', {
+  # Slow tests.
+  'regress/regress-crbug-493779': [SKIP],
+  'string-replace-gc': [SKIP],
+}],  # variant == slow_path
+
 ]
diff --git a/src/v8/test/mjsunit/object-literal-modified-object-prototype.js b/src/v8/test/mjsunit/object-literal-modified-object-prototype.js
new file mode 100644
index 0000000..1bf7d3d
--- /dev/null
+++ b/src/v8/test/mjsunit/object-literal-modified-object-prototype.js
@@ -0,0 +1,25 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+(function TestModifedPrototypeInObjectLiteral() {
+  // The prototype chain should not be used if the definition
+  // happens in the object literal.
+
+  Object.defineProperty(Object.prototype, 'c', {
+    get: function () {
+      return 21;
+    },
+    set: function () {
+    }
+  });
+
+  var o = {};
+  o.c = 7;
+  assertEquals(21, o.c);
+
+  var l = {c: 7};
+  assertEquals(7, l.c);
+
+  delete Object.prototype.c;
+})();
diff --git a/src/v8/test/mjsunit/object-literal.js b/src/v8/test/mjsunit/object-literal.js
index 79c4df1..cbc4f5d 100644
--- a/src/v8/test/mjsunit/object-literal.js
+++ b/src/v8/test/mjsunit/object-literal.js
@@ -27,14 +27,14 @@
 
 // Flags: --allow-natives-syntax
 
-function runTest(fn) {
+function runLiteralsTest(fn) {
   // The first run creates an copy directly from the boilerplate decsription.
   fn();
   // The second run will create the boilerplate.
   fn();
   // The third run might copy literals directly in the stub.
   fn();
-  // Several invocations more to trigger map deprecations.
+  // Several invocations more to trigger potential map deprecations.
   fn();
   fn();
   fn();
@@ -43,7 +43,25 @@
   fn();
 }
 
-function testBasicPrototype() {
+
+runLiteralsTest(function testEmptyObjectLiteral() {
+  let object = {};
+  assertTrue(%HasFastProperties(object));
+  assertTrue(%HasObjectElements(object ));
+  assertTrue(%HasHoleyElements(object));
+  assertEquals([], Object.keys(object));
+});
+
+runLiteralsTest(function testSingleGetter() {
+  let object = { get foo() { return 1 } };
+  // For now getters create dict mode objects.
+  assertFalse(%HasFastProperties(object));
+  assertTrue(%HasObjectElements(object ));
+  assertTrue(%HasHoleyElements(object));
+  assertEquals(['foo'], Object.keys(object));
+});
+
+runLiteralsTest(function testBasicPrototype() {
   var obj = {
       a: 7,
       b: { x: 12, y: 24 },
@@ -56,11 +74,9 @@
   assertEquals('Zebra', obj.c);
   assertEquals(Object.getPrototypeOf(obj), Object.prototype);
   assertEquals(Object.getPrototypeOf(obj.b), Object.prototype);
-};
-testBasicPrototype();
-testBasicPrototype();
+});
 
-function testDynamicValue() {
+runLiteralsTest(function testDynamicValue() {
   var z = 24;
 
   var obj2 = {
@@ -73,11 +89,9 @@
   assertEquals(12, obj2.b.x);
   assertEquals(24, obj2.b.y);
   assertEquals('Zebra', obj2.c);
-}
-testDynamicValue();
-testDynamicValue();
+});
 
-(function testMultipleInstatiations() {
+runLiteralsTest(function testMultipleInstatiations() {
   var arr = [];
   for (var i = 0; i < 2; i++) {
     arr[i] = {
@@ -90,174 +104,182 @@
   arr[0].b.x = 2;
   assertEquals(2, arr[0].b.x);
   assertEquals(12, arr[1].b.x);
-})();
-
-function testSparseElements() {
-  let sa1 = {
-      '0': { x: 12, y: 24 },
-      '1000000': { x: 1, y: 2 }
-    };
-  %HeapObjectVerify(sa1);
-  assertEquals(['0', '1000000'], Object.keys(sa1));
-  assertEquals(12, sa1[0].x);
-  assertEquals(24, sa1[0].y);
-  assertEquals(['x', 'y'], Object.keys(sa1[0]));
-  assertEquals(1, sa1[1000000].x);
-  assertEquals(2, sa1[1000000].y);
-  assertEquals(['x', 'y'], Object.keys(sa1[1000000]));
-  assertEquals(Object.prototype, Object.getPrototypeOf(sa1));
-  assertEquals(Object.prototype, Object.getPrototypeOf(sa1[0]));
-  assertEquals(Object.prototype, Object.getPrototypeOf(sa1[1000000]));
-  return sa1;
-}
-
-let object = testSparseElements();
-// modify the object and rerun the test, ensuring the literal didn't change.
-object[1] = "a";
-object[0].x = -12;
-testSparseElements();
-
-// Test that non-constant literals work.
-var n = new Object();
-
-function makeNonConstantArray() { return [ [ n ] ]; }
-
-var a = makeNonConstantArray();
-var b = makeNonConstantArray();
-assertTrue(a[0][0] === n);
-assertTrue(b[0][0] === n);
-assertFalse(a[0] === b[0]);
-a[0][0].foo = "bar";
-assertEquals("bar", n.foo);
-
-function makeNonConstantObject() { return { a: { b: n } }; }
-
-a = makeNonConstantObject();
-b = makeNonConstantObject();
-assertFalse(a.a === b.a);
-assertTrue(a.a.b === b.a.b);
-a.a.b.bar = "foo";
-assertEquals("foo", n.bar);
-
-// Test that exceptions for regexps still hold.
-function makeRegexpInArray() { return [ [ /a*/, {} ] ]; }
-
-a = makeRegexpInArray();
-b = makeRegexpInArray();
-assertFalse(a[0][0] === b[0][0]);
-assertFalse(a[0][1] === b[0][1]);
-assertEquals(Array.prototype, Object.getPrototypeOf(a));
-assertEquals(Array.prototype, Object.getPrototypeOf(b));
-assertEquals(Array.prototype, Object.getPrototypeOf(a[0]));
-assertEquals(Array.prototype, Object.getPrototypeOf(b[0]));
-assertEquals(RegExp.prototype, Object.getPrototypeOf(a[0][0]));
-assertEquals(RegExp.prototype, Object.getPrototypeOf(b[0][0]));
-
-function makeRegexpInObject() { return { a: { b: /b*/, c: {} } }; }
-a = makeRegexpInObject();
-b = makeRegexpInObject();
-assertFalse(a.a.b === b.a.b);
-assertFalse(a.a.c === b.a.c);
-assertEquals(RegExp.prototype, Object.getPrototypeOf(a.a.b));
-assertEquals(RegExp.prototype, Object.getPrototypeOf(b.a.b));
+});
 
 
-// Test keywords are valid as property names in initializers and dot-access.
-var keywords = [
-  "break",
-  "case",
-  "catch",
-  "const",
-  "continue",
-  "debugger",
-  "default",
-  "delete",
-  "do",
-  "else",
-  "false",
-  "finally",
-  "for",
-  "function",
-  "if",
-  "in",
-  "instanceof",
-  "new",
-  "null",
-  "return",
-  "switch",
-  "this",
-  "throw",
-  "true",
-  "try",
-  "typeof",
-  "var",
-  "void",
-  "while",
-  "with"
-];
-
-function testKeywordProperty(keyword) {
-  var exception = false;
-  try {
-    // Sanity check that what we get is a keyword.
-    eval("var " + keyword + " = 42;");
-  } catch (e) {
-    exception = true;
+runLiteralsTest(function TestSparseElements() {
+  function createSparseElements() {
+    let sa1 = {
+        '0': { x: 12, y: 24 },
+        '1000000': { x: 1, y: 2 }
+      };
+    %HeapObjectVerify(sa1);
+    assertEquals(['0', '1000000'], Object.keys(sa1));
+    assertEquals(12, sa1[0].x);
+    assertEquals(24, sa1[0].y);
+    assertEquals(['x', 'y'], Object.keys(sa1[0]));
+    assertEquals(1, sa1[1000000].x);
+    assertEquals(2, sa1[1000000].y);
+    assertEquals(['x', 'y'], Object.keys(sa1[1000000]));
+    assertEquals(Object.prototype, Object.getPrototypeOf(sa1));
+    assertEquals(Object.prototype, Object.getPrototypeOf(sa1[0]));
+    assertEquals(Object.prototype, Object.getPrototypeOf(sa1[1000000]));
+    return sa1;
   }
-  assertTrue(exception);
 
-  // Simple property, read and write.
-  var x = eval("({" + keyword + ": 42})");
-  assertEquals(42, x[keyword]);
-  assertEquals(42, eval("x." + keyword));
-  eval("x." + keyword + " = 37");
-  assertEquals(37, x[keyword]);
-  assertEquals(37, eval("x." + keyword));
+  let object = createSparseElements();
+  // modify the object and rerun the test, ensuring the literal didn't change.
+  object[1] = "a";
+  object[0].x = -12;
+  createSparseElements();
+});
 
-  // Getter/setter property, read and write.
-  var y = eval("({value : 42, get " + keyword + "(){return this.value}," +
-               " set " + keyword + "(v) { this.value = v; }})");
-  assertEquals(42, y[keyword]);
-  assertEquals(42, eval("y." + keyword));
-  eval("y." + keyword + " = 37");
-  assertEquals(37, y[keyword]);
-  assertEquals(37, eval("y." + keyword));
+runLiteralsTest(function TestNonConstLiterals() {
+  // Test that non-constant literals work.
+  var n = new Object();
 
-  // Quoted keyword works is read back by unquoted as well.
-  var z = eval("({\"" + keyword + "\": 42})");
-  assertEquals(42, z[keyword]);
-  assertEquals(42, eval("z." + keyword));
+  function makeNonConstantArray() { return [ [ n ] ]; }
 
-  // Function property, called.
-  var was_called;
-  function test_call() { this.was_called = true; was_called = true; }
-  var w = eval("({" + keyword + ": test_call, was_called: false})");
-  eval("w." + keyword + "();");
-  assertTrue(was_called);
-  assertTrue(w.was_called);
+  var a = makeNonConstantArray();
+  var b = makeNonConstantArray();
+  assertTrue(a[0][0] === n);
+  assertTrue(b[0][0] === n);
+  assertFalse(a[0] === b[0]);
+  a[0][0].foo = "bar";
+  assertEquals("bar", n.foo);
 
-  // Function property, constructed.
-  function construct() { this.constructed = true; }
-  var v = eval("({" + keyword + ": construct})");
-  var vo = eval("new v." + keyword + "()");
-  assertTrue(vo instanceof construct);
-  assertTrue(vo.constructed);
-}
+  function makeNonConstantObject() { return { a: { b: n } }; }
 
-for (var i = 0; i < keywords.length; i++) {
-  testKeywordProperty(keywords[i]);
-}
+  a = makeNonConstantObject();
+  b = makeNonConstantObject();
+  assertFalse(a.a === b.a);
+  assertTrue(a.a.b === b.a.b);
+  a.a.b.bar = "foo";
+  assertEquals("foo", n.bar);
+});
 
-function TestSimpleElements() {
+runLiteralsTest(function TestRegexpInArray() {
+  // Test that exceptions for regexps still hold.
+  function makeRegexpInArray() { return [ [ /a*/, {} ] ]; }
+
+  let a = makeRegexpInArray();
+  let b = makeRegexpInArray();
+  assertFalse(a[0][0] === b[0][0]);
+  assertFalse(a[0][1] === b[0][1]);
+  assertEquals(Array.prototype, Object.getPrototypeOf(a));
+  assertEquals(Array.prototype, Object.getPrototypeOf(b));
+  assertEquals(Array.prototype, Object.getPrototypeOf(a[0]));
+  assertEquals(Array.prototype, Object.getPrototypeOf(b[0]));
+  assertEquals(RegExp.prototype, Object.getPrototypeOf(a[0][0]));
+  assertEquals(RegExp.prototype, Object.getPrototypeOf(b[0][0]));
+});
+
+runLiteralsTest(function TestRegexpInObject() {
+  function makeRegexpInObject() { return { a: { b: /b*/, c: {} } }; }
+  let a = makeRegexpInObject();
+  let b = makeRegexpInObject();
+  assertFalse(a.a.b === b.a.b);
+  assertFalse(a.a.c === b.a.c);
+  assertEquals(RegExp.prototype, Object.getPrototypeOf(a.a.b));
+  assertEquals(RegExp.prototype, Object.getPrototypeOf(b.a.b));
+});
+
+runLiteralsTest(function TestKeywordProperties() {
+  // Test keywords are valid as property names in initializers and dot-access.
+  var keywords = [
+    "break",
+    "case",
+    "catch",
+    "const",
+    "continue",
+    "debugger",
+    "default",
+    "delete",
+    "do",
+    "else",
+    "false",
+    "finally",
+    "for",
+    "function",
+    "if",
+    "in",
+    "instanceof",
+    "new",
+    "null",
+    "return",
+    "switch",
+    "this",
+    "throw",
+    "true",
+    "try",
+    "typeof",
+    "var",
+    "void",
+    "while",
+    "with"
+  ];
+
+  function testKeywordProperty(keyword) {
+    var exception = false;
+    try {
+      // Sanity check that what we get is a keyword.
+      eval("var " + keyword + " = 42;");
+    } catch (e) {
+      exception = true;
+    }
+    assertTrue(exception);
+
+    // Simple property, read and write.
+    var x = eval("({" + keyword + ": 42})");
+    assertEquals(42, x[keyword]);
+    assertEquals(42, eval("x." + keyword));
+    eval("x." + keyword + " = 37");
+    assertEquals(37, x[keyword]);
+    assertEquals(37, eval("x." + keyword));
+
+    // Getter/setter property, read and write.
+    var y = eval("({value : 42, get " + keyword + "(){return this.value}," +
+                 " set " + keyword + "(v) { this.value = v; }})");
+    assertEquals(42, y[keyword]);
+    assertEquals(42, eval("y." + keyword));
+    eval("y." + keyword + " = 37");
+    assertEquals(37, y[keyword]);
+    assertEquals(37, eval("y." + keyword));
+
+    // Quoted keyword works is read back by unquoted as well.
+    var z = eval("({\"" + keyword + "\": 42})");
+    assertEquals(42, z[keyword]);
+    assertEquals(42, eval("z." + keyword));
+
+    // Function property, called.
+    var was_called;
+    function test_call() { this.was_called = true; was_called = true; }
+    var w = eval("({" + keyword + ": test_call, was_called: false})");
+    eval("w." + keyword + "();");
+    assertTrue(was_called);
+    assertTrue(w.was_called);
+
+    // Function property, constructed.
+    function construct() { this.constructed = true; }
+    var v = eval("({" + keyword + ": construct})");
+    var vo = eval("new v." + keyword + "()");
+    assertTrue(vo instanceof construct);
+    assertTrue(vo.constructed);
+  }
+
+  for (var i = 0; i < keywords.length; i++) {
+    testKeywordProperty(keywords[i]);
+  }
+});
+
+runLiteralsTest(function TestSimpleElements() {
   var o = { 0:"zero", 1:"one", 2:"two" };
   assertEquals({0:"zero", 1:"one", 2:"two"}, o);
   o[0] = 0;
   assertEquals({0:0, 1:"one", 2:"two"}, o);
-}
-TestSimpleElements();
-TestSimpleElements();
+});
 
-function TestNumericNames() {
+runLiteralsTest(function TestNumericNames() {
   var o = {
     1: 1,
     2.: 2,
@@ -278,11 +300,9 @@
   };
   %HeapObjectVerify(o);
   assertEquals(['1.2', '1.3'], Object.keys(o));
-}
-TestNumericNames();
-TestNumericNames();
+});
 
-function TestDictionaryElements() {
+runLiteralsTest(function TestDictionaryElements() {
   let o = {1024: true};
   assertTrue(%HasDictionaryElements(o));
   assertEquals(true, o[1024]);
@@ -300,13 +320,9 @@
   %HeapObjectVerify(o2);
   o2[1024] = "test";
   assertEquals(["test"], Object.values(o2));
-}
-TestDictionaryElements();
-TestDictionaryElements();
-%OptimizeFunctionOnNextCall(TestDictionaryElements);
-TestDictionaryElements();
+});
 
-function TestLiteralElementsKind() {
+runLiteralsTest(function TestLiteralElementsKind() {
   let o = {0:0, 1:1, 2:2};
   assertTrue(%HasObjectElements(o));
   assertTrue(%HasHoleyElements(o));
@@ -329,13 +345,9 @@
   assertTrue(%HasHoleyElements(o));
 
   assertTrue(%HasDictionaryElements({0xFFFFFF:true}));
-}
-TestLiteralElementsKind();
-TestLiteralElementsKind();
-%OptimizeFunctionOnNextCall(TestLiteralElementsKind);
-TestLiteralElementsKind();
+});
 
-function TestNonNumberElementValues() {
+runLiteralsTest(function TestNonNumberElementValues() {
   var o = {
     1: true,
     2: false,
@@ -387,15 +399,10 @@
   };
   %HeapObjectVerify(o4);
   assertEquals(['1', '2', '3', '4', 'a', 'b'], Object.keys(o4));
-}
-TestNonNumberElementValues();
-TestNonNumberElementValues();
-TestNonNumberElementValues();
-%OptimizeFunctionOnNextCall(TestNonNumberElementValues);
-TestNonNumberElementValues();
+})
 
 
-function numericGetters() {
+runLiteralsTest(function numericGetters() {
   function TestNumericNamesGetter(expectedKeys, object) {
     assertEquals(expectedKeys, Object.keys(object));
     expectedKeys.forEach(function(key) {
@@ -418,11 +425,9 @@
     get 1.2() {},
     get 1.30() {}
   });
-}
-numericGetters();
-numericGetters();
+});
 
-function numericSetters() {
+runLiteralsTest(function numericSetters() {
   function TestNumericNamesSetter(expectedKeys, object) {
     assertEquals(expectedKeys, Object.keys(object));
     expectedKeys.forEach(function(key) {
@@ -445,12 +450,10 @@
     set 1.2(_) {; },
     set 1.30(_) {; }
   });
-};
+});
 
-numericSetters();
-numericSetters();
 
-function TestProxyWithDefinitionInObjectLiteral() {
+runLiteralsTest(function TestProxyWithDefinitionInObjectLiteral() {
   // Trap for set should not be used if the definition
   // happens in the object literal.
   var handler = {
@@ -467,11 +470,9 @@
 
   var l = new Proxy({[prop]: 'my value'}, handler);
   assertEquals('my value', l[prop]);
-};
-TestProxyWithDefinitionInObjectLiteral();
-TestProxyWithDefinitionInObjectLiteral();
+});
 
-(function TestLiteralWithNullProto() {
+runLiteralsTest(function TestLiteralWithNullProto() {
   // Assume dictionary usage for simple null prototype literal objects,
   // this is equivalent to Object.create(null). Note that on the first call
   // the literal boilerplate is initialized, and from then on we use a the
@@ -498,9 +499,9 @@
   testDictModeNullProtoLiteral(() => ({a:1, b:2, __proto__:null}));
   testDictModeNullProtoLiteral(() => ({["a"]: 1, __proto__: null}));
   testDictModeNullProtoLiteral(() => ({a: Object, __proto__: null}));
-})();
+});
 
-function testNestedNullProtoLiteral() {
+runLiteralsTest(function testNestedNullProtoLiteral() {
   let obj;
   obj = { foo: { __proto__:Math, bar:"barValue"}};
   assertTrue(%HasFastProperties(obj));
@@ -523,12 +524,10 @@
   assertEquals("barValue", obj.foo.bar);
   obj.foo.bar = "barValue2";
   assertEquals("barValue2", obj.foo.bar);
-}
-testNestedNullProtoLiteral();
-testNestedNullProtoLiteral();
+});
 
 
-function TestSlowLiteralOptimized() {
+runLiteralsTest(function TestSlowLiteralOptimized() {
   function f() {
     return {__proto__:null, bar:"barValue"};
   }
@@ -548,11 +547,9 @@
   assertEquals("barValue", obj.bar);
   obj.bar = "barValue2";
   assertEquals("barValue2", obj.bar);
-};
-TestSlowLiteralOptimized();
-TestSlowLiteralOptimized();
+});
 
-(function TestLargeDictionaryLiteral() {
+runLiteralsTest(function TestLargeDictionaryLiteral() {
   // Create potential large-space object literal.
   function createObject() {
     // This literal has least kMaxRegularHeapObjectSize / 64 number of
@@ -1568,27 +1565,4 @@
   assertFalse(%HasFastProperties(object2));
   assertEquals(Object.getPrototypeOf(object2), null);
   assertEquals(keys, Object.keys(object2));
-})();
-
-
-(function TestPrototypeInObjectLiteral() {
-  // The prototype chain should not be used if the definition
-  // happens in the object literal.
-
-  Object.defineProperty(Object.prototype, 'c', {
-    get: function () {
-      return 21;
-    },
-    set: function () {
-    }
-  });
-
-  var o = {};
-  o.c = 7;
-  assertEquals(21, o.c);
-
-  var l = {c: 7};
-  assertEquals(7, l.c);
-
-  delete Object.prototype.c;
-})();
+});
diff --git a/src/v8/test/mjsunit/optimized-array-every.js b/src/v8/test/mjsunit/optimized-array-every.js
new file mode 100644
index 0000000..0cbab7d
--- /dev/null
+++ b/src/v8/test/mjsunit/optimized-array-every.js
@@ -0,0 +1,520 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax --turbo-inline-array-builtins --opt
+// Flags: --no-always-opt
+
+// Early exit from every functions properly.
+(() => {
+  const a = [1, 2, 3, 4, 5];
+  let result = 0;
+  function earlyExit() {
+    return a.every(v => {
+      result += v;
+      return v < 2;
+    });
+  }
+  assertFalse(earlyExit());
+  earlyExit();
+  %OptimizeFunctionOnNextCall(earlyExit);
+  assertFalse(earlyExit());
+  assertEquals(9, result);
+})();
+
+// Soft-deopt plus early exit.
+(() => {
+  const a = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
+  let result = 0;
+  function softyPlusEarlyExit(deopt) {
+     return a.every(v => {
+       result += v;
+       if (v === 4 && deopt) {
+         a.abc = 25;
+       }
+       return v < 8;
+     });
+  }
+  assertFalse(softyPlusEarlyExit(false));
+  softyPlusEarlyExit(false);
+  %OptimizeFunctionOnNextCall(softyPlusEarlyExit);
+  assertFalse(softyPlusEarlyExit(true));
+  assertEquals(36*3, result);
+})();
+
+// Soft-deopt synced with early exit, which forces the lazy deoptimization
+// continuation handler to exit.
+(() => {
+  const a = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
+  let called_values = [];
+  function softyPlusEarlyExit(deopt) {
+     called_values = [];
+     return a.every(v => {
+       called_values.push(v);
+       if (v === 4 && deopt) {
+         a.abc = 25;
+         return false;
+       }
+       return v < 8;
+     });
+  }
+  assertFalse(softyPlusEarlyExit(false));
+  assertArrayEquals([1, 2, 3, 4, 5, 6, 7, 8], called_values);
+  softyPlusEarlyExit(false);
+  %OptimizeFunctionOnNextCall(softyPlusEarlyExit);
+  assertFalse(softyPlusEarlyExit(true));
+  assertArrayEquals([1, 2, 3, 4], called_values);
+})();
+
+// Unknown field access leads to soft-deopt unrelated to every, should still
+// lead to correct result.
+(() => {
+  const a = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
+             20, 21, 22, 23, 24, 25];
+  let result = 0;
+  function eagerDeoptInCalled(deopt) {
+    return a.every((v, i) => {
+      if (i === 13 && deopt) {
+        a.abc = 25;
+      }
+      result += v;
+      return true;
+    });
+  }
+  eagerDeoptInCalled();
+  eagerDeoptInCalled();
+  %OptimizeFunctionOnNextCall(eagerDeoptInCalled);
+  eagerDeoptInCalled();
+  assertTrue(eagerDeoptInCalled(true));
+  eagerDeoptInCalled();
+  assertEquals(1625, result);
+})();
+
+// Length change detected during loop, must cause properly handled eager deopt.
+(() => {
+  let called_values;
+  function eagerDeoptInCalled(deopt) {
+    const a = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
+    called_values = [];
+    return a.every((v,i) => {
+      called_values.push(v);
+      a.length = (i === 5 && deopt) ? 8 : 10;
+      return true;
+    });
+  }
+  assertTrue(eagerDeoptInCalled());
+  assertArrayEquals([1, 2, 3, 4, 5, 6, 7, 8, 9, 10], called_values);
+  eagerDeoptInCalled();
+  %OptimizeFunctionOnNextCall(eagerDeoptInCalled);
+  assertTrue(eagerDeoptInCalled());
+  assertTrue(eagerDeoptInCalled(true));
+  assertArrayEquals([1, 2, 3, 4, 5, 6, 7, 8], called_values);
+  eagerDeoptInCalled();
+})();
+
+// Lazy deopt from a callback that changes the input array. Deopt in a callback
+// execution that returns true.
+(() => {
+  const a = [1, 2, 3, 4, 5];
+  function lazyChanger(deopt) {
+    return a.every((v, i) => {
+      if (i === 3 && deopt) {
+        a[3] = 100;
+        %DeoptimizeNow();
+       }
+      return true;
+    });
+  }
+  assertTrue(lazyChanger());
+  lazyChanger();
+  %OptimizeFunctionOnNextCall(lazyChanger);
+  assertTrue(lazyChanger(true));
+  assertTrue(lazyChanger());
+})();
+
+// Lazy deopt from a callback that will always return true and no element is
+// found. Verifies the lazy-after-callback continuation builtin.
+(() => {
+  const a = [1, 2, 3, 4, 5];
+  function lazyChanger(deopt) {
+    return a.every((v, i) => {
+      if (i === 3 && deopt) {
+        %DeoptimizeNow();
+       }
+      return true;
+    });
+  }
+  assertTrue(lazyChanger());
+  lazyChanger();
+  %OptimizeFunctionOnNextCall(lazyChanger);
+  assertTrue(lazyChanger(true));
+  assertTrue(lazyChanger());
+})();
+
+// Lazy deopt from a callback that changes the input array. Deopt in a callback
+// execution that returns true.
+(() => {
+  const a = [1, 2, 3, 4, 5];
+  function lazyChanger(deopt) {
+    return a.every((v, i) => {
+      if (i === 2 && deopt) {
+        a[3] = 100;
+        %DeoptimizeNow();
+       }
+      return true;
+    });
+  }
+  assertTrue(lazyChanger());
+  lazyChanger();
+  %OptimizeFunctionOnNextCall(lazyChanger);
+  assertTrue(lazyChanger(true));
+  assertTrue(lazyChanger());
+})();
+
+// Escape analyzed array
+(() => {
+  let result = 0;
+  function eagerDeoptInCalled(deopt) {
+    const a_noescape = [0, 1, 2, 3, 4, 5];
+    a_noescape.every((v, i) => {
+      result += v | 0;
+      if (i === 13 && deopt) {
+        a_noescape.length = 25;
+      }
+      return true;
+    });
+  }
+  eagerDeoptInCalled();
+  eagerDeoptInCalled();
+  %OptimizeFunctionOnNextCall(eagerDeoptInCalled);
+  eagerDeoptInCalled();
+  eagerDeoptInCalled(true);
+  eagerDeoptInCalled();
+  assertEquals(75, result);
+})();
+
+// Lazy deopt from runtime call from inlined callback function.
+(() => {
+  const a = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
+             20, 21, 22, 23, 24, 25];
+  let result = 0;
+  function lazyDeopt(deopt) {
+    a.every((v, i) => {
+      result += i;
+      if (i === 13 && deopt) {
+        %DeoptimizeNow();
+      }
+      return true;
+    });
+  }
+  lazyDeopt();
+  lazyDeopt();
+  %OptimizeFunctionOnNextCall(lazyDeopt);
+  lazyDeopt();
+  lazyDeopt(true);
+  lazyDeopt();
+  assertEquals(1500, result);
+})();
+
+// Lazy deopt from runtime call from non-inline callback function.
+(() => {
+  const a = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
+             20, 21, 22, 23, 24, 25];
+  let result = 0;
+  function lazyDeopt(deopt) {
+    function callback(v, i) {
+      result += i;
+      if (i === 13 && deopt) {
+        %DeoptimizeNow();
+      }
+      return true;
+    }
+    %NeverOptimizeFunction(callback);
+    a.every(callback);
+  }
+  lazyDeopt();
+  lazyDeopt();
+  %OptimizeFunctionOnNextCall(lazyDeopt);
+  lazyDeopt();
+  lazyDeopt(true);
+  lazyDeopt();
+  assertEquals(1500, result);
+})();
+
+// Call to a.every is done inside a try-catch block and the callback function
+// being called actually throws.
+(() => {
+  const a = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
+             20, 21, 22, 23, 24, 25];
+  let caught = false;
+  function lazyDeopt(deopt) {
+    try {
+      a.every((v, i) => {
+        if (i === 1 && deopt) {
+          throw("a");
+        }
+        return true;
+      });
+    } catch (e) {
+      caught = true;
+    }
+  }
+  lazyDeopt();
+  lazyDeopt();
+  %OptimizeFunctionOnNextCall(lazyDeopt);
+  lazyDeopt();
+  assertDoesNotThrow(() => lazyDeopt(true));
+  assertTrue(caught);
+  lazyDeopt();
+})();
+
+// Call to a.every is done inside a try-catch block and the callback function
+// being called actually throws, but the callback is not inlined.
+(() => {
+  let a = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
+  let caught = false;
+  function lazyDeopt(deopt) {
+    function callback(v, i) {
+      if (i === 1 && deopt) {
+        throw("a");
+      }
+      return true;
+    }
+    %NeverOptimizeFunction(callback);
+    try {
+      a.every(callback);
+    } catch (e) {
+      caught = true;
+    }
+  }
+  lazyDeopt();
+  lazyDeopt();
+  %OptimizeFunctionOnNextCall(lazyDeopt);
+  lazyDeopt();
+  assertDoesNotThrow(() => lazyDeopt(true));
+  assertTrue(caught);
+  lazyDeopt();
+})();
+
+// Call to a.every is done inside a try-catch block and the callback function
+// being called throws into a deoptimized caller function.
+(function TestThrowIntoDeoptimizedOuter() {
+  const a = [1, 2, 3, 4];
+  function lazyDeopt(deopt) {
+    function callback(v, i) {
+      if (i === 1 && deopt) {
+        %DeoptimizeFunction(lazyDeopt);
+        throw "some exception";
+      }
+      return true;
+    }
+    %NeverOptimizeFunction(callback);
+    let result = 0;
+    try {
+      result = a.every(callback);
+    } catch (e) {
+      assertEquals("some exception", e);
+      result = "nope";
+    }
+    return result;
+  }
+  assertEquals(true, lazyDeopt(false));
+  assertEquals(true, lazyDeopt(false));
+  assertEquals("nope", lazyDeopt(true));
+  assertEquals("nope", lazyDeopt(true));
+  %OptimizeFunctionOnNextCall(lazyDeopt);
+  assertEquals(true, lazyDeopt(false));
+  assertEquals("nope", lazyDeopt(true));
+})();
+
+// An error generated inside the callback includes every in it's
+// stack trace.
+(() => {
+  const re = /Array\.every/;
+  function lazyDeopt(deopt) {
+    const b = [1, 2, 3];
+    let result = 0;
+    b.every((v, i) => {
+      result += v;
+      if (i === 1) {
+        const e = new Error();
+        assertTrue(re.exec(e.stack) !== null);
+      }
+      return true;
+    });
+  }
+  lazyDeopt();
+  lazyDeopt();
+  %OptimizeFunctionOnNextCall(lazyDeopt);
+  lazyDeopt();
+})();
+
+// An error generated inside a non-inlined callback function also
+// includes every in it's stack trace.
+(() => {
+  const re = /Array\.every/;
+  function lazyDeopt(deopt) {
+    const b = [1, 2, 3];
+    let did_assert_error = false;
+    let result = 0;
+    function callback(v, i) {
+      result += v;
+      if (i === 1) {
+        const e = new Error();
+        assertTrue(re.exec(e.stack) !== null);
+        did_assert_error = true;
+      }
+      return true;
+    }
+    %NeverOptimizeFunction(callback);
+    b.every(callback);
+    return did_assert_error;
+  }
+  lazyDeopt();
+  lazyDeopt();
+  %OptimizeFunctionOnNextCall(lazyDeopt);
+  assertTrue(lazyDeopt());
+})();
+
+// An error generated inside a recently deoptimized callback function
+// includes every in it's stack trace.
+(() => {
+  const re = /Array\.every/;
+  function lazyDeopt(deopt) {
+    const b = [1, 2, 3];
+    let did_assert_error = false;
+    let result = 0;
+    b.every((v, i) => {
+      result += v;
+      if (i === 1) {
+        %DeoptimizeNow();
+      } else if (i === 2) {
+        const e = new Error();
+        assertTrue(re.exec(e.stack) !== null);
+        did_assert_error = true;
+      }
+      return true;
+    });
+    return did_assert_error;
+  }
+  lazyDeopt();
+  lazyDeopt();
+  %OptimizeFunctionOnNextCall(lazyDeopt);
+  assertTrue(lazyDeopt());
+})();
+
+// Verify that various exception edges are handled appropriately.
+// The thrown Error object should always indicate it was created from
+// an every call stack.
+(() => {
+  const re = /Array\.every/;
+  const a = [1, 2, 3];
+  let result = 0;
+  function lazyDeopt() {
+    a.every((v, i) => {
+      result += i;
+      if (i === 1) {
+        %DeoptimizeFunction(lazyDeopt);
+        throw new Error();
+      }
+      return true;
+    });
+  }
+  assertThrows(() => lazyDeopt());
+  assertThrows(() => lazyDeopt());
+  try {
+    lazyDeopt();
+  } catch (e) {
+    assertTrue(re.exec(e.stack) !== null);
+  }
+  %OptimizeFunctionOnNextCall(lazyDeopt);
+  try {
+    lazyDeopt();
+  } catch (e) {
+    assertTrue(re.exec(e.stack) !== null);
+  }
+})();
+
+// Verify holes are skipped.
+(() => {
+  const a = [1, 2, , 3, 4];
+  function withHoles() {
+    const callback_values = [];
+    a.every(v => {
+      callback_values.push(v);
+      return true;
+    });
+    return callback_values;
+  }
+  withHoles();
+  withHoles();
+  %OptimizeFunctionOnNextCall(withHoles);
+  assertArrayEquals([1, 2, 3, 4], withHoles());
+})();
+
+(() => {
+  const a = [1.5, 2.5, , 3.5, 4.5];
+  function withHoles() {
+    const callback_values = [];
+    a.every(v => {
+      callback_values.push(v);
+      return true;
+    });
+    return callback_values;
+  }
+  withHoles();
+  withHoles();
+  %OptimizeFunctionOnNextCall(withHoles);
+  assertArrayEquals([1.5, 2.5, 3.5, 4.5], withHoles());
+})();
+
+// Ensure that we handle side-effects between load and call.
+(() => {
+  function side_effect(a, b) { if (b) a.foo = 3; return a; }
+  %NeverOptimizeFunction(side_effect);
+
+  function unreliable(a, b) {
+    return a.every(x => true, side_effect(a, b));
+  }
+
+  let a = [1, 2, 3];
+  unreliable(a, false);
+  unreliable(a, false);
+  %OptimizeFunctionOnNextCall(unreliable);
+  unreliable(a, false);
+  // Now actually do change the map.
+  unreliable(a, true);
+})();
+
+// Handle callback is not callable.
+(() => {
+  const a = [1, 2, 3, 4, 5];
+  function notCallable() {
+    return a.every(undefined);
+  }
+
+  assertThrows(notCallable, TypeError);
+  try { notCallable(); } catch(e) { }
+  %OptimizeFunctionOnNextCall(notCallable);
+  assertThrows(notCallable, TypeError);
+})();
+
+// Messing with the Array prototype causes deoptimization.
+(() => {
+  const a = [1, 2, 3];
+  let result = 0;
+  function prototypeChanged() {
+    a.every((v, i) => {
+      result += v;
+      return true;
+    });
+  }
+  prototypeChanged();
+  prototypeChanged();
+  %OptimizeFunctionOnNextCall(prototypeChanged);
+  prototypeChanged();
+  a.constructor = {};
+  prototypeChanged();
+  assertUnoptimized(prototypeChanged);
+  assertEquals(24, result);
+})();
diff --git a/src/v8/test/mjsunit/optimized-array-find.js b/src/v8/test/mjsunit/optimized-array-find.js
new file mode 100644
index 0000000..abcd2cf
--- /dev/null
+++ b/src/v8/test/mjsunit/optimized-array-find.js
@@ -0,0 +1,460 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax --turbo-inline-array-builtins --opt
+// Flags: --no-always-opt
+
+// Unknown field access leads to soft-deopt unrelated to find, should still
+// lead to correct result.
+(() => {
+  const a = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
+             20, 21, 22, 23, 24, 25];
+  let result = 0;
+  function eagerDeoptInCalled(deopt) {
+    return a.find((v, i) => {
+      if (i === 13 && deopt) {
+        a.abc = 25;
+      }
+      result += v;
+      return v === 20;
+    });
+  }
+  eagerDeoptInCalled();
+  eagerDeoptInCalled();
+  %OptimizeFunctionOnNextCall(eagerDeoptInCalled);
+  eagerDeoptInCalled();
+  assertEquals(20, eagerDeoptInCalled(true));
+  eagerDeoptInCalled();
+  assertEquals(1050, result);
+})();
+
+// Length change detected during loop, must cause properly handled eager deopt.
+(() => {
+  let called_values;
+  function eagerDeoptInCalled(deopt) {
+    const a = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
+    called_values = [];
+    return a.find((v,i) => {
+      called_values.push(v);
+      a.length = (i === 5 && deopt) ? 8 : 10;
+      return v === 9;
+    });
+  }
+  assertEquals(9, eagerDeoptInCalled());
+  assertArrayEquals([1, 2, 3, 4, 5, 6, 7, 8, 9], called_values);
+  eagerDeoptInCalled();
+  %OptimizeFunctionOnNextCall(eagerDeoptInCalled);
+  assertEquals(9, eagerDeoptInCalled());
+  assertEquals(undefined, eagerDeoptInCalled(true));
+  assertArrayEquals([1, 2, 3, 4, 5, 6, 7, 8, undefined, undefined],
+                    called_values);
+  eagerDeoptInCalled();
+})();
+
+// Lazy deopt from a callback that changes the input array. Deopt in a callback
+// execution that returns true.
+(() => {
+  const a = [1, 2, 3, 4, 5];
+  function lazyChanger(deopt) {
+    return a.find((v, i) => {
+      if (i === 3 && deopt) {
+        a[3] = 100;
+        %DeoptimizeNow();
+       }
+      return v > 3;
+    });
+  }
+  assertEquals(4, lazyChanger());
+  lazyChanger();
+  %OptimizeFunctionOnNextCall(lazyChanger);
+  assertEquals(4, lazyChanger(true));
+  assertEquals(100, lazyChanger());
+})();
+
+// Lazy deopt from a callback that will always return false and no element is
+// found. Verifies the lazy-after-callback continuation builtin.
+(() => {
+  const a = [1, 2, 3, 4, 5];
+  function lazyChanger(deopt) {
+    return a.find((v, i) => {
+      if (i === 3 && deopt) {
+        %DeoptimizeNow();
+       }
+      return false;
+    });
+  }
+  assertEquals(undefined, lazyChanger());
+  lazyChanger();
+  %OptimizeFunctionOnNextCall(lazyChanger);
+  assertEquals(undefined, lazyChanger(true));
+  assertEquals(undefined, lazyChanger());
+})();
+
+// Lazy deopt from a callback that changes the input array. Deopt in a callback
+// execution that returns false.
+(() => {
+  const a = [1, 2, 3, 4, 5];
+  function lazyChanger(deopt) {
+    return a.find((v, i) => {
+      if (i === 2 && deopt) {
+        a[3] = 100;
+        %DeoptimizeNow();
+       }
+      return v > 3;
+    });
+  }
+  assertEquals(4, lazyChanger());
+  lazyChanger();
+  %OptimizeFunctionOnNextCall(lazyChanger);
+  assertEquals(100, lazyChanger(true));
+  assertEquals(100, lazyChanger());
+})();
+
+// Escape analyzed array
+(() => {
+  let result = 0;
+  function eagerDeoptInCalled(deopt) {
+    const a_noescape = [0, 1, 2, 3, 4, 5];
+    a_noescape.find((v, i) => {
+      result += v | 0;
+      if (i === 13 && deopt) {
+        a_noescape.length = 25;
+      }
+      return false;
+    });
+  }
+  eagerDeoptInCalled();
+  eagerDeoptInCalled();
+  %OptimizeFunctionOnNextCall(eagerDeoptInCalled);
+  eagerDeoptInCalled();
+  eagerDeoptInCalled(true);
+  eagerDeoptInCalled();
+  assertEquals(75, result);
+})();
+
+// Lazy deopt from runtime call from inlined callback function.
+(() => {
+  const a = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
+             20, 21, 22, 23, 24, 25];
+  let result = 0;
+  function lazyDeopt(deopt) {
+    a.find((v, i) => {
+      result += i;
+      if (i === 13 && deopt) {
+        %DeoptimizeNow();
+      }
+      return false;
+    });
+  }
+  lazyDeopt();
+  lazyDeopt();
+  %OptimizeFunctionOnNextCall(lazyDeopt);
+  lazyDeopt();
+  lazyDeopt(true);
+  lazyDeopt();
+  assertEquals(1500, result);
+})();
+
+// Lazy deopt from runtime call from non-inline callback function.
+(() => {
+  const a = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
+             20, 21, 22, 23, 24, 25];
+  let result = 0;
+  function lazyDeopt(deopt) {
+    function callback(v, i) {
+      result += i;
+      if (i === 13 && deopt) {
+        %DeoptimizeNow();
+      }
+      return false;
+    }
+    %NeverOptimizeFunction(callback);
+    a.find(callback);
+  }
+  lazyDeopt();
+  lazyDeopt();
+  %OptimizeFunctionOnNextCall(lazyDeopt);
+  lazyDeopt();
+  lazyDeopt(true);
+  lazyDeopt();
+  assertEquals(1500, result);
+})();
+
+// Call to a.find is done inside a try-catch block and the callback function
+// being called actually throws.
+(() => {
+  const a = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
+             20, 21, 22, 23, 24, 25];
+  let caught = false;
+  function lazyDeopt(deopt) {
+    try {
+      a.find((v, i) => {
+        if (i === 1 && deopt) {
+          throw("a");
+        }
+        return false;
+      });
+    } catch (e) {
+      caught = true;
+    }
+  }
+  lazyDeopt();
+  lazyDeopt();
+  %OptimizeFunctionOnNextCall(lazyDeopt);
+  lazyDeopt();
+  assertDoesNotThrow(() => lazyDeopt(true));
+  assertTrue(caught);
+  lazyDeopt();
+})();
+
+// Call to a.find is done inside a try-catch block and the callback function
+// being called actually throws, but the callback is not inlined.
+(() => {
+  let a = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
+  let caught = false;
+  function lazyDeopt(deopt) {
+    function callback(v, i) {
+      if (i === 1 && deopt) {
+        throw("a");
+      }
+      return false;
+    }
+    %NeverOptimizeFunction(callback);
+    try {
+      a.find(callback);
+    } catch (e) {
+      caught = true;
+    }
+  }
+  lazyDeopt();
+  lazyDeopt();
+  %OptimizeFunctionOnNextCall(lazyDeopt);
+  lazyDeopt();
+  assertDoesNotThrow(() => lazyDeopt(true));
+  assertTrue(caught);
+  lazyDeopt();
+})();
+
+// Call to a.find is done inside a try-catch block and the callback function
+// being called throws into a deoptimized caller function.
+(function TestThrowIntoDeoptimizedOuter() {
+  const a = [1, 2, 3, 4];
+  function lazyDeopt(deopt) {
+    function callback(v, i) {
+      if (i === 1 && deopt) {
+        %DeoptimizeFunction(lazyDeopt);
+        throw "some exception";
+      }
+      return v === 3;
+    }
+    %NeverOptimizeFunction(callback);
+    let result = 0;
+    try {
+      result = a.find(callback);
+    } catch (e) {
+      assertEquals("some exception", e);
+      result = "nope";
+    }
+    return result;
+  }
+  assertEquals(3, lazyDeopt(false));
+  assertEquals(3, lazyDeopt(false));
+  assertEquals("nope", lazyDeopt(true));
+  assertEquals("nope", lazyDeopt(true));
+  %OptimizeFunctionOnNextCall(lazyDeopt);
+  assertEquals(3, lazyDeopt(false));
+  assertEquals("nope", lazyDeopt(true));
+})();
+
+// An error generated inside the callback includes find in it's
+// stack trace.
+(() => {
+  const re = /Array\.find/;
+  function lazyDeopt(deopt) {
+    const b = [1, 2, 3];
+    let result = 0;
+    b.find((v, i) => {
+      result += v;
+      if (i === 1) {
+        const e = new Error();
+        assertTrue(re.exec(e.stack) !== null);
+      }
+      return false;
+    });
+  }
+  lazyDeopt();
+  lazyDeopt();
+  %OptimizeFunctionOnNextCall(lazyDeopt);
+  lazyDeopt();
+})();
+
+// An error generated inside a non-inlined callback function also
+// includes find in it's stack trace.
+(() => {
+  const re = /Array\.find/;
+  function lazyDeopt(deopt) {
+    const b = [1, 2, 3];
+    let did_assert_error = false;
+    let result = 0;
+    function callback(v, i) {
+      result += v;
+      if (i === 1) {
+        const e = new Error();
+        assertTrue(re.exec(e.stack) !== null);
+        did_assert_error = true;
+      }
+      return false;
+    }
+    %NeverOptimizeFunction(callback);
+    b.find(callback);
+    return did_assert_error;
+  }
+  lazyDeopt();
+  lazyDeopt();
+  %OptimizeFunctionOnNextCall(lazyDeopt);
+  assertTrue(lazyDeopt());
+})();
+
+// An error generated inside a recently deoptimized callback function
+// includes find in it's stack trace.
+(() => {
+  const re = /Array\.find/;
+  function lazyDeopt(deopt) {
+    const b = [1, 2, 3];
+    let did_assert_error = false;
+    let result = 0;
+    b.find((v, i) => {
+      result += v;
+      if (i === 1) {
+        %DeoptimizeNow();
+      } else if (i === 2) {
+        const e = new Error();
+        assertTrue(re.exec(e.stack) !== null);
+        did_assert_error = true;
+      }
+      return false;
+    });
+    return did_assert_error;
+  }
+  lazyDeopt();
+  lazyDeopt();
+  %OptimizeFunctionOnNextCall(lazyDeopt);
+  assertTrue(lazyDeopt());
+})();
+
+// Verify that various exception edges are handled appropriately.
+// The thrown Error object should always indicate it was created from
+// a find call stack.
+(() => {
+  const re = /Array\.find/;
+  const a = [1, 2, 3];
+  let result = 0;
+  function lazyDeopt() {
+    a.find((v, i) => {
+      result += i;
+      if (i === 1) {
+        %DeoptimizeFunction(lazyDeopt);
+        throw new Error();
+      }
+      return false;
+    });
+  }
+  assertThrows(() => lazyDeopt());
+  assertThrows(() => lazyDeopt());
+  try {
+    lazyDeopt();
+  } catch (e) {
+    assertTrue(re.exec(e.stack) !== null);
+  }
+  %OptimizeFunctionOnNextCall(lazyDeopt);
+  try {
+    lazyDeopt();
+  } catch (e) {
+    assertTrue(re.exec(e.stack) !== null);
+  }
+})();
+
+// Messing with the Array prototype causes deoptimization.
+(() => {
+  const a = [1, 2, 3];
+  let result = 0;
+  function prototypeChanged() {
+    a.find((v, i) => {
+      result += v;
+      return false;
+    });
+  }
+  prototypeChanged();
+  prototypeChanged();
+  %OptimizeFunctionOnNextCall(prototypeChanged);
+  prototypeChanged();
+  a.constructor = {};
+  prototypeChanged();
+  assertUnoptimized(prototypeChanged);
+  assertEquals(24, result);
+})();
+
+// Verify holes are replaced with undefined.
+(() => {
+  const a = [1, 2, , 3, 4];
+  function withHoles() {
+    const callback_values = [];
+    a.find(v => {
+      callback_values.push(v);
+      return false;
+    });
+    return callback_values;
+  }
+  withHoles();
+  withHoles();
+  %OptimizeFunctionOnNextCall(withHoles);
+  assertArrayEquals([1, 2, undefined, 3, 4], withHoles());
+})();
+
+(() => {
+  const a = [1.5, 2.5, , 3.5, 4.5];
+  function withHoles() {
+    const callback_values = [];
+    a.find(v => {
+      callback_values.push(v);
+      return false;
+    });
+    return callback_values;
+  }
+  withHoles();
+  withHoles();
+  %OptimizeFunctionOnNextCall(withHoles);
+  assertArrayEquals([1.5, 2.5, undefined, 3.5, 4.5], withHoles());
+})();
+
+// Ensure that we handle side-effects between load and call.
+(() => {
+  function side_effect(a, b) { if (b) a.foo = 3; return a; }
+  %NeverOptimizeFunction(side_effect);
+
+  function unreliable(a, b) {
+    return a.find(x => false, side_effect(a, b));
+  }
+
+  let a = [1, 2, 3];
+  unreliable(a, false);
+  unreliable(a, false);
+  %OptimizeFunctionOnNextCall(unreliable);
+  unreliable(a, false);
+  // Now actually do change the map.
+  unreliable(a, true);
+})();
+
+// Handle callback is not callable.
+(() => {
+  const a = [1, 2, 3, 4, 5];
+  function notCallable() {
+    return a.find(undefined);
+  }
+
+  assertThrows(notCallable, TypeError);
+  try { notCallable(); } catch(e) { }
+  %OptimizeFunctionOnNextCall(notCallable);
+  assertThrows(notCallable, TypeError);
+})();
diff --git a/src/v8/test/mjsunit/optimized-array-findindex.js b/src/v8/test/mjsunit/optimized-array-findindex.js
new file mode 100644
index 0000000..91f4a6c
--- /dev/null
+++ b/src/v8/test/mjsunit/optimized-array-findindex.js
@@ -0,0 +1,460 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax --turbo-inline-array-builtins --opt
+// Flags: --no-always-opt
+
+// Unknown field access leads to soft-deopt unrelated to findIndex, should still
+// lead to correct result.
+(() => {
+  const a = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
+             20, 21, 22, 23, 24, 25];
+  let result = 0;
+  function eagerDeoptInCalled(deopt) {
+    return a.findIndex((v, i) => {
+      if (i === 13 && deopt) {
+        a.abc = 25;
+      }
+      result += v;
+      return v === 20;
+    });
+  }
+  eagerDeoptInCalled();
+  eagerDeoptInCalled();
+  %OptimizeFunctionOnNextCall(eagerDeoptInCalled);
+  eagerDeoptInCalled();
+  assertEquals(19, eagerDeoptInCalled(true));
+  eagerDeoptInCalled();
+  assertEquals(1050, result);
+})();
+
+// Length change detected during loop, must cause properly handled eager deopt.
+(() => {
+  let called_values;
+  function eagerDeoptInCalled(deopt) {
+    const a = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
+    called_values = [];
+    return a.findIndex((v,i) => {
+      called_values.push(v);
+      a.length = (i === 5 && deopt) ? 8 : 10;
+      return v === 9;
+    });
+  }
+  assertEquals(8, eagerDeoptInCalled());
+  assertArrayEquals([1, 2, 3, 4, 5, 6, 7, 8, 9], called_values);
+  eagerDeoptInCalled();
+  %OptimizeFunctionOnNextCall(eagerDeoptInCalled);
+  assertEquals(8, eagerDeoptInCalled());
+  assertEquals(-1, eagerDeoptInCalled(true));
+  assertArrayEquals([1, 2, 3, 4, 5, 6, 7, 8, undefined, undefined],
+                    called_values);
+  eagerDeoptInCalled();
+})();
+
+// Lazy deopt from a callback that changes the input array. Deopt in a callback
+// execution that returns true.
+(() => {
+  const a = [1, 2, 3, 4, 5];
+  function lazyChanger(deopt) {
+    return a.findIndex((v, i) => {
+      if (i === 3 && deopt) {
+        a[3] = 3;
+        %DeoptimizeNow();
+       }
+      return v > 3;
+    });
+  }
+  assertEquals(3, lazyChanger());
+  lazyChanger();
+  %OptimizeFunctionOnNextCall(lazyChanger);
+  assertEquals(3, lazyChanger(true));
+  assertEquals(4, lazyChanger());
+})();
+
+// Lazy deopt from a callback that will always return false and no element is
+// found. Verifies the lazy-after-callback continuation builtin.
+(() => {
+  const a = [1, 2, 3, 4, 5];
+  function lazyChanger(deopt) {
+    return a.findIndex((v, i) => {
+      if (i === 3 && deopt) {
+        %DeoptimizeNow();
+       }
+      return false;
+    });
+  }
+  assertEquals(-1, lazyChanger());
+  lazyChanger();
+  %OptimizeFunctionOnNextCall(lazyChanger);
+  assertEquals(-1, lazyChanger(true));
+  assertEquals(-1, lazyChanger());
+})();
+
+// Lazy deopt from a callback that changes the input array. Deopt in a callback
+// execution that returns false.
+(() => {
+  const a = [1, 2, 3, 4, 5];
+  function lazyChanger(deopt) {
+    return a.findIndex((v, i) => {
+      if (i === 2 && deopt) {
+        a[3] = 2;
+        %DeoptimizeNow();
+       }
+      return v > 3;
+    });
+  }
+  assertEquals(3, lazyChanger());
+  lazyChanger();
+  %OptimizeFunctionOnNextCall(lazyChanger);
+  assertEquals(4, lazyChanger(true));
+  assertEquals(4, lazyChanger());
+})();
+
+// Escape analyzed array
+(() => {
+  let result = 0;
+  function eagerDeoptInCalled(deopt) {
+    const a_noescape = [0, 1, 2, 3, 4, 5];
+    a_noescape.findIndex((v, i) => {
+      result += v | 0;
+      if (i === 13 && deopt) {
+        a_noescape.length = 25;
+      }
+      return false;
+    });
+  }
+  eagerDeoptInCalled();
+  eagerDeoptInCalled();
+  %OptimizeFunctionOnNextCall(eagerDeoptInCalled);
+  eagerDeoptInCalled();
+  eagerDeoptInCalled(true);
+  eagerDeoptInCalled();
+  assertEquals(75, result);
+})();
+
+// Lazy deopt from runtime call from inlined callback function.
+(() => {
+  const a = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
+             20, 21, 22, 23, 24, 25];
+  let result = 0;
+  function lazyDeopt(deopt) {
+    a.findIndex((v, i) => {
+      result += i;
+      if (i === 13 && deopt) {
+        %DeoptimizeNow();
+      }
+      return false;
+    });
+  }
+  lazyDeopt();
+  lazyDeopt();
+  %OptimizeFunctionOnNextCall(lazyDeopt);
+  lazyDeopt();
+  lazyDeopt(true);
+  lazyDeopt();
+  assertEquals(1500, result);
+})();
+
+// Lazy deopt from runtime call from non-inline callback function.
+(() => {
+  const a = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
+             20, 21, 22, 23, 24, 25];
+  let result = 0;
+  function lazyDeopt(deopt) {
+    function callback(v, i) {
+      result += i;
+      if (i === 13 && deopt) {
+        %DeoptimizeNow();
+      }
+      return false;
+    }
+    %NeverOptimizeFunction(callback);
+    a.findIndex(callback);
+  }
+  lazyDeopt();
+  lazyDeopt();
+  %OptimizeFunctionOnNextCall(lazyDeopt);
+  lazyDeopt();
+  lazyDeopt(true);
+  lazyDeopt();
+  assertEquals(1500, result);
+})();
+
+// Call to a.findIndex is done inside a try-catch block and the callback function
+// being called actually throws.
+(() => {
+  const a = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
+             20, 21, 22, 23, 24, 25];
+  let caught = false;
+  function lazyDeopt(deopt) {
+    try {
+      a.findIndex((v, i) => {
+        if (i === 1 && deopt) {
+          throw("a");
+        }
+        return false;
+      });
+    } catch (e) {
+      caught = true;
+    }
+  }
+  lazyDeopt();
+  lazyDeopt();
+  %OptimizeFunctionOnNextCall(lazyDeopt);
+  lazyDeopt();
+  assertDoesNotThrow(() => lazyDeopt(true));
+  assertTrue(caught);
+  lazyDeopt();
+})();
+
+// Call to a.findIndex is done inside a try-catch block and the callback function
+// being called actually throws, but the callback is not inlined.
+(() => {
+  let a = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
+  let caught = false;
+  function lazyDeopt(deopt) {
+    function callback(v, i) {
+      if (i === 1 && deopt) {
+        throw("a");
+      }
+      return false;
+    }
+    %NeverOptimizeFunction(callback);
+    try {
+      a.findIndex(callback);
+    } catch (e) {
+      caught = true;
+    }
+  }
+  lazyDeopt();
+  lazyDeopt();
+  %OptimizeFunctionOnNextCall(lazyDeopt);
+  lazyDeopt();
+  assertDoesNotThrow(() => lazyDeopt(true));
+  assertTrue(caught);
+  lazyDeopt();
+})();
+
+// Call to a.findIndex is done inside a try-catch block and the callback function
+// being called throws into a deoptimized caller function.
+(function TestThrowIntoDeoptimizedOuter() {
+  const a = [1, 2, 3, 4];
+  function lazyDeopt(deopt) {
+    function callback(v, i) {
+      if (i === 1 && deopt) {
+        %DeoptimizeFunction(lazyDeopt);
+        throw "some exception";
+      }
+      return v === 3;
+    }
+    %NeverOptimizeFunction(callback);
+    let result = 0;
+    try {
+      result = a.findIndex(callback);
+    } catch (e) {
+      assertEquals("some exception", e);
+      result = "nope";
+    }
+    return result;
+  }
+  assertEquals(2, lazyDeopt(false));
+  assertEquals(2, lazyDeopt(false));
+  assertEquals("nope", lazyDeopt(true));
+  assertEquals("nope", lazyDeopt(true));
+  %OptimizeFunctionOnNextCall(lazyDeopt);
+  assertEquals(2, lazyDeopt(false));
+  assertEquals("nope", lazyDeopt(true));
+})();
+
+// An error generated inside the callback includes findIndex in it's
+// stack trace.
+(() => {
+  const re = /Array\.findIndex/;
+  function lazyDeopt(deopt) {
+    const b = [1, 2, 3];
+    let result = 0;
+    b.findIndex((v, i) => {
+      result += v;
+      if (i === 1) {
+        const e = new Error();
+        assertTrue(re.exec(e.stack) !== null);
+      }
+      return false;
+    });
+  }
+  lazyDeopt();
+  lazyDeopt();
+  %OptimizeFunctionOnNextCall(lazyDeopt);
+  lazyDeopt();
+})();
+
+// An error generated inside a non-inlined callback function also
+// includes findIndex in it's stack trace.
+(() => {
+  const re = /Array\.findIndex/;
+  function lazyDeopt(deopt) {
+    const b = [1, 2, 3];
+    let did_assert_error = false;
+    let result = 0;
+    function callback(v, i) {
+      result += v;
+      if (i === 1) {
+        const e = new Error();
+        assertTrue(re.exec(e.stack) !== null);
+        did_assert_error = true;
+      }
+      return false;
+    }
+    %NeverOptimizeFunction(callback);
+    b.findIndex(callback);
+    return did_assert_error;
+  }
+  lazyDeopt();
+  lazyDeopt();
+  %OptimizeFunctionOnNextCall(lazyDeopt);
+  assertTrue(lazyDeopt());
+})();
+
+// An error generated inside a recently deoptimized callback function
+// includes findIndex in it's stack trace.
+(() => {
+  const re = /Array\.findIndex/;
+  function lazyDeopt(deopt) {
+    const b = [1, 2, 3];
+    let did_assert_error = false;
+    let result = 0;
+    b.findIndex((v, i) => {
+      result += v;
+      if (i === 1) {
+        %DeoptimizeNow();
+      } else if (i === 2) {
+        const e = new Error();
+        assertTrue(re.exec(e.stack) !== null);
+        did_assert_error = true;
+      }
+      return false;
+    });
+    return did_assert_error;
+  }
+  lazyDeopt();
+  lazyDeopt();
+  %OptimizeFunctionOnNextCall(lazyDeopt);
+  assertTrue(lazyDeopt());
+})();
+
+// Verify that various exception edges are handled appropriately.
+// The thrown Error object should always indicate it was created from
+// a findIndex call stack.
+(() => {
+  const re = /Array\.findIndex/;
+  const a = [1, 2, 3];
+  let result = 0;
+  function lazyDeopt() {
+    a.findIndex((v, i) => {
+      result += i;
+      if (i === 1) {
+        %DeoptimizeFunction(lazyDeopt);
+        throw new Error();
+      }
+      return false;
+    });
+  }
+  assertThrows(() => lazyDeopt());
+  assertThrows(() => lazyDeopt());
+  try {
+    lazyDeopt();
+  } catch (e) {
+    assertTrue(re.exec(e.stack) !== null);
+  }
+  %OptimizeFunctionOnNextCall(lazyDeopt);
+  try {
+    lazyDeopt();
+  } catch (e) {
+    assertTrue(re.exec(e.stack) !== null);
+  }
+})();
+
+// Messing with the Array prototype causes deoptimization.
+(() => {
+  const a = [1, 2, 3];
+  let result = 0;
+  function prototypeChanged() {
+    a.findIndex((v, i) => {
+      result += v;
+      return false;
+    });
+  }
+  prototypeChanged();
+  prototypeChanged();
+  %OptimizeFunctionOnNextCall(prototypeChanged);
+  prototypeChanged();
+  a.constructor = {};
+  prototypeChanged();
+  assertUnoptimized(prototypeChanged);
+  assertEquals(24, result);
+})();
+
+// Verify holes are replaced with undefined.
+(() => {
+  const a = [1, 2, , 3, 4];
+  function withHoles() {
+    const callback_values = [];
+    a.findIndex(v => {
+      callback_values.push(v);
+      return false;
+    });
+    return callback_values;
+  }
+  withHoles();
+  withHoles();
+  %OptimizeFunctionOnNextCall(withHoles);
+  assertArrayEquals([1, 2, undefined, 3, 4], withHoles());
+})();
+
+(() => {
+  const a = [1.5, 2.5, , 3.5, 4.5];
+  function withHoles() {
+    const callback_values = [];
+    a.findIndex(v => {
+      callback_values.push(v);
+      return false;
+    });
+    return callback_values;
+  }
+  withHoles();
+  withHoles();
+  %OptimizeFunctionOnNextCall(withHoles);
+  assertArrayEquals([1.5, 2.5, undefined, 3.5, 4.5], withHoles());
+})();
+
+// Ensure that we handle side-effects between load and call.
+(() => {
+  function side_effect(a, b) { if (b) a.foo = 3; return a; }
+  %NeverOptimizeFunction(side_effect);
+
+  function unreliable(a, b) {
+    return a.findIndex(x => false, side_effect(a, b));
+  }
+
+  let a = [1, 2, 3];
+  unreliable(a, false);
+  unreliable(a, false);
+  %OptimizeFunctionOnNextCall(unreliable);
+  unreliable(a, false);
+  // Now actually do change the map.
+  unreliable(a, true);
+})();
+
+// Handle callback is not callable.
+(() => {
+  const a = [1, 2, 3, 4, 5];
+  function notCallable() {
+    return a.findIndex(undefined);
+  }
+
+  assertThrows(notCallable, TypeError);
+  try { notCallable(); } catch(e) { }
+  %OptimizeFunctionOnNextCall(notCallable);
+  assertThrows(notCallable, TypeError);
+})();
diff --git a/src/v8/test/mjsunit/optimized-array-some.js b/src/v8/test/mjsunit/optimized-array-some.js
new file mode 100644
index 0000000..8d0114a
--- /dev/null
+++ b/src/v8/test/mjsunit/optimized-array-some.js
@@ -0,0 +1,502 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax --turbo-inline-array-builtins --opt
+// Flags: --no-always-opt
+
+// Early exit from some functions properly.
+(() => {
+  const a = [1, 2, 3, 4, 5];
+  let result = 0;
+  function earlyExit() {
+    return a.some(v => {
+      result += v;
+      return v > 2;
+    });
+  }
+  assertTrue(earlyExit());
+  earlyExit();
+  %OptimizeFunctionOnNextCall(earlyExit);
+  assertTrue(earlyExit());
+  assertEquals(18, result);
+})();
+
+// Soft-deopt plus early exit.
+(() => {
+  const a = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
+  let result = 0;
+  function softyPlusEarlyExit(deopt) {
+     return a.some(v => {
+       result += v;
+       if (v === 4 && deopt) {
+         a.abc = 25;
+       }
+       return v > 7;
+     });
+  }
+  assertTrue(softyPlusEarlyExit(false));
+  softyPlusEarlyExit(false);
+  %OptimizeFunctionOnNextCall(softyPlusEarlyExit);
+  assertTrue(softyPlusEarlyExit(true));
+  assertEquals(36*3, result);
+})();
+
+// Soft-deopt synced with early exit, which forces the lazy deoptimization
+// continuation handler to exit.
+(() => {
+  const a = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
+  let called_values = [];
+  function softyPlusEarlyExit(deopt) {
+     called_values = [];
+     return a.some(v => {
+       called_values.push(v);
+       if (v === 4 && deopt) {
+         a.abc = 25;
+         return true;
+       }
+       return v > 7;
+     });
+  }
+  assertTrue(softyPlusEarlyExit(false));
+  assertArrayEquals([1, 2, 3, 4, 5, 6, 7, 8], called_values);
+  softyPlusEarlyExit(false);
+  %OptimizeFunctionOnNextCall(softyPlusEarlyExit);
+  assertTrue(softyPlusEarlyExit(true));
+  assertArrayEquals([1, 2, 3, 4], called_values);
+})();
+
+// Unknown field access leads to soft-deopt unrelated to some, should still
+// lead to correct result.
+(() => {
+  const a = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
+             20, 21, 22, 23, 24, 25];
+  let result = 0;
+  function eagerDeoptInCalled(deopt) {
+    return a.some((v, i) => {
+      if (i === 13 && deopt) {
+        a.abc = 25;
+      }
+      result += v;
+      return false;
+    });
+  }
+  eagerDeoptInCalled();
+  eagerDeoptInCalled();
+  %OptimizeFunctionOnNextCall(eagerDeoptInCalled);
+  eagerDeoptInCalled();
+  assertFalse(eagerDeoptInCalled(true));
+  eagerDeoptInCalled();
+  assertEquals(1625, result);
+})();
+
+// Length change detected during loop, must cause properly handled eager deopt.
+(() => {
+  let called_values;
+  function eagerDeoptInCalled(deopt) {
+    const a = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
+    called_values = [];
+    return a.some((v,i) => {
+      called_values.push(v);
+      a.length = (i === 5 && deopt) ? 8 : 10;
+      return false;
+    });
+  }
+  assertFalse(eagerDeoptInCalled());
+  assertArrayEquals([1, 2, 3, 4, 5, 6, 7, 8, 9, 10], called_values);
+  eagerDeoptInCalled();
+  %OptimizeFunctionOnNextCall(eagerDeoptInCalled);
+  assertFalse(eagerDeoptInCalled());
+  assertFalse(eagerDeoptInCalled(true));
+  assertArrayEquals([1, 2, 3, 4, 5, 6, 7, 8], called_values);
+  eagerDeoptInCalled();
+})();
+
+// Lazy deopt from a callback that changes the input array. Deopt in a callback
+// execution that returns true.
+(() => {
+  const a = [1, 2, 3, 4, 5];
+  function lazyChanger(deopt) {
+    return a.some((v, i) => {
+      if (i === 3 && deopt) {
+        a[3] = 100;
+        %DeoptimizeNow();
+       }
+      return false;
+    });
+  }
+  assertFalse(lazyChanger());
+  lazyChanger();
+  %OptimizeFunctionOnNextCall(lazyChanger);
+  assertFalse(lazyChanger(true));
+  assertFalse(lazyChanger());
+})();
+
+// Lazy deopt from a callback that will always return false and no element is
+// found. Verifies the lazy-after-callback continuation builtin.
+(() => {
+  const a = [1, 2, 3, 4, 5];
+  function lazyChanger(deopt) {
+    return a.some((v, i) => {
+      if (i === 3 && deopt) {
+        %DeoptimizeNow();
+       }
+      return false;
+    });
+  }
+  assertFalse(lazyChanger());
+  lazyChanger();
+  %OptimizeFunctionOnNextCall(lazyChanger);
+  assertFalse(lazyChanger(true));
+  assertFalse(lazyChanger());
+})();
+
+// Lazy deopt from a callback that changes the input array. Deopt in a callback
+// execution that returns false.
+(() => {
+  const a = [1, 2, 3, 4, 5];
+  function lazyChanger(deopt) {
+    return a.every((v, i) => {
+      if (i === 2 && deopt) {
+        a[3] = 100;
+        %DeoptimizeNow();
+       }
+      return false;
+    });
+  }
+  assertFalse(lazyChanger());
+  lazyChanger();
+  %OptimizeFunctionOnNextCall(lazyChanger);
+  assertFalse(lazyChanger(true));
+  assertFalse(lazyChanger());
+})();
+
+// Escape analyzed array
+(() => {
+  let result = 0;
+  function eagerDeoptInCalled(deopt) {
+    const a_noescape = [0, 1, 2, 3, 4, 5];
+    a_noescape.some((v, i) => {
+      result += v | 0;
+      if (i === 13 && deopt) {
+        a_noescape.length = 25;
+      }
+      return false;
+    });
+  }
+  eagerDeoptInCalled();
+  eagerDeoptInCalled();
+  %OptimizeFunctionOnNextCall(eagerDeoptInCalled);
+  eagerDeoptInCalled();
+  eagerDeoptInCalled(true);
+  eagerDeoptInCalled();
+  assertEquals(75, result);
+})();
+
+// Lazy deopt from runtime call from inlined callback function.
+(() => {
+  const a = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
+             20, 21, 22, 23, 24, 25];
+  let result = 0;
+  function lazyDeopt(deopt) {
+    a.some((v, i) => {
+      result += i;
+      if (i === 13 && deopt) {
+        %DeoptimizeNow();
+      }
+      return false;
+    });
+  }
+  lazyDeopt();
+  lazyDeopt();
+  %OptimizeFunctionOnNextCall(lazyDeopt);
+  lazyDeopt();
+  lazyDeopt(true);
+  lazyDeopt();
+  assertEquals(1500, result);
+})();
+
+// Lazy deopt from runtime call from non-inline callback function.
+(() => {
+  const a = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
+             20, 21, 22, 23, 24, 25];
+  let result = 0;
+  function lazyDeopt(deopt) {
+    function callback(v, i) {
+      result += i;
+      if (i === 13 && deopt) {
+        %DeoptimizeNow();
+      }
+      return false;
+    }
+    %NeverOptimizeFunction(callback);
+    a.some(callback);
+  }
+  lazyDeopt();
+  lazyDeopt();
+  %OptimizeFunctionOnNextCall(lazyDeopt);
+  lazyDeopt();
+  lazyDeopt(true);
+  lazyDeopt();
+  assertEquals(1500, result);
+})();
+
+// Call to a.some is done inside a try-catch block and the callback function
+// being called actually throws.
+(() => {
+  const a = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
+             20, 21, 22, 23, 24, 25];
+  let caught = false;
+  function lazyDeopt(deopt) {
+    try {
+      a.some((v, i) => {
+        if (i === 1 && deopt) {
+          throw("a");
+        }
+        return false;
+      });
+    } catch (e) {
+      caught = true;
+    }
+  }
+  lazyDeopt();
+  lazyDeopt();
+  %OptimizeFunctionOnNextCall(lazyDeopt);
+  lazyDeopt();
+  assertDoesNotThrow(() => lazyDeopt(true));
+  assertTrue(caught);
+  lazyDeopt();
+})();
+
+// Call to a.some is done inside a try-catch block and the callback function
+// being called actually throws, but the callback is not inlined.
+(() => {
+  let a = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
+  let caught = false;
+  function lazyDeopt(deopt) {
+    function callback(v, i) {
+      if (i === 1 && deopt) {
+        throw("a");
+      }
+      return false;
+    }
+    %NeverOptimizeFunction(callback);
+    try {
+      a.some(callback);
+    } catch (e) {
+      caught = true;
+    }
+  }
+  lazyDeopt();
+  lazyDeopt();
+  %OptimizeFunctionOnNextCall(lazyDeopt);
+  lazyDeopt();
+  assertDoesNotThrow(() => lazyDeopt(true));
+  assertTrue(caught);
+  lazyDeopt();
+})();
+
+// Call to a.some is done inside a try-catch block and the callback function
+// being called throws into a deoptimized caller function.
+(function TestThrowIntoDeoptimizedOuter() {
+  const a = [1, 2, 3, 4];
+  function lazyDeopt(deopt) {
+    function callback(v, i) {
+      if (i === 1 && deopt) {
+        %DeoptimizeFunction(lazyDeopt);
+        throw "some exception";
+      }
+      return false;
+    }
+    %NeverOptimizeFunction(callback);
+    let result = 0;
+    try {
+      result = a.some(callback);
+    } catch (e) {
+      assertEquals("some exception", e);
+      result = "nope";
+    }
+    return result;
+  }
+  assertEquals(false, lazyDeopt(false));
+  assertEquals(false, lazyDeopt(false));
+  assertEquals("nope", lazyDeopt(true));
+  assertEquals("nope", lazyDeopt(true));
+  %OptimizeFunctionOnNextCall(lazyDeopt);
+  assertEquals(false, lazyDeopt(false));
+  assertEquals("nope", lazyDeopt(true));
+})();
+
+// An error generated inside the callback includes some in it's
+// stack trace.
+(() => {
+  const re = /Array\.some/;
+  function lazyDeopt(deopt) {
+    const b = [1, 2, 3];
+    let result = 0;
+    b.some((v, i) => {
+      result += v;
+      if (i === 1) {
+        const e = new Error();
+        assertTrue(re.exec(e.stack) !== null);
+      }
+      return false;
+    });
+  }
+  lazyDeopt();
+  lazyDeopt();
+  %OptimizeFunctionOnNextCall(lazyDeopt);
+  lazyDeopt();
+})();
+
+// An error generated inside a non-inlined callback function also
+// includes some in it's stack trace.
+(() => {
+  const re = /Array\.some/;
+  function lazyDeopt(deopt) {
+    const b = [1, 2, 3];
+    let did_assert_error = false;
+    let result = 0;
+    function callback(v, i) {
+      result += v;
+      if (i === 1) {
+        const e = new Error();
+        assertTrue(re.exec(e.stack) !== null);
+        did_assert_error = true;
+      }
+      return false;
+    }
+    %NeverOptimizeFunction(callback);
+    b.some(callback);
+    return did_assert_error;
+  }
+  lazyDeopt();
+  lazyDeopt();
+  %OptimizeFunctionOnNextCall(lazyDeopt);
+  assertTrue(lazyDeopt());
+})();
+
+// An error generated inside a recently deoptimized callback function
+// includes some in it's stack trace.
+(() => {
+  const re = /Array\.some/;
+  function lazyDeopt(deopt) {
+    const b = [1, 2, 3];
+    let did_assert_error = false;
+    let result = 0;
+    b.some((v, i) => {
+      result += v;
+      if (i === 1) {
+        %DeoptimizeNow();
+      } else if (i === 2) {
+        const e = new Error();
+        assertTrue(re.exec(e.stack) !== null);
+        did_assert_error = true;
+      }
+      return false;
+    });
+    return did_assert_error;
+  }
+  lazyDeopt();
+  lazyDeopt();
+  %OptimizeFunctionOnNextCall(lazyDeopt);
+  assertTrue(lazyDeopt());
+})();
+
+// Verify that various exception edges are handled appropriately.
+// The thrown Error object should always indicate it was created from
+// a some call stack.
+(() => {
+  const re = /Array\.some/;
+  const a = [1, 2, 3];
+  let result = 0;
+  function lazyDeopt() {
+    a.some((v, i) => {
+      result += i;
+      if (i === 1) {
+        %DeoptimizeFunction(lazyDeopt);
+        throw new Error();
+      }
+      return false;
+    });
+  }
+  assertThrows(() => lazyDeopt());
+  assertThrows(() => lazyDeopt());
+  try {
+    lazyDeopt();
+  } catch (e) {
+    assertTrue(re.exec(e.stack) !== null);
+  }
+  %OptimizeFunctionOnNextCall(lazyDeopt);
+  try {
+    lazyDeopt();
+  } catch (e) {
+    assertTrue(re.exec(e.stack) !== null);
+  }
+})();
+
+// Messing with the Array prototype causes deoptimization.
+(() => {
+  const a = [1, 2, 3];
+  let result = 0;
+  function prototypeChanged() {
+    a.some((v, i) => {
+      result += v;
+      return false;
+    });
+  }
+  prototypeChanged();
+  prototypeChanged();
+  %OptimizeFunctionOnNextCall(prototypeChanged);
+  prototypeChanged();
+  a.constructor = {};
+  prototypeChanged();
+  assertUnoptimized(prototypeChanged);
+  assertEquals(24, result);
+})();
+
+// Verify holes are skipped.
+(() => {
+  const a = [1, 2, , 3, 4];
+  function withHoles() {
+    const callback_values = [];
+    a.some(v => {
+      callback_values.push(v);
+      return false;
+    });
+    return callback_values;
+  }
+  withHoles();
+  withHoles();
+  %OptimizeFunctionOnNextCall(withHoles);
+  assertArrayEquals([1, 2, 3, 4], withHoles());
+})();
+
+(() => {
+  const a = [1.5, 2.5, , 3.5, 4.5];
+  function withHoles() {
+    const callback_values = [];
+    a.some(v => {
+      callback_values.push(v);
+      return false;
+    });
+    return callback_values;
+  }
+  withHoles();
+  withHoles();
+  %OptimizeFunctionOnNextCall(withHoles);
+  assertArrayEquals([1.5, 2.5, 3.5, 4.5], withHoles());
+})();
+
+// Handle callback is not callable.
+(() => {
+  const a = [1, 2, 3, 4, 5];
+  function notCallable() {
+    return a.some(undefined);
+  }
+
+  assertThrows(notCallable, TypeError);
+  try { notCallable(); } catch(e) { }
+  %OptimizeFunctionOnNextCall(notCallable);
+  assertThrows(notCallable, TypeError);
+})();
diff --git a/src/v8/test/mjsunit/optimized-filter.js b/src/v8/test/mjsunit/optimized-filter.js
new file mode 100644
index 0000000..3c7d827
--- /dev/null
+++ b/src/v8/test/mjsunit/optimized-filter.js
@@ -0,0 +1,493 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax --expose-gc --turbo-inline-array-builtins
+// Flags: --opt --no-always-opt
+
+// Unknown field access leads to soft-deopt unrelated to filter, should still
+// lead to correct result.
+(function() {
+  var a = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25];
+  var result = 0;
+  var eagerDeoptInCalled = function(deopt) {
+    var callback = function(v,i,o) {
+      if (i == 13 && deopt) {
+        a.abc = 25;
+      }
+
+      // Ensure that the output array is smaller by shaving off the first
+      // item.
+      if (i === 0) return false;
+      result += v;
+      return true;
+    }
+    return a.filter(callback);
+  }
+  eagerDeoptInCalled();
+  eagerDeoptInCalled();
+  %OptimizeFunctionOnNextCall(eagerDeoptInCalled);
+  eagerDeoptInCalled();
+  var deopt_result = eagerDeoptInCalled(true);
+  assertEquals(a.slice(1), deopt_result);
+  eagerDeoptInCalled();
+  assertEquals(1620, result);
+})();
+
+// Length change detected during loop, must cause properly handled eager deopt.
+(function() {
+  var eagerDeoptInCalled = function(deopt) {
+    var a = [1,2,3,4,5,6,7,8,9,10];
+    var callback = function(v,i,o) {
+      a.length = (i == 5 && deopt) ? 8 : 10;
+      return i == 0 ? false : true;
+    }
+    return a.filter(callback);
+  }
+  var like_a = [1,2,3,4,5,6,7,8,9,10];
+  assertEquals(like_a.slice(1), eagerDeoptInCalled());
+  eagerDeoptInCalled();
+  %OptimizeFunctionOnNextCall(eagerDeoptInCalled);
+  assertEquals(like_a.slice(1), eagerDeoptInCalled());
+  assertEquals(like_a.slice(1).slice(0, 7), eagerDeoptInCalled(true));
+  eagerDeoptInCalled();
+})();
+
+// Lazy deopt from a callback that changes the input array. Ensure that
+// the value stored in the output array is from the original read.
+(function() {
+  var a = [1, 2, 3, 4, 5];
+  var lazyChanger = function(deopt) {
+    var callback = function(v,i,o) {
+      if (i === 2 && deopt) {
+        a[2] = 100;
+        %DeoptimizeNow();
+       }
+      return true;
+    }
+    return a.filter(callback);
+  }
+  assertEquals(a, lazyChanger());
+  lazyChanger();
+  %OptimizeFunctionOnNextCall(lazyChanger);
+  var deopt_result = lazyChanger(true);
+  assertEquals([1, 2, 3, 4, 5], deopt_result);
+  assertEquals([1, 2, 100, 4, 5], lazyChanger());
+})();
+
+// Lazy deopt from a callback that returns false at the deopt point.
+// Ensure the non-selection is respected in the output array.
+(function() {
+  var a = [1, 2, 3, 4, 5];
+  var lazyDeselection = function(deopt) {
+    var callback = function(v,i,o) {
+      if (i === 2 && deopt) {
+        %DeoptimizeNow();
+        return false;
+       }
+      return true;
+    }
+    return a.filter(callback);
+  }
+  assertEquals(a, lazyDeselection());
+  lazyDeselection();
+  %OptimizeFunctionOnNextCall(lazyDeselection);
+  var deopt_result = lazyDeselection(true);
+  assertEquals([1, 2, 4, 5], deopt_result);
+  assertEquals([1, 2, 3, 4, 5], lazyDeselection());
+})();
+
+
+// Escape analyzed array
+(function() {
+  var result = 0;
+  var eagerDeoptInCalled = function(deopt) {
+    var a_noescape = [0,1,2,3,4,5];
+    var callback = function(v,i,o) {
+      result += v;
+      if (i == 13 && deopt) {
+        a_noescape.length = 25;
+      }
+      return true;
+    }
+    a_noescape.filter(callback);
+  }
+  eagerDeoptInCalled();
+  eagerDeoptInCalled();
+  %OptimizeFunctionOnNextCall(eagerDeoptInCalled);
+  eagerDeoptInCalled();
+  eagerDeoptInCalled(true);
+  eagerDeoptInCalled();
+  assertEquals(75, result);
+})();
+
+// Escape analyzed array where callback function isn't inlined, forcing a lazy
+// deopt with GC that relies on the stashed-away return result fro the lazy
+// deopt being properly stored in a place on the stack that gets GC'ed.
+(function() {
+  var result = 0;
+  var lazyDeopt = function(deopt) {
+    var b = [1,2,3];
+    var callback = function(v,i,o) {
+      result += i;
+      if (i == 1 && deopt) {
+        %DeoptimizeFunction(lazyDeopt);
+      }
+      gc(); gc();
+      return true;
+    };
+    %NeverOptimizeFunction(callback);
+    b.filter(callback);
+  }
+  lazyDeopt();
+  lazyDeopt();
+  %OptimizeFunctionOnNextCall(lazyDeopt);
+  lazyDeopt();
+  lazyDeopt(true);
+  lazyDeopt();
+})();
+
+// Lazy deopt from runtime call from inlined callback function.
+(function() {
+  var a = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25];
+  var result = 0;
+  var lazyDeopt = function(deopt) {
+    var callback = function(v,i,o) {
+      result += i;
+      if (i == 13 && deopt) {
+          %DeoptimizeNow();
+      }
+      return true;
+    }
+    a.filter(callback);
+  }
+  lazyDeopt();
+  lazyDeopt();
+  %OptimizeFunctionOnNextCall(lazyDeopt);
+  lazyDeopt();
+  lazyDeopt(true);
+  lazyDeopt();
+  assertEquals(1500, result);
+})();
+
+// Lazy deopt from runtime call from non-inline callback function.
+(function() {
+  var a = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25];
+  var result = 0;
+  var lazyDeopt = function(deopt) {
+    var callback = function(v,i,o) {
+      result += i;
+      if (i == 13 && deopt) {
+          %DeoptimizeNow();
+      }
+      return true;
+    };
+    %NeverOptimizeFunction(callback);
+    a.filter(callback);
+  }
+  lazyDeopt();
+  lazyDeopt();
+  %OptimizeFunctionOnNextCall(lazyDeopt);
+  lazyDeopt();
+  lazyDeopt(true);
+  lazyDeopt();
+  assertEquals(1500, result);
+})();
+
+(function() {
+  var a = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25];
+  var result = 0;
+  var lazyDeopt = function(deopt) {
+    var callback = function(v,i,o) {
+      result += i;
+      if (i == 13 && deopt) {
+          %DeoptimizeNow();
+          gc();
+          gc();
+          gc();
+      }
+      return true;
+    }
+    a.filter(callback);
+  }
+  lazyDeopt();
+  lazyDeopt();
+  %OptimizeFunctionOnNextCall(lazyDeopt);
+  lazyDeopt();
+  lazyDeopt(true);
+  lazyDeopt();
+  assertEquals(1500, result);
+})();
+
+// Call to a.filter is done inside a try-catch block and the callback function
+// being called actually throws.
+(function() {
+  var a = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25];
+  var caught = false;
+  var result = 0;
+  var lazyDeopt = function(deopt) {
+    var callback = function(v,i,o) {
+      result += i;
+      if (i == 1 && deopt) {
+        throw("a");
+      }
+      return true;
+    }
+    try {
+      a.filter(callback);
+    } catch (e) {
+      caught = true;
+    }
+  }
+  lazyDeopt();
+  lazyDeopt();
+  %OptimizeFunctionOnNextCall(lazyDeopt);
+  lazyDeopt();
+  assertDoesNotThrow(() => lazyDeopt(true));
+  assertTrue(caught);
+  lazyDeopt();
+})();
+
+// Call to a.filter is done inside a try-catch block and the callback function
+// being called actually throws, but the callback is not inlined.
+(function() {
+  var a = [1,2,3,4,5,6,7,8,9,10];
+  var caught = false;
+  var result = 0;
+  var lazyDeopt = function(deopt) {
+    var callback = function(v,i,o) {
+      result += i;
+      if (i == 1 && deopt) {
+        throw("a");
+      }
+      return true;
+    };
+    %NeverOptimizeFunction(callback);
+    try {
+      a.filter(callback);
+    } catch (e) {
+      caught = true;
+    }
+  }
+  lazyDeopt();
+  lazyDeopt();
+  %OptimizeFunctionOnNextCall(lazyDeopt);
+  lazyDeopt();
+  assertDoesNotThrow(() => lazyDeopt(true));
+  assertTrue(caught);
+  lazyDeopt();
+})();
+
+// Call to a.filter is done inside a try-catch block and the callback function
+// being called throws into a deoptimized caller function.
+(function TestThrowIntoDeoptimizedOuter() {
+  var a = [1,2,3,4];
+  var lazyDeopt = function(deopt) {
+    var callback = function(v,i,o) {
+      if (i == 1 && deopt) {
+        %DeoptimizeFunction(lazyDeopt);
+        throw "some exception";
+      }
+      return true;
+    };
+    %NeverOptimizeFunction(callback);
+    var result = 0;
+    try {
+      result = a.filter(callback);
+    } catch (e) {
+      assertEquals("some exception", e)
+      result = "nope";
+    }
+    return result;
+  }
+  assertEquals([1,2,3,4], lazyDeopt(false));
+  assertEquals([1,2,3,4], lazyDeopt(false));
+  assertEquals("nope", lazyDeopt(true));
+  assertEquals("nope", lazyDeopt(true));
+  %OptimizeFunctionOnNextCall(lazyDeopt);
+  assertEquals([1,2,3,4], lazyDeopt(false));
+  assertEquals("nope", lazyDeopt(true));
+})();
+
+// An error generated inside the callback includes filter in it's
+// stack trace.
+(function() {
+  var re = /Array\.filter/;
+  var lazyDeopt = function(deopt) {
+    var b = [1,2,3];
+    var result = 0;
+    var callback = function(v,i,o) {
+      result += v;
+      if (i == 1) {
+        var e = new Error();
+        assertTrue(re.exec(e.stack) !== null);
+      }
+      return true;
+    };
+    var o = [1,2,3];
+    b.filter(callback);
+  }
+  lazyDeopt();
+  lazyDeopt();
+  %OptimizeFunctionOnNextCall(lazyDeopt);
+  lazyDeopt();
+})();
+
+// An error generated inside a non-inlined callback function also
+// includes filter in it's stack trace.
+(function() {
+  var re = /Array\.filter/;
+  var lazyDeopt = function(deopt) {
+    var b = [1,2,3];
+    var result = 0;
+    var callback = function(v,i,o) {
+      result += v;
+      if (i == 1) {
+        var e = new Error();
+        assertTrue(re.exec(e.stack) !== null);
+      }
+      return true;
+    };
+    %NeverOptimizeFunction(callback);
+    var o = [1,2,3];
+    b.filter(callback);
+  }
+  lazyDeopt();
+  lazyDeopt();
+  %OptimizeFunctionOnNextCall(lazyDeopt);
+  lazyDeopt();
+})();
+
+// An error generated inside a recently deoptimized callback function
+// includes filter in it's stack trace.
+(function() {
+  var re = /Array\.filter/;
+  var lazyDeopt = function(deopt) {
+    var b = [1,2,3];
+    var result = 0;
+    var callback = function(v,i,o) {
+      result += v;
+      if (i == 1) {
+        %DeoptimizeNow();
+      } else if (i == 2) {
+        var e = new Error();
+        assertTrue(re.exec(e.stack) !== null);
+      }
+      return true;
+    };
+    var o = [1,2,3];
+    b.filter(callback);
+  }
+  lazyDeopt();
+  lazyDeopt();
+  %OptimizeFunctionOnNextCall(lazyDeopt);
+  lazyDeopt();
+})();
+
+// Verify that various exception edges are handled appropriately.
+// The thrown Error object should always indicate it was created from
+// a filter call stack.
+(function() {
+  var re = /Array\.filter/;
+  var a = [1,2,3];
+  var result = 0;
+  var lazyDeopt = function() {
+    var callback = function(v,i,o) {
+      result += i;
+      if (i == 1) {
+        %DeoptimizeFunction(lazyDeopt);
+        throw new Error();
+      }
+      return true;
+    };
+    a.filter(callback);
+  }
+  assertThrows(() => lazyDeopt());
+  assertThrows(() => lazyDeopt());
+  try {
+    lazyDeopt();
+  } catch (e) {
+    assertTrue(re.exec(e.stack) !== null);
+  }
+  %OptimizeFunctionOnNextCall(lazyDeopt);
+  try {
+    lazyDeopt();
+  } catch (e) {
+    assertTrue(re.exec(e.stack) !== null);
+  }
+})();
+
+// Verify holes are skipped.
+(() => {
+  const a = [1, 2, , 3, 4];
+  let callback_values = [];
+  function withHoles() {
+    callback_values = [];
+    return a.filter(v => {
+      callback_values.push(v);
+      return true;
+    });
+  }
+  withHoles();
+  withHoles();
+  %OptimizeFunctionOnNextCall(withHoles);
+  assertArrayEquals([1, 2, 3, 4], withHoles());
+  assertArrayEquals([1, 2, 3, 4], callback_values);
+})();
+
+(() => {
+  const a = [1.5, 2.5, , 3.5, 4.5];
+  let callback_values = [];
+  function withHoles() {
+    callback_values = [];
+    return a.filter(v => {
+      callback_values.push(v);
+      return true;
+    });
+  }
+  withHoles();
+  withHoles();
+  %OptimizeFunctionOnNextCall(withHoles);
+  assertArrayEquals([1.5, 2.5, 3.5, 4.5], withHoles());
+  assertArrayEquals([1.5, 2.5, 3.5, 4.5], callback_values);
+})();
+
+// Ensure that we handle side-effects between load and call.
+(() => {
+  function side_effect(a, b) { if (b) a.foo = 3; return a; }
+  %NeverOptimizeFunction(side_effect);
+
+  function unreliable(a, b) {
+    return a.filter(x => x % 2 === 0, side_effect(a, b));
+  }
+
+  let a = [1, 2, 3];
+  unreliable(a, false);
+  unreliable(a, false);
+  %OptimizeFunctionOnNextCall(unreliable);
+  unreliable(a, false);
+  // Now actually do change the map.
+  unreliable(a, true);
+})();
+
+// Messing with the Array species constructor causes deoptimization.
+(function() {
+  var result = 0;
+  var a = [1,2,3];
+  var species_breakage = function() {
+    var callback = function(v,i,o) {
+      result += v;
+      return true;
+    }
+    a.filter(callback);
+  }
+  species_breakage();
+  species_breakage();
+  %OptimizeFunctionOnNextCall(species_breakage);
+  species_breakage();
+  a.constructor = {};
+  a.constructor[Symbol.species] = function() {};
+  species_breakage();
+  assertUnoptimized(species_breakage);
+  assertEquals(24, result);
+})();
diff --git a/src/v8/test/mjsunit/optimized-foreach-polymorph.js b/src/v8/test/mjsunit/optimized-foreach-polymorph.js
new file mode 100644
index 0000000..ed49583
--- /dev/null
+++ b/src/v8/test/mjsunit/optimized-foreach-polymorph.js
@@ -0,0 +1,111 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax --expose-gc --turbo-inline-array-builtins
+
+var a = [0, 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,0,0];
+var b = [{}, {}];
+var c = [,,,,,2,3,4];
+var d = [0.5,3,4];
+var e = [,,,,0.5,3,4];
+
+// Make sure that calls to forEach handle a certain degree of polymorphism (no
+// hole check)
+(function() {
+  var result = 0;
+  var polymorph1 = function(arg) {
+    var sum = function(v,i,o) {
+      result += i;
+    }
+    arg.forEach(sum);
+  }
+  polymorph1(a);
+  polymorph1(a);
+  polymorph1(b);
+  polymorph1(a);
+  polymorph1(a);
+  %OptimizeFunctionOnNextCall(polymorph1);
+  polymorph1(a);
+  polymorph1(b);
+  assertEquals(1757, result);
+})();
+
+// Make sure that calls to forEach handle a certain degree of polymorphism.
+(function() {
+  var result = 0;
+  var polymorph1 = function(arg) {
+    var sum = function(v,i,o) {
+      result += i;
+    }
+    arg.forEach(sum);
+  }
+  polymorph1(a);
+  polymorph1(a);
+  polymorph1(b);
+  polymorph1(a);
+  polymorph1(c);
+  polymorph1(a);
+  %OptimizeFunctionOnNextCall(polymorph1);
+  polymorph1(a);
+  polymorph1(b);
+  assertEquals(1775, result);
+})();
+
+// Make sure that calls to forEach with mixed object/double arrays don't inline
+// forEach.
+(function() {
+  var result = 0;
+  var polymorph1 = function(arg) {
+    var sum = function(v,i,o) {
+      result += i;
+    }
+    arg.forEach(sum);
+  }
+  polymorph1(a);
+  polymorph1(a);
+  polymorph1(b);
+  polymorph1(a);
+  polymorph1(d);
+  polymorph1(a);
+  %OptimizeFunctionOnNextCall(polymorph1);
+  polymorph1(a);
+  polymorph1(b);
+  assertEquals(1760, result);
+})();
+
+// Make sure that calls to forEach with double arrays get the right result
+(function() {
+  var result = 0;
+  var polymorph1 = function(arg) {
+    var sum = function(v,i,o) {
+      result += v;
+    }
+    arg.forEach(sum);
+  }
+  polymorph1(d);
+  polymorph1(d);
+  polymorph1(d);
+  %OptimizeFunctionOnNextCall(polymorph1);
+  polymorph1(d);
+  polymorph1(d);
+  assertEquals(37.5, result);
+})();
+
+// Make sure that calls to forEach with mixed double arrays get the right result
+(function() {
+  var result = 0;
+  var polymorph1 = function(arg) {
+    var sum = function(v,i,o) {
+      result += v;
+    }
+    arg.forEach(sum);
+  }
+  polymorph1(d);
+  polymorph1(e);
+  polymorph1(d);
+  %OptimizeFunctionOnNextCall(polymorph1);
+  polymorph1(d);
+  polymorph1(e);
+  assertEquals(37.5, result);
+})();
diff --git a/src/v8/test/mjsunit/optimized-foreach.js b/src/v8/test/mjsunit/optimized-foreach.js
index f3513f3..1fe54b5 100644
--- a/src/v8/test/mjsunit/optimized-foreach.js
+++ b/src/v8/test/mjsunit/optimized-foreach.js
@@ -343,3 +343,53 @@
     assertTrue(re.exec(e.stack) !== null);
   }
 })();
+
+// Verify holes are skipped.
+(() => {
+  const a = [1, 2, , 3, 4];
+  function withHoles() {
+    const callback_values = [];
+    a.forEach(v => {
+      callback_values.push(v);
+    });
+    return callback_values;
+  }
+  withHoles();
+  withHoles();
+  %OptimizeFunctionOnNextCall(withHoles);
+  assertArrayEquals([1, 2, 3, 4], withHoles());
+})();
+
+(() => {
+  const a = [1.5, 2.5, , 3.5, 4.5];
+  function withHoles() {
+    const callback_values = [];
+    a.forEach(v => {
+      callback_values.push(v);
+    });
+    return callback_values;
+  }
+  withHoles();
+  withHoles();
+  %OptimizeFunctionOnNextCall(withHoles);
+  assertArrayEquals([1.5, 2.5, 3.5, 4.5], withHoles());
+})();
+
+// Ensure that we handle side-effects between load and call.
+(() => {
+  function side_effect(a, b) { if (b) a.foo = 3; return a; }
+  %NeverOptimizeFunction(side_effect);
+
+  function unreliable(a, b) {
+    let sum = 0;
+    return a.forEach(x => sum += x, side_effect(a, b));
+  }
+
+  let a = [1, 2, 3];
+  unreliable(a, false);
+  unreliable(a, false);
+  %OptimizeFunctionOnNextCall(unreliable);
+  unreliable(a, false);
+  // Now actually do change the map.
+  unreliable(a, true);
+})();
diff --git a/src/v8/test/mjsunit/optimized-map.js b/src/v8/test/mjsunit/optimized-map.js
index 55a87bb..6a3df4d 100644
--- a/src/v8/test/mjsunit/optimized-map.js
+++ b/src/v8/test/mjsunit/optimized-map.js
@@ -101,6 +101,27 @@
   lazyDeopt();
 })();
 
+// Escape analyzed array where callback function isn't inlined, forcing a lazy
+// deopt. Check that the result of the callback function is passed correctly
+// to the lazy deopt and that the final result of map is as expected.
+(function() {
+  var lazyDeopt = function(deopt) {
+    var b = [1,2,3];
+    var callback = function(v,i,o) {
+      if (i == 1 && deopt) {
+        %DeoptimizeFunction(lazyDeopt);
+      }
+      return 2 * v;
+    };
+    %NeverOptimizeFunction(callback);
+    return b.map(callback);
+  }
+  assertEquals([2,4,6], lazyDeopt());
+  assertEquals([2,4,6], lazyDeopt());
+  %OptimizeFunctionOnNextCall(lazyDeopt);
+  assertEquals([2,4,6], lazyDeopt(true));
+})();
+
 // Lazy deopt from runtime call from inlined callback function.
 (function() {
   var result = 0;
@@ -415,6 +436,91 @@
   assertOptimized(to_fast);
 })();
 
+// TurboFan specializes on number results, ensure the code path is
+// tested.
+(function() {
+  var a = [1, 2, 3];
+  function double_results() {
+    // TurboFan recognizes the result is a double.
+    var callback = v => v + 0.5;
+    return a.map(callback);
+  }
+  double_results();
+  double_results();
+  %OptimizeFunctionOnNextCall(double_results);
+  double_results();
+  assertEquals(1.5, double_results()[0]);
+})();
+
+// TurboFan specializes on non-number results, ensure the code path is
+// tested.
+(function() {
+  var a = [1, 2, 3];
+  function string_results() {
+    // TurboFan recognizes the result is a string.
+    var callback = v => "hello" + v.toString();
+    return a.map(callback);
+  }
+  string_results();
+  string_results();
+  %OptimizeFunctionOnNextCall(string_results);
+  string_results();
+  assertEquals("hello1", string_results()[0]);
+})();
+
+// Verify holes are not visited.
+(() => {
+  const a = [1, 2, , 3, 4];
+  let callback_values = [];
+  function withHoles() {
+    callback_values = [];
+    return a.map(v => {
+      callback_values.push(v);
+      return v;
+    });
+  }
+  withHoles();
+  withHoles();
+  %OptimizeFunctionOnNextCall(withHoles);
+  assertArrayEquals([1, 2, , 3, 4], withHoles());
+  assertArrayEquals([1, 2, 3, 4], callback_values);
+})();
+
+(() => {
+  const a = [1.5, 2.5, , 3.5, 4.5];
+  let callback_values = [];
+  function withHoles() {
+    callback_values = [];
+    return a.map(v => {
+      callback_values.push(v);
+      return v;
+    });
+  }
+  withHoles();
+  withHoles();
+  %OptimizeFunctionOnNextCall(withHoles);
+  assertArrayEquals([1.5, 2.5, , 3.5, 4.5], withHoles());
+  assertArrayEquals([1.5, 2.5, 3.5, 4.5], callback_values);
+})();
+
+// Ensure that we handle side-effects between load and call.
+(() => {
+  function side_effect(a, b) { if (b) a.foo = 3; return a; }
+  %NeverOptimizeFunction(side_effect);
+
+  function unreliable(a, b) {
+    return a.map(x => x * 2, side_effect(a, b));
+  }
+
+  let a = [1, 2, 3];
+  unreliable(a, false);
+  unreliable(a, false);
+  %OptimizeFunctionOnNextCall(unreliable);
+  unreliable(a, false);
+  // Now actually do change the map.
+  unreliable(a, true);
+})();
+
 // Messing with the Array species constructor causes deoptimization.
 (function() {
   var result = 0;
@@ -436,3 +542,11 @@
   assertUnoptimized(species_breakage);
   assertEquals(24, result);
 })();
+
+/////////////////////////////////////////////////////////////////////////
+//
+// Any tests added below species_breakage won't test optimized map calls
+// because the array species constructor change disables inlining of
+// Array.prototype.map across the isolate.
+//
+/////////////////////////////////////////////////////////////////////////
diff --git a/src/v8/test/mjsunit/regexp-modifiers-autogenerated-i18n.js b/src/v8/test/mjsunit/regexp-modifiers-autogenerated-i18n.js
new file mode 100644
index 0000000..18e086c
--- /dev/null
+++ b/src/v8/test/mjsunit/regexp-modifiers-autogenerated-i18n.js
@@ -0,0 +1,81 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --regexp-mode-modifiers --harmony-regexp-property
+
+// These regexps are just grepped out of the other tests we already have
+// and the syntax changed from out-of-line i flag to inline i flag.
+
+// These tests won't all run on the noi18n build of V8.
+
+assertTrue(/(?i)\u00e5/u.test("\u00c5"));
+assertTrue(/(?i)\u00e5/u.test("\u00e5"));
+assertTrue(/(?i)\u00c5/u.test("\u00e5"));
+assertTrue(/(?i)\u00c5/u.test("\u00c5"));
+assertTrue(/(?i)\u212b/u.test("\u212b"));
+assertFalse(/(?i)\u00df/u.test("SS"));
+assertFalse(/(?i)\u1f8d/u.test("\u1f05\u03b9"));
+assertTrue(/(?i)\u1f6b/u.test("\u1f63"));
+assertTrue(/(?i)\u00e5/u.test("\u212b"));
+assertTrue(/(?i)\u00e5/u.test("\u00c5"));
+assertTrue(/(?i)\u00e5/u.test("\u00e5"));
+assertTrue(/(?i)\u00e5/u.test("\u212b"));
+assertTrue(/(?i)\u00c5/u.test("\u00e5"));
+assertTrue(/(?i)\u00c5/u.test("\u212b"));
+assertTrue(/(?i)\u00c5/u.test("\u00c5"));
+assertTrue(/(?i)\u212b/u.test("\u00c5"));
+assertTrue(/(?i)\u212b/u.test("\u00e5"));
+assertTrue(/(?i)\u212b/u.test("\u212b"));
+assertTrue(/(?i)\u{10400}/u.test("\u{10428}"));
+assertTrue(/(?i)\ud801\udc00/u.test("\u{10428}"));
+assertTrue(/(?i)[\u{10428}]/u.test("\u{10400}"));
+assertTrue(/(?i)[\ud801\udc28]/u.test("\u{10400}"));
+assertFalse(/(?i)\u00df/u.test("SS"));
+assertFalse(/(?i)\u1f8d/u.test("\u1f05\u03b9"));
+assertTrue(/(?i)\u1f8d/u.test("\u1f85"));
+assertTrue(/(?i)\u1f6b/u.test("\u1f63"));
+assertTrue(/(?i)\u00e5\u00e5\u00e5/u.test("\u212b\u00e5\u00c5"));
+assertTrue(/(?i)AB\u{10400}/u.test("ab\u{10428}"));
+assertTrue(/(?i)\w/u.test('\u017F'));
+assertTrue(/(?i)\w/u.test('\u212A'));
+assertFalse(/(?i)\W/u.test('\u017F'));
+assertFalse(/(?i)\W/u.test('\u212A'));
+assertFalse(/(?i)\W/u.test('s'));
+assertFalse(/(?i)\W/u.test('S'));
+assertFalse(/(?i)\W/u.test('K'));
+assertFalse(/(?i)\W/u.test('k'));
+assertTrue(/(?i)[\w]/u.test('\u017F'));
+assertTrue(/(?i)[\w]/u.test('\u212A'));
+assertFalse(/(?i)[\W]/u.test('\u017F'));
+assertFalse(/(?i)[\W]/u.test('\u212A'));
+assertFalse(/(?i)[\W]/u.test('s'));
+assertFalse(/(?i)[\W]/u.test('S'));
+assertFalse(/(?i)[\W]/u.test('K'));
+assertFalse(/(?i)[\W]/u.test('k'));
+assertTrue(/(?i)\b/u.test('\u017F'));
+assertTrue(/(?i)\b/u.test('\u212A'));
+assertTrue(/(?i)\b/u.test('s'));
+assertTrue(/(?i)\b/u.test('S'));
+assertFalse(/(?i)\B/u.test('\u017F'));
+assertFalse(/(?i)\B/u.test('\u212A'));
+assertFalse(/(?i)\B/u.test('s'));
+assertFalse(/(?i)\B/u.test('S'));
+assertFalse(/(?i)\B/u.test('K'));
+assertFalse(/(?i)\B/u.test('k'));
+assertTrue(/(?i)\p{Ll}/u.test("a"));
+assertTrue(/(?i)\p{Ll}/u.test("\u{118D4}"));
+assertTrue(/(?i)\p{Ll}/u.test("A"));
+assertTrue(/(?i)\p{Ll}/u.test("\u{118B4}"));
+assertTrue(/(?i)\P{Ll}/u.test("a"));
+assertTrue(/(?i)\P{Ll}/u.test("\u{118D4}"));
+assertTrue(/(?i)\P{Ll}/u.test("A"));
+assertTrue(/(?i)\P{Ll}/u.test("\u{118B4}"));
+assertTrue(/(?i)\p{Lu}/u.test("a"));
+assertTrue(/(?i)\p{Lu}/u.test("\u{118D4}"));
+assertTrue(/(?i)\p{Lu}/u.test("A"));
+assertTrue(/(?i)\p{Lu}/u.test("\u{118B4}"));
+assertTrue(/(?i)\P{Lu}/u.test("a"));
+assertTrue(/(?i)\P{Lu}/u.test("\u{118D4}"));
+assertTrue(/(?i)\P{Lu}/u.test("A"));
+assertTrue(/(?i)\P{Lu}/u.test("\u{118B4}"));
diff --git a/src/v8/test/mjsunit/regexp-modifiers-autogenerated.js b/src/v8/test/mjsunit/regexp-modifiers-autogenerated.js
new file mode 100644
index 0000000..e74ea8b
--- /dev/null
+++ b/src/v8/test/mjsunit/regexp-modifiers-autogenerated.js
@@ -0,0 +1,74 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --regexp-mode-modifiers --harmony-regexp-property
+
+// These regexps are just grepped out of the other tests we already have
+// and the syntax changed from out-of-line i flag to inline i flag.
+
+assertFalse(/(?i)x(...)\1/.test("x\u03a3\u03c2\u03c3\u03c2\u03c3"));
+assertTrue(/(?i)\u03a3((?:))\1\1x/.test("\u03c2x"), "backref-UC16-empty");
+assertTrue(/(?i)x(?:...|(...))\1x/.test("x\u03a3\u03c2\u03c3x"));
+assertTrue(/(?i)x(?:...|(...))\1x/.test("x\u03c2\u03c3\u039b\u03a3\u03c2\u03bbx"));
+assertFalse(/(?i)\xc1/.test('fooA'), "quickcheck-uc16-pattern-ascii-subject");
+assertFalse(/(?i)x(...)\1/.test("xaaaaa"), "backref-ASCII-short");
+assertTrue(/(?i)x((?:))\1\1x/.test("xx"), "backref-ASCII-empty");
+assertTrue(/(?i)x(?:...|(...))\1x/.test("xabcx"), "backref-ASCII-uncaptured");
+assertTrue(/(?i)x(?:...|(...))\1x/.test("xabcABCx"), "backref-ASCII-backtrack");
+assertFalse(/(?i)f/.test('b'));
+assertFalse(/(?i)[abc]f/.test('x'));
+assertFalse(/(?i)[abc]f/.test('xa'));
+assertFalse(/(?i)[abc]</.test('x'));
+assertFalse(/(?i)[abc]</.test('xa'));
+assertFalse(/(?i)f[abc]/.test('x'));
+assertFalse(/(?i)f[abc]/.test('xa'));
+assertFalse(/(?i)<[abc]/.test('x'));
+assertFalse(/(?i)<[abc]/.test('xa'));
+assertFalse(/(?i)[\u00e5]/.test("\u212b"));
+assertFalse(/(?i)[\u212b]/.test("\u00e5\u1234"));
+assertFalse(/(?i)[\u212b]/.test("\u00e5"));
+assertFalse(/(?i)\u{10400}/.test("\u{10428}"));
+assertFalse(/(?i)[\u00e5]/.test("\u212b"));
+assertFalse(/(?i)[\u212b]/.test("\u00e5\u1234"));
+assertFalse(/(?i)[\u212b]/.test("\u00e5"));
+assertFalse(/(?i)\u{10400}/.test("\u{10428}"));
+assertTrue(/(?i)[@-A]/.test("a"));
+assertTrue(/(?i)[@-A]/.test("A"));
+assertTrue(/(?i)[@-A]/.test("@"));
+assertFalse(/(?i)[¿-À]/.test('¾'));
+assertTrue(/(?i)[¿-À]/.test('¿'));
+assertTrue(/(?i)[¿-À]/.test('À'));
+assertTrue(/(?i)[¿-À]/.test('à'));
+assertFalse(/(?i)[¿-À]/.test('á'));
+assertFalse(/(?i)[¿-À]/.test('Á'));
+assertFalse(/(?i)[¿-À]/.test('Á'));
+assertFalse(/(?i)[Ö-×]/.test('Õ'));
+assertTrue(/(?i)[Ö-×]/.test('Ö'));
+assertTrue(/(?i)[Ö-×]/.test('ö'));
+assertTrue(/(?i)[Ö-×]/.test('×'));
+assertFalse(/(?i)[Ö-×]/.test('Ø'));
+assertTrue(/(?i)(a[\u1000A])+/.test('aa'));
+assertTrue(/(?i)\u0178/.test('\u00ff'));
+assertTrue(/(?i)\u039c/.test('\u00b5'));
+assertTrue(/(?i)\u039c/.test('\u03bc'));
+assertTrue(/(?i)\u00b5/.test('\u03bc'));
+assertTrue(/(?i)[\u039b-\u039d]/.test('\u00b5'));
+assertFalse(/(?i)[^\u039b-\u039d]/.test('\u00b5'));
+
+assertTrue(/(?m)^bar/.test("bar"));
+assertTrue(/(?m)^bar/.test("bar\nfoo"));
+assertTrue(/(?m)^bar/.test("foo\nbar"));
+assertTrue(/(?m)bar$/.test("bar"));
+assertTrue(/(?m)bar$/.test("bar\nfoo"));
+assertTrue(/(?m)bar$/.test("foo\nbar"));
+assertFalse(/(?m)^bxr/.test("bar"));
+assertFalse(/(?m)^bxr/.test("bar\nfoo"));
+assertFalse(/(?m)^bxr/.test("foo\nbar"));
+assertFalse(/(?m)bxr$/.test("bar"));
+assertFalse(/(?m)bxr$/.test("bar\nfoo"));
+assertFalse(/(?m)bxr$/.test("foo\nbar"));
+assertTrue(/(?m)^.*$/.test("\n"));
+assertTrue(/(?m)^([()]|.)*$/.test("()\n()"));
+assertTrue(/(?m)^([()]|.)*$/.test("()\n"));
+assertTrue(/(?m)^[()]*$/.test("()\n."));
diff --git a/src/v8/test/mjsunit/regexp-modifiers-dotall.js b/src/v8/test/mjsunit/regexp-modifiers-dotall.js
new file mode 100644
index 0000000..70c379c
--- /dev/null
+++ b/src/v8/test/mjsunit/regexp-modifiers-dotall.js
@@ -0,0 +1,27 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --regexp-mode-modifiers
+
+// S flag switches dotall mode on and off.  Combine with i flag changes to test
+// the parser.
+test(/.(?s).(?i-s).a(?-i)a/);
+test(/.(?s:.)(?i:.a)a/);
+test(/.(?s).(?i-s).a(?-i)a/u);
+test(/.(?s:.)(?i:.a)a/u);
+
+// m flag makes no difference
+test(/.(?sm).(?i-s).a(?-i)a/);
+test(/.(?s:.)(?i:.a)a/);
+test(/.(?sm).(?im-s).a(?m-i)a/u);
+test(/.(?s:.)(?i:.a)a/u);
+
+function test(re) {
+  assertTrue(re.test("...aa"));
+  assertTrue(re.test(".\n.aa"));
+  assertTrue(re.test(".\n.Aa"));
+  assertFalse(re.test("\n\n.Aa"));
+  assertFalse(re.test(".\n\nAa"));
+  assertFalse(re.test(".\n.AA"));
+}
diff --git a/src/v8/test/mjsunit/regexp-modifiers-i18n.js b/src/v8/test/mjsunit/regexp-modifiers-i18n.js
new file mode 100644
index 0000000..e9ffe05
--- /dev/null
+++ b/src/v8/test/mjsunit/regexp-modifiers-i18n.js
@@ -0,0 +1,138 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --regexp-mode-modifiers
+
+// These tests won't all run on the noi18n build of V8.
+
+aa(/(a)(?i)\1/u);
+aa(/([az])(?i)\1/u);
+
+function aa(re) {
+  assertTrue(re.test("aa"));
+  assertTrue(re.test("aA"));
+  assertFalse(re.test("Aa"));
+  assertFalse(re.test("AA"));
+}
+
+aai(/(a)(?-i)\1/iu);
+aai(/([az])(?-i)\1/iu);
+
+function aai(re) {
+  assertTrue(re.test("aa"));
+  assertFalse(re.test("aA"));
+  assertFalse(re.test("Aa"));
+  assertTrue(re.test("AA"));
+}
+
+abcd(/a(b(?i)c)d/u);
+abcd(/[aw]([bx](?i)[cy])[dz]/u);
+
+function abcd(re) {
+  assertTrue(re.test("abcd"));
+  assertFalse(re.test("abcD"));
+  assertTrue(re.test("abCd"));
+  assertFalse(re.test("abCD"));
+  assertFalse(re.test("aBcd"));
+  assertFalse(re.test("aBcD"));
+  assertFalse(re.test("aBCd"));
+  assertFalse(re.test("aBCD"));
+  assertFalse(re.test("Abcd"));
+  assertFalse(re.test("AbcD"));
+  assertFalse(re.test("AbCd"));
+  assertFalse(re.test("AbCD"));
+  assertFalse(re.test("ABcd"));
+  assertFalse(re.test("ABcD"));
+  assertFalse(re.test("ABCd"));
+  assertFalse(re.test("ABCD"));
+}
+
+abcdei(/a(b(?-i)c)d/iu);
+abcdei(/[aw]([bx](?-i)[cy])[dz]/iu);
+
+function abcdei(re) {
+  assertTrue(re.test("abcd"));
+  assertTrue(re.test("abcD"));
+  assertFalse(re.test("abCd"));
+  assertFalse(re.test("abCD"));
+  assertTrue(re.test("aBcd"));
+  assertTrue(re.test("aBcD"));
+  assertFalse(re.test("aBCd"));
+  assertFalse(re.test("aBCD"));
+  assertTrue(re.test("Abcd"));
+  assertTrue(re.test("AbcD"));
+  assertFalse(re.test("AbCd"));
+  assertFalse(re.test("AbCD"));
+  assertTrue(re.test("ABcd"));
+  assertTrue(re.test("ABcD"));
+  assertFalse(re.test("ABCd"));
+  assertFalse(re.test("ABCD"));
+}
+
+abc(/a(?i:b)c/u);
+abc(/[ax](?i:[by])[cz]/u);
+
+function abc(re) {
+  assertTrue(re.test("abc"));
+  assertFalse(re.test("abC"));
+  assertTrue(re.test("aBc"));
+  assertFalse(re.test("aBC"));
+  assertFalse(re.test("Abc"));
+  assertFalse(re.test("AbC"));
+  assertFalse(re.test("ABc"));
+  assertFalse(re.test("ABC"));
+}
+
+abci(/a(?-i:b)c/iu);
+abci(/[ax](?-i:[by])[cz]/iu);
+
+function abci(re) {
+  assertTrue(re.test("abc"));
+  assertTrue(re.test("abC"));
+  assertFalse(re.test("aBc"));
+  assertFalse(re.test("aBC"));
+  assertTrue(re.test("Abc"));
+  assertTrue(re.test("AbC"));
+  assertFalse(re.test("ABc"));
+  assertFalse(re.test("ABC"));
+}
+
+// The following tests are taken from test/mjsunit/es7/regexp-ui-word.js but
+// using inline syntax instead of the global /i flag.
+assertTrue(/(?i)\w/u.test('\u017F'));
+assertTrue(/(?i)\w/u.test('\u212A'));
+assertFalse(/(?i)\W/u.test('\u017F'));
+assertFalse(/(?i)\W/u.test('\u212A'));
+assertFalse(/(?i)\W/u.test('s'));
+assertFalse(/(?i)\W/u.test('S'));
+assertFalse(/(?i)\W/u.test('K'));
+assertFalse(/(?i)\W/u.test('k'));
+
+assertTrue(/(?i)[\w]/u.test('\u017F'));
+assertTrue(/(?i)[\w]/u.test('\u212A'));
+assertFalse(/(?i)[\W]/u.test('\u017F'));
+assertFalse(/(?i)[\W]/u.test('\u212A'));
+assertFalse(/(?i)[\W]/u.test('s'));
+assertFalse(/(?i)[\W]/u.test('S'));
+assertFalse(/(?i)[\W]/u.test('K'));
+assertFalse(/(?i)[\W]/u.test('k'));
+
+assertTrue(/(?i)\b/u.test('\u017F'));
+assertFalse(/(?i:)\b/u.test('\u017F'));
+assertTrue(/(?i)\b/u.test('\u212A'));
+assertFalse(/(?i:)\b/u.test('\u212A'));
+assertTrue(/(?i)\b/u.test('s'));
+assertTrue(/(?i)\b/u.test('S'));
+assertFalse(/(?i)\B/u.test('\u017F'));
+assertFalse(/(?i)\B/u.test('\u212A'));
+assertFalse(/(?i)\B/u.test('s'));
+assertFalse(/(?i)\B/u.test('S'));
+assertFalse(/(?i)\B/u.test('K'));
+assertFalse(/(?i)\B/u.test('k'));
+
+assertEquals(["abcd\u017F", "\u017F"], /a.*?(.)(?i)\b/u.exec('abcd\u017F cd'));
+assertEquals(["abcd\u212A", "\u212A"], /a.*?(.)(?i)\b/u.exec('abcd\u212A cd'));
+
+assertEquals(["a\u017F", "\u017F"], /a.*?(?i:\B)(.)/u.exec('a\u017F '));
+assertEquals(["a\u212A", "\u212A"], /a.*?(?i:\B)(.)/u.exec('a\u212A '));
diff --git a/src/v8/test/mjsunit/regexp-modifiers.js b/src/v8/test/mjsunit/regexp-modifiers.js
new file mode 100644
index 0000000..7e76717
--- /dev/null
+++ b/src/v8/test/mjsunit/regexp-modifiers.js
@@ -0,0 +1,146 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --regexp-mode-modifiers
+
+aa(/(a)(?i)\1/);
+aa(/([az])(?i)\1/);
+
+function aa(re) {
+  assertTrue(re.test("aa"));
+  assertTrue(re.test("aA"));
+  assertFalse(re.test("Aa"));
+  assertFalse(re.test("AA"));
+}
+
+aai(/(a)(?-i)\1/i);
+aai(/([az])(?-i)\1/i);
+
+function aai(re) {
+  assertTrue(re.test("aa"));
+  assertFalse(re.test("aA"));
+  assertFalse(re.test("Aa"));
+  assertTrue(re.test("AA"));
+}
+
+abcd(/a(b(?i)c)d/);
+abcd(/[aw]([bx](?i)[cy])[dz]/);
+
+function abcd(re) {
+  assertTrue(re.test("abcd"));
+  assertFalse(re.test("abcD"));
+  assertTrue(re.test("abCd"));
+  assertFalse(re.test("abCD"));
+  assertFalse(re.test("aBcd"));
+  assertFalse(re.test("aBcD"));
+  assertFalse(re.test("aBCd"));
+  assertFalse(re.test("aBCD"));
+  assertFalse(re.test("Abcd"));
+  assertFalse(re.test("AbcD"));
+  assertFalse(re.test("AbCd"));
+  assertFalse(re.test("AbCD"));
+  assertFalse(re.test("ABcd"));
+  assertFalse(re.test("ABcD"));
+  assertFalse(re.test("ABCd"));
+  assertFalse(re.test("ABCD"));
+}
+
+abcdei(/a(b(?-i)c)d/i);
+abcdei(/[aw]([bx](?-i)[cy])[dz]/i);
+
+function abcdei(re) {
+  assertTrue(re.test("abcd"));
+  assertTrue(re.test("abcD"));
+  assertFalse(re.test("abCd"));
+  assertFalse(re.test("abCD"));
+  assertTrue(re.test("aBcd"));
+  assertTrue(re.test("aBcD"));
+  assertFalse(re.test("aBCd"));
+  assertFalse(re.test("aBCD"));
+  assertTrue(re.test("Abcd"));
+  assertTrue(re.test("AbcD"));
+  assertFalse(re.test("AbCd"));
+  assertFalse(re.test("AbCD"));
+  assertTrue(re.test("ABcd"));
+  assertTrue(re.test("ABcD"));
+  assertFalse(re.test("ABCd"));
+  assertFalse(re.test("ABCD"));
+}
+
+abc(/a(?i:b)c/);
+abc(/[ax](?i:[by])[cz]/);
+
+function abc(re) {
+  assertTrue(re.test("abc"));
+  assertFalse(re.test("abC"));
+  assertTrue(re.test("aBc"));
+  assertFalse(re.test("aBC"));
+  assertFalse(re.test("Abc"));
+  assertFalse(re.test("AbC"));
+  assertFalse(re.test("ABc"));
+  assertFalse(re.test("ABC"));
+}
+
+abci(/a(?-i:b)c/i);
+abci(/[ax](?-i:[by])[cz]/i);
+
+function abci(re) {
+  assertTrue(re.test("abc"));
+  assertTrue(re.test("abC"));
+  assertFalse(re.test("aBc"));
+  assertFalse(re.test("aBC"));
+  assertTrue(re.test("Abc"));
+  assertTrue(re.test("AbC"));
+  assertFalse(re.test("ABc"));
+  assertFalse(re.test("ABC"));
+}
+
+assertThrows(() => new RegExp("foo(?i:"));
+assertThrows(() => new RegExp("foo(?--i)"));
+assertThrows(() => new RegExp("foo(?i-i)"));
+
+assertThrows(() => new RegExp("foo(?m:"));
+assertThrows(() => new RegExp("foo(?--m)"));
+assertThrows(() => new RegExp("foo(?m-m)"));
+
+var re = /^\s(?m)^.$\s(?-m)$/;
+assertTrue(re.test("\n.\n"));
+assertFalse(re.test(" .\n"));
+assertFalse(re.test("\n. "));
+assertFalse(re.test(" . "));
+assertFalse(re.test("_\n.\n"));
+assertFalse(re.test("\n.\n_"));
+assertFalse(re.test("_\n.\n_"));
+
+assertEquals(["abcd", "d"], /a.*?(.)(?i)\b/.exec('abcd\u017F cd'));
+assertEquals(["abcd", "d"], /a.*?(.)(?i)\b/.exec('abcd\u212A cd'));
+
+assertEquals(["a\u017F ", " "], /a.*?(?i)\B(.)/.exec('a\u017F '));
+assertEquals(["a\u212A ", " "], /a.*?(?i)\B(.)/.exec('a\u212A '));
+
+// Nested flags.
+var res = [
+  /^a(?i:b(?-i:c(?i:d)e)f)g$/,
+  /^a(?i:b(?-i)c(?i)d(?-i)e(?i)f)g$/,
+  /^(?-i:a(?i:b(?-i:c(?i:d)e)f)g)$/i,
+  /^(?-i:a(?i:b(?-i)c(?i)d(?-i)e(?i)f)g)$/i,
+];
+
+for (var idx = 0; idx < res.length; idx++) {
+  var re = res[idx];
+  for (var i = 0; i < 128; i++) {
+    var s = (i & 1) ? "A" : "a";
+    s += (i & 2) ? "B" : "b";
+    s += (i & 4) ? "C" : "c";
+    s += (i & 8) ? "D" : "d";
+    s += (i & 16) ? "E" : "e";
+    s += (i & 32) ? "F" : "f";
+    s += (i & 64) ? "G" : "g";
+    if ((i & (1 | 4 | 16 | 64)) != 0) {
+      assertFalse(re.test(s), s);
+    } else {
+      assertTrue(re.test(s), s);
+    }
+  }
+}
diff --git a/src/v8/test/mjsunit/regress/modules-skip-regress-797581-1.js b/src/v8/test/mjsunit/regress/modules-skip-regress-797581-1.js
new file mode 100644
index 0000000..1aa55aa
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/modules-skip-regress-797581-1.js
@@ -0,0 +1,5 @@
+// Copyright 2018 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+export default ()
diff --git a/src/v8/test/mjsunit/regress/modules-skip-regress-797581-2.js b/src/v8/test/mjsunit/regress/modules-skip-regress-797581-2.js
new file mode 100644
index 0000000..855aa2e
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/modules-skip-regress-797581-2.js
@@ -0,0 +1,5 @@
+// Copyright 2018 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+export default (...)
diff --git a/src/v8/test/mjsunit/regress/modules-skip-regress-797581-3.js b/src/v8/test/mjsunit/regress/modules-skip-regress-797581-3.js
new file mode 100644
index 0000000..e6d043d
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/modules-skip-regress-797581-3.js
@@ -0,0 +1,5 @@
+// Copyright 2018 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+export default (a, ...b)
diff --git a/src/v8/test/mjsunit/regress/modules-skip-regress-797581-4.js b/src/v8/test/mjsunit/regress/modules-skip-regress-797581-4.js
new file mode 100644
index 0000000..fc7968d
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/modules-skip-regress-797581-4.js
@@ -0,0 +1,5 @@
+// Copyright 2018 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+export default 1, 2;
diff --git a/src/v8/test/mjsunit/regress/modules-skip-regress-797581-5.js b/src/v8/test/mjsunit/regress/modules-skip-regress-797581-5.js
new file mode 100644
index 0000000..10864c2
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/modules-skip-regress-797581-5.js
@@ -0,0 +1,6 @@
+// Copyright 2018 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+let x;
+export default x = 0;
diff --git a/src/v8/test/mjsunit/regress/regress-1257.js b/src/v8/test/mjsunit/regress/regress-1257.js
index c20fb86..c5ed14d 100644
--- a/src/v8/test/mjsunit/regress/regress-1257.js
+++ b/src/v8/test/mjsunit/regress/regress-1257.js
@@ -1,29 +1,8 @@
-// Copyright 2011 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.
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
 
 function g(y) { assertEquals(y, 12); }
 
@@ -39,14 +18,11 @@
         l = 0;
         break;
       case 0:
-        // Loop for to hit OSR.
-        if (cnt++ < 10000000) {
-          l = 0;
-          break;
-        } else {
+        if (cnt++ == 5) {
+          %OptimizeOsr();
           l = 1;
-          break;
         }
+        break;
       case 1:
         // This case will contain deoptimization
         // because it has no type feedback.
diff --git a/src/v8/test/mjsunit/regress/regress-2618.js b/src/v8/test/mjsunit/regress/regress-2618.js
index 437401e..8e539ff 100644
--- a/src/v8/test/mjsunit/regress/regress-2618.js
+++ b/src/v8/test/mjsunit/regress/regress-2618.js
@@ -40,6 +40,7 @@
       // feedback.
       var opt_status = %GetOptimizationStatus(f);
       assertTrue(
+        (opt_status & V8OptimizationStatus.kMaybeDeopted) !== 0 ||
         (opt_status & V8OptimizationStatus.kTopmostFrameIsTurboFanned) !== 0);
     } while (false);
   } while (false);
@@ -66,8 +67,10 @@
                 do {
                   for (var i = 0; i < 10; i++) %OptimizeOsr();
                   var opt_status = %GetOptimizationStatus(g);
-                  assertTrue((opt_status
-                    & V8OptimizationStatus.kTopmostFrameIsTurboFanned) !== 0);
+                  assertTrue(
+                    (opt_status & V8OptimizationStatus.kMaybeDeopted) !== 0 ||
+                    (opt_status &
+                        V8OptimizationStatus.kTopmostFrameIsTurboFanned) !== 0);
                 } while (false);
               } while (false);
             } while (false);
diff --git a/src/v8/test/mjsunit/regress/regress-2646.js b/src/v8/test/mjsunit/regress/regress-2646.js
index c51a280..ef72556 100644
--- a/src/v8/test/mjsunit/regress/regress-2646.js
+++ b/src/v8/test/mjsunit/regress/regress-2646.js
@@ -25,8 +25,6 @@
 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
-// Flags: --heap-stats
-
 var expectedItemsCount = 10000,
     itemSize = 5,
     heap = new ArrayBuffer(expectedItemsCount * itemSize * 8),
diff --git a/src/v8/test/mjsunit/regress/regress-353004.js b/src/v8/test/mjsunit/regress/regress-353004.js
index 233a0f1..fe19354 100644
--- a/src/v8/test/mjsunit/regress/regress-353004.js
+++ b/src/v8/test/mjsunit/regress/regress-353004.js
@@ -6,12 +6,12 @@
 
 var buffer1 = new ArrayBuffer(100 * 1024);
 
-var array1 = new Uint8Array(buffer1, {valueOf : function() {
-  %ArrayBufferNeuter(buffer1);
-  return 0;
-}});
-
-assertEquals(0, array1.length);
+assertThrows(function() {
+  var array1 = new Uint8Array(buffer1, {valueOf : function() {
+    %ArrayBufferNeuter(buffer1);
+    return 0;
+  }});
+}, TypeError);
 
 var buffer2 = new ArrayBuffer(100 * 1024);
 
@@ -20,8 +20,21 @@
       %ArrayBufferNeuter(buffer2);
       return 100 * 1024;
   }});
-}, RangeError);
+}, TypeError);
 
+let convertedOffset = false;
+let convertedLength = false;
+assertThrows(() =>
+  new Uint8Array(buffer1, {valueOf : function() {
+      convertedOffset = true;
+      return 0;
+    }}, {valueOf : function() {
+      convertedLength = true;
+      %ArrayBufferNeuter(buffer1);
+      return 0;
+  }}), TypeError);
+assertTrue(convertedOffset);
+assertTrue(convertedLength);
 
 var buffer3 = new ArrayBuffer(100 * 1024 * 1024);
 var dataView1 = new DataView(buffer3, {valueOf : function() {
diff --git a/src/v8/test/mjsunit/regress/regress-370827.js b/src/v8/test/mjsunit/regress/regress-370827.js
index 5536d51..e6d5185 100644
--- a/src/v8/test/mjsunit/regress/regress-370827.js
+++ b/src/v8/test/mjsunit/regress/regress-370827.js
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-// Flags: --allow-natives-syntax --expose-gc --heap-stats
+// Flags: --allow-natives-syntax --expose-gc
 
 function g(dummy, x) {
   var start = "";
diff --git a/src/v8/test/mjsunit/regress/regress-5902.js b/src/v8/test/mjsunit/regress/regress-5902.js
index 54cb90e..6054104 100644
--- a/src/v8/test/mjsunit/regress/regress-5902.js
+++ b/src/v8/test/mjsunit/regress/regress-5902.js
@@ -51,12 +51,5 @@
       `${name}.prototype.constructor`);
 });
 
-// This is the current set of dictionary mode objects.
-// Remove items as we fix them. See issue 5902.
-assertEquals(
-    [
-      'Error.prototype',
-      'EvalError.prototype', 'RangeError.prototype', 'ReferenceError.prototype',
-      'SyntaxError.prototype', 'TypeError.prototype', 'URIError.prototype'
-    ],
-    log);
+// There should be no dictionary mode builtin objects.
+assertEquals([], log);
diff --git a/src/v8/test/mjsunit/regress/regress-678917.js b/src/v8/test/mjsunit/regress/regress-678917.js
index 0e302e5..a8ce042 100644
--- a/src/v8/test/mjsunit/regress/regress-678917.js
+++ b/src/v8/test/mjsunit/regress/regress-678917.js
@@ -2,7 +2,10 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-// Flags: --max-old-space-size=1600
+// Flags: --max-old-space-size=1600 --nostress-incremental-marking
+
+// This test uses a lot of memory and fails with flaky OOM when run
+// with --stress-incremental-marking on TSAN.
 
 s1 = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';
 s1 += s1;
diff --git a/src/v8/test/mjsunit/regress/regress-6907.js b/src/v8/test/mjsunit/regress/regress-6907.js
new file mode 100644
index 0000000..0749365
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/regress-6907.js
@@ -0,0 +1,21 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+(function TestDematerializedContextInBuiltin() {
+  var f = function() {
+    var b = [1,2,3];
+    var callback = function(v,i,o) {
+      %_DeoptimizeNow();
+    };
+    try { throw 0 } catch(e) {
+      return b.forEach(callback);
+    }
+  }
+  f();
+  f();
+  %OptimizeFunctionOnNextCall(f);
+  f();
+})();
diff --git a/src/v8/test/mjsunit/regress/regress-6941.js b/src/v8/test/mjsunit/regress/regress-6941.js
new file mode 100644
index 0000000..a837083
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/regress-6941.js
@@ -0,0 +1,20 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax --opt
+
+function foo(x) {
+  return Symbol.iterator == x;
+}
+
+function main() {
+  foo(Symbol());
+  foo({valueOf() { return Symbol.toPrimitive}});
+}
+
+%NeverOptimizeFunction(main);
+main();
+%OptimizeFunctionOnNextCall(foo);
+main();
+assertOptimized(foo);
diff --git a/src/v8/test/mjsunit/regress/regress-6948.js b/src/v8/test/mjsunit/regress/regress-6948.js
new file mode 100644
index 0000000..c7e0fae
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/regress-6948.js
@@ -0,0 +1,20 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax --opt
+
+var o = {};
+
+function foo(s) { return o[s]; }
+
+var s = 'c' + 'c';
+foo(s);
+foo(s);
+%OptimizeFunctionOnNextCall(foo);
+assertEquals(undefined, foo(s));
+assertOptimized(foo);
+assertEquals(undefined, foo('c' + 'c'));
+assertOptimized(foo);
+assertEquals(undefined, foo('ccddeeffgg'.slice(0, 2)));
+assertOptimized(foo);
diff --git a/src/v8/test/mjsunit/regress/wasm/regression-694433.js b/src/v8/test/mjsunit/regress/regress-6970.js
similarity index 62%
copy from src/v8/test/mjsunit/regress/wasm/regression-694433.js
copy to src/v8/test/mjsunit/regress/regress-6970.js
index a260e20..64f8caf 100644
--- a/src/v8/test/mjsunit/regress/wasm/regression-694433.js
+++ b/src/v8/test/mjsunit/regress/regress-6970.js
@@ -2,5 +2,5 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-var size = 0x40000000;
-assertThrows(() => WebAssembly.validate(new Uint16Array(size)), RangeError);
+assertEquals(42, (({a = {b} = {b: 42}}) => a.b)({}));
+assertEquals(42, b);
diff --git a/src/v8/test/mjsunit/regress/regress-6989.js b/src/v8/test/mjsunit/regress/regress-6989.js
new file mode 100644
index 0000000..b4a33c5
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/regress-6989.js
@@ -0,0 +1,85 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax --opt
+
+(function() {
+  function foo(o) { o["x"] = 1; }
+
+  assertThrows(() => foo(undefined));
+  assertThrows(() => foo(undefined));
+  %OptimizeFunctionOnNextCall(foo);
+  assertThrows(() => foo(undefined));
+  assertOptimized(foo);
+})();
+
+(function() {
+  function foo(o) { o["x"] = 1; }
+
+  assertThrows(() => foo(null));
+  assertThrows(() => foo(null));
+  %OptimizeFunctionOnNextCall(foo);
+  assertThrows(() => foo(null));
+  assertOptimized(foo);
+})();
+
+(function() {
+  function foo(o) { return o["x"]; }
+
+  assertThrows(() => foo(undefined));
+  assertThrows(() => foo(undefined));
+  %OptimizeFunctionOnNextCall(foo);
+  assertThrows(() => foo(undefined));
+  assertOptimized(foo);
+})();
+
+(function() {
+  function foo(o) { return o["x"]; }
+
+  assertThrows(() => foo(null));
+  assertThrows(() => foo(null));
+  %OptimizeFunctionOnNextCall(foo);
+  assertThrows(() => foo(null));
+  assertOptimized(foo);
+})();
+
+(function() {
+  function foo(o) { o.x = 1; }
+
+  assertThrows(() => foo(undefined));
+  assertThrows(() => foo(undefined));
+  %OptimizeFunctionOnNextCall(foo);
+  assertThrows(() => foo(undefined));
+  assertOptimized(foo);
+})();
+
+(function() {
+  function foo(o) { o.x = 1; }
+
+  assertThrows(() => foo(null));
+  assertThrows(() => foo(null));
+  %OptimizeFunctionOnNextCall(foo);
+  assertThrows(() => foo(null));
+  assertOptimized(foo);
+})();
+
+(function() {
+  function foo(o) { return o.x; }
+
+  assertThrows(() => foo(undefined));
+  assertThrows(() => foo(undefined));
+  %OptimizeFunctionOnNextCall(foo);
+  assertThrows(() => foo(undefined));
+  assertOptimized(foo);
+})();
+
+(function() {
+  function foo(o) { return o.x; }
+
+  assertThrows(() => foo(null));
+  assertThrows(() => foo(null));
+  %OptimizeFunctionOnNextCall(foo);
+  assertThrows(() => foo(null));
+  assertOptimized(foo);
+})();
diff --git a/src/v8/test/mjsunit/regress/regress-6991.js b/src/v8/test/mjsunit/regress/regress-6991.js
new file mode 100644
index 0000000..1c6b976
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/regress-6991.js
@@ -0,0 +1,17 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax --opt
+
+function foo(o) { return o.x; }
+
+assertEquals(undefined, foo({}));
+assertEquals(undefined, foo(1));
+assertEquals(undefined, foo({}));
+assertEquals(undefined, foo(1));
+%OptimizeFunctionOnNextCall(foo);
+assertEquals(undefined, foo({}));
+assertOptimized(foo);
+assertEquals(undefined, foo(1));
+assertOptimized(foo);
diff --git a/src/v8/test/mjsunit/regress/regress-7014-1.js b/src/v8/test/mjsunit/regress/regress-7014-1.js
new file mode 100644
index 0000000..6aadf91
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/regress-7014-1.js
@@ -0,0 +1,26 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax --opt --no-always-opt
+
+function foo(s) {
+  return s[5];
+}
+
+assertEquals("f", foo("abcdef"));
+assertEquals(undefined, foo("a"));
+%OptimizeFunctionOnNextCall(foo);
+assertEquals("f", foo("abcdef"));
+assertEquals(undefined, foo("a"));
+assertOptimized(foo);
+
+// Now mess with the String.prototype.
+String.prototype[5] = "5";
+
+assertEquals("f", foo("abcdef"));
+assertEquals("5", foo("a"));
+%OptimizeFunctionOnNextCall(foo);
+assertEquals("f", foo("abcdef"));
+assertEquals("5", foo("a"));
+assertOptimized(foo);
diff --git a/src/v8/test/mjsunit/regress/regress-7014-2.js b/src/v8/test/mjsunit/regress/regress-7014-2.js
new file mode 100644
index 0000000..057e170
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/regress-7014-2.js
@@ -0,0 +1,30 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax --opt --no-always-opt
+
+function foo(s) {
+  return s[5];
+}
+
+assertEquals("f", foo("abcdef"));
+assertEquals(undefined, foo("a"));
+%OptimizeFunctionOnNextCall(foo);
+assertEquals("f", foo("abcdef"));
+assertEquals(undefined, foo("a"));
+assertOptimized(foo);
+
+// Now mess with the String.prototype.
+String.prototype.__proto__ = new Proxy(String.prototype.__proto__, {
+  get(target, property) {
+    return "5";
+  }
+});
+
+assertEquals("f", foo("abcdef"));
+assertEquals("5", foo("a"));
+%OptimizeFunctionOnNextCall(foo);
+assertEquals("f", foo("abcdef"));
+assertEquals("5", foo("a"));
+assertOptimized(foo);
diff --git a/src/v8/test/mjsunit/regress/regress-7026.js b/src/v8/test/mjsunit/regress/regress-7026.js
new file mode 100644
index 0000000..f02d2f3
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/regress-7026.js
@@ -0,0 +1,17 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+function foo(o, k) { return o[k]; }
+
+const a = "a";
+foo([1], 0);
+foo({a:1}, a);
+
+const p = new Proxy({}, {
+  get(target, name) {
+    return name;
+  }
+});
+
+assertEquals(a + "b", foo(p, a + "b"));
diff --git a/src/v8/test/mjsunit/regress/regress-707187.js b/src/v8/test/mjsunit/regress/regress-707187.js
index 31a73e2..3c4d768 100644
--- a/src/v8/test/mjsunit/regress/regress-707187.js
+++ b/src/v8/test/mjsunit/regress/regress-707187.js
@@ -5,7 +5,7 @@
 let i = 0;
 let re = /./g;
 re.exec = () => {
-  if (i++ == 0) return { length: 2147483648 };
+  if (i++ == 0) return { length: 2 ** 16 };
   return null;
 };
 
diff --git a/src/v8/test/mjsunit/regress/regress-7115.js b/src/v8/test/mjsunit/regress/regress-7115.js
new file mode 100644
index 0000000..837c11e
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/regress-7115.js
@@ -0,0 +1,33 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+function TestBuiltinSubclassing(Builtin) {
+  assertTrue(%HasFastProperties(Builtin));
+  assertTrue(%HasFastProperties(Builtin.prototype));
+  assertTrue(%HasFastProperties(Builtin.prototype.__proto__));
+
+  class SubClass extends Builtin {}
+
+  assertTrue(%HasFastProperties(Builtin));
+  assertTrue(%HasFastProperties(Builtin.prototype));
+  assertTrue(%HasFastProperties(Builtin.prototype.__proto__));
+}
+
+let TypedArray = Uint8Array.__proto__;
+
+TestBuiltinSubclassing(RegExp);
+TestBuiltinSubclassing(Promise);
+TestBuiltinSubclassing(Array);
+TestBuiltinSubclassing(TypedArray);
+TestBuiltinSubclassing(Uint8Array);
+TestBuiltinSubclassing(Int8Array);
+TestBuiltinSubclassing(Uint16Array);
+TestBuiltinSubclassing(Int16Array);
+TestBuiltinSubclassing(Uint32Array);
+TestBuiltinSubclassing(Int32Array);
+TestBuiltinSubclassing(Float32Array);
+TestBuiltinSubclassing(Float64Array);
+TestBuiltinSubclassing(Uint8ClampedArray);
diff --git a/src/v8/test/mjsunit/regress/regress-7135.js b/src/v8/test/mjsunit/regress/regress-7135.js
new file mode 100644
index 0000000..2387241
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/regress-7135.js
@@ -0,0 +1,17 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax --opt
+
+function foo() { return -"0" }
+foo();
+%OptimizeFunctionOnNextCall(foo);
+foo();
+assertOptimized(foo);
+
+function bar() { return -"1" }
+bar();
+%OptimizeFunctionOnNextCall(bar);
+bar();
+assertOptimized(bar);
diff --git a/src/v8/test/mjsunit/regress/regress-752764.js b/src/v8/test/mjsunit/regress/regress-752764.js
index 4963089..30ab7b2 100644
--- a/src/v8/test/mjsunit/regress/regress-752764.js
+++ b/src/v8/test/mjsunit/regress/regress-752764.js
@@ -2,7 +2,10 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-// Flags: --allow-natives-syntax
+// Flags: --allow-natives-syntax --nostress-incremental-marking
+
+// This test uses a lot of memory and fails with flaky OOM when run
+// with --stress-incremental-marking on TSAN.
 
 a = "a".repeat(%StringMaxLength() - 3);
 assertThrows(() => new RegExp("a" + a), SyntaxError);
diff --git a/src/v8/test/mjsunit/regress/wasm/regression-694433.js b/src/v8/test/mjsunit/regress/regress-772190.js
similarity index 62%
copy from src/v8/test/mjsunit/regress/wasm/regression-694433.js
copy to src/v8/test/mjsunit/regress/regress-772190.js
index a260e20..008ed63 100644
--- a/src/v8/test/mjsunit/regress/wasm/regression-694433.js
+++ b/src/v8/test/mjsunit/regress/regress-772190.js
@@ -2,5 +2,9 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-var size = 0x40000000;
-assertThrows(() => WebAssembly.validate(new Uint16Array(size)), RangeError);
+// Flags: --always-opt
+
+assertThrows(function() {
+  __v_13383[4];
+  let __v_13383 = {};
+});
diff --git a/src/v8/test/mjsunit/regress/regress-774475.js b/src/v8/test/mjsunit/regress/regress-774475.js
new file mode 100644
index 0000000..b11ea6c
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/regress-774475.js
@@ -0,0 +1,938 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+var o = function f3() {
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+  x = 1;
+}
diff --git a/src/v8/test/mjsunit/regress/regress-774824.js b/src/v8/test/mjsunit/regress/regress-774824.js
new file mode 100644
index 0000000..ca2decc
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/regress-774824.js
@@ -0,0 +1,17 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+function f() {
+  var a = new Set().values();
+  a.outOfObjectProperty = undefined;
+  %DeoptimizeNow();
+  return !a;
+}
+
+f();
+f();
+%OptimizeFunctionOnNextCall(f);
+f();
diff --git a/src/v8/test/mjsunit/regress/regress-775888.js b/src/v8/test/mjsunit/regress/regress-775888.js
new file mode 100644
index 0000000..8aa809e
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/regress-775888.js
@@ -0,0 +1,21 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+function __f_7586(__v_27535) {
+  let a = __v_27535.shift();
+  return a;
+}
+
+function __f_7587() {
+  var __v_27536 = [ 1, 15, 16];
+  __f_7586(__v_27536);
+  __v_27536.unshift(__v_27536);
+}
+__f_7587();
+__f_7587();
+
+%OptimizeFunctionOnNextCall(__f_7586);
+__f_7587();
diff --git a/src/v8/test/mjsunit/regress/regress-776309.js b/src/v8/test/mjsunit/regress/regress-776309.js
new file mode 100644
index 0000000..98a38c0
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/regress-776309.js
@@ -0,0 +1,27 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+function C() { }
+
+function f(b) {
+  var o = new C();
+  // Create out-of-object properties only on one branch so that escape
+  // analysis does not analyze the property array away.
+  if (b) o.t = 1.1;
+  %_DeoptimizeNow();
+  return o.t;
+}
+
+// Finish slack tracking for C.
+for (var i = 0; i < 1000; i++) new C();
+
+f(true);
+f(true);
+f(false);
+
+%OptimizeFunctionOnNextCall(f);
+
+assertEquals(1.1, f(true));
diff --git a/src/v8/test/mjsunit/regress/regress-776338.js b/src/v8/test/mjsunit/regress/regress-776338.js
new file mode 100644
index 0000000..ce0cf40
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/regress-776338.js
@@ -0,0 +1,44 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+const obj = {};
+Object.defineProperty(obj, 'value', {
+  enumerable: true,
+  configurable: true,
+  get: assertUnreachable,
+  set: assertUnreachable,
+});
+
+let called_get = false;
+let called_has = false;
+let called_set = false;
+
+const has = function(target, prop) {
+  assertEquals('value', prop);
+  called_has = true;
+  return false;  // Need to return false to trigger GetOwnProperty call.
+};
+
+const get = function(target, prop) {
+  assertEquals('value', prop);
+  called_get = true;
+  return 'yep';
+};
+
+const set = function(target, prop, value) {
+  assertEquals('value', prop);
+  called_set = true;
+  return true;    // Need to return true to trigger GetOwnProperty call.
+};
+
+const proxy = new Proxy(obj, { has, get, set });
+
+assertFalse(Reflect.has(proxy, 'value'));
+assertTrue(called_has);
+
+assertEquals('nope', proxy.value = 'nope');
+assertTrue(called_set);
+
+assertEquals('yep', proxy.value);
+assertTrue(called_get);
diff --git a/src/v8/test/mjsunit/regress/wasm/regression-694433.js b/src/v8/test/mjsunit/regress/regress-778574.js
similarity index 62%
copy from src/v8/test/mjsunit/regress/wasm/regression-694433.js
copy to src/v8/test/mjsunit/regress/regress-778574.js
index a260e20..862418e 100644
--- a/src/v8/test/mjsunit/regress/wasm/regression-694433.js
+++ b/src/v8/test/mjsunit/regress/regress-778574.js
@@ -2,5 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-var size = 0x40000000;
-assertThrows(() => WebAssembly.validate(new Uint16Array(size)), RangeError);
+(function () {
+  arguments.length = 7;
+  Array.prototype.slice.call(arguments);
+})();
diff --git a/src/v8/test/mjsunit/regress/regress-778668.js b/src/v8/test/mjsunit/regress/regress-778668.js
new file mode 100644
index 0000000..cb6a359
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/regress-778668.js
@@ -0,0 +1,20 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+(function () {
+  function f( __v_59960) {
+    arguments.length = -5;
+    Array.prototype.slice.call(arguments);
+  }
+  f('a')
+})();
+
+(function () {
+  function f( __v_59960) {
+    arguments.length = 2.3;
+    print(arguments.length);
+    Array.prototype.slice.call(arguments);
+  }
+  f('a')
+})();
diff --git a/src/v8/test/mjsunit/regress/regress-779407.js b/src/v8/test/mjsunit/regress/regress-779407.js
new file mode 100644
index 0000000..140f7bd
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/regress-779407.js
@@ -0,0 +1,13 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+var s = '\u1234-------';
+for (var i = 0; i < 17; i++) {
+  try {
+    s += s;
+    s += s;
+  } catch (e) {
+  }
+}
+s.replace(/[a]/g);
diff --git a/src/v8/test/mjsunit/regress/regress-781218.js b/src/v8/test/mjsunit/regress/regress-781218.js
new file mode 100644
index 0000000..f51e99f
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/regress-781218.js
@@ -0,0 +1,53 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+var m = new Map();
+
+function C() { }
+
+// Make sure slack tracking kicks in and shrinks the default size to prevent
+// any further in-object properties.
+%CompleteInobjectSlackTracking(new C());
+
+function f(o) {
+  o.x = true;
+}
+
+// Warm up {f}.
+f(new C());
+f(new C());
+
+
+var o = new C();
+%HeapObjectVerify(o);
+
+// We need at least 2 elements in the Map.
+m.set({}, 3);
+// This creates hash code on o.
+m.set(o, 1);
+
+// Add an out-of-object property.
+o.x = true;
+%HeapObjectVerify(o);
+// Delete the property (so we have no out-of-object properties).
+delete o.x;
+%HeapObjectVerify(o);
+
+
+// Ensure that growing the properties backing store in optimized code preserves
+// the hash.
+%OptimizeFunctionOnNextCall(f);
+f(o);
+
+%HeapObjectVerify(o);
+assertEquals(1, m.get(o));
+
+// Grow the Map and ensure the object is still found.
+for (let i = 0; i < 1000; i++) {
+  let object = {};
+  m.set(object, object);
+  assertEquals(1, m.get(o));
+}
diff --git a/src/v8/test/mjsunit/regress/regress-782145.js b/src/v8/test/mjsunit/regress/regress-782145.js
new file mode 100644
index 0000000..65464e2
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/regress-782145.js
@@ -0,0 +1,21 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+function newFastRegExp() { return new RegExp('.'); }
+function toSlowRegExp(re) { re.exec = 42; }
+
+let re = newFastRegExp();
+const evil_nonstring = { [Symbol.toPrimitive]: () => toSlowRegExp(re) };
+const empty_string = "";
+
+String.prototype.replace.call(evil_nonstring, re, empty_string);
+
+re = newFastRegExp();
+String.prototype.match.call(evil_nonstring, re, empty_string);
+
+re = newFastRegExp();
+String.prototype.search.call(evil_nonstring, re, empty_string);
+
+re = newFastRegExp();
+String.prototype.split.call(evil_nonstring, re, empty_string);
diff --git a/src/v8/test/mjsunit/regress/regress-782754.js b/src/v8/test/mjsunit/regress/regress-782754.js
new file mode 100644
index 0000000..608c48a
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/regress-782754.js
@@ -0,0 +1,18 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+let a = [1,2];
+function f(skip) { g(undefined, skip) }
+function g(x, skip) {
+  if (skip) return;
+  return a[x+1];
+}
+g(0, false);
+g(0, false);
+f(true);
+f(true);
+%OptimizeFunctionOnNextCall(f);
+f(false);
diff --git a/src/v8/test/mjsunit/regress/regress-783051.js b/src/v8/test/mjsunit/regress/regress-783051.js
new file mode 100644
index 0000000..0e5af37
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/regress-783051.js
@@ -0,0 +1,10 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+function f() { return Math.abs([][0]); }
+f();
+%OptimizeFunctionOnNextCall(f);
+f();
diff --git a/src/v8/test/mjsunit/regress/regress-783119.js b/src/v8/test/mjsunit/regress/regress-783119.js
new file mode 100644
index 0000000..68200a8
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/regress-783119.js
@@ -0,0 +1,10 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+let a = [,,,,,,,,,,,,,,,,,,,,,,,11,12,13,14,15,16,17,18,19];
+%NormalizeElements(a);
+let b = a.slice(19);
+assertEquals(11, b[4]);
diff --git a/src/v8/test/mjsunit/regress/regress-784080.js b/src/v8/test/mjsunit/regress/regress-784080.js
new file mode 100644
index 0000000..83b32b6
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/regress-784080.js
@@ -0,0 +1,26 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+(function() {
+  function f(a, b, a) {
+    return Array.prototype.slice.call(arguments);
+  }
+  let result = f(456, 789, 111112);
+  assertEquals(result[0], 456);
+  assertEquals(result[1], 789);
+  assertEquals(result[2], 111112);
+  assertEquals(result.length, 3);
+})();
+
+(function() {
+  function f(a, b, a) {
+    return Array.prototype.slice.call(arguments);
+  }
+  let result = f(456, 789, 111112, 543, 654);
+  assertEquals(result[0], 456);
+  assertEquals(result[1], 789);
+  assertEquals(result[2], 111112);
+  assertEquals(result[3], 543);
+  assertEquals(result[4], 654);
+  assertEquals(result.length, 5);
+})();
diff --git a/src/v8/test/mjsunit/regress/regress-784862.js b/src/v8/test/mjsunit/regress/regress-784862.js
new file mode 100644
index 0000000..5471002
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/regress-784862.js
@@ -0,0 +1,10 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// This test triggers table allocation in large object space. We don't care
+// about the result as long as we don't crash.
+const array = new Array();
+array[0x80000] = 1;
+array.unshift({});
+assertThrows(() => new WeakMap(array));
diff --git a/src/v8/test/mjsunit/regress/regress-784863.js b/src/v8/test/mjsunit/regress/regress-784863.js
new file mode 100644
index 0000000..1612197
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/regress-784863.js
@@ -0,0 +1,11 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+var __v_18522 = [ 4.2, true, false];
+Object.defineProperty(__v_18522, 2, {
+  get: function () {
+    return false;
+  },
+});
+__v_18522.shift();
+__v_18522.slice();
diff --git a/src/v8/test/mjsunit/regress/regress-784990.js b/src/v8/test/mjsunit/regress/regress-784990.js
new file mode 100644
index 0000000..7a57253
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/regress-784990.js
@@ -0,0 +1,30 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+const key1 = {};
+const key2 = {};
+
+const set = new Set([, 1]);
+assertEquals(set.has(undefined), true);
+assertEquals(set.has(1), true);
+
+const doubleSet = new Set([,1.234]);
+assertEquals(doubleSet.has(undefined), true);
+assertEquals(doubleSet.has(1.234), true);
+
+const map = new Map([[, key1], [key2, ]]);
+assertEquals(map.get(undefined), key1);
+assertEquals(map.get(key2), undefined);
+
+const doublesMap = new Map([[, 1.234]]);
+assertEquals(doublesMap.get(undefined), 1.234);
+
+const weakmap = new WeakMap([[key1, ]]);
+assertEquals(weakmap.get(key1), undefined);
+
+assertThrows(() => new WeakSet([, {}]));
+assertThrows(() => new WeakSet([, 1.234]));
+assertThrows(() => new Map([, [, key1]]));
+assertThrows(() => new WeakMap([[, key1]]));
+assertThrows(() => new WeakMap([, [, key1]]));
diff --git a/src/v8/test/mjsunit/regress/regress-785804.js b/src/v8/test/mjsunit/regress/regress-785804.js
new file mode 100644
index 0000000..2dce3be
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/regress-785804.js
@@ -0,0 +1,19 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+let __v_25059 = {
+  valueOf: function () {
+    let __v_25062 = __v_25055.length;
+    __v_25055.length = 1;
+    return __v_25062;
+  }
+};
+let __v_25060 = [];
+for (let __v_25063 = 0; __v_25063 < 1500; __v_25063++) {
+  __v_25060.push("" + 0.1);
+}
+for (let __v_25064 = 0; __v_25064 < 75; __v_25064++) {
+  __v_25055 = __v_25060.slice();
+  __v_25056 = __v_25055.slice(0, __v_25059);
+}
diff --git a/src/v8/test/mjsunit/regress/regress-786573.js b/src/v8/test/mjsunit/regress/regress-786573.js
new file mode 100644
index 0000000..a7d5f37
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/regress-786573.js
@@ -0,0 +1,16 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+let cnt = 0;
+let reg = /./g;
+reg.exec = () => {
+  // Note: it's still possible to trigger OOM by passing huge values here, since
+  // the spec requires building a list of all captures in
+  // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@replace
+  if (cnt++ == 0) return {length: 2 ** 16};
+  cnt = 0;
+  return null;
+};
+
+assertThrows(() => ''.replace(reg, () => {}), RangeError);
diff --git a/src/v8/test/mjsunit/regress/regress-786784.js b/src/v8/test/mjsunit/regress/regress-786784.js
new file mode 100644
index 0000000..fb0f3a9
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/regress-786784.js
@@ -0,0 +1,34 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+function f() {
+  function g(arg) { return arg; }
+  // The closure contains a call IC slot.
+  return function() { return g(42); };
+}
+
+const a = Realm.create();
+const b = Realm.create();
+
+// Create two closures in different contexts sharing the same
+// SharedFunctionInfo (shared due to code caching).
+const x = Realm.eval(a, f.toString() + " f()");
+const y = Realm.eval(b, f.toString() + " f()");
+
+// Run the first closure to create SFI::code.
+x();
+
+// At this point, SFI::code is set and `x` has a feedback vector (`y` does not).
+
+// Enabling block code coverage deoptimizes all functions and triggers the
+// buggy code path in which we'd unconditionally replace JSFunction::code with
+// its SFI::code (but skip feedback vector setup).
+%DebugToggleBlockCoverage(true);
+
+// Still no feedback vector set on `y` but it now contains code. Run it to
+// trigger the crash when attempting to write into the non-existent feedback
+// vector.
+y();
diff --git a/src/v8/test/mjsunit/regress/wasm/regression-694433.js b/src/v8/test/mjsunit/regress/regress-791334.js
similarity index 62%
copy from src/v8/test/mjsunit/regress/wasm/regression-694433.js
copy to src/v8/test/mjsunit/regress/regress-791334.js
index a260e20..9f2748f 100644
--- a/src/v8/test/mjsunit/regress/wasm/regression-694433.js
+++ b/src/v8/test/mjsunit/regress/regress-791334.js
@@ -2,5 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-var size = 0x40000000;
-assertThrows(() => WebAssembly.validate(new Uint16Array(size)), RangeError);
+// MODULE
+
+let foo = () => { return this };
+assertEquals(undefined, foo());
diff --git a/src/v8/test/mjsunit/regress/regress-791345.js b/src/v8/test/mjsunit/regress/regress-791345.js
new file mode 100644
index 0000000..3a92dcd
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/regress-791345.js
@@ -0,0 +1,15 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+(function(a) {
+    var len = 0x80000000;
+    arguments.length = len;
+    Array.prototype.slice.call(arguments, len - 1, len);
+}('a'));
+
+(function(a) {
+    var len = 0x40000000;
+    arguments.length = len;
+    Array.prototype.slice.call(arguments, len - 1, len);
+}('a'));
diff --git a/src/v8/test/mjsunit/regress/regress-791958.js b/src/v8/test/mjsunit/regress/regress-791958.js
new file mode 100644
index 0000000..443ef6e
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/regress-791958.js
@@ -0,0 +1,15 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+obj = {m: print};
+function foo() {
+  for (var x = -536870912; x != -536870903; ++x) {
+    obj.m(-x >= 1000000 ? x % 1000000 : y);
+  }
+}
+foo();
+%OptimizeFunctionOnNextCall(foo);
+foo();
diff --git a/src/v8/test/mjsunit/regress/regress-793588.js b/src/v8/test/mjsunit/regress/regress-793588.js
new file mode 100644
index 0000000..6ad7a76
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/regress-793588.js
@@ -0,0 +1,13 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --harmony-regexp-property
+
+assertNull(/a\P{Any}a/u.exec("a\u{d83d}a"));
+assertEquals(["a\u{d83d}a"], /a\p{Any}a/u.exec("a\u{d83d}a"));
+assertEquals(["a\u{d83d}a"], /(?:a\P{Any}a|a\p{Any}a)/u.exec("a\u{d83d}a"));
+assertNull(/a[\P{Any}]a/u.exec("a\u{d83d}a"));
+assertEquals(["a\u{d83d}a"], /a[^\P{Any}]a/u.exec("a\u{d83d}a"));
+assertEquals(["a\u{d83d}a"], /a[^\P{Any}x]a/u.exec("a\u{d83d}a"));
+assertNull(/a[^\P{Any}x]a/u.exec("axa"));
diff --git a/src/v8/test/mjsunit/regress/wasm/regression-694433.js b/src/v8/test/mjsunit/regress/regress-793793.js
similarity index 60%
copy from src/v8/test/mjsunit/regress/wasm/regression-694433.js
copy to src/v8/test/mjsunit/regress/regress-793793.js
index a260e20..e89c5e5 100644
--- a/src/v8/test/mjsunit/regress/wasm/regression-694433.js
+++ b/src/v8/test/mjsunit/regress/regress-793793.js
@@ -2,5 +2,6 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-var size = 0x40000000;
-assertThrows(() => WebAssembly.validate(new Uint16Array(size)), RangeError);
+// Flags: --harmony-regexp-property
+
+assertThrows(() => new RegExp("\\1(\\P{P\0[}()/", "u"), SyntaxError);
diff --git a/src/v8/test/mjsunit/regress/regress-794822.js b/src/v8/test/mjsunit/regress/regress-794822.js
new file mode 100644
index 0000000..c9b4600
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/regress-794822.js
@@ -0,0 +1,19 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+function* opt(arg = () => arg) {
+  let tmp = opt.x;  // LdaNamedProperty
+  for (;;) {
+    arg;
+    yield;
+    function inner() { tmp }
+    break;
+  }
+}
+
+opt();
+%OptimizeFunctionOnNextCall(opt);
+opt();
diff --git a/src/v8/test/mjsunit/harmony/global-accessors-strict.js b/src/v8/test/mjsunit/regress/regress-794825.js
similarity index 70%
rename from src/v8/test/mjsunit/harmony/global-accessors-strict.js
rename to src/v8/test/mjsunit/regress/regress-794825.js
index 15a581e..3709e8e 100644
--- a/src/v8/test/mjsunit/harmony/global-accessors-strict.js
+++ b/src/v8/test/mjsunit/regress/regress-794825.js
@@ -1,4 +1,4 @@
-// Copyright 2010 the V8 project authors. All rights reserved.
+// Copyright 2017 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:
@@ -25,30 +25,31 @@
 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
-// Test accessors on the global object.
-//
-// Flags: --harmony-strict-legacy-accessor-builtins
+// Flags: --allow-natives-syntax --opt
 
-var x_ = 0;
 
-this.__defineSetter__('x', function(x) { x_ = x; });
-this.__defineGetter__('x', function() { return x_; });
+function* opt() {
+  // The for loop to generate a SwitchOnSmiNoFeedback with holes
+  // at the end since yield will be eliminated.
+  for (;;)
+    if (true) {
+    } else {
+      yield;
+    }
 
-this.__defineSetter__('y', function(x) { });
-this.__defineGetter__('y', function() { return 7; });
-
-function f(a) {
-  x = x + a;
-  return x;
+  // Another loop to force more holes in the constant pool to
+  // verify if bounds checks works when iterating over the jump
+  // table.
+  for (;;)
+    if (true) {
+    } else {
+      yield;
+    }
 }
 
-function g(a) {
-  y = y + a;
-  return y;
-}
-
-assertEquals(1, f(1));
-assertEquals(3, f(2));
-
-assertEquals(7, g(1));
-assertEquals(7, g(2));
+opt();
+// Optimize function to trigger the iteration over jump
+// table.
+%OptimizeFunctionOnNextCall(opt);
+opt();
+assertOptimized(opt);
diff --git a/src/v8/test/mjsunit/regress/regress-796427.js b/src/v8/test/mjsunit/regress/regress-796427.js
new file mode 100644
index 0000000..c09688d
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/regress-796427.js
@@ -0,0 +1,7 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+// Flags: --stack-size=150
+
+assertThrows(() => "" + { toString: Object.prototype.toLocaleString }, RangeError);
diff --git a/src/v8/test/mjsunit/regress/regress-797481.js b/src/v8/test/mjsunit/regress/regress-797481.js
new file mode 100644
index 0000000..7963dbd
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/regress-797481.js
@@ -0,0 +1,10 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --stack-size=100
+
+const a = /x/;
+
+a.exec = RegExp.prototype.test;
+assertThrows(() => RegExp.prototype.test.call(a), RangeError);
diff --git a/src/v8/test/mjsunit/regress/regress-797581.js b/src/v8/test/mjsunit/regress/regress-797581.js
new file mode 100644
index 0000000..17ac0ea
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/regress-797581.js
@@ -0,0 +1,29 @@
+// Copyright 2018 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax --harmony-dynamic-import
+
+function TryToLoadModule(filename, expect_error, token) {
+  let caught_error;
+
+  function SetError(e) {
+    caught_error = e;
+  }
+
+  import(filename).catch(SetError);
+  %RunMicrotasks();
+
+  if (expect_error) {
+    assertTrue(caught_error instanceof SyntaxError);
+    assertEquals("Unexpected token " + token, caught_error.message);
+  } else {
+    assertEquals(undefined, caught_error);
+  }
+}
+
+TryToLoadModule("modules-skip-regress-797581-1.js", true, ")");
+TryToLoadModule("modules-skip-regress-797581-2.js", true, ")");
+TryToLoadModule("modules-skip-regress-797581-3.js", true, "...");
+TryToLoadModule("modules-skip-regress-797581-4.js", true, ",");
+TryToLoadModule("modules-skip-regress-797581-5.js", false);
diff --git a/src/v8/test/mjsunit/regress/regress-799690.js b/src/v8/test/mjsunit/regress/regress-799690.js
new file mode 100644
index 0000000..e7bf143
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/regress-799690.js
@@ -0,0 +1,21 @@
+// Copyright 2018 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --stack-size=500
+
+function asm() {
+  "use asm";
+  function f(a) {
+    a = a | 0;
+    while (1) return 1;
+    return 0;
+  }
+  return { f: f};
+}
+const mod = asm();
+function call_f() {
+  mod.f();
+  call_f();
+}
+assertThrows(call_f, RangeError);
diff --git a/src/v8/test/mjsunit/regress/regress-799813.js b/src/v8/test/mjsunit/regress/regress-799813.js
new file mode 100644
index 0000000..e965ede
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/regress-799813.js
@@ -0,0 +1,42 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+function testAdvanceLastIndex(initial_last_index_value,
+                              expected_final_last_index_value) {
+  let exec_call_count = 0;
+  let last_index_setter_call_count = 0;
+  let final_last_index_value;
+
+  var customRegexp = {
+    get global() { return true; },
+    get unicode() { return true; },
+    get lastIndex() {
+      return initial_last_index_value;
+    },
+    set lastIndex(v) {
+      last_index_setter_call_count++;
+      final_last_index_value = v;
+    },
+    exec() {
+      return (exec_call_count++ == 0) ? [""] : null;
+    }
+  };
+
+  RegExp.prototype[Symbol.replace].call(customRegexp);
+
+  assertEquals(2, exec_call_count);
+  assertEquals(2, last_index_setter_call_count);
+  assertEquals(expected_final_last_index_value, final_last_index_value);
+}
+
+testAdvanceLastIndex(-1, 1);
+testAdvanceLastIndex( 0, 1);
+testAdvanceLastIndex(2**31 - 2, 2**31 - 1);
+testAdvanceLastIndex(2**31 - 1, 2**31 - 0);
+testAdvanceLastIndex(2**32 - 3, 2**32 - 2);
+testAdvanceLastIndex(2**32 - 2, 2**32 - 1);
+testAdvanceLastIndex(2**32 - 1, 2**32 - 0);
+testAdvanceLastIndex(2**53 - 2, 2**53 - 1);
+testAdvanceLastIndex(2**53 - 1, 2**53 - 0);
+testAdvanceLastIndex(2**53 - 0, 2**53 - 0);
diff --git a/src/v8/test/mjsunit/regress/regress-800538.js b/src/v8/test/mjsunit/regress/regress-800538.js
new file mode 100644
index 0000000..bc420d6
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/regress-800538.js
@@ -0,0 +1,6 @@
+// Copyright 2018 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+RegExp.prototype.__defineGetter__("global", () => true);
+assertEquals("/()/g", /()/.toString());
diff --git a/src/v8/test/mjsunit/regress/regress-801171.js b/src/v8/test/mjsunit/regress/regress-801171.js
new file mode 100644
index 0000000..4bd85ee
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/regress-801171.js
@@ -0,0 +1,20 @@
+// Copyright 2018 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+let called_custom_unicode_getter = false;
+const re = /./;
+
+function f() {
+  re.__defineGetter__("unicode", function() {
+    called_custom_unicode_getter = true;
+  });
+  return 2;
+}
+
+assertEquals(["","",], re[Symbol.split]("abc", { valueOf: f }));
+
+// The spec mandates retrieving the regexp instance's flags before
+// ToUint(limit), i.e. the unicode getter must still be unmodified when
+// flags are retrieved.
+assertFalse(called_custom_unicode_getter);
diff --git a/src/v8/test/mjsunit/regress/regress-801772.js b/src/v8/test/mjsunit/regress/regress-801772.js
new file mode 100644
index 0000000..06597e2
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/regress-801772.js
@@ -0,0 +1,9 @@
+// Copyright 2018 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+function foo(f) { f(); }
+
+foo(function arguments() {
+    function skippable() { }
+});
diff --git a/src/v8/test/mjsunit/regress/regress-802060.js b/src/v8/test/mjsunit/regress/regress-802060.js
new file mode 100644
index 0000000..e975615
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/regress-802060.js
@@ -0,0 +1,24 @@
+// Copyright 2018 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+function assertEquals(expected, found) {
+  found.length !== expected.length;
+}
+assertEquals([], [])
+assertEquals("a", "a");
+assertEquals([], []);
+function f() {
+  assertEquals(0, undefined);
+}
+try {
+  f();
+} catch (e) {
+}
+%OptimizeFunctionOnNextCall(f);
+try {
+  f();
+} catch (e) {
+}
diff --git a/src/v8/test/mjsunit/regress/regress-crbug-465564.js b/src/v8/test/mjsunit/regress/regress-crbug-465564.js
index ea0c8dc..383070b 100644
--- a/src/v8/test/mjsunit/regress/regress-crbug-465564.js
+++ b/src/v8/test/mjsunit/regress/regress-crbug-465564.js
@@ -4,4 +4,4 @@
 
 // Flags: --allow-natives-syntax --cache=code
 
-assertEquals(-1, %StringCompare("a", "b"));
+assertTrue(%StringLessThan("a", "b"));
diff --git a/src/v8/test/mjsunit/regress/regress-crbug-570241.js b/src/v8/test/mjsunit/regress/regress-crbug-570241.js
index 4fecba5..1b52f1b 100644
--- a/src/v8/test/mjsunit/regress/regress-crbug-570241.js
+++ b/src/v8/test/mjsunit/regress/regress-crbug-570241.js
@@ -2,6 +2,4 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-// Flags: --harmony-regexp-lookbehind
-
 assertTrue(/(?<=12345123451234512345)/.test("12345123451234512345"));
diff --git a/src/v8/test/mjsunit/regress/regress-crbug-747062.js b/src/v8/test/mjsunit/regress/regress-crbug-747062.js
index 4fe99d3..7e0e92a 100644
--- a/src/v8/test/mjsunit/regress/regress-crbug-747062.js
+++ b/src/v8/test/mjsunit/regress/regress-crbug-747062.js
@@ -35,3 +35,19 @@
   %OptimizeFunctionOnNextCall(foo);
   assertInstanceof(foo(), TypeError);
 })();
+
+(function TestNonCallableFilter() {
+  function foo() { [].filter(undefined); }
+  assertThrows(foo, TypeError);
+  assertThrows(foo, TypeError);
+  %OptimizeFunctionOnNextCall(foo);
+  assertThrows(foo, TypeError);
+})();
+
+(function TestNonCallableFilterCaught() {
+  function foo() { try { [].filter(undefined) } catch(e) { return e } }
+  assertInstanceof(foo(), TypeError);
+  assertInstanceof(foo(), TypeError);
+  %OptimizeFunctionOnNextCall(foo);
+  assertInstanceof(foo(), TypeError);
+})();
diff --git a/src/v8/test/mjsunit/regress/regress-crbug-764219.js b/src/v8/test/mjsunit/regress/regress-crbug-764219.js
new file mode 100644
index 0000000..2a92d66
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/regress-crbug-764219.js
@@ -0,0 +1,35 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+(function() {
+  function f(o) {
+    o.x = 42;
+  };
+
+  f({});
+  f(this);
+  f(this);
+})();
+
+(function() {
+  function f(o) {
+    o.y = 153;
+  };
+
+  Object.setPrototypeOf(this, new Proxy({}, {}));
+  f({});
+  f(this);
+  f(this);
+})();
+
+(function() {
+  function f(o) {
+    o.z = 153;
+  };
+
+  Object.setPrototypeOf(this, new Proxy({get z(){}}, {}));
+  f({});
+  f(this);
+  f(this);
+})();
diff --git a/src/v8/test/mjsunit/regress/regress-crbug-766635.js b/src/v8/test/mjsunit/regress/regress-crbug-766635.js
new file mode 100644
index 0000000..ae0de0a
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/regress-crbug-766635.js
@@ -0,0 +1,32 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+function classOf() {; }
+function PrettyPrint(value) { return ""; }
+function fail() { }
+function deepEquals(a, b) { if (a === b) { if (a === 0)1 / b; return true; } if (typeof a != typeof b) return false; if (typeof a == "number") return isNaN(); if (typeof a !== "object" && typeof a !== "function") return false; var objectClass = classOf(); if (b) return false; if (objectClass === "RegExp") {; } if (objectClass === "Function") return false; if (objectClass === "Array") { var elementCount = 0; if (a.length != b.length) { return false; } for (var i = 0; i < a.length; i++) { if (a[i][i]) return false; } return true; } if (objectClass == "String" || objectClass == "Number" || objectClass == "Boolean" || objectClass == "Date") { if (a.valueOf()) return false; }; }
+assertSame = function assertSame() { if (found === expected) { if (1 / found) return; } else if ((expected !== expected) && (found !== found)) { return; }; }; assertEquals = function assertEquals(expected, found, name_opt) { if (!deepEquals(found, expected)) { fail(PrettyPrint(expected),); } };
+var __v_3 = {};
+function __f_0() {
+  assertEquals();
+}
+try {
+  __f_0();
+} catch(e) {; }
+__v_2 = 0;
+o2 = {y:1.5};
+o2.y = 0;
+o3 = o2.y;
+function __f_1() {
+  for (var __v_1 = 0; __v_1 < 10; __v_1++) {
+    __v_2 += __v_3.x + o3.foo;
+    [ 3].filter(__f_9);
+  }
+}
+__f_1();
+%OptimizeFunctionOnNextCall(__f_1);
+__f_1();
+function __f_9(){ "use __f_9"; assertEquals( this); }
diff --git a/src/v8/test/mjsunit/regress/regress-crbug-768080.js b/src/v8/test/mjsunit/regress/regress-crbug-768080.js
new file mode 100644
index 0000000..cfd1fc1
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/regress-crbug-768080.js
@@ -0,0 +1,64 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+(function TestReflectConstructBogusNewTarget1() {
+  class C {}
+  function g() {
+    Reflect.construct(C, arguments, 23);
+  }
+  function f() {
+    return new g();
+  }
+  new C();  // Warm-up!
+  assertThrows(f, TypeError);
+  assertThrows(f, TypeError);
+  %OptimizeFunctionOnNextCall(f);
+  assertThrows(f, TypeError);
+})();
+
+(function TestReflectConstructBogusNewTarget2() {
+  class C {}
+  // Note that {unescape} is an example of a non-constructable function. If that
+  // ever changes and this test needs to be adapted, make sure to choose another
+  // non-constructable {JSFunction} object instead.
+  function g() {
+    Reflect.construct(C, arguments, unescape);
+  }
+  function f() {
+    return new g();
+  }
+  new C();  // Warm-up!
+  assertThrows(f, TypeError);
+  assertThrows(f, TypeError);
+  %OptimizeFunctionOnNextCall(f);
+  assertThrows(f, TypeError);
+})();
+
+(function TestReflectConstructBogusTarget() {
+  function g() {
+    Reflect.construct(23, arguments);
+  }
+  function f() {
+    return new g();
+  }
+  assertThrows(f, TypeError);
+  assertThrows(f, TypeError);
+  %OptimizeFunctionOnNextCall(f);
+  assertThrows(f, TypeError);
+})();
+
+(function TestReflectApplyBogusTarget() {
+  function g() {
+    Reflect.apply(23, this, arguments);
+  }
+  function f() {
+    return g();
+  }
+  assertThrows(f, TypeError);
+  assertThrows(f, TypeError);
+  %OptimizeFunctionOnNextCall(f);
+  assertThrows(f, TypeError);
+})();
diff --git a/src/v8/test/mjsunit/regress/regress-crbug-768158.js b/src/v8/test/mjsunit/regress/regress-crbug-768158.js
new file mode 100644
index 0000000..f33f0ef
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/regress-crbug-768158.js
@@ -0,0 +1,23 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+// Flags: --always-opt
+
+(function testOriginalRepro() {
+  var result;
+  var dict = { toString() { result = v;} };
+  for (var v of ['fontsize', 'sup']) {
+    String.prototype[v].call(dict);
+    assertEquals(v, result);
+  }
+})();
+
+(function testSimpler() {
+  var result;
+  function setResult() { result = v; }
+  for (var v of ['hello', 'world']) {
+    setResult();
+    assertEquals(v, result);
+  }
+})();
diff --git a/src/v8/test/mjsunit/regress/regress-crbug-768875.js b/src/v8/test/mjsunit/regress/regress-crbug-768875.js
new file mode 100644
index 0000000..4b5ecde
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/regress-crbug-768875.js
@@ -0,0 +1,28 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+this.__defineGetter__('x', function() { return 0; });
+function store_x() {
+  x = 23;
+}
+store_x();
+store_x();
+assertEquals(0, x);
+Realm.eval(Realm.current(), "let x = 42");
+assertEquals(42, x);
+store_x();
+assertEquals(23, x);
+
+
+this.__defineGetter__('y', function() { return 0; });
+function store_y() {
+  y = 23;
+}
+store_y();
+store_y();
+assertEquals(0, y);
+Realm.eval(Realm.current(), "const y = 42");
+assertEquals(42, y);
+assertThrows(store_y, TypeError);
+assertEquals(42, y);
diff --git a/src/v8/test/mjsunit/regress/regress-crbug-770581.js b/src/v8/test/mjsunit/regress/regress-crbug-770581.js
new file mode 100644
index 0000000..64edec9
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/regress-crbug-770581.js
@@ -0,0 +1,22 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+function f(callback) {
+  [Object].forEach(callback);
+}
+
+function message_of_f() {
+  try {
+    f("a teapot");
+  } catch(e) {
+    return String(e);
+  }
+}
+
+assertEquals("TypeError: a teapot is not a function", message_of_f());
+assertEquals("TypeError: a teapot is not a function", message_of_f());
+%OptimizeFunctionOnNextCall(f);
+assertEquals("TypeError: a teapot is not a function", message_of_f());
diff --git a/src/v8/test/mjsunit/regress/regress-crbug-771428.js b/src/v8/test/mjsunit/regress/regress-crbug-771428.js
new file mode 100644
index 0000000..3bebfa1
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/regress-crbug-771428.js
@@ -0,0 +1,24 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+function Module() {
+  "use asm";
+  function f(i) {
+    i = i | 0;
+    switch (i | 0) {
+      case 2:
+        // Exceeds value range.
+        i = 0x1ffffffff;
+        break;
+    }
+    return i | 0;
+  }
+  return f;
+}
+var f = Module();
+assertEquals(0, f(0));
+assertEquals(1, f(1));
+assertEquals(-1, f(2));
+assertFalse(%IsAsmWasmCode(Module));
diff --git a/src/v8/test/mjsunit/regress/regress-crbug-771971.js b/src/v8/test/mjsunit/regress/regress-crbug-771971.js
new file mode 100644
index 0000000..cb40db5
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/regress-crbug-771971.js
@@ -0,0 +1,12 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+function f() { Object.is(); }
+
+f();
+f();
+%OptimizeFunctionOnNextCall(f);
+f();
diff --git a/src/v8/test/mjsunit/regress/regress-crbug-772056.js b/src/v8/test/mjsunit/regress/regress-crbug-772056.js
new file mode 100644
index 0000000..380bae3
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/regress-crbug-772056.js
@@ -0,0 +1,17 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --expose-wasm
+
+load("test/mjsunit/wasm/wasm-constants.js");
+load("test/mjsunit/wasm/wasm-module-builder.js");
+
+var builder = new WasmModuleBuilder();
+builder.addImportedTable("x", "table", 1, 10000000);
+let module = new WebAssembly.Module(builder.toBuffer());
+let table = new WebAssembly.Table({element: "anyfunc",
+  initial: 1, maximum:1000000});
+let instance = new WebAssembly.Instance(module, {x: {table:table}});
+
+assertThrows(() => table.grow(Infinity), RangeError);
diff --git a/src/v8/test/mjsunit/regress/regress-crbug-772610.js b/src/v8/test/mjsunit/regress/regress-crbug-772610.js
new file mode 100644
index 0000000..d68ebbf
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/regress-crbug-772610.js
@@ -0,0 +1,18 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax --verify-heap --expose-gc
+
+function f() {
+  var o = [{
+    [Symbol.toPrimitive]() {}
+  }];
+  %_DeoptimizeNow();
+  return o.length;
+}
+assertEquals(1, f());
+assertEquals(1, f());
+%OptimizeFunctionOnNextCall(f);
+assertEquals(1, f());
+gc();
diff --git a/src/v8/test/mjsunit/regress/regress-crbug-772672.js b/src/v8/test/mjsunit/regress/regress-crbug-772672.js
new file mode 100644
index 0000000..86e7383
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/regress-crbug-772672.js
@@ -0,0 +1,11 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+function foo() { return new Array(120 * 1024); }
+
+foo()[0] = 0.1;
+%OptimizeFunctionOnNextCall(foo);
+foo();
diff --git a/src/v8/test/mjsunit/regress/regress-crbug-772689.js b/src/v8/test/mjsunit/regress/regress-crbug-772689.js
new file mode 100644
index 0000000..32e220d
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/regress-crbug-772689.js
@@ -0,0 +1,23 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+const A = class A extends Array {
+  constructor() {
+    super();
+    this.y = 1;
+  }
+}
+
+function foo(x) {
+  var a = new A();
+  if (x) return a.y;
+}
+
+assertEquals(undefined, foo(false));
+assertEquals(undefined, foo(false));
+%OptimizeFunctionOnNextCall(foo);
+assertEquals(undefined, foo(false));
+assertEquals(1, foo(true));
diff --git a/src/v8/test/mjsunit/regress/regress-crbug-772720.js b/src/v8/test/mjsunit/regress/regress-crbug-772720.js
new file mode 100644
index 0000000..3e359f6
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/regress-crbug-772720.js
@@ -0,0 +1,15 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+var global;
+function f() {
+  var local = 'abcdefghijklmnopqrst';
+  local += 'abcdefghijkl' + (0 + global);
+  global += 'abcdefghijkl';
+}
+f();
+%OptimizeFunctionOnNextCall(f);
+f();
diff --git a/src/v8/test/mjsunit/regress/regress-crbug-772897.js b/src/v8/test/mjsunit/regress/regress-crbug-772897.js
new file mode 100644
index 0000000..c2e4b25
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/regress-crbug-772897.js
@@ -0,0 +1,20 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+function store(obj, name) {
+  return obj[name] = 0;
+}
+
+function f(obj) {
+  var key = {
+    toString() { throw new Error("boom"); }
+  };
+  store(obj, key);
+}
+
+(function() {
+  var proxy = new Proxy({}, {});
+  store(proxy, 0)
+  assertThrows(() => f(proxy), Error);
+})();
diff --git a/src/v8/test/mjsunit/regress/regress-crbug-774459.js b/src/v8/test/mjsunit/regress/regress-crbug-774459.js
new file mode 100644
index 0000000..4263c32
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/regress-crbug-774459.js
@@ -0,0 +1,20 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+(function() {
+  const m = new Map();
+  const k = Math.pow(2, 31) - 1;
+  m.set(k, 1);
+
+  function foo(m, k) {
+    return m.get(k | 0);
+  }
+
+  assertEquals(1, foo(m, k));
+  assertEquals(1, foo(m, k));
+  %OptimizeFunctionOnNextCall(foo);
+  assertEquals(1, foo(m, k));
+})();
diff --git a/src/v8/test/mjsunit/regress/regress-crbug-774860.js b/src/v8/test/mjsunit/regress/regress-crbug-774860.js
new file mode 100644
index 0000000..e0ba5e3
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/regress-crbug-774860.js
@@ -0,0 +1,15 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --expose-gc --verify-heap
+
+(function () {
+  class F extends Function {}
+  let f = new F("'use strict';");
+  // Create enough objects to complete slack tracking.
+  for (let i = 0; i < 20; i++) {
+    new F();
+  }
+  gc();
+})();
diff --git a/src/v8/test/mjsunit/regress/regress-crbug-774994.js b/src/v8/test/mjsunit/regress/regress-crbug-774994.js
new file mode 100644
index 0000000..5810417
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/regress-crbug-774994.js
@@ -0,0 +1,34 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+// Flags: --preparser-scope-analysis
+
+function f() {
+  new class extends Object {
+    constructor() {
+      eval("super(); super.__f_10();");
+    }
+  }
+}
+assertThrows(f, TypeError);
+
+function g() {
+  let obj = {
+    m() {
+      eval("super.foo()");
+    }
+  }
+  obj.m();
+}
+assertThrows(g, TypeError);
+
+function h() {
+  let obj = {
+    get m() {
+      eval("super.foo()");
+    }
+  }
+  obj.m;
+}
+assertThrows(h, TypeError);
diff --git a/src/v8/test/mjsunit/regress/regress-crbug-776511.js b/src/v8/test/mjsunit/regress/regress-crbug-776511.js
new file mode 100644
index 0000000..f757bc2
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/regress-crbug-776511.js
@@ -0,0 +1,35 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --enable-slow-asserts --expose-gc --allow-natives-syntax
+
+function __getProperties(obj) {
+  let properties = [];
+  for (let name of Object.getOwnPropertyNames(obj)) {
+    properties.push(name);
+  }
+  return properties;
+}
+function __getRandomProperty(obj, seed) {
+  let properties = __getProperties(obj);
+  return properties[seed % properties.length];
+}
+(function() {
+  var __v_59904 = [12, 13, 14, 16, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25];
+  var __v_59906 = function(__v_59908) {
+    var __v_59909 = function(__v_59910, __v_59911) {
+      if (__v_59911 == 13 && __v_59908) {
+        __v_59904.abc = 25;
+      }
+      return true;
+    };
+    return __v_59904.filter(__v_59909);
+  };
+  print(__v_59906());
+  __v_59904[__getRandomProperty(__v_59904, 366855)] = this, gc();
+  print(__v_59906());
+  %OptimizeFunctionOnNextCall(__v_59906);
+  var __v_59907 = __v_59906(true);
+  print(__v_59907);
+})();
diff --git a/src/v8/test/mjsunit/regress/regress-crbug-778952.js b/src/v8/test/mjsunit/regress/regress-crbug-778952.js
new file mode 100644
index 0000000..d07c478
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/regress-crbug-778952.js
@@ -0,0 +1,9 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+assertThrows(function() {
+  const p = new Proxy({}, {});
+  (new Set).add(p);  // Compute the hash code for p.
+  null[p] = 0;
+});
diff --git a/src/v8/test/mjsunit/regress/regress-crbug-779344.js b/src/v8/test/mjsunit/regress/regress-crbug-779344.js
new file mode 100644
index 0000000..5198a67
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/regress-crbug-779344.js
@@ -0,0 +1,10 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+var o = {};
+var proxy = new Proxy(() => {}, o);
+o.apply = proxy;
+assertThrows(
+  () => Function.prototype.call.call(proxy)
+);
diff --git a/src/v8/test/mjsunit/regress/regress-crbug-779367.js b/src/v8/test/mjsunit/regress/regress-crbug-779367.js
new file mode 100644
index 0000000..3836b34
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/regress-crbug-779367.js
@@ -0,0 +1,17 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+function g(o) {
+  return o.x;
+}
+
+Object.defineProperty(g, 'x', {set(v) {}});
+
+g.prototype = 1;
+g(g);
+g(g);
+%OptimizeFunctionOnNextCall(g);
+g(g);
diff --git a/src/v8/test/mjsunit/regress/regress-crbug-779457.js b/src/v8/test/mjsunit/regress/regress-crbug-779457.js
new file mode 100644
index 0000000..0e05040
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/regress-crbug-779457.js
@@ -0,0 +1,27 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+(function testEager() {
+  (function({name = [foo] = eval("[]")}) {})({});
+  (function([name = [foo] = eval("[]")]) {})([]);
+})();
+
+(function testLazy() {
+  function f({name = [foo] = eval("[]")}) {}
+  function g([name = [foo] = eval("[]")]) {}
+  f({});
+  g([]);
+})();
+
+(function testEagerArrow() {
+  (({name = [foo] = eval("[]")}) => {})({});
+  (([name = [foo] = eval("[]")]) => {})([]);
+})();
+
+(function testLazyArrow() {
+  var f = ({name = [foo] = eval("[]")}) => {};
+  var g = ([name = [foo] = eval("[]")]) => {};
+  f({});
+  g([]);
+})();
diff --git a/src/v8/test/mjsunit/regress/regress-crbug-781116-1.js b/src/v8/test/mjsunit/regress/regress-crbug-781116-1.js
new file mode 100644
index 0000000..83af7a8
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/regress-crbug-781116-1.js
@@ -0,0 +1,23 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+function baz(obj, store) {
+  if (store === true) obj[0] = 1;
+}
+function bar(store) {
+  baz(Array.prototype, store);
+  baz(this.arguments, true);
+}
+bar(false);
+bar(false);
+%OptimizeFunctionOnNextCall(bar);
+bar(true);
+
+function foo() { [].push(); }
+foo();
+foo();
+%OptimizeFunctionOnNextCall(foo);
+foo();
diff --git a/src/v8/test/mjsunit/regress/regress-crbug-781116-2.js b/src/v8/test/mjsunit/regress/regress-crbug-781116-2.js
new file mode 100644
index 0000000..f8ffbe8
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/regress-crbug-781116-2.js
@@ -0,0 +1,23 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+function baz(obj, store) {
+  if (store === true) obj[0] = 1;
+}
+function bar(store) {
+  baz(Object.prototype, store);
+  baz(this.arguments, true);
+}
+bar(false);
+bar(false);
+%OptimizeFunctionOnNextCall(bar);
+bar(true);
+
+function foo() { [].push(); }
+foo();
+foo();
+%OptimizeFunctionOnNextCall(foo);
+foo();
diff --git a/src/v8/test/mjsunit/regress/regress-crbug-781506-1.js b/src/v8/test/mjsunit/regress/regress-crbug-781506-1.js
new file mode 100644
index 0000000..6048fb9
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/regress-crbug-781506-1.js
@@ -0,0 +1,12 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+function foo(a) { return a[0]; }
+
+assertEquals(undefined, foo(x => x));
+assertEquals(undefined, foo({}));
+%OptimizeFunctionOnNextCall(foo);
+assertEquals(undefined, foo(x => x));
diff --git a/src/v8/test/mjsunit/regress/regress-crbug-781506-2.js b/src/v8/test/mjsunit/regress/regress-crbug-781506-2.js
new file mode 100644
index 0000000..71801df
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/regress-crbug-781506-2.js
@@ -0,0 +1,13 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+function foo(o) { return o[0]; }
+
+assertEquals(undefined, foo({}));
+Array.prototype[0] = 0;
+assertEquals(undefined, foo({}));
+%OptimizeFunctionOnNextCall(foo);
+assertEquals(undefined, foo({}));
diff --git a/src/v8/test/mjsunit/regress/regress-crbug-781506-3.js b/src/v8/test/mjsunit/regress/regress-crbug-781506-3.js
new file mode 100644
index 0000000..70b29896
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/regress-crbug-781506-3.js
@@ -0,0 +1,13 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+function foo(a, i) { return a[i] + 0.5; }
+
+foo({}, 1);
+Array.prototype.unshift(1.5);
+assertTrue(Number.isNaN(foo({}, 1)));
+%OptimizeFunctionOnNextCall(foo);
+assertTrue(Number.isNaN(foo({}, 1)));
diff --git a/src/v8/test/mjsunit/regress/regress-crbug-781583.js b/src/v8/test/mjsunit/regress/regress-crbug-781583.js
new file mode 100644
index 0000000..fd14ad7
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/regress-crbug-781583.js
@@ -0,0 +1,25 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+function* generator(a) {
+  a.pop().next();
+}
+
+function prepareGenerators(n) {
+  var a = [{ next: () => 0 }];
+  for (var i = 0; i < n; ++i) {
+    a.push(generator(a));
+  }
+  return a;
+}
+
+var gens1 = prepareGenerators(10);
+assertDoesNotThrow(() => gens1.pop().next());
+
+%OptimizeFunctionOnNextCall(generator);
+
+var gens2 = prepareGenerators(200000);
+assertThrows(() => gens2.pop().next(), RangeError);
diff --git a/src/v8/test/mjsunit/regress/regress-crbug-783132.js b/src/v8/test/mjsunit/regress/regress-crbug-783132.js
new file mode 100644
index 0000000..600a6bf
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/regress-crbug-783132.js
@@ -0,0 +1,15 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --verify-heap
+
+function f(o, v) {
+  try {
+    f(o, v + 1);
+  } catch (e) {
+  }
+  o[v] = 43.35 + v * 5.3;
+}
+
+f(Array.prototype, 0);
diff --git a/src/v8/test/mjsunit/regress/wasm/regression-694433.js b/src/v8/test/mjsunit/regress/regress-crbug-783902.js
similarity index 62%
copy from src/v8/test/mjsunit/regress/wasm/regression-694433.js
copy to src/v8/test/mjsunit/regress/regress-crbug-783902.js
index a260e20..6739704 100644
--- a/src/v8/test/mjsunit/regress/wasm/regression-694433.js
+++ b/src/v8/test/mjsunit/regress/regress-crbug-783902.js
@@ -2,5 +2,10 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-var size = 0x40000000;
-assertThrows(() => WebAssembly.validate(new Uint16Array(size)), RangeError);
+class A {}
+
+class B extends A {
+  *gf() {
+    yield super.f();
+  }
+}
diff --git a/src/v8/test/mjsunit/regress/regress-crbug-784835.js b/src/v8/test/mjsunit/regress/regress-crbug-784835.js
new file mode 100644
index 0000000..340e3cf
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/regress-crbug-784835.js
@@ -0,0 +1,13 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+function foo(o, k) { return o[k]; }
+
+var a = [1,2];
+a["-1"] = 42;
+
+assertEquals(1, foo(a, 0));
+assertEquals(2, foo(a, 1));
+assertEquals(undefined, foo(a, 3));
+assertEquals(42, foo(a, -1));
diff --git a/src/v8/test/mjsunit/regress/wasm/regression-694433.js b/src/v8/test/mjsunit/regress/regress-crbug-786020.js
similarity index 61%
copy from src/v8/test/mjsunit/regress/wasm/regression-694433.js
copy to src/v8/test/mjsunit/regress/regress-crbug-786020.js
index a260e20..fbad074 100644
--- a/src/v8/test/mjsunit/regress/wasm/regression-694433.js
+++ b/src/v8/test/mjsunit/regress/regress-crbug-786020.js
@@ -2,5 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-var size = 0x40000000;
-assertThrows(() => WebAssembly.validate(new Uint16Array(size)), RangeError);
+// Flags: --allow-natives-syntax
+
+%SetAllocationTimeout(1000, 90);
+(new constructor)[0x40000000] = null;
diff --git a/src/v8/test/mjsunit/regress/regress-crbug-786723.js b/src/v8/test/mjsunit/regress/regress-crbug-786723.js
new file mode 100644
index 0000000..d4e0957
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/regress-crbug-786723.js
@@ -0,0 +1,19 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax --expose-gc --function-context-specialization
+
+function f() {
+  var o = {};
+  function g() {
+    o.x = 1;
+    return Object.create(o);
+  };
+  gc();
+  o.x = 10;
+  %OptimizeFunctionOnNextCall(g);
+  g();
+}
+f();
+f();
diff --git a/src/v8/test/mjsunit/regress/regress-crbug-789764.js b/src/v8/test/mjsunit/regress/regress-crbug-789764.js
new file mode 100644
index 0000000..c377e64
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/regress-crbug-789764.js
@@ -0,0 +1,15 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original repro (used to crash):
+_v3 = ({ _v7 = (function outer() {
+        for ([...[]][function inner() {}] in []) {
+        }
+      })} = {}) => {
+};
+_v3();
+
+// Smaller repro (used to crash):
+a = (b = !function outer() { for (function inner() {}.foo in []) {} }) => {};
+a();
diff --git a/src/v8/test/mjsunit/regress/regress-crbug-791245-1.js b/src/v8/test/mjsunit/regress/regress-crbug-791245-1.js
new file mode 100644
index 0000000..0d51f8a
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/regress-crbug-791245-1.js
@@ -0,0 +1,18 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+const s = new Map;
+
+function foo(s) {
+  const i = s[Symbol.iterator]();
+  i.next();
+  return i;
+}
+
+console.log(foo(s));
+console.log(foo(s));
+%OptimizeFunctionOnNextCall(foo);
+console.log(foo(s));
diff --git a/src/v8/test/mjsunit/regress/regress-crbug-791245-2.js b/src/v8/test/mjsunit/regress/regress-crbug-791245-2.js
new file mode 100644
index 0000000..6734ed2
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/regress-crbug-791245-2.js
@@ -0,0 +1,18 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+const s = new Set;
+
+function foo(s) {
+  const i = s[Symbol.iterator]();
+  i.next();
+  return i;
+}
+
+console.log(foo(s));
+console.log(foo(s));
+%OptimizeFunctionOnNextCall(foo);
+console.log(foo(s));
diff --git a/src/v8/test/mjsunit/regress/regress-crbug-791256.js b/src/v8/test/mjsunit/regress/regress-crbug-791256.js
new file mode 100644
index 0000000..bf9fc25
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/regress-crbug-791256.js
@@ -0,0 +1,12 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original repro. A DCHECK used to fire.
+(function* (name = (eval(foo), foo, prototype)) { });
+
+// Simpler repro.
+(function (name = (foo, bar, baz) ) { });
+
+// A test which uses the value of the n-ary operation.
+(function (param = (0, 1, 2)) { assertEquals(2, param); })();
diff --git a/src/v8/test/mjsunit/regress/regress-crbug-795922.js b/src/v8/test/mjsunit/regress/regress-crbug-795922.js
new file mode 100644
index 0000000..da2b367
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/regress-crbug-795922.js
@@ -0,0 +1,9 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+assertThrows(
+  // Should throw a syntax error, but not crash.
+  "({ __proto__: null, __proto__: 1 })",
+  SyntaxError
+);
diff --git a/src/v8/test/mjsunit/regress/regress-crbug-798026.js b/src/v8/test/mjsunit/regress/regress-crbug-798026.js
new file mode 100644
index 0000000..46cd150
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/regress-crbug-798026.js
@@ -0,0 +1,14 @@
+// Copyright 2018 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+// Flags: --expose-gc
+
+array = new Array(4 * 1024 * 1024);
+Set.prototype.add = value => {
+  if (array.length != 1) {
+    array.length = 1;
+    gc();
+  }
+}
+new Set(array);
diff --git a/src/v8/test/mjsunit/regress/regress-crbug-798644.js b/src/v8/test/mjsunit/regress/regress-crbug-798644.js
new file mode 100644
index 0000000..c878a6f
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/regress-crbug-798644.js
@@ -0,0 +1,21 @@
+// Copyright 2018 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+let arr = [];
+// Make the array large enough to trigger re-checking for compaction.
+arr[1000] = 0x1234;
+
+arr.__defineGetter__(256, function () {
+    // Remove the getter so we can compact the array.
+    delete arr[256];
+    // Trigger compaction.
+    arr.unshift(1.1);
+});
+
+let results = Object.entries(arr);
+%HeapObjectVerify(results);
+%HeapObjectVerify(arr);
+let str = results.toString();
diff --git a/src/v8/test/mjsunit/regress/regress-crbug-800032.js b/src/v8/test/mjsunit/regress/regress-crbug-800032.js
new file mode 100644
index 0000000..7c9206c
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/regress-crbug-800032.js
@@ -0,0 +1,22 @@
+// Copyright 2018 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax --expose-gc
+
+
+class Derived extends RegExp {
+  constructor(a) {
+    // Syntax Error
+    const a = 1;
+  }
+}
+
+let o = Reflect.construct(RegExp, [], Derived);
+%HeapObjectVerify(o);
+// Check that we can properly access lastIndex.
+assertEquals(o.lastIndex, 0);
+o.lastIndex = 1;
+assertEquals(o.lastIndex, 1);
+o.lastIndex = 0;
+gc();
diff --git a/src/v8/test/mjsunit/regress/regress-crbug-800077.js b/src/v8/test/mjsunit/regress/regress-crbug-800077.js
new file mode 100644
index 0000000..1367907
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/regress-crbug-800077.js
@@ -0,0 +1,6 @@
+// Copyright 2018 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+var sample = new Float64Array(1);
+Reflect.has(sample, undefined);
diff --git a/src/v8/test/mjsunit/regress/regress-crbug-800810.js b/src/v8/test/mjsunit/regress/regress-crbug-800810.js
new file mode 100644
index 0000000..22ac388
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/regress-crbug-800810.js
@@ -0,0 +1,13 @@
+// Copyright 2018 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+var array = [];
+Object.defineProperty(array , 506519, {});
+Object.defineProperty(array , 3, {
+  get: function () {
+      Object.defineProperty(array , undefined, {
+   })
+  }
+});
+array.includes(61301);
diff --git a/src/v8/test/mjsunit/regress/regress-crbug-801627.js b/src/v8/test/mjsunit/regress/regress-crbug-801627.js
new file mode 100644
index 0000000..0e51fff
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/regress-crbug-801627.js
@@ -0,0 +1,24 @@
+// Copyright 2018 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax --enable-slow-asserts
+
+class Base {
+  constructor() {
+    this.x = 1;
+  }
+}
+
+class Derived extends Base {
+  constructor() {
+    super();
+  }
+}
+
+// Feed a bound function as new.target
+// to the profiler, so HeapObjectMatcher
+// can find it.
+Reflect.construct(Derived, [], Object.bind());
+%OptimizeFunctionOnNextCall(Derived);
+new Derived();
diff --git a/src/v8/test/mjsunit/regress/regress-crbug-806388.js b/src/v8/test/mjsunit/regress/regress-crbug-806388.js
new file mode 100644
index 0000000..b55b501
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/regress-crbug-806388.js
@@ -0,0 +1,20 @@
+// Copyright 2018 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax --enable-slow-asserts --expose-gc
+
+class Derived extends Array {
+    constructor(a) {
+      // Syntax Error.
+      const a = 1;
+    }
+}
+
+// Derived is not a subclass of RegExp
+let o = Reflect.construct(RegExp, [], Derived);
+o.lastIndex = 0x1234;
+%HeapObjectVerify(o);
+
+gc();
+%HeapObjectVerify(o);
diff --git a/src/v8/test/mjsunit/regress/regress-crbug-807096.js b/src/v8/test/mjsunit/regress/regress-crbug-807096.js
new file mode 100644
index 0000000..845120d
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/regress-crbug-807096.js
@@ -0,0 +1,27 @@
+// Copyright 2018 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+// Flags: --allow-natives-syntax --no-lazy
+
+// For regression testing, it's important that these functions are:
+// 1) toplevel
+// 2) arrow functions with single-expression bodies
+// 3) eagerly compiled
+
+let f = ({a = (({b = {a = c} = {
+  a: 0x1234
+}}) => 1)({})}, c) => 1;
+
+assertThrows(() => f({}), ReferenceError);
+
+let g = ({a = (async ({b = {a = c} = {
+  a: 0x1234
+}}) => 1)({})}, c) => a;
+
+testAsync(assert => {
+  assert.plan(1);
+  g({}).catch(e => {
+    assert.equals("ReferenceError", e.name);
+  });
+});
diff --git a/src/v8/test/mjsunit/regress/regress-crbug-808192.js b/src/v8/test/mjsunit/regress/regress-crbug-808192.js
new file mode 100644
index 0000000..3336c00
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/regress-crbug-808192.js
@@ -0,0 +1,32 @@
+// Copyright 2018 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// TODO(cbruni): enable always opt once v8:7438
+// Flags: --expose-gc --no-always-opt
+
+const f = eval(`(function f(i) {
+  if (i == 0) {
+    class Derived extends Object {
+      constructor() {
+        super();
+        ${"this.a=1;".repeat(0x3fffe-8)}
+      }
+    }
+    return Derived;
+  }
+
+  class DerivedN extends f(i-1) {
+    constructor() {
+      super();
+      ${"this.a=1;".repeat(0x40000-8)}
+    }
+  }
+
+  return DerivedN;
+})`);
+
+let a = new (f(0x7ff))();
+a.a = 1;
+gc();
+assertEquals(1, a.a);
diff --git a/src/v8/test/mjsunit/regress/regress-crbug-813427.js b/src/v8/test/mjsunit/regress/regress-crbug-813427.js
new file mode 100644
index 0000000..95fa015
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/regress-crbug-813427.js
@@ -0,0 +1,49 @@
+// Copyright 2018 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+// Create {count} property assignments.
+function createPropertiesAssignment(count) {
+  let result = "";
+  for (let i = 0; i < count; i++) {
+    result += "this.p"+i+" = undefined;";
+  }
+  return result;
+}
+
+function testSubclassProtoProperties(count) {
+  const MyClass = eval(`(class MyClass {
+    constructor() {
+      ${createPropertiesAssignment(count)}
+    }
+  });`);
+
+  class BaseClass {};
+  class SubClass extends BaseClass {
+    constructor() {
+        super()
+    }
+  };
+
+  const boundMyClass = MyClass.bind();
+  %HeapObjectVerify(boundMyClass);
+
+  SubClass.__proto__ = boundMyClass;
+  var instance = new SubClass();
+
+  %HeapObjectVerify(instance);
+  // Create some more instances to complete in-object slack tracking.
+  let results = [];
+  for (let i = 0; i < 4000; i++) {
+    results.push(new SubClass());
+  }
+  var instance = new SubClass();
+  %HeapObjectVerify(instance);
+}
+
+
+for (let count = 0; count < 10; count++) {
+  testSubclassProtoProperties(count);
+}
diff --git a/src/v8/test/mjsunit/regress/regress-v8-6906.js b/src/v8/test/mjsunit/regress/regress-v8-6906.js
new file mode 100644
index 0000000..72aa985
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/regress-v8-6906.js
@@ -0,0 +1,15 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+function f() {}
+
+f();
+f();
+%OptimizeFunctionOnNextCall(f);
+f();
+%DeoptimizeFunction(f);
+
+%DisassembleFunction(f);
diff --git a/src/v8/test/mjsunit/regress/regress-v8-6940.js b/src/v8/test/mjsunit/regress/regress-v8-6940.js
new file mode 100644
index 0000000..c5bb6a9
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/regress-v8-6940.js
@@ -0,0 +1,9 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+assertTrue(/[ŸÅ¶]/i.test('ÿ'));
+assertTrue(/[ŸY]/i.test('ÿ'));
+
+assertTrue(/[YݟŶỲ]/i.test('ÿ'));
+assertTrue(/[YݟŶỲ]/iu.test('ÿ'));
diff --git a/src/v8/test/mjsunit/regress/wasm/regression-694433.js b/src/v8/test/mjsunit/regress/regress-v8-7245.js
similarity index 62%
copy from src/v8/test/mjsunit/regress/wasm/regression-694433.js
copy to src/v8/test/mjsunit/regress/regress-v8-7245.js
index a260e20..c1a9df2 100644
--- a/src/v8/test/mjsunit/regress/wasm/regression-694433.js
+++ b/src/v8/test/mjsunit/regress/regress-v8-7245.js
@@ -2,5 +2,5 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-var size = 0x40000000;
-assertThrows(() => WebAssembly.validate(new Uint16Array(size)), RangeError);
+const { revoke } = Proxy.revocable({}, {});
+assertEquals("", revoke.name);
diff --git a/src/v8/test/mjsunit/regress/string-compare-memcmp.js b/src/v8/test/mjsunit/regress/string-compare-memcmp.js
index 45f4734..aedffca 100644
--- a/src/v8/test/mjsunit/regress/string-compare-memcmp.js
+++ b/src/v8/test/mjsunit/regress/string-compare-memcmp.js
@@ -4,4 +4,4 @@
 
 // Flags: --allow-natives-syntax
 
-assertEquals(-1, %StringCompare("abc\u0102", "abc\u0201"));
+assertTrue(%StringLessThan("abc\u0102", "abc\u0201"));
diff --git a/src/v8/test/mjsunit/regress/wasm/regression-02256.js b/src/v8/test/mjsunit/regress/wasm/regress-02256.js
similarity index 100%
rename from src/v8/test/mjsunit/regress/wasm/regression-02256.js
rename to src/v8/test/mjsunit/regress/wasm/regress-02256.js
diff --git a/src/v8/test/mjsunit/regress/wasm/regression-02256b.js b/src/v8/test/mjsunit/regress/wasm/regress-02256b.js
similarity index 100%
rename from src/v8/test/mjsunit/regress/wasm/regression-02256b.js
rename to src/v8/test/mjsunit/regress/wasm/regress-02256b.js
diff --git a/src/v8/test/mjsunit/regress/wasm/regression-02862.js b/src/v8/test/mjsunit/regress/wasm/regress-02862.js
similarity index 100%
rename from src/v8/test/mjsunit/regress/wasm/regression-02862.js
rename to src/v8/test/mjsunit/regress/wasm/regress-02862.js
diff --git a/src/v8/test/mjsunit/regress/wasm/regression-5531.js b/src/v8/test/mjsunit/regress/wasm/regress-5531.js
similarity index 100%
rename from src/v8/test/mjsunit/regress/wasm/regression-5531.js
rename to src/v8/test/mjsunit/regress/wasm/regress-5531.js
diff --git a/src/v8/test/mjsunit/regress/wasm/regression-5800.js b/src/v8/test/mjsunit/regress/wasm/regress-5800.js
similarity index 100%
rename from src/v8/test/mjsunit/regress/wasm/regression-5800.js
rename to src/v8/test/mjsunit/regress/wasm/regress-5800.js
diff --git a/src/v8/test/mjsunit/regress/wasm/regression-5884.js b/src/v8/test/mjsunit/regress/wasm/regress-5884.js
similarity index 100%
rename from src/v8/test/mjsunit/regress/wasm/regression-5884.js
rename to src/v8/test/mjsunit/regress/wasm/regress-5884.js
diff --git a/src/v8/test/mjsunit/regress/wasm/regression-6054.js b/src/v8/test/mjsunit/regress/wasm/regress-6054.js
similarity index 100%
rename from src/v8/test/mjsunit/regress/wasm/regression-6054.js
rename to src/v8/test/mjsunit/regress/wasm/regress-6054.js
diff --git a/src/v8/test/mjsunit/regress/wasm/regression-6164.js b/src/v8/test/mjsunit/regress/wasm/regress-6164.js
similarity index 100%
rename from src/v8/test/mjsunit/regress/wasm/regression-6164.js
rename to src/v8/test/mjsunit/regress/wasm/regress-6164.js
diff --git a/src/v8/test/mjsunit/regress/wasm/regression-643595.js b/src/v8/test/mjsunit/regress/wasm/regress-643595.js
similarity index 100%
rename from src/v8/test/mjsunit/regress/wasm/regression-643595.js
rename to src/v8/test/mjsunit/regress/wasm/regress-643595.js
diff --git a/src/v8/test/mjsunit/regress/wasm/regression-644682.js b/src/v8/test/mjsunit/regress/wasm/regress-644682.js
similarity index 100%
rename from src/v8/test/mjsunit/regress/wasm/regression-644682.js
rename to src/v8/test/mjsunit/regress/wasm/regress-644682.js
diff --git a/src/v8/test/mjsunit/regress/wasm/regression-647649.js b/src/v8/test/mjsunit/regress/wasm/regress-647649.js
similarity index 100%
rename from src/v8/test/mjsunit/regress/wasm/regression-647649.js
rename to src/v8/test/mjsunit/regress/wasm/regress-647649.js
diff --git a/src/v8/test/mjsunit/regress/wasm/regression-648079.js b/src/v8/test/mjsunit/regress/wasm/regress-648079.js
similarity index 100%
rename from src/v8/test/mjsunit/regress/wasm/regression-648079.js
rename to src/v8/test/mjsunit/regress/wasm/regress-648079.js
diff --git a/src/v8/test/mjsunit/regress/wasm/regression-651961.js b/src/v8/test/mjsunit/regress/wasm/regress-651961.js
similarity index 100%
rename from src/v8/test/mjsunit/regress/wasm/regression-651961.js
rename to src/v8/test/mjsunit/regress/wasm/regress-651961.js
diff --git a/src/v8/test/mjsunit/regress/wasm/regression-654377.js b/src/v8/test/mjsunit/regress/wasm/regress-654377.js
similarity index 100%
rename from src/v8/test/mjsunit/regress/wasm/regression-654377.js
rename to src/v8/test/mjsunit/regress/wasm/regress-654377.js
diff --git a/src/v8/test/mjsunit/regress/wasm/regression-663994.js b/src/v8/test/mjsunit/regress/wasm/regress-663994.js
similarity index 100%
rename from src/v8/test/mjsunit/regress/wasm/regression-663994.js
rename to src/v8/test/mjsunit/regress/wasm/regress-663994.js
diff --git a/src/v8/test/mjsunit/regress/wasm/regression-666741.js b/src/v8/test/mjsunit/regress/wasm/regress-666741.js
similarity index 100%
rename from src/v8/test/mjsunit/regress/wasm/regression-666741.js
rename to src/v8/test/mjsunit/regress/wasm/regress-666741.js
diff --git a/src/v8/test/mjsunit/regress/wasm/regression-667745.js b/src/v8/test/mjsunit/regress/wasm/regress-667745.js
similarity index 100%
rename from src/v8/test/mjsunit/regress/wasm/regression-667745.js
rename to src/v8/test/mjsunit/regress/wasm/regress-667745.js
diff --git a/src/v8/test/mjsunit/regress/wasm/regression-670683.js b/src/v8/test/mjsunit/regress/wasm/regress-670683.js
similarity index 100%
rename from src/v8/test/mjsunit/regress/wasm/regression-670683.js
rename to src/v8/test/mjsunit/regress/wasm/regress-670683.js
diff --git a/src/v8/test/mjsunit/regress/wasm/regression-674447.js b/src/v8/test/mjsunit/regress/wasm/regress-674447.js
similarity index 100%
rename from src/v8/test/mjsunit/regress/wasm/regression-674447.js
rename to src/v8/test/mjsunit/regress/wasm/regress-674447.js
diff --git a/src/v8/test/mjsunit/regress/wasm/regression-680938.js b/src/v8/test/mjsunit/regress/wasm/regress-680938.js
similarity index 100%
rename from src/v8/test/mjsunit/regress/wasm/regression-680938.js
rename to src/v8/test/mjsunit/regress/wasm/regress-680938.js
diff --git a/src/v8/test/mjsunit/regress/wasm/regression-684858.js b/src/v8/test/mjsunit/regress/wasm/regress-684858.js
similarity index 100%
rename from src/v8/test/mjsunit/regress/wasm/regression-684858.js
rename to src/v8/test/mjsunit/regress/wasm/regress-684858.js
diff --git a/src/v8/test/mjsunit/regress/wasm/regression-688876.js b/src/v8/test/mjsunit/regress/wasm/regress-688876.js
similarity index 100%
rename from src/v8/test/mjsunit/regress/wasm/regression-688876.js
rename to src/v8/test/mjsunit/regress/wasm/regress-688876.js
diff --git a/src/v8/test/mjsunit/regress/wasm/regression-689450.js b/src/v8/test/mjsunit/regress/wasm/regress-689450.js
similarity index 100%
rename from src/v8/test/mjsunit/regress/wasm/regression-689450.js
rename to src/v8/test/mjsunit/regress/wasm/regress-689450.js
diff --git a/src/v8/test/mjsunit/regress/wasm/regress-6931.js b/src/v8/test/mjsunit/regress/wasm/regress-6931.js
new file mode 100644
index 0000000..364e95a
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/wasm/regress-6931.js
@@ -0,0 +1,30 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+
+load('test/mjsunit/wasm/wasm-constants.js');
+load('test/mjsunit/wasm/wasm-module-builder.js');
+
+
+// This test checks for accidental sign extension. The Wasm spec says we do
+// arbitrary precision unsigned arithmetic to compute the memory address,
+// meaning this test should do 0xfffffffc + 8, which is 0x100000004 and out of
+// bounds. However, if we interpret 0xfffffffc as -4, then the result is 4 and
+// succeeds erroneously.
+
+
+(function() {
+  let builder = new WasmModuleBuilder();
+  builder.addMemory(1, 1, false);
+  builder.addFunction('test', kSig_v_v)
+      .addBody([
+        kExprI32Const, 0x7c, // address = -4
+        kExprI32Const, 0,
+        kExprI32StoreMem, 0, 8, // align = 0, offset = 8
+      ])
+      .exportFunc();
+  let module = builder.instantiate();
+
+  assertTraps(kTrapMemOutOfBounds, module.exports.test);
+})();
diff --git a/src/v8/test/mjsunit/regress/wasm/regress-694433.js b/src/v8/test/mjsunit/regress/wasm/regress-694433.js
new file mode 100644
index 0000000..b63f390
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/wasm/regress-694433.js
@@ -0,0 +1,14 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --expose-gc
+
+var size = Math.floor(0xFFFFFFFF / 4) + 1;
+(function() {
+  // Note: On 32 bit, this throws in the Uint16Array constructor (size does not
+  // fit in a Smi). On 64 bit, it throws in WebAssembly.validate, because the
+  // size exceeds the internal module size limit.
+  assertThrows(() => WebAssembly.validate(new Uint16Array(size)), RangeError);
+})();
+gc();
diff --git a/src/v8/test/mjsunit/regress/wasm/regression-698587.js b/src/v8/test/mjsunit/regress/wasm/regress-698587.js
similarity index 100%
rename from src/v8/test/mjsunit/regress/wasm/regression-698587.js
rename to src/v8/test/mjsunit/regress/wasm/regress-698587.js
diff --git a/src/v8/test/mjsunit/regress/wasm/regression-699485.js b/src/v8/test/mjsunit/regress/wasm/regress-699485.js
similarity index 100%
rename from src/v8/test/mjsunit/regress/wasm/regression-699485.js
rename to src/v8/test/mjsunit/regress/wasm/regress-699485.js
diff --git a/src/v8/test/mjsunit/regress/wasm/regression-702460.js b/src/v8/test/mjsunit/regress/wasm/regress-702460.js
similarity index 100%
rename from src/v8/test/mjsunit/regress/wasm/regression-702460.js
rename to src/v8/test/mjsunit/regress/wasm/regress-702460.js
diff --git a/src/v8/test/mjsunit/regress/wasm/regression-702839.js b/src/v8/test/mjsunit/regress/wasm/regress-702839.js
similarity index 100%
rename from src/v8/test/mjsunit/regress/wasm/regression-702839.js
rename to src/v8/test/mjsunit/regress/wasm/regress-702839.js
diff --git a/src/v8/test/mjsunit/regress/wasm/regress-7033.js b/src/v8/test/mjsunit/regress/wasm/regress-7033.js
new file mode 100644
index 0000000..17d79c8
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/wasm/regress-7033.js
@@ -0,0 +1,20 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+load('test/mjsunit/wasm/wasm-constants.js');
+load('test/mjsunit/wasm/wasm-module-builder.js');
+
+var builder = new WasmModuleBuilder();
+builder.addFunction('test', kSig_i_iii)
+    .addBodyWithEnd([
+      kExprI32Const, 0x07,  // i32.const 7
+      kExprI32Const, 0x00,  // i32.const 0
+      kExprI32Const, 0x00,  // i32.const 0
+      kExprI32And,          // i32.and
+      kExprI32And,          // i32.and
+      kExprEnd,             // -
+    ])
+    .exportFunc();
+var module = builder.instantiate();
+assertEquals(0, module.exports.test());
diff --git a/src/v8/test/mjsunit/regress/wasm/regress-7035.js b/src/v8/test/mjsunit/regress/wasm/regress-7035.js
new file mode 100644
index 0000000..cd69c7d
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/wasm/regress-7035.js
@@ -0,0 +1,31 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+load('test/mjsunit/wasm/wasm-constants.js');
+load('test/mjsunit/wasm/wasm-module-builder.js');
+
+var builder = new WasmModuleBuilder();
+builder.addFunction('test', kSig_i_iii)
+    .addBodyWithEnd([
+      kExprI32Const, 0x00,  // i32.const 0
+      kExprI32Const, 0x00,  // i32.const 0
+      kExprI32Add,          // i32.add -> 0
+      kExprI32Const, 0x00,  // i32.const 0
+      kExprI32Const, 0x00,  // i32.const 0
+      kExprI32Add,          // i32.add -> 0
+      kExprI32Add,          // i32.add -> 0
+      kExprI32Const, 0x01,  // i32.const 1
+      kExprI32Const, 0x00,  // i32.const 0
+      kExprI32Add,          // i32.add -> 1
+      kExprBlock,    0x7f,  // @39 i32
+      kExprI32Const, 0x00,  // i32.const 0
+      kExprBr,       0x00,  // depth=0
+      kExprEnd,             // @90
+      kExprI32Add,          // i32.add -> 1
+      kExprI32Add,          // i32.add -> 1
+      kExprEnd
+    ])
+    .exportFunc();
+var module = builder.instantiate();
+assertEquals(1, module.exports.test());
diff --git a/src/v8/test/mjsunit/regress/wasm/regression-703568.js b/src/v8/test/mjsunit/regress/wasm/regress-703568.js
similarity index 100%
rename from src/v8/test/mjsunit/regress/wasm/regression-703568.js
rename to src/v8/test/mjsunit/regress/wasm/regress-703568.js
diff --git a/src/v8/test/mjsunit/regress/wasm/regress-7049.js b/src/v8/test/mjsunit/regress/wasm/regress-7049.js
new file mode 100644
index 0000000..b9ad1a0
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/wasm/regress-7049.js
@@ -0,0 +1,54 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax --expose-gc
+
+load('test/mjsunit/wasm/wasm-constants.js');
+load('test/mjsunit/wasm/wasm-module-builder.js');
+
+// Build two instances, instance 2 is interpreted, and calls instance 1 (via
+// C_WASM_ENTRY), instance 1 then calls JS, which triggers GC.
+
+let builder1 = new WasmModuleBuilder();
+
+function call_gc() {
+  print('Triggering GC.');
+  gc();
+  print('Survived GC.');
+}
+let func1_sig = makeSig(new Array(8).fill(kWasmI32), [kWasmI32]);
+let imp = builder1.addImport('q', 'gc', kSig_v_v);
+let func1 = builder1.addFunction('func1', func1_sig)
+                .addBody([
+                  kExprGetLocal, 0,  // -
+                  kExprCallFunction, imp
+                ])
+                .exportFunc();
+let instance1 = builder1.instantiate({q: {gc: call_gc}});
+
+let builder2 = new WasmModuleBuilder();
+
+let func1_imp = builder2.addImport('q', 'func1', func1_sig);
+let func2 = builder2.addFunction('func2', kSig_i_i)
+                .addBody([
+                  kExprGetLocal, 0,  // 1
+                  kExprGetLocal, 0,  // 2
+                  kExprGetLocal, 0,  // 3
+                  kExprGetLocal, 0,  // 4
+                  kExprGetLocal, 0,  // 5
+                  kExprGetLocal, 0,  // 6
+                  kExprGetLocal, 0,  // 7
+                  kExprGetLocal, 0,  // 8
+                  kExprCallFunction, func1_imp
+                ])
+                .exportFunc();
+
+let instance2 = builder2.instantiate({q: {func1: instance1.exports.func1}});
+
+%RedirectToWasmInterpreter(
+        instance2, parseInt(instance2.exports.func2.name));
+
+// Call with 1. This will be passed by the C_WASM_ENTRY via the stack, and the
+// GC will try to dereference it (before the bug fix).
+instance2.exports.func2(1);
diff --git a/src/v8/test/mjsunit/regress/wasm/regression-708714.js b/src/v8/test/mjsunit/regress/wasm/regress-708714.js
similarity index 100%
rename from src/v8/test/mjsunit/regress/wasm/regression-708714.js
rename to src/v8/test/mjsunit/regress/wasm/regress-708714.js
diff --git a/src/v8/test/mjsunit/regress/wasm/regression-710844.js b/src/v8/test/mjsunit/regress/wasm/regress-710844.js
similarity index 100%
rename from src/v8/test/mjsunit/regress/wasm/regression-710844.js
rename to src/v8/test/mjsunit/regress/wasm/regress-710844.js
diff --git a/src/v8/test/mjsunit/regress/wasm/regression-711203.js b/src/v8/test/mjsunit/regress/wasm/regress-711203.js
similarity index 100%
rename from src/v8/test/mjsunit/regress/wasm/regression-711203.js
rename to src/v8/test/mjsunit/regress/wasm/regress-711203.js
diff --git a/src/v8/test/mjsunit/regress/wasm/regression-715216-a.js b/src/v8/test/mjsunit/regress/wasm/regress-715216a.js
similarity index 100%
rename from src/v8/test/mjsunit/regress/wasm/regression-715216-a.js
rename to src/v8/test/mjsunit/regress/wasm/regress-715216a.js
diff --git a/src/v8/test/mjsunit/regress/wasm/regression-715216-b.js b/src/v8/test/mjsunit/regress/wasm/regress-715216b.js
similarity index 100%
rename from src/v8/test/mjsunit/regress/wasm/regression-715216-b.js
rename to src/v8/test/mjsunit/regress/wasm/regress-715216b.js
diff --git a/src/v8/test/mjsunit/regress/wasm/regression-717056.js b/src/v8/test/mjsunit/regress/wasm/regress-717056.js
similarity index 100%
rename from src/v8/test/mjsunit/regress/wasm/regression-717056.js
rename to src/v8/test/mjsunit/regress/wasm/regress-717056.js
diff --git a/src/v8/test/mjsunit/regress/wasm/regression-717194.js b/src/v8/test/mjsunit/regress/wasm/regress-717194.js
similarity index 100%
rename from src/v8/test/mjsunit/regress/wasm/regression-717194.js
rename to src/v8/test/mjsunit/regress/wasm/regress-717194.js
diff --git a/src/v8/test/mjsunit/regress/wasm/regression-719175.js b/src/v8/test/mjsunit/regress/wasm/regress-719175.js
similarity index 100%
rename from src/v8/test/mjsunit/regress/wasm/regression-719175.js
rename to src/v8/test/mjsunit/regress/wasm/regress-719175.js
diff --git a/src/v8/test/mjsunit/regress/wasm/regression-722445.js b/src/v8/test/mjsunit/regress/wasm/regress-722445.js
similarity index 100%
rename from src/v8/test/mjsunit/regress/wasm/regression-722445.js
rename to src/v8/test/mjsunit/regress/wasm/regress-722445.js
diff --git a/src/v8/test/mjsunit/regress/wasm/regression-724846.js b/src/v8/test/mjsunit/regress/wasm/regress-724846.js
similarity index 100%
rename from src/v8/test/mjsunit/regress/wasm/regression-724846.js
rename to src/v8/test/mjsunit/regress/wasm/regress-724846.js
diff --git a/src/v8/test/mjsunit/regress/wasm/regression-724851.js b/src/v8/test/mjsunit/regress/wasm/regress-724851.js
similarity index 100%
rename from src/v8/test/mjsunit/regress/wasm/regression-724851.js
rename to src/v8/test/mjsunit/regress/wasm/regress-724851.js
diff --git a/src/v8/test/mjsunit/regress/wasm/regression-724972.js b/src/v8/test/mjsunit/regress/wasm/regress-724972.js
similarity index 100%
rename from src/v8/test/mjsunit/regress/wasm/regression-724972.js
rename to src/v8/test/mjsunit/regress/wasm/regress-724972.js
diff --git a/src/v8/test/mjsunit/regress/wasm/regression-727219.js b/src/v8/test/mjsunit/regress/wasm/regress-727219.js
similarity index 100%
rename from src/v8/test/mjsunit/regress/wasm/regression-727219.js
rename to src/v8/test/mjsunit/regress/wasm/regress-727219.js
diff --git a/src/v8/test/mjsunit/regress/wasm/regression-727222.js b/src/v8/test/mjsunit/regress/wasm/regress-727222.js
similarity index 100%
rename from src/v8/test/mjsunit/regress/wasm/regression-727222.js
rename to src/v8/test/mjsunit/regress/wasm/regress-727222.js
diff --git a/src/v8/test/mjsunit/regress/wasm/regression-727560.js b/src/v8/test/mjsunit/regress/wasm/regress-727560.js
similarity index 100%
rename from src/v8/test/mjsunit/regress/wasm/regression-727560.js
rename to src/v8/test/mjsunit/regress/wasm/regress-727560.js
diff --git a/src/v8/test/mjsunit/regress/wasm/regression-729991.js b/src/v8/test/mjsunit/regress/wasm/regress-729991.js
similarity index 100%
rename from src/v8/test/mjsunit/regress/wasm/regression-729991.js
rename to src/v8/test/mjsunit/regress/wasm/regress-729991.js
diff --git a/src/v8/test/mjsunit/regress/wasm/regression-731351.js b/src/v8/test/mjsunit/regress/wasm/regress-731351.js
similarity index 100%
rename from src/v8/test/mjsunit/regress/wasm/regression-731351.js
rename to src/v8/test/mjsunit/regress/wasm/regress-731351.js
diff --git a/src/v8/test/mjsunit/regress/wasm/regression-734108.js b/src/v8/test/mjsunit/regress/wasm/regress-734108.js
similarity index 100%
rename from src/v8/test/mjsunit/regress/wasm/regression-734108.js
rename to src/v8/test/mjsunit/regress/wasm/regress-734108.js
diff --git a/src/v8/test/mjsunit/regress/wasm/regression-734246.js b/src/v8/test/mjsunit/regress/wasm/regress-734246.js
similarity index 100%
rename from src/v8/test/mjsunit/regress/wasm/regression-734246.js
rename to src/v8/test/mjsunit/regress/wasm/regress-734246.js
diff --git a/src/v8/test/mjsunit/regress/wasm/regression-734345.js b/src/v8/test/mjsunit/regress/wasm/regress-734345.js
similarity index 100%
rename from src/v8/test/mjsunit/regress/wasm/regression-734345.js
rename to src/v8/test/mjsunit/regress/wasm/regress-734345.js
diff --git a/src/v8/test/mjsunit/regress/wasm/regression-736584.js b/src/v8/test/mjsunit/regress/wasm/regress-736584.js
similarity index 100%
rename from src/v8/test/mjsunit/regress/wasm/regression-736584.js
rename to src/v8/test/mjsunit/regress/wasm/regress-736584.js
diff --git a/src/v8/test/mjsunit/regress/wasm/regression-737069.js b/src/v8/test/mjsunit/regress/wasm/regress-737069.js
similarity index 100%
rename from src/v8/test/mjsunit/regress/wasm/regression-737069.js
rename to src/v8/test/mjsunit/regress/wasm/regress-737069.js
diff --git a/src/v8/test/mjsunit/regress/wasm/regression-739768.js b/src/v8/test/mjsunit/regress/wasm/regress-739768.js
similarity index 100%
rename from src/v8/test/mjsunit/regress/wasm/regression-739768.js
rename to src/v8/test/mjsunit/regress/wasm/regress-739768.js
diff --git a/src/v8/test/mjsunit/regress/wasm/regression-753496.js b/src/v8/test/mjsunit/regress/wasm/regress-753496.js
similarity index 100%
rename from src/v8/test/mjsunit/regress/wasm/regression-753496.js
rename to src/v8/test/mjsunit/regress/wasm/regress-753496.js
diff --git a/src/v8/test/mjsunit/regress/wasm/regression-757217.js b/src/v8/test/mjsunit/regress/wasm/regress-757217.js
similarity index 100%
rename from src/v8/test/mjsunit/regress/wasm/regression-757217.js
rename to src/v8/test/mjsunit/regress/wasm/regress-757217.js
diff --git a/src/v8/test/mjsunit/regress/wasm/regression-763439.js b/src/v8/test/mjsunit/regress/wasm/regress-763439.js
similarity index 100%
rename from src/v8/test/mjsunit/regress/wasm/regression-763439.js
rename to src/v8/test/mjsunit/regress/wasm/regress-763439.js
diff --git a/src/v8/test/mjsunit/regress/wasm/regression-763697.js b/src/v8/test/mjsunit/regress/wasm/regress-763697.js
similarity index 100%
rename from src/v8/test/mjsunit/regress/wasm/regression-763697.js
rename to src/v8/test/mjsunit/regress/wasm/regress-763697.js
diff --git a/src/v8/test/mjsunit/regress/wasm/regress-766003.js b/src/v8/test/mjsunit/regress/wasm/regress-766003.js
new file mode 100644
index 0000000..d8a1ea1
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/wasm/regress-766003.js
@@ -0,0 +1,17 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --expose-wasm --wasm-interpret-all
+
+load('test/mjsunit/wasm/wasm-constants.js');
+load('test/mjsunit/wasm/wasm-module-builder.js');
+
+ __v_6 = new WasmModuleBuilder();
+__v_6.addFunction('exp1', kSig_i_i).addBody([kExprUnreachable]).exportFunc();
+ __v_7 = new WasmModuleBuilder();
+ __v_7.addImport('__v_11', '__v_11', kSig_i_i);
+try {
+; } catch(e) {; }
+ __v_8 = __v_6.instantiate().exports.exp1;
+ __v_9 = __v_7.instantiate({__v_11: {__v_11: __v_8}}).exports.call_imp;
diff --git a/src/v8/test/mjsunit/regress/wasm/regression-769846.js b/src/v8/test/mjsunit/regress/wasm/regress-769846.js
similarity index 100%
rename from src/v8/test/mjsunit/regress/wasm/regression-769846.js
rename to src/v8/test/mjsunit/regress/wasm/regress-769846.js
diff --git a/src/v8/test/mjsunit/regress/wasm/regress-771243.js b/src/v8/test/mjsunit/regress/wasm/regress-771243.js
new file mode 100644
index 0000000..e1581fc
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/wasm/regress-771243.js
@@ -0,0 +1,39 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --expose-wasm --wasm-interpret-all
+
+load('test/mjsunit/wasm/wasm-constants.js');
+load('test/mjsunit/wasm/wasm-module-builder.js');
+
+assertThrows(() => {
+ __v_29 = 0;
+function __f_1() {
+ __v_19 = new WasmModuleBuilder();
+  if (__v_25) {
+ __v_23 = __v_19.addImport('__v_24', '__v_30', __v_25);
+  }
+  if (__v_18) {
+ __v_19.addMemory();
+ __v_19.addFunction('load', kSig_i_i)
+        .addBody([ 0])
+        .exportFunc();
+  }
+ return __v_19;
+}
+ (function TestExternalCallBetweenTwoWasmModulesWithoutAndWithMemory() {
+ __v_21 = __f_1(__v_18 = false, __v_25 = kSig_i_i);
+ __v_21.addFunction('plus_one', kSig_i_i)
+      .addBody([
+        kExprGetLocal, 0,                   // -
+        kExprCallFunction, __v_29      ])
+      .exportFunc();
+ __v_32 =
+      __f_1(__v_18 = true, __v_25 = undefined);
+ __v_31 = __v_32.instantiate(); try { __v_32[__getRandomProperty()] = __v_0; delete __v_18[__getRandomProperty()]; delete __v_34[__getRandomProperty()]; } catch(e) {; };
+ __v_20 = __v_21.instantiate(
+      {__v_24: {__v_30: __v_31.exports.load}});
+ __v_20.exports.plus_one(); __v_33 = __v_43;
+})();
+});
diff --git a/src/v8/test/mjsunit/regress/wasm/regress-772332.js b/src/v8/test/mjsunit/regress/wasm/regress-772332.js
new file mode 100644
index 0000000..56e6f2c
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/wasm/regress-772332.js
@@ -0,0 +1,33 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --expose-wasm --wasm-interpret-all
+
+load('test/mjsunit/wasm/wasm-constants.js');
+load('test/mjsunit/wasm/wasm-module-builder.js');
+
+assertThrows(() => {
+let __v_50315 = 0;
+function __f_15356(__v_50316, __v_50317) {
+  let __v_50318 = new WasmModuleBuilder();
+  if (__v_50317) {
+    let __v_50319 = __v_50318.addImport('import_module', 'other_module_fn', kSig_i_i);
+  }
+      __v_50318.addMemory();
+      __v_50318.addFunction('load', kSig_i_i).addBody([ 0, 0, 0]).exportFunc();
+  return __v_50318;
+}
+  (function __f_15357() {
+    let __v_50320 = __f_15356(__v_50350 = false, __v_50351 = kSig_i_i);
+      __v_50320.addFunction('plus_one', kSig_i_i).addBody([kExprGetLocal, 0, kExprCallFunction, __v_50315, kExprI32Const, kExprI32Add, kExprReturn]).exportFunc();
+    let __v_50321 = __f_15356();
+    let __v_50324 = __v_50321.instantiate();
+    let __v_50325 = __v_50320.instantiate({
+      import_module: {
+        other_module_fn: __v_50324.exports.load
+      }
+    });
+ __v_50325.exports.plus_one();
+  })();
+});
diff --git a/src/v8/test/mjsunit/regress/wasm/regress-775366.js b/src/v8/test/mjsunit/regress/wasm/regress-775366.js
new file mode 100644
index 0000000..e8db923
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/wasm/regress-775366.js
@@ -0,0 +1,29 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+load('test/mjsunit/wasm/wasm-constants.js');
+
+(function BadTypeSection() {
+  var data = bytes(
+    kWasmH0,
+    kWasmH1,
+    kWasmH2,
+    kWasmH3,
+
+    kWasmV0,
+    kWasmV1,
+    kWasmV2,
+    kWasmV3,
+
+    kTypeSectionCode,
+    5,
+    2,
+    0x60,
+    0,
+    0,
+    13
+  );
+
+  assertFalse(WebAssembly.validate(data));
+})();
diff --git a/src/v8/test/mjsunit/regress/wasm/regress-775710.js b/src/v8/test/mjsunit/regress/wasm/regress-775710.js
new file mode 100644
index 0000000..5e6fb8c
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/wasm/regress-775710.js
@@ -0,0 +1,20 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --validate-asm --allow-natives-syntax
+
+const kMaxLocals = 50000;
+const fn_template = '"use asm";\nfunction f() { LOCALS }\nreturn f;';
+for (var num_locals = kMaxLocals; num_locals < kMaxLocals + 2; ++num_locals) {
+  const fn_code = fn_template.replace(
+      'LOCALS',
+      Array(num_locals)
+          .fill()
+          .map((_, idx) => 'var l' + idx + ' = 0;')
+          .join('\n'));
+  const asm_fn = new Function(fn_code);
+  const f = asm_fn();
+  f();
+  assertEquals(num_locals <= kMaxLocals, %IsAsmWasmCode(asm_fn));
+}
diff --git a/src/v8/test/mjsunit/regress/wasm/regress-776677.js b/src/v8/test/mjsunit/regress/wasm/regress-776677.js
new file mode 100644
index 0000000..1b2357d
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/wasm/regress-776677.js
@@ -0,0 +1,30 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+function module(stdlib,foreign,buffer) {
+  "use asm";
+  var fl = new stdlib.Uint32Array(buffer);
+  function f1(x) {
+    x = x | 0;
+    fl[0] = x;
+    fl[0x10000] = x;
+    fl[0x100000] = x;
+  }
+  return f1;
+}
+
+var global = {Uint32Array:Uint32Array};
+var env = {};
+memory = new WebAssembly.Memory({initial:200});
+var buffer = memory.buffer;
+evil_f = module(global,env,buffer);
+
+zz = {};
+zz.toString = function() {
+  Array.prototype.slice.call([]);
+  return 0xffffffff;
+}
+evil_f(3);
+assertThrows(() => memory.grow(1), RangeError);
+evil_f(zz);
diff --git a/src/v8/test/mjsunit/regress/wasm/regress-778917.js b/src/v8/test/mjsunit/regress/wasm/regress-778917.js
new file mode 100644
index 0000000..083f1d1
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/wasm/regress-778917.js
@@ -0,0 +1,20 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --expose-wasm --wasm-interpret-all
+
+load("test/mjsunit/wasm/wasm-constants.js");
+load("test/mjsunit/wasm/wasm-module-builder.js");
+
+
+const builder = new WasmModuleBuilder();
+
+const index = builder.addFunction("huge_frame", kSig_v_v)
+    .addBody([kExprCallFunction, 0])
+  .addLocals({f64_count: 49555}).exportFunc().index;
+// We assume above that the function we added has index 0.
+assertEquals(0, index);
+
+const module = builder.instantiate();
+assertThrows(module.exports.huge_frame, RangeError);
diff --git a/src/v8/test/mjsunit/regress/wasm/regress-782280.js b/src/v8/test/mjsunit/regress/wasm/regress-782280.js
new file mode 100644
index 0000000..a94f061
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/wasm/regress-782280.js
@@ -0,0 +1,33 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+load('test/mjsunit/wasm/wasm-constants.js');
+load('test/mjsunit/wasm/wasm-module-builder.js');
+
+var builder = new WasmModuleBuilder();
+builder.addFunction('test', kSig_i_iii)
+    .addBodyWithEnd([
+      kExprI32Const, 0,          // 0
+      kExprI32Const, 0,          // 0, 0
+      kExprI32Add,               // 0 + 0 -> 0
+      kExprI32Const, 0,          // 0, 0
+      kExprI32Const, 0,          // 0, 0, 0
+      kExprI32Add,               // 0, 0 + 0 -> 0
+      kExprDrop,                 // 0
+      kExprDrop,                 // -
+      kExprI32Const, 0,          // 0
+      kExprI32Const, 0,          // 0, 0
+      kExprI32Add,               // 0 + 0 -> 0
+      kExprI32Const, 0,          // 0, 0
+      kExprI32Const, 1,          // 0, 0, 1
+      kExprI32Add,               // 0, 0 + 1 -> 1
+      kExprBlock,    kWasmStmt,  // 0, 1
+      kExprBr,       0,          // 0, 1
+      kExprEnd,                  // 0, 1
+      kExprI32Add,               // 0 + 1 -> 1
+      kExprEnd
+    ])
+    .exportFunc();
+var module = builder.instantiate();
+assertEquals(1, module.exports.test());
diff --git a/src/v8/test/mjsunit/regress/wasm/regress-784050.js b/src/v8/test/mjsunit/regress/wasm/regress-784050.js
new file mode 100644
index 0000000..8f1a790
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/wasm/regress-784050.js
@@ -0,0 +1,25 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+load('test/mjsunit/wasm/wasm-constants.js');
+load('test/mjsunit/wasm/wasm-module-builder.js');
+
+var builder = new WasmModuleBuilder();
+builder.addFunction('test', kSig_v_v)
+    .addBodyWithEnd([
+      kExprI32Const,    0x0,   // const 0
+      kExprI32Const,    0x0,   // const 0
+      kExprBrIf,        0x00,  // br depth=0
+      kExprLoop,        0x7f,  // loop i32
+      kExprBlock,       0x7f,  // block i32
+      kExprI32Const,    0x0,   // const 0
+      kExprBr,          0x00,  // br depth=0
+      kExprEnd,                // end
+      kExprBr,          0x00,  // br depth=0
+      kExprEnd,                // end
+      kExprUnreachable,        // unreachable
+      kExprEnd,                // end
+    ])
+    .exportFunc();
+builder.instantiate();
diff --git a/src/v8/test/mjsunit/regress/wasm/regress-789952.js b/src/v8/test/mjsunit/regress/wasm/regress-789952.js
new file mode 100644
index 0000000..f73d8dc
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/wasm/regress-789952.js
@@ -0,0 +1,40 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+let module_size = 19;
+let string_len = 0x00fffff0 - module_size;
+
+print("Allocating backing store: " + (string_len + module_size));
+let backing = new ArrayBuffer(string_len + module_size);
+
+print("Allocating typed array buffer");
+let buffer = new Uint8Array(backing);
+
+print("Filling...");
+buffer.fill(0x41);
+
+print("Setting up array buffer");
+// Magic
+buffer.set([0x00, 0x61, 0x73, 0x6D], 0);
+// Version
+buffer.set([0x01, 0x00, 0x00, 0x00], 4);
+// kUnknownSection (0)
+buffer.set([0], 8);
+// Section length
+buffer.set([0x80, 0x80, 0x80, 0x80, 0x00],  9);
+// Name length
+let x = string_len + 1;
+let b1 = ((x >> 0) & 0x7F) | 0x80;
+let b2 = ((x >> 7) & 0x7F) | 0x80;
+let b3 = ((x >> 14) & 0x7F) | 0x80;
+let b4 = ((x >> 21) & 0x7F);
+//buffer.set([0xDE, 0xFF, 0xFF, 0x7F], 14);
+ buffer.set([b1, b2, b3, b4], 14);
+
+print("Parsing module...");
+let m = new WebAssembly.Module(buffer);
+
+print("Triggering!");
+let c = WebAssembly.Module.customSections(m, "A".repeat(string_len + 1));
+assertEquals(0, c.length);
diff --git a/src/v8/test/mjsunit/regress/wasm/regress-791810.js b/src/v8/test/mjsunit/regress/wasm/regress-791810.js
new file mode 100644
index 0000000..cd6c4e2
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/wasm/regress-791810.js
@@ -0,0 +1,21 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+load('test/mjsunit/wasm/wasm-constants.js');
+load('test/mjsunit/wasm/wasm-module-builder.js');
+
+const builder = new WasmModuleBuilder();
+builder.addFunction('test', kSig_i_i)
+    .addBody([
+      kExprGetLocal, 0x00,    // get_local 0
+      kExprBlock, kWasmStmt,  // block
+      kExprBr, 0x00,          // br depth=0
+      kExprEnd,               // end
+      kExprBlock, kWasmStmt,  // block
+      kExprBr, 0x00,          // br depth=0
+      kExprEnd,               // end
+      kExprBr, 0x00,          // br depth=0
+    ])
+    .exportFunc();
+builder.instantiate();
diff --git a/src/v8/test/mjsunit/regress/wasm/regress-793551.js b/src/v8/test/mjsunit/regress/wasm/regress-793551.js
new file mode 100644
index 0000000..8aa0241
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/wasm/regress-793551.js
@@ -0,0 +1,20 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+load('test/mjsunit/wasm/wasm-constants.js');
+load('test/mjsunit/wasm/wasm-module-builder.js');
+
+const builder = new WasmModuleBuilder();
+builder.addFunction('test', kSig_i_i)
+    .addBody([
+      // body:
+      kExprGetLocal, 0,      // get_local 0
+      kExprGetLocal, 0,      // get_local 0
+      kExprLoop, kWasmStmt,  // loop
+      kExprBr, 0,            // br depth=0
+      kExprEnd,              // end
+      kExprUnreachable,      // unreachable
+    ])
+    .exportFunc();
+builder.instantiate();
diff --git a/src/v8/test/mjsunit/regress/wasm/regress-797846.js b/src/v8/test/mjsunit/regress/wasm/regress-797846.js
new file mode 100644
index 0000000..6a4fd5c
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/wasm/regress-797846.js
@@ -0,0 +1,14 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+load('test/mjsunit/wasm/wasm-constants.js');
+load('test/mjsunit/wasm/wasm-module-builder.js');
+
+// We need a module with one valid function.
+const builder = new WasmModuleBuilder();
+builder.addFunction('test', kSig_v_v).addBody([]);
+
+const buffer = builder.toBuffer();
+assertPromiseResult(
+    WebAssembly.compile(buffer), _ => Realm.createAllowCrossRealmAccess());
diff --git a/src/v8/test/mjsunit/regress/wasm/regress-800756.js b/src/v8/test/mjsunit/regress/wasm/regress-800756.js
new file mode 100644
index 0000000..2d29997
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/wasm/regress-800756.js
@@ -0,0 +1,15 @@
+// Copyright 2018 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+load('test/mjsunit/wasm/wasm-constants.js');
+load('test/mjsunit/wasm/wasm-module-builder.js');
+
+const builder = new WasmModuleBuilder();
+builder.addMemory(16, 32);
+builder.addFunction(undefined, kSig_i_iii).addBody([
+  kExprI32Const, 0,         // i32.const 0
+  kExprI32LoadMem8S, 0, 0,  // i32.load8_s offset=0 align=0
+  kExprI32Eqz,              // i32.eqz
+]);
+builder.instantiate();
diff --git a/src/v8/test/mjsunit/regress/wasm/regress-801850.js b/src/v8/test/mjsunit/regress/wasm/regress-801850.js
new file mode 100644
index 0000000..ad6ff4c
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/wasm/regress-801850.js
@@ -0,0 +1,11 @@
+// Copyright 2018 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+load('test/mjsunit/wasm/wasm-constants.js');
+load('test/mjsunit/wasm/wasm-module-builder.js');
+
+var builder = new WasmModuleBuilder();
+let module = new WebAssembly.Module(builder.toBuffer());
+var worker = new Worker('onmessage = function() {};');
+worker.postMessage(module)
diff --git a/src/v8/test/mjsunit/regress/wasm/regress-802244.js b/src/v8/test/mjsunit/regress/wasm/regress-802244.js
new file mode 100644
index 0000000..0b8decb
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/wasm/regress-802244.js
@@ -0,0 +1,22 @@
+// Copyright 2018 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+load('test/mjsunit/wasm/wasm-constants.js');
+load('test/mjsunit/wasm/wasm-module-builder.js');
+
+const builder = new WasmModuleBuilder();
+builder.addFunction(undefined, kSig_v_iii).addBody([
+  kExprI32Const, 0x41,  // i32.const 0x41
+  kExprLoop, 0x7c,      // loop f64
+  kExprGetLocal, 0x00,  // get_local 0
+  kExprGetLocal, 0x01,  // get_local 1
+  kExprBrIf, 0x01,      // br_if depth=1
+  kExprGetLocal, 0x00,  // get_local 0
+  kExprI32Rol,          // i32.rol
+  kExprBrIf, 0x00,      // br_if depth=0
+  kExprUnreachable,     // unreachable
+  kExprEnd,             // end
+  kExprUnreachable,     // unreachable
+]);
+builder.instantiate();
diff --git a/src/v8/test/mjsunit/regress/wasm/regress-808980.js b/src/v8/test/mjsunit/regress/wasm/regress-808980.js
new file mode 100644
index 0000000..884572b
--- /dev/null
+++ b/src/v8/test/mjsunit/regress/wasm/regress-808980.js
@@ -0,0 +1,28 @@
+// Copyright 2018 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax --throws
+
+load('test/mjsunit/wasm/wasm-constants.js');
+load('test/mjsunit/wasm/wasm-module-builder.js');
+let kTableSize = 3;
+
+var builder = new WasmModuleBuilder();
+var sig_index1 = builder.addType(kSig_i_v);
+builder.addFunction('main', kSig_i_ii).addBody([
+    kExprGetLocal,
+    0,
+    kExprCallIndirect,
+    sig_index1,
+    kTableZero
+]).exportAs('main');
+builder.setFunctionTableBounds(kTableSize, kTableSize);
+var m1_bytes = builder.toBuffer();
+var m1 = new WebAssembly.Module(m1_bytes);
+
+var serialized_m1 = %SerializeWasmModule(m1);
+var m1_clone = %DeserializeWasmModule(serialized_m1, m1_bytes);
+var i1 = new WebAssembly.Instance(m1_clone);
+
+i1.exports.main(123123);
diff --git a/src/v8/test/mjsunit/serialize-after-execute.js b/src/v8/test/mjsunit/serialize-after-execute.js
new file mode 100644
index 0000000..a3e6bc8
--- /dev/null
+++ b/src/v8/test/mjsunit/serialize-after-execute.js
@@ -0,0 +1,15 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --cache=after-execute
+
+function g() {
+  function h() {
+    function k() { return 0; };
+    return k;
+  }
+  return h();
+}
+
+g();
diff --git a/src/v8/test/mjsunit/serialize-embedded-error.js b/src/v8/test/mjsunit/serialize-embedded-error.js
index 473c931..320fe47 100644
--- a/src/v8/test/mjsunit/serialize-embedded-error.js
+++ b/src/v8/test/mjsunit/serialize-embedded-error.js
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-// --serialize-toplevel --cache=code
+// --cache=code
 
 var caught = false;
 try {
diff --git a/src/v8/test/mjsunit/serialize-ic.js b/src/v8/test/mjsunit/serialize-ic.js
index 8e5cd2f..74821a9 100644
--- a/src/v8/test/mjsunit/serialize-ic.js
+++ b/src/v8/test/mjsunit/serialize-ic.js
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-// Flags: --cache=code --serialize-toplevel
+// Flags: --cache=code
 
 var foo = [];
 foo[0] = "bar";
diff --git a/src/v8/test/mjsunit/skipping-inner-functions.js b/src/v8/test/mjsunit/skipping-inner-functions.js
index fdd1a21..e228b25 100644
--- a/src/v8/test/mjsunit/skipping-inner-functions.js
+++ b/src/v8/test/mjsunit/skipping-inner-functions.js
@@ -338,3 +338,30 @@
   }
   lazy();
 })();
+
+(function TestSloppyBlockFunctionShadowingCatchVariable() {
+  // Regression test for
+  // https://bugs.chromium.org/p/chromium/issues/detail?id=771474
+  function lazy() {
+    try {
+    } catch (my_var) {
+      if (false) {
+        function my_var() { }
+      }
+    }
+  }
+  lazy();
+})();
+
+
+(function TestLazinessDecisionWithDefaultConstructors() {
+  // Regression test for
+  // https://bugs.chromium.org/p/chromium/issues/detail?id=773576
+
+  // The problem was that Parser and PreParser treated default constructors
+  // differently, and that threw off the "next / previous function is likely
+  // called" logic.
+
+  function lazy(p = (function() {}, class {}, function() {}, class { method1() { } })) { }
+  lazy();
+})();
diff --git a/src/v8/test/mjsunit/splice-proxy.js b/src/v8/test/mjsunit/splice-proxy.js
new file mode 100644
index 0000000..d33a2ef
--- /dev/null
+++ b/src/v8/test/mjsunit/splice-proxy.js
@@ -0,0 +1,13 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+var array = [];
+var proxy = new Proxy(new Proxy(array, {}), {});
+var Ctor = function() {};
+var result;
+
+array.constructor = function() {};
+array.constructor[Symbol.species] = Ctor;
+
+Array.prototype.slice.call(proxy);
diff --git a/src/v8/test/mjsunit/string-equal.js b/src/v8/test/mjsunit/string-equal.js
new file mode 100644
index 0000000..26aac23
--- /dev/null
+++ b/src/v8/test/mjsunit/string-equal.js
@@ -0,0 +1,17 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+(function() {
+  const s = '\u8765abc';
+
+  assertTrue(s === s);
+  assertFalse(s === 'abc');
+  assertFalse('abc' === s);
+  assertTrue(s.slice(-3) === 'abc');
+  assertTrue('abc' === s.slice(-3));
+  assertTrue(s.slice(0, 1) === '\u8765');
+  assertTrue('\u8765' === s.slice(0, 1));
+  assertTrue(s === '' + s);
+  assertTrue('' + s === s);
+})();
diff --git a/src/v8/test/mjsunit/testcfg.py b/src/v8/test/mjsunit/testcfg.py
index 869ab26..bc9d69f 100644
--- a/src/v8/test/mjsunit/testcfg.py
+++ b/src/v8/test/mjsunit/testcfg.py
@@ -31,7 +31,6 @@
 from testrunner.local import testsuite
 from testrunner.objects import testcase
 
-FLAGS_PATTERN = re.compile(r"//\s+Flags:(.*)")
 FILES_PATTERN = re.compile(r"//\s+Files:(.*)")
 ENV_PATTERN = re.compile(r"//\s+Environment Variables:(.*)")
 SELF_SCRIPT_PATTERN = re.compile(r"//\s+Env: TEST_FILE_NAME")
@@ -39,11 +38,7 @@
 NO_HARNESS_PATTERN = re.compile(r"^// NO HARNESS$", flags=re.MULTILINE)
 
 
-class MjsunitTestSuite(testsuite.TestSuite):
-
-  def __init__(self, name, root):
-    super(MjsunitTestSuite, self).__init__(name, root)
-
+class TestSuite(testsuite.TestSuite):
   def ListTests(self, context):
     tests = []
     for dirname, dirs, files in os.walk(self.root, followlinks=True):
@@ -56,16 +51,19 @@
           fullpath = os.path.join(dirname, filename)
           relpath = fullpath[len(self.root) + 1 : -3]
           testname = relpath.replace(os.path.sep, "/")
-          test = testcase.TestCase(self, testname)
+          test = self._create_test(testname)
           tests.append(test)
     return tests
 
-  def GetFlagsForTestCase(self, testcase, context):
-    source = self.GetSourceForTest(testcase)
-    flags = [] + context.mode_flags
-    flags_match = re.findall(FLAGS_PATTERN, source)
-    for match in flags_match:
-      flags += match.strip().split()
+  def _test_class(self):
+    return TestCase
+
+
+class TestCase(testcase.TestCase):
+  def __init__(self, *args, **kwargs):
+    super(TestCase, self).__init__(*args, **kwargs)
+
+    source = self.get_source()
 
     files_list = []  # List of file names to append to command arguments.
     files_match = FILES_PATTERN.search(source);
@@ -76,38 +74,59 @@
         files_match = FILES_PATTERN.search(source, files_match.end())
       else:
         break
-    files = [ os.path.normpath(os.path.join(self.root, '..', '..', f))
+    files = [ os.path.normpath(os.path.join(self.suite.root, '..', '..', f))
               for f in files_list ]
-    testfilename = os.path.join(self.root, testcase.path + self.suffix())
+    testfilename = os.path.join(self.suite.root,
+                                self.path + self._get_suffix())
     if SELF_SCRIPT_PATTERN.search(source):
-      env = ["-e", "TEST_FILE_NAME=\"%s\"" % testfilename.replace("\\", "\\\\")]
-      files = env + files
+      files = (
+        ["-e", "TEST_FILE_NAME=\"%s\"" % testfilename.replace("\\", "\\\\")] +
+        files)
 
-    if not context.no_harness and not NO_HARNESS_PATTERN.search(source):
-      files.append(os.path.join(self.root, "mjsunit.js"))
+    if NO_HARNESS_PATTERN.search(source):
+      mjsunit_files = []
+    else:
+      mjsunit_files = [os.path.join(self.suite.root, "mjsunit.js")]
 
+    files_suffix = []
     if MODULE_PATTERN.search(source):
-      files.append("--module")
-    files.append(testfilename)
+      files_suffix.append("--module")
+    files_suffix.append(testfilename)
 
-    flags += files
-    if context.isolates:
-      flags.append("--isolate")
-      flags += files
+    self._source_files = files
+    self._source_flags = self._parse_source_flags(source)
+    self._mjsunit_files = mjsunit_files
+    self._files_suffix = files_suffix
+    self._env = self._parse_source_env(source)
 
+  def _parse_source_env(self, source):
     env_match = ENV_PATTERN.search(source)
+    env = {}
     if env_match:
       for env_pair in env_match.group(1).strip().split():
         var, value = env_pair.split('=')
-        testcase.env[var] = value
+        env[var] = value
+    return env
 
-    return testcase.flags + flags
+  def _get_source_flags(self):
+    return self._source_flags
 
-  def GetSourceForTest(self, testcase):
-    filename = os.path.join(self.root, testcase.path + self.suffix())
-    with open(filename) as f:
-      return f.read()
+  def _get_files_params(self, ctx):
+    files = list(self._source_files)
+    if not ctx.no_harness:
+      files += self._mjsunit_files
+    files += self._files_suffix
+    if ctx.isolates:
+      files += ['--isolate'] + files
+
+    return files
+
+  def _get_cmd_env(self):
+    return self._env
+
+  def _get_source_path(self):
+    return os.path.join(self.suite.root, self.path + self._get_suffix())
 
 
 def GetSuite(name, root):
-  return MjsunitTestSuite(name, root)
+  return TestSuite(name, root)
diff --git a/src/v8/test/mjsunit/tools/csvparser.js b/src/v8/test/mjsunit/tools/csvparser.js
index f1449f6..ffca9dd 100644
--- a/src/v8/test/mjsunit/tools/csvparser.js
+++ b/src/v8/test/mjsunit/tools/csvparser.js
@@ -43,41 +43,44 @@
     parser.parseLine('1997,Ford,E350'));
 
 assertEquals(
-    ['1997','Ford','E350'],
-    parser.parseLine('"1997","Ford","E350"'));
+    ['"', '\'', ',', '\n'],
+    parser.parseLine('",\',\\x2c,\\x0a'));
 
 assertEquals(
-    ['1997','Ford','E350','Super, luxurious truck'],
-    parser.parseLine('1997,Ford,E350,"Super, luxurious truck"'));
+    ['"1997"','Ford','E350'],
+    parser.parseLine('"1997",Ford,E350'));
+assertEquals(
+    ['1997', 'Ford', 'E350', 'Super', ' luxurious truck'],
+    parser.parseLine('1997,Ford,E350,Super, luxurious truck'));
 
 assertEquals(
     ['1997','Ford','E350','Super "luxurious" truck'],
-    parser.parseLine('1997,Ford,E350,"Super ""luxurious"" truck"'));
+    parser.parseLine('1997,Ford,E350,Super "luxurious" truck'));
 
 assertEquals(
     ['1997','Ford','E350','Super "luxurious" "truck"'],
-    parser.parseLine('1997,Ford,E350,"Super ""luxurious"" ""truck"""'));
+    parser.parseLine('1997,Ford,E350,Super "luxurious" "truck"'));
 
 assertEquals(
     ['1997','Ford','E350','Super "luxurious""truck"'],
-    parser.parseLine('1997,Ford,E350,"Super ""luxurious""""truck"""'));
+    parser.parseLine('1997,Ford,E350,Super "luxurious""truck"'));
 
 assertEquals(
     ['shared-library','/lib/ld-2.3.6.so','0x489a2000','0x489b7000'],
-    parser.parseLine('shared-library,"/lib/ld-2.3.6.so",0x489a2000,0x489b7000'));
+    parser.parseLine('shared-library,/lib/ld-2.3.6.so,0x489a2000,0x489b7000'));
 
 assertEquals(
     ['code-creation','LazyCompile','0xf6fe2d20','1201','APPLY_PREPARE native runtime.js:165'],
-    parser.parseLine('code-creation,LazyCompile,0xf6fe2d20,1201,"APPLY_PREPARE native runtime.js:165"'));
+    parser.parseLine('code-creation,LazyCompile,0xf6fe2d20,1201,APPLY_PREPARE native runtime.js:165'));
 
 assertEquals(
     ['code-creation','LazyCompile','0xf6fe4bc0','282',' native v8natives.js:69'],
-    parser.parseLine('code-creation,LazyCompile,0xf6fe4bc0,282," native v8natives.js:69"'));
+    parser.parseLine('code-creation,LazyCompile,0xf6fe4bc0,282, native v8natives.js:69'));
 
 assertEquals(
     ['code-creation','RegExp','0xf6c21c00','826','NccyrJroXvg\\/([^,]*)'],
-    parser.parseLine('code-creation,RegExp,0xf6c21c00,826,"NccyrJroXvg\\/([^,]*)"'));
+    parser.parseLine('code-creation,RegExp,0xf6c21c00,826,NccyrJroXvg\\x5C/([^\\x2C]*)'));
 
 assertEquals(
-    ['code-creation','Function','0x42f0a0','163',''],
+    ['code-creation','Function','0x42f0a0','163','""'],
     parser.parseLine('code-creation,Function,0x42f0a0,163,""'));
diff --git a/src/v8/test/mjsunit/tools/dumpcpp.js b/src/v8/test/mjsunit/tools/dumpcpp.js
index 49b4675..2d9f179 100644
--- a/src/v8/test/mjsunit/tools/dumpcpp.js
+++ b/src/v8/test/mjsunit/tools/dumpcpp.js
@@ -5,7 +5,7 @@
 // Load implementations from <project root>/tools.
 // Files: tools/splaytree.js tools/codemap.js tools/csvparser.js
 // Files: tools/consarray.js tools/profile.js tools/profile_view.js
-// Files: tools/logreader.js tools/tickprocessor.js
+// Files: tools/logreader.js tools/arguments.js tools/tickprocessor.js
 // Files: tools/dumpcpp.js
 // Env: TEST_FILE_NAME
 
diff --git a/src/v8/test/mjsunit/tools/profviz-test.log b/src/v8/test/mjsunit/tools/profviz-test.log
new file mode 100644
index 0000000..720def9
--- /dev/null
+++ b/src/v8/test/mjsunit/tools/profviz-test.log
@@ -0,0 +1,2613 @@
+shared-library,/usr/local/google/home/yangguo/v8/out/ia32.release/d8,0x08048000,0x08557000
+shared-library,2506f000-25070000,0x2506f000,0x25070000
+shared-library,31e60000-31e61000,0x31e60000,0x31e61000
+shared-library,35dff000-35e00000,0x35dff000,0x35e00000
+shared-library,48218000-48219000,0x48218000,0x48219000
+shared-library,4af7d000-4af7e000,0x4af7d000,0x4af7e000
+shared-library,55bf2000-55bf3000,0x55bf2000,0x55bf3000
+shared-library,/lib/i386-linux-gnu/libc-2.15.so,0xf7450000,0xf75f3000
+shared-library,/lib/i386-linux-gnu/libpthread-2.15.so,0xf75f9000,0xf7610000
+shared-library,/lib/i386-linux-gnu/libgcc_s.so.1,0xf7614000,0xf7630000
+shared-library,/lib/i386-linux-gnu/libm-2.15.so,0xf7633000,0xf765d000
+shared-library,/usr/lib/i386-linux-gnu/libstdc++.so.6.0.16,0xf765f000,0xf7737000
+shared-library,[vdso],0xf776d000,0xf776e000
+shared-library,/lib/i386-linux-gnu/ld-2.15.so,0xf776e000,0xf778e000
+profiler,begin,1
+timer-event-start,V8.GCCompactor,2425
+timer-event-start,V8.External,2458
+timer-event-end,V8.External,2468
+timer-event-start,V8.External,3810
+timer-event-end,V8.External,3830
+timer-event-end,V8.GCCompactor,3840
+code-creation,Stub,2,0x2b80a000,484,ArrayNArgumentsConstructorStub
+code-creation,Stub,2,0x2b80a200,622,CEntryStub
+code-creation,Stub,2,0x2b80a480,540,ArrayNArgumentsConstructorStub
+code-creation,Stub,13,0x2b80a6a0,116,CompareICStub
+code-creation,Stub,2,0x2b80a720,1428,RecordWriteStub
+code-creation,Stub,2,0x2b80acc0,97,StoreBufferOverflowStub
+code-creation,Stub,2,0x2b80ad40,611,RecordWriteStub
+code-creation,Stub,2,0x2b80afc0,76,InterruptStub
+code-creation,Stub,13,0x2b80b020,104,CompareICStub
+code-creation,Stub,2,0x2b80b0a0,130,ArgumentsAccessStub
+code-creation,Stub,2,0x2b80b140,160,FastNewContextStub
+code-creation,Stub,2,0x2b80b1e0,79,StubFailureTrampolineStub
+code-creation,Stub,2,0x2b80b240,704,ArraySingleArgumentConstructorStub
+code-creation,Stub,14,0x2b80b500,93,CompareNilICStub
+code-creation,Stub,2,0x2b80b560,289,ArrayNoArgumentConstructorStub
+code-creation,Stub,2,0x2b80b6a0,664,ArraySingleArgumentConstructorStub
+code-creation,Stub,2,0x2b80b940,740,NameDictionaryLookupStub
+code-creation,Stub,13,0x2b80bc40,156,CompareICStub
+code-creation,Stub,2,0x2b80bce0,611,RecordWriteStub
+code-creation,Stub,13,0x2b80bf60,122,CompareICStub
+code-creation,Stub,2,0x2b80bfe0,217,CreateAllocationSiteStub
+code-creation,Stub,2,0x2b80c0c0,1456,RecordWriteStub
+code-creation,Stub,2,0x2b80c680,245,StoreArrayLiteralElementStub
+code-creation,Stub,2,0x2b80c780,1448,RecordWriteStub
+code-creation,Stub,2,0x2b80cd40,1471,StringAddStub
+code-creation,Stub,2,0x2b80d300,1448,RecordWriteStub
+code-creation,Stub,2,0x2b80d8c0,1453,RecordWriteStub
+code-creation,Stub,12,0x2b80de80,146,BinaryOpStub
+code-creation,Stub,2,0x2b80df20,640,InternalArraySingleArgumentConstructorStub
+code-creation,Stub,2,0x2b80e1a0,517,ArrayConstructorStub
+code-creation,Stub,2,0x2b80e3c0,305,ArrayNoArgumentConstructorStub
+code-creation,Stub,2,0x2b80e500,305,ArrayNoArgumentConstructorStub
+code-creation,Stub,2,0x2b80e640,349,ArrayNoArgumentConstructorStub
+code-creation,Stub,2,0x2b80e7a0,349,ArrayNoArgumentConstructorStub
+code-creation,Stub,2,0x2b80e900,289,ArrayNoArgumentConstructorStub
+code-creation,Stub,2,0x2b80ea40,680,ArraySingleArgumentConstructorStub
+code-creation,Stub,2,0x2b80ed00,692,ArraySingleArgumentConstructorStub
+code-creation,Stub,2,0x2b80efc0,704,ArraySingleArgumentConstructorStub
+code-creation,Stub,2,0x2b80f280,664,ArraySingleArgumentConstructorStub
+code-creation,Stub,2,0x2b80f520,488,ArrayNArgumentsConstructorStub
+code-creation,Stub,2,0x2b80f720,540,ArrayNArgumentsConstructorStub
+code-creation,Stub,2,0x2b80f940,432,ArrayNArgumentsConstructorStub
+code-creation,Stub,2,0x2b80fb00,432,ArrayNArgumentsConstructorStub
+code-creation,Stub,2,0x2b80fcc0,1453,RecordWriteStub
+code-creation,Stub,2,0x2b810280,400,InternalArrayNArgumentsConstructorStub
+code-creation,Stub,2,0x2b810420,611,RecordWriteStub
+code-creation,Stub,2,0x2b8106a0,213,JSEntryStub
+code-creation,Stub,13,0x2b810780,104,CompareICStub
+code-creation,Stub,12,0x2b810800,124,BinaryOpStub
+code-creation,Stub,2,0x2b810880,1447,StringAddStub
+code-creation,Stub,2,0x2b810e40,640,InternalArraySingleArgumentConstructorStub
+code-creation,Stub,2,0x2b8110c0,400,InternalArrayNArgumentsConstructorStub
+code-creation,Stub,2,0x2b811260,261,FastCloneShallowArrayStub
+code-creation,Stub,12,0x2b811380,88,BinaryOpStub
+code-creation,Stub,2,0x2b8113e0,76,StackCheckStub
+code-creation,Stub,2,0x2b811440,1437,RecordWriteStub
+code-creation,Stub,2,0x2b8119e0,289,ArrayNoArgumentConstructorStub
+code-creation,Stub,2,0x2b811b20,331,CallFunctionStub
+code-creation,Builtin,3,0x2b811c80,174,A builtin from the snapshot
+code-creation,Stub,14,0x2b811d40,124,CompareNilICStub
+code-creation,Stub,2,0x2b811dc0,1420,RecordWriteStub
+code-creation,Stub,13,0x2b812360,104,CompareICStub
+code-creation,Stub,2,0x2b8123e0,76,LoadFieldStub
+code-creation,Stub,13,0x2b812440,104,CompareICStub
+code-creation,Stub,2,0x2b8124c0,195,NumberToStringStub
+code-creation,Stub,15,0x2b8125a0,148,ToBooleanStub
+code-creation,Stub,2,0x2b812640,351,ArgumentsAccessStub
+code-creation,Stub,2,0x2b8127a0,664,ArraySingleArgumentConstructorStub
+code-creation,Stub,2,0x2b812a40,1420,RecordWriteStub
+code-creation,Stub,12,0x2b812fe0,133,BinaryOpStub
+code-creation,Stub,2,0x2b813080,1664,StringAddStub
+code-creation,Stub,2,0x2b813700,1661,StringAddStub
+code-creation,Stub,2,0x2b813d80,472,ArrayNArgumentsConstructorStub
+code-creation,Stub,2,0x2b813f60,80,StubFailureTrampolineStub
+code-creation,Stub,13,0x2b813fc0,104,CompareICStub
+code-creation,Stub,2,0x2b814040,331,CallFunctionStub
+code-creation,Stub,2,0x2b8141a0,660,ArraySingleArgumentConstructorStub
+code-creation,Stub,2,0x2b814440,1433,RecordWriteStub
+code-creation,Stub,12,0x2b8149e0,146,BinaryOpStub
+code-creation,Stub,2,0x2b814a80,271,CallConstructStub
+code-creation,Stub,15,0x2b814ba0,136,ToBooleanStub
+code-creation,Stub,2,0x2b814c40,468,ArrayNArgumentsConstructorStub
+code-creation,Stub,15,0x2b814e20,128,ToBooleanStub
+code-creation,Stub,2,0x2b814ea0,163,FastNewContextStub
+code-creation,Stub,2,0x2b814f60,1425,RecordWriteStub
+code-creation,LoadIC,5,0x2b815500,145,A load IC from the snapshot
+code-creation,Builtin,3,0x2b8155a0,83,A builtin from the snapshot
+code-creation,Stub,12,0x2b815600,88,BinaryOpStub
+code-creation,Stub,2,0x2b815660,1433,RecordWriteStub
+code-creation,Stub,2,0x2b815c00,331,CallFunctionStub
+code-creation,Stub,13,0x2b815d60,104,CompareICStub
+code-creation,Stub,2,0x2b815de0,304,FastNewClosureStub
+code-creation,Stub,2,0x2b815f20,285,ArrayNoArgumentConstructorStub
+code-creation,Stub,2,0x2b816040,1433,RecordWriteStub
+code-creation,Stub,2,0x2b8165e0,233,InternalArrayNoArgumentConstructorStub
+code-creation,Stub,2,0x2b8166e0,740,NameDictionaryLookupStub
+code-creation,Stub,2,0x2b8169e0,740,NameDictionaryLookupStub
+code-creation,Stub,12,0x2b816ce0,88,BinaryOpStub
+code-creation,Stub,2,0x2b816d40,216,StringCompareStub
+code-creation,Stub,15,0x2b816e20,93,ToBooleanStub
+code-creation,Stub,12,0x2b816e80,88,BinaryOpStub
+code-creation,Stub,2,0x2b816ee0,1433,RecordWriteStub
+code-creation,Stub,12,0x2b817480,155,BinaryOpStub
+code-creation,Stub,2,0x2b817520,169,InternalArrayConstructorStub
+code-creation,Stub,2,0x2b8175e0,233,InternalArrayNoArgumentConstructorStub
+code-creation,Stub,2,0x2b8176e0,1433,RecordWriteStub
+code-creation,Stub,12,0x2b817c80,88,BinaryOpStub
+code-creation,Stub,2,0x2b817ce0,328,KeyedLoadElementStub
+code-creation,Stub,2,0x2b817e40,1461,RecordWriteStub
+code-creation,Stub,2,0x2b818400,98,ToNumberStub
+code-creation,Stub,13,0x2b818480,122,CompareICStub
+code-creation,Stub,12,0x2b818500,124,BinaryOpStub
+code-creation,Stub,2,0x2b818580,148,CallConstructStub
+code-creation,Stub,13,0x2b818620,491,CompareICStub
+code-creation,Stub,2,0x2b818820,213,JSEntryStub
+code-creation,CallIC,7,0x2b818900,189,A call IC from the snapshot
+code-creation,CallIC,7,0x2b8189c0,180,A call IC from the snapshot
+code-creation,CallIC,7,0x2b818a80,180,A call IC from the snapshot
+code-creation,CallIC,7,0x2b818b40,180,A call IC from the snapshot
+code-creation,CallIC,7,0x2b818c00,180,A call IC from the snapshot
+code-creation,CallIC,7,0x2b818cc0,180,A call IC from the snapshot
+code-creation,CallIC,7,0x2b818d80,189,A call IC from the snapshot
+code-creation,CallIC,7,0x2b818e40,180,A call IC from the snapshot
+code-creation,CallIC,7,0x2b818f00,189,A call IC from the snapshot
+code-creation,CallIC,7,0x2b818fc0,178,A call IC from the snapshot
+code-creation,CallIC,7,0x2b819080,180,A call IC from the snapshot
+code-creation,CallIC,7,0x2b819140,180,A call IC from the snapshot
+code-creation,CallIC,7,0x2b819200,189,A call IC from the snapshot
+code-creation,CallIC,7,0x2b8192c0,180,A call IC from the snapshot
+code-creation,CallIC,7,0x2b819380,180,A call IC from the snapshot
+code-creation,CallIC,7,0x2b819440,178,A call IC from the snapshot
+code-creation,CallIC,7,0x2b819500,180,A call IC from the snapshot
+code-creation,CallIC,7,0x2b8195c0,180,A call IC from the snapshot
+code-creation,CallIC,7,0x2b819680,189,A call IC from the snapshot
+code-creation,CallIC,7,0x2b819740,180,A call IC from the snapshot
+code-creation,CallIC,7,0x2b819800,180,A call IC from the snapshot
+code-creation,CallIC,7,0x2b8198c0,189,A call IC from the snapshot
+code-creation,CallIC,7,0x2b819980,180,A call IC from the snapshot
+code-creation,CallIC,7,0x2b819a40,180,A call IC from the snapshot
+code-creation,CallIC,7,0x2b819b00,189,A call IC from the snapshot
+code-creation,CallIC,7,0x2b819bc0,180,A call IC from the snapshot
+code-creation,CallIC,7,0x2b819c80,180,A call IC from the snapshot
+code-creation,CallIC,7,0x2b819d40,178,A call IC from the snapshot
+code-creation,CallIC,7,0x2b819e00,180,A call IC from the snapshot
+code-creation,CallIC,7,0x2b819ec0,178,A call IC from the snapshot
+code-creation,CallIC,7,0x2b819f80,180,A call IC from the snapshot
+code-creation,CallIC,7,0x2b81a040,180,A call IC from the snapshot
+code-creation,CallIC,7,0x2b81a100,189,A call IC from the snapshot
+code-creation,CallIC,7,0x2b81a1c0,180,A call IC from the snapshot
+code-creation,CallIC,7,0x2b81a280,180,A call IC from the snapshot
+code-creation,CallIC,7,0x2b81a340,178,A call IC from the snapshot
+code-creation,CallIC,7,0x2b81a400,180,A call IC from the snapshot
+code-creation,CallIC,7,0x2b81a4c0,180,A call IC from the snapshot
+code-creation,CallIC,7,0x2b81a580,189,A call IC from the snapshot
+code-creation,CallIC,7,0x2b81a640,180,A call IC from the snapshot
+code-creation,CallIC,7,0x2b81a700,189,A call IC from the snapshot
+code-creation,CallIC,7,0x2b81a7c0,180,A call IC from the snapshot
+code-creation,CallIC,7,0x2b81a880,178,A call IC from the snapshot
+code-creation,CallIC,7,0x2b81a940,180,A call IC from the snapshot
+code-creation,CallIC,7,0x2b81aa00,180,A call IC from the snapshot
+code-creation,CallIC,7,0x2b81aac0,180,A call IC from the snapshot
+code-creation,Builtin,3,0x2b81ab80,107,A builtin from the snapshot
+code-creation,Builtin,3,0x2b81ac00,105,A builtin from the snapshot
+code-creation,Builtin,3,0x2b81ac80,77,A builtin from the snapshot
+code-creation,Builtin,3,0x2b81ace0,432,A builtin from the snapshot
+code-creation,Builtin,3,0x2b81afc0,101,A builtin from the snapshot
+code-creation,LoadIC,5,0x2b81b1a0,83,A load IC from the snapshot
+code-creation,KeyedLoadIC,6,0x2b81bf00,83,A keyed load IC from the snapshot
+code-creation,StoreIC,9,0x2b81c680,84,A store IC from the snapshot
+code-creation,Builtin,3,0x2b8262e0,77,A builtin from the snapshot
+code-creation,Builtin,3,0x2b826340,77,A builtin from the snapshot
+code-creation,Builtin,3,0x2b8263a0,77,A builtin from the snapshot
+code-creation,Builtin,3,0x2b826400,77,A builtin from the snapshot
+code-creation,Builtin,3,0x2b826460,77,A builtin from the snapshot
+code-creation,Builtin,3,0x2b8264c0,77,A builtin from the snapshot
+code-creation,Builtin,3,0x2b826520,77,A builtin from the snapshot
+code-creation,Builtin,3,0x2b826580,77,A builtin from the snapshot
+code-creation,Builtin,3,0x2b8265e0,77,A builtin from the snapshot
+code-creation,Builtin,3,0x2b826640,77,A builtin from the snapshot
+code-creation,Builtin,3,0x2b8266a0,80,A builtin from the snapshot
+code-creation,Builtin,3,0x2b826700,80,A builtin from the snapshot
+code-creation,Builtin,3,0x2b826760,77,A builtin from the snapshot
+code-creation,Builtin,3,0x2b8267c0,77,A builtin from the snapshot
+code-creation,Builtin,3,0x2b826820,77,A builtin from the snapshot
+code-creation,Builtin,3,0x2b826880,75,A builtin from the snapshot
+code-creation,Builtin,3,0x2b8268e0,101,A builtin from the snapshot
+code-creation,Builtin,3,0x2b826960,491,A builtin from the snapshot
+code-creation,Builtin,3,0x2b826b60,406,A builtin from the snapshot
+code-creation,Builtin,3,0x2b826d00,157,A builtin from the snapshot
+code-creation,Builtin,3,0x2b826da0,131,A builtin from the snapshot
+code-creation,Builtin,3,0x2b826e40,101,A builtin from the snapshot
+code-creation,Builtin,3,0x2b826ec0,107,A builtin from the snapshot
+code-creation,Builtin,3,0x2b826f40,143,A builtin from the snapshot
+code-creation,Builtin,3,0x2b826fe0,143,A builtin from the snapshot
+code-creation,Builtin,3,0x2b827080,143,A builtin from the snapshot
+code-creation,Builtin,3,0x2b827120,94,A builtin from the snapshot
+code-creation,Builtin,3,0x2b827180,91,A builtin from the snapshot
+code-creation,Builtin,3,0x2b8271e0,83,A builtin from the snapshot
+code-creation,Builtin,3,0x2b827240,83,A builtin from the snapshot
+code-creation,Builtin,3,0x2b8272a0,83,A builtin from the snapshot
+code-creation,Builtin,3,0x2b827300,84,A builtin from the snapshot
+code-creation,Builtin,3,0x2b827360,84,A builtin from the snapshot
+code-creation,Builtin,3,0x2b8273c0,84,A builtin from the snapshot
+code-creation,Builtin,3,0x2b827420,84,A builtin from the snapshot
+code-creation,Builtin,3,0x2b827480,84,A builtin from the snapshot
+code-creation,LoadIC,5,0x2b8274e0,83,A load IC from the snapshot
+code-creation,LoadIC,5,0x2b827540,313,A load IC from the snapshot
+code-creation,LoadIC,5,0x2b827680,266,A load IC from the snapshot
+code-creation,LoadIC,5,0x2b8277a0,80,A load IC from the snapshot
+code-creation,LoadIC,5,0x2b827800,83,A load IC from the snapshot
+code-creation,KeyedLoadIC,6,0x2b827860,83,A keyed load IC from the snapshot
+code-creation,KeyedLoadIC,6,0x2b8278c0,896,A keyed load IC from the snapshot
+code-creation,KeyedLoadIC,6,0x2b827c40,499,A keyed load IC from the snapshot
+code-creation,KeyedLoadIC,6,0x2b827e40,144,A keyed load IC from the snapshot
+code-creation,KeyedLoadIC,6,0x2b827ee0,216,A keyed load IC from the snapshot
+code-creation,StoreIC,9,0x2b827fc0,365,A store IC from the snapshot
+code-creation,StoreIC,9,0x2b828140,293,A store IC from the snapshot
+code-creation,StoreIC,9,0x2b828280,88,A store IC from the snapshot
+code-creation,StoreIC,9,0x2b8282e0,88,A store IC from the snapshot
+code-creation,StoreIC,9,0x2b828340,88,A store IC from the snapshot
+code-creation,StoreIC,9,0x2b8283a0,84,A store IC from the snapshot
+code-creation,StoreIC,9,0x2b828400,365,A store IC from the snapshot
+code-creation,StoreIC,9,0x2b828580,293,A store IC from the snapshot
+code-creation,StoreIC,9,0x2b8286c0,88,A store IC from the snapshot
+code-creation,StoreIC,9,0x2b828720,82,A store IC from the snapshot
+code-creation,KeyedStoreIC,10,0x2b828780,84,A keyed store IC from the snapshot
+code-creation,KeyedStoreIC,10,0x2b8287e0,2082,A keyed store IC from the snapshot
+code-creation,KeyedStoreIC,10,0x2b829020,84,A keyed store IC from the snapshot
+code-creation,KeyedStoreIC,10,0x2b829080,2082,A keyed store IC from the snapshot
+code-creation,KeyedStoreIC,10,0x2b8298c0,286,A keyed store IC from the snapshot
+code-creation,Builtin,3,0x2b8299e0,355,A builtin from the snapshot
+code-creation,Builtin,3,0x2b829b60,416,A builtin from the snapshot
+code-creation,Builtin,3,0x2b829d00,376,A builtin from the snapshot
+code-creation,Builtin,3,0x2b829e80,388,A builtin from the snapshot
+code-creation,Builtin,3,0x2b82a020,78,A builtin from the snapshot
+code-creation,Builtin,3,0x2b82a080,83,A builtin from the snapshot
+code-creation,Builtin,3,0x2b82a0e0,357,A builtin from the snapshot
+code-creation,Builtin,3,0x2b82a260,359,A builtin from the snapshot
+code-creation,Builtin,3,0x2b82a3e0,101,A builtin from the snapshot
+code-creation,Builtin,3,0x2b82a460,101,A builtin from the snapshot
+code-creation,Builtin,3,0x2b82a4e0,101,A builtin from the snapshot
+code-creation,Builtin,3,0x2b82a560,101,A builtin from the snapshot
+code-creation,Builtin,3,0x2b82a5e0,101,A builtin from the snapshot
+code-creation,Builtin,3,0x2b82a660,101,A builtin from the snapshot
+code-creation,Builtin,3,0x2b82a6e0,101,A builtin from the snapshot
+code-creation,Builtin,3,0x2b82a760,101,A builtin from the snapshot
+code-creation,Builtin,3,0x2b82a7e0,101,A builtin from the snapshot
+code-creation,Builtin,3,0x2b82a860,101,A builtin from the snapshot
+code-creation,Builtin,3,0x2b82a8e0,104,A builtin from the snapshot
+code-creation,Builtin,3,0x2b82a960,106,A builtin from the snapshot
+code-creation,Builtin,3,0x2b82a9e0,110,A builtin from the snapshot
+code-creation,Builtin,3,0x2b82aa60,112,A builtin from the snapshot
+code-creation,LoadIC,5,0x2b82aae0,106,A load IC from the snapshot
+code-creation,KeyedLoadIC,6,0x2b82ab60,106,A keyed load IC from the snapshot
+code-creation,StoreIC,9,0x2b82abe0,108,A store IC from the snapshot
+code-creation,KeyedStoreIC,10,0x2b82ac60,108,A keyed store IC from the snapshot
+code-creation,Stub,14,0x2b82ace0,104,CallFunctionStub
+code-creation,Builtin,3,0x2b82ad60,65,A builtin from the snapshot
+code-creation,Builtin,3,0x2b82adc0,93,A builtin from the snapshot
+timer-event-start,V8.GCCompactor,6301
+timer-event-start,V8.External,6312
+timer-event-end,V8.External,6321
+timer-event-start,V8.External,7418
+timer-event-end,V8.External,7436
+timer-event-end,V8.GCCompactor,7446
+code-creation,LazyCompile,3,0x2b81ac80,77,Empty :1,0x4420e5cc,
+code-creation,LazyCompile,0,0x2b81aea0,264, native uri.js:1,0x4420e668,
+code-creation,LazyCompile,0,0x2b81b040,336,SetUpUri native uri.js:442,0x4420f5b4,
+code-creation,LazyCompile,0,0x2b81b200,1880, native messages.js:1,0x4420f670,
+code-creation,LazyCompile,0,0x2b81b960,1429,FormatString native messages.js:187,0x4420f918,
+code-creation,LazyCompile,0,0x2b81bf60,280,MakeGenericError native messages.js:282,0x44211088,
+code-creation,LazyCompile,0,0x2b81c080,264,FormatMessage native messages.js:301,0x4421113c,
+code-creation,LazyCompile,0,0x2b81c1a0,200,MakeRangeError native messages.js:335,0x442112f0,
+code-creation,LazyCompile,0,0x2b81c280,1012,captureStackTrace native messages.js:1123,0x44212280,
+code-creation,LazyCompile,0,0x2b81c6e0,460,SetUpError native messages.js:1173,0x44212410,
+code-creation,LazyCompile,0,0x2b81c8c0,692,SetUpError.a native messages.js:1176,0x442124c0,
+code-creation,LazyCompile,0,0x2b81cb80,164,d native messages.js:1192,0x44212548,
+code-creation,LazyCompile,0,0x2b81cc40,360, native messages.js:1202,0x442125d0,
+code-creation,LazyCompile,0,0x2b81cc40,360,Error,0x44212698,
+code-creation,LazyCompile,0,0x2b81cc40,360,TypeError,0x442126f8,
+code-creation,LazyCompile,0,0x2b81cc40,360,RangeError,0x44212758,
+code-creation,LazyCompile,0,0x2b81cc40,360,SyntaxError,0x442127b8,
+code-creation,LazyCompile,0,0x2b81cc40,360,ReferenceError,0x44212818,
+code-creation,LazyCompile,0,0x2b81cc40,360,EvalError,0x44212878,
+code-creation,LazyCompile,0,0x2b81cc40,360,URIError,0x442128d8,
+code-creation,LazyCompile,0,0x2b81cdc0,424,SetUpStackOverflowBoilerplate native messages.js:1301,0x44212a74,
+code-creation,LazyCompile,0,0x2b81cf80,216, native messages.js:294,0x44214b3c,
+code-creation,LazyCompile,0,0x2b81d060,408, native string.js:1,0x44214c2c,
+code-creation,LazyCompile,0,0x2b81d200,380,StringConstructor native string.js:35,0x44214e2c,
+code-creation,LazyCompile,0,0x2b81d380,1132,SetUpString native string.js:962,0x44216ea8,
+code-creation,LazyCompile,0,0x2b81d800,616, native date.js:1,0x44216fa0,
+code-creation,LazyCompile,0,0x2b81da80,1392,DateConstructor native date.js:141,0x442182bc,
+code-creation,LazyCompile,0,0x2b81e000,1396,SetUpDate native date.js:761,0x44219944,
+code-creation,LazyCompile,0,0x2b81e580,268, native array.js:1,0x44219b20,
+code-creation,LazyCompile,0,0x2b81e6a0,2272,SetUpArray native array.js:1591,0x4421c6ac,
+code-creation,LazyCompile,0,0x2b81ef80,292,SetUpArray.b native array.js:1605,0x4421c814,
+code-creation,LazyCompile,0,0x2b81f0c0,1084, native v8natives.js:1,0x4421c904,
+code-creation,LazyCompile,0,0x2b81f500,561,InstallFunctions native v8natives.js:46,0x4421cc1c,
+code-creation,LazyCompile,0,0x2b81f740,304,InstallGetterSetter native v8natives.js:72,0x4421ea1c,
+code-creation,LazyCompile,0,0x2b81f880,814,SetUpLockedPrototype native v8natives.js:87,0x4421eab4,
+code-creation,LazyCompile,0,0x2b81fbc0,452,SetUpGlobal native v8natives.js:197,0x4421ed3c,
+code-creation,LazyCompile,0,0x2b81fda0,404,hasOwnProperty native v8natives.js:251,0x4421eee4,
+code-creation,LazyCompile,0,0x2b81ff40,308,ObjectConstructor native v8natives.js:1371,0x442200b4,
+code-creation,LazyCompile,0,0x2b820080,1044,SetUpObject native v8natives.js:1385,0x44220140,
+code-creation,LazyCompile,0,0x2b8204a0,292,BooleanConstructor native v8natives.js:1437,0x442201c8,
+code-creation,LazyCompile,0,0x2b8205e0,448,SetUpBoolean native v8natives.js:1472,0x44220314,
+code-creation,LazyCompile,0,0x2b8207a0,336,NumberConstructor native v8natives.js:1491,0x442203ac,
+code-creation,LazyCompile,0,0x2b820900,924,SetUpNumber native v8natives.js:1635,0x4422073c,
+code-creation,LazyCompile,0,0x2b820ca0,440,FunctionConstructor native v8natives.js:1813,0x44220954,
+code-creation,LazyCompile,0,0x2b820e60,380,SetUpFunction native v8natives.js:1826,0x442209f8,
+code-creation,LazyCompile,0,0x2b820fe0,264, native json.js:1,0x44221238,
+code-creation,LazyCompile,0,0x2b821100,260,SetUpJSON native json.js:219,0x44221940,
+code-creation,LazyCompile,0,0x2b821220,340, native math.js:1,0x44221a5c,
+code-creation,LazyCompile,0,0x2b821380,164,MathConstructor native math.js:40,0x44221ba4,
+code-creation,LazyCompile,0,0x2b821440,1112,SetUpMath native math.js:226,0x4422283c,
+code-creation,LazyCompile,0,0x2b8218a0,404, native regexp.js:1,0x442228f8,
+code-creation,LazyCompile,0,0x2b821a40,324,RegExpConstructor native regexp.js:90,0x44223264,
+code-creation,LazyCompile,0,0x2b821ba0,224,RegExpMakeCaptureGetter native regexp.js:360,0x44223784,
+code-creation,LazyCompile,0,0x2b821c80,1561,SetUpRegExp native regexp.js:400,0x44223878,
+code-creation,LazyCompile,0,0x2b8222a0,280, native apinatives.js:1,0x44223b98,
+code-creation,LazyCompile,0,0x2b8223c0,612, native runtime.js:1,0x44223e30,
+code-creation,LazyCompile,0,0x2b822640,1728,EQUALS native runtime.js:54,0x44224078,
+code-creation,LazyCompile,0,0x2b822d00,376,STRICT_EQUALS native runtime.js:108,0x44224c18,
+code-creation,LazyCompile,0,0x2b822e80,924,COMPARE native runtime.js:128,0x44224ca4,
+code-creation,LazyCompile,0,0x2b823220,596,ADD native runtime.js:171,0x44224d44,
+code-creation,LazyCompile,0,0x2b823480,572,STRING_ADD_LEFT native runtime.js:191,0x44224dd8,
+code-creation,LazyCompile,0,0x2b8236c0,580,STRING_ADD_RIGHT native runtime.js:206,0x44224e64,
+code-creation,LazyCompile,0,0x2b823920,296,SUB native runtime.js:222,0x44224ef4,
+code-creation,LazyCompile,0,0x2b823a60,296,MUL native runtime.js:230,0x44224f84,
+code-creation,LazyCompile,0,0x2b823ba0,296,DIV native runtime.js:238,0x44225014,
+code-creation,LazyCompile,0,0x2b823ce0,296,MOD native runtime.js:246,0x442250a4,
+code-creation,LazyCompile,0,0x2b823e20,296,BIT_OR native runtime.js:260,0x44225134,
+code-creation,LazyCompile,0,0x2b823f60,384,BIT_AND native runtime.js:268,0x442251c4,
+code-creation,LazyCompile,0,0x2b8240e0,296,BIT_XOR native runtime.js:290,0x44225254,
+code-creation,LazyCompile,0,0x2b824220,244,UNARY_MINUS native runtime.js:298,0x442252e4,
+code-creation,LazyCompile,0,0x2b824320,244,BIT_NOT native runtime.js:305,0x44225370,
+code-creation,LazyCompile,0,0x2b824420,296,SHL native runtime.js:312,0x442253fc,
+code-creation,LazyCompile,0,0x2b824560,384,SAR native runtime.js:320,0x4422548c,
+code-creation,LazyCompile,0,0x2b8246e0,296,SHR native runtime.js:342,0x4422551c,
+code-creation,LazyCompile,0,0x2b824820,228,DELETE native runtime.js:356,0x442255ac,
+code-creation,LazyCompile,0,0x2b824920,368,IN native runtime.js:362,0x4422563c,
+code-creation,LazyCompile,0,0x2b824aa0,644,INSTANCE_OF native runtime.js:375,0x442256e8,
+code-creation,LazyCompile,0,0x2b824d40,236,FILTER_KEY native runtime.js:406,0x442257b8,
+code-creation,LazyCompile,0,0x2b824e40,380,CALL_NON_FUNCTION native runtime.js:413,0x44225848,
+code-creation,LazyCompile,0,0x2b824fc0,380,CALL_NON_FUNCTION_AS_CONSTRUCTOR native runtime.js:422,0x442258f4,
+code-creation,LazyCompile,0,0x2b825140,288,CALL_FUNCTION_PROXY native runtime.js:431,0x442259a0,
+code-creation,LazyCompile,0,0x2b825260,260,CALL_FUNCTION_PROXY_AS_CONSTRUCTOR native runtime.js:439,0x44225a38,
+code-creation,LazyCompile,0,0x2b825380,912,APPLY_PREPARE native runtime.js:446,0x44225acc,
+code-creation,LazyCompile,0,0x2b825720,232,APPLY_OVERFLOW native runtime.js:484,0x44225b9c,
+code-creation,LazyCompile,0,0x2b825820,188,TO_OBJECT native runtime.js:490,0x44225c38,
+code-creation,LazyCompile,0,0x2b8258e0,188,TO_NUMBER native runtime.js:496,0x44225cc0,
+code-creation,LazyCompile,0,0x2b8259a0,188,TO_STRING native runtime.js:502,0x44225d48,
+code-creation,LazyCompile,0,0x2b825a60,600,ToPrimitive native runtime.js:514,0x44225dd0,
+code-creation,LazyCompile,0,0x2b825cc0,404,ToBoolean native runtime.js:526,0x44225e60,
+code-creation,LazyCompile,0,0x2b825e60,504,ToNumber native runtime.js:536,0x44225eec,
+code-creation,LazyCompile,0,0x2b826060,416,ToString native runtime.js:561,0x44225fd8,
+code-creation,LazyCompile,0,0x2b826200,220,ToName native runtime.js:578,0x442260c4,
+code-creation,LazyCompile,3,0x2b8262e0,77,,0x44227108,
+code-creation,LazyCompile,3,0x2b8262e0,77,,0x44227168,
+code-creation,LazyCompile,3,0x2b8262e0,77,OpaqueReference,0x442271c8,
+code-creation,LazyCompile,3,0x2b8262e0,77,JSON,0x44227228,
+code-creation,LazyCompile,0,0x2b8204a0,292,Boolean,0x44227288,
+code-creation,LazyCompile,3,0x2b82a080,83,Array,0x442272e8,
+code-creation,LazyCompile,3,0x2b826460,77,pop,0x44227348,
+code-creation,LazyCompile,3,0x2b826400,77,push,0x442273a8,
+code-creation,LazyCompile,3,0x2b826640,77,concat,0x44227408,
+code-creation,LazyCompile,3,0x2b8264c0,77,shift,0x44227468,
+code-creation,LazyCompile,3,0x2b826520,77,unshift,0x442274c8,
+code-creation,LazyCompile,3,0x2b826580,77,slice,0x44227528,
+code-creation,LazyCompile,3,0x2b8265e0,77,splice,0x44227588,
+code-creation,LazyCompile,0,0x2b8207a0,336,Number,0x442275e8,
+code-creation,LazyCompile,3,0x2b82a020,78,InternalArray,0x44227648,
+code-creation,LazyCompile,3,0x2b82a020,78,InternalPackedArray,0x442276b4,
+code-creation,LazyCompile,3,0x2b8262e0,77,,0x44227714,
+code-creation,LazyCompile,0,0x2b821a40,324,RegExp,0x44227774,
+code-creation,LazyCompile,0,0x2b81da80,1392,Date,0x442277d4,
+code-creation,LazyCompile,0,0x2b820ca0,440,Function,0x44227834,
+code-creation,LazyCompile,0,0x2b81d200,380,String,0x44227894,
+code-creation,LazyCompile,3,0x2b8262e0,77,,0x442278f4,
+code-creation,LazyCompile,0,0x2b81cf80,216,Script,0x44227960,
+code-creation,LazyCompile,0,0x2b81ff40,308,Object,0x44227a00,
+code-creation,LazyCompile,3,0x2b829d00,376,call,0x44227a60,
+code-creation,LazyCompile,3,0x2b829e80,388,apply,0x44227ac0,
+code-creation,LazyCompile,3,0x2b8262e0,77,Arguments,0x44227b20,
+code-creation,LazyCompile,3,0x2b826820,77,ThrowTypeError,0x44227b80,
+code-creation,LazyCompile,3,0x2b826760,77,,0x44227be0,
+code-creation,LazyCompile,3,0x2b8267c0,77,,0x44227c40,
+code-creation,LazyCompile,3,0x2b8262e0,77,,0x44227ca0,
+timer-event-start,V8.GCCompactor,9350
+timer-event-start,V8.External,9362
+timer-event-end,V8.External,9370
+timer-event-start,V8.External,10477
+timer-event-end,V8.External,10500
+timer-event-end,V8.GCCompactor,10511
+code-creation,Stub,2,0x2b80a000,484,ArrayNArgumentsConstructorStub
+code-creation,Stub,2,0x2b80a200,622,CEntryStub
+code-creation,Stub,2,0x2b80a480,540,ArrayNArgumentsConstructorStub
+code-creation,Stub,13,0x2b80a6a0,116,CompareICStub
+code-creation,Stub,2,0x2b80a720,1428,RecordWriteStub
+code-creation,Stub,2,0x2b80acc0,97,StoreBufferOverflowStub
+code-creation,Stub,2,0x2b80ad40,611,RecordWriteStub
+code-creation,Stub,2,0x2b80afc0,76,InterruptStub
+code-creation,Stub,13,0x2b80b020,104,CompareICStub
+code-creation,Stub,2,0x2b80b0a0,130,ArgumentsAccessStub
+code-creation,Stub,2,0x2b80b140,160,FastNewContextStub
+code-creation,Stub,2,0x2b80b1e0,79,StubFailureTrampolineStub
+code-creation,Stub,2,0x2b80b240,704,ArraySingleArgumentConstructorStub
+code-creation,Stub,14,0x2b80b500,93,CompareNilICStub
+code-creation,Stub,2,0x2b80b560,289,ArrayNoArgumentConstructorStub
+code-creation,Stub,2,0x2b80b6a0,664,ArraySingleArgumentConstructorStub
+code-creation,Stub,2,0x2b80b940,740,NameDictionaryLookupStub
+code-creation,Stub,13,0x2b80bc40,156,CompareICStub
+code-creation,Stub,2,0x2b80bce0,611,RecordWriteStub
+code-creation,Stub,13,0x2b80bf60,122,CompareICStub
+code-creation,Stub,2,0x2b80bfe0,217,CreateAllocationSiteStub
+code-creation,Stub,2,0x2b80c0c0,1456,RecordWriteStub
+code-creation,Stub,2,0x2b80c680,245,StoreArrayLiteralElementStub
+code-creation,Stub,2,0x2b80c780,1448,RecordWriteStub
+code-creation,Stub,2,0x2b80cd40,1471,StringAddStub
+code-creation,Stub,2,0x2b80d300,1448,RecordWriteStub
+code-creation,Stub,2,0x2b80d8c0,1453,RecordWriteStub
+code-creation,Stub,12,0x2b80de80,146,BinaryOpStub
+code-creation,Stub,2,0x2b80df20,640,InternalArraySingleArgumentConstructorStub
+code-creation,Stub,2,0x2b80e1a0,517,ArrayConstructorStub
+code-creation,Stub,2,0x2b80e3c0,305,ArrayNoArgumentConstructorStub
+code-creation,Stub,2,0x2b80e500,305,ArrayNoArgumentConstructorStub
+code-creation,Stub,2,0x2b80e640,349,ArrayNoArgumentConstructorStub
+code-creation,Stub,2,0x2b80e7a0,349,ArrayNoArgumentConstructorStub
+code-creation,Stub,2,0x2b80e900,289,ArrayNoArgumentConstructorStub
+code-creation,Stub,2,0x2b80ea40,680,ArraySingleArgumentConstructorStub
+code-creation,Stub,2,0x2b80ed00,692,ArraySingleArgumentConstructorStub
+code-creation,Stub,2,0x2b80efc0,704,ArraySingleArgumentConstructorStub
+code-creation,Stub,2,0x2b80f280,664,ArraySingleArgumentConstructorStub
+code-creation,Stub,2,0x2b80f520,488,ArrayNArgumentsConstructorStub
+code-creation,Stub,2,0x2b80f720,540,ArrayNArgumentsConstructorStub
+code-creation,Stub,2,0x2b80f940,432,ArrayNArgumentsConstructorStub
+code-creation,Stub,2,0x2b80fb00,432,ArrayNArgumentsConstructorStub
+code-creation,Stub,2,0x2b80fcc0,1453,RecordWriteStub
+code-creation,Stub,2,0x2b810280,400,InternalArrayNArgumentsConstructorStub
+code-creation,Stub,2,0x2b810420,611,RecordWriteStub
+code-creation,Stub,2,0x2b8106a0,213,JSEntryStub
+code-creation,Stub,13,0x2b810780,104,CompareICStub
+code-creation,Stub,12,0x2b810800,124,BinaryOpStub
+code-creation,Stub,2,0x2b810880,1447,StringAddStub
+code-creation,Stub,2,0x2b810e40,640,InternalArraySingleArgumentConstructorStub
+code-creation,Stub,2,0x2b8110c0,400,InternalArrayNArgumentsConstructorStub
+code-creation,Stub,2,0x2b811260,261,FastCloneShallowArrayStub
+code-creation,Stub,12,0x2b811380,88,BinaryOpStub
+code-creation,Stub,2,0x2b8113e0,76,StackCheckStub
+code-creation,Stub,2,0x2b811440,1437,RecordWriteStub
+code-creation,Stub,2,0x2b8119e0,289,ArrayNoArgumentConstructorStub
+code-creation,Stub,2,0x2b811b20,331,CallFunctionStub
+code-creation,Builtin,3,0x2b811c80,174,A builtin from the snapshot
+code-creation,Stub,14,0x2b811d40,124,CompareNilICStub
+code-creation,Stub,2,0x2b811dc0,1420,RecordWriteStub
+code-creation,Stub,13,0x2b812360,104,CompareICStub
+code-creation,Stub,2,0x2b8123e0,76,LoadFieldStub
+code-creation,Stub,13,0x2b812440,104,CompareICStub
+code-creation,Stub,2,0x2b8124c0,195,NumberToStringStub
+code-creation,Stub,15,0x2b8125a0,148,ToBooleanStub
+code-creation,Stub,2,0x2b812640,351,ArgumentsAccessStub
+code-creation,Stub,2,0x2b8127a0,664,ArraySingleArgumentConstructorStub
+code-creation,Stub,2,0x2b812a40,1420,RecordWriteStub
+code-creation,Stub,12,0x2b812fe0,133,BinaryOpStub
+code-creation,Stub,2,0x2b813080,1664,StringAddStub
+code-creation,Stub,2,0x2b813700,1661,StringAddStub
+code-creation,Stub,2,0x2b813d80,472,ArrayNArgumentsConstructorStub
+code-creation,Stub,2,0x2b813f60,80,StubFailureTrampolineStub
+code-creation,Stub,13,0x2b813fc0,104,CompareICStub
+code-creation,Stub,2,0x2b814040,331,CallFunctionStub
+code-creation,Stub,2,0x2b8141a0,660,ArraySingleArgumentConstructorStub
+code-creation,Stub,2,0x2b814440,1433,RecordWriteStub
+code-creation,Stub,12,0x2b8149e0,146,BinaryOpStub
+code-creation,Stub,2,0x2b814a80,271,CallConstructStub
+code-creation,Stub,15,0x2b814ba0,136,ToBooleanStub
+code-creation,Stub,2,0x2b814c40,468,ArrayNArgumentsConstructorStub
+code-creation,Stub,15,0x2b814e20,128,ToBooleanStub
+code-creation,Stub,2,0x2b814ea0,163,FastNewContextStub
+code-creation,Stub,2,0x2b814f60,1425,RecordWriteStub
+code-creation,LoadIC,5,0x2b815500,145,A load IC from the snapshot
+code-creation,Builtin,3,0x2b8155a0,83,A builtin from the snapshot
+code-creation,Stub,12,0x2b815600,88,BinaryOpStub
+code-creation,Stub,2,0x2b815660,1433,RecordWriteStub
+code-creation,Stub,2,0x2b815c00,331,CallFunctionStub
+code-creation,Stub,13,0x2b815d60,104,CompareICStub
+code-creation,Stub,2,0x2b815de0,304,FastNewClosureStub
+code-creation,Stub,2,0x2b815f20,285,ArrayNoArgumentConstructorStub
+code-creation,Stub,2,0x2b816040,1433,RecordWriteStub
+code-creation,Stub,2,0x2b8165e0,233,InternalArrayNoArgumentConstructorStub
+code-creation,Stub,2,0x2b8166e0,740,NameDictionaryLookupStub
+code-creation,Stub,2,0x2b8169e0,740,NameDictionaryLookupStub
+code-creation,Stub,12,0x2b816ce0,88,BinaryOpStub
+code-creation,Stub,2,0x2b816d40,216,StringCompareStub
+code-creation,Stub,15,0x2b816e20,93,ToBooleanStub
+code-creation,Stub,12,0x2b816e80,88,BinaryOpStub
+code-creation,Stub,2,0x2b816ee0,1433,RecordWriteStub
+code-creation,Stub,12,0x2b817480,155,BinaryOpStub
+code-creation,Stub,2,0x2b817520,169,InternalArrayConstructorStub
+code-creation,Stub,2,0x2b8175e0,233,InternalArrayNoArgumentConstructorStub
+code-creation,Stub,2,0x2b8176e0,1433,RecordWriteStub
+code-creation,Stub,12,0x2b817c80,88,BinaryOpStub
+code-creation,Stub,2,0x2b817ce0,328,KeyedLoadElementStub
+code-creation,Stub,2,0x2b817e40,1461,RecordWriteStub
+code-creation,Stub,2,0x2b818400,98,ToNumberStub
+code-creation,Stub,13,0x2b818480,122,CompareICStub
+code-creation,Stub,12,0x2b818500,124,BinaryOpStub
+code-creation,Stub,2,0x2b818580,148,CallConstructStub
+code-creation,Stub,13,0x2b818620,491,CompareICStub
+code-creation,Stub,2,0x2b818820,213,JSEntryStub
+code-creation,CallIC,7,0x2b818900,189,A call IC from the snapshot
+code-creation,CallIC,7,0x2b8189c0,180,A call IC from the snapshot
+code-creation,CallIC,7,0x2b818a80,180,A call IC from the snapshot
+code-creation,CallIC,7,0x2b818b40,180,A call IC from the snapshot
+code-creation,CallIC,7,0x2b818c00,180,A call IC from the snapshot
+code-creation,CallIC,7,0x2b818cc0,180,A call IC from the snapshot
+code-creation,CallIC,7,0x2b818d80,189,A call IC from the snapshot
+code-creation,CallIC,7,0x2b818e40,180,A call IC from the snapshot
+code-creation,CallIC,7,0x2b818f00,189,A call IC from the snapshot
+code-creation,CallIC,7,0x2b818fc0,178,A call IC from the snapshot
+code-creation,CallIC,7,0x2b819080,180,A call IC from the snapshot
+code-creation,CallIC,7,0x2b819140,180,A call IC from the snapshot
+code-creation,CallIC,7,0x2b819200,189,A call IC from the snapshot
+code-creation,CallIC,7,0x2b8192c0,180,A call IC from the snapshot
+code-creation,CallIC,7,0x2b819380,180,A call IC from the snapshot
+code-creation,CallIC,7,0x2b819440,178,A call IC from the snapshot
+code-creation,CallIC,7,0x2b819500,180,A call IC from the snapshot
+code-creation,CallIC,7,0x2b8195c0,180,A call IC from the snapshot
+code-creation,CallIC,7,0x2b819680,189,A call IC from the snapshot
+code-creation,CallIC,7,0x2b819740,180,A call IC from the snapshot
+code-creation,CallIC,7,0x2b819800,180,A call IC from the snapshot
+code-creation,CallIC,7,0x2b8198c0,189,A call IC from the snapshot
+code-creation,CallIC,7,0x2b819980,180,A call IC from the snapshot
+code-creation,CallIC,7,0x2b819a40,180,A call IC from the snapshot
+code-creation,CallIC,7,0x2b819b00,189,A call IC from the snapshot
+code-creation,CallIC,7,0x2b819bc0,180,A call IC from the snapshot
+code-creation,CallIC,7,0x2b819c80,180,A call IC from the snapshot
+code-creation,CallIC,7,0x2b819d40,178,A call IC from the snapshot
+code-creation,CallIC,7,0x2b819e00,180,A call IC from the snapshot
+code-creation,CallIC,7,0x2b819ec0,178,A call IC from the snapshot
+code-creation,CallIC,7,0x2b819f80,180,A call IC from the snapshot
+code-creation,CallIC,7,0x2b81a040,180,A call IC from the snapshot
+code-creation,CallIC,7,0x2b81a100,189,A call IC from the snapshot
+code-creation,CallIC,7,0x2b81a1c0,180,A call IC from the snapshot
+code-creation,CallIC,7,0x2b81a280,180,A call IC from the snapshot
+code-creation,CallIC,7,0x2b81a340,178,A call IC from the snapshot
+code-creation,CallIC,7,0x2b81a400,180,A call IC from the snapshot
+code-creation,CallIC,7,0x2b81a4c0,180,A call IC from the snapshot
+code-creation,CallIC,7,0x2b81a580,189,A call IC from the snapshot
+code-creation,CallIC,7,0x2b81a640,180,A call IC from the snapshot
+code-creation,CallIC,7,0x2b81a700,189,A call IC from the snapshot
+code-creation,CallIC,7,0x2b81a7c0,180,A call IC from the snapshot
+code-creation,CallIC,7,0x2b81a880,178,A call IC from the snapshot
+code-creation,CallIC,7,0x2b81a940,180,A call IC from the snapshot
+code-creation,CallIC,7,0x2b81aa00,180,A call IC from the snapshot
+code-creation,CallIC,7,0x2b81aac0,180,A call IC from the snapshot
+code-creation,Builtin,3,0x2b81ab80,107,A builtin from the snapshot
+code-creation,Builtin,3,0x2b81ac00,105,A builtin from the snapshot
+code-creation,Builtin,3,0x2b81ac80,77,A builtin from the snapshot
+code-creation,Builtin,3,0x2b81ace0,432,A builtin from the snapshot
+code-creation,Builtin,3,0x2b81afc0,101,A builtin from the snapshot
+code-creation,LoadIC,5,0x2b81b1a0,83,A load IC from the snapshot
+code-creation,KeyedLoadIC,6,0x2b81bf00,83,A keyed load IC from the snapshot
+code-creation,StoreIC,9,0x2b81c680,84,A store IC from the snapshot
+code-creation,Builtin,3,0x2b8262e0,77,A builtin from the snapshot
+code-creation,Builtin,3,0x2b826340,77,A builtin from the snapshot
+code-creation,Builtin,3,0x2b8263a0,77,A builtin from the snapshot
+code-creation,Builtin,3,0x2b826400,77,A builtin from the snapshot
+code-creation,Builtin,3,0x2b826460,77,A builtin from the snapshot
+code-creation,Builtin,3,0x2b8264c0,77,A builtin from the snapshot
+code-creation,Builtin,3,0x2b826520,77,A builtin from the snapshot
+code-creation,Builtin,3,0x2b826580,77,A builtin from the snapshot
+code-creation,Builtin,3,0x2b8265e0,77,A builtin from the snapshot
+code-creation,Builtin,3,0x2b826640,77,A builtin from the snapshot
+code-creation,Builtin,3,0x2b8266a0,80,A builtin from the snapshot
+code-creation,Builtin,3,0x2b826700,80,A builtin from the snapshot
+code-creation,Builtin,3,0x2b826760,77,A builtin from the snapshot
+code-creation,Builtin,3,0x2b8267c0,77,A builtin from the snapshot
+code-creation,Builtin,3,0x2b826820,77,A builtin from the snapshot
+code-creation,Builtin,3,0x2b826880,75,A builtin from the snapshot
+code-creation,Builtin,3,0x2b8268e0,101,A builtin from the snapshot
+code-creation,Builtin,3,0x2b826960,491,A builtin from the snapshot
+code-creation,Builtin,3,0x2b826b60,406,A builtin from the snapshot
+code-creation,Builtin,3,0x2b826d00,157,A builtin from the snapshot
+code-creation,Builtin,3,0x2b826da0,131,A builtin from the snapshot
+code-creation,Builtin,3,0x2b826e40,101,A builtin from the snapshot
+code-creation,Builtin,3,0x2b826ec0,107,A builtin from the snapshot
+code-creation,Builtin,3,0x2b826f40,143,A builtin from the snapshot
+code-creation,Builtin,3,0x2b826fe0,143,A builtin from the snapshot
+code-creation,Builtin,3,0x2b827080,143,A builtin from the snapshot
+code-creation,Builtin,3,0x2b827120,94,A builtin from the snapshot
+code-creation,Builtin,3,0x2b827180,91,A builtin from the snapshot
+code-creation,Builtin,3,0x2b8271e0,83,A builtin from the snapshot
+code-creation,Builtin,3,0x2b827240,83,A builtin from the snapshot
+code-creation,Builtin,3,0x2b8272a0,83,A builtin from the snapshot
+code-creation,Builtin,3,0x2b827300,84,A builtin from the snapshot
+code-creation,Builtin,3,0x2b827360,84,A builtin from the snapshot
+code-creation,Builtin,3,0x2b8273c0,84,A builtin from the snapshot
+code-creation,Builtin,3,0x2b827420,84,A builtin from the snapshot
+code-creation,Builtin,3,0x2b827480,84,A builtin from the snapshot
+code-creation,LoadIC,5,0x2b8274e0,83,A load IC from the snapshot
+code-creation,LoadIC,5,0x2b827540,313,A load IC from the snapshot
+code-creation,LoadIC,5,0x2b827680,266,A load IC from the snapshot
+code-creation,LoadIC,5,0x2b8277a0,80,A load IC from the snapshot
+code-creation,LoadIC,5,0x2b827800,83,A load IC from the snapshot
+code-creation,KeyedLoadIC,6,0x2b827860,83,A keyed load IC from the snapshot
+code-creation,KeyedLoadIC,6,0x2b8278c0,896,A keyed load IC from the snapshot
+code-creation,KeyedLoadIC,6,0x2b827c40,499,A keyed load IC from the snapshot
+code-creation,KeyedLoadIC,6,0x2b827e40,144,A keyed load IC from the snapshot
+code-creation,KeyedLoadIC,6,0x2b827ee0,216,A keyed load IC from the snapshot
+code-creation,StoreIC,9,0x2b827fc0,365,A store IC from the snapshot
+code-creation,StoreIC,9,0x2b828140,293,A store IC from the snapshot
+code-creation,StoreIC,9,0x2b828280,88,A store IC from the snapshot
+code-creation,StoreIC,9,0x2b8282e0,88,A store IC from the snapshot
+code-creation,StoreIC,9,0x2b828340,88,A store IC from the snapshot
+code-creation,StoreIC,9,0x2b8283a0,84,A store IC from the snapshot
+code-creation,StoreIC,9,0x2b828400,365,A store IC from the snapshot
+code-creation,StoreIC,9,0x2b828580,293,A store IC from the snapshot
+code-creation,StoreIC,9,0x2b8286c0,88,A store IC from the snapshot
+code-creation,StoreIC,9,0x2b828720,82,A store IC from the snapshot
+code-creation,KeyedStoreIC,10,0x2b828780,84,A keyed store IC from the snapshot
+code-creation,KeyedStoreIC,10,0x2b8287e0,2082,A keyed store IC from the snapshot
+code-creation,KeyedStoreIC,10,0x2b829020,84,A keyed store IC from the snapshot
+code-creation,KeyedStoreIC,10,0x2b829080,2082,A keyed store IC from the snapshot
+code-creation,KeyedStoreIC,10,0x2b8298c0,286,A keyed store IC from the snapshot
+code-creation,Builtin,3,0x2b8299e0,355,A builtin from the snapshot
+code-creation,Builtin,3,0x2b829b60,416,A builtin from the snapshot
+code-creation,Builtin,3,0x2b829d00,376,A builtin from the snapshot
+code-creation,Builtin,3,0x2b829e80,388,A builtin from the snapshot
+code-creation,Builtin,3,0x2b82a020,78,A builtin from the snapshot
+code-creation,Builtin,3,0x2b82a080,83,A builtin from the snapshot
+code-creation,Builtin,3,0x2b82a0e0,357,A builtin from the snapshot
+code-creation,Builtin,3,0x2b82a260,359,A builtin from the snapshot
+code-creation,Builtin,3,0x2b82a3e0,101,A builtin from the snapshot
+code-creation,Builtin,3,0x2b82a460,101,A builtin from the snapshot
+code-creation,Builtin,3,0x2b82a4e0,101,A builtin from the snapshot
+code-creation,Builtin,3,0x2b82a560,101,A builtin from the snapshot
+code-creation,Builtin,3,0x2b82a5e0,101,A builtin from the snapshot
+code-creation,Builtin,3,0x2b82a660,101,A builtin from the snapshot
+code-creation,Builtin,3,0x2b82a6e0,101,A builtin from the snapshot
+code-creation,Builtin,3,0x2b82a760,101,A builtin from the snapshot
+code-creation,Builtin,3,0x2b82a7e0,101,A builtin from the snapshot
+code-creation,Builtin,3,0x2b82a860,101,A builtin from the snapshot
+code-creation,Builtin,3,0x2b82a8e0,104,A builtin from the snapshot
+code-creation,Builtin,3,0x2b82a960,106,A builtin from the snapshot
+code-creation,Builtin,3,0x2b82a9e0,110,A builtin from the snapshot
+code-creation,Builtin,3,0x2b82aa60,112,A builtin from the snapshot
+code-creation,LoadIC,5,0x2b82aae0,106,A load IC from the snapshot
+code-creation,KeyedLoadIC,6,0x2b82ab60,106,A keyed load IC from the snapshot
+code-creation,StoreIC,9,0x2b82abe0,108,A store IC from the snapshot
+code-creation,KeyedStoreIC,10,0x2b82ac60,108,A keyed store IC from the snapshot
+code-creation,Stub,14,0x2b82ace0,104,CallFunctionStub
+code-creation,Builtin,3,0x2b82ad60,65,A builtin from the snapshot
+code-creation,Builtin,3,0x2b82adc0,93,A builtin from the snapshot
+timer-event-start,V8.GCCompactor,12962
+timer-event-start,V8.External,12972
+timer-event-end,V8.External,12981
+timer-event-start,V8.External,13996
+timer-event-end,V8.External,14014
+timer-event-end,V8.GCCompactor,14024
+code-creation,LazyCompile,3,0x2b81ac80,77,Empty :1,0x4420e5cc,
+code-creation,LazyCompile,0,0x2b81b040,336,SetUpUri native uri.js:442,0x4420f5b4,
+code-creation,LazyCompile,0,0x2b81b960,1429,FormatString native messages.js:187,0x4420f918,
+code-creation,LazyCompile,0,0x2b81bf60,280,MakeGenericError native messages.js:282,0x44211088,
+code-creation,LazyCompile,0,0x2b81c080,264,FormatMessage native messages.js:301,0x4421113c,
+code-creation,LazyCompile,0,0x2b81c1a0,200,MakeRangeError native messages.js:335,0x442112f0,
+code-creation,LazyCompile,0,0x2b81c280,1012,captureStackTrace native messages.js:1123,0x44212280,
+code-creation,LazyCompile,0,0x2b81c6e0,460,SetUpError native messages.js:1173,0x44212410,
+code-creation,LazyCompile,0,0x2b81c8c0,692,SetUpError.a native messages.js:1176,0x442124c0,
+code-creation,LazyCompile,0,0x2b81cb80,164,d native messages.js:1192,0x44212548,
+code-creation,LazyCompile,0,0x2b81cc40,360, native messages.js:1202,0x442125d0,
+code-creation,LazyCompile,0,0x2b81cc40,360,Error,0x44212698,
+code-creation,LazyCompile,0,0x2b81cc40,360,TypeError,0x442126f8,
+code-creation,LazyCompile,0,0x2b81cc40,360,RangeError,0x44212758,
+code-creation,LazyCompile,0,0x2b81cc40,360,SyntaxError,0x442127b8,
+code-creation,LazyCompile,0,0x2b81cc40,360,ReferenceError,0x44212818,
+code-creation,LazyCompile,0,0x2b81cc40,360,EvalError,0x44212878,
+code-creation,LazyCompile,0,0x2b81cc40,360,URIError,0x442128d8,
+code-creation,LazyCompile,0,0x2b81cdc0,424,SetUpStackOverflowBoilerplate native messages.js:1301,0x44212a74,
+code-creation,LazyCompile,0,0x2b81d200,380,StringConstructor native string.js:35,0x44214e2c,
+code-creation,LazyCompile,0,0x2b81d380,1132,SetUpString native string.js:962,0x44216ea8,
+code-creation,LazyCompile,0,0x2b81da80,1392,DateConstructor native date.js:141,0x442182bc,
+code-creation,LazyCompile,0,0x2b81e000,1396,SetUpDate native date.js:761,0x44219944,
+code-creation,LazyCompile,0,0x2b81e6a0,2272,SetUpArray native array.js:1591,0x4421c6ac,
+code-creation,LazyCompile,0,0x2b81f500,561,InstallFunctions native v8natives.js:46,0x4421cc1c,
+code-creation,LazyCompile,0,0x2b81f740,304,InstallGetterSetter native v8natives.js:72,0x4421ea1c,
+code-creation,LazyCompile,0,0x2b81f880,814,SetUpLockedPrototype native v8natives.js:87,0x4421eab4,
+code-creation,LazyCompile,0,0x2b81fbc0,452,SetUpGlobal native v8natives.js:197,0x4421ed3c,
+code-creation,LazyCompile,0,0x2b81fda0,404,hasOwnProperty native v8natives.js:251,0x4421eee4,
+code-creation,LazyCompile,0,0x2b81ff40,308,ObjectConstructor native v8natives.js:1371,0x442200b4,
+code-creation,LazyCompile,0,0x2b820080,1044,SetUpObject native v8natives.js:1385,0x44220140,
+code-creation,LazyCompile,0,0x2b8204a0,292,BooleanConstructor native v8natives.js:1437,0x442201c8,
+code-creation,LazyCompile,0,0x2b8205e0,448,SetUpBoolean native v8natives.js:1472,0x44220314,
+code-creation,LazyCompile,0,0x2b8207a0,336,NumberConstructor native v8natives.js:1491,0x442203ac,
+code-creation,LazyCompile,0,0x2b820900,924,SetUpNumber native v8natives.js:1635,0x4422073c,
+code-creation,LazyCompile,0,0x2b820ca0,440,FunctionConstructor native v8natives.js:1813,0x44220954,
+code-creation,LazyCompile,0,0x2b820e60,380,SetUpFunction native v8natives.js:1826,0x442209f8,
+code-creation,LazyCompile,0,0x2b821100,260,SetUpJSON native json.js:219,0x44221940,
+code-creation,LazyCompile,0,0x2b821380,164,MathConstructor native math.js:40,0x44221ba4,
+code-creation,LazyCompile,0,0x2b821440,1112,SetUpMath native math.js:226,0x4422283c,
+code-creation,LazyCompile,0,0x2b821a40,324,RegExpConstructor native regexp.js:90,0x44223264,
+code-creation,LazyCompile,0,0x2b821ba0,224,RegExpMakeCaptureGetter native regexp.js:360,0x44223784,
+code-creation,LazyCompile,0,0x2b821c80,1561,SetUpRegExp native regexp.js:400,0x44223878,
+code-creation,LazyCompile,0,0x2b822640,1728,EQUALS native runtime.js:54,0x44224078,
+code-creation,LazyCompile,0,0x2b822d00,376,STRICT_EQUALS native runtime.js:108,0x44224c18,
+code-creation,LazyCompile,0,0x2b822e80,924,COMPARE native runtime.js:128,0x44224ca4,
+code-creation,LazyCompile,0,0x2b823220,596,ADD native runtime.js:171,0x44224d44,
+code-creation,LazyCompile,0,0x2b823480,572,STRING_ADD_LEFT native runtime.js:191,0x44224dd8,
+code-creation,LazyCompile,0,0x2b8236c0,580,STRING_ADD_RIGHT native runtime.js:206,0x44224e64,
+code-creation,LazyCompile,0,0x2b823920,296,SUB native runtime.js:222,0x44224ef4,
+code-creation,LazyCompile,0,0x2b823a60,296,MUL native runtime.js:230,0x44224f84,
+code-creation,LazyCompile,0,0x2b823ba0,296,DIV native runtime.js:238,0x44225014,
+code-creation,LazyCompile,0,0x2b823ce0,296,MOD native runtime.js:246,0x442250a4,
+code-creation,LazyCompile,0,0x2b823e20,296,BIT_OR native runtime.js:260,0x44225134,
+code-creation,LazyCompile,0,0x2b823f60,384,BIT_AND native runtime.js:268,0x442251c4,
+code-creation,LazyCompile,0,0x2b8240e0,296,BIT_XOR native runtime.js:290,0x44225254,
+code-creation,LazyCompile,0,0x2b824220,244,UNARY_MINUS native runtime.js:298,0x442252e4,
+code-creation,LazyCompile,0,0x2b824320,244,BIT_NOT native runtime.js:305,0x44225370,
+code-creation,LazyCompile,0,0x2b824420,296,SHL native runtime.js:312,0x442253fc,
+code-creation,LazyCompile,0,0x2b824560,384,SAR native runtime.js:320,0x4422548c,
+code-creation,LazyCompile,0,0x2b8246e0,296,SHR native runtime.js:342,0x4422551c,
+code-creation,LazyCompile,0,0x2b824820,228,DELETE native runtime.js:356,0x442255ac,
+code-creation,LazyCompile,0,0x2b824920,368,IN native runtime.js:362,0x4422563c,
+code-creation,LazyCompile,0,0x2b824aa0,644,INSTANCE_OF native runtime.js:375,0x442256e8,
+code-creation,LazyCompile,0,0x2b824d40,236,FILTER_KEY native runtime.js:406,0x442257b8,
+code-creation,LazyCompile,0,0x2b824e40,380,CALL_NON_FUNCTION native runtime.js:413,0x44225848,
+code-creation,LazyCompile,0,0x2b824fc0,380,CALL_NON_FUNCTION_AS_CONSTRUCTOR native runtime.js:422,0x442258f4,
+code-creation,LazyCompile,0,0x2b825140,288,CALL_FUNCTION_PROXY native runtime.js:431,0x442259a0,
+code-creation,LazyCompile,0,0x2b825260,260,CALL_FUNCTION_PROXY_AS_CONSTRUCTOR native runtime.js:439,0x44225a38,
+code-creation,LazyCompile,0,0x2b825380,912,APPLY_PREPARE native runtime.js:446,0x44225acc,
+code-creation,LazyCompile,0,0x2b825720,232,APPLY_OVERFLOW native runtime.js:484,0x44225b9c,
+code-creation,LazyCompile,0,0x2b825820,188,TO_OBJECT native runtime.js:490,0x44225c38,
+code-creation,LazyCompile,0,0x2b8258e0,188,TO_NUMBER native runtime.js:496,0x44225cc0,
+code-creation,LazyCompile,0,0x2b8259a0,188,TO_STRING native runtime.js:502,0x44225d48,
+code-creation,LazyCompile,0,0x2b825a60,600,ToPrimitive native runtime.js:514,0x44225dd0,
+code-creation,LazyCompile,0,0x2b825cc0,404,ToBoolean native runtime.js:526,0x44225e60,
+code-creation,LazyCompile,0,0x2b825e60,504,ToNumber native runtime.js:536,0x44225eec,
+code-creation,LazyCompile,0,0x2b826060,416,ToString native runtime.js:561,0x44225fd8,
+code-creation,LazyCompile,0,0x2b826200,220,ToName native runtime.js:578,0x442260c4,
+code-creation,LazyCompile,3,0x2b8262e0,77,,0x44227108,
+code-creation,LazyCompile,3,0x2b8262e0,77,,0x44227168,
+code-creation,LazyCompile,3,0x2b8262e0,77,OpaqueReference,0x442271c8,
+code-creation,LazyCompile,3,0x2b8262e0,77,JSON,0x44227228,
+code-creation,LazyCompile,0,0x2b8204a0,292,Boolean,0x44227288,
+code-creation,LazyCompile,3,0x2b82a080,83,Array,0x442272e8,
+code-creation,LazyCompile,3,0x2b826460,77,pop,0x44227348,
+code-creation,LazyCompile,3,0x2b826400,77,push,0x442273a8,
+code-creation,LazyCompile,3,0x2b826640,77,concat,0x44227408,
+code-creation,LazyCompile,3,0x2b8264c0,77,shift,0x44227468,
+code-creation,LazyCompile,3,0x2b826520,77,unshift,0x442274c8,
+code-creation,LazyCompile,3,0x2b826580,77,slice,0x44227528,
+code-creation,LazyCompile,3,0x2b8265e0,77,splice,0x44227588,
+code-creation,LazyCompile,0,0x2b8207a0,336,Number,0x442275e8,
+code-creation,LazyCompile,3,0x2b82a020,78,InternalArray,0x44227648,
+code-creation,LazyCompile,3,0x2b82a020,78,InternalPackedArray,0x442276b4,
+code-creation,LazyCompile,3,0x2b8262e0,77,,0x44227714,
+code-creation,LazyCompile,0,0x2b821a40,324,RegExp,0x44227774,
+code-creation,LazyCompile,0,0x2b81da80,1392,Date,0x442277d4,
+code-creation,LazyCompile,0,0x2b820ca0,440,Function,0x44227834,
+code-creation,LazyCompile,0,0x2b81d200,380,String,0x44227894,
+code-creation,LazyCompile,3,0x2b8262e0,77,,0x442278f4,
+code-creation,LazyCompile,0,0x2b81cf80,216,Script,0x44227960,
+code-creation,LazyCompile,0,0x2b81ff40,308,Object,0x44227a00,
+code-creation,LazyCompile,3,0x2b829d00,376,call,0x44227a60,
+code-creation,LazyCompile,3,0x2b829e80,388,apply,0x44227ac0,
+code-creation,LazyCompile,3,0x2b8262e0,77,Arguments,0x44227b20,
+code-creation,LazyCompile,3,0x2b826820,77,ThrowTypeError,0x44227b80,
+code-creation,LazyCompile,3,0x2b826760,77,,0x44227be0,
+code-creation,LazyCompile,3,0x2b8267c0,77,,0x44227c40,
+code-creation,LazyCompile,3,0x2b8262e0,77,,0x44227ca0,
+code-creation,Stub,2,0x2b81ef80,782,CEntryStub
+code-creation,Stub,2,0x2b81f2a0,197,StoreBufferOverflowStub
+code-creation,Stub,2,0x2b81f380,79,StubFailureTrampolineStub
+code-creation,Stub,2,0x2b81f3e0,80,StubFailureTrampolineStub
+tick,0xf776d430,16272,0,0x0,3
+timer-event-start,V8.ParseLazyMicroSeconds,16854
+timer-event-end,V8.ParseLazyMicroSeconds,17081
+timer-event-start,V8.CompileLazy,17098
+timer-event-start,V8.CompileFullCode,17125
+tick,0xf74c79de,17348,0,0xff820034,2
+code-creation,Stub,2,0x2b81b200,246,FastCloneShallowObjectStub
+code-creation,Stub,12,0x2b81b300,88,BinaryOpStub_ADD_Alloc_Uninitialized+Uninitialized
+code-creation,Stub,12,0x2b81b360,88,BinaryOpStub_ADD_OverwriteLeft_Uninitialized+Uninitialized
+timer-event-end,V8.CompileFullCode,17910
+code-creation,LazyCompile,0,0x2b81b3c0,572,Instantiate native apinatives.js:44,0x44223cdc,~
+timer-event-end,V8.CompileLazy,17948
+code-creation,Stub,13,0x2b81b600,116,CompareICStub
+timer-event-start,V8.ParseLazyMicroSeconds,18020
+timer-event-end,V8.ParseLazyMicroSeconds,18170
+timer-event-start,V8.CompileLazy,18187
+timer-event-start,V8.CompileFullCode,18208
+code-creation,Stub,12,0x2b81b680,88,BinaryOpStub_BIT_AND_Alloc_Uninitialized+Uninitialized
+timer-event-end,V8.CompileFullCode,18340
+code-creation,LazyCompile,0,0x2b82ae20,1008,InstantiateFunction native apinatives.js:65,0x44223d3c,
+timer-event-end,V8.CompileLazy,18396
+tick,0xf776d430,18420,0,0x90d68fc,2,0x2b81b4f0
+code-creation,Stub,2,0x2b82b220,1800,RecordWriteStub
+code-creation,Stub,2,0x2b82b940,236,KeyedStoreElementStub
+code-creation,KeyedStoreIC,10,0x2b82ba40,91,
+code-creation,CallIC,7,0x2b82baa0,129,InstantiateFunction
+code-creation,LoadIC,5,0x2b82bb40,103,kApiFunctionCache
+code-creation,Stub,12,0x2b82bbc0,146,BinaryOpStub_BIT_AND_Alloc_Smi+Smi
+code-creation,Stub,15,0x2b82bc60,132,ToBooleanStub(Smi)
+timer-event-start,V8.ParseLazyMicroSeconds,19172
+timer-event-end,V8.ParseLazyMicroSeconds,19253
+timer-event-start,V8.CompileLazy,19268
+timer-event-start,V8.CompileFullCode,19285
+timer-event-end,V8.CompileFullCode,19350
+code-creation,LazyCompile,0,0x2b82bd00,753,ConfigureTemplateInstance native apinatives.js:105,0x44223d9c,
+timer-event-end,V8.CompileLazy,19384
+tick,0x83c1620,19510,0,0xff81f92c,0,0x2b82b1de,0x2b81b4f0,0x2b81b576,0x2b82b0b8,0x2b81b4f0
+code-creation,Stub,2,0x2b82c000,208,KeyedLoadElementStub
+code-creation,KeyedLoadIC,6,0x2b82c0e0,91,
+code-creation,Stub,15,0x2b82c140,156,ToBooleanStub(Undefined,SpecObject)
+code-creation,KeyedLoadIC,6,0x2b82c1e0,91,
+code-creation,Stub,12,0x2b82c240,146,BinaryOpStub_ADD_Alloc_Smi+Smi
+code-creation,Stub,15,0x2b82c2e0,168,ToBooleanStub(Undefined,String)
+code-creation,CallIC,7,0x2b82c3a0,129,ConfigureTemplateInstance
+code-creation,CallIC,7,0x2b82c440,129,Instantiate
+code-creation,CallIC,7,0x2b82c4e0,144,Instantiate
+code-creation,Stub,13,0x2b82c580,469,CompareICStub
+code-creation,Stub,14,0x2b82c760,144,CompareNilICStub(NullValue)(MonomorphicMap)
+code-creation,Stub,14,0x2b82c800,144,CompareNilICStub(NullValue)(MonomorphicMap)
+tick,0x8132a60,20593,0,0x8141e5e,0,0x2b822c4e,0x2b82af24,0x2b81b4f0,0x2b82beff,0x2b81b59f,0x2b82beff,0x2b81b589,0x2b82b0b8,0x2b81b4f0
+code-creation,Stub,14,0x2b82c8a0,124,CompareNilICStub(NullValue)(Undefined,Null,Undetectable,Generic)
+code-creation,Stub,13,0x2b82c920,156,CompareICStub
+timer-event-start,V8.ParseLazyMicroSeconds,20736
+timer-event-end,V8.ParseLazyMicroSeconds,20818
+timer-event-start,V8.CompileLazy,20838
+timer-event-start,V8.CompileFullCode,20854
+code-creation,Stub,2,0x2b82c9c0,587,FastCloneShallowArrayStub
+timer-event-end,V8.CompileFullCode,21298
+code-creation,LazyCompile,0,0x2b82cc20,812,DefaultNumber native runtime.js:645,0x44226390,~
+timer-event-end,V8.CompileLazy,21330
+timer-event-start,V8.ParseLazyMicroSeconds,21352
+timer-event-end,V8.ParseLazyMicroSeconds,21381
+timer-event-start,V8.CompileLazy,21393
+timer-event-start,V8.CompileFullCode,21405
+timer-event-end,V8.CompileFullCode,21436
+code-creation,LazyCompile,0,0x2b82cf60,184,valueOf native v8natives.js:245,0x4421ee84,~
+timer-event-end,V8.CompileLazy,21465
+timer-event-start,V8.ParseLazyMicroSeconds,21482
+timer-event-end,V8.ParseLazyMicroSeconds,21544
+timer-event-start,V8.CompileLazy,21557
+timer-event-start,V8.CompileFullCode,21571
+timer-event-end,V8.CompileFullCode,21651
+code-creation,LazyCompile,0,0x2b82d020,652,ToObject native runtime.js:584,0x44226150,~
+timer-event-end,V8.CompileLazy,21690
+tick,0x80eabe2,21708,0,0xff81f7a8,2,0x2b82cfe4,0x2b82cd79,0x2b825c84,0x2b822ca7,0x2b82af24,0x2b81b4f0,0x2b82beff,0x2b81b59f,0x2b82beff,0x2b81b589,0x2b82b0b8,0x2b81b4f0
+timer-event-start,V8.ParseLazyMicroSeconds,21761
+timer-event-end,V8.ParseLazyMicroSeconds,21796
+timer-event-start,V8.CompileLazy,21808
+timer-event-start,V8.CompileFullCode,21820
+timer-event-end,V8.CompileFullCode,21845
+code-creation,LazyCompile,0,0x2b82d2c0,220,IsPrimitive native runtime.js:636,0x44226330,~
+timer-event-end,V8.CompileLazy,21873
+timer-event-start,V8.ParseLazyMicroSeconds,21895
+timer-event-end,V8.ParseLazyMicroSeconds,21921
+timer-event-start,V8.CompileLazy,21932
+timer-event-start,V8.CompileFullCode,21946
+timer-event-end,V8.CompileFullCode,21966
+code-creation,LazyCompile,0,0x2b82d3a0,184,toString native v8natives.js:1721,0x44220834,~
+timer-event-end,V8.CompileLazy,21994
+timer-event-start,V8.ParseLazyMicroSeconds,22009
+timer-event-end,V8.ParseLazyMicroSeconds,22087
+timer-event-start,V8.CompileLazy,22101
+timer-event-start,V8.CompileFullCode,22116
+timer-event-end,V8.CompileFullCode,22221
+code-creation,LazyCompile,0,0x2b82d460,681,FunctionSourceString native v8natives.js:1693,0x442207d4,~
+timer-event-end,V8.CompileLazy,22237
+code-creation,Stub,15,0x2b82d720,156,ToBooleanStub(String)
+code-creation,Stub,12,0x2b82d7c0,124,BinaryOpStub_ADD_Alloc_String+String
+code-creation,Stub,12,0x2b82d840,124,BinaryOpStub_ADD_OverwriteLeft_String+String
+code-creation,CallMiss,7,0x2b82d8c0,178,args_count: 2
+code-creation,CallIC,7,0x2b82d980,128,ToPrimitive
+code-creation,CallIC,7,0x2b82da00,128,DefaultNumber
+code-creation,Stub,2,0x2b82da80,116,valueOf
+code-creation,LoadIC,5,0x2b82db00,93,valueOf
+code-creation,CallIC,7,0x2b82db60,129,ToObject
+code-creation,CallIC,7,0x2b82dc00,128,IsPrimitive
+code-creation,Stub,2,0x2b82dc80,98,toString
+code-creation,LoadIC,5,0x2b82dd00,93,toString
+code-creation,CallIC,7,0x2b82dd60,129,FunctionSourceString
+code-creation,CallIC,7,0x2b82de00,128,ToNumber
+timer-event-start,V8.ParseMicroSeconds,22650
+tick,0xf776d430,22726,0,0x0,2
+timer-event-end,V8.ParseMicroSeconds,22773
+timer-event-start,V8.Compile,22785
+timer-event-start,V8.CompileFullCode,22801
+timer-event-end,V8.CompileFullCode,22822
+code-creation,Script,0,0x2b82de80,264,native arraybuffer.js,0x4423ab7c,~
+timer-event-end,V8.Compile,22836
+timer-event-start,V8.ParseLazyMicroSeconds,22859
+timer-event-end,V8.ParseLazyMicroSeconds,22881
+timer-event-start,V8.CompileLazy,22887
+timer-event-start,V8.CompileFullCode,22899
+timer-event-end,V8.CompileFullCode,22918
+code-creation,LazyCompile,0,0x2b82dfa0,480,SetUpArrayBuffer native arraybuffer.js:84,0x4423aac0,~
+timer-event-end,V8.CompileLazy,22934
+timer-event-start,V8.ParseLazyMicroSeconds,22943
+timer-event-end,V8.ParseLazyMicroSeconds,22962
+timer-event-start,V8.CompileLazy,22967
+timer-event-start,V8.CompileFullCode,22972
+timer-event-end,V8.CompileFullCode,22987
+code-creation,LazyCompile,0,0x2b82e180,324,ArrayBufferConstructor native arraybuffer.js:34,0x4423a9a0,~
+timer-event-end,V8.CompileLazy,23000
+code-creation,LazyCompile,0,0x2b82e180,324,ArrayBufferConstructor native arraybuffer.js:34,0x4423a9a0,
+timer-event-start,V8.ParseLazyMicroSeconds,23021
+timer-event-end,V8.ParseLazyMicroSeconds,23037
+timer-event-start,V8.CompileLazy,23042
+timer-event-start,V8.CompileFullCode,23047
+timer-event-end,V8.CompileFullCode,23057
+code-creation,LazyCompile,0,0x2b82e2e0,252,InstallGetter native v8natives.js:63,0x4421e9bc,~
+timer-event-end,V8.CompileLazy,23069
+code-creation,KeyedLoadIC,6,0x2b82e3e0,91,
+code-creation,LoadIC,5,0x2b82e440,93,length
+timer-event-start,V8.ParseMicroSeconds,23160
+timer-event-end,V8.ParseMicroSeconds,23613
+timer-event-start,V8.Compile,23621
+timer-event-start,V8.CompileFullCode,23666
+timer-event-end,V8.CompileFullCode,23702
+code-creation,Script,0,0x2b82e4a0,720,native typedarray.js,0x4423bc04,~
+timer-event-end,V8.Compile,23724
+timer-event-start,V8.ParseLazyMicroSeconds,23755
+tick,0xf776d430,23782,0,0x0,2
+timer-event-end,V8.ParseLazyMicroSeconds,23867
+timer-event-start,V8.CompileLazy,23905
+timer-event-start,V8.CompileFullCode,23916
+timer-event-end,V8.CompileFullCode,23939
+code-creation,LazyCompile,0,0x2b82e780,664,SetupTypedArray native typedarray.js:170,0x4423b238,~
+timer-event-end,V8.CompileLazy,23971
+timer-event-start,V8.ParseLazyMicroSeconds,23979
+timer-event-end,V8.ParseLazyMicroSeconds,24064
+timer-event-start,V8.CompileLazy,24071
+timer-event-start,V8.CompileFullCode,24085
+code-creation,Stub,2,0x2b82ea20,175,FastNewContextStub
+code-creation,Stub,2,0x2b82eae0,304,FastNewClosureStub
+code-creation,Stub,2,0x2b82ec20,1448,RecordWriteStub
+timer-event-end,V8.CompileFullCode,24149
+code-creation,LazyCompile,0,0x2b82f1e0,460,CreateTypedArrayConstructor native typedarray.js:38,0x4423af98,~
+timer-event-end,V8.CompileLazy,24163
+timer-event-start,V8.ParseLazyMicroSeconds,24170
+timer-event-end,V8.ParseLazyMicroSeconds,24198
+timer-event-start,V8.CompileLazy,24203
+timer-event-start,V8.CompileFullCode,24211
+code-creation,Stub,2,0x2b82f3c0,331,CallFunctionStub_Args4_Recording
+code-creation,Stub,2,0x2b82f520,631,FastCloneShallowArrayStub
+code-creation,Stub,2,0x2b82f7a0,245,StoreArrayLiteralElementStub
+timer-event-end,V8.CompileFullCode,24435
+code-creation,LazyCompile,0,0x2b82f8a0,824, native typedarray.js:88,0x4423c580,~
+timer-event-end,V8.CompileLazy,24448
+code-creation,LazyCompile,0,0x2b82f8a0,824, native typedarray.js:88,0x4423c580,
+timer-event-start,V8.ParseLazyMicroSeconds,24478
+timer-event-end,V8.ParseLazyMicroSeconds,24519
+timer-event-start,V8.CompileLazy,24525
+timer-event-start,V8.CompileFullCode,24533
+timer-event-end,V8.CompileFullCode,24546
+code-creation,LazyCompile,0,0x2b82fbe0,268,CreateSubArray native typedarray.js:121,0x4423b178,~
+timer-event-end,V8.CompileLazy,24559
+code-creation,CallMiss,7,0x2b82fd00,180,args_count: 4
+code-creation,CallIC,7,0x2b82fdc0,129,CreateTypedArrayConstructor
+code-creation,LazyCompile,0,0x2b82f8a0,824, native typedarray.js:88,0x4423c580,
+code-creation,LoadIC,5,0x2b82fe60,103,$Object
+code-creation,LoadIC,5,0x2b82fee0,103,TypedArrayGetBuffer
+code-creation,CallMiss,7,0x2b82ff60,180,args_count: 3
+code-creation,CallIC,7,0x2b830020,129,InstallGetter
+code-creation,LoadIC,5,0x2b8300c0,103,TypedArrayGetByteOffset
+code-creation,LoadIC,5,0x2b830140,103,TypedArrayGetByteLength
+code-creation,LoadIC,5,0x2b8301c0,103,TypedArrayGetLength
+code-creation,CallIC,7,0x2b830240,129,CreateSubArray
+code-creation,LoadIC,5,0x2b8302e0,103,TypedArraySet
+code-creation,CallIC,7,0x2b830360,133,$Array
+code-creation,CallIC,7,0x2b830400,129,InstallFunctions
+code-creation,LazyCompile,0,0x2b82f8a0,824, native typedarray.js:88,0x4423c580,
+code-creation,LazyCompile,0,0x2b82f8a0,824, native typedarray.js:88,0x4423c580,
+code-creation,LazyCompile,0,0x2b82f8a0,824, native typedarray.js:88,0x4423c580,
+code-creation,LazyCompile,0,0x2b82f8a0,824, native typedarray.js:88,0x4423c580,
+tick,0xf7492ece,24846,0,0xff81ff10,0,0x2b82e839,0x2b82e5f9
+code-creation,LazyCompile,0,0x2b82f8a0,824, native typedarray.js:88,0x4423c580,
+code-creation,LazyCompile,0,0x2b82f8a0,824, native typedarray.js:88,0x4423c580,
+code-creation,LazyCompile,0,0x2b82f8a0,824, native typedarray.js:88,0x4423c580,
+timer-event-start,V8.ParseLazyMicroSeconds,25032
+timer-event-end,V8.ParseLazyMicroSeconds,25074
+timer-event-start,V8.CompileLazy,25081
+timer-event-start,V8.CompileFullCode,25093
+timer-event-end,V8.CompileFullCode,25115
+code-creation,LazyCompile,0,0x2b8304a0,888,SetupDataView native typedarray.js:434,0x4423ba78,~
+timer-event-end,V8.CompileLazy,25128
+timer-event-start,V8.ParseLazyMicroSeconds,25136
+timer-event-end,V8.ParseLazyMicroSeconds,25175
+timer-event-start,V8.CompileLazy,25181
+timer-event-start,V8.CompileFullCode,25188
+code-creation,Stub,12,0x2b830820,88,BinaryOpStub_SUB_Alloc_Uninitialized+Uninitialized
+timer-event-end,V8.CompileFullCode,25228
+code-creation,LazyCompile,0,0x2b830880,908,DataViewConstructor native typedarray.js:209,0x4423b298,~
+timer-event-end,V8.CompileLazy,25241
+code-creation,LazyCompile,0,0x2b830880,908,DataViewConstructor native typedarray.js:209,0x4423b298,
+code-creation,KeyedStorePolymorphicIC,10,0x2b830c20,101,
+code-creation,KeyedStorePolymorphicIC,10,0x2b830c20,101,args_count: 0
+code-creation,CallIC,7,0x2b830ca0,144,Instantiate
+code-creation,CallIC,7,0x2b830d40,129,InstantiateFunction
+code-creation,LoadIC,5,0x2b830de0,103,kApiFunctionCache
+code-creation,KeyedLoadPolymorphicIC,6,0x2b830e60,105,
+code-creation,CallIC,7,0x2b830ee0,129,ConfigureTemplateInstance
+code-creation,CallIC,7,0x2b830f80,129,Instantiate
+code-creation,Stub,2,0x2b831020,116,valueOf
+code-creation,LoadPolymorphicIC,5,0x2b8310a0,105,valueOf
+code-creation,Stub,2,0x2b831120,98,toString
+code-creation,LoadPolymorphicIC,5,0x2b8311a0,105,toString
+code-creation,CallIC,7,0x2b831220,128,ToPrimitive
+code-creation,CallIC,7,0x2b8312a0,128,DefaultNumber
+code-creation,CallIC,7,0x2b831320,129,ToObject
+code-creation,CallIC,7,0x2b8313c0,128,IsPrimitive
+code-creation,CallIC,7,0x2b831440,129,FunctionSourceString
+code-creation,CallIC,7,0x2b8314e0,128,ToNumber
+tick,0xf776d430,25914,0,0x90ec418,0,0x2b82cda7,0x2b825c84,0x2b822ca7,0x2b82af24,0x2b81b4f0,0x2b82beff,0x2b81b59f,0x2b82beff,0x2b81b589,0x2b82b0b8,0x2b81b4f0
+timer-event-start,V8.ParseLazyMicroSeconds,25965
+timer-event-end,V8.ParseLazyMicroSeconds,25985
+timer-event-start,V8.CompileLazy,25991
+timer-event-start,V8.RecompileSynchronous,25996
+code-creation,LazyCompile,0,0x2b831560,184,valueOf native v8natives.js:245,0x4421ee84,~
+timer-event-end,V8.RecompileSynchronous,26121
+code-creation,LazyCompile,1,0x2b831620,180,valueOf native v8natives.js:245,0x4421ee84,*
+timer-event-end,V8.CompileLazy,26138
+timer-event-start,V8.ParseLazyMicroSeconds,26144
+timer-event-end,V8.ParseLazyMicroSeconds,26156
+timer-event-start,V8.CompileLazy,26161
+timer-event-start,V8.RecompileSynchronous,26166
+code-creation,LazyCompile,0,0x2b8316e0,220,IsPrimitive native runtime.js:636,0x44226330,~
+timer-event-end,V8.RecompileSynchronous,26250
+code-creation,LazyCompile,1,0x2b8317c0,170,IsPrimitive native runtime.js:636,0x44226330,*
+timer-event-end,V8.CompileLazy,26266
+timer-event-start,V8.ParseLazyMicroSeconds,26271
+timer-event-end,V8.ParseLazyMicroSeconds,26282
+timer-event-start,V8.CompileLazy,26286
+timer-event-start,V8.RecompileSynchronous,26291
+code-creation,LazyCompile,0,0x2b831880,184,toString native v8natives.js:1721,0x44220834,~
+timer-event-end,V8.RecompileSynchronous,26361
+code-creation,LazyCompile,1,0x2b831940,180,toString native v8natives.js:1721,0x44220834,*
+timer-event-end,V8.CompileLazy,26376
+code-creation,LoadIC,5,0x2b831a00,103,global
+code-creation,LoadIC,5,0x2b831a80,114,ArrayBuffer
+code-creation,CallMiss,7,0x2b831b00,180,args_count: 0
+code-creation,CallIC,7,0x2b831bc0,129,SetUpArrayBuffer
+code-creation,LoadIC,5,0x2b831c60,103,$ArrayBuffer
+code-creation,LoadIC,5,0x2b831ce0,103,ArrayBufferConstructor
+code-creation,LazyCompile,0,0x2b82e180,324,ArrayBufferConstructor native arraybuffer.js:34,0x4423a9a0,
+code-creation,LoadIC,5,0x2b831d60,103,$Object
+code-creation,LoadIC,5,0x2b831de0,103,ArrayBufferGetByteLength
+code-creation,CallIC,7,0x2b831e60,129,InstallGetter
+code-creation,LoadIC,5,0x2b831f00,103,ArrayBufferSlice
+code-creation,CallIC,7,0x2b831f80,133,$Array
+code-creation,CallIC,7,0x2b832020,129,InstallFunctions
+code-creation,LoadPolymorphicIC,5,0x2b8320c0,105,length
+code-creation,LoadPolymorphicIC,5,0x2b832140,105,length
+code-creation,KeyedLoadPolymorphicIC,6,0x2b8321c0,105,
+code-creation,LoadIC,5,0x2b832240,114,Uint8Array
+code-creation,CallIC,7,0x2b8322c0,129,SetupTypedArray
+code-creation,LazyCompile,0,0x2b82f8a0,824, native typedarray.js:88,0x4423c580,
+code-creation,LoadIC,5,0x2b832360,103,$Object
+code-creation,LoadIC,5,0x2b8323e0,114,Int8Array
+code-creation,CallIC,7,0x2b832460,129,CreateTypedArrayConstructor
+code-creation,LazyCompile,0,0x2b82f8a0,824, native typedarray.js:88,0x4423c580,
+code-creation,LoadIC,5,0x2b832500,103,TypedArrayGetBuffer
+code-creation,LoadIC,5,0x2b832580,103,TypedArrayGetByteOffset
+code-creation,LoadIC,5,0x2b832600,103,TypedArrayGetByteLength
+code-creation,LoadIC,5,0x2b832680,103,TypedArrayGetLength
+code-creation,CallIC,7,0x2b832700,129,CreateSubArray
+code-creation,LoadIC,5,0x2b8327a0,103,TypedArraySet
+code-creation,CallIC,7,0x2b832820,133,$Array
+code-creation,LoadIC,5,0x2b8328c0,114,Uint16Array
+code-creation,LazyCompile,0,0x2b82f8a0,824, native typedarray.js:88,0x4423c580,
+tick,0xf776d430,26979,0,0x90ec418,0,0x2b82e9b7,0x2b82e593
+code-creation,LoadIC,5,0x2b832940,114,Int16Array
+code-creation,LazyCompile,0,0x2b82f8a0,824, native typedarray.js:88,0x4423c580,
+code-creation,LoadIC,5,0x2b8329c0,114,Uint32Array
+code-creation,LazyCompile,0,0x2b82f8a0,824, native typedarray.js:88,0x4423c580,
+code-creation,LoadIC,5,0x2b832a40,114,Int32Array
+code-creation,LazyCompile,0,0x2b82f8a0,824, native typedarray.js:88,0x4423c580,
+code-creation,LoadIC,5,0x2b832ac0,114,Float32Array
+code-creation,LazyCompile,0,0x2b82f8a0,824, native typedarray.js:88,0x4423c580,
+code-creation,LoadIC,5,0x2b832b40,114,Float64Array
+code-creation,LazyCompile,0,0x2b82f8a0,824, native typedarray.js:88,0x4423c580,
+code-creation,LoadIC,5,0x2b832bc0,114,Uint8ClampedArray
+code-creation,LazyCompile,0,0x2b82f8a0,824, native typedarray.js:88,0x4423c580,
+code-creation,LoadIC,5,0x2b832c40,114,DataView
+code-creation,CallIC,7,0x2b832cc0,129,SetupDataView
+code-creation,LoadIC,5,0x2b832d60,103,$DataView
+code-creation,LoadIC,5,0x2b832de0,103,DataViewConstructor
+code-creation,LazyCompile,0,0x2b830880,908,DataViewConstructor native typedarray.js:209,0x4423b298,
+code-creation,LoadIC,5,0x2b832e60,103,DataViewGetBuffer
+code-creation,LoadIC,5,0x2b832ee0,103,DataViewGetByteOffset
+code-creation,LoadIC,5,0x2b832f60,103,DataViewGetByteLength
+code-creation,LoadIC,5,0x2b832fe0,103,DataViewGetInt8
+code-creation,LoadIC,5,0x2b833060,103,DataViewSetInt8
+code-creation,LoadIC,5,0x2b8330e0,103,DataViewGetUint8
+code-creation,LoadIC,5,0x2b833160,103,DataViewSetUint8
+code-creation,LoadIC,5,0x2b8331e0,103,DataViewGetInt16
+code-creation,LoadIC,5,0x2b833260,103,DataViewSetInt16
+code-creation,LoadIC,5,0x2b8332e0,103,DataViewGetUint16
+code-creation,LoadIC,5,0x2b833360,103,DataViewSetUint16
+code-creation,LoadIC,5,0x2b8333e0,103,DataViewGetInt32
+code-creation,LoadIC,5,0x2b833460,103,DataViewSetInt32
+code-creation,LoadIC,5,0x2b8334e0,103,DataViewGetUint32
+code-creation,LoadIC,5,0x2b833560,103,DataViewSetUint32
+code-creation,LoadIC,5,0x2b8335e0,103,DataViewGetFloat32
+code-creation,LoadIC,5,0x2b833660,103,DataViewSetFloat32
+code-creation,LoadIC,5,0x2b8336e0,103,DataViewGetFloat64
+code-creation,LoadIC,5,0x2b833760,103,DataViewSetFloat64
+code-creation,CallMiss,7,0x2b8337e0,189,args_count: 32
+code-creation,CallIC,7,0x2b8338a0,136,$Array
+code-creation,LoadIC,5,0x2b833940,93,length
+timer-event-start,V8.ParseMicroSeconds,28734
+timer-event-start,V8.PreParseMicroSeconds,28760
+timer-event-end,V8.PreParseMicroSeconds,28785
+timer-event-start,V8.PreParseMicroSeconds,28796
+timer-event-end,V8.PreParseMicroSeconds,28803
+timer-event-start,V8.PreParseMicroSeconds,28810
+timer-event-end,V8.PreParseMicroSeconds,28817
+timer-event-start,V8.PreParseMicroSeconds,28828
+timer-event-end,V8.PreParseMicroSeconds,28862
+timer-event-start,V8.PreParseMicroSeconds,28872
+timer-event-end,V8.PreParseMicroSeconds,28878
+timer-event-start,V8.PreParseMicroSeconds,28884
+timer-event-end,V8.PreParseMicroSeconds,28890
+timer-event-start,V8.PreParseMicroSeconds,28905
+timer-event-end,V8.PreParseMicroSeconds,28931
+timer-event-start,V8.PreParseMicroSeconds,28938
+timer-event-end,V8.PreParseMicroSeconds,28970
+timer-event-start,V8.PreParseMicroSeconds,28980
+timer-event-end,V8.PreParseMicroSeconds,28989
+timer-event-start,V8.PreParseMicroSeconds,28995
+timer-event-end,V8.PreParseMicroSeconds,29005
+timer-event-start,V8.PreParseMicroSeconds,29012
+timer-event-end,V8.PreParseMicroSeconds,29019
+timer-event-start,V8.PreParseMicroSeconds,29026
+timer-event-end,V8.PreParseMicroSeconds,29045
+timer-event-start,V8.PreParseMicroSeconds,29052
+timer-event-end,V8.PreParseMicroSeconds,29059
+timer-event-start,V8.PreParseMicroSeconds,29066
+timer-event-end,V8.PreParseMicroSeconds,29072
+timer-event-start,V8.PreParseMicroSeconds,29078
+timer-event-end,V8.PreParseMicroSeconds,29087
+tick,0xf776d430,29099,0,0x0,2
+timer-event-start,V8.PreParseMicroSeconds,29187
+timer-event-end,V8.PreParseMicroSeconds,29241
+timer-event-start,V8.PreParseMicroSeconds,29253
+timer-event-end,V8.PreParseMicroSeconds,29261
+timer-event-start,V8.PreParseMicroSeconds,29274
+timer-event-end,V8.PreParseMicroSeconds,29286
+timer-event-start,V8.PreParseMicroSeconds,29293
+timer-event-end,V8.PreParseMicroSeconds,29305
+timer-event-start,V8.PreParseMicroSeconds,29314
+timer-event-end,V8.PreParseMicroSeconds,29324
+timer-event-start,V8.PreParseMicroSeconds,29331
+timer-event-end,V8.PreParseMicroSeconds,29344
+timer-event-start,V8.PreParseMicroSeconds,29355
+timer-event-end,V8.PreParseMicroSeconds,29369
+timer-event-start,V8.PreParseMicroSeconds,29375
+timer-event-end,V8.PreParseMicroSeconds,29391
+timer-event-start,V8.PreParseMicroSeconds,29400
+timer-event-end,V8.PreParseMicroSeconds,29408
+timer-event-start,V8.PreParseMicroSeconds,29416
+timer-event-end,V8.PreParseMicroSeconds,29422
+timer-event-start,V8.PreParseMicroSeconds,29435
+timer-event-end,V8.PreParseMicroSeconds,29442
+timer-event-start,V8.PreParseMicroSeconds,29448
+timer-event-end,V8.PreParseMicroSeconds,29461
+timer-event-start,V8.PreParseMicroSeconds,29467
+timer-event-end,V8.PreParseMicroSeconds,29480
+timer-event-start,V8.PreParseMicroSeconds,29489
+timer-event-end,V8.PreParseMicroSeconds,29508
+timer-event-start,V8.PreParseMicroSeconds,29516
+timer-event-end,V8.PreParseMicroSeconds,29547
+timer-event-start,V8.PreParseMicroSeconds,29561
+timer-event-end,V8.PreParseMicroSeconds,29579
+timer-event-start,V8.PreParseMicroSeconds,29587
+timer-event-end,V8.PreParseMicroSeconds,29605
+timer-event-start,V8.PreParseMicroSeconds,29613
+timer-event-end,V8.PreParseMicroSeconds,29639
+timer-event-start,V8.PreParseMicroSeconds,29646
+timer-event-end,V8.PreParseMicroSeconds,29667
+timer-event-start,V8.PreParseMicroSeconds,29677
+timer-event-end,V8.PreParseMicroSeconds,29702
+timer-event-start,V8.PreParseMicroSeconds,29709
+timer-event-end,V8.PreParseMicroSeconds,29735
+timer-event-start,V8.PreParseMicroSeconds,29741
+timer-event-end,V8.PreParseMicroSeconds,29758
+timer-event-start,V8.PreParseMicroSeconds,29764
+timer-event-end,V8.PreParseMicroSeconds,29773
+timer-event-start,V8.PreParseMicroSeconds,29781
+timer-event-end,V8.PreParseMicroSeconds,29796
+timer-event-start,V8.PreParseMicroSeconds,29805
+timer-event-end,V8.PreParseMicroSeconds,29813
+timer-event-start,V8.PreParseMicroSeconds,29821
+timer-event-end,V8.PreParseMicroSeconds,29839
+timer-event-start,V8.PreParseMicroSeconds,29847
+timer-event-end,V8.PreParseMicroSeconds,29861
+timer-event-start,V8.PreParseMicroSeconds,29868
+timer-event-end,V8.PreParseMicroSeconds,29873
+timer-event-start,V8.PreParseMicroSeconds,29880
+timer-event-end,V8.PreParseMicroSeconds,29908
+timer-event-start,V8.PreParseMicroSeconds,29914
+timer-event-end,V8.PreParseMicroSeconds,29923
+timer-event-start,V8.PreParseMicroSeconds,29930
+timer-event-end,V8.PreParseMicroSeconds,29937
+timer-event-start,V8.PreParseMicroSeconds,29944
+timer-event-end,V8.PreParseMicroSeconds,29955
+timer-event-start,V8.PreParseMicroSeconds,29960
+timer-event-end,V8.PreParseMicroSeconds,29970
+timer-event-start,V8.PreParseMicroSeconds,29977
+timer-event-end,V8.PreParseMicroSeconds,29982
+timer-event-start,V8.PreParseMicroSeconds,29989
+timer-event-end,V8.PreParseMicroSeconds,29999
+timer-event-start,V8.PreParseMicroSeconds,30031
+timer-event-end,V8.PreParseMicroSeconds,30041
+timer-event-start,V8.PreParseMicroSeconds,30047
+timer-event-end,V8.PreParseMicroSeconds,30054
+timer-event-start,V8.PreParseMicroSeconds,30060
+timer-event-end,V8.PreParseMicroSeconds,30069
+timer-event-start,V8.PreParseMicroSeconds,30080
+timer-event-end,V8.PreParseMicroSeconds,30106
+timer-event-start,V8.PreParseMicroSeconds,30113
+timer-event-end,V8.PreParseMicroSeconds,30121
+timer-event-start,V8.PreParseMicroSeconds,30127
+timer-event-end,V8.PreParseMicroSeconds,30133
+timer-event-start,V8.PreParseMicroSeconds,30139
+timer-event-end,V8.PreParseMicroSeconds,30148
+tick,0x825e06c,30162,0,0x0,2
+timer-event-start,V8.PreParseMicroSeconds,30217
+timer-event-end,V8.PreParseMicroSeconds,30285
+timer-event-start,V8.PreParseMicroSeconds,30293
+timer-event-end,V8.PreParseMicroSeconds,30319
+timer-event-start,V8.PreParseMicroSeconds,30326
+timer-event-end,V8.PreParseMicroSeconds,30344
+timer-event-start,V8.PreParseMicroSeconds,30350
+timer-event-end,V8.PreParseMicroSeconds,30367
+timer-event-start,V8.PreParseMicroSeconds,30374
+timer-event-end,V8.PreParseMicroSeconds,30385
+timer-event-start,V8.PreParseMicroSeconds,30392
+timer-event-end,V8.PreParseMicroSeconds,30400
+timer-event-start,V8.PreParseMicroSeconds,30407
+timer-event-end,V8.PreParseMicroSeconds,30415
+timer-event-start,V8.PreParseMicroSeconds,30429
+timer-event-end,V8.PreParseMicroSeconds,30446
+timer-event-start,V8.PreParseMicroSeconds,30456
+timer-event-end,V8.PreParseMicroSeconds,30461
+timer-event-start,V8.PreParseMicroSeconds,30469
+timer-event-end,V8.PreParseMicroSeconds,30480
+timer-event-start,V8.PreParseMicroSeconds,30488
+timer-event-end,V8.PreParseMicroSeconds,30497
+timer-event-start,V8.PreParseMicroSeconds,30503
+timer-event-end,V8.PreParseMicroSeconds,30511
+timer-event-start,V8.PreParseMicroSeconds,30517
+timer-event-end,V8.PreParseMicroSeconds,30528
+timer-event-start,V8.PreParseMicroSeconds,30535
+timer-event-end,V8.PreParseMicroSeconds,30539
+timer-event-start,V8.PreParseMicroSeconds,30546
+timer-event-end,V8.PreParseMicroSeconds,30550
+timer-event-start,V8.PreParseMicroSeconds,30568
+timer-event-end,V8.PreParseMicroSeconds,30577
+timer-event-start,V8.PreParseMicroSeconds,30586
+timer-event-end,V8.PreParseMicroSeconds,30591
+timer-event-start,V8.PreParseMicroSeconds,30600
+timer-event-end,V8.PreParseMicroSeconds,30610
+timer-event-start,V8.PreParseMicroSeconds,30616
+timer-event-end,V8.PreParseMicroSeconds,30621
+timer-event-start,V8.PreParseMicroSeconds,30630
+timer-event-end,V8.PreParseMicroSeconds,30638
+timer-event-start,V8.PreParseMicroSeconds,30649
+timer-event-end,V8.PreParseMicroSeconds,30665
+timer-event-start,V8.PreParseMicroSeconds,30672
+timer-event-end,V8.PreParseMicroSeconds,30682
+timer-event-start,V8.PreParseMicroSeconds,30692
+timer-event-end,V8.PreParseMicroSeconds,30706
+timer-event-start,V8.PreParseMicroSeconds,30719
+timer-event-end,V8.PreParseMicroSeconds,30730
+timer-event-start,V8.PreParseMicroSeconds,30737
+timer-event-end,V8.PreParseMicroSeconds,30749
+tick,0x82b07f6,31208,0,0x0,2
+tick,0x824d3ad,32274,0,0x0,2
+tick,0x82b07c6,33327,0,0x0,2
+tick,0x82b0804,34401,0,0x0,2
+tick,0x81fc62c,35474,0,0x0,2
+tick,0x81fc62c,36534,0,0x0,2
+tick,0x824e954,37593,0,0x0,2
+tick,0x82b07f3,38662,0,0x0,2
+tick,0x81fc625,39722,0,0x0,2
+tick,0x81fc61e,40783,0,0x0,2
+tick,0x821c1a1,41846,0,0x0,2
+tick,0x81fc62c,42913,0,0x0,2
+timer-event-start,V8.PreParseMicroSeconds,43415
+timer-event-end,V8.PreParseMicroSeconds,43428
+timer-event-start,V8.PreParseMicroSeconds,43446
+timer-event-end,V8.PreParseMicroSeconds,43481
+timer-event-end,V8.ParseMicroSeconds,43493
+timer-event-start,V8.Compile,43498
+timer-event-start,V8.CompileFullCode,43528
+timer-event-end,V8.CompileFullCode,43671
+code-creation,Script,0,0x2b8339a0,6060,bsuite/kraken-once/stanford-crypto-ccm.js,0x2f33b684,~
+timer-event-end,V8.Compile,43688
+timer-event-start,V8.Execute,43739
+timer-event-start,V8.ParseLazyMicroSeconds,43914
+timer-event-end,V8.ParseLazyMicroSeconds,43936
+timer-event-start,V8.CompileLazy,43942
+timer-event-start,V8.CompileFullCode,43947
+timer-event-end,V8.CompileFullCode,43966
+tick,0x820b498,43978,0,0x0,0,0x2b83464f
+code-creation,LazyCompile,0,0x2b835160,372,sjcl.hash.sha256 bsuite/kraken-once/stanford-crypto-ccm.js:15,0x2f339fb0,~
+timer-event-end,V8.CompileLazy,44194
+code-creation,Stub,2,0x2b8352e0,188,KeyedLoadElementStub
+code-creation,KeyedLoadIC,6,0x2b8353a0,91,
+code-creation,CallPreMonomorphic,7,0x2b835400,178,args_count: 0
+timer-event-start,V8.ParseLazyMicroSeconds,44292
+timer-event-end,V8.ParseLazyMicroSeconds,44326
+timer-event-start,V8.CompileLazy,44333
+timer-event-start,V8.CompileFullCode,44340
+code-creation,Stub,12,0x2b8354c0,88,BinaryOpStub_MOD_Alloc_Uninitialized+Uninitialized
+code-creation,Stub,12,0x2b835520,88,BinaryOpStub_MUL_Alloc_Uninitialized+Uninitialized
+timer-event-end,V8.CompileFullCode,44389
+code-creation,LazyCompile,0,0x2b835580,906,sjcl.hash.sha256.w bsuite/kraken-once/stanford-crypto-ccm.js:17,0x2f33a190,~
+timer-event-end,V8.CompileLazy,44407
+code-creation,Stub,12,0x2b835920,167,BinaryOpStub_MUL_Alloc_Smi+Smi
+code-creation,Stub,13,0x2b8359e0,122,CompareICStub
+timer-event-start,V8.ParseLazyMicroSeconds,44439
+timer-event-end,V8.ParseLazyMicroSeconds,44460
+timer-event-start,V8.CompileLazy,44465
+timer-event-start,V8.CompileFullCode,44471
+code-creation,Stub,2,0x2b835a60,501,MathPowStub
+timer-event-end,V8.CompileFullCode,44505
+code-creation,LazyCompile,0,0x2b835c60,304,pow native math.js:181,0x4422259c,~
+timer-event-end,V8.CompileLazy,44517
+timer-event-start,V8.ParseLazyMicroSeconds,44522
+timer-event-end,V8.ParseLazyMicroSeconds,44534
+timer-event-start,V8.CompileLazy,44539
+timer-event-start,V8.CompileFullCode,44545
+code-creation,Stub,12,0x2b835da0,88,BinaryOpStub_MUL_OverwriteLeft_Uninitialized+Uninitialized
+code-creation,Stub,12,0x2b835e00,88,BinaryOpStub_BIT_OR_OverwriteLeft_Uninitialized+Uninitialized
+timer-event-end,V8.CompileFullCode,44570
+code-creation,LazyCompile,0,0x2b835e60,228,a bsuite/kraken-once/stanford-crypto-ccm.js:17,0x2f33d150,~
+timer-event-end,V8.CompileLazy,44582
+timer-event-start,V8.ParseLazyMicroSeconds,44590
+timer-event-end,V8.ParseLazyMicroSeconds,44609
+timer-event-start,V8.CompileLazy,44614
+timer-event-start,V8.CompileFullCode,44619
+code-creation,Stub,12,0x2b835f60,88,BinaryOpStub_SHR_Alloc_Uninitialized+Uninitialized
+timer-event-end,V8.CompileFullCode,44646
+code-creation,LazyCompile,0,0x2b835fc0,344,floor native math.js:99,0x4422241c,~
+timer-event-end,V8.CompileLazy,44657
+code-creation,Stub,13,0x2b836120,404,CompareICStub
+code-creation,Stub,13,0x2b8362c0,232,CompareICStub
+code-creation,Stub,13,0x2b8363c0,404,CompareICStub
+code-creation,Stub,13,0x2b836560,240,CompareICStub
+code-creation,Stub,12,0x2b836660,349,BinaryOpStub_SHR_Alloc_Number+Smi
+code-creation,Stub,12,0x2b8367c0,246,BinaryOpStub_SUB_Alloc_Number+Smi
+code-creation,Stub,12,0x2b8368c0,245,BinaryOpStub_MUL_OverwriteLeft_Number+Number
+code-creation,Stub,12,0x2b8369c0,407,BinaryOpStub_BIT_OR_OverwriteLeft_Number+Smi
+code-creation,Stub,2,0x2b836b60,1808,RecordWriteStub
+code-creation,Stub,2,0x2b837280,606,KeyedStoreElementStub
+code-creation,KeyedStoreIC,10,0x2b8374e0,91,
+tick,0x31e6020f,45036,0,0x2b836b61,0,0x2b8357c1,0x2b835208,0x2b83464f
+code-creation,LoadIC,5,0x2b837540,114,Math
+code-creation,CallIC,7,0x2b8375c0,289,floor
+code-creation,Stub,2,0x2b837700,80,LoadFieldStub
+code-creation,Stub,2,0x2b837760,95,N
+code-creation,LoadIC,5,0x2b8377c0,93,N
+code-creation,CallIC,7,0x2b837820,113,pow
+code-creation,Stub,2,0x2b8378a0,80,LoadFieldStub
+code-creation,Stub,2,0x2b837900,95,a
+code-creation,LoadIC,5,0x2b837960,93,a
+code-creation,Stub,12,0x2b8379c0,190,BinaryOpStub_MOD_Alloc_Smi+Smi
+code-creation,Stub,12,0x2b837a80,181,BinaryOpStub_MOD_Alloc_Smi+Smi
+timer-event-start,V8.ParseLazyMicroSeconds,45383
+timer-event-end,V8.ParseLazyMicroSeconds,45402
+timer-event-start,V8.CompileLazy,45408
+timer-event-start,V8.CompileFullCode,45413
+timer-event-end,V8.CompileFullCode,45428
+code-creation,LazyCompile,0,0x2b837b40,264,sjcl.hash.sha256.reset bsuite/kraken-once/stanford-crypto-ccm.js:16,0x2f33a070,~
+timer-event-end,V8.CompileLazy,45442
+code-creation,StoreIC,9,0x2b837c60,138,codec
+code-creation,StoreIC,9,0x2b837d00,141,hex
+tick,0x8294f6f,46096,0,0xff820124,0,0x2b834ff0
+code-creation,StoreIC,9,0x2b837da0,171,ccm
+timer-event-start,V8.ParseLazyMicroSeconds,46605
+timer-event-end,V8.ParseLazyMicroSeconds,46625
+timer-event-start,V8.CompileLazy,46630
+timer-event-start,V8.CompileFullCode,46635
+timer-event-end,V8.CompileFullCode,46649
+code-creation,LazyCompile,0,0x2b837e60,300,sjcl.test.TestCase bsuite/kraken-once/stanford-crypto-ccm.js:99,0x2f33b210,~
+timer-event-end,V8.CompileLazy,46663
+timer-event-start,V8.ParseLazyMicroSeconds,46681
+timer-event-end,V8.ParseLazyMicroSeconds,46712
+timer-event-start,V8.CompileLazy,46718
+timer-event-start,V8.CompileFullCode,46725
+code-creation,CallInitialize,7,0x2b837fa0,178,args_count: 4
+timer-event-end,V8.CompileFullCode,46771
+code-creation,LazyCompile,0,0x2b838060,953,sjcl.test.run bsuite/kraken-once/stanford-crypto-ccm.js:180,0x2f33b4b0,~
+timer-event-end,V8.CompileLazy,46788
+code-creation,Stub,13,0x2b838420,485,CompareICStub
+code-creation,CallIC,7,0x2b838620,128,ToString
+code-creation,CallPreMonomorphic,7,0x2b8386a0,178,args_count: 4
+timer-event-start,V8.ParseLazyMicroSeconds,46859
+timer-event-end,V8.ParseLazyMicroSeconds,46876
+timer-event-start,V8.CompileLazy,46881
+timer-event-start,V8.CompileFullCode,46888
+code-creation,CallInitialize,7,0x2b838760,178,args_count: 5
+timer-event-end,V8.CompileFullCode,46910
+code-creation,LazyCompile,0,0x2b838820,320,browserUtil.cpsMap bsuite/kraken-once/stanford-crypto-ccm.js:63,0x2f33b030,~
+timer-event-end,V8.CompileLazy,46922
+code-creation,CallPreMonomorphic,7,0x2b838960,178,args_count: 5
+timer-event-start,V8.ParseLazyMicroSeconds,46937
+timer-event-end,V8.ParseLazyMicroSeconds,46959
+timer-event-start,V8.CompileLazy,46965
+timer-event-start,V8.CompileFullCode,46972
+code-creation,Stub,2,0x2b838a20,172,FastNewContextStub
+timer-event-end,V8.CompileFullCode,46995
+code-creation,LazyCompile,0,0x2b838ae0,420,browserUtil.cpsIterate bsuite/kraken-once/stanford-crypto-ccm.js:49,0x2f33afd0,~
+timer-event-end,V8.CompileLazy,47008
+timer-event-start,V8.ParseLazyMicroSeconds,47013
+timer-event-end,V8.ParseLazyMicroSeconds,47029
+timer-event-start,V8.CompileLazy,47034
+timer-event-start,V8.CompileFullCode,47041
+code-creation,Stub,2,0x2b838ca0,328,CallFunctionStub_Args0_Recording
+timer-event-end,V8.CompileFullCode,47070
+code-creation,LazyCompile,0,0x2b838e00,372,go bsuite/kraken-once/stanford-crypto-ccm.js:50,0x2f33da7c,~
+timer-event-end,V8.CompileLazy,47082
+timer-event-start,V8.ParseLazyMicroSeconds,47088
+timer-event-end,V8.ParseLazyMicroSeconds,47110
+timer-event-start,V8.CompileLazy,47115
+timer-event-start,V8.CompileFullCode,47121
+timer-event-end,V8.CompileFullCode,47134
+code-creation,LazyCompile,0,0x2b838f80,236, bsuite/kraken-once/stanford-crypto-ccm.js:64,0x2f33d9d4,~
+timer-event-end,V8.CompileLazy,47146
+tick,0xf776d430,47160,0,0x90ec418,2,0x2b838f3f,0x2b838c50,0x2b83892e,0x2b8383df,0x2b8350ac
+code-creation,KeyedLoadIC,6,0x2b839080,91,
+timer-event-start,V8.ParseLazyMicroSeconds,47296
+timer-event-end,V8.ParseLazyMicroSeconds,47317
+timer-event-start,V8.CompileLazy,47323
+timer-event-start,V8.CompileFullCode,47329
+code-creation,CallInitialize,7,0x2b8390e0,178,args_count: 3
+timer-event-end,V8.CompileFullCode,47355
+code-creation,LazyCompile,0,0x2b8391a0,260, bsuite/kraken-once/stanford-crypto-ccm.js:192,0x2f33d920,~
+timer-event-end,V8.CompileLazy,47368
+code-creation,CallPreMonomorphic,7,0x2b8392c0,178,args_count: 3
+timer-event-start,V8.ParseLazyMicroSeconds,47390
+timer-event-end,V8.ParseLazyMicroSeconds,47409
+timer-event-start,V8.CompileLazy,47415
+timer-event-start,V8.CompileFullCode,47421
+timer-event-end,V8.CompileFullCode,47438
+code-creation,LazyCompile,0,0x2b839380,344,sjcl.test.TestCase.run bsuite/kraken-once/stanford-crypto-ccm.js:168,0x2f33b450,~
+timer-event-end,V8.CompileLazy,47452
+timer-event-start,V8.ParseLazyMicroSeconds,47462
+timer-event-end,V8.ParseLazyMicroSeconds,47476
+timer-event-start,V8.CompileLazy,47481
+timer-event-start,V8.CompileFullCode,47485
+timer-event-end,V8.CompileFullCode,47496
+code-creation,LazyCompile,0,0x2b8394e0,208,valueOf native date.js:361,0x44218984,~
+timer-event-end,V8.CompileLazy,47507
+timer-event-start,V8.ParseLazyMicroSeconds,47517
+timer-event-end,V8.ParseLazyMicroSeconds,47526
+timer-event-start,V8.CompileLazy,47531
+timer-event-start,V8.CompileFullCode,47536
+timer-event-end,V8.CompileFullCode,47545
+code-creation,LazyCompile,0,0x2b8395c0,192,browserUtil.pauseAndThen bsuite/kraken-once/stanford-crypto-ccm.js:47,0x2f33af70,~
+timer-event-end,V8.CompileLazy,47557
+timer-event-start,V8.ParseLazyMicroSeconds,47561
+timer-event-end,V8.ParseLazyMicroSeconds,47571
+timer-event-start,V8.CompileLazy,47576
+timer-event-start,V8.CompileFullCode,47581
+timer-event-end,V8.CompileFullCode,47591
+code-creation,LazyCompile,0,0x2b839680,192, bsuite/kraken-once/stanford-crypto-ccm.js:171,0x2f33dc70,~
+timer-event-end,V8.CompileLazy,47602
+timer-event-start,V8.ParseLazyMicroSeconds,47608
+timer-event-end,V8.ParseLazyMicroSeconds,47674
+timer-event-start,V8.CompileLazy,47681
+timer-event-start,V8.CompileFullCode,47693
+code-creation,Stub,2,0x2b839740,196,FastNewContextStub
+code-creation,Stub,12,0x2b839820,88,BinaryOpStub_DIV_Alloc_Uninitialized+Uninitialized
+timer-event-end,V8.CompileFullCode,47755
+code-creation,LazyCompile,0,0x2b839880,716, bsuite/kraken-once/stanford-crypto-ccm.js:7235,0x2f33b5d0,~
+timer-event-end,V8.CompileLazy,47768
+code-creation,Stub,12,0x2b839b60,196,BinaryOpStub_DIV_Alloc_Smi+Smi
+timer-event-start,V8.ParseLazyMicroSeconds,47798
+timer-event-end,V8.ParseLazyMicroSeconds,47845
+timer-event-start,V8.CompileLazy,47851
+timer-event-start,V8.CompileFullCode,47863
+code-creation,Stub,12,0x2b839c40,88,BinaryOpStub_MUL_OverwriteRight_Uninitialized+Uninitialized
+timer-event-end,V8.CompileFullCode,47917
+code-creation,LazyCompile,0,0x2b839ca0,2065, bsuite/kraken-once/stanford-crypto-ccm.js:7243,0x2f33de10,
+timer-event-end,V8.CompileLazy,47930
+code-creation,Stub,12,0x2b83a4c0,167,BinaryOpStub_MUL_OverwriteRight_Smi+Smi
+timer-event-start,V8.ParseLazyMicroSeconds,47958
+timer-event-end,V8.ParseLazyMicroSeconds,47986
+timer-event-start,V8.CompileLazy,47992
+timer-event-start,V8.CompileFullCode,47998
+code-creation,Stub,12,0x2b83a580,88,BinaryOpStub_BIT_XOR_Alloc_Uninitialized+Uninitialized
+timer-event-end,V8.CompileFullCode,48031
+code-creation,LazyCompile,0,0x2b83a5e0,717,sjcl.codec.hex.toBits bsuite/kraken-once/stanford-crypto-ccm.js:13,0x2f339e90,~
+timer-event-end,V8.CompileLazy,48044
+timer-event-start,V8.ParseLazyMicroSeconds,48061
+timer-event-end,V8.ParseLazyMicroSeconds,48119
+timer-event-start,V8.CompileLazy,48126
+timer-event-start,V8.CompileFullCode,48135
+timer-event-end,V8.CompileFullCode,48188
+code-creation,LazyCompile,0,0x2b83a8c0,1601,DoConstructRegExp native regexp.js:39,0x44222a28,~
+timer-event-end,V8.CompileLazy,48203
+timer-event-start,V8.ParseLazyMicroSeconds,48213
+tick,0x80eabd3,48226,0,0xff81fb44,2,0x2b821ae3,0x2b83a6a4,0x2b839e4e,0x2b838f3f,0x2b838c50,0x2b839b39,0x2b83970e,0x2b83964b,0x2b8394a8,0x2b839273,0x2b839036,0x2b838f3f,0x2b838c50,0x2b83892e,0x2b8383df,0x2b8350ac
+timer-event-end,V8.ParseLazyMicroSeconds,48288
+timer-event-start,V8.CompileLazy,48309
+timer-event-start,V8.CompileFullCode,48323
+timer-event-end,V8.CompileFullCode,48372
+code-creation,LazyCompile,0,0x2b83af20,1284,charAt native string.js:64,0x44215fa8,~
+timer-event-end,V8.CompileLazy,48386
+code-creation,Stub,14,0x2b83b440,144,CompareNilICStub(NullValue)(MonomorphicMap)
+code-creation,Stub,5,0x2b83b4e0,97,StringLengthStub
+timer-event-start,V8.ParseLazyMicroSeconds,48435
+timer-event-end,V8.ParseLazyMicroSeconds,48536
+timer-event-start,V8.CompileLazy,48543
+timer-event-start,V8.CompileFullCode,48555
+code-creation,Stub,2,0x2b83b560,828,SubStringStub
+timer-event-end,V8.CompileFullCode,48640
+code-creation,LazyCompile,0,0x2b83b8a0,2428,replace native string.js:213,0x44216248,~
+timer-event-end,V8.CompileLazy,48654
+code-creation,StoreIC,9,0x2b83c220,135,lastIndex
+code-creation,Stub,14,0x2b83c2c0,124,CompareNilICStub(NullValue)(Null)
+code-creation,RegExp,4,0x2b83c340,758,\\s|0x
+timer-event-start,V8.ParseLazyMicroSeconds,48827
+timer-event-end,V8.ParseLazyMicroSeconds,48873
+timer-event-start,V8.CompileLazy,48879
+timer-event-start,V8.CompileFullCode,48886
+timer-event-end,V8.CompileFullCode,48916
+code-creation,LazyCompile,0,0x2b83c640,960,substr native string.js:749,0x44216608,~
+timer-event-end,V8.CompileLazy,48930
+code-creation,Stub,14,0x2b83ca00,144,CompareNilICStub(NullValue)(MonomorphicMap)
+code-creation,Stub,13,0x2b83caa0,122,CompareICStub
+timer-event-start,V8.ParseLazyMicroSeconds,48959
+timer-event-end,V8.ParseLazyMicroSeconds,49000
+timer-event-start,V8.CompileLazy,49006
+timer-event-start,V8.CompileFullCode,49012
+code-creation,Stub,12,0x2b83cb20,88,BinaryOpStub_BIT_OR_Alloc_Uninitialized+Uninitialized
+code-creation,Stub,12,0x2b83cb80,88,BinaryOpStub_SAR_Alloc_Uninitialized+Uninitialized
+timer-event-end,V8.CompileFullCode,49062
+code-creation,LazyCompile,0,0x2b83cbe0,1096,parseInt native v8natives.js:130,0x4421ec1c,~
+timer-event-end,V8.CompileLazy,49075
+code-creation,Stub,12,0x2b83d040,399,BinaryOpStub_BIT_XOR_Alloc_Number+Smi
+code-creation,CallIC,7,0x2b83d1e0,147,substr
+code-creation,CallIC,7,0x2b83d280,129,parseInt
+code-creation,Stub,2,0x2b83d320,1433,RecordWriteStub
+code-creation,Stub,2,0x2b83d8c0,611,RecordWriteStub
+code-creation,CallIC,7,0x2b83db40,656,push
+timer-event-start,V8.ParseLazyMicroSeconds,49192
+timer-event-end,V8.ParseLazyMicroSeconds,49229
+timer-event-start,V8.CompileLazy,49235
+timer-event-start,V8.CompileFullCode,49242
+code-creation,Stub,12,0x2b83dde0,88,BinaryOpStub_SAR_OverwriteRight_Uninitialized+Uninitialized
+code-creation,Stub,12,0x2b83de40,88,BinaryOpStub_BIT_AND_OverwriteRight_Uninitialized+Uninitialized
+tick,0x8250358,49284,0,0xff81fe84,2,0x2b83a871,0x2b839e4e,0x2b838f3f,0x2b838c50,0x2b839b39,0x2b83970e,0x2b83964b,0x2b8394a8,0x2b839273,0x2b839036,0x2b838f3f,0x2b838c50,0x2b83892e,0x2b8383df,0x2b8350ac
+timer-event-end,V8.CompileFullCode,49346
+code-creation,LazyCompile,0,0x2b83dea0,536,sjcl.bitArray.clamp bsuite/kraken-once/stanford-crypto-ccm.js:9,0x2f339b30,~
+timer-event-end,V8.CompileLazy,49390
+timer-event-start,V8.ParseLazyMicroSeconds,49402
+timer-event-end,V8.ParseLazyMicroSeconds,49416
+timer-event-start,V8.CompileLazy,49421
+timer-event-start,V8.CompileFullCode,49426
+timer-event-end,V8.CompileFullCode,49438
+code-creation,LazyCompile,0,0x2b83e0c0,248,ceil native math.js:81,0x442222fc,~
+timer-event-end,V8.CompileLazy,49450
+timer-event-start,V8.ParseLazyMicroSeconds,49466
+timer-event-end,V8.ParseLazyMicroSeconds,49529
+timer-event-start,V8.CompileLazy,49535
+timer-event-start,V8.CompileFullCode,49544
+code-creation,Stub,2,0x2b83e1c0,647,FastCloneShallowArrayStub
+code-creation,Stub,12,0x2b83e460,88,BinaryOpStub_SHL_Alloc_Uninitialized+Uninitialized
+code-creation,Stub,12,0x2b83e4c0,88,BinaryOpStub_BIT_AND_OverwriteLeft_Uninitialized+Uninitialized
+code-creation,Stub,12,0x2b83e520,88,BinaryOpStub_BIT_XOR_OverwriteLeft_Uninitialized+Uninitialized
+timer-event-end,V8.CompileFullCode,49801
+code-creation,LazyCompile,0,0x2b83e580,3002,sjcl.cipher.aes bsuite/kraken-once/stanford-crypto-ccm.js:4,0x2f339830,~
+timer-event-end,V8.CompileLazy,49816
+timer-event-start,V8.ParseLazyMicroSeconds,49829
+timer-event-end,V8.ParseLazyMicroSeconds,49886
+timer-event-start,V8.CompileLazy,49893
+timer-event-start,V8.CompileFullCode,49902
+code-creation,Stub,12,0x2b83f140,88,BinaryOpStub_BIT_XOR_OverwriteRight_Uninitialized+Uninitialized
+timer-event-end,V8.CompileFullCode,49958
+code-creation,LazyCompile,0,0x2b83f1a0,2528,sjcl.cipher.aes.w bsuite/kraken-once/stanford-crypto-ccm.js:6,0x2f339950,~
+timer-event-end,V8.CompileLazy,49972
+code-creation,Stub,12,0x2b83fb80,167,BinaryOpStub_SHL_Alloc_Smi+Smi
+code-creation,Stub,12,0x2b83fc40,155,BinaryOpStub_SAR_Alloc_Smi+Smi
+code-creation,Stub,12,0x2b83fce0,167,BinaryOpStub_MUL_OverwriteLeft_Smi+Smi
+code-creation,Stub,12,0x2b83fda0,146,BinaryOpStub_BIT_XOR_OverwriteLeft_Smi+Smi
+code-creation,Stub,2,0x2b83fe40,1808,RecordWriteStub
+code-creation,Stub,2,0x2b840560,554,KeyedStoreElementStub
+code-creation,KeyedStoreIC,10,0x2b8407a0,91,
+code-creation,Stub,12,0x2b840800,146,BinaryOpStub_BIT_XOR_Alloc_Smi+Smi
+code-creation,Stub,12,0x2b8408a0,146,BinaryOpStub_BIT_XOR_OverwriteRight_Smi+Smi
+tick,0x82d1790,50347,0,0xff81fdb8,0,0x2b83f388,0x2b83e64a,0x2b839e65,0x2b838f3f,0x2b838c50,0x2b839b39,0x2b83970e,0x2b83964b,0x2b8394a8,0x2b839273,0x2b839036,0x2b838f3f,0x2b838c50,0x2b83892e,0x2b8383df,0x2b8350ac
+code-creation,Stub,12,0x2b840940,383,BinaryOpStub_BIT_XOR_OverwriteLeft_Smi+Int32
+code-creation,Stub,12,0x2b840ac0,375,BinaryOpStub_SHL_Alloc_Int32+Smi
+code-creation,Stub,12,0x2b840c40,325,BinaryOpStub_SHR_Alloc_Int32+Smi
+code-creation,Stub,12,0x2b840da0,167,BinaryOpStub_SHR_Alloc_Smi+Smi
+code-creation,Stub,12,0x2b840e60,383,BinaryOpStub_BIT_XOR_OverwriteLeft_Int32+Smi
+code-creation,Stub,2,0x2b840fe0,794,ElementsTransitionAndStoreStub
+code-creation,KeyedStorePolymorphicIC,10,0x2b841300,107,
+code-creation,KeyedStorePolymorphicIC,10,0x2b841300,107,args_count: 0
+code-creation,Stub,2,0x2b841380,204,KeyedLoadElementStub
+code-creation,KeyedLoadIC,6,0x2b841460,91,
+code-creation,Stub,2,0x2b8414c0,405,ElementsTransitionAndStoreStub
+code-creation,Stub,2,0x2b841660,554,KeyedStoreElementStub
+code-creation,KeyedStorePolymorphicIC,10,0x2b8418a0,107,
+code-creation,KeyedStorePolymorphicIC,10,0x2b8418a0,107,args_count: 0
+code-creation,Stub,12,0x2b841920,233,BinaryOpStub_MUL_Alloc_Smi+Smi
+code-creation,Stub,12,0x2b841a20,407,BinaryOpStub_BIT_XOR_OverwriteLeft_Number+Smi
+code-creation,Stub,12,0x2b841bc0,407,BinaryOpStub_BIT_XOR_OverwriteLeft_Smi+Number
+code-creation,Stub,12,0x2b841d60,355,BinaryOpStub_BIT_XOR_OverwriteLeft_Int32+Int32
+code-creation,Stub,12,0x2b841ee0,379,BinaryOpStub_BIT_XOR_OverwriteLeft_Int32+Number
+code-creation,Stub,15,0x2b842060,144,ToBooleanStub(Undefined,Smi)
+code-creation,Stub,2,0x2b842100,236,KeyedStoreElementStub
+code-creation,KeyedStoreIC,10,0x2b842200,91,
+code-creation,CallIC,7,0x2b842260,136,slice
+code-creation,CallMegamorphic,7,0x2b842300,685,args_count: 1
+code-creation,Stub,12,0x2b8425c0,146,BinaryOpStub_ADD_OverwriteLeft_Smi+Smi
+code-creation,Stub,12,0x2b842660,148,BinaryOpStub_SUB_Alloc_Smi+Smi
+code-creation,Stub,2,0x2b842700,301,KeyedLoadElementStub
+code-creation,KeyedLoadIC,6,0x2b842840,91,
+tick,0x817d391,51438,0,0xff81f9a4,0,0x2b83e81e,0x2b839e65,0x2b838f3f,0x2b838c50,0x2b839b39,0x2b83970e,0x2b83964b,0x2b8394a8,0x2b839273,0x2b839036,0x2b838f3f,0x2b838c50,0x2b83892e,0x2b8383df,0x2b8350ac
+code-creation,Stub,12,0x2b8428a0,190,BinaryOpStub_MOD_Alloc_Smi+Smi
+code-creation,Stub,12,0x2b842960,146,BinaryOpStub_BIT_AND_OverwriteLeft_Smi+Smi
+code-creation,Stub,12,0x2b842a00,347,BinaryOpStub_BIT_XOR_Alloc_Int32+Int32
+code-creation,Stub,12,0x2b842b60,214,BinaryOpStub_SHL_Alloc_Smi+Smi
+code-creation,Stub,12,0x2b842c40,375,BinaryOpStub_SAR_Alloc_Int32+Smi
+code-creation,Stub,12,0x2b842dc0,375,BinaryOpStub_BIT_AND_Alloc_Int32+Smi
+code-creation,CallIC,7,0x2b842f40,147,replace
+code-creation,Stub,2,0x2b842fe0,76,LoadFieldStub
+code-creation,LoadIC,5,0x2b843040,93,lastIndex
+code-creation,Stub,2,0x2b8430a0,76,LoadFieldStub
+code-creation,LoadIC,5,0x2b843100,93,global
+code-creation,LoadIC,5,0x2b843160,103,lastMatchInfoOverride
+code-creation,LoadIC,5,0x2b8431e0,103,lastMatchInfo
+code-creation,LoadIC,5,0x2b843260,103,sjcl
+code-creation,LoadIC,5,0x2b8432e0,93,bitArray
+code-creation,CallIC,7,0x2b843340,113,clamp
+code-creation,LoadIC,5,0x2b8433c0,93,length
+code-creation,CallIC,7,0x2b843420,113,ceil
+code-creation,CallIC,7,0x2b8434a0,136,slice
+code-creation,Stub,12,0x2b843540,264,BinaryOpStub_DIV_Alloc_Smi+Smi
+code-creation,Stub,12,0x2b843660,407,BinaryOpStub_SAR_OverwriteRight_Number+Smi
+code-creation,Stub,12,0x2b843800,383,BinaryOpStub_BIT_AND_OverwriteRight_Int32+Smi
+timer-event-start,V8.ParseLazyMicroSeconds,51907
+timer-event-end,V8.ParseLazyMicroSeconds,51924
+timer-event-start,V8.CompileLazy,51930
+timer-event-start,V8.CompileFullCode,51935
+code-creation,Stub,12,0x2b843980,88,BinaryOpStub_SHL_OverwriteRight_Uninitialized+Uninitialized
+code-creation,Stub,12,0x2b8439e0,88,BinaryOpStub_ADD_OverwriteRight_Uninitialized+Uninitialized
+timer-event-end,V8.CompileFullCode,51966
+code-creation,LazyCompile,0,0x2b843a40,288,sjcl.bitArray.partial bsuite/kraken-once/stanford-crypto-ccm.js:10,0x2f339b90,~
+timer-event-end,V8.CompileLazy,51979
+code-creation,Stub,12,0x2b843b60,375,BinaryOpStub_BIT_OR_Alloc_Int32+Smi
+code-creation,Stub,12,0x2b843ce0,247,BinaryOpStub_MUL_Alloc_Smi+Number
+code-creation,Stub,12,0x2b843de0,268,BinaryOpStub_ADD_OverwriteRight_Int32+Number
+code-creation,Stub,2,0x2b843f00,240,KeyedStoreElementStub
+code-creation,KeyedStoreIC,10,0x2b844000,91,
+code-creation,CallMiss,7,0x2b844060,178,args_count: 3
+code-creation,CallIC,7,0x2b844120,113,partial
+timer-event-start,V8.ParseLazyMicroSeconds,52165
+timer-event-end,V8.ParseLazyMicroSeconds,52210
+timer-event-start,V8.CompileLazy,52217
+timer-event-start,V8.CompileFullCode,52225
+code-creation,Stub,12,0x2b8441a0,88,BinaryOpStub_SHR_OverwriteRight_Uninitialized+Uninitialized
+code-creation,CallInitialize,7,0x2b844200,178,args_count: 6
+timer-event-end,V8.CompileFullCode,52278
+code-creation,LazyCompile,0,0x2b8442c0,1057,sjcl.mode.ccm.encrypt bsuite/kraken-once/stanford-crypto-ccm.js:19,0x2f33a250,~
+timer-event-end,V8.CompileLazy,52296
+timer-event-start,V8.ParseLazyMicroSeconds,52306
+timer-event-end,V8.ParseLazyMicroSeconds,52324
+timer-event-start,V8.CompileLazy,52329
+timer-event-start,V8.CompileFullCode,52334
+timer-event-end,V8.CompileFullCode,52349
+code-creation,LazyCompile,0,0x2b844700,336,sjcl.bitArray.bitLength bsuite/kraken-once/stanford-crypto-ccm.js:9,0x2f339ad0,~
+timer-event-end,V8.CompileLazy,52362
+timer-event-start,V8.ParseLazyMicroSeconds,52375
+timer-event-end,V8.ParseLazyMicroSeconds,52388
+timer-event-start,V8.CompileLazy,52392
+timer-event-start,V8.CompileFullCode,52398
+timer-event-end,V8.CompileFullCode,52420
+code-creation,LazyCompile,0,0x2b844860,236,sjcl.bitArray.getPartial bsuite/kraken-once/stanford-crypto-ccm.js:10,0x2f339bf0,~
+timer-event-end,V8.CompileLazy,52433
+code-creation,Stub,12,0x2b844960,264,BinaryOpStub_DIV_Alloc_Int32+Number
+timer-event-start,V8.ParseLazyMicroSeconds,52455
+tick,0x8092495,52475,0,0xff81fcd0,2,0x2b844833,0x2b84437f,0x2b83a0cc,0x2b838f3f,0x2b838c50,0x2b839b39,0x2b83970e,0x2b83964b,0x2b8394a8,0x2b839273,0x2b839036,0x2b838f3f,0x2b838c50,0x2b83892e,0x2b8383df,0x2b8350ac
+timer-event-end,V8.ParseLazyMicroSeconds,52539
+timer-event-start,V8.CompileLazy,52558
+timer-event-start,V8.CompileFullCode,52577
+timer-event-end,V8.CompileFullCode,52590
+code-creation,LazyCompile,0,0x2b844a80,248,round native math.js:193,0x4422265c,~
+timer-event-end,V8.CompileLazy,52602
+code-creation,CallIC,7,0x2b844b80,113,getPartial
+code-creation,Stub,12,0x2b844c00,238,BinaryOpStub_DIV_Alloc_Number+Number
+code-creation,CallIC,7,0x2b844d00,113,round
+code-creation,Stub,12,0x2b844d80,167,BinaryOpStub_SHR_OverwriteRight_Smi+Smi
+code-creation,CallPreMonomorphic,7,0x2b844e40,178,args_count: 6
+timer-event-start,V8.ParseLazyMicroSeconds,52676
+timer-event-end,V8.ParseLazyMicroSeconds,52738
+timer-event-start,V8.CompileLazy,52745
+timer-event-start,V8.CompileFullCode,52753
+code-creation,Stub,12,0x2b844f00,88,BinaryOpStub_SHL_OverwriteLeft_Uninitialized+Uninitialized
+code-creation,Stub,12,0x2b844f60,88,BinaryOpStub_BIT_OR_OverwriteRight_Uninitialized+Uninitialized
+timer-event-end,V8.CompileFullCode,52818
+code-creation,LazyCompile,0,0x2b844fc0,1838,sjcl.mode.ccm.G bsuite/kraken-once/stanford-crypto-ccm.js:20,0x2f33a310,~
+timer-event-end,V8.CompileLazy,52833
+code-creation,Stub,13,0x2b845700,241,CompareICStub
+code-creation,Stub,12,0x2b845800,167,BinaryOpStub_SHL_OverwriteLeft_Smi+Smi
+code-creation,Stub,12,0x2b8458c0,145,BinaryOpStub_BIT_OR_OverwriteRight_Smi+Smi
+code-creation,Stub,12,0x2b845960,145,BinaryOpStub_BIT_OR_OverwriteLeft_Smi+Smi
+code-creation,Stub,12,0x2b845a00,167,BinaryOpStub_SHL_OverwriteRight_Smi+Smi
+timer-event-start,V8.ParseLazyMicroSeconds,52912
+timer-event-end,V8.ParseLazyMicroSeconds,52936
+timer-event-start,V8.CompileLazy,52941
+timer-event-start,V8.CompileFullCode,52947
+timer-event-end,V8.CompileFullCode,52966
+code-creation,LazyCompile,0,0x2b845ac0,560,sjcl.bitArray.concat bsuite/kraken-once/stanford-crypto-ccm.js:9,0x2f339a70,~
+timer-event-end,V8.CompileLazy,52980
+code-creation,Stub,12,0x2b845d00,399,BinaryOpStub_BIT_OR_Alloc_Number+Smi
+timer-event-start,V8.ParseLazyMicroSeconds,53013
+timer-event-end,V8.ParseLazyMicroSeconds,53049
+timer-event-start,V8.CompileLazy,53055
+timer-event-start,V8.CompileFullCode,53062
+timer-event-end,V8.CompileFullCode,53095
+code-creation,LazyCompile,0,0x2b845ea0,1126,sjcl.bitArray.P bsuite/kraken-once/stanford-crypto-ccm.js:10,0x2f339cb0,~
+timer-event-end,V8.CompileLazy,53110
+code-creation,Stub,13,0x2b846320,485,CompareICStub
+code-creation,Stub,12,0x2b846520,383,BinaryOpStub_BIT_OR_OverwriteRight_Int32+Smi
+code-creation,Stub,12,0x2b8466a0,383,BinaryOpStub_SHL_OverwriteRight_Int32+Smi
+code-creation,Stub,12,0x2b846820,407,BinaryOpStub_BIT_OR_OverwriteRight_Number+Smi
+timer-event-start,V8.ParseLazyMicroSeconds,53194
+timer-event-end,V8.ParseLazyMicroSeconds,53206
+timer-event-start,V8.CompileLazy,53211
+timer-event-start,V8.CompileFullCode,53216
+timer-event-end,V8.CompileFullCode,53226
+code-creation,LazyCompile,0,0x2b8469c0,184,sjcl.cipher.aes.encrypt bsuite/kraken-once/stanford-crypto-ccm.js:6,0x2f339890,~
+timer-event-end,V8.CompileLazy,53243
+timer-event-start,V8.ParseLazyMicroSeconds,53249
+timer-event-end,V8.ParseLazyMicroSeconds,53325
+timer-event-start,V8.CompileLazy,53332
+timer-event-start,V8.CompileFullCode,53343
+code-creation,Stub,12,0x2b846a80,88,BinaryOpStub_SUB_OverwriteLeft_Uninitialized+Uninitialized
+tick,0x8376055,53535,0,0x81bab7d,2,0x2b846a46,0x2b845312,0x2b844628,0x2b83a0cc,0x2b838f3f,0x2b838c50,0x2b839b39,0x2b83970e,0x2b83964b,0x2b8394a8,0x2b839273,0x2b839036,0x2b838f3f,0x2b838c50,0x2b83892e,0x2b8383df,0x2b8350ac
+code-creation,Stub,2,0x2b846ae0,683,FastCloneShallowArrayStub
+code-creation,Stub,11,0x2b846da0,132,UnaryOpStubMinus(None)
+timer-event-end,V8.CompileFullCode,53746
+code-creation,LazyCompile,0,0x2b846e40,3418,sjcl.cipher.aes.H bsuite/kraken-once/stanford-crypto-ccm.js:7,0x2f3399b0,~
+timer-event-end,V8.CompileLazy,53763
+code-creation,Stub,12,0x2b847ba0,375,BinaryOpStub_BIT_XOR_Alloc_Smi+Int32
+code-creation,Stub,12,0x2b847d20,375,BinaryOpStub_BIT_XOR_Alloc_Int32+Smi
+code-creation,Stub,12,0x2b847ea0,148,BinaryOpStub_SUB_OverwriteLeft_Smi+Smi
+code-creation,Stub,15,0x2b847f40,164,ToBooleanStub(Smi,HeapNumber)
+code-creation,CallMiss,7,0x2b848000,178,args_count: 4
+code-creation,CallIC,7,0x2b8480c0,113,P
+code-creation,LoadIC,5,0x2b848140,103,undefined
+timer-event-start,V8.ParseLazyMicroSeconds,54007
+timer-event-end,V8.ParseLazyMicroSeconds,54027
+timer-event-start,V8.CompileLazy,54032
+timer-event-start,V8.CompileFullCode,54038
+timer-event-end,V8.CompileFullCode,54052
+code-creation,LazyCompile,0,0x2b8481c0,388,sjcl.bitArray.k bsuite/kraken-once/stanford-crypto-ccm.js:11,0x2f339d10,~
+timer-event-end,V8.CompileLazy,54065
+code-creation,CallIC,7,0x2b848360,132,H
+code-creation,LoadIC,5,0x2b848400,93,a
+code-creation,Stub,2,0x2b848460,95,h
+code-creation,LoadIC,5,0x2b8484c0,93,h
+code-creation,CallIC,7,0x2b848520,132,encrypt
+code-creation,Stub,12,0x2b8485c0,371,BinaryOpStub_BIT_XOR_Alloc_Int32+Number
+timer-event-start,V8.ParseLazyMicroSeconds,54281
+timer-event-end,V8.ParseLazyMicroSeconds,54332
+timer-event-start,V8.CompileLazy,54339
+timer-event-start,V8.CompileFullCode,54347
+code-creation,Stub,2,0x2b848740,663,FastCloneShallowArrayStub
+timer-event-end,V8.CompileFullCode,54560
+code-creation,LazyCompile,0,0x2b8489e0,1221,sjcl.mode.ccm.I bsuite/kraken-once/stanford-crypto-ccm.js:21,0x2f33a370,~
+timer-event-end,V8.CompileLazy,54577
+tick,0x82f2dd2,54590,0,0xff81f67c,2,0x2b844670,0x2b83a0cc,0x2b838f3f,0x2b838c50,0x2b839b39,0x2b83970e,0x2b83964b,0x2b8394a8,0x2b839273,0x2b839036,0x2b838f3f,0x2b838c50,0x2b83892e,0x2b8383df,0x2b8350ac
+code-creation,Stub,12,0x2b848ec0,371,BinaryOpStub_BIT_XOR_Alloc_Number+Int32
+timer-event-start,V8.ParseLazyMicroSeconds,54663
+timer-event-end,V8.ParseLazyMicroSeconds,54685
+timer-event-start,V8.CompileLazy,54691
+timer-event-start,V8.CompileFullCode,54697
+code-creation,Stub,12,0x2b849040,88,BinaryOpStub_SUB_OverwriteRight_Uninitialized+Uninitialized
+timer-event-end,V8.CompileFullCode,54724
+code-creation,LazyCompile,0,0x2b8490a0,392,sjcl.bitArray.bitSlice bsuite/kraken-once/stanford-crypto-ccm.js:9,0x2f339a10,~
+timer-event-end,V8.CompileLazy,54737
+code-creation,Stub,12,0x2b849240,148,BinaryOpStub_SUB_OverwriteRight_Smi+Smi
+code-creation,Stub,13,0x2b8492e0,494,CompareICStub
+code-creation,CallMegamorphic,7,0x2b8494e0,685,args_count: 2
+code-creation,Stub,12,0x2b8497a0,246,BinaryOpStub_ADD_Alloc_Number+Smi
+code-creation,LoadPolymorphicIC,5,0x2b8498a0,105,length
+code-creation,LoadPolymorphicIC,5,0x2b849920,105,length
+timer-event-start,V8.ParseLazyMicroSeconds,54933
+timer-event-end,V8.ParseLazyMicroSeconds,54956
+timer-event-start,V8.CompileLazy,54962
+timer-event-start,V8.CompileFullCode,54968
+timer-event-end,V8.CompileFullCode,54989
+code-creation,LazyCompile,0,0x2b8499a0,585,sjcl.bitArray.equal bsuite/kraken-once/stanford-crypto-ccm.js:10,0x2f339c50,~
+timer-event-end,V8.CompileLazy,55003
+code-creation,Stub,12,0x2b849c00,395,BinaryOpStub_BIT_XOR_Alloc_Number+Number
+code-creation,Stub,12,0x2b849da0,133,BinaryOpStub_ADD_Alloc_String+Smi
+code-creation,Stub,12,0x2b849e40,133,BinaryOpStub_ADD_OverwriteLeft_String+Smi
+timer-event-start,V8.ParseLazyMicroSeconds,55131
+timer-event-end,V8.ParseLazyMicroSeconds,55149
+timer-event-start,V8.CompileLazy,55155
+timer-event-start,V8.CompileFullCode,55160
+timer-event-end,V8.CompileFullCode,55177
+code-creation,LazyCompile,0,0x2b849ee0,292,sjcl.test.TestCase.require bsuite/kraken-once/stanford-crypto-ccm.js:131,0x2f33b390,~
+timer-event-end,V8.CompileLazy,55190
+timer-event-start,V8.ParseLazyMicroSeconds,55198
+timer-event-end,V8.ParseLazyMicroSeconds,55206
+timer-event-start,V8.CompileLazy,55211
+timer-event-start,V8.CompileFullCode,55216
+timer-event-end,V8.CompileFullCode,55228
+code-creation,LazyCompile,0,0x2b84a020,208,sjcl.test.TestCase.pass bsuite/kraken-once/stanford-crypto-ccm.js:110,0x2f33b270,~
+timer-event-end,V8.CompileLazy,55240
+code-creation,StoreIC,9,0x2b84a100,103,passes
+timer-event-start,V8.ParseLazyMicroSeconds,55261
+timer-event-end,V8.ParseLazyMicroSeconds,55307
+timer-event-start,V8.CompileLazy,55313
+timer-event-start,V8.CompileFullCode,55321
+code-creation,Stub,12,0x2b84a180,88,BinaryOpStub_DIV_OverwriteLeft_Uninitialized+Uninitialized
+timer-event-end,V8.CompileFullCode,55365
+code-creation,LazyCompile,0,0x2b84a1e0,1229,sjcl.mode.ccm.decrypt bsuite/kraken-once/stanford-crypto-ccm.js:19,0x2f33a2b0,~
+timer-event-end,V8.CompileLazy,55379
+code-creation,CallIC,7,0x2b84a6c0,136,slice
+code-creation,CallIC,7,0x2b84a760,128,P
+code-creation,LoadPolymorphicIC,5,0x2b84a7e0,105,length
+code-creation,KeyedLoadPolymorphicIC,6,0x2b84a860,105,
+code-creation,CallIC,7,0x2b84a8e0,656,push
+code-creation,Stub,12,0x2b84ab80,407,BinaryOpStub_SHL_OverwriteRight_Number+Smi
+code-creation,LoadPolymorphicIC,5,0x2b84ad20,105,length
+code-creation,LoadPolymorphicIC,5,0x2b84ada0,105,length
+code-creation,CallIC,7,0x2b84ae20,136,slice
+code-creation,Stub,12,0x2b84aec0,196,BinaryOpStub_DIV_OverwriteLeft_Smi+Smi
+code-creation,Stub,2,0x2b84afa0,70,k
+code-creation,LoadIC,5,0x2b84b000,93,k
+code-creation,CallIC,7,0x2b84b060,113,bitLength
+code-creation,CallIC,7,0x2b84b0e0,128,partial
+code-creation,CallIC,7,0x2b84b160,113,concat
+code-creation,LoadPolymorphicIC,5,0x2b84b1e0,105,length
+code-creation,CallIC,7,0x2b84b260,136,concat
+code-creation,CallIC,7,0x2b84b300,113,bitSlice
+code-creation,CallIC,7,0x2b84b380,136,concat
+tick,0x8118ca4,55654,0,0x90ec418,0,0x2b848b2e,0x2b84a58b,0x2b83a281,0x2b838f3f,0x2b838c50,0x2b839b39,0x2b83970e,0x2b83964b,0x2b8394a8,0x2b839273,0x2b839036,0x2b838f3f,0x2b838c50,0x2b83892e,0x2b8383df,0x2b8350ac
+code-creation,CallIC,7,0x2b84b420,136,slice
+code-creation,StoreIC,9,0x2b84b4c0,138,tag
+code-creation,StoreIC,9,0x2b84b560,138,data
+code-creation,Stub,12,0x2b84b600,214,BinaryOpStub_SHL_OverwriteRight_Smi+Smi
+code-creation,LoadPolymorphicIC,5,0x2b84b6e0,105,length
+code-creation,LoadPolymorphicIC,5,0x2b84b760,105,length
+code-creation,CallMiss,7,0x2b84b7e0,178,args_count: 0
+code-creation,CallIC,7,0x2b84b8a0,132,pass
+code-creation,Stub,2,0x2b84b940,76,LoadFieldStub
+code-creation,LoadIC,5,0x2b84b9a0,93,passes
+code-creation,LoadIC,5,0x2b84ba00,93,key
+code-creation,LoadIC,5,0x2b84ba60,93,cipher
+code-creation,Stub,2,0x2b84bac0,70,aes
+code-creation,LoadIC,5,0x2b84bb20,93,aes
+code-creation,CallIC,7,0x2b84bb80,113,toBits
+code-creation,Stub,2,0x2b84bc00,95,h
+code-creation,LoadIC,5,0x2b84bc60,93,h
+code-creation,StoreIC,9,0x2b84bcc0,246,a
+code-creation,LoadIC,5,0x2b84bdc0,93,iv
+code-creation,Stub,2,0x2b84be20,76,LoadFieldStub
+code-creation,LoadIC,5,0x2b84be80,93,adata
+code-creation,LoadIC,5,0x2b84bee0,93,pt
+code-creation,Stub,2,0x2b84bf40,76,LoadFieldStub
+code-creation,LoadIC,5,0x2b84bfa0,93,ct
+code-creation,LoadIC,5,0x2b84c000,93,tag
+code-creation,LoadIC,5,0x2b84c060,93,mode
+code-creation,LoadIC,5,0x2b84c0c0,93,ccm
+code-creation,CallMiss,7,0x2b84c120,178,args_count: 5
+code-creation,CallIC,7,0x2b84c1e0,113,encrypt
+code-creation,CallMiss,7,0x2b84c260,178,args_count: 6
+code-creation,CallIC,7,0x2b84c320,113,G
+code-creation,CallIC,7,0x2b84c3a0,193,pop
+code-creation,CallIC,7,0x2b84c480,113,I
+code-creation,LoadIC,5,0x2b84c500,93,data
+code-creation,LoadIC,5,0x2b84c560,93,tag
+code-creation,CallIC,7,0x2b84c5c0,113,equal
+code-creation,CallIC,7,0x2b84c640,132,require
+code-creation,CallIC,7,0x2b84c6e0,113,decrypt
+code-creation,CallIC,7,0x2b84c760,128,bitSlice
+code-creation,CallMegamorphic,7,0x2b84c7e0,685,args_count: 0
+tick,0xf776d430,56728,0,0x90ec418,0,0x2b84a349,0x2b83a281,0x2b838f3f,0x2b838c50,0x2b839b39,0x2b83970e,0x2b83964b,0x2b8394a8,0x2b839273,0x2b839036,0x2b838f3f,0x2b838c50,0x2b83892e,0x2b8383df,0x2b8350ac
+code-creation,Stub,15,0x2b84caa0,172,ToBooleanStub(Undefined,Smi,HeapNumber)
+code-creation,CallIC,7,0x2b84cb60,193,pop
+code-creation,Stub,2,0x2b84cc40,725,ElementsTransitionAndStoreStub
+code-creation,Stub,2,0x2b84cf20,1800,RecordWriteStub
+code-creation,Stub,2,0x2b84d640,578,KeyedStoreElementStub
+code-creation,KeyedStorePolymorphicIC,10,0x2b84d8a0,107,
+code-creation,KeyedStorePolymorphicIC,10,0x2b84d8a0,107,args_count: 0
+timer-event-start,V8.RecompileSynchronous,57494
+timer-event-start,V8.ParseLazyMicroSeconds,57505
+timer-event-end,V8.ParseLazyMicroSeconds,57586
+code-creation,LazyCompile,0,0x2b84d920,3418,sjcl.cipher.aes.H bsuite/kraken-once/stanford-crypto-ccm.js:7,0x2f3399b0,~
+tick,0x8092457,57778,0,0x19e,2,0x2b846a46,0x2b8455f6,0x2b84a5e0,0x2b83a281,0x2b838f3f,0x2b838c50,0x2b839b39,0x2b83970e,0x2b83964b,0x2b8394a8,0x2b839273,0x2b839036,0x2b838f3f,0x2b838c50,0x2b83892e,0x2b8383df,0x2b8350ac
+timer-event-end,V8.RecompileSynchronous,57904
+timer-event-start,V8.RecompileConcurrent,57929
+code-creation,Stub,2,0x2b84e680,559,ElementsTransitionAndStoreStub
+code-creation,KeyedStorePolymorphicIC,10,0x2b84e8c0,107,
+code-creation,KeyedStorePolymorphicIC,10,0x2b84e8c0,107,args_count: 0
+code-creation,LoadPolymorphicIC,5,0x2b84e940,105,length
+code-creation,LoadPolymorphicIC,5,0x2b84e9c0,105,length
+code-creation,LoadPolymorphicIC,5,0x2b84ea40,105,length
+code-creation,LoadPolymorphicIC,5,0x2b84eac0,105,length
+code-creation,LoadPolymorphicIC,5,0x2b84eb40,105,length
+timer-event-start,V8.RecompileSynchronous,58447
+timer-event-start,V8.ParseLazyMicroSeconds,58457
+timer-event-end,V8.ParseLazyMicroSeconds,58501
+code-creation,LazyCompile,0,0x2b84ebc0,1096,parseInt native v8natives.js:130,0x4421ec1c,~
+timer-event-end,V8.RecompileSynchronous,58637
+timer-event-start,V8.GCScavenger,58779
+timer-event-start,V8.External,58787
+timer-event-end,V8.External,58791
+tick,0x810f40c,58868,0,0x0,1
+timer-event-start,V8.External,59191
+timer-event-end,V8.External,59200
+timer-event-end,V8.GCScavenger,59205
+timer-event-end,V8.RecompileConcurrent,59219
+timer-event-start,V8.RecompileConcurrent,59254
+timer-event-start,V8.RecompileSynchronous,59271
+code-creation,LazyCompile,1,0x2b84f020,4592,sjcl.cipher.aes.H bsuite/kraken-once/stanford-crypto-ccm.js:7,0x2f3399b0,*
+timer-event-end,V8.RecompileSynchronous,59549
+timer-event-end,V8.RecompileConcurrent,59567
+timer-event-start,V8.RecompileSynchronous,59590
+code-creation,LazyCompile,1,0x2b850220,1662,parseInt native v8natives.js:130,0x4421ec1c,*
+timer-event-end,V8.RecompileSynchronous,59672
+timer-event-start,V8.RecompileSynchronous,59682
+timer-event-start,V8.ParseLazyMicroSeconds,59687
+timer-event-end,V8.ParseLazyMicroSeconds,59701
+code-creation,LazyCompile,0,0x2b8508a0,236,sjcl.bitArray.getPartial bsuite/kraken-once/stanford-crypto-ccm.js:10,0x2f339bf0,~
+timer-event-end,V8.RecompileSynchronous,59750
+timer-event-start,V8.RecompileConcurrent,59776
+timer-event-start,V8.RecompileSynchronous,59811
+timer-event-start,V8.ParseLazyMicroSeconds,59820
+timer-event-end,V8.ParseLazyMicroSeconds,59838
+code-creation,LazyCompile,0,0x2b8509a0,388,sjcl.bitArray.k bsuite/kraken-once/stanford-crypto-ccm.js:11,0x2f339d10,~
+timer-event-end,V8.RecompileConcurrent,59909
+timer-event-start,V8.RecompileConcurrent,59926
+timer-event-end,V8.RecompileSynchronous,59933
+timer-event-start,V8.RecompileSynchronous,59950
+tick,0xf776d430,59966,0,0x90ec418,2,0x2b8455e6,0x2b84a5e0,0x2b83a281,0x2b838f3f,0x2b838c50,0x2b839b39,0x2b83970e,0x2b83964b,0x2b8394a8,0x2b839273,0x2b839036,0x2b838f3f,0x2b838c50,0x2b83892e,0x2b8383df,0x2b8350ac
+code-creation,LazyCompile,1,0x2b850b40,536,sjcl.bitArray.getPartial bsuite/kraken-once/stanford-crypto-ccm.js:10,0x2f339bf0,*
+timer-event-end,V8.RecompileSynchronous,60077
+timer-event-start,V8.RecompileSynchronous,60141
+timer-event-start,V8.ParseLazyMicroSeconds,60149
+timer-event-end,V8.RecompileConcurrent,60177
+timer-event-end,V8.ParseLazyMicroSeconds,60195
+code-creation,LazyCompile,0,0x2b850d60,960,substr native string.js:749,0x44216608,~
+timer-event-end,V8.RecompileSynchronous,60329
+timer-event-start,V8.RecompileConcurrent,60356
+code-deopt,60375,544
+timer-event-start,V8.RecompileSynchronous,60409
+code-creation,LazyCompile,1,0x2b851120,1534,sjcl.bitArray.k bsuite/kraken-once/stanford-crypto-ccm.js:11,0x2f339d10,*
+timer-event-end,V8.RecompileSynchronous,60474
+code-creation,LoadPolymorphicIC,5,0x2b851720,105,length
+code-creation,LoadPolymorphicIC,5,0x2b8517a0,105,length
+code-creation,LoadPolymorphicIC,5,0x2b851820,105,length
+timer-event-end,V8.RecompileConcurrent,60691
+timer-event-start,V8.RecompileSynchronous,60716
+code-creation,LazyCompile,1,0x2b8518a0,1792,substr native string.js:749,0x44216608,*
+timer-event-end,V8.RecompileSynchronous,60803
+tick,0x2b849c4b,60997,0,0x2b849afa,0,0x2b83a0df,0x2b838f3f,0x2b838c50,0x2b839b39,0x2b83970e,0x2b83964b,0x2b8394a8,0x2b839273,0x2b839036,0x2b838f3f,0x2b838c50,0x2b83892e,0x2b8383df,0x2b8350ac
+timer-event-start,V8.RecompileSynchronous,61042
+timer-event-start,V8.ParseLazyMicroSeconds,61054
+timer-event-end,V8.ParseLazyMicroSeconds,61066
+code-creation,LazyCompile,0,0x2b851fa0,184,sjcl.cipher.aes.encrypt bsuite/kraken-once/stanford-crypto-ccm.js:6,0x2f339890,~
+timer-event-end,V8.RecompileSynchronous,61112
+timer-event-start,V8.RecompileConcurrent,61139
+timer-event-start,V8.RecompileSynchronous,61159
+timer-event-start,V8.ParseLazyMicroSeconds,61168
+timer-event-end,V8.ParseLazyMicroSeconds,61186
+timer-event-end,V8.RecompileConcurrent,61201
+code-creation,LazyCompile,0,0x2b852060,336,sjcl.bitArray.bitLength bsuite/kraken-once/stanford-crypto-ccm.js:9,0x2f339ad0,~
+timer-event-start,V8.ParseLazyMicroSeconds,61249
+timer-event-end,V8.ParseLazyMicroSeconds,61264
+timer-event-end,V8.RecompileSynchronous,61290
+timer-event-start,V8.RecompileSynchronous,61309
+timer-event-start,V8.RecompileConcurrent,61317
+code-creation,LazyCompile,1,0x2b8521c0,196,sjcl.cipher.aes.encrypt bsuite/kraken-once/stanford-crypto-ccm.js:6,0x2f339890,*
+timer-event-end,V8.RecompileSynchronous,61348
+timer-event-start,V8.RecompileSynchronous,61374
+timer-event-start,V8.ParseLazyMicroSeconds,61381
+timer-event-end,V8.ParseLazyMicroSeconds,61394
+timer-event-end,V8.RecompileSynchronous,61418
+timer-event-start,V8.RecompileSynchronous,61424
+timer-event-start,V8.ParseLazyMicroSeconds,61429
+timer-event-end,V8.ParseLazyMicroSeconds,61442
+code-creation,LazyCompile,0,0x2b8522a0,248,round native math.js:193,0x4422265c,~
+timer-event-end,V8.RecompileConcurrent,61471
+timer-event-start,V8.RecompileConcurrent,61480
+timer-event-end,V8.RecompileSynchronous,61487
+timer-event-start,V8.RecompileSynchronous,61512
+timer-event-end,V8.RecompileConcurrent,61536
+timer-event-start,V8.RecompileConcurrent,61543
+code-creation,LazyCompile,1,0x2b8523a0,888,sjcl.bitArray.bitLength bsuite/kraken-once/stanford-crypto-ccm.js:9,0x2f339ad0,*
+timer-event-end,V8.RecompileSynchronous,61565
+timer-event-start,V8.RecompileSynchronous,61570
+code-creation,LazyCompile,1,0x2b852720,536,sjcl.bitArray.getPartial bsuite/kraken-once/stanford-crypto-ccm.js:10,0x2f339bf0,*
+timer-event-end,V8.RecompileSynchronous,61599
+timer-event-start,V8.RecompileSynchronous,61606
+timer-event-end,V8.RecompileConcurrent,61610
+code-creation,LazyCompile,1,0x2b852940,242,round native math.js:193,0x4422265c,*
+timer-event-end,V8.RecompileSynchronous,61629
+code-creation,LoadPolymorphicIC,5,0x2b852a40,105,length
+timer-event-start,V8.RecompileSynchronous,61726
+timer-event-start,V8.ParseLazyMicroSeconds,61731
+timer-event-end,V8.ParseLazyMicroSeconds,61757
+code-creation,LazyCompile,0,0x2b852ac0,536,sjcl.bitArray.clamp bsuite/kraken-once/stanford-crypto-ccm.js:9,0x2f339b30,~
+timer-event-start,V8.ParseLazyMicroSeconds,61847
+timer-event-end,V8.ParseLazyMicroSeconds,61865
+code-creation,Function,0,0x2b852ce0,288,sjcl.bitArray.partial bsuite/kraken-once/stanford-crypto-ccm.js:10,0x2f339b90,~
+timer-event-end,V8.RecompileSynchronous,61926
+timer-event-start,V8.RecompileSynchronous,61933
+timer-event-start,V8.ParseLazyMicroSeconds,61939
+timer-event-end,V8.ParseLazyMicroSeconds,61953
+timer-event-start,V8.RecompileConcurrent,61961
+code-creation,LazyCompile,0,0x2b852e00,248,ceil native math.js:81,0x442222fc,~
+timer-event-end,V8.RecompileSynchronous,62019
+tick,0x811e913,62060,0,0xf773bff4,2,0x2b83dfae,0x2b8445e0,0x2b83a0cc,0x2b838f3f,0x2b838c50,0x2b839b39,0x2b83970e,0x2b83964b,0x2b8394a8,0x2b839273,0x2b839036,0x2b838f3f,0x2b838c50,0x2b83892e,0x2b8383df,0x2b8350ac
+code-deopt,62122,544
+timer-event-end,V8.RecompileConcurrent,62287
+timer-event-start,V8.RecompileConcurrent,62297
+timer-event-start,V8.RecompileSynchronous,62309
+timer-event-end,V8.RecompileConcurrent,62353
+code-creation,Stub,2,0x2b852f00,1785,RecordWriteStub
+code-creation,LazyCompile,1,0x2b853600,1514,sjcl.bitArray.clamp bsuite/kraken-once/stanford-crypto-ccm.js:9,0x2f339b30,*
+timer-event-end,V8.RecompileSynchronous,62415
+timer-event-start,V8.RecompileSynchronous,62421
+code-creation,LazyCompile,1,0x2b853c00,242,ceil native math.js:81,0x442222fc,*
+timer-event-end,V8.RecompileSynchronous,62445
+code-creation,LoadPolymorphicIC,5,0x2b853d00,105,length
+code-creation,LoadPolymorphicIC,5,0x2b853d80,105,length
+timer-event-start,V8.RecompileSynchronous,63048
+timer-event-start,V8.ParseLazyMicroSeconds,63067
+timer-event-end,V8.ParseLazyMicroSeconds,63085
+timer-event-end,V8.RecompileSynchronous,63117
+tick,0xf776d430,63132,0,0x90ec418,0,0x2b8462cc,0x2b845cd7,0x2b848b0a,0x2b84a58b,0x2b83a281,0x2b838f3f,0x2b838c50,0x2b839b39,0x2b83970e,0x2b83964b,0x2b8394a8,0x2b839273,0x2b839036,0x2b838f3f,0x2b838c50,0x2b83892e,0x2b8383df,0x2b8350ac
+timer-event-start,V8.RecompileConcurrent,63203
+timer-event-end,V8.RecompileConcurrent,63315
+timer-event-start,V8.RecompileSynchronous,63329
+code-creation,LazyCompile,1,0x2b853e00,644,sjcl.bitArray.partial bsuite/kraken-once/stanford-crypto-ccm.js:10,0x2f339b90,*
+timer-event-end,V8.RecompileSynchronous,63379
+timer-event-start,V8.RecompileSynchronous,63494
+timer-event-start,V8.ParseLazyMicroSeconds,63503
+timer-event-end,V8.ParseLazyMicroSeconds,63517
+timer-event-end,V8.RecompileSynchronous,63544
+timer-event-start,V8.RecompileConcurrent,63572
+timer-event-start,V8.RecompileSynchronous,63641
+timer-event-start,V8.ParseLazyMicroSeconds,63651
+timer-event-end,V8.RecompileConcurrent,63664
+timer-event-end,V8.ParseLazyMicroSeconds,63678
+code-creation,LazyCompile,0,0x2b8540a0,560,sjcl.bitArray.concat bsuite/kraken-once/stanford-crypto-ccm.js:9,0x2f339a70,~
+timer-event-start,V8.ParseLazyMicroSeconds,63757
+timer-event-end,V8.ParseLazyMicroSeconds,63772
+timer-event-start,V8.ParseLazyMicroSeconds,63808
+timer-event-end,V8.ParseLazyMicroSeconds,63848
+code-creation,Function,0,0x2b8542e0,1126,sjcl.bitArray.P bsuite/kraken-once/stanford-crypto-ccm.js:10,0x2f339cb0,~
+timer-event-start,V8.ParseLazyMicroSeconds,63977
+timer-event-end,V8.ParseLazyMicroSeconds,63994
+timer-event-start,V8.ParseLazyMicroSeconds,64023
+timer-event-end,V8.ParseLazyMicroSeconds,64039
+timer-event-end,V8.RecompileSynchronous,64072
+timer-event-start,V8.RecompileSynchronous,64079
+timer-event-start,V8.RecompileConcurrent,64099
+code-creation,LazyCompile,1,0x2b854760,536,sjcl.bitArray.getPartial bsuite/kraken-once/stanford-crypto-ccm.js:10,0x2f339bf0,*
+timer-event-end,V8.RecompileSynchronous,64194
+tick,0xf776d430,64209,0,0x4059,2,0x2b845c29,0x2b848b0a,0x2b844670,0x2b83a0cc,0x2b838f3f,0x2b838c50,0x2b839b39,0x2b83970e,0x2b83964b,0x2b8394a8,0x2b839273,0x2b839036,0x2b838f3f,0x2b838c50,0x2b83892e,0x2b8383df,0x2b8350ac
+code-deopt,64271,544
+timer-event-start,V8.RecompileSynchronous,64467
+timer-event-start,V8.ParseLazyMicroSeconds,64476
+timer-event-end,V8.ParseLazyMicroSeconds,64542
+code-creation,LazyCompile,0,0x2b854980,3002,sjcl.cipher.aes bsuite/kraken-once/stanford-crypto-ccm.js:4,0x2f339830,~
+timer-event-end,V8.RecompileSynchronous,64818
+timer-event-end,V8.RecompileConcurrent,64871
+timer-event-start,V8.RecompileConcurrent,64883
+timer-event-start,V8.RecompileSynchronous,64890
+code-creation,LazyCompile,1,0x2b855540,3364,sjcl.bitArray.concat bsuite/kraken-once/stanford-crypto-ccm.js:9,0x2f339a70,*
+timer-event-end,V8.RecompileSynchronous,65047
+code-deopt,65079,4608
+code-creation,LoadPolymorphicIC,5,0x2b856280,105,length
+tick,0x2b8472a7,65264,0,0x52f0b0e1,0,0x2b852252,0x2b848c4b,0x2b844670,0x2b83a0cc,0x2b838f3f,0x2b838c50,0x2b839b39,0x2b83970e,0x2b83964b,0x2b8394a8,0x2b839273,0x2b839036,0x2b838f3f,0x2b838c50,0x2b83892e,0x2b8383df,0x2b8350ac
+code-creation,LoadPolymorphicIC,5,0x2b856300,105,length
+code-creation,LoadPolymorphicIC,5,0x2b856380,105,length
+timer-event-start,V8.GCScavenger,65757
+timer-event-start,V8.External,65766
+timer-event-end,V8.External,65770
+timer-event-start,V8.External,66154
+timer-event-end,V8.External,66162
+timer-event-end,V8.GCScavenger,66166
+timer-event-end,V8.RecompileConcurrent,66181
+timer-event-start,V8.RecompileSynchronous,66254
+tick,0x81c09b0,66332,0,0x91632e8,2,0x2b839e65,0x2b838f3f,0x2b838c50,0x2b839b39,0x2b83970e,0x2b83964b,0x2b8394a8,0x2b839273,0x2b839036,0x2b838f3f,0x2b838c50,0x2b83892e,0x2b8383df,0x2b8350ac
+code-creation,Stub,2,0x2b856400,1785,RecordWriteStub
+code-creation,Stub,2,0x2b856b00,1785,RecordWriteStub
+code-creation,Stub,2,0x2b857200,783,RecordWriteStub
+code-creation,Stub,2,0x2b857520,1772,RecordWriteStub
+code-creation,Stub,2,0x2b857c20,1785,RecordWriteStub
+code-creation,LazyCompile,1,0x2b858320,4397,sjcl.cipher.aes bsuite/kraken-once/stanford-crypto-ccm.js:4,0x2f339830,*
+timer-event-end,V8.RecompileSynchronous,66661
+timer-event-start,V8.RecompileSynchronous,66788
+timer-event-start,V8.ParseLazyMicroSeconds,66797
+timer-event-end,V8.ParseLazyMicroSeconds,66878
+timer-event-end,V8.RecompileSynchronous,67067
+timer-event-start,V8.RecompileConcurrent,67094
+tick,0x2b8473da,67403,0,0x2f392d35,0,0x2b852252,0x2b8455f6,0x2b84a5e0,0x2b83a281,0x2b838f3f,0x2b838c50,0x2b839b39,0x2b83970e,0x2b83964b,0x2b8394a8,0x2b839273,0x2b839036,0x2b838f3f,0x2b838c50,0x2b83892e,0x2b8383df,0x2b8350ac
+timer-event-end,V8.RecompileConcurrent,68064
+timer-event-start,V8.RecompileSynchronous,68081
+code-creation,LazyCompile,1,0x2b859460,4752,sjcl.cipher.aes.H bsuite/kraken-once/stanford-crypto-ccm.js:7,0x2f3399b0,*
+timer-event-end,V8.RecompileSynchronous,68294
+code-creation,LoadPolymorphicIC,5,0x2b85a700,105,length
+tick,0x2b85055a,68462,0,0x527b30d9,0,0x2b83a782,0x2b839f55,0x2b838f3f,0x2b838c50,0x2b839b39,0x2b83970e,0x2b83964b,0x2b8394a8,0x2b839273,0x2b839036,0x2b838f3f,0x2b838c50,0x2b83892e,0x2b8383df,0x2b8350ac
+timer-event-start,V8.GCScavenger,69250
+timer-event-start,V8.External,69260
+timer-event-end,V8.External,69264
+timer-event-start,V8.External,69314
+timer-event-end,V8.External,69320
+timer-event-end,V8.GCScavenger,69324
+tick,0x82ec00c,69525,0,0xff81fcf4,0,0x2b85056f,0x2b83a782,0x2b839fd2,0x2b838f3f,0x2b838c50,0x2b839b39,0x2b83970e,0x2b83964b,0x2b8394a8,0x2b839273,0x2b839036,0x2b838f3f,0x2b838c50,0x2b83892e,0x2b8383df,0x2b8350ac
+code-creation,LoadPolymorphicIC,5,0x2b85a780,105,length
+code-creation,LoadPolymorphicIC,5,0x2b85a800,117,length
+code-creation,LoadPolymorphicIC,5,0x2b85a880,117,length
+code-creation,LoadPolymorphicIC,5,0x2b85a900,117,length
+code-creation,LoadPolymorphicIC,5,0x2b85a980,117,length
+code-creation,LoadPolymorphicIC,5,0x2b85aa00,117,length
+tick,0x81168ba,70588,0,0x90d5060,0,0x2b85056f,0x2b83a782,0x2b839f04,0x2b838f3f,0x2b838c50,0x2b839b39,0x2b83970e,0x2b83964b,0x2b8394a8,0x2b839273,0x2b839036,0x2b838f3f,0x2b838c50,0x2b83892e,0x2b8383df,0x2b8350ac
+timer-event-start,V8.RecompileSynchronous,71064
+timer-event-start,V8.ParseLazyMicroSeconds,71076
+timer-event-end,V8.ParseLazyMicroSeconds,71094
+code-creation,LazyCompile,0,0x2b85aa80,292,sjcl.test.TestCase.require bsuite/kraken-once/stanford-crypto-ccm.js:131,0x2f33b390,~
+timer-event-start,V8.ParseLazyMicroSeconds,71142
+timer-event-end,V8.ParseLazyMicroSeconds,71152
+code-creation,Function,0,0x2b85abc0,208,sjcl.test.TestCase.pass bsuite/kraken-once/stanford-crypto-ccm.js:110,0x2f33b270,~
+timer-event-end,V8.RecompileSynchronous,71195
+timer-event-start,V8.RecompileSynchronous,71204
+timer-event-start,V8.ParseLazyMicroSeconds,71210
+timer-event-start,V8.RecompileConcurrent,71216
+timer-event-end,V8.ParseLazyMicroSeconds,71228
+timer-event-end,V8.RecompileSynchronous,71254
+timer-event-end,V8.RecompileConcurrent,71304
+timer-event-start,V8.RecompileConcurrent,71312
+timer-event-start,V8.RecompileSynchronous,71316
+code-creation,LazyCompile,1,0x2b85aca0,322,sjcl.test.TestCase.require bsuite/kraken-once/stanford-crypto-ccm.js:131,0x2f33b390,*
+timer-event-end,V8.RecompileSynchronous,71361
+timer-event-start,V8.RecompileSynchronous,71367
+timer-event-end,V8.RecompileConcurrent,71373
+code-creation,LazyCompile,1,0x2b85ae00,198,sjcl.test.TestCase.pass bsuite/kraken-once/stanford-crypto-ccm.js:110,0x2f33b270,*
+timer-event-end,V8.RecompileSynchronous,71390
+tick,0x2b83c3b1,71653,0,0xffffff6b,0,0x2b83bd35,0x2b83a725,0x2b839f55,0x2b838f3f,0x2b838c50,0x2b839b39,0x2b83970e,0x2b83964b,0x2b8394a8,0x2b839273,0x2b839036,0x2b838f3f,0x2b838c50,0x2b83892e,0x2b8383df,0x2b8350ac
+timer-event-start,V8.GCScavenger,72513
+timer-event-start,V8.External,72524
+timer-event-end,V8.External,72530
+timer-event-start,V8.External,72583
+timer-event-end,V8.External,72591
+timer-event-end,V8.GCScavenger,72596
+tick,0x8116878,72711,0,0x90d5060,0,0x2b85056f,0x2b83a782,0x2b839f04,0x2b838f3f,0x2b838c50,0x2b839b39,0x2b83970e,0x2b83964b,0x2b8394a8,0x2b839273,0x2b839036,0x2b838f3f,0x2b838c50,0x2b83892e,0x2b8383df,0x2b8350ac
+code-creation,CallIC,7,0x2b85aee0,136,concat
+timer-event-start,V8.RecompileSynchronous,72947
+timer-event-start,V8.ParseLazyMicroSeconds,72956
+timer-event-end,V8.ParseLazyMicroSeconds,72977
+code-creation,LazyCompile,0,0x2b85af80,392,sjcl.bitArray.bitSlice bsuite/kraken-once/stanford-crypto-ccm.js:9,0x2f339a10,~
+timer-event-start,V8.ParseLazyMicroSeconds,73044
+timer-event-end,V8.ParseLazyMicroSeconds,73083
+timer-event-start,V8.ParseLazyMicroSeconds,73169
+timer-event-end,V8.ParseLazyMicroSeconds,73185
+timer-event-start,V8.ParseLazyMicroSeconds,73217
+timer-event-end,V8.ParseLazyMicroSeconds,73232
+timer-event-start,V8.ParseLazyMicroSeconds,73263
+timer-event-end,V8.ParseLazyMicroSeconds,73289
+timer-event-start,V8.ParseLazyMicroSeconds,73339
+timer-event-end,V8.ParseLazyMicroSeconds,73356
+timer-event-end,V8.RecompileSynchronous,73393
+timer-event-start,V8.RecompileConcurrent,73422
+tick,0x82eea09,73786,0,0x90de9b0,0,0x2b85056f,0x2b83a782,0x2b839e4e,0x2b838f3f,0x2b838c50,0x2b839b39,0x2b83970e,0x2b83964b,0x2b8394a8,0x2b839273,0x2b839036,0x2b838f3f,0x2b838c50,0x2b83892e,0x2b8383df,0x2b8350ac
+timer-event-start,V8.ParseLazyMicroSeconds,74228
+timer-event-end,V8.RecompileConcurrent,74243
+timer-event-end,V8.ParseLazyMicroSeconds,74259
+timer-event-start,V8.CompileLazy,74267
+timer-event-start,V8.CompileFullCode,74273
+timer-event-end,V8.CompileFullCode,74291
+code-creation,LazyCompile,0,0x2b85b120,332, bsuite/kraken-once/stanford-crypto-ccm.js:55,0x2f33db50,~
+timer-event-end,V8.CompileLazy,74304
+timer-event-start,V8.RecompileSynchronous,74351
+code-creation,LazyCompile,1,0x2b85b280,4132,sjcl.bitArray.bitSlice bsuite/kraken-once/stanford-crypto-ccm.js:9,0x2f339a10,*
+timer-event-end,V8.RecompileSynchronous,74533
+tick,0x2b85a2b8,74843,0,0xf5,0,0x2b852252,0x2b8454f6,0x2b844628,0x2b83a0cc,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b838c50,0x2b839b39,0x2b83970e,0x2b83964b,0x2b8394a8,0x2b839273,0x2b839036,0x2b838f3f,0x2b838c50,0x2b83892e,0x2b8383df,0x2b8350ac
+tick,0x2b84a934,75905,0,0x2b855c42,0,0x2b8446a3,0x2b83a0cc,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b838c50,0x2b839b39,0x2b83970e,0x2b83964b,0x2b8394a8,0x2b839273,0x2b839036,0x2b838f3f,0x2b838c50,0x2b83892e,0x2b8383df,0x2b8350ac
+timer-event-start,V8.GCScavenger,76182
+timer-event-start,V8.External,76193
+timer-event-end,V8.External,76197
+timer-event-start,V8.External,76251
+timer-event-end,V8.External,76258
+timer-event-end,V8.GCScavenger,76262
+tick,0x81168ba,76974,0,0x90d5060,0,0x2b85056f,0x2b83a782,0x2b839fd2,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b838c50,0x2b839b39,0x2b83970e,0x2b83964b,0x2b8394a8,0x2b839273,0x2b839036,0x2b838f3f,0x2b838c50,0x2b83892e,0x2b8383df,0x2b8350ac
+tick,0x81168ba,78047,0,0x90d5060,0,0x2b85056f,0x2b83a782,0x2b839f55,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b838c50,0x2b839b39,0x2b83970e,0x2b83964b,0x2b8394a8,0x2b839273,0x2b839036,0x2b838f3f,0x2b838c50,0x2b83892e,0x2b8383df,0x2b8350ac
+timer-event-start,V8.RecompileSynchronous,78403
+timer-event-start,V8.ParseLazyMicroSeconds,78415
+timer-event-end,V8.ParseLazyMicroSeconds,78444
+code-creation,LazyCompile,0,0x2b85c2c0,717,sjcl.codec.hex.toBits bsuite/kraken-once/stanford-crypto-ccm.js:13,0x2f339e90,~
+timer-event-start,V8.ParseLazyMicroSeconds,78530
+timer-event-end,V8.ParseLazyMicroSeconds,78559
+timer-event-start,V8.ParseLazyMicroSeconds,78614
+timer-event-end,V8.ParseLazyMicroSeconds,78632
+timer-event-end,V8.RecompileSynchronous,78666
+timer-event-start,V8.RecompileConcurrent,78695
+timer-event-end,V8.RecompileConcurrent,79073
+timer-event-start,V8.RecompileSynchronous,79089
+tick,0x2b859d1c,79108,0,0x6,0,0x2b852252,0x2b8455f6,0x2b844628,0x2b83a0cc,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b838c50,0x2b839b39,0x2b83970e,0x2b83964b,0x2b8394a8,0x2b839273,0x2b839036,0x2b838f3f,0x2b838c50,0x2b83892e,0x2b8383df,0x2b8350ac
+code-creation,Stub,2,0x2b85c5a0,1421,StringAddStub
+code-creation,LazyCompile,1,0x2b85cb40,2261,sjcl.codec.hex.toBits bsuite/kraken-once/stanford-crypto-ccm.js:13,0x2f339e90,*
+timer-event-end,V8.RecompileSynchronous,79251
+timer-event-start,V8.GCScavenger,79473
+timer-event-start,V8.External,79482
+timer-event-end,V8.External,79486
+timer-event-start,V8.External,79534
+timer-event-end,V8.External,79540
+timer-event-end,V8.GCScavenger,79544
+tick,0x2b85b446,80176,0,0x256b20d1,0,0x2b848b8c,0x2b844670,0x2b83a0cc,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b838c50,0x2b839b39,0x2b83970e,0x2b83964b,0x2b8394a8,0x2b839273,0x2b839036,0x2b838f3f,0x2b838c50,0x2b83892e,0x2b8383df,0x2b8350ac
+tick,0x80c4222,81235,0,0x90d5060,0,0x2b85b578,0x2b84a349,0x2b83a281,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b838c50,0x2b839b39,0x2b83970e,0x2b83964b,0x2b8394a8,0x2b839273,0x2b839036,0x2b838f3f,0x2b838c50,0x2b83892e,0x2b8383df,0x2b8350ac
+timer-event-start,V8.GCScavenger,82255
+timer-event-start,V8.External,82266
+timer-event-end,V8.External,82270
+tick,0x2b858631,82290,0,0x2b80a276,0,0x2b839e65,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b838c50,0x2b839b39,0x2b83970e,0x2b83964b,0x2b8394a8,0x2b839273,0x2b839036,0x2b838f3f,0x2b838c50,0x2b83892e,0x2b8383df,0x2b8350ac
+timer-event-start,V8.External,82339
+timer-event-end,V8.External,82349
+timer-event-end,V8.GCScavenger,82353
+tick,0x2b82f581,83363,0,0x2b84539a,0,0x2b844628,0x2b83a0cc,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b838c50,0x2b839b39,0x2b83970e,0x2b83964b,0x2b8394a8,0x2b839273,0x2b839036,0x2b838f3f,0x2b838c50,0x2b83892e,0x2b8383df,0x2b8350ac
+tick,0x808cf8f,84440,0,0x90dabb0,0,0x2b85599a,0x2b845482,0x2b84a5e0,0x2b83a281,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b838c50,0x2b839b39,0x2b83970e,0x2b83964b,0x2b8394a8,0x2b839273,0x2b839036,0x2b838f3f,0x2b838c50,0x2b83892e,0x2b8383df,0x2b8350ac
+timer-event-start,V8.GCScavenger,85035
+timer-event-start,V8.External,85046
+timer-event-end,V8.External,85050
+timer-event-start,V8.External,85093
+timer-event-end,V8.External,85099
+timer-event-end,V8.GCScavenger,85103
+tick,0x2b829c56,85495,0,0x3e60ce29,0,0x2b852252,0x2b8454f6,0x2b844628,0x2b83a0cc,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b838c50,0x2b839b39,0x2b83970e,0x2b83964b,0x2b8394a8,0x2b839273,0x2b839036,0x2b838f3f,0x2b838c50,0x2b83892e,0x2b8383df,0x2b8350ac
+tick,0x808b74f,86567,0,0x2f308081,0,0x2b8537a0,0x2b8456a8,0x2b84a5e0,0x2b83a281,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b838c50,0x2b839b39,0x2b83970e,0x2b83964b,0x2b8394a8,0x2b839273,0x2b839036,0x2b838f3f,0x2b838c50,0x2b83892e,0x2b8383df,0x2b8350ac
+tick,0x2b85d04c,87632,0,0x2b839f55,0,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b838c50,0x2b839b39,0x2b83970e,0x2b83964b,0x2b8394a8,0x2b839273,0x2b839036,0x2b838f3f,0x2b838c50,0x2b83892e,0x2b8383df,0x2b8350ac
+timer-event-start,V8.GCScavenger,87755
+timer-event-start,V8.External,87766
+timer-event-end,V8.External,87770
+timer-event-start,V8.External,87822
+timer-event-end,V8.External,87829
+timer-event-end,V8.GCScavenger,87833
+timer-event-start,V8.RecompileSynchronous,88294
+timer-event-start,V8.ParseLazyMicroSeconds,88303
+timer-event-end,V8.ParseLazyMicroSeconds,88361
+code-creation,LazyCompile,0,0x2b85d420,1221,sjcl.mode.ccm.I bsuite/kraken-once/stanford-crypto-ccm.js:21,0x2f33a370,~
+timer-event-start,V8.ParseLazyMicroSeconds,88473
+timer-event-end,V8.ParseLazyMicroSeconds,88492
+timer-event-start,V8.ParseLazyMicroSeconds,88532
+timer-event-end,V8.ParseLazyMicroSeconds,88545
+timer-event-start,V8.ParseLazyMicroSeconds,88572
+timer-event-end,V8.ParseLazyMicroSeconds,88588
+timer-event-start,V8.ParseLazyMicroSeconds,88612
+timer-event-end,V8.ParseLazyMicroSeconds,88645
+timer-event-start,V8.ParseLazyMicroSeconds,88688
+timer-event-end,V8.ParseLazyMicroSeconds,88714
+tick,0x81fc61b,88727,0,0xff81ebbc,2,0x2b84a58b,0x2b83a281,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b838c50,0x2b839b39,0x2b83970e,0x2b83964b,0x2b8394a8,0x2b839273,0x2b839036,0x2b838f3f,0x2b838c50,0x2b83892e,0x2b8383df,0x2b8350ac
+timer-event-start,V8.ParseLazyMicroSeconds,88792
+timer-event-end,V8.ParseLazyMicroSeconds,88867
+timer-event-start,V8.ParseLazyMicroSeconds,88951
+timer-event-end,V8.ParseLazyMicroSeconds,88967
+timer-event-start,V8.ParseLazyMicroSeconds,88996
+timer-event-end,V8.ParseLazyMicroSeconds,89012
+timer-event-end,V8.RecompileSynchronous,89134
+timer-event-start,V8.RecompileConcurrent,89160
+timer-event-start,V8.RecompileSynchronous,89215
+timer-event-start,V8.ParseLazyMicroSeconds,89224
+timer-event-end,V8.ParseLazyMicroSeconds,89245
+code-creation,LazyCompile,0,0x2b85d900,585,sjcl.bitArray.equal bsuite/kraken-once/stanford-crypto-ccm.js:10,0x2f339c50,~
+timer-event-start,V8.ParseLazyMicroSeconds,89309
+timer-event-end,V8.ParseLazyMicroSeconds,89326
+timer-event-start,V8.ParseLazyMicroSeconds,89356
+timer-event-end,V8.ParseLazyMicroSeconds,89369
+timer-event-start,V8.ParseLazyMicroSeconds,89391
+timer-event-end,V8.ParseLazyMicroSeconds,89406
+timer-event-start,V8.ParseLazyMicroSeconds,89433
+timer-event-end,V8.ParseLazyMicroSeconds,89445
+timer-event-end,V8.RecompileSynchronous,89485
+timer-event-start,V8.RecompileSynchronous,89730
+timer-event-start,V8.ParseLazyMicroSeconds,89740
+tick,0x81168ba,89761,0,0x90d5060,0,0x2b85056f,0x2b85cd2d,0x2b839f04,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b838c50,0x2b839b39,0x2b83970e,0x2b83964b,0x2b8394a8,0x2b839273,0x2b839036,0x2b838f3f,0x2b838c50,0x2b83892e,0x2b8383df,0x2b8350ac
+timer-event-end,V8.ParseLazyMicroSeconds,89805
+code-creation,LazyCompile,0,0x2b85db60,1838,sjcl.mode.ccm.G bsuite/kraken-once/stanford-crypto-ccm.js:20,0x2f33a310,~
+timer-event-start,V8.ParseLazyMicroSeconds,89969
+timer-event-end,V8.ParseLazyMicroSeconds,89990
+timer-event-start,V8.ParseLazyMicroSeconds,90016
+timer-event-end,V8.ParseLazyMicroSeconds,90042
+timer-event-start,V8.ParseLazyMicroSeconds,90084
+timer-event-end,V8.ParseLazyMicroSeconds,90098
+timer-event-start,V8.ParseLazyMicroSeconds,90129
+timer-event-end,V8.ParseLazyMicroSeconds,90170
+timer-event-start,V8.ParseLazyMicroSeconds,90271
+timer-event-end,V8.ParseLazyMicroSeconds,90286
+timer-event-start,V8.ParseLazyMicroSeconds,90326
+timer-event-end,V8.ParseLazyMicroSeconds,90344
+timer-event-end,V8.RecompileSynchronous,90480
+tick,0x2b8596f9,90829,0,0x8,0,0x2b852252,0x2b8454f6,0x2b844628,0x2b83a0cc,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b838c50,0x2b839b39,0x2b83970e,0x2b83964b,0x2b8394a8,0x2b839273,0x2b839036,0x2b838f3f,0x2b838c50,0x2b83892e,0x2b8383df,0x2b8350ac
+timer-event-end,V8.RecompileConcurrent,91133
+timer-event-start,V8.RecompileConcurrent,91145
+timer-event-start,V8.RecompileSynchronous,91197
+code-creation,Stub,2,0x2b85e2a0,1800,RecordWriteStub
+code-creation,Stub,2,0x2b85e9c0,1805,RecordWriteStub
+code-creation,Stub,2,0x2b85f0e0,1785,RecordWriteStub
+code-creation,Stub,2,0x2b85f7e0,1797,RecordWriteStub
+timer-event-end,V8.RecompileConcurrent,91529
+timer-event-start,V8.RecompileConcurrent,91540
+code-creation,Stub,2,0x2b85ff00,1789,RecordWriteStub
+code-creation,Stub,2,0x2b860600,1805,RecordWriteStub
+code-creation,LazyCompile,1,0x2b860d20,9288,sjcl.mode.ccm.I bsuite/kraken-once/stanford-crypto-ccm.js:21,0x2f33a370,*
+timer-event-end,V8.RecompileSynchronous,91729
+timer-event-start,V8.RecompileSynchronous,91735
+code-creation,LazyCompile,1,0x2b863180,2119,sjcl.bitArray.equal bsuite/kraken-once/stanford-crypto-ccm.js:10,0x2f339c50,*
+timer-event-end,V8.RecompileSynchronous,91833
+tick,0xf74c34b6,91883,0,0x90ebc51,2,0x2b844670,0x2b83a0cc,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b838c50,0x2b839b39,0x2b83970e,0x2b83964b,0x2b8394a8,0x2b839273,0x2b839036,0x2b838f3f,0x2b838c50,0x2b83892e,0x2b8383df,0x2b8350ac
+code-deopt,91990,9312
+code-creation,LoadPolymorphicIC,5,0x2b8639e0,105,length
+tick,0x2b859a99,92950,0,0x4,0,0x2b852252,0x2b8455f6,0x2b844628,0x2b83a0cc,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b838c50,0x2b839b39,0x2b83970e,0x2b83964b,0x2b8394a8,0x2b839273,0x2b839036,0x2b838f3f,0x2b838c50,0x2b83892e,0x2b8383df,0x2b8350ac
+timer-event-start,V8.GCScavenger,93234
+timer-event-start,V8.External,93245
+timer-event-end,V8.External,93249
+timer-event-end,V8.RecompileConcurrent,93304
+timer-event-start,V8.External,93319
+timer-event-end,V8.External,93327
+timer-event-end,V8.GCScavenger,93331
+timer-event-start,V8.RecompileSynchronous,93353
+code-creation,Stub,2,0x2b863a60,1800,RecordWriteStub
+code-creation,Stub,2,0x2b864180,1780,RecordWriteStub
+code-creation,LazyCompile,1,0x2b864880,7990,sjcl.mode.ccm.G bsuite/kraken-once/stanford-crypto-ccm.js:20,0x2f33a310,*
+timer-event-end,V8.RecompileSynchronous,93732
+code-creation,LoadPolymorphicIC,5,0x2b8667c0,105,length
+code-creation,LoadPolymorphicIC,5,0x2b866840,105,length
+code-creation,LoadPolymorphicIC,5,0x2b8668c0,105,length
+tick,0x2b848cbd,94006,0,0xa,0,0x2b844670,0x2b83a0cc,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b838c50,0x2b839b39,0x2b83970e,0x2b83964b,0x2b8394a8,0x2b839273,0x2b839036,0x2b838f3f,0x2b838c50,0x2b83892e,0x2b8383df,0x2b8350ac
+code-creation,LoadPolymorphicIC,5,0x2b866940,105,length
+tick,0x8231000,95074,0,0x90d5060,0,0x2b848e54,0x2b844670,0x2b83a0cc,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b838c50,0x2b839b39,0x2b83970e,0x2b83964b,0x2b8394a8,0x2b839273,0x2b839036,0x2b838f3f,0x2b838c50,0x2b83892e,0x2b8383df,0x2b8350ac
+tick,0x83b9d75,96149,0,0x527db159,0,0x2b82364b,0x2b83a13d,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b838c50,0x2b839b39,0x2b83970e,0x2b83964b,0x2b8394a8,0x2b839273,0x2b839036,0x2b838f3f,0x2b838c50,0x2b83892e,0x2b8383df,0x2b8350ac
+timer-event-start,V8.GCScavenger,96446
+timer-event-start,V8.External,96457
+timer-event-end,V8.External,96461
+timer-event-start,V8.External,96513
+timer-event-end,V8.External,96520
+timer-event-end,V8.GCScavenger,96524
+tick,0x2b85960c,97208,0,0xfee0,0,0x2b852252,0x2b848c4b,0x2b844670,0x2b83a0cc,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b838c50,0x2b839b39,0x2b83970e,0x2b83964b,0x2b8394a8,0x2b839273,0x2b839036,0x2b838f3f,0x2b838c50,0x2b83892e,0x2b8383df,0x2b8350ac
+tick,0x2b83b5b3,98279,0,0x2b851c24,0,0x2b85cd19,0x2b839f04,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b838c50,0x2b839b39,0x2b83970e,0x2b83964b,0x2b8394a8,0x2b839273,0x2b839036,0x2b838f3f,0x2b838c50,0x2b83892e,0x2b8383df,0x2b8350ac
+timer-event-start,V8.GCScavenger,99128
+timer-event-start,V8.External,99139
+timer-event-end,V8.External,99143
+timer-event-start,V8.External,99189
+timer-event-end,V8.External,99195
+timer-event-end,V8.GCScavenger,99199
+tick,0x821c54b,99345,0,0x5270e530,0,0x2b83bd35,0x2b85ccab,0x2b839fd2,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b838c50,0x2b839b39,0x2b83970e,0x2b83964b,0x2b8394a8,0x2b839273,0x2b839036,0x2b838f3f,0x2b838c50,0x2b83892e,0x2b8383df,0x2b8350ac
+tick,0x2b85a010,100416,0,0x0,0,0x2b852252,0x2b865810,0x2b84a5e0,0x2b83a281,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b838c50,0x2b839b39,0x2b83970e,0x2b83964b,0x2b8394a8,0x2b839273,0x2b839036,0x2b838f3f,0x2b838c50,0x2b83892e,0x2b8383df,0x2b8350ac
+tick,0x808b5f1,101472,0,0x2f308081,0,0x2b8537a0,0x2b84a325,0x2b83a281,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b838c50,0x2b839b39,0x2b83970e,0x2b83964b,0x2b8394a8,0x2b839273,0x2b839036,0x2b838f3f,0x2b838c50,0x2b83892e,0x2b8383df,0x2b8350ac
+timer-event-start,V8.GCScavenger,101820
+timer-event-start,V8.External,101831
+timer-event-end,V8.External,101835
+timer-event-start,V8.External,101885
+timer-event-end,V8.External,101891
+timer-event-end,V8.GCScavenger,101895
+tick,0x2b85a376,102533,0,0x9c155cd6,0,0x2b852252,0x2b865810,0x2b84a5e0,0x2b83a281,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b838c50,0x2b839b39,0x2b83970e,0x2b83964b,0x2b8394a8,0x2b839273,0x2b839036,0x2b838f3f,0x2b838c50,0x2b83892e,0x2b8383df,0x2b8350ac
+tick,0x2b863678,103607,0,0x4c0,0,0x2b83a0df,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b838c50,0x2b839b39,0x2b83970e,0x2b83964b,0x2b8394a8,0x2b839273,0x2b839036,0x2b838f3f,0x2b838c50,0x2b83892e,0x2b8383df,0x2b8350ac
+timer-event-start,V8.GCScavenger,104515
+timer-event-start,V8.External,104529
+timer-event-end,V8.External,104533
+timer-event-start,V8.External,104581
+timer-event-end,V8.External,104588
+timer-event-end,V8.GCScavenger,104592
+tick,0x2b85a2dc,104658,0,0x29,0,0x2b852252,0x2b8658f7,0x2b844628,0x2b83a0cc,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b838c50,0x2b839b39,0x2b83970e,0x2b83964b,0x2b8394a8,0x2b839273,0x2b839036,0x2b838f3f,0x2b838c50,0x2b83892e,0x2b8383df,0x2b8350ac
+tick,0x2b859e24,105742,0,0x80c5e06,0,0x2b852252,0x2b8654d2,0x2b844628,0x2b83a0cc,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b838c50,0x2b839b39,0x2b83970e,0x2b83964b,0x2b8394a8,0x2b839273,0x2b839036,0x2b838f3f,0x2b838c50,0x2b83892e,0x2b8383df,0x2b8350ac
+code-deopt,106093,4416
+code-creation,Stub,12,0x2b8669c0,190,BinaryOpStub_MOD_Alloc_Smi+Smi
+tick,0x2b8514f9,106811,0,0xd1b6f5df,0,0x2b8657f1,0x2b844628,0x2b83a0cc,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b838c50,0x2b839b39,0x2b83970e,0x2b83964b,0x2b8394a8,0x2b839273,0x2b839036,0x2b838f3f,0x2b838c50,0x2b83892e,0x2b8383df,0x2b8350ac
+timer-event-start,V8.GCScavenger,107254
+timer-event-start,V8.External,107264
+timer-event-end,V8.External,107268
+timer-event-start,V8.External,107317
+timer-event-end,V8.External,107323
+timer-event-end,V8.GCScavenger,107327
+timer-event-start,V8.RecompileSynchronous,107462
+timer-event-start,V8.ParseLazyMicroSeconds,107471
+timer-event-end,V8.ParseLazyMicroSeconds,107537
+timer-event-end,V8.RecompileSynchronous,107729
+timer-event-start,V8.RecompileConcurrent,107764
+tick,0x2b859da9,107874,0,0x2,0,0x2b852252,0x2b848b65,0x2b84a58b,0x2b83a281,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b838c50,0x2b839b39,0x2b83970e,0x2b83964b,0x2b8394a8,0x2b839273,0x2b839036,0x2b838f3f,0x2b838c50,0x2b83892e,0x2b8383df,0x2b8350ac
+timer-event-end,V8.RecompileConcurrent,108795
+timer-event-start,V8.RecompileSynchronous,108885
+tick,0x2b859d60,108935,0,0x0,0,0x2b852252,0x2b8658f7,0x2b84a5e0,0x2b83a281,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b838c50,0x2b839b39,0x2b83970e,0x2b83964b,0x2b8394a8,0x2b839273,0x2b839036,0x2b838f3f,0x2b838c50,0x2b83892e,0x2b8383df,0x2b8350ac
+code-creation,Stub,2,0x2b866a80,783,RecordWriteStub
+code-creation,Stub,2,0x2b866da0,1772,RecordWriteStub
+code-creation,LazyCompile,1,0x2b8674a0,4040,sjcl.cipher.aes bsuite/kraken-once/stanford-crypto-ccm.js:4,0x2f339830,*
+timer-event-end,V8.RecompileSynchronous,109204
+tick,0x2b851bd9,110005,0,0x68,0,0x2b85cd19,0x2b839f04,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b838c50,0x2b839b39,0x2b83970e,0x2b83964b,0x2b8394a8,0x2b839273,0x2b839036,0x2b838f3f,0x2b838c50,0x2b83892e,0x2b8383df,0x2b8350ac
+timer-event-start,V8.GCScavenger,110651
+timer-event-start,V8.External,110662
+timer-event-end,V8.External,110666
+timer-event-start,V8.External,110715
+timer-event-end,V8.External,110721
+timer-event-end,V8.GCScavenger,110725
+tick,0x2b85a1d8,111072,0,0x0,0,0x2b852252,0x2b8658f7,0x2b84a5e0,0x2b83a281,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b838c50,0x2b839b39,0x2b83970e,0x2b83964b,0x2b8394a8,0x2b839273,0x2b839036,0x2b838f3f,0x2b838c50,0x2b83892e,0x2b8383df,0x2b8350ac
+tick,0x2b848d38,112161,0,0x4c,0,0x2b844670,0x2b83a0cc,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b838c50,0x2b839b39,0x2b83970e,0x2b83964b,0x2b8394a8,0x2b839273,0x2b839036,0x2b838f3f,0x2b838c50,0x2b83892e,0x2b8383df,0x2b8350ac
+timer-event-start,V8.RecompileSynchronous,112323
+timer-event-start,V8.ParseLazyMicroSeconds,112335
+timer-event-end,V8.ParseLazyMicroSeconds,112387
+timer-event-start,V8.ParseLazyMicroSeconds,112444
+timer-event-end,V8.ParseLazyMicroSeconds,112463
+timer-event-start,V8.ParseLazyMicroSeconds,112496
+timer-event-end,V8.ParseLazyMicroSeconds,112509
+timer-event-start,V8.ParseLazyMicroSeconds,112536
+timer-event-end,V8.ParseLazyMicroSeconds,112552
+timer-event-start,V8.ParseLazyMicroSeconds,112576
+timer-event-end,V8.ParseLazyMicroSeconds,112598
+timer-event-start,V8.ParseLazyMicroSeconds,112639
+timer-event-end,V8.ParseLazyMicroSeconds,112653
+timer-event-start,V8.ParseLazyMicroSeconds,112685
+timer-event-end,V8.ParseLazyMicroSeconds,112722
+timer-event-start,V8.ParseLazyMicroSeconds,112803
+timer-event-end,V8.ParseLazyMicroSeconds,112819
+timer-event-start,V8.ParseLazyMicroSeconds,112848
+timer-event-end,V8.ParseLazyMicroSeconds,112863
+timer-event-end,V8.RecompileSynchronous,112986
+timer-event-start,V8.RecompileConcurrent,113012
+tick,0x2b867dc3,113148,0,0x100,0,0x2b839e65,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b838c50,0x2b839b39,0x2b83970e,0x2b83964b,0x2b8394a8,0x2b839273,0x2b839036,0x2b838f3f,0x2b838c50,0x2b83892e,0x2b8383df,0x2b8350ac
+timer-event-start,V8.GCScavenger,114171
+timer-event-start,V8.External,114182
+timer-event-end,V8.External,114186
+tick,0x82c920e,114254,0,0x0,1
+timer-event-start,V8.External,114309
+timer-event-end,V8.External,114330
+timer-event-end,V8.GCScavenger,114350
+timer-event-end,V8.RecompileConcurrent,115013
+timer-event-start,V8.RecompileSynchronous,115032
+tick,0x8369515,115325,0,0x9135ff0,2,0x2b844670,0x2b83a0cc,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b838c50,0x2b839b39,0x2b83970e,0x2b83964b,0x2b8394a8,0x2b839273,0x2b839036,0x2b838f3f,0x2b838c50,0x2b83892e,0x2b8383df,0x2b8350ac
+code-creation,LazyCompile,1,0x5120a000,9284,sjcl.mode.ccm.I bsuite/kraken-once/stanford-crypto-ccm.js:21,0x2f33a370,*
+timer-event-end,V8.RecompileSynchronous,115434
+code-deopt,115666,9312
+tick,0x2b85056f,116392,0,0x52f8f619,0,0x2b85cd2d,0x2b839fd2,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b838c50,0x2b839b39,0x2b83970e,0x2b83964b,0x2b8394a8,0x2b839273,0x2b839036,0x2b838f3f,0x2b838c50,0x2b83892e,0x2b8383df,0x2b8350ac
+tick,0x2b812420,117465,0,0x2b85592e,0,0x2b86573b,0x2b844628,0x2b83a0cc,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b838c50,0x2b839b39,0x2b83970e,0x2b83964b,0x2b8394a8,0x2b839273,0x2b839036,0x2b838f3f,0x2b838c50,0x2b83892e,0x2b8383df,0x2b8350ac
+timer-event-start,V8.GCScavenger,117571
+timer-event-start,V8.External,117583
+timer-event-end,V8.External,117587
+timer-event-start,V8.External,117636
+timer-event-end,V8.External,117642
+timer-event-end,V8.GCScavenger,117646
+tick,0x811db13,118481,0,0x90d5060,0,0x2b85cd53,0x2b839eb3,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b838c50,0x2b839b39,0x2b83970e,0x2b83964b,0x2b8394a8,0x2b839273,0x2b839036,0x2b838f3f,0x2b838c50,0x2b83892e,0x2b8383df,0x2b8350ac
+tick,0x80c4222,119548,0,0x90d5060,0,0x2b85599a,0x2b86573b,0x2b844628,0x2b83a0cc,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b838c50,0x2b839b39,0x2b83970e,0x2b83964b,0x2b8394a8,0x2b839273,0x2b839036,0x2b838f3f,0x2b838c50,0x2b83892e,0x2b8383df,0x2b8350ac
+timer-event-start,V8.GCScavenger,120368
+timer-event-start,V8.External,120379
+timer-event-end,V8.External,120383
+timer-event-start,V8.External,120428
+timer-event-end,V8.External,120434
+timer-event-end,V8.GCScavenger,120438
+tick,0x2b867eb3,120610,0,0x100,0,0x2b839e65,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b838c50,0x2b839b39,0x2b83970e,0x2b83964b,0x2b8394a8,0x2b839273,0x2b839036,0x2b838f3f,0x2b838c50,0x2b83892e,0x2b8383df,0x2b8350ac
+tick,0x2b859eae,121680,0,0x80c5e06,0,0x2b852252,0x2b8658f7,0x2b844628,0x2b83a0cc,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b838c50,0x2b839b39,0x2b83970e,0x2b83964b,0x2b8394a8,0x2b839273,0x2b839036,0x2b838f3f,0x2b838c50,0x2b83892e,0x2b8383df,0x2b8350ac
+tick,0x2b85981d,122808,0,0x21,0,0x2b852252,0x2b848c4b,0x2b84a58b,0x2b83a281,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b838c50,0x2b839b39,0x2b83970e,0x2b83964b,0x2b8394a8,0x2b839273,0x2b839036,0x2b838f3f,0x2b838c50,0x2b83892e,0x2b8383df,0x2b8350ac
+timer-event-start,V8.GCScavenger,123188
+timer-event-start,V8.External,123199
+timer-event-end,V8.External,123203
+timer-event-start,V8.External,123248
+timer-event-end,V8.External,123254
+timer-event-end,V8.GCScavenger,123258
+tick,0x2b859ca8,123878,0,0x0,0,0x2b852252,0x2b865810,0x2b84a5e0,0x2b83a281,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b838c50,0x2b839b39,0x2b83970e,0x2b83964b,0x2b8394a8,0x2b839273,0x2b839036,0x2b838f3f,0x2b838c50,0x2b83892e,0x2b8383df,0x2b8350ac
+tick,0x80fa2d1,124943,0,0x5279ab29,0,0x2b83bd35,0x2b85ccab,0x2b839fd2,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b838c50,0x2b839b39,0x2b83970e,0x2b83964b,0x2b8394a8,0x2b839273,0x2b839036,0x2b838f3f,0x2b838c50,0x2b83892e,0x2b8383df,0x2b8350ac
+timer-event-start,V8.GCScavenger,126000
+timer-event-start,V8.External,126017
+timer-event-end,V8.External,126022
+tick,0x808b6b0,126038,0,0x2f308081,0,0x2b855838,0x2b848b0a,0x2b844670,0x2b83a0cc,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b838c50,0x2b839b39,0x2b83970e,0x2b83964b,0x2b8394a8,0x2b839273,0x2b839036,0x2b838f3f,0x2b838c50,0x2b83892e,0x2b8383df,0x2b8350ac
+timer-event-start,V8.External,126109
+timer-event-end,V8.External,126129
+timer-event-end,V8.GCScavenger,126139
+tick,0x808b656,127081,0,0x2f308081,0,0x2b8658be,0x2b84a5e0,0x2b83a281,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b838c50,0x2b839b39,0x2b83970e,0x2b83964b,0x2b8394a8,0x2b839273,0x2b839036,0x2b838f3f,0x2b838c50,0x2b83892e,0x2b8383df,0x2b8350ac
+tick,0x2b85a1f0,128141,0,0x1f,0,0x2b852252,0x2b848c4b,0x2b84a58b,0x2b83a281,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b838c50,0x2b839b39,0x2b83970e,0x2b83964b,0x2b8394a8,0x2b839273,0x2b839036,0x2b838f3f,0x2b838c50,0x2b83892e,0x2b8383df,0x2b8350ac
+timer-event-start,V8.GCScavenger,128896
+timer-event-start,V8.External,128907
+timer-event-end,V8.External,128911
+timer-event-start,V8.External,128958
+timer-event-end,V8.External,128964
+timer-event-end,V8.GCScavenger,128968
+tick,0x2b867d2b,129212,0,0x100,0,0x2b839e65,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b838c50,0x2b839b39,0x2b83970e,0x2b83964b,0x2b8394a8,0x2b839273,0x2b839036,0x2b838f3f,0x2b838c50,0x2b83892e,0x2b8383df,0x2b8350ac
+tick,0x2b859a7b,130285,0,0x80c5e06,0,0x2b852252,0x2b865810,0x2b844628,0x2b83a0cc,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b838c50,0x2b839b39,0x2b83970e,0x2b83964b,0x2b8394a8,0x2b839273,0x2b839036,0x2b838f3f,0x2b838c50,0x2b83892e,0x2b8383df,0x2b8350ac
+tick,0x2b859c3b,131350,0,0x0,0,0x2b852252,0x2b8658f7,0x2b84a5e0,0x2b83a281,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b838c50,0x2b839b39,0x2b83970e,0x2b83964b,0x2b8394a8,0x2b839273,0x2b839036,0x2b838f3f,0x2b838c50,0x2b83892e,0x2b8383df,0x2b8350ac
+timer-event-start,V8.GCScavenger,131713
+timer-event-start,V8.External,131723
+timer-event-end,V8.External,131727
+timer-event-start,V8.External,131772
+timer-event-end,V8.External,131778
+timer-event-end,V8.GCScavenger,131782
+tick,0x80c413f,132412,0,0x90d5060,0,0x2b855ca8,0x2b8446a3,0x2b83a0cc,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b838c50,0x2b839b39,0x2b83970e,0x2b83964b,0x2b8394a8,0x2b839273,0x2b839036,0x2b838f3f,0x2b838c50,0x2b83892e,0x2b8383df,0x2b8350ac
+tick,0x80a1baf,133466,0,0x811e5c0,0,0x2b848b2e,0x2b84a58b,0x2b83a281,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b838c50,0x2b839b39,0x2b83970e,0x2b83964b,0x2b8394a8,0x2b839273,0x2b839036,0x2b838f3f,0x2b838c50,0x2b83892e,0x2b8383df,0x2b8350ac
+timer-event-start,V8.GCScavenger,134532
+tick,0x2b85d126,134550,0,0x2,0,0x2b839f04,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b838c50,0x2b839b39,0x2b83970e,0x2b83964b,0x2b8394a8,0x2b839273,0x2b839036,0x2b838f3f,0x2b838c50,0x2b83892e,0x2b8383df,0x2b8350ac
+timer-event-start,V8.External,134619
+timer-event-end,V8.External,134636
+timer-event-start,V8.External,134702
+timer-event-end,V8.External,134708
+timer-event-end,V8.GCScavenger,134712
+tick,0x2b8594d3,135617,0,0x80c5e06,0,0x2b852252,0x2b8654d2,0x2b844628,0x2b83a0cc,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b838c50,0x2b839b39,0x2b83970e,0x2b83964b,0x2b8394a8,0x2b839273,0x2b839036,0x2b838f3f,0x2b838c50,0x2b83892e,0x2b8383df,0x2b8350ac
+timer-event-start,V8.RecompileSynchronous,135776
+timer-event-start,V8.ParseLazyMicroSeconds,135787
+timer-event-end,V8.ParseLazyMicroSeconds,135838
+timer-event-start,V8.ParseLazyMicroSeconds,135894
+timer-event-end,V8.ParseLazyMicroSeconds,135913
+timer-event-start,V8.ParseLazyMicroSeconds,135946
+timer-event-end,V8.ParseLazyMicroSeconds,135960
+timer-event-start,V8.ParseLazyMicroSeconds,135987
+timer-event-end,V8.ParseLazyMicroSeconds,136002
+timer-event-start,V8.ParseLazyMicroSeconds,136026
+timer-event-end,V8.ParseLazyMicroSeconds,136048
+timer-event-start,V8.ParseLazyMicroSeconds,136089
+timer-event-end,V8.ParseLazyMicroSeconds,136103
+timer-event-start,V8.ParseLazyMicroSeconds,136135
+timer-event-end,V8.ParseLazyMicroSeconds,136172
+timer-event-start,V8.ParseLazyMicroSeconds,136253
+timer-event-end,V8.ParseLazyMicroSeconds,136270
+timer-event-start,V8.ParseLazyMicroSeconds,136301
+timer-event-end,V8.ParseLazyMicroSeconds,136317
+timer-event-end,V8.RecompileSynchronous,136440
+timer-event-start,V8.RecompileConcurrent,136466
+tick,0x2b859c6e,136680,0,0x0,0,0x2b852252,0x2b8658f7,0x2b84a5e0,0x2b83a281,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b838c50,0x2b839b39,0x2b83970e,0x2b83964b,0x2b8394a8,0x2b839273,0x2b839036,0x2b838f3f,0x2b838c50,0x2b83892e,0x2b8383df,0x2b8350ac
+code-creation,LoadPolymorphicIC,5,0x5120c460,105,length
+code-creation,LoadPolymorphicIC,5,0x5120c4e0,117,length
+code-creation,LoadPolymorphicIC,5,0x5120c560,117,length
+code-creation,LoadPolymorphicIC,5,0x5120c5e0,105,length
+code-creation,LoadPolymorphicIC,5,0x5120c660,105,length
+tick,0x2b855ece,137742,0,0x527d0961,0,0x2b8446a3,0x2b83a0cc,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b838c50,0x2b839b39,0x2b83970e,0x2b83964b,0x2b8394a8,0x2b839273,0x2b839036,0x2b838f3f,0x2b838c50,0x2b83892e,0x2b8383df,0x2b8350ac
+timer-event-start,V8.GCScavenger,138203
+timer-event-start,V8.External,138213
+timer-event-end,V8.External,138217
+timer-event-start,V8.External,138271
+timer-event-end,V8.External,138277
+timer-event-end,V8.GCScavenger,138281
+timer-event-end,V8.RecompileConcurrent,138393
+timer-event-start,V8.RecompileSynchronous,138412
+code-creation,LazyCompile,1,0x5120c6e0,9284,sjcl.mode.ccm.I bsuite/kraken-once/stanford-crypto-ccm.js:21,0x2f33a370,*
+timer-event-end,V8.RecompileSynchronous,138781
+tick,0x83647f0,138812,0,0xf633ddf4,2,0x2b844670,0x2b83a0cc,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b838c50,0x2b839b39,0x2b83970e,0x2b83964b,0x2b8394a8,0x2b839273,0x2b839036,0x2b838f3f,0x2b838c50,0x2b83892e,0x2b8383df,0x2b8350ac
+code-deopt,138895,9312
+tick,0x2b851212,139867,0,0xff81fd00,0,0x2b8657f1,0x2b84a5e0,0x2b83a281,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b838c50,0x2b839b39,0x2b83970e,0x2b83964b,0x2b8394a8,0x2b839273,0x2b839036,0x2b838f3f,0x2b838c50,0x2b83892e,0x2b8383df,0x2b8350ac
+tick,0x82ebff7,140937,0,0x2f33ca81,0,0x2b85056f,0x2b85cd2d,0x2b839fd2,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b838c50,0x2b839b39,0x2b83970e,0x2b83964b,0x2b8394a8,0x2b839273,0x2b839036,0x2b838f3f,0x2b838c50,0x2b83892e,0x2b8383df,0x2b8350ac
+timer-event-start,V8.GCScavenger,141540
+timer-event-start,V8.External,141551
+timer-event-end,V8.External,141555
+timer-event-start,V8.External,141605
+timer-event-end,V8.External,141611
+timer-event-end,V8.GCScavenger,141615
+tick,0x2b85a0a6,142005,0,0x0,0,0x2b852252,0x2b865810,0x2b84a5e0,0x2b83a281,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b838c50,0x2b839b39,0x2b83970e,0x2b83964b,0x2b8394a8,0x2b839273,0x2b839036,0x2b838f3f,0x2b838c50,0x2b83892e,0x2b8383df,0x2b8350ac
+tick,0x8116886,143088,0,0x90d5060,0,0x2b85b862,0x2b848b8c,0x2b84a58b,0x2b83a281,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b838c50,0x2b839b39,0x2b83970e,0x2b83964b,0x2b8394a8,0x2b839273,0x2b839036,0x2b838f3f,0x2b838c50,0x2b83892e,0x2b8383df,0x2b8350ac
+tick,0x2b83dbaf,144137,0,0x2b85cd53,0,0x2b839fd2,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b838c50,0x2b839b39,0x2b83970e,0x2b83964b,0x2b8394a8,0x2b839273,0x2b839036,0x2b838f3f,0x2b838c50,0x2b83892e,0x2b8383df,0x2b8350ac
+timer-event-start,V8.GCScavenger,144365
+timer-event-start,V8.External,144376
+timer-event-end,V8.External,144380
+timer-event-start,V8.External,144428
+timer-event-end,V8.External,144434
+timer-event-end,V8.GCScavenger,144438
+tick,0x81168ba,145212,0,0x90d5060,0,0x2b85056f,0x2b85cd2d,0x2b839f04,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b838c50,0x2b839b39,0x2b83970e,0x2b83964b,0x2b8394a8,0x2b839273,0x2b839036,0x2b838f3f,0x2b838c50,0x2b83892e,0x2b8383df,0x2b8350ac
+tick,0x2b851430,146268,0,0xff81fd00,0,0x2b8657f1,0x2b84a5e0,0x2b83a281,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b85b238,0x2b83a474,0x2b838f3f,0x2b838c50,0x2b839b39,0x2b83970e,0x2b83964b,0x2b8394a8,0x2b839273,0x2b839036,0x2b838f3f,0x2b838c50,0x2b83892e,0x2b8383df,0x2b8350ac
+timer-event-start,V8.ParseLazyMicroSeconds,146339
+timer-event-end,V8.ParseLazyMicroSeconds,146358
+timer-event-start,V8.CompileLazy,146364
+timer-event-start,V8.CompileFullCode,146369
+timer-event-end,V8.CompileFullCode,146386
+code-creation,LazyCompile,0,0x5120eb40,212, bsuite/kraken-once/stanford-crypto-ccm.js:172,0x2f33dd88,~
+timer-event-end,V8.CompileLazy,146400
+code-creation,Stub,12,0x5120ec20,311,BinaryOpStub_SUB_Alloc_Generic+Generic
+timer-event-start,V8.ParseLazyMicroSeconds,146431
+timer-event-end,V8.ParseLazyMicroSeconds,146461
+timer-event-start,V8.CompileLazy,146467
+timer-event-start,V8.CompileFullCode,146475
+timer-event-end,V8.CompileFullCode,146495
+code-creation,LazyCompile,0,0x5120ed60,580,NonNumberToNumber native runtime.js:548,0x44225f78,~
+timer-event-end,V8.CompileLazy,146508
+code-creation,Stub,2,0x5120efc0,98,valueOf
+code-creation,LoadPolymorphicIC,5,0x5120f040,117,valueOf
+code-creation,CallIC,7,0x5120f0c0,129,ToNumber
+timer-event-start,V8.ParseLazyMicroSeconds,146556
+timer-event-end,V8.ParseLazyMicroSeconds,146569
+timer-event-start,V8.CompileLazy,146574
+timer-event-start,V8.CompileFullCode,146580
+timer-event-end,V8.CompileFullCode,146591
+code-creation,LazyCompile,0,0x5120f160,208,record bsuite/kraken-once/stanford-crypto-ccm.js:7229,0x2f339680,~
+timer-event-end,V8.CompileLazy,146603
+timer-event-start,V8.External,146613
+timer-event-end,V8.External,146656
+timer-event-end,V8.Execute,146662
+timer-event-start,V8.RecompileConcurrent,146700
+timer-event-end,V8.RecompileConcurrent,146738
+profiler,end
diff --git a/src/v8/test/mjsunit/tools/profviz.js b/src/v8/test/mjsunit/tools/profviz.js
index 6ff0e2c..fc0da5d 100644
--- a/src/v8/test/mjsunit/tools/profviz.js
+++ b/src/v8/test/mjsunit/tools/profviz.js
@@ -28,7 +28,7 @@
 // Load implementations from <project root>/tools.
 // Files: tools/csvparser.js tools/splaytree.js tools/codemap.js
 // Files: tools/consarray.js tools/profile.js tools/profile_view.js
-// Files: tools/logreader.js tools/tickprocessor.js
+// Files: tools/logreader.js tools/arguments.js tools/tickprocessor.js
 // Files: tools/profviz/composer.js
 // Env: TEST_FILE_NAME
 
diff --git a/src/v8/test/mjsunit/tools/tickprocessor-test-func-info.log b/src/v8/test/mjsunit/tools/tickprocessor-test-func-info.log
index 0d7f39d..6751121 100644
--- a/src/v8/test/mjsunit/tools/tickprocessor-test-func-info.log
+++ b/src/v8/test/mjsunit/tools/tickprocessor-test-func-info.log
@@ -1,11 +1,11 @@
-shared-library,"shell",0x08048000,0x081ee000,0
-shared-library,"/lib32/libm-2.7.so",0xf7db6000,0xf7dd9000,0
-shared-library,"ffffe000-fffff000",0xffffe000,0xfffff000,0
-profiler,"begin",1
-code-creation,Stub,0,100,0x424260,348,"CompareStub_GE"
-code-creation,LazyCompile,0,101,0x2a8100,18535,"DrawQube 3d-cube.js:188",0xf43abcac,
-code-creation,LazyCompile,0,102,0x480100,3908,"DrawLine 3d-cube.js:17",0xf43abc50,
+shared-library,shell,0x08048000,0x081ee000,0
+shared-library,/lib32/libm-2.7.so,0xf7db6000,0xf7dd9000,0
+shared-library,ffffe000-fffff000,0xffffe000,0xfffff000,0
+profiler,begin,1
+code-creation,Stub,0,100,0x424260,348,CompareStub_GE
+code-creation,LazyCompile,0,101,0x2a8100,18535,DrawQube 3d-cube.js:188,0xf43abcac,
+code-creation,LazyCompile,0,102,0x480100,3908,DrawLine 3d-cube.js:17,0xf43abc50,
 tick,0x424284,0,0,0x480600,0,0x2aaaa5
 tick,0x42429f,0,0,0x480600,0,0x2aacb4
 tick,0x48063d,0,0,0x2d0f7c,0,0x2aaec6
-profiler,"end"
+profiler,end
diff --git a/src/v8/test/mjsunit/tools/tickprocessor-test.log b/src/v8/test/mjsunit/tools/tickprocessor-test.log
index 7137900..049611e 100644
--- a/src/v8/test/mjsunit/tools/tickprocessor-test.log
+++ b/src/v8/test/mjsunit/tools/tickprocessor-test.log
@@ -1,14 +1,14 @@
-shared-library,"shell",0x08048000,0x081ee000,0
-shared-library,"/lib32/libm-2.7.so",0xf7db6000,0xf7dd9000,0
-shared-library,"ffffe000-fffff000",0xffffe000,0xfffff000,0
-profiler,"begin",1
-code-creation,Stub,0,100,0xf540a100,474,"CEntryStub"
-code-creation,Script,0,101,0xf541cd80,736,"exp.js"
-code-creation,Stub,0,102,0xf541d0e0,47,"RuntimeStub_Math_exp"
-code-creation,LazyCompile,0,103,0xf541d120,145,"exp native math.js:41"
+shared-library,shell,0x08048000,0x081ee000,0
+shared-library,/lib32/libm-2.7.so,0xf7db6000,0xf7dd9000,0
+shared-library,ffffe000-fffff000,0xffffe000,0xfffff000,0
+profiler,begin,1
+code-creation,Stub,0,100,0xf540a100,474,CEntryStub
+code-creation,Script,0,101,0xf541cd80,736,exp.js
+code-creation,Stub,0,102,0xf541d0e0,47,RuntimeStub_Math_exp
+code-creation,LazyCompile,0,103,0xf541d120,145,exp native math.js:41
 function-creation,0xf441d280,0xf541d120
-code-creation,LoadIC,0,104,0xf541d280,117,"j"
-code-creation,LoadIC,0,105,0xf541d360,63,"i"
+code-creation,LoadIC,0,104,0xf541d280,117,j
+code-creation,LoadIC,0,105,0xf541d360,63,i
 tick,0x80f82d1,0,0,0,0,0xf541ce5c
 tick,0x80f89a1,0,0,0,0,0xf541ce5c
 tick,0x8123b5c,0,0,0,0,0xf541d1a1,0xf541ceea
@@ -22,4 +22,4 @@
 tick,0xf7dbff21,0,0,0,0,0xf541d1a1,0xf541ceea
 tick,0xf7edec90,0,0,0,0,0xf541d1a1,0xf541ceea
 tick,0xffffe402,0,0,0,0
-profiler,"end"
+profiler,end
diff --git a/src/v8/test/mjsunit/tools/tickprocessor.js b/src/v8/test/mjsunit/tools/tickprocessor.js
index 4d113c0..cf38985 100644
--- a/src/v8/test/mjsunit/tools/tickprocessor.js
+++ b/src/v8/test/mjsunit/tools/tickprocessor.js
@@ -28,14 +28,14 @@
 // Load implementations from <project root>/tools.
 // Files: tools/splaytree.js tools/codemap.js tools/csvparser.js
 // Files: tools/consarray.js tools/profile.js tools/profile_view.js
-// Files: tools/logreader.js tools/tickprocessor.js
+// Files: tools/logreader.js tools/arguments.js tools/tickprocessor.js
 // Env: TEST_FILE_NAME
 
 
 (function testArgumentsProcessor() {
   var p_default = new ArgumentsProcessor([]);
   assertTrue(p_default.parse());
-  assertEquals(ArgumentsProcessor.DEFAULTS, p_default.result());
+  assertEquals(p_default.getDefaultResults(), p_default.result());
 
   var p_logFile = new ArgumentsProcessor(['logfile.log']);
   assertTrue(p_logFile.parse());
diff --git a/src/v8/test/mjsunit/unbox-double-arrays.js b/src/v8/test/mjsunit/unbox-double-arrays.js
index 2bebddb..d6fc093 100644
--- a/src/v8/test/mjsunit/unbox-double-arrays.js
+++ b/src/v8/test/mjsunit/unbox-double-arrays.js
@@ -50,11 +50,6 @@
   assertTrue(%HasDoubleElements(a));
 }
 
-function make_object_like_array(size) {
-  obj = new Object();
-  obj.length = size;
-  return obj;
-}
 
 function testOneArrayType(allocator) {
   var large_array = new allocator(large_array_size);
@@ -349,11 +344,18 @@
   assertTrue(%HasDoubleElements(large_array));
 }
 
+class ArraySubclass extends Array {
+  constructor(...args) {
+    super(...args);
+    this.marker = 42;
+  }
+}
+
 // Force gc here to start with a clean heap if we repeat this test multiple
 // times.
 gc();
-testOneArrayType(make_object_like_array);
 testOneArrayType(Array);
+testOneArrayType(ArraySubclass);
 
 var large_array = new Array(large_array_size);
 force_to_fast_double_array(large_array);
diff --git a/src/v8/test/mjsunit/wasm/asm-wasm.js b/src/v8/test/mjsunit/wasm/asm-wasm.js
index 0a642f2..71c6b10 100644
--- a/src/v8/test/mjsunit/wasm/asm-wasm.js
+++ b/src/v8/test/mjsunit/wasm/asm-wasm.js
@@ -7,7 +7,7 @@
 var stdlib = this;
 
 function assertValidAsm(func) {
-  assertTrue(%IsAsmWasmCode(func));
+  assertTrue(%IsAsmWasmCode(func), "must be valid asm code");
 }
 
 function assertWasm(expected, func, ffi) {
@@ -426,6 +426,23 @@
 assertWasm(47, TestContinueInDoWhileFalse);
 
 
+function TestContinueInForLoop() {
+  "use asm";
+
+  function caller() {
+    var i = 0;
+    for (; (i|0) < 10; i = (i+1)|0) {
+      continue;
+    }
+    return 4711;
+  }
+
+  return {caller: caller};
+}
+
+assertWasm(4711, TestContinueInForLoop);
+
+
 function TestNot() {
   "use asm";
 
diff --git a/src/v8/test/mjsunit/wasm/asm-with-wasm-off.js b/src/v8/test/mjsunit/wasm/asm-with-wasm-off.js
index bf3bbe7..2fec37d 100644
--- a/src/v8/test/mjsunit/wasm/asm-with-wasm-off.js
+++ b/src/v8/test/mjsunit/wasm/asm-with-wasm-off.js
@@ -2,12 +2,12 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-// Flags: --validate-asm --allow-natives-syntax
+// Flags: --noexpose-wasm --validate-asm --allow-natives-syntax
 
-// NOTE: This is in it's own file because it calls %DisallowCodegenFromStrings,
+// NOTE: This is in its own file because it calls %DisallowCodegenFromStrings,
 // which messes with the isolate's state.
 (function testAsmWithWasmOff() {
-  %DisallowCodegenFromStrings();
+  %DisallowCodegenFromStrings(true);
   function Module() {
     'use asm';
     function foo() {
diff --git a/src/v8/test/mjsunit/wasm/atomics.js b/src/v8/test/mjsunit/wasm/atomics.js
index d8d566c..63d8eb0 100644
--- a/src/v8/test/mjsunit/wasm/atomics.js
+++ b/src/v8/test/mjsunit/wasm/atomics.js
@@ -104,9 +104,13 @@
   assertTraps(kTrapMemOutOfBounds, () => func((maxSize + 1) * kPageSize, 5, 1));
 }
 
+// Test many elements in the small range, make bigger steps later. This is still
+// O(2^n), but takes 213 steps to reach 2^32.
+const inc = i => i + Math.floor(i/10) + 1;
+
 function Test32Op(operation, func) {
   let i32 = new Uint32Array(memory.buffer);
-  for (let i = 0; i < i32.length; i++) {
+  for (let i = 0; i < i32.length; i = inc(i)) {
     let expected = 0x9cedf00d;
     let value = 0x11111111;
     i32[i] = expected;
@@ -118,7 +122,7 @@
 
 function Test16Op(operation, func) {
   let i16 = new Uint16Array(memory.buffer);
-  for (let i = 0; i < i16.length; i++) {
+  for (let i = 0; i < i16.length; i = inc(i)) {
     let expected = 0xd00d;
     let value = 0x1111;
     i16[i] = expected;
@@ -130,7 +134,7 @@
 
 function Test8Op(operation, func) {
   let i8 = new Uint8Array(memory.buffer);
-  for (let i = 0; i < i8.length; i++) {
+  for (let i = 0; i < i8.length; i = inc(i)) {
     let expected = 0xbe;
     let value = 0x12;
     i8[i] = expected;
@@ -249,7 +253,7 @@
 })();
 
 function TestCmpExchange(func, buffer, params, size) {
-  for (let i = 0; i < buffer.length; i++) {
+  for (let i = 0; i < buffer.length; i = inc(i)) {
     for (let j = 0; j < params.length; j++) {
       for (let k = 0; k < params.length; k++) {
         buffer[i] = params[j];
@@ -291,7 +295,7 @@
 })();
 
 function TestLoad(func, buffer, value, size) {
-  for (let i = 0; i < buffer.length; i++) {
+  for (let i = 0; i < buffer.length; i = inc(i)) {
     buffer[i] = value;
     assertEquals(value, func(i * size) >>> 0);
   }
@@ -323,7 +327,7 @@
 })();
 
 function TestStore(func, buffer, value, size) {
-  for (let i = 0; i < buffer.length; i++) {
+  for (let i = 0; i < buffer.length; i = inc(i)) {
     func(i * size, value)
     assertEquals(value, buffer[i]);
   }
@@ -384,3 +388,30 @@
   assertEquals(20, instance.exports.loadStore());
   assertTraps(kTrapMemOutOfBounds, instance.exports.storeOob);
 })();
+
+(function TestAtomicOpinLoop() {
+  print("TestAtomicOpinLoop");
+  var builder = new WasmModuleBuilder();
+  let memory = new WebAssembly.Memory({
+    initial: 16, maximum: 128, shared: true});
+  builder.addImportedMemory("m", "imported_mem", 16, 128, "shared");
+  builder.addFunction("main", kSig_i_v)
+    .addBody([
+      kExprLoop, kWasmStmt,
+        kExprI32Const, 16,
+        kExprI32Const, 20,
+        kAtomicPrefix,
+        kExprI32AtomicStore, 2, 0,
+        kExprI32Const, 16,
+        kAtomicPrefix,
+        kExprI32AtomicLoad, 2, 0,
+        kExprReturn,
+      kExprEnd,
+      kExprI32Const, 0
+    ])
+    .exportFunc();
+  let module = new WebAssembly.Module(builder.toBuffer());
+  let instance = (new WebAssembly.Instance(module,
+        {m: {imported_mem: memory}}));
+  assertEquals(20, instance.exports.main());
+})();
diff --git a/src/v8/test/mjsunit/wasm/bounds-check-64bit.js b/src/v8/test/mjsunit/wasm/bounds-check-64bit.js
new file mode 100644
index 0000000..8643093
--- /dev/null
+++ b/src/v8/test/mjsunit/wasm/bounds-check-64bit.js
@@ -0,0 +1,33 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+load("test/mjsunit/wasm/wasm-constants.js");
+load("test/mjsunit/wasm/wasm-module-builder.js");
+
+const builder = new WasmModuleBuilder();
+builder.addMemory(1, kV8MaxPages, false);
+builder.addFunction('load', kSig_i_ii)
+    .addBody([
+        kExprGetLocal, 0,
+        kExprI64SConvertI32,
+        kExprGetLocal, 1,
+        kExprI64SConvertI32,
+        kExprI64Shl,
+        kExprI32ConvertI64,
+    kExprI32LoadMem, 0, 0])
+    .exportFunc();
+
+const module = builder.instantiate();
+let start = 12;
+let address = start;
+for (i = 1; i < 64; i++) {
+  // This is the address which will be accessed in the code. We cannot use
+  // shifts to calculate the address because JS shifts work on 32-bit integers.
+  address = (address * 2) % 4294967296;
+  if (address < kPageSize) {
+    assertEquals(0, module.exports.load(start, i));
+  } else {
+    assertTraps(kTrapMemOutOfBounds, _ => { module.exports.load(start, i);});
+  }
+}
diff --git a/src/v8/test/mjsunit/wasm/default-liftoff-setting.js b/src/v8/test/mjsunit/wasm/default-liftoff-setting.js
new file mode 100644
index 0000000..9ae6e92
--- /dev/null
+++ b/src/v8/test/mjsunit/wasm/default-liftoff-setting.js
@@ -0,0 +1,21 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+// This test makes sure that by default, we do not compile with liftoff.
+
+load('test/mjsunit/wasm/wasm-constants.js');
+load('test/mjsunit/wasm/wasm-module-builder.js');
+
+const builder = new WasmModuleBuilder();
+builder.addFunction('i32_add', kSig_i_ii)
+    .addBody([kExprGetLocal, 0, kExprGetLocal, 1, kExprI32Add])
+    .exportFunc();
+
+const instance = builder.instantiate();
+
+assertFalse(
+    %IsLiftoffFunction(instance.exports.i32_add),
+    'liftoff compilation should be off by default');
diff --git a/src/v8/test/mjsunit/wasm/disallow-codegen.js b/src/v8/test/mjsunit/wasm/disallow-codegen.js
new file mode 100644
index 0000000..9ac2bcd
--- /dev/null
+++ b/src/v8/test/mjsunit/wasm/disallow-codegen.js
@@ -0,0 +1,165 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --expose-wasm --allow-natives-syntax
+
+load("test/mjsunit/wasm/wasm-constants.js");
+load("test/mjsunit/wasm/wasm-module-builder.js");
+
+let kReturnValue = 19;
+
+let buffer = (function CreateBuffer() {
+  let builder = new WasmModuleBuilder();
+  builder.addMemory(1, 1, true);
+  builder.addFunction('main', kSig_i_v)
+      .addBody([kExprI32Const, kReturnValue])
+      .exportFunc();
+
+  return builder.toBuffer();
+})();
+
+%DisallowCodegenFromStrings(true);
+%DisallowWasmCodegen(true);
+
+async function SyncTestOk() {
+  print('sync module compile (ok)...');
+  %DisallowCodegenFromStrings(false);
+  %DisallowWasmCodegen(false);
+  let module = new WebAssembly.Module(buffer);
+  assertInstanceof(module, WebAssembly.Module);
+}
+
+async function SyncTestFail() {
+  print('sync module compile (fail)...');
+  %DisallowCodegenFromStrings(true);
+  %DisallowWasmCodegen(false);
+  try {
+    let module = new WebAssembly.Module(buffer);
+    assertUnreachable();
+  } catch (e) {
+    print("  " + e);
+    assertInstanceof(e, WebAssembly.CompileError);
+  }
+}
+
+async function SyncTestWasmFail(disallow_codegen) {
+  print('sync wasm module compile (fail)...');
+  %DisallowCodegenFromStrings(disallow_codegen);
+  %DisallowWasmCodegen(true);
+  try {
+    let module = new WebAssembly.Module(buffer);
+    assertUnreachable();
+  } catch (e) {
+    print("  " + e);
+    assertInstanceof(e, WebAssembly.CompileError);
+  }
+}
+
+async function AsyncTestOk() {
+  print('async module compile (ok)...');
+  %DisallowCodegenFromStrings(false);
+  %DisallowWasmCodegen(false);
+  let promise = WebAssembly.compile(buffer);
+  assertPromiseResult(
+    promise, module => assertInstanceof(module, WebAssembly.Module));
+}
+
+async function AsyncTestFail() {
+  print('async module compile (fail)...');
+  %DisallowCodegenFromStrings(true);
+  %DisallowWasmCodegen(false);
+  try {
+    let m = await WebAssembly.compile(buffer);
+    assertUnreachable();
+  } catch (e) {
+    print("  " + e);
+    assertInstanceof(e, WebAssembly.CompileError);
+  }
+}
+
+async function AsyncTestWasmFail(disallow_codegen) {
+  print('async wasm module compile (fail)...');
+  %DisallowCodegenFromStrings(disallow_codegen);
+  %DisallowWasmCodegen(true);
+  try {
+    let m = await WebAssembly.compile(buffer);
+    assertUnreachable();
+  } catch (e) {
+    print("  " + e);
+    assertInstanceof(e, WebAssembly.CompileError);
+  }
+}
+
+async function StreamingTestOk() {
+  print('streaming module compile (ok)...');
+  // TODO(titzer): compileStreaming must be supplied by embedder.
+  // (and it takes a response, not a buffer)
+  %DisallowCodegenFromStrings(false);
+  %DisallowWasmCodegen(false);
+  if ("Function" != typeof WebAssembly.compileStreaming) {
+    print("  no embedder for streaming compilation");
+    return;
+  }
+  let promise = WebAssembly.compileStreaming(buffer);
+  assertPromiseResult(
+    promise, module => assertInstanceof(module, WebAssembly.Module));
+}
+
+async function StreamingTestFail() {
+  print('streaming module compile (fail)...');
+  %DisallowCodegenFromStrings(true);
+  %DisallowWasmCodegen(false);
+  // TODO(titzer): compileStreaming must be supplied by embedder.
+  // (and it takes a response, not a buffer)
+  if ("Function" != typeof WebAssembly.compileStreaming) {
+    print("  no embedder for streaming compilation");
+    return;
+  }
+  try {
+    let m = await WebAssembly.compileStreaming(buffer);
+    assertUnreachable();
+  } catch (e) {
+    print("  " + e);
+    assertInstanceof(e, WebAssembly.CompileError);
+  }
+}
+
+
+async function StreamingTestWasmFail(disallow_codegen) {
+  print('streaming wasm module compile (fail)...');
+  %DisallowCodegenFromStrings(disallow_codegen);
+  %DisallowWasmCodegen(true);
+  // TODO(titzer): compileStreaming must be supplied by embedder.
+  // (and it takes a response, not a buffer)
+  if ("Function" != typeof WebAssembly.compileStreaming) {
+    print("  no embedder for streaming compilation");
+    return;
+  }
+  try {
+    let m = await WebAssembly.compileStreaming(buffer);
+    assertUnreachable();
+  } catch (e) {
+    print("  " + e);
+    assertInstanceof(e, WebAssembly.CompileError);
+  }
+}
+
+async function RunAll() {
+  await SyncTestOk();
+  await SyncTestFail();
+  await AsyncTestOk();
+  await AsyncTestFail();
+  await StreamingTestOk();
+  await StreamingTestFail();
+
+  disallow_codegen = false;
+  for (count = 0; count < 2; ++count) {
+    SyncTestWasmFail(disallow_codegen);
+    AsyncTestWasmFail(disallow_codegen);
+    StreamingTestWasmFail(disallow_codegen)
+    disallow_codegen = true;
+  }
+}
+
+assertPromiseResult(RunAll());
diff --git a/src/v8/test/mjsunit/wasm/errors.js b/src/v8/test/mjsunit/wasm/errors.js
index 89066d6..a902364 100644
--- a/src/v8/test/mjsunit/wasm/errors.js
+++ b/src/v8/test/mjsunit/wasm/errors.js
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-// Flags: --expose-wasm
+// Flags: --expose-wasm --allow-natives-syntax
 
 'use strict';
 
@@ -170,3 +170,19 @@
     kExprI64Const, 0
   ]).exportFunc().end().toBuffer(), {}, "invalid type");
 })();
+
+
+(function InternalDebugTrace() {
+  var builder = new WasmModuleBuilder();
+  var sig = builder.addType(kSig_i_dd);
+  builder.addImport("mod", "func", sig);
+  builder.addFunction("main", sig)
+    .addBody([kExprGetLocal, 0, kExprGetLocal, 1, kExprCallFunction, 0])
+    .exportAs("main")
+  var main = builder.instantiate({
+    mod: {
+      func: ()=>{%DebugTrace();}
+    }
+  }).exports.main;
+  main();
+})();
diff --git a/src/v8/test/mjsunit/wasm/ffi-error.js b/src/v8/test/mjsunit/wasm/ffi-error.js
index ef7d5ab..e7811d2 100644
--- a/src/v8/test/mjsunit/wasm/ffi-error.js
+++ b/src/v8/test/mjsunit/wasm/ffi-error.js
@@ -7,11 +7,11 @@
 load("test/mjsunit/wasm/wasm-constants.js");
 load("test/mjsunit/wasm/wasm-module-builder.js");
 
-function testCallFFI(ffi) {
+function instantiateWithFFI(ffi) {
   var builder = new WasmModuleBuilder();
 
   var sig_index = kSig_i_dd;
-  builder.addImport("", "fun", sig_index);
+  builder.addImport("mod", "fun", sig_index);
   builder.addFunction("main", sig_index)
     .addBody([
       kExprGetLocal, 0,              // --
@@ -20,45 +20,75 @@
     ])    // --
     .exportFunc();
 
-  var module = builder.instantiate(ffi);
+  return builder.instantiate(ffi);
 }
 
 // everything is good.
 (function() {
-  var ffi = {"": {fun: function(a, b) { print(a, b); }}}
-  testCallFFI(ffi);
+  var ffi = {"mod": {fun: function(a, b) { print(a, b); }}}
+  instantiateWithFFI(ffi);
 })();
 
 
 // FFI object should be an object.
 assertThrows(function() {
   var ffi = 0;
-  testCallFFI(ffi);
+  instantiateWithFFI(ffi);
+});
+
+
+// FFI object should have a "mod" property.
+assertThrows(function() {
+  instantiateWithFFI({});
 });
 
 
 // FFI object should have a "fun" property.
 assertThrows(function() {
-  var ffi = new Object();
-  testCallFFI(ffi);
+  instantiateWithFFI({mod: {}});
 });
 
 
 // "fun" should be a JS function.
 assertThrows(function() {
-  var ffi = new Object();
-  ffi.fun = new Object();
-  testCallFFI(ffi);
+  instantiateWithFFI({mod: {fun: new Object()}});
 });
 
 
 // "fun" should be a JS function.
 assertThrows(function() {
-  var ffi = new Object();
-  ffi.fun = 0;
-  testCallFFI(ffi);
+  instantiateWithFFI({mod: {fun: 0}});
 });
 
+// "fun" should have signature "i_dd"
+assertThrows(function () {
+  var builder = new WasmModuleBuilder();
+
+  var sig_index = kSig_i_dd;
+  builder.addFunction("exp", kSig_i_i)
+    .addBody([
+      kExprGetLocal, 0,
+    ])    // --
+    .exportFunc();
+
+  var exported = builder.instantiate().exports.exp;
+  instantiateWithFFI({mod: {fun: exported}});
+});
+
+// "fun" matches signature "i_dd"
+(function () {
+  var builder = new WasmModuleBuilder();
+
+  builder.addFunction("exp", kSig_i_dd)
+    .addBody([
+      kExprI32Const, 33,
+    ])    // --
+    .exportFunc();
+
+  var exported = builder.instantiate().exports.exp;
+  var instance = instantiateWithFFI({mod: {fun: exported}});
+  assertEquals(33, instance.exports.main());
+})();
 
 (function I64InSignatureThrows() {
   var builder = new WasmModuleBuilder();
diff --git a/src/v8/test/mjsunit/wasm/ffi.js b/src/v8/test/mjsunit/wasm/ffi.js
index 9451c87..67b1ccc 100644
--- a/src/v8/test/mjsunit/wasm/ffi.js
+++ b/src/v8/test/mjsunit/wasm/ffi.js
@@ -385,3 +385,18 @@
   main();
   assertEquals(0, num_valueOf);
 })();
+
+(function ImportWithCustomGetter() {
+  print(arguments.callee.name);
+  const builder = new WasmModuleBuilder();
+  builder.addImport("import", "func", kSig_v_v);
+
+  const ffi = {};
+  Object.defineProperty(ffi, 'import', {
+    get: _ => {
+      return {func: () => null };
+    }
+  });
+
+  builder.instantiate(ffi);
+})();
diff --git a/src/v8/test/mjsunit/wasm/globals.js b/src/v8/test/mjsunit/wasm/globals.js
index afd2dcc..21f73eb 100644
--- a/src/v8/test/mjsunit/wasm/globals.js
+++ b/src/v8/test/mjsunit/wasm/globals.js
@@ -7,6 +7,48 @@
 load("test/mjsunit/wasm/wasm-constants.js");
 load("test/mjsunit/wasm/wasm-module-builder.js");
 
+(function TestMultipleInstances() {
+  print("TestMultipleInstances");
+
+  var builder = new WasmModuleBuilder();
+
+  let g = builder.addGlobal(kWasmI32, true);
+  let sig_index = builder.addType(kSig_i_v);
+  builder.addFunction("get", sig_index)
+    .addBody([
+      kExprGetGlobal, g.index])
+    .exportAs("get");
+  builder.addFunction("set", kSig_v_i)
+    .addBody([
+      kExprGetLocal, 0,
+      kExprSetGlobal, g.index])
+    .exportAs("set");
+
+  let module = new WebAssembly.Module(builder.toBuffer());
+
+  let a = new WebAssembly.Instance(module);
+  let b = new WebAssembly.Instance(module);
+
+  assertEquals(0, a.exports.get());
+  assertEquals(0, b.exports.get());
+
+  a.exports.set(1);
+
+  assertEquals(1, a.exports.get());
+  assertEquals(0, b.exports.get());
+
+  b.exports.set(6);
+
+  assertEquals(1, a.exports.get());
+  assertEquals(6, b.exports.get());
+
+  a.exports.set(7);
+
+  assertEquals(7, a.exports.get());
+  assertEquals(6, b.exports.get());
+
+})();
+
 function TestImported(type, val, expected) {
   print("TestImported " + type + "(" + val +")" + " = " + expected);
   var builder = new WasmModuleBuilder();
@@ -26,6 +68,29 @@
 TestImported(kWasmF64, 77777.88888, 77777.88888);
 
 
+(function TestImportedMultipleInstances() {
+  print("TestImportedMultipleInstances");
+
+  var builder = new WasmModuleBuilder();
+
+  let g = builder.addImportedGlobal("mod", "g", kWasmI32);
+  let sig_index = builder.addType(kSig_i_v);
+  builder.addFunction("main", sig_index)
+    .addBody([
+      kExprGetGlobal, g])
+    .exportAs("main");
+
+  let module = new WebAssembly.Module(builder.toBuffer());
+
+  print("  i 100...");
+  let i100 = new WebAssembly.Instance(module, {mod: {g: 100}});
+  assertEquals(100, i100.exports.main());
+
+  print("  i 300...");
+  let i300 = new WebAssembly.Instance(module, {mod: {g: 300}});
+  assertEquals(300, i300.exports.main());
+})();
+
 function TestExported(type, val, expected) {
   print("TestExported " + type + "(" + val +")" + " = " + expected);
   var builder = new WasmModuleBuilder();
@@ -96,3 +161,54 @@
 TestGlobalIndexSpace(kWasmI32, 123);
 TestGlobalIndexSpace(kWasmF32, 54321.125);
 TestGlobalIndexSpace(kWasmF64, 12345.678);
+
+(function TestAccessesInBranch() {
+  print("TestAccessesInBranches");
+
+  var builder = new WasmModuleBuilder();
+
+  let g = builder.addGlobal(kWasmI32, true);
+  let h = builder.addGlobal(kWasmI32, true);
+  let sig_index = builder.addType(kSig_i_i);
+  builder.addFunction("get", sig_index)
+    .addBody([
+      kExprGetLocal, 0,
+      kExprIf, kWasmI32,
+      kExprGetGlobal, g.index,
+      kExprElse,
+      kExprGetGlobal, h.index,
+      kExprEnd])
+    .exportAs("get");
+  builder.addFunction("set", kSig_v_ii)
+    .addBody([
+      kExprGetLocal, 0,
+      kExprIf, kWasmStmt,
+      kExprGetLocal, 1,
+      kExprSetGlobal, g.index,
+      kExprElse,
+      kExprGetLocal, 1,
+      kExprSetGlobal, h.index,
+      kExprEnd])
+    .exportAs("set");
+
+  let module = new WebAssembly.Module(builder.toBuffer());
+
+  let a = new WebAssembly.Instance(module);
+  let get = a.exports.get;
+  let set = a.exports.set;
+
+  assertEquals(0, get(0));
+  assertEquals(0, get(1));
+  set(0, 1);
+  assertEquals(1, get(0));
+  assertEquals(0, get(1));
+
+  set(0, 7);
+  assertEquals(7, get(0));
+  assertEquals(0, get(1));
+
+  set(1, 9);
+  assertEquals(7, get(0));
+  assertEquals(9, get(1));
+
+})();
diff --git a/src/v8/test/mjsunit/wasm/grow-memory-detaching.js b/src/v8/test/mjsunit/wasm/grow-memory-detaching.js
new file mode 100644
index 0000000..da6516a
--- /dev/null
+++ b/src/v8/test/mjsunit/wasm/grow-memory-detaching.js
@@ -0,0 +1,65 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --expose-wasm
+
+load("test/mjsunit/wasm/wasm-constants.js");
+load("test/mjsunit/wasm/wasm-module-builder.js");
+
+let module = (() => {
+  let builder = new WasmModuleBuilder();
+  builder.addMemory(1, kV8MaxPages, false);
+  builder.addFunction("grow_memory", kSig_i_i)
+              .addBody([kExprGetLocal, 0, kExprGrowMemory, kMemoryZero])
+    .exportFunc();
+  builder.exportMemoryAs("memory");
+  return builder.toModule();
+})();
+
+(function TestDetachingViaAPI() {
+  print("TestDetachingViaAPI...");
+  let memory = new WebAssembly.Memory({initial: 1, maximum: 100});
+  let growMem = (pages) => memory.grow(pages);
+
+  let b1 = memory.buffer;
+  assertEquals(kPageSize, b1.byteLength);
+
+  growMem(0);
+  let b2 = memory.buffer;
+  assertFalse(b1 === b2);
+  assertEquals(0, b1.byteLength);
+  assertEquals(kPageSize, b2.byteLength);
+
+  growMem(1);
+  let b3 = memory.buffer;
+  assertFalse(b1 === b3);
+  assertFalse(b2 === b3);
+  assertEquals(0, b1.byteLength);
+  assertEquals(0, b2.byteLength);
+  assertEquals(2 * kPageSize, b3.byteLength);
+})();
+
+(function TestDetachingViaBytecode() {
+  print("TestDetachingViaBytecode...");
+  let instance = new WebAssembly.Instance(module);
+  let growMem = instance.exports.grow_memory;
+  let memory = instance.exports.memory;
+
+  let b1 = memory.buffer;
+  assertEquals(kPageSize, b1.byteLength);
+
+  growMem(0);
+  let b2 = memory.buffer;
+  assertFalse(b1 === b2);
+  assertEquals(0, b1.byteLength);
+  assertEquals(kPageSize, b2.byteLength);
+
+  growMem(1);
+  let b3 = memory.buffer;
+  assertFalse(b1 === b3);
+  assertFalse(b2 === b3);
+  assertEquals(0, b1.byteLength);
+  assertEquals(0, b2.byteLength);
+  assertEquals(2 * kPageSize, b3.byteLength);
+})();
diff --git a/src/v8/test/mjsunit/wasm/indirect-tables.js b/src/v8/test/mjsunit/wasm/indirect-tables.js
index f158718..88d1bb7 100644
--- a/src/v8/test/mjsunit/wasm/indirect-tables.js
+++ b/src/v8/test/mjsunit/wasm/indirect-tables.js
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-// Flags: --expose-wasm
+// Flags: --expose-wasm --expose-gc
 
 load("test/mjsunit/wasm/wasm-constants.js");
 load("test/mjsunit/wasm/wasm-module-builder.js");
@@ -601,3 +601,145 @@
       () => instance0.exports.main(0), WebAssembly.RuntimeError,
       /signature mismatch/);
 })();
+
+(function IndirectCallIntoOtherInstance() {
+  print("IndirectCallIntoOtherInstance...");
+  var mem_1 = new WebAssembly.Memory({initial: 1});
+  var mem_2 = new WebAssembly.Memory({initial: 1});
+  var view_1 = new Int32Array(mem_1.buffer);
+  var view_2 = new Int32Array(mem_2.buffer);
+  view_1[0] = 1;
+  view_2[0] = 1000;
+
+  let builder = new WasmModuleBuilder();
+  let sig = builder.addType(kSig_i_v);
+  builder.addFunction('main', kSig_i_i)
+    .addBody([kExprGetLocal, 0, kExprCallIndirect, sig, kTableZero])
+    .exportAs('main');
+  builder.addImportedMemory('', 'memory', 1);
+
+  builder.setFunctionTableBounds(1, 1);
+  builder.addExportOfKind('table', kExternalTable);
+
+  let module1 = new WebAssembly.Module(builder.toBuffer());
+  let instance1 = new WebAssembly.Instance(module1, {'':{memory:mem_1}});
+
+  builder = new WasmModuleBuilder();
+  builder.addFunction('main', kSig_i_v).addBody([kExprI32Const, 0, kExprI32LoadMem, 0, 0]);
+  builder.addImportedTable('', 'table');
+  builder.addFunctionTableInit(0, false, [0], true);
+  builder.addImportedMemory('', 'memory', 1);
+
+
+  let module2 = new WebAssembly.Module(builder.toBuffer());
+  let instance2 = new WebAssembly.Instance(module2, {
+    '': {
+      table: instance1.exports.table,
+      memory: mem_2
+    }
+  });
+
+  assertEquals(instance1.exports.main(0), 1000);
+})();
+
+
+(function ImportedFreestandingTable() {
+  print("ImportedFreestandingTable...");
+
+  function forceGc() {
+    gc();
+    gc();
+    gc();
+  }
+
+  function setup() {
+    let builder = new WasmModuleBuilder();
+    let sig = builder.addType(kSig_i_v);
+    builder.addFunction('main', kSig_i_i)
+      .addBody([kExprGetLocal, 0, kExprCallIndirect, sig, kTableZero])
+      .exportAs('main');
+
+    builder.addImportedTable('', 'table');
+
+    let module1 = new WebAssembly.Module(builder.toBuffer());
+    let table = new WebAssembly.Table({initial:2, element:'anyfunc'});
+    let instance1 = new WebAssembly.Instance(module1, {'':{table: table}});
+
+    builder = new WasmModuleBuilder();
+    builder.addExport('theImport', builder.addImport('', 'callout', kSig_i_v));
+    builder.addImportedMemory('', 'memory', 1);
+    builder.addFunction('main', kSig_i_v)
+      .addBody([
+        kExprCallFunction, 0,
+        kExprI32Const, 0, kExprI32LoadMem, 0, 0,
+        kExprI32Add
+      ]).exportAs('main');
+
+    let mem = new WebAssembly.Memory({initial:1});
+    let view = new Int32Array(mem.buffer);
+    view[0] = 4;
+
+    let module2 = new WebAssembly.Module(builder.toBuffer());
+    let instance2 = new WebAssembly.Instance(module2, {
+      '': {
+        callout: () => {
+          forceGc();
+          return 3;
+        },
+        'memory': mem
+      }
+    });
+    table.set(0, instance2.exports.main);
+    table.set(1, instance2.exports.theImport);
+    return instance1;
+  }
+
+  function test(variant, expectation) {
+    var instance = setup();
+    forceGc();
+    assertEquals(expectation, instance.exports.main(variant));
+  }
+
+  // 0 indirectly calls the wasm function that calls the import,
+  // 1 does the same but for the exported import.
+  test(0, 7);
+  test(1, 3);
+})();
+
+
+// Remove this test when v8:7232 is addressed comprehensively.
+(function TablesAreImmutableInWasmCallstacks() {
+  print('TablesAreImmutableInWasmCallstacks...');
+  let table = new WebAssembly.Table({initial:2, element:'anyfunc'});
+
+  let builder = new WasmModuleBuilder();
+  builder.addImport('', 'mutator', kSig_v_v);
+  builder.addFunction('main', kSig_v_v)
+    .addBody([
+      kExprCallFunction, 0
+    ]).exportAs('main');
+
+  let module = new WebAssembly.Module(builder.toBuffer());
+  let instance = new WebAssembly.Instance(module, {
+    '': {
+      'mutator': () => {table.set(0, null);}
+    }
+  });
+
+  table.set(0, instance.exports.main);
+
+  try {
+    instance.exports.main();
+    assertUnreached();
+  } catch (e) {
+    assertTrue(e instanceof RangeError);
+  }
+  try {
+    instance.exports.main();
+    assertUnreached();
+  } catch (e) {
+    assertTrue(e instanceof RangeError);
+  }
+  table.set(0, null);
+  assertEquals(null, table.get(0));
+})();
diff --git a/src/v8/test/mjsunit/wasm/interpreter.js b/src/v8/test/mjsunit/wasm/interpreter.js
index 0f54dc9..f5697eb 100644
--- a/src/v8/test/mjsunit/wasm/interpreter.js
+++ b/src/v8/test/mjsunit/wasm/interpreter.js
@@ -22,6 +22,7 @@
 }
 
 (function testCallImported() {
+  print(arguments.callee.name);
   var stack;
   let func = () => stack = new Error('test imported stack').stack;
 
@@ -47,6 +48,7 @@
 })();
 
 (function testCallImportedWithParameters() {
+  print(arguments.callee.name);
   var stack;
   var passed_args = [];
   let func1 = (i, j) => (passed_args.push(i, j), 2 * i + j);
@@ -80,6 +82,7 @@
 })();
 
 (function testTrap() {
+  print(arguments.callee.name);
   var builder = new WasmModuleBuilder();
   var foo_idx = builder.addFunction('foo', kSig_v_v)
                     .addBody([kExprNop, kExprNop, kExprUnreachable])
@@ -110,6 +113,7 @@
 })();
 
 (function testThrowFromImport() {
+  print(arguments.callee.name);
   function func() {
     throw new Error('thrown from imported function');
   }
@@ -141,6 +145,7 @@
 })();
 
 (function testGlobals() {
+  print(arguments.callee.name);
   var builder = new WasmModuleBuilder();
   builder.addGlobal(kWasmI32, true);  // 0
   builder.addGlobal(kWasmI64, true);  // 1
@@ -190,6 +195,7 @@
 })();
 
 (function testReentrantInterpreter() {
+  print(arguments.callee.name);
   var stacks;
   var instance;
   function func(i) {
@@ -227,6 +233,7 @@
 })();
 
 (function testIndirectImports() {
+  print(arguments.callee.name);
   var builder = new WasmModuleBuilder();
 
   var sig_i_ii = builder.addType(kSig_i_ii);
@@ -260,6 +267,7 @@
 })();
 
 (function testIllegalImports() {
+  print(arguments.callee.name);
   var builder = new WasmModuleBuilder();
 
   var sig_l_v = builder.addType(kSig_l_v);
@@ -311,6 +319,7 @@
 })();
 
 (function testInfiniteRecursion() {
+  print(arguments.callee.name);
   var builder = new WasmModuleBuilder();
 
   var direct = builder.addFunction('main', kSig_v_v)
@@ -331,6 +340,7 @@
 })();
 
 (function testUnwindSingleActivation() {
+  print(arguments.callee.name);
   // Create two activations and unwind just the top one.
   var builder = new WasmModuleBuilder();
 
@@ -367,6 +377,7 @@
 })();
 
 (function testInterpreterGC() {
+  print(arguments.callee.name);
   function run(f) {
     // wrap the creation in a closure so that the only thing returned is
     // the module (i.e. the underlying array buffer of wasm wire bytes dies).
@@ -398,3 +409,87 @@
     run(x => (x - 18));
   }
 })();
+
+(function testImportThrowsOnToNumber() {
+  print(arguments.callee.name);
+  const builder = new WasmModuleBuilder();
+  const imp_idx = builder.addImport('mod', 'func', kSig_i_v);
+  builder.addFunction('main', kSig_i_v)
+      .addBody([kExprCallFunction, imp_idx])
+      .exportFunc();
+  var num_callback_calls = 0;
+  const callback = () => {
+    ++num_callback_calls;
+    return Symbol()
+  };
+  var instance = builder.instantiate({mod: {func: callback}});
+  // Test that this does not mess up internal state by executing it three times.
+  for (var i = 0; i < 3; ++i) {
+    var interpreted_before = %WasmNumInterpretedCalls(instance);
+    assertThrows(
+        () => instance.exports.main(), TypeError,
+        'Cannot convert a Symbol value to a number');
+    assertEquals(interpreted_before + 1, %WasmNumInterpretedCalls(instance));
+    assertEquals(i + 1, num_callback_calls);
+  }
+})();
+
+(function testCallWithMoreReturnsThenParams() {
+  print(arguments.callee.name);
+  const builder1 = new WasmModuleBuilder();
+  builder1.addFunction('exp', kSig_l_v)
+      .addBody([kExprI64Const, 23])
+      .exportFunc();
+  const exp = builder1.instantiate().exports.exp;
+  const builder2 = new WasmModuleBuilder();
+  const imp_idx = builder2.addImport('imp', 'func', kSig_l_v);
+  builder2.addFunction('main', kSig_i_v)
+      .addBody([kExprCallFunction, imp_idx, kExprI32ConvertI64])
+      .exportFunc();
+  const instance = builder2.instantiate({imp: {func: exp}});
+  assertEquals(23, instance.exports.main());
+})();
+
+(function testTableCall() {
+  print(arguments.callee.name);
+  const builder1 = new WasmModuleBuilder();
+  builder1.addFunction('func', kSig_v_v).addBody([]).exportFunc();
+  const instance1 = builder1.instantiate();
+  const table = new WebAssembly.Table({element: 'anyfunc', initial: 2});
+
+  const builder2 = new WasmModuleBuilder()
+  builder2.addImportedTable('m', 'table');
+  const sig = builder2.addType(kSig_v_v);
+  builder2.addFunction('call_func', kSig_v_v)
+      .addBody([kExprI32Const, 0, kExprCallIndirect, sig, kTableZero])
+      .exportFunc();
+  const instance2 = builder2.instantiate({m: {table: table}});
+  table.set(0, instance1.exports.func);
+  instance2.exports.call_func();
+})();
+
+(function testTableCall2() {
+  // See crbug.com/787910.
+  print(arguments.callee.name);
+  const builder1 = new WasmModuleBuilder();
+  builder1.addFunction('exp', kSig_i_i)
+      .addBody([kExprI32Const, 0])
+      .exportFunc();
+  const instance1 = builder1.instantiate();
+  const builder2 = new WasmModuleBuilder();
+  const sig1 = builder2.addType(kSig_i_v);
+  const sig2 = builder2.addType(kSig_i_i);
+  builder2.addFunction('call2', kSig_i_v)
+      .addBody([
+        kExprI32Const, 0, kExprI32Const, 0, kExprCallIndirect, sig2, kTableZero
+      ])
+      .exportAs('call2');
+  builder2.addImportedTable('imp', 'table');
+  const tab = new WebAssembly.Table({
+    element: 'anyfunc',
+    initial: 3,
+  });
+  const instance2 = builder2.instantiate({imp: {table: tab}});
+  tab.set(0, instance1.exports.exp);
+  instance2.exports.call2();
+})();
diff --git a/src/v8/test/mjsunit/wasm/js-api.js b/src/v8/test/mjsunit/wasm/js-api.js
index 352f7ca..f27fa7a 100644
--- a/src/v8/test/mjsunit/wasm/js-api.js
+++ b/src/v8/test/mjsunit/wasm/js-api.js
@@ -16,7 +16,7 @@
 }
 
 function assertEq(val, expected) {
-  assertEquals(expected, val);
+  assertSame(expected, val);
 }
 function assertArrayBuffer(val, expected) {
   assertTrue(val instanceof ArrayBuffer);
@@ -512,13 +512,40 @@
 assertEq(buf.byteLength, 0);
 buf = mem.buffer;
 assertEq(buf.byteLength, kPageSize);
-assertEq(mem.grow(1), 1);
+assertEq(mem.grow(1, 23), 1);
+assertTrue(buf !== mem.buffer);
+assertEq(buf.byteLength, 0);
+buf = mem.buffer;
+assertEq(buf.byteLength, 2 * kPageSize);
+assertEq(mem.grow(), 2);
 assertTrue(buf !== mem.buffer);
 assertEq(buf.byteLength, 0);
 buf = mem.buffer;
 assertEq(buf.byteLength, 2 * kPageSize);
 assertErrorMessage(() => mem.grow(1), Error, /failed to grow memory/);
+assertErrorMessage(() => mem.grow(Infinity), Error, /failed to grow memory/);
+assertErrorMessage(() => mem.grow(-Infinity), Error, /failed to grow memory/);
 assertEq(buf, mem.buffer);
+let throwOnValueOf = {
+  valueOf: function() {
+    throw Error('throwOnValueOf')
+  }
+};
+assertErrorMessage(() => mem.grow(throwOnValueOf), Error, /throwOnValueOf/);
+assertEq(buf, mem.buffer);
+let zero_wrapper = {
+  valueOf: function() {
+    ++this.call_counter;
+    return 0;
+  },
+  call_counter: 0
+};
+assertEq(mem.grow(zero_wrapper), 2);
+assertEq(zero_wrapper.call_counter, 1);
+assertTrue(buf !== mem.buffer);
+assertEq(buf.byteLength, 0);
+buf = mem.buffer;
+assertEq(buf.byteLength, 2 * kPageSize);
 
 let empty_mem = new Memory({initial: 0, maximum: 5});
 let empty_buf = empty_mem.buffer;
@@ -571,8 +598,9 @@
 assertTrue(new Table({initial: 1.5, element: 'anyfunc'}) instanceof Table);
 assertTrue(
     new Table({initial: 1, maximum: 1.5, element: 'anyfunc'}) instanceof Table);
-// TODO:maximum assertTrue(new Table({initial:1, maximum:Math.pow(2,32)-1,
-// element:"anyfunc"}) instanceof Table);
+assertTrue(
+    new Table({initial: 1, maximum: Math.pow(2, 32) - 1, element: 'anyfunc'})
+        instanceof Table);
 
 // 'WebAssembly.Table.prototype' data property
 let tableProtoDesc = Object.getOwnPropertyDescriptor(Table, 'prototype');
@@ -623,15 +651,17 @@
     () => get.call(), TypeError, /called on incompatible undefined/);
 assertErrorMessage(
     () => get.call({}), TypeError, /called on incompatible Object/);
+assertEq(get.call(tbl1), null);
 assertEq(get.call(tbl1, 0), null);
+assertEq(get.call(tbl1, 0, Infinity), null);
 assertEq(get.call(tbl1, 1), null);
 assertEq(get.call(tbl1, 1.5), null);
 assertErrorMessage(() => get.call(tbl1, 2), RangeError, /bad Table get index/);
 assertErrorMessage(
     () => get.call(tbl1, 2.5), RangeError, /bad Table get index/);
 assertErrorMessage(() => get.call(tbl1, -1), RangeError, /bad Table get index/);
-// TODO assertErrorMessage(() => get.call(tbl1, Math.pow(2,33)), RangeError,
-// /bad Table get index/);
+assertErrorMessage(
+    () => get.call(tbl1, Math.pow(2, 33)), RangeError, /bad Table get index/);
 assertErrorMessage(
     () => get.call(tbl1, {valueOf() { throw new Error('hi') }}), Error, 'hi');
 
@@ -651,15 +681,26 @@
 assertErrorMessage(
     () => set.call(tbl1, 0), TypeError, /requires more than 1 argument/);
 assertErrorMessage(
+    () => set.call(tbl1, undefined), TypeError,
+    /requires more than 1 argument/);
+assertErrorMessage(
     () => set.call(tbl1, 2, null), RangeError, /bad Table set index/);
 assertErrorMessage(
     () => set.call(tbl1, -1, null), RangeError, /bad Table set index/);
-// TODO assertErrorMessage(() => set.call(tbl1, Math.pow(2,33), null),
-// RangeError, /bad Table set index/);
+assertErrorMessage(
+    () => set.call(tbl1, Math.pow(2, 33), null), RangeError,
+    /bad Table set index/);
+assertErrorMessage(
+    () => set.call(tbl1, Infinity, null), RangeError, /bad Table set index/);
+assertErrorMessage(
+    () => set.call(tbl1, -Infinity, null), RangeError, /bad Table set index/);
 assertErrorMessage(
     () => set.call(tbl1, 0, undefined), TypeError,
     /can only assign WebAssembly exported functions to Table/);
 assertErrorMessage(
+    () => set.call(tbl1, undefined, undefined), TypeError,
+    /can only assign WebAssembly exported functions to Table/);
+assertErrorMessage(
     () => set.call(tbl1, 0, {}), TypeError,
     /can only assign WebAssembly exported functions to Table/);
 assertErrorMessage(() => set.call(tbl1, 0, function() {
@@ -672,6 +713,7 @@
     'hai');
 assertEq(set.call(tbl1, 0, null), undefined);
 assertEq(set.call(tbl1, 1, null), undefined);
+assertEq(set.call(tbl1, undefined, null), undefined);
 
 // 'WebAssembly.Table.prototype.grow' data property
 let tblGrowDesc = Object.getOwnPropertyDescriptor(tableProto, 'grow');
@@ -693,11 +735,21 @@
     /bad Table grow delta/);
 var tbl = new Table({element: 'anyfunc', initial: 1, maximum: 2});
 assertEq(tbl.length, 1);
+assertErrorMessage(
+    () => tbl.grow(Infinity), RangeError, /failed to grow table/);
+assertErrorMessage(
+    () => tbl.grow(-Infinity), RangeError, /failed to grow table/);
 assertEq(tbl.grow(0), 1);
 assertEq(tbl.length, 1);
-assertEq(tbl.grow(1), 1);
+assertEq(tbl.grow(1, 4), 1);
+assertEq(tbl.length, 2);
+assertEq(tbl.grow(), 2);
 assertEq(tbl.length, 2);
 assertErrorMessage(() => tbl.grow(1), Error, /failed to grow table/);
+assertErrorMessage(
+    () => tbl.grow(Infinity), RangeError, /failed to grow table/);
+assertErrorMessage(
+    () => tbl.grow(-Infinity), RangeError, /failed to grow table/);
 
 // 'WebAssembly.validate' function
 assertErrorMessage(() => WebAssembly.validate(), TypeError);
@@ -841,3 +893,35 @@
 assertInstantiateSuccess(importingModuleBinary.buffer, {'': {f: () => {}}});
 assertInstantiateSuccess(
     memoryImportingModuleBinary, {'': {'my_memory': scratch_memory}});
+
+(function TestSubclassing() {
+  class M extends WebAssembly.Module { }
+  assertThrows(() => new M());
+
+  class I extends WebAssembly.Instance { }
+  assertThrows(() => new I());
+
+  class T extends WebAssembly.Table { }
+  assertThrows(() => new T());
+
+  class Y extends WebAssembly.Memory { }
+  assertThrows(() => new Y());
+})();
+
+(function TestCallWithoutNew() {
+  var bytes = Uint8Array.of(0x0, 0x61, 0x73, 0x6d, 0x1, 0x00, 0x00, 0x00);
+  assertThrows(() => WebAssembly.Module(bytes), TypeError);
+  assertThrows(() => WebAssembly.Instance(new WebAssembly.Module(bytes)),
+               TypeError);
+  assertThrows(() => WebAssembly.Table({size: 10, element: 'anyfunc'}),
+               TypeError);
+  assertThrows(() => WebAssembly.Memory({size: 10}), TypeError);
+})();
+
+(function TestTinyModule() {
+  var bytes = Uint8Array.of(0x0, 0x61, 0x73, 0x6d, 0x1, 0x00, 0x00, 0x00);
+  var module = new WebAssembly.Module(bytes);
+  assertTrue(module instanceof Module);
+  var instance = new WebAssembly.Instance(module);
+  assertTrue(instance instanceof Instance);
+})();
diff --git a/src/v8/test/mjsunit/wasm/lazy-compilation.js b/src/v8/test/mjsunit/wasm/lazy-compilation.js
new file mode 100644
index 0000000..fc41fbd
--- /dev/null
+++ b/src/v8/test/mjsunit/wasm/lazy-compilation.js
@@ -0,0 +1,100 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --wasm-lazy-compilation --allow-natives-syntax
+
+load('test/mjsunit/wasm/wasm-constants.js');
+load('test/mjsunit/wasm/wasm-module-builder.js');
+
+(function importFromOtherInstance() {
+  print(arguments.callee.name);
+  const builder1 = new WasmModuleBuilder();
+  builder1.addFunction('func', kSig_v_v).addBody([]).exportFunc();
+  const instance1 = builder1.instantiate();
+
+  const builder2 = new WasmModuleBuilder();
+  builder2.addImport('mod', 'fn', kSig_v_v);
+  builder2.instantiate({mod: {fn: instance1.exports.func}});
+})();
+
+(function testWasmToWasmWithDifferentMemory() {
+  print(arguments.callee.name);
+  const builder1 = new WasmModuleBuilder();
+  builder1.addMemory(1, 1, true);
+  builder1.addFunction('store', kSig_v_i)
+      .addBody([
+        kExprI32Const, 0,        // i32.const 1
+        kExprGetLocal, 0,        // get_local 0
+        kExprI32StoreMem, 0, 0,  // i32.store offset=0 align=0
+      ])
+      .exportFunc();
+  const instance1 = builder1.instantiate();
+  const mem1 = new Int32Array(instance1.exports.memory.buffer);
+
+  const builder2 = new WasmModuleBuilder();
+  builder2.addMemory(1, 1, true);
+  builder2.addImport('mod', 'store', kSig_v_i);
+  builder2.addFunction('call_store', kSig_v_i)
+      .addBody([kExprGetLocal, 0, kExprCallFunction, 0])
+      .exportFunc();
+  const instance2 = builder2.instantiate({mod: {store: instance1.exports.store}});
+  const mem2 = new Int32Array(instance2.exports.memory.buffer);
+
+  assertEquals(0, mem1[0]);
+  assertEquals(0, mem2[0]);
+  instance2.exports.call_store(3);
+  assertEquals(3, mem1[0]);
+  assertEquals(0, mem2[0]);
+  %FreezeWasmLazyCompilation(instance1);
+  %FreezeWasmLazyCompilation(instance2);
+  instance2.exports.call_store(7);
+  assertEquals(7, mem1[0]);
+})();
+
+(function exportImportedFunction() {
+  print(arguments.callee.name);
+  const builder1 = new WasmModuleBuilder();
+  builder1.addFunction('foo', kSig_v_v).addBody([]).exportAs('foo');
+  const instance1 = builder1.instantiate();
+
+  const builder2 = new WasmModuleBuilder();
+  const imp_idx = builder2.addImport('A', 'foo', kSig_v_v);
+  builder2.addExport('foo', imp_idx);
+  const instance2 = builder2.instantiate({A: instance1.exports});
+
+  instance2.exports.foo();
+  %FreezeWasmLazyCompilation(instance1);
+  %FreezeWasmLazyCompilation(instance2);
+  instance2.exports.foo();
+})();
+
+(function exportImportedFunctionWithDifferentMemory() {
+  print(arguments.callee.name);
+  const builder1 = new WasmModuleBuilder();
+  builder1.addMemory(1, 1, true);
+  builder1.addFunction('store', kSig_v_i)
+      .addBody([
+        kExprI32Const, 0,        // i32.const 1
+        kExprGetLocal, 0,        // get_local 0
+        kExprI32StoreMem, 0, 0,  // i32.store offset=0 align=0
+      ])
+      .exportFunc();
+  const instance1 = builder1.instantiate();
+  const mem1 = new Int32Array(instance1.exports.memory.buffer);
+
+  const builder2 = new WasmModuleBuilder();
+  builder2.addMemory(1, 1, true);
+  const imp_idx = builder2.addImport('A', 'store', kSig_v_i);
+  builder2.addExport('exp_store', imp_idx);
+  const instance2 = builder2.instantiate({A: instance1.exports});
+  const mem2 = new Int32Array(instance2.exports.memory.buffer);
+
+  instance2.exports.exp_store(3);
+  assertEquals(3, mem1[0]);
+  assertEquals(0, mem2[0]);
+  %FreezeWasmLazyCompilation(instance1);
+  %FreezeWasmLazyCompilation(instance2);
+  instance2.exports.exp_store(7);
+  assertEquals(7, mem1[0]);
+})();
diff --git a/src/v8/test/mjsunit/wasm/liftoff.js b/src/v8/test/mjsunit/wasm/liftoff.js
new file mode 100644
index 0000000..b65f83f
--- /dev/null
+++ b/src/v8/test/mjsunit/wasm/liftoff.js
@@ -0,0 +1,36 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax --liftoff --wasm-async-compilation
+
+load('test/mjsunit/wasm/wasm-constants.js');
+load('test/mjsunit/wasm/wasm-module-builder.js');
+
+(function testLiftoffSync() {
+  print(arguments.callee.name);
+  const builder = new WasmModuleBuilder();
+  builder.addFunction('i32_add', kSig_i_ii)
+      .addBody([kExprGetLocal, 0, kExprGetLocal, 1, kExprI32Add])
+      .exportFunc();
+
+  const instance = builder.instantiate();
+
+  assertTrue(%IsLiftoffFunction(instance.exports.i32_add));
+})();
+
+async function testLiftoffAsync() {
+  print(arguments.callee.name);
+  const builder = new WasmModuleBuilder();
+  builder.addFunction('i32_add', kSig_i_ii)
+      .addBody([kExprGetLocal, 0, kExprGetLocal, 1, kExprI32Add])
+      .exportFunc();
+
+  print('Compiling...');
+  const module = await WebAssembly.compile(builder.toBuffer());
+  print('Instantiating...');
+  const instance = new WebAssembly.Instance(module);
+  assertTrue(%IsLiftoffFunction(instance.exports.i32_add));
+}
+
+assertPromiseResult(testLiftoffAsync());
diff --git a/src/v8/test/mjsunit/wasm/many-parameters.js b/src/v8/test/mjsunit/wasm/many-parameters.js
index 03d7e09..a56619a 100644
--- a/src/v8/test/mjsunit/wasm/many-parameters.js
+++ b/src/v8/test/mjsunit/wasm/many-parameters.js
@@ -12,10 +12,13 @@
 function f(values, shift, num_const_params, ...args) {
   assertEquals(
       values.length + num_const_params, args.length, 'number of arguments');
+  const expected = idx =>
+      idx < values.length ? values[(idx + shift) % values.length] : idx;
+  const msg = 'shifted by ' + shift + ': ' +
+      'expected [' + args.map((_, i) => expected(i)).join(', ') + '], got [' +
+      args.join(', ') + ']';
   args.forEach((arg_val, idx) => {
-    const expected =
-        idx < values.length ? values[(idx + shift) % values.length] : idx;
-    assertEquals(expected, arg_val, 'arg #' + idx + ', shifted by ' + shift);
+    assertEquals(expected(idx), arg_val, 'arg #' + idx + ', ' + msg);
   });
 }
 
diff --git a/src/v8/test/mjsunit/wasm/memory-external-call.js b/src/v8/test/mjsunit/wasm/memory-external-call.js
index 0095ba1..2af5888 100644
--- a/src/v8/test/mjsunit/wasm/memory-external-call.js
+++ b/src/v8/test/mjsunit/wasm/memory-external-call.js
@@ -38,6 +38,111 @@
   return builder;
 }
 
+function assertMemoryIndependence(load_a, store_a, load_b, store_b) {
+
+  assertEquals(0, load_a(0));
+  assertEquals(0, load_b(0));
+  assertEquals(0, load_a(4));
+  assertEquals(0, load_b(4));
+
+  store_a(0, 101);
+  assertEquals(101, load_a(0));
+  assertEquals(0,   load_b(0));
+  assertEquals(0, load_a(4));
+  assertEquals(0, load_b(4));
+
+  store_a(4, 102);
+  assertEquals(101, load_a(0));
+  assertEquals(0,   load_b(0));
+  assertEquals(102, load_a(4));
+  assertEquals(0,   load_b(4));
+
+  store_b(0, 103);
+  assertEquals(101, load_a(0));
+  assertEquals(103, load_b(0));
+  assertEquals(102, load_a(4));
+  assertEquals(0,   load_b(4));
+
+  store_b(4, 107);
+  assertEquals(101, load_a(0));
+  assertEquals(103, load_b(0));
+  assertEquals(102, load_a(4));
+  assertEquals(107, load_b(4));
+
+  store_a(0, 0);
+  store_a(4, 0);
+  store_b(0, 0);
+  store_b(4, 0);
+}
+
+// A simple test for memory-independence between modules.
+(function SimpleMemoryIndependenceTest() {
+  print("SimpleMemoryIndependenceTest");
+  let kPages = 1;
+  let builder = new WasmModuleBuilder();
+
+  builder.addMemory(kPages, kPages, true);
+  builder.addFunction("store", kSig_v_ii)
+    .addBody([
+      kExprGetLocal, 0,     // --
+      kExprGetLocal, 1,     // --
+      kExprI32StoreMem, 0, 0, // --
+    ])                      // --
+    .exportFunc();
+  builder.addFunction("load", kSig_i_i)
+    .addBody([
+      kExprGetLocal, 0,     // --
+      kExprI32LoadMem, 0, 0, // --
+    ])                      // --
+    .exportFunc();
+
+  var a = builder.instantiate();
+
+  // The {b} instance forwards all {store} calls to the imported function.
+  builder = new WasmModuleBuilder();
+  builder.addImport("mod", "store", kSig_v_ii);
+  builder.addMemory(kPages, kPages, true);
+  builder.addFunction("store", kSig_v_ii)
+    .addBody([
+      kExprGetLocal, 0,     // --
+      kExprGetLocal, 1,     // --
+      kExprCallFunction, 0, // --
+    ])                      // --
+    .exportFunc();
+  builder.addFunction("load", kSig_i_i)
+    .addBody([
+      kExprGetLocal, 0,     // --
+      kExprI32LoadMem, 0, 0, // --
+    ])                      // --
+    .exportFunc();
+
+  var b = builder.instantiate({mod: {store: a.exports.store}});
+
+  assertEquals(0, a.exports.load(0));
+  assertEquals(0, b.exports.load(0));
+  assertEquals(0, a.exports.load(4));
+  assertEquals(0, b.exports.load(4));
+
+  a.exports.store(0, 101);
+  assertEquals(101, a.exports.load(0));
+  assertEquals(0,   b.exports.load(0));
+  assertEquals(0, a.exports.load(4));
+  assertEquals(0, b.exports.load(4));
+
+  a.exports.store(4, 102);
+  assertEquals(101, a.exports.load(0));
+  assertEquals(0,   b.exports.load(0));
+  assertEquals(102, a.exports.load(4));
+  assertEquals(0,   b.exports.load(4));
+
+  b.exports.store(4, 107);  // should forward to {a}.
+  assertEquals(101, a.exports.load(0));
+  assertEquals(0,   b.exports.load(0));
+  assertEquals(107, a.exports.load(4));
+  assertEquals(0,   b.exports.load(4));
+
+})();
+
 // This test verifies that when a Wasm module without memory invokes a function
 // imported from another module that has memory, the second module reads its own
 // memory and returns the expected value.
@@ -147,3 +252,87 @@
   assertEquals(first_value, first_instance.exports.load(index));
   assertEquals(second_value, second_instance.exports.load(index));
 })();
+
+// A test for memory-independence between modules when calling through
+// imported tables.
+(function CallThroughTableMemoryIndependenceTest() {
+  print("CallThroughTableIndependenceTest");
+  let kTableSize = 2;
+  let kPages = 1;
+  let builder = new WasmModuleBuilder();
+
+  builder.addMemory(kPages, kPages, true);
+  builder.addFunction("store", kSig_v_ii)
+    .addBody([
+      kExprGetLocal, 0,     // --
+      kExprGetLocal, 1,     // --
+      kExprI32StoreMem, 0, 0, // --
+    ])                      // --
+    .exportFunc();
+  builder.addFunction("load", kSig_i_i)
+    .addBody([
+      kExprGetLocal, 0,     // --
+      kExprI32LoadMem, 0, 0, // --
+    ])                      // --
+    .exportFunc();
+
+  {
+    // Create two instances.
+    let module = builder.toModule();
+    var a = new WebAssembly.Instance(module);
+    var b = new WebAssembly.Instance(module);
+    // Check that the memories are initially independent.
+    assertMemoryIndependence(a.exports.load, a.exports.store,
+                             b.exports.load, b.exports.store);
+  }
+
+  let table = new WebAssembly.Table({element: "anyfunc",
+                                     initial: kTableSize,
+                                     maximum: kTableSize});
+
+  table.set(0, a.exports.store);
+  table.set(1, b.exports.store);
+  // Check that calling (from JS) through the table maintains independence.
+  assertMemoryIndependence(a.exports.load, table.get(0),
+                           b.exports.load, table.get(1));
+
+  table.set(1, a.exports.store);
+  table.set(0, b.exports.store);
+  // Check that calling (from JS) through the table maintains independence,
+  // even after reorganizing the table.
+  assertMemoryIndependence(a.exports.load, table.get(1),
+                           b.exports.load, table.get(0));
+
+  // Check that calling (from WASM) through the table maintains independence.
+  builder = new WasmModuleBuilder();
+  builder.addImportedTable("m", "table", kTableSize, kTableSize);
+  var sig_index = builder.addType(kSig_v_ii);
+  builder.addFunction("store", kSig_v_iii)
+    .addBody([
+      kExprGetLocal, 1,
+      kExprGetLocal, 2,
+      kExprGetLocal, 0,
+      kExprCallIndirect, sig_index, kTableZero,
+    ]).exportFunc();
+
+  let c = builder.instantiate({m: {table: table}});
+
+  let a_index = 1;
+  let b_index = 0;
+  let store_a = (index, val) => c.exports.store(a_index, index, val)
+  let store_b = (index, val) => c.exports.store(b_index, index, val);
+
+  assertMemoryIndependence(a.exports.load, store_a,
+                           b.exports.load, store_b);
+
+  // Flip the order in the table and do it again.
+  table.set(0, a.exports.store);
+  table.set(1, b.exports.store);
+
+  a_index = 0;
+  b_index = 1;
+
+  assertMemoryIndependence(a.exports.load, store_a,
+                           b.exports.load, store_b);
+
+})();
diff --git a/src/v8/test/mjsunit/wasm/module-memory.js b/src/v8/test/mjsunit/wasm/module-memory.js
index f5b5981..e9d2bb9 100644
--- a/src/v8/test/mjsunit/wasm/module-memory.js
+++ b/src/v8/test/mjsunit/wasm/module-memory.js
@@ -172,3 +172,26 @@
 }
 
 testOOBThrows();
+
+function testAddressSpaceLimit() {
+  // 1TiB, see wasm-memory.h
+  const kMaxAddressSpace = 1 * 1024 * 1024 * 1024 * 1024;
+  const kAddressSpacePerMemory = 8 * 1024 * 1024 * 1024;
+
+  try {
+    let memories = [];
+    let address_space = 0;
+    while (address_space <= kMaxAddressSpace + 1) {
+      memories.push(new WebAssembly.Memory({initial: 1}));
+      address_space += kAddressSpacePerMemory;
+    }
+  } catch (e) {
+    assertTrue(e instanceof RangeError);
+    return;
+  }
+  failWithMessage("allocated too much memory");
+}
+
+if(%IsWasmTrapHandlerEnabled()) {
+  testAddressSpaceLimit();
+}
diff --git a/src/v8/test/mjsunit/wasm/multi-value.js b/src/v8/test/mjsunit/wasm/multi-value.js
new file mode 100644
index 0000000..d6eff16
--- /dev/null
+++ b/src/v8/test/mjsunit/wasm/multi-value.js
@@ -0,0 +1,322 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --experimental-wasm-mv
+
+load("test/mjsunit/wasm/wasm-constants.js");
+load("test/mjsunit/wasm/wasm-module-builder.js");
+
+(function MultiBlockResultTest() {
+  print("MultiBlockResultTest");
+  let builder = new WasmModuleBuilder();
+  let sig_i_ii = builder.addType(kSig_i_ii);
+  let sig_ii_v = builder.addType(kSig_ii_v);
+
+  builder.addFunction("main", kSig_i_ii)
+    .addBody([
+      kExprBlock, sig_ii_v,
+      kExprGetLocal, 0,
+      kExprGetLocal, 1,
+      kExprEnd,
+      kExprI32Add])
+    .exportAs("main");
+
+  let module = new WebAssembly.Module(builder.toBuffer());
+  let instance = new WebAssembly.Instance(module);
+  assertEquals(instance.exports.main(1, 4), 5);
+})();
+
+(function MultiBlockParamTest() {
+  print("MultiBlockParamTest");
+  let builder = new WasmModuleBuilder();
+  let sig_i_ii = builder.addType(kSig_i_ii);
+
+  builder.addFunction("main", kSig_i_ii)
+    .addBody([
+      kExprGetLocal, 0,
+      kExprGetLocal, 1,
+      kExprBlock, sig_i_ii,
+      kExprI32Add,
+      kExprEnd])
+    .exportAs("main");
+
+  let module = new WebAssembly.Module(builder.toBuffer());
+  let instance = new WebAssembly.Instance(module);
+  assertEquals(instance.exports.main(1, 4), 5);
+})();
+
+(function MultiBlockBrTest() {
+  print("MultiBlockBrTest");
+  let builder = new WasmModuleBuilder();
+  let sig_i_ii = builder.addType(kSig_i_ii);
+  let sig_ii_v = builder.addType(kSig_ii_v);
+
+  builder.addFunction("main", kSig_i_ii)
+    .addBody([
+      kExprBlock, sig_ii_v,
+      kExprGetLocal, 0,
+      kExprGetLocal, 1,
+      kExprBr, 0,
+      kExprEnd,
+      kExprI32Add])
+    .exportAs("main");
+
+  let module = new WebAssembly.Module(builder.toBuffer());
+  let instance = new WebAssembly.Instance(module);
+  assertEquals(instance.exports.main(1, 4), 5);
+})();
+
+
+(function MultiLoopResultTest() {
+  print("MultiLoopResultTest");
+  let builder = new WasmModuleBuilder();
+  let sig_i_ii = builder.addType(kSig_i_ii);
+  let sig_ii_v = builder.addType(kSig_ii_v);
+
+  builder.addFunction("main", kSig_i_ii)
+    .addBody([
+      kExprLoop, sig_ii_v,
+      kExprGetLocal, 0,
+      kExprGetLocal, 1,
+      kExprEnd,
+      kExprI32Add])
+    .exportAs("main");
+
+  let module = new WebAssembly.Module(builder.toBuffer());
+  let instance = new WebAssembly.Instance(module);
+  assertEquals(instance.exports.main(1, 4), 5);
+})();
+
+(function MultiLoopParamTest() {
+  print("MultiLoopParamTest");
+  let builder = new WasmModuleBuilder();
+  let sig_i_ii = builder.addType(kSig_i_ii);
+
+  builder.addFunction("main", kSig_i_ii)
+    .addBody([
+      kExprGetLocal, 0,
+      kExprGetLocal, 1,
+      kExprLoop, sig_i_ii,
+      kExprI32Add,
+      kExprEnd])
+    .exportAs("main");
+
+  let module = new WebAssembly.Module(builder.toBuffer());
+  let instance = new WebAssembly.Instance(module);
+  assertEquals(instance.exports.main(1, 4), 5);
+})();
+
+(function MultiLoopBrTest() {
+  print("MultiLoopBrTest");
+  let builder = new WasmModuleBuilder();
+  let sig_i_ii = builder.addType(kSig_i_ii);
+  let sig_ii_i = builder.addType(kSig_ii_i);
+  let sig_ii_ii = builder.addType(kSig_ii_ii);
+
+  builder.addFunction("dup", kSig_ii_i)
+    .addBody([kExprGetLocal, 0, kExprGetLocal, 0]);
+  builder.addFunction("swap", kSig_ii_ii)
+    .addBody([kExprGetLocal, 1, kExprGetLocal, 0]);
+  builder.addFunction("main", kSig_i_ii)
+    .addBody([
+      kExprGetLocal, 0,
+      kExprGetLocal, 1,
+      kExprLoop, sig_ii_ii,
+      kExprCallFunction, 1,  // swap
+      kExprCallFunction, 0,  // dup
+      kExprI32Add,
+      kExprCallFunction, 0,  // dup
+      kExprI32Const, 20,
+      kExprI32LeU,
+      kExprBrIf, 0,
+      kExprEnd,
+      kExprDrop])
+    .exportAs("main");
+
+  let module = new WebAssembly.Module(builder.toBuffer());
+  let instance = new WebAssembly.Instance(module);
+  assertEquals(0, instance.exports.main(0, 1));
+  assertEquals(16, instance.exports.main(1, 1));
+  assertEquals(4, instance.exports.main(3, 1));
+  assertEquals(4, instance.exports.main(4, 1));
+  assertEquals(0, instance.exports.main(0, 2));
+  assertEquals(16, instance.exports.main(1, 2));
+  assertEquals(8, instance.exports.main(3, 2));
+  assertEquals(8, instance.exports.main(4, 2));
+  assertEquals(0, instance.exports.main(0, 3));
+  assertEquals(8, instance.exports.main(1, 3));
+  assertEquals(12, instance.exports.main(3, 3));
+  assertEquals(12, instance.exports.main(4, 3));
+  assertEquals(0, instance.exports.main(0, 4));
+  assertEquals(8, instance.exports.main(1, 4));
+  assertEquals(16, instance.exports.main(3, 4));
+  assertEquals(16, instance.exports.main(4, 4));
+  assertEquals(3, instance.exports.main(100, 3));
+  assertEquals(6, instance.exports.main(3, 100));
+})();
+
+
+(function MultiIfResultTest() {
+  print("MultiIfResultTest");
+  let builder = new WasmModuleBuilder();
+  let sig_i_ii = builder.addType(kSig_i_ii);
+  let sig_ii_v = builder.addType(kSig_ii_v);
+
+  builder.addFunction("main", kSig_i_ii)
+    .addBody([
+      kExprGetLocal, 0,
+      kExprIf, sig_ii_v,
+      kExprGetLocal, 0,
+      kExprGetLocal, 1,
+      kExprElse,
+      kExprGetLocal, 1,
+      kExprGetLocal, 0,
+      kExprEnd,
+      kExprI32Sub])
+    .exportAs("main");
+
+  let module = new WebAssembly.Module(builder.toBuffer());
+  let instance = new WebAssembly.Instance(module);
+  assertEquals(instance.exports.main(8, 3), 5);
+  assertEquals(instance.exports.main(0, 3), 3);
+})();
+
+(function MultiIfParamTest() {
+  print("MultiIfParamTest");
+  let builder = new WasmModuleBuilder();
+  let sig_i_ii = builder.addType(kSig_i_ii);
+
+  builder.addFunction("main", kSig_i_ii)
+    .addBody([
+      kExprGetLocal, 0,
+      kExprGetLocal, 1,
+      kExprGetLocal, 0,
+      kExprIf, sig_i_ii,
+      kExprI32Add,
+      kExprElse,
+      kExprI32Sub,
+      kExprEnd])
+    .exportAs("main");
+
+  let module = new WebAssembly.Module(builder.toBuffer());
+  let instance = new WebAssembly.Instance(module);
+  assertEquals(instance.exports.main(1, 4), 5);
+  assertEquals(instance.exports.main(0, 4), -4);
+})();
+
+(function MultiIfBrTest() {
+  print("MultiIfBrTest");
+  let builder = new WasmModuleBuilder();
+  let sig_i_ii = builder.addType(kSig_i_ii);
+  let sig_ii_v = builder.addType(kSig_ii_v);
+
+  builder.addFunction("main", kSig_i_ii)
+    .addBody([
+      kExprGetLocal, 0,
+      kExprIf, sig_ii_v,
+      kExprGetLocal, 0,
+      kExprGetLocal, 1,
+      kExprBr, 0,
+      kExprElse,
+      kExprGetLocal, 1,
+      kExprGetLocal, 0,
+      kExprBr, 0,
+      kExprEnd,
+      kExprI32Sub])
+    .exportAs("main");
+
+  let module = new WebAssembly.Module(builder.toBuffer());
+  let instance = new WebAssembly.Instance(module);
+  assertEquals(instance.exports.main(8, 3), 5);
+  assertEquals(instance.exports.main(0, 3), 3);
+})();
+
+(function MultiResultTest() {
+  print("MultiResultTest");
+  let builder = new WasmModuleBuilder();
+  let sig_i_ii = builder.addType(kSig_i_ii);
+  let sig_iii_ii = builder.addType(kSig_iii_ii);
+
+  builder.addFunction("callee", kSig_iii_ii)
+    .addBody([
+      kExprGetLocal, 0,
+      kExprGetLocal, 1,
+      kExprGetLocal, 0,
+      kExprGetLocal, 1,
+      kExprI32Sub]);
+  builder.addFunction("main", kSig_i_ii)
+    .addBody([
+      kExprGetLocal, 0,
+      kExprGetLocal, 1,
+      kExprCallFunction, 0,
+      kExprI32Mul,
+      kExprI32Add])
+    .exportAs("main");
+
+  let module = new WebAssembly.Module(builder.toBuffer());
+  let instance = new WebAssembly.Instance(module);
+  assertEquals(instance.exports.main(0, 0), 0);
+  assertEquals(instance.exports.main(1, 0), 1);
+  assertEquals(instance.exports.main(2, 0), 2);
+  assertEquals(instance.exports.main(0, 1), -1);
+  assertEquals(instance.exports.main(0, 2), -4);
+  assertEquals(instance.exports.main(3, 4), -1);
+  assertEquals(instance.exports.main(4, 3), 7);
+})();
+
+(function MultiReturnTest() {
+  print("MultiReturnTest");
+  let builder = new WasmModuleBuilder();
+  let sig_i_i = builder.addType(kSig_i_i);
+  let sig_ii_i = builder.addType(kSig_ii_i);
+
+  builder.addFunction("callee", kSig_ii_i)
+    .addBody([
+      kExprGetLocal, 0,
+      kExprGetLocal, 0,
+      kExprGetLocal, 0,
+      kExprI32Add,
+      kExprReturn]);
+  builder.addFunction("main", kSig_i_i)
+    .addBody([
+      kExprGetLocal, 0,
+      kExprCallFunction, 0,
+      kExprI32Mul])
+    .exportAs("main");
+
+  let module = new WebAssembly.Module(builder.toBuffer());
+  let instance = new WebAssembly.Instance(module);
+  assertEquals(instance.exports.main(0), 0);
+  assertEquals(instance.exports.main(1), 2);
+  assertEquals(instance.exports.main(2), 8);
+  assertEquals(instance.exports.main(10), 200);
+})();
+
+(function MultiBrReturnTest() {
+  print("MultiBrReturnTest");
+  let builder = new WasmModuleBuilder();
+  let sig_i_i = builder.addType(kSig_i_i);
+  let sig_ii_i = builder.addType(kSig_ii_i);
+
+  builder.addFunction("callee", kSig_ii_i)
+    .addBody([
+      kExprGetLocal, 0,
+      kExprGetLocal, 0,
+      kExprGetLocal, 0,
+      kExprI32Add,
+      kExprBr, 0]);
+  builder.addFunction("main", kSig_i_i)
+    .addBody([
+      kExprGetLocal, 0,
+      kExprCallFunction, 0,
+      kExprI32Mul])
+    .exportAs("main");
+
+  let module = new WebAssembly.Module(builder.toBuffer());
+  let instance = new WebAssembly.Instance(module);
+  assertEquals(instance.exports.main(0), 0);
+  assertEquals(instance.exports.main(1), 2);
+  assertEquals(instance.exports.main(2), 8);
+  assertEquals(instance.exports.main(10), 200);
+})();
diff --git a/src/v8/test/mjsunit/wasm/shared-memory.js b/src/v8/test/mjsunit/wasm/shared-memory.js
index fa51a83..bbe89a3 100644
--- a/src/v8/test/mjsunit/wasm/shared-memory.js
+++ b/src/v8/test/mjsunit/wasm/shared-memory.js
@@ -7,20 +7,23 @@
 load("test/mjsunit/wasm/wasm-constants.js");
 load("test/mjsunit/wasm/wasm-module-builder.js");
 
-function assertMemoryIsValid(memory) {
+function assertMemoryIsValid(memory, shared) {
   assertSame(WebAssembly.Memory.prototype, memory.__proto__);
   assertSame(WebAssembly.Memory, memory.constructor);
   assertTrue(memory instanceof Object);
   assertTrue(memory instanceof WebAssembly.Memory);
+  if (shared) {
+    assertTrue(memory.buffer instanceof SharedArrayBuffer);
+    // Assert that the buffer is frozen when memory is shared.
+    assertTrue(Object.isFrozen(memory.buffer));
+  }
 }
 
 (function TestConstructorWithShared() {
   print("TestConstructorWithShared");
   let memory = new WebAssembly.Memory({
     initial: 0, maximum: 10, shared: true});
-  assertMemoryIsValid(memory);
-  // Assert that the buffer is frozen when memory is shared.
-  assertTrue(Object.isFrozen(memory.buffer));
+  assertMemoryIsValid(memory, true);
 })();
 
 (function TestConstructorWithUndefinedShared() {
@@ -36,7 +39,7 @@
   // For numeric values, shared = true.
   let memory = new WebAssembly.Memory({
     initial: 0, maximum: 10, shared: 2098665});
-  assertMemoryIsValid(memory);
+  assertMemoryIsValid(memory, true);
 })();
 
 (function TestConstructorWithEmptyStringShared() {
@@ -101,3 +104,29 @@
   assertThrows(() => new WebAssembly.Instance(module,
          {m: {imported_mem: memory}}), WebAssembly.LinkError);
 })();
+
+(function TestInstantiateWithSharedDefined() {
+  print("TestInstantiateWithSharedDefined");
+  let builder = new WasmModuleBuilder();
+  builder.addMemory(2, 10, true, "shared");
+  let module = new WebAssembly.Module(builder.toBuffer());
+  let instance = new WebAssembly.Instance(module);
+  assertMemoryIsValid(instance.exports.memory, true);
+})();
+
+(function TestAtomicOpWithSharedMemoryDefined() {
+  print("TestAtomicOpWithSharedMemoryDefined");
+  let builder = new WasmModuleBuilder();
+  builder.addMemory(2, 10, false, "shared");
+  builder.addFunction("main", kSig_i_ii)
+    .addBody([
+      kExprGetLocal, 0,
+      kExprGetLocal, 1,
+      kAtomicPrefix,
+      kExprI32AtomicAdd, 2, 0])
+    .exportFunc();
+  let module = new WebAssembly.Module(builder.toBuffer());
+  let instance = new WebAssembly.Instance(module);
+  assertEquals(0, instance.exports.main(0, 0x11111111));
+  assertEquals(0x11111111, instance.exports.main(0, 0x11111111));
+})();
diff --git a/src/v8/test/mjsunit/wasm/table-grow.js b/src/v8/test/mjsunit/wasm/table-grow.js
index ab998e9..a9a4ba2 100644
--- a/src/v8/test/mjsunit/wasm/table-grow.js
+++ b/src/v8/test/mjsunit/wasm/table-grow.js
@@ -64,7 +64,7 @@
   print("TableGrowBoundsCheck");
   let builder = new WasmModuleBuilder();
   addMain(builder);
-  let module = WebAssembly.Module(builder.toBuffer());
+  let module = new WebAssembly.Module(builder.toBuffer());
   let table = new WebAssembly.Table({element: "anyfunc",
                                      initial: 1, maximum:kMaxTableSize});
   function fillTable() {
@@ -95,7 +95,7 @@
   print("TableGrowBoundsZeroInitial");
   let builder = new WasmModuleBuilder();
   addMain(builder);
-  let module = WebAssembly.Module(builder.toBuffer());
+  let module = new WebAssembly.Module(builder.toBuffer());
   var table = new WebAssembly.Table({element: "anyfunc",
                                      initial: 0, maximum:kMaxTableSize});
   function growTableByOne() {
diff --git a/src/v8/test/mjsunit/wasm/test-import-export-wrapper.js b/src/v8/test/mjsunit/wasm/test-import-export-wrapper.js
index e16a7af..e298468 100644
--- a/src/v8/test/mjsunit/wasm/test-import-export-wrapper.js
+++ b/src/v8/test/mjsunit/wasm/test-import-export-wrapper.js
@@ -299,3 +299,28 @@
     assertEquals(the_export(2, -2), 0);
     assertEquals(%CheckWasmWrapperElision(the_export, expect_no_elison), true);
 });
+
+
+(function TestSimpleI64Ret() {
+  var builder = new WasmModuleBuilder();
+  builder.addFunction("exp", kSig_l_v)
+    .addBody([
+      kExprI64Const, 23
+    ])
+    .exportFunc();
+  var exported = builder.instantiate().exports.exp;
+
+  var builder = new WasmModuleBuilder();
+  builder.addImport("imp", "func", kSig_l_v);
+  builder.addFunction("main", kSig_i_v)
+    .addBody([
+      kExprCallFunction, 0,
+      kExprI32ConvertI64
+    ])
+    .exportFunc();
+
+  var instance = builder.instantiate({imp: {func: exported}});
+
+  assertEquals(23, instance.exports.main());
+
+})();
diff --git a/src/v8/test/mjsunit/wasm/test-wasm-module-builder.js b/src/v8/test/mjsunit/wasm/test-wasm-module-builder.js
index abe003e..02f28ff 100644
--- a/src/v8/test/mjsunit/wasm/test-wasm-module-builder.js
+++ b/src/v8/test/mjsunit/wasm/test-wasm-module-builder.js
@@ -10,7 +10,7 @@
 var debug = true;
 
 function instantiate(buffer, ffi) {
-  return new WebAssembly.Instance(WebAssembly.Module(buffer), ffi);
+  return new WebAssembly.Instance(new WebAssembly.Module(buffer), ffi);
 }
 
 (function BasicTest() {
diff --git a/src/v8/test/mjsunit/wasm/trap-location.js b/src/v8/test/mjsunit/wasm/trap-location.js
index 0c646c9..c4a0f4d 100644
--- a/src/v8/test/mjsunit/wasm/trap-location.js
+++ b/src/v8/test/mjsunit/wasm/trap-location.js
@@ -86,7 +86,7 @@
 
 // Test async compilation and instantiation.
 assertPromiseResult(WebAssembly.instantiate(buffer), pair => {
-  testTrapLocations(pair.instance, 6);
+  testTrapLocations(pair.instance, 5);
 });
 
 // Test sync compilation and instantiation.
diff --git a/src/v8/test/mjsunit/wasm/user-properties-common.js b/src/v8/test/mjsunit/wasm/user-properties-common.js
new file mode 100644
index 0000000..ab6b2bc
--- /dev/null
+++ b/src/v8/test/mjsunit/wasm/user-properties-common.js
@@ -0,0 +1,52 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --expose-wasm --expose-gc --verify-heap
+
+load("test/mjsunit/wasm/wasm-constants.js");
+load("test/mjsunit/wasm/wasm-module-builder.js");
+
+const verifyHeap = gc;
+let globalCounter = 10000000;
+
+function testProperties(obj) {
+  for (let i = 0; i < 3; i++) {
+    obj.x = 1001;
+    assertEquals(1001, obj.x);
+
+    obj.y = "old";
+    assertEquals("old", obj.y);
+
+    delete obj.y;
+    assertEquals("undefined", typeof obj.y);
+
+    let uid = globalCounter++;
+    let fresh = "f_" + uid;
+
+    obj.z = fresh;
+    assertEquals(fresh, obj.z);
+
+    obj[fresh] = uid;
+    assertEquals(uid, obj[fresh]);
+
+    verifyHeap();
+
+    assertEquals(1001, obj.x);
+    assertEquals(fresh, obj.z);
+    assertEquals(uid, obj[fresh]);
+  }
+
+  // These properties are special for JSFunctions.
+  Object.defineProperty(obj, 'name', {value: "crazy"});
+  Object.defineProperty(obj, 'length', {value: 999});
+}
+
+function minus18(x) { return x - 18; }
+function id(x) { return x; }
+
+function printName(when, f) {
+  print("    " + when + ": name=" + f.name + ", length=" + f.length);
+}
+
+// Note that this test is a helper with common code for user-properties-*.js.
diff --git a/src/v8/test/mjsunit/wasm/user-properties-constructed.js b/src/v8/test/mjsunit/wasm/user-properties-constructed.js
new file mode 100644
index 0000000..77e7865
--- /dev/null
+++ b/src/v8/test/mjsunit/wasm/user-properties-constructed.js
@@ -0,0 +1,26 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --expose-wasm --expose-gc --verify-heap
+
+load("test/mjsunit/wasm/user-properties-common.js");
+
+(function ConstructedTest() {
+  print("ConstructedTest");
+
+  var memory = undefined, table = undefined;
+  for (let i = 0; i < 4; i++) {
+    print("  iteration " + i);
+
+    let m = new WebAssembly.Memory({initial: 1});
+    let t = new WebAssembly.Table({element: "anyfunc", initial: 1});
+    m.old = memory;
+    t.old = table;
+
+    memory = m;
+    table = t;
+    testProperties(memory);
+    testProperties(table);
+  }
+})();
diff --git a/src/v8/test/mjsunit/wasm/user-properties-exported.js b/src/v8/test/mjsunit/wasm/user-properties-exported.js
new file mode 100644
index 0000000..80f2077
--- /dev/null
+++ b/src/v8/test/mjsunit/wasm/user-properties-exported.js
@@ -0,0 +1,34 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --expose-wasm --expose-gc --verify-heap
+
+load("test/mjsunit/wasm/user-properties-common.js");
+
+(function ExportedFunctionTest() {
+  print("ExportedFunctionTest");
+
+  print("  instance 1, exporting");
+  var builder = new WasmModuleBuilder();
+  builder.addFunction("exp", kSig_i_i)
+    .addBody([
+      kExprGetLocal, 0,
+      kExprCallFunction, 0])
+    .exportAs("exp");
+  let module1 = builder.toModule();
+  let instance1 = new WebAssembly.Instance(module1);
+  let g = instance1.exports.exp;
+
+  testProperties(g);
+
+  // The WASM-internal fields of {g} are only inspected when {g} is
+  // used as an import into another instance.
+  print("  instance 2, importing");
+  var builder = new WasmModuleBuilder();
+  builder.addImport("imp", "func", kSig_i_i);
+  let module2 = builder.toModule();
+  let instance2 = new WebAssembly.Instance(module2, {imp: {func: g}});
+
+  testProperties(g);
+})();
diff --git a/src/v8/test/mjsunit/wasm/user-properties-module.js b/src/v8/test/mjsunit/wasm/user-properties-module.js
new file mode 100644
index 0000000..69a1f89
--- /dev/null
+++ b/src/v8/test/mjsunit/wasm/user-properties-module.js
@@ -0,0 +1,54 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --expose-wasm --expose-gc --verify-heap
+
+load("test/mjsunit/wasm/user-properties-common.js");
+
+(function ModuleTest() {
+  for (f of [x => (x + 19 + globalCounter), minus18]) {
+    print("ModuleTest");
+
+    let builder = new WasmModuleBuilder();
+    builder.addImport("m", "f", kSig_i_i);
+    builder.addFunction("main", kSig_i_i)
+      .addBody([
+        kExprGetLocal, 0,
+        kExprCallFunction, 0])
+      .exportAs("main");
+    builder.addMemory(1, 1, false)
+      .exportMemoryAs("memory")
+
+    let module = builder.toModule();
+    testProperties(module);
+
+    for (let i = 0; i < 3; i++) {
+      print("  instance " + i);
+      let instance = new WebAssembly.Instance(module, {m: {f: f}});
+      testProperties(instance);
+
+      print("  memory   " + i);
+      let m = instance.exports.memory;
+      assertInstanceof(m, WebAssembly.Memory);
+      testProperties(m);
+
+      print("  function " + i);
+      let g = instance.exports.main;
+      assertInstanceof(g, Function);
+      printName("before", g);
+      testProperties(g);
+      printName(" after", g);
+      assertInstanceof(g, Function);
+      testProperties(g);
+      for (let j = 10; j < 15; j++) {
+        assertEquals(f(j), g(j));
+      }
+      verifyHeap();
+      // The WASM-internal fields of {g} are only inspected when {g} is
+      // used as an import into another instance. Use {g} as the import
+      // the next time through the loop.
+      f = g;
+    }
+  }
+})();
diff --git a/src/v8/test/mjsunit/wasm/user-properties-reexport.js b/src/v8/test/mjsunit/wasm/user-properties-reexport.js
new file mode 100644
index 0000000..e4f155d
--- /dev/null
+++ b/src/v8/test/mjsunit/wasm/user-properties-reexport.js
@@ -0,0 +1,31 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --expose-wasm --expose-gc --verify-heap
+
+load("test/mjsunit/wasm/user-properties-common.js");
+
+(function ImportReexportChain() {
+  print("ImportReexportChain");
+
+  var f = id;
+
+  for (let i = 0; i < 5; i++) {
+    let builder = new WasmModuleBuilder();
+    builder.addImport("imp", "func", kSig_i_i);
+    builder.addExport("exp", 0);
+    let module = builder.toModule();
+    let instance = new WebAssembly.Instance(module, {imp: {func: f}});
+    let g = instance.exports.exp;
+    assertInstanceof(g, Function);
+    printName("before", g);
+    testProperties(g);
+    printName(" after", g);
+
+    // The WASM-internal fields of {g} are only inspected when {g} is
+    // used as an import into another instance. Use {g} as the import
+    // the next time through the loop.
+    f = g;
+  }
+})();
diff --git a/src/v8/test/mjsunit/wasm/user-properties.js b/src/v8/test/mjsunit/wasm/user-properties.js
deleted file mode 100644
index facc58c..0000000
--- a/src/v8/test/mjsunit/wasm/user-properties.js
+++ /dev/null
@@ -1,169 +0,0 @@
-// Copyright 2017 the V8 project authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// Flags: --expose-wasm --expose-gc --verify-heap
-
-load("test/mjsunit/wasm/wasm-constants.js");
-load("test/mjsunit/wasm/wasm-module-builder.js");
-
-const verifyHeap = gc;
-let globalCounter = 10000000;
-
-function testProperties(obj) {
-  for (let i = 0; i < 3; i++) {
-    obj.x = 1001;
-    assertEquals(1001, obj.x);
-
-    obj.y = "old";
-    assertEquals("old", obj.y);
-
-    delete obj.y;
-    assertEquals("undefined", typeof obj.y);
-
-    let uid = globalCounter++;
-    let fresh = "f_" + uid;
-
-    obj.z = fresh;
-    assertEquals(fresh, obj.z);
-
-    obj[fresh] = uid;
-    assertEquals(uid, obj[fresh]);
-
-    verifyHeap();
-
-    assertEquals(1001, obj.x);
-    assertEquals(fresh, obj.z);
-    assertEquals(uid, obj[fresh]);
-  }
-
-  // These properties are special for JSFunctions.
-  Object.defineProperty(obj, 'name', {value: "crazy"});
-  Object.defineProperty(obj, 'length', {value: 999});
-}
-
-function minus18(x) { return x - 18; }
-function id(x) { return x; }
-
-function printName(when, f) {
-  print("    " + when + ": name=" + f.name + ", length=" + f.length);
-}
-
-(function ExportedFunctionTest() {
-  print("ExportedFunctionTest");
-
-  print("  instance 1, exporting");
-  var builder = new WasmModuleBuilder();
-  builder.addFunction("exp", kSig_i_i)
-    .addBody([
-      kExprGetLocal, 0,
-      kExprCallFunction, 0])
-    .exportAs("exp");
-  let module1 = builder.toModule();
-  let instance1 = new WebAssembly.Instance(module1);
-  let g = instance1.exports.exp;
-
-  testProperties(g);
-
-  // The WASM-internal fields of {g} are only inspected when {g} is
-  // used as an import into another instance.
-  print("  instance 2, importing");
-  var builder = new WasmModuleBuilder();
-  builder.addImport("imp", "func", kSig_i_i);
-  let module2 = builder.toModule();
-  let instance2 = new WebAssembly.Instance(module2, {imp: {func: g}});
-
-  testProperties(g);
-})();
-
-(function ImportReexportChain() {
-  print("ImportReexportChain");
-
-  var f = id;
-
-  for (let i = 0; i < 5; i++) {
-    let builder = new WasmModuleBuilder();
-    builder.addImport("imp", "func", kSig_i_i);
-    builder.addExport("exp", 0);
-    let module = builder.toModule();
-    let instance = new WebAssembly.Instance(module, {imp: {func: f}});
-    let g = instance.exports.exp;
-    assertInstanceof(g, Function);
-    printName("before", g);
-    testProperties(g);
-    printName(" after", g);
-
-    // The WASM-internal fields of {g} are only inspected when {g} is
-    // used as an import into another instance. Use {g} as the import
-    // the next time through the loop.
-    f = g;
-  }
-})();
-
-
-(function ModuleTest() {
-  for (f of [x => (x + 19 + globalCounter), minus18]) {
-    print("ModuleTest");
-
-    let builder = new WasmModuleBuilder();
-    builder.addImport("m", "f", kSig_i_i);
-    builder.addFunction("main", kSig_i_i)
-      .addBody([
-        kExprGetLocal, 0,
-        kExprCallFunction, 0])
-      .exportAs("main");
-    builder.addMemory(1, 1, false)
-      .exportMemoryAs("memory")
-
-    let module = builder.toModule();
-    testProperties(module);
-
-    for (let i = 0; i < 3; i++) {
-      print("  instance " + i);
-      let instance = new WebAssembly.Instance(module, {m: {f: f}});
-      testProperties(instance);
-
-      print("  memory   " + i);
-      let m = instance.exports.memory;
-      assertInstanceof(m, WebAssembly.Memory);
-      testProperties(m);
-
-      print("  function " + i);
-      let g = instance.exports.main;
-      assertInstanceof(g, Function);
-      printName("before", g);
-      testProperties(g);
-      printName(" after", g);
-      assertInstanceof(g, Function);
-      testProperties(g);
-      for (let j = 10; j < 15; j++) {
-        assertEquals(f(j), g(j));
-      }
-      verifyHeap();
-      // The WASM-internal fields of {g} are only inspected when {g} is
-      // used as an import into another instance. Use {g} as the import
-      // the next time through the loop.
-      f = g;
-    }
-  }
-
-})();
-
-(function ConstructedTest() {
-  print("ConstructedTest");
-
-  var memory = undefined, table = undefined;
-  for (let i = 0; i < 4; i++) {
-    print("  iteration " + i);
-
-    let m = new WebAssembly.Memory({initial: 1});
-    let t = new WebAssembly.Table({element: "anyfunc", initial: 1});
-    m.old = memory;
-    t.old = table;
-
-    memory = m;
-    table = t;
-    testProperties(memory);
-    testProperties(table);
-  }
-})();
diff --git a/src/v8/test/mjsunit/wasm/wasm-constants.js b/src/v8/test/mjsunit/wasm/wasm-constants.js
index cc5f1e9..4c86065 100644
--- a/src/v8/test/mjsunit/wasm/wasm-constants.js
+++ b/src/v8/test/mjsunit/wasm/wasm-constants.js
@@ -78,7 +78,7 @@
 let kWasmFunctionTypeForm = 0x60;
 let kWasmAnyFunctionTypeForm = 0x70;
 
-let kResizableMaximumFlag = 1;
+let kHasMaximumFlag = 1;
 
 // Function declaration flags
 let kDeclFunctionName   = 0x01;
@@ -123,6 +123,12 @@
 let kSig_v_d = makeSig([kWasmF64], []);
 let kSig_v_dd = makeSig([kWasmF64, kWasmF64], []);
 let kSig_v_ddi = makeSig([kWasmF64, kWasmF64, kWasmI32], []);
+let kSig_ii_v = makeSig([], [kWasmI32, kWasmI32]);
+let kSig_iii_v = makeSig([], [kWasmI32, kWasmI32, kWasmI32]);
+let kSig_ii_i = makeSig([kWasmI32], [kWasmI32, kWasmI32]);
+let kSig_iii_i = makeSig([kWasmI32], [kWasmI32, kWasmI32, kWasmI32]);
+let kSig_ii_ii = makeSig([kWasmI32, kWasmI32], [kWasmI32, kWasmI32]);
+let kSig_iii_ii = makeSig([kWasmI32, kWasmI32], [kWasmI32, kWasmI32, kWasmI32]);
 
 let kSig_v_f = makeSig([kWasmF32], []);
 let kSig_f_f = makeSig([kWasmF32], [kWasmF32]);
diff --git a/src/v8/test/mjsunit/wasm/wasm-module-builder.js b/src/v8/test/mjsunit/wasm/wasm-module-builder.js
index d21067b..c00c2c8 100644
--- a/src/v8/test/mjsunit/wasm/wasm-module-builder.js
+++ b/src/v8/test/mjsunit/wasm/wasm-module-builder.js
@@ -121,9 +121,25 @@
     return this;
   }
 
+  getNumLocals() {
+    let total_locals = 0;
+    for (let l of this.locals || []) {
+      for (let type of ["i32", "i64", "f32", "f64", "s128"]) {
+        total_locals += l[type + "_count"] || 0;
+      }
+    }
+    return total_locals;
+  }
+
   addLocals(locals, names) {
-    this.locals = locals;
-    this.local_names = names;
+    const old_num_locals = this.getNumLocals();
+    if (!this.locals) this.locals = []
+    this.locals.push(locals);
+    if (names) {
+      if (!this.local_names) this.local_names = [];
+      const missing_names = old_num_locals - this.local_names.length;
+      this.local_names.push(...new Array(missing_names), ...names);
+    }
     return this;
   }
 
@@ -409,7 +425,6 @@
         }
         section.emit_u32v(wasm.memory.min);
         if (has_max) section.emit_u32v(wasm.memory.max);
-        if (wasm.memory.shared) section.emit_u8(1);
       });
     }
 
@@ -538,9 +553,7 @@
         for (let func of wasm.functions) {
           // Function body length will be patched later.
           let local_decls = [];
-          let l = func.locals;
-          if (l !== undefined) {
-            let local_decls_count = 0;
+          for (let l of func.locals || []) {
             if (l.i32_count > 0) {
               local_decls.push({count: l.i32_count, type: kWasmI32});
             }
diff --git a/src/v8/test/mjsunit/wasm/worker-memory.js b/src/v8/test/mjsunit/wasm/worker-memory.js
new file mode 100644
index 0000000..6d96e7b
--- /dev/null
+++ b/src/v8/test/mjsunit/wasm/worker-memory.js
@@ -0,0 +1,69 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --experimental-wasm-threads
+
+(function TestPostMessageUnsharedMemory() {
+  let worker = new Worker('');
+  let memory = new WebAssembly.Memory({initial: 1, maximum: 2});
+
+  assertThrows(() => worker.postMessage(memory), Error);
+})();
+
+// Can't use assert in a worker.
+let workerHelpers =
+  `function assertTrue(value, msg) {
+    if (!value) {
+      postMessage("Error: " + msg);
+      throw new Error("Exit");  // To stop testing.
+    }
+   }
+
+   function assertIsWasmMemory(memory, expectedSize) {
+      assertTrue(memory instanceof WebAssembly.Memory,
+                 "object is not a WebAssembly.Memory");
+
+      assertTrue(memory.buffer instanceof SharedArrayBuffer,
+                 "object.buffer is not a SharedArrayBuffer");
+
+      assertTrue(memory.buffer.byteLength == expectedSize,
+                 "object.buffer.byteLength is not " + expectedSize + " bytes");
+   }
+`;
+
+(function TestPostMessageSharedMemory() {
+  let workerScript = workerHelpers +
+    `onmessage = function(memory) {
+       assertIsWasmMemory(memory, 65536);
+       postMessage("OK");
+     };`;
+
+  let worker = new Worker(workerScript);
+  let memory = new WebAssembly.Memory({initial: 1, maximum: 2, shared: true});
+  worker.postMessage(memory);
+  assertEquals("OK", worker.getMessage());
+  worker.terminate();
+})();
+
+(function TestPostMessageComplexObjectWithSharedMemory() {
+  let workerScript = workerHelpers +
+    `onmessage = function(obj) {
+       assertIsWasmMemory(obj.memories[0], 65536);
+       assertIsWasmMemory(obj.memories[1], 65536);
+       assertTrue(obj.buffer instanceof SharedArrayBuffer,
+                  "buffer is not a SharedArrayBuffer");
+       assertTrue(obj.memories[0] === obj.memories[1], "memories aren't equal");
+       assertTrue(obj.memories[0].buffer === obj.buffer,
+                  "buffers aren't equal");
+       assertTrue(obj.foo === 1, "foo is not 1");
+       postMessage("OK");
+     };`;
+
+  let worker = new Worker(workerScript);
+  let memory = new WebAssembly.Memory({initial: 1, maximum: 2, shared: true});
+  let obj = {memories: [memory, memory], buffer: memory.buffer, foo: 1};
+  worker.postMessage(obj);
+  assertEquals("OK", worker.getMessage());
+  worker.terminate();
+})();
diff --git a/src/v8/test/mjsunit/whitespaces.js b/src/v8/test/mjsunit/whitespaces.js
index 5b3c6c0..cd8595f 100644
--- a/src/v8/test/mjsunit/whitespaces.js
+++ b/src/v8/test/mjsunit/whitespaces.js
@@ -99,16 +99,32 @@
   }
 }
 
-for (var i = 0; i < 0x10000; i++) {
-  c = String.fromCharCode(i);
-  test_regexp(c + onebyte);
-  test_regexp(c + twobyte);
-  test_trim(c, onebyte + "trim");
-  test_trim(c, twobyte + "trim");
-  test_parseInt(c, onebyte);
-  test_parseInt(c, twobyte);
-  test_eval(c, onebyte);
-  test_eval(c, twobyte);
-  test_stringtonumber(c, onebytespace);
-  test_stringtonumber(c, twobytespace);
+// Test is split into parts to increase parallelism.
+const number_of_tests = 10;
+const max_codepoint = 0x10000;
+
+function firstCodePointOfRange(i) {
+  return Math.floor(i * (max_codepoint / number_of_tests));
+}
+
+function testCodePointRange(i) {
+  assertTrue(i >= 0 && i < number_of_tests);
+
+  const from = firstCodePointOfRange(i);
+  const to = (i == number_of_tests - 1)
+      ? max_codepoint : firstCodePointOfRange(i + 1);
+
+  for (let i = from; i < to; i++) {
+    c = String.fromCharCode(i);
+    test_regexp(c + onebyte);
+    test_regexp(c + twobyte);
+    test_trim(c, onebyte + "trim");
+    test_trim(c, twobyte + "trim");
+    test_parseInt(c, onebyte);
+    test_parseInt(c, twobyte);
+    test_eval(c, onebyte);
+    test_eval(c, twobyte);
+    test_stringtonumber(c, onebytespace);
+    test_stringtonumber(c, twobytespace);
+  }
 }
diff --git a/src/v8/test/mjsunit/regress/wasm/regression-694433.js b/src/v8/test/mjsunit/whitespaces0.js
similarity index 62%
copy from src/v8/test/mjsunit/regress/wasm/regression-694433.js
copy to src/v8/test/mjsunit/whitespaces0.js
index a260e20..9bcd4a7 100644
--- a/src/v8/test/mjsunit/regress/wasm/regression-694433.js
+++ b/src/v8/test/mjsunit/whitespaces0.js
@@ -2,5 +2,6 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-var size = 0x40000000;
-assertThrows(() => WebAssembly.validate(new Uint16Array(size)), RangeError);
+// Files: test/mjsunit/whitespaces.js
+
+testCodePointRange(0);
diff --git a/src/v8/test/mjsunit/regress/wasm/regression-694433.js b/src/v8/test/mjsunit/whitespaces1.js
similarity index 62%
copy from src/v8/test/mjsunit/regress/wasm/regression-694433.js
copy to src/v8/test/mjsunit/whitespaces1.js
index a260e20..8d09f4c 100644
--- a/src/v8/test/mjsunit/regress/wasm/regression-694433.js
+++ b/src/v8/test/mjsunit/whitespaces1.js
@@ -2,5 +2,6 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-var size = 0x40000000;
-assertThrows(() => WebAssembly.validate(new Uint16Array(size)), RangeError);
+// Files: test/mjsunit/whitespaces.js
+
+testCodePointRange(1);
diff --git a/src/v8/test/mjsunit/regress/wasm/regression-694433.js b/src/v8/test/mjsunit/whitespaces2.js
similarity index 62%
copy from src/v8/test/mjsunit/regress/wasm/regression-694433.js
copy to src/v8/test/mjsunit/whitespaces2.js
index a260e20..2919d03 100644
--- a/src/v8/test/mjsunit/regress/wasm/regression-694433.js
+++ b/src/v8/test/mjsunit/whitespaces2.js
@@ -2,5 +2,6 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-var size = 0x40000000;
-assertThrows(() => WebAssembly.validate(new Uint16Array(size)), RangeError);
+// Files: test/mjsunit/whitespaces.js
+
+testCodePointRange(2);
diff --git a/src/v8/test/mjsunit/regress/wasm/regression-694433.js b/src/v8/test/mjsunit/whitespaces3.js
similarity index 62%
copy from src/v8/test/mjsunit/regress/wasm/regression-694433.js
copy to src/v8/test/mjsunit/whitespaces3.js
index a260e20..db28a92 100644
--- a/src/v8/test/mjsunit/regress/wasm/regression-694433.js
+++ b/src/v8/test/mjsunit/whitespaces3.js
@@ -2,5 +2,6 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-var size = 0x40000000;
-assertThrows(() => WebAssembly.validate(new Uint16Array(size)), RangeError);
+// Files: test/mjsunit/whitespaces.js
+
+testCodePointRange(3);
diff --git a/src/v8/test/mjsunit/regress/wasm/regression-694433.js b/src/v8/test/mjsunit/whitespaces4.js
similarity index 62%
copy from src/v8/test/mjsunit/regress/wasm/regression-694433.js
copy to src/v8/test/mjsunit/whitespaces4.js
index a260e20..e103341 100644
--- a/src/v8/test/mjsunit/regress/wasm/regression-694433.js
+++ b/src/v8/test/mjsunit/whitespaces4.js
@@ -2,5 +2,6 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-var size = 0x40000000;
-assertThrows(() => WebAssembly.validate(new Uint16Array(size)), RangeError);
+// Files: test/mjsunit/whitespaces.js
+
+testCodePointRange(4);
diff --git a/src/v8/test/mjsunit/regress/wasm/regression-694433.js b/src/v8/test/mjsunit/whitespaces5.js
similarity index 62%
copy from src/v8/test/mjsunit/regress/wasm/regression-694433.js
copy to src/v8/test/mjsunit/whitespaces5.js
index a260e20..5b748ad 100644
--- a/src/v8/test/mjsunit/regress/wasm/regression-694433.js
+++ b/src/v8/test/mjsunit/whitespaces5.js
@@ -2,5 +2,6 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-var size = 0x40000000;
-assertThrows(() => WebAssembly.validate(new Uint16Array(size)), RangeError);
+// Files: test/mjsunit/whitespaces.js
+
+testCodePointRange(5);
diff --git a/src/v8/test/mjsunit/regress/wasm/regression-694433.js b/src/v8/test/mjsunit/whitespaces6.js
similarity index 62%
copy from src/v8/test/mjsunit/regress/wasm/regression-694433.js
copy to src/v8/test/mjsunit/whitespaces6.js
index a260e20..6944700 100644
--- a/src/v8/test/mjsunit/regress/wasm/regression-694433.js
+++ b/src/v8/test/mjsunit/whitespaces6.js
@@ -2,5 +2,6 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-var size = 0x40000000;
-assertThrows(() => WebAssembly.validate(new Uint16Array(size)), RangeError);
+// Files: test/mjsunit/whitespaces.js
+
+testCodePointRange(6);
diff --git a/src/v8/test/mjsunit/regress/wasm/regression-694433.js b/src/v8/test/mjsunit/whitespaces7.js
similarity index 62%
copy from src/v8/test/mjsunit/regress/wasm/regression-694433.js
copy to src/v8/test/mjsunit/whitespaces7.js
index a260e20..ad01584 100644
--- a/src/v8/test/mjsunit/regress/wasm/regression-694433.js
+++ b/src/v8/test/mjsunit/whitespaces7.js
@@ -2,5 +2,6 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-var size = 0x40000000;
-assertThrows(() => WebAssembly.validate(new Uint16Array(size)), RangeError);
+// Files: test/mjsunit/whitespaces.js
+
+testCodePointRange(7);
diff --git a/src/v8/test/mjsunit/regress/wasm/regression-694433.js b/src/v8/test/mjsunit/whitespaces8.js
similarity index 62%
copy from src/v8/test/mjsunit/regress/wasm/regression-694433.js
copy to src/v8/test/mjsunit/whitespaces8.js
index a260e20..aff47d5 100644
--- a/src/v8/test/mjsunit/regress/wasm/regression-694433.js
+++ b/src/v8/test/mjsunit/whitespaces8.js
@@ -2,5 +2,6 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-var size = 0x40000000;
-assertThrows(() => WebAssembly.validate(new Uint16Array(size)), RangeError);
+// Files: test/mjsunit/whitespaces.js
+
+testCodePointRange(8);
diff --git a/src/v8/test/mjsunit/regress/wasm/regression-694433.js b/src/v8/test/mjsunit/whitespaces9.js
similarity index 62%
copy from src/v8/test/mjsunit/regress/wasm/regression-694433.js
copy to src/v8/test/mjsunit/whitespaces9.js
index a260e20..8d5e97a 100644
--- a/src/v8/test/mjsunit/regress/wasm/regression-694433.js
+++ b/src/v8/test/mjsunit/whitespaces9.js
@@ -2,5 +2,6 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-var size = 0x40000000;
-assertThrows(() => WebAssembly.validate(new Uint16Array(size)), RangeError);
+// Files: test/mjsunit/whitespaces.js
+
+testCodePointRange(9);
diff --git a/src/v8/test/mkgrokdump/mkgrokdump.cc b/src/v8/test/mkgrokdump/mkgrokdump.cc
index ab6247f..75dac7a 100644
--- a/src/v8/test/mkgrokdump/mkgrokdump.cc
+++ b/src/v8/test/mkgrokdump/mkgrokdump.cc
@@ -46,8 +46,8 @@
 
 static int DumpHeapConstants(const char* argv0) {
   // Start up V8.
-  v8::Platform* platform = v8::platform::CreateDefaultPlatform();
-  v8::V8::InitializePlatform(platform);
+  std::unique_ptr<v8::Platform> platform = v8::platform::NewDefaultPlatform();
+  v8::V8::InitializePlatform(platform.get());
   v8::V8::Initialize();
   v8::V8::InitializeExternalStartupData(argv0);
   Isolate::CreateParams create_params;
@@ -75,7 +75,7 @@
     for (i::Object* o = it.Next(); o != NULL; o = it.Next()) {
       i::Map* m = i::Map::cast(o);
       const char* n = NULL;
-      intptr_t p = reinterpret_cast<intptr_t>(m) & 0x7ffff;
+      intptr_t p = reinterpret_cast<intptr_t>(m) & 0x7FFFF;
       int t = m->instance_type();
       ROOT_LIST(ROOT_LIST_CASE)
       STRUCT_LIST(STRUCT_LIST_CASE)
@@ -93,17 +93,18 @@
     n = #camel_name;                           \
     i = i::Heap::k##camel_name##RootIndex;     \
   }
-    i::OldSpaces spit(heap);
+    i::PagedSpaces spit(heap);
     i::PrintF("KNOWN_OBJECTS = {\n");
     for (i::PagedSpace* s = spit.next(); s != NULL; s = spit.next()) {
       i::HeapObjectIterator it(s);
       // Code objects are generally platform-dependent.
-      if (s->identity() == i::CODE_SPACE) continue;
+      if (s->identity() == i::CODE_SPACE || s->identity() == i::MAP_SPACE)
+        continue;
       const char* sname = AllocationSpaceName(s->identity());
       for (i::Object* o = it.Next(); o != NULL; o = it.Next()) {
         const char* n = NULL;
         i::Heap::RootListIndex i = i::Heap::kStrongRootListLength;
-        intptr_t p = reinterpret_cast<intptr_t>(o) & 0x7ffff;
+        intptr_t p = reinterpret_cast<intptr_t>(o) & 0x7FFFF;
         ROOT_LIST(ROOT_LIST_CASE)
         if (n == NULL) continue;
         if (!i::Heap::RootIsImmortalImmovable(i)) continue;
@@ -128,7 +129,6 @@
   // Teardown.
   isolate->Dispose();
   v8::V8::ShutdownPlatform();
-  delete platform;
   return 0;
 }
 
diff --git a/src/v8/test/mkgrokdump/testcfg.py b/src/v8/test/mkgrokdump/testcfg.py
index c47b59d..de8e71f 100644
--- a/src/v8/test/mkgrokdump/testcfg.py
+++ b/src/v8/test/mkgrokdump/testcfg.py
@@ -3,47 +3,46 @@
 # found in the LICENSE file.
 
 import os
-import difflib
 
 from testrunner.local import testsuite
 from testrunner.objects import testcase
+from testrunner.outproc import mkgrokdump
 
 
-class MkGrokdump(testsuite.TestSuite):
+SHELL = 'mkgrokdump'
 
-  def __init__(self, name, root):
-    super(MkGrokdump, self).__init__(name, root)
+class TestSuite(testsuite.TestSuite):
+  def __init__(self, *args, **kwargs):
+    super(TestSuite, self).__init__(*args, **kwargs)
+
+    v8_path = os.path.dirname(os.path.dirname(os.path.abspath(self.root)))
+    self.expected_path = os.path.join(v8_path, 'tools', 'v8heapconst.py')
 
   def ListTests(self, context):
-    test = testcase.TestCase(self, self.shell())
+    test = self._create_test(SHELL)
     return [test]
 
-  def GetFlagsForTestCase(self, testcase, context):
+  def _test_class(self):
+    return TestCase
+
+
+class TestCase(testcase.TestCase):
+  def _get_variant_flags(self):
     return []
 
-  def IsFailureOutput(self, testcase):
-    output = testcase.output
-    v8_path = os.path.dirname(os.path.dirname(os.path.abspath(self.root)))
-    expected_path = os.path.join(v8_path, "tools", "v8heapconst.py")
-    with open(expected_path) as f:
-      expected = f.read()
-    expected_lines = expected.splitlines()
-    actual_lines = output.stdout.splitlines()
-    diff = difflib.unified_diff(expected_lines, actual_lines, lineterm="",
-                                fromfile="expected_path")
-    diffstring = '\n'.join(diff)
-    if diffstring is not "":
-      if "generated from a non-shipping build" in output.stdout:
-        return False
-      if not "generated from a shipping build" in output.stdout:
-        output.stdout = "Unexpected output:\n\n" + output.stdout
-        return True
-      output.stdout = diffstring
-      return True
-    return False
+  def _get_statusfile_flags(self):
+    return []
 
-  def shell(self):
-    return "mkgrokdump"
+  def _get_mode_flags(self, ctx):
+    return []
+
+  def get_shell(self):
+    return SHELL
+
+  @property
+  def output_proc(self):
+    return mkgrokdump.OutProc(self.expected_outcomes, self.suite.expected_path)
+
 
 def GetSuite(name, root):
-  return MkGrokdump(name, root)
+  return TestSuite(name, root)
diff --git a/src/v8/test/mozilla/mozilla.status b/src/v8/test/mozilla/mozilla.status
index 686018c..40334cd 100644
--- a/src/v8/test/mozilla/mozilla.status
+++ b/src/v8/test/mozilla/mozilla.status
@@ -152,6 +152,10 @@
 
   ##################### SLOW TESTS #####################
 
+  # Compiles a long chain of && or || operations, can time out under slower
+  # variants.
+  'js1_5/Expressions/regress-394673': [PASS, NO_VARIANTS],
+
   # This takes a long time to run (~100 seconds). It should only be run
   # by the really patient.
   'js1_5/GC/regress-324278': [SKIP],
@@ -301,6 +305,9 @@
   'js1_5/Regress/regress-317476': [FAIL],
   'js1_5/Regress/regress-314401': [FAIL],
 
+  # d8 implements setTimeout, but not clearTimeout.
+  'js1_5/GC/regress-319980-01': [FAIL],
+
   # Any local 'arguments' variable should not be allowed to shadow the value
   # returned via the indirect 'arguments' property accessor.
   'js1_4/Functions/function-001': [FAIL_OK],
@@ -674,10 +681,6 @@
   # is given null or undefined as this argument (and so does firefox nightly).
   'js1_5/Regress/regress-295052': [FAIL],
 
-  # Bug 1202597: New js1_5/Expressions/regress-394673 is failing.
-  # Marked as: Will not fix. V8 throws an acceptable RangeError.
-  'js1_5/Expressions/regress-394673': [FAIL],
-
   # Bug 762: http://code.google.com/p/v8/issues/detail?id=762
   # We do not correctly handle assignments within "with"
   'ecma_3/Statements/12.10-01': [FAIL],
@@ -808,8 +811,8 @@
   # error message in debug mode.
   'js1_5/extensions/regress-336410-1': [FAIL_OK, ['mode == debug and arch == x64', NO_VARIANTS]],
 
-  # These tests fail when --harmony-strict-legacy-accessor-builtins
-  # is enabled.
+  # These tests fail due to __defineGetter__ & friends throwing
+  # for undefined receivers.
   'js1_5/extensions/regress-313500': [SKIP],
   'js1_5/extensions/regress-325269': [SKIP],
 
@@ -876,10 +879,10 @@
 
 ['no_i18n == True and mode == debug', {
   # Tests too slow for no18n debug.
-  'ecma_3/Statements/regress-302439': [PASS, FAST_VARIANTS],
+  'ecma_3/Statements/regress-302439': [PASS, NO_VARIANTS],
   'js1_5/Regress/regress-98901': [SKIP],
-  'ecma_3/RegExp/perlstress-001': [PASS, FAST_VARIANTS],
-  'js1_5/extensions/regress-311161': [FAIL_OK, FAST_VARIANTS],
+  'ecma_3/RegExp/perlstress-001': [PASS, NO_VARIANTS],
+  'js1_5/extensions/regress-311161': [FAIL_OK, NO_VARIANTS],
 }],  # 'no_i18n == True and mode == debug'
 
 
@@ -935,7 +938,7 @@
 }], # 'arch == mipsel and simulator_run'
 
 ['arch == mips64el and simulator_run', {
-  'js1_5/extensions/regress-355497': [FAIL_OK, 'Flags: --sim-stack-size=512'],
+  'js1_5/extensions/regress-355497': [FAIL_OK, '--sim-stack-size=512'],
 }], # 'arch == mips64el and simulator_run'
 
 ['arch == mips', {
@@ -984,7 +987,7 @@
   'js1_5/extensions/regress-336410-1': [SKIP],
 
   #BUG(3152): Avoid C stack overflow.
-  'js1_5/extensions/regress-355497': [FAIL_OK, 'Flags: --sim-stack-size=512'],
+  'js1_5/extensions/regress-355497': [FAIL_OK, '--sim-stack-size=512'],
 }],  # 'arch == arm64 and simulator_run'
 
 ['variant == wasm_traps', {
diff --git a/src/v8/test/mozilla/testcfg.py b/src/v8/test/mozilla/testcfg.py
index d721a8c..8e69b7d 100644
--- a/src/v8/test/mozilla/testcfg.py
+++ b/src/v8/test/mozilla/testcfg.py
@@ -30,6 +30,7 @@
 
 from testrunner.local import testsuite
 from testrunner.objects import testcase
+from testrunner.outproc import mozilla
 
 EXCLUDED = ["CVS", ".svn"]
 
@@ -54,10 +55,9 @@
 """.split()
 
 
-class MozillaTestSuite(testsuite.TestSuite):
-
+class TestSuite(testsuite.TestSuite):
   def __init__(self, name, root):
-    super(MozillaTestSuite, self).__init__(name, root)
+    super(TestSuite, self).__init__(name, root)
     self.testroot = os.path.join(root, "data")
 
   def ListTests(self, context):
@@ -77,39 +77,46 @@
             fullpath = os.path.join(dirname, filename)
             relpath = fullpath[len(self.testroot) + 1 : -3]
             testname = relpath.replace(os.path.sep, "/")
-            case = testcase.TestCase(self, testname)
+            case = self._create_test(testname)
             tests.append(case)
     return tests
 
-  def GetFlagsForTestCase(self, testcase, context):
-    result = []
-    result += context.mode_flags
-    result += ["--expose-gc"]
-    result += [os.path.join(self.root, "mozilla-shell-emulation.js")]
-    testfilename = testcase.path + ".js"
+  def _test_class(self):
+    return TestCase
+
+
+class TestCase(testcase.TestCase):
+  def _get_files_params(self, ctx):
+    files = [os.path.join(self.suite.root, "mozilla-shell-emulation.js")]
+    testfilename = self.path + ".js"
     testfilepath = testfilename.split("/")
     for i in xrange(len(testfilepath)):
-      script = os.path.join(self.testroot,
+      script = os.path.join(self.suite.testroot,
                             reduce(os.path.join, testfilepath[:i], ""),
                             "shell.js")
       if os.path.exists(script):
-        result.append(script)
-    result.append(os.path.join(self.testroot, testfilename))
-    return testcase.flags + result
+        files.append(script)
 
-  def GetSourceForTest(self, testcase):
-    filename = os.path.join(self.testroot, testcase.path + ".js")
-    with open(filename) as f:
-      return f.read()
+    files.append(os.path.join(self.suite.testroot, testfilename))
+    return files
 
-  def IsNegativeTest(self, testcase):
-    return testcase.path.endswith("-n")
+  def _get_suite_flags(self, ctx):
+    return ['--expose-gc']
 
-  def IsFailureOutput(self, testcase):
-    if testcase.output.exit_code != 0:
-      return True
-    return "FAILED!" in testcase.output.stdout
+  def _get_source_path(self):
+    return os.path.join(self.suite.testroot, self.path + self._get_suffix())
+
+  @property
+  def output_proc(self):
+    if not self.expected_outcomes:
+      if self.path.endswith('-n'):
+        return mozilla.MOZILLA_PASS_NEGATIVE
+      return mozilla.MOZILLA_PASS_DEFAULT
+    if self.path.endswith('-n'):
+      return mozilla.NegOutProc(self.expected_outcomes)
+    return mozilla.OutProc(self.expected_outcomes)
+
 
 
 def GetSuite(name, root):
-  return MozillaTestSuite(name, root)
+  return TestSuite(name, root)
diff --git a/src/v8/test/optimize_for_size.gyp b/src/v8/test/optimize_for_size.gyp
index 047e3d8..8728479 100644
--- a/src/v8/test/optimize_for_size.gyp
+++ b/src/v8/test/optimize_for_size.gyp
@@ -11,6 +11,7 @@
           'type': 'none',
           'dependencies': [
             'cctest/cctest.gyp:cctest_run',
+            'debugger/debugger.gyp:debugger_run',
             'intl/intl.gyp:intl_run',
             'mjsunit/mjsunit.gyp:mjsunit_run',
             'webkit/webkit.gyp:webkit_run',
diff --git a/src/v8/test/perf.isolate b/src/v8/test/perf.isolate
index 5eec44a..132bcc5 100644
--- a/src/v8/test/perf.isolate
+++ b/src/v8/test/perf.isolate
@@ -10,7 +10,7 @@
       '../tools/run_perf.py',
       # TODO(machenbach): These files are referenced by the perf runner.
       # They should be transformed into a proper python module.
-      '../tools/testrunner/local/commands.py',
+      '../tools/testrunner/local/command.py',
       '../tools/testrunner/local/utils.py',
       '../tools/testrunner/objects/output.py',
       # This is often used to trigger performance bots. We include it in the
diff --git a/src/v8/test/preparser/testcfg.py b/src/v8/test/preparser/testcfg.py
index c55e4a8..f6814e7 100644
--- a/src/v8/test/preparser/testcfg.py
+++ b/src/v8/test/preparser/testcfg.py
@@ -32,23 +32,22 @@
 from testrunner.objects import testcase
 
 
-class PreparserTestSuite(testsuite.TestSuite):
-  def __init__(self, name, root):
-    super(PreparserTestSuite, self).__init__(name, root)
+class VariantsGenerator(testsuite.VariantsGenerator):
+  def _get_variants(self, test):
+    return self._standard_variant
 
-  def shell(self):
-    return "d8"
 
+class TestSuite(testsuite.TestSuite):
   def _ParsePythonTestTemplates(self, result, filename):
     pathname = os.path.join(self.root, filename + ".pyt")
-    def Test(name, source, expectation, extra_flags=[]):
+    def Test(name, source, expectation):
       source = source.replace("\n", " ")
-      testname = os.path.join(filename, name)
-      flags = ["-e", source]
+      path = os.path.join(filename, name)
       if expectation:
-        flags += ["--throws"]
-      flags += extra_flags
-      test = testcase.TestCase(self, testname, flags=flags)
+        template_flags = ["--throws"]
+      else:
+        template_flags = []
+      test = self._create_test(path, source, template_flags)
       result.append(test)
     def Template(name, source):
       def MkTest(replacement, expectation):
@@ -71,16 +70,48 @@
       self._ParsePythonTestTemplates(result, f)
     return result
 
-  def GetFlagsForTestCase(self, testcase, context):
-    return testcase.flags
+  def _create_test(self, path, source, template_flags):
+    return super(TestSuite, self)._create_test(
+        path, source=source, template_flags=template_flags)
 
-  def GetSourceForTest(self, testcase):
-    assert testcase.flags[0] == "-e"
-    return testcase.flags[1]
+  def _test_class(self):
+    return TestCase
 
-  def _VariantGeneratorFactory(self):
-    return testsuite.StandardVariantGenerator
+  def _LegacyVariantsGeneratorFactory(self):
+    return testsuite.StandardLegacyVariantsGenerator
+
+  def _variants_gen_class(self):
+    return VariantsGenerator
+
+
+class TestCase(testcase.TestCase):
+  def __init__(self, suite, path, name, source, template_flags):
+    super(TestCase, self).__init__(suite, path, name)
+
+    self._source = source
+    self._template_flags = template_flags
+
+  def _get_cmd_params(self, ctx):
+    return (
+        self._get_files_params(ctx) +
+        self._get_extra_flags(ctx) +
+        ['-e', self._source] +
+        self._template_flags +
+        self._get_variant_flags() +
+        self._get_statusfile_flags() +
+        self._get_mode_flags(ctx) +
+        self._get_source_flags()
+    )
+
+  def _get_mode_flags(self, ctx):
+    return []
+
+  def is_source_available(self):
+    return True
+
+  def get_source(self):
+    return self._source
 
 
 def GetSuite(name, root):
-  return PreparserTestSuite(name, root)
+  return TestSuite(name, root)
diff --git a/src/v8/test/promises-aplus/README b/src/v8/test/promises-aplus/README
deleted file mode 100644
index de15da3..0000000
--- a/src/v8/test/promises-aplus/README
+++ /dev/null
@@ -1,29 +0,0 @@
-This directory contains code for running Promise/A+ Compliance Test Suite[1].
-You can download the it from [1], or by specifying --download to
-tools/run-tests.py.
-Promise/A+ Compliance Test Suite requires Node environment and needs some
-libraries. To run it in d8 shell, we provides some emulation functions in the
-lib/ directory.
-
- - lib/adapter.js
-  - An adapter for harmony Promise used in Promise/A+ tests.
- - lib/assert.js
-  - Emulates assert modules in Node.
- - lib/global.js
-  - Provides global functions and variables.
- - lib/mocha.js
-  - Emulates Mocha[2] test framework.
- - lib/require.j
-  - Emulate require function in Node.
- - lib/run-tests.js
-  - Run all describe tests.
-
-The emulation is not complete. Upgrading Promise/A+ tests will require
-changing lib/ scripts.
-
-Sinon.JS[3], required by Promise/A+ tests, is also downloaded by run-tests.py.
-
-[1]: https://github.com/promises-aplus/promises-tests
-[2]: http://visionmedia.github.io/mocha/
-[3]: http://sinonjs.org/
-
diff --git a/src/v8/test/promises-aplus/lib/adapter.js b/src/v8/test/promises-aplus/lib/adapter.js
deleted file mode 100644
index d99913a..0000000
--- a/src/v8/test/promises-aplus/lib/adapter.js
+++ /dev/null
@@ -1,41 +0,0 @@
-// Copyright 2014 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.
-
-var global = this.global || {};
-
-global.adapter = {
-  resolved: function(value) { return Promise.resolve(value); },
-  rejected: function(reason) { return Promise.reject(reason); },
-  deferred: function() {
-    var resolve, reject;
-    var promise = new Promise(function(res, rej) {
-      resolve = res;
-      reject = rej;
-    });
-    return {promise: promise, resolve: resolve, reject: reject};
-  }
-};
diff --git a/src/v8/test/promises-aplus/lib/assert.js b/src/v8/test/promises-aplus/lib/assert.js
deleted file mode 100644
index 0138f36..0000000
--- a/src/v8/test/promises-aplus/lib/assert.js
+++ /dev/null
@@ -1,97 +0,0 @@
-// Copyright 2014 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.
-
-// Mimics assert module in node.
-
-function compose(message1, message2) {
-  return message2 ? message1 + ': ' + message2 : message1
-}
-
-function fail(actual, expected, message, operator) {
-  var e = Error(compose('FAIL', message) +
-    ': (' + actual + ' ' + operator + ' ' + expected + ') should hold');
-  fails.push(e);
-  throw e;
-}
-
-function ok(value, message) {
-  if (!value) {
-    throw Error(compose('FAIL', + message) + ': value = ' + value);
-  }
-}
-
-function equal(actual, expected, message) {
-  if (!(expected == actual)) {
-    fail(actual, expected, message, '==');
-  }
-}
-
-function notEqual(actual, expected, message) {
-  if (!(expected != actual)) {
-    fail(actual, expected, message, '!=');
-  }
-}
-
-function strictEqual(actual, expected, message) {
-  if (!(expected === actual)) {
-    fail(actual, expected, message, '===');
-  }
-}
-
-function notStrictEqual(actual, expected, message) {
-  if (!(expected !== actual)) {
-    fail(actual, expected, message, '!==');
-  }
-}
-
-function assert(value, message) {
-  return ok(value, message);
-}
-
-function notImplemented() {
-  throw Error('FAIL: This assertion function is not yet implemented.');
-}
-
-function clear() {
-  this.fails = [];
-}
-
-assert.fail = fail;
-assert.ok = ok;
-assert.equal = equal;
-assert.notEqual = notEqual;
-assert.deepEqual = notImplemented;
-assert.notDeepEqual = notImplemented;
-assert.strictEqual = strictEqual;
-assert.notStrictEqual = notStrictEqual;
-assert.throws = notImplemented;
-assert.doesNotThrow = notImplemented;
-assert.ifError = notImplemented;
-
-assert.clear = clear;
-
-exports = assert;
diff --git a/src/v8/test/promises-aplus/lib/global.js b/src/v8/test/promises-aplus/lib/global.js
deleted file mode 100644
index ece338e..0000000
--- a/src/v8/test/promises-aplus/lib/global.js
+++ /dev/null
@@ -1,67 +0,0 @@
-// Copyright 2014 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.
-
-var global = this.global || {};
-var setTimeout;
-var clearTimeout;
-
-(function() {
-var timers = {};
-var currentId = 0;
-
-setInterval = function(fn, delay) {
-  var i = 0;
-  var id = currentId++;
-  function loop() {
-    if (!timers[id]) {
-      return;
-    }
-    if (i++ >= delay) {
-      fn();
-    }
-    %EnqueueMicrotask(loop);
-  }
-  %EnqueueMicrotask(loop);
-  timers[id] = true;
-  return id;
-}
-
-clearTimeout = function(id) {
-  delete timers[id];
-}
-
-clearInterval = clearTimeout;
-
-setTimeout = function(fn, delay) {
-  var id = setInterval(function() {
-    fn();
-    clearInterval(id);
-  }, delay);
-  return id;
-}
-
-}());
diff --git a/src/v8/test/promises-aplus/lib/mocha.js b/src/v8/test/promises-aplus/lib/mocha.js
deleted file mode 100644
index 0a172b9..0000000
--- a/src/v8/test/promises-aplus/lib/mocha.js
+++ /dev/null
@@ -1,255 +0,0 @@
-// Copyright 2014 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.
-
-// This file emulates Mocha test framework used in promises-aplus tests.
-
-var describe;
-var it;
-var specify;
-var before;
-var after;
-var beforeEach;
-var afterEach;
-var RunAllTests;
-
-var assert = require('assert');
-
-(function() {
-var TIMEOUT = 1000;
-
-var context = {
-  beingDescribed: undefined,
-  currentSuiteIndex: 0,
-  suites: []
-};
-
-function Run() {
-  function current() {
-    while (context.currentSuiteIndex < context.suites.length &&
-           context.suites[context.currentSuiteIndex].hasRun) {
-      ++context.currentSuiteIndex;
-    }
-    if (context.suites.length == context.currentSuiteIndex) {
-      return undefined;
-    }
-    return context.suites[context.currentSuiteIndex];
-  }
-  var suite = current();
-  if (!suite) {
-    // done
-    print('All tests have run.');
-    return;
-  }
-  suite.Run();
-}
-
-RunAllTests = function() {
-  context.currentSuiteIndex = 0;
-  var numRegularTestCases = 0;
-  for (var i = 0; i < context.suites.length; ++i) {
-    numRegularTestCases += context.suites[i].numRegularTestCases();
-  }
-  print(context.suites.length + ' suites and ' + numRegularTestCases +
-        ' test cases are found');
-  Run();
-};
-
-function TestCase(name, before, fn, after, isRegular) {
-  this.name = name;
-  this.before = before;
-  this.fn = fn;
-  this.after = after;
-  this.isRegular = isRegular;
-  this.hasDone = false;
-}
-
-TestCase.prototype.RunFunction = function(suite, fn, postAction) {
-  if (!fn) {
-    postAction();
-    return;
-  }
-  try {
-    if (fn.length === 0) {
-      // synchronous
-      fn();
-      postAction();
-    } else {
-      // asynchronous
-      fn(postAction);
-    }
-  } catch (e) {
-    suite.ReportError(this, e);
-  }
-}
-
-TestCase.prototype.MarkAsDone = function() {
-  this.hasDone = true;
-  clearTimeout(this.timer);
-}
-
-TestCase.prototype.Run = function(suite, postAction) {
-  print('Running ' + suite.description + '#' + this.name + ' ...');
-  assert.clear();
-
-  this.timer = setTimeout(function() {
-    suite.ReportError(this, Error('timeout'));
-  }.bind(this), TIMEOUT);
-
-  this.RunFunction(suite, this.before, function(e) {
-    if (this.hasDone) {
-      return;
-    }
-    if (e instanceof Error) {
-      return suite.ReportError(this, e);
-    }
-    if (assert.fails.length > 0) {
-      return suite.ReportError(this, assert.fails[0]);
-    }
-    this.RunFunction(suite, this.fn, function(e) {
-      if (this.hasDone) {
-        return;
-      }
-      if (e instanceof Error) {
-        return suite.ReportError(this, e);
-      }
-      if (assert.fails.length > 0) {
-        return suite.ReportError(this, assert.fails[0]);
-      }
-      this.RunFunction(suite, this.after, function(e) {
-        if (this.hasDone) {
-          return;
-        }
-        if (e instanceof Error) {
-          return suite.ReportError(this, e);
-        }
-        if (assert.fails.length > 0) {
-          return suite.ReportError(this, assert.fails[0]);
-        }
-        this.MarkAsDone();
-        if (this.isRegular) {
-          print('PASS: ' + suite.description + '#' + this.name);
-        }
-        %EnqueueMicrotask(postAction);
-      }.bind(this));
-    }.bind(this));
-  }.bind(this));
-};
-
-function TestSuite(described) {
-  this.description = described.description;
-  this.cases = [];
-  this.currentIndex = 0;
-  this.hasRun = false;
-
-  if (described.before) {
-    this.cases.push(new TestCase(this.description + ' :before', undefined,
-                                 described.before, undefined, false));
-  }
-  for (var i = 0; i < described.cases.length; ++i) {
-    this.cases.push(new TestCase(described.cases[i].description,
-                                 described.beforeEach,
-                                 described.cases[i].fn,
-                                 described.afterEach,
-                                 true));
-  }
-  if (described.after) {
-    this.cases.push(new TestCase(this.description + ' :after',
-                                 undefined, described.after, undefined, false));
-  }
-}
-
-TestSuite.prototype.Run = function() {
-  this.hasRun = this.currentIndex === this.cases.length;
-  if (this.hasRun) {
-    %EnqueueMicrotask(Run);
-    return;
-  }
-
-  // TestCase.prototype.Run cannot throw an exception.
-  this.cases[this.currentIndex].Run(this, function() {
-    ++this.currentIndex;
-    %EnqueueMicrotask(Run);
-  }.bind(this));
-};
-
-TestSuite.prototype.numRegularTestCases = function() {
-  var n = 0;
-  for (var i = 0; i < this.cases.length; ++i) {
-    if (this.cases[i].isRegular) {
-      ++n;
-    }
-  }
-  return n;
-}
-
-TestSuite.prototype.ReportError = function(testCase, e) {
-  if (testCase.hasDone) {
-    return;
-  }
-  testCase.MarkAsDone();
-  this.hasRun = this.currentIndex === this.cases.length;
-  print('FAIL: ' + this.description + '#' + testCase.name + ': ' +
-        e.name  + ' (' + e.message + ')');
-  ++this.currentIndex;
-  %EnqueueMicrotask(Run);
-};
-
-describe = function(description, fn) {
-  var parent = context.beingDescribed;
-  var incomplete = {
-    cases: [],
-    description: parent ? parent.description + ' ' + description : description,
-    parent: parent,
-  };
-  context.beingDescribed = incomplete;
-  fn();
-  context.beingDescribed = parent;
-
-  context.suites.push(new TestSuite(incomplete));
-}
-
-specify = it = function(description, fn) {
-  context.beingDescribed.cases.push({description: description, fn: fn});
-}
-
-before = function(fn) {
-  context.beingDescribed.before = fn;
-}
-
-after = function(fn) {
-  context.beingDescribed.after = fn;
-}
-
-beforeEach = function(fn) {
-  context.beingDescribed.beforeEach = fn;
-}
-
-afterEach = function(fn) {
-  context.beingDescribed.afterEach = fn;
-}
-
-}());
diff --git a/src/v8/test/promises-aplus/lib/require.js b/src/v8/test/promises-aplus/lib/require.js
deleted file mode 100644
index b987a1a..0000000
--- a/src/v8/test/promises-aplus/lib/require.js
+++ /dev/null
@@ -1,50 +0,0 @@
-// Copyright 2014 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.
-
-var global = this.global || {};
-
-// Emulates 'require' function in Node.
-// This is not a generic function: it only works for known modules.
-var require = function(name) {
-  var exports = {};
-  var path;
-  var base = 'test/promises-aplus/'
-  if (name.search('./helpers/') === 0) {
-    path = base + 'promises-tests/lib/tests/' + name + '.js';
-  } else if (name === 'assert') {
-    path = base + 'lib/assert.js';
-  } else if (name === 'sinon') {
-    path = base + 'sinon/sinon.js';
-  } else {
-    throw Error('We cannot load the library: ' + name);
-  }
-  eval('(function() { ' + read(path) + '}())');
-  if (name === 'sinon') {
-    return this.sinon;
-  }
-  return exports;
-};
diff --git a/src/v8/test/promises-aplus/lib/run-tests.js b/src/v8/test/promises-aplus/lib/run-tests.js
deleted file mode 100644
index 6a0a96c..0000000
--- a/src/v8/test/promises-aplus/lib/run-tests.js
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2014 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.
-
-// Defined in lib/mocha.js
-RunAllTests();
diff --git a/src/v8/test/promises-aplus/promises-aplus.status b/src/v8/test/promises-aplus/promises-aplus.status
deleted file mode 100644
index 5da9efa..0000000
--- a/src/v8/test/promises-aplus/promises-aplus.status
+++ /dev/null
@@ -1,31 +0,0 @@
-# Copyright 2014 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.
-
-[
-[ALWAYS, {
-}],  # ALWAYS
-]
diff --git a/src/v8/test/promises-aplus/testcfg.py b/src/v8/test/promises-aplus/testcfg.py
deleted file mode 100644
index bd80f97..0000000
--- a/src/v8/test/promises-aplus/testcfg.py
+++ /dev/null
@@ -1,147 +0,0 @@
-# Copyright 2014 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.
-
-
-import hashlib
-import os
-import shutil
-import sys
-import tarfile
-
-from testrunner.local import testsuite
-from testrunner.local import utils
-from testrunner.objects import testcase
-
-
-SINON_TAG = '1.7.3'
-SINON_NAME = 'sinon'
-SINON_FILENAME = 'sinon.js'
-SINON_URL = 'http://sinonjs.org/releases/sinon-' + SINON_TAG + '.js'
-SINON_HASH = 'b7ab4dd9a1a2cf0460784af3728ad15caf4bbea923f680c5abde5c8332f35984'
-
-TEST_TAG = '2.0.3'
-TEST_ARCHIVE_TOP = 'promises-tests-' + TEST_TAG
-TEST_NAME = 'promises-tests'
-TEST_ARCHIVE = TEST_NAME + '.tar.gz'
-TEST_URL = 'https://github.com/promises-aplus/promises-tests/archive/' + \
-    TEST_TAG + '.tar.gz'
-TEST_ARCHIVE_HASH = \
-    'e446ca557ac5836dd439fecd19689c243a28b1d5a6644dd7fed4274d0fa67270'
-
-
-class PromiseAplusTestSuite(testsuite.TestSuite):
-
-  def __init__(self, name, root):
-    self.root = root
-    self.test_files_root = os.path.join(self.root, TEST_NAME, 'lib', 'tests')
-    self.name = name
-    self.helper_files_pre = [
-      os.path.join(root, 'lib', name) for name in
-      ['global.js', 'require.js', 'mocha.js', 'adapter.js']
-    ]
-    self.helper_files_post = [
-      os.path.join(root, 'lib', name) for name in
-      ['run-tests.js']
-    ]
-
-  def CommonTestName(self, testcase):
-    return testcase.path.split(os.path.sep)[-1]
-
-  def ListTests(self, context):
-    return [testcase.TestCase(self, fname[:-len('.js')]) for fname in
-            os.listdir(os.path.join(self.root, TEST_NAME, 'lib', 'tests'))
-            if fname.endswith('.js')]
-
-  def GetFlagsForTestCase(self, testcase, context):
-    return (testcase.flags + context.mode_flags + ['--allow-natives-syntax'] +
-            self.helper_files_pre +
-            [os.path.join(self.test_files_root, testcase.path + '.js')] +
-            self.helper_files_post)
-
-  def GetSourceForTest(self, testcase):
-    filename = os.path.join(self.root, TEST_NAME,
-                            'lib', 'tests', testcase.path + '.js')
-    with open(filename) as f:
-      return f.read()
-
-  def IsNegativeTest(self, testcase):
-    return '@negative' in self.GetSourceForTest(testcase)
-
-  def IsFailureOutput(self, testcase):
-    if testcase.output.exit_code != 0:
-      return True
-    return not 'All tests have run.' in testcase.output.stdout or \
-           'FAIL:' in testcase.output.stdout
-
-  def DownloadTestData(self):
-    archive = os.path.join(self.root, TEST_ARCHIVE)
-    directory = os.path.join(self.root, TEST_NAME)
-    if not os.path.exists(archive):
-      print('Downloading {0} from {1} ...'.format(TEST_NAME, TEST_URL))
-      utils.URLRetrieve(TEST_URL, archive)
-      if os.path.exists(directory):
-        shutil.rmtree(directory)
-
-    if not os.path.exists(directory):
-      print('Extracting {0} ...'.format(TEST_ARCHIVE))
-      hash = hashlib.sha256()
-      with open(archive, 'rb') as f:
-        for chunk in iter(lambda: f.read(8192), ''):
-          hash.update(chunk)
-        if hash.hexdigest() != TEST_ARCHIVE_HASH:
-          os.remove(archive)
-          raise Exception('Hash mismatch of test data file')
-      archive = tarfile.open(archive, 'r:gz')
-      if sys.platform in ('win32', 'cygwin'):
-        # Magic incantation to allow longer path names on Windows.
-        archive.extractall(u'\\\\?\\%s' % self.root)
-      else:
-        archive.extractall(self.root)
-      shutil.move(os.path.join(self.root, TEST_ARCHIVE_TOP), directory)
-
-  def DownloadSinon(self):
-    directory = os.path.join(self.root, SINON_NAME)
-    if not os.path.exists(directory):
-      os.mkdir(directory)
-    path = os.path.join(directory, SINON_FILENAME)
-    if not os.path.exists(path):
-      utils.URLRetrieve(SINON_URL, path)
-    hash = hashlib.sha256()
-    with open(path, 'rb') as f:
-      for chunk in iter(lambda: f.read(8192), ''):
-        hash.update(chunk)
-    if hash.hexdigest() != SINON_HASH:
-      os.remove(path)
-      raise Exception('Hash mismatch of test data file')
-
-  def DownloadData(self):
-    self.DownloadTestData()
-    self.DownloadSinon()
-
-
-def GetSuite(name, root):
-  return PromiseAplusTestSuite(name, root)
diff --git a/src/v8/test/test262/local-tests/test/language/expressions/class/fields-inner-arrow-err-contains-arguments.js b/src/v8/test/test262/local-tests/test/language/expressions/class/fields-inner-arrow-err-contains-arguments.js
new file mode 100644
index 0000000..a260f59
--- /dev/null
+++ b/src/v8/test/test262/local-tests/test/language/expressions/class/fields-inner-arrow-err-contains-arguments.js
@@ -0,0 +1,26 @@
+/*---
+description: Syntax error if `arguments` used in class field (arrow function expression)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class, class-fields-public, arrow-function]
+flags: [generated]
+negative:
+  phase: early
+  type: SyntaxError
+info: |
+    Static Semantics: Early Errors
+      FieldDefinition:
+        PropertyNameInitializeropt
+      - It is a Syntax Error if ContainsArguments of Initializer is true.
+    Static Semantics: ContainsArguments
+      IdentifierReference : Identifier
+      1. If the StringValue of Identifier is "arguments", return true.
+      ...
+      For all other grammatical productions, recurse on all nonterminals. If any piece returns true, then return true. Otherwise return false.
+---*/
+throw "Test262: This statement should not be evaluated.";
+var C = class {
+  x = () => {
+    var t = () => { arguments; };
+    t();
+  }
+}
diff --git a/src/v8/test/test262/local-tests/test/language/expressions/class/fields-inner-arrow-eval-err-contains-arguments.js b/src/v8/test/test262/local-tests/test/language/expressions/class/fields-inner-arrow-eval-err-contains-arguments.js
new file mode 100644
index 0000000..20e2bac
--- /dev/null
+++ b/src/v8/test/test262/local-tests/test/language/expressions/class/fields-inner-arrow-eval-err-contains-arguments.js
@@ -0,0 +1,33 @@
+/*---
+description: error if `arguments` in StatementList of eval (direct eval)
+esid: sec-performeval-rules-in-initializer
+features: [class, class-fields-public, arrow-function]
+flags: [generated]
+info: |
+    Static Semantics: Early Errors
+
+      FieldDefinition:
+        PropertyNameInitializeropt
+
+      - It is a Syntax Error if ContainsArguments of Initializer is true.
+
+    Static Semantics: ContainsArguments
+      IdentifierReference : Identifier
+
+      1. If the StringValue of Identifier is "arguments", return true.
+      ...
+      For all other grammatical productions, recurse on all nonterminals. If any piece returns true, then return true. Otherwise return false.
+
+---*/
+
+var C = class {
+  x = () => {
+    var t = () => { eval("arguments"); };
+    t();
+  }
+}
+
+assert.throws(SyntaxError, function() {
+  var c = new C();
+  c.x();
+});
diff --git a/src/v8/test/test262/local-tests/test/language/expressions/class/fields-inner-eval-arrow-err-contains-arguments.js b/src/v8/test/test262/local-tests/test/language/expressions/class/fields-inner-eval-arrow-err-contains-arguments.js
new file mode 100644
index 0000000..28ae79e
--- /dev/null
+++ b/src/v8/test/test262/local-tests/test/language/expressions/class/fields-inner-eval-arrow-err-contains-arguments.js
@@ -0,0 +1,30 @@
+/*---
+description: error if `arguments` in StatementList of eval (direct eval)
+esid: sec-performeval-rules-in-initializer
+features: [class, class-fields-public, arrow-function]
+flags: [generated]
+info: |
+    Static Semantics: Early Errors
+
+      FieldDefinition:
+        PropertyNameInitializeropt
+
+      - It is a Syntax Error if ContainsArguments of Initializer is true.
+
+    Static Semantics: ContainsArguments
+      IdentifierReference : Identifier
+
+      1. If the StringValue of Identifier is "arguments", return true.
+      ...
+      For all other grammatical productions, recurse on all nonterminals. If any piece returns true, then return true. Otherwise return false.
+
+---*/
+
+var C = class {
+  x = eval("() => arguments");
+}
+
+assert.throws(SyntaxError, function() {
+  var c = new C();
+  c.x();
+});
diff --git a/src/v8/test/test262/local-tests/test/language/statements/class/fields-inner-arrow-err-contains-arguments.js b/src/v8/test/test262/local-tests/test/language/statements/class/fields-inner-arrow-err-contains-arguments.js
new file mode 100644
index 0000000..2ce086c
--- /dev/null
+++ b/src/v8/test/test262/local-tests/test/language/statements/class/fields-inner-arrow-err-contains-arguments.js
@@ -0,0 +1,26 @@
+/*---
+description: Syntax error if `arguments` used in class field (arrow function expression)
+esid: sec-class-definitions-static-semantics-early-errors
+features: [class, class-fields-public, arrow-function]
+flags: [generated]
+negative:
+  phase: early
+  type: SyntaxError
+info: |
+    Static Semantics: Early Errors
+      FieldDefinition:
+        PropertyNameInitializeropt
+      - It is a Syntax Error if ContainsArguments of Initializer is true.
+    Static Semantics: ContainsArguments
+      IdentifierReference : Identifier
+      1. If the StringValue of Identifier is "arguments", return true.
+      ...
+      For all other grammatical productions, recurse on all nonterminals. If any piece returns true, then return true. Otherwise return false.
+---*/
+throw "Test262: This statement should not be evaluated.";
+class C {
+  x = () => {
+    var t = () => { arguments; };
+    t();
+  }
+}
diff --git a/src/v8/test/test262/local-tests/test/language/statements/class/fields-inner-arrow-eval-err-contains-arguments.js b/src/v8/test/test262/local-tests/test/language/statements/class/fields-inner-arrow-eval-err-contains-arguments.js
new file mode 100644
index 0000000..9b29503
--- /dev/null
+++ b/src/v8/test/test262/local-tests/test/language/statements/class/fields-inner-arrow-eval-err-contains-arguments.js
@@ -0,0 +1,34 @@
+/*---
+description: error if `arguments` in StatementList of eval (direct eval)
+esid: sec-performeval-rules-in-initializer
+features: [class, class-fields-public, arrow-function]
+flags: [generated]
+info: |
+    Static Semantics: Early Errors
+
+      FieldDefinition:
+        PropertyNameInitializeropt
+
+      - It is a Syntax Error if ContainsArguments of Initializer is true.
+
+    Static Semantics: ContainsArguments
+      IdentifierReference : Identifier
+
+      1. If the StringValue of Identifier is "arguments", return true.
+      ...
+      For all other grammatical productions, recurse on all nonterminals. If any piece returns true, then return true. Otherwise return false.
+
+---*/
+
+
+class C {
+  x = () => {
+    var t = () => { eval("arguments"); };
+    t();
+  }
+}
+
+assert.throws(SyntaxError, function() {
+  var c = new C();
+  c.x();
+});
diff --git a/src/v8/test/test262/local-tests/test/language/statements/class/fields-inner-eval-arrow-err-contains-arguments.js b/src/v8/test/test262/local-tests/test/language/statements/class/fields-inner-eval-arrow-err-contains-arguments.js
new file mode 100644
index 0000000..f2680e4
--- /dev/null
+++ b/src/v8/test/test262/local-tests/test/language/statements/class/fields-inner-eval-arrow-err-contains-arguments.js
@@ -0,0 +1,30 @@
+/*---
+description: error if `arguments` in StatementList of eval (direct eval)
+esid: sec-performeval-rules-in-initializer
+features: [class, class-fields-public, arrow-function]
+flags: [generated]
+info: |
+    Static Semantics: Early Errors
+
+      FieldDefinition:
+        PropertyNameInitializeropt
+
+      - It is a Syntax Error if ContainsArguments of Initializer is true.
+
+    Static Semantics: ContainsArguments
+      IdentifierReference : Identifier
+
+      1. If the StringValue of Identifier is "arguments", return true.
+      ...
+      For all other grammatical productions, recurse on all nonterminals. If any piece returns true, then return true. Otherwise return false.
+
+---*/
+
+class C {
+  x = eval("() => arguments");
+}
+
+assert.throws(SyntaxError, function() {
+  var c = new C();
+  c.x();
+});
diff --git a/src/v8/test/test262/test262.status b/src/v8/test/test262/test262.status
index 4588795..bd4b667 100644
--- a/src/v8/test/test262/test262.status
+++ b/src/v8/test/test262/test262.status
@@ -84,11 +84,6 @@
   'language/expressions/prefix-increment/S11.4.4_A5_*': [FAIL],
   'language/statements/variable/binding-resolution': [FAIL],
 
-  # https://bugs.chromium.org/p/v8/issues/detail?id=6216
-  'built-ins/TypedArrays/buffer-arg-byteoffset-to-number-detachbuffer': [FAIL],
-  'built-ins/TypedArrays/buffer-arg-length-to-number-detachbuffer': [FAIL],
-  'built-ins/TypedArrays/buffer-arg-detachedbuffer': [FAIL],
-
   # https://bugs.chromium.org/p/v8/issues/detail?id=4895
   'built-ins/TypedArrays/internals/DefineOwnProperty/detached-buffer': [FAIL],
   'built-ins/TypedArrays/internals/DefineOwnProperty/detached-buffer-realm': [FAIL],
@@ -100,6 +95,8 @@
   'built-ins/TypedArrays/internals/HasProperty/detached-buffer-realm': [FAIL],
   'built-ins/TypedArrays/internals/Set/detached-buffer': [FAIL],
   'built-ins/TypedArrays/internals/Set/detached-buffer-realm': [FAIL],
+  'built-ins/TypedArrays/internals/Set/tonumber-value-detached-buffer': [FAIL],
+  'built-ins/TypedArrays/internals/DefineOwnProperty/tonumber-value-detached-buffer': [FAIL],
   # Some TypedArray methods throw due to the same bug, from Get
   'built-ins/TypedArray/prototype/every/callbackfn-detachbuffer': [FAIL],
   'built-ins/TypedArray/prototype/filter/callbackfn-detachbuffer': [FAIL],
@@ -109,11 +106,6 @@
   'built-ins/TypedArray/prototype/map/callbackfn-detachbuffer': [FAIL],
   'built-ins/TypedArray/prototype/reduce/callbackfn-detachbuffer': [FAIL],
   'built-ins/TypedArray/prototype/reduceRight/callbackfn-detachbuffer': [FAIL],
-  'built-ins/TypedArray/prototype/set/array-arg-targetbuffer-detached-on-get-src-value-throws': [FAIL],
-  'built-ins/TypedArray/prototype/set/array-arg-targetbuffer-detached-on-tointeger-offset-throws': [FAIL],
-  'built-ins/TypedArray/prototype/set/array-arg-targetbuffer-detached-throws': [FAIL],
-  'built-ins/TypedArray/prototype/set/typedarray-arg-srcbuffer-detached-during-tointeger-offset-throws': [FAIL],
-  'built-ins/TypedArray/prototype/set/typedarray-arg-targetbuffer-detached-during-tointeger-offset-throws': [FAIL],
   'built-ins/TypedArray/prototype/slice/detached-buffer-custom-ctor-other-targettype': [FAIL],
   'built-ins/TypedArray/prototype/slice/detached-buffer-custom-ctor-same-targettype': [FAIL],
   'built-ins/TypedArray/prototype/slice/detached-buffer-get-ctor': [FAIL],
@@ -161,14 +153,9 @@
   'language/eval-code/direct/var-env-lower-lex-catch-non-strict': [FAIL],
 
   # https://bugs.chromium.org/p/v8/issues/detail?id=4951
-  'language/expressions/assignment/dstr-array-elem-iter-rtrn-close': [FAIL],
   'language/expressions/assignment/dstr-array-elem-iter-rtrn-close-err': [FAIL],
-  'language/expressions/assignment/dstr-array-elem-iter-rtrn-close-null': [FAIL],
   'language/expressions/assignment/dstr-array-elem-iter-thrw-close': [FAIL],
   'language/expressions/assignment/dstr-array-elem-iter-thrw-close-err': [FAIL],
-  'language/expressions/assignment/dstr-array-elem-trlg-iter-list-rtrn-close': [FAIL],
-  'language/expressions/assignment/dstr-array-elem-trlg-iter-list-rtrn-close-err': [FAIL],
-  'language/expressions/assignment/dstr-array-elem-trlg-iter-list-rtrn-close-null': [FAIL],
   'language/expressions/assignment/dstr-array-elem-trlg-iter-list-thrw-close': [FAIL],
   'language/expressions/assignment/dstr-array-elem-trlg-iter-list-thrw-close-err': [FAIL],
   'language/expressions/assignment/dstr-array-elem-trlg-iter-rest-rtrn-close': [FAIL],
@@ -182,14 +169,9 @@
   'language/expressions/assignment/dstr-array-rest-iter-thrw-close': [FAIL],
   'language/expressions/assignment/dstr-array-rest-iter-thrw-close-err': [FAIL],
   'language/expressions/assignment/dstr-array-rest-lref-err': [FAIL],
-  'language/statements/for-of/dstr-array-elem-iter-rtrn-close': [FAIL],
   'language/statements/for-of/dstr-array-elem-iter-rtrn-close-err': [FAIL],
-  'language/statements/for-of/dstr-array-elem-iter-rtrn-close-null': [FAIL],
   'language/statements/for-of/dstr-array-elem-iter-thrw-close': [FAIL],
   'language/statements/for-of/dstr-array-elem-iter-thrw-close-err': [FAIL],
-  'language/statements/for-of/dstr-array-elem-trlg-iter-list-rtrn-close': [FAIL],
-  'language/statements/for-of/dstr-array-elem-trlg-iter-list-rtrn-close-err': [FAIL],
-  'language/statements/for-of/dstr-array-elem-trlg-iter-list-rtrn-close-null': [FAIL],
   'language/statements/for-of/dstr-array-elem-trlg-iter-list-thrw-close': [FAIL],
   'language/statements/for-of/dstr-array-elem-trlg-iter-list-thrw-close-err': [FAIL],
   'language/statements/for-of/dstr-array-elem-trlg-iter-rest-rtrn-close': [FAIL],
@@ -203,7 +185,8 @@
   'language/statements/for-of/dstr-array-rest-iter-thrw-close': [FAIL],
   'language/statements/for-of/dstr-array-rest-iter-thrw-close-err': [FAIL],
   'language/statements/for-of/dstr-array-rest-lref-err': [FAIL],
-  'language/statements/for-await-of/async-gen-decl-dstr-array-elem-iter-rtrn-close-null': [FAIL],
+  'language/expressions/assignment/destructuring/iterator-destructuring-property-reference-target-evaluation-order': [FAIL],
+  'language/expressions/assignment/destructuring/keyed-destructuring-property-reference-target-evaluation-order': [FAIL],
 
   # https://bugs.chromium.org/p/v8/issues/detail?id=896
   'built-ins/RegExp/property-escapes/binary-properties-with-value': [FAIL],
@@ -241,9 +224,6 @@
   'language/global-code/script-decl-func-err-non-configurable': [FAIL],
   'language/global-code/script-decl-var-collision': [FAIL],
 
-  # https://bugs.chromium.org/p/v8/issues/detail?id=4124
-  'built-ins/Simd/*': [SKIP],
-
   # https://bugs.chromium.org/p/v8/issues/detail?id=4958
   'built-ins/Function/prototype/toString/*': ['--harmony-function-tostring'],
 
@@ -253,16 +233,6 @@
   'built-ins/TypedArrays/internals/DefineOwnProperty/conversion-operation-consistent-nan': [PASS, FAIL],
   'built-ins/TypedArrays/internals/Set/conversion-operation-consistent-nan': [PASS, FAIL],
 
-  # https://bugs.chromium.org/p/v8/issues/detail?id=5070
-  'annexB/built-ins/Object/prototype/__defineGetter__/define-non-configurable': ['--harmony-strict-legacy-accessor-builtins'],
-  'annexB/built-ins/Object/prototype/__defineGetter__/define-non-extensible': ['--harmony-strict-legacy-accessor-builtins'],
-  'annexB/built-ins/Object/prototype/__defineGetter__/this-non-obj': ['--harmony-strict-legacy-accessor-builtins'],
-  'annexB/built-ins/Object/prototype/__defineSetter__/define-non-configurable': ['--harmony-strict-legacy-accessor-builtins'],
-  'annexB/built-ins/Object/prototype/__defineSetter__/define-non-extensible': ['--harmony-strict-legacy-accessor-builtins'],
-  'annexB/built-ins/Object/prototype/__defineSetter__/this-non-obj': ['--harmony-strict-legacy-accessor-builtins'],
-  'annexB/built-ins/Object/prototype/__lookupGetter__/this-non-obj': ['--harmony-strict-legacy-accessor-builtins'],
-  'annexB/built-ins/Object/prototype/__lookupSetter__/this-non-obj': ['--harmony-strict-legacy-accessor-builtins'],
-
   # https://bugs.chromium.org/p/v8/issues/detail?id=4451
   # https://github.com/tc39/ecma262/issues/753
   'annexB/language/eval-code/direct/global-block-decl-eval-global-existing-global-init': [FAIL],
@@ -351,9 +321,6 @@
   'annexB/language/eval-code/direct/func-switch-case-eval-func-no-skip-try': [FAIL],
   'annexB/language/eval-code/direct/func-switch-dflt-eval-func-no-skip-try': [FAIL],
 
-  # https://bugs.chromium.org/p/v8/issues/detail?id=5546
-  'language/expressions/tagged-template/invalid-escape-sequences': ['--harmony-template-escapes'],
-
   # https://bugs.chromium.org/p/v8/issues/detail?id=5537
   'built-ins/global/*': [SKIP],
 
@@ -451,25 +418,49 @@
   'built-ins/Object/internals/DefineOwnProperty/consistent-value-function-caller': [FAIL_SLOPPY],
   'built-ins/Object/internals/DefineOwnProperty/consistent-value-function-arguments': [FAIL_SLOPPY],
 
-  # https://bugs.chromium.org/p/v8/issues/detail?id=4743#c28
-  'built-ins/RegExp/property-escapes/generated/Emoji_Component': [FAIL],
-
-  # ICU 59 uses Unicode 9 data; property escape tests were generated for Unicode 10
-  'built-ins/RegExp/property-escapes/generated/*': [SKIP],
-
   # https://bugs.chromium.org/p/v8/issues/detail?id=6776
   'built-ins/Proxy/ownKeys/return-duplicate-entries-throws': [FAIL],
   'built-ins/Proxy/ownKeys/return-duplicate-symbol-entries-throws': [FAIL],
 
+  # https://bugs.chromium.org/p/v8/issues/detail?id=6861
+  'language/expressions/object/method-definition/async-gen-yield-star-sync-next': [FAIL],
+  'language/expressions/class/async-gen-method-static-yield-star-sync-next': [FAIL],
+  'language/expressions/async-generator/yield-star-sync-next': [FAIL],
+  'language/statements/class/async-gen-method-static-yield-star-sync-next': [FAIL],
+  'language/expressions/async-generator/named-yield-star-sync-next': [FAIL],
+  'language/expressions/class/async-gen-method-yield-star-sync-next': [FAIL],
+  'language/statements/class/async-gen-method-yield-star-sync-next': [FAIL],
+  'language/statements/async-generator/yield-star-sync-next': [FAIL],
+
+  # https://bugs.chromium.org/p/v8/issues/detail?id=6791
+  'built-ins/BigInt/prototype/Symbol.toStringTag': [SKIP],
+  'built-ins/DataView/prototype/getBigInt64/*': [SKIP],
+  'built-ins/DataView/prototype/getBigUint64/*': [SKIP],
+  'built-ins/DataView/prototype/setBigInt64/*': [SKIP],
+  'built-ins/DataView/prototype/setBigUint64/*': [SKIP],
+  'built-ins/TypedArrays/BigInt64Array/*': [SKIP],
+  'built-ins/TypedArrays/BigUint64Array/*': [SKIP],
+
+  # https://bugs.chromium.org/p/v8/issues/detail?id=7184
+  'annexB/language/expressions/yield/star-iterable-return-emulates-undefined-throws-when-called': [FAIL],
+  'annexB/language/statements/for-await-of/iterator-close-return-emulates-undefined-throws-when-called': [FAIL],
+  'annexB/language/statements/for-of/iterator-close-return-emulates-undefined-throws-when-called': [FAIL],
+
+  # https://bugs.chromium.org/p/v8/issues/detail?id=7186
+  'language/statements/class/fields-indirect-eval-err-contains-arguments': [FAIL],
+  'language/expressions/class/fields-indirect-eval-err-contains-arguments': [FAIL],
+
+
 ######################## NEEDS INVESTIGATION ###########################
 
   # These test failures are specific to the intl402 suite and need investigation
   # to be either marked as bugs with issues filed for them or as deliberate
   # incompatibilities if the test cases turn out to be broken or ambiguous.
   # Some of these are related to v8:4361 in being visible side effects from Intl.
-  'intl402/6.2.3': [FAIL],
+  'intl402/6.2.3_a': [FAIL],
   'intl402/Collator/10.1.2_a': [PASS, FAIL],
   'intl402/Collator/10.2.3_b': [PASS, FAIL],
+  'intl402/DateTimeFormat/prototype/resolvedOptions/hourCycle': [FAIL],
   'intl402/DateTimeFormat/12.1.2': [PASS, FAIL],
   'intl402/DateTimeFormat/12.2.3_b': [FAIL],
   'intl402/Number/prototype/toLocaleString/13.2.1_5': [PASS, FAIL],
@@ -539,6 +530,11 @@
   'harness/detachArrayBuffer': [SKIP],
   'harness/detachArrayBuffer-host-detachArrayBuffer': [SKIP],
 
+  # https://github.com/tc39/test262/pull/1371
+  'language/expressions/bitwise-and/bigint-non-primitive': ['--harmony-bigint'],
+  'language/expressions/bitwise-or/bigint-non-primitive': ['--harmony-bigint'],
+  'language/expressions/bitwise-xor/bigint-non-primitive': ['--harmony-bigint'],
+
   ############################ SKIPPED TESTS #############################
 
   # These tests take a looong time to run.
diff --git a/src/v8/test/test262/testcfg.py b/src/v8/test/test262/testcfg.py
index 849a303..2f23fb6 100644
--- a/src/v8/test/test262/testcfg.py
+++ b/src/v8/test/test262/testcfg.py
@@ -33,24 +33,25 @@
 import sys
 import tarfile
 
-
 from testrunner.local import statusfile
 from testrunner.local import testsuite
 from testrunner.local import utils
 from testrunner.objects import testcase
+from testrunner.outproc import base as outproc
+from testrunner.outproc import test262
+
 
 # TODO(littledan): move the flag mapping into the status file
 FEATURE_FLAGS = {
-  'object-rest': '--harmony-object-rest-spread',
-  'object-spread': '--harmony-object-rest-spread',
-  'async-iteration': '--harmony-async-iteration',
+  'BigInt': '--harmony-bigint',
   'regexp-named-groups': '--harmony-regexp-named-captures',
   'regexp-unicode-property-escapes': '--harmony-regexp-property',
-  'regexp-lookbehind': '--harmony-regexp-lookbehind',
   'Promise.prototype.finally': '--harmony-promise-finally',
+  'class-fields-public': '--harmony-class-fields',
+  'optional-catch-binding': '--harmony-optional-catch-binding',
 }
 
-SKIPPED_FEATURES = set(['BigInt', 'class-fields', 'optional-catch-binding'])
+SKIPPED_FEATURES = set(['class-fields-private'])
 
 DATA = os.path.join(os.path.dirname(os.path.abspath(__file__)), "data")
 ARCHIVE = DATA + ".tar"
@@ -74,63 +75,88 @@
     for v, flag_sets in testsuite.ALL_VARIANT_FLAGS.iteritems()
 )
 
-FAST_VARIANT_FLAGS_STRICT = dict(
-    (v, [flags + ["--use-strict"] for flags in flag_sets])
-    for v, flag_sets in testsuite.FAST_VARIANT_FLAGS.iteritems()
-)
-
 ALL_VARIANT_FLAGS_BOTH = dict(
     (v, [flags for flags in testsuite.ALL_VARIANT_FLAGS[v] +
                             ALL_VARIANT_FLAGS_STRICT[v]])
     for v in testsuite.ALL_VARIANT_FLAGS
 )
 
-FAST_VARIANT_FLAGS_BOTH = dict(
-    (v, [flags for flags in testsuite.FAST_VARIANT_FLAGS[v] +
-                            FAST_VARIANT_FLAGS_STRICT[v]])
-    for v in testsuite.FAST_VARIANT_FLAGS
-)
-
 ALL_VARIANTS = {
   'nostrict': testsuite.ALL_VARIANT_FLAGS,
   'strict': ALL_VARIANT_FLAGS_STRICT,
   'both': ALL_VARIANT_FLAGS_BOTH,
 }
 
-FAST_VARIANTS = {
-  'nostrict': testsuite.FAST_VARIANT_FLAGS,
-  'strict': FAST_VARIANT_FLAGS_STRICT,
-  'both': FAST_VARIANT_FLAGS_BOTH,
-}
-
-class Test262VariantGenerator(testsuite.VariantGenerator):
-  def GetFlagSets(self, testcase, variant):
-    if testcase.outcomes and statusfile.OnlyFastVariants(testcase.outcomes):
-      variant_flags = FAST_VARIANTS
-    else:
-      variant_flags = ALL_VARIANTS
-
-    test_record = self.suite.GetTestRecord(testcase)
+class LegacyVariantsGenerator(testsuite.LegacyVariantsGenerator):
+  def GetFlagSets(self, test, variant):
+    test_record = test.test_record
     if "noStrict" in test_record:
-      return variant_flags["nostrict"][variant]
+      return ALL_VARIANTS["nostrict"][variant]
     if "onlyStrict" in test_record:
-      return variant_flags["strict"][variant]
-    return variant_flags["both"][variant]
+      return ALL_VARIANTS["strict"][variant]
+    return ALL_VARIANTS["both"][variant]
 
 
-class Test262TestSuite(testsuite.TestSuite):
+class VariantsGenerator(testsuite.VariantsGenerator):
+  def gen(self, test):
+    flags_set = self._get_flags_set(test)
+    test_record = test.test_record
+    for n, variant in enumerate(self._get_variants(test)):
+      flags = flags_set[variant][0]
+      if 'noStrict' in test_record:
+        yield (variant, flags, str(n))
+      elif 'onlyStrict' in test_record:
+        yield (variant, flags + ['--use-strict'], 'strict-%d' % n)
+      else:
+        yield (variant, flags, str(n))
+        yield (variant, flags + ['--use-strict'], 'strict-%d' % n)
+
+
+class TestSuite(testsuite.TestSuite):
   # Match the (...) in '/path/to/v8/test/test262/subdir/test/(...).js'
   # In practice, subdir is data or local-tests
 
   def __init__(self, name, root):
-    super(Test262TestSuite, self).__init__(name, root)
+    super(TestSuite, self).__init__(name, root)
     self.testroot = os.path.join(self.root, *TEST_262_SUITE_PATH)
     self.harnesspath = os.path.join(self.root, *TEST_262_HARNESS_PATH)
     self.harness = [os.path.join(self.harnesspath, f)
                     for f in TEST_262_HARNESS_FILES]
     self.harness += [os.path.join(self.root, "harness-adapt.js")]
     self.localtestroot = os.path.join(self.root, *TEST_262_LOCAL_TESTS_PATH)
-    self.ParseTestRecord = None
+
+    self._extract_sources()
+    self.parse_test_record = self._load_parse_test_record()
+
+  def _extract_sources(self):
+    # The archive is created only on swarming. Local checkouts have the
+    # data folder.
+    if (os.path.exists(ARCHIVE) and
+        # Check for a JS file from the archive if we need to unpack. Some other
+        # files from the archive unfortunately exist due to a bug in the
+        # isolate_processor.
+        # TODO(machenbach): Migrate this to GN to avoid using the faulty
+        # isolate_processor: http://crbug.com/669910
+        not os.path.exists(os.path.join(DATA, 'test', 'harness', 'error.js'))):
+      print "Extracting archive..."
+      tar = tarfile.open(ARCHIVE)
+      tar.extractall(path=os.path.dirname(ARCHIVE))
+      tar.close()
+
+  def _load_parse_test_record(self):
+    root = os.path.join(self.root, *TEST_262_TOOLS_PATH)
+    f = None
+    try:
+      (f, pathname, description) = imp.find_module("parseTestRecord", [root])
+      module = imp.load_module("parseTestRecord", f, pathname, description)
+      return module.parseTestRecord
+    except:
+      print ('Cannot load parseTestRecord; '
+             'you may need to gclient sync for test262')
+      raise
+    finally:
+      if f:
+        f.close()
 
   def ListTests(self, context):
     testnames = set()
@@ -150,124 +176,79 @@
         fullpath = os.path.join(dirname, filename)
         relpath = re.match(TEST_262_RELPATH_REGEXP, fullpath).group(1)
         testnames.add(relpath.replace(os.path.sep, "/"))
-    cases = [testcase.TestCase(self, testname) for testname in testnames]
+    cases = map(self._create_test, testnames)
     return [case for case in cases if len(
                 SKIPPED_FEATURES.intersection(
-                    self.GetTestRecord(case).get("features", []))) == 0]
+                    case.test_record.get("features", []))) == 0]
 
-  def GetFlagsForTestCase(self, testcase, context):
-    return (testcase.flags + context.mode_flags + self.harness +
-            ([os.path.join(self.root, "harness-agent.js")]
-             if testcase.path.startswith('built-ins/Atomics') else []) +
-            self.GetIncludesForTest(testcase) +
-            (["--module"] if "module" in self.GetTestRecord(testcase) else []) +
-            [self.GetPathForTest(testcase)] +
-            (["--throws"] if "negative" in self.GetTestRecord(testcase)
-                          else []) +
-            (["--allow-natives-syntax"]
-             if "detachArrayBuffer.js" in
-                self.GetTestRecord(testcase).get("includes", [])
-             else []) +
-            ([flag for flag in testcase.outcomes if flag.startswith("--")]) +
-            ([flag for (feature, flag) in FEATURE_FLAGS.items()
-              if feature in self.GetTestRecord(testcase).get("features", [])]))
+  def _test_class(self):
+    return TestCase
 
-  def _VariantGeneratorFactory(self):
-    return Test262VariantGenerator
+  def _LegacyVariantsGeneratorFactory(self):
+    return LegacyVariantsGenerator
 
-  def LoadParseTestRecord(self):
-    if not self.ParseTestRecord:
-      root = os.path.join(self.root, *TEST_262_TOOLS_PATH)
-      f = None
-      try:
-        (f, pathname, description) = imp.find_module("parseTestRecord", [root])
-        module = imp.load_module("parseTestRecord", f, pathname, description)
-        self.ParseTestRecord = module.parseTestRecord
-      except:
-        raise ImportError("Cannot load parseTestRecord; you may need to "
-                          "gclient sync for test262")
-      finally:
-        if f:
-          f.close()
-    return self.ParseTestRecord
+  def _variants_gen_class(self):
+    return VariantsGenerator
 
-  def GetTestRecord(self, testcase):
-    if not hasattr(testcase, "test_record"):
-      ParseTestRecord = self.LoadParseTestRecord()
-      testcase.test_record = ParseTestRecord(self.GetSourceForTest(testcase),
-                                             testcase.path)
-    return testcase.test_record
 
-  def BasePath(self, filename):
-    return self.root if filename in TEST_262_NATIVE_FILES else self.harnesspath
+class TestCase(testcase.TestCase):
+  def __init__(self, *args, **kwargs):
+    super(TestCase, self).__init__(*args, **kwargs)
 
-  def GetIncludesForTest(self, testcase):
-    test_record = self.GetTestRecord(testcase)
-    if "includes" in test_record:
-      return [os.path.join(self.BasePath(filename), filename)
-              for filename in test_record.get("includes", [])]
+    source = self.get_source()
+    self.test_record = self.suite.parse_test_record(source, self.path)
+    self._expected_exception = (
+        self.test_record
+          .get('negative', {})
+          .get('type', None)
+    )
+
+  def _get_files_params(self, ctx):
+    return (
+        list(self.suite.harness) +
+        ([os.path.join(self.suite.root, "harness-agent.js")]
+         if self.path.startswith('built-ins/Atomics') else []) +
+        self._get_includes() +
+        (["--module"] if "module" in self.test_record else []) +
+        [self._get_source_path()]
+    )
+
+  def _get_suite_flags(self, ctx):
+    return (
+        (["--throws"] if "negative" in self.test_record else []) +
+        (["--allow-natives-syntax"]
+         if "detachArrayBuffer.js" in self.test_record.get("includes", [])
+         else []) +
+        [flag for (feature, flag) in FEATURE_FLAGS.items()
+          if feature in self.test_record.get("features", [])]
+    )
+
+  def _get_includes(self):
+    return [os.path.join(self._base_path(filename), filename)
+            for filename in self.test_record.get("includes", [])]
+
+  def _base_path(self, filename):
+    if filename in TEST_262_NATIVE_FILES:
+      return self.suite.root
     else:
-      includes = []
-    return includes
+      return self.suite.harnesspath
 
-  def GetPathForTest(self, testcase):
-    filename = os.path.join(self.localtestroot, testcase.path + ".js")
-    if not os.path.exists(filename):
-      filename = os.path.join(self.testroot, testcase.path + ".js")
-    return filename
+  def _get_source_path(self):
+    filename = self.path + self._get_suffix()
+    path = os.path.join(self.suite.localtestroot, filename)
+    if os.path.exists(path):
+      return path
+    return os.path.join(self.suite.testroot, filename)
 
-  def GetSourceForTest(self, testcase):
-    with open(self.GetPathForTest(testcase)) as f:
-      return f.read()
-
-  def _ParseException(self, str, testcase):
-    # somefile:somelinenumber: someerror[: sometext]
-    # somefile might include an optional drive letter on windows e.g. "e:".
-    match = re.search(
-        '^(?:\w:)?[^:]*:[0-9]+: ([^: ]+?)($|: )', str, re.MULTILINE)
-    if match:
-      return match.group(1).strip()
-    else:
-      print "Error parsing exception for %s" % testcase.GetLabel()
-      return None
-
-  def IsFailureOutput(self, testcase):
-    output = testcase.output
-    test_record = self.GetTestRecord(testcase)
-    if output.exit_code != 0:
-      return True
-    if ("negative" in test_record and
-        "type" in test_record["negative"] and
-        self._ParseException(output.stdout, testcase) !=
-            test_record["negative"]["type"]):
-        return True
-    return "FAILED!" in output.stdout
-
-  def HasUnexpectedOutput(self, testcase):
-    outcome = self.GetOutcome(testcase)
-    if (statusfile.FAIL_SLOPPY in testcase.outcomes and
-        "--use-strict" not in testcase.flags):
-      return outcome != statusfile.FAIL
-    return not outcome in ([outcome for outcome in testcase.outcomes
-                                    if not outcome.startswith('--')
-                                       and outcome != statusfile.FAIL_SLOPPY]
-                           or [statusfile.PASS])
-
-  def PrepareSources(self):
-    # The archive is created only on swarming. Local checkouts have the
-    # data folder.
-    if (os.path.exists(ARCHIVE) and
-        # Check for a JS file from the archive if we need to unpack. Some other
-        # files from the archive unfortunately exist due to a bug in the
-        # isolate_processor.
-        # TODO(machenbach): Migrate this to GN to avoid using the faulty
-        # isolate_processor: http://crbug.com/669910
-        not os.path.exists(os.path.join(DATA, 'test', 'harness', 'error.js'))):
-      print "Extracting archive..."
-      tar = tarfile.open(ARCHIVE)
-      tar.extractall(path=os.path.dirname(ARCHIVE))
-      tar.close()
+  @property
+  def output_proc(self):
+    if self._expected_exception is not None:
+      return test262.ExceptionOutProc(self.expected_outcomes,
+                                      self._expected_exception)
+    if self.expected_outcomes == outproc.OUTCOMES_PASS:
+      return test262.PASS_NO_EXCEPTION
+    return test262.NoExceptionOutProc(self.expected_outcomes)
 
 
 def GetSuite(name, root):
-  return Test262TestSuite(name, root)
+  return TestSuite(name, root)
diff --git a/src/v8/test/unittests/BUILD.gn b/src/v8/test/unittests/BUILD.gn
index 0f8d8c6..7f70a5c 100644
--- a/src/v8/test/unittests/BUILD.gn
+++ b/src/v8/test/unittests/BUILD.gn
@@ -35,6 +35,7 @@
     "../../test/common/wasm/wasm-macro-gen.h",
     "../../testing/gmock-support.h",
     "../../testing/gtest-support.h",
+    "allocation-unittest.cc",
     "api/access-check-unittest.cc",
     "api/exception-unittest.cc",
     "api/interceptor-unittest.cc",
@@ -63,6 +64,7 @@
     "base/sys-info-unittest.cc",
     "base/template-utils-unittest.cc",
     "base/utils/random-number-generator-unittest.cc",
+    "bigint-unittest.cc",
     "cancelable-tasks-unittest.cc",
     "char-predicates-unittest.cc",
     "code-stub-assembler-unittest.cc",
@@ -120,6 +122,7 @@
     "compiler/schedule-unittest.cc",
     "compiler/scheduler-rpo-unittest.cc",
     "compiler/scheduler-unittest.cc",
+    "compiler/simplified-lowering-unittest.cc",
     "compiler/simplified-operator-reducer-unittest.cc",
     "compiler/simplified-operator-unittest.cc",
     "compiler/state-values-utils-unittest.cc",
@@ -165,6 +168,7 @@
     "libplatform/worker-thread-unittest.cc",
     "locked-queue-unittest.cc",
     "object-unittest.cc",
+    "parser/ast-value-unittest.cc",
     "parser/preparser-unittest.cc",
     "register-configuration-unittest.cc",
     "run-all-unittests.cc",
@@ -174,6 +178,7 @@
     "test-utils.cc",
     "test-utils.h",
     "unicode-unittest.cc",
+    "utils-unittest.cc",
     "value-serializer-unittest.cc",
     "wasm/control-transfer-unittest.cc",
     "wasm/decoder-unittest.cc",
@@ -182,7 +187,8 @@
     "wasm/loop-assignment-analysis-unittest.cc",
     "wasm/module-decoder-unittest.cc",
     "wasm/streaming-decoder-unittest.cc",
-    "wasm/wasm-heap-unittest.cc",
+    "wasm/trap-handler-unittest.cc",
+    "wasm/wasm-code-manager-unittest.cc",
     "wasm/wasm-macro-gen-unittest.cc",
     "wasm/wasm-module-builder-unittest.cc",
     "wasm/wasm-opcodes-unittest.cc",
diff --git a/src/v8/test/unittests/allocation-unittest.cc b/src/v8/test/unittests/allocation-unittest.cc
new file mode 100644
index 0000000..42904da
--- /dev/null
+++ b/src/v8/test/unittests/allocation-unittest.cc
@@ -0,0 +1,164 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "src/allocation.h"
+
+#if V8_OS_POSIX
+#include <setjmp.h>
+#include <signal.h>
+#include <unistd.h>  // NOLINT
+#endif               // V8_OS_POSIX
+
+#include "testing/gtest/include/gtest/gtest.h"
+
+namespace v8 {
+namespace internal {
+
+// TODO(eholk): Add a windows version of permissions tests.
+#if V8_OS_POSIX
+namespace {
+
+// These tests make sure the routines to allocate memory do so with the correct
+// permissions.
+//
+// Unfortunately, there is no API to find the protection of a memory address,
+// so instead we test permissions by installing a signal handler, probing a
+// memory location and recovering from the fault.
+//
+// We don't test the execution permission because to do so we'd have to
+// dynamically generate code and test if we can execute it.
+
+class MemoryAllocationPermissionsTest : public ::testing::Test {
+  static void SignalHandler(int signal, siginfo_t* info, void*) {
+    siglongjmp(continuation_, 1);
+  }
+  struct sigaction old_action_;
+// On Mac, sometimes we get SIGBUS instead of SIGSEGV.
+#if V8_OS_MACOSX
+  struct sigaction old_bus_action_;
+#endif
+
+ protected:
+  virtual void SetUp() {
+    struct sigaction action;
+    action.sa_sigaction = SignalHandler;
+    sigemptyset(&action.sa_mask);
+    action.sa_flags = SA_SIGINFO;
+    sigaction(SIGSEGV, &action, &old_action_);
+#if V8_OS_MACOSX
+    sigaction(SIGBUS, &action, &old_bus_action_);
+#endif
+  }
+
+  virtual void TearDown() {
+    // Be a good citizen and restore the old signal handler.
+    sigaction(SIGSEGV, &old_action_, nullptr);
+#if V8_OS_MACOSX
+    sigaction(SIGBUS, &old_bus_action_, nullptr);
+#endif
+  }
+
+ public:
+  static sigjmp_buf continuation_;
+
+  enum class MemoryAction { kRead, kWrite };
+
+  void ProbeMemory(volatile int* buffer, MemoryAction action,
+                   bool should_succeed) {
+    const int save_sigs = 1;
+    if (!sigsetjmp(continuation_, save_sigs)) {
+      switch (action) {
+        case MemoryAction::kRead: {
+          // static_cast to remove the reference and force a memory read.
+          USE(static_cast<int>(*buffer));
+          break;
+        }
+        case MemoryAction::kWrite: {
+          *buffer = 0;
+          break;
+        }
+      }
+      if (should_succeed) {
+        SUCCEED();
+      } else {
+        FAIL();
+      }
+      return;
+    }
+    if (should_succeed) {
+      FAIL();
+    } else {
+      SUCCEED();
+    }
+  }
+
+  void TestPermissions(PageAllocator::Permission permission, bool can_read,
+                       bool can_write) {
+    const size_t page_size = AllocatePageSize();
+    int* buffer = static_cast<int*>(
+        AllocatePages(nullptr, page_size, page_size, permission));
+    ProbeMemory(buffer, MemoryAction::kRead, can_read);
+    ProbeMemory(buffer, MemoryAction::kWrite, can_write);
+    CHECK(FreePages(buffer, page_size));
+  }
+};
+
+sigjmp_buf MemoryAllocationPermissionsTest::continuation_;
+
+}  // namespace
+
+TEST_F(MemoryAllocationPermissionsTest, DoTest) {
+  TestPermissions(PageAllocator::Permission::kNoAccess, false, false);
+  TestPermissions(PageAllocator::Permission::kReadWrite, true, true);
+  TestPermissions(PageAllocator::Permission::kReadWriteExecute, true, true);
+}
+#endif  // V8_OS_POSIX
+
+// Basic tests of allocation.
+
+class AllocationTest : public ::testing::Test {};
+
+TEST(AllocationTest, AllocateAndFree) {
+  size_t page_size = v8::internal::AllocatePageSize();
+  CHECK_NE(0, page_size);
+
+  // A large allocation, aligned at native allocation granularity.
+  const size_t kAllocationSize = 1 * v8::internal::MB;
+  void* mem_addr = v8::internal::AllocatePages(
+      v8::internal::GetRandomMmapAddr(), kAllocationSize, page_size,
+      PageAllocator::Permission::kReadWrite);
+  CHECK_NOT_NULL(mem_addr);
+  CHECK(v8::internal::FreePages(mem_addr, kAllocationSize));
+
+  // A large allocation, aligned significantly beyond native granularity.
+  const size_t kBigAlignment = 64 * v8::internal::MB;
+  void* aligned_mem_addr = v8::internal::AllocatePages(
+      v8::internal::GetRandomMmapAddr(), kAllocationSize, kBigAlignment,
+      PageAllocator::Permission::kReadWrite);
+  CHECK_NOT_NULL(aligned_mem_addr);
+  CHECK_EQ(aligned_mem_addr, AlignedAddress(aligned_mem_addr, kBigAlignment));
+  CHECK(v8::internal::FreePages(aligned_mem_addr, kAllocationSize));
+}
+
+TEST(AllocationTest, ReserveMemory) {
+  size_t page_size = v8::internal::AllocatePageSize();
+  const size_t kAllocationSize = 1 * v8::internal::MB;
+  void* mem_addr = v8::internal::AllocatePages(
+      v8::internal::GetRandomMmapAddr(), kAllocationSize, page_size,
+      PageAllocator::Permission::kReadWrite);
+  CHECK_NE(0, page_size);
+  CHECK_NOT_NULL(mem_addr);
+  size_t commit_size = v8::internal::CommitPageSize();
+  CHECK(v8::internal::SetPermissions(mem_addr, commit_size,
+                                     PageAllocator::Permission::kReadWrite));
+  // Check whether we can write to memory.
+  int* addr = static_cast<int*>(mem_addr);
+  addr[v8::internal::KB - 1] = 2;
+  CHECK(v8::internal::SetPermissions(mem_addr, commit_size,
+                                     PageAllocator::Permission::kNoAccess));
+  CHECK(v8::internal::FreePages(mem_addr, kAllocationSize));
+}
+
+}  // namespace internal
+}  // namespace v8
diff --git a/src/v8/test/unittests/api/access-check-unittest.cc b/src/v8/test/unittests/api/access-check-unittest.cc
index 05913de..8bfb507 100644
--- a/src/v8/test/unittests/api/access-check-unittest.cc
+++ b/src/v8/test/unittests/api/access-check-unittest.cc
@@ -37,15 +37,10 @@
   global_template->SetAccessCheckCallback(AccessCheck);
 
   Local<FunctionTemplate> getter_template = FunctionTemplate::New(
-      isolate(), [](const FunctionCallbackInfo<Value>& info) {
-        FAIL() << "This should never be called.";
-        info.GetReturnValue().Set(42);
-      });
+      isolate(), [](const FunctionCallbackInfo<Value>& info) { FAIL(); });
   getter_template->SetAcceptAnyReceiver(false);
   Local<FunctionTemplate> setter_template = FunctionTemplate::New(
-      isolate(), [](const FunctionCallbackInfo<v8::Value>& info) {
-        FAIL() << "This should never be called.";
-      });
+      isolate(), [](const FunctionCallbackInfo<v8::Value>& info) { FAIL(); });
   setter_template->SetAcceptAnyReceiver(false);
   global_template->SetAccessorProperty(
       String::NewFromUtf8(isolate(), "property", NewStringType::kNormal)
diff --git a/src/v8/test/unittests/api/v8-object-unittest.cc b/src/v8/test/unittests/api/v8-object-unittest.cc
index bbb8230..d11dba6 100644
--- a/src/v8/test/unittests/api/v8-object-unittest.cc
+++ b/src/v8/test/unittests/api/v8-object-unittest.cc
@@ -37,10 +37,7 @@
 
 using LapContextTest = TestWithIsolate;
 
-// TODO(yukishiino): Enable this unittest once
-// PropertyAccessInfo::accessor_holder() gets supported.  Currently we're using
-// PropertyAccessInfo::holder(), which doesn't return the accessor holder.
-TEST_F(LapContextTest, DISABLED_CurrentContextInLazyAccessorOnPrototype) {
+TEST_F(LapContextTest, CurrentContextInLazyAccessorOnPrototype) {
   // The receiver object is created in |receiver_context|, but its prototype
   // object is created in |prototype_context|, and the property is accessed
   // from |caller_context|.
diff --git a/src/v8/test/unittests/asmjs/asm-scanner-unittest.cc b/src/v8/test/unittests/asmjs/asm-scanner-unittest.cc
index fc94d2d..fe061f8 100644
--- a/src/v8/test/unittests/asmjs/asm-scanner-unittest.cc
+++ b/src/v8/test/unittests/asmjs/asm-scanner-unittest.cc
@@ -35,10 +35,10 @@
     scanner->Next();
   }
 
-  void CheckForEnd() { CHECK(scanner->Token() == AsmJsScanner::kEndOfInput); }
+  void CheckForEnd() { CHECK_EQ(scanner->Token(), AsmJsScanner::kEndOfInput); }
 
   void CheckForParseError() {
-    CHECK(scanner->Token() == AsmJsScanner::kParseError);
+    CHECK_EQ(scanner->Token(), AsmJsScanner::kParseError);
   }
 
   std::unique_ptr<Utf16CharacterStream> stream;
@@ -190,7 +190,7 @@
 }
 
 TEST_F(AsmJsScannerTest, Numbers) {
-  SetupScanner("1 1.2 0x1f 1.e3");
+  SetupScanner("1 1.2 0x1F 1.e3");
 
   CHECK(scanner->IsUnsigned());
   CHECK_EQ(1, scanner->AsUnsigned());
@@ -212,10 +212,10 @@
 }
 
 TEST_F(AsmJsScannerTest, UnsignedNumbers) {
-  SetupScanner("0x7fffffff 0x80000000 0xffffffff 0x100000000");
+  SetupScanner("0x7FFFFFFF 0x80000000 0xFFFFFFFF 0x100000000");
 
   CHECK(scanner->IsUnsigned());
-  CHECK_EQ(0x7fffffff, scanner->AsUnsigned());
+  CHECK_EQ(0x7FFFFFFF, scanner->AsUnsigned());
   scanner->Next();
 
   CHECK(scanner->IsUnsigned());
@@ -223,7 +223,7 @@
   scanner->Next();
 
   CHECK(scanner->IsUnsigned());
-  CHECK_EQ(0xffffffff, scanner->AsUnsigned());
+  CHECK_EQ(0xFFFFFFFF, scanner->AsUnsigned());
   scanner->Next();
 
   // Numeric "unsigned" literals with a payload of more than 32-bit are rejected
diff --git a/src/v8/test/unittests/asmjs/asm-types-unittest.cc b/src/v8/test/unittests/asmjs/asm-types-unittest.cc
index 0c44347..7430ce6 100644
--- a/src/v8/test/unittests/asmjs/asm-types-unittest.cc
+++ b/src/v8/test/unittests/asmjs/asm-types-unittest.cc
@@ -85,7 +85,7 @@
     template <typename Arg, typename... Others>
     static void AddAllArguments(AsmFunctionType* function_type, Arg* arg,
                                 Others... others) {
-      CHECK(function_type != nullptr);
+      CHECK_NOT_NULL(function_type);
       function_type->AddArgument((*arg)());
       AddAllArguments(function_type, others...);
     }
@@ -120,7 +120,7 @@
   template <typename Overload, typename... Others>
   static void AddAllOverloads(AsmOverloadedFunctionType* function,
                               Overload* overload, Others... others) {
-    CHECK(function != nullptr);
+    CHECK_NOT_NULL(function);
     function->AddOverload(overload);
     AddAllOverloads(function, others...);
   }
diff --git a/src/v8/test/unittests/base/bits-unittest.cc b/src/v8/test/unittests/base/bits-unittest.cc
index 45fb921..6f787eb 100644
--- a/src/v8/test/unittests/base/bits-unittest.cc
+++ b/src/v8/test/unittests/base/bits-unittest.cc
@@ -18,70 +18,103 @@
 namespace base {
 namespace bits {
 
-TEST(Bits, CountPopulation32) {
-  EXPECT_EQ(0u, CountPopulation32(0));
-  EXPECT_EQ(1u, CountPopulation32(1));
-  EXPECT_EQ(8u, CountPopulation32(0x11111111));
-  EXPECT_EQ(16u, CountPopulation32(0xf0f0f0f0));
-  EXPECT_EQ(24u, CountPopulation32(0xfff0f0ff));
-  EXPECT_EQ(32u, CountPopulation32(0xffffffff));
+TEST(Bits, CountPopulation16) {
+  EXPECT_EQ(0u, CountPopulation(uint16_t{0}));
+  EXPECT_EQ(1u, CountPopulation(uint16_t{1}));
+  EXPECT_EQ(4u, CountPopulation(uint16_t{0x1111}));
+  EXPECT_EQ(8u, CountPopulation(uint16_t{0xF0F0}));
+  EXPECT_EQ(12u, CountPopulation(uint16_t{0xF0FF}));
+  EXPECT_EQ(16u, CountPopulation(uint16_t{0xFFFF}));
 }
 
+TEST(Bits, CountPopulation32) {
+  EXPECT_EQ(0u, CountPopulation(uint32_t{0}));
+  EXPECT_EQ(1u, CountPopulation(uint32_t{1}));
+  EXPECT_EQ(8u, CountPopulation(uint32_t{0x11111111}));
+  EXPECT_EQ(16u, CountPopulation(uint32_t{0xF0F0F0F0}));
+  EXPECT_EQ(24u, CountPopulation(uint32_t{0xFFF0F0FF}));
+  EXPECT_EQ(32u, CountPopulation(uint32_t{0xFFFFFFFF}));
+}
 
 TEST(Bits, CountPopulation64) {
-  EXPECT_EQ(0u, CountPopulation64(0));
-  EXPECT_EQ(1u, CountPopulation64(1));
-  EXPECT_EQ(2u, CountPopulation64(0x8000000000000001));
-  EXPECT_EQ(8u, CountPopulation64(0x11111111));
-  EXPECT_EQ(16u, CountPopulation64(0xf0f0f0f0));
-  EXPECT_EQ(24u, CountPopulation64(0xfff0f0ff));
-  EXPECT_EQ(32u, CountPopulation64(0xffffffff));
-  EXPECT_EQ(16u, CountPopulation64(0x1111111111111111));
-  EXPECT_EQ(32u, CountPopulation64(0xf0f0f0f0f0f0f0f0));
-  EXPECT_EQ(48u, CountPopulation64(0xfff0f0fffff0f0ff));
-  EXPECT_EQ(64u, CountPopulation64(0xffffffffffffffff));
+  EXPECT_EQ(0u, CountPopulation(uint64_t{0}));
+  EXPECT_EQ(1u, CountPopulation(uint64_t{1}));
+  EXPECT_EQ(2u, CountPopulation(uint64_t{0x8000000000000001}));
+  EXPECT_EQ(8u, CountPopulation(uint64_t{0x11111111}));
+  EXPECT_EQ(16u, CountPopulation(uint64_t{0xF0F0F0F0}));
+  EXPECT_EQ(24u, CountPopulation(uint64_t{0xFFF0F0FF}));
+  EXPECT_EQ(32u, CountPopulation(uint64_t{0xFFFFFFFF}));
+  EXPECT_EQ(16u, CountPopulation(uint64_t{0x1111111111111111}));
+  EXPECT_EQ(32u, CountPopulation(uint64_t{0xF0F0F0F0F0F0F0F0}));
+  EXPECT_EQ(48u, CountPopulation(uint64_t{0xFFF0F0FFFFF0F0FF}));
+  EXPECT_EQ(64u, CountPopulation(uint64_t{0xFFFFFFFFFFFFFFFF}));
 }
 
+TEST(Bits, CountLeadingZeros16) {
+  EXPECT_EQ(16u, CountLeadingZeros(uint16_t{0}));
+  EXPECT_EQ(15u, CountLeadingZeros(uint16_t{1}));
+  TRACED_FORRANGE(uint16_t, shift, 0, 15) {
+    EXPECT_EQ(15u - shift,
+              CountLeadingZeros(static_cast<uint16_t>(1 << shift)));
+  }
+  EXPECT_EQ(4u, CountLeadingZeros(uint16_t{0x0F0F}));
+}
 
 TEST(Bits, CountLeadingZeros32) {
-  EXPECT_EQ(32u, CountLeadingZeros32(0));
-  EXPECT_EQ(31u, CountLeadingZeros32(1));
+  EXPECT_EQ(32u, CountLeadingZeros(uint32_t{0}));
+  EXPECT_EQ(31u, CountLeadingZeros(uint32_t{1}));
   TRACED_FORRANGE(uint32_t, shift, 0, 31) {
-    EXPECT_EQ(31u - shift, CountLeadingZeros32(1u << shift));
+    EXPECT_EQ(31u - shift, CountLeadingZeros(uint32_t{1} << shift));
   }
-  EXPECT_EQ(4u, CountLeadingZeros32(0x0f0f0f0f));
+  EXPECT_EQ(4u, CountLeadingZeros(uint32_t{0x0F0F0F0F}));
 }
 
-
 TEST(Bits, CountLeadingZeros64) {
-  EXPECT_EQ(64u, CountLeadingZeros64(0));
-  EXPECT_EQ(63u, CountLeadingZeros64(1));
+  EXPECT_EQ(64u, CountLeadingZeros(uint64_t{0}));
+  EXPECT_EQ(63u, CountLeadingZeros(uint64_t{1}));
   TRACED_FORRANGE(uint32_t, shift, 0, 63) {
-    EXPECT_EQ(63u - shift, CountLeadingZeros64(V8_UINT64_C(1) << shift));
+    EXPECT_EQ(63u - shift, CountLeadingZeros(uint64_t{1} << shift));
   }
-  EXPECT_EQ(36u, CountLeadingZeros64(0x0f0f0f0f));
-  EXPECT_EQ(4u, CountLeadingZeros64(0x0f0f0f0f00000000));
+  EXPECT_EQ(36u, CountLeadingZeros(uint64_t{0x0F0F0F0F}));
+  EXPECT_EQ(4u, CountLeadingZeros(uint64_t{0x0F0F0F0F00000000}));
 }
 
+TEST(Bits, CountTrailingZeros16) {
+  EXPECT_EQ(16u, CountTrailingZeros(uint16_t{0}));
+  EXPECT_EQ(15u, CountTrailingZeros(uint16_t{0x8000}));
+  TRACED_FORRANGE(uint16_t, shift, 0, 15) {
+    EXPECT_EQ(shift, CountTrailingZeros(static_cast<uint16_t>(1 << shift)));
+  }
+  EXPECT_EQ(4u, CountTrailingZeros(uint16_t{0xF0F0u}));
+}
 
-TEST(Bits, CountTrailingZeros32) {
-  EXPECT_EQ(32u, CountTrailingZeros32(0));
-  EXPECT_EQ(31u, CountTrailingZeros32(0x80000000));
+TEST(Bits, CountTrailingZerosu32) {
+  EXPECT_EQ(32u, CountTrailingZeros(uint32_t{0}));
+  EXPECT_EQ(31u, CountTrailingZeros(uint32_t{0x80000000}));
   TRACED_FORRANGE(uint32_t, shift, 0, 31) {
-    EXPECT_EQ(shift, CountTrailingZeros32(1u << shift));
+    EXPECT_EQ(shift, CountTrailingZeros(uint32_t{1} << shift));
   }
-  EXPECT_EQ(4u, CountTrailingZeros32(0xf0f0f0f0));
+  EXPECT_EQ(4u, CountTrailingZeros(uint32_t{0xF0F0F0F0u}));
 }
 
+TEST(Bits, CountTrailingZerosi32) {
+  EXPECT_EQ(32u, CountTrailingZeros(int32_t{0}));
+  TRACED_FORRANGE(uint32_t, shift, 0, 31) {
+    EXPECT_EQ(shift, CountTrailingZeros(int32_t{1} << shift));
+  }
+  EXPECT_EQ(4u, CountTrailingZeros(int32_t{0x70F0F0F0u}));
+  EXPECT_EQ(2u, CountTrailingZeros(int32_t{-4}));
+  EXPECT_EQ(0u, CountTrailingZeros(int32_t{-1}));
+}
 
 TEST(Bits, CountTrailingZeros64) {
-  EXPECT_EQ(64u, CountTrailingZeros64(0));
-  EXPECT_EQ(63u, CountTrailingZeros64(0x8000000000000000));
+  EXPECT_EQ(64u, CountTrailingZeros(uint64_t{0}));
+  EXPECT_EQ(63u, CountTrailingZeros(uint64_t{0x8000000000000000}));
   TRACED_FORRANGE(uint32_t, shift, 0, 63) {
-    EXPECT_EQ(shift, CountTrailingZeros64(V8_UINT64_C(1) << shift));
+    EXPECT_EQ(shift, CountTrailingZeros(uint64_t{1} << shift));
   }
-  EXPECT_EQ(4u, CountTrailingZeros64(0xf0f0f0f0));
-  EXPECT_EQ(36u, CountTrailingZeros64(0xf0f0f0f000000000));
+  EXPECT_EQ(4u, CountTrailingZeros(uint64_t{0xF0F0F0F0}));
+  EXPECT_EQ(36u, CountTrailingZeros(uint64_t{0xF0F0F0F000000000}));
 }
 
 
@@ -95,21 +128,21 @@
   TRACED_FORRANGE(uint32_t, shift, 2, 31) {
     EXPECT_FALSE(IsPowerOfTwo((1U << shift) - 1U));
   }
-  EXPECT_FALSE(IsPowerOfTwo(0xffffffff));
+  EXPECT_FALSE(IsPowerOfTwo(0xFFFFFFFF));
 }
 
 
 TEST(Bits, IsPowerOfTwo64) {
-  EXPECT_FALSE(IsPowerOfTwo(V8_UINT64_C(0)));
+  EXPECT_FALSE(IsPowerOfTwo(uint64_t{0}));
   TRACED_FORRANGE(uint32_t, shift, 0, 63) {
-    EXPECT_TRUE(IsPowerOfTwo(V8_UINT64_C(1) << shift));
-    EXPECT_FALSE(IsPowerOfTwo((V8_UINT64_C(1) << shift) + 5U));
-    EXPECT_FALSE(IsPowerOfTwo(~(V8_UINT64_C(1) << shift)));
+    EXPECT_TRUE(IsPowerOfTwo(uint64_t{1} << shift));
+    EXPECT_FALSE(IsPowerOfTwo((uint64_t{1} << shift) + 5U));
+    EXPECT_FALSE(IsPowerOfTwo(~(uint64_t{1} << shift)));
   }
   TRACED_FORRANGE(uint32_t, shift, 2, 63) {
-    EXPECT_FALSE(IsPowerOfTwo((V8_UINT64_C(1) << shift) - 1U));
+    EXPECT_FALSE(IsPowerOfTwo((uint64_t{1} << shift) - 1U));
   }
-  EXPECT_FALSE(IsPowerOfTwo(V8_UINT64_C(0xffffffffffffffff)));
+  EXPECT_FALSE(IsPowerOfTwo(uint64_t{0xFFFFFFFFFFFFFFFF}));
 }
 
 
@@ -120,7 +153,7 @@
   EXPECT_EQ(1u, RoundUpToPowerOfTwo32(0));
   EXPECT_EQ(1u, RoundUpToPowerOfTwo32(1));
   EXPECT_EQ(4u, RoundUpToPowerOfTwo32(3));
-  EXPECT_EQ(0x80000000u, RoundUpToPowerOfTwo32(0x7fffffffu));
+  EXPECT_EQ(0x80000000u, RoundUpToPowerOfTwo32(0x7FFFFFFFu));
 }
 
 
@@ -173,7 +206,7 @@
   }
   EXPECT_EQ(1u, RotateRight64(1, 0));
   EXPECT_EQ(1u, RotateRight64(2, 1));
-  EXPECT_EQ(V8_UINT64_C(0x8000000000000000), RotateRight64(1, 1));
+  EXPECT_EQ(uint64_t{0x8000000000000000}, RotateRight64(1, 1));
 }
 
 
diff --git a/src/v8/test/unittests/base/functional-unittest.cc b/src/v8/test/unittests/base/functional-unittest.cc
index 97a27a4..10f9f32 100644
--- a/src/v8/test/unittests/base/functional-unittest.cc
+++ b/src/v8/test/unittests/base/functional-unittest.cc
@@ -31,9 +31,28 @@
   EXPECT_EQ(h(0.0), h(-0.0));
 }
 
+namespace {
+
+inline int64_t GetRandomSeedFromFlag(int random_seed) {
+  return random_seed ? random_seed : TimeTicks::Now().ToInternalValue();
+}
+
+}  // namespace
 
 template <typename T>
-class FunctionalTest : public TestWithRandomNumberGenerator {};
+class FunctionalTest : public ::testing::Test {
+ public:
+  FunctionalTest()
+      : rng_(GetRandomSeedFromFlag(::v8::internal::FLAG_random_seed)) {}
+  virtual ~FunctionalTest() {}
+
+  RandomNumberGenerator* rng() { return &rng_; }
+
+ private:
+  RandomNumberGenerator rng_;
+
+  DISALLOW_COPY_AND_ASSIGN(FunctionalTest);
+};
 
 typedef ::testing::Types<signed char, unsigned char,
                          short,                    // NOLINT(runtime/int)
diff --git a/src/v8/test/unittests/base/logging-unittest.cc b/src/v8/test/unittests/base/logging-unittest.cc
index fd334ec..a0686a2 100644
--- a/src/v8/test/unittests/base/logging-unittest.cc
+++ b/src/v8/test/unittests/base/logging-unittest.cc
@@ -32,30 +32,34 @@
 }  // namespace
 
 TEST(LoggingTest, CheckEQImpl) {
-  CHECK_SUCCEED(EQ, 0.0, 0.0)
-  CHECK_SUCCEED(EQ, 0.0, -0.0)
-  CHECK_SUCCEED(EQ, -0.0, 0.0)
-  CHECK_SUCCEED(EQ, -0.0, -0.0)
+  CHECK_SUCCEED(EQ, 0.0, 0.0);
+  CHECK_SUCCEED(EQ, 0.0, -0.0);
+  CHECK_SUCCEED(EQ, -0.0, 0.0);
+  CHECK_SUCCEED(EQ, -0.0, -0.0);
 }
 
 TEST(LoggingTest, CompareSignedMismatch) {
-  CHECK_SUCCEED(EQ, static_cast<int32_t>(14), static_cast<uint32_t>(14))
-  CHECK_FAIL(EQ, static_cast<int32_t>(14), static_cast<uint32_t>(15))
-  CHECK_FAIL(EQ, static_cast<int32_t>(-1), static_cast<uint32_t>(-1))
-  CHECK_SUCCEED(LT, static_cast<int32_t>(-1), static_cast<uint32_t>(0))
-  CHECK_SUCCEED(LT, static_cast<int32_t>(-1), static_cast<uint32_t>(-1))
-  CHECK_SUCCEED(LE, static_cast<int32_t>(-1), static_cast<uint32_t>(0))
-  CHECK_SUCCEED(LE, static_cast<int32_t>(55), static_cast<uint32_t>(55))
-  CHECK_SUCCEED(LT, static_cast<int32_t>(55), static_cast<uint32_t>(0x7fffff00))
-  CHECK_SUCCEED(LE, static_cast<int32_t>(55), static_cast<uint32_t>(0x7fffff00))
-  CHECK_SUCCEED(GE, static_cast<uint32_t>(0x7fffff00), static_cast<int32_t>(55))
-  CHECK_SUCCEED(GT, static_cast<uint32_t>(0x7fffff00), static_cast<int32_t>(55))
-  CHECK_SUCCEED(GT, static_cast<uint32_t>(-1), static_cast<int32_t>(-1))
-  CHECK_SUCCEED(GE, static_cast<uint32_t>(0), static_cast<int32_t>(-1))
-  CHECK_SUCCEED(LT, static_cast<int8_t>(-1), static_cast<uint32_t>(0))
-  CHECK_SUCCEED(GT, static_cast<uint64_t>(0x7f01010101010101), 0)
-  CHECK_SUCCEED(LE, static_cast<int64_t>(0xff01010101010101),
-                static_cast<uint8_t>(13))
+  CHECK_SUCCEED(EQ, static_cast<int32_t>(14), static_cast<uint32_t>(14));
+  CHECK_FAIL(EQ, static_cast<int32_t>(14), static_cast<uint32_t>(15));
+  CHECK_FAIL(EQ, static_cast<int32_t>(-1), static_cast<uint32_t>(-1));
+  CHECK_SUCCEED(LT, static_cast<int32_t>(-1), static_cast<uint32_t>(0));
+  CHECK_SUCCEED(LT, static_cast<int32_t>(-1), static_cast<uint32_t>(-1));
+  CHECK_SUCCEED(LE, static_cast<int32_t>(-1), static_cast<uint32_t>(0));
+  CHECK_SUCCEED(LE, static_cast<int32_t>(55), static_cast<uint32_t>(55));
+  CHECK_SUCCEED(LT, static_cast<int32_t>(55),
+                static_cast<uint32_t>(0x7FFFFF00));
+  CHECK_SUCCEED(LE, static_cast<int32_t>(55),
+                static_cast<uint32_t>(0x7FFFFF00));
+  CHECK_SUCCEED(GE, static_cast<uint32_t>(0x7FFFFF00),
+                static_cast<int32_t>(55));
+  CHECK_SUCCEED(GT, static_cast<uint32_t>(0x7FFFFF00),
+                static_cast<int32_t>(55));
+  CHECK_SUCCEED(GT, static_cast<uint32_t>(-1), static_cast<int32_t>(-1));
+  CHECK_SUCCEED(GE, static_cast<uint32_t>(0), static_cast<int32_t>(-1));
+  CHECK_SUCCEED(LT, static_cast<int8_t>(-1), static_cast<uint32_t>(0));
+  CHECK_SUCCEED(GT, static_cast<uint64_t>(0x7F01010101010101), 0);
+  CHECK_SUCCEED(LE, static_cast<int64_t>(0xFF01010101010101),
+                static_cast<uint8_t>(13));
 }
 
 TEST(LoggingTest, CompareAgainstStaticConstPointer) {
diff --git a/src/v8/test/unittests/base/ostreams-unittest.cc b/src/v8/test/unittests/base/ostreams-unittest.cc
index 31744cd..1444eb7 100644
--- a/src/v8/test/unittests/base/ostreams-unittest.cc
+++ b/src/v8/test/unittests/base/ostreams-unittest.cc
@@ -47,7 +47,7 @@
   testAsHexBytes("23 01", AsHexBytes(0x123, 1));
   testAsHexBytes("23 01", AsHexBytes(0x123, 2));
   testAsHexBytes("23 01 00", AsHexBytes(0x123, 3));
-  testAsHexBytes("ff ff ff ff", AsHexBytes(0xffffffff));
+  testAsHexBytes("ff ff ff ff", AsHexBytes(0xFFFFFFFF));
   testAsHexBytes("00 00 00 00", AsHexBytes(0, 4));
   testAsHexBytes("56 34 12", AsHexBytes(0x123456));
 
@@ -58,7 +58,7 @@
   testAsHexBytes("01 23", AsHexBytes(0x123, 1, AsHexBytes::kBigEndian));
   testAsHexBytes("01 23", AsHexBytes(0x123, 2, AsHexBytes::kBigEndian));
   testAsHexBytes("00 01 23", AsHexBytes(0x123, 3, AsHexBytes::kBigEndian));
-  testAsHexBytes("ff ff ff ff", AsHexBytes(0xffffffff, AsHexBytes::kBigEndian));
+  testAsHexBytes("ff ff ff ff", AsHexBytes(0xFFFFFFFF, AsHexBytes::kBigEndian));
   testAsHexBytes("00 00 00 00", AsHexBytes(0, 4, AsHexBytes::kBigEndian));
   testAsHexBytes("12 34 56", AsHexBytes(0x123456, 1, AsHexBytes::kBigEndian));
 }
diff --git a/src/v8/test/unittests/base/platform/platform-unittest.cc b/src/v8/test/unittests/base/platform/platform-unittest.cc
index 69efc48..f9fc26a 100644
--- a/src/v8/test/unittests/base/platform/platform-unittest.cc
+++ b/src/v8/test/unittests/base/platform/platform-unittest.cc
@@ -4,23 +4,8 @@
 
 #include "src/base/platform/platform.h"
 
-#if V8_OS_POSIX
-#include <setjmp.h>
-#include <signal.h>
-#include <unistd.h>  // NOLINT
-#endif
-
-#if V8_OS_WIN
-#include "src/base/win32-headers.h"
-#endif
 #include "testing/gtest/include/gtest/gtest.h"
 
-#if V8_OS_ANDROID
-#define DISABLE_ON_ANDROID(Name) DISABLED_##Name
-#else
-#define DISABLE_ON_ANDROID(Name) Name
-#endif
-
 namespace v8 {
 namespace base {
 
@@ -98,107 +83,5 @@
   Join();
 }
 
-#if V8_OS_POSIX
-// TODO(eholk): Add a windows version of these tests
-
-namespace {
-
-// These tests make sure the routines to allocate memory do so with the correct
-// permissions.
-//
-// Unfortunately, there is no API to find the protection of a memory address,
-// so instead we test permissions by installing a signal handler, probing a
-// memory location and recovering from the fault.
-//
-// We don't test the execution permission because to do so we'd have to
-// dynamically generate code and test if we can execute it.
-
-class MemoryAllocationPermissionsTest : public ::testing::Test {
-  static void SignalHandler(int signal, siginfo_t* info, void*) {
-    siglongjmp(continuation_, 1);
-  }
-  struct sigaction old_action_;
-// On Mac, sometimes we get SIGBUS instead of SIGSEGV.
-#if V8_OS_MACOSX
-  struct sigaction old_bus_action_;
-#endif
-
- protected:
-  virtual void SetUp() {
-    struct sigaction action;
-    action.sa_sigaction = SignalHandler;
-    sigemptyset(&action.sa_mask);
-    action.sa_flags = SA_SIGINFO;
-    sigaction(SIGSEGV, &action, &old_action_);
-#if V8_OS_MACOSX
-    sigaction(SIGBUS, &action, &old_bus_action_);
-#endif
-  }
-
-  virtual void TearDown() {
-    // be a good citizen and restore the old signal handler.
-    sigaction(SIGSEGV, &old_action_, nullptr);
-#if V8_OS_MACOSX
-    sigaction(SIGBUS, &old_bus_action_, nullptr);
-#endif
-  }
-
- public:
-  static sigjmp_buf continuation_;
-
-  enum class MemoryAction { kRead, kWrite };
-
-  void ProbeMemory(volatile int* buffer, MemoryAction action,
-                   bool should_succeed) {
-    const int save_sigs = 1;
-    if (!sigsetjmp(continuation_, save_sigs)) {
-      switch (action) {
-        case MemoryAction::kRead: {
-          // static_cast to remove the reference and force a memory read.
-          USE(static_cast<int>(*buffer));
-          break;
-        }
-        case MemoryAction::kWrite: {
-          *buffer = 0;
-          break;
-        }
-      }
-      if (should_succeed) {
-        SUCCEED();
-      } else {
-        FAIL();
-      }
-      return;
-    }
-    if (should_succeed) {
-      FAIL();
-    } else {
-      SUCCEED();
-    }
-  }
-
-  void TestPermissions(OS::MemoryPermission permission, bool can_read,
-                       bool can_write) {
-    const size_t allocation_size = OS::CommitPageSize();
-    size_t actual = 0;
-    int* buffer =
-        static_cast<int*>(OS::Allocate(allocation_size, &actual, permission));
-    ProbeMemory(buffer, MemoryAction::kRead, can_read);
-    ProbeMemory(buffer, MemoryAction::kWrite, can_write);
-    OS::Free(buffer, actual);
-  }
-};
-
-sigjmp_buf MemoryAllocationPermissionsTest::continuation_;
-
-TEST_F(MemoryAllocationPermissionsTest, DoTest) {
-  TestPermissions(OS::MemoryPermission::kNoAccess, false, false);
-  TestPermissions(OS::MemoryPermission::kReadWrite, true, true);
-  TestPermissions(OS::MemoryPermission::kReadWriteExecute, true, true);
-}
-
-}  // namespace
-#endif  // V8_OS_POSIX
-
 }  // namespace base
 }  // namespace v8
diff --git a/src/v8/test/unittests/base/template-utils-unittest.cc b/src/v8/test/unittests/base/template-utils-unittest.cc
index ea8796a..2c1da8e 100644
--- a/src/v8/test/unittests/base/template-utils-unittest.cc
+++ b/src/v8/test/unittests/base/template-utils-unittest.cc
@@ -101,6 +101,63 @@
 static_assert(!has_output_operator<const TestClass2>::value,
               "const TestClass2 can not be output");
 
+//////////////////////////////
+// Test fold.
+//////////////////////////////
+
+struct FoldAllSameType {
+  constexpr uint32_t operator()(uint32_t a, uint32_t b) const { return a | b; }
+};
+static_assert(base::fold(FoldAllSameType{}, 3, 6) == 7, "check fold");
+// Test that it works if implicit conversion is needed for one of the
+// parameters.
+static_assert(base::fold(FoldAllSameType{}, uint8_t{1}, 256) == 257,
+              "check correct type inference");
+// Test a single parameter.
+static_assert(base::fold(FoldAllSameType{}, 25) == 25,
+              "check folding a single argument");
+
+TEST(TemplateUtilsTest, FoldDifferentType) {
+  auto fn = [](std::string str, char c) {
+    str.push_back(c);
+    return str;
+  };
+  CHECK_EQ(base::fold(fn, std::string("foo"), 'b', 'a', 'r'), "foobar");
+}
+
+TEST(TemplateUtilsTest, FoldMoveOnlyType) {
+  auto fn = [](std::unique_ptr<std::string> str, char c) {
+    str->push_back(c);
+    return str;
+  };
+  std::unique_ptr<std::string> str = base::make_unique<std::string>("foo");
+  std::unique_ptr<std::string> folded =
+      base::fold(fn, std::move(str), 'b', 'a', 'r');
+  CHECK_NULL(str);
+  CHECK_NOT_NULL(folded);
+  CHECK_EQ(*folded, "foobar");
+}
+
+struct TemplatizedFoldFunctor {
+  template <typename T, typename... Tup>
+  std::tuple<Tup..., typename std::decay<T>::type> operator()(
+      std::tuple<Tup...> tup, T&& val) {
+    return std::tuple_cat(std::move(tup),
+                          std::make_tuple(std::forward<T>(val)));
+  }
+};
+TEST(TemplateUtilsTest, FoldToTuple) {
+  auto input = std::make_tuple(char{'x'}, int{4}, double{3.2},
+                               std::unique_ptr<uint8_t>{}, std::string{"foo"});
+  auto result =
+      base::fold(TemplatizedFoldFunctor{}, std::make_tuple(),
+                 std::get<0>(input), std::get<1>(input), std::get<2>(input),
+                 std::unique_ptr<uint8_t>{}, std::get<4>(input));
+  static_assert(std::is_same<decltype(result), decltype(input)>::value,
+                "the resulting tuple should have the same type as the input");
+  DCHECK_EQ(input, result);
+}
+
 }  // namespace template_utils_unittest
 }  // namespace base
 }  // namespace v8
diff --git a/src/v8/test/unittests/base/utils/random-number-generator-unittest.cc b/src/v8/test/unittests/base/utils/random-number-generator-unittest.cc
index 7c533db..38c14cd 100644
--- a/src/v8/test/unittests/base/utils/random-number-generator-unittest.cc
+++ b/src/v8/test/unittests/base/utils/random-number-generator-unittest.cc
@@ -12,9 +12,38 @@
 
 class RandomNumberGeneratorTest : public ::testing::TestWithParam<int> {};
 
-
 static const int kMaxRuns = 12345;
 
+static void CheckSample(std::vector<uint64_t> sample, uint64_t max,
+                        size_t size) {
+  EXPECT_EQ(sample.size(), size);
+
+  // Check if values are unique.
+  std::sort(sample.begin(), sample.end());
+  EXPECT_EQ(std::adjacent_find(sample.begin(), sample.end()), sample.end());
+
+  for (uint64_t x : sample) {
+    EXPECT_LT(x, max);
+  }
+}
+
+static void CheckSlowSample(const std::vector<uint64_t>& sample, uint64_t max,
+                            size_t size,
+                            const std::unordered_set<uint64_t>& excluded) {
+  CheckSample(sample, max, size);
+
+  for (uint64_t i : sample) {
+    EXPECT_FALSE(excluded.count(i));
+  }
+}
+
+static void TestNextSample(RandomNumberGenerator& rng, uint64_t max,
+                           size_t size, bool slow = false) {
+  std::vector<uint64_t> sample =
+      slow ? rng.NextSampleSlow(max, size) : rng.NextSample(max, size);
+
+  CheckSample(sample, max, size);
+}
 
 TEST_P(RandomNumberGeneratorTest, NextIntWithMaxValue) {
   RandomNumberGenerator rng(GetParam());
@@ -44,6 +73,176 @@
   }
 }
 
+#if GTEST_HAS_DEATH_TEST
+TEST(RandomNumberGenerator, NextSampleInvalidParam) {
+  RandomNumberGenerator rng(123);
+  std::vector<uint64_t> sample;
+  EXPECT_DEATH(sample = rng.NextSample(10, 11), ".*Check failed: n <= max.*");
+}
+
+TEST(RandomNumberGenerator, NextSampleSlowInvalidParam1) {
+  RandomNumberGenerator rng(123);
+  std::vector<uint64_t> sample;
+  EXPECT_DEATH(sample = rng.NextSampleSlow(10, 11),
+               ".*Check failed: max - excluded.size*");
+}
+
+TEST(RandomNumberGenerator, NextSampleSlowInvalidParam2) {
+  RandomNumberGenerator rng(123);
+  std::vector<uint64_t> sample;
+  EXPECT_DEATH(sample = rng.NextSampleSlow(5, 3, {0, 2, 3}),
+               ".*Check failed: max - excluded.size*");
+}
+#endif
+
+TEST_P(RandomNumberGeneratorTest, NextSample0) {
+  size_t m = 1;
+  RandomNumberGenerator rng(GetParam());
+
+  TestNextSample(rng, m, 0);
+}
+
+TEST_P(RandomNumberGeneratorTest, NextSampleSlow0) {
+  size_t m = 1;
+  RandomNumberGenerator rng(GetParam());
+
+  TestNextSample(rng, m, 0, true);
+}
+
+TEST_P(RandomNumberGeneratorTest, NextSample1) {
+  size_t m = 10;
+  RandomNumberGenerator rng(GetParam());
+
+  for (int k = 0; k < kMaxRuns; ++k) {
+    TestNextSample(rng, m, 1);
+  }
+}
+
+TEST_P(RandomNumberGeneratorTest, NextSampleSlow1) {
+  size_t m = 10;
+  RandomNumberGenerator rng(GetParam());
+
+  for (int k = 0; k < kMaxRuns; ++k) {
+    TestNextSample(rng, m, 1, true);
+  }
+}
+
+TEST_P(RandomNumberGeneratorTest, NextSampleMax) {
+  size_t m = 10;
+  RandomNumberGenerator rng(GetParam());
+
+  for (int k = 0; k < kMaxRuns; ++k) {
+    TestNextSample(rng, m, m);
+  }
+}
+
+TEST_P(RandomNumberGeneratorTest, NextSampleSlowMax) {
+  size_t m = 10;
+  RandomNumberGenerator rng(GetParam());
+
+  for (int k = 0; k < kMaxRuns; ++k) {
+    TestNextSample(rng, m, m, true);
+  }
+}
+
+TEST_P(RandomNumberGeneratorTest, NextSampleHalf) {
+  size_t n = 5;
+  uint64_t m = 10;
+  RandomNumberGenerator rng(GetParam());
+
+  for (int k = 0; k < kMaxRuns; ++k) {
+    TestNextSample(rng, m, n);
+  }
+}
+
+TEST_P(RandomNumberGeneratorTest, NextSampleSlowHalf) {
+  size_t n = 5;
+  uint64_t m = 10;
+  RandomNumberGenerator rng(GetParam());
+
+  for (int k = 0; k < kMaxRuns; ++k) {
+    TestNextSample(rng, m, n, true);
+  }
+}
+
+TEST_P(RandomNumberGeneratorTest, NextSampleMoreThanHalf) {
+  size_t n = 90;
+  uint64_t m = 100;
+  RandomNumberGenerator rng(GetParam());
+
+  for (int k = 0; k < kMaxRuns; ++k) {
+    TestNextSample(rng, m, n);
+  }
+}
+
+TEST_P(RandomNumberGeneratorTest, NextSampleSlowMoreThanHalf) {
+  size_t n = 90;
+  uint64_t m = 100;
+  RandomNumberGenerator rng(GetParam());
+
+  for (int k = 0; k < kMaxRuns; ++k) {
+    TestNextSample(rng, m, n, true);
+  }
+}
+
+TEST_P(RandomNumberGeneratorTest, NextSampleLessThanHalf) {
+  size_t n = 10;
+  uint64_t m = 100;
+  RandomNumberGenerator rng(GetParam());
+
+  for (int k = 0; k < kMaxRuns; ++k) {
+    TestNextSample(rng, m, n);
+  }
+}
+
+TEST_P(RandomNumberGeneratorTest, NextSampleSlowLessThanHalf) {
+  size_t n = 10;
+  uint64_t m = 100;
+  RandomNumberGenerator rng(GetParam());
+
+  for (int k = 0; k < kMaxRuns; ++k) {
+    TestNextSample(rng, m, n, true);
+  }
+}
+
+TEST_P(RandomNumberGeneratorTest, NextSampleSlowExcluded) {
+  size_t n = 2;
+  uint64_t m = 10;
+  std::unordered_set<uint64_t> excluded = {2, 4, 5, 9};
+  RandomNumberGenerator rng(GetParam());
+
+  for (int k = 0; k < kMaxRuns; ++k) {
+    std::vector<uint64_t> sample = rng.NextSampleSlow(m, n, excluded);
+
+    CheckSlowSample(sample, m, n, excluded);
+  }
+}
+
+TEST_P(RandomNumberGeneratorTest, NextSampleSlowExcludedMax1) {
+  size_t n = 1;
+  uint64_t m = 5;
+  std::unordered_set<uint64_t> excluded = {0, 2, 3, 4};
+  RandomNumberGenerator rng(GetParam());
+
+  for (int k = 0; k < kMaxRuns; ++k) {
+    std::vector<uint64_t> sample = rng.NextSampleSlow(m, n, excluded);
+
+    CheckSlowSample(sample, m, n, excluded);
+  }
+}
+
+TEST_P(RandomNumberGeneratorTest, NextSampleSlowExcludedMax2) {
+  size_t n = 7;
+  uint64_t m = 10;
+  std::unordered_set<uint64_t> excluded = {0, 4, 8};
+  RandomNumberGenerator rng(GetParam());
+
+  for (int k = 0; k < kMaxRuns; ++k) {
+    std::vector<uint64_t> sample = rng.NextSampleSlow(m, n, excluded);
+
+    CheckSlowSample(sample, m, n, excluded);
+  }
+}
 
 INSTANTIATE_TEST_CASE_P(RandomSeeds, RandomNumberGeneratorTest,
                         ::testing::Values(INT_MIN, -1, 0, 1, 42, 100,
diff --git a/src/v8/test/unittests/bigint-unittest.cc b/src/v8/test/unittests/bigint-unittest.cc
new file mode 100644
index 0000000..6e1018c
--- /dev/null
+++ b/src/v8/test/unittests/bigint-unittest.cc
@@ -0,0 +1,115 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include <cmath>
+
+#include "src/conversions.h"
+#include "src/factory.h"
+#include "src/isolate.h"
+#include "src/objects-inl.h"
+#include "src/objects/bigint.h"
+#include "test/unittests/test-utils.h"
+
+#include "testing/gtest/include/gtest/gtest.h"
+
+namespace v8 {
+namespace internal {
+
+typedef TestWithIsolate BigIntWithIsolate;
+
+void Compare(Handle<BigInt> x, double value, ComparisonResult expected) {
+  CHECK_EQ(expected, BigInt::CompareToDouble(x, value));
+}
+
+Handle<BigInt> NewFromInt(Isolate* isolate, int value) {
+  Handle<Smi> smi_value = handle(Smi::FromInt(value), isolate);
+  return BigInt::FromNumber(isolate, smi_value).ToHandleChecked();
+}
+
+TEST_F(BigIntWithIsolate, CompareToDouble) {
+  Handle<BigInt> zero = NewFromInt(isolate(), 0);
+  Handle<BigInt> one = NewFromInt(isolate(), 1);
+  Handle<BigInt> minus_one = NewFromInt(isolate(), -1);
+
+  // Non-finite doubles.
+  Compare(zero, std::nan(""), ComparisonResult::kUndefined);
+  Compare(one, INFINITY, ComparisonResult::kLessThan);
+  Compare(one, -INFINITY, ComparisonResult::kGreaterThan);
+
+  // Unequal sign.
+  Compare(one, -1, ComparisonResult::kGreaterThan);
+  Compare(minus_one, 1, ComparisonResult::kLessThan);
+
+  // Cases involving zero.
+  Compare(zero, 0, ComparisonResult::kEqual);
+  Compare(zero, -0, ComparisonResult::kEqual);
+  Compare(one, 0, ComparisonResult::kGreaterThan);
+  Compare(minus_one, 0, ComparisonResult::kLessThan);
+  Compare(zero, 1, ComparisonResult::kLessThan);
+  Compare(zero, -1, ComparisonResult::kGreaterThan);
+
+  // Small doubles.
+  Compare(zero, 0.25, ComparisonResult::kLessThan);
+  Compare(one, 0.5, ComparisonResult::kGreaterThan);
+  Compare(one, -0.5, ComparisonResult::kGreaterThan);
+  Compare(zero, -0.25, ComparisonResult::kGreaterThan);
+  Compare(minus_one, -0.5, ComparisonResult::kLessThan);
+
+  // Different bit lengths.
+  Handle<BigInt> four = NewFromInt(isolate(), 4);
+  Handle<BigInt> minus_five = NewFromInt(isolate(), -5);
+  Compare(four, 3.9, ComparisonResult::kGreaterThan);
+  Compare(four, 1.5, ComparisonResult::kGreaterThan);
+  Compare(four, 8, ComparisonResult::kLessThan);
+  Compare(four, 16, ComparisonResult::kLessThan);
+  Compare(minus_five, -4.9, ComparisonResult::kLessThan);
+  Compare(minus_five, -4, ComparisonResult::kLessThan);
+  Compare(minus_five, -25, ComparisonResult::kGreaterThan);
+
+  // Same bit length, difference in first digit.
+  double big_double = 4428155326412785451008.0;
+  Handle<BigInt> big =
+      BigIntLiteral(isolate(), "0xF10D00000000000000").ToHandleChecked();
+  Compare(big, big_double, ComparisonResult::kGreaterThan);
+  big = BigIntLiteral(isolate(), "0xE00D00000000000000").ToHandleChecked();
+  Compare(big, big_double, ComparisonResult::kLessThan);
+
+  double other_double = -13758438578910658560.0;
+  Handle<BigInt> other =
+      BigIntLiteral(isolate(), "-0xBEEFC1FE00000000").ToHandleChecked();
+  Compare(other, other_double, ComparisonResult::kGreaterThan);
+  other = BigIntLiteral(isolate(), "-0xBEEFCBFE00000000").ToHandleChecked();
+  Compare(other, other_double, ComparisonResult::kLessThan);
+
+  // Same bit length, difference in non-first digit.
+  big = BigIntLiteral(isolate(), "0xF00D00000000000001").ToHandleChecked();
+  Compare(big, big_double, ComparisonResult::kGreaterThan);
+  big = BigIntLiteral(isolate(), "0xF00A00000000000000").ToHandleChecked();
+  Compare(big, big_double, ComparisonResult::kLessThan);
+
+  other = BigIntLiteral(isolate(), "-0xBEEFCAFE00000001").ToHandleChecked();
+  Compare(other, other_double, ComparisonResult::kLessThan);
+
+  // Same bit length, difference in fractional part.
+  Compare(one, 1.5, ComparisonResult::kLessThan);
+  Compare(minus_one, -1.25, ComparisonResult::kGreaterThan);
+  big = NewFromInt(isolate(), 0xF00D00);
+  Compare(big, 15731968.125, ComparisonResult::kLessThan);
+  Compare(big, 15731967.875, ComparisonResult::kGreaterThan);
+  big = BigIntLiteral(isolate(), "0x123456789AB").ToHandleChecked();
+  Compare(big, 1250999896491.125, ComparisonResult::kLessThan);
+
+  // Equality!
+  Compare(one, 1, ComparisonResult::kEqual);
+  Compare(minus_one, -1, ComparisonResult::kEqual);
+  big = BigIntLiteral(isolate(), "0xF00D00000000000000").ToHandleChecked();
+  Compare(big, big_double, ComparisonResult::kEqual);
+
+  Handle<BigInt> two_52 =
+      BigIntLiteral(isolate(), "0x10000000000000").ToHandleChecked();
+  Compare(two_52, 4503599627370496.0, ComparisonResult::kEqual);
+}
+
+}  // namespace internal
+}  // namespace v8
diff --git a/src/v8/test/unittests/compiler-dispatcher/compiler-dispatcher-tracer-unittest.cc b/src/v8/test/unittests/compiler-dispatcher/compiler-dispatcher-tracer-unittest.cc
index 4ace9ef..6ae5c7b 100644
--- a/src/v8/test/unittests/compiler-dispatcher/compiler-dispatcher-tracer-unittest.cc
+++ b/src/v8/test/unittests/compiler-dispatcher/compiler-dispatcher-tracer-unittest.cc
@@ -11,40 +11,36 @@
 TEST(CompilerDispatcherTracerTest, EstimateWithoutSamples) {
   CompilerDispatcherTracer tracer(nullptr);
 
-  EXPECT_EQ(0.0, tracer.EstimatePrepareToParseInMs());
-  EXPECT_EQ(1.0, tracer.EstimateParseInMs(0));
-  EXPECT_EQ(1.0, tracer.EstimateParseInMs(42));
-  EXPECT_EQ(0.0, tracer.EstimateFinalizeParsingInMs());
-  EXPECT_EQ(0.0, tracer.EstimatePrepareToCompileInMs());
-  EXPECT_EQ(0.0, tracer.EstimateCompileInMs());
-  EXPECT_EQ(0.0, tracer.EstimateCompileInMs());
-  EXPECT_EQ(0.0, tracer.EstimateFinalizeCompilingInMs());
+  EXPECT_EQ(0.0, tracer.EstimatePrepareInMs());
+  EXPECT_EQ(1.0, tracer.EstimateCompileInMs(1));
+  EXPECT_EQ(1.0, tracer.EstimateCompileInMs(42));
+  EXPECT_EQ(0.0, tracer.EstimateFinalizeInMs());
 }
 
 TEST(CompilerDispatcherTracerTest, Average) {
   CompilerDispatcherTracer tracer(nullptr);
 
-  EXPECT_EQ(0.0, tracer.EstimatePrepareToParseInMs());
+  EXPECT_EQ(0.0, tracer.EstimatePrepareInMs());
 
-  tracer.RecordPrepareToParse(1.0);
-  tracer.RecordPrepareToParse(2.0);
-  tracer.RecordPrepareToParse(3.0);
+  tracer.RecordPrepare(1.0);
+  tracer.RecordPrepare(2.0);
+  tracer.RecordPrepare(3.0);
 
-  EXPECT_EQ((1.0 + 2.0 + 3.0) / 3, tracer.EstimatePrepareToParseInMs());
+  EXPECT_EQ((1.0 + 2.0 + 3.0) / 3, tracer.EstimatePrepareInMs());
 }
 
 TEST(CompilerDispatcherTracerTest, SizeBasedAverage) {
   CompilerDispatcherTracer tracer(nullptr);
 
-  EXPECT_EQ(1.0, tracer.EstimateParseInMs(100));
+  EXPECT_EQ(1.0, tracer.EstimateCompileInMs(100));
 
   // All three samples parse 100 units/ms.
-  tracer.RecordParse(1.0, 100);
-  tracer.RecordParse(2.0, 200);
-  tracer.RecordParse(3.0, 300);
+  tracer.RecordCompile(1.0, 100);
+  tracer.RecordCompile(2.0, 200);
+  tracer.RecordCompile(3.0, 300);
 
-  EXPECT_EQ(1.0, tracer.EstimateParseInMs(100));
-  EXPECT_EQ(5.0, tracer.EstimateParseInMs(500));
+  EXPECT_EQ(1.0, tracer.EstimateCompileInMs(100));
+  EXPECT_EQ(5.0, tracer.EstimateCompileInMs(500));
 }
 
 }  // namespace internal
diff --git a/src/v8/test/unittests/compiler-dispatcher/compiler-dispatcher-unittest.cc b/src/v8/test/unittests/compiler-dispatcher/compiler-dispatcher-unittest.cc
index 5d776d3..a0ddd1e 100644
--- a/src/v8/test/unittests/compiler-dispatcher/compiler-dispatcher-unittest.cc
+++ b/src/v8/test/unittests/compiler-dispatcher/compiler-dispatcher-unittest.cc
@@ -31,9 +31,8 @@
 #define STR(x) _STR(x)
 #define _SCRIPT(fn, a, b, c) a fn b fn c
 #define SCRIPT(a, b, c) _SCRIPT("f" STR(__LINE__), a, b, c)
-#define TEST_SCRIPT()                           \
-  SCRIPT("function g() { var y = 1; function ", \
-         "(x) { return x * y }; return ", "; } g();")
+#define TEST_SCRIPT() \
+  "function f" STR(__LINE__) "(x, y) { return x * y }; f" STR(__LINE__) ";"
 
 namespace v8 {
 namespace internal {
@@ -62,55 +61,25 @@
 
 SaveFlags* CompilerDispatcherTestFlags::save_flags_ = nullptr;
 
-class CompilerDispatcherTest : public TestWithContext {
+class CompilerDispatcherTest : public TestWithNativeContext {
  public:
   CompilerDispatcherTest() = default;
   ~CompilerDispatcherTest() override = default;
 
   static void SetUpTestCase() {
     CompilerDispatcherTestFlags::SetFlagsForTest();
-    TestWithContext::SetUpTestCase();
+    TestWithNativeContext ::SetUpTestCase();
   }
 
   static void TearDownTestCase() {
-    TestWithContext::TearDownTestCase();
+    TestWithNativeContext ::TearDownTestCase();
     CompilerDispatcherTestFlags::RestoreFlags();
   }
 
-  static UnoptimizedCompileJob::Status GetUnoptimizedJobStatus(
-      const CompilerDispatcherJob* job) {
-    CHECK_EQ(CompilerDispatcherJob::kUnoptimizedCompile, job->type());
-    return job->AsUnoptimizedCompileJob()->status();
-  }
-
-  static UnoptimizedCompileJob::Status GetUnoptimizedJobStatus(
-      const std::unique_ptr<CompilerDispatcherJob>& job) {
-    return GetUnoptimizedJobStatus(job.get());
-  }
-
  private:
   DISALLOW_COPY_AND_ASSIGN(CompilerDispatcherTest);
 };
 
-class CompilerDispatcherTestWithoutContext : public v8::TestWithIsolate {
- public:
-  CompilerDispatcherTestWithoutContext() = default;
-  ~CompilerDispatcherTestWithoutContext() override = default;
-
-  static void SetUpTestCase() {
-    CompilerDispatcherTestFlags::SetFlagsForTest();
-    TestWithContext::SetUpTestCase();
-  }
-
-  static void TearDownTestCase() {
-    TestWithContext::TearDownTestCase();
-    CompilerDispatcherTestFlags::RestoreFlags();
-  }
-
- private:
-  DISALLOW_COPY_AND_ASSIGN(CompilerDispatcherTestWithoutContext);
-};
-
 namespace {
 
 class MockPlatform : public v8::Platform {
@@ -130,6 +99,18 @@
 
   size_t NumberOfAvailableBackgroundThreads() override { return 1; }
 
+  std::shared_ptr<TaskRunner> GetForegroundTaskRunner(
+      v8::Isolate* isolate) override {
+    constexpr bool is_foreground_task_runner = true;
+    return std::make_shared<MockTaskRunner>(this, is_foreground_task_runner);
+  }
+
+  std::shared_ptr<TaskRunner> GetBackgroundTaskRunner(
+      v8::Isolate* isolate) override {
+    constexpr bool is_foreground_task_runner = false;
+    return std::make_shared<MockTaskRunner>(this, is_foreground_task_runner);
+  }
+
   void CallOnBackgroundThread(Task* task,
                               ExpectedRuntime expected_runtime) override {
     base::LockGuard<base::Mutex> lock(&mutex_);
@@ -282,6 +263,43 @@
     DISALLOW_COPY_AND_ASSIGN(TaskWrapper);
   };
 
+  class MockTaskRunner final : public TaskRunner {
+   public:
+    MockTaskRunner(MockPlatform* platform, bool is_foreground_task_runner)
+        : platform_(platform),
+          is_foreground_task_runner_(is_foreground_task_runner) {}
+
+    void PostTask(std::unique_ptr<v8::Task> task) override {
+      base::LockGuard<base::Mutex> lock(&platform_->mutex_);
+      if (is_foreground_task_runner_) {
+        platform_->foreground_tasks_.push_back(task.release());
+      } else {
+        platform_->background_tasks_.push_back(task.release());
+      }
+    }
+
+    void PostDelayedTask(std::unique_ptr<Task> task,
+                         double delay_in_seconds) override {
+      UNREACHABLE();
+    };
+
+    void PostIdleTask(std::unique_ptr<IdleTask> task) override {
+      DCHECK(IdleTasksEnabled());
+      base::LockGuard<base::Mutex> lock(&platform_->mutex_);
+      ASSERT_TRUE(platform_->idle_task_ == nullptr);
+      platform_->idle_task_ = task.release();
+    }
+
+    bool IdleTasksEnabled() override {
+      // Idle tasks are enabled only in the foreground task runner.
+      return is_foreground_task_runner_;
+    };
+
+   private:
+    MockPlatform* platform_;
+    bool is_foreground_task_runner_;
+  };
+
   double time_;
   double time_step_;
 
@@ -311,8 +329,8 @@
   CompilerDispatcher dispatcher(i_isolate(), &platform, FLAG_stack_size);
 
   const char script[] = TEST_SCRIPT();
-  Handle<JSFunction> f =
-      Handle<JSFunction>::cast(test::RunJS(isolate(), script));
+  Handle<JSFunction> f = RunJS<JSFunction>(script);
+
   Handle<SharedFunctionInfo> shared(f->shared(), i_isolate());
 
   ASSERT_FALSE(dispatcher.IsEnqueued(shared));
@@ -329,8 +347,7 @@
   CompilerDispatcher dispatcher(i_isolate(), &platform, FLAG_stack_size);
 
   const char script[] = TEST_SCRIPT();
-  Handle<JSFunction> f =
-      Handle<JSFunction>::cast(test::RunJS(isolate(), script));
+  Handle<JSFunction> f = RunJS<JSFunction>(script);
   Handle<SharedFunctionInfo> shared(f->shared(), i_isolate());
 
   ASSERT_FALSE(shared->is_compiled());
@@ -355,10 +372,9 @@
     std::stringstream ss;
     ss << 'f' << STR(__LINE__) << '_' << i;
     std::string func_name = ss.str();
-    std::string script("function g() { function " + func_name +
-                       "(x) { var a =  'x'; }; return " + func_name +
-                       "; } g();");
-    f[i] = Handle<JSFunction>::cast(test::RunJS(isolate(), script.c_str()));
+    std::string script("function f" + func_name + "(x, y) { return x * y }; f" +
+                       func_name + ";");
+    f[i] = RunJS<JSFunction>(script.c_str());
     shared[i] = Handle<SharedFunctionInfo>(f[i]->shared(), i_isolate());
     ASSERT_FALSE(shared[i]->is_compiled());
     ASSERT_TRUE(dispatcher.Enqueue(shared[i]));
@@ -378,8 +394,7 @@
   CompilerDispatcher dispatcher(i_isolate(), &platform, FLAG_stack_size);
 
   const char script[] = TEST_SCRIPT();
-  Handle<JSFunction> f =
-      Handle<JSFunction>::cast(test::RunJS(isolate(), script));
+  Handle<JSFunction> f = RunJS<JSFunction>(script);
   Handle<SharedFunctionInfo> shared(f->shared(), i_isolate());
 
   ASSERT_FALSE(platform.IdleTaskPending());
@@ -399,8 +414,7 @@
   CompilerDispatcher dispatcher(i_isolate(), &platform, FLAG_stack_size);
 
   const char script[] = TEST_SCRIPT();
-  Handle<JSFunction> f =
-      Handle<JSFunction>::cast(test::RunJS(isolate(), script));
+  Handle<JSFunction> f = RunJS<JSFunction>(script);
   Handle<SharedFunctionInfo> shared(f->shared(), i_isolate());
 
   ASSERT_FALSE(platform.IdleTaskPending());
@@ -410,7 +424,7 @@
   // The job should be scheduled for the main thread.
   ASSERT_EQ(dispatcher.jobs_.size(), 1u);
   ASSERT_EQ(UnoptimizedCompileJob::Status::kInitial,
-            GetUnoptimizedJobStatus(dispatcher.jobs_.begin()->second));
+            dispatcher.jobs_.begin()->second->status());
 
   // Only grant a little idle time and have time advance beyond it in one step.
   platform.RunIdleTask(2.0, 1.0);
@@ -422,8 +436,8 @@
   // The job should be still scheduled for the main thread, but ready for
   // parsing.
   ASSERT_EQ(dispatcher.jobs_.size(), 1u);
-  ASSERT_EQ(UnoptimizedCompileJob::Status::kReadyToParse,
-            GetUnoptimizedJobStatus(dispatcher.jobs_.begin()->second));
+  ASSERT_EQ(UnoptimizedCompileJob::Status::kPrepared,
+            dispatcher.jobs_.begin()->second->status());
 
   // Now grant a lot of idle time and freeze time.
   platform.RunIdleTask(1000.0, 0.0);
@@ -438,13 +452,13 @@
   CompilerDispatcher dispatcher(i_isolate(), &platform, 50);
 
   std::string func_name("f" STR(__LINE__));
-  std::string script("function g() { function " + func_name + "(x) { var a = ");
-  for (int i = 0; i < 1000; i++) {
-    script += "'x' + ";
+  std::string script("function " + func_name + "(x) { var a = ");
+  for (int i = 0; i < 500; i++) {
+    // Alternate + and - to avoid n-ary operation nodes.
+    script += "'x' + 'x' - ";
   }
-  script += " 'x'; }; return " + func_name + "; } g();";
-  Handle<JSFunction> f =
-      Handle<JSFunction>::cast(test::RunJS(isolate(), script.c_str()));
+  script += " 'x'; }; " + func_name + ";";
+  Handle<JSFunction> f = RunJS<JSFunction>(script.c_str());
   Handle<SharedFunctionInfo> shared(f->shared(), i_isolate());
 
   ASSERT_FALSE(platform.IdleTaskPending());
@@ -465,8 +479,7 @@
   CompilerDispatcher dispatcher(i_isolate(), &platform, FLAG_stack_size);
 
   const char script[] = TEST_SCRIPT();
-  Handle<JSFunction> f =
-      Handle<JSFunction>::cast(test::RunJS(isolate(), script));
+  Handle<JSFunction> f = RunJS<JSFunction>(script);
   Handle<SharedFunctionInfo> shared(f->shared(), i_isolate());
 
   ASSERT_FALSE(platform.IdleTaskPending());
@@ -475,14 +488,14 @@
 
   ASSERT_EQ(dispatcher.jobs_.size(), 1u);
   ASSERT_EQ(UnoptimizedCompileJob::Status::kInitial,
-            GetUnoptimizedJobStatus(dispatcher.jobs_.begin()->second));
+            dispatcher.jobs_.begin()->second->status());
 
   // Make compiling super expensive, and advance job as much as possible on the
   // foreground thread.
-  dispatcher.tracer_->RecordCompile(50000.0);
+  dispatcher.tracer_->RecordCompile(50000.0, 1);
   platform.RunIdleTask(10.0, 0.0);
-  ASSERT_EQ(UnoptimizedCompileJob::Status::kReadyToCompile,
-            GetUnoptimizedJobStatus(dispatcher.jobs_.begin()->second));
+  ASSERT_EQ(UnoptimizedCompileJob::Status::kPrepared,
+            dispatcher.jobs_.begin()->second->status());
 
   ASSERT_TRUE(dispatcher.IsEnqueued(shared));
   ASSERT_FALSE(shared->is_compiled());
@@ -494,7 +507,7 @@
   ASSERT_TRUE(platform.IdleTaskPending());
   ASSERT_FALSE(platform.BackgroundTasksPending());
   ASSERT_EQ(UnoptimizedCompileJob::Status::kCompiled,
-            GetUnoptimizedJobStatus(dispatcher.jobs_.begin()->second));
+            dispatcher.jobs_.begin()->second->status());
 
   // Now grant a lot of idle time and freeze time.
   platform.RunIdleTask(1000.0, 0.0);
@@ -509,8 +522,7 @@
   CompilerDispatcher dispatcher(i_isolate(), &platform, FLAG_stack_size);
 
   const char script[] = TEST_SCRIPT();
-  Handle<JSFunction> f =
-      Handle<JSFunction>::cast(test::RunJS(isolate(), script));
+  Handle<JSFunction> f = RunJS<JSFunction>(script);
   Handle<SharedFunctionInfo> shared(f->shared(), i_isolate());
 
   ASSERT_FALSE(platform.IdleTaskPending());
@@ -519,14 +531,14 @@
 
   ASSERT_EQ(dispatcher.jobs_.size(), 1u);
   ASSERT_EQ(UnoptimizedCompileJob::Status::kInitial,
-            GetUnoptimizedJobStatus(dispatcher.jobs_.begin()->second));
+            dispatcher.jobs_.begin()->second->status());
 
   // Make compiling super expensive, and advance job as much as possible on the
   // foreground thread.
-  dispatcher.tracer_->RecordCompile(50000.0);
+  dispatcher.tracer_->RecordCompile(50000.0, 1);
   platform.RunIdleTask(10.0, 0.0);
-  ASSERT_EQ(UnoptimizedCompileJob::Status::kReadyToCompile,
-            GetUnoptimizedJobStatus(dispatcher.jobs_.begin()->second));
+  ASSERT_EQ(UnoptimizedCompileJob::Status::kPrepared,
+            dispatcher.jobs_.begin()->second->status());
 
   ASSERT_TRUE(dispatcher.IsEnqueued(shared));
   ASSERT_FALSE(shared->is_compiled());
@@ -549,13 +561,11 @@
   CompilerDispatcher dispatcher(i_isolate(), &platform, FLAG_stack_size);
 
   const char script1[] = TEST_SCRIPT();
-  Handle<JSFunction> f1 =
-      Handle<JSFunction>::cast(test::RunJS(isolate(), script1));
+  Handle<JSFunction> f1 = RunJS<JSFunction>(script1);
   Handle<SharedFunctionInfo> shared1(f1->shared(), i_isolate());
 
   const char script2[] = TEST_SCRIPT();
-  Handle<JSFunction> f2 =
-      Handle<JSFunction>::cast(test::RunJS(isolate(), script2));
+  Handle<JSFunction> f2 = RunJS<JSFunction>(script2);
   Handle<SharedFunctionInfo> shared2(f2->shared(), i_isolate());
 
   ASSERT_FALSE(platform.IdleTaskPending());
@@ -578,13 +588,13 @@
   CompilerDispatcher dispatcher(i_isolate(), &platform, 50);
 
   std::string func_name("f" STR(__LINE__));
-  std::string script("function g() { function " + func_name + "(x) { var a = ");
-  for (int i = 0; i < 1000; i++) {
-    script += "'x' + ";
+  std::string script("function " + func_name + "(x) { var a = ");
+  for (int i = 0; i < 500; i++) {
+    // Alternate + and - to avoid n-ary operation nodes.
+    script += "'x' + 'x' - ";
   }
-  script += " 'x'; }; return " + func_name + "; } g();";
-  Handle<JSFunction> f =
-      Handle<JSFunction>::cast(test::RunJS(isolate(), script.c_str()));
+  script += " 'x'; }; " + func_name + ";";
+  Handle<JSFunction> f = RunJS<JSFunction>(script.c_str());
   Handle<SharedFunctionInfo> shared(f->shared(), i_isolate());
 
   ASSERT_FALSE(platform.IdleTaskPending());
@@ -606,8 +616,7 @@
   CompilerDispatcher dispatcher(i_isolate(), &platform, FLAG_stack_size);
 
   const char script[] = TEST_SCRIPT();
-  Handle<JSFunction> f =
-      Handle<JSFunction>::cast(test::RunJS(isolate(), script));
+  Handle<JSFunction> f = RunJS<JSFunction>(script);
   Handle<SharedFunctionInfo> shared(f->shared(), i_isolate());
 
   ASSERT_FALSE(platform.IdleTaskPending());
@@ -616,14 +625,14 @@
 
   ASSERT_EQ(dispatcher.jobs_.size(), 1u);
   ASSERT_EQ(UnoptimizedCompileJob::Status::kInitial,
-            GetUnoptimizedJobStatus(dispatcher.jobs_.begin()->second));
+            dispatcher.jobs_.begin()->second->status());
 
   // Make compiling super expensive, and advance job as much as possible on the
   // foreground thread.
-  dispatcher.tracer_->RecordCompile(50000.0);
+  dispatcher.tracer_->RecordCompile(50000.0, 1);
   platform.RunIdleTask(10.0, 0.0);
-  ASSERT_EQ(UnoptimizedCompileJob::Status::kReadyToCompile,
-            GetUnoptimizedJobStatus(dispatcher.jobs_.begin()->second));
+  ASSERT_EQ(UnoptimizedCompileJob::Status::kPrepared,
+            dispatcher.jobs_.begin()->second->status());
 
   ASSERT_TRUE(dispatcher.IsEnqueued(shared));
   ASSERT_FALSE(shared->is_compiled());
@@ -649,13 +658,11 @@
   CompilerDispatcher dispatcher(i_isolate(), &platform, FLAG_stack_size);
 
   const char script1[] = TEST_SCRIPT();
-  Handle<JSFunction> f1 =
-      Handle<JSFunction>::cast(test::RunJS(isolate(), script1));
+  Handle<JSFunction> f1 = RunJS<JSFunction>(script1);
   Handle<SharedFunctionInfo> shared1(f1->shared(), i_isolate());
 
   const char script2[] = TEST_SCRIPT();
-  Handle<JSFunction> f2 =
-      Handle<JSFunction>::cast(test::RunJS(isolate(), script2));
+  Handle<JSFunction> f2 = RunJS<JSFunction>(script2);
   Handle<SharedFunctionInfo> shared2(f2->shared(), i_isolate());
 
   ASSERT_FALSE(platform.IdleTaskPending());
@@ -664,14 +671,14 @@
 
   ASSERT_EQ(dispatcher.jobs_.size(), 1u);
   ASSERT_EQ(UnoptimizedCompileJob::Status::kInitial,
-            GetUnoptimizedJobStatus(dispatcher.jobs_.begin()->second));
+            dispatcher.jobs_.begin()->second->status());
 
   // Make compiling super expensive, and advance job as much as possible on the
   // foreground thread.
-  dispatcher.tracer_->RecordCompile(50000.0);
+  dispatcher.tracer_->RecordCompile(50000.0, 1);
   platform.RunIdleTask(10.0, 0.0);
-  ASSERT_EQ(UnoptimizedCompileJob::Status::kReadyToCompile,
-            GetUnoptimizedJobStatus(dispatcher.jobs_.begin()->second));
+  ASSERT_EQ(UnoptimizedCompileJob::Status::kPrepared,
+            dispatcher.jobs_.begin()->second->status());
 
   ASSERT_TRUE(dispatcher.IsEnqueued(shared1));
   ASSERT_FALSE(shared1->is_compiled());
@@ -731,8 +738,7 @@
   CompilerDispatcher dispatcher(i_isolate(), &platform, FLAG_stack_size);
 
   const char script[] = TEST_SCRIPT();
-  Handle<JSFunction> f =
-      Handle<JSFunction>::cast(test::RunJS(isolate(), script));
+  Handle<JSFunction> f = RunJS<JSFunction>(script);
   Handle<SharedFunctionInfo> shared(f->shared(), i_isolate());
 
   ASSERT_FALSE(platform.IdleTaskPending());
@@ -741,14 +747,14 @@
 
   ASSERT_EQ(dispatcher.jobs_.size(), 1u);
   ASSERT_EQ(UnoptimizedCompileJob::Status::kInitial,
-            GetUnoptimizedJobStatus(dispatcher.jobs_.begin()->second));
+            dispatcher.jobs_.begin()->second->status());
 
   // Make compiling super expensive, and advance job as much as possible on the
   // foreground thread.
-  dispatcher.tracer_->RecordCompile(50000.0);
+  dispatcher.tracer_->RecordCompile(50000.0, 1);
   platform.RunIdleTask(10.0, 0.0);
-  ASSERT_EQ(UnoptimizedCompileJob::Status::kReadyToCompile,
-            GetUnoptimizedJobStatus(dispatcher.jobs_.begin()->second));
+  ASSERT_EQ(UnoptimizedCompileJob::Status::kPrepared,
+            dispatcher.jobs_.begin()->second->status());
 
   ASSERT_TRUE(dispatcher.IsEnqueued(shared));
   ASSERT_FALSE(shared->is_compiled());
@@ -810,8 +816,7 @@
   CompilerDispatcher dispatcher(i_isolate(), &platform, FLAG_stack_size);
 
   const char script[] = TEST_SCRIPT();
-  Handle<JSFunction> f =
-      Handle<JSFunction>::cast(test::RunJS(isolate(), script));
+  Handle<JSFunction> f = RunJS<JSFunction>(script);
   Handle<SharedFunctionInfo> shared(f->shared(), i_isolate());
 
   // Can't enqueue tasks under memory pressure.
@@ -858,8 +863,7 @@
   CompilerDispatcher dispatcher(i_isolate(), &platform, FLAG_stack_size);
 
   const char script[] = TEST_SCRIPT();
-  Handle<JSFunction> f =
-      Handle<JSFunction>::cast(test::RunJS(isolate(), script));
+  Handle<JSFunction> f = RunJS<JSFunction>(script);
   Handle<SharedFunctionInfo> shared(f->shared(), i_isolate());
 
   ASSERT_TRUE(dispatcher.Enqueue(shared));
@@ -890,8 +894,7 @@
   MockPlatform platform;
   CompilerDispatcher dispatcher(i_isolate(), &platform, FLAG_stack_size);
   const char script[] = TEST_SCRIPT();
-  Handle<JSFunction> f =
-      Handle<JSFunction>::cast(test::RunJS(isolate(), script));
+  Handle<JSFunction> f = RunJS<JSFunction>(script);
   Handle<SharedFunctionInfo> shared(f->shared(), i_isolate());
   std::unique_ptr<CompilerDispatcherJob> job(
       new UnoptimizedCompileJob(i_isolate(), dispatcher.tracer_.get(), shared,
@@ -910,16 +913,15 @@
   CompilerDispatcher dispatcher(i_isolate(), &platform, FLAG_stack_size);
 
   const char script[] = TEST_SCRIPT();
-  Handle<JSFunction> f =
-      Handle<JSFunction>::cast(test::RunJS(isolate(), script));
+  Handle<JSFunction> f = RunJS<JSFunction>(script);
   Handle<SharedFunctionInfo> shared(f->shared(), i_isolate());
 
   ASSERT_FALSE(dispatcher.IsEnqueued(shared));
   ASSERT_TRUE(dispatcher.EnqueueAndStep(shared));
   ASSERT_TRUE(dispatcher.IsEnqueued(shared));
 
-  ASSERT_EQ(UnoptimizedCompileJob::Status::kReadyToParse,
-            GetUnoptimizedJobStatus(dispatcher.jobs_.begin()->second));
+  ASSERT_EQ(UnoptimizedCompileJob::Status::kPrepared,
+            dispatcher.jobs_.begin()->second->status());
 
   ASSERT_TRUE(platform.IdleTaskPending());
   platform.ClearIdleTask();
@@ -932,9 +934,8 @@
   // enqueued functions.
   CompilerDispatcher* dispatcher = i_isolate()->compiler_dispatcher();
 
-  const char source[] = TEST_SCRIPT();
-  Handle<JSFunction> f =
-      Handle<JSFunction>::cast(test::RunJS(isolate(), source));
+  const char script[] = "function lazy() { return 42; }; lazy;";
+  Handle<JSFunction> f = RunJS<JSFunction>(script);
   Handle<SharedFunctionInfo> shared(f->shared(), i_isolate());
 
   ASSERT_FALSE(shared->is_compiled());
@@ -944,7 +945,7 @@
 
   // Now force the function to run and ensure CompileLazy finished and dequeues
   // it from the dispatcher.
-  test::RunJS(isolate(), "g()();");
+  RunJS("lazy();");
   ASSERT_TRUE(shared->is_compiled());
   ASSERT_FALSE(dispatcher->IsEnqueued(shared));
 }
@@ -955,21 +956,19 @@
   CompilerDispatcher* dispatcher = i_isolate()->compiler_dispatcher();
 
   const char source2[] = "function lazy2() { return 42; }; lazy2;";
-  Handle<JSFunction> lazy2 =
-      Handle<JSFunction>::cast(test::RunJS(isolate(), source2));
+  Handle<JSFunction> lazy2 = RunJS<JSFunction>(source2);
   Handle<SharedFunctionInfo> shared2(lazy2->shared(), i_isolate());
   ASSERT_FALSE(shared2->is_compiled());
 
   const char source1[] = "function lazy1() { return lazy2(); }; lazy1;";
-  Handle<JSFunction> lazy1 =
-      Handle<JSFunction>::cast(test::RunJS(isolate(), source1));
+  Handle<JSFunction> lazy1 = RunJS<JSFunction>(source1);
   Handle<SharedFunctionInfo> shared1(lazy1->shared(), i_isolate());
   ASSERT_FALSE(shared1->is_compiled());
 
   ASSERT_TRUE(dispatcher->Enqueue(shared1));
   ASSERT_TRUE(dispatcher->Enqueue(shared2));
 
-  test::RunJS(isolate(), "lazy1();");
+  RunJS("lazy1();");
   ASSERT_TRUE(shared1->is_compiled());
   ASSERT_TRUE(shared2->is_compiled());
   ASSERT_FALSE(dispatcher->IsEnqueued(shared1));
@@ -981,20 +980,19 @@
   CompilerDispatcher dispatcher(i_isolate(), &platform, FLAG_stack_size);
 
   const char script[] = TEST_SCRIPT();
-  Handle<JSFunction> f =
-      Handle<JSFunction>::cast(test::RunJS(isolate(), script));
+  Handle<JSFunction> f = RunJS<JSFunction>(script);
   Handle<SharedFunctionInfo> shared(f->shared(), i_isolate());
 
   ASSERT_FALSE(dispatcher.IsEnqueued(shared));
   ASSERT_TRUE(dispatcher.EnqueueAndStep(shared));
   ASSERT_TRUE(dispatcher.IsEnqueued(shared));
-  ASSERT_EQ(UnoptimizedCompileJob::Status::kReadyToParse,
-            GetUnoptimizedJobStatus(dispatcher.jobs_.begin()->second));
+  ASSERT_EQ(UnoptimizedCompileJob::Status::kPrepared,
+            dispatcher.jobs_.begin()->second->status());
 
   // EnqueueAndStep of the same function again (shouldn't step the job.
   ASSERT_TRUE(dispatcher.EnqueueAndStep(shared));
-  ASSERT_EQ(UnoptimizedCompileJob::Status::kReadyToParse,
-            GetUnoptimizedJobStatus(dispatcher.jobs_.begin()->second));
+  ASSERT_EQ(UnoptimizedCompileJob::Status::kPrepared,
+            dispatcher.jobs_.begin()->second->status());
 
   ASSERT_TRUE(platform.IdleTaskPending());
   ASSERT_TRUE(platform.BackgroundTasksPending());
@@ -1007,12 +1005,10 @@
   CompilerDispatcher dispatcher(i_isolate(), &platform, FLAG_stack_size);
 
   const char script1[] = TEST_SCRIPT();
-  Handle<JSFunction> f1 =
-      Handle<JSFunction>::cast(test::RunJS(isolate(), script1));
+  Handle<JSFunction> f1 = RunJS<JSFunction>(script1);
   Handle<SharedFunctionInfo> shared1(f1->shared(), i_isolate());
   const char script2[] = TEST_SCRIPT();
-  Handle<JSFunction> f2 =
-      Handle<JSFunction>::cast(test::RunJS(isolate(), script2));
+  Handle<JSFunction> f2 = RunJS<JSFunction>(script2);
   Handle<SharedFunctionInfo> shared2(f2->shared(), i_isolate());
 
   ASSERT_FALSE(platform.IdleTaskPending());
@@ -1022,19 +1018,19 @@
 
   ASSERT_EQ(dispatcher.jobs_.size(), 2u);
   ASSERT_EQ(UnoptimizedCompileJob::Status::kInitial,
-            GetUnoptimizedJobStatus(dispatcher.jobs_.begin()->second));
+            dispatcher.jobs_.begin()->second->status());
   ASSERT_EQ(UnoptimizedCompileJob::Status::kInitial,
-            GetUnoptimizedJobStatus((++dispatcher.jobs_.begin())->second));
+            (++dispatcher.jobs_.begin())->second->status());
 
   // Make compiling super expensive, and advance job as much as possible on the
   // foreground thread.
-  dispatcher.tracer_->RecordCompile(50000.0);
+  dispatcher.tracer_->RecordCompile(50000.0, 1);
   platform.RunIdleTask(10.0, 0.0);
   ASSERT_EQ(dispatcher.jobs_.size(), 2u);
-  ASSERT_EQ(UnoptimizedCompileJob::Status::kReadyToCompile,
-            GetUnoptimizedJobStatus(dispatcher.jobs_.begin()->second));
-  ASSERT_EQ(UnoptimizedCompileJob::Status::kReadyToCompile,
-            GetUnoptimizedJobStatus((++dispatcher.jobs_.begin())->second));
+  ASSERT_EQ(UnoptimizedCompileJob::Status::kPrepared,
+            dispatcher.jobs_.begin()->second->status());
+  ASSERT_EQ(UnoptimizedCompileJob::Status::kPrepared,
+            (++dispatcher.jobs_.begin())->second->status());
 
   ASSERT_TRUE(dispatcher.IsEnqueued(shared1));
   ASSERT_TRUE(dispatcher.IsEnqueued(shared2));
@@ -1049,9 +1045,9 @@
   ASSERT_FALSE(platform.BackgroundTasksPending());
   ASSERT_EQ(dispatcher.jobs_.size(), 2u);
   ASSERT_EQ(UnoptimizedCompileJob::Status::kCompiled,
-            GetUnoptimizedJobStatus(dispatcher.jobs_.begin()->second));
+            dispatcher.jobs_.begin()->second->status());
   ASSERT_EQ(UnoptimizedCompileJob::Status::kCompiled,
-            GetUnoptimizedJobStatus((++dispatcher.jobs_.begin())->second));
+            (++dispatcher.jobs_.begin())->second->status());
 
   // Now grant a lot of idle time and freeze time.
   platform.RunIdleTask(1000.0, 0.0);
@@ -1063,5 +1059,11 @@
   ASSERT_FALSE(platform.IdleTaskPending());
 }
 
+#undef _STR
+#undef STR
+#undef _SCRIPT
+#undef SCRIPT
+#undef TEST_SCRIPT
+
 }  // namespace internal
 }  // namespace v8
diff --git a/src/v8/test/unittests/compiler-dispatcher/optimizing-compile-dispatcher-unittest.cc b/src/v8/test/unittests/compiler-dispatcher/optimizing-compile-dispatcher-unittest.cc
index 8280810..d5c3726 100644
--- a/src/v8/test/unittests/compiler-dispatcher/optimizing-compile-dispatcher-unittest.cc
+++ b/src/v8/test/unittests/compiler-dispatcher/optimizing-compile-dispatcher-unittest.cc
@@ -19,14 +19,15 @@
 namespace v8 {
 namespace internal {
 
-typedef TestWithContext OptimizingCompileDispatcherTest;
+typedef TestWithNativeContext OptimizingCompileDispatcherTest;
 
 namespace {
 
 class BlockingCompilationJob : public CompilationJob {
  public:
   BlockingCompilationJob(Isolate* isolate, Handle<JSFunction> function)
-      : CompilationJob(isolate, &parse_info_, &info_, "BlockingCompilationJob",
+      : CompilationJob(isolate->stack_guard()->real_climit(), &parse_info_,
+                       &info_, "BlockingCompilationJob",
                        State::kReadyToExecute),
         shared_(function->shared()),
         parse_info_(shared_),
@@ -39,9 +40,7 @@
   void Signal() { semaphore_.Signal(); }
 
   // CompilationJob implementation.
-  Status PrepareJobImpl() override {
-    UNREACHABLE();
-  }
+  Status PrepareJobImpl(Isolate* isolate) override { UNREACHABLE(); }
 
   Status ExecuteJobImpl() override {
     blocking_.SetValue(true);
@@ -50,7 +49,7 @@
     return SUCCEEDED;
   }
 
-  Status FinalizeJobImpl() override { return SUCCEEDED; }
+  Status FinalizeJobImpl(Isolate* isolate) override { return SUCCEEDED; }
 
  private:
   Handle<SharedFunctionInfo> shared_;
@@ -71,8 +70,8 @@
 }
 
 TEST_F(OptimizingCompileDispatcherTest, NonBlockingFlush) {
-  Handle<JSFunction> fun = Handle<JSFunction>::cast(test::RunJS(
-      isolate(), "function f() { function g() {}; return g;}; f();"));
+  Handle<JSFunction> fun =
+      RunJS<JSFunction>("function f() { function g() {}; return g;}; f();");
   BlockingCompilationJob* job = new BlockingCompilationJob(i_isolate(), fun);
 
   OptimizingCompileDispatcher dispatcher(i_isolate());
diff --git a/src/v8/test/unittests/compiler-dispatcher/unoptimized-compile-job-unittest.cc b/src/v8/test/unittests/compiler-dispatcher/unoptimized-compile-job-unittest.cc
index 36bafcf..d681627 100644
--- a/src/v8/test/unittests/compiler-dispatcher/unoptimized-compile-job-unittest.cc
+++ b/src/v8/test/unittests/compiler-dispatcher/unoptimized-compile-job-unittest.cc
@@ -23,9 +23,9 @@
 namespace v8 {
 namespace internal {
 
-class UnoptimizedCompileJobTest : public TestWithContext {
+class UnoptimizedCompileJobTest : public TestWithNativeContext {
  public:
-  UnoptimizedCompileJobTest() : tracer_(i_isolate()) {}
+  UnoptimizedCompileJobTest() : tracer_(isolate()) {}
   ~UnoptimizedCompileJobTest() override {}
 
   CompilerDispatcherTracer* tracer() { return &tracer_; }
@@ -33,25 +33,16 @@
   static void SetUpTestCase() {
     CHECK_NULL(save_flags_);
     save_flags_ = new SaveFlags();
-    TestWithContext::SetUpTestCase();
+    TestWithNativeContext ::SetUpTestCase();
   }
 
   static void TearDownTestCase() {
-    TestWithContext::TearDownTestCase();
+    TestWithNativeContext ::TearDownTestCase();
     CHECK_NOT_NULL(save_flags_);
     delete save_flags_;
     save_flags_ = nullptr;
   }
 
-  static UnoptimizedCompileJob::Status GetStatus(UnoptimizedCompileJob* job) {
-    return job->status();
-  }
-
-  static UnoptimizedCompileJob::Status GetStatus(
-      const std::unique_ptr<UnoptimizedCompileJob>& job) {
-    return GetStatus(job.get());
-  }
-
   static Variable* LookupVariableByName(UnoptimizedCompileJob* job,
                                         const char* name) {
     const AstRawString* name_raw_string =
@@ -68,98 +59,52 @@
 
 SaveFlags* UnoptimizedCompileJobTest::save_flags_ = nullptr;
 
-#define ASSERT_JOB_STATUS(STATUS, JOB) ASSERT_EQ(STATUS, GetStatus(JOB))
+#define ASSERT_JOB_STATUS(STATUS, JOB) ASSERT_EQ(STATUS, JOB->status())
 
 TEST_F(UnoptimizedCompileJobTest, Construct) {
   std::unique_ptr<UnoptimizedCompileJob> job(new UnoptimizedCompileJob(
-      i_isolate(), tracer(),
-      test::CreateSharedFunctionInfo(i_isolate(), nullptr), FLAG_stack_size));
+      isolate(), tracer(), test::CreateSharedFunctionInfo(isolate(), nullptr),
+      FLAG_stack_size));
 }
 
 TEST_F(UnoptimizedCompileJobTest, StateTransitions) {
   std::unique_ptr<UnoptimizedCompileJob> job(new UnoptimizedCompileJob(
-      i_isolate(), tracer(),
-      test::CreateSharedFunctionInfo(i_isolate(), nullptr), FLAG_stack_size));
+      isolate(), tracer(), test::CreateSharedFunctionInfo(isolate(), nullptr),
+      FLAG_stack_size));
 
-  ASSERT_JOB_STATUS(UnoptimizedCompileJob::Status::kInitial, job);
-  job->StepNextOnMainThread(i_isolate());
+  ASSERT_JOB_STATUS(CompilerDispatcherJob::Status::kInitial, job);
+  job->PrepareOnMainThread(isolate());
   ASSERT_FALSE(job->IsFailed());
-  ASSERT_JOB_STATUS(UnoptimizedCompileJob::Status::kReadyToParse, job);
-  job->StepNextOnMainThread(i_isolate());
+  ASSERT_JOB_STATUS(CompilerDispatcherJob::Status::kPrepared, job);
+  job->Compile(false);
   ASSERT_FALSE(job->IsFailed());
-  ASSERT_JOB_STATUS(UnoptimizedCompileJob::Status::kParsed, job);
-  job->StepNextOnMainThread(i_isolate());
+  ASSERT_JOB_STATUS(CompilerDispatcherJob::Status::kCompiled, job);
+  job->FinalizeOnMainThread(isolate());
   ASSERT_FALSE(job->IsFailed());
-  ASSERT_JOB_STATUS(UnoptimizedCompileJob::Status::kReadyToAnalyze, job);
-  job->StepNextOnMainThread(i_isolate());
-  ASSERT_FALSE(job->IsFailed());
-  ASSERT_JOB_STATUS(UnoptimizedCompileJob::Status::kAnalyzed, job);
-  job->StepNextOnMainThread(i_isolate());
-  ASSERT_FALSE(job->IsFailed());
-  ASSERT_JOB_STATUS(UnoptimizedCompileJob::Status::kReadyToCompile, job);
-  job->StepNextOnMainThread(i_isolate());
-  ASSERT_FALSE(job->IsFailed());
-  ASSERT_JOB_STATUS(UnoptimizedCompileJob::Status::kCompiled, job);
-  job->StepNextOnMainThread(i_isolate());
-  ASSERT_FALSE(job->IsFailed());
-  ASSERT_JOB_STATUS(UnoptimizedCompileJob::Status::kDone, job);
-  job->ResetOnMainThread(i_isolate());
-  ASSERT_JOB_STATUS(UnoptimizedCompileJob::Status::kInitial, job);
+  ASSERT_JOB_STATUS(CompilerDispatcherJob::Status::kDone, job);
+  job->ResetOnMainThread(isolate());
+  ASSERT_JOB_STATUS(CompilerDispatcherJob::Status::kInitial, job);
 }
 
 TEST_F(UnoptimizedCompileJobTest, SyntaxError) {
   test::ScriptResource script("^^^", strlen("^^^"));
   std::unique_ptr<UnoptimizedCompileJob> job(new UnoptimizedCompileJob(
-      i_isolate(), tracer(),
-      test::CreateSharedFunctionInfo(i_isolate(), &script), FLAG_stack_size));
+      isolate(), tracer(), test::CreateSharedFunctionInfo(isolate(), &script),
+      FLAG_stack_size));
 
-  job->StepNextOnMainThread(i_isolate());
+  job->PrepareOnMainThread(isolate());
   ASSERT_FALSE(job->IsFailed());
-  job->StepNextOnMainThread(i_isolate());
+  job->Compile(false);
   ASSERT_FALSE(job->IsFailed());
-  job->StepNextOnMainThread(i_isolate());
+  job->ReportErrorsOnMainThread(isolate());
   ASSERT_TRUE(job->IsFailed());
-  ASSERT_JOB_STATUS(UnoptimizedCompileJob::Status::kFailed, job);
-  ASSERT_TRUE(i_isolate()->has_pending_exception());
+  ASSERT_JOB_STATUS(CompilerDispatcherJob::Status::kFailed, job);
+  ASSERT_TRUE(isolate()->has_pending_exception());
 
-  i_isolate()->clear_pending_exception();
+  isolate()->clear_pending_exception();
 
-  job->ResetOnMainThread(i_isolate());
-  ASSERT_JOB_STATUS(UnoptimizedCompileJob::Status::kInitial, job);
-}
-
-TEST_F(UnoptimizedCompileJobTest, ScopeChain) {
-  const char script[] =
-      "function g() { var y = 1; function f(x) { return x * y }; return f; } "
-      "g();";
-  Handle<JSFunction> f =
-      Handle<JSFunction>::cast(test::RunJS(isolate(), script));
-
-  std::unique_ptr<UnoptimizedCompileJob> job(new UnoptimizedCompileJob(
-      i_isolate(), tracer(), handle(f->shared()), FLAG_stack_size));
-
-  job->StepNextOnMainThread(i_isolate());
-  ASSERT_FALSE(job->IsFailed());
-  job->StepNextOnMainThread(i_isolate());
-  ASSERT_FALSE(job->IsFailed());
-  job->StepNextOnMainThread(i_isolate());
-  ASSERT_FALSE(job->IsFailed());
-  job->StepNextOnMainThread(i_isolate());
-  ASSERT_FALSE(job->IsFailed());
-  job->StepNextOnMainThread(i_isolate());
-  ASSERT_FALSE(job->IsFailed());
-  ASSERT_JOB_STATUS(UnoptimizedCompileJob::Status::kReadyToCompile, job);
-
-  Variable* var = LookupVariableByName(job.get(), "x");
-  ASSERT_TRUE(var);
-  ASSERT_TRUE(var->IsParameter());
-
-  var = LookupVariableByName(job.get(), "y");
-  ASSERT_TRUE(var);
-  ASSERT_TRUE(var->IsContextSlot());
-
-  job->ResetOnMainThread(i_isolate());
-  ASSERT_JOB_STATUS(UnoptimizedCompileJob::Status::kInitial, job);
+  job->ResetOnMainThread(isolate());
+  ASSERT_JOB_STATUS(CompilerDispatcherJob::Status::kInitial, job);
 }
 
 TEST_F(UnoptimizedCompileJobTest, CompileAndRun) {
@@ -172,92 +117,78 @@
       "  return f;\n"
       "}\n"
       "g();";
-  Handle<JSFunction> f =
-      Handle<JSFunction>::cast(test::RunJS(isolate(), script));
+  Handle<JSFunction> f = RunJS<JSFunction>(script);
   std::unique_ptr<UnoptimizedCompileJob> job(new UnoptimizedCompileJob(
-      i_isolate(), tracer(), handle(f->shared()), FLAG_stack_size));
+      isolate(), tracer(), handle(f->shared()), FLAG_stack_size));
 
-  job->StepNextOnMainThread(i_isolate());
+  job->PrepareOnMainThread(isolate());
   ASSERT_FALSE(job->IsFailed());
-  job->StepNextOnMainThread(i_isolate());
+  job->Compile(false);
   ASSERT_FALSE(job->IsFailed());
-  job->StepNextOnMainThread(i_isolate());
+  job->FinalizeOnMainThread(isolate());
   ASSERT_FALSE(job->IsFailed());
-  job->StepNextOnMainThread(i_isolate());
-  ASSERT_FALSE(job->IsFailed());
-  job->StepNextOnMainThread(i_isolate());
-  ASSERT_FALSE(job->IsFailed());
-  job->StepNextOnMainThread(i_isolate());
-  ASSERT_FALSE(job->IsFailed());
-  job->StepNextOnMainThread(i_isolate());
-  ASSERT_FALSE(job->IsFailed());
-  ASSERT_JOB_STATUS(UnoptimizedCompileJob::Status::kDone, job);
+  ASSERT_JOB_STATUS(CompilerDispatcherJob::Status::kDone, job);
 
-  Smi* value = Smi::cast(*test::RunJS(isolate(), "f(100);"));
+  Smi* value = Smi::cast(*RunJS("f(100);"));
   ASSERT_TRUE(value == Smi::FromInt(160));
 
-  job->ResetOnMainThread(i_isolate());
-  ASSERT_JOB_STATUS(UnoptimizedCompileJob::Status::kInitial, job);
+  job->ResetOnMainThread(isolate());
+  ASSERT_JOB_STATUS(CompilerDispatcherJob::Status::kInitial, job);
 }
 
 TEST_F(UnoptimizedCompileJobTest, CompileFailureToAnalyse) {
   std::string raw_script("() { var a = ");
-  for (int i = 0; i < 100000; i++) {
-    raw_script += "'x' + ";
+  for (int i = 0; i < 500000; i++) {
+    // TODO(leszeks): Figure out a more "unit-test-y" way of forcing an analysis
+    // failure than a binop stack overflow.
+
+    // Alternate + and - to avoid n-ary operation nodes.
+    raw_script += "'x' + 'x' - ";
   }
   raw_script += " 'x'; }";
   test::ScriptResource script(raw_script.c_str(), strlen(raw_script.c_str()));
   std::unique_ptr<UnoptimizedCompileJob> job(new UnoptimizedCompileJob(
-      i_isolate(), tracer(),
-      test::CreateSharedFunctionInfo(i_isolate(), &script), 100));
+      isolate(), tracer(), test::CreateSharedFunctionInfo(isolate(), &script),
+      100));
 
-  job->StepNextOnMainThread(i_isolate());
+  job->PrepareOnMainThread(isolate());
   ASSERT_FALSE(job->IsFailed());
-  job->StepNextOnMainThread(i_isolate());
+  job->Compile(false);
   ASSERT_FALSE(job->IsFailed());
-  job->StepNextOnMainThread(i_isolate());
-  ASSERT_FALSE(job->IsFailed());
-  job->StepNextOnMainThread(i_isolate());
+  job->ReportErrorsOnMainThread(isolate());
   ASSERT_TRUE(job->IsFailed());
-  ASSERT_JOB_STATUS(UnoptimizedCompileJob::Status::kFailed, job);
-  ASSERT_TRUE(i_isolate()->has_pending_exception());
+  ASSERT_JOB_STATUS(CompilerDispatcherJob::Status::kFailed, job);
+  ASSERT_TRUE(isolate()->has_pending_exception());
 
-  i_isolate()->clear_pending_exception();
-  job->ResetOnMainThread(i_isolate());
-  ASSERT_JOB_STATUS(UnoptimizedCompileJob::Status::kInitial, job);
+  isolate()->clear_pending_exception();
+  job->ResetOnMainThread(isolate());
+  ASSERT_JOB_STATUS(CompilerDispatcherJob::Status::kInitial, job);
 }
 
 TEST_F(UnoptimizedCompileJobTest, CompileFailureToFinalize) {
   std::string raw_script("() { var a = ");
-  for (int i = 0; i < 1000; i++) {
-    raw_script += "'x' + ";
+  for (int i = 0; i < 500; i++) {
+    // Alternate + and - to avoid n-ary operation nodes.
+    raw_script += "'x' + 'x' - ";
   }
   raw_script += " 'x'; }";
   test::ScriptResource script(raw_script.c_str(), strlen(raw_script.c_str()));
   std::unique_ptr<UnoptimizedCompileJob> job(new UnoptimizedCompileJob(
-      i_isolate(), tracer(),
-      test::CreateSharedFunctionInfo(i_isolate(), &script), 50));
+      isolate(), tracer(), test::CreateSharedFunctionInfo(isolate(), &script),
+      50));
 
-  job->StepNextOnMainThread(i_isolate());
+  job->PrepareOnMainThread(isolate());
   ASSERT_FALSE(job->IsFailed());
-  job->StepNextOnMainThread(i_isolate());
+  job->Compile(false);
   ASSERT_FALSE(job->IsFailed());
-  job->StepNextOnMainThread(i_isolate());
-  ASSERT_FALSE(job->IsFailed());
-  job->StepNextOnMainThread(i_isolate());
-  ASSERT_FALSE(job->IsFailed());
-  job->StepNextOnMainThread(i_isolate());
-  ASSERT_FALSE(job->IsFailed());
-  job->StepNextOnMainThread(i_isolate());
-  ASSERT_FALSE(job->IsFailed());
-  job->StepNextOnMainThread(i_isolate());
+  job->ReportErrorsOnMainThread(isolate());
   ASSERT_TRUE(job->IsFailed());
-  ASSERT_JOB_STATUS(UnoptimizedCompileJob::Status::kFailed, job);
-  ASSERT_TRUE(i_isolate()->has_pending_exception());
+  ASSERT_JOB_STATUS(CompilerDispatcherJob::Status::kFailed, job);
+  ASSERT_TRUE(isolate()->has_pending_exception());
 
-  i_isolate()->clear_pending_exception();
-  job->ResetOnMainThread(i_isolate());
-  ASSERT_JOB_STATUS(UnoptimizedCompileJob::Status::kInitial, job);
+  isolate()->clear_pending_exception();
+  job->ResetOnMainThread(isolate());
+  ASSERT_JOB_STATUS(CompilerDispatcherJob::Status::kInitial, job);
 }
 
 class CompileTask : public Task {
@@ -267,7 +198,7 @@
   ~CompileTask() override {}
 
   void Run() override {
-    job_->StepNextOnBackgroundThread();
+    job_->Compile(true);
     ASSERT_FALSE(job_->IsFailed());
     semaphore_->Signal();
   }
@@ -288,74 +219,55 @@
       "}";
   test::ScriptResource script(raw_script, strlen(raw_script));
   std::unique_ptr<UnoptimizedCompileJob> job(new UnoptimizedCompileJob(
-      i_isolate(), tracer(),
-      test::CreateSharedFunctionInfo(i_isolate(), &script), 100));
+      isolate(), tracer(), test::CreateSharedFunctionInfo(isolate(), &script),
+      100));
 
-  job->StepNextOnMainThread(i_isolate());
-  ASSERT_FALSE(job->IsFailed());
-  job->StepNextOnMainThread(i_isolate());
-  ASSERT_FALSE(job->IsFailed());
-  job->StepNextOnMainThread(i_isolate());
-  ASSERT_FALSE(job->IsFailed());
-  job->StepNextOnMainThread(i_isolate());
-  ASSERT_FALSE(job->IsFailed());
-  job->StepNextOnMainThread(i_isolate());
+  job->PrepareOnMainThread(isolate());
   ASSERT_FALSE(job->IsFailed());
 
   base::Semaphore semaphore(0);
   CompileTask* background_task = new CompileTask(job.get(), &semaphore);
-  ASSERT_JOB_STATUS(UnoptimizedCompileJob::Status::kReadyToCompile, job);
+  ASSERT_JOB_STATUS(CompilerDispatcherJob::Status::kPrepared, job);
   V8::GetCurrentPlatform()->CallOnBackgroundThread(background_task,
                                                    Platform::kShortRunningTask);
   semaphore.Wait();
-  job->StepNextOnMainThread(i_isolate());
+  job->FinalizeOnMainThread(isolate());
   ASSERT_FALSE(job->IsFailed());
-  ASSERT_JOB_STATUS(UnoptimizedCompileJob::Status::kDone, job);
+  ASSERT_JOB_STATUS(CompilerDispatcherJob::Status::kDone, job);
 
-  job->ResetOnMainThread(i_isolate());
-  ASSERT_JOB_STATUS(UnoptimizedCompileJob::Status::kInitial, job);
+  job->ResetOnMainThread(isolate());
+  ASSERT_JOB_STATUS(CompilerDispatcherJob::Status::kInitial, job);
 }
 
 TEST_F(UnoptimizedCompileJobTest, LazyInnerFunctions) {
   const char script[] =
-      "function g() {\n"
-      "  f = function() {\n"
-      "    e = (function() { return 42; });\n"
-      "    return e;\n"
-      "  };\n"
-      "  return f;\n"
-      "}\n"
-      "g();";
-  Handle<JSFunction> f =
-      Handle<JSFunction>::cast(test::RunJS(isolate(), script));
+      "f = function() {\n"
+      "  e = (function() { return 42; });\n"
+      "  return e;\n"
+      "};\n"
+      "f;";
+  Handle<JSFunction> f = RunJS<JSFunction>(script);
 
   std::unique_ptr<UnoptimizedCompileJob> job(new UnoptimizedCompileJob(
-      i_isolate(), tracer(), handle(f->shared()), FLAG_stack_size));
+      isolate(), tracer(), handle(f->shared()), FLAG_stack_size));
 
-  job->StepNextOnMainThread(i_isolate());
+  job->PrepareOnMainThread(isolate());
   ASSERT_FALSE(job->IsFailed());
-  job->StepNextOnMainThread(i_isolate());
+  job->Compile(false);
   ASSERT_FALSE(job->IsFailed());
-  job->StepNextOnMainThread(i_isolate());
+  job->FinalizeOnMainThread(isolate());
   ASSERT_FALSE(job->IsFailed());
-  job->StepNextOnMainThread(i_isolate());
-  ASSERT_FALSE(job->IsFailed());
-  job->StepNextOnMainThread(i_isolate());
-  ASSERT_FALSE(job->IsFailed());
-  job->StepNextOnMainThread(i_isolate());
-  ASSERT_FALSE(job->IsFailed());
-  job->StepNextOnMainThread(i_isolate());
-  ASSERT_FALSE(job->IsFailed());
-  ASSERT_JOB_STATUS(UnoptimizedCompileJob::Status::kDone, job);
+  ASSERT_JOB_STATUS(CompilerDispatcherJob::Status::kDone, job);
 
-  Handle<JSFunction> e =
-      Handle<JSFunction>::cast(test::RunJS(isolate(), "f();"));
+  Handle<JSFunction> e = RunJS<JSFunction>("f();");
 
   ASSERT_FALSE(e->shared()->is_compiled());
 
-  job->ResetOnMainThread(i_isolate());
-  ASSERT_JOB_STATUS(UnoptimizedCompileJob::Status::kInitial, job);
+  job->ResetOnMainThread(isolate());
+  ASSERT_JOB_STATUS(CompilerDispatcherJob::Status::kInitial, job);
 }
 
+#undef ASSERT_JOB_STATUS
+
 }  // namespace internal
 }  // namespace v8
diff --git a/src/v8/test/unittests/compiler/arm/instruction-selector-arm-unittest.cc b/src/v8/test/unittests/compiler/arm/instruction-selector-arm-unittest.cc
index 186a439..ab1c57d 100644
--- a/src/v8/test/unittests/compiler/arm/instruction-selector-arm-unittest.cc
+++ b/src/v8/test/unittests/compiler/arm/instruction-selector-arm-unittest.cc
@@ -2302,7 +2302,7 @@
                     MachineType::Int32());
     Node* const p0 = m.Parameter(0);
     Node* const p1 = m.Parameter(1);
-    Node* const r = m.Int32Add(m.Word32And(p0, m.Int32Constant(0xff)), p1);
+    Node* const r = m.Int32Add(m.Word32And(p0, m.Int32Constant(0xFF)), p1);
     m.Return(r);
     Stream s = m.Build();
     ASSERT_EQ(1U, s.size());
@@ -2319,7 +2319,7 @@
                     MachineType::Int32());
     Node* const p0 = m.Parameter(0);
     Node* const p1 = m.Parameter(1);
-    Node* const r = m.Int32Add(p1, m.Word32And(p0, m.Int32Constant(0xff)));
+    Node* const r = m.Int32Add(p1, m.Word32And(p0, m.Int32Constant(0xFF)));
     m.Return(r);
     Stream s = m.Build();
     ASSERT_EQ(1U, s.size());
@@ -2336,7 +2336,7 @@
                     MachineType::Int32());
     Node* const p0 = m.Parameter(0);
     Node* const p1 = m.Parameter(1);
-    Node* const r = m.Int32Add(m.Word32And(p0, m.Int32Constant(0xffff)), p1);
+    Node* const r = m.Int32Add(m.Word32And(p0, m.Int32Constant(0xFFFF)), p1);
     m.Return(r);
     Stream s = m.Build();
     ASSERT_EQ(1U, s.size());
@@ -2353,7 +2353,7 @@
                     MachineType::Int32());
     Node* const p0 = m.Parameter(0);
     Node* const p1 = m.Parameter(1);
-    Node* const r = m.Int32Add(p1, m.Word32And(p0, m.Int32Constant(0xffff)));
+    Node* const r = m.Int32Add(p1, m.Word32And(p0, m.Int32Constant(0xFFFF)));
     m.Return(r);
     Stream s = m.Build();
     ASSERT_EQ(1U, s.size());
@@ -2808,7 +2808,7 @@
     if (width == 16) continue;  // Uxth.
     StreamBuilder m(this, MachineType::Int32(), MachineType::Int32());
     m.Return(m.Word32And(m.Parameter(0),
-                         m.Int32Constant(0xffffffffu >> (32 - width))));
+                         m.Int32Constant(0xFFFFFFFFu >> (32 - width))));
     Stream s = m.Build(ARMv7);
     ASSERT_EQ(1U, s.size());
     EXPECT_EQ(kArmUbfx, s[0]->arch_opcode());
@@ -2819,7 +2819,7 @@
   TRACED_FORRANGE(int32_t, width, 9, 23) {
     if (width == 16) continue;  // Uxth.
     StreamBuilder m(this, MachineType::Int32(), MachineType::Int32());
-    m.Return(m.Word32And(m.Int32Constant(0xffffffffu >> (32 - width)),
+    m.Return(m.Word32And(m.Int32Constant(0xFFFFFFFFu >> (32 - width)),
                          m.Parameter(0)));
     Stream s = m.Build(ARMv7);
     ASSERT_EQ(1U, s.size());
@@ -2837,7 +2837,7 @@
       StreamBuilder m(this, MachineType::Int32(), MachineType::Int32());
       m.Return(m.Word32And(
           m.Parameter(0),
-          m.Int32Constant(~((0xffffffffu >> (32 - width)) << lsb))));
+          m.Int32Constant(~((0xFFFFFFFFu >> (32 - width)) << lsb))));
       Stream s = m.Build(ARMv7);
       ASSERT_EQ(1U, s.size());
       EXPECT_EQ(kArmBfc, s[0]->arch_opcode());
@@ -2853,7 +2853,7 @@
     TRACED_FORRANGE(int32_t, width, 9, (24 - lsb) - 1) {
       StreamBuilder m(this, MachineType::Int32(), MachineType::Int32());
       m.Return(
-          m.Word32And(m.Int32Constant(~((0xffffffffu >> (32 - width)) << lsb)),
+          m.Word32And(m.Int32Constant(~((0xFFFFFFFFu >> (32 - width)) << lsb)),
                       m.Parameter(0)));
       Stream s = m.Build(ARMv7);
       ASSERT_EQ(1U, s.size());
@@ -2868,12 +2868,11 @@
   }
 }
 
-
-TEST_F(InstructionSelectorTest, Word32AndWith0xffff) {
+TEST_F(InstructionSelectorTest, Word32AndWith0xFFFF) {
   {
     StreamBuilder m(this, MachineType::Int32(), MachineType::Int32());
     Node* const p0 = m.Parameter(0);
-    Node* const r = m.Word32And(p0, m.Int32Constant(0xffff));
+    Node* const r = m.Word32And(p0, m.Int32Constant(0xFFFF));
     m.Return(r);
     Stream s = m.Build();
     ASSERT_EQ(1U, s.size());
@@ -2887,7 +2886,7 @@
   {
     StreamBuilder m(this, MachineType::Int32(), MachineType::Int32());
     Node* const p0 = m.Parameter(0);
-    Node* const r = m.Word32And(m.Int32Constant(0xffff), p0);
+    Node* const r = m.Word32And(m.Int32Constant(0xFFFF), p0);
     m.Return(r);
     Stream s = m.Build();
     ASSERT_EQ(1U, s.size());
@@ -2941,7 +2940,7 @@
       uint32_t max = 1 << lsb;
       if (max > static_cast<uint32_t>(kMaxInt)) max -= 1;
       uint32_t jnk = rng()->NextInt(max);
-      uint32_t msk = ((0xffffffffu >> (32 - width)) << lsb) | jnk;
+      uint32_t msk = ((0xFFFFFFFFu >> (32 - width)) << lsb) | jnk;
       StreamBuilder m(this, MachineType::Int32(), MachineType::Int32());
       m.Return(m.Word32Shr(m.Word32And(m.Parameter(0), m.Int32Constant(msk)),
                            m.Int32Constant(lsb)));
@@ -2958,7 +2957,7 @@
       uint32_t max = 1 << lsb;
       if (max > static_cast<uint32_t>(kMaxInt)) max -= 1;
       uint32_t jnk = rng()->NextInt(max);
-      uint32_t msk = ((0xffffffffu >> (32 - width)) << lsb) | jnk;
+      uint32_t msk = ((0xFFFFFFFFu >> (32 - width)) << lsb) | jnk;
       StreamBuilder m(this, MachineType::Int32(), MachineType::Int32());
       m.Return(m.Word32Shr(m.Word32And(m.Int32Constant(msk), m.Parameter(0)),
                            m.Int32Constant(lsb)));
@@ -3098,7 +3097,7 @@
         continue;  // Uxtb/h ror.
       StreamBuilder m(this, MachineType::Int32(), MachineType::Int32());
       m.Return(m.Word32And(m.Word32Shr(m.Parameter(0), m.Int32Constant(lsb)),
-                           m.Int32Constant(0xffffffffu >> (32 - width))));
+                           m.Int32Constant(0xFFFFFFFFu >> (32 - width))));
       Stream s = m.Build(ARMv7);
       ASSERT_EQ(1U, s.size());
       EXPECT_EQ(kArmUbfx, s[0]->arch_opcode());
@@ -3113,7 +3112,7 @@
           ((lsb == 8) || (lsb == 16) || (lsb == 24)))
         continue;  // Uxtb/h ror.
       StreamBuilder m(this, MachineType::Int32(), MachineType::Int32());
-      m.Return(m.Word32And(m.Int32Constant(0xffffffffu >> (32 - width)),
+      m.Return(m.Word32And(m.Int32Constant(0xFFFFFFFFu >> (32 - width)),
                            m.Word32Shr(m.Parameter(0), m.Int32Constant(lsb))));
       Stream s = m.Build(ARMv7);
       ASSERT_EQ(1U, s.size());
@@ -3125,13 +3124,12 @@
   }
 }
 
-
-TEST_F(InstructionSelectorTest, Word32AndWithWord32ShrAnd0xff) {
+TEST_F(InstructionSelectorTest, Word32AndWithWord32ShrAnd0xFF) {
   TRACED_FORRANGE(int32_t, shr, 1, 3) {
     StreamBuilder m(this, MachineType::Int32(), MachineType::Int32());
     Node* const p0 = m.Parameter(0);
     Node* const r = m.Word32And(m.Word32Shr(p0, m.Int32Constant(shr * 8)),
-                                m.Int32Constant(0xff));
+                                m.Int32Constant(0xFF));
     m.Return(r);
     Stream s = m.Build();
     ASSERT_EQ(1U, s.size());
@@ -3142,7 +3140,7 @@
   TRACED_FORRANGE(int32_t, shr, 1, 3) {
     StreamBuilder m(this, MachineType::Int32(), MachineType::Int32());
     Node* const p0 = m.Parameter(0);
-    Node* const r = m.Word32And(m.Int32Constant(0xff),
+    Node* const r = m.Word32And(m.Int32Constant(0xFF),
                                 m.Word32Shr(p0, m.Int32Constant(shr * 8)));
     m.Return(r);
     Stream s = m.Build();
@@ -3153,13 +3151,12 @@
   }
 }
 
-
-TEST_F(InstructionSelectorTest, Word32AndWithWord32ShrAnd0xffff) {
+TEST_F(InstructionSelectorTest, Word32AndWithWord32ShrAnd0xFFFF) {
   TRACED_FORRANGE(int32_t, shr, 1, 2) {
     StreamBuilder m(this, MachineType::Int32(), MachineType::Int32());
     Node* const p0 = m.Parameter(0);
     Node* const r = m.Word32And(m.Word32Shr(p0, m.Int32Constant(shr * 8)),
-                                m.Int32Constant(0xffff));
+                                m.Int32Constant(0xFFFF));
     m.Return(r);
     Stream s = m.Build();
     ASSERT_EQ(1U, s.size());
@@ -3170,7 +3167,7 @@
   TRACED_FORRANGE(int32_t, shr, 1, 2) {
     StreamBuilder m(this, MachineType::Int32(), MachineType::Int32());
     Node* const p0 = m.Parameter(0);
-    Node* const r = m.Word32And(m.Int32Constant(0xffff),
+    Node* const r = m.Word32And(m.Int32Constant(0xFFFF),
                                 m.Word32Shr(p0, m.Int32Constant(shr * 8)));
     m.Return(r);
     Stream s = m.Build();
diff --git a/src/v8/test/unittests/compiler/arm64/instruction-selector-arm64-unittest.cc b/src/v8/test/unittests/compiler/arm64/instruction-selector-arm64-unittest.cc
index 78d299f..013d96f 100644
--- a/src/v8/test/unittests/compiler/arm64/instruction-selector-arm64-unittest.cc
+++ b/src/v8/test/unittests/compiler/arm64/instruction-selector-arm64-unittest.cc
@@ -80,49 +80,47 @@
 // sized block. The block is then duplicated across the word. Below is a random
 // subset of the 32-bit immediates.
 const uint32_t kLogical32Immediates[] = {
-    0x00000002, 0x00000003, 0x00000070, 0x00000080, 0x00000100, 0x000001c0,
-    0x00000300, 0x000007e0, 0x00003ffc, 0x00007fc0, 0x0003c000, 0x0003f000,
-    0x0003ffc0, 0x0003fff8, 0x0007ff00, 0x0007ffe0, 0x000e0000, 0x001e0000,
-    0x001ffffc, 0x003f0000, 0x003f8000, 0x00780000, 0x007fc000, 0x00ff0000,
-    0x01800000, 0x01800180, 0x01f801f8, 0x03fe0000, 0x03ffffc0, 0x03fffffc,
-    0x06000000, 0x07fc0000, 0x07ffc000, 0x07ffffc0, 0x07ffffe0, 0x0ffe0ffe,
-    0x0ffff800, 0x0ffffff0, 0x0fffffff, 0x18001800, 0x1f001f00, 0x1f801f80,
-    0x30303030, 0x3ff03ff0, 0x3ff83ff8, 0x3fff0000, 0x3fff8000, 0x3fffffc0,
-    0x70007000, 0x7f7f7f7f, 0x7fc00000, 0x7fffffc0, 0x8000001f, 0x800001ff,
-    0x81818181, 0x9fff9fff, 0xc00007ff, 0xc0ffffff, 0xdddddddd, 0xe00001ff,
-    0xe00003ff, 0xe007ffff, 0xefffefff, 0xf000003f, 0xf001f001, 0xf3fff3ff,
-    0xf800001f, 0xf80fffff, 0xf87ff87f, 0xfbfbfbfb, 0xfc00001f, 0xfc0000ff,
-    0xfc0001ff, 0xfc03fc03, 0xfe0001ff, 0xff000001, 0xff03ff03, 0xff800000,
-    0xff800fff, 0xff801fff, 0xff87ffff, 0xffc0003f, 0xffc007ff, 0xffcfffcf,
-    0xffe00003, 0xffe1ffff, 0xfff0001f, 0xfff07fff, 0xfff80007, 0xfff87fff,
-    0xfffc00ff, 0xfffe07ff, 0xffff00ff, 0xffffc001, 0xfffff007, 0xfffff3ff,
-    0xfffff807, 0xfffff9ff, 0xfffffc0f, 0xfffffeff};
-
+    0x00000002, 0x00000003, 0x00000070, 0x00000080, 0x00000100, 0x000001C0,
+    0x00000300, 0x000007E0, 0x00003FFC, 0x00007FC0, 0x0003C000, 0x0003F000,
+    0x0003FFC0, 0x0003FFF8, 0x0007FF00, 0x0007FFE0, 0x000E0000, 0x001E0000,
+    0x001FFFFC, 0x003F0000, 0x003F8000, 0x00780000, 0x007FC000, 0x00FF0000,
+    0x01800000, 0x01800180, 0x01F801F8, 0x03FE0000, 0x03FFFFC0, 0x03FFFFFC,
+    0x06000000, 0x07FC0000, 0x07FFC000, 0x07FFFFC0, 0x07FFFFE0, 0x0FFE0FFE,
+    0x0FFFF800, 0x0FFFFFF0, 0x0FFFFFFF, 0x18001800, 0x1F001F00, 0x1F801F80,
+    0x30303030, 0x3FF03FF0, 0x3FF83FF8, 0x3FFF0000, 0x3FFF8000, 0x3FFFFFC0,
+    0x70007000, 0x7F7F7F7F, 0x7FC00000, 0x7FFFFFC0, 0x8000001F, 0x800001FF,
+    0x81818181, 0x9FFF9FFF, 0xC00007FF, 0xC0FFFFFF, 0xDDDDDDDD, 0xE00001FF,
+    0xE00003FF, 0xE007FFFF, 0xEFFFEFFF, 0xF000003F, 0xF001F001, 0xF3FFF3FF,
+    0xF800001F, 0xF80FFFFF, 0xF87FF87F, 0xFBFBFBFB, 0xFC00001F, 0xFC0000FF,
+    0xFC0001FF, 0xFC03FC03, 0xFE0001FF, 0xFF000001, 0xFF03FF03, 0xFF800000,
+    0xFF800FFF, 0xFF801FFF, 0xFF87FFFF, 0xFFC0003F, 0xFFC007FF, 0xFFCFFFCF,
+    0xFFE00003, 0xFFE1FFFF, 0xFFF0001F, 0xFFF07FFF, 0xFFF80007, 0xFFF87FFF,
+    0xFFFC00FF, 0xFFFE07FF, 0xFFFF00FF, 0xFFFFC001, 0xFFFFF007, 0xFFFFF3FF,
+    0xFFFFF807, 0xFFFFF9FF, 0xFFFFFC0F, 0xFFFFFEFF};
 
 // Random subset of 64-bit logical immediates.
 const uint64_t kLogical64Immediates[] = {
     0x0000000000000001, 0x0000000000000002, 0x0000000000000003,
     0x0000000000000070, 0x0000000000000080, 0x0000000000000100,
-    0x00000000000001c0, 0x0000000000000300, 0x0000000000000600,
-    0x00000000000007e0, 0x0000000000003ffc, 0x0000000000007fc0,
-    0x0000000600000000, 0x0000003ffffffffc, 0x000000f000000000,
-    0x000001f800000000, 0x0003fc0000000000, 0x0003fc000003fc00,
-    0x0003ffffffc00000, 0x0003ffffffffffc0, 0x0006000000060000,
-    0x003ffffffffc0000, 0x0180018001800180, 0x01f801f801f801f8,
+    0x00000000000001C0, 0x0000000000000300, 0x0000000000000600,
+    0x00000000000007E0, 0x0000000000003FFC, 0x0000000000007FC0,
+    0x0000000600000000, 0x0000003FFFFFFFFC, 0x000000F000000000,
+    0x000001F800000000, 0x0003FC0000000000, 0x0003FC000003FC00,
+    0x0003FFFFFFC00000, 0x0003FFFFFFFFFFC0, 0x0006000000060000,
+    0x003FFFFFFFFC0000, 0x0180018001800180, 0x01F801F801F801F8,
     0x0600000000000000, 0x1000000010000000, 0x1000100010001000,
-    0x1010101010101010, 0x1111111111111111, 0x1f001f001f001f00,
-    0x1f1f1f1f1f1f1f1f, 0x1ffffffffffffffe, 0x3ffc3ffc3ffc3ffc,
-    0x5555555555555555, 0x7f7f7f7f7f7f7f7f, 0x8000000000000000,
-    0x8000001f8000001f, 0x8181818181818181, 0x9999999999999999,
-    0x9fff9fff9fff9fff, 0xaaaaaaaaaaaaaaaa, 0xdddddddddddddddd,
-    0xe0000000000001ff, 0xf800000000000000, 0xf8000000000001ff,
-    0xf807f807f807f807, 0xfefefefefefefefe, 0xfffefffefffefffe,
-    0xfffff807fffff807, 0xfffff9fffffff9ff, 0xfffffc0ffffffc0f,
-    0xfffffc0fffffffff, 0xfffffefffffffeff, 0xfffffeffffffffff,
-    0xffffff8000000000, 0xfffffffefffffffe, 0xffffffffefffffff,
-    0xfffffffff9ffffff, 0xffffffffff800000, 0xffffffffffffc0ff,
-    0xfffffffffffffffe};
-
+    0x1010101010101010, 0x1111111111111111, 0x1F001F001F001F00,
+    0x1F1F1F1F1F1F1F1F, 0x1FFFFFFFFFFFFFFE, 0x3FFC3FFC3FFC3FFC,
+    0x5555555555555555, 0x7F7F7F7F7F7F7F7F, 0x8000000000000000,
+    0x8000001F8000001F, 0x8181818181818181, 0x9999999999999999,
+    0x9FFF9FFF9FFF9FFF, 0xAAAAAAAAAAAAAAAA, 0xDDDDDDDDDDDDDDDD,
+    0xE0000000000001FF, 0xF800000000000000, 0xF8000000000001FF,
+    0xF807F807F807F807, 0xFEFEFEFEFEFEFEFE, 0xFFFEFFFEFFFEFFFE,
+    0xFFFFF807FFFFF807, 0xFFFFF9FFFFFFF9FF, 0xFFFFFC0FFFFFFC0F,
+    0xFFFFFC0FFFFFFFFF, 0xFFFFFEFFFFFFFEFF, 0xFFFFFEFFFFFFFFFF,
+    0xFFFFFF8000000000, 0xFFFFFFFEFFFFFFFE, 0xFFFFFFFFEFFFFFFF,
+    0xFFFFFFFFF9FFFFFF, 0xFFFFFFFFFF800000, 0xFFFFFFFFFFFFC0FF,
+    0xFFFFFFFFFFFFFFFE};
 
 // ARM64 arithmetic instructions.
 struct AddSub {
@@ -595,7 +593,7 @@
   const MachineType type = dpi.mi.machine_type;
   StreamBuilder m(this, type, type, type);
   m.Return((m.*dpi.mi.constructor)(
-      m.Parameter(0), m.Word32And(m.Parameter(1), m.Int32Constant(0xff))));
+      m.Parameter(0), m.Word32And(m.Parameter(1), m.Int32Constant(0xFF))));
   Stream s = m.Build();
   ASSERT_EQ(1U, s.size());
   EXPECT_EQ(dpi.mi.arch_opcode, s[0]->arch_opcode());
@@ -610,7 +608,7 @@
   const MachineType type = dpi.mi.machine_type;
   StreamBuilder m(this, type, type, type);
   m.Return((m.*dpi.mi.constructor)(
-      m.Parameter(0), m.Word32And(m.Parameter(1), m.Int32Constant(0xffff))));
+      m.Parameter(0), m.Word32And(m.Parameter(1), m.Int32Constant(0xFFFF))));
   Stream s = m.Build();
   ASSERT_EQ(1U, s.size());
   EXPECT_EQ(dpi.mi.arch_opcode, s[0]->arch_opcode());
@@ -746,7 +744,7 @@
         EXPECT_TRUE(s[0]->InputAt(0)->IsImmediate());
         EXPECT_EQ(0, s.ToInt32(s[0]->InputAt(0)));
         EXPECT_EQ(shift.mode, s[0]->addressing_mode());
-        EXPECT_EQ(0x3f & imm, 0x3f & s.ToInt32(s[0]->InputAt(2)));
+        EXPECT_EQ(0x3F & imm, 0x3F & s.ToInt32(s[0]->InputAt(2)));
         EXPECT_EQ(1U, s[0]->OutputCount());
       }
     }
@@ -772,7 +770,7 @@
         EXPECT_TRUE(s[0]->InputAt(0)->IsImmediate());
         EXPECT_EQ(0, s.ToInt32(s[0]->InputAt(0)));
         EXPECT_EQ(shift.mode, s[0]->addressing_mode());
-        EXPECT_EQ(0x3f & imm, 0x3f & s.ToInt32(s[0]->InputAt(2)));
+        EXPECT_EQ(0x3F & imm, 0x3F & s.ToInt32(s[0]->InputAt(2)));
         EXPECT_EQ(1U, s[0]->OutputCount());
       }
     }
@@ -836,7 +834,7 @@
       EXPECT_EQ(kArm64Add32, s[0]->arch_opcode());
       EXPECT_EQ(shift.mode, s[0]->addressing_mode());
       EXPECT_EQ(3U, s[0]->InputCount());
-      EXPECT_EQ(0x3f & imm, 0x3f & s.ToInt64(s[0]->InputAt(2)));
+      EXPECT_EQ(0x3F & imm, 0x3F & s.ToInt64(s[0]->InputAt(2)));
       EXPECT_EQ(1U, s[0]->OutputCount());
     }
   }
@@ -860,7 +858,7 @@
       EXPECT_EQ(kArm64Add, s[0]->arch_opcode());
       EXPECT_EQ(shift.mode, s[0]->addressing_mode());
       EXPECT_EQ(3U, s[0]->InputCount());
-      EXPECT_EQ(0x3f & imm, 0x3f & s.ToInt64(s[0]->InputAt(2)));
+      EXPECT_EQ(0x3F & imm, 0x3F & s.ToInt64(s[0]->InputAt(2)));
       EXPECT_EQ(1U, s[0]->OutputCount());
     }
   }
@@ -871,7 +869,7 @@
   {
     StreamBuilder m(this, MachineType::Int32(), MachineType::Int32(),
                     MachineType::Int32());
-    m.Return(m.Int32Add(m.Word32And(m.Parameter(0), m.Int32Constant(0xff)),
+    m.Return(m.Int32Add(m.Word32And(m.Parameter(0), m.Int32Constant(0xFF)),
                         m.Parameter(1)));
     Stream s = m.Build();
     ASSERT_EQ(1U, s.size());
@@ -883,7 +881,7 @@
   {
     StreamBuilder m(this, MachineType::Int64(), MachineType::Int32(),
                     MachineType::Int64());
-    m.Return(m.Int64Add(m.Word32And(m.Parameter(0), m.Int32Constant(0xff)),
+    m.Return(m.Int64Add(m.Word32And(m.Parameter(0), m.Int32Constant(0xFF)),
                         m.Parameter(1)));
     Stream s = m.Build();
     ASSERT_EQ(1U, s.size());
@@ -899,7 +897,7 @@
   {
     StreamBuilder m(this, MachineType::Int32(), MachineType::Int32(),
                     MachineType::Int32());
-    m.Return(m.Int32Add(m.Word32And(m.Parameter(0), m.Int32Constant(0xffff)),
+    m.Return(m.Int32Add(m.Word32And(m.Parameter(0), m.Int32Constant(0xFFFF)),
                         m.Parameter(1)));
     Stream s = m.Build();
     ASSERT_EQ(1U, s.size());
@@ -911,7 +909,7 @@
   {
     StreamBuilder m(this, MachineType::Int64(), MachineType::Int32(),
                     MachineType::Int64());
-    m.Return(m.Int64Add(m.Word32And(m.Parameter(0), m.Int32Constant(0xffff)),
+    m.Return(m.Int64Add(m.Word32And(m.Parameter(0), m.Int32Constant(0xFFFF)),
                         m.Parameter(1)));
     Stream s = m.Build();
     ASSERT_EQ(1U, s.size());
@@ -1021,7 +1019,7 @@
 TEST_F(InstructionSelectorTest, Word32AndBranchWithImmediateOnRight) {
   TRACED_FOREACH(int32_t, imm, kLogical32Immediates) {
     // Skip the cases where the instruction selector would use tbz/tbnz.
-    if (base::bits::CountPopulation32(imm) == 1) continue;
+    if (base::bits::CountPopulation(static_cast<uint32_t>(imm)) == 1) continue;
 
     StreamBuilder m(this, MachineType::Int32(), MachineType::Int32());
     RawMachineLabel a, b;
@@ -1044,7 +1042,7 @@
 TEST_F(InstructionSelectorTest, Word64AndBranchWithImmediateOnRight) {
   TRACED_FOREACH(int64_t, imm, kLogical64Immediates) {
     // Skip the cases where the instruction selector would use tbz/tbnz.
-    if (base::bits::CountPopulation64(imm) == 1) continue;
+    if (base::bits::CountPopulation(static_cast<uint64_t>(imm)) == 1) continue;
 
     StreamBuilder m(this, MachineType::Int64(), MachineType::Int64());
     RawMachineLabel a, b;
@@ -1104,7 +1102,7 @@
 TEST_F(InstructionSelectorTest, Word32AndBranchWithImmediateOnLeft) {
   TRACED_FOREACH(int32_t, imm, kLogical32Immediates) {
     // Skip the cases where the instruction selector would use tbz/tbnz.
-    if (base::bits::CountPopulation32(imm) == 1) continue;
+    if (base::bits::CountPopulation(static_cast<uint32_t>(imm)) == 1) continue;
 
     StreamBuilder m(this, MachineType::Int32(), MachineType::Int32());
     RawMachineLabel a, b;
@@ -1128,7 +1126,7 @@
 TEST_F(InstructionSelectorTest, Word64AndBranchWithImmediateOnLeft) {
   TRACED_FOREACH(int64_t, imm, kLogical64Immediates) {
     // Skip the cases where the instruction selector would use tbz/tbnz.
-    if (base::bits::CountPopulation64(imm) == 1) continue;
+    if (base::bits::CountPopulation(static_cast<uint64_t>(imm)) == 1) continue;
 
     StreamBuilder m(this, MachineType::Int64(), MachineType::Int64());
     RawMachineLabel a, b;
@@ -1167,87 +1165,126 @@
   }
 }
 
+struct TestAndBranch {
+  MachInst<std::function<Node*(InstructionSelectorTest::StreamBuilder&, Node*,
+                               uint32_t mask)>>
+      mi;
+  FlagsCondition cond;
+};
 
-TEST_F(InstructionSelectorTest, Word32AndBranchWithOneBitMaskOnRight) {
+std::ostream& operator<<(std::ostream& os, const TestAndBranch& tb) {
+  return os << tb.mi;
+}
+
+const TestAndBranch kTestAndBranchMatchers32[] = {
+    // Branch on the result of Word32And directly.
+    {{[](InstructionSelectorTest::StreamBuilder& m, Node* x, uint32_t mask)
+          -> Node* { return m.Word32And(x, m.Int32Constant(mask)); },
+      "if (x and mask)", kArm64TestAndBranch32, MachineType::Int32()},
+     kNotEqual},
+    {{[](InstructionSelectorTest::StreamBuilder& m, Node* x,
+         uint32_t mask) -> Node* {
+        return m.Word32BinaryNot(m.Word32And(x, m.Int32Constant(mask)));
+      },
+      "if not (x and mask)", kArm64TestAndBranch32, MachineType::Int32()},
+     kEqual},
+    {{[](InstructionSelectorTest::StreamBuilder& m, Node* x, uint32_t mask)
+          -> Node* { return m.Word32And(m.Int32Constant(mask), x); },
+      "if (mask and x)", kArm64TestAndBranch32, MachineType::Int32()},
+     kNotEqual},
+    {{[](InstructionSelectorTest::StreamBuilder& m, Node* x,
+         uint32_t mask) -> Node* {
+        return m.Word32BinaryNot(m.Word32And(m.Int32Constant(mask), x));
+      },
+      "if not (mask and x)", kArm64TestAndBranch32, MachineType::Int32()},
+     kEqual},
+    // Branch on the result of '(x and mask) == mask'. This tests that a bit is
+    // set rather than cleared which is why conditions are inverted.
+    {{[](InstructionSelectorTest::StreamBuilder& m, Node* x,
+         uint32_t mask) -> Node* {
+        return m.Word32Equal(m.Word32And(x, m.Int32Constant(mask)),
+                             m.Int32Constant(mask));
+      },
+      "if ((x and mask) == mask)", kArm64TestAndBranch32, MachineType::Int32()},
+     kNotEqual},
+    {{[](InstructionSelectorTest::StreamBuilder& m, Node* x,
+         uint32_t mask) -> Node* {
+        return m.Word32BinaryNot(m.Word32Equal(
+            m.Word32And(x, m.Int32Constant(mask)), m.Int32Constant(mask)));
+      },
+      "if ((x and mask) != mask)", kArm64TestAndBranch32, MachineType::Int32()},
+     kEqual},
+    {{[](InstructionSelectorTest::StreamBuilder& m, Node* x,
+         uint32_t mask) -> Node* {
+        return m.Word32Equal(m.Int32Constant(mask),
+                             m.Word32And(x, m.Int32Constant(mask)));
+      },
+      "if (mask == (x and mask))", kArm64TestAndBranch32, MachineType::Int32()},
+     kNotEqual},
+    {{[](InstructionSelectorTest::StreamBuilder& m, Node* x,
+         uint32_t mask) -> Node* {
+        return m.Word32BinaryNot(m.Word32Equal(
+            m.Int32Constant(mask), m.Word32And(x, m.Int32Constant(mask))));
+      },
+      "if (mask != (x and mask))", kArm64TestAndBranch32, MachineType::Int32()},
+     kEqual},
+    // Same as above but swap 'mask' and 'x'.
+    {{[](InstructionSelectorTest::StreamBuilder& m, Node* x,
+         uint32_t mask) -> Node* {
+        return m.Word32Equal(m.Word32And(m.Int32Constant(mask), x),
+                             m.Int32Constant(mask));
+      },
+      "if ((mask and x) == mask)", kArm64TestAndBranch32, MachineType::Int32()},
+     kNotEqual},
+    {{[](InstructionSelectorTest::StreamBuilder& m, Node* x,
+         uint32_t mask) -> Node* {
+        return m.Word32BinaryNot(m.Word32Equal(
+            m.Word32And(m.Int32Constant(mask), x), m.Int32Constant(mask)));
+      },
+      "if ((mask and x) != mask)", kArm64TestAndBranch32, MachineType::Int32()},
+     kEqual},
+    {{[](InstructionSelectorTest::StreamBuilder& m, Node* x,
+         uint32_t mask) -> Node* {
+        return m.Word32Equal(m.Int32Constant(mask),
+                             m.Word32And(m.Int32Constant(mask), x));
+      },
+      "if (mask == (mask and x))", kArm64TestAndBranch32, MachineType::Int32()},
+     kNotEqual},
+    {{[](InstructionSelectorTest::StreamBuilder& m, Node* x,
+         uint32_t mask) -> Node* {
+        return m.Word32BinaryNot(m.Word32Equal(
+            m.Int32Constant(mask), m.Word32And(m.Int32Constant(mask), x)));
+      },
+      "if (mask != (mask and x))", kArm64TestAndBranch32, MachineType::Int32()},
+     kEqual}};
+
+typedef InstructionSelectorTestWithParam<TestAndBranch>
+    InstructionSelectorTestAndBranchTest;
+
+TEST_P(InstructionSelectorTestAndBranchTest, TestAndBranch32) {
+  const TestAndBranch inst = GetParam();
   TRACED_FORRANGE(int, bit, 0, 31) {
     uint32_t mask = 1 << bit;
     StreamBuilder m(this, MachineType::Int32(), MachineType::Int32());
     RawMachineLabel a, b;
-    m.Branch(m.Word32And(m.Parameter(0), m.Int32Constant(mask)), &a, &b);
+    m.Branch(inst.mi.constructor(m, m.Parameter(0), mask), &a, &b);
     m.Bind(&a);
     m.Return(m.Int32Constant(1));
     m.Bind(&b);
     m.Return(m.Int32Constant(0));
     Stream s = m.Build();
     ASSERT_EQ(1U, s.size());
-    EXPECT_EQ(kArm64TestAndBranch32, s[0]->arch_opcode());
-    EXPECT_EQ(kNotEqual, s[0]->flags_condition());
-    EXPECT_EQ(4U, s[0]->InputCount());
-    EXPECT_EQ(InstructionOperand::IMMEDIATE, s[0]->InputAt(1)->kind());
-    EXPECT_EQ(bit, s.ToInt32(s[0]->InputAt(1)));
-  }
-
-  TRACED_FORRANGE(int, bit, 0, 31) {
-    uint32_t mask = 1 << bit;
-    StreamBuilder m(this, MachineType::Int32(), MachineType::Int32());
-    RawMachineLabel a, b;
-    m.Branch(
-        m.Word32BinaryNot(m.Word32And(m.Parameter(0), m.Int32Constant(mask))),
-        &a, &b);
-    m.Bind(&a);
-    m.Return(m.Int32Constant(1));
-    m.Bind(&b);
-    m.Return(m.Int32Constant(0));
-    Stream s = m.Build();
-    ASSERT_EQ(1U, s.size());
-    EXPECT_EQ(kArm64TestAndBranch32, s[0]->arch_opcode());
-    EXPECT_EQ(kEqual, s[0]->flags_condition());
+    EXPECT_EQ(inst.mi.arch_opcode, s[0]->arch_opcode());
+    EXPECT_EQ(inst.cond, s[0]->flags_condition());
     EXPECT_EQ(4U, s[0]->InputCount());
     EXPECT_EQ(InstructionOperand::IMMEDIATE, s[0]->InputAt(1)->kind());
     EXPECT_EQ(bit, s.ToInt32(s[0]->InputAt(1)));
   }
 }
 
-TEST_F(InstructionSelectorTest, Word32AndBranchWithOneBitMaskOnLeft) {
-  TRACED_FORRANGE(int, bit, 0, 31) {
-    uint32_t mask = 1 << bit;
-    StreamBuilder m(this, MachineType::Int32(), MachineType::Int32());
-    RawMachineLabel a, b;
-    m.Branch(m.Word32And(m.Int32Constant(mask), m.Parameter(0)), &a, &b);
-    m.Bind(&a);
-    m.Return(m.Int32Constant(1));
-    m.Bind(&b);
-    m.Return(m.Int32Constant(0));
-    Stream s = m.Build();
-    ASSERT_EQ(1U, s.size());
-    EXPECT_EQ(kArm64TestAndBranch32, s[0]->arch_opcode());
-    EXPECT_EQ(kNotEqual, s[0]->flags_condition());
-    EXPECT_EQ(4U, s[0]->InputCount());
-    EXPECT_EQ(InstructionOperand::IMMEDIATE, s[0]->InputAt(1)->kind());
-    EXPECT_EQ(bit, s.ToInt32(s[0]->InputAt(1)));
-  }
-
-  TRACED_FORRANGE(int, bit, 0, 31) {
-    uint32_t mask = 1 << bit;
-    StreamBuilder m(this, MachineType::Int32(), MachineType::Int32());
-    RawMachineLabel a, b;
-    m.Branch(
-        m.Word32BinaryNot(m.Word32And(m.Int32Constant(mask), m.Parameter(0))),
-        &a, &b);
-    m.Bind(&a);
-    m.Return(m.Int32Constant(1));
-    m.Bind(&b);
-    m.Return(m.Int32Constant(0));
-    Stream s = m.Build();
-    ASSERT_EQ(1U, s.size());
-    EXPECT_EQ(kArm64TestAndBranch32, s[0]->arch_opcode());
-    EXPECT_EQ(kEqual, s[0]->flags_condition());
-    EXPECT_EQ(4U, s[0]->InputCount());
-    EXPECT_EQ(InstructionOperand::IMMEDIATE, s[0]->InputAt(1)->kind());
-    EXPECT_EQ(bit, s.ToInt32(s[0]->InputAt(1)));
-  }
-}
-
+INSTANTIATE_TEST_CASE_P(InstructionSelectorTest,
+                        InstructionSelectorTestAndBranchTest,
+                        ::testing::ValuesIn(kTestAndBranchMatchers32));
 
 TEST_F(InstructionSelectorTest, Word64AndBranchWithOneBitMaskOnRight) {
   TRACED_FORRANGE(int, bit, 0, 63) {
@@ -1335,7 +1372,7 @@
 
 TEST_F(InstructionSelectorTest, Word64EqualZeroAndBranchWithOneBitMask) {
   TRACED_FORRANGE(int, bit, 0, 63) {
-    uint64_t mask = V8_UINT64_C(1) << bit;
+    uint64_t mask = uint64_t{1} << bit;
     StreamBuilder m(this, MachineType::Int64(), MachineType::Int64());
     RawMachineLabel a, b;
     m.Branch(m.Word64Equal(m.Word64And(m.Int64Constant(mask), m.Parameter(0)),
@@ -1355,7 +1392,7 @@
   }
 
   TRACED_FORRANGE(int, bit, 0, 63) {
-    uint64_t mask = V8_UINT64_C(1) << bit;
+    uint64_t mask = uint64_t{1} << bit;
     StreamBuilder m(this, MachineType::Int64(), MachineType::Int64());
     RawMachineLabel a, b;
     m.Branch(
@@ -2925,7 +2962,7 @@
       ASSERT_EQ(3U, s[0]->InputCount());
       EXPECT_EQ(s.ToVreg(p0), s.ToVreg(s[0]->InputAt(0)));
       EXPECT_EQ(s.ToVreg(p1), s.ToVreg(s[0]->InputAt(1)));
-      EXPECT_EQ(0x3f & imm, 0x3f & s.ToInt32(s[0]->InputAt(2)));
+      EXPECT_EQ(0x3F & imm, 0x3F & s.ToInt32(s[0]->InputAt(2)));
       ASSERT_EQ(1U, s[0]->OutputCount());
     }
     TRACED_FORRANGE(int32_t, imm, -32, 63) {
@@ -2942,7 +2979,7 @@
       ASSERT_EQ(3U, s[0]->InputCount());
       EXPECT_EQ(s.ToVreg(p0), s.ToVreg(s[0]->InputAt(0)));
       EXPECT_EQ(s.ToVreg(p1), s.ToVreg(s[0]->InputAt(1)));
-      EXPECT_EQ(0x3f & imm, 0x3f & s.ToInt32(s[0]->InputAt(2)));
+      EXPECT_EQ(0x3F & imm, 0x3F & s.ToInt32(s[0]->InputAt(2)));
       ASSERT_EQ(1U, s[0]->OutputCount());
     }
   }
@@ -2955,7 +2992,7 @@
                     MachineType::Int32());
     Node* const p0 = m.Parameter(0);
     Node* const p1 = m.Parameter(1);
-    Node* r = m.Word32And(p1, m.Int32Constant(0xff));
+    Node* r = m.Word32And(p1, m.Int32Constant(0xFF));
     m.Return(m.Word32Equal(p0, r));
     Stream s = m.Build();
     ASSERT_EQ(1U, s.size());
@@ -2971,7 +3008,7 @@
                     MachineType::Int32());
     Node* const p0 = m.Parameter(0);
     Node* const p1 = m.Parameter(1);
-    Node* r = m.Word32And(p1, m.Int32Constant(0xff));
+    Node* r = m.Word32And(p1, m.Int32Constant(0xFF));
     m.Return(m.Word32Equal(r, p0));
     Stream s = m.Build();
     ASSERT_EQ(1U, s.size());
@@ -2991,7 +3028,7 @@
                     MachineType::Int32());
     Node* const p0 = m.Parameter(0);
     Node* const p1 = m.Parameter(1);
-    Node* r = m.Word32And(p1, m.Int32Constant(0xffff));
+    Node* r = m.Word32And(p1, m.Int32Constant(0xFFFF));
     m.Return(m.Word32Equal(p0, r));
     Stream s = m.Build();
     ASSERT_EQ(1U, s.size());
@@ -3007,7 +3044,7 @@
                     MachineType::Int32());
     Node* const p0 = m.Parameter(0);
     Node* const p1 = m.Parameter(1);
-    Node* r = m.Word32And(p1, m.Int32Constant(0xffff));
+    Node* r = m.Word32And(p1, m.Int32Constant(0xFFFF));
     m.Return(m.Word32Equal(r, p0));
     Stream s = m.Build();
     ASSERT_EQ(1U, s.size());
@@ -3204,7 +3241,7 @@
         EXPECT_EQ(kArm64Cmn32, s[0]->arch_opcode());
         EXPECT_EQ(3U, s[0]->InputCount());
         EXPECT_EQ(shift.mode, s[0]->addressing_mode());
-        EXPECT_EQ(0x3f & imm, 0x3f & s.ToInt32(s[0]->InputAt(2)));
+        EXPECT_EQ(0x3F & imm, 0x3F & s.ToInt32(s[0]->InputAt(2)));
         EXPECT_EQ(1U, s[0]->OutputCount());
         EXPECT_EQ(kFlags_set, s[0]->flags_mode());
         EXPECT_EQ(cmp.cond, s[0]->flags_condition());
@@ -3312,7 +3349,7 @@
         EXPECT_EQ(kArm64Cmp32, s[0]->arch_opcode());
         EXPECT_EQ(shift.mode, s[0]->addressing_mode());
         EXPECT_EQ(3U, s[0]->InputCount());
-        EXPECT_EQ(0x3f & imm, 0x3f & s.ToInt64(s[0]->InputAt(2)));
+        EXPECT_EQ(0x3F & imm, 0x3F & s.ToInt64(s[0]->InputAt(2)));
         EXPECT_EQ(1U, s[0]->OutputCount());
         EXPECT_EQ(kFlags_set, s[0]->flags_mode());
         EXPECT_EQ(cmp.commuted_cond, s[0]->flags_condition());
@@ -3346,7 +3383,7 @@
         EXPECT_EQ(kArm64Cmn32, s[0]->arch_opcode());
         EXPECT_EQ(shift.mode, s[0]->addressing_mode());
         EXPECT_EQ(3U, s[0]->InputCount());
-        EXPECT_EQ(0x3f & imm, 0x3f & s.ToInt64(s[0]->InputAt(2)));
+        EXPECT_EQ(0x3F & imm, 0x3F & s.ToInt64(s[0]->InputAt(2)));
         EXPECT_EQ(1U, s[0]->OutputCount());
         EXPECT_EQ(kFlags_set, s[0]->flags_mode());
         EXPECT_EQ(cmp.cond, s[0]->flags_condition());
@@ -3816,11 +3853,11 @@
   // The available shift operand range is `0 <= imm < 32`, but we also test
   // that immediates outside this range are handled properly (modulo-32).
   TRACED_FORRANGE(int32_t, shift, -32, 63) {
-    int32_t lsb = shift & 0x1f;
+    int32_t lsb = shift & 0x1F;
     TRACED_FORRANGE(int32_t, width, 1, 32 - lsb) {
       uint32_t jnk = rng()->NextInt();
       jnk = (lsb > 0) ? (jnk >> (32 - lsb)) : 0;
-      uint32_t msk = ((0xffffffffu >> (32 - width)) << lsb) | jnk;
+      uint32_t msk = ((0xFFFFFFFFu >> (32 - width)) << lsb) | jnk;
       StreamBuilder m(this, MachineType::Int32(), MachineType::Int32());
       m.Return(m.Word32Shr(m.Word32And(m.Parameter(0), m.Int32Constant(msk)),
                            m.Int32Constant(shift)));
@@ -3833,11 +3870,11 @@
     }
   }
   TRACED_FORRANGE(int32_t, shift, -32, 63) {
-    int32_t lsb = shift & 0x1f;
+    int32_t lsb = shift & 0x1F;
     TRACED_FORRANGE(int32_t, width, 1, 32 - lsb) {
       uint32_t jnk = rng()->NextInt();
       jnk = (lsb > 0) ? (jnk >> (32 - lsb)) : 0;
-      uint32_t msk = ((0xffffffffu >> (32 - width)) << lsb) | jnk;
+      uint32_t msk = ((0xFFFFFFFFu >> (32 - width)) << lsb) | jnk;
       StreamBuilder m(this, MachineType::Int32(), MachineType::Int32());
       m.Return(m.Word32Shr(m.Word32And(m.Int32Constant(msk), m.Parameter(0)),
                            m.Int32Constant(shift)));
@@ -3856,12 +3893,12 @@
   // The available shift operand range is `0 <= imm < 64`, but we also test
   // that immediates outside this range are handled properly (modulo-64).
   TRACED_FORRANGE(int32_t, shift, -64, 127) {
-    int32_t lsb = shift & 0x3f;
+    int32_t lsb = shift & 0x3F;
     TRACED_FORRANGE(int32_t, width, 1, 64 - lsb) {
       uint64_t jnk = rng()->NextInt64();
       jnk = (lsb > 0) ? (jnk >> (64 - lsb)) : 0;
       uint64_t msk =
-          ((V8_UINT64_C(0xffffffffffffffff) >> (64 - width)) << lsb) | jnk;
+          ((uint64_t{0xFFFFFFFFFFFFFFFF} >> (64 - width)) << lsb) | jnk;
       StreamBuilder m(this, MachineType::Int64(), MachineType::Int64());
       m.Return(m.Word64Shr(m.Word64And(m.Parameter(0), m.Int64Constant(msk)),
                            m.Int64Constant(shift)));
@@ -3874,12 +3911,12 @@
     }
   }
   TRACED_FORRANGE(int32_t, shift, -64, 127) {
-    int32_t lsb = shift & 0x3f;
+    int32_t lsb = shift & 0x3F;
     TRACED_FORRANGE(int32_t, width, 1, 64 - lsb) {
       uint64_t jnk = rng()->NextInt64();
       jnk = (lsb > 0) ? (jnk >> (64 - lsb)) : 0;
       uint64_t msk =
-          ((V8_UINT64_C(0xffffffffffffffff) >> (64 - width)) << lsb) | jnk;
+          ((uint64_t{0xFFFFFFFFFFFFFFFF} >> (64 - width)) << lsb) | jnk;
       StreamBuilder m(this, MachineType::Int64(), MachineType::Int64());
       m.Return(m.Word64Shr(m.Word64And(m.Int64Constant(msk), m.Parameter(0)),
                            m.Int64Constant(shift)));
@@ -3898,7 +3935,7 @@
   // The available shift operand range is `0 <= imm < 32`, but we also test
   // that immediates outside this range are handled properly (modulo-32).
   TRACED_FORRANGE(int32_t, shift, -32, 63) {
-    int32_t lsb = shift & 0x1f;
+    int32_t lsb = shift & 0x1F;
     TRACED_FORRANGE(int32_t, width, 1, 31) {
       uint32_t msk = (1 << width) - 1;
       StreamBuilder m(this, MachineType::Int32(), MachineType::Int32());
@@ -3914,7 +3951,7 @@
     }
   }
   TRACED_FORRANGE(int32_t, shift, -32, 63) {
-    int32_t lsb = shift & 0x1f;
+    int32_t lsb = shift & 0x1F;
     TRACED_FORRANGE(int32_t, width, 1, 31) {
       uint32_t msk = (1 << width) - 1;
       StreamBuilder m(this, MachineType::Int32(), MachineType::Int32());
@@ -3937,9 +3974,9 @@
   // The available shift operand range is `0 <= imm < 64`, but we also test
   // that immediates outside this range are handled properly (modulo-64).
   TRACED_FORRANGE(int64_t, shift, -64, 127) {
-    int64_t lsb = shift & 0x3f;
+    int64_t lsb = shift & 0x3F;
     TRACED_FORRANGE(int64_t, width, 1, 63) {
-      uint64_t msk = (V8_UINT64_C(1) << width) - 1;
+      uint64_t msk = (uint64_t{1} << width) - 1;
       StreamBuilder m(this, MachineType::Int64(), MachineType::Int64());
       m.Return(m.Word64And(m.Word64Shr(m.Parameter(0), m.Int64Constant(shift)),
                            m.Int64Constant(msk)));
@@ -3953,9 +3990,9 @@
     }
   }
   TRACED_FORRANGE(int64_t, shift, -64, 127) {
-    int64_t lsb = shift & 0x3f;
+    int64_t lsb = shift & 0x3F;
     TRACED_FORRANGE(int64_t, width, 1, 63) {
-      uint64_t msk = (V8_UINT64_C(1) << width) - 1;
+      uint64_t msk = (uint64_t{1} << width) - 1;
       StreamBuilder m(this, MachineType::Int64(), MachineType::Int64());
       m.Return(
           m.Word64And(m.Int64Constant(msk),
@@ -4013,7 +4050,7 @@
     EXPECT_EQ(kArm64Asr, s[1]->arch_opcode());
     ASSERT_EQ(2U, s[1]->InputCount());
     EXPECT_EQ(s.ToVreg(s[0]->Output()), s.ToVreg(s[1]->InputAt(0)));
-    EXPECT_EQ((shift & 0x1f) + 32, s.ToInt64(s[1]->InputAt(1)));
+    EXPECT_EQ((shift & 0x1F) + 32, s.ToInt64(s[1]->InputAt(1)));
     ASSERT_EQ(1U, s[1]->OutputCount());
     EXPECT_EQ(s.ToVreg(n), s.ToVreg(s[1]->Output()));
   }
@@ -4072,7 +4109,7 @@
     EXPECT_EQ(kArm64Lsr, s[1]->arch_opcode());
     ASSERT_EQ(2U, s[1]->InputCount());
     EXPECT_EQ(s.ToVreg(s[0]->Output()), s.ToVreg(s[1]->InputAt(0)));
-    EXPECT_EQ((shift & 0x1f) + 32, s.ToInt64(s[1]->InputAt(1)));
+    EXPECT_EQ((shift & 0x1F) + 32, s.ToInt64(s[1]->InputAt(1)));
     ASSERT_EQ(1U, s[1]->OutputCount());
     EXPECT_EQ(s.ToVreg(n), s.ToVreg(s[1]->Output()));
   }
diff --git a/src/v8/test/unittests/compiler/bytecode-analysis-unittest.cc b/src/v8/test/unittests/compiler/bytecode-analysis-unittest.cc
index 310f264..dd8b661 100644
--- a/src/v8/test/unittests/compiler/bytecode-analysis-unittest.cc
+++ b/src/v8/test/unittests/compiler/bytecode-analysis-unittest.cc
@@ -90,7 +90,7 @@
 SaveFlags* BytecodeAnalysisTest::save_flags_ = nullptr;
 
 TEST_F(BytecodeAnalysisTest, EmptyBlock) {
-  interpreter::BytecodeArrayBuilder builder(isolate(), zone(), 3, 3);
+  interpreter::BytecodeArrayBuilder builder(zone(), 3, 3);
   std::vector<std::pair<std::string, std::string>> expected_liveness;
 
   interpreter::Register reg_0(0);
@@ -104,7 +104,7 @@
 }
 
 TEST_F(BytecodeAnalysisTest, SimpleLoad) {
-  interpreter::BytecodeArrayBuilder builder(isolate(), zone(), 3, 3);
+  interpreter::BytecodeArrayBuilder builder(zone(), 3, 3);
   std::vector<std::pair<std::string, std::string>> expected_liveness;
 
   interpreter::Register reg_0(0);
@@ -121,7 +121,7 @@
 }
 
 TEST_F(BytecodeAnalysisTest, StoreThenLoad) {
-  interpreter::BytecodeArrayBuilder builder(isolate(), zone(), 3, 3);
+  interpreter::BytecodeArrayBuilder builder(zone(), 3, 3);
   std::vector<std::pair<std::string, std::string>> expected_liveness;
 
   interpreter::Register reg_0(0);
@@ -141,7 +141,7 @@
 }
 
 TEST_F(BytecodeAnalysisTest, DiamondLoad) {
-  interpreter::BytecodeArrayBuilder builder(isolate(), zone(), 3, 3);
+  interpreter::BytecodeArrayBuilder builder(zone(), 3, 3);
   std::vector<std::pair<std::string, std::string>> expected_liveness;
 
   interpreter::Register reg_0(0);
@@ -178,7 +178,7 @@
 }
 
 TEST_F(BytecodeAnalysisTest, DiamondLookupsAndBinds) {
-  interpreter::BytecodeArrayBuilder builder(isolate(), zone(), 3, 3);
+  interpreter::BytecodeArrayBuilder builder(zone(), 3, 3);
   std::vector<std::pair<std::string, std::string>> expected_liveness;
 
   interpreter::Register reg_0(0);
@@ -225,7 +225,7 @@
 }
 
 TEST_F(BytecodeAnalysisTest, SimpleLoop) {
-  interpreter::BytecodeArrayBuilder builder(isolate(), zone(), 3, 3);
+  interpreter::BytecodeArrayBuilder builder(zone(), 3, 3);
   std::vector<std::pair<std::string, std::string>> expected_liveness;
 
   interpreter::Register reg_0(0);
@@ -273,7 +273,7 @@
 }
 
 TEST_F(BytecodeAnalysisTest, TryCatch) {
-  interpreter::BytecodeArrayBuilder builder(isolate(), zone(), 3, 3);
+  interpreter::BytecodeArrayBuilder builder(zone(), 3, 3);
   std::vector<std::pair<std::string, std::string>> expected_liveness;
 
   interpreter::Register reg_0(0);
@@ -284,7 +284,8 @@
   builder.StoreAccumulatorInRegister(reg_0);
   expected_liveness.emplace_back(".LLL", "LLL.");
 
-  interpreter::TryCatchBuilder try_builder(&builder, HandlerTable::CAUGHT);
+  interpreter::TryCatchBuilder try_builder(&builder, nullptr, nullptr,
+                                           HandlerTable::CAUGHT);
   try_builder.BeginTry(reg_context);
   {
     // Gen r0.
@@ -325,7 +326,7 @@
   // diamond should eventually propagate up the other path when the loop is
   // reprocessed.
 
-  interpreter::BytecodeArrayBuilder builder(isolate(), zone(), 3, 3);
+  interpreter::BytecodeArrayBuilder builder(zone(), 3, 3);
   std::vector<std::pair<std::string, std::string>> expected_liveness;
 
   interpreter::Register reg_0(0);
@@ -395,7 +396,7 @@
   // still process the inner loop when processing the outer loop, to ensure that
   // r1 becomes live in 3 (via 5), but r0 stays dead (because of 4).
 
-  interpreter::BytecodeArrayBuilder builder(isolate(), zone(), 3, 3);
+  interpreter::BytecodeArrayBuilder builder(zone(), 3, 3);
   std::vector<std::pair<std::string, std::string>> expected_liveness;
 
   interpreter::Register reg_0(0);
diff --git a/src/v8/test/unittests/compiler/code-assembler-unittest.cc b/src/v8/test/unittests/compiler/code-assembler-unittest.cc
index 604e1ba..1716c8d5 100644
--- a/src/v8/test/unittests/compiler/code-assembler-unittest.cc
+++ b/src/v8/test/unittests/compiler/code-assembler-unittest.cc
@@ -109,6 +109,20 @@
     Node* c = m.IntPtrMul(a, b);
     EXPECT_THAT(c, IsIntPtrConstant(500));
   }
+  // x * 2^CONST  => x << CONST
+  {
+    Node* a = m.Parameter(0);
+    Node* b = m.IntPtrConstant(1 << 3);
+    Node* c = m.IntPtrMul(a, b);
+    EXPECT_THAT(c, IsWordShl(a, IsIntPtrConstant(3)));
+  }
+  // 2^CONST * x  => x << CONST
+  {
+    Node* a = m.IntPtrConstant(1 << 3);
+    Node* b = m.Parameter(0);
+    Node* c = m.IntPtrMul(a, b);
+    EXPECT_THAT(c, IsWordShl(b, IsIntPtrConstant(3)));
+  }
 }
 
 TARGET_TEST_F(CodeAssemblerTest, WordShl) {
diff --git a/src/v8/test/unittests/compiler/dead-code-elimination-unittest.cc b/src/v8/test/unittests/compiler/dead-code-elimination-unittest.cc
index d1f914c..4444ed0 100644
--- a/src/v8/test/unittests/compiler/dead-code-elimination-unittest.cc
+++ b/src/v8/test/unittests/compiler/dead-code-elimination-unittest.cc
@@ -24,7 +24,7 @@
 
  protected:
   Reduction Reduce(AdvancedReducer::Editor* editor, Node* node) {
-    DeadCodeElimination reducer(editor, graph(), common());
+    DeadCodeElimination reducer(editor, graph(), common(), zone());
     return reducer.Reduce(node);
   }
 
diff --git a/src/v8/test/unittests/compiler/effect-control-linearizer-unittest.cc b/src/v8/test/unittests/compiler/effect-control-linearizer-unittest.cc
index 78a038d..5c6de21 100644
--- a/src/v8/test/unittests/compiler/effect-control-linearizer-unittest.cc
+++ b/src/v8/test/unittests/compiler/effect-control-linearizer-unittest.cc
@@ -81,8 +81,9 @@
   schedule.AddReturn(start, ret);
 
   // Run the state effect introducer.
-  EffectControlLinearizer introducer(jsgraph(), &schedule, zone(),
-                                     source_positions());
+  EffectControlLinearizer introducer(
+      jsgraph(), &schedule, zone(), source_positions(),
+      EffectControlLinearizer::kDoNotMaskArrayIndex);
   introducer.Run();
 
   EXPECT_THAT(load,
@@ -143,8 +144,9 @@
   schedule.AddReturn(mblock, ret);
 
   // Run the state effect introducer.
-  EffectControlLinearizer introducer(jsgraph(), &schedule, zone(),
-                                     source_positions());
+  EffectControlLinearizer introducer(
+      jsgraph(), &schedule, zone(), source_positions(),
+      EffectControlLinearizer::kDoNotMaskArrayIndex);
   introducer.Run();
 
   // The effect input to the return should be an effect phi with the
@@ -210,8 +212,9 @@
   schedule.AddReturn(rblock, ret);
 
   // Run the state effect introducer.
-  EffectControlLinearizer introducer(jsgraph(), &schedule, zone(),
-                                     source_positions());
+  EffectControlLinearizer introducer(
+      jsgraph(), &schedule, zone(), source_positions(),
+      EffectControlLinearizer::kDoNotMaskArrayIndex);
   introducer.Run();
 
   ASSERT_THAT(ret, IsReturn(load, load, if_true));
@@ -273,8 +276,9 @@
   schedule.AddNode(mblock, merge);
   schedule.AddNode(mblock, graph()->end());
 
-  EffectControlLinearizer introducer(jsgraph(), &schedule, zone(),
-                                     source_positions());
+  EffectControlLinearizer introducer(
+      jsgraph(), &schedule, zone(), source_positions(),
+      EffectControlLinearizer::kDoNotMaskArrayIndex);
   introducer.Run();
 
   Capture<Node *> branch1_capture, branch2_capture;
diff --git a/src/v8/test/unittests/compiler/graph-unittest.cc b/src/v8/test/unittests/compiler/graph-unittest.cc
index 6e48eaf..a39f56e 100644
--- a/src/v8/test/unittests/compiler/graph-unittest.cc
+++ b/src/v8/test/unittests/compiler/graph-unittest.cc
@@ -17,7 +17,8 @@
     : TestWithNativeContext(),
       TestWithIsolateAndZone(),
       common_(zone()),
-      graph_(zone()) {
+      graph_(zone()),
+      source_positions_(&graph_) {
   graph()->SetStart(graph()->NewNode(common()->Start(num_parameters)));
   graph()->SetEnd(graph()->NewNode(common()->End(1), graph()->start()));
 }
@@ -119,14 +120,11 @@
   return node;
 }
 
-
-namespace {
+namespace graph_unittest {
 
 const Operator kDummyOperator(0, Operator::kNoProperties, "Dummy", 0, 0, 0, 1,
                               0, 0);
 
-}  // namespace
-
 
 TEST_F(GraphTest, NewNode) {
   Node* n0 = graph()->NewNode(&kDummyOperator);
@@ -139,6 +137,7 @@
   EXPECT_EQ(&kDummyOperator, n1->op());
 }
 
+}  // namespace graph_unittest
 }  // namespace compiler
 }  // namespace internal
 }  // namespace v8
diff --git a/src/v8/test/unittests/compiler/graph-unittest.h b/src/v8/test/unittests/compiler/graph-unittest.h
index 8701f1f..9d4a15a 100644
--- a/src/v8/test/unittests/compiler/graph-unittest.h
+++ b/src/v8/test/unittests/compiler/graph-unittest.h
@@ -6,6 +6,7 @@
 #define V8_UNITTESTS_COMPILER_GRAPH_UNITTEST_H_
 
 #include "src/compiler/common-operator.h"
+#include "src/compiler/compiler-source-position-table.h"
 #include "src/compiler/graph.h"
 #include "src/compiler/typer.h"
 #include "test/unittests/test-utils.h"
@@ -58,10 +59,12 @@
 
   CommonOperatorBuilder* common() { return &common_; }
   Graph* graph() { return &graph_; }
+  SourcePositionTable* source_positions() { return &source_positions_; }
 
  private:
   CommonOperatorBuilder common_;
   Graph graph_;
+  SourcePositionTable source_positions_;
 };
 
 
diff --git a/src/v8/test/unittests/compiler/ia32/instruction-selector-ia32-unittest.cc b/src/v8/test/unittests/compiler/ia32/instruction-selector-ia32-unittest.cc
index b9f5fc4..f2767a0 100644
--- a/src/v8/test/unittests/compiler/ia32/instruction-selector-ia32-unittest.cc
+++ b/src/v8/test/unittests/compiler/ia32/instruction-selector-ia32-unittest.cc
@@ -15,7 +15,7 @@
 // Immediates (random subset).
 const int32_t kImmediates[] = {kMinInt, -42, -1,   0,      1,          2,
                                3,       4,   5,    6,      7,          8,
-                               16,      42,  0xff, 0xffff, 0x0f0f0f0f, kMaxInt};
+                               16,      42,  0xFF, 0xFFFF, 0x0F0F0F0F, kMaxInt};
 
 }  // namespace
 
@@ -864,6 +864,15 @@
   EXPECT_EQ(s.ToVreg(n), s.ToVreg(s[0]->Output()));
 }
 
+TEST_F(InstructionSelectorTest, SpeculationFence) {
+  StreamBuilder m(this, MachineType::Int32());
+  m.SpeculationFence();
+  m.Return(m.Int32Constant(0));
+  Stream s = m.Build();
+  ASSERT_EQ(1U, s.size());
+  EXPECT_EQ(kLFence, s[0]->arch_opcode());
+}
+
 }  // namespace compiler
 }  // namespace internal
 }  // namespace v8
diff --git a/src/v8/test/unittests/compiler/instruction-sequence-unittest.cc b/src/v8/test/unittests/compiler/instruction-sequence-unittest.cc
index d629639..17d1572 100644
--- a/src/v8/test/unittests/compiler/instruction-sequence-unittest.cc
+++ b/src/v8/test/unittests/compiler/instruction-sequence-unittest.cc
@@ -432,8 +432,7 @@
     default:
       break;
   }
-  CHECK(false);
-  return InstructionOperand();
+  UNREACHABLE();
 }
 
 
@@ -468,8 +467,7 @@
     default:
       break;
   }
-  CHECK(false);
-  return InstructionOperand();
+  UNREACHABLE();
 }
 
 
diff --git a/src/v8/test/unittests/compiler/int64-lowering-unittest.cc b/src/v8/test/unittests/compiler/int64-lowering-unittest.cc
index a6bd1f2..ddb8408 100644
--- a/src/v8/test/unittests/compiler/int64-lowering-unittest.cc
+++ b/src/v8/test/unittests/compiler/int64-lowering-unittest.cc
@@ -34,8 +34,8 @@
       : GraphTest(),
         machine_(zone(), MachineRepresentation::kWord32,
                  MachineOperatorBuilder::Flag::kAllOptionalOps) {
-    value_[0] = 0x1234567890abcdef;
-    value_[1] = 0x1edcba098765432f;
+    value_[0] = 0x1234567890ABCDEF;
+    value_[1] = 0x1EDCBA098765432F;
     value_[2] = 0x1133557799886644;
   }
 
@@ -85,7 +85,7 @@
   int64_t value(int i) { return value_[i]; }
 
   int32_t low_word_value(int i) {
-    return static_cast<int32_t>(value_[i] & 0xffffffff);
+    return static_cast<int32_t>(value_[i] & 0xFFFFFFFF);
   }
 
   int32_t high_word_value(int i) {
@@ -760,7 +760,7 @@
       IsMerge(IsIfTrue(branch_lt32_matcher), IsIfFalse(branch_lt32_matcher)));
 
   Matcher<Node*> shift_matcher =
-      IsWord32And(IsParameter(0), IsInt32Constant(0x1f));
+      IsWord32And(IsParameter(0), IsInt32Constant(0x1F));
 
   Matcher<Node*> bit_mask_matcher = IsWord32Shl(
       IsWord32Sar(IsInt32Constant(std::numeric_limits<int32_t>::min()),
diff --git a/src/v8/test/unittests/compiler/js-intrinsic-lowering-unittest.cc b/src/v8/test/unittests/compiler/js-intrinsic-lowering-unittest.cc
index a9ef25b..2b0ccae 100644
--- a/src/v8/test/unittests/compiler/js-intrinsic-lowering-unittest.cc
+++ b/src/v8/test/unittests/compiler/js-intrinsic-lowering-unittest.cc
@@ -88,7 +88,7 @@
           IsNumberEqual(IsLoadField(AccessBuilder::ForMapInstanceType(),
                                     IsLoadField(AccessBuilder::ForMap(), input,
                                                 effect, CaptureEq(&if_false)),
-                                    effect, _),
+                                    _, _),
                         IsNumberConstant(JS_ARRAY_TYPE)),
           IsMerge(IsIfTrue(AllOf(CaptureEq(&branch),
                                  IsBranch(IsObjectIsSmi(input), control))),
@@ -119,7 +119,7 @@
           IsNumberEqual(IsLoadField(AccessBuilder::ForMapInstanceType(),
                                     IsLoadField(AccessBuilder::ForMap(), input,
                                                 effect, CaptureEq(&if_false)),
-                                    effect, _),
+                                    _, _),
                         IsNumberConstant(JS_TYPED_ARRAY_TYPE)),
           IsMerge(IsIfTrue(AllOf(CaptureEq(&branch),
                                  IsBranch(IsObjectIsSmi(input), control))),
diff --git a/src/v8/test/unittests/compiler/js-operator-unittest.cc b/src/v8/test/unittests/compiler/js-operator-unittest.cc
index 8a458a73..338232b 100644
--- a/src/v8/test/unittests/compiler/js-operator-unittest.cc
+++ b/src/v8/test/unittests/compiler/js-operator-unittest.cc
@@ -46,7 +46,6 @@
     SHARED(ToName, Operator::kNoProperties, 1, 1, 1, 1, 1, 1, 2),
     SHARED(ToObject, Operator::kFoldable, 1, 1, 1, 1, 1, 1, 2),
     SHARED(Create, Operator::kNoProperties, 2, 1, 1, 1, 1, 1, 2),
-    SHARED(TypeOf, Operator::kPure, 1, 0, 0, 0, 1, 0, 0),
 #undef SHARED
 };
 
diff --git a/src/v8/test/unittests/compiler/js-typed-lowering-unittest.cc b/src/v8/test/unittests/compiler/js-typed-lowering-unittest.cc
index 868c8b3..b07dbfd 100644
--- a/src/v8/test/unittests/compiler/js-typed-lowering-unittest.cc
+++ b/src/v8/test/unittests/compiler/js-typed-lowering-unittest.cc
@@ -65,77 +65,6 @@
 };
 
 
-// -----------------------------------------------------------------------------
-// JSToBoolean
-
-
-TEST_F(JSTypedLoweringTest, JSToBooleanWithBoolean) {
-  Node* input = Parameter(Type::Boolean(), 0);
-  Node* context = Parameter(Type::Any(), 1);
-  Reduction r = Reduce(graph()->NewNode(
-      javascript()->ToBoolean(ToBooleanHint::kAny), input, context));
-  ASSERT_TRUE(r.Changed());
-  EXPECT_EQ(input, r.replacement());
-}
-
-
-TEST_F(JSTypedLoweringTest, JSToBooleanWithOrderedNumber) {
-  Node* input = Parameter(Type::OrderedNumber(), 0);
-  Node* context = Parameter(Type::Any(), 1);
-  Reduction r = Reduce(graph()->NewNode(
-      javascript()->ToBoolean(ToBooleanHint::kAny), input, context));
-  ASSERT_TRUE(r.Changed());
-  EXPECT_THAT(r.replacement(),
-              IsBooleanNot(IsNumberEqual(input, IsNumberConstant(0.0))));
-}
-
-TEST_F(JSTypedLoweringTest, JSToBooleanWithNumber) {
-  Node* input = Parameter(Type::Number(), 0);
-  Node* context = Parameter(Type::Any(), 1);
-  Reduction r = Reduce(graph()->NewNode(
-      javascript()->ToBoolean(ToBooleanHint::kAny), input, context));
-  ASSERT_TRUE(r.Changed());
-  EXPECT_THAT(r.replacement(), IsNumberToBoolean(input));
-}
-
-TEST_F(JSTypedLoweringTest, JSToBooleanWithDetectableReceiverOrNull) {
-  Node* input = Parameter(Type::DetectableReceiverOrNull(), 0);
-  Node* context = Parameter(Type::Any(), 1);
-  Reduction r = Reduce(graph()->NewNode(
-      javascript()->ToBoolean(ToBooleanHint::kAny), input, context));
-  ASSERT_TRUE(r.Changed());
-  EXPECT_THAT(r.replacement(),
-              IsBooleanNot(IsReferenceEqual(input, IsNullConstant())));
-}
-
-TEST_F(JSTypedLoweringTest, JSToBooleanWithReceiverOrNullOrUndefined) {
-  Node* input = Parameter(Type::ReceiverOrNullOrUndefined(), 0);
-  Node* context = Parameter(Type::Any(), 1);
-  Reduction r = Reduce(graph()->NewNode(
-      javascript()->ToBoolean(ToBooleanHint::kAny), input, context));
-  ASSERT_TRUE(r.Changed());
-  EXPECT_THAT(r.replacement(), IsBooleanNot(IsObjectIsUndetectable(input)));
-}
-
-TEST_F(JSTypedLoweringTest, JSToBooleanWithString) {
-  Node* input = Parameter(Type::String(), 0);
-  Node* context = Parameter(Type::Any(), 1);
-  Reduction r = Reduce(graph()->NewNode(
-      javascript()->ToBoolean(ToBooleanHint::kAny), input, context));
-  ASSERT_TRUE(r.Changed());
-  EXPECT_THAT(r.replacement(),
-              IsBooleanNot(IsReferenceEqual(
-                  input, IsHeapConstant(factory()->empty_string()))));
-}
-
-TEST_F(JSTypedLoweringTest, JSToBooleanWithAny) {
-  Node* input = Parameter(Type::Any(), 0);
-  Node* context = Parameter(Type::Any(), 1);
-  Reduction r = Reduce(graph()->NewNode(
-      javascript()->ToBoolean(ToBooleanHint::kAny), input, context));
-  ASSERT_FALSE(r.Changed());
-}
-
 
 // -----------------------------------------------------------------------------
 // JSToName
@@ -453,8 +382,7 @@
       Reduce(graph()->NewNode(javascript()->LoadNamed(name, feedback), receiver,
                               context, EmptyFrameState(), effect, control));
   ASSERT_TRUE(r.Changed());
-  EXPECT_THAT(r.replacement(), IsLoadField(AccessBuilder::ForStringLength(),
-                                           receiver, effect, control));
+  EXPECT_THAT(r.replacement(), IsStringLength(receiver));
 }
 
 
diff --git a/src/v8/test/unittests/compiler/linkage-tail-call-unittest.cc b/src/v8/test/unittests/compiler/linkage-tail-call-unittest.cc
index 741021a..17dc998 100644
--- a/src/v8/test/unittests/compiler/linkage-tail-call-unittest.cc
+++ b/src/v8/test/unittests/compiler/linkage-tail-call-unittest.cc
@@ -157,7 +157,9 @@
   Node* const node = Node::New(zone(), 1, op, 0, nullptr, false);
   EXPECT_TRUE(desc1->CanTailCall(node));
   int stack_param_delta = desc2->GetStackParameterDelta(desc1);
-  EXPECT_EQ(1, stack_param_delta);
+  // We might need to add one slot of padding to the callee arguments.
+  int expected = kPadArguments ? 2 : 1;
+  EXPECT_EQ(expected, stack_param_delta);
 }
 
 
@@ -178,7 +180,9 @@
   Node* const node = Node::New(zone(), 1, op, 0, nullptr, false);
   EXPECT_TRUE(desc1->CanTailCall(node));
   int stack_param_delta = desc2->GetStackParameterDelta(desc1);
-  EXPECT_EQ(-1, stack_param_delta);
+  // We might need to drop one slot of padding from the caller's arguments.
+  int expected = kPadArguments ? -2 : -1;
+  EXPECT_EQ(expected, stack_param_delta);
 }
 
 
@@ -313,7 +317,9 @@
       Node::New(zone(), 1, op, arraysize(parameters), parameters, false);
   EXPECT_TRUE(desc1->CanTailCall(node));
   int stack_param_delta = desc2->GetStackParameterDelta(desc1);
-  EXPECT_EQ(-1, stack_param_delta);
+  // We might need to add one slot of padding to the callee arguments.
+  int expected = kPadArguments ? 0 : -1;
+  EXPECT_EQ(expected, stack_param_delta);
 }
 
 
@@ -341,7 +347,9 @@
       Node::New(zone(), 1, op, arraysize(parameters), parameters, false);
   EXPECT_TRUE(desc1->CanTailCall(node));
   int stack_param_delta = desc2->GetStackParameterDelta(desc1);
-  EXPECT_EQ(1, stack_param_delta);
+  // We might need to drop one slot of padding from the caller's arguments.
+  int expected = kPadArguments ? 0 : 1;
+  EXPECT_EQ(expected, stack_param_delta);
 }
 
 }  // namespace compiler
diff --git a/src/v8/test/unittests/compiler/loop-peeling-unittest.cc b/src/v8/test/unittests/compiler/loop-peeling-unittest.cc
index 969f253..ef129fa 100644
--- a/src/v8/test/unittests/compiler/loop-peeling-unittest.cc
+++ b/src/v8/test/unittests/compiler/loop-peeling-unittest.cc
@@ -74,14 +74,14 @@
   PeeledIteration* PeelOne() {
     LoopTree* loop_tree = GetLoopTree();
     LoopTree::Loop* loop = loop_tree->outer_loops()[0];
-    EXPECT_TRUE(LoopPeeler::CanPeel(loop_tree, loop));
-    return Peel(loop_tree, loop);
+    LoopPeeler peeler(graph(), common(), loop_tree, zone(), source_positions());
+    EXPECT_TRUE(peeler.CanPeel(loop));
+    return Peel(peeler, loop);
   }
 
-  PeeledIteration* Peel(LoopTree* loop_tree, LoopTree::Loop* loop) {
-    EXPECT_TRUE(LoopPeeler::CanPeel(loop_tree, loop));
-    PeeledIteration* peeled =
-        LoopPeeler::Peel(graph(), common(), loop_tree, loop, zone());
+  PeeledIteration* Peel(LoopPeeler peeler, LoopTree::Loop* loop) {
+    EXPECT_TRUE(peeler.CanPeel(loop));
+    PeeledIteration* peeled = peeler.Peel(loop);
     if (FLAG_trace_turbo_graph) {
       OFStream os(stdout);
       os << AsRPO(*graph());
@@ -250,7 +250,8 @@
   EXPECT_NE(nullptr, loop);
   EXPECT_EQ(1u, loop->depth());
 
-  PeeledIteration* peeled = Peel(loop_tree, loop);
+  LoopPeeler peeler(graph(), common(), loop_tree, zone(), source_positions());
+  PeeledIteration* peeled = Peel(peeler, loop);
 
   ExpectNotPeeled(outer.loop, peeled);
   ExpectNotPeeled(outer.branch, peeled);
@@ -289,7 +290,8 @@
   EXPECT_NE(nullptr, loop);
   EXPECT_EQ(1u, loop->depth());
 
-  PeeledIteration* peeled = Peel(loop_tree, loop);
+  LoopPeeler peeler(graph(), common(), loop_tree, zone(), source_positions());
+  PeeledIteration* peeled = Peel(peeler, loop);
 
   ExpectNotPeeled(outer.loop, peeled);
   ExpectNotPeeled(outer.branch, peeled);
@@ -517,7 +519,8 @@
   {
     LoopTree* loop_tree = GetLoopTree();
     LoopTree::Loop* loop = loop_tree->outer_loops()[0];
-    EXPECT_FALSE(LoopPeeler::CanPeel(loop_tree, loop));
+    LoopPeeler peeler(graph(), common(), loop_tree, zone(), source_positions());
+    EXPECT_FALSE(peeler.CanPeel(loop));
   }
 }
 
diff --git a/src/v8/test/unittests/compiler/machine-operator-reducer-unittest.cc b/src/v8/test/unittests/compiler/machine-operator-reducer-unittest.cc
index 1a4476f..4448452 100644
--- a/src/v8/test/unittests/compiler/machine-operator-reducer-unittest.cc
+++ b/src/v8/test/unittests/compiler/machine-operator-reducer-unittest.cc
@@ -173,70 +173,116 @@
     1954730266,                          2008792749,  2045320228,
     std::numeric_limits<int32_t>::max()};
 
-
-const int64_t kInt64Values[] = {
-    std::numeric_limits<int64_t>::min(), V8_INT64_C(-8974392461363618006),
-    V8_INT64_C(-8874367046689588135),    V8_INT64_C(-8269197512118230839),
-    V8_INT64_C(-8146091527100606733),    V8_INT64_C(-7550917981466150848),
-    V8_INT64_C(-7216590251577894337),    V8_INT64_C(-6464086891160048440),
-    V8_INT64_C(-6365616494908257190),    V8_INT64_C(-6305630541365849726),
-    V8_INT64_C(-5982222642272245453),    V8_INT64_C(-5510103099058504169),
-    V8_INT64_C(-5496838675802432701),    V8_INT64_C(-4047626578868642657),
-    V8_INT64_C(-4033755046900164544),    V8_INT64_C(-3554299241457877041),
-    V8_INT64_C(-2482258764588614470),    V8_INT64_C(-1688515425526875335),
-    V8_INT64_C(-924784137176548532),     V8_INT64_C(-725316567157391307),
-    V8_INT64_C(-439022654781092241),     V8_INT64_C(-105545757668917080),
-    V8_INT64_C(-2088319373),             V8_INT64_C(-2073699916),
-    V8_INT64_C(-1844949911),             V8_INT64_C(-1831090548),
-    V8_INT64_C(-1756711933),             V8_INT64_C(-1559409497),
-    V8_INT64_C(-1281179700),             V8_INT64_C(-1211513985),
-    V8_INT64_C(-1182371520),             V8_INT64_C(-785934753),
-    V8_INT64_C(-767480697),              V8_INT64_C(-705745662),
-    V8_INT64_C(-514362436),              V8_INT64_C(-459916580),
-    V8_INT64_C(-312328082),              V8_INT64_C(-302949707),
-    V8_INT64_C(-285499304),              V8_INT64_C(-125701262),
-    V8_INT64_C(-95139843),               V8_INT64_C(-32768),
-    V8_INT64_C(-27542),                  V8_INT64_C(-23600),
-    V8_INT64_C(-18582),                  V8_INT64_C(-17770),
-    V8_INT64_C(-9086),                   V8_INT64_C(-9010),
-    V8_INT64_C(-8244),                   V8_INT64_C(-2890),
-    V8_INT64_C(-103),                    V8_INT64_C(-34),
-    V8_INT64_C(-27),                     V8_INT64_C(-25),
-    V8_INT64_C(-9),                      V8_INT64_C(-7),
-    V8_INT64_C(0),                       V8_INT64_C(2),
-    V8_INT64_C(38),                      V8_INT64_C(58),
-    V8_INT64_C(65),                      V8_INT64_C(93),
-    V8_INT64_C(111),                     V8_INT64_C(1003),
-    V8_INT64_C(1267),                    V8_INT64_C(12797),
-    V8_INT64_C(23122),                   V8_INT64_C(28200),
-    V8_INT64_C(30888),                   V8_INT64_C(42648848),
-    V8_INT64_C(116836693),               V8_INT64_C(263003643),
-    V8_INT64_C(571039860),               V8_INT64_C(1079398689),
-    V8_INT64_C(1145196402),              V8_INT64_C(1184846321),
-    V8_INT64_C(1758281648),              V8_INT64_C(1859991374),
-    V8_INT64_C(1960251588),              V8_INT64_C(2042443199),
-    V8_INT64_C(296220586027987448),      V8_INT64_C(1015494173071134726),
-    V8_INT64_C(1151237951914455318),     V8_INT64_C(1331941174616854174),
-    V8_INT64_C(2022020418667972654),     V8_INT64_C(2450251424374977035),
-    V8_INT64_C(3668393562685561486),     V8_INT64_C(4858229301215502171),
-    V8_INT64_C(4919426235170669383),     V8_INT64_C(5034286595330341762),
-    V8_INT64_C(5055797915536941182),     V8_INT64_C(6072389716149252074),
-    V8_INT64_C(6185309910199801210),     V8_INT64_C(6297328311011094138),
-    V8_INT64_C(6932372858072165827),     V8_INT64_C(8483640924987737210),
-    V8_INT64_C(8663764179455849203),     V8_INT64_C(8877197042645298254),
-    V8_INT64_C(8901543506779157333),     std::numeric_limits<int64_t>::max()};
-
+const int64_t kInt64Values[] = {std::numeric_limits<int64_t>::min(),
+                                int64_t{-8974392461363618006},
+                                int64_t{-8874367046689588135},
+                                int64_t{-8269197512118230839},
+                                int64_t{-8146091527100606733},
+                                int64_t{-7550917981466150848},
+                                int64_t{-7216590251577894337},
+                                int64_t{-6464086891160048440},
+                                int64_t{-6365616494908257190},
+                                int64_t{-6305630541365849726},
+                                int64_t{-5982222642272245453},
+                                int64_t{-5510103099058504169},
+                                int64_t{-5496838675802432701},
+                                int64_t{-4047626578868642657},
+                                int64_t{-4033755046900164544},
+                                int64_t{-3554299241457877041},
+                                int64_t{-2482258764588614470},
+                                int64_t{-1688515425526875335},
+                                int64_t{-924784137176548532},
+                                int64_t{-725316567157391307},
+                                int64_t{-439022654781092241},
+                                int64_t{-105545757668917080},
+                                int64_t{-2088319373},
+                                int64_t{-2073699916},
+                                int64_t{-1844949911},
+                                int64_t{-1831090548},
+                                int64_t{-1756711933},
+                                int64_t{-1559409497},
+                                int64_t{-1281179700},
+                                int64_t{-1211513985},
+                                int64_t{-1182371520},
+                                int64_t{-785934753},
+                                int64_t{-767480697},
+                                int64_t{-705745662},
+                                int64_t{-514362436},
+                                int64_t{-459916580},
+                                int64_t{-312328082},
+                                int64_t{-302949707},
+                                int64_t{-285499304},
+                                int64_t{-125701262},
+                                int64_t{-95139843},
+                                int64_t{-32768},
+                                int64_t{-27542},
+                                int64_t{-23600},
+                                int64_t{-18582},
+                                int64_t{-17770},
+                                int64_t{-9086},
+                                int64_t{-9010},
+                                int64_t{-8244},
+                                int64_t{-2890},
+                                int64_t{-103},
+                                int64_t{-34},
+                                int64_t{-27},
+                                int64_t{-25},
+                                int64_t{-9},
+                                int64_t{-7},
+                                int64_t{0},
+                                int64_t{2},
+                                int64_t{38},
+                                int64_t{58},
+                                int64_t{65},
+                                int64_t{93},
+                                int64_t{111},
+                                int64_t{1003},
+                                int64_t{1267},
+                                int64_t{12797},
+                                int64_t{23122},
+                                int64_t{28200},
+                                int64_t{30888},
+                                int64_t{42648848},
+                                int64_t{116836693},
+                                int64_t{263003643},
+                                int64_t{571039860},
+                                int64_t{1079398689},
+                                int64_t{1145196402},
+                                int64_t{1184846321},
+                                int64_t{1758281648},
+                                int64_t{1859991374},
+                                int64_t{1960251588},
+                                int64_t{2042443199},
+                                int64_t{296220586027987448},
+                                int64_t{1015494173071134726},
+                                int64_t{1151237951914455318},
+                                int64_t{1331941174616854174},
+                                int64_t{2022020418667972654},
+                                int64_t{2450251424374977035},
+                                int64_t{3668393562685561486},
+                                int64_t{4858229301215502171},
+                                int64_t{4919426235170669383},
+                                int64_t{5034286595330341762},
+                                int64_t{5055797915536941182},
+                                int64_t{6072389716149252074},
+                                int64_t{6185309910199801210},
+                                int64_t{6297328311011094138},
+                                int64_t{6932372858072165827},
+                                int64_t{8483640924987737210},
+                                int64_t{8663764179455849203},
+                                int64_t{8877197042645298254},
+                                int64_t{8901543506779157333},
+                                std::numeric_limits<int64_t>::max()};
 
 const uint32_t kUint32Values[] = {
-    0x00000000, 0x00000001, 0xffffffff, 0x1b09788b, 0x04c5fce8, 0xcc0de5bf,
-    0x273a798e, 0x187937a3, 0xece3af83, 0x5495a16b, 0x0b668ecc, 0x11223344,
-    0x0000009e, 0x00000043, 0x0000af73, 0x0000116b, 0x00658ecc, 0x002b3b4c,
-    0x88776655, 0x70000000, 0x07200000, 0x7fffffff, 0x56123761, 0x7fffff00,
-    0x761c4761, 0x80000000, 0x88888888, 0xa0000000, 0xdddddddd, 0xe0000000,
-    0xeeeeeeee, 0xfffffffd, 0xf0000000, 0x007fffff, 0x003fffff, 0x001fffff,
-    0x000fffff, 0x0007ffff, 0x0003ffff, 0x0001ffff, 0x0000ffff, 0x00007fff,
-    0x00003fff, 0x00001fff, 0x00000fff, 0x000007ff, 0x000003ff, 0x000001ff};
-
+    0x00000000, 0x00000001, 0xFFFFFFFF, 0x1B09788B, 0x04C5FCE8, 0xCC0DE5BF,
+    0x273A798E, 0x187937A3, 0xECE3AF83, 0x5495A16B, 0x0B668ECC, 0x11223344,
+    0x0000009E, 0x00000043, 0x0000AF73, 0x0000116B, 0x00658ECC, 0x002B3B4C,
+    0x88776655, 0x70000000, 0x07200000, 0x7FFFFFFF, 0x56123761, 0x7FFFFF00,
+    0x761C4761, 0x80000000, 0x88888888, 0xA0000000, 0xDDDDDDDD, 0xE0000000,
+    0xEEEEEEEE, 0xFFFFFFFD, 0xF0000000, 0x007FFFFF, 0x003FFFFF, 0x001FFFFF,
+    0x000FFFFF, 0x0007FFFF, 0x0003FFFF, 0x0001FFFF, 0x0000FFFF, 0x00007FFF,
+    0x00003FFF, 0x00001FFF, 0x00000FFF, 0x000007FF, 0x000003FF, 0x000001FF};
 
 struct ComparisonBinaryOperator {
   const Operator* (MachineOperatorBuilder::*constructor)();
@@ -1653,7 +1699,7 @@
 
 TEST_F(MachineOperatorReducerTest, Float64DivWithPowerOfTwo) {
   Node* const p0 = Parameter(0);
-  TRACED_FORRANGE(uint64_t, exponent, 1, 0x7fe) {
+  TRACED_FORRANGE(uint64_t, exponent, 1, 0x7FE) {
     Double divisor = Double(exponent << Double::kPhysicalSignificandSize);
     if (divisor.value() == 1.0) continue;  // Skip x / 1.0 => x.
     Reduction r = Reduce(graph()->NewNode(machine()->Float64Div(), p0,
@@ -1946,7 +1992,7 @@
       EXPECT_THAT(
           r.replacement(),
           IsFloat64Constant(BitEq(bit_cast<double>(
-              (bit_cast<uint64_t>(x) & V8_UINT64_C(0xFFFFFFFF00000000)) | y))));
+              (bit_cast<uint64_t>(x) & uint64_t{0xFFFFFFFF00000000}) | y))));
     }
   }
 }
@@ -1965,7 +2011,7 @@
       ASSERT_TRUE(r.Changed());
       EXPECT_THAT(r.replacement(),
                   IsFloat64Constant(BitEq(bit_cast<double>(
-                      (bit_cast<uint64_t>(x) & V8_UINT64_C(0xFFFFFFFF)) |
+                      (bit_cast<uint64_t>(x) & uint64_t{0xFFFFFFFF}) |
                       (static_cast<uint64_t>(y) << 32)))));
     }
   }
@@ -2110,7 +2156,7 @@
     Node* const node =
         graph()->NewNode(machine()->Store(rep), base, index,
                          graph()->NewNode(machine()->Word32And(), value,
-                                          Uint32Constant(x | 0xffu)),
+                                          Uint32Constant(x | 0xFFu)),
                          effect, control);
 
     Reduction r = Reduce(node);
@@ -2157,7 +2203,7 @@
     Node* const node =
         graph()->NewNode(machine()->Store(rep), base, index,
                          graph()->NewNode(machine()->Word32And(), value,
-                                          Uint32Constant(x | 0xffffu)),
+                                          Uint32Constant(x | 0xFFFFu)),
                          effect, control);
 
     Reduction r = Reduce(node);
diff --git a/src/v8/test/unittests/compiler/machine-operator-unittest.cc b/src/v8/test/unittests/compiler/machine-operator-unittest.cc
index 400b058..75e8468 100644
--- a/src/v8/test/unittests/compiler/machine-operator-unittest.cc
+++ b/src/v8/test/unittests/compiler/machine-operator-unittest.cc
@@ -11,6 +11,7 @@
 namespace v8 {
 namespace internal {
 namespace compiler {
+namespace machine_operator_unittest {
 
 #if GTEST_HAS_COMBINE
 
@@ -31,8 +32,6 @@
 };
 
 
-namespace {
-
 const MachineRepresentation kMachineReps[] = {MachineRepresentation::kWord32,
                                               MachineRepresentation::kWord64};
 
@@ -50,8 +49,6 @@
     MachineRepresentation::kWord32,  MachineRepresentation::kWord64,
     MachineRepresentation::kTagged};
 
-}  // namespace
-
 
 // -----------------------------------------------------------------------------
 // Load operator.
@@ -169,8 +166,6 @@
 // -----------------------------------------------------------------------------
 // Pure operators.
 
-namespace {
-
 struct PureOperator {
   const Operator* (MachineOperatorBuilder::*constructor)();
   char const* const constructor_name;
@@ -269,7 +264,6 @@
 #undef PURE
 };
 
-}  // namespace
 
 class MachinePureOperatorTest : public TestWithZone {
  protected:
@@ -299,8 +293,6 @@
 
 // Optional operators.
 
-namespace {
-
 struct OptionalOperatorEntry {
   const OptionalOperator (MachineOperatorBuilder::*constructor)();
   MachineOperatorBuilder::Flag enabling_flag;
@@ -327,7 +319,6 @@
     OPTIONAL_ENTRY(Float64RoundTiesAway, 1, 0, 1),  // --
 #undef OPTIONAL_ENTRY
 };
-}  // namespace
 
 
 class MachineOptionalOperatorTest : public TestWithZone {
@@ -365,12 +356,8 @@
 // Pseudo operators.
 
 
-namespace {
-
 typedef TestWithZone MachineOperatorTest;
 
-}  // namespace
-
 
 TEST_F(MachineOperatorTest, PseudoOperatorsWhenWordSizeIs32Bit) {
   MachineOperatorBuilder machine(zone(), MachineRepresentation::kWord32);
@@ -415,6 +402,7 @@
   EXPECT_EQ(machine.Int64LessThanOrEqual(), machine.IntLessThanOrEqual());
 }
 
+}  // namespace machine_operator_unittest
 }  // namespace compiler
 }  // namespace internal
 }  // namespace v8
diff --git a/src/v8/test/unittests/compiler/mips/instruction-selector-mips-unittest.cc b/src/v8/test/unittests/compiler/mips/instruction-selector-mips-unittest.cc
index 2f1e7e8..34faec9 100644
--- a/src/v8/test/unittests/compiler/mips/instruction-selector-mips-unittest.cc
+++ b/src/v8/test/unittests/compiler/mips/instruction-selector-mips-unittest.cc
@@ -356,11 +356,11 @@
   // The available shift operand range is `0 <= imm < 32`, but we also test
   // that immediates outside this range are handled properly (modulo-32).
   TRACED_FORRANGE(int32_t, shift, -32, 63) {
-    int32_t lsb = shift & 0x1f;
+    int32_t lsb = shift & 0x1F;
     TRACED_FORRANGE(int32_t, width, 1, 32 - lsb) {
       uint32_t jnk = rng()->NextInt();
       jnk = (lsb > 0) ? (jnk >> (32 - lsb)) : 0;
-      uint32_t msk = ((0xffffffffu >> (32 - width)) << lsb) | jnk;
+      uint32_t msk = ((0xFFFFFFFFu >> (32 - width)) << lsb) | jnk;
       StreamBuilder m(this, MachineType::Int32(), MachineType::Int32());
       m.Return(m.Word32Shr(m.Word32And(m.Parameter(0), m.Int32Constant(msk)),
                            m.Int32Constant(shift)));
@@ -373,11 +373,11 @@
     }
   }
   TRACED_FORRANGE(int32_t, shift, -32, 63) {
-    int32_t lsb = shift & 0x1f;
+    int32_t lsb = shift & 0x1F;
     TRACED_FORRANGE(int32_t, width, 1, 32 - lsb) {
       uint32_t jnk = rng()->NextInt();
       jnk = (lsb > 0) ? (jnk >> (32 - lsb)) : 0;
-      uint32_t msk = ((0xffffffffu >> (32 - width)) << lsb) | jnk;
+      uint32_t msk = ((0xFFFFFFFFu >> (32 - width)) << lsb) | jnk;
       StreamBuilder m(this, MachineType::Int32(), MachineType::Int32());
       m.Return(m.Word32Shr(m.Word32And(m.Int32Constant(msk), m.Parameter(0)),
                            m.Int32Constant(shift)));
@@ -517,7 +517,7 @@
   // The available shift operand range is `0 <= imm < 32`, but we also test
   // that immediates outside this range are handled properly (modulo-32).
   TRACED_FORRANGE(int32_t, shift, -32, 63) {
-    int32_t lsb = shift & 0x1f;
+    int32_t lsb = shift & 0x1F;
     TRACED_FORRANGE(int32_t, width, 1, 31) {
       uint32_t msk = (1 << width) - 1;
       StreamBuilder m(this, MachineType::Int32(), MachineType::Int32());
@@ -533,7 +533,7 @@
     }
   }
   TRACED_FORRANGE(int32_t, shift, -32, 63) {
-    int32_t lsb = shift & 0x1f;
+    int32_t lsb = shift & 0x1F;
     TRACED_FORRANGE(int32_t, width, 1, 31) {
       uint32_t msk = (1 << width) - 1;
       StreamBuilder m(this, MachineType::Int32(), MachineType::Int32());
diff --git a/src/v8/test/unittests/compiler/mips64/instruction-selector-mips64-unittest.cc b/src/v8/test/unittests/compiler/mips64/instruction-selector-mips64-unittest.cc
index 74af374..c090e29 100644
--- a/src/v8/test/unittests/compiler/mips64/instruction-selector-mips64-unittest.cc
+++ b/src/v8/test/unittests/compiler/mips64/instruction-selector-mips64-unittest.cc
@@ -400,11 +400,11 @@
   // The available shift operand range is `0 <= imm < 32`, but we also test
   // that immediates outside this range are handled properly (modulo-32).
   TRACED_FORRANGE(int32_t, shift, -32, 63) {
-    int32_t lsb = shift & 0x1f;
+    int32_t lsb = shift & 0x1F;
     TRACED_FORRANGE(int32_t, width, 1, 32 - lsb) {
       uint32_t jnk = rng()->NextInt();
       jnk = (lsb > 0) ? (jnk >> (32 - lsb)) : 0;
-      uint32_t msk = ((0xffffffffu >> (32 - width)) << lsb) | jnk;
+      uint32_t msk = ((0xFFFFFFFFu >> (32 - width)) << lsb) | jnk;
       StreamBuilder m(this, MachineType::Int32(), MachineType::Int32());
       m.Return(m.Word32Shr(m.Word32And(m.Parameter(0), m.Int32Constant(msk)),
                            m.Int32Constant(shift)));
@@ -417,11 +417,11 @@
     }
   }
   TRACED_FORRANGE(int32_t, shift, -32, 63) {
-    int32_t lsb = shift & 0x1f;
+    int32_t lsb = shift & 0x1F;
     TRACED_FORRANGE(int32_t, width, 1, 32 - lsb) {
       uint32_t jnk = rng()->NextInt();
       jnk = (lsb > 0) ? (jnk >> (32 - lsb)) : 0;
-      uint32_t msk = ((0xffffffffu >> (32 - width)) << lsb) | jnk;
+      uint32_t msk = ((0xFFFFFFFFu >> (32 - width)) << lsb) | jnk;
       StreamBuilder m(this, MachineType::Int32(), MachineType::Int32());
       m.Return(m.Word32Shr(m.Word32And(m.Int32Constant(msk), m.Parameter(0)),
                            m.Int32Constant(shift)));
@@ -440,12 +440,12 @@
   // The available shift operand range is `0 <= imm < 64`, but we also test
   // that immediates outside this range are handled properly (modulo-64).
   TRACED_FORRANGE(int32_t, shift, -64, 127) {
-    int32_t lsb = shift & 0x3f;
+    int32_t lsb = shift & 0x3F;
     TRACED_FORRANGE(int32_t, width, 1, 64 - lsb) {
       uint64_t jnk = rng()->NextInt64();
       jnk = (lsb > 0) ? (jnk >> (64 - lsb)) : 0;
       uint64_t msk =
-          ((V8_UINT64_C(0xffffffffffffffff) >> (64 - width)) << lsb) | jnk;
+          ((uint64_t{0xFFFFFFFFFFFFFFFF} >> (64 - width)) << lsb) | jnk;
       StreamBuilder m(this, MachineType::Int64(), MachineType::Int64());
       m.Return(m.Word64Shr(m.Word64And(m.Parameter(0), m.Int64Constant(msk)),
                            m.Int64Constant(shift)));
@@ -458,12 +458,12 @@
     }
   }
   TRACED_FORRANGE(int32_t, shift, -64, 127) {
-    int32_t lsb = shift & 0x3f;
+    int32_t lsb = shift & 0x3F;
     TRACED_FORRANGE(int32_t, width, 1, 64 - lsb) {
       uint64_t jnk = rng()->NextInt64();
       jnk = (lsb > 0) ? (jnk >> (64 - lsb)) : 0;
       uint64_t msk =
-          ((V8_UINT64_C(0xffffffffffffffff) >> (64 - width)) << lsb) | jnk;
+          ((uint64_t{0xFFFFFFFFFFFFFFFF} >> (64 - width)) << lsb) | jnk;
       StreamBuilder m(this, MachineType::Int64(), MachineType::Int64());
       m.Return(m.Word64Shr(m.Word64And(m.Int64Constant(msk), m.Parameter(0)),
                            m.Int64Constant(shift)));
@@ -649,7 +649,7 @@
   // The available shift operand range is `0 <= imm < 32`, but we also test
   // that immediates outside this range are handled properly (modulo-32).
   TRACED_FORRANGE(int32_t, shift, -32, 63) {
-    int32_t lsb = shift & 0x1f;
+    int32_t lsb = shift & 0x1F;
     TRACED_FORRANGE(int32_t, width, 1, 31) {
       uint32_t msk = (1 << width) - 1;
       StreamBuilder m(this, MachineType::Int32(), MachineType::Int32());
@@ -665,7 +665,7 @@
     }
   }
   TRACED_FORRANGE(int32_t, shift, -32, 63) {
-    int32_t lsb = shift & 0x1f;
+    int32_t lsb = shift & 0x1F;
     TRACED_FORRANGE(int32_t, width, 1, 31) {
       uint32_t msk = (1 << width) - 1;
       StreamBuilder m(this, MachineType::Int32(), MachineType::Int32());
@@ -688,9 +688,9 @@
   // The available shift operand range is `0 <= imm < 64`, but we also test
   // that immediates outside this range are handled properly (modulo-64).
   TRACED_FORRANGE(int64_t, shift, -64, 127) {
-    int64_t lsb = shift & 0x3f;
+    int64_t lsb = shift & 0x3F;
     TRACED_FORRANGE(int64_t, width, 1, 63) {
-      uint64_t msk = (V8_UINT64_C(1) << width) - 1;
+      uint64_t msk = (uint64_t{1} << width) - 1;
       StreamBuilder m(this, MachineType::Int64(), MachineType::Int64());
       m.Return(m.Word64And(m.Word64Shr(m.Parameter(0), m.Int64Constant(shift)),
                            m.Int64Constant(msk)));
@@ -704,9 +704,9 @@
     }
   }
   TRACED_FORRANGE(int64_t, shift, -64, 127) {
-    int64_t lsb = shift & 0x3f;
+    int64_t lsb = shift & 0x3F;
     TRACED_FORRANGE(int64_t, width, 1, 63) {
-      uint64_t msk = (V8_UINT64_C(1) << width) - 1;
+      uint64_t msk = (uint64_t{1} << width) - 1;
       StreamBuilder m(this, MachineType::Int64(), MachineType::Int64());
       m.Return(
           m.Word64And(m.Int64Constant(msk),
diff --git a/src/v8/test/unittests/compiler/node-test-utils.cc b/src/v8/test/unittests/compiler/node-test-utils.cc
index 52fd02b..8e7084d 100644
--- a/src/v8/test/unittests/compiler/node-test-utils.cc
+++ b/src/v8/test/unittests/compiler/node-test-utils.cc
@@ -2182,6 +2182,7 @@
 IS_UNOP_MATCHER(ObjectIsSmi)
 IS_UNOP_MATCHER(ObjectIsUndetectable)
 IS_UNOP_MATCHER(StringFromCharCode)
+IS_UNOP_MATCHER(StringLength)
 IS_UNOP_MATCHER(Word32Clz)
 IS_UNOP_MATCHER(Word32Ctz)
 IS_UNOP_MATCHER(Word32Popcnt)
diff --git a/src/v8/test/unittests/compiler/node-test-utils.h b/src/v8/test/unittests/compiler/node-test-utils.h
index 81e471f..3ce6aba 100644
--- a/src/v8/test/unittests/compiler/node-test-utils.h
+++ b/src/v8/test/unittests/compiler/node-test-utils.h
@@ -272,6 +272,7 @@
 Matcher<Node*> IsNumberTanh(const Matcher<Node*>& value_matcher);
 Matcher<Node*> IsNumberTrunc(const Matcher<Node*>& value_matcher);
 Matcher<Node*> IsStringFromCharCode(const Matcher<Node*>& value_matcher);
+Matcher<Node*> IsStringLength(const Matcher<Node*>& value_matcher);
 Matcher<Node*> IsAllocate(const Matcher<Node*>& size_matcher,
                           const Matcher<Node*>& effect_matcher,
                           const Matcher<Node*>& control_matcher);
diff --git a/src/v8/test/unittests/compiler/node-unittest.cc b/src/v8/test/unittests/compiler/node-unittest.cc
index 8379e26..b333c20 100644
--- a/src/v8/test/unittests/compiler/node-unittest.cc
+++ b/src/v8/test/unittests/compiler/node-unittest.cc
@@ -15,12 +15,11 @@
 namespace v8 {
 namespace internal {
 namespace compiler {
+namespace node_unittest {
 
 typedef TestWithZone NodeTest;
 
 
-namespace {
-
 const IrOpcode::Value kOpcode0 = static_cast<IrOpcode::Value>(0);
 const IrOpcode::Value kOpcode1 = static_cast<IrOpcode::Value>(1);
 const IrOpcode::Value kOpcode2 = static_cast<IrOpcode::Value>(2);
@@ -29,8 +28,6 @@
 const Operator kOp1(kOpcode1, Operator::kNoProperties, "Op1", 1, 0, 0, 1, 0, 0);
 const Operator kOp2(kOpcode2, Operator::kNoProperties, "Op2", 2, 0, 0, 1, 0, 0);
 
-}  // namespace
-
 
 TEST_F(NodeTest, New) {
   Node* const node = Node::New(zone(), 1, &kOp0, 0, nullptr, false);
@@ -261,7 +258,7 @@
   }
 }
 
-
+}  // namespace node_unittest
 }  // namespace compiler
 }  // namespace internal
 }  // namespace v8
diff --git a/src/v8/test/unittests/compiler/regalloc/move-optimizer-unittest.cc b/src/v8/test/unittests/compiler/regalloc/move-optimizer-unittest.cc
index 0ad1142..8b3e93f 100644
--- a/src/v8/test/unittests/compiler/regalloc/move-optimizer-unittest.cc
+++ b/src/v8/test/unittests/compiler/regalloc/move-optimizer-unittest.cc
@@ -94,8 +94,7 @@
       default:
         break;
     }
-    CHECK(false);
-    return InstructionOperand();
+    UNREACHABLE();
   }
 };
 
diff --git a/src/v8/test/unittests/compiler/schedule-unittest.cc b/src/v8/test/unittests/compiler/schedule-unittest.cc
index bc82535..ab2f384 100644
--- a/src/v8/test/unittests/compiler/schedule-unittest.cc
+++ b/src/v8/test/unittests/compiler/schedule-unittest.cc
@@ -12,6 +12,7 @@
 namespace v8 {
 namespace internal {
 namespace compiler {
+namespace schedule_unittest {
 
 typedef TestWithIsolateAndZone BasicBlockTest;
 
@@ -71,8 +72,6 @@
 typedef TestWithZone ScheduleTest;
 
 
-namespace {
-
 const Operator kCallOperator(IrOpcode::kCall, Operator::kNoProperties,
                              "MockCall", 0, 0, 0, 0, 0, 0);
 const Operator kBranchOperator(IrOpcode::kBranch, Operator::kNoProperties,
@@ -80,8 +79,6 @@
 const Operator kDummyOperator(IrOpcode::kParameter, Operator::kNoProperties,
                               "Dummy", 0, 0, 0, 0, 0, 0);
 
-}  // namespace
-
 
 TEST_F(ScheduleTest, Constructor) {
   Schedule schedule(zone());
@@ -244,6 +241,7 @@
   EXPECT_THAT(end->predecessors(), ElementsAre(mblock));
 }
 
+}  // namespace schedule_unittest
 }  // namespace compiler
 }  // namespace internal
 }  // namespace v8
diff --git a/src/v8/test/unittests/compiler/simplified-lowering-unittest.cc b/src/v8/test/unittests/compiler/simplified-lowering-unittest.cc
new file mode 100644
index 0000000..5f5afe5
--- /dev/null
+++ b/src/v8/test/unittests/compiler/simplified-lowering-unittest.cc
@@ -0,0 +1,89 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "src/compiler/simplified-lowering.h"
+
+#include "src/compiler/compiler-source-position-table.h"
+#include "src/compiler/machine-operator.h"
+#include "src/compiler/simplified-operator.h"
+
+#include "test/unittests/compiler/graph-unittest.h"
+#include "test/unittests/compiler/node-test-utils.h"
+
+namespace v8 {
+namespace internal {
+namespace compiler {
+
+class SimplifiedLoweringTest : public GraphTest {
+ public:
+  explicit SimplifiedLoweringTest(int num_parameters = 1)
+      : GraphTest(num_parameters),
+        num_parameters_(num_parameters),
+        machine_(zone()),
+        javascript_(zone()),
+        simplified_(zone()),
+        jsgraph_(isolate(), graph(), common(), &javascript_, &simplified_,
+                 &machine_) {}
+  ~SimplifiedLoweringTest() override {}
+
+  void LowerGraph(Node* node) {
+    // Make sure we always start with an empty graph.
+    graph()->SetStart(graph()->NewNode(common()->Start(num_parameters())));
+    graph()->SetEnd(graph()->NewNode(common()->End(1), graph()->start()));
+
+    // Return {node} directly, so that we can match it with
+    // "IsReturn(expected)".
+    Node* zero = graph()->NewNode(common()->NumberConstant(0));
+    Node* ret = graph()->NewNode(common()->Return(), zero, node,
+                                 graph()->start(), graph()->start());
+    NodeProperties::MergeControlToEnd(graph(), common(), ret);
+
+    {
+      // Simplified lowering needs to run w/o the typer decorator so make sure
+      // the object is not live at the same time.
+      Typer typer(isolate(), Typer::kNoFlags, graph());
+      typer.Run();
+    }
+
+    SimplifiedLowering lowering(jsgraph(), zone(), source_positions());
+    lowering.LowerAllNodes();
+  }
+
+  int num_parameters() const { return num_parameters_; }
+  JSGraph* jsgraph() { return &jsgraph_; }
+
+ private:
+  const int num_parameters_;
+  MachineOperatorBuilder machine_;
+  JSOperatorBuilder javascript_;
+  SimplifiedOperatorBuilder simplified_;
+  JSGraph jsgraph_;
+};
+
+const int kSmiValues[] = {Smi::kMinValue,
+                          Smi::kMinValue + 1,
+                          Smi::kMinValue + 2,
+                          3,
+                          2,
+                          1,
+                          0,
+                          -1,
+                          -2,
+                          -3,
+                          Smi::kMaxValue - 2,
+                          Smi::kMaxValue - 1,
+                          Smi::kMaxValue};
+
+TEST_F(SimplifiedLoweringTest, SmiConstantToIntPtrConstant) {
+  TRACED_FOREACH(int, x, kSmiValues) {
+    LowerGraph(jsgraph()->Constant(x));
+    intptr_t smi = bit_cast<intptr_t>(Smi::FromInt(x));
+    EXPECT_THAT(graph()->end()->InputAt(1),
+                IsReturn(IsIntPtrConstant(smi), start(), start()));
+  }
+}
+
+}  // namespace compiler
+}  // namespace internal
+}  // namespace v8
diff --git a/src/v8/test/unittests/compiler/simplified-operator-reducer-unittest.cc b/src/v8/test/unittests/compiler/simplified-operator-reducer-unittest.cc
index 2e67c0d..5dd7d84 100644
--- a/src/v8/test/unittests/compiler/simplified-operator-reducer-unittest.cc
+++ b/src/v8/test/unittests/compiler/simplified-operator-reducer-unittest.cc
@@ -92,11 +92,10 @@
     1062628108, 1087581664, 1488498068, 1534668023, 1661587028, 1696896187,
     1866841746, 2032089723, 2147483647};
 
-
 const double kNaNs[] = {-std::numeric_limits<double>::quiet_NaN(),
                         std::numeric_limits<double>::quiet_NaN(),
-                        bit_cast<double>(V8_UINT64_C(0x7FFFFFFFFFFFFFFF)),
-                        bit_cast<double>(V8_UINT64_C(0xFFFFFFFFFFFFFFFF))};
+                        bit_cast<double>(uint64_t{0x7FFFFFFFFFFFFFFF}),
+                        bit_cast<double>(uint64_t{0xFFFFFFFFFFFFFFFF})};
 
 const CheckForMinusZeroMode kCheckForMinusZeroModes[] = {
     CheckForMinusZeroMode::kDontCheckForMinusZero,
@@ -357,10 +356,10 @@
   Node* effect = graph()->start();
   Node* control = graph()->start();
   TRACED_FOREACH(int32_t, n, kInt32Values) {
-    Reduction r = Reduce(
-        graph()->NewNode(simplified()->CheckedFloat64ToInt32(
-                             CheckForMinusZeroMode::kDontCheckForMinusZero),
-                         Float64Constant(n), effect, control));
+    Reduction r = Reduce(graph()->NewNode(
+        simplified()->CheckedFloat64ToInt32(
+            CheckForMinusZeroMode::kDontCheckForMinusZero, VectorSlotPair()),
+        Float64Constant(n), effect, control));
     ASSERT_TRUE(r.Changed());
     EXPECT_THAT(r.replacement(), IsInt32Constant(n));
   }
@@ -416,8 +415,8 @@
   Node* control = graph()->start();
   Node* value =
       graph()->NewNode(simplified()->ChangeInt31ToTaggedSigned(), param0);
-  Reduction reduction = Reduce(
-      graph()->NewNode(simplified()->CheckSmi(), value, effect, control));
+  Reduction reduction = Reduce(graph()->NewNode(
+      simplified()->CheckSmi(VectorSlotPair()), value, effect, control));
   ASSERT_TRUE(reduction.Changed());
   EXPECT_EQ(value, reduction.replacement());
 }
@@ -426,8 +425,8 @@
   Node* effect = graph()->start();
   Node* control = graph()->start();
   Node* value = NumberConstant(1.0);
-  Reduction reduction = Reduce(
-      graph()->NewNode(simplified()->CheckSmi(), value, effect, control));
+  Reduction reduction = Reduce(graph()->NewNode(
+      simplified()->CheckSmi(VectorSlotPair()), value, effect, control));
   ASSERT_TRUE(reduction.Changed());
   EXPECT_EQ(value, reduction.replacement());
 }
@@ -436,10 +435,10 @@
   Node* param0 = Parameter(0);
   Node* effect = graph()->start();
   Node* control = graph()->start();
-  Node* value = effect =
-      graph()->NewNode(simplified()->CheckSmi(), param0, effect, control);
-  Reduction reduction = Reduce(
-      graph()->NewNode(simplified()->CheckSmi(), value, effect, control));
+  Node* value = effect = graph()->NewNode(
+      simplified()->CheckSmi(VectorSlotPair()), param0, effect, control);
+  Reduction reduction = Reduce(graph()->NewNode(
+      simplified()->CheckSmi(VectorSlotPair()), value, effect, control));
   ASSERT_TRUE(reduction.Changed());
   EXPECT_EQ(value, reduction.replacement());
 }
diff --git a/src/v8/test/unittests/compiler/simplified-operator-unittest.cc b/src/v8/test/unittests/compiler/simplified-operator-unittest.cc
index d77c762..239f19f 100644
--- a/src/v8/test/unittests/compiler/simplified-operator-unittest.cc
+++ b/src/v8/test/unittests/compiler/simplified-operator-unittest.cc
@@ -12,13 +12,12 @@
 namespace v8 {
 namespace internal {
 namespace compiler {
+namespace simplified_operator_unittest {
 
 // -----------------------------------------------------------------------------
+
 // Pure operators.
 
-
-namespace {
-
 struct PureOperator {
   const Operator* (SimplifiedOperatorBuilder::*constructor)();
   IrOpcode::Value opcode;
@@ -67,12 +66,10 @@
     PURE(TruncateTaggedToBit, Operator::kNoProperties, 1),
     PURE(ObjectIsNumber, Operator::kNoProperties, 1),
     PURE(ObjectIsReceiver, Operator::kNoProperties, 1),
-    PURE(ObjectIsSmi, Operator::kNoProperties, 1)
+    PURE(ObjectIsSmi, Operator::kNoProperties, 1),
 #undef PURE
 };
 
-}  // namespace
-
 
 class SimplifiedPureOperatorTest
     : public TestWithZone,
@@ -123,11 +120,9 @@
 
 
 // -----------------------------------------------------------------------------
+
 // Element access operators.
 
-
-namespace {
-
 const ElementAccess kElementAccesses[] = {
     {kTaggedBase, FixedArray::kHeaderSize, Type::Any(),
      MachineType::AnyTagged(), kFullWriteBarrier},
@@ -171,8 +166,6 @@
      MachineType(MachineRepresentation::kFloat32, MachineSemantic::kNone),
      kNoWriteBarrier}};
 
-}  // namespace
-
 
 class SimplifiedElementAccessOperatorTest
     : public TestWithZone,
@@ -225,6 +218,7 @@
                         SimplifiedElementAccessOperatorTest,
                         ::testing::ValuesIn(kElementAccesses));
 
+}  // namespace simplified_operator_unittest
 }  // namespace compiler
 }  // namespace internal
 }  // namespace v8
diff --git a/src/v8/test/unittests/compiler/state-values-utils-unittest.cc b/src/v8/test/unittests/compiler/state-values-utils-unittest.cc
index 388dd56..d53e7d9 100644
--- a/src/v8/test/unittests/compiler/state-values-utils-unittest.cc
+++ b/src/v8/test/unittests/compiler/state-values-utils-unittest.cc
@@ -45,10 +45,12 @@
 TEST_F(StateValuesIteratorTest, EmptyIteration) {
   NodeVector inputs(zone());
   Node* state_values = StateValuesFromVector(&inputs);
+  bool empty = true;
   for (auto node : StateValuesAccess(state_values)) {
     USE(node);
-    FAIL();
+    empty = false;
   }
+  EXPECT_TRUE(empty);
 }
 
 
diff --git a/src/v8/test/unittests/compiler/typed-optimization-unittest.cc b/src/v8/test/unittests/compiler/typed-optimization-unittest.cc
index b527a36..4106b2b 100644
--- a/src/v8/test/unittests/compiler/typed-optimization-unittest.cc
+++ b/src/v8/test/unittests/compiler/typed-optimization-unittest.cc
@@ -62,14 +62,14 @@
 class TypedOptimizationTest : public TypedGraphTest {
  public:
   TypedOptimizationTest()
-      : TypedGraphTest(3), javascript_(zone()), deps_(isolate(), zone()) {}
+      : TypedGraphTest(3), simplified_(zone()), deps_(isolate(), zone()) {}
   ~TypedOptimizationTest() override {}
 
  protected:
   Reduction Reduce(Node* node) {
     MachineOperatorBuilder machine(zone());
-    SimplifiedOperatorBuilder simplified(zone());
-    JSGraph jsgraph(isolate(), graph(), common(), javascript(), &simplified,
+    JSOperatorBuilder javascript(zone());
+    JSGraph jsgraph(isolate(), graph(), common(), &javascript, simplified(),
                     &machine);
     // TODO(titzer): mock the GraphReducer here for better unit testing.
     GraphReducer graph_reducer(zone(), graph());
@@ -77,10 +77,10 @@
     return reducer.Reduce(node);
   }
 
-  JSOperatorBuilder* javascript() { return &javascript_; }
+  SimplifiedOperatorBuilder* simplified() { return &simplified_; }
 
  private:
-  JSOperatorBuilder javascript_;
+  SimplifiedOperatorBuilder simplified_;
   CompilationDependencies deps_;
 };
 
@@ -169,7 +169,10 @@
   }
 }
 
-TEST_F(TypedOptimizationTest, JSToBooleanWithFalsish) {
+// -----------------------------------------------------------------------------
+// ToBoolean
+
+TEST_F(TypedOptimizationTest, ToBooleanWithFalsish) {
   Node* input = Parameter(
       Type::Union(
           Type::MinusZero(),
@@ -190,36 +193,82 @@
               zone()),
           zone()),
       0);
-  Node* context = Parameter(Type::Any(), 1);
-  Reduction r = Reduce(graph()->NewNode(
-      javascript()->ToBoolean(ToBooleanHint::kAny), input, context));
+  Reduction r = Reduce(graph()->NewNode(simplified()->ToBoolean(), input));
   ASSERT_TRUE(r.Changed());
   EXPECT_THAT(r.replacement(), IsFalseConstant());
 }
 
-TEST_F(TypedOptimizationTest, JSToBooleanWithTruish) {
+TEST_F(TypedOptimizationTest, ToBooleanWithTruish) {
   Node* input = Parameter(
       Type::Union(
           Type::NewConstant(factory()->true_value(), zone()),
           Type::Union(Type::DetectableReceiver(), Type::Symbol(), zone()),
           zone()),
       0);
-  Node* context = Parameter(Type::Any(), 1);
-  Reduction r = Reduce(graph()->NewNode(
-      javascript()->ToBoolean(ToBooleanHint::kAny), input, context));
+  Reduction r = Reduce(graph()->NewNode(simplified()->ToBoolean(), input));
   ASSERT_TRUE(r.Changed());
   EXPECT_THAT(r.replacement(), IsTrueConstant());
 }
 
-TEST_F(TypedOptimizationTest, JSToBooleanWithNonZeroPlainNumber) {
+TEST_F(TypedOptimizationTest, ToBooleanWithNonZeroPlainNumber) {
   Node* input = Parameter(Type::Range(1, V8_INFINITY, zone()), 0);
-  Node* context = Parameter(Type::Any(), 1);
-  Reduction r = Reduce(graph()->NewNode(
-      javascript()->ToBoolean(ToBooleanHint::kAny), input, context));
+  Reduction r = Reduce(graph()->NewNode(simplified()->ToBoolean(), input));
   ASSERT_TRUE(r.Changed());
   EXPECT_THAT(r.replacement(), IsTrueConstant());
 }
 
+TEST_F(TypedOptimizationTest, ToBooleanWithBoolean) {
+  Node* input = Parameter(Type::Boolean(), 0);
+  Reduction r = Reduce(graph()->NewNode(simplified()->ToBoolean(), input));
+  ASSERT_TRUE(r.Changed());
+  EXPECT_EQ(input, r.replacement());
+}
+
+TEST_F(TypedOptimizationTest, ToBooleanWithOrderedNumber) {
+  Node* input = Parameter(Type::OrderedNumber(), 0);
+  Reduction r = Reduce(graph()->NewNode(simplified()->ToBoolean(), input));
+  ASSERT_TRUE(r.Changed());
+  EXPECT_THAT(r.replacement(),
+              IsBooleanNot(IsNumberEqual(input, IsNumberConstant(0.0))));
+}
+
+TEST_F(TypedOptimizationTest, ToBooleanWithNumber) {
+  Node* input = Parameter(Type::Number(), 0);
+  Reduction r = Reduce(graph()->NewNode(simplified()->ToBoolean(), input));
+  ASSERT_TRUE(r.Changed());
+  EXPECT_THAT(r.replacement(), IsNumberToBoolean(input));
+}
+
+TEST_F(TypedOptimizationTest, ToBooleanWithDetectableReceiverOrNull) {
+  Node* input = Parameter(Type::DetectableReceiverOrNull(), 0);
+  Reduction r = Reduce(graph()->NewNode(simplified()->ToBoolean(), input));
+  ASSERT_TRUE(r.Changed());
+  EXPECT_THAT(r.replacement(),
+              IsBooleanNot(IsReferenceEqual(input, IsNullConstant())));
+}
+
+TEST_F(TypedOptimizationTest, ToBooleanWithReceiverOrNullOrUndefined) {
+  Node* input = Parameter(Type::ReceiverOrNullOrUndefined(), 0);
+  Reduction r = Reduce(graph()->NewNode(simplified()->ToBoolean(), input));
+  ASSERT_TRUE(r.Changed());
+  EXPECT_THAT(r.replacement(), IsBooleanNot(IsObjectIsUndetectable(input)));
+}
+
+TEST_F(TypedOptimizationTest, ToBooleanWithString) {
+  Node* input = Parameter(Type::String(), 0);
+  Reduction r = Reduce(graph()->NewNode(simplified()->ToBoolean(), input));
+  ASSERT_TRUE(r.Changed());
+  EXPECT_THAT(r.replacement(),
+              IsBooleanNot(IsReferenceEqual(
+                  input, IsHeapConstant(factory()->empty_string()))));
+}
+
+TEST_F(TypedOptimizationTest, ToBooleanWithAny) {
+  Node* input = Parameter(Type::Any(), 0);
+  Reduction r = Reduce(graph()->NewNode(simplified()->ToBoolean(), input));
+  ASSERT_FALSE(r.Changed());
+}
+
 }  // namespace typed_optimization_unittest
 }  // namespace compiler
 }  // namespace internal
diff --git a/src/v8/test/unittests/compiler/typer-unittest.cc b/src/v8/test/unittests/compiler/typer-unittest.cc
index 7c445e6..44464b9 100644
--- a/src/v8/test/unittests/compiler/typer-unittest.cc
+++ b/src/v8/test/unittests/compiler/typer-unittest.cc
@@ -297,11 +297,12 @@
 
 namespace {
 
-int32_t shift_left(int32_t x, int32_t y) { return x << (y & 0x1f); }
-int32_t shift_right(int32_t x, int32_t y) { return x >> (y & 0x1f); }
+int32_t shift_left(int32_t x, int32_t y) { return x << (y & 0x1F); }
+int32_t shift_right(int32_t x, int32_t y) { return x >> (y & 0x1F); }
 int32_t bit_or(int32_t x, int32_t y) { return x | y; }
 int32_t bit_and(int32_t x, int32_t y) { return x & y; }
 int32_t bit_xor(int32_t x, int32_t y) { return x ^ y; }
+double modulo_double_double(double x, double y) { return Modulo(x, y); }
 
 }  // namespace
 
@@ -329,7 +330,7 @@
 }
 
 TEST_F(TyperTest, TypeJSModulus) {
-  TestBinaryArithOp(javascript_.Modulus(), modulo);
+  TestBinaryArithOp(javascript_.Modulus(), modulo_double_double);
 }
 
 TEST_F(TyperTest, TypeJSBitwiseOr) {
@@ -430,16 +431,6 @@
 TEST_MONOTONICITY(ToNumber)
 TEST_MONOTONICITY(ToObject)
 TEST_MONOTONICITY(ToString)
-TEST_MONOTONICITY(ClassOf)
-TEST_MONOTONICITY(TypeOf)
-#undef TEST_MONOTONICITY
-
-// JS UNOPs with ToBooleanHint
-#define TEST_MONOTONICITY(name)                               \
-  TEST_F(TyperTest, Monotonicity_##name) {                    \
-    TestUnaryMonotonicity(javascript_.name(ToBooleanHint())); \
-  }
-TEST_MONOTONICITY(ToBoolean)
 #undef TEST_MONOTONICITY
 
 // JS BINOPs with CompareOperationHint
@@ -463,6 +454,10 @@
 TEST_MONOTONICITY(Add)
 #undef TEST_MONOTONICITY
 
+TEST_F(TyperTest, Monotonicity_InstanceOf) {
+  TestBinaryMonotonicity(javascript_.InstanceOf(VectorSlotPair()));
+}
+
 // JS BINOPS without hint
 #define TEST_MONOTONICITY(name)                 \
   TEST_F(TyperTest, Monotonicity_##name) {      \
@@ -478,7 +473,6 @@
 TEST_MONOTONICITY(Multiply)
 TEST_MONOTONICITY(Divide)
 TEST_MONOTONICITY(Modulus)
-TEST_MONOTONICITY(InstanceOf)
 TEST_MONOTONICITY(OrdinaryHasInstance)
 #undef TEST_MONOTONICITY
 
@@ -496,6 +490,9 @@
 TEST_MONOTONICITY(ObjectIsString)
 TEST_MONOTONICITY(ObjectIsSymbol)
 TEST_MONOTONICITY(ObjectIsUndetectable)
+TEST_MONOTONICITY(TypeOf)
+TEST_MONOTONICITY(ClassOf)
+TEST_MONOTONICITY(ToBoolean)
 #undef TEST_MONOTONICITY
 
 // SIMPLIFIED BINOPs without hint, with Number input restriction
diff --git a/src/v8/test/unittests/compiler/value-numbering-reducer-unittest.cc b/src/v8/test/unittests/compiler/value-numbering-reducer-unittest.cc
index c04d660..13f54ce 100644
--- a/src/v8/test/unittests/compiler/value-numbering-reducer-unittest.cc
+++ b/src/v8/test/unittests/compiler/value-numbering-reducer-unittest.cc
@@ -13,6 +13,7 @@
 namespace v8 {
 namespace internal {
 namespace compiler {
+namespace value_numbering_reducer_unittest {
 
 struct TestOperator : public Operator {
   TestOperator(Operator::Opcode opcode, Operator::Properties properties,
@@ -126,6 +127,7 @@
   EXPECT_FALSE(Reduce(n).Changed());
 }
 
+}  // namespace value_numbering_reducer_unittest
 }  // namespace compiler
 }  // namespace internal
 }  // namespace v8
diff --git a/src/v8/test/unittests/compiler/x64/instruction-selector-x64-unittest.cc b/src/v8/test/unittests/compiler/x64/instruction-selector-x64-unittest.cc
index d149739..031217b 100644
--- a/src/v8/test/unittests/compiler/x64/instruction-selector-x64-unittest.cc
+++ b/src/v8/test/unittests/compiler/x64/instruction-selector-x64-unittest.cc
@@ -1519,12 +1519,11 @@
   }
 }
 
-
-TEST_F(InstructionSelectorTest, Word32AndWith0xff) {
+TEST_F(InstructionSelectorTest, Word32AndWith0xFF) {
   {
     StreamBuilder m(this, MachineType::Int32(), MachineType::Int32());
     Node* const p0 = m.Parameter(0);
-    Node* const n = m.Word32And(p0, m.Int32Constant(0xff));
+    Node* const n = m.Word32And(p0, m.Int32Constant(0xFF));
     m.Return(n);
     Stream s = m.Build();
     ASSERT_EQ(1U, s.size());
@@ -1537,7 +1536,7 @@
   {
     StreamBuilder m(this, MachineType::Int32(), MachineType::Int32());
     Node* const p0 = m.Parameter(0);
-    Node* const n = m.Word32And(m.Int32Constant(0xff), p0);
+    Node* const n = m.Word32And(m.Int32Constant(0xFF), p0);
     m.Return(n);
     Stream s = m.Build();
     ASSERT_EQ(1U, s.size());
@@ -1549,12 +1548,11 @@
   }
 }
 
-
-TEST_F(InstructionSelectorTest, Word32AndWith0xffff) {
+TEST_F(InstructionSelectorTest, Word32AndWith0xFFFF) {
   {
     StreamBuilder m(this, MachineType::Int32(), MachineType::Int32());
     Node* const p0 = m.Parameter(0);
-    Node* const n = m.Word32And(p0, m.Int32Constant(0xffff));
+    Node* const n = m.Word32And(p0, m.Int32Constant(0xFFFF));
     m.Return(n);
     Stream s = m.Build();
     ASSERT_EQ(1U, s.size());
@@ -1567,7 +1565,7 @@
   {
     StreamBuilder m(this, MachineType::Int32(), MachineType::Int32());
     Node* const p0 = m.Parameter(0);
-    Node* const n = m.Word32And(m.Int32Constant(0xffff), p0);
+    Node* const n = m.Word32And(m.Int32Constant(0xFFFF), p0);
     m.Return(n);
     Stream s = m.Build();
     ASSERT_EQ(1U, s.size());
@@ -1643,6 +1641,15 @@
   }
 }
 
+TEST_F(InstructionSelectorTest, SpeculationFence) {
+  StreamBuilder m(this, MachineType::Int32());
+  m.SpeculationFence();
+  m.Return(m.Int32Constant(0));
+  Stream s = m.Build();
+  ASSERT_EQ(1U, s.size());
+  EXPECT_EQ(kLFence, s[0]->arch_opcode());
+}
+
 }  // namespace compiler
 }  // namespace internal
 }  // namespace v8
diff --git a/src/v8/test/unittests/counters-unittest.cc b/src/v8/test/unittests/counters-unittest.cc
index 1f7ac05..887ba54 100644
--- a/src/v8/test/unittests/counters-unittest.cc
+++ b/src/v8/test/unittests/counters-unittest.cc
@@ -4,11 +4,15 @@
 
 #include <vector>
 
+#include "src/base/atomic-utils.h"
+#include "src/base/platform/time.h"
 #include "src/counters-inl.h"
 #include "src/counters.h"
 #include "src/handles-inl.h"
 #include "src/objects-inl.h"
 #include "src/tracing/tracing-category-observer.h"
+
+#include "test/unittests/test-utils.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
 namespace v8 {
@@ -42,40 +46,105 @@
   MockHistogram mock_;
 };
 
-class RuntimeCallStatsTest : public ::testing::Test {
+static base::TimeTicks runtime_call_stats_test_time_ = base::TimeTicks();
+// Time source used for the RuntimeCallTimer during tests. We cannot rely on
+// the native timer since it's too unpredictable on the build bots.
+static base::TimeTicks RuntimeCallStatsTestNow() {
+  return runtime_call_stats_test_time_;
+}
+
+class RuntimeCallStatsTest : public TestWithNativeContext {
  public:
   RuntimeCallStatsTest() {
-    FLAG_runtime_stats =
-        v8::tracing::TracingCategoryObserver::ENABLED_BY_NATIVE;
-  }
-  virtual ~RuntimeCallStatsTest() {}
-
-  RuntimeCallStats* stats() { return &stats_; }
-  RuntimeCallStats::CounterId counter_id() {
-    return &RuntimeCallStats::TestCounter1;
-  }
-  RuntimeCallStats::CounterId counter_id2() {
-    return &RuntimeCallStats::TestCounter2;
-  }
-  RuntimeCallStats::CounterId counter_id3() {
-    return &RuntimeCallStats::TestCounter3;
-  }
-  RuntimeCallCounter* counter() { return &(stats()->*counter_id()); }
-  RuntimeCallCounter* counter2() { return &(stats()->*counter_id2()); }
-  RuntimeCallCounter* counter3() { return &(stats()->*counter_id3()); }
-  void Sleep(int32_t milliseconds) {
-    base::ElapsedTimer timer;
-    base::TimeDelta delta = base::TimeDelta::FromMilliseconds(milliseconds);
-    timer.Start();
-    while (!timer.HasExpired(delta)) {
-      base::OS::Sleep(base::TimeDelta::FromMicroseconds(0));
-    }
+    base::AsAtomic32::Relaxed_Store(
+        &FLAG_runtime_stats,
+        v8::tracing::TracingCategoryObserver::ENABLED_BY_NATIVE);
+    // We need to set {time_} to a non-zero value since it would otherwise
+    // cause runtime call timers to think they are uninitialized.
+    Sleep(1);
+    stats()->Reset();
   }
 
-  const uint32_t kEpsilonMs = 20;
+  ~RuntimeCallStatsTest() {
+    // Disable RuntimeCallStats before tearing down the isolate to prevent
+    // printing the tests table. Comment the following line for debugging
+    // purposes.
+    base::AsAtomic32::Relaxed_Store(&FLAG_runtime_stats, 0);
+  }
+
+  static void SetUpTestCase() {
+    TestWithIsolate::SetUpTestCase();
+    // Use a custom time source to precisly emulate system time.
+    RuntimeCallTimer::Now = &RuntimeCallStatsTestNow;
+  }
+
+  static void TearDownTestCase() {
+    TestWithIsolate::TearDownTestCase();
+    // Restore the original time source.
+    RuntimeCallTimer::Now = &base::TimeTicks::HighResolutionNow;
+  }
+
+  RuntimeCallStats* stats() {
+    return isolate()->counters()->runtime_call_stats();
+  }
+
+  // Print current RuntimeCallStats table. For debugging purposes.
+  void PrintStats() { stats()->Print(); }
+
+  RuntimeCallCounterId counter_id() {
+    return RuntimeCallCounterId::kTestCounter1;
+  }
+
+  RuntimeCallCounterId counter_id2() {
+    return RuntimeCallCounterId::kTestCounter2;
+  }
+
+  RuntimeCallCounterId counter_id3() {
+    return RuntimeCallCounterId::kTestCounter3;
+  }
+
+  RuntimeCallCounter* js_counter() {
+    return stats()->GetCounter(RuntimeCallCounterId::kJS_Execution);
+  }
+  RuntimeCallCounter* counter() { return stats()->GetCounter(counter_id()); }
+  RuntimeCallCounter* counter2() { return stats()->GetCounter(counter_id2()); }
+  RuntimeCallCounter* counter3() { return stats()->GetCounter(counter_id3()); }
+
+  void Sleep(int64_t microseconds) {
+    base::TimeDelta delta = base::TimeDelta::FromMicroseconds(microseconds);
+    time_ += delta;
+    runtime_call_stats_test_time_ =
+        base::TimeTicks::FromInternalValue(time_.InMicroseconds());
+  }
 
  private:
-  RuntimeCallStats stats_;
+  base::TimeDelta time_;
+};
+
+// Temporarily use the native time to modify the test time.
+class ElapsedTimeScope {
+ public:
+  explicit ElapsedTimeScope(RuntimeCallStatsTest* test) : test_(test) {
+    timer_.Start();
+  }
+  ~ElapsedTimeScope() { test_->Sleep(timer_.Elapsed().InMicroseconds()); }
+
+ private:
+  base::ElapsedTimer timer_;
+  RuntimeCallStatsTest* test_;
+};
+
+// Temporarily use the default time source.
+class NativeTimeScope {
+ public:
+  NativeTimeScope() {
+    CHECK_EQ(RuntimeCallTimer::Now, &RuntimeCallStatsTestNow);
+    RuntimeCallTimer::Now = &base::TimeTicks::HighResolutionNow;
+  }
+  ~NativeTimeScope() {
+    CHECK_EQ(RuntimeCallTimer::Now, &base::TimeTicks::HighResolutionNow);
+    RuntimeCallTimer::Now = &RuntimeCallStatsTestNow;
+  }
 };
 
 }  // namespace
@@ -231,15 +300,11 @@
   }
 }
 
-#define EXPECT_IN_RANGE(start, value, end) \
-  EXPECT_LE(start, value);                 \
-  EXPECT_GE(end, value)
-
 TEST_F(RuntimeCallStatsTest, RuntimeCallTimer) {
   RuntimeCallTimer timer;
 
   Sleep(50);
-  RuntimeCallStats::Enter(stats(), &timer, counter_id());
+  stats()->Enter(&timer, counter_id());
   EXPECT_EQ(counter(), timer.counter());
   EXPECT_EQ(nullptr, timer.parent());
   EXPECT_TRUE(timer.IsStarted());
@@ -247,18 +312,18 @@
 
   Sleep(100);
 
-  RuntimeCallStats::Leave(stats(), &timer);
+  stats()->Leave(&timer);
   Sleep(50);
   EXPECT_FALSE(timer.IsStarted());
   EXPECT_EQ(1, counter()->count());
-  EXPECT_IN_RANGE(100, counter()->time().InMilliseconds(), 100 + kEpsilonMs);
+  EXPECT_EQ(100, counter()->time().InMicroseconds());
 }
 
 TEST_F(RuntimeCallStatsTest, RuntimeCallTimerSubTimer) {
   RuntimeCallTimer timer;
   RuntimeCallTimer timer2;
 
-  RuntimeCallStats::Enter(stats(), &timer, counter_id());
+  stats()->Enter(&timer, counter_id());
   EXPECT_TRUE(timer.IsStarted());
   EXPECT_FALSE(timer2.IsStarted());
   EXPECT_EQ(counter(), timer.counter());
@@ -267,7 +332,7 @@
 
   Sleep(50);
 
-  RuntimeCallStats::Enter(stats(), &timer2, counter_id2());
+  stats()->Enter(&timer2, counter_id2());
   // timer 1 is paused, while timer 2 is active.
   EXPECT_TRUE(timer2.IsStarted());
   EXPECT_EQ(counter(), timer.counter());
@@ -277,25 +342,25 @@
   EXPECT_EQ(&timer2, stats()->current_timer());
 
   Sleep(100);
-  RuntimeCallStats::Leave(stats(), &timer2);
+  stats()->Leave(&timer2);
 
   // The subtimer subtracts its time from the parent timer.
   EXPECT_TRUE(timer.IsStarted());
   EXPECT_FALSE(timer2.IsStarted());
   EXPECT_EQ(0, counter()->count());
   EXPECT_EQ(1, counter2()->count());
-  EXPECT_EQ(0, counter()->time().InMilliseconds());
-  EXPECT_IN_RANGE(100, counter2()->time().InMilliseconds(), 100 + kEpsilonMs);
+  EXPECT_EQ(0, counter()->time().InMicroseconds());
+  EXPECT_EQ(100, counter2()->time().InMicroseconds());
   EXPECT_EQ(&timer, stats()->current_timer());
 
   Sleep(100);
 
-  RuntimeCallStats::Leave(stats(), &timer);
+  stats()->Leave(&timer);
   EXPECT_FALSE(timer.IsStarted());
   EXPECT_EQ(1, counter()->count());
   EXPECT_EQ(1, counter2()->count());
-  EXPECT_IN_RANGE(150, counter()->time().InMilliseconds(), 150 + kEpsilonMs);
-  EXPECT_IN_RANGE(100, counter2()->time().InMilliseconds(), 100 + kEpsilonMs);
+  EXPECT_EQ(150, counter()->time().InMicroseconds());
+  EXPECT_EQ(100, counter2()->time().InMicroseconds());
   EXPECT_EQ(nullptr, stats()->current_timer());
 }
 
@@ -303,13 +368,13 @@
   RuntimeCallTimer timer;
   RuntimeCallTimer timer2;
 
-  RuntimeCallStats::Enter(stats(), &timer, counter_id());
+  stats()->Enter(&timer, counter_id());
   EXPECT_EQ(counter(), timer.counter());
   EXPECT_EQ(nullptr, timer.parent());
   EXPECT_TRUE(timer.IsStarted());
   EXPECT_EQ(&timer, stats()->current_timer());
 
-  RuntimeCallStats::Enter(stats(), &timer2, counter_id());
+  stats()->Enter(&timer2, counter_id());
   EXPECT_EQ(counter(), timer2.counter());
   EXPECT_EQ(nullptr, timer.parent());
   EXPECT_EQ(&timer, timer2.parent());
@@ -318,20 +383,19 @@
 
   Sleep(50);
 
-  RuntimeCallStats::Leave(stats(), &timer2);
+  stats()->Leave(&timer2);
   EXPECT_EQ(nullptr, timer.parent());
   EXPECT_FALSE(timer2.IsStarted());
   EXPECT_TRUE(timer.IsStarted());
   EXPECT_EQ(1, counter()->count());
-  EXPECT_IN_RANGE(50, counter()->time().InMilliseconds(), 50 + kEpsilonMs);
+  EXPECT_EQ(50, counter()->time().InMicroseconds());
 
   Sleep(100);
 
-  RuntimeCallStats::Leave(stats(), &timer);
+  stats()->Leave(&timer);
   EXPECT_FALSE(timer.IsStarted());
   EXPECT_EQ(2, counter()->count());
-  EXPECT_IN_RANGE(150, counter()->time().InMilliseconds(),
-                  150 + 2 * kEpsilonMs);
+  EXPECT_EQ(150, counter()->time().InMicroseconds());
 }
 
 TEST_F(RuntimeCallStatsTest, RuntimeCallTimerScope) {
@@ -341,14 +405,13 @@
   }
   Sleep(100);
   EXPECT_EQ(1, counter()->count());
-  EXPECT_IN_RANGE(50, counter()->time().InMilliseconds(), 50 + kEpsilonMs);
+  EXPECT_EQ(50, counter()->time().InMicroseconds());
   {
     RuntimeCallTimerScope scope(stats(), counter_id());
     Sleep(50);
   }
   EXPECT_EQ(2, counter()->count());
-  EXPECT_IN_RANGE(100, counter()->time().InMilliseconds(),
-                  100 + 2 * kEpsilonMs);
+  EXPECT_EQ(100, counter()->time().InMicroseconds());
 }
 
 TEST_F(RuntimeCallStatsTest, RuntimeCallTimerScopeRecursive) {
@@ -356,17 +419,16 @@
     RuntimeCallTimerScope scope(stats(), counter_id());
     Sleep(50);
     EXPECT_EQ(0, counter()->count());
-    EXPECT_EQ(0, counter()->time().InMilliseconds());
+    EXPECT_EQ(0, counter()->time().InMicroseconds());
     {
       RuntimeCallTimerScope scope(stats(), counter_id());
       Sleep(50);
     }
     EXPECT_EQ(1, counter()->count());
-    EXPECT_IN_RANGE(50, counter()->time().InMilliseconds(), 50 + kEpsilonMs);
+    EXPECT_EQ(50, counter()->time().InMicroseconds());
   }
   EXPECT_EQ(2, counter()->count());
-  EXPECT_IN_RANGE(100, counter()->time().InMilliseconds(),
-                  100 + 2 * kEpsilonMs);
+  EXPECT_EQ(100, counter()->time().InMicroseconds());
 }
 
 TEST_F(RuntimeCallStatsTest, RenameTimer) {
@@ -375,22 +437,23 @@
     Sleep(50);
     EXPECT_EQ(0, counter()->count());
     EXPECT_EQ(0, counter2()->count());
-    EXPECT_EQ(0, counter()->time().InMilliseconds());
-    EXPECT_EQ(0, counter2()->time().InMilliseconds());
+    EXPECT_EQ(0, counter()->time().InMicroseconds());
+    EXPECT_EQ(0, counter2()->time().InMicroseconds());
     {
       RuntimeCallTimerScope scope(stats(), counter_id());
       Sleep(100);
     }
-    CHANGE_CURRENT_RUNTIME_COUNTER(stats(), TestCounter2);
+    CHANGE_CURRENT_RUNTIME_COUNTER(stats(),
+                                   RuntimeCallCounterId::kTestCounter2);
     EXPECT_EQ(1, counter()->count());
     EXPECT_EQ(0, counter2()->count());
-    EXPECT_IN_RANGE(100, counter()->time().InMilliseconds(), 100 + kEpsilonMs);
-    EXPECT_IN_RANGE(0, counter2()->time().InMilliseconds(), 0);
+    EXPECT_EQ(100, counter()->time().InMicroseconds());
+    EXPECT_EQ(0, counter2()->time().InMicroseconds());
   }
   EXPECT_EQ(1, counter()->count());
   EXPECT_EQ(1, counter2()->count());
-  EXPECT_IN_RANGE(100, counter()->time().InMilliseconds(), 100 + kEpsilonMs);
-  EXPECT_IN_RANGE(50, counter2()->time().InMilliseconds(), 50 + kEpsilonMs);
+  EXPECT_EQ(100, counter()->time().InMicroseconds());
+  EXPECT_EQ(50, counter2()->time().InMicroseconds());
 }
 
 TEST_F(RuntimeCallStatsTest, BasicPrintAndSnapshot) {
@@ -399,9 +462,9 @@
   EXPECT_EQ(0, counter()->count());
   EXPECT_EQ(0, counter2()->count());
   EXPECT_EQ(0, counter3()->count());
-  EXPECT_EQ(0, counter()->time().InMilliseconds());
-  EXPECT_EQ(0, counter2()->time().InMilliseconds());
-  EXPECT_EQ(0, counter3()->time().InMilliseconds());
+  EXPECT_EQ(0, counter()->time().InMicroseconds());
+  EXPECT_EQ(0, counter2()->time().InMicroseconds());
+  EXPECT_EQ(0, counter3()->time().InMicroseconds());
 
   {
     RuntimeCallTimerScope scope(stats(), counter_id());
@@ -412,9 +475,9 @@
   EXPECT_EQ(1, counter()->count());
   EXPECT_EQ(0, counter2()->count());
   EXPECT_EQ(0, counter3()->count());
-  EXPECT_IN_RANGE(50, counter()->time().InMilliseconds(), 50 + kEpsilonMs);
-  EXPECT_EQ(0, counter2()->time().InMilliseconds());
-  EXPECT_EQ(0, counter3()->time().InMilliseconds());
+  EXPECT_EQ(50, counter()->time().InMicroseconds());
+  EXPECT_EQ(0, counter2()->time().InMicroseconds());
+  EXPECT_EQ(0, counter3()->time().InMicroseconds());
 }
 
 TEST_F(RuntimeCallStatsTest, PrintAndSnapshot) {
@@ -422,11 +485,11 @@
     RuntimeCallTimerScope scope(stats(), counter_id());
     Sleep(100);
     EXPECT_EQ(0, counter()->count());
-    EXPECT_EQ(0, counter()->time().InMilliseconds());
+    EXPECT_EQ(0, counter()->time().InMicroseconds());
     {
       RuntimeCallTimerScope scope(stats(), counter_id2());
       EXPECT_EQ(0, counter2()->count());
-      EXPECT_EQ(0, counter2()->time().InMilliseconds());
+      EXPECT_EQ(0, counter2()->time().InMicroseconds());
       Sleep(50);
 
       // This calls Snapshot on the current active timer and sychronizes and
@@ -435,40 +498,35 @@
       stats()->Print(out);
       EXPECT_EQ(0, counter()->count());
       EXPECT_EQ(0, counter2()->count());
-      EXPECT_IN_RANGE(100, counter()->time().InMilliseconds(),
-                      100 + kEpsilonMs);
-      EXPECT_IN_RANGE(50, counter2()->time().InMilliseconds(), 50 + kEpsilonMs);
+      EXPECT_EQ(100, counter()->time().InMicroseconds());
+      EXPECT_EQ(50, counter2()->time().InMicroseconds());
       // Calling Print several times shouldn't have a (big) impact on the
       // measured times.
       stats()->Print(out);
       EXPECT_EQ(0, counter()->count());
       EXPECT_EQ(0, counter2()->count());
-      EXPECT_IN_RANGE(100, counter()->time().InMilliseconds(),
-                      100 + kEpsilonMs);
-      EXPECT_IN_RANGE(50, counter2()->time().InMilliseconds(), 50 + kEpsilonMs);
+      EXPECT_EQ(100, counter()->time().InMicroseconds());
+      EXPECT_EQ(50, counter2()->time().InMicroseconds());
 
       Sleep(50);
       stats()->Print(out);
       EXPECT_EQ(0, counter()->count());
       EXPECT_EQ(0, counter2()->count());
-      EXPECT_IN_RANGE(100, counter()->time().InMilliseconds(),
-                      100 + kEpsilonMs);
-      EXPECT_IN_RANGE(100, counter2()->time().InMilliseconds(),
-                      100 + kEpsilonMs);
+      EXPECT_EQ(100, counter()->time().InMicroseconds());
+      EXPECT_EQ(100, counter2()->time().InMicroseconds());
       Sleep(50);
     }
     Sleep(50);
     EXPECT_EQ(0, counter()->count());
     EXPECT_EQ(1, counter2()->count());
-    EXPECT_IN_RANGE(100, counter()->time().InMilliseconds(), 100 + kEpsilonMs);
-    EXPECT_IN_RANGE(150, counter2()->time().InMilliseconds(), 150 + kEpsilonMs);
+    EXPECT_EQ(100, counter()->time().InMicroseconds());
+    EXPECT_EQ(150, counter2()->time().InMicroseconds());
     Sleep(50);
   }
   EXPECT_EQ(1, counter()->count());
   EXPECT_EQ(1, counter2()->count());
-  EXPECT_IN_RANGE(200, counter()->time().InMilliseconds(), 200 + kEpsilonMs);
-  EXPECT_IN_RANGE(150, counter2()->time().InMilliseconds(),
-                  150 + 2 * kEpsilonMs);
+  EXPECT_EQ(200, counter()->time().InMicroseconds());
+  EXPECT_EQ(150, counter2()->time().InMicroseconds());
 }
 
 TEST_F(RuntimeCallStatsTest, NestedScopes) {
@@ -499,9 +557,127 @@
   EXPECT_EQ(1, counter()->count());
   EXPECT_EQ(2, counter2()->count());
   EXPECT_EQ(2, counter3()->count());
-  EXPECT_IN_RANGE(250, counter()->time().InMilliseconds(), 250 + kEpsilonMs);
-  EXPECT_IN_RANGE(300, counter2()->time().InMilliseconds(), 300 + kEpsilonMs);
-  EXPECT_IN_RANGE(100, counter3()->time().InMilliseconds(), 100 + kEpsilonMs);
+  EXPECT_EQ(250, counter()->time().InMicroseconds());
+  EXPECT_EQ(300, counter2()->time().InMicroseconds());
+  EXPECT_EQ(100, counter3()->time().InMicroseconds());
+}
+
+TEST_F(RuntimeCallStatsTest, BasicJavaScript) {
+  RuntimeCallCounter* counter =
+      stats()->GetCounter(RuntimeCallCounterId::kJS_Execution);
+  EXPECT_EQ(0, counter->count());
+  EXPECT_EQ(0, counter->time().InMicroseconds());
+
+  {
+    NativeTimeScope native_timer_scope;
+    RunJS("function f() { return 1; }");
+  }
+  EXPECT_EQ(1, counter->count());
+  int64_t time = counter->time().InMicroseconds();
+  EXPECT_LT(0, time);
+
+  {
+    NativeTimeScope native_timer_scope;
+    RunJS("f()");
+  }
+  EXPECT_EQ(2, counter->count());
+  EXPECT_LE(time, counter->time().InMicroseconds());
+}
+
+TEST_F(RuntimeCallStatsTest, FunctionLengthGetter) {
+  RuntimeCallCounter* getter_counter =
+      stats()->GetCounter(RuntimeCallCounterId::kFunctionLengthGetter);
+  RuntimeCallCounter* js_counter =
+      stats()->GetCounter(RuntimeCallCounterId::kJS_Execution);
+  EXPECT_EQ(0, getter_counter->count());
+  EXPECT_EQ(0, js_counter->count());
+  EXPECT_EQ(0, getter_counter->time().InMicroseconds());
+  EXPECT_EQ(0, js_counter->time().InMicroseconds());
+
+  {
+    NativeTimeScope native_timer_scope;
+    RunJS("function f(array) { return array.length; }");
+  }
+  EXPECT_EQ(0, getter_counter->count());
+  EXPECT_EQ(1, js_counter->count());
+  EXPECT_EQ(0, getter_counter->time().InMicroseconds());
+  int64_t js_time = js_counter->time().InMicroseconds();
+  EXPECT_LT(0, js_time);
+
+  {
+    NativeTimeScope native_timer_scope;
+    RunJS("f.length");
+  }
+  EXPECT_EQ(1, getter_counter->count());
+  EXPECT_EQ(2, js_counter->count());
+  EXPECT_LE(0, getter_counter->time().InMicroseconds());
+  EXPECT_LT(js_time, js_counter->time().InMicroseconds());
+
+  {
+    NativeTimeScope native_timer_scope;
+    RunJS("for (let i = 0; i < 50; i++) { f.length }");
+  }
+  EXPECT_EQ(51, getter_counter->count());
+  EXPECT_EQ(3, js_counter->count());
+}
+
+namespace {
+static RuntimeCallStatsTest* current_test;
+static const int kCustomCallbackTime = 1234;
+static void CustomCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
+  RuntimeCallTimerScope scope(current_test->stats(),
+                              current_test->counter_id2());
+  current_test->Sleep(kCustomCallbackTime);
+}
+}  // namespace
+
+TEST_F(RuntimeCallStatsTest, CustomCallback) {
+  current_test = this;
+  // Set up a function template with a custom callback.
+  v8::Isolate* isolate = v8_isolate();
+  v8::HandleScope scope(isolate);
+
+  v8::Local<v8::ObjectTemplate> object_template =
+      v8::ObjectTemplate::New(isolate);
+  object_template->Set(isolate, "callback",
+                       v8::FunctionTemplate::New(isolate, CustomCallback));
+  v8::Local<v8::Object> object =
+      object_template->NewInstance(v8_context()).ToLocalChecked();
+  SetGlobalProperty("custom_object", object);
+
+  // TODO(cbruni): Check api accessor timer (one above the custom callback).
+  EXPECT_EQ(0, js_counter()->count());
+  EXPECT_EQ(0, counter()->count());
+  EXPECT_EQ(0, counter2()->count());
+  {
+    RuntimeCallTimerScope scope(stats(), counter_id());
+    Sleep(100);
+    RunJS("custom_object.callback();");
+  }
+  EXPECT_EQ(1, js_counter()->count());
+  // Given that no native timers are used, only the two scopes explitly
+  // mentioned above will track the time.
+  EXPECT_EQ(0, js_counter()->time().InMicroseconds());
+  EXPECT_EQ(1, counter()->count());
+  EXPECT_EQ(100, counter()->time().InMicroseconds());
+  EXPECT_EQ(1, counter2()->count());
+  EXPECT_EQ(kCustomCallbackTime, counter2()->time().InMicroseconds());
+
+  RunJS("for (let i = 0; i < 9; i++) { custom_object.callback() };");
+  EXPECT_EQ(2, js_counter()->count());
+  EXPECT_EQ(0, js_counter()->time().InMicroseconds());
+  EXPECT_EQ(1, counter()->count());
+  EXPECT_EQ(100, counter()->time().InMicroseconds());
+  EXPECT_EQ(10, counter2()->count());
+  EXPECT_EQ(kCustomCallbackTime * 10, counter2()->time().InMicroseconds());
+
+  RunJS("for (let i = 0; i < 4000; i++) { custom_object.callback() };");
+  EXPECT_EQ(3, js_counter()->count());
+  EXPECT_EQ(0, js_counter()->time().InMicroseconds());
+  EXPECT_EQ(1, counter()->count());
+  EXPECT_EQ(100, counter()->time().InMicroseconds());
+  EXPECT_EQ(4010, counter2()->count());
+  EXPECT_EQ(kCustomCallbackTime * 4010, counter2()->time().InMicroseconds());
 }
 
 }  // namespace internal
diff --git a/src/v8/test/unittests/eh-frame-iterator-unittest.cc b/src/v8/test/unittests/eh-frame-iterator-unittest.cc
index b228cc9..fff3820 100644
--- a/src/v8/test/unittests/eh-frame-iterator-unittest.cc
+++ b/src/v8/test/unittests/eh-frame-iterator-unittest.cc
@@ -20,40 +20,40 @@
 
 TEST_F(EhFrameIteratorTest, Values) {
   // Assuming little endian.
-  static const byte kEncoded[] = {0xde, 0xc0, 0xad, 0xde, 0xef, 0xbe, 0xff};
+  static const byte kEncoded[] = {0xDE, 0xC0, 0xAD, 0xDE, 0xEF, 0xBE, 0xFF};
   EhFrameIterator iterator(&kEncoded[0], &kEncoded[0] + sizeof(kEncoded));
-  EXPECT_EQ(0xdeadc0de, iterator.GetNextUInt32());
-  EXPECT_EQ(0xbeef, iterator.GetNextUInt16());
-  EXPECT_EQ(0xff, iterator.GetNextByte());
+  EXPECT_EQ(0xDEADC0DE, iterator.GetNextUInt32());
+  EXPECT_EQ(0xBEEF, iterator.GetNextUInt16());
+  EXPECT_EQ(0xFF, iterator.GetNextByte());
   EXPECT_TRUE(iterator.Done());
 }
 
 TEST_F(EhFrameIteratorTest, Skip) {
-  static const byte kEncoded[] = {0xde, 0xad, 0xc0, 0xde};
+  static const byte kEncoded[] = {0xDE, 0xAD, 0xC0, 0xDE};
   EhFrameIterator iterator(&kEncoded[0], &kEncoded[0] + sizeof(kEncoded));
   iterator.Skip(2);
   EXPECT_EQ(2, iterator.GetCurrentOffset());
-  EXPECT_EQ(0xc0, iterator.GetNextByte());
+  EXPECT_EQ(0xC0, iterator.GetNextByte());
   iterator.Skip(1);
   EXPECT_TRUE(iterator.Done());
 }
 
 TEST_F(EhFrameIteratorTest, ULEB128Decoding) {
-  static const byte kEncoded[] = {0xe5, 0x8e, 0x26};
+  static const byte kEncoded[] = {0xE5, 0x8E, 0x26};
   EhFrameIterator iterator(&kEncoded[0], &kEncoded[0] + sizeof(kEncoded));
   EXPECT_EQ(624485u, iterator.GetNextULeb128());
   EXPECT_TRUE(iterator.Done());
 }
 
 TEST_F(EhFrameIteratorTest, SLEB128DecodingPositive) {
-  static const byte kEncoded[] = {0xe5, 0x8e, 0x26};
+  static const byte kEncoded[] = {0xE5, 0x8E, 0x26};
   EhFrameIterator iterator(&kEncoded[0], &kEncoded[0] + sizeof(kEncoded));
   EXPECT_EQ(624485, iterator.GetNextSLeb128());
   EXPECT_TRUE(iterator.Done());
 }
 
 TEST_F(EhFrameIteratorTest, SLEB128DecodingNegative) {
-  static const byte kEncoded[] = {0x9b, 0xf1, 0x59};
+  static const byte kEncoded[] = {0x9B, 0xF1, 0x59};
   EhFrameIterator iterator(&kEncoded[0], &kEncoded[0] + sizeof(kEncoded));
   EXPECT_EQ(-624485, iterator.GetNextSLeb128());
   EXPECT_TRUE(iterator.Done());
diff --git a/src/v8/test/unittests/eh-frame-writer-unittest.cc b/src/v8/test/unittests/eh-frame-writer-unittest.cc
index 0213835..0846fda 100644
--- a/src/v8/test/unittests/eh-frame-writer-unittest.cc
+++ b/src/v8/test/unittests/eh-frame-writer-unittest.cc
@@ -47,7 +47,7 @@
 }
 
 TEST_F(EhFrameWriterTest, FDEHeader) {
-  static const int kProcedureSize = 0x5678abcd;
+  static const int kProcedureSize = 0x5678ABCD;
 
   EhFrameWriter writer(zone());
   writer.Initialize();
@@ -76,7 +76,7 @@
 }
 
 TEST_F(EhFrameWriterTest, SetOffset) {
-  static const uint32_t kOffset = 0x0badc0de;
+  static const uint32_t kOffset = 0x0BADC0DE;
 
   EhFrameWriter writer(zone());
   writer.Initialize();
@@ -132,7 +132,7 @@
 
 TEST_F(EhFrameWriterTest, SetRegisterAndOffset) {
   Register test_register = Register::from_code(kTestRegisterCode);
-  static const uint32_t kOffset = 0x0badc0de;
+  static const uint32_t kOffset = 0x0BADC0DE;
 
   EhFrameWriter writer(zone());
   writer.Initialize();
@@ -199,7 +199,7 @@
 TEST_F(EhFrameWriterTest, PcOffsetEncoding8bitDelta) {
   static const int kFirstOffset = 0x10;
   static const int kSecondOffset = 0x70;
-  static const int kThirdOffset = 0xb5;
+  static const int kThirdOffset = 0xB5;
 
   EhFrameWriter writer(zone());
   writer.Initialize();
diff --git a/src/v8/test/unittests/heap/gc-tracer-unittest.cc b/src/v8/test/unittests/heap/gc-tracer-unittest.cc
index e7702fd..e4e9260 100644
--- a/src/v8/test/unittests/heap/gc-tracer-unittest.cc
+++ b/src/v8/test/unittests/heap/gc-tracer-unittest.cc
@@ -5,6 +5,7 @@
 #include <cmath>
 #include <limits>
 
+#include "src/base/platform/platform.h"
 #include "src/globals.h"
 #include "src/heap/gc-tracer.h"
 #include "src/isolate.h"
@@ -294,5 +295,125 @@
                        tracer->IncrementalMarkingSpeedInBytesPerMillisecond()));
 }
 
+TEST_F(GCTracerTest, BackgroundScavengerScope) {
+  GCTracer* tracer = i_isolate()->heap()->tracer();
+  tracer->ResetForTesting();
+  tracer->Start(SCAVENGER, GarbageCollectionReason::kTesting,
+                "collector unittest");
+  tracer->AddBackgroundScopeSample(
+      GCTracer::BackgroundScope::SCAVENGER_BACKGROUND_SCAVENGE_PARALLEL, 10,
+      nullptr);
+  tracer->AddBackgroundScopeSample(
+      GCTracer::BackgroundScope::SCAVENGER_BACKGROUND_SCAVENGE_PARALLEL, 1,
+      nullptr);
+  tracer->Stop(SCAVENGER);
+  EXPECT_DOUBLE_EQ(
+      11, tracer->current_
+              .scopes[GCTracer::Scope::SCAVENGER_BACKGROUND_SCAVENGE_PARALLEL]);
+}
+
+TEST_F(GCTracerTest, BackgroundMinorMCScope) {
+  GCTracer* tracer = i_isolate()->heap()->tracer();
+  tracer->ResetForTesting();
+  tracer->Start(MINOR_MARK_COMPACTOR, GarbageCollectionReason::kTesting,
+                "collector unittest");
+  tracer->AddBackgroundScopeSample(
+      GCTracer::BackgroundScope::MINOR_MC_BACKGROUND_MARKING, 10, nullptr);
+  tracer->AddBackgroundScopeSample(
+      GCTracer::BackgroundScope::MINOR_MC_BACKGROUND_MARKING, 1, nullptr);
+  tracer->AddBackgroundScopeSample(
+      GCTracer::BackgroundScope::MINOR_MC_BACKGROUND_EVACUATE_COPY, 20,
+      nullptr);
+  tracer->AddBackgroundScopeSample(
+      GCTracer::BackgroundScope::MINOR_MC_BACKGROUND_EVACUATE_COPY, 2, nullptr);
+  tracer->AddBackgroundScopeSample(
+      GCTracer::BackgroundScope::MINOR_MC_BACKGROUND_EVACUATE_UPDATE_POINTERS,
+      30, nullptr);
+  tracer->AddBackgroundScopeSample(
+      GCTracer::BackgroundScope::MINOR_MC_BACKGROUND_EVACUATE_UPDATE_POINTERS,
+      3, nullptr);
+  tracer->Stop(MINOR_MARK_COMPACTOR);
+  EXPECT_DOUBLE_EQ(
+      11,
+      tracer->current_.scopes[GCTracer::Scope::MINOR_MC_BACKGROUND_MARKING]);
+  EXPECT_DOUBLE_EQ(
+      22, tracer->current_
+              .scopes[GCTracer::Scope::MINOR_MC_BACKGROUND_EVACUATE_COPY]);
+  EXPECT_DOUBLE_EQ(
+      33, tracer->current_.scopes
+              [GCTracer::Scope::MINOR_MC_BACKGROUND_EVACUATE_UPDATE_POINTERS]);
+}
+
+TEST_F(GCTracerTest, BackgroundMajorMCScope) {
+  GCTracer* tracer = i_isolate()->heap()->tracer();
+  tracer->ResetForTesting();
+  tracer->AddBackgroundScopeSample(
+      GCTracer::BackgroundScope::MC_BACKGROUND_MARKING, 100, nullptr);
+  tracer->AddBackgroundScopeSample(
+      GCTracer::BackgroundScope::MC_BACKGROUND_SWEEPING, 200, nullptr);
+  tracer->AddBackgroundScopeSample(
+      GCTracer::BackgroundScope::MC_BACKGROUND_MARKING, 10, nullptr);
+  // Scavenger should not affect the major mark-compact scopes.
+  tracer->Start(SCAVENGER, GarbageCollectionReason::kTesting,
+                "collector unittest");
+  tracer->Stop(SCAVENGER);
+  tracer->AddBackgroundScopeSample(
+      GCTracer::BackgroundScope::MC_BACKGROUND_SWEEPING, 20, nullptr);
+  tracer->AddBackgroundScopeSample(
+      GCTracer::BackgroundScope::MC_BACKGROUND_MARKING, 1, nullptr);
+  tracer->AddBackgroundScopeSample(
+      GCTracer::BackgroundScope::MC_BACKGROUND_SWEEPING, 2, nullptr);
+  tracer->Start(MARK_COMPACTOR, GarbageCollectionReason::kTesting,
+                "collector unittest");
+  tracer->AddBackgroundScopeSample(
+      GCTracer::BackgroundScope::MC_BACKGROUND_EVACUATE_COPY, 30, nullptr);
+  tracer->AddBackgroundScopeSample(
+      GCTracer::BackgroundScope::MC_BACKGROUND_EVACUATE_COPY, 3, nullptr);
+  tracer->AddBackgroundScopeSample(
+      GCTracer::BackgroundScope::MC_BACKGROUND_EVACUATE_UPDATE_POINTERS, 40,
+      nullptr);
+  tracer->AddBackgroundScopeSample(
+      GCTracer::BackgroundScope::MC_BACKGROUND_EVACUATE_UPDATE_POINTERS, 4,
+      nullptr);
+  tracer->Stop(MARK_COMPACTOR);
+  EXPECT_DOUBLE_EQ(
+      111, tracer->current_.scopes[GCTracer::Scope::MC_BACKGROUND_MARKING]);
+  EXPECT_DOUBLE_EQ(
+      222, tracer->current_.scopes[GCTracer::Scope::MC_BACKGROUND_SWEEPING]);
+  EXPECT_DOUBLE_EQ(
+      33,
+      tracer->current_.scopes[GCTracer::Scope::MC_BACKGROUND_EVACUATE_COPY]);
+  EXPECT_DOUBLE_EQ(
+      44, tracer->current_
+              .scopes[GCTracer::Scope::MC_BACKGROUND_EVACUATE_UPDATE_POINTERS]);
+}
+
+class ThreadWithBackgroundScope final : public base::Thread {
+ public:
+  explicit ThreadWithBackgroundScope(GCTracer* tracer)
+      : Thread(Options("ThreadWithBackgroundScope")), tracer_(tracer) {}
+  void Run() override {
+    GCTracer::BackgroundScope scope(
+        tracer_, GCTracer::BackgroundScope::MC_BACKGROUND_MARKING);
+  }
+
+ private:
+  GCTracer* tracer_;
+};
+
+TEST_F(GCTracerTest, MultithreadedBackgroundScope) {
+  GCTracer* tracer = i_isolate()->heap()->tracer();
+  ThreadWithBackgroundScope thread1(tracer);
+  ThreadWithBackgroundScope thread2(tracer);
+  tracer->ResetForTesting();
+  thread1.Start();
+  thread2.Start();
+  tracer->FetchBackgroundMarkCompactCounters();
+  thread1.Join();
+  thread2.Join();
+  tracer->FetchBackgroundMarkCompactCounters();
+  EXPECT_LE(0, tracer->current_.scopes[GCTracer::Scope::MC_BACKGROUND_MARKING]);
+}
+
 }  // namespace internal
 }  // namespace v8
diff --git a/src/v8/test/unittests/heap/heap-unittest.cc b/src/v8/test/unittests/heap/heap-unittest.cc
index 1f2aab0..c63aa2b 100644
--- a/src/v8/test/unittests/heap/heap-unittest.cc
+++ b/src/v8/test/unittests/heap/heap-unittest.cc
@@ -99,7 +99,7 @@
   }
   if (hints.size() == 1) {
     EXPECT_TRUE((*hints.begin()) == nullptr);
-    EXPECT_TRUE(v8::internal::GetRandomMmapAddr() == nullptr);
+    EXPECT_TRUE(i::GetRandomMmapAddr() == nullptr);
   } else {
     // It is unlikely that 1000 random samples will collide to less then 500
     // values.
diff --git a/src/v8/test/unittests/heap/marking-unittest.cc b/src/v8/test/unittests/heap/marking-unittest.cc
index 9dd432c..0553dc0 100644
--- a/src/v8/test/unittests/heap/marking-unittest.cc
+++ b/src/v8/test/unittests/heap/marking-unittest.cc
@@ -63,7 +63,7 @@
       calloc(Bitmap::kSize / kPointerSize, kPointerSize));
   for (int i = 0; i < 3; i++) {
     bitmap->SetRange(i, Bitmap::kBitsPerCell + i);
-    CHECK_EQ(reinterpret_cast<uint32_t*>(bitmap)[0], 0xffffffffu << i);
+    CHECK_EQ(reinterpret_cast<uint32_t*>(bitmap)[0], 0xFFFFFFFFu << i);
     CHECK_EQ(reinterpret_cast<uint32_t*>(bitmap)[1], (1u << i) - 1);
     bitmap->ClearRange(i, Bitmap::kBitsPerCell + i);
     CHECK_EQ(reinterpret_cast<uint32_t*>(bitmap)[0], 0x0u);
@@ -77,9 +77,9 @@
       calloc(Bitmap::kSize / kPointerSize, kPointerSize));
   CHECK(bitmap->AllBitsClearInRange(0, Bitmap::kBitsPerCell * 3));
   bitmap->SetRange(0, Bitmap::kBitsPerCell * 3);
-  CHECK_EQ(reinterpret_cast<uint32_t*>(bitmap)[0], 0xffffffffu);
-  CHECK_EQ(reinterpret_cast<uint32_t*>(bitmap)[1], 0xffffffffu);
-  CHECK_EQ(reinterpret_cast<uint32_t*>(bitmap)[2], 0xffffffffu);
+  CHECK_EQ(reinterpret_cast<uint32_t*>(bitmap)[0], 0xFFFFFFFFu);
+  CHECK_EQ(reinterpret_cast<uint32_t*>(bitmap)[1], 0xFFFFFFFFu);
+  CHECK_EQ(reinterpret_cast<uint32_t*>(bitmap)[2], 0xFFFFFFFFu);
   CHECK(bitmap->AllBitsSetInRange(0, Bitmap::kBitsPerCell * 3));
   bitmap->ClearRange(Bitmap::kBitsPerCell / 2, Bitmap::kBitsPerCell);
   bitmap->ClearRange(Bitmap::kBitsPerCell,
@@ -87,17 +87,17 @@
   bitmap->ClearRange(Bitmap::kBitsPerCell * 2 + 8,
                      Bitmap::kBitsPerCell * 2 + 16);
   bitmap->ClearRange(Bitmap::kBitsPerCell * 2 + 24, Bitmap::kBitsPerCell * 3);
-  CHECK_EQ(reinterpret_cast<uint32_t*>(bitmap)[0], 0xffffu);
+  CHECK_EQ(reinterpret_cast<uint32_t*>(bitmap)[0], 0xFFFFu);
   CHECK(bitmap->AllBitsSetInRange(0, Bitmap::kBitsPerCell / 2));
   CHECK(bitmap->AllBitsClearInRange(Bitmap::kBitsPerCell / 2,
                                     Bitmap::kBitsPerCell));
-  CHECK_EQ(reinterpret_cast<uint32_t*>(bitmap)[1], 0xffff0000u);
+  CHECK_EQ(reinterpret_cast<uint32_t*>(bitmap)[1], 0xFFFF0000u);
   CHECK(
       bitmap->AllBitsSetInRange(Bitmap::kBitsPerCell + Bitmap::kBitsPerCell / 2,
                                 2 * Bitmap::kBitsPerCell));
   CHECK(bitmap->AllBitsClearInRange(
       Bitmap::kBitsPerCell, Bitmap::kBitsPerCell + Bitmap::kBitsPerCell / 2));
-  CHECK_EQ(reinterpret_cast<uint32_t*>(bitmap)[2], 0xff00ffu);
+  CHECK_EQ(reinterpret_cast<uint32_t*>(bitmap)[2], 0xFF00FFu);
   CHECK(bitmap->AllBitsSetInRange(2 * Bitmap::kBitsPerCell,
                                   2 * Bitmap::kBitsPerCell + 8));
   CHECK(bitmap->AllBitsClearInRange(2 * Bitmap::kBitsPerCell + 24,
diff --git a/src/v8/test/unittests/heap/worklist-unittest.cc b/src/v8/test/unittests/heap/worklist-unittest.cc
index 1a16ac6..49423db 100644
--- a/src/v8/test/unittests/heap/worklist-unittest.cc
+++ b/src/v8/test/unittests/heap/worklist-unittest.cc
@@ -301,5 +301,31 @@
   EXPECT_TRUE(worklist.IsGlobalEmpty());
 }
 
+TEST(WorkListTest, MergeGlobalPool) {
+  TestWorklist worklist1;
+  TestWorklist::View worklist_view1(&worklist1, 0);
+  SomeObject dummy;
+  for (size_t i = 0; i < TestWorklist::kSegmentCapacity; i++) {
+    EXPECT_TRUE(worklist_view1.Push(&dummy));
+  }
+  SomeObject* retrieved = nullptr;
+  // One more push/pop to publish the full segment.
+  EXPECT_TRUE(worklist_view1.Push(nullptr));
+  EXPECT_TRUE(worklist_view1.Pop(&retrieved));
+  EXPECT_EQ(nullptr, retrieved);
+  // Merging global pool into a new Worklist.
+  TestWorklist worklist2;
+  TestWorklist::View worklist_view2(&worklist2, 0);
+  worklist2.MergeGlobalPool(&worklist1);
+  EXPECT_FALSE(worklist2.IsGlobalEmpty());
+  for (size_t i = 0; i < TestWorklist::kSegmentCapacity; i++) {
+    EXPECT_TRUE(worklist_view2.Pop(&retrieved));
+    EXPECT_EQ(&dummy, retrieved);
+    EXPECT_FALSE(worklist_view1.Pop(&retrieved));
+  }
+  EXPECT_TRUE(worklist1.IsGlobalEmpty());
+  EXPECT_TRUE(worklist2.IsGlobalEmpty());
+}
+
 }  // namespace internal
 }  // namespace v8
diff --git a/src/v8/test/unittests/interpreter/bytecode-array-builder-unittest.cc b/src/v8/test/unittests/interpreter/bytecode-array-builder-unittest.cc
index 5cdce7f..26fcd19 100644
--- a/src/v8/test/unittests/interpreter/bytecode-array-builder-unittest.cc
+++ b/src/v8/test/unittests/interpreter/bytecode-array-builder-unittest.cc
@@ -2,6 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include <limits>
+
 #include "src/v8.h"
 
 #include "src/ast/scopes.h"
@@ -11,6 +13,7 @@
 #include "src/interpreter/bytecode-label.h"
 #include "src/interpreter/bytecode-register-allocator.h"
 #include "src/objects-inl.h"
+#include "test/unittests/interpreter/bytecode-utils.h"
 #include "test/unittests/test-utils.h"
 
 namespace v8 {
@@ -26,7 +29,8 @@
 using ToBooleanMode = BytecodeArrayBuilder::ToBooleanMode;
 
 TEST_F(BytecodeArrayBuilderTest, AllBytecodesGenerated) {
-  BytecodeArrayBuilder builder(isolate(), zone(), 1, 131);
+  FeedbackVectorSpec feedback_spec(zone());
+  BytecodeArrayBuilder builder(zone(), 1, 131, &feedback_spec);
   Factory* factory = isolate()->factory();
   AstValueFactory ast_factory(zone(), isolate()->ast_string_constants(),
                               isolate()->heap()->HashSeed());
@@ -38,8 +42,11 @@
   Register reg(0);
   Register other(reg.index() + 1);
   Register wide(128);
-  RegisterList reg_list(0, 10);
-  RegisterList empty, single(0, 1), pair(0, 2), triple(0, 3);
+  RegisterList empty;
+  RegisterList single = BytecodeUtils::NewRegisterList(0, 1);
+  RegisterList pair = BytecodeUtils::NewRegisterList(0, 2);
+  RegisterList triple = BytecodeUtils::NewRegisterList(0, 3);
+  RegisterList reg_list = BytecodeUtils::NewRegisterList(0, 10);
 
   // Emit argument creation operations.
   builder.CreateArguments(CreateArgumentsType::kMappedArguments)
@@ -56,8 +63,7 @@
       .StoreAccumulatorInRegister(reg)
       .LoadLiteral(Smi::FromInt(10000000))
       .StoreAccumulatorInRegister(reg)
-      .LoadLiteral(
-          ast_factory.NewString(ast_factory.GetOneByteString("A constant")))
+      .LoadLiteral(ast_factory.GetOneByteString("A constant"))
       .StoreAccumulatorInRegister(reg)
       .LoadUndefined()
       .StoreAccumulatorInRegister(reg)
@@ -81,12 +87,31 @@
   builder.MoveRegister(reg, other);
   builder.MoveRegister(reg, wide);
 
+  FeedbackSlot load_global_slot =
+      feedback_spec.AddLoadGlobalICSlot(NOT_INSIDE_TYPEOF);
+  FeedbackSlot load_global_typeof_slot =
+      feedback_spec.AddLoadGlobalICSlot(INSIDE_TYPEOF);
+  FeedbackSlot sloppy_store_global_slot =
+      feedback_spec.AddStoreGlobalICSlot(LanguageMode::kSloppy);
+  FeedbackSlot load_slot = feedback_spec.AddLoadICSlot();
+  FeedbackSlot keyed_load_slot = feedback_spec.AddKeyedLoadICSlot();
+  FeedbackSlot sloppy_store_slot =
+      feedback_spec.AddStoreICSlot(LanguageMode::kSloppy);
+  FeedbackSlot strict_store_slot =
+      feedback_spec.AddStoreICSlot(LanguageMode::kStrict);
+  FeedbackSlot sloppy_keyed_store_slot =
+      feedback_spec.AddKeyedStoreICSlot(LanguageMode::kSloppy);
+  FeedbackSlot strict_keyed_store_slot =
+      feedback_spec.AddKeyedStoreICSlot(LanguageMode::kStrict);
+  FeedbackSlot store_own_slot = feedback_spec.AddStoreOwnICSlot();
+
   // Emit global load / store operations.
   const AstRawString* name = ast_factory.GetOneByteString("var_name");
-  builder.LoadGlobal(name, 1, TypeofMode::NOT_INSIDE_TYPEOF)
-      .LoadGlobal(name, 1, TypeofMode::INSIDE_TYPEOF)
-      .StoreGlobal(name, 1, LanguageMode::SLOPPY)
-      .StoreGlobal(name, 1, LanguageMode::STRICT);
+  builder
+      .LoadGlobal(name, load_global_slot.ToInt(), TypeofMode::NOT_INSIDE_TYPEOF)
+      .LoadGlobal(name, load_global_typeof_slot.ToInt(),
+                  TypeofMode::INSIDE_TYPEOF)
+      .StoreGlobal(name, sloppy_store_global_slot.ToInt());
 
   // Emit context operations.
   builder.PushContext(reg)
@@ -106,21 +131,26 @@
       .StoreContextSlot(Register::current_context(), 3, 0);
 
   // Emit load / store property operations.
-  builder.LoadNamedProperty(reg, name, 0)
-      .LoadKeyedProperty(reg, 0)
-      .StoreNamedProperty(reg, name, 0, LanguageMode::SLOPPY)
-      .StoreKeyedProperty(reg, reg, 0, LanguageMode::SLOPPY)
-      .StoreNamedProperty(reg, name, 0, LanguageMode::STRICT)
-      .StoreKeyedProperty(reg, reg, 0, LanguageMode::STRICT)
-      .StoreNamedOwnProperty(reg, name, 0);
+  builder.LoadNamedProperty(reg, name, load_slot.ToInt())
+      .LoadKeyedProperty(reg, keyed_load_slot.ToInt())
+      .StoreNamedProperty(reg, name, sloppy_store_slot.ToInt(),
+                          LanguageMode::kSloppy)
+      .StoreKeyedProperty(reg, reg, sloppy_keyed_store_slot.ToInt(),
+                          LanguageMode::kSloppy)
+      .StoreNamedProperty(reg, name, strict_store_slot.ToInt(),
+                          LanguageMode::kStrict)
+      .StoreKeyedProperty(reg, reg, strict_keyed_store_slot.ToInt(),
+                          LanguageMode::kStrict)
+      .StoreNamedOwnProperty(reg, name, store_own_slot.ToInt());
 
   // Emit load / store lookup slots.
   builder.LoadLookupSlot(name, TypeofMode::NOT_INSIDE_TYPEOF)
       .LoadLookupSlot(name, TypeofMode::INSIDE_TYPEOF)
-      .StoreLookupSlot(name, LanguageMode::SLOPPY, LookupHoistingMode::kNormal)
-      .StoreLookupSlot(name, LanguageMode::SLOPPY,
+      .StoreLookupSlot(name, LanguageMode::kSloppy, LookupHoistingMode::kNormal)
+      .StoreLookupSlot(name, LanguageMode::kSloppy,
                        LookupHoistingMode::kLegacySloppy)
-      .StoreLookupSlot(name, LanguageMode::STRICT, LookupHoistingMode::kNormal);
+      .StoreLookupSlot(name, LanguageMode::kStrict,
+                       LookupHoistingMode::kNormal);
 
   // Emit load / store lookup slots with context fast paths.
   builder.LoadLookupContextSlot(name, TypeofMode::NOT_INSIDE_TYPEOF, 1, 0)
@@ -168,7 +198,8 @@
       .BinaryOperation(Token::Value::SUB, reg, 2)
       .BinaryOperation(Token::Value::MUL, reg, 3)
       .BinaryOperation(Token::Value::DIV, reg, 4)
-      .BinaryOperation(Token::Value::MOD, reg, 5);
+      .BinaryOperation(Token::Value::MOD, reg, 5)
+      .BinaryOperation(Token::Value::EXP, reg, 6);
 
   // Emit bitwise operator invocations
   builder.BinaryOperation(Token::Value::BIT_OR, reg, 6)
@@ -186,6 +217,7 @@
       .BinaryOperationSmiLiteral(Token::Value::MUL, Smi::FromInt(42), 2)
       .BinaryOperationSmiLiteral(Token::Value::DIV, Smi::FromInt(42), 2)
       .BinaryOperationSmiLiteral(Token::Value::MOD, Smi::FromInt(42), 2)
+      .BinaryOperationSmiLiteral(Token::Value::EXP, Smi::FromInt(42), 2)
       .BinaryOperationSmiLiteral(Token::Value::BIT_OR, Smi::FromInt(42), 2)
       .BinaryOperationSmiLiteral(Token::Value::BIT_XOR, Smi::FromInt(42), 2)
       .BinaryOperationSmiLiteral(Token::Value::BIT_AND, Smi::FromInt(42), 2)
@@ -206,7 +238,7 @@
       .TypeOf();
 
   // Emit delete
-  builder.Delete(reg, LanguageMode::SLOPPY).Delete(reg, LanguageMode::STRICT);
+  builder.Delete(reg, LanguageMode::kSloppy).Delete(reg, LanguageMode::kStrict);
 
   // Emit construct.
   builder.Construct(reg, reg_list, 1).ConstructWithSpread(reg, reg_list, 1);
@@ -220,14 +252,14 @@
       .CompareOperation(Token::Value::LTE, reg, 5)
       .CompareOperation(Token::Value::GTE, reg, 6)
       .CompareTypeOf(TestTypeOfFlags::LiteralFlag::kNumber)
-      .CompareOperation(Token::Value::INSTANCEOF, reg)
+      .CompareOperation(Token::Value::INSTANCEOF, reg, 7)
       .CompareOperation(Token::Value::IN, reg)
       .CompareUndetectable()
       .CompareUndefined()
       .CompareNull();
 
   // Emit conversion operator invocations.
-  builder.ToNumber(1).ToObject(reg).ToName(reg);
+  builder.ToNumber(1).ToNumeric(1).ToObject(reg).ToName(reg);
 
   // Emit GetSuperConstructor.
   builder.GetSuperConstructor(reg);
@@ -310,30 +342,11 @@
   // Wide constant pool loads
   for (int i = 0; i < 256; i++) {
     // Emit junk in constant pool to force wide constant pool index.
-    builder.LoadLiteral(ast_factory.NewNumber(2.5321 + i));
+    builder.LoadLiteral(2.5321 + i);
   }
   builder.LoadLiteral(Smi::FromInt(20000000));
   const AstRawString* wide_name = ast_factory.GetOneByteString("var_wide_name");
 
-  // Emit wide global load / store operations.
-  builder.LoadGlobal(name, 1024, TypeofMode::NOT_INSIDE_TYPEOF)
-      .LoadGlobal(name, 1024, TypeofMode::INSIDE_TYPEOF)
-      .LoadGlobal(name, 1024, TypeofMode::INSIDE_TYPEOF)
-      .StoreGlobal(name, 1024, LanguageMode::SLOPPY)
-      .StoreGlobal(wide_name, 1, LanguageMode::STRICT);
-
-  // Emit extra wide global load.
-  builder.LoadGlobal(name, 1024 * 1024, TypeofMode::NOT_INSIDE_TYPEOF);
-
-  // Emit wide load / store property operations.
-  builder.LoadNamedProperty(reg, wide_name, 0)
-      .LoadKeyedProperty(reg, 2056)
-      .StoreNamedProperty(reg, wide_name, 0, LanguageMode::SLOPPY)
-      .StoreKeyedProperty(reg, reg, 2056, LanguageMode::SLOPPY)
-      .StoreNamedProperty(reg, wide_name, 0, LanguageMode::STRICT)
-      .StoreKeyedProperty(reg, reg, 2056, LanguageMode::STRICT)
-      .StoreNamedOwnProperty(reg, wide_name, 0);
-
   builder.StoreDataPropertyInLiteral(reg, reg,
                                      DataPropertyInLiteralFlag::kNoFlags, 0);
 
@@ -344,11 +357,11 @@
   // Emit wide load / store lookup slots.
   builder.LoadLookupSlot(wide_name, TypeofMode::NOT_INSIDE_TYPEOF)
       .LoadLookupSlot(wide_name, TypeofMode::INSIDE_TYPEOF)
-      .StoreLookupSlot(wide_name, LanguageMode::SLOPPY,
+      .StoreLookupSlot(wide_name, LanguageMode::kSloppy,
                        LookupHoistingMode::kNormal)
-      .StoreLookupSlot(wide_name, LanguageMode::SLOPPY,
+      .StoreLookupSlot(wide_name, LanguageMode::kSloppy,
                        LookupHoistingMode::kLegacySloppy)
-      .StoreLookupSlot(wide_name, LanguageMode::STRICT,
+      .StoreLookupSlot(wide_name, LanguageMode::kStrict,
                        LookupHoistingMode::kNormal);
 
   // CreateClosureWide
@@ -373,7 +386,7 @@
   // Emit generator operations.
   builder.SuspendGenerator(reg, reg_list, 0)
       .RestoreGeneratorState(reg)
-      .RestoreGeneratorRegisters(reg, reg_list);
+      .ResumeGenerator(reg, reg, reg_list);
 
   // Intrinsics handled by the interpreter.
   builder.CallRuntime(Runtime::kInlineIsArray, reg_list);
@@ -384,7 +397,7 @@
   // Emit abort bytecode.
   {
     BytecodeLabel after;
-    builder.Abort(kGenerator).Bind(&after);
+    builder.Abort(AbortReason::kOperandIsASmi).Bind(&after);
   }
 
   // Insert dummy ops to force longer jumps.
@@ -454,7 +467,7 @@
 TEST_F(BytecodeArrayBuilderTest, FrameSizesLookGood) {
   for (int locals = 0; locals < 5; locals++) {
     for (int temps = 0; temps < 3; temps++) {
-      BytecodeArrayBuilder builder(isolate(), zone(), 1, locals);
+      BytecodeArrayBuilder builder(zone(), 1, locals);
       BytecodeRegisterAllocator* allocator(builder.register_allocator());
       for (int i = 0; i < locals; i++) {
         builder.LoadLiteral(Smi::kZero);
@@ -491,7 +504,7 @@
 
 
 TEST_F(BytecodeArrayBuilderTest, Parameters) {
-  BytecodeArrayBuilder builder(isolate(), zone(), 10, 0);
+  BytecodeArrayBuilder builder(zone(), 10, 0);
 
   Register receiver(builder.Receiver());
   Register param8(builder.Parameter(8));
@@ -500,35 +513,37 @@
 
 
 TEST_F(BytecodeArrayBuilderTest, Constants) {
-  BytecodeArrayBuilder builder(isolate(), zone(), 1, 0);
+  BytecodeArrayBuilder builder(zone(), 1, 0);
   AstValueFactory ast_factory(zone(), isolate()->ast_string_constants(),
                               isolate()->heap()->HashSeed());
 
-  const AstValue* heap_num_1 = ast_factory.NewNumber(3.14);
-  const AstValue* heap_num_2 = ast_factory.NewNumber(5.2);
-  const AstValue* string =
-      ast_factory.NewString(ast_factory.GetOneByteString("foo"));
-  const AstValue* string_copy =
-      ast_factory.NewString(ast_factory.GetOneByteString("foo"));
+  double heap_num_1 = 3.14;
+  double heap_num_2 = 5.2;
+  double nan = std::numeric_limits<double>::quiet_NaN();
+  const AstRawString* string = ast_factory.GetOneByteString("foo");
+  const AstRawString* string_copy = ast_factory.GetOneByteString("foo");
 
   builder.LoadLiteral(heap_num_1)
       .LoadLiteral(heap_num_2)
       .LoadLiteral(string)
       .LoadLiteral(heap_num_1)
       .LoadLiteral(heap_num_1)
+      .LoadLiteral(nan)
       .LoadLiteral(string_copy)
+      .LoadLiteral(heap_num_2)
+      .LoadLiteral(nan)
       .Return();
 
   ast_factory.Internalize(isolate());
   Handle<BytecodeArray> array = builder.ToBytecodeArray(isolate());
   // Should only have one entry for each identical constant.
-  CHECK_EQ(array->constant_pool()->length(), 3);
+  EXPECT_EQ(4, array->constant_pool()->length());
 }
 
 TEST_F(BytecodeArrayBuilderTest, ForwardJumps) {
   static const int kFarJumpDistance = 256 + 20;
 
-  BytecodeArrayBuilder builder(isolate(), zone(), 1, 1);
+  BytecodeArrayBuilder builder(zone(), 1, 1);
 
   Register reg(0);
   BytecodeLabel far0, far1, far2, far3, far4;
@@ -643,7 +658,7 @@
 
 
 TEST_F(BytecodeArrayBuilderTest, BackwardJumps) {
-  BytecodeArrayBuilder builder(isolate(), zone(), 1, 1);
+  BytecodeArrayBuilder builder(zone(), 1, 1);
 
   Register reg(0);
 
@@ -691,7 +706,7 @@
 }
 
 TEST_F(BytecodeArrayBuilderTest, SmallSwitch) {
-  BytecodeArrayBuilder builder(isolate(), zone(), 1, 1);
+  BytecodeArrayBuilder builder(zone(), 1, 1);
 
   // Small jump table that fits into the single-size constant pool
   int small_jump_table_size = 5;
@@ -739,7 +754,7 @@
 }
 
 TEST_F(BytecodeArrayBuilderTest, WideSwitch) {
-  BytecodeArrayBuilder builder(isolate(), zone(), 1, 1);
+  BytecodeArrayBuilder builder(zone(), 1, 1);
 
   // Large jump table that requires a wide Switch bytecode.
   int large_jump_table_size = 256;
@@ -787,7 +802,7 @@
 }
 
 TEST_F(BytecodeArrayBuilderTest, LabelReuse) {
-  BytecodeArrayBuilder builder(isolate(), zone(), 1, 0);
+  BytecodeArrayBuilder builder(zone(), 1, 0);
 
   // Labels can only have 1 forward reference, but
   // can be referred to mulitple times once bound.
@@ -821,7 +836,7 @@
 TEST_F(BytecodeArrayBuilderTest, LabelAddressReuse) {
   static const int kRepeats = 3;
 
-  BytecodeArrayBuilder builder(isolate(), zone(), 1, 0);
+  BytecodeArrayBuilder builder(zone(), 1, 0);
   for (int i = 0; i < kRepeats; i++) {
     BytecodeLabel label, after_jump0, after_jump1;
     builder.Jump(&label)
diff --git a/src/v8/test/unittests/interpreter/bytecode-array-iterator-unittest.cc b/src/v8/test/unittests/interpreter/bytecode-array-iterator-unittest.cc
index aefef10..f7c89e2 100644
--- a/src/v8/test/unittests/interpreter/bytecode-array-iterator-unittest.cc
+++ b/src/v8/test/unittests/interpreter/bytecode-array-iterator-unittest.cc
@@ -7,6 +7,7 @@
 #include "src/interpreter/bytecode-array-builder.h"
 #include "src/interpreter/bytecode-array-iterator.h"
 #include "src/objects-inl.h"
+#include "test/unittests/interpreter/bytecode-utils.h"
 #include "test/unittests/test-utils.h"
 
 namespace v8 {
@@ -22,22 +23,26 @@
 TEST_F(BytecodeArrayIteratorTest, IteratesBytecodeArray) {
   // Use a builder to create an array with containing multiple bytecodes
   // with 0, 1 and 2 operands.
-  BytecodeArrayBuilder builder(isolate(), zone(), 3, 3, 0);
+  FeedbackVectorSpec feedback_spec(zone());
+  BytecodeArrayBuilder builder(zone(), 3, 3, &feedback_spec);
   AstValueFactory ast_factory(zone(), isolate()->ast_string_constants(),
                               isolate()->heap()->HashSeed());
-  const AstValue* heap_num_0 = ast_factory.NewNumber(2.718);
-  const AstValue* heap_num_1 = ast_factory.NewNumber(2.0 * Smi::kMaxValue);
+  double heap_num_0 = 2.718;
+  double heap_num_1 = 2.0 * Smi::kMaxValue;
   Smi* zero = Smi::kZero;
   Smi* smi_0 = Smi::FromInt(64);
   Smi* smi_1 = Smi::FromInt(-65536);
   Register reg_0(0);
   Register reg_1(1);
-  RegisterList pair(0, 2);
-  RegisterList triple(0, 3);
+  RegisterList pair = BytecodeUtils::NewRegisterList(0, 2);
+  RegisterList triple = BytecodeUtils::NewRegisterList(0, 3);
   Register param = Register::FromParameterIndex(2, builder.parameter_count());
   const AstRawString* name = ast_factory.GetOneByteString("abc");
   uint32_t name_index = 2;
-  uint32_t feedback_slot = 97;
+  uint32_t load_feedback_slot = feedback_spec.AddLoadICSlot().ToInt();
+  uint32_t forin_feedback_slot = feedback_spec.AddForInSlot().ToInt();
+  uint32_t load_global_feedback_slot =
+      feedback_spec.AddLoadGlobalICSlot(TypeofMode::NOT_INSIDE_TYPEOF).ToInt();
 
   builder.LoadLiteral(heap_num_0)
       .StoreAccumulatorInRegister(reg_0)
@@ -54,14 +59,15 @@
       .LoadAccumulatorWithRegister(reg_0)
       .BinaryOperation(Token::Value::ADD, reg_0, 2)
       .StoreAccumulatorInRegister(reg_1)
-      .LoadNamedProperty(reg_1, name, feedback_slot)
+      .LoadNamedProperty(reg_1, name, load_feedback_slot)
       .BinaryOperation(Token::Value::ADD, reg_0, 3)
       .StoreAccumulatorInRegister(param)
       .CallRuntimeForPair(Runtime::kLoadLookupSlotForCall, param, pair)
-      .ForInPrepare(triple, feedback_slot)
+      .ForInPrepare(triple, forin_feedback_slot)
       .CallRuntime(Runtime::kLoadIC_Miss, reg_0)
       .Debugger()
-      .LoadGlobal(name, 0x10000000, TypeofMode::NOT_INSIDE_TYPEOF)
+      .LoadGlobal(name, load_global_feedback_slot,
+                  TypeofMode::NOT_INSIDE_TYPEOF)
       .Return();
 
   // Test iterator sees the expected output from the builder.
@@ -73,8 +79,7 @@
   EXPECT_EQ(iterator.current_bytecode(), Bytecode::kLdaConstant);
   EXPECT_EQ(iterator.current_offset(), offset);
   EXPECT_EQ(iterator.current_operand_scale(), OperandScale::kSingle);
-  CHECK(iterator.GetConstantForIndexOperand(0).is_identical_to(
-      heap_num_0->value()));
+  EXPECT_EQ(iterator.GetConstantForIndexOperand(0)->Number(), heap_num_0);
   CHECK(!iterator.done());
   offset += Bytecodes::Size(Bytecode::kLdaConstant, OperandScale::kSingle);
   iterator.Advance();
@@ -91,8 +96,7 @@
   EXPECT_EQ(iterator.current_bytecode(), Bytecode::kLdaConstant);
   EXPECT_EQ(iterator.current_offset(), offset);
   EXPECT_EQ(iterator.current_operand_scale(), OperandScale::kSingle);
-  CHECK(iterator.GetConstantForIndexOperand(0).is_identical_to(
-      heap_num_1->value()));
+  EXPECT_EQ(iterator.GetConstantForIndexOperand(0)->Number(), heap_num_1);
   CHECK(!iterator.done());
   offset += Bytecodes::Size(Bytecode::kLdaConstant, OperandScale::kSingle);
   iterator.Advance();
@@ -204,7 +208,7 @@
   EXPECT_EQ(iterator.current_operand_scale(), OperandScale::kSingle);
   EXPECT_EQ(iterator.GetRegisterOperand(0).index(), reg_1.index());
   EXPECT_EQ(iterator.GetIndexOperand(1), name_index);
-  EXPECT_EQ(iterator.GetIndexOperand(2), feedback_slot);
+  EXPECT_EQ(iterator.GetIndexOperand(2), load_feedback_slot);
   CHECK(!iterator.done());
   offset += Bytecodes::Size(Bytecode::kLdaNamedProperty, OperandScale::kSingle);
   iterator.Advance();
@@ -246,7 +250,7 @@
   EXPECT_EQ(iterator.current_operand_scale(), OperandScale::kSingle);
   EXPECT_EQ(iterator.GetRegisterOperand(0).index(), reg_0.index());
   EXPECT_EQ(iterator.GetRegisterOperandRange(0), 3);
-  EXPECT_EQ(iterator.GetIndexOperand(1), feedback_slot);
+  EXPECT_EQ(iterator.GetIndexOperand(1), forin_feedback_slot);
   CHECK(!iterator.done());
   offset += Bytecodes::Size(Bytecode::kForInPrepare, OperandScale::kSingle);
   iterator.Advance();
@@ -270,11 +274,10 @@
 
   EXPECT_EQ(iterator.current_bytecode(), Bytecode::kLdaGlobal);
   EXPECT_EQ(iterator.current_offset(), offset);
-  EXPECT_EQ(iterator.current_operand_scale(), OperandScale::kQuadruple);
-  EXPECT_EQ(iterator.current_bytecode_size(), 10);
-  EXPECT_EQ(iterator.GetIndexOperand(1), 0x10000000u);
-  offset += Bytecodes::Size(Bytecode::kLdaGlobal, OperandScale::kQuadruple) +
-            kPrefixByteSize;
+  EXPECT_EQ(iterator.current_operand_scale(), OperandScale::kSingle);
+  EXPECT_EQ(iterator.current_bytecode_size(), 3);
+  EXPECT_EQ(iterator.GetIndexOperand(1), load_global_feedback_slot);
+  offset += Bytecodes::Size(Bytecode::kLdaGlobal, OperandScale::kSingle);
   iterator.Advance();
 
   EXPECT_EQ(iterator.current_bytecode(), Bytecode::kReturn);
diff --git a/src/v8/test/unittests/interpreter/bytecode-array-random-iterator-unittest.cc b/src/v8/test/unittests/interpreter/bytecode-array-random-iterator-unittest.cc
index 7d9bcd0..8d2cd4c 100644
--- a/src/v8/test/unittests/interpreter/bytecode-array-random-iterator-unittest.cc
+++ b/src/v8/test/unittests/interpreter/bytecode-array-random-iterator-unittest.cc
@@ -7,6 +7,7 @@
 #include "src/interpreter/bytecode-array-builder.h"
 #include "src/interpreter/bytecode-array-random-iterator.h"
 #include "src/objects-inl.h"
+#include "test/unittests/interpreter/bytecode-utils.h"
 #include "test/unittests/test-utils.h"
 
 namespace v8 {
@@ -22,21 +23,22 @@
 TEST_F(BytecodeArrayRandomIteratorTest, InvalidBeforeStart) {
   // Use a builder to create an array with containing multiple bytecodes
   // with 0, 1 and 2 operands.
-  BytecodeArrayBuilder builder(isolate(), zone(), 3, 3, 0);
+  FeedbackVectorSpec feedback_spec(zone());
+  BytecodeArrayBuilder builder(zone(), 3, 3, &feedback_spec);
   AstValueFactory ast_factory(zone(), isolate()->ast_string_constants(),
                               isolate()->heap()->HashSeed());
-  const AstValue* heap_num_0 = ast_factory.NewNumber(2.718);
-  const AstValue* heap_num_1 = ast_factory.NewNumber(2.0 * Smi::kMaxValue);
+  double heap_num_0 = 2.718;
+  double heap_num_1 = 2.0 * Smi::kMaxValue;
   Smi* zero = Smi::kZero;
   Smi* smi_0 = Smi::FromInt(64);
   Smi* smi_1 = Smi::FromInt(-65536);
   Register reg_0(0);
   Register reg_1(1);
-  RegisterList pair(0, 2);
-  RegisterList triple(0, 3);
+  RegisterList pair = BytecodeUtils::NewRegisterList(0, 2);
+  RegisterList triple = BytecodeUtils::NewRegisterList(0, 3);
   Register param = Register::FromParameterIndex(2, builder.parameter_count());
   const AstRawString* name = ast_factory.GetOneByteString("abc");
-  uint32_t feedback_slot = 97;
+  uint32_t feedback_slot = feedback_spec.AddLoadICSlot().ToInt();
 
   builder.LoadLiteral(heap_num_0)
       .StoreAccumulatorInRegister(reg_0)
@@ -60,7 +62,6 @@
       .ForInPrepare(triple, feedback_slot)
       .CallRuntime(Runtime::kLoadIC_Miss, reg_0)
       .Debugger()
-      .LoadGlobal(name, 0x10000000, TypeofMode::NOT_INSIDE_TYPEOF)
       .Return();
 
   ast_factory.Internalize(isolate());
@@ -76,21 +77,22 @@
 TEST_F(BytecodeArrayRandomIteratorTest, InvalidAfterEnd) {
   // Use a builder to create an array with containing multiple bytecodes
   // with 0, 1 and 2 operands.
-  BytecodeArrayBuilder builder(isolate(), zone(), 3, 3, 0);
+  FeedbackVectorSpec feedback_spec(zone());
+  BytecodeArrayBuilder builder(zone(), 3, 3, &feedback_spec);
   AstValueFactory ast_factory(zone(), isolate()->ast_string_constants(),
                               isolate()->heap()->HashSeed());
-  const AstValue* heap_num_0 = ast_factory.NewNumber(2.718);
-  const AstValue* heap_num_1 = ast_factory.NewNumber(2.0 * Smi::kMaxValue);
+  double heap_num_0 = 2.718;
+  double heap_num_1 = 2.0 * Smi::kMaxValue;
   Smi* zero = Smi::kZero;
   Smi* smi_0 = Smi::FromInt(64);
   Smi* smi_1 = Smi::FromInt(-65536);
   Register reg_0(0);
   Register reg_1(1);
-  RegisterList pair(0, 2);
-  RegisterList triple(0, 3);
+  RegisterList pair = BytecodeUtils::NewRegisterList(0, 2);
+  RegisterList triple = BytecodeUtils::NewRegisterList(0, 3);
   Register param = Register::FromParameterIndex(2, builder.parameter_count());
   const AstRawString* name = ast_factory.GetOneByteString("abc");
-  uint32_t feedback_slot = 97;
+  uint32_t feedback_slot = feedback_spec.AddLoadICSlot().ToInt();
 
   builder.LoadLiteral(heap_num_0)
       .StoreAccumulatorInRegister(reg_0)
@@ -114,7 +116,6 @@
       .ForInPrepare(triple, feedback_slot)
       .CallRuntime(Runtime::kLoadIC_Miss, reg_0)
       .Debugger()
-      .LoadGlobal(name, 0x10000000, TypeofMode::NOT_INSIDE_TYPEOF)
       .Return();
 
   ast_factory.Internalize(isolate());
@@ -130,21 +131,22 @@
 TEST_F(BytecodeArrayRandomIteratorTest, AccessesFirst) {
   // Use a builder to create an array with containing multiple bytecodes
   // with 0, 1 and 2 operands.
-  BytecodeArrayBuilder builder(isolate(), zone(), 3, 3, 0);
+  FeedbackVectorSpec feedback_spec(zone());
+  BytecodeArrayBuilder builder(zone(), 3, 3, &feedback_spec);
   AstValueFactory ast_factory(zone(), isolate()->ast_string_constants(),
                               isolate()->heap()->HashSeed());
-  const AstValue* heap_num_0 = ast_factory.NewNumber(2.718);
-  const AstValue* heap_num_1 = ast_factory.NewNumber(2.0 * Smi::kMaxValue);
+  double heap_num_0 = 2.718;
+  double heap_num_1 = 2.0 * Smi::kMaxValue;
   Smi* zero = Smi::kZero;
   Smi* smi_0 = Smi::FromInt(64);
   Smi* smi_1 = Smi::FromInt(-65536);
   Register reg_0(0);
   Register reg_1(1);
-  RegisterList pair(0, 2);
-  RegisterList triple(0, 3);
+  RegisterList pair = BytecodeUtils::NewRegisterList(0, 2);
+  RegisterList triple = BytecodeUtils::NewRegisterList(0, 3);
   Register param = Register::FromParameterIndex(2, builder.parameter_count());
   const AstRawString* name = ast_factory.GetOneByteString("abc");
-  uint32_t feedback_slot = 97;
+  uint32_t feedback_slot = feedback_spec.AddLoadICSlot().ToInt();
 
   builder.LoadLiteral(heap_num_0)
       .StoreAccumulatorInRegister(reg_0)
@@ -168,7 +170,6 @@
       .ForInPrepare(triple, feedback_slot)
       .CallRuntime(Runtime::kLoadIC_Miss, reg_0)
       .Debugger()
-      .LoadGlobal(name, 0x10000000, TypeofMode::NOT_INSIDE_TYPEOF)
       .Return();
 
   ast_factory.Internalize(isolate());
@@ -181,29 +182,29 @@
   EXPECT_EQ(iterator.current_index(), 0);
   EXPECT_EQ(iterator.current_offset(), 0);
   EXPECT_EQ(iterator.current_operand_scale(), OperandScale::kSingle);
-  EXPECT_TRUE(iterator.GetConstantForIndexOperand(0).is_identical_to(
-      heap_num_0->value()));
+  EXPECT_EQ(iterator.GetConstantForIndexOperand(0)->Number(), heap_num_0);
   ASSERT_TRUE(iterator.IsValid());
 }
 
 TEST_F(BytecodeArrayRandomIteratorTest, AccessesLast) {
   // Use a builder to create an array with containing multiple bytecodes
   // with 0, 1 and 2 operands.
-  BytecodeArrayBuilder builder(isolate(), zone(), 3, 3, 0);
+  FeedbackVectorSpec feedback_spec(zone());
+  BytecodeArrayBuilder builder(zone(), 3, 3, &feedback_spec);
   AstValueFactory ast_factory(zone(), isolate()->ast_string_constants(),
                               isolate()->heap()->HashSeed());
-  const AstValue* heap_num_0 = ast_factory.NewNumber(2.718);
-  const AstValue* heap_num_1 = ast_factory.NewNumber(2.0 * Smi::kMaxValue);
+  double heap_num_0 = 2.718;
+  double heap_num_1 = 2.0 * Smi::kMaxValue;
   Smi* zero = Smi::kZero;
   Smi* smi_0 = Smi::FromInt(64);
   Smi* smi_1 = Smi::FromInt(-65536);
   Register reg_0(0);
   Register reg_1(1);
-  RegisterList pair(0, 2);
-  RegisterList triple(0, 3);
+  RegisterList pair = BytecodeUtils::NewRegisterList(0, 2);
+  RegisterList triple = BytecodeUtils::NewRegisterList(0, 3);
   Register param = Register::FromParameterIndex(2, builder.parameter_count());
   const AstRawString* name = ast_factory.GetOneByteString("abc");
-  uint32_t feedback_slot = 97;
+  uint32_t feedback_slot = feedback_spec.AddLoadICSlot().ToInt();
 
   builder.LoadLiteral(heap_num_0)
       .StoreAccumulatorInRegister(reg_0)
@@ -227,7 +228,6 @@
       .ForInPrepare(triple, feedback_slot)
       .CallRuntime(Runtime::kLoadIC_Miss, reg_0)
       .Debugger()
-      .LoadGlobal(name, 0x10000000, TypeofMode::NOT_INSIDE_TYPEOF)
       .Return();
 
   ast_factory.Internalize(isolate());
@@ -239,7 +239,7 @@
   int offset = bytecodeArray->length() -
                Bytecodes::Size(Bytecode::kReturn, OperandScale::kSingle);
   EXPECT_EQ(iterator.current_bytecode(), Bytecode::kReturn);
-  EXPECT_EQ(iterator.current_index(), 23);
+  EXPECT_EQ(iterator.current_index(), 22);
   EXPECT_EQ(iterator.current_offset(), offset);
   EXPECT_EQ(iterator.current_operand_scale(), OperandScale::kSingle);
   ASSERT_TRUE(iterator.IsValid());
@@ -248,22 +248,23 @@
 TEST_F(BytecodeArrayRandomIteratorTest, RandomAccessValid) {
   // Use a builder to create an array with containing multiple bytecodes
   // with 0, 1 and 2 operands.
-  BytecodeArrayBuilder builder(isolate(), zone(), 3, 3, 0);
+  FeedbackVectorSpec feedback_spec(zone());
+  BytecodeArrayBuilder builder(zone(), 3, 3, &feedback_spec);
   AstValueFactory ast_factory(zone(), isolate()->ast_string_constants(),
                               isolate()->heap()->HashSeed());
-  const AstValue* heap_num_0 = ast_factory.NewNumber(2.718);
-  const AstValue* heap_num_1 = ast_factory.NewNumber(2.0 * Smi::kMaxValue);
+  double heap_num_0 = 2.718;
+  double heap_num_1 = 2.0 * Smi::kMaxValue;
   Smi* zero = Smi::kZero;
   Smi* smi_0 = Smi::FromInt(64);
   Smi* smi_1 = Smi::FromInt(-65536);
   Register reg_0(0);
   Register reg_1(1);
-  RegisterList pair(0, 2);
-  RegisterList triple(0, 3);
+  RegisterList pair = BytecodeUtils::NewRegisterList(0, 2);
+  RegisterList triple = BytecodeUtils::NewRegisterList(0, 3);
   Register param = Register::FromParameterIndex(2, builder.parameter_count());
   const AstRawString* name = ast_factory.GetOneByteString("abc");
   uint32_t name_index = 2;
-  uint32_t feedback_slot = 97;
+  uint32_t feedback_slot = feedback_spec.AddLoadICSlot().ToInt();
 
   builder.LoadLiteral(heap_num_0)
       .StoreAccumulatorInRegister(reg_0)
@@ -287,7 +288,6 @@
       .ForInPrepare(triple, feedback_slot)
       .CallRuntime(Runtime::kLoadIC_Miss, reg_0)
       .Debugger()
-      .LoadGlobal(name, 0x10000000, TypeofMode::NOT_INSIDE_TYPEOF)
       .Return();
 
   // Test iterator sees the expected output from the builder.
@@ -329,8 +329,7 @@
   EXPECT_EQ(iterator.current_index(), 2);
   EXPECT_EQ(iterator.current_offset(), offset);
   EXPECT_EQ(iterator.current_operand_scale(), OperandScale::kSingle);
-  EXPECT_TRUE(iterator.GetConstantForIndexOperand(0).is_identical_to(
-      heap_num_1->value()));
+  EXPECT_EQ(iterator.GetConstantForIndexOperand(0)->Number(), heap_num_1);
   ASSERT_TRUE(iterator.IsValid());
 
   iterator.GoToIndex(18);
@@ -392,7 +391,7 @@
   EXPECT_EQ(iterator.GetRegisterOperandRange(0), 1);
   ASSERT_TRUE(iterator.IsValid());
 
-  iterator.GoToIndex(23);
+  iterator.GoToIndex(22);
   offset = Bytecodes::Size(Bytecode::kLdaConstant, OperandScale::kSingle);
   offset += Bytecodes::Size(Bytecode::kStar, OperandScale::kSingle);
   offset += Bytecodes::Size(Bytecode::kLdaConstant, OperandScale::kSingle);
@@ -417,11 +416,9 @@
   offset += Bytecodes::Size(Bytecode::kForInPrepare, OperandScale::kSingle);
   offset += Bytecodes::Size(Bytecode::kCallRuntime, OperandScale::kSingle);
   offset += Bytecodes::Size(Bytecode::kDebugger, OperandScale::kSingle);
-  offset += Bytecodes::Size(Bytecode::kLdaGlobal, OperandScale::kQuadruple) +
-            kPrefixByteSize;
 
   EXPECT_EQ(iterator.current_bytecode(), Bytecode::kReturn);
-  EXPECT_EQ(iterator.current_index(), 23);
+  EXPECT_EQ(iterator.current_index(), 22);
   EXPECT_EQ(iterator.current_offset(), offset);
   EXPECT_EQ(iterator.current_operand_scale(), OperandScale::kSingle);
   ASSERT_TRUE(iterator.IsValid());
@@ -436,22 +433,23 @@
 TEST_F(BytecodeArrayRandomIteratorTest, IteratesBytecodeArray) {
   // Use a builder to create an array with containing multiple bytecodes
   // with 0, 1 and 2 operands.
-  BytecodeArrayBuilder builder(isolate(), zone(), 3, 3, 0);
+  FeedbackVectorSpec feedback_spec(zone());
+  BytecodeArrayBuilder builder(zone(), 3, 3, &feedback_spec);
   AstValueFactory ast_factory(zone(), isolate()->ast_string_constants(),
                               isolate()->heap()->HashSeed());
-  const AstValue* heap_num_0 = ast_factory.NewNumber(2.718);
-  const AstValue* heap_num_1 = ast_factory.NewNumber(2.0 * Smi::kMaxValue);
+  double heap_num_0 = 2.718;
+  double heap_num_1 = 2.0 * Smi::kMaxValue;
   Smi* zero = Smi::kZero;
   Smi* smi_0 = Smi::FromInt(64);
   Smi* smi_1 = Smi::FromInt(-65536);
   Register reg_0(0);
   Register reg_1(1);
-  RegisterList pair(0, 2);
-  RegisterList triple(0, 3);
+  RegisterList pair = BytecodeUtils::NewRegisterList(0, 2);
+  RegisterList triple = BytecodeUtils::NewRegisterList(0, 3);
   Register param = Register::FromParameterIndex(2, builder.parameter_count());
   const AstRawString* name = ast_factory.GetOneByteString("abc");
   uint32_t name_index = 2;
-  uint32_t feedback_slot = 97;
+  uint32_t feedback_slot = feedback_spec.AddLoadICSlot().ToInt();
 
   builder.LoadLiteral(heap_num_0)
       .StoreAccumulatorInRegister(reg_0)
@@ -475,7 +473,6 @@
       .ForInPrepare(triple, feedback_slot)
       .CallRuntime(Runtime::kLoadIC_Miss, reg_0)
       .Debugger()
-      .LoadGlobal(name, 0x10000000, TypeofMode::NOT_INSIDE_TYPEOF)
       .Return();
 
   // Test iterator sees the expected output from the builder.
@@ -489,8 +486,7 @@
   EXPECT_EQ(iterator.current_index(), 0);
   EXPECT_EQ(iterator.current_offset(), offset);
   EXPECT_EQ(iterator.current_operand_scale(), OperandScale::kSingle);
-  EXPECT_TRUE(iterator.GetConstantForIndexOperand(0).is_identical_to(
-      heap_num_0->value()));
+  EXPECT_EQ(iterator.GetConstantForIndexOperand(0)->Number(), heap_num_0);
   ASSERT_TRUE(iterator.IsValid());
   offset += Bytecodes::Size(Bytecode::kLdaConstant, OperandScale::kSingle);
   ++iterator;
@@ -509,8 +505,7 @@
   EXPECT_EQ(iterator.current_index(), 2);
   EXPECT_EQ(iterator.current_offset(), offset);
   EXPECT_EQ(iterator.current_operand_scale(), OperandScale::kSingle);
-  EXPECT_TRUE(iterator.GetConstantForIndexOperand(0).is_identical_to(
-      heap_num_1->value()));
+  EXPECT_EQ(iterator.GetConstantForIndexOperand(0)->Number(), heap_num_1);
   ASSERT_TRUE(iterator.IsValid());
   offset += Bytecodes::Size(Bytecode::kLdaConstant, OperandScale::kSingle);
   ++iterator;
@@ -705,18 +700,8 @@
   offset += Bytecodes::Size(Bytecode::kDebugger, OperandScale::kSingle);
   ++iterator;
 
-  EXPECT_EQ(iterator.current_bytecode(), Bytecode::kLdaGlobal);
-  EXPECT_EQ(iterator.current_index(), 22);
-  EXPECT_EQ(iterator.current_offset(), offset);
-  EXPECT_EQ(iterator.current_operand_scale(), OperandScale::kQuadruple);
-  EXPECT_EQ(iterator.current_bytecode_size(), 10);
-  EXPECT_EQ(iterator.GetIndexOperand(1), 0x10000000u);
-  offset += Bytecodes::Size(Bytecode::kLdaGlobal, OperandScale::kQuadruple) +
-            kPrefixByteSize;
-  ++iterator;
-
   EXPECT_EQ(iterator.current_bytecode(), Bytecode::kReturn);
-  EXPECT_EQ(iterator.current_index(), 23);
+  EXPECT_EQ(iterator.current_index(), 22);
   EXPECT_EQ(iterator.current_offset(), offset);
   EXPECT_EQ(iterator.current_operand_scale(), OperandScale::kSingle);
   ASSERT_TRUE(iterator.IsValid());
@@ -727,22 +712,23 @@
 TEST_F(BytecodeArrayRandomIteratorTest, IteratesBytecodeArrayBackwards) {
   // Use a builder to create an array with containing multiple bytecodes
   // with 0, 1 and 2 operands.
-  BytecodeArrayBuilder builder(isolate(), zone(), 3, 3, 0);
+  FeedbackVectorSpec feedback_spec(zone());
+  BytecodeArrayBuilder builder(zone(), 3, 3, &feedback_spec);
   AstValueFactory ast_factory(zone(), isolate()->ast_string_constants(),
                               isolate()->heap()->HashSeed());
-  const AstValue* heap_num_0 = ast_factory.NewNumber(2.718);
-  const AstValue* heap_num_1 = ast_factory.NewNumber(2.0 * Smi::kMaxValue);
+  double heap_num_0 = 2.718;
+  double heap_num_1 = 2.0 * Smi::kMaxValue;
   Smi* zero = Smi::kZero;
   Smi* smi_0 = Smi::FromInt(64);
   Smi* smi_1 = Smi::FromInt(-65536);
   Register reg_0(0);
   Register reg_1(1);
-  RegisterList pair(0, 2);
-  RegisterList triple(0, 3);
+  RegisterList pair = BytecodeUtils::NewRegisterList(0, 2);
+  RegisterList triple = BytecodeUtils::NewRegisterList(0, 3);
   Register param = Register::FromParameterIndex(2, builder.parameter_count());
   const AstRawString* name = ast_factory.GetOneByteString("abc");
   uint32_t name_index = 2;
-  uint32_t feedback_slot = 97;
+  uint32_t feedback_slot = feedback_spec.AddLoadICSlot().ToInt();
 
   builder.LoadLiteral(heap_num_0)
       .StoreAccumulatorInRegister(reg_0)
@@ -766,7 +752,6 @@
       .ForInPrepare(triple, feedback_slot)
       .CallRuntime(Runtime::kLoadIC_Miss, reg_0)
       .Debugger()
-      .LoadGlobal(name, 0x10000000, TypeofMode::NOT_INSIDE_TYPEOF)
       .Return();
 
   // Test iterator sees the expected output from the builder.
@@ -780,22 +765,12 @@
 
   offset -= Bytecodes::Size(Bytecode::kReturn, OperandScale::kSingle);
   EXPECT_EQ(iterator.current_bytecode(), Bytecode::kReturn);
-  EXPECT_EQ(iterator.current_index(), 23);
+  EXPECT_EQ(iterator.current_index(), 22);
   EXPECT_EQ(iterator.current_offset(), offset);
   EXPECT_EQ(iterator.current_operand_scale(), OperandScale::kSingle);
   ASSERT_TRUE(iterator.IsValid());
   --iterator;
 
-  offset -= Bytecodes::Size(Bytecode::kLdaGlobal, OperandScale::kQuadruple) +
-            kPrefixByteSize;
-  EXPECT_EQ(iterator.current_bytecode(), Bytecode::kLdaGlobal);
-  EXPECT_EQ(iterator.current_index(), 22);
-  EXPECT_EQ(iterator.current_offset(), offset);
-  EXPECT_EQ(iterator.current_operand_scale(), OperandScale::kQuadruple);
-  EXPECT_EQ(iterator.current_bytecode_size(), 10);
-  EXPECT_EQ(iterator.GetIndexOperand(1), 0x10000000u);
-  --iterator;
-
   offset -= Bytecodes::Size(Bytecode::kDebugger, OperandScale::kSingle);
   EXPECT_EQ(iterator.current_bytecode(), Bytecode::kDebugger);
   EXPECT_EQ(iterator.current_index(), 21);
@@ -991,8 +966,7 @@
   EXPECT_EQ(iterator.current_index(), 2);
   EXPECT_EQ(iterator.current_offset(), offset);
   EXPECT_EQ(iterator.current_operand_scale(), OperandScale::kSingle);
-  EXPECT_TRUE(iterator.GetConstantForIndexOperand(0).is_identical_to(
-      heap_num_1->value()));
+  EXPECT_EQ(iterator.GetConstantForIndexOperand(0)->Number(), heap_num_1);
   ASSERT_TRUE(iterator.IsValid());
   --iterator;
 
@@ -1011,8 +985,7 @@
   EXPECT_EQ(iterator.current_index(), 0);
   EXPECT_EQ(iterator.current_offset(), offset);
   EXPECT_EQ(iterator.current_operand_scale(), OperandScale::kSingle);
-  EXPECT_TRUE(iterator.GetConstantForIndexOperand(0).is_identical_to(
-      heap_num_0->value()));
+  EXPECT_EQ(iterator.GetConstantForIndexOperand(0)->Number(), heap_num_0);
   ASSERT_TRUE(iterator.IsValid());
   --iterator;
   ASSERT_FALSE(iterator.IsValid());
diff --git a/src/v8/test/unittests/interpreter/bytecode-array-writer-unittest.cc b/src/v8/test/unittests/interpreter/bytecode-array-writer-unittest.cc
index bd8f702..e4a956a 100644
--- a/src/v8/test/unittests/interpreter/bytecode-array-writer-unittest.cc
+++ b/src/v8/test/unittests/interpreter/bytecode-array-writer-unittest.cc
@@ -22,7 +22,9 @@
 namespace v8 {
 namespace internal {
 namespace interpreter {
+namespace bytecode_array_writer_unittest {
 
+#define B(Name) static_cast<uint8_t>(Bytecode::k##Name)
 #define R(i) static_cast<uint32_t>(Register(i).ToOperand())
 
 class BytecodeArrayWriterUnittest : public TestWithIsolateAndZone {
@@ -363,6 +365,10 @@
   CHECK(source_iterator.done());
 }
 
+#undef B
+#undef R
+
+}  // namespace bytecode_array_writer_unittest
 }  // namespace interpreter
 }  // namespace internal
 }  // namespace v8
diff --git a/src/v8/test/unittests/interpreter/bytecode-decoder-unittest.cc b/src/v8/test/unittests/interpreter/bytecode-decoder-unittest.cc
index 612b96e..018263f 100644
--- a/src/v8/test/unittests/interpreter/bytecode-decoder-unittest.cc
+++ b/src/v8/test/unittests/interpreter/bytecode-decoder-unittest.cc
@@ -16,6 +16,8 @@
 namespace internal {
 namespace interpreter {
 
+#define B(Name) static_cast<uint8_t>(Bytecode::k##Name)
+
 TEST(BytecodeDecoder, DecodeBytecodeAndOperands) {
   struct BytecodesAndResult {
     const uint8_t bytecode[32];
@@ -95,6 +97,8 @@
   }
 }
 
+#undef B
+
 }  // namespace interpreter
 }  // namespace internal
 }  // namespace v8
diff --git a/src/v8/test/unittests/interpreter/bytecode-node-unittest.cc b/src/v8/test/unittests/interpreter/bytecode-node-unittest.cc
index af793eb..8b8cae5 100644
--- a/src/v8/test/unittests/interpreter/bytecode-node-unittest.cc
+++ b/src/v8/test/unittests/interpreter/bytecode-node-unittest.cc
@@ -52,7 +52,7 @@
 }
 
 TEST_F(BytecodeNodeTest, Constructor5) {
-  uint32_t operands[] = {0x71, 0xa5, 0x5a, 0xfc};
+  uint32_t operands[] = {0x71, 0xA5, 0x5A, 0xFC};
   BytecodeNode node(Bytecode::kForInNext, operands[0], operands[1], operands[2],
                     operands[3]);
   CHECK_EQ(node.operand_count(), 4);
@@ -65,7 +65,7 @@
 }
 
 TEST_F(BytecodeNodeTest, Equality) {
-  uint32_t operands[] = {0x71, 0xa5, 0x5a, 0xfc};
+  uint32_t operands[] = {0x71, 0xA5, 0x5A, 0xFC};
   BytecodeNode node(Bytecode::kForInNext, operands[0], operands[1], operands[2],
                     operands[3]);
   CHECK_EQ(node, node);
@@ -75,7 +75,7 @@
 }
 
 TEST_F(BytecodeNodeTest, EqualityWithSourceInfo) {
-  uint32_t operands[] = {0x71, 0xa5, 0x5a, 0xfc};
+  uint32_t operands[] = {0x71, 0xA5, 0x5A, 0xFC};
   BytecodeSourceInfo first_source_info(3, true);
   BytecodeNode node(Bytecode::kForInNext, operands[0], operands[1], operands[2],
                     operands[3], first_source_info);
@@ -87,7 +87,7 @@
 }
 
 TEST_F(BytecodeNodeTest, NoEqualityWithDifferentSourceInfo) {
-  uint32_t operands[] = {0x71, 0xa5, 0x5a, 0xfc};
+  uint32_t operands[] = {0x71, 0xA5, 0x5A, 0xFC};
   BytecodeSourceInfo source_info(77, true);
   BytecodeNode node(Bytecode::kForInNext, operands[0], operands[1], operands[2],
                     operands[3], source_info);
diff --git a/src/v8/test/unittests/interpreter/bytecode-register-optimizer-unittest.cc b/src/v8/test/unittests/interpreter/bytecode-register-optimizer-unittest.cc
index 8c7b363..9e3ceb1 100644
--- a/src/v8/test/unittests/interpreter/bytecode-register-optimizer-unittest.cc
+++ b/src/v8/test/unittests/interpreter/bytecode-register-optimizer-unittest.cc
@@ -6,6 +6,7 @@
 
 #include "src/interpreter/bytecode-label.h"
 #include "src/interpreter/bytecode-register-optimizer.h"
+#include "test/unittests/interpreter/bytecode-utils.h"
 #include "test/unittests/test-utils.h"
 
 namespace v8 {
@@ -169,8 +170,8 @@
   CHECK_EQ(write_count(), 0u);
 
   Register reg = optimizer()->GetInputRegister(temp0);
-  RegisterList reg_list =
-      optimizer()->GetInputRegisterList(RegisterList(temp0.index(), 1));
+  RegisterList reg_list = optimizer()->GetInputRegisterList(
+      BytecodeUtils::NewRegisterList(temp0.index(), 1));
   CHECK_EQ(write_count(), 0u);
   CHECK_EQ(parameter.index(), reg.index());
   CHECK_EQ(parameter.index(), reg_list.first_register().index());
@@ -189,8 +190,8 @@
 
   optimizer()
       ->PrepareForBytecode<Bytecode::kCallJSRuntime, AccumulatorUse::kWrite>();
-  RegisterList reg_list =
-      optimizer()->GetInputRegisterList(RegisterList(temp0.index(), 2));
+  RegisterList reg_list = optimizer()->GetInputRegisterList(
+      BytecodeUtils::NewRegisterList(temp0.index(), 2));
   CHECK_EQ(temp0.index(), reg_list.first_register().index());
   CHECK_EQ(2, reg_list.register_count());
   CHECK_EQ(write_count(), 2u);
diff --git a/src/v8/test/unittests/interpreter/bytecode-utils.h b/src/v8/test/unittests/interpreter/bytecode-utils.h
index fffb719..4018845 100644
--- a/src/v8/test/unittests/interpreter/bytecode-utils.h
+++ b/src/v8/test/unittests/interpreter/bytecode-utils.h
@@ -6,6 +6,11 @@
 #define V8_UNITTESTS_INTERPRETER_BYTECODE_UTILS_H_
 
 #include "src/frames.h"
+#include "src/interpreter/bytecode-register.h"
+
+namespace v8 {
+namespace internal {
+namespace interpreter {
 
 #if V8_TARGET_LITTLE_ENDIAN
 
@@ -27,11 +32,25 @@
 #endif
 
 #define U8(i) static_cast<uint8_t>(i)
-#define B(Name) static_cast<uint8_t>(Bytecode::k##Name)
 #define REG_OPERAND(i) \
   (InterpreterFrameConstants::kRegisterFileFromFp / kPointerSize - (i))
 #define R8(i) static_cast<uint8_t>(REG_OPERAND(i))
 #define R16(i) U16(REG_OPERAND(i))
 #define R32(i) U32(REG_OPERAND(i))
 
+class BytecodeUtils {
+ public:
+  // Expose raw RegisterList construction to tests.
+  static RegisterList NewRegisterList(int first_reg_index, int register_count) {
+    return RegisterList(first_reg_index, register_count);
+  }
+
+ private:
+  DISALLOW_IMPLICIT_CONSTRUCTORS(BytecodeUtils);
+};
+
+}  // namespace interpreter
+}  // namespace internal
+}  // namespace v8
+
 #endif  // V8_UNITTESTS_INTERPRETER_BYTECODE_UTILS_H_
diff --git a/src/v8/test/unittests/interpreter/bytecodes-unittest.cc b/src/v8/test/unittests/interpreter/bytecodes-unittest.cc
index cfcdf6c..ce6ba81 100644
--- a/src/v8/test/unittests/interpreter/bytecodes-unittest.cc
+++ b/src/v8/test/unittests/interpreter/bytecodes-unittest.cc
@@ -134,70 +134,72 @@
 }
 
 TEST(Bytecodes, ScaleForSignedOperand) {
-  CHECK(Bytecodes::ScaleForSignedOperand(0) == OperandScale::kSingle);
-  CHECK(Bytecodes::ScaleForSignedOperand(kMaxInt8) == OperandScale::kSingle);
-  CHECK(Bytecodes::ScaleForSignedOperand(kMinInt8) == OperandScale::kSingle);
-  CHECK(Bytecodes::ScaleForSignedOperand(kMaxInt8 + 1) ==
-        OperandScale::kDouble);
-  CHECK(Bytecodes::ScaleForSignedOperand(kMinInt8 - 1) ==
-        OperandScale::kDouble);
-  CHECK(Bytecodes::ScaleForSignedOperand(kMaxInt16) == OperandScale::kDouble);
-  CHECK(Bytecodes::ScaleForSignedOperand(kMinInt16) == OperandScale::kDouble);
-  CHECK(Bytecodes::ScaleForSignedOperand(kMaxInt16 + 1) ==
-        OperandScale::kQuadruple);
-  CHECK(Bytecodes::ScaleForSignedOperand(kMinInt16 - 1) ==
-        OperandScale::kQuadruple);
-  CHECK(Bytecodes::ScaleForSignedOperand(kMaxInt) == OperandScale::kQuadruple);
-  CHECK(Bytecodes::ScaleForSignedOperand(kMinInt) == OperandScale::kQuadruple);
+  CHECK_EQ(Bytecodes::ScaleForSignedOperand(0), OperandScale::kSingle);
+  CHECK_EQ(Bytecodes::ScaleForSignedOperand(kMaxInt8), OperandScale::kSingle);
+  CHECK_EQ(Bytecodes::ScaleForSignedOperand(kMinInt8), OperandScale::kSingle);
+  CHECK_EQ(Bytecodes::ScaleForSignedOperand(kMaxInt8 + 1),
+           OperandScale::kDouble);
+  CHECK_EQ(Bytecodes::ScaleForSignedOperand(kMinInt8 - 1),
+           OperandScale::kDouble);
+  CHECK_EQ(Bytecodes::ScaleForSignedOperand(kMaxInt16), OperandScale::kDouble);
+  CHECK_EQ(Bytecodes::ScaleForSignedOperand(kMinInt16), OperandScale::kDouble);
+  CHECK_EQ(Bytecodes::ScaleForSignedOperand(kMaxInt16 + 1),
+           OperandScale::kQuadruple);
+  CHECK_EQ(Bytecodes::ScaleForSignedOperand(kMinInt16 - 1),
+           OperandScale::kQuadruple);
+  CHECK_EQ(Bytecodes::ScaleForSignedOperand(kMaxInt), OperandScale::kQuadruple);
+  CHECK_EQ(Bytecodes::ScaleForSignedOperand(kMinInt), OperandScale::kQuadruple);
 }
 
 TEST(Bytecodes, ScaleForUnsignedOperands) {
   // int overloads
-  CHECK(Bytecodes::ScaleForUnsignedOperand(0) == OperandScale::kSingle);
-  CHECK(Bytecodes::ScaleForUnsignedOperand(kMaxUInt8) == OperandScale::kSingle);
-  CHECK(Bytecodes::ScaleForUnsignedOperand(kMaxUInt8 + 1) ==
-        OperandScale::kDouble);
-  CHECK(Bytecodes::ScaleForUnsignedOperand(kMaxUInt16) ==
-        OperandScale::kDouble);
-  CHECK(Bytecodes::ScaleForUnsignedOperand(kMaxUInt16 + 1) ==
-        OperandScale::kQuadruple);
+  CHECK_EQ(Bytecodes::ScaleForUnsignedOperand(0), OperandScale::kSingle);
+  CHECK_EQ(Bytecodes::ScaleForUnsignedOperand(kMaxUInt8),
+           OperandScale::kSingle);
+  CHECK_EQ(Bytecodes::ScaleForUnsignedOperand(kMaxUInt8 + 1),
+           OperandScale::kDouble);
+  CHECK_EQ(Bytecodes::ScaleForUnsignedOperand(kMaxUInt16),
+           OperandScale::kDouble);
+  CHECK_EQ(Bytecodes::ScaleForUnsignedOperand(kMaxUInt16 + 1),
+           OperandScale::kQuadruple);
   // size_t overloads
-  CHECK(Bytecodes::ScaleForUnsignedOperand(static_cast<size_t>(0)) ==
-        OperandScale::kSingle);
-  CHECK(Bytecodes::ScaleForUnsignedOperand(static_cast<size_t>(kMaxUInt8)) ==
-        OperandScale::kSingle);
+  CHECK_EQ(Bytecodes::ScaleForUnsignedOperand(static_cast<size_t>(0)),
+           OperandScale::kSingle);
+  CHECK_EQ(Bytecodes::ScaleForUnsignedOperand(static_cast<size_t>(kMaxUInt8)),
+           OperandScale::kSingle);
   CHECK(Bytecodes::ScaleForUnsignedOperand(
             static_cast<size_t>(kMaxUInt8 + 1)) == OperandScale::kDouble);
-  CHECK(Bytecodes::ScaleForUnsignedOperand(static_cast<size_t>(kMaxUInt16)) ==
-        OperandScale::kDouble);
+  CHECK_EQ(Bytecodes::ScaleForUnsignedOperand(static_cast<size_t>(kMaxUInt16)),
+           OperandScale::kDouble);
   CHECK(Bytecodes::ScaleForUnsignedOperand(
             static_cast<size_t>(kMaxUInt16 + 1)) == OperandScale::kQuadruple);
-  CHECK(Bytecodes::ScaleForUnsignedOperand(static_cast<size_t>(kMaxUInt32)) ==
-        OperandScale::kQuadruple);
+  CHECK_EQ(Bytecodes::ScaleForUnsignedOperand(static_cast<size_t>(kMaxUInt32)),
+           OperandScale::kQuadruple);
 }
 
 TEST(Bytecodes, SizesForUnsignedOperands) {
   // int overloads
-  CHECK(Bytecodes::SizeForUnsignedOperand(0) == OperandSize::kByte);
-  CHECK(Bytecodes::SizeForUnsignedOperand(kMaxUInt8) == OperandSize::kByte);
-  CHECK(Bytecodes::SizeForUnsignedOperand(kMaxUInt8 + 1) ==
-        OperandSize::kShort);
-  CHECK(Bytecodes::SizeForUnsignedOperand(kMaxUInt16) == OperandSize::kShort);
-  CHECK(Bytecodes::SizeForUnsignedOperand(kMaxUInt16 + 1) ==
-        OperandSize::kQuad);
+  CHECK_EQ(Bytecodes::SizeForUnsignedOperand(0), OperandSize::kByte);
+  CHECK_EQ(Bytecodes::SizeForUnsignedOperand(kMaxUInt8), OperandSize::kByte);
+  CHECK_EQ(Bytecodes::SizeForUnsignedOperand(kMaxUInt8 + 1),
+           OperandSize::kShort);
+  CHECK_EQ(Bytecodes::SizeForUnsignedOperand(kMaxUInt16), OperandSize::kShort);
+  CHECK_EQ(Bytecodes::SizeForUnsignedOperand(kMaxUInt16 + 1),
+           OperandSize::kQuad);
   // size_t overloads
-  CHECK(Bytecodes::SizeForUnsignedOperand(static_cast<size_t>(0)) ==
-        OperandSize::kByte);
-  CHECK(Bytecodes::SizeForUnsignedOperand(static_cast<size_t>(kMaxUInt8)) ==
-        OperandSize::kByte);
-  CHECK(Bytecodes::SizeForUnsignedOperand(static_cast<size_t>(kMaxUInt8 + 1)) ==
-        OperandSize::kShort);
-  CHECK(Bytecodes::SizeForUnsignedOperand(static_cast<size_t>(kMaxUInt16)) ==
-        OperandSize::kShort);
+  CHECK_EQ(Bytecodes::SizeForUnsignedOperand(static_cast<size_t>(0)),
+           OperandSize::kByte);
+  CHECK_EQ(Bytecodes::SizeForUnsignedOperand(static_cast<size_t>(kMaxUInt8)),
+           OperandSize::kByte);
+  CHECK_EQ(
+      Bytecodes::SizeForUnsignedOperand(static_cast<size_t>(kMaxUInt8 + 1)),
+      OperandSize::kShort);
+  CHECK_EQ(Bytecodes::SizeForUnsignedOperand(static_cast<size_t>(kMaxUInt16)),
+           OperandSize::kShort);
   CHECK(Bytecodes::SizeForUnsignedOperand(
             static_cast<size_t>(kMaxUInt16 + 1)) == OperandSize::kQuad);
-  CHECK(Bytecodes::SizeForUnsignedOperand(static_cast<size_t>(kMaxUInt32)) ==
-        OperandSize::kQuad);
+  CHECK_EQ(Bytecodes::SizeForUnsignedOperand(static_cast<size_t>(kMaxUInt32)),
+           OperandSize::kQuad);
 }
 
 // Helper macros to generate a check for if a bytecode is in a macro list of
@@ -325,10 +327,10 @@
   CHECK(Bytecodes::OperandScaleRequiresPrefixBytecode(OperandScale::kDouble));
   CHECK(
       Bytecodes::OperandScaleRequiresPrefixBytecode(OperandScale::kQuadruple));
-  CHECK(Bytecodes::OperandScaleToPrefixBytecode(OperandScale::kDouble) ==
-        Bytecode::kWide);
-  CHECK(Bytecodes::OperandScaleToPrefixBytecode(OperandScale::kQuadruple) ==
-        Bytecode::kExtraWide);
+  CHECK_EQ(Bytecodes::OperandScaleToPrefixBytecode(OperandScale::kDouble),
+           Bytecode::kWide);
+  CHECK_EQ(Bytecodes::OperandScaleToPrefixBytecode(OperandScale::kQuadruple),
+           Bytecode::kExtraWide);
 }
 
 TEST(AccumulatorUse, LogicalOperators) {
diff --git a/src/v8/test/unittests/interpreter/constant-array-builder-unittest.cc b/src/v8/test/unittests/interpreter/constant-array-builder-unittest.cc
index 027fa95..5c1bfe1 100644
--- a/src/v8/test/unittests/interpreter/constant-array-builder-unittest.cc
+++ b/src/v8/test/unittests/interpreter/constant-array-builder-unittest.cc
@@ -36,7 +36,7 @@
   AstValueFactory ast_factory(zone(), isolate()->ast_string_constants(),
                               isolate()->heap()->HashSeed());
   for (size_t i = 0; i < k16BitCapacity; i++) {
-    builder.Insert(ast_factory.NewNumber(i + 0.5));
+    builder.Insert(i + 0.5);
   }
   CHECK_EQ(builder.size(), k16BitCapacity);
   ast_factory.Internalize(isolate());
@@ -51,44 +51,32 @@
 TEST_F(ConstantArrayBuilderTest, ToFixedArray) {
   CanonicalHandleScope canonical(isolate());
   ConstantArrayBuilder builder(zone());
-  AstValueFactory ast_factory(zone(), isolate()->ast_string_constants(),
-                              isolate()->heap()->HashSeed());
-  static const size_t kNumberOfElements = 37;
-  for (size_t i = 0; i < kNumberOfElements; i++) {
-    const AstValue* value = ast_factory.NewNumber(i + 0.5);
-    builder.Insert(value);
-    ast_factory.Internalize(isolate());
-    CHECK(
-        builder.At(i, isolate()).ToHandleChecked()->SameValue(*value->value()));
+  static const int kNumberOfElements = 37;
+  for (int i = 0; i < kNumberOfElements; i++) {
+    builder.Insert(i + 0.5);
   }
-  ast_factory.Internalize(isolate());
   Handle<FixedArray> constant_array = builder.ToFixedArray(isolate());
-  CHECK_EQ(constant_array->length(), static_cast<int>(kNumberOfElements));
-  for (size_t i = 0; i < kNumberOfElements; i++) {
-    CHECK(constant_array->get(static_cast<int>(i))
-              ->SameValue(*builder.At(i, isolate()).ToHandleChecked()));
+  ASSERT_EQ(kNumberOfElements, constant_array->length());
+  for (int i = 0; i < kNumberOfElements; i++) {
+    Handle<Object> actual(constant_array->get(i), isolate());
+    Handle<Object> expected = builder.At(i, isolate()).ToHandleChecked();
+    ASSERT_EQ(expected->Number(), actual->Number()) << "Failure at index " << i;
   }
 }
 
 TEST_F(ConstantArrayBuilderTest, ToLargeFixedArray) {
   CanonicalHandleScope canonical(isolate());
   ConstantArrayBuilder builder(zone());
-  AstValueFactory ast_factory(zone(), isolate()->ast_string_constants(),
-                              isolate()->heap()->HashSeed());
-  static const size_t kNumberOfElements = 37373;
-  for (size_t i = 0; i < kNumberOfElements; i++) {
-    const AstValue* value = ast_factory.NewNumber(i + 0.5);
-    builder.Insert(value);
-    ast_factory.Internalize(isolate());
-    CHECK(
-        builder.At(i, isolate()).ToHandleChecked()->SameValue(*value->value()));
+  static const int kNumberOfElements = 37373;
+  for (int i = 0; i < kNumberOfElements; i++) {
+    builder.Insert(i + 0.5);
   }
-  ast_factory.Internalize(isolate());
   Handle<FixedArray> constant_array = builder.ToFixedArray(isolate());
-  CHECK_EQ(constant_array->length(), static_cast<int>(kNumberOfElements));
-  for (size_t i = 0; i < kNumberOfElements; i++) {
-    CHECK(constant_array->get(static_cast<int>(i))
-              ->SameValue(*builder.At(i, isolate()).ToHandleChecked()));
+  ASSERT_EQ(kNumberOfElements, constant_array->length());
+  for (int i = 0; i < kNumberOfElements; i++) {
+    Handle<Object> actual(constant_array->get(i), isolate());
+    Handle<Object> expected = builder.At(i, isolate()).ToHandleChecked();
+    ASSERT_EQ(expected->Number(), actual->Number()) << "Failure at index " << i;
   }
 }
 
@@ -97,17 +85,17 @@
   ConstantArrayBuilder builder(zone());
   AstValueFactory ast_factory(zone(), isolate()->ast_string_constants(),
                               isolate()->heap()->HashSeed());
-  static const size_t kNumberOfElements = 37373;
-  for (size_t i = 0; i < kNumberOfElements; i++) {
-    builder.CommitReservedEntry(builder.CreateReservedEntry(),
-                                Smi::FromInt(static_cast<int>(i)));
+  static const int kNumberOfElements = 37373;
+  for (int i = 0; i < kNumberOfElements; i++) {
+    builder.CommitReservedEntry(builder.CreateReservedEntry(), Smi::FromInt(i));
   }
   ast_factory.Internalize(isolate());
   Handle<FixedArray> constant_array = builder.ToFixedArray(isolate());
-  CHECK_EQ(constant_array->length(), static_cast<int>(kNumberOfElements));
-  for (size_t i = 0; i < kNumberOfElements; i++) {
-    CHECK(constant_array->get(static_cast<int>(i))
-              ->SameValue(*builder.At(i, isolate()).ToHandleChecked()));
+  ASSERT_EQ(kNumberOfElements, constant_array->length());
+  for (int i = 0; i < kNumberOfElements; i++) {
+    Handle<Object> actual(constant_array->get(i), isolate());
+    Handle<Object> expected = builder.At(i, isolate()).ToHandleChecked();
+    ASSERT_EQ(expected->Number(), actual->Number()) << "Failure at index " << i;
   }
 }
 
@@ -119,7 +107,7 @@
                                 isolate()->heap()->HashSeed());
     for (size_t i = 0; i < reserved; i++) {
       OperandSize operand_size = builder.CreateReservedEntry();
-      CHECK(operand_size == OperandSize::kByte);
+      CHECK_EQ(operand_size, OperandSize::kByte);
     }
     for (size_t i = 0; i < 2 * k8BitCapacity; i++) {
       builder.CommitReservedEntry(builder.CreateReservedEntry(),
@@ -147,7 +135,7 @@
     // Now make reservations, and commit them with unique entries.
     for (size_t i = 0; i < duplicates_in_idx8_space; i++) {
       OperandSize operand_size = builder.CreateReservedEntry();
-      CHECK(operand_size == OperandSize::kByte);
+      CHECK_EQ(operand_size, OperandSize::kByte);
     }
     for (size_t i = 0; i < duplicates_in_idx8_space; i++) {
       Smi* value = Smi::FromInt(static_cast<int>(2 * k8BitCapacity + i));
@@ -192,7 +180,7 @@
     }
     for (size_t i = 0; i < reserved; i++) {
       OperandSize operand_size = builder.CreateReservedEntry();
-      CHECK(operand_size == OperandSize::kShort);
+      CHECK_EQ(operand_size, OperandSize::kShort);
       CHECK_EQ(builder.size(), k8BitCapacity);
     }
     for (size_t i = 0; i < reserved; i++) {
@@ -201,14 +189,14 @@
     }
     for (size_t i = 0; i < reserved; i++) {
       OperandSize operand_size = builder.CreateReservedEntry();
-      CHECK(operand_size == OperandSize::kShort);
+      CHECK_EQ(operand_size, OperandSize::kShort);
       builder.CommitReservedEntry(operand_size,
                                   Smi::FromInt(static_cast<int>(i)));
       CHECK_EQ(builder.size(), k8BitCapacity);
     }
     for (size_t i = k8BitCapacity; i < k8BitCapacity + reserved; i++) {
       OperandSize operand_size = builder.CreateReservedEntry();
-      CHECK(operand_size == OperandSize::kShort);
+      CHECK_EQ(operand_size, OperandSize::kShort);
       builder.CommitReservedEntry(operand_size,
                                   Smi::FromInt(static_cast<int>(i)));
       CHECK_EQ(builder.size(), i + 1);
@@ -232,7 +220,7 @@
                               isolate()->heap()->HashSeed());
   for (size_t i = 0; i < k8BitCapacity; i++) {
     OperandSize operand_size = builder.CreateReservedEntry();
-    CHECK(OperandSize::kByte == operand_size);
+    CHECK_EQ(OperandSize::kByte, operand_size);
     CHECK_EQ(builder.size(), 0u);
   }
   for (size_t i = 0; i < k8BitCapacity; i++) {
@@ -260,28 +248,25 @@
 TEST_F(ConstantArrayBuilderTest, GapNotFilledWhenLowReservationDiscarded) {
   CanonicalHandleScope canonical(isolate());
   ConstantArrayBuilder builder(zone());
-  AstValueFactory ast_factory(zone(), isolate()->ast_string_constants(),
-                              isolate()->heap()->HashSeed());
   for (size_t i = 0; i < k8BitCapacity; i++) {
     OperandSize operand_size = builder.CreateReservedEntry();
-    CHECK(OperandSize::kByte == operand_size);
+    CHECK_EQ(OperandSize::kByte, operand_size);
     CHECK_EQ(builder.size(), 0u);
   }
-  const AstValue* ast_values[k8BitCapacity];
+  double values[k8BitCapacity];
   for (size_t i = 0; i < k8BitCapacity; i++) {
-    ast_values[i] = ast_factory.NewNumber(i + 0.5);
+    values[i] = i + 0.5;
   }
 
   for (size_t i = 0; i < k8BitCapacity; i++) {
-    builder.Insert(ast_values[i]);
+    builder.Insert(values[i]);
     CHECK_EQ(builder.size(), i + k8BitCapacity + 1);
   }
   for (size_t i = 0; i < k8BitCapacity; i++) {
     builder.DiscardReservedEntry(OperandSize::kByte);
-    builder.Insert(ast_values[i]);
+    builder.Insert(values[i]);
     CHECK_EQ(builder.size(), 2 * k8BitCapacity);
   }
-  ast_factory.Internalize(isolate());
   for (size_t i = 0; i < k8BitCapacity; i++) {
     Handle<Object> reference = isolate()->factory()->NewNumber(i + 0.5);
     Handle<Object> original =
@@ -304,12 +289,10 @@
   }
   // Values are placed before the reserved entries in the same slice.
   for (int i = 0; i < k8BitCapacity - kNumberOfHoles; ++i) {
-    CHECK_EQ(builder.Insert(ast_factory.NewNumber(i + 0.5)),
-             static_cast<size_t>(i));
+    CHECK_EQ(builder.Insert(i + 0.5), static_cast<size_t>(i));
   }
   // The next value is pushed into the next slice.
-  CHECK_EQ(builder.Insert(ast_factory.NewNumber(k8BitCapacity + 0.5)),
-           k8BitCapacity);
+  CHECK_EQ(builder.Insert(k8BitCapacity + 0.5), k8BitCapacity);
 
   // Discard the reserved entries.
   for (int i = 0; i < kNumberOfHoles; ++i) {
diff --git a/src/v8/test/unittests/interpreter/interpreter-assembler-unittest.cc b/src/v8/test/unittests/interpreter/interpreter-assembler-unittest.cc
index 2c3f182..03d9397 100644
--- a/src/v8/test/unittests/interpreter/interpreter-assembler-unittest.cc
+++ b/src/v8/test/unittests/interpreter/interpreter-assembler-unittest.cc
@@ -20,6 +20,7 @@
 namespace v8 {
 namespace internal {
 namespace interpreter {
+namespace interpreter_assembler_unittest {
 
 InterpreterAssemblerTestState::InterpreterAssemblerTestState(
     InterpreterAssemblerTest* test, Bytecode bytecode)
@@ -416,7 +417,7 @@
   TRACED_FOREACH(interpreter::Bytecode, bytecode, kBytecodes) {
     InterpreterAssemblerTestState state(this, bytecode);
     InterpreterAssemblerForTest m(&state, bytecode);
-    Node* store_value = m.Int32Constant(0xdeadbeef);
+    Node* store_value = m.Int32Constant(0xDEADBEEF);
     Node* reg_index_node = m.Parameter(0);
     Node* store_reg_node = m.StoreRegister(store_value, reg_index_node);
     EXPECT_THAT(store_reg_node,
@@ -470,7 +471,7 @@
   TRACED_FOREACH(interpreter::Bytecode, bytecode, kBytecodes) {
     InterpreterAssemblerTestState state(this, bytecode);
     InterpreterAssemblerForTest m(&state, bytecode);
-    Node* object = m.IntPtrConstant(0xdeadbeef);
+    Node* object = m.IntPtrConstant(0xDEADBEEF);
     int offset = 16;
     Node* load_field = m.LoadObjectField(object, offset);
     EXPECT_THAT(load_field,
@@ -548,6 +549,7 @@
   }
 }
 
+}  // namespace interpreter_assembler_unittest
 }  // namespace interpreter
 }  // namespace internal
 }  // namespace v8
diff --git a/src/v8/test/unittests/interpreter/interpreter-assembler-unittest.h b/src/v8/test/unittests/interpreter/interpreter-assembler-unittest.h
index 210a201..589d0c8 100644
--- a/src/v8/test/unittests/interpreter/interpreter-assembler-unittest.h
+++ b/src/v8/test/unittests/interpreter/interpreter-assembler-unittest.h
@@ -14,6 +14,7 @@
 namespace v8 {
 namespace internal {
 namespace interpreter {
+namespace interpreter_assembler_unittest {
 
 using ::testing::Matcher;
 
@@ -65,6 +66,7 @@
   };
 };
 
+}  // namespace interpreter_assembler_unittest
 }  // namespace interpreter
 }  // namespace internal
 }  // namespace v8
diff --git a/src/v8/test/unittests/libplatform/default-platform-unittest.cc b/src/v8/test/unittests/libplatform/default-platform-unittest.cc
index f9b3e0b..17f1a34 100644
--- a/src/v8/test/unittests/libplatform/default-platform-unittest.cc
+++ b/src/v8/test/unittests/libplatform/default-platform-unittest.cc
@@ -3,6 +3,7 @@
 // found in the LICENSE file.
 
 #include "src/libplatform/default-platform.h"
+#include "src/base/platform/semaphore.h"
 #include "src/base/platform/time.h"
 #include "testing/gmock/include/gmock/gmock.h"
 
@@ -30,17 +31,18 @@
 class DefaultPlatformWithMockTime : public DefaultPlatform {
  public:
   DefaultPlatformWithMockTime()
-      : DefaultPlatform(IdleTaskSupport::kEnabled), time_(0) {}
-  double MonotonicallyIncreasingTime() override { return time_; }
-  double CurrentClockTimeMillis() override {
-    return time_ * base::Time::kMillisecondsPerSecond;
+      : DefaultPlatform(IdleTaskSupport::kEnabled, nullptr) {
+    mock_time_ = 0.0;
+    SetTimeFunctionForTesting([]() { return mock_time_; });
   }
-  void IncreaseTime(double seconds) { time_ += seconds; }
+  void IncreaseTime(double seconds) { mock_time_ += seconds; }
 
  private:
-  double time_;
+  static double mock_time_;
 };
 
+double DefaultPlatformWithMockTime::mock_time_ = 0.0;
+
 }  // namespace
 
 
@@ -61,6 +63,24 @@
   EXPECT_FALSE(platform.PumpMessageLoop(isolate));
 }
 
+TEST(DefaultPlatformTest, PumpMessageLoopWithTaskRunner) {
+  InSequence s;
+
+  int dummy;
+  Isolate* isolate = reinterpret_cast<Isolate*>(&dummy);
+
+  DefaultPlatform platform;
+  std::shared_ptr<TaskRunner> taskrunner =
+      platform.GetForegroundTaskRunner(isolate);
+  EXPECT_FALSE(platform.PumpMessageLoop(isolate));
+
+  StrictMock<MockTask>* task = new StrictMock<MockTask>;
+  taskrunner->PostTask(std::unique_ptr<Task>(task));
+  EXPECT_CALL(*task, Run());
+  EXPECT_CALL(*task, Die());
+  EXPECT_TRUE(platform.PumpMessageLoop(isolate));
+  EXPECT_FALSE(platform.PumpMessageLoop(isolate));
+}
 
 TEST(DefaultPlatformTest, PumpMessageLoopDelayed) {
   InSequence s;
@@ -91,6 +111,36 @@
   EXPECT_TRUE(platform.PumpMessageLoop(isolate));
 }
 
+TEST(DefaultPlatformTest, PumpMessageLoopDelayedWithTaskRunner) {
+  InSequence s;
+
+  int dummy;
+  Isolate* isolate = reinterpret_cast<Isolate*>(&dummy);
+
+  DefaultPlatformWithMockTime platform;
+  std::shared_ptr<TaskRunner> taskrunner =
+      platform.GetForegroundTaskRunner(isolate);
+  EXPECT_FALSE(platform.PumpMessageLoop(isolate));
+
+  StrictMock<MockTask>* task1 = new StrictMock<MockTask>;
+  StrictMock<MockTask>* task2 = new StrictMock<MockTask>;
+  taskrunner->PostDelayedTask(std::unique_ptr<Task>(task2), 100);
+  taskrunner->PostDelayedTask(std::unique_ptr<Task>(task1), 10);
+
+  EXPECT_FALSE(platform.PumpMessageLoop(isolate));
+
+  platform.IncreaseTime(11);
+  EXPECT_CALL(*task1, Run());
+  EXPECT_CALL(*task1, Die());
+  EXPECT_TRUE(platform.PumpMessageLoop(isolate));
+
+  EXPECT_FALSE(platform.PumpMessageLoop(isolate));
+
+  platform.IncreaseTime(90);
+  EXPECT_CALL(*task2, Run());
+  EXPECT_CALL(*task2, Die());
+  EXPECT_TRUE(platform.PumpMessageLoop(isolate));
+}
 
 TEST(DefaultPlatformTest, PumpMessageLoopNoStarvation) {
   InSequence s;
@@ -153,6 +203,24 @@
   platform.RunIdleTasks(isolate, 42.0);
 }
 
+TEST(DefaultPlatformTest, RunIdleTasksWithTaskRunner) {
+  InSequence s;
+
+  int dummy;
+  Isolate* isolate = reinterpret_cast<Isolate*>(&dummy);
+
+  DefaultPlatformWithMockTime platform;
+  std::shared_ptr<TaskRunner> taskrunner =
+      platform.GetForegroundTaskRunner(isolate);
+
+  StrictMock<MockIdleTask>* task = new StrictMock<MockIdleTask>;
+  taskrunner->PostIdleTask(std::unique_ptr<IdleTask>(task));
+  EXPECT_CALL(*task, Run(42.0 + 23.0));
+  EXPECT_CALL(*task, Die());
+  platform.IncreaseTime(23.0);
+  platform.RunIdleTasks(isolate, 42.0);
+}
+
 TEST(DefaultPlatformTest, PendingIdleTasksAreDestroyedOnShutdown) {
   InSequence s;
 
@@ -167,6 +235,88 @@
   }
 }
 
+namespace {
+
+class TestBackgroundTask : public Task {
+ public:
+  explicit TestBackgroundTask(base::Semaphore* sem, bool* executed)
+      : sem_(sem), executed_(executed) {}
+
+  virtual ~TestBackgroundTask() { Die(); }
+  MOCK_METHOD0(Die, void());
+
+  void Run() {
+    *executed_ = true;
+    sem_->Signal();
+  }
+
+ private:
+  base::Semaphore* sem_;
+  bool* executed_;
+};
+
+}  // namespace
+
+TEST(DefaultPlatformTest, RunBackgroundTask) {
+  int dummy;
+  Isolate* isolate = reinterpret_cast<Isolate*>(&dummy);
+
+  DefaultPlatform platform;
+  platform.SetThreadPoolSize(1);
+  std::shared_ptr<TaskRunner> taskrunner =
+      platform.GetBackgroundTaskRunner(isolate);
+
+  base::Semaphore sem(0);
+  bool task_executed = false;
+  StrictMock<TestBackgroundTask>* task =
+      new StrictMock<TestBackgroundTask>(&sem, &task_executed);
+  EXPECT_CALL(*task, Die());
+  taskrunner->PostTask(std::unique_ptr<Task>(task));
+  EXPECT_TRUE(sem.WaitFor(base::TimeDelta::FromSeconds(1)));
+  EXPECT_TRUE(task_executed);
+}
+
+TEST(DefaultPlatformTest, NoIdleTasksInBackground) {
+  int dummy;
+  Isolate* isolate = reinterpret_cast<Isolate*>(&dummy);
+  DefaultPlatform platform;
+  platform.SetThreadPoolSize(1);
+  std::shared_ptr<TaskRunner> taskrunner =
+      platform.GetBackgroundTaskRunner(isolate);
+  EXPECT_FALSE(taskrunner->IdleTasksEnabled());
+}
+
+TEST(DefaultPlatformTest, PostTaskAfterPlatformTermination) {
+  std::shared_ptr<TaskRunner> foreground_taskrunner;
+  std::shared_ptr<TaskRunner> background_taskrunner;
+  {
+    int dummy;
+    Isolate* isolate = reinterpret_cast<Isolate*>(&dummy);
+
+    DefaultPlatformWithMockTime platform;
+    platform.SetThreadPoolSize(1);
+    foreground_taskrunner = platform.GetForegroundTaskRunner(isolate);
+    background_taskrunner = platform.GetBackgroundTaskRunner(isolate);
+  }
+  // It should still be possible to post tasks, even when the platform does not
+  // exist anymore.
+  StrictMock<MockTask>* task1 = new StrictMock<MockTask>;
+  EXPECT_CALL(*task1, Die());
+  foreground_taskrunner->PostTask(std::unique_ptr<Task>(task1));
+
+  StrictMock<MockTask>* task2 = new StrictMock<MockTask>;
+  EXPECT_CALL(*task2, Die());
+  foreground_taskrunner->PostDelayedTask(std::unique_ptr<Task>(task2), 10);
+
+  StrictMock<MockIdleTask>* task3 = new StrictMock<MockIdleTask>;
+  EXPECT_CALL(*task3, Die());
+  foreground_taskrunner->PostIdleTask(std::unique_ptr<IdleTask>(task3));
+
+  StrictMock<MockTask>* task4 = new StrictMock<MockTask>;
+  EXPECT_CALL(*task4, Die());
+  background_taskrunner->PostTask(std::unique_ptr<Task>(task4));
+}
+
 }  // namespace default_platform_unittest
 }  // namespace platform
 }  // namespace v8
diff --git a/src/v8/test/unittests/libplatform/task-queue-unittest.cc b/src/v8/test/unittests/libplatform/task-queue-unittest.cc
index 9bb160d..4001048 100644
--- a/src/v8/test/unittests/libplatform/task-queue-unittest.cc
+++ b/src/v8/test/unittests/libplatform/task-queue-unittest.cc
@@ -38,9 +38,10 @@
 
 TEST(TaskQueueTest, Basic) {
   TaskQueue queue;
-  MockTask task;
-  queue.Append(&task);
-  EXPECT_EQ(&task, queue.GetNext());
+  std::unique_ptr<Task> task(new MockTask());
+  Task* ptr = task.get();
+  queue.Append(std::move(task));
+  EXPECT_EQ(ptr, queue.GetNext().get());
   queue.Terminate();
   EXPECT_THAT(queue.GetNext(), IsNull());
 }
diff --git a/src/v8/test/unittests/libplatform/worker-thread-unittest.cc b/src/v8/test/unittests/libplatform/worker-thread-unittest.cc
index 7079d22..a42b37a 100644
--- a/src/v8/test/unittests/libplatform/worker-thread-unittest.cc
+++ b/src/v8/test/unittests/libplatform/worker-thread-unittest.cc
@@ -32,10 +32,10 @@
   WorkerThread thread2(&queue);
 
   InSequence s;
-  StrictMock<MockTask>* task = new StrictMock<MockTask>;
-  EXPECT_CALL(*task, Run());
-  EXPECT_CALL(*task, Die());
-  queue.Append(task);
+  std::unique_ptr<StrictMock<MockTask>> task(new StrictMock<MockTask>);
+  EXPECT_CALL(*task.get(), Run());
+  EXPECT_CALL(*task.get(), Die());
+  queue.Append(std::move(task));
 
   // The next call should not time out.
   queue.BlockUntilQueueEmptyForTesting();
@@ -50,10 +50,10 @@
   TaskQueue queue;
   for (size_t i = 0; i < kNumTasks; ++i) {
     InSequence s;
-    StrictMock<MockTask>* task = new StrictMock<MockTask>;
-    EXPECT_CALL(*task, Run());
-    EXPECT_CALL(*task, Die());
-    queue.Append(task);
+    std::unique_ptr<StrictMock<MockTask>> task(new StrictMock<MockTask>);
+    EXPECT_CALL(*task.get(), Run());
+    EXPECT_CALL(*task.get(), Die());
+    queue.Append(std::move(task));
   }
 
   WorkerThread thread1(&queue);
diff --git a/src/v8/test/unittests/object-unittest.cc b/src/v8/test/unittests/object-unittest.cc
index 7f4a737..4cb113a 100644
--- a/src/v8/test/unittests/object-unittest.cc
+++ b/src/v8/test/unittests/object-unittest.cc
@@ -15,6 +15,42 @@
 namespace v8 {
 namespace internal {
 
+namespace {
+
+bool IsInStringInstanceTypeList(InstanceType instance_type) {
+  switch (instance_type) {
+#define TEST_INSTANCE_TYPE(type, ...) \
+  case InstanceType::type:            \
+    STATIC_ASSERT(InstanceType::type < InstanceType::FIRST_NONSTRING_TYPE);
+
+    STRING_TYPE_LIST(TEST_INSTANCE_TYPE)
+#undef TEST_INSTANCE_TYPE
+    return true;
+    default:
+      EXPECT_LE(InstanceType::FIRST_NONSTRING_TYPE, instance_type);
+      return false;
+  }
+}
+
+void CheckOneInstanceType(InstanceType instance_type) {
+  if (IsInStringInstanceTypeList(instance_type)) {
+    EXPECT_TRUE((instance_type & kIsNotStringMask) == kStringTag)
+        << "Failing IsString mask check for " << instance_type;
+  } else {
+    EXPECT_FALSE((instance_type & kIsNotStringMask) == kStringTag)
+        << "Failing !IsString mask check for " << instance_type;
+  }
+}
+
+}  // namespace
+
+TEST(Object, InstanceTypeList) {
+#define TEST_INSTANCE_TYPE(type) CheckOneInstanceType(InstanceType::type);
+
+  INSTANCE_TYPE_LIST(TEST_INSTANCE_TYPE)
+#undef TEST_INSTANCE_TYPE
+}
+
 TEST(Object, InstanceTypeListOrder) {
   int current = 0;
   int last = -1;
@@ -25,7 +61,7 @@
   current_type = InstanceType::type;                                       \
   current = static_cast<int>(current_type);                                \
   if (current > static_cast<int>(LAST_NAME_TYPE)) {                        \
-    EXPECT_EQ(last + 1, current);                                          \
+    EXPECT_LE(last + 1, current);                                          \
   }                                                                        \
   EXPECT_LT(last, current) << " INSTANCE_TYPE_LIST is not ordered: "       \
                            << "last = " << static_cast<InstanceType>(last) \
@@ -37,7 +73,7 @@
 }
 
 TEST(Object, StructListOrder) {
-  int current = static_cast<int>(InstanceType::ACCESSOR_INFO_TYPE);
+  int current = static_cast<int>(InstanceType::ACCESS_CHECK_INFO_TYPE);
   int last = current - 1;
   ASSERT_LT(0, last);
   InstanceType current_type = static_cast<InstanceType>(current);
@@ -57,8 +93,7 @@
 typedef TestWithIsolate ObjectWithIsolate;
 
 TEST_F(ObjectWithIsolate, DictionaryGrowth) {
-  Handle<SeededNumberDictionary> dict =
-      SeededNumberDictionary::New(isolate(), 1);
+  Handle<NumberDictionary> dict = NumberDictionary::New(isolate(), 1);
   Handle<Object> value = isolate()->factory()->null_value();
   PropertyDetails details = PropertyDetails::Empty();
 
@@ -68,48 +103,48 @@
   uint32_t i = 1;
   // 3 elements fit into the initial capacity.
   for (; i <= 3; i++) {
-    dict = SeededNumberDictionary::Add(dict, i, value, details);
+    dict = NumberDictionary::Add(dict, i, value, details);
     CHECK_EQ(4, dict->Capacity());
   }
   // 4th element triggers growth.
   DCHECK_EQ(4, i);
   for (; i <= 5; i++) {
-    dict = SeededNumberDictionary::Add(dict, i, value, details);
+    dict = NumberDictionary::Add(dict, i, value, details);
     CHECK_EQ(8, dict->Capacity());
   }
   // 6th element triggers growth.
   DCHECK_EQ(6, i);
   for (; i <= 11; i++) {
-    dict = SeededNumberDictionary::Add(dict, i, value, details);
+    dict = NumberDictionary::Add(dict, i, value, details);
     CHECK_EQ(16, dict->Capacity());
   }
   // 12th element triggers growth.
   DCHECK_EQ(12, i);
   for (; i <= 21; i++) {
-    dict = SeededNumberDictionary::Add(dict, i, value, details);
+    dict = NumberDictionary::Add(dict, i, value, details);
     CHECK_EQ(32, dict->Capacity());
   }
   // 22nd element triggers growth.
   DCHECK_EQ(22, i);
   for (; i <= 43; i++) {
-    dict = SeededNumberDictionary::Add(dict, i, value, details);
+    dict = NumberDictionary::Add(dict, i, value, details);
     CHECK_EQ(64, dict->Capacity());
   }
   // 44th element triggers growth.
   DCHECK_EQ(44, i);
   for (; i <= 50; i++) {
-    dict = SeededNumberDictionary::Add(dict, i, value, details);
+    dict = NumberDictionary::Add(dict, i, value, details);
     CHECK_EQ(128, dict->Capacity());
   }
 
   // If we grow by larger chunks, the next (sufficiently big) power of 2 is
   // chosen as the capacity.
-  dict = SeededNumberDictionary::New(isolate(), 1);
-  dict = SeededNumberDictionary::EnsureCapacity(dict, 65);
+  dict = NumberDictionary::New(isolate(), 1);
+  dict = NumberDictionary::EnsureCapacity(dict, 65);
   CHECK_EQ(128, dict->Capacity());
 
-  dict = SeededNumberDictionary::New(isolate(), 1);
-  dict = SeededNumberDictionary::EnsureCapacity(dict, 30);
+  dict = NumberDictionary::New(isolate(), 1);
+  dict = NumberDictionary::EnsureCapacity(dict, 30);
   CHECK_EQ(64, dict->Capacity());
 }
 
diff --git a/src/v8/test/unittests/parser/ast-value-unittest.cc b/src/v8/test/unittests/parser/ast-value-unittest.cc
new file mode 100644
index 0000000..72e35a4
--- /dev/null
+++ b/src/v8/test/unittests/parser/ast-value-unittest.cc
@@ -0,0 +1,51 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "src/ast/ast-value-factory.h"
+#include "src/ast/ast.h"
+#include "src/heap/heap-inl.h"
+#include "src/isolate-inl.h"
+#include "src/zone/zone.h"
+#include "test/unittests/test-utils.h"
+#include "testing/gtest/include/gtest/gtest.h"
+
+namespace v8 {
+namespace internal {
+
+class AstValueTest : public TestWithIsolateAndZone {
+ protected:
+  AstValueTest()
+      : ast_value_factory_(zone(), i_isolate()->ast_string_constants(),
+                           i_isolate()->heap()->HashSeed()),
+        ast_node_factory_(&ast_value_factory_, zone()) {}
+
+  Literal* NewBigInt(const char* str) {
+    return ast_node_factory_.NewBigIntLiteral(AstBigInt(str),
+                                              kNoSourcePosition);
+  }
+
+  AstValueFactory ast_value_factory_;
+  AstNodeFactory ast_node_factory_;
+};
+
+TEST_F(AstValueTest, BigIntToBooleanIsTrue) {
+  EXPECT_FALSE(NewBigInt("0")->ToBooleanIsTrue());
+  EXPECT_FALSE(NewBigInt("0b0")->ToBooleanIsTrue());
+  EXPECT_FALSE(NewBigInt("0o0")->ToBooleanIsTrue());
+  EXPECT_FALSE(NewBigInt("0x0")->ToBooleanIsTrue());
+  EXPECT_FALSE(NewBigInt("0b000")->ToBooleanIsTrue());
+  EXPECT_FALSE(NewBigInt("0o00000")->ToBooleanIsTrue());
+  EXPECT_FALSE(NewBigInt("0x000000000")->ToBooleanIsTrue());
+
+  EXPECT_TRUE(NewBigInt("3")->ToBooleanIsTrue());
+  EXPECT_TRUE(NewBigInt("0b1")->ToBooleanIsTrue());
+  EXPECT_TRUE(NewBigInt("0o6")->ToBooleanIsTrue());
+  EXPECT_TRUE(NewBigInt("0xA")->ToBooleanIsTrue());
+  EXPECT_TRUE(NewBigInt("0b0000001")->ToBooleanIsTrue());
+  EXPECT_TRUE(NewBigInt("0o00005000")->ToBooleanIsTrue());
+  EXPECT_TRUE(NewBigInt("0x0000D00C0")->ToBooleanIsTrue());
+}
+
+}  // namespace internal
+}  // namespace v8
diff --git a/src/v8/test/unittests/parser/preparser-unittest.cc b/src/v8/test/unittests/parser/preparser-unittest.cc
index 26f5cd5..37dda73 100644
--- a/src/v8/test/unittests/parser/preparser-unittest.cc
+++ b/src/v8/test/unittests/parser/preparser-unittest.cc
@@ -11,7 +11,7 @@
 namespace v8 {
 namespace internal {
 
-class PreParserTest : public TestWithContext {
+class PreParserTest : public TestWithNativeContext {
  public:
   PreParserTest() {}
 
@@ -22,16 +22,12 @@
 TEST_F(PreParserTest, LazyFunctionLength) {
   const char* script_source = "function lazy(a, b, c) { } lazy";
 
-  Handle<Object> lazy_object = test::RunJS(isolate(), script_source);
+  Handle<JSFunction> lazy_function = RunJS<JSFunction>(script_source);
 
-  Handle<SharedFunctionInfo> shared(
-      Handle<JSFunction>::cast(lazy_object)->shared(), i_isolate());
+  Handle<SharedFunctionInfo> shared(lazy_function->shared());
   CHECK_EQ(shared->length(), SharedFunctionInfo::kInvalidLength);
 
-  const char* get_length_source = "lazy.length";
-
-  Handle<Object> length = test::RunJS(isolate(), get_length_source);
-  CHECK(length->IsSmi());
+  Handle<Smi> length = RunJS<Smi>("lazy.length");
   int32_t value;
   CHECK(length->ToInt32(&value));
   CHECK_EQ(3, value);
diff --git a/src/v8/test/unittests/run-all-unittests.cc b/src/v8/test/unittests/run-all-unittests.cc
index 55217ae..f353e83 100644
--- a/src/v8/test/unittests/run-all-unittests.cc
+++ b/src/v8/test/unittests/run-all-unittests.cc
@@ -11,27 +11,24 @@
 
 class DefaultPlatformEnvironment final : public ::testing::Environment {
  public:
-  DefaultPlatformEnvironment() : platform_(NULL) {}
+  DefaultPlatformEnvironment() {}
 
   void SetUp() override {
-    EXPECT_EQ(NULL, platform_);
-    platform_ = v8::platform::CreateDefaultPlatform(
+    platform_ = v8::platform::NewDefaultPlatform(
         0, v8::platform::IdleTaskSupport::kEnabled);
-    ASSERT_TRUE(platform_ != NULL);
-    v8::V8::InitializePlatform(platform_);
+    ASSERT_TRUE(platform_.get() != NULL);
+    v8::V8::InitializePlatform(platform_.get());
     ASSERT_TRUE(v8::V8::Initialize());
   }
 
   void TearDown() override {
-    ASSERT_TRUE(platform_ != NULL);
+    ASSERT_TRUE(platform_.get() != NULL);
     v8::V8::Dispose();
     v8::V8::ShutdownPlatform();
-    delete platform_;
-    platform_ = NULL;
   }
 
  private:
-  v8::Platform* platform_;
+  std::unique_ptr<v8::Platform> platform_;
 };
 
 }  // namespace
diff --git a/src/v8/test/unittests/source-position-table-unittest.cc b/src/v8/test/unittests/source-position-table-unittest.cc
index 680e1be..1ad6dec 100644
--- a/src/v8/test/unittests/source-position-table-unittest.cc
+++ b/src/v8/test/unittests/source-position-table-unittest.cc
@@ -12,7 +12,7 @@
 namespace internal {
 namespace interpreter {
 
-class SourcePositionTableTest : public TestWithIsolateAndZone {
+class SourcePositionTableTest : public TestWithIsolate {
  public:
   SourcePositionTableTest() {}
   ~SourcePositionTableTest() override {}
@@ -28,19 +28,18 @@
                         129, 250, 1000, 9999, 12000, 31415926};
 
 TEST_F(SourcePositionTableTest, EncodeStatement) {
-  SourcePositionTableBuilder builder(zone());
+  SourcePositionTableBuilder builder;
   for (size_t i = 0; i < arraysize(offsets); i++) {
     builder.AddPosition(offsets[i], toPos(offsets[i]), true);
   }
 
   // To test correctness, we rely on the assertions in ToSourcePositionTable().
   // (Also below.)
-  CHECK(!builder.ToSourcePositionTable(isolate(), Handle<AbstractCode>())
-             .is_null());
+  CHECK(!builder.ToSourcePositionTable(isolate()).is_null());
 }
 
 TEST_F(SourcePositionTableTest, EncodeStatementDuplicates) {
-  SourcePositionTableBuilder builder(zone());
+  SourcePositionTableBuilder builder;
   for (size_t i = 0; i < arraysize(offsets); i++) {
     builder.AddPosition(offsets[i], toPos(offsets[i]), true);
     builder.AddPosition(offsets[i], toPos(offsets[i] + 1), true);
@@ -48,21 +47,19 @@
 
   // To test correctness, we rely on the assertions in ToSourcePositionTable().
   // (Also below.)
-  CHECK(!builder.ToSourcePositionTable(isolate(), Handle<AbstractCode>())
-             .is_null());
+  CHECK(!builder.ToSourcePositionTable(isolate()).is_null());
 }
 
 TEST_F(SourcePositionTableTest, EncodeExpression) {
-  SourcePositionTableBuilder builder(zone());
+  SourcePositionTableBuilder builder;
   for (size_t i = 0; i < arraysize(offsets); i++) {
     builder.AddPosition(offsets[i], toPos(offsets[i]), false);
   }
-  CHECK(!builder.ToSourcePositionTable(isolate(), Handle<AbstractCode>())
-             .is_null());
+  CHECK(!builder.ToSourcePositionTable(isolate()).is_null());
 }
 
 TEST_F(SourcePositionTableTest, EncodeAscending) {
-  SourcePositionTableBuilder builder(zone());
+  SourcePositionTableBuilder builder;
 
   int code_offset = 0;
   int source_position = 0;
@@ -87,8 +84,7 @@
     }
   }
 
-  CHECK(!builder.ToSourcePositionTable(isolate(), Handle<AbstractCode>())
-             .is_null());
+  CHECK(!builder.ToSourcePositionTable(isolate()).is_null());
 }
 
 }  // namespace interpreter
diff --git a/src/v8/test/unittests/test-helpers.cc b/src/v8/test/unittests/test-helpers.cc
index 43fccc3..46600c6 100644
--- a/src/v8/test/unittests/test-helpers.cc
+++ b/src/v8/test/unittests/test-helpers.cc
@@ -15,17 +15,6 @@
 namespace internal {
 namespace test {
 
-Handle<Object> RunJS(v8::Isolate* isolate, const char* script) {
-  return Utils::OpenHandle(
-      *v8::Script::Compile(
-           isolate->GetCurrentContext(),
-           v8::String::NewFromUtf8(isolate, script, v8::NewStringType::kNormal)
-               .ToLocalChecked())
-           .ToLocalChecked()
-           ->Run(isolate->GetCurrentContext())
-           .ToLocalChecked());
-}
-
 Handle<String> CreateSource(Isolate* isolate,
                             ExternalOneByteString::Resource* maybe_resource) {
   static const char test_script[] = "(x) { x*x; }";
diff --git a/src/v8/test/unittests/test-helpers.h b/src/v8/test/unittests/test-helpers.h
index a022a0b..223b22e 100644
--- a/src/v8/test/unittests/test-helpers.h
+++ b/src/v8/test/unittests/test-helpers.h
@@ -40,7 +40,6 @@
   DISALLOW_COPY_AND_ASSIGN(ScriptResource);
 };
 
-Handle<Object> RunJS(v8::Isolate* isolate, const char* script);
 Handle<String> CreateSource(
     Isolate* isolate,
     v8::String::ExternalOneByteStringResource* maybe_resource);
diff --git a/src/v8/test/unittests/test-utils.cc b/src/v8/test/unittests/test-utils.cc
index f433926..354d1b7 100644
--- a/src/v8/test/unittests/test-utils.cc
+++ b/src/v8/test/unittests/test-utils.cc
@@ -5,6 +5,8 @@
 #include "test/unittests/test-utils.h"
 
 #include "include/libplatform/libplatform.h"
+#include "include/v8.h"
+#include "src/api.h"
 #include "src/base/platform/time.h"
 #include "src/flags.h"
 #include "src/isolate.h"
@@ -50,6 +52,15 @@
   Test::TearDownTestCase();
 }
 
+Local<Value> TestWithIsolate::RunJS(const char* source) {
+  Local<Script> script =
+      v8::Script::Compile(
+          isolate()->GetCurrentContext(),
+          v8::String::NewFromUtf8(isolate(), source, v8::NewStringType::kNormal)
+              .ToLocalChecked())
+          .ToLocalChecked();
+  return script->Run(isolate()->GetCurrentContext()).ToLocalChecked();
+}
 
 TestWithContext::TestWithContext()
     : context_(Context::New(isolate())), context_scope_(context_) {}
@@ -57,25 +68,17 @@
 
 TestWithContext::~TestWithContext() {}
 
-
-namespace base {
-namespace {
-
-inline int64_t GetRandomSeedFromFlag(int random_seed) {
-  return random_seed ? random_seed : TimeTicks::Now().ToInternalValue();
+void TestWithContext::SetGlobalProperty(const char* name,
+                                        v8::Local<v8::Value> value) {
+  v8::Local<v8::String> property_name =
+      v8::String::NewFromUtf8(v8_isolate(), name, v8::NewStringType::kNormal)
+          .ToLocalChecked();
+  CHECK(v8_context()
+            ->Global()
+            ->Set(v8_context(), property_name, value)
+            .FromJust());
 }
 
-}  // namespace
-
-TestWithRandomNumberGenerator::TestWithRandomNumberGenerator()
-    : rng_(GetRandomSeedFromFlag(::v8::internal::FLAG_random_seed)) {}
-
-
-TestWithRandomNumberGenerator::~TestWithRandomNumberGenerator() {}
-
-}  // namespace base
-
-
 namespace internal {
 
 TestWithIsolate::~TestWithIsolate() {}
diff --git a/src/v8/test/unittests/test-utils.h b/src/v8/test/unittests/test-utils.h
index 3d832e6..17a5eb7 100644
--- a/src/v8/test/unittests/test-utils.h
+++ b/src/v8/test/unittests/test-utils.h
@@ -8,8 +8,12 @@
 #include <vector>
 
 #include "include/v8.h"
+#include "src/api.h"
 #include "src/base/macros.h"
 #include "src/base/utils/random-number-generator.h"
+#include "src/handles.h"
+#include "src/objects-inl.h"
+#include "src/objects.h"
 #include "src/zone/accounting-allocator.h"
 #include "src/zone/zone.h"
 #include "testing/gtest-support.h"
@@ -18,64 +22,54 @@
 
 class ArrayBufferAllocator;
 
-
+// Use v8::internal::TestWithIsolate  if you are testing internals,
+// aka. directly work with Handles.
 class TestWithIsolate : public virtual ::testing::Test {
  public:
   TestWithIsolate();
   virtual ~TestWithIsolate();
 
-  Isolate* isolate() const { return isolate_; }
+  v8::Isolate* isolate() const { return v8_isolate(); }
+
+  v8::Isolate* v8_isolate() const { return isolate_; }
 
   v8::internal::Isolate* i_isolate() const {
     return reinterpret_cast<v8::internal::Isolate*>(isolate());
   }
 
+  Local<Value> RunJS(const char* source);
+
   static void SetUpTestCase();
   static void TearDownTestCase();
 
  private:
   static v8::ArrayBuffer::Allocator* array_buffer_allocator_;
-  static Isolate* isolate_;
-  Isolate::Scope isolate_scope_;
-  HandleScope handle_scope_;
+  static v8::Isolate* isolate_;
+  v8::Isolate::Scope isolate_scope_;
+  v8::HandleScope handle_scope_;
 
   DISALLOW_COPY_AND_ASSIGN(TestWithIsolate);
 };
 
-
-class TestWithContext : public virtual TestWithIsolate {
+// Use v8::internal::TestWithNativeContext if you are testing internals,
+// aka. directly work with Handles.
+class TestWithContext : public virtual v8::TestWithIsolate {
  public:
   TestWithContext();
   virtual ~TestWithContext();
 
-  const Local<Context>& context() const { return context_; }
+  const Local<Context>& context() const { return v8_context(); }
+  const Local<Context>& v8_context() const { return context_; }
+
+  void SetGlobalProperty(const char* name, v8::Local<v8::Value> value);
 
  private:
   Local<Context> context_;
-  Context::Scope context_scope_;
+  v8::Context::Scope context_scope_;
 
   DISALLOW_COPY_AND_ASSIGN(TestWithContext);
 };
 
-
-namespace base {
-
-class TestWithRandomNumberGenerator : public ::testing::Test {
- public:
-  TestWithRandomNumberGenerator();
-  virtual ~TestWithRandomNumberGenerator();
-
-  RandomNumberGenerator* rng() { return &rng_; }
-
- private:
-  RandomNumberGenerator rng_;
-
-  DISALLOW_COPY_AND_ASSIGN(TestWithRandomNumberGenerator);
-};
-
-}  // namespace base
-
-
 namespace internal {
 
 // Forward declarations.
@@ -88,8 +82,12 @@
   virtual ~TestWithIsolate();
 
   Factory* factory() const;
-  Isolate* isolate() const {
-    return reinterpret_cast<Isolate*>(::v8::TestWithIsolate::isolate());
+  Isolate* isolate() const { return i_isolate(); }
+  template <typename T = Object>
+  Handle<T> RunJS(const char* source) {
+    Handle<Object> result =
+        Utils::OpenHandle(*::v8::TestWithIsolate::RunJS(source));
+    return Handle<T>::cast(result);
   }
   base::RandomNumberGenerator* random_number_generator() const;
 
diff --git a/src/v8/test/unittests/testcfg.py b/src/v8/test/unittests/testcfg.py
new file mode 100644
index 0000000..9b18743
--- /dev/null
+++ b/src/v8/test/unittests/testcfg.py
@@ -0,0 +1,70 @@
+# Copyright 2017 the V8 project authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import os
+
+from testrunner.local import command
+from testrunner.local import utils
+from testrunner.local import testsuite
+from testrunner.objects import testcase
+
+
+class TestSuite(testsuite.TestSuite):
+  def ListTests(self, context):
+    shell = os.path.abspath(os.path.join(context.shell_dir, self.name))
+    if utils.IsWindows():
+      shell += ".exe"
+
+    output = None
+    for i in xrange(3): # Try 3 times in case of errors.
+      cmd = command.Command(
+        cmd_prefix=context.command_prefix,
+        shell=shell,
+        args=['--gtest_list_tests'] + context.extra_flags)
+      output = cmd.execute()
+      if output.exit_code == 0:
+        break
+      print "Test executable failed to list the tests (try %d).\n\nCmd:" % i
+      print cmd
+      print "\nStdout:"
+      print output.stdout
+      print "\nStderr:"
+      print output.stderr
+      print "\nExit code: %d" % output.exit_code
+    else:
+      raise Exception("Test executable failed to list the tests.")
+
+    tests = []
+    test_case = ''
+    for line in output.stdout.splitlines():
+      test_desc = line.strip().split()[0]
+      if test_desc.endswith('.'):
+        test_case = test_desc
+      elif test_case and test_desc:
+        test_path = test_case + test_desc
+        tests.append(self._create_test(test_path))
+    tests.sort(key=lambda t: t.path)
+    return tests
+
+  def _test_class(self):
+    return TestCase
+
+  def _LegacyVariantsGeneratorFactory(self):
+    return testsuite.StandardLegacyVariantsGenerator
+
+
+class TestCase(testcase.TestCase):
+  def _get_suite_flags(self, ctx):
+    return (
+        ["--gtest_filter=" + self.path] +
+        ["--gtest_random_seed=%s" % ctx.random_seed] +
+        ["--gtest_print_time=0"]
+    )
+
+  def get_shell(self):
+    return self.suite.name
+
+
+def GetSuite(name, root):
+  return TestSuite(name, root)
diff --git a/src/v8/test/unittests/unicode-unittest.cc b/src/v8/test/unittests/unicode-unittest.cc
index c4df42c..e5ccaca 100644
--- a/src/v8/test/unittests/unicode-unittest.cc
+++ b/src/v8/test/unittests/unicode-unittest.cc
@@ -37,13 +37,15 @@
 void DecodeIncrementally(const std::vector<byte>& bytes,
                          std::vector<unibrow::uchar>* output) {
   unibrow::Utf8::Utf8IncrementalBuffer buffer = 0;
-  for (auto b : bytes) {
-    unibrow::uchar result = unibrow::Utf8::ValueOfIncremental(b, &buffer);
+  unibrow::Utf8::State state = unibrow::Utf8::State::kAccept;
+  for (size_t i = 0; i < bytes.size();) {
+    unibrow::uchar result =
+        unibrow::Utf8::ValueOfIncremental(bytes[i], &i, &state, &buffer);
     if (result != unibrow::Utf8::kIncomplete) {
       output->push_back(result);
     }
   }
-  unibrow::uchar result = unibrow::Utf8::ValueOfIncrementalFinish(&buffer);
+  unibrow::uchar result = unibrow::Utf8::ValueOfIncrementalFinish(&state);
   if (result != unibrow::Utf8::kBufferEmpty) {
     output->push_back(result);
   }
@@ -72,344 +74,344 @@
 
   TestCase data[] = {
       // Correct UTF-8 text.
-      {{0xce, 0xba, 0xe1, 0xbd, 0xb9, 0xcf, 0x83, 0xce, 0xbc, 0xce, 0xb5},
-       {0x3ba, 0x1f79, 0x3c3, 0x3bc, 0x3b5}},
+      {{0xCE, 0xBA, 0xE1, 0xBD, 0xB9, 0xCF, 0x83, 0xCE, 0xBC, 0xCE, 0xB5},
+       {0x3BA, 0x1F79, 0x3C3, 0x3BC, 0x3B5}},
 
       // First possible sequence of a certain length:
       // 1 byte
       {{0x00}, {0x0}},
       // 2 bytes
-      {{0xc2, 0x80}, {0x80}},
+      {{0xC2, 0x80}, {0x80}},
       // 3 bytes
-      {{0xe0, 0xa0, 0x80}, {0x800}},
+      {{0xE0, 0xA0, 0x80}, {0x800}},
       // 4 bytes
-      {{0xf0, 0x90, 0x80, 0x80}, {0x10000}},
+      {{0xF0, 0x90, 0x80, 0x80}, {0x10000}},
       // 5 bytes (not supported)
-      {{0xf8, 0x88, 0x80, 0x80, 0x80},
-       {0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd}},
+      {{0xF8, 0x88, 0x80, 0x80, 0x80},
+       {0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD}},
       // 6 bytes (not supported)
-      {{0xfc, 0x84, 0x80, 0x80, 0x80, 0x80},
-       {0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd}},
+      {{0xFC, 0x84, 0x80, 0x80, 0x80, 0x80},
+       {0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD}},
 
       // Last possible sequence of certain length:
       // 1 byte
-      {{0x7f}, {0x7f}},
+      {{0x7F}, {0x7F}},
       // 2 bytes
-      {{0xdf, 0xbf}, {0x7ff}},
+      {{0xDF, 0xBF}, {0x7FF}},
       // 3 bytes
-      {{0xef, 0xbf, 0xbf}, {0xffff}},
+      {{0xEF, 0xBF, 0xBF}, {0xFFFF}},
       // 4 bytes (this sequence is not a valid code point)
-      {{0xf7, 0xbf, 0xbf, 0xbf}, {0xfffd, 0xfffd, 0xfffd, 0xfffd}},
+      {{0xF7, 0xBF, 0xBF, 0xBF}, {0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD}},
       // 5 bytes (not supported)
-      {{0xfb, 0xbf, 0xbf, 0xbf, 0xbf},
-       {0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd}},
+      {{0xFB, 0xBF, 0xBF, 0xBF, 0xBF},
+       {0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD}},
       // 6 bytes (not supported)
-      {{0xfd, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf},
-       {0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd}},
+      {{0xFD, 0xBF, 0xBF, 0xBF, 0xBF, 0xBF},
+       {0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD}},
       // Other boundary conditions:
-      {{0xed, 0x9f, 0xbf}, {0xd7ff}},
-      {{0xee, 0x80, 0x80}, {0xe000}},
+      {{0xED, 0x9F, 0xBF}, {0xD7FF}},
+      {{0xEE, 0x80, 0x80}, {0xE000}},
       // U+fffd (invalid code point)
-      {{0xef, 0xbf, 0xbd}, {0xfffd}},
+      {{0xEF, 0xBF, 0xBD}, {0xFFFD}},
       // U+10ffff (last valid code point)
-      {{0xf4, 0x8f, 0xbf, 0xbf}, {0x10ffff}},
+      {{0xF4, 0x8F, 0xBF, 0xBF}, {0x10FFFF}},
       // First invalid (too large) code point
-      {{0xf4, 0x90, 0x80, 0x80}, {0xfffd, 0xfffd, 0xfffd, 0xfffd}},
+      {{0xF4, 0x90, 0x80, 0x80}, {0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD}},
 
       // Malformed sequences:
       // Unexpected continuation bytes:
       // First continuation byte
-      {{0x80}, {0xfffd}},
+      {{0x80}, {0xFFFD}},
       // Last continuation byte
-      {{0xbf}, {0xfffd}},
+      {{0xBF}, {0xFFFD}},
       // 2 continuation bytes
-      {{0x80, 0xbf}, {0xfffd, 0xfffd}},
+      {{0x80, 0xBF}, {0xFFFD, 0xFFFD}},
       // 3 continuation bytes
-      {{0x80, 0xbf, 0x80}, {0xfffd, 0xfffd, 0xfffd}},
+      {{0x80, 0xBF, 0x80}, {0xFFFD, 0xFFFD, 0xFFFD}},
       // 4 continuation bytes
-      {{0x80, 0xbf, 0x80, 0xbf}, {0xfffd, 0xfffd, 0xfffd, 0xfffd}},
+      {{0x80, 0xBF, 0x80, 0xBF}, {0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD}},
       // 5 continuation bytes
-      {{0x80, 0xbf, 0x80, 0xbf, 0x80},
-       {0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd}},
+      {{0x80, 0xBF, 0x80, 0xBF, 0x80},
+       {0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD}},
       // 6 continuation bytes
-      {{0x80, 0xbf, 0x80, 0xbf, 0x80, 0xbf},
-       {0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd}},
+      {{0x80, 0xBF, 0x80, 0xBF, 0x80, 0xBF},
+       {0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD}},
       // 7 continuation bytes
-      {{0x80, 0xbf, 0x80, 0xbf, 0x80, 0xbf, 0xbf},
-       {0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd}},
+      {{0x80, 0xBF, 0x80, 0xBF, 0x80, 0xBF, 0xBF},
+       {0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD}},
       // Sequence of all 64 possible continuation bytes
-      {{0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a,
-        0x8b, 0x8c, 0x8d, 0x8e, 0x8f, 0x90, 0x91, 0x92, 0x93, 0x94, 0x95,
-        0x96, 0x97, 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, 0xa0,
-        0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab,
-        0xac, 0xad, 0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6,
-        0xb7, 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf},
-       {0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
-        0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
-        0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
-        0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
-        0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
-        0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
-        0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
-        0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd}},
+      {{0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8A,
+        0x8B, 0x8C, 0x8D, 0x8E, 0x8F, 0x90, 0x91, 0x92, 0x93, 0x94, 0x95,
+        0x96, 0x97, 0x98, 0x99, 0x9A, 0x9B, 0x9C, 0x9D, 0x9E, 0x9F, 0xA0,
+        0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, 0xA7, 0xA8, 0xA9, 0xAA, 0xAB,
+        0xAC, 0xAD, 0xAE, 0xAF, 0xB0, 0xB1, 0xB2, 0xB3, 0xB4, 0xB5, 0xB6,
+        0xB7, 0xB8, 0xB9, 0xBA, 0xBB, 0xBC, 0xBD, 0xBE, 0xBF},
+       {0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
+        0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
+        0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
+        0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
+        0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
+        0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
+        0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
+        0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD}},
       // Using each possible continuation byte in a two-byte sequence:
-      {{0xd0, 0x80, 0xd0, 0x81, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0x84, 0xd0, 0x85,
-        0xd0, 0x86, 0xd0, 0x87, 0xd0, 0x88, 0xd0, 0x89, 0xd0, 0x8a, 0xd0, 0x8b,
-        0xd0, 0x8c, 0xd0, 0x8d, 0xd0, 0x8e, 0xd0, 0x8f, 0xd0, 0x90, 0xd0, 0x91,
-        0xd0, 0x92, 0xd0, 0x93, 0xd0, 0x94, 0xd0, 0x95, 0xd0, 0x96, 0xd0, 0x97,
-        0xd0, 0x98, 0xd0, 0x99, 0xd0, 0x9a, 0xd0, 0x9b, 0xd0, 0x9c, 0xd0, 0x9d,
-        0xd0, 0x9e, 0xd0, 0x9f, 0xd0, 0xa0, 0xd0, 0xa1, 0xd0, 0xa2, 0xd0, 0xa3,
-        0xd0, 0xa4, 0xd0, 0xa5, 0xd0, 0xa6, 0xd0, 0xa7, 0xd0, 0xa8, 0xd0, 0xa9,
-        0xd0, 0xaa, 0xd0, 0xab, 0xd0, 0xac, 0xd0, 0xad, 0xd0, 0xae, 0xd0, 0xaf,
-        0xd0, 0xb0, 0xd0, 0xb1, 0xd0, 0xb2, 0xd0, 0xb3, 0xd0, 0xb4, 0xd0, 0xb5,
-        0xd0, 0xb6, 0xd0, 0xb7, 0xd0, 0xb8, 0xd0, 0xb9, 0xd0, 0xba, 0xd0, 0xbb,
-        0xd0, 0xbc, 0xd0, 0xbd, 0xd0, 0xbe, 0xd0, 0xbf},
+      {{0xD0, 0x80, 0xD0, 0x81, 0xD0, 0x82, 0xD0, 0x83, 0xD0, 0x84, 0xD0, 0x85,
+        0xD0, 0x86, 0xD0, 0x87, 0xD0, 0x88, 0xD0, 0x89, 0xD0, 0x8A, 0xD0, 0x8B,
+        0xD0, 0x8C, 0xD0, 0x8D, 0xD0, 0x8E, 0xD0, 0x8F, 0xD0, 0x90, 0xD0, 0x91,
+        0xD0, 0x92, 0xD0, 0x93, 0xD0, 0x94, 0xD0, 0x95, 0xD0, 0x96, 0xD0, 0x97,
+        0xD0, 0x98, 0xD0, 0x99, 0xD0, 0x9A, 0xD0, 0x9B, 0xD0, 0x9C, 0xD0, 0x9D,
+        0xD0, 0x9E, 0xD0, 0x9F, 0xD0, 0xA0, 0xD0, 0xA1, 0xD0, 0xA2, 0xD0, 0xA3,
+        0xD0, 0xA4, 0xD0, 0xA5, 0xD0, 0xA6, 0xD0, 0xA7, 0xD0, 0xA8, 0xD0, 0xA9,
+        0xD0, 0xAA, 0xD0, 0xAB, 0xD0, 0xAC, 0xD0, 0xAD, 0xD0, 0xAE, 0xD0, 0xAF,
+        0xD0, 0xB0, 0xD0, 0xB1, 0xD0, 0xB2, 0xD0, 0xB3, 0xD0, 0xB4, 0xD0, 0xB5,
+        0xD0, 0xB6, 0xD0, 0xB7, 0xD0, 0xB8, 0xD0, 0xB9, 0xD0, 0xBA, 0xD0, 0xBB,
+        0xD0, 0xBC, 0xD0, 0xBD, 0xD0, 0xBE, 0xD0, 0xBF},
        {0x400, 0x401, 0x402, 0x403, 0x404, 0x405, 0x406, 0x407, 0x408, 0x409,
-        0x40a, 0x40b, 0x40c, 0x40d, 0x40e, 0x40f, 0x410, 0x411, 0x412, 0x413,
-        0x414, 0x415, 0x416, 0x417, 0x418, 0x419, 0x41a, 0x41b, 0x41c, 0x41d,
-        0x41e, 0x41f, 0x420, 0x421, 0x422, 0x423, 0x424, 0x425, 0x426, 0x427,
-        0x428, 0x429, 0x42a, 0x42b, 0x42c, 0x42d, 0x42e, 0x42f, 0x430, 0x431,
-        0x432, 0x433, 0x434, 0x435, 0x436, 0x437, 0x438, 0x439, 0x43a, 0x43b,
-        0x43c, 0x43d, 0x43e, 0x43f}},
+        0x40A, 0x40B, 0x40C, 0x40D, 0x40E, 0x40F, 0x410, 0x411, 0x412, 0x413,
+        0x414, 0x415, 0x416, 0x417, 0x418, 0x419, 0x41A, 0x41B, 0x41C, 0x41D,
+        0x41E, 0x41F, 0x420, 0x421, 0x422, 0x423, 0x424, 0x425, 0x426, 0x427,
+        0x428, 0x429, 0x42A, 0x42B, 0x42C, 0x42D, 0x42E, 0x42F, 0x430, 0x431,
+        0x432, 0x433, 0x434, 0x435, 0x436, 0x437, 0x438, 0x439, 0x43A, 0x43B,
+        0x43C, 0x43D, 0x43E, 0x43F}},
 
       // Lonely first bytes:
       // All 32 first bytes of 32-byte sequences, each followed by a space
       // (generates 32 invalid char + space sequences.
-      {{0xc0, 0x20, 0xc1, 0x20, 0xc2, 0x20, 0xc3, 0x20, 0xc4, 0x20, 0xc5,
-        0x20, 0xc6, 0x20, 0xc7, 0x20, 0xc8, 0x20, 0xc9, 0x20, 0xca, 0x20,
-        0xcb, 0x20, 0xcc, 0x20, 0xcd, 0x20, 0xce, 0x20, 0xcf, 0x20, 0xd0,
-        0x20, 0xd1, 0x20, 0xd2, 0x20, 0xd3, 0x20, 0xd4, 0x20, 0xd5, 0x20,
-        0xd6, 0x20, 0xd7, 0x20, 0xd8, 0x20, 0xd9, 0x20, 0xda, 0x20, 0xdb,
-        0x20, 0xdc, 0x20, 0xdd, 0x20, 0xde, 0x20, 0xdf, 0x20},
-       {0xfffd, 0x20, 0xfffd, 0x20, 0xfffd, 0x20, 0xfffd, 0x20, 0xfffd, 0x20,
-        0xfffd, 0x20, 0xfffd, 0x20, 0xfffd, 0x20, 0xfffd, 0x20, 0xfffd, 0x20,
-        0xfffd, 0x20, 0xfffd, 0x20, 0xfffd, 0x20, 0xfffd, 0x20, 0xfffd, 0x20,
-        0xfffd, 0x20, 0xfffd, 0x20, 0xfffd, 0x20, 0xfffd, 0x20, 0xfffd, 0x20,
-        0xfffd, 0x20, 0xfffd, 0x20, 0xfffd, 0x20, 0xfffd, 0x20, 0xfffd, 0x20,
-        0xfffd, 0x20, 0xfffd, 0x20, 0xfffd, 0x20, 0xfffd, 0x20, 0xfffd, 0x20,
-        0xfffd, 0x20, 0xfffd, 0x20}},
+      {{0xC0, 0x20, 0xC1, 0x20, 0xC2, 0x20, 0xC3, 0x20, 0xC4, 0x20, 0xC5,
+        0x20, 0xC6, 0x20, 0xC7, 0x20, 0xC8, 0x20, 0xC9, 0x20, 0xCA, 0x20,
+        0xCB, 0x20, 0xCC, 0x20, 0xCD, 0x20, 0xCE, 0x20, 0xCF, 0x20, 0xD0,
+        0x20, 0xD1, 0x20, 0xD2, 0x20, 0xD3, 0x20, 0xD4, 0x20, 0xD5, 0x20,
+        0xD6, 0x20, 0xD7, 0x20, 0xD8, 0x20, 0xD9, 0x20, 0xDA, 0x20, 0xDB,
+        0x20, 0xDC, 0x20, 0xDD, 0x20, 0xDE, 0x20, 0xDF, 0x20},
+       {0xFFFD, 0x20, 0xFFFD, 0x20, 0xFFFD, 0x20, 0xFFFD, 0x20, 0xFFFD, 0x20,
+        0xFFFD, 0x20, 0xFFFD, 0x20, 0xFFFD, 0x20, 0xFFFD, 0x20, 0xFFFD, 0x20,
+        0xFFFD, 0x20, 0xFFFD, 0x20, 0xFFFD, 0x20, 0xFFFD, 0x20, 0xFFFD, 0x20,
+        0xFFFD, 0x20, 0xFFFD, 0x20, 0xFFFD, 0x20, 0xFFFD, 0x20, 0xFFFD, 0x20,
+        0xFFFD, 0x20, 0xFFFD, 0x20, 0xFFFD, 0x20, 0xFFFD, 0x20, 0xFFFD, 0x20,
+        0xFFFD, 0x20, 0xFFFD, 0x20, 0xFFFD, 0x20, 0xFFFD, 0x20, 0xFFFD, 0x20,
+        0xFFFD, 0x20, 0xFFFD, 0x20}},
       // All 16 first bytes of 3-byte sequences, each followed by a space
       // (generates 16 invalid char + space sequences):
-      {{0xe0, 0x20, 0xe1, 0x20, 0xe2, 0x20, 0xe3, 0x20, 0xe4, 0x20, 0xe5,
-        0x20, 0xe6, 0x20, 0xe7, 0x20, 0xe8, 0x20, 0xe9, 0x20, 0xea, 0x20,
-        0xeb, 0x20, 0xec, 0x20, 0xed, 0x20, 0xee, 0x20, 0xef, 0x20},
-       {0xfffd, 0x20, 0xfffd, 0x20, 0xfffd, 0x20, 0xfffd, 0x20,
-        0xfffd, 0x20, 0xfffd, 0x20, 0xfffd, 0x20, 0xfffd, 0x20,
-        0xfffd, 0x20, 0xfffd, 0x20, 0xfffd, 0x20, 0xfffd, 0x20,
-        0xfffd, 0x20, 0xfffd, 0x20, 0xfffd, 0x20, 0xfffd, 0x20}},
+      {{0xE0, 0x20, 0xE1, 0x20, 0xE2, 0x20, 0xE3, 0x20, 0xE4, 0x20, 0xE5,
+        0x20, 0xE6, 0x20, 0xE7, 0x20, 0xE8, 0x20, 0xE9, 0x20, 0xEA, 0x20,
+        0xEB, 0x20, 0xEC, 0x20, 0xED, 0x20, 0xEE, 0x20, 0xEF, 0x20},
+       {0xFFFD, 0x20, 0xFFFD, 0x20, 0xFFFD, 0x20, 0xFFFD, 0x20,
+        0xFFFD, 0x20, 0xFFFD, 0x20, 0xFFFD, 0x20, 0xFFFD, 0x20,
+        0xFFFD, 0x20, 0xFFFD, 0x20, 0xFFFD, 0x20, 0xFFFD, 0x20,
+        0xFFFD, 0x20, 0xFFFD, 0x20, 0xFFFD, 0x20, 0xFFFD, 0x20}},
       // All 8 first bytes of 4-byte sequences, each followed by a space
       // (generates 8 invalid char + space sequences):
-      {{0xf0, 0x20, 0xf1, 0x20, 0xf2, 0x20, 0xf3, 0x20, 0xf4, 0x20, 0xf5, 0x20,
-        0xf6, 0x20, 0xf7, 0x20},
-       {0xfffd, 0x20, 0xfffd, 0x20, 0xfffd, 0x20, 0xfffd, 0x20, 0xfffd, 0x20,
-        0xfffd, 0x20, 0xfffd, 0x20, 0xfffd, 0x20}},
+      {{0xF0, 0x20, 0xF1, 0x20, 0xF2, 0x20, 0xF3, 0x20, 0xF4, 0x20, 0xF5, 0x20,
+        0xF6, 0x20, 0xF7, 0x20},
+       {0xFFFD, 0x20, 0xFFFD, 0x20, 0xFFFD, 0x20, 0xFFFD, 0x20, 0xFFFD, 0x20,
+        0xFFFD, 0x20, 0xFFFD, 0x20, 0xFFFD, 0x20}},
       // All 4 first bytes of 5-byte sequences (not supported), each followed by
       // a space (generates 4 invalid char + space sequences):
-      {{0xf8, 0x20, 0xf9, 0x20, 0xfa, 0x20, 0xfb, 0x20},
-       {0xfffd, 0x20, 0xfffd, 0x20, 0xfffd, 0x20, 0xfffd, 0x20}},
+      {{0xF8, 0x20, 0xF9, 0x20, 0xFA, 0x20, 0xFB, 0x20},
+       {0xFFFD, 0x20, 0xFFFD, 0x20, 0xFFFD, 0x20, 0xFFFD, 0x20}},
       // All 2 first bytes of 6-byte sequences (not supported), each followed by
       // a space (generates 2 invalid char + space sequences):
-      {{0xfc, 0x20, 0xfd, 0x20}, {0xfffd, 0x20, 0xfffd, 0x20}},
+      {{0xFC, 0x20, 0xFD, 0x20}, {0xFFFD, 0x20, 0xFFFD, 0x20}},
 
       // Sequences with last continuation byte missing. Normally the whole
       // incomplete sequence generates a single invalid character (exceptions
       // explained below).
 
       // 2-byte sequences with last byte missing
-      {{0xc0}, {0xfffd}},
-      {{0xdf}, {0xfffd}},
+      {{0xC0}, {0xFFFD}},
+      {{0xDF}, {0xFFFD}},
       // 3-byte sequences with last byte missing.
-      {{0xe8, 0x80}, {0xfffd}},
-      {{0xe0, 0xbf}, {0xfffd}},
-      {{0xef, 0xbf}, {0xfffd}},
+      {{0xE8, 0x80}, {0xFFFD}},
+      {{0xE0, 0xBF}, {0xFFFD}},
+      {{0xEF, 0xBF}, {0xFFFD}},
       // Start of an overlong sequence. The first "maximal subpart" is the first
       // byte; it creates an invalid character. Each following byte generates an
       // invalid character too.
-      {{0xe0, 0x80}, {0xfffd, 0xfffd}},
+      {{0xE0, 0x80}, {0xFFFD, 0xFFFD}},
       // 4-byte sequences with last byte missing
-      {{0xf1, 0x80, 0x80}, {0xfffd}},
-      {{0xf4, 0x8f, 0xbf}, {0xfffd}},
+      {{0xF1, 0x80, 0x80}, {0xFFFD}},
+      {{0xF4, 0x8F, 0xBF}, {0xFFFD}},
       // Start of an overlong sequence. The first "maximal subpart" is the first
       // byte; it creates an invalid character. Each following byte generates an
       // invalid character too.
-      {{0xf0, 0x80, 0x80}, {0xfffd, 0xfffd, 0xfffd}},
+      {{0xF0, 0x80, 0x80}, {0xFFFD, 0xFFFD, 0xFFFD}},
       // 5-byte sequences (not supported) with last byte missing
-      {{0xf8, 0x80, 0x80, 0x80}, {0xfffd, 0xfffd, 0xfffd, 0xfffd}},
-      {{0xfb, 0xbf, 0xbf, 0xbf}, {0xfffd, 0xfffd, 0xfffd, 0xfffd}},
+      {{0xF8, 0x80, 0x80, 0x80}, {0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD}},
+      {{0xFB, 0xBF, 0xBF, 0xBF}, {0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD}},
       // 6-byte sequences (not supported) with last byte missing
-      {{0xfc, 0x80, 0x80, 0x80, 0x80},
-       {0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd}},
-      {{0xfd, 0xbf, 0xbf, 0xbf, 0xbf},
-       {0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd}},
+      {{0xFC, 0x80, 0x80, 0x80, 0x80},
+       {0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD}},
+      {{0xFD, 0xBF, 0xBF, 0xBF, 0xBF},
+       {0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD}},
 
       // Concatenation of incomplete sequences: above incomplete sequences
       // concatenated.
-      {{0xc0, 0xdf, 0xe8, 0x80, 0xe0, 0xbf, 0xef, 0xbf, 0xe0, 0x80,
-        0xf1, 0x80, 0x80, 0xf4, 0x8f, 0xbf, 0xf0, 0x80, 0x80, 0xf8,
-        0x80, 0x80, 0x80, 0xfb, 0xbf, 0xbf, 0xbf, 0xfc, 0x80, 0x80,
-        0x80, 0x80, 0xfd, 0xbf, 0xbf, 0xbf, 0xbf},
-       {0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
-        0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
-        0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
-        0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd}},
+      {{0xC0, 0xDF, 0xE8, 0x80, 0xE0, 0xBF, 0xEF, 0xBF, 0xE0, 0x80,
+        0xF1, 0x80, 0x80, 0xF4, 0x8F, 0xBF, 0xF0, 0x80, 0x80, 0xF8,
+        0x80, 0x80, 0x80, 0xFB, 0xBF, 0xBF, 0xBF, 0xFC, 0x80, 0x80,
+        0x80, 0x80, 0xFD, 0xBF, 0xBF, 0xBF, 0xBF},
+       {0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
+        0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
+        0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
+        0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD}},
 
       // Incomplete sequence tests repeated with a space after the incomplete
       // sequence.
 
       // 2-byte sequences with last byte missing
-      {{0xc0, 0x20}, {0xfffd, 0x20}},
-      {{0xdf, 0x20}, {0xfffd, 0x20}},
+      {{0xC0, 0x20}, {0xFFFD, 0x20}},
+      {{0xDF, 0x20}, {0xFFFD, 0x20}},
       // 3-byte sequences with last byte missing
-      {{0xe8, 0x80, 0x20}, {0xfffd, 0x20}},
-      {{0xe0, 0xbf, 0x20}, {0xfffd, 0x20}},
-      {{0xef, 0xbf, 0x20}, {0xfffd, 0x20}},
+      {{0xE8, 0x80, 0x20}, {0xFFFD, 0x20}},
+      {{0xE0, 0xBF, 0x20}, {0xFFFD, 0x20}},
+      {{0xEF, 0xBF, 0x20}, {0xFFFD, 0x20}},
       // Start of overlong 3-byte sequence with last byte missing
-      {{0xe0, 0x80, 0x20}, {0xfffd, 0xfffd, 0x20}},
+      {{0xE0, 0x80, 0x20}, {0xFFFD, 0xFFFD, 0x20}},
       // 4-byte sequences with last byte missing
-      {{0xf1, 0x80, 0x80, 0x20}, {0xfffd, 0x20}},
-      {{0xf4, 0x8f, 0xbf, 0x20}, {0xfffd, 0x20}},
+      {{0xF1, 0x80, 0x80, 0x20}, {0xFFFD, 0x20}},
+      {{0xF4, 0x8F, 0xBF, 0x20}, {0xFFFD, 0x20}},
       // Start of overlong 4-byte sequence with last byte missing
-      {{0xf0, 0x80, 0x80, 0x20}, {0xfffd, 0xfffd, 0xfffd, 0x20}},
+      {{0xF0, 0x80, 0x80, 0x20}, {0xFFFD, 0xFFFD, 0xFFFD, 0x20}},
       // 5-byte sequences (not supported) with last byte missing
-      {{0xf8, 0x80, 0x80, 0x80, 0x20}, {0xfffd, 0xfffd, 0xfffd, 0xfffd, 0x20}},
-      {{0xfb, 0xbf, 0xbf, 0xbf, 0x20}, {0xfffd, 0xfffd, 0xfffd, 0xfffd, 0x20}},
+      {{0xF8, 0x80, 0x80, 0x80, 0x20}, {0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x20}},
+      {{0xFB, 0xBF, 0xBF, 0xBF, 0x20}, {0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x20}},
       // 6-byte sequences (not supported) with last byte missing
-      {{0xfc, 0x80, 0x80, 0x80, 0x80, 0x20},
-       {0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0x20}},
-      {{0xfd, 0xbf, 0xbf, 0xbf, 0xbf, 0x20},
-       {0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0x20}},
+      {{0xFC, 0x80, 0x80, 0x80, 0x80, 0x20},
+       {0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x20}},
+      {{0xFD, 0xBF, 0xBF, 0xBF, 0xBF, 0x20},
+       {0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x20}},
 
       // Impossible bytes
-      {{0xfe}, {0xfffd}},
-      {{0xff}, {0xfffd}},
-      {{0xfe, 0xfe, 0xff, 0xff}, {0xfffd, 0xfffd, 0xfffd, 0xfffd}},
+      {{0xFE}, {0xFFFD}},
+      {{0xFF}, {0xFFFD}},
+      {{0xFE, 0xFE, 0xFF, 0xFF}, {0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD}},
       // Lead-byte-like bytes which aren't valid lead bytes.
-      {{0xc0}, {0xfffd}},
-      {{0xc0, 0xaa}, {0xfffd, 0xfffd}},
-      {{0xc1}, {0xfffd}},
-      {{0xc1, 0xaa}, {0xfffd, 0xfffd}},
-      {{0xf5}, {0xfffd}},
-      {{0xf5, 0xaa, 0xaa, 0xaa}, {0xfffd, 0xfffd, 0xfffd, 0xfffd}},
-      {{0xf6}, {0xfffd}},
-      {{0xf6, 0xaa, 0xaa, 0xaa}, {0xfffd, 0xfffd, 0xfffd, 0xfffd}},
-      {{0xf7}, {0xfffd}},
-      {{0xf7, 0xaa, 0xaa, 0xaa}, {0xfffd, 0xfffd, 0xfffd, 0xfffd}},
-      {{0xf8}, {0xfffd}},
-      {{0xf8, 0xaa, 0xaa, 0xaa}, {0xfffd, 0xfffd, 0xfffd, 0xfffd}},
-      {{0xf9}, {0xfffd}},
-      {{0xf9, 0xaa, 0xaa, 0xaa}, {0xfffd, 0xfffd, 0xfffd, 0xfffd}},
-      {{0xfa}, {0xfffd}},
-      {{0xfa, 0xaa, 0xaa, 0xaa}, {0xfffd, 0xfffd, 0xfffd, 0xfffd}},
-      {{0xfb}, {0xfffd}},
-      {{0xfb, 0xaa, 0xaa, 0xaa}, {0xfffd, 0xfffd, 0xfffd, 0xfffd}},
-      {{0xfc}, {0xfffd}},
-      {{0xfc, 0xaa, 0xaa, 0xaa}, {0xfffd, 0xfffd, 0xfffd, 0xfffd}},
-      {{0xfd}, {0xfffd}},
-      {{0xfd, 0xaa, 0xaa, 0xaa}, {0xfffd, 0xfffd, 0xfffd, 0xfffd}},
-      {{0xfe}, {0xfffd}},
-      {{0xfe, 0xaa, 0xaa, 0xaa}, {0xfffd, 0xfffd, 0xfffd, 0xfffd}},
-      {{0xff}, {0xfffd}},
-      {{0xff, 0xaa, 0xaa, 0xaa}, {0xfffd, 0xfffd, 0xfffd, 0xfffd}},
+      {{0xC0}, {0xFFFD}},
+      {{0xC0, 0xAA}, {0xFFFD, 0xFFFD}},
+      {{0xC1}, {0xFFFD}},
+      {{0xC1, 0xAA}, {0xFFFD, 0xFFFD}},
+      {{0xF5}, {0xFFFD}},
+      {{0xF5, 0xAA, 0xAA, 0xAA}, {0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD}},
+      {{0xF6}, {0xFFFD}},
+      {{0xF6, 0xAA, 0xAA, 0xAA}, {0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD}},
+      {{0xF7}, {0xFFFD}},
+      {{0xF7, 0xAA, 0xAA, 0xAA}, {0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD}},
+      {{0xF8}, {0xFFFD}},
+      {{0xF8, 0xAA, 0xAA, 0xAA}, {0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD}},
+      {{0xF9}, {0xFFFD}},
+      {{0xF9, 0xAA, 0xAA, 0xAA}, {0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD}},
+      {{0xFA}, {0xFFFD}},
+      {{0xFA, 0xAA, 0xAA, 0xAA}, {0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD}},
+      {{0xFB}, {0xFFFD}},
+      {{0xFB, 0xAA, 0xAA, 0xAA}, {0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD}},
+      {{0xFC}, {0xFFFD}},
+      {{0xFC, 0xAA, 0xAA, 0xAA}, {0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD}},
+      {{0xFD}, {0xFFFD}},
+      {{0xFD, 0xAA, 0xAA, 0xAA}, {0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD}},
+      {{0xFE}, {0xFFFD}},
+      {{0xFE, 0xAA, 0xAA, 0xAA}, {0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD}},
+      {{0xFF}, {0xFFFD}},
+      {{0xFF, 0xAA, 0xAA, 0xAA}, {0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD}},
 
       // Overlong sequences:
 
       // Overlong encodings for "/"
-      {{0xc0, 0xaf}, {0xfffd, 0xfffd}},
-      {{0xe0, 0x80, 0xaf}, {0xfffd, 0xfffd, 0xfffd}},
-      {{0xf0, 0x80, 0x80, 0xaf}, {0xfffd, 0xfffd, 0xfffd, 0xfffd}},
+      {{0xC0, 0xAF}, {0xFFFD, 0xFFFD}},
+      {{0xE0, 0x80, 0xAF}, {0xFFFD, 0xFFFD, 0xFFFD}},
+      {{0xF0, 0x80, 0x80, 0xAF}, {0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD}},
       // 5-byte sequence (not supported anyway)
-      {{0xf8, 0x80, 0x80, 0x80, 0xaf},
-       {0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd}},
+      {{0xF8, 0x80, 0x80, 0x80, 0xAF},
+       {0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD}},
       // 6-byte sequence (not supported anyway)
-      {{0xfc, 0x80, 0x80, 0x80, 0x80, 0xaf},
-       {0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd}},
+      {{0xFC, 0x80, 0x80, 0x80, 0x80, 0xAF},
+       {0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD}},
 
       // Maximum overlong sequences
-      {{0xc1, 0xbf}, {0xfffd, 0xfffd}},
-      {{0xe0, 0x9f, 0xbf}, {0xfffd, 0xfffd, 0xfffd}},
-      {{0xf0, 0x8f, 0xbf, 0xbf}, {0xfffd, 0xfffd, 0xfffd, 0xfffd}},
+      {{0xC1, 0xBF}, {0xFFFD, 0xFFFD}},
+      {{0xE0, 0x9F, 0xBF}, {0xFFFD, 0xFFFD, 0xFFFD}},
+      {{0xF0, 0x8F, 0xBF, 0xBF}, {0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD}},
       // 5-byte sequence (not supported anyway)
-      {{0xf8, 0x87, 0xbf, 0xbf, 0xbf},
-       {0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd}},
+      {{0xF8, 0x87, 0xBF, 0xBF, 0xBF},
+       {0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD}},
       // 6-byte sequence (not supported anyway)
-      {{0xfc, 0x83, 0xbf, 0xbf, 0xbf, 0xbf},
-       {0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd}},
+      {{0xFC, 0x83, 0xBF, 0xBF, 0xBF, 0xBF},
+       {0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD}},
 
       // Overlong encodings for 0
-      {{0xc0, 0x80}, {0xfffd, 0xfffd}},
-      {{0xe0, 0x80, 0x80}, {0xfffd, 0xfffd, 0xfffd}},
-      {{0xf0, 0x80, 0x80, 0x80}, {0xfffd, 0xfffd, 0xfffd, 0xfffd}},
+      {{0xC0, 0x80}, {0xFFFD, 0xFFFD}},
+      {{0xE0, 0x80, 0x80}, {0xFFFD, 0xFFFD, 0xFFFD}},
+      {{0xF0, 0x80, 0x80, 0x80}, {0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD}},
       // 5-byte sequence (not supported anyway)
-      {{0xf8, 0x80, 0x80, 0x80, 0x80},
-       {0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd}},
+      {{0xF8, 0x80, 0x80, 0x80, 0x80},
+       {0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD}},
       // 6-byte sequence (not supported anyway)
-      {{0xfc, 0x80, 0x80, 0x80, 0x80, 0x80},
-       {0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd}},
+      {{0xFC, 0x80, 0x80, 0x80, 0x80, 0x80},
+       {0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD}},
 
       // Illegal code positions:
 
       // Single UTF-16 surrogates
-      {{0xed, 0xa0, 0x80}, {0xfffd, 0xfffd, 0xfffd}},
-      {{0xed, 0xa0, 0x80}, {0xfffd, 0xfffd, 0xfffd}},
-      {{0xed, 0xad, 0xbf}, {0xfffd, 0xfffd, 0xfffd}},
-      {{0xed, 0xae, 0x80}, {0xfffd, 0xfffd, 0xfffd}},
-      {{0xed, 0xaf, 0xbf}, {0xfffd, 0xfffd, 0xfffd}},
-      {{0xed, 0xb0, 0x80}, {0xfffd, 0xfffd, 0xfffd}},
-      {{0xed, 0xbe, 0x80}, {0xfffd, 0xfffd, 0xfffd}},
-      {{0xed, 0xbf, 0xbf}, {0xfffd, 0xfffd, 0xfffd}},
+      {{0xED, 0xA0, 0x80}, {0xFFFD, 0xFFFD, 0xFFFD}},
+      {{0xED, 0xA0, 0x80}, {0xFFFD, 0xFFFD, 0xFFFD}},
+      {{0xED, 0xAD, 0xBF}, {0xFFFD, 0xFFFD, 0xFFFD}},
+      {{0xED, 0xAE, 0x80}, {0xFFFD, 0xFFFD, 0xFFFD}},
+      {{0xED, 0xAF, 0xBF}, {0xFFFD, 0xFFFD, 0xFFFD}},
+      {{0xED, 0xB0, 0x80}, {0xFFFD, 0xFFFD, 0xFFFD}},
+      {{0xED, 0xBE, 0x80}, {0xFFFD, 0xFFFD, 0xFFFD}},
+      {{0xED, 0xBF, 0xBF}, {0xFFFD, 0xFFFD, 0xFFFD}},
 
       // Paired surrogates
-      {{0xed, 0xa0, 0x80, 0xed, 0xb0, 0x80},
-       {0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd}},
-      {{0xed, 0xa0, 0x80, 0xed, 0xbf, 0xbf},
-       {0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd}},
-      {{0xed, 0xad, 0xbf, 0xed, 0xb0, 0x80},
-       {0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd}},
-      {{0xed, 0xad, 0xbf, 0xed, 0xbf, 0xbf},
-       {0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd}},
-      {{0xed, 0xae, 0x80, 0xed, 0xb0, 0x80},
-       {0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd}},
-      {{0xed, 0xae, 0x80, 0xed, 0xbf, 0xbf},
-       {0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd}},
-      {{0xed, 0xaf, 0xbf, 0xed, 0xb0, 0x80},
-       {0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd}},
-      {{0xed, 0xaf, 0xbf, 0xed, 0xbf, 0xbf},
-       {0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd}},
+      {{0xED, 0xA0, 0x80, 0xED, 0xB0, 0x80},
+       {0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD}},
+      {{0xED, 0xA0, 0x80, 0xED, 0xBF, 0xBF},
+       {0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD}},
+      {{0xED, 0xAD, 0xBF, 0xED, 0xB0, 0x80},
+       {0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD}},
+      {{0xED, 0xAD, 0xBF, 0xED, 0xBF, 0xBF},
+       {0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD}},
+      {{0xED, 0xAE, 0x80, 0xED, 0xB0, 0x80},
+       {0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD}},
+      {{0xED, 0xAE, 0x80, 0xED, 0xBF, 0xBF},
+       {0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD}},
+      {{0xED, 0xAF, 0xBF, 0xED, 0xB0, 0x80},
+       {0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD}},
+      {{0xED, 0xAF, 0xBF, 0xED, 0xBF, 0xBF},
+       {0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD}},
 
       // Surrogates with the last byte missing.
-      {{0xed, 0xa0}, {0xfffd, 0xfffd}},
-      {{0xed, 0xa0}, {0xfffd, 0xfffd}},
-      {{0xed, 0xad}, {0xfffd, 0xfffd}},
-      {{0xed, 0xae}, {0xfffd, 0xfffd}},
-      {{0xed, 0xaf}, {0xfffd, 0xfffd}},
-      {{0xed, 0xb0}, {0xfffd, 0xfffd}},
-      {{0xed, 0xbe}, {0xfffd, 0xfffd}},
-      {{0xed, 0xbf}, {0xfffd, 0xfffd}},
+      {{0xED, 0xA0}, {0xFFFD, 0xFFFD}},
+      {{0xED, 0xA0}, {0xFFFD, 0xFFFD}},
+      {{0xED, 0xAD}, {0xFFFD, 0xFFFD}},
+      {{0xED, 0xAE}, {0xFFFD, 0xFFFD}},
+      {{0xED, 0xAF}, {0xFFFD, 0xFFFD}},
+      {{0xED, 0xB0}, {0xFFFD, 0xFFFD}},
+      {{0xED, 0xBE}, {0xFFFD, 0xFFFD}},
+      {{0xED, 0xBF}, {0xFFFD, 0xFFFD}},
 
       // Other non-characters
-      {{0xef, 0xbf, 0xbe}, {0xfffe}},
-      {{0xef, 0xbf, 0xbf}, {0xffff}},
-      {{0xef, 0xb7, 0x90, 0xef, 0xb7, 0x91, 0xef, 0xb7, 0x92, 0xef, 0xb7, 0x93,
-        0xef, 0xb7, 0x94, 0xef, 0xb7, 0x95, 0xef, 0xb7, 0x96, 0xef, 0xb7, 0x97,
-        0xef, 0xb7, 0x98, 0xef, 0xb7, 0x99, 0xef, 0xb7, 0x9a, 0xef, 0xb7, 0x9b,
-        0xef, 0xb7, 0x9c, 0xef, 0xb7, 0x9d, 0xef, 0xb7, 0x9e, 0xef, 0xb7, 0x9f,
-        0xef, 0xb7, 0xa0, 0xef, 0xb7, 0xa1, 0xef, 0xb7, 0xa2, 0xef, 0xb7, 0xa3,
-        0xef, 0xb7, 0xa4, 0xef, 0xb7, 0xa5, 0xef, 0xb7, 0xa6, 0xef, 0xb7, 0xa7,
-        0xef, 0xb7, 0xa8, 0xef, 0xb7, 0xa9, 0xef, 0xb7, 0xaa, 0xef, 0xb7, 0xab,
-        0xef, 0xb7, 0xac, 0xef, 0xb7, 0xad, 0xef, 0xb7, 0xae, 0xef, 0xb7, 0xaf},
-       {0xfdd0, 0xfdd1, 0xfdd2, 0xfdd3, 0xfdd4, 0xfdd5, 0xfdd6, 0xfdd7,
-        0xfdd8, 0xfdd9, 0xfdda, 0xfddb, 0xfddc, 0xfddd, 0xfdde, 0xfddf,
-        0xfde0, 0xfde1, 0xfde2, 0xfde3, 0xfde4, 0xfde5, 0xfde6, 0xfde7,
-        0xfde8, 0xfde9, 0xfdea, 0xfdeb, 0xfdec, 0xfded, 0xfdee, 0xfdef}},
-      {{0xf0, 0x9f, 0xbf, 0xbe, 0xf0, 0x9f, 0xbf, 0xbf, 0xf0, 0xaf, 0xbf,
-        0xbe, 0xf0, 0xaf, 0xbf, 0xbf, 0xf0, 0xbf, 0xbf, 0xbe, 0xf0, 0xbf,
-        0xbf, 0xbf, 0xf1, 0x8f, 0xbf, 0xbe, 0xf1, 0x8f, 0xbf, 0xbf, 0xf1,
-        0x9f, 0xbf, 0xbe, 0xf1, 0x9f, 0xbf, 0xbf, 0xf1, 0xaf, 0xbf, 0xbe,
-        0xf1, 0xaf, 0xbf, 0xbf, 0xf1, 0xbf, 0xbf, 0xbe, 0xf1, 0xbf, 0xbf,
-        0xbf, 0xf2, 0x8f, 0xbf, 0xbe, 0xf2, 0x8f, 0xbf, 0xbf},
-       {0x1fffe, 0x1ffff, 0x2fffe, 0x2ffff, 0x3fffe, 0x3ffff, 0x4fffe, 0x4ffff,
-        0x5fffe, 0x5ffff, 0x6fffe, 0x6ffff, 0x7fffe, 0x7ffff, 0x8fffe,
-        0x8ffff}},
+      {{0xEF, 0xBF, 0xBE}, {0xFFFE}},
+      {{0xEF, 0xBF, 0xBF}, {0xFFFF}},
+      {{0xEF, 0xB7, 0x90, 0xEF, 0xB7, 0x91, 0xEF, 0xB7, 0x92, 0xEF, 0xB7, 0x93,
+        0xEF, 0xB7, 0x94, 0xEF, 0xB7, 0x95, 0xEF, 0xB7, 0x96, 0xEF, 0xB7, 0x97,
+        0xEF, 0xB7, 0x98, 0xEF, 0xB7, 0x99, 0xEF, 0xB7, 0x9A, 0xEF, 0xB7, 0x9B,
+        0xEF, 0xB7, 0x9C, 0xEF, 0xB7, 0x9D, 0xEF, 0xB7, 0x9E, 0xEF, 0xB7, 0x9F,
+        0xEF, 0xB7, 0xA0, 0xEF, 0xB7, 0xA1, 0xEF, 0xB7, 0xA2, 0xEF, 0xB7, 0xA3,
+        0xEF, 0xB7, 0xA4, 0xEF, 0xB7, 0xA5, 0xEF, 0xB7, 0xA6, 0xEF, 0xB7, 0xA7,
+        0xEF, 0xB7, 0xA8, 0xEF, 0xB7, 0xA9, 0xEF, 0xB7, 0xAA, 0xEF, 0xB7, 0xAB,
+        0xEF, 0xB7, 0xAC, 0xEF, 0xB7, 0xAD, 0xEF, 0xB7, 0xAE, 0xEF, 0xB7, 0xAF},
+       {0xFDD0, 0xFDD1, 0xFDD2, 0xFDD3, 0xFDD4, 0xFDD5, 0xFDD6, 0xFDD7,
+        0xFDD8, 0xFDD9, 0xFDDA, 0xFDDB, 0xFDDC, 0xFDDD, 0xFDDE, 0xFDDF,
+        0xFDE0, 0xFDE1, 0xFDE2, 0xFDE3, 0xFDE4, 0xFDE5, 0xFDE6, 0xFDE7,
+        0xFDE8, 0xFDE9, 0xFDEA, 0xFDEB, 0xFDEC, 0xFDED, 0xFDEE, 0xFDEF}},
+      {{0xF0, 0x9F, 0xBF, 0xBE, 0xF0, 0x9F, 0xBF, 0xBF, 0xF0, 0xAF, 0xBF,
+        0xBE, 0xF0, 0xAF, 0xBF, 0xBF, 0xF0, 0xBF, 0xBF, 0xBE, 0xF0, 0xBF,
+        0xBF, 0xBF, 0xF1, 0x8F, 0xBF, 0xBE, 0xF1, 0x8F, 0xBF, 0xBF, 0xF1,
+        0x9F, 0xBF, 0xBE, 0xF1, 0x9F, 0xBF, 0xBF, 0xF1, 0xAF, 0xBF, 0xBE,
+        0xF1, 0xAF, 0xBF, 0xBF, 0xF1, 0xBF, 0xBF, 0xBE, 0xF1, 0xBF, 0xBF,
+        0xBF, 0xF2, 0x8F, 0xBF, 0xBE, 0xF2, 0x8F, 0xBF, 0xBF},
+       {0x1FFFE, 0x1FFFF, 0x2FFFE, 0x2FFFF, 0x3FFFE, 0x3FFFF, 0x4FFFE, 0x4FFFF,
+        0x5FFFE, 0x5FFFF, 0x6FFFE, 0x6FFFF, 0x7FFFE, 0x7FFFF, 0x8FFFE,
+        0x8FFFF}},
   };
 
   for (auto test : data) {
diff --git a/src/v8/test/unittests/unittests.gyp b/src/v8/test/unittests/unittests.gyp
index 38d071d..50e820e 100644
--- a/src/v8/test/unittests/unittests.gyp
+++ b/src/v8/test/unittests/unittests.gyp
@@ -8,6 +8,7 @@
   'variables': {
     'v8_code': 1,
     'unittests_sources': [  ### gcmole(all) ###
+      'allocation-unittest.cc',
       'api/access-check-unittest.cc',
       'api/exception-unittest.cc',
       'api/interceptor-unittest.cc',
@@ -36,6 +37,7 @@
       'base/sys-info-unittest.cc',
       'base/template-utils-unittest.cc',
       'base/utils/random-number-generator-unittest.cc',
+      'bigint-unittest.cc',
       'cancelable-tasks-unittest.cc',
       'char-predicates-unittest.cc',
       "code-stub-assembler-unittest.cc",
@@ -89,6 +91,7 @@
       'compiler/schedule-unittest.cc',
       'compiler/scheduler-unittest.cc',
       'compiler/scheduler-rpo-unittest.cc',
+      'compiler/simplified-lowering-unittest.cc',
       'compiler/simplified-operator-reducer-unittest.cc',
       'compiler/simplified-operator-unittest.cc',
       'compiler/state-values-utils-unittest.cc',
@@ -138,6 +141,7 @@
       'libplatform/worker-thread-unittest.cc',
       'locked-queue-unittest.cc',
       'object-unittest.cc',
+      'parser/ast-value-unittest.cc',
       'parser/preparser-unittest.cc',
       'register-configuration-unittest.cc',
       'run-all-unittests.cc',
@@ -147,6 +151,7 @@
       'test-utils.h',
       'test-utils.cc',
       'unicode-unittest.cc',
+      'utils-unittest.cc',
       'value-serializer-unittest.cc',
       'zone/segmentpool-unittest.cc',
       'zone/zone-allocator-unittest.cc',
@@ -155,11 +160,12 @@
       'wasm/control-transfer-unittest.cc',
       'wasm/decoder-unittest.cc',
       'wasm/function-body-decoder-unittest.cc',
-      'wasm/wasm-heap-unittest.cc',
+      'wasm/wasm-code-manager-unittest.cc',
       'wasm/leb-helper-unittest.cc',
       'wasm/loop-assignment-analysis-unittest.cc',
       'wasm/module-decoder-unittest.cc',
       'wasm/streaming-decoder-unittest.cc',
+      'wasm/trap-handler-unittest.cc',
       'wasm/wasm-macro-gen-unittest.cc',
       'wasm/wasm-module-builder-unittest.cc',
       'wasm/wasm-opcodes-unittest.cc',
diff --git a/src/v8/test/unittests/unittests.isolate b/src/v8/test/unittests/unittests.isolate
index ae503bf..ec3bae4 100644
--- a/src/v8/test/unittests/unittests.isolate
+++ b/src/v8/test/unittests/unittests.isolate
@@ -5,6 +5,7 @@
   'variables': {
     'files': [
       '<(PRODUCT_DIR)/unittests<(EXECUTABLE_SUFFIX)',
+      './testcfg.py',
       './unittests.status',
     ],
   },
@@ -12,4 +13,4 @@
     '../../src/base.isolate',
     '../../tools/testrunner/testrunner.isolate',
   ],
-}
\ No newline at end of file
+}
diff --git a/src/v8/test/unittests/unittests.status b/src/v8/test/unittests/unittests.status
index d8b7c11..d439913 100644
--- a/src/v8/test/unittests/unittests.status
+++ b/src/v8/test/unittests/unittests.status
@@ -3,8 +3,4 @@
 # found in the LICENSE file.
 
 [
-[ALWAYS, {
-    # BUG(5677): Real timers are flaky
-    'RuntimeCallStatsTest.*': [SKIP],
-}], # ALWAYS
 ]
diff --git a/src/v8/test/unittests/utils-unittest.cc b/src/v8/test/unittests/utils-unittest.cc
new file mode 100644
index 0000000..65088d8
--- /dev/null
+++ b/src/v8/test/unittests/utils-unittest.cc
@@ -0,0 +1,113 @@
+// Copyright 2014 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include <limits>
+
+#include "src/utils.h"
+#include "testing/gtest-support.h"
+
+namespace v8 {
+namespace internal {
+
+template <typename T>
+class UtilsTest : public ::testing::Test {};
+
+typedef ::testing::Types<signed char, unsigned char,
+                         short,                    // NOLINT(runtime/int)
+                         unsigned short,           // NOLINT(runtime/int)
+                         int, unsigned int, long,  // NOLINT(runtime/int)
+                         unsigned long,            // NOLINT(runtime/int)
+                         long long,                // NOLINT(runtime/int)
+                         unsigned long long,       // NOLINT(runtime/int)
+                         int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t,
+                         int64_t, uint64_t>
+    IntegerTypes;
+
+TYPED_TEST_CASE(UtilsTest, IntegerTypes);
+
+TYPED_TEST(UtilsTest, SaturateSub) {
+  TypeParam min = std::numeric_limits<TypeParam>::min();
+  TypeParam max = std::numeric_limits<TypeParam>::max();
+  EXPECT_EQ(SaturateSub<TypeParam>(min, 0), min);
+  EXPECT_EQ(SaturateSub<TypeParam>(max, 0), max);
+  EXPECT_EQ(SaturateSub<TypeParam>(max, min), max);
+  EXPECT_EQ(SaturateSub<TypeParam>(min, max), min);
+  EXPECT_EQ(SaturateSub<TypeParam>(min, max / 3), min);
+  EXPECT_EQ(SaturateSub<TypeParam>(min + 1, 2), min);
+  if (std::numeric_limits<TypeParam>::is_signed) {
+    EXPECT_EQ(SaturateSub<TypeParam>(min, min), static_cast<TypeParam>(0));
+    EXPECT_EQ(SaturateSub<TypeParam>(0, min), max);
+    EXPECT_EQ(SaturateSub<TypeParam>(max / 3, min), max);
+    EXPECT_EQ(SaturateSub<TypeParam>(max / 5, min), max);
+    EXPECT_EQ(SaturateSub<TypeParam>(min / 3, max), min);
+    EXPECT_EQ(SaturateSub<TypeParam>(min / 9, max), min);
+    EXPECT_EQ(SaturateSub<TypeParam>(max, min / 3), max);
+    EXPECT_EQ(SaturateSub<TypeParam>(min, max / 3), min);
+    EXPECT_EQ(SaturateSub<TypeParam>(max / 3 * 2, min / 2), max);
+    EXPECT_EQ(SaturateSub<TypeParam>(min / 3 * 2, max / 2), min);
+  } else {
+    EXPECT_EQ(SaturateSub<TypeParam>(min, min), min);
+    EXPECT_EQ(SaturateSub<TypeParam>(0, min), min);
+    EXPECT_EQ(SaturateSub<TypeParam>(0, max), min);
+    EXPECT_EQ(SaturateSub<TypeParam>(max / 3, max), min);
+    EXPECT_EQ(SaturateSub<TypeParam>(max - 3, max), min);
+  }
+  TypeParam test_cases[] = {static_cast<TypeParam>(min / 23),
+                            static_cast<TypeParam>(max / 3),
+                            63,
+                            static_cast<TypeParam>(min / 6),
+                            static_cast<TypeParam>(max / 55),
+                            static_cast<TypeParam>(min / 2),
+                            static_cast<TypeParam>(max / 2),
+                            0,
+                            1,
+                            2,
+                            3,
+                            4,
+                            42};
+  TRACED_FOREACH(TypeParam, x, test_cases) {
+    TRACED_FOREACH(TypeParam, y, test_cases) {
+      if (std::numeric_limits<TypeParam>::is_signed) {
+        EXPECT_EQ(SaturateSub<TypeParam>(x, y), x - y);
+      } else {
+        EXPECT_EQ(SaturateSub<TypeParam>(x, y), y > x ? min : x - y);
+      }
+    }
+  }
+}
+
+TYPED_TEST(UtilsTest, SaturateAdd) {
+  TypeParam min = std::numeric_limits<TypeParam>::min();
+  TypeParam max = std::numeric_limits<TypeParam>::max();
+  EXPECT_EQ(SaturateAdd<TypeParam>(min, min), min);
+  EXPECT_EQ(SaturateAdd<TypeParam>(max, max), max);
+  EXPECT_EQ(SaturateAdd<TypeParam>(min, min / 3), min);
+  EXPECT_EQ(SaturateAdd<TypeParam>(max / 8 * 7, max / 3 * 2), max);
+  EXPECT_EQ(SaturateAdd<TypeParam>(min / 3 * 2, min / 8 * 7), min);
+  EXPECT_EQ(SaturateAdd<TypeParam>(max / 20 * 18, max / 25 * 18), max);
+  EXPECT_EQ(SaturateAdd<TypeParam>(min / 3 * 2, min / 3 * 2), min);
+  EXPECT_EQ(SaturateAdd<TypeParam>(max - 1, 2), max);
+  EXPECT_EQ(SaturateAdd<TypeParam>(max - 100, 101), max);
+  TypeParam test_cases[] = {static_cast<TypeParam>(min / 23),
+                            static_cast<TypeParam>(max / 3),
+                            63,
+                            static_cast<TypeParam>(min / 6),
+                            static_cast<TypeParam>(max / 55),
+                            static_cast<TypeParam>(min / 2),
+                            static_cast<TypeParam>(max / 2),
+                            0,
+                            1,
+                            2,
+                            3,
+                            4,
+                            42};
+  TRACED_FOREACH(TypeParam, x, test_cases) {
+    TRACED_FOREACH(TypeParam, y, test_cases) {
+      EXPECT_EQ(SaturateAdd<TypeParam>(x, y), x + y);
+    }
+  }
+}
+
+}  // namespace internal
+}  // namespace v8
diff --git a/src/v8/test/unittests/value-serializer-unittest.cc b/src/v8/test/unittests/value-serializer-unittest.cc
index 45e7784..c143b58 100644
--- a/src/v8/test/unittests/value-serializer-unittest.cc
+++ b/src/v8/test/unittests/value-serializer-unittest.cc
@@ -11,6 +11,7 @@
 #include "src/api.h"
 #include "src/base/build_config.h"
 #include "src/objects-inl.h"
+#include "src/wasm/wasm-objects.h"
 #include "test/unittests/test-utils.h"
 #include "testing/gmock/include/gmock/gmock.h"
 #include "testing/gtest/include/gtest/gtest.h"
@@ -288,11 +289,11 @@
 
 TEST_F(ValueSerializerTest, DecodeInvalid) {
   // Version tag but no content.
-  InvalidDecodeTest({0xff});
+  InvalidDecodeTest({0xFF});
   // Version too large.
-  InvalidDecodeTest({0xff, 0x7f, 0x5f});
+  InvalidDecodeTest({0xFF, 0x7F, 0x5F});
   // Nonsense tag.
-  InvalidDecodeTest({0xff, 0x09, 0xdd});
+  InvalidDecodeTest({0xFF, 0x09, 0xDD});
 }
 
 TEST_F(ValueSerializerTest, RoundTripOddball) {
@@ -308,27 +309,27 @@
 
 TEST_F(ValueSerializerTest, DecodeOddball) {
   // What this code is expected to generate.
-  DecodeTest({0xff, 0x09, 0x5f},
+  DecodeTest({0xFF, 0x09, 0x5F},
              [](Local<Value> value) { EXPECT_TRUE(value->IsUndefined()); });
-  DecodeTest({0xff, 0x09, 0x54},
+  DecodeTest({0xFF, 0x09, 0x54},
              [](Local<Value> value) { EXPECT_TRUE(value->IsTrue()); });
-  DecodeTest({0xff, 0x09, 0x46},
+  DecodeTest({0xFF, 0x09, 0x46},
              [](Local<Value> value) { EXPECT_TRUE(value->IsFalse()); });
-  DecodeTest({0xff, 0x09, 0x30},
+  DecodeTest({0xFF, 0x09, 0x30},
              [](Local<Value> value) { EXPECT_TRUE(value->IsNull()); });
 
   // What v9 of the Blink code generates.
-  DecodeTest({0xff, 0x09, 0x3f, 0x00, 0x5f, 0x00},
+  DecodeTest({0xFF, 0x09, 0x3F, 0x00, 0x5F, 0x00},
              [](Local<Value> value) { EXPECT_TRUE(value->IsUndefined()); });
-  DecodeTest({0xff, 0x09, 0x3f, 0x00, 0x54, 0x00},
+  DecodeTest({0xFF, 0x09, 0x3F, 0x00, 0x54, 0x00},
              [](Local<Value> value) { EXPECT_TRUE(value->IsTrue()); });
-  DecodeTest({0xff, 0x09, 0x3f, 0x00, 0x46, 0x00},
+  DecodeTest({0xFF, 0x09, 0x3F, 0x00, 0x46, 0x00},
              [](Local<Value> value) { EXPECT_TRUE(value->IsFalse()); });
-  DecodeTest({0xff, 0x09, 0x3f, 0x00, 0x30, 0x00},
+  DecodeTest({0xFF, 0x09, 0x3F, 0x00, 0x30, 0x00},
              [](Local<Value> value) { EXPECT_TRUE(value->IsNull()); });
 
   // v0 (with no explicit version).
-  DecodeTest({0x5f, 0x00},
+  DecodeTest({0x5F, 0x00},
              [](Local<Value> value) { EXPECT_TRUE(value->IsUndefined()); });
   DecodeTest({0x54, 0x00},
              [](Local<Value> value) { EXPECT_TRUE(value->IsTrue()); });
@@ -375,44 +376,40 @@
 
 TEST_F(ValueSerializerTest, DecodeNumber) {
   // 42 zig-zag encoded (signed)
-  DecodeTest({0xff, 0x09, 0x49, 0x54},
-             [](Local<Value> value) {
-               ASSERT_TRUE(value->IsInt32());
-               EXPECT_EQ(42, Int32::Cast(*value)->Value());
-             });
+  DecodeTest({0xFF, 0x09, 0x49, 0x54}, [](Local<Value> value) {
+    ASSERT_TRUE(value->IsInt32());
+    EXPECT_EQ(42, Int32::Cast(*value)->Value());
+  });
   // 42 varint encoded (unsigned)
-  DecodeTest({0xff, 0x09, 0x55, 0x2a},
-             [](Local<Value> value) {
-               ASSERT_TRUE(value->IsInt32());
-               EXPECT_EQ(42, Int32::Cast(*value)->Value());
-             });
+  DecodeTest({0xFF, 0x09, 0x55, 0x2A}, [](Local<Value> value) {
+    ASSERT_TRUE(value->IsInt32());
+    EXPECT_EQ(42, Int32::Cast(*value)->Value());
+  });
   // 160 zig-zag encoded (signed)
-  DecodeTest({0xff, 0x09, 0x49, 0xc0, 0x02},
-             [](Local<Value> value) {
-               ASSERT_TRUE(value->IsInt32());
-               ASSERT_EQ(160, Int32::Cast(*value)->Value());
-             });
+  DecodeTest({0xFF, 0x09, 0x49, 0xC0, 0x02}, [](Local<Value> value) {
+    ASSERT_TRUE(value->IsInt32());
+    ASSERT_EQ(160, Int32::Cast(*value)->Value());
+  });
   // 160 varint encoded (unsigned)
-  DecodeTest({0xff, 0x09, 0x55, 0xa0, 0x01},
-             [](Local<Value> value) {
-               ASSERT_TRUE(value->IsInt32());
-               ASSERT_EQ(160, Int32::Cast(*value)->Value());
-             });
+  DecodeTest({0xFF, 0x09, 0x55, 0xA0, 0x01}, [](Local<Value> value) {
+    ASSERT_TRUE(value->IsInt32());
+    ASSERT_EQ(160, Int32::Cast(*value)->Value());
+  });
 #if defined(V8_TARGET_LITTLE_ENDIAN)
   // IEEE 754 doubles, little-endian byte order
-  DecodeTest({0xff, 0x09, 0x4e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd0, 0xbf},
+  DecodeTest({0xFF, 0x09, 0x4E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xD0, 0xBF},
              [](Local<Value> value) {
                ASSERT_TRUE(value->IsNumber());
                EXPECT_EQ(-0.25, Number::Cast(*value)->Value());
              });
   // quiet NaN
-  DecodeTest({0xff, 0x09, 0x4e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x7f},
+  DecodeTest({0xFF, 0x09, 0x4E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x7F},
              [](Local<Value> value) {
                ASSERT_TRUE(value->IsNumber());
                EXPECT_TRUE(std::isnan(Number::Cast(*value)->Value()));
              });
   // signaling NaN
-  DecodeTest({0xff, 0x09, 0x4e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf4, 0x7f},
+  DecodeTest({0xFF, 0x09, 0x4E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF4, 0x7F},
              [](Local<Value> value) {
                ASSERT_TRUE(value->IsNumber());
                EXPECT_TRUE(std::isnan(Number::Cast(*value)->Value()));
@@ -457,24 +454,23 @@
 
 TEST_F(ValueSerializerTest, DecodeString) {
   // Decoding the strings above from UTF-8.
-  DecodeTest({0xff, 0x09, 0x53, 0x00},
-             [](Local<Value> value) {
-               ASSERT_TRUE(value->IsString());
-               EXPECT_EQ(0, String::Cast(*value)->Length());
-             });
-  DecodeTest({0xff, 0x09, 0x53, 0x05, 'H', 'e', 'l', 'l', 'o'},
+  DecodeTest({0xFF, 0x09, 0x53, 0x00}, [](Local<Value> value) {
+    ASSERT_TRUE(value->IsString());
+    EXPECT_EQ(0, String::Cast(*value)->Length());
+  });
+  DecodeTest({0xFF, 0x09, 0x53, 0x05, 'H', 'e', 'l', 'l', 'o'},
              [this](Local<Value> value) {
                ASSERT_TRUE(value->IsString());
                EXPECT_EQ(5, String::Cast(*value)->Length());
                EXPECT_EQ(kHelloString, Utf8Value(value));
              });
-  DecodeTest({0xff, 0x09, 0x53, 0x07, 'Q', 'u', 0xc3, 0xa9, 'b', 'e', 'c'},
+  DecodeTest({0xFF, 0x09, 0x53, 0x07, 'Q', 'u', 0xC3, 0xA9, 'b', 'e', 'c'},
              [this](Local<Value> value) {
                ASSERT_TRUE(value->IsString());
                EXPECT_EQ(6, String::Cast(*value)->Length());
                EXPECT_EQ(kQuebecString, Utf8Value(value));
              });
-  DecodeTest({0xff, 0x09, 0x53, 0x04, 0xf0, 0x9f, 0x91, 0x8a},
+  DecodeTest({0xFF, 0x09, 0x53, 0x04, 0xF0, 0x9F, 0x91, 0x8A},
              [this](Local<Value> value) {
                ASSERT_TRUE(value->IsString());
                EXPECT_EQ(2, String::Cast(*value)->Length());
@@ -482,17 +478,17 @@
              });
 
   // And from Latin-1 (for the ones that fit).
-  DecodeTest({0xff, 0x0a, 0x22, 0x00}, [](Local<Value> value) {
+  DecodeTest({0xFF, 0x0A, 0x22, 0x00}, [](Local<Value> value) {
     ASSERT_TRUE(value->IsString());
     EXPECT_EQ(0, String::Cast(*value)->Length());
   });
-  DecodeTest({0xff, 0x0a, 0x22, 0x05, 'H', 'e', 'l', 'l', 'o'},
+  DecodeTest({0xFF, 0x0A, 0x22, 0x05, 'H', 'e', 'l', 'l', 'o'},
              [this](Local<Value> value) {
                ASSERT_TRUE(value->IsString());
                EXPECT_EQ(5, String::Cast(*value)->Length());
                EXPECT_EQ(kHelloString, Utf8Value(value));
              });
-  DecodeTest({0xff, 0x0a, 0x22, 0x06, 'Q', 'u', 0xe9, 'b', 'e', 'c'},
+  DecodeTest({0xFF, 0x0A, 0x22, 0x06, 'Q', 'u', 0xE9, 'b', 'e', 'c'},
              [this](Local<Value> value) {
                ASSERT_TRUE(value->IsString());
                EXPECT_EQ(6, String::Cast(*value)->Length());
@@ -501,26 +497,25 @@
 
 // And from two-byte strings (endianness dependent).
 #if defined(V8_TARGET_LITTLE_ENDIAN)
-  DecodeTest({0xff, 0x09, 0x63, 0x00},
-             [](Local<Value> value) {
-               ASSERT_TRUE(value->IsString());
-               EXPECT_EQ(0, String::Cast(*value)->Length());
-             });
-  DecodeTest({0xff, 0x09, 0x63, 0x0a, 'H', '\0', 'e', '\0', 'l', '\0', 'l',
+  DecodeTest({0xFF, 0x09, 0x63, 0x00}, [](Local<Value> value) {
+    ASSERT_TRUE(value->IsString());
+    EXPECT_EQ(0, String::Cast(*value)->Length());
+  });
+  DecodeTest({0xFF, 0x09, 0x63, 0x0A, 'H', '\0', 'e', '\0', 'l', '\0', 'l',
               '\0', 'o', '\0'},
              [this](Local<Value> value) {
                ASSERT_TRUE(value->IsString());
                EXPECT_EQ(5, String::Cast(*value)->Length());
                EXPECT_EQ(kHelloString, Utf8Value(value));
              });
-  DecodeTest({0xff, 0x09, 0x63, 0x0c, 'Q', '\0', 'u', '\0', 0xe9, '\0', 'b',
+  DecodeTest({0xFF, 0x09, 0x63, 0x0C, 'Q', '\0', 'u', '\0', 0xE9, '\0', 'b',
               '\0', 'e', '\0', 'c', '\0'},
              [this](Local<Value> value) {
                ASSERT_TRUE(value->IsString());
                EXPECT_EQ(6, String::Cast(*value)->Length());
                EXPECT_EQ(kQuebecString, Utf8Value(value));
              });
-  DecodeTest({0xff, 0x09, 0x63, 0x04, 0x3d, 0xd8, 0x4a, 0xdc},
+  DecodeTest({0xFF, 0x09, 0x63, 0x04, 0x3D, 0xD8, 0x4A, 0xDC},
              [this](Local<Value> value) {
                ASSERT_TRUE(value->IsString());
                EXPECT_EQ(2, String::Cast(*value)->Length());
@@ -532,14 +527,14 @@
 
 TEST_F(ValueSerializerTest, DecodeInvalidString) {
   // UTF-8 string with too few bytes available.
-  InvalidDecodeTest({0xff, 0x09, 0x53, 0x10, 'v', '8'});
+  InvalidDecodeTest({0xFF, 0x09, 0x53, 0x10, 'v', '8'});
   // One-byte string with too few bytes available.
-  InvalidDecodeTest({0xff, 0x0a, 0x22, 0x10, 'v', '8'});
+  InvalidDecodeTest({0xFF, 0x0A, 0x22, 0x10, 'v', '8'});
 #if defined(V8_TARGET_LITTLE_ENDIAN)
   // Two-byte string with too few bytes available.
-  InvalidDecodeTest({0xff, 0x09, 0x63, 0x10, 'v', '\0', '8', '\0'});
+  InvalidDecodeTest({0xFF, 0x09, 0x63, 0x10, 'v', '\0', '8', '\0'});
   // Two-byte string with an odd byte length.
-  InvalidDecodeTest({0xff, 0x09, 0x63, 0x03, 'v', '\0', '8'});
+  InvalidDecodeTest({0xFF, 0x09, 0x63, 0x03, 'v', '\0', '8'});
 #endif
   // TODO(jbroman): The same for big-endian systems.
 }
@@ -564,9 +559,9 @@
         // what that value may be.
         const uint8_t expected_prefix[] = {0x00, 0x63, 0x94, 0x03};
         ASSERT_GT(data.size(), sizeof(expected_prefix) + 2);
-        EXPECT_EQ(0xff, data[0]);
+        EXPECT_EQ(0xFF, data[0]);
         EXPECT_GE(data[1], 0x09);
-        EXPECT_LE(data[1], 0x7f);
+        EXPECT_LE(data[1], 0x7F);
         EXPECT_TRUE(std::equal(std::begin(expected_prefix),
                                std::end(expected_prefix), data.begin() + 2));
       });
@@ -629,7 +624,7 @@
 
 TEST_F(ValueSerializerTest, DecodeDictionaryObject) {
   // Empty object.
-  DecodeTest({0xff, 0x09, 0x3f, 0x00, 0x6f, 0x7b, 0x00, 0x00},
+  DecodeTest({0xFF, 0x09, 0x3F, 0x00, 0x6F, 0x7B, 0x00, 0x00},
              [this](Local<Value> value) {
                ASSERT_TRUE(value->IsObject());
                EXPECT_TRUE(EvaluateScriptForResultBool(
@@ -639,8 +634,8 @@
              });
   // String key.
   DecodeTest(
-      {0xff, 0x09, 0x3f, 0x00, 0x6f, 0x3f, 0x01, 0x53, 0x01, 0x61, 0x3f, 0x01,
-       0x49, 0x54, 0x7b, 0x01},
+      {0xFF, 0x09, 0x3F, 0x00, 0x6F, 0x3F, 0x01, 0x53, 0x01, 0x61, 0x3F, 0x01,
+       0x49, 0x54, 0x7B, 0x01},
       [this](Local<Value> value) {
         ASSERT_TRUE(value->IsObject());
         EXPECT_TRUE(EvaluateScriptForResultBool("result.hasOwnProperty('a')"));
@@ -650,8 +645,8 @@
       });
   // Integer key (treated as a string, but may be encoded differently).
   DecodeTest(
-      {0xff, 0x09, 0x3f, 0x00, 0x6f, 0x3f, 0x01, 0x49, 0x54, 0x3f, 0x01, 0x53,
-       0x01, 0x61, 0x7b, 0x01},
+      {0xFF, 0x09, 0x3F, 0x00, 0x6F, 0x3F, 0x01, 0x49, 0x54, 0x3F, 0x01, 0x53,
+       0x01, 0x61, 0x7B, 0x01},
       [this](Local<Value> value) {
         ASSERT_TRUE(value->IsObject());
         EXPECT_TRUE(EvaluateScriptForResultBool("result.hasOwnProperty('42')"));
@@ -661,20 +656,20 @@
       });
   // Key order must be preserved.
   DecodeTest(
-      {0xff, 0x09, 0x3f, 0x00, 0x6f, 0x3f, 0x01, 0x53, 0x01, 0x78, 0x3f, 0x01,
-       0x49, 0x02, 0x3f, 0x01, 0x53, 0x01, 0x79, 0x3f, 0x01, 0x49, 0x04, 0x3f,
-       0x01, 0x53, 0x01, 0x61, 0x3f, 0x01, 0x49, 0x06, 0x7b, 0x03},
+      {0xFF, 0x09, 0x3F, 0x00, 0x6F, 0x3F, 0x01, 0x53, 0x01, 0x78, 0x3F, 0x01,
+       0x49, 0x02, 0x3F, 0x01, 0x53, 0x01, 0x79, 0x3F, 0x01, 0x49, 0x04, 0x3F,
+       0x01, 0x53, 0x01, 0x61, 0x3F, 0x01, 0x49, 0x06, 0x7B, 0x03},
       [this](Local<Value> value) {
         EXPECT_TRUE(EvaluateScriptForResultBool(
             "Object.getOwnPropertyNames(result).toString() === 'x,y,a'"));
       });
   // A harder case of enumeration order.
   DecodeTest(
-      {0xff, 0x09, 0x3f, 0x00, 0x6f, 0x3f, 0x01, 0x49, 0x02, 0x3f, 0x01,
-       0x49, 0x00, 0x3f, 0x01, 0x55, 0xfe, 0xff, 0xff, 0xff, 0x0f, 0x3f,
-       0x01, 0x49, 0x06, 0x3f, 0x01, 0x53, 0x01, 0x61, 0x3f, 0x01, 0x49,
-       0x04, 0x3f, 0x01, 0x53, 0x0a, 0x34, 0x32, 0x39, 0x34, 0x39, 0x36,
-       0x37, 0x32, 0x39, 0x35, 0x3f, 0x01, 0x49, 0x02, 0x7b, 0x04},
+      {0xFF, 0x09, 0x3F, 0x00, 0x6F, 0x3F, 0x01, 0x49, 0x02, 0x3F, 0x01,
+       0x49, 0x00, 0x3F, 0x01, 0x55, 0xFE, 0xFF, 0xFF, 0xFF, 0x0F, 0x3F,
+       0x01, 0x49, 0x06, 0x3F, 0x01, 0x53, 0x01, 0x61, 0x3F, 0x01, 0x49,
+       0x04, 0x3F, 0x01, 0x53, 0x0A, 0x34, 0x32, 0x39, 0x34, 0x39, 0x36,
+       0x37, 0x32, 0x39, 0x35, 0x3F, 0x01, 0x49, 0x02, 0x7B, 0x04},
       [this](Local<Value> value) {
         EXPECT_TRUE(EvaluateScriptForResultBool(
             "Object.getOwnPropertyNames(result).toString() === "
@@ -688,8 +683,8 @@
   // before its properties are deserialized, so that references to it can be
   // resolved.
   DecodeTest(
-      {0xff, 0x09, 0x3f, 0x00, 0x6f, 0x3f, 0x01, 0x53, 0x04, 0x73,
-       0x65, 0x6c, 0x66, 0x3f, 0x01, 0x5e, 0x00, 0x7b, 0x01, 0x00},
+      {0xFF, 0x09, 0x3F, 0x00, 0x6F, 0x3F, 0x01, 0x53, 0x04, 0x73,
+       0x65, 0x6C, 0x66, 0x3F, 0x01, 0x5E, 0x00, 0x7B, 0x01, 0x00},
       [this](Local<Value> value) {
         ASSERT_TRUE(value->IsObject());
         EXPECT_TRUE(EvaluateScriptForResultBool("result === result.self"));
@@ -701,7 +696,7 @@
   // object keys. The serializer would have obtained them from the own property
   // keys list, which should only contain names and indices.
   InvalidDecodeTest(
-      {0xff, 0x09, 0x6f, 0x61, 0x00, 0x40, 0x00, 0x00, 0x7b, 0x01});
+      {0xFF, 0x09, 0x6F, 0x61, 0x00, 0x40, 0x00, 0x00, 0x7B, 0x01});
 }
 
 TEST_F(ValueSerializerTest, RoundTripOnlyOwnEnumerableStringKeys) {
@@ -819,8 +814,7 @@
 TEST_F(ValueSerializerTest, DecodeDictionaryObjectVersion0) {
   // Empty object.
   DecodeTestForVersion0(
-      {0x7b, 0x00},
-      [this](Local<Value> value) {
+      {0x7B, 0x00}, [this](Local<Value> value) {
         ASSERT_TRUE(value->IsObject());
         EXPECT_TRUE(EvaluateScriptForResultBool(
             "Object.getPrototypeOf(result) === Object.prototype"));
@@ -829,7 +823,7 @@
       });
   // String key.
   DecodeTestForVersion0(
-      {0x53, 0x01, 0x61, 0x49, 0x54, 0x7b, 0x01, 0x00},
+      {0x53, 0x01, 0x61, 0x49, 0x54, 0x7B, 0x01, 0x00},
       [this](Local<Value> value) {
         ASSERT_TRUE(value->IsObject());
         EXPECT_TRUE(EvaluateScriptForResultBool(
@@ -841,7 +835,7 @@
       });
   // Integer key (treated as a string, but may be encoded differently).
   DecodeTestForVersion0(
-      {0x49, 0x54, 0x53, 0x01, 0x61, 0x7b, 0x01, 0x00},
+      {0x49, 0x54, 0x53, 0x01, 0x61, 0x7B, 0x01, 0x00},
       [this](Local<Value> value) {
         ASSERT_TRUE(value->IsObject());
         EXPECT_TRUE(EvaluateScriptForResultBool("result.hasOwnProperty('42')"));
@@ -852,14 +846,14 @@
   // Key order must be preserved.
   DecodeTestForVersion0(
       {0x53, 0x01, 0x78, 0x49, 0x02, 0x53, 0x01, 0x79, 0x49, 0x04, 0x53, 0x01,
-       0x61, 0x49, 0x06, 0x7b, 0x03, 0x00},
+       0x61, 0x49, 0x06, 0x7B, 0x03, 0x00},
       [this](Local<Value> value) {
         EXPECT_TRUE(EvaluateScriptForResultBool(
             "Object.getOwnPropertyNames(result).toString() === 'x,y,a'"));
       });
   // A property and an element.
   DecodeTestForVersion0(
-      {0x49, 0x54, 0x53, 0x01, 0x61, 0x53, 0x01, 0x61, 0x49, 0x54, 0x7b, 0x02},
+      {0x49, 0x54, 0x53, 0x01, 0x61, 0x53, 0x01, 0x61, 0x49, 0x54, 0x7B, 0x02},
       [this](Local<Value> value) {
         EXPECT_TRUE(EvaluateScriptForResultBool(
             "Object.getOwnPropertyNames(result).toString() === '42,a'"));
@@ -953,9 +947,9 @@
 
 TEST_F(ValueSerializerTest, DecodeArray) {
   // A simple array of integers.
-  DecodeTest({0xff, 0x09, 0x3f, 0x00, 0x41, 0x05, 0x3f, 0x01, 0x49, 0x02,
-              0x3f, 0x01, 0x49, 0x04, 0x3f, 0x01, 0x49, 0x06, 0x3f, 0x01,
-              0x49, 0x08, 0x3f, 0x01, 0x49, 0x0a, 0x24, 0x00, 0x05, 0x00},
+  DecodeTest({0xFF, 0x09, 0x3F, 0x00, 0x41, 0x05, 0x3F, 0x01, 0x49, 0x02,
+              0x3F, 0x01, 0x49, 0x04, 0x3F, 0x01, 0x49, 0x06, 0x3F, 0x01,
+              0x49, 0x08, 0x3F, 0x01, 0x49, 0x0A, 0x24, 0x00, 0x05, 0x00},
              [this](Local<Value> value) {
                ASSERT_TRUE(value->IsArray());
                EXPECT_EQ(5u, Array::Cast(*value)->Length());
@@ -965,8 +959,8 @@
                    "result.toString() === '1,2,3,4,5'"));
              });
   // A long (sparse) array.
-  DecodeTest({0xff, 0x09, 0x3f, 0x00, 0x61, 0xe8, 0x07, 0x3f, 0x01, 0x49,
-              0xe8, 0x07, 0x3f, 0x01, 0x49, 0x54, 0x40, 0x01, 0xe8, 0x07},
+  DecodeTest({0xFF, 0x09, 0x3F, 0x00, 0x61, 0xE8, 0x07, 0x3F, 0x01, 0x49,
+              0xE8, 0x07, 0x3F, 0x01, 0x49, 0x54, 0x40, 0x01, 0xE8, 0x07},
              [this](Local<Value> value) {
                ASSERT_TRUE(value->IsArray());
                EXPECT_EQ(1000u, Array::Cast(*value)->Length());
@@ -974,8 +968,8 @@
              });
   // Duplicate reference.
   DecodeTest(
-      {0xff, 0x09, 0x3f, 0x00, 0x41, 0x02, 0x3f, 0x01, 0x6f, 0x7b, 0x00, 0x3f,
-       0x02, 0x5e, 0x01, 0x24, 0x00, 0x02},
+      {0xFF, 0x09, 0x3F, 0x00, 0x41, 0x02, 0x3F, 0x01, 0x6F, 0x7B, 0x00, 0x3F,
+       0x02, 0x5E, 0x01, 0x24, 0x00, 0x02},
       [this](Local<Value> value) {
         ASSERT_TRUE(value->IsArray());
         ASSERT_EQ(2u, Array::Cast(*value)->Length());
@@ -983,9 +977,9 @@
       });
   // Duplicate reference in a sparse array.
   DecodeTest(
-      {0xff, 0x09, 0x3f, 0x00, 0x61, 0xe8, 0x07, 0x3f, 0x01, 0x49,
-       0x02, 0x3f, 0x01, 0x6f, 0x7b, 0x00, 0x3f, 0x02, 0x49, 0xe8,
-       0x07, 0x3f, 0x02, 0x5e, 0x01, 0x40, 0x02, 0xe8, 0x07, 0x00},
+      {0xFF, 0x09, 0x3F, 0x00, 0x61, 0xE8, 0x07, 0x3F, 0x01, 0x49,
+       0x02, 0x3F, 0x01, 0x6F, 0x7B, 0x00, 0x3F, 0x02, 0x49, 0xE8,
+       0x07, 0x3F, 0x02, 0x5E, 0x01, 0x40, 0x02, 0xE8, 0x07, 0x00},
       [this](Local<Value> value) {
         ASSERT_TRUE(value->IsArray());
         ASSERT_EQ(1000u, Array::Cast(*value)->Length());
@@ -994,7 +988,7 @@
         EXPECT_TRUE(EvaluateScriptForResultBool("result[1] === result[500]"));
       });
   // Self reference.
-  DecodeTest({0xff, 0x09, 0x3f, 0x00, 0x41, 0x01, 0x3f, 0x01, 0x5e, 0x00, 0x24,
+  DecodeTest({0xFF, 0x09, 0x3F, 0x00, 0x41, 0x01, 0x3F, 0x01, 0x5E, 0x00, 0x24,
               0x00, 0x01, 0x00},
              [this](Local<Value> value) {
                ASSERT_TRUE(value->IsArray());
@@ -1003,8 +997,8 @@
              });
   // Self reference in a sparse array.
   DecodeTest(
-      {0xff, 0x09, 0x3f, 0x00, 0x61, 0xe8, 0x07, 0x3f, 0x01, 0x49,
-       0x8e, 0x08, 0x3f, 0x01, 0x5e, 0x00, 0x40, 0x01, 0xe8, 0x07},
+      {0xFF, 0x09, 0x3F, 0x00, 0x61, 0xE8, 0x07, 0x3F, 0x01, 0x49,
+       0x8E, 0x08, 0x3F, 0x01, 0x5E, 0x00, 0x40, 0x01, 0xE8, 0x07},
       [this](Local<Value> value) {
         ASSERT_TRUE(value->IsArray());
         ASSERT_EQ(1000u, Array::Cast(*value)->Length());
@@ -1012,8 +1006,8 @@
       });
   // Array with additional properties.
   DecodeTest(
-      {0xff, 0x09, 0x3f, 0x00, 0x41, 0x02, 0x3f, 0x01, 0x49, 0x02, 0x3f,
-       0x01, 0x49, 0x04, 0x3f, 0x01, 0x53, 0x03, 0x66, 0x6f, 0x6f, 0x3f,
+      {0xFF, 0x09, 0x3F, 0x00, 0x41, 0x02, 0x3F, 0x01, 0x49, 0x02, 0x3F,
+       0x01, 0x49, 0x04, 0x3F, 0x01, 0x53, 0x03, 0x66, 0x6F, 0x6F, 0x3F,
        0x01, 0x53, 0x03, 0x62, 0x61, 0x72, 0x24, 0x01, 0x02, 0x00},
       [this](Local<Value> value) {
         ASSERT_TRUE(value->IsArray());
@@ -1022,9 +1016,9 @@
         EXPECT_TRUE(EvaluateScriptForResultBool("result.foo === 'bar'"));
       });
   // Sparse array with additional properties.
-  DecodeTest({0xff, 0x09, 0x3f, 0x00, 0x61, 0xe8, 0x07, 0x3f, 0x01,
-              0x53, 0x03, 0x66, 0x6f, 0x6f, 0x3f, 0x01, 0x53, 0x03,
-              0x62, 0x61, 0x72, 0x40, 0x01, 0xe8, 0x07, 0x00},
+  DecodeTest({0xFF, 0x09, 0x3F, 0x00, 0x61, 0xE8, 0x07, 0x3F, 0x01,
+              0x53, 0x03, 0x66, 0x6F, 0x6F, 0x3F, 0x01, 0x53, 0x03,
+              0x62, 0x61, 0x72, 0x40, 0x01, 0xE8, 0x07, 0x00},
              [this](Local<Value> value) {
                ASSERT_TRUE(value->IsArray());
                ASSERT_EQ(1000u, Array::Cast(*value)->Length());
@@ -1036,7 +1030,7 @@
   // Note that since the previous output from Chrome fails this test, an
   // encoding using the sparse format was constructed instead.
   DecodeTest(
-      {0xff, 0x09, 0x61, 0x02, 0x49, 0x02, 0x5f, 0x40, 0x01, 0x02},
+      {0xFF, 0x09, 0x61, 0x02, 0x49, 0x02, 0x5F, 0x40, 0x01, 0x02},
       [this](Local<Value> value) {
         ASSERT_TRUE(value->IsArray());
         ASSERT_EQ(2u, Array::Cast(*value)->Length());
@@ -1052,9 +1046,9 @@
 TEST_F(ValueSerializerTest, DecodeInvalidOverLargeArray) {
   // So large it couldn't exist in the V8 heap, and its size couldn't fit in a
   // SMI on 32-bit systems (2^30).
-  InvalidDecodeTest({0xff, 0x09, 0x41, 0x80, 0x80, 0x80, 0x80, 0x04});
+  InvalidDecodeTest({0xFF, 0x09, 0x41, 0x80, 0x80, 0x80, 0x80, 0x04});
   // Not so large, but there isn't enough data left in the buffer.
-  InvalidDecodeTest({0xff, 0x09, 0x41, 0x01});
+  InvalidDecodeTest({0xFF, 0x09, 0x41, 0x01});
 }
 
 TEST_F(ValueSerializerTest, RoundTripArrayWithNonEnumerableElement) {
@@ -1244,7 +1238,7 @@
   DecodeTestForVersion0(
       {0x55, 0x00, 0x53, 0x01, 'a',  0x55, 0x02, 0x55, 0x05, 0x53,
        0x03, 'f',  'o',  'o',  0x53, 0x03, 'b',  'a',  'r',  0x53,
-       0x03, 'b',  'a',  'z',  0x49, 0x0b, 0x40, 0x04, 0x03, 0x00},
+       0x03, 'b',  'a',  'z',  0x49, 0x0B, 0x40, 0x04, 0x03, 0x00},
       [this](Local<Value> value) {
         ASSERT_TRUE(value->IsArray());
         EXPECT_EQ(3u, Array::Cast(*value)->Length());
@@ -1281,31 +1275,33 @@
 TEST_F(ValueSerializerTest, DecodeDenseArrayContainingUndefined) {
   // In previous versions, "undefined" in a dense array signified absence of the
   // element (for compatibility). In new versions, it has a separate encoding.
-  DecodeTest({0xff, 0x09, 0x41, 0x01, 0x5f, 0x24, 0x00, 0x01},
+  DecodeTest({0xFF, 0x09, 0x41, 0x01, 0x5F, 0x24, 0x00, 0x01},
              [this](Local<Value> value) {
                EXPECT_TRUE(EvaluateScriptForResultBool("!(0 in result)"));
              });
   DecodeTest(
-      {0xff, 0x0b, 0x41, 0x01, 0x5f, 0x24, 0x00, 0x01},
+      {0xFF, 0x0B, 0x41, 0x01, 0x5F, 0x24, 0x00, 0x01},
       [this](Local<Value> value) {
         EXPECT_TRUE(EvaluateScriptForResultBool("0 in result"));
         EXPECT_TRUE(EvaluateScriptForResultBool("result[0] === undefined"));
       });
-  DecodeTest({0xff, 0x0b, 0x41, 0x01, 0x2d, 0x24, 0x00, 0x01},
+  DecodeTest({0xFF, 0x0B, 0x41, 0x01, 0x2D, 0x24, 0x00, 0x01},
              [this](Local<Value> value) {
                EXPECT_TRUE(EvaluateScriptForResultBool("!(0 in result)"));
              });
 }
 
 TEST_F(ValueSerializerTest, RoundTripDate) {
-  RoundTripTest("new Date(1e6)", [](Local<Value> value) {
+  RoundTripTest("new Date(1e6)", [this](Local<Value> value) {
     ASSERT_TRUE(value->IsDate());
     EXPECT_EQ(1e6, Date::Cast(*value)->ValueOf());
-    EXPECT_TRUE("Object.getPrototypeOf(result) === Date.prototype");
+    EXPECT_TRUE(EvaluateScriptForResultBool(
+        "Object.getPrototypeOf(result) === Date.prototype"));
   });
-  RoundTripTest("new Date(Date.UTC(1867, 6, 1))", [](Local<Value> value) {
+  RoundTripTest("new Date(Date.UTC(1867, 6, 1))", [this](Local<Value> value) {
     ASSERT_TRUE(value->IsDate());
-    EXPECT_TRUE("result.toISOString() === '1867-07-01T00:00:00.000Z'");
+    EXPECT_TRUE(EvaluateScriptForResultBool(
+        "result.toISOString() === '1867-07-01T00:00:00.000Z'"));
   });
   RoundTripTest("new Date(NaN)", [](Local<Value> value) {
     ASSERT_TRUE(value->IsDate());
@@ -1321,42 +1317,44 @@
 
 TEST_F(ValueSerializerTest, DecodeDate) {
 #if defined(V8_TARGET_LITTLE_ENDIAN)
-  DecodeTest({0xff, 0x09, 0x3f, 0x00, 0x44, 0x00, 0x00, 0x00, 0x00, 0x80, 0x84,
-              0x2e, 0x41, 0x00},
-             [](Local<Value> value) {
+  DecodeTest({0xFF, 0x09, 0x3F, 0x00, 0x44, 0x00, 0x00, 0x00, 0x00, 0x80, 0x84,
+              0x2E, 0x41, 0x00},
+             [this](Local<Value> value) {
                ASSERT_TRUE(value->IsDate());
                EXPECT_EQ(1e6, Date::Cast(*value)->ValueOf());
-               EXPECT_TRUE("Object.getPrototypeOf(result) === Date.prototype");
+               EXPECT_TRUE(EvaluateScriptForResultBool(
+                   "Object.getPrototypeOf(result) === Date.prototype"));
              });
-  DecodeTest(
-      {0xff, 0x09, 0x3f, 0x00, 0x44, 0x00, 0x00, 0x20, 0x45, 0x27, 0x89, 0x87,
-       0xc2, 0x00},
-      [](Local<Value> value) {
-        ASSERT_TRUE(value->IsDate());
-        EXPECT_TRUE("result.toISOString() === '1867-07-01T00:00:00.000Z'");
-      });
-  DecodeTest({0xff, 0x09, 0x3f, 0x00, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-              0xf8, 0x7f, 0x00},
+  DecodeTest({0xFF, 0x09, 0x3F, 0x00, 0x44, 0x00, 0x00, 0x20, 0x45, 0x27, 0x89,
+              0x87, 0xC2, 0x00},
+             [this](Local<Value> value) {
+               ASSERT_TRUE(value->IsDate());
+               EXPECT_TRUE(EvaluateScriptForResultBool(
+                   "result.toISOString() === '1867-07-01T00:00:00.000Z'"));
+             });
+  DecodeTest({0xFF, 0x09, 0x3F, 0x00, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+              0xF8, 0x7F, 0x00},
              [](Local<Value> value) {
                ASSERT_TRUE(value->IsDate());
                EXPECT_TRUE(std::isnan(Date::Cast(*value)->ValueOf()));
              });
 #else
-  DecodeTest({0xff, 0x09, 0x3f, 0x00, 0x44, 0x41, 0x2e, 0x84, 0x80, 0x00, 0x00,
+  DecodeTest({0xFF, 0x09, 0x3F, 0x00, 0x44, 0x41, 0x2E, 0x84, 0x80, 0x00, 0x00,
               0x00, 0x00, 0x00},
-             [](Local<Value> value) {
+             [this](Local<Value> value) {
                ASSERT_TRUE(value->IsDate());
                EXPECT_EQ(1e6, Date::Cast(*value)->ValueOf());
-               EXPECT_TRUE("Object.getPrototypeOf(result) === Date.prototype");
+               EXPECT_TRUE(EvaluateScriptForResultBool(
+                   "Object.getPrototypeOf(result) === Date.prototype"));
              });
-  DecodeTest(
-      {0xff, 0x09, 0x3f, 0x00, 0x44, 0xc2, 0x87, 0x89, 0x27, 0x45, 0x20, 0x00,
-       0x00, 0x00},
-      [](Local<Value> value) {
-        ASSERT_TRUE(value->IsDate());
-        EXPECT_TRUE("result.toISOString() === '1867-07-01T00:00:00.000Z'");
-      });
-  DecodeTest({0xff, 0x09, 0x3f, 0x00, 0x44, 0x7f, 0xf8, 0x00, 0x00, 0x00, 0x00,
+  DecodeTest({0xFF, 0x09, 0x3F, 0x00, 0x44, 0xC2, 0x87, 0x89, 0x27, 0x45, 0x20,
+              0x00, 0x00, 0x00},
+             [this](Local<Value> value) {
+               ASSERT_TRUE(value->IsDate());
+               EXPECT_TRUE(EvaluateScriptForResultBool(
+                   "result.toISOString() === '1867-07-01T00:00:00.000Z'"));
+             });
+  DecodeTest({0xFF, 0x09, 0x3F, 0x00, 0x44, 0x7F, 0xF8, 0x00, 0x00, 0x00, 0x00,
               0x00, 0x00, 0x00},
              [](Local<Value> value) {
                ASSERT_TRUE(value->IsDate());
@@ -1364,9 +1362,9 @@
              });
 #endif
   DecodeTest(
-      {0xff, 0x09, 0x3f, 0x00, 0x6f, 0x3f, 0x01, 0x53, 0x01, 0x61, 0x3f,
-       0x01, 0x44, 0x00, 0x20, 0x39, 0x50, 0x37, 0x6a, 0x75, 0x42, 0x3f,
-       0x02, 0x53, 0x01, 0x62, 0x3f, 0x02, 0x5e, 0x01, 0x7b, 0x02},
+      {0xFF, 0x09, 0x3F, 0x00, 0x6F, 0x3F, 0x01, 0x53, 0x01, 0x61, 0x3F,
+       0x01, 0x44, 0x00, 0x20, 0x39, 0x50, 0x37, 0x6A, 0x75, 0x42, 0x3F,
+       0x02, 0x53, 0x01, 0x62, 0x3F, 0x02, 0x5E, 0x01, 0x7B, 0x02},
       [this](Local<Value> value) {
         EXPECT_TRUE(EvaluateScriptForResultBool("result.a instanceof Date"));
         EXPECT_TRUE(EvaluateScriptForResultBool("result.a === result.b"));
@@ -1435,37 +1433,35 @@
 
 TEST_F(ValueSerializerTest, DecodeValueObjects) {
   DecodeTest(
-      {0xff, 0x09, 0x3f, 0x00, 0x79, 0x00},
-      [this](Local<Value> value) {
+      {0xFF, 0x09, 0x3F, 0x00, 0x79, 0x00}, [this](Local<Value> value) {
         EXPECT_TRUE(EvaluateScriptForResultBool(
             "Object.getPrototypeOf(result) === Boolean.prototype"));
         EXPECT_TRUE(EvaluateScriptForResultBool("result.valueOf() === true"));
       });
   DecodeTest(
-      {0xff, 0x09, 0x3f, 0x00, 0x78, 0x00},
-      [this](Local<Value> value) {
+      {0xFF, 0x09, 0x3F, 0x00, 0x78, 0x00}, [this](Local<Value> value) {
         EXPECT_TRUE(EvaluateScriptForResultBool(
             "Object.getPrototypeOf(result) === Boolean.prototype"));
         EXPECT_TRUE(EvaluateScriptForResultBool("result.valueOf() === false"));
       });
   DecodeTest(
-      {0xff, 0x09, 0x3f, 0x00, 0x6f, 0x3f, 0x01, 0x53, 0x01, 0x61, 0x3f, 0x01,
-       0x79, 0x3f, 0x02, 0x53, 0x01, 0x62, 0x3f, 0x02, 0x5e, 0x01, 0x7b, 0x02},
+      {0xFF, 0x09, 0x3F, 0x00, 0x6F, 0x3F, 0x01, 0x53, 0x01, 0x61, 0x3F, 0x01,
+       0x79, 0x3F, 0x02, 0x53, 0x01, 0x62, 0x3F, 0x02, 0x5E, 0x01, 0x7B, 0x02},
       [this](Local<Value> value) {
         EXPECT_TRUE(EvaluateScriptForResultBool("result.a instanceof Boolean"));
         EXPECT_TRUE(EvaluateScriptForResultBool("result.a === result.b"));
       });
 #if defined(V8_TARGET_LITTLE_ENDIAN)
   DecodeTest(
-      {0xff, 0x09, 0x3f, 0x00, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x45,
-       0xc0, 0x00},
+      {0xFF, 0x09, 0x3F, 0x00, 0x6E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x45,
+       0xC0, 0x00},
       [this](Local<Value> value) {
         EXPECT_TRUE(EvaluateScriptForResultBool(
             "Object.getPrototypeOf(result) === Number.prototype"));
         EXPECT_TRUE(EvaluateScriptForResultBool("result.valueOf() === -42"));
       });
-  DecodeTest({0xff, 0x09, 0x3f, 0x00, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-              0xf8, 0x7f, 0x00},
+  DecodeTest({0xFF, 0x09, 0x3F, 0x00, 0x6E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+              0xF8, 0x7F, 0x00},
              [this](Local<Value> value) {
                EXPECT_TRUE(EvaluateScriptForResultBool(
                    "Object.getPrototypeOf(result) === Number.prototype"));
@@ -1474,14 +1470,14 @@
              });
 #else
   DecodeTest(
-      {0xff, 0x09, 0x3f, 0x00, 0x6e, 0xc0, 0x45, 0x00, 0x00, 0x00, 0x00, 0x00,
+      {0xFF, 0x09, 0x3F, 0x00, 0x6E, 0xC0, 0x45, 0x00, 0x00, 0x00, 0x00, 0x00,
        0x00, 0x00},
       [this](Local<Value> value) {
         EXPECT_TRUE(EvaluateScriptForResultBool(
             "Object.getPrototypeOf(result) === Number.prototype"));
         EXPECT_TRUE(EvaluateScriptForResultBool("result.valueOf() === -42"));
       });
-  DecodeTest({0xff, 0x09, 0x3f, 0x00, 0x6e, 0x7f, 0xf8, 0x00, 0x00, 0x00, 0x00,
+  DecodeTest({0xFF, 0x09, 0x3F, 0x00, 0x6E, 0x7F, 0xF8, 0x00, 0x00, 0x00, 0x00,
               0x00, 0x00, 0x00},
              [this](Local<Value> value) {
                EXPECT_TRUE(EvaluateScriptForResultBool(
@@ -1491,14 +1487,14 @@
              });
 #endif
   DecodeTest(
-      {0xff, 0x09, 0x3f, 0x00, 0x6f, 0x3f, 0x01, 0x53, 0x01, 0x61, 0x3f,
-       0x01, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x40, 0x3f,
-       0x02, 0x53, 0x01, 0x62, 0x3f, 0x02, 0x5e, 0x01, 0x7b, 0x02},
+      {0xFF, 0x09, 0x3F, 0x00, 0x6F, 0x3F, 0x01, 0x53, 0x01, 0x61, 0x3F,
+       0x01, 0x6E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x40, 0x3F,
+       0x02, 0x53, 0x01, 0x62, 0x3F, 0x02, 0x5E, 0x01, 0x7B, 0x02},
       [this](Local<Value> value) {
         EXPECT_TRUE(EvaluateScriptForResultBool("result.a instanceof Number"));
         EXPECT_TRUE(EvaluateScriptForResultBool("result.a === result.b"));
       });
-  DecodeTest({0xff, 0x09, 0x3f, 0x00, 0x73, 0x07, 0x51, 0x75, 0xc3, 0xa9, 0x62,
+  DecodeTest({0xFF, 0x09, 0x3F, 0x00, 0x73, 0x07, 0x51, 0x75, 0xC3, 0xA9, 0x62,
               0x65, 0x63, 0x00},
              [this](Local<Value> value) {
                EXPECT_TRUE(EvaluateScriptForResultBool(
@@ -1507,7 +1503,7 @@
                    "result.valueOf() === 'Qu\\xe9bec'"));
                EXPECT_TRUE(EvaluateScriptForResultBool("result.length === 6"));
              });
-  DecodeTest({0xff, 0x09, 0x3f, 0x00, 0x73, 0x04, 0xf0, 0x9f, 0x91, 0x8a},
+  DecodeTest({0xFF, 0x09, 0x3F, 0x00, 0x73, 0x04, 0xF0, 0x9F, 0x91, 0x8A},
              [this](Local<Value> value) {
                EXPECT_TRUE(EvaluateScriptForResultBool(
                    "Object.getPrototypeOf(result) === String.prototype"));
@@ -1516,16 +1512,16 @@
                EXPECT_TRUE(EvaluateScriptForResultBool("result.length === 2"));
              });
   DecodeTest(
-      {0xff, 0x09, 0x3f, 0x00, 0x6f, 0x3f, 0x01, 0x53, 0x01,
-       0x61, 0x3f, 0x01, 0x73, 0x00, 0x3f, 0x02, 0x53, 0x01,
-       0x62, 0x3f, 0x02, 0x5e, 0x01, 0x7b, 0x02, 0x00},
+      {0xFF, 0x09, 0x3F, 0x00, 0x6F, 0x3F, 0x01, 0x53, 0x01,
+       0x61, 0x3F, 0x01, 0x73, 0x00, 0x3F, 0x02, 0x53, 0x01,
+       0x62, 0x3F, 0x02, 0x5E, 0x01, 0x7B, 0x02, 0x00},
       [this](Local<Value> value) {
         EXPECT_TRUE(EvaluateScriptForResultBool("result.a instanceof String"));
         EXPECT_TRUE(EvaluateScriptForResultBool("result.a === result.b"));
       });
 
   // String object containing a Latin-1 string.
-  DecodeTest({0xff, 0x0c, 0x73, 0x22, 0x06, 'Q', 'u', 0xe9, 'b', 'e', 'c'},
+  DecodeTest({0xFF, 0x0C, 0x73, 0x22, 0x06, 'Q', 'u', 0xE9, 'b', 'e', 'c'},
              [this](Local<Value> value) {
                EXPECT_TRUE(EvaluateScriptForResultBool(
                    "Object.getPrototypeOf(result) === String.prototype"));
@@ -1562,7 +1558,7 @@
 }
 
 TEST_F(ValueSerializerTest, DecodeRegExp) {
-  DecodeTest({0xff, 0x09, 0x3f, 0x00, 0x52, 0x03, 0x66, 0x6f, 0x6f, 0x01},
+  DecodeTest({0xFF, 0x09, 0x3F, 0x00, 0x52, 0x03, 0x66, 0x6F, 0x6F, 0x01},
              [this](Local<Value> value) {
                ASSERT_TRUE(value->IsRegExp());
                EXPECT_TRUE(EvaluateScriptForResultBool(
@@ -1570,7 +1566,7 @@
                EXPECT_TRUE(EvaluateScriptForResultBool(
                    "result.toString() === '/foo/g'"));
              });
-  DecodeTest({0xff, 0x09, 0x3f, 0x00, 0x52, 0x07, 0x51, 0x75, 0xc3, 0xa9, 0x62,
+  DecodeTest({0xFF, 0x09, 0x3F, 0x00, 0x52, 0x07, 0x51, 0x75, 0xC3, 0xA9, 0x62,
               0x65, 0x63, 0x02},
              [this](Local<Value> value) {
                ASSERT_TRUE(value->IsRegExp());
@@ -1578,16 +1574,16 @@
                    "result.toString() === '/Qu\\xe9bec/i'"));
              });
   DecodeTest(
-      {0xff, 0x09, 0x3f, 0x00, 0x52, 0x04, 0xf0, 0x9f, 0x91, 0x8a, 0x11, 0x00},
+      {0xFF, 0x09, 0x3F, 0x00, 0x52, 0x04, 0xF0, 0x9F, 0x91, 0x8A, 0x11, 0x00},
       [this](Local<Value> value) {
         ASSERT_TRUE(value->IsRegExp());
         EXPECT_TRUE(EvaluateScriptForResultBool(
             "result.toString() === '/\\ud83d\\udc4a/gu'"));
       });
   DecodeTest(
-      {0xff, 0x09, 0x3f, 0x00, 0x6f, 0x3f, 0x01, 0x53, 0x01, 0x61,
-       0x3f, 0x01, 0x52, 0x03, 0x66, 0x6f, 0x6f, 0x03, 0x3f, 0x02,
-       0x53, 0x01, 0x62, 0x3f, 0x02, 0x5e, 0x01, 0x7b, 0x02, 0x00},
+      {0xFF, 0x09, 0x3F, 0x00, 0x6F, 0x3F, 0x01, 0x53, 0x01, 0x61,
+       0x3F, 0x01, 0x52, 0x03, 0x66, 0x6F, 0x6F, 0x03, 0x3F, 0x02,
+       0x53, 0x01, 0x62, 0x3F, 0x02, 0x5E, 0x01, 0x7B, 0x02, 0x00},
       [this](Local<Value> value) {
         EXPECT_TRUE(EvaluateScriptForResultBool("result.a instanceof RegExp"));
         EXPECT_TRUE(EvaluateScriptForResultBool("result.a === result.b"));
@@ -1595,7 +1591,7 @@
 
   // RegExp containing a Latin-1 string.
   DecodeTest(
-      {0xff, 0x0c, 0x52, 0x22, 0x06, 'Q', 'u', 0xe9, 'b', 'e', 'c', 0x02},
+      {0xFF, 0x0C, 0x52, 0x22, 0x06, 'Q', 'u', 0xE9, 'b', 'e', 'c', 0x02},
       [this](Local<Value> value) {
         ASSERT_TRUE(value->IsRegExp());
         EXPECT_TRUE(EvaluateScriptForResultBool(
@@ -1603,11 +1599,9 @@
       });
 }
 
-// Tests that invalid flags are not accepted by the deserializer. In particular,
-// the dotAll flag ('s') is only valid when the corresponding flag is enabled.
+// Tests that invalid flags are not accepted by the deserializer.
 TEST_F(ValueSerializerTest, DecodeRegExpDotAll) {
-  i::FLAG_harmony_regexp_dotall = false;
-  DecodeTest({0xff, 0x09, 0x3f, 0x00, 0x52, 0x03, 0x66, 0x6f, 0x6f, 0x1f},
+  DecodeTest({0xFF, 0x09, 0x3F, 0x00, 0x52, 0x03, 0x66, 0x6F, 0x6F, 0x1F},
              [this](Local<Value> value) {
                ASSERT_TRUE(value->IsRegExp());
                EXPECT_TRUE(EvaluateScriptForResultBool(
@@ -1615,21 +1609,7 @@
                EXPECT_TRUE(EvaluateScriptForResultBool(
                    "result.toString() === '/foo/gimuy'"));
              });
-  InvalidDecodeTest(
-      {0xff, 0x09, 0x3f, 0x00, 0x52, 0x03, 0x66, 0x6f, 0x6f, 0x3f});
-  InvalidDecodeTest(
-      {0xff, 0x09, 0x3f, 0x00, 0x52, 0x03, 0x66, 0x6f, 0x6f, 0x7f});
-
-  i::FLAG_harmony_regexp_dotall = true;
-  DecodeTest({0xff, 0x09, 0x3f, 0x00, 0x52, 0x03, 0x66, 0x6f, 0x6f, 0x1f},
-             [this](Local<Value> value) {
-               ASSERT_TRUE(value->IsRegExp());
-               EXPECT_TRUE(EvaluateScriptForResultBool(
-                   "Object.getPrototypeOf(result) === RegExp.prototype"));
-               EXPECT_TRUE(EvaluateScriptForResultBool(
-                   "result.toString() === '/foo/gimuy'"));
-             });
-  DecodeTest({0xff, 0x09, 0x3f, 0x00, 0x52, 0x03, 0x66, 0x6f, 0x6f, 0x3f},
+  DecodeTest({0xFF, 0x09, 0x3F, 0x00, 0x52, 0x03, 0x66, 0x6F, 0x6F, 0x3F},
              [this](Local<Value> value) {
                ASSERT_TRUE(value->IsRegExp());
                EXPECT_TRUE(EvaluateScriptForResultBool(
@@ -1638,7 +1618,7 @@
                    "result.toString() === '/foo/gimsuy'"));
              });
   InvalidDecodeTest(
-      {0xff, 0x09, 0x3f, 0x00, 0x52, 0x03, 0x66, 0x6f, 0x6f, 0x7f});
+      {0xFF, 0x09, 0x3F, 0x00, 0x52, 0x03, 0x66, 0x6F, 0x6F, 0x7F});
 }
 
 TEST_F(ValueSerializerTest, RoundTripMap) {
@@ -1674,8 +1654,8 @@
 
 TEST_F(ValueSerializerTest, DecodeMap) {
   DecodeTest(
-      {0xff, 0x09, 0x3f, 0x00, 0x3b, 0x3f, 0x01, 0x49, 0x54, 0x3f, 0x01, 0x53,
-       0x03, 0x66, 0x6f, 0x6f, 0x3a, 0x02},
+      {0xFF, 0x09, 0x3F, 0x00, 0x3B, 0x3F, 0x01, 0x49, 0x54, 0x3F, 0x01, 0x53,
+       0x03, 0x66, 0x6F, 0x6F, 0x3A, 0x02},
       [this](Local<Value> value) {
         ASSERT_TRUE(value->IsMap());
         EXPECT_TRUE(EvaluateScriptForResultBool(
@@ -1683,8 +1663,8 @@
         EXPECT_TRUE(EvaluateScriptForResultBool("result.size === 1"));
         EXPECT_TRUE(EvaluateScriptForResultBool("result.get(42) === 'foo'"));
       });
-  DecodeTest({0xff, 0x09, 0x3f, 0x00, 0x3b, 0x3f, 0x01, 0x5e, 0x00, 0x3f, 0x01,
-              0x5e, 0x00, 0x3a, 0x02, 0x00},
+  DecodeTest({0xFF, 0x09, 0x3F, 0x00, 0x3B, 0x3F, 0x01, 0x5E, 0x00, 0x3F, 0x01,
+              0x5E, 0x00, 0x3A, 0x02, 0x00},
              [this](Local<Value> value) {
                ASSERT_TRUE(value->IsMap());
                EXPECT_TRUE(EvaluateScriptForResultBool("result.size === 1"));
@@ -1692,10 +1672,10 @@
                    "result.get(result) === result"));
              });
   // Iteration order must be preserved.
-  DecodeTest({0xff, 0x09, 0x3f, 0x00, 0x3b, 0x3f, 0x01, 0x49, 0x02, 0x3f,
-              0x01, 0x49, 0x00, 0x3f, 0x01, 0x53, 0x01, 0x61, 0x3f, 0x01,
-              0x49, 0x00, 0x3f, 0x01, 0x49, 0x06, 0x3f, 0x01, 0x49, 0x00,
-              0x3f, 0x01, 0x49, 0x04, 0x3f, 0x01, 0x49, 0x00, 0x3a, 0x08},
+  DecodeTest({0xFF, 0x09, 0x3F, 0x00, 0x3B, 0x3F, 0x01, 0x49, 0x02, 0x3F,
+              0x01, 0x49, 0x00, 0x3F, 0x01, 0x53, 0x01, 0x61, 0x3F, 0x01,
+              0x49, 0x00, 0x3F, 0x01, 0x49, 0x06, 0x3F, 0x01, 0x49, 0x00,
+              0x3F, 0x01, 0x49, 0x04, 0x3F, 0x01, 0x49, 0x00, 0x3A, 0x08},
              [this](Local<Value> value) {
                ASSERT_TRUE(value->IsMap());
                EXPECT_TRUE(EvaluateScriptForResultBool(
@@ -1774,8 +1754,8 @@
 }
 
 TEST_F(ValueSerializerTest, DecodeSet) {
-  DecodeTest({0xff, 0x09, 0x3f, 0x00, 0x27, 0x3f, 0x01, 0x49, 0x54, 0x3f, 0x01,
-              0x53, 0x03, 0x66, 0x6f, 0x6f, 0x2c, 0x02},
+  DecodeTest({0xFF, 0x09, 0x3F, 0x00, 0x27, 0x3F, 0x01, 0x49, 0x54, 0x3F, 0x01,
+              0x53, 0x03, 0x66, 0x6F, 0x6F, 0x2C, 0x02},
              [this](Local<Value> value) {
                ASSERT_TRUE(value->IsSet());
                EXPECT_TRUE(EvaluateScriptForResultBool(
@@ -1785,7 +1765,7 @@
                EXPECT_TRUE(EvaluateScriptForResultBool("result.has('foo')"));
              });
   DecodeTest(
-      {0xff, 0x09, 0x3f, 0x00, 0x27, 0x3f, 0x01, 0x5e, 0x00, 0x2c, 0x01, 0x00},
+      {0xFF, 0x09, 0x3F, 0x00, 0x27, 0x3F, 0x01, 0x5E, 0x00, 0x2C, 0x01, 0x00},
       [this](Local<Value> value) {
         ASSERT_TRUE(value->IsSet());
         EXPECT_TRUE(EvaluateScriptForResultBool("result.size === 1"));
@@ -1793,8 +1773,8 @@
       });
   // Iteration order must be preserved.
   DecodeTest(
-      {0xff, 0x09, 0x3f, 0x00, 0x27, 0x3f, 0x01, 0x49, 0x02, 0x3f, 0x01, 0x53,
-       0x01, 0x61, 0x3f, 0x01, 0x49, 0x06, 0x3f, 0x01, 0x49, 0x04, 0x2c, 0x04},
+      {0xFF, 0x09, 0x3F, 0x00, 0x27, 0x3F, 0x01, 0x49, 0x02, 0x3F, 0x01, 0x53,
+       0x01, 0x61, 0x3F, 0x01, 0x49, 0x06, 0x3F, 0x01, 0x49, 0x04, 0x2C, 0x04},
       [this](Local<Value> value) {
         ASSERT_TRUE(value->IsSet());
         EXPECT_TRUE(EvaluateScriptForResultBool(
@@ -1860,14 +1840,14 @@
 }
 
 TEST_F(ValueSerializerTest, DecodeArrayBuffer) {
-  DecodeTest({0xff, 0x09, 0x3f, 0x00, 0x42, 0x00},
+  DecodeTest({0xFF, 0x09, 0x3F, 0x00, 0x42, 0x00},
              [this](Local<Value> value) {
                ASSERT_TRUE(value->IsArrayBuffer());
                EXPECT_EQ(0u, ArrayBuffer::Cast(*value)->ByteLength());
                EXPECT_TRUE(EvaluateScriptForResultBool(
                    "Object.getPrototypeOf(result) === ArrayBuffer.prototype"));
              });
-  DecodeTest({0xff, 0x09, 0x3f, 0x00, 0x42, 0x03, 0x00, 0x80, 0xff, 0x00},
+  DecodeTest({0xFF, 0x09, 0x3F, 0x00, 0x42, 0x03, 0x00, 0x80, 0xFF, 0x00},
              [this](Local<Value> value) {
                ASSERT_TRUE(value->IsArrayBuffer());
                EXPECT_EQ(3u, ArrayBuffer::Cast(*value)->ByteLength());
@@ -1875,9 +1855,9 @@
                    "new Uint8Array(result).toString() === '0,128,255'"));
              });
   DecodeTest(
-      {0xff, 0x09, 0x3f, 0x00, 0x6f, 0x3f, 0x01, 0x53, 0x01,
-       0x61, 0x3f, 0x01, 0x42, 0x00, 0x3f, 0x02, 0x53, 0x01,
-       0x62, 0x3f, 0x02, 0x5e, 0x01, 0x7b, 0x02, 0x00},
+      {0xFF, 0x09, 0x3F, 0x00, 0x6F, 0x3F, 0x01, 0x53, 0x01,
+       0x61, 0x3F, 0x01, 0x42, 0x00, 0x3F, 0x02, 0x53, 0x01,
+       0x62, 0x3F, 0x02, 0x5E, 0x01, 0x7B, 0x02, 0x00},
       [this](Local<Value> value) {
         EXPECT_TRUE(
             EvaluateScriptForResultBool("result.a instanceof ArrayBuffer"));
@@ -1886,7 +1866,7 @@
 }
 
 TEST_F(ValueSerializerTest, DecodeInvalidArrayBuffer) {
-  InvalidDecodeTest({0xff, 0x09, 0x42, 0xff, 0xff, 0x00});
+  InvalidDecodeTest({0xFF, 0x09, 0x42, 0xFF, 0xFF, 0x00});
 }
 
 // An array buffer allocator that never has available memory.
@@ -1915,8 +1895,8 @@
     Context::Scope context_scope(context);
     TryCatch try_catch(isolate);
 
-    const std::vector<uint8_t> data = {0xff, 0x09, 0x3f, 0x00, 0x42,
-                                       0x03, 0x00, 0x80, 0xff, 0x00};
+    const std::vector<uint8_t> data = {0xFF, 0x09, 0x3F, 0x00, 0x42,
+                                       0x03, 0x00, 0x80, 0xFF, 0x00};
     ValueDeserializer deserializer(isolate, &data[0],
                                    static_cast<int>(data.size()), nullptr);
     deserializer.SetSupportsLegacyWireFormat(true);
@@ -1942,7 +1922,7 @@
     {
       Context::Scope scope(deserialization_context());
       output_buffer_ = ArrayBuffer::New(isolate(), kTestByteLength);
-      const uint8_t data[kTestByteLength] = {0x00, 0x01, 0x80, 0xff};
+      const uint8_t data[kTestByteLength] = {0x00, 0x01, 0x80, 0xFF};
       memcpy(output_buffer_->GetContents().Data(), data, kTestByteLength);
     }
   }
@@ -2055,7 +2035,7 @@
 TEST_F(ValueSerializerTest, DecodeTypedArray) {
   // Check that the right type comes out the other side for every kind of typed
   // array.
-  DecodeTest({0xff, 0x09, 0x3f, 0x00, 0x3f, 0x00, 0x42, 0x02, 0x00, 0x00, 0x56,
+  DecodeTest({0xFF, 0x09, 0x3F, 0x00, 0x3F, 0x00, 0x42, 0x02, 0x00, 0x00, 0x56,
               0x42, 0x00, 0x02},
              [this](Local<Value> value) {
                ASSERT_TRUE(value->IsUint8Array());
@@ -2064,7 +2044,7 @@
                EXPECT_TRUE(EvaluateScriptForResultBool(
                    "Object.getPrototypeOf(result) === Uint8Array.prototype"));
              });
-  DecodeTest({0xff, 0x09, 0x3f, 0x00, 0x3f, 0x00, 0x42, 0x02, 0x00, 0x00, 0x56,
+  DecodeTest({0xFF, 0x09, 0x3F, 0x00, 0x3F, 0x00, 0x42, 0x02, 0x00, 0x00, 0x56,
               0x62, 0x00, 0x02},
              [this](Local<Value> value) {
                ASSERT_TRUE(value->IsInt8Array());
@@ -2074,7 +2054,7 @@
                    "Object.getPrototypeOf(result) === Int8Array.prototype"));
              });
 #if defined(V8_TARGET_LITTLE_ENDIAN)
-  DecodeTest({0xff, 0x09, 0x3f, 0x00, 0x3f, 0x00, 0x42, 0x04, 0x00, 0x00, 0x00,
+  DecodeTest({0xFF, 0x09, 0x3F, 0x00, 0x3F, 0x00, 0x42, 0x04, 0x00, 0x00, 0x00,
               0x00, 0x56, 0x57, 0x00, 0x04},
              [this](Local<Value> value) {
                ASSERT_TRUE(value->IsUint16Array());
@@ -2083,7 +2063,7 @@
                EXPECT_TRUE(EvaluateScriptForResultBool(
                    "Object.getPrototypeOf(result) === Uint16Array.prototype"));
              });
-  DecodeTest({0xff, 0x09, 0x3f, 0x00, 0x3f, 0x00, 0x42, 0x04, 0x00, 0x00, 0x00,
+  DecodeTest({0xFF, 0x09, 0x3F, 0x00, 0x3F, 0x00, 0x42, 0x04, 0x00, 0x00, 0x00,
               0x00, 0x56, 0x77, 0x00, 0x04},
              [this](Local<Value> value) {
                ASSERT_TRUE(value->IsInt16Array());
@@ -2092,7 +2072,7 @@
                EXPECT_TRUE(EvaluateScriptForResultBool(
                    "Object.getPrototypeOf(result) === Int16Array.prototype"));
              });
-  DecodeTest({0xff, 0x09, 0x3f, 0x00, 0x3f, 0x00, 0x42, 0x08, 0x00, 0x00,
+  DecodeTest({0xFF, 0x09, 0x3F, 0x00, 0x3F, 0x00, 0x42, 0x08, 0x00, 0x00,
               0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x56, 0x44, 0x00, 0x08},
              [this](Local<Value> value) {
                ASSERT_TRUE(value->IsUint32Array());
@@ -2101,7 +2081,7 @@
                EXPECT_TRUE(EvaluateScriptForResultBool(
                    "Object.getPrototypeOf(result) === Uint32Array.prototype"));
              });
-  DecodeTest({0xff, 0x09, 0x3f, 0x00, 0x3f, 0x00, 0x42, 0x08, 0x00, 0x00,
+  DecodeTest({0xFF, 0x09, 0x3F, 0x00, 0x3F, 0x00, 0x42, 0x08, 0x00, 0x00,
               0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x56, 0x64, 0x00, 0x08},
              [this](Local<Value> value) {
                ASSERT_TRUE(value->IsInt32Array());
@@ -2110,7 +2090,7 @@
                EXPECT_TRUE(EvaluateScriptForResultBool(
                    "Object.getPrototypeOf(result) === Int32Array.prototype"));
              });
-  DecodeTest({0xff, 0x09, 0x3f, 0x00, 0x3f, 0x00, 0x42, 0x08, 0x00, 0x00,
+  DecodeTest({0xFF, 0x09, 0x3F, 0x00, 0x3F, 0x00, 0x42, 0x08, 0x00, 0x00,
               0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x56, 0x66, 0x00, 0x08},
              [this](Local<Value> value) {
                ASSERT_TRUE(value->IsFloat32Array());
@@ -2119,7 +2099,7 @@
                EXPECT_TRUE(EvaluateScriptForResultBool(
                    "Object.getPrototypeOf(result) === Float32Array.prototype"));
              });
-  DecodeTest({0xff, 0x09, 0x3f, 0x00, 0x3f, 0x00, 0x42, 0x10, 0x00, 0x00,
+  DecodeTest({0xFF, 0x09, 0x3F, 0x00, 0x3F, 0x00, 0x42, 0x10, 0x00, 0x00,
               0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
               0x00, 0x00, 0x00, 0x00, 0x56, 0x46, 0x00, 0x10},
              [this](Local<Value> value) {
@@ -2132,22 +2112,22 @@
 #endif  // V8_TARGET_LITTLE_ENDIAN
 
   // Check that values of various kinds are suitably preserved.
-  DecodeTest({0xff, 0x09, 0x3f, 0x00, 0x3f, 0x00, 0x42, 0x03, 0x01, 0x80, 0xff,
+  DecodeTest({0xFF, 0x09, 0x3F, 0x00, 0x3F, 0x00, 0x42, 0x03, 0x01, 0x80, 0xFF,
               0x56, 0x42, 0x00, 0x03, 0x00},
              [this](Local<Value> value) {
                EXPECT_TRUE(EvaluateScriptForResultBool(
                    "result.toString() === '1,128,255'"));
              });
 #if defined(V8_TARGET_LITTLE_ENDIAN)
-  DecodeTest({0xff, 0x09, 0x3f, 0x00, 0x3f, 0x00, 0x42, 0x06, 0x00, 0x00, 0x00,
+  DecodeTest({0xFF, 0x09, 0x3F, 0x00, 0x3F, 0x00, 0x42, 0x06, 0x00, 0x00, 0x00,
               0x01, 0x00, 0x80, 0x56, 0x77, 0x00, 0x06},
              [this](Local<Value> value) {
                EXPECT_TRUE(EvaluateScriptForResultBool(
                    "result.toString() === '0,256,-32768'"));
              });
-  DecodeTest({0xff, 0x09, 0x3f, 0x00, 0x3f, 0x00, 0x42, 0x10, 0x00, 0x00,
-              0x00, 0x00, 0x00, 0x00, 0x00, 0xbf, 0x00, 0x00, 0xc0, 0x7f,
-              0x00, 0x00, 0x80, 0x7f, 0x56, 0x66, 0x00, 0x10},
+  DecodeTest({0xFF, 0x09, 0x3F, 0x00, 0x3F, 0x00, 0x42, 0x10, 0x00, 0x00,
+              0x00, 0x00, 0x00, 0x00, 0x00, 0xBF, 0x00, 0x00, 0xC0, 0x7F,
+              0x00, 0x00, 0x80, 0x7F, 0x56, 0x66, 0x00, 0x10},
              [this](Local<Value> value) {
                EXPECT_TRUE(EvaluateScriptForResultBool(
                    "result.toString() === '0,-0.5,NaN,Infinity'"));
@@ -2157,14 +2137,14 @@
   // Array buffer views sharing a buffer should do so on the other side.
   // Similarly, multiple references to the same typed array should be resolved.
   DecodeTest(
-      {0xff, 0x09, 0x3f, 0x00, 0x6f, 0x3f, 0x01, 0x53, 0x02, 0x75, 0x38, 0x3f,
-       0x01, 0x3f, 0x01, 0x42, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+      {0xFF, 0x09, 0x3F, 0x00, 0x6F, 0x3F, 0x01, 0x53, 0x02, 0x75, 0x38, 0x3F,
+       0x01, 0x3F, 0x01, 0x42, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-       0x00, 0x56, 0x42, 0x00, 0x20, 0x3f, 0x03, 0x53, 0x04, 0x75, 0x38, 0x5f,
-       0x32, 0x3f, 0x03, 0x5e, 0x02, 0x3f, 0x03, 0x53, 0x03, 0x66, 0x33, 0x32,
-       0x3f, 0x03, 0x3f, 0x03, 0x5e, 0x01, 0x56, 0x66, 0x04, 0x14, 0x3f, 0x04,
-       0x53, 0x01, 0x62, 0x3f, 0x04, 0x5e, 0x01, 0x7b, 0x04, 0x00},
+       0x00, 0x56, 0x42, 0x00, 0x20, 0x3F, 0x03, 0x53, 0x04, 0x75, 0x38, 0x5F,
+       0x32, 0x3F, 0x03, 0x5E, 0x02, 0x3F, 0x03, 0x53, 0x03, 0x66, 0x33, 0x32,
+       0x3F, 0x03, 0x3F, 0x03, 0x5E, 0x01, 0x56, 0x66, 0x04, 0x14, 0x3F, 0x04,
+       0x53, 0x01, 0x62, 0x3F, 0x04, 0x5E, 0x01, 0x7B, 0x04, 0x00},
       [this](Local<Value> value) {
         EXPECT_TRUE(
             EvaluateScriptForResultBool("result.u8 instanceof Uint8Array"));
@@ -2181,19 +2161,19 @@
 TEST_F(ValueSerializerTest, DecodeInvalidTypedArray) {
   // Byte offset out of range.
   InvalidDecodeTest(
-      {0xff, 0x09, 0x42, 0x02, 0x00, 0x00, 0x56, 0x42, 0x03, 0x01});
+      {0xFF, 0x09, 0x42, 0x02, 0x00, 0x00, 0x56, 0x42, 0x03, 0x01});
   // Byte offset in range, offset + length out of range.
   InvalidDecodeTest(
-      {0xff, 0x09, 0x42, 0x02, 0x00, 0x00, 0x56, 0x42, 0x01, 0x03});
+      {0xFF, 0x09, 0x42, 0x02, 0x00, 0x00, 0x56, 0x42, 0x01, 0x03});
   // Byte offset not divisible by element size.
   InvalidDecodeTest(
-      {0xff, 0x09, 0x42, 0x04, 0x00, 0x00, 0x00, 0x00, 0x56, 0x77, 0x01, 0x02});
+      {0xFF, 0x09, 0x42, 0x04, 0x00, 0x00, 0x00, 0x00, 0x56, 0x77, 0x01, 0x02});
   // Byte length not divisible by element size.
   InvalidDecodeTest(
-      {0xff, 0x09, 0x42, 0x04, 0x00, 0x00, 0x00, 0x00, 0x56, 0x77, 0x02, 0x01});
-  // Invalid view type (0xff).
+      {0xFF, 0x09, 0x42, 0x04, 0x00, 0x00, 0x00, 0x00, 0x56, 0x77, 0x02, 0x01});
+  // Invalid view type (0xFF).
   InvalidDecodeTest(
-      {0xff, 0x09, 0x42, 0x02, 0x00, 0x00, 0x56, 0xff, 0x01, 0x01});
+      {0xFF, 0x09, 0x42, 0x02, 0x00, 0x00, 0x56, 0xFF, 0x01, 0x01});
 }
 
 TEST_F(ValueSerializerTest, RoundTripDataView) {
@@ -2209,8 +2189,8 @@
 }
 
 TEST_F(ValueSerializerTest, DecodeDataView) {
-  DecodeTest({0xff, 0x09, 0x3f, 0x00, 0x3f, 0x00, 0x42, 0x04, 0x00, 0x00, 0x00,
-              0x00, 0x56, 0x3f, 0x01, 0x02},
+  DecodeTest({0xFF, 0x09, 0x3F, 0x00, 0x3F, 0x00, 0x42, 0x04, 0x00, 0x00, 0x00,
+              0x00, 0x56, 0x3F, 0x01, 0x02},
              [this](Local<Value> value) {
                ASSERT_TRUE(value->IsDataView());
                EXPECT_EQ(1u, DataView::Cast(*value)->ByteOffset());
@@ -2224,30 +2204,29 @@
 TEST_F(ValueSerializerTest, DecodeInvalidDataView) {
   // Byte offset out of range.
   InvalidDecodeTest(
-      {0xff, 0x09, 0x42, 0x02, 0x00, 0x00, 0x56, 0x3f, 0x03, 0x01});
+      {0xFF, 0x09, 0x42, 0x02, 0x00, 0x00, 0x56, 0x3F, 0x03, 0x01});
   // Byte offset in range, offset + length out of range.
   InvalidDecodeTest(
-      {0xff, 0x09, 0x42, 0x02, 0x00, 0x00, 0x56, 0x3f, 0x01, 0x03});
+      {0xFF, 0x09, 0x42, 0x02, 0x00, 0x00, 0x56, 0x3F, 0x01, 0x03});
 }
 
 class ValueSerializerTestWithSharedArrayBufferTransfer
     : public ValueSerializerTest {
  protected:
-  static const size_t kTestByteLength = 4;
-
   ValueSerializerTestWithSharedArrayBufferTransfer()
-      : serializer_delegate_(this) {
-    const uint8_t data[kTestByteLength] = {0x00, 0x01, 0x80, 0xff};
-    memcpy(data_, data, kTestByteLength);
+      : serializer_delegate_(this) {}
+
+  void InitializeData(const std::vector<uint8_t>& data) {
+    data_ = data;
     {
       Context::Scope scope(serialization_context());
       input_buffer_ =
-          SharedArrayBuffer::New(isolate(), &data_, kTestByteLength);
+          SharedArrayBuffer::New(isolate(), data_.data(), data_.size());
     }
     {
       Context::Scope scope(deserialization_context());
       output_buffer_ =
-          SharedArrayBuffer::New(isolate(), &data_, kTestByteLength);
+          SharedArrayBuffer::New(isolate(), data_.data(), data_.size());
     }
   }
 
@@ -2305,7 +2284,7 @@
 
  private:
   static bool flag_was_enabled_;
-  uint8_t data_[kTestByteLength];
+  std::vector<uint8_t> data_;
   Local<SharedArrayBuffer> input_buffer_;
   Local<SharedArrayBuffer> output_buffer_;
 };
@@ -2315,6 +2294,8 @@
 
 TEST_F(ValueSerializerTestWithSharedArrayBufferTransfer,
        RoundTripSharedArrayBufferTransfer) {
+  InitializeData({0x00, 0x01, 0x80, 0xFF});
+
   EXPECT_CALL(serializer_delegate_,
               GetSharedArrayBufferId(isolate(), input_buffer()))
       .WillRepeatedly(Return(Just(0U)));
@@ -2350,6 +2331,40 @@
       });
 }
 
+TEST_F(ValueSerializerTestWithSharedArrayBufferTransfer,
+       RoundTripWebAssemblyMemory) {
+  bool flag_was_enabled = i::FLAG_experimental_wasm_threads;
+  i::FLAG_experimental_wasm_threads = true;
+
+  std::vector<uint8_t> data = {0x00, 0x01, 0x80, 0xFF};
+  data.resize(65536);
+  InitializeData(data);
+
+  EXPECT_CALL(serializer_delegate_,
+              GetSharedArrayBufferId(isolate(), input_buffer()))
+      .WillRepeatedly(Return(Just(0U)));
+
+  RoundTripTest(
+      [this]() -> Local<Value> {
+        const int32_t kMaxPages = 1;
+        auto i_isolate = reinterpret_cast<i::Isolate*>(isolate());
+        i::Handle<i::JSArrayBuffer> obj = Utils::OpenHandle(*input_buffer());
+        return Utils::Convert<i::WasmMemoryObject, Value>(
+            i::WasmMemoryObject::New(i_isolate, obj, kMaxPages));
+      },
+      [this](Local<Value> value) {
+        EXPECT_TRUE(EvaluateScriptForResultBool(
+            "result instanceof WebAssembly.Memory"));
+        EXPECT_TRUE(
+            EvaluateScriptForResultBool("result.buffer.byteLength === 65536"));
+        EXPECT_TRUE(
+            EvaluateScriptForResultBool("new Uint8Array(result.buffer, 0, "
+                                        "4).toString() === '0,1,128,255'"));
+      });
+
+  i::FLAG_experimental_wasm_threads = flag_was_enabled;
+}
+
 TEST_F(ValueSerializerTest, UnsupportedHostObject) {
   InvalidEncodeTest("new ExampleHostObject()");
   InvalidEncodeTest("({ a: new ExampleHostObject() })");
@@ -2604,7 +2619,7 @@
         return NewHostObject(deserialization_context(), 0, nullptr);
       }));
   DecodeTest(
-      {0xff, 0x0d, 0x5c, kExampleHostObjectTag}, [this](Local<Value> value) {
+      {0xFF, 0x0D, 0x5C, kExampleHostObjectTag}, [this](Local<Value> value) {
         EXPECT_TRUE(EvaluateScriptForResultBool(
             "Object.getPrototypeOf(result) === ExampleHostObject.prototype"));
       });
@@ -2939,67 +2954,67 @@
 
 // As produced around Chrome 56.
 const unsigned char kSerializedIncrementerWasm[] = {
-    0xff, 0x09, 0x3f, 0x00, 0x57, 0x79, 0x2d, 0x00, 0x61, 0x73, 0x6d, 0x0d,
-    0x00, 0x00, 0x00, 0x01, 0x06, 0x01, 0x60, 0x01, 0x7f, 0x01, 0x7f, 0x03,
-    0x02, 0x01, 0x00, 0x07, 0x0d, 0x01, 0x09, 0x69, 0x6e, 0x63, 0x72, 0x65,
-    0x6d, 0x65, 0x6e, 0x74, 0x00, 0x00, 0x0a, 0x08, 0x01, 0x06, 0x00, 0x20,
-    0x00, 0x41, 0x01, 0x6a, 0xf8, 0x04, 0xa1, 0x06, 0xde, 0xc0, 0xc6, 0x44,
-    0x3c, 0x29, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x02, 0x00, 0x00, 0x81, 0x4e,
-    0xce, 0x7c, 0x05, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x30, 0x02,
-    0x00, 0x00, 0xb0, 0x25, 0x30, 0xe3, 0xf2, 0xdb, 0x2e, 0x48, 0x00, 0x00,
-    0x00, 0x80, 0xe8, 0x00, 0x00, 0x80, 0xe0, 0x01, 0x00, 0x80, 0x00, 0x00,
+    0xFF, 0x09, 0x3F, 0x00, 0x57, 0x79, 0x2D, 0x00, 0x61, 0x73, 0x6D, 0x0D,
+    0x00, 0x00, 0x00, 0x01, 0x06, 0x01, 0x60, 0x01, 0x7F, 0x01, 0x7F, 0x03,
+    0x02, 0x01, 0x00, 0x07, 0x0D, 0x01, 0x09, 0x69, 0x6E, 0x63, 0x72, 0x65,
+    0x6D, 0x65, 0x6E, 0x74, 0x00, 0x00, 0x0A, 0x08, 0x01, 0x06, 0x00, 0x20,
+    0x00, 0x41, 0x01, 0x6A, 0xF8, 0x04, 0xA1, 0x06, 0xDE, 0xC0, 0xC6, 0x44,
+    0x3C, 0x29, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x02, 0x00, 0x00, 0x81, 0x4E,
+    0xCE, 0x7C, 0x05, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x30, 0x02,
+    0x00, 0x00, 0xB0, 0x25, 0x30, 0xE3, 0xF2, 0xDB, 0x2E, 0x48, 0x00, 0x00,
+    0x00, 0x80, 0xE8, 0x00, 0x00, 0x80, 0xE0, 0x01, 0x00, 0x80, 0x00, 0x00,
     0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x07, 0x08, 0x00, 0x00, 0x09, 0x04,
-    0x10, 0x02, 0x00, 0x00, 0x00, 0x00, 0x01, 0x3c, 0x8c, 0xc0, 0x00, 0x00,
-    0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x01, 0x10, 0x8c, 0xc0, 0x00, 0x00,
-    0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x70, 0x94, 0x01, 0x0c, 0x8b,
-    0xc1, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x25, 0xdc, 0x00,
-    0x00, 0x00, 0x00, 0x00, 0x00, 0x9e, 0x01, 0x10, 0x8c, 0xc0, 0x00, 0x00,
-    0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x84, 0xc0, 0x00, 0x00, 0x00, 0x00,
-    0x00, 0x00, 0x00, 0x00, 0x05, 0x7d, 0x01, 0x1a, 0xe1, 0x02, 0x00, 0x00,
+    0x10, 0x02, 0x00, 0x00, 0x00, 0x00, 0x01, 0x3C, 0x8C, 0xC0, 0x00, 0x00,
+    0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x01, 0x10, 0x8C, 0xC0, 0x00, 0x00,
+    0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x70, 0x94, 0x01, 0x0C, 0x8B,
+    0xC1, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x25, 0xDC, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x9E, 0x01, 0x10, 0x8C, 0xC0, 0x00, 0x00,
+    0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x84, 0xC0, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x05, 0x7D, 0x01, 0x1A, 0xE1, 0x02, 0x00, 0x00,
     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x23, 0x88, 0x42, 0x32, 0x03,
     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x00,
-    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x04, 0x00,
-    0x00, 0x02, 0xa1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff,
-    0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x49, 0x3b, 0xa5, 0x60, 0x0c, 0x00,
-    0x00, 0x0f, 0x86, 0x04, 0x00, 0x00, 0x00, 0x83, 0xc0, 0x01, 0xc3, 0x55,
-    0x48, 0x89, 0xe5, 0x49, 0xba, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00,
-    0x00, 0x41, 0x52, 0x48, 0x83, 0xec, 0x08, 0x48, 0x89, 0x45, 0xf0, 0x48,
-    0xbb, 0xb0, 0x67, 0xc6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x33, 0xc0, 0x48,
-    0xbe, 0xe1, 0x57, 0x81, 0x85, 0xf6, 0x14, 0x00, 0x00, 0xe8, 0xfc, 0x3c,
-    0xea, 0xff, 0x48, 0x8b, 0x45, 0xf0, 0x48, 0x8b, 0xe5, 0x5d, 0xeb, 0xbf,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x00, 0x04, 0x00,
+    0x00, 0x02, 0xA1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF,
+    0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x49, 0x3B, 0xA5, 0x60, 0x0C, 0x00,
+    0x00, 0x0F, 0x86, 0x04, 0x00, 0x00, 0x00, 0x83, 0xC0, 0x01, 0xC3, 0x55,
+    0x48, 0x89, 0xE5, 0x49, 0xBA, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00,
+    0x00, 0x41, 0x52, 0x48, 0x83, 0xEC, 0x08, 0x48, 0x89, 0x45, 0xF0, 0x48,
+    0xBB, 0xB0, 0x67, 0xC6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x33, 0xC0, 0x48,
+    0xBE, 0xE1, 0x57, 0x81, 0x85, 0xF6, 0x14, 0x00, 0x00, 0xE8, 0xFC, 0x3C,
+    0xEA, 0xFF, 0x48, 0x8B, 0x45, 0xF0, 0x48, 0x8B, 0xE5, 0x5D, 0xEB, 0xBF,
     0x66, 0x90, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x44, 0x00,
-    0x00, 0x00, 0xff, 0xff, 0xff, 0x0f, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0xFF, 0xFF, 0xFF, 0x0F, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00,
     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-    0x00, 0x00, 0x0f, 0x20, 0x84, 0x0f, 0x7d, 0x01, 0x0d, 0x00, 0x0f, 0x04,
-    0x6d, 0x08, 0x0f, 0xf0, 0x02, 0x80, 0x94, 0x01, 0x0c, 0x8b, 0xc1, 0x00,
-    0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0xed, 0xa9, 0x2d, 0x00, 0x00,
-    0x00, 0x00, 0x00, 0x9e, 0xe0, 0x38, 0x1a, 0x61, 0x03, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x0F, 0x20, 0x84, 0x0F, 0x7D, 0x01, 0x0D, 0x00, 0x0F, 0x04,
+    0x6D, 0x08, 0x0F, 0xF0, 0x02, 0x80, 0x94, 0x01, 0x0C, 0x8B, 0xC1, 0x00,
+    0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0xED, 0xA9, 0x2D, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x9E, 0xE0, 0x38, 0x1A, 0x61, 0x03, 0x00, 0x00, 0x00,
     0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x23, 0x88, 0x42, 0x32, 0x03, 0x00,
-    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9a, 0x00, 0x00,
-    0x00, 0x00, 0x00, 0x00, 0x00, 0x4e, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00,
-    0x02, 0xf9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff,
-    0xff, 0x00, 0x00, 0x00, 0x00, 0x55, 0x48, 0x89, 0xe5, 0x56, 0x57, 0x48,
-    0x8b, 0x45, 0x10, 0xe8, 0x11, 0xed, 0xed, 0xff, 0xa8, 0x01, 0x0f, 0x85,
-    0x2d, 0x00, 0x00, 0x00, 0x48, 0xc1, 0xe8, 0x20, 0xc5, 0xf9, 0x57, 0xc0,
-    0xc5, 0xfb, 0x2a, 0xc0, 0xc4, 0xe1, 0xfb, 0x2c, 0xc0, 0x48, 0x83, 0xf8,
-    0x01, 0x0f, 0x80, 0x34, 0x00, 0x00, 0x00, 0x8b, 0xc0, 0xe8, 0x27, 0xfe,
-    0xff, 0xff, 0x48, 0xc1, 0xe0, 0x20, 0x48, 0x8b, 0xe5, 0x5d, 0xc2, 0x10,
-    0x00, 0x49, 0x39, 0x45, 0xa0, 0x0f, 0x84, 0x07, 0x00, 0x00, 0x00, 0xc5,
-    0xfb, 0x10, 0x40, 0x07, 0xeb, 0xce, 0x49, 0xba, 0x00, 0x00, 0x00, 0x00,
-    0x00, 0x00, 0xf8, 0x7f, 0xc4, 0xc1, 0xf9, 0x6e, 0xc2, 0xeb, 0xbd, 0x48,
-    0x83, 0xec, 0x08, 0xc5, 0xfb, 0x11, 0x04, 0x24, 0xe8, 0xcc, 0xfe, 0xff,
-    0xff, 0x48, 0x83, 0xc4, 0x08, 0xeb, 0xb8, 0x66, 0x90, 0x02, 0x00, 0x00,
-    0x00, 0x03, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff,
-    0x0f, 0x39, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x0f, 0xff, 0xff, 0x00,
-    0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x20, 0x84,
-    0x0f, 0xcc, 0x6e, 0x7d, 0x01, 0x72, 0x98, 0x00, 0x0f, 0xdc, 0x6d, 0x0c,
-    0x0f, 0xb0, 0x84, 0x0d, 0x04, 0x84, 0xe3, 0xc0, 0x00, 0x00, 0x00, 0x00,
-    0x00, 0x00, 0x00, 0x00, 0x84, 0xe0, 0x84, 0x84, 0x18, 0x2f, 0x2f, 0x2f,
-    0x2f, 0x2f};
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9A, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x4E, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00,
+    0x02, 0xF9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF,
+    0xFF, 0x00, 0x00, 0x00, 0x00, 0x55, 0x48, 0x89, 0xE5, 0x56, 0x57, 0x48,
+    0x8B, 0x45, 0x10, 0xE8, 0x11, 0xED, 0xED, 0xFF, 0xA8, 0x01, 0x0F, 0x85,
+    0x2D, 0x00, 0x00, 0x00, 0x48, 0xC1, 0xE8, 0x20, 0xC5, 0xF9, 0x57, 0xC0,
+    0xC5, 0xFB, 0x2A, 0xC0, 0xC4, 0xE1, 0xFB, 0x2C, 0xC0, 0x48, 0x83, 0xF8,
+    0x01, 0x0F, 0x80, 0x34, 0x00, 0x00, 0x00, 0x8B, 0xC0, 0xE8, 0x27, 0xFE,
+    0xFF, 0xFF, 0x48, 0xC1, 0xE0, 0x20, 0x48, 0x8B, 0xE5, 0x5D, 0xC2, 0x10,
+    0x00, 0x49, 0x39, 0x45, 0xA0, 0x0F, 0x84, 0x07, 0x00, 0x00, 0x00, 0xC5,
+    0xFB, 0x10, 0x40, 0x07, 0xEB, 0xCE, 0x49, 0xBA, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0xF8, 0x7F, 0xC4, 0xC1, 0xF9, 0x6E, 0xC2, 0xEB, 0xBD, 0x48,
+    0x83, 0xEC, 0x08, 0xC5, 0xFB, 0x11, 0x04, 0x24, 0xE8, 0xCC, 0xFE, 0xFF,
+    0xFF, 0x48, 0x83, 0xC4, 0x08, 0xEB, 0xB8, 0x66, 0x90, 0x02, 0x00, 0x00,
+    0x00, 0x03, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF,
+    0x0F, 0x39, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0x0F, 0xFF, 0xFF, 0x00,
+    0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x20, 0x84,
+    0x0F, 0xCC, 0x6E, 0x7D, 0x01, 0x72, 0x98, 0x00, 0x0F, 0xDC, 0x6D, 0x0C,
+    0x0F, 0xB0, 0x84, 0x0D, 0x04, 0x84, 0xE3, 0xC0, 0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0x84, 0xE0, 0x84, 0x84, 0x18, 0x2F, 0x2F, 0x2F,
+    0x2F, 0x2F};
 
 TEST_F(ValueSerializerTestWithWasm, DecodeWasmModule) {
-  if (true) return;  // TODO(mtrofin): fix this test
+  if ((true)) return;  // TODO(mtrofin): fix this test
   std::vector<uint8_t> raw(
       kSerializedIncrementerWasm,
       kSerializedIncrementerWasm + sizeof(kSerializedIncrementerWasm));
@@ -3013,14 +3028,14 @@
 // As above, but with empty compiled data. Should work due to fallback to wire
 // data.
 const unsigned char kSerializedIncrementerWasmWithInvalidCompiledData[] = {
-    0xff, 0x09, 0x3f, 0x00, 0x57, 0x79, 0x2d, 0x00, 0x61, 0x73, 0x6d,
-    0x0d, 0x00, 0x00, 0x00, 0x01, 0x06, 0x01, 0x60, 0x01, 0x7f, 0x01,
-    0x7f, 0x03, 0x02, 0x01, 0x00, 0x07, 0x0d, 0x01, 0x09, 0x69, 0x6e,
-    0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x00, 0x00, 0x0a, 0x08,
-    0x01, 0x06, 0x00, 0x20, 0x00, 0x41, 0x01, 0x6a, 0x00};
+    0xFF, 0x09, 0x3F, 0x00, 0x57, 0x79, 0x2D, 0x00, 0x61, 0x73, 0x6D,
+    0x0D, 0x00, 0x00, 0x00, 0x01, 0x06, 0x01, 0x60, 0x01, 0x7F, 0x01,
+    0x7F, 0x03, 0x02, 0x01, 0x00, 0x07, 0x0D, 0x01, 0x09, 0x69, 0x6E,
+    0x63, 0x72, 0x65, 0x6D, 0x65, 0x6E, 0x74, 0x00, 0x00, 0x0A, 0x08,
+    0x01, 0x06, 0x00, 0x20, 0x00, 0x41, 0x01, 0x6A, 0x00};
 
 TEST_F(ValueSerializerTestWithWasm, DecodeWasmModuleWithInvalidCompiledData) {
-  if (true) return;  // TODO(titzer): regenerate this test
+  if ((true)) return;  // TODO(titzer): regenerate this test
   std::vector<uint8_t> raw(
       kSerializedIncrementerWasmWithInvalidCompiledData,
       kSerializedIncrementerWasmWithInvalidCompiledData +
@@ -3034,7 +3049,7 @@
 
 // As above, but also with empty wire data. Should fail.
 const unsigned char kSerializedIncrementerWasmInvalid[] = {
-    0xff, 0x09, 0x3f, 0x00, 0x57, 0x79, 0x00, 0x00};
+    0xFF, 0x09, 0x3F, 0x00, 0x57, 0x79, 0x00, 0x00};
 
 TEST_F(ValueSerializerTestWithWasm,
        DecodeWasmModuleWithInvalidCompiledAndWireData) {
@@ -3045,8 +3060,8 @@
 }
 
 TEST_F(ValueSerializerTestWithWasm, DecodeWasmModuleWithInvalidDataLength) {
-  InvalidDecodeTest({0xff, 0x09, 0x3f, 0x00, 0x57, 0x79, 0x7f, 0x00});
-  InvalidDecodeTest({0xff, 0x09, 0x3f, 0x00, 0x57, 0x79, 0x00, 0x7f});
+  InvalidDecodeTest({0xFF, 0x09, 0x3F, 0x00, 0x57, 0x79, 0x7F, 0x00});
+  InvalidDecodeTest({0xFF, 0x09, 0x3F, 0x00, 0x57, 0x79, 0x00, 0x7F});
 }
 
 }  // namespace
diff --git a/src/v8/test/unittests/wasm/decoder-unittest.cc b/src/v8/test/unittests/wasm/decoder-unittest.cc
index 0f11933..627a9da 100644
--- a/src/v8/test/unittests/wasm/decoder-unittest.cc
+++ b/src/v8/test/unittests/wasm/decoder-unittest.cc
@@ -19,50 +19,54 @@
   Decoder decoder;
 };
 
-#define CHECK_UINT32V_INLINE(expected, expected_length, ...)            \
-  do {                                                                  \
-    const byte data[] = {__VA_ARGS__};                                  \
-    decoder.Reset(data, data + sizeof(data));                           \
-    unsigned length;                                                    \
-    EXPECT_EQ(static_cast<uint32_t>(expected),                          \
-              decoder.read_u32v<true>(decoder.start(), &length));       \
-    EXPECT_EQ(static_cast<unsigned>(expected_length), length);          \
-    EXPECT_EQ(data, decoder.pc());                                      \
-    EXPECT_TRUE(decoder.ok());                                          \
-    EXPECT_EQ(static_cast<uint32_t>(expected), decoder.consume_u32v()); \
-    EXPECT_EQ(data + expected_length, decoder.pc());                    \
+#define CHECK_UINT32V_INLINE(expected, expected_length, ...)              \
+  do {                                                                    \
+    const byte data[] = {__VA_ARGS__};                                    \
+    decoder.Reset(data, data + sizeof(data));                             \
+    unsigned length;                                                      \
+    EXPECT_EQ(                                                            \
+        static_cast<uint32_t>(expected),                                  \
+        decoder.read_u32v<Decoder::kValidate>(decoder.start(), &length)); \
+    EXPECT_EQ(static_cast<unsigned>(expected_length), length);            \
+    EXPECT_EQ(data, decoder.pc());                                        \
+    EXPECT_TRUE(decoder.ok());                                            \
+    EXPECT_EQ(static_cast<uint32_t>(expected), decoder.consume_u32v());   \
+    EXPECT_EQ(data + expected_length, decoder.pc());                      \
   } while (false)
 
-#define CHECK_INT32V_INLINE(expected, expected_length, ...)                 \
-  do {                                                                      \
-    const byte data[] = {__VA_ARGS__};                                      \
-    decoder.Reset(data, data + sizeof(data));                               \
-    unsigned length;                                                        \
-    EXPECT_EQ(expected, decoder.read_i32v<true>(decoder.start(), &length)); \
-    EXPECT_EQ(static_cast<unsigned>(expected_length), length);              \
-    EXPECT_EQ(data, decoder.pc());                                          \
-    EXPECT_TRUE(decoder.ok());                                              \
-    EXPECT_EQ(expected, decoder.consume_i32v());                            \
-    EXPECT_EQ(data + expected_length, decoder.pc());                        \
+#define CHECK_INT32V_INLINE(expected, expected_length, ...)                    \
+  do {                                                                         \
+    const byte data[] = {__VA_ARGS__};                                         \
+    decoder.Reset(data, data + sizeof(data));                                  \
+    unsigned length;                                                           \
+    EXPECT_EQ(expected, decoder.read_i32v<Decoder::kValidate>(decoder.start(), \
+                                                              &length));       \
+    EXPECT_EQ(static_cast<unsigned>(expected_length), length);                 \
+    EXPECT_EQ(data, decoder.pc());                                             \
+    EXPECT_TRUE(decoder.ok());                                                 \
+    EXPECT_EQ(expected, decoder.consume_i32v());                               \
+    EXPECT_EQ(data + expected_length, decoder.pc());                           \
   } while (false)
 
-#define CHECK_UINT64V_INLINE(expected, expected_length, ...)       \
-  do {                                                             \
-    const byte data[] = {__VA_ARGS__};                             \
-    decoder.Reset(data, data + sizeof(data));                      \
-    unsigned length;                                               \
-    EXPECT_EQ(static_cast<uint64_t>(expected),                     \
-              decoder.read_u64v<false>(decoder.start(), &length)); \
-    EXPECT_EQ(static_cast<unsigned>(expected_length), length);     \
+#define CHECK_UINT64V_INLINE(expected, expected_length, ...)              \
+  do {                                                                    \
+    const byte data[] = {__VA_ARGS__};                                    \
+    decoder.Reset(data, data + sizeof(data));                             \
+    unsigned length;                                                      \
+    EXPECT_EQ(                                                            \
+        static_cast<uint64_t>(expected),                                  \
+        decoder.read_u64v<Decoder::kValidate>(decoder.start(), &length)); \
+    EXPECT_EQ(static_cast<unsigned>(expected_length), length);            \
   } while (false)
 
-#define CHECK_INT64V_INLINE(expected, expected_length, ...)                  \
-  do {                                                                       \
-    const byte data[] = {__VA_ARGS__};                                       \
-    decoder.Reset(data, data + sizeof(data));                                \
-    unsigned length;                                                         \
-    EXPECT_EQ(expected, decoder.read_i64v<false>(decoder.start(), &length)); \
-    EXPECT_EQ(static_cast<unsigned>(expected_length), length);               \
+#define CHECK_INT64V_INLINE(expected, expected_length, ...)                    \
+  do {                                                                         \
+    const byte data[] = {__VA_ARGS__};                                         \
+    decoder.Reset(data, data + sizeof(data));                                  \
+    unsigned length;                                                           \
+    EXPECT_EQ(expected, decoder.read_i64v<Decoder::kValidate>(decoder.start(), \
+                                                              &length));       \
+    EXPECT_EQ(static_cast<unsigned>(expected_length), length);                 \
   } while (false)
 
 TEST_F(DecoderTest, ReadU32v_OneByte) {
@@ -181,7 +185,7 @@
   const uint32_t max = 0xFFFFFFFFu;
 
   for (uint32_t i = 1; i < 32; i++) {
-    uint32_t val = 0x983489aau << i;
+    uint32_t val = 0x983489AAu << i;
     CHECK_UINT32V_INLINE(val, 5, U32V_5(val), 0);
   }
 
@@ -374,7 +378,7 @@
   static const byte data[] = {U32V_1(11)};
   unsigned length = 0;
   decoder.Reset(data, data);
-  decoder.read_u32v<true>(decoder.start(), &length);
+  decoder.read_u32v<Decoder::kValidate>(decoder.start(), &length);
   EXPECT_EQ(0u, length);
   EXPECT_FALSE(decoder.ok());
 }
@@ -384,7 +388,7 @@
   for (size_t i = 0; i < sizeof(data); i++) {
     unsigned length = 0;
     decoder.Reset(data, data + i);
-    decoder.read_u32v<true>(decoder.start(), &length);
+    decoder.read_u32v<Decoder::kValidate>(decoder.start(), &length);
     EXPECT_EQ(i, length);
     EXPECT_FALSE(decoder.ok());
   }
@@ -395,7 +399,7 @@
   for (size_t i = 0; i < sizeof(data); i++) {
     unsigned length = 0;
     decoder.Reset(data, data + i);
-    decoder.read_u32v<true>(decoder.start(), &length);
+    decoder.read_u32v<Decoder::kValidate>(decoder.start(), &length);
     EXPECT_EQ(i, length);
     EXPECT_FALSE(decoder.ok());
   }
@@ -406,7 +410,7 @@
   for (size_t i = 0; i < sizeof(data); i++) {
     unsigned length = 0;
     decoder.Reset(data, data + i);
-    decoder.read_u32v<true>(decoder.start(), &length);
+    decoder.read_u32v<Decoder::kValidate>(decoder.start(), &length);
     EXPECT_EQ(i, length);
     EXPECT_FALSE(decoder.ok());
   }
@@ -417,7 +421,7 @@
   for (size_t i = 0; i < sizeof(data); i++) {
     unsigned length = 0;
     decoder.Reset(data, data + i);
-    decoder.read_u32v<true>(decoder.start(), &length);
+    decoder.read_u32v<Decoder::kValidate>(decoder.start(), &length);
     EXPECT_EQ(i, length);
     EXPECT_FALSE(decoder.ok());
   }
@@ -429,7 +433,7 @@
     data[4] = static_cast<byte>(i << 4);
     unsigned length = 0;
     decoder.Reset(data, data + sizeof(data));
-    decoder.read_u32v<true>(decoder.start(), &length);
+    decoder.read_u32v<Decoder::kValidate>(decoder.start(), &length);
     EXPECT_EQ(5u, length);
     EXPECT_FALSE(decoder.ok());
   }
@@ -438,9 +442,9 @@
 TEST_F(DecoderTest, ReadI32v_extra_bits_negative) {
   // OK for negative signed values to have extra ones.
   unsigned length = 0;
-  byte data[] = {0xff, 0xff, 0xff, 0xff, 0x7f};
+  byte data[] = {0xFF, 0xFF, 0xFF, 0xFF, 0x7F};
   decoder.Reset(data, data + sizeof(data));
-  decoder.read_i32v<true>(decoder.start(), &length);
+  decoder.read_i32v<Decoder::kValidate>(decoder.start(), &length);
   EXPECT_EQ(5u, length);
   EXPECT_TRUE(decoder.ok());
 }
@@ -450,7 +454,7 @@
   unsigned length = 0;
   byte data[] = {0x80, 0x80, 0x80, 0x80, 0x77};
   decoder.Reset(data, data + sizeof(data));
-  decoder.read_i32v<true>(decoder.start(), &length);
+  decoder.read_i32v<Decoder::kValidate>(decoder.start(), &length);
   EXPECT_EQ(5u, length);
   EXPECT_FALSE(decoder.ok());
 }
@@ -459,11 +463,11 @@
   // A more exhaustive test.
   const int kMaxSize = 5;
   const uint32_t kVals[] = {
-      0xaabbccdd, 0x11223344, 0x33445566, 0xffeeddcc, 0xF0F0F0F0, 0x0F0F0F0F,
-      0xEEEEEEEE, 0xAAAAAAAA, 0x12345678, 0x9abcdef0, 0x80309488, 0x729ed997,
-      0xc4a0cf81, 0x16c6eb85, 0x4206db8e, 0xf3b089d5, 0xaa2e223e, 0xf99e29c8,
-      0x4a4357d8, 0x1890b1c1, 0x8d80a085, 0xacb6ae4c, 0x1b827e10, 0xeb5c7bd9,
-      0xbb1bc146, 0xdf57a33l};
+      0xAABBCCDD, 0x11223344, 0x33445566, 0xFFEEDDCC, 0xF0F0F0F0, 0x0F0F0F0F,
+      0xEEEEEEEE, 0xAAAAAAAA, 0x12345678, 0x9ABCDEF0, 0x80309488, 0x729ED997,
+      0xC4A0CF81, 0x16C6EB85, 0x4206DB8E, 0xF3B089D5, 0xAA2E223E, 0xF99E29C8,
+      0x4A4357D8, 0x1890B1C1, 0x8D80A085, 0xACB6AE4C, 0x1B827E10, 0xEB5C7BD9,
+      0xBB1BC146, 0xDF57A33l};
   byte data[kMaxSize];
 
   // foreach value in above array
@@ -485,7 +489,7 @@
       for (unsigned limit = 0; limit <= kMaxSize; limit++) {
         decoder.Reset(data, data + limit);
         unsigned rlen;
-        uint32_t result = decoder.read_u32v<true>(data, &rlen);
+        uint32_t result = decoder.read_u32v<Decoder::kValidate>(data, &rlen);
         if (limit < length) {
           EXPECT_FALSE(decoder.ok());
         } else {
@@ -541,7 +545,7 @@
     for (unsigned limit = 0; limit <= kMaxSize; limit++) {
       decoder.Reset(data, data + limit);
       unsigned length;
-      uint64_t result = decoder.read_u64v<true>(data, &length);
+      uint64_t result = decoder.read_u64v<Decoder::kValidate>(data, &length);
       if (limit <= index) {
         EXPECT_FALSE(decoder.ok());
       } else {
@@ -556,11 +560,11 @@
 TEST_F(DecoderTest, ReadU64v_Bits) {
   const int kMaxSize = 10;
   const uint64_t kVals[] = {
-      0xaabbccdd11223344ull, 0x33445566ffeeddccull, 0xF0F0F0F0F0F0F0F0ull,
+      0xAABBCCDD11223344ull, 0x33445566FFEEDDCCull, 0xF0F0F0F0F0F0F0F0ull,
       0x0F0F0F0F0F0F0F0Full, 0xEEEEEEEEEEEEEEEEull, 0xAAAAAAAAAAAAAAAAull,
-      0x123456789abcdef0ull, 0x80309488729ed997ull, 0xc4a0cf8116c6eb85ull,
-      0x4206db8ef3b089d5ull, 0xaa2e223ef99e29c8ull, 0x4a4357d81890b1c1ull,
-      0x8d80a085acb6ae4cull, 0x1b827e10eb5c7bd9ull, 0xbb1bc146df57a338ull};
+      0x123456789ABCDEF0ull, 0x80309488729ED997ull, 0xC4A0CF8116C6EB85ull,
+      0x4206DB8EF3B089D5ull, 0xAA2E223EF99E29C8ull, 0x4A4357D81890B1C1ull,
+      0x8D80A085ACB6AE4Cull, 0x1B827E10EB5C7BD9ull, 0xBB1BC146DF57A338ull};
   byte data[kMaxSize];
 
   // foreach value in above array
@@ -582,7 +586,7 @@
       for (unsigned limit = 0; limit <= kMaxSize; limit++) {
         decoder.Reset(data, data + limit);
         unsigned rlen;
-        uint64_t result = decoder.read_u64v<true>(data, &rlen);
+        uint64_t result = decoder.read_u64v<Decoder::kValidate>(data, &rlen);
         if (limit < length) {
           EXPECT_FALSE(decoder.ok());
         } else {
@@ -599,11 +603,11 @@
   const int kMaxSize = 10;
   // Exhaustive signedness test.
   const uint64_t kVals[] = {
-      0xaabbccdd11223344ull, 0x33445566ffeeddccull, 0xF0F0F0F0F0F0F0F0ull,
+      0xAABBCCDD11223344ull, 0x33445566FFEEDDCCull, 0xF0F0F0F0F0F0F0F0ull,
       0x0F0F0F0F0F0F0F0Full, 0xEEEEEEEEEEEEEEEEull, 0xAAAAAAAAAAAAAAAAull,
-      0x123456789abcdef0ull, 0x80309488729ed997ull, 0xc4a0cf8116c6eb85ull,
-      0x4206db8ef3b089d5ull, 0xaa2e223ef99e29c8ull, 0x4a4357d81890b1c1ull,
-      0x8d80a085acb6ae4cull, 0x1b827e10eb5c7bd9ull, 0xbb1bc146df57a338ull};
+      0x123456789ABCDEF0ull, 0x80309488729ED997ull, 0xC4A0CF8116C6EB85ull,
+      0x4206DB8EF3B089D5ull, 0xAA2E223EF99E29C8ull, 0x4A4357D81890B1C1ull,
+      0x8D80A085ACB6AE4Cull, 0x1B827E10EB5C7BD9ull, 0xBB1BC146DF57A338ull};
   byte data[kMaxSize];
 
   // foreach value in above array
@@ -624,7 +628,7 @@
       for (unsigned limit = 0; limit <= kMaxSize; limit++) {
         decoder.Reset(data, data + limit);
         unsigned rlen;
-        int64_t result = decoder.read_i64v<true>(data, &rlen);
+        int64_t result = decoder.read_i64v<Decoder::kValidate>(data, &rlen);
         if (limit < length) {
           EXPECT_FALSE(decoder.ok());
         } else {
@@ -643,7 +647,7 @@
     data[9] = static_cast<byte>(i << 1);
     unsigned length = 0;
     decoder.Reset(data, data + sizeof(data));
-    decoder.read_u64v<true>(decoder.start(), &length);
+    decoder.read_u64v<Decoder::kValidate>(decoder.start(), &length);
     EXPECT_EQ(10u, length);
     EXPECT_FALSE(decoder.ok());
   }
@@ -652,9 +656,9 @@
 TEST_F(DecoderTest, ReadI64v_extra_bits_negative) {
   // OK for negative signed values to have extra ones.
   unsigned length = 0;
-  byte data[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f};
+  byte data[] = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F};
   decoder.Reset(data, data + sizeof(data));
-  decoder.read_i64v<true>(decoder.start(), &length);
+  decoder.read_i64v<Decoder::kValidate>(decoder.start(), &length);
   EXPECT_EQ(10u, length);
   EXPECT_TRUE(decoder.ok());
 }
@@ -664,7 +668,7 @@
   unsigned length = 0;
   byte data[] = {0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x77};
   decoder.Reset(data, data + sizeof(data));
-  decoder.read_i64v<true>(decoder.start(), &length);
+  decoder.read_i64v<Decoder::kValidate>(decoder.start(), &length);
   EXPECT_EQ(10u, length);
   EXPECT_FALSE(decoder.ok());
 }
diff --git a/src/v8/test/unittests/wasm/function-body-decoder-unittest.cc b/src/v8/test/unittests/wasm/function-body-decoder-unittest.cc
index bda1073..5cc4bf8 100644
--- a/src/v8/test/unittests/wasm/function-body-decoder-unittest.cc
+++ b/src/v8/test/unittests/wasm/function-body-decoder-unittest.cc
@@ -52,36 +52,40 @@
 #define WASM_BRV_IF_ZERO(depth, val) \
   val, WASM_ZERO, kExprBrIf, static_cast<byte>(depth)
 
-#define EXPECT_VERIFIES_C(sig, x) Verify(true, sigs.sig(), x, x + arraysize(x))
+#define EXPECT_VERIFIES_C(sig, x) \
+  Verify(true, sigs.sig(), x, x + arraysize(x), kAppendEnd)
 
-#define EXPECT_FAILURE_C(sig, x) Verify(false, sigs.sig(), x, x + arraysize(x))
+#define EXPECT_FAILURE_C(sig, x) \
+  Verify(false, sigs.sig(), x, x + arraysize(x), kAppendEnd)
 
-#define EXPECT_VERIFIES_SC(sig, x) Verify(true, sig, x, x + arraysize(x))
+#define EXPECT_VERIFIES_SC(sig, x) \
+  Verify(true, sig, x, x + arraysize(x), kAppendEnd)
 
-#define EXPECT_FAILURE_SC(sig, x) Verify(false, sig, x, x + arraysize(x))
+#define EXPECT_FAILURE_SC(sig, x) \
+  Verify(false, sig, x, x + arraysize(x), kAppendEnd)
 
-#define EXPECT_VERIFIES_S(env, ...)                  \
-  do {                                               \
-    static byte code[] = {__VA_ARGS__};              \
-    Verify(true, env, code, code + arraysize(code)); \
+#define EXPECT_VERIFIES_S(env, ...)                              \
+  do {                                                           \
+    static byte code[] = {__VA_ARGS__};                          \
+    Verify(true, env, code, code + arraysize(code), kAppendEnd); \
   } while (false)
 
-#define EXPECT_FAILURE_S(env, ...)                    \
-  do {                                                \
-    static byte code[] = {__VA_ARGS__};               \
-    Verify(false, env, code, code + arraysize(code)); \
+#define EXPECT_FAILURE_S(env, ...)                                \
+  do {                                                            \
+    static byte code[] = {__VA_ARGS__};                           \
+    Verify(false, env, code, code + arraysize(code), kAppendEnd); \
   } while (false)
 
-#define EXPECT_VERIFIES(sig, ...)                        \
-  do {                                                   \
-    static const byte code[] = {__VA_ARGS__};            \
-    Verify(true, sigs.sig(), code, code + sizeof(code)); \
+#define EXPECT_VERIFIES(sig, ...)                                    \
+  do {                                                               \
+    static const byte code[] = {__VA_ARGS__};                        \
+    Verify(true, sigs.sig(), code, code + sizeof(code), kAppendEnd); \
   } while (false)
 
-#define EXPECT_FAILURE(sig, ...)                          \
-  do {                                                    \
-    static const byte code[] = {__VA_ARGS__};             \
-    Verify(false, sigs.sig(), code, code + sizeof(code)); \
+#define EXPECT_FAILURE(sig, ...)                                      \
+  do {                                                                \
+    static const byte code[] = {__VA_ARGS__};                         \
+    Verify(false, sigs.sig(), code, code + sizeof(code), kAppendEnd); \
   } while (false)
 
 class FunctionBodyDecoderTest : public TestWithZone {
@@ -98,18 +102,24 @@
     local_decls.AddLocals(count, type);
   }
 
-  void PrepareBytecode(const byte** startp, const byte** endp) {
+  enum AppendEnd : bool { kAppendEnd, kOmitEnd };
+
+  void PrepareBytecode(const byte** startp, const byte** endp,
+                       AppendEnd append_end) {
     const byte* start = *startp;
     const byte* end = *endp;
     size_t locals_size = local_decls.Size();
-    size_t total_size = end - start + locals_size + 1;
+    size_t total_size = end - start + locals_size;
+    if (append_end == kAppendEnd) ++total_size;
     byte* buffer = static_cast<byte*>(zone()->New(total_size));
     // Prepend the local decls to the code.
     local_decls.Emit(buffer);
     // Emit the code.
     memcpy(buffer + locals_size, start, end - start);
-    // Append an extra end opcode.
-    buffer[total_size - 1] = kExprEnd;
+    if (append_end == kAppendEnd) {
+      // Append an extra end opcode.
+      buffer[total_size - 1] = kExprEnd;
+    }
 
     *startp = buffer;
     *endp = buffer + total_size;
@@ -118,8 +128,8 @@
   // Prepends local variable declarations and renders nice error messages for
   // verification failures.
   void Verify(bool expected_success, FunctionSig* sig, const byte* start,
-              const byte* end) {
-    PrepareBytecode(&start, &end);
+              const byte* end, AppendEnd append_end) {
+    PrepareBytecode(&start, &end, append_end);
 
     // Verify the code.
     DecodeResult result =
@@ -198,12 +208,12 @@
   }
   byte AddGlobal(ValueType type, bool mutability = true) {
     mod.globals.push_back({type, mutability, WasmInitExpr(), 0, false, false});
-    CHECK(mod.globals.size() <= kMaxByteSizedLeb128);
+    CHECK_LE(mod.globals.size(), kMaxByteSizedLeb128);
     return static_cast<byte>(mod.globals.size() - 1);
   }
   byte AddSignature(FunctionSig* sig) {
     mod.signatures.push_back(sig);
-    CHECK(mod.signatures.size() <= kMaxByteSizedLeb128);
+    CHECK_LE(mod.signatures.size(), kMaxByteSizedLeb128);
     return static_cast<byte>(mod.signatures.size() - 1);
   }
   byte AddFunction(FunctionSig* sig) {
@@ -214,7 +224,7 @@
                              {0, 0},   // code
                              false,    // import
                              false});  // export
-    CHECK(mod.functions.size() <= kMaxByteSizedLeb128);
+    CHECK_LE(mod.functions.size(), kMaxByteSizedLeb128);
     return static_cast<byte>(mod.functions.size() - 1);
   }
   byte AddImport(FunctionSig* sig) {
@@ -224,7 +234,7 @@
   }
   byte AddException(WasmExceptionSig* sig) {
     mod.exceptions.emplace_back(sig);
-    CHECK(mod.signatures.size() <= kMaxByteSizedLeb128);
+    CHECK_LE(mod.signatures.size(), kMaxByteSizedLeb128);
     return static_cast<byte>(mod.exceptions.size() - 1);
   }
 
@@ -253,8 +263,8 @@
 
 TEST_F(FunctionBodyDecoderTest, EmptyFunction) {
   byte code[] = {0};
-  Verify(true, sigs.v_v(), code, code);
-  Verify(false, sigs.i_i(), code, code);
+  Verify(true, sigs.v_v(), code, code, kAppendEnd);
+  Verify(false, sigs.i_i(), code, code, kAppendEnd);
 }
 
 TEST_F(FunctionBodyDecoderTest, IncompleteIf1) {
@@ -307,10 +317,12 @@
 }
 
 TEST_F(FunctionBodyDecoderTest, Int32Const_off_end) {
-  byte code[] = {kExprI32Const, 0xaa, 0xbb, 0xcc, 0x44};
+  byte code[] = {kExprI32Const, 0xAA, 0xBB, 0xCC, 0x44};
 
   for (int size = 1; size <= 4; size++) {
-    Verify(false, sigs.i_i(), code, code + size);
+    Verify(false, sigs.i_i(), code, code + size, kAppendEnd);
+    // Should also fail without the trailing 'end' opcode.
+    Verify(false, sigs.i_i(), code, code + size, kOmitEnd);
   }
 }
 
@@ -496,7 +508,7 @@
     buffer[0] = kExprBlock;
     buffer[1] = kLocalVoid;
     buffer[i + 2] = kExprEnd;
-    Verify(true, sigs.v_i(), buffer, buffer + i + 3);
+    Verify(true, sigs.v_i(), buffer, buffer + i + 3, kAppendEnd);
   }
 }
 
@@ -643,7 +655,8 @@
   byte code[] = {WASM_BLOCK(kExprNop, kExprNop, kExprNop, kExprNop)};
   EXPECT_VERIFIES_C(v_v, code);
   for (size_t i = 1; i < arraysize(code); i++) {
-    Verify(false, sigs.v_v(), code, code + i);
+    Verify(false, sigs.v_v(), code, code + i, kAppendEnd);
+    Verify(false, sigs.v_v(), code, code + i, kOmitEnd);
   }
 }
 
@@ -973,7 +986,8 @@
   static const byte kCode[] = {
       WASM_IF_ELSE(WASM_GET_LOCAL(0), WASM_GET_LOCAL(0), WASM_GET_LOCAL(0))};
   for (size_t len = 3; len < arraysize(kCode); len++) {
-    Verify(false, sigs.i_i(), kCode, kCode + len);
+    Verify(false, sigs.i_i(), kCode, kCode + len, kAppendEnd);
+    Verify(false, sigs.i_i(), kCode, kCode + len, kOmitEnd);
   }
 }
 
@@ -1566,6 +1580,40 @@
                                             WASM_I32V_2(72)));
 }
 
+TEST_F(FunctionBodyDecoderTest, IncompleteIndirectCall) {
+  FunctionSig* sig = sigs.i_i();
+  TestModuleBuilder builder;
+  builder.InitializeFunctionTable();
+  module = builder.module();
+
+  static byte code[] = {kExprCallIndirect};
+  Verify(false, sig, code, code + arraysize(code), kOmitEnd);
+}
+
+TEST_F(FunctionBodyDecoderTest, IncompleteStore) {
+  FunctionSig* sig = sigs.i_i();
+  TestModuleBuilder builder;
+  builder.InitializeMemory();
+  builder.InitializeFunctionTable();
+  module = builder.module();
+
+  static byte code[] = {kExprI32StoreMem};
+  Verify(false, sig, code, code + arraysize(code), kOmitEnd);
+}
+
+TEST_F(FunctionBodyDecoderTest, IncompleteS8x16Shuffle) {
+  EXPERIMENTAL_FLAG_SCOPE(simd);
+  FunctionSig* sig = sigs.i_i();
+  TestModuleBuilder builder;
+  builder.InitializeMemory();
+  builder.InitializeFunctionTable();
+  module = builder.module();
+
+  static byte code[] = {kSimdPrefix,
+                        static_cast<byte>(kExprS8x16Shuffle & 0xff)};
+  Verify(false, sig, code, code + arraysize(code), kOmitEnd);
+}
+
 TEST_F(FunctionBodyDecoderTest, SimpleImportCalls) {
   FunctionSig* sig = sigs.i_i();
   TestModuleBuilder builder;
@@ -2139,7 +2187,8 @@
 TEST_F(FunctionBodyDecoderTest, BrTable_off_end) {
   static byte code[] = {B1(WASM_BR_TABLE(WASM_GET_LOCAL(0), 0, BR_TARGET(0)))};
   for (size_t len = 1; len < sizeof(code); len++) {
-    Verify(false, sigs.i_i(), code, code + len);
+    Verify(false, sigs.i_i(), code, code + len, kAppendEnd);
+    Verify(false, sigs.i_i(), code, code + len, kOmitEnd);
   }
 }
 
@@ -2387,45 +2436,227 @@
 
 TEST_F(FunctionBodyDecoderTest, MultiValBlock1) {
   EXPERIMENTAL_FLAG_SCOPE(mv);
-  EXPECT_VERIFIES(i_ii, WASM_BLOCK_TT(kWasmI32, kWasmI32, WASM_GET_LOCAL(0),
-                                      WASM_GET_LOCAL(1)),
+  TestModuleBuilder builder;
+  module = builder.module();
+  byte f0 = builder.AddSignature(sigs.ii_v());
+  EXPECT_VERIFIES(i_ii, WASM_BLOCK_X(f0, WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)),
                   kExprI32Add);
+  EXPECT_FAILURE(i_ii, WASM_BLOCK_X(f0, WASM_NOP), kExprI32Add);
+  EXPECT_FAILURE(i_ii, WASM_BLOCK_X(f0, WASM_GET_LOCAL(0)), kExprI32Add);
+  EXPECT_FAILURE(i_ii, WASM_BLOCK_X(f0, WASM_GET_LOCAL(0), WASM_GET_LOCAL(1),
+                                    WASM_GET_LOCAL(0)),
+                 kExprI32Add);
+  EXPECT_FAILURE(i_ii, WASM_BLOCK_X(f0, WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)),
+                 kExprF32Add);
 }
 
 TEST_F(FunctionBodyDecoderTest, MultiValBlock2) {
   EXPERIMENTAL_FLAG_SCOPE(mv);
-  EXPECT_VERIFIES(i_ii, WASM_BLOCK_TT(kWasmI32, kWasmI32, WASM_GET_LOCAL(0),
-                                      WASM_GET_LOCAL(1)),
+  TestModuleBuilder builder;
+  module = builder.module();
+  byte f0 = builder.AddSignature(sigs.ii_v());
+  EXPECT_VERIFIES(i_ii, WASM_BLOCK_X(f0, WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)),
                   WASM_I32_ADD(WASM_NOP, WASM_NOP));
+  EXPECT_FAILURE(i_ii, WASM_BLOCK_X(f0, WASM_NOP),
+                 WASM_I32_ADD(WASM_NOP, WASM_NOP));
+  EXPECT_FAILURE(i_ii, WASM_BLOCK_X(f0, WASM_GET_LOCAL(0)),
+                 WASM_I32_ADD(WASM_NOP, WASM_NOP));
+  EXPECT_FAILURE(i_ii, WASM_BLOCK_X(f0, WASM_GET_LOCAL(0), WASM_GET_LOCAL(1),
+                                    WASM_GET_LOCAL(0)),
+                 WASM_I32_ADD(WASM_NOP, WASM_NOP));
+  EXPECT_FAILURE(i_ii, WASM_BLOCK_X(f0, WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)),
+                 WASM_F32_ADD(WASM_NOP, WASM_NOP));
 }
 
-TEST_F(FunctionBodyDecoderTest, MultiValBlockBr1) {
+TEST_F(FunctionBodyDecoderTest, MultiValBlockBr) {
   EXPERIMENTAL_FLAG_SCOPE(mv);
-  EXPECT_FAILURE(
-      i_ii, WASM_BLOCK_TT(kWasmI32, kWasmI32, WASM_GET_LOCAL(0), WASM_BR(0)),
-      kExprI32Add);
-  EXPECT_VERIFIES(i_ii, WASM_BLOCK_TT(kWasmI32, kWasmI32, WASM_GET_LOCAL(0),
-                                      WASM_GET_LOCAL(1), WASM_BR(0)),
+  TestModuleBuilder builder;
+  module = builder.module();
+  byte f0 = builder.AddSignature(sigs.ii_v());
+  EXPECT_FAILURE(i_ii, WASM_BLOCK_X(f0, WASM_GET_LOCAL(0), WASM_BR(0)),
+                 kExprI32Add);
+  EXPECT_VERIFIES(i_ii, WASM_BLOCK_X(f0, WASM_GET_LOCAL(0),
+                                     WASM_GET_LOCAL(1), WASM_BR(0)),
                   kExprI32Add);
 }
 
-TEST_F(FunctionBodyDecoderTest, MultiValIf1) {
+TEST_F(FunctionBodyDecoderTest, MultiValLoop1) {
   EXPERIMENTAL_FLAG_SCOPE(mv);
-  EXPECT_FAILURE(
-      i_ii, WASM_IF_ELSE_TT(kWasmI32, kWasmI32, WASM_GET_LOCAL(0),
-                            WASM_SEQ(WASM_GET_LOCAL(0)),
-                            WASM_SEQ(WASM_GET_LOCAL(1), WASM_GET_LOCAL(0))),
-      kExprI32Add);
-  EXPECT_FAILURE(i_ii,
-                 WASM_IF_ELSE_TT(kWasmI32, kWasmI32, WASM_GET_LOCAL(0),
-                                 WASM_SEQ(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)),
-                                 WASM_SEQ(WASM_GET_LOCAL(1))),
+  TestModuleBuilder builder;
+  module = builder.module();
+  byte f0 = builder.AddSignature(sigs.ii_v());
+  EXPECT_VERIFIES(i_ii, WASM_LOOP_X(f0, WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)),
+                  kExprI32Add);
+  EXPECT_FAILURE(i_ii, WASM_LOOP_X(f0, WASM_NOP), kExprI32Add);
+  EXPECT_FAILURE(i_ii, WASM_LOOP_X(f0, WASM_GET_LOCAL(0)), kExprI32Add);
+  EXPECT_FAILURE(i_ii, WASM_LOOP_X(f0, WASM_GET_LOCAL(0), WASM_GET_LOCAL(1),
+                                   WASM_GET_LOCAL(0)),
                  kExprI32Add);
+  EXPECT_FAILURE(i_ii, WASM_LOOP_X(f0, WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)),
+                 kExprF32Add);
+}
+
+TEST_F(FunctionBodyDecoderTest, MultiValIf) {
+  EXPERIMENTAL_FLAG_SCOPE(mv);
+  TestModuleBuilder builder;
+  module = builder.module();
+  byte f0 = builder.AddSignature(sigs.ii_v());
   EXPECT_VERIFIES(
-      i_ii, WASM_IF_ELSE_TT(kWasmI32, kWasmI32, WASM_GET_LOCAL(0),
-                            WASM_SEQ(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)),
-                            WASM_SEQ(WASM_GET_LOCAL(1), WASM_GET_LOCAL(0))),
+      i_ii, WASM_IF_ELSE_X(f0, WASM_GET_LOCAL(0),
+                           WASM_SEQ(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)),
+                           WASM_SEQ(WASM_GET_LOCAL(1), WASM_GET_LOCAL(0))),
       kExprI32Add);
+  EXPECT_FAILURE(
+      i_ii, WASM_IF_ELSE_X(f0, WASM_GET_LOCAL(0), WASM_NOP, WASM_NOP),
+      kExprI32Add);
+  EXPECT_FAILURE(
+      i_ii, WASM_IF_ELSE_X(f0, WASM_GET_LOCAL(0),
+                           WASM_NOP,
+                           WASM_SEQ(WASM_GET_LOCAL(1), WASM_GET_LOCAL(0))),
+      kExprI32Add);
+  EXPECT_FAILURE(
+      i_ii, WASM_IF_ELSE_X(f0, WASM_GET_LOCAL(0),
+                           WASM_SEQ(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)),
+                           WASM_NOP),
+      kExprI32Add);
+  EXPECT_FAILURE(
+      i_ii, WASM_IF_ELSE_X(f0, WASM_GET_LOCAL(0),
+                           WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)),
+      kExprI32Add);
+  EXPECT_FAILURE(
+      i_ii, WASM_IF_ELSE_X(f0, WASM_GET_LOCAL(0),
+                           WASM_GET_LOCAL(0),
+                           WASM_SEQ(WASM_GET_LOCAL(1), WASM_GET_LOCAL(0))),
+      kExprI32Add);
+  EXPECT_FAILURE(
+      i_ii, WASM_IF_ELSE_X(f0, WASM_GET_LOCAL(0),
+                           WASM_SEQ(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)),
+                           WASM_GET_LOCAL(1)),
+      kExprI32Add);
+  EXPECT_FAILURE(
+      i_ii, WASM_IF_ELSE_X(f0, WASM_GET_LOCAL(0),
+                           WASM_SEQ(WASM_GET_LOCAL(0), WASM_GET_LOCAL(0),
+                                    WASM_GET_LOCAL(0)),
+                           WASM_SEQ(WASM_GET_LOCAL(1), WASM_GET_LOCAL(0),
+                                    WASM_GET_LOCAL(0))),
+      kExprI32Add);
+  EXPECT_FAILURE(
+      i_ii, WASM_IF_ELSE_X(f0, WASM_GET_LOCAL(0),
+                           WASM_SEQ(WASM_GET_LOCAL(0), WASM_GET_LOCAL(0),
+                                    WASM_GET_LOCAL(0)),
+                           WASM_SEQ(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1))),
+      kExprI32Add);
+  EXPECT_FAILURE(
+      i_ii, WASM_IF_ELSE_X(f0, WASM_GET_LOCAL(0),
+                           WASM_SEQ(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)),
+                           WASM_SEQ(WASM_GET_LOCAL(1), WASM_GET_LOCAL(1),
+                                    WASM_GET_LOCAL(1))),
+      kExprI32Add);
+  EXPECT_FAILURE(
+      i_ii, WASM_IF_ELSE_X(f0, WASM_GET_LOCAL(0),
+                           WASM_SEQ(WASM_GET_LOCAL(0), WASM_GET_LOCAL(1)),
+                           WASM_SEQ(WASM_GET_LOCAL(1), WASM_GET_LOCAL(0))),
+      kExprF32Add);
+}
+
+TEST_F(FunctionBodyDecoderTest, BlockParam) {
+  EXPERIMENTAL_FLAG_SCOPE(mv);
+  TestModuleBuilder builder;
+  module = builder.module();
+  byte f1 = builder.AddSignature(sigs.i_i());
+  byte f2 = builder.AddSignature(sigs.i_ii());
+  EXPECT_VERIFIES(i_ii, WASM_GET_LOCAL(0),
+                  WASM_BLOCK_X(f1, WASM_GET_LOCAL(1),
+                               WASM_I32_ADD(WASM_NOP, WASM_NOP)));
+  EXPECT_VERIFIES(i_ii, WASM_GET_LOCAL(0), WASM_GET_LOCAL(1),
+                  WASM_BLOCK_X(f2, WASM_I32_ADD(WASM_NOP, WASM_NOP)));
+  EXPECT_VERIFIES(i_ii, WASM_GET_LOCAL(0), WASM_GET_LOCAL(1),
+                  WASM_BLOCK_X(f1, WASM_NOP),
+                  WASM_I32_ADD(WASM_NOP, WASM_NOP));
+  EXPECT_FAILURE(i_ii, WASM_BLOCK_X(f1, WASM_NOP),
+                 WASM_RETURN1(WASM_GET_LOCAL(0)));
+  EXPECT_FAILURE(i_ii, WASM_BLOCK_X(f1, WASM_GET_LOCAL(0)),
+                 WASM_RETURN1(WASM_GET_LOCAL(0)));
+  EXPECT_FAILURE(i_ii, WASM_GET_LOCAL(0),
+                 WASM_BLOCK_X(f2, WASM_I32_ADD(WASM_NOP, WASM_NOP)),
+                 WASM_RETURN1(WASM_GET_LOCAL(0)));
+  EXPECT_FAILURE(i_ii, WASM_GET_LOCAL(0),
+                 WASM_BLOCK_X(f1, WASM_F32_NEG(WASM_NOP)),
+                 WASM_RETURN1(WASM_GET_LOCAL(0)));
+}
+
+TEST_F(FunctionBodyDecoderTest, LoopParam) {
+  EXPERIMENTAL_FLAG_SCOPE(mv);
+  TestModuleBuilder builder;
+  module = builder.module();
+  byte f1 = builder.AddSignature(sigs.i_i());
+  byte f2 = builder.AddSignature(sigs.i_ii());
+  EXPECT_VERIFIES(i_ii, WASM_GET_LOCAL(0),
+                  WASM_LOOP_X(f1, WASM_GET_LOCAL(1),
+                              WASM_I32_ADD(WASM_NOP, WASM_NOP)));
+  EXPECT_VERIFIES(i_ii, WASM_GET_LOCAL(0), WASM_GET_LOCAL(1),
+                  WASM_LOOP_X(f2, WASM_I32_ADD(WASM_NOP, WASM_NOP)));
+  EXPECT_VERIFIES(i_ii, WASM_GET_LOCAL(0), WASM_GET_LOCAL(1),
+                  WASM_LOOP_X(f1, WASM_NOP),
+                  WASM_I32_ADD(WASM_NOP, WASM_NOP));
+  EXPECT_FAILURE(i_ii, WASM_LOOP_X(f1, WASM_NOP),
+                 WASM_RETURN1(WASM_GET_LOCAL(0)));
+  EXPECT_FAILURE(i_ii, WASM_LOOP_X(f1, WASM_GET_LOCAL(0)),
+                 WASM_RETURN1(WASM_GET_LOCAL(0)));
+  EXPECT_FAILURE(i_ii, WASM_GET_LOCAL(0),
+                 WASM_LOOP_X(f2, WASM_I32_ADD(WASM_NOP, WASM_NOP)),
+                 WASM_RETURN1(WASM_GET_LOCAL(0)));
+  EXPECT_FAILURE(i_ii, WASM_GET_LOCAL(0),
+                 WASM_LOOP_X(f1, WASM_F32_NEG(WASM_NOP)),
+                 WASM_RETURN1(WASM_GET_LOCAL(0)));
+}
+
+TEST_F(FunctionBodyDecoderTest, LoopParamBr) {
+  EXPERIMENTAL_FLAG_SCOPE(mv);
+  TestModuleBuilder builder;
+  module = builder.module();
+  byte f1 = builder.AddSignature(sigs.i_i());
+  byte f2 = builder.AddSignature(sigs.i_ii());
+  EXPECT_VERIFIES(i_ii, WASM_GET_LOCAL(0),
+                  WASM_LOOP_X(f1, WASM_BR(0)));
+  EXPECT_VERIFIES(i_ii, WASM_GET_LOCAL(0),
+                  WASM_LOOP_X(f1, WASM_BRV(0, WASM_GET_LOCAL(1))));
+  EXPECT_VERIFIES(i_ii, WASM_GET_LOCAL(0), WASM_GET_LOCAL(1),
+                  WASM_LOOP_X(f2, WASM_BR(0)));
+  EXPECT_VERIFIES(i_ii, WASM_GET_LOCAL(0),
+                  WASM_LOOP_X(f1, WASM_BLOCK_X(f1, WASM_BR(1))));
+  EXPECT_FAILURE(i_ii, WASM_GET_LOCAL(0),
+                 WASM_LOOP_X(f1, WASM_BLOCK(WASM_BR(1))),
+                 WASM_RETURN1(WASM_GET_LOCAL(0)));
+  EXPECT_FAILURE(i_ii, WASM_GET_LOCAL(0), WASM_GET_LOCAL(1),
+                 WASM_LOOP_X(f2, WASM_BLOCK_X(f1, WASM_BR(1))),
+                 WASM_RETURN1(WASM_GET_LOCAL(0)));
+}
+
+TEST_F(FunctionBodyDecoderTest, IfParam) {
+  EXPERIMENTAL_FLAG_SCOPE(mv);
+  TestModuleBuilder builder;
+  module = builder.module();
+  byte f1 = builder.AddSignature(sigs.i_i());
+  byte f2 = builder.AddSignature(sigs.i_ii());
+  EXPECT_VERIFIES(i_ii, WASM_GET_LOCAL(0),
+                  WASM_IF_X(f1, WASM_GET_LOCAL(0),
+                            WASM_I32_ADD(WASM_NOP, WASM_GET_LOCAL(1))));
+  EXPECT_VERIFIES(i_ii, WASM_GET_LOCAL(0),
+                  WASM_IF_ELSE_X(f1, WASM_GET_LOCAL(0),
+                                 WASM_I32_ADD(WASM_NOP, WASM_GET_LOCAL(1)),
+                                 WASM_I32_EQZ(WASM_NOP)));
+  EXPECT_VERIFIES(i_ii, WASM_GET_LOCAL(0), WASM_GET_LOCAL(1),
+                  WASM_IF_ELSE_X(f2, WASM_GET_LOCAL(0),
+                                 WASM_I32_ADD(WASM_NOP, WASM_NOP),
+                                 WASM_I32_MUL(WASM_NOP, WASM_NOP)));
+  EXPECT_VERIFIES(i_ii, WASM_GET_LOCAL(0), WASM_GET_LOCAL(1),
+                  WASM_IF_X(f1, WASM_GET_LOCAL(0), WASM_NOP),
+                  WASM_I32_ADD(WASM_NOP, WASM_NOP));
+  EXPECT_VERIFIES(i_ii, WASM_GET_LOCAL(0), WASM_GET_LOCAL(1),
+                  WASM_IF_ELSE_X(f1, WASM_GET_LOCAL(0),
+                                 WASM_NOP, WASM_I32_EQZ(WASM_NOP)),
+                  WASM_I32_ADD(WASM_NOP, WASM_NOP));
 }
 
 TEST_F(FunctionBodyDecoderTest, Regression709741) {
@@ -2434,7 +2665,7 @@
   byte code[] = {WASM_NOP};
   const byte* start = code;
   const byte* end = code + sizeof(code);
-  PrepareBytecode(&start, &end);
+  PrepareBytecode(&start, &end, kAppendEnd);
 
   for (const byte* i = start; i < end; i++) {
     DecodeResult result =
@@ -2451,15 +2682,15 @@
   BranchTableIteratorTest() : TestWithZone() {}
   void CheckBrTableSize(const byte* start, const byte* end) {
     Decoder decoder(start, end);
-    BranchTableOperand<true> operand(&decoder, start);
-    BranchTableIterator<true> iterator(&decoder, operand);
+    BranchTableOperand<Decoder::kValidate> operand(&decoder, start);
+    BranchTableIterator<Decoder::kValidate> iterator(&decoder, operand);
     EXPECT_EQ(end - start - 1u, iterator.length());
     EXPECT_TRUE(decoder.ok());
   }
   void CheckBrTableError(const byte* start, const byte* end) {
     Decoder decoder(start, end);
-    BranchTableOperand<true> operand(&decoder, start);
-    BranchTableIterator<true> iterator(&decoder, operand);
+    BranchTableOperand<Decoder::kValidate> operand(&decoder, start);
+    BranchTableIterator<Decoder::kValidate> iterator(&decoder, operand);
     iterator.length();
     EXPECT_FALSE(decoder.ok());
   }
@@ -2737,16 +2968,16 @@
 
 TEST_F(WasmOpcodeLengthTest, SimdExpressions) {
 #define TEST_SIMD(name, opcode, sig) \
-  EXPECT_LENGTH_N(2, kSimdPrefix, static_cast<byte>(kExpr##name & 0xff));
+  EXPECT_LENGTH_N(2, kSimdPrefix, static_cast<byte>(kExpr##name & 0xFF));
   FOREACH_SIMD_0_OPERAND_OPCODE(TEST_SIMD)
 #undef TEST_SIMD
 #define TEST_SIMD(name, opcode, sig) \
-  EXPECT_LENGTH_N(3, kSimdPrefix, static_cast<byte>(kExpr##name & 0xff));
+  EXPECT_LENGTH_N(3, kSimdPrefix, static_cast<byte>(kExpr##name & 0xFF));
   FOREACH_SIMD_1_OPERAND_OPCODE(TEST_SIMD)
 #undef TEST_SIMD
-  EXPECT_LENGTH_N(18, kSimdPrefix, static_cast<byte>(kExprS8x16Shuffle & 0xff));
+  EXPECT_LENGTH_N(18, kSimdPrefix, static_cast<byte>(kExprS8x16Shuffle & 0xFF));
   // test for bad simd opcode
-  EXPECT_LENGTH_N(2, kSimdPrefix, 0xff);
+  EXPECT_LENGTH_N(2, kSimdPrefix, 0xFF);
 }
 
 #undef EXPECT_LENGTH
diff --git a/src/v8/test/unittests/wasm/leb-helper-unittest.cc b/src/v8/test/unittests/wasm/leb-helper-unittest.cc
index 474d49c..704703a 100644
--- a/src/v8/test/unittests/wasm/leb-helper-unittest.cc
+++ b/src/v8/test/unittests/wasm/leb-helper-unittest.cc
@@ -88,19 +88,19 @@
   }
 }
 
-#define DECLARE_ENCODE_DECODE_CHECKER(ctype, name)                         \
-  static void CheckEncodeDecode_##name(ctype val) {                        \
-    static const int kSize = 16;                                           \
-    static byte buffer[kSize];                                             \
-    byte* ptr = buffer;                                                    \
-    LEBHelper::write_##name(&ptr, val);                                    \
-    EXPECT_EQ(LEBHelper::sizeof_##name(val),                               \
-              static_cast<size_t>(ptr - buffer));                          \
-    Decoder decoder(buffer, buffer + kSize);                               \
-    unsigned length = 0;                                                   \
-    ctype result = decoder.read_##name<false>(buffer, &length);            \
-    EXPECT_EQ(val, result);                                                \
-    EXPECT_EQ(LEBHelper::sizeof_##name(val), static_cast<size_t>(length)); \
+#define DECLARE_ENCODE_DECODE_CHECKER(ctype, name)                             \
+  static void CheckEncodeDecode_##name(ctype val) {                            \
+    static const int kSize = 16;                                               \
+    static byte buffer[kSize];                                                 \
+    byte* ptr = buffer;                                                        \
+    LEBHelper::write_##name(&ptr, val);                                        \
+    EXPECT_EQ(LEBHelper::sizeof_##name(val),                                   \
+              static_cast<size_t>(ptr - buffer));                              \
+    Decoder decoder(buffer, buffer + kSize);                                   \
+    unsigned length = 0;                                                       \
+    ctype result = decoder.read_##name<Decoder::kNoValidate>(buffer, &length); \
+    EXPECT_EQ(val, result);                                                    \
+    EXPECT_EQ(LEBHelper::sizeof_##name(val), static_cast<size_t>(length));     \
   }
 
 DECLARE_ENCODE_DECODE_CHECKER(int32_t, i32v)
@@ -119,7 +119,7 @@
   CheckEncodeDecode_u32v(87348723);
   CheckEncodeDecode_u32v(77777);
 
-  for (uint32_t val = 0x3a; val != 0; val = val << 1) {
+  for (uint32_t val = 0x3A; val != 0; val = val << 1) {
     CheckEncodeDecode_u32v(val);
   }
 }
@@ -141,7 +141,7 @@
   CheckEncodeDecode_i32v(-87328723);
   CheckEncodeDecode_i32v(-77377);
 
-  for (uint32_t val = 0x3a; val != 0; val = val << 1) {
+  for (uint32_t val = 0x3A; val != 0; val = val << 1) {
     CheckEncodeDecode_i32v(bit_cast<int32_t>(val));
   }
 
@@ -159,7 +159,7 @@
   CheckEncodeDecode_u64v(87348723);
   CheckEncodeDecode_u64v(77777);
 
-  for (uint64_t val = 0x3a; val != 0; val = val << 1) {
+  for (uint64_t val = 0x3A; val != 0; val = val << 1) {
     CheckEncodeDecode_u64v(val);
   }
 }
@@ -180,7 +180,7 @@
   CheckEncodeDecode_i64v(-87648723);
   CheckEncodeDecode_i64v(-77377);
 
-  for (uint64_t val = 0x3a; val != 0; val = val << 1) {
+  for (uint64_t val = 0x3A; val != 0; val = val << 1) {
     CheckEncodeDecode_i64v(bit_cast<int64_t>(val));
   }
 
diff --git a/src/v8/test/unittests/wasm/loop-assignment-analysis-unittest.cc b/src/v8/test/unittests/wasm/loop-assignment-analysis-unittest.cc
index d089d94..20f3d2b 100644
--- a/src/v8/test/unittests/wasm/loop-assignment-analysis-unittest.cc
+++ b/src/v8/test/unittests/wasm/loop-assignment-analysis-unittest.cc
@@ -176,7 +176,7 @@
 }
 
 TEST_F(WasmLoopAssignmentAnalyzerTest, Malformed) {
-  byte code[] = {kExprLoop, kLocalVoid, kExprF32Neg, kExprBrTable, 0x0e, 'h',
+  byte code[] = {kExprLoop, kLocalVoid, kExprF32Neg, kExprBrTable, 0x0E, 'h',
                  'e',       'l',        'l',         'o',          ',',  ' ',
                  'w',       'o',        'r',         'l',          'd',  '!'};
   BitVector* assigned = Analyze(code, code + arraysize(code));
@@ -185,8 +185,8 @@
 
 TEST_F(WasmLoopAssignmentAnalyzerTest, regress_642867) {
   static const byte code[] = {
-      WASM_LOOP(WASM_ZERO, kExprSetLocal, 0xfa, 0xff, 0xff, 0xff,
-                0x0f)};  // local index LEB128 0xfffffffa
+      WASM_LOOP(WASM_ZERO, kExprSetLocal, 0xFA, 0xFF, 0xFF, 0xFF,
+                0x0F)};  // local index LEB128 0xFFFFFFFA
   // Just make sure that the analysis does not crash.
   Analyze(code, code + arraysize(code));
 }
diff --git a/src/v8/test/unittests/wasm/module-decoder-unittest.cc b/src/v8/test/unittests/wasm/module-decoder-unittest.cc
index 2e76d37..a472623 100644
--- a/src/v8/test/unittests/wasm/module-decoder-unittest.cc
+++ b/src/v8/test/unittests/wasm/module-decoder-unittest.cc
@@ -290,7 +290,7 @@
 static void AppendUint32v(std::vector<byte>& buffer, uint32_t val) {
   while (true) {
     uint32_t next = val >> 7;
-    uint32_t out = val & 0x7f;
+    uint32_t out = val & 0x7F;
     if (next) {
       buffer.push_back(static_cast<byte>(0x80 | out));
       val = next;
@@ -494,7 +494,7 @@
       0,                    // mutability
       SECTION(Memory, 4),
       ENTRY_COUNT(1),
-      kResizableMaximumFlag,
+      kHasMaximumFlag,
       28,
       28,
       SECTION(Data, 9),
@@ -527,7 +527,7 @@
       1,                   // mutability
       SECTION(Memory, 4),
       ENTRY_COUNT(1),
-      kResizableMaximumFlag,
+      kHasMaximumFlag,
       28,
       28,
       SECTION(Data, 9),
@@ -546,14 +546,14 @@
   const byte data[] = {
       SECTION(Memory, 4),
       ENTRY_COUNT(1),
-      kResizableMaximumFlag,
+      kHasMaximumFlag,
       28,
       28,
       SECTION(Global, 8),  // --
       1,
       kLocalI32,                       // local type
       0,                               // immutable
-      WASM_INIT_EXPR_I32V_3(0x9bbaa),  // init
+      WASM_INIT_EXPR_I32V_3(0x9BBAA),  // init
       SECTION(Data, 9),
       ENTRY_COUNT(1),
       LINEAR_MEMORY_INDEX_0,
@@ -571,13 +571,13 @@
   const byte data[] = {
       SECTION(Memory, 4),
       ENTRY_COUNT(1),
-      kResizableMaximumFlag,
+      kHasMaximumFlag,
       28,
       28,
       SECTION(Data, 11),
       ENTRY_COUNT(1),
       LINEAR_MEMORY_INDEX_0,
-      WASM_INIT_EXPR_I32V_3(0x9bbaa),  // dest addr
+      WASM_INIT_EXPR_I32V_3(0x9BBAA),  // dest addr
       U32V_1(3),                       // source size
       'a',
       'b',
@@ -595,7 +595,7 @@
     const WasmDataSegment* segment = &result.val->data_segments.back();
 
     EXPECT_EQ(WasmInitExpr::kI32Const, segment->dest_addr.kind);
-    EXPECT_EQ(0x9bbaa, segment->dest_addr.val.i32_const);
+    EXPECT_EQ(0x9BBAA, segment->dest_addr.val.i32_const);
     EXPECT_EQ(kDataSegmentSourceOffset, segment->source.offset());
     EXPECT_EQ(3u, segment->source.length());
   }
@@ -610,20 +610,20 @@
   const byte data[] = {
       SECTION(Memory, 4),
       ENTRY_COUNT(1),
-      kResizableMaximumFlag,
+      kHasMaximumFlag,
       28,
       28,
       SECTION(Data, 29),
       ENTRY_COUNT(2),  // segment count
       LINEAR_MEMORY_INDEX_0,
-      WASM_INIT_EXPR_I32V_3(0x7ffee),  // #0: dest addr
+      WASM_INIT_EXPR_I32V_3(0x7FFEE),  // #0: dest addr
       U32V_1(4),                       // source size
       1,
       2,
       3,
       4,  // data bytes
       LINEAR_MEMORY_INDEX_0,
-      WASM_INIT_EXPR_I32V_3(0x6ddcc),  // #1: dest addr
+      WASM_INIT_EXPR_I32V_3(0x6DDCC),  // #1: dest addr
       U32V_1(10),                      // source size
       1,
       2,
@@ -648,12 +648,12 @@
     const WasmDataSegment* s1 = &result.val->data_segments[1];
 
     EXPECT_EQ(WasmInitExpr::kI32Const, s0->dest_addr.kind);
-    EXPECT_EQ(0x7ffee, s0->dest_addr.val.i32_const);
+    EXPECT_EQ(0x7FFEE, s0->dest_addr.val.i32_const);
     EXPECT_EQ(kDataSegment0SourceOffset, s0->source.offset());
     EXPECT_EQ(4u, s0->source.length());
 
     EXPECT_EQ(WasmInitExpr::kI32Const, s1->dest_addr.kind);
-    EXPECT_EQ(0x6ddcc, s1->dest_addr.val.i32_const);
+    EXPECT_EQ(0x6DDCC, s1->dest_addr.val.i32_const);
     EXPECT_EQ(kDataSegment1SourceOffset, s1->source.offset());
     EXPECT_EQ(10u, s1->source.length());
   }
@@ -666,7 +666,7 @@
       SECTION(Data, 11),
       ENTRY_COUNT(1),
       LINEAR_MEMORY_INDEX_0,
-      WASM_INIT_EXPR_I32V_3(0x9bbaa),  // dest addr
+      WASM_INIT_EXPR_I32V_3(0x9BBAA),  // dest addr
       U32V_1(3),                       // source size
       'a',
       'b',
@@ -678,15 +678,13 @@
 TEST_F(WasmModuleVerifyTest, MaxMaximumMemorySize) {
   {
     const byte data[] = {
-        SECTION(Memory, 6), ENTRY_COUNT(1), kResizableMaximumFlag, 0,
-        U32V_3(65536),
+        SECTION(Memory, 6), ENTRY_COUNT(1), kHasMaximumFlag, 0, U32V_3(65536),
     };
     EXPECT_VERIFIES(data);
   }
   {
     const byte data[] = {
-        SECTION(Memory, 6), ENTRY_COUNT(1), kResizableMaximumFlag, 0,
-        U32V_3(65537),
+        SECTION(Memory, 6), ENTRY_COUNT(1), kHasMaximumFlag, 0, U32V_3(65537),
     };
     EXPECT_FAILURE(data);
   }
@@ -696,7 +694,7 @@
   const byte data[] = {
       SECTION(Memory, 4),
       ENTRY_COUNT(1),
-      kResizableMaximumFlag,
+      kHasMaximumFlag,
       28,
       28,
       SECTION(Data, 11),
@@ -715,12 +713,12 @@
 TEST_F(WasmModuleVerifyTest, DataSegmentEndOverflow) {
   const byte data[] = {
       SECTION(Memory, 4),  // memory section
-      ENTRY_COUNT(1),           kResizableMaximumFlag, 28, 28,
+      ENTRY_COUNT(1),           kHasMaximumFlag, 28, 28,
       SECTION(Data, 10),         // data section
       ENTRY_COUNT(1),            // one entry
       LINEAR_MEMORY_INDEX_0,     // mem index
       WASM_INIT_EXPR_I32V_1(0),  // offset
-      U32V_5(0xffffffff)         // size
+      U32V_5(0xFFFFFFFF)         // size
   };
 
   EXPECT_FAILURE(data);
@@ -733,7 +731,7 @@
       // funcs ---------------------------------------------------------------
       ONE_EMPTY_FUNCTION,
       // table declaration ---------------------------------------------------
-      SECTION(Table, 4), ENTRY_COUNT(1), kWasmAnyFunctionTypeForm, 0, 1};
+      SECTION(Table, 4), ENTRY_COUNT(1), kWasmAnyFunctionTypeCode, 0, 1};
 
   ModuleResult result = DecodeModule(data, data + sizeof(data));
   EXPECT_OK(result);
@@ -748,7 +746,7 @@
 TEST_F(WasmModuleVerifyTest, ElementSectionWithInternalTable) {
   static const byte data[] = {
       // table ---------------------------------------------------------------
-      SECTION(Table, 4), ENTRY_COUNT(1), kWasmAnyFunctionTypeForm, 0, 1,
+      SECTION(Table, 4), ENTRY_COUNT(1), kWasmAnyFunctionTypeCode, 0, 1,
       // elements ------------------------------------------------------------
       SECTION(Element, 1),
       0  // entry count
@@ -766,7 +764,7 @@
       NAME_LENGTH(1),            // --
       't',                       // table name
       kExternalTable,            // import kind
-      kWasmAnyFunctionTypeForm,  // elem_type
+      kWasmAnyFunctionTypeCode,  // elem_type
       0,                         // no maximum field
       1,                         // initial size
       // elements ------------------------------------------------------------
@@ -799,13 +797,13 @@
       // funcs ---------------------------------------------------------------
       ONE_EMPTY_FUNCTION,
       // table declaration ---------------------------------------------------
-      SECTION(Table, 4), ENTRY_COUNT(1), kWasmAnyFunctionTypeForm, 0, 1,
+      SECTION(Table, 4), ENTRY_COUNT(1), kWasmAnyFunctionTypeCode, 0, 1,
       // elements ------------------------------------------------------------
       SECTION(Element, 7),
       1,  // entry count
       TABLE_INDEX(0), WASM_INIT_EXPR_I32V_1(0),
       1,    // elements count
-      0x9a  // invalid I32V as function index
+      0x9A  // invalid I32V as function index
   };
 
   EXPECT_FAILURE(data);
@@ -818,7 +816,7 @@
       // funcs ---------------------------------------------------------------
       ONE_EMPTY_FUNCTION,
       // table declaration ---------------------------------------------------
-      SECTION(Table, 4), ENTRY_COUNT(1), kWasmAnyFunctionTypeForm, 0, 1,
+      SECTION(Table, 4), ENTRY_COUNT(1), kWasmAnyFunctionTypeCode, 0, 1,
       // elements ------------------------------------------------------------
       SECTION(Element, 7),
       1,  // entry count
@@ -846,7 +844,7 @@
       // funcs ------------------------------------------------------
       FOUR_EMPTY_FUNCTIONS,
       // table declaration -------------------------------------------
-      SECTION(Table, 4), ENTRY_COUNT(1), kWasmAnyFunctionTypeForm, 0, 8,
+      SECTION(Table, 4), ENTRY_COUNT(1), kWasmAnyFunctionTypeCode, 0, 8,
       // table elements ----------------------------------------------
       SECTION(Element, 14),
       1,  // entry count
@@ -976,7 +974,7 @@
 }
 
 TEST_F(WasmSignatureDecodeTest, TooManyParams) {
-  static const byte data[] = {kWasmFunctionTypeForm,
+  static const byte data[] = {kWasmFunctionTypeCode,
                               WASM_I32V_3(kV8MaxWasmFunctionParams + 1),
                               kLocalI32, 0};
   FunctionSig* sig =
@@ -990,7 +988,7 @@
     const int max_return_count = static_cast<int>(
         FLAG_experimental_wasm_mv ? kV8MaxWasmFunctionMultiReturns
                                   : kV8MaxWasmFunctionReturns);
-    byte data[] = {kWasmFunctionTypeForm, 0, WASM_I32V_3(max_return_count + 1),
+    byte data[] = {kWasmFunctionTypeCode, 0, WASM_I32V_3(max_return_count + 1),
                    kLocalI32};
     FunctionSig* sig =
         DecodeWasmSignatureForTesting(zone(), data, data + sizeof(data));
@@ -1110,11 +1108,11 @@
 TEST_F(WasmModuleVerifyTest, OnlyUnknownSectionNonEmpty) {
   const byte data[] = {
       UNKNOWN_SECTION(5),
-      0xff,
-      0xff,
-      0xff,
-      0xff,
-      0xff,  // section data
+      0xFF,
+      0xFF,
+      0xFF,
+      0xFF,
+      0xFF,  // section data
   };
   EXPECT_VERIFIES(data);
 }
@@ -1133,7 +1131,7 @@
       // signatures
       SIGNATURES_SECTION_VOID_VOID,
       // -----------------------------------------------------------
-      UNKNOWN_SECTION(5), 0xff, 0xff, 0xff, 0xff, 0xff,
+      UNKNOWN_SECTION(5), 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
   };
   EXPECT_VERIFIES(data);
 }
@@ -1499,12 +1497,37 @@
       FUNCTION_SIGNATURES_SECTION(1, 0),     // --
       SECTION(Code, 1 + 5 + 1),              // --
       1,                                     // --
-      U32V_5(0xffffffff),                    // function size,
+      U32V_5(0xFFFFFFFF),                    // function size,
       0                                      // No real body
   };
   EXPECT_FAILURE(data);
 }
 
+TEST_F(WasmModuleVerifyTest, FunctionBodySizeLimit) {
+  const uint32_t delta = 3;
+  for (uint32_t body_size = kV8MaxWasmFunctionSize - delta;
+       body_size < kV8MaxWasmFunctionSize + delta; body_size++) {
+    byte data[] = {
+        SIGNATURES_SECTION(1, SIG_ENTRY_v_v),  // --
+        FUNCTION_SIGNATURES_SECTION(1, 0),     // --
+        kCodeSectionCode,                      // code section
+        U32V_5(1 + body_size + 5),             // section size
+        1,                                     // # functions
+        U32V_5(body_size)                      // body size
+    };
+    size_t total = sizeof(data) + body_size;
+    byte* buffer = reinterpret_cast<byte*>(calloc(1, total));
+    memcpy(buffer, data, sizeof(data));
+    ModuleResult result = DecodeModule(buffer, buffer + total);
+    if (body_size <= kV8MaxWasmFunctionSize) {
+      EXPECT_TRUE(result.ok());
+    } else {
+      EXPECT_FALSE(result.ok());
+    }
+    free(buffer);
+  }
+}
+
 TEST_F(WasmModuleVerifyTest, FunctionBodies_empty) {
   static const byte data[] = {
       EMPTY_SIGNATURES_SECTION,           // --
@@ -1597,16 +1620,16 @@
 TEST_F(WasmModuleVerifyTest, Regression684855) {
   static const byte data[] = {
       SECTION_NAMES(12),
-      0xfb,  // functions count
+      0xFB,  // functions count
       0x27,  // |
       0x00,  // function name length
-      0xff,  // local names count
-      0xff,  // |
-      0xff,  // |
-      0xff,  // |
-      0xff,  // |
-      0xff,  // error: "varint too large"
-      0xff,  // |
+      0xFF,  // local names count
+      0xFF,  // |
+      0xFF,  // |
+      0xFF,  // |
+      0xFF,  // |
+      0xFF,  // error: "varint too large"
+      0xFF,  // |
       0x00,  // --
       0x00   // --
   };
@@ -1680,7 +1703,7 @@
 }
 
 TEST_F(WasmModuleVerifyTest, Section_Name_No_UTF8) {
-  static const byte data[] = {SECTION(Unknown, 4), 1, 0xff, 17, 18};
+  static const byte data[] = {SECTION(Unknown, 4), 1, 0xFF, 17, 18};
   EXPECT_FAILURE(data);
 }
 
diff --git a/src/v8/test/unittests/wasm/streaming-decoder-unittest.cc b/src/v8/test/unittests/wasm/streaming-decoder-unittest.cc
index 258c648..8655651 100644
--- a/src/v8/test/unittests/wasm/streaming-decoder-unittest.cc
+++ b/src/v8/test/unittests/wasm/streaming-decoder-unittest.cc
@@ -140,20 +140,20 @@
 
 TEST_F(WasmStreamingDecoderTest, MagicAndVersion) {
   const uint8_t data[] = {U32_LE(kWasmMagic), U32_LE(kWasmVersion)};
-  ExpectVerifies(Vector<const uint8_t>(data, arraysize(data)), 0, 0);
+  ExpectVerifies(ArrayVector(data), 0, 0);
 }
 
 TEST_F(WasmStreamingDecoderTest, BadMagic) {
   for (uint32_t x = 1; x; x <<= 1) {
     const uint8_t data[] = {U32_LE(kWasmMagic ^ x), U32_LE(kWasmVersion)};
-    ExpectFailure(Vector<const uint8_t>(data, arraysize(data)));
+    ExpectFailure(ArrayVector(data));
   }
 }
 
 TEST_F(WasmStreamingDecoderTest, BadVersion) {
   for (uint32_t x = 1; x; x <<= 1) {
     const uint8_t data[] = {U32_LE(kWasmMagic), U32_LE(kWasmVersion ^ x)};
-    ExpectFailure(Vector<const uint8_t>(data, arraysize(data)));
+    ExpectFailure(ArrayVector(data));
   }
 }
 
@@ -170,7 +170,7 @@
       0x0,                   // 5
       0x0                    // 6
   };
-  ExpectVerifies(Vector<const uint8_t>(data, arraysize(data)), 1, 0);
+  ExpectVerifies(ArrayVector(data), 1, 0);
 }
 
 TEST_F(WasmStreamingDecoderTest, OneSection_b) {
@@ -187,7 +187,7 @@
       0x0,                   // 5
       0x0                    // 6
   };
-  ExpectVerifies(Vector<const uint8_t>(data, arraysize(data)), 1, 0);
+  ExpectVerifies(ArrayVector(data), 1, 0);
 }
 
 TEST_F(WasmStreamingDecoderTest, OneShortSection) {
@@ -201,7 +201,7 @@
       0x0,                   // Payload
       0x0                    // 2
   };
-  ExpectVerifies(Vector<const uint8_t>(data, arraysize(data)), 1, 0);
+  ExpectVerifies(ArrayVector(data), 1, 0);
 }
 
 TEST_F(WasmStreamingDecoderTest, OneShortSection_b) {
@@ -215,7 +215,7 @@
       0x0,                   // Payload
       0x0                    // 2
   };
-  ExpectVerifies(Vector<const uint8_t>(data, arraysize(data)), 1, 0);
+  ExpectVerifies(ArrayVector(data), 1, 0);
 }
 
 TEST_F(WasmStreamingDecoderTest, OneEmptySection) {
@@ -225,7 +225,7 @@
       0x1,                   // Section ID
       0x0                    // Section Length
   };
-  ExpectVerifies(Vector<const uint8_t>(data, arraysize(data)), 1, 0);
+  ExpectVerifies(ArrayVector(data), 1, 0);
 }
 
 TEST_F(WasmStreamingDecoderTest, OneSectionNotEnoughPayload1) {
@@ -240,7 +240,7 @@
       0x0,                   // 4
       0x0                    // 5
   };
-  ExpectFailure(Vector<const uint8_t>(data, arraysize(data)));
+  ExpectFailure(ArrayVector(data));
 }
 
 TEST_F(WasmStreamingDecoderTest, OneSectionNotEnoughPayload2) {
@@ -251,7 +251,7 @@
       0x6,                   // Section Length
       0x0                    // Payload
   };
-  ExpectFailure(Vector<const uint8_t>(data, arraysize(data)));
+  ExpectFailure(ArrayVector(data));
 }
 
 TEST_F(WasmStreamingDecoderTest, OneSectionInvalidLength) {
@@ -265,7 +265,7 @@
       0x80,                  // --
       0x80,                  // --
   };
-  ExpectFailure(Vector<const uint8_t>(data, arraysize(data)));
+  ExpectFailure(ArrayVector(data));
 }
 
 TEST_F(WasmStreamingDecoderTest, TwoLongSections) {
@@ -290,7 +290,7 @@
       0x0,                   // 6
       0x0                    // 7
   };
-  ExpectVerifies(Vector<const uint8_t>(data, arraysize(data)), 2, 0);
+  ExpectVerifies(ArrayVector(data), 2, 0);
 }
 
 TEST_F(WasmStreamingDecoderTest, TwoShortSections) {
@@ -305,7 +305,7 @@
       0x0,                   // Payload
       0x0,                   // 2
   };
-  ExpectVerifies(Vector<const uint8_t>(data, arraysize(data)), 2, 0);
+  ExpectVerifies(ArrayVector(data), 2, 0);
 }
 
 TEST_F(WasmStreamingDecoderTest, TwoSectionsShortLong) {
@@ -325,7 +325,7 @@
       0x0,                   // 6
       0x0                    // 7
   };
-  ExpectVerifies(Vector<const uint8_t>(data, arraysize(data)), 2, 0);
+  ExpectVerifies(ArrayVector(data), 2, 0);
 }
 
 TEST_F(WasmStreamingDecoderTest, TwoEmptySections) {
@@ -337,7 +337,7 @@
       0x2,                   // Section ID
       0x0                    // Section Length
   };
-  ExpectVerifies(Vector<const uint8_t>(data, arraysize(data)), 2, 0);
+  ExpectVerifies(ArrayVector(data), 2, 0);
 }
 
 TEST_F(WasmStreamingDecoderTest, OneFunction) {
@@ -355,7 +355,7 @@
       0x0,                   // 5
       0x0,                   // 6
   };
-  ExpectVerifies(Vector<const uint8_t>(data, arraysize(data)), 0, 1);
+  ExpectVerifies(ArrayVector(data), 0, 1);
 }
 
 TEST_F(WasmStreamingDecoderTest, OneShortFunction) {
@@ -368,7 +368,7 @@
       0x1,                   // Function Length
       0x0,                   // Function
   };
-  ExpectVerifies(Vector<const uint8_t>(data, arraysize(data)), 0, 1);
+  ExpectVerifies(ArrayVector(data), 0, 1);
 }
 
 TEST_F(WasmStreamingDecoderTest, EmptyFunction) {
@@ -380,7 +380,7 @@
       0x1,                   // Number of Functions
       0x0,                   // Function Length
   };
-  ExpectFailure(Vector<const uint8_t>(data, arraysize(data)));
+  ExpectFailure(ArrayVector(data));
 }
 
 TEST_F(WasmStreamingDecoderTest, TwoFunctions) {
@@ -406,7 +406,7 @@
       0x0,                   // 6
       0x0,                   // 7
   };
-  ExpectVerifies(Vector<const uint8_t>(data, arraysize(data)), 0, 2);
+  ExpectVerifies(ArrayVector(data), 0, 2);
 }
 
 TEST_F(WasmStreamingDecoderTest, TwoFunctions_b) {
@@ -414,7 +414,7 @@
       U32_LE(kWasmMagic),    // --
       U32_LE(kWasmVersion),  // --
       kCodeSectionCode,      // Section ID
-      0xb,                   // Section Length
+      0xB,                   // Section Length
       0x2,                   // Number of Functions
       0x1,                   // Function Length
       0x0,                   // Function
@@ -427,7 +427,7 @@
       0x0,                   // 6
       0x0,                   // 7
   };
-  ExpectVerifies(Vector<const uint8_t>(data, arraysize(data)), 0, 2);
+  ExpectVerifies(ArrayVector(data), 0, 2);
 }
 
 TEST_F(WasmStreamingDecoderTest, CodeSectionLengthZero) {
@@ -437,7 +437,7 @@
       kCodeSectionCode,      // Section ID
       0x0,                   // Section Length
   };
-  ExpectFailure(Vector<const uint8_t>(data, arraysize(data)));
+  ExpectFailure(ArrayVector(data));
 }
 
 TEST_F(WasmStreamingDecoderTest, CodeSectionLengthTooHigh) {
@@ -445,7 +445,7 @@
       U32_LE(kWasmMagic),    // --
       U32_LE(kWasmVersion),  // --
       kCodeSectionCode,      // Section ID
-      0xd,                   // Section Length
+      0xD,                   // Section Length
       0x2,                   // Number of Functions
       0x7,                   // Function Length
       0x0,                   // Function
@@ -458,7 +458,18 @@
       0x1,                   // Function Length
       0x0,                   // Function
   };
-  ExpectFailure(Vector<const uint8_t>(data, arraysize(data)));
+  ExpectFailure(ArrayVector(data));
+}
+
+TEST_F(WasmStreamingDecoderTest, CodeSectionLengthTooHighZeroFunctions) {
+  const uint8_t data[] = {
+      U32_LE(kWasmMagic),    // --
+      U32_LE(kWasmVersion),  // --
+      kCodeSectionCode,      // Section ID
+      0xD,                   // Section Length
+      0x0,                   // Number of Functions
+  };
+  ExpectFailure(ArrayVector(data));
 }
 
 TEST_F(WasmStreamingDecoderTest, CodeSectionLengthTooLow) {
@@ -479,7 +490,7 @@
       0x1,                   // Function Length
       0x0,                   // Function
   };
-  ExpectFailure(Vector<const uint8_t>(data, arraysize(data)));
+  ExpectFailure(ArrayVector(data));
 }
 
 TEST_F(WasmStreamingDecoderTest, CodeSectionLengthTooLowEndsInNumFunctions) {
@@ -502,7 +513,7 @@
       0x1,                   // Function Length
       0x0,                   // Function
   };
-  ExpectFailure(Vector<const uint8_t>(data, arraysize(data)));
+  ExpectFailure(ArrayVector(data));
 }
 
 TEST_F(WasmStreamingDecoderTest, CodeSectionLengthTooLowEndsInFunctionLength) {
@@ -527,7 +538,7 @@
       0x1,                   // Function Length
       0x0,                   // Function
   };
-  ExpectFailure(Vector<const uint8_t>(data, arraysize(data)));
+  ExpectFailure(ArrayVector(data));
 }
 
 TEST_F(WasmStreamingDecoderTest, NumberOfFunctionsTooHigh) {
@@ -535,7 +546,7 @@
       U32_LE(kWasmMagic),    // --
       U32_LE(kWasmVersion),  // --
       kCodeSectionCode,      // Section ID
-      0xb,                   // Section Length
+      0xB,                   // Section Length
       0x4,                   // Number of Functions
       0x7,                   // Function Length
       0x0,                   // Function
@@ -548,7 +559,7 @@
       0x1,                   // Function Length
       0x0,                   // Function
   };
-  ExpectFailure(Vector<const uint8_t>(data, arraysize(data)));
+  ExpectFailure(ArrayVector(data));
 }
 
 TEST_F(WasmStreamingDecoderTest, NumberOfFunctionsTooLow) {
@@ -556,7 +567,7 @@
       U32_LE(kWasmMagic),    // --
       U32_LE(kWasmVersion),  // --
       kCodeSectionCode,      // Section ID
-      0xe,                   // Section Length
+      0xE,                   // Section Length
       0x2,                   // Number of Functions
       0x1,                   // Function Length
       0x0,                   // Function
@@ -572,8 +583,68 @@
       0x0,                   // 6
       0x0,                   // 7
   };
-  ExpectFailure(Vector<const uint8_t>(data, arraysize(data)));
+  ExpectFailure(ArrayVector(data));
 }
+
+TEST_F(WasmStreamingDecoderTest, TwoCodeSections) {
+  const uint8_t data[] = {
+      U32_LE(kWasmMagic),    // --
+      U32_LE(kWasmVersion),  // --
+      kCodeSectionCode,      // Section ID
+      0x3,                   // Section Length
+      0x1,                   // Number of Functions
+      0x1,                   // Function Length
+      0x0,                   // Function
+      kCodeSectionCode,      // Section ID
+      0x3,                   // Section Length
+      0x1,                   // Number of Functions
+      0x1,                   // Function Length
+      0x0,                   // Function
+  };
+  ExpectFailure(ArrayVector(data));
+}
+
+TEST_F(WasmStreamingDecoderTest, UnknownSection) {
+  const uint8_t data[] = {
+      U32_LE(kWasmMagic),    // --
+      U32_LE(kWasmVersion),  // --
+      kCodeSectionCode,      // Section ID
+      0x3,                   // Section Length
+      0x1,                   // Number of Functions
+      0x1,                   // Function Length
+      0x0,                   // Function
+      kUnknownSectionCode,   // Section ID
+      0x3,                   // Section Length
+      0x1,                   // Name Length
+      0x1,                   // Name
+      0x0,                   // Content
+  };
+  ExpectVerifies(ArrayVector(data), 1, 1);
+}
+
+TEST_F(WasmStreamingDecoderTest, UnknownSectionSandwich) {
+  const uint8_t data[] = {
+      U32_LE(kWasmMagic),    // --
+      U32_LE(kWasmVersion),  // --
+      kCodeSectionCode,      // Section ID
+      0x3,                   // Section Length
+      0x1,                   // Number of Functions
+      0x1,                   // Function Length
+      0x0,                   // Function
+      kUnknownSectionCode,   // Section ID
+      0x3,                   // Section Length
+      0x1,                   // Name Length
+      0x1,                   // Name
+      0x0,                   // Content
+      kCodeSectionCode,      // Section ID
+      0x3,                   // Section Length
+      0x1,                   // Number of Functions
+      0x1,                   // Function Length
+      0x0,                   // Function
+  };
+  ExpectFailure(ArrayVector(data));
+}
+
 }  // namespace wasm
 }  // namespace internal
 }  // namespace v8
diff --git a/src/v8/test/unittests/wasm/trap-handler-unittest.cc b/src/v8/test/unittests/wasm/trap-handler-unittest.cc
new file mode 100644
index 0000000..eb57864
--- /dev/null
+++ b/src/v8/test/unittests/wasm/trap-handler-unittest.cc
@@ -0,0 +1,69 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "src/trap-handler/trap-handler.h"
+#include "include/v8.h"
+#include "testing/gtest/include/gtest/gtest.h"
+
+#if V8_OS_POSIX
+#include <setjmp.h>
+#include <signal.h>
+#endif
+
+namespace {
+
+#if V8_OS_POSIX
+
+void CrashOnPurpose() { *reinterpret_cast<volatile int*>(42); }
+
+// When using V8::RegisterDefaultSignalHandler, we save the old one to fall back
+// on if V8 doesn't handle the signal. This allows tools like ASan to register a
+// handler early on during the process startup and still generate stack traces
+// on failures.
+class SignalHandlerFallbackTest : public ::testing::Test {
+ protected:
+  virtual void SetUp() {
+    struct sigaction action;
+    action.sa_sigaction = SignalHandler;
+    sigemptyset(&action.sa_mask);
+    action.sa_flags = SA_SIGINFO;
+    sigaction(SIGSEGV, &action, &old_segv_action_);
+    sigaction(SIGBUS, &action, &old_bus_action_);
+  }
+
+  virtual void TearDown() {
+    // be a good citizen and restore the old signal handler.
+    sigaction(SIGSEGV, &old_segv_action_, nullptr);
+    sigaction(SIGBUS, &old_bus_action_, nullptr);
+  }
+
+  static sigjmp_buf continuation_;
+
+ private:
+  static void SignalHandler(int signal, siginfo_t* info, void*) {
+    siglongjmp(continuation_, 1);
+  }
+  struct sigaction old_segv_action_;
+  struct sigaction old_bus_action_;  // We get SIGBUS on Mac sometimes.
+};
+sigjmp_buf SignalHandlerFallbackTest::continuation_;
+
+TEST_F(SignalHandlerFallbackTest, DoTest) {
+  const int save_sigs = 1;
+  if (!sigsetjmp(continuation_, save_sigs)) {
+    v8::V8::RegisterDefaultSignalHandler();
+    CrashOnPurpose();
+    FAIL();
+  } else {
+    // Our signal handler ran.
+    v8::internal::trap_handler::RestoreOriginalSignalHandler();
+    SUCCEED();
+    return;
+  }
+  FAIL();
+}
+
+#endif
+
+}  //  namespace
diff --git a/src/v8/test/unittests/wasm/wasm-code-manager-unittest.cc b/src/v8/test/unittests/wasm/wasm-code-manager-unittest.cc
new file mode 100644
index 0000000..1b6af25
--- /dev/null
+++ b/src/v8/test/unittests/wasm/wasm-code-manager-unittest.cc
@@ -0,0 +1,392 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "test/unittests/test-utils.h"
+#include "testing/gmock/include/gmock/gmock.h"
+
+#include "src/wasm/wasm-code-manager.h"
+
+namespace v8 {
+namespace internal {
+namespace wasm {
+namespace wasm_heap_unittest {
+
+class DisjointAllocationPoolTest : public ::testing::Test {
+ public:
+  Address A(size_t n) { return reinterpret_cast<Address>(n); }
+  void CheckLooksLike(const DisjointAllocationPool& mem,
+                      std::vector<std::pair<size_t, size_t>> expectation);
+  DisjointAllocationPool Make(std::vector<std::pair<size_t, size_t>> model);
+};
+
+void DisjointAllocationPoolTest::CheckLooksLike(
+    const DisjointAllocationPool& mem,
+    std::vector<std::pair<size_t, size_t>> expectation) {
+  const auto& ranges = mem.ranges();
+  CHECK_EQ(ranges.size(), expectation.size());
+  auto iter = expectation.begin();
+  for (auto it = ranges.begin(), e = ranges.end(); it != e; ++it, ++iter) {
+    CHECK_EQ(it->first, A(iter->first));
+    CHECK_EQ(it->second, A(iter->second));
+  }
+}
+
+DisjointAllocationPool DisjointAllocationPoolTest::Make(
+    std::vector<std::pair<size_t, size_t>> model) {
+  DisjointAllocationPool ret;
+  for (auto& pair : model) {
+    ret.Merge(DisjointAllocationPool(A(pair.first), A(pair.second)));
+  }
+  return ret;
+}
+
+TEST_F(DisjointAllocationPoolTest, Construct) {
+  DisjointAllocationPool a;
+  CHECK(a.IsEmpty());
+  CHECK_EQ(a.ranges().size(), 0);
+  DisjointAllocationPool b = Make({{1, 5}});
+  CHECK(!b.IsEmpty());
+  CHECK_EQ(b.ranges().size(), 1);
+  a.Merge(std::move(b));
+  CheckLooksLike(a, {{1, 5}});
+  DisjointAllocationPool c;
+  a.Merge(std::move(c));
+  CheckLooksLike(a, {{1, 5}});
+  DisjointAllocationPool e, f;
+  e.Merge(std::move(f));
+  CHECK(e.IsEmpty());
+}
+
+TEST_F(DisjointAllocationPoolTest, SimpleExtract) {
+  DisjointAllocationPool a = Make({{1, 5}});
+  DisjointAllocationPool b = a.AllocatePool(2);
+  CheckLooksLike(a, {{3, 5}});
+  CheckLooksLike(b, {{1, 3}});
+  a.Merge(std::move(b));
+  CheckLooksLike(a, {{1, 5}});
+  CHECK_EQ(a.ranges().size(), 1);
+  CHECK_EQ(a.ranges().front().first, A(1));
+  CHECK_EQ(a.ranges().front().second, A(5));
+}
+
+TEST_F(DisjointAllocationPoolTest, ExtractAll) {
+  DisjointAllocationPool a(A(1), A(5));
+  DisjointAllocationPool b = a.AllocatePool(4);
+  CheckLooksLike(b, {{1, 5}});
+  CHECK(a.IsEmpty());
+  a.Merge(std::move(b));
+  CheckLooksLike(a, {{1, 5}});
+}
+
+TEST_F(DisjointAllocationPoolTest, ExtractAccross) {
+  DisjointAllocationPool a = Make({{1, 5}, {10, 20}});
+  DisjointAllocationPool b = a.AllocatePool(5);
+  CheckLooksLike(a, {{11, 20}});
+  CheckLooksLike(b, {{1, 5}, {10, 11}});
+  a.Merge(std::move(b));
+  CheckLooksLike(a, {{1, 5}, {10, 20}});
+}
+
+TEST_F(DisjointAllocationPoolTest, ReassembleOutOfOrder) {
+  DisjointAllocationPool a = Make({{1, 5}, {10, 15}});
+  DisjointAllocationPool b = Make({{7, 8}, {20, 22}});
+  a.Merge(std::move(b));
+  CheckLooksLike(a, {{1, 5}, {7, 8}, {10, 15}, {20, 22}});
+
+  DisjointAllocationPool c = Make({{1, 5}, {10, 15}});
+  DisjointAllocationPool d = Make({{7, 8}, {20, 22}});
+  d.Merge(std::move(c));
+  CheckLooksLike(d, {{1, 5}, {7, 8}, {10, 15}, {20, 22}});
+}
+
+TEST_F(DisjointAllocationPoolTest, FailToExtract) {
+  DisjointAllocationPool a = Make({{1, 5}});
+  DisjointAllocationPool b = a.AllocatePool(5);
+  CheckLooksLike(a, {{1, 5}});
+  CHECK(b.IsEmpty());
+}
+
+TEST_F(DisjointAllocationPoolTest, FailToExtractExact) {
+  DisjointAllocationPool a = Make({{1, 5}, {10, 14}});
+  DisjointAllocationPool b = a.Allocate(5);
+  CheckLooksLike(a, {{1, 5}, {10, 14}});
+  CHECK(b.IsEmpty());
+}
+
+TEST_F(DisjointAllocationPoolTest, ExtractExact) {
+  DisjointAllocationPool a = Make({{1, 5}, {10, 15}});
+  DisjointAllocationPool b = a.Allocate(5);
+  CheckLooksLike(a, {{1, 5}});
+  CheckLooksLike(b, {{10, 15}});
+}
+
+TEST_F(DisjointAllocationPoolTest, Merging) {
+  DisjointAllocationPool a = Make({{10, 15}, {20, 25}});
+  a.Merge(Make({{15, 20}}));
+  CheckLooksLike(a, {{10, 25}});
+}
+
+TEST_F(DisjointAllocationPoolTest, MergingMore) {
+  DisjointAllocationPool a = Make({{10, 15}, {20, 25}, {30, 35}});
+  a.Merge(Make({{15, 20}, {25, 30}}));
+  CheckLooksLike(a, {{10, 35}});
+}
+
+TEST_F(DisjointAllocationPoolTest, MergingSkip) {
+  DisjointAllocationPool a = Make({{10, 15}, {20, 25}, {30, 35}});
+  a.Merge(Make({{25, 30}}));
+  CheckLooksLike(a, {{10, 15}, {20, 35}});
+}
+
+TEST_F(DisjointAllocationPoolTest, MergingSkipLargerSrc) {
+  DisjointAllocationPool a = Make({{10, 15}, {20, 25}, {30, 35}});
+  a.Merge(Make({{25, 30}, {35, 40}}));
+  CheckLooksLike(a, {{10, 15}, {20, 40}});
+}
+
+TEST_F(DisjointAllocationPoolTest, MergingSkipLargerSrcWithGap) {
+  DisjointAllocationPool a = Make({{10, 15}, {20, 25}, {30, 35}});
+  a.Merge(Make({{25, 30}, {36, 40}}));
+  CheckLooksLike(a, {{10, 15}, {20, 35}, {36, 40}});
+}
+
+class WasmCodeManagerTest : public TestWithIsolate {
+ public:
+  using NativeModulePtr = std::unique_ptr<NativeModule>;
+  enum ModuleStyle : int { Fixed = 0, Growable = 1 };
+
+  const std::vector<ModuleStyle> styles() const {
+    return std::vector<ModuleStyle>({Fixed, Growable});
+  }
+  // We pretend all our modules have 10 functions and no imports, just so
+  // we can size up the code_table.
+  NativeModulePtr AllocFixedModule(WasmCodeManager* manager, size_t size) {
+    return manager->NewNativeModule(size, 10, 0, false);
+  }
+
+  NativeModulePtr AllocGrowableModule(WasmCodeManager* manager, size_t size) {
+    return manager->NewNativeModule(size, 10, 0, true);
+  }
+
+  NativeModulePtr AllocModule(WasmCodeManager* manager, size_t size,
+                              ModuleStyle style) {
+    switch (style) {
+      case Fixed:
+        return AllocFixedModule(manager, size);
+      case Growable:
+        return AllocGrowableModule(manager, size);
+      default:
+        UNREACHABLE();
+    }
+  }
+
+  WasmCode* AddCode(NativeModule* native_module, uint32_t index, size_t size) {
+    CodeDesc desc;
+    memset(reinterpret_cast<void*>(&desc), 0, sizeof(CodeDesc));
+    std::unique_ptr<byte[]> exec_buff(new byte[size]);
+    desc.buffer = exec_buff.get();
+    desc.instr_size = static_cast<int>(size);
+    return native_module->AddCode(desc, 0, index, 0, {}, false);
+  }
+
+  size_t page() const { return AllocatePageSize(); }
+  v8::Isolate* v8_isolate() const {
+    return reinterpret_cast<v8::Isolate*>(isolate());
+  }
+};
+
+TEST_F(WasmCodeManagerTest, EmptyCase) {
+  for (auto style : styles()) {
+    WasmCodeManager manager(v8_isolate(), 0 * page());
+    CHECK_EQ(0, manager.remaining_uncommitted());
+
+    NativeModulePtr native_module = AllocModule(&manager, 1 * page(), style);
+    CHECK(native_module);
+    WasmCode* code = AddCode(native_module.get(), 0, 10);
+    CHECK_NULL(code);
+    CHECK_EQ(0, manager.remaining_uncommitted());
+    native_module.reset();
+    CHECK_EQ(0, manager.remaining_uncommitted());
+  }
+}
+
+TEST_F(WasmCodeManagerTest, AllocateAndGoOverLimit) {
+  for (auto style : styles()) {
+    WasmCodeManager manager(v8_isolate(), 1 * page());
+    CHECK_EQ(1 * page(), manager.remaining_uncommitted());
+    NativeModulePtr native_module = AllocModule(&manager, 1 * page(), style);
+    CHECK(native_module);
+    CHECK_EQ(1 * page(), manager.remaining_uncommitted());
+    uint32_t index = 0;
+    WasmCode* code = AddCode(native_module.get(), index++, 1 * kCodeAlignment);
+    CHECK_NOT_NULL(code);
+    CHECK_EQ(0, manager.remaining_uncommitted());
+
+    code = AddCode(native_module.get(), index++, 3 * kCodeAlignment);
+    CHECK_NOT_NULL(code);
+    CHECK_EQ(0, manager.remaining_uncommitted());
+
+    code = AddCode(native_module.get(), index++, page() - 4 * kCodeAlignment);
+    CHECK_NOT_NULL(code);
+    CHECK_EQ(0, manager.remaining_uncommitted());
+
+    code = AddCode(native_module.get(), index++, 1 * kCodeAlignment);
+    CHECK_NULL(code);
+    CHECK_EQ(0, manager.remaining_uncommitted());
+
+    native_module.reset();
+    CHECK_EQ(1 * page(), manager.remaining_uncommitted());
+  }
+}
+
+TEST_F(WasmCodeManagerTest, TotalLimitIrrespectiveOfModuleCount) {
+  for (auto style : styles()) {
+    WasmCodeManager manager(v8_isolate(), 1 * page());
+    NativeModulePtr nm1 = AllocModule(&manager, 1 * page(), style);
+    NativeModulePtr nm2 = AllocModule(&manager, 1 * page(), style);
+    CHECK(nm1);
+    CHECK(nm2);
+    WasmCode* code = AddCode(nm1.get(), 0, 1 * page());
+    CHECK_NOT_NULL(code);
+    code = AddCode(nm2.get(), 0, 1 * page());
+    CHECK_NULL(code);
+  }
+}
+
+TEST_F(WasmCodeManagerTest, DifferentHeapsApplyLimitsIndependently) {
+  for (auto style : styles()) {
+    WasmCodeManager manager1(v8_isolate(), 1 * page());
+    WasmCodeManager manager2(v8_isolate(), 2 * page());
+    NativeModulePtr nm1 = AllocModule(&manager1, 1 * page(), style);
+    NativeModulePtr nm2 = AllocModule(&manager2, 1 * page(), style);
+    CHECK(nm1);
+    CHECK(nm2);
+    WasmCode* code = AddCode(nm1.get(), 0, 1 * page());
+    CHECK_NOT_NULL(code);
+    CHECK_EQ(0, manager1.remaining_uncommitted());
+    code = AddCode(nm2.get(), 0, 1 * page());
+    CHECK_NOT_NULL(code);
+  }
+}
+
+TEST_F(WasmCodeManagerTest, GrowingVsFixedModule) {
+  for (auto style : styles()) {
+    WasmCodeManager manager(v8_isolate(), 3 * page());
+    NativeModulePtr nm = AllocModule(&manager, 1 * page(), style);
+    WasmCode* code = AddCode(nm.get(), 0, 1 * page() + kCodeAlignment);
+    if (style == Fixed) {
+      CHECK_NULL(code);
+      CHECK_EQ(manager.remaining_uncommitted(), 3 * page());
+    } else {
+      CHECK_NOT_NULL(code);
+      CHECK_EQ(manager.remaining_uncommitted(), 1 * page());
+    }
+  }
+}
+
+TEST_F(WasmCodeManagerTest, CommitIncrements) {
+  for (auto style : styles()) {
+    WasmCodeManager manager(v8_isolate(), 10 * page());
+    NativeModulePtr nm = AllocModule(&manager, 3 * page(), style);
+    WasmCode* code = AddCode(nm.get(), 0, kCodeAlignment);
+    CHECK_NOT_NULL(code);
+    CHECK_EQ(manager.remaining_uncommitted(), 9 * page());
+    code = AddCode(nm.get(), 1, 2 * page());
+    CHECK_NOT_NULL(code);
+    CHECK_EQ(manager.remaining_uncommitted(), 7 * page());
+    code = AddCode(nm.get(), 2, page() - kCodeAlignment);
+    CHECK_NOT_NULL(code);
+    CHECK_EQ(manager.remaining_uncommitted(), 7 * page());
+  }
+}
+
+TEST_F(WasmCodeManagerTest, Lookup) {
+  for (auto style : styles()) {
+    WasmCodeManager manager(v8_isolate(), 2 * page());
+
+    NativeModulePtr nm1 = AllocModule(&manager, 1 * page(), style);
+    NativeModulePtr nm2 = AllocModule(&manager, 1 * page(), style);
+    WasmCode* code1_0 = AddCode(nm1.get(), 0, kCodeAlignment);
+    CHECK_EQ(nm1.get(), code1_0->owner());
+    WasmCode* code1_1 = AddCode(nm1.get(), 1, kCodeAlignment);
+    WasmCode* code2_0 = AddCode(nm2.get(), 0, kCodeAlignment);
+    WasmCode* code2_1 = AddCode(nm2.get(), 1, kCodeAlignment);
+    CHECK_EQ(nm2.get(), code2_1->owner());
+
+    CHECK_EQ(0, code1_0->index());
+    CHECK_EQ(1, code1_1->index());
+    CHECK_EQ(0, code2_0->index());
+    CHECK_EQ(1, code2_1->index());
+
+    // we know the manager object is allocated here, so we shouldn't
+    // find any WasmCode* associated with that ptr.
+    WasmCode* not_found =
+        manager.LookupCode(reinterpret_cast<Address>(&manager));
+    CHECK_NULL(not_found);
+    WasmCode* found = manager.LookupCode(code1_0->instructions().start());
+    CHECK_EQ(found, code1_0);
+    found = manager.LookupCode(code2_1->instructions().start() +
+                               (code2_1->instructions().size() / 2));
+    CHECK_EQ(found, code2_1);
+    found = manager.LookupCode(code2_1->instructions().start() +
+                               code2_1->instructions().size() - 1);
+    CHECK_EQ(found, code2_1);
+    found = manager.LookupCode(code2_1->instructions().start() +
+                               code2_1->instructions().size());
+    CHECK_NULL(found);
+    Address mid_code1_1 =
+        code1_1->instructions().start() + (code1_1->instructions().size() / 2);
+    CHECK_EQ(code1_1, manager.LookupCode(mid_code1_1));
+    nm1.reset();
+    CHECK_NULL(manager.LookupCode(mid_code1_1));
+  }
+}
+
+TEST_F(WasmCodeManagerTest, MultiManagerLookup) {
+  for (auto style : styles()) {
+    WasmCodeManager manager1(v8_isolate(), 2 * page());
+    WasmCodeManager manager2(v8_isolate(), 2 * page());
+
+    NativeModulePtr nm1 = AllocModule(&manager1, 1 * page(), style);
+    NativeModulePtr nm2 = AllocModule(&manager2, 1 * page(), style);
+
+    WasmCode* code1_0 = AddCode(nm1.get(), 0, kCodeAlignment);
+    CHECK_EQ(nm1.get(), code1_0->owner());
+    WasmCode* code1_1 = AddCode(nm1.get(), 1, kCodeAlignment);
+    WasmCode* code2_0 = AddCode(nm2.get(), 0, kCodeAlignment);
+    WasmCode* code2_1 = AddCode(nm2.get(), 1, kCodeAlignment);
+    CHECK_EQ(nm2.get(), code2_1->owner());
+
+    CHECK_EQ(0, code1_0->index());
+    CHECK_EQ(1, code1_1->index());
+    CHECK_EQ(0, code2_0->index());
+    CHECK_EQ(1, code2_1->index());
+
+    CHECK_EQ(code1_0, manager1.LookupCode(code1_0->instructions().start()));
+    CHECK_NULL(manager2.LookupCode(code1_0->instructions().start()));
+  }
+}
+
+TEST_F(WasmCodeManagerTest, LookupWorksAfterRewrite) {
+  for (auto style : styles()) {
+    WasmCodeManager manager(v8_isolate(), 2 * page());
+
+    NativeModulePtr nm1 = AllocModule(&manager, 1 * page(), style);
+
+    WasmCode* code0 = AddCode(nm1.get(), 0, kCodeAlignment);
+    WasmCode* code1 = AddCode(nm1.get(), 1, kCodeAlignment);
+    CHECK_EQ(0, code0->index());
+    CHECK_EQ(1, code1->index());
+    CHECK_EQ(code1, manager.LookupCode(code1->instructions().start()));
+    WasmCode* code1_1 = AddCode(nm1.get(), 1, kCodeAlignment);
+    CHECK_EQ(1, code1_1->index());
+    CHECK_EQ(code1, manager.LookupCode(code1->instructions().start()));
+    CHECK_EQ(code1_1, manager.LookupCode(code1_1->instructions().start()));
+  }
+}
+
+}  // namespace wasm_heap_unittest
+}  // namespace wasm
+}  // namespace internal
+}  // namespace v8
diff --git a/src/v8/test/unittests/wasm/wasm-heap-unittest.cc b/src/v8/test/unittests/wasm/wasm-heap-unittest.cc
deleted file mode 100644
index 6e75e84..0000000
--- a/src/v8/test/unittests/wasm/wasm-heap-unittest.cc
+++ /dev/null
@@ -1,157 +0,0 @@
-// Copyright 2017 the V8 project authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "test/unittests/test-utils.h"
-#include "testing/gmock/include/gmock/gmock.h"
-
-#include "src/wasm/wasm-heap.h"
-
-namespace v8 {
-namespace internal {
-namespace wasm {
-namespace wasm_heap_unittest {
-
-class DisjointAllocationPoolTest : public ::testing::Test {
- public:
-  Address A(size_t n) { return reinterpret_cast<Address>(n); }
-  void CheckLooksLike(const DisjointAllocationPool& mem,
-                      std::vector<std::pair<size_t, size_t>> expectation);
-  DisjointAllocationPool Make(std::vector<std::pair<size_t, size_t>> model);
-};
-
-void DisjointAllocationPoolTest::CheckLooksLike(
-    const DisjointAllocationPool& mem,
-    std::vector<std::pair<size_t, size_t>> expectation) {
-  const auto& ranges = mem.ranges();
-  CHECK_EQ(ranges.size(), expectation.size());
-  auto iter = expectation.begin();
-  for (auto it = ranges.begin(), e = ranges.end(); it != e; ++it, ++iter) {
-    CHECK_EQ(it->first, A(iter->first));
-    CHECK_EQ(it->second, A(iter->second));
-  }
-}
-
-DisjointAllocationPool DisjointAllocationPoolTest::Make(
-    std::vector<std::pair<size_t, size_t>> model) {
-  DisjointAllocationPool ret;
-  for (auto& pair : model) {
-    ret.Merge(DisjointAllocationPool(A(pair.first), A(pair.second)));
-  }
-  return ret;
-}
-
-TEST_F(DisjointAllocationPoolTest, Construct) {
-  DisjointAllocationPool a;
-  CHECK(a.IsEmpty());
-  CHECK_EQ(a.ranges().size(), 0);
-  DisjointAllocationPool b = Make({{1, 5}});
-  CHECK(!b.IsEmpty());
-  CHECK_EQ(b.ranges().size(), 1);
-  a.Merge(std::move(b));
-  CheckLooksLike(a, {{1, 5}});
-  DisjointAllocationPool c;
-  a.Merge(std::move(c));
-  CheckLooksLike(a, {{1, 5}});
-  DisjointAllocationPool e, f;
-  e.Merge(std::move(f));
-  CHECK(e.IsEmpty());
-}
-
-TEST_F(DisjointAllocationPoolTest, SimpleExtract) {
-  DisjointAllocationPool a = Make({{1, 5}});
-  DisjointAllocationPool b = a.AllocatePool(2);
-  CheckLooksLike(a, {{3, 5}});
-  CheckLooksLike(b, {{1, 3}});
-  a.Merge(std::move(b));
-  CheckLooksLike(a, {{1, 5}});
-  CHECK_EQ(a.ranges().size(), 1);
-  CHECK_EQ(a.ranges().front().first, A(1));
-  CHECK_EQ(a.ranges().front().second, A(5));
-}
-
-TEST_F(DisjointAllocationPoolTest, ExtractAll) {
-  DisjointAllocationPool a(A(1), A(5));
-  DisjointAllocationPool b = a.AllocatePool(4);
-  CheckLooksLike(b, {{1, 5}});
-  CHECK(a.IsEmpty());
-  a.Merge(std::move(b));
-  CheckLooksLike(a, {{1, 5}});
-}
-
-TEST_F(DisjointAllocationPoolTest, ExtractAccross) {
-  DisjointAllocationPool a = Make({{1, 5}, {10, 20}});
-  DisjointAllocationPool b = a.AllocatePool(5);
-  CheckLooksLike(a, {{11, 20}});
-  CheckLooksLike(b, {{1, 5}, {10, 11}});
-  a.Merge(std::move(b));
-  CheckLooksLike(a, {{1, 5}, {10, 20}});
-}
-
-TEST_F(DisjointAllocationPoolTest, ReassembleOutOfOrder) {
-  DisjointAllocationPool a = Make({{1, 5}, {10, 15}});
-  DisjointAllocationPool b = Make({{7, 8}, {20, 22}});
-  a.Merge(std::move(b));
-  CheckLooksLike(a, {{1, 5}, {7, 8}, {10, 15}, {20, 22}});
-
-  DisjointAllocationPool c = Make({{1, 5}, {10, 15}});
-  DisjointAllocationPool d = Make({{7, 8}, {20, 22}});
-  d.Merge(std::move(c));
-  CheckLooksLike(d, {{1, 5}, {7, 8}, {10, 15}, {20, 22}});
-}
-
-TEST_F(DisjointAllocationPoolTest, FailToExtract) {
-  DisjointAllocationPool a = Make({{1, 5}});
-  DisjointAllocationPool b = a.AllocatePool(5);
-  CheckLooksLike(a, {{1, 5}});
-  CHECK(b.IsEmpty());
-}
-
-TEST_F(DisjointAllocationPoolTest, FailToExtractExact) {
-  DisjointAllocationPool a = Make({{1, 5}, {10, 14}});
-  DisjointAllocationPool b = a.Allocate(5);
-  CheckLooksLike(a, {{1, 5}, {10, 14}});
-  CHECK(b.IsEmpty());
-}
-
-TEST_F(DisjointAllocationPoolTest, ExtractExact) {
-  DisjointAllocationPool a = Make({{1, 5}, {10, 15}});
-  DisjointAllocationPool b = a.Allocate(5);
-  CheckLooksLike(a, {{1, 5}});
-  CheckLooksLike(b, {{10, 15}});
-}
-
-TEST_F(DisjointAllocationPoolTest, Merging) {
-  DisjointAllocationPool a = Make({{10, 15}, {20, 25}});
-  a.Merge(Make({{15, 20}}));
-  CheckLooksLike(a, {{10, 25}});
-}
-
-TEST_F(DisjointAllocationPoolTest, MergingMore) {
-  DisjointAllocationPool a = Make({{10, 15}, {20, 25}, {30, 35}});
-  a.Merge(Make({{15, 20}, {25, 30}}));
-  CheckLooksLike(a, {{10, 35}});
-}
-
-TEST_F(DisjointAllocationPoolTest, MergingSkip) {
-  DisjointAllocationPool a = Make({{10, 15}, {20, 25}, {30, 35}});
-  a.Merge(Make({{25, 30}}));
-  CheckLooksLike(a, {{10, 15}, {20, 35}});
-}
-
-TEST_F(DisjointAllocationPoolTest, MergingSkipLargerSrc) {
-  DisjointAllocationPool a = Make({{10, 15}, {20, 25}, {30, 35}});
-  a.Merge(Make({{25, 30}, {35, 40}}));
-  CheckLooksLike(a, {{10, 15}, {20, 40}});
-}
-
-TEST_F(DisjointAllocationPoolTest, MergingSkipLargerSrcWithGap) {
-  DisjointAllocationPool a = Make({{10, 15}, {20, 25}, {30, 35}});
-  a.Merge(Make({{25, 30}, {36, 40}}));
-  CheckLooksLike(a, {{10, 15}, {20, 35}, {36, 40}});
-}
-
-}  // namespace wasm_heap_unittest
-}  // namespace wasm
-}  // namespace internal
-}  // namespace v8
diff --git a/src/v8/test/unittests/wasm/wasm-macro-gen-unittest.cc b/src/v8/test/unittests/wasm/wasm-macro-gen-unittest.cc
index 45a4c5a..d1087c0 100644
--- a/src/v8/test/unittests/wasm/wasm-macro-gen-unittest.cc
+++ b/src/v8/test/unittests/wasm/wasm-macro-gen-unittest.cc
@@ -37,7 +37,7 @@
   EXPECT_SIZE(4, WASM_I64V_3(10000));
   EXPECT_SIZE(5, WASM_I64V_4(-9828934));
   EXPECT_SIZE(6, WASM_I64V_5(-1119828934));
-  EXPECT_SIZE(10, WASM_I64V_9(0x123456789abcdef0ULL));
+  EXPECT_SIZE(10, WASM_I64V_9(0x123456789ABCDEF0ULL));
 
   EXPECT_SIZE(5, WASM_F32(1.0f));
   EXPECT_SIZE(5, WASM_F32(10000.0f));
diff --git a/src/v8/test/wasm-spec-tests/testcfg.py b/src/v8/test/wasm-spec-tests/testcfg.py
index d3b06d0..7f99ed4 100644
--- a/src/v8/test/wasm-spec-tests/testcfg.py
+++ b/src/v8/test/wasm-spec-tests/testcfg.py
@@ -7,10 +7,7 @@
 from testrunner.local import testsuite
 from testrunner.objects import testcase
 
-class WasmSpecTestsTestSuite(testsuite.TestSuite):
-  def __init__(self, name, root):
-    super(WasmSpecTestsTestSuite, self).__init__(name, root)
-
+class TestSuite(testsuite.TestSuite):
   def ListTests(self, context):
     tests = []
     for dirname, dirs, files in os.walk(self.root):
@@ -21,15 +18,18 @@
           fullpath = os.path.join(dirname, filename)
           relpath = fullpath[len(self.root) + 1 : -3]
           testname = relpath.replace(os.path.sep, "/")
-          test = testcase.TestCase(self, testname)
+          test = self._create_test(testname)
           tests.append(test)
     return tests
 
-  def GetFlagsForTestCase(self, testcase, context):
-    flags = [] + context.mode_flags
-    flags.append(os.path.join(self.root, testcase.path + self.suffix()))
-    return testcase.flags + flags
+  def _test_class(self):
+    return TestCase
+
+
+class TestCase(testcase.TestCase):
+  def _get_files_params(self, ctx):
+    return [os.path.join(self.suite.root, self.path + self._get_suffix())]
 
 
 def GetSuite(name, root):
-  return WasmSpecTestsTestSuite(name, root)
+  return TestSuite(name, root)
diff --git a/src/v8/test/wasm-spec-tests/tests.tar.gz.sha1 b/src/v8/test/wasm-spec-tests/tests.tar.gz.sha1
index ec186ed..6fc33c1 100644
--- a/src/v8/test/wasm-spec-tests/tests.tar.gz.sha1
+++ b/src/v8/test/wasm-spec-tests/tests.tar.gz.sha1
@@ -1 +1 @@
-7b8890aa360e386784892ce635c52270e22ec900
\ No newline at end of file
+310ca173c041a53775a713ac948c3627ae357f8d
\ No newline at end of file
diff --git a/src/v8/test/webkit/class-syntax-declaration-expected.txt b/src/v8/test/webkit/class-syntax-declaration-expected.txt
index a424edf..c198f26 100644
--- a/src/v8/test/webkit/class-syntax-declaration-expected.txt
+++ b/src/v8/test/webkit/class-syntax-declaration-expected.txt
@@ -26,9 +26,9 @@
 PASS class X { set constructor() {} } threw exception SyntaxError: Class constructor may not be an accessor.
 PASS class X { constructor() {} static constructor() { return staticMethodValue; } } did not throw exception.
 PASS class X { constructor() {} static constructor() { return staticMethodValue; } }; X.constructor() is staticMethodValue
-PASS class X { constructor() {} static prototype() {} } threw exception SyntaxError: Classes may not have static property named prototype.
-PASS class X { constructor() {} static get prototype() {} } threw exception SyntaxError: Classes may not have static property named prototype.
-PASS class X { constructor() {} static set prototype() {} } threw exception SyntaxError: Classes may not have static property named prototype.
+PASS class X { constructor() {} static prototype() {} } threw exception SyntaxError: Classes may not have a static property named 'prototype'.
+PASS class X { constructor() {} static get prototype() {} } threw exception SyntaxError: Classes may not have a static property named 'prototype'.
+PASS class X { constructor() {} static set prototype() {} } threw exception SyntaxError: Classes may not have a static property named 'prototype'.
 PASS class X { constructor() {} prototype() { return instanceMethodValue; } } did not throw exception.
 PASS class X { constructor() {} prototype() { return instanceMethodValue; } }; (new X).prototype() is instanceMethodValue
 PASS class X { constructor() {} set foo(a) {} } did not throw exception.
diff --git a/src/v8/test/webkit/class-syntax-declaration.js b/src/v8/test/webkit/class-syntax-declaration.js
index 775a335..bc6c31d 100644
--- a/src/v8/test/webkit/class-syntax-declaration.js
+++ b/src/v8/test/webkit/class-syntax-declaration.js
@@ -64,9 +64,9 @@
 shouldNotThrow("class X { constructor() {} static constructor() { return staticMethodValue; } }");
 shouldBe("class X { constructor() {} static constructor() { return staticMethodValue; } }; X.constructor()", "staticMethodValue");
 
-shouldThrow("class X { constructor() {} static prototype() {} }", "'SyntaxError: Classes may not have static property named prototype'");
-shouldThrow("class X { constructor() {} static get prototype() {} }", "'SyntaxError: Classes may not have static property named prototype'");
-shouldThrow("class X { constructor() {} static set prototype() {} }", "'SyntaxError: Classes may not have static property named prototype'");
+shouldThrow("class X { constructor() {} static prototype() {} }", '"SyntaxError: Classes may not have a static property named \'prototype\'"');
+shouldThrow("class X { constructor() {} static get prototype() {} }", '"SyntaxError: Classes may not have a static property named \'prototype\'"');
+shouldThrow("class X { constructor() {} static set prototype() {} }", '"SyntaxError: Classes may not have a static property named \'prototype\'"');
 shouldNotThrow("class X { constructor() {} prototype() { return instanceMethodValue; } }");
 shouldBe("class X { constructor() {} prototype() { return instanceMethodValue; } }; (new X).prototype()", "instanceMethodValue");
 
diff --git a/src/v8/test/webkit/class-syntax-expression-expected.txt b/src/v8/test/webkit/class-syntax-expression-expected.txt
index 5bcaf00..acda627 100644
--- a/src/v8/test/webkit/class-syntax-expression-expected.txt
+++ b/src/v8/test/webkit/class-syntax-expression-expected.txt
@@ -24,9 +24,9 @@
 PASS x = class { set constructor() {} } threw exception SyntaxError: Class constructor may not be an accessor.
 PASS x = class { constructor() {} static constructor() { return staticMethodValue; } } did not throw exception.
 PASS x = class { constructor() {} static constructor() { return staticMethodValue; } }; x.constructor() is staticMethodValue
-PASS x = class { constructor() {} static prototype() {} } threw exception SyntaxError: Classes may not have static property named prototype.
-PASS x = class { constructor() {} static get prototype() {} } threw exception SyntaxError: Classes may not have static property named prototype.
-PASS x = class { constructor() {} static set prototype() {} } threw exception SyntaxError: Classes may not have static property named prototype.
+PASS x = class { constructor() {} static prototype() {} } threw exception SyntaxError: Classes may not have a static property named 'prototype'.
+PASS x = class { constructor() {} static get prototype() {} } threw exception SyntaxError: Classes may not have a static property named 'prototype'.
+PASS x = class { constructor() {} static set prototype() {} } threw exception SyntaxError: Classes may not have a static property named 'prototype'.
 PASS x = class  { constructor() {} prototype() { return instanceMethodValue; } } did not throw exception.
 PASS x = class { constructor() {} prototype() { return instanceMethodValue; } }; (new x).prototype() is instanceMethodValue
 PASS x = class { constructor() {} set foo(a) {} } did not throw exception.
diff --git a/src/v8/test/webkit/class-syntax-expression.js b/src/v8/test/webkit/class-syntax-expression.js
index ab6dc0e..0cea5d7 100644
--- a/src/v8/test/webkit/class-syntax-expression.js
+++ b/src/v8/test/webkit/class-syntax-expression.js
@@ -62,9 +62,9 @@
 shouldNotThrow("x = class { constructor() {} static constructor() { return staticMethodValue; } }");
 shouldBe("x = class { constructor() {} static constructor() { return staticMethodValue; } }; x.constructor()", "staticMethodValue");
 
-shouldThrow("x = class { constructor() {} static prototype() {} }", "'SyntaxError: Classes may not have static property named prototype'");
-shouldThrow("x = class { constructor() {} static get prototype() {} }", "'SyntaxError: Classes may not have static property named prototype'");
-shouldThrow("x = class { constructor() {} static set prototype() {} }", "'SyntaxError: Classes may not have static property named prototype'");
+shouldThrow("x = class { constructor() {} static prototype() {} }", '"SyntaxError: Classes may not have a static property named \'prototype\'"');
+shouldThrow("x = class { constructor() {} static get prototype() {} }", '"SyntaxError: Classes may not have a static property named \'prototype\'"');
+shouldThrow("x = class { constructor() {} static set prototype() {} }", '"SyntaxError: Classes may not have a static property named \'prototype\'"');
 shouldNotThrow("x = class  { constructor() {} prototype() { return instanceMethodValue; } }");
 shouldBe("x = class { constructor() {} prototype() { return instanceMethodValue; } }; (new x).prototype()", "instanceMethodValue");
 
diff --git a/src/v8/test/webkit/date-constructor-expected.txt b/src/v8/test/webkit/date-constructor-expected.txt
index 366a39d..3ad2cb0 100644
--- a/src/v8/test/webkit/date-constructor-expected.txt
+++ b/src/v8/test/webkit/date-constructor-expected.txt
@@ -27,37 +27,36 @@
 
 
 PASS isNaN(new Date("")) is true
-PASS new Date(1111).getTime() is 1111
-PASS new Date(object).getTime() is 1111
-PASS new Date(new Date(1111)).getTime() is 1111
-PASS new Date(new Date(1111).toString()).getTime() is 1000
-PASS new Date(1111, 1).getTime() - timeZoneOffset is -27104803200000
-PASS new Date(1111, 1, 1).getTime() - timeZoneOffset is -27104803200000
-PASS new Date(1111, 1, 1, 1).getTime() - timeZoneOffset is -27104799600000
-PASS new Date(1111, 1, 1, 1, 1).getTime() - timeZoneOffset is -27104799540000
-PASS new Date(1111, 1, 1, 1, 1, 1).getTime() - timeZoneOffset is -27104799539000
-PASS new Date(1111, 1, 1, 1, 1, 1, 1).getTime() - timeZoneOffset is -27104799538999
-PASS new Date(1111, 1, 1, 1, 1, 1, 1, 1).getTime() - timeZoneOffset is -27104799538999
-PASS new Date(1111, 1, 1, 1, 1, 1, 1, 1, 1).getTime() - timeZoneOffset is -27104799538999
-PASS new Date(1111, 1, 1, 1, 1, 1, 1, 1, 1).getTime() - timeZoneOffset is -27104799538999
-PASS new Date(new Date(1111, 1)).getTime() - timeZoneOffset is -27104803200000
-PASS new Date(new Date(1111, 1, 1)).getTime() - timeZoneOffset is -27104803200000
-PASS new Date(new Date(1111, 1, 1, 1)).getTime() - timeZoneOffset is -27104799600000
-PASS new Date(new Date(1111, 1, 1, 1, 1, 1)).getTime() - timeZoneOffset is -27104799539000
-PASS new Date(new Date(1111, 1, 1, 1, 1, 1, 1)).getTime() - timeZoneOffset is -27104799538999
-PASS new Date(new Date(1111, 1, 1, 1, 1, 1, 1, 1)).getTime() - timeZoneOffset is -27104799538999
-PASS new Date(new Date(1111, 1, 1, 1, 1, 1, 1, 1, 1)).getTime() - timeZoneOffset is -27104799538999
+PASS new Date(1995).getTime() is 1995
+PASS new Date(object).getTime() is 1995
+PASS new Date(new Date(1995)).getTime() is 1995
+PASS new Date(new Date(1995).toString()).getTime() is 1000
+PASS new Date(1995, 1).getTime() - timeZoneOffset is 791596800000
+PASS new Date(1995, 1, 1).getTime() - timeZoneOffset is 791596800000
+PASS new Date(1995, 1, 1, 1).getTime() - timeZoneOffset is 791600400000
+PASS new Date(1995, 1, 1, 1, 1).getTime() - timeZoneOffset is 791600460000
+PASS new Date(1995, 1, 1, 1, 1, 1).getTime() - timeZoneOffset is 791600461000
+PASS new Date(1995, 1, 1, 1, 1, 1, 1).getTime() - timeZoneOffset is 791600461001
+PASS new Date(1995, 1, 1, 1, 1, 1, 1, 1).getTime() - timeZoneOffset is 791600461001
+PASS new Date(1995, 1, 1, 1, 1, 1, 1, 1, 1).getTime() - timeZoneOffset is 791600461001
+PASS new Date(new Date(1995, 1)).getTime() - timeZoneOffset is 791596800000
+PASS new Date(new Date(1995, 1, 1)).getTime() - timeZoneOffset is 791596800000
+PASS new Date(new Date(1995, 1, 1, 1)).getTime() - timeZoneOffset is 791600400000
+PASS new Date(new Date(1995, 1, 1, 1, 1)).getTime() - timeZoneOffset is 791600460000
+PASS new Date(new Date(1995, 1, 1, 1, 1, 1)).getTime() - timeZoneOffset is 791600461000
+PASS new Date(new Date(1995, 1, 1, 1, 1, 1, 1)).getTime() - timeZoneOffset is 791600461001
+PASS new Date(new Date(1995, 1, 1, 1, 1, 1, 1, 1)).getTime() - timeZoneOffset is 791600461001
+PASS new Date(new Date(1995, 1, 1, 1, 1, 1, 1, 1, 1)).getTime() - timeZoneOffset is 791600461001
 PASS Number(new Date(new Date(Infinity, 1, 1, 1, 1, 1, 1, 1, 1)).getTime() - timeZoneOffset) is Number.NaN
-PASS Number(new Date(new Date(1, Infinity, 1, 1, 1, 1, 1, 1, 1)).getTime() - timeZoneOffset) is Number.NaN
-PASS Number(new Date(new Date(1, 1, Infinity, 1, 1, 1, 1, 1, 1)).getTime() - timeZoneOffset) is Number.NaN
-PASS Number(new Date(new Date(1, 1, 1, Infinity, 1, 1, 1, 1, 1)).getTime() - timeZoneOffset) is Number.NaN
-PASS Number(new Date(new Date(1, 1, 1, 1, Infinity, 1, 1, 1, 1)).getTime() - timeZoneOffset) is Number.NaN
-PASS Number(new Date(new Date(1, 1, 1, 1, 1, Infinity, 1, 1, 1)).getTime() - timeZoneOffset) is Number.NaN
-PASS Number(new Date(new Date(1, 1, 1, 1, 1, 1, Infinity, 1, 1)).getTime() - timeZoneOffset) is Number.NaN
-PASS Number(new Date(new Date(1, 1, 1, 1, 1, 1, 1, 1, Infinity)).getTime() - timeZoneOffset) is -2174770738999
+PASS Number(new Date(new Date(95, Infinity, 1, 1, 1, 1, 1, 1, 1)).getTime() - timeZoneOffset) is Number.NaN
+PASS Number(new Date(new Date(95, 1, Infinity, 1, 1, 1, 1, 1, 1)).getTime() - timeZoneOffset) is Number.NaN
+PASS Number(new Date(new Date(95, 1, 1, Infinity, 1, 1, 1, 1, 1)).getTime() - timeZoneOffset) is Number.NaN
+PASS Number(new Date(new Date(95, 1, 1, 1, Infinity, 1, 1, 1, 1)).getTime() - timeZoneOffset) is Number.NaN
+PASS Number(new Date(new Date(95, 1, 1, 1, 1, Infinity, 1, 1, 1)).getTime() - timeZoneOffset) is Number.NaN
+PASS Number(new Date(new Date(95, 1, 1, 1, 1, 1, Infinity, 1, 1)).getTime() - timeZoneOffset) is Number.NaN
+PASS Number(new Date(new Date(95, 1, 1, 1, 1, 1, 1, 1, Infinity)).getTime() - timeZoneOffset) is 791600461001
 PASS testStr is "1234567"
 PASS testStr is "1234567"
 PASS successfullyParsed is true
 
 TEST COMPLETE
-
diff --git a/src/v8/test/webkit/date-constructor.js b/src/v8/test/webkit/date-constructor.js
index e96d970..ff37d0b 100644
--- a/src/v8/test/webkit/date-constructor.js
+++ b/src/v8/test/webkit/date-constructor.js
@@ -28,44 +28,44 @@
 );
 
 var object = new Object;
-object.valueOf = function() { return 1111; }
+object.valueOf = function() { return 1995; }
 object.toString = function() { return "2222"; }
 
 shouldBe('isNaN(new Date(""))', 'true');
 
-var timeZoneOffset = Date.parse("Dec 25 1995") - Date.parse("Dec 25 1995 GMT");
+var timeZoneOffset = Date.parse("Feb 1 1995") - Date.parse("Feb 1 1995 GMT");
 
-shouldBe('new Date(1111).getTime()', '1111');
-shouldBe('new Date(object).getTime()', '1111');
-shouldBe('new Date(new Date(1111)).getTime()', '1111');
-shouldBe('new Date(new Date(1111).toString()).getTime()', '1000');
+shouldBe('new Date(1995).getTime()', '1995');
+shouldBe('new Date(object).getTime()', '1995');
+shouldBe('new Date(new Date(1995)).getTime()', '1995');
+shouldBe('new Date(new Date(1995).toString()).getTime()', '1000');
 
-shouldBe('new Date(1111, 1).getTime() - timeZoneOffset', '-27104803200000');
-shouldBe('new Date(1111, 1, 1).getTime() - timeZoneOffset', '-27104803200000');
-shouldBe('new Date(1111, 1, 1, 1).getTime() - timeZoneOffset', '-27104799600000');
-shouldBe('new Date(1111, 1, 1, 1, 1).getTime() - timeZoneOffset', '-27104799540000');
-shouldBe('new Date(1111, 1, 1, 1, 1, 1).getTime() - timeZoneOffset', '-27104799539000');
-shouldBe('new Date(1111, 1, 1, 1, 1, 1, 1).getTime() - timeZoneOffset', '-27104799538999');
-shouldBe('new Date(1111, 1, 1, 1, 1, 1, 1, 1).getTime() - timeZoneOffset', '-27104799538999');
-shouldBe('new Date(1111, 1, 1, 1, 1, 1, 1, 1, 1).getTime() - timeZoneOffset', '-27104799538999');
-shouldBe('new Date(1111, 1, 1, 1, 1, 1, 1, 1, 1).getTime() - timeZoneOffset', '-27104799538999');
+shouldBe('new Date(1995, 1).getTime() - timeZoneOffset', '791596800000');
+shouldBe('new Date(1995, 1, 1).getTime() - timeZoneOffset', '791596800000');
+shouldBe('new Date(1995, 1, 1, 1).getTime() - timeZoneOffset', '791600400000');
+shouldBe('new Date(1995, 1, 1, 1, 1).getTime() - timeZoneOffset', '791600460000');
+shouldBe('new Date(1995, 1, 1, 1, 1, 1).getTime() - timeZoneOffset', '791600461000');
+shouldBe('new Date(1995, 1, 1, 1, 1, 1, 1).getTime() - timeZoneOffset', '791600461001');
+shouldBe('new Date(1995, 1, 1, 1, 1, 1, 1, 1).getTime() - timeZoneOffset', '791600461001');
+shouldBe('new Date(1995, 1, 1, 1, 1, 1, 1, 1, 1).getTime() - timeZoneOffset', '791600461001');
 
-shouldBe('new Date(new Date(1111, 1)).getTime() - timeZoneOffset', '-27104803200000');
-shouldBe('new Date(new Date(1111, 1, 1)).getTime() - timeZoneOffset', '-27104803200000');
-shouldBe('new Date(new Date(1111, 1, 1, 1)).getTime() - timeZoneOffset', '-27104799600000');
-shouldBe('new Date(new Date(1111, 1, 1, 1, 1, 1)).getTime() - timeZoneOffset', '-27104799539000');
-shouldBe('new Date(new Date(1111, 1, 1, 1, 1, 1, 1)).getTime() - timeZoneOffset', '-27104799538999');
-shouldBe('new Date(new Date(1111, 1, 1, 1, 1, 1, 1, 1)).getTime() - timeZoneOffset', '-27104799538999');
-shouldBe('new Date(new Date(1111, 1, 1, 1, 1, 1, 1, 1, 1)).getTime() - timeZoneOffset', '-27104799538999');
+shouldBe('new Date(new Date(1995, 1)).getTime() - timeZoneOffset', '791596800000');
+shouldBe('new Date(new Date(1995, 1, 1)).getTime() - timeZoneOffset', '791596800000');
+shouldBe('new Date(new Date(1995, 1, 1, 1)).getTime() - timeZoneOffset', '791600400000');
+shouldBe('new Date(new Date(1995, 1, 1, 1, 1)).getTime() - timeZoneOffset', '791600460000');
+shouldBe('new Date(new Date(1995, 1, 1, 1, 1, 1)).getTime() - timeZoneOffset', '791600461000');
+shouldBe('new Date(new Date(1995, 1, 1, 1, 1, 1, 1)).getTime() - timeZoneOffset', '791600461001');
+shouldBe('new Date(new Date(1995, 1, 1, 1, 1, 1, 1, 1)).getTime() - timeZoneOffset', '791600461001');
+shouldBe('new Date(new Date(1995, 1, 1, 1, 1, 1, 1, 1, 1)).getTime() - timeZoneOffset', '791600461001');
 
 shouldBe("Number(new Date(new Date(Infinity, 1, 1, 1, 1, 1, 1, 1, 1)).getTime() - timeZoneOffset)", 'Number.NaN');
-shouldBe("Number(new Date(new Date(1, Infinity, 1, 1, 1, 1, 1, 1, 1)).getTime() - timeZoneOffset)", 'Number.NaN');
-shouldBe("Number(new Date(new Date(1, 1, Infinity, 1, 1, 1, 1, 1, 1)).getTime() - timeZoneOffset)", 'Number.NaN');
-shouldBe("Number(new Date(new Date(1, 1, 1, Infinity, 1, 1, 1, 1, 1)).getTime() - timeZoneOffset)", 'Number.NaN');
-shouldBe("Number(new Date(new Date(1, 1, 1, 1, Infinity, 1, 1, 1, 1)).getTime() - timeZoneOffset)", 'Number.NaN');
-shouldBe("Number(new Date(new Date(1, 1, 1, 1, 1, Infinity, 1, 1, 1)).getTime() - timeZoneOffset)", 'Number.NaN');
-shouldBe("Number(new Date(new Date(1, 1, 1, 1, 1, 1, Infinity, 1, 1)).getTime() - timeZoneOffset)", 'Number.NaN');
-shouldBe("Number(new Date(new Date(1, 1, 1, 1, 1, 1, 1, 1, Infinity)).getTime() - timeZoneOffset)", '-2174770738999');
+shouldBe("Number(new Date(new Date(95, Infinity, 1, 1, 1, 1, 1, 1, 1)).getTime() - timeZoneOffset)", 'Number.NaN');
+shouldBe("Number(new Date(new Date(95, 1, Infinity, 1, 1, 1, 1, 1, 1)).getTime() - timeZoneOffset)", 'Number.NaN');
+shouldBe("Number(new Date(new Date(95, 1, 1, Infinity, 1, 1, 1, 1, 1)).getTime() - timeZoneOffset)", 'Number.NaN');
+shouldBe("Number(new Date(new Date(95, 1, 1, 1, Infinity, 1, 1, 1, 1)).getTime() - timeZoneOffset)", 'Number.NaN');
+shouldBe("Number(new Date(new Date(95, 1, 1, 1, 1, Infinity, 1, 1, 1)).getTime() - timeZoneOffset)", 'Number.NaN');
+shouldBe("Number(new Date(new Date(95, 1, 1, 1, 1, 1, Infinity, 1, 1)).getTime() - timeZoneOffset)", 'Number.NaN');
+shouldBe("Number(new Date(new Date(95, 1, 1, 1, 1, 1, 1, 1, Infinity)).getTime() - timeZoneOffset)", '791600461001');
 
 // In Firefox, the results of the following tests are timezone-dependent, which likely implies that the implementation is not quite correct.
 // Our results are even worse, though, as the dates are clipped: (new Date(1111, 1201).getTime()) == (new Date(1111, 601).getTime())
diff --git a/src/v8/test/webkit/fast/js/array-prototype-properties-expected.txt b/src/v8/test/webkit/fast/js/array-prototype-properties-expected.txt
index 9e98e26..4ebd4cd 100644
--- a/src/v8/test/webkit/fast/js/array-prototype-properties-expected.txt
+++ b/src/v8/test/webkit/fast/js/array-prototype-properties-expected.txt
@@ -29,15 +29,15 @@
 PASS Array.prototype.toString.call(undefined) threw exception TypeError: Cannot convert undefined or null to object.
 PASS Array.prototype.toLocaleString.call(undefined) threw exception TypeError: Cannot convert undefined or null to object.
 PASS Array.prototype.concat.call(undefined, []) threw exception TypeError: Array.prototype.concat called on null or undefined.
-PASS Array.prototype.join.call(undefined, []) threw exception TypeError: Array.prototype.join called on null or undefined.
-PASS Array.prototype.pop.call(undefined) threw exception TypeError: Array.prototype.pop called on null or undefined.
-PASS Array.prototype.push.call(undefined, {}) threw exception TypeError: Array.prototype.push called on null or undefined.
-PASS Array.prototype.reverse.call(undefined) threw exception TypeError: Array.prototype.reverse called on null or undefined.
-PASS Array.prototype.shift.call(undefined) threw exception TypeError: Array.prototype.shift called on null or undefined.
-PASS Array.prototype.slice.call(undefined, 0, 1) threw exception TypeError: Array.prototype.slice called on null or undefined.
-PASS Array.prototype.sort.call(undefined) threw exception TypeError: Array.prototype.sort called on null or undefined.
-PASS Array.prototype.splice.call(undefined, 0, 1) threw exception TypeError: Array.prototype.splice called on null or undefined.
-PASS Array.prototype.unshift.call(undefined, {}) threw exception TypeError: Array.prototype.unshift called on null or undefined.
+PASS Array.prototype.join.call(undefined, []) threw exception TypeError: Cannot convert undefined or null to object.
+PASS Array.prototype.pop.call(undefined) threw exception TypeError: Cannot convert undefined or null to object.
+PASS Array.prototype.push.call(undefined, {}) threw exception TypeError: Cannot convert undefined or null to object.
+PASS Array.prototype.reverse.call(undefined) threw exception TypeError: Cannot convert undefined or null to object.
+PASS Array.prototype.shift.call(undefined) threw exception TypeError: Cannot convert undefined or null to object.
+PASS Array.prototype.slice.call(undefined, 0, 1) threw exception TypeError: Cannot convert undefined or null to object.
+PASS Array.prototype.sort.call(undefined) threw exception TypeError: Cannot convert undefined or null to object.
+PASS Array.prototype.splice.call(undefined, 0, 1) threw exception TypeError: Cannot convert undefined or null to object.
+PASS Array.prototype.unshift.call(undefined, {}) threw exception TypeError: Cannot convert undefined or null to object.
 PASS Array.prototype.every.call(undefined, toString) threw exception TypeError: Array.prototype.every called on null or undefined.
 PASS Array.prototype.forEach.call(undefined, toString) threw exception TypeError: Array.prototype.forEach called on null or undefined.
 PASS Array.prototype.some.call(undefined, toString) threw exception TypeError: Array.prototype.some called on null or undefined.
diff --git a/src/v8/test/webkit/fast/js/array-prototype-properties.js b/src/v8/test/webkit/fast/js/array-prototype-properties.js
index 12f2f9c..79b9f81 100644
--- a/src/v8/test/webkit/fast/js/array-prototype-properties.js
+++ b/src/v8/test/webkit/fast/js/array-prototype-properties.js
@@ -22,7 +22,7 @@
 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 description(
-'This is a test case for <a https://bugs.webkit.org/show_bug.cgi?id=64679">bug 64679</a>.'
+'This is a test case for <a href="https://bugs.webkit.org/show_bug.cgi?id=64679">bug 64679</a>.'
 );
 
 // These calls pass undefined as this value, and as such should throw in toObject.
diff --git a/src/v8/test/webkit/resources/JSON-stringify.js b/src/v8/test/webkit/resources/JSON-stringify.js
index 24edafa..8ea24c4 100644
--- a/src/v8/test/webkit/resources/JSON-stringify.js
+++ b/src/v8/test/webkit/resources/JSON-stringify.js
@@ -475,7 +475,7 @@
     });
     result.push(function (jsonObject){
         var deepObject = {};
-        for (var i = 0; i < 1024; i++)
+        for (var i = 0; i < 1000; i++)
             deepObject = {next:deepObject};
         return jsonObject.stringify(deepObject);
     });
@@ -488,7 +488,7 @@
     result.push(function (jsonObject){
         var depth = 0;
         function toDeepVirtualJSONObject() {
-            if (++depth >= 1024)
+            if (++depth >= 1000)
                 return {};
             var r = {};
             r.toJSON = toDeepVirtualJSONObject;
diff --git a/src/v8/test/webkit/run-json-stringify-expected.txt b/src/v8/test/webkit/run-json-stringify-expected.txt
index bbd9f28..f62adb0 100644
--- a/src/v8/test/webkit/run-json-stringify-expected.txt
+++ b/src/v8/test/webkit/run-json-stringify-expected.txt
@@ -499,7 +499,7 @@
 PASS tests[i](nativeJSON) is tests[i](JSON)
 function (jsonObject){
         var deepObject = {};
-        for (var i = 0; i < 1024; i++)
+        for (var i = 0; i < 1000; i++)
             deepObject = {next:deepObject};
         return jsonObject.stringify(deepObject);
     }
@@ -514,7 +514,7 @@
 function (jsonObject){
         var depth = 0;
         function toDeepVirtualJSONObject() {
-            if (++depth >= 1024)
+            if (++depth >= 1000)
                 return {};
             var r = {};
             r.toJSON = toDeepVirtualJSONObject;
diff --git a/src/v8/test/webkit/testcfg.py b/src/v8/test/webkit/testcfg.py
index c18120c..bd0149f 100644
--- a/src/v8/test/webkit/testcfg.py
+++ b/src/v8/test/webkit/testcfg.py
@@ -25,24 +25,19 @@
 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
-import itertools
 import os
 import re
 
 from testrunner.local import testsuite
 from testrunner.objects import testcase
+from testrunner.outproc import webkit
 
-FLAGS_PATTERN = re.compile(r"//\s+Flags:(.*)")
 FILES_PATTERN = re.compile(r"//\s+Files:(.*)")
 SELF_SCRIPT_PATTERN = re.compile(r"//\s+Env: TEST_FILE_NAME")
 
 
 # TODO (machenbach): Share commonalities with mjstest.
-class WebkitTestSuite(testsuite.TestSuite):
-
-  def __init__(self, name, root):
-    super(WebkitTestSuite, self).__init__(name, root)
-
+class TestSuite(testsuite.TestSuite):
   def ListTests(self, context):
     tests = []
     for dirname, dirs, files in os.walk(self.root):
@@ -58,17 +53,23 @@
           fullpath = os.path.join(dirname, filename)
           relpath = fullpath[len(self.root) + 1 : -3]
           testname = relpath.replace(os.path.sep, "/")
-          test = testcase.TestCase(self, testname)
+          test = self._create_test(testname)
           tests.append(test)
     return tests
 
-  def GetFlagsForTestCase(self, testcase, context):
-    source = self.GetSourceForTest(testcase)
-    flags = [] + context.mode_flags
-    flags_match = re.findall(FLAGS_PATTERN, source)
-    for match in flags_match:
-      flags += match.strip().split()
+  def _test_class(self):
+    return TestCase
 
+
+class TestCase(testcase.TestCase):
+  def __init__(self, *args, **kwargs):
+    super(TestCase, self).__init__(*args, **kwargs)
+
+    source = self.get_source()
+    self._source_files = self._parse_source_files(source)
+    self._source_flags = self._parse_source_flags(source)
+
+  def _parse_source_files(self, source):
     files_list = []  # List of file names to append to command arguments.
     files_match = FILES_PATTERN.search(source);
     # Accept several lines of 'Files:'.
@@ -78,82 +79,35 @@
         files_match = FILES_PATTERN.search(source, files_match.end())
       else:
         break
-    files = [ os.path.normpath(os.path.join(self.root, '..', '..', f))
+    files = [ os.path.normpath(os.path.join(self.suite.root, '..', '..', f))
               for f in files_list ]
-    testfilename = os.path.join(self.root, testcase.path + self.suffix())
+    testfilename = os.path.join(self.suite.root, self.path + self._get_suffix())
     if SELF_SCRIPT_PATTERN.search(source):
       env = ["-e", "TEST_FILE_NAME=\"%s\"" % testfilename.replace("\\", "\\\\")]
       files = env + files
-    files.append(os.path.join(self.root, "resources/standalone-pre.js"))
+    files.append(os.path.join(self.suite.root, "resources/standalone-pre.js"))
     files.append(testfilename)
-    files.append(os.path.join(self.root, "resources/standalone-post.js"))
+    files.append(os.path.join(self.suite.root, "resources/standalone-post.js"))
+    return files
 
-    flags += files
-    if context.isolates:
-      flags.append("--isolate")
-      flags += files
+  def _get_files_params(self, ctx):
+    files = self._source_files
+    if ctx.isolates:
+      files = files + ['--isolate'] + files
+    return files
 
-    return testcase.flags + flags
+  def _get_source_flags(self):
+    return self._source_flags
 
-  def GetSourceForTest(self, testcase):
-    filename = os.path.join(self.root, testcase.path + self.suffix())
-    with open(filename) as f:
-      return f.read()
+  def _get_source_path(self):
+    return os.path.join(self.suite.root, self.path + self._get_suffix())
 
-  # TODO(machenbach): Share with test/message/testcfg.py
-  def _IgnoreLine(self, string):
-    """Ignore empty lines, valgrind output and Android output."""
-    if not string: return True
-    return (string.startswith("==") or string.startswith("**") or
-            string.startswith("ANDROID") or
-            # FIXME(machenbach): The test driver shouldn't try to use slow
-            # asserts if they weren't compiled. This fails in optdebug=2.
-            string == "Warning: unknown flag --enable-slow-asserts." or
-            string == "Try --help for options")
-
-  def IsFailureOutput(self, testcase):
-    if super(WebkitTestSuite, self).IsFailureOutput(testcase):
-      return True
-    file_name = os.path.join(self.root, testcase.path) + "-expected.txt"
-    with file(file_name, "r") as expected:
-      expected_lines = expected.readlines()
-
-    def ExpIterator():
-      for line in expected_lines:
-        if line.startswith("#") or not line.strip(): continue
-        yield line.strip()
-
-    def ActIterator(lines):
-      for line in lines:
-        if self._IgnoreLine(line.strip()): continue
-        yield line.strip()
-
-    def ActBlockIterator():
-      """Iterates over blocks of actual output lines."""
-      lines = testcase.output.stdout.splitlines()
-      start_index = 0
-      found_eqeq = False
-      for index, line in enumerate(lines):
-        # If a stress test separator is found:
-        if line.startswith("=="):
-          # Iterate over all lines before a separator except the first.
-          if not found_eqeq:
-            found_eqeq = True
-          else:
-            yield ActIterator(lines[start_index:index])
-          # The next block of output lines starts after the separator.
-          start_index = index + 1
-      # Iterate over complete output if no separator was found.
-      if not found_eqeq:
-        yield ActIterator(lines)
-
-    for act_iterator in ActBlockIterator():
-      for (expected, actual) in itertools.izip_longest(
-          ExpIterator(), act_iterator, fillvalue=''):
-        if expected != actual:
-          return True
-      return False
+  @property
+  def output_proc(self):
+    return webkit.OutProc(
+        self.expected_outcomes,
+        os.path.join(self.suite.root, self.path) + '-expected.txt')
 
 
 def GetSuite(name, root):
-  return WebkitTestSuite(name, root)
+  return TestSuite(name, root)
diff --git a/src/v8/test/webkit/webkit.status b/src/v8/test/webkit/webkit.status
index 322454b..0b6f5a5 100644
--- a/src/v8/test/webkit/webkit.status
+++ b/src/v8/test/webkit/webkit.status
@@ -116,12 +116,6 @@
 }],  # 'gcov_coverage'
 
 ##############################################################################
-['variant == stress_asm_wasm', {
-  # Stack size too large with asm.js validator.
-  'fast/js/excessive-comma-usage': [SKIP],
-}],  # variant == stress_asm_wasm
-
-##############################################################################
 ['variant == wasm_traps', {
   '*': [SKIP],
 }],  # variant == wasm_traps