Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(535)

Side by Side Diff: src/compiler/arm64/code-generator-arm64.cc

Issue 1716163003: [turbofan] Pick remembered set action for write barrier. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/compiler/arm/code-generator-arm.cc ('k') | src/compiler/ia32/code-generator-ia32.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/compiler/arm/code-generator-arm.cc ('k') | src/compiler/ia32/code-generator-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698