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

Unified Diff: src/runtime/runtime-test.cc

Issue 2562003002: [wasm] Remove obsolete %IsNotAsmWasmCode predicate. (Closed)
Patch Set: Created 4 years 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
« no previous file with comments | « src/runtime/runtime.h ('k') | test/mjsunit/asm/asm-validation.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-test.cc
diff --git a/src/runtime/runtime-test.cc b/src/runtime/runtime-test.cc
index 60603aa546d9e46784c8ee2cb665b80735478a5e..2d331c9e83ee094cdaa91d9cd9c3225c5eba0906 100644
--- a/src/runtime/runtime-test.cc
+++ b/src/runtime/runtime-test.cc
@@ -677,36 +677,22 @@ RUNTIME_FUNCTION(Runtime_InNewSpace) {
return isolate->heap()->ToBoolean(isolate->heap()->InNewSpace(obj));
}
-namespace {
-
-bool IsAsmWasmCode(Isolate* isolate, Handle<JSFunction> function) {
+RUNTIME_FUNCTION(Runtime_IsAsmWasmCode) {
+ SealHandleScope shs(isolate);
+ DCHECK_EQ(1, args.length());
+ CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0);
if (!function->shared()->HasAsmWasmData()) {
// Doesn't have wasm data.
- return false;
+ return isolate->heap()->false_value();
}
if (function->shared()->code() !=
isolate->builtins()->builtin(Builtins::kInstantiateAsmJs)) {
// Hasn't been compiled yet.
- return false;
+ return isolate->heap()->false_value();
}
- return true;
-}
-
-} // namespace
-
-RUNTIME_FUNCTION(Runtime_IsAsmWasmCode) {
- SealHandleScope shs(isolate);
- DCHECK_EQ(1, args.length());
- CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0);
- return isolate->heap()->ToBoolean(IsAsmWasmCode(isolate, function));
+ return isolate->heap()->true_value();
}
-RUNTIME_FUNCTION(Runtime_IsNotAsmWasmCode) {
- SealHandleScope shs(isolate);
- DCHECK_EQ(1, args.length());
- CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0);
- return isolate->heap()->ToBoolean(!IsAsmWasmCode(isolate, function));
-}
#define ELEMENTS_KIND_CHECK_RUNTIME_FUNCTION(Name) \
RUNTIME_FUNCTION(Runtime_Has##Name) { \
« no previous file with comments | « src/runtime/runtime.h ('k') | test/mjsunit/asm/asm-validation.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698