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

Side by Side Diff: src/messages.js

Issue 873823003: Move object literal checking into checker classes (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Use variables Created 5 years, 11 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
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // ------------------------------------------------------------------- 5 // -------------------------------------------------------------------
6 6
7 var kMessages = { 7 var kMessages = {
8 // Error 8 // Error
9 cyclic_proto: ["Cyclic __proto__ value"], 9 cyclic_proto: ["Cyclic __proto__ value"],
10 code_gen_from_strings: ["%0"], 10 code_gen_from_strings: ["%0"],
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 symbol_to_primitive: ["Cannot convert a Symbol wrapper object to a p rimitive value"], 177 symbol_to_primitive: ["Cannot convert a Symbol wrapper object to a p rimitive value"],
178 symbol_to_number: ["Cannot convert a Symbol value to a number"], 178 symbol_to_number: ["Cannot convert a Symbol value to a number"],
179 invalid_module_path: ["Module does not export '", "%0", "', or expor t is not itself a module"], 179 invalid_module_path: ["Module does not export '", "%0", "', or expor t is not itself a module"],
180 module_type_error: ["Module '", "%0", "' used improperly"], 180 module_type_error: ["Module '", "%0", "' used improperly"],
181 module_export_undefined: ["Export '", "%0", "' is not defined in module" ], 181 module_export_undefined: ["Export '", "%0", "' is not defined in module" ],
182 unexpected_super: ["'super' keyword unexpected here"], 182 unexpected_super: ["'super' keyword unexpected here"],
183 extends_value_not_a_function: ["Class extends value ", "%0", " is not a funct ion or null"], 183 extends_value_not_a_function: ["Class extends value ", "%0", " is not a funct ion or null"],
184 prototype_parent_not_an_object: ["Class extends value does not have valid prot otype property ", "%0"], 184 prototype_parent_not_an_object: ["Class extends value does not have valid prot otype property ", "%0"],
185 duplicate_constructor: ["A class may only have one constructor"], 185 duplicate_constructor: ["A class may only have one constructor"],
186 sloppy_lexical: ["Block-scoped declarations (let, const, functi on, class) not yet supported outside strict mode"], 186 sloppy_lexical: ["Block-scoped declarations (let, const, functi on, class) not yet supported outside strict mode"],
187 super_constructor_call: ["A 'super' constructor call may only appear as the first statement of a function, and its arguments may not access 'this'. Oth er forms are not yet supported."] 187 super_constructor_call: ["A 'super' constructor call may only appear as the first statement of a function, and its arguments may not access 'this'. Oth er forms are not yet supported."],
188 duplicate_proto: ["Duplicate __proto__ fields are not allowed in object literals"]
188 }; 189 };
189 190
190 191
191 function FormatString(format, args) { 192 function FormatString(format, args) {
192 var result = ""; 193 var result = "";
193 var arg_num = 0; 194 var arg_num = 0;
194 for (var i = 0; i < format.length; i++) { 195 for (var i = 0; i < format.length; i++) {
195 var str = format[i]; 196 var str = format[i];
196 if (str.length == 2 && %_StringCharCodeAt(str, 0) == 0x25) { 197 if (str.length == 2 && %_StringCharCodeAt(str, 0) == 0x25) {
197 // Two-char string starts with "%". 198 // Two-char string starts with "%".
(...skipping 1120 matching lines...) Expand 10 before | Expand all | Expand 10 after
1318 function SetUpStackOverflowBoilerplate() { 1319 function SetUpStackOverflowBoilerplate() {
1319 var boilerplate = MakeRangeError('stack_overflow', []); 1320 var boilerplate = MakeRangeError('stack_overflow', []);
1320 1321
1321 %DefineAccessorPropertyUnchecked( 1322 %DefineAccessorPropertyUnchecked(
1322 boilerplate, 'stack', StackTraceGetter, StackTraceSetter, DONT_ENUM); 1323 boilerplate, 'stack', StackTraceGetter, StackTraceSetter, DONT_ENUM);
1323 1324
1324 return boilerplate; 1325 return boilerplate;
1325 } 1326 }
1326 1327
1327 var kStackOverflowBoilerplate = SetUpStackOverflowBoilerplate(); 1328 var kStackOverflowBoilerplate = SetUpStackOverflowBoilerplate();
OLDNEW
« no previous file with comments | « src/ia32/full-codegen-ia32.cc ('k') | src/mips/full-codegen-mips.cc » ('j') | src/preparser.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698