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

Side by Side Diff: runtime/vm/class_finalizer.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/ast.h ('k') | runtime/vm/class_finalizer.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_CLASS_FINALIZER_H_ 5 #ifndef VM_CLASS_FINALIZER_H_
6 #define VM_CLASS_FINALIZER_H_ 6 #define VM_CLASS_FINALIZER_H_
7 7
8 #include "vm/allocation.h" 8 #include "vm/allocation.h"
9 #include "vm/growable_array.h" 9 #include "vm/growable_array.h"
10 10
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 // Allocate, finalize, and return a new malformed type as if it was declared 50 // Allocate, finalize, and return a new malformed type as if it was declared
51 // in class cls at the given token position. 51 // in class cls at the given token position.
52 // If not null, prepend prev_error to the error message built from the format 52 // If not null, prepend prev_error to the error message built from the format
53 // string and its arguments. 53 // string and its arguments.
54 static RawType* NewFinalizedMalformedType(const Error& prev_error, 54 static RawType* NewFinalizedMalformedType(const Error& prev_error,
55 const Script& script, 55 const Script& script,
56 intptr_t type_pos, 56 intptr_t type_pos,
57 const char* format, ...) 57 const char* format, ...)
58 PRINTF_ATTRIBUTE(4, 5); 58 PRINTF_ATTRIBUTE(4, 5);
59 59
60 // Depending on the given type, finalization mode, and execution mode, mark 60 // Mark the given type as malformed.
61 // the given type as malformed or report a compile time error.
62 // If not null, prepend prev_error to the error message built from the format 61 // If not null, prepend prev_error to the error message built from the format
63 // string and its arguments. 62 // string and its arguments.
64 static void FinalizeMalformedType(const Error& prev_error, 63 static void FinalizeMalformedType(const Error& prev_error,
65 const Script& script, 64 const Script& script,
66 const Type& type, 65 const Type& type,
67 const char* format, ...) 66 const char* format, ...)
68 PRINTF_ATTRIBUTE(4, 5); 67 PRINTF_ATTRIBUTE(4, 5);
69 68
69 // Mark the given type as malbounded.
70 // If not null, prepend prev_error to the error message built from the format
71 // string and its arguments.
72 static void FinalizeMalboundedType(const Error& prev_error,
73 const Script& script,
74 const Type& type,
75 const char* format, ...)
76 PRINTF_ATTRIBUTE(4, 5);
77
70 // Return false if we still have classes pending to be finalized. 78 // Return false if we still have classes pending to be finalized.
71 static bool AllClassesFinalized(); 79 static bool AllClassesFinalized();
72 80
73 // Return whether class finalization failed. 81 // Return whether class finalization failed.
74 // The function returns true if the finalization was successful. 82 // The function returns true if the finalization was successful.
75 // If finalization fails, an error message is set in the sticky error field 83 // If finalization fails, an error message is set in the sticky error field
76 // in the object store. 84 // in the object store.
77 static bool FinalizePendingClasses(); 85 static bool FinalizePendingClasses();
78 86
79 // Finalize the types appearing in the declaration of class 'cls', i.e. its 87 // Finalize the types appearing in the declaration of class 'cls', i.e. its
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 const char* format, ...) PRINTF_ATTRIBUTE(4, 5); 165 const char* format, ...) PRINTF_ATTRIBUTE(4, 5);
158 166
159 // Verify implicit offsets recorded in the VM for direct access to fields of 167 // Verify implicit offsets recorded in the VM for direct access to fields of
160 // Dart instances (e.g: _TypedListView, _ByteDataView). 168 // Dart instances (e.g: _TypedListView, _ByteDataView).
161 static void VerifyImplicitFieldOffsets(); 169 static void VerifyImplicitFieldOffsets();
162 }; 170 };
163 171
164 } // namespace dart 172 } // namespace dart
165 173
166 #endif // VM_CLASS_FINALIZER_H_ 174 #endif // VM_CLASS_FINALIZER_H_
OLDNEW
« no previous file with comments | « runtime/vm/ast.h ('k') | runtime/vm/class_finalizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698