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

Side by Side Diff: src/js/macros.py

Issue 1543803002: Revert of [proxies] Better print for proxies in d8 (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years 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/js/json.js ('k') | src/js/messages.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 2006-2009 the V8 project authors. All rights reserved. 1 # Copyright 2006-2009 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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 define kStrictMode = 1; 81 define kStrictMode = 1;
82 82
83 # Native cache ids. 83 # Native cache ids.
84 define STRING_TO_REGEXP_CACHE_ID = 0; 84 define STRING_TO_REGEXP_CACHE_ID = 0;
85 85
86 # Type query macros. 86 # Type query macros.
87 # 87 #
88 # Note: We have special support for typeof(foo) === 'bar' in the compiler. 88 # Note: We have special support for typeof(foo) === 'bar' in the compiler.
89 # It will *not* generate a runtime typeof call for the most important 89 # It will *not* generate a runtime typeof call for the most important
90 # values of 'bar'. 90 # values of 'bar'.
91 macro IS_ARRAY(arg) = (%_IsArray(arg));
92 macro IS_ARRAYBUFFER(arg) = (%_ClassOf(arg) === 'ArrayBuffer');
93 macro IS_BOOLEAN(arg) = (typeof(arg) === 'boolean');
94 macro IS_BOOLEAN_WRAPPER(arg) = (%_ClassOf(arg) === 'Boolean');
95 macro IS_DATAVIEW(arg) = (%_ClassOf(arg) === 'DataView');
96 macro IS_DATE(arg) = (%_IsDate(arg));
97 macro IS_ERROR(arg) = (%_ClassOf(arg) === 'Error');
98 macro IS_FUNCTION(arg) = (%_IsFunction(arg));
99 macro IS_GENERATOR(arg) = (%_ClassOf(arg) === 'Generator');
100 macro IS_GLOBAL(arg) = (%_ClassOf(arg) === 'global');
101 macro IS_MAP(arg) = (%_ClassOf(arg) === 'Map');
102 macro IS_MAP_ITERATOR(arg) = (%_ClassOf(arg) === 'Map Iterator');
103 macro IS_NULL(arg) = (arg === null); 91 macro IS_NULL(arg) = (arg === null);
104 macro IS_NULL_OR_UNDEFINED(arg) = (arg == null); 92 macro IS_NULL_OR_UNDEFINED(arg) = (arg == null);
93 macro IS_UNDEFINED(arg) = (arg === (void 0));
105 macro IS_NUMBER(arg) = (typeof(arg) === 'number'); 94 macro IS_NUMBER(arg) = (typeof(arg) === 'number');
106 macro IS_NUMBER_WRAPPER(arg) = (%_ClassOf(arg) === 'Number'); 95 macro IS_STRING(arg) = (typeof(arg) === 'string');
96 macro IS_BOOLEAN(arg) = (typeof(arg) === 'boolean');
97 macro IS_SYMBOL(arg) = (typeof(arg) === 'symbol');
107 macro IS_OBJECT(arg) = (typeof(arg) === 'object'); 98 macro IS_OBJECT(arg) = (typeof(arg) === 'object');
108 macro IS_PROXY(arg) = (%_IsJSProxy(arg)); 99 macro IS_ARRAY(arg) = (%_IsArray(arg));
100 macro IS_DATE(arg) = (%_IsDate(arg));
101 macro IS_FUNCTION(arg) = (%_IsFunction(arg));
109 macro IS_REGEXP(arg) = (%_IsRegExp(arg)); 102 macro IS_REGEXP(arg) = (%_IsRegExp(arg));
110 macro IS_SCRIPT(arg) = (%_ClassOf(arg) === 'Script'); 103 macro IS_SIMD_VALUE(arg) = (%_IsSimdValue(arg));
111 macro IS_SET(arg) = (%_ClassOf(arg) === 'Set'); 104 macro IS_SET(arg) = (%_ClassOf(arg) === 'Set');
112 macro IS_SET_ITERATOR(arg) = (%_ClassOf(arg) === 'Set Iterator'); 105 macro IS_MAP(arg) = (%_ClassOf(arg) === 'Map');
113 macro IS_SHAREDARRAYBUFFER(arg) = (%_ClassOf(arg) === 'SharedArrayBuffer');
114 macro IS_SIMD_VALUE(arg) = (%_IsSimdValue(arg));
115 macro IS_STRING(arg) = (typeof(arg) === 'string');
116 macro IS_STRING_WRAPPER(arg) = (%_ClassOf(arg) === 'String');
117 macro IS_STRONG(arg) = (%IsStrong(arg));
118 macro IS_SYMBOL(arg) = (typeof(arg) === 'symbol');
119 macro IS_SYMBOL_WRAPPER(arg) = (%_ClassOf(arg) === 'Symbol');
120 macro IS_UNDEFINED(arg) = (arg === (void 0));
121 macro IS_WEAKMAP(arg) = (%_ClassOf(arg) === 'WeakMap'); 106 macro IS_WEAKMAP(arg) = (%_ClassOf(arg) === 'WeakMap');
122 macro IS_WEAKSET(arg) = (%_ClassOf(arg) === 'WeakSet'); 107 macro IS_WEAKSET(arg) = (%_ClassOf(arg) === 'WeakSet');
108 macro IS_NUMBER_WRAPPER(arg) = (%_ClassOf(arg) === 'Number');
109 macro IS_STRING_WRAPPER(arg) = (%_ClassOf(arg) === 'String');
110 macro IS_SYMBOL_WRAPPER(arg) = (%_ClassOf(arg) === 'Symbol');
111 macro IS_BOOLEAN_WRAPPER(arg) = (%_ClassOf(arg) === 'Boolean');
112 macro IS_ERROR(arg) = (%_ClassOf(arg) === 'Error');
113 macro IS_SCRIPT(arg) = (%_ClassOf(arg) === 'Script');
114 macro IS_GLOBAL(arg) = (%_ClassOf(arg) === 'global');
115 macro IS_ARRAYBUFFER(arg) = (%_ClassOf(arg) === 'ArrayBuffer');
116 macro IS_DATAVIEW(arg) = (%_ClassOf(arg) === 'DataView');
117 macro IS_SHAREDARRAYBUFFER(arg) = (%_ClassOf(arg) === 'SharedArrayBuffer');
118 macro IS_GENERATOR(arg) = (%_ClassOf(arg) === 'Generator');
119 macro IS_SET_ITERATOR(arg) = (%_ClassOf(arg) === 'Set Iterator');
120 macro IS_MAP_ITERATOR(arg) = (%_ClassOf(arg) === 'Map Iterator');
121 macro IS_STRONG(arg) = (%IsStrong(arg));
123 122
124 # Macro for ES queries of the type: "Type(O) is Object." 123 # Macro for ES queries of the type: "Type(O) is Object."
125 macro IS_RECEIVER(arg) = (%_IsJSReceiver(arg)); 124 macro IS_RECEIVER(arg) = (%_IsJSReceiver(arg));
126 125
127 # Macro for ES queries of the type: "IsCallable(O)" 126 # Macro for ES queries of the type: "IsCallable(O)"
128 macro IS_CALLABLE(arg) = (typeof(arg) === 'function'); 127 macro IS_CALLABLE(arg) = (typeof(arg) === 'function');
129 128
130 # Macro for ES6 CheckObjectCoercible 129 # Macro for ES6 CheckObjectCoercible
131 # Will throw a TypeError of the form "[functionName] called on null or undefined ". 130 # Will throw a TypeError of the form "[functionName] called on null or undefined ".
132 macro CHECK_OBJECT_COERCIBLE(arg, functionName) = if (IS_NULL(%IS_VAR(arg)) || I S_UNDEFINED(arg)) throw MakeTypeError(kCalledOnNullOrUndefined, functionName); 131 macro CHECK_OBJECT_COERCIBLE(arg, functionName) = if (IS_NULL(%IS_VAR(arg)) || I S_UNDEFINED(arg)) throw MakeTypeError(kCalledOnNullOrUndefined, functionName);
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 # Must match OrderedHashTable::kNotFound. 306 # Must match OrderedHashTable::kNotFound.
308 define NOT_FOUND = -1; 307 define NOT_FOUND = -1;
309 308
310 # Check whether debug is active. 309 # Check whether debug is active.
311 define DEBUG_IS_ACTIVE = (%_DebugIsActive() != 0); 310 define DEBUG_IS_ACTIVE = (%_DebugIsActive() != 0);
312 macro DEBUG_PREPARE_STEP_IN_IF_STEPPING(function) = if (%_DebugIsActive() != 0) %DebugPrepareStepInIfStepping(function); 311 macro DEBUG_PREPARE_STEP_IN_IF_STEPPING(function) = if (%_DebugIsActive() != 0) %DebugPrepareStepInIfStepping(function);
313 312
314 # SharedFlag equivalents 313 # SharedFlag equivalents
315 define kNotShared = false; 314 define kNotShared = false;
316 define kShared = true; 315 define kShared = true;
OLDNEW
« no previous file with comments | « src/js/json.js ('k') | src/js/messages.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698