| 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 __ Daddu(scratch1_, object_, index_); | 243 __ Daddu(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 1857 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2110 padding_size -= v8::internal::Assembler::kInstrSize; | 2115 padding_size -= v8::internal::Assembler::kInstrSize; |
| 2111 } | 2116 } |
| 2112 } | 2117 } |
| 2113 } | 2118 } |
| 2114 | 2119 |
| 2115 #undef __ | 2120 #undef __ |
| 2116 | 2121 |
| 2117 } // namespace compiler | 2122 } // namespace compiler |
| 2118 } // namespace internal | 2123 } // namespace internal |
| 2119 } // namespace v8 | 2124 } // namespace v8 |
| OLD | NEW |