Reviewers: danno,

Description:
Filter transitions while searching for CONSTANT_FUNCTION property in
Call::ComputeTarget.

Otherwise transition will hide CONSTANT_FUNCTION property with the same name
residing on the prototype.

[email protected]
BUG=v8:1883


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

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

Affected files:
  M src/ast.cc


Index: src/ast.cc
diff --git a/src/ast.cc b/src/ast.cc
index 079335622a9a4f89e58a0d46f3bd1e97c411f82d..2e26999c8cf177d4383d9429f3f51416e4d2d78a 100644
--- a/src/ast.cc
+++ b/src/ast.cc
@@ -748,7 +748,8 @@ bool Call::ComputeTarget(Handle<Map> type, Handle<String> name) {
     type->LookupInDescriptors(NULL, *name, &lookup);
     // If the function wasn't found directly in the map, we start
     // looking upwards through the prototype chain.
-    if (!lookup.IsFound() && type->prototype()->IsJSObject()) {
+    if ((!lookup.IsFound() || IsTransitionType(lookup.type()))
+        && type->prototype()->IsJSObject()) {
       holder_ = Handle<JSObject>(JSObject::cast(type->prototype()));
       type = Handle<Map>(holder()->map());
     } else if (lookup.IsProperty() && lookup.type() == CONSTANT_FUNCTION) {


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

Reply via email to