Commit Graph

174 Commits

Author SHA1 Message Date
hausner@google.com 2e3b0fd8bf Detect illegal assignable expressions
The AST cannot distinguish between (x) and x. Adding a check
to the VM compiler that detects syntactically illegal assignments
like (x) = 0. The existing checks only analyze the AST so we
didn’t detect some illegal cases.

Looking at the source to detect syntactically illegal left hand
expressions is a bit ugly because we can’t easily look at
previous tokens. This change rewinds the token iterator a few
positions and then moves forward to check whether the last token
of the expression is an identifier or a closing bracket ].

Added new test. We did not have a single test case for this :)

R=regis@google.com

Review URL: https://codereview.chromium.org//106843002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30904 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-05 18:15:21 +00:00
zra@google.com daf539e2f9 Fixes a couple problems with GC of unoptimized code.
1. Instead of making a pass before the Marking phase,
   this change does not visit code pointers in functions
   during marking. Then after marking, if the code has
   still not been marked, code pointers in functions
   are nulled out.
2. Since code pointers in functions may be nulled out,
   functions are no longer used as proxies for code in
   deoptimization info.

R=iposva@google.com, srdjan@google.com

Review URL: https://codereview.chromium.org//70183010

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30600 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-23 00:17:28 +00:00
rmacnak@google.com f76f7f7ecf Handle undefined field/getter access from arguments to const constructors in metadata, and related problematic cases.
BUG=http://dartbug.com/13817
R=hausner@google.com

Review URL: https://codereview.chromium.org//68333007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30385 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-19 01:02:26 +00:00
regis@google.com 2a355a7bb6 Lazily format LanguageError messages (fix issue 15069).
R=iposva@google.com

Review URL: https://codereview.chromium.org//68113028

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30308 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-15 18:54:24 +00:00
regis@google.com 694401d38e Rename mixin typedef to mixin application alias in VM.
R=hausner@google.com, rmacnak@google.com

