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

Side by Side Diff: src/interpreter/bytecode-generator.h

Issue 2411873004: [ignition] Eliminate hole checks where statically possible for loads and stores (Closed)
Patch Set: Rebased Created 4 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 unified diff | Download patch
« no previous file with comments | « src/full-codegen/x87/full-codegen-x87.cc ('k') | src/interpreter/bytecode-generator.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_INTERPRETER_BYTECODE_GENERATOR_H_ 5 #ifndef V8_INTERPRETER_BYTECODE_GENERATOR_H_
6 #define V8_INTERPRETER_BYTECODE_GENERATOR_H_ 6 #define V8_INTERPRETER_BYTECODE_GENERATOR_H_
7 7
8 #include "src/ast/ast.h" 8 #include "src/ast/ast.h"
9 #include "src/interpreter/bytecode-array-builder.h" 9 #include "src/interpreter/bytecode-array-builder.h"
10 #include "src/interpreter/bytecode-label.h" 10 #include "src/interpreter/bytecode-label.h"
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 // Visit a named super property load. The optional 87 // Visit a named super property load. The optional
88 // |opt_receiver_out| register will have the receiver stored to it 88 // |opt_receiver_out| register will have the receiver stored to it
89 // if it's a valid register. The loaded value is placed in the 89 // if it's a valid register. The loaded value is placed in the
90 // accumulator. 90 // accumulator.
91 void VisitNamedSuperPropertyLoad(Property* property, 91 void VisitNamedSuperPropertyLoad(Property* property,
92 Register opt_receiver_out); 92 Register opt_receiver_out);
93 93
94 void VisitPropertyLoad(Register obj, Property* expr); 94 void VisitPropertyLoad(Register obj, Property* expr);
95 void VisitPropertyLoadForAccumulator(Register obj, Property* expr); 95 void VisitPropertyLoadForAccumulator(Register obj, Property* expr);
96 96
97 void VisitVariableLoad(Variable* variable, FeedbackVectorSlot slot, 97 void BuildVariableLoad(Variable* variable, FeedbackVectorSlot slot,
98 bool needs_hole_check,
98 TypeofMode typeof_mode = NOT_INSIDE_TYPEOF); 99 TypeofMode typeof_mode = NOT_INSIDE_TYPEOF);
99 void VisitVariableLoadForAccumulatorValue( 100 void BuildVariableLoadForAccumulatorValue(
100 Variable* variable, FeedbackVectorSlot slot, 101 Variable* variable, FeedbackVectorSlot slot, bool needs_hole_check,
101 TypeofMode typeof_mode = NOT_INSIDE_TYPEOF); 102 TypeofMode typeof_mode = NOT_INSIDE_TYPEOF);
102 MUST_USE_RESULT Register 103 void BuildVariableAssignment(Variable* variable, Token::Value op,
103 VisitVariableLoadForRegisterValue(Variable* variable, FeedbackVectorSlot slot, 104 FeedbackVectorSlot slot, bool needs_hole_check);
104 TypeofMode typeof_mode = NOT_INSIDE_TYPEOF);
105 void VisitVariableAssignment(Variable* variable, Token::Value op,
106 FeedbackVectorSlot slot);
107 105
108 void BuildReturn(); 106 void BuildReturn();
109 void BuildReThrow(); 107 void BuildReThrow();
110 void BuildAbort(BailoutReason bailout_reason); 108 void BuildAbort(BailoutReason bailout_reason);
111 void BuildThrowIfHole(Handle<String> name); 109 void BuildThrowIfHole(Handle<String> name);
112 void BuildThrowIfNotHole(Handle<String> name); 110 void BuildThrowIfNotHole(Handle<String> name);
113 void BuildThrowReferenceError(Handle<String> name); 111 void BuildThrowReferenceError(Handle<String> name);
114 void BuildHoleCheckForVariableLoad(Variable* variable);
115 void BuildHoleCheckForVariableAssignment(Variable* variable, Token::Value op); 112 void BuildHoleCheckForVariableAssignment(Variable* variable, Token::Value op);
116 113
117 // Build jump to targets[value], where 114 // Build jump to targets[value], where
118 // start_index <= value < start_index + size. 115 // start_index <= value < start_index + size.
119 void BuildIndexedJump(Register value, size_t start_index, size_t size, 116 void BuildIndexedJump(Register value, size_t start_index, size_t size,
120 ZoneVector<BytecodeLabel>& targets); 117 ZoneVector<BytecodeLabel>& targets);
121 118
122 void BuildNewLocalActivationContext(); 119 void BuildNewLocalActivationContext();
123 void BuildLocalActivationContextInitialization(); 120 void BuildLocalActivationContextInitialization();
124 void BuildNewLocalBlockContext(Scope* scope); 121 void BuildNewLocalBlockContext(Scope* scope);
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 214
218 Handle<Name> home_object_symbol_; 215 Handle<Name> home_object_symbol_;
219 Handle<Name> prototype_string_; 216 Handle<Name> prototype_string_;
220 }; 217 };
221 218
222 } // namespace interpreter 219 } // namespace interpreter
223 } // namespace internal 220 } // namespace internal
224 } // namespace v8 221 } // namespace v8
225 222
226 #endif // V8_INTERPRETER_BYTECODE_GENERATOR_H_ 223 #endif // V8_INTERPRETER_BYTECODE_GENERATOR_H_
OLDNEW
« no previous file with comments | « src/full-codegen/x87/full-codegen-x87.cc ('k') | src/interpreter/bytecode-generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698