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 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
417 OptimizingCompiler::Status OptimizingCompiler::GenerateAndInstallCode() { | 417 OptimizingCompiler::Status OptimizingCompiler::GenerateAndInstallCode() { |
418 ASSERT(last_status() == SUCCEEDED); | 418 ASSERT(last_status() == SUCCEEDED); |
419 { // Scope for timer. | 419 { // Scope for timer. |
420 Timer timer(this, &time_taken_to_codegen_); | 420 Timer timer(this, &time_taken_to_codegen_); |
421 ASSERT(chunk_ != NULL); | 421 ASSERT(chunk_ != NULL); |
422 ASSERT(graph_ != NULL); | 422 ASSERT(graph_ != NULL); |
423 // Deferred handles reference objects that were accessible during | 423 // Deferred handles reference objects that were accessible during |
424 // graph creation. To make sure that we don't encounter inconsistencies | 424 // graph creation. To make sure that we don't encounter inconsistencies |
425 // between graph creation and code generation, we disallow accessing | 425 // between graph creation and code generation, we disallow accessing |
426 // objects through deferred handles during the latter, with exceptions. | 426 // objects through deferred handles during the latter, with exceptions. |
427 DisallowDeferredHandleDereference no_deferred_handle_deref(); | 427 DisallowDeferredHandleDereference no_deferred_handle_deref; |
428 Handle<Code> optimized_code = chunk_->Codegen(); | 428 Handle<Code> optimized_code = chunk_->Codegen(); |
429 if (optimized_code.is_null()) { | 429 if (optimized_code.is_null()) { |
430 info()->set_bailout_reason("code generation failed"); | 430 info()->set_bailout_reason("code generation failed"); |
431 return AbortOptimization(); | 431 return AbortOptimization(); |
432 } | 432 } |
433 info()->SetCode(optimized_code); | 433 info()->SetCode(optimized_code); |
434 } | 434 } |
435 RecordOptimizationStats(); | 435 RecordOptimizationStats(); |
436 return SetLastStatus(SUCCEEDED); | 436 return SetLastStatus(SUCCEEDED); |
437 } | 437 } |
(...skipping 735 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1173 } | 1173 } |
1174 } | 1174 } |
1175 | 1175 |
1176 GDBJIT(AddCode(Handle<String>(shared->DebugName()), | 1176 GDBJIT(AddCode(Handle<String>(shared->DebugName()), |
1177 Handle<Script>(info->script()), | 1177 Handle<Script>(info->script()), |
1178 Handle<Code>(info->code()), | 1178 Handle<Code>(info->code()), |
1179 info)); | 1179 info)); |
1180 } | 1180 } |
1181 | 1181 |
1182 } } // namespace v8::internal | 1182 } } // namespace v8::internal |
OLD | NEW |