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

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

Issue 12049039: Fix source position for stack traces with optimized top function. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: avoid default arguments by using pending_deoptimization_env_ Created 7 years, 10 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
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/flow_graph_optimizer.h" 5 #include "vm/flow_graph_optimizer.h"
6 6
7 #include "vm/bit_vector.h" 7 #include "vm/bit_vector.h"
8 #include "vm/cha.h" 8 #include "vm/cha.h"
9 #include "vm/flow_graph_builder.h" 9 #include "vm/flow_graph_builder.h"
10 #include "vm/flow_graph_compiler.h" 10 #include "vm/flow_graph_compiler.h"
(...skipping 672 matching lines...) Expand 10 before | Expand all | Expand 10 after
683 // TODO(fschneider): Add support for other array types. 683 // TODO(fschneider): Add support for other array types.
684 UNREACHABLE(); 684 UNREACHABLE();
685 } 685 }
686 AssertAssignableInstr* assert_value = 686 AssertAssignableInstr* assert_value =
687 new AssertAssignableInstr(call->token_pos(), 687 new AssertAssignableInstr(call->token_pos(),
688 value->Copy(), 688 value->Copy(),
689 instantiator, 689 instantiator,
690 type_args, 690 type_args,
691 value_type, 691 value_type,
692 Symbols::Value()); 692 Symbols::Value());
693 InsertBefore(call, assert_value, NULL, Definition::kValue); 693 // Newly inserted instructions that can deoptimize or throw an exception
694 // must have a deoptimization id that is valid for lookup in the unoptimized
695 // code.
696 assert_value->deopt_id_ = call->deopt_id();
697 InsertBefore(call, assert_value, call->env(), Definition::kValue);
694 } 698 }
695 699
696 Value* array = NULL; 700 Value* array = NULL;
697 Value* index = NULL; 701 Value* index = NULL;
698 intptr_t array_cid = PrepareIndexedOp(call, class_id, &array, &index); 702 intptr_t array_cid = PrepareIndexedOp(call, class_id, &array, &index);
699 Value* value = call->ArgumentAt(2)->value(); 703 Value* value = call->ArgumentAt(2)->value();
700 // Check if store barrier is needed. 704 // Check if store barrier is needed.
701 bool needs_store_barrier = true; 705 bool needs_store_barrier = true;
702 if (!value_check.IsNull()) { 706 if (!value_check.IsNull()) {
703 needs_store_barrier = false; 707 needs_store_barrier = false;
(...skipping 3892 matching lines...) Expand 10 before | Expand all | Expand 10 after
4596 4600
4597 if (FLAG_trace_constant_propagation) { 4601 if (FLAG_trace_constant_propagation) {
4598 OS::Print("\n==== After constant propagation ====\n"); 4602 OS::Print("\n==== After constant propagation ====\n");
4599 FlowGraphPrinter printer(*graph_); 4603 FlowGraphPrinter printer(*graph_);
4600 printer.PrintBlocks(); 4604 printer.PrintBlocks();
4601 } 4605 }
4602 } 4606 }
4603 4607
4604 4608
4605 } // namespace dart 4609 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698