fschneider@google.com
f260416fb8
Support fast noSuchMethod dispatch for any number of arguments.
...
Until now, the fast dispatch was only available with getters and
zero argument methods.
This CL generalizes the approach to any number of arguments. The
dispatcher functions that are auto-generated by the compiler
are not attached to the class anymore. Instead the dispatcher
is only stored in the IC data of each call site. Each class
contains a cache of dispatcher function that map
(name, arguments descriptor) => dispatcher.
This also fixes a bug where the VM report a wrong error message
when throwing a NoSuchMethodError.
BUG=https://code.google.com/p/dart/issues/detail?id=11528
BUG=https://code.google.com/p/dart/issues/detail?id=11223
TEST=tests/language/no_such_method_dispatcher_test.dart
R=srdjan@google.com
Review URL: https://codereview.chromium.org//18097004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24876 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-10 10:09:14 +00:00
regis@google.com
0c93466054
Hide parent function name in name of closurized function to user (issue 5436).
...
Hide implicit parameter of closure to user.
R=iposva@google.com
Review URL: https://codereview.chromium.org//17904009
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24504 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-27 00:49:49 +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
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
d1c4735609
Transition ^= to |=
...
Review URL: https://codereview.chromium.org//11867022
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17309 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-18 19:53:17 +00:00
vegorov@google.com
a77fc9701c
When requested to extract a method M from class C inject a method extractor (consisting of a single AST node CreateClosure) as a getter get:M into C.
...
This allows to cache and optimize method extraction requests as normal method invocations and at hot method extraction sites that significantly decreases overhead of method extraction which previously required two trips into runtime system and was not cached at all.
BUG=
Review URL: https://codereview.chromium.org//11642003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17261 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-18 11:54:45 +00:00
asiva@google.com
596a5f1af9
Use kInstanceCid instead of object_store()->object_class() when checking to see if the class is object class.
...
Review URL: https://chromiumcodereview.appspot.com//10873004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11190 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-22 22:21:44 +00:00
hausner@google.com
45b76746b5
Fix super getter/setter
...
Fix handling of super getters and setters. In particular, parser
now correctly converts super getters into super setters for
compound assignment, and pre- and postfix increment operators.
co 19 tests still fail because super index operator is broken.
Will work on this next.
Review URL: https://chromiumcodereview.appspot.com//10849004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10413 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-08 18:02:51 +00:00
regis@google.com
a7b85ecff8
Provide better error message when passing wrong number of arguments.
...
Review URL: https://chromiumcodereview.appspot.com//10695137
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9602 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-12 17:46:55 +00:00
srdjan@google.com
be66ab9a1c
Fix for issue 1307: throw runtime exception instead of reporting a compile time error if a static call cannot be resolved.
...
Review URL: https://chromiumcodereview.appspot.com//9316100
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3922 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-03 22:25:16 +00:00
dgrove@google.com
4c0f559d23
Initial checkin.
...
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-05 05:20:07 +00:00