Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(10)

Side by Side Diff: src/objects.cc

Issue 10417010: Run Crankshaft on a separate thread. (Closed) Base URL: https://chromiumcodereview.appspot.com/10387157
Patch Set: Set optimize_in_parallel to false by default. Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/objects.h ('k') | src/optimizing-compiler-thread.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/objects.h ('k') | src/optimizing-compiler-thread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698