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

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

Issue 1248483007: Store offset between fixed typed array base and data start in object (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: updates Created 5 years, 5 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
« no previous file with comments | « src/x64/lithium-codegen-x64.h ('k') | src/x64/lithium-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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_X64 7 #if V8_TARGET_ARCH_X64
8 8
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/code-factory.h" 10 #include "src/code-factory.h"
(...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after
451 DCHECK(op->IsDoubleRegister()); 451 DCHECK(op->IsDoubleRegister());
452 return ToDoubleRegister(op->index()); 452 return ToDoubleRegister(op->index());
453 } 453 }
454 454
455 455
456 bool LCodeGen::IsInteger32Constant(LConstantOperand* op) const { 456 bool LCodeGen::IsInteger32Constant(LConstantOperand* op) const {
457 return chunk_->LookupLiteralRepresentation(op).IsSmiOrInteger32(); 457 return chunk_->LookupLiteralRepresentation(op).IsSmiOrInteger32();
458 } 458 }
459 459
460 460
461 bool LCodeGen::IsExternalConstant(LConstantOperand* op) const {
462 return chunk_->LookupLiteralRepresentation(op).IsExternal();
463 }
464
465
461 bool LCodeGen::IsDehoistedKeyConstant(LConstantOperand* op) const { 466 bool LCodeGen::IsDehoistedKeyConstant(LConstantOperand* op) const {
462 return op->IsConstantOperand() && 467 return op->IsConstantOperand() &&
463 chunk_->IsDehoistedKey(chunk_->LookupConstant(op)); 468 chunk_->IsDehoistedKey(chunk_->LookupConstant(op));
464 } 469 }
465 470
466 471
467 bool LCodeGen::IsSmiConstant(LConstantOperand* op) const { 472 bool LCodeGen::IsSmiConstant(LConstantOperand* op) const {
468 return chunk_->LookupLiteralRepresentation(op).IsSmi(); 473 return chunk_->LookupLiteralRepresentation(op).IsSmi();
469 } 474 }
470 475
(...skipping 3740 matching lines...) Expand 10 before | Expand all | Expand 10 after
4211 if (IsInteger32Constant(operand_value)) { 4216 if (IsInteger32Constant(operand_value)) {
4212 DCHECK(!hinstr->NeedsWriteBarrier()); 4217 DCHECK(!hinstr->NeedsWriteBarrier());
4213 int32_t value = ToInteger32(operand_value); 4218 int32_t value = ToInteger32(operand_value);
4214 if (representation.IsSmi()) { 4219 if (representation.IsSmi()) {
4215 __ Move(operand, Smi::FromInt(value)); 4220 __ Move(operand, Smi::FromInt(value));
4216 4221
4217 } else { 4222 } else {
4218 __ movl(operand, Immediate(value)); 4223 __ movl(operand, Immediate(value));
4219 } 4224 }
4220 4225
4226 } else if (IsExternalConstant(operand_value)) {
4227 DCHECK(!hinstr->NeedsWriteBarrier());
4228 ExternalReference ptr = ToExternalReference(operand_value);
4229 __ Move(kScratchRegister, ptr);
4230 __ movp(operand, kScratchRegister);
4221 } else { 4231 } else {
4222 Handle<Object> handle_value = ToHandle(operand_value); 4232 Handle<Object> handle_value = ToHandle(operand_value);
4223 DCHECK(!hinstr->NeedsWriteBarrier()); 4233 DCHECK(!hinstr->NeedsWriteBarrier());
4224 __ Move(operand, handle_value); 4234 __ Move(operand, handle_value);
4225 } 4235 }
4226 } 4236 }
4227 4237
4228 if (hinstr->NeedsWriteBarrier()) { 4238 if (hinstr->NeedsWriteBarrier()) {
4229 Register value = ToRegister(instr->value()); 4239 Register value = ToRegister(instr->value());
4230 Register temp = access.IsInobject() ? ToRegister(instr->temp()) : object; 4240 Register temp = access.IsInobject() ? ToRegister(instr->temp()) : object;
(...skipping 1822 matching lines...) Expand 10 before | Expand all | Expand 10 after
6053 RecordSafepoint(Safepoint::kNoLazyDeopt); 6063 RecordSafepoint(Safepoint::kNoLazyDeopt);
6054 } 6064 }
6055 6065
6056 6066
6057 #undef __ 6067 #undef __
6058 6068
6059 } // namespace internal 6069 } // namespace internal
6060 } // namespace v8 6070 } // namespace v8
6061 6071
6062 #endif // V8_TARGET_ARCH_X64 6072 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/lithium-codegen-x64.h ('k') | src/x64/lithium-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698