| 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 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 355 | 355 |
| 356 unsigned stack_slot_size = compiled_code_->stack_slots() * kPointerSize; | 356 unsigned stack_slot_size = compiled_code_->stack_slots() * kPointerSize; |
| 357 unsigned outgoing_height = data->ArgumentsStackHeight(bailout_id)->value(); | 357 unsigned outgoing_height = data->ArgumentsStackHeight(bailout_id)->value(); |
| 358 unsigned outgoing_size = outgoing_height * kPointerSize; | 358 unsigned outgoing_size = outgoing_height * kPointerSize; |
| 359 unsigned output_frame_size = fixed_size + stack_slot_size + outgoing_size; | 359 unsigned output_frame_size = fixed_size + stack_slot_size + outgoing_size; |
| 360 ASSERT(outgoing_size == 0); // OSR does not happen in the middle of a call. | 360 ASSERT(outgoing_size == 0); // OSR does not happen in the middle of a call. |
| 361 | 361 |
| 362 if (FLAG_trace_osr) { | 362 if (FLAG_trace_osr) { |
| 363 PrintF("[on-stack replacement: begin 0x%08" V8PRIxPTR " ", | 363 PrintF("[on-stack replacement: begin 0x%08" V8PRIxPTR " ", |
| 364 reinterpret_cast<intptr_t>(function_)); | 364 reinterpret_cast<intptr_t>(function_)); |
| 365 function_->PrintName(); | 365 PrintFunctionName(); |
| 366 PrintF(" => node=%u, frame=%d->%d, ebp:esp=0x%08x:0x%08x]\n", | 366 PrintF(" => node=%u, frame=%d->%d, ebp:esp=0x%08x:0x%08x]\n", |
| 367 ast_id, | 367 ast_id, |
| 368 input_frame_size, | 368 input_frame_size, |
| 369 output_frame_size, | 369 output_frame_size, |
| 370 input_->GetRegister(ebp.code()), | 370 input_->GetRegister(ebp.code()), |
| 371 input_->GetRegister(esp.code())); | 371 input_->GetRegister(esp.code())); |
| 372 } | 372 } |
| 373 | 373 |
| 374 // There's only one output frame in the OSR case. | 374 // There's only one output frame in the OSR case. |
| 375 output_count_ = 1; | 375 output_count_ = 1; |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 469 } | 469 } |
| 470 Code* continuation = | 470 Code* continuation = |
| 471 function_->GetIsolate()->builtins()->builtin(Builtins::kNotifyOSR); | 471 function_->GetIsolate()->builtins()->builtin(Builtins::kNotifyOSR); |
| 472 output_[0]->SetContinuation( | 472 output_[0]->SetContinuation( |
| 473 reinterpret_cast<uint32_t>(continuation->entry())); | 473 reinterpret_cast<uint32_t>(continuation->entry())); |
| 474 | 474 |
| 475 if (FLAG_trace_osr) { | 475 if (FLAG_trace_osr) { |
| 476 PrintF("[on-stack replacement translation %s: 0x%08" V8PRIxPTR " ", | 476 PrintF("[on-stack replacement translation %s: 0x%08" V8PRIxPTR " ", |
| 477 ok ? "finished" : "aborted", | 477 ok ? "finished" : "aborted", |
| 478 reinterpret_cast<intptr_t>(function_)); | 478 reinterpret_cast<intptr_t>(function_)); |
| 479 function_->PrintName(); | 479 PrintFunctionName(); |
| 480 PrintF(" => pc=0x%0x]\n", output_[0]->GetPc()); | 480 PrintF(" => pc=0x%0x]\n", output_[0]->GetPc()); |
| 481 } | 481 } |
| 482 } | 482 } |
| 483 | 483 |
| 484 | 484 |
| 485 void Deoptimizer::DoComputeJSFrame(TranslationIterator* iterator, | 485 void Deoptimizer::DoComputeJSFrame(TranslationIterator* iterator, |
| 486 int frame_index) { | 486 int frame_index) { |
| 487 BailoutId node_id = BailoutId(iterator->Next()); | 487 BailoutId node_id = BailoutId(iterator->Next()); |
| 488 JSFunction* function; | 488 JSFunction* function; |
| 489 if (frame_index != 0) { | 489 if (frame_index != 0) { |
| (...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 925 } | 925 } |
| 926 __ bind(&done); | 926 __ bind(&done); |
| 927 } | 927 } |
| 928 | 928 |
| 929 #undef __ | 929 #undef __ |
| 930 | 930 |
| 931 | 931 |
| 932 } } // namespace v8::internal | 932 } } // namespace v8::internal |
| 933 | 933 |
| 934 #endif // V8_TARGET_ARCH_IA32 | 934 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |