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

Unified Diff: runtime/vm/flow_graph.cc

Issue 313403004: Fix deferred library code disabling for inlined functions. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 6 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
Index: runtime/vm/flow_graph.cc
===================================================================
--- runtime/vm/flow_graph.cc (revision 37101)
+++ runtime/vm/flow_graph.cc (working copy)
@@ -42,7 +42,8 @@
use_far_branches_(false),
loop_headers_(NULL),
loop_invariant_loads_(NULL),
- guarded_fields_(builder.guarded_fields()) {
+ guarded_fields_(builder.guarded_fields()),
+ deferred_prefixes_(builder.deferred_prefixes()) {
DiscoverBlocks();
}
@@ -63,6 +64,21 @@
}
+void FlowGraph::AddToDeferredPrefixes(
Cutch 2014/06/06 21:55:48 What about making this a non-static function so la
srdjan 2014/06/06 22:06:16 Done.
+ ZoneGrowableArray<const LibraryPrefix*>* to,
+ ZoneGrowableArray<const LibraryPrefix*>* from) {
+ for (intptr_t i = 0; i < from->length(); i++) {
+ const LibraryPrefix* prefix = (*from)[i];
+ for (intptr_t j = 0; j < to->length(); j++) {
+ if ((*to)[j]->raw() == prefix->raw()) {
+ return;
+ }
+ }
+ to->Add(prefix);
+ }
+}
+
+
bool FlowGraph::ShouldReorderBlocks(const Function& function,
bool is_optimized) {
return is_optimized && FLAG_reorder_basic_blocks && !function.is_intrinsic();

Powered by Google App Engine
This is Rietveld 408576698