Push version 2.3.8 to trunk.

Fixed build with strict aliasing on GCC 4.4 (issue 463).

Fixed issue with incorrect handling of custom valueOf methods on string wrappers (issue 760).

Fixed compilation for ARMv4 (issue 590).

Improved performance.


git-svn-id: http://v8.googlecode.com/svn/trunk@5276 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
diff --git a/tools/gc-nvp-trace-processor.py b/tools/gc-nvp-trace-processor.py
index 44aa0a2..f1f9dc0 100755
--- a/tools/gc-nvp-trace-processor.py
+++ b/tools/gc-nvp-trace-processor.py
@@ -38,7 +38,7 @@
 
 
 from __future__ import with_statement
-import sys, types, re, subprocess
+import sys, types, re, subprocess, math
 
 def flatten(l):
   flat = []
@@ -262,48 +262,57 @@
   ],
 ]
 
+def freduce(f, field, trace, init):
+  return reduce(lambda t,r: f(t, r[field]), trace, init)
+
 def calc_total(trace, field):
-  return reduce(lambda t,r: t + r[field], trace, 0)
+  return freduce(lambda t,v: t + v, field, trace, 0)
 
 def calc_max(trace, field):
-  return reduce(lambda t,r: max(t, r[field]), trace, 0)
+  return freduce(lambda t,r: max(t, r), field, trace, 0)
+
+def count_nonzero(trace, field):
+  return freduce(lambda t,r: t if r == 0 else t + 1, field, trace, 0)
+
 
 def process_trace(filename):
   trace = parse_gc_trace(filename)
-  total_gc = calc_total(trace, 'pause')
-  max_gc = calc_max(trace, 'pause')
-  avg_gc = total_gc / len(trace)
 
-  total_sweep = calc_total(trace, 'sweep')
-  max_sweep = calc_max(trace, 'sweep')
-
-  total_mark = calc_total(trace, 'mark')
-  max_mark = calc_max(trace, 'mark')
-
+  marksweeps = filter(lambda r: r['gc'] == 'ms', trace)
+  markcompacts = filter(lambda r: r['gc'] == 'mc', trace)
   scavenges = filter(lambda r: r['gc'] == 's', trace)
-  total_scavenge = calc_total(scavenges, 'pause')
-  max_scavenge = calc_max(scavenges, 'pause')
-  avg_scavenge = total_scavenge / len(scavenges)
 
   charts = plot_all(plots, trace, filename)
 
+  def stats(out, prefix, trace, field):
+    n = len(trace)
+    total = calc_total(trace, field)
+    max = calc_max(trace, field)
+    avg = total / n
+    if n > 1:
+      dev = math.sqrt(freduce(lambda t,r: (r - avg) ** 2, field, trace, 0) /
+                      (n - 1))
+    else:
+      dev = 0
+
+    out.write('<tr><td>%s</td><td>%d</td><td>%d</td>'
+              '<td>%d</td><td>%d [dev %f]</td></tr>' %
+              (prefix, n, total, max, avg, dev))
+
+
   with open(filename + '.html', 'w') as out:
     out.write('<html><body>')
-    out.write('<table><tr><td>')
-    out.write('Total in GC: <b>%d</b><br/>' % total_gc)
-    out.write('Max in GC: <b>%d</b><br/>' % max_gc)
-    out.write('Avg in GC: <b>%d</b><br/>' % avg_gc)
-    out.write('</td><td>')
-    out.write('Total in Scavenge: <b>%d</b><br/>' % total_scavenge)
-    out.write('Max in Scavenge: <b>%d</b><br/>' % max_scavenge)
-    out.write('Avg in Scavenge: <b>%d</b><br/>' % avg_scavenge)
-    out.write('</td><td>')
-    out.write('Total in Sweep: <b>%d</b><br/>' % total_sweep)
-    out.write('Max in Sweep: <b>%d</b><br/>' % max_sweep)
-    out.write('</td><td>')
-    out.write('Total in Mark: <b>%d</b><br/>' % total_mark)
-    out.write('Max in Mark: <b>%d</b><br/>' % max_mark)
-    out.write('</td></tr></table>')
+    out.write('<table>')
+    out.write('<tr><td>Phase</td><td>Count</td><td>Time (ms)</td><td>Max</td><td>Avg</td></tr>')
+    stats(out, 'Total in GC', trace, 'pause')
+    stats(out, 'Scavenge', scavenges, 'pause')
+    stats(out, 'MarkSweep', marksweeps, 'pause')
+    stats(out, 'MarkCompact', markcompacts, 'pause')
+    stats(out, 'Mark', filter(lambda r: r['mark'] != 0, trace), 'mark')
+    stats(out, 'Sweep', filter(lambda r: r['sweep'] != 0, trace), 'sweep')
+    stats(out, 'Flush Code', filter(lambda r: r['flushcode'] != 0, trace), 'flushcode')
+    stats(out, 'Compact', filter(lambda r: r['compact'] != 0, trace), 'compact')
+    out.write('</table>')
     for chart in charts:
       out.write('<img src="%s">' % chart)
       out.write('</body></html>')
diff --git a/tools/gyp/v8.gyp b/tools/gyp/v8.gyp
index dbd94bf..47f9502 100644
--- a/tools/gyp/v8.gyp
+++ b/tools/gyp/v8.gyp
@@ -336,7 +336,6 @@
         '../../src/execution.h',
         '../../src/factory.cc',
         '../../src/factory.h',
-        '../../src/fast-codegen.h',
         '../../src/fast-dtoa.cc',
         '../../src/fast-dtoa.h',
         '../../src/flag-definitions.h',
@@ -396,6 +395,8 @@
         '../../src/natives.h',
         '../../src/objects-debug.cc',
         '../../src/objects-inl.h',
+        '../../src/objects-visiting.cc',
+        '../../src/objects-visiting.h',
         '../../src/objects.cc',
         '../../src/objects.h',
         '../../src/oprofile-agent.h',
@@ -485,7 +486,6 @@
             '../../src/arm',
           ],
           'sources': [
-            '../../src/fast-codegen.cc',
             '../../src/jump-target-light.h',
             '../../src/jump-target-light-inl.h',
             '../../src/jump-target-light.cc',
@@ -502,7 +502,6 @@
             '../../src/arm/cpu-arm.cc',
             '../../src/arm/debug-arm.cc',
             '../../src/arm/disasm-arm.cc',
-            '../../src/arm/fast-codegen-arm.cc',
             '../../src/arm/frames-arm.cc',
             '../../src/arm/frames-arm.h',
             '../../src/arm/full-codegen-arm.cc',
@@ -547,8 +546,6 @@
             '../../src/ia32/cpu-ia32.cc',
             '../../src/ia32/debug-ia32.cc',
             '../../src/ia32/disasm-ia32.cc',
-            '../../src/ia32/fast-codegen-ia32.cc',
-            '../../src/ia32/fast-codegen-ia32.h',
             '../../src/ia32/frames-ia32.cc',
             '../../src/ia32/frames-ia32.h',
             '../../src/ia32/full-codegen-ia32.cc',
@@ -569,7 +566,6 @@
             '../../src/x64',
           ],
           'sources': [
-            '../../src/fast-codegen.cc',
             '../../src/jump-target-heavy.h',
             '../../src/jump-target-heavy-inl.h',
             '../../src/jump-target-heavy.cc',
@@ -584,7 +580,6 @@
             '../../src/x64/cpu-x64.cc',
             '../../src/x64/debug-x64.cc',
             '../../src/x64/disasm-x64.cc',
-            '../../src/x64/fast-codegen-x64.cc',
             '../../src/x64/frames-x64.cc',
             '../../src/x64/frames-x64.h',
             '../../src/x64/full-codegen-x64.cc',
diff --git a/tools/oom_dump/README b/tools/oom_dump/README
new file mode 100644
index 0000000..5adbf65
--- /dev/null
+++ b/tools/oom_dump/README
@@ -0,0 +1,30 @@
+oom_dump extracts useful information from Google Chrome OOM  minidumps.
+
+To build one needs a google-breakpad checkout
+(http://code.google.com/p/google-breakpad/).
+
+First, one needs to build and install breakpad itself. For instructions
+check google-breakpad, but currently it's as easy as:
+
+  ./configure
+  make
+  sudo make install
+
+(the catch: breakpad installs .so into /usr/local/lib, so you might
+need some additional tweaking to make it discoverable, for example,
+put a soft link into /usr/lib directory).
+
+Next step is to build v8.  Note: you should build x64 version of v8,
+if you're on 64-bit platform, otherwise you would get link error when
+building oom_dump.
+
+The last step is to build oom_dump itself.  The following command should work:
+
+  cd <v8 working copy>/tools/oom_dump
+  scons BREAKPAD_DIR=<path to google-breakpad working copy>
+
+(Additionally you can control v8 working copy dir, but default---../..---
+should work just fine).
+
+If everything goes fine, oom_dump <path to minidump> should print
+some useful information about OOM crash.
diff --git a/tools/oom_dump/SConstruct b/tools/oom_dump/SConstruct
new file mode 100644
index 0000000..f228c89
--- /dev/null
+++ b/tools/oom_dump/SConstruct
@@ -0,0 +1,42 @@
+# Copyright 2010 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.
+
+vars = Variables('custom.py')
+vars.Add(PathVariable('BREAKPAD_DIR',
+                      'Path to checkout of google-breakpad project',
+                      '~/google-breakpad',
+                      PathVariable.PathIsDir))
+vars.Add(PathVariable('V8_DIR',
+                      'Path to checkout of v8 project',
+                      '../..',
+                      PathVariable.PathIsDir))
+
+env = Environment(variables = vars,
+                  CPPPATH = ['${BREAKPAD_DIR}/src', '${V8_DIR}/src'],
+                  LIBPATH = ['/usr/local/lib', '${V8_DIR}'])
+
+env.Program('oom_dump.cc', LIBS = ['breakpad', 'v8', 'pthread'])
diff --git a/tools/oom_dump/oom_dump.cc b/tools/oom_dump/oom_dump.cc
new file mode 100644
index 0000000..01f6005
--- /dev/null
+++ b/tools/oom_dump/oom_dump.cc
@@ -0,0 +1,285 @@
+// Copyright 2010 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 <algorithm>
+#include <stdio.h>
+#include <stdlib.h>
+
+#include <google_breakpad/processor/minidump.h>
+#include <processor/logging.h>
+
+#define ENABLE_DEBUGGER_SUPPORT
+
+#include <v8.h>
+
+namespace {
+
+using google_breakpad::Minidump;
+using google_breakpad::MinidumpContext;
+using google_breakpad::MinidumpThread;
+using google_breakpad::MinidumpThreadList;
+using google_breakpad::MinidumpException;
+using google_breakpad::MinidumpMemoryRegion;
+
+const char* InstanceTypeToString(int type) {
+  static char const* names[v8::internal::LAST_TYPE] = {0};
+  if (names[v8::internal::STRING_TYPE] == NULL) {
+    using namespace v8::internal;
+#define SET(type) names[type] = #type;
+    INSTANCE_TYPE_LIST(SET)
+#undef SET
+  }
+  return names[type];
+}
+
+
+u_int32_t ReadPointedValue(MinidumpMemoryRegion* region,
+                           u_int64_t base,
+                           int offset) {
+  u_int32_t ptr = 0;
+  CHECK(region->GetMemoryAtAddress(base + 4 * offset, &ptr));
+  u_int32_t value = 0;
+  CHECK(region->GetMemoryAtAddress(ptr, &value));
+  return value;
+}
+
+
+void ReadArray(MinidumpMemoryRegion* region,
+               u_int64_t array_ptr,
+               int size,
+               int* output) {
+  for (int i = 0; i < size; i++) {
+    u_int32_t value;
+    CHECK(region->GetMemoryAtAddress(array_ptr + 4 * i, &value));
+    output[i] = value;
+  }
+}
+
+
+u_int32_t ReadArrayFrom(MinidumpMemoryRegion* region,
+                        u_int64_t base,
+                        int offset,
+                        int size,
+                        int* output) {
+  u_int32_t ptr = 0;
+  CHECK(region->GetMemoryAtAddress(base + 4 * offset, &ptr));
+  ReadArray(region, ptr, size, output);
+}
+
+
+double toM(int size) {
+  return size / (1024. * 1024.);
+}
+
+
+class IndirectSorter {
+ public:
+  explicit IndirectSorter(int* a) : a_(a) { }
+
+  bool operator() (int i0, int i1) {
+    return a_[i0] > a_[i1];
+  }
+
+ private:
+  int* a_;
+};
+
+void DumpHeapStats(const char *minidump_file) {
+  Minidump minidump(minidump_file);
+  CHECK(minidump.Read());
+
+  MinidumpException *exception = minidump.GetException();
+  CHECK(exception);
+
+  MinidumpContext* crash_context = exception->GetContext();
+  CHECK(crash_context);
+
+  u_int32_t exception_thread_id = 0;
+  CHECK(exception->GetThreadID(&exception_thread_id));
+
+  MinidumpThreadList* thread_list = minidump.GetThreadList();
+  CHECK(thread_list);
+
+  MinidumpThread* exception_thread =
+      thread_list->GetThreadByID(exception_thread_id);
+  CHECK(exception_thread);
+
+  const MDRawContextX86* contextX86 = crash_context->GetContextX86();
+  CHECK(contextX86);
+
+  const u_int32_t esp = contextX86->esp;
+
+  MinidumpMemoryRegion* memory_region = exception_thread->GetMemory();
+  CHECK(memory_region);
+
+  const u_int64_t last = memory_region->GetBase() + memory_region->GetSize();
+
+  u_int64_t heap_stats_addr = 0;
+  for (u_int64_t addr = esp; addr < last; addr += 4) {
+    u_int32_t value = 0;
+    CHECK(memory_region->GetMemoryAtAddress(addr, &value));
+    if (value >= esp && value < last) {
+      u_int32_t value2 = 0;
+      CHECK(memory_region->GetMemoryAtAddress(value, &value2));
+      if (value2 == 0xdecade00) {
+        heap_stats_addr = addr;
+        break;
+      }
+    }
+  }
+  CHECK(heap_stats_addr);
+
+  // Read heap stats.
+
+#define READ_FIELD(offset) \
+  ReadPointedValue(memory_region, heap_stats_addr, offset)
+
+  CHECK(READ_FIELD(0) == 0xdecade00);
+  CHECK(READ_FIELD(23) == 0xdecade01);
+
+  const int new_space_size = READ_FIELD(1);
+  const int new_space_capacity = READ_FIELD(2);
+  const int old_pointer_space_size = READ_FIELD(3);
+  const int old_pointer_space_capacity = READ_FIELD(4);
+  const int old_data_space_size = READ_FIELD(5);
+  const int old_data_space_capacity = READ_FIELD(6);
+  const int code_space_size = READ_FIELD(7);
+  const int code_space_capacity = READ_FIELD(8);
+  const int map_space_size = READ_FIELD(9);
+  const int map_space_capacity = READ_FIELD(10);
+  const int cell_space_size = READ_FIELD(11);
+  const int cell_space_capacity = READ_FIELD(12);
+  const int lo_space_size = READ_FIELD(13);
+  const int global_handle_count = READ_FIELD(14);
+  const int weak_global_handle_count = READ_FIELD(15);
+  const int pending_global_handle_count = READ_FIELD(16);
+  const int near_death_global_handle_count = READ_FIELD(17);
+  const int destroyed_global_handle_count = READ_FIELD(18);
+  const int memory_allocator_size = READ_FIELD(19);
+  const int memory_allocator_capacity = READ_FIELD(20);
+#undef READ_FIELD
+
+  int objects_per_type[v8::internal::LAST_TYPE + 1] = {0};
+  ReadArrayFrom(memory_region, heap_stats_addr, 21,
+                v8::internal::LAST_TYPE + 1, objects_per_type);
+
+  int size_per_type[v8::internal::LAST_TYPE + 1] = {0};
+  ReadArrayFrom(memory_region, heap_stats_addr, 22, v8::internal::LAST_TYPE + 1,
+                size_per_type);
+
+  int js_global_objects =
+      objects_per_type[v8::internal::JS_GLOBAL_OBJECT_TYPE];
+  int js_builtins_objects =
+      objects_per_type[v8::internal::JS_BUILTINS_OBJECT_TYPE];
+  int js_global_proxies =
+      objects_per_type[v8::internal::JS_GLOBAL_PROXY_TYPE];
+
+  int indices[v8::internal::LAST_TYPE + 1];
+  for (int i = 0; i <= v8::internal::LAST_TYPE; i++) {
+    indices[i] = i;
+  }
+
+  std::stable_sort(indices, indices + sizeof(indices)/sizeof(indices[0]),
+                  IndirectSorter(size_per_type));
+
+  int total_size = 0;
+  for (int i = 0; i <= v8::internal::LAST_TYPE; i++) {
+    total_size += size_per_type[i];
+  }
+
+  // Print heap stats.
+
+  printf("exception thread ID: %d (%x)\n",
+         exception_thread_id, exception_thread_id);
+  printf("heap stats address: %p\n", (void*)heap_stats_addr);
+#define PRINT_INT_STAT(stat) \
+    printf("\t%-25s\t% 10d\n", #stat ":", stat);
+#define PRINT_MB_STAT(stat) \
+    printf("\t%-25s\t% 10.3f MB\n", #stat ":", toM(stat));
+  PRINT_MB_STAT(new_space_size);
+  PRINT_MB_STAT(new_space_capacity);
+  PRINT_MB_STAT(old_pointer_space_size);
+  PRINT_MB_STAT(old_pointer_space_capacity);
+  PRINT_MB_STAT(old_data_space_size);
+  PRINT_MB_STAT(old_data_space_capacity);
+  PRINT_MB_STAT(code_space_size);
+  PRINT_MB_STAT(code_space_capacity);
+  PRINT_MB_STAT(map_space_size);
+  PRINT_MB_STAT(map_space_capacity);
+  PRINT_MB_STAT(cell_space_size);
+  PRINT_MB_STAT(cell_space_capacity);
+  PRINT_MB_STAT(lo_space_size);
+  PRINT_INT_STAT(global_handle_count);
+  PRINT_INT_STAT(weak_global_handle_count);
+  PRINT_INT_STAT(pending_global_handle_count);
+  PRINT_INT_STAT(near_death_global_handle_count);
+  PRINT_INT_STAT(destroyed_global_handle_count);
+  PRINT_MB_STAT(memory_allocator_size);
+  PRINT_MB_STAT(memory_allocator_capacity);
+#undef PRINT_STAT
+
+  printf("\n");
+
+  printf(
+      "\tJS_GLOBAL_OBJECT_TYPE/JS_BUILTINS_OBJECT_TYPE/JS_GLOBAL_PROXY_TYPE: "
+      "%d/%d/%d\n\n",
+      js_global_objects, js_builtins_objects, js_global_proxies);
+
+  int running_size = 0;
+  for (int i = 0; i <= v8::internal::LAST_TYPE; i++) {
+    int type = indices[i];
+    const char* name = InstanceTypeToString(type);
+    if (name == NULL) {
+      // Unknown instance type.  Check that there is no objects of that type.
+      CHECK(objects_per_type[type] == 0);
+      CHECK(size_per_type[type] == 0);
+      continue;
+    }
+    int size = size_per_type[type];
+    running_size += size;
+    printf("\t%-37s% 9d% 11.3f MB% 10.3f%%% 10.3f%%\n",
+           name, objects_per_type[type], toM(size),
+           100.*size/total_size, 100.*running_size/total_size);
+  }
+  printf("\t%-37s% 9d% 11.3f MB% 10.3f%%% 10.3f%%\n",
+         "total", 0, toM(total_size), 100., 100.);
+}
+
+}  // namespace
+
+int main(int argc, char **argv) {
+  BPLOG_INIT(&argc, &argv);
+
+  if (argc != 2) {
+    fprintf(stderr, "usage: %s <minidump>\n", argv[0]);
+    return 1;
+  }
+
+  DumpHeapStats(argv[1]);
+
+  return 0;
+}
diff --git a/tools/v8.xcodeproj/project.pbxproj b/tools/v8.xcodeproj/project.pbxproj
index b289454..0ca6a9d 100644
--- a/tools/v8.xcodeproj/project.pbxproj
+++ b/tools/v8.xcodeproj/project.pbxproj
@@ -240,15 +240,14 @@
 		9FA38BCF1175B30400C4CD55 /* full-codegen-arm.cc in Sources */ = {isa = PBXBuildFile; fileRef = 9FA38BCB1175B30400C4CD55 /* full-codegen-arm.cc */; };
 		9FA38BD01175B30400C4CD55 /* jump-target-arm.cc in Sources */ = {isa = PBXBuildFile; fileRef = 9FA38BCC1175B30400C4CD55 /* jump-target-arm.cc */; };
 		9FA38BD11175B30400C4CD55 /* virtual-frame-arm.cc in Sources */ = {isa = PBXBuildFile; fileRef = 9FA38BCD1175B30400C4CD55 /* virtual-frame-arm.cc */; };
-		9FBE03DF10BD409900F8BFBA /* fast-codegen.cc in Sources */ = {isa = PBXBuildFile; fileRef = 9FBE03DC10BD409900F8BFBA /* fast-codegen.cc */; };
-		9FBE03E210BD40EA00F8BFBA /* fast-codegen-ia32.cc in Sources */ = {isa = PBXBuildFile; fileRef = 9FBE03E110BD40EA00F8BFBA /* fast-codegen-ia32.cc */; };
-		9FBE03E510BD412600F8BFBA /* fast-codegen-arm.cc in Sources */ = {isa = PBXBuildFile; fileRef = 9FBE03E410BD412600F8BFBA /* fast-codegen-arm.cc */; };
 		9FC86ABD0F5FEDAC00F22668 /* oprofile-agent.cc in Sources */ = {isa = PBXBuildFile; fileRef = 9FC86ABB0F5FEDAC00F22668 /* oprofile-agent.cc */; };
 		9FC86ABE0F5FEDAC00F22668 /* oprofile-agent.cc in Sources */ = {isa = PBXBuildFile; fileRef = 9FC86ABB0F5FEDAC00F22668 /* oprofile-agent.cc */; };
 		C2BD4BD7120165460046BF9F /* dtoa.cc in Sources */ = {isa = PBXBuildFile; fileRef = C2BD4BD5120165460046BF9F /* dtoa.cc */; };
 		C2BD4BDB120165A70046BF9F /* fixed-dtoa.cc in Sources */ = {isa = PBXBuildFile; fileRef = C2BD4BD9120165A70046BF9F /* fixed-dtoa.cc */; };
 		C2BD4BE4120166180046BF9F /* fixed-dtoa.cc in Sources */ = {isa = PBXBuildFile; fileRef = C2BD4BD9120165A70046BF9F /* fixed-dtoa.cc */; };
 		C2BD4BE51201661F0046BF9F /* dtoa.cc in Sources */ = {isa = PBXBuildFile; fileRef = C2BD4BD5120165460046BF9F /* dtoa.cc */; };
+		C2D1E9731212F2BC00187A52 /* objects-visiting.cc in Sources */ = {isa = PBXBuildFile; fileRef = C2D1E9711212F27B00187A52 /* objects-visiting.cc */; };
+		C2D1E9741212F2CF00187A52 /* objects-visiting.cc in Sources */ = {isa = PBXBuildFile; fileRef = C2D1E9711212F27B00187A52 /* objects-visiting.cc */; };
 /* End PBXBuildFile section */
 
 /* Begin PBXContainerItemProxy section */
@@ -613,17 +612,12 @@
 		9FA38BB01175B2D200C4CD55 /* virtual-frame-heavy-inl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "virtual-frame-heavy-inl.h"; sourceTree = "<group>"; };
 		9FA38BB11175B2D200C4CD55 /* virtual-frame-inl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "virtual-frame-inl.h"; sourceTree = "<group>"; };
 		9FA38BB21175B2D200C4CD55 /* virtual-frame-light-inl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "virtual-frame-light-inl.h"; sourceTree = "<group>"; };
-		9FA38BC11175B2E500C4CD55 /* fast-codegen-ia32.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "fast-codegen-ia32.h"; path = "ia32/fast-codegen-ia32.h"; sourceTree = "<group>"; };
 		9FA38BC21175B2E500C4CD55 /* full-codegen-ia32.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = "full-codegen-ia32.cc"; path = "ia32/full-codegen-ia32.cc"; sourceTree = "<group>"; };
 		9FA38BC31175B2E500C4CD55 /* jump-target-ia32.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = "jump-target-ia32.cc"; path = "ia32/jump-target-ia32.cc"; sourceTree = "<group>"; };
 		9FA38BC41175B2E500C4CD55 /* virtual-frame-ia32.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = "virtual-frame-ia32.cc"; path = "ia32/virtual-frame-ia32.cc"; sourceTree = "<group>"; };
 		9FA38BCB1175B30400C4CD55 /* full-codegen-arm.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = "full-codegen-arm.cc"; path = "arm/full-codegen-arm.cc"; sourceTree = "<group>"; };
 		9FA38BCC1175B30400C4CD55 /* jump-target-arm.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = "jump-target-arm.cc"; path = "arm/jump-target-arm.cc"; sourceTree = "<group>"; };
 		9FA38BCD1175B30400C4CD55 /* virtual-frame-arm.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = "virtual-frame-arm.cc"; path = "arm/virtual-frame-arm.cc"; sourceTree = "<group>"; };
-		9FBE03DC10BD409900F8BFBA /* fast-codegen.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = "fast-codegen.cc"; sourceTree = "<group>"; };
-		9FBE03DD10BD409900F8BFBA /* fast-codegen.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "fast-codegen.h"; sourceTree = "<group>"; };
-		9FBE03E110BD40EA00F8BFBA /* fast-codegen-ia32.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = "fast-codegen-ia32.cc"; path = "ia32/fast-codegen-ia32.cc"; sourceTree = "<group>"; };
-		9FBE03E410BD412600F8BFBA /* fast-codegen-arm.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = "fast-codegen-arm.cc"; path = "arm/fast-codegen-arm.cc"; sourceTree = "<group>"; };
 		9FC86ABB0F5FEDAC00F22668 /* oprofile-agent.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = "oprofile-agent.cc"; sourceTree = "<group>"; };
 		9FC86ABC0F5FEDAC00F22668 /* oprofile-agent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "oprofile-agent.h"; sourceTree = "<group>"; };
 		9FF7A28211A642EA0051B8F2 /* unbound-queue-inl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "unbound-queue-inl.h"; sourceTree = "<group>"; };
@@ -632,6 +626,8 @@
 		C2BD4BD6120165460046BF9F /* dtoa.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = dtoa.h; sourceTree = "<group>"; };
 		C2BD4BD9120165A70046BF9F /* fixed-dtoa.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = "fixed-dtoa.cc"; sourceTree = "<group>"; };
 		C2BD4BDA120165A70046BF9F /* fixed-dtoa.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "fixed-dtoa.h"; sourceTree = "<group>"; };
+		C2D1E9711212F27B00187A52 /* objects-visiting.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = "objects-visiting.cc"; sourceTree = "<group>"; };
+		C2D1E9721212F27B00187A52 /* objects-visiting.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "objects-visiting.h"; sourceTree = "<group>"; };
 /* End PBXFileReference section */
 
 /* Begin PBXFrameworksBuildPhase section */
@@ -726,6 +722,8 @@
 				897FF0F80E719B8F00D62E90 /* allocation.cc */,
 				897FF0F90E719B8F00D62E90 /* allocation.h */,
 				897FF0FA0E719B8F00D62E90 /* api.cc */,
+				C2D1E9711212F27B00187A52 /* objects-visiting.cc */,
+				C2D1E9721212F27B00187A52 /* objects-visiting.h */,
 				897FF0FB0E719B8F00D62E90 /* api.h */,
 				893986D40F29020C007D5254 /* apiutils.h */,
 				897FF0FC0E719B8F00D62E90 /* arguments.h */,
@@ -813,11 +811,6 @@
 				897FF1310E719B8F00D62E90 /* execution.h */,
 				897FF1320E719B8F00D62E90 /* factory.cc */,
 				897FF1330E719B8F00D62E90 /* factory.h */,
-				9FBE03E410BD412600F8BFBA /* fast-codegen-arm.cc */,
-				9FBE03E110BD40EA00F8BFBA /* fast-codegen-ia32.cc */,
-				9FA38BC11175B2E500C4CD55 /* fast-codegen-ia32.h */,
-				9FBE03DC10BD409900F8BFBA /* fast-codegen.cc */,
-				9FBE03DD10BD409900F8BFBA /* fast-codegen.h */,
 				9FA38BA11175B2D200C4CD55 /* fast-dtoa.cc */,
 				9FA38BA21175B2D200C4CD55 /* fast-dtoa.h */,
 				89471C7F0EB23EE400B6874B /* flag-definitions.h */,
@@ -1268,6 +1261,7 @@
 			isa = PBXSourcesBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
+				C2D1E9731212F2BC00187A52 /* objects-visiting.cc in Sources */,
 				89A88DEC0E71A5FF0043BA31 /* accessors.cc in Sources */,
 				89A88DED0E71A6000043BA31 /* allocation.cc in Sources */,
 				89A88DEE0E71A6010043BA31 /* api.cc in Sources */,
@@ -1302,7 +1296,6 @@
 				89A88E020E71A65A0043BA31 /* dtoa-config.c in Sources */,
 				89A88E030E71A65B0043BA31 /* execution.cc in Sources */,
 				89A88E040E71A65D0043BA31 /* factory.cc in Sources */,
-				9FBE03E210BD40EA00F8BFBA /* fast-codegen-ia32.cc in Sources */,
 				9FA38BBC1175B2D200C4CD55 /* fast-dtoa.cc in Sources */,
 				89A88E050E71A65D0043BA31 /* flags.cc in Sources */,
 				9FA38BBD1175B2D200C4CD55 /* flow-graph.cc in Sources */,
@@ -1391,6 +1384,7 @@
 			isa = PBXSourcesBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
+				C2D1E9741212F2CF00187A52 /* objects-visiting.cc in Sources */,
 				89F23C3F0E78D5B2006B2466 /* accessors.cc in Sources */,
 				89F23C400E78D5B2006B2466 /* allocation.cc in Sources */,
 				89F23C410E78D5B2006B2466 /* api.cc in Sources */,
@@ -1426,8 +1420,6 @@
 				89F23C550E78D5B2006B2466 /* dtoa-config.c in Sources */,
 				89F23C560E78D5B2006B2466 /* execution.cc in Sources */,
 				89F23C570E78D5B2006B2466 /* factory.cc in Sources */,
-				9FBE03E510BD412600F8BFBA /* fast-codegen-arm.cc in Sources */,
-				9FBE03DF10BD409900F8BFBA /* fast-codegen.cc in Sources */,
 				9FA38BB51175B2D200C4CD55 /* fast-dtoa.cc in Sources */,
 				89F23C580E78D5B2006B2466 /* flags.cc in Sources */,
 				9FA38BB61175B2D200C4CD55 /* flow-graph.cc in Sources */,
diff --git a/tools/visual_studio/v8_base.vcproj b/tools/visual_studio/v8_base.vcproj
index 2571b65..ef08773 100644
--- a/tools/visual_studio/v8_base.vcproj
+++ b/tools/visual_studio/v8_base.vcproj
@@ -464,18 +464,6 @@
 				RelativePath="..\..\src\factory.h"
 				>
 			</File>
-                        <File
-                                RelativePath="..\..\src\ia32\fast-codegen-ia32.cc"
-                                >
-                        </File>
-                        <File
-                                RelativePath="..\..\src\ia32\fast-codegen-ia32.h"
-                                >
-                        </File>
-                        <File
-                                RelativePath="..\..\src\fast-codegen.h"
-                                >
-                        </File>
 			<File
 				RelativePath="..\..\src\fast-dtoa.cc"
 				>
@@ -753,6 +741,15 @@
 				>
 			</File>
 			<File
+				RelativePath="..\..\src\objects-visiting.cc"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\objects-visiting.h"
+				>
+			</File>
+
+			<File
 				RelativePath="..\..\src\objects.cc"
 				>
 			</File>
diff --git a/tools/visual_studio/v8_base_arm.vcproj b/tools/visual_studio/v8_base_arm.vcproj
index a3c5970..aa1e822 100644
--- a/tools/visual_studio/v8_base_arm.vcproj
+++ b/tools/visual_studio/v8_base_arm.vcproj
@@ -432,18 +432,6 @@
 				RelativePath="..\..\src\factory.h"
 				>
 			</File>
-                        <File
-                                RelativePath="..\..\src\arm\fast-codegen-arm.cc"
-                                >
-                        </File>
-                        <File
-                                RelativePath="..\..\src\fast-codegen.cc"
-                                >
-                        </File>
-                        <File
-                                RelativePath="..\..\src\fast-codegen.h"
-                                >
-                        </File>
 			<File
 				RelativePath="..\..\src\flags.cc"
 				>
@@ -713,6 +701,13 @@
 				>
 			</File>
 			<File
+				RelativePath="..\..\src\objects-visiting.cc"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\objects-visiting.h"
+				>
+			<File
 				RelativePath="..\..\src\objects.cc"
 				>
 			</File>
diff --git a/tools/visual_studio/v8_base_x64.vcproj b/tools/visual_studio/v8_base_x64.vcproj
index 708b380..33c5394 100644
--- a/tools/visual_studio/v8_base_x64.vcproj
+++ b/tools/visual_studio/v8_base_x64.vcproj
@@ -425,18 +425,6 @@
 				>
 			</File>
 			<File
-				RelativePath="..\..\src\x64\fast-codegen-x64.cc"
-				>
-			</File>
-                        <File
-                                RelativePath="..\..\src\fast-codegen.cc"
-                                >
-                        </File>
-                        <File
-                                RelativePath="..\..\src\fast-codegen.h"
-                                >
-                        </File>
-			<File
 				RelativePath="..\..\src\flags.cc"
 				>
 			</File>
@@ -706,6 +694,13 @@
 				>
 			</File>
 			<File
+				RelativePath="..\..\src\objects-visiting.cc"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\objects-visiting.h"
+				>
+			<File
 				RelativePath="..\..\src\objects.cc"
 				>
 			</File>