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

Unified Diff: vm/object.cc

Issue 9252033: Improve compilation 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.h ('k') | vm/parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vm/object.cc
===================================================================
--- vm/object.cc (revision 3413)
+++ vm/object.cc (working copy)
@@ -1480,46 +1480,19 @@
RawFunction* Class::LookupDynamicFunction(const String& name) const {
Function& function = Function::Handle(LookupFunction(name));
- if (function.IsNull() || function.is_static()) {
+ if (function.IsNull() || !function.IsDynamicFunction()) {
return Function::null();
}
- switch (function.kind()) {
- case RawFunction::kFunction:
- case RawFunction::kGetterFunction:
- case RawFunction::kSetterFunction:
- case RawFunction::kImplicitGetter:
- case RawFunction::kImplicitSetter:
- return function.raw();
- case RawFunction::kConstructor:
- case RawFunction::kConstImplicitGetter:
- case RawFunction::kAbstract:
- return Function::null();
- default:
- UNREACHABLE();
- return Function::null();
- }
+ return function.raw();
}
RawFunction* Class::LookupStaticFunction(const String& name) const {
Function& function = Function::Handle(LookupFunction(name));
- if (function.IsNull() || !function.is_static()) {
+ if (function.IsNull() || !function.IsStaticFunction()) {
return Function::null();
}
- switch (function.kind()) {
- case RawFunction::kFunction:
- case RawFunction::kGetterFunction:
- case RawFunction::kSetterFunction:
- case RawFunction::kImplicitGetter:
- case RawFunction::kImplicitSetter:
- case RawFunction::kConstImplicitGetter:
- return function.raw();
- case RawFunction::kConstructor:
- return Function::null();
- default:
- UNREACHABLE();
- return Function::null();
- }
+ return function.raw();
}
@@ -6566,12 +6539,12 @@
intptr_t hash = String::Hash(str, begin_index, len);
const Array& symbol_table =
- Array::Handle(isolate->object_store()->symbol_table());
+ Array::Handle(isolate, isolate->object_store()->symbol_table());
// Last element of the array is the number of used elements.
intptr_t table_size = symbol_table.Length() - 1;
intptr_t index = hash % table_size;
- String& symbol = String::Handle();
+ String& symbol = String::Handle(isolate, String::null());
symbol ^= symbol_table.At(index);
while (!symbol.IsNull() && !symbol.Equals(str, begin_index, len)) {
index = (index + 1) % table_size; // Move to next element.
« no previous file with comments | « vm/object.h ('k') | vm/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698