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

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

Issue 1458973002: Deal with missing deopt_table under precompilation. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 1 month 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 | « no previous file | 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) 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/cpu.h" 10 #include "vm/cpu.h"
(...skipping 13038 matching lines...) Expand 10 before | Expand all | Expand 10 after
13049 } 13049 }
13050 13050
13051 13051
13052 RawTypedData* Code::GetDeoptInfoAtPc(uword pc, 13052 RawTypedData* Code::GetDeoptInfoAtPc(uword pc,
13053 ICData::DeoptReasonId* deopt_reason, 13053 ICData::DeoptReasonId* deopt_reason,
13054 uint32_t* deopt_flags) const { 13054 uint32_t* deopt_flags) const {
13055 ASSERT(is_optimized()); 13055 ASSERT(is_optimized());
13056 const Instructions& instrs = Instructions::Handle(instructions()); 13056 const Instructions& instrs = Instructions::Handle(instructions());
13057 uword code_entry = instrs.EntryPoint(); 13057 uword code_entry = instrs.EntryPoint();
13058 const Array& table = Array::Handle(deopt_info_array()); 13058 const Array& table = Array::Handle(deopt_info_array());
13059 ASSERT(!table.IsNull()); 13059 if (table.IsNull()) {
13060 ASSERT(Dart::IsRunningPrecompiledCode());
13061 return TypedData::null();
13062 }
13060 // Linear search for the PC offset matching the target PC. 13063 // Linear search for the PC offset matching the target PC.
13061 intptr_t length = DeoptTable::GetLength(table); 13064 intptr_t length = DeoptTable::GetLength(table);
13062 Smi& offset = Smi::Handle(); 13065 Smi& offset = Smi::Handle();
13063 Smi& reason_and_flags = Smi::Handle(); 13066 Smi& reason_and_flags = Smi::Handle();
13064 TypedData& info = TypedData::Handle(); 13067 TypedData& info = TypedData::Handle();
13065 for (intptr_t i = 0; i < length; ++i) { 13068 for (intptr_t i = 0; i < length; ++i) {
13066 DeoptTable::GetEntry(table, i, &offset, &info, &reason_and_flags); 13069 DeoptTable::GetEntry(table, i, &offset, &info, &reason_and_flags);
13067 if (pc == (code_entry + offset.Value())) { 13070 if (pc == (code_entry + offset.Value())) {
13068 ASSERT(!info.IsNull()); 13071 ASSERT(!info.IsNull());
13069 *deopt_reason = DeoptTable::ReasonField::decode(reason_and_flags.Value()); 13072 *deopt_reason = DeoptTable::ReasonField::decode(reason_and_flags.Value());
(...skipping 8825 matching lines...) Expand 10 before | Expand all | Expand 10 after
21895 return tag_label.ToCString(); 21898 return tag_label.ToCString();
21896 } 21899 }
21897 21900
21898 21901
21899 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { 21902 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const {
21900 Instance::PrintJSONImpl(stream, ref); 21903 Instance::PrintJSONImpl(stream, ref);
21901 } 21904 }
21902 21905
21903 21906
21904 } // namespace dart 21907 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698