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