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

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

Issue 1399773002: [Interpreter] Adds logical and, logical or and comma operators to interpreter (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Added a new bytecode to jump by casting the value to boolean. This reduces code size for logical op… 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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 // Casts 116 // Casts
117 BytecodeArrayBuilder& CastAccumulatorToBoolean(); 117 BytecodeArrayBuilder& CastAccumulatorToBoolean();
118 118
119 // Flow Control. 119 // Flow Control.
120 BytecodeArrayBuilder& Bind(BytecodeLabel* label); 120 BytecodeArrayBuilder& Bind(BytecodeLabel* label);
121 BytecodeArrayBuilder& Bind(const BytecodeLabel& target, BytecodeLabel* label); 121 BytecodeArrayBuilder& Bind(const BytecodeLabel& target, BytecodeLabel* label);
122 122
123 BytecodeArrayBuilder& Jump(BytecodeLabel* label); 123 BytecodeArrayBuilder& Jump(BytecodeLabel* label);
124 BytecodeArrayBuilder& JumpIfTrue(BytecodeLabel* label); 124 BytecodeArrayBuilder& JumpIfTrue(BytecodeLabel* label);
125 BytecodeArrayBuilder& JumpIfFalse(BytecodeLabel* label); 125 BytecodeArrayBuilder& JumpIfFalse(BytecodeLabel* label);
126 BytecodeArrayBuilder& JumpIfToBooleanTrue(BytecodeLabel* label);
127 BytecodeArrayBuilder& JumpIfToBooleanFalse(BytecodeLabel* label);
rmcilroy 2015/10/13 15:43:24 We probably want to merge these into JumpIfTrue/Fa
mythria 2015/10/14 13:33:42 Done.
126 BytecodeArrayBuilder& Return(); 128 BytecodeArrayBuilder& Return();
127 129
128 BytecodeArrayBuilder& EnterBlock(); 130 BytecodeArrayBuilder& EnterBlock();
129 BytecodeArrayBuilder& LeaveBlock(); 131 BytecodeArrayBuilder& LeaveBlock();
130 132
131 // Accessors 133 // Accessors
132 Zone* zone() const { return zone_; } 134 Zone* zone() const { return zone_; }
133 135
134 private: 136 private:
135 ZoneVector<uint8_t>* bytecodes() { return &bytecodes_; } 137 ZoneVector<uint8_t>* bytecodes() { return &bytecodes_; }
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 255
254 DISALLOW_COPY_AND_ASSIGN(TemporaryRegisterScope); 256 DISALLOW_COPY_AND_ASSIGN(TemporaryRegisterScope);
255 }; 257 };
256 258
257 259
258 } // namespace interpreter 260 } // namespace interpreter
259 } // namespace internal 261 } // namespace internal
260 } // namespace v8 262 } // namespace v8
261 263
262 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_ 264 #endif // V8_INTERPRETER_BYTECODE_ARRAY_BUILDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698