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

Side by Side Diff: src/hydrogen-environment-liveness.cc

Issue 17827005: Get rid of ZoneScope completely. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Suggestions from danno Created 7 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/hydrogen-environment-liveness.h ('k') | src/hydrogen-gvn.h » ('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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 19 matching lines...) Expand all
30 30
31 31
32 namespace v8 { 32 namespace v8 {
33 namespace internal { 33 namespace internal {
34 34
35 35
36 EnvironmentSlotLivenessAnalyzer::EnvironmentSlotLivenessAnalyzer( 36 EnvironmentSlotLivenessAnalyzer::EnvironmentSlotLivenessAnalyzer(
37 HGraph* graph) 37 HGraph* graph)
38 : graph_(graph), 38 : graph_(graph),
39 zone_(graph->isolate()), 39 zone_(graph->isolate()),
40 zone_scope_(&zone_, DELETE_ON_EXIT),
41 block_count_(graph->blocks()->length()), 40 block_count_(graph->blocks()->length()),
42 maximum_environment_size_(graph->maximum_environment_size()), 41 maximum_environment_size_(graph->maximum_environment_size()),
43 collect_markers_(true), 42 collect_markers_(true),
44 last_simulate_(NULL) { 43 last_simulate_(NULL) {
45 if (maximum_environment_size_ == 0) return; 44 if (maximum_environment_size_ == 0) return;
46 45
47 live_at_block_start_ = 46 live_at_block_start_ =
48 new(zone()) ZoneList<BitVector*>(block_count_, zone()); 47 new(zone()) ZoneList<BitVector*>(block_count_, zone());
49 first_simulate_ = new(zone()) ZoneList<HSimulate*>(block_count_, zone()); 48 first_simulate_ = new(zone()) ZoneList<HSimulate*>(block_count_, zone());
50 first_simulate_invalid_for_index_ = 49 first_simulate_invalid_for_index_ =
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 } 139 }
141 if (marker->kind() == HEnvironmentMarker::LOOKUP) { 140 if (marker->kind() == HEnvironmentMarker::LOOKUP) {
142 live->Add(index); 141 live->Add(index);
143 } else { 142 } else {
144 ASSERT(marker->kind() == HEnvironmentMarker::BIND); 143 ASSERT(marker->kind() == HEnvironmentMarker::BIND);
145 live->Remove(index); 144 live->Remove(index);
146 went_live_since_last_simulate_->Add(index); 145 went_live_since_last_simulate_->Add(index);
147 } 146 }
148 if (collect_markers_) { 147 if (collect_markers_) {
149 // Populate |markers_| list during the first pass. 148 // Populate |markers_| list during the first pass.
150 markers_->Add(marker, &zone_); 149 markers_->Add(marker, zone());
151 } 150 }
152 break; 151 break;
153 } 152 }
154 case HValue::kLeaveInlined: 153 case HValue::kLeaveInlined:
155 // No environment values are live at the end of an inlined section. 154 // No environment values are live at the end of an inlined section.
156 live->Clear(); 155 live->Clear();
157 last_simulate_ = NULL; 156 last_simulate_ = NULL;
158 157
159 // The following ASSERTs guard the assumption used in case 158 // The following ASSERTs guard the assumption used in case
160 // kEnterInlined below: 159 // kEnterInlined below:
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 ZapEnvironmentSlotsInSuccessors(block, live); 257 ZapEnvironmentSlotsInSuccessors(block, live);
259 } 258 }
260 259
261 // Finally, remove the HEnvironment{Bind,Lookup} markers. 260 // Finally, remove the HEnvironment{Bind,Lookup} markers.
262 for (int i = 0; i < markers_->length(); ++i) { 261 for (int i = 0; i < markers_->length(); ++i) {
263 markers_->at(i)->DeleteAndReplaceWith(NULL); 262 markers_->at(i)->DeleteAndReplaceWith(NULL);
264 } 263 }
265 } 264 }
266 265
267 } } // namespace v8::internal 266 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/hydrogen-environment-liveness.h ('k') | src/hydrogen-gvn.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698