| 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/compiler/code-generator.h" | 5 #include "src/compiler/code-generator.h" |
| 6 | 6 |
| 7 #include "src/arm/macro-assembler-arm.h" | 7 #include "src/arm/macro-assembler-arm.h" |
| 8 #include "src/ast/scopes.h" | 8 #include "src/ast/scopes.h" |
| 9 #include "src/compiler/code-generator-impl.h" | 9 #include "src/compiler/code-generator-impl.h" |
| 10 #include "src/compiler/gap-resolver.h" | 10 #include "src/compiler/gap-resolver.h" |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 224 scratch1_(scratch1), | 224 scratch1_(scratch1), |
| 225 mode_(mode) {} | 225 mode_(mode) {} |
| 226 | 226 |
| 227 void Generate() final { | 227 void Generate() final { |
| 228 if (mode_ > RecordWriteMode::kValueIsPointer) { | 228 if (mode_ > RecordWriteMode::kValueIsPointer) { |
| 229 __ JumpIfSmi(value_, exit()); | 229 __ JumpIfSmi(value_, exit()); |
| 230 } | 230 } |
| 231 __ CheckPageFlag(value_, scratch0_, | 231 __ CheckPageFlag(value_, scratch0_, |
| 232 MemoryChunk::kPointersToHereAreInterestingMask, eq, | 232 MemoryChunk::kPointersToHereAreInterestingMask, eq, |
| 233 exit()); | 233 exit()); |
| 234 RememberedSetAction const remembered_set_action = |
| 235 mode_ > RecordWriteMode::kValueIsMap ? EMIT_REMEMBERED_SET |
| 236 : OMIT_REMEMBERED_SET; |
| 234 SaveFPRegsMode const save_fp_mode = | 237 SaveFPRegsMode const save_fp_mode = |
| 235 frame()->DidAllocateDoubleRegisters() ? kSaveFPRegs : kDontSaveFPRegs; | 238 frame()->DidAllocateDoubleRegisters() ? kSaveFPRegs : kDontSaveFPRegs; |
| 236 if (!frame()->needs_frame()) { | 239 if (!frame()->needs_frame()) { |
| 237 // We need to save and restore lr if the frame was elided. | 240 // We need to save and restore lr if the frame was elided. |
| 238 __ Push(lr); | 241 __ Push(lr); |
| 239 } | 242 } |
| 240 RecordWriteStub stub(isolate(), object_, scratch0_, scratch1_, | 243 RecordWriteStub stub(isolate(), object_, scratch0_, scratch1_, |
| 241 EMIT_REMEMBERED_SET, save_fp_mode); | 244 remembered_set_action, save_fp_mode); |
| 242 if (index_.is(no_reg)) { | 245 if (index_.is(no_reg)) { |
| 243 __ add(scratch1_, object_, Operand(index_immediate_)); | 246 __ add(scratch1_, object_, Operand(index_immediate_)); |
| 244 } else { | 247 } else { |
| 245 DCHECK_EQ(0, index_immediate_); | 248 DCHECK_EQ(0, index_immediate_); |
| 246 __ add(scratch1_, object_, Operand(index_)); | 249 __ add(scratch1_, object_, Operand(index_)); |
| 247 } | 250 } |
| 248 __ CallStub(&stub); | 251 __ CallStub(&stub); |
| 249 if (!frame()->needs_frame()) { | 252 if (!frame()->needs_frame()) { |
| 250 __ Pop(lr); | 253 __ Pop(lr); |
| 251 } | 254 } |
| (...skipping 1212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1464 padding_size -= v8::internal::Assembler::kInstrSize; | 1467 padding_size -= v8::internal::Assembler::kInstrSize; |
| 1465 } | 1468 } |
| 1466 } | 1469 } |
| 1467 } | 1470 } |
| 1468 | 1471 |
| 1469 #undef __ | 1472 #undef __ |
| 1470 | 1473 |
| 1471 } // namespace compiler | 1474 } // namespace compiler |
| 1472 } // namespace internal | 1475 } // namespace internal |
| 1473 } // namespace v8 | 1476 } // namespace v8 |
| OLD | NEW |