| 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 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 scratch1_(scratch1), | 238 scratch1_(scratch1), |
| 239 mode_(mode) {} | 239 mode_(mode) {} |
| 240 | 240 |
| 241 void Generate() final { | 241 void Generate() final { |
| 242 if (mode_ > RecordWriteMode::kValueIsPointer) { | 242 if (mode_ > RecordWriteMode::kValueIsPointer) { |
| 243 __ JumpIfSmi(value_, exit()); | 243 __ JumpIfSmi(value_, exit()); |
| 244 } | 244 } |
| 245 __ CheckPageFlag(value_, scratch0_, | 245 __ CheckPageFlag(value_, scratch0_, |
| 246 MemoryChunk::kPointersToHereAreInterestingMask, zero, | 246 MemoryChunk::kPointersToHereAreInterestingMask, zero, |
| 247 exit()); | 247 exit()); |
| 248 RememberedSetAction const remembered_set_action = |
| 249 mode_ > RecordWriteMode::kValueIsMap ? EMIT_REMEMBERED_SET |
| 250 : OMIT_REMEMBERED_SET; |
| 248 SaveFPRegsMode const save_fp_mode = | 251 SaveFPRegsMode const save_fp_mode = |
| 249 frame()->DidAllocateDoubleRegisters() ? kSaveFPRegs : kDontSaveFPRegs; | 252 frame()->DidAllocateDoubleRegisters() ? kSaveFPRegs : kDontSaveFPRegs; |
| 250 RecordWriteStub stub(isolate(), object_, scratch0_, scratch1_, | 253 RecordWriteStub stub(isolate(), object_, scratch0_, scratch1_, |
| 251 EMIT_REMEMBERED_SET, save_fp_mode); | 254 remembered_set_action, save_fp_mode); |
| 252 __ lea(scratch1_, operand_); | 255 __ lea(scratch1_, operand_); |
| 253 __ CallStub(&stub); | 256 __ CallStub(&stub); |
| 254 } | 257 } |
| 255 | 258 |
| 256 private: | 259 private: |
| 257 Register const object_; | 260 Register const object_; |
| 258 Operand const operand_; | 261 Operand const operand_; |
| 259 Register const value_; | 262 Register const value_; |
| 260 Register const scratch0_; | 263 Register const scratch0_; |
| 261 Register const scratch1_; | 264 Register const scratch1_; |
| (...skipping 1491 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1753 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; | 1756 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; |
| 1754 __ Nop(padding_size); | 1757 __ Nop(padding_size); |
| 1755 } | 1758 } |
| 1756 } | 1759 } |
| 1757 | 1760 |
| 1758 #undef __ | 1761 #undef __ |
| 1759 | 1762 |
| 1760 } // namespace compiler | 1763 } // namespace compiler |
| 1761 } // namespace internal | 1764 } // namespace internal |
| 1762 } // namespace v8 | 1765 } // namespace v8 |
| OLD | NEW |