| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 359 ASSERT(back_edge_target->is_bound()); | 359 ASSERT(back_edge_target->is_bound()); |
| 360 int distance = masm_->SizeOfCodeGeneratedSince(back_edge_target); | 360 int distance = masm_->SizeOfCodeGeneratedSince(back_edge_target); |
| 361 weight = Min(kMaxBackEdgeWeight, | 361 weight = Min(kMaxBackEdgeWeight, |
| 362 Max(1, distance / kCodeSizeMultiplier)); | 362 Max(1, distance / kCodeSizeMultiplier)); |
| 363 } | 363 } |
| 364 EmitProfilingCounterDecrement(weight); | 364 EmitProfilingCounterDecrement(weight); |
| 365 __ B(pl, &ok); | 365 __ B(pl, &ok); |
| 366 InterruptStub stub; | 366 InterruptStub stub; |
| 367 __ CallStub(&stub); | 367 __ CallStub(&stub); |
| 368 | 368 |
| 369 // TODO(all): Implement OSR/Crankshaft code. | 369 // Record a mapping of this PC offset to the OSR id. This is used to find |
| 370 // the AST id from the unoptimized code in order to use it as a key into |
| 371 // the deoptimization input data found in the optimized code. |
| 372 RecordBackEdge(stmt->OsrEntryId()); |
| 370 | 373 |
| 371 EmitProfilingCounterReset(); | 374 EmitProfilingCounterReset(); |
| 372 | 375 |
| 373 __ Bind(&ok); | 376 __ Bind(&ok); |
| 374 PrepareForBailoutForId(stmt->EntryId(), NO_REGISTERS); | 377 PrepareForBailoutForId(stmt->EntryId(), NO_REGISTERS); |
| 375 | 378 // Record a mapping of the OSR id to this PC. This is used if the OSR |
| 376 // TODO(all): Implement OSR/Crankshaft code. | 379 // entry becomes the target of a bailout. We don't expect it to be, but |
| 377 ASM_UNIMPLEMENTED( | 380 // we want it to work if it is. |
| 378 "FullCodeGenerator::EmitBackEdgeBookkeeping " | 381 PrepareForBailoutForId(stmt->OsrEntryId(), NO_REGISTERS); |
| 379 "Implement OSR/Crankshaft code."); | |
| 380 } | 382 } |
| 381 | 383 |
| 382 | 384 |
| 383 void FullCodeGenerator::EmitReturnSequence() { | 385 void FullCodeGenerator::EmitReturnSequence() { |
| 384 Comment cmnt(masm_, "[ Return sequence"); | 386 Comment cmnt(masm_, "[ Return sequence"); |
| 385 | 387 |
| 386 if (return_label_.is_bound()) { | 388 if (return_label_.is_bound()) { |
| 387 __ B(&return_label_); | 389 __ B(&return_label_); |
| 388 | 390 |
| 389 } else { | 391 } else { |
| (...skipping 4603 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4993 return previous_; | 4995 return previous_; |
| 4994 } | 4996 } |
| 4995 | 4997 |
| 4996 | 4998 |
| 4997 #undef __ | 4999 #undef __ |
| 4998 | 5000 |
| 4999 | 5001 |
| 5000 } } // namespace v8::internal | 5002 } } // namespace v8::internal |
| 5001 | 5003 |
| 5002 #endif // V8_TARGET_ARCH_A64 | 5004 #endif // V8_TARGET_ARCH_A64 |
| OLD | NEW |