aboutsummaryrefslogtreecommitdiff
path: root/var.go
Commit message (Collapse)AuthorAgeFilesLines
* [go] simpleVar has []string to make append fasterFumitoshi Ukai2015-07-151-23/+29
|
* [go] backport [C++] Record environment variables usedFumitoshi Ukai2015-07-141-0/+7
| | | | | | commit 5217658b199521f5f8947a7cac467b62d8f59b32 different from C++, emit environment variable name sorted.
* use sync.Pool for evalBuffer and wordBufferFumitoshi Ukai2015-07-091-8/+8
|
* introduce evalWriterFumitoshi Ukai2015-07-071-9/+11
| | | | merge ssvWriter into buffer
* fix unmatched_paren.mkFumitoshi Ukai2015-07-031-4/+4
|
* fix autovar_assign.mkFumitoshi Ukai2015-07-021-7/+15
| | | | | | | $(eval x+=$(x)) in $(foreach) will leave origin "file" variable. but if it didn't assign by $(eval) in $(foreach), foreach's loop variable will be restored.
* fix override_override.mk and export_export.mkFumitoshi Ukai2015-06-301-6/+26
|
* fix panic based error reportingFumitoshi Ukai2015-06-261-55/+85
|
* unexport Func and ExprFumitoshi Ukai2015-06-251-8/+8
|
* unexport serialize/deserializeFumitoshi Ukai2015-06-251-18/+18
|
* unexport *VarFumitoshi Ukai2015-06-251-55/+55
|
* fix TestParaFumitoshi Ukai2015-06-251-4/+4
| | | | unexport ValueType*
* go gettable for github.com/google/katiFumitoshi Ukai2015-06-251-1/+1
|
* reduce runtime.concatstrings in SimpleVar.AppendVarFumitoshi Ukai2015-06-191-2/+6
|
* split SimpleVar to SimpleVar and AutomaticVarFumitoshi Ukai2015-06-181-7/+46
| | | | SimpleVar uses string, while AutomaticVar uses []byte
* reduce runtime.newobject in Vars.saveFumitoshi Ukai2015-06-181-2/+1
|
* reduce convT2IFumitoshi Ukai2015-06-181-3/+4
| | | | | don't use Vars.Lookup in Vars.Assign Vars.Lookup may need to convert UndefinedVar to Var
* reduce runtime.convT2I -> runtime.newobject -> runtime.mallocgcFumitoshi Ukai2015-06-181-29/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-3/+3
|
* Add LICENSE and licence headersShinichiro Hamaji2015-06-101-0/+14
|
* fix go lint (except comment on exported fields, error message with punct)Fumitoshi Ukai2015-06-081-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ast.go:70:1: comment on exported type MaybeRuleAST should be of the form "MaybeRuleAST ..." (with optional leading article) eval.go:241:1: comment on exported method Evaluator.EvaluateVar should be of the form "EvaluateVar ..." eval.go:14:2: don't use ALL_CAPS in Go names; use CamelCase eval.go:15:2: don't use ALL_CAPS in Go names; use CamelCase eval.go:16:2: don't use ALL_CAPS in Go names; use CamelCase eval.go:431:2: don't use underscores in Go names; var makefile_list should be makefileList main.go:29:2: var loadJson should be loadJSON main.go:30:2: var saveJson should be saveJSON ninja.go:19:2: struct field ruleId should be ruleID para.go:15:9: if block ends with a return statement, so drop this else and outdent its block para_test.go:21:2: don't use underscores in Go names; var num_tasks should be numTasks parser.go:713:1: error should be the last type when returning multiple items serialize.go:20:2: don't use ALL_CAPS in Go names; use CamelCase serialize.go:21:2: don't use ALL_CAPS in Go names; use CamelCase serialize.go:22:2: don't use ALL_CAPS in Go names; use CamelCase serialize.go:23:2: don't use ALL_CAPS in Go names; use CamelCase serialize.go:24:2: don't use ALL_CAPS in Go names; use CamelCase serialize.go:25:2: don't use ALL_CAPS in Go names; use CamelCase serialize.go:26:2: don't use ALL_CAPS in Go names; use CamelCase serialize.go:27:2: don't use ALL_CAPS in Go names; use CamelCase serialize.go:28:2: don't use ALL_CAPS in Go names; use CamelCase serialize.go:29:2: don't use ALL_CAPS in Go names; use CamelCase serialize.go:30:2: don't use ALL_CAPS in Go names; use CamelCase serialize.go:31:2: don't use ALL_CAPS in Go names; use CamelCase serialize.go:32:2: don't use ALL_CAPS in Go names; use CamelCase serialize.go:230:6: func DumpDepGraphAsJson should be DumpDepGraphAsJSON serialize.go:553:6: func LoadDepGraphFromJson should be LoadDepGraphFromJSON serialize.go:437:9: if block ends with a return statement, so drop this else and outdent its block var.go:174:1: receiver name should not be an underscore var.go:175:1: receiver name should not be an underscore var.go:176:1: receiver name should not be an underscore var.go:177:1: receiver name should not be an underscore var.go:178:1: receiver name should not be an underscore var.go:180:1: receiver name should not be an underscore var.go:183:1: receiver name should not be an underscore var.go:187:1: receiver name should not be an underscore var.go:191:1: receiver name should not be an underscore
* Use Value in AssignASTShinichiro Hamaji2015-06-041-5/+5
|
* Do not use gob to create unqiue ID for each varsShinichiro Hamaji2015-05-151-0/+19
| | | | Now serialization is 5 times faster (41 secs => 8 secs).
* Re-format codeShinichiro Hamaji2015-04-281-5/+5
|
* Start implementing deserializerShinichiro Hamaji2015-04-281-1/+4
|
* Make it possible to serialize varsShinichiro Hamaji2015-04-281-0/+21
|
* RecursiveVar Append doesn't reprase old value.Fumitoshi Ukai2015-04-191-6/+13
|
* Fix the implementation of target specific variablesShinichiro Hamaji2015-04-161-0/+36
|
* change newOldVar to Vars.saveFumitoshi Ukai2015-04-151-16/+11
|
* hmmShinichiro Hamaji2015-04-151-0/+26
|
* Do not copy variables for target specific variablesShinichiro Hamaji2015-04-121-0/+20
| | | | | | 167.22user 131.10system 5:27.42elapsed 91%CPU (1355792maxresident)k => 91.34user 122.72system 3:52.62elapsed 92%CPU (1180900maxresident)k repo/android.sh time kati --kati_cpuprofile=kati.prof -n
* Remove VarTab to make exec fasterShinichiro Hamaji2015-04-121-39/+8
|
* Use SimpleVar.value as the buffer in AppendShinichiro Hamaji2015-04-111-3/+2
|
* Use []byte instead of string for SimpleVarShinichiro Hamaji2015-04-111-7/+6
|
* rewrite call and foreachFumitoshi Ukai2015-04-111-0/+1
| | | | | | | | | | | | | | | | | | | | before: % ./run_integration_test.rb android tar -xzf ../android.tgz Running make for android... 6.05 secs Running kati for android... 64.08 secs android: OK PASS! after: % ./run_integration_test.rb android tar -xzf ../android.tgz Running make for android... 5.76 secs Running kati for android... 41.54 secs android: OK PASS!
* split expression parser and evaluatorFumitoshi Ukai2015-04-101-16/+37
|
* Stop using VarTab in eval.goShinichiro Hamaji2015-04-091-4/+17
| | | | 32 secs => 30 secs
* support command line varsFumitoshi Ukai2015-04-081-0/+8
|
* Fix foreach which conflicts with a local variableShinichiro Hamaji2015-04-071-0/+4
|
* Partially implement $(origin)Shinichiro Hamaji2015-04-041-1/+1
|
* fix var_append.mkFumitoshi Ukai2015-04-021-6/+21
|
* fix flavorFumitoshi Ukai2015-04-021-0/+85
introduce Var and VarTab