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

Unified Diff: runtime/vm/parser.cc

Issue 25284003: Fix expression evaluation in library context (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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/debugger_api_impl_test.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
===================================================================
--- runtime/vm/parser.cc (revision 28060)
+++ runtime/vm/parser.cc (working copy)
@@ -308,7 +308,7 @@
}
-void Parser::SetScript(const Script & script, intptr_t token_pos) {
+void Parser::SetScript(const Script& script, intptr_t token_pos) {
script_ = script.raw();
tokens_iterator_.SetStream(TokenStream::Handle(script.tokens()), token_pos);
token_kind_ = Token::kILLEGAL;
@@ -3123,7 +3123,7 @@
// Replace the type with a malformed type and compile a throw when called.
redirection_type = ClassFinalizer::NewFinalizedMalformedType(
Error::Handle(), // No previous error.
- current_class(),
+ script_,
type_pos,
"factory '%s' may not redirect to type parameter '%s'",
method->name->ToCString(),
@@ -8536,7 +8536,7 @@
FLAG_error_on_bad_type) {
*type = ClassFinalizer::NewFinalizedMalformedType(
Error::Handle(), // No previous error.
- scope_class,
+ script_,
type->token_pos(),
"type parameter '%s' cannot be referenced "
"from static member",
@@ -8554,7 +8554,7 @@
FLAG_error_on_bad_type) {
*type = ClassFinalizer::NewFinalizedMalformedType(
Error::Handle(), // No previous error.
- scope_class,
+ script_,
type_parameter.token_pos(),
"type parameter '%s' cannot be parameterized",
String::Handle(type_parameter.name()).ToCString());
@@ -8592,7 +8592,7 @@
FLAG_error_on_bad_type) {
ClassFinalizer::FinalizeMalformedType(
Error::Handle(), // No previous error.
- scope_class,
+ script_,
parameterized_type,
"type '%s' is not loaded",
String::Handle(parameterized_type.UserVisibleName()).ToCString());
@@ -9187,7 +9187,7 @@
if (finalization == ClassFinalizer::kCanonicalizeWellFormed) {
return ClassFinalizer::NewFinalizedMalformedType(
Error::Handle(), // No previous error.
- current_class(),
+ script_,
type_name.ident_pos,
"using '%s' in this context is invalid",
type_name.ident->ToCString());
@@ -9750,7 +9750,7 @@
// Replace the type with a malformed type.
type = ClassFinalizer::NewFinalizedMalformedType(
Error::Handle(), // No previous error.
- current_class(),
+ script_,
type_pos,
"%s'%s' cannot be instantiated",
type.IsTypeParameter() ? "type parameter " : "",
@@ -9762,7 +9762,7 @@
// Replace the type with a malformed type.
type = ClassFinalizer::NewFinalizedMalformedType(
bound_error,
- current_class(),
+ script_,
type_pos,
"malbounded type '%s' cannot be instantiated",
String::Handle(type.UserVisibleName()).ToCString());
@@ -9827,7 +9827,7 @@
if (is_const) {
type = ClassFinalizer::NewFinalizedMalformedType(
Error::Handle(), // No previous error.
- current_class(),
+ script_,
call_pos,
"class '%s' has no constructor or factory named '%s'",
String::Handle(type_class.Name()).ToCString(),
@@ -9953,7 +9953,7 @@
&malformed_error)) {
type_bound = ClassFinalizer::NewFinalizedMalformedType(
malformed_error,
- current_class(),
+ script_,
new_pos,
"const factory result is not an instance of '%s'",
String::Handle(type_bound.UserVisibleName()).ToCString());
« no previous file with comments | « runtime/vm/debugger_api_impl_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698