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

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

Issue 1402943002: [Interpreter] Support for operator new. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix rebasing error. Created 5 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
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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 // <receiver + 1 + arg_count>. 81 // <receiver + 1 + arg_count>.
82 BytecodeArrayBuilder& Call(Register callable, Register receiver, 82 BytecodeArrayBuilder& Call(Register callable, Register receiver,
83 size_t arg_count); 83 size_t arg_count);
84 84
85 // Call the runtime function with |function_id|. The first argument should be 85 // Call the runtime function with |function_id|. The first argument should be
86 // in |first_arg| and all subsequent arguments should be in registers 86 // in |first_arg| and all subsequent arguments should be in registers
87 // <first_arg + 1> to <first_arg + 1 + arg_count>. 87 // <first_arg + 1> to <first_arg + 1 + arg_count>.
88 BytecodeArrayBuilder& CallRuntime(Runtime::FunctionId function_id, 88 BytecodeArrayBuilder& CallRuntime(Runtime::FunctionId function_id,
89 Register first_arg, size_t arg_count); 89 Register first_arg, size_t arg_count);
90 90
91 // Operators (register == lhs, accumulator = rhs). 91 // Call the new operator. The |constructor| register is followed by
92 // |arg_count| consecutive registers containing arguments to be
93 // applied to the constructor.
94 BytecodeArrayBuilder& New(Register constructor, Register first_arg,
95 size_t arg_count);
rmcilroy 2015/10/13 14:07:30 nit - move above CallRuntime
oth 2015/10/14 08:40:09 Done.
96
97 // Operators (register holds the lhs value, accumulator holds the rhs value).
92 BytecodeArrayBuilder& BinaryOperation(Token::Value binop, Register reg, 98 BytecodeArrayBuilder& BinaryOperation(Token::Value binop, Register reg,
93 Strength strength); 99 Strength strength);
94 100
95 // Unary Operators. 101 // Unary Operators.
96 BytecodeArrayBuilder& LogicalNot(); 102 BytecodeArrayBuilder& LogicalNot();
97 BytecodeArrayBuilder& TypeOf(); 103 BytecodeArrayBuilder& TypeOf();
98 104
99 // Tests. 105 // Tests.
100 BytecodeArrayBuilder& CompareOperation(Token::Value op, Register reg, 106 BytecodeArrayBuilder& CompareOperation(Token::Value op, Register reg,
101 Strength strength); 107 Strength strength);
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 245
240 DISALLOW_COPY_AND_ASSIGN(TemporaryRegisterScope); 246 DISALLOW_COPY_AND_ASSIGN(TemporaryRegisterScope);
241 }; 247 };
242 248
243 249
244 } // namespace interpreter 250 } // namespace interpreter
245 } // namespace internal 251 } // namespace internal
246 } // namespace v8 252 } // namespace v8
247 253
248 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ 254 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698