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 557 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
568 value = reinterpret_cast<intptr_t>( | 568 value = reinterpret_cast<intptr_t>( |
569 Smi::FromInt(StackFrame::STUB_FAILURE_TRAMPOLINE)); | 569 Smi::FromInt(StackFrame::STUB_FAILURE_TRAMPOLINE)); |
570 output_frame->SetFrameSlot(output_frame_offset, value); | 570 output_frame->SetFrameSlot(output_frame_offset, value); |
571 if (trace_) { | 571 if (trace_) { |
572 PrintF(" 0x%08x: [top + %d] <- 0x%08x ; function (stub fail sentinel)\n", | 572 PrintF(" 0x%08x: [top + %d] <- 0x%08x ; function (stub fail sentinel)\n", |
573 top_address + output_frame_offset, output_frame_offset, value); | 573 top_address + output_frame_offset, output_frame_offset, value); |
574 } | 574 } |
575 | 575 |
576 int caller_arg_count = 0; | 576 int caller_arg_count = 0; |
577 if (descriptor->stack_parameter_count_ != NULL) { | 577 if (descriptor->stack_parameter_count_ != NULL) { |
| 578 // TODO(mvstanton): when a hydrogen stub with multiple arguments of any |
| 579 // complexity comes along this code will fail because the register is likely |
| 580 // consumed with another value. Retrieve the caller_arg_count from the |
| 581 // environment instead via iterator. |
578 caller_arg_count = | 582 caller_arg_count = |
579 input_->GetRegister(descriptor->stack_parameter_count_->code()); | 583 input_->GetRegister(descriptor->stack_parameter_count_->code()); |
580 } | 584 } |
581 | 585 |
582 // Build the Arguments object for the caller's parameters and a pointer to it. | 586 // Build the Arguments object for the caller's parameters and a pointer to it. |
583 output_frame_offset -= kPointerSize; | 587 output_frame_offset -= kPointerSize; |
584 value = frame_ptr + StandardFrameConstants::kCallerSPOffset + | 588 value = frame_ptr + StandardFrameConstants::kCallerSPOffset + |
585 (caller_arg_count - 1) * kPointerSize; | 589 (caller_arg_count - 1) * kPointerSize; |
586 output_frame->SetFrameSlot(output_frame_offset, value); | 590 output_frame->SetFrameSlot(output_frame_offset, value); |
587 if (trace_) { | 591 if (trace_) { |
(...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1062 } | 1066 } |
1063 __ bind(&done); | 1067 __ bind(&done); |
1064 } | 1068 } |
1065 | 1069 |
1066 #undef __ | 1070 #undef __ |
1067 | 1071 |
1068 | 1072 |
1069 } } // namespace v8::internal | 1073 } } // namespace v8::internal |
1070 | 1074 |
1071 #endif // V8_TARGET_ARCH_IA32 | 1075 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |