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

Unified Diff: src/virtual-frame-arm.cc

Issue 28065: Experimental: port the JS function check at function entry from ARM to... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/toiger/
Patch Set: Created 11 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/virtual-frame-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/virtual-frame-arm.cc
===================================================================
--- src/virtual-frame-arm.cc (revision 1343)
+++ src/virtual-frame-arm.cc (working copy)
@@ -221,16 +221,20 @@
void VirtualFrame::Enter() {
Comment cmnt(masm_, "[ Enter JS frame");
+
#ifdef DEBUG
- { Label done, fail;
+ // Verify that r1 contains a JS function. The following code relies
+ // on r2 being available for use.
+ { Label map_check, done;
__ tst(r1, Operand(kSmiTagMask));
- __ b(eq, &fail);
+ __ b(ne, &map_check);
+ __ stop("VirtualFrame::Enter - r1 is not a function (smi check).");
+ __ bind(&map_check);
__ ldr(r2, FieldMemOperand(r1, HeapObject::kMapOffset));
__ ldrb(r2, FieldMemOperand(r2, Map::kInstanceTypeOffset));
__ cmp(r2, Operand(JS_FUNCTION_TYPE));
__ b(eq, &done);
- __ bind(&fail);
- __ stop("CodeGenerator::EnterJSFrame - r1 not a function");
+ __ stop("VirtualFrame::Enter - r1 is not a function (map check).");
__ bind(&done);
}
#endif // DEBUG
« no previous file with comments | « no previous file | src/virtual-frame-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698