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

Unified Diff: src/builtins/builtins-object.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/builtins/builtins-object.cc
diff --git a/src/builtins/builtins-object.cc b/src/builtins/builtins-object.cc
index b0bb1f043d6686ccccff6e397ddbcdd0327b92fd..ff1166f298e95874ac77e5a7bc18ebbb72ba842a 100644
--- a/src/builtins/builtins-object.cc
+++ b/src/builtins/builtins-object.cc
@@ -1018,5 +1018,15 @@ void Builtins::Generate_InstanceOf(CodeStubAssembler* assembler) {
assembler->Return(assembler->InstanceOf(object, callable, context));
}
+void Builtins::Generate_GetSuperConstructor(CodeStubAssembler* assembler) {
caitp 2016/11/22 23:42:03 It looks like this should take a compiler::CodeAss
Benedikt Meurer 2016/11/23 04:51:00 Jep, you'll probably hit this once you rebase.
+ typedef compiler::Node Node;
+ typedef TypeofDescriptor Descriptor;
+
+ Node* object = assembler->Parameter(Descriptor::kObject);
caitp 2016/11/22 23:30:34 if `object` is an Smi, GetSuperConstructor() will
Henrique Ferreiro 2016/12/01 12:22:22 Shouldn't I check that in CodeStubAssembler::GetSu
Benedikt Meurer 2016/12/01 13:11:51 Yep.
+ Node* context = assembler->Parameter(Descriptor::kContext);
+
+ assembler->Return(assembler->GetSuperConstructor(object, context));
+}
+
} // namespace internal
} // namespace v8

Powered by Google App Engine
This is Rietveld 408576698