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

Side by Side Diff: src/arm/lithium-arm.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 1838 matching lines...) Expand 10 before | Expand all | Expand 10 after
1849 LOperand* key = UseRegisterAtStart(instr->key()); 1849 LOperand* key = UseRegisterAtStart(instr->key());
1850 LLoadKeyedFastElement* result = new LLoadKeyedFastElement(obj, key); 1850 LLoadKeyedFastElement* result = new LLoadKeyedFastElement(obj, key);
1851 return AssignEnvironment(DefineSameAsFirst(result)); 1851 return AssignEnvironment(DefineSameAsFirst(result));
1852 } 1852 }
1853 1853
1854 1854
1855 LInstruction* LChunkBuilder::DoLoadKeyedSpecializedArrayElement( 1855 LInstruction* LChunkBuilder::DoLoadKeyedSpecializedArrayElement(
1856 HLoadKeyedSpecializedArrayElement* instr) { 1856 HLoadKeyedSpecializedArrayElement* instr) {
1857 ExternalArrayType array_type = instr->array_type(); 1857 ExternalArrayType array_type = instr->array_type();
1858 Representation representation(instr->representation()); 1858 Representation representation(instr->representation());
1859 ASSERT((representation.IsInteger32() && array_type != kExternalFloatArray) || 1859 ASSERT(
1860 (representation.IsDouble() && array_type == kExternalFloatArray)); 1860 (representation.IsInteger32() && (array_type != kExternalFloatArray &&
1861 array_type != kExternalDoubleArray)) ||
1862 (representation.IsDouble() && (array_type == kExternalFloatArray ||
1863 array_type == kExternalDoubleArray)));
1861 ASSERT(instr->key()->representation().IsInteger32()); 1864 ASSERT(instr->key()->representation().IsInteger32());
1862 LOperand* external_pointer = UseRegister(instr->external_pointer()); 1865 LOperand* external_pointer = UseRegister(instr->external_pointer());
1863 LOperand* key = UseRegister(instr->key()); 1866 LOperand* key = UseRegister(instr->key());
1864 LLoadKeyedSpecializedArrayElement* result = 1867 LLoadKeyedSpecializedArrayElement* result =
1865 new LLoadKeyedSpecializedArrayElement(external_pointer, key); 1868 new LLoadKeyedSpecializedArrayElement(external_pointer, key);
1866 LInstruction* load_instr = DefineAsRegister(result); 1869 LInstruction* load_instr = DefineAsRegister(result);
1867 // An unsigned int array load might overflow and cause a deopt, make sure it 1870 // An unsigned int array load might overflow and cause a deopt, make sure it
1868 // has an environment. 1871 // has an environment.
1869 return (array_type == kExternalUnsignedIntArray) ? 1872 return (array_type == kExternalUnsignedIntArray) ?
1870 AssignEnvironment(load_instr) : load_instr; 1873 AssignEnvironment(load_instr) : load_instr;
(...skipping 26 matching lines...) Expand all
1897 : UseRegisterOrConstantAtStart(instr->key()); 1900 : UseRegisterOrConstantAtStart(instr->key());
1898 1901
1899 return AssignEnvironment(new LStoreKeyedFastElement(obj, key, val)); 1902 return AssignEnvironment(new LStoreKeyedFastElement(obj, key, val));
1900 } 1903 }
1901 1904
1902 1905
1903 LInstruction* LChunkBuilder::DoStoreKeyedSpecializedArrayElement( 1906 LInstruction* LChunkBuilder::DoStoreKeyedSpecializedArrayElement(
1904 HStoreKeyedSpecializedArrayElement* instr) { 1907 HStoreKeyedSpecializedArrayElement* instr) {
1905 Representation representation(instr->value()->representation()); 1908 Representation representation(instr->value()->representation());
1906 ExternalArrayType array_type = instr->array_type(); 1909 ExternalArrayType array_type = instr->array_type();
1907 ASSERT((representation.IsInteger32() && array_type != kExternalFloatArray) || 1910 ASSERT(
1908 (representation.IsDouble() && array_type == kExternalFloatArray)); 1911 (representation.IsInteger32() && (array_type != kExternalFloatArray &&
1912 array_type != kExternalDoubleArray)) ||
1913 (representation.IsDouble() && (array_type == kExternalFloatArray ||
1914 array_type == kExternalDoubleArray)));
1909 ASSERT(instr->external_pointer()->representation().IsExternal()); 1915 ASSERT(instr->external_pointer()->representation().IsExternal());
1910 ASSERT(instr->key()->representation().IsInteger32()); 1916 ASSERT(instr->key()->representation().IsInteger32());
1911 1917
1912 LOperand* external_pointer = UseRegister(instr->external_pointer()); 1918 LOperand* external_pointer = UseRegister(instr->external_pointer());
1913 bool val_is_temp_register = array_type == kExternalPixelArray || 1919 bool val_is_temp_register = array_type == kExternalPixelArray ||
1914 array_type == kExternalFloatArray; 1920 array_type == kExternalFloatArray;
1915 LOperand* val = val_is_temp_register 1921 LOperand* val = val_is_temp_register
1916 ? UseTempRegister(instr->value()) 1922 ? UseTempRegister(instr->value())
1917 : UseRegister(instr->value()); 1923 : UseRegister(instr->value());
1918 LOperand* key = UseRegister(instr->key()); 1924 LOperand* key = UseRegister(instr->key());
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
2132 2138
2133 2139
2134 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { 2140 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) {
2135 HEnvironment* outer = current_block_->last_environment()->outer(); 2141 HEnvironment* outer = current_block_->last_environment()->outer();
2136 current_block_->UpdateEnvironment(outer); 2142 current_block_->UpdateEnvironment(outer);
2137 return NULL; 2143 return NULL;
2138 } 2144 }
2139 2145
2140 2146
2141 } } // namespace v8::internal 2147 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698