| 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 4976 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4987 MUST_USE_RESULT MaybeObject* SetValue(uint32_t index, Object* value); | 4987 MUST_USE_RESULT MaybeObject* SetValue(uint32_t index, Object* value); |
| 4988 | 4988 |
| 4989 static Handle<Object> SetValue(Handle<FixedTypedArray<Traits> > array, | 4989 static Handle<Object> SetValue(Handle<FixedTypedArray<Traits> > array, |
| 4990 uint32_t index, | 4990 uint32_t index, |
| 4991 Handle<Object> value); | 4991 Handle<Object> value); |
| 4992 | 4992 |
| 4993 DECLARE_PRINTER(FixedTypedArray) | 4993 DECLARE_PRINTER(FixedTypedArray) |
| 4994 DECLARE_VERIFIER(FixedTypedArray) | 4994 DECLARE_VERIFIER(FixedTypedArray) |
| 4995 | 4995 |
| 4996 private: | 4996 private: |
| 4997 inline static typename Traits::ElementType castObject(Object* value); |
| 4998 |
| 4997 DISALLOW_IMPLICIT_CONSTRUCTORS(FixedTypedArray); | 4999 DISALLOW_IMPLICIT_CONSTRUCTORS(FixedTypedArray); |
| 4998 }; | 5000 }; |
| 4999 | 5001 |
| 5000 #define FIXED_TYPED_ARRAY_TRAITS(Type, type, TYPE, elementType, size) \ | 5002 #define FIXED_TYPED_ARRAY_TRAITS(Type, type, TYPE, elementType, size) \ |
| 5001 class Type##ArrayTraits { \ | 5003 class Type##ArrayTraits { \ |
| 5002 public: \ | 5004 public: \ |
| 5003 typedef elementType ElementType; \ | 5005 typedef elementType ElementType; \ |
| 5004 static const InstanceType kInstanceType = FIXED_##TYPE##_ARRAY_TYPE; \ | 5006 static const InstanceType kInstanceType = FIXED_##TYPE##_ARRAY_TYPE; \ |
| 5005 static const char* Designator() { return #type " array"; } \ | 5007 static const char* Designator() { return #type " array"; } \ |
| 5006 static inline MaybeObject* ToObject(Heap* heap, elementType scalar); \ | 5008 static inline MaybeObject* ToObject(Heap* heap, elementType scalar); \ |
| (...skipping 5779 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10786 } else { | 10788 } else { |
| 10787 value &= ~(1 << bit_position); | 10789 value &= ~(1 << bit_position); |
| 10788 } | 10790 } |
| 10789 return value; | 10791 return value; |
| 10790 } | 10792 } |
| 10791 }; | 10793 }; |
| 10792 | 10794 |
| 10793 } } // namespace v8::internal | 10795 } } // namespace v8::internal |
| 10794 | 10796 |
| 10795 #endif // V8_OBJECTS_H_ | 10797 #endif // V8_OBJECTS_H_ |
| OLD | NEW |