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

Side by Side Diff: src/macros.py

Issue 7348008: Merge up to 8597 to experimental/gc from the bleeding edge. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/gc/
Patch Set: '' Created 9 years, 5 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 | « src/log.cc ('k') | src/mark-compact.h » ('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 20 matching lines...) Expand all
31 const NONE = 0; 31 const NONE = 0;
32 const READ_ONLY = 1; 32 const READ_ONLY = 1;
33 const DONT_ENUM = 2; 33 const DONT_ENUM = 2;
34 const DONT_DELETE = 4; 34 const DONT_DELETE = 4;
35 35
36 # Constants used for getter and setter operations. 36 # Constants used for getter and setter operations.
37 const GETTER = 0; 37 const GETTER = 0;
38 const SETTER = 1; 38 const SETTER = 1;
39 39
40 # These definitions must match the index of the properties in objects.h. 40 # These definitions must match the index of the properties in objects.h.
41 const kApiTagOffset = 0; 41 const kApiTagOffset = 0;
42 const kApiPropertyListOffset = 1; 42 const kApiPropertyListOffset = 1;
43 const kApiSerialNumberOffset = 2; 43 const kApiSerialNumberOffset = 2;
44 const kApiConstructorOffset = 2; 44 const kApiConstructorOffset = 2;
45 const kApiPrototypeTemplateOffset = 5; 45 const kApiPrototypeTemplateOffset = 5;
46 const kApiParentTemplateOffset = 6; 46 const kApiParentTemplateOffset = 6;
47 const kApiPrototypeAttributesOffset = 15;
47 48
48 const NO_HINT = 0; 49 const NO_HINT = 0;
49 const NUMBER_HINT = 1; 50 const NUMBER_HINT = 1;
50 const STRING_HINT = 2; 51 const STRING_HINT = 2;
51 52
52 const kFunctionTag = 0; 53 const kFunctionTag = 0;
53 const kNewObjectTag = 1; 54 const kNewObjectTag = 1;
54 55
55 # For date.js. 56 # For date.js.
56 const HoursPerDay = 24; 57 const HoursPerDay = 24;
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 # Inline macros. Use %IS_VAR to make sure arg is evaluated only once. 122 # Inline macros. Use %IS_VAR to make sure arg is evaluated only once.
122 macro NUMBER_IS_NAN(arg) = (!%_IsSmi(%IS_VAR(arg)) && !(arg == arg)); 123 macro NUMBER_IS_NAN(arg) = (!%_IsSmi(%IS_VAR(arg)) && !(arg == arg));
123 macro NUMBER_IS_FINITE(arg) = (%_IsSmi(%IS_VAR(arg)) || arg - arg == 0); 124 macro NUMBER_IS_FINITE(arg) = (%_IsSmi(%IS_VAR(arg)) || arg - arg == 0);
124 macro TO_INTEGER(arg) = (%_IsSmi(%IS_VAR(arg)) ? arg : %NumberToInteger(ToNumber (arg))); 125 macro TO_INTEGER(arg) = (%_IsSmi(%IS_VAR(arg)) ? arg : %NumberToInteger(ToNumber (arg)));
125 macro TO_INTEGER_MAP_MINUS_ZERO(arg) = (%_IsSmi(%IS_VAR(arg)) ? arg : %NumberToI ntegerMapMinusZero(ToNumber(arg))); 126 macro TO_INTEGER_MAP_MINUS_ZERO(arg) = (%_IsSmi(%IS_VAR(arg)) ? arg : %NumberToI ntegerMapMinusZero(ToNumber(arg)));
126 macro TO_INT32(arg) = (%_IsSmi(%IS_VAR(arg)) ? arg : (arg >> 0)); 127 macro TO_INT32(arg) = (%_IsSmi(%IS_VAR(arg)) ? arg : (arg >> 0));
127 macro TO_UINT32(arg) = (arg >>> 0); 128 macro TO_UINT32(arg) = (arg >>> 0);
128 macro TO_STRING_INLINE(arg) = (IS_STRING(%IS_VAR(arg)) ? arg : NonStringToString (arg)); 129 macro TO_STRING_INLINE(arg) = (IS_STRING(%IS_VAR(arg)) ? arg : NonStringToString (arg));
129 macro TO_NUMBER_INLINE(arg) = (IS_NUMBER(%IS_VAR(arg)) ? arg : NonNumberToNumber (arg)); 130 macro TO_NUMBER_INLINE(arg) = (IS_NUMBER(%IS_VAR(arg)) ? arg : NonNumberToNumber (arg));
130 macro TO_OBJECT_INLINE(arg) = (IS_SPEC_OBJECT(%IS_VAR(arg)) ? arg : ToObject(arg )); 131 macro TO_OBJECT_INLINE(arg) = (IS_SPEC_OBJECT(%IS_VAR(arg)) ? arg : ToObject(arg ));
132 macro JSON_NUMBER_TO_STRING(arg) = ((%_IsSmi(%IS_VAR(arg)) || arg - arg == 0) ? %_NumberToString(arg) : "null");
131 133
132 # Macros implemented in Python. 134 # Macros implemented in Python.
133 python macro CHAR_CODE(str) = ord(str[1]); 135 python macro CHAR_CODE(str) = ord(str[1]);
134 136
135 # Constants used on an array to implement the properties of the RegExp object. 137 # Constants used on an array to implement the properties of the RegExp object.
136 const REGEXP_NUMBER_OF_CAPTURES = 0; 138 const REGEXP_NUMBER_OF_CAPTURES = 0;
137 const REGEXP_FIRST_CAPTURE = 3; 139 const REGEXP_FIRST_CAPTURE = 3;
138 140
139 # We can't put macros in macros so we use constants here. 141 # We can't put macros in macros so we use constants here.
140 # REGEXP_NUMBER_OF_CAPTURES 142 # REGEXP_NUMBER_OF_CAPTURES
(...skipping 28 matching lines...) Expand all
169 171
170 # PropertyDescriptor return value indices - must match 172 # PropertyDescriptor return value indices - must match
171 # PropertyDescriptorIndices in runtime.cc. 173 # PropertyDescriptorIndices in runtime.cc.
172 const IS_ACCESSOR_INDEX = 0; 174 const IS_ACCESSOR_INDEX = 0;
173 const VALUE_INDEX = 1; 175 const VALUE_INDEX = 1;
174 const GETTER_INDEX = 2; 176 const GETTER_INDEX = 2;
175 const SETTER_INDEX = 3; 177 const SETTER_INDEX = 3;
176 const WRITABLE_INDEX = 4; 178 const WRITABLE_INDEX = 4;
177 const ENUMERABLE_INDEX = 5; 179 const ENUMERABLE_INDEX = 5;
178 const CONFIGURABLE_INDEX = 6; 180 const CONFIGURABLE_INDEX = 6;
OLDNEW
« no previous file with comments | « src/log.cc ('k') | src/mark-compact.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698