OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "v8.h" | 5 #include "v8.h" |
6 | 6 |
7 #include "arguments.h" | 7 #include "arguments.h" |
8 #include "conversions.h" | 8 #include "conversions.h" |
9 #include "elements.h" | 9 #include "elements.h" |
10 #include "objects.h" | 10 #include "objects.h" |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 FixedUint8ClampedArray) | 105 FixedUint8ClampedArray) |
106 | 106 |
107 | 107 |
108 template<ElementsKind Kind> class ElementsKindTraits { | 108 template<ElementsKind Kind> class ElementsKindTraits { |
109 public: | 109 public: |
110 typedef FixedArrayBase BackingStore; | 110 typedef FixedArrayBase BackingStore; |
111 }; | 111 }; |
112 | 112 |
113 #define ELEMENTS_TRAITS(Class, KindParam, Store) \ | 113 #define ELEMENTS_TRAITS(Class, KindParam, Store) \ |
114 template<> class ElementsKindTraits<KindParam> { \ | 114 template<> class ElementsKindTraits<KindParam> { \ |
115 public: \ | 115 public: /* NOLINT */ \ |
116 static const ElementsKind Kind = KindParam; \ | 116 static const ElementsKind Kind = KindParam; \ |
117 typedef Store BackingStore; \ | 117 typedef Store BackingStore; \ |
118 }; | 118 }; |
119 ELEMENTS_LIST(ELEMENTS_TRAITS) | 119 ELEMENTS_LIST(ELEMENTS_TRAITS) |
120 #undef ELEMENTS_TRAITS | 120 #undef ELEMENTS_TRAITS |
121 | 121 |
122 | 122 |
123 ElementsAccessor** ElementsAccessor::elements_accessors_; | 123 ElementsAccessor** ElementsAccessor::elements_accessors_; |
124 | 124 |
125 | 125 |
(...skipping 1866 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1992 UNREACHABLE(); | 1992 UNREACHABLE(); |
1993 break; | 1993 break; |
1994 } | 1994 } |
1995 | 1995 |
1996 array->set_elements(*elms); | 1996 array->set_elements(*elms); |
1997 array->set_length(Smi::FromInt(number_of_elements)); | 1997 array->set_length(Smi::FromInt(number_of_elements)); |
1998 return array; | 1998 return array; |
1999 } | 1999 } |
2000 | 2000 |
2001 } } // namespace v8::internal | 2001 } } // namespace v8::internal |
OLD | NEW |