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

Unified Diff: src/api-natives.cc

Issue 2535753004: [turbofan] Add appropriate types to express Callable. (Closed)
Patch Set: Add spec comments. Created 4 years, 1 month 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 | « no previous file | src/compiler/js-typed-lowering.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/api-natives.cc
diff --git a/src/api-natives.cc b/src/api-natives.cc
index 3fe59e293d3ff2d1d8d3b3fd688897334e6e95c8..a8808236bccae935ad4384e4ab1f44b25ce42d22 100644
--- a/src/api-natives.cc
+++ b/src/api-natives.cc
@@ -656,6 +656,12 @@ Handle<JSFunction> ApiNatives::CreateApiFunction(
// Mark as undetectable if needed.
if (obj->undetectable()) {
+ // We only allow callable undetectable receivers here, since this whole
+ // undetectable business is only to support document.all, which is both
+ // undetectable and callable. If we ever see the need to have an object
+ // that is undetectable but not callable, we need to update the types.h
+ // to allow encoding this.
+ CHECK(!obj->instance_call_handler()->IsUndefined(isolate));
map->set_is_undetectable();
}
« no previous file with comments | « no previous file | src/compiler/js-typed-lowering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698