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

Unified Diff: src/compiler.cc

Issue 1191973004: Work In Progress: support new.target (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 6 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
Index: src/compiler.cc
diff --git a/src/compiler.cc b/src/compiler.cc
index ef21f1f46f9e65ff227bdefb703fe4132101c59e..8816404365e4e16730a6da5d01487f4114781353 100644
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -1405,6 +1405,11 @@ Handle<SharedFunctionInfo> Compiler::BuildFunctionInfo(
result->set_script(*script);
result->set_is_toplevel(false);
+ if (literal->scope()->new_target_var() != nullptr) {
+ Handle<Code> stub(isolate->builtins()->JSConstructStubNewTarget());
+ result->set_construct_stub(*stub);
+ }
+
RecordFunctionCompilation(Logger::FUNCTION_TAG, &info, result);
result->set_allows_lazy_compilation(literal->AllowsLazyCompilation());
result->set_allows_lazy_compilation_without_context(allow_lazy_without_ctx);
« no previous file with comments | « src/builtins.h ('k') | src/objects.cc » ('j') | test/mjsunit/harmony/new-target.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698