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 410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 int values = graph->GetMaximumValueID(); | 428 int values = graph->GetMaximumValueID(); |
429 CompilationInfo* info = graph->info(); | 429 CompilationInfo* info = graph->info(); |
430 if (values > LUnallocated::kMaxVirtualRegisters) { | 430 if (values > LUnallocated::kMaxVirtualRegisters) { |
431 info->set_bailout_reason("not enough virtual registers for values"); | 431 info->set_bailout_reason(kNotEnoughVirtualRegistersForValues); |
432 return NULL; | 432 return NULL; |
433 } | 433 } |
434 LAllocator allocator(values, graph); | 434 LAllocator allocator(values, graph); |
435 LChunkBuilder builder(info, graph, &allocator); | 435 LChunkBuilder builder(info, graph, &allocator); |
436 LChunk* chunk = builder.Build(); | 436 LChunk* chunk = builder.Build(); |
437 if (chunk == NULL) return NULL; | 437 if (chunk == NULL) return NULL; |
438 | 438 |
439 if (!allocator.Allocate(chunk)) { | 439 if (!allocator.Allocate(chunk)) { |
440 info->set_bailout_reason("not enough virtual registers (regalloc)"); | 440 info->set_bailout_reason(kNotEnoughVirtualRegistersRegalloc); |
441 return NULL; | 441 return NULL; |
442 } | 442 } |
443 | 443 |
444 chunk->set_allocated_double_registers( | 444 chunk->set_allocated_double_registers( |
445 allocator.assigned_double_registers()); | 445 allocator.assigned_double_registers()); |
446 | 446 |
447 return chunk; | 447 return chunk; |
448 } | 448 } |
449 | 449 |
450 | 450 |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
496 | 496 |
497 | 497 |
498 LPhase::~LPhase() { | 498 LPhase::~LPhase() { |
499 if (ShouldProduceTraceOutput()) { | 499 if (ShouldProduceTraceOutput()) { |
500 isolate()->GetHTracer()->TraceLithium(name(), chunk_); | 500 isolate()->GetHTracer()->TraceLithium(name(), chunk_); |
501 } | 501 } |
502 } | 502 } |
503 | 503 |
504 | 504 |
505 } } // namespace v8::internal | 505 } } // namespace v8::internal |
OLD | NEW |