OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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 #if V8_TARGET_ARCH_S390 | 5 #if V8_TARGET_ARCH_S390 |
6 | 6 |
7 #include "src/ic/handler-compiler.h" | 7 #include "src/ic/handler-compiler.h" |
8 | 8 |
9 #include "src/api-arguments.h" | 9 #include "src/api-arguments.h" |
10 #include "src/field-type.h" | 10 #include "src/field-type.h" |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
201 __ LoadP(holder, FieldMemOperand(holder, Map::kPrototypeOffset)); | 201 __ LoadP(holder, FieldMemOperand(holder, Map::kPrototypeOffset)); |
202 } | 202 } |
203 break; | 203 break; |
204 case CallOptimization::kHolderNotFound: | 204 case CallOptimization::kHolderNotFound: |
205 UNREACHABLE(); | 205 UNREACHABLE(); |
206 break; | 206 break; |
207 } | 207 } |
208 | 208 |
209 Isolate* isolate = masm->isolate(); | 209 Isolate* isolate = masm->isolate(); |
210 Handle<CallHandlerInfo> api_call_info = optimization.api_call_info(); | 210 Handle<CallHandlerInfo> api_call_info = optimization.api_call_info(); |
211 bool call_data_undefined = false; | |
212 // Put call data in place. | 211 // Put call data in place. |
213 if (api_call_info->data()->IsUndefined(isolate)) { | 212 if (api_call_info->data()->IsUndefined(isolate)) { |
214 call_data_undefined = true; | |
215 __ LoadRoot(data, Heap::kUndefinedValueRootIndex); | 213 __ LoadRoot(data, Heap::kUndefinedValueRootIndex); |
216 } else { | 214 } else { |
217 if (optimization.is_constant_call()) { | 215 if (optimization.is_constant_call()) { |
218 __ LoadP(data, | 216 __ LoadP(data, |
219 FieldMemOperand(callee, JSFunction::kSharedFunctionInfoOffset)); | 217 FieldMemOperand(callee, JSFunction::kSharedFunctionInfoOffset)); |
220 __ LoadP(data, | 218 __ LoadP(data, |
221 FieldMemOperand(data, SharedFunctionInfo::kFunctionDataOffset)); | 219 FieldMemOperand(data, SharedFunctionInfo::kFunctionDataOffset)); |
222 __ LoadP(data, | 220 __ LoadP(data, |
223 FieldMemOperand(data, FunctionTemplateInfo::kCallCodeOffset)); | 221 FieldMemOperand(data, FunctionTemplateInfo::kCallCodeOffset)); |
224 } else { | 222 } else { |
225 __ LoadP(data, | 223 __ LoadP(data, |
226 FieldMemOperand(callee, FunctionTemplateInfo::kCallCodeOffset)); | 224 FieldMemOperand(callee, FunctionTemplateInfo::kCallCodeOffset)); |
227 } | 225 } |
228 __ LoadP(data, FieldMemOperand(data, CallHandlerInfo::kDataOffset)); | 226 __ LoadP(data, FieldMemOperand(data, CallHandlerInfo::kDataOffset)); |
229 } | 227 } |
230 | 228 |
231 // Put api_function_address in place. | 229 // Put api_function_address in place. |
232 Address function_address = v8::ToCData<Address>(api_call_info->callback()); | 230 Address function_address = v8::ToCData<Address>(api_call_info->callback()); |
233 ApiFunction fun(function_address); | 231 ApiFunction fun(function_address); |
234 ExternalReference::Type type = ExternalReference::DIRECT_API_CALL; | 232 ExternalReference::Type type = ExternalReference::DIRECT_API_CALL; |
235 ExternalReference ref = ExternalReference(&fun, type, masm->isolate()); | 233 ExternalReference ref = ExternalReference(&fun, type, masm->isolate()); |
236 __ mov(api_function_address, Operand(ref)); | 234 __ mov(api_function_address, Operand(ref)); |
237 | 235 |
238 // Jump to stub. | 236 // Jump to stub. |
239 CallApiCallbackStub stub(isolate, is_store, call_data_undefined, | 237 CallApiCallbackStub stub(isolate, is_store, !optimization.is_constant_call()); |
240 !optimization.is_constant_call()); | |
241 __ TailCallStub(&stub); | 238 __ TailCallStub(&stub); |
242 } | 239 } |
243 | 240 |
244 #undef __ | 241 #undef __ |
245 #define __ ACCESS_MASM(masm()) | 242 #define __ ACCESS_MASM(masm()) |
246 | 243 |
247 void NamedStoreHandlerCompiler::GenerateRestoreName(Label* label, | 244 void NamedStoreHandlerCompiler::GenerateRestoreName(Label* label, |
248 Handle<Name> name) { | 245 Handle<Name> name) { |
249 if (!label->is_unused()) { | 246 if (!label->is_unused()) { |
250 __ bind(label); | 247 __ bind(label); |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
410 | 407 |
411 Register NamedStoreHandlerCompiler::value() { | 408 Register NamedStoreHandlerCompiler::value() { |
412 return StoreDescriptor::ValueRegister(); | 409 return StoreDescriptor::ValueRegister(); |
413 } | 410 } |
414 | 411 |
415 #undef __ | 412 #undef __ |
416 } // namespace internal | 413 } // namespace internal |
417 } // namespace v8 | 414 } // namespace v8 |
418 | 415 |
419 #endif // V8_TARGET_ARCH_ARM | 416 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |