| OLD | NEW |
| 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 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 281 // incoming argument slots we've just cleared. | 281 // incoming argument slots we've just cleared. |
| 282 int input_offset = input_frame_size - kPointerSize; | 282 int input_offset = input_frame_size - kPointerSize; |
| 283 bool ok = true; | 283 bool ok = true; |
| 284 int limit = input_offset - (parameter_count * kPointerSize); | 284 int limit = input_offset - (parameter_count * kPointerSize); |
| 285 while (ok && input_offset > limit) { | 285 while (ok && input_offset > limit) { |
| 286 ok = DoOsrTranslateCommand(&iterator, &input_offset); | 286 ok = DoOsrTranslateCommand(&iterator, &input_offset); |
| 287 } | 287 } |
| 288 | 288 |
| 289 // There are no translation commands for the caller's pc and fp, the | 289 // There are no translation commands for the caller's pc and fp, the |
| 290 // context, and the function. Set them up explicitly. | 290 // context, and the function. Set them up explicitly. |
| 291 for (int i = 0; ok && i < 4; i++) { | 291 for (int i = StandardFrameConstants::kCallerPCOffset; |
| 292 ok && i >= StandardFrameConstants::kMarkerOffset; |
| 293 i -= kPointerSize) { |
| 292 uint32_t input_value = input_->GetFrameSlot(input_offset); | 294 uint32_t input_value = input_->GetFrameSlot(input_offset); |
| 293 if (FLAG_trace_osr) { | 295 if (FLAG_trace_osr) { |
| 294 PrintF(" [sp + %d] <- 0x%08x ; [sp + %d] (fixed part)\n", | 296 const char* name = "UNKNOWN"; |
| 297 switch (i) { |
| 298 case StandardFrameConstants::kCallerPCOffset: |
| 299 name = "caller's pc"; |
| 300 break; |
| 301 case StandardFrameConstants::kCallerFPOffset: |
| 302 name = "fp"; |
| 303 break; |
| 304 case StandardFrameConstants::kContextOffset: |
| 305 name = "context"; |
| 306 break; |
| 307 case StandardFrameConstants::kMarkerOffset: |
| 308 name = "function"; |
| 309 break; |
| 310 } |
| 311 PrintF(" [sp + %d] <- 0x%08x ; [sp + %d] (fixed part - %s)\n", |
| 295 output_offset, | 312 output_offset, |
| 296 input_value, | 313 input_value, |
| 297 input_offset); | 314 input_offset, |
| 315 name); |
| 298 } | 316 } |
| 317 |
| 299 output_[0]->SetFrameSlot(output_offset, input_->GetFrameSlot(input_offset)); | 318 output_[0]->SetFrameSlot(output_offset, input_->GetFrameSlot(input_offset)); |
| 300 input_offset -= kPointerSize; | 319 input_offset -= kPointerSize; |
| 301 output_offset -= kPointerSize; | 320 output_offset -= kPointerSize; |
| 302 } | 321 } |
| 303 | 322 |
| 304 // Translate the rest of the frame. | 323 // Translate the rest of the frame. |
| 305 while (ok && input_offset >= 0) { | 324 while (ok && input_offset >= 0) { |
| 306 ok = DoOsrTranslateCommand(&iterator, &input_offset); | 325 ok = DoOsrTranslateCommand(&iterator, &input_offset); |
| 307 } | 326 } |
| 308 | 327 |
| (...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 707 __ push(ip); | 726 __ push(ip); |
| 708 __ b(&done); | 727 __ b(&done); |
| 709 ASSERT(masm()->pc_offset() - start == table_entry_size_); | 728 ASSERT(masm()->pc_offset() - start == table_entry_size_); |
| 710 } | 729 } |
| 711 __ bind(&done); | 730 __ bind(&done); |
| 712 } | 731 } |
| 713 | 732 |
| 714 #undef __ | 733 #undef __ |
| 715 | 734 |
| 716 } } // namespace v8::internal | 735 } } // namespace v8::internal |
| OLD | NEW |