diff --git a/src/lib-sieve/ext-encoded-character.c b/src/lib-sieve/ext-encoded-character.c
index 5eac00c70514930aa1d6fabfb0288e6041226f08..85532885ef7507a3fd36db97218e5c03e46e58c8 100644
--- a/src/lib-sieve/ext-encoded-character.c
+++ b/src/lib-sieve/ext-encoded-character.c
@@ -35,7 +35,7 @@ struct sieve_extension encoded_character_extension = {
 	&ext_my_id,
 	ext_encoded_character_load,
 	ext_encoded_character_validator_load, 
-	NULL, NULL, NULL, NULL,
+	NULL, NULL, NULL, NULL, NULL,
 	SIEVE_EXT_DEFINE_NO_OPERATIONS, 
 	SIEVE_EXT_DEFINE_NO_OPERANDS
 };
diff --git a/src/lib-sieve/ext-envelope.c b/src/lib-sieve/ext-envelope.c
index 5dba8dd295cd4fa18580ce0d2b1fdbd4d2a1b3e6..17705faa9dfaa45d3344fa5916e5a1896494c28b 100644
--- a/src/lib-sieve/ext-envelope.c
+++ b/src/lib-sieve/ext-envelope.c
@@ -52,7 +52,7 @@ const struct sieve_extension envelope_extension = {
 	&ext_my_id,
 	ext_envelope_load,
 	ext_envelope_validator_load, 
-	NULL, NULL, NULL, NULL,
+	NULL, NULL, NULL, NULL, NULL,
 	SIEVE_EXT_DEFINE_OPERATION(envelope_operation), 
 	SIEVE_EXT_DEFINE_NO_OPERANDS 
 };
diff --git a/src/lib-sieve/ext-fileinto.c b/src/lib-sieve/ext-fileinto.c
index 4c22fd996857bd88234b18b8456f37f4a81318f0..3e8ef2f4e3b4898cd6d3257bba47e661743e020d 100644
--- a/src/lib-sieve/ext-fileinto.c
+++ b/src/lib-sieve/ext-fileinto.c
@@ -48,7 +48,7 @@ const struct sieve_extension fileinto_extension = {
 	&ext_my_id,
 	ext_fileinto_load,
 	ext_fileinto_validator_load, 
-	NULL, NULL, NULL, NULL,
+	NULL, NULL, NULL, NULL, NULL,
 	SIEVE_EXT_DEFINE_OPERATION(fileinto_operation), 
 	SIEVE_EXT_DEFINE_NO_OPERANDS	
 };
diff --git a/src/lib-sieve/ext-reject.c b/src/lib-sieve/ext-reject.c
index 69521b338f57b419a705f61166e0a898a1c3d135..0dd89812bed0344def6c818ee29e0d731807a3d8 100644
--- a/src/lib-sieve/ext-reject.c
+++ b/src/lib-sieve/ext-reject.c
@@ -54,7 +54,7 @@ struct sieve_extension reject_extension = {
 	&ext_my_id,
 	ext_reject_load,
 	ext_reject_validator_load, 
-	NULL, NULL, NULL, NULL,
+	NULL, NULL, NULL, NULL, NULL,
 	SIEVE_EXT_DEFINE_OPERATION(reject_operation), 
 	SIEVE_EXT_DEFINE_NO_OPERANDS
 };
diff --git a/src/lib-sieve/plugins/body/ext-body.c b/src/lib-sieve/plugins/body/ext-body.c
index 2c5d6cce8b6db50202c673f1fc3db1546c5c9525..1369e934f37cd34980e087e1add136f8642bebe7 100644
--- a/src/lib-sieve/plugins/body/ext-body.c
+++ b/src/lib-sieve/plugins/body/ext-body.c
@@ -58,7 +58,7 @@ const struct sieve_extension body_extension = {
 	&ext_body_my_id,
 	ext_body_load,
 	ext_body_validator_load, 
-	NULL, NULL, NULL, NULL,
+	NULL, NULL, NULL, NULL, NULL,
 	SIEVE_EXT_DEFINE_OPERATION(body_operation), 
 	SIEVE_EXT_DEFINE_NO_OPERANDS
 };
