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

Side by Side Diff: src/deoptimizer.cc

Issue 1221433021: Move SmartPointer to base. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Remove some unecessary header includes 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 unified diff | Download patch
« BUILD.gn ('K') | « src/d8.h ('k') | src/disassembler.cc » ('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/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/codegen.h" 8 #include "src/codegen.h"
9 #include "src/cpu-profiler.h" 9 #include "src/cpu-profiler.h"
10 #include "src/deoptimizer.h" 10 #include "src/deoptimizer.h"
(...skipping 2670 matching lines...) Expand 10 before | Expand all | Expand 10 after
2681 JSFunction* frame_function, FILE* trace_file) { 2681 JSFunction* frame_function, FILE* trace_file) {
2682 Translation::Opcode opcode = 2682 Translation::Opcode opcode =
2683 static_cast<Translation::Opcode>(iterator->Next()); 2683 static_cast<Translation::Opcode>(iterator->Next());
2684 switch (opcode) { 2684 switch (opcode) {
2685 case Translation::JS_FRAME: { 2685 case Translation::JS_FRAME: {
2686 BailoutId node_id = BailoutId(iterator->Next()); 2686 BailoutId node_id = BailoutId(iterator->Next());
2687 SharedFunctionInfo* shared_info = 2687 SharedFunctionInfo* shared_info =
2688 SharedFunctionInfo::cast(literal_array->get(iterator->Next())); 2688 SharedFunctionInfo::cast(literal_array->get(iterator->Next()));
2689 int height = iterator->Next(); 2689 int height = iterator->Next();
2690 if (trace_file != nullptr) { 2690 if (trace_file != nullptr) {
2691 SmartArrayPointer<char> name = shared_info->DebugName()->ToCString(); 2691 base::SmartArrayPointer<char> name =
2692 shared_info->DebugName()->ToCString();
2692 PrintF(trace_file, " reading input frame %s", name.get()); 2693 PrintF(trace_file, " reading input frame %s", name.get());
2693 int arg_count = shared_info->internal_formal_parameter_count() + 1; 2694 int arg_count = shared_info->internal_formal_parameter_count() + 1;
2694 PrintF(trace_file, " => node=%d, args=%d, height=%d; inputs:\n", 2695 PrintF(trace_file, " => node=%d, args=%d, height=%d; inputs:\n",
2695 arg_count, node_id.ToInt(), height); 2696 arg_count, node_id.ToInt(), height);
2696 } 2697 }
2697 return TranslatedFrame::JSFrame(node_id, shared_info, height); 2698 return TranslatedFrame::JSFrame(node_id, shared_info, height);
2698 } 2699 }
2699 2700
2700 case Translation::ARGUMENTS_ADAPTOR_FRAME: { 2701 case Translation::ARGUMENTS_ADAPTOR_FRAME: {
2701 SharedFunctionInfo* shared_info = 2702 SharedFunctionInfo* shared_info =
2702 SharedFunctionInfo::cast(literal_array->get(iterator->Next())); 2703 SharedFunctionInfo::cast(literal_array->get(iterator->Next()));
2703 int height = iterator->Next(); 2704 int height = iterator->Next();
2704 if (trace_file != nullptr) { 2705 if (trace_file != nullptr) {
2705 SmartArrayPointer<char> name = shared_info->DebugName()->ToCString(); 2706 base::SmartArrayPointer<char> name =
2707 shared_info->DebugName()->ToCString();
2706 PrintF(trace_file, " reading arguments adaptor frame %s", name.get()); 2708 PrintF(trace_file, " reading arguments adaptor frame %s", name.get());
2707 PrintF(trace_file, " => height=%d; inputs:\n", height); 2709 PrintF(trace_file, " => height=%d; inputs:\n", height);
2708 } 2710 }
2709 return TranslatedFrame::ArgumentsAdaptorFrame(shared_info, height); 2711 return TranslatedFrame::ArgumentsAdaptorFrame(shared_info, height);
2710 } 2712 }
2711 2713
2712 case Translation::CONSTRUCT_STUB_FRAME: { 2714 case Translation::CONSTRUCT_STUB_FRAME: {
2713 SharedFunctionInfo* shared_info = 2715 SharedFunctionInfo* shared_info =
2714 SharedFunctionInfo::cast(literal_array->get(iterator->Next())); 2716 SharedFunctionInfo::cast(literal_array->get(iterator->Next()));
2715 int height = iterator->Next(); 2717 int height = iterator->Next();
2716 if (trace_file != nullptr) { 2718 if (trace_file != nullptr) {
2717 SmartArrayPointer<char> name = shared_info->DebugName()->ToCString(); 2719 base::SmartArrayPointer<char> name =
2720 shared_info->DebugName()->ToCString();
2718 PrintF(trace_file, " reading construct stub frame %s", name.get()); 2721 PrintF(trace_file, " reading construct stub frame %s", name.get());
2719 PrintF(trace_file, " => height=%d; inputs:\n", height); 2722 PrintF(trace_file, " => height=%d; inputs:\n", height);
2720 } 2723 }
2721 return TranslatedFrame::ConstructStubFrame(shared_info, height); 2724 return TranslatedFrame::ConstructStubFrame(shared_info, height);
2722 } 2725 }
2723 2726
2724 case Translation::GETTER_STUB_FRAME: { 2727 case Translation::GETTER_STUB_FRAME: {
2725 SharedFunctionInfo* shared_info = 2728 SharedFunctionInfo* shared_info =
2726 SharedFunctionInfo::cast(literal_array->get(iterator->Next())); 2729 SharedFunctionInfo::cast(literal_array->get(iterator->Next()));
2727 if (trace_file != nullptr) { 2730 if (trace_file != nullptr) {
2728 SmartArrayPointer<char> name = shared_info->DebugName()->ToCString(); 2731 base::SmartArrayPointer<char> name =
2732 shared_info->DebugName()->ToCString();
2729 PrintF(trace_file, " reading getter frame %s; inputs:\n", name.get()); 2733 PrintF(trace_file, " reading getter frame %s; inputs:\n", name.get());
2730 } 2734 }
2731 return TranslatedFrame::AccessorFrame(TranslatedFrame::kGetter, 2735 return TranslatedFrame::AccessorFrame(TranslatedFrame::kGetter,
2732 shared_info); 2736 shared_info);
2733 } 2737 }
2734 2738
2735 case Translation::SETTER_STUB_FRAME: { 2739 case Translation::SETTER_STUB_FRAME: {
2736 SharedFunctionInfo* shared_info = 2740 SharedFunctionInfo* shared_info =
2737 SharedFunctionInfo::cast(literal_array->get(iterator->Next())); 2741 SharedFunctionInfo::cast(literal_array->get(iterator->Next()));
2738 if (trace_file != nullptr) { 2742 if (trace_file != nullptr) {
2739 SmartArrayPointer<char> name = shared_info->DebugName()->ToCString(); 2743 base::SmartArrayPointer<char> name =
2744 shared_info->DebugName()->ToCString();
2740 PrintF(trace_file, " reading setter frame %s; inputs:\n", name.get()); 2745 PrintF(trace_file, " reading setter frame %s; inputs:\n", name.get());
2741 } 2746 }
2742 return TranslatedFrame::AccessorFrame(TranslatedFrame::kSetter, 2747 return TranslatedFrame::AccessorFrame(TranslatedFrame::kSetter,
2743 shared_info); 2748 shared_info);
2744 } 2749 }
2745 2750
2746 case Translation::COMPILED_STUB_FRAME: { 2751 case Translation::COMPILED_STUB_FRAME: {
2747 int height = iterator->Next(); 2752 int height = iterator->Next();
2748 if (trace_file != nullptr) { 2753 if (trace_file != nullptr) {
2749 PrintF(trace_file, 2754 PrintF(trace_file,
(...skipping 629 matching lines...) Expand 10 before | Expand all | Expand 10 after
3379 DCHECK(value_info->IsMaterializedObject()); 3384 DCHECK(value_info->IsMaterializedObject());
3380 3385
3381 value_info->value_ = 3386 value_info->value_ =
3382 Handle<Object>(previously_materialized_objects->get(i), isolate_); 3387 Handle<Object>(previously_materialized_objects->get(i), isolate_);
3383 } 3388 }
3384 } 3389 }
3385 } 3390 }
3386 3391
3387 } // namespace internal 3392 } // namespace internal
3388 } // namespace v8 3393 } // namespace v8
OLDNEW
« BUILD.gn ('K') | « src/d8.h ('k') | src/disassembler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698