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

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

Issue 1742283002: Move hasOwnProperty to builtins.cc (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 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
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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 macro TO_UINT32(arg) = ((arg) >>> 0); 115 macro TO_UINT32(arg) = ((arg) >>> 0);
116 macro TO_LENGTH(arg) = (%_ToLength(arg)); 116 macro TO_LENGTH(arg) = (%_ToLength(arg));
117 macro TO_STRING(arg) = (%_ToString(arg)); 117 macro TO_STRING(arg) = (%_ToString(arg));
118 macro TO_NUMBER(arg) = (%_ToNumber(arg)); 118 macro TO_NUMBER(arg) = (%_ToNumber(arg));
119 macro TO_OBJECT(arg) = (%_ToObject(arg)); 119 macro TO_OBJECT(arg) = (%_ToObject(arg));
120 macro TO_PRIMITIVE(arg) = (%_ToPrimitive(arg)); 120 macro TO_PRIMITIVE(arg) = (%_ToPrimitive(arg));
121 macro TO_PRIMITIVE_NUMBER(arg) = (%_ToPrimitive_Number(arg)); 121 macro TO_PRIMITIVE_NUMBER(arg) = (%_ToPrimitive_Number(arg));
122 macro TO_PRIMITIVE_STRING(arg) = (%_ToPrimitive_String(arg)); 122 macro TO_PRIMITIVE_STRING(arg) = (%_ToPrimitive_String(arg));
123 macro TO_NAME(arg) = (%_ToName(arg)); 123 macro TO_NAME(arg) = (%_ToName(arg));
124 macro JSON_NUMBER_TO_STRING(arg) = ((%_IsSmi(%IS_VAR(arg)) || arg - arg == 0) ? %_NumberToString(arg) : "null"); 124 macro JSON_NUMBER_TO_STRING(arg) = ((%_IsSmi(%IS_VAR(arg)) || arg - arg == 0) ? %_NumberToString(arg) : "null");
125 macro HAS_OWN_PROPERTY(arg, index) = (%_Call(ObjectHasOwnProperty, arg, index)); 125 macro HAS_OWN_PROPERTY(obj, key) = (%_Call(ObjectHasOwnProperty, obj, key));
126 macro HAS_INDEX(array, index, is_array) = ((is_array && %_HasFastPackedElements( %IS_VAR(array)) && (index < array.length)) || (index in array)); 126 macro HAS_INDEX(array, index, is_array) = ((is_array && %_HasFastPackedElements( %IS_VAR(array)) && (index < array.length)) || (index in array));
127 127
128 # Private names. 128 # Private names.
129 macro IS_PRIVATE(sym) = (%SymbolIsPrivate(sym)); 129 macro IS_PRIVATE(sym) = (%SymbolIsPrivate(sym));
130 macro HAS_PRIVATE(obj, sym) = (%HasOwnProperty(obj, sym)); 130 macro HAS_PRIVATE(obj, key) = HAS_OWN_PROPERTY(obj, key);
131 macro HAS_DEFINED_PRIVATE(obj, sym) = (!IS_UNDEFINED(obj[sym])); 131 macro HAS_DEFINED_PRIVATE(obj, sym) = (!IS_UNDEFINED(obj[sym]));
132 macro GET_PRIVATE(obj, sym) = (obj[sym]); 132 macro GET_PRIVATE(obj, sym) = (obj[sym]);
133 macro SET_PRIVATE(obj, sym, val) = (obj[sym] = val); 133 macro SET_PRIVATE(obj, sym, val) = (obj[sym] = val);
134 134
135 # Constants. The compiler constant folds them. 135 # Constants. The compiler constant folds them.
136 define INFINITY = (1/0); 136 define INFINITY = (1/0);
137 define UNDEFINED = (void 0); 137 define UNDEFINED = (void 0);
138 138
139 # Macros implemented in Python. 139 # Macros implemented in Python.
140 python macro CHAR_CODE(str) = ord(str[1]); 140 python macro CHAR_CODE(str) = ord(str[1]);
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 define kStrongMode = 10; 258 define kStrongMode = 10;
259 define kRegExpPrototypeStickyGetter = 11; 259 define kRegExpPrototypeStickyGetter = 11;
260 define kRegExpPrototypeToString = 12; 260 define kRegExpPrototypeToString = 12;
261 define kRegExpPrototypeUnicodeGetter = 13; 261 define kRegExpPrototypeUnicodeGetter = 13;
262 define kIntlV8Parse = 14; 262 define kIntlV8Parse = 14;
263 define kIntlPattern = 15; 263 define kIntlPattern = 15;
264 define kIntlResolved = 16; 264 define kIntlResolved = 16;
265 define kPromiseChain = 17; 265 define kPromiseChain = 17;
266 define kPromiseAccept = 18; 266 define kPromiseAccept = 18;
267 define kPromiseDefer = 19; 267 define kPromiseDefer = 19;
OLDNEW
« src/bootstrapper.cc ('K') | « src/js/i18n.js ('k') | src/js/messages.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698