Skip to content

Commit 35b7014

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents 76fad39 + 5325baf commit 35b7014

File tree

5 files changed

+12
-10
lines changed

5 files changed

+12
-10
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
language: node_js
22
node_js:
3+
- node
34
- "11"
45
- "10"
56
- "8"

src/ir/data-layout.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ NAN_METHOD(DataLayoutWrapper::New) {
4747
return Nan::ThrowTypeError("DataLayout functionTemplate needs to be called with single string argument");
4848
}
4949

50-
llvm::DataLayout layout { ToString(info[0]->ToString()) };
50+
llvm::DataLayout layout { ToString(info[0]) };
5151
DataLayoutWrapper* wrapper = new DataLayoutWrapper { layout };
5252
wrapper->Wrap(info.This());
5353
info.GetReturnValue().Set(info.This());

src/ir/module.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ NAN_METHOD(ModuleWrapper::New) {
4747
return Nan::ThrowTypeError("The Module functionTemplate needs to be called with: (moduleId: string, context: LLVMContext)");
4848
}
4949

50-
auto moduleId = ToString(info[0]->ToString());
50+
auto moduleId = ToString(info[0]);
5151
auto* llvmContextWrapper = LLVMContextWrapper::FromValue(info[1]);
5252

5353
auto* moduleWrapper = new ModuleWrapper { llvm::StringRef { moduleId.c_str(), moduleId.length() },
@@ -98,12 +98,12 @@ NAN_METHOD(ModuleWrapper::getOrInsertFunction) {
9898
#if LLVM_VERSION_MAJOR < 9
9999
Nan::Set(functionCallee, Nan::New("callee").ToLocalChecked(), ConstantWrapper::of(module->getOrInsertFunction(name, fnType)));
100100
Nan::Set(functionCallee, Nan::New("functionType").ToLocalChecked(), FunctionTypeWrapper::of(fnType));
101-
#else
101+
#else
102102
auto llvmCallee = module->getOrInsertFunction(name, fnType);
103103
Nan::Set(functionCallee, Nan::New("callee").ToLocalChecked(), ValueWrapper::of(llvmCallee.getCallee()));
104104
Nan::Set(functionCallee, Nan::New("functionType").ToLocalChecked(), FunctionTypeWrapper::of(llvmCallee.getFunctionType()));
105105
#endif
106-
106+
107107
Nan::EscapableHandleScope scope {};
108108
info.GetReturnValue().Set(scope.Escape(functionCallee));
109109
}

src/support/target-registry.cc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,10 @@ NAN_METHOD(TargetRegistryWrapper::lookupTarget) {
2424
NAN_MODULE_INIT(TargetRegistryWrapper::Init) {
2525
v8::Local<v8::ObjectTemplate> tpl = Nan::New<v8::ObjectTemplate>();
2626
Nan::SetMethod(tpl, "lookupTarget", TargetRegistryWrapper::lookupTarget);
27-
28-
Nan::Set(target, Nan::New("TargetRegistry").ToLocalChecked(), tpl->NewInstance());
27+
28+
auto targetRegistry = Nan::NewInstance(tpl).ToLocalChecked();
29+
30+
Nan::Set(target, Nan::New("TargetRegistry").ToLocalChecked(), targetRegistry);
2931
}
3032

3133
//--------------------------------------------------------------

src/support/target-registry.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,12 @@
88

99
class TargetRegistryWrapper: public Nan::ObjectWrap, public FromValueMixin<TargetRegistryWrapper> {
1010
public:
11-
1211
static NAN_MODULE_INIT(Init);
1312

1413
private:
15-
static NAN_METHOD(lookupTarget);
14+
static NAN_METHOD(lookupTarget);
1615

17-
TargetRegistryWrapper() = delete;
16+
TargetRegistryWrapper() = delete;
1817
};
1918

2019
class TargetWrapper: public Nan::ObjectWrap, public FromValueMixin<TargetWrapper> {
@@ -35,4 +34,4 @@ class TargetWrapper: public Nan::ObjectWrap, public FromValueMixin<TargetWrapper
3534
static Nan::Persistent<v8::ObjectTemplate> target_template;
3635
};
3736

38-
#endif
37+
#endif

0 commit comments

Comments
 (0)