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

Side by Side Diff: src/runtime.cc

Issue 11414030: 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 | « src/compiler.cc ('k') | test/mjsunit/manual-parallel-recompile.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 7995 matching lines...) Expand 10 before | Expand all | Expand 10 after
8006 fun->ReplaceCode(isolate->builtins()->builtin(Builtins::kParallelRecompile)); 8006 fun->ReplaceCode(isolate->builtins()->builtin(Builtins::kParallelRecompile));
8007 Compiler::RecompileParallel(fun); 8007 Compiler::RecompileParallel(fun);
8008 return isolate->heap()->undefined_value(); 8008 return isolate->heap()->undefined_value();
8009 } 8009 }
8010 8010
8011 8011
8012 RUNTIME_FUNCTION(MaybeObject*, Runtime_InstallRecompiledCode) { 8012 RUNTIME_FUNCTION(MaybeObject*, Runtime_InstallRecompiledCode) {
8013 if (!V8::UseCrankshaft()) return isolate->heap()->undefined_value(); 8013 if (!V8::UseCrankshaft()) return isolate->heap()->undefined_value();
8014 HandleScope handle_scope(isolate); 8014 HandleScope handle_scope(isolate);
8015 ASSERT(FLAG_parallel_recompilation && FLAG_manual_parallel_recompilation); 8015 ASSERT(FLAG_parallel_recompilation && FLAG_manual_parallel_recompilation);
8016 CONVERT_ARG_HANDLE_CHECKED(HeapObject, arg, 0); 8016 CONVERT_ARG_HANDLE_CHECKED(JSFunction, fun, 0);
8017 OptimizingCompilerThread* opt_thread = isolate->optimizing_compiler_thread(); 8017 OptimizingCompilerThread* opt_thread = isolate->optimizing_compiler_thread();
8018 if (!arg->IsJSFunction()) { 8018 Handle<SharedFunctionInfo> shared(fun->shared());
8019 opt_thread->InstallOptimizedFunctions(); 8019 while (*opt_thread->InstallNextOptimizedFunction() != *shared) { }
8020 } else if (!JSFunction::cast(*arg)->IsOptimized()) {
8021 Handle<SharedFunctionInfo> shared(JSFunction::cast(*arg)->shared());
8022 while (*opt_thread->InstallNextOptimizedFunction() != *shared) { }
8023 }
8024 return isolate->heap()->undefined_value(); 8020 return isolate->heap()->undefined_value();
8025 } 8021 }
8026 8022
8027 8023
8028 class ActivationsFinder : public ThreadVisitor { 8024 class ActivationsFinder : public ThreadVisitor {
8029 public: 8025 public:
8030 explicit ActivationsFinder(JSFunction* function) 8026 explicit ActivationsFinder(JSFunction* function)
8031 : function_(function), has_activations_(false) {} 8027 : function_(function), has_activations_(false) {}
8032 8028
8033 void VisitThread(Isolate* isolate, ThreadLocalTop* top) { 8029 void VisitThread(Isolate* isolate, ThreadLocalTop* top) {
(...skipping 5418 matching lines...) Expand 10 before | Expand all | Expand 10 after
13452 // Handle last resort GC and make sure to allow future allocations 13448 // Handle last resort GC and make sure to allow future allocations
13453 // to grow the heap without causing GCs (if possible). 13449 // to grow the heap without causing GCs (if possible).
13454 isolate->counters()->gc_last_resort_from_js()->Increment(); 13450 isolate->counters()->gc_last_resort_from_js()->Increment();
13455 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, 13451 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags,
13456 "Runtime::PerformGC"); 13452 "Runtime::PerformGC");
13457 } 13453 }
13458 } 13454 }
13459 13455
13460 13456
13461 } } // namespace v8::internal 13457 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/compiler.cc ('k') | test/mjsunit/manual-parallel-recompile.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698