| OLD | NEW |
| 1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 if (eager_deoptimization_entry_code_ != NULL) { | 51 if (eager_deoptimization_entry_code_ != NULL) { |
| 52 eager_deoptimization_entry_code_->Free(EXECUTABLE); | 52 eager_deoptimization_entry_code_->Free(EXECUTABLE); |
| 53 eager_deoptimization_entry_code_ = NULL; | 53 eager_deoptimization_entry_code_ = NULL; |
| 54 } | 54 } |
| 55 if (lazy_deoptimization_entry_code_ != NULL) { | 55 if (lazy_deoptimization_entry_code_ != NULL) { |
| 56 lazy_deoptimization_entry_code_->Free(EXECUTABLE); | 56 lazy_deoptimization_entry_code_->Free(EXECUTABLE); |
| 57 lazy_deoptimization_entry_code_ = NULL; | 57 lazy_deoptimization_entry_code_ = NULL; |
| 58 } | 58 } |
| 59 } | 59 } |
| 60 | 60 |
| 61 |
| 62 // We rely on this function not causing a GC. It is called from generated code |
| 63 // without having a real stack frame in place. |
| 61 Deoptimizer* Deoptimizer::New(JSFunction* function, | 64 Deoptimizer* Deoptimizer::New(JSFunction* function, |
| 62 BailoutType type, | 65 BailoutType type, |
| 63 unsigned bailout_id, | 66 unsigned bailout_id, |
| 64 Address from, | 67 Address from, |
| 65 int fp_to_sp_delta, | 68 int fp_to_sp_delta, |
| 66 Isolate* isolate) { | 69 Isolate* isolate) { |
| 67 ASSERT(isolate == Isolate::Current()); | 70 ASSERT(isolate == Isolate::Current()); |
| 68 Deoptimizer* deoptimizer = new Deoptimizer(isolate, | 71 Deoptimizer* deoptimizer = new Deoptimizer(isolate, |
| 69 function, | 72 function, |
| 70 type, | 73 type, |
| (...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 344 DeoptimizingCodeListNode* node = | 347 DeoptimizingCodeListNode* node = |
| 345 isolate->deoptimizer_data()->deoptimizing_code_list_; | 348 isolate->deoptimizer_data()->deoptimizing_code_list_; |
| 346 while (node != NULL) { | 349 while (node != NULL) { |
| 347 length++; | 350 length++; |
| 348 node = node->next(); | 351 node = node->next(); |
| 349 } | 352 } |
| 350 return length; | 353 return length; |
| 351 } | 354 } |
| 352 | 355 |
| 353 | 356 |
| 357 // We rely on this function not causing a GC. It is called from generated code |
| 358 // without having a real stack frame in place. |
| 354 void Deoptimizer::DoComputeOutputFrames() { | 359 void Deoptimizer::DoComputeOutputFrames() { |
| 355 if (bailout_type_ == OSR) { | 360 if (bailout_type_ == OSR) { |
| 356 DoComputeOsrOutputFrame(); | 361 DoComputeOsrOutputFrame(); |
| 357 return; | 362 return; |
| 358 } | 363 } |
| 359 | 364 |
| 360 // Print some helpful diagnostic information. | 365 // Print some helpful diagnostic information. |
| 361 int64_t start = OS::Ticks(); | 366 int64_t start = OS::Ticks(); |
| 362 if (FLAG_trace_deopt) { | 367 if (FLAG_trace_deopt) { |
| 363 PrintF("[deoptimizing%s: begin 0x%08" V8PRIxPTR " ", | 368 PrintF("[deoptimizing%s: begin 0x%08" V8PRIxPTR " ", |
| (...skipping 883 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1247 } | 1252 } |
| 1248 frames_to_skip--; | 1253 frames_to_skip--; |
| 1249 } | 1254 } |
| 1250 } | 1255 } |
| 1251 | 1256 |
| 1252 UNREACHABLE(); | 1257 UNREACHABLE(); |
| 1253 } | 1258 } |
| 1254 | 1259 |
| 1255 | 1260 |
| 1256 } } // namespace v8::internal | 1261 } } // namespace v8::internal |
| OLD | NEW |