| 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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 isolate->counters()->total_compiled_code_size()->Increment( | 118 isolate->counters()->total_compiled_code_size()->Increment( |
| 119 code->instruction_size()); | 119 code->instruction_size()); |
| 120 code->set_prologue_offset(info->prologue_offset()); | 120 code->set_prologue_offset(info->prologue_offset()); |
| 121 } | 121 } |
| 122 return code; | 122 return code; |
| 123 } | 123 } |
| 124 | 124 |
| 125 | 125 |
| 126 void CodeGenerator::PrintCode(Handle<Code> code, CompilationInfo* info) { | 126 void CodeGenerator::PrintCode(Handle<Code> code, CompilationInfo* info) { |
| 127 #ifdef ENABLE_DISASSEMBLER | 127 #ifdef ENABLE_DISASSEMBLER |
| 128 AllowDeferredHandleDereference allow_deference_for_print_code; |
| 128 bool print_code = Isolate::Current()->bootstrapper()->IsActive() | 129 bool print_code = Isolate::Current()->bootstrapper()->IsActive() |
| 129 ? FLAG_print_builtin_code | 130 ? FLAG_print_builtin_code |
| 130 : (FLAG_print_code || | 131 : (FLAG_print_code || |
| 131 (info->IsStub() && FLAG_print_code_stubs) || | 132 (info->IsStub() && FLAG_print_code_stubs) || |
| 132 (info->IsOptimizing() && FLAG_print_opt_code)); | 133 (info->IsOptimizing() && FLAG_print_opt_code)); |
| 133 if (print_code) { | 134 if (print_code) { |
| 134 // Print the source code if available. | 135 // Print the source code if available. |
| 135 FunctionLiteral* function = info->function(); | 136 FunctionLiteral* function = info->function(); |
| 136 if (code->kind() == Code::OPTIMIZED_FUNCTION) { | 137 if (code->kind() == Code::OPTIMIZED_FUNCTION) { |
| 137 Handle<Script> script = info->script(); | 138 Handle<Script> script = info->script(); |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 ASSERT(result_size_ == 1 || result_size_ == 2); | 226 ASSERT(result_size_ == 1 || result_size_ == 2); |
| 226 #ifdef _WIN64 | 227 #ifdef _WIN64 |
| 227 return result | ((result_size_ == 1) ? 0 : 2); | 228 return result | ((result_size_ == 1) ? 0 : 2); |
| 228 #else | 229 #else |
| 229 return result; | 230 return result; |
| 230 #endif | 231 #endif |
| 231 } | 232 } |
| 232 | 233 |
| 233 | 234 |
| 234 } } // namespace v8::internal | 235 } } // namespace v8::internal |
| OLD | NEW |