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

Issue 2841041: Remove some extra calls in date.js. (Closed)

Created:
10 years, 5 months ago by Vitaly Repeshko
Modified:
9 years, 7 months ago
CC:
v8-dev
Visibility:
Public.

Description

Remove some extra calls in date.js. A few hot Date.prototype functions used to be implemented as DateGetFoo calling GetFooFrom(this), and other callers of GetFooFrom did repeated date value extraction. In this change GetFooFrom functions were inlined into the functions on the prototype and the other callers switched to using date values directly. Committed: http://code.google.com/p/v8/source/detail?r=5027

Patch Set 1 #

Total comments: 1

Patch Set 2 : Got rid of duplication. Restored ECMA references and the original order. #

Total comments: 1

Patch Set 3 : No more CallFunction. Helpers are macros. #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+58 lines, -133 lines) Patch
M src/date.js View 1 2 11 chunks +54 lines, -133 lines 0 comments Download
M src/macros.py View 1 chunk +4 lines, -0 lines 1 comment Download

Messages

Total messages: 5 (0 generated)
Vitaly Repeshko
10 years, 5 months ago (2010-07-05 08:27:48 UTC) #1
Vyacheslav Egorov (Chromium)
LGTM with comment addressed. http://codereview.chromium.org/2841041/diff/1/2 File src/date.js (right): http://codereview.chromium.org/2841041/diff/1/2#newcode578 src/date.js:578: function DateValueGetDate(t) { I don't ...
10 years, 5 months ago (2010-07-05 08:46:35 UTC) #2
Lasse Reichstein
Drive-by whining. http://codereview.chromium.org/2841041/diff/5001/6001 File src/date.js (right): http://codereview.chromium.org/2841041/diff/5001/6001#newcode897 src/date.js:897: date = %_ArgumentsLength() < 2 ? %_CallFunction(this, ...
10 years, 5 months ago (2010-07-05 10:35:22 UTC) #3
Vitaly Repeshko
o Restored the original order and references to ECMA. o Moved shared code to macros. ...
10 years, 5 months ago (2010-07-05 14:34:45 UTC) #4
Vyacheslav Egorov (Chromium)
10 years, 5 months ago (2010-07-05 14:52:18 UTC) #5
There is still a slight duplication of NaN handling but I thinks it is
unavoidable. 

LGTM

http://codereview.chromium.org/2841041/diff/9001/10002
File src/macros.py (right):

http://codereview.chromium.org/2841041/diff/9001/10002#newcode157
src/macros.py:157: macro NAN_OR_MS_FROM_TIME(time) = (NUMBER_IS_NAN(time) ?
time: (Modulo(time, 1000)));
define in terms of MS_FROM_TIME?

whitespace before colon

Powered by Google App Engine
This is Rietveld 408576698