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

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

Issue 2750843003: Rename TARGET_OS_* to HOST_OS_*. (Closed)
Patch Set: DEPS Created 3 years, 9 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/snapshot.cc ('k') | runtime/vm/thread.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/stack_frame.h" 5 #include "vm/stack_frame.h"
6 6
7 #include "platform/memory_sanitizer.h" 7 #include "platform/memory_sanitizer.h"
8 #include "vm/assembler.h" 8 #include "vm/assembler.h"
9 #include "vm/deopt_instructions.h" 9 #include "vm/deopt_instructions.h"
10 #include "vm/isolate.h" 10 #include "vm/isolate.h"
11 #include "vm/object.h" 11 #include "vm/object.h"
12 #include "vm/object_store.h" 12 #include "vm/object_store.h"
13 #include "vm/os.h" 13 #include "vm/os.h"
14 #include "vm/parser.h" 14 #include "vm/parser.h"
15 #include "vm/raw_object.h" 15 #include "vm/raw_object.h"
16 #include "vm/reusable_handles.h" 16 #include "vm/reusable_handles.h"
17 #include "vm/stub_code.h" 17 #include "vm/stub_code.h"
18 #include "vm/visitor.h" 18 #include "vm/visitor.h"
19 19
20 namespace dart { 20 namespace dart {
21 21
22 22
23 bool StackFrame::IsStubFrame() const { 23 bool StackFrame::IsStubFrame() const {
24 ASSERT(!(IsEntryFrame() || IsExitFrame())); 24 ASSERT(!(IsEntryFrame() || IsExitFrame()));
25 #if !defined(TARGET_OS_WINDOWS) 25 #if !defined(HOST_OS_WINDOWS)
26 // On Windows, the profiler calls this from a separate thread where 26 // On Windows, the profiler calls this from a separate thread where
27 // Thread::Current() is NULL, so we cannot create a NoSafepointScope. 27 // Thread::Current() is NULL, so we cannot create a NoSafepointScope.
28 NoSafepointScope no_safepoint; 28 NoSafepointScope no_safepoint;
29 #endif 29 #endif
30 RawCode* code = GetCodeObject(); 30 RawCode* code = GetCodeObject();
31 ASSERT(code != Object::null()); 31 ASSERT(code != Object::null());
32 const intptr_t cid = code->ptr()->owner_->GetClassId(); 32 const intptr_t cid = code->ptr()->owner_->GetClassId();
33 ASSERT(cid == kNullCid || cid == kClassCid || cid == kFunctionCid); 33 ASSERT(cid == kNullCid || cid == kClassCid || cid == kFunctionCid);
34 return cid == kNullCid || cid == kClassCid; 34 return cid == kNullCid || cid == kClassCid;
35 } 35 }
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 return code.function(); 216 return code.function();
217 } 217 }
218 return Function::null(); 218 return Function::null();
219 } 219 }
220 220
221 221
222 RawCode* StackFrame::LookupDartCode() const { 222 RawCode* StackFrame::LookupDartCode() const {
223 // We add a no gc scope to ensure that the code below does not trigger 223 // We add a no gc scope to ensure that the code below does not trigger
224 // a GC as we are handling raw object references here. It is possible 224 // a GC as we are handling raw object references here. It is possible
225 // that the code is called while a GC is in progress, that is ok. 225 // that the code is called while a GC is in progress, that is ok.
226 #if !defined(TARGET_OS_WINDOWS) 226 #if !defined(HOST_OS_WINDOWS)
227 // On Windows, the profiler calls this from a separate thread where 227 // On Windows, the profiler calls this from a separate thread where
228 // Thread::Current() is NULL, so we cannot create a NoSafepointScope. 228 // Thread::Current() is NULL, so we cannot create a NoSafepointScope.
229 NoSafepointScope no_safepoint; 229 NoSafepointScope no_safepoint;
230 #endif 230 #endif
231 RawCode* code = GetCodeObject(); 231 RawCode* code = GetCodeObject();
232 if ((code != Code::null()) && 232 if ((code != Code::null()) &&
233 (code->ptr()->owner_->GetClassId() == kFunctionCid)) { 233 (code->ptr()->owner_->GetClassId() == kFunctionCid)) {
234 return code; 234 return code;
235 } 235 }
236 return Code::null(); 236 return Code::null();
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
583 StackFrameIterator frames(StackFrameIterator::kValidateFrames); 583 StackFrameIterator frames(StackFrameIterator::kValidateFrames);
584 StackFrame* frame = frames.NextFrame(); 584 StackFrame* frame = frames.NextFrame();
585 while (frame != NULL) { 585 while (frame != NULL) {
586 frame = frames.NextFrame(); 586 frame = frames.NextFrame();
587 } 587 }
588 } 588 }
589 #endif 589 #endif
590 590
591 591
592 } // namespace dart 592 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/snapshot.cc ('k') | runtime/vm/thread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698