| OLD | NEW |
| 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_COMPILER_CODE_ASSEMBLER_H_ | 5 #ifndef V8_COMPILER_CODE_ASSEMBLER_H_ |
| 6 #define V8_COMPILER_CODE_ASSEMBLER_H_ | 6 #define V8_COMPILER_CODE_ASSEMBLER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <memory> |
| 9 | 10 |
| 10 // Clients of this interface shouldn't depend on lots of compiler internals. | 11 // Clients of this interface shouldn't depend on lots of compiler internals. |
| 11 // Do not include anything from src/compiler here! | 12 // Do not include anything from src/compiler here! |
| 12 #include "src/allocation.h" | 13 #include "src/allocation.h" |
| 13 #include "src/builtins/builtins.h" | 14 #include "src/builtins/builtins.h" |
| 14 #include "src/heap/heap.h" | 15 #include "src/heap/heap.h" |
| 15 #include "src/machine-type.h" | 16 #include "src/machine-type.h" |
| 16 #include "src/runtime/runtime.h" | 17 #include "src/runtime/runtime.h" |
| 17 #include "src/zone-containers.h" | 18 #include "src/zone-containers.h" |
| 18 | 19 |
| (...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 403 virtual void CallPrologue(); | 404 virtual void CallPrologue(); |
| 404 virtual void CallEpilogue(); | 405 virtual void CallEpilogue(); |
| 405 | 406 |
| 406 private: | 407 private: |
| 407 CodeAssembler(Isolate* isolate, Zone* zone, CallDescriptor* call_descriptor, | 408 CodeAssembler(Isolate* isolate, Zone* zone, CallDescriptor* call_descriptor, |
| 408 Code::Flags flags, const char* name); | 409 Code::Flags flags, const char* name); |
| 409 | 410 |
| 410 Node* CallN(CallDescriptor* descriptor, Node* code_target, Node** args); | 411 Node* CallN(CallDescriptor* descriptor, Node* code_target, Node** args); |
| 411 Node* TailCallN(CallDescriptor* descriptor, Node* code_target, Node** args); | 412 Node* TailCallN(CallDescriptor* descriptor, Node* code_target, Node** args); |
| 412 | 413 |
| 413 base::SmartPointer<RawMachineAssembler> raw_assembler_; | 414 std::unique_ptr<RawMachineAssembler> raw_assembler_; |
| 414 Code::Flags flags_; | 415 Code::Flags flags_; |
| 415 const char* name_; | 416 const char* name_; |
| 416 bool code_generated_; | 417 bool code_generated_; |
| 417 ZoneSet<Variable::Impl*> variables_; | 418 ZoneSet<Variable::Impl*> variables_; |
| 418 | 419 |
| 419 DISALLOW_COPY_AND_ASSIGN(CodeAssembler); | 420 DISALLOW_COPY_AND_ASSIGN(CodeAssembler); |
| 420 }; | 421 }; |
| 421 | 422 |
| 422 DEFINE_OPERATORS_FOR_FLAGS(CodeAssembler::AllocationFlags); | 423 DEFINE_OPERATORS_FOR_FLAGS(CodeAssembler::AllocationFlags); |
| 423 | 424 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 453 // Map of variables to the list of value nodes that have been added from each | 454 // Map of variables to the list of value nodes that have been added from each |
| 454 // merge path in their order of merging. | 455 // merge path in their order of merging. |
| 455 std::map<Variable::Impl*, std::vector<Node*>> variable_merges_; | 456 std::map<Variable::Impl*, std::vector<Node*>> variable_merges_; |
| 456 }; | 457 }; |
| 457 | 458 |
| 458 } // namespace compiler | 459 } // namespace compiler |
| 459 } // namespace internal | 460 } // namespace internal |
| 460 } // namespace v8 | 461 } // namespace v8 |
| 461 | 462 |
| 462 #endif // V8_COMPILER_CODE_ASSEMBLER_H_ | 463 #endif // V8_COMPILER_CODE_ASSEMBLER_H_ |
| OLD | NEW |