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

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

Issue 1575913002: [macros] Remove obsolete bound function macros. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 11 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 | « no previous file | no next file » | 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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 # Macro for ES queries of the type: "Type(O) is Object." 124 # Macro for ES queries of the type: "Type(O) is Object."
125 macro IS_RECEIVER(arg) = (%_IsJSReceiver(arg)); 125 macro IS_RECEIVER(arg) = (%_IsJSReceiver(arg));
126 126
127 # Macro for ES queries of the type: "IsCallable(O)" 127 # Macro for ES queries of the type: "IsCallable(O)"
128 macro IS_CALLABLE(arg) = (typeof(arg) === 'function'); 128 macro IS_CALLABLE(arg) = (typeof(arg) === 'function');
129 129
130 # Macro for ES6 CheckObjectCoercible 130 # Macro for ES6 CheckObjectCoercible
131 # Will throw a TypeError of the form "[functionName] called on null or undefined ". 131 # 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); 132 macro CHECK_OBJECT_COERCIBLE(arg, functionName) = if (IS_NULL(%IS_VAR(arg)) || I S_UNDEFINED(arg)) throw MakeTypeError(kCalledOnNullOrUndefined, functionName);
133 133
134 # Indices in bound function info retrieved by %BoundFunctionGetBindings(...).
135 define kBoundFunctionIndex = 0;
136 define kBoundThisIndex = 1;
137 define kBoundArgumentsStartIndex = 2;
138
139 # Inline macros. Use %IS_VAR to make sure arg is evaluated only once. 134 # Inline macros. Use %IS_VAR to make sure arg is evaluated only once.
140 macro NUMBER_IS_NAN(arg) = (!%_IsSmi(%IS_VAR(arg)) && !(arg == arg)); 135 macro NUMBER_IS_NAN(arg) = (!%_IsSmi(%IS_VAR(arg)) && !(arg == arg));
141 macro NUMBER_IS_FINITE(arg) = (%_IsSmi(%IS_VAR(arg)) || ((arg == arg) && (arg != 1/0) && (arg != -1/0))); 136 macro NUMBER_IS_FINITE(arg) = (%_IsSmi(%IS_VAR(arg)) || ((arg == arg) && (arg != 1/0) && (arg != -1/0)));
142 macro TO_BOOLEAN(arg) = (!!(arg)); 137 macro TO_BOOLEAN(arg) = (!!(arg));
143 macro TO_INTEGER(arg) = (%_ToInteger(arg)); 138 macro TO_INTEGER(arg) = (%_ToInteger(arg));
144 macro TO_INTEGER_MAP_MINUS_ZERO(arg) = (%_IsSmi(%IS_VAR(arg)) ? arg : %NumberToI ntegerMapMinusZero(arg)); 139 macro TO_INTEGER_MAP_MINUS_ZERO(arg) = (%_IsSmi(%IS_VAR(arg)) ? arg : %NumberToI ntegerMapMinusZero(arg));
145 macro TO_INT32(arg) = ((arg) | 0); 140 macro TO_INT32(arg) = ((arg) | 0);
146 macro TO_UINT32(arg) = ((arg) >>> 0); 141 macro TO_UINT32(arg) = ((arg) >>> 0);
147 macro TO_LENGTH(arg) = (%_ToLength(arg)); 142 macro TO_LENGTH(arg) = (%_ToLength(arg));
148 macro TO_LENGTH_OR_UINT32(arg) = (FLAG_harmony_tolength ? TO_LENGTH(arg) : TO_UI NT32(arg)); 143 macro TO_LENGTH_OR_UINT32(arg) = (FLAG_harmony_tolength ? TO_LENGTH(arg) : TO_UI NT32(arg));
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 define kStrongMode = 10; 324 define kStrongMode = 10;
330 define kRegExpPrototypeStickyGetter = 11; 325 define kRegExpPrototypeStickyGetter = 11;
331 define kRegExpPrototypeToString = 12; 326 define kRegExpPrototypeToString = 12;
332 define kRegExpPrototypeUnicodeGetter = 13; 327 define kRegExpPrototypeUnicodeGetter = 13;
333 define kIntlV8Parse = 14; 328 define kIntlV8Parse = 14;
334 define kIntlPattern = 15; 329 define kIntlPattern = 15;
335 define kIntlResolved = 16; 330 define kIntlResolved = 16;
336 define kPromiseChain = 17; 331 define kPromiseChain = 17;
337 define kPromiseAccept = 18; 332 define kPromiseAccept = 18;
338 define kPromiseDefer = 19; 333 define kPromiseDefer = 19;
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698