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 9216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9227 v->VisitCodeEntry(this->address() + kCodeEntryOffset); | 9227 v->VisitCodeEntry(this->address() + kCodeEntryOffset); |
9228 IteratePointers(v, kCodeEntryOffset + kPointerSize, object_size); | 9228 IteratePointers(v, kCodeEntryOffset + kPointerSize, object_size); |
9229 } | 9229 } |
9230 | 9230 |
9231 | 9231 |
9232 void JSFunction::MarkForLazyRecompilation() { | 9232 void JSFunction::MarkForLazyRecompilation() { |
9233 ASSERT(is_compiled() || GetIsolate()->DebuggerHasBreakPoints()); | 9233 ASSERT(is_compiled() || GetIsolate()->DebuggerHasBreakPoints()); |
9234 ASSERT(!IsOptimized()); | 9234 ASSERT(!IsOptimized()); |
9235 ASSERT(shared()->allows_lazy_compilation() || | 9235 ASSERT(shared()->allows_lazy_compilation() || |
9236 code()->optimizable()); | 9236 code()->optimizable()); |
| 9237 ASSERT(!shared()->is_generator()); |
9237 set_code_no_write_barrier( | 9238 set_code_no_write_barrier( |
9238 GetIsolate()->builtins()->builtin(Builtins::kLazyRecompile)); | 9239 GetIsolate()->builtins()->builtin(Builtins::kLazyRecompile)); |
9239 // No write barrier required, since the builtin is part of the root set. | 9240 // No write barrier required, since the builtin is part of the root set. |
9240 } | 9241 } |
9241 | 9242 |
9242 | 9243 |
9243 void JSFunction::MarkForParallelRecompilation() { | 9244 void JSFunction::MarkForParallelRecompilation() { |
9244 ASSERT(is_compiled() || GetIsolate()->DebuggerHasBreakPoints()); | 9245 ASSERT(is_compiled() || GetIsolate()->DebuggerHasBreakPoints()); |
9245 ASSERT(!IsOptimized()); | 9246 ASSERT(!IsOptimized()); |
9246 ASSERT(shared()->allows_lazy_compilation() || code()->optimizable()); | 9247 ASSERT(shared()->allows_lazy_compilation() || code()->optimizable()); |
9247 if (!FLAG_parallel_recompilation) { | 9248 ASSERT(!shared()->is_generator()); |
9248 JSFunction::MarkForLazyRecompilation(); | 9249 ASSERT(FLAG_parallel_recompilation); |
9249 return; | |
9250 } | |
9251 if (FLAG_trace_parallel_recompilation) { | 9250 if (FLAG_trace_parallel_recompilation) { |
9252 PrintF(" ** Marking "); | 9251 PrintF(" ** Marking "); |
9253 PrintName(); | 9252 PrintName(); |
9254 PrintF(" for parallel recompilation.\n"); | 9253 PrintF(" for parallel recompilation.\n"); |
9255 } | 9254 } |
9256 set_code_no_write_barrier( | 9255 set_code_no_write_barrier( |
9257 GetIsolate()->builtins()->builtin(Builtins::kParallelRecompile)); | 9256 GetIsolate()->builtins()->builtin(Builtins::kParallelRecompile)); |
9258 // No write barrier required, since the builtin is part of the root set. | 9257 // No write barrier required, since the builtin is part of the root set. |
9259 } | 9258 } |
9260 | 9259 |
(...skipping 6711 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
15972 | 15971 |
15973 void PropertyCell::AddDependentCode(Handle<Code> code) { | 15972 void PropertyCell::AddDependentCode(Handle<Code> code) { |
15974 Handle<DependentCode> codes = DependentCode::Insert( | 15973 Handle<DependentCode> codes = DependentCode::Insert( |
15975 Handle<DependentCode>(dependent_code()), | 15974 Handle<DependentCode>(dependent_code()), |
15976 DependentCode::kPropertyCellChangedGroup, code); | 15975 DependentCode::kPropertyCellChangedGroup, code); |
15977 if (*codes != dependent_code()) set_dependent_code(*codes); | 15976 if (*codes != dependent_code()) set_dependent_code(*codes); |
15978 } | 15977 } |
15979 | 15978 |
15980 | 15979 |
15981 } } // namespace v8::internal | 15980 } } // namespace v8::internal |
OLD | NEW |