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

Unified Diff: vm/dart_api_impl.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « vm/dart.cc ('k') | vm/dart_entry.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vm/dart_api_impl.cc
===================================================================
--- vm/dart_api_impl.cc (revision 9829)
+++ vm/dart_api_impl.cc (working copy)
@@ -24,6 +24,7 @@
#include "vm/port.h"
#include "vm/resolver.h"
#include "vm/stack_frame.h"
+#include "vm/symbols.h"
#include "vm/timer.h"
#include "vm/unicode.h"
#include "vm/verifier.h"
@@ -1121,7 +1122,7 @@
const String& class_name =
String::Handle(isolate, isolate_lib.PrivateName(public_class_name));
const String& function_name =
- String::Handle(isolate, String::NewSymbol("_get_or_create"));
+ String::Handle(isolate, Symbols::New("_get_or_create"));
const int kNumArguments = 1;
const Array& kNoArgumentNames = Array::Handle(isolate);
const Function& function = Function::Handle(
@@ -2582,7 +2583,7 @@
static RawString* AddExternalSetterSuffix(const String& name) {
- const String& equals = String::Handle(String::NewSymbol("="));
+ const String& equals = String::Handle(Symbols::New("="));
return String::Concat(name, equals);
}
@@ -2697,7 +2698,7 @@
// Case 4. Lookup the function with a . appended to find the
// unnamed constructor.
if (func.IsNull()) {
- const String& dot = String::Handle(String::NewSymbol("."));
+ const String& dot = String::Handle(Symbols::Dot());
tmp_name = String::Concat(func_name, dot);
func = cls.LookupFunction(tmp_name);
}
@@ -3091,9 +3092,9 @@
const Object& name_obj =
Object::Handle(isolate, Api::UnwrapHandle(constructor_name));
if (name_obj.IsNull()) {
- dot_name = String::NewSymbol(".");
+ dot_name = Symbols::Dot();
} else if (name_obj.IsString()) {
- const String& dot = String::Handle(isolate, String::NewSymbol("."));
+ const String& dot = String::Handle(isolate, Symbols::Dot());
dot_name = String::Concat(dot, String::Cast(name_obj));
} else {
return Api::NewError(
@@ -3610,7 +3611,7 @@
}
String& cls_name = String::Handle(isolate);
cls_name ^= param.raw();
- cls_name = String::NewSymbol(cls_name);
+ cls_name = Symbols::New(cls_name);
Library& lib = Library::Handle(isolate);
lib ^= Api::UnwrapHandle(library);
if (lib.IsNull()) {
« no previous file with comments | « vm/dart.cc ('k') | vm/dart_entry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698