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

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

Issue 1693833002: Remove strong mode support from binary operations. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed comments. Created 4 years, 10 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 "src/ast/ast.h" 8 #include "src/ast/ast.h"
9 #include "src/interpreter/bytecode-register-allocator.h" 9 #include "src/interpreter/bytecode-register-allocator.h"
10 #include "src/interpreter/bytecodes.h" 10 #include "src/interpreter/bytecodes.h"
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 Register first_arg, size_t arg_count, 188 Register first_arg, size_t arg_count,
189 Register first_return); 189 Register first_return);
190 190
191 // Call the JS runtime function with |context_index|. The the receiver should 191 // Call the JS runtime function with |context_index|. The the receiver should
192 // be in |receiver_args| and all subsequent arguments should be in registers 192 // be in |receiver_args| and all subsequent arguments should be in registers
193 // <receiver + 1> to <receiver + receiver_args_count - 1>. 193 // <receiver + 1> to <receiver + receiver_args_count - 1>.
194 BytecodeArrayBuilder& CallJSRuntime(int context_index, Register receiver_args, 194 BytecodeArrayBuilder& CallJSRuntime(int context_index, Register receiver_args,
195 size_t receiver_args_count); 195 size_t receiver_args_count);
196 196
197 // Operators (register holds the lhs value, accumulator holds the rhs value). 197 // Operators (register holds the lhs value, accumulator holds the rhs value).
198 BytecodeArrayBuilder& BinaryOperation(Token::Value binop, Register reg, 198 BytecodeArrayBuilder& BinaryOperation(Token::Value binop, Register reg);
199 Strength strength);
200 199
201 // Count Operators (value stored in accumulator). 200 // Count Operators (value stored in accumulator).
202 BytecodeArrayBuilder& CountOperation(Token::Value op, Strength strength); 201 BytecodeArrayBuilder& CountOperation(Token::Value op);
203 202
204 // Unary Operators. 203 // Unary Operators.
205 BytecodeArrayBuilder& LogicalNot(); 204 BytecodeArrayBuilder& LogicalNot();
206 BytecodeArrayBuilder& TypeOf(); 205 BytecodeArrayBuilder& TypeOf();
207 206
208 // Deletes property from an object. This expects that accumulator contains 207 // Deletes property from an object. This expects that accumulator contains
209 // the key to be deleted and the register contains a reference to the object. 208 // the key to be deleted and the register contains a reference to the object.
210 BytecodeArrayBuilder& Delete(Register object, LanguageMode language_mode); 209 BytecodeArrayBuilder& Delete(Register object, LanguageMode language_mode);
211 210
212 // Tests. 211 // Tests.
213 BytecodeArrayBuilder& CompareOperation(Token::Value op, Register reg, 212 BytecodeArrayBuilder& CompareOperation(Token::Value op, Register reg);
214 Strength strength);
215 213
216 // Casts. 214 // Casts.
217 BytecodeArrayBuilder& CastAccumulatorToBoolean(); 215 BytecodeArrayBuilder& CastAccumulatorToBoolean();
218 BytecodeArrayBuilder& CastAccumulatorToJSObject(); 216 BytecodeArrayBuilder& CastAccumulatorToJSObject();
219 BytecodeArrayBuilder& CastAccumulatorToName(); 217 BytecodeArrayBuilder& CastAccumulatorToName();
220 BytecodeArrayBuilder& CastAccumulatorToNumber(); 218 BytecodeArrayBuilder& CastAccumulatorToNumber();
221 219
222 // Flow Control. 220 // Flow Control.
223 BytecodeArrayBuilder& Bind(BytecodeLabel* label); 221 BytecodeArrayBuilder& Bind(BytecodeLabel* label);
224 BytecodeArrayBuilder& Bind(const BytecodeLabel& target, BytecodeLabel* label); 222 BytecodeArrayBuilder& Bind(const BytecodeLabel& target, BytecodeLabel* label);
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
414 size_t offset_; 412 size_t offset_;
415 413
416 friend class BytecodeArrayBuilder; 414 friend class BytecodeArrayBuilder;
417 }; 415 };
418 416
419 } // namespace interpreter 417 } // namespace interpreter
420 } // namespace internal 418 } // namespace internal
421 } // namespace v8 419 } // namespace v8
422 420
423 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ 421 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698