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

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

Issue 8851008: Add support for interrupting an isolate in the vm. Interrupts are (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 9 years 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
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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_IA32. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_IA32.
6 #if defined(TARGET_ARCH_IA32) 6 #if defined(TARGET_ARCH_IA32)
7 7
8 #include "vm/opt_code_generator.h" 8 #include "vm/opt_code_generator.h"
9 9
10 #include "vm/assembler_macros.h" 10 #include "vm/assembler_macros.h"
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 } 388 }
389 return false; 389 return false;
390 } 390 }
391 391
392 392
393 // Check for stack overflow. 393 // Check for stack overflow.
394 // Note that first 5 bytes may be patched with a jump. 394 // Note that first 5 bytes may be patched with a jump.
395 // TODO(srdjan): Add check that no object is inlined in the first 395 // TODO(srdjan): Add check that no object is inlined in the first
396 // 5 bytes (length of a jump instruction). 396 // 5 bytes (length of a jump instruction).
397 void OptimizingCodeGenerator::GeneratePreEntryCode() { 397 void OptimizingCodeGenerator::GeneratePreEntryCode() {
398 __ cmpl(ESP,
399 Address::Absolute(Isolate::Current()->stack_limit_address()));
400 __ j(BELOW_EQUAL, &StubCode::StackOverflowLabel());
401 } 398 }
402 399
403 400
404 void OptimizingCodeGenerator::CallDeoptimize(intptr_t node_id, 401 void OptimizingCodeGenerator::CallDeoptimize(intptr_t node_id,
405 intptr_t token_index) { 402 intptr_t token_index) {
406 __ call(&StubCode::DeoptimizeLabel()); 403 __ call(&StubCode::DeoptimizeLabel());
407 AddCurrentDescriptor(PcDescriptors::kOther, node_id, token_index); 404 AddCurrentDescriptor(PcDescriptors::kOther, node_id, token_index);
408 #if defined(DEBUG) 405 #if defined(DEBUG)
409 __ int3(); 406 __ int3();
410 #endif 407 #endif
(...skipping 2184 matching lines...) Expand 10 before | Expand all | Expand 10 after
2595 if (IsResultNeeded(node)) { 2592 if (IsResultNeeded(node)) {
2596 // The result is the input value. 2593 // The result is the input value.
2597 __ pushl(EAX); 2594 __ pushl(EAX);
2598 } 2595 }
2599 } 2596 }
2600 2597
2601 2598
2602 } // namespace dart 2599 } // namespace dart
2603 2600
2604 #endif // defined TARGET_ARCH_IA32 2601 #endif // defined TARGET_ARCH_IA32
OLDNEW
« runtime/vm/isolate.cc ('K') | « runtime/vm/isolate.cc ('k') | runtime/vm/stub_code.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698