Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: src/ia32/virtual-frame-ia32.cc

Issue 268014: Guard the debug check at the start of every JS function with... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | src/x64/virtual-frame-x64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after
448 } 448 }
449 } 449 }
450 } 450 }
451 451
452 452
453 void VirtualFrame::Enter() { 453 void VirtualFrame::Enter() {
454 // Registers live on entry: esp, ebp, esi, edi. 454 // Registers live on entry: esp, ebp, esi, edi.
455 Comment cmnt(masm(), "[ Enter JS frame"); 455 Comment cmnt(masm(), "[ Enter JS frame");
456 456
457 #ifdef DEBUG 457 #ifdef DEBUG
458 // Verify that edi contains a JS function. The following code 458 if (FLAG_debug_code) {
459 // relies on eax being available for use. 459 // Verify that edi contains a JS function. The following code
460 __ test(edi, Immediate(kSmiTagMask)); 460 // relies on eax being available for use.
461 __ Check(not_zero, 461 __ test(edi, Immediate(kSmiTagMask));
462 "VirtualFrame::Enter - edi is not a function (smi check)."); 462 __ Check(not_zero,
463 __ CmpObjectType(edi, JS_FUNCTION_TYPE, eax); 463 "VirtualFrame::Enter - edi is not a function (smi check).");
464 __ Check(equal, 464 __ CmpObjectType(edi, JS_FUNCTION_TYPE, eax);
465 "VirtualFrame::Enter - edi is not a function (map check)."); 465 __ Check(equal,
466 "VirtualFrame::Enter - edi is not a function (map check).");
467 }
466 #endif 468 #endif
467 469
468 EmitPush(ebp); 470 EmitPush(ebp);
469 471
470 __ mov(ebp, Operand(esp)); 472 __ mov(ebp, Operand(esp));
471 473
472 // Store the context in the frame. The context is kept in esi and a 474 // Store the context in the frame. The context is kept in esi and a
473 // copy is stored in the frame. The external reference to esi 475 // copy is stored in the frame. The external reference to esi
474 // remains. 476 // remains.
475 EmitPush(esi); 477 EmitPush(esi);
(...skipping 601 matching lines...) Expand 10 before | Expand all | Expand 10 after
1077 ASSERT(stack_pointer_ == element_count() - 1); 1079 ASSERT(stack_pointer_ == element_count() - 1);
1078 elements_.Add(FrameElement::MemoryElement()); 1080 elements_.Add(FrameElement::MemoryElement());
1079 stack_pointer_++; 1081 stack_pointer_++;
1080 __ push(immediate); 1082 __ push(immediate);
1081 } 1083 }
1082 1084
1083 1085
1084 #undef __ 1086 #undef __
1085 1087
1086 } } // namespace v8::internal 1088 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/x64/virtual-frame-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698