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

Unified Diff: src/compiler.h

Issue 1095433002: Refactor compilation dependency handling. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compilation-dependencies.cc ('k') | src/compiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler.h
diff --git a/src/compiler.h b/src/compiler.h
index f9acb66c089b38d86bb1f15e753edb03a4a98fdc..0e50075021e562cdb227449b4f96cdff1bf4d278 100644
--- a/src/compiler.h
+++ b/src/compiler.h
@@ -8,6 +8,7 @@
#include "src/allocation.h"
#include "src/ast.h"
#include "src/bailout-reason.h"
+#include "src/compilation-dependencies.h"
#include "src/zone.h"
namespace v8 {
@@ -299,18 +300,6 @@ class CompilationInfo {
deferred_handles_ = deferred_handles;
}
- ZoneList<Handle<HeapObject> >* dependencies(
- DependentCode::DependencyGroup group) {
- if (dependencies_[group] == NULL) {
- dependencies_[group] = new(zone_) ZoneList<Handle<HeapObject> >(2, zone_);
- }
- return dependencies_[group];
- }
-
- void CommitDependencies(Handle<Code> code);
-
- void RollbackDependencies();
-
void ReopenHandlesInNewHandleScope() {
unoptimized_code_ = Handle<Code>(*unoptimized_code_);
}
@@ -363,21 +352,7 @@ class CompilationInfo {
int TraceInlinedFunction(Handle<SharedFunctionInfo> shared,
SourcePosition position, int pareint_id);
- Handle<Foreign> object_wrapper() {
- if (object_wrapper_.is_null()) {
- object_wrapper_ =
- isolate()->factory()->NewForeign(reinterpret_cast<Address>(this));
- }
- return object_wrapper_;
- }
-
- void AbortDueToDependencyChange() {
- aborted_due_to_dependency_change_ = true;
- }
-
- bool HasAbortedDueToDependencyChange() const {
- return aborted_due_to_dependency_change_;
- }
+ CompilationDependencies* dependencies() { return &dependencies_; }
bool HasSameOsrEntry(Handle<JSFunction> function, BailoutId osr_ast_id) {
return osr_ast_id_ == osr_ast_id && function.is_identical_to(closure());
@@ -460,7 +435,8 @@ class CompilationInfo {
DeferredHandles* deferred_handles_;
- ZoneList<Handle<HeapObject> >* dependencies_[DependentCode::kGroupCount];
+ // Dependencies for this compilation, e.g. stable maps.
+ CompilationDependencies dependencies_;
BailoutReason bailout_reason_;
@@ -477,14 +453,8 @@ class CompilationInfo {
// Number of parameters used for compilation of stubs that require arguments.
int parameter_count_;
- Handle<Foreign> object_wrapper_;
-
int optimization_id_;
- // This flag is used by the main thread to track whether this compilation
- // should be abandoned due to dependency change.
- bool aborted_due_to_dependency_change_;
-
int osr_expr_stack_height_;
DISALLOW_COPY_AND_ASSIGN(CompilationInfo);
« no previous file with comments | « src/compilation-dependencies.cc ('k') | src/compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698