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

Side by Side Diff: src/arm/lithium-codegen-arm.cc

Issue 16542003: Enable map dependency to in-flight compilation info. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: put transition maps and initial maps dependency into a separate CL Created 7 years, 6 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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 80
81 81
82 void LCodeGen::FinishCode(Handle<Code> code) { 82 void LCodeGen::FinishCode(Handle<Code> code) {
83 ASSERT(is_done()); 83 ASSERT(is_done());
84 code->set_stack_slots(GetStackSlotCount()); 84 code->set_stack_slots(GetStackSlotCount());
85 code->set_safepoint_table_offset(safepoints_.GetCodeOffset()); 85 code->set_safepoint_table_offset(safepoints_.GetCodeOffset());
86 if (FLAG_weak_embedded_maps_in_optimized_code) { 86 if (FLAG_weak_embedded_maps_in_optimized_code) {
87 RegisterDependentCodeForEmbeddedMaps(code); 87 RegisterDependentCodeForEmbeddedMaps(code);
88 } 88 }
89 PopulateDeoptimizationData(code); 89 PopulateDeoptimizationData(code);
90 for (int i = 0 ; i < prototype_maps_.length(); i++) { 90 info()->CommitDependentMaps(code);
91 prototype_maps_.at(i)->AddDependentCode( 91
92 DependentCode::kPrototypeCheckGroup, code);
93 }
94 for (int i = 0 ; i < transition_maps_.length(); i++) { 92 for (int i = 0 ; i < transition_maps_.length(); i++) {
95 transition_maps_.at(i)->AddDependentCode( 93 transition_maps_.at(i)->AddDependentCode(
96 DependentCode::kTransitionGroup, code); 94 DependentCode::kTransitionGroup, code);
97 } 95 }
98 if (graph()->depends_on_empty_array_proto_elements()) { 96 if (graph()->depends_on_empty_array_proto_elements()) {
99 isolate()->initial_object_prototype()->map()->AddDependentCode( 97 isolate()->initial_object_prototype()->map()->AddDependentCode(
100 DependentCode::kElementsCantBeAddedGroup, code); 98 DependentCode::kElementsCantBeAddedGroup, code);
101 isolate()->initial_array_prototype()->map()->AddDependentCode( 99 isolate()->initial_array_prototype()->map()->AddDependentCode(
102 DependentCode::kElementsCantBeAddedGroup, code); 100 DependentCode::kElementsCantBeAddedGroup, code);
103 } 101 }
(...skipping 5288 matching lines...) Expand 10 before | Expand all | Expand 10 after
5392 5390
5393 void LCodeGen::DoCheckPrototypeMaps(LCheckPrototypeMaps* instr) { 5391 void LCodeGen::DoCheckPrototypeMaps(LCheckPrototypeMaps* instr) {
5394 Register prototype_reg = ToRegister(instr->temp()); 5392 Register prototype_reg = ToRegister(instr->temp());
5395 Register map_reg = ToRegister(instr->temp2()); 5393 Register map_reg = ToRegister(instr->temp2());
5396 5394
5397 ZoneList<Handle<JSObject> >* prototypes = instr->prototypes(); 5395 ZoneList<Handle<JSObject> >* prototypes = instr->prototypes();
5398 ZoneList<Handle<Map> >* maps = instr->maps(); 5396 ZoneList<Handle<Map> >* maps = instr->maps();
5399 5397
5400 ASSERT(prototypes->length() == maps->length()); 5398 ASSERT(prototypes->length() == maps->length());
5401 5399
5402 if (instr->hydrogen()->CanOmitPrototypeChecks()) { 5400 if (!instr->hydrogen()->CanOmitPrototypeChecks()) {
5403 for (int i = 0; i < maps->length(); i++) {
5404 prototype_maps_.Add(maps->at(i), info()->zone());
5405 }
5406 } else {
5407 for (int i = 0; i < prototypes->length(); i++) { 5401 for (int i = 0; i < prototypes->length(); i++) {
5408 __ LoadHeapObject(prototype_reg, prototypes->at(i)); 5402 __ LoadHeapObject(prototype_reg, prototypes->at(i));
5409 __ ldr(map_reg, FieldMemOperand(prototype_reg, HeapObject::kMapOffset)); 5403 __ ldr(map_reg, FieldMemOperand(prototype_reg, HeapObject::kMapOffset));
5410 DoCheckMapCommon(map_reg, maps->at(i), instr->environment()); 5404 DoCheckMapCommon(map_reg, maps->at(i), instr->environment());
5411 } 5405 }
5412 } 5406 }
5413 } 5407 }
5414 5408
5415 5409
5416 void LCodeGen::DoAllocate(LAllocate* instr) { 5410 void LCodeGen::DoAllocate(LAllocate* instr) {
(...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after
5928 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index)); 5922 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index));
5929 __ ldr(result, FieldMemOperand(scratch, 5923 __ ldr(result, FieldMemOperand(scratch,
5930 FixedArray::kHeaderSize - kPointerSize)); 5924 FixedArray::kHeaderSize - kPointerSize));
5931 __ bind(&done); 5925 __ bind(&done);
5932 } 5926 }
5933 5927
5934 5928
5935 #undef __ 5929 #undef __
5936 5930
5937 } } // namespace v8::internal 5931 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/lithium-codegen-arm.h ('k') | src/compiler.h » ('j') | src/compiler.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698