Commit Graph

1442 Commits

Author SHA1 Message Date
Léa Saviot
eeb42f2544 [apps/code] autocompletionText uses the right text length
Before, there was no notion that the autocompleted text might not be a
null terminated string.
2020-06-04 14:50:03 +02:00
Léa Saviot
f883516716 [apps/code] Editor asks VariableBox for autocompletion 2020-06-04 14:50:03 +02:00
Léa Saviot
1e2492c5f4 [apps/code] Autocomplete only at the end of the word
For instance, if the cursor is: "he|llo" and the user adds the letter
'i', there is no autocompletion provided as the cursor is still in the
middle of a word.
2020-06-04 14:50:03 +02:00
Léa Saviot
f82079a40a [apps/code] Autocomplete only if char before cursor is not ' ' or '\n' 2020-06-04 14:50:03 +02:00
Léa Saviot
343d2328b8 [ion/utf8_helper] EndOfWord helper 2020-06-04 14:50:03 +02:00
Ruben Dashyan
bc0b21463e [quiz][ion/test] Move time measurements to quiz
to be able to do measurements in any test
2020-06-04 14:50:00 +02:00
Émilie Feral
4cd0d20585 [ion] Fix comment 2020-05-18 14:39:46 +02:00
Émilie Feral
0f61b2ccf3 [ion] Add comment on default collectRegisters implementation 2020-05-18 14:39:46 +02:00
Émilie Feral
3f6647f3ae [ion][python] Implement an architecture-dependant collect_registers.
setjmp is not guaranteed to collect all registers without modification
on all platforms.

This fixes the following bug: when the pointer of a newly allocated
object on the Python heap is stored in rpb registers on x86_64 arch, it
was not collected by the garbarge collector.
2020-05-18 14:39:46 +02:00
Léa Saviot
efe5b4d6f8 [ion/storage] Private constructor and cleaner sharedStorage() 2020-05-07 06:22:42 -07:00
Émilie Feral
dcfabf754d [ion] Init random seed with time in simulator main 2020-04-15 09:11:52 -04:00
Émilie Feral
870dd868e9 [ion] Tidy files:
- move from shared to simulator/shared
- delete files used only be deprecated blackbox
2020-04-15 09:11:52 -04:00
Romain Goyet
84768472bd Explicit std::min/max template usage
This is unfortunately required in several cases:
 - Sometimes when we use either float and double (this should be changed)
 - Because KDCoordinate is not an int, so any arithmemtic promotes it to
an int
 - Because we mix pointer differences and ints
2020-04-14 09:31:02 -04:00
Romain Goyet
950862f8d0 Use std::min and std::max 2020-04-14 09:31:02 -04:00
Léa Saviot
2ed354710f [build/simulator] NDEBUG flag in release mode
This way, asserts are not performed on simulator platforms
2020-04-10 00:49:15 -07:00
Joachim Le Fournis
4a9bfca1f6 [ion] Alpha-locked percent becomes backspace 2020-04-09 12:09:03 -04:00
Émilie Feral
068325d151 Coding style: remove unecessary 'virtual' keyword when 'override' is
present 2/2
2020-04-09 11:36:51 +02:00
Romain Goyet
743eb104bf [ion] Replace Ion::Events::Event::id() by an explicit cast operator 2020-04-08 09:56:33 +02:00
Romain Goyet
35d446353f [escher] Avoid long switches on Left/Up/Right/Down 2020-04-08 09:56:33 +02:00
Neven Sajko
bc7d598517 [ion] do not increment volatile variable in isr_systick
In 2019 a proposal was approved which is deprecating this and other
harmful usage of volatile in C++ in 2020. See web links at the end.

Note that this did not at all change the GCC-generated machine code.

Deprecating volatile (adopted in 2019 for C++20):
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p1152r0.html
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p1152r4.html

Related, but less relevant:

volatile_load<T> and volatile_store<T>:
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p1382r1.pdf

