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

Side by Side Diff: src/compiler/linkage-impl.h

Issue 1026023004: [turbofan] Fix loading of JSFunction from activation in case of adapter frame. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 9 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/ia32/code-generator-ia32.cc ('k') | src/compiler/mips/code-generator-mips.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 #ifndef V8_COMPILER_LINKAGE_IMPL_H_ 5 #ifndef V8_COMPILER_LINKAGE_IMPL_H_
6 #define V8_COMPILER_LINKAGE_IMPL_H_ 6 #define V8_COMPILER_LINKAGE_IMPL_H_
7 7
8 #include "src/code-stubs.h" 8 #include "src/code-stubs.h"
9 #include "src/compiler/osr.h" 9 #include "src/compiler/osr.h"
10 10
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 int spill_slot_index = i - js_parameter_count; 50 int spill_slot_index = i - js_parameter_count;
51 locations.AddParam(stackloc(spill_slot_index)); 51 locations.AddParam(stackloc(spill_slot_index));
52 types.AddParam(kMachAnyTagged); 52 types.AddParam(kMachAnyTagged);
53 } 53 }
54 // Add context. 54 // Add context.
55 locations.AddParam(regloc(LinkageTraits::ContextReg())); 55 locations.AddParam(regloc(LinkageTraits::ContextReg()));
56 types.AddParam(kMachAnyTagged); 56 types.AddParam(kMachAnyTagged);
57 57
58 // The target for JS function calls is the JSFunction object. 58 // The target for JS function calls is the JSFunction object.
59 MachineType target_type = kMachAnyTagged; 59 MachineType target_type = kMachAnyTagged;
60 // Unoptimized code doesn't preserve the JSCallFunctionReg, so expect the 60 // TODO(titzer): When entering into an OSR function from unoptimized code,
61 // closure on the stack. 61 // the JSFunction is not in a register, but it is on the stack in an
62 LinkageLocation target_loc = 62 // unaddressable spill slot. We hack this in the OSR prologue. Fix.
63 is_osr ? stackloc(Linkage::kJSFunctionCallClosureParamIndex - 63 LinkageLocation target_loc = regloc(LinkageTraits::JSCallFunctionReg());
64 js_parameter_count)
65 : regloc(LinkageTraits::JSCallFunctionReg());
66 return new (zone) CallDescriptor( // -- 64 return new (zone) CallDescriptor( // --
67 CallDescriptor::kCallJSFunction, // kind 65 CallDescriptor::kCallJSFunction, // kind
68 target_type, // target MachineType 66 target_type, // target MachineType
69 target_loc, // target location 67 target_loc, // target location
70 types.Build(), // machine_sig 68 types.Build(), // machine_sig
71 locations.Build(), // location_sig 69 locations.Build(), // location_sig
72 js_parameter_count, // js_parameter_count 70 js_parameter_count, // js_parameter_count
73 Operator::kNoProperties, // properties 71 Operator::kNoProperties, // properties
74 kNoCalleeSaved, // callee-saved 72 kNoCalleeSaved, // callee-saved
75 flags, // flags 73 flags, // flags
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 int parameter_index = 1 + index; // skip index 0, which is the target. 283 int parameter_index = 1 + index; // skip index 0, which is the target.
286 return incoming_->GetInputLocation(parameter_index); 284 return incoming_->GetInputLocation(parameter_index);
287 } 285 }
288 } 286 }
289 287
290 } // namespace compiler 288 } // namespace compiler
291 } // namespace internal 289 } // namespace internal
292 } // namespace v8 290 } // namespace v8
293 291
294 #endif // V8_COMPILER_LINKAGE_IMPL_H_ 292 #endif // V8_COMPILER_LINKAGE_IMPL_H_
OLDNEW
« no previous file with comments | « src/compiler/ia32/code-generator-ia32.cc ('k') | src/compiler/mips/code-generator-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698