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

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

Issue 6879009: Support Float64Arrays (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 8 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
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 1828 matching lines...) Expand 10 before | Expand all | Expand 10 after
1839 LOperand* key = UseRegisterAtStart(instr->key()); 1839 LOperand* key = UseRegisterAtStart(instr->key());
1840 LLoadKeyedFastElement* result = new LLoadKeyedFastElement(obj, key); 1840 LLoadKeyedFastElement* result = new LLoadKeyedFastElement(obj, key);
1841 return AssignEnvironment(DefineSameAsFirst(result)); 1841 return AssignEnvironment(DefineSameAsFirst(result));
1842 } 1842 }
1843 1843
1844 1844
1845 LInstruction* LChunkBuilder::DoLoadKeyedSpecializedArrayElement( 1845 LInstruction* LChunkBuilder::DoLoadKeyedSpecializedArrayElement(
1846 HLoadKeyedSpecializedArrayElement* instr) { 1846 HLoadKeyedSpecializedArrayElement* instr) {
1847 ExternalArrayType array_type = instr->array_type(); 1847 ExternalArrayType array_type = instr->array_type();
1848 Representation representation(instr->representation()); 1848 Representation representation(instr->representation());
1849 ASSERT((representation.IsInteger32() && array_type != kExternalFloatArray) || 1849 ASSERT(
1850 (representation.IsDouble() && array_type == kExternalFloatArray)); 1850 (representation.IsInteger32() && (array_type != kExternalFloatArray &&
1851 array_type != kExternalDoubleArray)) ||
1852 (representation.IsDouble() && (array_type == kExternalFloatArray ||
1853 array_type == kExternalDoubleArray)));
1851 ASSERT(instr->key()->representation().IsInteger32()); 1854 ASSERT(instr->key()->representation().IsInteger32());
1852 LOperand* external_pointer = UseRegister(instr->external_pointer()); 1855 LOperand* external_pointer = UseRegister(instr->external_pointer());
1853 LOperand* key = UseRegister(instr->key()); 1856 LOperand* key = UseRegister(instr->key());
1854 LLoadKeyedSpecializedArrayElement* result = 1857 LLoadKeyedSpecializedArrayElement* result =
1855 new LLoadKeyedSpecializedArrayElement(external_pointer, key); 1858 new LLoadKeyedSpecializedArrayElement(external_pointer, key);
1856 LInstruction* load_instr = DefineAsRegister(result); 1859 LInstruction* load_instr = DefineAsRegister(result);
1857 // An unsigned int array load might overflow and cause a deopt, make sure it 1860 // An unsigned int array load might overflow and cause a deopt, make sure it
1858 // has an environment. 1861 // has an environment.
1859 return (array_type == kExternalUnsignedIntArray) ? 1862 return (array_type == kExternalUnsignedIntArray) ?
1860 AssignEnvironment(load_instr) : load_instr; 1863 AssignEnvironment(load_instr) : load_instr;
(...skipping 25 matching lines...) Expand all
1886 : UseRegisterOrConstantAtStart(instr->key()); 1889 : UseRegisterOrConstantAtStart(instr->key());
1887 1890
1888 return AssignEnvironment(new LStoreKeyedFastElement(obj, key, val)); 1891 return AssignEnvironment(new LStoreKeyedFastElement(obj, key, val));
1889 } 1892 }
1890 1893
1891 1894
1892 LInstruction* LChunkBuilder::DoStoreKeyedSpecializedArrayElement( 1895 LInstruction* LChunkBuilder::DoStoreKeyedSpecializedArrayElement(
1893 HStoreKeyedSpecializedArrayElement* instr) { 1896 HStoreKeyedSpecializedArrayElement* instr) {
1894 Representation representation(instr->value()->representation()); 1897 Representation representation(instr->value()->representation());
1895 ExternalArrayType array_type = instr->array_type(); 1898 ExternalArrayType array_type = instr->array_type();
1896 ASSERT((representation.IsInteger32() && array_type != kExternalFloatArray) || 1899 ASSERT(
1897 (representation.IsDouble() && array_type == kExternalFloatArray)); 1900 (representation.IsInteger32() && (array_type != kExternalFloatArray &&
1901 array_type != kExternalDoubleArray)) ||
1902 (representation.IsDouble() && (array_type == kExternalFloatArray ||
1903 array_type == kExternalDoubleArray)));
1898 ASSERT(instr->external_pointer()->representation().IsExternal()); 1904 ASSERT(instr->external_pointer()->representation().IsExternal());
1899 ASSERT(instr->key()->representation().IsInteger32()); 1905 ASSERT(instr->key()->representation().IsInteger32());
1900 1906
1901 LOperand* external_pointer = UseRegister(instr->external_pointer()); 1907 LOperand* external_pointer = UseRegister(instr->external_pointer());
1902 bool val_is_temp_register = array_type == kExternalPixelArray || 1908 bool val_is_temp_register = array_type == kExternalPixelArray ||
1903 array_type == kExternalFloatArray; 1909 array_type == kExternalFloatArray;
1904 LOperand* val = val_is_temp_register 1910 LOperand* val = val_is_temp_register
1905 ? UseTempRegister(instr->value()) 1911 ? UseTempRegister(instr->value())
1906 : UseRegister(instr->value()); 1912 : UseRegister(instr->value());
1907 LOperand* key = UseRegister(instr->key()); 1913 LOperand* key = UseRegister(instr->key());
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
2128 2134
2129 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { 2135 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) {
2130 HEnvironment* outer = current_block_->last_environment()->outer(); 2136 HEnvironment* outer = current_block_->last_environment()->outer();
2131 current_block_->UpdateEnvironment(outer); 2137 current_block_->UpdateEnvironment(outer);
2132 return NULL; 2138 return NULL;
2133 } 2139 }
2134 2140
2135 } } // namespace v8::internal 2141 } } // namespace v8::internal
2136 2142
2137 #endif // V8_TARGET_ARCH_X64 2143 #endif // V8_TARGET_ARCH_X64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698