Commit ce1f6b2a authored by whesse@chromium.org's avatar whesse@chromium.org

Add comment to generated code that says which code generator compiled it.

Review URL: http://codereview.chromium.org/652110

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3932 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 3135110a
...@@ -145,6 +145,7 @@ Scope* CodeGenerator::scope() { return info_->function()->scope(); } ...@@ -145,6 +145,7 @@ Scope* CodeGenerator::scope() { return info_->function()->scope(); }
void CodeGenerator::Generate(CompilationInfo* info) { void CodeGenerator::Generate(CompilationInfo* info) {
// Record the position for debugging purposes. // Record the position for debugging purposes.
CodeForFunctionPosition(info->function()); CodeForFunctionPosition(info->function());
Comment cmnt(masm_, "[ function compiled by virtual frame code generator");
// Initialize state. // Initialize state.
info_ = info; info_ = info;
......
...@@ -179,6 +179,7 @@ void FastCodeGenerator::EmitBitOr() { ...@@ -179,6 +179,7 @@ void FastCodeGenerator::EmitBitOr() {
void FastCodeGenerator::Generate(CompilationInfo* compilation_info) { void FastCodeGenerator::Generate(CompilationInfo* compilation_info) {
ASSERT(info_ == NULL); ASSERT(info_ == NULL);
info_ = compilation_info; info_ = compilation_info;
Comment cmnt(masm_, "[ function compiled by fast code generator");
// Save the caller's frame pointer and set up our own. // Save the caller's frame pointer and set up our own.
Comment prologue_cmnt(masm(), ";; Prologue"); Comment prologue_cmnt(masm(), ";; Prologue");
......
...@@ -56,6 +56,7 @@ void FullCodeGenerator::Generate(CompilationInfo* info, Mode mode) { ...@@ -56,6 +56,7 @@ void FullCodeGenerator::Generate(CompilationInfo* info, Mode mode) {
ASSERT(info_ == NULL); ASSERT(info_ == NULL);
info_ = info; info_ = info;
SetFunctionPosition(function()); SetFunctionPosition(function());
Comment cmnt(masm_, "[ function compiled by full code generator");
if (mode == PRIMARY) { if (mode == PRIMARY) {
int locals_count = scope()->num_stack_slots(); int locals_count = scope()->num_stack_slots();
......
...@@ -128,6 +128,7 @@ Scope* CodeGenerator::scope() { return info_->function()->scope(); } ...@@ -128,6 +128,7 @@ Scope* CodeGenerator::scope() { return info_->function()->scope(); }
void CodeGenerator::Generate(CompilationInfo* info) { void CodeGenerator::Generate(CompilationInfo* info) {
// Record the position for debugging purposes. // Record the position for debugging purposes.
CodeForFunctionPosition(info->function()); CodeForFunctionPosition(info->function());
Comment cmnt(masm_, "[ function compiled by virtual frame code generator");
// Initialize state. // Initialize state.
info_ = info; info_ = info;
......
...@@ -621,6 +621,7 @@ void FastCodeGenerator::EmitBitOr() { ...@@ -621,6 +621,7 @@ void FastCodeGenerator::EmitBitOr() {
void FastCodeGenerator::Generate(CompilationInfo* compilation_info) { void FastCodeGenerator::Generate(CompilationInfo* compilation_info) {
ASSERT(info_ == NULL); ASSERT(info_ == NULL);
info_ = compilation_info; info_ = compilation_info;
Comment cmnt(masm_, "[ function compiled by fast code generator");
// Save the caller's frame pointer and set up our own. // Save the caller's frame pointer and set up our own.
Comment prologue_cmnt(masm(), ";; Prologue"); Comment prologue_cmnt(masm(), ";; Prologue");
......
...@@ -55,6 +55,7 @@ void FullCodeGenerator::Generate(CompilationInfo* info, Mode mode) { ...@@ -55,6 +55,7 @@ void FullCodeGenerator::Generate(CompilationInfo* info, Mode mode) {
ASSERT(info_ == NULL); ASSERT(info_ == NULL);
info_ = info; info_ = info;
SetFunctionPosition(function()); SetFunctionPosition(function());
Comment cmnt(masm_, "[ function compiled by full code generator");
if (mode == PRIMARY) { if (mode == PRIMARY) {
__ push(ebp); // Caller's frame pointer. __ push(ebp); // Caller's frame pointer.
......
...@@ -280,6 +280,7 @@ void CodeGenerator::DeclareGlobals(Handle<FixedArray> pairs) { ...@@ -280,6 +280,7 @@ void CodeGenerator::DeclareGlobals(Handle<FixedArray> pairs) {
void CodeGenerator::Generate(CompilationInfo* info) { void CodeGenerator::Generate(CompilationInfo* info) {
// Record the position for debugging purposes. // Record the position for debugging purposes.
CodeForFunctionPosition(info->function()); CodeForFunctionPosition(info->function());
Comment cmnt(masm_, "[ function compiled by virtual frame code generator");
// Initialize state. // Initialize state.
info_ = info; info_ = info;
......
...@@ -188,6 +188,7 @@ void FastCodeGenerator::EmitBitOr() { ...@@ -188,6 +188,7 @@ void FastCodeGenerator::EmitBitOr() {
void FastCodeGenerator::Generate(CompilationInfo* compilation_info) { void FastCodeGenerator::Generate(CompilationInfo* compilation_info) {
ASSERT(info_ == NULL); ASSERT(info_ == NULL);
info_ = compilation_info; info_ = compilation_info;
Comment cmnt(masm_, "[ function compiled by fast code generator");
// Save the caller's frame pointer and set up our own. // Save the caller's frame pointer and set up our own.
Comment prologue_cmnt(masm(), ";; Prologue"); Comment prologue_cmnt(masm(), ";; Prologue");
......
...@@ -55,6 +55,7 @@ void FullCodeGenerator::Generate(CompilationInfo* info, Mode mode) { ...@@ -55,6 +55,7 @@ void FullCodeGenerator::Generate(CompilationInfo* info, Mode mode) {
ASSERT(info_ == NULL); ASSERT(info_ == NULL);
info_ = info; info_ = info;
SetFunctionPosition(function()); SetFunctionPosition(function());
Comment cmnt(masm_, "[ function compiled by full code generator");
if (mode == PRIMARY) { if (mode == PRIMARY) {
__ push(rbp); // Caller's frame pointer. __ push(rbp); // Caller's frame pointer.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment