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. | |
64 Deoptimizer* Deoptimizer::New(JSFunction* function, | 61 Deoptimizer* Deoptimizer::New(JSFunction* function, |
65 BailoutType type, | 62 BailoutType type, |
66 unsigned bailout_id, | 63 unsigned bailout_id, |
67 Address from, | 64 Address from, |
68 int fp_to_sp_delta, | 65 int fp_to_sp_delta, |
69 Isolate* isolate) { | 66 Isolate* isolate) { |
70 ASSERT(isolate == Isolate::Current()); | 67 ASSERT(isolate == Isolate::Current()); |
71 Deoptimizer* deoptimizer = new Deoptimizer(isolate, | 68 Deoptimizer* deoptimizer = new Deoptimizer(isolate, |
72 function, | 69 function, |
73 type, | 70 type, |
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
347 DeoptimizingCodeListNode* node = | 344 DeoptimizingCodeListNode* node = |
348 isolate->deoptimizer_data()->deoptimizing_code_list_; | 345 isolate->deoptimizer_data()->deoptimizing_code_list_; |
349 while (node != NULL) { | 346 while (node != NULL) { |
350 length++; | 347 length++; |
351 node = node->next(); | 348 node = node->next(); |
352 } | 349 } |
353 return length; | 350 return length; |
354 } | 351 } |
355 | 352 |
356 | 353 |
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. | |
359 void Deoptimizer::DoComputeOutputFrames() { | 354 void Deoptimizer::DoComputeOutputFrames() { |
360 if (bailout_type_ == OSR) { | 355 if (bailout_type_ == OSR) { |
361 DoComputeOsrOutputFrame(); | 356 DoComputeOsrOutputFrame(); |
362 return; | 357 return; |
363 } | 358 } |
364 | 359 |
365 // Print some helpful diagnostic information. | 360 // Print some helpful diagnostic information. |
366 int64_t start = OS::Ticks(); | 361 int64_t start = OS::Ticks(); |
367 if (FLAG_trace_deopt) { | 362 if (FLAG_trace_deopt) { |
368 PrintF("[deoptimizing%s: begin 0x%08" V8PRIxPTR " ", | 363 PrintF("[deoptimizing%s: begin 0x%08" V8PRIxPTR " ", |
(...skipping 883 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1252 } | 1247 } |
1253 frames_to_skip--; | 1248 frames_to_skip--; |
1254 } | 1249 } |
1255 } | 1250 } |
1256 | 1251 |
1257 UNREACHABLE(); | 1252 UNREACHABLE(); |
1258 } | 1253 } |
1259 | 1254 |
1260 | 1255 |
1261 } } // namespace v8::internal | 1256 } } // namespace v8::internal |
OLD | NEW |