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

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

Issue 1254293006: [interpreter] Change interpreter to use an BytecodeArray pointer and and offset. (Closed) Base URL: ssh://rmcilroy.lon.corp.google.com///usr/local/google/code/v8_full/v8@master
Patch Set: Fix MIPS merge error 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 | « src/compiler/linkage.h ('k') | src/compiler/mips/linkage-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 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 locations.Build(), // location_sig 227 locations.Build(), // location_sig
228 0, // js_parameter_count 228 0, // js_parameter_count
229 Operator::kNoProperties, // properties 229 Operator::kNoProperties, // properties
230 LinkageTraits::CCalleeSaveRegisters(), // callee-saved registers 230 LinkageTraits::CCalleeSaveRegisters(), // callee-saved registers
231 LinkageTraits::CCalleeSaveFPRegisters(), // callee-saved fp regs 231 LinkageTraits::CCalleeSaveFPRegisters(), // callee-saved fp regs
232 CallDescriptor::kNoFlags, // flags 232 CallDescriptor::kNoFlags, // flags
233 "c-call"); 233 "c-call");
234 } 234 }
235 235
236 static CallDescriptor* GetInterpreterDispatchDescriptor(Zone* zone) { 236 static CallDescriptor* GetInterpreterDispatchDescriptor(Zone* zone) {
237 MachineSignature::Builder types(zone, 0, 2); 237 MachineSignature::Builder types(zone, 0, 3);
238 LocationSignature::Builder locations(zone, 0, 2); 238 LocationSignature::Builder locations(zone, 0, 3);
239 239
240 // Add registers for fixed parameters passed via interpreter dispatch. 240 // Add registers for fixed parameters passed via interpreter dispatch.
241 STATIC_ASSERT(0 == Linkage::kInterpreterBytecodeParameter); 241 STATIC_ASSERT(0 == Linkage::kInterpreterBytecodeOffsetParameter);
242 types.AddParam(kMachPtr); 242 types.AddParam(kMachIntPtr);
243 locations.AddParam(regloc(LinkageTraits::InterpreterBytecodePointerReg())); 243 locations.AddParam(regloc(LinkageTraits::InterpreterBytecodeOffsetReg()));
244 244
245 STATIC_ASSERT(1 == Linkage::kInterpreterDispatchTableParameter); 245 STATIC_ASSERT(1 == Linkage::kInterpreterBytecodeArrayParameter);
246 types.AddParam(kMachAnyTagged);
247 locations.AddParam(regloc(LinkageTraits::InterpreterBytecodeArrayReg()));
248
249 STATIC_ASSERT(2 == Linkage::kInterpreterDispatchTableParameter);
246 types.AddParam(kMachPtr); 250 types.AddParam(kMachPtr);
247 locations.AddParam(regloc(LinkageTraits::InterpreterDispatchTableReg())); 251 locations.AddParam(regloc(LinkageTraits::InterpreterDispatchTableReg()));
248 252
249 LinkageLocation target_loc = LinkageLocation::AnyRegister(); 253 LinkageLocation target_loc = LinkageLocation::AnyRegister();
250 return new (zone) CallDescriptor( // -- 254 return new (zone) CallDescriptor( // --
251 CallDescriptor::kInterpreterDispatch, // kind 255 CallDescriptor::kInterpreterDispatch, // kind
252 kMachNone, // target MachineType 256 kMachNone, // target MachineType
253 target_loc, // target location 257 target_loc, // target location
254 types.Build(), // machine_sig 258 types.Build(), // machine_sig
255 locations.Build(), // location_sig 259 locations.Build(), // location_sig
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 int parameter_index = 1 + index; // skip index 0, which is the target. 326 int parameter_index = 1 + index; // skip index 0, which is the target.
323 return incoming_->GetInputLocation(parameter_index); 327 return incoming_->GetInputLocation(parameter_index);
324 } 328 }
325 } 329 }
326 330
327 } // namespace compiler 331 } // namespace compiler
328 } // namespace internal 332 } // namespace internal
329 } // namespace v8 333 } // namespace v8
330 334
331 #endif // V8_COMPILER_LINKAGE_IMPL_H_ 335 #endif // V8_COMPILER_LINKAGE_IMPL_H_
OLDNEW
« no previous file with comments | « src/compiler/linkage.h ('k') | src/compiler/mips/linkage-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698