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

Unified Diff: src/full-codegen/full-codegen.h

Issue 1986353002: Revert of [Interpreter] Remove InterpreterExitTrampoline and replace with returning to the entry trampoline. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 7 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/full-codegen/arm64/full-codegen-arm64.cc ('k') | src/full-codegen/full-codegen.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/full-codegen/full-codegen.h
diff --git a/src/full-codegen/full-codegen.h b/src/full-codegen/full-codegen.h
index 7f238a716fdf42d1147a8ca7e26e394ad6af2b1e..dbb4a0b028c0a6cd883e3a0ca479da465536140c 100644
--- a/src/full-codegen/full-codegen.h
+++ b/src/full-codegen/full-codegen.h
@@ -14,7 +14,6 @@
#include "src/code-stubs.h"
#include "src/codegen.h"
#include "src/compiler.h"
-#include "src/deoptimizer.h"
#include "src/globals.h"
#include "src/objects.h"
@@ -29,6 +28,11 @@
class FullCodeGenerator: public AstVisitor {
public:
+ enum State {
+ NO_REGISTERS,
+ TOS_REG
+ };
+
FullCodeGenerator(MacroAssembler* masm, CompilationInfo* info)
: masm_(masm),
info_(info),
@@ -56,10 +60,19 @@
static bool MakeCode(CompilationInfo* info);
- // Encode bailout state and pc-offset as a BitField<type, start, size>.
+ // Encode state and pc-offset as a BitField<type, start, size>.
// Only use 30 bits because we encode the result as a smi.
- class BailoutStateField : public BitField<Deoptimizer::BailoutState, 0, 1> {};
- class PcField : public BitField<unsigned, 1, 30 - 1> {};
+ class StateField : public BitField<State, 0, 1> { };
+ class PcField : public BitField<unsigned, 1, 30-1> { };
+
+ static const char* State2String(State state) {
+ switch (state) {
+ case NO_REGISTERS: return "NO_REGISTERS";
+ case TOS_REG: return "TOS_REG";
+ }
+ UNREACHABLE();
+ return NULL;
+ }
static const int kMaxBackEdgeWeight = 127;
@@ -93,8 +106,6 @@
static Register result_register();
private:
- typedef Deoptimizer::BailoutState BailoutState;
-
class Breakable;
class Iteration;
class TryFinally;
@@ -355,21 +366,21 @@
if (FLAG_verify_operand_stack_depth) EmitOperandStackDepthCheck();
EffectContext context(this);
Visit(expr);
- PrepareForBailout(expr, BailoutState::NO_REGISTERS);
+ PrepareForBailout(expr, NO_REGISTERS);
}
void VisitForAccumulatorValue(Expression* expr) {
if (FLAG_verify_operand_stack_depth) EmitOperandStackDepthCheck();
AccumulatorValueContext context(this);
Visit(expr);
- PrepareForBailout(expr, BailoutState::TOS_REGISTER);
+ PrepareForBailout(expr, TOS_REG);
}
void VisitForStackValue(Expression* expr) {
if (FLAG_verify_operand_stack_depth) EmitOperandStackDepthCheck();
StackValueContext context(this);
Visit(expr);
- PrepareForBailout(expr, BailoutState::NO_REGISTERS);
+ PrepareForBailout(expr, NO_REGISTERS);
}
void VisitForControl(Expression* expr,
@@ -441,8 +452,8 @@
NilValue nil);
// Bailout support.
- void PrepareForBailout(Expression* node, Deoptimizer::BailoutState state);
- void PrepareForBailoutForId(BailoutId id, Deoptimizer::BailoutState state);
+ void PrepareForBailout(Expression* node, State state);
+ void PrepareForBailoutForId(BailoutId id, State state);
// Returns a smi for the index into the FixedArray that backs the feedback
// vector
« no previous file with comments | « src/full-codegen/arm64/full-codegen-arm64.cc ('k') | src/full-codegen/full-codegen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698