| 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/ast/scopes.h" | 5 #include "src/ast/scopes.h" |
| 6 #include "src/compiler/code-generator.h" | 6 #include "src/compiler/code-generator.h" |
| 7 #include "src/compiler/code-generator-impl.h" | 7 #include "src/compiler/code-generator-impl.h" |
| 8 #include "src/compiler/gap-resolver.h" | 8 #include "src/compiler/gap-resolver.h" |
| 9 #include "src/compiler/node-matchers.h" | 9 #include "src/compiler/node-matchers.h" |
| 10 #include "src/compiler/osr.h" | 10 #include "src/compiler/osr.h" |
| (...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 scratch1_(scratch1), | 223 scratch1_(scratch1), |
| 224 mode_(mode) {} | 224 mode_(mode) {} |
| 225 | 225 |
| 226 void Generate() final { | 226 void Generate() final { |
| 227 if (mode_ > RecordWriteMode::kValueIsPointer) { | 227 if (mode_ > RecordWriteMode::kValueIsPointer) { |
| 228 __ JumpIfSmi(value_, exit()); | 228 __ JumpIfSmi(value_, exit()); |
| 229 } | 229 } |
| 230 __ CheckPageFlag(value_, scratch0_, | 230 __ CheckPageFlag(value_, scratch0_, |
| 231 MemoryChunk::kPointersToHereAreInterestingMask, eq, | 231 MemoryChunk::kPointersToHereAreInterestingMask, eq, |
| 232 exit()); | 232 exit()); |
| 233 RememberedSetAction const remembered_set_action = |
| 234 mode_ > RecordWriteMode::kValueIsMap ? EMIT_REMEMBERED_SET |
| 235 : OMIT_REMEMBERED_SET; |
| 233 SaveFPRegsMode const save_fp_mode = | 236 SaveFPRegsMode const save_fp_mode = |
| 234 frame()->DidAllocateDoubleRegisters() ? kSaveFPRegs : kDontSaveFPRegs; | 237 frame()->DidAllocateDoubleRegisters() ? kSaveFPRegs : kDontSaveFPRegs; |
| 235 if (!frame()->needs_frame()) { | 238 if (!frame()->needs_frame()) { |
| 236 // We need to save and restore ra if the frame was elided. | 239 // We need to save and restore ra if the frame was elided. |
| 237 __ Push(ra); | 240 __ Push(ra); |
| 238 } | 241 } |
| 239 RecordWriteStub stub(isolate(), object_, scratch0_, scratch1_, | 242 RecordWriteStub stub(isolate(), object_, scratch0_, scratch1_, |
| 240 EMIT_REMEMBERED_SET, save_fp_mode); | 243 remembered_set_action, save_fp_mode); |
| 241 __ Addu(scratch1_, object_, index_); | 244 __ Addu(scratch1_, object_, index_); |
| 242 __ CallStub(&stub); | 245 __ CallStub(&stub); |
| 243 if (!frame()->needs_frame()) { | 246 if (!frame()->needs_frame()) { |
| 244 __ Pop(ra); | 247 __ Pop(ra); |
| 245 } | 248 } |
| 246 } | 249 } |
| 247 | 250 |
| 248 private: | 251 private: |
| 249 Register const object_; | 252 Register const object_; |
| 250 Register const index_; | 253 Register const index_; |
| (...skipping 1570 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1821 padding_size -= v8::internal::Assembler::kInstrSize; | 1824 padding_size -= v8::internal::Assembler::kInstrSize; |
| 1822 } | 1825 } |
| 1823 } | 1826 } |
| 1824 } | 1827 } |
| 1825 | 1828 |
| 1826 #undef __ | 1829 #undef __ |
| 1827 | 1830 |
| 1828 } // namespace compiler | 1831 } // namespace compiler |
| 1829 } // namespace internal | 1832 } // namespace internal |
| 1830 } // namespace v8 | 1833 } // namespace v8 |
| OLD | NEW |