| 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 12 matching lines...) Expand all Loading... |
| 23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 27 | 27 |
| 28 #include "v8.h" | 28 #include "v8.h" |
| 29 | 29 |
| 30 #if defined(V8_TARGET_ARCH_MIPS) | 30 #if defined(V8_TARGET_ARCH_MIPS) |
| 31 | 31 |
| 32 #include "bootstrapper.h" | 32 #include "bootstrapper.h" |
| 33 #include "builtins-decls.h" | |
| 34 #include "code-stubs.h" | 33 #include "code-stubs.h" |
| 35 #include "codegen.h" | 34 #include "codegen.h" |
| 36 #include "regexp-macro-assembler.h" | 35 #include "regexp-macro-assembler.h" |
| 37 #include "stub-cache.h" | 36 #include "stub-cache.h" |
| 38 | 37 |
| 39 namespace v8 { | 38 namespace v8 { |
| 40 namespace internal { | 39 namespace internal { |
| 41 | 40 |
| 42 | 41 |
| 43 void FastCloneShallowArrayStub::InitializeInterfaceDescriptor( | 42 void FastCloneShallowArrayStub::InitializeInterfaceDescriptor( |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 static Register registers[] = { a1, a2 }; | 139 static Register registers[] = { a1, a2 }; |
| 141 descriptor->register_param_count_ = 2; | 140 descriptor->register_param_count_ = 2; |
| 142 if (constant_stack_parameter_count != 0) { | 141 if (constant_stack_parameter_count != 0) { |
| 143 // stack param count needs (constructor pointer, and single argument) | 142 // stack param count needs (constructor pointer, and single argument) |
| 144 descriptor->stack_parameter_count_ = &a0; | 143 descriptor->stack_parameter_count_ = &a0; |
| 145 } | 144 } |
| 146 descriptor->hint_stack_parameter_count_ = constant_stack_parameter_count; | 145 descriptor->hint_stack_parameter_count_ = constant_stack_parameter_count; |
| 147 descriptor->register_params_ = registers; | 146 descriptor->register_params_ = registers; |
| 148 descriptor->function_mode_ = JS_FUNCTION_STUB_MODE; | 147 descriptor->function_mode_ = JS_FUNCTION_STUB_MODE; |
| 149 descriptor->deoptimization_handler_ = | 148 descriptor->deoptimization_handler_ = |
| 150 FUNCTION_ADDR(ArrayConstructor_StubFailure); | 149 Runtime::FunctionForId(Runtime::kArrayConstructor)->entry; |
| 151 } | 150 } |
| 152 | 151 |
| 153 | 152 |
| 154 static void InitializeInternalArrayConstructorDescriptor( | 153 static void InitializeInternalArrayConstructorDescriptor( |
| 155 Isolate* isolate, | 154 Isolate* isolate, |
| 156 CodeStubInterfaceDescriptor* descriptor, | 155 CodeStubInterfaceDescriptor* descriptor, |
| 157 int constant_stack_parameter_count) { | 156 int constant_stack_parameter_count) { |
| 158 // register state | 157 // register state |
| 159 // a0 -- number of arguments | 158 // a0 -- number of arguments |
| 160 // a1 -- constructor function | 159 // a1 -- constructor function |
| 161 static Register registers[] = { a1 }; | 160 static Register registers[] = { a1 }; |
| 162 descriptor->register_param_count_ = 1; | 161 descriptor->register_param_count_ = 1; |
| 163 | 162 |
| 164 if (constant_stack_parameter_count != 0) { | 163 if (constant_stack_parameter_count != 0) { |
| 165 // Stack param count needs (constructor pointer, and single argument). | 164 // Stack param count needs (constructor pointer, and single argument). |
| 166 descriptor->stack_parameter_count_ = &a0; | 165 descriptor->stack_parameter_count_ = &a0; |
| 167 } | 166 } |
| 168 descriptor->hint_stack_parameter_count_ = constant_stack_parameter_count; | 167 descriptor->hint_stack_parameter_count_ = constant_stack_parameter_count; |
| 169 descriptor->register_params_ = registers; | 168 descriptor->register_params_ = registers; |
| 170 descriptor->function_mode_ = JS_FUNCTION_STUB_MODE; | 169 descriptor->function_mode_ = JS_FUNCTION_STUB_MODE; |
| 171 descriptor->deoptimization_handler_ = | 170 descriptor->deoptimization_handler_ = |
| 172 FUNCTION_ADDR(InternalArrayConstructor_StubFailure); | 171 Runtime::FunctionForId(Runtime::kInternalArrayConstructor)->entry; |
| 173 } | 172 } |
| 174 | 173 |
| 175 | 174 |
| 176 void ArrayNoArgumentConstructorStub::InitializeInterfaceDescriptor( | 175 void ArrayNoArgumentConstructorStub::InitializeInterfaceDescriptor( |
| 177 Isolate* isolate, | 176 Isolate* isolate, |
| 178 CodeStubInterfaceDescriptor* descriptor) { | 177 CodeStubInterfaceDescriptor* descriptor) { |
| 179 InitializeArrayConstructorDescriptor(isolate, descriptor, 0); | 178 InitializeArrayConstructorDescriptor(isolate, descriptor, 0); |
| 180 } | 179 } |
| 181 | 180 |
| 182 | 181 |
| (...skipping 7735 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7918 __ Jump(generic_construct_stub, RelocInfo::CODE_TARGET); | 7917 __ Jump(generic_construct_stub, RelocInfo::CODE_TARGET); |
| 7919 } | 7918 } |
| 7920 } | 7919 } |
| 7921 | 7920 |
| 7922 | 7921 |
| 7923 #undef __ | 7922 #undef __ |
| 7924 | 7923 |
| 7925 } } // namespace v8::internal | 7924 } } // namespace v8::internal |
| 7926 | 7925 |
| 7927 #endif // V8_TARGET_ARCH_MIPS | 7926 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |