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 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
319 while (ok && input_offset >= 0) { | 319 while (ok && input_offset >= 0) { |
320 ok = DoOsrTranslateCommand(&iterator, &input_offset); | 320 ok = DoOsrTranslateCommand(&iterator, &input_offset); |
321 } | 321 } |
322 | 322 |
323 // If translation of any command failed, continue using the input frame. | 323 // If translation of any command failed, continue using the input frame. |
324 if (!ok) { | 324 if (!ok) { |
325 delete output_[0]; | 325 delete output_[0]; |
326 output_[0] = input_; | 326 output_[0] = input_; |
327 output_[0]->SetPc(reinterpret_cast<uint32_t>(from_)); | 327 output_[0]->SetPc(reinterpret_cast<uint32_t>(from_)); |
328 } else { | 328 } else { |
329 // Setup the frame pointer and the context pointer. | 329 // Set up the frame pointer and the context pointer. |
330 output_[0]->SetRegister(fp.code(), input_->GetRegister(fp.code())); | 330 output_[0]->SetRegister(fp.code(), input_->GetRegister(fp.code())); |
331 output_[0]->SetRegister(cp.code(), input_->GetRegister(cp.code())); | 331 output_[0]->SetRegister(cp.code(), input_->GetRegister(cp.code())); |
332 | 332 |
333 unsigned pc_offset = data->OsrPcOffset()->value(); | 333 unsigned pc_offset = data->OsrPcOffset()->value(); |
334 uint32_t pc = reinterpret_cast<uint32_t>( | 334 uint32_t pc = reinterpret_cast<uint32_t>( |
335 optimized_code_->entry() + pc_offset); | 335 optimized_code_->entry() + pc_offset); |
336 output_[0]->SetPc(pc); | 336 output_[0]->SetPc(pc); |
337 } | 337 } |
338 Code* continuation = isolate_->builtins()->builtin(Builtins::kNotifyOSR); | 338 Code* continuation = isolate_->builtins()->builtin(Builtins::kNotifyOSR); |
339 output_[0]->SetContinuation( | 339 output_[0]->SetContinuation( |
(...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
767 | 767 |
768 ASSERT_EQ(table_entry_size_, masm()->pc_offset() - start); | 768 ASSERT_EQ(table_entry_size_, masm()->pc_offset() - start); |
769 } | 769 } |
770 __ bind(&done); | 770 __ bind(&done); |
771 } | 771 } |
772 | 772 |
773 #undef __ | 773 #undef __ |
774 | 774 |
775 | 775 |
776 } } // namespace v8::internal | 776 } } // namespace v8::internal |
OLD | NEW |