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

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

Issue 1294113004: VM: Link native calls lazily. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: addressed comments 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
« no previous file with comments | « runtime/vm/native_entry.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 27 matching lines...) Expand all
38 namespace dart { 38 namespace dart {
39 39
40 DEFINE_FLAG(bool, enable_debug_break, false, "Allow use of break \"message\"."); 40 DEFINE_FLAG(bool, enable_debug_break, false, "Allow use of break \"message\".");
41 DEFINE_FLAG(bool, enable_mirrors, true, 41 DEFINE_FLAG(bool, enable_mirrors, true,
42 "Disable to make importing dart:mirrors an error."); 42 "Disable to make importing dart:mirrors an error.");
43 DEFINE_FLAG(bool, load_deferred_eagerly, false, 43 DEFINE_FLAG(bool, load_deferred_eagerly, false,
44 "Load deferred libraries eagerly."); 44 "Load deferred libraries eagerly.");
45 DEFINE_FLAG(bool, trace_parser, false, "Trace parser operations."); 45 DEFINE_FLAG(bool, trace_parser, false, "Trace parser operations.");
46 DEFINE_FLAG(bool, supermixin, false, "Allow super calls in mixins."); 46 DEFINE_FLAG(bool, supermixin, false, "Allow super calls in mixins.");
47 DEFINE_FLAG(bool, warn_mixin_typedef, true, "Warning on legacy mixin typedef."); 47 DEFINE_FLAG(bool, warn_mixin_typedef, true, "Warning on legacy mixin typedef.");
48 DEFINE_FLAG(bool, link_natives_lazily, false, "Link native calls lazily");
48 49
49 DECLARE_FLAG(bool, lazy_dispatchers); 50 DECLARE_FLAG(bool, lazy_dispatchers);
50 DECLARE_FLAG(bool, load_deferred_eagerly); 51 DECLARE_FLAG(bool, load_deferred_eagerly);
51 DECLARE_FLAG(bool, profile_vm); 52 DECLARE_FLAG(bool, profile_vm);
52 DECLARE_FLAG(bool, throw_on_javascript_int_overflow); 53 DECLARE_FLAG(bool, throw_on_javascript_int_overflow);
53 DECLARE_FLAG(bool, warn_on_javascript_compatibility); 54 DECLARE_FLAG(bool, warn_on_javascript_compatibility);
54 55
55 // Quick access to the current thread, isolate and zone. 56 // Quick access to the current thread, isolate and zone.
56 #define T (thread()) 57 #define T (thread())
57 #define I (isolate()) 58 #define I (isolate())
(...skipping 7268 matching lines...) Expand 10 before | Expand all | Expand 10 after
7326 Dart_NativeEntryResolver resolver = library.native_entry_resolver(); 7327 Dart_NativeEntryResolver resolver = library.native_entry_resolver();
7327 bool is_bootstrap_native = Bootstrap::IsBootstapResolver(resolver); 7328 bool is_bootstrap_native = Bootstrap::IsBootstapResolver(resolver);
7328 current_block_->statements->Add(new(Z) ReturnNode( 7329 current_block_->statements->Add(new(Z) ReturnNode(
7329 TokenPos(), 7330 TokenPos(),
7330 new(Z) NativeBodyNode( 7331 new(Z) NativeBodyNode(
7331 TokenPos(), 7332 TokenPos(),
7332 Function::ZoneHandle(Z, func.raw()), 7333 Function::ZoneHandle(Z, func.raw()),
7333 native_name, 7334 native_name,
7334 native_function, 7335 native_function,
7335 current_block_->scope, 7336 current_block_->scope,
7336 is_bootstrap_native))); 7337 is_bootstrap_native,
7338 FLAG_link_natives_lazily)));
7337 } 7339 }
7338 7340
7339 7341
7340 LocalVariable* Parser::LookupReceiver(LocalScope* from_scope, bool test_only) { 7342 LocalVariable* Parser::LookupReceiver(LocalScope* from_scope, bool test_only) {
7341 ASSERT(!current_function().is_static()); 7343 ASSERT(!current_function().is_static());
7342 return from_scope->LookupVariable(Symbols::This(), test_only); 7344 return from_scope->LookupVariable(Symbols::This(), test_only);
7343 } 7345 }
7344 7346
7345 7347
7346 LocalVariable* Parser::LookupTypeArgumentsParameter(LocalScope* from_scope, 7348 LocalVariable* Parser::LookupTypeArgumentsParameter(LocalScope* from_scope,
(...skipping 6838 matching lines...) Expand 10 before | Expand all | Expand 10 after
14185 void Parser::SkipQualIdent() { 14187 void Parser::SkipQualIdent() {
14186 ASSERT(IsIdentifier()); 14188 ASSERT(IsIdentifier());
14187 ConsumeToken(); 14189 ConsumeToken();
14188 if (CurrentToken() == Token::kPERIOD) { 14190 if (CurrentToken() == Token::kPERIOD) {
14189 ConsumeToken(); // Consume the kPERIOD token. 14191 ConsumeToken(); // Consume the kPERIOD token.
14190 ExpectIdentifier("identifier expected after '.'"); 14192 ExpectIdentifier("identifier expected after '.'");
14191 } 14193 }
14192 } 14194 }
14193 14195
14194 } // namespace dart 14196 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/native_entry.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698