Chromium Code Reviews| 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 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 183 macro REGEXP_STICKY(regexp) = (%_RegExpFlags(regexp) & 8); | 183 macro REGEXP_STICKY(regexp) = (%_RegExpFlags(regexp) & 8); |
| 184 macro REGEXP_UNICODE(regexp) = (%_RegExpFlags(regexp) & 16); | 184 macro REGEXP_UNICODE(regexp) = (%_RegExpFlags(regexp) & 16); |
| 185 macro REGEXP_SOURCE(regexp) = (%_RegExpSource(regexp)); | 185 macro REGEXP_SOURCE(regexp) = (%_RegExpSource(regexp)); |
| 186 | 186 |
| 187 # We can't put macros in macros so we use constants here. | 187 # We can't put macros in macros so we use constants here. |
| 188 # REGEXP_NUMBER_OF_CAPTURES | 188 # REGEXP_NUMBER_OF_CAPTURES |
| 189 macro NUMBER_OF_CAPTURES(array) = ((array)[0]); | 189 macro NUMBER_OF_CAPTURES(array) = ((array)[0]); |
| 190 | 190 |
| 191 # Limit according to ECMA 262 15.9.1.1 | 191 # Limit according to ECMA 262 15.9.1.1 |
| 192 define MAX_TIME_MS = 8640000000000000; | 192 define MAX_TIME_MS = 8640000000000000; |
| 193 # Limit which is MAX_TIME_MS + msPerMonth. | 193 # Limit which is MAX_TIME_MS + msPerMonth. |
|
Camillo Bruni
2015/12/23 14:46:08
Please update the comment.
Dan Ehrenberg
2015/12/25 01:00:49
Following more investigation, I decided to keep th
| |
| 194 define MAX_TIME_BEFORE_UTC = 8640002592000000; | 194 define MAX_TIME_BEFORE_UTC = 8640000000000000; |
|
Camillo Bruni
2015/12/23 14:46:08
DateCache::kMaxTimeBeforeUTCInMs is
8640000864000
Dan Ehrenberg
2015/12/25 01:00:49
Oops, you're right. But do you have a good idea fo
| |
| 195 | 195 |
| 196 # Gets the value of a Date object. If arg is not a Date object | 196 # Gets the value of a Date object. If arg is not a Date object |
| 197 # a type error is thrown. | 197 # a type error is thrown. |
| 198 macro CHECK_DATE(arg) = if (!%_IsDate(arg)) %_ThrowNotDateError(); | 198 macro CHECK_DATE(arg) = if (!%_IsDate(arg)) %_ThrowNotDateError(); |
| 199 macro LOCAL_DATE_VALUE(arg) = (%_DateField(arg, 0) + %_DateField(arg, 21)); | 199 macro LOCAL_DATE_VALUE(arg) = (%_DateField(arg, 0) + %_DateField(arg, 21)); |
| 200 macro UTC_DATE_VALUE(arg) = (%_DateField(arg, 0)); | 200 macro UTC_DATE_VALUE(arg) = (%_DateField(arg, 0)); |
| 201 | 201 |
| 202 macro LOCAL_YEAR(arg) = (%_DateField(arg, 1)); | 202 macro LOCAL_YEAR(arg) = (%_DateField(arg, 1)); |
| 203 macro LOCAL_MONTH(arg) = (%_DateField(arg, 2)); | 203 macro LOCAL_MONTH(arg) = (%_DateField(arg, 2)); |
| 204 macro LOCAL_DAY(arg) = (%_DateField(arg, 3)); | 204 macro LOCAL_DAY(arg) = (%_DateField(arg, 3)); |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 307 # Must match OrderedHashTable::kNotFound. | 307 # Must match OrderedHashTable::kNotFound. |
| 308 define NOT_FOUND = -1; | 308 define NOT_FOUND = -1; |
| 309 | 309 |
| 310 # Check whether debug is active. | 310 # Check whether debug is active. |
| 311 define DEBUG_IS_ACTIVE = (%_DebugIsActive() != 0); | 311 define DEBUG_IS_ACTIVE = (%_DebugIsActive() != 0); |
| 312 macro DEBUG_PREPARE_STEP_IN_IF_STEPPING(function) = if (%_DebugIsActive() != 0) %DebugPrepareStepInIfStepping(function); | 312 macro DEBUG_PREPARE_STEP_IN_IF_STEPPING(function) = if (%_DebugIsActive() != 0) %DebugPrepareStepInIfStepping(function); |
| 313 | 313 |
| 314 # SharedFlag equivalents | 314 # SharedFlag equivalents |
| 315 define kNotShared = false; | 315 define kNotShared = false; |
| 316 define kShared = true; | 316 define kShared = true; |
| OLD | NEW |