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/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 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
242 scratch1_(scratch1), | 242 scratch1_(scratch1), |
243 mode_(mode) {} | 243 mode_(mode) {} |
244 | 244 |
245 void Generate() final { | 245 void Generate() final { |
246 if (mode_ > RecordWriteMode::kValueIsPointer) { | 246 if (mode_ > RecordWriteMode::kValueIsPointer) { |
247 __ JumpIfSmi(value_, exit()); | 247 __ JumpIfSmi(value_, exit()); |
248 } | 248 } |
249 __ CheckPageFlag(value_, scratch0_, | 249 __ CheckPageFlag(value_, scratch0_, |
250 MemoryChunk::kPointersToHereAreInterestingMask, zero, | 250 MemoryChunk::kPointersToHereAreInterestingMask, zero, |
251 exit()); | 251 exit()); |
| 252 RememberedSetAction const remembered_set_action = |
| 253 mode_ > RecordWriteMode::kValueIsMap ? EMIT_REMEMBERED_SET |
| 254 : OMIT_REMEMBERED_SET; |
252 SaveFPRegsMode const save_fp_mode = | 255 SaveFPRegsMode const save_fp_mode = |
253 frame()->DidAllocateDoubleRegisters() ? kSaveFPRegs : kDontSaveFPRegs; | 256 frame()->DidAllocateDoubleRegisters() ? kSaveFPRegs : kDontSaveFPRegs; |
254 RecordWriteStub stub(isolate(), object_, scratch0_, scratch1_, | 257 RecordWriteStub stub(isolate(), object_, scratch0_, scratch1_, |
255 EMIT_REMEMBERED_SET, save_fp_mode); | 258 remembered_set_action, save_fp_mode); |
256 __ lea(scratch1_, operand_); | 259 __ lea(scratch1_, operand_); |
257 __ CallStub(&stub); | 260 __ CallStub(&stub); |
258 } | 261 } |
259 | 262 |
260 private: | 263 private: |
261 Register const object_; | 264 Register const object_; |
262 Operand const operand_; | 265 Operand const operand_; |
263 Register const value_; | 266 Register const value_; |
264 Register const scratch0_; | 267 Register const scratch0_; |
265 Register const scratch1_; | 268 Register const scratch1_; |
(...skipping 1961 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2227 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; | 2230 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; |
2228 __ Nop(padding_size); | 2231 __ Nop(padding_size); |
2229 } | 2232 } |
2230 } | 2233 } |
2231 | 2234 |
2232 #undef __ | 2235 #undef __ |
2233 | 2236 |
2234 } // namespace compiler | 2237 } // namespace compiler |
2235 } // namespace internal | 2238 } // namespace internal |
2236 } // namespace v8 | 2239 } // namespace v8 |
OLD | NEW |