[wasm] [cleanup] Avoid shouting WASM

This CL removes most occurences of "WASM" from outputs and comments in
the code. They are replaced either by "WebAssembly" or (especially in
comments) "wasm". These are the spellings officially proposed on
http://webassembly.org/.

R=ahaas@chromium.org
BUG=v8:6474

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: Id39fa5e25591678263745a4eab266db546e65983
Reviewed-on: https://chromium-review.googlesource.com/529085
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45824}
This commit is contained in:
Clemens Hammacher 2017-06-09 14:21:52 +02:00 committed by Commit Bot
parent e5a4275d8c
commit be1135132a
35 changed files with 80 additions and 80 deletions

View File

@ -6237,7 +6237,7 @@ typedef void (*FailedAccessCheckCallback)(Local<Object> target,
*/
typedef bool (*AllowCodeGenerationFromStringsCallback)(Local<Context> context);
// --- WASM compilation callbacks ---
// --- WebAssembly compilation callbacks ---
typedef bool (*ExtensionCallback)(const FunctionCallbackInfo<Value>&);
// --- Callback for APIs defined on v8-supported objects, but implemented

View File

@ -690,7 +690,7 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction(
ArchOpcode arch_opcode = ArchOpcodeField::decode(opcode);
switch (arch_opcode) {
case kArchCallCodeObject: {
// We must not share code targets for calls to builtins for WASM code, as
// We must not share code targets for calls to builtins for wasm code, as
// they might need to be patched individually.
internal::Assembler::BlockCodeTargetSharingScope scope;
if (info()->IsWasm()) scope.Open(masm());
@ -711,7 +711,7 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction(
}
case kArchTailCallCodeObjectFromJSFunction:
case kArchTailCallCodeObject: {
// We must not share code targets for calls to builtins for WASM code, as
// We must not share code targets for calls to builtins for wasm code, as
// they might need to be patched individually.
internal::Assembler::BlockCodeTargetSharingScope scope;
if (info()->IsWasm()) scope.Open(masm());

View File

@ -289,7 +289,7 @@ void Int64Lowering::LowerNode(Node* node) {
break;
}
case IrOpcode::kCall: {
// TODO(turbofan): Make WASM code const-correct wrt. CallDescriptor.
// TODO(turbofan): Make wasm code const-correct wrt. CallDescriptor.
CallDescriptor* descriptor =
const_cast<CallDescriptor*>(CallDescriptorOf(node->op()));
if (DefaultLowering(node) ||

View File

@ -112,7 +112,7 @@ class PipelineData {
is_asm_ = info->shared_info()->asm_function();
}
// For WASM compile entry point.
// For WebAssembly compile entry point.
PipelineData(ZoneStats* zone_stats, CompilationInfo* info, JSGraph* jsgraph,
PipelineStatistics* pipeline_statistics,
SourcePositionTable* source_positions,
@ -706,7 +706,7 @@ PipelineWasmCompilationJob::ExecuteJobImpl() {
pipeline_.RunPrintAndVerify("Machine", true);
if (FLAG_wasm_opt) {
PipelineData* data = &data_;
PipelineRunScope scope(data, "WASM optimization");
PipelineRunScope scope(data, "Wasm optimization");
JSGraphReducer graph_reducer(data->jsgraph(), scope.zone());
DeadCodeElimination dead_code_elimination(&graph_reducer, data->graph(),
data->common());

View File

@ -811,7 +811,7 @@ void SimdScalarLowering::LowerNode(Node* node) {
break;
}
case IrOpcode::kCall: {
// TODO(turbofan): Make WASM code const-correct wrt. CallDescriptor.
// TODO(turbofan): Make wasm code const-correct wrt. CallDescriptor.
CallDescriptor* descriptor =
const_cast<CallDescriptor*>(CallDescriptorOf(node->op()));
if (DefaultLowering(node) ||

View File

@ -2115,8 +2115,6 @@ Node* WasmGraphBuilder::BuildDiv64Call(Node* left, Node* right,
Node* call = BuildCCall(sig_builder.Build(), args);
// TODO(wasm): This can get simpler if we have a specialized runtime call to
// throw WASM exceptions by trap code instead of by string.
ZeroCheck32(static_cast<wasm::TrapReason>(trap_zero), call, position);
TrapIfEq32(wasm::kTrapDivUnrepresentable, call, -1, position);
const Operator* load_op = jsgraph()->machine()->Load(result_type);
@ -2634,7 +2632,7 @@ void WasmGraphBuilder::BuildJSToWasmWrapper(Handle<Code> wasm_code,
int pos = 0;
args[pos++] = HeapConstant(wasm_code);
// Convert JS parameters to WASM numbers.
// Convert JS parameters to wasm numbers.
for (int i = 0; i < wasm_count; ++i) {
Node* param = Param(i + 1);
Node* wasm_param = FromJS(param, context, sig->GetParam(i));
@ -2644,7 +2642,7 @@ void WasmGraphBuilder::BuildJSToWasmWrapper(Handle<Code> wasm_code,
args[pos++] = *effect_;
args[pos++] = *control_;
// Call the WASM code.
// Call the wasm code.
CallDescriptor* desc =
wasm::ModuleEnv::GetWasmCallDescriptor(jsgraph()->zone(), sig);
@ -2662,7 +2660,7 @@ void WasmGraphBuilder::BuildJSToWasmWrapper(Handle<Code> wasm_code,
int WasmGraphBuilder::AddParameterNodes(Node** args, int pos, int param_count,
wasm::FunctionSig* sig) {
// Convert WASM numbers to JS values.
// Convert wasm numbers to JS values.
int param_index = 0;
for (int i = 0; i < param_count; ++i) {
Node* param = Param(param_index++);
@ -2721,7 +2719,7 @@ void WasmGraphBuilder::BuildWasmToJSWrapper(Handle<JSReceiver> target,
desc = Linkage::GetJSCallDescriptor(
graph()->zone(), false, wasm_count + 1, CallDescriptor::kNoFlags);
// Convert WASM numbers to JS values.
// Convert wasm numbers to JS values.
pos = AddParameterNodes(args, pos, wasm_count, sig);
args[pos++] = jsgraph()->UndefinedConstant(); // new target
@ -2748,7 +2746,7 @@ void WasmGraphBuilder::BuildWasmToJSWrapper(Handle<JSReceiver> target,
callable.descriptor(), wasm_count + 1,
CallDescriptor::kNoFlags);
// Convert WASM numbers to JS values.
// Convert wasm numbers to JS values.
pos = AddParameterNodes(args, pos, wasm_count, sig);
// The native_context is sufficient here, because all kind of callables
@ -3036,7 +3034,7 @@ Node* WasmGraphBuilder::LoadMem(wasm::ValueType type, MachineType memtype,
wasm::WasmCodePosition position) {
Node* load;
// WASM semantics throw on OOB. Introduce explicit bounds check.
// Wasm semantics throw on OOB. Introduce explicit bounds check.
if (!FLAG_wasm_trap_handler || !V8_TRAP_HANDLER_SUPPORTED) {
BoundsCheckMem(memtype, index, offset, position);
}
@ -3088,7 +3086,7 @@ Node* WasmGraphBuilder::StoreMem(MachineType memtype, Node* index,
wasm::WasmCodePosition position) {
Node* store;
// WASM semantics throw on OOB. Introduce explicit bounds check.
// Wasm semantics throw on OOB. Introduce explicit bounds check.
if (!FLAG_wasm_trap_handler || !V8_TRAP_HANDLER_SUPPORTED) {
BoundsCheckMem(memtype, index, offset, position);
}
@ -3605,7 +3603,7 @@ static void RecordFunctionCompilation(CodeEventListener::LogEventsAndTags tag,
Handle<String> name_str =
isolate->factory()->NewStringFromAsciiChecked(buffer.start());
Handle<String> script_str =
isolate->factory()->NewStringFromAsciiChecked("(WASM)");
isolate->factory()->NewStringFromAsciiChecked("(wasm)");
Handle<SharedFunctionInfo> shared =
isolate->factory()->NewSharedFunctionInfo(name_str, code, false);
PROFILE(isolate, CodeCreateEvent(tag, AbstractCode::cast(*code), *shared,
@ -3972,10 +3970,10 @@ void WasmCompilationUnit::ExecuteCompilation() {
void WasmCompilationUnit::ExecuteCompilationInternal() {
if (FLAG_trace_wasm_compiler) {
if (func_name_.start() != nullptr) {
PrintF("Compiling WASM function %d:'%.*s'\n\n", func_index(),
PrintF("Compiling wasm function %d:'%.*s'\n\n", func_index(),
func_name_.length(), func_name_.start());
} else {
PrintF("Compiling WASM function %d:<unnamed>\n\n", func_index());
PrintF("Compiling wasm function %d:<unnamed>\n\n", func_index());
}
}
@ -4032,10 +4030,10 @@ Handle<Code> WasmCompilationUnit::FinishCompilation(
ScopedVector<char> buffer(128);
if (func_name_.start() == nullptr) {
SNPrintF(buffer,
"Compiling WASM function #%d:%.*s failed:", func_index_,
"Compiling wasm function #%d:%.*s failed:", func_index_,
func_name_.length(), func_name_.start());
} else {
SNPrintF(buffer, "Compiling WASM function #%d failed:", func_index_);
SNPrintF(buffer, "Compiling wasm function #%d failed:", func_index_);
}
thrower->CompileFailed(buffer.start(), graph_construction_result_);
}

View File

@ -31,7 +31,7 @@ class SourcePositionTable;
} // namespace compiler
namespace wasm {
// Forward declarations for some WASM data structures.
// Forward declarations for some wasm data structures.
struct ModuleBytesEnv;
struct ModuleEnv;
struct WasmFunction;
@ -94,7 +94,7 @@ class WasmCompilationUnit final {
DISALLOW_COPY_AND_ASSIGN(WasmCompilationUnit);
};
// Wraps a JS function, producing a code object that can be called from WASM.
// Wraps a JS function, producing a code object that can be called from wasm.
Handle<Code> CompileWasmToJSWrapper(Isolate* isolate, Handle<JSReceiver> target,
wasm::FunctionSig* sig, uint32_t index,
Handle<String> module_name,
@ -112,8 +112,8 @@ Handle<Code> CompileWasmInterpreterEntry(Isolate* isolate, uint32_t func_index,
wasm::FunctionSig* sig,
Handle<WasmInstanceObject> instance);
// Abstracts details of building TurboFan graph nodes for WASM to separate
// the WASM decoder from the internal details of TurboFan.
// Abstracts details of building TurboFan graph nodes for wasm to separate
// the wasm decoder from the internal details of TurboFan.
class WasmTrapHelper;
typedef ZoneVector<Node*> NodeVector;
class WasmGraphBuilder {

View File

@ -16,7 +16,7 @@
namespace v8 {
namespace internal {
// TODO(titzer): this should not be in the WASM namespace.
// TODO(titzer): this should not be in the wasm namespace.
namespace wasm {
using compiler::LocationSignature;
@ -301,7 +301,7 @@ CallDescriptor* ModuleEnv::GetWasmCallDescriptor(Zone* zone,
const RegList kCalleeSaveRegisters = 0;
const RegList kCalleeSaveFPRegisters = 0;
// The target for WASM calls is always a code object.
// The target for wasm calls is always a code object.
MachineType target_type = MachineType::AnyTagged();
LinkageLocation target_loc = LinkageLocation::ForAnyRegister(target_type);

View File

@ -1078,7 +1078,7 @@ void Debug::PrepareStep(StepAction step_action) {
// and deoptimize every frame along the way.
bool in_current_frame = true;
for (; !frames_it.done(); frames_it.Advance()) {
// TODO(clemensh): Implement stepping out from JS to WASM.
// TODO(clemensh): Implement stepping out from JS to wasm.
if (frames_it.frame()->is_wasm()) continue;
JavaScriptFrame* frame = JavaScriptFrame::cast(frames_it.frame());
if (last_step_action() == StepIn) {
@ -1107,7 +1107,7 @@ void Debug::PrepareStep(StepAction step_action) {
thread_local_.target_frame_count_ = current_frame_count;
// Fall through.
case StepIn:
// TODO(clemensh): Implement stepping from JS into WASM.
// TODO(clemensh): Implement stepping from JS into wasm.
FloodWithOneShot(shared);
break;
}

View File

@ -531,11 +531,11 @@ DEFINE_NEG_IMPLICATION(minimal, opt)
DEFINE_NEG_IMPLICATION(minimal, use_ic)
// Flags for native WebAssembly.
DEFINE_BOOL(expose_wasm, true, "expose WASM interface to JavaScript")
DEFINE_BOOL(expose_wasm, true, "expose wasm interface to JavaScript")
DEFINE_BOOL(assume_asmjs_origin, false,
"force wasm decoder to assume input is internal asm-wasm format")
DEFINE_BOOL(wasm_disable_structured_cloning, false,
"disable WASM structured cloning")
"disable wasm structured cloning")
DEFINE_INT(wasm_num_compilation_tasks, 10,
"number of parallel compilation tasks for wasm")
DEFINE_BOOL(wasm_async_compilation, false,
@ -551,8 +551,8 @@ DEFINE_BOOL(trace_wasm_decode_time, false, "trace decoding time of wasm code")
DEFINE_BOOL(trace_wasm_compiler, false, "trace compiling of wasm code")
DEFINE_BOOL(trace_wasm_interpreter, false, "trace interpretation of wasm code")
DEFINE_INT(trace_wasm_ast_start, 0,
"start function for WASM AST trace (inclusive)")
DEFINE_INT(trace_wasm_ast_end, 0, "end function for WASM AST trace (exclusive)")
"start function for wasm AST trace (inclusive)")
DEFINE_INT(trace_wasm_ast_end, 0, "end function for wasm AST trace (exclusive)")
DEFINE_UINT(skip_compiling_wasm_funcs, 0, "start compiling at function N")
DEFINE_BOOL(wasm_break_on_decoder_error, false,
"debug break when wasm decoder encounters an error")
@ -566,7 +566,7 @@ DEFINE_BOOL(trace_asm_scanner, false,
DEFINE_BOOL(trace_asm_parser, false, "verbose logging of asm.js parse failures")
DEFINE_BOOL(stress_validate_asm, false, "try to validate everything as asm.js")
DEFINE_BOOL(dump_wasm_module, false, "dump WASM module bytes")
DEFINE_BOOL(dump_wasm_module, false, "dump wasm module bytes")
DEFINE_STRING(dump_wasm_module_path, NULL, "directory to dump wasm modules to")
DEFINE_INT(typed_array_max_size_in_heap, 64,

View File

@ -1588,7 +1588,8 @@ class JavaScriptFrameIterator BASE_EMBEDDED {
};
// NOTE: The stack trace frame iterator is an iterator that only traverse proper
// JavaScript frames that have proper JavaScript functions and WASM frames.
// JavaScript frames that have proper JavaScript functions and WebAssembly
// frames.
class StackTraceFrameIterator BASE_EMBEDDED {
public:
explicit StackTraceFrameIterator(Isolate* isolate);

View File

@ -439,9 +439,9 @@ RUNTIME_FUNCTION(Runtime_CheckWasmWrapperElision) {
// It takes two parameters, the first one is the JSFunction,
// The second one is the type
CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0);
// If type is 0, it means that it is supposed to be a direct call into a WASM
// function
// If type is 1, it means that it is supposed to have wrappers
// If type is 0, it means that it is supposed to be a direct call into a wasm
// function.
// If type is 1, it means that it is supposed to have wrappers.
CONVERT_ARG_HANDLE_CHECKED(Smi, type, 1);
Handle<Code> export_code = handle(function->code());
CHECK(export_code->kind() == Code::JS_TO_WASM_FUNCTION);
@ -472,8 +472,8 @@ RUNTIME_FUNCTION(Runtime_CheckWasmWrapperElision) {
}
}
CHECK(count == 1);
// check the type of the imported exported function, it should be also a WASM
// function in our case
// Check the type of the imported exported function, it should be also a wasm
// function in our case.
Handle<Code> imported_fct;
CHECK(type->value() == 0 || type->value() == 1);

View File

@ -601,7 +601,7 @@ class WasmDecoder : public Decoder {
static const int32_t kNullCatch = -1;
// The full WASM decoder for bytecode. Verifies bytecode and, optionally,
// The full wasm decoder for bytecode. Verifies bytecode and, optionally,
// generates a TurboFan IR graph.
class WasmFullDecoder : public WasmDecoder {
public:

View File

@ -501,8 +501,8 @@ Handle<Code> CompileImportWrapper(Isolate* isolate, int index, FunctionSig* sig,
WasmFunction* other_func = GetWasmFunctionForImportWrapper(isolate, target);
if (other_func) {
if (!sig->Equals(other_func->sig)) return Handle<Code>::null();
// Signature matched. Unwrap the JS->WASM wrapper and return the raw
// WASM function code.
// Signature matched. Unwrap the import wrapper and return the raw wasm
// function code.
return UnwrapImportWrapper(target);
}
// No wasm function or being debugged. Compile a new wrapper for the new
@ -657,7 +657,7 @@ MaybeHandle<WasmModuleObject> ModuleCompiler::CompileToModuleObjectInternal(
isolate_->debug()->OnAfterCompile(script);
}
// Compile JS->WASM wrappers for exported functions.
// Compile JS->wasm wrappers for exported functions.
JSToWasmWrapperCache js_to_wasm_cache;
int func_index = 0;
for (auto exp : module->export_table) {
@ -782,7 +782,7 @@ MaybeHandle<WasmInstanceObject> InstanceBuilder::Build() {
// Avoid creating too many handles in the outer scope.
HandleScope scope(isolate_);
// Clone the code for WASM functions and exports.
// Clone the code for wasm functions and exports.
for (int i = 0; i < code_table->length(); ++i) {
Handle<Code> orig_code(Code::cast(code_table->get(i)), isolate_);
switch (orig_code->kind()) {
@ -1352,7 +1352,7 @@ int InstanceBuilder::ProcessImports(Handle<FixedArray> code_table,
WasmFunction* function =
GetWasmFunctionForImportWrapper(isolate_, val);
if (function == nullptr) {
thrower_->LinkError("table import %d[%d] is not a WASM function",
thrower_->LinkError("table import %d[%d] is not a wasm function",
index, i);
return -1;
}
@ -1793,7 +1793,7 @@ void InstanceBuilder::LoadTableSegments(Handle<FixedArray> code_table,
if (!all_dispatch_tables.is_null()) {
if (js_wrappers_[func_index].is_null()) {
// No JSFunction entry yet exists for this function. Create one.
// TODO(titzer): We compile JS->WASM wrappers for functions are
// TODO(titzer): We compile JS->wasm wrappers for functions are
// not exported but are in an exported table. This should be done
// at module compile time and cached instead.
@ -2257,7 +2257,7 @@ class AsyncCompileJob::FinishCompile : public SyncCompileTask {
job_->isolate_, shared, job_->code_table_, job_->function_tables_,
job_->signature_tables_);
// Finish the WASM script now and make it public to the debugger.
// Finish the wasm script now and make it public to the debugger.
script->set_wasm_compiled_module(*job_->compiled_module_);
job_->isolate_->debug()->OnAfterCompile(script);
@ -2270,12 +2270,12 @@ class AsyncCompileJob::FinishCompile : public SyncCompileTask {
};
//==========================================================================
// Step 6 (sync): Compile JS->WASM wrappers.
// Step 6 (sync): Compile JS->wasm wrappers.
//==========================================================================
class AsyncCompileJob::CompileWrappers : public SyncCompileTask {
void RunImpl() override {
TRACE_COMPILE("(6) Compile wrappers...\n");
// Compile JS->WASM wrappers for exported functions.
// Compile JS->wasm wrappers for exported functions.
HandleScope scope(job_->isolate_);
JSToWasmWrapperCache js_to_wasm_cache;
int func_index = 0;

View File

@ -107,7 +107,7 @@ uint32_t consume_string(Decoder& decoder, uint32_t* length, bool validate_utf8,
return offset;
}
// An iterator over the sections in a WASM binary module.
// An iterator over the sections in a wasm binary module.
// Automatically skips all unknown sections.
class WasmSectionIterator {
public:
@ -950,7 +950,7 @@ class ModuleDecoder : public Decoder {
menv->wire_bytes.GetNameOrNull(function));
if (FLAG_trace_wasm_decoder || FLAG_trace_wasm_decode_time) {
OFStream os(stdout);
os << "Verifying WASM function " << func_name << std::endl;
os << "Verifying wasm function " << func_name << std::endl;
}
FunctionBody body = {
function->sig, start_,

View File

@ -59,7 +59,7 @@ struct AsmJsOffsetEntry {
typedef std::vector<std::vector<AsmJsOffsetEntry>> AsmJsOffsets;
typedef Result<AsmJsOffsets> AsmJsOffsetsResult;
// Decodes the bytes of a WASM module between {module_start} and {module_end}.
// Decodes the bytes of a wasm module between {module_start} and {module_end}.
V8_EXPORT_PRIVATE ModuleResult DecodeWasmModule(
Isolate* isolate, const byte* module_start, const byte* module_end,
bool verify_functions, ModuleOrigin origin, bool is_sync = true);
@ -70,7 +70,7 @@ V8_EXPORT_PRIVATE FunctionSig* DecodeWasmSignatureForTesting(Zone* zone,
const byte* start,
const byte* end);
// Decodes the bytes of a WASM function between
// Decodes the bytes of a wasm function between
// {function_start} and {function_end}.
V8_EXPORT_PRIVATE FunctionResult DecodeWasmFunction(
Isolate* isolate, Zone* zone, ModuleBytesEnv* env,

View File

@ -137,7 +137,7 @@ class InterpretedFrame {
DISALLOW_COPY_AND_ASSIGN(InterpretedFrame);
};
// An interpreter capable of executing WASM.
// An interpreter capable of executing WebAssembly.
class V8_EXPORT_PRIVATE WasmInterpreter {
public:
// State machine for a Thread:

View File

@ -10,7 +10,8 @@
namespace v8 {
namespace internal {
// Exposes a WASM API to JavaScript through the V8 API.
// Exposes a WebAssembly API to JavaScript through the V8 API.
class WasmJs {
public:
V8_EXPORT_PRIVATE static void Install(Isolate* isolate);

View File

@ -882,7 +882,7 @@ Handle<Code> wasm::CompileLazy(Isolate* isolate) {
Handle<FixedArray> exp_deopt_data;
int func_index = -1;
if (lazy_compile_code->deoptimization_data()->length() > 0) {
// Then it's an indirect call or via JS->WASM wrapper.
// Then it's an indirect call or via JS->wasm wrapper.
DCHECK_LE(2, lazy_compile_code->deoptimization_data()->length());
exp_deopt_data = handle(lazy_compile_code->deoptimization_data(), isolate);
auto* weak_cell = WeakCell::cast(exp_deopt_data->get(0));

View File

@ -70,7 +70,7 @@ struct WasmInitExpr {
}
};
// Static representation of a WASM function.
// Static representation of a wasm function.
struct WasmFunction {
FunctionSig* sig; // signature of the function.
uint32_t func_index; // index into the function table.
@ -119,7 +119,7 @@ struct WasmTableInit {
std::vector<uint32_t> entries;
};
// Static representation of a WASM import.
// Static representation of a wasm import.
struct WasmImport {
uint32_t module_name_length; // length in bytes of the module name.
uint32_t module_name_offset; // offset in module bytes of the module name.
@ -129,7 +129,7 @@ struct WasmImport {
uint32_t index; // index into the respective space.
};
// Static representation of a WASM export.
// Static representation of a wasm export.
struct WasmExport {
uint32_t name_length; // length in bytes of the exported name.
uint32_t name_offset; // offset in module bytes of the name to export.
@ -200,7 +200,7 @@ struct V8_EXPORT_PRIVATE WasmModule {
typedef Managed<WasmModule> WasmModuleWrapper;
// An instantiated WASM module, including memory, function table, etc.
// An instantiated wasm module, including memory, function table, etc.
struct WasmInstance {
const WasmModule* module; // static representation of the module.
// -- Heap allocated --------------------------------------------------------

View File

@ -162,7 +162,7 @@ class WasmInstanceObject : public JSObject {
uint32_t GetMaxMemoryPages();
};
// Representation of an exported WASM function.
// Representation of an exported wasm function.
class WasmExportedFunction : public JSFunction {
public:
// The 0-th field is used by the Blink Wrapper Tracer.

View File

@ -287,7 +287,7 @@
##############################################################################
['arch == mips or arch == mipsel or arch == mips64 or arch == mips64el', {
# For now skip WASM SIMD tests that fail when MSA instr. extension is not
# For now skip wasm SIMD tests that fail when MSA instr. extension is not
# available (currently simd-scalar-lowering mechanism doesn't work properly
# for all SIMD operations)
'test-run-wasm-simd/*': [SKIP],

View File

@ -46,7 +46,7 @@ CallDescriptor* GetCallDescriptor(Zone* zone, int return_count,
const RegList kCalleeSaveRegisters = 0;
const RegList kCalleeSaveFPRegisters = 0;
// The target for WASM calls is always a code object.
// The target for wasm calls is always a code object.
MachineType target_type = MachineType::AnyTagged();
LinkageLocation target_loc = LinkageLocation::ForAnyRegister();
return new (zone) CallDescriptor( // --

View File

@ -423,7 +423,7 @@ bool SkipFPValue(float x) {
(abs_x < kSmallFloatThreshold || abs_x > kLargeFloatThreshold);
}
// Skip tests where the expected value is a NaN, since our WASM test code
// Skip tests where the expected value is a NaN, since our wasm test code
// doesn't handle NaNs. Also skip extreme values.
bool SkipFPExpectedValue(float x) { return std::isnan(x) || SkipFPValue(x); }

View File

@ -74,7 +74,7 @@ void CheckExceptionInfos(Handle<Object> exc,
} // namespace
// Call from JS to WASM to JS and throw an Error from JS.
// Call from JS to wasm to JS and throw an Error from JS.
TEST(CollectDetailedWasmStack_ExplicitThrowFromJs) {
WasmRunner<void> r(kExecuteCompiled);
TestSignatures sigs;
@ -119,7 +119,7 @@ TEST(CollectDetailedWasmStack_ExplicitThrowFromJs) {
CheckExceptionInfos(maybe_exc.ToHandleChecked(), expected_exceptions);
}
// Trigger a trap in WASM, stack should be JS -> WASM -> WASM.
// Trigger a trap in wasm, stack should be JS -> wasm -> wasm.
TEST(CollectDetailedWasmStack_WasmError) {
TestSignatures sigs;
WasmRunner<int> r(kExecuteCompiled);

View File

@ -503,7 +503,7 @@ class WasmFunctionWrapper : private GraphAndBuilders {
Signature<MachineType>* signature_;
};
// A helper for compiling WASM functions for testing.
// A helper for compiling wasm functions for testing.
// It contains the internal state for compilation (i.e. TurboFan graph) and
// interpretation (by adding to the interpreter manually).
class WasmFunctionCompiler : private GraphAndBuilders {

View File

@ -35,7 +35,7 @@ std::unique_ptr<WasmModule> DecodeWasmModuleForTesting(
if (decoding_result.failed()) {
// Module verification failed. throw.
thrower->CompileError("WASM.compileRun() failed: %s",
thrower->CompileError("DecodeWasmModule failed: %s",
decoding_result.error_msg().c_str());
}
@ -187,7 +187,7 @@ int32_t CallWasmFunctionForTesting(Isolate* isolate, Handle<JSObject> instance,
// The result should be a number.
if (retval.is_null()) {
thrower->RuntimeError("WASM.compileRun() failed: Invocation was null");
thrower->RuntimeError("Calling exported wasm function failed.");
return -1;
}
Handle<Object> result = retval.ToHandleChecked();
@ -198,7 +198,7 @@ int32_t CallWasmFunctionForTesting(Isolate* isolate, Handle<JSObject> instance,
return static_cast<int32_t>(HeapNumber::cast(*result)->value());
}
thrower->RuntimeError(
"WASM.compileRun() failed: Return value should be number");
"Calling exported wasm function failed: Return value should be number");
return -1;
}

View File

@ -1,5 +1,5 @@
Tests call stack in wasm scripts
Running testFunction with generated WASM bytes...
Running testFunction with generated wasm bytes...
Paused on 'debugger;'
Number of frames: 5
- [0] {"functionName":"call_debugger","function_lineNumber":1,"function_columnNumber":24,"lineNumber":2,"columnNumber":4}

View File

@ -46,7 +46,7 @@ contextGroup.addScript(testFunction.toString());
Protocol.Debugger.enable();
Protocol.Debugger.onPaused(handleDebuggerPaused);
InspectorTest.log('Running testFunction with generated WASM bytes...');
InspectorTest.log('Running testFunction with generated wasm bytes...');
Protocol.Runtime.evaluate(
{'expression': 'testFunction(' + JSON.stringify(module_bytes) + ')'});

View File

@ -4,7 +4,7 @@
// Flags: --allow-natives-syntax --validate-asm
// Compilation limits for WASM are not enforced for asm->wasm.
// Compilation limits for wasm are not enforced for asm->wasm.
%SetWasmCompileControls(0, false);
function AsmModule() {

View File

@ -9,7 +9,7 @@ load("test/mjsunit/wasm/wasm-module-builder.js");
function run(f) {
// wrap the creation in a closure so that the only thing returned is
// the module (i.e. the underlying array buffer of WASM wire bytes dies).
// the module (i.e. the underlying array buffer of wasm wire bytes dies).
var module = (() => {
var builder = new WasmModuleBuilder();
builder.addImport("mod", "the_name_of_my_import", kSig_i_i);

View File

@ -338,7 +338,7 @@ function checkStack(stack, expected_lines) {
this.i = i;
}
// We call WASM -> func 1 -> WASM -> func2.
// We call wasm -> func 1 -> wasm -> func2.
// func2 throws, func 1 catches.
function func1() {
try {
@ -369,7 +369,7 @@ function checkStack(stack, expected_lines) {
(function testInterpreterGC() {
function run(f) {
// wrap the creation in a closure so that the only thing returned is
// the module (i.e. the underlying array buffer of WASM wire bytes dies).
// the module (i.e. the underlying array buffer of wasm wire bytes dies).
var module = (() => {
var builder = new WasmModuleBuilder();
var imp = builder.addImport('mod', 'the_name_of_my_import', kSig_i_i);

View File

@ -60,7 +60,7 @@ var mem_oob_func = builder.addFunction(undefined, kSig_i_v)
.addBody([kExprI32Const, 0x7f, kExprI32LoadMem8S, 0, 0])
.exportAs("mem_out_of_bounds");
// Call the mem_out_of_bounds function, in order to have two WASM stack frames.
// Call the mem_out_of_bounds function, in order to have two wasm stack frames.
builder.addFunction("call_mem_out_of_bounds", kSig_i_v)
.addBody([kExprCallFunction, mem_oob_func.index])
.exportAs("call_mem_out_of_bounds");

View File

@ -133,7 +133,7 @@ struct ValueTypePair {
class WasmModuleVerifyTest : public TestWithIsolateAndZone {
public:
ModuleResult DecodeModule(const byte* module_start, const byte* module_end) {
// Add the WASM magic and version number automatically.
// Add the wasm magic and version number automatically.
size_t size = static_cast<size_t>(module_end - module_start);
byte header[] = {WASM_MODULE_HEADER};
size_t total = sizeof(header) + size;

View File

@ -24,7 +24,7 @@ mkdir -p test/fuzzer/wasm_asmjs_corpus
./tools/run-tests.py -j8 --variants=default --timeout=10 --arch=x64 \
--mode=release --no-presubmit --extra-flags="--dump-wasm-module \
--dump-wasm-module-path=./test/fuzzer/wasm_asmjs_corpus/" mjsunit/asm/*
# WASM
# wasm
./tools/run-tests.py -j8 --variants=default --timeout=10 --arch=x64 \
--mode=release --no-presubmit --extra-flags="--dump-wasm-module \
--dump-wasm-module-path=./test/fuzzer/wasm_corpus/" unittests