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

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

Issue 1428203003: Use in-object fields instead of private symbols for regexp slots. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase Created 5 years, 1 month 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/crankshaft/hydrogen-instructions.h ('k') | src/js/regexp.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 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 define UNDEFINED = (void 0); 175 define UNDEFINED = (void 0);
176 176
177 # Macros implemented in Python. 177 # Macros implemented in Python.
178 python macro CHAR_CODE(str) = ord(str[1]); 178 python macro CHAR_CODE(str) = ord(str[1]);
179 179
180 # Constants used on an array to implement the properties of the RegExp object. 180 # Constants used on an array to implement the properties of the RegExp object.
181 define REGEXP_NUMBER_OF_CAPTURES = 0; 181 define REGEXP_NUMBER_OF_CAPTURES = 0;
182 define REGEXP_FIRST_CAPTURE = 3; 182 define REGEXP_FIRST_CAPTURE = 3;
183 183
184 # Macros for internal slot access. 184 # Macros for internal slot access.
185 macro REGEXP_GLOBAL(regexp) = (regexp[regExpFlagsSymbol] & 1); 185 macro REGEXP_GLOBAL(regexp) = (%_RegExpFlags(regexp) & 1);
186 macro REGEXP_IGNORE_CASE(regexp) = (regexp[regExpFlagsSymbol] & 2); 186 macro REGEXP_IGNORE_CASE(regexp) = (%_RegExpFlags(regexp) & 2);
187 macro REGEXP_MULTILINE(regexp) = (regexp[regExpFlagsSymbol] & 4); 187 macro REGEXP_MULTILINE(regexp) = (%_RegExpFlags(regexp) & 4);
188 macro REGEXP_STICKY(regexp) = (regexp[regExpFlagsSymbol] & 8); 188 macro REGEXP_STICKY(regexp) = (%_RegExpFlags(regexp) & 8);
189 macro REGEXP_UNICODE(regexp) = (regexp[regExpFlagsSymbol] & 16); 189 macro REGEXP_UNICODE(regexp) = (%_RegExpFlags(regexp) & 16);
190 macro REGEXP_SOURCE(regexp) = (regexp[regExpSourceSymbol]); 190 macro REGEXP_SOURCE(regexp) = (%_RegExpSource(regexp));
191 191
192 # We can't put macros in macros so we use constants here. 192 # We can't put macros in macros so we use constants here.
193 # REGEXP_NUMBER_OF_CAPTURES 193 # REGEXP_NUMBER_OF_CAPTURES
194 macro NUMBER_OF_CAPTURES(array) = ((array)[0]); 194 macro NUMBER_OF_CAPTURES(array) = ((array)[0]);
195 195
196 # Limit according to ECMA 262 15.9.1.1 196 # Limit according to ECMA 262 15.9.1.1
197 define MAX_TIME_MS = 8640000000000000; 197 define MAX_TIME_MS = 8640000000000000;
198 # Limit which is MAX_TIME_MS + msPerMonth. 198 # Limit which is MAX_TIME_MS + msPerMonth.
199 define MAX_TIME_BEFORE_UTC = 8640002592000000; 199 define MAX_TIME_BEFORE_UTC = 8640002592000000;
200 200
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 define NOT_FOUND = -1; 313 define NOT_FOUND = -1;
314 314
315 # Check whether debug is active. 315 # Check whether debug is active.
316 define DEBUG_IS_ACTIVE = (%_DebugIsActive() != 0); 316 define DEBUG_IS_ACTIVE = (%_DebugIsActive() != 0);
317 macro DEBUG_IS_STEPPING(function) = (%_DebugIsActive() != 0 && %DebugCallbackSup portsStepping(function)); 317 macro DEBUG_IS_STEPPING(function) = (%_DebugIsActive() != 0 && %DebugCallbackSup portsStepping(function));
318 macro DEBUG_PREPARE_STEP_IN_IF_STEPPING(function) = if (%_DebugIsActive() != 0) %DebugPrepareStepInIfStepping(function); 318 macro DEBUG_PREPARE_STEP_IN_IF_STEPPING(function) = if (%_DebugIsActive() != 0) %DebugPrepareStepInIfStepping(function);
319 319
320 # SharedFlag equivalents 320 # SharedFlag equivalents
321 define kNotShared = false; 321 define kNotShared = false;
322 define kShared = true; 322 define kShared = true;
OLDNEW
« no previous file with comments | « src/crankshaft/hydrogen-instructions.h ('k') | src/js/regexp.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698