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

Side by Side Diff: src/lithium.cc

Issue 264973013: Don't add code dependencies eagerly for HCheckMaps. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: REBASE Created 6 years, 7 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/lithium-codegen.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "v8.h" 5 #include "v8.h"
6 #include "lithium.h" 6 #include "lithium.h"
7 #include "scopes.h" 7 #include "scopes.h"
8 8
9 #if V8_TARGET_ARCH_IA32 9 #if V8_TARGET_ARCH_IA32
10 #include "ia32/lithium-ia32.h" 10 #include "ia32/lithium-ia32.h"
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 } 227 }
228 228
229 229
230 LChunk::LChunk(CompilationInfo* info, HGraph* graph) 230 LChunk::LChunk(CompilationInfo* info, HGraph* graph)
231 : spill_slot_count_(0), 231 : spill_slot_count_(0),
232 info_(info), 232 info_(info),
233 graph_(graph), 233 graph_(graph),
234 instructions_(32, graph->zone()), 234 instructions_(32, graph->zone()),
235 pointer_maps_(8, graph->zone()), 235 pointer_maps_(8, graph->zone()),
236 inlined_closures_(1, graph->zone()), 236 inlined_closures_(1, graph->zone()),
237 deprecation_dependencies_(MapLess(), MapAllocator(graph->zone())) { 237 deprecation_dependencies_(MapLess(), MapAllocator(graph->zone())),
238 stability_dependencies_(MapLess(), MapAllocator(graph->zone())) {
238 } 239 }
239 240
240 241
241 LLabel* LChunk::GetLabel(int block_id) const { 242 LLabel* LChunk::GetLabel(int block_id) const {
242 HBasicBlock* block = graph_->blocks()->at(block_id); 243 HBasicBlock* block = graph_->blocks()->at(block_id);
243 int first_instruction = block->first_instruction_index(); 244 int first_instruction = block->first_instruction_index();
244 return LLabel::cast(instructions_[first_instruction]); 245 return LLabel::cast(instructions_[first_instruction]);
245 } 246 }
246 247
247 248
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 376
376 void LChunk::CommitDependencies(Handle<Code> code) const { 377 void LChunk::CommitDependencies(Handle<Code> code) const {
377 for (MapSet::const_iterator it = deprecation_dependencies_.begin(), 378 for (MapSet::const_iterator it = deprecation_dependencies_.begin(),
378 iend = deprecation_dependencies_.end(); it != iend; ++it) { 379 iend = deprecation_dependencies_.end(); it != iend; ++it) {
379 Handle<Map> map = *it; 380 Handle<Map> map = *it;
380 ASSERT(!map->is_deprecated()); 381 ASSERT(!map->is_deprecated());
381 ASSERT(map->CanBeDeprecated()); 382 ASSERT(map->CanBeDeprecated());
382 Map::AddDependentCode(map, DependentCode::kTransitionGroup, code); 383 Map::AddDependentCode(map, DependentCode::kTransitionGroup, code);
383 } 384 }
384 385
386 for (MapSet::const_iterator it = stability_dependencies_.begin(),
387 iend = stability_dependencies_.end(); it != iend; ++it) {
388 Handle<Map> map = *it;
389 ASSERT(map->is_stable());
390 ASSERT(map->CanTransition());
391 Map::AddDependentCode(map, DependentCode::kPrototypeCheckGroup, code);
392 }
393
385 info_->CommitDependencies(code); 394 info_->CommitDependencies(code);
386 } 395 }
387 396
388 397
389 LChunk* LChunk::NewChunk(HGraph* graph) { 398 LChunk* LChunk::NewChunk(HGraph* graph) {
390 DisallowHandleAllocation no_handles; 399 DisallowHandleAllocation no_handles;
391 DisallowHeapAllocation no_gc; 400 DisallowHeapAllocation no_gc;
392 graph->DisallowAddingNewValues(); 401 graph->DisallowAddingNewValues();
393 int values = graph->GetMaximumValueID(); 402 int values = graph->GetMaximumValueID();
394 CompilationInfo* info = graph->info(); 403 CompilationInfo* info = graph->info();
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
602 611
603 612
604 LPhase::~LPhase() { 613 LPhase::~LPhase() {
605 if (ShouldProduceTraceOutput()) { 614 if (ShouldProduceTraceOutput()) {
606 isolate()->GetHTracer()->TraceLithium(name(), chunk_); 615 isolate()->GetHTracer()->TraceLithium(name(), chunk_);
607 } 616 }
608 } 617 }
609 618
610 619
611 } } // namespace v8::internal 620 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/lithium.h ('k') | src/lithium-codegen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698