Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: src/x64/lithium-x64.cc

Issue 9285013: Fix building with clang (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: . Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/serialize.cc ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1894 matching lines...) Expand 10 before | Expand all | Expand 10 after
1905 LOperand* key = UseRegisterOrConstantAtStart(instr->key()); 1905 LOperand* key = UseRegisterOrConstantAtStart(instr->key());
1906 LLoadKeyedFastDoubleElement* result = 1906 LLoadKeyedFastDoubleElement* result =
1907 new LLoadKeyedFastDoubleElement(elements, key); 1907 new LLoadKeyedFastDoubleElement(elements, key);
1908 return AssignEnvironment(DefineAsRegister(result)); 1908 return AssignEnvironment(DefineAsRegister(result));
1909 } 1909 }
1910 1910
1911 1911
1912 LInstruction* LChunkBuilder::DoLoadKeyedSpecializedArrayElement( 1912 LInstruction* LChunkBuilder::DoLoadKeyedSpecializedArrayElement(
1913 HLoadKeyedSpecializedArrayElement* instr) { 1913 HLoadKeyedSpecializedArrayElement* instr) {
1914 ElementsKind elements_kind = instr->elements_kind(); 1914 ElementsKind elements_kind = instr->elements_kind();
1915 Representation representation(instr->representation());
1916 ASSERT( 1915 ASSERT(
1917 (representation.IsInteger32() && 1916 (instr->representation().IsInteger32() &&
1918 (elements_kind != EXTERNAL_FLOAT_ELEMENTS) && 1917 (elements_kind != EXTERNAL_FLOAT_ELEMENTS) &&
1919 (elements_kind != EXTERNAL_DOUBLE_ELEMENTS)) || 1918 (elements_kind != EXTERNAL_DOUBLE_ELEMENTS)) ||
1920 (representation.IsDouble() && 1919 (instr->representation().IsDouble() &&
1921 ((elements_kind == EXTERNAL_FLOAT_ELEMENTS) || 1920 ((elements_kind == EXTERNAL_FLOAT_ELEMENTS) ||
1922 (elements_kind == EXTERNAL_DOUBLE_ELEMENTS)))); 1921 (elements_kind == EXTERNAL_DOUBLE_ELEMENTS))));
1923 ASSERT(instr->key()->representation().IsInteger32()); 1922 ASSERT(instr->key()->representation().IsInteger32());
1924 LOperand* external_pointer = UseRegister(instr->external_pointer()); 1923 LOperand* external_pointer = UseRegister(instr->external_pointer());
1925 LOperand* key = UseRegisterOrConstant(instr->key()); 1924 LOperand* key = UseRegisterOrConstant(instr->key());
1926 LLoadKeyedSpecializedArrayElement* result = 1925 LLoadKeyedSpecializedArrayElement* result =
1927 new LLoadKeyedSpecializedArrayElement(external_pointer, key); 1926 new LLoadKeyedSpecializedArrayElement(external_pointer, key);
1928 LInstruction* load_instr = DefineAsRegister(result); 1927 LInstruction* load_instr = DefineAsRegister(result);
1929 // An unsigned int array load might overflow and cause a deopt, make sure it 1928 // An unsigned int array load might overflow and cause a deopt, make sure it
1930 // has an environment. 1929 // has an environment.
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
1969 LOperand* elements = UseRegisterAtStart(instr->elements()); 1968 LOperand* elements = UseRegisterAtStart(instr->elements());
1970 LOperand* val = UseTempRegister(instr->value()); 1969 LOperand* val = UseTempRegister(instr->value());
1971 LOperand* key = UseRegisterOrConstantAtStart(instr->key()); 1970 LOperand* key = UseRegisterOrConstantAtStart(instr->key());
1972 1971
1973 return new LStoreKeyedFastDoubleElement(elements, key, val); 1972 return new LStoreKeyedFastDoubleElement(elements, key, val);
1974 } 1973 }
1975 1974
1976 1975
1977 LInstruction* LChunkBuilder::DoStoreKeyedSpecializedArrayElement( 1976 LInstruction* LChunkBuilder::DoStoreKeyedSpecializedArrayElement(
1978 HStoreKeyedSpecializedArrayElement* instr) { 1977 HStoreKeyedSpecializedArrayElement* instr) {
1979 Representation representation(instr->value()->representation());
1980 ElementsKind elements_kind = instr->elements_kind(); 1978 ElementsKind elements_kind = instr->elements_kind();
1981 ASSERT( 1979 ASSERT(
1982 (representation.IsInteger32() && 1980 (instr->value()->representation().IsInteger32() &&
1983 (elements_kind != EXTERNAL_FLOAT_ELEMENTS) && 1981 (elements_kind != EXTERNAL_FLOAT_ELEMENTS) &&
1984 (elements_kind != EXTERNAL_DOUBLE_ELEMENTS)) || 1982 (elements_kind != EXTERNAL_DOUBLE_ELEMENTS)) ||
1985 (representation.IsDouble() && 1983 (instr->value()->representation().IsDouble() &&
1986 ((elements_kind == EXTERNAL_FLOAT_ELEMENTS) || 1984 ((elements_kind == EXTERNAL_FLOAT_ELEMENTS) ||
1987 (elements_kind == EXTERNAL_DOUBLE_ELEMENTS)))); 1985 (elements_kind == EXTERNAL_DOUBLE_ELEMENTS))));
1988 ASSERT(instr->external_pointer()->representation().IsExternal()); 1986 ASSERT(instr->external_pointer()->representation().IsExternal());
1989 ASSERT(instr->key()->representation().IsInteger32()); 1987 ASSERT(instr->key()->representation().IsInteger32());
1990 1988
1991 LOperand* external_pointer = UseRegister(instr->external_pointer()); 1989 LOperand* external_pointer = UseRegister(instr->external_pointer());
1992 bool val_is_temp_register = 1990 bool val_is_temp_register =
1993 elements_kind == EXTERNAL_PIXEL_ELEMENTS || 1991 elements_kind == EXTERNAL_PIXEL_ELEMENTS ||
1994 elements_kind == EXTERNAL_FLOAT_ELEMENTS; 1992 elements_kind == EXTERNAL_FLOAT_ELEMENTS;
1995 LOperand* val = val_is_temp_register 1993 LOperand* val = val_is_temp_register
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
2265 LOperand* key = UseOrConstantAtStart(instr->key()); 2263 LOperand* key = UseOrConstantAtStart(instr->key());
2266 LOperand* object = UseOrConstantAtStart(instr->object()); 2264 LOperand* object = UseOrConstantAtStart(instr->object());
2267 LIn* result = new LIn(key, object); 2265 LIn* result = new LIn(key, object);
2268 return MarkAsCall(DefineFixed(result, rax), instr); 2266 return MarkAsCall(DefineFixed(result, rax), instr);
2269 } 2267 }
2270 2268
2271 2269
2272 } } // namespace v8::internal 2270 } } // namespace v8::internal
2273 2271
2274 #endif // V8_TARGET_ARCH_X64 2272 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/serialize.cc ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698