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

Side by Side Diff: src/compiler/js-call-reducer.cc

Issue 1596293003: Use default argument count for runtime function calls. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 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/compiler/bytecode-graph-builder.cc ('k') | src/compiler/js-operator.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 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-call-reducer.h" 5 #include "src/compiler/js-call-reducer.h"
6 6
7 #include "src/compiler/js-graph.h" 7 #include "src/compiler/js-graph.h"
8 #include "src/compiler/node-matchers.h" 8 #include "src/compiler/node-matchers.h"
9 #include "src/objects-inl.h" 9 #include "src/objects-inl.h"
10 #include "src/type-feedback-vector-inl.h" 10 #include "src/type-feedback-vector-inl.h"
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after
397 397
398 // Raise a TypeError if the {target} is not a constructor. 398 // Raise a TypeError if the {target} is not a constructor.
399 if (!function->IsConstructor()) { 399 if (!function->IsConstructor()) {
400 // Drop the lazy bailout location and use the eager bailout point for 400 // Drop the lazy bailout location and use the eager bailout point for
401 // the runtime function (actually as lazy bailout point). It doesn't 401 // the runtime function (actually as lazy bailout point). It doesn't
402 // really matter which bailout location we use since we never really 402 // really matter which bailout location we use since we never really
403 // go back after throwing the exception. 403 // go back after throwing the exception.
404 NodeProperties::RemoveFrameStateInput(node, 0); 404 NodeProperties::RemoveFrameStateInput(node, 0);
405 NodeProperties::ReplaceValueInputs(node, target); 405 NodeProperties::ReplaceValueInputs(node, target);
406 NodeProperties::ChangeOp( 406 NodeProperties::ChangeOp(
407 node, 407 node, javascript()->CallRuntime(Runtime::kThrowCalledNonCallable));
408 javascript()->CallRuntime(Runtime::kThrowCalledNonCallable, 1));
409 return Changed(node); 408 return Changed(node);
410 } 409 }
411 410
412 // Check for the ArrayConstructor. 411 // Check for the ArrayConstructor.
413 if (*function == function->native_context()->array_function()) { 412 if (*function == function->native_context()->array_function()) {
414 // Check if we have an allocation site. 413 // Check if we have an allocation site.
415 Handle<AllocationSite> site; 414 Handle<AllocationSite> site;
416 if (p.feedback().IsValid()) { 415 if (p.feedback().IsValid()) {
417 Handle<Object> feedback( 416 Handle<Object> feedback(
418 p.feedback().vector()->Get(p.feedback().slot()), isolate()); 417 p.feedback().vector()->Get(p.feedback().slot()), isolate());
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
548 } 547 }
549 548
550 549
551 JSOperatorBuilder* JSCallReducer::javascript() const { 550 JSOperatorBuilder* JSCallReducer::javascript() const {
552 return jsgraph()->javascript(); 551 return jsgraph()->javascript();
553 } 552 }
554 553
555 } // namespace compiler 554 } // namespace compiler
556 } // namespace internal 555 } // namespace internal
557 } // namespace v8 556 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/bytecode-graph-builder.cc ('k') | src/compiler/js-operator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698