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
import "./mod_a.js"; | |
await 0; | |
import "./mod_b.js"; | |
const React = { | |
createElement(...args) { console.log(this, ...args); return new String("ReactElement"); } | |
}; | |
const foo = (...args) => { console.log(this, ...args); return "FooEl"; }; | |
console.log(<foo>a ${111} {222} $c</foo>); | |
console.log("bar"); |
This file has been truncated, but you can view the full file.
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
#!/bin/sh | |
# This script generates multi-size .ico files from the highly stylized "simple" | |
# Deno logos, designed by HashRock. | |
# The complication stems from the fact the the dimensions of the original .png | |
# files is 252x252 pixels. Naively rescaling these images to 256x256 or any | |
# other power of 2 produces ugly artifacts. | |
# Note that the output of the black-and-white logo transformation isn't |
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
const resources = { | |
"/": file("text/html")` | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<script type="module" src="main.js"></script> | |
</head> | |
<body> | |
<p>Open developer tools. There will be nothing to see here.</p> |
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
// Capture - remove by function pointer and data | |
void AddGCPrologueCallback(GCCallbackWithData callback, void* data = nullptr, GCType gc_type_filter = kGCTypeAll); | |
void RemoveGCPrologueCallback(GCCallbackWithData, void* data = nullptr); | |
void AddGCEpilogueCallback(GCCallbackWithData callback, void* data = nullptr, GCType gc_type_filter = kGCTypeAll); | |
void RemoveGCEpilogueCallback(GCCallbackWithData callback, void* data = nullptr); | |
void AddMicrotasksCompletedCallback(MicrotasksCompletedCallbackWithData callback, void* data = nullptr); | |
void RemoveMicrotasksCompletedCallback(MicrotasksCompletedCallbackWithData callback, void* data = nullptr) = 0; |
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
First number is the size (in bytes) of the stack frame. The largest frames are on top. | |
+ 60480 0x000000B1E05AD690 frame #77: 0x00007ff6b6e7fd44 deno.exe`union core::result::Result<swc_ecma_ast::module::ModuleItem, swc_common::errors::diagnostic_builder::DiagnosticBuilder> swc_ecma_parser::parser::Parser<swc_ecma_parser::parser::input::Capturing<swc_ecma_parser::lexer::Lexer<swc_common::input::SourceFileInput>>>::parse_stmt_like<swc_ecma_parser::parser::input::Capturing<swc_ecma_parser::lexer::Lexer<swc_common::input::SourceFileInput>>,swc_ecma_ast::module::ModuleItem>(self=0x000000b1e05b00d0, include_decl=true, top_level=true) at stmt.rs:82 | |
+ 60480 0x000000B1E055F110 frame #48: 0x00007ff6b6e7f784 deno.exe`union core::result::Result<swc_ecma_ast::stmt::Stmt, swc_common::errors::diagnostic_builder::DiagnosticBuilder> swc_ecma_parser::parser::Parser<swc_ecma_parser::parser::input::Capturing<swc_ecma_parser::lexer::Lexer<swc_common::input::SourceFileInput>>>::parse_stmt_like<swc_ecma_parser::parser::input: |
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
D:\deno2\tests>..\target\debug\deno -A --reload main.js | |
Compile file:///D:/deno2/tests/subdir/mod2.ts | |
Compile file:///D:/deno2/tests/subdir/mismatch_ext.ts | |
Compile file:///D:/deno2/tests/subdir/mod1.ts | |
Download https://raw.githubusercontent.com/denoland/deno/v0.0.1/package.json | |
error: Uncaught Error: An error | |
► file:///D:/deno2/tests/subdir/throws.js:5:7 | |
5 throw new Error("An error"); | |
^ |
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
async function try_import(url) { | |
let status; | |
try { | |
await import(url); | |
status = "OK"; | |
} catch (err) { | |
status = err.name; | |
} | |
status = status.padEnd(12); | |
return status + url; |
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
So here's the things to consider: | |
* Do not preallocate a read buffer per socket. | |
Either use polling or use a shared buffer pool. | |
* Avoid statefulnews, e.g: | |
- In windows, you can't use multiple completion ports with a handle. | |
- On unix, a socket is either in blocking or non-blocking mode | |
This creates problems when you want to share a handle with other processes | |
or between threads. For example, you might want to switch stdout to | |
non-blocking, but if stdout was inherited and shared with the parent | |
process, the parent process might not expect this and crash or malfunction. |
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
use std::collections::HashMap; | |
use std::sync::Mutex; | |
#[macro_use] | |
extern crate lazy_static; | |
struct CoreOp {} // Placeholder. | |
struct FlatBuffer {} // Placeholder. | |
struct PinnedBuf {} // Placeholder. |
NewerOlder