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

Side by Side Diff: src/x64/lithium-x64.cc

Issue 98673003: Fix HInnerAllocatedObject to use an HValue for the offset. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years 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-x64.h ('k') | no next file » | 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 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 stream->Add(" = "); 268 stream->Add(" = ");
269 function()->PrintTo(stream); 269 function()->PrintTo(stream);
270 stream->Add(".code_entry = "); 270 stream->Add(".code_entry = ");
271 code_object()->PrintTo(stream); 271 code_object()->PrintTo(stream);
272 } 272 }
273 273
274 274
275 void LInnerAllocatedObject::PrintDataTo(StringStream* stream) { 275 void LInnerAllocatedObject::PrintDataTo(StringStream* stream) {
276 stream->Add(" = "); 276 stream->Add(" = ");
277 base_object()->PrintTo(stream); 277 base_object()->PrintTo(stream);
278 stream->Add(" + %d", offset()); 278 stream->Add(" + ");
279 offset()->PrintTo(stream);
279 } 280 }
280 281
281 282
282 void LCallConstantFunction::PrintDataTo(StringStream* stream) { 283 void LCallConstantFunction::PrintDataTo(StringStream* stream) {
283 stream->Add("#%d / ", arity()); 284 stream->Add("#%d / ", arity());
284 } 285 }
285 286
286 287
287 void LLoadContextSlot::PrintDataTo(StringStream* stream) { 288 void LLoadContextSlot::PrintDataTo(StringStream* stream) {
288 context()->PrintTo(stream); 289 context()->PrintTo(stream);
(...skipping 820 matching lines...) Expand 10 before | Expand all | Expand 10 after
1109 1110
1110 LInstruction* LChunkBuilder::DoStoreCodeEntry( 1111 LInstruction* LChunkBuilder::DoStoreCodeEntry(
1111 HStoreCodeEntry* store_code_entry) { 1112 HStoreCodeEntry* store_code_entry) {
1112 LOperand* function = UseRegister(store_code_entry->function()); 1113 LOperand* function = UseRegister(store_code_entry->function());
1113 LOperand* code_object = UseTempRegister(store_code_entry->code_object()); 1114 LOperand* code_object = UseTempRegister(store_code_entry->code_object());
1114 return new(zone()) LStoreCodeEntry(function, code_object); 1115 return new(zone()) LStoreCodeEntry(function, code_object);
1115 } 1116 }
1116 1117
1117 1118
1118 LInstruction* LChunkBuilder::DoInnerAllocatedObject( 1119 LInstruction* LChunkBuilder::DoInnerAllocatedObject(
1119 HInnerAllocatedObject* inner_object) { 1120 HInnerAllocatedObject* instr) {
1120 LOperand* base_object = UseRegisterAtStart(inner_object->base_object()); 1121 LOperand* base_object = UseRegisterAtStart(instr->base_object());
1121 LInnerAllocatedObject* result = 1122 LOperand* offset = UseRegisterOrConstantAtStart(instr->offset());
1122 new(zone()) LInnerAllocatedObject(base_object); 1123 return DefineAsRegister(
1123 return DefineAsRegister(result); 1124 new(zone()) LInnerAllocatedObject(base_object, offset));
1124 } 1125 }
1125 1126
1126 1127
1127 LInstruction* LChunkBuilder::DoThisFunction(HThisFunction* instr) { 1128 LInstruction* LChunkBuilder::DoThisFunction(HThisFunction* instr) {
1128 return instr->HasNoUses() 1129 return instr->HasNoUses()
1129 ? NULL 1130 ? NULL
1130 : DefineAsRegister(new(zone()) LThisFunction); 1131 : DefineAsRegister(new(zone()) LThisFunction);
1131 } 1132 }
1132 1133
1133 1134
(...skipping 1489 matching lines...) Expand 10 before | Expand all | Expand 10 after
2623 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { 2624 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) {
2624 LOperand* object = UseRegister(instr->object()); 2625 LOperand* object = UseRegister(instr->object());
2625 LOperand* index = UseTempRegister(instr->index()); 2626 LOperand* index = UseTempRegister(instr->index());
2626 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); 2627 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index));
2627 } 2628 }
2628 2629
2629 2630
2630 } } // namespace v8::internal 2631 } } // namespace v8::internal
2631 2632
2632 #endif // V8_TARGET_ARCH_X64 2633 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/lithium-x64.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698