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 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
307 while (ok && input_offset >= 0) { | 307 while (ok && input_offset >= 0) { |
308 ok = DoOsrTranslateCommand(&iterator, &input_offset); | 308 ok = DoOsrTranslateCommand(&iterator, &input_offset); |
309 } | 309 } |
310 | 310 |
311 // If translation of any command failed, continue using the input frame. | 311 // If translation of any command failed, continue using the input frame. |
312 if (!ok) { | 312 if (!ok) { |
313 delete output_[0]; | 313 delete output_[0]; |
314 output_[0] = input_; | 314 output_[0] = input_; |
315 output_[0]->SetPc(reinterpret_cast<intptr_t>(from_)); | 315 output_[0]->SetPc(reinterpret_cast<intptr_t>(from_)); |
316 } else { | 316 } else { |
317 // Setup the frame pointer and the context pointer. | 317 // Set up the frame pointer and the context pointer. |
318 output_[0]->SetRegister(rbp.code(), input_->GetRegister(rbp.code())); | 318 output_[0]->SetRegister(rbp.code(), input_->GetRegister(rbp.code())); |
319 output_[0]->SetRegister(rsi.code(), input_->GetRegister(rsi.code())); | 319 output_[0]->SetRegister(rsi.code(), input_->GetRegister(rsi.code())); |
320 | 320 |
321 unsigned pc_offset = data->OsrPcOffset()->value(); | 321 unsigned pc_offset = data->OsrPcOffset()->value(); |
322 intptr_t pc = reinterpret_cast<intptr_t>( | 322 intptr_t pc = reinterpret_cast<intptr_t>( |
323 optimized_code_->entry() + pc_offset); | 323 optimized_code_->entry() + pc_offset); |
324 output_[0]->SetPc(pc); | 324 output_[0]->SetPc(pc); |
325 } | 325 } |
326 Code* continuation = | 326 Code* continuation = |
327 function->GetIsolate()->builtins()->builtin(Builtins::kNotifyOSR); | 327 function->GetIsolate()->builtins()->builtin(Builtins::kNotifyOSR); |
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
743 } | 743 } |
744 __ bind(&done); | 744 __ bind(&done); |
745 } | 745 } |
746 | 746 |
747 #undef __ | 747 #undef __ |
748 | 748 |
749 | 749 |
750 } } // namespace v8::internal | 750 } } // namespace v8::internal |
751 | 751 |
752 #endif // V8_TARGET_ARCH_X64 | 752 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |