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

Side by Side Diff: src/lithium-allocator.cc

Issue 7374002: Refactor allocation policies. Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 5 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
« no previous file with comments | « src/lithium.h ('k') | src/liveedit.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 527 matching lines...) Expand 10 before | Expand all | Expand 10 after
538 } else { 538 } else {
539 b = b->next(); 539 b = b->next();
540 } 540 }
541 } 541 }
542 return LifetimePosition::Invalid(); 542 return LifetimePosition::Invalid();
543 } 543 }
544 544
545 545
546 LAllocator::LAllocator(int num_values, HGraph* graph) 546 LAllocator::LAllocator(int num_values, HGraph* graph)
547 : chunk_(NULL), 547 : chunk_(NULL),
548 live_in_sets_(graph->blocks()->length()), 548 live_in_sets_(graph->zone(), graph->blocks()->length()),
549 live_ranges_(num_values * 2), 549 live_ranges_(graph->zone(), num_values * 2),
550 fixed_live_ranges_(NULL), 550 fixed_live_ranges_(NULL),
551 fixed_double_live_ranges_(NULL), 551 fixed_double_live_ranges_(NULL),
552 unhandled_live_ranges_(num_values * 2), 552 unhandled_live_ranges_(graph->zone(), num_values * 2),
553 active_live_ranges_(8), 553 active_live_ranges_(graph->zone(), 8),
554 inactive_live_ranges_(8), 554 inactive_live_ranges_(graph->zone(), 8),
555 reusable_slots_(8), 555 reusable_slots_(graph->zone(), 8),
556 next_virtual_register_(num_values), 556 next_virtual_register_(num_values),
557 first_artificial_register_(num_values), 557 first_artificial_register_(num_values),
558 mode_(NONE), 558 mode_(NONE),
559 num_registers_(-1), 559 num_registers_(-1),
560 graph_(graph), 560 graph_(graph),
561 has_osr_entry_(false) {} 561 has_osr_entry_(false) {}
562 562
563 563
564 void LAllocator::InitializeLivenessAnalysis() { 564 void LAllocator::InitializeLivenessAnalysis() {
565 // Initialize the live_in sets for each block to NULL. 565 // Initialize the live_in sets for each block to NULL.
(...skipping 1553 matching lines...) Expand 10 before | Expand all | Expand 10 after
2119 LiveRange* current = live_ranges()->at(i); 2119 LiveRange* current = live_ranges()->at(i);
2120 if (current != NULL) current->Verify(); 2120 if (current != NULL) current->Verify();
2121 } 2121 }
2122 } 2122 }
2123 2123
2124 2124
2125 #endif 2125 #endif
2126 2126
2127 2127
2128 } } // namespace v8::internal 2128 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/lithium.h ('k') | src/liveedit.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698