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

Side by Side Diff: src/arm/lithium-codegen-arm.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/arm/lithium-codegen-arm.h ('k') | src/compiler.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 LCodeGen::Abort(const char* reason) { 94 void LCodeGen::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 4146 matching lines...) Expand 10 before | Expand all | Expand 10 after
4260 } else if (FLAG_track_double_fields && representation.IsDouble()) { 4247 } else if (FLAG_track_double_fields && representation.IsDouble()) {
4261 ASSERT(transition.is_null()); 4248 ASSERT(transition.is_null());
4262 ASSERT(access.IsInobject()); 4249 ASSERT(access.IsInobject());
4263 ASSERT(!instr->hydrogen()->NeedsWriteBarrier()); 4250 ASSERT(!instr->hydrogen()->NeedsWriteBarrier());
4264 DwVfpRegister value = ToDoubleRegister(instr->value()); 4251 DwVfpRegister value = ToDoubleRegister(instr->value());
4265 __ vstr(value, FieldMemOperand(object, offset)); 4252 __ vstr(value, FieldMemOperand(object, offset));
4266 return; 4253 return;
4267 } 4254 }
4268 4255
4269 if (!transition.is_null()) { 4256 if (!transition.is_null()) {
4270 if (transition->CanBeDeprecated()) {
4271 transition_maps_.Add(transition, info()->zone());
4272 }
4273 __ mov(scratch, Operand(transition)); 4257 __ mov(scratch, Operand(transition));
4274 __ str(scratch, FieldMemOperand(object, HeapObject::kMapOffset)); 4258 __ str(scratch, FieldMemOperand(object, HeapObject::kMapOffset));
4275 if (instr->hydrogen()->NeedsWriteBarrierForMap()) { 4259 if (instr->hydrogen()->NeedsWriteBarrierForMap()) {
4276 Register temp = ToRegister(instr->temp()); 4260 Register temp = ToRegister(instr->temp());
4277 // Update the write barrier for the map field. 4261 // Update the write barrier for the map field.
4278 __ RecordWriteField(object, 4262 __ RecordWriteField(object,
4279 HeapObject::kMapOffset, 4263 HeapObject::kMapOffset,
4280 scratch, 4264 scratch,
4281 temp, 4265 temp,
4282 GetLinkRegisterState(), 4266 GetLinkRegisterState(),
(...skipping 1092 matching lines...) Expand 10 before | Expand all | Expand 10 after
5375 5359
5376 void LCodeGen::DoCheckPrototypeMaps(LCheckPrototypeMaps* instr) { 5360 void LCodeGen::DoCheckPrototypeMaps(LCheckPrototypeMaps* instr) {
5377 Register prototype_reg = ToRegister(instr->temp()); 5361 Register prototype_reg = ToRegister(instr->temp());
5378 Register map_reg = ToRegister(instr->temp2()); 5362 Register map_reg = ToRegister(instr->temp2());
5379 5363
5380 ZoneList<Handle<JSObject> >* prototypes = instr->prototypes(); 5364 ZoneList<Handle<JSObject> >* prototypes = instr->prototypes();
5381 ZoneList<Handle<Map> >* maps = instr->maps(); 5365 ZoneList<Handle<Map> >* maps = instr->maps();
5382 5366
5383 ASSERT(prototypes->length() == maps->length()); 5367 ASSERT(prototypes->length() == maps->length());
5384 5368
5385 if (instr->hydrogen()->CanOmitPrototypeChecks()) { 5369 if (!instr->hydrogen()->CanOmitPrototypeChecks()) {
5386 for (int i = 0; i < maps->length(); i++) {
5387 prototype_maps_.Add(maps->at(i), info()->zone());
5388 }
5389 } else {
5390 for (int i = 0; i < prototypes->length(); i++) { 5370 for (int i = 0; i < prototypes->length(); i++) {
5391 __ LoadHeapObject(prototype_reg, prototypes->at(i)); 5371 __ LoadHeapObject(prototype_reg, prototypes->at(i));
5392 __ ldr(map_reg, FieldMemOperand(prototype_reg, HeapObject::kMapOffset)); 5372 __ ldr(map_reg, FieldMemOperand(prototype_reg, HeapObject::kMapOffset));
5393 DoCheckMapCommon(map_reg, maps->at(i), instr->environment()); 5373 DoCheckMapCommon(map_reg, maps->at(i), instr->environment());
5394 } 5374 }
5395 } 5375 }
5396 } 5376 }
5397 5377
5398 5378
5399 void LCodeGen::DoAllocate(LAllocate* instr) { 5379 void LCodeGen::DoAllocate(LAllocate* instr) {
(...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after
5911 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index)); 5891 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index));
5912 __ ldr(result, FieldMemOperand(scratch, 5892 __ ldr(result, FieldMemOperand(scratch,
5913 FixedArray::kHeaderSize - kPointerSize)); 5893 FixedArray::kHeaderSize - kPointerSize));
5914 __ bind(&done); 5894 __ bind(&done);
5915 } 5895 }
5916 5896
5917 5897
5918 #undef __ 5898 #undef __
5919 5899
5920 } } // namespace v8::internal 5900 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/lithium-codegen-arm.h ('k') | src/compiler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698