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

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

Issue 608913002: Track references to allocation stubs via static_calls_table, instead of keeping two referencers ali… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 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 | « runtime/vm/flow_graph_compiler.h ('k') | runtime/vm/heap.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/bit_vector.h" 9 #include "vm/bit_vector.h"
10 #include "vm/cha.h" 10 #include "vm/cha.h"
(...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after
533 ASSERT(Code::kSCallTableOffsetEntry == 0); 533 ASSERT(Code::kSCallTableOffsetEntry == 0);
534 static_calls_target_table_.Add( 534 static_calls_target_table_.Add(
535 Smi::Handle(Smi::New(assembler()->CodeSize()))); 535 Smi::Handle(Smi::New(assembler()->CodeSize())));
536 ASSERT(Code::kSCallTableFunctionEntry == 1); 536 ASSERT(Code::kSCallTableFunctionEntry == 1);
537 static_calls_target_table_.Add(func); 537 static_calls_target_table_.Add(func);
538 ASSERT(Code::kSCallTableCodeEntry == 2); 538 ASSERT(Code::kSCallTableCodeEntry == 2);
539 static_calls_target_table_.Add(Code::Handle()); 539 static_calls_target_table_.Add(Code::Handle());
540 } 540 }
541 541
542 542
543 void FlowGraphCompiler::AddStubCallTarget(const Code& code) {
544 ASSERT(Code::kSCallTableEntryLength == 3);
545 ASSERT(Code::kSCallTableOffsetEntry == 0);
546 static_calls_target_table_.Add(
547 Smi::Handle(Smi::New(assembler()->CodeSize())));
548 ASSERT(Code::kSCallTableFunctionEntry == 1);
549 static_calls_target_table_.Add(Function::Handle());
550 ASSERT(Code::kSCallTableCodeEntry == 2);
551 static_calls_target_table_.Add(code);
552 }
553
554
543 void FlowGraphCompiler::AddDeoptIndexAtCall(intptr_t deopt_id, 555 void FlowGraphCompiler::AddDeoptIndexAtCall(intptr_t deopt_id,
544 intptr_t token_pos) { 556 intptr_t token_pos) {
545 ASSERT(is_optimizing()); 557 ASSERT(is_optimizing());
546 ASSERT(!intrinsic_mode()); 558 ASSERT(!intrinsic_mode());
547 CompilerDeoptInfo* info = 559 CompilerDeoptInfo* info =
548 new CompilerDeoptInfo(deopt_id, 560 new CompilerDeoptInfo(deopt_id,
549 ICData::kDeoptAtCall, 561 ICData::kDeoptAtCall,
550 pending_deoptimization_env_); 562 pending_deoptimization_env_);
551 info->set_pc_offset(assembler()->CodeSize()); 563 info->set_pc_offset(assembler()->CodeSize());
552 deopt_infos_.Add(info); 564 deopt_infos_.Add(info);
(...skipping 917 matching lines...) Expand 10 before | Expand all | Expand 10 after
1470 threshold = FLAG_optimization_counter_scale * basic_blocks + 1482 threshold = FLAG_optimization_counter_scale * basic_blocks +
1471 FLAG_min_optimization_counter_threshold; 1483 FLAG_min_optimization_counter_threshold;
1472 if (threshold > FLAG_optimization_counter_threshold) { 1484 if (threshold > FLAG_optimization_counter_threshold) {
1473 threshold = FLAG_optimization_counter_threshold; 1485 threshold = FLAG_optimization_counter_threshold;
1474 } 1486 }
1475 } 1487 }
1476 return threshold; 1488 return threshold;
1477 } 1489 }
1478 1490
1479 } // namespace dart 1491 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_compiler.h ('k') | runtime/vm/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698