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

Side by Side Diff: src/compiler/js-context-relaxation.cc

Issue 1254073003: Tail call from TurboFan into select runtime calls (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Smaller patch Created 5 years, 4 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 | src/compiler/linkage-impl.h » ('j') | src/compiler/linkage-impl.h » ('J')
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/frame-states.h" 5 #include "src/compiler/frame-states.h"
6 #include "src/compiler/js-context-relaxation.h" 6 #include "src/compiler/js-context-relaxation.h"
7 #include "src/compiler/js-operator.h" 7 #include "src/compiler/js-operator.h"
8 #include "src/compiler/node.h" 8 #include "src/compiler/node.h"
9 #include "src/compiler/node-properties.h" 9 #include "src/compiler/node-properties.h"
10 10
11 namespace v8 { 11 namespace v8 {
12 namespace internal { 12 namespace internal {
13 namespace compiler { 13 namespace compiler {
14 14
15 Reduction JSContextRelaxation::Reduce(Node* node) { 15 Reduction JSContextRelaxation::Reduce(Node* node) {
16 switch (node->opcode()) { 16 switch (node->opcode()) {
17 case IrOpcode::kJSCallRuntime: {
18 const CallRuntimeParameters& p = CallRuntimeParametersOf(node->op());
19 const Runtime::Function* fun = Runtime::FunctionForId(p.id());
20 switch (fun->function_id) {
21 #define IC_CASE(name, number_of_args, result_size) \
22 case Runtime::k##name: \
23 break;
24 FOR_EACH_INTRINSIC_IC(IC_CASE)
25 #undef IC_CASE
26 default:
27 return NoChange();
28 }
29 }
30 // Fall through
17 case IrOpcode::kJSCallFunction: 31 case IrOpcode::kJSCallFunction:
18 case IrOpcode::kJSToNumber: { 32 case IrOpcode::kJSToNumber: {
19 Node* frame_state = NodeProperties::GetFrameStateInput(node, 0); 33 Node* frame_state = NodeProperties::GetFrameStateInput(node, 0);
20 Node* outer_frame = frame_state; 34 Node* outer_frame = frame_state;
21 Node* original_context = NodeProperties::GetContextInput(node); 35 Node* original_context = NodeProperties::GetContextInput(node);
22 Node* candidate_new_context = original_context; 36 Node* candidate_new_context = original_context;
23 do { 37 do {
24 FrameStateInfo frame_state_info( 38 FrameStateInfo frame_state_info(
25 OpParameter<FrameStateInfo>(outer_frame->op())); 39 OpParameter<FrameStateInfo>(outer_frame->op()));
26 const FrameStateFunctionInfo* function_info = 40 const FrameStateFunctionInfo* function_info =
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 } 72 }
59 default: 73 default:
60 break; 74 break;
61 } 75 }
62 return NoChange(); 76 return NoChange();
63 } 77 }
64 78
65 } // namespace compiler 79 } // namespace compiler
66 } // namespace internal 80 } // namespace internal
67 } // namespace v8 81 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/compiler/linkage-impl.h » ('j') | src/compiler/linkage-impl.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698