| 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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 input_->SetFrameSlot(i, Memory::uint32_at(tos + i)); | 97 input_->SetFrameSlot(i, Memory::uint32_at(tos + i)); |
| 98 } | 98 } |
| 99 } | 99 } |
| 100 | 100 |
| 101 | 101 |
| 102 void Deoptimizer::SetPlatformCompiledStubRegisters( | 102 void Deoptimizer::SetPlatformCompiledStubRegisters( |
| 103 FrameDescription* output_frame, CodeStubInterfaceDescriptor* descriptor) { | 103 FrameDescription* output_frame, CodeStubInterfaceDescriptor* descriptor) { |
| 104 ApiFunction function(descriptor->deoptimization_handler_); | 104 ApiFunction function(descriptor->deoptimization_handler_); |
| 105 ExternalReference xref(&function, ExternalReference::BUILTIN_CALL, isolate_); | 105 ExternalReference xref(&function, ExternalReference::BUILTIN_CALL, isolate_); |
| 106 intptr_t handler = reinterpret_cast<intptr_t>(xref.address()); | 106 intptr_t handler = reinterpret_cast<intptr_t>(xref.address()); |
| 107 int params = descriptor->environment_length(); | 107 int params = descriptor->GetHandlerParameterCount(); |
| 108 output_frame->SetRegister(s0.code(), params); | 108 output_frame->SetRegister(s0.code(), params); |
| 109 output_frame->SetRegister(s1.code(), (params - 1) * kPointerSize); | 109 output_frame->SetRegister(s1.code(), (params - 1) * kPointerSize); |
| 110 output_frame->SetRegister(s2.code(), handler); | 110 output_frame->SetRegister(s2.code(), handler); |
| 111 } | 111 } |
| 112 | 112 |
| 113 | 113 |
| 114 void Deoptimizer::CopyDoubleRegisters(FrameDescription* output_frame) { | 114 void Deoptimizer::CopyDoubleRegisters(FrameDescription* output_frame) { |
| 115 for (int i = 0; i < DoubleRegister::kMaxNumRegisters; ++i) { | 115 for (int i = 0; i < DoubleRegister::kMaxNumRegisters; ++i) { |
| 116 double double_value = input_->GetDoubleRegister(i); | 116 double double_value = input_->GetDoubleRegister(i); |
| 117 output_frame->SetDoubleRegister(i, double_value); | 117 output_frame->SetDoubleRegister(i, double_value); |
| 118 } | 118 } |
| 119 } | 119 } |
| 120 | 120 |
| 121 | 121 |
| 122 bool Deoptimizer::HasAlignmentPadding(JSFunction* function) { | 122 bool Deoptimizer::HasAlignmentPadding(JSFunction* function) { |
| 123 // There is no dynamic alignment padding on MIPS in the input frame. | 123 // There is no dynamic alignment padding on MIPS in the input frame. |
| 124 return false; | 124 return false; |
| 125 } | 125 } |
| 126 | 126 |
| 127 | 127 |
| 128 Code* Deoptimizer::NotifyStubFailureBuiltin() { |
| 129 return isolate_->builtins()->builtin(Builtins::kNotifyStubFailureSaveDoubles); |
| 130 } |
| 131 |
| 132 |
| 128 #define __ masm()-> | 133 #define __ masm()-> |
| 129 | 134 |
| 130 | 135 |
| 131 // This code tries to be close to ia32 code so that any changes can be | 136 // This code tries to be close to ia32 code so that any changes can be |
| 132 // easily ported. | 137 // easily ported. |
| 133 void Deoptimizer::EntryGenerator::Generate() { | 138 void Deoptimizer::EntryGenerator::Generate() { |
| 134 GeneratePrologue(); | 139 GeneratePrologue(); |
| 135 | 140 |
| 136 // Unlike on ARM we don't save all the registers, just the useful ones. | 141 // Unlike on ARM we don't save all the registers, just the useful ones. |
| 137 // For the rest, there are gaps on the stack, so the offsets remain the same. | 142 // For the rest, there are gaps on the stack, so the offsets remain the same. |
| (...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 363 | 368 |
| 364 void FrameDescription::SetCallerFp(unsigned offset, intptr_t value) { | 369 void FrameDescription::SetCallerFp(unsigned offset, intptr_t value) { |
| 365 SetFrameSlot(offset, value); | 370 SetFrameSlot(offset, value); |
| 366 } | 371 } |
| 367 | 372 |
| 368 | 373 |
| 369 #undef __ | 374 #undef __ |
| 370 | 375 |
| 371 | 376 |
| 372 } } // namespace v8::internal | 377 } } // namespace v8::internal |
| OLD | NEW |