Review URL: https://codereview.chromium.org//71693003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30277 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-14 17:42:39 +00:00
kmillikin@google.com 2a87b7eb94 Simplify the desugaring of catch clauses.
Rather than if/then/continue (where the continue does not match the
semantics of Dart's continue), use if/then/else.  This removes the
unnecessary goto and label as a step toward streamlining support for
jumping in the compiler backend.

R=hausner@google.com

Review URL: https://codereview.chromium.org//63983005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30227 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-13 14:08:11 +00:00
hausner@google.com 6f95dbae2e Fix try-catch for sure
Fix scoping of user-defined exception and stack trace variables in
catch clause.

R=regis@google.com

Review URL: https://codereview.chromium.org//63033003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30003 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-06 22:07:31 +00:00
hausner@google.com 2139b9d5f0 Undo change 29900
Undo a gratuitous change to the parser.

@kmillikin: please at least be courteous enough to ask one of the front-end
authors to review a change that is not a pressing issue, such as style preferences.

Review URL: https://codereview.chromium.org//61413002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29954 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-06 01:21:32 +00:00
kmillikin@google.com a59e0881cf Clean up Parser::ParseTryStatement in the VM.
Streamline the implementation, factor out repeated code, rename some cryptic
identifiers, and fix a misspelling.

Also, disentangle an implicit include dependency: class_finalizer.cc was
getting code_generator.h implicitly from something included (unnecessarily
as it turns out) by parser.h.

R=fschneider@google.com

Review URL: https://codereview.chromium.org//59683002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29900 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-05 12:49:14 +00:00
fschneider@google.com ce9573722c VM: Fix checked mode crash (issue 13831).
The AST for static getters differs between parsing the first time, and
subsequent parsings. This leads to a mismatch in deoptimization-ids
between the optimized and the unoptimized code.

This CL avoids creating different ASTs for the same static getters. To allow
better inlining of these getters, the initialization expression is wrapped in a
hidden static initializer-function. As a result the size of such getters is
constant and does not depend on the initializer expression.

R=srdjan@google.com

Review URL: https://codereview.chromium.org//51123003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29680 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-31 16:49:55 +00:00
regis@google.com 65379851a8 Implement stricter rule about self referencing typedefs (fix issue 13675).
R=rmacnak@google.com

Review URL: https://codereview.chromium.org//49853004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29460 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-29 17:04:21 +00:00
regis@google.com 20badfb06e Register synthesized mixin application classes in the library and reuse them
when possible (fix issue 14318).

R=asiva@google.com, hausner@google.com, rmacnak@google.com

Review URL: https://codereview.chromium.org//42723003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29276 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-25 19:46:32 +00:00
hausner@google.com 07c06be8e7 It's a compile-time error if a const constructor call fails
Making it a compile-time error if a const constructor call
fails. Also improve error message when invoking dart code during
compilation fails.

Fixes issue 14302

R=srdjan@google.com

Review URL: https://codereview.chromium.org//40683002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29212 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-24 21:42:39 +00:00
hausner@google.com ddd9907e23 Implement type checks for switch expression
If the switch expression is not compatible with the case clause
constants, we must report a runtime error. Implement this by annotating
the temporary variable holding the switch expression with the correct
type.

Issue 7274

R=regis@google.com

Review URL: https://codereview.chromium.org//34413007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29126 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-23 21:15:25 +00:00
regis@google.com 9ec07853c5 Report correct error message in case of super invocation (fix issue 8208).
R=hausner@google.com

Review URL: https://codereview.chromium.org//30533004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29042 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-22 22:12:07 +00:00
hausner@google.com dbe0e4c9b4 Allow string literal concatenation in import clauses
Added benefit: if there is no interpolation in any of the adjacent
string literals, the compiler concatenates the strings without
invoking Dart code.

Fixes issues 12521, 6877

R=regis@google.com

Review URL: https://codereview.chromium.org//32513007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28964 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-21 22:13:42 +00:00
hausner@google.com 0e099ff048 Check that class member names do not conflict with type parameters
Implement check that member names do not conflict with type
parameters. Simplify name checks in class namespace.
Mark typevariable_mirror_metadata_test as failing now that we
report the proper compile time errors. (The test expects no errors.)
Some co19 tests expect a name conflict between a setter X= and type
parameter X. This is still in flux from a language perspective. This
change list does not introduce an compile error for this case.

Fix for issue 13701.

R=srdjan@google.com

Review URL: https://codereview.chromium.org//27619002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28808 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-17 17:39:08 +00:00
regis@google.com 5e817c182b It is not an error anymore to leave an instance final field uninitialized.
Fix issues 11054 and 12157.

R=srdjan@google.com

Review URL: https://codereview.chromium.org//26023005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28289 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-04 22:56:53 +00:00
fschneider@google.com a329b0e6bc Dart VM: Simplify code generation for equality operators.
By inserting the necessary checks for null inside the callee
at the AST level, the code generation of == operations can be
greatly simplified.

This is a performance-neutral change and a step for allowing
generic inlining of arbitrary == methods. So far we could only
inline them for a common set of types in the flow graph
optimizer.

R=srdjan@google.com

Review URL: https://codereview.chromium.org//24203004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28084 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-01 10:10:50 +00:00
regis@google.com 6531272706 Support forwarding constructors for mixin typedefs (issue 11888).
R=hausner@google.com

Review URL: https://codereview.chromium.org//24896002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27979 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-27 00:26:22 +00:00
hausner@google.com b0780d316b Check types of case expressions
Implement checks to make sure all case expressions are of the same type and other restrictions.

This change assumes that it's ok to use double values in switch expressions. Will verify with those who are in the know.

R=srdjan@google.com

Review URL: https://codereview.chromium.org//24768004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27968 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-26 18:54:15 +00:00
hausner@google.com 3c360399ee Improve NoSuchMethodError error messages
- Don't say there is no constructor with name X if there is one
  that has incompatible parameter list.
- Better error message when mismatched optional parameters are passed.
  (Prviously only the number of parameters was considered, but not
  names of named parameters for example.)

Fixes issue 6189.

R=regis@google.com

Review URL: https://codereview.chromium.org//24395007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27826 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-24 16:14:28 +00:00
regis@google.com 3b5628fd1b Support mixin application typedef as mixin in the VM (issues 9383, 12773).
Disallow Object as mixin (issue 10952).
Detect illegal cycles in mixins.

R=hausner@google.com

Review URL: https://codereview.chromium.org//24397002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27791 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-24 00:25:01 +00:00
hausner@google.com 257535165e Properly parse symbol literals in top-level expression
R=iposva@google.com

Review URL: https://codereview.chromium.org//23531075

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27682 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-20 00:12:55 +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 fd57843900 Update handling of ambiguous name references
Update VM to latest spec. Referencing a name that is imported
from more than one library is no longer a compile-time error.
If one of the sources of an ambiguous reference is a dart library,
the dart library declaration is automatically hidden.

Also fixes a bug where looking up a getter name in a library
found the getter even though the name is filtered out in the
'hide' combinator.

Long-term we should fix the need for repeatedly convert between
the mangled getter and setter names and the untangled name.

Fixes 12915, 12913, 12724.

R=regis@google.com

Review URL: https://codereview.chromium.org//23484020

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27312 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-09 21:52:40 +00:00
rmacnak@google.com 865ef54309 Implement ParameterMirror.metadata.
BUG=http://dartbug.com/10906
BUG=http://dartbug.com/11418
R=asiva@google.com

Review URL: https://codereview.chromium.org//23224016

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27082 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-03 22:50:15 +00:00
zra@google.com c012196222 Evaluates arguments before throwing a NoSuchMethodError in constructor
calls and static function calls.

Fixes issue 12820.

R=regis@google.com, srdjan@google.com

Review URL: https://codereview.chromium.org//23482004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26827 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-28 23:39:43 +00:00
mlippautz@google.com 817a6fff3a Implement ParameterMirror.{isFinal,hasDefaultValue,defaultValue}.
Fixes issue 12196 and partially addresses issue 12430.

BUG=
R=ahe@google.com, asiva@google.com, gbracha@google.com

Review URL: https://codereview.chromium.org//23020025

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26730 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-27 17:31:09 +00:00
rmacnak@google.com 92f8786e99 Remember metadata positions for mixin and function typedefs.
BUG=http://dartbug.com/10906
R=asiva@google.com, hausner@google.com

Review URL: https://codereview.chromium.org//23437007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26680 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-27 00:47:42 +00:00
fschneider@google.com 4a9402eb26 Fix allocation of indices for try-blocks.
The compiler has the assumptions that try-index starts
at zero for each function: The list of exception handlers
is a dense array indexed using the try-index.

BUG=https://code.google.com/p/dart/issues/detail?id=12615
TEST=tests/language/regress_12615_test.dart
R=srdjan@google.com

Review URL: https://codereview.chromium.org//22909032

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26585 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-23 08:49:05 +00:00
hausner@google.com 6b20c0ecaa Detect circular dependencies in compile time constants
Fix issue 1681

R=srdjan@google.com

Review URL: https://codereview.chromium.org//22897019

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26491 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-21 23:55:59 +00:00
mlippautz@google.com 2187a8f63f Move the begin token (token_pos) of explicit functions to the start of the function declaration.
This fixes setting the breakpoints when the signature of function declarations is spread across multiple lines.

Example:
int
get
foo
=>
42;

BUG=
R=hausner@google.com

Review URL: https://codereview.chromium.org//22916006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26080 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-13 20:11:23 +00:00
regis@google.com 9eb12ad303 Implement updated method overriding rules in the vm (issue 11495).
Introduce --error-on-bad-override flag and use it when generating snapshots.
Fix signature checking when patching methods.
Fix errors in patch files.
Fix receiver type of constructors.
Fix finalization of mixin application typedefs.
Update tests and status files.

R=asiva@google.com

Review URL: https://codereview.chromium.org//22685007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26027 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-12 20:28:52 +00:00
fschneider@google.com 086b60dada Fix a bug in compilation of try-finally.
When nesting try-finally, the outer finally was incorrectly executed
twice under certain conditions (a return in the inner try-block and a outer
finally-block that ends with throw)

This was because finally-code was inlined at return/break/continue statements
and it was associated with the wrong catch-handler when compiling.

This CL tracks indices of try-blocks in the parser so that each inlined
finally block has the correct catch handler index.

BUG=https://code.google.com/p/dart/issues/detail?id=11972
TEST=test/language/throw8_test.dart
R=hausner@google.com

Review URL: https://codereview.chromium.org//22184003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25767 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-05 13:49:48 +00:00
regis@google.com 3b7cdf80a0 Update VM to handle malformed types according to revised spec (issues 9055,
12105, 7247).
Update language tests.
Update status files.
Allow map literals to specify a key type that is not a String.

R=srdjan@google.com

Review URL: https://codereview.chromium.org//21049012

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25666 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-31 15:20:28 +00:00
regis@google.com 191d2673c8 Use proper internal name for implicit static final getters.
R=hausner@google.com

Review URL: https://codereview.chromium.org//19287003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25053 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-16 16:29:59 +00:00
fschneider@google.com 13b7b7242a Faster invocation of fields as methods.
Until now there was a large discrepancy between

x.f() and
(x.f)()

This CL makes x.f() as fast as (x.f)() by automatically
generating  a intermediate dispatcher function that loads
the field and invokes the result as a closure.

The approach resembles the one taken for fast noSuchMethod
invocation and reuses the same per-class cache
of dispatcher functions.

It also fixes a bug in the debugger so that VM-generated 
implicit dispatcher functions (like for noSuchMethod, or
field-as-method invocation) don't show up the debuggers
stack trace.

BUG=https://code.google.com/p/dart/issues/detail?id=11041
R=srdjan@google.com

Review URL: https://codereview.chromium.org//18750004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25001 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-15 11:12:09 +00:00
hausner@google.com 4c629b9b50 Implement forwarding constructors for mixins
By popular demand, fixes issue dartbug.com/9339

R=srdjan@google.com

Review URL: https://codereview.chromium.org//19023005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24977 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-12 22:09:18 +00:00
fschneider@google.com d77d1eac90 Correct handling of named optional parameters with noSuchMethod invocations.
This CL fixes a performance bug with noSuchMethod and named parameters. It also
simplifies the platform-specific code by removing special casing for the
noSuchMethod-dispatcher functions in the flow graph compiler.

Before using named optional parameters would still go through the slow
runtime in certain conditions: When running without inlining, or when
the dispatcher function was not inlined because of e.g. inlining size
heuristics, noSuchMethod would be slow if invoked with named parameters.

R=srdjan@google.com

Review URL: https://codereview.chromium.org//18209024

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24906 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-11 10:01:50 +00:00
regis@google.com e8a722870b Support type parameters and classes as expression in the vm.
Turn many compile-time errors into runtime errors per latest spec.
Triage affected tests.

R=hausner@google.com

Review URL: https://codereview.chromium.org//18801007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24861 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-09 19:35:56 +00:00
hausner@google.com adabc79bc6 Small cleanup in parser
When creating the type of the receiver variable 'this', use the token position of the class.

R=regis@google.com

Review URL: https://codereview.chromium.org//18801005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24805 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-08 16:48:51 +00:00
iposva@google.com 50fc824be9 - Remove arguments definition test from the VM.
- Update tests still referring to it.

R=regis@google.com

Review URL: https://codereview.chromium.org//17977002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24539 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-27 18:37:53 +00:00
fschneider@google.com 0bf7251d1a Reland: Optimizing noSuchMethod invocation with no arguments.
This is the same CL as https://codereview.chromium.org/17315008/ with
one bug fixed:

If a method is invoked with a mismatching number of arguments, we don't
add a no-such-method-dispatcher function since the dispatcher currently
can only invoke noSuchMethod and would not work if the method
is invoked with correct arguments at a later point.

I extended the test to cover that case.

TEST=tests/language/no_such_method_dispatcher_test.dart
R=srdjan@google.com

Review URL: https://codereview.chromium.org//17571010

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24351 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-24 17:18:51 +00:00
fschneider@google.com 48555c83ac Back out r24266 to investigate dartium test failure.
TBR=kmillikin@google.com

Review URL: https://codereview.chromium.org//17074003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24284 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-21 11:56:32 +00:00
fschneider@google.com ab1981b421 Optimizing noSuchMethod invocation with no arguments.
On each call that triggers a noSuchMethod invocation we 
attach a custom dispatch function that allocates the 
invocation object and invokes noSuchMethod. This dispatcher
is compiled and optimized like a normal Dart function.

Similar to method-extractors, these implicit dispatchers
do not show up as normal functions.

As a first step this CL only handles invocations of getters
and methods with no like o.foo or o.foo().  This CL gives
a >25x speedup of such noSuchMethod invocations. Calls with
multiple arguments still go through the slow path.

R=srdjan@google.com

Review URL: https://codereview.chromium.org//17315008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24266 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-21 07:31:51 +00:00
srdjan@google.com 47de186e76 Store arguments descriptor in ICData. Remove loading of arguments descriptor at unoptimized call site (the ones using ICData).
R=asiva@google.com, zra@google.com

Review URL: https://codereview.chromium.org//17421003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24239 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-20 16:29:39 +00:00
srdjan@google.com 5543ce104c When canonicalize instances check if all fields are canonical. If a field is a non-canonical number or strings, canonicalize it. Otherwise report an error if a field is not canonical.
R=hausner@google.com

Review URL: https://codereview.chromium.org//16780009

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23934 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-12 21:27:37 +00:00
hausner@google.com 0374dc9b12 Reified metadata in the VM
R=asiva@google.com

Review URL: https://codereview.chromium.org//16780008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23912 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-12 15:44:57 +00:00
zra@google.com 68f4a66a3d Improvements to 53-bit overflow checking.
- Integer literals that require more than 53 bits will cause a compile-time error.
- Checking is added to unary negate for the case that the most negative
  53-bit integer is negated.
- The tests are improved to also check optimized code.

R=srdjan@google.com

Review URL: https://codereview.chromium.org//16664003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23774 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-07 21:28:49 +00:00