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

Unified 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x64/lithium-codegen-x64.cc
diff --git a/src/x64/lithium-codegen-x64.cc b/src/x64/lithium-codegen-x64.cc
index 6305dc7587db4bfb3cc3afa0fce6435b7e126faf..92688ce4992ed4b7089963b80af0a22babe70cb7 100644
--- a/src/x64/lithium-codegen-x64.cc
+++ b/src/x64/lithium-codegen-x64.cc
@@ -458,6 +458,11 @@ bool LCodeGen::IsInteger32Constant(LConstantOperand* op) const {
}
+bool LCodeGen::IsExternalConstant(LConstantOperand* op) const {
+ return chunk_->LookupLiteralRepresentation(op).IsExternal();
+}
+
+
bool LCodeGen::IsDehoistedKeyConstant(LConstantOperand* op) const {
return op->IsConstantOperand() &&
chunk_->IsDehoistedKey(chunk_->LookupConstant(op));
@@ -4218,6 +4223,11 @@ void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) {
__ movl(operand, Immediate(value));
}
+ } else if (IsExternalConstant(operand_value)) {
+ DCHECK(!hinstr->NeedsWriteBarrier());
+ ExternalReference ptr = ToExternalReference(operand_value);
+ __ Move(kScratchRegister, ptr);
+ __ movp(operand, kScratchRegister);
} else {
Handle<Object> handle_value = ToHandle(operand_value);
DCHECK(!hinstr->NeedsWriteBarrier());
« 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