podivilov@google.com
b5a251f42c
Throw an exception when invalid source file location is encountered.
...
Currently, compiler is crashed in SourceMapBuilder with unhelpful stack trace.
Throwing an exception in ssa builder will help us to fix crashes that
occur in the wild.
R=ahe@google.com ,kasperl@google.com
BUG=5184
Review URL: https://codereview.chromium.org//10970015
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12765 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-24 09:43:53 +00:00
podivilov@google.com
656a51fb18
Fix source locations for inlined and patched functions.
...
R=ahe@google.com ,floitsch@google.com
Review URL: https://chromiumcodereview.appspot.com//10915122
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12108 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-10 11:14:48 +00:00
podivilov@google.com
6fd0e7fc8b
Add empty mapping entries for the ranges of generated JavaScript that don't map to any Dart source code.
...
For such ranges we want to show generated JavaScript rather than arbitrary location in Dart sources.
R=floitsch@google.com
Review URL: https://chromiumcodereview.appspot.com//10911091
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11934 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-06 10:52:41 +00:00
iposva@google.com
43c364c8e5
- Change "static final" to "static const" in the lib/ directory.
...
Review URL: https://chromiumcodereview.appspot.com//10880068
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11401 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-27 18:28:29 +00:00
podivilov@google.com
a3cccc46b8
Attach source map positions to returns, sends, and some operators.
...
R=floitsch@google.com
Review URL: https://chromiumcodereview.appspot.com//10809004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9758 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-19 14:10:20 +00:00
podivilov@google.com
d637d0dce8
Introduce CodeBuffer as StringBuffer replacement in compiler.
...
CodeBuffer stores source location markers along with emitted JavaScript code.
When CodeBuffer content is added to another CodeBuffer, the markers are added as well.
CodeBuffers will be used to propagate source mappings from inside ssa codegen to emitter,
see https://chromiumcodereview.appspot.com/10695174/ for details.
R=floitsch@google.com ,kasperl@google.com
Review URL: https://chromiumcodereview.appspot.com//10696194
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9628 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-13 12:59:13 +00:00
podivilov@google.com
4fbf112cc9
Associate partial source map with each code block in Universe.generatedCode.
...
That way we can create partial source maps for individual functions in codegen,
and join them into a single map at the end.
Currently partial source maps contain only begin and end positions of all functions.
R=ahe@google.com
Review URL: https://chromiumcodereview.appspot.com//10668029
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9400 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-04 11:53:25 +00:00
podivilov@google.com
43f93e9a6a
Revert "Associate partial source map with each code block in Universe.generatedCode."
...
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9394 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-04 10:47:02 +00:00
podivilov@google.com
569dc5bff7
Associate partial source map with each code block in Universe.generatedCode.
...
That way we can create partial source maps for individual functions in codegen,
and join them into a single map at the end.
Currently partial source maps contain only begin and end positions of all functions.
R=ahe@google.com
Committed: https://code.google.com/p/dart/source/detail?r=9347
Committed: https://code.google.com/p/dart/source/detail?r=9351
Review URL: https://chromiumcodereview.appspot.com//10668029
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9390 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-04 10:12:50 +00:00
podivilov@google.com
f14b21a4a3
Revert "Associate partial source map with each code block in Universe.generatedCode."
...
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9353 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-03 14:19:54 +00:00
podivilov@google.com
82ce0b271c
Associate partial source map with each code block in Universe.generatedCode.
...
That way we can create partial source maps for individual functions in codegen,
and join them into a single map at the end.
Currently partial source maps contain only begin and end positions of all functions.
R=ahe@google.com
Committed: https://code.google.com/p/dart/source/detail?r=9347
Review URL: https://chromiumcodereview.appspot.com//10668029
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9351 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-03 13:54:46 +00:00
podivilov@google.com
4dc7608dbc
Revert "Associate partial source map with each code block in Universe.generatedCode."
...
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9349 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-03 13:39:38 +00:00
podivilov@google.com
c03d2957f5
Associate partial source map with each code block in Universe.generatedCode.
...
That way we can create partial source maps for individual functions in codegen,
and join them into a single map at the end.
Currently partial source maps contain only begin and end positions of all functions.
R=ahe@google.com
Review URL: https://chromiumcodereview.appspot.com//10668029
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9347 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-03 13:09:40 +00:00
lrn@google.com
642b7d8a05
Revert "Revert "First step towards having patch files for generic libraries.""
...
This reapplies r9246 without the (known) bugs.
Review URL: https://chromiumcodereview.appspot.com//10689063
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9282 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-02 09:04:42 +00:00
lrn@google.com
83ce2f9f6e
Revert "First step towards having patch files for generic libraries."
...
This reverts commit r9246.
TBR: floitsch
Review URL: https://chromiumcodereview.appspot.com//10689038
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9249 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-29 13:49:13 +00:00
lrn@google.com
1fad321449
First step towards having patch files for generic libraries.
...
As proof of concept, it patches a non-functional htmlEscape from web.dart.
Still has lots of restrictions:
- Only loads a normal library (no syntax extension to mark patches as
separate from additions). Assumes every element is a patch.
- Only handles top-level functions (probably won't handle getters/setters
or constructors), and not classes.
- Doesn't check that the patched function is marked external (no syntax for
that in the spec yet, doesn't even require it to be abstract).
- Doesn't check that the signature of the patch function matches the original
function.
- Probably won't work for 'coreimpl', as loaded from 'js_helper', since it's not
loaded using the 'dart:' scheme.
Review URL: https://chromiumcodereview.appspot.com//10689036
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9246 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-29 12:32:40 +00:00
podivilov@google.com
fb79a6c50b
Use JSON.printOn in SourceMapBuilder.
...
R=ahe@google.com
Review URL: https://chromiumcodereview.appspot.com//10636003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9100 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-26 07:52:02 +00:00
podivilov@google.com
0e6839b3ff
First shot at source maps generation in dart2js.
...
This allows to generate a source map with begin and end positions of all functions.
Committed: https://code.google.com/p/dart/source/detail?r=8966
Review URL: https://chromiumcodereview.appspot.com//10579019
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8973 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-21 11:45:19 +00:00
podivilov@google.com
a15a5c72a4
Revert "First shot at source maps generation in dart2js."
...
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8970 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-21 10:47:00 +00:00
podivilov@google.com
5b15383056
First shot at source maps generation in dart2js.
...
This allows to generate a source map with begin and end positions of all functions.
Review URL: https://chromiumcodereview.appspot.com//10579019
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8966 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-21 10:13:19 +00:00