| 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 #include "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #if V8_TARGET_ARCH_ARM64 | 7 #if V8_TARGET_ARCH_ARM64 |
| 8 | 8 |
| 9 #include "src/ic/call-optimization.h" | 9 #include "src/ic/call-optimization.h" |
| 10 #include "src/ic/handler-compiler.h" | 10 #include "src/ic/handler-compiler.h" |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 | 104 |
| 105 | 105 |
| 106 // Generate code to check that a global property cell is empty. Create | 106 // Generate code to check that a global property cell is empty. Create |
| 107 // the property cell at compilation time if no cell exists for the | 107 // the property cell at compilation time if no cell exists for the |
| 108 // property. | 108 // property. |
| 109 void PropertyHandlerCompiler::GenerateCheckPropertyCell( | 109 void PropertyHandlerCompiler::GenerateCheckPropertyCell( |
| 110 MacroAssembler* masm, Handle<JSGlobalObject> global, Handle<Name> name, | 110 MacroAssembler* masm, Handle<JSGlobalObject> global, Handle<Name> name, |
| 111 Register scratch, Label* miss) { | 111 Register scratch, Label* miss) { |
| 112 Handle<Cell> cell = JSGlobalObject::EnsurePropertyCell(global, name); | 112 Handle<Cell> cell = JSGlobalObject::EnsurePropertyCell(global, name); |
| 113 DCHECK(cell->value()->IsTheHole()); | 113 DCHECK(cell->value()->IsTheHole()); |
| 114 __ Mov(scratch, Operand(cell)); | 114 Handle<WeakCell> weak_cell = masm->isolate()->factory()->NewWeakCell(cell); |
| 115 __ LoadWeakValue(scratch, weak_cell, miss); |
| 115 __ Ldr(scratch, FieldMemOperand(scratch, Cell::kValueOffset)); | 116 __ Ldr(scratch, FieldMemOperand(scratch, Cell::kValueOffset)); |
| 116 __ JumpIfNotRoot(scratch, Heap::kTheHoleValueRootIndex, miss); | 117 __ JumpIfNotRoot(scratch, Heap::kTheHoleValueRootIndex, miss); |
| 117 } | 118 } |
| 118 | 119 |
| 119 | 120 |
| 120 static void PushInterceptorArguments(MacroAssembler* masm, Register receiver, | 121 static void PushInterceptorArguments(MacroAssembler* masm, Register receiver, |
| 121 Register holder, Register name, | 122 Register holder, Register name, |
| 122 Handle<JSObject> holder_obj) { | 123 Handle<JSObject> holder_obj) { |
| 123 STATIC_ASSERT(NamedLoadHandlerCompiler::kInterceptorArgsNameIndex == 0); | 124 STATIC_ASSERT(NamedLoadHandlerCompiler::kInterceptorArgsNameIndex == 0); |
| 124 STATIC_ASSERT(NamedLoadHandlerCompiler::kInterceptorArgsInfoIndex == 1); | 125 STATIC_ASSERT(NamedLoadHandlerCompiler::kInterceptorArgsInfoIndex == 1); |
| (...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 765 // Return the generated code. | 766 // Return the generated code. |
| 766 return GetCode(kind(), Code::FAST, name); | 767 return GetCode(kind(), Code::FAST, name); |
| 767 } | 768 } |
| 768 | 769 |
| 769 | 770 |
| 770 #undef __ | 771 #undef __ |
| 771 } | 772 } |
| 772 } // namespace v8::internal | 773 } // namespace v8::internal |
| 773 | 774 |
| 774 #endif // V8_TARGET_ARCH_IA32 | 775 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |