Math.pow() not support in A101 and K64F
Description
Math.pow() not support in A101 and K64F
Test Code
Steps to Reproduction
- create a simple test case as below:
- Build this simple test case and flash to A101.
- Thrown error.
Actual Result
- Run test code test-buffer.js on Arduino 101, FRDM-K64F:
Expected Result
No error thrown
Test Builds
| Branch | Commit Id | Target Device | Test Date | Result |
|---|---|---|---|---|
| master | 02d9471 | Arduino 101 | Mar 21, 2017 | Fail |
| master | 02d9471 | FRDM-K64F | Mar 21, 2017 | Fail |
| master | 02d9471 | Linux | Mar 21, 2017 | Pass |
Additional Information
@grgustaf I don't think we support this do we? I don't recall us having any of the Math functions.
We have always left out the Math library from JS to save space. However, we do have enough room these days that we could enable it, although it is large and would limit what other modules could be used. So this is basically a feature request, not a bug.
We do have an easy-ish way to enable it. You can edit jerry_feature.profile and comment out the CONFIG_DISABLE_MATH_BUILTIN line. Then if you rebuild it will include the Math object. Eventually we may want to generate this file based on command line flags but there are quite a few of these features, so a config file makes the most sense IMO. Plus, its jerryscript that parses this file, so it takes out any makefile work we have to do.
In ES2017, ** is a default operator for Math.pow, so at some point is should be supported even if the Math functions aren't
@kenchris 7th Edition: ES2016* ;) I'm curious though—what is JerryScript's roadmap? I can't find anything anywhere. I'm going to file an issue over there to see what we can learn.
Right, I meant ES2016, the release with only two new features ;)
Lol, that was the best release ever :)