Reviewers: Toon Verwaest,
Description:
Cleaned up and fixed code comment handling a bit.
* Let GCC check the arguments of LCodeGen::Coment.
* Fixed a few call sites.
* Made basic blocks a little bit more visible in the code output.
* Sorted #includes.
Please review this at https://codereview.chromium.org/14079007/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files:
M src/arm/lithium-codegen-arm.h
M src/arm/lithium-codegen-arm.cc
M src/ia32/lithium-codegen-ia32.h
M src/ia32/lithium-codegen-ia32.cc
M src/mips/lithium-codegen-mips.h
M src/mips/lithium-codegen-mips.cc
M src/x64/lithium-codegen-x64.h
M src/x64/lithium-codegen-x64.cc
Index: src/arm/lithium-codegen-arm.cc
diff --git a/src/arm/lithium-codegen-arm.cc b/src/arm/lithium-codegen-arm.cc
index
01011ef692713d179024edf9bcccdc91454373b4..c20bd37e6127ede66cd943830d7e291ea6126944
100644
--- a/src/arm/lithium-codegen-arm.cc
+++ b/src/arm/lithium-codegen-arm.cc
@@ -304,7 +304,7 @@ bool LCodeGen::GenerateDeferredCode() {
LDeferredCode* code = deferred_[i];
__ bind(code->entry());
if (NeedsDeferredFrame()) {
- Comment(";;; Deferred build frame",
+ Comment(";;; Deferred build frame @%d: %s.",
code->instruction_index(),
code->instr()->Mnemonic());
ASSERT(!frame_is_built_);
@@ -320,7 +320,7 @@ bool LCodeGen::GenerateDeferredCode() {
code->instr()->Mnemonic());
code->Generate();
if (NeedsDeferredFrame()) {
- Comment(";;; Deferred destroy frame",
+ Comment(";;; Deferred destroy frame @%d: %s.",
code->instruction_index(),
code->instr()->Mnemonic());
ASSERT(frame_is_built_);
Index: src/arm/lithium-codegen-arm.h
diff --git a/src/arm/lithium-codegen-arm.h b/src/arm/lithium-codegen-arm.h
index
3e24dae54c89da7b801058386bdfc7d0b738917b..c55558cff5a99577058425406ac7f845153bb2ed
100644
--- a/src/arm/lithium-codegen-arm.h
+++ b/src/arm/lithium-codegen-arm.h
@@ -29,10 +29,12 @@
#define V8_ARM_LITHIUM_CODEGEN_ARM_H_
#include "arm/lithium-arm.h"
+
#include "arm/lithium-gap-resolver-arm.h"
#include "deoptimizer.h"
#include "safepoint-table.h"
#include "scopes.h"
+#include "v8utils.h"
namespace v8 {
namespace internal {
@@ -211,7 +213,7 @@ class LCodeGen BASE_EMBEDDED {
int GetStackSlotCount() const { return chunk()->spill_slot_count(); }
void Abort(const char* reason);
- void Comment(const char* format, ...);
+ void FPRINTF_CHECKING Comment(const char* format, ...);
void AddDeferredCode(LDeferredCode* code) { deferred_.Add(code, zone());
}
Index: src/ia32/lithium-codegen-ia32.cc
diff --git a/src/ia32/lithium-codegen-ia32.cc
b/src/ia32/lithium-codegen-ia32.cc
index
bc6f5cb5d92f59ceba80c4d7788d7c1ca05cd3b9..665c85e827a015d76d0216f1be3a5c85f2419702
100644
--- a/src/ia32/lithium-codegen-ia32.cc
+++ b/src/ia32/lithium-codegen-ia32.cc
@@ -467,7 +467,7 @@ bool LCodeGen::GenerateDeferredCode() {
LDeferredCode* code = deferred_[i];
__ bind(code->entry());
if (NeedsDeferredFrame()) {
- Comment(";;; Deferred build frame",
+ Comment(";;; Deferred build frame @%d: %s.",
code->instruction_index(),
code->instr()->Mnemonic());
ASSERT(!frame_is_built_);
@@ -484,7 +484,7 @@ bool LCodeGen::GenerateDeferredCode() {
code->instr()->Mnemonic());
code->Generate();
if (NeedsDeferredFrame()) {
- Comment(";;; Deferred destroy frame",
+ Comment(";;; Deferred destroy frame @%d: %s.",
code->instruction_index(),
code->instr()->Mnemonic());
ASSERT(frame_is_built_);
@@ -1126,11 +1126,9 @@ void LCodeGen::RecordPosition(int position) {
void LCodeGen::DoLabel(LLabel* label) {
- if (label->is_loop_header()) {
- Comment(";;; B%d - LOOP entry", label->block_id());
- } else {
- Comment(";;; B%d", label->block_id());
- }
+ Comment(";;; -------------------- B%d%s --------------------",
+ label->block_id(),
+ label->is_loop_header() ? " (loop header)" : "");
__ bind(label->label());
current_block_ = label->block_id();
DoGap(label);
Index: src/ia32/lithium-codegen-ia32.h
diff --git a/src/ia32/lithium-codegen-ia32.h
b/src/ia32/lithium-codegen-ia32.h
index
362f091d2bf8ae2c93c7dd503a88212f180807fb..b268456b7d6e17c60a654ab25318fc75c5307c05
100644
--- a/src/ia32/lithium-codegen-ia32.h
+++ b/src/ia32/lithium-codegen-ia32.h
@@ -32,9 +32,10 @@
#include "checks.h"
#include "deoptimizer.h"
+#include "ia32/lithium-gap-resolver-ia32.h"
#include "safepoint-table.h"
#include "scopes.h"
-#include "ia32/lithium-gap-resolver-ia32.h"
+#include "v8utils.h"
namespace v8 {
namespace internal {
@@ -201,7 +202,7 @@ class LCodeGen BASE_EMBEDDED {
int GetStackSlotCount() const { return chunk()->spill_slot_count(); }
void Abort(const char* reason);
- void Comment(const char* format, ...);
+ void FPRINTF_CHECKING Comment(const char* format, ...);
void AddDeferredCode(LDeferredCode* code) { deferred_.Add(code, zone());
}
Index: src/mips/lithium-codegen-mips.cc
diff --git a/src/mips/lithium-codegen-mips.cc
b/src/mips/lithium-codegen-mips.cc
index
59cfcd900025d3a42e02a691c9b5651d7697c613..4376c4b0937a6b5b78e77a11afd3054145055b6a
100644
--- a/src/mips/lithium-codegen-mips.cc
+++ b/src/mips/lithium-codegen-mips.cc
@@ -301,7 +301,7 @@ bool LCodeGen::GenerateDeferredCode() {
LDeferredCode* code = deferred_[i];
__ bind(code->entry());
if (NeedsDeferredFrame()) {
- Comment(";;; Deferred build frame",
+ Comment(";;; Deferred build frame @%d: %s.",
code->instruction_index(),
code->instr()->Mnemonic());
ASSERT(!frame_is_built_);
@@ -317,7 +317,7 @@ bool LCodeGen::GenerateDeferredCode() {
code->instr()->Mnemonic());
code->Generate();
if (NeedsDeferredFrame()) {
- Comment(";;; Deferred destroy frame",
+ Comment(";;; Deferred destroy frame @%d: %s.",
code->instruction_index(),
code->instr()->Mnemonic());
ASSERT(frame_is_built_);
Index: src/mips/lithium-codegen-mips.h
diff --git a/src/mips/lithium-codegen-mips.h
b/src/mips/lithium-codegen-mips.h
index
a1bc4ba4dcf58976ffce897dd86cf2dfeafce15b..01d0ffcbeea7731f0823b55238392c4b451f15e7
100644
--- a/src/mips/lithium-codegen-mips.h
+++ b/src/mips/lithium-codegen-mips.h
@@ -28,11 +28,12 @@
#ifndef V8_MIPS_LITHIUM_CODEGEN_MIPS_H_
#define V8_MIPS_LITHIUM_CODEGEN_MIPS_H_
-#include "mips/lithium-mips.h"
-#include "mips/lithium-gap-resolver-mips.h"
#include "deoptimizer.h"
+#include "mips/lithium-gap-resolver-mips.h"
+#include "mips/lithium-mips.h"
#include "safepoint-table.h"
#include "scopes.h"
+#include "v8utils.h"
namespace v8 {
namespace internal {
@@ -207,7 +208,7 @@ class LCodeGen BASE_EMBEDDED {
int GetStackSlotCount() const { return chunk()->spill_slot_count(); }
void Abort(const char* reason);
- void Comment(const char* format, ...);
+ void FPRINTF_CHECKING Comment(const char* format, ...);
void AddDeferredCode(LDeferredCode* code) { deferred_.Add(code, zone());
}
Index: src/x64/lithium-codegen-x64.cc
diff --git a/src/x64/lithium-codegen-x64.cc b/src/x64/lithium-codegen-x64.cc
index
fb5dd5934927de68c99ea4dc302c621a633d9268..c43547e0d432dfcfbb5c8e0914d7c964686c287b
100644
--- a/src/x64/lithium-codegen-x64.cc
+++ b/src/x64/lithium-codegen-x64.cc
@@ -370,7 +370,7 @@ bool LCodeGen::GenerateDeferredCode() {
LDeferredCode* code = deferred_[i];
__ bind(code->entry());
if (NeedsDeferredFrame()) {
- Comment(";;; Deferred build frame",
+ Comment(";;; Deferred build frame @%d: %s.",
code->instruction_index(),
code->instr()->Mnemonic());
ASSERT(!frame_is_built_);
@@ -387,7 +387,7 @@ bool LCodeGen::GenerateDeferredCode() {
code->instr()->Mnemonic());
code->Generate();
if (NeedsDeferredFrame()) {
- Comment(";;; Deferred destroy frame",
+ Comment(";;; Deferred destroy frame @%d: %s.",
code->instruction_index(),
code->instr()->Mnemonic());
ASSERT(frame_is_built_);
Index: src/x64/lithium-codegen-x64.h
diff --git a/src/x64/lithium-codegen-x64.h b/src/x64/lithium-codegen-x64.h
index
e8576068307cc4d484d1dcd6a5b5dc9b9cc1f148..adcc3e5b266f7fd18df5da1656be7256ac213733
100644
--- a/src/x64/lithium-codegen-x64.h
+++ b/src/x64/lithium-codegen-x64.h
@@ -34,6 +34,7 @@
#include "deoptimizer.h"
#include "safepoint-table.h"
#include "scopes.h"
+#include "v8utils.h"
#include "x64/lithium-gap-resolver-x64.h"
namespace v8 {
@@ -172,7 +173,7 @@ class LCodeGen BASE_EMBEDDED {
int GetStackSlotCount() const { return chunk()->spill_slot_count(); }
void Abort(const char* reason);
- void Comment(const char* format, ...);
+ void FPRINTF_CHECKING Comment(const char* format, ...);
void AddDeferredCode(LDeferredCode* code) { deferred_.Add(code, zone());
}
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.