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

Unified Diff: runtime/vm/object.cc

Issue 259393002: Enums cleanup. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 8 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/raw_object.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.cc
===================================================================
--- runtime/vm/object.cc (revision 35558)
+++ runtime/vm/object.cc (working copy)
@@ -3673,33 +3673,33 @@
}
-RawFunction* Class::CheckFunctionType(const Function& func, intptr_t type) {
- if (type == kInstance) {
+RawFunction* Class::CheckFunctionType(const Function& func, MemberKind kind) {
+ if (kind == kInstance) {
if (func.IsDynamicFunction()) {
return func.raw();
}
- } else if (type == kStatic) {
+ } else if (kind == kStatic) {
if (func.IsStaticFunction()) {
return func.raw();
}
- } else if (type == kConstructor) {
+ } else if (kind == kConstructor) {
if (func.IsConstructor()) {
ASSERT(!func.is_static());
return func.raw();
}
- } else if (type == kFactory) {
+ } else if (kind == kFactory) {
if (func.IsFactory()) {
ASSERT(func.is_static());
return func.raw();
}
- } else if (type == kAny) {
+ } else if (kind == kAny) {
return func.raw();
}
return Function::null();
}
-RawFunction* Class::LookupFunction(const String& name, intptr_t type) const {
+RawFunction* Class::LookupFunction(const String& name, MemberKind kind) const {
Isolate* isolate = Isolate::Current();
if (EnsureIsFinalized(isolate) != Error::null()) {
return Function::null();
@@ -3717,7 +3717,7 @@
for (intptr_t i = 0; i < len; i++) {
function ^= funcs.At(i);
if (function.name() == name.raw()) {
- return CheckFunctionType(function, type);
+ return CheckFunctionType(function, kind);
}
}
} else {
@@ -3727,7 +3727,7 @@
function ^= funcs.At(i);
function_name ^= function.name();
if (function_name.Equals(name)) {
- return CheckFunctionType(function, type);
+ return CheckFunctionType(function, kind);
}
}
}
@@ -3737,7 +3737,7 @@
RawFunction* Class::LookupFunctionAllowPrivate(const String& name,
- intptr_t type) const {
+ MemberKind kind) const {
Isolate* isolate = Isolate::Current();
if (EnsureIsFinalized(isolate) != Error::null()) {
return Function::null();
@@ -3755,7 +3755,7 @@
function ^= funcs.At(i);
function_name ^= function.name();
if (String::EqualsIgnoringPrivateKey(function_name, name)) {
- return CheckFunctionType(function, type);
+ return CheckFunctionType(function, kind);
}
}
// No function found.
@@ -3842,7 +3842,7 @@
}
-RawField* Class::LookupField(const String& name, intptr_t type) const {
+RawField* Class::LookupField(const String& name, MemberKind kind) const {
Isolate* isolate = Isolate::Current();
if (EnsureIsFinalized(isolate) != Error::null()) {
return Field::null();
@@ -3860,15 +3860,15 @@
field ^= flds.At(i);
field_name ^= field.name();
if (String::EqualsIgnoringPrivateKey(field_name, name)) {
- if (type == kInstance) {
+ if (kind == kInstance) {
if (!field.is_static()) {
return field.raw();
}
- } else if (type == kStatic) {
+ } else if (kind == kStatic) {
if (field.is_static()) {
return field.raw();
}
- } else if (type == kAny) {
+ } else if (kind == kAny) {
return field.raw();
}
return Field::null();
« no previous file with comments | « runtime/vm/object.h ('k') | runtime/vm/raw_object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698