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

Side by Side Diff: src/objects.h

Issue 14195034: First cut at API for native Typed Arrays. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Self-review Created 7 years, 7 months 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 8629 matching lines...) Expand 10 before | Expand all | Expand 10 after
8640 8640
8641 // [byte_length]: length of typed array in bytes. 8641 // [byte_length]: length of typed array in bytes.
8642 DECL_ACCESSORS(byte_length, Object) 8642 DECL_ACCESSORS(byte_length, Object)
8643 8643
8644 // [length]: length of typed array in elements. 8644 // [length]: length of typed array in elements.
8645 DECL_ACCESSORS(length, Object) 8645 DECL_ACCESSORS(length, Object)
8646 8646
8647 // Casting. 8647 // Casting.
8648 static inline JSTypedArray* cast(Object* obj); 8648 static inline JSTypedArray* cast(Object* obj);
8649 8649
8650 ExternalArrayType type();
8651
8650 // Dispatched behavior. 8652 // Dispatched behavior.
8651 DECLARE_PRINTER(JSTypedArray) 8653 DECLARE_PRINTER(JSTypedArray)
8652 DECLARE_VERIFIER(JSTypedArray) 8654 DECLARE_VERIFIER(JSTypedArray)
8653 8655
8654 static const int kBufferOffset = JSObject::kHeaderSize; 8656 static const int kBufferOffset = JSObject::kHeaderSize;
8655 static const int kByteOffsetOffset = kBufferOffset + kPointerSize; 8657 static const int kByteOffsetOffset = kBufferOffset + kPointerSize;
8656 static const int kByteLengthOffset = kByteOffsetOffset + kPointerSize; 8658 static const int kByteLengthOffset = kByteOffsetOffset + kPointerSize;
8657 static const int kLengthOffset = kByteLengthOffset + kPointerSize; 8659 static const int kLengthOffset = kByteLengthOffset + kPointerSize;
8658 static const int kSize = kLengthOffset + kPointerSize; 8660 static const int kSize = kLengthOffset + kPointerSize;
8659 8661
(...skipping 803 matching lines...) Expand 10 before | Expand all | Expand 10 after
9463 } else { 9465 } else {
9464 value &= ~(1 << bit_position); 9466 value &= ~(1 << bit_position);
9465 } 9467 }
9466 return value; 9468 return value;
9467 } 9469 }
9468 }; 9470 };
9469 9471
9470 } } // namespace v8::internal 9472 } } // namespace v8::internal
9471 9473
9472 #endif // V8_OBJECTS_H_ 9474 #endif // V8_OBJECTS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698