Commit 0dd031aa authored by antonm@chromium.org's avatar antonm@chromium.org

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
parent 7bfe5690
......@@ -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.
......
......@@ -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.
......
......@@ -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.
......
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