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

Side by Side Diff: src/messages.js

Issue 6598023: Strict mode - allow function only in SourceElements. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: CR Feedback. Created 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | src/parser.cc » ('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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 strict_octal_literal: ["Octal literals are not allowed in strict m ode."], 219 strict_octal_literal: ["Octal literals are not allowed in strict m ode."],
220 strict_duplicate_property: ["Duplicate data property in object literal not allowed in strict mode"], 220 strict_duplicate_property: ["Duplicate data property in object literal not allowed in strict mode"],
221 accessor_data_property: ["Object literal may not have data and acces sor property with the same name"], 221 accessor_data_property: ["Object literal may not have data and acces sor property with the same name"],
222 accessor_get_set: ["Object literal may not have multiple get/s et accessors with the same name"], 222 accessor_get_set: ["Object literal may not have multiple get/s et accessors with the same name"],
223 strict_lhs_assignment: ["Assignment to eval or arguments is not all owed in strict mode"], 223 strict_lhs_assignment: ["Assignment to eval or arguments is not all owed in strict mode"],
224 strict_lhs_postfix: ["Postfix increment/decrement may not have e val or arguments operand in strict mode"], 224 strict_lhs_postfix: ["Postfix increment/decrement may not have e val or arguments operand in strict mode"],
225 strict_lhs_prefix: ["Prefix increment/decrement may not have ev al or arguments operand in strict mode"], 225 strict_lhs_prefix: ["Prefix increment/decrement may not have ev al or arguments operand in strict mode"],
226 strict_reserved_word: ["Use of future reserved word in strict mode "], 226 strict_reserved_word: ["Use of future reserved word in strict mode "],
227 strict_delete: ["Delete of an unqualified identifier in str ict mode."], 227 strict_delete: ["Delete of an unqualified identifier in str ict mode."],
228 strict_delete_property: ["Cannot delete property '", "%0", "' of ", "%1"], 228 strict_delete_property: ["Cannot delete property '", "%0", "' of ", "%1"],
229 strict_function: ["Function declaration in a local scope disa llowed in strict mode"],
229 }; 230 };
230 } 231 }
231 var message_type = %MessageGetType(message); 232 var message_type = %MessageGetType(message);
232 var format = kMessages[message_type]; 233 var format = kMessages[message_type];
233 if (!format) return "<unknown message " + message_type + ">"; 234 if (!format) return "<unknown message " + message_type + ">";
234 return FormatString(format, message); 235 return FormatString(format, message);
235 } 236 }
236 237
237 238
238 function GetLineNumber(message) { 239 function GetLineNumber(message) {
(...skipping 819 matching lines...) Expand 10 before | Expand all | Expand 10 after
1058 else throw e; 1059 else throw e;
1059 } 1060 }
1060 } 1061 }
1061 1062
1062 %FunctionSetName(errorToString, 'toString'); 1063 %FunctionSetName(errorToString, 'toString');
1063 %SetProperty($Error.prototype, 'toString', errorToString, DONT_ENUM); 1064 %SetProperty($Error.prototype, 'toString', errorToString, DONT_ENUM);
1064 1065
1065 // Boilerplate for exceptions for stack overflows. Used from 1066 // Boilerplate for exceptions for stack overflows. Used from
1066 // Top::StackOverflow(). 1067 // Top::StackOverflow().
1067 const kStackOverflowBoilerplate = MakeRangeError('stack_overflow', []); 1068 const kStackOverflowBoilerplate = MakeRangeError('stack_overflow', []);
OLDNEW
« no previous file with comments | « no previous file | src/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698