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

Unified Diff: vm/flow_graph_builder.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/find_code_object_test.cc ('k') | vm/flow_graph_compiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vm/flow_graph_builder.cc
===================================================================
--- vm/flow_graph_builder.cc (revision 9829)
+++ vm/flow_graph_builder.cc (working copy)
@@ -17,6 +17,7 @@
#include "vm/parser.h"
#include "vm/resolver.h"
#include "vm/stub_code.h"
+#include "vm/symbols.h"
namespace dart {
@@ -356,7 +357,7 @@
AbstractType::ZoneHandle(
owner()->parsed_function().function().result_type());
const String& dst_name =
- String::ZoneHandle(String::NewSymbol("function result"));
+ String::ZoneHandle(Symbols::New("function result"));
return_value = BuildAssignableValue(node->value()->token_pos(),
return_value,
dst_type,
@@ -563,7 +564,7 @@
ZoneGrowableArray<Value*>* arguments = new ZoneGrowableArray<Value*>(2);
arguments->Add(for_left_value.value());
arguments->Add(for_right_value.value());
- const String& name = String::ZoneHandle(String::NewSymbol(node->Name()));
+ const String& name = String::ZoneHandle(Symbols::New(node->Name()));
InstanceCallComp* call = new InstanceCallComp(node->token_pos(),
owner()->try_index(),
name,
@@ -724,7 +725,7 @@
node->left()->Visit(&for_value);
Append(for_value);
const String& dst_name = String::ZoneHandle(
- String::NewSymbol(Exceptions::kCastExceptionDstName));
+ Symbols::New(Exceptions::kCastExceptionDstName));
if (!CanSkipTypeCheck(node->token_pos(), for_value.value(), type, dst_name)) {
Do(BuildAssertAssignable(
node->token_pos(), for_value.value(), type, dst_name));
@@ -813,7 +814,7 @@
node->left()->Visit(&for_value);
Append(for_value);
const String& dst_name = String::ZoneHandle(
- String::NewSymbol(Exceptions::kCastExceptionDstName));
+ Symbols::New(Exceptions::kCastExceptionDstName));
ReturnValue(BuildAssignableValue(node->token_pos(),
for_value.value(),
type,
@@ -918,7 +919,7 @@
(node->kind() == Token::kSUB) ? Token::kNEGATE : node->kind();
const String& name =
- String::ZoneHandle(String::NewSymbol(Token::Str(token_kind)));
+ String::ZoneHandle(Symbols::New(Token::Str(token_kind)));
InstanceCallComp* call = new InstanceCallComp(
node->token_pos(), owner()->try_index(), name, token_kind,
arguments, Array::ZoneHandle(), 1);
@@ -2073,7 +2074,7 @@
if (parameter.is_captured()) {
// Create a temporary local describing the original position.
const String& temp_name = String::ZoneHandle(String::Concat(
- parameter.name(), String::Handle(String::NewSymbol("-orig"))));
+ parameter.name(), String::Handle(Symbols::New("-orig"))));
LocalVariable* temp_local = new LocalVariable(
0, // Token index.
temp_name,
« no previous file with comments | « vm/find_code_object_test.cc ('k') | vm/flow_graph_compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698