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

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

Issue 6581028: X64: Implement DoComputeOsrOutputFrame and fix Generate_OnStackReplacement.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/x64/deoptimizer-x64.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 2011 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
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 NearLabel ok; 260 NearLabel ok;
261 __ CompareRoot(rsp, Heap::kStackLimitRootIndex); 261 __ CompareRoot(rsp, Heap::kStackLimitRootIndex);
262 __ j(above_equal, &ok); 262 __ j(above_equal, &ok);
263 StackCheckStub stub; 263 StackCheckStub stub;
264 __ CallStub(&stub); 264 __ CallStub(&stub);
265 // Record a mapping of this PC offset to the OSR id. This is used to find 265 // Record a mapping of this PC offset to the OSR id. This is used to find
266 // the AST id from the unoptimized code in order to use it as a key into 266 // the AST id from the unoptimized code in order to use it as a key into
267 // the deoptimization input data found in the optimized code. 267 // the deoptimization input data found in the optimized code.
268 RecordStackCheck(stmt->OsrEntryId()); 268 RecordStackCheck(stmt->OsrEntryId());
269 269
270 // Loop stack checks can be patched to perform on-stack replacement. In
271 // order to decide whether or not to perform OSR we embed the loop depth
272 // in a test instruction after the call so we can extract it from the OSR
273 // builtin.
274 ASSERT(loop_depth() > 0);
275 __ testl(rax, Immediate(Min(loop_depth(), Code::kMaxLoopNestingMarker)));
276
270 __ bind(&ok); 277 __ bind(&ok);
271 PrepareForBailoutForId(stmt->EntryId(), NO_REGISTERS); 278 PrepareForBailoutForId(stmt->EntryId(), NO_REGISTERS);
272 // Record a mapping of the OSR id to this PC. This is used if the OSR 279 // Record a mapping of the OSR id to this PC. This is used if the OSR
273 // entry becomes the target of a bailout. We don't expect it to be, but 280 // entry becomes the target of a bailout. We don't expect it to be, but
274 // we want it to work if it is. 281 // we want it to work if it is.
275 PrepareForBailoutForId(stmt->OsrEntryId(), NO_REGISTERS); 282 PrepareForBailoutForId(stmt->OsrEntryId(), NO_REGISTERS);
276 } 283 }
277 284
278 285
279 void FullCodeGenerator::EmitReturnSequence() { 286 void FullCodeGenerator::EmitReturnSequence() {
(...skipping 3488 matching lines...) Expand 10 before | Expand all | Expand 10 after
3768 __ ret(0); 3775 __ ret(0);
3769 } 3776 }
3770 3777
3771 3778
3772 #undef __ 3779 #undef __
3773 3780
3774 3781
3775 } } // namespace v8::internal 3782 } } // namespace v8::internal
3776 3783
3777 #endif // V8_TARGET_ARCH_X64 3784 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/deoptimizer-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698