| 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 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 362 // incoming argument slots we've just cleared. | 362 // incoming argument slots we've just cleared. |
| 363 int input_offset = input_frame_size - kPointerSize; | 363 int input_offset = input_frame_size - kPointerSize; |
| 364 bool ok = true; | 364 bool ok = true; |
| 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 = StandardFrameConstants::kCallerPCOffset; |
| 373 ok && i >= StandardFrameConstants::kMarkerOffset; |
| 374 i -= kPointerSize) { |
| 373 uint32_t input_value = input_->GetFrameSlot(input_offset); | 375 uint32_t input_value = input_->GetFrameSlot(input_offset); |
| 374 if (FLAG_trace_osr) { | 376 if (FLAG_trace_osr) { |
| 375 PrintF(" [esp + %d] <- 0x%08x ; [esp + %d] (fixed part)\n", | 377 const char* name = "UNKNOWN"; |
| 378 switch (i) { |
| 379 case StandardFrameConstants::kCallerPCOffset: |
| 380 name = "caller's pc"; |
| 381 break; |
| 382 case StandardFrameConstants::kCallerFPOffset: |
| 383 name = "fp"; |
| 384 break; |
| 385 case StandardFrameConstants::kContextOffset: |
| 386 name = "context"; |
| 387 break; |
| 388 case StandardFrameConstants::kMarkerOffset: |
| 389 name = "function"; |
| 390 break; |
| 391 } |
| 392 PrintF(" [esp + %d] <- 0x%08x ; [esp + %d] (fixed part - %s)\n", |
| 376 output_offset, | 393 output_offset, |
| 377 input_value, | 394 input_value, |
| 378 input_offset); | 395 input_offset, |
| 396 name); |
| 379 } | 397 } |
| 380 output_[0]->SetFrameSlot(output_offset, input_->GetFrameSlot(input_offset)); | 398 output_[0]->SetFrameSlot(output_offset, input_->GetFrameSlot(input_offset)); |
| 381 input_offset -= kPointerSize; | 399 input_offset -= kPointerSize; |
| 382 output_offset -= kPointerSize; | 400 output_offset -= kPointerSize; |
| 383 } | 401 } |
| 384 | 402 |
| 385 // Translate the rest of the frame. | 403 // Translate the rest of the frame. |
| 386 while (ok && input_offset >= 0) { | 404 while (ok && input_offset >= 0) { |
| 387 ok = DoOsrTranslateCommand(&iterator, &input_offset); | 405 ok = DoOsrTranslateCommand(&iterator, &input_offset); |
| 388 } | 406 } |
| (...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 745 } | 763 } |
| 746 __ bind(&done); | 764 __ bind(&done); |
| 747 } | 765 } |
| 748 | 766 |
| 749 #undef __ | 767 #undef __ |
| 750 | 768 |
| 751 | 769 |
| 752 } } // namespace v8::internal | 770 } } // namespace v8::internal |
| 753 | 771 |
| 754 #endif // V8_TARGET_ARCH_IA32 | 772 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |