Move assertions to not take case to check that it's safe to omit CheckPrototypes in this case.

Review URL: http://codereview.chromium.org/2279005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4740 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
antonm@chromium.org 2010-05-27 11:16:04 +00:00
parent 7bfe569088
commit 0dd031aa01
3 changed files with 6 additions and 3 deletions

View File

@ -789,11 +789,12 @@ class CallInterceptorCompiler BASE_EMBEDDED {
stub_compiler_->CheckPrototypes(interceptor_holder, receiver,
lookup->holder(), scratch1,
scratch2, name, depth2, miss);
} else {
// CheckPrototypes has a side effect of fetching a 'holder'
// for API (object which is instanceof for the signature). It's
// safe to omit it here, as if present, it should be fetched
// by the previous CheckPrototypes.
ASSERT((depth2 == kInvalidProtoDepth) || (depth1 != kInvalidProtoDepth));
ASSERT(depth2 == kInvalidProtoDepth);
}
// Invoke function.

View File

@ -687,11 +687,12 @@ class CallInterceptorCompiler BASE_EMBEDDED {
stub_compiler_->CheckPrototypes(interceptor_holder, receiver,
lookup->holder(), scratch1,
scratch2, name, depth2, miss);
} else {
// CheckPrototypes has a side effect of fetching a 'holder'
// for API (object which is instanceof for the signature). It's
// safe to omit it here, as if present, it should be fetched
// by the previous CheckPrototypes.
ASSERT((depth2 == kInvalidProtoDepth) || (depth1 != kInvalidProtoDepth));
ASSERT(depth2 == kInvalidProtoDepth);
}
// Invoke function.

View File

@ -763,11 +763,12 @@ class CallInterceptorCompiler BASE_EMBEDDED {
stub_compiler_->CheckPrototypes(interceptor_holder, receiver,
lookup->holder(), scratch1,
scratch2, name, depth2, miss);
} else {
// CheckPrototypes has a side effect of fetching a 'holder'
// for API (object which is instanceof for the signature). It's
// safe to omit it here, as if present, it should be fetched
// by the previous CheckPrototypes.
ASSERT((depth2 == kInvalidProtoDepth) || (depth1 != kInvalidProtoDepth));
ASSERT(depth2 == kInvalidProtoDepth);
}
// Invoke function.