Index: src/runtime/runtime-test.cc |
diff --git a/src/runtime/runtime-test.cc b/src/runtime/runtime-test.cc |
index 36d359712e541066ca24dd8c81cece0be4121909..db173ebe8d3dd6dd4f3c1e407b3cffbbcbc9b6b7 100644 |
--- a/src/runtime/runtime-test.cc |
+++ b/src/runtime/runtime-test.cc |
@@ -622,6 +622,22 @@ RUNTIME_FUNCTION(Runtime_InNewSpace) { |
return isolate->heap()->ToBoolean(isolate->heap()->InNewSpace(obj)); |
} |
+RUNTIME_FUNCTION(Runtime_IsAsmWasmCode) { |
+ SealHandleScope shs(isolate); |
+ DCHECK(args.length() == 1); |
+ CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0); |
+ |
+ if (!function->shared()->HasAsmWasmData()) { |
+ // Doesn't have wasm data. |
+ return isolate->heap()->ToBoolean(false); |
+ } |
+ if (function->code() != |
Michael Starzinger
2016/08/12 09:21:56
Lets just test function->shared()->code() here. Th
bradn
2016/08/12 18:50:02
Done.
|
+ isolate->builtins()->builtin(Builtins::kInstantiateAsmJs)) { |
+ // Hasn't been compiled yet. |
+ return isolate->heap()->ToBoolean(false); |
+ } |
+ return isolate->heap()->ToBoolean(true); |
+} |
#define ELEMENTS_KIND_CHECK_RUNTIME_FUNCTION(Name) \ |
RUNTIME_FUNCTION(Runtime_Has##Name) { \ |