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

Unified Diff: runtime/vm/kernel_reader.h

Issue 2658693002: Removed usage of std::map and std::vector from kernel code. Issue #28064. (Closed)
Patch Set: Removed usage of std::map and std::vector from kernel code. Issue #28064. Created 3 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 | « runtime/vm/kernel_binary.cc ('k') | runtime/vm/kernel_to_il.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/kernel_reader.h
diff --git a/runtime/vm/kernel_reader.h b/runtime/vm/kernel_reader.h
index 3d20f90a6e245f7160e546bec58d5a8f7c9ac1f7..092b90d3702c9cfda1f11eaf51d54cac0a307300 100644
--- a/runtime/vm/kernel_reader.h
+++ b/runtime/vm/kernel_reader.h
@@ -34,18 +34,18 @@ template <typename KernelType, typename VmType>
class Mapping {
public:
bool Lookup(KernelType* node, VmType** handle) {
- typename MapType::iterator value = map_.find(node);
- if (value != map_.end()) {
- *handle = value->second;
+ typename MapType::Pair* pair = map_.LookupPair(node);
+ if (pair != NULL) {
+ *handle = pair->value;
return true;
}
return false;
}
- void Insert(KernelType* node, VmType* object) { map_[node] = object; }
+ void Insert(KernelType* node, VmType* object) { map_.Insert(node, object); }
private:
- typedef typename std::map<KernelType*, VmType*> MapType;
+ typedef MallocMap<KernelType, VmType*> MapType;
MapType map_;
};
« no previous file with comments | « runtime/vm/kernel_binary.cc ('k') | runtime/vm/kernel_to_il.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698