| 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/compiler/code-generator.h" | 5 #include "src/compiler/code-generator.h" |
| 6 | 6 |
| 7 #include "src/arm64/frames-arm64.h" | 7 #include "src/arm64/frames-arm64.h" |
| 8 #include "src/arm64/macro-assembler-arm64.h" | 8 #include "src/arm64/macro-assembler-arm64.h" |
| 9 #include "src/ast/scopes.h" | 9 #include "src/ast/scopes.h" |
| 10 #include "src/compiler/code-generator-impl.h" | 10 #include "src/compiler/code-generator-impl.h" |
| (...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 281 scratch1_(scratch1), | 281 scratch1_(scratch1), |
| 282 mode_(mode) {} | 282 mode_(mode) {} |
| 283 | 283 |
| 284 void Generate() final { | 284 void Generate() final { |
| 285 if (mode_ > RecordWriteMode::kValueIsPointer) { | 285 if (mode_ > RecordWriteMode::kValueIsPointer) { |
| 286 __ JumpIfSmi(value_, exit()); | 286 __ JumpIfSmi(value_, exit()); |
| 287 } | 287 } |
| 288 __ CheckPageFlagClear(value_, scratch0_, | 288 __ CheckPageFlagClear(value_, scratch0_, |
| 289 MemoryChunk::kPointersToHereAreInterestingMask, | 289 MemoryChunk::kPointersToHereAreInterestingMask, |
| 290 exit()); | 290 exit()); |
| 291 RememberedSetAction const remembered_set_action = |
| 292 mode_ > RecordWriteMode::kValueIsMap ? EMIT_REMEMBERED_SET |
| 293 : OMIT_REMEMBERED_SET; |
| 291 SaveFPRegsMode const save_fp_mode = | 294 SaveFPRegsMode const save_fp_mode = |
| 292 frame()->DidAllocateDoubleRegisters() ? kSaveFPRegs : kDontSaveFPRegs; | 295 frame()->DidAllocateDoubleRegisters() ? kSaveFPRegs : kDontSaveFPRegs; |
| 293 if (!frame()->needs_frame()) { | 296 if (!frame()->needs_frame()) { |
| 294 // We need to save and restore lr if the frame was elided. | 297 // We need to save and restore lr if the frame was elided. |
| 295 __ Push(lr); | 298 __ Push(lr); |
| 296 } | 299 } |
| 297 RecordWriteStub stub(isolate(), object_, scratch0_, scratch1_, | 300 RecordWriteStub stub(isolate(), object_, scratch0_, scratch1_, |
| 298 EMIT_REMEMBERED_SET, save_fp_mode); | 301 remembered_set_action, save_fp_mode); |
| 299 __ Add(scratch1_, object_, index_); | 302 __ Add(scratch1_, object_, index_); |
| 300 __ CallStub(&stub); | 303 __ CallStub(&stub); |
| 301 if (!frame()->needs_frame()) { | 304 if (!frame()->needs_frame()) { |
| 302 __ Pop(lr); | 305 __ Pop(lr); |
| 303 } | 306 } |
| 304 } | 307 } |
| 305 | 308 |
| 306 private: | 309 private: |
| 307 Register const object_; | 310 Register const object_; |
| 308 Operand const index_; | 311 Operand const index_; |
| (...skipping 1413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1722 padding_size -= kInstructionSize; | 1725 padding_size -= kInstructionSize; |
| 1723 } | 1726 } |
| 1724 } | 1727 } |
| 1725 } | 1728 } |
| 1726 | 1729 |
| 1727 #undef __ | 1730 #undef __ |
| 1728 | 1731 |
| 1729 } // namespace compiler | 1732 } // namespace compiler |
| 1730 } // namespace internal | 1733 } // namespace internal |
| 1731 } // namespace v8 | 1734 } // namespace v8 |
| OLD | NEW |