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

Side by Side Diff: src/macros.py

Issue 1167813003: [date] Refactor the %_DateField intrinsic to be optimizable. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address comments. Created 5 years, 6 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 | « src/ia32/lithium-ia32.cc ('k') | src/mips/full-codegen-mips.cc » ('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 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 # REGEXP_NUMBER_OF_CAPTURES 186 # REGEXP_NUMBER_OF_CAPTURES
187 macro NUMBER_OF_CAPTURES(array) = ((array)[0]); 187 macro NUMBER_OF_CAPTURES(array) = ((array)[0]);
188 188
189 # Limit according to ECMA 262 15.9.1.1 189 # Limit according to ECMA 262 15.9.1.1
190 define MAX_TIME_MS = 8640000000000000; 190 define MAX_TIME_MS = 8640000000000000;
191 # Limit which is MAX_TIME_MS + msPerMonth. 191 # Limit which is MAX_TIME_MS + msPerMonth.
192 define MAX_TIME_BEFORE_UTC = 8640002592000000; 192 define MAX_TIME_BEFORE_UTC = 8640002592000000;
193 193
194 # Gets the value of a Date object. If arg is not a Date object 194 # Gets the value of a Date object. If arg is not a Date object
195 # a type error is thrown. 195 # a type error is thrown.
196 macro CHECK_DATE(arg) = if (%_ClassOf(arg) !== 'Date') throw MakeTypeError(kDate Type); 196 macro CHECK_DATE(arg) = %_ThrowIfNotADate(arg);
197 macro LOCAL_DATE_VALUE(arg) = (%_DateField(arg, 0) + %_DateField(arg, 21)); 197 macro LOCAL_DATE_VALUE(arg) = (%_DateField(arg, 0) + %_DateField(arg, 21));
198 macro UTC_DATE_VALUE(arg) = (%_DateField(arg, 0)); 198 macro UTC_DATE_VALUE(arg) = (%_DateField(arg, 0));
199 199
200 macro LOCAL_YEAR(arg) = (%_DateField(arg, 1)); 200 macro LOCAL_YEAR(arg) = (%_DateField(arg, 1));
201 macro LOCAL_MONTH(arg) = (%_DateField(arg, 2)); 201 macro LOCAL_MONTH(arg) = (%_DateField(arg, 2));
202 macro LOCAL_DAY(arg) = (%_DateField(arg, 3)); 202 macro LOCAL_DAY(arg) = (%_DateField(arg, 3));
203 macro LOCAL_WEEKDAY(arg) = (%_DateField(arg, 4)); 203 macro LOCAL_WEEKDAY(arg) = (%_DateField(arg, 4));
204 macro LOCAL_HOUR(arg) = (%_DateField(arg, 5)); 204 macro LOCAL_HOUR(arg) = (%_DateField(arg, 5));
205 macro LOCAL_MIN(arg) = (%_DateField(arg, 6)); 205 macro LOCAL_MIN(arg) = (%_DateField(arg, 6));
206 macro LOCAL_SEC(arg) = (%_DateField(arg, 7)); 206 macro LOCAL_SEC(arg) = (%_DateField(arg, 7));
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 define NOT_FOUND = -1; 306 define NOT_FOUND = -1;
307 307
308 # Check whether debug is active. 308 # Check whether debug is active.
309 define DEBUG_IS_ACTIVE = (%_DebugIsActive() != 0); 309 define DEBUG_IS_ACTIVE = (%_DebugIsActive() != 0);
310 macro DEBUG_IS_STEPPING(function) = (%_DebugIsActive() != 0 && %DebugCallbackSup portsStepping(function)); 310 macro DEBUG_IS_STEPPING(function) = (%_DebugIsActive() != 0 && %DebugCallbackSup portsStepping(function));
311 macro DEBUG_PREPARE_STEP_IN_IF_STEPPING(function) = if (DEBUG_IS_STEPPING(functi on)) %DebugPrepareStepInIfStepping(function); 311 macro DEBUG_PREPARE_STEP_IN_IF_STEPPING(function) = if (DEBUG_IS_STEPPING(functi on)) %DebugPrepareStepInIfStepping(function);
312 312
313 # SharedFlag equivalents 313 # SharedFlag equivalents
314 define kNotShared = false; 314 define kNotShared = false;
315 define kShared = true; 315 define kShared = true;
OLDNEW
« no previous file with comments | « src/ia32/lithium-ia32.cc ('k') | src/mips/full-codegen-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698