| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 342 EmitProfilingCounterDecrement(weight); | 342 EmitProfilingCounterDecrement(weight); |
| 343 __ j(positive, &ok, Label::kNear); | 343 __ j(positive, &ok, Label::kNear); |
| 344 InterruptStub stub; | 344 InterruptStub stub; |
| 345 __ CallStub(&stub); | 345 __ CallStub(&stub); |
| 346 | 346 |
| 347 // Record a mapping of this PC offset to the OSR id. This is used to find | 347 // Record a mapping of this PC offset to the OSR id. This is used to find |
| 348 // the AST id from the unoptimized code in order to use it as a key into | 348 // the AST id from the unoptimized code in order to use it as a key into |
| 349 // the deoptimization input data found in the optimized code. | 349 // the deoptimization input data found in the optimized code. |
| 350 RecordBackEdge(stmt->OsrEntryId()); | 350 RecordBackEdge(stmt->OsrEntryId()); |
| 351 | 351 |
| 352 // Loop stack checks can be patched to perform on-stack replacement. In | |
| 353 // order to decide whether or not to perform OSR we embed the loop depth | |
| 354 // in a test instruction after the call so we can extract it from the OSR | |
| 355 // builtin. | |
| 356 ASSERT(loop_depth() > 0); | |
| 357 __ testl(rax, Immediate(Min(loop_depth(), Code::kMaxLoopNestingMarker))); | |
| 358 | |
| 359 EmitProfilingCounterReset(); | 352 EmitProfilingCounterReset(); |
| 360 | 353 |
| 361 __ bind(&ok); | 354 __ bind(&ok); |
| 362 PrepareForBailoutForId(stmt->EntryId(), NO_REGISTERS); | 355 PrepareForBailoutForId(stmt->EntryId(), NO_REGISTERS); |
| 363 // Record a mapping of the OSR id to this PC. This is used if the OSR | 356 // Record a mapping of the OSR id to this PC. This is used if the OSR |
| 364 // entry becomes the target of a bailout. We don't expect it to be, but | 357 // entry becomes the target of a bailout. We don't expect it to be, but |
| 365 // we want it to work if it is. | 358 // we want it to work if it is. |
| 366 PrepareForBailoutForId(stmt->OsrEntryId(), NO_REGISTERS); | 359 PrepareForBailoutForId(stmt->OsrEntryId(), NO_REGISTERS); |
| 367 } | 360 } |
| 368 | 361 |
| (...skipping 4197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4566 *context_length = 0; | 4559 *context_length = 0; |
| 4567 return previous_; | 4560 return previous_; |
| 4568 } | 4561 } |
| 4569 | 4562 |
| 4570 | 4563 |
| 4571 #undef __ | 4564 #undef __ |
| 4572 | 4565 |
| 4573 } } // namespace v8::internal | 4566 } } // namespace v8::internal |
| 4574 | 4567 |
| 4575 #endif // V8_TARGET_ARCH_X64 | 4568 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |