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

Unified Diff: src/func-name-inferrer.cc

Issue 67168: Allow multiple function literals to be assigned to the same var / property. (Closed)
Patch Set: Changes according to Kevin's and Lasse's comments 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/func-name-inferrer.h ('k') | src/rewriter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/func-name-inferrer.cc
diff --git a/src/func-name-inferrer.cc b/src/func-name-inferrer.cc
index ef0c7dbb4e8cedbe0933a907fe16378ab67d2aa9..75f7a99372b41d858c0603a0485033825cb4c7f6 100644
--- a/src/func-name-inferrer.cc
+++ b/src/func-name-inferrer.cc
@@ -63,11 +63,12 @@ Handle<String> FuncNameInferrer::MakeNameFromStackHelper(int pos,
}
-void FuncNameInferrer::MaybeInferFunctionName() {
- if (func_to_infer_ != NULL) {
- func_to_infer_->set_inferred_name(MakeNameFromStack());
- func_to_infer_ = NULL;
+void FuncNameInferrer::InferFunctionsNames() {
+ Handle<String> func_name = MakeNameFromStack();
+ for (int i = 0; i < funcs_to_infer_.length(); ++i) {
+ funcs_to_infer_[i]->set_inferred_name(func_name);
}
+ funcs_to_infer_.Rewind(0);
}
« no previous file with comments | « src/func-name-inferrer.h ('k') | src/rewriter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698