Commit 9fb4abb9 authored by plind44@gmail.com's avatar plind44@gmail.com

MIPS: Allow specifying base offset when constructing Keyed hydrogen instructions.

Port r21426 (17e6338)

This is preparation for pending hydrogen stub work that needs to access memory using KeyedLoad/KeyedStore operations where the base offset used for the accesses are is the the default (e.g. the size of an FixedArray header for FixedArrays or zero for external arrays).

BUG=
R=plind44@gmail.com

Review URL: https://codereview.chromium.org/296983003

Patch from Balazs Kilvady <kilvadyb@homejinni.com>.

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21443 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 00b8e612
This diff is collapsed.
......@@ -132,8 +132,7 @@ class LCodeGen: public LCodeGenBase {
int constant_key,
int element_size,
int shift_size,
int additional_index,
int additional_offset);
int base_offset);
// Emit frame translation commands for an environment.
void WriteTranslation(LEnvironment* environment, Translation* translation);
......
......@@ -342,7 +342,7 @@ void LLoadKeyed::PrintDataTo(StringStream* stream) {
stream->Add("[");
key()->PrintTo(stream);
if (hydrogen()->IsDehoisted()) {
stream->Add(" + %d]", additional_index());
stream->Add(" + %d]", base_offset());
} else {
stream->Add("]");
}
......@@ -354,7 +354,7 @@ void LStoreKeyed::PrintDataTo(StringStream* stream) {
stream->Add("[");
key()->PrintTo(stream);
if (hydrogen()->IsDehoisted()) {
stream->Add(" + %d] <-", additional_index());
stream->Add(" + %d] <-", base_offset());
} else {
stream->Add("] <- ");
}
......
......@@ -1609,7 +1609,7 @@ class LLoadKeyed V8_FINAL : public LTemplateInstruction<1, 2, 0> {
DECLARE_HYDROGEN_ACCESSOR(LoadKeyed)
virtual void PrintDataTo(StringStream* stream);
uint32_t additional_index() const { return hydrogen()->index_offset(); }
uint32_t base_offset() const { return hydrogen()->base_offset(); }
};
......@@ -2178,7 +2178,7 @@ class LStoreKeyed V8_FINAL : public LTemplateInstruction<0, 3, 0> {
virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
bool NeedsCanonicalization() { return hydrogen()->NeedsCanonicalization(); }
uint32_t additional_index() const { return hydrogen()->index_offset(); }
uint32_t base_offset() const { return hydrogen()->base_offset(); }
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment