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

Side by Side Diff: src/compiler/bytecode-graph-builder.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/ast-graph-builder.cc ('k') | src/compiler/js-call-reducer.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/bytecode-graph-builder.h" 5 #include "src/compiler/bytecode-graph-builder.h"
6 6
7 #include "src/compiler/bytecode-branch-analysis.h" 7 #include "src/compiler/bytecode-branch-analysis.h"
8 #include "src/compiler/linkage.h" 8 #include "src/compiler/linkage.h"
9 #include "src/compiler/operator-properties.h" 9 #include "src/compiler/operator-properties.h"
10 #include "src/interpreter/bytecodes.h" 10 #include "src/interpreter/bytecodes.h"
(...skipping 811 matching lines...) Expand 10 before | Expand all | Expand 10 after
822 } 822 }
823 823
824 824
825 void BytecodeGraphBuilder::BuildStaLookupSlot( 825 void BytecodeGraphBuilder::BuildStaLookupSlot(
826 LanguageMode language_mode, 826 LanguageMode language_mode,
827 const interpreter::BytecodeArrayIterator& iterator) { 827 const interpreter::BytecodeArrayIterator& iterator) {
828 FrameStateBeforeAndAfter states(this, iterator); 828 FrameStateBeforeAndAfter states(this, iterator);
829 Node* value = environment()->LookupAccumulator(); 829 Node* value = environment()->LookupAccumulator();
830 Node* name = jsgraph()->Constant(iterator.GetConstantForIndexOperand(0)); 830 Node* name = jsgraph()->Constant(iterator.GetConstantForIndexOperand(0));
831 Node* language = jsgraph()->Constant(language_mode); 831 Node* language = jsgraph()->Constant(language_mode);
832 const Operator* op = javascript()->CallRuntime(Runtime::kStoreLookupSlot, 4); 832 const Operator* op = javascript()->CallRuntime(Runtime::kStoreLookupSlot);
833 Node* store = NewNode(op, value, environment()->Context(), name, language); 833 Node* store = NewNode(op, value, environment()->Context(), name, language);
834 environment()->BindAccumulator(store, &states); 834 environment()->BindAccumulator(store, &states);
835 } 835 }
836 836
837 837
838 void BytecodeGraphBuilder::VisitLdaLookupSlotWide( 838 void BytecodeGraphBuilder::VisitLdaLookupSlotWide(
839 const interpreter::BytecodeArrayIterator& iterator) { 839 const interpreter::BytecodeArrayIterator& iterator) {
840 VisitLdaLookupSlot(iterator); 840 VisitLdaLookupSlot(iterator);
841 } 841 }
842 842
(...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after
1314 environment()->BindAccumulator(value, &states); 1314 environment()->BindAccumulator(value, &states);
1315 } 1315 }
1316 1316
1317 1317
1318 void BytecodeGraphBuilder::VisitThrow( 1318 void BytecodeGraphBuilder::VisitThrow(
1319 const interpreter::BytecodeArrayIterator& iterator) { 1319 const interpreter::BytecodeArrayIterator& iterator) {
1320 FrameStateBeforeAndAfter states(this, iterator); 1320 FrameStateBeforeAndAfter states(this, iterator);
1321 Node* value = environment()->LookupAccumulator(); 1321 Node* value = environment()->LookupAccumulator();
1322 // TODO(mythria): Change to Runtime::kThrow when we have deoptimization 1322 // TODO(mythria): Change to Runtime::kThrow when we have deoptimization
1323 // information support in the interpreter. 1323 // information support in the interpreter.
1324 NewNode(javascript()->CallRuntime(Runtime::kReThrow, 1), value); 1324 NewNode(javascript()->CallRuntime(Runtime::kReThrow), value);
1325 Node* control = NewNode(common()->Throw(), value); 1325 Node* control = NewNode(common()->Throw(), value);
1326 environment()->RecordAfterState(control, &states); 1326 environment()->RecordAfterState(control, &states);
1327 UpdateControlDependencyToLeaveFunction(control); 1327 UpdateControlDependencyToLeaveFunction(control);
1328 } 1328 }
1329 1329
1330 1330
1331 void BytecodeGraphBuilder::BuildBinaryOp( 1331 void BytecodeGraphBuilder::BuildBinaryOp(
1332 const Operator* js_op, const interpreter::BytecodeArrayIterator& iterator) { 1332 const Operator* js_op, const interpreter::BytecodeArrayIterator& iterator) {
1333 FrameStateBeforeAndAfter states(this, iterator); 1333 FrameStateBeforeAndAfter states(this, iterator);
1334 Node* left = environment()->LookupRegister(iterator.GetRegisterOperand(0)); 1334 Node* left = environment()->LookupRegister(iterator.GetRegisterOperand(0));
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
1478 const interpreter::BytecodeArrayIterator& iterator) { 1478 const interpreter::BytecodeArrayIterator& iterator) {
1479 DCHECK(is_sloppy(language_mode())); 1479 DCHECK(is_sloppy(language_mode()));
1480 BuildDelete(iterator); 1480 BuildDelete(iterator);
1481 } 1481 }
1482 1482
1483 1483
1484 void BytecodeGraphBuilder::VisitDeleteLookupSlot( 1484 void BytecodeGraphBuilder::VisitDeleteLookupSlot(
1485 const interpreter::BytecodeArrayIterator& iterator) { 1485 const interpreter::BytecodeArrayIterator& iterator) {
1486 FrameStateBeforeAndAfter states(this, iterator); 1486 FrameStateBeforeAndAfter states(this, iterator);
1487 Node* name = environment()->LookupAccumulator(); 1487 Node* name = environment()->LookupAccumulator();
1488 const Operator* op = javascript()->CallRuntime(Runtime::kDeleteLookupSlot, 2); 1488 const Operator* op = javascript()->CallRuntime(Runtime::kDeleteLookupSlot);
1489 Node* result = NewNode(op, environment()->Context(), name); 1489 Node* result = NewNode(op, environment()->Context(), name);
1490 environment()->BindAccumulator(result, &states); 1490 environment()->BindAccumulator(result, &states);
1491 } 1491 }
1492 1492
1493 1493
1494 void BytecodeGraphBuilder::BuildCompareOp( 1494 void BytecodeGraphBuilder::BuildCompareOp(
1495 const Operator* js_op, const interpreter::BytecodeArrayIterator& iterator) { 1495 const Operator* js_op, const interpreter::BytecodeArrayIterator& iterator) {
1496 FrameStateBeforeAndAfter states(this, iterator); 1496 FrameStateBeforeAndAfter states(this, iterator);
1497 Node* left = environment()->LookupRegister(iterator.GetRegisterOperand(0)); 1497 Node* left = environment()->LookupRegister(iterator.GetRegisterOperand(0));
1498 Node* right = environment()->LookupAccumulator(); 1498 Node* right = environment()->LookupAccumulator();
(...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after
2031 2031
2032 void BytecodeGraphBuilder::UpdateControlDependencyToLeaveFunction(Node* exit) { 2032 void BytecodeGraphBuilder::UpdateControlDependencyToLeaveFunction(Node* exit) {
2033 if (environment()->IsMarkedAsUnreachable()) return; 2033 if (environment()->IsMarkedAsUnreachable()) return;
2034 environment()->MarkAsUnreachable(); 2034 environment()->MarkAsUnreachable();
2035 exit_controls_.push_back(exit); 2035 exit_controls_.push_back(exit);
2036 } 2036 }
2037 2037
2038 } // namespace compiler 2038 } // namespace compiler
2039 } // namespace internal 2039 } // namespace internal
2040 } // namespace v8 2040 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/ast-graph-builder.cc ('k') | src/compiler/js-call-reducer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698