diff --git a/src/lib-sieve/plugins/comparator-i-ascii-numeric/ext-cmp-i-ascii-numeric.c b/src/lib-sieve/plugins/comparator-i-ascii-numeric/ext-cmp-i-ascii-numeric.c
index 21ef63c0013da564c3478ec011b913a58f92744f..609de1ccf258462fafec03a0723c661066e3e6d7 100644
--- a/src/lib-sieve/plugins/comparator-i-ascii-numeric/ext-cmp-i-ascii-numeric.c
+++ b/src/lib-sieve/plugins/comparator-i-ascii-numeric/ext-cmp-i-ascii-numeric.c
@@ -46,7 +46,7 @@ const struct sieve_extension comparator_i_ascii_numeric_extension = {
 	&ext_my_id,
 	ext_cmp_i_ascii_numeric_load,
 	ext_cmp_i_ascii_numeric_validator_load,
-	NULL, NULL, NULL, NULL,
+	NULL, NULL, NULL, NULL, NULL,
 	SIEVE_EXT_DEFINE_NO_OPERATIONS, 
 	SIEVE_EXT_DEFINE_OPERAND(my_comparator_operand)
 };
diff --git a/src/lib-sieve/plugins/copy/ext-copy.c b/src/lib-sieve/plugins/copy/ext-copy.c
index 2548c8aa7d14fe29b2c3126c5068a7cea78a28bd..3b2ac17a1af1a7747e3c5de98adbda98a0238237 100644
--- a/src/lib-sieve/plugins/copy/ext-copy.c
+++ b/src/lib-sieve/plugins/copy/ext-copy.c
@@ -45,7 +45,7 @@ const struct sieve_extension copy_extension = {
 	&ext_my_id,
 	ext_copy_load,
 	ext_copy_validator_load, 
-	NULL, NULL, NULL, NULL,
+	NULL, NULL, NULL, NULL, NULL,
 	SIEVE_EXT_DEFINE_NO_OPERATIONS,
 	SIEVE_EXT_DEFINE_OPERAND(copy_side_effect_operand)
 };
diff --git a/src/lib-sieve/plugins/imapflags/ext-imapflags.c b/src/lib-sieve/plugins/imapflags/ext-imapflags.c
index f2629e18621ef819cc4b84d36ecdaf9c8a46f506..0bb7c4724c6f13f8b7dd914880ac69fea9fb6416 100644
--- a/src/lib-sieve/plugins/imapflags/ext-imapflags.c
+++ b/src/lib-sieve/plugins/imapflags/ext-imapflags.c
@@ -44,7 +44,8 @@ const struct sieve_operation *imapflags_operations[] = {
 
 static bool ext_imapflags_load(int ext_id);
 static bool ext_imapflags_validator_load(struct sieve_validator *valdtr);
-static bool ext_imapflags_interpreter_load(struct sieve_interpreter *interp);
+static bool ext_imapflags_interpreter_load
+	(const struct sieve_runtime_env *renv, sieve_size_t *address);
 
 int ext_imapflags_my_id;
 
@@ -55,7 +56,7 @@ const struct sieve_extension imapflags_extension = {
 	ext_imapflags_validator_load, 
 	NULL, 
 	ext_imapflags_interpreter_load, 
-	NULL, NULL,
+	NULL, NULL, NULL,
 	SIEVE_EXT_DEFINE_OPERATIONS(imapflags_operations), 
 	SIEVE_EXT_DEFINE_OPERAND(flags_side_effect_operand)
 };
@@ -84,10 +85,10 @@ static bool ext_imapflags_validator_load
 }
 
 static bool ext_imapflags_interpreter_load
-(struct sieve_interpreter *interp)
+(const struct sieve_runtime_env *renv, sieve_size_t *address ATTR_UNUSED)
 {
 	sieve_interpreter_extension_register
-        (interp, &imapflags_interpreter_extension, NULL);
+        (renv->interp, &imapflags_interpreter_extension, NULL);
 
 	return TRUE;
 }
diff --git a/src/lib-sieve/plugins/include/ext-include.c b/src/lib-sieve/plugins/include/ext-include.c
index dabcf913cfd0a0b8166230c6dfbaf49843629820..d5cd70839d82050c778703e6315528fb71f0b0f8 100644
--- a/src/lib-sieve/plugins/include/ext-include.c
+++ b/src/lib-sieve/plugins/include/ext-include.c
@@ -51,7 +51,8 @@ static bool ext_include_load(int ext_id);
 static bool ext_include_validator_load(struct sieve_validator *validator);
 static bool ext_include_generator_load(const struct sieve_codegen_env *cgenv);
 static bool ext_include_binary_load(struct sieve_binary *sbin);
-static bool ext_include_interpreter_load(struct sieve_interpreter *interp);
+static bool ext_include_interpreter_load
+	(const struct sieve_runtime_env *renv, sieve_size_t *address);
 
 /* Extension objects */
 
@@ -66,6 +67,7 @@ const struct sieve_extension include_extension = {
 	ext_include_interpreter_load,
 	ext_include_binary_load, 
 	ext_include_binary_dump,
+	NULL,
 	SIEVE_EXT_DEFINE_OPERATIONS(ext_include_operations),
 	SIEVE_EXT_DEFINE_NO_OPERANDS
 };
@@ -98,9 +100,9 @@ static bool ext_include_generator_load(const struct sieve_codegen_env *cgenv)
 }
 
 static bool ext_include_interpreter_load
-(struct sieve_interpreter *interp)
+(const struct sieve_runtime_env *renv, sieve_size_t *address)
 {
-	ext_include_interpreter_context_init(interp);
+	ext_include_interpreter_context_init(renv->interp);
 	
 	return TRUE;
 }
diff --git a/src/lib-sieve/plugins/regex/ext-regex.c b/src/lib-sieve/plugins/regex/ext-regex.c
index 6e246d776bfa452b3b497a06c434fd2be8ce521b..c35f414cb1109767ea94f616a3940dfc8d633a1d 100644
--- a/src/lib-sieve/plugins/regex/ext-regex.c
+++ b/src/lib-sieve/plugins/regex/ext-regex.c
@@ -53,7 +53,7 @@ const struct sieve_extension regex_extension = {
 	&ext_my_id,
 	ext_regex_load,
 	ext_regex_validator_load,
-	NULL, NULL, NULL, NULL,
+	NULL, NULL, NULL, NULL, NULL,
 	SIEVE_EXT_DEFINE_NO_OPERATIONS, 
 	SIEVE_EXT_DEFINE_OPERAND(regex_match_type_operand)
 };
diff --git a/src/lib-sieve/plugins/relational/ext-relational.c b/src/lib-sieve/plugins/relational/ext-relational.c
index 8570982de3b99e8f16b30b317273baf4bac06d4f..8f6533179ca5ad7fd65aba13396bc06508707bde 100644
--- a/src/lib-sieve/plugins/relational/ext-relational.c
+++ b/src/lib-sieve/plugins/relational/ext-relational.c
@@ -42,7 +42,7 @@ const struct sieve_extension relational_extension = {
 	&ext_relational_my_id,
 	ext_relational_load,
 	ext_relational_validator_load,
-	NULL, NULL, NULL, NULL,
+	NULL, NULL, NULL, NULL, NULL,
 	SIEVE_EXT_DEFINE_NO_OPERATIONS, 
 	SIEVE_EXT_DEFINE_OPERAND(rel_match_type_operand)
 };
diff --git a/src/lib-sieve/plugins/subaddress/ext-subaddress.c b/src/lib-sieve/plugins/subaddress/ext-subaddress.c
index 4020b3c93d8fc0e6e8802b865b555a62cb41879b..b96b89596eb46f57fe6f545620f46cfef682fe83 100644
--- a/src/lib-sieve/plugins/subaddress/ext-subaddress.c
+++ b/src/lib-sieve/plugins/subaddress/ext-subaddress.c
@@ -56,7 +56,7 @@ const struct sieve_extension subaddress_extension = {
 	&ext_my_id,
 	ext_subaddress_load,
 	ext_subaddress_validator_load,
-	NULL, NULL, NULL, NULL,
+	NULL, NULL, NULL, NULL, NULL,
 	SIEVE_EXT_DEFINE_NO_OPERATIONS, 
 	SIEVE_EXT_DEFINE_OPERAND(subaddress_operand)
 };
