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

Side by Side Diff: src/macros.py

Issue 39186: Revert revisions 1383, 1384, 1391, 1398, 1401, 1402,... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 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 | Annotate | Revision Log
« no previous file with comments | « src/jsregexp.cc ('k') | src/objects.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-2008 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
11 # with the distribution. 11 # with the distribution.
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 macro NUMBER_IS_NAN(arg) = (!%_IsSmi(%IS_VAR(arg)) && !(arg == arg)); 92 macro NUMBER_IS_NAN(arg) = (!%_IsSmi(%IS_VAR(arg)) && !(arg == arg));
93 macro TO_INTEGER(arg) = (%_IsSmi(%IS_VAR(arg)) ? arg : ToInteger(arg)); 93 macro TO_INTEGER(arg) = (%_IsSmi(%IS_VAR(arg)) ? arg : ToInteger(arg));
94 macro TO_INT32(arg) = (%_IsSmi(%IS_VAR(arg)) ? arg : ToInt32(arg)); 94 macro TO_INT32(arg) = (%_IsSmi(%IS_VAR(arg)) ? arg : ToInt32(arg));
95 95
96 # Macros implemented in Python. 96 # Macros implemented in Python.
97 python macro CHAR_CODE(str) = ord(str[1]); 97 python macro CHAR_CODE(str) = ord(str[1]);
98 98
99 # Accessors for original global properties that ensure they have been loaded. 99 # Accessors for original global properties that ensure they have been loaded.
100 const ORIGINAL_REGEXP = (global.RegExp, $RegExp); 100 const ORIGINAL_REGEXP = (global.RegExp, $RegExp);
101 const ORIGINAL_DATE = (global.Date, $Date); 101 const ORIGINAL_DATE = (global.Date, $Date);
102
103 # Constants used on an array to implement the properties of the RegExp object.
104 const REGEXP_NUMBER_OF_CAPTURES = 0;
105 const REGEXP_FIRST_CAPTURE = 1;
106
107 # We can't put macros in macros so we use constants here.
108 # REGEXP_NUMBER_OF_CAPTURES
109 macro NUMBER_OF_CAPTURES(array) = ((array)[0]);
110
111 # Last input and last subject are after the captures so we can omit them on
112 # results returned from global searches. Beware - these evaluate their
113 # arguments twice.
114 macro LAST_SUBJECT(array) = ((array)[(array)[0] + 1]);
115 macro LAST_INPUT(array) = ((array)[(array)[0] + 2]);
116
117 # REGEXP_FIRST_CAPTURE
118 macro CAPTURE(index) = (1 + (index));
119 const CAPTURE0 = 1;
120 const CAPTURE1 = 2;
OLDNEW
« no previous file with comments | « src/jsregexp.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698