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/mips/lithium-mips.h" | 5 #include "src/crankshaft/mips/lithium-mips.h" |
6 | 6 |
7 #include <sstream> | 7 #include <sstream> |
8 | 8 |
9 #if V8_TARGET_ARCH_MIPS | 9 #if V8_TARGET_ARCH_MIPS |
10 | 10 |
(...skipping 1904 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1915 return DefineAsRegister(new(zone()) LConstantT); | 1915 return DefineAsRegister(new(zone()) LConstantT); |
1916 } else { | 1916 } else { |
1917 UNREACHABLE(); | 1917 UNREACHABLE(); |
1918 return NULL; | 1918 return NULL; |
1919 } | 1919 } |
1920 } | 1920 } |
1921 | 1921 |
1922 | 1922 |
1923 LInstruction* LChunkBuilder::DoLoadContextSlot(HLoadContextSlot* instr) { | 1923 LInstruction* LChunkBuilder::DoLoadContextSlot(HLoadContextSlot* instr) { |
1924 LOperand* context = UseRegisterAtStart(instr->value()); | 1924 LOperand* context = UseRegisterAtStart(instr->value()); |
1925 return DefineAsRegister(new (zone()) LLoadContextSlot(context)); | 1925 LInstruction* result = |
| 1926 DefineAsRegister(new(zone()) LLoadContextSlot(context)); |
| 1927 if (instr->RequiresHoleCheck() && instr->DeoptimizesOnHole()) { |
| 1928 result = AssignEnvironment(result); |
| 1929 } |
| 1930 return result; |
1926 } | 1931 } |
1927 | 1932 |
1928 | 1933 |
1929 LInstruction* LChunkBuilder::DoStoreContextSlot(HStoreContextSlot* instr) { | 1934 LInstruction* LChunkBuilder::DoStoreContextSlot(HStoreContextSlot* instr) { |
1930 LOperand* context; | 1935 LOperand* context; |
1931 LOperand* value; | 1936 LOperand* value; |
1932 if (instr->NeedsWriteBarrier()) { | 1937 if (instr->NeedsWriteBarrier()) { |
1933 context = UseTempRegister(instr->context()); | 1938 context = UseTempRegister(instr->context()); |
1934 value = UseTempRegister(instr->value()); | 1939 value = UseTempRegister(instr->value()); |
1935 } else { | 1940 } else { |
1936 context = UseRegister(instr->context()); | 1941 context = UseRegister(instr->context()); |
1937 value = UseRegister(instr->value()); | 1942 value = UseRegister(instr->value()); |
1938 } | 1943 } |
1939 return new (zone()) LStoreContextSlot(context, value); | 1944 LInstruction* result = new(zone()) LStoreContextSlot(context, value); |
| 1945 if (instr->RequiresHoleCheck() && instr->DeoptimizesOnHole()) { |
| 1946 result = AssignEnvironment(result); |
| 1947 } |
| 1948 return result; |
1940 } | 1949 } |
1941 | 1950 |
1942 | 1951 |
1943 LInstruction* LChunkBuilder::DoLoadNamedField(HLoadNamedField* instr) { | 1952 LInstruction* LChunkBuilder::DoLoadNamedField(HLoadNamedField* instr) { |
1944 LOperand* obj = UseRegisterAtStart(instr->object()); | 1953 LOperand* obj = UseRegisterAtStart(instr->object()); |
1945 return DefineAsRegister(new(zone()) LLoadNamedField(obj)); | 1954 return DefineAsRegister(new(zone()) LLoadNamedField(obj)); |
1946 } | 1955 } |
1947 | 1956 |
1948 | 1957 |
1949 LInstruction* LChunkBuilder::DoLoadFunctionPrototype( | 1958 LInstruction* LChunkBuilder::DoLoadFunctionPrototype( |
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2331 LOperand* index = UseTempRegister(instr->index()); | 2340 LOperand* index = UseTempRegister(instr->index()); |
2332 LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index); | 2341 LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index); |
2333 LInstruction* result = DefineSameAsFirst(load); | 2342 LInstruction* result = DefineSameAsFirst(load); |
2334 return AssignPointerMap(result); | 2343 return AssignPointerMap(result); |
2335 } | 2344 } |
2336 | 2345 |
2337 } // namespace internal | 2346 } // namespace internal |
2338 } // namespace v8 | 2347 } // namespace v8 |
2339 | 2348 |
2340 #endif // V8_TARGET_ARCH_MIPS | 2349 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |