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

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

Issue 1460503008: [turbofan] Switch passing of new.target to register. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@local_turbofan-pass-new-target-6
Patch Set: Ported to MIPS64. Created 5 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
« no previous file with comments | « src/mips64/macro-assembler-mips64.cc ('k') | src/x64/builtins-x64.cc » ('j') | 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 d6a4f34dd086b156e458cca054c6eec32ad24b8a..2df297b1d8d61f79192e82c73af04b008e251ace 100644
--- a/src/runtime/runtime-function.cc
+++ b/src/runtime/runtime-function.cc
@@ -590,16 +590,9 @@ RUNTIME_FUNCTION(Runtime_GetNewTarget) {
DCHECK(args.length() == 0);
JavaScriptFrameIterator it(isolate);
JavaScriptFrame* frame = it.frame();
- // TODO(4544): Currently we never inline any [[Construct]] calls where the
- // actual target differs from the new target. Fix this soon!
- if (frame->HasInlinedFrames()) {
- HandleScope scope(isolate);
- List<FrameSummary> frames(FLAG_max_inlining_levels + 1);
- it.frame()->Summarize(&frames);
- FrameSummary& summary = frames.last();
- return summary.is_constructor() ? Object::cast(*summary.function())
- : isolate->heap()->undefined_value();
- }
+ // TODO(4544): By now the runtime function is only used by the interpreter,
+ // get rid of the entire runtime function once the interpreter is switched.
+ DCHECK(!frame->is_optimized() && !frame->HasInlinedFrames());
return frame->IsConstructor() ? frame->GetNewTarget()
: isolate->heap()->undefined_value();
}
« no previous file with comments | « src/mips64/macro-assembler-mips64.cc ('k') | src/x64/builtins-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698