Update V8 to r6768 as required by WebKit r78450

Change-Id: Ib8868ff7147a76547a8d1d85f257ebe8546a3d3f
diff --git a/tools/codemap.js b/tools/codemap.js
index 8eb2acb..71a99cc 100644
--- a/tools/codemap.js
+++ b/tools/codemap.js
@@ -26,36 +26,31 @@
 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
-// Initlialize namespaces
-var devtools = devtools || {};
-devtools.profiler = devtools.profiler || {};
-
-
 /**
  * Constructs a mapper that maps addresses into code entries.
  *
  * @constructor
  */
-devtools.profiler.CodeMap = function() {
+function CodeMap() {
   /**
    * Dynamic code entries. Used for JIT compiled code.
    */
-  this.dynamics_ = new goog.structs.SplayTree();
+  this.dynamics_ = new SplayTree();
 
   /**
    * Name generator for entries having duplicate names.
    */
-  this.dynamicsNameGen_ = new devtools.profiler.CodeMap.NameGenerator();
+  this.dynamicsNameGen_ = new CodeMap.NameGenerator();
 
   /**
    * Static code entries. Used for statically compiled code.
    */
-  this.statics_ = new goog.structs.SplayTree();
+  this.statics_ = new SplayTree();
 
   /**
    * Libraries entries. Used for the whole static code libraries.
    */
-  this.libraries_ = new goog.structs.SplayTree();
+  this.libraries_ = new SplayTree();
 
   /**
    * Map of memory pages occupied with static code.
@@ -67,23 +62,23 @@
 /**
  * The number of alignment bits in a page address.
  */
-devtools.profiler.CodeMap.PAGE_ALIGNMENT = 12;
+CodeMap.PAGE_ALIGNMENT = 12;
 
 
 /**
  * Page size in bytes.
  */
-devtools.profiler.CodeMap.PAGE_SIZE =
-    1 << devtools.profiler.CodeMap.PAGE_ALIGNMENT;
+CodeMap.PAGE_SIZE =
+    1 << CodeMap.PAGE_ALIGNMENT;
 
 
 /**
  * Adds a dynamic (i.e. moveable and discardable) code entry.
  *
  * @param {number} start The starting address.
- * @param {devtools.profiler.CodeMap.CodeEntry} codeEntry Code entry object.
+ * @param {CodeMap.CodeEntry} codeEntry Code entry object.
  */
-devtools.profiler.CodeMap.prototype.addCode = function(start, codeEntry) {
+CodeMap.prototype.addCode = function(start, codeEntry) {
   this.dynamics_.insert(start, codeEntry);
 };
 
@@ -95,7 +90,7 @@
  * @param {number} from The starting address of the entry being moved.
  * @param {number} to The destination address.
  */
-devtools.profiler.CodeMap.prototype.moveCode = function(from, to) {
+CodeMap.prototype.moveCode = function(from, to) {
   var removedNode = this.dynamics_.remove(from);
   this.dynamics_.insert(to, removedNode.value);
 };
@@ -107,7 +102,7 @@
  *
  * @param {number} start The starting address of the entry being deleted.
  */
-devtools.profiler.CodeMap.prototype.deleteCode = function(start) {
+CodeMap.prototype.deleteCode = function(start) {
   var removedNode = this.dynamics_.remove(start);
 };
 
@@ -116,9 +111,9 @@
  * Adds a library entry.
  *
  * @param {number} start The starting address.
- * @param {devtools.profiler.CodeMap.CodeEntry} codeEntry Code entry object.
+ * @param {CodeMap.CodeEntry} codeEntry Code entry object.
  */
-devtools.profiler.CodeMap.prototype.addLibrary = function(
+CodeMap.prototype.addLibrary = function(
     start, codeEntry) {
   this.markPages_(start, start + codeEntry.size);
   this.libraries_.insert(start, codeEntry);
@@ -129,9 +124,9 @@
  * Adds a static code entry.
  *
  * @param {number} start The starting address.
- * @param {devtools.profiler.CodeMap.CodeEntry} codeEntry Code entry object.
+ * @param {CodeMap.CodeEntry} codeEntry Code entry object.
  */
-devtools.profiler.CodeMap.prototype.addStaticCode = function(
+CodeMap.prototype.addStaticCode = function(
     start, codeEntry) {
   this.statics_.insert(start, codeEntry);
 };
@@ -140,10 +135,10 @@
 /**
  * @private
  */
-devtools.profiler.CodeMap.prototype.markPages_ = function(start, end) {
+CodeMap.prototype.markPages_ = function(start, end) {
   for (var addr = start; addr <= end;
-       addr += devtools.profiler.CodeMap.PAGE_SIZE) {
-    this.pages_[addr >>> devtools.profiler.CodeMap.PAGE_ALIGNMENT] = 1;
+       addr += CodeMap.PAGE_SIZE) {
+    this.pages_[addr >>> CodeMap.PAGE_ALIGNMENT] = 1;
   }
 };
 
@@ -151,7 +146,7 @@
 /**
  * @private
  */
-devtools.profiler.CodeMap.prototype.isAddressBelongsTo_ = function(addr, node) {
+CodeMap.prototype.isAddressBelongsTo_ = function(addr, node) {
   return addr >= node.key && addr < (node.key + node.value.size);
 };
 
@@ -159,7 +154,7 @@
 /**
  * @private
  */
-devtools.profiler.CodeMap.prototype.findInTree_ = function(tree, addr) {
+CodeMap.prototype.findInTree_ = function(tree, addr) {
   var node = tree.findGreatestLessThan(addr);
   return node && this.isAddressBelongsTo_(addr, node) ? node.value : null;
 };
@@ -171,8 +166,8 @@
  *
  * @param {number} addr Address.
  */
-devtools.profiler.CodeMap.prototype.findEntry = function(addr) {
-  var pageAddr = addr >>> devtools.profiler.CodeMap.PAGE_ALIGNMENT;
+CodeMap.prototype.findEntry = function(addr) {
+  var pageAddr = addr >>> CodeMap.PAGE_ALIGNMENT;
   if (pageAddr in this.pages_) {
     // Static code entries can contain "holes" of unnamed code.
     // In this case, the whole library is assigned to this address.
@@ -200,7 +195,7 @@
  *
  * @param {number} addr Address.
  */
-devtools.profiler.CodeMap.prototype.findDynamicEntryByStartAddress =
+CodeMap.prototype.findDynamicEntryByStartAddress =
     function(addr) {
   var node = this.dynamics_.find(addr);
   return node ? node.value : null;
@@ -210,7 +205,7 @@
 /**
  * Returns an array of all dynamic code entries.
  */
-devtools.profiler.CodeMap.prototype.getAllDynamicEntries = function() {
+CodeMap.prototype.getAllDynamicEntries = function() {
   return this.dynamics_.exportValues();
 };
 
@@ -218,7 +213,7 @@
 /**
  * Returns an array of all static code entries.
  */
-devtools.profiler.CodeMap.prototype.getAllStaticEntries = function() {
+CodeMap.prototype.getAllStaticEntries = function() {
   return this.statics_.exportValues();
 };
 
@@ -226,7 +221,7 @@
 /**
  * Returns an array of all libraries entries.
  */
-devtools.profiler.CodeMap.prototype.getAllLibrariesEntries = function() {
+CodeMap.prototype.getAllLibrariesEntries = function() {
   return this.libraries_.exportValues();
 };
 
@@ -238,29 +233,29 @@
  * @param {string} opt_name Code entry name.
  * @constructor
  */
-devtools.profiler.CodeMap.CodeEntry = function(size, opt_name) {
+CodeMap.CodeEntry = function(size, opt_name) {
   this.size = size;
   this.name = opt_name || '';
   this.nameUpdated_ = false;
 };
 
 
-devtools.profiler.CodeMap.CodeEntry.prototype.getName = function() {
+CodeMap.CodeEntry.prototype.getName = function() {
   return this.name;
 };
 
 
-devtools.profiler.CodeMap.CodeEntry.prototype.toString = function() {
+CodeMap.CodeEntry.prototype.toString = function() {
   return this.name + ': ' + this.size.toString(16);
 };
 
 
-devtools.profiler.CodeMap.NameGenerator = function() {
+CodeMap.NameGenerator = function() {
   this.knownNames_ = {};
 };
 
 
-devtools.profiler.CodeMap.NameGenerator.prototype.getName = function(name) {
+CodeMap.NameGenerator.prototype.getName = function(name) {
   if (!(name in this.knownNames_)) {
     this.knownNames_[name] = 0;
     return name;
diff --git a/tools/csvparser.js b/tools/csvparser.js
index 6e101e2..c7d46b5 100644
--- a/tools/csvparser.js
+++ b/tools/csvparser.js
@@ -26,15 +26,10 @@
 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
-// Initlialize namespaces.
-var devtools = devtools || {};
-devtools.profiler = devtools.profiler || {};
-
-
 /**
  * Creates a CSV lines parser.
  */
-devtools.profiler.CsvParser = function() {
+function CsvParser() {
 };
 
 
@@ -42,14 +37,14 @@
  * A regex for matching a CSV field.
  * @private
  */
-devtools.profiler.CsvParser.CSV_FIELD_RE_ = /^"((?:[^"]|"")*)"|([^,]*)/;
+CsvParser.CSV_FIELD_RE_ = /^"((?:[^"]|"")*)"|([^,]*)/;
 
 
 /**
  * A regex for matching a double quote.
  * @private
  */
-devtools.profiler.CsvParser.DOUBLE_QUOTE_RE_ = /""/g;
+CsvParser.DOUBLE_QUOTE_RE_ = /""/g;
 
 
 /**
@@ -57,9 +52,9 @@
  *
  * @param {string} line Input line.
  */
-devtools.profiler.CsvParser.prototype.parseLine = function(line) {
-  var fieldRe = devtools.profiler.CsvParser.CSV_FIELD_RE_;
-  var doubleQuoteRe = devtools.profiler.CsvParser.DOUBLE_QUOTE_RE_;
+CsvParser.prototype.parseLine = function(line) {
+  var fieldRe = CsvParser.CSV_FIELD_RE_;
+  var doubleQuoteRe = CsvParser.DOUBLE_QUOTE_RE_;
   var pos = 0;
   var endPos = line.length;
   var fields = [];
diff --git a/tools/gyp/v8.gyp b/tools/gyp/v8.gyp
index 024ecd7..1518567 100644
--- a/tools/gyp/v8.gyp
+++ b/tools/gyp/v8.gyp
@@ -32,6 +32,7 @@
     'gcc_version%': 'unknown',
     'v8_target_arch%': '<(target_arch)',
     'v8_use_snapshot%': 'true',
+    'v8_use_liveobjectlist%': 'false',
   },
   'conditions': [
     ['use_system_v8==0', {
@@ -66,6 +67,14 @@
               }],
             ],
           }],
+          ['v8_use_liveobjectlist=="true"', {
+            'defines': [
+              'ENABLE_DEBUGGER_SUPPORT',
+              'INSPECTOR',
+              'OBJECT_PRINT',
+              'LIVEOBJECTLIST',
+            ],
+          }],
         ],
         'configurations': {
           'Debug': {
@@ -417,6 +426,8 @@
             '../../src/ic-inl.h',
             '../../src/ic.cc',
             '../../src/ic.h',
+            '../../src/inspector.cc',
+            '../../src/inspector.h',
             '../../src/interpreter-irregexp.cc',
             '../../src/interpreter-irregexp.h',
             '../../src/jump-target-inl.h',
@@ -430,8 +441,12 @@
             '../../src/lithium.h',
             '../../src/lithium-allocator.cc',
             '../../src/lithium-allocator.h',
+            '../../src/lithium-allocator-inl.h',
             '../../src/liveedit.cc',
             '../../src/liveedit.h',
+            '../../src/liveobjectlist-inl.h',
+            '../../src/liveobjectlist.cc',
+            '../../src/liveobjectlist.h',
             '../../src/log-inl.h',
             '../../src/log-utils.cc',
             '../../src/log-utils.h',
@@ -451,8 +466,6 @@
             '../../src/objects-visiting.h',
             '../../src/objects.cc',
             '../../src/objects.h',
-            '../../src/oprofile-agent.h',
-            '../../src/oprofile-agent.cc',
             '../../src/parser.cc',
             '../../src/parser.h',
             '../../src/platform.h',
@@ -677,6 +690,8 @@
                 '../../src/x64/jump-target-x64.cc',
                 '../../src/x64/lithium-codegen-x64.cc',
                 '../../src/x64/lithium-codegen-x64.h',
+                '../../src/x64/lithium-gap-resolver-x64.cc',
+                '../../src/x64/lithium-gap-resolver-x64.h',
                 '../../src/x64/lithium-x64.cc',
                 '../../src/x64/lithium-x64.h',
                 '../../src/x64/macro-assembler-x64.cc',
@@ -733,8 +748,7 @@
               'sources': [
                 '../../src/platform-win32.cc',
               ],
-              # 4355, 4800 came from common.vsprops
-              'msvs_disabled_warnings': [4355, 4800],
+              'msvs_disabled_warnings': [4351, 4355, 4800],
               'link_settings':  {
                 'libraries': [ '-lwinmm.lib' ],
               },
diff --git a/tools/logreader.js b/tools/logreader.js
index 50e3aa4..315e721 100644
--- a/tools/logreader.js
+++ b/tools/logreader.js
@@ -29,10 +29,6 @@
  * @fileoverview Log Reader is used to process log file produced by V8.
  */
 
-// Initlialize namespaces
-var devtools = devtools || {};
-devtools.profiler = devtools.profiler || {};
-
 
 /**
  * Base class for processing log files.
@@ -41,7 +37,7 @@
  *     log records.
  * @constructor
  */
-devtools.profiler.LogReader = function(dispatchTable) {
+function LogReader(dispatchTable) {
   /**
    * @type {Array.<Object>}
    */
@@ -55,9 +51,9 @@
 
   /**
    * CSV lines parser.
-   * @type {devtools.profiler.CsvParser}
+   * @type {CsvParser}
    */
-  this.csvParser_ = new devtools.profiler.CsvParser();
+  this.csvParser_ = new CsvParser();
 };
 
 
@@ -66,7 +62,7 @@
  *
  * @param {string} str Error message.
  */
-devtools.profiler.LogReader.prototype.printError = function(str) {
+LogReader.prototype.printError = function(str) {
   // Do nothing.
 };
 
@@ -76,7 +72,7 @@
  *
  * @param {string} chunk A portion of log.
  */
-devtools.profiler.LogReader.prototype.processLogChunk = function(chunk) {
+LogReader.prototype.processLogChunk = function(chunk) {
   this.processLog_(chunk.split('\n'));
 };
 
@@ -86,7 +82,7 @@
  *
  * @param {string} line A line of log.
  */
-devtools.profiler.LogReader.prototype.processLogLine = function(line) {
+LogReader.prototype.processLogLine = function(line) {
   this.processLog_([line]);
 };
 
@@ -99,7 +95,7 @@
  * @param {Array.<string>} stack String representation of a stack.
  * @return {Array.<number>} Processed stack.
  */
-devtools.profiler.LogReader.prototype.processStack = function(pc, func, stack) {
+LogReader.prototype.processStack = function(pc, func, stack) {
   var fullStack = func ? [pc, func] : [pc];
   var prevFrame = pc;
   for (var i = 0, n = stack.length; i < n; ++i) {
@@ -124,7 +120,7 @@
  * @param {!Object} dispatch Dispatch record.
  * @return {boolean} True if dispatch must be skipped.
  */
-devtools.profiler.LogReader.prototype.skipDispatch = function(dispatch) {
+LogReader.prototype.skipDispatch = function(dispatch) {
   return false;
 };
 
@@ -135,7 +131,7 @@
  * @param {Array.<string>} fields Log record.
  * @private
  */
-devtools.profiler.LogReader.prototype.dispatchLogRow_ = function(fields) {
+LogReader.prototype.dispatchLogRow_ = function(fields) {
   // Obtain the dispatch.
   var command = fields[0];
   if (!(command in this.dispatchTable_)) {
@@ -173,7 +169,7 @@
  * @param {Array.<string>} lines Log lines.
  * @private
  */
-devtools.profiler.LogReader.prototype.processLog_ = function(lines) {
+LogReader.prototype.processLog_ = function(lines) {
   for (var i = 0, n = lines.length; i < n; ++i, ++this.lineNum_) {
     var line = lines[i];
     if (!line) {
diff --git a/tools/oprofile/annotate b/tools/oprofile/annotate
deleted file mode 100755
index a6a8545..0000000
--- a/tools/oprofile/annotate
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/sh
-
-# Source common stuff.
-. `cd $(dirname "$0");pwd`/common
-
-opannotate --assembly --session-dir="$OPROFILE_SESSION_DIR" "$shell_exec" "$@"
-
diff --git a/tools/oprofile/common b/tools/oprofile/common
deleted file mode 100755
index fd00207..0000000
--- a/tools/oprofile/common
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/bin/sh
-
-# Determine the session directory to use for oprofile.
-[ "$OPROFILE_SESSION_DIR" ] || OPROFILE_SESSION_DIR=/tmp/oprofv8
-
-# If no executable passed as the first parameter assume V8 release mode shell.
-if [[ -x $1 ]]
-then
-  shell_exec=`readlink -f "$1"`
-  # Any additional parameters are for the oprofile command.
-  shift
-else
-  oprofile_tools_path=`cd $(dirname "$0");pwd`
-  [ "$V8_SHELL_DIR" ] || V8_SHELL_DIR=$oprofile_tools_path/../..
-  shell_exec=$V8_SHELL_DIR/shell
-fi
-
-alias sudo_opcontrol='sudo opcontrol --session-dir="$OPROFILE_SESSION_DIR"'
-
diff --git a/tools/oprofile/dump b/tools/oprofile/dump
deleted file mode 100755
index 17bb0a1..0000000
--- a/tools/oprofile/dump
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/sh
-
-# Source common stuff.
-. `cd $(dirname "$0");pwd`/common
-
-sudo_opcontrol --dump "@$"
-
diff --git a/tools/oprofile/report b/tools/oprofile/report
deleted file mode 100755
index b7f28b9..0000000
--- a/tools/oprofile/report
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/sh
-
-# Source common stuff.
-. `cd $(dirname "$0");pwd`/common
-
-opreport --symbols --session-dir="$OPROFILE_SESSION_DIR" "$shell_exec" "$@"
-
diff --git a/tools/oprofile/reset b/tools/oprofile/reset
deleted file mode 100755
index edb7071..0000000
--- a/tools/oprofile/reset
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/sh
-
-# Source common stuff.
-. `cd $(dirname "$0");pwd`/common
-
-sudo_opcontrol --reset "$@"
-
diff --git a/tools/oprofile/run b/tools/oprofile/run
deleted file mode 100755
index 0a92470..0000000
--- a/tools/oprofile/run
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/bin/sh
-
-# Source common stuff.
-. `cd $(dirname "$0");pwd`/common
-
-# Reset oprofile samples.
-sudo_opcontrol --reset
-
-# Run the executable to profile with the correct arguments.
-"$shell_exec" --oprofile "$@"
-
-# Flush oprofile data including the generated code into ELF binaries.
-sudo_opcontrol --dump
-
diff --git a/tools/oprofile/shutdown b/tools/oprofile/shutdown
deleted file mode 100755
index 8ebb72f..0000000
--- a/tools/oprofile/shutdown
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/sh
-
-# Source common stuff.
-. `cd $(dirname "$0");pwd`/common
-
-sudo_opcontrol --shutdown "$@"
-
diff --git a/tools/oprofile/start b/tools/oprofile/start
deleted file mode 100755
index 059e4b8..0000000
--- a/tools/oprofile/start
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/sh
-
-# Source common stuff.
-. `cd $(dirname "$0");pwd`/common
-
-sudo_opcontrol --start --no-vmlinux "$@"
-
diff --git a/tools/profile.js b/tools/profile.js
index b2de649..03bee83 100644
--- a/tools/profile.js
+++ b/tools/profile.js
@@ -26,27 +26,22 @@
 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
-// Initlialize namespaces
-var devtools = devtools || {};
-devtools.profiler = devtools.profiler || {};
-
-
 /**
  * Creates a profile object for processing profiling-related events
  * and calculating function execution times.
  *
  * @constructor
  */
-devtools.profiler.Profile = function() {
-  this.codeMap_ = new devtools.profiler.CodeMap();
-  this.topDownTree_ = new devtools.profiler.CallTree();
-  this.bottomUpTree_ = new devtools.profiler.CallTree();
+function Profile() {
+  this.codeMap_ = new CodeMap();
+  this.topDownTree_ = new CallTree();
+  this.bottomUpTree_ = new CallTree();
 };
 
 /**
  * Version of profiler log.
  */
-devtools.profiler.Profile.VERSION = 2;
+Profile.VERSION = 2;
 
 
 /**
@@ -55,7 +50,7 @@
  *
  * @param {string} name Function name.
  */
-devtools.profiler.Profile.prototype.skipThisFunction = function(name) {
+Profile.prototype.skipThisFunction = function(name) {
   return false;
 };
 
@@ -66,7 +61,7 @@
  *
  * @enum {number}
  */
-devtools.profiler.Profile.Operation = {
+Profile.Operation = {
   MOVE: 0,
   DELETE: 1,
   TICK: 2
@@ -76,7 +71,7 @@
 /**
  * Called whenever the specified operation has failed finding a function
  * containing the specified address. Should be overriden by subclasses.
- * See the devtools.profiler.Profile.Operation enum for the list of
+ * See the Profile.Operation enum for the list of
  * possible operations.
  *
  * @param {number} operation Operation.
@@ -85,7 +80,7 @@
  *     during stack strace processing, specifies a position of the frame
  *     containing the address.
  */
-devtools.profiler.Profile.prototype.handleUnknownCode = function(
+Profile.prototype.handleUnknownCode = function(
     operation, addr, opt_stackPos) {
 };
 
@@ -97,9 +92,9 @@
  * @param {number} startAddr Starting address.
  * @param {number} endAddr Ending address.
  */
-devtools.profiler.Profile.prototype.addLibrary = function(
+Profile.prototype.addLibrary = function(
     name, startAddr, endAddr) {
-  var entry = new devtools.profiler.CodeMap.CodeEntry(
+  var entry = new CodeMap.CodeEntry(
       endAddr - startAddr, name);
   this.codeMap_.addLibrary(startAddr, entry);
   return entry;
@@ -113,9 +108,9 @@
  * @param {number} startAddr Starting address.
  * @param {number} endAddr Ending address.
  */
-devtools.profiler.Profile.prototype.addStaticCode = function(
+Profile.prototype.addStaticCode = function(
     name, startAddr, endAddr) {
-  var entry = new devtools.profiler.CodeMap.CodeEntry(
+  var entry = new CodeMap.CodeEntry(
       endAddr - startAddr, name);
   this.codeMap_.addStaticCode(startAddr, entry);
   return entry;
@@ -130,9 +125,9 @@
  * @param {number} start Starting address.
  * @param {number} size Code entry size.
  */
-devtools.profiler.Profile.prototype.addCode = function(
+Profile.prototype.addCode = function(
     type, name, start, size) {
-  var entry = new devtools.profiler.Profile.DynamicCodeEntry(size, type, name);
+  var entry = new Profile.DynamicCodeEntry(size, type, name);
   this.codeMap_.addCode(start, entry);
   return entry;
 };
@@ -144,7 +139,7 @@
  * @param {number} aliasAddr Alias address.
  * @param {number} addr Code entry address.
  */
-devtools.profiler.Profile.prototype.addCodeAlias = function(
+Profile.prototype.addCodeAlias = function(
     aliasAddr, addr) {
   var entry = this.codeMap_.findDynamicEntryByStartAddress(addr);
   if (entry) {
@@ -159,11 +154,11 @@
  * @param {number} from Current code entry address.
  * @param {number} to New code entry address.
  */
-devtools.profiler.Profile.prototype.moveCode = function(from, to) {
+Profile.prototype.moveCode = function(from, to) {
   try {
     this.codeMap_.moveCode(from, to);
   } catch (e) {
-    this.handleUnknownCode(devtools.profiler.Profile.Operation.MOVE, from);
+    this.handleUnknownCode(Profile.Operation.MOVE, from);
   }
 };
 
@@ -173,11 +168,11 @@
  *
  * @param {number} start Starting address.
  */
-devtools.profiler.Profile.prototype.deleteCode = function(start) {
+Profile.prototype.deleteCode = function(start) {
   try {
     this.codeMap_.deleteCode(start);
   } catch (e) {
-    this.handleUnknownCode(devtools.profiler.Profile.Operation.DELETE, start);
+    this.handleUnknownCode(Profile.Operation.DELETE, start);
   }
 };
 
@@ -188,7 +183,7 @@
  * @param {number} from Current code entry address.
  * @param {number} to New code entry address.
  */
-devtools.profiler.Profile.prototype.safeMoveDynamicCode = function(from, to) {
+Profile.prototype.safeMoveDynamicCode = function(from, to) {
   if (this.codeMap_.findDynamicEntryByStartAddress(from)) {
     this.codeMap_.moveCode(from, to);
   }
@@ -200,7 +195,7 @@
  *
  * @param {number} start Starting address.
  */
-devtools.profiler.Profile.prototype.safeDeleteDynamicCode = function(start) {
+Profile.prototype.safeDeleteDynamicCode = function(start) {
   if (this.codeMap_.findDynamicEntryByStartAddress(start)) {
     this.codeMap_.deleteCode(start);
   }
@@ -212,7 +207,7 @@
  *
  * @param {number} addr Entry address.
  */
-devtools.profiler.Profile.prototype.findEntry = function(addr) {
+Profile.prototype.findEntry = function(addr) {
   return this.codeMap_.findEntry(addr);
 };
 
@@ -223,7 +218,7 @@
  *
  * @param {Array<number>} stack Stack sample.
  */
-devtools.profiler.Profile.prototype.recordTick = function(stack) {
+Profile.prototype.recordTick = function(stack) {
   var processedStack = this.resolveAndFilterFuncs_(stack);
   this.bottomUpTree_.addPath(processedStack);
   processedStack.reverse();
@@ -237,7 +232,7 @@
  *
  * @param {Array<number>} stack Stack sample.
  */
-devtools.profiler.Profile.prototype.resolveAndFilterFuncs_ = function(stack) {
+Profile.prototype.resolveAndFilterFuncs_ = function(stack) {
   var result = [];
   for (var i = 0; i < stack.length; ++i) {
     var entry = this.codeMap_.findEntry(stack[i]);
@@ -248,7 +243,7 @@
       }
     } else {
       this.handleUnknownCode(
-          devtools.profiler.Profile.Operation.TICK, stack[i], i);
+          Profile.Operation.TICK, stack[i], i);
     }
   }
   return result;
@@ -258,9 +253,9 @@
 /**
  * Performs a BF traversal of the top down call graph.
  *
- * @param {function(devtools.profiler.CallTree.Node)} f Visitor function.
+ * @param {function(CallTree.Node)} f Visitor function.
  */
-devtools.profiler.Profile.prototype.traverseTopDownTree = function(f) {
+Profile.prototype.traverseTopDownTree = function(f) {
   this.topDownTree_.traverse(f);
 };
 
@@ -268,9 +263,9 @@
 /**
  * Performs a BF traversal of the bottom up call graph.
  *
- * @param {function(devtools.profiler.CallTree.Node)} f Visitor function.
+ * @param {function(CallTree.Node)} f Visitor function.
  */
-devtools.profiler.Profile.prototype.traverseBottomUpTree = function(f) {
+Profile.prototype.traverseBottomUpTree = function(f) {
   this.bottomUpTree_.traverse(f);
 };
 
@@ -281,7 +276,7 @@
  *
  * @param {string} opt_label Node label.
  */
-devtools.profiler.Profile.prototype.getTopDownProfile = function(opt_label) {
+Profile.prototype.getTopDownProfile = function(opt_label) {
   return this.getTreeProfile_(this.topDownTree_, opt_label);
 };
 
@@ -292,7 +287,7 @@
  *
  * @param {string} opt_label Node label.
  */
-devtools.profiler.Profile.prototype.getBottomUpProfile = function(opt_label) {
+Profile.prototype.getBottomUpProfile = function(opt_label) {
   return this.getTreeProfile_(this.bottomUpTree_, opt_label);
 };
 
@@ -300,10 +295,10 @@
 /**
  * Helper function for calculating a tree profile.
  *
- * @param {devtools.profiler.Profile.CallTree} tree Call tree.
+ * @param {Profile.CallTree} tree Call tree.
  * @param {string} opt_label Node label.
  */
-devtools.profiler.Profile.prototype.getTreeProfile_ = function(tree, opt_label) {
+Profile.prototype.getTreeProfile_ = function(tree, opt_label) {
   if (!opt_label) {
     tree.computeTotalWeights();
     return tree;
@@ -321,9 +316,9 @@
  *
  * @param {string} opt_label Starting node label.
  */
-devtools.profiler.Profile.prototype.getFlatProfile = function(opt_label) {
-  var counters = new devtools.profiler.CallTree();
-  var rootLabel = opt_label || devtools.profiler.CallTree.ROOT_NODE_LABEL;
+Profile.prototype.getFlatProfile = function(opt_label) {
+  var counters = new CallTree();
+  var rootLabel = opt_label || CallTree.ROOT_NODE_LABEL;
   var precs = {};
   precs[rootLabel] = 0;
   var root = counters.findOrAddChild(rootLabel);
@@ -378,8 +373,8 @@
  * @param {string} name Function name.
  * @constructor
  */
-devtools.profiler.Profile.DynamicCodeEntry = function(size, type, name) {
-  devtools.profiler.CodeMap.CodeEntry.call(this, size, name);
+Profile.DynamicCodeEntry = function(size, type, name) {
+  CodeMap.CodeEntry.call(this, size, name);
   this.type = type;
 };
 
@@ -387,7 +382,7 @@
 /**
  * Returns node name.
  */
-devtools.profiler.Profile.DynamicCodeEntry.prototype.getName = function() {
+Profile.DynamicCodeEntry.prototype.getName = function() {
   var name = this.name;
   if (name.length == 0) {
     name = '<anonymous>';
@@ -402,12 +397,12 @@
 /**
  * Returns raw node name (without type decoration).
  */
-devtools.profiler.Profile.DynamicCodeEntry.prototype.getRawName = function() {
+Profile.DynamicCodeEntry.prototype.getRawName = function() {
   return this.name;
 };
 
 
-devtools.profiler.Profile.DynamicCodeEntry.prototype.isJSFunction = function() {
+Profile.DynamicCodeEntry.prototype.isJSFunction = function() {
   return this.type == "Function" ||
     this.type == "LazyCompile" ||
     this.type == "Script";
@@ -419,28 +414,28 @@
  *
  * @constructor
  */
-devtools.profiler.CallTree = function() {
-  this.root_ = new devtools.profiler.CallTree.Node(
-      devtools.profiler.CallTree.ROOT_NODE_LABEL);
+function CallTree() {
+  this.root_ = new CallTree.Node(
+      CallTree.ROOT_NODE_LABEL);
 };
 
 
 /**
  * The label of the root node.
  */
-devtools.profiler.CallTree.ROOT_NODE_LABEL = '';
+CallTree.ROOT_NODE_LABEL = '';
 
 
 /**
  * @private
  */
-devtools.profiler.CallTree.prototype.totalsComputed_ = false;
+CallTree.prototype.totalsComputed_ = false;
 
 
 /**
  * Returns the tree root.
  */
-devtools.profiler.CallTree.prototype.getRoot = function() {
+CallTree.prototype.getRoot = function() {
   return this.root_;
 };
 
@@ -450,7 +445,7 @@
  *
  * @param {Array<string>} path Call path.
  */
-devtools.profiler.CallTree.prototype.addPath = function(path) {
+CallTree.prototype.addPath = function(path) {
   if (path.length == 0) {
     return;
   }
@@ -470,7 +465,7 @@
  *
  * @param {string} label Child node label.
  */
-devtools.profiler.CallTree.prototype.findOrAddChild = function(label) {
+CallTree.prototype.findOrAddChild = function(label) {
   return this.root_.findOrAddChild(label);
 };
 
@@ -491,8 +486,8 @@
  *
  * @param {string} label The label of the new root node.
  */
-devtools.profiler.CallTree.prototype.cloneSubtree = function(label) {
-  var subTree = new devtools.profiler.CallTree();
+CallTree.prototype.cloneSubtree = function(label) {
+  var subTree = new CallTree();
   this.traverse(function(node, parent) {
     if (!parent && node.label != label) {
       return null;
@@ -508,7 +503,7 @@
 /**
  * Computes total weights in the call graph.
  */
-devtools.profiler.CallTree.prototype.computeTotalWeights = function() {
+CallTree.prototype.computeTotalWeights = function() {
   if (this.totalsComputed_) {
     return;
   }
@@ -529,10 +524,10 @@
  *   return nodeClone;
  * });
  *
- * @param {function(devtools.profiler.CallTree.Node, *)} f Visitor function.
+ * @param {function(CallTree.Node, *)} f Visitor function.
  *    The second parameter is the result of calling 'f' on the parent node.
  */
-devtools.profiler.CallTree.prototype.traverse = function(f) {
+CallTree.prototype.traverse = function(f) {
   var pairsToProcess = new ConsArray();
   pairsToProcess.concat([{node: this.root_, param: null}]);
   while (!pairsToProcess.atEnd()) {
@@ -550,12 +545,12 @@
 /**
  * Performs an indepth call graph traversal.
  *
- * @param {function(devtools.profiler.CallTree.Node)} enter A function called
+ * @param {function(CallTree.Node)} enter A function called
  *     prior to visiting node's children.
- * @param {function(devtools.profiler.CallTree.Node)} exit A function called
+ * @param {function(CallTree.Node)} exit A function called
  *     after visiting node's children.
  */
-devtools.profiler.CallTree.prototype.traverseInDepth = function(enter, exit) {
+CallTree.prototype.traverseInDepth = function(enter, exit) {
   function traverse(node) {
     enter(node);
     node.forEachChild(traverse);
@@ -569,9 +564,9 @@
  * Constructs a call graph node.
  *
  * @param {string} label Node label.
- * @param {devtools.profiler.CallTree.Node} opt_parent Node parent.
+ * @param {CallTree.Node} opt_parent Node parent.
  */
-devtools.profiler.CallTree.Node = function(label, opt_parent) {
+CallTree.Node = function(label, opt_parent) {
   this.label = label;
   this.parent = opt_parent;
   this.children = {};
@@ -583,14 +578,14 @@
  * a call path).
  * @type {number}
  */
-devtools.profiler.CallTree.Node.prototype.selfWeight = 0;
+CallTree.Node.prototype.selfWeight = 0;
 
 
 /**
  * Node total weight (includes weights of all children).
  * @type {number}
  */
-devtools.profiler.CallTree.Node.prototype.totalWeight = 0;
+CallTree.Node.prototype.totalWeight = 0;
 
 
 /**
@@ -598,8 +593,8 @@
  *
  * @param {string} label Child node label.
  */
-devtools.profiler.CallTree.Node.prototype.addChild = function(label) {
-  var child = new devtools.profiler.CallTree.Node(label, this);
+CallTree.Node.prototype.addChild = function(label) {
+  var child = new CallTree.Node(label, this);
   this.children[label] = child;
   return child;
 };
@@ -608,7 +603,7 @@
 /**
  * Computes node's total weight.
  */
-devtools.profiler.CallTree.Node.prototype.computeTotalWeight =
+CallTree.Node.prototype.computeTotalWeight =
     function() {
   var totalWeight = this.selfWeight;
   this.forEachChild(function(child) {
@@ -620,7 +615,7 @@
 /**
  * Returns all node's children as an array.
  */
-devtools.profiler.CallTree.Node.prototype.exportChildren = function() {
+CallTree.Node.prototype.exportChildren = function() {
   var result = [];
   this.forEachChild(function (node) { result.push(node); });
   return result;
@@ -632,7 +627,7 @@
  *
  * @param {string} label Child node label.
  */
-devtools.profiler.CallTree.Node.prototype.findChild = function(label) {
+CallTree.Node.prototype.findChild = function(label) {
   return this.children[label] || null;
 };
 
@@ -643,7 +638,7 @@
  *
  * @param {string} label Child node label.
  */
-devtools.profiler.CallTree.Node.prototype.findOrAddChild = function(label) {
+CallTree.Node.prototype.findOrAddChild = function(label) {
   return this.findChild(label) || this.addChild(label);
 };
 
@@ -651,9 +646,9 @@
 /**
  * Calls the specified function for every child.
  *
- * @param {function(devtools.profiler.CallTree.Node)} f Visitor function.
+ * @param {function(CallTree.Node)} f Visitor function.
  */
-devtools.profiler.CallTree.Node.prototype.forEachChild = function(f) {
+CallTree.Node.prototype.forEachChild = function(f) {
   for (var c in this.children) {
     f(this.children[c]);
   }
@@ -663,9 +658,9 @@
 /**
  * Walks up from the current node up to the call tree root.
  *
- * @param {function(devtools.profiler.CallTree.Node)} f Visitor function.
+ * @param {function(CallTree.Node)} f Visitor function.
  */
-devtools.profiler.CallTree.Node.prototype.walkUpToRoot = function(f) {
+CallTree.Node.prototype.walkUpToRoot = function(f) {
   for (var curr = this; curr != null; curr = curr.parent) {
     f(curr);
   }
@@ -676,9 +671,9 @@
  * Tries to find a node with the specified path.
  *
  * @param {Array<string>} labels The path.
- * @param {function(devtools.profiler.CallTree.Node)} opt_f Visitor function.
+ * @param {function(CallTree.Node)} opt_f Visitor function.
  */
-devtools.profiler.CallTree.Node.prototype.descendToChild = function(
+CallTree.Node.prototype.descendToChild = function(
     labels, opt_f) {
   for (var pos = 0, curr = this; pos < labels.length && curr != null; pos++) {
     var child = curr.findChild(labels[pos]);
diff --git a/tools/profile_view.js b/tools/profile_view.js
index bdea631..e041909 100644
--- a/tools/profile_view.js
+++ b/tools/profile_view.js
@@ -26,18 +26,13 @@
 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
-// Initlialize namespaces
-var devtools = devtools || {};
-devtools.profiler = devtools.profiler || {};
-
-
 /**
  * Creates a Profile View builder object.
  *
  * @param {number} samplingRate Number of ms between profiler ticks.
  * @constructor
  */
-devtools.profiler.ViewBuilder = function(samplingRate) {
+function ViewBuilder(samplingRate) {
   this.samplingRate = samplingRate;
 };
 
@@ -45,11 +40,11 @@
 /**
  * Builds a profile view for the specified call tree.
  *
- * @param {devtools.profiler.CallTree} callTree A call tree.
+ * @param {CallTree} callTree A call tree.
  * @param {boolean} opt_bottomUpViewWeights Whether remapping
  *     of self weights for a bottom up view is needed.
  */
-devtools.profiler.ViewBuilder.prototype.buildView = function(
+ViewBuilder.prototype.buildView = function(
     callTree, opt_bottomUpViewWeights) {
   var head;
   var samplingRate = this.samplingRate;
@@ -80,11 +75,11 @@
 /**
  * Factory method for a profile view.
  *
- * @param {devtools.profiler.ProfileView.Node} head View head node.
- * @return {devtools.profiler.ProfileView} Profile view.
+ * @param {ProfileView.Node} head View head node.
+ * @return {ProfileView} Profile view.
  */
-devtools.profiler.ViewBuilder.prototype.createView = function(head) {
-  return new devtools.profiler.ProfileView(head);
+ViewBuilder.prototype.createView = function(head) {
+  return new ProfileView(head);
 };
 
 
@@ -97,12 +92,12 @@
  *     profile they can be either callees or callers.)
  * @param {number} selfTime Amount of time that application spent in the
  *     corresponding function only.
- * @param {devtools.profiler.ProfileView.Node} head Profile view head.
- * @return {devtools.profiler.ProfileView.Node} Profile view node.
+ * @param {ProfileView.Node} head Profile view head.
+ * @return {ProfileView.Node} Profile view node.
  */
-devtools.profiler.ViewBuilder.prototype.createViewNode = function(
+ViewBuilder.prototype.createViewNode = function(
     funcName, totalTime, selfTime, head) {
-  return new devtools.profiler.ProfileView.Node(
+  return new ProfileView.Node(
       funcName, totalTime, selfTime, head);
 };
 
@@ -111,10 +106,10 @@
  * Creates a Profile View object. It allows to perform sorting
  * and filtering actions on the profile.
  *
- * @param {devtools.profiler.ProfileView.Node} head Head (root) node.
+ * @param {ProfileView.Node} head Head (root) node.
  * @constructor
  */
-devtools.profiler.ProfileView = function(head) {
+function ProfileView(head) {
   this.head = head;
 };
 
@@ -122,11 +117,11 @@
 /**
  * Sorts the profile view using the specified sort function.
  *
- * @param {function(devtools.profiler.ProfileView.Node,
- *     devtools.profiler.ProfileView.Node):number} sortFunc A sorting
+ * @param {function(ProfileView.Node,
+ *     ProfileView.Node):number} sortFunc A sorting
  *     functions. Must comply with Array.sort sorting function requirements.
  */
-devtools.profiler.ProfileView.prototype.sort = function(sortFunc) {
+ProfileView.prototype.sort = function(sortFunc) {
   this.traverse(function (node) {
     node.sortChildren(sortFunc);
   });
@@ -136,9 +131,9 @@
 /**
  * Traverses profile view nodes in preorder.
  *
- * @param {function(devtools.profiler.ProfileView.Node)} f Visitor function.
+ * @param {function(ProfileView.Node)} f Visitor function.
  */
-devtools.profiler.ProfileView.prototype.traverse = function(f) {
+ProfileView.prototype.traverse = function(f) {
   var nodesToTraverse = new ConsArray();
   nodesToTraverse.concat([this.head]);
   while (!nodesToTraverse.atEnd()) {
@@ -159,10 +154,10 @@
  *     profile they can be either callees or callers.)
  * @param {number} selfTime Amount of time that application spent in the
  *     corresponding function only.
- * @param {devtools.profiler.ProfileView.Node} head Profile view head.
+ * @param {ProfileView.Node} head Profile view head.
  * @constructor
  */
-devtools.profiler.ProfileView.Node = function(
+ProfileView.Node = function(
     internalFuncName, totalTime, selfTime, head) {
   this.internalFuncName = internalFuncName;
   this.totalTime = totalTime;
@@ -176,7 +171,7 @@
 /**
  * Returns a share of the function's total time in application's total time.
  */
-devtools.profiler.ProfileView.Node.prototype.__defineGetter__(
+ProfileView.Node.prototype.__defineGetter__(
     'totalPercent',
     function() { return this.totalTime /
       (this.head ? this.head.totalTime : this.totalTime) * 100.0; });
@@ -185,7 +180,7 @@
 /**
  * Returns a share of the function's self time in application's total time.
  */
-devtools.profiler.ProfileView.Node.prototype.__defineGetter__(
+ProfileView.Node.prototype.__defineGetter__(
     'selfPercent',
     function() { return this.selfTime /
       (this.head ? this.head.totalTime : this.totalTime) * 100.0; });
@@ -194,7 +189,7 @@
 /**
  * Returns a share of the function's total time in its parent's total time.
  */
-devtools.profiler.ProfileView.Node.prototype.__defineGetter__(
+ProfileView.Node.prototype.__defineGetter__(
     'parentTotalPercent',
     function() { return this.totalTime /
       (this.parent ? this.parent.totalTime : this.totalTime) * 100.0; });
@@ -203,9 +198,9 @@
 /**
  * Adds a child to the node.
  *
- * @param {devtools.profiler.ProfileView.Node} node Child node.
+ * @param {ProfileView.Node} node Child node.
  */
-devtools.profiler.ProfileView.Node.prototype.addChild = function(node) {
+ProfileView.Node.prototype.addChild = function(node) {
   node.parent = this;
   this.children.push(node);
 };
@@ -214,11 +209,11 @@
 /**
  * Sorts all the node's children recursively.
  *
- * @param {function(devtools.profiler.ProfileView.Node,
- *     devtools.profiler.ProfileView.Node):number} sortFunc A sorting
+ * @param {function(ProfileView.Node,
+ *     ProfileView.Node):number} sortFunc A sorting
  *     functions. Must comply with Array.sort sorting function requirements.
  */
-devtools.profiler.ProfileView.Node.prototype.sortChildren = function(
+ProfileView.Node.prototype.sortChildren = function(
     sortFunc) {
   this.children.sort(sortFunc);
 };
diff --git a/tools/splaytree.js b/tools/splaytree.js
index 7b3af8b..1c9aab9 100644
--- a/tools/splaytree.js
+++ b/tools/splaytree.js
@@ -26,12 +26,6 @@
 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
-// A namespace stub. It will become more clear how to declare it properly
-// during integration of this script into Dev Tools.
-var goog = goog || {};
-goog.structs = goog.structs || {};
-
-
 /**
  * Constructs a Splay tree.  A splay tree is a self-balancing binary
  * search tree with the additional property that recently accessed
@@ -40,23 +34,23 @@
  *
  * @constructor
  */
-goog.structs.SplayTree = function() {
+function SplayTree() {
 };
 
 
 /**
  * Pointer to the root node of the tree.
  *
- * @type {goog.structs.SplayTree.Node}
+ * @type {SplayTree.Node}
  * @private
  */
-goog.structs.SplayTree.prototype.root_ = null;
+SplayTree.prototype.root_ = null;
 
 
 /**
  * @return {boolean} Whether the tree is empty.
  */
-goog.structs.SplayTree.prototype.isEmpty = function() {
+SplayTree.prototype.isEmpty = function() {
   return !this.root_;
 };
 
@@ -70,9 +64,9 @@
  * @param {number} key Key to insert into the tree.
  * @param {*} value Value to insert into the tree.
  */
-goog.structs.SplayTree.prototype.insert = function(key, value) {
+SplayTree.prototype.insert = function(key, value) {
   if (this.isEmpty()) {
-    this.root_ = new goog.structs.SplayTree.Node(key, value);
+    this.root_ = new SplayTree.Node(key, value);
     return;
   }
   // Splay on the key to move the last node on the search path for
@@ -81,7 +75,7 @@
   if (this.root_.key == key) {
     return;
   }
-  var node = new goog.structs.SplayTree.Node(key, value);
+  var node = new SplayTree.Node(key, value);
   if (key > this.root_.key) {
     node.left = this.root_;
     node.right = this.root_.right;
@@ -101,9 +95,9 @@
  * key is not found, an exception is thrown.
  *
  * @param {number} key Key to find and remove from the tree.
- * @return {goog.structs.SplayTree.Node} The removed node.
+ * @return {SplayTree.Node} The removed node.
  */
-goog.structs.SplayTree.prototype.remove = function(key) {
+SplayTree.prototype.remove = function(key) {
   if (this.isEmpty()) {
     throw Error('Key not found: ' + key);
   }
@@ -132,9 +126,9 @@
  * a node with the specified key.
  *
  * @param {number} key Key to find in the tree.
- * @return {goog.structs.SplayTree.Node} Node having the specified key.
+ * @return {SplayTree.Node} Node having the specified key.
  */
-goog.structs.SplayTree.prototype.find = function(key) {
+SplayTree.prototype.find = function(key) {
   if (this.isEmpty()) {
     return null;
   }
@@ -144,9 +138,9 @@
 
 
 /**
- * @return {goog.structs.SplayTree.Node} Node having the minimum key value.
+ * @return {SplayTree.Node} Node having the minimum key value.
  */
-goog.structs.SplayTree.prototype.findMin = function() {
+SplayTree.prototype.findMin = function() {
   if (this.isEmpty()) {
     return null;
   }
@@ -159,9 +153,9 @@
 
 
 /**
- * @return {goog.structs.SplayTree.Node} Node having the maximum key value.
+ * @return {SplayTree.Node} Node having the maximum key value.
  */
-goog.structs.SplayTree.prototype.findMax = function(opt_startNode) {
+SplayTree.prototype.findMax = function(opt_startNode) {
   if (this.isEmpty()) {
     return null;
   }
@@ -174,10 +168,10 @@
 
 
 /**
- * @return {goog.structs.SplayTree.Node} Node having the maximum key value that
+ * @return {SplayTree.Node} Node having the maximum key value that
  *     is less or equal to the specified key value.
  */
-goog.structs.SplayTree.prototype.findGreatestLessThan = function(key) {
+SplayTree.prototype.findGreatestLessThan = function(key) {
   if (this.isEmpty()) {
     return null;
   }
@@ -199,7 +193,7 @@
 /**
  * @return {Array<*>} An array containing all the values of tree's nodes.
  */
-goog.structs.SplayTree.prototype.exportValues = function() {
+SplayTree.prototype.exportValues = function() {
   var result = [];
   this.traverse_(function(node) { result.push(node.value); });
   return result;
@@ -216,7 +210,7 @@
  * @param {number} key Key to splay the tree on.
  * @private
  */
-goog.structs.SplayTree.prototype.splay_ = function(key) {
+SplayTree.prototype.splay_ = function(key) {
   if (this.isEmpty()) {
     return;
   }
@@ -226,7 +220,7 @@
   // will hold the R tree of the algorithm.  Using a dummy node, left
   // and right will always be nodes and we avoid special cases.
   var dummy, left, right;
-  dummy = left = right = new goog.structs.SplayTree.Node(null, null);
+  dummy = left = right = new SplayTree.Node(null, null);
   var current = this.root_;
   while (true) {
     if (key < current.key) {
@@ -281,10 +275,10 @@
 /**
  * Performs a preorder traversal of the tree.
  *
- * @param {function(goog.structs.SplayTree.Node)} f Visitor function.
+ * @param {function(SplayTree.Node)} f Visitor function.
  * @private
  */
-goog.structs.SplayTree.prototype.traverse_ = function(f) {
+SplayTree.prototype.traverse_ = function(f) {
   var nodesToVisit = [this.root_];
   while (nodesToVisit.length > 0) {
     var node = nodesToVisit.shift();
@@ -304,19 +298,19 @@
  * @param {number} key Key.
  * @param {*} value Value.
  */
-goog.structs.SplayTree.Node = function(key, value) {
+SplayTree.Node = function(key, value) {
   this.key = key;
   this.value = value;
 };
 
 
 /**
- * @type {goog.structs.SplayTree.Node}
+ * @type {SplayTree.Node}
  */
-goog.structs.SplayTree.Node.prototype.left = null;
+SplayTree.Node.prototype.left = null;
 
 
 /**
- * @type {goog.structs.SplayTree.Node}
+ * @type {SplayTree.Node}
  */
-goog.structs.SplayTree.Node.prototype.right = null;
+SplayTree.Node.prototype.right = null;
diff --git a/tools/tickprocessor.js b/tools/tickprocessor.js
index 87864d1..db2f3c9 100644
--- a/tools/tickprocessor.js
+++ b/tools/tickprocessor.js
@@ -26,16 +26,21 @@
 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
-function Profile(separateIc) {
-  devtools.profiler.Profile.call(this);
+function inherits(childCtor, parentCtor) {
+  childCtor.prototype.__proto__ = parentCtor.prototype;
+};
+
+
+function V8Profile(separateIc) {
+  Profile.call(this);
   if (!separateIc) {
-    this.skipThisFunction = function(name) { return Profile.IC_RE.test(name); };
+    this.skipThisFunction = function(name) { return V8Profile.IC_RE.test(name); };
   }
 };
-Profile.prototype = devtools.profiler.Profile.prototype;
+inherits(V8Profile, Profile);
 
 
-Profile.IC_RE =
+V8Profile.IC_RE =
     /^(?:CallIC|LoadIC|StoreIC)|(?:Builtin: (?:Keyed)?(?:Call|Load|Store)IC_)/;
 
 
@@ -52,13 +57,8 @@
 }
 
 
-function inherits(childCtor, parentCtor) {
-  childCtor.prototype.__proto__ = parentCtor.prototype;
-};
-
-
 function SnapshotLogProcessor() {
-  devtools.profiler.LogReader.call(this, {
+  LogReader.call(this, {
       'code-creation': {
           parsers: [null, parseInt, parseInt, null],
           processor: this.processCodeCreation },
@@ -72,8 +72,8 @@
       'snapshot-pos': { parsers: [parseInt, parseInt],
           processor: this.processSnapshotPosition }});
 
-  Profile.prototype.handleUnknownCode = function(operation, addr) {
-    var op = devtools.profiler.Profile.Operation;
+  V8Profile.prototype.handleUnknownCode = function(operation, addr) {
+    var op = Profile.Operation;
     switch (operation) {
       case op.MOVE:
         print('Snapshot: Code move event for unknown code: 0x' +
@@ -86,10 +86,10 @@
     }
   };
 
-  this.profile_ = new Profile();
+  this.profile_ = new V8Profile();
   this.serializedEntries_ = [];
 }
-inherits(SnapshotLogProcessor, devtools.profiler.LogReader);
+inherits(SnapshotLogProcessor, LogReader);
 
 
 SnapshotLogProcessor.prototype.processCodeCreation = function(
@@ -127,7 +127,7 @@
 
 function TickProcessor(
     cppEntriesProvider, separateIc, ignoreUnknown, stateFilter, snapshotLogProcessor) {
-  devtools.profiler.LogReader.call(this, {
+  LogReader.call(this, {
       'shared-library': { parsers: [null, parseInt, parseInt],
           processor: this.processSharedLibrary },
       'code-creation': {
@@ -172,9 +172,9 @@
   var ticks = this.ticks_ =
     { total: 0, unaccounted: 0, excluded: 0, gc: 0 };
 
-  Profile.prototype.handleUnknownCode = function(
+  V8Profile.prototype.handleUnknownCode = function(
       operation, addr, opt_stackPos) {
-    var op = devtools.profiler.Profile.Operation;
+    var op = Profile.Operation;
     switch (operation) {
       case op.MOVE:
         print('Code move event for unknown code: 0x' + addr.toString(16));
@@ -193,16 +193,16 @@
     }
   };
 
-  this.profile_ = new Profile(separateIc);
+  this.profile_ = new V8Profile(separateIc);
   this.codeTypes_ = {};
   // Count each tick as a time unit.
-  this.viewBuilder_ = new devtools.profiler.ViewBuilder(1);
+  this.viewBuilder_ = new ViewBuilder(1);
   this.lastLogFileName_ = null;
 
   this.generation_ = 1;
   this.currentProducerProfile_ = null;
 };
-inherits(TickProcessor, devtools.profiler.LogReader);
+inherits(TickProcessor, LogReader);
 
 
 TickProcessor.VmStates = {
@@ -356,7 +356,7 @@
 
 TickProcessor.prototype.processHeapSampleBegin = function(space, state, ticks) {
   if (space != 'Heap') return;
-  this.currentProducerProfile_ = new devtools.profiler.CallTree();
+  this.currentProducerProfile_ = new CallTree();
 };
 
 
diff --git a/tools/v8.xcodeproj/project.pbxproj b/tools/v8.xcodeproj/project.pbxproj
index b994d36..24321e5 100644
--- a/tools/v8.xcodeproj/project.pbxproj
+++ b/tools/v8.xcodeproj/project.pbxproj
@@ -47,6 +47,7 @@
 		890A14020EE9C4B400E49346 /* regexp-macro-assembler-irregexp.cc in Sources */ = {isa = PBXBuildFile; fileRef = 89A15C750EE466D000B48DEB /* regexp-macro-assembler-irregexp.cc */; };
 		890A14030EE9C4B500E49346 /* regexp-macro-assembler-tracer.cc in Sources */ = {isa = PBXBuildFile; fileRef = 89A15C770EE466D000B48DEB /* regexp-macro-assembler-tracer.cc */; };
 		890A14040EE9C4B700E49346 /* regexp-macro-assembler.cc in Sources */ = {isa = PBXBuildFile; fileRef = 89A15C790EE466D000B48DEB /* regexp-macro-assembler.cc */; };
+		8924315C12F8539900906AB2 /* lithium-gap-resolver-x64.cc in Sources */ = {isa = PBXBuildFile; fileRef = 8924315A12F8539900906AB2 /* lithium-gap-resolver-x64.cc */; };
 		8938A2A312D63B630080CDDE /* lithium-x64.cc in Sources */ = {isa = PBXBuildFile; fileRef = 8938A2A212D63B630080CDDE /* lithium-x64.cc */; };
 		893988070F2A35FA007D5254 /* libv8.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 8970F2F00E719FB2006AE7B5 /* libv8.a */; };
 		8939880D0F2A362A007D5254 /* d8.cc in Sources */ = {isa = PBXBuildFile; fileRef = 89A15C920EE46A1700B48DEB /* d8.cc */; };
@@ -156,7 +157,6 @@
 		8956926612D4ED240072C313 /* messages.cc in Sources */ = {isa = PBXBuildFile; fileRef = 897FF15C0E719B8F00D62E90 /* messages.cc */; };
 		8956926712D4ED240072C313 /* objects-debug.cc in Sources */ = {isa = PBXBuildFile; fileRef = 897FF1600E719B8F00D62E90 /* objects-debug.cc */; };
 		8956926812D4ED240072C313 /* objects.cc in Sources */ = {isa = PBXBuildFile; fileRef = 897FF1620E719B8F00D62E90 /* objects.cc */; };
-		8956926912D4ED240072C313 /* oprofile-agent.cc in Sources */ = {isa = PBXBuildFile; fileRef = 9FC86ABB0F5FEDAC00F22668 /* oprofile-agent.cc */; };
 		8956926A12D4ED240072C313 /* parser.cc in Sources */ = {isa = PBXBuildFile; fileRef = 897FF1640E719B8F00D62E90 /* parser.cc */; };
 		8956926B12D4ED240072C313 /* platform-macos.cc in Sources */ = {isa = PBXBuildFile; fileRef = 897FF1670E719B8F00D62E90 /* platform-macos.cc */; };
 		8956926C12D4ED240072C313 /* platform-posix.cc in Sources */ = {isa = PBXBuildFile; fileRef = 893A72230F7B0FF200303DD2 /* platform-posix.cc */; };
@@ -319,6 +319,13 @@
 		89B91BFB12D4F1BB002FF4BC /* libv8-x64.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 895692AA12D4ED240072C313 /* libv8-x64.a */; };
 		89B933AF0FAA0F9600201304 /* version.cc in Sources */ = {isa = PBXBuildFile; fileRef = 897FF32F0FAA0ED200136CF6 /* version.cc */; };
 		89B933B00FAA0F9D00201304 /* version.cc in Sources */ = {isa = PBXBuildFile; fileRef = 897FF32F0FAA0ED200136CF6 /* version.cc */; };
+		89D7DDD512E8DDCF001E2B82 /* lithium-gap-resolver-ia32.cc in Sources */ = {isa = PBXBuildFile; fileRef = 89D7DDD312E8DDCF001E2B82 /* lithium-gap-resolver-ia32.cc */; };
+		89D7DDDA12E8DE09001E2B82 /* gdb-jit.cc in Sources */ = {isa = PBXBuildFile; fileRef = 89D7DDD612E8DE09001E2B82 /* gdb-jit.cc */; };
+		89D7DDDB12E8DE09001E2B82 /* inspector.cc in Sources */ = {isa = PBXBuildFile; fileRef = 89D7DDD812E8DE09001E2B82 /* inspector.cc */; };
+		89D7DDDC12E8DE09001E2B82 /* gdb-jit.cc in Sources */ = {isa = PBXBuildFile; fileRef = 89D7DDD612E8DE09001E2B82 /* gdb-jit.cc */; };
+		89D7DDDD12E8DE09001E2B82 /* inspector.cc in Sources */ = {isa = PBXBuildFile; fileRef = 89D7DDD812E8DE09001E2B82 /* inspector.cc */; };
+		89D7DDDE12E8DE09001E2B82 /* gdb-jit.cc in Sources */ = {isa = PBXBuildFile; fileRef = 89D7DDD612E8DE09001E2B82 /* gdb-jit.cc */; };
+		89D7DDDF12E8DE09001E2B82 /* inspector.cc in Sources */ = {isa = PBXBuildFile; fileRef = 89D7DDD812E8DE09001E2B82 /* inspector.cc */; };
 		89F23C3F0E78D5B2006B2466 /* accessors.cc in Sources */ = {isa = PBXBuildFile; fileRef = 897FF0F60E719B8F00D62E90 /* accessors.cc */; };
 		89F23C400E78D5B2006B2466 /* allocation.cc in Sources */ = {isa = PBXBuildFile; fileRef = 897FF0F80E719B8F00D62E90 /* allocation.cc */; };
 		89F23C410E78D5B2006B2466 /* api.cc in Sources */ = {isa = PBXBuildFile; fileRef = 897FF0FA0E719B8F00D62E90 /* api.cc */; };
@@ -419,8 +426,6 @@
 		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 */; };
-		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 */; };
@@ -556,6 +561,8 @@
 		58950D5A0F55514900F3E8BA /* virtual-frame.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = "virtual-frame.cc"; sourceTree = "<group>"; };
 		58950D5B0F55514900F3E8BA /* virtual-frame.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "virtual-frame.h"; sourceTree = "<group>"; };
 		8900116B0E71CA2300F91F35 /* libraries.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = libraries.cc; sourceTree = "<group>"; };
+		8924315A12F8539900906AB2 /* lithium-gap-resolver-x64.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = "lithium-gap-resolver-x64.cc"; path = "x64/lithium-gap-resolver-x64.cc"; sourceTree = "<group>"; };
+		8924315B12F8539900906AB2 /* lithium-gap-resolver-x64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "lithium-gap-resolver-x64.h"; path = "x64/lithium-gap-resolver-x64.h"; sourceTree = "<group>"; };
 		8938A2A212D63B630080CDDE /* lithium-x64.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = "lithium-x64.cc"; path = "x64/lithium-x64.cc"; sourceTree = "<group>"; };
 		893986D40F29020C007D5254 /* apiutils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = apiutils.h; sourceTree = "<group>"; };
 		8939880B0F2A35FA007D5254 /* d8 */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = d8; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -886,6 +893,12 @@
 		89B91B9A12D4EF95002FF4BC /* virtual-frame-x64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "virtual-frame-x64.h"; path = "x64/virtual-frame-x64.h"; sourceTree = "<group>"; };
 		89B91BBE12D4F02A002FF4BC /* v8_shell-x64 */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "v8_shell-x64"; sourceTree = BUILT_PRODUCTS_DIR; };
 		89B91BCE12D4F02A002FF4BC /* d8-x64 */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "d8-x64"; sourceTree = BUILT_PRODUCTS_DIR; };
+		89D7DDD312E8DDCF001E2B82 /* lithium-gap-resolver-ia32.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = "lithium-gap-resolver-ia32.cc"; path = "ia32/lithium-gap-resolver-ia32.cc"; sourceTree = "<group>"; };
+		89D7DDD412E8DDCF001E2B82 /* lithium-gap-resolver-ia32.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "lithium-gap-resolver-ia32.h"; path = "ia32/lithium-gap-resolver-ia32.h"; sourceTree = "<group>"; };
+		89D7DDD612E8DE09001E2B82 /* gdb-jit.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = "gdb-jit.cc"; sourceTree = "<group>"; };
+		89D7DDD712E8DE09001E2B82 /* gdb-jit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "gdb-jit.h"; sourceTree = "<group>"; };
+		89D7DDD812E8DE09001E2B82 /* inspector.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = inspector.cc; sourceTree = "<group>"; };
+		89D7DDD912E8DE09001E2B82 /* inspector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = inspector.h; sourceTree = "<group>"; };
 		89F23C870E78D5B2006B2466 /* libv8-arm.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libv8-arm.a"; sourceTree = BUILT_PRODUCTS_DIR; };
 		89F23C950E78D5B6006B2466 /* v8_shell-arm */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "v8_shell-arm"; sourceTree = BUILT_PRODUCTS_DIR; };
 		89F3605A12DCDF6400ACF8A6 /* lithium-codegen-x64.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = "lithium-codegen-x64.cc"; path = "x64/lithium-codegen-x64.cc"; sourceTree = "<group>"; };
@@ -936,8 +949,6 @@
 		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>"; };
-		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>"; };
 		9FF7A28311A642EA0051B8F2 /* unbound-queue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "unbound-queue.h"; sourceTree = "<group>"; };
 		C2BD4BD5120165460046BF9F /* dtoa.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = dtoa.cc; sourceTree = "<group>"; };
@@ -1101,7 +1112,6 @@
 				897FF1270E719B8F00D62E90 /* dateparser.h */,
 				8956B6CD0F5D86570033B5A2 /* debug-agent.cc */,
 				8956B6CE0F5D86570033B5A2 /* debug-agent.h */,
-				898BD20C0EF6CC850068B00A /* debug-arm.cc */,
 				897FF1280E719B8F00D62E90 /* debug.cc */,
 				897FF1290E719B8F00D62E90 /* debug.h */,
 				893E248B12B14B3D0083370F /* deoptimizer.cc */,
@@ -1141,6 +1151,8 @@
 				9F92FAA80F8F28AD0089F02C /* func-name-inferrer.h */,
 				893E24DA12B14B9F0083370F /* gc-extension.cc */,
 				893E24DB12B14B9F0083370F /* gc-extension.h */,
+				89D7DDD612E8DE09001E2B82 /* gdb-jit.cc */,
+				89D7DDD712E8DE09001E2B82 /* gdb-jit.h */,
 				897FF13E0E719B8F00D62E90 /* global-handles.cc */,
 				897FF13F0E719B8F00D62E90 /* global-handles.h */,
 				897FF1400E719B8F00D62E90 /* globals.h */,
@@ -1158,10 +1170,11 @@
 				893E248E12B14B3D0083370F /* hydrogen-instructions.h */,
 				893E248F12B14B3D0083370F /* hydrogen.cc */,
 				893E249012B14B3D0083370F /* hydrogen.h */,
-				897FF1490E719B8F00D62E90 /* ic-arm.cc */,
 				897FF14B0E719B8F00D62E90 /* ic-inl.h */,
 				897FF14C0E719B8F00D62E90 /* ic.cc */,
 				897FF14D0E719B8F00D62E90 /* ic.h */,
+				89D7DDD812E8DE09001E2B82 /* inspector.cc */,
+				89D7DDD912E8DE09001E2B82 /* inspector.h */,
 				89A15C660EE4665300B48DEB /* interpreter-irregexp.cc */,
 				89A15C670EE4665300B48DEB /* interpreter-irregexp.h */,
 				897FF14E0E719B8F00D62E90 /* jsregexp.cc */,
@@ -1203,8 +1216,6 @@
 				C2D1E9721212F27B00187A52 /* objects-visiting.h */,
 				897FF1620E719B8F00D62E90 /* objects.cc */,
 				897FF1630E719B8F00D62E90 /* objects.h */,
-				9FC86ABB0F5FEDAC00F22668 /* oprofile-agent.cc */,
-				9FC86ABC0F5FEDAC00F22668 /* oprofile-agent.h */,
 				897FF1640E719B8F00D62E90 /* parser.cc */,
 				897FF1650E719B8F00D62E90 /* parser.h */,
 				89A15C6D0EE466A900B48DEB /* platform-freebsd.cc */,
@@ -1273,7 +1284,6 @@
 				897FF1890E719B8F00D62E90 /* string-stream.h */,
 				893E24A312B14B3D0083370F /* strtod.cc */,
 				893E24A412B14B3D0083370F /* strtod.h */,
-				897FF18A0E719B8F00D62E90 /* stub-cache-arm.cc */,
 				897FF18C0E719B8F00D62E90 /* stub-cache.cc */,
 				897FF18D0E719B8F00D62E90 /* stub-cache.h */,
 				897FF18E0E719B8F00D62E90 /* token.cc */,
@@ -1442,6 +1452,8 @@
 				89B91B8C12D4EF95002FF4BC /* jump-target-x64.cc */,
 				89F3605A12DCDF6400ACF8A6 /* lithium-codegen-x64.cc */,
 				89B91B8D12D4EF95002FF4BC /* lithium-codegen-x64.h */,
+				8924315A12F8539900906AB2 /* lithium-gap-resolver-x64.cc */,
+				8924315B12F8539900906AB2 /* lithium-gap-resolver-x64.h */,
 				8938A2A212D63B630080CDDE /* lithium-x64.cc */,
 				89B91B8E12D4EF95002FF4BC /* lithium-x64.h */,
 				89B91B8F12D4EF95002FF4BC /* macro-assembler-x64.cc */,
@@ -1463,6 +1475,8 @@
 		89B91C0312D4F275002FF4BC /* ia32 */ = {
 			isa = PBXGroup;
 			children = (
+				89D7DDD312E8DDCF001E2B82 /* lithium-gap-resolver-ia32.cc */,
+				89D7DDD412E8DDCF001E2B82 /* lithium-gap-resolver-ia32.h */,
 				897FF1000E719B8F00D62E90 /* assembler-ia32-inl.h */,
 				897FF1010E719B8F00D62E90 /* assembler-ia32.cc */,
 				897FF1020E719B8F00D62E90 /* assembler-ia32.h */,
@@ -1515,8 +1529,10 @@
 				896448BC0E9D530500E7C516 /* codegen-arm.h */,
 				895FA748107FFE73006F39D4 /* constants-arm.cc */,
 				897FF11B0E719B8F00D62E90 /* constants-arm.h */,
+				898BD20C0EF6CC850068B00A /* debug-arm.cc */,
 				893E24C612B14B510083370F /* deoptimizer-arm.cc */,
 				9FA38BCB1175B30400C4CD55 /* full-codegen-arm.cc */,
+				897FF1490E719B8F00D62E90 /* ic-arm.cc */,
 				9FA38BCC1175B30400C4CD55 /* jump-target-arm.cc */,
 				893E24C712B14B510083370F /* lithium-arm.cc */,
 				893E24C812B14B510083370F /* lithium-arm.h */,
@@ -1531,6 +1547,7 @@
 				895FA751107FFEAE006F39D4 /* register-allocator-arm.h */,
 				897FF17D0E719B8F00D62E90 /* simulator-arm.cc */,
 				897FF17E0E719B8F00D62E90 /* simulator-arm.h */,
+				897FF18A0E719B8F00D62E90 /* stub-cache-arm.cc */,
 				893E24CB12B14B520083370F /* virtual-frame-arm-inl.h */,
 				9FA38BCD1175B30400C4CD55 /* virtual-frame-arm.cc */,
 				58950D570F55514900F3E8BA /* virtual-frame-arm.h */,
@@ -1882,7 +1899,6 @@
 				8956926612D4ED240072C313 /* messages.cc in Sources */,
 				8956926712D4ED240072C313 /* objects-debug.cc in Sources */,
 				8956926812D4ED240072C313 /* objects.cc in Sources */,
-				8956926912D4ED240072C313 /* oprofile-agent.cc in Sources */,
 				8956926A12D4ED240072C313 /* parser.cc in Sources */,
 				8956926B12D4ED240072C313 /* platform-macos.cc in Sources */,
 				8956926C12D4ED240072C313 /* platform-posix.cc in Sources */,
@@ -1958,6 +1974,9 @@
 				8938A2A312D63B630080CDDE /* lithium-x64.cc in Sources */,
 				894A59E912D777E80000766D /* lithium.cc in Sources */,
 				89F3605B12DCDF6400ACF8A6 /* lithium-codegen-x64.cc in Sources */,
+				89D7DDDE12E8DE09001E2B82 /* gdb-jit.cc in Sources */,
+				89D7DDDF12E8DE09001E2B82 /* inspector.cc in Sources */,
+				8924315C12F8539900906AB2 /* lithium-gap-resolver-x64.cc in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -2029,7 +2048,6 @@
 				89A88E120E71A67A0043BA31 /* messages.cc in Sources */,
 				89A88E130E71A6860043BA31 /* objects-debug.cc in Sources */,
 				89A88E140E71A6870043BA31 /* objects.cc in Sources */,
-				9FC86ABD0F5FEDAC00F22668 /* oprofile-agent.cc in Sources */,
 				89A88E150E71A68C0043BA31 /* parser.cc in Sources */,
 				89A88E160E71A68E0043BA31 /* platform-macos.cc in Sources */,
 				893A72240F7B101400303DD2 /* platform-posix.cc in Sources */,
@@ -2093,6 +2111,9 @@
 				893E24DD12B14B9F0083370F /* gc-extension.cc in Sources */,
 				8946827512C26EB700C914BC /* objects-printer.cc in Sources */,
 				894A59EB12D777E80000766D /* lithium.cc in Sources */,
+				89D7DDD512E8DDCF001E2B82 /* lithium-gap-resolver-ia32.cc in Sources */,
+				89D7DDDA12E8DE09001E2B82 /* gdb-jit.cc in Sources */,
+				89D7DDDB12E8DE09001E2B82 /* inspector.cc in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -2203,7 +2224,6 @@
 				89F23C660E78D5B2006B2466 /* messages.cc in Sources */,
 				89F23C670E78D5B2006B2466 /* objects-debug.cc in Sources */,
 				89F23C680E78D5B2006B2466 /* objects.cc in Sources */,
-				9FC86ABE0F5FEDAC00F22668 /* oprofile-agent.cc in Sources */,
 				89F23C690E78D5B2006B2466 /* parser.cc in Sources */,
 				89F23C6A0E78D5B2006B2466 /* platform-macos.cc in Sources */,
 				893A72250F7B101B00303DD2 /* platform-posix.cc in Sources */,
@@ -2268,6 +2288,8 @@
 				893E24DF12B14B9F0083370F /* gc-extension.cc in Sources */,
 				8946827612C26EB700C914BC /* objects-printer.cc in Sources */,
 				894A59EA12D777E80000766D /* lithium.cc in Sources */,
+				89D7DDDC12E8DE09001E2B82 /* gdb-jit.cc in Sources */,
+				89D7DDDD12E8DE09001E2B82 /* inspector.cc in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -2395,6 +2417,7 @@
 					V8_ENABLE_CHECKS,
 					OBJECT_PRINT,
 					ENABLE_VMSTATE_TRACKING,
+					ENABLE_DEBUGGER_SUPPORT,
 				);
 				GCC_SYMBOLS_PRIVATE_EXTERN = YES;
 				GCC_TREAT_WARNINGS_AS_ERRORS = YES;
@@ -2434,6 +2457,7 @@
 				GCC_PREPROCESSOR_DEFINITIONS = (
 					"$(GCC_PREPROCESSOR_DEFINITIONS)",
 					NDEBUG,
+					ENABLE_DEBUGGER_SUPPORT,
 				);
 				GCC_SYMBOLS_PRIVATE_EXTERN = YES;
 				GCC_TREAT_WARNINGS_AS_ERRORS = NO;
diff --git a/tools/visual_studio/common.vsprops b/tools/visual_studio/common.vsprops
index 20bb119..fa78cdc 100644
--- a/tools/visual_studio/common.vsprops
+++ b/tools/visual_studio/common.vsprops
@@ -16,7 +16,7 @@
 		WarnAsError="true"
 		Detect64BitPortabilityProblems="false"
 		DebugInformationFormat="3"
-		DisableSpecificWarnings="4355;4800"
+		DisableSpecificWarnings="4351;4355;4800"
 		EnableFunctionLevelLinking="true"
 	/>
 	<Tool
diff --git a/tools/visual_studio/v8_base.vcproj b/tools/visual_studio/v8_base.vcproj
index ceeebf9..5f76069 100644
--- a/tools/visual_studio/v8_base.vcproj
+++ b/tools/visual_studio/v8_base.vcproj
@@ -689,6 +689,14 @@
         >
       </File>
       <File
+        RelativePath="..\..\src\lithium.cc"
+        >
+      </File>
+      <File
+        RelativePath="..\..\src\lithium.h"
+        >
+      </File>
+       <File
         RelativePath="..\..\src\lithium-allocator.cc"
         >
       </File>
@@ -697,6 +705,10 @@
         >
       </File>
       <File
+        RelativePath="..\..\src\lithium-allocator-inl.h"
+        >
+      </File>
+      <File
         RelativePath="..\..\src\ia32\lithium-ia32.cc"
         >
       </File>
@@ -713,6 +725,14 @@
         >
       </File>
       <File
+        RelativePath="..\..\src\ia32\lithium-gap-resolver-ia32.cc"
+        >
+      </File>
+      <File
+        RelativePath="..\..\src\ia32\lithium-gap-resolver-ia32.h"
+        >
+      </File>
+      <File
         RelativePath="..\..\src\liveedit.cc"
         >
       </File>
@@ -814,14 +834,6 @@
         >
       </File>
       <File
-        RelativePath="..\..\src\oprofile-agent.cc"
-        >
-      </File>
-      <File
-        RelativePath="..\..\src\oprofile-agent.h"
-        >
-      </File>
-      <File
         RelativePath="..\..\src\parser.cc"
         >
       </File>
diff --git a/tools/visual_studio/v8_base_arm.vcproj b/tools/visual_studio/v8_base_arm.vcproj
index cd4c52e..feb7e6c 100644
--- a/tools/visual_studio/v8_base_arm.vcproj
+++ b/tools/visual_studio/v8_base_arm.vcproj
@@ -697,6 +697,10 @@
         >
       </File>
       <File
+        RelativePath="..\..\src\lithium-allocator-inl.h"
+        >
+      </File>
+      <File
         RelativePath="..\..\src\arm\lithium-arm.cc"
         >
       </File>
@@ -812,14 +816,6 @@
         >
       </File>
       <File
-        RelativePath="..\..\src\oprofile-agent.cc"
-        >
-      </File>
-      <File
-        RelativePath="..\..\src\oprofile-agent.h"
-        >
-      </File>
-      <File
         RelativePath="..\..\src\parser.cc"
         >
       </File>
diff --git a/tools/visual_studio/v8_base_x64.vcproj b/tools/visual_studio/v8_base_x64.vcproj
index 2c7bf5e..14ed77e 100644
--- a/tools/visual_studio/v8_base_x64.vcproj
+++ b/tools/visual_studio/v8_base_x64.vcproj
@@ -493,14 +493,6 @@
         >
       </File>
       <File
-        RelativePath="..\..\src\flow-graph.cc"
-        >
-      </File>
-      <File
-        RelativePath="..\..\src\flow-graph.h"
-        >
-      </File>
-      <File
         RelativePath="..\..\src\frame-element.cc"
         >
       </File>
@@ -610,6 +602,22 @@
         >
       </File>
       <File
+        RelativePath="..\..\src\hydrogen.cc"
+        >
+      </File>
+      <File
+        RelativePath="..\..\src\hydrogen.h"
+        >
+      </File>
+      <File
+        RelativePath="..\..\src\hydrogen-instructions.cc"
+        >
+      </File>
+      <File
+        RelativePath="..\..\src\hydrogen-instructions.h"
+        >
+      </File>
+      <File
         RelativePath="..\..\src\x64\ic-x64.cc"
         >
       </File>
@@ -682,6 +690,14 @@
         >
       </File>
       <File
+        RelativePath="..\..\src\lithium.cc"
+        >
+      </File>
+      <File
+        RelativePath="..\..\src\lithium.h"
+        >
+      </File>
+       <File
         RelativePath="..\..\src\lithium-allocator.cc"
         >
       </File>
@@ -690,6 +706,34 @@
         >
       </File>
       <File
+        RelativePath="..\..\src\lithium-allocator-inl.h"
+        >
+      </File>
+      <File
+        RelativePath="..\..\src\x64\lithium-x64.cc"
+        >
+      </File>
+      <File
+        RelativePath="..\..\src\x64\lithium-x64.h"
+        >
+      </File>
+      <File
+        RelativePath="..\..\src\x64\lithium-codegen-x64.cc"
+        >
+      </File>
+      <File
+        RelativePath="..\..\src\x64\lithium-codegen-x64.h"
+        >
+      </File>
+      <File
+        RelativePath="..\..\src\x64\lithium-gap-resolver-x64.cc"
+        >
+      </File>
+      <File
+        RelativePath="..\..\src\x64\lithium-gap-resolver-x64.h"
+        >
+      </File>
+      <File
         RelativePath="..\..\src\liveedit.cc"
         >
       </File>
@@ -790,14 +834,6 @@
         >
       </File>
       <File
-        RelativePath="..\..\src\oprofile-agent.cc"
-        >
-      </File>
-      <File
-        RelativePath="..\..\src\oprofile-agent.h"
-        >
-      </File>
-      <File
         RelativePath="..\..\src\parser.cc"
         >
       </File>
@@ -806,6 +842,22 @@
         >
       </File>
       <File
+        RelativePath="..\..\src\preparser.cc"
+        >
+      </File>
+      <File
+        RelativePath="..\..\src\preparser.h"
+        >
+      </File>
+      <File
+        RelativePath="..\..\src\preparse-data.cc"
+        >
+      </File>
+      <File
+        RelativePath="..\..\src\preparse-data.h"
+        >
+      </File>
+      <File
         RelativePath="..\..\src\profile-generator.cc"
         >
       </File>
@@ -930,6 +982,14 @@
         >
       </File>
       <File
+        RelativePath="..\..\src\scanner-base.cc"
+        >
+      </File>
+      <File
+        RelativePath="..\..\src\scanner-base.h"
+        >
+      </File>
+      <File
         RelativePath="..\..\src\scanner.cc"
         >
       </File>
@@ -1086,6 +1146,14 @@
         >
       </File>
       <File
+        RelativePath="..\..\src\v8checks.h"
+        >
+      </File>
+      <File
+        RelativePath="..\..\src\v8globals.h"
+        >
+      </File>
+      <File
         RelativePath="..\..\src\v8threads.cc"
         >
       </File>
@@ -1094,6 +1162,10 @@
         >
       </File>
       <File
+        RelativePath="..\..\src\v8utils.h"
+        >
+      </File>
+      <File
         RelativePath="..\..\src\variables.cc"
         >
       </File>
@@ -1157,6 +1229,22 @@
         RelativePath="..\..\src\zone.h"
         >
       </File>
+      <File
+        RelativePath="..\..\src\extensions\externalize-string-extension.cc"
+        >
+      </File>
+      <File
+        RelativePath="..\..\src\extensions\externalize-string-extension.h"
+        >
+      </File>
+      <File
+        RelativePath="..\..\src\extensions\gc-extension.cc"
+        >
+      </File>
+      <File
+        RelativePath="..\..\src\extensions\gc-extension.h"
+        >
+      </File>
       <Filter
         Name="third party"
         >
@@ -1197,6 +1285,10 @@
         RelativePath="..\..\include\v8.h"
         >
       </File>
+      <File
+        RelativePath="..\..\include\v8stdint.h"
+        >
+      </File>
     </Filter>
   </Files>
   <Globals>