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

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

Issue 1545883003: Fix 'illegal access' in Date constructor edge case (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Change the JS side limit, not the C++ one Created 4 years, 12 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
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-4640.js » ('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-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
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
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;
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-4640.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698