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

Unified Diff: runtime/vm/opt_code_generator_ia32.cc

Issue 8678033: Move more nodes to the optimizing code generator. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 9 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/opt_code_generator_ia32.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/opt_code_generator_ia32.cc
===================================================================
--- runtime/vm/opt_code_generator_ia32.cc (revision 1822)
+++ runtime/vm/opt_code_generator_ia32.cc (working copy)
@@ -2554,6 +2554,51 @@
}
}
+
+void OptimizingCodeGenerator::VisitReturnNode(ReturnNode* node) {
+ if ((node->inlined_finally_list_length() > 0) || FLAG_enable_type_checks) {
+ CodeGenerator::VisitReturnNode(node);
+ return;
+ }
+ ASSERT(!IsResultNeeded(node));
+ ASSERT(node->value() != NULL);
+ VisitLoadOne(node->value(), EAX);
+ GenerateReturnEpilog();
+}
+
+
+void OptimizingCodeGenerator::VisitSequenceNode(SequenceNode* node_sequence) {
+ if (FLAG_enable_type_checks ||
+ (node_sequence->scope()->num_context_variables() > 0)) {
+ CodeGenerator::VisitSequenceNode(node_sequence);
+ return;
+ }
+ for (int i = 0; i < node_sequence->length(); i++) {
+ AstNode* child_node = node_sequence->NodeAt(i);
+ state()->set_root_node(child_node);
+ child_node->Visit(this);
+ }
+ if (node_sequence->label() != NULL) {
+ __ Bind(node_sequence->label()->break_label());
+ }
+}
+
+
+void OptimizingCodeGenerator::VisitStoreInstanceFieldNode(
+ StoreInstanceFieldNode* node) {
+ if (FLAG_enable_type_checks) {
+ CodeGenerator::VisitStoreInstanceFieldNode(node);
+ return;
+ }
+ VisitLoadTwo(node->instance(), node->value(), EDX, EAX);
+ __ StoreIntoObject(EDX, FieldAddress(EDX, node->field().Offset()), EAX);
+ if (IsResultNeeded(node)) {
+ // The result is the input value.
+ __ pushl(EAX);
+ }
+}
+
+
} // namespace dart
#endif // defined TARGET_ARCH_IA32
« no previous file with comments | « runtime/vm/opt_code_generator_ia32.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698