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

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

Issue 7044054: Fix Array.prototype.{reduce,reduceRight} to pass undefined as receiver (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address comments Created 9 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/parser.cc ('k') | src/preparse-data-format.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 30 matching lines...) Expand all
41 // Abstract interface for preparse data recorder. 41 // Abstract interface for preparse data recorder.
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) = 0; 51 int properties,
52 int strict_mode) = 0;
52 53
53 // Logs a symbol creation of a literal or identifier. 54 // Logs a symbol creation of a literal or identifier.
54 virtual void LogAsciiSymbol(int start, Vector<const char> literal) { } 55 virtual void LogAsciiSymbol(int start, Vector<const char> literal) { }
55 virtual void LogUC16Symbol(int start, Vector<const uc16> literal) { } 56 virtual void LogUC16Symbol(int start, Vector<const uc16> literal) { }
56 57
57 // 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.
58 // Further logging will be ignored, and ExtractData will return a vector 59 // Further logging will be ignored, and ExtractData will return a vector
59 // representing the error only. 60 // representing the error only.
60 virtual void LogMessage(int start, 61 virtual void LogMessage(int start,
61 int end, 62 int end,
(...skipping 15 matching lines...) Expand all
77 78
78 79
79 // ---------------------------------------------------------------------------- 80 // ----------------------------------------------------------------------------
80 // FunctionLoggingParserRecorder - Record only function entries 81 // FunctionLoggingParserRecorder - Record only function entries
81 82
82 class FunctionLoggingParserRecorder : public ParserRecorder { 83 class FunctionLoggingParserRecorder : public ParserRecorder {
83 public: 84 public:
84 FunctionLoggingParserRecorder(); 85 FunctionLoggingParserRecorder();
85 virtual ~FunctionLoggingParserRecorder() {} 86 virtual ~FunctionLoggingParserRecorder() {}
86 87
87 virtual void LogFunction(int start, int end, int literals, int properties) { 88 virtual void LogFunction(int start,
89 int end,
90 int literals,
91 int properties,
92 int strict_mode) {
88 function_store_.Add(start); 93 function_store_.Add(start);
89 function_store_.Add(end); 94 function_store_.Add(end);
90 function_store_.Add(literals); 95 function_store_.Add(literals);
91 function_store_.Add(properties); 96 function_store_.Add(properties);
97 function_store_.Add(strict_mode);
92 } 98 }
93 99
94 // 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.
95 // Further logging will be ignored, and ExtractData will return a vector 101 // Further logging will be ignored, and ExtractData will return a vector
96 // representing the error only. 102 // representing the error only.
97 virtual void LogMessage(int start, 103 virtual void LogMessage(int start,
98 int end, 104 int end,
99 const char* message, 105 const char* message,
100 const char* argument_opt); 106 const char* argument_opt);
101 107
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 Collector<byte> symbol_store_; 222 Collector<byte> symbol_store_;
217 Collector<Key> symbol_keys_; 223 Collector<Key> symbol_keys_;
218 HashMap symbol_table_; 224 HashMap symbol_table_;
219 int symbol_id_; 225 int symbol_id_;
220 }; 226 };
221 227
222 228
223 } } // namespace v8::internal. 229 } } // namespace v8::internal.
224 230
225 #endif // V8_PREPARSE_DATA_H_ 231 #endif // V8_PREPARSE_DATA_H_
OLDNEW
« no previous file with comments | « src/parser.cc ('k') | src/preparse-data-format.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698