| 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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 V(PixelElementsAccessor, EXTERNAL_PIXEL_ELEMENTS, ExternalPixelArray) | 91 V(PixelElementsAccessor, EXTERNAL_PIXEL_ELEMENTS, ExternalPixelArray) |
| 92 | 92 |
| 93 | 93 |
| 94 template<ElementsKind Kind> class ElementsKindTraits { | 94 template<ElementsKind Kind> class ElementsKindTraits { |
| 95 public: | 95 public: |
| 96 typedef FixedArrayBase BackingStore; | 96 typedef FixedArrayBase BackingStore; |
| 97 }; | 97 }; |
| 98 | 98 |
| 99 #define ELEMENTS_TRAITS(Class, KindParam, Store) \ | 99 #define ELEMENTS_TRAITS(Class, KindParam, Store) \ |
| 100 template<> class ElementsKindTraits<KindParam> { \ | 100 template<> class ElementsKindTraits<KindParam> { \ |
| 101 public: \ | 101 public: \ |
| 102 static const ElementsKind Kind = KindParam; \ | 102 static const ElementsKind Kind = KindParam; \ |
| 103 typedef Store BackingStore; \ | 103 typedef Store BackingStore; \ |
| 104 }; | 104 }; |
| 105 ELEMENTS_LIST(ELEMENTS_TRAITS) | 105 ELEMENTS_LIST(ELEMENTS_TRAITS) |
| 106 #undef ELEMENTS_TRAITS | 106 #undef ELEMENTS_TRAITS |
| 107 | 107 |
| 108 | 108 |
| 109 ElementsAccessor** ElementsAccessor::elements_accessors_; | 109 ElementsAccessor** ElementsAccessor::elements_accessors_; |
| 110 | 110 |
| 111 | 111 |
| (...skipping 1175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1287 if (!maybe_obj->To(&new_backing_store)) return maybe_obj; | 1287 if (!maybe_obj->To(&new_backing_store)) return maybe_obj; |
| 1288 new_backing_store->set(0, length); | 1288 new_backing_store->set(0, length); |
| 1289 { MaybeObject* result = array->SetContent(new_backing_store); | 1289 { MaybeObject* result = array->SetContent(new_backing_store); |
| 1290 if (result->IsFailure()) return result; | 1290 if (result->IsFailure()) return result; |
| 1291 } | 1291 } |
| 1292 return array; | 1292 return array; |
| 1293 } | 1293 } |
| 1294 | 1294 |
| 1295 | 1295 |
| 1296 } } // namespace v8::internal | 1296 } } // namespace v8::internal |
| OLD | NEW |