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

Unified Diff: vm/code_generator_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
« no previous file with comments | « vm/code_generator.cc ('k') | vm/code_patcher_ia32_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vm/code_generator_test.cc
===================================================================
--- vm/code_generator_test.cc (revision 9829)
+++ vm/code_generator_test.cc (working copy)
@@ -14,6 +14,7 @@
#include "vm/dart_entry.h"
#include "vm/native_entry.h"
#include "vm/native_entry_test.h"
+#include "vm/symbols.h"
#include "vm/unit_test.h"
#include "vm/virtual_memory.h"
@@ -24,7 +25,7 @@
// Helper to allocate and return a LocalVariable.
static LocalVariable* NewTestLocalVariable(const char* name) {
- const String& variable_name = String::ZoneHandle(String::NewSymbol(name));
+ const String& variable_name = String::ZoneHandle(Symbols::New(name));
const Type& variable_type = Type::ZoneHandle(Type::DynamicType());
return new LocalVariable(kPos, variable_name, variable_type);
}
@@ -219,7 +220,7 @@
function.set_num_optional_parameters(num_opt_params);
const bool has_opt_params = true;
const String& native_name =
- String::ZoneHandle(String::NewSymbol("TestSmiSub"));
+ String::ZoneHandle(Symbols::New("TestSmiSub"));
NativeFunction native_function =
reinterpret_cast<NativeFunction>(NATIVE_ENTRY_FUNCTION(TestSmiSub));
node_seq->Add(new ReturnNode(kPos,
@@ -264,7 +265,7 @@
static Library& MakeTestLibrary(const char* url) {
- const String& lib_url = String::ZoneHandle(String::NewSymbol(url));
+ const String& lib_url = String::ZoneHandle(Symbols::New(url));
Library& lib = Library::ZoneHandle(Library::New(lib_url));
lib.Register();
return lib;
@@ -272,7 +273,7 @@
static RawClass* LookupClass(const Library& lib, const char* name) {
- const String& cls_name = String::ZoneHandle(String::NewSymbol(name));
+ const String& cls_name = String::ZoneHandle(Symbols::New(name));
return lib.LookupClass(cls_name);
}
@@ -348,7 +349,7 @@
EXPECT(!constructor.IsNull());
// The unit test creates an instance of class A and calls function 'bar'.
- String& function_bar_name = String::ZoneHandle(String::NewSymbol("bar"));
+ String& function_bar_name = String::ZoneHandle(Symbols::New("bar"));
ArgumentListNode* no_arguments = new ArgumentListNode(kPos);
const TypeArguments& no_type_arguments = TypeArguments::ZoneHandle();
const LocalVariable& allocated = *test->CreateTempConstVariable("alloc");
@@ -396,7 +397,7 @@
}
const bool has_opt_params = true;
const String& native_name =
- String::ZoneHandle(String::NewSymbol("TestSmiSum"));
+ String::ZoneHandle(Symbols::New("TestSmiSum"));
NativeFunction native_function =
reinterpret_cast<NativeFunction>(NATIVE_ENTRY_FUNCTION(TestSmiSum));
node_seq->Add(new ReturnNode(kPos,
@@ -510,7 +511,7 @@
app_lib ^= libs.At(num_libs - 1);
ASSERT(!app_lib.IsNull());
const Class& cls = Class::Handle(
- app_lib.LookupClass(String::Handle(String::NewSymbol("A"))));
+ app_lib.LookupClass(String::Handle(Symbols::New("A"))));
EXPECT_EQ(cls.raw(), result.clazz());
}
« no previous file with comments | « vm/code_generator.cc ('k') | vm/code_patcher_ia32_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698