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

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

Issue 27020002: VM: Fix performance regression introduced by r28408. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 2 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 | « no previous file | runtime/vm/parser.cc » ('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 "lib/invocation_mirror.h" 7 #include "lib/invocation_mirror.h"
8 #include "vm/ast_printer.h" 8 #include "vm/ast_printer.h"
9 #include "vm/bit_vector.h" 9 #include "vm/bit_vector.h"
10 #include "vm/code_descriptors.h" 10 #include "vm/code_descriptors.h"
(...skipping 3094 matching lines...) Expand 10 before | Expand all | Expand 10 after
3105 3105
3106 3106
3107 // StoreInstanceFieldNode does not return result. 3107 // StoreInstanceFieldNode does not return result.
3108 void ValueGraphVisitor::VisitStoreInstanceFieldNode( 3108 void ValueGraphVisitor::VisitStoreInstanceFieldNode(
3109 StoreInstanceFieldNode* node) { 3109 StoreInstanceFieldNode* node) {
3110 UNIMPLEMENTED(); 3110 UNIMPLEMENTED();
3111 } 3111 }
3112 3112
3113 3113
3114 void EffectGraphVisitor::VisitLoadStaticFieldNode(LoadStaticFieldNode* node) { 3114 void EffectGraphVisitor::VisitLoadStaticFieldNode(LoadStaticFieldNode* node) {
3115 if (node->field().is_const()) {
3116 ASSERT(node->field().value() != Object::sentinel().raw());
3117 ASSERT(node->field().value() != Object::transition_sentinel().raw());
3118 Definition* result =
3119 new ConstantInstr(Instance::ZoneHandle(node->field().value()));
3120 return ReturnDefinition(result);
3121 }
3115 Value* field_value = Bind(new ConstantInstr(node->field())); 3122 Value* field_value = Bind(new ConstantInstr(node->field()));
3116 LoadStaticFieldInstr* load = new LoadStaticFieldInstr(field_value); 3123 LoadStaticFieldInstr* load = new LoadStaticFieldInstr(field_value);
3117 ReturnDefinition(load); 3124 ReturnDefinition(load);
3118 } 3125 }
3119 3126
3120 3127
3121 Definition* EffectGraphVisitor::BuildStoreStaticField( 3128 Definition* EffectGraphVisitor::BuildStoreStaticField(
3122 StoreStaticFieldNode* node, bool result_is_needed) { 3129 StoreStaticFieldNode* node, bool result_is_needed) {
3123 ValueGraphVisitor for_value(owner(), temp_index()); 3130 ValueGraphVisitor for_value(owner(), temp_index());
3124 node->value()->Visit(&for_value); 3131 node->value()->Visit(&for_value);
(...skipping 715 matching lines...) Expand 10 before | Expand all | Expand 10 after
3840 intptr_t len = OS::SNPrint(NULL, 0, kFormat, function_name, reason) + 1; 3847 intptr_t len = OS::SNPrint(NULL, 0, kFormat, function_name, reason) + 1;
3841 char* chars = Isolate::Current()->current_zone()->Alloc<char>(len); 3848 char* chars = Isolate::Current()->current_zone()->Alloc<char>(len);
3842 OS::SNPrint(chars, len, kFormat, function_name, reason); 3849 OS::SNPrint(chars, len, kFormat, function_name, reason);
3843 const Error& error = Error::Handle( 3850 const Error& error = Error::Handle(
3844 LanguageError::New(String::Handle(String::New(chars)))); 3851 LanguageError::New(String::Handle(String::New(chars))));
3845 Isolate::Current()->long_jump_base()->Jump(1, error); 3852 Isolate::Current()->long_jump_base()->Jump(1, error);
3846 } 3853 }
3847 3854
3848 3855
3849 } // namespace dart 3856 } // namespace dart
OLDNEW
« 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