Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(245)

Side by Side Diff: src/lithium.cc

Issue 20843012: Extract hardcoded error strings into a single place and replace them with enum. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: styles fixed Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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
OLDNEW
« src/compiler.cc ('K') | « src/ia32/stub-cache-ia32.cc ('k') | src/mips/builtins-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698