| Index: src/codegen.cc
 | 
| diff --git a/src/codegen.cc b/src/codegen.cc
 | 
| index 83ac854a079259b1aaceba57a06e5465fd5d61ac..c8bdf687b844aedb5c4e3142687d5be87a9ed5b9 100644
 | 
| --- a/src/codegen.cc
 | 
| +++ b/src/codegen.cc
 | 
| @@ -121,19 +121,21 @@ void CodeGenerator::PrintCode(Handle<Code> code, CompilationInfo* info) {
 | 
|    if (print_code) {
 | 
|      // Print the source code if available.
 | 
|      FunctionLiteral* function = info->function();
 | 
| -    Handle<Script> script = info->script();
 | 
| -    if (!script->IsUndefined() && !script->source()->IsUndefined()) {
 | 
| -      PrintF("--- Raw source ---\n");
 | 
| -      StringInputBuffer stream(String::cast(script->source()));
 | 
| -      stream.Seek(function->start_position());
 | 
| -      // fun->end_position() points to the last character in the stream. We
 | 
| -      // need to compensate by adding one to calculate the length.
 | 
| -      int source_len =
 | 
| -          function->end_position() - function->start_position() + 1;
 | 
| -      for (int i = 0; i < source_len; i++) {
 | 
| -        if (stream.has_more()) PrintF("%c", stream.GetNext());
 | 
| +    if (code->kind() != Code::COMPILED_STUB) {
 | 
| +      Handle<Script> script = info->script();
 | 
| +      if (!script->IsUndefined() && !script->source()->IsUndefined()) {
 | 
| +        PrintF("--- Raw source ---\n");
 | 
| +        StringInputBuffer stream(String::cast(script->source()));
 | 
| +        stream.Seek(function->start_position());
 | 
| +        // fun->end_position() points to the last character in the stream. We
 | 
| +        // need to compensate by adding one to calculate the length.
 | 
| +        int source_len =
 | 
| +            function->end_position() - function->start_position() + 1;
 | 
| +        for (int i = 0; i < source_len; i++) {
 | 
| +          if (stream.has_more()) PrintF("%c", stream.GetNext());
 | 
| +        }
 | 
| +        PrintF("\n\n");
 | 
|        }
 | 
| -      PrintF("\n\n");
 | 
|      }
 | 
|      if (info->IsOptimizing()) {
 | 
|        if (FLAG_print_unopt_code) {
 | 
| @@ -145,7 +147,12 @@ void CodeGenerator::PrintCode(Handle<Code> code, CompilationInfo* info) {
 | 
|      } else {
 | 
|        PrintF("--- Code ---\n");
 | 
|      }
 | 
| -    code->Disassemble(*function->debug_name()->ToCString());
 | 
| +    if (info->IsStub()) {
 | 
| +      CodeStub::Major major_key = info->code_stub()->MajorKey();
 | 
| +      code->Disassemble(CodeStub::MajorName(major_key, false));
 | 
| +    } else {
 | 
| +      code->Disassemble(*function->debug_name()->ToCString());
 | 
| +    }
 | 
|    }
 | 
|  #endif  // ENABLE_DISASSEMBLER
 | 
|  }
 | 
| 
 |