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

Unified Diff: src/parser.h

Issue 1002673002: Remove funky 2-stage initialization of ParserInfo and an adventurous memset. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Removed TODOs 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 | « src/hydrogen.cc ('k') | src/parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parser.h
diff --git a/src/parser.h b/src/parser.h
index 078383b391284425bd14dd37a0d8dee5fe879267..c73caae51b60a5dca2880773474eea9a5bbebf31 100644
--- a/src/parser.h
+++ b/src/parser.h
@@ -25,10 +25,10 @@ class Target;
// A container for the inputs, configuration options, and outputs of parsing.
class ParseInfo {
public:
- explicit ParseInfo(Zone* zone) {
- memset(this, 0, sizeof(ParseInfo));
- zone_ = zone;
- }
+ explicit ParseInfo(Zone* zone);
+ ParseInfo(Zone* zone, Handle<JSFunction> function);
+ ParseInfo(Zone* zone, Handle<SharedFunctionInfo> shared);
+ ParseInfo(Zone* zone, Handle<Script> script);
~ParseInfo() {
if (ast_value_factory_owned()) {
@@ -38,11 +38,6 @@ class ParseInfo {
ast_value_factory_ = nullptr;
}
- ParseInfo* InitializeFromJSFunction(Handle<JSFunction> function);
- ParseInfo* InitializeFromSharedFunctionInfo(
- Handle<SharedFunctionInfo> shared);
- ParseInfo* InitializeFromScript(Handle<Script> script);
-
Zone* zone() { return zone_; }
// Convenience accessor methods for flags.
« no previous file with comments | « src/hydrogen.cc ('k') | src/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698