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

Side by Side Diff: src/arm/lithium-codegen-arm.cc

Issue 14079007: Cleaned up and fixed code comment handling a bit. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Improved printing of block separator on x64/ARM/MIPS, too Created 7 years, 8 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
« no previous file with comments | « src/arm/lithium-codegen-arm.h ('k') | src/ia32/lithium-codegen-ia32.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 } 297 }
298 298
299 299
300 bool LCodeGen::GenerateDeferredCode() { 300 bool LCodeGen::GenerateDeferredCode() {
301 ASSERT(is_generating()); 301 ASSERT(is_generating());
302 if (deferred_.length() > 0) { 302 if (deferred_.length() > 0) {
303 for (int i = 0; !is_aborted() && i < deferred_.length(); i++) { 303 for (int i = 0; !is_aborted() && i < deferred_.length(); i++) {
304 LDeferredCode* code = deferred_[i]; 304 LDeferredCode* code = deferred_[i];
305 __ bind(code->entry()); 305 __ bind(code->entry());
306 if (NeedsDeferredFrame()) { 306 if (NeedsDeferredFrame()) {
307 Comment(";;; Deferred build frame", 307 Comment(";;; Deferred build frame @%d: %s.",
308 code->instruction_index(), 308 code->instruction_index(),
309 code->instr()->Mnemonic()); 309 code->instr()->Mnemonic());
310 ASSERT(!frame_is_built_); 310 ASSERT(!frame_is_built_);
311 ASSERT(info()->IsStub()); 311 ASSERT(info()->IsStub());
312 frame_is_built_ = true; 312 frame_is_built_ = true;
313 __ stm(db_w, sp, cp.bit() | fp.bit() | lr.bit()); 313 __ stm(db_w, sp, cp.bit() | fp.bit() | lr.bit());
314 __ mov(scratch0(), Operand(Smi::FromInt(StackFrame::STUB))); 314 __ mov(scratch0(), Operand(Smi::FromInt(StackFrame::STUB)));
315 __ push(scratch0()); 315 __ push(scratch0());
316 __ add(fp, sp, Operand(2 * kPointerSize)); 316 __ add(fp, sp, Operand(2 * kPointerSize));
317 } 317 }
318 Comment(";;; Deferred code @%d: %s.", 318 Comment(";;; Deferred code @%d: %s.",
319 code->instruction_index(), 319 code->instruction_index(),
320 code->instr()->Mnemonic()); 320 code->instr()->Mnemonic());
321 code->Generate(); 321 code->Generate();
322 if (NeedsDeferredFrame()) { 322 if (NeedsDeferredFrame()) {
323 Comment(";;; Deferred destroy frame", 323 Comment(";;; Deferred destroy frame @%d: %s.",
324 code->instruction_index(), 324 code->instruction_index(),
325 code->instr()->Mnemonic()); 325 code->instr()->Mnemonic());
326 ASSERT(frame_is_built_); 326 ASSERT(frame_is_built_);
327 __ pop(ip); 327 __ pop(ip);
328 __ ldm(ia_w, sp, cp.bit() | fp.bit() | lr.bit()); 328 __ ldm(ia_w, sp, cp.bit() | fp.bit() | lr.bit());
329 frame_is_built_ = false; 329 frame_is_built_ = false;
330 } 330 }
331 __ jmp(code->exit()); 331 __ jmp(code->exit());
332 } 332 }
333 } 333 }
(...skipping 702 matching lines...) Expand 10 before | Expand all | Expand 10 after
1036 } 1036 }
1037 1037
1038 1038
1039 void LCodeGen::RecordPosition(int position) { 1039 void LCodeGen::RecordPosition(int position) {
1040 if (position == RelocInfo::kNoPosition) return; 1040 if (position == RelocInfo::kNoPosition) return;
1041 masm()->positions_recorder()->RecordPosition(position); 1041 masm()->positions_recorder()->RecordPosition(position);
1042 } 1042 }
1043 1043
1044 1044
1045 void LCodeGen::DoLabel(LLabel* label) { 1045 void LCodeGen::DoLabel(LLabel* label) {
1046 if (label->is_loop_header()) { 1046 Comment(";;; -------------------- B%d%s --------------------",
1047 Comment(";;; B%d - LOOP entry", label->block_id()); 1047 label->block_id(),
1048 } else { 1048 label->is_loop_header() ? " (loop header)" : "");
1049 Comment(";;; B%d", label->block_id());
1050 }
1051 __ bind(label->label()); 1049 __ bind(label->label());
1052 current_block_ = label->block_id(); 1050 current_block_ = label->block_id();
1053 DoGap(label); 1051 DoGap(label);
1054 } 1052 }
1055 1053
1056 1054
1057 void LCodeGen::DoParallelMove(LParallelMove* move) { 1055 void LCodeGen::DoParallelMove(LParallelMove* move) {
1058 resolver_.Resolve(move); 1056 resolver_.Resolve(move);
1059 } 1057 }
1060 1058
(...skipping 4936 matching lines...) Expand 10 before | Expand all | Expand 10 after
5997 __ sub(scratch, result, Operand(index, LSL, kPointerSizeLog2 - kSmiTagSize)); 5995 __ sub(scratch, result, Operand(index, LSL, kPointerSizeLog2 - kSmiTagSize));
5998 __ ldr(result, FieldMemOperand(scratch, 5996 __ ldr(result, FieldMemOperand(scratch,
5999 FixedArray::kHeaderSize - kPointerSize)); 5997 FixedArray::kHeaderSize - kPointerSize));
6000 __ bind(&done); 5998 __ bind(&done);
6001 } 5999 }
6002 6000
6003 6001
6004 #undef __ 6002 #undef __
6005 6003
6006 } } // namespace v8::internal 6004 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/lithium-codegen-arm.h ('k') | src/ia32/lithium-codegen-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698