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

Unified Diff: src/builtins.cc

Issue 1980483003: [es6] Reintroduce the instanceof operator in the backends. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Igors comments. Created 4 years, 7 months 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/builtins.h ('k') | src/code-stub-assembler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/builtins.cc
diff --git a/src/builtins.cc b/src/builtins.cc
index 77d4b3a87ce68835eddc4bdc0a21eb90481ab5f8..8365c86048b237843269fe69460a7e10e8fe96f4 100644
--- a/src/builtins.cc
+++ b/src/builtins.cc
@@ -2394,6 +2394,21 @@ void Builtins::Generate_MathTrunc(CodeStubAssembler* assembler) {
}
// -----------------------------------------------------------------------------
+// ES6 section 19.2 Function Objects
+
+// ES6 section 19.2.3.6 Function.prototype [ @@hasInstance ] ( V )
+void Builtins::Generate_FunctionPrototypeHasInstance(
+ CodeStubAssembler* assembler) {
+ using compiler::Node;
+
+ Node* f = assembler->Parameter(0);
+ Node* v = assembler->Parameter(1);
+ Node* context = assembler->Parameter(4);
+ Node* result = assembler->OrdinaryHasInstance(context, f, v);
+ assembler->Return(result);
+}
+
+// -----------------------------------------------------------------------------
// ES6 section 25.3 Generator Objects
namespace {
@@ -4197,7 +4212,6 @@ BUILTIN(FunctionPrototypeBind) {
return *function;
}
-
// ES6 section 19.2.3.5 Function.prototype.toString ( )
BUILTIN(FunctionPrototypeToString) {
HandleScope scope(isolate);
« no previous file with comments | « src/builtins.h ('k') | src/code-stub-assembler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698