| OLD | NEW |
| 1 | 1 |
| 2 // Copyright 2011 the V8 project authors. All rights reserved. | 2 // Copyright 2011 the V8 project authors. All rights reserved. |
| 3 // Redistribution and use in source and binary forms, with or without | 3 // Redistribution and use in source and binary forms, with or without |
| 4 // modification, are permitted provided that the following conditions are | 4 // modification, are permitted provided that the following conditions are |
| 5 // met: | 5 // met: |
| 6 // | 6 // |
| 7 // * Redistributions of source code must retain the above copyright | 7 // * Redistributions of source code must retain the above copyright |
| 8 // notice, this list of conditions and the following disclaimer. | 8 // notice, this list of conditions and the following disclaimer. |
| 9 // * Redistributions in binary form must reproduce the above | 9 // * Redistributions in binary form must reproduce the above |
| 10 // copyright notice, this list of conditions and the following | 10 // copyright notice, this list of conditions and the following |
| (...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 259 | 259 |
| 260 unsigned stack_slot_size = compiled_code_->stack_slots() * kPointerSize; | 260 unsigned stack_slot_size = compiled_code_->stack_slots() * kPointerSize; |
| 261 unsigned outgoing_height = data->ArgumentsStackHeight(bailout_id)->value(); | 261 unsigned outgoing_height = data->ArgumentsStackHeight(bailout_id)->value(); |
| 262 unsigned outgoing_size = outgoing_height * kPointerSize; | 262 unsigned outgoing_size = outgoing_height * kPointerSize; |
| 263 unsigned output_frame_size = fixed_size + stack_slot_size + outgoing_size; | 263 unsigned output_frame_size = fixed_size + stack_slot_size + outgoing_size; |
| 264 ASSERT(outgoing_size == 0); // OSR does not happen in the middle of a call. | 264 ASSERT(outgoing_size == 0); // OSR does not happen in the middle of a call. |
| 265 | 265 |
| 266 if (FLAG_trace_osr) { | 266 if (FLAG_trace_osr) { |
| 267 PrintF("[on-stack replacement: begin 0x%08" V8PRIxPTR " ", | 267 PrintF("[on-stack replacement: begin 0x%08" V8PRIxPTR " ", |
| 268 reinterpret_cast<intptr_t>(function_)); | 268 reinterpret_cast<intptr_t>(function_)); |
| 269 function_->PrintName(); | 269 PrintFunctionName(); |
| 270 PrintF(" => node=%u, frame=%d->%d]\n", | 270 PrintF(" => node=%u, frame=%d->%d]\n", |
| 271 ast_id, | 271 ast_id, |
| 272 input_frame_size, | 272 input_frame_size, |
| 273 output_frame_size); | 273 output_frame_size); |
| 274 } | 274 } |
| 275 | 275 |
| 276 // There's only one output frame in the OSR case. | 276 // There's only one output frame in the OSR case. |
| 277 output_count_ = 1; | 277 output_count_ = 1; |
| 278 output_ = new FrameDescription*[1]; | 278 output_ = new FrameDescription*[1]; |
| 279 output_[0] = new(output_frame_size) FrameDescription( | 279 output_[0] = new(output_frame_size) FrameDescription( |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 353 output_[0]->SetPc(pc); | 353 output_[0]->SetPc(pc); |
| 354 } | 354 } |
| 355 Code* continuation = isolate_->builtins()->builtin(Builtins::kNotifyOSR); | 355 Code* continuation = isolate_->builtins()->builtin(Builtins::kNotifyOSR); |
| 356 output_[0]->SetContinuation( | 356 output_[0]->SetContinuation( |
| 357 reinterpret_cast<uint32_t>(continuation->entry())); | 357 reinterpret_cast<uint32_t>(continuation->entry())); |
| 358 | 358 |
| 359 if (FLAG_trace_osr) { | 359 if (FLAG_trace_osr) { |
| 360 PrintF("[on-stack replacement translation %s: 0x%08" V8PRIxPTR " ", | 360 PrintF("[on-stack replacement translation %s: 0x%08" V8PRIxPTR " ", |
| 361 ok ? "finished" : "aborted", | 361 ok ? "finished" : "aborted", |
| 362 reinterpret_cast<intptr_t>(function_)); | 362 reinterpret_cast<intptr_t>(function_)); |
| 363 function_->PrintName(); | 363 PrintFunctionName(); |
| 364 PrintF(" => pc=0x%0x]\n", output_[0]->GetPc()); | 364 PrintF(" => pc=0x%0x]\n", output_[0]->GetPc()); |
| 365 } | 365 } |
| 366 } | 366 } |
| 367 | 367 |
| 368 | 368 |
| 369 // This code is very similar to ia32/arm code, but relies on register names | 369 // This code is very similar to ia32/arm code, but relies on register names |
| 370 // (fp, sp) and how the frame is laid out. | 370 // (fp, sp) and how the frame is laid out. |
| 371 void Deoptimizer::DoComputeJSFrame(TranslationIterator* iterator, | 371 void Deoptimizer::DoComputeJSFrame(TranslationIterator* iterator, |
| 372 int frame_index) { | 372 int frame_index) { |
| 373 // Read the ast node id, function, and frame height for this output frame. | 373 // Read the ast node id, function, and frame height for this output frame. |
| (...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 838 } | 838 } |
| 839 | 839 |
| 840 ASSERT_EQ(masm()->SizeOfCodeGeneratedSince(&table_start), | 840 ASSERT_EQ(masm()->SizeOfCodeGeneratedSince(&table_start), |
| 841 count() * table_entry_size_); | 841 count() * table_entry_size_); |
| 842 } | 842 } |
| 843 | 843 |
| 844 #undef __ | 844 #undef __ |
| 845 | 845 |
| 846 | 846 |
| 847 } } // namespace v8::internal | 847 } } // namespace v8::internal |
| OLD | NEW |