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 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
387 } else { | 387 } else { |
388 return AbortOptimization(); | 388 return AbortOptimization(); |
389 } | 389 } |
390 } | 390 } |
391 | 391 |
392 return SetLastStatus(SUCCEEDED); | 392 return SetLastStatus(SUCCEEDED); |
393 } | 393 } |
394 | 394 |
395 OptimizingCompiler::Status OptimizingCompiler::OptimizeGraph() { | 395 OptimizingCompiler::Status OptimizingCompiler::OptimizeGraph() { |
396 AssertNoAllocation no_gc; | 396 AssertNoAllocation no_gc; |
397 NoHandleAllocation no_handles; | 397 NoHandleAllocation no_handles(isolate()); |
398 NoHandleDereference no_deref; | 398 NoHandleDereference no_deref(isolate()); |
399 | 399 |
400 ASSERT(last_status() == SUCCEEDED); | 400 ASSERT(last_status() == SUCCEEDED); |
401 Timer t(this, &time_taken_to_optimize_); | 401 Timer t(this, &time_taken_to_optimize_); |
402 ASSERT(graph_ != NULL); | 402 ASSERT(graph_ != NULL); |
403 SmartArrayPointer<char> bailout_reason; | 403 SmartArrayPointer<char> bailout_reason; |
404 if (!graph_->Optimize(&bailout_reason)) { | 404 if (!graph_->Optimize(&bailout_reason)) { |
405 if (!bailout_reason.is_empty()) graph_builder_->Bailout(*bailout_reason); | 405 if (!bailout_reason.is_empty()) graph_builder_->Bailout(*bailout_reason); |
406 return SetLastStatus(BAILED_OUT); | 406 return SetLastStatus(BAILED_OUT); |
407 } else { | 407 } else { |
408 chunk_ = LChunk::NewChunk(graph_); | 408 chunk_ = LChunk::NewChunk(graph_); |
(...skipping 710 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1119 } | 1119 } |
1120 } | 1120 } |
1121 | 1121 |
1122 GDBJIT(AddCode(Handle<String>(shared->DebugName()), | 1122 GDBJIT(AddCode(Handle<String>(shared->DebugName()), |
1123 Handle<Script>(info->script()), | 1123 Handle<Script>(info->script()), |
1124 Handle<Code>(info->code()), | 1124 Handle<Code>(info->code()), |
1125 info)); | 1125 info)); |
1126 } | 1126 } |
1127 | 1127 |
1128 } } // namespace v8::internal | 1128 } } // namespace v8::internal |
OLD | NEW |