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

Side by Side Diff: src/messages.js

Issue 280243002: Avoid name clashes of builtins and runtime functions. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 7 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/math.js ('k') | src/object-observe.js » ('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 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 939 matching lines...) Expand 10 before | Expand all | Expand 10 after
950 var line = ""; 950 var line = "";
951 var functionName = this.getFunctionName(); 951 var functionName = this.getFunctionName();
952 var addSuffix = true; 952 var addSuffix = true;
953 var isConstructor = this.isConstructor(); 953 var isConstructor = this.isConstructor();
954 var isMethodCall = !(this.isToplevel() || isConstructor); 954 var isMethodCall = !(this.isToplevel() || isConstructor);
955 if (isMethodCall) { 955 if (isMethodCall) {
956 var typeName = GetTypeName(GET_PRIVATE(this, CallSiteReceiverKey), true); 956 var typeName = GetTypeName(GET_PRIVATE(this, CallSiteReceiverKey), true);
957 var methodName = this.getMethodName(); 957 var methodName = this.getMethodName();
958 if (functionName) { 958 if (functionName) {
959 if (typeName && 959 if (typeName &&
960 %_CallFunction(functionName, typeName, StringIndexOf) != 0) { 960 %_CallFunction(functionName, typeName, StringIndexOfJS) != 0) {
961 line += typeName + "."; 961 line += typeName + ".";
962 } 962 }
963 line += functionName; 963 line += functionName;
964 if (methodName && 964 if (methodName &&
965 (%_CallFunction(functionName, "." + methodName, StringIndexOf) != 965 (%_CallFunction(functionName, "." + methodName, StringIndexOfJS) !=
966 functionName.length - methodName.length - 1)) { 966 functionName.length - methodName.length - 1)) {
967 line += " [as " + methodName + "]"; 967 line += " [as " + methodName + "]";
968 } 968 }
969 } else { 969 } else {
970 line += typeName + "." + (methodName || "<anonymous>"); 970 line += typeName + "." + (methodName || "<anonymous>");
971 } 971 }
972 } else if (isConstructor) { 972 } else if (isConstructor) {
973 line += "new " + (functionName || "<anonymous>"); 973 line += "new " + (functionName || "<anonymous>");
974 } else if (functionName) { 974 } else if (functionName) {
975 line += functionName; 975 line += functionName;
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after
1333 return result; 1333 return result;
1334 }; 1334 };
1335 1335
1336 %DefineOrRedefineAccessorProperty( 1336 %DefineOrRedefineAccessorProperty(
1337 boilerplate, 'stack', getter, setter, DONT_ENUM); 1337 boilerplate, 'stack', getter, setter, DONT_ENUM);
1338 1338
1339 return boilerplate; 1339 return boilerplate;
1340 } 1340 }
1341 1341
1342 var kStackOverflowBoilerplate = SetUpStackOverflowBoilerplate(); 1342 var kStackOverflowBoilerplate = SetUpStackOverflowBoilerplate();
OLDNEW
« no previous file with comments | « src/math.js ('k') | src/object-observe.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698