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

Unified Diff: src/runtime/runtime-function.cc

Issue 1212813008: [turbofan] Port initialization of new.target variable. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix comment. Created 5 years, 5 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/runtime/runtime.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-function.cc
diff --git a/src/runtime/runtime-function.cc b/src/runtime/runtime-function.cc
index d644d37e42b2fff45685eb2c7604c5c68c801a3d..43c9ab4e04f079ebf90eea22f5ee6661eeff3852 100644
--- a/src/runtime/runtime-function.cc
+++ b/src/runtime/runtime-function.cc
@@ -601,6 +601,16 @@ RUNTIME_FUNCTION(Runtime_GetConstructorDelegate) {
}
+RUNTIME_FUNCTION(Runtime_GetOriginalConstructor) {
+ SealHandleScope shs(isolate);
+ DCHECK(args.length() == 0);
+ JavaScriptFrameIterator it(isolate);
+ JavaScriptFrame* frame = it.frame();
+ return frame->IsConstructor() ? frame->GetOriginalConstructor()
+ : isolate->heap()->undefined_value();
+}
+
+
RUNTIME_FUNCTION(Runtime_CallFunction) {
SealHandleScope shs(isolate);
return __RT_impl_Runtime_Call(args, isolate);
« no previous file with comments | « src/runtime/runtime.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698