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

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

Issue 1270803003: VM: More abstract interface for generating stub calls. (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/intermediate_language_x64.cc ('k') | runtime/vm/native_arguments.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) 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/isolate.h" 5 #include "vm/isolate.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 "platform/json.h" 9 #include "platform/json.h"
10 #include "vm/code_observers.h" 10 #include "vm/code_observers.h"
(...skipping 826 matching lines...) Expand 10 before | Expand all | Expand 10 after
837 837
838 void Isolate::InitializeStackLimit() { 838 void Isolate::InitializeStackLimit() {
839 SetStackLimitFromStackBase(Isolate::GetCurrentStackPointer()); 839 SetStackLimitFromStackBase(Isolate::GetCurrentStackPointer());
840 } 840 }
841 841
842 842
843 /* static */ 843 /* static */
844 uword Isolate::GetCurrentStackPointer() { 844 uword Isolate::GetCurrentStackPointer() {
845 // Since AddressSanitizer's detect_stack_use_after_return instruments the 845 // Since AddressSanitizer's detect_stack_use_after_return instruments the
846 // C++ code to give out fake stack addresses, we call a stub in that case. 846 // C++ code to give out fake stack addresses, we call a stub in that case.
847 uword (*func)() = 847 uword (*func)() = reinterpret_cast<uword (*)()>(
848 reinterpret_cast<uword (*)()>(StubCode::GetStackPointerEntryPoint()); 848 StubCode::GetStackPointer_entry()->EntryPoint());
849 // But for performance (and to support simulators), we normally use a local. 849 // But for performance (and to support simulators), we normally use a local.
850 #if defined(__has_feature) 850 #if defined(__has_feature)
851 #if __has_feature(address_sanitizer) 851 #if __has_feature(address_sanitizer)
852 uword current_sp = func(); 852 uword current_sp = func();
853 return current_sp; 853 return current_sp;
854 #else 854 #else
855 uword stack_allocated_local_address = reinterpret_cast<uword>(&func); 855 uword stack_allocated_local_address = reinterpret_cast<uword>(&func);
856 return stack_allocated_local_address; 856 return stack_allocated_local_address;
857 #endif 857 #endif
858 #else 858 #else
(...skipping 1310 matching lines...) Expand 10 before | Expand all | Expand 10 after
2169 serialized_message_, serialized_message_len_); 2169 serialized_message_, serialized_message_len_);
2170 } 2170 }
2171 2171
2172 2172
2173 void IsolateSpawnState::Cleanup() { 2173 void IsolateSpawnState::Cleanup() {
2174 SwitchIsolateScope switch_scope(I); 2174 SwitchIsolateScope switch_scope(I);
2175 Dart::ShutdownIsolate(); 2175 Dart::ShutdownIsolate();
2176 } 2176 }
2177 2177
2178 } // namespace dart 2178 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language_x64.cc ('k') | runtime/vm/native_arguments.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698