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

Unified Diff: runtime/vm/parser.cc

Issue 1376183002: VM: Replace CheckedHandle with Cast/Handle in some places. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 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 | « runtime/vm/dart_entry.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/parser.cc
diff --git a/runtime/vm/parser.cc b/runtime/vm/parser.cc
index a84b79e70108dcf106403a9c128c3de1881175eb..650ab9ed6643262f68f31e8ed177e843a7e88a3d 100644
--- a/runtime/vm/parser.cc
+++ b/runtime/vm/parser.cc
@@ -11209,7 +11209,8 @@ AstNode* Parser::LoadFieldIfUnresolved(AstNode* node) {
// NoSuchMethodError to be thrown.
// In an instance method, we convert this into a getter call
// for a field (which may be defined in a subclass.)
- String& name = String::CheckedZoneHandle(primary->primary().raw());
+ const String& name =
+ String::Cast(Object::ZoneHandle(primary->primary().raw()));
if (current_function().is_static() ||
current_function().IsInFactoryScope()) {
StaticGetterNode* getter = new(Z) StaticGetterNode(
@@ -11231,7 +11232,7 @@ AstNode* Parser::LoadFieldIfUnresolved(AstNode* node) {
AstNode* Parser::LoadClosure(PrimaryNode* primary) {
ASSERT(primary->primary().IsFunction());
const Function& func =
- Function::CheckedZoneHandle(primary->primary().raw());
+ Function::Cast(Object::ZoneHandle(primary->primary().raw()));
const String& funcname = String::ZoneHandle(Z, func.name());
if (func.is_static()) {
// Static function access.
@@ -11420,8 +11421,8 @@ AstNode* Parser::ParseSelectors(AstNode* primary, bool is_cascade) {
if (primary_node->IsSuper()) {
ReportError(primary_pos, "illegal use of super");
}
- String& name =
- String::CheckedZoneHandle(primary_node->primary().raw());
+ const String& name =
+ String::Cast(Object::ZoneHandle(primary_node->primary().raw()));
if (current_function().is_static()) {
// The static call will be converted to throwing a NSM error.
selector = ParseStaticCall(current_class(), name, primary_pos);
« no previous file with comments | « runtime/vm/dart_entry.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698