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

Add indentation checks for code inside classes and fix appeared issues. #149

Merged
merged 1 commit into from
Jun 8, 2015

Conversation

sand1k
Copy link
Contributor

@sand1k sand1k commented Jun 3, 2015

Add indentation checks for code inside classes and fix appeared issues.
Fix asserts in test_recordset.cpp.

@sand1k sand1k mentioned this pull request Jun 3, 2015
@egavrin
Copy link
Contributor

egavrin commented Jun 4, 2015

Good to me.

@zherczeg
Copy link
Member

zherczeg commented Jun 4, 2015

What is the C++ status in Jerry? Is it allowed?

@sand1k
Copy link
Contributor Author

sand1k commented Jun 4, 2015

@LaszloLango, The reason for using one space is to highlight scope of the class (to easily find its boundaries). To my mind, both ways are alright, so we could stick to any of them.
BTW, in V8 one space indentation is used. Don't you know the motivation?

@LaszloLango
Copy link
Contributor

@sand1k I can live with it. :) We can use one space if I am the only one who doesn't like it.

@sand1k
Copy link
Contributor Author

sand1k commented Jun 5, 2015

@LaszloLango, we discussed this with @egavrin and decided that this indentation is not needed so I'll fix the patch.

@egavrin
Copy link
Contributor

egavrin commented Jun 5, 2015

What is the C++ status in Jerry? Is it allowed?

@zherczeg, as we discussed earlier, we should keep existing code "as is"
without introducing C++ features globally, until we all would agree to use C++ in this project.

The reason for using C++ in the following components: rcs_recordset_t
and lit_storage_t - is to boost the development of core functionality.

This code could be written in C, but implementation would be less effective and much more complicated due to manual emulation of inheritance.

So we used inheritance and virtual functions in this particular implementation because it simplifies interfaces in comparison to C, while not affecting performance and code size.

As we discussed on CC, we consider to use some kind of restricted C++ subset for embedded systems in future. We are preparing a proposal which describes features of C++ that could be effectively used without affecting performance, memory consumption and code size comparing to C.
We hope to get your feedback on this subset and collaborate on its development, aiming to use it across Jerry and IoTjs projects.

I request you to approve these changes for now. If we would decide to revert C++ usage globally after future investigation, we will rewrite these parts, for example, this could be done during "optimization stage"
in July and August.

From my point of view, usage of limited C++ subset would allow us to significantly simplify code base and provide more flexibility in development, while enabling C++-specific optimizations.

@egavrin egavrin added enhancement An improvement infrastructure Related to GH Actions or the tested targets labels Jun 5, 2015
@egavrin egavrin added this to the Core ECMA features milestone Jun 5, 2015
@egavrin egavrin assigned LaszloLango and unassigned egavrin Jun 5, 2015
@sand1k
Copy link
Contributor Author

sand1k commented Jun 8, 2015

@LaszloLango, I updated the pull request according to your notes. Please, check.

@egavrin egavrin assigned sand1k and unassigned LaszloLango Jun 8, 2015
Fix asserts in test_recordset.cpp.

JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov [email protected]
@sand1k sand1k force-pushed the Andrey-indentation-checks-for-classes branch from 5292a28 to 55b4307 Compare June 8, 2015 21:32
@sand1k sand1k merged commit 55b4307 into master Jun 8, 2015
@sand1k sand1k deleted the Andrey-indentation-checks-for-classes branch June 8, 2015 21:39
@egavrin
Copy link
Contributor

egavrin commented Jun 8, 2015

This commit was LGTM'ed by @LaszloLango and me, but comments are missing now, due to rebasing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An improvement infrastructure Related to GH Actions or the tested targets
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants