Guard the debug check at the start of every JS function with
--debug-code so it is not normally compiled in debug builds. Review URL: http://codereview.chromium.org/268014 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3036 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
b0bc50aa85
commit
7efd193326
@ -455,14 +455,16 @@ void VirtualFrame::Enter() {
|
||||
Comment cmnt(masm(), "[ Enter JS frame");
|
||||
|
||||
#ifdef DEBUG
|
||||
// Verify that edi contains a JS function. The following code
|
||||
// relies on eax being available for use.
|
||||
__ test(edi, Immediate(kSmiTagMask));
|
||||
__ Check(not_zero,
|
||||
"VirtualFrame::Enter - edi is not a function (smi check).");
|
||||
__ CmpObjectType(edi, JS_FUNCTION_TYPE, eax);
|
||||
__ Check(equal,
|
||||
"VirtualFrame::Enter - edi is not a function (map check).");
|
||||
if (FLAG_debug_code) {
|
||||
// Verify that edi contains a JS function. The following code
|
||||
// relies on eax being available for use.
|
||||
__ test(edi, Immediate(kSmiTagMask));
|
||||
__ Check(not_zero,
|
||||
"VirtualFrame::Enter - edi is not a function (smi check).");
|
||||
__ CmpObjectType(edi, JS_FUNCTION_TYPE, eax);
|
||||
__ Check(equal,
|
||||
"VirtualFrame::Enter - edi is not a function (map check).");
|
||||
}
|
||||
#endif
|
||||
|
||||
EmitPush(ebp);
|
||||
|
@ -63,14 +63,16 @@ void VirtualFrame::Enter() {
|
||||
Comment cmnt(masm(), "[ Enter JS frame");
|
||||
|
||||
#ifdef DEBUG
|
||||
// Verify that rdi contains a JS function. The following code
|
||||
// relies on rax being available for use.
|
||||
Condition not_smi = masm()->CheckNotSmi(rdi);
|
||||
__ Check(not_smi,
|
||||
"VirtualFrame::Enter - rdi is not a function (smi check).");
|
||||
__ CmpObjectType(rdi, JS_FUNCTION_TYPE, rax);
|
||||
__ Check(equal,
|
||||
"VirtualFrame::Enter - rdi is not a function (map check).");
|
||||
if (FLAG_debug_code) {
|
||||
// Verify that rdi contains a JS function. The following code
|
||||
// relies on rax being available for use.
|
||||
Condition not_smi = masm()->CheckNotSmi(rdi);
|
||||
__ Check(not_smi,
|
||||
"VirtualFrame::Enter - rdi is not a function (smi check).");
|
||||
__ CmpObjectType(rdi, JS_FUNCTION_TYPE, rax);
|
||||
__ Check(equal,
|
||||
"VirtualFrame::Enter - rdi is not a function (map check).");
|
||||
}
|
||||
#endif
|
||||
|
||||
EmitPush(rbp);
|
||||
|
Loading…
Reference in New Issue
Block a user