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

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

Issue 23026004: Clean up VM class DartFunction. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 4 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
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/raw_object.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 "platform/assert.h" 8 #include "platform/assert.h"
9 #include "vm/globals.h" 9 #include "vm/globals.h"
10 #include "vm/token.h" 10 #include "vm/token.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 V(Bigint) \ 60 V(Bigint) \
61 V(Double) \ 61 V(Double) \
62 V(Bool) \ 62 V(Bool) \
63 V(GrowableObjectArray) \ 63 V(GrowableObjectArray) \
64 V(TypedData) \ 64 V(TypedData) \
65 V(ExternalTypedData) \ 65 V(ExternalTypedData) \
66 V(Stacktrace) \ 66 V(Stacktrace) \
67 V(JSRegExp) \ 67 V(JSRegExp) \
68 V(WeakProperty) \ 68 V(WeakProperty) \
69 V(MirrorReference) \ 69 V(MirrorReference) \
70 V(DartFunction) \
71 V(Float32x4) \ 70 V(Float32x4) \
72 V(Uint32x4) \ 71 V(Uint32x4) \
73 72
74 #define CLASS_LIST_ARRAYS(V) \ 73 #define CLASS_LIST_ARRAYS(V) \
75 V(Array) \ 74 V(Array) \
76 V(ImmutableArray) \ 75 V(ImmutableArray) \
77 76
78 #define CLASS_LIST_STRINGS(V) \ 77 #define CLASS_LIST_STRINGS(V) \
79 V(String) \ 78 V(String) \
80 V(OneByteString) \ 79 V(OneByteString) \
(...skipping 1376 matching lines...) Expand 10 before | Expand all | Expand 10 after
1457 RawObject** to() { return reinterpret_cast<RawObject**>(&ptr()->length_); } 1456 RawObject** to() { return reinterpret_cast<RawObject**>(&ptr()->length_); }
1458 1457
1459 uint8_t* data_; 1458 uint8_t* data_;
1460 void* peer_; 1459 void* peer_;
1461 1460
1462 friend class TokenStream; 1461 friend class TokenStream;
1463 friend class RawTokenStream; 1462 friend class RawTokenStream;
1464 }; 1463 };
1465 1464
1466 1465
1467 class RawDartFunction : public RawInstance {
1468 RAW_HEAP_OBJECT_IMPLEMENTATION(DartFunction);
1469 };
1470
1471
1472 // VM type for capturing stacktraces when exceptions are thrown, 1466 // VM type for capturing stacktraces when exceptions are thrown,
1473 // Currently we don't have any interface that this object is supposed 1467 // Currently we don't have any interface that this object is supposed
1474 // to implement so we just support the 'toString' method which 1468 // to implement so we just support the 'toString' method which
1475 // converts the stack trace into a string. 1469 // converts the stack trace into a string.
1476 class RawStacktrace : public RawInstance { 1470 class RawStacktrace : public RawInstance {
1477 RAW_HEAP_OBJECT_IMPLEMENTATION(Stacktrace); 1471 RAW_HEAP_OBJECT_IMPLEMENTATION(Stacktrace);
1478 1472
1479 RawObject** from() { 1473 RawObject** from() {
1480 return reinterpret_cast<RawObject**>(&ptr()->function_array_); 1474 return reinterpret_cast<RawObject**>(&ptr()->function_array_);
1481 } 1475 }
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
1716 // Make sure this is updated when new TypedData types are added. 1710 // Make sure this is updated when new TypedData types are added.
1717 ASSERT(kTypedDataInt8ArrayViewCid == kTypedDataInt8ArrayCid + 12); 1711 ASSERT(kTypedDataInt8ArrayViewCid == kTypedDataInt8ArrayCid + 12);
1718 ASSERT(kExternalTypedDataInt8ArrayCid == kTypedDataInt8ArrayViewCid + 13); 1712 ASSERT(kExternalTypedDataInt8ArrayCid == kTypedDataInt8ArrayViewCid + 13);
1719 ASSERT(kNullCid == kExternalTypedDataInt8ArrayCid + 12); 1713 ASSERT(kNullCid == kExternalTypedDataInt8ArrayCid + 12);
1720 return (kNullCid - kTypedDataInt8ArrayCid); 1714 return (kNullCid - kTypedDataInt8ArrayCid);
1721 } 1715 }
1722 1716
1723 } // namespace dart 1717 } // namespace dart
1724 1718
1725 #endif // VM_RAW_OBJECT_H_ 1719 #endif // VM_RAW_OBJECT_H_
OLDNEW
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/raw_object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698