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

Side by Side Diff: src/x64/lithium-codegen-x64.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/x64/lithium-codegen-x64.h ('k') | test/mjsunit/compiler/parallel-proto-change.js » ('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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 85
86 86
87 void LCodeGen::FinishCode(Handle<Code> code) { 87 void LCodeGen::FinishCode(Handle<Code> code) {
88 ASSERT(is_done()); 88 ASSERT(is_done());
89 code->set_stack_slots(GetStackSlotCount()); 89 code->set_stack_slots(GetStackSlotCount());
90 code->set_safepoint_table_offset(safepoints_.GetCodeOffset()); 90 code->set_safepoint_table_offset(safepoints_.GetCodeOffset());
91 if (FLAG_weak_embedded_maps_in_optimized_code) { 91 if (FLAG_weak_embedded_maps_in_optimized_code) {
92 RegisterDependentCodeForEmbeddedMaps(code); 92 RegisterDependentCodeForEmbeddedMaps(code);
93 } 93 }
94 PopulateDeoptimizationData(code); 94 PopulateDeoptimizationData(code);
95 for (int i = 0 ; i < prototype_maps_.length(); i++) { 95 info()->CommitDependentMaps(code);
96 prototype_maps_.at(i)->AddDependentCode(
97 DependentCode::kPrototypeCheckGroup, code);
98 }
99 for (int i = 0 ; i < transition_maps_.length(); i++) {
100 transition_maps_.at(i)->AddDependentCode(
101 DependentCode::kTransitionGroup, code);
102 }
103 if (graph()->depends_on_empty_array_proto_elements()) {
104 isolate()->initial_object_prototype()->map()->AddDependentCode(
105 DependentCode::kElementsCantBeAddedGroup, code);
106 isolate()->initial_array_prototype()->map()->AddDependentCode(
107 DependentCode::kElementsCantBeAddedGroup, code);
108 }
109 } 96 }
110 97
111 98
112 void LChunkBuilder::Abort(const char* reason) { 99 void LChunkBuilder::Abort(const char* reason) {
113 info()->set_bailout_reason(reason); 100 info()->set_bailout_reason(reason);
114 status_ = ABORTED; 101 status_ = ABORTED;
115 } 102 }
116 103
117 104
118 void LCodeGen::Comment(const char* format, ...) { 105 void LCodeGen::Comment(const char* format, ...) {
(...skipping 3899 matching lines...) Expand 10 before | Expand all | Expand 10 after
4018 } else if (FLAG_track_double_fields && representation.IsDouble()) { 4005 } else if (FLAG_track_double_fields && representation.IsDouble()) {
4019 ASSERT(transition.is_null()); 4006 ASSERT(transition.is_null());
4020 ASSERT(access.IsInobject()); 4007 ASSERT(access.IsInobject());
4021 ASSERT(!instr->hydrogen()->NeedsWriteBarrier()); 4008 ASSERT(!instr->hydrogen()->NeedsWriteBarrier());
4022 XMMRegister value = ToDoubleRegister(instr->value()); 4009 XMMRegister value = ToDoubleRegister(instr->value());
4023 __ movsd(FieldOperand(object, offset), value); 4010 __ movsd(FieldOperand(object, offset), value);
4024 return; 4011 return;
4025 } 4012 }
4026 4013
4027 if (!transition.is_null()) { 4014 if (!transition.is_null()) {
4028 if (transition->CanBeDeprecated()) {
4029 transition_maps_.Add(transition, info()->zone());
4030 }
4031 if (!instr->hydrogen()->NeedsWriteBarrierForMap()) { 4015 if (!instr->hydrogen()->NeedsWriteBarrierForMap()) {
4032 __ Move(FieldOperand(object, HeapObject::kMapOffset), transition); 4016 __ Move(FieldOperand(object, HeapObject::kMapOffset), transition);
4033 } else { 4017 } else {
4034 Register temp = ToRegister(instr->temp()); 4018 Register temp = ToRegister(instr->temp());
4035 __ Move(kScratchRegister, transition); 4019 __ Move(kScratchRegister, transition);
4036 __ movq(FieldOperand(object, HeapObject::kMapOffset), kScratchRegister); 4020 __ movq(FieldOperand(object, HeapObject::kMapOffset), kScratchRegister);
4037 // Update the write barrier for the map field. 4021 // Update the write barrier for the map field.
4038 __ RecordWriteField(object, 4022 __ RecordWriteField(object,
4039 HeapObject::kMapOffset, 4023 HeapObject::kMapOffset,
4040 kScratchRegister, 4024 kScratchRegister,
(...skipping 1052 matching lines...) Expand 10 before | Expand all | Expand 10 after
5093 5077
5094 5078
5095 void LCodeGen::DoCheckPrototypeMaps(LCheckPrototypeMaps* instr) { 5079 void LCodeGen::DoCheckPrototypeMaps(LCheckPrototypeMaps* instr) {
5096 Register reg = ToRegister(instr->temp()); 5080 Register reg = ToRegister(instr->temp());
5097 5081
5098 ZoneList<Handle<JSObject> >* prototypes = instr->prototypes(); 5082 ZoneList<Handle<JSObject> >* prototypes = instr->prototypes();
5099 ZoneList<Handle<Map> >* maps = instr->maps(); 5083 ZoneList<Handle<Map> >* maps = instr->maps();
5100 5084
5101 ASSERT(prototypes->length() == maps->length()); 5085 ASSERT(prototypes->length() == maps->length());
5102 5086
5103 if (instr->hydrogen()->CanOmitPrototypeChecks()) { 5087 if (!instr->hydrogen()->CanOmitPrototypeChecks()) {
5104 for (int i = 0; i < maps->length(); i++) {
5105 prototype_maps_.Add(maps->at(i), info()->zone());
5106 }
5107 } else {
5108 for (int i = 0; i < prototypes->length(); i++) { 5088 for (int i = 0; i < prototypes->length(); i++) {
5109 __ LoadHeapObject(reg, prototypes->at(i)); 5089 __ LoadHeapObject(reg, prototypes->at(i));
5110 DoCheckMapCommon(reg, maps->at(i), instr); 5090 DoCheckMapCommon(reg, maps->at(i), instr);
5111 } 5091 }
5112 } 5092 }
5113 } 5093 }
5114 5094
5115 5095
5116 void LCodeGen::DoAllocate(LAllocate* instr) { 5096 void LCodeGen::DoAllocate(LAllocate* instr) {
5117 class DeferredAllocate: public LDeferredCode { 5097 class DeferredAllocate: public LDeferredCode {
(...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after
5634 FixedArray::kHeaderSize - kPointerSize)); 5614 FixedArray::kHeaderSize - kPointerSize));
5635 __ bind(&done); 5615 __ bind(&done);
5636 } 5616 }
5637 5617
5638 5618
5639 #undef __ 5619 #undef __
5640 5620
5641 } } // namespace v8::internal 5621 } } // namespace v8::internal
5642 5622
5643 #endif // V8_TARGET_ARCH_X64 5623 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/lithium-codegen-x64.h ('k') | test/mjsunit/compiler/parallel-proto-change.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698