OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef INTERPRETER_BYTECODE_EXPECTATIONS_H_ | |
rmcilroy
2016/02/12 15:29:05
V8_INTERPRETER_BYTECODE_EXPECTATIONS_PRINTER_H_ (a
Stefano Sanfilippo
2016/02/12 18:29:40
Done.
| |
6 #define INTERPRETER_BYTECODE_EXPECTATIONS_H_ | |
7 | |
8 #include <iostream> | |
9 #include <string> | |
10 | |
11 namespace v8 { | |
12 | |
13 class Isolate; | |
14 | |
15 namespace internal { | |
16 namespace interpreter { | |
17 | |
18 enum ConstantPoolType { | |
rmcilroy
2016/02/12 15:29:05
Pull into BytecodeExpectationsPrinter as an inner
Stefano Sanfilippo
2016/02/12 18:29:40
Done.
| |
19 kConstantPoolTypeUnknown, | |
20 kConstantPoolTypeString, | |
21 kConstantPoolTypeInteger, | |
22 kConstantPoolTypeDouble, | |
23 kConstantPoolTypeMixed, | |
24 }; | |
25 | |
26 class ExpectationPrinter final { | |
rmcilroy
2016/02/12 15:29:05
Please rename file to bytecode-expectations-printe
Stefano Sanfilippo
2016/02/12 18:29:40
Done.
| |
27 public: | |
28 ExpectationPrinter(v8::Isolate* i, ConstantPoolType t) | |
29 : isolate_(i), const_pool_type_(t) {} | |
30 | |
31 void PrintExpectation(std::ostream& stream, const std::string& snippet); | |
32 | |
33 void SetConstantPoolType(ConstantPoolType t) { const_pool_type_ = t; } | |
rmcilroy
2016/02/12 15:29:05
set_constant_pool_type for a setter
Stefano Sanfilippo
2016/02/12 18:29:40
Done.
| |
34 ConstantPoolType GetConstantPoolType() const { return const_pool_type_; } | |
rmcilroy
2016/02/12 15:29:05
constant_pool_type for a getter (drop the Get)
Stefano Sanfilippo
2016/02/12 18:29:40
Done.
| |
35 | |
36 private: | |
37 v8::Isolate* isolate_; | |
38 ConstantPoolType const_pool_type_; | |
39 }; | |
40 | |
41 } // namespace interpreter | |
42 } // namespace internal | |
43 } // namespace v8 | |
44 | |
45 #endif | |
rmcilroy
2016/02/12 15:29:05
#endif // V8_INTERPRETER_BYTECODE_EXPECTATIONS_PRI
Stefano Sanfilippo
2016/02/12 18:29:40
Done.
| |
OLD | NEW |