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

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

Issue 6532091: Merge bleeding_edge revision (5922, 5934] to isolates branch.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/isolates/
Patch Set: '' Created 9 years, 10 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 | « MERGE ('k') | src/atomicops_internals_x86_msvc.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 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 // There are no translation commands for the caller's pc and fp, the 190 // There are no translation commands for the caller's pc and fp, the
191 // context, and the function. Synthesize their values and set them up 191 // context, and the function. Synthesize their values and set them up
192 // explicitly. 192 // explicitly.
193 // 193 //
194 // The caller's pc for the bottommost output frame is the same as in the 194 // The caller's pc for the bottommost output frame is the same as in the
195 // input frame. For all subsequent output frames, it can be read from the 195 // input frame. For all subsequent output frames, it can be read from the
196 // previous one. This frame's pc can be computed from the non-optimized 196 // previous one. This frame's pc can be computed from the non-optimized
197 // function code and AST id of the bailout. 197 // function code and AST id of the bailout.
198 output_offset -= kPointerSize; 198 output_offset -= kPointerSize;
199 input_offset -= kPointerSize; 199 input_offset -= kPointerSize;
200 uint32_t value; 200 intptr_t value;
201 if (is_bottommost) { 201 if (is_bottommost) {
202 value = input_->GetFrameSlot(input_offset); 202 value = input_->GetFrameSlot(input_offset);
203 } else { 203 } else {
204 value = output_[frame_index - 1]->GetPc(); 204 value = output_[frame_index - 1]->GetPc();
205 } 205 }
206 output_frame->SetFrameSlot(output_offset, value); 206 output_frame->SetFrameSlot(output_offset, value);
207 if (FLAG_trace_deopt) { 207 if (FLAG_trace_deopt) {
208 PrintF(" 0x%08x: [top + %d] <- 0x%08x ; caller's pc\n", 208 PrintF(" 0x%08x: [top + %d] <- 0x%08x ; caller's pc\n",
209 top_address + output_offset, output_offset, value); 209 top_address + output_offset, output_offset, value);
210 } 210 }
211 211
212 // The caller's frame pointer for the bottommost output frame is the same 212 // The caller's frame pointer for the bottommost output frame is the same
213 // as in the input frame. For all subsequent output frames, it can be 213 // as in the input frame. For all subsequent output frames, it can be
214 // read from the previous one. Also compute and set this frame's frame 214 // read from the previous one. Also compute and set this frame's frame
215 // pointer. 215 // pointer.
216 output_offset -= kPointerSize; 216 output_offset -= kPointerSize;
217 input_offset -= kPointerSize; 217 input_offset -= kPointerSize;
218 if (is_bottommost) { 218 if (is_bottommost) {
219 value = input_->GetFrameSlot(input_offset); 219 value = input_->GetFrameSlot(input_offset);
220 } else { 220 } else {
221 value = output_[frame_index - 1]->GetFp(); 221 value = output_[frame_index - 1]->GetFp();
222 } 222 }
223 output_frame->SetFrameSlot(output_offset, value); 223 output_frame->SetFrameSlot(output_offset, value);
224 unsigned fp_value = top_address + output_offset; 224 intptr_t fp_value = top_address + output_offset;
225 ASSERT(!is_bottommost || input_->GetRegister(fp.code()) == fp_value); 225 ASSERT(!is_bottommost || input_->GetRegister(fp.code()) == fp_value);
226 output_frame->SetFp(fp_value); 226 output_frame->SetFp(fp_value);
227 if (is_topmost) { 227 if (is_topmost) {
228 output_frame->SetRegister(fp.code(), fp_value); 228 output_frame->SetRegister(fp.code(), fp_value);
229 } 229 }
230 if (FLAG_trace_deopt) { 230 if (FLAG_trace_deopt) {
231 PrintF(" 0x%08x: [top + %d] <- 0x%08x ; caller's fp\n", 231 PrintF(" 0x%08x: [top + %d] <- 0x%08x ; caller's fp\n",
232 fp_value, output_offset, value); 232 fp_value, output_offset, value);
233 } 233 }
234 234
235 // The context can be gotten from the function so long as we don't 235 // The context can be gotten from the function so long as we don't
236 // optimize functions that need local contexts. 236 // optimize functions that need local contexts.
237 output_offset -= kPointerSize; 237 output_offset -= kPointerSize;
238 input_offset -= kPointerSize; 238 input_offset -= kPointerSize;
239 value = reinterpret_cast<uint32_t>(function->context()); 239 value = reinterpret_cast<intptr_t>(function->context());
240 // The context for the bottommost output frame should also agree with the 240 // The context for the bottommost output frame should also agree with the
241 // input frame. 241 // input frame.
242 ASSERT(!is_bottommost || input_->GetFrameSlot(input_offset) == value); 242 ASSERT(!is_bottommost || input_->GetFrameSlot(input_offset) == value);
243 output_frame->SetFrameSlot(output_offset, value); 243 output_frame->SetFrameSlot(output_offset, value);
244 if (is_topmost) { 244 if (is_topmost) {
245 output_frame->SetRegister(cp.code(), value); 245 output_frame->SetRegister(cp.code(), value);
246 } 246 }
247 if (FLAG_trace_deopt) { 247 if (FLAG_trace_deopt) {
248 PrintF(" 0x%08x: [top + %d] <- 0x%08x ; context\n", 248 PrintF(" 0x%08x: [top + %d] <- 0x%08x ; context\n",
249 top_address + output_offset, output_offset, value); 249 top_address + output_offset, output_offset, value);
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
497 __ push(ip); 497 __ push(ip);
498 __ b(&done); 498 __ b(&done);
499 ASSERT(masm()->pc_offset() - start == table_entry_size_); 499 ASSERT(masm()->pc_offset() - start == table_entry_size_);
500 } 500 }
501 __ bind(&done); 501 __ bind(&done);
502 } 502 }
503 503
504 #undef __ 504 #undef __
505 505
506 } } // namespace v8::internal 506 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « MERGE ('k') | src/atomicops_internals_x86_msvc.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698