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

Unified Diff: vm/code_generator.cc

Issue 11667012: Convert all symbols accessor to return read only handles so that it is not necessary to create a ne… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 7 years, 12 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/class_finalizer.cc ('k') | vm/dart_api_impl.cc » ('j') | vm/symbols.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vm/code_generator.cc
===================================================================
--- vm/code_generator.cc (revision 16583)
+++ vm/code_generator.cc (working copy)
@@ -234,9 +234,9 @@
const intptr_t location = GetCallerLocation();
String& malformed_error_message = String::Handle(
String::New(malformed_error.ToErrorCString()));
- const String& no_name = String::Handle(Symbols::Empty());
Exceptions::CreateAndThrowTypeError(
- location, no_name, no_name, no_name, malformed_error_message);
+ location, Symbols::Empty(), Symbols::Empty(),
+ Symbols::Empty(), malformed_error_message);
UNREACHABLE();
}
}
@@ -588,9 +588,9 @@
const intptr_t location = GetCallerLocation();
String& malformed_error_message = String::Handle(
String::New(malformed_error.ToErrorCString()));
- const String& no_name = String::Handle(Symbols::Empty());
Exceptions::CreateAndThrowTypeError(
- location, no_name, no_name, no_name, malformed_error_message);
+ location, Symbols::Empty(), Symbols::Empty(),
+ Symbols::Empty(), malformed_error_message);
UNREACHABLE();
}
UpdateTypeTestCache(instance, type, instantiator,
@@ -707,10 +707,10 @@
const String& src_type_name = String::Handle(src_type.UserVisibleName());
const String& bool_type_name =
String::Handle(bool_interface.UserVisibleName());
- const String& expr = String::Handle(Symbols::New("boolean expression"));
const String& no_malformed_type_error = String::Handle();
Exceptions::CreateAndThrowTypeError(location, src_type_name, bool_type_name,
- expr, no_malformed_type_error);
+ Symbols::BooleanExpression(),
+ no_malformed_type_error);
UNREACHABLE();
}
@@ -727,11 +727,11 @@
const Instance& src_value = Instance::CheckedHandle(arguments.ArgAt(0));
const String& dst_name = String::CheckedHandle(arguments.ArgAt(1));
const String& malformed_error = String::CheckedHandle(arguments.ArgAt(2));
- const String& dst_type_name = String::Handle(Symbols::New("malformed"));
const AbstractType& src_type = AbstractType::Handle(src_value.GetType());
const String& src_type_name = String::Handle(src_type.UserVisibleName());
Exceptions::CreateAndThrowTypeError(location, src_type_name,
- dst_type_name, dst_name, malformed_error);
+ Symbols::Malformed(),
+ dst_name, malformed_error);
UNREACHABLE();
}
« no previous file with comments | « vm/class_finalizer.cc ('k') | vm/dart_api_impl.cc » ('j') | vm/symbols.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698