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

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

Issue 683433003: Integrate the Irregexp Regular Expression Engine. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: rebase Created 6 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
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 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 V(_leftShiftWithMask32, "_leftShiftWithMask32") \ 324 V(_leftShiftWithMask32, "_leftShiftWithMask32") \
322 V(OptimizedOut, "<optimized out>") \ 325 V(OptimizedOut, "<optimized out>") \
323 V(NotInitialized, "<not initialized>") \ 326 V(NotInitialized, "<not initialized>") \
324 V(AllocationStubFor, "Allocation stub for ") \ 327 V(AllocationStubFor, "Allocation stub for ") \
325 V(TempParam, ":temp_param") \ 328 V(TempParam, ":temp_param") \
326 V(_UserTag, "_UserTag") \ 329 V(_UserTag, "_UserTag") \
327 V(Default, "Default") \ 330 V(Default, "Default") \
328 V(StubPrefix, "[Stub] ") \ 331 V(StubPrefix, "[Stub] ") \
329 V(ClassID, "ClassID") \ 332 V(ClassID, "ClassID") \
330 V(DartIsVM, "dart.isVM") \ 333 V(DartIsVM, "dart.isVM") \
334 V(stack_, "stack_") \
335 V(current_character_, "current_character_") \
336 V(current_position_, "current_position_") \
337 V(string_param_length_, "string_param_length_") \
338 V(capture_length_, "capture_length_") \
339 V(word_character_map_, "word_character_map_") \
340 V(match_start_index_, "match_start_index_") \
341 V(capture_start_index_, "capture_start_index_") \
342 V(match_end_index_, "match_end_index_") \
343 V(char_in_capture_, "char_in_capture_") \
344 V(char_in_match_, "char_in_match_") \
345 V(result_, "result_") \
346 V(position_registers_, "position_registers_") \
347 V(string_param_, "string_param_") \
348 V(start_index_param_, "start_index_param_") \
349 V(clear, "clear") \
350 V(_wordCharacterMap, "_wordCharacterMap") \
351 V(print, "print") \
352 V(last, "last") \
353 V(removeLast, "removeLast") \
354 V(add, "add") \
355 V(_oneCodeUnitAt, "_oneCodeUnitAt") \
356 V(_twoCodeUnitsAt, "_twoCodeUnitsAt") \
357 V(_fourCodeUnitsAt, "_fourCodeUnitsAt") \
331 358
332 359
333 // Contains a list of frequently used strings in a canonicalized form. This 360 // Contains a list of frequently used strings in a canonicalized form. This
334 // list is kept in the vm_isolate in order to share the copy across isolates 361 // list is kept in the vm_isolate in order to share the copy across isolates
335 // without having to maintain copies in each isolate. 362 // without having to maintain copies in each isolate.
336 class Symbols : public AllStatic { 363 class Symbols : public AllStatic {
337 public: 364 public:
338 enum { kMaxOneCharCodeSymbol = 0xFF }; 365 enum { kMaxOneCharCodeSymbol = 0xFF };
339 366
340 // List of strings that are pre created in the vm isolate. 367 // List of strings that are pre created in the vm isolate.
(...skipping 23 matching lines...) Expand all
364 // Offset of Null character which is the predefined character symbol. 391 // Offset of Null character which is the predefined character symbol.
365 static const int kNullCharCodeSymbolOffset = 0; 392 static const int kNullCharCodeSymbolOffset = 0;
366 393
367 // Access methods for one byte character symbols stored in the vm isolate. 394 // Access methods for one byte character symbols stored in the vm isolate.
368 static const String& Dot() { 395 static const String& Dot() {
369 return *(symbol_handles_[kNullCharId + '.']); 396 return *(symbol_handles_[kNullCharId + '.']);
370 } 397 }
371 static const String& Equals() { 398 static const String& Equals() {
372 return *(symbol_handles_[kNullCharId + '=']); 399 return *(symbol_handles_[kNullCharId + '=']);
373 } 400 }
401 static const String& Plus() {
402 return *(symbol_handles_[kNullCharId + '+']);
403 }
404 static const String& Minus() {
405 return *(symbol_handles_[kNullCharId + '-']);
406 }
407 static const String& BitOr() {
408 return *(symbol_handles_[kNullCharId + '|']);
409 }
410 static const String& BitAnd() {
411 return *(symbol_handles_[kNullCharId + '&']);
412 }
374 static const String& LAngleBracket() { 413 static const String& LAngleBracket() {
375 return *(symbol_handles_[kNullCharId + '<']); 414 return *(symbol_handles_[kNullCharId + '<']);
376 } 415 }
377 static const String& RAngleBracket() { 416 static const String& RAngleBracket() {
378 return *(symbol_handles_[kNullCharId + '>']); 417 return *(symbol_handles_[kNullCharId + '>']);
379 } 418 }
380 static const String& LParen() { 419 static const String& LParen() {
381 return *(symbol_handles_[kNullCharId + '(']); 420 return *(symbol_handles_[kNullCharId + '(']);
382 } 421 }
383 static const String& RParen() { 422 static const String& RParen() {
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
517 friend class SnapshotReader; 556 friend class SnapshotReader;
518 friend class SnapshotWriter; 557 friend class SnapshotWriter;
519 friend class ApiMessageReader; 558 friend class ApiMessageReader;
520 559
521 DISALLOW_COPY_AND_ASSIGN(Symbols); 560 DISALLOW_COPY_AND_ASSIGN(Symbols);
522 }; 561 };
523 562
524 } // namespace dart 563 } // namespace dart
525 564
526 #endif // VM_SYMBOLS_H_ 565 #endif // VM_SYMBOLS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698