mirror of
https://github.com/oven-sh/bun
synced 2026-02-20 07:42:30 +00:00
Don't allocate new "require" and "resolve" strings in CJS modules (#7162)
* Don't allocate new `"require"` and `"resolve"` strings in every CommonJS module * Use builtinNames more --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
This commit is contained in:
@@ -2,10 +2,10 @@
|
||||
|
||||
#include "CommonJSModuleRecord.h"
|
||||
#include "ImportMetaObject.h"
|
||||
#include <JavaScriptCore/JSBoundFunction.h>
|
||||
#include <JavaScriptCore/ObjectConstructor.h>
|
||||
#include "_NativeModule.h"
|
||||
#include "isBuiltinModule.h"
|
||||
#include <JavaScriptCore/JSBoundFunction.h>
|
||||
#include <JavaScriptCore/ObjectConstructor.h>
|
||||
|
||||
using namespace Zig;
|
||||
using namespace JSC;
|
||||
@@ -189,7 +189,7 @@ JSC_DEFINE_HOST_FUNCTION(jsFunctionNodeModuleCreateRequire,
|
||||
vm, globalObject, val)));
|
||||
}
|
||||
extern "C" JSC::EncodedJSValue Resolver__nodeModulePathsForJS(JSGlobalObject *,
|
||||
CallFrame *);
|
||||
CallFrame *);
|
||||
|
||||
JSC_DEFINE_HOST_FUNCTION(jsFunctionFindSourceMap,
|
||||
(JSGlobalObject * globalObject,
|
||||
|
||||
Reference in New Issue
Block a user