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

Side by Side Diff: src/ia32/lithium-ia32.h

Issue 101413006: Implement in-heap backing store for typed arrays. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Self-review Created 7 years 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 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 1559 matching lines...) Expand 10 before | Expand all | Expand 10 after
1570 inputs_[1] = key; 1570 inputs_[1] = key;
1571 } 1571 }
1572 LOperand* elements() { return inputs_[0]; } 1572 LOperand* elements() { return inputs_[0]; }
1573 LOperand* key() { return inputs_[1]; } 1573 LOperand* key() { return inputs_[1]; }
1574 ElementsKind elements_kind() const { 1574 ElementsKind elements_kind() const {
1575 return hydrogen()->elements_kind(); 1575 return hydrogen()->elements_kind();
1576 } 1576 }
1577 bool is_external() const { 1577 bool is_external() const {
1578 return hydrogen()->is_external(); 1578 return hydrogen()->is_external();
1579 } 1579 }
1580 bool is_fixed_typed_array() const {
1581 return hydrogen()->is_fixed_typed_array();
1582 }
1580 1583
1581 DECLARE_CONCRETE_INSTRUCTION(LoadKeyed, "load-keyed") 1584 DECLARE_CONCRETE_INSTRUCTION(LoadKeyed, "load-keyed")
1582 DECLARE_HYDROGEN_ACCESSOR(LoadKeyed) 1585 DECLARE_HYDROGEN_ACCESSOR(LoadKeyed)
1583 1586
1584 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; 1587 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
1585 uint32_t additional_index() const { return hydrogen()->index_offset(); } 1588 uint32_t additional_index() const { return hydrogen()->index_offset(); }
1586 bool key_is_smi() { 1589 bool key_is_smi() {
1587 return hydrogen()->key()->representation().IsTagged(); 1590 return hydrogen()->key()->representation().IsTagged();
1588 } 1591 }
1589 }; 1592 };
1590 1593
1591 1594
1592 inline static bool ExternalArrayOpRequiresTemp( 1595 inline static bool ExternalArrayOpRequiresTemp(
1593 Representation key_representation, 1596 Representation key_representation,
1594 ElementsKind elements_kind) { 1597 ElementsKind elements_kind) {
1595 // Operations that require the key to be divided by two to be converted into 1598 // Operations that require the key to be divided by two to be converted into
1596 // an index cannot fold the scale operation into a load and need an extra 1599 // an index cannot fold the scale operation into a load and need an extra
1597 // temp register to do the work. 1600 // temp register to do the work.
1598 return key_representation.IsSmi() && 1601 return key_representation.IsSmi() &&
1599 (elements_kind == EXTERNAL_BYTE_ELEMENTS || 1602 (elements_kind == EXTERNAL_BYTE_ELEMENTS ||
1600 elements_kind == EXTERNAL_UNSIGNED_BYTE_ELEMENTS || 1603 elements_kind == EXTERNAL_UNSIGNED_BYTE_ELEMENTS ||
1601 elements_kind == EXTERNAL_PIXEL_ELEMENTS); 1604 elements_kind == EXTERNAL_PIXEL_ELEMENTS ||
1605 elements_kind == UINT8_ELEMENTS ||
1606 elements_kind == INT8_ELEMENTS ||
1607 elements_kind == UINT8_CLAMPED_ELEMENTS);
1602 } 1608 }
1603 1609
1604 1610
1605 class LLoadKeyedGeneric V8_FINAL : public LTemplateInstruction<1, 3, 0> { 1611 class LLoadKeyedGeneric V8_FINAL : public LTemplateInstruction<1, 3, 0> {
1606 public: 1612 public:
1607 LLoadKeyedGeneric(LOperand* context, LOperand* obj, LOperand* key) { 1613 LLoadKeyedGeneric(LOperand* context, LOperand* obj, LOperand* key) {
1608 inputs_[0] = context; 1614 inputs_[0] = context;
1609 inputs_[1] = obj; 1615 inputs_[1] = obj;
1610 inputs_[2] = key; 1616 inputs_[2] = key;
1611 } 1617 }
(...skipping 637 matching lines...) Expand 10 before | Expand all | Expand 10 after
2249 2255
2250 class LStoreKeyed V8_FINAL : public LTemplateInstruction<0, 3, 0> { 2256 class LStoreKeyed V8_FINAL : public LTemplateInstruction<0, 3, 0> {
2251 public: 2257 public:
2252 LStoreKeyed(LOperand* obj, LOperand* key, LOperand* val) { 2258 LStoreKeyed(LOperand* obj, LOperand* key, LOperand* val) {
2253 inputs_[0] = obj; 2259 inputs_[0] = obj;
2254 inputs_[1] = key; 2260 inputs_[1] = key;
2255 inputs_[2] = val; 2261 inputs_[2] = val;
2256 } 2262 }
2257 2263
2258 bool is_external() const { return hydrogen()->is_external(); } 2264 bool is_external() const { return hydrogen()->is_external(); }
2265 bool is_fixed_typed_array() const {
2266 return hydrogen()->is_fixed_typed_array();
2267 }
2259 LOperand* elements() { return inputs_[0]; } 2268 LOperand* elements() { return inputs_[0]; }
2260 LOperand* key() { return inputs_[1]; } 2269 LOperand* key() { return inputs_[1]; }
2261 LOperand* value() { return inputs_[2]; } 2270 LOperand* value() { return inputs_[2]; }
2262 ElementsKind elements_kind() const { 2271 ElementsKind elements_kind() const {
2263 return hydrogen()->elements_kind(); 2272 return hydrogen()->elements_kind();
2264 } 2273 }
2265 2274
2266 DECLARE_CONCRETE_INSTRUCTION(StoreKeyed, "store-keyed") 2275 DECLARE_CONCRETE_INSTRUCTION(StoreKeyed, "store-keyed")
2267 DECLARE_HYDROGEN_ACCESSOR(StoreKeyed) 2276 DECLARE_HYDROGEN_ACCESSOR(StoreKeyed)
2268 2277
(...skipping 621 matching lines...) Expand 10 before | Expand all | Expand 10 after
2890 2899
2891 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); 2900 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder);
2892 }; 2901 };
2893 2902
2894 #undef DECLARE_HYDROGEN_ACCESSOR 2903 #undef DECLARE_HYDROGEN_ACCESSOR
2895 #undef DECLARE_CONCRETE_INSTRUCTION 2904 #undef DECLARE_CONCRETE_INSTRUCTION
2896 2905
2897 } } // namespace v8::internal 2906 } } // namespace v8::internal
2898 2907
2899 #endif // V8_IA32_LITHIUM_IA32_H_ 2908 #endif // V8_IA32_LITHIUM_IA32_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698