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

Side by Side Diff: src/js/messages.js

Issue 1970503004: [wasm] Differentiate unnamed and empty names (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@add-utf8-check
Patch Set: Yang's last comments Created 4 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
« no previous file with comments | « src/isolate.cc ('k') | src/messages.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 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 (function(global, utils) { 7 (function(global, utils) {
8 8
9 %CheckIsBootstrapping(); 9 %CheckIsBootstrapping();
10 10
(...skipping 612 matching lines...) Expand 10 before | Expand all | Expand 10 after
623 } 623 }
624 624
625 function CallSiteGetScriptNameOrSourceURL() { 625 function CallSiteGetScriptNameOrSourceURL() {
626 CheckCallSite(this, "getScriptNameOrSourceURL"); 626 CheckCallSite(this, "getScriptNameOrSourceURL");
627 return %CallSiteGetScriptNameOrSourceUrlRT(this); 627 return %CallSiteGetScriptNameOrSourceUrlRT(this);
628 } 628 }
629 629
630 function CallSiteGetFunctionName() { 630 function CallSiteGetFunctionName() {
631 // See if the function knows its own name 631 // See if the function knows its own name
632 CheckCallSite(this, "getFunctionName"); 632 CheckCallSite(this, "getFunctionName");
633 if (HAS_PRIVATE(this, callSiteWasmObjectSymbol)) {
634 var wasm = GET_PRIVATE(this, callSiteWasmObjectSymbol);
635 var func_index = GET_PRIVATE(this, callSiteWasmFunctionIndexSymbol);
636 if (IS_UNDEFINED(wasm)) return "<WASM>";
637 return %WasmGetFunctionName(wasm, func_index);
638 }
639 return %CallSiteGetFunctionNameRT(this); 633 return %CallSiteGetFunctionNameRT(this);
640 } 634 }
641 635
642 function CallSiteGetMethodName() { 636 function CallSiteGetMethodName() {
643 // See if we can find a unique property on the receiver that holds 637 // See if we can find a unique property on the receiver that holds
644 // this function. 638 // this function.
645 CheckCallSite(this, "getMethodName"); 639 CheckCallSite(this, "getMethodName");
646 return %CallSiteGetMethodNameRT(this); 640 return %CallSiteGetMethodNameRT(this);
647 } 641 }
648 642
(...skipping 23 matching lines...) Expand all
672 function CallSiteIsConstructor() { 666 function CallSiteIsConstructor() {
673 CheckCallSite(this, "isConstructor"); 667 CheckCallSite(this, "isConstructor");
674 return %CallSiteIsConstructorRT(this); 668 return %CallSiteIsConstructorRT(this);
675 } 669 }
676 670
677 function CallSiteToString() { 671 function CallSiteToString() {
678 if (HAS_PRIVATE(this, callSiteWasmObjectSymbol)) { 672 if (HAS_PRIVATE(this, callSiteWasmObjectSymbol)) {
679 var funName = this.getFunctionName(); 673 var funName = this.getFunctionName();
680 var funcIndex = GET_PRIVATE(this, callSiteWasmFunctionIndexSymbol); 674 var funcIndex = GET_PRIVATE(this, callSiteWasmFunctionIndexSymbol);
681 var pos = this.getPosition(); 675 var pos = this.getPosition();
682 return funName + " (<WASM>:" + funcIndex + ":" + pos + ")"; 676 if (IS_NULL(funName)) funName = "<WASM UNNAMED>";
677 return funName + " (<WASM>[" + funcIndex + "]+" + pos + ")";
683 } 678 }
684 679
685 var fileName; 680 var fileName;
686 var fileLocation = ""; 681 var fileLocation = "";
687 if (this.isNative()) { 682 if (this.isNative()) {
688 fileLocation = "native"; 683 fileLocation = "native";
689 } else { 684 } else {
690 fileName = this.getScriptNameOrSourceURL(); 685 fileName = this.getScriptNameOrSourceURL();
691 if (!fileName && this.isEval()) { 686 if (!fileName && this.isEval()) {
692 fileLocation = this.getEvalOrigin(); 687 fileLocation = this.getEvalOrigin();
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after
1045 utils.Export(function(to) { 1040 utils.Export(function(to) {
1046 to.ErrorToString = ErrorToString; 1041 to.ErrorToString = ErrorToString;
1047 to.MakeError = MakeError; 1042 to.MakeError = MakeError;
1048 to.MakeRangeError = MakeRangeError; 1043 to.MakeRangeError = MakeRangeError;
1049 to.MakeSyntaxError = MakeSyntaxError; 1044 to.MakeSyntaxError = MakeSyntaxError;
1050 to.MakeTypeError = MakeTypeError; 1045 to.MakeTypeError = MakeTypeError;
1051 to.MakeURIError = MakeURIError; 1046 to.MakeURIError = MakeURIError;
1052 }); 1047 });
1053 1048
1054 }); 1049 });
OLDNEW
« no previous file with comments | « src/isolate.cc ('k') | src/messages.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698