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

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

Issue 299263005: More reduction of accessing TLS by caching/passing isolate value. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 7 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/flow_graph.cc ('k') | runtime/vm/object.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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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/globals.h" // Needed here to get TARGET_ARCH_XXX. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_XXX.
6 6
7 #include "vm/flow_graph_compiler.h" 7 #include "vm/flow_graph_compiler.h"
8 8
9 #include "vm/cha.h" 9 #include "vm/cha.h"
10 #include "vm/dart_entry.h" 10 #include "vm/dart_entry.h"
(...skipping 699 matching lines...) Expand 10 before | Expand all | Expand 10 after
710 code.set_pc_descriptors(descriptors); 710 code.set_pc_descriptors(descriptors);
711 } 711 }
712 712
713 713
714 void FlowGraphCompiler::FinalizeDeoptInfo(const Code& code) { 714 void FlowGraphCompiler::FinalizeDeoptInfo(const Code& code) {
715 // For functions with optional arguments, all incoming arguments are copied 715 // For functions with optional arguments, all incoming arguments are copied
716 // to spill slots. The deoptimization environment does not track them. 716 // to spill slots. The deoptimization environment does not track them.
717 const Function& function = parsed_function().function(); 717 const Function& function = parsed_function().function();
718 const intptr_t incoming_arg_count = 718 const intptr_t incoming_arg_count =
719 function.HasOptionalParameters() ? 0 : function.num_fixed_parameters(); 719 function.HasOptionalParameters() ? 0 : function.num_fixed_parameters();
720 DeoptInfoBuilder builder(incoming_arg_count); 720 DeoptInfoBuilder builder(isolate(), incoming_arg_count);
721 721
722 const Array& array = 722 const Array& array =
723 Array::Handle(Array::New(DeoptTable::SizeFor(deopt_infos_.length()), 723 Array::Handle(Array::New(DeoptTable::SizeFor(deopt_infos_.length()),
724 Heap::kOld)); 724 Heap::kOld));
725 Smi& offset = Smi::Handle(); 725 Smi& offset = Smi::Handle();
726 DeoptInfo& info = DeoptInfo::Handle(); 726 DeoptInfo& info = DeoptInfo::Handle();
727 Smi& reason = Smi::Handle(); 727 Smi& reason = Smi::Handle();
728 for (intptr_t i = 0; i < deopt_infos_.length(); i++) { 728 for (intptr_t i = 0; i < deopt_infos_.length(); i++) {
729 offset = Smi::New(deopt_infos_[i]->pc_offset()); 729 offset = Smi::New(deopt_infos_[i]->pc_offset());
730 info = deopt_infos_[i]->CreateDeoptInfo(this, &builder, array); 730 info = deopt_infos_[i]->CreateDeoptInfo(this, &builder, array);
(...skipping 574 matching lines...) Expand 10 before | Expand all | Expand 10 after
1305 1305
1306 for (int i = 0; i < len; i++) { 1306 for (int i = 0; i < len; i++) {
1307 sorted->Add(CidTarget(ic_data.GetReceiverClassIdAt(i), 1307 sorted->Add(CidTarget(ic_data.GetReceiverClassIdAt(i),
1308 &Function::ZoneHandle(ic_data.GetTargetAt(i)), 1308 &Function::ZoneHandle(ic_data.GetTargetAt(i)),
1309 ic_data.GetCountAt(i))); 1309 ic_data.GetCountAt(i)));
1310 } 1310 }
1311 sorted->Sort(HighestCountFirst); 1311 sorted->Sort(HighestCountFirst);
1312 } 1312 }
1313 1313
1314 } // namespace dart 1314 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698