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

Side by Side Diff: src/arm/deoptimizer-arm.cc

Issue 10824235: Fix the full compiler on ARM to always generate the same code (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 8 years, 4 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
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 // deoptimization entry. 66 // deoptimization entry.
67 DeoptimizationInputData* deopt_data = 67 DeoptimizationInputData* deopt_data =
68 DeoptimizationInputData::cast(code->deoptimization_data()); 68 DeoptimizationInputData::cast(code->deoptimization_data());
69 #ifdef DEBUG 69 #ifdef DEBUG
70 Address prev_call_address = NULL; 70 Address prev_call_address = NULL;
71 #endif 71 #endif
72 for (int i = 0; i < deopt_data->DeoptCount(); i++) { 72 for (int i = 0; i < deopt_data->DeoptCount(); i++) {
73 if (deopt_data->Pc(i)->value() == -1) continue; 73 if (deopt_data->Pc(i)->value() == -1) continue;
74 Address call_address = code_start_address + deopt_data->Pc(i)->value(); 74 Address call_address = code_start_address + deopt_data->Pc(i)->value();
75 Address deopt_entry = GetDeoptimizationEntry(i, LAZY); 75 Address deopt_entry = GetDeoptimizationEntry(i, LAZY);
76 int call_size_in_bytes = MacroAssembler::CallSize(deopt_entry, 76 // We need calls to have a predictable size in the unoptimized code, but
77 RelocInfo::NONE); 77 // this is optimized code, so we don't have to have a predictable size.
78 int call_size_in_bytes =
79 MacroAssembler::CallSizeNotPredictableSize(deopt_entry,
80 RelocInfo::NONE);
78 int call_size_in_words = call_size_in_bytes / Assembler::kInstrSize; 81 int call_size_in_words = call_size_in_bytes / Assembler::kInstrSize;
79 ASSERT(call_size_in_bytes % Assembler::kInstrSize == 0); 82 ASSERT(call_size_in_bytes % Assembler::kInstrSize == 0);
80 ASSERT(call_size_in_bytes <= patch_size()); 83 ASSERT(call_size_in_bytes <= patch_size());
81 CodePatcher patcher(call_address, call_size_in_words); 84 CodePatcher patcher(call_address, call_size_in_words);
82 patcher.masm()->Call(deopt_entry, RelocInfo::NONE); 85 patcher.masm()->Call(deopt_entry, RelocInfo::NONE);
83 ASSERT(prev_call_address == NULL || 86 ASSERT(prev_call_address == NULL ||
84 call_address >= prev_call_address + patch_size()); 87 call_address >= prev_call_address + patch_size());
85 ASSERT(call_address + patch_size() <= code->instruction_end()); 88 ASSERT(call_address + patch_size() <= code->instruction_end());
86 #ifdef DEBUG 89 #ifdef DEBUG
87 prev_call_address = call_address; 90 prev_call_address = call_address;
(...skipping 913 matching lines...) Expand 10 before | Expand all | Expand 10 after
1001 __ push(ip); 1004 __ push(ip);
1002 __ b(&done); 1005 __ b(&done);
1003 ASSERT(masm()->pc_offset() - start == table_entry_size_); 1006 ASSERT(masm()->pc_offset() - start == table_entry_size_);
1004 } 1007 }
1005 __ bind(&done); 1008 __ bind(&done);
1006 } 1009 }
1007 1010
1008 #undef __ 1011 #undef __
1009 1012
1010 } } // namespace v8::internal 1013 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698