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

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

Issue 1531843003: Rename IS_SPEC_OBJECT macro to IS_RECEIVER. (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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 macro IS_SCRIPT(arg) = (%_ClassOf(arg) === 'Script'); 113 macro IS_SCRIPT(arg) = (%_ClassOf(arg) === 'Script');
114 macro IS_GLOBAL(arg) = (%_ClassOf(arg) === 'global'); 114 macro IS_GLOBAL(arg) = (%_ClassOf(arg) === 'global');
115 macro IS_ARRAYBUFFER(arg) = (%_ClassOf(arg) === 'ArrayBuffer'); 115 macro IS_ARRAYBUFFER(arg) = (%_ClassOf(arg) === 'ArrayBuffer');
116 macro IS_DATAVIEW(arg) = (%_ClassOf(arg) === 'DataView'); 116 macro IS_DATAVIEW(arg) = (%_ClassOf(arg) === 'DataView');
117 macro IS_SHAREDARRAYBUFFER(arg) = (%_ClassOf(arg) === 'SharedArrayBuffer'); 117 macro IS_SHAREDARRAYBUFFER(arg) = (%_ClassOf(arg) === 'SharedArrayBuffer');
118 macro IS_GENERATOR(arg) = (%_ClassOf(arg) === 'Generator'); 118 macro IS_GENERATOR(arg) = (%_ClassOf(arg) === 'Generator');
119 macro IS_SET_ITERATOR(arg) = (%_ClassOf(arg) === 'Set Iterator'); 119 macro IS_SET_ITERATOR(arg) = (%_ClassOf(arg) === 'Set Iterator');
120 macro IS_MAP_ITERATOR(arg) = (%_ClassOf(arg) === 'Map Iterator'); 120 macro IS_MAP_ITERATOR(arg) = (%_ClassOf(arg) === 'Map Iterator');
121 macro IS_STRONG(arg) = (%IsStrong(arg)); 121 macro IS_STRONG(arg) = (%IsStrong(arg));
122 122
123 # Macro for ECMAScript 5 queries of the type: 123 # Macro for ES queries of the type: "Type(O) is Object."
124 # "Type(O) is object." 124 macro IS_RECEIVER(arg) = (%_IsJSReceiver(arg));
125 # This is the same as being either a function or an object in V8 terminology
126 # (including proxies).
127 # In addition, an undetectable object is also included by this.
128 macro IS_SPEC_OBJECT(arg) = (%_IsJSReceiver(arg));
129 125
130 # Macro for ECMAScript 5 queries of the type: 126 # Macro for ES queries of the type: "IsCallable(O)"
131 # "IsCallable(O)"
132 macro IS_CALLABLE(arg) = (typeof(arg) === 'function'); 127 macro IS_CALLABLE(arg) = (typeof(arg) === 'function');
133 128
134 # Macro for ES6 CheckObjectCoercible 129 # Macro for ES6 CheckObjectCoercible
135 # 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 ".
136 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);
137 132
138 # Indices in bound function info retrieved by %BoundFunctionGetBindings(...). 133 # Indices in bound function info retrieved by %BoundFunctionGetBindings(...).
139 define kBoundFunctionIndex = 0; 134 define kBoundFunctionIndex = 0;
140 define kBoundThisIndex = 1; 135 define kBoundThisIndex = 1;
141 define kBoundArgumentsStartIndex = 2; 136 define kBoundArgumentsStartIndex = 2;
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 # Must match OrderedHashTable::kNotFound. 306 # Must match OrderedHashTable::kNotFound.
312 define NOT_FOUND = -1; 307 define NOT_FOUND = -1;
313 308
314 # Check whether debug is active. 309 # Check whether debug is active.
315 define DEBUG_IS_ACTIVE = (%_DebugIsActive() != 0); 310 define DEBUG_IS_ACTIVE = (%_DebugIsActive() != 0);
316 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);
317 312
318 # SharedFlag equivalents 313 # SharedFlag equivalents
319 define kNotShared = false; 314 define kNotShared = false;
320 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