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 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
227 if (mode_ > RecordWriteMode::kValueIsPointer) { | 227 if (mode_ > RecordWriteMode::kValueIsPointer) { |
228 __ JumpIfSmi(value_, exit()); | 228 __ JumpIfSmi(value_, exit()); |
229 } | 229 } |
230 if (mode_ > RecordWriteMode::kValueIsMap) { | 230 if (mode_ > RecordWriteMode::kValueIsMap) { |
231 __ CheckPageFlag(value_, scratch0_, | 231 __ CheckPageFlag(value_, scratch0_, |
232 MemoryChunk::kPointersToHereAreInterestingMask, eq, | 232 MemoryChunk::kPointersToHereAreInterestingMask, eq, |
233 exit()); | 233 exit()); |
234 } | 234 } |
235 SaveFPRegsMode const save_fp_mode = | 235 SaveFPRegsMode const save_fp_mode = |
236 frame()->DidAllocateDoubleRegisters() ? kSaveFPRegs : kDontSaveFPRegs; | 236 frame()->DidAllocateDoubleRegisters() ? kSaveFPRegs : kDontSaveFPRegs; |
237 // TODO(turbofan): Once we get frame elision working, we need to save | 237 if (!frame()->needs_frame()) { |
238 // and restore lr properly here if the frame was elided. | 238 // We need to save and restore ra if the frame was elided. |
| 239 __ Push(ra); |
| 240 } |
239 RecordWriteStub stub(isolate(), object_, scratch0_, scratch1_, | 241 RecordWriteStub stub(isolate(), object_, scratch0_, scratch1_, |
240 EMIT_REMEMBERED_SET, save_fp_mode); | 242 EMIT_REMEMBERED_SET, save_fp_mode); |
241 __ Addu(scratch1_, object_, index_); | 243 __ Addu(scratch1_, object_, index_); |
242 __ CallStub(&stub); | 244 __ CallStub(&stub); |
| 245 if (!frame()->needs_frame()) { |
| 246 __ Pop(ra); |
| 247 } |
243 } | 248 } |
244 | 249 |
245 private: | 250 private: |
246 Register const object_; | 251 Register const object_; |
247 Register const index_; | 252 Register const index_; |
248 Register const value_; | 253 Register const value_; |
249 Register const scratch0_; | 254 Register const scratch0_; |
250 Register const scratch1_; | 255 Register const scratch1_; |
251 RecordWriteMode const mode_; | 256 RecordWriteMode const mode_; |
252 }; | 257 }; |
(...skipping 1551 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1804 padding_size -= v8::internal::Assembler::kInstrSize; | 1809 padding_size -= v8::internal::Assembler::kInstrSize; |
1805 } | 1810 } |
1806 } | 1811 } |
1807 } | 1812 } |
1808 | 1813 |
1809 #undef __ | 1814 #undef __ |
1810 | 1815 |
1811 } // namespace compiler | 1816 } // namespace compiler |
1812 } // namespace internal | 1817 } // namespace internal |
1813 } // namespace v8 | 1818 } // namespace v8 |
OLD | NEW |