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

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

Issue 1943403004: [turbofan] Implement %_NewObject using FastNewObjectStub. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 7 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 | « no previous file | test/mjsunit/regress/regress-crbug-609029.js » ('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/js-intrinsic-lowering.h" 5 #include "src/compiler/js-intrinsic-lowering.h"
6 6
7 #include <stack> 7 #include <stack>
8 8
9 #include "src/code-factory.h" 9 #include "src/code-factory.h"
10 #include "src/compiler/access-builder.h" 10 #include "src/compiler/access-builder.h"
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 Reduction JSIntrinsicLowering::ReduceCall(Node* node) { 390 Reduction JSIntrinsicLowering::ReduceCall(Node* node) {
391 size_t const arity = CallRuntimeParametersOf(node->op()).arity(); 391 size_t const arity = CallRuntimeParametersOf(node->op()).arity();
392 NodeProperties::ChangeOp(node, 392 NodeProperties::ChangeOp(node,
393 javascript()->CallFunction(arity, VectorSlotPair(), 393 javascript()->CallFunction(arity, VectorSlotPair(),
394 ConvertReceiverMode::kAny, 394 ConvertReceiverMode::kAny,
395 TailCallMode::kDisallow)); 395 TailCallMode::kDisallow));
396 return Changed(node); 396 return Changed(node);
397 } 397 }
398 398
399 Reduction JSIntrinsicLowering::ReduceNewObject(Node* node) { 399 Reduction JSIntrinsicLowering::ReduceNewObject(Node* node) {
400 Node* constructor = NodeProperties::GetValueInput(node, 0); 400 return Change(node, CodeFactory::FastNewObject(isolate()), 0);
401 Node* new_target = NodeProperties::GetValueInput(node, 1);
402 Node* context = NodeProperties::GetContextInput(node);
403 Node* effect = NodeProperties::GetEffectInput(node);
404 Node* frame_state = NodeProperties::GetFrameStateInput(node, 0);
405 Node* value = graph()->NewNode(javascript()->Create(), constructor,
406 new_target, context, frame_state, effect);
407 ReplaceWithValue(node, value, value);
408 return Replace(value);
409 } 401 }
410 402
411 Reduction JSIntrinsicLowering::ReduceGetSuperConstructor(Node* node) { 403 Reduction JSIntrinsicLowering::ReduceGetSuperConstructor(Node* node) {
412 Node* active_function = NodeProperties::GetValueInput(node, 0); 404 Node* active_function = NodeProperties::GetValueInput(node, 0);
413 Node* effect = NodeProperties::GetEffectInput(node); 405 Node* effect = NodeProperties::GetEffectInput(node);
414 Node* control = NodeProperties::GetControlInput(node); 406 Node* control = NodeProperties::GetControlInput(node);
415 Node* active_function_map = effect = 407 Node* active_function_map = effect =
416 graph()->NewNode(simplified()->LoadField(AccessBuilder::ForMap()), 408 graph()->NewNode(simplified()->LoadField(AccessBuilder::ForMap()),
417 active_function, effect, control); 409 active_function, effect, control);
418 return Change(node, simplified()->LoadField(AccessBuilder::ForMapPrototype()), 410 return Change(node, simplified()->LoadField(AccessBuilder::ForMapPrototype()),
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 } 490 }
499 491
500 492
501 SimplifiedOperatorBuilder* JSIntrinsicLowering::simplified() const { 493 SimplifiedOperatorBuilder* JSIntrinsicLowering::simplified() const {
502 return jsgraph()->simplified(); 494 return jsgraph()->simplified();
503 } 495 }
504 496
505 } // namespace compiler 497 } // namespace compiler
506 } // namespace internal 498 } // namespace internal
507 } // namespace v8 499 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-crbug-609029.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698