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

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

Issue 491077: Fast codegen: Implement with. (Closed)
Patch Set: Created 11 years 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
Index: src/ia32/fast-codegen-ia32.cc
diff --git a/src/ia32/fast-codegen-ia32.cc b/src/ia32/fast-codegen-ia32.cc
index 1e4473c1a269480c3ac842b9e82ac5bbc0941fae..d7873a8792e00f73b48d82662ada929267762695 100644
--- a/src/ia32/fast-codegen-ia32.cc
+++ b/src/ia32/fast-codegen-ia32.cc
@@ -1665,6 +1665,21 @@ void FastCodeGenerator::VisitThisFunction(ThisFunction* expr) {
Register FastCodeGenerator::result_register() { return eax; }
+
+Register FastCodeGenerator::context_register() { return esi; }
+
+
+void FastCodeGenerator::StoreFrameField(int frame_offset, Register value) {
+ ASSERT_EQ(POINTER_SIZE_ALIGN(frame_offset), frame_offset);
+ __ mov(Operand(ebp, frame_offset), value);
+}
+
+
+void FastCodeGenerator::LoadContextField(Register dst, int context_index) {
+ __ mov(dst, Operand(context_register(), Context::SlotOffset(context_index)));
+}
+
+
// ----------------------------------------------------------------------------
// Non-local control flow support.
« src/fast-codegen.cc ('K') | « src/fast-codegen.cc ('k') | src/x64/fast-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698