Chromium Code Reviews

Side by Side Diff: src/ia32/lithium-codegen-ia32.cc

Issue 19956002: Support double allocations when folding allocation. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | | Annotate | Revision Log
« no previous file with comments | « src/hydrogen-instructions.cc ('k') | src/x64/lithium-codegen-x64.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 4316 matching lines...)
4327 4327
4328 4328
4329 void LCodeGen::DoCallRuntime(LCallRuntime* instr) { 4329 void LCodeGen::DoCallRuntime(LCallRuntime* instr) {
4330 CallRuntime(instr->function(), instr->arity(), instr); 4330 CallRuntime(instr->function(), instr->arity(), instr);
4331 } 4331 }
4332 4332
4333 4333
4334 void LCodeGen::DoInnerAllocatedObject(LInnerAllocatedObject* instr) { 4334 void LCodeGen::DoInnerAllocatedObject(LInnerAllocatedObject* instr) {
4335 Register result = ToRegister(instr->result()); 4335 Register result = ToRegister(instr->result());
4336 Register base = ToRegister(instr->base_object()); 4336 Register base = ToRegister(instr->base_object());
4337 __ lea(result, Operand(base, instr->offset())); 4337 int offset = instr->offset();
4338 if (instr->hydrogen()->MustAllocateDoubleAligned()) {
4339 ASSERT(kPointerAlignment * 2 == kDoubleAlignment);
4340 Label aligned;
4341 __ test(base, Immediate(kDoubleAlignmentMask));
4342 __ j(zero, &aligned, Label::kNear);
Michael Starzinger 2013/07/22 19:46:56 This is a NOP. The jump at runtime does not affect
4343 offset += (kDoubleSize / 2);
4344 __ bind(&aligned);
4345 }
4346 __ lea(result, Operand(base, offset));
4338 } 4347 }
4339 4348
4340 4349
4341 void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) { 4350 void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) {
4342 Representation representation = instr->representation(); 4351 Representation representation = instr->representation();
4343 4352
4344 Register object = ToRegister(instr->object()); 4353 Register object = ToRegister(instr->object());
4345 HObjectAccess access = instr->hydrogen()->access(); 4354 HObjectAccess access = instr->hydrogen()->access();
4346 int offset = access.offset(); 4355 int offset = access.offset();
4347 4356
(...skipping 2153 matching lines...)
6501 FixedArray::kHeaderSize - kPointerSize)); 6510 FixedArray::kHeaderSize - kPointerSize));
6502 __ bind(&done); 6511 __ bind(&done);
6503 } 6512 }
6504 6513
6505 6514
6506 #undef __ 6515 #undef __
6507 6516
6508 } } // namespace v8::internal 6517 } } // namespace v8::internal
6509 6518
6510 #endif // V8_TARGET_ARCH_IA32 6519 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/hydrogen-instructions.cc ('k') | src/x64/lithium-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine