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

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

Issue 75713002: Distinguish between malformed and malbounded types more efficiently using the (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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
« no previous file with comments | « runtime/vm/parser.cc ('k') | no next file » | 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 1145 matching lines...) Expand 10 before | Expand all | Expand 10 after
1156 1156
1157 class RawType : public RawAbstractType { 1157 class RawType : public RawAbstractType {
1158 private: 1158 private:
1159 RAW_HEAP_OBJECT_IMPLEMENTATION(Type); 1159 RAW_HEAP_OBJECT_IMPLEMENTATION(Type);
1160 1160
1161 RawObject** from() { 1161 RawObject** from() {
1162 return reinterpret_cast<RawObject**>(&ptr()->type_class_); 1162 return reinterpret_cast<RawObject**>(&ptr()->type_class_);
1163 } 1163 }
1164 RawObject* type_class_; // Either resolved class or unresolved class. 1164 RawObject* type_class_; // Either resolved class or unresolved class.
1165 RawAbstractTypeArguments* arguments_; 1165 RawAbstractTypeArguments* arguments_;
1166 RawError* malformed_error_; // Error object if type is malformed. 1166 RawLanguageError* error_; // Error object if type is malformed or malbounded.
1167 RawObject** to() { 1167 RawObject** to() {
1168 return reinterpret_cast<RawObject**>(&ptr()->malformed_error_); 1168 return reinterpret_cast<RawObject**>(&ptr()->error_);
1169 } 1169 }
1170 intptr_t token_pos_; 1170 intptr_t token_pos_;
1171 int8_t type_state_; 1171 int8_t type_state_;
1172 }; 1172 };
1173 1173
1174 1174
1175 class RawTypeParameter : public RawAbstractType { 1175 class RawTypeParameter : public RawAbstractType {
1176 private: 1176 private:
1177 RAW_HEAP_OBJECT_IMPLEMENTATION(TypeParameter); 1177 RAW_HEAP_OBJECT_IMPLEMENTATION(TypeParameter);
1178 1178
(...skipping 546 matching lines...) Expand 10 before | Expand all | Expand 10 after
1725 // Make sure this is updated when new TypedData types are added. 1725 // Make sure this is updated when new TypedData types are added.
1726 ASSERT(kTypedDataInt8ArrayViewCid == kTypedDataInt8ArrayCid + 13); 1726 ASSERT(kTypedDataInt8ArrayViewCid == kTypedDataInt8ArrayCid + 13);
1727 ASSERT(kExternalTypedDataInt8ArrayCid == kTypedDataInt8ArrayViewCid + 14); 1727 ASSERT(kExternalTypedDataInt8ArrayCid == kTypedDataInt8ArrayViewCid + 14);
1728 ASSERT(kNullCid == kExternalTypedDataInt8ArrayCid + 13); 1728 ASSERT(kNullCid == kExternalTypedDataInt8ArrayCid + 13);
1729 return (kNullCid - kTypedDataInt8ArrayCid); 1729 return (kNullCid - kTypedDataInt8ArrayCid);
1730 } 1730 }
1731 1731
1732 } // namespace dart 1732 } // namespace dart
1733 1733
1734 #endif // VM_RAW_OBJECT_H_ 1734 #endif // VM_RAW_OBJECT_H_
OLDNEW
« no previous file with comments | « runtime/vm/parser.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698