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

Unified Diff: src/interpreter/bytecodes.h

Issue 1378523005: [Interpreter] Add support for global declarations and load/store of global variables (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@int_toplevel
Patch Set: Created 5 years, 3 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/bytecodes.h
diff --git a/src/interpreter/bytecodes.h b/src/interpreter/bytecodes.h
index cb09f6c4b2d1b302d488eda922a5c2c863fe161c..5814ff9ce9210f01f734381d238ce1d9e6cb32ac 100644
--- a/src/interpreter/bytecodes.h
+++ b/src/interpreter/bytecodes.h
@@ -43,8 +43,12 @@ namespace interpreter {
V(LdaTrue, OperandType::kNone) \
V(LdaFalse, OperandType::kNone) \
\
- /* Load globals */ \
+ /* Globals */ \
V(LdaGlobal, OperandType::kIdx) \
+ V(StaGlobal, OperandType::kIdx) \
+ \
+ /* Context operations */ \
+ V(LdaContextSlot, OperandType::kReg, OperandType::kIdx) \
\
/* Register-accumulator transfers */ \
V(Ldar, OperandType::kReg) \
@@ -153,6 +157,10 @@ class Register {
int ToParameterIndex(int parameter_count) const;
static int MaxParameterIndex();
+ // Returns the register for the function's outer context.
+ static Register function_context();
+ bool is_function_context() const;
+
static Register FromOperand(uint8_t operand);
uint8_t ToOperand() const;

Powered by Google App Engine
This is Rietveld 408576698