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

Side by Side Diff: src/interpreter/bytecode-array-builder.h

Issue 1531693002: [Interpreter] Implement ForIn in bytecode graph builder. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@oth-0009-phi
Patch Set: Fix missing comment. Created 5 years 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
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_ARRAY_BUILDER_H_ 5 #ifndef V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_
6 #define V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ 6 #define V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "src/ast/ast.h" 10 #include "src/ast/ast.h"
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 BytecodeArrayBuilder& Jump(BytecodeLabel* label); 196 BytecodeArrayBuilder& Jump(BytecodeLabel* label);
197 BytecodeArrayBuilder& JumpIfTrue(BytecodeLabel* label); 197 BytecodeArrayBuilder& JumpIfTrue(BytecodeLabel* label);
198 BytecodeArrayBuilder& JumpIfFalse(BytecodeLabel* label); 198 BytecodeArrayBuilder& JumpIfFalse(BytecodeLabel* label);
199 BytecodeArrayBuilder& JumpIfNull(BytecodeLabel* label); 199 BytecodeArrayBuilder& JumpIfNull(BytecodeLabel* label);
200 BytecodeArrayBuilder& JumpIfUndefined(BytecodeLabel* label); 200 BytecodeArrayBuilder& JumpIfUndefined(BytecodeLabel* label);
201 201
202 BytecodeArrayBuilder& Throw(); 202 BytecodeArrayBuilder& Throw();
203 BytecodeArrayBuilder& Return(); 203 BytecodeArrayBuilder& Return();
204 204
205 // Complex flow control. 205 // Complex flow control.
206 BytecodeArrayBuilder& ForInPrepare(Register receiver); 206 BytecodeArrayBuilder& ForInPrepare(Register receiver, Register cache_type,
207 BytecodeArrayBuilder& ForInNext(Register for_in_state, Register index); 207 Register cache_array,
208 BytecodeArrayBuilder& ForInDone(Register for_in_state); 208 Register cache_length);
209 BytecodeArrayBuilder& ForInNext(Register receiver, Register cache_type,
210 Register cache_array, Register index);
211 BytecodeArrayBuilder& ForInDone(Register index, Register cache_length);
212 BytecodeArrayBuilder& ForInStep(Register index);
209 213
210 // Accessors 214 // Accessors
211 Zone* zone() const { return zone_; } 215 Zone* zone() const { return zone_; }
212 216
213 private: 217 private:
214 ZoneVector<uint8_t>* bytecodes() { return &bytecodes_; } 218 ZoneVector<uint8_t>* bytecodes() { return &bytecodes_; }
215 const ZoneVector<uint8_t>* bytecodes() const { return &bytecodes_; } 219 const ZoneVector<uint8_t>* bytecodes() const { return &bytecodes_; }
216 Isolate* isolate() const { return isolate_; } 220 Isolate* isolate() const { return isolate_; }
217 221
218 static Bytecode BytecodeForBinaryOperation(Token::Value op); 222 static Bytecode BytecodeForBinaryOperation(Token::Value op);
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 368
365 DISALLOW_COPY_AND_ASSIGN(TemporaryRegisterScope); 369 DISALLOW_COPY_AND_ASSIGN(TemporaryRegisterScope);
366 }; 370 };
367 371
368 372
369 } // namespace interpreter 373 } // namespace interpreter
370 } // namespace internal 374 } // namespace internal
371 } // namespace v8 375 } // namespace v8
372 376
373 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ 377 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698