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

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

Issue 12378039: Inline ByteArray setters like setUint8 in the optimizer. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: rebased Created 7 years, 9 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/flow_graph_optimizer.h » ('j') | runtime/vm/flow_graph_optimizer.cc » ('J')
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/code_descriptors.h" 9 #include "vm/code_descriptors.h"
10 #include "vm/dart_entry.h" 10 #include "vm/dart_entry.h"
11 #include "vm/flags.h" 11 #include "vm/flags.h"
12 #include "vm/flow_graph_compiler.h"
12 #include "vm/il_printer.h" 13 #include "vm/il_printer.h"
13 #include "vm/intermediate_language.h" 14 #include "vm/intermediate_language.h"
14 #include "vm/longjump.h" 15 #include "vm/longjump.h"
15 #include "vm/object_store.h" 16 #include "vm/object_store.h"
16 #include "vm/os.h" 17 #include "vm/os.h"
17 #include "vm/parser.h" 18 #include "vm/parser.h"
18 #include "vm/resolver.h" 19 #include "vm/resolver.h"
19 #include "vm/stub_code.h" 20 #include "vm/stub_code.h"
20 #include "vm/symbols.h" 21 #include "vm/symbols.h"
21 22
(...skipping 1660 matching lines...) Expand 10 before | Expand all | Expand 10 after
1682 new LoadLocalInstr(node->temp_local(), owner()->context_level())); 1683 new LoadLocalInstr(node->temp_local(), owner()->context_level()));
1683 Value* index = Bind(new ConstantInstr(Smi::ZoneHandle(Smi::New(i)))); 1684 Value* index = Bind(new ConstantInstr(Smi::ZoneHandle(Smi::New(i))));
1684 ValueGraphVisitor for_value(owner(), temp_index()); 1685 ValueGraphVisitor for_value(owner(), temp_index());
1685 node->ElementAt(i)->Visit(&for_value); 1686 node->ElementAt(i)->Visit(&for_value);
1686 Append(for_value); 1687 Append(for_value);
1687 // No store barrier needed for constants. 1688 // No store barrier needed for constants.
1688 const StoreBarrierType emit_store_barrier = 1689 const StoreBarrierType emit_store_barrier =
1689 for_value.value()->BindsToConstant() 1690 for_value.value()->BindsToConstant()
1690 ? kNoStoreBarrier 1691 ? kNoStoreBarrier
1691 : kEmitStoreBarrier; 1692 : kEmitStoreBarrier;
1693 intptr_t index_scale = FlowGraphCompiler::ElementSizeFor(class_id);
1692 StoreIndexedInstr* store = new StoreIndexedInstr( 1694 StoreIndexedInstr* store = new StoreIndexedInstr(
1693 array, index, for_value.value(), 1695 array, index, for_value.value(),
1694 emit_store_barrier, class_id, deopt_id); 1696 emit_store_barrier, index_scale, class_id, deopt_id);
1695 Do(store); 1697 Do(store);
1696 } 1698 }
1697 1699
1698 ReturnDefinition( 1700 ReturnDefinition(
1699 new LoadLocalInstr(node->temp_local(), owner()->context_level())); 1701 new LoadLocalInstr(node->temp_local(), owner()->context_level()));
1700 } 1702 }
1701 1703
1702 1704
1703 void EffectGraphVisitor::VisitClosureNode(ClosureNode* node) { 1705 void EffectGraphVisitor::VisitClosureNode(ClosureNode* node) {
1704 const Function& function = node->function(); 1706 const Function& function = node->function();
(...skipping 1592 matching lines...) Expand 10 before | Expand all | Expand 10 after
3297 intptr_t len = OS::SNPrint(NULL, 0, kFormat, function_name, reason) + 1; 3299 intptr_t len = OS::SNPrint(NULL, 0, kFormat, function_name, reason) + 1;
3298 char* chars = Isolate::Current()->current_zone()->Alloc<char>(len); 3300 char* chars = Isolate::Current()->current_zone()->Alloc<char>(len);
3299 OS::SNPrint(chars, len, kFormat, function_name, reason); 3301 OS::SNPrint(chars, len, kFormat, function_name, reason);
3300 const Error& error = Error::Handle( 3302 const Error& error = Error::Handle(
3301 LanguageError::New(String::Handle(String::New(chars)))); 3303 LanguageError::New(String::Handle(String::New(chars))));
3302 Isolate::Current()->long_jump_base()->Jump(1, error); 3304 Isolate::Current()->long_jump_base()->Jump(1, error);
3303 } 3305 }
3304 3306
3305 3307
3306 } // namespace dart 3308 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/flow_graph_optimizer.h » ('j') | runtime/vm/flow_graph_optimizer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698