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

Side by Side Diff: src/deoptimizer.cc

Issue 7891042: Add asserts to ensure that we: (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 years, 3 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 | « src/code-stubs.cc ('k') | src/frames.h » ('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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 64
65 #ifdef ENABLE_DEBUGGER_SUPPORT 65 #ifdef ENABLE_DEBUGGER_SUPPORT
66 void DeoptimizerData::Iterate(ObjectVisitor* v) { 66 void DeoptimizerData::Iterate(ObjectVisitor* v) {
67 if (deoptimized_frame_info_ != NULL) { 67 if (deoptimized_frame_info_ != NULL) {
68 deoptimized_frame_info_->Iterate(v); 68 deoptimized_frame_info_->Iterate(v);
69 } 69 }
70 } 70 }
71 #endif 71 #endif
72 72
73 73
74 // We rely on this function not causing a GC. It is called from generated code
75 // without having a real stack frame in place.
74 Deoptimizer* Deoptimizer::New(JSFunction* function, 76 Deoptimizer* Deoptimizer::New(JSFunction* function,
75 BailoutType type, 77 BailoutType type,
76 unsigned bailout_id, 78 unsigned bailout_id,
77 Address from, 79 Address from,
78 int fp_to_sp_delta, 80 int fp_to_sp_delta,
79 Isolate* isolate) { 81 Isolate* isolate) {
80 ASSERT(isolate == Isolate::Current()); 82 ASSERT(isolate == Isolate::Current());
81 Deoptimizer* deoptimizer = new Deoptimizer(isolate, 83 Deoptimizer* deoptimizer = new Deoptimizer(isolate,
82 function, 84 function,
83 type, 85 type,
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after
455 DeoptimizingCodeListNode* node = 457 DeoptimizingCodeListNode* node =
456 isolate->deoptimizer_data()->deoptimizing_code_list_; 458 isolate->deoptimizer_data()->deoptimizing_code_list_;
457 while (node != NULL) { 459 while (node != NULL) {
458 length++; 460 length++;
459 node = node->next(); 461 node = node->next();
460 } 462 }
461 return length; 463 return length;
462 } 464 }
463 465
464 466
467 // We rely on this function not causing a GC. It is called from generated code
468 // without having a real stack frame in place.
465 void Deoptimizer::DoComputeOutputFrames() { 469 void Deoptimizer::DoComputeOutputFrames() {
466 if (bailout_type_ == OSR) { 470 if (bailout_type_ == OSR) {
467 DoComputeOsrOutputFrame(); 471 DoComputeOsrOutputFrame();
468 return; 472 return;
469 } 473 }
470 474
471 // Print some helpful diagnostic information. 475 // Print some helpful diagnostic information.
472 int64_t start = OS::Ticks(); 476 int64_t start = OS::Ticks();
473 if (FLAG_trace_deopt) { 477 if (FLAG_trace_deopt) {
474 PrintF("[deoptimizing%s: begin 0x%08" V8PRIxPTR " ", 478 PrintF("[deoptimizing%s: begin 0x%08" V8PRIxPTR " ",
(...skipping 989 matching lines...) Expand 10 before | Expand all | Expand 10 after
1464 1468
1465 void DeoptimizedFrameInfo::Iterate(ObjectVisitor* v) { 1469 void DeoptimizedFrameInfo::Iterate(ObjectVisitor* v) {
1466 v->VisitPointer(BitCast<Object**>(&function_)); 1470 v->VisitPointer(BitCast<Object**>(&function_));
1467 v->VisitPointers(parameters_, parameters_ + parameters_count_); 1471 v->VisitPointers(parameters_, parameters_ + parameters_count_);
1468 v->VisitPointers(expression_stack_, expression_stack_ + expression_count_); 1472 v->VisitPointers(expression_stack_, expression_stack_ + expression_count_);
1469 } 1473 }
1470 1474
1471 #endif // ENABLE_DEBUGGER_SUPPORT 1475 #endif // ENABLE_DEBUGGER_SUPPORT
1472 1476
1473 } } // namespace v8::internal 1477 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/code-stubs.cc ('k') | src/frames.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698