OLD | NEW |
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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 macro IS_NULL(arg) = (arg === null); | 94 macro IS_NULL(arg) = (arg === null); |
95 macro IS_NULL_OR_UNDEFINED(arg) = (arg == null); | 95 macro IS_NULL_OR_UNDEFINED(arg) = (arg == null); |
96 macro IS_UNDEFINED(arg) = (typeof(arg) === 'undefined'); | 96 macro IS_UNDEFINED(arg) = (typeof(arg) === 'undefined'); |
97 macro IS_NUMBER(arg) = (typeof(arg) === 'number'); | 97 macro IS_NUMBER(arg) = (typeof(arg) === 'number'); |
98 macro IS_STRING(arg) = (typeof(arg) === 'string'); | 98 macro IS_STRING(arg) = (typeof(arg) === 'string'); |
99 macro IS_BOOLEAN(arg) = (typeof(arg) === 'boolean'); | 99 macro IS_BOOLEAN(arg) = (typeof(arg) === 'boolean'); |
100 macro IS_OBJECT(arg) = (%_IsObject(arg)); | 100 macro IS_OBJECT(arg) = (%_IsObject(arg)); |
101 macro IS_ARRAY(arg) = (%_IsArray(arg)); | 101 macro IS_ARRAY(arg) = (%_IsArray(arg)); |
102 macro IS_FUNCTION(arg) = (%_IsFunction(arg)); | 102 macro IS_FUNCTION(arg) = (%_IsFunction(arg)); |
103 macro IS_REGEXP(arg) = (%_IsRegExp(arg)); | 103 macro IS_REGEXP(arg) = (%_IsRegExp(arg)); |
| 104 macro IS_SET(arg) = (%_ClassOf(arg) === 'Set'); |
| 105 macro IS_MAP(arg) = (%_ClassOf(arg) === 'Map'); |
| 106 macro IS_WEAKMAP(arg) = (%_ClassOf(arg) === 'WeakMap'); |
104 macro IS_DATE(arg) = (%_ClassOf(arg) === 'Date'); | 107 macro IS_DATE(arg) = (%_ClassOf(arg) === 'Date'); |
105 macro IS_NUMBER_WRAPPER(arg) = (%_ClassOf(arg) === 'Number'); | 108 macro IS_NUMBER_WRAPPER(arg) = (%_ClassOf(arg) === 'Number'); |
106 macro IS_STRING_WRAPPER(arg) = (%_ClassOf(arg) === 'String'); | 109 macro IS_STRING_WRAPPER(arg) = (%_ClassOf(arg) === 'String'); |
107 macro IS_BOOLEAN_WRAPPER(arg) = (%_ClassOf(arg) === 'Boolean'); | 110 macro IS_BOOLEAN_WRAPPER(arg) = (%_ClassOf(arg) === 'Boolean'); |
108 macro IS_ERROR(arg) = (%_ClassOf(arg) === 'Error'); | 111 macro IS_ERROR(arg) = (%_ClassOf(arg) === 'Error'); |
109 macro IS_SCRIPT(arg) = (%_ClassOf(arg) === 'Script'); | 112 macro IS_SCRIPT(arg) = (%_ClassOf(arg) === 'Script'); |
110 macro IS_ARGUMENTS(arg) = (%_ClassOf(arg) === 'Arguments'); | 113 macro IS_ARGUMENTS(arg) = (%_ClassOf(arg) === 'Arguments'); |
111 macro IS_GLOBAL(arg) = (%_ClassOf(arg) === 'global'); | 114 macro IS_GLOBAL(arg) = (%_ClassOf(arg) === 'global'); |
112 macro IS_UNDETECTABLE(arg) = (%_IsUndetectableObject(arg)); | 115 macro IS_UNDETECTABLE(arg) = (%_IsUndetectableObject(arg)); |
113 macro FLOOR(arg) = $floor(arg); | 116 macro FLOOR(arg) = $floor(arg); |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 const TYPE_EXTENSION = 1; | 200 const TYPE_EXTENSION = 1; |
198 const TYPE_NORMAL = 2; | 201 const TYPE_NORMAL = 2; |
199 | 202 |
200 # Matches Script::CompilationType from objects.h | 203 # Matches Script::CompilationType from objects.h |
201 const COMPILATION_TYPE_HOST = 0; | 204 const COMPILATION_TYPE_HOST = 0; |
202 const COMPILATION_TYPE_EVAL = 1; | 205 const COMPILATION_TYPE_EVAL = 1; |
203 const COMPILATION_TYPE_JSON = 2; | 206 const COMPILATION_TYPE_JSON = 2; |
204 | 207 |
205 # Matches Messages::kNoLineNumberInfo from v8.h | 208 # Matches Messages::kNoLineNumberInfo from v8.h |
206 const kNoLineNumberInfo = 0; | 209 const kNoLineNumberInfo = 0; |
OLD | NEW |