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

Unified Diff: src/compiler.cc

Issue 1083193005: WIP: new.target (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix return from new func Created 5 years, 8 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/deoptimizer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler.cc
diff --git a/src/compiler.cc b/src/compiler.cc
index 58f47bc5c6f1635897542bc4974135a0c244714d..7683e13159da76d713e9785aad142e60587cebdb 100644
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -1378,6 +1378,11 @@ Handle<SharedFunctionInfo> Compiler::BuildFunctionInfo(
result->set_script(*script);
result->set_is_toplevel(false);
+ if (literal->scope()->uses_new_target()) {
+ 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/deoptimizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698