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

Side by Side Diff: src/compiler/x64/code-generator-x64.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/ppc/code-generator-ppc.cc ('k') | src/compiler/x87/code-generator-x87.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 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/compiler/code-generator.h" 5 #include "src/compiler/code-generator.h"
6 6
7 #include "src/ast/scopes.h" 7 #include "src/ast/scopes.h"
8 #include "src/compiler/code-generator-impl.h" 8 #include "src/compiler/code-generator-impl.h"
9 #include "src/compiler/gap-resolver.h" 9 #include "src/compiler/gap-resolver.h"
10 #include "src/compiler/node-matchers.h" 10 #include "src/compiler/node-matchers.h"
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 scratch1_(scratch1), 205 scratch1_(scratch1),
206 mode_(mode) {} 206 mode_(mode) {}
207 207
208 void Generate() final { 208 void Generate() final {
209 if (mode_ > RecordWriteMode::kValueIsPointer) { 209 if (mode_ > RecordWriteMode::kValueIsPointer) {
210 __ JumpIfSmi(value_, exit()); 210 __ JumpIfSmi(value_, exit());
211 } 211 }
212 __ CheckPageFlag(value_, scratch0_, 212 __ CheckPageFlag(value_, scratch0_,
213 MemoryChunk::kPointersToHereAreInterestingMask, zero, 213 MemoryChunk::kPointersToHereAreInterestingMask, zero,
214 exit()); 214 exit());
215 RememberedSetAction const remembered_set_action =
216 mode_ > RecordWriteMode::kValueIsMap ? EMIT_REMEMBERED_SET
217 : OMIT_REMEMBERED_SET;
215 SaveFPRegsMode const save_fp_mode = 218 SaveFPRegsMode const save_fp_mode =
216 frame()->DidAllocateDoubleRegisters() ? kSaveFPRegs : kDontSaveFPRegs; 219 frame()->DidAllocateDoubleRegisters() ? kSaveFPRegs : kDontSaveFPRegs;
217 RecordWriteStub stub(isolate(), object_, scratch0_, scratch1_, 220 RecordWriteStub stub(isolate(), object_, scratch0_, scratch1_,
218 EMIT_REMEMBERED_SET, save_fp_mode); 221 remembered_set_action, save_fp_mode);
219 __ leap(scratch1_, operand_); 222 __ leap(scratch1_, operand_);
220 __ CallStub(&stub); 223 __ CallStub(&stub);
221 } 224 }
222 225
223 private: 226 private:
224 Register const object_; 227 Register const object_;
225 Operand const operand_; 228 Operand const operand_;
226 Register const value_; 229 Register const value_;
227 Register const scratch0_; 230 Register const scratch0_;
228 Register const scratch1_; 231 Register const scratch1_;
(...skipping 1959 matching lines...) Expand 10 before | Expand all | Expand 10 after
2188 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; 2191 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc;
2189 __ Nop(padding_size); 2192 __ Nop(padding_size);
2190 } 2193 }
2191 } 2194 }
2192 2195
2193 #undef __ 2196 #undef __
2194 2197
2195 } // namespace compiler 2198 } // namespace compiler
2196 } // namespace internal 2199 } // namespace internal
2197 } // namespace v8 2200 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/ppc/code-generator-ppc.cc ('k') | src/compiler/x87/code-generator-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698