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

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

Issue 48833004: Modifies assertion for possibly null code pointer. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 1 month 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/code_generator.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/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 1150 matching lines...) Expand 10 before | Expand all | Expand 10 after
1161 } 1161 }
1162 1162
1163 1163
1164 void DeoptInfoBuilder::AddReturnAddress(const Function& function, 1164 void DeoptInfoBuilder::AddReturnAddress(const Function& function,
1165 intptr_t deopt_id, 1165 intptr_t deopt_id,
1166 intptr_t dest_index) { 1166 intptr_t dest_index) {
1167 // Check that deopt_id exists. 1167 // Check that deopt_id exists.
1168 // TODO(vegorov): verify after deoptimization targets as well. 1168 // TODO(vegorov): verify after deoptimization targets as well.
1169 #ifdef DEBUG 1169 #ifdef DEBUG
1170 const Code& code = Code::Handle(function.unoptimized_code()); 1170 const Code& code = Code::Handle(function.unoptimized_code());
1171 ASSERT(Isolate::IsDeoptAfter(deopt_id) || 1171 // The inlined function's code pointer may be null if there is a GC during
1172 // compilation.
1173 // TODO(zra): See if we can avoid this check by ensuring that code is not
1174 // removed during inlining.
1175 ASSERT(code.IsNull() || Isolate::IsDeoptAfter(deopt_id) ||
1172 (code.GetPcForDeoptId(deopt_id, PcDescriptors::kDeopt) != 0)); 1176 (code.GetPcForDeoptId(deopt_id, PcDescriptors::kDeopt) != 0));
1173 #endif 1177 #endif
1174 const intptr_t object_table_index = FindOrAddObjectInTable(function); 1178 const intptr_t object_table_index = FindOrAddObjectInTable(function);
1175 ASSERT(dest_index == FrameSize()); 1179 ASSERT(dest_index == FrameSize());
1176 instructions_.Add(new DeoptRetAddressInstr(object_table_index, deopt_id)); 1180 instructions_.Add(new DeoptRetAddressInstr(object_table_index, deopt_id));
1177 } 1181 }
1178 1182
1179 1183
1180 void DeoptInfoBuilder::AddPcMarker(const Function& function, 1184 void DeoptInfoBuilder::AddPcMarker(const Function& function,
1181 intptr_t dest_index) { 1185 intptr_t dest_index) {
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
1407 Smi* offset, 1411 Smi* offset,
1408 DeoptInfo* info, 1412 DeoptInfo* info,
1409 Smi* reason) { 1413 Smi* reason) {
1410 intptr_t i = index * kEntrySize; 1414 intptr_t i = index * kEntrySize;
1411 *offset ^= table.At(i); 1415 *offset ^= table.At(i);
1412 *info ^= table.At(i + 1); 1416 *info ^= table.At(i + 1);
1413 *reason ^= table.At(i + 2); 1417 *reason ^= table.At(i + 2);
1414 } 1418 }
1415 1419
1416 } // namespace dart 1420 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/code_generator.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698