| 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 7231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7242 | 7242 |
| 7243 | 7243 |
| 7244 void JSFunction::MarkForLazyRecompilation() { | 7244 void JSFunction::MarkForLazyRecompilation() { |
| 7245 ASSERT(is_compiled() && !IsOptimized()); | 7245 ASSERT(is_compiled() && !IsOptimized()); |
| 7246 ASSERT(shared()->allows_lazy_compilation() || | 7246 ASSERT(shared()->allows_lazy_compilation() || |
| 7247 code()->optimizable()); | 7247 code()->optimizable()); |
| 7248 Builtins* builtins = GetIsolate()->builtins(); | 7248 Builtins* builtins = GetIsolate()->builtins(); |
| 7249 ReplaceCode(builtins->builtin(Builtins::kLazyRecompile)); | 7249 ReplaceCode(builtins->builtin(Builtins::kLazyRecompile)); |
| 7250 } | 7250 } |
| 7251 | 7251 |
| 7252 void JSFunction::MarkForParallelRecompilation() { |
| 7253 ASSERT(is_compiled() && !IsOptimized()); |
| 7254 ASSERT(shared()->allows_lazy_compilation() || code()->optimizable()); |
| 7255 Builtins* builtins = GetIsolate()->builtins(); |
| 7256 ReplaceCode(builtins->builtin(Builtins::kParallelRecompile)); |
| 7257 |
| 7258 // Unlike MarkForLazyRecompilation, after queuing a function for |
| 7259 // recompilation on the compiler thread, we actually tail-call into |
| 7260 // the full code. We reset the profiler ticks here so that the |
| 7261 // function doesn't bother the runtime profiler too much. |
| 7262 shared()->code()->set_profiler_ticks(0); |
| 7263 } |
| 7252 | 7264 |
| 7253 static bool CompileLazyHelper(CompilationInfo* info, | 7265 static bool CompileLazyHelper(CompilationInfo* info, |
| 7254 ClearExceptionFlag flag) { | 7266 ClearExceptionFlag flag) { |
| 7255 // Compile the source information to a code object. | 7267 // Compile the source information to a code object. |
| 7256 ASSERT(info->IsOptimizing() || !info->shared_info()->is_compiled()); | 7268 ASSERT(info->IsOptimizing() || !info->shared_info()->is_compiled()); |
| 7257 ASSERT(!info->isolate()->has_pending_exception()); | 7269 ASSERT(!info->isolate()->has_pending_exception()); |
| 7258 bool result = Compiler::CompileLazy(info); | 7270 bool result = Compiler::CompileLazy(info); |
| 7259 ASSERT(result != Isolate::Current()->has_pending_exception()); | 7271 ASSERT(result != Isolate::Current()->has_pending_exception()); |
| 7260 if (!result && flag == CLEAR_EXCEPTION) { | 7272 if (!result && flag == CLEAR_EXCEPTION) { |
| 7261 info->isolate()->clear_pending_exception(); | 7273 info->isolate()->clear_pending_exception(); |
| (...skipping 5773 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 13035 set_year(Smi::FromInt(year), SKIP_WRITE_BARRIER); | 13047 set_year(Smi::FromInt(year), SKIP_WRITE_BARRIER); |
| 13036 set_month(Smi::FromInt(month), SKIP_WRITE_BARRIER); | 13048 set_month(Smi::FromInt(month), SKIP_WRITE_BARRIER); |
| 13037 set_day(Smi::FromInt(day), SKIP_WRITE_BARRIER); | 13049 set_day(Smi::FromInt(day), SKIP_WRITE_BARRIER); |
| 13038 set_weekday(Smi::FromInt(weekday), SKIP_WRITE_BARRIER); | 13050 set_weekday(Smi::FromInt(weekday), SKIP_WRITE_BARRIER); |
| 13039 set_hour(Smi::FromInt(hour), SKIP_WRITE_BARRIER); | 13051 set_hour(Smi::FromInt(hour), SKIP_WRITE_BARRIER); |
| 13040 set_min(Smi::FromInt(min), SKIP_WRITE_BARRIER); | 13052 set_min(Smi::FromInt(min), SKIP_WRITE_BARRIER); |
| 13041 set_sec(Smi::FromInt(sec), SKIP_WRITE_BARRIER); | 13053 set_sec(Smi::FromInt(sec), SKIP_WRITE_BARRIER); |
| 13042 } | 13054 } |
| 13043 | 13055 |
| 13044 } } // namespace v8::internal | 13056 } } // namespace v8::internal |
| OLD | NEW |