| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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_X64 | 7 #if V8_TARGET_ARCH_X64 |
| 8 | 8 |
| 9 #include "src/bootstrapper.h" | 9 #include "src/bootstrapper.h" |
| 10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 | 82 |
| 83 void RegExpConstructResultStub::InitializeInterfaceDescriptor( | 83 void RegExpConstructResultStub::InitializeInterfaceDescriptor( |
| 84 CodeStubInterfaceDescriptor* descriptor) { | 84 CodeStubInterfaceDescriptor* descriptor) { |
| 85 Register registers[] = { rcx, rbx, rax }; | 85 Register registers[] = { rcx, rbx, rax }; |
| 86 descriptor->Initialize( | 86 descriptor->Initialize( |
| 87 ARRAY_SIZE(registers), registers, | 87 ARRAY_SIZE(registers), registers, |
| 88 Runtime::FunctionForId(Runtime::kRegExpConstructResult)->entry); | 88 Runtime::FunctionForId(Runtime::kRegExpConstructResult)->entry); |
| 89 } | 89 } |
| 90 | 90 |
| 91 | 91 |
| 92 void LoadFieldStub::InitializeInterfaceDescriptor( |
| 93 CodeStubInterfaceDescriptor* descriptor) { |
| 94 Register registers[] = { rax }; |
| 95 descriptor->Initialize(ARRAY_SIZE(registers), registers); |
| 96 } |
| 97 |
| 98 |
| 99 void KeyedLoadFieldStub::InitializeInterfaceDescriptor( |
| 100 CodeStubInterfaceDescriptor* descriptor) { |
| 101 Register registers[] = { rdx }; |
| 102 descriptor->Initialize(ARRAY_SIZE(registers), registers); |
| 103 } |
| 104 |
| 105 |
| 106 void StringLengthStub::InitializeInterfaceDescriptor( |
| 107 CodeStubInterfaceDescriptor* descriptor) { |
| 108 Register registers[] = { rax, rcx }; |
| 109 descriptor->Initialize(ARRAY_SIZE(registers), registers); |
| 110 } |
| 111 |
| 112 |
| 113 void KeyedStringLengthStub::InitializeInterfaceDescriptor( |
| 114 CodeStubInterfaceDescriptor* descriptor) { |
| 115 Register registers[] = { rdx, rax }; |
| 116 descriptor->Initialize(ARRAY_SIZE(registers), registers); |
| 117 } |
| 118 |
| 119 |
| 92 void KeyedStoreFastElementStub::InitializeInterfaceDescriptor( | 120 void KeyedStoreFastElementStub::InitializeInterfaceDescriptor( |
| 93 CodeStubInterfaceDescriptor* descriptor) { | 121 CodeStubInterfaceDescriptor* descriptor) { |
| 94 Register registers[] = { rdx, rcx, rax }; | 122 Register registers[] = { rdx, rcx, rax }; |
| 95 descriptor->Initialize( | 123 descriptor->Initialize( |
| 96 ARRAY_SIZE(registers), registers, | 124 ARRAY_SIZE(registers), registers, |
| 97 FUNCTION_ADDR(KeyedStoreIC_MissFromStubFailure)); | 125 FUNCTION_ADDR(KeyedStoreIC_MissFromStubFailure)); |
| 98 } | 126 } |
| 99 | 127 |
| 100 | 128 |
| 101 void TransitionElementsKindStub::InitializeInterfaceDescriptor( | 129 void TransitionElementsKindStub::InitializeInterfaceDescriptor( |
| (...skipping 1105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1207 __ bind(&runtime); | 1235 __ bind(&runtime); |
| 1208 __ TailCallRuntime(Runtime::kNewStrictArguments, 3, 1); | 1236 __ TailCallRuntime(Runtime::kNewStrictArguments, 3, 1); |
| 1209 } | 1237 } |
| 1210 | 1238 |
| 1211 | 1239 |
| 1212 void RegExpExecStub::Generate(MacroAssembler* masm) { | 1240 void RegExpExecStub::Generate(MacroAssembler* masm) { |
| 1213 // Just jump directly to runtime if native RegExp is not selected at compile | 1241 // Just jump directly to runtime if native RegExp is not selected at compile |
| 1214 // time or if regexp entry in generated code is turned off runtime switch or | 1242 // time or if regexp entry in generated code is turned off runtime switch or |
| 1215 // at compilation. | 1243 // at compilation. |
| 1216 #ifdef V8_INTERPRETED_REGEXP | 1244 #ifdef V8_INTERPRETED_REGEXP |
| 1217 __ TailCallRuntime(Runtime::kRegExpExecRT, 4, 1); | 1245 __ TailCallRuntime(Runtime::kRegExpExec, 4, 1); |
| 1218 #else // V8_INTERPRETED_REGEXP | 1246 #else // V8_INTERPRETED_REGEXP |
| 1219 | 1247 |
| 1220 // Stack frame on entry. | 1248 // Stack frame on entry. |
| 1221 // rsp[0] : return address | 1249 // rsp[0] : return address |
| 1222 // rsp[8] : last_match_info (expected JSArray) | 1250 // rsp[8] : last_match_info (expected JSArray) |
| 1223 // rsp[16] : previous index | 1251 // rsp[16] : previous index |
| 1224 // rsp[24] : subject string | 1252 // rsp[24] : subject string |
| 1225 // rsp[32] : JSRegExp object | 1253 // rsp[32] : JSRegExp object |
| 1226 | 1254 |
| 1227 enum RegExpExecStubArgumentIndices { | 1255 enum RegExpExecStubArgumentIndices { |
| (...skipping 3722 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4950 return_value_operand, | 4978 return_value_operand, |
| 4951 NULL); | 4979 NULL); |
| 4952 } | 4980 } |
| 4953 | 4981 |
| 4954 | 4982 |
| 4955 #undef __ | 4983 #undef __ |
| 4956 | 4984 |
| 4957 } } // namespace v8::internal | 4985 } } // namespace v8::internal |
| 4958 | 4986 |
| 4959 #endif // V8_TARGET_ARCH_X64 | 4987 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |