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