aboutsummaryrefslogtreecommitdiffstats
path: root/expr_test.go
Commit message (Collapse)AuthorAgeFilesLines
* fix unmatched_paren.mkFumitoshi Ukai2015-07-031-1/+1
|
* fix TODO in value.mkFumitoshi Ukai2015-06-301-2/+11
|
* unexport Func and ExprFumitoshi Ukai2015-06-251-5/+5
|
* go gettable for github.com/google/katiFumitoshi Ukai2015-06-251-1/+1
|
* reduce runtime.convT2I -> runtime.newobject -> runtime.mallocgcFumitoshi Ukai2015-06-181-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | conversion from value to interface is more expensive than conversion from pointer to interface. package main import "testing" type I interface { String() string } type val struct { s string } func (v val) String() string { return v.s } type ptr struct { s string } func (p *ptr) String() string { return p.s } func BenchmarkT2IForValue(b *testing.B) { var intf I for i := 0; i < b.N; i++ { intf = val{"abc"} } _ = intf } func BenchmarkT2IForPtr(b *testing.B) { var intf I for i := 0; i < b.N; i++ { intf = &ptr{"abc"} } _ = intf } % go test -bench . a_test.go testing: warning: no tests to run PASS BenchmarkT2IForValue 20000000 90.9 ns/op BenchmarkT2IForPtr 20000000 76.8 ns/op ok command-line-arguments 3.539s
* parseExpr less allocationFumitoshi Ukai2015-06-181-1/+1
|
* Add LICENSE and licence headersShinichiro Hamaji2015-06-101-0/+14
|
* Revert "Revert "fix: handle $(eval foo := $(var)) case""Fumitoshi Ukai2015-04-281-26/+32
| | | | | | This reverts commit 5fbd0bdf4551af6b9233a0d52e1138cfba882a93. rhs should trim left after 1st eval
* Revert "fix: handle $(eval foo := $(var)) case"Shinichiro Hamaji2015-04-271-32/+26
| | | | | | | | | | | | | | | | This reverts commit ca9183b18f7445419d67913328f605a0ec5e0288. Repro step: $ ./repo/android.sh time kati -n ... including ./system/vold/Android.mk ... including ./tools/external/fat32lib/Android.mk ... build/core/prebuilt_internal.mk:258: warning: overriding commands for target "javalib.jar" build/core/prebuilt_internal.mk:0: warning: ignoring old commands for target "javalib.jar" build/core/prebuilt_internal.mk:258: warning: overriding commands for target "javalib.jar" build/core/prebuilt_internal.mk:0: warning: ignoring old commands for target "javalib.jar" ...
* fix: handle $(eval foo := $(var)) caseFumitoshi Ukai2015-04-221-26/+32
|
* Revert "handle $(eval foo := $(var)) case"Shinichiro Hamaji2015-04-211-24/+26
| | | | This reverts commit dd61922705d1da096e6724f2a63649978913902d.
* add paramref for fast path for param access (e.g. $1, $(1))Fumitoshi Ukai2015-04-191-0/+22
| | | | | | | | | | | | | | | | still set "1" in Vars, for access like n := 1 v := $($(n)) fix to set $0 to variable name in $(call ) after: % ./run_integration_test.rb android Running make for android... 5.62 secs Running kati for android... 10.89 secs android: OK PASS!
* handle $(eval foo := $(var)) caseFumitoshi Ukai2015-04-171-0/+10
| | | | | | | | | | | | | | | | | | before: % ./run_integration_test.rb android Running make for android... 5.84 secs Running kati for android... 18.94 secs android: OK PASS! after: % ./run_integration_test.rb android Running make for android... 5.83 secs Running kati for android... 16.83 secs android: OK PASS!
* compact $(eval foo := bar) to internal assign func.Fumitoshi Ukai2015-04-161-0/+16
| | | | | | | | | | | | | | | | | | before: % ./run_integration_test.rb android Running make for android... 5.83 secs Running kati for android... 18.61 secs android: OK PASS! after: % ./run_integration_test.rb android Running make for android... 5.79 secs Running kati for android... 17.96 secs android: OK PASS!
* introduce func compactor.Fumitoshi Ukai2015-04-161-0/+6
| | | | $(eval ## comment) will be nop when parsed.
* remove trimSpace and inFunc from parseExpr.Fumitoshi Ukai2015-04-161-0/+41
| | | | handled these in parseFunc.
* change f.closure.args[0] has "(funcname", or "{funcname".Fumitoshi Ukai2015-04-161-8/+8
| | | | | | | remove f.closure.expr fclosure.String would not be called so often now (except debug logging?), and keeping expr would require lots of memory.
* preserve func expression to make Func.String() faster.Fumitoshi Ukai2015-04-101-1/+9
| | | | | | | | | | | | | | | | | | | | | | maybe better to revisit it's worth doing. before: % ./run_integration_test.rb android tar -xzf ../android.tgz Running make for android... 5.78 secs Running kati for android... 62.50 secs android: OK PASS! after: % ./run_integration_test.rb android tar -xzf ../android.tgz Running make for android... 5.85 secs Running kati for android... 61.93 secs android: OK PASS!
* split expression parser and evaluatorFumitoshi Ukai2015-04-101-0/+174