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 return graph_->LookupValue(operand->index())->representation(); | 418 return graph_->LookupValue(operand->index())->representation(); |
419 } | 419 } |
420 | 420 |
421 | 421 |
422 LChunk* LChunk::NewChunk(HGraph* graph) { | 422 LChunk* LChunk::NewChunk(HGraph* graph) { |
423 DisallowHandleAllocation no_handles; | 423 DisallowHandleAllocation no_handles; |
424 DisallowHeapAllocation no_gc; | 424 DisallowHeapAllocation no_gc; |
425 int values = graph->GetMaximumValueID(); | 425 int values = graph->GetMaximumValueID(); |
426 CompilationInfo* info = graph->info(); | 426 CompilationInfo* info = graph->info(); |
427 if (values > LUnallocated::kMaxVirtualRegisters) { | 427 if (values > LUnallocated::kMaxVirtualRegisters) { |
428 info->set_bailout_reason("not enough virtual registers for values"); | 428 info->set_bailout_reason(kNotEnoughVirtualRegistersForValues); |
429 return NULL; | 429 return NULL; |
430 } | 430 } |
431 LAllocator allocator(values, graph); | 431 LAllocator allocator(values, graph); |
432 LChunkBuilder builder(info, graph, &allocator); | 432 LChunkBuilder builder(info, graph, &allocator); |
433 LChunk* chunk = builder.Build(); | 433 LChunk* chunk = builder.Build(); |
434 if (chunk == NULL) return NULL; | 434 if (chunk == NULL) return NULL; |
435 | 435 |
436 if (!allocator.Allocate(chunk)) { | 436 if (!allocator.Allocate(chunk)) { |
437 info->set_bailout_reason("not enough virtual registers (regalloc)"); | 437 info->set_bailout_reason(kNotEnoughVirtualRegistersRegalloc); |
438 return NULL; | 438 return NULL; |
439 } | 439 } |
440 | 440 |
441 chunk->set_allocated_double_registers( | 441 chunk->set_allocated_double_registers( |
442 allocator.assigned_double_registers()); | 442 allocator.assigned_double_registers()); |
443 | 443 |
444 return chunk; | 444 return chunk; |
445 } | 445 } |
446 | 446 |
447 | 447 |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
493 | 493 |
494 | 494 |
495 LPhase::~LPhase() { | 495 LPhase::~LPhase() { |
496 if (ShouldProduceTraceOutput()) { | 496 if (ShouldProduceTraceOutput()) { |
497 isolate()->GetHTracer()->TraceLithium(name(), chunk_); | 497 isolate()->GetHTracer()->TraceLithium(name(), chunk_); |
498 } | 498 } |
499 } | 499 } |
500 | 500 |
501 | 501 |
502 } } // namespace v8::internal | 502 } } // namespace v8::internal |
OLD | NEW |