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

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

Issue 2100883003: [Code Stubs] Convert FastNewClosureStub to a TurboFanCodeStub. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix ia32 Created 4 years, 5 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
« no previous file with comments | « src/compiler/code-assembler.h ('k') | src/compiler/js-generic-lowering.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 #include "src/compiler/code-assembler.h" 5 #include "src/compiler/code-assembler.h"
6 6
7 #include <ostream> 7 #include <ostream>
8 8
9 #include "src/code-factory.h" 9 #include "src/code-factory.h"
10 #include "src/compiler/graph.h" 10 #include "src/compiler/graph.h"
(...skipping 676 matching lines...) Expand 10 before | Expand all | Expand 10 after
687 RawMachineLabel*[case_count]; 687 RawMachineLabel*[case_count];
688 for (size_t i = 0; i < case_count; ++i) { 688 for (size_t i = 0; i < case_count; ++i) {
689 labels[i] = case_labels[i]->label_; 689 labels[i] = case_labels[i]->label_;
690 case_labels[i]->MergeVariables(); 690 case_labels[i]->MergeVariables();
691 default_label->MergeVariables(); 691 default_label->MergeVariables();
692 } 692 }
693 return raw_assembler_->Switch(index, default_label->label_, case_values, 693 return raw_assembler_->Switch(index, default_label->label_, case_values,
694 labels, case_count); 694 labels, case_count);
695 } 695 }
696 696
697 Node* CodeAssembler::Select(Node* condition, Node* true_value,
698 Node* false_value, MachineRepresentation rep) {
699 Variable value(this, rep);
700 Label vtrue(this), vfalse(this), end(this);
701 Branch(condition, &vtrue, &vfalse);
702
703 Bind(&vtrue);
704 {
705 value.Bind(true_value);
706 Goto(&end);
707 }
708 Bind(&vfalse);
709 {
710 value.Bind(false_value);
711 Goto(&end);
712 }
713
714 Bind(&end);
715 return value.value();
716 }
717
697 // RawMachineAssembler delegate helpers: 718 // RawMachineAssembler delegate helpers:
698 Isolate* CodeAssembler::isolate() const { return raw_assembler_->isolate(); } 719 Isolate* CodeAssembler::isolate() const { return raw_assembler_->isolate(); }
699 720
700 Factory* CodeAssembler::factory() const { return isolate()->factory(); } 721 Factory* CodeAssembler::factory() const { return isolate()->factory(); }
701 722
702 Graph* CodeAssembler::graph() const { return raw_assembler_->graph(); } 723 Graph* CodeAssembler::graph() const { return raw_assembler_->graph(); }
703 724
704 Zone* CodeAssembler::zone() const { return raw_assembler_->zone(); } 725 Zone* CodeAssembler::zone() const { return raw_assembler_->zone(); }
705 726
706 // The core implementation of Variable is stored through an indirection so 727 // The core implementation of Variable is stored through an indirection so
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
848 } 869 }
849 } 870 }
850 } 871 }
851 872
852 bound_ = true; 873 bound_ = true;
853 } 874 }
854 875
855 } // namespace compiler 876 } // namespace compiler
856 } // namespace internal 877 } // namespace internal
857 } // namespace v8 878 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/code-assembler.h ('k') | src/compiler/js-generic-lowering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698