| 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 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 __ CheckPageFlag(value_, scratch0_, | 212 __ CheckPageFlag(value_, scratch0_, |
| 213 MemoryChunk::kPointersToHereAreInterestingMask, zero, | 213 MemoryChunk::kPointersToHereAreInterestingMask, zero, |
| 214 exit()); | 214 exit()); |
| 215 RememberedSetAction const remembered_set_action = |
| 216 mode_ > RecordWriteMode::kValueIsMap ? EMIT_REMEMBERED_SET |
| 217 : OMIT_REMEMBERED_SET; |
| 215 SaveFPRegsMode const save_fp_mode = | 218 SaveFPRegsMode const save_fp_mode = |
| 216 frame()->DidAllocateDoubleRegisters() ? kSaveFPRegs : kDontSaveFPRegs; | 219 frame()->DidAllocateDoubleRegisters() ? kSaveFPRegs : kDontSaveFPRegs; |
| 217 RecordWriteStub stub(isolate(), object_, scratch0_, scratch1_, | 220 RecordWriteStub stub(isolate(), object_, scratch0_, scratch1_, |
| 218 EMIT_REMEMBERED_SET, save_fp_mode); | 221 remembered_set_action, save_fp_mode); |
| 219 __ leap(scratch1_, operand_); | 222 __ leap(scratch1_, operand_); |
| 220 __ CallStub(&stub); | 223 __ CallStub(&stub); |
| 221 } | 224 } |
| 222 | 225 |
| 223 private: | 226 private: |
| 224 Register const object_; | 227 Register const object_; |
| 225 Operand const operand_; | 228 Operand const operand_; |
| 226 Register const value_; | 229 Register const value_; |
| 227 Register const scratch0_; | 230 Register const scratch0_; |
| 228 Register const scratch1_; | 231 Register const scratch1_; |
| (...skipping 1959 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2188 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; | 2191 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; |
| 2189 __ Nop(padding_size); | 2192 __ Nop(padding_size); |
| 2190 } | 2193 } |
| 2191 } | 2194 } |
| 2192 | 2195 |
| 2193 #undef __ | 2196 #undef __ |
| 2194 | 2197 |
| 2195 } // namespace compiler | 2198 } // namespace compiler |
| 2196 } // namespace internal | 2199 } // namespace internal |
| 2197 } // namespace v8 | 2200 } // namespace v8 |
| OLD | NEW |