OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
323 } | 323 } |
324 | 324 |
325 __ RecordComment("[ Deoptimisation jump table"); | 325 __ RecordComment("[ Deoptimisation jump table"); |
326 Label table_start; | 326 Label table_start; |
327 __ bind(&table_start); | 327 __ bind(&table_start); |
328 Label needs_frame_not_call; | 328 Label needs_frame_not_call; |
329 Label needs_frame_is_call; | 329 Label needs_frame_is_call; |
330 for (int i = 0; i < deopt_jump_table_.length(); i++) { | 330 for (int i = 0; i < deopt_jump_table_.length(); i++) { |
331 __ bind(&deopt_jump_table_[i].label); | 331 __ bind(&deopt_jump_table_[i].label); |
332 Address entry = deopt_jump_table_[i].address; | 332 Address entry = deopt_jump_table_[i].address; |
| 333 bool is_lazy_deopt = deopt_jump_table_[i].is_lazy_deopt; |
| 334 Deoptimizer::BailoutType type = |
| 335 is_lazy_deopt ? Deoptimizer::LAZY : Deoptimizer::EAGER; |
| 336 int id = Deoptimizer::GetDeoptimizationId(entry, type); |
| 337 if (id == Deoptimizer::kNotDeoptimizationEntry) { |
| 338 Comment(";;; jump table entry %d.", i); |
| 339 } else { |
| 340 Comment(";;; jump table entry %d: deoptimization bailout %d.", i, id); |
| 341 } |
333 if (deopt_jump_table_[i].needs_frame) { | 342 if (deopt_jump_table_[i].needs_frame) { |
334 __ mov(ip, Operand(ExternalReference::ForDeoptEntry(entry))); | 343 __ mov(ip, Operand(ExternalReference::ForDeoptEntry(entry))); |
335 if (deopt_jump_table_[i].is_lazy_deopt) { | 344 if (is_lazy_deopt) { |
336 if (needs_frame_is_call.is_bound()) { | 345 if (needs_frame_is_call.is_bound()) { |
337 __ b(&needs_frame_is_call); | 346 __ b(&needs_frame_is_call); |
338 } else { | 347 } else { |
339 __ bind(&needs_frame_is_call); | 348 __ bind(&needs_frame_is_call); |
340 __ stm(db_w, sp, cp.bit() | fp.bit() | lr.bit()); | 349 __ stm(db_w, sp, cp.bit() | fp.bit() | lr.bit()); |
341 // This variant of deopt can only be used with stubs. Since we don't | 350 // This variant of deopt can only be used with stubs. Since we don't |
342 // have a function pointer to install in the stack frame that we're | 351 // have a function pointer to install in the stack frame that we're |
343 // building, install a special marker there instead. | 352 // building, install a special marker there instead. |
344 ASSERT(info()->IsStub()); | 353 ASSERT(info()->IsStub()); |
345 __ mov(scratch0(), Operand(Smi::FromInt(StackFrame::STUB))); | 354 __ mov(scratch0(), Operand(Smi::FromInt(StackFrame::STUB))); |
(...skipping 12 matching lines...) Expand all Loading... |
358 // have a function pointer to install in the stack frame that we're | 367 // have a function pointer to install in the stack frame that we're |
359 // building, install a special marker there instead. | 368 // building, install a special marker there instead. |
360 ASSERT(info()->IsStub()); | 369 ASSERT(info()->IsStub()); |
361 __ mov(scratch0(), Operand(Smi::FromInt(StackFrame::STUB))); | 370 __ mov(scratch0(), Operand(Smi::FromInt(StackFrame::STUB))); |
362 __ push(scratch0()); | 371 __ push(scratch0()); |
363 __ add(fp, sp, Operand(2 * kPointerSize)); | 372 __ add(fp, sp, Operand(2 * kPointerSize)); |
364 __ mov(pc, ip); | 373 __ mov(pc, ip); |
365 } | 374 } |
366 } | 375 } |
367 } else { | 376 } else { |
368 if (deopt_jump_table_[i].is_lazy_deopt) { | 377 if (is_lazy_deopt) { |
369 __ mov(lr, Operand(pc), LeaveCC, al); | 378 __ mov(lr, Operand(pc), LeaveCC, al); |
370 __ mov(pc, Operand(ExternalReference::ForDeoptEntry(entry))); | 379 __ mov(pc, Operand(ExternalReference::ForDeoptEntry(entry))); |
371 } else { | 380 } else { |
372 __ mov(pc, Operand(ExternalReference::ForDeoptEntry(entry))); | 381 __ mov(pc, Operand(ExternalReference::ForDeoptEntry(entry))); |
373 } | 382 } |
374 } | 383 } |
375 masm()->CheckConstPool(false, false); | 384 masm()->CheckConstPool(false, false); |
376 } | 385 } |
377 __ RecordComment("]"); | 386 __ RecordComment("]"); |
378 | 387 |
(...skipping 5721 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6100 __ sub(scratch, result, Operand(index, LSL, kPointerSizeLog2 - kSmiTagSize)); | 6109 __ sub(scratch, result, Operand(index, LSL, kPointerSizeLog2 - kSmiTagSize)); |
6101 __ ldr(result, FieldMemOperand(scratch, | 6110 __ ldr(result, FieldMemOperand(scratch, |
6102 FixedArray::kHeaderSize - kPointerSize)); | 6111 FixedArray::kHeaderSize - kPointerSize)); |
6103 __ bind(&done); | 6112 __ bind(&done); |
6104 } | 6113 } |
6105 | 6114 |
6106 | 6115 |
6107 #undef __ | 6116 #undef __ |
6108 | 6117 |
6109 } } // namespace v8::internal | 6118 } } // namespace v8::internal |
OLD | NEW |