diff options
32 files changed, 492 insertions, 31 deletions
diff --git a/src/asm2wasm-main.cpp b/src/asm2wasm-main.cpp index b2b490965..0edd82c2f 100644 --- a/src/asm2wasm-main.cpp +++ b/src/asm2wasm-main.cpp @@ -1,3 +1,19 @@ +/* + * Copyright 2015 WebAssembly Community Group participants + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + // // asm2wasm console tool // @@ -58,4 +74,3 @@ int main(int argc, char **argv) { if (debug) std::cerr << "done.\n"; } - diff --git a/src/asm2wasm.h b/src/asm2wasm.h index ca88fa883..8bed531de 100644 --- a/src/asm2wasm.h +++ b/src/asm2wasm.h @@ -1,3 +1,18 @@ +/* + * Copyright 2015 WebAssembly Community Group participants + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // // asm.js-to-WebAssembly translator. Uses the Emscripten optimizer @@ -1515,4 +1530,3 @@ void Asm2WasmBuilder::optimize() { } } // namespace wasm - diff --git a/src/asm_v_wasm.h b/src/asm_v_wasm.h index 1bf689802..c0a913dfe 100644 --- a/src/asm_v_wasm.h +++ b/src/asm_v_wasm.h @@ -1,3 +1,19 @@ +/* + * Copyright 2015 WebAssembly Community Group participants + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #ifndef _asm_v_wasm_h_ #define _asm_v_wasm_h_ @@ -67,4 +83,3 @@ std::string getSig(CallBase *call) { } // namespace wasm #endif // _asm_v_wasm_h_ - diff --git a/src/binaryen-shell.cpp b/src/binaryen-shell.cpp index 1dd2c1c7c..75a138c99 100644 --- a/src/binaryen-shell.cpp +++ b/src/binaryen-shell.cpp @@ -1,3 +1,18 @@ +/* + * Copyright 2015 WebAssembly Community Group participants + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // // A WebAssembly shell, loads a .wast file (WebAssembly in S-Expression format) @@ -344,4 +359,3 @@ int main(int argc, char **argv) { Colors::normal(std::cerr); } } - diff --git a/src/emscripten-optimizer/colors.h b/src/emscripten-optimizer/colors.h index 1746f7e79..6e2c6f7d8 100644 --- a/src/emscripten-optimizer/colors.h +++ b/src/emscripten-optimizer/colors.h @@ -1,3 +1,19 @@ +/* + * Copyright 2015 WebAssembly Community Group participants + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #include <unistd.h> #include <cstdlib> #include <ostream> @@ -57,4 +73,3 @@ namespace Colors { #endif } }; - diff --git a/src/emscripten-optimizer/istring.h b/src/emscripten-optimizer/istring.h index b77fec4e5..ffcec2fce 100644 --- a/src/emscripten-optimizer/istring.h +++ b/src/emscripten-optimizer/istring.h @@ -1,3 +1,19 @@ +/* + * Copyright 2015 WebAssembly Community Group participants + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + // Interned String type, 100% interned on creation. Comparisons are always just a pointer comparison #ifndef __istring_h__ @@ -158,4 +174,3 @@ public: } // namespace cashew #endif // __istring_h__ - diff --git a/src/emscripten-optimizer/optimizer-shared.cpp b/src/emscripten-optimizer/optimizer-shared.cpp index 7fe91eeab..4466fb0e9 100644 --- a/src/emscripten-optimizer/optimizer-shared.cpp +++ b/src/emscripten-optimizer/optimizer-shared.cpp @@ -1,3 +1,18 @@ +/* + * Copyright 2015 WebAssembly Community Group participants + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ #include "optimizer.h" @@ -232,4 +247,3 @@ Ref makeSigning(Ref node, AsmSign sign) { assert(sign == ASM_SIGNED || sign == ASM_UNSIGNED); return ValueBuilder::makeBinary(node, sign == ASM_SIGNED ? OR : TRSHIFT, ValueBuilder::makeNum(0)); } - diff --git a/src/emscripten-optimizer/optimizer.h b/src/emscripten-optimizer/optimizer.h index 6850214c2..5e4692f12 100644 --- a/src/emscripten-optimizer/optimizer.h +++ b/src/emscripten-optimizer/optimizer.h @@ -1,3 +1,18 @@ +/* + * Copyright 2015 WebAssembly Community Group participants + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ #ifndef __optimizer_h__ #define __optimizer_h__ @@ -143,4 +158,3 @@ cashew::Ref makeAsmCoercion(cashew::Ref node, AsmType type); cashew::Ref makeSigning(cashew::Ref node, AsmSign sign); #endif // __optimizer_h__ - diff --git a/src/emscripten-optimizer/parser.cpp b/src/emscripten-optimizer/parser.cpp index 06e455b0b..7005dc4b4 100644 --- a/src/emscripten-optimizer/parser.cpp +++ b/src/emscripten-optimizer/parser.cpp @@ -1,3 +1,18 @@ +/* + * Copyright 2015 WebAssembly Community Group participants + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ #include "parser.h" @@ -141,4 +156,3 @@ bool isIdentInit(char x) { return (x >= 'a' && x <= 'z') || (x >= 'A' && x <= 'Z bool isIdentPart(char x) { return isIdentInit(x) || (x >= '0' && x <= '9'); } } // namespace cashew - diff --git a/src/emscripten-optimizer/parser.h b/src/emscripten-optimizer/parser.h index 386195d77..2b2effcab 100644 --- a/src/emscripten-optimizer/parser.h +++ b/src/emscripten-optimizer/parser.h @@ -1,3 +1,19 @@ +/* + * Copyright 2015 WebAssembly Community Group participants + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + // Pure parsing. Calls methods on a Builder (template argument) to actually construct the AST // // XXX All parsing methods assume they take ownership of the input string. This lets them reuse @@ -912,4 +928,3 @@ public: } // namespace cashew #endif // __parser_h__ - diff --git a/src/emscripten-optimizer/simple_ast.cpp b/src/emscripten-optimizer/simple_ast.cpp index dcecab33d..285686b9a 100644 --- a/src/emscripten-optimizer/simple_ast.cpp +++ b/src/emscripten-optimizer/simple_ast.cpp @@ -1,3 +1,18 @@ +/* + * Copyright 2015 WebAssembly Community Group participants + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ #include "simple_ast.h" @@ -256,4 +271,3 @@ void traverseFunctions(Ref ast, std::function<void (Ref)> visit) { IStringSet ValueBuilder::statable("assign call binary unary-prefix name num conditional dot new sub seq string object array"); } // namespace cashew - diff --git a/src/emscripten-optimizer/simple_ast.h b/src/emscripten-optimizer/simple_ast.h index 5952eee72..d74321aa7 100644 --- a/src/emscripten-optimizer/simple_ast.h +++ b/src/emscripten-optimizer/simple_ast.h @@ -1,3 +1,18 @@ +/* + * Copyright 2015 WebAssembly Community Group participants + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ #ifndef __simple_ast_h__ #define __simple_ast_h__ @@ -1662,4 +1677,3 @@ public: } // namespace cashew #endif // __simple_ast_h__ - diff --git a/src/emscripten-optimizer/snprintf.h b/src/emscripten-optimizer/snprintf.h index 2792a23a2..8f4a690ca 100644 --- a/src/emscripten-optimizer/snprintf.h +++ b/src/emscripten-optimizer/snprintf.h @@ -1,3 +1,19 @@ +/* + * Copyright 2015 WebAssembly Community Group participants + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #include <stdarg.h> // Visual Studio does not support C99, so emulate snprintf support for it manually. diff --git a/src/js/wasm.js-post.js b/src/js/wasm.js-post.js index 7f7ca9c1e..f886076a9 100644 --- a/src/js/wasm.js-post.js +++ b/src/js/wasm.js-post.js @@ -1,3 +1,18 @@ +/* + * Copyright 2015 WebAssembly Community Group participants + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ function integrateWasmJS(Module) { // wasm.js has several methods for creating the compiled code module here: @@ -179,4 +194,3 @@ function integrateWasmJS(Module) { return wasmJS['asmExports']; }; } - diff --git a/src/mixed_arena.h b/src/mixed_arena.h index b2fbe06a6..83a8c6f52 100644 --- a/src/mixed_arena.h +++ b/src/mixed_arena.h @@ -1,3 +1,18 @@ +/* + * Copyright 2015 WebAssembly Community Group participants + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ #ifndef mixed_arena_h #define mixed_arena_h @@ -53,4 +68,3 @@ public: #endif #endif // mixed_arena_h - diff --git a/src/parsing.h b/src/parsing.h index 59e8fc5ae..6d1b60c01 100644 --- a/src/parsing.h +++ b/src/parsing.h @@ -1,3 +1,18 @@ +/* + * Copyright 2015 WebAssembly Community Group participants + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ #include <sstream> @@ -150,4 +165,3 @@ Expression* parseConst(cashew::IString s, WasmType type, MixedArena& allocator) } // namespace wasm - diff --git a/src/pass.cpp b/src/pass.cpp index fe147891c..63b1a7869 100644 --- a/src/pass.cpp +++ b/src/pass.cpp @@ -1,3 +1,18 @@ +/* + * Copyright 2015 WebAssembly Community Group participants + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ #include <pass.h> @@ -76,4 +91,3 @@ PassRunner::~PassRunner() { } } // namespace wasm - diff --git a/src/pass.h b/src/pass.h index 6af9e83e1..cde9448ae 100644 --- a/src/pass.h +++ b/src/pass.h @@ -1,3 +1,18 @@ +/* + * Copyright 2015 WebAssembly Community Group participants + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ #include <functional> @@ -107,4 +122,3 @@ private: }; } // namespace wasm - diff --git a/src/passes/LowerIfElse.cpp b/src/passes/LowerIfElse.cpp index 1b8376ea4..711f5469c 100644 --- a/src/passes/LowerIfElse.cpp +++ b/src/passes/LowerIfElse.cpp @@ -1,3 +1,19 @@ +/* + * Copyright 2015 WebAssembly Community Group participants + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + // // Lowers if (x) y else z into // @@ -46,4 +62,3 @@ struct LowerIfElse : public Pass { static RegisterPass<LowerIfElse> registerPass("lower-if-else", "lowers if-elses into ifs, blocks and branches"); } // namespace wasm - diff --git a/src/passes/NameManager.cpp b/src/passes/NameManager.cpp index 34ea6adac..8ed29c478 100644 --- a/src/passes/NameManager.cpp +++ b/src/passes/NameManager.cpp @@ -1,3 +1,19 @@ +/* + * Copyright 2015 WebAssembly Community Group participants + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + // // NameManager // @@ -62,4 +78,3 @@ void NameManager::visitExport(Export* curr) { static RegisterPass<NameManager> registerPass("name-manager", "utility pass to manage names in modules"); } // namespace wasm - diff --git a/src/passes/RemoveImports.cpp b/src/passes/RemoveImports.cpp index 561002f57..44b7fc1ed 100644 --- a/src/passes/RemoveImports.cpp +++ b/src/passes/RemoveImports.cpp @@ -1,3 +1,19 @@ +/* + * Copyright 2015 WebAssembly Community Group participants + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + // // Removeds imports, and replaces them with nops. This is useful // for running a module through the reference interpreter, which @@ -40,4 +56,3 @@ struct RemoveImports : public Pass { static RegisterPass<RemoveImports> registerPass("remove-imports", "removes imports and replaces them with nops"); } // namespace wasm - diff --git a/src/pretty_printing.h b/src/pretty_printing.h index 7389ad97f..86865231a 100644 --- a/src/pretty_printing.h +++ b/src/pretty_printing.h @@ -1,3 +1,18 @@ +/* + * Copyright 2015 WebAssembly Community Group participants + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // // Pretty printing helpers @@ -76,4 +91,3 @@ inline std::ostream& printMinorOpening(std::ostream &o, const char *str) { } #endif // _pretty_printing_h - diff --git a/src/s2wasm-main.cpp b/src/s2wasm-main.cpp index 0df9b204a..247974fee 100644 --- a/src/s2wasm-main.cpp +++ b/src/s2wasm-main.cpp @@ -1,3 +1,19 @@ +/* + * Copyright 2015 WebAssembly Community Group participants + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + // // wasm2asm console tool // @@ -45,4 +61,3 @@ int main(int argc, char **argv) { if (debug) std::cerr << "done.\n"; } - diff --git a/src/s2wasm.h b/src/s2wasm.h index 71b17fc5b..fea5f04a8 100644 --- a/src/s2wasm.h +++ b/src/s2wasm.h @@ -1,3 +1,18 @@ +/* + * Copyright 2015 WebAssembly Community Group participants + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // // .s to WebAssembly translator. @@ -1030,4 +1045,3 @@ public: }; } // namespace wasm - diff --git a/src/shared-constants.h b/src/shared-constants.h index a67475303..b4ea7869f 100644 --- a/src/shared-constants.h +++ b/src/shared-constants.h @@ -1,3 +1,19 @@ +/* + * Copyright 2015 WebAssembly Community Group participants + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #ifndef _shared_constants_h_ #define _shared_constants_h_ @@ -72,4 +88,3 @@ cashew::IString GLOBAL("global"), } #endif // _shared_constants_h_ - diff --git a/src/wasm-interpreter.h b/src/wasm-interpreter.h index 4a04c6912..94077c00a 100644 --- a/src/wasm-interpreter.h +++ b/src/wasm-interpreter.h @@ -1,3 +1,18 @@ +/* + * Copyright 2015 WebAssembly Community Group participants + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // // Simple WebAssembly interpreter. This operates directly on the AST, @@ -767,4 +782,3 @@ private: }; } // namespace wasm - diff --git a/src/wasm-js.cpp b/src/wasm-js.cpp index 6858659f6..477c772ec 100644 --- a/src/wasm-js.cpp +++ b/src/wasm-js.cpp @@ -1,3 +1,18 @@ +/* + * Copyright 2015 WebAssembly Community Group participants + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // // WebAssembly intepreter for asm2wasm output, in a js environment. @@ -284,4 +299,3 @@ extern "C" void EMSCRIPTEN_KEEPALIVE call_from_js(const char *target) { else if (ret.type == f64) EM_ASM_({ Module['tempReturn'] = $0 }, ret.f64); else abort(); } - diff --git a/src/wasm-s-parser.h b/src/wasm-s-parser.h index 6061dacc5..a48f4bd9e 100644 --- a/src/wasm-s-parser.h +++ b/src/wasm-s-parser.h @@ -1,3 +1,18 @@ +/* + * Copyright 2015 WebAssembly Community Group participants + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // // Parses WebAssembly code in S-Expression format, as in .wast files @@ -1004,4 +1019,3 @@ private: }; } // namespace wasm - diff --git a/src/wasm-validator.h b/src/wasm-validator.h index 4daf9a4a7..c756c4b0d 100644 --- a/src/wasm-validator.h +++ b/src/wasm-validator.h @@ -1,3 +1,18 @@ +/* + * Copyright 2015 WebAssembly Community Group participants + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // // Simple WebAssembly module validator. @@ -115,4 +130,3 @@ private: }; } // namespace wasm - diff --git a/src/wasm.h b/src/wasm.h index af3917744..d51b1ea4d 100644 --- a/src/wasm.h +++ b/src/wasm.h @@ -1,3 +1,18 @@ +/* + * Copyright 2015 WebAssembly Community Group participants + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // // wasm.h: WebAssembly representation and processing library, in one @@ -1358,4 +1373,3 @@ struct WasmWalker : public WasmVisitor<void> { } // namespace wasm #endif // __wasm_h__ - diff --git a/src/wasm2asm-main.cpp b/src/wasm2asm-main.cpp index 19aa83e2d..12a802107 100644 --- a/src/wasm2asm-main.cpp +++ b/src/wasm2asm-main.cpp @@ -1,3 +1,19 @@ +/* + * Copyright 2015 WebAssembly Community Group participants + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + // // wasm2asm console tool // @@ -57,4 +73,3 @@ int main(int argc, char **argv) { if (debug) std::cerr << "done.\n"; } - diff --git a/src/wasm2asm.h b/src/wasm2asm.h index b256a63c5..6edc8fd82 100644 --- a/src/wasm2asm.h +++ b/src/wasm2asm.h @@ -1,3 +1,18 @@ +/* + * Copyright 2015 WebAssembly Community Group participants + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // // WebAssembly-to-asm.js translator. Uses the Emscripten optimizer @@ -990,4 +1005,3 @@ Ref Wasm2AsmBuilder::processFunctionBody(Expression* curr, IString result) { } } // namespace wasm - |