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 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 operand_(operand), | 202 operand_(operand), |
203 value_(value), | 203 value_(value), |
204 scratch0_(scratch0), | 204 scratch0_(scratch0), |
205 scratch1_(scratch1), | 205 scratch1_(scratch1), |
206 mode_(mode) {} | 206 mode_(mode) {} |
207 | 207 |
208 void Generate() final { | 208 void Generate() final { |
209 if (mode_ > RecordWriteMode::kValueIsPointer) { | 209 if (mode_ > RecordWriteMode::kValueIsPointer) { |
210 __ JumpIfSmi(value_, exit()); | 210 __ JumpIfSmi(value_, exit()); |
211 } | 211 } |
212 if (mode_ > RecordWriteMode::kValueIsMap) { | 212 __ CheckPageFlag(value_, scratch0_, |
213 __ CheckPageFlag(value_, scratch0_, | 213 MemoryChunk::kPointersToHereAreInterestingMask, zero, |
214 MemoryChunk::kPointersToHereAreInterestingMask, zero, | 214 exit()); |
215 exit()); | |
216 } | |
217 SaveFPRegsMode const save_fp_mode = | 215 SaveFPRegsMode const save_fp_mode = |
218 frame()->DidAllocateDoubleRegisters() ? kSaveFPRegs : kDontSaveFPRegs; | 216 frame()->DidAllocateDoubleRegisters() ? kSaveFPRegs : kDontSaveFPRegs; |
219 RecordWriteStub stub(isolate(), object_, scratch0_, scratch1_, | 217 RecordWriteStub stub(isolate(), object_, scratch0_, scratch1_, |
220 EMIT_REMEMBERED_SET, save_fp_mode); | 218 EMIT_REMEMBERED_SET, save_fp_mode); |
221 __ leap(scratch1_, operand_); | 219 __ leap(scratch1_, operand_); |
222 __ CallStub(&stub); | 220 __ CallStub(&stub); |
223 } | 221 } |
224 | 222 |
225 private: | 223 private: |
226 Register const object_; | 224 Register const object_; |
(...skipping 1937 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2164 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; | 2162 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; |
2165 __ Nop(padding_size); | 2163 __ Nop(padding_size); |
2166 } | 2164 } |
2167 } | 2165 } |
2168 | 2166 |
2169 #undef __ | 2167 #undef __ |
2170 | 2168 |
2171 } // namespace compiler | 2169 } // namespace compiler |
2172 } // namespace internal | 2170 } // namespace internal |
2173 } // namespace v8 | 2171 } // namespace v8 |
OLD | NEW |