Commit Graph

204 Commits

Author SHA1 Message Date
Brian Wilkerson 723f8bca05 Convert parseMetadataStar and partially convert parseMetadata
Change-Id: I546206f1b7de042827a519f4ac9c721b98a3038e
Reviewed-on: https://dart-review.googlesource.com/19020
Reviewed-by: Dan Rubel <danrubel@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2017-11-07 16:14:50 +00:00
Dan Rubel 599bbd4269 Cleanup AnalyzerDietListener buildFields
Change-Id: Ifb29a2ca1fa2ee6eb0adffbcd2896ffeea7083ba
Reviewed-on: https://dart-review.googlesource.com/18901
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2017-11-07 02:42:59 +00:00
Paul Berry 9ac19f0122 Pass --strong to vm when running front_end testcases in strong mode.
Also, stop passing "Hello, World!" as a command line argument when
executing front_end testcases.

Change-Id: I7c3ec6a301537a84bd14e232b5a0d6b8a7bd1914
Reviewed-on: https://dart-review.googlesource.com/18503
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2017-11-03 18:28:51 +00:00
Dan Rubel 15a0abf956 Fix OutlineBuilder native class and AnalyzerDietListener tests
Update the OutlineBuilder and AstBuilder to fix native handling,
and in the process, fix several AnalyzerDietListener tests.

Fix https://github.com/dart-lang/sdk/issues/30836

Change-Id: I7e3b6c4c7d241f1325a5fce1e117e277c6166e49
Reviewed-on: https://dart-review.googlesource.com/18500
Reviewed-by: Paul Berry <paulberry@google.com>
2017-11-03 17:16:51 +00:00
Dan Rubel e781b33c83 move Analyzer test classes out of lib
This moves several classes used only for testing purposes
out of the analyzer/lib directory tree and
into front_end/test/fasta/testing where they are used.

Change-Id: I294b20710de4b16e27fbea5d13be316a6ecda112
Reviewed-on: https://dart-review.googlesource.com/18200
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2017-11-02 16:02:58 +00:00
Paul Berry f382f3980c Run kernel type checker during front end strong mode unit tests.
This should help make sure that the front end is inserting all of the
necessary implicit downcasts.

The type checker is run after comparing to golden files, and before
running the test in the VM.  So if a test case fails to match its
golden file, the test's status will be "Fail" regardless of whether it
type checks.  If the test case matches its golden file but fails to
type chek, the test's status will be "TypeCheckError".  Rationale: the
type checker is still under development; if it has bugs leading to
false failures, we don't want that to get in the way of comparing
against golden files.

Change-Id: I6764aa5c7f2aab92a10edfa41afcdb056946530b
Reviewed-on: https://dart-review.googlesource.com/17522
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
2017-10-31 21:25:45 +00:00
Sigmund Cherem 5efdb5f346 Allow to specify the platform-binaries as an environment option in our unit
tests.

Bug: https://github.com/dart-lang/sdk/issues/31178
Change-Id: Ia845287c101020792b382c2ae401eda2a9ad4508
Reviewed-on: https://dart-review.googlesource.com/15766
Reviewed-by: Peter von der Ahé <ahe@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2017-10-24 16:32:28 +00:00
Aske Simon Christensen 60be83aed4 Reland "Suite for Fasta crashes and verification errors in language tests"
Remove obsolete "language" suite.

Original review: https://dart-review.googlesource.com/13741

Change-Id: I713fa2684fe478f6e9123d33ee7b7d2a961b1c00
Reviewed-on: https://dart-review.googlesource.com/14460
Reviewed-by: Peter von der Ahé <ahe@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
2017-10-17 13:54:40 +00:00
Peter von der Ahé b96ac4520a Update most clients to use computePlatformBinariesLocation.
Change-Id: I6e6960c471b2fab3f0cd8a672da05d7699217410
Reviewed-on: https://dart-review.googlesource.com/12291
Commit-Queue: Peter von der Ahé <ahe@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2017-10-17 10:48:40 +00:00
Martin Kustermann 25dc42f5d8 Revert "Error on setter having not exactly one parameter"
This reverts commit 4bb83e9311
This reverts commit f1b07b2789.

