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

Side by Side Diff: src/deoptimizer.cc

Issue 8404030: Version 3.7.1 (Closed) Base URL: http://v8.googlecode.com/svn/trunk/
Patch Set: Created 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/deoptimizer.h ('k') | src/factory.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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 864 matching lines...) Expand 10 before | Expand all | Expand 10 after
875 } 875 }
876 output->SetDoubleRegister(output_reg, double_value); 876 output->SetDoubleRegister(output_reg, double_value);
877 break; 877 break;
878 } 878 }
879 879
880 case Translation::STACK_SLOT: { 880 case Translation::STACK_SLOT: {
881 int output_index = iterator->Next(); 881 int output_index = iterator->Next();
882 unsigned output_offset = 882 unsigned output_offset =
883 output->GetOffsetFromSlotIndex(this, output_index); 883 output->GetOffsetFromSlotIndex(this, output_index);
884 if (FLAG_trace_osr) { 884 if (FLAG_trace_osr) {
885 PrintF(" [sp + %d] <- 0x%08" V8PRIxPTR " ; [sp + %d]\n", 885 PrintF(" [sp + %d] <- 0x%08" V8PRIxPTR " ; [sp + %d] ",
886 output_offset, 886 output_offset,
887 input_value, 887 input_value,
888 *input_offset); 888 *input_offset);
889 reinterpret_cast<Object*>(input_value)->ShortPrint();
890 PrintF("\n");
889 } 891 }
890 output->SetFrameSlot(output_offset, input_value); 892 output->SetFrameSlot(output_offset, input_value);
891 break; 893 break;
892 } 894 }
893 895
894 case Translation::INT32_STACK_SLOT: { 896 case Translation::INT32_STACK_SLOT: {
895 // Abort OSR if we don't have a number. 897 // Abort OSR if we don't have a number.
896 if (!input_object->IsNumber()) return false; 898 if (!input_object->IsNumber()) return false;
897 899
898 int output_index = iterator->Next(); 900 int output_index = iterator->Next();
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
1000 // Iterate over the stack check table and revert the patched 1002 // Iterate over the stack check table and revert the patched
1001 // stack check calls. 1003 // stack check calls.
1002 ASSERT(unoptimized_code->kind() == Code::FUNCTION); 1004 ASSERT(unoptimized_code->kind() == Code::FUNCTION);
1003 Address stack_check_cursor = unoptimized_code->instruction_start() + 1005 Address stack_check_cursor = unoptimized_code->instruction_start() +
1004 unoptimized_code->stack_check_table_offset(); 1006 unoptimized_code->stack_check_table_offset();
1005 uint32_t table_length = Memory::uint32_at(stack_check_cursor); 1007 uint32_t table_length = Memory::uint32_at(stack_check_cursor);
1006 stack_check_cursor += kIntSize; 1008 stack_check_cursor += kIntSize;
1007 for (uint32_t i = 0; i < table_length; ++i) { 1009 for (uint32_t i = 0; i < table_length; ++i) {
1008 uint32_t pc_offset = Memory::uint32_at(stack_check_cursor + kIntSize); 1010 uint32_t pc_offset = Memory::uint32_at(stack_check_cursor + kIntSize);
1009 Address pc_after = unoptimized_code->instruction_start() + pc_offset; 1011 Address pc_after = unoptimized_code->instruction_start() + pc_offset;
1010 RevertStackCheckCodeAt(pc_after, check_code, replacement_code); 1012 RevertStackCheckCodeAt(unoptimized_code,
1013 pc_after,
1014 check_code,
1015 replacement_code);
1011 stack_check_cursor += 2 * kIntSize; 1016 stack_check_cursor += 2 * kIntSize;
1012 } 1017 }
1013 } 1018 }
1014 1019
1015 1020
1016 unsigned Deoptimizer::ComputeInputFrameSize() const { 1021 unsigned Deoptimizer::ComputeInputFrameSize() const {
1017 unsigned fixed_size = ComputeFixedSize(function_); 1022 unsigned fixed_size = ComputeFixedSize(function_);
1018 // The fp-to-sp delta already takes the context and the function 1023 // The fp-to-sp delta already takes the context and the function
1019 // into account so we have to avoid double counting them (-2). 1024 // into account so we have to avoid double counting them (-2).
1020 unsigned result = fixed_size + fp_to_sp_delta_ - (2 * kPointerSize); 1025 unsigned result = fixed_size + fp_to_sp_delta_ - (2 * kPointerSize);
(...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after
1502 1507
1503 void DeoptimizedFrameInfo::Iterate(ObjectVisitor* v) { 1508 void DeoptimizedFrameInfo::Iterate(ObjectVisitor* v) {
1504 v->VisitPointer(BitCast<Object**>(&function_)); 1509 v->VisitPointer(BitCast<Object**>(&function_));
1505 v->VisitPointers(parameters_, parameters_ + parameters_count_); 1510 v->VisitPointers(parameters_, parameters_ + parameters_count_);
1506 v->VisitPointers(expression_stack_, expression_stack_ + expression_count_); 1511 v->VisitPointers(expression_stack_, expression_stack_ + expression_count_);
1507 } 1512 }
1508 1513
1509 #endif // ENABLE_DEBUGGER_SUPPORT 1514 #endif // ENABLE_DEBUGGER_SUPPORT
1510 1515
1511 } } // namespace v8::internal 1516 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/deoptimizer.h ('k') | src/factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698