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

Side by Side Diff: vm/isolate.cc

Issue 10544170: Have the stack overflow code use the correct stack size set by the platform/thread.h (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « vm/isolate.h ('k') | 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/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 "lib/mirrors.h" 9 #include "lib/mirrors.h"
10 #include "vm/compiler_stats.h" 10 #include "vm/compiler_stats.h"
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 const char* kFormat = "%s-%lld"; 247 const char* kFormat = "%s-%lld";
248 intptr_t len = OS::SNPrint(NULL, 0, kFormat, name_prefix, main_port()) + 1; 248 intptr_t len = OS::SNPrint(NULL, 0, kFormat, name_prefix, main_port()) + 1;
249 name_ = new char[len]; 249 name_ = new char[len];
250 OS::SNPrint(name_, len, kFormat, name_prefix, main_port()); 250 OS::SNPrint(name_, len, kFormat, name_prefix, main_port());
251 } 251 }
252 252
253 253
254 // TODO(5411455): Use flag to override default value and Validate the 254 // TODO(5411455): Use flag to override default value and Validate the
255 // stack size by querying OS. 255 // stack size by querying OS.
256 uword Isolate::GetSpecifiedStackSize() { 256 uword Isolate::GetSpecifiedStackSize() {
257 uword stack_size = Isolate::kDefaultStackSize - Isolate::kStackSizeBuffer; 257 ASSERT(Isolate::kStackSizeBuffer < Thread::GetMaxStackSize());
258 uword stack_size = Thread::GetMaxStackSize() - Isolate::kStackSizeBuffer;
258 return stack_size; 259 return stack_size;
259 } 260 }
260 261
261 262
262 void Isolate::SetStackLimitFromCurrentTOS(uword stack_top_value) { 263 void Isolate::SetStackLimitFromCurrentTOS(uword stack_top_value) {
263 SetStackLimit(stack_top_value - GetSpecifiedStackSize()); 264 SetStackLimit(stack_top_value - GetSpecifiedStackSize());
264 } 265 }
265 266
266 267
267 void Isolate::SetStackLimit(uword limit) { 268 void Isolate::SetStackLimit(uword limit) {
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
464 465
465 466
466 void Isolate::VisitWeakPersistentHandles(HandleVisitor* visitor, 467 void Isolate::VisitWeakPersistentHandles(HandleVisitor* visitor,
467 bool visit_prologue_weak_handles) { 468 bool visit_prologue_weak_handles) {
468 if (api_state() != NULL) { 469 if (api_state() != NULL) {
469 api_state()->VisitWeakHandles(visitor, visit_prologue_weak_handles); 470 api_state()->VisitWeakHandles(visitor, visit_prologue_weak_handles);
470 } 471 }
471 } 472 }
472 473
473 } // namespace dart 474 } // namespace dart
OLDNEW
« no previous file with comments | « vm/isolate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698