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

Side by Side Diff: src/compiler/js-generic-lowering.cc

Issue 2647833004: [turbofan] Properly implement %_ClassOf intrinsic. (Closed)
Patch Set: Created 3 years, 11 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/code-stub-assembler.cc ('k') | src/compiler/js-intrinsic-lowering.h » ('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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/js-generic-lowering.h" 5 #include "src/compiler/js-generic-lowering.h"
6 6
7 #include "src/ast/ast.h" 7 #include "src/ast/ast.h"
8 #include "src/builtins/builtins-constructor.h" 8 #include "src/builtins/builtins-constructor.h"
9 #include "src/code-factory.h" 9 #include "src/code-factory.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 136
137 void JSGenericLowering::LowerJSToBoolean(Node* node) { 137 void JSGenericLowering::LowerJSToBoolean(Node* node) {
138 // The ToBoolean conversion doesn't need the current context. 138 // The ToBoolean conversion doesn't need the current context.
139 NodeProperties::ReplaceContextInput(node, jsgraph()->NoContextConstant()); 139 NodeProperties::ReplaceContextInput(node, jsgraph()->NoContextConstant());
140 Callable callable = CodeFactory::ToBoolean(isolate()); 140 Callable callable = CodeFactory::ToBoolean(isolate());
141 node->AppendInput(zone(), graph()->start()); 141 node->AppendInput(zone(), graph()->start());
142 ReplaceWithStubCall(node, callable, CallDescriptor::kNoAllocate, 142 ReplaceWithStubCall(node, callable, CallDescriptor::kNoAllocate,
143 Operator::kEliminatable); 143 Operator::kEliminatable);
144 } 144 }
145 145
146 void JSGenericLowering::LowerJSClassOf(Node* node) {
147 // The %_ClassOf intrinsic doesn't need the current context.
148 NodeProperties::ReplaceContextInput(node, jsgraph()->NoContextConstant());
149 Callable callable = CodeFactory::ClassOf(isolate());
150 node->AppendInput(zone(), graph()->start());
151 ReplaceWithStubCall(node, callable, CallDescriptor::kNoAllocate,
152 Operator::kEliminatable);
153 }
154
146 void JSGenericLowering::LowerJSTypeOf(Node* node) { 155 void JSGenericLowering::LowerJSTypeOf(Node* node) {
147 // The typeof operator doesn't need the current context. 156 // The typeof operator doesn't need the current context.
148 NodeProperties::ReplaceContextInput(node, jsgraph()->NoContextConstant()); 157 NodeProperties::ReplaceContextInput(node, jsgraph()->NoContextConstant());
149 Callable callable = CodeFactory::Typeof(isolate()); 158 Callable callable = CodeFactory::Typeof(isolate());
150 node->AppendInput(zone(), graph()->start()); 159 node->AppendInput(zone(), graph()->start());
151 ReplaceWithStubCall(node, callable, CallDescriptor::kNoAllocate, 160 ReplaceWithStubCall(node, callable, CallDescriptor::kNoAllocate,
152 Operator::kEliminatable); 161 Operator::kEliminatable);
153 } 162 }
154 163
155 164
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after
644 } 653 }
645 654
646 655
647 MachineOperatorBuilder* JSGenericLowering::machine() const { 656 MachineOperatorBuilder* JSGenericLowering::machine() const {
648 return jsgraph()->machine(); 657 return jsgraph()->machine();
649 } 658 }
650 659
651 } // namespace compiler 660 } // namespace compiler
652 } // namespace internal 661 } // namespace internal
653 } // namespace v8 662 } // namespace v8
OLDNEW
« no previous file with comments | « src/code-stub-assembler.cc ('k') | src/compiler/js-intrinsic-lowering.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698