forked from dart-lang/sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[vm] Don't write LibraryPrefix::importer_ in AOT snapshots.
This field won't be used at runtime and is not accounted for during tree-shaking. Bug: dart-lang#41974 Bug: dart-lang#43245 Change-Id: Ie5a669608e896aa8cee74a3a4249ba99ec6f980a Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161220 Reviewed-by: Alexander Markov <alexmarkov@google.com> Commit-Queue: Ryan Macnak <rmacnak@google.com>
- Loading branch information
1 parent
c3298e5
commit c1bb9a5
Showing
7 changed files
with
69 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
tests/language/deferred/prefix_importer_tree_shaken_deferred.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// Copyright (c) 2020, 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. | ||
|
||
@pragma("vm:never-inline") | ||
bar() { | ||
return "bar"; | ||
} |
11 changes: 11 additions & 0 deletions
11
tests/language/deferred/prefix_importer_tree_shaken_immediate.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// Copyright (c) 2020, 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. | ||
|
||
import "prefix_importer_tree_shaken_deferred.dart" deferred as d; | ||
|
||
@pragma("vm:prefer-inline") | ||
load() => d.loadLibrary(); | ||
|
||
@pragma("vm:prefer-inline") | ||
foo() => d.bar(); |
13 changes: 13 additions & 0 deletions
13
tests/language/deferred/prefix_importer_tree_shaken_test.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// Copyright (c) 2020, 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. | ||
|
||
/// VMOptions=--dwarf_stack_traces=true | ||
/// VMOptions=--dwarf_stack_traces=false | ||
import "prefix_importer_tree_shaken_immediate.dart" as i; | ||
|
||
main() async { | ||
await i.load(); | ||
print(await i.foo()); | ||
} |
8 changes: 8 additions & 0 deletions
8
tests/language_2/deferred/prefix_importer_tree_shaken_deferred.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// Copyright (c) 2020, 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. | ||
|
||
@pragma("vm:never-inline") | ||
bar() { | ||
return "bar"; | ||
} |
11 changes: 11 additions & 0 deletions
11
tests/language_2/deferred/prefix_importer_tree_shaken_immediate.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// Copyright (c) 2020, 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. | ||
|
||
import "prefix_importer_tree_shaken_deferred.dart" deferred as d; | ||
|
||
@pragma("vm:prefer-inline") | ||
load() => d.loadLibrary(); | ||
|
||
@pragma("vm:prefer-inline") | ||
foo() => d.bar(); |
13 changes: 13 additions & 0 deletions
13
tests/language_2/deferred/prefix_importer_tree_shaken_test.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// Copyright (c) 2020, 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. | ||
|
||
/// VMOptions=--dwarf_stack_traces=true | ||
/// VMOptions=--dwarf_stack_traces=false | ||
import "prefix_importer_tree_shaken_immediate.dart" as i; | ||
|
||
main() async { | ||
await i.load(); | ||
print(await i.foo()); | ||
} |