Add LetCont.two constructor for convenience.
Remove old code for specialized static calls to getInterceptor.
This should had been done in a previous CL where the Interceptor IR node
was added.
Remove InvokeStatic.isEffectivelyConstant, since this was only used for
interceptor and identical calls, which are no longer static calls.
Remove redundant imports and use consistent parameters for SourceInformation.
BUG=
R=floitsch@google.com
Review URL: https://codereview.chromium.org//1218843003.
Tear-offs are constructed by building a fresh constructor on the fly. However, that constructor is unnamed and didn't have the 'builtin$cls' property set. As such, the runtime-type system was unable to extract a good name and wasn't able to provide a good 'toString' for it. With this CL the constructor has a good 'name' set.
Also removes the 'builtin$cls' property that was a duplicate of 'name'. Whenever we defined a new Dart class, we added a 'builtin$cls' property on the constructor which was a duplicate of the name. This was necessary, because IE doesn't store the function name on the constructor. However, there we can just assign the 'name' field, and don't need to introduce a new field-name ('builtin$cls'). As such, we can always use the 'name' property.
R=sra@google.com
Review URL: https://codereview.chromium.org//1213033002.
Move marking from SSA builder to codegen. If the only a reference to (a closure over a) static or top level function is optimized away, it is no longer retained in the generated code.
R=sigmund@google.com
Review URL: https://codereview.chromium.org//1211223002.
Support try/catch/finally by pretending it is macro-expanded into
try/catch and try/finally:
try S0 catch (ex, st) S1 finally S2
==>
try { try S0 catch (ex, st) S1 } finally S2
The duplicated code for try/catch and try/finally is abstracted into a
function parameterized over translations for all the parts that
differed.
R=asgerf@google.com
Review URL: https://codereview.chromium.org//1207703002.
Try/finally is implemented by inlining. There is a try/catch to catch
exceptions in the try block. The catch body contains the finally code
followed by a rethrow. The code for finally is translated again after the
normal exit of the try block. Break, continue, and return exits in the try
block have the finally code inlined just before the exit is taken.
Try/catch/finally is not yet supported, it requires some changes to the
assigned variables analysis.
R=asgerf@google.com
Review URL: https://codereview.chromium.org//1201983002.
Identical is now a built-in operator instead of a separate primitive.
Interceptor is now its own expression in the Tree IR instead of a static
invocation. This matches the CPS IR (where it is a primitive), and
should fix a problem it was causing for frequency-based naming.
The JS-specific subclass of the Tree IR builder no longer depended on
the backend, emitter, namer, glue, compiler, or anything so it has
been merged into the superclass.
BUG=
R=kmillikin@google.com
Review URL: https://codereview.chromium.org//1204733002.
Get the correct receiver in noSuchMethod stubs.
noSuchMethod stubs for selectors with Interceptor calling convention should pass the receiver to noSuchMethod (not 'this'). The actual receiver is selected by Object.noSuchMethod and Interceptor.noSuchMethod.
R=floitsch@google.com
Review URL: https://codereview.chromium.org//1181063005.
The ConcatenateStrings IR node has been removed. It was a leftover from
dart2dart.
Expressions inside string interpolations are now stringified explicitly
and we concatenate strings with a pure StringConcat operator.
ConstantExpressions have also been removed from the IR. They were also
an artifact from dart2dart and were complicating the optimizer.
BUG=
R=kmillikin@google.com
Review URL: https://codereview.chromium.org//1195573003.