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

Side by Side Diff: runtime/vm/deopt_instructions.cc

Issue 1291543003: Revert "VM: Materialize stub pc-markers (smi 0) eagerly on deoptimization." (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: 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 | « runtime/vm/deferred_objects.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/deopt_instructions.h" 5 #include "vm/deopt_instructions.h"
6 6
7 #include "vm/assembler.h" 7 #include "vm/assembler.h"
8 #include "vm/code_patcher.h" 8 #include "vm/code_patcher.h"
9 #include "vm/compiler.h" 9 #include "vm/compiler.h"
10 #include "vm/intermediate_language.h" 10 #include "vm/intermediate_language.h"
(...skipping 633 matching lines...) Expand 10 before | Expand all | Expand 10 after
644 644
645 virtual intptr_t source_index() const { return object_table_index_; } 645 virtual intptr_t source_index() const { return object_table_index_; }
646 virtual DeoptInstr::Kind kind() const { return kPcMarker; } 646 virtual DeoptInstr::Kind kind() const { return kPcMarker; }
647 647
648 virtual const char* ArgumentsToCString() const { 648 virtual const char* ArgumentsToCString() const {
649 return Thread::Current()->zone()->PrintToString( 649 return Thread::Current()->zone()->PrintToString(
650 "%" Pd "", object_table_index_); 650 "%" Pd "", object_table_index_);
651 } 651 }
652 652
653 void Execute(DeoptContext* deopt_context, intptr_t* dest_addr) { 653 void Execute(DeoptContext* deopt_context, intptr_t* dest_addr) {
654 Function& function = Function::Handle(deopt_context->zone()); 654 *dest_addr = Smi::RawValue(0);
655 function ^= deopt_context->ObjectAt(object_table_index_);
656 if (function.IsNull()) {
657 // Callee's PC marker is not used (pc of Deoptimize stub). Set to 0.
658 *dest_addr = Smi::RawValue(0);
659 return;
660 }
661 deopt_context->DeferPcMarkerMaterialization( 655 deopt_context->DeferPcMarkerMaterialization(
662 object_table_index_, dest_addr); 656 object_table_index_, dest_addr);
663 } 657 }
664 658
665 private: 659 private:
666 intptr_t object_table_index_; 660 intptr_t object_table_index_;
667 661
668 DISALLOW_COPY_AND_ASSIGN(DeoptPcMarkerInstr); 662 DISALLOW_COPY_AND_ASSIGN(DeoptPcMarkerInstr);
669 }; 663 };
670 664
(...skipping 629 matching lines...) Expand 10 before | Expand all | Expand 10 after
1300 Smi* offset, 1294 Smi* offset,
1301 TypedData* info, 1295 TypedData* info,
1302 Smi* reason) { 1296 Smi* reason) {
1303 intptr_t i = index * kEntrySize; 1297 intptr_t i = index * kEntrySize;
1304 *offset ^= table.At(i); 1298 *offset ^= table.At(i);
1305 *info ^= table.At(i + 1); 1299 *info ^= table.At(i + 1);
1306 *reason ^= table.At(i + 2); 1300 *reason ^= table.At(i + 2);
1307 } 1301 }
1308 1302
1309 } // namespace dart 1303 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/deferred_objects.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698