Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Date object helper functions #199

Closed
wants to merge 5 commits into from

Conversation

szledan
Copy link
Contributor

@szledan szledan commented Jun 17, 2015

JerryScript-DCO-1.0-Signed-off-by: Szilard Ledan [email protected]

@LaszloLango LaszloLango added ecma builtins Related to ECMA built-in routines development Feature implementation labels Jun 17, 2015
@LaszloLango LaszloLango added this to the ECMA builtins milestone Jun 17, 2015
@@ -0,0 +1,501 @@
/* Copyright 2014-2015 Samsung Electronics Co., Ltd.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be 2015 only.

@dbatyai
Copy link
Member

dbatyai commented Jun 17, 2015

Otherwise lgtm.

@@ -0,0 +1,140 @@

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you, please, commit addition of ./third-party/fdlibm/* separately.

#include "ecma-helpers.h"
#include "fdlibm-math.h"

#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_DATE_BUILTIN
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are helpers from the module supposed to be used somewhere outside of jerry-core/ecma/builtin-objects/?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, maybe we wouldn't use them anywhere outside of builtins. So should I remove this guard?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, move them to jerry-core/ecma/builtin-objects (maybe to ecma-builtin-helpers.cpp, as the helpers would be used for implementation of both Date and Date.prototype built-ins).

@egavrin
Copy link
Contributor

egavrin commented Jun 21, 2015

Please, split PR on two commits: Add fdlib and Date logic.

@szledan szledan force-pushed the date_helpers branch 2 times, most recently from d8fcbbb to 3e960da Compare June 22, 2015 08:35
@szledan
Copy link
Contributor Author

szledan commented Jun 22, 2015

This PR depends on #223.

szledan added 4 commits June 22, 2015 13:38
JerryScript-DCO-1.0-Signed-off-by: Szilard Ledan [email protected]
JerryScript-DCO-1.0-Signed-off-by: Szilard Ledan [email protected]
JerryScript-DCO-1.0-Signed-off-by: Szilard Ledan [email protected]
JerryScript-DCO-1.0-Signed-off-by: Szilard Ledan [email protected]
ecma_date_daylight_saving_ta (ecma_number_t __attr_unused___ time) /**< time value */
{
JERRY_ASSERT (!ecma_number_is_nan (time));
JERRY_UNIMPLEMENTED ("The ecma_date_daylight_saving_ta is not implemented yet.");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor note: there is no need to the function name to the unimplemented comment as the macro will print out the file name, function name and line number.

Add comments to the time range defines

JerryScript-DCO-1.0-Signed-off-by: Szilard Ledan [email protected]
@szledan
Copy link
Contributor Author

szledan commented Jun 29, 2015

Hi, I have updated the patch. Could you take a look? ( @kkristof )

@kkristof
Copy link
Contributor

lgtm

@ruben-ayrapetyan
Copy link
Contributor

Looks good to me

@galpeter
Copy link
Contributor

Rebased & merged: 07148d3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
development Feature implementation ecma builtins Related to ECMA built-in routines
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants