OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_X87 | 7 #if V8_TARGET_ARCH_X87 |
8 | 8 |
9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
10 #include "src/bootstrapper.h" | 10 #include "src/bootstrapper.h" |
(...skipping 19 matching lines...) Expand all Loading... |
30 // edi -- function | 30 // edi -- function |
31 // ebx -- allocation site with elements kind | 31 // ebx -- allocation site with elements kind |
32 Address deopt_handler = Runtime::FunctionForId( | 32 Address deopt_handler = Runtime::FunctionForId( |
33 Runtime::kArrayConstructor)->entry; | 33 Runtime::kArrayConstructor)->entry; |
34 | 34 |
35 if (constant_stack_parameter_count == 0) { | 35 if (constant_stack_parameter_count == 0) { |
36 descriptor->Initialize(deopt_handler, constant_stack_parameter_count, | 36 descriptor->Initialize(deopt_handler, constant_stack_parameter_count, |
37 JS_FUNCTION_STUB_MODE); | 37 JS_FUNCTION_STUB_MODE); |
38 } else { | 38 } else { |
39 descriptor->Initialize(eax, deopt_handler, constant_stack_parameter_count, | 39 descriptor->Initialize(eax, deopt_handler, constant_stack_parameter_count, |
40 JS_FUNCTION_STUB_MODE, PASS_ARGUMENTS); | 40 JS_FUNCTION_STUB_MODE); |
41 } | 41 } |
42 } | 42 } |
43 | 43 |
44 | 44 |
45 static void InitializeInternalArrayConstructorDescriptor( | 45 static void InitializeInternalArrayConstructorDescriptor( |
46 Isolate* isolate, CodeStubDescriptor* descriptor, | 46 Isolate* isolate, CodeStubDescriptor* descriptor, |
47 int constant_stack_parameter_count) { | 47 int constant_stack_parameter_count) { |
48 // register state | 48 // register state |
49 // eax -- number of arguments | 49 // eax -- number of arguments |
50 // edi -- constructor function | 50 // edi -- constructor function |
51 Address deopt_handler = Runtime::FunctionForId( | 51 Address deopt_handler = Runtime::FunctionForId( |
52 Runtime::kInternalArrayConstructor)->entry; | 52 Runtime::kInternalArrayConstructor)->entry; |
53 | 53 |
54 if (constant_stack_parameter_count == 0) { | 54 if (constant_stack_parameter_count == 0) { |
55 descriptor->Initialize(deopt_handler, constant_stack_parameter_count, | 55 descriptor->Initialize(deopt_handler, constant_stack_parameter_count, |
56 JS_FUNCTION_STUB_MODE); | 56 JS_FUNCTION_STUB_MODE); |
57 } else { | 57 } else { |
58 descriptor->Initialize(eax, deopt_handler, constant_stack_parameter_count, | 58 descriptor->Initialize(eax, deopt_handler, constant_stack_parameter_count, |
59 JS_FUNCTION_STUB_MODE, PASS_ARGUMENTS); | 59 JS_FUNCTION_STUB_MODE); |
60 } | 60 } |
61 } | 61 } |
62 | 62 |
63 | 63 |
64 void ArrayNoArgumentConstructorStub::InitializeDescriptor( | 64 void ArrayNoArgumentConstructorStub::InitializeDescriptor( |
65 CodeStubDescriptor* descriptor) { | 65 CodeStubDescriptor* descriptor) { |
66 InitializeArrayConstructorDescriptor(isolate(), descriptor, 0); | 66 InitializeArrayConstructorDescriptor(isolate(), descriptor, 0); |
67 } | 67 } |
68 | 68 |
69 | 69 |
(...skipping 5094 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5164 Operand(ebp, 7 * kPointerSize), NULL); | 5164 Operand(ebp, 7 * kPointerSize), NULL); |
5165 } | 5165 } |
5166 | 5166 |
5167 | 5167 |
5168 #undef __ | 5168 #undef __ |
5169 | 5169 |
5170 } // namespace internal | 5170 } // namespace internal |
5171 } // namespace v8 | 5171 } // namespace v8 |
5172 | 5172 |
5173 #endif // V8_TARGET_ARCH_X87 | 5173 #endif // V8_TARGET_ARCH_X87 |
OLD | NEW |