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

Unified Diff: runtime/vm/unit_test.cc

Issue 9325047: Add token index position to classes and types for more accurate error reporting. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 8 years, 10 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/scopes_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/unit_test.cc
===================================================================
--- runtime/vm/unit_test.cc (revision 3964)
+++ runtime/vm/unit_test.cc (working copy)
@@ -23,9 +23,6 @@
DECLARE_FLAG(bool, disassemble);
-static const intptr_t kPos = 1; // Dummy token index in non-existing source.
-
-
TestCaseBase* TestCaseBase::first_ = NULL;
TestCaseBase* TestCaseBase::tail_ = NULL;
@@ -125,7 +122,8 @@
CodeGenTest::CodeGenTest(const char* name)
: function_(Function::ZoneHandle()),
- node_sequence_(new SequenceNode(kPos, new LocalScope(NULL, 0, 0))),
+ node_sequence_(new SequenceNode(Scanner::kDummyTokenIndex,
+ new LocalScope(NULL, 0, 0))),
default_parameter_values_(Array::ZoneHandle()) {
ASSERT(name != NULL);
const String& function_name = String::ZoneHandle(String::NewSymbol(name));
@@ -136,7 +134,7 @@
// frame walking can be used.
Class& cls = Class::ZoneHandle();
const Script& script = Script::Handle();
- cls = Class::New(function_name, script);
+ cls = Class::New(function_name, script, Scanner::kDummyTokenIndex);
const Array& functions = Array::Handle(Array::New(1));
functions.SetAt(0, function_);
cls.SetFunctions(functions);
« no previous file with comments | « runtime/vm/scopes_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698