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 9241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9252 ASSERT(!IsOptimized()); | 9252 ASSERT(!IsOptimized()); |
9253 ASSERT(shared()->allows_lazy_compilation() || | 9253 ASSERT(shared()->allows_lazy_compilation() || |
9254 code()->optimizable()); | 9254 code()->optimizable()); |
9255 ASSERT(!shared()->is_generator()); | 9255 ASSERT(!shared()->is_generator()); |
9256 set_code_no_write_barrier( | 9256 set_code_no_write_barrier( |
9257 GetIsolate()->builtins()->builtin(Builtins::kLazyRecompile)); | 9257 GetIsolate()->builtins()->builtin(Builtins::kLazyRecompile)); |
9258 // No write barrier required, since the builtin is part of the root set. | 9258 // No write barrier required, since the builtin is part of the root set. |
9259 } | 9259 } |
9260 | 9260 |
9261 | 9261 |
9262 void JSFunction::MarkForParallelRecompilation() { | 9262 void JSFunction::MarkForConcurrentRecompilation() { |
9263 ASSERT(is_compiled() || GetIsolate()->DebuggerHasBreakPoints()); | 9263 ASSERT(is_compiled() || GetIsolate()->DebuggerHasBreakPoints()); |
9264 ASSERT(!IsOptimized()); | 9264 ASSERT(!IsOptimized()); |
9265 ASSERT(shared()->allows_lazy_compilation() || code()->optimizable()); | 9265 ASSERT(shared()->allows_lazy_compilation() || code()->optimizable()); |
9266 ASSERT(!shared()->is_generator()); | 9266 ASSERT(!shared()->is_generator()); |
9267 ASSERT(FLAG_parallel_recompilation); | 9267 ASSERT(FLAG_concurrent_recompilation); |
9268 if (FLAG_trace_parallel_recompilation) { | 9268 if (FLAG_trace_concurrent_recompilation) { |
9269 PrintF(" ** Marking "); | 9269 PrintF(" ** Marking "); |
9270 PrintName(); | 9270 PrintName(); |
9271 PrintF(" for parallel recompilation.\n"); | 9271 PrintF(" for concurrent recompilation.\n"); |
9272 } | 9272 } |
9273 set_code_no_write_barrier( | 9273 set_code_no_write_barrier( |
9274 GetIsolate()->builtins()->builtin(Builtins::kParallelRecompile)); | 9274 GetIsolate()->builtins()->builtin(Builtins::kConcurrentRecompile)); |
9275 // No write barrier required, since the builtin is part of the root set. | 9275 // No write barrier required, since the builtin is part of the root set. |
9276 } | 9276 } |
9277 | 9277 |
9278 | 9278 |
9279 void JSFunction::MarkForInstallingRecompiledCode() { | 9279 void JSFunction::MarkForInstallingRecompiledCode() { |
9280 // The debugger could have switched the builtin to lazy compile. | 9280 // The debugger could have switched the builtin to lazy compile. |
9281 // In that case, simply carry on. It will be dealt with later. | 9281 // In that case, simply carry on. It will be dealt with later. |
9282 ASSERT(!IsOptimized()); | 9282 ASSERT(!IsOptimized()); |
9283 ASSERT(shared()->allows_lazy_compilation() || code()->optimizable()); | 9283 ASSERT(shared()->allows_lazy_compilation() || code()->optimizable()); |
9284 ASSERT(FLAG_parallel_recompilation); | 9284 ASSERT(FLAG_concurrent_recompilation); |
9285 set_code_no_write_barrier( | 9285 set_code_no_write_barrier( |
9286 GetIsolate()->builtins()->builtin(Builtins::kInstallRecompiledCode)); | 9286 GetIsolate()->builtins()->builtin(Builtins::kInstallRecompiledCode)); |
9287 // No write barrier required, since the builtin is part of the root set. | 9287 // No write barrier required, since the builtin is part of the root set. |
9288 } | 9288 } |
9289 | 9289 |
9290 | 9290 |
9291 void JSFunction::MarkInRecompileQueue() { | 9291 void JSFunction::MarkInRecompileQueue() { |
9292 // We can only arrive here via the parallel-recompilation builtin. If | 9292 // We can only arrive here via the concurrent-recompilation builtin. If |
9293 // break points were set, the code would point to the lazy-compile builtin. | 9293 // break points were set, the code would point to the lazy-compile builtin. |
9294 ASSERT(!GetIsolate()->DebuggerHasBreakPoints()); | 9294 ASSERT(!GetIsolate()->DebuggerHasBreakPoints()); |
9295 ASSERT(IsMarkedForParallelRecompilation() && !IsOptimized()); | 9295 ASSERT(IsMarkedForConcurrentRecompilation() && !IsOptimized()); |
9296 ASSERT(shared()->allows_lazy_compilation() || code()->optimizable()); | 9296 ASSERT(shared()->allows_lazy_compilation() || code()->optimizable()); |
9297 ASSERT(FLAG_parallel_recompilation); | 9297 ASSERT(FLAG_concurrent_recompilation); |
9298 if (FLAG_trace_parallel_recompilation) { | 9298 if (FLAG_trace_concurrent_recompilation) { |
9299 PrintF(" ** Queueing "); | 9299 PrintF(" ** Queueing "); |
9300 PrintName(); | 9300 PrintName(); |
9301 PrintF(" for parallel recompilation.\n"); | 9301 PrintF(" for concurrent recompilation.\n"); |
9302 } | 9302 } |
9303 set_code_no_write_barrier( | 9303 set_code_no_write_barrier( |
9304 GetIsolate()->builtins()->builtin(Builtins::kInRecompileQueue)); | 9304 GetIsolate()->builtins()->builtin(Builtins::kInRecompileQueue)); |
9305 // No write barrier required, since the builtin is part of the root set. | 9305 // No write barrier required, since the builtin is part of the root set. |
9306 } | 9306 } |
9307 | 9307 |
9308 | 9308 |
9309 static bool CompileLazyHelper(CompilationInfo* info, | 9309 static bool CompileLazyHelper(CompilationInfo* info, |
9310 ClearExceptionFlag flag) { | 9310 ClearExceptionFlag flag) { |
9311 // Compile the source information to a code object. | 9311 // Compile the source information to a code object. |
(...skipping 6695 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
16007 #define ERROR_MESSAGES_TEXTS(C, T) T, | 16007 #define ERROR_MESSAGES_TEXTS(C, T) T, |
16008 static const char* error_messages_[] = { | 16008 static const char* error_messages_[] = { |
16009 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) | 16009 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) |
16010 }; | 16010 }; |
16011 #undef ERROR_MESSAGES_TEXTS | 16011 #undef ERROR_MESSAGES_TEXTS |
16012 return error_messages_[reason]; | 16012 return error_messages_[reason]; |
16013 } | 16013 } |
16014 | 16014 |
16015 | 16015 |
16016 } } // namespace v8::internal | 16016 } } // namespace v8::internal |
OLD | NEW |