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

Unified Diff: src/compiler/js-generic-lowering.cc

Issue 2504553003: [es6] Perform the IsConstructor test in GetSuperConstructor. (Closed)
Patch Set: Convert GetSuperConstructor to a new interpreter bytecode 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
Index: src/compiler/js-generic-lowering.cc
diff --git a/src/compiler/js-generic-lowering.cc b/src/compiler/js-generic-lowering.cc
index ac36cc7913a82db3976569aa182831692be718f0..0100e80476fd731c0dc9472b52955c7ba7d03ada 100644
--- a/src/compiler/js-generic-lowering.cc
+++ b/src/compiler/js-generic-lowering.cc
@@ -345,6 +345,16 @@ void JSGenericLowering::LowerJSDeleteProperty(Node* node) {
}
+void JSGenericLowering::LowerJSGetSuperConstructor(Node* node) {
+ // The typeof operator doesn't need the current context.
+ NodeProperties::ReplaceContextInput(node, jsgraph()->NoContextConstant());
caitp 2016/11/21 13:52:53 I would just replace this whole block with `Replac
Benedikt Meurer 2016/11/23 04:51:00 This should use the GetSuperConstructor builtin:
+ Callable callable = CodeFactory::Typeof(isolate());
+ node->AppendInput(zone(), graph()->start());
+ ReplaceWithStubCall(node, callable, CallDescriptor::kNoAllocate,
+ Operator::kEliminatable);
+}
+
+
void JSGenericLowering::LowerJSInstanceOf(Node* node) {
CallDescriptor::Flags flags = FrameStateFlagForCall(node);
Callable callable = CodeFactory::InstanceOf(isolate());

Powered by Google App Engine
This is Rietveld 408576698