diff --git a/src/lib-sieve/plugins/vacation/ext-vacation.c b/src/lib-sieve/plugins/vacation/ext-vacation.c
index da214e3962ca53609e3808d2ec70b9bcf4a38e71..b2747119ab59a0f45c19ce58d2c67b961334b19d 100644
--- a/src/lib-sieve/plugins/vacation/ext-vacation.c
+++ b/src/lib-sieve/plugins/vacation/ext-vacation.c
@@ -39,7 +39,7 @@ const struct sieve_extension vacation_extension = {
 	&ext_my_id,
 	ext_vacation_load,
 	ext_vacation_validator_load, 
-	NULL, NULL, NULL, NULL,
+	NULL, NULL, NULL, NULL, NULL,
 	SIEVE_EXT_DEFINE_OPERATION(vacation_operation),
 	SIEVE_EXT_DEFINE_NO_OPERANDS
 };
diff --git a/src/lib-sieve/plugins/variables/ext-variables-arguments.c b/src/lib-sieve/plugins/variables/ext-variables-arguments.c
index 194382ec832dc8c5856185b245dcfce79eda9e7e..9cdebcf3070994b820eb4e73ec66c26183873ffc 100644
--- a/src/lib-sieve/plugins/variables/ext-variables-arguments.c
+++ b/src/lib-sieve/plugins/variables/ext-variables-arguments.c
@@ -24,7 +24,7 @@
  * Common error messages
  */
 
