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

Side by Side Diff: src/messages.js

Issue 177683002: Mode clean-up pt 1: rename classic/non-strict mode to sloppy mode (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 1056 matching lines...) Expand 10 before | Expand all | Expand 10 after
1067 return "<error: " + e + ">"; 1067 return "<error: " + e + ">";
1068 } catch (ee) { 1068 } catch (ee) {
1069 return "<error>"; 1069 return "<error>";
1070 } 1070 }
1071 } 1071 }
1072 } 1072 }
1073 1073
1074 1074
1075 function GetStackFrames(raw_stack) { 1075 function GetStackFrames(raw_stack) {
1076 var frames = new InternalArray(); 1076 var frames = new InternalArray();
1077 var non_strict_frames = raw_stack[0]; 1077 var sloppy_frames = raw_stack[0];
1078 for (var i = 1; i < raw_stack.length; i += 4) { 1078 for (var i = 1; i < raw_stack.length; i += 4) {
1079 var recv = raw_stack[i]; 1079 var recv = raw_stack[i];
1080 var fun = raw_stack[i + 1]; 1080 var fun = raw_stack[i + 1];
1081 var code = raw_stack[i + 2]; 1081 var code = raw_stack[i + 2];
1082 var pc = raw_stack[i + 3]; 1082 var pc = raw_stack[i + 3];
1083 var pos = %FunctionGetPositionForOffset(code, pc); 1083 var pos = %FunctionGetPositionForOffset(code, pc);
1084 non_strict_frames--; 1084 sloppy_frames--;
1085 frames.push(new CallSite(recv, fun, pos, (non_strict_frames < 0))); 1085 frames.push(new CallSite(recv, fun, pos, (sloppy_frames < 0)));
1086 } 1086 }
1087 return frames; 1087 return frames;
1088 } 1088 }
1089 1089
1090 1090
1091 // Flag to prevent recursive call of Error.prepareStackTrace. 1091 // Flag to prevent recursive call of Error.prepareStackTrace.
1092 var formatting_custom_stack_trace = false; 1092 var formatting_custom_stack_trace = false;
1093 1093
1094 1094
1095 function FormatStackTrace(obj, error_string, frames) { 1095 function FormatStackTrace(obj, error_string, frames) {
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
1347 %GetAndClearOverflowedStackTrace(this); 1347 %GetAndClearOverflowedStackTrace(this);
1348 }; 1348 };
1349 1349
1350 %DefineOrRedefineAccessorProperty( 1350 %DefineOrRedefineAccessorProperty(
1351 boilerplate, 'stack', getter, setter, DONT_ENUM); 1351 boilerplate, 'stack', getter, setter, DONT_ENUM);
1352 1352
1353 return boilerplate; 1353 return boilerplate;
1354 } 1354 }
1355 1355
1356 var kStackOverflowBoilerplate = SetUpStackOverflowBoilerplate(); 1356 var kStackOverflowBoilerplate = SetUpStackOverflowBoilerplate();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698