| 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/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 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 scratch1_(scratch1), | 185 scratch1_(scratch1), |
| 186 mode_(mode) {} | 186 mode_(mode) {} |
| 187 | 187 |
| 188 void Generate() final { | 188 void Generate() final { |
| 189 if (mode_ > RecordWriteMode::kValueIsPointer) { | 189 if (mode_ > RecordWriteMode::kValueIsPointer) { |
| 190 __ JumpIfSmi(value_, exit()); | 190 __ JumpIfSmi(value_, exit()); |
| 191 } | 191 } |
| 192 __ CheckPageFlag(value_, scratch0_, | 192 __ CheckPageFlag(value_, scratch0_, |
| 193 MemoryChunk::kPointersToHereAreInterestingMask, eq, | 193 MemoryChunk::kPointersToHereAreInterestingMask, eq, |
| 194 exit()); | 194 exit()); |
| 195 RememberedSetAction const remembered_set_action = |
| 196 mode_ > RecordWriteMode::kValueIsMap ? EMIT_REMEMBERED_SET |
| 197 : OMIT_REMEMBERED_SET; |
| 195 SaveFPRegsMode const save_fp_mode = | 198 SaveFPRegsMode const save_fp_mode = |
| 196 frame()->DidAllocateDoubleRegisters() ? kSaveFPRegs : kDontSaveFPRegs; | 199 frame()->DidAllocateDoubleRegisters() ? kSaveFPRegs : kDontSaveFPRegs; |
| 197 if (!frame()->needs_frame()) { | 200 if (!frame()->needs_frame()) { |
| 198 // We need to save and restore lr if the frame was elided. | 201 // We need to save and restore lr if the frame was elided. |
| 199 __ mflr(scratch1_); | 202 __ mflr(scratch1_); |
| 200 __ Push(scratch1_); | 203 __ Push(scratch1_); |
| 201 } | 204 } |
| 202 RecordWriteStub stub(isolate(), object_, scratch0_, scratch1_, | 205 RecordWriteStub stub(isolate(), object_, scratch0_, scratch1_, |
| 203 EMIT_REMEMBERED_SET, save_fp_mode); | 206 remembered_set_action, save_fp_mode); |
| 204 if (offset_.is(no_reg)) { | 207 if (offset_.is(no_reg)) { |
| 205 __ addi(scratch1_, object_, Operand(offset_immediate_)); | 208 __ addi(scratch1_, object_, Operand(offset_immediate_)); |
| 206 } else { | 209 } else { |
| 207 DCHECK_EQ(0, offset_immediate_); | 210 DCHECK_EQ(0, offset_immediate_); |
| 208 __ add(scratch1_, object_, offset_); | 211 __ add(scratch1_, object_, offset_); |
| 209 } | 212 } |
| 210 __ CallStub(&stub); | 213 __ CallStub(&stub); |
| 211 if (!frame()->needs_frame()) { | 214 if (!frame()->needs_frame()) { |
| 212 // We need to save and restore lr if the frame was elided. | 215 // We need to save and restore lr if the frame was elided. |
| 213 __ Pop(scratch1_); | 216 __ Pop(scratch1_); |
| (...skipping 1690 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1904 padding_size -= v8::internal::Assembler::kInstrSize; | 1907 padding_size -= v8::internal::Assembler::kInstrSize; |
| 1905 } | 1908 } |
| 1906 } | 1909 } |
| 1907 } | 1910 } |
| 1908 | 1911 |
| 1909 #undef __ | 1912 #undef __ |
| 1910 | 1913 |
| 1911 } // namespace compiler | 1914 } // namespace compiler |
| 1912 } // namespace internal | 1915 } // namespace internal |
| 1913 } // namespace v8 | 1916 } // namespace v8 |
| OLD | NEW |