Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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, true, "Link native calls lazily"); | |
|
rmacnak
2015/08/20 23:48:06
enable in the precompile flag handler
Florian Schneider
2015/08/21 07:58:17
Done.
We should look into how to test the precomp
| |
| 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 isolate and zone. | 56 // Quick access to the current isolate and zone. |
| 56 #define I (isolate()) | 57 #define I (isolate()) |
| 57 #define Z (zone()) | 58 #define Z (zone()) |
| (...skipping 7273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 7331 Dart_NativeEntryResolver resolver = library.native_entry_resolver(); | 7332 Dart_NativeEntryResolver resolver = library.native_entry_resolver(); |
| 7332 bool is_bootstrap_native = Bootstrap::IsBootstapResolver(resolver); | 7333 bool is_bootstrap_native = Bootstrap::IsBootstapResolver(resolver); |
| 7333 current_block_->statements->Add(new(Z) ReturnNode( | 7334 current_block_->statements->Add(new(Z) ReturnNode( |
| 7334 TokenPos(), | 7335 TokenPos(), |
| 7335 new(Z) NativeBodyNode( | 7336 new(Z) NativeBodyNode( |
| 7336 TokenPos(), | 7337 TokenPos(), |
| 7337 Function::ZoneHandle(Z, func.raw()), | 7338 Function::ZoneHandle(Z, func.raw()), |
| 7338 native_name, | 7339 native_name, |
| 7339 native_function, | 7340 native_function, |
| 7340 current_block_->scope, | 7341 current_block_->scope, |
| 7341 is_bootstrap_native))); | 7342 is_bootstrap_native, |
| 7343 FLAG_link_natives_lazily))); | |
| 7342 } | 7344 } |
| 7343 | 7345 |
| 7344 | 7346 |
| 7345 LocalVariable* Parser::LookupReceiver(LocalScope* from_scope, bool test_only) { | 7347 LocalVariable* Parser::LookupReceiver(LocalScope* from_scope, bool test_only) { |
| 7346 ASSERT(!current_function().is_static()); | 7348 ASSERT(!current_function().is_static()); |
| 7347 return from_scope->LookupVariable(Symbols::This(), test_only); | 7349 return from_scope->LookupVariable(Symbols::This(), test_only); |
| 7348 } | 7350 } |
| 7349 | 7351 |
| 7350 | 7352 |
| 7351 LocalVariable* Parser::LookupTypeArgumentsParameter(LocalScope* from_scope, | 7353 LocalVariable* Parser::LookupTypeArgumentsParameter(LocalScope* from_scope, |
| (...skipping 6835 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 14187 void Parser::SkipQualIdent() { | 14189 void Parser::SkipQualIdent() { |
| 14188 ASSERT(IsIdentifier()); | 14190 ASSERT(IsIdentifier()); |
| 14189 ConsumeToken(); | 14191 ConsumeToken(); |
| 14190 if (CurrentToken() == Token::kPERIOD) { | 14192 if (CurrentToken() == Token::kPERIOD) { |
| 14191 ConsumeToken(); // Consume the kPERIOD token. | 14193 ConsumeToken(); // Consume the kPERIOD token. |
| 14192 ExpectIdentifier("identifier expected after '.'"); | 14194 ExpectIdentifier("identifier expected after '.'"); |
| 14193 } | 14195 } |
| 14194 } | 14196 } |
| 14195 | 14197 |
| 14196 } // namespace dart | 14198 } // namespace dart |
| OLD | NEW |