Skip to content

Fix the license headers #22

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 21, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion src/asm2wasm-main.cpp
Original file line number Diff line number Diff line change
@@ -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
//
Expand Down Expand Up @@ -58,4 +74,3 @@ int main(int argc, char **argv) {

if (debug) std::cerr << "done.\n";
}

16 changes: 15 additions & 1 deletion src/asm2wasm.h
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -1515,4 +1530,3 @@ void Asm2WasmBuilder::optimize() {
}

} // namespace wasm

17 changes: 16 additions & 1 deletion src/asm_v_wasm.h
Original file line number Diff line number Diff line change
@@ -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_

Expand Down Expand Up @@ -67,4 +83,3 @@ std::string getSig(CallBase *call) {
} // namespace wasm

#endif // _asm_v_wasm_h_

16 changes: 15 additions & 1 deletion src/binaryen-shell.cpp
Original file line number Diff line number Diff line change
@@ -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)
Expand Down Expand Up @@ -344,4 +359,3 @@ int main(int argc, char **argv) {
Colors::normal(std::cerr);
}
}

17 changes: 16 additions & 1 deletion src/emscripten-optimizer/colors.h
Original file line number Diff line number Diff line change
@@ -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>
Expand Down Expand Up @@ -57,4 +73,3 @@ namespace Colors {
#endif
}
};

17 changes: 16 additions & 1 deletion src/emscripten-optimizer/istring.h
Original file line number Diff line number Diff line change
@@ -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__
Expand Down Expand Up @@ -158,4 +174,3 @@ class IOrderedStringSet : public std::set<IString> {
} // namespace cashew

#endif // __istring_h__

16 changes: 15 additions & 1 deletion src/emscripten-optimizer/optimizer-shared.cpp
Original file line number Diff line number Diff line change
@@ -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"

Expand Down Expand Up @@ -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));
}

16 changes: 15 additions & 1 deletion src/emscripten-optimizer/optimizer.h
Original file line number Diff line number Diff line change
@@ -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__
Expand Down Expand Up @@ -143,4 +158,3 @@ cashew::Ref makeAsmCoercion(cashew::Ref node, AsmType type);
cashew::Ref makeSigning(cashew::Ref node, AsmSign sign);

#endif // __optimizer_h__

16 changes: 15 additions & 1 deletion src/emscripten-optimizer/parser.cpp
Original file line number Diff line number Diff line change
@@ -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"

Expand Down Expand Up @@ -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

17 changes: 16 additions & 1 deletion src/emscripten-optimizer/parser.h
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -912,4 +928,3 @@ class Parser {
} // namespace cashew

#endif // __parser_h__

16 changes: 15 additions & 1 deletion src/emscripten-optimizer/simple_ast.cpp
Original file line number Diff line number Diff line change
@@ -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"

Expand Down Expand Up @@ -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

16 changes: 15 additions & 1 deletion src/emscripten-optimizer/simple_ast.h
Original file line number Diff line number Diff line change
@@ -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__
Expand Down Expand Up @@ -1662,4 +1677,3 @@ class DotZeroValueBuilder : public ValueBuilder {
} // namespace cashew

#endif // __simple_ast_h__

16 changes: 16 additions & 0 deletions src/emscripten-optimizer/snprintf.h
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
16 changes: 15 additions & 1 deletion src/js/wasm.js-post.js
Original file line number Diff line number Diff line change
@@ -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:
Expand Down Expand Up @@ -179,4 +194,3 @@ function integrateWasmJS(Module) {
return wasmJS['asmExports'];
};
}

16 changes: 15 additions & 1 deletion src/mixed_arena.h
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -53,4 +68,3 @@ class AllocatingModule : public Module {
#endif

#endif // mixed_arena_h

16 changes: 15 additions & 1 deletion src/parsing.h
Original file line number Diff line number Diff line change
@@ -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>

Expand Down Expand Up @@ -150,4 +165,3 @@ Expression* parseConst(cashew::IString s, WasmType type, MixedArena& allocator)


} // namespace wasm

Loading