Reviewers: Mikhail Naganov,

Description:
Make sure to generate a CodeCreateEvent for the CPU features
probe code object, and really raise an exception if SplayTree.Remove
is called with a key that cannot be found.

Please review this at http://codereview.chromium.org/42597

SVN Base: http://v8.googlecode.com/svn/branches/bleeding_edge/

Affected files:
   M     src/assembler-ia32.cc
   M     tools/splaytree.py


Index: tools/splaytree.py
===================================================================
--- tools/splaytree.py  (revision 1604)
+++ tools/splaytree.py  (working copy)
@@ -75,12 +75,12 @@
      """Remove the node with the given key from the SplayTree."""
      # Raise exception for key that is not found if the tree is empty.
      if self.IsEmpty():
-      raise 'KeyNotFound'
+      raise Exception('KeyNotFound')
      # Splay on the key to move the node with the given key to the top.
      self.Splay(key)
      # Raise exception for key that is not found.
      if self.root.key != key:
-      raise 'KeyNotFound'
+      raise Exception('KeyNotFound')
      removed = self.root
      # Link out the root node.
      if not self.root.left:
Index: src/assembler-ia32.cc
===================================================================
--- src/assembler-ia32.cc       (revision 1604)
+++ src/assembler-ia32.cc       (working copy)
@@ -139,6 +139,7 @@
    Object* code =
        Heap::CreateCode(desc, NULL, Code::ComputeFlags(Code::STUB), NULL);
    if (!code->IsCode()) return;
+  LOG(CodeCreateEvent("Builtin", Code::cast(code), "CpuFeatures::Probe"));
    typedef uint64_t (*F0)();
    F0 probe = FUNCTION_CAST<F0>(Code::cast(code)->entry());
    supported_ = probe();



--~--~---------~--~----~------------~-------~--~----~
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to