| 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 1998 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2009 ASSERT( | 2009 ASSERT( |
| 2010 (representation.IsInteger32() && (array_type != kExternalFloatArray && | 2010 (representation.IsInteger32() && (array_type != kExternalFloatArray && |
| 2011 array_type != kExternalDoubleArray)) || | 2011 array_type != kExternalDoubleArray)) || |
| 2012 (representation.IsDouble() && (array_type == kExternalFloatArray || | 2012 (representation.IsDouble() && (array_type == kExternalFloatArray || |
| 2013 array_type == kExternalDoubleArray))); | 2013 array_type == kExternalDoubleArray))); |
| 2014 ASSERT(instr->external_pointer()->representation().IsExternal()); | 2014 ASSERT(instr->external_pointer()->representation().IsExternal()); |
| 2015 ASSERT(instr->key()->representation().IsInteger32()); | 2015 ASSERT(instr->key()->representation().IsInteger32()); |
| 2016 | 2016 |
| 2017 LOperand* external_pointer = UseRegister(instr->external_pointer()); | 2017 LOperand* external_pointer = UseRegister(instr->external_pointer()); |
| 2018 LOperand* key = UseRegisterOrConstant(instr->key()); | 2018 LOperand* key = UseRegisterOrConstant(instr->key()); |
| 2019 LOperand* temp = NULL; | |
| 2020 LOperand* val = NULL; | 2019 LOperand* val = NULL; |
| 2021 if (array_type == kExternalByteArray || | 2020 if (array_type == kExternalByteArray || |
| 2022 array_type == kExternalUnsignedByteArray) { | 2021 array_type == kExternalUnsignedByteArray) { |
| 2023 // We need a byte register in this case for the value. | 2022 // We need a byte register in this case for the value. |
| 2024 val = UseFixed(instr->value(), eax); | 2023 val = UseFixed(instr->value(), eax); |
| 2025 } else { | 2024 } else { |
| 2026 val = UseRegister(instr->value()); | 2025 val = UseRegister(instr->value()); |
| 2027 } | 2026 } |
| 2028 | 2027 |
| 2029 return new LStoreKeyedSpecializedArrayElement(external_pointer, | 2028 return new LStoreKeyedSpecializedArrayElement(external_pointer, |
| 2030 key, | 2029 key, |
| 2031 val, | 2030 val); |
| 2032 temp); | |
| 2033 } | 2031 } |
| 2034 | 2032 |
| 2035 | 2033 |
| 2036 LInstruction* LChunkBuilder::DoStoreKeyedGeneric(HStoreKeyedGeneric* instr) { | 2034 LInstruction* LChunkBuilder::DoStoreKeyedGeneric(HStoreKeyedGeneric* instr) { |
| 2037 LOperand* context = UseFixed(instr->context(), esi); | 2035 LOperand* context = UseFixed(instr->context(), esi); |
| 2038 LOperand* object = UseFixed(instr->object(), edx); | 2036 LOperand* object = UseFixed(instr->object(), edx); |
| 2039 LOperand* key = UseFixed(instr->key(), ecx); | 2037 LOperand* key = UseFixed(instr->key(), ecx); |
| 2040 LOperand* value = UseFixed(instr->value(), eax); | 2038 LOperand* value = UseFixed(instr->value(), eax); |
| 2041 | 2039 |
| 2042 ASSERT(instr->object()->representation().IsTagged()); | 2040 ASSERT(instr->object()->representation().IsTagged()); |
| (...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2266 LOperand* key = UseOrConstantAtStart(instr->key()); | 2264 LOperand* key = UseOrConstantAtStart(instr->key()); |
| 2267 LOperand* object = UseOrConstantAtStart(instr->object()); | 2265 LOperand* object = UseOrConstantAtStart(instr->object()); |
| 2268 LIn* result = new LIn(key, object); | 2266 LIn* result = new LIn(key, object); |
| 2269 return MarkAsCall(DefineFixed(result, eax), instr); | 2267 return MarkAsCall(DefineFixed(result, eax), instr); |
| 2270 } | 2268 } |
| 2271 | 2269 |
| 2272 | 2270 |
| 2273 } } // namespace v8::internal | 2271 } } // namespace v8::internal |
| 2274 | 2272 |
| 2275 #endif // V8_TARGET_ARCH_IA32 | 2273 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |