| 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 449 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 460 } | 460 } |
| 461 | 461 |
| 462 | 462 |
| 463 bool LCodeGen::GenerateDeferredCode() { | 463 bool LCodeGen::GenerateDeferredCode() { |
| 464 ASSERT(is_generating()); | 464 ASSERT(is_generating()); |
| 465 if (deferred_.length() > 0) { | 465 if (deferred_.length() > 0) { |
| 466 for (int i = 0; !is_aborted() && i < deferred_.length(); i++) { | 466 for (int i = 0; !is_aborted() && i < deferred_.length(); i++) { |
| 467 LDeferredCode* code = deferred_[i]; | 467 LDeferredCode* code = deferred_[i]; |
| 468 __ bind(code->entry()); | 468 __ bind(code->entry()); |
| 469 if (NeedsDeferredFrame()) { | 469 if (NeedsDeferredFrame()) { |
| 470 Comment(";;; Deferred build frame", | 470 Comment(";;; Deferred build frame @%d: %s.", |
| 471 code->instruction_index(), | 471 code->instruction_index(), |
| 472 code->instr()->Mnemonic()); | 472 code->instr()->Mnemonic()); |
| 473 ASSERT(!frame_is_built_); | 473 ASSERT(!frame_is_built_); |
| 474 ASSERT(info()->IsStub()); | 474 ASSERT(info()->IsStub()); |
| 475 frame_is_built_ = true; | 475 frame_is_built_ = true; |
| 476 // Build the frame in such a way that esi isn't trashed. | 476 // Build the frame in such a way that esi isn't trashed. |
| 477 __ push(ebp); // Caller's frame pointer. | 477 __ push(ebp); // Caller's frame pointer. |
| 478 __ push(Operand(ebp, StandardFrameConstants::kContextOffset)); | 478 __ push(Operand(ebp, StandardFrameConstants::kContextOffset)); |
| 479 __ push(Immediate(Smi::FromInt(StackFrame::STUB))); | 479 __ push(Immediate(Smi::FromInt(StackFrame::STUB))); |
| 480 __ lea(ebp, Operand(esp, 2 * kPointerSize)); | 480 __ lea(ebp, Operand(esp, 2 * kPointerSize)); |
| 481 } | 481 } |
| 482 Comment(";;; Deferred code @%d: %s.", | 482 Comment(";;; Deferred code @%d: %s.", |
| 483 code->instruction_index(), | 483 code->instruction_index(), |
| 484 code->instr()->Mnemonic()); | 484 code->instr()->Mnemonic()); |
| 485 code->Generate(); | 485 code->Generate(); |
| 486 if (NeedsDeferredFrame()) { | 486 if (NeedsDeferredFrame()) { |
| 487 Comment(";;; Deferred destroy frame", | 487 Comment(";;; Deferred destroy frame @%d: %s.", |
| 488 code->instruction_index(), | 488 code->instruction_index(), |
| 489 code->instr()->Mnemonic()); | 489 code->instr()->Mnemonic()); |
| 490 ASSERT(frame_is_built_); | 490 ASSERT(frame_is_built_); |
| 491 frame_is_built_ = false; | 491 frame_is_built_ = false; |
| 492 __ mov(esp, ebp); | 492 __ mov(esp, ebp); |
| 493 __ pop(ebp); | 493 __ pop(ebp); |
| 494 } | 494 } |
| 495 __ jmp(code->exit()); | 495 __ jmp(code->exit()); |
| 496 } | 496 } |
| 497 } | 497 } |
| (...skipping 621 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1119 } | 1119 } |
| 1120 | 1120 |
| 1121 | 1121 |
| 1122 void LCodeGen::RecordPosition(int position) { | 1122 void LCodeGen::RecordPosition(int position) { |
| 1123 if (position == RelocInfo::kNoPosition) return; | 1123 if (position == RelocInfo::kNoPosition) return; |
| 1124 masm()->positions_recorder()->RecordPosition(position); | 1124 masm()->positions_recorder()->RecordPosition(position); |
| 1125 } | 1125 } |
| 1126 | 1126 |
| 1127 | 1127 |
| 1128 void LCodeGen::DoLabel(LLabel* label) { | 1128 void LCodeGen::DoLabel(LLabel* label) { |
| 1129 if (label->is_loop_header()) { | 1129 Comment(";;; -------------------- B%d%s --------------------", |
| 1130 Comment(";;; B%d - LOOP entry", label->block_id()); | 1130 label->block_id(), |
| 1131 } else { | 1131 label->is_loop_header() ? " (loop header)" : ""); |
| 1132 Comment(";;; B%d", label->block_id()); | |
| 1133 } | |
| 1134 __ bind(label->label()); | 1132 __ bind(label->label()); |
| 1135 current_block_ = label->block_id(); | 1133 current_block_ = label->block_id(); |
| 1136 DoGap(label); | 1134 DoGap(label); |
| 1137 } | 1135 } |
| 1138 | 1136 |
| 1139 | 1137 |
| 1140 void LCodeGen::DoParallelMove(LParallelMove* move) { | 1138 void LCodeGen::DoParallelMove(LParallelMove* move) { |
| 1141 resolver_.Resolve(move); | 1139 resolver_.Resolve(move); |
| 1142 } | 1140 } |
| 1143 | 1141 |
| (...skipping 5409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6553 FixedArray::kHeaderSize - kPointerSize)); | 6551 FixedArray::kHeaderSize - kPointerSize)); |
| 6554 __ bind(&done); | 6552 __ bind(&done); |
| 6555 } | 6553 } |
| 6556 | 6554 |
| 6557 | 6555 |
| 6558 #undef __ | 6556 #undef __ |
| 6559 | 6557 |
| 6560 } } // namespace v8::internal | 6558 } } // namespace v8::internal |
| 6561 | 6559 |
| 6562 #endif // V8_TARGET_ARCH_IA32 | 6560 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |