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

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

Issue 1969423002: [Interpreter] Remove InterpreterExitTrampoline and replace with returning to the entry trampoline. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Review comments 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 dbb4a0b028c0a6cd883e3a0ca479da465536140c..7f238a716fdf42d1147a8ca7e26e394ad6af2b1e 100644
--- a/src/full-codegen/full-codegen.h
+++ b/src/full-codegen/full-codegen.h
@@ -14,6 +14,7 @@
#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"
@@ -28,11 +29,6 @@ class JumpPatchSite;
class FullCodeGenerator: public AstVisitor {
public:
- enum State {
- NO_REGISTERS,
- TOS_REG
- };
-
FullCodeGenerator(MacroAssembler* masm, CompilationInfo* info)
: masm_(masm),
info_(info),
@@ -60,19 +56,10 @@ class FullCodeGenerator: public AstVisitor {
static bool MakeCode(CompilationInfo* info);
- // Encode state and pc-offset as a BitField<type, start, size>.
+ // Encode bailout state and pc-offset as a BitField<type, start, size>.
// Only use 30 bits because we encode the result as a smi.
- 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;
- }
+ class BailoutStateField : public BitField<Deoptimizer::BailoutState, 0, 1> {};
+ class PcField : public BitField<unsigned, 1, 30 - 1> {};
static const int kMaxBackEdgeWeight = 127;
@@ -106,6 +93,8 @@ class FullCodeGenerator: public AstVisitor {
static Register result_register();
private:
+ typedef Deoptimizer::BailoutState BailoutState;
+
class Breakable;
class Iteration;
class TryFinally;
@@ -366,21 +355,21 @@ class FullCodeGenerator: public AstVisitor {
if (FLAG_verify_operand_stack_depth) EmitOperandStackDepthCheck();
EffectContext context(this);
Visit(expr);
- PrepareForBailout(expr, NO_REGISTERS);
+ PrepareForBailout(expr, BailoutState::NO_REGISTERS);
}
void VisitForAccumulatorValue(Expression* expr) {
if (FLAG_verify_operand_stack_depth) EmitOperandStackDepthCheck();
AccumulatorValueContext context(this);
Visit(expr);
- PrepareForBailout(expr, TOS_REG);
+ PrepareForBailout(expr, BailoutState::TOS_REGISTER);
}
void VisitForStackValue(Expression* expr) {
if (FLAG_verify_operand_stack_depth) EmitOperandStackDepthCheck();
StackValueContext context(this);
Visit(expr);
- PrepareForBailout(expr, NO_REGISTERS);
+ PrepareForBailout(expr, BailoutState::NO_REGISTERS);
}
void VisitForControl(Expression* expr,
@@ -452,8 +441,8 @@ class FullCodeGenerator: public AstVisitor {
NilValue nil);
// Bailout support.
- void PrepareForBailout(Expression* node, State state);
- void PrepareForBailoutForId(BailoutId id, State state);
+ void PrepareForBailout(Expression* node, Deoptimizer::BailoutState state);
+ void PrepareForBailoutForId(BailoutId id, Deoptimizer::BailoutState 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