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

Unified Diff: vm/dart_entry_test.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
Index: vm/dart_entry_test.cc
===================================================================
--- vm/dart_entry_test.cc (revision 9729)
+++ vm/dart_entry_test.cc (working copy)
@@ -9,6 +9,7 @@
#include "vm/dart_entry.h"
#include "vm/object.h"
#include "vm/resolver.h"
+#include "vm/symbols.h"
#include "vm/unit_test.h"
namespace dart {
@@ -28,7 +29,7 @@
EXPECT_EQ(true, CompilerTest::TestCompileScript(lib, script));
EXPECT(ClassFinalizer::FinalizePendingClasses());
Class& cls = Class::Handle(
- lib.LookupClass(String::Handle(String::NewSymbol("A"))));
+ lib.LookupClass(String::Handle(Symbols::New("A"))));
EXPECT(!cls.IsNull());
String& name = String::Handle(String::New("foo"));
Function& function = Function::Handle(cls.LookupStaticFunction(name));
@@ -58,7 +59,7 @@
EXPECT_EQ(true, CompilerTest::TestCompileScript(lib, script));
EXPECT(ClassFinalizer::FinalizePendingClasses());
Class& cls = Class::Handle(
- lib.LookupClass(String::Handle(String::NewSymbol("A"))));
+ lib.LookupClass(String::Handle(Symbols::New("A"))));
EXPECT(!cls.IsNull());
String& name = String::Handle(String::New("foo"));
Function& function = Function::Handle(cls.LookupStaticFunction(name));
@@ -84,7 +85,7 @@
EXPECT_EQ(true, CompilerTest::TestCompileScript(lib, script));
EXPECT(ClassFinalizer::FinalizePendingClasses());
Class& cls = Class::Handle(
- lib.LookupClass(String::Handle(String::NewSymbol("A"))));
+ lib.LookupClass(String::Handle(Symbols::New("A"))));
EXPECT(!cls.IsNull());
// Invoke the constructor.
@@ -92,7 +93,7 @@
GrowableArray<const Object*> constructor_arguments(2);
constructor_arguments.Add(&instance);
constructor_arguments.Add(&Smi::Handle(Smi::New(Function::kCtorPhaseAll)));
- String& constructor_name = String::Handle(String::NewSymbol("A."));
+ String& constructor_name = String::Handle(Symbols::New("A."));
Function& constructor =
Function::Handle(cls.LookupConstructor(constructor_name));
ASSERT(!constructor.IsNull());

Powered by Google App Engine
This is Rietveld 408576698