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

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

Issue 119353: Add instanceof stub for ARM. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 6 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 | « src/arm/stub-cache-arm.cc ('k') | src/codegen.h » ('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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 Comment cmnt(masm(), "[ Enter JS frame"); 149 Comment cmnt(masm(), "[ Enter JS frame");
150 150
151 #ifdef DEBUG 151 #ifdef DEBUG
152 // Verify that r1 contains a JS function. The following code relies 152 // Verify that r1 contains a JS function. The following code relies
153 // on r2 being available for use. 153 // on r2 being available for use.
154 { Label map_check, done; 154 { Label map_check, done;
155 __ tst(r1, Operand(kSmiTagMask)); 155 __ tst(r1, Operand(kSmiTagMask));
156 __ b(ne, &map_check); 156 __ b(ne, &map_check);
157 __ stop("VirtualFrame::Enter - r1 is not a function (smi check)."); 157 __ stop("VirtualFrame::Enter - r1 is not a function (smi check).");
158 __ bind(&map_check); 158 __ bind(&map_check);
159 __ ldr(r2, FieldMemOperand(r1, HeapObject::kMapOffset)); 159 __ CompareObjectType(r1, r2, r2, JS_FUNCTION_TYPE);
160 __ ldrb(r2, FieldMemOperand(r2, Map::kInstanceTypeOffset));
161 __ cmp(r2, Operand(JS_FUNCTION_TYPE));
162 __ b(eq, &done); 160 __ b(eq, &done);
163 __ stop("VirtualFrame::Enter - r1 is not a function (map check)."); 161 __ stop("VirtualFrame::Enter - r1 is not a function (map check).");
164 __ bind(&done); 162 __ bind(&done);
165 } 163 }
166 #endif // DEBUG 164 #endif // DEBUG
167 165
168 // We are about to push four values to the frame. 166 // We are about to push four values to the frame.
169 Adjust(4); 167 Adjust(4);
170 __ stm(db_w, sp, r1.bit() | cp.bit() | fp.bit() | lr.bit()); 168 __ stm(db_w, sp, r1.bit() | cp.bit() | fp.bit() | lr.bit());
171 // Adjust FP to point to saved FP. 169 // Adjust FP to point to saved FP.
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
430 ASSERT(stack_pointer_ == element_count() - 1); 428 ASSERT(stack_pointer_ == element_count() - 1);
431 elements_.Add(FrameElement::MemoryElement()); 429 elements_.Add(FrameElement::MemoryElement());
432 stack_pointer_++; 430 stack_pointer_++;
433 __ push(reg); 431 __ push(reg);
434 } 432 }
435 433
436 434
437 #undef __ 435 #undef __
438 436
439 } } // namespace v8::internal 437 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/stub-cache-arm.cc ('k') | src/codegen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698