OLD | NEW |
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.h" | 10 #include "src/ast.h" |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 int feedback_slot, | 79 int feedback_slot, |
80 LanguageMode language_mode); | 80 LanguageMode language_mode); |
81 BytecodeArrayBuilder& GenericStoreKeyedProperty(Register object, | 81 BytecodeArrayBuilder& GenericStoreKeyedProperty(Register object, |
82 Register key); | 82 Register key); |
83 | 83 |
84 // Create a new closure for the SharedFunctionInfo in the accumulator. | 84 // Create a new closure for the SharedFunctionInfo in the accumulator. |
85 BytecodeArrayBuilder& CreateClosure(PretenureFlag tenured); | 85 BytecodeArrayBuilder& CreateClosure(PretenureFlag tenured); |
86 | 86 |
87 // Literals creation. Constant elements should be in the accumulator. | 87 // Literals creation. Constant elements should be in the accumulator. |
88 BytecodeArrayBuilder& CreateArrayLiteral(int literal_index, int flags); | 88 BytecodeArrayBuilder& CreateArrayLiteral(int literal_index, int flags); |
| 89 BytecodeArrayBuilder& CreateObjectLiteral(int literal_index, int flags); |
89 | 90 |
90 // Push the context in accumulator as the new context, and store in register | 91 // Push the context in accumulator as the new context, and store in register |
91 // |context|. | 92 // |context|. |
92 BytecodeArrayBuilder& PushContext(Register context); | 93 BytecodeArrayBuilder& PushContext(Register context); |
93 | 94 |
94 // Pop the current context and replace with |context|. | 95 // Pop the current context and replace with |context|. |
95 BytecodeArrayBuilder& PopContext(Register context); | 96 BytecodeArrayBuilder& PopContext(Register context); |
96 | 97 |
97 // Call a JS function. The JSFunction or Callable to be called should be in | 98 // Call a JS function. The JSFunction or Callable to be called should be in |
98 // |callable|, the receiver should be in |receiver| and all subsequent | 99 // |callable|, the receiver should be in |receiver| and all subsequent |
(...skipping 15 matching lines...) Expand all Loading... |
114 // Unary Operators. | 115 // Unary Operators. |
115 BytecodeArrayBuilder& LogicalNot(); | 116 BytecodeArrayBuilder& LogicalNot(); |
116 BytecodeArrayBuilder& TypeOf(); | 117 BytecodeArrayBuilder& TypeOf(); |
117 | 118 |
118 // Tests. | 119 // Tests. |
119 BytecodeArrayBuilder& CompareOperation(Token::Value op, Register reg, | 120 BytecodeArrayBuilder& CompareOperation(Token::Value op, Register reg, |
120 Strength strength); | 121 Strength strength); |
121 | 122 |
122 // Casts | 123 // Casts |
123 BytecodeArrayBuilder& CastAccumulatorToBoolean(); | 124 BytecodeArrayBuilder& CastAccumulatorToBoolean(); |
| 125 BytecodeArrayBuilder& CastAccumulatorToName(); |
124 | 126 |
125 // Flow Control. | 127 // Flow Control. |
126 BytecodeArrayBuilder& Bind(BytecodeLabel* label); | 128 BytecodeArrayBuilder& Bind(BytecodeLabel* label); |
127 BytecodeArrayBuilder& Bind(const BytecodeLabel& target, BytecodeLabel* label); | 129 BytecodeArrayBuilder& Bind(const BytecodeLabel& target, BytecodeLabel* label); |
128 | 130 |
129 BytecodeArrayBuilder& Jump(BytecodeLabel* label); | 131 BytecodeArrayBuilder& Jump(BytecodeLabel* label); |
130 BytecodeArrayBuilder& JumpIfTrue(BytecodeLabel* label); | 132 BytecodeArrayBuilder& JumpIfTrue(BytecodeLabel* label); |
131 BytecodeArrayBuilder& JumpIfFalse(BytecodeLabel* label); | 133 BytecodeArrayBuilder& JumpIfFalse(BytecodeLabel* label); |
132 BytecodeArrayBuilder& Return(); | 134 BytecodeArrayBuilder& Return(); |
133 | 135 |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
259 | 261 |
260 DISALLOW_COPY_AND_ASSIGN(TemporaryRegisterScope); | 262 DISALLOW_COPY_AND_ASSIGN(TemporaryRegisterScope); |
261 }; | 263 }; |
262 | 264 |
263 | 265 |
264 } // namespace interpreter | 266 } // namespace interpreter |
265 } // namespace internal | 267 } // namespace internal |
266 } // namespace v8 | 268 } // namespace v8 |
267 | 269 |
268 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ | 270 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ |
OLD | NEW |