OLD | NEW |
(Empty) | |
| 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 #include "vm/symbols.h" |
| 6 |
| 7 #include "vm/isolate.h" |
| 8 #include "vm/object.h" |
| 9 #include "vm/raw_object.h" |
| 10 #include "vm/visitor.h" |
| 11 |
| 12 namespace dart { |
| 13 |
| 14 Symbols::Symbols() |
| 15 : dot_(String::null()) { |
| 16 } |
| 17 |
| 18 |
| 19 Symbols::~Symbols() { |
| 20 } |
| 21 |
| 22 |
| 23 void Symbols::VisitObjectPointers(ObjectPointerVisitor* visitor) { |
| 24 ASSERT(Isolate::Current() == Dart::vm_isolate()); |
| 25 ASSERT(visitor != NULL); |
| 26 visitor->VisitPointers(from(), to()); |
| 27 } |
| 28 |
| 29 |
| 30 void Symbols::Init(Isolate* isolate) { |
| 31 ASSERT(isolate == Dart::vm_isolate()); |
| 32 ASSERT(isolate->symbols() == NULL); |
| 33 Symbols* symbols = new Symbols(); |
| 34 ASSERT(symbols != NULL); |
| 35 Class::New<OneByteString>(); |
| 36 symbols->dot_ = OneByteString::New("."); |
| 37 isolate->set_symbols(symbols); |
| 38 } |
| 39 |
| 40 } // namespace dart |
OLD | NEW |