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

Side by Side Diff: src/interpreter/bytecode-dead-code-optimizer.h

Issue 2351763002: [Interpreter] Optimize BytecodeArrayBuilder and BytecodeArrayWriter. (Closed)
Patch Set: Fix Chromium Windows bots. Created 4 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 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 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_DEAD_CODE_OPTIMIZER_H_ 5 #ifndef V8_INTERPRETER_BYTECODE_DEAD_CODE_OPTIMIZER_H_
6 #define V8_INTERPRETER_BYTECODE_DEAD_CODE_OPTIMIZER_H_ 6 #define V8_INTERPRETER_BYTECODE_DEAD_CODE_OPTIMIZER_H_
7 7
8 #include "src/interpreter/bytecode-pipeline.h" 8 #include "src/interpreter/bytecode-pipeline.h"
9 9
10 namespace v8 { 10 namespace v8 {
11 namespace internal { 11 namespace internal {
12 namespace interpreter { 12 namespace interpreter {
13 13
14 // An optimization stage for eliminating obviously dead code in bytecode 14 // An optimization stage for eliminating obviously dead code in bytecode
15 // generation. 15 // generation.
16 class BytecodeDeadCodeOptimizer final : public BytecodePipelineStage, 16 class BytecodeDeadCodeOptimizer final : public BytecodePipelineStage,
17 public ZoneObject { 17 public ZoneObject {
18 public: 18 public:
19 explicit BytecodeDeadCodeOptimizer(BytecodePipelineStage* next_stage); 19 explicit BytecodeDeadCodeOptimizer(BytecodePipelineStage* next_stage);
20 20
21 // BytecodePipelineStage interface. 21 // BytecodePipelineStage interface.
22 void Write(BytecodeNode* node) override; 22 void Write(BytecodeNode* node) override;
23 void WriteJump(BytecodeNode* node, BytecodeLabel* label) override; 23 void WriteJump(BytecodeNode* node, BytecodeLabel* label) override;
24 void BindLabel(BytecodeLabel* label) override; 24 void BindLabel(BytecodeLabel* label) override;
25 void BindLabel(const BytecodeLabel& target, BytecodeLabel* label) override; 25 void BindLabel(const BytecodeLabel& target, BytecodeLabel* label) override;
26 Handle<BytecodeArray> ToBytecodeArray( 26 Handle<BytecodeArray> ToBytecodeArray(
27 Isolate* isolate, int fixed_register_count, int parameter_count, 27 Isolate* isolate, int register_count, int parameter_count,
28 Handle<FixedArray> handler_table) override; 28 Handle<FixedArray> handler_table) override;
29 29
30 private: 30 private:
31 BytecodePipelineStage* next_stage_; 31 BytecodePipelineStage* next_stage_;
32 bool exit_seen_in_block_; 32 bool exit_seen_in_block_;
33 33
34 DISALLOW_COPY_AND_ASSIGN(BytecodeDeadCodeOptimizer); 34 DISALLOW_COPY_AND_ASSIGN(BytecodeDeadCodeOptimizer);
35 }; 35 };
36 36
37 } // namespace interpreter 37 } // namespace interpreter
38 } // namespace internal 38 } // namespace internal
39 } // namespace v8 39 } // namespace v8
40 40
41 #endif // V8_INTERPRETER_BYTECODE_DEAD_CODE_OPTIMIZER_H_ 41 #endif // V8_INTERPRETER_BYTECODE_DEAD_CODE_OPTIMIZER_H_
OLDNEW
« no previous file with comments | « src/interpreter/bytecode-array-writer.cc ('k') | src/interpreter/bytecode-dead-code-optimizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698