| 1 |
// Copyright 2008 Google Inc. All Rights Reserved. |
| 2 |
// Author: [email protected] (Antonio Vicente) |
| 3 |
// |
| 4 |
// Provides JS Compiler with parameters for the instrumentation pass |
| 5 |
|
| 6 |
syntax = "proto2"; |
| 7 |
|
| 8 |
package jscomp; |
| 9 |
|
| 10 |
option java_package = "com.google.javascript.jscomp"; |
| 11 |
option java_multiple_files = true; |
| 12 |
|
| 13 |
message Instrumentation { |
| 14 |
// name of function(ID = <numeric function id>); |
| 15 |
// used to inform the harness about the contents of a module |
| 16 |
optional string report_defined = 1; |
| 17 |
|
| 18 |
// name of function(ID = <numeric function id>); |
| 19 |
// used to inform the harness about a function call |
| 20 |
optional string report_call = 2; |
| 21 |
|
| 22 |
// name of function(ID = <numeric function id>, VAL = <return value>); |
| 23 |
// used to inform the harness about a function exit. Must return |
| 24 |
// its second argument. |
| 25 |
// |
| 26 |
// @returns VAL |
| 27 |
optional string report_exit = 6; |
| 28 |
|
| 29 |
// List of variable declarations in the application's source code |
| 30 |
// that should be replaced by variables with the same name that are |
| 31 |
// part of the instrumentation harness. The presence of these |
| 32 |
// declarations in the original code allows debug UIs that access |
| 33 |
// these variables to compile when the instrumentation pass is |
| 34 |
// disabled. |
| 35 |
repeated string declaration_to_remove = 3; |
| 36 |
|
| 37 |
// Definition of functions used to report module contents and |
| 38 |
// function calls. Will be added to the start of the app's main |
| 39 |
// module. |
| 40 |
repeated string init = 4; |
| 41 |
|
| 42 |
// name of function(<string>); |
| 43 |
// used to inform the harness about the app name |
| 44 |
optional string app_name_setter = 5; |
| 45 |
} |