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

Side by Side Diff: runtime/vm/flow_graph_builder.cc

Issue 10824349: Implement class id checks as a separate instruction and add a local CSE optimization pass. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/vm/compiler.cc ('k') | runtime/vm/flow_graph_optimizer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/flow_graph_builder.h" 5 #include "vm/flow_graph_builder.h"
6 6
7 #include "vm/ast_printer.h" 7 #include "vm/ast_printer.h"
8 #include "vm/code_descriptors.h" 8 #include "vm/code_descriptors.h"
9 #include "vm/dart_entry.h" 9 #include "vm/dart_entry.h"
10 #include "vm/flags.h" 10 #include "vm/flags.h"
(...skipping 1951 matching lines...) Expand 10 before | Expand all | Expand 10 after
1962 ReturnComputation(store); 1962 ReturnComputation(store);
1963 } 1963 }
1964 1964
1965 1965
1966 void EffectGraphVisitor::VisitLoadInstanceFieldNode( 1966 void EffectGraphVisitor::VisitLoadInstanceFieldNode(
1967 LoadInstanceFieldNode* node) { 1967 LoadInstanceFieldNode* node) {
1968 ValueGraphVisitor for_instance(owner(), temp_index()); 1968 ValueGraphVisitor for_instance(owner(), temp_index());
1969 node->instance()->Visit(&for_instance); 1969 node->instance()->Visit(&for_instance);
1970 Append(for_instance); 1970 Append(for_instance);
1971 LoadInstanceFieldComp* load = new LoadInstanceFieldComp( 1971 LoadInstanceFieldComp* load = new LoadInstanceFieldComp(
1972 node->field(), for_instance.value(), NULL); 1972 node->field(), for_instance.value(), NULL,
1973 false); // Can not deoptimize.
1973 ReturnComputation(load); 1974 ReturnComputation(load);
1974 } 1975 }
1975 1976
1976 1977
1977 void EffectGraphVisitor::VisitStoreInstanceFieldNode( 1978 void EffectGraphVisitor::VisitStoreInstanceFieldNode(
1978 StoreInstanceFieldNode* node) { 1979 StoreInstanceFieldNode* node) {
1979 ValueGraphVisitor for_instance(owner(), temp_index()); 1980 ValueGraphVisitor for_instance(owner(), temp_index());
1980 node->instance()->Visit(&for_instance); 1981 node->instance()->Visit(&for_instance);
1981 Append(for_instance); 1982 Append(for_instance);
1982 ValueGraphVisitor for_value(owner(), for_instance.temp_index()); 1983 ValueGraphVisitor for_value(owner(), for_instance.temp_index());
(...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after
2414 intptr_t len = OS::SNPrint(NULL, 0, kFormat, function_name, reason) + 1; 2415 intptr_t len = OS::SNPrint(NULL, 0, kFormat, function_name, reason) + 1;
2415 char* chars = Isolate::Current()->current_zone()->Alloc<char>(len); 2416 char* chars = Isolate::Current()->current_zone()->Alloc<char>(len);
2416 OS::SNPrint(chars, len, kFormat, function_name, reason); 2417 OS::SNPrint(chars, len, kFormat, function_name, reason);
2417 const Error& error = Error::Handle( 2418 const Error& error = Error::Handle(
2418 LanguageError::New(String::Handle(String::New(chars)))); 2419 LanguageError::New(String::Handle(String::New(chars))));
2419 Isolate::Current()->long_jump_base()->Jump(1, error); 2420 Isolate::Current()->long_jump_base()->Jump(1, error);
2420 } 2421 }
2421 2422
2422 2423
2423 } // namespace dart 2424 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/compiler.cc ('k') | runtime/vm/flow_graph_optimizer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698