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

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

Issue 744853003: Integrate the Irregexp Regular Expression Engine. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: fix clang and win build Created 6 years 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/regexp_parser.cc ('k') | runtime/vm/unibrow.h » ('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_SYMBOLS_H_ 5 #ifndef VM_SYMBOLS_H_
6 #define VM_SYMBOLS_H_ 6 #define VM_SYMBOLS_H_
7 7
8 #include "vm/object.h" 8 #include "vm/object.h"
9 #include "vm/snapshot_ids.h" 9 #include "vm/snapshot_ids.h"
10 10
11 namespace dart { 11 namespace dart {
12 12
13 // Forward declarations. 13 // Forward declarations.
14 class Isolate; 14 class Isolate;
15 class ObjectPointerVisitor; 15 class ObjectPointerVisitor;
16 16
17 // One-character symbols are added implicitly. 17 // One-character symbols are added implicitly.
18 #define PREDEFINED_SYMBOLS_LIST(V) \ 18 #define PREDEFINED_SYMBOLS_LIST(V) \
19 V(Empty, "") \ 19 V(Empty, "") \
20 V(EqualOperator, "==") \ 20 V(EqualOperator, "==") \
21 V(GreaterEqualOperator, ">=") \
22 V(LessEqualOperator, "<=") \
23 V(UnaryMinus, "unary-") \
21 V(Identical, "identical") \ 24 V(Identical, "identical") \
22 V(Length, "length") \ 25 V(Length, "length") \
23 V(IndexToken, "[]") \ 26 V(IndexToken, "[]") \
24 V(AssignIndexToken, "[]=") \ 27 V(AssignIndexToken, "[]=") \
25 V(TopLevel, "::") \ 28 V(TopLevel, "::") \
26 V(DefaultLabel, ":L") \ 29 V(DefaultLabel, ":L") \
27 V(This, "this") \ 30 V(This, "this") \
28 V(Other, "other") \ 31 V(Other, "other") \
29 V(Super, "super") \ 32 V(Super, "super") \
30 V(Call, "call") \ 33 V(Call, "call") \
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 V(_String, "String") \ 159 V(_String, "String") \
157 V(OneByteString, "_OneByteString") \ 160 V(OneByteString, "_OneByteString") \
158 V(TwoByteString, "_TwoByteString") \ 161 V(TwoByteString, "_TwoByteString") \
159 V(ExternalOneByteString, "_ExternalOneByteString") \ 162 V(ExternalOneByteString, "_ExternalOneByteString") \
160 V(ExternalTwoByteString, "_ExternalTwoByteString") \ 163 V(ExternalTwoByteString, "_ExternalTwoByteString") \
161 V(_CapabilityImpl, "_CapabilityImpl") \ 164 V(_CapabilityImpl, "_CapabilityImpl") \
162 V(_RawReceivePortImpl, "_RawReceivePortImpl") \ 165 V(_RawReceivePortImpl, "_RawReceivePortImpl") \
163 V(_SendPortImpl, "_SendPortImpl") \ 166 V(_SendPortImpl, "_SendPortImpl") \
164 V(StackTrace, "StackTrace") \ 167 V(StackTrace, "StackTrace") \
165 V(JSSyntaxRegExp, "_JSSyntaxRegExp") \ 168 V(JSSyntaxRegExp, "_JSSyntaxRegExp") \
169 V(RegExp, "RegExp") \
170 V(IrregExp, ":irregexp") \
166 V(Object, "Object") \ 171 V(Object, "Object") \
167 V(Int, "int") \ 172 V(Int, "int") \
168 V(Double, "double") \ 173 V(Double, "double") \
169 V(_Float32x4, "_Float32x4") \ 174 V(_Float32x4, "_Float32x4") \
170 V(_Float64x2, "_Float64x2") \ 175 V(_Float64x2, "_Float64x2") \
171 V(_Int32x4, "_Int32x4") \ 176 V(_Int32x4, "_Int32x4") \
172 V(Float32x4, "Float32x4") \ 177 V(Float32x4, "Float32x4") \
173 V(Float64x2, "Float64x2") \ 178 V(Float64x2, "Float64x2") \
174 V(Int32x4, "Int32x4") \ 179 V(Int32x4, "Int32x4") \
175 V(Int8List, "Int8List") \ 180 V(Int8List, "Int8List") \
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 V(_leftShiftWithMask32, "_leftShiftWithMask32") \ 329 V(_leftShiftWithMask32, "_leftShiftWithMask32") \
325 V(OptimizedOut, "<optimized out>") \ 330 V(OptimizedOut, "<optimized out>") \
326 V(NotInitialized, "<not initialized>") \ 331 V(NotInitialized, "<not initialized>") \
327 V(AllocationStubFor, "Allocation stub for ") \ 332 V(AllocationStubFor, "Allocation stub for ") \
328 V(TempParam, ":temp_param") \ 333 V(TempParam, ":temp_param") \
329 V(_UserTag, "_UserTag") \ 334 V(_UserTag, "_UserTag") \
330 V(Default, "Default") \ 335 V(Default, "Default") \
331 V(StubPrefix, "[Stub] ") \ 336 V(StubPrefix, "[Stub] ") \
332 V(ClassID, "ClassID") \ 337 V(ClassID, "ClassID") \
333 V(DartIsVM, "dart.isVM") \ 338 V(DartIsVM, "dart.isVM") \
339 V(stack, ":stack") \
340 V(current_character, ":current_character") \
341 V(current_position, ":current_position") \
342 V(string_param_length, ":string_param_length") \
343 V(capture_length, ":capture_length") \
344 V(word_character_map, ":word_character_map") \
345 V(match_start_index, ":match_start_index") \
346 V(capture_start_index, ":capture_start_index") \
347 V(match_end_index, ":match_end_index") \
348 V(char_in_capture, ":char_in_capture") \
349 V(char_in_match, ":char_in_match") \
350 V(result, ":result") \
351 V(position_registers, ":position_registers") \
352 V(string_param, ":string_param") \
353 V(start_index_param, ":start_index_param") \
354 V(clear, "clear") \
355 V(_wordCharacterMap, "_wordCharacterMap") \
356 V(print, "print") \
357 V(last, "last") \
358 V(removeLast, "removeLast") \
359 V(add, "add") \
334 360
335 361
336 // Contains a list of frequently used strings in a canonicalized form. This 362 // Contains a list of frequently used strings in a canonicalized form. This
337 // list is kept in the vm_isolate in order to share the copy across isolates 363 // list is kept in the vm_isolate in order to share the copy across isolates
338 // without having to maintain copies in each isolate. 364 // without having to maintain copies in each isolate.
339 class Symbols : public AllStatic { 365 class Symbols : public AllStatic {
340 public: 366 public:
341 enum { kMaxOneCharCodeSymbol = 0xFF }; 367 enum { kMaxOneCharCodeSymbol = 0xFF };
342 368
343 // List of strings that are pre created in the vm isolate. 369 // List of strings that are pre created in the vm isolate.
(...skipping 23 matching lines...) Expand all
367 // Offset of Null character which is the predefined character symbol. 393 // Offset of Null character which is the predefined character symbol.
368 static const int kNullCharCodeSymbolOffset = 0; 394 static const int kNullCharCodeSymbolOffset = 0;
369 395
370 // Access methods for one byte character symbols stored in the vm isolate. 396 // Access methods for one byte character symbols stored in the vm isolate.
371 static const String& Dot() { 397 static const String& Dot() {
372 return *(symbol_handles_[kNullCharId + '.']); 398 return *(symbol_handles_[kNullCharId + '.']);
373 } 399 }
374 static const String& Equals() { 400 static const String& Equals() {
375 return *(symbol_handles_[kNullCharId + '=']); 401 return *(symbol_handles_[kNullCharId + '=']);
376 } 402 }
403 static const String& Plus() {
404 return *(symbol_handles_[kNullCharId + '+']);
405 }
406 static const String& Minus() {
407 return *(symbol_handles_[kNullCharId + '-']);
408 }
409 static const String& BitOr() {
410 return *(symbol_handles_[kNullCharId + '|']);
411 }
412 static const String& BitAnd() {
413 return *(symbol_handles_[kNullCharId + '&']);
414 }
377 static const String& LAngleBracket() { 415 static const String& LAngleBracket() {
378 return *(symbol_handles_[kNullCharId + '<']); 416 return *(symbol_handles_[kNullCharId + '<']);
379 } 417 }
380 static const String& RAngleBracket() { 418 static const String& RAngleBracket() {
381 return *(symbol_handles_[kNullCharId + '>']); 419 return *(symbol_handles_[kNullCharId + '>']);
382 } 420 }
383 static const String& LParen() { 421 static const String& LParen() {
384 return *(symbol_handles_[kNullCharId + '(']); 422 return *(symbol_handles_[kNullCharId + '(']);
385 } 423 }
386 static const String& RParen() { 424 static const String& RParen() {
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
520 friend class SnapshotReader; 558 friend class SnapshotReader;
521 friend class SnapshotWriter; 559 friend class SnapshotWriter;
522 friend class ApiMessageReader; 560 friend class ApiMessageReader;
523 561
524 DISALLOW_COPY_AND_ASSIGN(Symbols); 562 DISALLOW_COPY_AND_ASSIGN(Symbols);
525 }; 563 };
526 564
527 } // namespace dart 565 } // namespace dart
528 566
529 #endif // VM_SYMBOLS_H_ 567 #endif // VM_SYMBOLS_H_
OLDNEW
« no previous file with comments | « runtime/vm/regexp_parser.cc ('k') | runtime/vm/unibrow.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698