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

Side by Side Diff: src/macros.py

Issue 990883002: Hide Math function implementations in a closure. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: remove printf and unnecessary test case change. Created 5 years, 9 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/json.js ('k') | src/math.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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 macro IS_ERROR(arg) = (%_ClassOf(arg) === 'Error'); 104 macro IS_ERROR(arg) = (%_ClassOf(arg) === 'Error');
105 macro IS_SCRIPT(arg) = (%_ClassOf(arg) === 'Script'); 105 macro IS_SCRIPT(arg) = (%_ClassOf(arg) === 'Script');
106 macro IS_ARGUMENTS(arg) = (%_ClassOf(arg) === 'Arguments'); 106 macro IS_ARGUMENTS(arg) = (%_ClassOf(arg) === 'Arguments');
107 macro IS_GLOBAL(arg) = (%_ClassOf(arg) === 'global'); 107 macro IS_GLOBAL(arg) = (%_ClassOf(arg) === 'global');
108 macro IS_ARRAYBUFFER(arg) = (%_ClassOf(arg) === 'ArrayBuffer'); 108 macro IS_ARRAYBUFFER(arg) = (%_ClassOf(arg) === 'ArrayBuffer');
109 macro IS_DATAVIEW(arg) = (%_ClassOf(arg) === 'DataView'); 109 macro IS_DATAVIEW(arg) = (%_ClassOf(arg) === 'DataView');
110 macro IS_GENERATOR(arg) = (%_ClassOf(arg) === 'Generator'); 110 macro IS_GENERATOR(arg) = (%_ClassOf(arg) === 'Generator');
111 macro IS_SET_ITERATOR(arg) = (%_ClassOf(arg) === 'Set Iterator'); 111 macro IS_SET_ITERATOR(arg) = (%_ClassOf(arg) === 'Set Iterator');
112 macro IS_MAP_ITERATOR(arg) = (%_ClassOf(arg) === 'Map Iterator'); 112 macro IS_MAP_ITERATOR(arg) = (%_ClassOf(arg) === 'Map Iterator');
113 macro IS_UNDETECTABLE(arg) = (%_IsUndetectableObject(arg)); 113 macro IS_UNDETECTABLE(arg) = (%_IsUndetectableObject(arg));
114 macro FLOOR(arg) = $floor(arg);
115 114
116 # Macro for ECMAScript 5 queries of the type: 115 # Macro for ECMAScript 5 queries of the type:
117 # "Type(O) is object." 116 # "Type(O) is object."
118 # This is the same as being either a function or an object in V8 terminology 117 # This is the same as being either a function or an object in V8 terminology
119 # (including proxies). 118 # (including proxies).
120 # In addition, an undetectable object is also included by this. 119 # In addition, an undetectable object is also included by this.
121 macro IS_SPEC_OBJECT(arg) = (%_IsSpecObject(arg)); 120 macro IS_SPEC_OBJECT(arg) = (%_IsSpecObject(arg));
122 121
123 # Macro for ECMAScript 5 queries of the type: 122 # Macro for ECMAScript 5 queries of the type:
124 # "IsCallable(O)" 123 # "IsCallable(O)"
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 268
270 # Use for keys, values and entries iterators. 269 # Use for keys, values and entries iterators.
271 const ITERATOR_KIND_KEYS = 1; 270 const ITERATOR_KIND_KEYS = 1;
272 const ITERATOR_KIND_VALUES = 2; 271 const ITERATOR_KIND_VALUES = 2;
273 const ITERATOR_KIND_ENTRIES = 3; 272 const ITERATOR_KIND_ENTRIES = 3;
274 273
275 # Check whether debug is active. 274 # Check whether debug is active.
276 const DEBUG_IS_ACTIVE = (%_DebugIsActive() != 0); 275 const DEBUG_IS_ACTIVE = (%_DebugIsActive() != 0);
277 macro DEBUG_IS_STEPPING(function) = (%_DebugIsActive() != 0 && %DebugCallbackSup portsStepping(function)); 276 macro DEBUG_IS_STEPPING(function) = (%_DebugIsActive() != 0 && %DebugCallbackSup portsStepping(function));
278 macro DEBUG_PREPARE_STEP_IN_IF_STEPPING(function) = if (DEBUG_IS_STEPPING(functi on)) %DebugPrepareStepInIfStepping(function); 277 macro DEBUG_PREPARE_STEP_IN_IF_STEPPING(function) = if (DEBUG_IS_STEPPING(functi on)) %DebugPrepareStepInIfStepping(function);
OLDNEW
« no previous file with comments | « src/json.js ('k') | src/math.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698