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 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 index_(index), | 220 index_(index), |
221 value_(value), | 221 value_(value), |
222 scratch0_(scratch0), | 222 scratch0_(scratch0), |
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 if (mode_ > RecordWriteMode::kValueIsMap) { | 230 __ CheckPageFlag(value_, scratch0_, |
231 __ CheckPageFlag(value_, scratch0_, | 231 MemoryChunk::kPointersToHereAreInterestingMask, eq, |
232 MemoryChunk::kPointersToHereAreInterestingMask, eq, | 232 exit()); |
233 exit()); | |
234 } | |
235 SaveFPRegsMode const save_fp_mode = | 233 SaveFPRegsMode const save_fp_mode = |
236 frame()->DidAllocateDoubleRegisters() ? kSaveFPRegs : kDontSaveFPRegs; | 234 frame()->DidAllocateDoubleRegisters() ? kSaveFPRegs : kDontSaveFPRegs; |
237 if (!frame()->needs_frame()) { | 235 if (!frame()->needs_frame()) { |
238 // We need to save and restore ra if the frame was elided. | 236 // We need to save and restore ra if the frame was elided. |
239 __ Push(ra); | 237 __ Push(ra); |
240 } | 238 } |
241 RecordWriteStub stub(isolate(), object_, scratch0_, scratch1_, | 239 RecordWriteStub stub(isolate(), object_, scratch0_, scratch1_, |
242 EMIT_REMEMBERED_SET, save_fp_mode); | 240 EMIT_REMEMBERED_SET, save_fp_mode); |
243 __ Daddu(scratch1_, object_, index_); | 241 __ Daddu(scratch1_, object_, index_); |
244 __ CallStub(&stub); | 242 __ CallStub(&stub); |
(...skipping 1882 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2127 padding_size -= v8::internal::Assembler::kInstrSize; | 2125 padding_size -= v8::internal::Assembler::kInstrSize; |
2128 } | 2126 } |
2129 } | 2127 } |
2130 } | 2128 } |
2131 | 2129 |
2132 #undef __ | 2130 #undef __ |
2133 | 2131 |
2134 } // namespace compiler | 2132 } // namespace compiler |
2135 } // namespace internal | 2133 } // namespace internal |
2136 } // namespace v8 | 2134 } // namespace v8 |
OLD | NEW |