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

Unified Diff: runtime/vm/object.h

Issue 1320673012: Lookup getter/setter symbols before alllocating them, thus eliminating extra String allocations in … (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Formatting 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/intermediate_language.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.h
diff --git a/runtime/vm/object.h b/runtime/vm/object.h
index 369f87a6c1085ac7eedd33e4aca01a41a077c59e..58e3670944dbc470e4b3321a833fafdf71eb2a4f 100644
--- a/runtime/vm/object.h
+++ b/runtime/vm/object.h
@@ -2983,8 +2983,12 @@ class Field : public Object {
// Constructs getter and setter names for fields and vice versa.
static RawString* GetterName(const String& field_name);
static RawString* GetterSymbol(const String& field_name);
+ // Returns String::null() if getter symbol does not exist.
+ static RawString* LookupGetterSymbol(const String& field_name);
static RawString* SetterName(const String& field_name);
static RawString* SetterSymbol(const String& field_name);
+ // Returns String::null() if setter symbol does not exist.
+ static RawString* LookupSetterSymbol(const String& field_name);
static RawString* NameFromGetter(const String& getter_name);
static RawString* NameFromSetter(const String& setter_name);
static bool IsGetterName(const String& function_name);
@@ -5616,7 +5620,9 @@ class Integer : public Number {
RawInteger* ArithmeticOp(Token::Kind operation,
const Integer& other,
Heap::Space space = Heap::kNew) const;
- RawInteger* BitOp(Token::Kind operation, const Integer& other) const;
+ RawInteger* BitOp(Token::Kind operation,
+ const Integer& other,
+ Heap::Space space = Heap::kNew) const;
// Returns true if the Integer does not fit in a Javascript integer.
bool CheckJavascriptIntegerOverflow() const;
@@ -5677,6 +5683,7 @@ class Smi : public Integer {
RawInteger* ShiftOp(Token::Kind kind,
const Smi& other,
+ Heap::Space space = Heap::kNew,
const bool silent = false) const;
void operator=(RawSmi* value) {
« no previous file with comments | « runtime/vm/intermediate_language.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698