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

Side by Side Diff: runtime/vm/parser.cc

Issue 1259123009: Initial tree-shaking for precompilation: only selective compilation, no removal of unused Functions… (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: sync + more dart:io roots Created 5 years, 4 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/parser.h" 5 #include "vm/parser.h"
6 6
7 #include "lib/invocation_mirror.h" 7 #include "lib/invocation_mirror.h"
8 #include "platform/utils.h" 8 #include "platform/utils.h"
9 #include "vm/ast_transformer.h" 9 #include "vm/ast_transformer.h"
10 #include "vm/bootstrap.h" 10 #include "vm/bootstrap.h"
(...skipping 5811 matching lines...) Expand 10 before | Expand all | Expand 10 after
5822 library_prefix = library_.LookupLocalLibraryPrefix(prefix); 5822 library_prefix = library_.LookupLocalLibraryPrefix(prefix);
5823 if (!library_prefix.IsNull()) { 5823 if (!library_prefix.IsNull()) {
5824 // Check that prefix names of deferred import clauses are 5824 // Check that prefix names of deferred import clauses are
5825 // unique. 5825 // unique.
5826 if (!is_deferred_import && library_prefix.is_deferred_load()) { 5826 if (!is_deferred_import && library_prefix.is_deferred_load()) {
5827 ReportError(prefix_pos, 5827 ReportError(prefix_pos,
5828 "prefix '%s' already used in a deferred import clause", 5828 "prefix '%s' already used in a deferred import clause",
5829 prefix.ToCString()); 5829 prefix.ToCString());
5830 } 5830 }
5831 if (is_deferred_import) { 5831 if (is_deferred_import) {
5832 ReportError(prefix_pos, "prefix of deferred import must be uniqe"); 5832 ReportError(prefix_pos, "prefix of deferred import must be unique");
5833 } 5833 }
5834 library_prefix.AddImport(ns); 5834 library_prefix.AddImport(ns);
5835 } else { 5835 } else {
5836 library_prefix = 5836 library_prefix =
5837 LibraryPrefix::New(prefix, ns, is_deferred_import, library_); 5837 LibraryPrefix::New(prefix, ns, is_deferred_import, library_);
5838 library_.AddObject(library_prefix, prefix); 5838 library_.AddObject(library_prefix, prefix);
5839 } 5839 }
5840 } 5840 }
5841 } else { 5841 } else {
5842 ASSERT(is_export); 5842 ASSERT(is_export);
(...skipping 7973 matching lines...) Expand 10 before | Expand all | Expand 10 after
13816 void Parser::SkipQualIdent() { 13816 void Parser::SkipQualIdent() {
13817 ASSERT(IsIdentifier()); 13817 ASSERT(IsIdentifier());
13818 ConsumeToken(); 13818 ConsumeToken();
13819 if (CurrentToken() == Token::kPERIOD) { 13819 if (CurrentToken() == Token::kPERIOD) {
13820 ConsumeToken(); // Consume the kPERIOD token. 13820 ConsumeToken(); // Consume the kPERIOD token.
13821 ExpectIdentifier("identifier expected after '.'"); 13821 ExpectIdentifier("identifier expected after '.'");
13822 } 13822 }
13823 } 13823 }
13824 13824
13825 } // namespace dart 13825 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/precompiler.h » ('j') | runtime/vm/precompiler.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698