Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1793)

Issue 18750004: Faster invocation of fields as methods. (Closed)

Created:
7 years, 5 months ago by Florian Schneider
Modified:
7 years, 5 months ago
Reviewers:
srdjan, hausner
CC:
reviews_dartlang.org, vm-dev_dartlang.org, Ivan Posva
Visibility:
Public.

Description

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

Patch Set 1 #

Patch Set 2 : #

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

Messages

Total messages: 6 (0 generated)
Florian Schneider
7 years, 5 months ago (2013-07-11 11:52:56 UTC) #1
srdjan
Please add tests. Otherwise LGTM!
7 years, 5 months ago (2013-07-11 17:24:55 UTC) #2
hausner
DBC: would be nice if you also added a debugger test similar to standalone/debugger/basic_debugger_test.dart
7 years, 5 months ago (2013-07-11 22:37:53 UTC) #3
Florian Schneider
Done. Added debugger test. Existing tests already cover invocation of fields as methods.
7 years, 5 months ago (2013-07-15 11:04:17 UTC) #4
Florian Schneider
Committed patchset #2 manually as r25001 (presubmit successful).
7 years, 5 months ago (2013-07-15 11:12:21 UTC) #5
hausner
7 years, 5 months ago (2013-07-15 15:28:23 UTC) #6
Message was sent while issue was closed.
Nice, thank you!

Powered by Google App Engine
This is Rietveld 408576698