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

Unified Diff: src/interpreter/bytecode-array-builder.h

Issue 1379793004: [Interpreter] Add support for new local function context creation. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@int_decl
Patch Set: Fix ia32 Created 5 years, 2 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
Index: src/interpreter/bytecode-array-builder.h
diff --git a/src/interpreter/bytecode-array-builder.h b/src/interpreter/bytecode-array-builder.h
index fd49267154128a082e629382376e2182eba71925..7984aa7f5ef42254c6d2c679d9f286861848ee9a 100644
--- a/src/interpreter/bytecode-array-builder.h
+++ b/src/interpreter/bytecode-array-builder.h
@@ -36,7 +36,14 @@ class BytecodeArrayBuilder {
void set_locals_count(int number_of_locals);
int locals_count() const;
- Register Parameter(int parameter_index);
+ // Set number of contexts required for bytecode array.
+ void set_context_count(int number_of_contexts);
+ int context_count() const;
+
+ Register first_context_register() const;
+ Register last_context_register() const;
+
+ Register Parameter(int parameter_index) const;
// Constant loads to accumulator.
BytecodeArrayBuilder& LoadLiteral(v8::internal::Smi* value);
@@ -72,6 +79,13 @@ class BytecodeArrayBuilder {
int feedback_slot,
LanguageMode language_mode);
+ // Push the context in accumulator as the new context, and store in register
+ // |context|.
+ BytecodeArrayBuilder& PushContext(Register context);
+ // Pop the current context and replace with |context|
+ BytecodeArrayBuilder& PopContext(Register context);
+
+
// Call a JS function. The JSFunction or Callable to be called should be in
// |callable|, the receiver should be in |receiver| and all subsequent
// arguments should be in registers <receiver + 1> to
@@ -172,6 +186,7 @@ class BytecodeArrayBuilder {
int parameter_count_;
int local_register_count_;
+ int context_register_count_;
int temporary_register_count_;
int temporary_register_next_;

Powered by Google App Engine
This is Rietveld 408576698