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

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

Issue 6717018: Introduce accessors on builtins instance (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 9 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 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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 reloc_info->set_length(new_reloc_size); 116 reloc_info->set_length(new_reloc_size);
117 117
118 // Handle the junk part after the new relocation info. We will create 118 // Handle the junk part after the new relocation info. We will create
119 // a non-live object in the extra space at the end of the former reloc info. 119 // a non-live object in the extra space at the end of the former reloc info.
120 Address junk_address = reloc_info->address() + reloc_info->Size(); 120 Address junk_address = reloc_info->address() + reloc_info->Size();
121 ASSERT(junk_address <= reloc_end_address); 121 ASSERT(junk_address <= reloc_end_address);
122 HEAP->CreateFillerObjectAt(junk_address, reloc_end_address - junk_address); 122 HEAP->CreateFillerObjectAt(junk_address, reloc_end_address - junk_address);
123 123
124 // Add the deoptimizing code to the list. 124 // Add the deoptimizing code to the list.
125 DeoptimizingCodeListNode* node = new DeoptimizingCodeListNode(code); 125 DeoptimizingCodeListNode* node = new DeoptimizingCodeListNode(code);
126 DeoptimizerData* data = Isolate::Current()->deoptimizer_data(); 126 DeoptimizerData* data = code->GetIsolate()->deoptimizer_data();
127 node->set_next(data->deoptimizing_code_list_); 127 node->set_next(data->deoptimizing_code_list_);
128 data->deoptimizing_code_list_ = node; 128 data->deoptimizing_code_list_ = node;
129 129
130 // Set the code for the function to non-optimized version. 130 // Set the code for the function to non-optimized version.
131 function->ReplaceCode(function->shared()->code()); 131 function->ReplaceCode(function->shared()->code());
132 132
133 if (FLAG_trace_deopt) { 133 if (FLAG_trace_deopt) {
134 PrintF("[forced deoptimization: "); 134 PrintF("[forced deoptimization: ");
135 function->PrintName(); 135 function->PrintName();
136 PrintF(" / %x]\n", reinterpret_cast<uint32_t>(function)); 136 PrintF(" / %x]\n", reinterpret_cast<uint32_t>(function));
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 // Setup the frame pointer and the context pointer. 318 // Setup the frame pointer and the context pointer.
319 output_[0]->SetRegister(ebp.code(), input_->GetRegister(ebp.code())); 319 output_[0]->SetRegister(ebp.code(), input_->GetRegister(ebp.code()));
320 output_[0]->SetRegister(esi.code(), input_->GetRegister(esi.code())); 320 output_[0]->SetRegister(esi.code(), input_->GetRegister(esi.code()));
321 321
322 unsigned pc_offset = data->OsrPcOffset()->value(); 322 unsigned pc_offset = data->OsrPcOffset()->value();
323 uint32_t pc = reinterpret_cast<uint32_t>( 323 uint32_t pc = reinterpret_cast<uint32_t>(
324 optimized_code_->entry() + pc_offset); 324 optimized_code_->entry() + pc_offset);
325 output_[0]->SetPc(pc); 325 output_[0]->SetPc(pc);
326 } 326 }
327 Code* continuation = 327 Code* continuation =
328 Isolate::Current()->builtins()->builtin(Builtins::NotifyOSR); 328 function->GetIsolate()->builtins()->builtin(Builtins::NotifyOSR);
329 output_[0]->SetContinuation( 329 output_[0]->SetContinuation(
330 reinterpret_cast<uint32_t>(continuation->entry())); 330 reinterpret_cast<uint32_t>(continuation->entry()));
331 331
332 if (FLAG_trace_osr) { 332 if (FLAG_trace_osr) {
333 PrintF("[on-stack replacement translation %s: 0x%08" V8PRIxPTR " ", 333 PrintF("[on-stack replacement translation %s: 0x%08" V8PRIxPTR " ",
334 ok ? "finished" : "aborted", 334 ok ? "finished" : "aborted",
335 reinterpret_cast<intptr_t>(function)); 335 reinterpret_cast<intptr_t>(function));
336 function->PrintName(); 336 function->PrintName();
337 PrintF(" => pc=0x%0x]\n", output_[0]->GetPc()); 337 PrintF(" => pc=0x%0x]\n", output_[0]->GetPc());
338 } 338 }
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
667 } 667 }
668 __ bind(&done); 668 __ bind(&done);
669 } 669 }
670 670
671 #undef __ 671 #undef __
672 672
673 673
674 } } // namespace v8::internal 674 } } // namespace v8::internal
675 675
676 #endif // V8_TARGET_ARCH_IA32 676 #endif // V8_TARGET_ARCH_IA32
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698