| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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_ARM | 5 #if V8_TARGET_ARCH_ARM |
| 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 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 283 break; | 283 break; |
| 284 case CallOptimization::kHolderNotFound: | 284 case CallOptimization::kHolderNotFound: |
| 285 UNREACHABLE(); | 285 UNREACHABLE(); |
| 286 break; | 286 break; |
| 287 } | 287 } |
| 288 | 288 |
| 289 Isolate* isolate = masm->isolate(); | 289 Isolate* isolate = masm->isolate(); |
| 290 Handle<CallHandlerInfo> api_call_info = optimization.api_call_info(); | 290 Handle<CallHandlerInfo> api_call_info = optimization.api_call_info(); |
| 291 bool call_data_undefined = false; | 291 bool call_data_undefined = false; |
| 292 // Put call data in place. | 292 // Put call data in place. |
| 293 if (api_call_info->data()->IsUndefined()) { | 293 if (api_call_info->data()->IsUndefined(isolate)) { |
| 294 call_data_undefined = true; | 294 call_data_undefined = true; |
| 295 __ LoadRoot(data, Heap::kUndefinedValueRootIndex); | 295 __ LoadRoot(data, Heap::kUndefinedValueRootIndex); |
| 296 } else { | 296 } else { |
| 297 if (optimization.is_constant_call()) { | 297 if (optimization.is_constant_call()) { |
| 298 __ ldr(data, | 298 __ ldr(data, |
| 299 FieldMemOperand(callee, JSFunction::kSharedFunctionInfoOffset)); | 299 FieldMemOperand(callee, JSFunction::kSharedFunctionInfoOffset)); |
| 300 __ ldr(data, | 300 __ ldr(data, |
| 301 FieldMemOperand(data, SharedFunctionInfo::kFunctionDataOffset)); | 301 FieldMemOperand(data, SharedFunctionInfo::kFunctionDataOffset)); |
| 302 __ ldr(data, | 302 __ ldr(data, |
| 303 FieldMemOperand(data, FunctionTemplateInfo::kCallCodeOffset)); | 303 FieldMemOperand(data, FunctionTemplateInfo::kCallCodeOffset)); |
| (...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 640 Handle<Code> NamedStoreHandlerCompiler::CompileStoreCallback( | 640 Handle<Code> NamedStoreHandlerCompiler::CompileStoreCallback( |
| 641 Handle<JSObject> object, Handle<Name> name, Handle<AccessorInfo> callback, | 641 Handle<JSObject> object, Handle<Name> name, Handle<AccessorInfo> callback, |
| 642 LanguageMode language_mode) { | 642 LanguageMode language_mode) { |
| 643 Register holder_reg = Frontend(name); | 643 Register holder_reg = Frontend(name); |
| 644 | 644 |
| 645 __ push(receiver()); // receiver | 645 __ push(receiver()); // receiver |
| 646 __ push(holder_reg); | 646 __ push(holder_reg); |
| 647 | 647 |
| 648 // If the callback cannot leak, then push the callback directly, | 648 // If the callback cannot leak, then push the callback directly, |
| 649 // otherwise wrap it in a weak cell. | 649 // otherwise wrap it in a weak cell. |
| 650 if (callback->data()->IsUndefined() || callback->data()->IsSmi()) { | 650 if (callback->data()->IsUndefined(isolate()) || callback->data()->IsSmi()) { |
| 651 __ mov(ip, Operand(callback)); | 651 __ mov(ip, Operand(callback)); |
| 652 } else { | 652 } else { |
| 653 Handle<WeakCell> cell = isolate()->factory()->NewWeakCell(callback); | 653 Handle<WeakCell> cell = isolate()->factory()->NewWeakCell(callback); |
| 654 __ mov(ip, Operand(cell)); | 654 __ mov(ip, Operand(cell)); |
| 655 } | 655 } |
| 656 __ push(ip); | 656 __ push(ip); |
| 657 __ mov(ip, Operand(name)); | 657 __ mov(ip, Operand(name)); |
| 658 __ Push(ip, value()); | 658 __ Push(ip, value()); |
| 659 __ Push(Smi::FromInt(language_mode)); | 659 __ Push(Smi::FromInt(language_mode)); |
| 660 | 660 |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 704 // Return the generated code. | 704 // Return the generated code. |
| 705 return GetCode(kind(), name); | 705 return GetCode(kind(), name); |
| 706 } | 706 } |
| 707 | 707 |
| 708 | 708 |
| 709 #undef __ | 709 #undef __ |
| 710 } // namespace internal | 710 } // namespace internal |
| 711 } // namespace v8 | 711 } // namespace v8 |
| 712 | 712 |
| 713 #endif // V8_TARGET_ARCH_ARM | 713 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |