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

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

Issue 1419823010: Implement flag and source getters on RegExp.prototype. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@rproto
Patch Set: new webkit expectations 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
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 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 define INFINITY = (1/0); 174 define INFINITY = (1/0);
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.
185 macro REGEXP_GLOBAL(regexp) = (regexp[regExpFlagsSymbol] & 1);
186 macro REGEXP_IGNORE_CASE(regexp) = (regexp[regExpFlagsSymbol] & 2);
187 macro REGEXP_MULTILINE(regexp) = (regexp[regExpFlagsSymbol] & 4);
188 macro REGEXP_STICKY(regexp) = (regexp[regExpFlagsSymbol] & 8);
189 macro REGEXP_UNICODE(regexp) = (regexp[regExpFlagsSymbol] & 16);
190 macro REGEXP_SOURCE(regexp) = (regexp[regExpSourceSymbol]);
191
184 # 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.
185 # REGEXP_NUMBER_OF_CAPTURES 193 # REGEXP_NUMBER_OF_CAPTURES
186 macro NUMBER_OF_CAPTURES(array) = ((array)[0]); 194 macro NUMBER_OF_CAPTURES(array) = ((array)[0]);
187 195
188 # Limit according to ECMA 262 15.9.1.1 196 # Limit according to ECMA 262 15.9.1.1
189 define MAX_TIME_MS = 8640000000000000; 197 define MAX_TIME_MS = 8640000000000000;
190 # Limit which is MAX_TIME_MS + msPerMonth. 198 # Limit which is MAX_TIME_MS + msPerMonth.
191 define MAX_TIME_BEFORE_UTC = 8640002592000000; 199 define MAX_TIME_BEFORE_UTC = 8640002592000000;
192 200
193 # Gets the value of a Date object. If arg is not a Date object 201 # Gets the value of a Date object. If arg is not a Date object
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 define NOT_FOUND = -1; 313 define NOT_FOUND = -1;
306 314
307 # Check whether debug is active. 315 # Check whether debug is active.
308 define DEBUG_IS_ACTIVE = (%_DebugIsActive() != 0); 316 define DEBUG_IS_ACTIVE = (%_DebugIsActive() != 0);
309 macro DEBUG_IS_STEPPING(function) = (%_DebugIsActive() != 0 && %DebugCallbackSup portsStepping(function)); 317 macro DEBUG_IS_STEPPING(function) = (%_DebugIsActive() != 0 && %DebugCallbackSup portsStepping(function));
310 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);
311 319
312 # SharedFlag equivalents 320 # SharedFlag equivalents
313 define kNotShared = false; 321 define kNotShared = false;
314 define kShared = true; 322 define kShared = true;
OLDNEW
« src/bootstrapper.cc ('K') | « src/js/harmony-regexp.js ('k') | src/js/prologue.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698