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 401 matching lines...) Loading... |
412 } | 412 } |
413 | 413 |
414 | 414 |
415 Representation LChunk::LookupLiteralRepresentation( | 415 Representation LChunk::LookupLiteralRepresentation( |
416 LConstantOperand* operand) const { | 416 LConstantOperand* operand) const { |
417 return graph_->LookupValue(operand->index())->representation(); | 417 return graph_->LookupValue(operand->index())->representation(); |
418 } | 418 } |
419 | 419 |
420 | 420 |
421 LChunk* LChunk::NewChunk(HGraph* graph) { | 421 LChunk* LChunk::NewChunk(HGraph* graph) { |
422 NoHandleAllocation no_handles(graph->isolate()); | 422 DisallowHandleAllocation no_handles; |
423 AssertNoAllocation no_gc; | 423 DisallowHeapAllocation no_gc; |
424 | |
425 int values = graph->GetMaximumValueID(); | 424 int values = graph->GetMaximumValueID(); |
426 CompilationInfo* info = graph->info(); | 425 CompilationInfo* info = graph->info(); |
427 if (values > LUnallocated::kMaxVirtualRegisters) { | 426 if (values > LUnallocated::kMaxVirtualRegisters) { |
428 info->set_bailout_reason("not enough virtual registers for values"); | 427 info->set_bailout_reason("not enough virtual registers for values"); |
429 return NULL; | 428 return NULL; |
430 } | 429 } |
431 LAllocator allocator(values, graph); | 430 LAllocator allocator(values, graph); |
432 LChunkBuilder builder(info, graph, &allocator); | 431 LChunkBuilder builder(info, graph, &allocator); |
433 LChunk* chunk = builder.Build(); | 432 LChunk* chunk = builder.Build(); |
434 if (chunk == NULL) return NULL; | 433 if (chunk == NULL) return NULL; |
(...skipping 51 matching lines...) Loading... |
486 } else { | 485 } else { |
487 spill_slot_count_++; | 486 spill_slot_count_++; |
488 } | 487 } |
489 } | 488 } |
490 iterator.Advance(); | 489 iterator.Advance(); |
491 } | 490 } |
492 } | 491 } |
493 | 492 |
494 | 493 |
495 } } // namespace v8::internal | 494 } } // namespace v8::internal |
OLD | NEW |