| Index: src/full-codegen.h
|
| diff --git a/src/full-codegen.h b/src/full-codegen.h
|
| index 12f355abc5297669404f07f1b81cb93d2e53f695..d9090a8dc830137448b9bb4e6ac38f1240316909 100644
|
| --- a/src/full-codegen.h
|
| +++ b/src/full-codegen.h
|
| @@ -52,8 +52,8 @@ class JumpPatchSite;
|
| // debugger to piggybag on.
|
| class BreakableStatementChecker: public AstVisitor {
|
| public:
|
| - explicit BreakableStatementChecker(Isolate* isolate) : is_breakable_(false) {
|
| - InitializeAstVisitor(isolate);
|
| + explicit BreakableStatementChecker(Zone* zone) : is_breakable_(false) {
|
| + InitializeAstVisitor(zone);
|
| }
|
|
|
| void Check(Statement* stmt);
|
| @@ -96,11 +96,7 @@ class FullCodeGenerator: public AstVisitor {
|
| ? info->function()->ast_node_count() : 0,
|
| info->zone()),
|
| back_edges_(2, info->zone()),
|
| - type_feedback_cells_(info->HasDeoptimizationSupport()
|
| - ? info->function()->ast_node_count() : 0,
|
| - info->zone()),
|
| - ic_total_count_(0),
|
| - zone_(info->zone()) {
|
| + ic_total_count_(0) {
|
| Initialize();
|
| }
|
|
|
| @@ -122,8 +118,6 @@ class FullCodeGenerator: public AstVisitor {
|
| return NULL;
|
| }
|
|
|
| - Zone* zone() const { return zone_; }
|
| -
|
| static const int kMaxBackEdgeWeight = 127;
|
|
|
| // Platform-specific code size multiplier.
|
| @@ -133,6 +127,9 @@ class FullCodeGenerator: public AstVisitor {
|
| static const int kCodeSizeMultiplier = 162;
|
| #elif V8_TARGET_ARCH_ARM
|
| static const int kCodeSizeMultiplier = 142;
|
| +#elif V8_TARGET_ARCH_A64
|
| +// TODO(all): Copied ARM value. Check this is sensible for A64.
|
| + static const int kCodeSizeMultiplier = 142;
|
| #elif V8_TARGET_ARCH_MIPS
|
| static const int kCodeSizeMultiplier = 142;
|
| #else
|
| @@ -437,9 +434,15 @@ class FullCodeGenerator: public AstVisitor {
|
| void PrepareForBailout(Expression* node, State state);
|
| void PrepareForBailoutForId(BailoutId id, State state);
|
|
|
| - // Cache cell support. This associates AST ids with global property cells
|
| - // that will be cleared during GC and collected by the type-feedback oracle.
|
| - void RecordTypeFeedbackCell(TypeFeedbackId id, Handle<Cell> cell);
|
| + // Feedback slot support. The feedback vector will be cleared during gc and
|
| + // collected by the type-feedback oracle.
|
| + Handle<FixedArray> FeedbackVector() {
|
| + return feedback_vector_;
|
| + }
|
| + void StoreFeedbackVectorSlot(int slot, Handle<Object> object) {
|
| + feedback_vector_->set(slot, *object);
|
| + }
|
| + void InitializeFeedbackVector();
|
|
|
| // Record a call's return site offset, used to rebuild the frame if the
|
| // called function was inlined at the site.
|
| @@ -483,7 +486,7 @@ class FullCodeGenerator: public AstVisitor {
|
|
|
| // Platform-specific code sequences for calls
|
| void EmitCallWithStub(Call* expr);
|
| - void EmitCallWithIC(Call* expr, Handle<Object> name, ContextualMode mode);
|
| + void EmitCallWithIC(Call* expr);
|
| void EmitKeyedCallWithIC(Call* expr, Expression* key);
|
|
|
| // Platform-specific code for inline runtime calls.
|
| @@ -555,6 +558,11 @@ class FullCodeGenerator: public AstVisitor {
|
| void EmitVariableAssignment(Variable* var,
|
| Token::Value op);
|
|
|
| + // Helper functions to EmitVariableAssignment
|
| + void EmitStoreToStackLocalOrContextSlot(Variable* var,
|
| + MemOperand location);
|
| + void EmitCallStoreContextSlot(Handle<String> name, LanguageMode mode);
|
| +
|
| // Complete a named property assignment. The receiver is expected on top
|
| // of the stack and the right-hand-side value in the accumulator.
|
| void EmitNamedPropertyAssignment(Assignment* expr);
|
| @@ -565,13 +573,11 @@ class FullCodeGenerator: public AstVisitor {
|
| void EmitKeyedPropertyAssignment(Assignment* expr);
|
|
|
| void CallIC(Handle<Code> code,
|
| - ContextualMode mode = NOT_CONTEXTUAL,
|
| TypeFeedbackId id = TypeFeedbackId::None());
|
|
|
| void CallLoadIC(ContextualMode mode,
|
| TypeFeedbackId id = TypeFeedbackId::None());
|
| - void CallStoreIC(ContextualMode mode,
|
| - TypeFeedbackId id = TypeFeedbackId::None());
|
| + void CallStoreIC(TypeFeedbackId id = TypeFeedbackId::None());
|
|
|
| void SetFunctionPosition(FunctionLiteral* fun);
|
| void SetReturnPosition(FunctionLiteral* fun);
|
| @@ -638,7 +644,6 @@ class FullCodeGenerator: public AstVisitor {
|
| void Generate();
|
| void PopulateDeoptimizationData(Handle<Code> code);
|
| void PopulateTypeFeedbackInfo(Handle<Code> code);
|
| - void PopulateTypeFeedbackCells(Handle<Code> code);
|
|
|
| Handle<FixedArray> handler_table() { return handler_table_; }
|
|
|
| @@ -653,12 +658,6 @@ class FullCodeGenerator: public AstVisitor {
|
| uint32_t loop_depth;
|
| };
|
|
|
| - struct TypeFeedbackCellEntry {
|
| - TypeFeedbackId ast_id;
|
| - Handle<Cell> cell;
|
| - };
|
| -
|
| -
|
| class ExpressionContext BASE_EMBEDDED {
|
| public:
|
| explicit ExpressionContext(FullCodeGenerator* codegen)
|
| @@ -848,12 +847,11 @@ class FullCodeGenerator: public AstVisitor {
|
| ZoneList<BailoutEntry> bailout_entries_;
|
| GrowableBitVector prepared_bailout_ids_;
|
| ZoneList<BackEdgeEntry> back_edges_;
|
| - ZoneList<TypeFeedbackCellEntry> type_feedback_cells_;
|
| int ic_total_count_;
|
| Handle<FixedArray> handler_table_;
|
| + Handle<FixedArray> feedback_vector_;
|
| Handle<Cell> profiling_counter_;
|
| bool generate_debug_code_;
|
| - Zone* zone_;
|
|
|
| friend class NestedStatement;
|
|
|
|
|