| 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_X64 | 5 #if V8_TARGET_ARCH_X64 |
| 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 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 break; | 173 break; |
| 174 case CallOptimization::kHolderNotFound: | 174 case CallOptimization::kHolderNotFound: |
| 175 UNREACHABLE(); | 175 UNREACHABLE(); |
| 176 break; | 176 break; |
| 177 } | 177 } |
| 178 | 178 |
| 179 Isolate* isolate = masm->isolate(); | 179 Isolate* isolate = masm->isolate(); |
| 180 Handle<CallHandlerInfo> api_call_info = optimization.api_call_info(); | 180 Handle<CallHandlerInfo> api_call_info = optimization.api_call_info(); |
| 181 bool call_data_undefined = false; | 181 bool call_data_undefined = false; |
| 182 // Put call data in place. | 182 // Put call data in place. |
| 183 if (api_call_info->data()->IsUndefined()) { | 183 if (api_call_info->data()->IsUndefined(isolate)) { |
| 184 call_data_undefined = true; | 184 call_data_undefined = true; |
| 185 __ LoadRoot(data, Heap::kUndefinedValueRootIndex); | 185 __ LoadRoot(data, Heap::kUndefinedValueRootIndex); |
| 186 } else { | 186 } else { |
| 187 if (optimization.is_constant_call()) { | 187 if (optimization.is_constant_call()) { |
| 188 __ movp(data, | 188 __ movp(data, |
| 189 FieldOperand(callee, JSFunction::kSharedFunctionInfoOffset)); | 189 FieldOperand(callee, JSFunction::kSharedFunctionInfoOffset)); |
| 190 __ movp(data, | 190 __ movp(data, |
| 191 FieldOperand(data, SharedFunctionInfo::kFunctionDataOffset)); | 191 FieldOperand(data, SharedFunctionInfo::kFunctionDataOffset)); |
| 192 __ movp(data, FieldOperand(data, FunctionTemplateInfo::kCallCodeOffset)); | 192 __ movp(data, FieldOperand(data, FunctionTemplateInfo::kCallCodeOffset)); |
| 193 } else { | 193 } else { |
| (...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 650 Handle<Code> NamedStoreHandlerCompiler::CompileStoreCallback( | 650 Handle<Code> NamedStoreHandlerCompiler::CompileStoreCallback( |
| 651 Handle<JSObject> object, Handle<Name> name, Handle<AccessorInfo> callback, | 651 Handle<JSObject> object, Handle<Name> name, Handle<AccessorInfo> callback, |
| 652 LanguageMode language_mode) { | 652 LanguageMode language_mode) { |
| 653 Register holder_reg = Frontend(name); | 653 Register holder_reg = Frontend(name); |
| 654 | 654 |
| 655 __ PopReturnAddressTo(scratch1()); | 655 __ PopReturnAddressTo(scratch1()); |
| 656 __ Push(receiver()); | 656 __ Push(receiver()); |
| 657 __ Push(holder_reg); | 657 __ Push(holder_reg); |
| 658 // If the callback cannot leak, then push the callback directly, | 658 // If the callback cannot leak, then push the callback directly, |
| 659 // otherwise wrap it in a weak cell. | 659 // otherwise wrap it in a weak cell. |
| 660 if (callback->data()->IsUndefined() || callback->data()->IsSmi()) { | 660 if (callback->data()->IsUndefined(isolate()) || callback->data()->IsSmi()) { |
| 661 __ Push(callback); | 661 __ Push(callback); |
| 662 } else { | 662 } else { |
| 663 Handle<WeakCell> cell = isolate()->factory()->NewWeakCell(callback); | 663 Handle<WeakCell> cell = isolate()->factory()->NewWeakCell(callback); |
| 664 __ Push(cell); | 664 __ Push(cell); |
| 665 } | 665 } |
| 666 __ Push(name); | 666 __ Push(name); |
| 667 __ Push(value()); | 667 __ Push(value()); |
| 668 __ Push(Smi::FromInt(language_mode)); | 668 __ Push(Smi::FromInt(language_mode)); |
| 669 __ PushReturnAddressFrom(scratch1()); | 669 __ PushReturnAddressFrom(scratch1()); |
| 670 | 670 |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 716 // Return the generated code. | 716 // Return the generated code. |
| 717 return GetCode(kind(), name); | 717 return GetCode(kind(), name); |
| 718 } | 718 } |
| 719 | 719 |
| 720 | 720 |
| 721 #undef __ | 721 #undef __ |
| 722 } // namespace internal | 722 } // namespace internal |
| 723 } // namespace v8 | 723 } // namespace v8 |
| 724 | 724 |
| 725 #endif // V8_TARGET_ARCH_X64 | 725 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |