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

Side by Side Diff: src/preparse-data.h

Issue 8417035: Introduce extended mode. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed more comments. Created 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/parser.cc ('k') | src/preparser.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 class ParserRecorder { 42 class ParserRecorder {
43 public: 43 public:
44 ParserRecorder() { } 44 ParserRecorder() { }
45 virtual ~ParserRecorder() { } 45 virtual ~ParserRecorder() { }
46 46
47 // Logs the scope and some details of a function literal in the source. 47 // Logs the scope and some details of a function literal in the source.
48 virtual void LogFunction(int start, 48 virtual void LogFunction(int start,
49 int end, 49 int end,
50 int literals, 50 int literals,
51 int properties, 51 int properties,
52 StrictModeFlag strict_mode) = 0; 52 LanguageMode language_mode) = 0;
53 53
54 // Logs a symbol creation of a literal or identifier. 54 // Logs a symbol creation of a literal or identifier.
55 virtual void LogAsciiSymbol(int start, Vector<const char> literal) { } 55 virtual void LogAsciiSymbol(int start, Vector<const char> literal) { }
56 virtual void LogUC16Symbol(int start, Vector<const uc16> literal) { } 56 virtual void LogUC16Symbol(int start, Vector<const uc16> literal) { }
57 57
58 // Logs an error message and marks the log as containing an error. 58 // Logs an error message and marks the log as containing an error.
59 // Further logging will be ignored, and ExtractData will return a vector 59 // Further logging will be ignored, and ExtractData will return a vector
60 // representing the error only. 60 // representing the error only.
61 virtual void LogMessage(int start, 61 virtual void LogMessage(int start,
62 int end, 62 int end,
(...skipping 19 matching lines...) Expand all
82 82
83 class FunctionLoggingParserRecorder : public ParserRecorder { 83 class FunctionLoggingParserRecorder : public ParserRecorder {
84 public: 84 public:
85 FunctionLoggingParserRecorder(); 85 FunctionLoggingParserRecorder();
86 virtual ~FunctionLoggingParserRecorder() {} 86 virtual ~FunctionLoggingParserRecorder() {}
87 87
88 virtual void LogFunction(int start, 88 virtual void LogFunction(int start,
89 int end, 89 int end,
90 int literals, 90 int literals,
91 int properties, 91 int properties,
92 StrictModeFlag strict_mode) { 92 LanguageMode language_mode) {
93 function_store_.Add(start); 93 function_store_.Add(start);
94 function_store_.Add(end); 94 function_store_.Add(end);
95 function_store_.Add(literals); 95 function_store_.Add(literals);
96 function_store_.Add(properties); 96 function_store_.Add(properties);
97 function_store_.Add(strict_mode); 97 function_store_.Add(language_mode);
98 } 98 }
99 99
100 // Logs an error message and marks the log as containing an error. 100 // Logs an error message and marks the log as containing an error.
101 // Further logging will be ignored, and ExtractData will return a vector 101 // Further logging will be ignored, and ExtractData will return a vector
102 // representing the error only. 102 // representing the error only.
103 virtual void LogMessage(int start, 103 virtual void LogMessage(int start,
104 int end, 104 int end,
105 const char* message, 105 const char* message,
106 const char* argument_opt); 106 const char* argument_opt);
107 107
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 Collector<byte> symbol_store_; 222 Collector<byte> symbol_store_;
223 Collector<Key> symbol_keys_; 223 Collector<Key> symbol_keys_;
224 HashMap symbol_table_; 224 HashMap symbol_table_;
225 int symbol_id_; 225 int symbol_id_;
226 }; 226 };
227 227
228 228
229 } } // namespace v8::internal. 229 } } // namespace v8::internal.
230 230
231 #endif // V8_PREPARSE_DATA_H_ 231 #endif // V8_PREPARSE_DATA_H_
OLDNEW
« no previous file with comments | « src/parser.cc ('k') | src/preparser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698