| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 Runtime::FunctionForId(Runtime::kHiddenNumberToString)->entry; | 80 Runtime::FunctionForId(Runtime::kHiddenNumberToString)->entry; |
| 81 } | 81 } |
| 82 | 82 |
| 83 | 83 |
| 84 void FastCloneShallowArrayStub::InitializeInterfaceDescriptor( | 84 void FastCloneShallowArrayStub::InitializeInterfaceDescriptor( |
| 85 Isolate* isolate, | 85 Isolate* isolate, |
| 86 CodeStubInterfaceDescriptor* descriptor) { | 86 CodeStubInterfaceDescriptor* descriptor) { |
| 87 static Register registers[] = { rax, rbx, rcx }; | 87 static Register registers[] = { rax, rbx, rcx }; |
| 88 descriptor->register_param_count_ = 3; | 88 descriptor->register_param_count_ = 3; |
| 89 descriptor->register_params_ = registers; | 89 descriptor->register_params_ = registers; |
| 90 static Representation representations[] = { |
| 91 Representation::Tagged(), |
| 92 Representation::Smi(), |
| 93 Representation::Tagged() }; |
| 94 descriptor->register_param_representations_ = representations; |
| 90 descriptor->deoptimization_handler_ = | 95 descriptor->deoptimization_handler_ = |
| 91 Runtime::FunctionForId( | 96 Runtime::FunctionForId( |
| 92 Runtime::kHiddenCreateArrayLiteralStubBailout)->entry; | 97 Runtime::kHiddenCreateArrayLiteralStubBailout)->entry; |
| 93 } | 98 } |
| 94 | 99 |
| 95 | 100 |
| 96 void FastCloneShallowObjectStub::InitializeInterfaceDescriptor( | 101 void FastCloneShallowObjectStub::InitializeInterfaceDescriptor( |
| 97 Isolate* isolate, | 102 Isolate* isolate, |
| 98 CodeStubInterfaceDescriptor* descriptor) { | 103 CodeStubInterfaceDescriptor* descriptor) { |
| 99 static Register registers[] = { rax, rbx, rcx, rdx }; | 104 static Register registers[] = { rax, rbx, rcx, rdx }; |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 221 static Register registers_no_args[] = { rdi, rbx }; | 226 static Register registers_no_args[] = { rdi, rbx }; |
| 222 | 227 |
| 223 if (constant_stack_parameter_count == 0) { | 228 if (constant_stack_parameter_count == 0) { |
| 224 descriptor->register_param_count_ = 2; | 229 descriptor->register_param_count_ = 2; |
| 225 descriptor->register_params_ = registers_no_args; | 230 descriptor->register_params_ = registers_no_args; |
| 226 } else { | 231 } else { |
| 227 // stack param count needs (constructor pointer, and single argument) | 232 // stack param count needs (constructor pointer, and single argument) |
| 228 descriptor->handler_arguments_mode_ = PASS_ARGUMENTS; | 233 descriptor->handler_arguments_mode_ = PASS_ARGUMENTS; |
| 229 descriptor->stack_parameter_count_ = rax; | 234 descriptor->stack_parameter_count_ = rax; |
| 230 descriptor->register_param_count_ = 3; | 235 descriptor->register_param_count_ = 3; |
| 236 static Representation representations[] = { |
| 237 Representation::Tagged(), |
| 238 Representation::Tagged(), |
| 239 Representation::Integer32() }; |
| 240 descriptor->register_param_representations_ = representations; |
| 231 descriptor->register_params_ = registers_variable_args; | 241 descriptor->register_params_ = registers_variable_args; |
| 232 } | 242 } |
| 233 | 243 |
| 234 descriptor->hint_stack_parameter_count_ = constant_stack_parameter_count; | 244 descriptor->hint_stack_parameter_count_ = constant_stack_parameter_count; |
| 235 descriptor->function_mode_ = JS_FUNCTION_STUB_MODE; | 245 descriptor->function_mode_ = JS_FUNCTION_STUB_MODE; |
| 236 descriptor->deoptimization_handler_ = | 246 descriptor->deoptimization_handler_ = |
| 237 Runtime::FunctionForId(Runtime::kHiddenArrayConstructor)->entry; | 247 Runtime::FunctionForId(Runtime::kHiddenArrayConstructor)->entry; |
| 238 } | 248 } |
| 239 | 249 |
| 240 | 250 |
| 241 static void InitializeInternalArrayConstructorDescriptor( | 251 static void InitializeInternalArrayConstructorDescriptor( |
| 242 Isolate* isolate, | 252 Isolate* isolate, |
| 243 CodeStubInterfaceDescriptor* descriptor, | 253 CodeStubInterfaceDescriptor* descriptor, |
| 244 int constant_stack_parameter_count) { | 254 int constant_stack_parameter_count) { |
| 245 // register state | 255 // register state |
| 246 // rax -- number of arguments | 256 // rax -- number of arguments |
| 247 // rdi -- constructor function | 257 // rdi -- constructor function |
| 248 static Register registers_variable_args[] = { rdi, rax }; | 258 static Register registers_variable_args[] = { rdi, rax }; |
| 249 static Register registers_no_args[] = { rdi }; | 259 static Register registers_no_args[] = { rdi }; |
| 250 | 260 |
| 251 if (constant_stack_parameter_count == 0) { | 261 if (constant_stack_parameter_count == 0) { |
| 252 descriptor->register_param_count_ = 1; | 262 descriptor->register_param_count_ = 1; |
| 253 descriptor->register_params_ = registers_no_args; | 263 descriptor->register_params_ = registers_no_args; |
| 254 } else { | 264 } else { |
| 255 // stack param count needs (constructor pointer, and single argument) | 265 // stack param count needs (constructor pointer, and single argument) |
| 256 descriptor->handler_arguments_mode_ = PASS_ARGUMENTS; | 266 descriptor->handler_arguments_mode_ = PASS_ARGUMENTS; |
| 257 descriptor->stack_parameter_count_ = rax; | 267 descriptor->stack_parameter_count_ = rax; |
| 258 descriptor->register_param_count_ = 2; | 268 descriptor->register_param_count_ = 2; |
| 259 descriptor->register_params_ = registers_variable_args; | 269 descriptor->register_params_ = registers_variable_args; |
| 270 static Representation representations[] = { |
| 271 Representation::Tagged(), |
| 272 Representation::Integer32() }; |
| 273 descriptor->register_param_representations_ = representations; |
| 260 } | 274 } |
| 261 | 275 |
| 262 descriptor->hint_stack_parameter_count_ = constant_stack_parameter_count; | 276 descriptor->hint_stack_parameter_count_ = constant_stack_parameter_count; |
| 263 descriptor->function_mode_ = JS_FUNCTION_STUB_MODE; | 277 descriptor->function_mode_ = JS_FUNCTION_STUB_MODE; |
| 264 descriptor->deoptimization_handler_ = | 278 descriptor->deoptimization_handler_ = |
| 265 Runtime::FunctionForId(Runtime::kHiddenInternalArrayConstructor)->entry; | 279 Runtime::FunctionForId(Runtime::kHiddenInternalArrayConstructor)->entry; |
| 266 } | 280 } |
| 267 | 281 |
| 268 | 282 |
| 269 void ArrayNoArgumentConstructorStub::InitializeInterfaceDescriptor( | 283 void ArrayNoArgumentConstructorStub::InitializeInterfaceDescriptor( |
| (...skipping 4684 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4954 return_value_operand, | 4968 return_value_operand, |
| 4955 NULL); | 4969 NULL); |
| 4956 } | 4970 } |
| 4957 | 4971 |
| 4958 | 4972 |
| 4959 #undef __ | 4973 #undef __ |
| 4960 | 4974 |
| 4961 } } // namespace v8::internal | 4975 } } // namespace v8::internal |
| 4962 | 4976 |
| 4963 #endif // V8_TARGET_ARCH_X64 | 4977 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |