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

Side by Side Diff: src/runtime.cc

Issue 11299033: Fix test failures. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | test/mjsunit/fuzz-natives-part1.js » ('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 7977 matching lines...) Expand 10 before | Expand all | Expand 10 after
7988 7988
7989 RUNTIME_FUNCTION(MaybeObject*, Runtime_ParallelRecompile) { 7989 RUNTIME_FUNCTION(MaybeObject*, Runtime_ParallelRecompile) {
7990 HandleScope handle_scope(isolate); 7990 HandleScope handle_scope(isolate);
7991 ASSERT(FLAG_parallel_recompilation); 7991 ASSERT(FLAG_parallel_recompilation);
7992 Compiler::RecompileParallel(args.at<JSFunction>(0)); 7992 Compiler::RecompileParallel(args.at<JSFunction>(0));
7993 return isolate->heap()->undefined_value(); 7993 return isolate->heap()->undefined_value();
7994 } 7994 }
7995 7995
7996 7996
7997 RUNTIME_FUNCTION(MaybeObject*, Runtime_ForceParallelRecompile) { 7997 RUNTIME_FUNCTION(MaybeObject*, Runtime_ForceParallelRecompile) {
7998 if (!V8::UseCrankshaft()) return isolate->heap()->undefined_value();
7998 HandleScope handle_scope(isolate); 7999 HandleScope handle_scope(isolate);
7999 ASSERT(FLAG_parallel_recompilation && FLAG_manual_parallel_recompilation); 8000 ASSERT(FLAG_parallel_recompilation && FLAG_manual_parallel_recompilation);
8000 if (!isolate->optimizing_compiler_thread()->IsQueueAvailable()) { 8001 if (!isolate->optimizing_compiler_thread()->IsQueueAvailable()) {
8001 return isolate->Throw( 8002 return isolate->Throw(
8002 *isolate->factory()->LookupAsciiSymbol("Recompile queue is full.")); 8003 *isolate->factory()->LookupAsciiSymbol("Recompile queue is full."));
8003 } 8004 }
8004 CONVERT_ARG_HANDLE_CHECKED(JSFunction, fun, 0); 8005 CONVERT_ARG_HANDLE_CHECKED(JSFunction, fun, 0);
8005 fun->ReplaceCode(isolate->builtins()->builtin(Builtins::kParallelRecompile)); 8006 fun->ReplaceCode(isolate->builtins()->builtin(Builtins::kParallelRecompile));
8006 Compiler::RecompileParallel(fun); 8007 Compiler::RecompileParallel(fun);
8007 return isolate->heap()->undefined_value(); 8008 return isolate->heap()->undefined_value();
8008 } 8009 }
8009 8010
8010 8011
8011 RUNTIME_FUNCTION(MaybeObject*, Runtime_InstallRecompiledCode) { 8012 RUNTIME_FUNCTION(MaybeObject*, Runtime_InstallRecompiledCode) {
8013 if (!V8::UseCrankshaft()) return isolate->heap()->undefined_value();
8012 HandleScope handle_scope(isolate); 8014 HandleScope handle_scope(isolate);
8013 ASSERT(FLAG_parallel_recompilation && FLAG_manual_parallel_recompilation); 8015 ASSERT(FLAG_parallel_recompilation && FLAG_manual_parallel_recompilation);
8014 CONVERT_ARG_HANDLE_CHECKED(HeapObject, arg, 0); 8016 CONVERT_ARG_HANDLE_CHECKED(HeapObject, arg, 0);
8015 OptimizingCompilerThread* opt_thread = isolate->optimizing_compiler_thread(); 8017 OptimizingCompilerThread* opt_thread = isolate->optimizing_compiler_thread();
8016 if (!arg->IsJSFunction()) { 8018 if (!arg->IsJSFunction()) {
8017 opt_thread->InstallOptimizedFunctions(); 8019 opt_thread->InstallOptimizedFunctions();
8018 } else if (!JSFunction::cast(*arg)->IsOptimized()) { 8020 } else if (!JSFunction::cast(*arg)->IsOptimized()) {
8019 Handle<SharedFunctionInfo> shared(JSFunction::cast(*arg)->shared()); 8021 Handle<SharedFunctionInfo> shared(JSFunction::cast(*arg)->shared());
8020 while (*opt_thread->InstallNextOptimizedFunction() != *shared) { } 8022 while (*opt_thread->InstallNextOptimizedFunction() != *shared) { }
8021 } 8023 }
(...skipping 5428 matching lines...) Expand 10 before | Expand all | Expand 10 after
13450 // Handle last resort GC and make sure to allow future allocations 13452 // Handle last resort GC and make sure to allow future allocations
13451 // to grow the heap without causing GCs (if possible). 13453 // to grow the heap without causing GCs (if possible).
13452 isolate->counters()->gc_last_resort_from_js()->Increment(); 13454 isolate->counters()->gc_last_resort_from_js()->Increment();
13453 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, 13455 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags,
13454 "Runtime::PerformGC"); 13456 "Runtime::PerformGC");
13455 } 13457 }
13456 } 13458 }
13457 13459
13458 13460
13459 } } // namespace v8::internal 13461 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/fuzz-natives-part1.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698