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

Side by Side Diff: src/compiler.h

Issue 1773663003: [compiler] Slightly change API to finalize compile jobs. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@local_cleanup-remove-concurrent-osr
Patch Set: Fix think'o. Created 4 years, 9 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 | « no previous file | src/compiler.cc » ('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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_COMPILER_H_ 5 #ifndef V8_COMPILER_H_
6 #define V8_COMPILER_H_ 6 #define V8_COMPILER_H_
7 7
8 #include "src/allocation.h" 8 #include "src/allocation.h"
9 #include "src/ast/ast.h" 9 #include "src/ast/ast.h"
10 #include "src/bailout-reason.h" 10 #include "src/bailout-reason.h"
(...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after
581 // general contract is that failures will be reported by returning {false}, 581 // general contract is that failures will be reported by returning {false},
582 // whereas successful compilation ensures the {is_compiled} predicate on the 582 // whereas successful compilation ensures the {is_compiled} predicate on the
583 // given function holds. 583 // given function holds.
584 584
585 static bool Compile(Handle<JSFunction> function, ClearExceptionFlag flag); 585 static bool Compile(Handle<JSFunction> function, ClearExceptionFlag flag);
586 static bool CompileOptimized(Handle<JSFunction> function, ConcurrencyMode); 586 static bool CompileOptimized(Handle<JSFunction> function, ConcurrencyMode);
587 static bool CompileDebugCode(Handle<JSFunction> function); 587 static bool CompileDebugCode(Handle<JSFunction> function);
588 static bool CompileDebugCode(Handle<SharedFunctionInfo> shared); 588 static bool CompileDebugCode(Handle<SharedFunctionInfo> shared);
589 static void CompileForLiveEdit(Handle<Script> script); 589 static void CompileForLiveEdit(Handle<Script> script);
590 590
591 // Generate and install code from previously queued optimization job.
592 static void FinalizeOptimizedCompileJob(OptimizedCompileJob* job);
593
591 // Give the compiler a chance to perform low-latency initialization tasks of 594 // Give the compiler a chance to perform low-latency initialization tasks of
592 // the given {function} on its instantiation. Note that only the runtime will 595 // the given {function} on its instantiation. Note that only the runtime will
593 // offer this chance, optimized closure instantiation will not call this. 596 // offer this chance, optimized closure instantiation will not call this.
594 static void PostInstantiation(Handle<JSFunction> function, PretenureFlag); 597 static void PostInstantiation(Handle<JSFunction> function, PretenureFlag);
595 598
596 // Parser::Parse, then Compiler::Analyze. 599 // Parser::Parse, then Compiler::Analyze.
597 static bool ParseAndAnalyze(ParseInfo* info); 600 static bool ParseAndAnalyze(ParseInfo* info);
598 // Rewrite, analyze scopes, and renumber. 601 // Rewrite, analyze scopes, and renumber.
599 static bool Analyze(ParseInfo* info); 602 static bool Analyze(ParseInfo* info);
600 // Adds deoptimization support, requires ParseAndAnalyze. 603 // Adds deoptimization support, requires ParseAndAnalyze.
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
644 // returned directly to the caller. 647 // returned directly to the caller.
645 // 648 //
646 // Please note this interface is the only part dealing with {Code} objects 649 // Please note this interface is the only part dealing with {Code} objects
647 // directly. Other methods are agnostic to {Code} and can use an interpreter 650 // directly. Other methods are agnostic to {Code} and can use an interpreter
648 // instead of generating JIT code for a function at all. 651 // instead of generating JIT code for a function at all.
649 652
650 // Generate and return optimized code for OSR, or empty handle on failure. 653 // Generate and return optimized code for OSR, or empty handle on failure.
651 MUST_USE_RESULT static MaybeHandle<Code> GetOptimizedCodeForOSR( 654 MUST_USE_RESULT static MaybeHandle<Code> GetOptimizedCodeForOSR(
652 Handle<JSFunction> function, BailoutId osr_ast_id, 655 Handle<JSFunction> function, BailoutId osr_ast_id,
653 JavaScriptFrame* osr_frame); 656 JavaScriptFrame* osr_frame);
654
655 // Generate and return code from previously queued optimization job.
656 // On failure, return the empty handle.
657 MUST_USE_RESULT static MaybeHandle<Code> GetConcurrentlyOptimizedCode(
658 OptimizedCompileJob* job);
659 }; 657 };
660 658
661 } // namespace internal 659 } // namespace internal
662 } // namespace v8 660 } // namespace v8
663 661
664 #endif // V8_COMPILER_H_ 662 #endif // V8_COMPILER_H_
OLDNEW
« no previous file with comments | « no previous file | src/compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698