OLD | NEW |
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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 print_ast = FLAG_print_builtin_ast; | 69 print_ast = FLAG_print_builtin_ast; |
70 ftype = "builtin"; | 70 ftype = "builtin"; |
71 } else { | 71 } else { |
72 print_source = FLAG_print_source; | 72 print_source = FLAG_print_source; |
73 print_ast = FLAG_print_ast; | 73 print_ast = FLAG_print_ast; |
74 ftype = "user-defined"; | 74 ftype = "user-defined"; |
75 } | 75 } |
76 | 76 |
77 if (FLAG_trace_codegen || print_source || print_ast) { | 77 if (FLAG_trace_codegen || print_source || print_ast) { |
78 PrintF("*** Generate code for %s function: ", ftype); | 78 PrintF("*** Generate code for %s function: ", ftype); |
79 info->function()->name()->ShortPrint(); | 79 if (info->IsStub()) { |
| 80 const char* name = |
| 81 CodeStub::MajorName(info->code_stub()->MajorKey(), true); |
| 82 PrintF("%s", name == NULL ? "<unknown>" : name); |
| 83 } else { |
| 84 info->function()->name()->ShortPrint(); |
| 85 } |
80 PrintF(" ***\n"); | 86 PrintF(" ***\n"); |
81 } | 87 } |
82 | 88 |
83 if (print_source) { | 89 if (print_source) { |
84 PrintF("--- Source from AST ---\n%s\n", | 90 PrintF("--- Source from AST ---\n%s\n", |
85 PrettyPrinter().PrintProgram(info->function())); | 91 PrettyPrinter().PrintProgram(info->function())); |
86 } | 92 } |
87 | 93 |
88 if (print_ast) { | 94 if (print_ast) { |
89 PrintF("--- AST ---\n%s\n", | 95 PrintF("--- AST ---\n%s\n", |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
210 ASSERT(result_size_ == 1 || result_size_ == 2); | 216 ASSERT(result_size_ == 1 || result_size_ == 2); |
211 #ifdef _WIN64 | 217 #ifdef _WIN64 |
212 return result | ((result_size_ == 1) ? 0 : 2); | 218 return result | ((result_size_ == 1) ? 0 : 2); |
213 #else | 219 #else |
214 return result; | 220 return result; |
215 #endif | 221 #endif |
216 } | 222 } |
217 | 223 |
218 | 224 |
219 } } // namespace v8::internal | 225 } } // namespace v8::internal |
OLD | NEW |