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/ia32/lithium-ia32.h" | 5 #include "src/crankshaft/ia32/lithium-ia32.h" |
6 | 6 |
7 #include <sstream> | 7 #include <sstream> |
8 | 8 |
9 #if V8_TARGET_ARCH_IA32 | 9 #if V8_TARGET_ARCH_IA32 |
10 | 10 |
(...skipping 1967 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1978 return DefineAsRegister(new(zone()) LConstantT); | 1978 return DefineAsRegister(new(zone()) LConstantT); |
1979 } else { | 1979 } else { |
1980 UNREACHABLE(); | 1980 UNREACHABLE(); |
1981 return NULL; | 1981 return NULL; |
1982 } | 1982 } |
1983 } | 1983 } |
1984 | 1984 |
1985 | 1985 |
1986 LInstruction* LChunkBuilder::DoLoadContextSlot(HLoadContextSlot* instr) { | 1986 LInstruction* LChunkBuilder::DoLoadContextSlot(HLoadContextSlot* instr) { |
1987 LOperand* context = UseRegisterAtStart(instr->value()); | 1987 LOperand* context = UseRegisterAtStart(instr->value()); |
1988 return DefineAsRegister(new (zone()) LLoadContextSlot(context)); | 1988 LInstruction* result = |
| 1989 DefineAsRegister(new(zone()) LLoadContextSlot(context)); |
| 1990 if (instr->RequiresHoleCheck() && instr->DeoptimizesOnHole()) { |
| 1991 result = AssignEnvironment(result); |
| 1992 } |
| 1993 return result; |
1989 } | 1994 } |
1990 | 1995 |
1991 | 1996 |
1992 LInstruction* LChunkBuilder::DoStoreContextSlot(HStoreContextSlot* instr) { | 1997 LInstruction* LChunkBuilder::DoStoreContextSlot(HStoreContextSlot* instr) { |
1993 LOperand* value; | 1998 LOperand* value; |
1994 LOperand* temp; | 1999 LOperand* temp; |
1995 LOperand* context = UseRegister(instr->context()); | 2000 LOperand* context = UseRegister(instr->context()); |
1996 if (instr->NeedsWriteBarrier()) { | 2001 if (instr->NeedsWriteBarrier()) { |
1997 value = UseTempRegister(instr->value()); | 2002 value = UseTempRegister(instr->value()); |
1998 temp = TempRegister(); | 2003 temp = TempRegister(); |
1999 } else { | 2004 } else { |
2000 value = UseRegister(instr->value()); | 2005 value = UseRegister(instr->value()); |
2001 temp = NULL; | 2006 temp = NULL; |
2002 } | 2007 } |
2003 return new (zone()) LStoreContextSlot(context, value, temp); | 2008 LInstruction* result = new(zone()) LStoreContextSlot(context, value, temp); |
| 2009 if (instr->RequiresHoleCheck() && instr->DeoptimizesOnHole()) { |
| 2010 result = AssignEnvironment(result); |
| 2011 } |
| 2012 return result; |
2004 } | 2013 } |
2005 | 2014 |
2006 | 2015 |
2007 LInstruction* LChunkBuilder::DoLoadNamedField(HLoadNamedField* instr) { | 2016 LInstruction* LChunkBuilder::DoLoadNamedField(HLoadNamedField* instr) { |
2008 LOperand* obj = (instr->access().IsExternalMemory() && | 2017 LOperand* obj = (instr->access().IsExternalMemory() && |
2009 instr->access().offset() == 0) | 2018 instr->access().offset() == 0) |
2010 ? UseRegisterOrConstantAtStart(instr->object()) | 2019 ? UseRegisterOrConstantAtStart(instr->object()) |
2011 : UseRegisterAtStart(instr->object()); | 2020 : UseRegisterAtStart(instr->object()); |
2012 return DefineAsRegister(new(zone()) LLoadNamedField(obj)); | 2021 return DefineAsRegister(new(zone()) LLoadNamedField(obj)); |
2013 } | 2022 } |
(...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2454 LOperand* index = UseTempRegister(instr->index()); | 2463 LOperand* index = UseTempRegister(instr->index()); |
2455 LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index); | 2464 LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index); |
2456 LInstruction* result = DefineSameAsFirst(load); | 2465 LInstruction* result = DefineSameAsFirst(load); |
2457 return AssignPointerMap(result); | 2466 return AssignPointerMap(result); |
2458 } | 2467 } |
2459 | 2468 |
2460 } // namespace internal | 2469 } // namespace internal |
2461 } // namespace v8 | 2470 } // namespace v8 |
2462 | 2471 |
2463 #endif // V8_TARGET_ARCH_IA32 | 2472 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |