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

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

Issue 9242025: Enable remaining execution tests on x64. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 11 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 | « no previous file | runtime/vm/dart_api_impl_test.cc » ('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) 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 "include/dart_api.h" 5 #include "include/dart_api.h"
6 6
7 #include "vm/unit_test.h" 7 #include "vm/unit_test.h"
8 8
9 // Custom Isolate Test. 9 // Custom Isolate Test.
10 // 10 //
11 // This mid-size test uses the Dart Embedding Api to create a custom 11 // This mid-size test uses the Dart Embedding Api to create a custom
12 // isolate abstraction. Instead of having a dedicated thread for each 12 // isolate abstraction. Instead of having a dedicated thread for each
13 // isolate, as is the case normally, this implementation shares a 13 // isolate, as is the case normally, this implementation shares a
14 // single thread among the isolates using an event queue. 14 // single thread among the isolates using an event queue.
15 15
16 namespace dart { 16 namespace dart {
17 17
18 #if defined(TARGET_ARCH_IA32) // only ia32 can run execution tests. 18 // Only ia32 and x64 can run execution tests.
19 #if defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64)
19 20
20 static void native_echo(Dart_NativeArguments args); 21 static void native_echo(Dart_NativeArguments args);
21 static void CustomIsolateImpl_start(Dart_NativeArguments args); 22 static void CustomIsolateImpl_start(Dart_NativeArguments args);
22 static Dart_NativeFunction NativeLookup(Dart_Handle name, int argc); 23 static Dart_NativeFunction NativeLookup(Dart_Handle name, int argc);
23 24
24 25
25 static const char* kCustomIsolateScriptChars = 26 static const char* kCustomIsolateScriptChars =
26 "class GlobalsHack {\n" 27 "class GlobalsHack {\n"
27 " static ReceivePort _receivePort;\n" 28 " static ReceivePort _receivePort;\n"
28 "}\n" 29 "}\n"
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 delete event; 418 delete event;
418 event = event_queue->Get(); 419 event = event_queue->Get();
419 } 420 }
420 OS::Print("-- Finished event loop --\n"); 421 OS::Print("-- Finished event loop --\n");
421 EXPECT_STREQ("Received: 43", saved_echo); 422 EXPECT_STREQ("Received: 43", saved_echo);
422 free(const_cast<char*>(saved_echo)); 423 free(const_cast<char*>(saved_echo));
423 424
424 delete event_queue; 425 delete event_queue;
425 } 426 }
426 427
427 #endif // TARGET_ARCH_IA32. 428 #endif // defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64).
428 429
429 } // namespace dart 430 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/dart_api_impl_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698