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

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

Issue 12812026: Fix crash caused by eliminating goto-s in unoptimized code. Added asserts (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: 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_compiler.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/deopt_instructions.h" 5 #include "vm/deopt_instructions.h"
6 6
7 #include "vm/assembler.h" 7 #include "vm/assembler.h"
8 #include "vm/code_patcher.h" 8 #include "vm/code_patcher.h"
9 #include "vm/intermediate_language.h" 9 #include "vm/intermediate_language.h"
10 #include "vm/locations.h" 10 #include "vm/locations.h"
(...skipping 799 matching lines...) Expand 10 before | Expand all | Expand 10 after
810 // Add object. 810 // Add object.
811 const intptr_t result = object_table_.Length(); 811 const intptr_t result = object_table_.Length();
812 object_table_.Add(obj); 812 object_table_.Add(obj);
813 return result; 813 return result;
814 } 814 }
815 815
816 816
817 void DeoptInfoBuilder::AddReturnAddressBefore(const Function& function, 817 void DeoptInfoBuilder::AddReturnAddressBefore(const Function& function,
818 intptr_t deopt_id, 818 intptr_t deopt_id,
819 intptr_t to_index) { 819 intptr_t to_index) {
820 // Check that deopt_id exists.
821 ASSERT(Code::Handle(function.unoptimized_code()).
822 GetDeoptBeforePcAtDeoptId(deopt_id) != 0);
820 const intptr_t object_table_index = FindOrAddObjectInTable(function); 823 const intptr_t object_table_index = FindOrAddObjectInTable(function);
821 ASSERT(to_index == instructions_.length()); 824 ASSERT(to_index == instructions_.length());
822 instructions_.Add(new DeoptRetBeforeAddressInstr(object_table_index, 825 instructions_.Add(new DeoptRetBeforeAddressInstr(object_table_index,
823 deopt_id)); 826 deopt_id));
824 } 827 }
825 828
826 829
827 void DeoptInfoBuilder::AddReturnAddressAfter(const Function& function, 830 void DeoptInfoBuilder::AddReturnAddressAfter(const Function& function,
828 intptr_t deopt_id, 831 intptr_t deopt_id,
829 intptr_t to_index) { 832 intptr_t to_index) {
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
969 Smi* offset, 972 Smi* offset,
970 DeoptInfo* info, 973 DeoptInfo* info,
971 Smi* reason) { 974 Smi* reason) {
972 intptr_t i = index * kEntrySize; 975 intptr_t i = index * kEntrySize;
973 *offset ^= table.At(i); 976 *offset ^= table.At(i);
974 *info ^= table.At(i + 1); 977 *info ^= table.At(i + 1);
975 *reason ^= table.At(i + 2); 978 *reason ^= table.At(i + 2);
976 } 979 }
977 980
978 } // namespace dart 981 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/flow_graph_compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698