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

Unified Diff: runtime/vm/object.cc

Issue 1371453002: Precompile invoke-field-dispatchers for closures. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/object.h ('k') | runtime/vm/object_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.cc
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index 2366142b7a56dacf9e74fbdcb5ace7e723b849d9..c65d4846464ea0e9034cc3fde71ccd7ffabee24e 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -2602,7 +2602,8 @@ void Class::CalculateFieldOffsets() const {
RawFunction* Class::GetInvocationDispatcher(const String& target_name,
const Array& args_desc,
- RawFunction::Kind kind) const {
+ RawFunction::Kind kind,
+ bool create_if_absent) const {
enum {
kNameIndex = 0,
kArgsDescIndex,
@@ -2632,7 +2633,7 @@ RawFunction* Class::GetInvocationDispatcher(const String& target_name,
}
}
- if (dispatcher.IsNull()) {
+ if (dispatcher.IsNull() && create_if_absent) {
if (i == cache.Length()) {
// Allocate new larger cache.
intptr_t new_len = (cache.Length() == 0)
« no previous file with comments | « runtime/vm/object.h ('k') | runtime/vm/object_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698