| 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 1899 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1910 LOperand* key = UseRegisterOrConstantAtStart(instr->key()); | 1910 LOperand* key = UseRegisterOrConstantAtStart(instr->key()); |
| 1911 LLoadKeyedFastDoubleElement* result = | 1911 LLoadKeyedFastDoubleElement* result = |
| 1912 new LLoadKeyedFastDoubleElement(elements, key); | 1912 new LLoadKeyedFastDoubleElement(elements, key); |
| 1913 return AssignEnvironment(DefineAsRegister(result)); | 1913 return AssignEnvironment(DefineAsRegister(result)); |
| 1914 } | 1914 } |
| 1915 | 1915 |
| 1916 | 1916 |
| 1917 LInstruction* LChunkBuilder::DoLoadKeyedSpecializedArrayElement( | 1917 LInstruction* LChunkBuilder::DoLoadKeyedSpecializedArrayElement( |
| 1918 HLoadKeyedSpecializedArrayElement* instr) { | 1918 HLoadKeyedSpecializedArrayElement* instr) { |
| 1919 ElementsKind elements_kind = instr->elements_kind(); | 1919 ElementsKind elements_kind = instr->elements_kind(); |
| 1920 Representation representation(instr->representation()); | |
| 1921 ASSERT( | 1920 ASSERT( |
| 1922 (representation.IsInteger32() && | 1921 (instr->representation().IsInteger32() && |
| 1923 (elements_kind != EXTERNAL_FLOAT_ELEMENTS) && | 1922 (elements_kind != EXTERNAL_FLOAT_ELEMENTS) && |
| 1924 (elements_kind != EXTERNAL_DOUBLE_ELEMENTS)) || | 1923 (elements_kind != EXTERNAL_DOUBLE_ELEMENTS)) || |
| 1925 (representation.IsDouble() && | 1924 (instr->representation().IsDouble() && |
| 1926 ((elements_kind == EXTERNAL_FLOAT_ELEMENTS) || | 1925 ((elements_kind == EXTERNAL_FLOAT_ELEMENTS) || |
| 1927 (elements_kind == EXTERNAL_DOUBLE_ELEMENTS)))); | 1926 (elements_kind == EXTERNAL_DOUBLE_ELEMENTS)))); |
| 1928 ASSERT(instr->key()->representation().IsInteger32()); | 1927 ASSERT(instr->key()->representation().IsInteger32()); |
| 1929 LOperand* external_pointer = UseRegister(instr->external_pointer()); | 1928 LOperand* external_pointer = UseRegister(instr->external_pointer()); |
| 1930 LOperand* key = UseRegisterOrConstant(instr->key()); | 1929 LOperand* key = UseRegisterOrConstant(instr->key()); |
| 1931 LLoadKeyedSpecializedArrayElement* result = | 1930 LLoadKeyedSpecializedArrayElement* result = |
| 1932 new LLoadKeyedSpecializedArrayElement(external_pointer, key); | 1931 new LLoadKeyedSpecializedArrayElement(external_pointer, key); |
| 1933 LInstruction* load_instr = DefineAsRegister(result); | 1932 LInstruction* load_instr = DefineAsRegister(result); |
| 1934 // An unsigned int array load might overflow and cause a deopt, make sure it | 1933 // An unsigned int array load might overflow and cause a deopt, make sure it |
| 1935 // has an environment. | 1934 // has an environment. |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1975 LOperand* elements = UseRegisterAtStart(instr->elements()); | 1974 LOperand* elements = UseRegisterAtStart(instr->elements()); |
| 1976 LOperand* val = UseTempRegister(instr->value()); | 1975 LOperand* val = UseTempRegister(instr->value()); |
| 1977 LOperand* key = UseRegisterOrConstantAtStart(instr->key()); | 1976 LOperand* key = UseRegisterOrConstantAtStart(instr->key()); |
| 1978 | 1977 |
| 1979 return new LStoreKeyedFastDoubleElement(elements, key, val); | 1978 return new LStoreKeyedFastDoubleElement(elements, key, val); |
| 1980 } | 1979 } |
| 1981 | 1980 |
| 1982 | 1981 |
| 1983 LInstruction* LChunkBuilder::DoStoreKeyedSpecializedArrayElement( | 1982 LInstruction* LChunkBuilder::DoStoreKeyedSpecializedArrayElement( |
| 1984 HStoreKeyedSpecializedArrayElement* instr) { | 1983 HStoreKeyedSpecializedArrayElement* instr) { |
| 1985 Representation representation(instr->value()->representation()); | |
| 1986 ElementsKind elements_kind = instr->elements_kind(); | 1984 ElementsKind elements_kind = instr->elements_kind(); |
| 1987 ASSERT( | 1985 ASSERT( |
| 1988 (representation.IsInteger32() && | 1986 (instr->value()->representation().IsInteger32() && |
| 1989 (elements_kind != EXTERNAL_FLOAT_ELEMENTS) && | 1987 (elements_kind != EXTERNAL_FLOAT_ELEMENTS) && |
| 1990 (elements_kind != EXTERNAL_DOUBLE_ELEMENTS)) || | 1988 (elements_kind != EXTERNAL_DOUBLE_ELEMENTS)) || |
| 1991 (representation.IsDouble() && | 1989 (instr->value()->representation().IsDouble() && |
| 1992 ((elements_kind == EXTERNAL_FLOAT_ELEMENTS) || | 1990 ((elements_kind == EXTERNAL_FLOAT_ELEMENTS) || |
| 1993 (elements_kind == EXTERNAL_DOUBLE_ELEMENTS)))); | 1991 (elements_kind == EXTERNAL_DOUBLE_ELEMENTS)))); |
| 1994 ASSERT(instr->external_pointer()->representation().IsExternal()); | 1992 ASSERT(instr->external_pointer()->representation().IsExternal()); |
| 1995 ASSERT(instr->key()->representation().IsInteger32()); | 1993 ASSERT(instr->key()->representation().IsInteger32()); |
| 1996 | 1994 |
| 1997 LOperand* external_pointer = UseRegister(instr->external_pointer()); | 1995 LOperand* external_pointer = UseRegister(instr->external_pointer()); |
| 1998 bool val_is_temp_register = | 1996 bool val_is_temp_register = |
| 1999 elements_kind == EXTERNAL_PIXEL_ELEMENTS || | 1997 elements_kind == EXTERNAL_PIXEL_ELEMENTS || |
| 2000 elements_kind == EXTERNAL_FLOAT_ELEMENTS; | 1998 elements_kind == EXTERNAL_FLOAT_ELEMENTS; |
| 2001 LOperand* val = val_is_temp_register | 1999 LOperand* val = val_is_temp_register |
| (...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2262 | 2260 |
| 2263 LInstruction* LChunkBuilder::DoIn(HIn* instr) { | 2261 LInstruction* LChunkBuilder::DoIn(HIn* instr) { |
| 2264 LOperand* key = UseRegisterAtStart(instr->key()); | 2262 LOperand* key = UseRegisterAtStart(instr->key()); |
| 2265 LOperand* object = UseRegisterAtStart(instr->object()); | 2263 LOperand* object = UseRegisterAtStart(instr->object()); |
| 2266 LIn* result = new LIn(key, object); | 2264 LIn* result = new LIn(key, object); |
| 2267 return MarkAsCall(DefineFixed(result, r0), instr); | 2265 return MarkAsCall(DefineFixed(result, r0), instr); |
| 2268 } | 2266 } |
| 2269 | 2267 |
| 2270 | 2268 |
| 2271 } } // namespace v8::internal | 2269 } } // namespace v8::internal |
| OLD | NEW |