Skip to content

Instantly share code, notes, and snippets.

@Zirak
Zirak / dragons.js
Last active October 26, 2024 20:14
typeof zInterval !== 'undefined' && clearInterval(zInterval);
var zInterval = setInterval(loop, 100);
var zState = Object.assign({
// TODO: Magical challenges
challengeCounter: 1,
// For tracking challenges and sigils
resetAt: null,
// For tracking hell
@Zirak
Zirak / tools.md
Created September 20, 2022 10:47
require('http').createServer((req, res) => {
if (req.url === '/1.js') {
setTimeout(() => {
res.write('console.log(1);');
res.end();
}, 10000);
}
if (req.url === '/2.js') {
res.write('console.log(2);');
res.end();
Running hooks: 35% (21/60) gn_linux64
________ running '/home/me/sources/chromium/py2-env/bin/python src/third_party/depot_tools/download_from_google_storage.py --no_resume --no_auth --bucket chromium-gn -s src/b
uildtools/linux64/gn.sha1' in '/home/me/sources/chromium'
Failed to fetch file gs://chromium-gn/ed8b2bc0617fee4ebd1d1a35e8a5bc168c4ca874 for src/buildtools/linux64/gn. [Err: [E2018-03-09T21:51:41.810089Z 8982 0 annotate.go:242] orig
inal error: package "infra/python/wheels/cffi/linux-amd64_cp32_abi3" is not registered
[E2018-03-09T21:51:41.810163Z 8982 0 annotate.go:242]
// Pop quiz! What gets logged?
var o = {
[console.log('before')]: 4,
foo: (function () {
console.log('nope :(');
throw 'nope'
})(),
[console.log('after')]: 4
@Zirak
Zirak / data.js
Last active October 9, 2017 13:08
var data = [{"owner":"towc","timestamp":"2017-10-08T13:03:00.000Z"},{"owner":"Zirak","timestamp":"2017-10-08T12:26:00.000Z"},{"owner":"danidee","timestamp":"2017-10-08T02:43:00.000Z"},{"owner":"Hatter is Mad","timestamp":"2017-10-07T22:48:00.000Z"},{"owner":"towc","timestamp":"2017-10-07T14:25:00.000Z"},{"owner":"towc","timestamp":"2017-10-06T23:40:00.000Z"},{"owner":"Kevin B","timestamp":"2017-10-06T21:52:00.000Z"},{"owner":"towc","timestamp":"2017-10-06T13:35:00.000Z"},{"owner":"towc","timestamp":"2017-10-06T13:31:00.000Z"},{"owner":"rlemon","timestamp":"2017-10-06T13:30:00.000Z"},{"owner":"little pootis","timestamp":"2017-10-06T05:41:00.000Z"},{"owner":"im1dermike","timestamp":"2017-10-05T20:21:00.000Z"},{"owner":"taco","timestamp":"2017-10-05T20:16:00.000Z"},{"owner":"towc","timestamp":"2017-10-05T20:14:00.000Z"},{"owner":"ssube","timestamp":"2017-10-05T20:13:00.000Z"},{"owner":"towc","timestamp":"2017-10-05T20:13:00.000Z"},{"owner":"towc","timestamp":"2017-10-05T20:11:00.000Z"},{"owner":"towc","timestamp
// prerequisites:
// $ npm i chrome-remote-interface
// $ chrome --headless --no-gpu --remote-debugging-port=9222
var fs = require('fs');
var repl = require('readline');
var util = require('util');
var cri = require('chrome-remote-interface');
diff --git a/src/ast/scopes.h b/src/ast/scopes.h
index 4e433d9..35930db 100644
--- a/src/ast/scopes.h
+++ b/src/ast/scopes.h
@@ -641,10 +641,7 @@ class V8_EXPORT_PRIVATE DeclarationScope : public Scope {
bool uses_super_property() const { return scope_uses_super_property_; }
bool NeedsHomeObject() const {
- return scope_uses_super_property_ ||
- (inner_scope_calls_eval_ && (IsConciseMethod(function_kind()) ||
diff --git a/src/ast/scopes.h b/src/ast/scopes.h
index ac3e948..60a182f 100644
--- a/src/ast/scopes.h
+++ b/src/ast/scopes.h
@@ -635,10 +635,7 @@ class DeclarationScope : public Scope {
bool uses_super_property() const { return scope_uses_super_property_; }
bool NeedsHomeObject() const {
- return scope_uses_super_property_ ||
- (inner_scope_calls_eval_ && (IsConciseMethod(function_kind()) ||
diff --git a/src/bootstrapper.cc b/src/bootstrapper.cc
index 95a7f41..9d3caf2 100644
--- a/src/bootstrapper.cc
+++ b/src/bootstrapper.cc
@@ -1679,6 +1679,8 @@ void Genesis::InitializeGlobal(Handle<JSGlobalObject> global_object,
InstallConstant(isolate, symbol_fun, "split", factory->split_symbol());
InstallConstant(isolate, symbol_fun, "toPrimitive",
factory->to_primitive_symbol());
+ InstallConstant(isolate, symbol_fun, "homeObject",
+ factory->home_object_symbol());