Commit 4d8ea714 authored by kasperl@chromium.org's avatar kasperl@chromium.org

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. 
Review URL: http://codereview.chromium.org/42597

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1606 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 36853c83
......@@ -139,6 +139,7 @@ void CpuFeatures::Probe() {
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();
......
......@@ -75,12 +75,12 @@ class SplayTree(object):
"""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:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment