| 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 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 303 eager_deoptimization_entry_code_ = NULL; | 303 eager_deoptimization_entry_code_ = NULL; |
| 304 } | 304 } |
| 305 if (lazy_deoptimization_entry_code_ != NULL) { | 305 if (lazy_deoptimization_entry_code_ != NULL) { |
| 306 lazy_deoptimization_entry_code_->Free(EXECUTABLE); | 306 lazy_deoptimization_entry_code_->Free(EXECUTABLE); |
| 307 lazy_deoptimization_entry_code_ = NULL; | 307 lazy_deoptimization_entry_code_ = NULL; |
| 308 } | 308 } |
| 309 } | 309 } |
| 310 | 310 |
| 311 | 311 |
| 312 unsigned Deoptimizer::GetOutputInfo(DeoptimizationOutputData* data, | 312 unsigned Deoptimizer::GetOutputInfo(DeoptimizationOutputData* data, |
| 313 unsigned id, | 313 AstId id, |
| 314 SharedFunctionInfo* shared) { | 314 SharedFunctionInfo* shared) { |
| 315 // TODO(kasperl): For now, we do a simple linear search for the PC | 315 // TODO(kasperl): For now, we do a simple linear search for the PC |
| 316 // offset associated with the given node id. This should probably be | 316 // offset associated with the given node id. This should probably be |
| 317 // changed to a binary search. | 317 // changed to a binary search. |
| 318 int length = data->DeoptPoints(); | 318 int length = data->DeoptPoints(); |
| 319 Smi* smi_id = Smi::FromInt(id); | 319 Smi* smi_id = Smi::FromInt(id); |
| 320 for (int i = 0; i < length; i++) { | 320 for (int i = 0; i < length; i++) { |
| 321 if (data->AstId(i) == smi_id) { | 321 if (data->AstId(i) == smi_id) { |
| 322 return data->PcAndState(i)->value(); | 322 return data->PcAndState(i)->value(); |
| 323 } | 323 } |
| (...skipping 814 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1138 Deoptimizer::HandleWeakDeoptimizedCode); | 1138 Deoptimizer::HandleWeakDeoptimizedCode); |
| 1139 } | 1139 } |
| 1140 | 1140 |
| 1141 | 1141 |
| 1142 DeoptimizingCodeListNode::~DeoptimizingCodeListNode() { | 1142 DeoptimizingCodeListNode::~DeoptimizingCodeListNode() { |
| 1143 GlobalHandles::Destroy(reinterpret_cast<Object**>(code_.location())); | 1143 GlobalHandles::Destroy(reinterpret_cast<Object**>(code_.location())); |
| 1144 } | 1144 } |
| 1145 | 1145 |
| 1146 | 1146 |
| 1147 } } // namespace v8::internal | 1147 } } // namespace v8::internal |
| OLD | NEW |