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

Unified Diff: runtime/vm/kernel_reader.cc

Issue 2511883002: VM: [Kernel] Relax assertion in Script::GetTokenLocation(). (Closed)
Patch Set: Created 4 years, 1 month 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 | « no previous file | runtime/vm/object.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/kernel_reader.cc
diff --git a/runtime/vm/kernel_reader.cc b/runtime/vm/kernel_reader.cc
index 6c669e4d745470a16444b0acf6f0211d5e6f2fc5..746ed255a101eb335b6ce89a94a7d3f33949ebe1 100644
--- a/runtime/vm/kernel_reader.cc
+++ b/runtime/vm/kernel_reader.cc
@@ -161,9 +161,9 @@ void KernelReader::ReadLibrary(Library* kernel_library) {
// Setup toplevel class (which contains library fields/procedures).
// TODO(27590): Figure out why we need this script stuff here.
kustermann 2016/11/18 09:45:51 We need a valid [Script] for example because the [
Vyacheslav Egorov (Google) 2016/11/18 14:49:46 Done.
- Script& script = Script::Handle(
- Z,
- Script::New(H.DartString(""), H.DartString(""), RawScript::kScriptTag));
+ Script& script =
+ Script::Handle(Z, Script::New(Symbols::KernelScriptUri(),
+ H.DartString(""), RawScript::kScriptTag));
rmacnak 2016/11/17 20:13:31 There's a Symbols::Empty() btw.
Vyacheslav Egorov (Google) 2016/11/18 14:49:46 Done.
script.SetLocationOffset(0, 0);
script.Tokenize(H.DartString("nop() {}"));
dart::Class& toplevel_class = dart::Class::Handle(
@@ -627,9 +627,9 @@ dart::Class& KernelReader::LookupClass(Class* klass) {
// detect test functions some other way (like simply not setting the
// optimizable bit on those functions in the first place).
TokenPosition pos(0);
- Script& script =
- Script::Handle(Z, Script::New(H.DartString(""), H.DartString(""),
- RawScript::kScriptTag));
+ Script& script = Script::Handle(
+ Z, Script::New(Symbols::KernelScriptUri(), H.DartString(""),
+ RawScript::kScriptTag));
handle =
&dart::Class::Handle(Z, dart::Class::New(library, name, script, pos));
library.AddClass(*handle);
@@ -637,9 +637,9 @@ dart::Class& KernelReader::LookupClass(Class* klass) {
// When bootstrapping we can encounter classes that do not yet have a
// dummy script.
TokenPosition pos(0);
- Script& script =
- Script::Handle(Z, Script::New(H.DartString(""), H.DartString(""),
- RawScript::kScriptTag));
+ Script& script = Script::Handle(
+ Z, Script::New(Symbols::KernelScriptUri(), H.DartString(""),
+ RawScript::kScriptTag));
handle->set_script(script);
}
// Insert the class in the cache before calling ReadPreliminaryClass so
« no previous file with comments | « no previous file | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698