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

Unified Diff: runtime/vm/object.cc

Issue 1441473002: Remove dead code (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 1 month 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') | no next file » | 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 e02cd88e6a7a10af0d1344fa300a04aaaae2e2c2..abfffcb91924bb63d1e63a64c620fc7de26dbc3a 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -4307,33 +4307,6 @@ RawFunction* Class::LookupAccessorFunction(const char* prefix,
}
-RawFunction* Class::LookupFunctionAtToken(intptr_t token_pos) const {
- // TODO(hausner): we can shortcut the negative case if we knew the
- // beginning and end token position of the class.
- Thread* thread = Thread::Current();
- Zone* zone = thread->zone();
- if (EnsureIsFinalized(thread) != Error::null()) {
- return Function::null();
- }
- Function& func = Function::Handle(zone);
- func = LookupClosureFunction(token_pos);
- if (!func.IsNull()) {
- return func.raw();
- }
- Array& funcs = Array::Handle(zone, functions());
- intptr_t len = funcs.Length();
- for (intptr_t i = 0; i < len; i++) {
- func ^= funcs.At(i);
- if ((func.token_pos() <= token_pos) &&
- (token_pos <= func.end_token_pos())) {
- return func.raw();
- }
- }
- // No function found.
- return Function::null();
-}
-
-
RawField* Class::LookupInstanceField(const String& name) const {
return LookupField(name, kInstance);
}
@@ -9841,24 +9814,6 @@ RawScript* Library::LookupScript(const String& url) const {
}
-RawFunction* Library::LookupFunctionInScript(const Script& script,
- intptr_t token_pos) const {
- Class& cls = Class::Handle();
- Function& func = Function::Handle();
- ClassDictionaryIterator it(*this, ClassDictionaryIterator::kIteratePrivate);
- while (it.HasNext()) {
- cls = it.GetNextClass();
- if (script.raw() == cls.script()) {
- func = cls.LookupFunctionAtToken(token_pos);
- if (!func.IsNull()) {
- return func.raw();
- }
- }
- }
- return Function::null();
-}
-
-
RawObject* Library::LookupLocalObject(const String& name) const {
intptr_t index;
return LookupEntry(name, &index);
« no previous file with comments | « runtime/vm/object.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698