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

Side by Side Diff: src/deoptimizer.cc

Issue 2890363002: Fix deoptmization of inlined TF InstanceOf to call ToBoolean (Closed)
Patch Set: Review feedback Created 3 years, 6 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
« no previous file with comments | « src/compiler/js-native-context-specialization.cc ('k') | src/interface-descriptors.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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/deoptimizer.h" 5 #include "src/deoptimizer.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "src/accessors.h" 9 #include "src/accessors.h"
10 #include "src/assembler-inl.h" 10 #include "src/assembler-inl.h"
(...skipping 2247 matching lines...) Expand 10 before | Expand all | Expand 10 after
2258 has_argc = true; 2258 has_argc = true;
2259 } else { 2259 } else {
2260 // Any other argument must be a tagged value. 2260 // Any other argument must be a tagged value.
2261 CHECK(IsAnyTagged(type.representation())); 2261 CHECK(IsAnyTagged(type.representation()));
2262 } 2262 }
2263 } 2263 }
2264 CHECK_EQ(java_script_builtin, has_argc); 2264 CHECK_EQ(java_script_builtin, has_argc);
2265 2265
2266 if (trace_scope_ != NULL) { 2266 if (trace_scope_ != NULL) {
2267 PrintF(trace_scope_->file(), 2267 PrintF(trace_scope_->file(),
2268 " translating BuiltinContinuation to %s, stack param count %d\n", 2268 " translating BuiltinContinuation to %s,"
2269 Builtins::name(builtin_name), stack_param_count); 2269 " register param count %d,"
2270 " stack param count %d\n",
2271 Builtins::name(builtin_name), register_parameter_count,
2272 stack_param_count);
2270 } 2273 }
2271 2274
2272 unsigned output_frame_offset = output_frame_size; 2275 unsigned output_frame_offset = output_frame_size;
2273 FrameDescription* output_frame = 2276 FrameDescription* output_frame =
2274 new (output_frame_size) FrameDescription(output_frame_size); 2277 new (output_frame_size) FrameDescription(output_frame_size);
2275 output_[frame_index] = output_frame; 2278 output_[frame_index] = output_frame;
2276 2279
2277 // The top address of the frame is computed from the previous frame's top and 2280 // The top address of the frame is computed from the previous frame's top and
2278 // this frame's size. 2281 // this frame's size.
2279 intptr_t top_address; 2282 intptr_t top_address;
(...skipping 1240 matching lines...) Expand 10 before | Expand all | Expand 10 after
3520 TranslatedFrame TranslatedFrame::ConstructStubFrame( 3523 TranslatedFrame TranslatedFrame::ConstructStubFrame(
3521 BailoutId bailout_id, SharedFunctionInfo* shared_info, int height) { 3524 BailoutId bailout_id, SharedFunctionInfo* shared_info, int height) {
3522 TranslatedFrame frame(kConstructStub, shared_info->GetIsolate(), shared_info, 3525 TranslatedFrame frame(kConstructStub, shared_info->GetIsolate(), shared_info,
3523 height); 3526 height);
3524 frame.node_id_ = bailout_id; 3527 frame.node_id_ = bailout_id;
3525 return frame; 3528 return frame;
3526 } 3529 }
3527 3530
3528 TranslatedFrame TranslatedFrame::BuiltinContinuationFrame( 3531 TranslatedFrame TranslatedFrame::BuiltinContinuationFrame(
3529 BailoutId bailout_id, SharedFunctionInfo* shared_info, int height) { 3532 BailoutId bailout_id, SharedFunctionInfo* shared_info, int height) {
3530 base::OS::DebugBreak();
3531 TranslatedFrame frame(kBuiltinContinuation, shared_info->GetIsolate(), 3533 TranslatedFrame frame(kBuiltinContinuation, shared_info->GetIsolate(),
3532 shared_info, height); 3534 shared_info, height);
3533 frame.node_id_ = bailout_id; 3535 frame.node_id_ = bailout_id;
3534 return frame; 3536 return frame;
3535 } 3537 }
3536 3538
3537 TranslatedFrame TranslatedFrame::JavaScriptBuiltinContinuationFrame( 3539 TranslatedFrame TranslatedFrame::JavaScriptBuiltinContinuationFrame(
3538 BailoutId bailout_id, SharedFunctionInfo* shared_info, int height) { 3540 BailoutId bailout_id, SharedFunctionInfo* shared_info, int height) {
3539 TranslatedFrame frame(kJavaScriptBuiltinContinuation, 3541 TranslatedFrame frame(kJavaScriptBuiltinContinuation,
3540 shared_info->GetIsolate(), shared_info, height); 3542 shared_info->GetIsolate(), shared_info, height);
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
3676 SharedFunctionInfo* shared_info = 3678 SharedFunctionInfo* shared_info =
3677 SharedFunctionInfo::cast(literal_array->get(iterator->Next())); 3679 SharedFunctionInfo::cast(literal_array->get(iterator->Next()));
3678 int height = iterator->Next(); 3680 int height = iterator->Next();
3679 if (trace_file != nullptr) { 3681 if (trace_file != nullptr) {
3680 std::unique_ptr<char[]> name = shared_info->DebugName()->ToCString(); 3682 std::unique_ptr<char[]> name = shared_info->DebugName()->ToCString();
3681 PrintF(trace_file, " reading builtin continuation frame %s", 3683 PrintF(trace_file, " reading builtin continuation frame %s",
3682 name.get()); 3684 name.get());
3683 PrintF(trace_file, " => bailout_id=%d, height=%d; inputs:\n", 3685 PrintF(trace_file, " => bailout_id=%d, height=%d; inputs:\n",
3684 bailout_id.ToInt(), height); 3686 bailout_id.ToInt(), height);
3685 } 3687 }
3688 // Add one to the height to account for the context which was implicitly
3689 // added to the translation during code generation.
3690 int height_with_context = height + 1;
3686 return TranslatedFrame::BuiltinContinuationFrame(bailout_id, shared_info, 3691 return TranslatedFrame::BuiltinContinuationFrame(bailout_id, shared_info,
3687 height); 3692 height_with_context);
3688 } 3693 }
3689 3694
3690 case Translation::JAVA_SCRIPT_BUILTIN_CONTINUATION_FRAME: { 3695 case Translation::JAVA_SCRIPT_BUILTIN_CONTINUATION_FRAME: {
3691 BailoutId bailout_id = BailoutId(iterator->Next()); 3696 BailoutId bailout_id = BailoutId(iterator->Next());
3692 SharedFunctionInfo* shared_info = 3697 SharedFunctionInfo* shared_info =
3693 SharedFunctionInfo::cast(literal_array->get(iterator->Next())); 3698 SharedFunctionInfo::cast(literal_array->get(iterator->Next()));
3694 int height = iterator->Next(); 3699 int height = iterator->Next();
3695 if (trace_file != nullptr) { 3700 if (trace_file != nullptr) {
3696 std::unique_ptr<char[]> name = shared_info->DebugName()->ToCString(); 3701 std::unique_ptr<char[]> name = shared_info->DebugName()->ToCString();
3697 PrintF(trace_file, " reading JavaScript builtin continuation frame %s", 3702 PrintF(trace_file, " reading JavaScript builtin continuation frame %s",
3698 name.get()); 3703 name.get());
3699 PrintF(trace_file, " => bailout_id=%d, height=%d; inputs:\n", 3704 PrintF(trace_file, " => bailout_id=%d, height=%d; inputs:\n",
3700 bailout_id.ToInt(), height); 3705 bailout_id.ToInt(), height);
3701 } 3706 }
3707 // Add one to the height to account for the context which was implicitly
3708 // added to the translation during code generation.
3709 int height_with_context = height + 1;
3702 return TranslatedFrame::JavaScriptBuiltinContinuationFrame( 3710 return TranslatedFrame::JavaScriptBuiltinContinuationFrame(
3703 bailout_id, shared_info, height + 1); 3711 bailout_id, shared_info, height_with_context);
3704 } 3712 }
3705 3713
3706 case Translation::GETTER_STUB_FRAME: { 3714 case Translation::GETTER_STUB_FRAME: {
3707 SharedFunctionInfo* shared_info = 3715 SharedFunctionInfo* shared_info =
3708 SharedFunctionInfo::cast(literal_array->get(iterator->Next())); 3716 SharedFunctionInfo::cast(literal_array->get(iterator->Next()));
3709 if (trace_file != nullptr) { 3717 if (trace_file != nullptr) {
3710 std::unique_ptr<char[]> name = shared_info->DebugName()->ToCString(); 3718 std::unique_ptr<char[]> name = shared_info->DebugName()->ToCString();
3711 PrintF(trace_file, " reading getter frame %s; inputs:\n", name.get()); 3719 PrintF(trace_file, " reading getter frame %s; inputs:\n", name.get());
3712 } 3720 }
3713 return TranslatedFrame::AccessorFrame(TranslatedFrame::kGetter, 3721 return TranslatedFrame::AccessorFrame(TranslatedFrame::kGetter,
(...skipping 1122 matching lines...) Expand 10 before | Expand all | Expand 10 after
4836 CHECK(value_info->IsMaterializedObject()); 4844 CHECK(value_info->IsMaterializedObject());
4837 4845
4838 value_info->value_ = 4846 value_info->value_ =
4839 Handle<Object>(previously_materialized_objects->get(i), isolate_); 4847 Handle<Object>(previously_materialized_objects->get(i), isolate_);
4840 } 4848 }
4841 } 4849 }
4842 } 4850 }
4843 4851
4844 } // namespace internal 4852 } // namespace internal
4845 } // namespace v8 4853 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/js-native-context-specialization.cc ('k') | src/interface-descriptors.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698