| 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 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 294 } | 294 } |
| 295 | 295 |
| 296 | 296 |
| 297 bool LCodeGen::GenerateDeferredCode() { | 297 bool LCodeGen::GenerateDeferredCode() { |
| 298 ASSERT(is_generating()); | 298 ASSERT(is_generating()); |
| 299 if (deferred_.length() > 0) { | 299 if (deferred_.length() > 0) { |
| 300 for (int i = 0; !is_aborted() && i < deferred_.length(); i++) { | 300 for (int i = 0; !is_aborted() && i < deferred_.length(); i++) { |
| 301 LDeferredCode* code = deferred_[i]; | 301 LDeferredCode* code = deferred_[i]; |
| 302 __ bind(code->entry()); | 302 __ bind(code->entry()); |
| 303 if (NeedsDeferredFrame()) { | 303 if (NeedsDeferredFrame()) { |
| 304 Comment(";;; Deferred build frame", | 304 Comment(";;; Deferred build frame @%d: %s.", |
| 305 code->instruction_index(), | 305 code->instruction_index(), |
| 306 code->instr()->Mnemonic()); | 306 code->instr()->Mnemonic()); |
| 307 ASSERT(!frame_is_built_); | 307 ASSERT(!frame_is_built_); |
| 308 ASSERT(info()->IsStub()); | 308 ASSERT(info()->IsStub()); |
| 309 frame_is_built_ = true; | 309 frame_is_built_ = true; |
| 310 __ MultiPush(cp.bit() | fp.bit() | ra.bit()); | 310 __ MultiPush(cp.bit() | fp.bit() | ra.bit()); |
| 311 __ li(scratch0(), Operand(Smi::FromInt(StackFrame::STUB))); | 311 __ li(scratch0(), Operand(Smi::FromInt(StackFrame::STUB))); |
| 312 __ push(scratch0()); | 312 __ push(scratch0()); |
| 313 __ Addu(fp, sp, Operand(2 * kPointerSize)); | 313 __ Addu(fp, sp, Operand(2 * kPointerSize)); |
| 314 } | 314 } |
| 315 Comment(";;; Deferred code @%d: %s.", | 315 Comment(";;; Deferred code @%d: %s.", |
| 316 code->instruction_index(), | 316 code->instruction_index(), |
| 317 code->instr()->Mnemonic()); | 317 code->instr()->Mnemonic()); |
| 318 code->Generate(); | 318 code->Generate(); |
| 319 if (NeedsDeferredFrame()) { | 319 if (NeedsDeferredFrame()) { |
| 320 Comment(";;; Deferred destroy frame", | 320 Comment(";;; Deferred destroy frame @%d: %s.", |
| 321 code->instruction_index(), | 321 code->instruction_index(), |
| 322 code->instr()->Mnemonic()); | 322 code->instr()->Mnemonic()); |
| 323 ASSERT(frame_is_built_); | 323 ASSERT(frame_is_built_); |
| 324 __ pop(at); | 324 __ pop(at); |
| 325 __ MultiPop(cp.bit() | fp.bit() | ra.bit()); | 325 __ MultiPop(cp.bit() | fp.bit() | ra.bit()); |
| 326 frame_is_built_ = false; | 326 frame_is_built_ = false; |
| 327 } | 327 } |
| 328 __ jmp(code->exit()); | 328 __ jmp(code->exit()); |
| 329 } | 329 } |
| 330 } | 330 } |
| (...skipping 686 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1017 } | 1017 } |
| 1018 | 1018 |
| 1019 | 1019 |
| 1020 void LCodeGen::RecordPosition(int position) { | 1020 void LCodeGen::RecordPosition(int position) { |
| 1021 if (position == RelocInfo::kNoPosition) return; | 1021 if (position == RelocInfo::kNoPosition) return; |
| 1022 masm()->positions_recorder()->RecordPosition(position); | 1022 masm()->positions_recorder()->RecordPosition(position); |
| 1023 } | 1023 } |
| 1024 | 1024 |
| 1025 | 1025 |
| 1026 void LCodeGen::DoLabel(LLabel* label) { | 1026 void LCodeGen::DoLabel(LLabel* label) { |
| 1027 if (label->is_loop_header()) { | 1027 Comment(";;; -------------------- B%d%s --------------------", |
| 1028 Comment(";;; B%d - LOOP entry", label->block_id()); | 1028 label->block_id(), |
| 1029 } else { | 1029 label->is_loop_header() ? " (loop header)" : ""); |
| 1030 Comment(";;; B%d", label->block_id()); | |
| 1031 } | |
| 1032 __ bind(label->label()); | 1030 __ bind(label->label()); |
| 1033 current_block_ = label->block_id(); | 1031 current_block_ = label->block_id(); |
| 1034 DoGap(label); | 1032 DoGap(label); |
| 1035 } | 1033 } |
| 1036 | 1034 |
| 1037 | 1035 |
| 1038 void LCodeGen::DoParallelMove(LParallelMove* move) { | 1036 void LCodeGen::DoParallelMove(LParallelMove* move) { |
| 1039 resolver_.Resolve(move); | 1037 resolver_.Resolve(move); |
| 1040 } | 1038 } |
| 1041 | 1039 |
| (...skipping 4680 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5722 __ Subu(scratch, result, scratch); | 5720 __ Subu(scratch, result, scratch); |
| 5723 __ lw(result, FieldMemOperand(scratch, | 5721 __ lw(result, FieldMemOperand(scratch, |
| 5724 FixedArray::kHeaderSize - kPointerSize)); | 5722 FixedArray::kHeaderSize - kPointerSize)); |
| 5725 __ bind(&done); | 5723 __ bind(&done); |
| 5726 } | 5724 } |
| 5727 | 5725 |
| 5728 | 5726 |
| 5729 #undef __ | 5727 #undef __ |
| 5730 | 5728 |
| 5731 } } // namespace v8::internal | 5729 } } // namespace v8::internal |
| OLD | NEW |