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

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

Issue 2137203002: [intrinsics] Remove obsolete intrinsics. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Really nuke TO_NAME. 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/interpreter/interpreter-intrinsics.cc ('k') | src/js/v8natives.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 14 matching lines...) Expand all
25 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 25 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 27
28 # Dictionary that is passed as defines for js2c.py. 28 # Dictionary that is passed as defines for js2c.py.
29 # Used for defines that must be defined for all native JS files. 29 # Used for defines that must be defined for all native JS files.
30 30
31 define NONE = 0; 31 define NONE = 0;
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;
36 define NEW_TWO_BYTE_STRING = false;
37
38 # Constants used for getter and setter operations.
39 define GETTER = 0;
40 define SETTER = 1;
41 35
42 # 2^53 - 1 36 # 2^53 - 1
43 define kMaxSafeInteger = 9007199254740991; 37 define kMaxSafeInteger = 9007199254740991;
44 38
45 # 2^32 - 1 39 # 2^32 - 1
46 define kMaxUint32 = 4294967295; 40 define kMaxUint32 = 4294967295;
47 41
48 # Strict mode flags for passing to %SetProperty
49 define kSloppyMode = 0;
50 define kStrictMode = 1;
51
52 # Native cache ids. 42 # Native cache ids.
53 define STRING_TO_REGEXP_CACHE_ID = 0; 43 define STRING_TO_REGEXP_CACHE_ID = 0;
54 44
55 # Type query macros. 45 # Type query macros.
56 # 46 #
57 # Note: We have special support for typeof(foo) === 'bar' in the compiler. 47 # 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 48 # It will *not* generate a runtime typeof call for the most important
59 # values of 'bar'. 49 # values of 'bar'.
60 macro IS_ARRAY(arg) = (%_IsArray(arg)); 50 macro IS_ARRAY(arg) = (%_IsArray(arg));
61 macro IS_ARRAYBUFFER(arg) = (%_ClassOf(arg) === 'ArrayBuffer'); 51 macro IS_ARRAYBUFFER(arg) = (%_ClassOf(arg) === 'ArrayBuffer');
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 macro NUMBER_IS_FINITE(arg) = (%_IsSmi(%IS_VAR(arg)) || ((arg == arg) && (arg != 1/0) && (arg != -1/0))); 91 macro NUMBER_IS_FINITE(arg) = (%_IsSmi(%IS_VAR(arg)) || ((arg == arg) && (arg != 1/0) && (arg != -1/0)));
102 macro TO_BOOLEAN(arg) = (!!(arg)); 92 macro TO_BOOLEAN(arg) = (!!(arg));
103 macro TO_INTEGER(arg) = (%_ToInteger(arg)); 93 macro TO_INTEGER(arg) = (%_ToInteger(arg));
104 macro TO_INT32(arg) = ((arg) | 0); 94 macro TO_INT32(arg) = ((arg) | 0);
105 macro TO_UINT32(arg) = ((arg) >>> 0); 95 macro TO_UINT32(arg) = ((arg) >>> 0);
106 macro INVERT_NEG_ZERO(arg) = ((arg) + 0); 96 macro INVERT_NEG_ZERO(arg) = ((arg) + 0);
107 macro TO_LENGTH(arg) = (%_ToLength(arg)); 97 macro TO_LENGTH(arg) = (%_ToLength(arg));
108 macro TO_STRING(arg) = (%_ToString(arg)); 98 macro TO_STRING(arg) = (%_ToString(arg));
109 macro TO_NUMBER(arg) = (%_ToNumber(arg)); 99 macro TO_NUMBER(arg) = (%_ToNumber(arg));
110 macro TO_OBJECT(arg) = (%_ToObject(arg)); 100 macro TO_OBJECT(arg) = (%_ToObject(arg));
111 macro TO_PRIMITIVE(arg) = (%_ToPrimitive(arg));
112 macro TO_PRIMITIVE_NUMBER(arg) = (%_ToPrimitive_Number(arg));
113 macro TO_PRIMITIVE_STRING(arg) = (%_ToPrimitive_String(arg));
114 macro TO_NAME(arg) = (%_ToName(arg));
115 macro JSON_NUMBER_TO_STRING(arg) = ((%_IsSmi(%IS_VAR(arg)) || arg - arg == 0) ? %_NumberToString(arg) : "null");
116 macro HAS_OWN_PROPERTY(obj, key) = (%_Call(ObjectHasOwnProperty, obj, key)); 101 macro HAS_OWN_PROPERTY(obj, key) = (%_Call(ObjectHasOwnProperty, obj, key));
117 102
118 # Private names. 103 # Private names.
119 macro IS_PRIVATE(sym) = (%SymbolIsPrivate(sym)); 104 macro IS_PRIVATE(sym) = (%SymbolIsPrivate(sym));
120 macro HAS_PRIVATE(obj, key) = HAS_OWN_PROPERTY(obj, key); 105 macro HAS_PRIVATE(obj, key) = HAS_OWN_PROPERTY(obj, key);
121 macro HAS_DEFINED_PRIVATE(obj, sym) = (!IS_UNDEFINED(obj[sym])); 106 macro HAS_DEFINED_PRIVATE(obj, sym) = (!IS_UNDEFINED(obj[sym]));
122 macro GET_PRIVATE(obj, sym) = (obj[sym]); 107 macro GET_PRIVATE(obj, sym) = (obj[sym]);
123 macro SET_PRIVATE(obj, sym, val) = (obj[sym] = val); 108 macro SET_PRIVATE(obj, sym, val) = (obj[sym] = val);
124 109
125 # To avoid ES2015 Function name inference. 110 # To avoid ES2015 Function name inference.
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 macro ORDERED_HASH_MAP_KEY_AT(table, entry, numBuckets) = (FIXED_ARRAY_GET(table , ORDERED_HASH_MAP_ENTRY_TO_INDEX(entry, numBuckets))); 200 macro ORDERED_HASH_MAP_KEY_AT(table, entry, numBuckets) = (FIXED_ARRAY_GET(table , ORDERED_HASH_MAP_ENTRY_TO_INDEX(entry, numBuckets)));
216 macro ORDERED_HASH_MAP_VALUE_AT(table, entry, numBuckets) = (FIXED_ARRAY_GET(tab le, ORDERED_HASH_MAP_ENTRY_TO_INDEX(entry, numBuckets) + 1)); 201 macro ORDERED_HASH_MAP_VALUE_AT(table, entry, numBuckets) = (FIXED_ARRAY_GET(tab le, ORDERED_HASH_MAP_ENTRY_TO_INDEX(entry, numBuckets) + 1));
217 macro ORDERED_HASH_MAP_CHAIN_AT(table, entry, numBuckets) = (FIXED_ARRAY_GET(tab le, ORDERED_HASH_MAP_ENTRY_TO_INDEX(entry, numBuckets) + 2)); 202 macro ORDERED_HASH_MAP_CHAIN_AT(table, entry, numBuckets) = (FIXED_ARRAY_GET(tab le, ORDERED_HASH_MAP_ENTRY_TO_INDEX(entry, numBuckets) + 2));
218 203
219 # Must match OrderedHashTable::kNotFound. 204 # Must match OrderedHashTable::kNotFound.
220 define NOT_FOUND = -1; 205 define NOT_FOUND = -1;
221 206
222 # Check whether debug is active. 207 # Check whether debug is active.
223 define DEBUG_IS_ACTIVE = (%_DebugIsActive() != 0); 208 define DEBUG_IS_ACTIVE = (%_DebugIsActive() != 0);
224 209
225 # SharedFlag equivalents
226 define kNotShared = false;
227 define kShared = true;
228
229 # UseCounters from include/v8.h 210 # UseCounters from include/v8.h
230 define kUseAsm = 0; 211 define kUseAsm = 0;
231 define kBreakIterator = 1; 212 define kBreakIterator = 1;
232 define kLegacyConst = 2; 213 define kLegacyConst = 2;
233 define kMarkDequeOverflow = 3; 214 define kMarkDequeOverflow = 3;
234 define kStoreBufferOverflow = 4; 215 define kStoreBufferOverflow = 4;
235 define kSlotsBufferOverflow = 5; 216 define kSlotsBufferOverflow = 5;
236 define kForcedGC = 7; 217 define kForcedGC = 7;
237 define kSloppyMode = 8; 218 define kSloppyMode = 8;
238 define kStrictMode = 9; 219 define kStrictMode = 9;
(...skipping 11 matching lines...) Expand all
250 define kSloppyModeBlockScopedFunctionRedefinition = 22; 231 define kSloppyModeBlockScopedFunctionRedefinition = 22;
251 define kForInInitializer = 23; 232 define kForInInitializer = 23;
252 define kArrayProtectorDirtied = 24; 233 define kArrayProtectorDirtied = 24;
253 define kArraySpeciesModified = 25; 234 define kArraySpeciesModified = 25;
254 define kArrayPrototypeConstructorModified = 26; 235 define kArrayPrototypeConstructorModified = 26;
255 define kArrayInstanceProtoModified = 27; 236 define kArrayInstanceProtoModified = 27;
256 define kArrayInstanceConstructorModified = 28; 237 define kArrayInstanceConstructorModified = 28;
257 define kLegacyFunctionDeclaration = 29; 238 define kLegacyFunctionDeclaration = 29;
258 define kRegExpPrototypeSourceGetter = 30; 239 define kRegExpPrototypeSourceGetter = 30;
259 define kRegExpPrototypeOldFlagGetter = 31; 240 define kRegExpPrototypeOldFlagGetter = 31;
OLDNEW
« no previous file with comments | « src/interpreter/interpreter-intrinsics.cc ('k') | src/js/v8natives.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698