Changeset 1699
- Timestamp:
- 10/21/08 20:06:10 (3 months ago)
- Location:
- cobra/trunk
- Files:
-
- 1 added
- 5 modified
-
Developer/IntermediateReleaseNotes.text (modified) (1 diff)
-
Source/CommandLine.cobra (modified) (3 diffs)
-
Source/SharpGenerator.cobra (modified) (3 diffs)
-
Source/Statements.cobra (modified) (1 diff)
-
Tests/700-command-line/601-include-traces.cobra (added)
-
Tests/700-command-line/602-turbo.cobra (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
cobra/trunk/Developer/IntermediateReleaseNotes.text
r1683 r1699 73 73 parenthesised expressions. 74 74 75 * Add compile option -include-traces default value yes to allow compile time suppression of any trace code. 76 75 77 * Added a new built-in doc tool accessible via "cobra -doc ...". The documentation is generated to local HTML files using your declarations, doc strings, contracts, etc. 76 78 -
cobra/trunk/Source/CommandLine.cobra
r1698 r1699 154 154 }, 155 155 { 156 'name': 'include-traces', 157 'type': 'bool', 158 'default': 'yes', 159 'description': 'Includes trace statements in the output assembly.', 160 }, 161 { 156 162 'name': 'keep-intermediate-files', 157 163 'synonyms': ['kif'], … … 278 284 { 279 285 'name': 'turbo', 280 'description': 'Maximum run-time performance. This is a convenience for -contracts:none -include-asserts:no -include-nil-checks:no -include-tests:no - optimize',286 'description': 'Maximum run-time performance. This is a convenience for -contracts:none -include-asserts:no -include-nil-checks:no -include-tests:no -include-traces:no -optimize', 281 287 'type': 'bool', 282 288 }, … … 937 943 options['include-nil-checks'] = false 938 944 options['include-tests'] = false 945 options['include-traces'] = false 939 946 options['optimize'] = true 940 947 -
cobra/trunk/Source/SharpGenerator.cobra
r1693 r1699 2657 2657 def writeSharpDef(sw as SharpWriter) 2658 2658 base.writeSharpDef(sw) 2659 sw.write('CobraCore.Tracer.Trace([.sharpSourceSite]);\n') 2659 if .includeTraces 2660 sw.write('CobraCore.Tracer.Trace([.sharpSourceSite]);\n') 2660 2661 2661 2662 … … 2665 2666 def writeSharpDef(sw as SharpWriter) 2666 2667 base.writeSharpDef(sw) 2667 sw.write('CobraCore.Tracer.Trace([.sharpSourceSite], "this", [_codePart.sharpThis]') 2668 for param in _codePart.params 2669 sw.write(', "[param.name]", [param.sharpName]') 2670 for local in _codePart.locals 2671 sw.write(', "[local.name]", [local.sharpName]') 2672 sw.write(');\n') 2668 if .includeTraces 2669 sw.write('CobraCore.Tracer.Trace([.sharpSourceSite], "this", [_codePart.sharpThis]') 2670 for param in _codePart.params 2671 sw.write(', "[param.name]", [param.sharpName]') 2672 for local in _codePart.locals 2673 sw.write(', "[local.name]", [local.sharpName]') 2674 sw.write(');\n') 2673 2675 2674 2676 … … 2678 2680 def writeSharpDef(sw as SharpWriter) 2679 2681 base.writeSharpDef(sw) 2680 sw.write('CobraCore.Tracer.Trace([.sharpSourceSite]') 2681 sep = ', ' 2682 for expr in _exprs 2683 sw.write('[sep][Utils.sharpStringLiteralFor(expr.toCobraSource)][sep]') 2684 expr.writeSharpDef(sw, false) 2685 sw.write(');\n') 2682 if .includeTraces 2683 sw.write('CobraCore.Tracer.Trace([.sharpSourceSite]') 2684 sep = ', ' 2685 for expr in _exprs 2686 sw.write('[sep][Utils.sharpStringLiteralFor(expr.toCobraSource)][sep]') 2687 expr.writeSharpDef(sw, false) 2688 sw.write(');\n') 2686 2689 2687 2690 -
cobra/trunk/Source/Statements.cobra
r1656 r1699 950 950 _codePart = codePart 951 951 952 def includeTraces as bool 953 return .compiler.options.boolValue('include-traces') 954 952 955 953 956 class TraceLocationStmt -
cobra/trunk/Tests/700-command-line/602-turbo.cobra
r1371 r1699 5 5 def main is shared 6 6 assert false 7 trace 8 x = 1 9 trace all 10 trace x
