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

Side by Side Diff: src/mips/lithium-codegen-mips.h

Issue 252383005: MIPS: CodeStubs contain their corresponding Isolate* now. (part 1) (Closed) Base URL: https://github.com/v8/v8.git@gbl
Patch Set: Created 6 years, 7 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/mips/full-codegen-mips.cc ('k') | src/mips/lithium-codegen-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 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 405 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 public: 416 public:
417 PushSafepointRegistersScope(LCodeGen* codegen, 417 PushSafepointRegistersScope(LCodeGen* codegen,
418 Safepoint::Kind kind) 418 Safepoint::Kind kind)
419 : codegen_(codegen) { 419 : codegen_(codegen) {
420 ASSERT(codegen_->info()->is_calling()); 420 ASSERT(codegen_->info()->is_calling());
421 ASSERT(codegen_->expected_safepoint_kind_ == Safepoint::kSimple); 421 ASSERT(codegen_->expected_safepoint_kind_ == Safepoint::kSimple);
422 codegen_->expected_safepoint_kind_ = kind; 422 codegen_->expected_safepoint_kind_ = kind;
423 423
424 switch (codegen_->expected_safepoint_kind_) { 424 switch (codegen_->expected_safepoint_kind_) {
425 case Safepoint::kWithRegisters: { 425 case Safepoint::kWithRegisters: {
426 StoreRegistersStateStub stub1(kDontSaveFPRegs); 426 StoreRegistersStateStub stub1(codegen_->masm_->isolate(),
427 kDontSaveFPRegs);
427 codegen_->masm_->push(ra); 428 codegen_->masm_->push(ra);
428 codegen_->masm_->CallStub(&stub1); 429 codegen_->masm_->CallStub(&stub1);
429 break; 430 break;
430 } 431 }
431 case Safepoint::kWithRegistersAndDoubles: { 432 case Safepoint::kWithRegistersAndDoubles: {
432 StoreRegistersStateStub stub2(kSaveFPRegs); 433 StoreRegistersStateStub stub2(codegen_->masm_->isolate(),
434 kSaveFPRegs);
433 codegen_->masm_->push(ra); 435 codegen_->masm_->push(ra);
434 codegen_->masm_->CallStub(&stub2); 436 codegen_->masm_->CallStub(&stub2);
435 break; 437 break;
436 } 438 }
437 default: 439 default:
438 UNREACHABLE(); 440 UNREACHABLE();
439 } 441 }
440 } 442 }
441 443
442 ~PushSafepointRegistersScope() { 444 ~PushSafepointRegistersScope() {
443 Safepoint::Kind kind = codegen_->expected_safepoint_kind_; 445 Safepoint::Kind kind = codegen_->expected_safepoint_kind_;
444 ASSERT((kind & Safepoint::kWithRegisters) != 0); 446 ASSERT((kind & Safepoint::kWithRegisters) != 0);
445 switch (kind) { 447 switch (kind) {
446 case Safepoint::kWithRegisters: { 448 case Safepoint::kWithRegisters: {
447 RestoreRegistersStateStub stub1(kDontSaveFPRegs); 449 RestoreRegistersStateStub stub1(codegen_->masm_->isolate(),
450 kDontSaveFPRegs);
448 codegen_->masm_->push(ra); 451 codegen_->masm_->push(ra);
449 codegen_->masm_->CallStub(&stub1); 452 codegen_->masm_->CallStub(&stub1);
450 break; 453 break;
451 } 454 }
452 case Safepoint::kWithRegistersAndDoubles: { 455 case Safepoint::kWithRegistersAndDoubles: {
453 RestoreRegistersStateStub stub2(kSaveFPRegs); 456 RestoreRegistersStateStub stub2(codegen_->masm_->isolate(),
457 kSaveFPRegs);
454 codegen_->masm_->push(ra); 458 codegen_->masm_->push(ra);
455 codegen_->masm_->CallStub(&stub2); 459 codegen_->masm_->CallStub(&stub2);
456 break; 460 break;
457 } 461 }
458 default: 462 default:
459 UNREACHABLE(); 463 UNREACHABLE();
460 } 464 }
461 codegen_->expected_safepoint_kind_ = Safepoint::kSimple; 465 codegen_->expected_safepoint_kind_ = Safepoint::kSimple;
462 } 466 }
463 467
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 LCodeGen* codegen_; 502 LCodeGen* codegen_;
499 Label entry_; 503 Label entry_;
500 Label exit_; 504 Label exit_;
501 Label* external_exit_; 505 Label* external_exit_;
502 int instruction_index_; 506 int instruction_index_;
503 }; 507 };
504 508
505 } } // namespace v8::internal 509 } } // namespace v8::internal
506 510
507 #endif // V8_MIPS_LITHIUM_CODEGEN_MIPS_H_ 511 #endif // V8_MIPS_LITHIUM_CODEGEN_MIPS_H_
OLDNEW
« no previous file with comments | « src/mips/full-codegen-mips.cc ('k') | src/mips/lithium-codegen-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698