| 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 21 matching lines...) Expand all Loading... |
| 32 const READ_ONLY = 1; | 32 const READ_ONLY = 1; |
| 33 const DONT_ENUM = 2; | 33 const DONT_ENUM = 2; |
| 34 const DONT_DELETE = 4; | 34 const DONT_DELETE = 4; |
| 35 const NEW_ONE_BYTE_STRING = true; | 35 const NEW_ONE_BYTE_STRING = true; |
| 36 const NEW_TWO_BYTE_STRING = false; | 36 const NEW_TWO_BYTE_STRING = false; |
| 37 | 37 |
| 38 # Constants used for getter and setter operations. | 38 # Constants used for getter and setter operations. |
| 39 const GETTER = 0; | 39 const GETTER = 0; |
| 40 const SETTER = 1; | 40 const SETTER = 1; |
| 41 | 41 |
| 42 # These definitions must match the index of the properties in objects.h. | |
| 43 const kApiTagOffset = 0; | |
| 44 const kApiPropertyListOffset = 1; | |
| 45 const kApiSerialNumberOffset = 3; | |
| 46 const kApiConstructorOffset = 3; | |
| 47 const kApiPrototypeTemplateOffset = 5; | |
| 48 const kApiParentTemplateOffset = 6; | |
| 49 const kApiFlagOffset = 14; | |
| 50 | |
| 51 const NO_HINT = 0; | 42 const NO_HINT = 0; |
| 52 const NUMBER_HINT = 1; | 43 const NUMBER_HINT = 1; |
| 53 const STRING_HINT = 2; | 44 const STRING_HINT = 2; |
| 54 | 45 |
| 55 const kFunctionTag = 0; | |
| 56 const kNewObjectTag = 1; | |
| 57 | |
| 58 # For date.js. | 46 # For date.js. |
| 59 const HoursPerDay = 24; | 47 const HoursPerDay = 24; |
| 60 const MinutesPerHour = 60; | 48 const MinutesPerHour = 60; |
| 61 const SecondsPerMinute = 60; | 49 const SecondsPerMinute = 60; |
| 62 const msPerSecond = 1000; | 50 const msPerSecond = 1000; |
| 63 const msPerMinute = 60000; | 51 const msPerMinute = 60000; |
| 64 const msPerHour = 3600000; | 52 const msPerHour = 3600000; |
| 65 const msPerDay = 86400000; | 53 const msPerDay = 86400000; |
| 66 const msPerMonth = 2592000000; | 54 const msPerMonth = 2592000000; |
| 67 | 55 |
| 68 # For apinatives.js | |
| 69 const kUninitialized = -1; | |
| 70 const kReadOnlyPrototypeBit = 3; | |
| 71 const kRemovePrototypeBit = 4; # For FunctionTemplateInfo, matches objects.h | |
| 72 const kDoNotCacheBit = 5; # For FunctionTemplateInfo, matches objects.h | |
| 73 | |
| 74 # Note: kDayZeroInJulianDay = ToJulianDay(1970, 0, 1). | 56 # Note: kDayZeroInJulianDay = ToJulianDay(1970, 0, 1). |
| 75 const kInvalidDate = 'Invalid Date'; | 57 const kInvalidDate = 'Invalid Date'; |
| 76 const kDayZeroInJulianDay = 2440588; | 58 const kDayZeroInJulianDay = 2440588; |
| 77 const kMonthMask = 0x1e0; | 59 const kMonthMask = 0x1e0; |
| 78 const kDayMask = 0x01f; | 60 const kDayMask = 0x01f; |
| 79 const kYearShift = 9; | 61 const kYearShift = 9; |
| 80 const kMonthShift = 5; | 62 const kMonthShift = 5; |
| 81 | 63 |
| 82 # Limits for parts of the date, so that we support all the dates that | 64 # Limits for parts of the date, so that we support all the dates that |
| 83 # ECMA 262 - 15.9.1.1 requires us to, but at the same time be sure that | 65 # ECMA 262 - 15.9.1.1 requires us to, but at the same time be sure that |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 287 | 269 |
| 288 # Use for keys, values and entries iterators. | 270 # Use for keys, values and entries iterators. |
| 289 const ITERATOR_KIND_KEYS = 1; | 271 const ITERATOR_KIND_KEYS = 1; |
| 290 const ITERATOR_KIND_VALUES = 2; | 272 const ITERATOR_KIND_VALUES = 2; |
| 291 const ITERATOR_KIND_ENTRIES = 3; | 273 const ITERATOR_KIND_ENTRIES = 3; |
| 292 | 274 |
| 293 # Check whether debug is active. | 275 # Check whether debug is active. |
| 294 const DEBUG_IS_ACTIVE = (%_DebugIsActive() != 0); | 276 const DEBUG_IS_ACTIVE = (%_DebugIsActive() != 0); |
| 295 macro DEBUG_IS_STEPPING(function) = (%_DebugIsActive() != 0 && %DebugCallbackSup
portsStepping(function)); | 277 macro DEBUG_IS_STEPPING(function) = (%_DebugIsActive() != 0 && %DebugCallbackSup
portsStepping(function)); |
| 296 macro DEBUG_PREPARE_STEP_IN_IF_STEPPING(function) = if (DEBUG_IS_STEPPING(functi
on)) %DebugPrepareStepInIfStepping(function); | 278 macro DEBUG_PREPARE_STEP_IN_IF_STEPPING(function) = if (DEBUG_IS_STEPPING(functi
on)) %DebugPrepareStepInIfStepping(function); |
| OLD | NEW |