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

Unified Diff: src/ia32/lithium-codegen-ia32.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/hydrogen-instructions.h ('k') | src/ia32/lithium-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ia32/lithium-codegen-ia32.cc
diff --git a/src/ia32/lithium-codegen-ia32.cc b/src/ia32/lithium-codegen-ia32.cc
index fb3c05ebab4f956655196bc728be25ef3d9038ea..4bed05280847f04382459659658edd0af8970004 100644
--- a/src/ia32/lithium-codegen-ia32.cc
+++ b/src/ia32/lithium-codegen-ia32.cc
@@ -541,6 +541,10 @@ int32_t LCodeGen::ToInteger32(LConstantOperand* op) const {
int32_t LCodeGen::ToRepresentation(LConstantOperand* op,
const Representation& r) const {
HConstant* constant = chunk_->LookupConstant(op);
+ if (r.IsExternal()) {
+ return reinterpret_cast<int32_t>(
+ constant->ExternalReferenceValue().address());
+ }
int32_t value = constant->Integer32Value();
if (r.IsInteger32()) return value;
DCHECK(r.IsSmiOrTagged());
@@ -4087,7 +4091,7 @@ void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) {
if (operand_value->IsRegister()) {
Register value = ToRegister(operand_value);
__ Store(value, operand, representation);
- } else if (representation.IsInteger32()) {
+ } else if (representation.IsInteger32() || representation.IsExternal()) {
Immediate immediate = ToImmediate(operand_value, representation);
DCHECK(!instr->hydrogen()->NeedsWriteBarrier());
__ mov(operand, immediate);
« no previous file with comments | « src/hydrogen-instructions.h ('k') | src/ia32/lithium-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698