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_MIPS64 | 5 #if V8_TARGET_ARCH_MIPS64 |
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 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
272 break; | 272 break; |
273 case CallOptimization::kHolderNotFound: | 273 case CallOptimization::kHolderNotFound: |
274 UNREACHABLE(); | 274 UNREACHABLE(); |
275 break; | 275 break; |
276 } | 276 } |
277 | 277 |
278 Isolate* isolate = masm->isolate(); | 278 Isolate* isolate = masm->isolate(); |
279 Handle<CallHandlerInfo> api_call_info = optimization.api_call_info(); | 279 Handle<CallHandlerInfo> api_call_info = optimization.api_call_info(); |
280 bool call_data_undefined = false; | 280 bool call_data_undefined = false; |
281 // Put call data in place. | 281 // Put call data in place. |
282 if (api_call_info->data()->IsUndefined()) { | 282 if (api_call_info->data()->IsUndefined(isolate)) { |
283 call_data_undefined = true; | 283 call_data_undefined = true; |
284 __ LoadRoot(data, Heap::kUndefinedValueRootIndex); | 284 __ LoadRoot(data, Heap::kUndefinedValueRootIndex); |
285 } else { | 285 } else { |
286 if (optimization.is_constant_call()) { | 286 if (optimization.is_constant_call()) { |
287 __ ld(data, | 287 __ ld(data, |
288 FieldMemOperand(callee, JSFunction::kSharedFunctionInfoOffset)); | 288 FieldMemOperand(callee, JSFunction::kSharedFunctionInfoOffset)); |
289 __ ld(data, | 289 __ ld(data, |
290 FieldMemOperand(data, SharedFunctionInfo::kFunctionDataOffset)); | 290 FieldMemOperand(data, SharedFunctionInfo::kFunctionDataOffset)); |
291 __ ld(data, FieldMemOperand(data, FunctionTemplateInfo::kCallCodeOffset)); | 291 __ ld(data, FieldMemOperand(data, FunctionTemplateInfo::kCallCodeOffset)); |
292 } else { | 292 } else { |
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
624 | 624 |
625 | 625 |
626 Handle<Code> NamedStoreHandlerCompiler::CompileStoreCallback( | 626 Handle<Code> NamedStoreHandlerCompiler::CompileStoreCallback( |
627 Handle<JSObject> object, Handle<Name> name, Handle<AccessorInfo> callback, | 627 Handle<JSObject> object, Handle<Name> name, Handle<AccessorInfo> callback, |
628 LanguageMode language_mode) { | 628 LanguageMode language_mode) { |
629 Register holder_reg = Frontend(name); | 629 Register holder_reg = Frontend(name); |
630 | 630 |
631 __ Push(receiver(), holder_reg); // Receiver. | 631 __ Push(receiver(), holder_reg); // Receiver. |
632 // If the callback cannot leak, then push the callback directly, | 632 // If the callback cannot leak, then push the callback directly, |
633 // otherwise wrap it in a weak cell. | 633 // otherwise wrap it in a weak cell. |
634 if (callback->data()->IsUndefined() || callback->data()->IsSmi()) { | 634 if (callback->data()->IsUndefined(isolate()) || callback->data()->IsSmi()) { |
635 __ li(at, Operand(callback)); | 635 __ li(at, Operand(callback)); |
636 } else { | 636 } else { |
637 Handle<WeakCell> cell = isolate()->factory()->NewWeakCell(callback); | 637 Handle<WeakCell> cell = isolate()->factory()->NewWeakCell(callback); |
638 __ li(at, Operand(cell)); | 638 __ li(at, Operand(cell)); |
639 } | 639 } |
640 __ push(at); | 640 __ push(at); |
641 __ li(at, Operand(name)); | 641 __ li(at, Operand(name)); |
642 __ Push(at, value()); | 642 __ Push(at, value()); |
643 __ Push(Smi::FromInt(language_mode)); | 643 __ Push(Smi::FromInt(language_mode)); |
644 | 644 |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
689 // Return the generated code. | 689 // Return the generated code. |
690 return GetCode(kind(), name); | 690 return GetCode(kind(), name); |
691 } | 691 } |
692 | 692 |
693 | 693 |
694 #undef __ | 694 #undef __ |
695 } // namespace internal | 695 } // namespace internal |
696 } // namespace v8 | 696 } // namespace v8 |
697 | 697 |
698 #endif // V8_TARGET_ARCH_MIPS64 | 698 #endif // V8_TARGET_ARCH_MIPS64 |
OLD | NEW |