OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 1948 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1959 __ movq(temp, instr->hydrogen()->cell(), RelocInfo::GLOBAL_PROPERTY_CELL); | 1959 __ movq(temp, instr->hydrogen()->cell(), RelocInfo::GLOBAL_PROPERTY_CELL); |
1960 if (check_hole) { | 1960 if (check_hole) { |
1961 __ CompareRoot(Operand(temp, 0), Heap::kTheHoleValueRootIndex); | 1961 __ CompareRoot(Operand(temp, 0), Heap::kTheHoleValueRootIndex); |
1962 DeoptimizeIf(equal, instr->environment()); | 1962 DeoptimizeIf(equal, instr->environment()); |
1963 } | 1963 } |
1964 __ movq(Operand(temp, 0), value); | 1964 __ movq(Operand(temp, 0), value); |
1965 } | 1965 } |
1966 | 1966 |
1967 | 1967 |
1968 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) { | 1968 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) { |
1969 Register context = ToRegister(instr->context()); | |
1970 Register result = ToRegister(instr->result()); | 1969 Register result = ToRegister(instr->result()); |
1971 __ movq(result, ContextOperand(context, instr->slot_index())); | 1970 __ movq(result, ContextOperand(rsi, instr->slot_index())); |
1972 } | 1971 } |
1973 | 1972 |
1974 | 1973 |
1975 void LCodeGen::DoStoreContextSlot(LStoreContextSlot* instr) { | 1974 void LCodeGen::DoStoreContextSlot(LStoreContextSlot* instr) { |
1976 Register context = ToRegister(instr->context()); | |
1977 Register value = ToRegister(instr->value()); | 1975 Register value = ToRegister(instr->value()); |
1978 __ movq(ContextOperand(context, instr->slot_index()), value); | 1976 __ movq(ContextOperand(rsi, instr->slot_index()), value); |
1979 if (instr->needs_write_barrier()) { | 1977 if (instr->needs_write_barrier()) { |
1980 int offset = Context::SlotOffset(instr->slot_index()); | 1978 int offset = Context::SlotOffset(instr->slot_index()); |
1981 __ RecordWrite(context, offset, value, kScratchRegister); | 1979 Register scratch_1 = ToRegister(instr->TempAt(0)); |
| 1980 Register scratch_2 = ToRegister(instr->TempAt(1)); |
| 1981 __ movq(scratch_1, rsi); |
| 1982 __ RecordWrite(scratch_1, offset, value, scratch_2); |
1982 } | 1983 } |
1983 } | 1984 } |
1984 | 1985 |
1985 | 1986 |
1986 void LCodeGen::DoLoadNamedField(LLoadNamedField* instr) { | 1987 void LCodeGen::DoLoadNamedField(LLoadNamedField* instr) { |
1987 Register object = ToRegister(instr->InputAt(0)); | 1988 Register object = ToRegister(instr->InputAt(0)); |
1988 Register result = ToRegister(instr->result()); | 1989 Register result = ToRegister(instr->result()); |
1989 if (instr->hydrogen()->is_in_object()) { | 1990 if (instr->hydrogen()->is_in_object()) { |
1990 __ movq(result, FieldOperand(object, instr->hydrogen()->offset())); | 1991 __ movq(result, FieldOperand(object, instr->hydrogen()->offset())); |
1991 } else { | 1992 } else { |
(...skipping 1656 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3648 RegisterEnvironmentForDeoptimization(environment); | 3649 RegisterEnvironmentForDeoptimization(environment); |
3649 ASSERT(osr_pc_offset_ == -1); | 3650 ASSERT(osr_pc_offset_ == -1); |
3650 osr_pc_offset_ = masm()->pc_offset(); | 3651 osr_pc_offset_ = masm()->pc_offset(); |
3651 } | 3652 } |
3652 | 3653 |
3653 #undef __ | 3654 #undef __ |
3654 | 3655 |
3655 } } // namespace v8::internal | 3656 } } // namespace v8::internal |
3656 | 3657 |
3657 #endif // V8_TARGET_ARCH_X64 | 3658 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |