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

Unified Diff: src/ast.h

Issue 1014793003: Feedback vector: ASAN found memory leaks during AST Numbering pass. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Minor fixes. Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/ast-numbering.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast.h
diff --git a/src/ast.h b/src/ast.h
index 3c07471a3055d305d942fc4ef900293ead012870..af06be70da1fa888f2ca14596c8d57390ad04d65 100644
--- a/src/ast.h
+++ b/src/ast.h
@@ -188,7 +188,7 @@ class AstProperties FINAL BASE_EMBEDDED {
public:
class Flags : public EnumSet<AstPropertiesFlag, int> {};
- AstProperties() : node_count_(0) {}
+ explicit AstProperties(Zone* zone) : node_count_(0), spec_(zone) {}
Flags* flags() { return &flags_; }
int node_count() { return node_count_; }
@@ -200,12 +200,12 @@ class AstProperties FINAL BASE_EMBEDDED {
int ic_slots() const { return spec_.ic_slots(); }
void increase_ic_slots(int count) { spec_.increase_ic_slots(count); }
void SetKind(int ic_slot, Code::Kind kind) { spec_.SetKind(ic_slot, kind); }
- const FeedbackVectorSpec& get_spec() const { return spec_; }
+ const ZoneFeedbackVectorSpec* get_spec() const { return &spec_; }
private:
Flags flags_;
int node_count_;
- FeedbackVectorSpec spec_;
+ ZoneFeedbackVectorSpec spec_;
};
@@ -2555,7 +2555,7 @@ class FunctionLiteral FINAL : public Expression {
void set_ast_properties(AstProperties* ast_properties) {
ast_properties_ = *ast_properties;
}
- const FeedbackVectorSpec& feedback_vector_spec() const {
+ const ZoneFeedbackVectorSpec* feedback_vector_spec() const {
return ast_properties_.get_spec();
}
bool dont_optimize() { return dont_optimize_reason_ != kNoReason; }
@@ -2579,6 +2579,7 @@ class FunctionLiteral FINAL : public Expression {
scope_(scope),
body_(body),
raw_inferred_name_(ast_value_factory->empty_string()),
+ ast_properties_(zone),
dont_optimize_reason_(kNoReason),
materialized_literal_count_(materialized_literal_count),
expected_property_count_(expected_property_count),
« no previous file with comments | « no previous file | src/ast-numbering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698