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

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

Issue 6534022: Optimize functions needing a local context.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
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 | « no previous file | src/arm/lithium-codegen-arm.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 411 matching lines...) Expand 10 before | Expand all | Expand 10 after
422 ASSERT(!is_bottommost || input_->GetRegister(fp.code()) == fp_value); 422 ASSERT(!is_bottommost || input_->GetRegister(fp.code()) == fp_value);
423 output_frame->SetFp(fp_value); 423 output_frame->SetFp(fp_value);
424 if (is_topmost) { 424 if (is_topmost) {
425 output_frame->SetRegister(fp.code(), fp_value); 425 output_frame->SetRegister(fp.code(), fp_value);
426 } 426 }
427 if (FLAG_trace_deopt) { 427 if (FLAG_trace_deopt) {
428 PrintF(" 0x%08x: [top + %d] <- 0x%08x ; caller's fp\n", 428 PrintF(" 0x%08x: [top + %d] <- 0x%08x ; caller's fp\n",
429 fp_value, output_offset, value); 429 fp_value, output_offset, value);
430 } 430 }
431 431
432 // The context can be gotten from the function so long as we don't 432 // For the bottommost output frame the context can be gotten from the input
433 // optimize functions that need local contexts. 433 // frame. For all subsequent output frames it can be gotten from the function
434 // so long as we don't inline functions that need local contexts.
434 output_offset -= kPointerSize; 435 output_offset -= kPointerSize;
435 input_offset -= kPointerSize; 436 input_offset -= kPointerSize;
436 value = reinterpret_cast<intptr_t>(function->context()); 437 if (is_bottommost) {
437 // The context for the bottommost output frame should also agree with the 438 value = input_->GetFrameSlot(input_offset);
438 // input frame. 439 } else {
439 ASSERT(!is_bottommost || input_->GetFrameSlot(input_offset) == value); 440 value = reinterpret_cast<intptr_t>(function->context());
441 }
440 output_frame->SetFrameSlot(output_offset, value); 442 output_frame->SetFrameSlot(output_offset, value);
441 if (is_topmost) { 443 if (is_topmost) {
442 output_frame->SetRegister(cp.code(), value); 444 output_frame->SetRegister(cp.code(), value);
443 } 445 }
444 if (FLAG_trace_deopt) { 446 if (FLAG_trace_deopt) {
445 PrintF(" 0x%08x: [top + %d] <- 0x%08x ; context\n", 447 PrintF(" 0x%08x: [top + %d] <- 0x%08x ; context\n",
446 top_address + output_offset, output_offset, value); 448 top_address + output_offset, output_offset, value);
447 } 449 }
448 450
449 // The function was mentioned explicitly in the BEGIN_FRAME. 451 // The function was mentioned explicitly in the BEGIN_FRAME.
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
689 __ push(ip); 691 __ push(ip);
690 __ b(&done); 692 __ b(&done);
691 ASSERT(masm()->pc_offset() - start == table_entry_size_); 693 ASSERT(masm()->pc_offset() - start == table_entry_size_);
692 } 694 }
693 __ bind(&done); 695 __ bind(&done);
694 } 696 }
695 697
696 #undef __ 698 #undef __
697 699
698 } } // namespace v8::internal 700 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/arm/lithium-codegen-arm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698