This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
uv_run | |
- uv__update_time(): Update time with millisecond precision. | |
- uv__run_timers(): Loop through "heap" and run timers whose timeout > time. | |
- uv__run_pending(): Run all callbacks on the pending_queue. Remove each item | |
from the queue when run. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/deps/v8/src/codegen.cc b/deps/v8/src/codegen.cc | |
index 6b12d64..a24220d 100644 | |
--- a/deps/v8/src/codegen.cc | |
+++ b/deps/v8/src/codegen.cc | |
@@ -190,7 +190,7 @@ void CodeGenerator::PrintCode(Handle<Code> code, CompilationInfo* info) { | |
function->end_position() - function->start_position() + 1; | |
for (int i = 0; i < source_len; i++) { | |
if (stream.HasMore()) { | |
- os << AsUC16(stream.GetNext()); | |
+ os << AsReversiblyEscapedUC16(stream.GetNext()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Distance is in 100nm segments. Will be rounding values in order to keep them | |
// in integer space. Hopefully no values exceed +/-2^53. | |
var D = 1e7; | |
var G = 9.80665 * D; | |
// Amount of time to calculate for. | |
var T = 10; | |
// Number of segments to divide time (60 fps). | |
var S = 60 * T; | |
// Initial velocity in m/sec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/domain.js b/lib/domain.js | |
index afaa922..39e90f4 100644 | |
--- a/lib/domain.js | |
+++ b/lib/domain.js | |
@@ -33,7 +33,11 @@ var endMethods = ['end', 'abort', 'destroy', 'destroySoon']; | |
events.usingDomains = true; | |
// let the process know we're using domains | |
-process._usingDomains(); | |
+// The return value let's us know whether --abort-on-uncaught-exception was |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var dgram = require('dgram'); | |
var fork = require('child_process').fork; | |
var PORT = 7845; | |
var ITER = 1e4; | |
var MS = 100; | |
var SHUTDOWN = 1000 * 60; | |
var cntr = 0; | |
if (process.argv[2] === 'child') { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var async_wrap = process.binding('async_wrap'); | |
var b = {}; | |
function initHook() { | |
this._asyncQueue = {}; | |
} | |
function preHook() { | |
throw new Error('preHook'); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/haywire/http_server.c b/src/haywire/http_server.c | |
index 6f18b9b..3591aca 100644 | |
--- a/src/haywire/http_server.c | |
+++ b/src/haywire/http_server.c | |
@@ -78,6 +78,7 @@ void free_http_connection(http_connection* connection) | |
free_http_request(connection->request); | |
} | |
+ free(connection->thread); | |
free(connection); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Compiled with | |
* clang -pthread -fno-omit-frame-pointer -Wall -g -fstrict-aliasing -O3 \ | |
* -o sem-bounce sem-bounce.c libuv.a -Iuv/include | |
*/ | |
#include "uv.h" | |
#define ITER 1e6 | |
static uv_thread_t thread; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var smalloc = require('smalloc'); | |
var uid = 0; | |
function MemStruct() { | |
this._id = 0; // 4 bytes (uint32) | |
this._address = 1; // 4 bytes (uint32) | |
this._data = 2; // 8 bytes (uint64) | |
var size = 4; | |
smalloc.alloc(size, this, smalloc.Types.Uint32); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function reblaze(vals, fn) { | |
if (typeof fn !== 'function') | |
throw new TypeError('fn should be a function'); | |
// V8 will automatically throw if vals is not an object. | |
var keys = Object.keys(vals); | |
var regexp; | |
var fn_name = fn.name; |