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

Side by Side Diff: src/macros.py

Issue 108083005: ES6: Add Object.getOwnPropertySymbols (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Comment and formatting based on code review Created 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | src/mirror-debugger.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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 macro TO_INTEGER_MAP_MINUS_ZERO(arg) = (%_IsSmi(%IS_VAR(arg)) ? arg : %NumberToI ntegerMapMinusZero(ToNumber(arg))); 152 macro TO_INTEGER_MAP_MINUS_ZERO(arg) = (%_IsSmi(%IS_VAR(arg)) ? arg : %NumberToI ntegerMapMinusZero(ToNumber(arg)));
153 macro TO_INT32(arg) = (%_IsSmi(%IS_VAR(arg)) ? arg : (arg >> 0)); 153 macro TO_INT32(arg) = (%_IsSmi(%IS_VAR(arg)) ? arg : (arg >> 0));
154 macro TO_UINT32(arg) = (arg >>> 0); 154 macro TO_UINT32(arg) = (arg >>> 0);
155 macro TO_STRING_INLINE(arg) = (IS_STRING(%IS_VAR(arg)) ? arg : NonStringToString (arg)); 155 macro TO_STRING_INLINE(arg) = (IS_STRING(%IS_VAR(arg)) ? arg : NonStringToString (arg));
156 macro TO_NUMBER_INLINE(arg) = (IS_NUMBER(%IS_VAR(arg)) ? arg : NonNumberToNumber (arg)); 156 macro TO_NUMBER_INLINE(arg) = (IS_NUMBER(%IS_VAR(arg)) ? arg : NonNumberToNumber (arg));
157 macro TO_OBJECT_INLINE(arg) = (IS_SPEC_OBJECT(%IS_VAR(arg)) ? arg : ToObject(arg )); 157 macro TO_OBJECT_INLINE(arg) = (IS_SPEC_OBJECT(%IS_VAR(arg)) ? arg : ToObject(arg ));
158 macro JSON_NUMBER_TO_STRING(arg) = ((%_IsSmi(%IS_VAR(arg)) || arg - arg == 0) ? %_NumberToString(arg) : "null"); 158 macro JSON_NUMBER_TO_STRING(arg) = ((%_IsSmi(%IS_VAR(arg)) || arg - arg == 0) ? %_NumberToString(arg) : "null");
159 159
160 # Private names. 160 # Private names.
161 macro NEW_PRIVATE(name) = (%CreatePrivateSymbol(name)); 161 macro NEW_PRIVATE(name) = (%CreatePrivateSymbol(name));
162 macro IS_PRIVATE(sym) = (%SymbolIsPrivate(sym));
162 macro HAS_PRIVATE(obj, sym) = (sym in obj); 163 macro HAS_PRIVATE(obj, sym) = (sym in obj);
163 macro GET_PRIVATE(obj, sym) = (obj[sym]); 164 macro GET_PRIVATE(obj, sym) = (obj[sym]);
164 macro SET_PRIVATE(obj, sym, val) = (obj[sym] = val); 165 macro SET_PRIVATE(obj, sym, val) = (obj[sym] = val);
165 macro DELETE_PRIVATE(obj, sym) = (delete obj[sym]); 166 macro DELETE_PRIVATE(obj, sym) = (delete obj[sym]);
166 167
167 # Constants. The compiler constant folds them. 168 # Constants. The compiler constant folds them.
168 const NAN = $NaN; 169 const NAN = $NaN;
169 const INFINITY = (1/0); 170 const INFINITY = (1/0);
170 const UNDEFINED = (void 0); 171 const UNDEFINED = (void 0);
171 172
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 const TYPE_EXTENSION = 1; 254 const TYPE_EXTENSION = 1;
254 const TYPE_NORMAL = 2; 255 const TYPE_NORMAL = 2;
255 256
256 # Matches Script::CompilationType from objects.h 257 # Matches Script::CompilationType from objects.h
257 const COMPILATION_TYPE_HOST = 0; 258 const COMPILATION_TYPE_HOST = 0;
258 const COMPILATION_TYPE_EVAL = 1; 259 const COMPILATION_TYPE_EVAL = 1;
259 const COMPILATION_TYPE_JSON = 2; 260 const COMPILATION_TYPE_JSON = 2;
260 261
261 # Matches Messages::kNoLineNumberInfo from v8.h 262 # Matches Messages::kNoLineNumberInfo from v8.h
262 const kNoLineNumberInfo = 0; 263 const kNoLineNumberInfo = 0;
264
265 # Matches PropertyAttributes from property-details.h
266 const PROPERTY_ATTRIBUTES_NONE = 0;
267 const PROPERTY_ATTRIBUTES_STRING = 8;
268 const PROPERTY_ATTRIBUTES_SYMBOLIC = 16;
269 const PROPERTY_ATTRIBUTES_PRIVATE_SYMBOL = 32;
OLDNEW
« no previous file with comments | « no previous file | src/mirror-debugger.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698