Reason for revert on analyzer bots:

    Analyzing pkg/analyzer...
      error • Undefined name 'source' at pkg/analyzer/test/generated/compile_time_error_code_kernel_test.dart:625:9 • undefined_identifier
      error • Undefined name 'CompileTimeErrorCode' at pkg/analyzer/test/generated/compile_time_error_code_kernel_test.dart:625:18 • undefined_identifier
      error • Undefined name 'source' at pkg/analyzer/test/generated/compile_time_error_code_kernel_test.dart:626:13 • undefined_identifier
      error • Undefined name 'source' at pkg/analyzer/test/generated/compile_time_error_code_kernel_test.dart:635:9 • undefined_identifier
      error • Undefined name 'CompileTimeErrorCode' at pkg/analyzer/test/generated/compile_time_error_code_kernel_test.dart:635:18 • undefined_identifier
      error • Undefined name 'source' at pkg/analyzer/test/generated/compile_time_error_code_kernel_test.dart:636:13 • undefined_identifier
      error • Undefined name 'source' at pkg/analyzer/test/generated/compile_time_error_code_kernel_test.dart:645:9 • undefined_identifier
      error • Undefined name 'CompileTimeErrorCode' at pkg/analyzer/test/generated/compile_time_error_code_kernel_test.dart:645:18 • undefined_identifier
      error • Undefined name 'source' at pkg/analyzer/test/generated/compile_time_error_code_kernel_test.dart:646:13 • undefined_identifier
      error • Undefined name 'source' at pkg/analyzer/test/generated/compile_time_error_code_kernel_test.dart:655:9 • undefined_identifier
      error • Undefined name 'CompileTimeErrorCode' at pkg/analyzer/test/generated/compile_time_error_code_kernel_test.dart:655:18 • undefined_identifier
      error • Undefined name 'source' at pkg/analyzer/test/generated/compile_time_error_code_kernel_test.dart:656:13 • undefined_identifier
    12 errors found.

Change-Id: Ie2035bf40e50c48f85b514c7a3786141cd0f2453
Reviewed-on: https://dart-review.googlesource.com/14061
Reviewed-by: Martin Kustermann <kustermann@google.com>
2017-10-16 16:32:13 +00:00
Aske Simon Christensen 4bb83e9311 Suite for Fasta crashes and verification errors in language tests
Remove obsolete "language" suite.

