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

Side by Side Diff: src/runtime/runtime-compiler.cc

Issue 1768263004: [turbofan] [deoptimizer] Support inlining of ES6 tail calls. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebasing Created 4 years, 9 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/runtime/runtime-utils.h" 5 #include "src/runtime/runtime-utils.h"
6 6
7 #include "src/arguments.h" 7 #include "src/arguments.h"
8 #include "src/compiler.h" 8 #include "src/compiler.h"
9 #include "src/deoptimizer.h" 9 #include "src/deoptimizer.h"
10 #include "src/frames-inl.h" 10 #include "src/frames-inl.h"
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 DCHECK(optimized_code->kind() == Code::OPTIMIZED_FUNCTION); 117 DCHECK(optimized_code->kind() == Code::OPTIMIZED_FUNCTION);
118 DCHECK(type == deoptimizer->bailout_type()); 118 DCHECK(type == deoptimizer->bailout_type());
119 119
120 // Make sure to materialize objects before causing any allocation. 120 // Make sure to materialize objects before causing any allocation.
121 JavaScriptFrameIterator it(isolate); 121 JavaScriptFrameIterator it(isolate);
122 deoptimizer->MaterializeHeapObjects(&it); 122 deoptimizer->MaterializeHeapObjects(&it);
123 delete deoptimizer; 123 delete deoptimizer;
124 124
125 JavaScriptFrame* frame = it.frame(); 125 JavaScriptFrame* frame = it.frame();
126 RUNTIME_ASSERT(frame->function()->IsJSFunction()); 126 RUNTIME_ASSERT(frame->function()->IsJSFunction());
127 DCHECK(frame->function() == *function);
128 127
129 // Ensure the context register is updated for materialized objects. 128 // Ensure the context register is updated for materialized objects.
130 JavaScriptFrameIterator top_it(isolate); 129 JavaScriptFrameIterator top_it(isolate);
131 JavaScriptFrame* top_frame = top_it.frame(); 130 JavaScriptFrame* top_frame = top_it.frame();
132 isolate->set_context(Context::cast(top_frame->context())); 131 isolate->set_context(Context::cast(top_frame->context()));
133 132
134 if (type == Deoptimizer::LAZY) { 133 if (type == Deoptimizer::LAZY) {
135 return isolate->heap()->undefined_value(); 134 return isolate->heap()->undefined_value();
136 } 135 }
137 136
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 DCHECK(is_valid_language_mode(args.smi_at(3))); 359 DCHECK(is_valid_language_mode(args.smi_at(3)));
361 LanguageMode language_mode = static_cast<LanguageMode>(args.smi_at(3)); 360 LanguageMode language_mode = static_cast<LanguageMode>(args.smi_at(3));
362 DCHECK(args[4]->IsSmi()); 361 DCHECK(args[4]->IsSmi());
363 Handle<SharedFunctionInfo> outer_info(args.at<JSFunction>(2)->shared(), 362 Handle<SharedFunctionInfo> outer_info(args.at<JSFunction>(2)->shared(),
364 isolate); 363 isolate);
365 return CompileGlobalEval(isolate, args.at<String>(1), outer_info, 364 return CompileGlobalEval(isolate, args.at<String>(1), outer_info,
366 language_mode, args.smi_at(4)); 365 language_mode, args.smi_at(4));
367 } 366 }
368 } // namespace internal 367 } // namespace internal
369 } // namespace v8 368 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698