-static inline void _ext_variables_scope_size_eror
+static inline void _ext_variables_scope_size_error
 (struct sieve_validator *valdtr, struct sieve_command_context *cmd,
 	const char *variable)
 {
@@ -113,7 +113,7 @@ static bool _sieve_variable_argument_activate
 					(validator, str_c(cur_element->identifier), TRUE);
 
 				if ( var == NULL ) {
-					_ext_variables_scope_size_eror
+					_ext_variables_scope_size_error
 						(validator, cmd, str_c(cur_element->identifier));
 				} else {
 					arg->argument = &variable_argument;
@@ -373,7 +373,7 @@ static bool arg_variable_string_validate
 							if ( strarg != NULL )
 								sieve_ast_arg_list_add(arglist, strarg);
 							else {
-								_ext_variables_scope_size_eror
+								_ext_variables_scope_size_error
 									(validator, cmd, str_c(cur_element->identifier));
 								result = FALSE;
 								break;
diff --git a/src/lib-sieve/plugins/variables/ext-variables-common.c b/src/lib-sieve/plugins/variables/ext-variables-common.c
index 7d8d5c29850694a5ecf5468101dcd01fb240293f..3477fc6f134258098484b711b5e5cbcdc4ba84d7 100644
--- a/src/lib-sieve/plugins/variables/ext-variables-common.c
+++ b/src/lib-sieve/plugins/variables/ext-variables-common.c
@@ -382,6 +382,33 @@ bool sieve_ext_variables_is_active(struct sieve_validator *valdtr)
 	return ( ext_variables_validator_context_get(valdtr) != NULL );
 }
 
+/*
+ * Code generation
+ */
+ 
+bool ext_variables_generator_load(const struct sieve_codegen_env *cgenv)
+{
+	(void) sieve_binary_emit_integer(cgenv->sbin, 0);
+	
+	return TRUE;
+}
+
+/*
+ * Code dump
+ */
+ 
+bool ext_variables_code_dump
+(const struct sieve_dumptime_env *denv, sieve_size_t *address)
+{
+	unsigned int scope_size;
+
+	if ( sieve_binary_read_integer(denv->sbin, address, &scope_size) ) {
+		sieve_code_dumpf(denv, "SCOPE (size: %d)", scope_size);
+	}
+	
+	return TRUE;
+}
+
 /* 
  * Interpreter context 
  */
@@ -407,15 +434,23 @@ ext_variables_interpreter_context_create(struct sieve_interpreter *interp)
 	return ctx;
 }
 
-void ext_variables_interpreter_initialize(struct sieve_interpreter *interp)
+bool ext_variables_interpreter_load
+	(const struct sieve_runtime_env *renv, sieve_size_t *address)
 {
 	struct ext_variables_interpreter_context *ctx;
+	unsigned int var_count;
 	
 	/* Create our context */
-	ctx = ext_variables_interpreter_context_create(interp);
+	ctx = ext_variables_interpreter_context_create(renv->interp);
+	
+	if ( sieve_binary_read_integer(renv->sbin, address, &var_count) ) {
+		
+	}
 	
 	/* Enable support for match values */
-	(void) sieve_match_values_set_enabled(interp, TRUE);
+	(void) sieve_match_values_set_enabled(renv->interp, TRUE);
+	
+	return TRUE;
 }
 
 static inline struct ext_variables_interpreter_context *
diff --git a/src/lib-sieve/plugins/variables/ext-variables-common.h b/src/lib-sieve/plugins/variables/ext-variables-common.h
index 6108abf5ec889fcc4655890686f067366ae7ade6..cd22b37372741cf955f14d595fe0b660df89e68f 100644
--- a/src/lib-sieve/plugins/variables/ext-variables-common.h
+++ b/src/lib-sieve/plugins/variables/ext-variables-common.h
@@ -68,11 +68,26 @@ ext_variables_validator_context_get(struct sieve_validator *valdtr)
 struct sieve_variable *ext_variables_validator_get_variable
 	(struct sieve_validator *validator, const char *variable, bool declare);
 
+/*
+ * Code generation
+ */
+ 
+bool ext_variables_generator_load
+	(const struct sieve_codegen_env *cgenv);
+
+/*
+ * Code dump
+ */
+ 
+bool ext_variables_code_dump
+	(const struct sieve_dumptime_env *denv, sieve_size_t *address);
+
 /*
  * Interpreter context
  */	
 
-void ext_variables_interpreter_initialize(struct sieve_interpreter *interp);
+bool ext_variables_interpreter_load
+(const struct sieve_runtime_env *renv, sieve_size_t *address);
 
 /* 
  * Variable coding 
diff --git a/src/lib-sieve/plugins/variables/ext-variables.c b/src/lib-sieve/plugins/variables/ext-variables.c
index 8a94a0364f951a2e0241bd02b8087c2632d89ea0..57e1fc8c1ca2bb4110f21abd45a740341979e3e7 100644
--- a/src/lib-sieve/plugins/variables/ext-variables.c
+++ b/src/lib-sieve/plugins/variables/ext-variables.c
@@ -59,7 +59,6 @@ const struct sieve_operand *ext_variables_operands[] = {
 
 static bool ext_variables_load(int ext_id);
 static bool ext_variables_validator_load(struct sieve_validator *validator);
-static bool ext_variables_interpreter_load(struct sieve_interpreter *interp);
 
 static int ext_my_id;
 	
@@ -68,9 +67,10 @@ struct sieve_extension variables_extension = {
 	&ext_my_id,
 	ext_variables_load,
 	ext_variables_validator_load, 
-	NULL,
+	ext_variables_generator_load,
 	ext_variables_interpreter_load,
-	NULL, NULL,
+	NULL, NULL, 
+	ext_variables_code_dump,
 	SIEVE_EXT_DEFINE_OPERATIONS(ext_variables_operations), 
 	SIEVE_EXT_DEFINE_OPERANDS(ext_variables_operands)
 };
@@ -95,10 +95,3 @@ static bool ext_variables_validator_load
 	return TRUE;
 }
 
-static bool ext_variables_interpreter_load
-	(struct sieve_interpreter *interp)
-{
-	ext_variables_interpreter_initialize(interp);
-
-	return TRUE;
-}
diff --git a/src/lib-sieve/sieve-address-parts.c b/src/lib-sieve/sieve-address-parts.c
index a3550140c981e02b760d669ba1bacfd68a1cb823..b30e60cd0c397f041ba8db4f4e1b1fb12ea14ce9 100644
--- a/src/lib-sieve/sieve-address-parts.c
+++ b/src/lib-sieve/sieve-address-parts.c
@@ -50,7 +50,7 @@ const struct sieve_extension address_part_extension = {
 	&ext_my_id,
 	addrp_extension_load,
 	addrp_validator_load,
-	NULL, NULL, NULL, NULL,
+	NULL, NULL, NULL, NULL, NULL,
 	SIEVE_EXT_DEFINE_NO_OPERATIONS,
 	SIEVE_EXT_DEFINE_NO_OPERANDS /* Defined as core operand */
 };
