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

Side by Side Diff: src/compiler/code-assembler.h

Issue 2574353002: [turbofan] Added --csa-trap-on-node option that helps debugging graph verification issues. (Closed)
Patch Set: Created 4 years 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
« no previous file with comments | « src/code-stub-assembler.cc ('k') | src/compiler/code-assembler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_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 #include <memory>
10 10
(...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after
448 void GotoIfException(Node* node, Label* if_exception, 448 void GotoIfException(Node* node, Label* if_exception,
449 Variable* exception_var = nullptr); 449 Variable* exception_var = nullptr);
450 450
451 // Helpers which delegate to RawMachineAssembler. 451 // Helpers which delegate to RawMachineAssembler.
452 Factory* factory() const; 452 Factory* factory() const;
453 Isolate* isolate() const; 453 Isolate* isolate() const;
454 Zone* zone() const; 454 Zone* zone() const;
455 455
456 CodeAssemblerState* state() { return state_; } 456 CodeAssemblerState* state() { return state_; }
457 457
458 void BreakOnNode(int node_id);
459
458 protected: 460 protected:
459 // Enables subclasses to perform operations before and after a call. 461 // Enables subclasses to perform operations before and after a call.
460 virtual void CallPrologue(); 462 virtual void CallPrologue();
461 virtual void CallEpilogue(); 463 virtual void CallEpilogue();
462 464
463 private: 465 private:
464 Node* CallN(CallDescriptor* descriptor, Node* code_target, Node** args); 466 Node* CallN(CallDescriptor* descriptor, Node* code_target, Node** args);
465 Node* TailCallN(CallDescriptor* descriptor, Node* code_target, Node** args); 467 Node* TailCallN(CallDescriptor* descriptor, Node* code_target, Node** args);
466 468
469 void InstallBreakOnNodeDecorator();
470
467 RawMachineAssembler* raw_assembler() const; 471 RawMachineAssembler* raw_assembler() const;
468 472
469 CodeAssemblerState* state_; 473 CodeAssemblerState* state_;
470 474
471 DISALLOW_COPY_AND_ASSIGN(CodeAssembler); 475 DISALLOW_COPY_AND_ASSIGN(CodeAssembler);
472 }; 476 };
473 477
474 class CodeAssemblerVariable { 478 class CodeAssemblerVariable {
475 public: 479 public:
476 explicit CodeAssemblerVariable(CodeAssembler* assembler, 480 explicit CodeAssemblerVariable(CodeAssembler* assembler,
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
539 const CallInterfaceDescriptor& descriptor, 543 const CallInterfaceDescriptor& descriptor,
540 Code::Flags flags, const char* name, 544 Code::Flags flags, const char* name,
541 size_t result_size = 1); 545 size_t result_size = 1);
542 546
543 // Create with JSCall linkage. 547 // Create with JSCall linkage.
544 CodeAssemblerState(Isolate* isolate, Zone* zone, int parameter_count, 548 CodeAssemblerState(Isolate* isolate, Zone* zone, int parameter_count,
545 Code::Flags flags, const char* name); 549 Code::Flags flags, const char* name);
546 550
547 ~CodeAssemblerState(); 551 ~CodeAssemblerState();
548 552
553 const char* name() const { return name_; }
554
549 private: 555 private:
550 friend class CodeAssembler; 556 friend class CodeAssembler;
551 friend class CodeAssemblerLabel; 557 friend class CodeAssemblerLabel;
552 friend class CodeAssemblerVariable; 558 friend class CodeAssemblerVariable;
553 559
554 CodeAssemblerState(Isolate* isolate, Zone* zone, 560 CodeAssemblerState(Isolate* isolate, Zone* zone,
555 CallDescriptor* call_descriptor, Code::Flags flags, 561 CallDescriptor* call_descriptor, Code::Flags flags,
556 const char* name); 562 const char* name);
557 563
558 std::unique_ptr<RawMachineAssembler> raw_assembler_; 564 std::unique_ptr<RawMachineAssembler> raw_assembler_;
559 Code::Flags flags_; 565 Code::Flags flags_;
560 const char* name_; 566 const char* name_;
561 bool code_generated_; 567 bool code_generated_;
562 ZoneSet<CodeAssemblerVariable::Impl*> variables_; 568 ZoneSet<CodeAssemblerVariable::Impl*> variables_;
563 569
564 DISALLOW_COPY_AND_ASSIGN(CodeAssemblerState); 570 DISALLOW_COPY_AND_ASSIGN(CodeAssemblerState);
565 }; 571 };
566 572
567 } // namespace compiler 573 } // namespace compiler
568 } // namespace internal 574 } // namespace internal
569 } // namespace v8 575 } // namespace v8
570 576
571 #endif // V8_COMPILER_CODE_ASSEMBLER_H_ 577 #endif // V8_COMPILER_CODE_ASSEMBLER_H_
OLDNEW
« no previous file with comments | « src/code-stub-assembler.cc ('k') | src/compiler/code-assembler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698