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

Side by Side Diff: src/code-stubs.h

Issue 350293003: Cleanup CallInterfaceDescriptor (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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_CODE_STUBS_H_ 5 #ifndef V8_CODE_STUBS_H_
6 #define V8_CODE_STUBS_H_ 6 #define V8_CODE_STUBS_H_
7 7
8 #include "src/allocation.h" 8 #include "src/allocation.h"
9 #include "src/assembler.h" 9 #include "src/assembler.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 360
361 Address deoptimization_handler_; 361 Address deoptimization_handler_;
362 HandlerArgumentsMode handler_arguments_mode_; 362 HandlerArgumentsMode handler_arguments_mode_;
363 363
364 ExternalReference miss_handler_; 364 ExternalReference miss_handler_;
365 bool has_miss_handler_; 365 bool has_miss_handler_;
366 DISALLOW_COPY_AND_ASSIGN(CodeStubInterfaceDescriptor); 366 DISALLOW_COPY_AND_ASSIGN(CodeStubInterfaceDescriptor);
367 }; 367 };
368 368
369 369
370 struct PlatformCallInterfaceDescriptor; 370 class PlatformCallInterfaceDescriptor;
371 371
372 372
373 struct CallInterfaceDescriptor { 373 class CallInterfaceDescriptor {
374 public:
374 CallInterfaceDescriptor() 375 CallInterfaceDescriptor()
375 : register_param_count_(-1), 376 : register_param_count_(-1),
376 register_params_(NULL), 377 register_params_(NULL),
377 param_representations_(NULL), 378 param_representations_(NULL),
378 platform_specific_descriptor_(NULL) { } 379 platform_specific_descriptor_(NULL) { }
379 380
381 // A copy of the passed in registers and param_representations is made
382 // and owned by the CallInterfaceDescriptor.
383 void Initialize(int register_parameter_count, Register* registers,
384 Representation* param_representations,
385 PlatformCallInterfaceDescriptor* platform_descriptor = NULL);
386
380 bool initialized() const { return register_param_count_ >= 0; } 387 bool initialized() const { return register_param_count_ >= 0; }
381 388
382 int environment_length() const { 389 int environment_length() const {
383 return register_param_count_; 390 return register_param_count_;
384 } 391 }
385 392
386 Representation GetParameterRepresentation(int index) const { 393 Representation GetParameterRepresentation(int index) const {
387 return param_representations_[index]; 394 return param_representations_[index];
388 } 395 }
389 396
390 Register GetParameterRegister(int index) const { 397 Register GetParameterRegister(int index) const {
391 return register_params_[index]; 398 return register_params_[index];
392 } 399 }
393 400
394 PlatformCallInterfaceDescriptor* platform_specific_descriptor() const { 401 PlatformCallInterfaceDescriptor* platform_specific_descriptor() const {
395 return platform_specific_descriptor_; 402 return platform_specific_descriptor_;
396 } 403 }
397 404
405 private:
398 int register_param_count_; 406 int register_param_count_;
399 Register* register_params_; 407 SmartArrayPointer<Register> register_params_;
400 Representation* param_representations_; 408 SmartArrayPointer<Representation> param_representations_;
401 PlatformCallInterfaceDescriptor* platform_specific_descriptor_; 409 PlatformCallInterfaceDescriptor* platform_specific_descriptor_;
402 }; 410 };
403 411
404 412
405 class HydrogenCodeStub : public CodeStub { 413 class HydrogenCodeStub : public CodeStub {
406 public: 414 public:
407 enum InitializationState { 415 enum InitializationState {
408 UNINITIALIZED, 416 UNINITIALIZED,
409 INITIALIZED 417 INITIALIZED
410 }; 418 };
(...skipping 2109 matching lines...) Expand 10 before | Expand all | Expand 10 after
2520 2528
2521 2529
2522 class CallDescriptors { 2530 class CallDescriptors {
2523 public: 2531 public:
2524 static void InitializeForIsolate(Isolate* isolate); 2532 static void InitializeForIsolate(Isolate* isolate);
2525 }; 2533 };
2526 2534
2527 } } // namespace v8::internal 2535 } } // namespace v8::internal
2528 2536
2529 #endif // V8_CODE_STUBS_H_ 2537 #endif // V8_CODE_STUBS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698