diff --git a/src/lib-sieve/sieve-code-dumper.c b/src/lib-sieve/sieve-code-dumper.c
index 358227f4fd6b2bccf411b7549c51f44bf7af2789..5b16d017545dc5b39fa24f392e7b7066905f9bf1 100644
--- a/src/lib-sieve/sieve-code-dumper.c
+++ b/src/lib-sieve/sieve-code-dumper.c
@@ -1,3 +1,6 @@
+/* Copyright (c) 2002-2008 Dovecot Sieve authors, see the included COPYING file
+ */
+
 #include <stdio.h>
 #include <string.h>
 
@@ -187,15 +190,21 @@ void sieve_code_dumper_run(struct sieve_code_dumper *dumper)
 			
 			sieve_code_mark(denv);
 			
-			if ( !sieve_binary_read_extension(sbin, &dumper->pc, &code, &ext) ) 
-			{
-        success = FALSE;
-        break;
-      }
+			if ( !sieve_binary_read_extension(sbin, &dumper->pc, &code, &ext) ) {
+				success = FALSE;
+				break;
+			}
       	
-      sieve_code_dumpf(denv, "%s", ext->name);
+			sieve_code_dumpf(denv, "%s", ext->name);
       
-			/* Load ? */ 
+			if ( ext->code_dump != NULL ) {
+				sieve_code_descend(denv);
+				if ( !ext->code_dump(denv, &dumper->pc) ) {
+					success = FALSE;
+					break;
+				}
+				sieve_code_ascend(denv);
+			}
 		}
 		
 		sieve_code_ascend(denv);
diff --git a/src/lib-sieve/sieve-comparators.c b/src/lib-sieve/sieve-comparators.c
index e34b4a1d57c8fdd09db3214cd4b14a8c13ba72ef..4cb06c844cadb9d45687fead7fb2b65e62ab19c5 100644
--- a/src/lib-sieve/sieve-comparators.c
+++ b/src/lib-sieve/sieve-comparators.c
@@ -52,7 +52,7 @@ const struct sieve_extension comparator_extension = {
 	&ext_my_id,
 	cmp_extension_load,
 	cmp_validator_load,
-	NULL, NULL, NULL, NULL,
+	NULL, NULL, NULL, NULL, NULL,
 	SIEVE_EXT_DEFINE_NO_OPERATIONS,
 	SIEVE_EXT_DEFINE_NO_OPERANDS    /* Defined as core operand */
 };
diff --git a/src/lib-sieve/sieve-extensions.c b/src/lib-sieve/sieve-extensions.c
index 2738d8399dc0be39f1780ce9361861f151827f9e..e73be96ec435ab42661f42ad3bd3bbd0401873d4 100644
--- a/src/lib-sieve/sieve-extensions.c
+++ b/src/lib-sieve/sieve-extensions.c
@@ -38,14 +38,14 @@ const unsigned int sieve_preloaded_extensions_count =
 
 static const struct sieve_extension comparator_i_octet_extension = {
 	"comparator-i;octet", 
-	NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+	NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
 	SIEVE_EXT_DEFINE_NO_OPERATIONS, 
 	SIEVE_EXT_DEFINE_NO_OPERANDS
 };
 
 static const struct sieve_extension comparator_i_ascii_casemap_extension = {
 	"comparator-i;ascii-casemap", 
-	NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+	NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 
 	SIEVE_EXT_DEFINE_NO_OPERATIONS, 
 	SIEVE_EXT_DEFINE_NO_OPERANDS
 };
