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

Unified Diff: runtime/vm/flow_graph_compiler.cc

Issue 10665038: Remove old code generator. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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_compiler.cc
===================================================================
--- runtime/vm/flow_graph_compiler.cc (revision 9089)
+++ runtime/vm/flow_graph_compiler.cc (working copy)
@@ -6,6 +6,7 @@
#include "vm/flow_graph_compiler.h"
+#include "vm/dart_entry.h"
#include "vm/debugger.h"
#include "vm/il_printer.h"
#include "vm/intrinsifier.h"
@@ -71,6 +72,13 @@
}
+bool FlowGraphCompiler::CanOptimize() {
+ return !FLAG_report_usage_count &&
+ (FLAG_optimization_counter_threshold >= 0) &&
+ !Isolate::Current()->debugger()->IsActive();
+}
+
+
void FlowGraphCompiler::VisitBlocks() {
for (intptr_t i = 0; i < block_order().length(); ++i) {
ASSERT(frame_register_allocator()->IsSpilled());
@@ -222,17 +230,9 @@
}
-static bool CanOptimize() {
- return !FLAG_report_usage_count &&
- (FLAG_optimization_counter_threshold >= 0) &&
- !Isolate::Current()->debugger()->IsActive();
-}
-
-
// Returns 'true' if code generation for this function is complete, i.e.,
// no fall-through to regular code is needed.
bool FlowGraphCompiler::TryIntrinsify() {
- if (!CanOptimize()) return false;
// Intrinsification skips arguments checks, therefore disable if in checked
// mode.
if (FLAG_intrinsify && !FLAG_trace_functions && !FLAG_enable_type_checks) {
@@ -285,7 +285,7 @@
cid,
checked_argument_count));
const Array& arguments_descriptor =
- CodeGenerator::ArgumentsDescriptor(argument_count, argument_names);
+ DartEntry::ArgumentsDescriptor(argument_count, argument_names);
uword label_address = 0;
switch (checked_argument_count) {
case 1:
@@ -320,7 +320,7 @@
ASSERT(frame_register_allocator()->IsSpilled());
const Array& arguments_descriptor =
- CodeGenerator::ArgumentsDescriptor(argument_count, argument_names);
+ DartEntry::ArgumentsDescriptor(argument_count, argument_names);
const intptr_t descr_offset = EmitStaticCall(function,
arguments_descriptor,
argument_count);

Powered by Google App Engine
This is Rietveld 408576698