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

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

Issue 2382953004: Revert "Lazy deopt without code patching." (Closed)
Patch Set: Created 4 years, 2 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/object.h ('k') | runtime/vm/raw_object.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 (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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/object.h" 5 #include "vm/object.h"
6 6
7 #include "include/dart_api.h" 7 #include "include/dart_api.h"
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "vm/assembler.h" 9 #include "vm/assembler.h"
10 #include "vm/become.h" 10 #include "vm/become.h"
(...skipping 14211 matching lines...) Expand 10 before | Expand all | Expand 10 after
14222 { 14222 {
14223 uword size = Code::InstanceSize(pointer_offsets_length); 14223 uword size = Code::InstanceSize(pointer_offsets_length);
14224 RawObject* raw = Object::Allocate(Code::kClassId, size, Heap::kOld); 14224 RawObject* raw = Object::Allocate(Code::kClassId, size, Heap::kOld);
14225 NoSafepointScope no_safepoint; 14225 NoSafepointScope no_safepoint;
14226 result ^= raw; 14226 result ^= raw;
14227 result.set_pointer_offsets_length(pointer_offsets_length); 14227 result.set_pointer_offsets_length(pointer_offsets_length);
14228 result.set_is_optimized(false); 14228 result.set_is_optimized(false);
14229 result.set_is_alive(false); 14229 result.set_is_alive(false);
14230 result.set_comments(Comments::New(0)); 14230 result.set_comments(Comments::New(0));
14231 result.set_compile_timestamp(0); 14231 result.set_compile_timestamp(0);
14232 result.set_lazy_deopt_return_pc_offset(kInvalidPc);
14233 result.set_lazy_deopt_throw_pc_offset(kInvalidPc);
14232 result.set_pc_descriptors(Object::empty_descriptors()); 14234 result.set_pc_descriptors(Object::empty_descriptors());
14233 } 14235 }
14234 return result.raw(); 14236 return result.raw();
14235 } 14237 }
14236 14238
14237 14239
14238 RawCode* Code::FinalizeCode(const char* name, 14240 RawCode* Code::FinalizeCode(const char* name,
14239 Assembler* assembler, 14241 Assembler* assembler,
14240 bool optimized) { 14242 bool optimized) {
14241 Isolate* isolate = Isolate::Current(); 14243 Isolate* isolate = Isolate::Current();
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
14535 // store buffer update is not needed here. 14537 // store buffer update is not needed here.
14536 StorePointer(&raw_ptr()->active_instructions_, instructions); 14538 StorePointer(&raw_ptr()->active_instructions_, instructions);
14537 StoreNonPointer(&raw_ptr()->entry_point_, 14539 StoreNonPointer(&raw_ptr()->entry_point_,
14538 Instructions::UncheckedEntryPoint(instructions)); 14540 Instructions::UncheckedEntryPoint(instructions));
14539 StoreNonPointer(&raw_ptr()->checked_entry_point_, 14541 StoreNonPointer(&raw_ptr()->checked_entry_point_,
14540 Instructions::CheckedEntryPoint(instructions)); 14542 Instructions::CheckedEntryPoint(instructions));
14541 #endif 14543 #endif
14542 } 14544 }
14543 14545
14544 14546
14547 uword Code::GetLazyDeoptReturnPc() const {
14548 return (lazy_deopt_return_pc_offset() != kInvalidPc)
14549 ? PayloadStart() + lazy_deopt_return_pc_offset() : 0;
14550 }
14551
14552
14553 uword Code::GetLazyDeoptThrowPc() const {
14554 return (lazy_deopt_throw_pc_offset() != kInvalidPc)
14555 ? PayloadStart() + lazy_deopt_throw_pc_offset() : 0;
14556 }
14557
14558
14545 RawStackmap* Code::GetStackmap( 14559 RawStackmap* Code::GetStackmap(
14546 uint32_t pc_offset, Array* maps, Stackmap* map) const { 14560 uint32_t pc_offset, Array* maps, Stackmap* map) const {
14547 // This code is used during iterating frames during a GC and hence it 14561 // This code is used during iterating frames during a GC and hence it
14548 // should not in turn start a GC. 14562 // should not in turn start a GC.
14549 NoSafepointScope no_safepoint; 14563 NoSafepointScope no_safepoint;
14550 if (stackmaps() == Array::null()) { 14564 if (stackmaps() == Array::null()) {
14551 // No stack maps are present in the code object which means this 14565 // No stack maps are present in the code object which means this
14552 // frame relies on tagged pointers. 14566 // frame relies on tagged pointers.
14553 return Stackmap::null(); 14567 return Stackmap::null();
14554 } 14568 }
(...skipping 8448 matching lines...) Expand 10 before | Expand all | Expand 10 after
23003 return UserTag::null(); 23017 return UserTag::null();
23004 } 23018 }
23005 23019
23006 23020
23007 const char* UserTag::ToCString() const { 23021 const char* UserTag::ToCString() const {
23008 const String& tag_label = String::Handle(label()); 23022 const String& tag_label = String::Handle(label());
23009 return tag_label.ToCString(); 23023 return tag_label.ToCString();
23010 } 23024 }
23011 23025
23012 } // namespace dart 23026 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/object.h ('k') | runtime/vm/raw_object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698