| 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 610 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 621 new(zone()) HEnvironment(NULL, info->scope(), info->closure()); | 621 new(zone()) HEnvironment(NULL, info->scope(), info->closure()); |
| 622 start_environment_->set_ast_id(AstNode::kFunctionEntryId); | 622 start_environment_->set_ast_id(AstNode::kFunctionEntryId); |
| 623 entry_block_ = CreateBasicBlock(); | 623 entry_block_ = CreateBasicBlock(); |
| 624 entry_block_->SetInitialEnvironment(start_environment_); | 624 entry_block_->SetInitialEnvironment(start_environment_); |
| 625 } | 625 } |
| 626 | 626 |
| 627 | 627 |
| 628 Handle<Code> HGraph::Compile(CompilationInfo* info) { | 628 Handle<Code> HGraph::Compile(CompilationInfo* info) { |
| 629 int values = GetMaximumValueID(); | 629 int values = GetMaximumValueID(); |
| 630 if (values > LAllocator::max_initial_value_ids()) { | 630 if (values > LAllocator::max_initial_value_ids()) { |
| 631 if (FLAG_trace_bailout) PrintF("Function is too big\n"); | 631 if (FLAG_trace_bailout) { |
| 632 SmartArrayPointer<char> name( |
| 633 info->shared_info()->DebugName()->ToCString()); |
| 634 PrintF("Function @\"%s\" is too big.\n", *name); |
| 635 } |
| 632 return Handle<Code>::null(); | 636 return Handle<Code>::null(); |
| 633 } | 637 } |
| 634 | 638 |
| 635 LAllocator allocator(values, this); | 639 LAllocator allocator(values, this); |
| 636 LChunkBuilder builder(info, this, &allocator); | 640 LChunkBuilder builder(info, this, &allocator); |
| 637 LChunk* chunk = builder.Build(); | 641 LChunk* chunk = builder.Build(); |
| 638 if (chunk == NULL) return Handle<Code>::null(); | 642 if (chunk == NULL) return Handle<Code>::null(); |
| 639 | 643 |
| 640 if (!FLAG_alloc_lithium) return Handle<Code>::null(); | 644 if (!FLAG_alloc_lithium) return Handle<Code>::null(); |
| 641 | 645 |
| (...skipping 6691 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7333 } | 7337 } |
| 7334 } | 7338 } |
| 7335 | 7339 |
| 7336 #ifdef DEBUG | 7340 #ifdef DEBUG |
| 7337 if (graph_ != NULL) graph_->Verify(false); // No full verify. | 7341 if (graph_ != NULL) graph_->Verify(false); // No full verify. |
| 7338 if (allocator_ != NULL) allocator_->Verify(); | 7342 if (allocator_ != NULL) allocator_->Verify(); |
| 7339 #endif | 7343 #endif |
| 7340 } | 7344 } |
| 7341 | 7345 |
| 7342 } } // namespace v8::internal | 7346 } } // namespace v8::internal |
| OLD | NEW |