| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 1884 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1895 return AssignEnvironment(result); | 1895 return AssignEnvironment(result); |
| 1896 } | 1896 } |
| 1897 | 1897 |
| 1898 | 1898 |
| 1899 LInstruction* LChunkBuilder::DoCheckSmi(HCheckSmi* instr) { | 1899 LInstruction* LChunkBuilder::DoCheckSmi(HCheckSmi* instr) { |
| 1900 LOperand* value = UseRegisterAtStart(instr->value()); | 1900 LOperand* value = UseRegisterAtStart(instr->value()); |
| 1901 return AssignEnvironment(new(zone()) LCheckSmi(value)); | 1901 return AssignEnvironment(new(zone()) LCheckSmi(value)); |
| 1902 } | 1902 } |
| 1903 | 1903 |
| 1904 | 1904 |
| 1905 LInstruction* LChunkBuilder::DoCheckSmiOrInt32(HCheckSmiOrInt32* instr) { | |
| 1906 LOperand* value = UseRegisterAtStart(instr->value()); | |
| 1907 return AssignEnvironment(new(zone()) LCheckSmi(value)); | |
| 1908 } | |
| 1909 | |
| 1910 | |
| 1911 LInstruction* LChunkBuilder::DoCheckFunction(HCheckFunction* instr) { | 1905 LInstruction* LChunkBuilder::DoCheckFunction(HCheckFunction* instr) { |
| 1912 LOperand* value = UseRegisterAtStart(instr->value()); | 1906 LOperand* value = UseRegisterAtStart(instr->value()); |
| 1913 return AssignEnvironment(new(zone()) LCheckFunction(value)); | 1907 return AssignEnvironment(new(zone()) LCheckFunction(value)); |
| 1914 } | 1908 } |
| 1915 | 1909 |
| 1916 | 1910 |
| 1917 LInstruction* LChunkBuilder::DoCheckMaps(HCheckMaps* instr) { | 1911 LInstruction* LChunkBuilder::DoCheckMaps(HCheckMaps* instr) { |
| 1918 LOperand* value = UseRegisterAtStart(instr->value()); | 1912 LOperand* value = UseRegisterAtStart(instr->value()); |
| 1919 LInstruction* result = new(zone()) LCheckMaps(value); | 1913 LInstruction* result = new(zone()) LCheckMaps(value); |
| 1920 return AssignEnvironment(result); | 1914 return AssignEnvironment(result); |
| (...skipping 25 matching lines...) Expand all Loading... |
| 1946 parameter_count); | 1940 parameter_count); |
| 1947 } | 1941 } |
| 1948 | 1942 |
| 1949 | 1943 |
| 1950 LInstruction* LChunkBuilder::DoConstant(HConstant* instr) { | 1944 LInstruction* LChunkBuilder::DoConstant(HConstant* instr) { |
| 1951 Representation r = instr->representation(); | 1945 Representation r = instr->representation(); |
| 1952 if (r.IsInteger32()) { | 1946 if (r.IsInteger32()) { |
| 1953 return DefineAsRegister(new(zone()) LConstantI); | 1947 return DefineAsRegister(new(zone()) LConstantI); |
| 1954 } else if (r.IsDouble()) { | 1948 } else if (r.IsDouble()) { |
| 1955 return DefineAsRegister(new(zone()) LConstantD); | 1949 return DefineAsRegister(new(zone()) LConstantD); |
| 1956 } else if (r.IsTagged() || r.IsSmi()) { | 1950 } else if (r.IsSmiOrTagged()) { |
| 1957 return DefineAsRegister(new(zone()) LConstantT); | 1951 return DefineAsRegister(new(zone()) LConstantT); |
| 1958 } else { | 1952 } else { |
| 1959 UNREACHABLE(); | 1953 UNREACHABLE(); |
| 1960 return NULL; | 1954 return NULL; |
| 1961 } | 1955 } |
| 1962 } | 1956 } |
| 1963 | 1957 |
| 1964 | 1958 |
| 1965 LInstruction* LChunkBuilder::DoLoadGlobalCell(HLoadGlobalCell* instr) { | 1959 LInstruction* LChunkBuilder::DoLoadGlobalCell(HLoadGlobalCell* instr) { |
| 1966 LLoadGlobalCell* result = new(zone()) LLoadGlobalCell; | 1960 LLoadGlobalCell* result = new(zone()) LLoadGlobalCell; |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2058 | 2052 |
| 2059 LInstruction* LChunkBuilder::DoLoadExternalArrayPointer( | 2053 LInstruction* LChunkBuilder::DoLoadExternalArrayPointer( |
| 2060 HLoadExternalArrayPointer* instr) { | 2054 HLoadExternalArrayPointer* instr) { |
| 2061 LOperand* input = UseRegisterAtStart(instr->value()); | 2055 LOperand* input = UseRegisterAtStart(instr->value()); |
| 2062 return DefineAsRegister(new(zone()) LLoadExternalArrayPointer(input)); | 2056 return DefineAsRegister(new(zone()) LLoadExternalArrayPointer(input)); |
| 2063 } | 2057 } |
| 2064 | 2058 |
| 2065 | 2059 |
| 2066 LInstruction* LChunkBuilder::DoLoadKeyed(HLoadKeyed* instr) { | 2060 LInstruction* LChunkBuilder::DoLoadKeyed(HLoadKeyed* instr) { |
| 2067 ASSERT(instr->key()->representation().IsInteger32() || | 2061 ASSERT(instr->key()->representation().IsInteger32() || |
| 2068 instr->key()->representation().IsTagged()); | 2062 instr->key()->representation().IsSmi()); |
| 2069 ElementsKind elements_kind = instr->elements_kind(); | 2063 ElementsKind elements_kind = instr->elements_kind(); |
| 2070 LOperand* key = UseRegisterOrConstantAtStart(instr->key()); | 2064 LOperand* key = UseRegisterOrConstantAtStart(instr->key()); |
| 2071 LLoadKeyed* result = NULL; | 2065 LLoadKeyed* result = NULL; |
| 2072 | 2066 |
| 2073 if (!instr->is_external()) { | 2067 if (!instr->is_external()) { |
| 2074 LOperand* obj = NULL; | 2068 LOperand* obj = NULL; |
| 2075 if (instr->representation().IsDouble()) { | 2069 if (instr->representation().IsDouble()) { |
| 2076 obj = UseTempRegister(instr->elements()); | 2070 obj = UseTempRegister(instr->elements()); |
| 2077 } else { | 2071 } else { |
| 2078 ASSERT(instr->representation().IsSmiOrTagged()); | 2072 ASSERT(instr->representation().IsSmiOrTagged()); |
| (...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2521 | 2515 |
| 2522 | 2516 |
| 2523 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2517 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
| 2524 LOperand* object = UseRegister(instr->object()); | 2518 LOperand* object = UseRegister(instr->object()); |
| 2525 LOperand* index = UseRegister(instr->index()); | 2519 LOperand* index = UseRegister(instr->index()); |
| 2526 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); | 2520 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); |
| 2527 } | 2521 } |
| 2528 | 2522 |
| 2529 | 2523 |
| 2530 } } // namespace v8::internal | 2524 } } // namespace v8::internal |
| OLD | NEW |