| 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 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 341 ASSERT(Translation::JS_FRAME == opcode); | 341 ASSERT(Translation::JS_FRAME == opcode); |
| 342 unsigned node_id = iterator.Next(); | 342 unsigned node_id = iterator.Next(); |
| 343 USE(node_id); | 343 USE(node_id); |
| 344 ASSERT(node_id == ast_id); | 344 ASSERT(node_id == ast_id); |
| 345 int closure_id = iterator.Next(); | 345 int closure_id = iterator.Next(); |
| 346 USE(closure_id); | 346 USE(closure_id); |
| 347 ASSERT_EQ(Translation::kSelfLiteralId, closure_id); | 347 ASSERT_EQ(Translation::kSelfLiteralId, closure_id); |
| 348 unsigned height = iterator.Next(); | 348 unsigned height = iterator.Next(); |
| 349 unsigned height_in_bytes = height * kPointerSize; | 349 unsigned height_in_bytes = height * kPointerSize; |
| 350 USE(height_in_bytes); | 350 USE(height_in_bytes); |
| 351 int handler_count = iterator.Next(); |
| 352 USE(handler_count); |
| 351 | 353 |
| 352 unsigned fixed_size = ComputeFixedSize(function_); | 354 unsigned fixed_size = ComputeFixedSize(function_); |
| 353 unsigned input_frame_size = input_->GetFrameSize(); | 355 unsigned input_frame_size = input_->GetFrameSize(); |
| 354 ASSERT(fixed_size + height_in_bytes == input_frame_size); | 356 ASSERT(fixed_size + height_in_bytes == input_frame_size); |
| 355 | 357 |
| 356 unsigned stack_slot_size = compiled_code_->stack_slots() * kPointerSize; | 358 unsigned stack_slot_size = compiled_code_->stack_slots() * kPointerSize; |
| 357 unsigned outgoing_height = data->ArgumentsStackHeight(bailout_id)->value(); | 359 unsigned outgoing_height = data->ArgumentsStackHeight(bailout_id)->value(); |
| 358 unsigned outgoing_size = outgoing_height * kPointerSize; | 360 unsigned outgoing_size = outgoing_height * kPointerSize; |
| 359 unsigned output_frame_size = fixed_size + stack_slot_size + outgoing_size; | 361 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. | 362 ASSERT(outgoing_size == 0); // OSR does not happen in the middle of a call. |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 470 Code* continuation = | 472 Code* continuation = |
| 471 function_->GetIsolate()->builtins()->builtin(Builtins::kNotifyOSR); | 473 function_->GetIsolate()->builtins()->builtin(Builtins::kNotifyOSR); |
| 472 output_[0]->SetContinuation( | 474 output_[0]->SetContinuation( |
| 473 reinterpret_cast<uint32_t>(continuation->entry())); | 475 reinterpret_cast<uint32_t>(continuation->entry())); |
| 474 | 476 |
| 475 if (FLAG_trace_osr) { | 477 if (FLAG_trace_osr) { |
| 476 PrintF("[on-stack replacement translation %s: 0x%08" V8PRIxPTR " ", | 478 PrintF("[on-stack replacement translation %s: 0x%08" V8PRIxPTR " ", |
| 477 ok ? "finished" : "aborted", | 479 ok ? "finished" : "aborted", |
| 478 reinterpret_cast<intptr_t>(function_)); | 480 reinterpret_cast<intptr_t>(function_)); |
| 479 PrintFunctionName(); | 481 PrintFunctionName(); |
| 480 PrintF(" => pc=0x%0x]\n", output_[0]->GetPc()); | 482 PrintF(" => pc=0x%08x]\n", output_[0]->GetPc()); |
| 481 } | 483 } |
| 482 } | 484 } |
| 483 | 485 |
| 484 | 486 |
| 485 void Deoptimizer::FillInputFrame(Address tos, JavaScriptFrame* frame) { | 487 void Deoptimizer::FillInputFrame(Address tos, JavaScriptFrame* frame) { |
| 486 // Set the register values. The values are not important as there are no | 488 // Set the register values. The values are not important as there are no |
| 487 // callee saved registers in JavaScript frames, so all registers are | 489 // callee saved registers in JavaScript frames, so all registers are |
| 488 // spilled. Registers ebp and esp are set to the correct values though. | 490 // spilled. Registers ebp and esp are set to the correct values though. |
| 489 | 491 |
| 490 for (int i = 0; i < Register::kNumRegisters; i++) { | 492 for (int i = 0; i < Register::kNumRegisters; i++) { |
| (...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 748 } | 750 } |
| 749 __ bind(&done); | 751 __ bind(&done); |
| 750 } | 752 } |
| 751 | 753 |
| 752 #undef __ | 754 #undef __ |
| 753 | 755 |
| 754 | 756 |
| 755 } } // namespace v8::internal | 757 } } // namespace v8::internal |
| 756 | 758 |
| 757 #endif // V8_TARGET_ARCH_IA32 | 759 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |