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 1888 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1899 __ movq(temp, instr->hydrogen()->cell(), RelocInfo::GLOBAL_PROPERTY_CELL); | 1899 __ movq(temp, instr->hydrogen()->cell(), RelocInfo::GLOBAL_PROPERTY_CELL); |
1900 if (check_hole) { | 1900 if (check_hole) { |
1901 __ CompareRoot(Operand(temp, 0), Heap::kTheHoleValueRootIndex); | 1901 __ CompareRoot(Operand(temp, 0), Heap::kTheHoleValueRootIndex); |
1902 DeoptimizeIf(equal, instr->environment()); | 1902 DeoptimizeIf(equal, instr->environment()); |
1903 } | 1903 } |
1904 __ movq(Operand(temp, 0), value); | 1904 __ movq(Operand(temp, 0), value); |
1905 } | 1905 } |
1906 | 1906 |
1907 | 1907 |
1908 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) { | 1908 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) { |
1909 Abort("Unimplemented: %s", "DoLoadContextSlot"); | 1909 Register context = ToRegister(instr->context()); |
| 1910 Register result = ToRegister(instr->result()); |
| 1911 __ movq(result, ContextOperand(context, instr->slot_index())); |
1910 } | 1912 } |
1911 | 1913 |
1912 | 1914 |
| 1915 void LCodeGen::DoStoreContextSlot(LStoreContextSlot* instr) { |
| 1916 Register context = ToRegister(instr->context()); |
| 1917 Register value = ToRegister(instr->value()); |
| 1918 __ movq(ContextOperand(context, instr->slot_index()), value); |
| 1919 if (instr->needs_write_barrier()) { |
| 1920 int offset = Context::SlotOffset(instr->slot_index()); |
| 1921 __ RecordWrite(context, offset, value, kScratchRegister); |
| 1922 } |
| 1923 } |
| 1924 |
| 1925 |
1913 void LCodeGen::DoLoadNamedField(LLoadNamedField* instr) { | 1926 void LCodeGen::DoLoadNamedField(LLoadNamedField* instr) { |
1914 Register object = ToRegister(instr->InputAt(0)); | 1927 Register object = ToRegister(instr->InputAt(0)); |
1915 Register result = ToRegister(instr->result()); | 1928 Register result = ToRegister(instr->result()); |
1916 if (instr->hydrogen()->is_in_object()) { | 1929 if (instr->hydrogen()->is_in_object()) { |
1917 __ movq(result, FieldOperand(object, instr->hydrogen()->offset())); | 1930 __ movq(result, FieldOperand(object, instr->hydrogen()->offset())); |
1918 } else { | 1931 } else { |
1919 __ movq(result, FieldOperand(object, JSObject::kPropertiesOffset)); | 1932 __ movq(result, FieldOperand(object, JSObject::kPropertiesOffset)); |
1920 __ movq(result, FieldOperand(result, instr->hydrogen()->offset())); | 1933 __ movq(result, FieldOperand(result, instr->hydrogen()->offset())); |
1921 } | 1934 } |
1922 } | 1935 } |
(...skipping 1429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3352 RegisterEnvironmentForDeoptimization(environment); | 3365 RegisterEnvironmentForDeoptimization(environment); |
3353 ASSERT(osr_pc_offset_ == -1); | 3366 ASSERT(osr_pc_offset_ == -1); |
3354 osr_pc_offset_ = masm()->pc_offset(); | 3367 osr_pc_offset_ = masm()->pc_offset(); |
3355 } | 3368 } |
3356 | 3369 |
3357 #undef __ | 3370 #undef __ |
3358 | 3371 |
3359 } } // namespace v8::internal | 3372 } } // namespace v8::internal |
3360 | 3373 |
3361 #endif // V8_TARGET_ARCH_X64 | 3374 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |