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

Unified Diff: runtime/vm/object.h

Issue 1289813005: Use Object::null_instance and Object::null_function and do not create Handles everytime. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 4 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
Index: runtime/vm/object.h
diff --git a/runtime/vm/object.h b/runtime/vm/object.h
index 8d3ef5ed66909c3decd135ee913e2f07ba3a321c..055df48ab06d7886badea92aa89bc162fddcc6fe 100644
--- a/runtime/vm/object.h
+++ b/runtime/vm/object.h
@@ -386,6 +386,10 @@ class Object {
ASSERT(null_instance_ != NULL);
return *null_instance_;
}
+ static const Function& null_function() {
+ ASSERT(null_function_ != NULL);
+ return *null_function_;
+ }
static const TypeArguments& null_type_arguments() {
ASSERT(null_type_arguments_ != NULL);
return *null_type_arguments_;
@@ -787,6 +791,7 @@ class Object {
static Array* null_array_;
static String* null_string_;
static Instance* null_instance_;
+ static Function* null_function_;
static TypeArguments* null_type_arguments_;
static Array* empty_array_;
static Array* zero_array_;
« no previous file with comments | « runtime/vm/dart_api_impl.cc ('k') | runtime/vm/object.cc » ('j') | runtime/vm/object.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698