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

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: address comments 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
« no previous file with comments | « src/x64/lithium-codegen-x64.cc ('k') | src/x64/stub-cache-x64.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 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 1826 matching lines...) Expand 10 before | Expand all | Expand 10 after
1837 LOperand* key = UseRegisterAtStart(instr->key()); 1837 LOperand* key = UseRegisterAtStart(instr->key());
1838 LLoadKeyedFastElement* result = new LLoadKeyedFastElement(obj, key); 1838 LLoadKeyedFastElement* result = new LLoadKeyedFastElement(obj, key);
1839 return AssignEnvironment(DefineSameAsFirst(result)); 1839 return AssignEnvironment(DefineSameAsFirst(result));
1840 } 1840 }
1841 1841
1842 1842
1843 LInstruction* LChunkBuilder::DoLoadKeyedSpecializedArrayElement( 1843 LInstruction* LChunkBuilder::DoLoadKeyedSpecializedArrayElement(
1844 HLoadKeyedSpecializedArrayElement* instr) { 1844 HLoadKeyedSpecializedArrayElement* instr) {
1845 ExternalArrayType array_type = instr->array_type(); 1845 ExternalArrayType array_type = instr->array_type();
1846 Representation representation(instr->representation()); 1846 Representation representation(instr->representation());
1847 ASSERT((representation.IsInteger32() && array_type != kExternalFloatArray) || 1847 ASSERT(
1848 (representation.IsDouble() && array_type == kExternalFloatArray)); 1848 (representation.IsInteger32() && (array_type != kExternalFloatArray &&
1849 array_type != kExternalDoubleArray)) ||
1850 (representation.IsDouble() && (array_type == kExternalFloatArray ||
1851 array_type == kExternalDoubleArray)));
1849 ASSERT(instr->key()->representation().IsInteger32()); 1852 ASSERT(instr->key()->representation().IsInteger32());
1850 LOperand* external_pointer = UseRegister(instr->external_pointer()); 1853 LOperand* external_pointer = UseRegister(instr->external_pointer());
1851 LOperand* key = UseRegister(instr->key()); 1854 LOperand* key = UseRegister(instr->key());
1852 LLoadKeyedSpecializedArrayElement* result = 1855 LLoadKeyedSpecializedArrayElement* result =
1853 new LLoadKeyedSpecializedArrayElement(external_pointer, key); 1856 new LLoadKeyedSpecializedArrayElement(external_pointer, key);
1854 LInstruction* load_instr = DefineAsRegister(result); 1857 LInstruction* load_instr = DefineAsRegister(result);
1855 // An unsigned int array load might overflow and cause a deopt, make sure it 1858 // An unsigned int array load might overflow and cause a deopt, make sure it
1856 // has an environment. 1859 // has an environment.
1857 return (array_type == kExternalUnsignedIntArray) ? 1860 return (array_type == kExternalUnsignedIntArray) ?
1858 AssignEnvironment(load_instr) : load_instr; 1861 AssignEnvironment(load_instr) : load_instr;
(...skipping 25 matching lines...) Expand all
1884 : UseRegisterOrConstantAtStart(instr->key()); 1887 : UseRegisterOrConstantAtStart(instr->key());
1885 1888
1886 return AssignEnvironment(new LStoreKeyedFastElement(obj, key, val)); 1889 return AssignEnvironment(new LStoreKeyedFastElement(obj, key, val));
1887 } 1890 }
1888 1891
1889 1892
1890 LInstruction* LChunkBuilder::DoStoreKeyedSpecializedArrayElement( 1893 LInstruction* LChunkBuilder::DoStoreKeyedSpecializedArrayElement(
1891 HStoreKeyedSpecializedArrayElement* instr) { 1894 HStoreKeyedSpecializedArrayElement* instr) {
1892 Representation representation(instr->value()->representation()); 1895 Representation representation(instr->value()->representation());
1893 ExternalArrayType array_type = instr->array_type(); 1896 ExternalArrayType array_type = instr->array_type();
1894 ASSERT((representation.IsInteger32() && array_type != kExternalFloatArray) || 1897 ASSERT(
1895 (representation.IsDouble() && array_type == kExternalFloatArray)); 1898 (representation.IsInteger32() && (array_type != kExternalFloatArray &&
1899 array_type != kExternalDoubleArray)) ||
1900 (representation.IsDouble() && (array_type == kExternalFloatArray ||
1901 array_type == kExternalDoubleArray)));
1896 ASSERT(instr->external_pointer()->representation().IsExternal()); 1902 ASSERT(instr->external_pointer()->representation().IsExternal());
1897 ASSERT(instr->key()->representation().IsInteger32()); 1903 ASSERT(instr->key()->representation().IsInteger32());
1898 1904
1899 LOperand* external_pointer = UseRegister(instr->external_pointer()); 1905 LOperand* external_pointer = UseRegister(instr->external_pointer());
1900 bool val_is_temp_register = array_type == kExternalPixelArray || 1906 bool val_is_temp_register = array_type == kExternalPixelArray ||
1901 array_type == kExternalFloatArray; 1907 array_type == kExternalFloatArray;
1902 LOperand* val = val_is_temp_register 1908 LOperand* val = val_is_temp_register
1903 ? UseTempRegister(instr->value()) 1909 ? UseTempRegister(instr->value())
1904 : UseRegister(instr->value()); 1910 : UseRegister(instr->value());
1905 LOperand* key = UseRegister(instr->key()); 1911 LOperand* key = UseRegister(instr->key());
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
2126 2132
2127 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { 2133 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) {
2128 HEnvironment* outer = current_block_->last_environment()->outer(); 2134 HEnvironment* outer = current_block_->last_environment()->outer();
2129 current_block_->UpdateEnvironment(outer); 2135 current_block_->UpdateEnvironment(outer);
2130 return NULL; 2136 return NULL;
2131 } 2137 }
2132 2138
2133 } } // namespace v8::internal 2139 } } // namespace v8::internal
2134 2140
2135 #endif // V8_TARGET_ARCH_X64 2141 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/lithium-codegen-x64.cc ('k') | src/x64/stub-cache-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698