Deprecating volatile: library:
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p1831r0.html
2020-04-06 17:18:03 +02:00
Neven Sajko
1c9b402645 [ion] Remove volatile qualifier from millis return type
Qualification of an integer return type as volatile is ignored by the
compiler. To clarify, an integer value (not a variable), which is what
the return type is, can not be assigned to anyway, so qualification as
volatile does not make sense.
2020-04-06 17:18:03 +02:00
Romain Goyet
1b2bbd163b [ion/device] Rename a file 2020-04-03 22:26:55 -04:00
Romain Goyet
f7911bae72 [build] Remove DEFAULT
It was redundant with HANDY_TARGETS and HANDY_TARGETS_EXTENSIONS
2020-04-03 22:26:55 -04:00
Romain Goyet
99b916e179 [build] Share multi-app code 2020-04-03 22:26:55 -04:00
Romain Goyet
f9b0843578 [build/simulator/apple] Share code 2020-04-03 22:26:55 -04:00
Romain Goyet
fff20eb530 [ion/simulator/apple] Rename Make helper 2020-04-03 22:26:55 -04:00
Romain Goyet
d4149b1a3d [build] Move %_run targets in the build dir 2020-04-03 22:26:55 -04:00
Romain Goyet
3f2b14ac3e [build] Misc cleanups 2020-04-03 22:26:55 -04:00
Romain Goyet
ba57dbde61 [build] macOS and iOS can now build any binary 2020-04-03 22:26:55 -04:00
Romain Goyet
ada205b1a7 [build] Use variants
- Move helpers functions into build/helpers.mak
- Move official warning into official targets only
2020-04-03 22:26:55 -04:00
Émilie Feral
b8b3829ea4 [ion] Web: enable to set environment variable 2020-03-27 09:32:31 -04:00
Romain Goyet
51b3a007e5 [ion/simulator/web] Remove old comment 2020-03-26 09:31:58 +01:00
Romain Goyet
8bd01b600b [ion/simulator/web] Properly handle touch events 2020-03-26 09:31:58 +01:00
Romain Goyet
5e9543e3b7 Remove whitespace 2020-03-25 13:44:10 +01:00
Romain Goyet
2cdb5d38bf [build/android] Ignore the linter on release builds 2020-03-25 13:44:10 +01:00
Romain Goyet
b36de49b48 [simulator/android] Sign iff signing environment is provided 2020-03-25 13:44:10 +01:00
Romain Goyet
fca1dde44d [simulator/android] Use target-agnostic rules 2020-03-25 13:44:10 +01:00
Romain Goyet
625afcfd42 [build/android] Unify the behavior with iOS and macOS 2020-03-25 13:44:10 +01:00
Émilie Feral
c0f73e97d2 [ion] Android Makefile: simplify rule_for_gradle 2020-03-24 10:26:59 -04:00
Émilie Feral
43bf89c6e4 [ion] Android build: specify libepsilon libraries' name when building
the apk
2020-03-24 10:26:59 -04:00
Romain Goyet
62324b9cac [build/emscripten] Don't use memory init files anymore
Those provide a really small size gain and are painful to deploy
2020-03-24 15:02:10 +01:00
Romain Goyet
eadfe4aa56 [ion/simulator/web] Name the target "epsilon.zip" to match other targets
This way it's consistent with epsilon.ipa on TARGET=ios and epsilon.apk
on TARGET=android
2020-03-24 15:02:10 +01:00
Romain Goyet
edbd879b4b [ion] Modularize the HTML simulator 2020-03-24 15:02:10 +01:00
Léa Saviot
05d24e0c61 [ion/android] Longer comment on Home button hiding fix 2020-03-24 10:10:02 +01:00
Léa Saviot
f31de20039 [ion/android] Hide the status bar and navigation buttons
This is a hack, we should find why this was broken after v12.
2020-03-24 10:10:02 +01:00
Émilie Feral
1809037273 [ion] Fix epsilon.official.ipa dependencies 2020-03-19 13:36:10 +01:00
Romain Goyet
81cd18ad67 [build] Signing android apps is easier
Signing parameters can be passed on the command line, e.g. "ANDROID_SIGNING_STORE_FILE=foobar", or they can be written to a ~/.gradle/gradle.properties file using the "EPSILON_SIGNING_STORE_FILE=foobar" syntax.
2020-03-18 17:30:20 +01:00
Léa Saviot
90f2e5beed [ion/sdl] Do not process more than one buffered event
Scenario:
Make an infinite loop script (while 1 : 1+1) and run it. Input 1234567
then press Back to interrupt the infinite loop -> the script execution
stops, then 1234567 is input in the input line, which is quite weird. It
is even weirder when the key pressed during the [script execution / a
long computation] result in navigation inside the calculator apps.
2020-03-11 15:36:52 +01:00
Léa Saviot
9ab3558cfe [ion/events_keyboard] Remove unused cases 2020-03-11 15:36:52 +01:00
Léa Saviot
1242258992 [ion] Handle key events in all simulators as in EPSILON_SDL_SCREEN_ONLY
This way, physical keyboard events can be caught by python on all
simulators
2020-03-11 15:36:52 +01:00