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

Side by Side Diff: src/x64/lithium-codegen-x64.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/x64/lithium-codegen-x64.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 352 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 } 363 }
364 364
365 365
366 bool LCodeGen::GenerateDeferredCode() { 366 bool LCodeGen::GenerateDeferredCode() {
367 ASSERT(is_generating()); 367 ASSERT(is_generating());
368 if (deferred_.length() > 0) { 368 if (deferred_.length() > 0) {
369 for (int i = 0; !is_aborted() && i < deferred_.length(); i++) { 369 for (int i = 0; !is_aborted() && i < deferred_.length(); i++) {
370 LDeferredCode* code = deferred_[i]; 370 LDeferredCode* code = deferred_[i];
371 __ bind(code->entry()); 371 __ bind(code->entry());
372 if (NeedsDeferredFrame()) { 372 if (NeedsDeferredFrame()) {
373 Comment(";;; Deferred build frame", 373 Comment(";;; Deferred build frame @%d: %s.",
374 code->instruction_index(), 374 code->instruction_index(),
375 code->instr()->Mnemonic()); 375 code->instr()->Mnemonic());
376 ASSERT(!frame_is_built_); 376 ASSERT(!frame_is_built_);
377 ASSERT(info()->IsStub()); 377 ASSERT(info()->IsStub());
378 frame_is_built_ = true; 378 frame_is_built_ = true;
379 // Build the frame in such a way that esi isn't trashed. 379 // Build the frame in such a way that esi isn't trashed.
380 __ push(rbp); // Caller's frame pointer. 380 __ push(rbp); // Caller's frame pointer.
381 __ push(Operand(rbp, StandardFrameConstants::kContextOffset)); 381 __ push(Operand(rbp, StandardFrameConstants::kContextOffset));
382 __ Push(Smi::FromInt(StackFrame::STUB)); 382 __ Push(Smi::FromInt(StackFrame::STUB));
383 __ lea(rbp, Operand(rsp, 2 * kPointerSize)); 383 __ lea(rbp, Operand(rsp, 2 * kPointerSize));
384 } 384 }
385 Comment(";;; Deferred code @%d: %s.", 385 Comment(";;; Deferred code @%d: %s.",
386 code->instruction_index(), 386 code->instruction_index(),
387 code->instr()->Mnemonic()); 387 code->instr()->Mnemonic());
388 code->Generate(); 388 code->Generate();
389 if (NeedsDeferredFrame()) { 389 if (NeedsDeferredFrame()) {
390 Comment(";;; Deferred destroy frame", 390 Comment(";;; Deferred destroy frame @%d: %s.",
391 code->instruction_index(), 391 code->instruction_index(),
392 code->instr()->Mnemonic()); 392 code->instr()->Mnemonic());
393 ASSERT(frame_is_built_); 393 ASSERT(frame_is_built_);
394 frame_is_built_ = false; 394 frame_is_built_ = false;
395 __ movq(rsp, rbp); 395 __ movq(rsp, rbp);
396 __ pop(rbp); 396 __ pop(rbp);
397 } 397 }
398 __ jmp(code->exit()); 398 __ jmp(code->exit());
399 } 399 }
400 } 400 }
(...skipping 518 matching lines...) Expand 10 before | Expand all | Expand 10 after
919 } 919 }
920 920
921 921
922 void LCodeGen::RecordPosition(int position) { 922 void LCodeGen::RecordPosition(int position) {
923 if (position == RelocInfo::kNoPosition) return; 923 if (position == RelocInfo::kNoPosition) return;
924 masm()->positions_recorder()->RecordPosition(position); 924 masm()->positions_recorder()->RecordPosition(position);
925 } 925 }
926 926
927 927
928 void LCodeGen::DoLabel(LLabel* label) { 928 void LCodeGen::DoLabel(LLabel* label) {
929 if (label->is_loop_header()) { 929 Comment(";;; -------------------- B%d%s --------------------",
930 Comment(";;; B%d - LOOP entry", label->block_id()); 930 label->block_id(),
931 } else { 931 label->is_loop_header() ? " (loop header)" : "");
932 Comment(";;; B%d", label->block_id());
933 }
934 __ bind(label->label()); 932 __ bind(label->label());
935 current_block_ = label->block_id(); 933 current_block_ = label->block_id();
936 DoGap(label); 934 DoGap(label);
937 } 935 }
938 936
939 937
940 void LCodeGen::DoParallelMove(LParallelMove* move) { 938 void LCodeGen::DoParallelMove(LParallelMove* move) {
941 resolver_.Resolve(move); 939 resolver_.Resolve(move);
942 } 940 }
943 941
(...skipping 4719 matching lines...) Expand 10 before | Expand all | Expand 10 after
5663 FixedArray::kHeaderSize - kPointerSize)); 5661 FixedArray::kHeaderSize - kPointerSize));
5664 __ bind(&done); 5662 __ bind(&done);
5665 } 5663 }
5666 5664
5667 5665
5668 #undef __ 5666 #undef __
5669 5667
5670 } } // namespace v8::internal 5668 } } // namespace v8::internal
5671 5669
5672 #endif // V8_TARGET_ARCH_X64 5670 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/lithium-codegen-x64.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698