Flutter Engine
The Flutter Engine
symbols.h
Go to the documentation of this 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
3// BSD-style license that can be found in the LICENSE file.
4
5#ifndef RUNTIME_VM_SYMBOLS_H_
6#define RUNTIME_VM_SYMBOLS_H_
7
8#include "vm/growable_array.h"
9#include "vm/object.h"
10
11namespace dart {
12
13// Forward declarations.
14class IsolateGroup;
15class ObjectPointerVisitor;
16
17// One-character symbols are added implicitly.
18#define PREDEFINED_SYMBOLS_LIST(V) \
19 V(AbiSpecificInteger, "AbiSpecificInteger") \
20 V(AbstractClassInstantiationError, "AbstractClassInstantiationError") \
21 V(_AddStreamState, "_AddStreamState") \
22 V(AllocateInvocationMirror, "_allocateInvocationMirror") \
23 V(AllocateInvocationMirrorForClosure, "_allocateInvocationMirrorForClosure") \
24 V(AnonymousClosure, "<anonymous closure>") \
25 V(ApiError, "ApiError") \
26 V(ArgDescVar, ":arg_desc") \
27 V(ArgumentError, "ArgumentError") \
28 V(Array, "Array") \
29 V(StateError, "StateError") \
30 V(AssertionError, "_AssertionError") \
31 V(AssignIndexToken, "[]=") \
32 V(Bool, "bool") \
33 V(BooleanExpression, "boolean expression") \
34 V(BoundsCheckForPartialInstantiation, "_boundsCheckForPartialInstantiation") \
35 V(ByteData, "ByteData") \
36 V(Capability, "Capability") \
37 V(CheckLoaded, "_checkLoaded") \
38 V(Class, "Class") \
39 V(ClassID, "ClassID") \
40 V(ClosureData, "ClosureData") \
41 V(ClosureParameter, ":closure") \
42 V(Code, "Code") \
43 V(CodeSourceMap, "CodeSourceMap") \
44 V(ColonMatcher, ":matcher") \
45 V(_Completer, "_Completer") \
46 V(_AsyncCompleter, "_AsyncCompleter") \
47 V(_SyncCompleter, "_SyncCompleter") \
48 V(Compound, "_Compound") \
49 V(CompressedStackMaps, "CompressedStackMaps") \
50 V(Context, "Context") \
51 V(ContextScope, "ContextScope") \
52 V(Current, "current") \
53 V(CurrentContextVar, ":current_context_var") \
54 V(DartAsync, "dart:async") \
55 V(DartCollection, "dart:collection") \
56 V(DartCore, "dart:core") \
57 V(DartDeveloper, "dart:developer") \
58 V(DartDeveloperTimeline, "dart.developer.timeline") \
59 V(DartFfi, "dart:ffi") \
60 V(DartInternal, "dart:_internal") \
61 V(DartIsVM, "dart.isVM") \
62 V(DartIsolate, "dart:isolate") \
63 V(DartLibrary, "dart.library.") \
64 V(DartLibraryFfi, "dart.library.ffi") \
65 V(DartLibraryMirrors, "dart.library.mirrors") \
66 V(DartMirrors, "dart:mirrors") \
67 V(DartNativeWrappers, "dart:nativewrappers") \
68 V(DartNativeWrappersLibName, "nativewrappers") \
69 V(DartScheme, "dart:") \
70 V(DartSchemePrivate, "dart:_") \
71 V(DartTypedData, "dart:typed_data") \
72 V(DartVMProduct, "dart.vm.product") \
73 V(DartVMService, "dart:_vmservice") \
74 V(DebugProcedureName, ":Eval") \
75 V(Default, "Default") \
76 V(DefaultLabel, ":L") \
77 V(DotCreate, "._create") \
78 V(DotFieldADI, ".fieldADI") \
79 V(DotFieldNI, ".fieldNI") \
80 V(DotRange, ".range") \
81 V(DotUnder, "._") \
82 V(DotValue, ".value") \
83 V(DotWithType, "._withType") \
84 V(Double, "double") \
85 V(Dynamic, "dynamic") \
86 V(DynamicCall, "dyn:call") \
87 V(DynamicCallCurrentFunctionVar, ":dyn_call_current_function") \
88 V(DynamicCallCurrentNumProcessedVar, ":dyn_call_current_num_processed") \
89 V(DynamicCallCurrentParamIndexVar, ":dyn_call_current_param_index") \
90 V(DynamicCallCurrentTypeParamVar, ":dyn_call_current_type_param") \
91 V(DynamicCallFunctionTypeArgsVar, ":dyn_call_function_type_args") \
92 V(DynamicPrefix, "dyn:") \
93 V(EntryPointsTemp, ":entry_points_temp") \
94 V(EqualOperator, "==") \
95 V(Error, "Error") \
96 V(EvalSourceUri, "evaluate:source") \
97 V(EvaluateAssertion, "_evaluateAssertion") \
98 V(ExceptionHandlers, "ExceptionHandlers") \
99 V(ExceptionVar, ":exception_var") \
100 V(Expando, "Expando") \
101 V(ExprTemp, ":expr_temp") \
102 V(FfiAbiSpecificMapping, "_FfiAbiSpecificMapping") \
103 V(FfiAsyncCallback, "_FfiAsyncCallback") \
104 V(FfiBool, "Bool") \
105 V(FfiCallback, "_FfiCallback") \
106 V(FfiDouble, "Double") \
107 V(FfiDynamicLibrary, "DynamicLibrary") \
108 V(FfiElementType, "elementType") \
109 V(FfiFieldPacking, "packing") \
110 V(FfiFieldTypes, "fieldTypes") \
111 V(FfiFloat, "Float") \
112 V(FfiHandle, "Handle") \
113 V(FfiInt16, "Int16") \
114 V(FfiInt32, "Int32") \
115 V(FfiInt64, "Int64") \
116 V(FfiInt8, "Int8") \
117 V(FfiIntPtr, "IntPtr") \
118 V(FfiIsolateLocalCallback, "_FfiIsolateLocalCallback") \
119 V(FfiNative, "Native") \
120 V(FfiNativeFunction, "NativeFunction") \
121 V(FfiNativeType, "NativeType") \
122 V(FfiNativeTypes, "nativeTypes") \
123 V(FfiPointer, "Pointer") \
124 V(FfiFromAddress, "_fromAddress") \
125 V(FfiStructLayout, "_FfiStructLayout") \
126 V(FfiStructLayoutArray, "_FfiInlineArray") \
127 V(FfiTrampolineData, "FfiTrampolineData") \
128 V(FfiUint16, "Uint16") \
129 V(FfiUint32, "Uint32") \
130 V(FfiUint64, "Uint64") \
131 V(FfiUint8, "Uint8") \
132 V(FfiVoid, "Void") \
133 V(Field, "Field") \
134 V(Finalizable, "Finalizable") \
135 V(FinalizerBase, "FinalizerBase") \
136 V(FinalizerEntry, "FinalizerEntry") \
137 V(FinallyRetVal, ":finally_ret_val") \
138 V(FirstArg, "x") \
139 V(Float32List, "Float32List") \
140 V(Float32x4, "Float32x4") \
141 V(Float32x4List, "Float32x4List") \
142 V(Float64List, "Float64List") \
143 V(Float64x2, "Float64x2") \
144 V(Float64x2List, "Float64x2List") \
145 V(FormatException, "FormatException") \
146 V(ForwardingCorpse, "ForwardingCorpse") \
147 V(FreeListElement, "FreeListElement") \
148 V(Function, "Function") \
149 V(FunctionResult, "function result") \
150 V(FunctionTypeArgumentsVar, ":function_type_arguments_var") \
151 V(Future, "Future") \
152 V(_Future, "_Future") \
153 V(FutureOr, "FutureOr") \
154 V(FutureValue, "Future.value") \
155 V(GetCall, "get:call") \
156 V(GetLength, "get:length") \
157 V(GetRuntimeType, "get:runtimeType") \
158 V(GetterPrefix, "get:") \
159 V(Get_fieldNames, "get:_fieldNames") \
160 V(GreaterEqualOperator, ">=") \
161 V(HaveSameRuntimeType, "_haveSameRuntimeType") \
162 V(ICData, "ICData") \
163 V(Identical, "identical") \
164 V(InTypeCast, " in type cast") \
165 V(Index, "index") \
166 V(IndexToken, "[]") \
167 V(InitPrefix, "init:") \
168 V(Instructions, "Instructions") \
169 V(InstructionsSection, "InstructionsSection") \
170 V(InstructionsTable, "InstructionsTable") \
171 V(Int, "int") \
172 V(Int16List, "Int16List") \
173 V(Int32List, "Int32List") \
174 V(Int32x4, "Int32x4") \
175 V(Int32x4List, "Int32x4List") \
176 V(Int64List, "Int64List") \
177 V(Int8List, "Int8List") \
178 V(IntegerDivisionByZeroException, "IntegerDivisionByZeroException") \
179 V(Interpolate, "_interpolate") \
180 V(InterpolateSingle, "_interpolateSingle") \
181 V(InvocationMirror, "_InvocationMirror") \
182 V(IsolateSpawnException, "IsolateSpawnException") \
183 V(Iterable, "Iterable") \
184 V(Iterator, "iterator") \
185 V(KernelProgramInfo, "KernelProgramInfo") \
186 V(LanguageError, "LanguageError") \
187 V(LateError, "LateError") \
188 V(LeftShiftOperator, "<<") \
189 V(Length, "length") \
190 V(LessEqualOperator, "<=") \
191 V(LibraryClass, "Library") \
192 V(LibraryPrefix, "LibraryPrefix") \
193 V(List, "List") \
194 V(ListFactory, "List.") \
195 V(ListFilledFactory, "List.filled") \
196 V(LoadLibrary, "_loadLibrary") \
197 V(LoadingUnit, "LoadingUnit") \
198 V(LocalVarDescriptors, "LocalVarDescriptors") \
199 V(Map, "Map") \
200 V(MapLiteralFactory, "Map._fromLiteral") \
201 V(MegamorphicCache, "MegamorphicCache") \
202 V(MonomorphicSmiableCall, "MonomorphicSmiableCall") \
203 V(MoveNext, "moveNext") \
204 V(Namespace, "Namespace") \
205 V(Never, "Never") \
206 V(NoSuchMethod, "noSuchMethod") \
207 V(NoSuchMethodError, "NoSuchMethodError") \
208 V(Null, "Null") \
209 V(Number, "num") \
210 V(Object, "Object") \
211 V(ObjectPool, "ObjectPool") \
212 V(OneByteString, "_OneByteString") \
213 V(OptimizedOut, "<optimized out>") \
214 V(OriginalParam, ":original:") \
215 V(OutOfMemoryError, "OutOfMemoryError") \
216 V(PackageScheme, "package:") \
217 V(Patch, "patch") \
218 V(PatchClass, "PatchClass") \
219 V(PcDescriptors, "PcDescriptors") \
220 V(Pragma, "pragma") \
221 V(PrependTypeArguments, "_prependTypeArguments") \
222 V(QuoteIsNotASubtypeOf, "' is not a subtype of ") \
223 V(RangeError, "RangeError") \
224 V(Record, "Record") \
225 V(RegExp, "RegExp") \
226 V(RightShiftOperator, ">>") \
227 V(SavedTryContextVar, ":saved_try_context_var") \
228 V(Script, "Script") \
229 V(SecondArg, "y") \
230 V(SendPort, "SendPort") \
231 V(Sentinel, "Sentinel") \
232 V(Set, "Set") \
233 V(SetterPrefix, "set:") \
234 V(SingleTargetCache, "SingleTargetCache") \
235 V(SpaceIsFromSpace, " is from ") \
236 V(SpaceOfSpace, " of ") \
237 V(SpaceWhereNewLine, " where\n") \
238 V(StackOverflowError, "StackOverflowError") \
239 V(Stream, "Stream") \
240 V(StringBase, "_StringBase") \
241 V(Struct, "Struct") \
242 V(SubtypeTestCache, "SubtypeTestCache") \
243 V(SuspendStateVar, ":suspend_state_var") \
244 V(SwitchExpr, ":switch_expr") \
245 V(Symbol, "Symbol") \
246 V(ThrowNew, "_throwNew") \
247 V(ThrowNewSource, "_throwNewSource") \
248 V(ThrowNewInvocation, "_throwNewInvocation") \
249 V(TopLevel, "::") \
250 V(TransferableTypedData, "TransferableTypedData") \
251 V(TruncDivOperator, "~/") \
252 V(TryFinallyReturnValue, ":try_finally_return_value") \
253 V(TwoByteString, "_TwoByteString") \
254 V(TwoSpaces, " ") \
255 V(Type, "Type") \
256 V(TypeArguments, "TypeArguments") \
257 V(TypeArgumentsParameter, ":type_arguments") \
258 V(TypedData, "TypedData") \
259 V(TypeError, "_TypeError") \
260 V(TypeParameters, "TypeParameters") \
261 V(TypeQuote, "type '") \
262 V(Uint16List, "Uint16List") \
263 V(Uint32List, "Uint32List") \
264 V(Uint64List, "Uint64List") \
265 V(Uint8ClampedList, "Uint8ClampedList") \
266 V(Uint8List, "Uint8List") \
267 V(UnaryMinus, "unary-") \
268 V(UnhandledException, "UnhandledException") \
269 V(Union, "Union") \
270 V(UnlinkedCall, "UnlinkedCall") \
271 V(UnsafeCast, "unsafeCast") \
272 V(UnsignedRightShiftOperator, ">>>") \
273 V(UnsupportedError, "UnsupportedError") \
274 V(UnwindError, "UnwindError") \
275 V(Value, "value") \
276 V(Values, "values") \
277 V(VarArgs, "VarArgs") \
278 V(WeakArray, "WeakArray") \
279 V(WeakSerializationReference, "WeakSerializationReference") \
280 V(_AsyncStarStreamController, "_AsyncStarStreamController") \
281 V(_BufferingStreamSubscription, "_BufferingStreamSubscription") \
282 V(_ByteBuffer, "_ByteBuffer") \
283 V(_ByteBufferDot_New, "_ByteBuffer._New") \
284 V(_ByteDataView, "_ByteDataView") \
285 V(_Capability, "_Capability") \
286 V(_ClassMirror, "_ClassMirror") \
287 V(_Closure, "_Closure") \
288 V(_ClosureCall, "_Closure.call") \
289 V(_CombinatorMirror, "_CombinatorMirror") \
290 V(_CompileTimeError, "_CompileTimeError") \
291 V(_ConstMap, "_ConstMap") \
292 V(_ConstSet, "_ConstSet") \
293 V(_ControllerSubscription, "_ControllerSubscription") \
294 V(_CyclicInitializationError, "_CyclicInitializationError") \
295 V(_DeletedEnumPrefix, "Deleted enum value from ") \
296 V(_DeletedEnumSentinel, "_deleted_enum_sentinel") \
297 V(_Double, "_Double") \
298 V(_Enum, "_Enum") \
299 V(_ExternalFloat32Array, "_ExternalFloat32Array") \
300 V(_ExternalFloat32x4Array, "_ExternalFloat32x4Array") \
301 V(_ExternalFloat64Array, "_ExternalFloat64Array") \
302 V(_ExternalFloat64x2Array, "_ExternalFloat64x2Array") \
303 V(_ExternalInt16Array, "_ExternalInt16Array") \
304 V(_ExternalInt32Array, "_ExternalInt32Array") \
305 V(_ExternalInt32x4Array, "_ExternalInt32x4Array") \
306 V(_ExternalInt64Array, "_ExternalInt64Array") \
307 V(_ExternalInt8Array, "_ExternalInt8Array") \
308 V(_ExternalUint16Array, "_ExternalUint16Array") \
309 V(_ExternalUint32Array, "_ExternalUint32Array") \
310 V(_ExternalUint64Array, "_ExternalUint64Array") \
311 V(_ExternalUint8Array, "_ExternalUint8Array") \
312 V(_ExternalUint8ClampedArray, "_ExternalUint8ClampedArray") \
313 V(_FinalizerImpl, "_FinalizerImpl") \
314 V(_Float32ArrayFactory, "Float32List.") \
315 V(_Float32ArrayView, "_Float32ArrayView") \
316 V(_Float32List, "_Float32List") \
317 V(_Float32x4, "_Float32x4") \
318 V(_Float32x4ArrayFactory, "Float32x4List.") \
319 V(_Float32x4ArrayView, "_Float32x4ArrayView") \
320 V(_Float32x4List, "_Float32x4List") \
321 V(_Float64ArrayFactory, "Float64List.") \
322 V(_Float64ArrayView, "_Float64ArrayView") \
323 V(_Float64List, "_Float64List") \
324 V(_Float64x2, "_Float64x2") \
325 V(_Float64x2ArrayFactory, "Float64x2List.") \
326 V(_Float64x2ArrayView, "_Float64x2ArrayView") \
327 V(_Float64x2List, "_Float64x2List") \
328 V(_FunctionType, "_FunctionType") \
329 V(_FunctionTypeMirror, "_FunctionTypeMirror") \
330 V(_FutureListener, "_FutureListener") \
331 V(_GrowableList, "_GrowableList") \
332 V(_GrowableListFactory, "_GrowableList.") \
333 V(_GrowableListFilledFactory, "_GrowableList.filled") \
334 V(_GrowableListGenerateFactory, "_GrowableList.generate") \
335 V(_GrowableListLiteralFactory, "_GrowableList._literal") \
336 V(_GrowableListWithData, "_GrowableList._withData") \
337 V(_ImmutableList, "_ImmutableList") \
338 V(_Int16ArrayFactory, "Int16List.") \
339 V(_Int16ArrayView, "_Int16ArrayView") \
340 V(_Int16List, "_Int16List") \
341 V(_Int32ArrayFactory, "Int32List.") \
342 V(_Int32ArrayView, "_Int32ArrayView") \
343 V(_Int32List, "_Int32List") \
344 V(_Int32x4, "_Int32x4") \
345 V(_Int32x4ArrayFactory, "Int32x4List.") \
346 V(_Int32x4ArrayView, "_Int32x4ArrayView") \
347 V(_Int32x4List, "_Int32x4List") \
348 V(_Int64ArrayFactory, "Int64List.") \
349 V(_Int64ArrayView, "_Int64ArrayView") \
350 V(_Int64List, "_Int64List") \
351 V(_Int8ArrayFactory, "Int8List.") \
352 V(_Int8ArrayView, "_Int8ArrayView") \
353 V(_Int8List, "_Int8List") \
354 V(_IntegerImplementation, "_IntegerImplementation") \
355 V(_IsolateMirror, "_IsolateMirror") \
356 V(_LibraryDependencyMirror, "_LibraryDependencyMirror") \
357 V(_LibraryMirror, "_LibraryMirror") \
358 V(_LibraryPrefix, "_LibraryPrefix") \
359 V(_List, "_List") \
360 V(_ListFactory, "_List.") \
361 V(_ListFilledFactory, "_List.filled") \
362 V(_ListGenerateFactory, "_List.generate") \
363 V(_Map, "_Map") \
364 V(_MethodMirror, "_MethodMirror") \
365 V(_Mint, "_Mint") \
366 V(_MirrorReference, "_MirrorReference") \
367 V(_NativeFinalizer, "_NativeFinalizer") \
368 V(_ParameterMirror, "_ParameterMirror") \
369 V(_Random, "_Random") \
370 V(_RawReceivePort, "_RawReceivePort") \
371 V(_Record, "_Record") \
372 V(_RecordType, "_RecordType") \
373 V(_RegExp, "_RegExp") \
374 V(_SendPort, "_SendPort") \
375 V(_Set, "_Set") \
376 V(_Smi, "_Smi") \
377 V(_SourceLocation, "_SourceLocation") \
378 V(_SpecialTypeMirror, "_SpecialTypeMirror") \
379 V(_StackTrace, "_StackTrace") \
380 V(_StreamController, "_StreamController") \
381 V(_StreamControllerAddStreamState, "_StreamControllerAddStreamState") \
382 V(_StreamIterator, "_StreamIterator") \
383 V(_String, "String") \
384 V(_SuspendState, "_SuspendState") \
385 V(_SyncStarIterator, "_SyncStarIterator") \
386 V(_SyncStreamController, "_SyncStreamController") \
387 V(_TransferableTypedDataImpl, "_TransferableTypedDataImpl") \
388 V(_Type, "_Type") \
389 V(_TypeParameter, "_TypeParameter") \
390 V(_TypeVariableMirror, "_TypeVariableMirror") \
391 V(_TypedList, "_TypedList") \
392 V(_TypedListBase, "_TypedListBase") \
393 V(_Uint16ArrayFactory, "Uint16List.") \
394 V(_Uint16ArrayView, "_Uint16ArrayView") \
395 V(_Uint16List, "_Uint16List") \
396 V(_Uint32ArrayFactory, "Uint32List.") \
397 V(_Uint32ArrayView, "_Uint32ArrayView") \
398 V(_Uint32List, "_Uint32List") \
399 V(_Uint64ArrayFactory, "Uint64List.") \
400 V(_Uint64ArrayView, "_Uint64ArrayView") \
401 V(_Uint64List, "_Uint64List") \
402 V(_Uint8ArrayFactory, "Uint8List.") \
403 V(_Uint8ArrayView, "_Uint8ArrayView") \
404 V(_Uint8ClampedArrayFactory, "Uint8ClampedList.") \
405 V(_Uint8ClampedArrayView, "_Uint8ClampedArrayView") \
406 V(_Uint8ClampedList, "_Uint8ClampedList") \
407 V(_Uint8List, "_Uint8List") \
408 V(_UnmodifiableByteDataView, "_UnmodifiableByteDataView") \
409 V(_UnmodifiableFloat32ArrayView, "_UnmodifiableFloat32ArrayView") \
410 V(_UnmodifiableFloat32x4ArrayView, "_UnmodifiableFloat32x4ArrayView") \
411 V(_UnmodifiableFloat64ArrayView, "_UnmodifiableFloat64ArrayView") \
412 V(_UnmodifiableFloat64x2ArrayView, "_UnmodifiableFloat64x2ArrayView") \
413 V(_UnmodifiableInt16ArrayView, "_UnmodifiableInt16ArrayView") \
414 V(_UnmodifiableInt32ArrayView, "_UnmodifiableInt32ArrayView") \
415 V(_UnmodifiableInt32x4ArrayView, "_UnmodifiableInt32x4ArrayView") \
416 V(_UnmodifiableInt64ArrayView, "_UnmodifiableInt64ArrayView") \
417 V(_UnmodifiableInt8ArrayView, "_UnmodifiableInt8ArrayView") \
418 V(_UnmodifiableUint16ArrayView, "_UnmodifiableUint16ArrayView") \
419 V(_UnmodifiableUint32ArrayView, "_UnmodifiableUint32ArrayView") \
420 V(_UnmodifiableUint64ArrayView, "_UnmodifiableUint64ArrayView") \
421 V(_UnmodifiableUint8ArrayView, "_UnmodifiableUint8ArrayView") \
422 V(_UnmodifiableUint8ClampedArrayView, "_UnmodifiableUint8ClampedArrayView") \
423 V(_UserTag, "_UserTag") \
424 V(_Utf8Decoder, "_Utf8Decoder") \
425 V(_VariableMirror, "_VariableMirror") \
426 V(_WeakProperty, "_WeakProperty") \
427 V(_WeakReference, "_WeakReference") \
428 V(_await, "_await") \
429 V(_awaitWithTypeCheck, "_awaitWithTypeCheck") \
430 V(_backtrackingStack, "_backtrackingStack") \
431 V(_checkSetRangeArguments, "_checkSetRangeArguments") \
432 V(_current, "_current") \
433 V(_ensureScheduleImmediate, "_ensureScheduleImmediate") \
434 V(_ffi_resolver_function, "_ffi_resolver_function") \
435 V(future, "future") \
436 V(_future, "_future") \
437 V(_getRegisters, "_getRegisters") \
438 V(_growBacktrackingStack, "_growBacktrackingStack") \
439 V(_handleException, "_handleException") \
440 V(_handleFinalizerMessage, "_handleFinalizerMessage") \
441 V(_handleMessage, "_handleMessage") \
442 V(_handleNativeFinalizerMessage, "_handleNativeFinalizerMessage") \
443 V(_hasValue, "_hasValue") \
444 V(_initAsync, "_initAsync") \
445 V(_initAsyncStar, "_initAsyncStar") \
446 V(_initSyncStar, "_initSyncStar") \
447 V(_instanceOf, "_instanceOf") \
448 V(_listGetAt, "_listGetAt") \
449 V(_listLength, "_listLength") \
450 V(_listSetAt, "_listSetAt") \
451 V(_lookupHandler, "_lookupHandler") \
452 V(_lookupOpenPorts, "_lookupOpenPorts") \
453 V(_mapContainsKey, "_mapContainsKey") \
454 V(_mapGet, "_mapGet") \
455 V(_mapKeys, "_mapKeys") \
456 V(_name, "_name") \
457 V(_nextListener, "_nextListener") \
458 V(_nativeGetFloat32, "_nativeGetFloat32") \
459 V(_nativeSetFloat32, "_nativeSetFloat32") \
460 V(_nativeGetFloat64, "_nativeGetFloat64") \
461 V(_nativeSetFloat64, "_nativeSetFloat64") \
462 V(_nativeGetFloat32x4, "_nativeGetFloat32x4") \
463 V(_nativeSetFloat32x4, "_nativeSetFloat32x4") \
464 V(_nativeGetInt32x4, "_nativeGetInt32x4") \
465 V(_nativeSetInt32x4, "_nativeSetInt32x4") \
466 V(_nativeGetFloat64x2, "_nativeGetFloat64x2") \
467 V(_nativeSetFloat64x2, "_nativeSetFloat64x2") \
468 V(_nativeSetRange, "_nativeSetRange") \
469 V(_objectEquals, "_objectEquals") \
470 V(_objectHashCode, "_objectHashCode") \
471 V(_objectNoSuchMethod, "_objectNoSuchMethod") \
472 V(_objectToString, "_objectToString") \
473 V(_offsetInBytes, "_offsetInBytes") \
474 V(_onData, "_onData") \
475 V(_onDone, "_onDone") \
476 V(_onError, "_onError") \
477 V(_rehashObjects, "_rehashObjects") \
478 V(_resultOrListeners, "_resultOrListeners") \
479 V(_returnAsync, "_returnAsync") \
480 V(_returnAsyncNotFuture, "_returnAsyncNotFuture") \
481 V(_returnAsyncStar, "_returnAsyncStar") \
482 V(_runExtension, "_runExtension") \
483 V(_runPendingImmediateCallback, "_runPendingImmediateCallback") \
484 V(_scanFlags, "_scanFlags") \
485 V(_simpleInstanceOf, "_simpleInstanceOf") \
486 V(_simpleInstanceOfFalse, "_simpleInstanceOfFalse") \
487 V(_simpleInstanceOfTrue, "_simpleInstanceOfTrue") \
488 V(_stackTrace, "_stackTrace") \
489 V(_state, "_state") \
490 V(_stateData, "_stateData") \
491 V(_suspendSyncStarAtStart, "_suspendSyncStarAtStart") \
492 V(_toString, "_toString") \
493 V(_typedDataBase, "_typedDataBase") \
494 V(_varData, "_varData") \
495 V(_wordCharacterMap, "_wordCharacterMap") \
496 V(_yieldAsyncStar, "_yieldAsyncStar") \
497 V(_yieldStarIterable, "_yieldStarIterable") \
498 V(_yieldSyncStar, "_yieldSyncStar") \
499 V(absolute, "absolute") \
500 V(add, "add") \
501 V(addStream, "addStream") \
502 V(addStreamFuture, "addStreamFuture") \
503 V(asyncStarBody, "asyncStarBody") \
504 V(byteOffset, "byteOffset") \
505 V(c_result, ":result") \
506 V(call, "call") \
507 V(callback, "callback") \
508 V(capture_length, ":capture_length") \
509 V(capture_start_index, ":capture_start_index") \
510 V(char_in_capture, ":char_in_capture") \
511 V(char_in_match, ":char_in_match") \
512 V(controller, "controller") \
513 V(current_character, ":current_character") \
514 V(current_position, ":current_position") \
515 V(dynamic_assert_assignable_stc_check, \
516 ":dynamic_assert_assignable_stc_check") \
517 V(dyn_module_callable, "dyn-module:callable") \
518 V(dyn_module_extendable, "dyn-module:extendable") \
519 V(end, "end") \
520 V(executable, "executable") \
521 V(from, "from") \
522 V(get, "get") \
523 V(index_temp, ":index_temp") \
524 V(isLeaf, "isLeaf") \
525 V(isPaused, "isPaused") \
526 V(match_end_index, ":match_end_index") \
527 V(match_start_index, ":match_start_index") \
528 V(name, "name") \
529 V(native_assets, "native-assets") \
530 V(null, "null") \
531 V(options, "options") \
532 V(position_registers, ":position_registers") \
533 V(print, "print") \
534 V(process, "process") \
535 V(relative, "relative") \
536 V(result, "result") \
537 V(set, "set") \
538 V(skip_count, "skipCount") \
539 V(stack, ":stack") \
540 V(stack_pointer, ":stack_pointer") \
541 V(start, "start") \
542 V(start_index_param, ":start_index_param") \
543 V(state, "state") \
544 V(string_param, ":string_param") \
545 V(string_param_length, ":string_param_length") \
546 V(system, "system") \
547 V(vm_always_consider_inlining, "vm:always-consider-inlining") \
548 V(vm_awaiter_link, "vm:awaiter-link") \
549 V(vm_entry_point, "vm:entry-point") \
550 V(vm_exact_result_type, "vm:exact-result-type") \
551 V(vm_external_name, "vm:external-name") \
552 V(vm_ffi_abi_specific_mapping, "vm:ffi:abi-specific-mapping") \
553 V(vm_ffi_call_closure, "vm:ffi:call-closure") \
554 V(vm_ffi_native, "vm:ffi:native") \
555 V(vm_ffi_native_assets, "vm:ffi:native-assets") \
556 V(vm_ffi_struct_fields, "vm:ffi:struct-fields") \
557 V(vm_force_optimize, "vm:force-optimize") \
558 V(vm_idempotent, "vm:idempotent") \
559 V(vm_invisible, "vm:invisible") \
560 V(vm_isolate_unsendable, "vm:isolate-unsendable") \
561 V(vm_cachable_idempotent, "vm:cachable-idempotent") \
562 V(vm_never_inline, "vm:never-inline") \
563 V(vm_notify_debugger_on_exception, "vm:notify-debugger-on-exception") \
564 V(vm_prefer_inline, "vm:prefer-inline") \
565 V(vm_recognized, "vm:recognized") \
566 V(vm_testing_print_flow_graph, "vm:testing:print-flow-graph") \
567 V(vm_trace_entrypoints, "vm:testing.unsafe.trace-entrypoints-fn") \
568 V(vm_unsafe_no_interrupts, "vm:unsafe:no-interrupts") \
569 V(vm_align_loops, "vm:align-loops") \
570 V(vm_unsafe_no_bounds_checks, "vm:unsafe:no-bounds-checks")
571
572// Contains a list of frequently used strings in a canonicalized form. This
573// list is kept in the vm_isolate in order to share the copy across isolates
574// without having to maintain copies in each isolate.
575class Symbols : public AllStatic {
576 public:
577 enum { kMaxOneCharCodeSymbol = 0xFF };
578
579 // List of strings that are pre created in the vm isolate.
580 enum SymbolId {
581 // clang-format off
583
584#define DEFINE_SYMBOL_INDEX(symbol, literal) k##symbol##Id,
586#undef DEFINE_SYMBOL_INDEX
587
588 kTokenTableStart, // First token at kTokenTableStart + 1.
589
590#define DEFINE_TOKEN_SYMBOL_INDEX(t, s, p, a) t##Id,
593#undef DEFINE_TOKEN_SYMBOL_INDEX
594
595 kNullCharId, // One char code symbol starts here and takes up 256 entries.
597 // clang-format on
598 };
599
600 // Number of one character symbols being predefined in the predefined_ array.
601 static constexpr int kNumberOfOneCharCodeSymbols =
602 (kMaxPredefinedId - kNullCharId);
603
604 // Offset of Null character which is the predefined character symbol.
605 static constexpr int kNullCharCodeSymbolOffset = 0;
606
607 static const String& Symbol(intptr_t index) {
608 ASSERT((index > kIllegal) && (index < kMaxPredefinedId));
609 return *(symbol_handles_[index]);
610 }
611
612 // Access methods for one byte character symbols stored in the vm isolate.
613 static const String& Dot() { return *(symbol_handles_[kNullCharId + '.']); }
614 static const String& Equals() {
615 return *(symbol_handles_[kNullCharId + '=']);
616 }
617 static const String& Plus() { return *(symbol_handles_[kNullCharId + '+']); }
618 static const String& Minus() { return *(symbol_handles_[kNullCharId + '-']); }
619 static const String& BitOr() { return *(symbol_handles_[kNullCharId + '|']); }
620 static const String& BitAnd() {
621 return *(symbol_handles_[kNullCharId + '&']);
622 }
623 static const String& LAngleBracket() {
624 return *(symbol_handles_[kNullCharId + '<']);
625 }
626 static const String& RAngleBracket() {
627 return *(symbol_handles_[kNullCharId + '>']);
628 }
629 static const String& LParen() {
630 return *(symbol_handles_[kNullCharId + '(']);
631 }
632 static const String& RParen() {
633 return *(symbol_handles_[kNullCharId + ')']);
634 }
635 static const String& LBracket() {
636 return *(symbol_handles_[kNullCharId + '[']);
637 }
638 static const String& RBracket() {
639 return *(symbol_handles_[kNullCharId + ']']);
640 }
641 static const String& LBrace() {
642 return *(symbol_handles_[kNullCharId + '{']);
643 }
644 static const String& RBrace() {
645 return *(symbol_handles_[kNullCharId + '}']);
646 }
647 static const String& Blank() { return *(symbol_handles_[kNullCharId + ' ']); }
648 static const String& Dollar() {
649 return *(symbol_handles_[kNullCharId + '$']);
650 }
651 static const String& NewLine() {
652 return *(symbol_handles_[kNullCharId + '\n']);
653 }
654 static const String& DoubleQuote() {
655 return *(symbol_handles_[kNullCharId + '"']);
656 }
657 static const String& SingleQuote() {
658 return *(symbol_handles_[kNullCharId + '\'']);
659 }
660 static const String& LowercaseR() {
661 return *(symbol_handles_[kNullCharId + 'r']);
662 }
663 static const String& Dash() { return *(symbol_handles_[kNullCharId + '-']); }
664 static const String& Ampersand() {
665 return *(symbol_handles_[kNullCharId + '&']);
666 }
667 static const String& Backtick() {
668 return *(symbol_handles_[kNullCharId + '`']);
669 }
670 static const String& Slash() { return *(symbol_handles_[kNullCharId + '/']); }
671 static const String& At() { return *(symbol_handles_[kNullCharId + '@']); }
672 static const String& HashMark() {
673 return *(symbol_handles_[kNullCharId + '#']);
674 }
675 static const String& Semicolon() {
676 return *(symbol_handles_[kNullCharId + ';']);
677 }
678 static const String& Star() { return *(symbol_handles_[kNullCharId + '*']); }
679 static const String& Percent() {
680 return *(symbol_handles_[kNullCharId + '%']);
681 }
682 static const String& QuestionMark() {
683 return *(symbol_handles_[kNullCharId + '?']);
684 }
685 static const String& Caret() { return *(symbol_handles_[kNullCharId + '^']); }
686 static const String& Tilde() { return *(symbol_handles_[kNullCharId + '~']); }
687
688 static const String& Empty() { return *(symbol_handles_[kTokenTableStart]); }
689 static const String& False() { return *(symbol_handles_[kFALSEId]); }
690 static const String& Library() { return *(symbol_handles_[kLIBRARYId]); }
691 static const String& Super() { return *(symbol_handles_[kSUPERId]); }
692 static const String& This() { return *(symbol_handles_[kTHISId]); }
693 static const String& True() { return *(symbol_handles_[kTRUEId]); }
694 static const String& Void() { return *(symbol_handles_[kVOIDId]); }
695
696// Access methods for symbol handles stored in the vm isolate for predefined
697// symbols.
698#define DEFINE_SYMBOL_HANDLE_ACCESSOR(symbol, literal) \
699 static const String& symbol() { return *(symbol_handles_[k##symbol##Id]); }
701#undef DEFINE_SYMBOL_HANDLE_ACCESSOR
702
703// Access methods for symbol handles stored in the vm isolate for keywords.
704#define DEFINE_SYMBOL_HANDLE_ACCESSOR(t, s, p, a) \
705 static const String& t() { return *(symbol_handles_[t##Id]); }
708#undef DEFINE_SYMBOL_HANDLE_ACCESSOR
709
710 // Get symbol for scanner token.
711 static const String& Token(Token::Kind token);
712
713 // Initialize frequently used symbols in the vm isolate.
714 static void Init(IsolateGroup* isolate_group);
715 static void InitFromSnapshot(IsolateGroup* isolate_group);
716
717 // Initialize and setup a symbol table for the isolate.
718 static void SetupSymbolTable(IsolateGroup* isolate_group);
719
720 // Creates a Symbol given a C string that is assumed to contain
721 // UTF-8 encoded characters and '\0' is considered a termination character.
722 // TODO(7123) - Rename this to FromCString(....).
723 static StringPtr New(Thread* thread, const char* cstr) {
724 return New(thread, cstr, strlen(cstr));
725 }
726 static StringPtr New(Thread* thread, const char* cstr, intptr_t length);
727
728 // Creates a new Symbol from an array of UTF-8 encoded characters.
729 static StringPtr FromUTF8(Thread* thread,
730 const uint8_t* utf8_array,
731 intptr_t len);
732
733 // Creates a new Symbol from an array of Latin-1 encoded characters.
734 static StringPtr FromLatin1(Thread* thread,
735 const uint8_t* latin1_array,
736 intptr_t len);
737
738 // Creates a new Symbol from an array of UTF-16 encoded characters.
739 static StringPtr FromUTF16(Thread* thread,
740 const uint16_t* utf16_array,
741 intptr_t len);
742
743 static StringPtr New(Thread* thread, const String& str);
744 static StringPtr New(Thread* thread,
745 const String& str,
746 intptr_t begin_index,
747 intptr_t length);
748
749 static StringPtr NewFormatted(Thread* thread, const char* format, ...)
750 PRINTF_ATTRIBUTE(2, 3);
751 static StringPtr NewFormattedV(Thread* thread,
752 const char* format,
753 va_list args);
754
755 static StringPtr FromConcat(Thread* thread,
756 const String& str1,
757 const String& str2);
758
759 static StringPtr FromConcatAll(
760 Thread* thread,
761 const GrowableHandlePtrArray<const String>& strs);
762
763 static StringPtr FromGet(Thread* thread, const String& str);
764 static StringPtr FromSet(Thread* thread, const String& str);
765 static StringPtr FromDot(Thread* thread, const String& str);
766
767 // Returns char* of predefined symbol.
768 static const char* Name(SymbolId symbol);
769
770 static StringPtr FromCharCode(Thread* thread, uint16_t char_code);
771
772 static StringPtr* PredefinedAddress() {
773 return reinterpret_cast<StringPtr*>(&predefined_);
774 }
775
776 static void DumpStats(IsolateGroup* isolate_group);
777 static void DumpTable(IsolateGroup* isolate_group);
778
779 // Returns Symbol::Null if no symbol is found.
780 template <typename StringType>
781 static StringPtr Lookup(Thread* thread, const StringType& str);
782
783 // Returns Symbol::Null if no symbol is found.
784 static StringPtr LookupFromConcat(Thread* thread,
785 const String& str1,
786 const String& str2);
787
788 static StringPtr LookupFromGet(Thread* thread, const String& str);
789 static StringPtr LookupFromSet(Thread* thread, const String& str);
790 static StringPtr LookupFromDot(Thread* thread, const String& str);
791
792 static void GetStats(IsolateGroup* isolate_group,
793 intptr_t* size,
794 intptr_t* capacity);
795
796 private:
797 enum { kInitialVMIsolateSymtabSize = 1024, kInitialSymtabSize = 2048 };
798
799 template <typename StringType>
800 static StringPtr NewSymbol(Thread* thread, const StringType& str);
801
802 // List of Latin1 characters stored in the vm isolate as symbols
803 // in order to make Symbols::FromCharCode fast. This structure is
804 // used in generated dart code for direct access to these objects.
805 static StringPtr predefined_[kNumberOfOneCharCodeSymbols];
806
807 // List of handles for predefined symbols.
808 static String* symbol_handles_[kMaxPredefinedId];
809
810 friend class Dart;
811 friend class String;
812 friend class Serializer;
813 friend class Deserializer;
814
816};
817
818} // namespace dart
819
820#endif // RUNTIME_VM_SYMBOLS_H_
static void GetStats(IsolateGroup *isolate_group, intptr_t *size, intptr_t *capacity)
Definition: symbols.cc:180
static const String & Percent()
Definition: symbols.h:679
static void InitFromSnapshot(IsolateGroup *isolate_group)
Definition: symbols.cc:127
static const String & Symbol(intptr_t index)
Definition: symbols.h:607
static const String & HashMark()
Definition: symbols.h:672
static const String & True()
Definition: symbols.h:693
static const String & DoubleQuote()
Definition: symbols.h:654
static const String & Super()
Definition: symbols.h:691
static const String & Plus()
Definition: symbols.h:617
static StringPtr Lookup(Thread *thread, const StringType &str)
Definition: symbols.cc:375
static const char * Name(SymbolId symbol)
Definition: symbols.cc:66
static const String & LowercaseR()
Definition: symbols.h:660
static StringPtr LookupFromDot(Thread *thread, const String &str)
Definition: symbols.cc:432
static StringPtr static StringPtr NewFormattedV(Thread *thread, const char *format, va_list args)
Definition: symbols.cc:459
static const String & RParen()
Definition: symbols.h:632
static const String & NewLine()
Definition: symbols.h:651
static StringPtr LookupFromGet(Thread *thread, const String &str)
Definition: symbols.cc:424
static void Init(IsolateGroup *isolate_group)
Definition: symbols.cc:80
static const String & LAngleBracket()
Definition: symbols.h:623
static StringPtr FromConcat(Thread *thread, const String &str1, const String &str2)
Definition: symbols.cc:235
static const String & BitOr()
Definition: symbols.h:619
static const String & Dollar()
Definition: symbols.h:648
static const String & Caret()
Definition: symbols.h:685
@ kMaxOneCharCodeSymbol
Definition: symbols.h:577
static StringPtr LookupFromSet(Thread *thread, const String &str)
Definition: symbols.cc:428
static StringPtr FromUTF16(Thread *thread, const uint16_t *utf16_array, intptr_t len)
Definition: symbols.cc:229
@ DART_TOKEN_LIST
Definition: symbols.h:591
@ kTokenTableStart
Definition: symbols.h:588
@ kMaxPredefinedId
Definition: symbols.h:596
static const String & Library()
Definition: symbols.h:690
static constexpr int kNumberOfOneCharCodeSymbols
Definition: symbols.h:601
static StringPtr FromGet(Thread *thread, const String &str)
Definition: symbols.cc:247
static StringPtr FromSet(Thread *thread, const String &str)
Definition: symbols.cc:251
static const String & Tilde()
Definition: symbols.h:686
static StringPtr FromDot(Thread *thread, const String &str)
Definition: symbols.cc:255
static StringPtr FromCharCode(Thread *thread, uint16_t char_code)
Definition: symbols.cc:474
static const String & RAngleBracket()
Definition: symbols.h:626
static const String & False()
Definition: symbols.h:689
static void SetupSymbolTable(IsolateGroup *isolate_group)
Definition: symbols.cc:168
friend class String
Definition: symbols.h:811
static StringPtr FromConcatAll(Thread *thread, const GrowableHandlePtrArray< const String > &strs)
Definition: symbols.cc:262
static const String & Void()
Definition: symbols.h:694
static const String & Dash()
Definition: symbols.h:663
static constexpr int kNullCharCodeSymbolOffset
Definition: symbols.h:605
static const String & This()
Definition: symbols.h:692
static const String & Ampersand()
Definition: symbols.h:664
static const String & Empty()
Definition: symbols.h:688
static const String & Backtick()
Definition: symbols.h:667
static const String & Star()
Definition: symbols.h:678
static const String & QuestionMark()
Definition: symbols.h:682
static const String & SingleQuote()
Definition: symbols.h:657
static const String & LBrace()
Definition: symbols.h:641
static const String & BitAnd()
Definition: symbols.h:620
static StringPtr * PredefinedAddress()
Definition: symbols.h:772
static StringPtr FromUTF8(Thread *thread, const uint8_t *utf8_array, intptr_t len)
Definition: symbols.cc:196
static const String & Semicolon()
Definition: symbols.h:675
static const String & LBracket()
Definition: symbols.h:635
static StringPtr New(Thread *thread, const char *cstr)
Definition: symbols.h:723
static void DumpStats(IsolateGroup *isolate_group)
Definition: symbols.cc:481
static const String & Dot()
Definition: symbols.h:613
static StringPtr LookupFromConcat(Thread *thread, const String &str1, const String &str2)
Definition: symbols.cc:412
static const String & Blank()
Definition: symbols.h:647
static const String & RBracket()
Definition: symbols.h:638
static const String & LParen()
Definition: symbols.h:629
static const String & Slash()
Definition: symbols.h:670
static StringPtr NewFormatted(Thread *thread, const char *format,...) PRINTF_ATTRIBUTE(2
Definition: symbols.cc:450
static const String & Minus()
Definition: symbols.h:618
static void DumpTable(IsolateGroup *isolate_group)
Definition: symbols.cc:496
static const String & At()
Definition: symbols.h:671
static StringPtr FromLatin1(Thread *thread, const uint8_t *latin1_array, intptr_t len)
Definition: symbols.cc:223
static const String & Equals()
Definition: symbols.h:614
static const String & Token(Token::Kind token)
Definition: symbols.cc:71
static const String & RBrace()
Definition: symbols.h:644
#define ASSERT(E)
G_BEGIN_DECLS G_MODULE_EXPORT FlValue * args
uint32_t uint32_t * format
size_t length
Definition: dart_vm.cc:33
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size
Definition: switches.h:259
#define PRINTF_ATTRIBUTE(string_index, first_to_check)
Definition: globals.h:697
#define DISALLOW_COPY_AND_ASSIGN(TypeName)
Definition: globals.h:581
#define PREDEFINED_SYMBOLS_LIST(V)
Definition: symbols.h:18
#define DEFINE_TOKEN_SYMBOL_INDEX(t, s, p, a)
Definition: symbols.h:590
#define DEFINE_SYMBOL_HANDLE_ACCESSOR(symbol, literal)
Definition: symbols.h:704
#define DEFINE_SYMBOL_INDEX(symbol, literal)
Definition: symbols.h:584
#define DART_KEYWORD_LIST(KW)
Definition: token.h:159