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

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: 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 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
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);
207 BytecodeArrayBuilder& ForInNext(Register for_in_state, Register index); 207 BytecodeArrayBuilder& ForInNext(Register receiver, Register index,
208 BytecodeArrayBuilder& ForInDone(Register for_in_state); 208 Register cache_type, Register cache_array);
209 BytecodeArrayBuilder& ForInDone(Register index, Register cache_length);
210 BytecodeArrayBuilder& ForInStep(Register index);
209 211
210 // Accessors 212 // Accessors
211 Zone* zone() const { return zone_; } 213 Zone* zone() const { return zone_; }
212 214
213 private: 215 private:
214 ZoneVector<uint8_t>* bytecodes() { return &bytecodes_; } 216 ZoneVector<uint8_t>* bytecodes() { return &bytecodes_; }
215 const ZoneVector<uint8_t>* bytecodes() const { return &bytecodes_; } 217 const ZoneVector<uint8_t>* bytecodes() const { return &bytecodes_; }
216 Isolate* isolate() const { return isolate_; } 218 Isolate* isolate() const { return isolate_; }
217 219
218 static Bytecode BytecodeForBinaryOperation(Token::Value op); 220 static Bytecode BytecodeForBinaryOperation(Token::Value op);
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 366
365 DISALLOW_COPY_AND_ASSIGN(TemporaryRegisterScope); 367 DISALLOW_COPY_AND_ASSIGN(TemporaryRegisterScope);
366 }; 368 };
367 369
368 370
369 } // namespace interpreter 371 } // namespace interpreter
370 } // namespace internal 372 } // namespace internal
371 } // namespace v8 373 } // namespace v8
372 374
373 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ 375 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698