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

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: Fix test 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
« no previous file with comments | « src/interpreter/bytecode-generator.cc ('k') | src/interpreter/bytecodes.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/interpreter/bytecodes.h
diff --git a/src/interpreter/bytecodes.h b/src/interpreter/bytecodes.h
index a3dc8220e40293380e1b543a788857cf13ce06d9..a146241a49b46153cb45d5adfa1929fd830bc7ea 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::kIdx8) \
+ V(StaGlobal, OperandType::kIdx8) \
+ \
+ /* Context operations */ \
+ V(LdaContextSlot, OperandType::kReg8, OperandType::kIdx8) \
\
/* Register-accumulator transfers */ \
V(Ldar, OperandType::kReg8) \
@@ -163,6 +167,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;
« no previous file with comments | « src/interpreter/bytecode-generator.cc ('k') | src/interpreter/bytecodes.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698