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

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

Issue 2845053003: Fix asserts in StackFrameIterator which were effectively disabled (Closed)
Patch Set: Add StackFrameIterator::{ValidationPolicy,CrossThreadPolicy} enums Created 3 years, 7 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
« no previous file with comments | « runtime/vm/debugger.cc ('k') | runtime/vm/exceptions.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/compiler.h" 9 #include "vm/compiler.h"
10 #include "vm/disassembler.h" 10 #include "vm/disassembler.h"
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after
409 // Compute total number of artificial arguments used during deoptimization. 409 // Compute total number of artificial arguments used during deoptimization.
410 intptr_t deopt_arg_count = 0; 410 intptr_t deopt_arg_count = 0;
411 for (intptr_t i = 0; i < DeferredObjectsCount(); i++) { 411 for (intptr_t i = 0; i < DeferredObjectsCount(); i++) {
412 GetDeferredObject(i)->Fill(); 412 GetDeferredObject(i)->Fill();
413 deopt_arg_count += GetDeferredObject(i)->ArgumentCount(); 413 deopt_arg_count += GetDeferredObject(i)->ArgumentCount();
414 } 414 }
415 415
416 // Since this is the only step where GC can occur during deoptimization, 416 // Since this is the only step where GC can occur during deoptimization,
417 // use it to report the source line where deoptimization occured. 417 // use it to report the source line where deoptimization occured.
418 if (FLAG_trace_deoptimization || FLAG_trace_deoptimization_verbose) { 418 if (FLAG_trace_deoptimization || FLAG_trace_deoptimization_verbose) {
419 DartFrameIterator iterator; 419 DartFrameIterator iterator(Thread::Current(),
420 StackFrameIterator::kNoCrossThreadIteration);
420 StackFrame* top_frame = iterator.NextFrame(); 421 StackFrame* top_frame = iterator.NextFrame();
421 ASSERT(top_frame != NULL); 422 ASSERT(top_frame != NULL);
422 const Code& code = Code::Handle(top_frame->LookupDartCode()); 423 const Code& code = Code::Handle(top_frame->LookupDartCode());
423 const Function& top_function = Function::Handle(code.function()); 424 const Function& top_function = Function::Handle(code.function());
424 const Script& script = Script::Handle(top_function.script()); 425 const Script& script = Script::Handle(top_function.script());
425 const TokenPosition token_pos = code.GetTokenIndexOfPC(top_frame->pc()); 426 const TokenPosition token_pos = code.GetTokenIndexOfPC(top_frame->pc());
426 intptr_t line, column; 427 intptr_t line, column;
427 script.GetTokenLocation(token_pos, &line, &column); 428 script.GetTokenLocation(token_pos, &line, &column);
428 String& line_string = String::Handle(script.GetLine(line)); 429 String& line_string = String::Handle(script.GetLine(line));
429 THR_Print(" Function: %s\n", top_function.ToFullyQualifiedCString()); 430 THR_Print(" Function: %s\n", top_function.ToFullyQualifiedCString());
(...skipping 942 matching lines...) Expand 10 before | Expand all | Expand 10 after
1372 Smi* offset, 1373 Smi* offset,
1373 TypedData* info, 1374 TypedData* info,
1374 Smi* reason) { 1375 Smi* reason) {
1375 intptr_t i = index * kEntrySize; 1376 intptr_t i = index * kEntrySize;
1376 *offset ^= table.At(i); 1377 *offset ^= table.At(i);
1377 *info ^= table.At(i + 1); 1378 *info ^= table.At(i + 1);
1378 *reason ^= table.At(i + 2); 1379 *reason ^= table.At(i + 2);
1379 } 1380 }
1380 1381
1381 } // namespace dart 1382 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/debugger.cc ('k') | runtime/vm/exceptions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698