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 481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
492 Register scratch1 = i.TempRegister(1); | 492 Register scratch1 = i.TempRegister(1); |
493 auto ool = new (zone()) OutOfLineRecordWrite(this, object, operand, value, | 493 auto ool = new (zone()) OutOfLineRecordWrite(this, object, operand, value, |
494 scratch0, scratch1, mode); | 494 scratch0, scratch1, mode); |
495 __ mov(operand, value); | 495 __ mov(operand, value); |
496 __ CheckPageFlag(object, scratch0, | 496 __ CheckPageFlag(object, scratch0, |
497 MemoryChunk::kPointersFromHereAreInterestingMask, | 497 MemoryChunk::kPointersFromHereAreInterestingMask, |
498 not_zero, ool->entry()); | 498 not_zero, ool->entry()); |
499 __ bind(ool->exit()); | 499 __ bind(ool->exit()); |
500 break; | 500 break; |
501 } | 501 } |
502 case kArchStackSlot: { | |
503 FrameOffset offset = | |
504 frame_access_state()->GetFrameOffset(i.InputInt32(0)); | |
505 Register base; | |
506 if (offset.from_stack_pointer()) { | |
507 base = esp; | |
508 } else { | |
509 base = ebp; | |
510 } | |
511 __ lea(i.OutputRegister(), Operand(base, offset.offset())); | |
512 break; | |
513 } | |
514 case kIA32Add: | 502 case kIA32Add: |
515 if (HasImmediateInput(instr, 1)) { | 503 if (HasImmediateInput(instr, 1)) { |
516 __ add(i.InputOperand(0), i.InputImmediate(1)); | 504 __ add(i.InputOperand(0), i.InputImmediate(1)); |
517 } else { | 505 } else { |
518 __ add(i.InputRegister(0), i.InputOperand(1)); | 506 __ add(i.InputRegister(0), i.InputOperand(1)); |
519 } | 507 } |
520 break; | 508 break; |
521 case kIA32And: | 509 case kIA32And: |
522 if (HasImmediateInput(instr, 1)) { | 510 if (HasImmediateInput(instr, 1)) { |
523 __ and_(i.InputOperand(0), i.InputImmediate(1)); | 511 __ and_(i.InputOperand(0), i.InputImmediate(1)); |
(...skipping 1191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1715 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; | 1703 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; |
1716 __ Nop(padding_size); | 1704 __ Nop(padding_size); |
1717 } | 1705 } |
1718 } | 1706 } |
1719 | 1707 |
1720 #undef __ | 1708 #undef __ |
1721 | 1709 |
1722 } // namespace compiler | 1710 } // namespace compiler |
1723 } // namespace internal | 1711 } // namespace internal |
1724 } // namespace v8 | 1712 } // namespace v8 |
OLD | NEW |