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

Side by Side Diff: src/ia32/lithium-codegen-ia32.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/ia32/lithium-codegen-ia32.h ('k') | src/mark-compact.cc » ('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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 ASSERT(is_done()); 102 ASSERT(is_done());
103 code->set_stack_slots(GetStackSlotCount()); 103 code->set_stack_slots(GetStackSlotCount());
104 code->set_safepoint_table_offset(safepoints_.GetCodeOffset()); 104 code->set_safepoint_table_offset(safepoints_.GetCodeOffset());
105 if (FLAG_weak_embedded_maps_in_optimized_code) { 105 if (FLAG_weak_embedded_maps_in_optimized_code) {
106 RegisterDependentCodeForEmbeddedMaps(code); 106 RegisterDependentCodeForEmbeddedMaps(code);
107 } 107 }
108 PopulateDeoptimizationData(code); 108 PopulateDeoptimizationData(code);
109 if (!info()->IsStub()) { 109 if (!info()->IsStub()) {
110 Deoptimizer::EnsureRelocSpaceForLazyDeoptimization(code); 110 Deoptimizer::EnsureRelocSpaceForLazyDeoptimization(code);
111 } 111 }
112 for (int i = 0 ; i < prototype_maps_.length(); i++) { 112 info()->CommitDependentMaps(code);
113 prototype_maps_.at(i)->AddDependentCode(
114 DependentCode::kPrototypeCheckGroup, code);
115 }
116 for (int i = 0 ; i < transition_maps_.length(); i++) {
117 transition_maps_.at(i)->AddDependentCode(
118 DependentCode::kTransitionGroup, code);
119 }
120 if (graph()->depends_on_empty_array_proto_elements()) {
121 isolate()->initial_object_prototype()->map()->AddDependentCode(
122 DependentCode::kElementsCantBeAddedGroup, code);
123 isolate()->initial_array_prototype()->map()->AddDependentCode(
124 DependentCode::kElementsCantBeAddedGroup, code);
125 }
126 } 113 }
127 114
128 115
129 void LCodeGen::Abort(const char* reason) { 116 void LCodeGen::Abort(const char* reason) {
130 info()->set_bailout_reason(reason); 117 info()->set_bailout_reason(reason);
131 status_ = ABORTED; 118 status_ = ABORTED;
132 } 119 }
133 120
134 121
135 void LCodeGen::Comment(const char* format, ...) { 122 void LCodeGen::Comment(const char* format, ...) {
(...skipping 4188 matching lines...) Expand 10 before | Expand all | Expand 10 after
4324 CpuFeatureScope scope(masm(), SSE2); 4311 CpuFeatureScope scope(masm(), SSE2);
4325 XMMRegister value = ToDoubleRegister(instr->value()); 4312 XMMRegister value = ToDoubleRegister(instr->value());
4326 __ movdbl(FieldOperand(object, offset), value); 4313 __ movdbl(FieldOperand(object, offset), value);
4327 } else { 4314 } else {
4328 __ fstp_d(FieldOperand(object, offset)); 4315 __ fstp_d(FieldOperand(object, offset));
4329 } 4316 }
4330 return; 4317 return;
4331 } 4318 }
4332 4319
4333 if (!transition.is_null()) { 4320 if (!transition.is_null()) {
4334 if (transition->CanBeDeprecated()) {
4335 transition_maps_.Add(transition, info()->zone());
4336 }
4337 if (!instr->hydrogen()->NeedsWriteBarrierForMap()) { 4321 if (!instr->hydrogen()->NeedsWriteBarrierForMap()) {
4338 __ mov(FieldOperand(object, HeapObject::kMapOffset), transition); 4322 __ mov(FieldOperand(object, HeapObject::kMapOffset), transition);
4339 } else { 4323 } else {
4340 Register temp = ToRegister(instr->temp()); 4324 Register temp = ToRegister(instr->temp());
4341 Register temp_map = ToRegister(instr->temp_map()); 4325 Register temp_map = ToRegister(instr->temp_map());
4342 __ mov(temp_map, transition); 4326 __ mov(temp_map, transition);
4343 __ mov(FieldOperand(object, HeapObject::kMapOffset), temp_map); 4327 __ mov(FieldOperand(object, HeapObject::kMapOffset), temp_map);
4344 // Update the write barrier for the map field. 4328 // Update the write barrier for the map field.
4345 __ RecordWriteField(object, 4329 __ RecordWriteField(object,
4346 HeapObject::kMapOffset, 4330 HeapObject::kMapOffset,
(...skipping 1655 matching lines...) Expand 10 before | Expand all | Expand 10 after
6002 5986
6003 5987
6004 void LCodeGen::DoCheckPrototypeMaps(LCheckPrototypeMaps* instr) { 5988 void LCodeGen::DoCheckPrototypeMaps(LCheckPrototypeMaps* instr) {
6005 Register reg = ToRegister(instr->temp()); 5989 Register reg = ToRegister(instr->temp());
6006 5990
6007 ZoneList<Handle<JSObject> >* prototypes = instr->prototypes(); 5991 ZoneList<Handle<JSObject> >* prototypes = instr->prototypes();
6008 ZoneList<Handle<Map> >* maps = instr->maps(); 5992 ZoneList<Handle<Map> >* maps = instr->maps();
6009 5993
6010 ASSERT(prototypes->length() == maps->length()); 5994 ASSERT(prototypes->length() == maps->length());
6011 5995
6012 if (instr->hydrogen()->CanOmitPrototypeChecks()) { 5996 if (!instr->hydrogen()->CanOmitPrototypeChecks()) {
6013 for (int i = 0; i < maps->length(); i++) {
6014 prototype_maps_.Add(maps->at(i), info()->zone());
6015 }
6016 } else {
6017 for (int i = 0; i < prototypes->length(); i++) { 5997 for (int i = 0; i < prototypes->length(); i++) {
6018 __ LoadHeapObject(reg, prototypes->at(i)); 5998 __ LoadHeapObject(reg, prototypes->at(i));
6019 DoCheckMapCommon(reg, maps->at(i), instr); 5999 DoCheckMapCommon(reg, maps->at(i), instr);
6020 } 6000 }
6021 } 6001 }
6022 } 6002 }
6023 6003
6024 6004
6025 void LCodeGen::DoAllocate(LAllocate* instr) { 6005 void LCodeGen::DoAllocate(LAllocate* instr) {
6026 class DeferredAllocate: public LDeferredCode { 6006 class DeferredAllocate: public LDeferredCode {
(...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after
6535 FixedArray::kHeaderSize - kPointerSize)); 6515 FixedArray::kHeaderSize - kPointerSize));
6536 __ bind(&done); 6516 __ bind(&done);
6537 } 6517 }
6538 6518
6539 6519
6540 #undef __ 6520 #undef __
6541 6521
6542 } } // namespace v8::internal 6522 } } // namespace v8::internal
6543 6523
6544 #endif // V8_TARGET_ARCH_IA32 6524 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/lithium-codegen-ia32.h ('k') | src/mark-compact.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698