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
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();
"""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: