OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/codegen.h" | 7 #include "src/codegen.h" |
8 #include "src/deoptimizer.h" | 8 #include "src/deoptimizer.h" |
9 #include "src/full-codegen.h" | 9 #include "src/full-codegen.h" |
10 #include "src/safepoint-table.h" | 10 #include "src/safepoint-table.h" |
11 | 11 |
12 namespace v8 { | 12 namespace v8 { |
13 namespace internal { | 13 namespace internal { |
14 | 14 |
15 const int Deoptimizer::table_entry_size_ = 12; | 15 const int Deoptimizer::table_entry_size_ = 8; |
16 | 16 |
17 | 17 |
18 int Deoptimizer::patch_size() { | 18 int Deoptimizer::patch_size() { |
19 const int kCallInstructionSizeInWords = 3; | 19 const int kCallInstructionSizeInWords = 3; |
20 return kCallInstructionSizeInWords * Assembler::kInstrSize; | 20 return kCallInstructionSizeInWords * Assembler::kInstrSize; |
21 } | 21 } |
22 | 22 |
23 | 23 |
24 void Deoptimizer::PatchCodeForDeoptimization(Isolate* isolate, Code* code) { | 24 void Deoptimizer::PatchCodeForDeoptimization(Isolate* isolate, Code* code) { |
25 Address code_start_address = code->instruction_start(); | 25 Address code_start_address = code->instruction_start(); |
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
321 | 321 |
322 | 322 |
323 void Deoptimizer::TableEntryGenerator::GeneratePrologue() { | 323 void Deoptimizer::TableEntryGenerator::GeneratePrologue() { |
324 // Create a sequence of deoptimization entries. | 324 // Create a sequence of deoptimization entries. |
325 // Note that registers are still live when jumping to an entry. | 325 // Note that registers are still live when jumping to an entry. |
326 Label done; | 326 Label done; |
327 for (int i = 0; i < count(); i++) { | 327 for (int i = 0; i < count(); i++) { |
328 int start = masm()->pc_offset(); | 328 int start = masm()->pc_offset(); |
329 USE(start); | 329 USE(start); |
330 __ mov(ip, Operand(i)); | 330 __ mov(ip, Operand(i)); |
331 __ push(ip); | |
332 __ b(&done); | 331 __ b(&done); |
333 ASSERT(masm()->pc_offset() - start == table_entry_size_); | 332 ASSERT(masm()->pc_offset() - start == table_entry_size_); |
334 } | 333 } |
335 __ bind(&done); | 334 __ bind(&done); |
| 335 __ push(ip); |
336 } | 336 } |
337 | 337 |
338 | 338 |
339 void FrameDescription::SetCallerPc(unsigned offset, intptr_t value) { | 339 void FrameDescription::SetCallerPc(unsigned offset, intptr_t value) { |
340 SetFrameSlot(offset, value); | 340 SetFrameSlot(offset, value); |
341 } | 341 } |
342 | 342 |
343 | 343 |
344 void FrameDescription::SetCallerFp(unsigned offset, intptr_t value) { | 344 void FrameDescription::SetCallerFp(unsigned offset, intptr_t value) { |
345 SetFrameSlot(offset, value); | 345 SetFrameSlot(offset, value); |
346 } | 346 } |
347 | 347 |
348 | 348 |
349 void FrameDescription::SetCallerConstantPool(unsigned offset, intptr_t value) { | 349 void FrameDescription::SetCallerConstantPool(unsigned offset, intptr_t value) { |
350 ASSERT(FLAG_enable_ool_constant_pool); | 350 ASSERT(FLAG_enable_ool_constant_pool); |
351 SetFrameSlot(offset, value); | 351 SetFrameSlot(offset, value); |
352 } | 352 } |
353 | 353 |
354 | 354 |
355 #undef __ | 355 #undef __ |
356 | 356 |
357 } } // namespace v8::internal | 357 } } // namespace v8::internal |
OLD | NEW |