| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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/crankshaft/x64/lithium-x64.h" | 5 #include "src/crankshaft/x64/lithium-x64.h" |
| 6 | 6 |
| 7 #include <sstream> | 7 #include <sstream> |
| 8 | 8 |
| 9 #if V8_TARGET_ARCH_X64 | 9 #if V8_TARGET_ARCH_X64 |
| 10 | 10 |
| (...skipping 1943 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1954 return DefineAsRegister(new(zone()) LConstantT); | 1954 return DefineAsRegister(new(zone()) LConstantT); |
| 1955 } else { | 1955 } else { |
| 1956 UNREACHABLE(); | 1956 UNREACHABLE(); |
| 1957 return NULL; | 1957 return NULL; |
| 1958 } | 1958 } |
| 1959 } | 1959 } |
| 1960 | 1960 |
| 1961 | 1961 |
| 1962 LInstruction* LChunkBuilder::DoLoadContextSlot(HLoadContextSlot* instr) { | 1962 LInstruction* LChunkBuilder::DoLoadContextSlot(HLoadContextSlot* instr) { |
| 1963 LOperand* context = UseRegisterAtStart(instr->value()); | 1963 LOperand* context = UseRegisterAtStart(instr->value()); |
| 1964 return DefineAsRegister(new (zone()) LLoadContextSlot(context)); | 1964 LInstruction* result = |
| 1965 DefineAsRegister(new(zone()) LLoadContextSlot(context)); |
| 1966 if (instr->RequiresHoleCheck() && instr->DeoptimizesOnHole()) { |
| 1967 result = AssignEnvironment(result); |
| 1968 } |
| 1969 return result; |
| 1965 } | 1970 } |
| 1966 | 1971 |
| 1967 | 1972 |
| 1968 LInstruction* LChunkBuilder::DoStoreContextSlot(HStoreContextSlot* instr) { | 1973 LInstruction* LChunkBuilder::DoStoreContextSlot(HStoreContextSlot* instr) { |
| 1969 LOperand* context; | 1974 LOperand* context; |
| 1970 LOperand* value; | 1975 LOperand* value; |
| 1971 LOperand* temp; | 1976 LOperand* temp; |
| 1972 context = UseRegister(instr->context()); | 1977 context = UseRegister(instr->context()); |
| 1973 if (instr->NeedsWriteBarrier()) { | 1978 if (instr->NeedsWriteBarrier()) { |
| 1974 value = UseTempRegister(instr->value()); | 1979 value = UseTempRegister(instr->value()); |
| 1975 temp = TempRegister(); | 1980 temp = TempRegister(); |
| 1976 } else { | 1981 } else { |
| 1977 value = UseRegister(instr->value()); | 1982 value = UseRegister(instr->value()); |
| 1978 temp = NULL; | 1983 temp = NULL; |
| 1979 } | 1984 } |
| 1980 return new (zone()) LStoreContextSlot(context, value, temp); | 1985 LInstruction* result = new(zone()) LStoreContextSlot(context, value, temp); |
| 1986 if (instr->RequiresHoleCheck() && instr->DeoptimizesOnHole()) { |
| 1987 result = AssignEnvironment(result); |
| 1988 } |
| 1989 return result; |
| 1981 } | 1990 } |
| 1982 | 1991 |
| 1983 | 1992 |
| 1984 LInstruction* LChunkBuilder::DoLoadNamedField(HLoadNamedField* instr) { | 1993 LInstruction* LChunkBuilder::DoLoadNamedField(HLoadNamedField* instr) { |
| 1985 // Use the special mov rax, moffs64 encoding for external | 1994 // Use the special mov rax, moffs64 encoding for external |
| 1986 // memory accesses with 64-bit word-sized values. | 1995 // memory accesses with 64-bit word-sized values. |
| 1987 if (instr->access().IsExternalMemory() && | 1996 if (instr->access().IsExternalMemory() && |
| 1988 instr->access().offset() == 0 && | 1997 instr->access().offset() == 0 && |
| 1989 (instr->access().representation().IsSmi() || | 1998 (instr->access().representation().IsSmi() || |
| 1990 instr->access().representation().IsTagged() || | 1999 instr->access().representation().IsTagged() || |
| (...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2457 LOperand* index = UseTempRegister(instr->index()); | 2466 LOperand* index = UseTempRegister(instr->index()); |
| 2458 LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index); | 2467 LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index); |
| 2459 LInstruction* result = DefineSameAsFirst(load); | 2468 LInstruction* result = DefineSameAsFirst(load); |
| 2460 return AssignPointerMap(result); | 2469 return AssignPointerMap(result); |
| 2461 } | 2470 } |
| 2462 | 2471 |
| 2463 } // namespace internal | 2472 } // namespace internal |
| 2464 } // namespace v8 | 2473 } // namespace v8 |
| 2465 | 2474 |
| 2466 #endif // V8_TARGET_ARCH_X64 | 2475 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |