| 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 7296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7307 | 7307 |
| 7308 void JSFunction::MarkForLazyRecompilation() { | 7308 void JSFunction::MarkForLazyRecompilation() { |
| 7309 ASSERT(is_compiled() && !IsOptimized()); | 7309 ASSERT(is_compiled() && !IsOptimized()); |
| 7310 ASSERT(shared()->allows_lazy_compilation() || | 7310 ASSERT(shared()->allows_lazy_compilation() || |
| 7311 code()->optimizable()); | 7311 code()->optimizable()); |
| 7312 Builtins* builtins = GetIsolate()->builtins(); | 7312 Builtins* builtins = GetIsolate()->builtins(); |
| 7313 ReplaceCode(builtins->builtin(Builtins::kLazyRecompile)); | 7313 ReplaceCode(builtins->builtin(Builtins::kLazyRecompile)); |
| 7314 } | 7314 } |
| 7315 | 7315 |
| 7316 | 7316 |
| 7317 void JSFunction::RecompileInParallel() { |
| 7318 ASSERT(FLAG_optimize_in_parallel); |
| 7319 i::Handle<JSFunction> handle(reinterpret_cast<JSFunction **>( |
| 7320 GetIsolate()->global_handles()->Create(this).location())); |
| 7321 GetIsolate()->queue_for_optimization(handle); |
| 7322 } |
| 7323 |
| 7324 |
| 7317 bool SharedFunctionInfo::EnsureCompiled(Handle<SharedFunctionInfo> shared, | 7325 bool SharedFunctionInfo::EnsureCompiled(Handle<SharedFunctionInfo> shared, |
| 7318 ClearExceptionFlag flag) { | 7326 ClearExceptionFlag flag) { |
| 7319 return shared->is_compiled() || CompileLazy(shared, flag); | 7327 return shared->is_compiled() || CompileLazy(shared, flag); |
| 7320 } | 7328 } |
| 7321 | 7329 |
| 7322 | 7330 |
| 7323 static bool CompileLazyHelper(CompilationInfo* info, | 7331 static bool CompileLazyHelper(CompilationInfo* info, |
| 7324 ClearExceptionFlag flag) { | 7332 ClearExceptionFlag flag) { |
| 7325 // Compile the source information to a code object. | 7333 // Compile the source information to a code object. |
| 7326 ASSERT(info->IsOptimizing() || !info->shared_info()->is_compiled()); | 7334 ASSERT(info->IsOptimizing() || !info->shared_info()->is_compiled()); |
| (...skipping 5604 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 12931 set_year(Smi::FromInt(year), SKIP_WRITE_BARRIER); | 12939 set_year(Smi::FromInt(year), SKIP_WRITE_BARRIER); |
| 12932 set_month(Smi::FromInt(month), SKIP_WRITE_BARRIER); | 12940 set_month(Smi::FromInt(month), SKIP_WRITE_BARRIER); |
| 12933 set_day(Smi::FromInt(day), SKIP_WRITE_BARRIER); | 12941 set_day(Smi::FromInt(day), SKIP_WRITE_BARRIER); |
| 12934 set_weekday(Smi::FromInt(weekday), SKIP_WRITE_BARRIER); | 12942 set_weekday(Smi::FromInt(weekday), SKIP_WRITE_BARRIER); |
| 12935 set_hour(Smi::FromInt(hour), SKIP_WRITE_BARRIER); | 12943 set_hour(Smi::FromInt(hour), SKIP_WRITE_BARRIER); |
| 12936 set_min(Smi::FromInt(min), SKIP_WRITE_BARRIER); | 12944 set_min(Smi::FromInt(min), SKIP_WRITE_BARRIER); |
| 12937 set_sec(Smi::FromInt(sec), SKIP_WRITE_BARRIER); | 12945 set_sec(Smi::FromInt(sec), SKIP_WRITE_BARRIER); |
| 12938 } | 12946 } |
| 12939 | 12947 |
| 12940 } } // namespace v8::internal | 12948 } } // namespace v8::internal |
| OLD | NEW |