Граф коммитов

125 Коммитов

Автор SHA1 Сообщение Дата
Alon Zakai 90338a7dcd do not track eliminatable variables from inside a switch to outside 2014-09-24 11:12:34 -07:00
Alon Zakai ffb887d170 add a newline to source comments in uglify, where necessary 2014-08-25 11:24:22 -07:00
Alon Zakai d2cba26795 be careful with loop helpers, any of them may require a looptemp, not just the one matching the loop var, due to substitution of them all at once; fixes a regression from 398cded47b ; fixes #2626 2014-08-05 15:27:51 -07:00
Alon Zakai a4ae7a1c29 do not move around loop variable incrementations when the helper is used outside the loop 2014-05-19 10:45:29 -07:00
Alon Zakai 5736080051 fix looptemp replacements when there is a continue with a phi of the loop variable 2014-05-18 10:25:00 -07:00
Alon Zakai 398cded47b merge loop and helper variables when their use ranges do not overlap 2014-05-16 14:16:40 -07:00
Alon Zakai b312ce1021 optimize loop vars even if there is some code (like a phi) in the if block where the loop break is, if it does not interfere 2014-05-16 11:02:03 -07:00
Alon Zakai 87d62e4e75 eliminate loop vars even if used after increment, by adding another helper (which has less overhead than the previous helper) 2014-04-17 11:26:13 -07:00
Alon Zakai c0fdf61aaf do not eliminate loop vars if there are non-loop vars in the else that are influenced by the loop var or the helper 2014-04-08 19:10:56 -07:00
Alon Zakai 422d65dc06 optimize away individual loop vars, even if we can't remove them all 2014-03-27 10:34:52 -07:00
Alon Zakai 5b34850486 eliminate X=X which can happen due to elimination 2014-03-26 13:55:29 -07:00
Alon Zakai c7cb560f93 do not track eliminable variables from one switch statement to another, if they have any dependencies; fixes #2003 2014-01-15 21:06:50 -08:00
Alon Zakai 508d4f0241 make eliminator not get confused by calls without a return but with a coercion 2013-12-23 18:42:28 -08:00
Alon Zakai b86abc2ecf fix bug where close-together tempDoublePtr operations could cross each other 2013-12-23 15:43:01 -08:00
Alon Zakai d420405180 Math.* have no side effects 2013-11-09 09:55:18 -08:00
Alon Zakai c715cec68f invalidate calls on conditionals in js optimizer, to avoid eliminating into a non-executing code path 2013-11-08 14:54:18 -08:00
Alon Zakai 8b76d21dae update js optimizer tests 2013-10-03 10:53:57 -07:00
Alon Zakai 3117fa129f update test 2013-07-08 11:07:58 -07:00
Alon Zakai 501022cbaa Merge branch 'source-maps' of github.com:int3/emscripten into int3-source-maps
Conflicts:
	tools/js-optimizer.js
2013-06-26 10:53:17 -07:00
Jez Ng 5664470488 Move line numbers to the AST node itself.
This allows us to use strict comparisons on the node type.
2013-06-26 01:15:35 -07:00
Alon Zakai 6f3337677d fix crash in js optimizer loop variables pass on empty if blocks 2013-06-25 10:52:54 -07:00
Jez Ng 7ff0dde780 Merge remote-tracking branch 'upstream/incoming' into source-maps
Conflicts:
	emcc
	tools/js-optimizer.js
	tools/js_optimizer.py
2013-06-22 23:46:31 -07:00
Jez Ng 88feddf045 Get test_source_map passing again. 2013-06-22 01:23:22 -07:00
Jez Ng 4eef4beff6 Put uglify back the way it was.
Makes for an easier-to-review pull request.
2013-06-22 01:23:22 -07:00
Jez Ng 7212198353 Make optimizer handle both strings and string-like type objects.
NodeWithToken is a string-like type produced by the parser during 'embed
tokens' mode, which allows us to track line numbers.
2013-06-22 01:23:21 -07:00
Jez Ng 5459b3543f Fix line numbering for invoke instructions.
Line numbering of exceptions now work (better) in optimized mode.
2013-06-22 01:23:21 -07:00
Alon Zakai df420614de update tests 2013-06-21 16:37:48 -07:00
Alon Zakai 36924330b0 do not eliminate loop vars when there is a shared helper 2013-06-21 12:02:52 -07:00
Jez Ng d680f5e81b Implement source maps for optimized builds. 2013-06-19 14:15:18 -07:00
Jez Ng 0f73e28bab Map source lines for assignment statements. 2013-06-19 14:15:18 -07:00
Jez Ng 0c3cb93053 Delete uglify code that was only needed for compression.
This makes it easier to reason about the remainder...
2013-06-19 14:15:02 -07:00
Alon Zakai 6b93727b6e ignore tempDoublePtr operations, they do not really alias memory 2013-06-07 17:05:05 -07:00
Alon Zakai 523ed62b3c optimize multiple loop variables together 2013-06-07 10:09:12 -07:00
Alon Zakai 265dd5a4e2 handle empty loops in new loop optimizations; fixes #1270 2013-06-07 10:09:12 -07:00
Alon Zakai 5f2ccad0a3 track number of uses properly for loop variable removal 2013-06-07 10:09:12 -07:00
Alon Zakai 2c51c1eeb9 eliminate loop helper variables 2013-06-07 10:09:03 -07:00
Alon Zakai e7016ba189 only abort in eliminator when actually necessary 2013-05-28 17:07:40 -07:00
Alon Zakai 2275f51a55 eliminate into switch cases 2013-05-25 15:04:42 -07:00
Alon Zakai a6f1fec8fb do not eliminate if there is a switch 2013-05-10 17:48:14 -07:00
Alon Zakai 32444e9c75 only recurse on decreasing uses on locals, and clear out names to avoid confusion later 2013-05-10 17:33:23 -07:00
Alon Zakai 945c2fcf44 recursively remove variables with no uses in eliminator 2013-05-10 17:33:23 -07:00
Alon Zakai 4ead9dad30 recognize the double-to-i64 bitcast pattern as having no side effects in eliminator 2013-05-07 18:54:03 -07:00
Alon Zakai e5b7fab17e infer untyped variables in js-optimizer.js by origin variable's type if they are just a copy 2013-05-07 16:52:27 -07:00
Alon Zakai d66573c7e8 remove eliminated variable definitions only if variable was successfully removed (it might not be if it is in a switch) in asm 2013-04-17 11:06:49 -07:00
Alon Zakai 82ddb0715d send only a marker of generated functions to js-optimizer.js; we either know the generated functions and send only them, or we don't know them and send all the code, in either case js-optimizer.js does not need a list of generated functions 2013-03-08 10:17:44 -08:00
Chad Austin 2d9ed25654 kill symlinks to coffeescript 2013-03-04 19:12:10 -08:00
Alon Zakai db152b921d eliminate into labels 2013-02-02 15:29:48 -08:00
Alon Zakai 2325baf34e Merge branch 'incoming' into asm_js
Conflicts:
	src/library_browser.js
2012-12-31 11:56:53 -08:00
Alon Zakai aab26adc6a invalidate calls in if bodies in eliminator 2012-12-25 14:13:17 -08:00
Alon Zakai 7869ed3239 add failing eliminator testcase 2012-12-25 14:03:04 -08:00