Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(361)

Unified Diff: src/asmjs/asm-names.h

Issue 2751693002: [wasm][asm.js] Adding custom asm.js lexer. (Closed)
Patch Set: fix warning Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/asmjs/asm-names.h
diff --git a/src/asmjs/asm-names.h b/src/asmjs/asm-names.h
new file mode 100644
index 0000000000000000000000000000000000000000..7921910c20a8b1c1f3ef592990f36b66548ba526
--- /dev/null
+++ b/src/asmjs/asm-names.h
@@ -0,0 +1,89 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef V8_ASMJS_ASM_NAMES_H_
+#define V8_ASMJS_ASM_NAMES_H_
+
+#define STDLIB_MATH_VALUE_LIST(V) \
+ V(E) \
+ V(LN10) \
+ V(LN2) \
+ V(LOG2E) \
+ V(LOG10E) \
+ V(PI) \
+ V(SQRT1_2) \
+ V(SQRT2)
+
+#define STDLIB_MATH_FUNCTION_MONOMORPHIC_LIST(V) \
Karl 2017/03/14 18:00:47 Consider adding a comment describing what each par
bradn 2017/03/15 07:53:04 Done.
+ V(acos, Acos, kExprF64Acos, dq2d) \
+ V(asin, Asin, kExprF64Asin, dq2d) \
+ V(atan, Atan, kExprF64Atan, dq2d) \
+ V(cos, Cos, kExprF64Cos, dq2d) \
+ V(sin, Sin, kExprF64Sin, dq2d) \
+ V(tan, Tan, kExprF64Tan, dq2d) \
+ V(exp, Exp, kExprF64Exp, dq2d) \
+ V(log, Log, kExprF64Log, dq2d) \
+ V(atan2, Atan2, kExprF64Atan2, dqdq2d) \
+ V(pow, Pow, kExprF64Pow, dqdq2d) \
+ V(imul, Imul, kExprI32Mul, ii2s) \
+ V(clz32, Clz32, kExprI32Clz, i2s)
+
+#define STDLIB_MATH_FUNCTION_CEIL_LIKE_LIST(V) \
+ V(ceil, Ceil, x, ceil_like) \
+ V(floor, Floor, x, ceil_like) \
+ V(sqrt, Sqrt, x, ceil_like)
+
+#define STDLIB_MATH_FUNCTION_LIST(V) \
+ V(min, Min, x, minmax) \
+ V(max, Max, x, minmax) \
+ V(abs, Abs, x, abs) \
+ V(fround, Fround, x, fround) \
+ STDLIB_MATH_FUNCTION_MONOMORPHIC_LIST(V) \
+ STDLIB_MATH_FUNCTION_CEIL_LIKE_LIST(V)
+
+#define STDLIB_ARRAY_TYPE_LIST(V) \
+ V(Int8Array, Mem8S, Mem8, I32) \
+ V(Uint8Array, Mem8U, Mem8, I32) \
+ V(Int16Array, Mem16S, Mem16, I32) \
+ V(Uint16Array, Mem16U, Mem16, I32) \
+ V(Int32Array, Mem, Mem, I32) \
+ V(Uint32Array, Mem, Mem, I32) \
+ V(Float32Array, Mem, Mem, F32) \
+ V(Float64Array, Mem, Mem, F64)
+
+#define STDLIB_OTHER_LIST(V) \
+ V(Infinity) \
+ V(NaN) \
+ V(Math)
+
+#define KEYWORD_NAME_LIST(V) \
+ V(arguments) \
+ V(break) \
+ V(case) \
+ V(const) \
+ V(continue) \
+ V(default) \
+ V(do) \
+ V(else) \
+ V(eval) \
+ V(for) \
+ V(function) \
+ V(if) \
+ V(new) \
+ V(return ) \
marja 2017/03/14 11:11:48 Nit: extra space?
bradn 2017/03/15 07:53:04 Done.
+ V(switch) \
+ V(var) \
+ V(while)
+
+#define LONG_SYMBOL_NAME_LIST(V) \
+ V("<=", LE) \
+ V(">=", GE) \
+ V("==", EQ) \
+ V("!=", NE) \
+ V("<<", SHL) \
+ V(">>", SAR) \
+ V(">>>", SHR) \
+ V("'use asm'", UseAsm)
+
+#endif

Powered by Google App Engine
This is Rietveld 408576698