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

Unified Diff: src/ia32/lithium-codegen-ia32.cc

Issue 1228113008: Crankshaft part of the 'loads and stores to global vars through property cell shortcuts' feature. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed comments + regression test 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.cc ('k') | src/ia32/lithium-ia32.h » ('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 00860115ba82a0ad386df7ba9fb86c866ec2c462..fb3c05ebab4f956655196bc728be25ef3d9038ea 100644
--- a/src/ia32/lithium-codegen-ia32.cc
+++ b/src/ia32/lithium-codegen-ia32.cc
@@ -2862,6 +2862,22 @@ void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) {
}
+void LCodeGen::DoLoadGlobalViaContext(LLoadGlobalViaContext* instr) {
+ DCHECK(ToRegister(instr->context()).is(esi));
+ DCHECK(ToRegister(instr->result()).is(eax));
+
+ __ mov(LoadGlobalViaContextDescriptor::DepthRegister(),
+ Immediate(Smi::FromInt(instr->depth())));
+ __ mov(LoadGlobalViaContextDescriptor::SlotRegister(),
+ Immediate(Smi::FromInt(instr->slot_index())));
+ __ mov(LoadGlobalViaContextDescriptor::NameRegister(), instr->name());
+
+ Handle<Code> stub =
+ CodeFactory::LoadGlobalViaContext(isolate(), instr->depth()).code();
+ CallCode(stub, RelocInfo::CODE_TARGET, instr);
+}
+
+
void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) {
Register context = ToRegister(instr->context());
Register result = ToRegister(instr->result());
@@ -4118,6 +4134,24 @@ void LCodeGen::DoStoreNamedGeneric(LStoreNamedGeneric* instr) {
}
+void LCodeGen::DoStoreGlobalViaContext(LStoreGlobalViaContext* instr) {
+ DCHECK(ToRegister(instr->context()).is(esi));
+ DCHECK(ToRegister(instr->value())
+ .is(StoreGlobalViaContextDescriptor::ValueRegister()));
+
+ __ mov(StoreGlobalViaContextDescriptor::DepthRegister(),
+ Immediate(Smi::FromInt(instr->depth())));
+ __ mov(StoreGlobalViaContextDescriptor::SlotRegister(),
+ Immediate(Smi::FromInt(instr->slot_index())));
+ __ mov(StoreGlobalViaContextDescriptor::NameRegister(), instr->name());
+
+ Handle<Code> stub =
+ CodeFactory::StoreGlobalViaContext(isolate(), instr->depth(),
+ instr->language_mode()).code();
+ CallCode(stub, RelocInfo::CODE_TARGET, instr);
+}
+
+
void LCodeGen::DoBoundsCheck(LBoundsCheck* instr) {
Condition cc = instr->hydrogen()->allow_equality() ? above : above_equal;
if (instr->index()->IsConstantOperand()) {
« no previous file with comments | « src/hydrogen-instructions.cc ('k') | src/ia32/lithium-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698