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

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

Issue 1888353002: x64: Decode more objects for code view. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 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 | « no previous file | runtime/vm/instructions_x64.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/globals.h" // Needed here to get TARGET_ARCH_X64. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64.
6 #if defined(TARGET_ARCH_X64) 6 #if defined(TARGET_ARCH_X64)
7 7
8 #include "vm/assembler.h" 8 #include "vm/assembler.h"
9 #include "vm/code_patcher.h" 9 #include "vm/code_patcher.h"
10 #include "vm/cpu.h" 10 #include "vm/cpu.h"
(...skipping 17 matching lines...) Expand all
28 return true; 28 return true;
29 } 29 }
30 30
31 31
32 intptr_t IndexFromPPLoad(uword start) { 32 intptr_t IndexFromPPLoad(uword start) {
33 int32_t offset = *reinterpret_cast<int32_t*>(start); 33 int32_t offset = *reinterpret_cast<int32_t*>(start);
34 return ObjectPool::IndexFromOffset(offset); 34 return ObjectPool::IndexFromOffset(offset);
35 } 35 }
36 36
37 37
38 intptr_t IndexFromPPLoadDisp8(uword start) {
39 int8_t offset = *reinterpret_cast<int8_t*>(start);
40 return ObjectPool::IndexFromOffset(offset);
41 }
42
43
38 class UnoptimizedCall : public ValueObject { 44 class UnoptimizedCall : public ValueObject {
39 public: 45 public:
40 UnoptimizedCall(uword return_address, const Code& code) 46 UnoptimizedCall(uword return_address, const Code& code)
41 : object_pool_(ObjectPool::Handle(code.GetObjectPool())), 47 : object_pool_(ObjectPool::Handle(code.GetObjectPool())),
42 start_(return_address - kCallPatternSize) { 48 start_(return_address - kCallPatternSize) {
43 ASSERT((kCallPatternSize - 7) == Assembler::kCallExternalLabelSize); 49 ASSERT((kCallPatternSize - 7) == Assembler::kCallExternalLabelSize);
44 ASSERT(IsValid()); 50 ASSERT(IsValid());
45 } 51 }
46 52
47 static const int kCallPatternSize = 22; 53 static const int kCallPatternSize = 22;
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 NativeFunction* target) { 341 NativeFunction* target) {
336 ASSERT(code.ContainsInstructionAt(return_address)); 342 ASSERT(code.ContainsInstructionAt(return_address));
337 NativeCall call(return_address, code); 343 NativeCall call(return_address, code);
338 *target = call.native_function(); 344 *target = call.native_function();
339 return call.target(); 345 return call.target();
340 } 346 }
341 347
342 } // namespace dart 348 } // namespace dart
343 349
344 #endif // defined TARGET_ARCH_X64 350 #endif // defined TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/instructions_x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698