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

Side by Side Diff: vm/symbols.cc

Issue 10783035: Create frequently used symbols in the vm isolate (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 5 months 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
(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
OLDNEW
« vm/symbols.h ('K') | « vm/symbols.h ('k') | vm/vm_sources.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698