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

Side by Side Diff: runtime/vm/raw_object.h

Issue 8429027: Add an external array type to support typed arrays. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 9 years, 1 month 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 (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #ifndef VM_RAW_OBJECT_H_ 5 #ifndef VM_RAW_OBJECT_H_
6 #define VM_RAW_OBJECT_H_ 6 #define VM_RAW_OBJECT_H_
7 7
8 #include "vm/assert.h" 8 #include "vm/assert.h"
9 #include "vm/globals.h" 9 #include "vm/globals.h"
10 #include "vm/snapshot.h" 10 #include "vm/snapshot.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 V(Mint) \ 45 V(Mint) \
46 V(Bigint) \ 46 V(Bigint) \
47 V(Double) \ 47 V(Double) \
48 V(String) \ 48 V(String) \
49 V(OneByteString) \ 49 V(OneByteString) \
50 V(TwoByteString) \ 50 V(TwoByteString) \
51 V(FourByteString) \ 51 V(FourByteString) \
52 V(Bool) \ 52 V(Bool) \
53 V(Array) \ 53 V(Array) \
54 V(ImmutableArray) \ 54 V(ImmutableArray) \
55 V(ExternalArray) \
55 V(Closure) \ 56 V(Closure) \
56 V(Stacktrace) \ 57 V(Stacktrace) \
57 V(JSRegExp) \ 58 V(JSRegExp) \
58 59
59 #define CLASS_LIST(V) \ 60 #define CLASS_LIST(V) \
60 V(Object) \ 61 V(Object) \
61 CLASS_LIST_NO_OBJECT(V) 62 CLASS_LIST_NO_OBJECT(V)
62 63
63 64
64 // Forward declarations. 65 // Forward declarations.
(...skipping 647 matching lines...) Expand 10 before | Expand all | Expand 10 after
712 713
713 friend class RawImmutableArray; 714 friend class RawImmutableArray;
714 }; 715 };
715 716
716 717
717 class RawImmutableArray : public RawArray { 718 class RawImmutableArray : public RawArray {
718 RAW_HEAP_OBJECT_IMPLEMENTATION(ImmutableArray); 719 RAW_HEAP_OBJECT_IMPLEMENTATION(ImmutableArray);
719 }; 720 };
720 721
721 722
723 class RawExternalArray : public RawInstance {
724 RAW_HEAP_OBJECT_IMPLEMENTATION(ExternalArray);
725
726 RawSmi* length_;
siva 2011/11/02 17:05:31 Do we want this to be RawSmi or intptr_t i.e have
cshapiro 2011/11/04 18:16:21 I am partial to having the length parameter to be
727 uint8_t* data_;
728 };
729
730
722 class RawClosure : public RawInstance { 731 class RawClosure : public RawInstance {
723 RAW_HEAP_OBJECT_IMPLEMENTATION(Closure); 732 RAW_HEAP_OBJECT_IMPLEMENTATION(Closure);
724 733
725 RawObject** from() { 734 RawObject** from() {
726 return reinterpret_cast<RawObject**>(&ptr()->type_arguments_); 735 return reinterpret_cast<RawObject**>(&ptr()->type_arguments_);
727 } 736 }
728 RawTypeArguments* type_arguments_; 737 RawTypeArguments* type_arguments_;
729 RawFunction* function_; 738 RawFunction* function_;
730 RawContext* context_; 739 RawContext* context_;
731 // TODO(iposva): Remove this temporary hack. 740 // TODO(iposva): Remove this temporary hack.
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
770 intptr_t type_; // Uninitialized, simple or complex. 779 intptr_t type_; // Uninitialized, simple or complex.
771 intptr_t flags_; // Represents global/local, case insensitive, multiline. 780 intptr_t flags_; // Represents global/local, case insensitive, multiline.
772 781
773 // Variable length data follows here. 782 // Variable length data follows here.
774 uint8_t data_[0]; 783 uint8_t data_[0];
775 }; 784 };
776 785
777 } // namespace dart 786 } // namespace dart
778 787
779 #endif // VM_RAW_OBJECT_H_ 788 #endif // VM_RAW_OBJECT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698