diff --git a/src/lib-sieve/sieve-extensions.h b/src/lib-sieve/sieve-extensions.h
index e1a862332c5819697886b6f2047a160c498f1865..8f1738b38f36c5b0cc3a4afc75db9f54a0285961 100644
--- a/src/lib-sieve/sieve-extensions.h
+++ b/src/lib-sieve/sieve-extensions.h
@@ -26,12 +26,19 @@ struct sieve_extension {
 	
 	bool (*load)(int ext_id);
 
-	bool (*validator_load)(struct sieve_validator *validator);	
-	bool (*generator_load)(const struct sieve_codegen_env *cgenv);
-	bool (*interpreter_load)(struct sieve_interpreter *interpreter);
+	bool (*validator_load)
+		(struct sieve_validator *validator);	
+	bool (*generator_load)
+		(const struct sieve_codegen_env *cgenv);
+	bool (*interpreter_load)
+		(const struct sieve_runtime_env *renv, sieve_size_t *address);
+	bool (*binary_load)
+		(struct sieve_binary *binary);
 	
-	bool (*binary_load)(struct sieve_binary *binary);
-	bool (*binary_dump)(struct sieve_dumptime_env *denv);
+	bool (*binary_dump)
+		(struct sieve_dumptime_env *denv);
+	bool (*code_dump)
+		(const struct sieve_dumptime_env *denv, sieve_size_t *address);
 
 	struct sieve_extension_obj_registry operations;
 	struct sieve_extension_obj_registry operands;
diff --git a/src/lib-sieve/sieve-interpreter.c b/src/lib-sieve/sieve-interpreter.c
index 21988f6ef6066e369b147ec317be6465b2131079..40f9582754be4acd58db95ac5fdd961a283949bf 100644
--- a/src/lib-sieve/sieve-interpreter.c
+++ b/src/lib-sieve/sieve-interpreter.c
@@ -96,7 +96,7 @@ struct sieve_interpreter *sieve_interpreter_create
 		const struct sieve_extension *ext = sieve_preloaded_extensions[i];
 		
 		if ( ext->interpreter_load != NULL )
-			(void)ext->interpreter_load(interp);		
+			(void)ext->interpreter_load(&interp->runenv, &interp->pc);		
 	}
 
 	/* Load other extensions listed in code */
@@ -110,7 +110,8 @@ struct sieve_interpreter *sieve_interpreter_create
         break;
       }
  
-			if ( ext->interpreter_load != NULL && !ext->interpreter_load(interp) ) {
+			if ( ext->interpreter_load != NULL && 
+				!ext->interpreter_load(&interp->runenv, &interp->pc) ) {
 				success = FALSE;
 				break;
 			}
diff --git a/src/lib-sieve/sieve-match-types.c b/src/lib-sieve/sieve-match-types.c
index f010855b16c4f2033e91ce72d870f316ff47d267..18d9b2dd1c69987170942e53c387e38d93f64e98 100644
--- a/src/lib-sieve/sieve-match-types.c
+++ b/src/lib-sieve/sieve-match-types.c
@@ -60,7 +60,7 @@ const struct sieve_extension match_type_extension = {
 	&ext_my_id,
 	mtch_extension_load,
 	mtch_validator_load,
-	NULL, NULL, NULL, NULL,
+	NULL, NULL, NULL, NULL, NULL,
 	SIEVE_EXT_DEFINE_NO_OPERATIONS,
 	SIEVE_EXT_DEFINE_NO_OPERANDS
 };
diff --git a/src/testsuite/ext-testsuite.c b/src/testsuite/ext-testsuite.c
index 222b018a8313a377e99a6e3acc9706f51447849c..e648fa29ec91eb193b5832b9a0e3b4b93a8e9260 100644
--- a/src/testsuite/ext-testsuite.c
+++ b/src/testsuite/ext-testsuite.c
@@ -90,7 +90,7 @@ const struct sieve_extension testsuite_extension = {
 	ext_testsuite_generator_load,
 	NULL,
 	ext_testsuite_binary_load, 
-	NULL, 
+	NULL, NULL,
 	SIEVE_EXT_DEFINE_OPERATIONS(testsuite_operations),
 	SIEVE_EXT_DEFINE_OPERAND(testsuite_object_operand)
 };