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

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

Powered by Google App Engine
This is Rietveld 408576698