| 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 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 418 | 418 |
| 419 Representation LChunk::LookupLiteralRepresentation( | 419 Representation LChunk::LookupLiteralRepresentation( |
| 420 LConstantOperand* operand) const { | 420 LConstantOperand* operand) const { |
| 421 return graph_->LookupValue(operand->index())->representation(); | 421 return graph_->LookupValue(operand->index())->representation(); |
| 422 } | 422 } |
| 423 | 423 |
| 424 | 424 |
| 425 LChunk* LChunk::NewChunk(HGraph* graph) { | 425 LChunk* LChunk::NewChunk(HGraph* graph) { |
| 426 DisallowHandleAllocation no_handles; | 426 DisallowHandleAllocation no_handles; |
| 427 DisallowHeapAllocation no_gc; | 427 DisallowHeapAllocation no_gc; |
| 428 graph->DisallowAddingNewValues(); |
| 428 int values = graph->GetMaximumValueID(); | 429 int values = graph->GetMaximumValueID(); |
| 429 CompilationInfo* info = graph->info(); | 430 CompilationInfo* info = graph->info(); |
| 430 if (values > LUnallocated::kMaxVirtualRegisters) { | 431 if (values > LUnallocated::kMaxVirtualRegisters) { |
| 431 info->set_bailout_reason(kNotEnoughVirtualRegistersForValues); | 432 info->set_bailout_reason(kNotEnoughVirtualRegistersForValues); |
| 432 return NULL; | 433 return NULL; |
| 433 } | 434 } |
| 434 LAllocator allocator(values, graph); | 435 LAllocator allocator(values, graph); |
| 435 LChunkBuilder builder(info, graph, &allocator); | 436 LChunkBuilder builder(info, graph, &allocator); |
| 436 LChunk* chunk = builder.Build(); | 437 LChunk* chunk = builder.Build(); |
| 437 if (chunk == NULL) return NULL; | 438 if (chunk == NULL) return NULL; |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 502 | 503 |
| 503 | 504 |
| 504 LPhase::~LPhase() { | 505 LPhase::~LPhase() { |
| 505 if (ShouldProduceTraceOutput()) { | 506 if (ShouldProduceTraceOutput()) { |
| 506 isolate()->GetHTracer()->TraceLithium(name(), chunk_); | 507 isolate()->GetHTracer()->TraceLithium(name(), chunk_); |
| 507 } | 508 } |
| 508 } | 509 } |
| 509 | 510 |
| 510 | 511 |
| 511 } } // namespace v8::internal | 512 } } // namespace v8::internal |
| OLD | NEW |