| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 7267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7278 | 7278 |
| 7279 | 7279 |
| 7280 void JSFunction::MarkForLazyRecompilation() { | 7280 void JSFunction::MarkForLazyRecompilation() { |
| 7281 ASSERT(is_compiled() && !IsOptimized()); | 7281 ASSERT(is_compiled() && !IsOptimized()); |
| 7282 ASSERT(shared()->allows_lazy_compilation() || | 7282 ASSERT(shared()->allows_lazy_compilation() || |
| 7283 code()->optimizable()); | 7283 code()->optimizable()); |
| 7284 Builtins* builtins = GetIsolate()->builtins(); | 7284 Builtins* builtins = GetIsolate()->builtins(); |
| 7285 ReplaceCode(builtins->builtin(Builtins::kLazyRecompile)); | 7285 ReplaceCode(builtins->builtin(Builtins::kLazyRecompile)); |
| 7286 } | 7286 } |
| 7287 | 7287 |
| 7288 void JSFunction::MarkForParallelRecompilation() { |
| 7289 ASSERT(is_compiled() && !IsOptimized()); |
| 7290 ASSERT(shared()->allows_lazy_compilation() || code()->optimizable()); |
| 7291 Builtins* builtins = GetIsolate()->builtins(); |
| 7292 ReplaceCode(builtins->builtin(Builtins::kParallelRecompile)); |
| 7293 |
| 7294 // Unlike MarkForLazyRecompilation, after queuing a function for |
| 7295 // recompilation on the compiler thread, we actually tail-call into |
| 7296 // the full code. We reset the profiler ticks here so that the |
| 7297 // function doesn't bother the runtime profiler too much. |
| 7298 shared()->code()->set_profiler_ticks(0); |
| 7299 } |
| 7288 | 7300 |
| 7289 static bool CompileLazyHelper(CompilationInfo* info, | 7301 static bool CompileLazyHelper(CompilationInfo* info, |
| 7290 ClearExceptionFlag flag) { | 7302 ClearExceptionFlag flag) { |
| 7291 // Compile the source information to a code object. | 7303 // Compile the source information to a code object. |
| 7292 ASSERT(info->IsOptimizing() || !info->shared_info()->is_compiled()); | 7304 ASSERT(info->IsOptimizing() || !info->shared_info()->is_compiled()); |
| 7293 ASSERT(!info->isolate()->has_pending_exception()); | 7305 ASSERT(!info->isolate()->has_pending_exception()); |
| 7294 bool result = Compiler::CompileLazy(info); | 7306 bool result = Compiler::CompileLazy(info); |
| 7295 ASSERT(result != Isolate::Current()->has_pending_exception()); | 7307 ASSERT(result != Isolate::Current()->has_pending_exception()); |
| 7296 if (!result && flag == CLEAR_EXCEPTION) { | 7308 if (!result && flag == CLEAR_EXCEPTION) { |
| 7297 info->isolate()->clear_pending_exception(); | 7309 info->isolate()->clear_pending_exception(); |
| (...skipping 5773 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 13071 set_year(Smi::FromInt(year), SKIP_WRITE_BARRIER); | 13083 set_year(Smi::FromInt(year), SKIP_WRITE_BARRIER); |
| 13072 set_month(Smi::FromInt(month), SKIP_WRITE_BARRIER); | 13084 set_month(Smi::FromInt(month), SKIP_WRITE_BARRIER); |
| 13073 set_day(Smi::FromInt(day), SKIP_WRITE_BARRIER); | 13085 set_day(Smi::FromInt(day), SKIP_WRITE_BARRIER); |
| 13074 set_weekday(Smi::FromInt(weekday), SKIP_WRITE_BARRIER); | 13086 set_weekday(Smi::FromInt(weekday), SKIP_WRITE_BARRIER); |
| 13075 set_hour(Smi::FromInt(hour), SKIP_WRITE_BARRIER); | 13087 set_hour(Smi::FromInt(hour), SKIP_WRITE_BARRIER); |
| 13076 set_min(Smi::FromInt(min), SKIP_WRITE_BARRIER); | 13088 set_min(Smi::FromInt(min), SKIP_WRITE_BARRIER); |
| 13077 set_sec(Smi::FromInt(sec), SKIP_WRITE_BARRIER); | 13089 set_sec(Smi::FromInt(sec), SKIP_WRITE_BARRIER); |
| 13078 } | 13090 } |
| 13079 | 13091 |
| 13080 } } // namespace v8::internal | 13092 } } // namespace v8::internal |
| OLD | NEW |