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

Unified Diff: src/ast.h

Issue 23817003: Propagate bailout and dont_optimize reasons to cpu-profiler (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 3 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
Index: src/ast.h
diff --git a/src/ast.h b/src/ast.h
index f22c96ccdfc7a2f3972202844c500ab78bfab1ce..81682cff9a9abececc9a156872ade0430fbc4bbf 100644
--- a/src/ast.h
+++ b/src/ast.h
@@ -171,7 +171,6 @@ typedef ZoneList<Handle<Object> > ZoneObjectList;
enum AstPropertiesFlag {
kDontInline,
- kDontOptimize,
kDontSelfOptimize,
kDontSoftInline,
kDontCache
@@ -2314,6 +2313,15 @@ class FunctionLiteral V8_FINAL : public Expression {
void set_ast_properties(AstProperties* ast_properties) {
ast_properties_ = *ast_properties;
}
+ inline BailoutReason dont_optimize_reason() {
yurys 2013/09/02 14:40:05 No need to add inline, the compiler should be smar
loislo 2013/09/02 16:03:45 Done.
+ return dont_optimize_reason_;
+ }
+ inline void set_dont_optimize_reason(BailoutReason reason) {
+ dont_optimize_reason_ = reason;
+ }
+ inline bool dont_optimize() {
+ return dont_optimize_reason_ != kNoReason;
+ }
protected:
FunctionLiteral(Isolate* isolate,
@@ -2334,6 +2342,7 @@ class FunctionLiteral V8_FINAL : public Expression {
scope_(scope),
body_(body),
inferred_name_(isolate->factory()->empty_string()),
+ dont_optimize_reason_(kNoReason),
materialized_literal_count_(materialized_literal_count),
expected_property_count_(expected_property_count),
handler_count_(handler_count),
@@ -2355,6 +2364,7 @@ class FunctionLiteral V8_FINAL : public Expression {
ZoneList<Statement*>* body_;
Handle<String> inferred_name_;
AstProperties ast_properties_;
+ BailoutReason dont_optimize_reason_;
int materialized_literal_count_;
int expected_property_count_;
@@ -2829,9 +2839,11 @@ private: \
class AstConstructionVisitor BASE_EMBEDDED {
public:
- AstConstructionVisitor() { }
+ AstConstructionVisitor() : dont_optimize_reason_(kNoReason) {
+ }
AstProperties* ast_properties() { return &properties_; }
+ BailoutReason dont_optimize_reason() { return dont_optimize_reason_; }
private:
template<class> friend class AstNodeFactory;
@@ -2844,8 +2856,12 @@ class AstConstructionVisitor BASE_EMBEDDED {
void increase_node_count() { properties_.add_node_count(1); }
void add_flag(AstPropertiesFlag flag) { properties_.flags()->Add(flag); }
+ void set_dont_optimize_reason(BailoutReason reason) {
+ dont_optimize_reason_ = reason;
+ }
AstProperties properties_;
+ BailoutReason dont_optimize_reason_;
};

Powered by Google App Engine
This is Rietveld 408576698