Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 1855 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1866 LInstruction* LChunkBuilder::DoStoreKeyedSpecializedArrayElement( | 1866 LInstruction* LChunkBuilder::DoStoreKeyedSpecializedArrayElement( |
| 1867 HStoreKeyedSpecializedArrayElement* instr) { | 1867 HStoreKeyedSpecializedArrayElement* instr) { |
| 1868 Representation representation(instr->value()->representation()); | 1868 Representation representation(instr->value()->representation()); |
| 1869 ExternalArrayType array_type = instr->array_type(); | 1869 ExternalArrayType array_type = instr->array_type(); |
| 1870 ASSERT((representation.IsInteger32() && array_type != kExternalFloatArray) || | 1870 ASSERT((representation.IsInteger32() && array_type != kExternalFloatArray) || |
| 1871 (representation.IsDouble() && array_type == kExternalFloatArray)); | 1871 (representation.IsDouble() && array_type == kExternalFloatArray)); |
| 1872 ASSERT(instr->external_pointer()->representation().IsExternal()); | 1872 ASSERT(instr->external_pointer()->representation().IsExternal()); |
| 1873 ASSERT(instr->key()->representation().IsInteger32()); | 1873 ASSERT(instr->key()->representation().IsInteger32()); |
| 1874 | 1874 |
| 1875 LOperand* external_pointer = UseRegister(instr->external_pointer()); | 1875 LOperand* external_pointer = UseRegister(instr->external_pointer()); |
| 1876 bool val_is_temp_register = array_type == kExternalPixelArray || | 1876 LOperand* val = NULL; |
| 1877 array_type == kExternalFloatArray; | 1877 switch (array_type) { |
| 1878 LOperand* val = val_is_temp_register | 1878 case kExternalPixelArray: |
|
danno
2011/03/29 14:25:34
Doesn't pixel array still need to be a temp, since
fschneider
2011/03/29 14:43:58
That would be ok, since UseFixed is always a fixed
| |
| 1879 ? UseTempRegister(instr->value()) | 1879 case kExternalByteArray: |
| 1880 : UseRegister(instr->key()); | 1880 case kExternalUnsignedByteArray: |
| 1881 // We need a byte register in these cases. | |
| 1882 val = UseFixed(instr->value(), rax); | |
|
danno
2011/03/29 14:25:34
Do you really need to use rax? On 64 bit the byte
fschneider
2011/03/29 14:43:58
You're right. I didn't realize x64 allows that. I
| |
| 1883 break; | |
| 1884 case kExternalFloatArray: | |
| 1885 // We need a writable register here. | |
| 1886 val = UseTempRegister(instr->value()); | |
| 1887 break; | |
| 1888 default: | |
| 1889 val = UseRegister(instr->value()); | |
| 1890 break; | |
| 1891 } | |
| 1881 LOperand* key = UseRegister(instr->key()); | 1892 LOperand* key = UseRegister(instr->key()); |
| 1882 | 1893 |
| 1883 return new LStoreKeyedSpecializedArrayElement(external_pointer, | 1894 return new LStoreKeyedSpecializedArrayElement(external_pointer, |
| 1884 key, | 1895 key, |
| 1885 val); | 1896 val); |
| 1886 } | 1897 } |
| 1887 | 1898 |
| 1888 | 1899 |
| 1889 LInstruction* LChunkBuilder::DoStoreKeyedGeneric(HStoreKeyedGeneric* instr) { | 1900 LInstruction* LChunkBuilder::DoStoreKeyedGeneric(HStoreKeyedGeneric* instr) { |
| 1890 LOperand* object = UseFixed(instr->object(), rdx); | 1901 LOperand* object = UseFixed(instr->object(), rdx); |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2095 | 2106 |
| 2096 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { | 2107 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { |
| 2097 HEnvironment* outer = current_block_->last_environment()->outer(); | 2108 HEnvironment* outer = current_block_->last_environment()->outer(); |
| 2098 current_block_->UpdateEnvironment(outer); | 2109 current_block_->UpdateEnvironment(outer); |
| 2099 return NULL; | 2110 return NULL; |
| 2100 } | 2111 } |
| 2101 | 2112 |
| 2102 } } // namespace v8::internal | 2113 } } // namespace v8::internal |
| 2103 | 2114 |
| 2104 #endif // V8_TARGET_ARCH_X64 | 2115 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |