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

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

Issue 104663004: Preview of a first step towards unification of hydrogen calls (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Merge fix Created 6 years, 11 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
« no previous file with comments | « src/arm/macro-assembler-arm.cc ('k') | src/hydrogen.h » ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 312
313 ExternalReference miss_handler() { 313 ExternalReference miss_handler() {
314 ASSERT(has_miss_handler_); 314 ASSERT(has_miss_handler_);
315 return miss_handler_; 315 return miss_handler_;
316 } 316 }
317 317
318 bool has_miss_handler() { 318 bool has_miss_handler() {
319 return has_miss_handler_; 319 return has_miss_handler_;
320 } 320 }
321 321
322 Register GetParameterRegister(int index) { 322 Register GetParameterRegister(int index) const {
323 return register_params_[index]; 323 return register_params_[index];
324 } 324 }
325 325
326 bool IsParameterCountRegister(int index) { 326 bool IsParameterCountRegister(int index) {
327 return GetParameterRegister(index).is(stack_parameter_count_); 327 return GetParameterRegister(index).is(stack_parameter_count_);
328 } 328 }
329 329
330 int GetHandlerParameterCount() { 330 int GetHandlerParameterCount() {
331 int params = environment_length(); 331 int params = environment_length();
332 if (handler_arguments_mode_ == PASS_ARGUMENTS) { 332 if (handler_arguments_mode_ == PASS_ARGUMENTS) {
333 params += 1; 333 params += 1;
334 } 334 }
335 return params; 335 return params;
336 } 336 }
337 337
338 private: 338 private:
339 ExternalReference miss_handler_; 339 ExternalReference miss_handler_;
340 bool has_miss_handler_; 340 bool has_miss_handler_;
341 }; 341 };
342 342
343 343
344 struct PlatformCallInterfaceDescriptor;
345
346
347 struct CallInterfaceDescriptor {
348 CallInterfaceDescriptor()
349 : register_param_count_(-1),
350 register_params_(NULL),
351 param_representations_(NULL),
352 platform_specific_descriptor_(NULL) { }
353
354 bool initialized() const { return register_param_count_ >= 0; }
355
356 int environment_length() const {
357 return register_param_count_;
358 }
359
360 Representation GetParameterRepresentation(int index) const {
361 return param_representations_[index];
362 }
363
364 Register GetParameterRegister(int index) const {
365 return register_params_[index];
366 }
367
368 PlatformCallInterfaceDescriptor* platform_specific_descriptor() const {
369 return platform_specific_descriptor_;
370 }
371
372 int register_param_count_;
373 Register* register_params_;
374 Representation* param_representations_;
375 PlatformCallInterfaceDescriptor* platform_specific_descriptor_;
376 };
377
378
344 class HydrogenCodeStub : public CodeStub { 379 class HydrogenCodeStub : public CodeStub {
345 public: 380 public:
346 enum InitializationState { 381 enum InitializationState {
347 UNINITIALIZED, 382 UNINITIALIZED,
348 INITIALIZED 383 INITIALIZED
349 }; 384 };
350 385
351 explicit HydrogenCodeStub(InitializationState state = INITIALIZED) { 386 explicit HydrogenCodeStub(InitializationState state = INITIALIZED) {
352 is_uninitialized_ = (state == UNINITIALIZED); 387 is_uninitialized_ = (state == UNINITIALIZED);
353 } 388 }
(...skipping 2071 matching lines...) Expand 10 before | Expand all | Expand 10 after
2425 Isolate* isolate); 2460 Isolate* isolate);
2426 2461
2427 Major MajorKey() { return ProfileEntryHook; } 2462 Major MajorKey() { return ProfileEntryHook; }
2428 int MinorKey() { return 0; } 2463 int MinorKey() { return 0; }
2429 2464
2430 void Generate(MacroAssembler* masm); 2465 void Generate(MacroAssembler* masm);
2431 2466
2432 DISALLOW_COPY_AND_ASSIGN(ProfileEntryHookStub); 2467 DISALLOW_COPY_AND_ASSIGN(ProfileEntryHookStub);
2433 }; 2468 };
2434 2469
2470
2471 class CallDescriptors {
2472 public:
2473 static void InitializeForIsolate(Isolate* isolate);
2474 };
2475
2435 } } // namespace v8::internal 2476 } } // namespace v8::internal
2436 2477
2437 #endif // V8_CODE_STUBS_H_ 2478 #endif // V8_CODE_STUBS_H_
OLDNEW
« no previous file with comments | « src/arm/macro-assembler-arm.cc ('k') | src/hydrogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698