kpdecker
9665379cdc
Use terinary operator for inline appends
...
Allows for append operations to avoid breaking inline chain.
2014-11-05 22:28:12 -06:00
kpdecker
4f01f650dc
Render false literal as “false”
...
Fixes #827
2014-08-25 23:35:43 -05:00
kpdecker
ca1486b960
Prune unused code
2014-08-25 22:39:17 -05:00
kpdecker
0c7c37df6a
Restore helperMissing for ambiguous statements
...
Fixes #318 (regression)
Partial fix for #783
2014-08-23 18:26:57 -05:00
kpdecker
cde008b49f
Cleanup from code coverage report
2014-08-23 17:44:45 -05:00
kpdecker
84d646bb5d
Move strip processing into AST helper logic
...
We already have to track these behaviors for the standalone parsing and rather than having two whitespace pruning implementations this moves all of the behavior into one place.
Fixes #852
2014-08-23 17:44:20 -05:00
kpdecker
3531e04117
Optimize replaceStack for inline methods
...
Only use case was with inline input so most of this code was unnecessary.
2014-08-23 07:43:09 -05:00
kpdecker
c3fde1c01c
Remove unnecessary stack variable from blockHelper
2014-08-23 07:42:24 -05:00
kpdecker
19ce981296
Do not flush subexpressions
...
They are no longer duplicated with the new helper calling pattern and this also introduced stack corruption issues due to improper value lookups.
Fixes #767
Fixes #768
2014-08-23 07:36:01 -05:00
kpdecker
3ce105ae89
Fix undefined handling for pathed lookups
...
Fixes #837
2014-08-15 01:45:50 -05:00
kpdecker
f2b5519e76
Strip dead code from javascript compiler
2014-08-15 00:40:07 -05:00
kpdecker
cc5de5df3c
Fix compat partial exec without data
2014-08-15 00:38:23 -05:00
kpdecker
d05245b5f5
Make depthed lookup call non-literal
...
Prevents duplicate calls from being made.
2014-08-15 00:37:57 -05:00
kpdecker
3cea85b2b0
Drop unused DECLARE opcode
2014-08-14 12:27:02 -05:00
kpdecker
cb22ee5681
Increase test coverage a touch
2014-08-14 12:25:35 -05:00
kpdecker
9f8110fe15
Implement partial recursive lookup
2014-08-14 00:29:25 -05:00
kpdecker
0edce6e1d1
Inherit compat flag for partials
2014-08-14 00:29:25 -05:00
kpdecker
c98613b711
Implement recursive field lookup in compat mode
...
Provides the mustache behavior of recursive lookup without the use of depthed paths.
Note that this does incur a fairly dramatic performance penalty for depthed queries.
2014-08-13 20:46:42 -05:00
kpdecker
b695aaec7c
Use depths array rather than passing array args
...
Approximately doubles the throughput performance of depthed templates and clears the way for doing recursive path lookups in pathed mode.
2014-08-13 14:11:53 -05:00
kpdecker
f6dc5ad716
Create contextName helper for context lookup
2014-08-13 11:41:27 -05:00
kpdecker
e93d516672
Render indent for standalone partials
2014-08-12 14:41:58 -05:00
kpdecker
63c5eb7a82
Remove unused JSCompiler.register method
2014-08-11 20:10:12 -05:00
kpdecker
271106d43f
Do not lookup pathed helpers on the helper stack
...
Fixes #764
2014-07-12 12:50:54 -05:00
kpdecker
1fb7b51ee6
Fix rendering of paths that resolve to zero
...
Fixes #820
2014-07-12 11:43:45 -05:00
kpdecker
c90cfe247c
Use ID lookup for ambiguous helper evaluation
...
Final change for #731
2014-07-07 00:20:02 -05:00
kpdecker
b5a5c76ceb
Rework lookup null protector logic
...
- Move the lookup null protection out of `nameLookup` and into that contexts that are aware of the needs for falsy vs. not displayed values.
- Optimize lookup for nested path operations
Fixes #731
2014-07-06 23:41:15 -05:00
kpdecker
4aad72d223
Move lambda resolution to runtime
...
This has a very positive impact on precompiled output size, particularly for known-helpers cases, and little or no impact on the throughput numbers.
2014-07-06 12:53:01 -05:00
kpdecker
b79e31e5a5
Remove disassemble log statement
...
Fixes #772
2014-06-28 18:44:11 -07:00
kpdecker
55782f08c5
Fix evaluation of paths and subexprs
...
Fixes #743
2014-03-05 17:49:39 -06:00
Kevin Decker
7dd64e5e92
Merge pull request #749 from jenseng/option_subexpressions_fix
...
properly handle multiple subexpressions in the same hash, fixes #748
2014-03-05 14:38:26 -06:00
Jon Jensen
5999baf746
fix bug in IE<=8 (no Array::map), closes #751
...
looks like this broke in 2812fe27
also s/this.i/var i/, since the functions that needed it were removed in
a1edab6ef
2014-03-04 22:18:50 -07:00
Jon Jensen
8493822b62
properly handle multiple subexpressions in the same hash, fixes #748
...
push all hash params before popping any so as to avoid the last stackN var
stomping previous ones
2014-02-20 17:37:25 -06:00
kpdecker
16f135835e
Add support for depthed resolution of data fields
2014-02-09 18:35:22 -06:00
kpdecker
7a7ad74ff1
Optimize buffer generate first and all edge cases
2014-02-09 14:24:18 -06:00
Kevin Decker
bc8f6792e8
Merge pull request #729 from wycats/precompile-literal
...
Convert template spec to object literal
2014-02-08 20:01:52 -06:00
kpdecker
2812fe2775
Convert template spec to object literal
...
This allows for metadata to be associated with the template and a simplification of the template init logic.
2014-02-06 23:05:45 -08:00
kpdecker
b0e7298523
Remove unnecessary conditional
2014-02-06 23:01:43 -08:00
kpdecker
ace2896ec8
Add trackIds compiler flag
...
Allows helpers that care about where a particular field came from derive this data while maintaining backward compatibility with existing helpers.
2014-01-17 23:15:17 -06:00
kpdecker
33921beaa0
Fix missing parameters for pathed mustaches
...
Fixes #658
2014-01-17 23:09:59 -06:00
kpdecker
45ae86a248
Implement partial hash evaluation
2014-01-17 17:51:52 -06:00
Blake Embrey
13633e7896
Improve usefulness of extend util, properly use namespace property, update setup options to use a hash helper.
2014-01-16 21:24:26 +10:00
Kevin Decker
5659db4877
Merge pull request #634 from wycats/name-option
...
It would be great to have the helper name passed to `blockHelperMissing`
2014-01-15 08:42:32 -08:00
kpdecker
f650b0d69e
Expose the initial context via @root
2014-01-15 09:41:53 -06:00
kpdecker
d385e2cab6
Cleanup now unused code in jscompiler
2014-01-06 16:07:56 -06:00
kpdecker
0f328f375e
Include name option for all helper calls
...
All helper calls will have access to `options.name` which is the first id value of the mustache operation.
As part of this the helperMissing call has been simplified to remove the indexed name in order to optimize the call. This is a breaking change.
Fixes #634
2014-01-06 16:07:56 -06:00
kpdecker
daeecf825c
Track stringParams mode in local state vars
2014-01-06 02:55:13 -06:00
Blake Embrey
3d9685c6a2
Remove redundant conditions.
2014-01-05 12:14:24 -05:00
kpdecker
6d996ef270
Simplify ambiguous code
...
Remove if conditional in favor of boolean failover.
2014-01-04 09:19:58 -06:00
kpdecker
e0d0ad5027
Merge branch 'compiler-options' of github.com:blakeembrey/handlebars.js into blakeembrey-compiler-options
...
Conflicts:
lib/handlebars/compiler/javascript-compiler.js
2014-01-01 19:38:31 -06:00
kpdecker
3c85720137
Remove duplication from generated subexpressions
2014-01-01 18:59:21 -06:00