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

Unified Diff: src/interpreter/bytecode-array-builder.h

Issue 1416623003: [Interpreter] Add support for for count operations. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: src/interpreter/bytecode-array-builder.h
diff --git a/src/interpreter/bytecode-array-builder.h b/src/interpreter/bytecode-array-builder.h
index 079327d99b2ff8a4b97bac01fc496bb34c711081..2ab4c8fc2abeb4d58a1a261bdc15e441e70395cc 100644
--- a/src/interpreter/bytecode-array-builder.h
+++ b/src/interpreter/bytecode-array-builder.h
@@ -131,6 +131,9 @@ class BytecodeArrayBuilder {
BytecodeArrayBuilder& BinaryOperation(Token::Value binop, Register reg,
Strength strength);
+ // Count Operators (value stored in accumulator).
+ BytecodeArrayBuilder& CountOperation(Token::Value op, Strength strength);
+
// Unary Operators.
BytecodeArrayBuilder& LogicalNot();
BytecodeArrayBuilder& TypeOf();
@@ -142,6 +145,7 @@ class BytecodeArrayBuilder {
// Casts
BytecodeArrayBuilder& CastAccumulatorToBoolean();
BytecodeArrayBuilder& CastAccumulatorToName();
+ BytecodeArrayBuilder& CastAccumulatorToNumber();
// Flow Control.
BytecodeArrayBuilder& Bind(BytecodeLabel* label);
@@ -169,6 +173,7 @@ class BytecodeArrayBuilder {
Isolate* isolate() const { return isolate_; }
static Bytecode BytecodeForBinaryOperation(Token::Value op);
+ static Bytecode BytecodeForCountOperation(Token::Value op);
static Bytecode BytecodeForCompareOperation(Token::Value op);
static Bytecode BytecodeForLoadIC(LanguageMode language_mode);
static Bytecode BytecodeForKeyedLoadIC(LanguageMode language_mode);

Powered by Google App Engine
This is Rietveld 408576698