OLD | NEW |
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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 # Limits for parts of the date, so that we support all the dates that | 76 # Limits for parts of the date, so that we support all the dates that |
77 # ECMA 262 - 15.9.1.1 requires us to, but at the same time be sure that | 77 # ECMA 262 - 15.9.1.1 requires us to, but at the same time be sure that |
78 # the date (days since 1970) is in SMI range. | 78 # the date (days since 1970) is in SMI range. |
79 const kMinYear = -1000000; | 79 const kMinYear = -1000000; |
80 const kMaxYear = 1000000; | 80 const kMaxYear = 1000000; |
81 const kMinMonth = -10000000; | 81 const kMinMonth = -10000000; |
82 const kMaxMonth = 10000000; | 82 const kMaxMonth = 10000000; |
83 const kMinDate = -100000000; | 83 const kMinDate = -100000000; |
84 const kMaxDate = 100000000; | 84 const kMaxDate = 100000000; |
85 | 85 |
| 86 # Native cache ids. |
| 87 const STRING_TO_REGEXP_CACHE_ID = 0; |
| 88 |
86 # Type query macros. | 89 # Type query macros. |
87 # | 90 # |
88 # Note: We have special support for typeof(foo) === 'bar' in the compiler. | 91 # Note: We have special support for typeof(foo) === 'bar' in the compiler. |
89 # It will *not* generate a runtime typeof call for the most important | 92 # It will *not* generate a runtime typeof call for the most important |
90 # values of 'bar'. | 93 # values of 'bar'. |
91 macro IS_NULL(arg) = (arg === null); | 94 macro IS_NULL(arg) = (arg === null); |
92 macro IS_NULL_OR_UNDEFINED(arg) = (arg == null); | 95 macro IS_NULL_OR_UNDEFINED(arg) = (arg == null); |
93 macro IS_UNDEFINED(arg) = (typeof(arg) === 'undefined'); | 96 macro IS_UNDEFINED(arg) = (typeof(arg) === 'undefined'); |
94 macro IS_NUMBER(arg) = (typeof(arg) === 'number'); | 97 macro IS_NUMBER(arg) = (typeof(arg) === 'number'); |
95 macro IS_STRING(arg) = (typeof(arg) === 'string'); | 98 macro IS_STRING(arg) = (typeof(arg) === 'string'); |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 macro MS_FROM_TIME(time) = (Modulo(time, 1000)); | 147 macro MS_FROM_TIME(time) = (Modulo(time, 1000)); |
145 | 148 |
146 # Last input and last subject of regexp matches. | 149 # Last input and last subject of regexp matches. |
147 macro LAST_SUBJECT(array) = ((array)[1]); | 150 macro LAST_SUBJECT(array) = ((array)[1]); |
148 macro LAST_INPUT(array) = ((array)[2]); | 151 macro LAST_INPUT(array) = ((array)[2]); |
149 | 152 |
150 # REGEXP_FIRST_CAPTURE | 153 # REGEXP_FIRST_CAPTURE |
151 macro CAPTURE(index) = (3 + (index)); | 154 macro CAPTURE(index) = (3 + (index)); |
152 const CAPTURE0 = 3; | 155 const CAPTURE0 = 3; |
153 const CAPTURE1 = 4; | 156 const CAPTURE1 = 4; |
OLD | NEW |