Moves: test/sdk --> tool/input_sdk_src
Also moves: test/sdk/lib/_internal/js_lib --> tool/input_sdk_patch
we'll eventually need to customize that code
Adds tool/patch_sdk.dart, an offline transformation step that produces: test/generated_sdk
Essentially this merges the "external" declarations and the @patch syntactically. There's a comment in tool/patch_sdk.dart explaining the rationale behind this approach.
There's still *lots* to do in the generated code. This does none of that. The only new code is tool/patch_sdk.dart and the minimum changes to test/codegen_test.dart and js_codegen.dart to get test.sh running and debuggable.
Tracking bug for SDK is https://github.com/dart-lang/dart-dev-compiler/issues/58R=sigmund@google.com, vsm@google.com
Review URL: https://chromereviews.googleplex.com/157137013
Import/export directives are preserved, and new ones are generated using package syntax using Vijay's logic. This is not yet robust for relative URIs, but is sufficient for our purposes.
Wrapper hoisting is disabled, and various wrapper generation bugs are fixed.
Type name qualification is done more selectively, and more correctly.
Casting is disabled in const contexts, with a severe warning.
Coercions and wrappers now both call into the dart logging runtime, and pass various useful information (currently mostly ignored).
This also adds some preliminary dart codegen tests, and hence includes a number of expected output files in the test/dart_codegen/expect directory.
BUG=
R=jmesserly@google.com, vsm@google.com
Review URL: https://chromereviews.googleplex.com/141427014