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

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

Issue 2504553003: [es6] Perform the IsConstructor test in GetSuperConstructor. (Closed)
Patch Set: Fix assembler and add unittest 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
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/code-factory.h" 8 #include "src/code-factory.h"
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/compiler/common-operator.h" 10 #include "src/compiler/common-operator.h"
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 ReplaceWithRuntimeCall(node, Runtime::kDefineDataPropertyInLiteral); 266 ReplaceWithRuntimeCall(node, Runtime::kDefineDataPropertyInLiteral);
267 } 267 }
268 268
269 void JSGenericLowering::LowerJSDeleteProperty(Node* node) { 269 void JSGenericLowering::LowerJSDeleteProperty(Node* node) {
270 LanguageMode language_mode = OpParameter<LanguageMode>(node); 270 LanguageMode language_mode = OpParameter<LanguageMode>(node);
271 ReplaceWithRuntimeCall(node, is_strict(language_mode) 271 ReplaceWithRuntimeCall(node, is_strict(language_mode)
272 ? Runtime::kDeleteProperty_Strict 272 ? Runtime::kDeleteProperty_Strict
273 : Runtime::kDeleteProperty_Sloppy); 273 : Runtime::kDeleteProperty_Sloppy);
274 } 274 }
275 275
276 void JSGenericLowering::LowerJSGetSuperConstructor(Node* node) {
277 CallDescriptor::Flags flags = FrameStateFlagForCall(node);
278 Callable callable = CodeFactory::GetSuperConstructor(isolate());
279 ReplaceWithStubCall(node, callable, flags);
280 }
281
276 void JSGenericLowering::LowerJSInstanceOf(Node* node) { 282 void JSGenericLowering::LowerJSInstanceOf(Node* node) {
277 CallDescriptor::Flags flags = FrameStateFlagForCall(node); 283 CallDescriptor::Flags flags = FrameStateFlagForCall(node);
278 Callable callable = CodeFactory::InstanceOf(isolate()); 284 Callable callable = CodeFactory::InstanceOf(isolate());
279 ReplaceWithStubCall(node, callable, flags); 285 ReplaceWithStubCall(node, callable, flags);
280 } 286 }
281 287
282 void JSGenericLowering::LowerJSOrdinaryHasInstance(Node* node) { 288 void JSGenericLowering::LowerJSOrdinaryHasInstance(Node* node) {
283 CallDescriptor::Flags flags = FrameStateFlagForCall(node); 289 CallDescriptor::Flags flags = FrameStateFlagForCall(node);
284 Callable callable = CodeFactory::OrdinaryHasInstance(isolate()); 290 Callable callable = CodeFactory::OrdinaryHasInstance(isolate());
285 ReplaceWithStubCall(node, callable, flags); 291 ReplaceWithStubCall(node, callable, flags);
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
610 } 616 }
611 617
612 618
613 MachineOperatorBuilder* JSGenericLowering::machine() const { 619 MachineOperatorBuilder* JSGenericLowering::machine() const {
614 return jsgraph()->machine(); 620 return jsgraph()->machine();
615 } 621 }
616 622
617 } // namespace compiler 623 } // namespace compiler
618 } // namespace internal 624 } // namespace internal
619 } // namespace v8 625 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698