| 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_PPC | 5 #if V8_TARGET_ARCH_PPC |
| 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 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 278 break; | 278 break; |
| 279 case CallOptimization::kHolderNotFound: | 279 case CallOptimization::kHolderNotFound: |
| 280 UNREACHABLE(); | 280 UNREACHABLE(); |
| 281 break; | 281 break; |
| 282 } | 282 } |
| 283 | 283 |
| 284 Isolate* isolate = masm->isolate(); | 284 Isolate* isolate = masm->isolate(); |
| 285 Handle<CallHandlerInfo> api_call_info = optimization.api_call_info(); | 285 Handle<CallHandlerInfo> api_call_info = optimization.api_call_info(); |
| 286 bool call_data_undefined = false; | 286 bool call_data_undefined = false; |
| 287 // Put call data in place. | 287 // Put call data in place. |
| 288 if (api_call_info->data()->IsUndefined()) { | 288 if (api_call_info->data()->IsUndefined(isolate)) { |
| 289 call_data_undefined = true; | 289 call_data_undefined = true; |
| 290 __ LoadRoot(data, Heap::kUndefinedValueRootIndex); | 290 __ LoadRoot(data, Heap::kUndefinedValueRootIndex); |
| 291 } else { | 291 } else { |
| 292 if (optimization.is_constant_call()) { | 292 if (optimization.is_constant_call()) { |
| 293 __ LoadP(data, | 293 __ LoadP(data, |
| 294 FieldMemOperand(callee, JSFunction::kSharedFunctionInfoOffset)); | 294 FieldMemOperand(callee, JSFunction::kSharedFunctionInfoOffset)); |
| 295 __ LoadP(data, | 295 __ LoadP(data, |
| 296 FieldMemOperand(data, SharedFunctionInfo::kFunctionDataOffset)); | 296 FieldMemOperand(data, SharedFunctionInfo::kFunctionDataOffset)); |
| 297 __ LoadP(data, | 297 __ LoadP(data, |
| 298 FieldMemOperand(data, FunctionTemplateInfo::kCallCodeOffset)); | 298 FieldMemOperand(data, FunctionTemplateInfo::kCallCodeOffset)); |
| (...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 634 | 634 |
| 635 Handle<Code> NamedStoreHandlerCompiler::CompileStoreCallback( | 635 Handle<Code> NamedStoreHandlerCompiler::CompileStoreCallback( |
| 636 Handle<JSObject> object, Handle<Name> name, Handle<AccessorInfo> callback, | 636 Handle<JSObject> object, Handle<Name> name, Handle<AccessorInfo> callback, |
| 637 LanguageMode language_mode) { | 637 LanguageMode language_mode) { |
| 638 Register holder_reg = Frontend(name); | 638 Register holder_reg = Frontend(name); |
| 639 | 639 |
| 640 __ Push(receiver(), holder_reg); // receiver | 640 __ Push(receiver(), holder_reg); // receiver |
| 641 | 641 |
| 642 // If the callback cannot leak, then push the callback directly, | 642 // If the callback cannot leak, then push the callback directly, |
| 643 // otherwise wrap it in a weak cell. | 643 // otherwise wrap it in a weak cell. |
| 644 if (callback->data()->IsUndefined() || callback->data()->IsSmi()) { | 644 if (callback->data()->IsUndefined(isolate()) || callback->data()->IsSmi()) { |
| 645 __ mov(ip, Operand(callback)); | 645 __ mov(ip, Operand(callback)); |
| 646 } else { | 646 } else { |
| 647 Handle<WeakCell> cell = isolate()->factory()->NewWeakCell(callback); | 647 Handle<WeakCell> cell = isolate()->factory()->NewWeakCell(callback); |
| 648 __ mov(ip, Operand(cell)); | 648 __ mov(ip, Operand(cell)); |
| 649 } | 649 } |
| 650 __ push(ip); | 650 __ push(ip); |
| 651 __ mov(ip, Operand(name)); | 651 __ mov(ip, Operand(name)); |
| 652 __ Push(ip, value()); | 652 __ Push(ip, value()); |
| 653 __ Push(Smi::FromInt(language_mode)); | 653 __ Push(Smi::FromInt(language_mode)); |
| 654 | 654 |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 698 // Return the generated code. | 698 // Return the generated code. |
| 699 return GetCode(kind(), name); | 699 return GetCode(kind(), name); |
| 700 } | 700 } |
| 701 | 701 |
| 702 | 702 |
| 703 #undef __ | 703 #undef __ |
| 704 } // namespace internal | 704 } // namespace internal |
| 705 } // namespace v8 | 705 } // namespace v8 |
| 706 | 706 |
| 707 #endif // V8_TARGET_ARCH_ARM | 707 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |