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

Unified Diff: src/ast.h

Issue 62146: Add name inference for anonymous functions to facilitate debugging and profiling of JS code. (Closed)
Patch Set: updated v8_base_arm project Created 11 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/SConscript ('k') | src/codegen.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 5dfd21d9e4b98d3b53750f461c3df9afbb298ab4..b496816f7e42b7bb9dfb0bc4d47442bf24be8713 100644
--- a/src/ast.h
+++ b/src/ast.h
@@ -1223,7 +1223,8 @@ class FunctionLiteral: public Expression {
end_position_(end_position),
is_expression_(is_expression),
loop_nesting_(0),
- function_token_position_(RelocInfo::kNoPosition) {
+ function_token_position_(RelocInfo::kNoPosition),
+ inferred_name_(Heap::empty_string()) {
#ifdef DEBUG
already_compiled_ = false;
#endif
@@ -1253,6 +1254,11 @@ class FunctionLiteral: public Expression {
bool loop_nesting() const { return loop_nesting_; }
void set_loop_nesting(int nesting) { loop_nesting_ = nesting; }
+ Handle<String> inferred_name() const { return inferred_name_; }
+ void set_inferred_name(Handle<String> inferred_name) {
+ inferred_name_ = inferred_name;
+ }
+
#ifdef DEBUG
void mark_as_compiled() {
ASSERT(!already_compiled_);
@@ -1273,6 +1279,7 @@ class FunctionLiteral: public Expression {
bool is_expression_;
int loop_nesting_;
int function_token_position_;
+ Handle<String> inferred_name_;
#ifdef DEBUG
bool already_compiled_;
#endif
« no previous file with comments | « src/SConscript ('k') | src/codegen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698