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

Side by Side Diff: src/arm/full-codegen-arm.cc

Issue 6005014: Small change to stack checks in unoptimized code. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge/build/ia32
Patch Set: Created 9 years, 11 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/ia32/deoptimizer-ia32.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 2010 the V8 project authors. All rights reserved. 1 // Copyright 2011 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
11 // with the distribution. 11 // with the distribution.
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 214
215 215
216 void FullCodeGenerator::EmitStackCheck(IterationStatement* stmt) { 216 void FullCodeGenerator::EmitStackCheck(IterationStatement* stmt) {
217 Comment cmnt(masm_, "[ Stack check"); 217 Comment cmnt(masm_, "[ Stack check");
218 Label ok; 218 Label ok;
219 __ LoadRoot(ip, Heap::kStackLimitRootIndex); 219 __ LoadRoot(ip, Heap::kStackLimitRootIndex);
220 __ cmp(sp, Operand(ip)); 220 __ cmp(sp, Operand(ip));
221 __ b(hs, &ok); 221 __ b(hs, &ok);
222 StackCheckStub stub; 222 StackCheckStub stub;
223 __ CallStub(&stub); 223 __ CallStub(&stub);
224 // Record a mapping of this PC offset to the OSR id. This is used to find
225 // the AST id from the unoptimized code in order to use it as a key into
226 // the deoptimization input data found in the optimized code.
227 RecordStackCheck(stmt->OsrEntryId());
228
224 __ bind(&ok); 229 __ bind(&ok);
225 PrepareForBailoutForId(stmt->EntryId(), NO_REGISTERS); 230 PrepareForBailoutForId(stmt->EntryId(), NO_REGISTERS);
231 // Record a mapping of the OSR id to this PC. This is used if the OSR
232 // entry becomes the target of a bailout. We don't expect it to be, but
233 // we want it to work if it is.
226 PrepareForBailoutForId(stmt->OsrEntryId(), NO_REGISTERS); 234 PrepareForBailoutForId(stmt->OsrEntryId(), NO_REGISTERS);
227 RecordStackCheck(stmt->OsrEntryId());
228 } 235 }
229 236
230 237
231 void FullCodeGenerator::EmitReturnSequence() { 238 void FullCodeGenerator::EmitReturnSequence() {
232 Comment cmnt(masm_, "[ Return sequence"); 239 Comment cmnt(masm_, "[ Return sequence");
233 if (return_label_.is_bound()) { 240 if (return_label_.is_bound()) {
234 __ b(&return_label_); 241 __ b(&return_label_);
235 } else { 242 } else {
236 __ bind(&return_label_); 243 __ bind(&return_label_);
237 if (FLAG_trace) { 244 if (FLAG_trace) {
(...skipping 3360 matching lines...) Expand 10 before | Expand all | Expand 10 after
3598 __ mov(r1, Operand(r1, ASR, 1)); // Un-smi-tag value. 3605 __ mov(r1, Operand(r1, ASR, 1)); // Un-smi-tag value.
3599 __ add(pc, r1, Operand(masm_->CodeObject())); 3606 __ add(pc, r1, Operand(masm_->CodeObject()));
3600 } 3607 }
3601 3608
3602 3609
3603 #undef __ 3610 #undef __
3604 3611
3605 } } // namespace v8::internal 3612 } } // namespace v8::internal
3606 3613
3607 #endif // V8_TARGET_ARCH_ARM 3614 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/ia32/deoptimizer-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698