|
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
Committed: https://code.google.com/p/dart/source/detail?r=25001
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+244 lines, -63 lines) |
Patch |
|
M |
runtime/vm/code_generator.cc
|
View
|
1
|
3 chunks |
+24 lines, -15 lines |
0 comments
|
Download
|
|
M |
runtime/vm/debugger.h
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
runtime/vm/debugger.cc
|
View
|
1
|
3 chunks |
+9 lines, -4 lines |
0 comments
|
Download
|
|
M |
runtime/vm/object.h
|
View
|
1
|
4 chunks |
+13 lines, -6 lines |
0 comments
|
Download
|
|
M |
runtime/vm/object.cc
|
View
|
1
|
10 chunks |
+28 lines, -17 lines |
0 comments
|
Download
|
|
M |
runtime/vm/parser.h
|
View
|
1
|
2 chunks |
+6 lines, -0 lines |
0 comments
|
Download
|
|
M |
runtime/vm/parser.cc
|
View
|
1
|
5 chunks |
+88 lines, -18 lines |
0 comments
|
Download
|
|
M |
runtime/vm/raw_object.h
|
View
|
1
|
2 chunks |
+2 lines, -1 line |
0 comments
|
Download
|
|
M |
tests/standalone/debugger/closure_debugger_test.dart
|
View
|
1
|
2 chunks |
+25 lines, -1 line |
0 comments
|
Download
|
|
A |
tests/standalone/debugger/nosuchmethod_debugger_test.dart
|
View
|
1
|
1 chunk |
+48 lines, -0 lines |
0 comments
|
Download
|
Total messages: 6 (0 generated)
|