| 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_IA32) | 30 #if defined(V8_TARGET_ARCH_IA32) |
| 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 "isolate.h" | 34 #include "isolate.h" |
| 36 #include "jsregexp.h" | 35 #include "jsregexp.h" |
| 37 #include "regexp-macro-assembler.h" | 36 #include "regexp-macro-assembler.h" |
| 38 #include "runtime.h" | 37 #include "runtime.h" |
| 39 #include "stub-cache.h" | 38 #include "stub-cache.h" |
| 40 #include "codegen.h" | 39 #include "codegen.h" |
| 41 #include "runtime.h" | 40 #include "runtime.h" |
| 42 | 41 |
| 43 namespace v8 { | 42 namespace v8 { |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 descriptor->register_param_count_ = 2; | 130 descriptor->register_param_count_ = 2; |
| 132 | 131 |
| 133 if (constant_stack_parameter_count != 0) { | 132 if (constant_stack_parameter_count != 0) { |
| 134 // stack param count needs (constructor pointer, and single argument) | 133 // stack param count needs (constructor pointer, and single argument) |
| 135 descriptor->stack_parameter_count_ = &eax; | 134 descriptor->stack_parameter_count_ = &eax; |
| 136 } | 135 } |
| 137 descriptor->hint_stack_parameter_count_ = constant_stack_parameter_count; | 136 descriptor->hint_stack_parameter_count_ = constant_stack_parameter_count; |
| 138 descriptor->register_params_ = registers; | 137 descriptor->register_params_ = registers; |
| 139 descriptor->function_mode_ = JS_FUNCTION_STUB_MODE; | 138 descriptor->function_mode_ = JS_FUNCTION_STUB_MODE; |
| 140 descriptor->deoptimization_handler_ = | 139 descriptor->deoptimization_handler_ = |
| 141 FUNCTION_ADDR(ArrayConstructor_StubFailure); | 140 Runtime::FunctionForId(Runtime::kArrayConstructor)->entry; |
| 142 } | 141 } |
| 143 | 142 |
| 144 | 143 |
| 145 static void InitializeInternalArrayConstructorDescriptor( | 144 static void InitializeInternalArrayConstructorDescriptor( |
| 146 Isolate* isolate, | 145 Isolate* isolate, |
| 147 CodeStubInterfaceDescriptor* descriptor, | 146 CodeStubInterfaceDescriptor* descriptor, |
| 148 int constant_stack_parameter_count) { | 147 int constant_stack_parameter_count) { |
| 149 // register state | 148 // register state |
| 150 // eax -- number of arguments | 149 // eax -- number of arguments |
| 151 // edi -- constructor function | 150 // edi -- constructor function |
| 152 static Register registers[] = { edi }; | 151 static Register registers[] = { edi }; |
| 153 descriptor->register_param_count_ = 1; | 152 descriptor->register_param_count_ = 1; |
| 154 | 153 |
| 155 if (constant_stack_parameter_count != 0) { | 154 if (constant_stack_parameter_count != 0) { |
| 156 // stack param count needs (constructor pointer, and single argument) | 155 // stack param count needs (constructor pointer, and single argument) |
| 157 descriptor->stack_parameter_count_ = &eax; | 156 descriptor->stack_parameter_count_ = &eax; |
| 158 } | 157 } |
| 159 descriptor->hint_stack_parameter_count_ = constant_stack_parameter_count; | 158 descriptor->hint_stack_parameter_count_ = constant_stack_parameter_count; |
| 160 descriptor->register_params_ = registers; | 159 descriptor->register_params_ = registers; |
| 161 descriptor->function_mode_ = JS_FUNCTION_STUB_MODE; | 160 descriptor->function_mode_ = JS_FUNCTION_STUB_MODE; |
| 162 descriptor->deoptimization_handler_ = | 161 descriptor->deoptimization_handler_ = |
| 163 FUNCTION_ADDR(InternalArrayConstructor_StubFailure); | 162 Runtime::FunctionForId(Runtime::kInternalArrayConstructor)->entry; |
| 164 } | 163 } |
| 165 | 164 |
| 166 | 165 |
| 167 void ArrayNoArgumentConstructorStub::InitializeInterfaceDescriptor( | 166 void ArrayNoArgumentConstructorStub::InitializeInterfaceDescriptor( |
| 168 Isolate* isolate, | 167 Isolate* isolate, |
| 169 CodeStubInterfaceDescriptor* descriptor) { | 168 CodeStubInterfaceDescriptor* descriptor) { |
| 170 InitializeArrayConstructorDescriptor(isolate, descriptor, 0); | 169 InitializeArrayConstructorDescriptor(isolate, descriptor, 0); |
| 171 } | 170 } |
| 172 | 171 |
| 173 | 172 |
| (...skipping 7917 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8091 __ jmp(generic_construct_stub, RelocInfo::CODE_TARGET); | 8090 __ jmp(generic_construct_stub, RelocInfo::CODE_TARGET); |
| 8092 } | 8091 } |
| 8093 } | 8092 } |
| 8094 | 8093 |
| 8095 | 8094 |
| 8096 #undef __ | 8095 #undef __ |
| 8097 | 8096 |
| 8098 } } // namespace v8::internal | 8097 } } // namespace v8::internal |
| 8099 | 8098 |
| 8100 #endif // V8_TARGET_ARCH_IA32 | 8099 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |