7d5231796e
Obfuscation is controlled by obfuscate flag in Dart_IsolateFlags.
Obfuscation of identifiers is performed during script tokenization - when TokenStream is generated from the source. All kIDENT and kINTERPOL_VAR tokens are renamed consistently using a persistent obfuscation map stored in ObjectStore::obfuscation_map.
Some identifiers (pseudo-keywords, arithmetic operators, builtin recognized methods and entry-points) are not renamed to keep name based lookups from breaking. All other identifiers are renamed.
Constant instances of Symbol-s (both created via literal syntax #ident and using constant constructor const Symbol("ident")) are renamed consistently with corresponding identifiers.
Script urls and Library urls and names are also obfuscated.
Obfuscation map can be dumped as a JSON array at the end of precompilation using Dart_GetObfuscationMap API.
BUG=https://github.com/dart-lang/sdk/issues/30524
R=rmacnak@google.com
Review-Url: https://codereview.chromium.org/3003583002 .
23 lines
855 B
Plaintext
23 lines
855 B
Plaintext
# Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
|
|
# for details. All rights reserved. Use of this source code is governed by a
|
|
# BSD-style license that can be found in the LICENSE file.
|
|
|
|
unsorted/invocation_errors_test: RuntimeError
|
|
|
|
[ $compiler == dart2analyzer && $runtime == none ]
|
|
unsorted/invocation_errors_test: StaticWarning
|
|
unsorted/super_mixin_test: CompileTimeError
|
|
|
|
[ $compiler == dart2analyzer && $builder_tag == strong ]
|
|
*: Skip # Issue 28649
|
|
|
|
[ $compiler == dart2js ]
|
|
unsorted/invocation_errors_test: Pass
|
|
unsorted/nsm_dispatcher_test: Skip # The test uses Symbol without MirrorsUsed
|
|
unsorted/super_initializer_test: Skip
|
|
unsorted/super_mixin_test: CompileTimeError
|
|
unsorted/loop_test: Skip
|
|
|
|
[ $runtime == dart_precompiled && $minified ]
|
|
unsorted/symbol_literal_test: Skip # Expects unobfuscated Symbol.toString.
|