hausner@google.com
5e90c211c7
Add Dart keyword symbols to the VM isolate
...
Remove the keyword symbol table from object store, and remove
keyword table initialization from Scanner constructor.
R=regis@google.com
Review URL: https://codereview.chromium.org//72923002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30285 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-14 19:14:16 +00:00
iposva@google.com
d369b7a0c9
- Ensure that the token stream from generated source matches the
...
original token stream in the presence of combinations of
multiline string and string interpolation. If not this will
cause mismatches when accessing code snippets, e.g when
reporting parser errors or assertions.
- Ensure that ScanAll and ScanTo are in sync when adding or
counting tokens.
- Added unit test for multiline strings and interpolation.
- Expanded GenerateSource unit test to iterate through all
loaded libraries.
- Do not report columns for compilation errors in snapshotted
code.
- Do not report columns from exceptions and errors when dealing
with snapshotted code.
- Remove length field from TokenDescriptor. It was unused.
- Remove TokenStream::ComputeTokenPosition. It was unused.
R=fschneider@google.com , hausner@google.com
Review URL: https://codereview.chromium.org//36323003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29110 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-23 19:08:36 +00:00
srdjan@google.com
86606af254
Forgot to submit the cleanup.
...
Review URL: https://codereview.chromium.org//27271002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28620 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-14 23:32:00 +00:00
hausner@google.com
7eaea8b300
Discard first line of multiline string if only whitespace
...
R=iposva@google.com
Review URL: https://codereview.chromium.org//24493007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27895 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-25 17:26:55 +00:00
mlippautz@google.com
728c46ca4f
Make Script::GetTokenLocation() and Script::TokenRangeAtLine() use token streams
...
where possible.
BUG=
R=hausner@google.com , iposva@google.com
Review URL: https://codereview.chromium.org//24359005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27786 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-23 23:24:59 +00:00
mlippautz@google.com
4fa46b7148
Introduce newline tokens into the token stream.
...
CL only introduces the tokens into the compressed token stream. We do not
use the newline tokens (yet).
Overhead:
snapshot: 6.4% (860k/808k)
compressed token stream (gen_snapshot): 21% (314312/259907)
BUG=
R=asiva@google.com , hausner@google.com
Review URL: https://codereview.chromium.org//23452043
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27677 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-19 21:46:50 +00:00
hausner@google.com
f3baeeb6a5
Implement symbol literals in the VM compiler
...
Issue 12171
R=iposva@google.com
Review URL: https://codereview.chromium.org//24240010
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27668 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-19 17:39:16 +00:00
hausner@google.com
50f1dc5034
Be consistent with number scanning
...
If 1.e+2 is interpreted as an integer literal followed by other tokens, then
so should 1e be interpreted as an integer literal followed by identifier e.
Review URL: https://codereview.chromium.org//23996003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27218 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-05 22:27:52 +00:00
hausner@google.com
5c0b92e347
Fix number scanning
...
Removing an old, Dash-era hack that makes 2is a faulty number
literal rather than the number 2 followed by the identifier or
keyword "is".
Also fix number_identifier_test.dart which contains an access
to a non-existent getter "memberName" of class NoSuchMethodError.
Review URL: https://codereview.chromium.org//23711004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27216 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-05 22:11:50 +00:00
jacobr@google.com
605b33c1bc
fix cpp11 compile errors
...
R=asiva@google.com
Review URL: https://codereview.chromium.org//23072026
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26387 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-20 20:24:11 +00:00
zra@google.com
a810497666
Fixes scanning of Utf16 surrogate pairs in string literals.
...
R=iposva@google.com
Review URL: https://codereview.chromium.org//23000008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26130 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-14 17:34:31 +00:00
rmacnak@google.com
ed4fbd6255
Removed dead code: ConsumeIdentChar
...
R=asiva@google.com
Review URL: https://codereview.chromium.org//17609004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24377 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-24 23:47:00 +00:00
johnmccutchan@google.com
db9f4d4ef7
Remove --disable_privacy
...
BUG=https://code.google.com/p/dart/issues/detail?id=11493
R=hausner@google.com
Review URL: https://codereview.chromium.org//17621003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24374 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-24 22:45:12 +00:00
hausner@google.com
457bb1bdcb
Remove support for + prefix in number literals
...
Also fix some tests that expected + prefix in hex numbers to be illegal. According to our documentation, int.parse() accepts + for numbers in all formats/radixes.
R=srdjan@google.com
Review URL: https://codereview.chromium.org//17103002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24051 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-14 21:16:46 +00:00
hausner@google.com
bf5835d89e
BREAKING CHANGE: Remove === and !== in the VM compiler
...
This change is long overdue. Fixed the last places where we
still used ===.
R=iposva@google.com
Review URL: https://codereview.chromium.org//16398006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23751 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-07 16:31:33 +00:00
hausner@google.com
89346f3e3a
Remove legacy syntax support for library import
...
Remove legacy syntax for #import, #library and #source
Update test programs
Recalc fingerprints of inlined functions that were apparently
affected by the change of library name from "dart:io" to dart.io.
Review URL: https://codereview.chromium.org//12880023
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20466 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-25 18:11:08 +00:00
asiva@google.com
f4fe42c280
Added macros OBJECT_IMPLEMENTATION and FINAL_OBJECT_IMPLEMENTATION
...
which have different implementations of 'operator=' and 'operator^='.
In the case of FINAL_OBJECT_IMPLEMENTATION we do not do the vtable setting
in these methods (Note the |= operator functionality is now subsumed into
the new implementation of "operator^=")
Review URL: https://codereview.chromium.org//12052033
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17491 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-23 20:01:31 +00:00
srdjan@google.com
7159a6f103
Some more ^= to |=
...
Review URL: https://codereview.chromium.org//12017020
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17310 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-18 20:43:33 +00:00
hausner@google.com
7e70aaddf7
Support for embedded Dart scripts
...
Add a line and column offset to scripts so that errors and exceptions
in embedded Dart scripts are reported at the proper location.
New API call Dart_LoadEmbeddedScript() that allows to specify
line and column offsets.
Stumbled on and fixed a bug. Script::kind field was not externalized to snapshot.
Review URL: https://codereview.chromium.org//11824067
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16934 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-10 21:47:09 +00:00
asiva@google.com
7022b39e35
Convert all symbol accessors to return read only handles so that it is not necessary to create a new handle in the code that uses it.
...
Added a few more strings to the symbols list.
Review URL: https://codereview.chromium.org//11667012
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16584 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-02 19:31:59 +00:00
asiva@google.com
02049c689e
Fix for issue 7089 (Symbols::New was not quite working correctly
...
when there are non ASCII Latin-1 characters in the string).
Review URL: https://codereview.chromium.org//11411341
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15711 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-04 22:18:12 +00:00
cshapiro@google.com
39ee2fdfeb
Move various top-level Unicode definitions into classes and methods.
...
Review URL: https://codereview.chromium.org//11414249
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15568 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-30 03:33:37 +00:00
cshapiro@google.com
979571d3ee
Use a signed 32-bit integer for representing code points.
...
Review URL: https://codereview.chromium.org//11419086
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15188 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-21 00:30:27 +00:00
erikcorry@google.com
84da84c22d
Revert "Add some support for the code-point code-unit distinction."
...
This reverts commit r15150
R=karlklose@google.com
BUG=
Review URL: https://codereview.chromium.org//11411092
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15152 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-20 15:23:41 +00:00
erikcorry@google.com
547cbf9da6
Add some support for the code-point code-unit distinction.
...
Adds String.fromCodeUnits and String.codeUnitAt, and modifies
String.fromCodePoints and String.codePointAt to actually use code points.
Fixes String.charCodes to use code points and adds String.codeUnits.
Reenables some tests, and adds new ones for non-BMP characters.
Fixes issues 6418, 6501 and 1357.
R=floitsch@google.com
BUG=
Review URL: https://codereview.chromium.org//11368138
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15150 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-20 14:51:25 +00:00
hausner@google.com
f116c93cf9
Proper reporting of illegal characters in source code
...
Fixes bug 6778.
Review URL: https://codereview.chromium.org//11417074
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15122 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-19 23:46:23 +00:00
iposva@google.com
7ae807a19c
- Move MathNatives from dart:core to dart:math.
...
- Split out double and integer parsing from MathNatives.
Review URL: https://codereview.chromium.org//11316031
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15032 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-16 19:42:02 +00:00
hausner@google.com
95c79712da
Make library, import, export, part pseudo-keywords
...
Resubmit cl 14446 after Ivan's keyword table fix.
Review URL: https://codereview.chromium.org//11367069
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14500 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-02 20:30:08 +00:00
iposva@google.com
4d410f0ebb
- Prepopulate the keyword symbol table otherwise we can end up
...
with empty spots when reading from a snapshot.
Review URL: https://codereview.chromium.org//11366058
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14453 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-02 07:29:12 +00:00
hausner@google.com
e4880d6698
Revert cl 14446
...
Review URL: https://codereview.chromium.org//11293054
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14448 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-02 00:19:48 +00:00
hausner@google.com
4c6b490ab8
Make library, import, export, part built-in identifiers
...
Review URL: https://codereview.chromium.org//11360051
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14446 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-01 23:47:25 +00:00
hausner@google.com
784b159e2f
Eliminate support for old raw string format
...
Review URL: https://codereview.chromium.org//11043010
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13145 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-02 21:54:46 +00:00
hausner@google.com
731f692895
Get rid of #resource directive in VM
...
Review URL: https://codereview.chromium.org//10918226
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12358 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-13 22:25:09 +00:00
hausner@google.com
8f5eea3291
Support r"xxx" raw strings
...
Review URL: https://chromiumcodereview.appspot.com//10914213
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12225 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-11 22:53:45 +00:00
hausner@google.com
22fdbae05b
VM can parse and ignore metadata
...
Support parsing of metadata in all legal locations except library
and import directives. The metadata is simply ignored. It is not
evaluated or validated for correctness.
Review URL: https://chromiumcodereview.appspot.com//10913138
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12078 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-07 23:06:48 +00:00
cshapiro@google.com
da14bf70a7
Add attributions so printf like functions can have their arguments checked.
...
This change also corrects some misuses of format strings and format
arguments that discovered by the compiler checks.
Review URL: https://chromiumcodereview.appspot.com//10869063
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11912 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-06 00:58:25 +00:00
asiva@google.com
ed8db0f611
Move more symbols to the vm isolate.
...
Review URL: https://chromiumcodereview.appspot.com//10808111
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9905 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-25 20:31:26 +00:00
hausner@google.com
fdd91990f1
Implement cascade operator in VM
...
- Factoring out parsing of selectors
- Create temp variable holding the receiver of the cascade
selectors
Review URL: https://chromiumcodereview.appspot.com//10796109
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9857 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-24 17:20:49 +00:00
asiva@google.com
ec7f44f025
Create frequently used symbols in the vm isolate
...
- Avoids the need for doing a NewSymbol on these everytime
- saves space as they get shared by isolates
Review URL: https://chromiumcodereview.appspot.com//10783035
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9834 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-24 00:01:50 +00:00
iposva@google.com
7f843b0fc9
- Start using the collected store buffer entries to find
...
old->new references during Scavenge.
Review URL: https://chromiumcodereview.appspot.com//10797021
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9791 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-20 21:41:55 +00:00
hausner@google.com
3aedbb74e8
Better breakpoint placement
...
Instead of using token distance to find the first possible breakpoint
position in a line, use generated code address, so the debugger
breaks before the first call on a source line.
Fix issue 3653
http://code.google.com/p/dart/issues/detail?id=3318
Review URL: https://chromiumcodereview.appspot.com//10686003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9176 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-27 16:13:49 +00:00
hausner@google.com
f6c776dcbe
Eliminate unary plus with hex literals
...
The spec says unary + is only allowed with integer and floating point literals, not with hex literals. Somebody noticed that the VM accepted
+0x10 as well.
Consequently, the Math.parseInt(str) library function should fail with
a BadNumberFormatException if it is called with a hex number that is preceded by a +.
Fixes issue 1540.
This change exposed that the dart2js core library implementation is
falsely accepting +0xNNN hex numbers. I filed issue 3333.
Review URL: https://chromiumcodereview.appspot.com//10456060
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8177 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-31 22:35:29 +00:00
cshapiro@google.com
36f57531ec
Reject high- and low-surrogates in escaped code points.
...
BUG=3097
Review URL: https://chromiumcodereview.appspot.com//10388179
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7725 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-17 22:57:00 +00:00
asiva@google.com
fe77f95469
Fix for Issue 2367
...
The '\r' character was included in the string literal when parsing integer or double literals. This was resulting in incorrect integer values being created.
Review URL: https://chromiumcodereview.appspot.com//10054027
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6442 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-11 22:07:47 +00:00
iposva@google.com
d8c7e85a30
- Reintroduce a library privacy disabling option.
...
Review URL: https://chromiumcodereview.appspot.com//9594040
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4987 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-05 22:54:02 +00:00
hausner@google.com
4e88231326
Fix bug 1557
...
Better handling of malformed library tags.
TBR=iposva
Review URL: https://chromiumcodereview.appspot.com//9582036
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4912 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-03 00:39:04 +00:00
asiva@google.com
33d2e2fe26
Changes to shrink the token stream representation from two words to one word.
...
On standalone dartium which has about 50000 tokens in the libraries (core, coreimpl, builtin, io etc.) this reduces the heap size by about 180kb. The size of the standalone snapshot buffer reduces by about 72kb.
Also moved the keyword symbol table to the object store so that it does not have to repopulated on every script compilation. Should benefit regular user script load times.
Review URL: https://chromiumcodereview.appspot.com//9462003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4734 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-29 02:46:29 +00:00
hausner@google.com
eff1a31d6f
Fixing bugs: 1612, 1843, 1847
...
- Fix error location when referring to types in object allocation.
- Handle CR/LF correctly at beginning of source.
- Detect duplicate identifier in typedef declaration.
Review URL: https://chromiumcodereview.appspot.com//9466030
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4584 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-25 00:47:06 +00:00
iposva@google.com
f0c1954e9b
Fix issue 732:
...
- Add handling for #resource library tags: Ignore at runtime, they are only used
by the Dart Editor at the moment.
Review URL: https://chromiumcodereview.appspot.com//9431038
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4493 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-22 21:40:07 +00:00
hausner@google.com
b89e03ef16
Placate linux compiler
...
Review URL: https://chromiumcodereview.appspot.com//9349019
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4000 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-07 16:40:38 +00:00