| 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 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 307 | 307 |
| 308 OptimizedCompileJob::Status OptimizedCompileJob::CreateGraph() { | 308 OptimizedCompileJob::Status OptimizedCompileJob::CreateGraph() { |
| 309 ASSERT(isolate()->use_crankshaft()); | 309 ASSERT(isolate()->use_crankshaft()); |
| 310 ASSERT(info()->IsOptimizing()); | 310 ASSERT(info()->IsOptimizing()); |
| 311 ASSERT(!info()->IsCompilingForDebugging()); | 311 ASSERT(!info()->IsCompilingForDebugging()); |
| 312 | 312 |
| 313 // We should never arrive here if there is no code object on the | 313 // We should never arrive here if there is no code object on the |
| 314 // shared function object. | 314 // shared function object. |
| 315 ASSERT(info()->shared_info()->code()->kind() == Code::FUNCTION); | 315 ASSERT(info()->shared_info()->code()->kind() == Code::FUNCTION); |
| 316 | 316 |
| 317 if (FLAG_trace_opt) { | |
| 318 // TODO(jbramley): This was added to help analyse the behaviour of | |
| 319 // Crankshaft for the A64 Crankshaft port. It should eventually be deleted. | |
| 320 Handle<JSFunction> function = info()->closure(); | |
| 321 PrintF("Attempting optimization of "); | |
| 322 function->PrintName(); | |
| 323 PrintF(" / %" V8PRIxPTR "\n", reinterpret_cast<intptr_t>(*function)); | |
| 324 } | |
| 325 | |
| 326 // We should never arrive here if optimization has been disabled on the | 317 // We should never arrive here if optimization has been disabled on the |
| 327 // shared function info. | 318 // shared function info. |
| 328 ASSERT(!info()->shared_info()->optimization_disabled()); | 319 ASSERT(!info()->shared_info()->optimization_disabled()); |
| 329 | 320 |
| 330 // Fall back to using the full code generator if it's not possible | 321 // Fall back to using the full code generator if it's not possible |
| 331 // to use the Hydrogen-based optimizing compiler. We already have | 322 // to use the Hydrogen-based optimizing compiler. We already have |
| 332 // generated code for this from the shared function object. | 323 // generated code for this from the shared function object. |
| 333 if (FLAG_always_full_compiler) return AbortOptimization(); | 324 if (FLAG_always_full_compiler) return AbortOptimization(); |
| 334 if (IsDebuggerActive(isolate())) return AbortOptimization(kDebuggerIsActive); | 325 if (IsDebuggerActive(isolate())) return AbortOptimization(kDebuggerIsActive); |
| 335 | 326 |
| (...skipping 971 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1307 AllowHandleDereference allow_deref; | 1298 AllowHandleDereference allow_deref; |
| 1308 bool tracing_on = info()->IsStub() | 1299 bool tracing_on = info()->IsStub() |
| 1309 ? FLAG_trace_hydrogen_stubs | 1300 ? FLAG_trace_hydrogen_stubs |
| 1310 : (FLAG_trace_hydrogen && | 1301 : (FLAG_trace_hydrogen && |
| 1311 info()->closure()->PassesFilter(FLAG_trace_hydrogen_filter)); | 1302 info()->closure()->PassesFilter(FLAG_trace_hydrogen_filter)); |
| 1312 return (tracing_on && | 1303 return (tracing_on && |
| 1313 OS::StrChr(const_cast<char*>(FLAG_trace_phase), name_[0]) != NULL); | 1304 OS::StrChr(const_cast<char*>(FLAG_trace_phase), name_[0]) != NULL); |
| 1314 } | 1305 } |
| 1315 | 1306 |
| 1316 } } // namespace v8::internal | 1307 } } // namespace v8::internal |
| OLD | NEW |