Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 365 int limit = input_offset - (parameter_count * kPointerSize); | 365 int limit = input_offset - (parameter_count * kPointerSize); |
| 366 while (ok && input_offset > limit) { | 366 while (ok && input_offset > limit) { |
| 367 ok = DoOsrTranslateCommand(&iterator, &input_offset); | 367 ok = DoOsrTranslateCommand(&iterator, &input_offset); |
| 368 } | 368 } |
| 369 | 369 |
| 370 // There are no translation commands for the caller's pc and fp, the | 370 // There are no translation commands for the caller's pc and fp, the |
| 371 // context, and the function. Set them up explicitly. | 371 // context, and the function. Set them up explicitly. |
| 372 for (int i = 0; ok && i < 4; i++) { | 372 for (int i = 0; ok && i < 4; i++) { |
| 373 uint32_t input_value = input_->GetFrameSlot(input_offset); | 373 uint32_t input_value = input_->GetFrameSlot(input_offset); |
| 374 if (FLAG_trace_osr) { | 374 if (FLAG_trace_osr) { |
| 375 PrintF(" [esp + %d] <- 0x%08x ; [esp + %d] (fixed part)\n", | 375 const char* name = "UNKNOWN"; |
| 376 switch (i) { | |
| 377 case 0: name = "caller's pc"; break; | |
| 378 case 1: name = "ebp"; break; | |
| 379 case 2: name = "context"; break; | |
| 380 case 3: name = "function"; break; | |
| 381 } | |
| 382 PrintF(" [esp + %d] <- 0x%08x ; [esp + %d] (fixed part - %s)\n", | |
| 376 output_offset, | 383 output_offset, |
| 377 input_value, | 384 input_value, |
| 378 input_offset); | 385 input_offset, |
| 386 name); | |
| 379 } | 387 } |
| 380 output_[0]->SetFrameSlot(output_offset, input_->GetFrameSlot(input_offset)); | 388 output_[0]->SetFrameSlot(output_offset, input_->GetFrameSlot(input_offset)); |
| 381 input_offset -= kPointerSize; | 389 input_offset -= kPointerSize; |
| 382 output_offset -= kPointerSize; | 390 output_offset -= kPointerSize; |
| 383 } | 391 } |
| 384 | 392 |
| 385 // Translate the rest of the frame. | 393 // Translate the rest of the frame. |
| 386 while (ok && input_offset >= 0) { | 394 while (ok && input_offset >= 0) { |
| 387 ok = DoOsrTranslateCommand(&iterator, &input_offset); | 395 ok = DoOsrTranslateCommand(&iterator, &input_offset); |
| 388 } | 396 } |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 578 reinterpret_cast<uint32_t>(continuation->entry())); | 586 reinterpret_cast<uint32_t>(continuation->entry())); |
| 579 } | 587 } |
| 580 | 588 |
| 581 if (output_count_ - 1 == frame_index) iterator->Done(); | 589 if (output_count_ - 1 == frame_index) iterator->Done(); |
| 582 } | 590 } |
| 583 | 591 |
| 584 | 592 |
| 585 #define __ masm()-> | 593 #define __ masm()-> |
| 586 | 594 |
| 587 void Deoptimizer::EntryGenerator::Generate() { | 595 void Deoptimizer::EntryGenerator::Generate() { |
| 596 PrintF("Deoptimizer::EntryGenerator::Generate()\n"); | |
|
Mads Ager (chromium)
2011/03/28 07:43:11
Remove?
Søren Thygesen Gjesse
2011/03/28 12:27:29
Done.
| |
| 588 GeneratePrologue(); | 597 GeneratePrologue(); |
| 589 CpuFeatures::Scope scope(SSE2); | 598 CpuFeatures::Scope scope(SSE2); |
| 590 | 599 |
| 591 Isolate* isolate = masm()->isolate(); | 600 Isolate* isolate = masm()->isolate(); |
| 592 | 601 |
| 593 // Save all general purpose registers before messing with them. | 602 // Save all general purpose registers before messing with them. |
| 594 const int kNumberOfRegisters = Register::kNumRegisters; | 603 const int kNumberOfRegisters = Register::kNumRegisters; |
| 595 | 604 |
| 596 const int kDoubleRegsSize = kDoubleSize * | 605 const int kDoubleRegsSize = kDoubleSize * |
| 597 XMMRegister::kNumAllocatableRegisters; | 606 XMMRegister::kNumAllocatableRegisters; |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 745 } | 754 } |
| 746 __ bind(&done); | 755 __ bind(&done); |
| 747 } | 756 } |
| 748 | 757 |
| 749 #undef __ | 758 #undef __ |
| 750 | 759 |
| 751 | 760 |
| 752 } } // namespace v8::internal | 761 } } // namespace v8::internal |
| 753 | 762 |
| 754 #endif // V8_TARGET_ARCH_IA32 | 763 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |