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

Side by Side Diff: src/deoptimizer.cc

Issue 8330021: Add write barrier helper for code patching and refactor stack check patching. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « src/deoptimizer.h ('k') | src/ia32/deoptimizer-ia32.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 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 989 matching lines...) Expand 10 before | Expand all | Expand 10 after
1000 // Iterate over the stack check table and revert the patched 1000 // Iterate over the stack check table and revert the patched
1001 // stack check calls. 1001 // stack check calls.
1002 ASSERT(unoptimized_code->kind() == Code::FUNCTION); 1002 ASSERT(unoptimized_code->kind() == Code::FUNCTION);
1003 Address stack_check_cursor = unoptimized_code->instruction_start() + 1003 Address stack_check_cursor = unoptimized_code->instruction_start() +
1004 unoptimized_code->stack_check_table_offset(); 1004 unoptimized_code->stack_check_table_offset();
1005 uint32_t table_length = Memory::uint32_at(stack_check_cursor); 1005 uint32_t table_length = Memory::uint32_at(stack_check_cursor);
1006 stack_check_cursor += kIntSize; 1006 stack_check_cursor += kIntSize;
1007 for (uint32_t i = 0; i < table_length; ++i) { 1007 for (uint32_t i = 0; i < table_length; ++i) {
1008 uint32_t pc_offset = Memory::uint32_at(stack_check_cursor + kIntSize); 1008 uint32_t pc_offset = Memory::uint32_at(stack_check_cursor + kIntSize);
1009 Address pc_after = unoptimized_code->instruction_start() + pc_offset; 1009 Address pc_after = unoptimized_code->instruction_start() + pc_offset;
1010 RevertStackCheckCodeAt(pc_after, check_code, replacement_code); 1010 RevertStackCheckCodeAt(unoptimized_code,
1011 pc_after,
1012 check_code,
1013 replacement_code);
1011 stack_check_cursor += 2 * kIntSize; 1014 stack_check_cursor += 2 * kIntSize;
1012 } 1015 }
1013 } 1016 }
1014 1017
1015 1018
1016 unsigned Deoptimizer::ComputeInputFrameSize() const { 1019 unsigned Deoptimizer::ComputeInputFrameSize() const {
1017 unsigned fixed_size = ComputeFixedSize(function_); 1020 unsigned fixed_size = ComputeFixedSize(function_);
1018 // The fp-to-sp delta already takes the context and the function 1021 // The fp-to-sp delta already takes the context and the function
1019 // into account so we have to avoid double counting them (-2). 1022 // into account so we have to avoid double counting them (-2).
1020 unsigned result = fixed_size + fp_to_sp_delta_ - (2 * kPointerSize); 1023 unsigned result = fixed_size + fp_to_sp_delta_ - (2 * kPointerSize);
(...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after
1502 1505
1503 void DeoptimizedFrameInfo::Iterate(ObjectVisitor* v) { 1506 void DeoptimizedFrameInfo::Iterate(ObjectVisitor* v) {
1504 v->VisitPointer(BitCast<Object**>(&function_)); 1507 v->VisitPointer(BitCast<Object**>(&function_));
1505 v->VisitPointers(parameters_, parameters_ + parameters_count_); 1508 v->VisitPointers(parameters_, parameters_ + parameters_count_);
1506 v->VisitPointers(expression_stack_, expression_stack_ + expression_count_); 1509 v->VisitPointers(expression_stack_, expression_stack_ + expression_count_);
1507 } 1510 }
1508 1511
1509 #endif // ENABLE_DEBUGGER_SUPPORT 1512 #endif // ENABLE_DEBUGGER_SUPPORT
1510 1513
1511 } } // namespace v8::internal 1514 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/deoptimizer.h ('k') | src/ia32/deoptimizer-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698