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

Unified Diff: src/parsing/preparse-data.h

Issue 2481163002: Assign unique IDs to FunctionLiterals (Closed)
Patch Set: updates Created 4 years, 1 month 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/parsing/preparse-data.h
diff --git a/src/parsing/preparse-data.h b/src/parsing/preparse-data.h
index 767484ad7ff074bc9fecd7625d7c32543f852d06..ca70f8a45f3c74725d39e69d790739464671f69a 100644
--- a/src/parsing/preparse-data.h
+++ b/src/parsing/preparse-data.h
@@ -52,17 +52,19 @@ class PreParserLogger final {
: end_(-1),
num_parameters_(-1),
function_length_(-1),
- has_duplicate_parameters_(false) {}
+ has_duplicate_parameters_(false),
+ num_inner_functions_(-1) {}
void LogFunction(int end, int num_parameters, int function_length,
- bool has_duplicate_parameters, int literals,
- int properties) {
+ bool has_duplicate_parameters, int literals, int properties,
+ int num_inner_functions) {
end_ = end;
num_parameters_ = num_parameters;
function_length_ = function_length;
has_duplicate_parameters_ = has_duplicate_parameters;
literals_ = literals;
properties_ = properties;
+ num_inner_functions_ = num_inner_functions;
}
int end() const { return end_; }
@@ -81,6 +83,7 @@ class PreParserLogger final {
int properties() const {
return properties_;
}
+ int num_inner_functions() const { return num_inner_functions_; }
private:
int end_;
@@ -90,6 +93,7 @@ class PreParserLogger final {
bool has_duplicate_parameters_;
int literals_;
int properties_;
+ int num_inner_functions_;
};
class ParserLogger final {
@@ -99,7 +103,7 @@ class ParserLogger final {
void LogFunction(int start, int end, int num_parameters, int function_length,
bool has_duplicate_parameters, int literals, int properties,
LanguageMode language_mode, bool uses_super_property,
- bool calls_eval);
+ bool calls_eval, int num_inner_functions);
ScriptData* GetScriptData();

Powered by Google App Engine
This is Rietveld 408576698