summaryrefslogtreecommitdiffstats
path: root/js/src/wasm
diff options
context:
space:
mode:
authorjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-03-19 15:47:10 +0100
committerjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-03-19 15:47:10 +0100
commit5ef44cf6484b9dfd49c0174ac2969a29587a1bbd (patch)
treeef1e8a83106f6b54504dbe3b29554ef7b349a1bb /js/src/wasm
parent6822460d3b0d4609ee5d4e1ab4b093799ed06580 (diff)
downloadUXP-5ef44cf6484b9dfd49c0174ac2969a29587a1bbd.tar
UXP-5ef44cf6484b9dfd49c0174ac2969a29587a1bbd.tar.gz
UXP-5ef44cf6484b9dfd49c0174ac2969a29587a1bbd.tar.lz
UXP-5ef44cf6484b9dfd49c0174ac2969a29587a1bbd.tar.xz
UXP-5ef44cf6484b9dfd49c0174ac2969a29587a1bbd.zip
Part 1: Implement ES6 function name property semantics
Issue #78
Diffstat (limited to 'js/src/wasm')
-rw-r--r--js/src/wasm/AsmJS.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/js/src/wasm/AsmJS.cpp b/js/src/wasm/AsmJS.cpp
index d2f331bf1..b4f41c3d5 100644
--- a/js/src/wasm/AsmJS.cpp
+++ b/js/src/wasm/AsmJS.cpp
@@ -679,7 +679,7 @@ FunctionObject(ParseNode* fn)
static inline PropertyName*
FunctionName(ParseNode* fn)
{
- if (JSAtom* name = FunctionObject(fn)->name())
+ if (JSAtom* name = FunctionObject(fn)->explicitName())
return name->asPropertyName();
return nullptr;
}
@@ -8037,7 +8037,7 @@ TryInstantiate(JSContext* cx, CallArgs args, Module& module, const AsmJSMetadata
static bool
HandleInstantiationFailure(JSContext* cx, CallArgs args, const AsmJSMetadata& metadata)
{
- RootedAtom name(cx, args.callee().as<JSFunction>().name());
+ RootedAtom name(cx, args.callee().as<JSFunction>().explicitName());
if (cx->isExceptionPending())
return false;
@@ -8128,7 +8128,7 @@ InstantiateAsmJS(JSContext* cx, unsigned argc, JS::Value* vp)
static JSFunction*
NewAsmJSModuleFunction(ExclusiveContext* cx, JSFunction* origFun, HandleObject moduleObj)
{
- RootedAtom name(cx, origFun->name());
+ RootedAtom name(cx, origFun->explicitName());
JSFunction::Flags flags = origFun->isLambda() ? JSFunction::ASMJS_LAMBDA_CTOR
: JSFunction::ASMJS_CTOR;
@@ -8846,7 +8846,7 @@ js::AsmJSModuleToString(JSContext* cx, HandleFunction fun, bool addParenToLambda
if (!out.append("function "))
return nullptr;
- if (fun->name() && !out.append(fun->name()))
+ if (fun->explicitName() && !out.append(fun->explicitName()))
return nullptr;
bool haveSource = source->hasSourceData();
@@ -8894,8 +8894,8 @@ js::AsmJSFunctionToString(JSContext* cx, HandleFunction fun)
if (!haveSource) {
// asm.js functions can't be anonymous
- MOZ_ASSERT(fun->name());
- if (!out.append(fun->name()))
+ MOZ_ASSERT(fun->explicitName());
+ if (!out.append(fun->explicitName()))
return nullptr;
if (!out.append("() {\n [sourceless code]\n}"))
return nullptr;