| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 11247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11258 public: | 11258 public: |
| 11259 virtual bool TakeFunction(JSFunction* function) { | 11259 virtual bool TakeFunction(JSFunction* function) { |
| 11260 return function->code()->marked_for_deoptimization(); | 11260 return function->code()->marked_for_deoptimization(); |
| 11261 } | 11261 } |
| 11262 }; | 11262 }; |
| 11263 | 11263 |
| 11264 | 11264 |
| 11265 void DependentCode::DeoptimizeDependentCodeGroup( | 11265 void DependentCode::DeoptimizeDependentCodeGroup( |
| 11266 Isolate* isolate, | 11266 Isolate* isolate, |
| 11267 DependentCode::DependencyGroup group) { | 11267 DependentCode::DependencyGroup group) { |
| 11268 ASSERT(AllowCodeDependencyChange::IsAllowed()); |
| 11268 DisallowHeapAllocation no_allocation_scope; | 11269 DisallowHeapAllocation no_allocation_scope; |
| 11269 DependentCode::GroupStartIndexes starts(this); | 11270 DependentCode::GroupStartIndexes starts(this); |
| 11270 int start = starts.at(group); | 11271 int start = starts.at(group); |
| 11271 int end = starts.at(group + 1); | 11272 int end = starts.at(group + 1); |
| 11272 int code_entries = starts.number_of_entries(); | 11273 int code_entries = starts.number_of_entries(); |
| 11273 if (start == end) return; | 11274 if (start == end) return; |
| 11274 for (int i = start; i < end; i++) { | 11275 for (int i = start; i < end; i++) { |
| 11275 if (is_code_at(i)) { | 11276 if (is_code_at(i)) { |
| 11276 Code* code = code_at(i); | 11277 Code* code = code_at(i); |
| 11277 code->set_marked_for_deoptimization(true); | 11278 code->set_marked_for_deoptimization(true); |
| 11278 } else { | 11279 } else { |
| 11279 CompilationInfo* info = compilation_info_at(i); | 11280 CompilationInfo* info = compilation_info_at(i); |
| 11280 info->AbortDueToDependentMap(); | 11281 info->AbortDueToDependencyChange(); |
| 11281 } | 11282 } |
| 11282 } | 11283 } |
| 11283 // Compact the array by moving all subsequent groups to fill in the new holes. | 11284 // Compact the array by moving all subsequent groups to fill in the new holes. |
| 11284 for (int src = end, dst = start; src < code_entries; src++, dst++) { | 11285 for (int src = end, dst = start; src < code_entries; src++, dst++) { |
| 11285 copy(src, dst); | 11286 copy(src, dst); |
| 11286 } | 11287 } |
| 11287 // Now the holes are at the end of the array, zap them for heap-verifier. | 11288 // Now the holes are at the end of the array, zap them for heap-verifier. |
| 11288 int removed = end - start; | 11289 int removed = end - start; |
| 11289 for (int i = code_entries - removed; i < code_entries; i++) { | 11290 for (int i = code_entries - removed; i < code_entries; i++) { |
| 11290 clear_at(i); | 11291 clear_at(i); |
| (...skipping 4532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 15823 return static_cast<Type*>(type_raw()); | 15824 return static_cast<Type*>(type_raw()); |
| 15824 } | 15825 } |
| 15825 | 15826 |
| 15826 | 15827 |
| 15827 void PropertyCell::set_type(Type* type, WriteBarrierMode ignored) { | 15828 void PropertyCell::set_type(Type* type, WriteBarrierMode ignored) { |
| 15828 set_type_raw(type, ignored); | 15829 set_type_raw(type, ignored); |
| 15829 } | 15830 } |
| 15830 | 15831 |
| 15831 | 15832 |
| 15832 } } // namespace v8::internal | 15833 } } // namespace v8::internal |
| OLD | NEW |