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

Side by Side Diff: src/x64/full-codegen-x64.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 | « src/ia32/full-codegen-ia32.cc ('k') | no next file » | 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 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 } 203 }
204 204
205 205
206 void FullCodeGenerator::EmitStackCheck(IterationStatement* stmt) { 206 void FullCodeGenerator::EmitStackCheck(IterationStatement* stmt) {
207 Comment cmnt(masm_, "[ Stack check"); 207 Comment cmnt(masm_, "[ Stack check");
208 NearLabel ok; 208 NearLabel ok;
209 __ CompareRoot(rsp, Heap::kStackLimitRootIndex); 209 __ CompareRoot(rsp, Heap::kStackLimitRootIndex);
210 __ j(above_equal, &ok); 210 __ j(above_equal, &ok);
211 StackCheckStub stub; 211 StackCheckStub stub;
212 __ CallStub(&stub); 212 __ CallStub(&stub);
213 // Record a mapping of this PC offset to the OSR id. This is used to find
214 // the AST id from the unoptimized code in order to use it as a key into
215 // the deoptimization input data found in the optimized code.
216 RecordStackCheck(stmt->OsrEntryId());
217
213 __ bind(&ok); 218 __ bind(&ok);
214 PrepareForBailoutForId(stmt->EntryId(), NO_REGISTERS); 219 PrepareForBailoutForId(stmt->EntryId(), NO_REGISTERS);
220 // Record a mapping of the OSR id to this PC. This is used if the OSR
221 // entry becomes the target of a bailout. We don't expect it to be, but
222 // we want it to work if it is.
215 PrepareForBailoutForId(stmt->OsrEntryId(), NO_REGISTERS); 223 PrepareForBailoutForId(stmt->OsrEntryId(), NO_REGISTERS);
216 RecordStackCheck(stmt->OsrEntryId());
217 } 224 }
218 225
219 226
220 void FullCodeGenerator::EmitReturnSequence() { 227 void FullCodeGenerator::EmitReturnSequence() {
221 Comment cmnt(masm_, "[ Return sequence"); 228 Comment cmnt(masm_, "[ Return sequence");
222 if (return_label_.is_bound()) { 229 if (return_label_.is_bound()) {
223 __ jmp(&return_label_); 230 __ jmp(&return_label_);
224 } else { 231 } else {
225 __ bind(&return_label_); 232 __ bind(&return_label_);
226 if (FLAG_trace) { 233 if (FLAG_trace) {
(...skipping 3294 matching lines...) Expand 10 before | Expand all | Expand 10 after
3521 __ ret(0); 3528 __ ret(0);
3522 } 3529 }
3523 3530
3524 3531
3525 #undef __ 3532 #undef __
3526 3533
3527 3534
3528 } } // namespace v8::internal 3535 } } // namespace v8::internal
3529 3536
3530 #endif // V8_TARGET_ARCH_X64 3537 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/ia32/full-codegen-ia32.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698