OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 1353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1364 } | 1364 } |
1365 LOperand* elements() { return inputs_[0]; } | 1365 LOperand* elements() { return inputs_[0]; } |
1366 LOperand* key() { return inputs_[1]; } | 1366 LOperand* key() { return inputs_[1]; } |
1367 uint32_t additional_index() const { return hydrogen()->index_offset(); } | 1367 uint32_t additional_index() const { return hydrogen()->index_offset(); } |
1368 ElementsKind elements_kind() const { | 1368 ElementsKind elements_kind() const { |
1369 return hydrogen()->elements_kind(); | 1369 return hydrogen()->elements_kind(); |
1370 } | 1370 } |
1371 }; | 1371 }; |
1372 | 1372 |
1373 | 1373 |
| 1374 template <class T> |
| 1375 inline static bool ArrayOpClobbersKey(T *value) { |
| 1376 CHECK(value->IsLoadKeyed() || value->IsStoreKeyed()); |
| 1377 return !value->IsConstant() && (value->key()->representation().IsTagged() |
| 1378 || value->IsDehoisted()); |
| 1379 } |
| 1380 |
| 1381 |
1374 class LLoadKeyedGeneric: public LTemplateInstruction<1, 2, 0> { | 1382 class LLoadKeyedGeneric: public LTemplateInstruction<1, 2, 0> { |
1375 public: | 1383 public: |
1376 LLoadKeyedGeneric(LOperand* obj, LOperand* key) { | 1384 LLoadKeyedGeneric(LOperand* obj, LOperand* key) { |
1377 inputs_[0] = obj; | 1385 inputs_[0] = obj; |
1378 inputs_[1] = key; | 1386 inputs_[1] = key; |
1379 } | 1387 } |
1380 | 1388 |
1381 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedGeneric, "load-keyed-generic") | 1389 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedGeneric, "load-keyed-generic") |
1382 | 1390 |
1383 LOperand* object() { return inputs_[0]; } | 1391 LOperand* object() { return inputs_[0]; } |
(...skipping 1101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2485 | 2493 |
2486 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2494 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
2487 }; | 2495 }; |
2488 | 2496 |
2489 #undef DECLARE_HYDROGEN_ACCESSOR | 2497 #undef DECLARE_HYDROGEN_ACCESSOR |
2490 #undef DECLARE_CONCRETE_INSTRUCTION | 2498 #undef DECLARE_CONCRETE_INSTRUCTION |
2491 | 2499 |
2492 } } // namespace v8::int | 2500 } } // namespace v8::int |
2493 | 2501 |
2494 #endif // V8_X64_LITHIUM_X64_H_ | 2502 #endif // V8_X64_LITHIUM_X64_H_ |
OLD | NEW |