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

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

Issue 16782004: Reland "Enable map dependency to in-flight compilation info." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: The fix. 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
« no previous file with comments | « src/mips/lithium-codegen-mips.h ('k') | src/objects.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 // 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(
92 DependentCode::kPrototypeCheckGroup, code);
93 }
94 for (int i = 0 ; i < transition_maps_.length(); i++) {
95 transition_maps_.at(i)->AddDependentCode(
96 DependentCode::kTransitionGroup, code);
97 }
98 if (graph()->depends_on_empty_array_proto_elements()) {
99 isolate()->initial_object_prototype()->map()->AddDependentCode(
100 DependentCode::kElementsCantBeAddedGroup, code);
101 isolate()->initial_array_prototype()->map()->AddDependentCode(
102 DependentCode::kElementsCantBeAddedGroup, code);
103 }
104 } 91 }
105 92
106 93
107 void LChunkBuilder::Abort(const char* reason) { 94 void LChunkBuilder::Abort(const char* reason) {
108 info()->set_bailout_reason(reason); 95 info()->set_bailout_reason(reason);
109 status_ = ABORTED; 96 status_ = ABORTED;
110 } 97 }
111 98
112 99
113 void LCodeGen::Comment(const char* format, ...) { 100 void LCodeGen::Comment(const char* format, ...) {
(...skipping 3868 matching lines...) Expand 10 before | Expand all | Expand 10 after
3982 } else if (FLAG_track_double_fields && representation.IsDouble()) { 3969 } else if (FLAG_track_double_fields && representation.IsDouble()) {
3983 ASSERT(transition.is_null()); 3970 ASSERT(transition.is_null());
3984 ASSERT(access.IsInobject()); 3971 ASSERT(access.IsInobject());
3985 ASSERT(!instr->hydrogen()->NeedsWriteBarrier()); 3972 ASSERT(!instr->hydrogen()->NeedsWriteBarrier());
3986 DoubleRegister value = ToDoubleRegister(instr->value()); 3973 DoubleRegister value = ToDoubleRegister(instr->value());
3987 __ sdc1(value, FieldMemOperand(object, offset)); 3974 __ sdc1(value, FieldMemOperand(object, offset));
3988 return; 3975 return;
3989 } 3976 }
3990 3977
3991 if (!transition.is_null()) { 3978 if (!transition.is_null()) {
3992 if (transition->CanBeDeprecated()) {
3993 transition_maps_.Add(transition, info()->zone());
3994 }
3995 __ li(scratch, Operand(transition)); 3979 __ li(scratch, Operand(transition));
3996 __ sw(scratch, FieldMemOperand(object, HeapObject::kMapOffset)); 3980 __ sw(scratch, FieldMemOperand(object, HeapObject::kMapOffset));
3997 if (instr->hydrogen()->NeedsWriteBarrierForMap()) { 3981 if (instr->hydrogen()->NeedsWriteBarrierForMap()) {
3998 Register temp = ToRegister(instr->temp()); 3982 Register temp = ToRegister(instr->temp());
3999 // Update the write barrier for the map field. 3983 // Update the write barrier for the map field.
4000 __ RecordWriteField(object, 3984 __ RecordWriteField(object,
4001 HeapObject::kMapOffset, 3985 HeapObject::kMapOffset,
4002 scratch, 3986 scratch,
4003 temp, 3987 temp,
4004 GetRAState(), 3988 GetRAState(),
(...skipping 1130 matching lines...) Expand 10 before | Expand all | Expand 10 after
5135 5119
5136 void LCodeGen::DoCheckPrototypeMaps(LCheckPrototypeMaps* instr) { 5120 void LCodeGen::DoCheckPrototypeMaps(LCheckPrototypeMaps* instr) {
5137 Register prototype_reg = ToRegister(instr->temp()); 5121 Register prototype_reg = ToRegister(instr->temp());
5138 Register map_reg = ToRegister(instr->temp2()); 5122 Register map_reg = ToRegister(instr->temp2());
5139 5123
5140 ZoneList<Handle<JSObject> >* prototypes = instr->prototypes(); 5124 ZoneList<Handle<JSObject> >* prototypes = instr->prototypes();
5141 ZoneList<Handle<Map> >* maps = instr->maps(); 5125 ZoneList<Handle<Map> >* maps = instr->maps();
5142 5126
5143 ASSERT(prototypes->length() == maps->length()); 5127 ASSERT(prototypes->length() == maps->length());
5144 5128
5145 if (instr->hydrogen()->CanOmitPrototypeChecks()) { 5129 if (!instr->hydrogen()->CanOmitPrototypeChecks()) {
5146 for (int i = 0; i < maps->length(); i++) {
5147 prototype_maps_.Add(maps->at(i), info()->zone());
5148 }
5149 } else {
5150 for (int i = 0; i < prototypes->length(); i++) { 5130 for (int i = 0; i < prototypes->length(); i++) {
5151 __ LoadHeapObject(prototype_reg, prototypes->at(i)); 5131 __ LoadHeapObject(prototype_reg, prototypes->at(i));
5152 __ lw(map_reg, FieldMemOperand(prototype_reg, HeapObject::kMapOffset)); 5132 __ lw(map_reg, FieldMemOperand(prototype_reg, HeapObject::kMapOffset));
5153 DoCheckMapCommon(map_reg, maps->at(i), instr->environment()); 5133 DoCheckMapCommon(map_reg, maps->at(i), instr->environment());
5154 } 5134 }
5155 } 5135 }
5156 } 5136 }
5157 5137
5158 5138
5159 void LCodeGen::DoAllocate(LAllocate* instr) { 5139 void LCodeGen::DoAllocate(LAllocate* instr) {
(...skipping 551 matching lines...) Expand 10 before | Expand all | Expand 10 after
5711 __ Subu(scratch, result, scratch); 5691 __ Subu(scratch, result, scratch);
5712 __ lw(result, FieldMemOperand(scratch, 5692 __ lw(result, FieldMemOperand(scratch,
5713 FixedArray::kHeaderSize - kPointerSize)); 5693 FixedArray::kHeaderSize - kPointerSize));
5714 __ bind(&done); 5694 __ bind(&done);
5715 } 5695 }
5716 5696
5717 5697
5718 #undef __ 5698 #undef __
5719 5699
5720 } } // namespace v8::internal 5700 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/mips/lithium-codegen-mips.h ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698