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

Unified Diff: src/js/macros.py

Issue 1530293004: [proxies] Better print for proxies in d8 (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: adding macro and fixing printing for infinite __proto__ proxies 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/d8.js ('k') | src/js/proxy.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/js/macros.py
diff --git a/src/js/macros.py b/src/js/macros.py
index 9e1b75fe708f5297ff4d2d128a8d2c2d4279586b..4bbccc19464ba62e169d65f5ee87003be9aca821 100644
--- a/src/js/macros.py
+++ b/src/js/macros.py
@@ -88,37 +88,38 @@ define STRING_TO_REGEXP_CACHE_ID = 0;
# Note: We have special support for typeof(foo) === 'bar' in the compiler.
# It will *not* generate a runtime typeof call for the most important
# values of 'bar'.
-macro IS_NULL(arg) = (arg === null);
-macro IS_NULL_OR_UNDEFINED(arg) = (arg == null);
-macro IS_UNDEFINED(arg) = (arg === (void 0));
-macro IS_NUMBER(arg) = (typeof(arg) === 'number');
-macro IS_STRING(arg) = (typeof(arg) === 'string');
-macro IS_BOOLEAN(arg) = (typeof(arg) === 'boolean');
-macro IS_SYMBOL(arg) = (typeof(arg) === 'symbol');
-macro IS_OBJECT(arg) = (typeof(arg) === 'object');
macro IS_ARRAY(arg) = (%_IsArray(arg));
+macro IS_ARRAYBUFFER(arg) = (%_ClassOf(arg) === 'ArrayBuffer');
+macro IS_BOOLEAN(arg) = (typeof(arg) === 'boolean');
+macro IS_BOOLEAN_WRAPPER(arg) = (%_ClassOf(arg) === 'Boolean');
+macro IS_DATAVIEW(arg) = (%_ClassOf(arg) === 'DataView');
macro IS_DATE(arg) = (%_IsDate(arg));
+macro IS_ERROR(arg) = (%_ClassOf(arg) === 'Error');
macro IS_FUNCTION(arg) = (%_IsFunction(arg));
-macro IS_REGEXP(arg) = (%_IsRegExp(arg));
-macro IS_SIMD_VALUE(arg) = (%_IsSimdValue(arg));
-macro IS_SET(arg) = (%_ClassOf(arg) === 'Set');
+macro IS_GENERATOR(arg) = (%_ClassOf(arg) === 'Generator');
+macro IS_GLOBAL(arg) = (%_ClassOf(arg) === 'global');
macro IS_MAP(arg) = (%_ClassOf(arg) === 'Map');
-macro IS_WEAKMAP(arg) = (%_ClassOf(arg) === 'WeakMap');
-macro IS_WEAKSET(arg) = (%_ClassOf(arg) === 'WeakSet');
+macro IS_MAP_ITERATOR(arg) = (%_ClassOf(arg) === 'Map Iterator');
+macro IS_NULL(arg) = (arg === null);
+macro IS_NULL_OR_UNDEFINED(arg) = (arg == null);
+macro IS_NUMBER(arg) = (typeof(arg) === 'number');
macro IS_NUMBER_WRAPPER(arg) = (%_ClassOf(arg) === 'Number');
-macro IS_STRING_WRAPPER(arg) = (%_ClassOf(arg) === 'String');
-macro IS_SYMBOL_WRAPPER(arg) = (%_ClassOf(arg) === 'Symbol');
-macro IS_BOOLEAN_WRAPPER(arg) = (%_ClassOf(arg) === 'Boolean');
-macro IS_ERROR(arg) = (%_ClassOf(arg) === 'Error');
+macro IS_OBJECT(arg) = (typeof(arg) === 'object');
+macro IS_PROXY(arg) = (%IsJSProxy(arg));
+macro IS_REGEXP(arg) = (%_IsRegExp(arg));
macro IS_SCRIPT(arg) = (%_ClassOf(arg) === 'Script');
-macro IS_GLOBAL(arg) = (%_ClassOf(arg) === 'global');
-macro IS_ARRAYBUFFER(arg) = (%_ClassOf(arg) === 'ArrayBuffer');
-macro IS_DATAVIEW(arg) = (%_ClassOf(arg) === 'DataView');
-macro IS_SHAREDARRAYBUFFER(arg) = (%_ClassOf(arg) === 'SharedArrayBuffer');
-macro IS_GENERATOR(arg) = (%_ClassOf(arg) === 'Generator');
+macro IS_SET(arg) = (%_ClassOf(arg) === 'Set');
macro IS_SET_ITERATOR(arg) = (%_ClassOf(arg) === 'Set Iterator');
-macro IS_MAP_ITERATOR(arg) = (%_ClassOf(arg) === 'Map Iterator');
+macro IS_SHAREDARRAYBUFFER(arg) = (%_ClassOf(arg) === 'SharedArrayBuffer');
+macro IS_SIMD_VALUE(arg) = (%_IsSimdValue(arg));
+macro IS_STRING(arg) = (typeof(arg) === 'string');
+macro IS_STRING_WRAPPER(arg) = (%_ClassOf(arg) === 'String');
macro IS_STRONG(arg) = (%IsStrong(arg));
+macro IS_SYMBOL(arg) = (typeof(arg) === 'symbol');
+macro IS_SYMBOL_WRAPPER(arg) = (%_ClassOf(arg) === 'Symbol');
+macro IS_UNDEFINED(arg) = (arg === (void 0));
+macro IS_WEAKMAP(arg) = (%_ClassOf(arg) === 'WeakMap');
+macro IS_WEAKSET(arg) = (%_ClassOf(arg) === 'WeakSet');
Camillo Bruni 2015/12/17 10:43:07 I sorted the macros and add IS_PROXY
# Macro for ECMAScript 5 queries of the type:
# "Type(O) is object."
« no previous file with comments | « src/d8.js ('k') | src/js/proxy.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698