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

Unified Diff: vm/parser.cc

Issue 9265021: Improve compile times for swarm application startup (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 11 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 | « vm/object.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vm/parser.cc
===================================================================
--- vm/parser.cc (revision 3423)
+++ vm/parser.cc (working copy)
@@ -2019,11 +2019,11 @@
int expected_num_parameters = 0;
if (method->IsGetter()) {
expected_num_parameters = (method->has_static) ? 0 : 1;
- method->name = &String::ZoneHandle(Field::GetterName(*method->name));
+ method->name = &String::ZoneHandle(Field::GetterSymbol(*method->name));
} else {
ASSERT(method->IsSetter());
expected_num_parameters = (method->has_static) ? 1 : 2;
- method->name = &String::ZoneHandle(Field::SetterName(*method->name));
+ method->name = &String::ZoneHandle(Field::SetterSymbol(*method->name));
}
if ((method->params.num_fixed_parameters != expected_num_parameters) ||
(method->params.num_optional_parameters != 0)) {
@@ -2218,7 +2218,8 @@
// create a kConstImplicitGetter getter method.
if (field->has_static && has_initializer) {
class_field.set_value(Instance::Handle(Object::sentinel()));
- String& getter_name = String::ZoneHandle(Field::GetterName(*field->name));
+ String& getter_name =
+ String::ZoneHandle(Field::GetterSymbol(*field->name));
Function& getter = Function::ZoneHandle(
Function::New(getter_name, RawFunction::kConstImplicitGetter,
field->has_static, field->has_final,
@@ -2230,7 +2231,7 @@
// For instance fields, we create implicit getter and setter methods.
if (!field->has_static) {
String& getter_name =
- String::ZoneHandle(Field::GetterName(*field->name));
+ String::ZoneHandle(Field::GetterSymbol(*field->name));
Function& getter = Function::ZoneHandle(
Function::New(getter_name, RawFunction::kImplicitGetter,
field->has_static, field->has_final,
@@ -2243,7 +2244,7 @@
if (!field->has_final) {
// Build a setter accessor for non-const fields.
String& setter_name = String::ZoneHandle(
- Field::SetterName(*field->name));
+ Field::SetterSymbol(*field->name));
Function& setter = Function::ZoneHandle(
Function::New(setter_name, RawFunction::kImplicitSetter,
field->has_static, field->has_final,
@@ -3088,7 +3089,7 @@
SkipExpr();
field.set_value(Instance::Handle(Object::sentinel()));
// Create a static const getter.
- String& getter_name = String::ZoneHandle(Field::GetterName(var_name));
+ String& getter_name = String::ZoneHandle(Field::GetterSymbol(var_name));
Function& getter = Function::ZoneHandle(
Function::New(getter_name, RawFunction::kConstImplicitGetter,
is_static, is_final, name_pos));
@@ -3209,10 +3210,10 @@
int expected_num_parameters = -1;
if (is_getter) {
expected_num_parameters = 0;
- accessor_name = Field::GetterName(*field_name);
+ accessor_name = Field::GetterSymbol(*field_name);
} else {
expected_num_parameters = 1;
- accessor_name = Field::SetterName(*field_name);
+ accessor_name = Field::SetterSymbol(*field_name);
}
if ((params.num_fixed_parameters != expected_num_parameters) ||
(params.num_optional_parameters != 0)) {
@@ -6450,7 +6451,6 @@
Class& cls = Class::Handle(isolate, current_class().raw());
Function& func = Function::Handle(isolate, Function::null());
Field& field = Field::Handle(isolate, Field::null());
- String& accessor_name = String::Handle(isolate, String::null());
while (!cls.IsNull()) {
// First check if a field exists.
field = cls.LookupField(ident);
@@ -6475,8 +6475,7 @@
// Now check if a getter/setter method exists for it in which case
// it is still a field.
- accessor_name = Field::GetterName(ident);
- func = cls.LookupFunction(accessor_name);
+ func = cls.LookupGetterFunction(ident);
if (!func.IsNull()) {
if (func.IsDynamicFunction()) {
CheckInstanceFieldAccess(ident_pos, ident);
@@ -6491,8 +6490,7 @@
return true;
}
}
- accessor_name = Field::SetterName(ident);
- func = cls.LookupFunction(accessor_name);
+ func = cls.LookupSetterFunction(ident);
if (!func.IsNull()) {
if (func.IsDynamicFunction()) {
// We create a getter node even though a getter doesn't exist as
« no previous file with comments | « vm/object.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698