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

Side by Side Diff: src/messages.js

Issue 1266013006: [stubs] Unify (and optimize) implementation of ToObject. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add missing support for %_ToObject in TurboFan and Crankshaft. Created 5 years, 4 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/macros.py ('k') | src/mips/builtins-mips.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 var $errorToString; 7 var $errorToString;
8 var $getStackTraceLine; 8 var $getStackTraceLine;
9 var $messageGetPositionInLine; 9 var $messageGetPositionInLine;
10 var $messageGetLineNumber; 10 var $messageGetLineNumber;
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 var GlobalRangeError; 60 var GlobalRangeError;
61 var GlobalURIError; 61 var GlobalURIError;
62 var GlobalSyntaxError; 62 var GlobalSyntaxError;
63 var GlobalReferenceError; 63 var GlobalReferenceError;
64 var GlobalEvalError; 64 var GlobalEvalError;
65 65
66 66
67 function NoSideEffectsObjectToString() { 67 function NoSideEffectsObjectToString() {
68 if (IS_UNDEFINED(this) && !IS_UNDETECTABLE(this)) return "[object Undefined]"; 68 if (IS_UNDEFINED(this) && !IS_UNDETECTABLE(this)) return "[object Undefined]";
69 if (IS_NULL(this)) return "[object Null]"; 69 if (IS_NULL(this)) return "[object Null]";
70 return "[object " + %_ClassOf(TO_OBJECT_INLINE(this)) + "]"; 70 return "[object " + %_ClassOf(TO_OBJECT(this)) + "]";
71 } 71 }
72 72
73 73
74 function NoSideEffectToString(obj) { 74 function NoSideEffectToString(obj) {
75 if (IS_STRING(obj)) return obj; 75 if (IS_STRING(obj)) return obj;
76 if (IS_NUMBER(obj)) return %_NumberToString(obj); 76 if (IS_NUMBER(obj)) return %_NumberToString(obj);
77 if (IS_BOOLEAN(obj)) return obj ? 'true' : 'false'; 77 if (IS_BOOLEAN(obj)) return obj ? 'true' : 'false';
78 if (IS_UNDEFINED(obj)) return 'undefined'; 78 if (IS_UNDEFINED(obj)) return 'undefined';
79 if (IS_NULL(obj)) return 'null'; 79 if (IS_NULL(obj)) return 'null';
80 if (IS_FUNCTION(obj)) { 80 if (IS_FUNCTION(obj)) {
(...skipping 1014 matching lines...) Expand 10 before | Expand all | Expand 10 after
1095 // Define accessors first, as this may fail and throw. 1095 // Define accessors first, as this may fail and throw.
1096 ObjectDefineProperty(obj, 'stack', { get: StackTraceGetter, 1096 ObjectDefineProperty(obj, 'stack', { get: StackTraceGetter,
1097 set: StackTraceSetter, 1097 set: StackTraceSetter,
1098 configurable: true }); 1098 configurable: true });
1099 %CollectStackTrace(obj, cons_opt ? cons_opt : captureStackTrace); 1099 %CollectStackTrace(obj, cons_opt ? cons_opt : captureStackTrace);
1100 }; 1100 };
1101 1101
1102 GlobalError.captureStackTrace = captureStackTrace; 1102 GlobalError.captureStackTrace = captureStackTrace;
1103 1103
1104 }); 1104 });
OLDNEW
« no previous file with comments | « src/macros.py ('k') | src/mips/builtins-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698