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

Side by Side Diff: runtime/bin/eventhandler_macos.cc

Issue 10962026: Avoid needless int64_t to intptr_t conversion in eventhandler. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 3 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 | « runtime/bin/eventhandler_macos.h ('k') | runtime/bin/eventhandler_win.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 "bin/eventhandler.h" 5 #include "bin/eventhandler.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 #include <pthread.h> 8 #include <pthread.h>
9 #include <stdio.h> 9 #include <stdio.h>
10 #include <string.h> 10 #include <string.h>
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 } 398 }
399 399
400 400
401 void EventHandlerImplementation::Shutdown() { 401 void EventHandlerImplementation::Shutdown() {
402 SendData(kShutdownId, 0, 0); 402 SendData(kShutdownId, 0, 0);
403 } 403 }
404 404
405 405
406 void EventHandlerImplementation::SendData(intptr_t id, 406 void EventHandlerImplementation::SendData(intptr_t id,
407 Dart_Port dart_port, 407 Dart_Port dart_port,
408 intptr_t data) { 408 int64_t data) {
409 WakeupHandler(id, dart_port, data); 409 WakeupHandler(id, dart_port, data);
410 } 410 }
411 411
412 412
413 void* EventHandlerImplementation::GetHashmapKeyFromFd(intptr_t fd) { 413 void* EventHandlerImplementation::GetHashmapKeyFromFd(intptr_t fd) {
414 // The hashmap does not support keys with value 0. 414 // The hashmap does not support keys with value 0.
415 return reinterpret_cast<void*>(fd + 1); 415 return reinterpret_cast<void*>(fd + 1);
416 } 416 }
417 417
418 418
419 uint32_t EventHandlerImplementation::GetHashmapHashFromFd(intptr_t fd) { 419 uint32_t EventHandlerImplementation::GetHashmapHashFromFd(intptr_t fd) {
420 // The hashmap does not support keys with value 0. 420 // The hashmap does not support keys with value 0.
421 return dart::Utils::WordHash(fd + 1); 421 return dart::Utils::WordHash(fd + 1);
422 } 422 }
OLDNEW
« no previous file with comments | « runtime/bin/eventhandler_macos.h ('k') | runtime/bin/eventhandler_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698