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

Side by Side Diff: src/ia32/lithium-codegen-ia32.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/hydrogen-instructions.cc ('k') | src/ia32/lithium-ia32.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 4408 matching lines...) Expand 10 before | Expand all | Expand 10 after
4419 Register function = ToRegister(instr->function()); 4419 Register function = ToRegister(instr->function());
4420 Register code_object = ToRegister(instr->code_object()); 4420 Register code_object = ToRegister(instr->code_object());
4421 __ lea(code_object, FieldOperand(code_object, Code::kHeaderSize)); 4421 __ lea(code_object, FieldOperand(code_object, Code::kHeaderSize));
4422 __ mov(FieldOperand(function, JSFunction::kCodeEntryOffset), code_object); 4422 __ mov(FieldOperand(function, JSFunction::kCodeEntryOffset), code_object);
4423 } 4423 }
4424 4424
4425 4425
4426 void LCodeGen::DoInnerAllocatedObject(LInnerAllocatedObject* instr) { 4426 void LCodeGen::DoInnerAllocatedObject(LInnerAllocatedObject* instr) {
4427 Register result = ToRegister(instr->result()); 4427 Register result = ToRegister(instr->result());
4428 Register base = ToRegister(instr->base_object()); 4428 Register base = ToRegister(instr->base_object());
4429 __ lea(result, Operand(base, instr->offset())); 4429 if (instr->offset()->IsConstantOperand()) {
4430 LConstantOperand* offset = LConstantOperand::cast(instr->offset());
4431 __ lea(result, Operand(base, ToInteger32(offset)));
4432 } else {
4433 Register offset = ToRegister(instr->offset());
4434 __ lea(result, Operand(base, offset, times_1, 0));
4435 }
4430 } 4436 }
4431 4437
4432 4438
4433 void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) { 4439 void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) {
4434 Representation representation = instr->representation(); 4440 Representation representation = instr->representation();
4435 4441
4436 HObjectAccess access = instr->hydrogen()->access(); 4442 HObjectAccess access = instr->hydrogen()->access();
4437 int offset = access.offset(); 4443 int offset = access.offset();
4438 4444
4439 if (access.IsExternalMemory()) { 4445 if (access.IsExternalMemory()) {
(...skipping 1988 matching lines...) Expand 10 before | Expand all | Expand 10 after
6428 FixedArray::kHeaderSize - kPointerSize)); 6434 FixedArray::kHeaderSize - kPointerSize));
6429 __ bind(&done); 6435 __ bind(&done);
6430 } 6436 }
6431 6437
6432 6438
6433 #undef __ 6439 #undef __
6434 6440
6435 } } // namespace v8::internal 6441 } } // namespace v8::internal
6436 6442
6437 #endif // V8_TARGET_ARCH_IA32 6443 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/hydrogen-instructions.cc ('k') | src/ia32/lithium-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698