Change-Id: I8daad8b7fd2d6e19124850626a5815aa9dcca347
Reviewed-on: https://dart-review.googlesource.com/13741
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
2017-10-16 16:01:55 +00:00
Sigmund Cherem 80e7d3b35f Build a strong version of outline.dll, and use it for front end strong mode tests.
(rebases CL 11366 after Peter's changes)

Change-Id: If9f3d331fb953a9890fa7952bd472cc39f541e84
Reviewed-on: https://dart-review.googlesource.com/11965
Reviewed-by: Paul Berry <paulberry@google.com>
2017-10-06 20:12:59 +00:00
Peter von der Ahé 16aa720d27 Remove compiling platform.dill from patch_sdk.dart
This separates compiling platform.dill files from the patch_sdk.dart
script. The motivation for that is that I'm working on reading patch
files directly from Fasta, so we can completely remove the build step
for generating patched_sdk and dart2js_patched_sdk.

Short-term this should allow Paul to add a strong-mode version of
platform.dill without causing to many conflicts with my work on
patches.

Change-Id: I1150845b2986348d4fffe27092701d8a9b57ea54
Reviewed-on: https://dart-review.googlesource.com/11506
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2017-10-06 15:34:37 +00:00
Alexander Markov 9ee73fe322 [Kernel] Remove outdated and duplicated front-end Targets
This CL replaces outdated VmTarget and FlutterTarget with VmFastaTarget
and FlutterFastaTarget. 'Fasta' suffix is droped from target names.

The new FlutterTarget extends VmTarget, so they share more code.

Change-Id: Id79956698a889c9a49b8a67914f1f96a731407ab
Reviewed-on: https://dart-review.googlesource.com/9423
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2017-10-04 18:02:49 +00:00
Kevin Millikin 785ae4a9e0 [Kernel] when transferring libraries, keep their canonical names
Before: ownership of some or all of the libraries from one Kernel
program (P1) would be transferred to another program (P2).  All the
canonical names in P1 would be unbound from their references and the
canonical names would eventually be recreated for the libraries that
were transferred.

After: when ownership of a library is transferred, the ownership of
the canonical name subtree rooted at the library's name is also
transferred.  This allows the 1:1 relationship between Canonicalname
and Reference to be maintained which will enable lazy deserialization
of procedure bodies (because the mapping from CanonicalNames to
References in the corresponding link table will be persistent).
Change-Id: I98f975d6ba5804f975c30528a484756b39f09d2a
Reviewed-on: https://dart-review.googlesource.com/7549
Commit-Queue: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2017-09-22 08:19:27 +00:00
Peter von der Ahé a5bcf58b06 Move tools to tool folder.
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/3003743002 .
2017-08-29 14:30:51 +02:00
Sigmund Cherem b48584d3d0 Switch FE to use the libraries.json format.
This CL:
  * introduces the Dart API to operate over libraries specifications and describes
    the format we intend to use (see libraries_spec.dart)

  * implements serialization/deserialization for this API

  * switches over the front_end to use these APIs
    * public options accept a URI to the JSON file and no longer
       accept a `dartLibraries` map
    * internal code uses the LibrariesSpecification API

  * switches other dependencies on these APIs (resynthesizer_test and patch_sdk.dart)

This is the first step in migrating over to use the libraries.json format and
eventually remove the patched_sdk step. In particular, some of the next steps
include:
  * add a build step to generate .json files from .yaml files
  * add a libraries.yaml file for the sdk
  * split the patched_sdk step in two:
     * patching files
     * generating .dill files
  * add any missing support for patch-files in fasta
  * finally remove the patching files step, and only have a build step for generating
   .dill files

BUG=
R=ahe@google.com, paulberry@google.com, scheglov@google.com

Committed: https://github.com/dart-lang/sdk/commit/abf2d23af2315fae6dc688741147ef677ec34835
Review-Url: https://codereview.chromium.org/2986303003 .
2017-08-07 08:41:28 -07:00
Sigmund Cherem b6d08264a3 Revert "Switch FE to use the libraries.json format."
This reverts commit abf2d23af2.

Reason for revert:
 - win build failed in patched_sdk (likely storing paths and not uris)
 - dart2js bots failed (missing flag)

Will fix the issues and reland shortly.

Review-Url: https://codereview.chromium.org/2993113003 .
2017-08-04 19:46:17 -07:00
Sigmund Cherem abf2d23af2 Switch FE to use the libraries.json format.
This CL:
  * introduces the Dart API to operate over libraries specifications and describes
    the format we intend to use (see libraries_spec.dart)

  * implements serialization/deserialization for this API

  * switches over the front_end to use these APIs
    * public options accept a URI to the JSON file and no longer
       accept a `dartLibraries` map
    * internal code uses the LibrariesSpecification API

  * switches other dependencies on these APIs (resynthesizer_test and patch_sdk.dart)

This is the first step in migrating over to use the libraries.json format and
eventually remove the patched_sdk step. In particular, some of the next steps
include:
  * add a build step to generate .json files from .yaml files
  * add a libraries.yaml file for the sdk
  * split the patched_sdk step in two:
     * patching files
     * generating .dill files
  * add any missing support for patch-files in fasta
  * finally remove the patching files step, and only have a build step for generating
   .dill files

BUG=
R=ahe@google.com, paulberry@google.com, scheglov@google.com

Review-Url: https://codereview.chromium.org/2986303003 .
2017-08-04 17:41:27 -07:00
Sigmund Cherem 1aa139bc94 Unifying compiler context
Changes in this CL:
 - Updated CompilerContext:
    - it now contains a ProcessedOptions object

    - it no longer depends on CompilerCommandLine/CommandLine

    - it delegates to ProcessedOptions.report so all error reporting
      goes to one single place.

    - use "withContext" term instead of "withGlobalOptions" to be
      more clear about the intent

 - Changes in public API
    - added more options that correspond to flags in command-line
      fasta tools

    - default onError is different: we now use the
      command_line_reporting report, which prints and throws
      on fatal messages, but doesn't throw eagerly on all messages
      as before.

    - introduced "printMessages" option: make it easy to have
      both onError + command_line_reporting  (kernel-service.dart
      is the main use case at this time, other ideas welcome!)

    - renamed CompilationError to CompilationMessage

 - Other changes

    - set exit code is done on report, not on format
    - fixed corner cases not covered in previous CL
        - error reporting with missing-main needs to happen with
          a context
        - missing error cases when inferring .packages and input
          URIs are not file:* URIs

Ideas for follow up after this CL:
 - combine ProcessedOptions and CompilerContext into a single class
   (or extend one from the other)
 - switch onError to a stream

R=ahe@google.com

Review-Url: https://codereview.chromium.org/2982093003 .
2017-07-18 17:02:59 -07:00
Sigmund Cherem 8ecb50d0de Throw if there is no compiler context available
BUG=
R=ahe@google.com

Review-Url: https://codereview.chromium.org/2980033004 .
2017-07-17 13:16:18 -07:00
Konstantin Shcheglov a9fbe224bc Add documentationComment for Class to Kernel. Parse it. Resynthesize in Analyzer.
R=ahe@google.com, kmillikin@google.com, paulberry@google.com, sigmund@google.com
BUG=

Review-Url: https://codereview.chromium.org/2977133002 .
2017-07-15 09:53:48 -07:00
Paul Berry 04ad043f49 Remove code associated with the old "kompile" functionality.
This code is no longer needed because we no longer run the front end
in "kompile" mode.

Also remove the old expectations files used by the "kompile" tests.

I will remove more code in future CLs.

R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2980883003 .
2017-07-13 12:18:44 -07:00
Paul Berry b87556e00d Start copying resolution/inference data from front end to analyzer ASTs.
This CL lays the groundwork for integrating the front end with
analyzer by creating a mechanism to copy resolution and type inference
information (produced by the front end's type inference engine) into
analyzer ASTs (produced by AstBuilder).

The general technique is to parse each function twice: once with
BodyBuilder as a listener and once with AstBuilder as a listener.  The
BodyBuilder generates a kernel representation of the function, but
this isn't used; instead, type inference and resolution information is
captured using ResolutionStorer (which is a TypeInferenceListener).
Later, this information is applied to the analyzer AST generated by
AstBuilder using ResolutionApplier (which is an analyzer AST visitor).

At the moment the intermediate data exchanged between ResolutionStorer
and ResolutionApplier is simply a list of types (one for each
subexpression, in a post-order traversal of the program syntax).  For
debugging and validation purposes, this is augmented with a list of
file offsets, so that if the ResolutionStorer and ResolutionApplier
get out of sync we can diagnose the problem easily.

In later CLs, more data will need to be exchanged between
ResolutionStorer and ResolutionApplier (e.g. a list of elements to
which identifiers are resolved).

This CL doesn't tackle the problem of translating between the kernel
and analyzer representation of types; for now we simply map each type
to `dynamic`.  This is sufficient for early development, since it is
still enough to let us verify that ResolutionStorer and
ResolutionApplier stay in sync.

R=ahe@google.com, scheglov@google.com

Review-Url: https://codereview.chromium.org/2981693002 .
2017-07-13 08:55:29 -07:00
Konstantin Shcheglov b985f3c000 Rename TranslateUri to UriTranslator, rename files, extract Impl.
R=ahe@google.com, paulberry@google.com, sigmund@google.com
BUG=

Review-Url: https://codereview.chromium.org/2982593002 .
2017-07-12 11:56:14 -07:00
Konstantin Shcheglov cb3a79f883 Refactorings for TranslateUri and its tests.
R=ahe@google.com, paulberry@google.com, sigmund@google.com
BUG=

Review-Url: https://codereview.chromium.org/2977703002 .
2017-07-12 09:22:17 -07:00
Peter von der Ahé 9236a3445e Deprecate all diagnostics methods that use strings.
See #30080.

R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2970273004 .
2017-07-10 11:23:09 +02:00
Sigmund Cherem b71bd543a9 Reapply "Tweak public APIs and use them in patch_sdk, dart2js, and kernel-service.""
Original CL had a bug that wasn't visible unless you delete your
out/ReleaseX64/patched_sdk folder.

Patchset #1 is the original CL, patchset #2 shows the fix.

This reverts commit 4aadfe09df.

BUG=

Review-Url: https://codereview.chromium.org/2976543002 .
2017-07-07 15:32:24 -07:00
Sigmund Cherem 4aadfe09df Revert "Tweak public APIs and use them in patch_sdk, dart2js, and kernel-service."
Reason: broke VM bots, still investigating.

This reverts commit 610d081947.

TBR= paulberry@google.com

Review-Url: https://codereview.chromium.org/2979463002 .
2017-07-07 15:21:37 -07:00
Sigmund Cherem 610d081947 Tweak public APIs and use them in patch_sdk, dart2js, and kernel-service.
This CL tweaks the public APIs in package:front_end, and
starts using those APIs outside the package. For example, this
removes 9 uses of DillTarget, so it is not longer mentioned
outside pkg/front_end and the analyzer_target.

Actual changes:
 - in package:front_end

   * added kernel_generator_impl: new file contains code that
     used to be in kernel_generator. Code has some modifications:
     it uses a single canonical-root when loading summaries, and
     it supports generating both outlines and kernel in one go.

   * removed code that didn't belong here:
     a. most of calculating deps for .GN moved to patch_sdk
     b. vm-specific outcomes moved to kernel-service

   * updated how `native` is implemented, so we can more easily
     support dart2js and ddc

   * updated how we check where `int`, `bool`, etc can be implemented.

   * added support "hermetic mode" in modular builds
     ('chaseDependencies = false' option)

   * moved `trim` step out of fasta, and for now call it only within
     the public API. This is not yet exposed, and I stopped covering it in
     most tests (now only covered in shaker tests). The plan is to add
     tests for the public API covering this in the future.

   * removed `uriToSource` when serializing outlines

   * added unit tests for public APIs

 - patch_sdk
   * use the public API to craete platform.dill, outline.dill (now
     500K insted of 3Mb because it excludes sources), and vmservice_io.dill
   * moved here logic internal to .GN

 - kernel service
   * use the public API
   * moved here logic that depends on VM internals (e.g. status enum,
     compilation results)

 - package:compiler
   * use the public API in tools and unit tests
   * simplified patched-sdk generation: no more extending fasta's internals

 - package:kernel
   * fix bug in deserialization: initializers and other lists were
     overwritten accidentally with external definitions.
   * updated unit tests, moved shared logic to frontend/src/fasta/testing

R=johnniwinther@google.com, paulberry@google.com

Review-Url: https://codereview.chromium.org/2953703002 .
2017-07-07 15:14:22 -07:00
Siva Chandra 7087085505 Fix frontend tests after bac83e0973
R=nweiz@google.com

Review-Url: https://codereview.chromium.org/2943173002 .
2017-06-16 14:05:08 -07:00
Peter von der Ahé 73107ed49e Fix memory leak in test.
R=paulberry@google.com

Review-Url: https://codereview.chromium.org/2940643002 .
2017-06-13 17:16:53 +02:00
Peter von der Ahé 5095646191 Apply transformations after comparing to golden files.
R=paulberry@google.com

Review-Url: https://codereview.chromium.org/2939533002 .
2017-06-13 09:40:35 +02:00
Sigmund Cherem e551bef8ba add check of preconditions in run step.
BUG=
R=ahe@google.com

Review-Url: https://codereview.chromium.org/2914773003 .
2017-06-07 15:45:55 -07:00
Dmitry Stefantsov 09e755196a Pass a Target instance to DillTarget instead of its name
R=ahe@google.com

Review-Url: https://codereview.chromium.org/2924833002 .
2017-06-06 16:03:49 +02:00
Dmitry Stefantsov 1e2f06f8da Reapply "Use backend targets to run Kernel transformations in Fasta"
This reverts commit 0b424ca5d2

R=ahe@google.com

Review-Url: https://codereview.chromium.org/2919003003 .
2017-06-02 16:10:28 +02:00
Dmitry Stefantsov 0b424ca5d2 Revert "Use backend targets to run Kernel transformations in Fasta"
This reverts commit 8ff762067a.

TBR=ahe@google.com

Review-Url: https://codereview.chromium.org/2918923003 .
2017-06-02 12:45:34 +02:00
Dmitry Stefantsov 8ff762067a Use backend targets to run Kernel transformations in Fasta
R=ahe@google.com, scheglov@google.com

Review-Url: https://codereview.chromium.org/2918623004 .
2017-06-02 10:40:13 +02:00
Paul Berry cd5bacbc54 Implement type inference for PropertySet.
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2919623002 .
2017-05-31 15:09:28 -07:00
Peter von der Ahé cdfd07b9d3 Don't read platform files during testing, and avoid trimming broken programs.
R=johnniwinther@google.com

Review-Url: https://codereview.chromium.org/2912353002 .
2017-05-31 15:03:30 +02:00
Peter von der Ahé 27761fd369 Read SDK and patches from a JSON file.
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2895983002 .
2017-05-25 15:57:57 +02:00
Peter von der Ahé 4fddc2e4d5 Move code for instantiating Invocation to Target.
R=johnniwinther@google.com

Review-Url: https://codereview.chromium.org/2897683002 .
2017-05-22 15:59:06 +02:00
Sigmund Cherem 011f8c5873 Reapply CL: first step for modular support in fasta
BUG=
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2894283002 .
2017-05-19 19:47:37 -07:00
Sigmund Cherem 54dcc29835 Revert "First step for modular output in fasta."
This reverts commit d9e9382373.

There were bot failures on incremental_kernel_generator test and in
incremental_resolved_ast_test, I'm not sure yet why tests passed locally though.

BUG=

Review-Url: https://codereview.chromium.org/2894273002 .
2017-05-19 15:02:48 -07:00
Sigmund Cherem d9e9382373 First step for modular output in fasta.
Some details:
 - Adds the tree-shaker logic and unit tests for it,

   Note: I'm still not clear on what degree of tree-shaking we can get away
   with. For now I have a mode to delete anything that is not seen explicitly.
   This passes verification for all of our tests so far, but breaks both the
   mixin and the async/await transformer in some scenarios.

 - Writes a prototype of kernelForBuildUnit (although no automated tests for it
   yet).

 - Moves a few more pieces to ProcessedOptions

R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2893493004 .
2017-05-19 13:59:15 -07:00
Konstantin Shcheglov 06e9b4b503 Rename buildOutline() and separate 'build' and 'writeProgram()'.
Also rename KernelTarget.program to _program to prevent clients from
reaching into internals. I think eventually we want to make more
stuff private. And rationalize errors handling. And... many things :-)

R=ahe@google.com, paulberry@google.com, sigmund@google.com
BUG=

Review-Url: https://codereview.chromium.org/2893563003 .
2017-05-17 11:10:06 -07:00
Konstantin Shcheglov e3f4ed94b1 Rename Target.writeOutline() into computeOutline(), add separate KernelTarget.writeOutline().
For DillTarget write does not make sense, and even for KernelTarget
we usually don't want to write anything.

R=ahe@google.com, paulberry@google.com, sigmund@google.com
BUG=

Review-Url: https://codereview.chromium.org/2885923002 .
2017-05-16 14:38:24 -07:00
Konstantin Shcheglov bdedd6768b Add a way to use shared CanonicalName root to deserialize Program.
This allows for example to add SDK into a Program, then load the
"incomplete" Program A that has only the library A, and name sequences
that references SDK classes. Because we look into the nameRoot which
aleady has SDK CanonicalName(s), we can find these names while filling
the link table and use references which point to the existing SDK
AST nodes.  Then we can load another set of library cycles, etc.

At the end we have a set of self-consistent libraries that we can
feed into DillTarget/DillLoader and resolve anothersource target
against it.

This CL is based on https://codereview.chromium.org/2872903005/
which has not been reviewed yet.

R=kmillikin@google.com, paulberry@google.com, sigmund@google.com
BUG=

Review-Url: https://codereview.chromium.org/2874723002 .
2017-05-12 10:42:08 -07:00
Sigmund Cherem db331244d0 Generate outline without transformations in patched_sdk, use it for unit tests
R=paulberry@google.com

Review-Url: https://codereview.chromium.org/2881603003 .
2017-05-11 15:10:33 -07:00
Konstantin Shcheglov 8751b91062 Rework DillLoader to allow adding multiple dills.
This allows us to compose a consistent bundle with SDK and the transitive
closure of required libraries for a libarary, and then compile it
separately (or as a part of its own library cycle).

There is still more data public than I'd like, but I will leave this
clean up fo later.

R=ahe@google.com, kmillikin@google.com, paulberry@google.com, sigmund@google.com
BUG=

Review-Url: https://codereview.chromium.org/2872903005 .
2017-05-11 08:56:36 -07:00