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

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

Issue 17501003: Minor cleanups to use null_array(), null_object() and null_string() handles. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 6 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/dart_entry.cc ('k') | runtime/vm/flow_graph_optimizer.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 449 matching lines...) Expand 10 before | Expand all | Expand 10 after
460 const Array& object_array = 460 const Array& object_array =
461 Array::Handle(Array::MakeArray(builder.object_table())); 461 Array::Handle(Array::MakeArray(builder.object_table()));
462 ASSERT(code.object_table() == Array::null()); 462 ASSERT(code.object_table() == Array::null());
463 code.set_object_table(object_array); 463 code.set_object_table(object_array);
464 } 464 }
465 465
466 466
467 void FlowGraphCompiler::FinalizeStackmaps(const Code& code) { 467 void FlowGraphCompiler::FinalizeStackmaps(const Code& code) {
468 if (stackmap_table_builder_ == NULL) { 468 if (stackmap_table_builder_ == NULL) {
469 // The unoptimizing compiler has no stack maps. 469 // The unoptimizing compiler has no stack maps.
470 code.set_stackmaps(Array::Handle()); 470 code.set_stackmaps(Object::null_array());
471 } else { 471 } else {
472 // Finalize the stack map array and add it to the code object. 472 // Finalize the stack map array and add it to the code object.
473 ASSERT(is_optimizing()); 473 ASSERT(is_optimizing());
474 code.set_stackmaps( 474 code.set_stackmaps(
475 Array::Handle(stackmap_table_builder_->FinalizeStackmaps(code))); 475 Array::Handle(stackmap_table_builder_->FinalizeStackmaps(code)));
476 } 476 }
477 } 477 }
478 478
479 479
480 void FlowGraphCompiler::FinalizeVarDescriptors(const Code& code) { 480 void FlowGraphCompiler::FinalizeVarDescriptors(const Code& code) {
(...skipping 607 matching lines...) Expand 10 before | Expand all | Expand 10 after
1088 1088
1089 for (int i = 0; i < len; i++) { 1089 for (int i = 0; i < len; i++) {
1090 sorted->Add(CidTarget(ic_data.GetReceiverClassIdAt(i), 1090 sorted->Add(CidTarget(ic_data.GetReceiverClassIdAt(i),
1091 &Function::ZoneHandle(ic_data.GetTargetAt(i)), 1091 &Function::ZoneHandle(ic_data.GetTargetAt(i)),
1092 ic_data.GetCountAt(i))); 1092 ic_data.GetCountAt(i)));
1093 } 1093 }
1094 sorted->Sort(HighestCountFirst); 1094 sorted->Sort(HighestCountFirst);
1095 } 1095 }
1096 1096
1097 } // namespace dart 1097 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/dart_entry.cc ('k') | runtime/vm/flow_graph_optimizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698