OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 #include "src/arm64/lithium-codegen-arm64.h" | 7 #include "src/arm64/lithium-codegen-arm64.h" |
8 #include "src/arm64/lithium-gap-resolver-arm64.h" | 8 #include "src/arm64/lithium-gap-resolver-arm64.h" |
9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
10 #include "src/code-factory.h" | 10 #include "src/code-factory.h" |
(...skipping 3382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3393 __ B(ne, &done); | 3393 __ B(ne, &done); |
3394 | 3394 |
3395 // Get the prototype from the initial map. | 3395 // Get the prototype from the initial map. |
3396 __ Ldr(result, FieldMemOperand(result, Map::kPrototypeOffset)); | 3396 __ Ldr(result, FieldMemOperand(result, Map::kPrototypeOffset)); |
3397 | 3397 |
3398 // All done. | 3398 // All done. |
3399 __ Bind(&done); | 3399 __ Bind(&done); |
3400 } | 3400 } |
3401 | 3401 |
3402 | 3402 |
3403 void LCodeGen::DoLoadGlobalCell(LLoadGlobalCell* instr) { | |
3404 Register result = ToRegister(instr->result()); | |
3405 __ Mov(result, Operand(Handle<Object>(instr->hydrogen()->cell().handle()))); | |
3406 __ Ldr(result, FieldMemOperand(result, Cell::kValueOffset)); | |
3407 if (instr->hydrogen()->RequiresHoleCheck()) { | |
3408 DeoptimizeIfRoot(result, Heap::kTheHoleValueRootIndex, instr, | |
3409 Deoptimizer::kHole); | |
3410 } | |
3411 } | |
3412 | |
3413 | |
3414 template <class T> | 3403 template <class T> |
3415 void LCodeGen::EmitVectorLoadICRegisters(T* instr) { | 3404 void LCodeGen::EmitVectorLoadICRegisters(T* instr) { |
3416 DCHECK(FLAG_vector_ics); | 3405 DCHECK(FLAG_vector_ics); |
3417 Register vector_register = ToRegister(instr->temp_vector()); | 3406 Register vector_register = ToRegister(instr->temp_vector()); |
3418 Register slot_register = VectorLoadICDescriptor::SlotRegister(); | 3407 Register slot_register = VectorLoadICDescriptor::SlotRegister(); |
3419 DCHECK(vector_register.is(VectorLoadICDescriptor::VectorRegister())); | 3408 DCHECK(vector_register.is(VectorLoadICDescriptor::VectorRegister())); |
3420 DCHECK(slot_register.is(x0)); | 3409 DCHECK(slot_register.is(x0)); |
3421 | 3410 |
3422 AllowDeferredHandleDereference vector_structure_check; | 3411 AllowDeferredHandleDereference vector_structure_check; |
3423 Handle<TypeFeedbackVector> vector = instr->hydrogen()->feedback_vector(); | 3412 Handle<TypeFeedbackVector> vector = instr->hydrogen()->feedback_vector(); |
(...skipping 1756 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5180 scratch, | 5169 scratch, |
5181 GetLinkRegisterState(), | 5170 GetLinkRegisterState(), |
5182 kSaveFPRegs, | 5171 kSaveFPRegs, |
5183 EMIT_REMEMBERED_SET, | 5172 EMIT_REMEMBERED_SET, |
5184 check_needed); | 5173 check_needed); |
5185 } | 5174 } |
5186 __ Bind(&skip_assignment); | 5175 __ Bind(&skip_assignment); |
5187 } | 5176 } |
5188 | 5177 |
5189 | 5178 |
5190 void LCodeGen::DoStoreGlobalCell(LStoreGlobalCell* instr) { | |
5191 Register value = ToRegister(instr->value()); | |
5192 Register cell = ToRegister(instr->temp1()); | |
5193 | |
5194 // Load the cell. | |
5195 __ Mov(cell, Operand(instr->hydrogen()->cell().handle())); | |
5196 | |
5197 // If the cell we are storing to contains the hole it could have | |
5198 // been deleted from the property dictionary. In that case, we need | |
5199 // to update the property details in the property dictionary to mark | |
5200 // it as no longer deleted. We deoptimize in that case. | |
5201 if (instr->hydrogen()->RequiresHoleCheck()) { | |
5202 Register payload = ToRegister(instr->temp2()); | |
5203 __ Ldr(payload, FieldMemOperand(cell, Cell::kValueOffset)); | |
5204 DeoptimizeIfRoot(payload, Heap::kTheHoleValueRootIndex, instr, | |
5205 Deoptimizer::kHole); | |
5206 } | |
5207 | |
5208 // Store the value. | |
5209 __ Str(value, FieldMemOperand(cell, Cell::kValueOffset)); | |
5210 // Cells are always rescanned, so no write barrier here. | |
5211 } | |
5212 | |
5213 | |
5214 void LCodeGen::DoStoreKeyedExternal(LStoreKeyedExternal* instr) { | 5179 void LCodeGen::DoStoreKeyedExternal(LStoreKeyedExternal* instr) { |
5215 Register ext_ptr = ToRegister(instr->elements()); | 5180 Register ext_ptr = ToRegister(instr->elements()); |
5216 Register key = no_reg; | 5181 Register key = no_reg; |
5217 Register scratch; | 5182 Register scratch; |
5218 ElementsKind elements_kind = instr->elements_kind(); | 5183 ElementsKind elements_kind = instr->elements_kind(); |
5219 | 5184 |
5220 bool key_is_smi = instr->hydrogen()->key()->representation().IsSmi(); | 5185 bool key_is_smi = instr->hydrogen()->key()->representation().IsSmi(); |
5221 bool key_is_constant = instr->key()->IsConstantOperand(); | 5186 bool key_is_constant = instr->key()->IsConstantOperand(); |
5222 int constant_key = 0; | 5187 int constant_key = 0; |
5223 if (key_is_constant) { | 5188 if (key_is_constant) { |
(...skipping 878 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6102 Handle<ScopeInfo> scope_info = instr->scope_info(); | 6067 Handle<ScopeInfo> scope_info = instr->scope_info(); |
6103 __ Push(scope_info); | 6068 __ Push(scope_info); |
6104 __ Push(ToRegister(instr->function())); | 6069 __ Push(ToRegister(instr->function())); |
6105 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 6070 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
6106 RecordSafepoint(Safepoint::kNoLazyDeopt); | 6071 RecordSafepoint(Safepoint::kNoLazyDeopt); |
6107 } | 6072 } |
6108 | 6073 |
6109 | 6074 |
6110 | 6075 |
6111 } } // namespace v8::internal | 6076 } } // namespace v8::internal |
OLD | NEW |