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

Unified Diff: src/frames.cc

Issue 1432493003: [turbofan] Fix new.target when a function is inlined to a constructor. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@reland
Patch Set: Test added 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/frames.h ('k') | src/runtime/runtime-function.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/frames.cc
diff --git a/src/frames.cc b/src/frames.cc
index 596508a54b3b50c69021e3b67247b584b6250595..0aeda5a5b3db15960103c82892a3347f5924f738 100644
--- a/src/frames.cc
+++ b/src/frames.cc
@@ -749,7 +749,7 @@ bool JavaScriptFrame::IsConstructor() const {
}
-bool JavaScriptFrame::HasInlinedFrames() {
+bool JavaScriptFrame::HasInlinedFrames() const {
List<JSFunction*> functions(1);
GetFunctions(&functions);
return functions.length() > 1;
@@ -757,6 +757,7 @@ bool JavaScriptFrame::HasInlinedFrames() {
Object* JavaScriptFrame::GetOriginalConstructor() const {
+ DCHECK(!HasInlinedFrames());
Address fp = caller_fp();
if (has_adapted_arguments()) {
// Skip the arguments adaptor frame and look at the real caller.
@@ -799,7 +800,7 @@ Address JavaScriptFrame::GetCallerStackPointer() const {
}
-void JavaScriptFrame::GetFunctions(List<JSFunction*>* functions) {
+void JavaScriptFrame::GetFunctions(List<JSFunction*>* functions) const {
DCHECK(functions->length() == 0);
functions->Add(function());
}
@@ -1041,7 +1042,7 @@ int OptimizedFrame::LookupExceptionHandlerInTable(
DeoptimizationInputData* OptimizedFrame::GetDeoptimizationData(
- int* deopt_index) {
+ int* deopt_index) const {
DCHECK(is_optimized());
JSFunction* opt_function = function();
@@ -1065,7 +1066,7 @@ DeoptimizationInputData* OptimizedFrame::GetDeoptimizationData(
}
-void OptimizedFrame::GetFunctions(List<JSFunction*>* functions) {
+void OptimizedFrame::GetFunctions(List<JSFunction*>* functions) const {
DCHECK(functions->length() == 0);
DCHECK(is_optimized());
« no previous file with comments | « src/frames.h ('k') | src/runtime/runtime-function.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698