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

Side by Side Diff: src/compiler/ast-graph-builder.cc

Issue 2666783007: [turbo] Rename CallFunction* JSOperators to Call*. (Closed)
Patch Set: Created 3 years, 10 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.h ('k') | src/compiler/bytecode-graph-builder.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 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/ast-graph-builder.h" 5 #include "src/compiler/ast-graph-builder.h"
6 6
7 #include "src/ast/compile-time-value.h" 7 #include "src/ast/compile-time-value.h"
8 #include "src/ast/scopes.h" 8 #include "src/ast/scopes.h"
9 #include "src/compilation-info.h" 9 #include "src/compilation-info.h"
10 #include "src/compiler.h" 10 #include "src/compiler.h"
(...skipping 1815 matching lines...) Expand 10 before | Expand all | Expand 10 after
1826 environment()->Push(receiver_value); 1826 environment()->Push(receiver_value);
1827 1827
1828 // Evaluate all arguments to the function call, 1828 // Evaluate all arguments to the function call,
1829 ZoneList<Expression*>* args = expr->arguments(); 1829 ZoneList<Expression*>* args = expr->arguments();
1830 VisitForValues(args); 1830 VisitForValues(args);
1831 1831
1832 // Create node to perform the function call. 1832 // Create node to perform the function call.
1833 float const frequency = ComputeCallFrequency(expr->CallFeedbackICSlot()); 1833 float const frequency = ComputeCallFrequency(expr->CallFeedbackICSlot());
1834 VectorSlotPair feedback = CreateVectorSlotPair(expr->CallFeedbackICSlot()); 1834 VectorSlotPair feedback = CreateVectorSlotPair(expr->CallFeedbackICSlot());
1835 const Operator* call = 1835 const Operator* call =
1836 javascript()->CallFunction(args->length() + 2, frequency, feedback, 1836 javascript()->Call(args->length() + 2, frequency, feedback, receiver_hint,
1837 receiver_hint, expr->tail_call_mode()); 1837 expr->tail_call_mode());
1838 PrepareEagerCheckpoint(expr->CallId()); 1838 PrepareEagerCheckpoint(expr->CallId());
1839 Node* value = ProcessArguments(call, args->length() + 2); 1839 Node* value = ProcessArguments(call, args->length() + 2);
1840 // The callee passed to the call, we just need to push something here to 1840 // The callee passed to the call, we just need to push something here to
1841 // satisfy the bailout location contract. The fullcodegen code will not 1841 // satisfy the bailout location contract. The fullcodegen code will not
1842 // ever look at this value, so we just push optimized_out here. 1842 // ever look at this value, so we just push optimized_out here.
1843 environment()->Push(jsgraph()->OptimizedOutConstant()); 1843 environment()->Push(jsgraph()->OptimizedOutConstant());
1844 PrepareFrameState(value, expr->ReturnId(), OutputFrameStateCombine::Push()); 1844 PrepareFrameState(value, expr->ReturnId(), OutputFrameStateCombine::Push());
1845 environment()->Drop(1); 1845 environment()->Drop(1);
1846 ast_context()->ProduceValue(expr, value); 1846 ast_context()->ProduceValue(expr, value);
1847 } 1847 }
(...skipping 27 matching lines...) Expand all
1875 Node* receiver_value = jsgraph()->UndefinedConstant(); 1875 Node* receiver_value = jsgraph()->UndefinedConstant();
1876 1876
1877 environment()->Push(callee_value); 1877 environment()->Push(callee_value);
1878 environment()->Push(receiver_value); 1878 environment()->Push(receiver_value);
1879 1879
1880 // Evaluate all arguments to the JS runtime call. 1880 // Evaluate all arguments to the JS runtime call.
1881 ZoneList<Expression*>* args = expr->arguments(); 1881 ZoneList<Expression*>* args = expr->arguments();
1882 VisitForValues(args); 1882 VisitForValues(args);
1883 1883
1884 // Create node to perform the JS runtime call. 1884 // Create node to perform the JS runtime call.
1885 const Operator* call = javascript()->CallFunction(args->length() + 2); 1885 const Operator* call = javascript()->Call(args->length() + 2);
1886 PrepareEagerCheckpoint(expr->CallId()); 1886 PrepareEagerCheckpoint(expr->CallId());
1887 Node* value = ProcessArguments(call, args->length() + 2); 1887 Node* value = ProcessArguments(call, args->length() + 2);
1888 PrepareFrameState(value, expr->id(), ast_context()->GetStateCombine()); 1888 PrepareFrameState(value, expr->id(), ast_context()->GetStateCombine());
1889 ast_context()->ProduceValue(expr, value); 1889 ast_context()->ProduceValue(expr, value);
1890 } 1890 }
1891 1891
1892 1892
1893 void AstGraphBuilder::VisitCallRuntime(CallRuntime* expr) { 1893 void AstGraphBuilder::VisitCallRuntime(CallRuntime* expr) {
1894 // Handle calls to runtime functions implemented in JavaScript separately as 1894 // Handle calls to runtime functions implemented in JavaScript separately as
1895 // the call follows JavaScript ABI and the callee is statically unknown. 1895 // the call follows JavaScript ABI and the callee is statically unknown.
(...skipping 1414 matching lines...) Expand 10 before | Expand all | Expand 10 after
3310 float invocation_frequency, LoopAssignmentAnalysis* loop_assignment, 3310 float invocation_frequency, LoopAssignmentAnalysis* loop_assignment,
3311 SourcePositionTable* source_positions, int inlining_id) 3311 SourcePositionTable* source_positions, int inlining_id)
3312 : AstGraphBuilder(local_zone, info, jsgraph, invocation_frequency, 3312 : AstGraphBuilder(local_zone, info, jsgraph, invocation_frequency,
3313 loop_assignment), 3313 loop_assignment),
3314 source_positions_(source_positions), 3314 source_positions_(source_positions),
3315 start_position_(info->shared_info()->start_position(), inlining_id) {} 3315 start_position_(info->shared_info()->start_position(), inlining_id) {}
3316 3316
3317 } // namespace compiler 3317 } // namespace compiler
3318 } // namespace internal 3318 } // namespace internal
3319 } // namespace v8 3319 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/ast-graph-builder.h ('k') | src/compiler/bytecode-graph-builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698