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

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

Issue 1456453002: [Interpreter] Add support for Call bytecode to bytecode graph builder. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Compilation fix (signed/unsigned). Created 5 years, 1 month 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/compiler/interpreter-assembler.cc ('k') | src/interpreter/bytecode-array-builder.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_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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 BytecodeArrayBuilder& PushContext(Register context); 129 BytecodeArrayBuilder& PushContext(Register context);
130 130
131 // Pop the current context and replace with |context|. 131 // Pop the current context and replace with |context|.
132 BytecodeArrayBuilder& PopContext(Register context); 132 BytecodeArrayBuilder& PopContext(Register context);
133 133
134 // Call a JS function. The JSFunction or Callable to be called should be in 134 // Call a JS function. The JSFunction or Callable to be called should be in
135 // |callable|, the receiver should be in |receiver| and all subsequent 135 // |callable|, the receiver should be in |receiver| and all subsequent
136 // arguments should be in registers <receiver + 1> to 136 // arguments should be in registers <receiver + 1> to
137 // <receiver + 1 + arg_count>. 137 // <receiver + 1 + arg_count>.
138 BytecodeArrayBuilder& Call(Register callable, Register receiver, 138 BytecodeArrayBuilder& Call(Register callable, Register receiver,
139 size_t arg_count); 139 size_t arg_count, int feedback_slot);
140 140
141 // Call the new operator. The |constructor| register is followed by 141 // Call the new operator. The |constructor| register is followed by
142 // |arg_count| consecutive registers containing arguments to be 142 // |arg_count| consecutive registers containing arguments to be
143 // applied to the constructor. 143 // applied to the constructor.
144 BytecodeArrayBuilder& New(Register constructor, Register first_arg, 144 BytecodeArrayBuilder& New(Register constructor, Register first_arg,
145 size_t arg_count); 145 size_t arg_count);
146 146
147 // Call the runtime function with |function_id|. The first argument should be 147 // Call the runtime function with |function_id|. The first argument should be
148 // in |first_arg| and all subsequent arguments should be in registers 148 // in |first_arg| and all subsequent arguments should be in registers
149 // <first_arg + 1> to <first_arg + 1 + arg_count>. 149 // <first_arg + 1> to <first_arg + 1 + arg_count>.
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 static bool FitsInImm8Operand(int value); 226 static bool FitsInImm8Operand(int value);
227 static bool FitsInIdx16Operand(int value); 227 static bool FitsInIdx16Operand(int value);
228 static bool FitsInIdx16Operand(size_t value); 228 static bool FitsInIdx16Operand(size_t value);
229 229
230 static Bytecode GetJumpWithConstantOperand(Bytecode jump_with_smi8_operand); 230 static Bytecode GetJumpWithConstantOperand(Bytecode jump_with_smi8_operand);
231 static Bytecode GetJumpWithToBoolean(Bytecode jump); 231 static Bytecode GetJumpWithToBoolean(Bytecode jump);
232 232
233 template <size_t N> 233 template <size_t N>
234 INLINE(void Output(Bytecode bytecode, uint32_t(&oprands)[N])); 234 INLINE(void Output(Bytecode bytecode, uint32_t(&oprands)[N]));
235 void Output(Bytecode bytecode, uint32_t operand0, uint32_t operand1, 235 void Output(Bytecode bytecode, uint32_t operand0, uint32_t operand1,
236 uint32_t operand2, uint32_t operand3);
237 void Output(Bytecode bytecode, uint32_t operand0, uint32_t operand1,
236 uint32_t operand2); 238 uint32_t operand2);
237 void Output(Bytecode bytecode, uint32_t operand0, uint32_t operand1); 239 void Output(Bytecode bytecode, uint32_t operand0, uint32_t operand1);
238 void Output(Bytecode bytecode, uint32_t operand0); 240 void Output(Bytecode bytecode, uint32_t operand0);
239 void Output(Bytecode bytecode); 241 void Output(Bytecode bytecode);
240 242
241 BytecodeArrayBuilder& OutputJump(Bytecode jump_bytecode, 243 BytecodeArrayBuilder& OutputJump(Bytecode jump_bytecode,
242 BytecodeLabel* label); 244 BytecodeLabel* label);
243 void PatchJump(const ZoneVector<uint8_t>::iterator& jump_target, 245 void PatchJump(const ZoneVector<uint8_t>::iterator& jump_target,
244 ZoneVector<uint8_t>::iterator jump_location); 246 ZoneVector<uint8_t>::iterator jump_location);
245 247
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 353
352 DISALLOW_COPY_AND_ASSIGN(TemporaryRegisterScope); 354 DISALLOW_COPY_AND_ASSIGN(TemporaryRegisterScope);
353 }; 355 };
354 356
355 357
356 } // namespace interpreter 358 } // namespace interpreter
357 } // namespace internal 359 } // namespace internal
358 } // namespace v8 360 } // namespace v8
359 361
360 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ 362 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_
OLDNEW
« no previous file with comments | « src/compiler/interpreter-assembler.cc ('k') | src/interpreter/bytecode-array-builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698