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

Issue 968163002: Move the dart_precompiled function inside scoping function. (Closed)

Created:
5 years, 9 months ago by sigurdm
Modified:
5 years, 9 months ago
Reviewers:
floitsch
CC:
reviews_dartlang.org
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Move the dart_precompiled function inside scoping function. Also make it a property of init. This is also done for deferred hunks, allowing deferred loading to work in CSP mode. Long term I would like the precompiled function to go away, and move the generated functions into the library-initializer when they are needed. BUG=16898 R=floitsch@google.com Committed: https://code.google.com/p/dart/source/detail?r=44162

Patch Set 1 #

Patch Set 2 : Added test case #

Patch Set 3 : Update status file #

Patch Set 4 : Whitespace #

Total comments: 4

Patch Set 5 : Use embedded globals #

Unified diffs Side-by-side diffs Delta from patch set Stats (+81 lines, -43 lines) Patch
M pkg/compiler/lib/src/js_emitter/old_emitter/emitter.dart View 1 2 3 4 5 chunks +37 lines, -30 lines 0 comments Download
M pkg/compiler/lib/src/js_emitter/old_emitter/reflection_data_parser.dart View 1 2 3 4 2 chunks +4 lines, -2 lines 0 comments Download
M sdk/lib/_internal/compiler/js_lib/shared/embedded_names.dart View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
A + tests/language/deferred_shared_and_unshared_classes_lib1.dart View 1 1 chunk +4 lines, -1 line 0 comments Download
A + tests/language/deferred_shared_and_unshared_classes_lib2.dart View 1 1 chunk +5 lines, -2 lines 0 comments Download
A + tests/language/deferred_shared_and_unshared_classes_lib_shared.dart View 1 1 chunk +9 lines, -5 lines 0 comments Download
A tests/language/deferred_shared_and_unshared_classes_test.dart View 1 1 chunk +21 lines, -0 lines 0 comments Download
M tests/language/language_dart2js.status View 1 2 1 chunk +0 lines, -3 lines 0 comments Download

Messages

Total messages: 5 (1 generated)
sigurdm
5 years, 9 months ago (2015-03-02 10:00:51 UTC) #2
floitsch
LGTM. https://codereview.chromium.org/968163002/diff/50001/pkg/compiler/lib/src/js_emitter/old_emitter/emitter.dart File pkg/compiler/lib/src/js_emitter/old_emitter/emitter.dart (right): https://codereview.chromium.org/968163002/diff/50001/pkg/compiler/lib/src/js_emitter/old_emitter/emitter.dart#newcode731 pkg/compiler/lib/src/js_emitter/old_emitter/emitter.dart:731: $initName.${precompiledName} = function (\$collectedClasses) { Use an "embedded" ...
5 years, 9 months ago (2015-03-02 14:33:13 UTC) #3
sigurdm
Committed patchset #5 (id:70001) manually as 44162 (presubmit successful).
5 years, 9 months ago (2015-03-03 09:31:43 UTC) #4
sigurdm
5 years, 9 months ago (2015-03-03 09:33:50 UTC) #5
Message was sent while issue was closed.
https://codereview.chromium.org/968163002/diff/50001/pkg/compiler/lib/src/js_...
File pkg/compiler/lib/src/js_emitter/old_emitter/emitter.dart (right):

https://codereview.chromium.org/968163002/diff/50001/pkg/compiler/lib/src/js_...
pkg/compiler/lib/src/js_emitter/old_emitter/emitter.dart:731:
$initName.${precompiledName} = function (\$collectedClasses) {
On 2015/03/02 14:33:13, floitsch wrote:
> Use an "embedded" global instead of "init".
> If you copied this pattern from somewhere consider it changing there too.

Done.

https://codereview.chromium.org/968163002/diff/50001/pkg/compiler/lib/src/js_...
File pkg/compiler/lib/src/js_emitter/old_emitter/reflection_data_parser.dart
(right):

https://codereview.chromium.org/968163002/diff/50001/pkg/compiler/lib/src/js_...
pkg/compiler/lib/src/js_emitter/old_emitter/reflection_data_parser.dart:378: var
constructors = ${oldEmitter.initName}
On 2015/03/02 14:33:13, floitsch wrote:
> use embedded-global access.
> (again: if you saw this pattern somewhere else, consider changing it there
too).

Done.

Powered by Google App Engine
This is Rietveld 408576698