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

Unified Diff: runtime/vm/flow_graph_builder.cc

Issue 14366007: Handle built-in function identical correctly (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 8 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 | « no previous file | runtime/vm/parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_builder.cc
===================================================================
--- runtime/vm/flow_graph_builder.cc (revision 21709)
+++ runtime/vm/flow_graph_builder.cc (working copy)
@@ -1929,30 +1929,6 @@
// <Expression> ::= StaticCall { function: Function
// arguments: <ArgumentList> }
void EffectGraphVisitor::VisitStaticCallNode(StaticCallNode* node) {
- if (node->function().name() == Symbols::Identical().raw()) {
- // Attempt to replace top level defined 'identical' from the core
- // library with strict equal early on.
- // TODO(hausner): Evaluate if this can happen at AST building time.
- const Class& cls = Class::Handle(node->function().Owner());
- if (cls.IsTopLevel()) {
- const Library& core_lib = Library::Handle(Library::CoreLibrary());
- if (cls.library() == core_lib.raw()) {
- ASSERT(node->arguments()->length() == 2);
- ValueGraphVisitor for_left_value(owner(), temp_index());
- node->arguments()->NodeAt(0)->Visit(&for_left_value);
- Append(for_left_value);
- ValueGraphVisitor for_right_value(owner(), temp_index());
- node->arguments()->NodeAt(1)->Visit(&for_right_value);
- Append(for_right_value);
- StrictCompareInstr* comp = new StrictCompareInstr(
- Token::kEQ_STRICT,
- for_left_value.value(),
- for_right_value.value());
- ReturnDefinition(comp);
- return;
- }
- }
- }
ZoneGrowableArray<PushArgumentInstr*>* arguments =
new ZoneGrowableArray<PushArgumentInstr*>(node->arguments()->length());
BuildPushArguments(*node->arguments(), arguments);
« no previous file with comments | « no previous file | runtime/vm/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698