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

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

Issue 2117273002: Revert of [intrinsic] Drop the %_ValueOf intrinsic. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 5 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/js/harmony-simd.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 21 matching lines...) Expand all
32 define READ_ONLY = 1; 32 define READ_ONLY = 1;
33 define DONT_ENUM = 2; 33 define DONT_ENUM = 2;
34 define DONT_DELETE = 4; 34 define DONT_DELETE = 4;
35 define NEW_ONE_BYTE_STRING = true; 35 define NEW_ONE_BYTE_STRING = true;
36 define NEW_TWO_BYTE_STRING = false; 36 define NEW_TWO_BYTE_STRING = false;
37 37
38 # Constants used for getter and setter operations. 38 # Constants used for getter and setter operations.
39 define GETTER = 0; 39 define GETTER = 0;
40 define SETTER = 1; 40 define SETTER = 1;
41 41
42 # Safe maximum number of arguments to push to stack, when multiplied by
43 # pointer size. Used by Function.prototype.apply(), Reflect.apply() and
44 # Reflect.construct().
45 define kSafeArgumentsLength = 0x800000;
46
42 # 2^53 - 1 47 # 2^53 - 1
43 define kMaxSafeInteger = 9007199254740991; 48 define kMaxSafeInteger = 9007199254740991;
44 49
45 # 2^32 - 1 50 # 2^32 - 1
46 define kMaxUint32 = 4294967295; 51 define kMaxUint32 = 4294967295;
47 52
48 # Strict mode flags for passing to %SetProperty 53 # Strict mode flags for passing to %SetProperty
49 define kSloppyMode = 0; 54 define kSloppyMode = 0;
50 define kStrictMode = 1; 55 define kStrictMode = 1;
51 56
52 # Native cache ids. 57 # Native cache ids.
53 define STRING_TO_REGEXP_CACHE_ID = 0; 58 define STRING_TO_REGEXP_CACHE_ID = 0;
54 59
55 # Type query macros. 60 # Type query macros.
56 # 61 #
57 # Note: We have special support for typeof(foo) === 'bar' in the compiler. 62 # Note: We have special support for typeof(foo) === 'bar' in the compiler.
58 # It will *not* generate a runtime typeof call for the most important 63 # It will *not* generate a runtime typeof call for the most important
59 # values of 'bar'. 64 # values of 'bar'.
60 macro IS_ARRAY(arg) = (%_IsArray(arg)); 65 macro IS_ARRAY(arg) = (%_IsArray(arg));
61 macro IS_ARRAYBUFFER(arg) = (%_ClassOf(arg) === 'ArrayBuffer'); 66 macro IS_ARRAYBUFFER(arg) = (%_ClassOf(arg) === 'ArrayBuffer');
62 macro IS_BOOLEAN(arg) = (typeof(arg) === 'boolean'); 67 macro IS_BOOLEAN(arg) = (typeof(arg) === 'boolean');
68 macro IS_BOOLEAN_WRAPPER(arg) = (%_ClassOf(arg) === 'Boolean');
63 macro IS_DATAVIEW(arg) = (%_ClassOf(arg) === 'DataView'); 69 macro IS_DATAVIEW(arg) = (%_ClassOf(arg) === 'DataView');
64 macro IS_DATE(arg) = (%IsDate(arg)); 70 macro IS_DATE(arg) = (%IsDate(arg));
65 macro IS_ERROR(arg) = (%_ClassOf(arg) === 'Error'); 71 macro IS_ERROR(arg) = (%_ClassOf(arg) === 'Error');
66 macro IS_FUNCTION(arg) = (%IsFunction(arg)); 72 macro IS_FUNCTION(arg) = (%IsFunction(arg));
67 macro IS_GENERATOR(arg) = (%_ClassOf(arg) === 'Generator'); 73 macro IS_GENERATOR(arg) = (%_ClassOf(arg) === 'Generator');
68 macro IS_GLOBAL(arg) = (%_ClassOf(arg) === 'global'); 74 macro IS_GLOBAL(arg) = (%_ClassOf(arg) === 'global');
69 macro IS_MAP(arg) = (%_ClassOf(arg) === 'Map'); 75 macro IS_MAP(arg) = (%_ClassOf(arg) === 'Map');
70 macro IS_MAP_ITERATOR(arg) = (%_ClassOf(arg) === 'Map Iterator'); 76 macro IS_MAP_ITERATOR(arg) = (%_ClassOf(arg) === 'Map Iterator');
71 macro IS_NULL(arg) = (arg === null); 77 macro IS_NULL(arg) = (arg === null);
72 macro IS_NULL_OR_UNDEFINED(arg) = (arg == null); 78 macro IS_NULL_OR_UNDEFINED(arg) = (arg == null);
73 macro IS_NUMBER(arg) = (typeof(arg) === 'number'); 79 macro IS_NUMBER(arg) = (typeof(arg) === 'number');
80 macro IS_NUMBER_WRAPPER(arg) = (%_ClassOf(arg) === 'Number');
74 macro IS_OBJECT(arg) = (typeof(arg) === 'object'); 81 macro IS_OBJECT(arg) = (typeof(arg) === 'object');
75 macro IS_PROXY(arg) = (%_IsJSProxy(arg)); 82 macro IS_PROXY(arg) = (%_IsJSProxy(arg));
76 macro IS_REGEXP(arg) = (%_IsRegExp(arg)); 83 macro IS_REGEXP(arg) = (%_IsRegExp(arg));
77 macro IS_SCRIPT(arg) = (%_ClassOf(arg) === 'Script'); 84 macro IS_SCRIPT(arg) = (%_ClassOf(arg) === 'Script');
78 macro IS_SET(arg) = (%_ClassOf(arg) === 'Set'); 85 macro IS_SET(arg) = (%_ClassOf(arg) === 'Set');
79 macro IS_SET_ITERATOR(arg) = (%_ClassOf(arg) === 'Set Iterator'); 86 macro IS_SET_ITERATOR(arg) = (%_ClassOf(arg) === 'Set Iterator');
80 macro IS_SHAREDARRAYBUFFER(arg) = (%_ClassOf(arg) === 'SharedArrayBuffer'); 87 macro IS_SHAREDARRAYBUFFER(arg) = (%_ClassOf(arg) === 'SharedArrayBuffer');
81 macro IS_SIMD_VALUE(arg) = (%IsSimdValue(arg)); 88 macro IS_SIMD_VALUE(arg) = (%IsSimdValue(arg));
82 macro IS_STRING(arg) = (typeof(arg) === 'string'); 89 macro IS_STRING(arg) = (typeof(arg) === 'string');
90 macro IS_STRING_WRAPPER(arg) = (%_ClassOf(arg) === 'String');
83 macro IS_SYMBOL(arg) = (typeof(arg) === 'symbol'); 91 macro IS_SYMBOL(arg) = (typeof(arg) === 'symbol');
92 macro IS_SYMBOL_WRAPPER(arg) = (%_ClassOf(arg) === 'Symbol');
84 macro IS_TYPEDARRAY(arg) = (%_IsTypedArray(arg)); 93 macro IS_TYPEDARRAY(arg) = (%_IsTypedArray(arg));
85 macro IS_UNDEFINED(arg) = (arg === (void 0)); 94 macro IS_UNDEFINED(arg) = (arg === (void 0));
86 macro IS_WEAKMAP(arg) = (%_ClassOf(arg) === 'WeakMap'); 95 macro IS_WEAKMAP(arg) = (%_ClassOf(arg) === 'WeakMap');
87 macro IS_WEAKSET(arg) = (%_ClassOf(arg) === 'WeakSet'); 96 macro IS_WEAKSET(arg) = (%_ClassOf(arg) === 'WeakSet');
88 97
89 # Macro for ES queries of the type: "Type(O) is Object." 98 # Macro for ES queries of the type: "Type(O) is Object."
90 macro IS_RECEIVER(arg) = (%_IsJSReceiver(arg)); 99 macro IS_RECEIVER(arg) = (%_IsJSReceiver(arg));
91 100
92 # Macro for ES queries of the type: "IsCallable(O)" 101 # Macro for ES queries of the type: "IsCallable(O)"
93 macro IS_CALLABLE(arg) = (typeof(arg) === 'function'); 102 macro IS_CALLABLE(arg) = (typeof(arg) === 'function');
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 define kSloppyModeBlockScopedFunctionRedefinition = 22; 259 define kSloppyModeBlockScopedFunctionRedefinition = 22;
251 define kForInInitializer = 23; 260 define kForInInitializer = 23;
252 define kArrayProtectorDirtied = 24; 261 define kArrayProtectorDirtied = 24;
253 define kArraySpeciesModified = 25; 262 define kArraySpeciesModified = 25;
254 define kArrayPrototypeConstructorModified = 26; 263 define kArrayPrototypeConstructorModified = 26;
255 define kArrayInstanceProtoModified = 27; 264 define kArrayInstanceProtoModified = 27;
256 define kArrayInstanceConstructorModified = 28; 265 define kArrayInstanceConstructorModified = 28;
257 define kLegacyFunctionDeclaration = 29; 266 define kLegacyFunctionDeclaration = 29;
258 define kRegExpPrototypeSourceGetter = 30; 267 define kRegExpPrototypeSourceGetter = 30;
259 define kRegExpPrototypeOldFlagGetter = 31; 268 define kRegExpPrototypeOldFlagGetter = 31;
OLDNEW
« no previous file with comments | « src/js/harmony-simd.js ('k') | src/js/messages.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698