OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
235 operand_(operand), | 235 operand_(operand), |
236 value_(value), | 236 value_(value), |
237 scratch0_(scratch0), | 237 scratch0_(scratch0), |
238 scratch1_(scratch1), | 238 scratch1_(scratch1), |
239 mode_(mode) {} | 239 mode_(mode) {} |
240 | 240 |
241 void Generate() final { | 241 void Generate() final { |
242 if (mode_ > RecordWriteMode::kValueIsPointer) { | 242 if (mode_ > RecordWriteMode::kValueIsPointer) { |
243 __ JumpIfSmi(value_, exit()); | 243 __ JumpIfSmi(value_, exit()); |
244 } | 244 } |
245 if (mode_ > RecordWriteMode::kValueIsMap) { | 245 __ CheckPageFlag(value_, scratch0_, |
246 __ CheckPageFlag(value_, scratch0_, | 246 MemoryChunk::kPointersToHereAreInterestingMask, zero, |
247 MemoryChunk::kPointersToHereAreInterestingMask, zero, | 247 exit()); |
248 exit()); | |
249 } | |
250 SaveFPRegsMode const save_fp_mode = | 248 SaveFPRegsMode const save_fp_mode = |
251 frame()->DidAllocateDoubleRegisters() ? kSaveFPRegs : kDontSaveFPRegs; | 249 frame()->DidAllocateDoubleRegisters() ? kSaveFPRegs : kDontSaveFPRegs; |
252 RecordWriteStub stub(isolate(), object_, scratch0_, scratch1_, | 250 RecordWriteStub stub(isolate(), object_, scratch0_, scratch1_, |
253 EMIT_REMEMBERED_SET, save_fp_mode); | 251 EMIT_REMEMBERED_SET, save_fp_mode); |
254 __ lea(scratch1_, operand_); | 252 __ lea(scratch1_, operand_); |
255 __ CallStub(&stub); | 253 __ CallStub(&stub); |
256 } | 254 } |
257 | 255 |
258 private: | 256 private: |
259 Register const object_; | 257 Register const object_; |
(...skipping 1475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1735 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; | 1733 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; |
1736 __ Nop(padding_size); | 1734 __ Nop(padding_size); |
1737 } | 1735 } |
1738 } | 1736 } |
1739 | 1737 |
1740 #undef __ | 1738 #undef __ |
1741 | 1739 |
1742 } // namespace compiler | 1740 } // namespace compiler |
1743 } // namespace internal | 1741 } // namespace internal |
1744 } // namespace v8 | 1742 } // namespace v8 |
OLD | NEW |